From b60231e87344b4c68f7ba75040606fdfe09ba769 Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Fri, 13 Jun 2025 14:06:07 +0000 Subject: [PATCH 1/5] SDK regeneration --- .github/workflows/ci.yml | 4 +- .mock/definition/accounting/__package__.yml | 32654 +++++++++ .../definition/accounting/accountDetails.yml | 36 + .mock/definition/accounting/accountToken.yml | 44 + .../accounting/accountingPeriods.yml | 119 + .mock/definition/accounting/accounts.yml | 496 + .mock/definition/accounting/addresses.yml | 61 + .../accounting/asyncPassthrough.yml | 70 + .mock/definition/accounting/asyncTasks.yml | 81 + .mock/definition/accounting/attachments.yml | 402 + .mock/definition/accounting/auditTrail.yml | 94 + .../accounting/availableActions.yml | 50 + .mock/definition/accounting/balanceSheets.yml | 241 + .../accounting/bankFeedAccounts.yml | 386 + .../accounting/bankFeedTransactions.yml | 403 + .../accounting/cashFlowStatements.yml | 241 + .mock/definition/accounting/companyInfo.yml | 205 + .mock/definition/accounting/contacts.yml | 602 + .mock/definition/accounting/creditNotes.yml | 1145 + .mock/definition/accounting/deleteAccount.yml | 15 + .mock/definition/accounting/employees.yml | 137 + .mock/definition/accounting/expenses.yml | 964 + .mock/definition/accounting/fieldMapping.yml | 1198 + .mock/definition/accounting/forceResync.yml | 37 + .../accounting/generalLedgerTransactions.yml | 289 + .mock/definition/accounting/generateKey.yml | 36 + .../accounting/incomeStatements.yml | 269 + .mock/definition/accounting/invoices.yml | 28100 ++++++++ .mock/definition/accounting/issues.yml | 129 + .mock/definition/accounting/items.yml | 842 + .../definition/accounting/journalEntries.yml | 959 + .mock/definition/accounting/linkToken.yml | 135 + .../definition/accounting/linkedAccounts.yml | 150 + .mock/definition/accounting/passthrough.yml | 40 + .../definition/accounting/paymentMethods.yml | 119 + .mock/definition/accounting/paymentTerms.yml | 133 + .mock/definition/accounting/payments.yml | 1482 + .mock/definition/accounting/phoneNumbers.yml | 44 + .mock/definition/accounting/projects.yml | 146 + .../definition/accounting/purchaseOrders.yml | 1289 + .mock/definition/accounting/regenerateKey.yml | 36 + .mock/definition/accounting/scopes.yml | 160 + .mock/definition/accounting/syncStatus.yml | 55 + .mock/definition/accounting/taxRates.yml | 185 + .../accounting/trackingCategories.yml | 182 + .mock/definition/accounting/transactions.yml | 385 + .mock/definition/accounting/vendorCredits.yml | 683 + .../accounting/webhookReceivers.yml | 61 + .mock/definition/api.yml | 20 + .mock/definition/ats/__package__.yml | 4112 ++ .mock/definition/ats/accountDetails.yml | 36 + .mock/definition/ats/accountToken.yml | 44 + .mock/definition/ats/activities.yml | 474 + .mock/definition/ats/applications.yml | 1903 + .mock/definition/ats/asyncPassthrough.yml | 70 + .mock/definition/ats/attachments.yml | 432 + .mock/definition/ats/auditTrail.yml | 94 + .mock/definition/ats/availableActions.yml | 50 + .mock/definition/ats/candidates.yml | 868 + .mock/definition/ats/deleteAccount.yml | 15 + .mock/definition/ats/departments.yml | 136 + .mock/definition/ats/eeocs.yml | 300 + .mock/definition/ats/fieldMapping.yml | 892 + .mock/definition/ats/forceResync.yml | 37 + .mock/definition/ats/generateKey.yml | 36 + .mock/definition/ats/interviews.yml | 526 + .mock/definition/ats/issues.yml | 129 + .mock/definition/ats/jobInterviewStages.yml | 153 + .mock/definition/ats/jobPostings.yml | 195 + .mock/definition/ats/jobs.yml | 454 + .mock/definition/ats/linkToken.yml | 135 + .mock/definition/ats/linkedAccounts.yml | 150 + .mock/definition/ats/offers.yml | 201 + .mock/definition/ats/offices.yml | 138 + .mock/definition/ats/passthrough.yml | 40 + .mock/definition/ats/regenerateKey.yml | 36 + .mock/definition/ats/rejectReasons.yml | 136 + .mock/definition/ats/scopes.yml | 160 + .mock/definition/ats/scorecards.yml | 216 + .mock/definition/ats/syncStatus.yml | 55 + .mock/definition/ats/tags.yml | 88 + .mock/definition/ats/users.yml | 173 + .mock/definition/ats/webhookReceivers.yml | 61 + .mock/definition/crm/__package__.yml | 4807 ++ .mock/definition/crm/accountDetails.yml | 36 + .mock/definition/crm/accountToken.yml | 44 + .mock/definition/crm/accounts.yml | 846 + .mock/definition/crm/associationTypes.yml | 420 + .mock/definition/crm/associations.yml | 142 + .mock/definition/crm/asyncPassthrough.yml | 70 + .mock/definition/crm/auditTrail.yml | 94 + .mock/definition/crm/availableActions.yml | 50 + .mock/definition/crm/contacts.yml | 900 + .mock/definition/crm/customObjectClasses.yml | 196 + .mock/definition/crm/customObjects.yml | 476 + .mock/definition/crm/deleteAccount.yml | 15 + .mock/definition/crm/engagementTypes.yml | 204 + .mock/definition/crm/engagements.yml | 855 + .mock/definition/crm/fieldMapping.yml | 654 + .mock/definition/crm/forceResync.yml | 37 + .mock/definition/crm/generateKey.yml | 36 + .mock/definition/crm/issues.yml | 129 + .mock/definition/crm/leads.yml | 626 + .mock/definition/crm/linkToken.yml | 135 + .mock/definition/crm/linkedAccounts.yml | 148 + .mock/definition/crm/notes.yml | 577 + .mock/definition/crm/opportunities.yml | 868 + .mock/definition/crm/passthrough.yml | 40 + .mock/definition/crm/regenerateKey.yml | 36 + .mock/definition/crm/scopes.yml | 160 + .mock/definition/crm/stages.yml | 222 + .mock/definition/crm/syncStatus.yml | 55 + .mock/definition/crm/tasks.yml | 807 + .mock/definition/crm/users.yml | 251 + .mock/definition/crm/webhookReceivers.yml | 61 + .mock/definition/filestorage/__package__.yml | 2137 + .../definition/filestorage/accountDetails.yml | 36 + .mock/definition/filestorage/accountToken.yml | 44 + .../filestorage/asyncPassthrough.yml | 70 + .mock/definition/filestorage/auditTrail.yml | 94 + .../filestorage/availableActions.yml | 50 + .../definition/filestorage/deleteAccount.yml | 15 + .mock/definition/filestorage/drives.yml | 145 + .mock/definition/filestorage/fieldMapping.yml | 518 + .mock/definition/filestorage/files.yml | 672 + .mock/definition/filestorage/folders.yml | 466 + .mock/definition/filestorage/forceResync.yml | 37 + .mock/definition/filestorage/generateKey.yml | 36 + .mock/definition/filestorage/groups.yml | 154 + .mock/definition/filestorage/issues.yml | 129 + .mock/definition/filestorage/linkToken.yml | 135 + .../definition/filestorage/linkedAccounts.yml | 150 + .mock/definition/filestorage/passthrough.yml | 40 + .../definition/filestorage/regenerateKey.yml | 36 + .mock/definition/filestorage/scopes.yml | 160 + .mock/definition/filestorage/syncStatus.yml | 55 + .mock/definition/filestorage/users.yml | 143 + .../filestorage/webhookReceivers.yml | 61 + .mock/definition/hris/__package__.yml | 6132 ++ .mock/definition/hris/accountDetails.yml | 36 + .mock/definition/hris/accountToken.yml | 44 + .mock/definition/hris/asyncPassthrough.yml | 70 + .mock/definition/hris/auditTrail.yml | 94 + .mock/definition/hris/availableActions.yml | 50 + .mock/definition/hris/bankInfo.yml | 212 + .mock/definition/hris/benefits.yml | 165 + .mock/definition/hris/companies.yml | 146 + .mock/definition/hris/deleteAccount.yml | 15 + .mock/definition/hris/dependents.yml | 166 + .mock/definition/hris/employeePayrollRuns.yml | 301 + .mock/definition/hris/employees.yml | 1779 + .mock/definition/hris/employerBenefits.yml | 140 + .mock/definition/hris/employments.yml | 337 + .mock/definition/hris/fieldMapping.yml | 892 + .mock/definition/hris/forceResync.yml | 37 + .mock/definition/hris/generateKey.yml | 36 + .mock/definition/hris/groups.yml | 179 + .mock/definition/hris/issues.yml | 129 + .mock/definition/hris/linkToken.yml | 135 + .mock/definition/hris/linkedAccounts.yml | 150 + .mock/definition/hris/locations.yml | 218 + .mock/definition/hris/passthrough.yml | 40 + .mock/definition/hris/payGroups.yml | 136 + .mock/definition/hris/payrollRuns.yml | 243 + .mock/definition/hris/regenerateKey.yml | 36 + .mock/definition/hris/scopes.yml | 160 + .mock/definition/hris/syncStatus.yml | 55 + .mock/definition/hris/teams.yml | 151 + .mock/definition/hris/timeOff.yml | 599 + .mock/definition/hris/timeOffBalances.yml | 205 + .mock/definition/hris/timesheetEntries.yml | 444 + .mock/definition/hris/webhookReceivers.yml | 61 + .mock/definition/ticketing/__package__.yml | 3011 + .mock/definition/ticketing/accountDetails.yml | 36 + .mock/definition/ticketing/accountToken.yml | 44 + .mock/definition/ticketing/accounts.yml | 142 + .../definition/ticketing/asyncPassthrough.yml | 70 + .mock/definition/ticketing/attachments.yml | 446 + .mock/definition/ticketing/auditTrail.yml | 94 + .../definition/ticketing/availableActions.yml | 50 + .mock/definition/ticketing/collections.yml | 253 + .mock/definition/ticketing/comments.yml | 461 + .mock/definition/ticketing/contacts.yml | 406 + .mock/definition/ticketing/deleteAccount.yml | 15 + .mock/definition/ticketing/fieldMapping.yml | 722 + .mock/definition/ticketing/forceResync.yml | 37 + .mock/definition/ticketing/generateKey.yml | 36 + .mock/definition/ticketing/issues.yml | 129 + .mock/definition/ticketing/linkToken.yml | 135 + .mock/definition/ticketing/linkedAccounts.yml | 150 + .mock/definition/ticketing/passthrough.yml | 40 + .mock/definition/ticketing/projects.yml | 220 + .mock/definition/ticketing/regenerateKey.yml | 36 + .mock/definition/ticketing/roles.yml | 144 + .mock/definition/ticketing/scopes.yml | 160 + .mock/definition/ticketing/syncStatus.yml | 55 + .mock/definition/ticketing/tags.yml | 134 + .mock/definition/ticketing/teams.yml | 136 + .mock/definition/ticketing/tickets.yml | 2151 + .mock/definition/ticketing/users.yml | 185 + .../definition/ticketing/webhookReceivers.yml | 61 + .mock/fern.config.json | 4 + accounting/account_details.go | 164 + accounting/account_token.go | 71 + accounting/accountdetails/client.go | 61 +- accounting/accounting_periods.go | 84 +- accounting/accountingperiods/client.go | 162 +- accounting/accounts.go | 1270 +- accounting/accounts/client.go | 290 +- accounting/accounttoken/client.go | 66 +- accounting/addresses.go | 10 +- accounting/addresses/client.go | 81 +- accounting/async_passthrough.go | 88 +- accounting/async_tasks.go | 211 + accounting/asyncpassthrough/client.go | 105 +- accounting/asynctasks/client.go | 66 +- accounting/attachments.go | 409 +- accounting/attachments/client.go | 269 +- accounting/audit_trail.go | 665 +- accounting/audittrail/client.go | 118 +- accounting/available_actions.go | 77 + accounting/availableactions/client.go | 61 +- accounting/balance_sheets.go | 1049 +- accounting/balancesheets/client.go | 191 +- accounting/bank_feed_accounts.go | 1144 +- accounting/bank_feed_transactions.go | 832 +- accounting/bankfeedaccounts/client.go | 250 +- accounting/bankfeedtransactions/client.go | 275 +- accounting/cash_flow_statements.go | 1071 +- accounting/cashflowstatements/client.go | 191 +- accounting/client/client.go | 119 +- accounting/company_info.go | 132 +- accounting/companyinfo/client.go | 188 +- accounting/contacts.go | 641 +- accounting/contacts/client.go | 400 +- accounting/credit_notes.go | 3003 +- accounting/creditnotes/client.go | 293 +- accounting/deleteaccount/client.go | 57 +- accounting/employees.go | 88 +- accounting/employees/client.go | 172 +- accounting/expenses.go | 5140 +- accounting/expenses/client.go | 477 +- accounting/field_mapping.go | 1432 +- accounting/fieldmapping/client.go | 280 +- accounting/forceresync/client.go | 63 +- accounting/general_ledger_transactions.go | 2475 +- .../generalledgertransactions/client.go | 197 +- accounting/generate_key.go | 4 +- accounting/generatekey/client.go | 65 +- accounting/income_statements.go | 1075 +- accounting/incomestatements/client.go | 191 +- accounting/invoices.go | 15458 +--- accounting/invoices/client.go | 596 +- accounting/issues.go | 316 +- accounting/issues/client.go | 186 +- accounting/items.go | 1301 +- accounting/items/client.go | 343 +- accounting/journal_entries.go | 5350 +- accounting/journalentries/client.go | 477 +- accounting/link_token.go | 272 +- accounting/linked_accounts.go | 533 +- accounting/linkedaccounts/client.go | 143 +- accounting/linktoken/client.go | 65 +- accounting/passthrough/client.go | 65 +- accounting/payment_methods.go | 91 + accounting/payment_terms.go | 95 + accounting/paymentmethods/client.go | 140 + accounting/payments.go | 3521 +- accounting/payments/client.go | 575 +- accounting/paymentterms/client.go | 140 + accounting/phone_numbers.go | 6 +- accounting/phonenumbers/client.go | 75 +- accounting/projects.go | 139 + accounting/projects/client.go | 124 + accounting/purchase_orders.go | 2853 +- accounting/purchaseorders/client.go | 489 +- accounting/regenerate_key.go | 4 +- accounting/regeneratekey/client.go | 65 +- accounting/scopes.go | 219 +- accounting/scopes/client.go | 135 +- accounting/sync_status.go | 74 +- accounting/syncstatus/client.go | 108 +- accounting/tax_rates.go | 99 +- accounting/taxrates/client.go | 191 +- accounting/tracking_categories.go | 111 +- accounting/trackingcategories/client.go | 203 +- accounting/transactions.go | 2452 +- accounting/transactions/client.go | 197 +- accounting/types.go | 58904 +++++----------- accounting/vendor_credits.go | 1671 +- accounting/vendorcredits/client.go | 281 +- accounting/webhook_receivers.go | 76 +- accounting/webhookreceivers/client.go | 100 +- ats/account_details.go | 226 + ats/account_token.go | 71 + ats/accountdetails/client.go | 61 +- ats/accounttoken/client.go | 66 +- ats/activities.go | 884 +- ats/activities/client.go | 287 +- ats/applications.go | 2527 +- ats/applications/client.go | 351 +- ats/async_passthrough.go | 88 +- ats/asyncpassthrough/client.go | 105 +- ats/attachments.go | 350 +- ats/attachments/client.go | 287 +- ats/audit_trail.go | 665 +- ats/audittrail/client.go | 118 +- ats/available_actions.go | 77 + ats/availableactions/client.go | 61 +- ats/candidates.go | 1371 +- ats/candidates/client.go | 417 +- ats/client/client.go | 90 +- ats/deleteaccount/client.go | 57 +- ats/departments.go | 91 +- ats/departments/client.go | 182 +- ats/eeocs.go | 788 +- ats/eeocs/client.go | 203 +- ats/field_mapping.go | 1216 +- ats/fieldmapping/client.go | 280 +- ats/forceresync/client.go | 63 +- ats/generate_key.go | 4 +- ats/generatekey/client.go | 65 +- ats/interviews.go | 781 +- ats/interviews/client.go | 296 +- ats/issues.go | 316 +- ats/issues/client.go | 186 +- ats/job_interview_stages.go | 97 +- ats/job_postings.go | 547 +- ats/jobinterviewstages/client.go | 191 +- ats/jobpostings/client.go | 191 +- ats/jobs.go | 423 +- ats/jobs/client.go | 308 +- ats/link_token.go | 272 +- ats/linked_accounts.go | 533 +- ats/linkedaccounts/client.go | 143 +- ats/linktoken/client.go | 65 +- ats/offers.go | 144 +- ats/offers/client.go | 206 +- ats/offices.go | 91 +- ats/offices/client.go | 182 +- ats/passthrough/client.go | 65 +- ats/regenerate_key.go | 4 +- ats/regeneratekey/client.go | 65 +- ats/reject_reasons.go | 91 +- ats/rejectreasons/client.go | 182 +- ats/scopes.go | 219 +- ats/scopes/client.go | 135 +- ats/scorecards.go | 659 +- ats/scorecards/client.go | 209 +- ats/sync_status.go | 74 +- ats/syncstatus/client.go | 108 +- ats/tags.go | 213 +- ats/tags/client.go | 131 +- ats/types.go | 12539 ++-- ats/users.go | 101 +- ats/users/client.go | 197 +- ats/webhook_receivers.go | 76 +- ats/webhookreceivers/client.go | 100 +- client/client.go | 44 +- client/client_test.go | 18 +- client/options.go | 48 - core/api_error.go | 42 + core/client_option.go | 53 - core/core.go | 220 - core/core_test.go | 219 - core/http.go | 8 + core/page.go | 70 + core/request_option.go | 139 + crm/account_details.go | 226 + crm/account_token.go | 71 + crm/accountdetails/client.go | 61 +- crm/accounts.go | 576 +- crm/accounts/client.go | 474 +- crm/accounttoken/client.go | 66 +- crm/association_types.go | 339 +- crm/associations.go | 266 +- crm/associations/client.go | 205 +- crm/associationtypes/client.go | 286 +- crm/async_passthrough.go | 88 +- crm/asyncpassthrough/client.go | 105 +- crm/audit_trail.go | 665 +- crm/audittrail/client.go | 118 +- crm/available_actions.go | 77 + crm/availableactions/client.go | 61 +- crm/client/client.go | 86 +- crm/contacts.go | 737 +- crm/contacts/client.go | 518 +- crm/custom_object_classes.go | 619 +- crm/custom_objects.go | 375 +- crm/customobjectclasses/client.go | 188 +- crm/customobjects/client.go | 384 +- crm/deleteaccount/client.go | 57 +- crm/engagement_types.go | 111 +- crm/engagements.go | 1610 +- crm/engagements/client.go | 474 +- crm/engagementtypes/client.go | 286 +- crm/field_mapping.go | 1048 +- crm/fieldmapping/client.go | 280 +- crm/forceresync/client.go | 63 +- crm/generate_key.go | 4 +- crm/generatekey/client.go | 65 +- crm/issues.go | 316 +- crm/issues/client.go | 186 +- crm/leads.go | 1104 +- crm/leads/client.go | 391 +- crm/link_token.go | 272 +- crm/linked_accounts.go | 533 +- crm/linkedaccounts/client.go | 143 +- crm/linktoken/client.go | 65 +- crm/notes.go | 1136 +- crm/notes/client.go | 388 +- crm/opportunities.go | 955 +- crm/opportunities/client.go | 495 +- crm/passthrough/client.go | 65 +- crm/regenerate_key.go | 4 +- crm/regeneratekey/client.go | 65 +- crm/scopes.go | 219 +- crm/scopes/client.go | 135 +- crm/stages.go | 111 +- crm/stages/client.go | 286 +- crm/sync_status.go | 74 +- crm/syncstatus/client.go | 76 +- crm/tasks.go | 1408 +- crm/tasks/client.go | 468 +- crm/types.go | 13595 ++-- crm/users.go | 113 +- crm/users/client.go | 330 +- crm/webhook_receivers.go | 76 +- crm/webhookreceivers/client.go | 100 +- environments.go | 10 +- file_param.go | 41 + filestorage/account_details.go | 226 + filestorage/account_token.go | 71 + filestorage/accountdetails/client.go | 61 +- filestorage/accounttoken/client.go | 66 +- filestorage/async_passthrough.go | 88 +- filestorage/asyncpassthrough/client.go | 105 +- filestorage/audit_trail.go | 665 +- filestorage/audittrail/client.go | 118 +- filestorage/available_actions.go | 77 + filestorage/availableactions/client.go | 61 +- filestorage/client/client.go | 68 +- filestorage/deleteaccount/client.go | 57 +- filestorage/drives.go | 93 +- filestorage/drives/client.go | 185 +- filestorage/field_mapping.go | 952 +- filestorage/fieldmapping/client.go | 280 +- filestorage/files.go | 1400 +- filestorage/files/client.go | 426 +- filestorage/folders.go | 638 +- filestorage/folders/client.go | 281 +- filestorage/forceresync/client.go | 63 +- filestorage/generate_key.go | 4 +- filestorage/generatekey/client.go | 65 +- filestorage/groups.go | 139 +- filestorage/groups/client.go | 188 +- filestorage/issues.go | 316 +- filestorage/issues/client.go | 186 +- filestorage/link_token.go | 272 +- filestorage/linked_accounts.go | 533 +- filestorage/linkedaccounts/client.go | 143 +- filestorage/linktoken/client.go | 65 +- filestorage/passthrough/client.go | 65 +- filestorage/regenerate_key.go | 4 +- filestorage/regeneratekey/client.go | 65 +- filestorage/scopes.go | 219 +- filestorage/scopes/client.go | 135 +- filestorage/sync_status.go | 74 +- filestorage/syncstatus/client.go | 108 +- filestorage/types.go | 5632 +- filestorage/users.go | 93 +- filestorage/users/client.go | 185 +- filestorage/webhook_receivers.go | 76 +- filestorage/webhookreceivers/client.go | 100 +- go.mod | 10 +- go.sum | 2 + hris/account_details.go | 226 + hris/account_token.go | 71 + hris/accountdetails/client.go | 61 +- hris/accounttoken/client.go | 66 +- hris/async_passthrough.go | 88 +- hris/asyncpassthrough/client.go | 105 +- hris/audit_trail.go | 665 +- hris/audittrail/client.go | 118 +- hris/available_actions.go | 77 + hris/availableactions/client.go | 61 +- hris/bank_info.go | 454 +- hris/bankinfo/client.go | 212 +- hris/benefits.go | 366 +- hris/benefits/client.go | 191 +- hris/client/client.go | 90 +- hris/companies.go | 91 +- hris/companies/client.go | 182 +- hris/deleteaccount/client.go | 57 +- hris/dependents.go | 498 +- hris/dependents/client.go | 188 +- hris/employee_payroll_runs.go | 1074 +- hris/employeepayrollruns/client.go | 206 +- hris/employees.go | 3085 +- hris/employees/client.go | 388 +- hris/employer_benefits.go | 364 +- hris/employerbenefits/client.go | 182 +- hris/employments.go | 144 +- hris/employments/client.go | 206 +- hris/field_mapping.go | 1216 +- hris/fieldmapping/client.go | 280 +- hris/forceresync/client.go | 63 +- hris/generate_key.go | 4 +- hris/generatekey/client.go | 65 +- hris/groups.go | 105 +- hris/groups/client.go | 203 +- hris/issues.go | 316 +- hris/issues/client.go | 186 +- hris/link_token.go | 272 +- hris/linked_accounts.go | 533 +- hris/linkedaccounts/client.go | 143 +- hris/linktoken/client.go | 65 +- hris/locations.go | 104 +- hris/locations/client.go | 197 +- hris/passthrough/client.go | 65 +- hris/pay_groups.go | 91 +- hris/paygroups/client.go | 182 +- hris/payroll_runs.go | 118 +- hris/payrollruns/client.go | 209 +- hris/regenerate_key.go | 4 +- hris/regeneratekey/client.go | 65 +- hris/scopes.go | 219 +- hris/scopes/client.go | 135 +- hris/sync_status.go | 74 +- hris/syncstatus/client.go | 108 +- hris/teams.go | 97 +- hris/teams/client.go | 191 +- hris/time_off.go | 1426 +- hris/time_off_balances.go | 460 +- hris/timeoff/client.go | 308 +- hris/timeoffbalances/client.go | 206 +- hris/timesheet_entries.go | 596 +- hris/timesheetentries/client.go | 290 +- hris/types.go | 16258 ++--- hris/webhook_receivers.go | 76 +- hris/webhookreceivers/client.go | 100 +- internal/caller.go | 275 + internal/caller_test.go | 453 + internal/error_decoder.go | 45 + internal/error_decoder_test.go | 55 + internal/extra_properties.go | 141 + internal/extra_properties_test.go | 228 + internal/http.go | 48 + internal/pager.go | 127 + internal/pager_test.go | 162 + internal/query.go | 300 + internal/query_test.go | 239 + internal/retrier.go | 165 + internal/retrier_test.go | 211 + {core => internal}/stringer.go | 2 +- internal/time.go | 137 + option/request_option.go | 80 + pointer.go | 33 +- ticketing/account_details.go | 226 + ticketing/account_token.go | 71 + ticketing/accountdetails/client.go | 61 +- ticketing/accounts.go | 91 +- ticketing/accounts/client.go | 182 +- ticketing/accounttoken/client.go | 66 +- ticketing/async_passthrough.go | 88 +- ticketing/asyncpassthrough/client.go | 105 +- ticketing/attachments.go | 347 +- ticketing/attachments/client.go | 325 +- ticketing/audit_trail.go | 665 +- ticketing/audittrail/client.go | 118 +- ticketing/available_actions.go | 77 + ticketing/availableactions/client.go | 61 +- ticketing/client/client.go | 80 +- ticketing/collections.go | 155 +- ticketing/collections/client.go | 263 +- ticketing/comments.go | 927 +- ticketing/comments/client.go | 278 +- ticketing/contacts.go | 339 +- ticketing/contacts/client.go | 272 +- ticketing/deleteaccount/client.go | 57 +- ticketing/field_mapping.go | 1096 +- ticketing/fieldmapping/client.go | 280 +- ticketing/forceresync/client.go | 63 +- ticketing/generate_key.go | 4 +- ticketing/generatekey/client.go | 65 +- ticketing/issues.go | 316 +- ticketing/issues/client.go | 186 +- ticketing/link_token.go | 272 +- ticketing/linked_accounts.go | 533 +- ticketing/linkedaccounts/client.go | 143 +- ticketing/linktoken/client.go | 65 +- ticketing/passthrough/client.go | 65 +- ticketing/projects.go | 265 +- ticketing/projects/client.go | 281 +- ticketing/regenerate_key.go | 4 +- ticketing/regeneratekey/client.go | 65 +- ticketing/roles.go | 91 +- ticketing/roles/client.go | 182 +- ticketing/scopes.go | 219 +- ticketing/scopes/client.go | 135 +- ticketing/sync_status.go | 74 +- ticketing/syncstatus/client.go | 108 +- ticketing/tags.go | 226 +- ticketing/tags/client.go | 182 +- ticketing/teams.go | 91 +- ticketing/teams/client.go | 182 +- ticketing/tickets.go | 3404 +- ticketing/tickets/client.go | 641 +- ticketing/types.go | 8928 +-- ticketing/users.go | 72 +- ticketing/users/client.go | 191 +- ticketing/webhook_receivers.go | 76 +- ticketing/webhookreceivers/client.go | 100 +- 613 files changed, 281002 insertions(+), 114926 deletions(-) create mode 100644 .mock/definition/accounting/__package__.yml create mode 100644 .mock/definition/accounting/accountDetails.yml create mode 100644 .mock/definition/accounting/accountToken.yml create mode 100644 .mock/definition/accounting/accountingPeriods.yml create mode 100644 .mock/definition/accounting/accounts.yml create mode 100644 .mock/definition/accounting/addresses.yml create mode 100644 .mock/definition/accounting/asyncPassthrough.yml create mode 100644 .mock/definition/accounting/asyncTasks.yml create mode 100644 .mock/definition/accounting/attachments.yml create mode 100644 .mock/definition/accounting/auditTrail.yml create mode 100644 .mock/definition/accounting/availableActions.yml create mode 100644 .mock/definition/accounting/balanceSheets.yml create mode 100644 .mock/definition/accounting/bankFeedAccounts.yml create mode 100644 .mock/definition/accounting/bankFeedTransactions.yml create mode 100644 .mock/definition/accounting/cashFlowStatements.yml create mode 100644 .mock/definition/accounting/companyInfo.yml create mode 100644 .mock/definition/accounting/contacts.yml create mode 100644 .mock/definition/accounting/creditNotes.yml create mode 100644 .mock/definition/accounting/deleteAccount.yml create mode 100644 .mock/definition/accounting/employees.yml create mode 100644 .mock/definition/accounting/expenses.yml create mode 100644 .mock/definition/accounting/fieldMapping.yml create mode 100644 .mock/definition/accounting/forceResync.yml create mode 100644 .mock/definition/accounting/generalLedgerTransactions.yml create mode 100644 .mock/definition/accounting/generateKey.yml create mode 100644 .mock/definition/accounting/incomeStatements.yml create mode 100644 .mock/definition/accounting/invoices.yml create mode 100644 .mock/definition/accounting/issues.yml create mode 100644 .mock/definition/accounting/items.yml create mode 100644 .mock/definition/accounting/journalEntries.yml create mode 100644 .mock/definition/accounting/linkToken.yml create mode 100644 .mock/definition/accounting/linkedAccounts.yml create mode 100644 .mock/definition/accounting/passthrough.yml create mode 100644 .mock/definition/accounting/paymentMethods.yml create mode 100644 .mock/definition/accounting/paymentTerms.yml create mode 100644 .mock/definition/accounting/payments.yml create mode 100644 .mock/definition/accounting/phoneNumbers.yml create mode 100644 .mock/definition/accounting/projects.yml create mode 100644 .mock/definition/accounting/purchaseOrders.yml create mode 100644 .mock/definition/accounting/regenerateKey.yml create mode 100644 .mock/definition/accounting/scopes.yml create mode 100644 .mock/definition/accounting/syncStatus.yml create mode 100644 .mock/definition/accounting/taxRates.yml create mode 100644 .mock/definition/accounting/trackingCategories.yml create mode 100644 .mock/definition/accounting/transactions.yml create mode 100644 .mock/definition/accounting/vendorCredits.yml create mode 100644 .mock/definition/accounting/webhookReceivers.yml create mode 100644 .mock/definition/api.yml create mode 100644 .mock/definition/ats/__package__.yml create mode 100644 .mock/definition/ats/accountDetails.yml create mode 100644 .mock/definition/ats/accountToken.yml create mode 100644 .mock/definition/ats/activities.yml create mode 100644 .mock/definition/ats/applications.yml create mode 100644 .mock/definition/ats/asyncPassthrough.yml create mode 100644 .mock/definition/ats/attachments.yml create mode 100644 .mock/definition/ats/auditTrail.yml create mode 100644 .mock/definition/ats/availableActions.yml create mode 100644 .mock/definition/ats/candidates.yml create mode 100644 .mock/definition/ats/deleteAccount.yml create mode 100644 .mock/definition/ats/departments.yml create mode 100644 .mock/definition/ats/eeocs.yml create mode 100644 .mock/definition/ats/fieldMapping.yml create mode 100644 .mock/definition/ats/forceResync.yml create mode 100644 .mock/definition/ats/generateKey.yml create mode 100644 .mock/definition/ats/interviews.yml create mode 100644 .mock/definition/ats/issues.yml create mode 100644 .mock/definition/ats/jobInterviewStages.yml create mode 100644 .mock/definition/ats/jobPostings.yml create mode 100644 .mock/definition/ats/jobs.yml create mode 100644 .mock/definition/ats/linkToken.yml create mode 100644 .mock/definition/ats/linkedAccounts.yml create mode 100644 .mock/definition/ats/offers.yml create mode 100644 .mock/definition/ats/offices.yml create mode 100644 .mock/definition/ats/passthrough.yml create mode 100644 .mock/definition/ats/regenerateKey.yml create mode 100644 .mock/definition/ats/rejectReasons.yml create mode 100644 .mock/definition/ats/scopes.yml create mode 100644 .mock/definition/ats/scorecards.yml create mode 100644 .mock/definition/ats/syncStatus.yml create mode 100644 .mock/definition/ats/tags.yml create mode 100644 .mock/definition/ats/users.yml create mode 100644 .mock/definition/ats/webhookReceivers.yml create mode 100644 .mock/definition/crm/__package__.yml create mode 100644 .mock/definition/crm/accountDetails.yml create mode 100644 .mock/definition/crm/accountToken.yml create mode 100644 .mock/definition/crm/accounts.yml create mode 100644 .mock/definition/crm/associationTypes.yml create mode 100644 .mock/definition/crm/associations.yml create mode 100644 .mock/definition/crm/asyncPassthrough.yml create mode 100644 .mock/definition/crm/auditTrail.yml create mode 100644 .mock/definition/crm/availableActions.yml create mode 100644 .mock/definition/crm/contacts.yml create mode 100644 .mock/definition/crm/customObjectClasses.yml create mode 100644 .mock/definition/crm/customObjects.yml create mode 100644 .mock/definition/crm/deleteAccount.yml create mode 100644 .mock/definition/crm/engagementTypes.yml create mode 100644 .mock/definition/crm/engagements.yml create mode 100644 .mock/definition/crm/fieldMapping.yml create mode 100644 .mock/definition/crm/forceResync.yml create mode 100644 .mock/definition/crm/generateKey.yml create mode 100644 .mock/definition/crm/issues.yml create mode 100644 .mock/definition/crm/leads.yml create mode 100644 .mock/definition/crm/linkToken.yml create mode 100644 .mock/definition/crm/linkedAccounts.yml create mode 100644 .mock/definition/crm/notes.yml create mode 100644 .mock/definition/crm/opportunities.yml create mode 100644 .mock/definition/crm/passthrough.yml create mode 100644 .mock/definition/crm/regenerateKey.yml create mode 100644 .mock/definition/crm/scopes.yml create mode 100644 .mock/definition/crm/stages.yml create mode 100644 .mock/definition/crm/syncStatus.yml create mode 100644 .mock/definition/crm/tasks.yml create mode 100644 .mock/definition/crm/users.yml create mode 100644 .mock/definition/crm/webhookReceivers.yml create mode 100644 .mock/definition/filestorage/__package__.yml create mode 100644 .mock/definition/filestorage/accountDetails.yml create mode 100644 .mock/definition/filestorage/accountToken.yml create mode 100644 .mock/definition/filestorage/asyncPassthrough.yml create mode 100644 .mock/definition/filestorage/auditTrail.yml create mode 100644 .mock/definition/filestorage/availableActions.yml create mode 100644 .mock/definition/filestorage/deleteAccount.yml create mode 100644 .mock/definition/filestorage/drives.yml create mode 100644 .mock/definition/filestorage/fieldMapping.yml create mode 100644 .mock/definition/filestorage/files.yml create mode 100644 .mock/definition/filestorage/folders.yml create mode 100644 .mock/definition/filestorage/forceResync.yml create mode 100644 .mock/definition/filestorage/generateKey.yml create mode 100644 .mock/definition/filestorage/groups.yml create mode 100644 .mock/definition/filestorage/issues.yml create mode 100644 .mock/definition/filestorage/linkToken.yml create mode 100644 .mock/definition/filestorage/linkedAccounts.yml create mode 100644 .mock/definition/filestorage/passthrough.yml create mode 100644 .mock/definition/filestorage/regenerateKey.yml create mode 100644 .mock/definition/filestorage/scopes.yml create mode 100644 .mock/definition/filestorage/syncStatus.yml create mode 100644 .mock/definition/filestorage/users.yml create mode 100644 .mock/definition/filestorage/webhookReceivers.yml create mode 100644 .mock/definition/hris/__package__.yml create mode 100644 .mock/definition/hris/accountDetails.yml create mode 100644 .mock/definition/hris/accountToken.yml create mode 100644 .mock/definition/hris/asyncPassthrough.yml create mode 100644 .mock/definition/hris/auditTrail.yml create mode 100644 .mock/definition/hris/availableActions.yml create mode 100644 .mock/definition/hris/bankInfo.yml create mode 100644 .mock/definition/hris/benefits.yml create mode 100644 .mock/definition/hris/companies.yml create mode 100644 .mock/definition/hris/deleteAccount.yml create mode 100644 .mock/definition/hris/dependents.yml create mode 100644 .mock/definition/hris/employeePayrollRuns.yml create mode 100644 .mock/definition/hris/employees.yml create mode 100644 .mock/definition/hris/employerBenefits.yml create mode 100644 .mock/definition/hris/employments.yml create mode 100644 .mock/definition/hris/fieldMapping.yml create mode 100644 .mock/definition/hris/forceResync.yml create mode 100644 .mock/definition/hris/generateKey.yml create mode 100644 .mock/definition/hris/groups.yml create mode 100644 .mock/definition/hris/issues.yml create mode 100644 .mock/definition/hris/linkToken.yml create mode 100644 .mock/definition/hris/linkedAccounts.yml create mode 100644 .mock/definition/hris/locations.yml create mode 100644 .mock/definition/hris/passthrough.yml create mode 100644 .mock/definition/hris/payGroups.yml create mode 100644 .mock/definition/hris/payrollRuns.yml create mode 100644 .mock/definition/hris/regenerateKey.yml create mode 100644 .mock/definition/hris/scopes.yml create mode 100644 .mock/definition/hris/syncStatus.yml create mode 100644 .mock/definition/hris/teams.yml create mode 100644 .mock/definition/hris/timeOff.yml create mode 100644 .mock/definition/hris/timeOffBalances.yml create mode 100644 .mock/definition/hris/timesheetEntries.yml create mode 100644 .mock/definition/hris/webhookReceivers.yml create mode 100644 .mock/definition/ticketing/__package__.yml create mode 100644 .mock/definition/ticketing/accountDetails.yml create mode 100644 .mock/definition/ticketing/accountToken.yml create mode 100644 .mock/definition/ticketing/accounts.yml create mode 100644 .mock/definition/ticketing/asyncPassthrough.yml create mode 100644 .mock/definition/ticketing/attachments.yml create mode 100644 .mock/definition/ticketing/auditTrail.yml create mode 100644 .mock/definition/ticketing/availableActions.yml create mode 100644 .mock/definition/ticketing/collections.yml create mode 100644 .mock/definition/ticketing/comments.yml create mode 100644 .mock/definition/ticketing/contacts.yml create mode 100644 .mock/definition/ticketing/deleteAccount.yml create mode 100644 .mock/definition/ticketing/fieldMapping.yml create mode 100644 .mock/definition/ticketing/forceResync.yml create mode 100644 .mock/definition/ticketing/generateKey.yml create mode 100644 .mock/definition/ticketing/issues.yml create mode 100644 .mock/definition/ticketing/linkToken.yml create mode 100644 .mock/definition/ticketing/linkedAccounts.yml create mode 100644 .mock/definition/ticketing/passthrough.yml create mode 100644 .mock/definition/ticketing/projects.yml create mode 100644 .mock/definition/ticketing/regenerateKey.yml create mode 100644 .mock/definition/ticketing/roles.yml create mode 100644 .mock/definition/ticketing/scopes.yml create mode 100644 .mock/definition/ticketing/syncStatus.yml create mode 100644 .mock/definition/ticketing/tags.yml create mode 100644 .mock/definition/ticketing/teams.yml create mode 100644 .mock/definition/ticketing/tickets.yml create mode 100644 .mock/definition/ticketing/users.yml create mode 100644 .mock/definition/ticketing/webhookReceivers.yml create mode 100644 .mock/fern.config.json create mode 100644 accounting/account_details.go create mode 100644 accounting/account_token.go create mode 100644 accounting/async_tasks.go create mode 100644 accounting/available_actions.go create mode 100644 accounting/payment_methods.go create mode 100644 accounting/payment_terms.go create mode 100644 accounting/paymentmethods/client.go create mode 100644 accounting/paymentterms/client.go create mode 100644 accounting/projects.go create mode 100644 accounting/projects/client.go create mode 100644 ats/account_details.go create mode 100644 ats/account_token.go create mode 100644 ats/available_actions.go delete mode 100644 client/options.go create mode 100644 core/api_error.go delete mode 100644 core/client_option.go delete mode 100644 core/core.go delete mode 100644 core/core_test.go create mode 100644 core/http.go create mode 100644 core/page.go create mode 100644 core/request_option.go create mode 100644 crm/account_details.go create mode 100644 crm/account_token.go create mode 100644 crm/available_actions.go create mode 100644 file_param.go create mode 100644 filestorage/account_details.go create mode 100644 filestorage/account_token.go create mode 100644 filestorage/available_actions.go create mode 100644 hris/account_details.go create mode 100644 hris/account_token.go create mode 100644 hris/available_actions.go create mode 100644 internal/caller.go create mode 100644 internal/caller_test.go create mode 100644 internal/error_decoder.go create mode 100644 internal/error_decoder_test.go create mode 100644 internal/extra_properties.go create mode 100644 internal/extra_properties_test.go create mode 100644 internal/http.go create mode 100644 internal/pager.go create mode 100644 internal/pager_test.go create mode 100644 internal/query.go create mode 100644 internal/query_test.go create mode 100644 internal/retrier.go create mode 100644 internal/retrier_test.go rename {core => internal}/stringer.go (94%) create mode 100644 internal/time.go create mode 100644 option/request_option.go create mode 100644 ticketing/account_details.go create mode 100644 ticketing/account_token.go create mode 100644 ticketing/available_actions.go diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d4c0a5d..6558e5b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up go uses: actions/setup-go@v4 @@ -18,7 +18,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up go uses: actions/setup-go@v4 diff --git a/.mock/definition/accounting/__package__.yml b/.mock/definition/accounting/__package__.yml new file mode 100644 index 0000000..70df743 --- /dev/null +++ b/.mock/definition/accounting/__package__.yml @@ -0,0 +1,32654 @@ +types: + Account: + docs: >- + # The Account Object + + ### Description + + An `Account` represents a category in a company’s ledger in which a + financial transaction is recorded against. The aggregation of each + `Account` object is often referred to as the **Chart of Accounts**. + + + An `Account` can be classified into one of the following categories, + determined through the `classification` field: + + * __Asset:__ Accounts Receivable and Bank Accounts + + * __Liability:__ Accounts Payable and Credit Card Accounts + + * __Equity:__ Treasury Accounts and Retained Earnings + + * __Revenue:__ Income and Other Income + + * __Expense:__ Cost of Goods Sold and Office Expenses + + + ### Usage Example + + Fetch from the `LIST Accounts` endpoint and view a company's accounts. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The account's name. + description: + type: optional + docs: The account's description. + classification: + type: optional + docs: |- + The account's broadest grouping. + + * `ASSET` - ASSET + * `EQUITY` - EQUITY + * `EXPENSE` - EXPENSE + * `LIABILITY` - LIABILITY + * `REVENUE` - REVENUE + type: + type: optional + docs: >- + The account's type is a narrower and more specific grouping within the + account's classification. + account_type: + type: optional + docs: >- + Normalized account type- which is a narrower and more specific + grouping within the account's classification. + + + * `BANK` - BANK + + * `CREDIT_CARD` - CREDIT_CARD + + * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE + + * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE + + * `FIXED_ASSET` - FIXED_ASSET + + * `OTHER_ASSET` - OTHER_ASSET + + * `OTHER_CURRENT_ASSET` - OTHER_CURRENT_ASSET + + * `OTHER_EXPENSE` - OTHER_EXPENSE + + * `OTHER_INCOME` - OTHER_INCOME + + * `COST_OF_GOODS_SOLD` - COST_OF_GOODS_SOLD + + * `OTHER_CURRENT_LIABILITY` - OTHER_CURRENT_LIABILITY + + * `LONG_TERM_LIABILITY` - LONG_TERM_LIABILITY + + * `NON_POSTING` - NON_POSTING + status: + type: optional + docs: |- + The account's status. + + * `ACTIVE` - ACTIVE + * `PENDING` - PENDING + * `INACTIVE` - INACTIVE + current_balance: + type: optional + docs: The account's current balance. + currency: + type: optional + docs: >- + The account's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + account_number: + type: optional + docs: The account's number. + parent_account: + type: optional + docs: ID of the parent account. + validation: + format: uuid + company: + type: optional + docs: The company the account belongs to. + validation: + format: uuid + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + AccountAccountTypeEnum: + enum: + - BANK + - CREDIT_CARD + - ACCOUNTS_PAYABLE + - ACCOUNTS_RECEIVABLE + - FIXED_ASSET + - OTHER_ASSET + - OTHER_CURRENT_ASSET + - OTHER_EXPENSE + - OTHER_INCOME + - COST_OF_GOODS_SOLD + - OTHER_CURRENT_LIABILITY + - LONG_TERM_LIABILITY + - NON_POSTING + docs: |- + * `BANK` - BANK + * `CREDIT_CARD` - CREDIT_CARD + * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE + * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE + * `FIXED_ASSET` - FIXED_ASSET + * `OTHER_ASSET` - OTHER_ASSET + * `OTHER_CURRENT_ASSET` - OTHER_CURRENT_ASSET + * `OTHER_EXPENSE` - OTHER_EXPENSE + * `OTHER_INCOME` - OTHER_INCOME + * `COST_OF_GOODS_SOLD` - COST_OF_GOODS_SOLD + * `OTHER_CURRENT_LIABILITY` - OTHER_CURRENT_LIABILITY + * `LONG_TERM_LIABILITY` - LONG_TERM_LIABILITY + * `NON_POSTING` - NON_POSTING + source: + openapi: openapi/openapi.yml + AccountDetails: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + integration: + type: optional + access: read-only + integration_slug: + type: optional + access: read-only + category: optional + end_user_origin_id: + type: optional + access: read-only + end_user_organization_name: + type: optional + access: read-only + end_user_email_address: + type: optional + validation: + format: email + access: read-only + status: + type: optional + access: read-only + webhook_listener_url: + type: optional + validation: + format: uri + access: read-only + is_duplicate: + type: optional + docs: >- + 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. + access: read-only + account_type: + type: optional + access: read-only + completed_at: + type: optional + docs: The time at which account completes the linking flow. + source: + openapi: openapi/openapi.yml + AccountDetailsAndActions: + docs: >- + # The LinkedAccount Object + + ### Description + + The `LinkedAccount` object is used to represent an end user's link with a + specific integration. + + + ### Usage Example + + View a list of your organization's `LinkedAccount` objects. + properties: + id: string + category: optional + status: AccountDetailsAndActionsStatusEnum + status_detail: optional + end_user_origin_id: optional + end_user_organization_name: string + end_user_email_address: string + subdomain: + type: optional + docs: The tenant or domain the customer has provided access to. + webhook_listener_url: string + is_duplicate: + type: optional + docs: >- + 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. + integration: optional + account_type: string + completed_at: datetime + integration_specific_fields: optional> + source: + openapi: openapi/openapi.yml + AccountDetailsAndActionsIntegration: + properties: + name: string + categories: list + image: optional + square_image: optional + color: string + slug: string + passthrough_available: boolean + available_model_operations: optional> + source: + openapi: openapi/openapi.yml + AccountDetailsAndActionsStatusEnum: + enum: + - COMPLETE + - INCOMPLETE + - RELINK_NEEDED + - IDLE + docs: |- + * `COMPLETE` - COMPLETE + * `INCOMPLETE` - INCOMPLETE + * `RELINK_NEEDED` - RELINK_NEEDED + * `IDLE` - IDLE + source: + openapi: openapi/openapi.yml + AccountIntegration: + properties: + name: + type: string + docs: Company name. + abbreviated_name: + type: optional + docs: >- + Optional. This shortened name appears in places with limited space, + usually in conjunction with the platform's logo (e.g., Merge Link + menu).

Example: Workforce Now (in lieu of ADP Workforce + Now), SuccessFactors (in lieu of SAP SuccessFactors) + categories: + type: optional> + docs: >- + Category or categories this integration belongs to. Multiple + categories should be comma separated, i.e. [ats, hris]. + access: read-only + image: + type: optional + docs: Company logo in rectangular shape. + validation: + format: uri + square_image: + type: optional + docs: Company logo in square shape. + validation: + format: uri + color: + type: optional + docs: >- + The color of this integration used for buttons and text throughout the + app and landing pages. Choose a darker, saturated color. + validation: + pattern: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ + maxLength: 18 + slug: + type: optional + access: read-only + api_endpoints_to_documentation_urls: + type: optional> + docs: >- + Mapping of API endpoints to documentation urls for support. Example: + {'GET': [['/common-model-scopes', + 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', + 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], + 'POST': []} + webhook_setup_guide_url: + type: optional + docs: >- + Setup guide URL for third party webhook creation. Exposed in Merge + Docs. + category_beta_status: + type: optional> + docs: Category or categories this integration is in beta status for. + access: read-only + source: + openapi: openapi/openapi.yml + AccountRequest: + docs: >- + # The Account Object + + ### Description + + An `Account` represents a category in a company’s ledger in which a + financial transaction is recorded against. The aggregation of each + `Account` object is often referred to as the **Chart of Accounts**. + + + An `Account` can be classified into one of the following categories, + determined through the `classification` field: + + * __Asset:__ Accounts Receivable and Bank Accounts + + * __Liability:__ Accounts Payable and Credit Card Accounts + + * __Equity:__ Treasury Accounts and Retained Earnings + + * __Revenue:__ Income and Other Income + + * __Expense:__ Cost of Goods Sold and Office Expenses + + + ### Usage Example + + Fetch from the `LIST Accounts` endpoint and view a company's accounts. + properties: + name: + type: optional + docs: The account's name. + description: + type: optional + docs: The account's description. + classification: + type: optional + docs: |- + The account's broadest grouping. + + * `ASSET` - ASSET + * `EQUITY` - EQUITY + * `EXPENSE` - EXPENSE + * `LIABILITY` - LIABILITY + * `REVENUE` - REVENUE + type: + type: optional + docs: >- + The account's type is a narrower and more specific grouping within the + account's classification. + account_type: + type: optional + docs: >- + Normalized account type- which is a narrower and more specific + grouping within the account's classification. + + + * `BANK` - BANK + + * `CREDIT_CARD` - CREDIT_CARD + + * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE + + * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE + + * `FIXED_ASSET` - FIXED_ASSET + + * `OTHER_ASSET` - OTHER_ASSET + + * `OTHER_CURRENT_ASSET` - OTHER_CURRENT_ASSET + + * `OTHER_EXPENSE` - OTHER_EXPENSE + + * `OTHER_INCOME` - OTHER_INCOME + + * `COST_OF_GOODS_SOLD` - COST_OF_GOODS_SOLD + + * `OTHER_CURRENT_LIABILITY` - OTHER_CURRENT_LIABILITY + + * `LONG_TERM_LIABILITY` - LONG_TERM_LIABILITY + + * `NON_POSTING` - NON_POSTING + status: + type: optional + docs: |- + The account's status. + + * `ACTIVE` - ACTIVE + * `PENDING` - PENDING + * `INACTIVE` - INACTIVE + current_balance: + type: optional + docs: The account's current balance. + currency: + type: optional + docs: >- + The account's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + account_number: + type: optional + docs: The account's number. + parent_account: + type: optional + docs: ID of the parent account. + validation: + format: uuid + company: + type: optional + docs: The company the account belongs to. + validation: + format: uuid + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + AccountResponse: + properties: + model: Account + warnings: list + errors: list + logs: optional> + source: + openapi: openapi/openapi.yml + AccountStatusEnum: + enum: + - ACTIVE + - PENDING + - INACTIVE + docs: |- + * `ACTIVE` - ACTIVE + * `PENDING` - PENDING + * `INACTIVE` - INACTIVE + source: + openapi: openapi/openapi.yml + AccountToken: + properties: + account_token: string + integration: AccountIntegration + id: string + source: + openapi: openapi/openapi.yml + AccountingAttachment: + docs: >- + # The Accounting Attachment Object + + ### Description + + The `AccountingAttachment` object is used to represent a company's + attachments. + + + ### Usage Example + + Fetch from the `LIST AccountingAttachments` endpoint and view a company's + attachments. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + file_name: + type: optional + docs: The attachment's name. + file_url: + type: optional + docs: The attachment's url. + validation: + format: uri + maxLength: 2000 + company: + type: optional + docs: The company the accounting attachment belongs to. + validation: + format: uuid + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + AccountingAttachmentRequest: + docs: >- + # The Accounting Attachment Object + + ### Description + + The `AccountingAttachment` object is used to represent a company's + attachments. + + + ### Usage Example + + Fetch from the `LIST AccountingAttachments` endpoint and view a company's + attachments. + properties: + file_name: + type: optional + docs: The attachment's name. + file_url: + type: optional + docs: The attachment's url. + validation: + format: uri + maxLength: 2000 + company: + type: optional + docs: The company the accounting attachment belongs to. + validation: + format: uuid + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + AccountingAttachmentResponse: + properties: + model: AccountingAttachment + warnings: list + errors: list + logs: optional> + source: + openapi: openapi/openapi.yml + AccountingPeriod: + docs: >- + # The AccountingPeriod Object + + ### Description + + The `AccountingPeriod` object is used to define a period of time in which + events occurred. + + + ### Usage Example + + Common models like `Invoice` and `Transaction` will have + `AccountingPeriod` objects which will denote when they occurred. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: Name of the accounting period. + validation: + maxLength: 100 + status: optional + start_date: + type: optional + docs: Beginning date of the period + end_date: + type: optional + docs: End date of the period + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + AccountingPhoneNumber: + docs: >- + # The AccountingPhoneNumber Object + + ### Description + + The `AccountingPhoneNumber` object is used to represent a contact's or + company's phone number. + + + ### Usage Example + + Fetch from the `GET CompanyInfo` endpoint and view the company's phone + numbers. + properties: + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + number: + type: optional + docs: The phone number. + type: + type: optional + docs: The phone number's type. + source: + openapi: openapi/openapi.yml + AccountingPhoneNumberRequest: + docs: >- + # The AccountingPhoneNumber Object + + ### Description + + The `AccountingPhoneNumber` object is used to represent a contact's or + company's phone number. + + + ### Usage Example + + Fetch from the `GET CompanyInfo` endpoint and view the company's phone + numbers. + properties: + number: + type: optional + docs: The phone number. + type: + type: optional + docs: The phone number's type. + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + Address: + docs: >- + # The Address Object + + ### Description + + The `Address` object is used to represent a contact's or company's + address. + + + ### Usage Example + + Fetch from the `GET CompanyInfo` endpoint and view the company's + addresses. + properties: + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + type: + type: optional + docs: |- + The address type. + + * `BILLING` - BILLING + * `SHIPPING` - SHIPPING + street_1: + type: optional + docs: Line 1 of the address's street. + street_2: + type: optional + docs: Line 2 of the address's street. + city: + type: optional + docs: The address's city. + state: + type: optional + access: read-only + country_subdivision: + type: optional + docs: The address's state or region. + country: + type: optional + docs: |- + The address's country. + + * `AF` - Afghanistan + * `AX` - Åland Islands + * `AL` - Albania + * `DZ` - Algeria + * `AS` - American Samoa + * `AD` - Andorra + * `AO` - Angola + * `AI` - Anguilla + * `AQ` - Antarctica + * `AG` - Antigua and Barbuda + * `AR` - Argentina + * `AM` - Armenia + * `AW` - Aruba + * `AU` - Australia + * `AT` - Austria + * `AZ` - Azerbaijan + * `BS` - Bahamas + * `BH` - Bahrain + * `BD` - Bangladesh + * `BB` - Barbados + * `BY` - Belarus + * `BE` - Belgium + * `BZ` - Belize + * `BJ` - Benin + * `BM` - Bermuda + * `BT` - Bhutan + * `BO` - Bolivia + * `BQ` - Bonaire, Sint Eustatius and Saba + * `BA` - Bosnia and Herzegovina + * `BW` - Botswana + * `BV` - Bouvet Island + * `BR` - Brazil + * `IO` - British Indian Ocean Territory + * `BN` - Brunei + * `BG` - Bulgaria + * `BF` - Burkina Faso + * `BI` - Burundi + * `CV` - Cabo Verde + * `KH` - Cambodia + * `CM` - Cameroon + * `CA` - Canada + * `KY` - Cayman Islands + * `CF` - Central African Republic + * `TD` - Chad + * `CL` - Chile + * `CN` - China + * `CX` - Christmas Island + * `CC` - Cocos (Keeling) Islands + * `CO` - Colombia + * `KM` - Comoros + * `CG` - Congo + * `CD` - Congo (the Democratic Republic of the) + * `CK` - Cook Islands + * `CR` - Costa Rica + * `CI` - Côte d'Ivoire + * `HR` - Croatia + * `CU` - Cuba + * `CW` - Curaçao + * `CY` - Cyprus + * `CZ` - Czechia + * `DK` - Denmark + * `DJ` - Djibouti + * `DM` - Dominica + * `DO` - Dominican Republic + * `EC` - Ecuador + * `EG` - Egypt + * `SV` - El Salvador + * `GQ` - Equatorial Guinea + * `ER` - Eritrea + * `EE` - Estonia + * `SZ` - Eswatini + * `ET` - Ethiopia + * `FK` - Falkland Islands (Malvinas) + * `FO` - Faroe Islands + * `FJ` - Fiji + * `FI` - Finland + * `FR` - France + * `GF` - French Guiana + * `PF` - French Polynesia + * `TF` - French Southern Territories + * `GA` - Gabon + * `GM` - Gambia + * `GE` - Georgia + * `DE` - Germany + * `GH` - Ghana + * `GI` - Gibraltar + * `GR` - Greece + * `GL` - Greenland + * `GD` - Grenada + * `GP` - Guadeloupe + * `GU` - Guam + * `GT` - Guatemala + * `GG` - Guernsey + * `GN` - Guinea + * `GW` - Guinea-Bissau + * `GY` - Guyana + * `HT` - Haiti + * `HM` - Heard Island and McDonald Islands + * `VA` - Holy See + * `HN` - Honduras + * `HK` - Hong Kong + * `HU` - Hungary + * `IS` - Iceland + * `IN` - India + * `ID` - Indonesia + * `IR` - Iran + * `IQ` - Iraq + * `IE` - Ireland + * `IM` - Isle of Man + * `IL` - Israel + * `IT` - Italy + * `JM` - Jamaica + * `JP` - Japan + * `JE` - Jersey + * `JO` - Jordan + * `KZ` - Kazakhstan + * `KE` - Kenya + * `KI` - Kiribati + * `KW` - Kuwait + * `KG` - Kyrgyzstan + * `LA` - Laos + * `LV` - Latvia + * `LB` - Lebanon + * `LS` - Lesotho + * `LR` - Liberia + * `LY` - Libya + * `LI` - Liechtenstein + * `LT` - Lithuania + * `LU` - Luxembourg + * `MO` - Macao + * `MG` - Madagascar + * `MW` - Malawi + * `MY` - Malaysia + * `MV` - Maldives + * `ML` - Mali + * `MT` - Malta + * `MH` - Marshall Islands + * `MQ` - Martinique + * `MR` - Mauritania + * `MU` - Mauritius + * `YT` - Mayotte + * `MX` - Mexico + * `FM` - Micronesia (Federated States of) + * `MD` - Moldova + * `MC` - Monaco + * `MN` - Mongolia + * `ME` - Montenegro + * `MS` - Montserrat + * `MA` - Morocco + * `MZ` - Mozambique + * `MM` - Myanmar + * `NA` - Namibia + * `NR` - Nauru + * `NP` - Nepal + * `NL` - Netherlands + * `NC` - New Caledonia + * `NZ` - New Zealand + * `NI` - Nicaragua + * `NE` - Niger + * `NG` - Nigeria + * `NU` - Niue + * `NF` - Norfolk Island + * `KP` - North Korea + * `MK` - North Macedonia + * `MP` - Northern Mariana Islands + * `NO` - Norway + * `OM` - Oman + * `PK` - Pakistan + * `PW` - Palau + * `PS` - Palestine, State of + * `PA` - Panama + * `PG` - Papua New Guinea + * `PY` - Paraguay + * `PE` - Peru + * `PH` - Philippines + * `PN` - Pitcairn + * `PL` - Poland + * `PT` - Portugal + * `PR` - Puerto Rico + * `QA` - Qatar + * `RE` - Réunion + * `RO` - Romania + * `RU` - Russia + * `RW` - Rwanda + * `BL` - Saint Barthélemy + * `SH` - Saint Helena, Ascension and Tristan da Cunha + * `KN` - Saint Kitts and Nevis + * `LC` - Saint Lucia + * `MF` - Saint Martin (French part) + * `PM` - Saint Pierre and Miquelon + * `VC` - Saint Vincent and the Grenadines + * `WS` - Samoa + * `SM` - San Marino + * `ST` - Sao Tome and Principe + * `SA` - Saudi Arabia + * `SN` - Senegal + * `RS` - Serbia + * `SC` - Seychelles + * `SL` - Sierra Leone + * `SG` - Singapore + * `SX` - Sint Maarten (Dutch part) + * `SK` - Slovakia + * `SI` - Slovenia + * `SB` - Solomon Islands + * `SO` - Somalia + * `ZA` - South Africa + * `GS` - South Georgia and the South Sandwich Islands + * `KR` - South Korea + * `SS` - South Sudan + * `ES` - Spain + * `LK` - Sri Lanka + * `SD` - Sudan + * `SR` - Suriname + * `SJ` - Svalbard and Jan Mayen + * `SE` - Sweden + * `CH` - Switzerland + * `SY` - Syria + * `TW` - Taiwan + * `TJ` - Tajikistan + * `TZ` - Tanzania + * `TH` - Thailand + * `TL` - Timor-Leste + * `TG` - Togo + * `TK` - Tokelau + * `TO` - Tonga + * `TT` - Trinidad and Tobago + * `TN` - Tunisia + * `TR` - Turkey + * `TM` - Turkmenistan + * `TC` - Turks and Caicos Islands + * `TV` - Tuvalu + * `UG` - Uganda + * `UA` - Ukraine + * `AE` - United Arab Emirates + * `GB` - United Kingdom + * `UM` - United States Minor Outlying Islands + * `US` - United States of America + * `UY` - Uruguay + * `UZ` - Uzbekistan + * `VU` - Vanuatu + * `VE` - Venezuela + * `VN` - Vietnam + * `VG` - Virgin Islands (British) + * `VI` - Virgin Islands (U.S.) + * `WF` - Wallis and Futuna + * `EH` - Western Sahara + * `YE` - Yemen + * `ZM` - Zambia + * `ZW` - Zimbabwe + zip_code: + type: optional + docs: The address's zip code. + source: + openapi: openapi/openapi.yml + AddressRequest: + docs: >- + # The Address Object + + ### Description + + The `Address` object is used to represent a contact's or company's + address. + + + ### Usage Example + + Fetch from the `GET CompanyInfo` endpoint and view the company's + addresses. + properties: + type: + type: optional + docs: |- + The address type. + + * `BILLING` - BILLING + * `SHIPPING` - SHIPPING + street_1: + type: optional + docs: Line 1 of the address's street. + street_2: + type: optional + docs: Line 2 of the address's street. + city: + type: optional + docs: The address's city. + country_subdivision: + type: optional + docs: The address's state or region. + country: + type: optional + docs: |- + The address's country. + + * `AF` - Afghanistan + * `AX` - Åland Islands + * `AL` - Albania + * `DZ` - Algeria + * `AS` - American Samoa + * `AD` - Andorra + * `AO` - Angola + * `AI` - Anguilla + * `AQ` - Antarctica + * `AG` - Antigua and Barbuda + * `AR` - Argentina + * `AM` - Armenia + * `AW` - Aruba + * `AU` - Australia + * `AT` - Austria + * `AZ` - Azerbaijan + * `BS` - Bahamas + * `BH` - Bahrain + * `BD` - Bangladesh + * `BB` - Barbados + * `BY` - Belarus + * `BE` - Belgium + * `BZ` - Belize + * `BJ` - Benin + * `BM` - Bermuda + * `BT` - Bhutan + * `BO` - Bolivia + * `BQ` - Bonaire, Sint Eustatius and Saba + * `BA` - Bosnia and Herzegovina + * `BW` - Botswana + * `BV` - Bouvet Island + * `BR` - Brazil + * `IO` - British Indian Ocean Territory + * `BN` - Brunei + * `BG` - Bulgaria + * `BF` - Burkina Faso + * `BI` - Burundi + * `CV` - Cabo Verde + * `KH` - Cambodia + * `CM` - Cameroon + * `CA` - Canada + * `KY` - Cayman Islands + * `CF` - Central African Republic + * `TD` - Chad + * `CL` - Chile + * `CN` - China + * `CX` - Christmas Island + * `CC` - Cocos (Keeling) Islands + * `CO` - Colombia + * `KM` - Comoros + * `CG` - Congo + * `CD` - Congo (the Democratic Republic of the) + * `CK` - Cook Islands + * `CR` - Costa Rica + * `CI` - Côte d'Ivoire + * `HR` - Croatia + * `CU` - Cuba + * `CW` - Curaçao + * `CY` - Cyprus + * `CZ` - Czechia + * `DK` - Denmark + * `DJ` - Djibouti + * `DM` - Dominica + * `DO` - Dominican Republic + * `EC` - Ecuador + * `EG` - Egypt + * `SV` - El Salvador + * `GQ` - Equatorial Guinea + * `ER` - Eritrea + * `EE` - Estonia + * `SZ` - Eswatini + * `ET` - Ethiopia + * `FK` - Falkland Islands (Malvinas) + * `FO` - Faroe Islands + * `FJ` - Fiji + * `FI` - Finland + * `FR` - France + * `GF` - French Guiana + * `PF` - French Polynesia + * `TF` - French Southern Territories + * `GA` - Gabon + * `GM` - Gambia + * `GE` - Georgia + * `DE` - Germany + * `GH` - Ghana + * `GI` - Gibraltar + * `GR` - Greece + * `GL` - Greenland + * `GD` - Grenada + * `GP` - Guadeloupe + * `GU` - Guam + * `GT` - Guatemala + * `GG` - Guernsey + * `GN` - Guinea + * `GW` - Guinea-Bissau + * `GY` - Guyana + * `HT` - Haiti + * `HM` - Heard Island and McDonald Islands + * `VA` - Holy See + * `HN` - Honduras + * `HK` - Hong Kong + * `HU` - Hungary + * `IS` - Iceland + * `IN` - India + * `ID` - Indonesia + * `IR` - Iran + * `IQ` - Iraq + * `IE` - Ireland + * `IM` - Isle of Man + * `IL` - Israel + * `IT` - Italy + * `JM` - Jamaica + * `JP` - Japan + * `JE` - Jersey + * `JO` - Jordan + * `KZ` - Kazakhstan + * `KE` - Kenya + * `KI` - Kiribati + * `KW` - Kuwait + * `KG` - Kyrgyzstan + * `LA` - Laos + * `LV` - Latvia + * `LB` - Lebanon + * `LS` - Lesotho + * `LR` - Liberia + * `LY` - Libya + * `LI` - Liechtenstein + * `LT` - Lithuania + * `LU` - Luxembourg + * `MO` - Macao + * `MG` - Madagascar + * `MW` - Malawi + * `MY` - Malaysia + * `MV` - Maldives + * `ML` - Mali + * `MT` - Malta + * `MH` - Marshall Islands + * `MQ` - Martinique + * `MR` - Mauritania + * `MU` - Mauritius + * `YT` - Mayotte + * `MX` - Mexico + * `FM` - Micronesia (Federated States of) + * `MD` - Moldova + * `MC` - Monaco + * `MN` - Mongolia + * `ME` - Montenegro + * `MS` - Montserrat + * `MA` - Morocco + * `MZ` - Mozambique + * `MM` - Myanmar + * `NA` - Namibia + * `NR` - Nauru + * `NP` - Nepal + * `NL` - Netherlands + * `NC` - New Caledonia + * `NZ` - New Zealand + * `NI` - Nicaragua + * `NE` - Niger + * `NG` - Nigeria + * `NU` - Niue + * `NF` - Norfolk Island + * `KP` - North Korea + * `MK` - North Macedonia + * `MP` - Northern Mariana Islands + * `NO` - Norway + * `OM` - Oman + * `PK` - Pakistan + * `PW` - Palau + * `PS` - Palestine, State of + * `PA` - Panama + * `PG` - Papua New Guinea + * `PY` - Paraguay + * `PE` - Peru + * `PH` - Philippines + * `PN` - Pitcairn + * `PL` - Poland + * `PT` - Portugal + * `PR` - Puerto Rico + * `QA` - Qatar + * `RE` - Réunion + * `RO` - Romania + * `RU` - Russia + * `RW` - Rwanda + * `BL` - Saint Barthélemy + * `SH` - Saint Helena, Ascension and Tristan da Cunha + * `KN` - Saint Kitts and Nevis + * `LC` - Saint Lucia + * `MF` - Saint Martin (French part) + * `PM` - Saint Pierre and Miquelon + * `VC` - Saint Vincent and the Grenadines + * `WS` - Samoa + * `SM` - San Marino + * `ST` - Sao Tome and Principe + * `SA` - Saudi Arabia + * `SN` - Senegal + * `RS` - Serbia + * `SC` - Seychelles + * `SL` - Sierra Leone + * `SG` - Singapore + * `SX` - Sint Maarten (Dutch part) + * `SK` - Slovakia + * `SI` - Slovenia + * `SB` - Solomon Islands + * `SO` - Somalia + * `ZA` - South Africa + * `GS` - South Georgia and the South Sandwich Islands + * `KR` - South Korea + * `SS` - South Sudan + * `ES` - Spain + * `LK` - Sri Lanka + * `SD` - Sudan + * `SR` - Suriname + * `SJ` - Svalbard and Jan Mayen + * `SE` - Sweden + * `CH` - Switzerland + * `SY` - Syria + * `TW` - Taiwan + * `TJ` - Tajikistan + * `TZ` - Tanzania + * `TH` - Thailand + * `TL` - Timor-Leste + * `TG` - Togo + * `TK` - Tokelau + * `TO` - Tonga + * `TT` - Trinidad and Tobago + * `TN` - Tunisia + * `TR` - Turkey + * `TM` - Turkmenistan + * `TC` - Turks and Caicos Islands + * `TV` - Tuvalu + * `UG` - Uganda + * `UA` - Ukraine + * `AE` - United Arab Emirates + * `GB` - United Kingdom + * `UM` - United States Minor Outlying Islands + * `US` - United States of America + * `UY` - Uruguay + * `UZ` - Uzbekistan + * `VU` - Vanuatu + * `VE` - Venezuela + * `VN` - Vietnam + * `VG` - Virgin Islands (British) + * `VI` - Virgin Islands (U.S.) + * `WF` - Wallis and Futuna + * `EH` - Western Sahara + * `YE` - Yemen + * `ZM` - Zambia + * `ZW` - Zimbabwe + zip_code: + type: optional + docs: The address's zip code. + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + AddressTypeEnum: + enum: + - BILLING + - SHIPPING + docs: |- + * `BILLING` - BILLING + * `SHIPPING` - SHIPPING + source: + openapi: openapi/openapi.yml + AdvancedMetadata: + properties: + id: + type: string + validation: + format: uuid + display_name: optional + description: optional + is_required: optional + is_custom: optional + field_choices: optional> + source: + openapi: openapi/openapi.yml + AsyncPassthroughReciept: + properties: + async_passthrough_receipt_id: + type: string + validation: + format: uuid + source: + openapi: openapi/openapi.yml + AsyncPostTask: + properties: + status: AsyncPostTaskStatusEnum + result: AsyncPostTaskResult + source: + openapi: openapi/openapi.yml + AsyncPostTaskResult: + properties: + status_code: optional + response: optional> + source: + openapi: openapi/openapi.yml + AsyncPostTaskStatusEnum: + enum: + - QUEUED + - IN_PROGRESS + - COMPLETED + - FAILURE + docs: |- + * `QUEUED` - QUEUED + * `IN_PROGRESS` - IN_PROGRESS + * `COMPLETED` - COMPLETED + * `FAILURE` - FAILURE + source: + openapi: openapi/openapi.yml + AuditLogEvent: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + user_name: + type: optional + docs: The User's full name at the time of this Event occurring. + validation: + maxLength: 200 + user_email: + type: optional + docs: The User's email at the time of this Event occurring. + validation: + format: email + maxLength: 254 + role: + type: RoleEnum + docs: >- + Designates the role of the user (or SYSTEM/API if action not taken by + a user) at the time of this Event occurring. + + + * `ADMIN` - ADMIN + + * `DEVELOPER` - DEVELOPER + + * `MEMBER` - MEMBER + + * `API` - API + + * `SYSTEM` - SYSTEM + + * `MERGE_TEAM` - MERGE_TEAM + ip_address: + type: string + validation: + maxLength: 45 + event_type: + type: EventTypeEnum + docs: >- + Designates the type of event that occurred. + + + * `CREATED_REMOTE_PRODUCTION_API_KEY` - + CREATED_REMOTE_PRODUCTION_API_KEY + + * `DELETED_REMOTE_PRODUCTION_API_KEY` - + DELETED_REMOTE_PRODUCTION_API_KEY + + * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + + * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + + * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + + * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + + * `INVITED_USER` - INVITED_USER + + * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + + * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + + * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + + * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - + DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + + * `CREATED_DESTINATION` - CREATED_DESTINATION + + * `DELETED_DESTINATION` - DELETED_DESTINATION + + * `CHANGED_DESTINATION` - CHANGED_DESTINATION + + * `CHANGED_SCOPES` - CHANGED_SCOPES + + * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + + * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + + * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + + * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + + * `ENABLED_CATEGORY` - ENABLED_CATEGORY + + * `DISABLED_CATEGORY` - DISABLED_CATEGORY + + * `CHANGED_PASSWORD` - CHANGED_PASSWORD + + * `RESET_PASSWORD` - RESET_PASSWORD + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - + CREATED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - + CREATED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - + CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + + * `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 + + * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + + * `MUTED_ISSUE` - MUTED_ISSUE + + * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + + * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + + * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + + * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + + * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + event_description: string + created_at: + type: optional + access: read-only + source: + openapi: openapi/openapi.yml + AvailableActions: + docs: >- + # The AvailableActions Object + + ### Description + + The `Activity` object is used to see all available model/operation + combinations for an integration. + + + ### Usage Example + + Fetch all the actions available for the `Zenefits` integration. + properties: + integration: AccountIntegration + passthrough_available: boolean + available_model_operations: optional> + source: + openapi: openapi/openapi.yml + BalanceSheetCompany: + discriminated: false + docs: '`Company` object for the given `BalanceSheet` object.' + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: openapi/openapi.yml + inline: true + BalanceSheet: + docs: >- + # The BalanceSheet Object + + ### Description + + The `BalanceSheet` object shows a company’s assets, liabilities, and + equity. Assets should be equal to liability and equity combined. This + shows the company’s financial health at a specific point in time. + + + ### Usage Example + + Fetch from the `LIST BalanceSheets` endpoint and view a company's balance + sheets. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The balance sheet's name. + currency: + type: optional + docs: >- + The balance sheet's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + company: + type: optional + docs: '`Company` object for the given `BalanceSheet` object.' + date: + type: optional + docs: >- + The balance sheet's date. The balance sheet data will reflect the + company's financial position this point in time. + net_assets: + type: optional + docs: The balance sheet's net assets. + assets: + type: optional> + access: read-only + liabilities: + type: optional> + access: read-only + equity: + type: optional> + access: read-only + remote_generated_at: + type: optional + docs: The time that balance sheet was generated by the accounting system. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + BankFeedAccount: + docs: >- + # The BankFeedAccount Object + + ### Description + + The `BankFeedAccount` object represents a bank feed account, detailing + various attributes including account identifiers, names, currency, and + balance information. This object is central to managing and tracking bank + feed accounts within the system. + + + ### Usage Example + + Fetch from the `GET BankFeedAccount` endpoint to view details of a bank + feed account. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + source_account_id: + type: optional + docs: >- + The unique identifier of the source account from our customer’s + platform. + validation: + maxLength: 1024 + target_account_id: + type: optional + docs: >- + The unique identifier of the target account from the third party + software. + validation: + maxLength: 1024 + source_account_name: + type: optional + docs: The name of the source account as stored in our customer’s platform. + validation: + maxLength: 1024 + source_account_number: + type: optional + docs: >- + The human-readable account number of the source account as stored in + our customer’s platform. + validation: + maxLength: 1024 + target_account_name: + type: optional + docs: The name of the target account from the third party software. + validation: + maxLength: 1024 + currency: + type: optional + docs: >- + The currency code of the bank feed. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + feed_status: + type: optional + docs: |- + The status of the bank feed. + + * `ACTIVE` - ACTIVE + * `INACTIVE` - INACTIVE + feed_start_date: + type: optional + docs: The start date of the bank feed’s transactions. + source_account_balance: + type: optional + docs: The current balance of funds in the source account. + account_type: + type: optional + docs: |- + The type of the account. + + * `BANK` - BANK + * `CREDIT_CARD` - CREDIT_CARD + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: optional> + access: read-only + remote_data: optional>>> + source: + openapi: openapi/openapi.yml + BankFeedAccountAccountTypeEnum: + enum: + - BANK + - CREDIT_CARD + docs: |- + * `BANK` - BANK + * `CREDIT_CARD` - CREDIT_CARD + source: + openapi: openapi/openapi.yml + BankFeedAccountRequest: + docs: >- + # The BankFeedAccount Object + + ### Description + + The `BankFeedAccount` object represents a bank feed account, detailing + various attributes including account identifiers, names, currency, and + balance information. This object is central to managing and tracking bank + feed accounts within the system. + + + ### Usage Example + + Fetch from the `GET BankFeedAccount` endpoint to view details of a bank + feed account. + properties: + source_account_id: + type: optional + docs: >- + The unique identifier of the source account from our customer’s + platform. + validation: + maxLength: 1024 + target_account_id: + type: optional + docs: >- + The unique identifier of the target account from the third party + software. + validation: + maxLength: 1024 + source_account_name: + type: optional + docs: The name of the source account as stored in our customer’s platform. + validation: + maxLength: 1024 + source_account_number: + type: optional + docs: >- + The human-readable account number of the source account as stored in + our customer’s platform. + validation: + maxLength: 1024 + target_account_name: + type: optional + docs: The name of the target account from the third party software. + validation: + maxLength: 1024 + currency: + type: optional + docs: >- + The currency code of the bank feed. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + feed_status: + type: optional + docs: |- + The status of the bank feed. + + * `ACTIVE` - ACTIVE + * `INACTIVE` - INACTIVE + feed_start_date: + type: optional + docs: The start date of the bank feed’s transactions. + source_account_balance: + type: optional + docs: The current balance of funds in the source account. + account_type: + type: optional + docs: |- + The type of the account. + + * `BANK` - BANK + * `CREDIT_CARD` - CREDIT_CARD + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + BankFeedAccountResponse: + properties: + model: BankFeedAccount + warnings: list + errors: list + logs: optional> + source: + openapi: openapi/openapi.yml + BankFeedTransactionBankFeedAccount: + discriminated: false + docs: The bank feed account associated with the transaction. + union: + - type: string + validation: + format: uuid + - BankFeedAccount + source: + openapi: openapi/openapi.yml + inline: true + BankFeedTransaction: + docs: >- + # The BankFeedTransaction Object + + ### Description + + The `BankFeedTransaction` object is used to represent transactions linked + to a bank feed account. This includes details about the transaction such + as the date, amount, description, and type. + + + ### Usage Example + + Fetch from the `GET BankFeedTransaction` endpoint to view details of a + transaction associated with a bank feed account. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + bank_feed_account: + type: optional + docs: The bank feed account associated with the transaction. + transaction_date: + type: optional + docs: The date that the transaction occurred. + posted_date: + type: optional + docs: The date the transaction was posted to the bank account. + amount: + type: optional + docs: The amount of the transaction. + description: + type: optional + docs: The description of the transaction. + validation: + maxLength: 1024 + transaction_type: + type: optional + docs: The underlying type of the transaction. + validation: + maxLength: 1024 + payee: + type: optional + docs: >- + The person or merchant who initiated the transaction, or + alternatively, to whom the transaction was paid. + validation: + maxLength: 1024 + credit_or_debit: + type: optional + docs: |- + If the transaction is of type debit or credit. + + * `CREDIT` - CREDIT + * `DEBIT` - DEBIT + source_transaction_id: + type: optional + docs: The customer’s identifier for the transaction. + validation: + maxLength: 1024 + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + is_processed: + type: optional + docs: >- + Whether or not this transaction has been processed by the external + system. For example, NetSuite writes this field as True when the + SuiteApp has processed the transaction. + access: read-only + source: + openapi: openapi/openapi.yml + BankFeedTransactionRequestRequestBankFeedAccount: + discriminated: false + docs: The bank feed account associated with the transaction. + union: + - type: string + validation: + format: uuid + - BankFeedAccount + source: + openapi: openapi/openapi.yml + inline: true + BankFeedTransactionRequestRequest: + docs: >- + # The BankFeedTransaction Object + + ### Description + + The `BankFeedTransaction` object is used to represent transactions linked + to a bank feed account. This includes details about the transaction such + as the date, amount, description, and type. + + + ### Usage Example + + Fetch from the `GET BankFeedTransaction` endpoint to view details of a + transaction associated with a bank feed account. + properties: + bank_feed_account: + type: optional + docs: The bank feed account associated with the transaction. + transaction_date: + type: optional + docs: The date that the transaction occurred. + posted_date: + type: optional + docs: The date the transaction was posted to the bank account. + amount: + type: optional + docs: The amount of the transaction. + description: + type: optional + docs: The description of the transaction. + validation: + maxLength: 1024 + transaction_type: + type: optional + docs: The underlying type of the transaction. + validation: + maxLength: 1024 + payee: + type: optional + docs: >- + The person or merchant who initiated the transaction, or + alternatively, to whom the transaction was paid. + validation: + maxLength: 1024 + credit_or_debit: + type: optional + docs: |- + If the transaction is of type debit or credit. + + * `CREDIT` - CREDIT + * `DEBIT` - DEBIT + source_transaction_id: + type: optional + docs: The customer’s identifier for the transaction. + validation: + maxLength: 1024 + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + BankFeedTransactionResponse: + properties: + model: BankFeedTransaction + warnings: list + errors: list + logs: optional> + source: + openapi: openapi/openapi.yml + CashFlowStatementCompany: + discriminated: false + docs: The company the cash flow statement belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: openapi/openapi.yml + inline: true + CashFlowStatement: + docs: >- + # The CashFlowStatement Object + + ### Description + + The `CashFlowStatement` object shows operating activities, investing + activities, and financing activities over a period of time (month, + quarter, or year). + + + ### Usage Example + + Fetch from the `LIST CashFlowStatements` endpoint and view a company's + cash flow statements. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The cash flow statement's name. + currency: + type: optional + docs: >- + The cash flow statement's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + company: + type: optional + docs: The company the cash flow statement belongs to. + start_period: + type: optional + docs: The cash flow statement's start period. + end_period: + type: optional + docs: The cash flow statement's end period. + cash_at_beginning_of_period: + type: optional + docs: >- + Cash and cash equivalents at the beginning of the cash flow + statement's period. + cash_at_end_of_period: + type: optional + docs: >- + Cash and cash equivalents at the beginning of the cash flow + statement's period. + operating_activities: + type: optional> + access: read-only + investing_activities: + type: optional> + access: read-only + financing_activities: + type: optional> + access: read-only + remote_generated_at: + type: optional + docs: >- + The time that cash flow statement was generated by the accounting + system. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + CategoriesEnum: + enum: + - hris + - ats + - accounting + - ticketing + - crm + - mktg + - filestorage + docs: |- + * `hris` - hris + * `ats` - ats + * `accounting` - accounting + * `ticketing` - ticketing + * `crm` - crm + * `mktg` - mktg + * `filestorage` - filestorage + source: + openapi: openapi/openapi.yml + CategoryEnum: + enum: + - hris + - ats + - accounting + - ticketing + - crm + - mktg + - filestorage + docs: |- + * `hris` - hris + * `ats` - ats + * `accounting` - accounting + * `ticketing` - ticketing + * `crm` - crm + * `mktg` - mktg + * `filestorage` - filestorage + source: + openapi: openapi/openapi.yml + CategoryTypeEnum: + enum: + - CLASS + - DEPARTMENT + docs: |- + * `CLASS` - CLASS + * `DEPARTMENT` - DEPARTMENT + source: + openapi: openapi/openapi.yml + ClassificationEnum: + enum: + - ASSET + - EQUITY + - EXPENSE + - LIABILITY + - REVENUE + docs: |- + * `ASSET` - ASSET + * `EQUITY` - EQUITY + * `EXPENSE` - EXPENSE + * `LIABILITY` - LIABILITY + * `REVENUE` - REVENUE + source: + openapi: openapi/openapi.yml + CommonModelScopeApi: + properties: + common_models: + docs: The common models you want to update the scopes for + type: list + source: + openapi: openapi/openapi.yml + CommonModelScopesBodyRequest: + properties: + model_id: + type: string + validation: + minLength: 1 + enabled_actions: list + disabled_fields: list + source: + openapi: openapi/openapi.yml + CompanyInfo: + docs: >- + # The CompanyInfo Object + + ### Description + + The `CompanyInfo` object contains information about the company of the + linked account. If the company has multiple entities (also known as + subsidiaries), each entity may show up as a single `CompanyInfo` record. + + + ### Usage Example + + Fetch from the `GET CompanyInfo` endpoint and view a company's + information. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The company's name. + legal_name: + type: optional + docs: The company's legal name. + tax_number: + type: optional + docs: The company's tax number. + fiscal_year_end_month: + type: optional + docs: The company's fiscal year end month. + validation: + min: 1 + max: 12 + fiscal_year_end_day: + type: optional + docs: The company's fiscal year end day. + validation: + min: 1 + max: 31 + currency: + type: optional + docs: >- + The currency set in the company's accounting platform. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + remote_created_at: + type: optional + docs: When the third party's company was created. + urls: + type: optional>> + docs: The company's urls. + addresses: optional> + phone_numbers: optional> + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + ComponentTypeEnum: + enum: + - SALES + - PURCHASE + docs: |- + * `SALES` - SALES + * `PURCHASE` - PURCHASE + source: + openapi: openapi/openapi.yml + ContactAddressesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Address + source: + openapi: openapi/openapi.yml + inline: true + Contact: + docs: >- + # The Contact Object + + ### Description + + A `Contact` is an individual or business entity to which products and + services are sold to or purchased from. The `Contact` model contains both + Customers, in which products and services are sold to, and Vendors (or + Suppliers), in which products and services are purchased from. + + * A `Contact` is a Vendor/Supplier if the `is_supplier` property is true. + + * A `Contact` is a customer if the `is_customer` property is true. + + + ### Usage Example + + Fetch from the `LIST Contacts` endpoint and view a company's contacts. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The contact's name. + is_supplier: + type: optional + docs: Whether the contact is a supplier. + is_customer: + type: optional + docs: Whether the contact is a customer. + email_address: + type: optional + docs: The contact's email address. + tax_number: + type: optional + docs: The contact's tax number. + status: + type: optional + docs: |- + The contact's status + + * `ACTIVE` - ACTIVE + * `ARCHIVED` - ARCHIVED + currency: + type: optional + docs: The currency the contact's transactions are in. + remote_updated_at: + type: optional + docs: When the third party's contact was updated. + company: + type: optional + docs: The company the contact belongs to. + validation: + format: uuid + addresses: + type: optional>> + docs: '`Address` object IDs for the given `Contacts` object.' + phone_numbers: + type: optional> + docs: '`AccountingPhoneNumber` object for the given `Contacts` object.' + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + remote_fields: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + ContactRequestAddressesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Address + source: + openapi: openapi/openapi.yml + inline: true + ContactRequest: + docs: >- + # The Contact Object + + ### Description + + A `Contact` is an individual or business entity to which products and + services are sold to or purchased from. The `Contact` model contains both + Customers, in which products and services are sold to, and Vendors (or + Suppliers), in which products and services are purchased from. + + * A `Contact` is a Vendor/Supplier if the `is_supplier` property is true. + + * A `Contact` is a customer if the `is_customer` property is true. + + + ### Usage Example + + Fetch from the `LIST Contacts` endpoint and view a company's contacts. + properties: + name: + type: optional + docs: The contact's name. + is_supplier: + type: optional + docs: Whether the contact is a supplier. + is_customer: + type: optional + docs: Whether the contact is a customer. + email_address: + type: optional + docs: The contact's email address. + tax_number: + type: optional + docs: The contact's tax number. + status: + type: optional + docs: |- + The contact's status + + * `ACTIVE` - ACTIVE + * `ARCHIVED` - ARCHIVED + currency: + type: optional + docs: The currency the contact's transactions are in. + company: + type: optional + docs: The company the contact belongs to. + validation: + format: uuid + addresses: + type: optional>> + docs: '`Address` object IDs for the given `Contacts` object.' + phone_numbers: + type: optional> + docs: '`AccountingPhoneNumber` object for the given `Contacts` object.' + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + remote_fields: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + ContactResponse: + properties: + model: Contact + warnings: list + errors: list + logs: optional> + source: + openapi: openapi/openapi.yml + CountryEnum: + enum: + - AF + - AX + - AL + - DZ + - AS + - AD + - AO + - AI + - AQ + - AG + - AR + - AM + - AW + - AU + - AT + - AZ + - BS + - BH + - BD + - BB + - BY + - BE + - BZ + - BJ + - BM + - BT + - BO + - BQ + - BA + - BW + - BV + - BR + - IO + - BN + - BG + - BF + - BI + - CV + - KH + - CM + - CA + - KY + - CF + - TD + - CL + - CN + - CX + - CC + - CO + - KM + - CG + - CD + - CK + - CR + - CI + - HR + - CU + - CW + - CY + - CZ + - DK + - DJ + - DM + - DO + - EC + - EG + - SV + - GQ + - ER + - EE + - SZ + - ET + - FK + - FO + - FJ + - FI + - FR + - GF + - PF + - TF + - GA + - GM + - GE + - DE + - GH + - GI + - GR + - GL + - GD + - GP + - GU + - GT + - GG + - GN + - GW + - GY + - HT + - HM + - VA + - HN + - HK + - HU + - IS + - IN + - ID + - IR + - IQ + - IE + - IM + - IL + - IT + - JM + - JP + - JE + - JO + - KZ + - KE + - KI + - KW + - KG + - LA + - LV + - LB + - LS + - LR + - LY + - LI + - LT + - LU + - MO + - MG + - MW + - MY + - MV + - ML + - MT + - MH + - MQ + - MR + - MU + - YT + - MX + - FM + - MD + - MC + - MN + - ME + - MS + - MA + - MZ + - MM + - NA + - NR + - NP + - NL + - NC + - NZ + - NI + - NE + - NG + - NU + - NF + - KP + - MK + - MP + - 'NO' + - OM + - PK + - PW + - PS + - PA + - PG + - PY + - PE + - PH + - PN + - PL + - PT + - PR + - QA + - RE + - RO + - RU + - RW + - BL + - SH + - KN + - LC + - MF + - PM + - VC + - WS + - SM + - ST + - SA + - SN + - RS + - SC + - SL + - SG + - SX + - SK + - SI + - SB + - SO + - ZA + - GS + - KR + - SS + - ES + - LK + - SD + - SR + - SJ + - SE + - CH + - SY + - TW + - TJ + - TZ + - TH + - TL + - TG + - TK + - TO + - TT + - TN + - TR + - TM + - TC + - TV + - UG + - UA + - AE + - GB + - UM + - US + - UY + - UZ + - VU + - VE + - VN + - VG + - VI + - WF + - EH + - YE + - ZM + - ZW + docs: |- + * `AF` - Afghanistan + * `AX` - Åland Islands + * `AL` - Albania + * `DZ` - Algeria + * `AS` - American Samoa + * `AD` - Andorra + * `AO` - Angola + * `AI` - Anguilla + * `AQ` - Antarctica + * `AG` - Antigua and Barbuda + * `AR` - Argentina + * `AM` - Armenia + * `AW` - Aruba + * `AU` - Australia + * `AT` - Austria + * `AZ` - Azerbaijan + * `BS` - Bahamas + * `BH` - Bahrain + * `BD` - Bangladesh + * `BB` - Barbados + * `BY` - Belarus + * `BE` - Belgium + * `BZ` - Belize + * `BJ` - Benin + * `BM` - Bermuda + * `BT` - Bhutan + * `BO` - Bolivia + * `BQ` - Bonaire, Sint Eustatius and Saba + * `BA` - Bosnia and Herzegovina + * `BW` - Botswana + * `BV` - Bouvet Island + * `BR` - Brazil + * `IO` - British Indian Ocean Territory + * `BN` - Brunei + * `BG` - Bulgaria + * `BF` - Burkina Faso + * `BI` - Burundi + * `CV` - Cabo Verde + * `KH` - Cambodia + * `CM` - Cameroon + * `CA` - Canada + * `KY` - Cayman Islands + * `CF` - Central African Republic + * `TD` - Chad + * `CL` - Chile + * `CN` - China + * `CX` - Christmas Island + * `CC` - Cocos (Keeling) Islands + * `CO` - Colombia + * `KM` - Comoros + * `CG` - Congo + * `CD` - Congo (the Democratic Republic of the) + * `CK` - Cook Islands + * `CR` - Costa Rica + * `CI` - Côte d'Ivoire + * `HR` - Croatia + * `CU` - Cuba + * `CW` - Curaçao + * `CY` - Cyprus + * `CZ` - Czechia + * `DK` - Denmark + * `DJ` - Djibouti + * `DM` - Dominica + * `DO` - Dominican Republic + * `EC` - Ecuador + * `EG` - Egypt + * `SV` - El Salvador + * `GQ` - Equatorial Guinea + * `ER` - Eritrea + * `EE` - Estonia + * `SZ` - Eswatini + * `ET` - Ethiopia + * `FK` - Falkland Islands (Malvinas) + * `FO` - Faroe Islands + * `FJ` - Fiji + * `FI` - Finland + * `FR` - France + * `GF` - French Guiana + * `PF` - French Polynesia + * `TF` - French Southern Territories + * `GA` - Gabon + * `GM` - Gambia + * `GE` - Georgia + * `DE` - Germany + * `GH` - Ghana + * `GI` - Gibraltar + * `GR` - Greece + * `GL` - Greenland + * `GD` - Grenada + * `GP` - Guadeloupe + * `GU` - Guam + * `GT` - Guatemala + * `GG` - Guernsey + * `GN` - Guinea + * `GW` - Guinea-Bissau + * `GY` - Guyana + * `HT` - Haiti + * `HM` - Heard Island and McDonald Islands + * `VA` - Holy See + * `HN` - Honduras + * `HK` - Hong Kong + * `HU` - Hungary + * `IS` - Iceland + * `IN` - India + * `ID` - Indonesia + * `IR` - Iran + * `IQ` - Iraq + * `IE` - Ireland + * `IM` - Isle of Man + * `IL` - Israel + * `IT` - Italy + * `JM` - Jamaica + * `JP` - Japan + * `JE` - Jersey + * `JO` - Jordan + * `KZ` - Kazakhstan + * `KE` - Kenya + * `KI` - Kiribati + * `KW` - Kuwait + * `KG` - Kyrgyzstan + * `LA` - Laos + * `LV` - Latvia + * `LB` - Lebanon + * `LS` - Lesotho + * `LR` - Liberia + * `LY` - Libya + * `LI` - Liechtenstein + * `LT` - Lithuania + * `LU` - Luxembourg + * `MO` - Macao + * `MG` - Madagascar + * `MW` - Malawi + * `MY` - Malaysia + * `MV` - Maldives + * `ML` - Mali + * `MT` - Malta + * `MH` - Marshall Islands + * `MQ` - Martinique + * `MR` - Mauritania + * `MU` - Mauritius + * `YT` - Mayotte + * `MX` - Mexico + * `FM` - Micronesia (Federated States of) + * `MD` - Moldova + * `MC` - Monaco + * `MN` - Mongolia + * `ME` - Montenegro + * `MS` - Montserrat + * `MA` - Morocco + * `MZ` - Mozambique + * `MM` - Myanmar + * `NA` - Namibia + * `NR` - Nauru + * `NP` - Nepal + * `NL` - Netherlands + * `NC` - New Caledonia + * `NZ` - New Zealand + * `NI` - Nicaragua + * `NE` - Niger + * `NG` - Nigeria + * `NU` - Niue + * `NF` - Norfolk Island + * `KP` - North Korea + * `MK` - North Macedonia + * `MP` - Northern Mariana Islands + * `NO` - Norway + * `OM` - Oman + * `PK` - Pakistan + * `PW` - Palau + * `PS` - Palestine, State of + * `PA` - Panama + * `PG` - Papua New Guinea + * `PY` - Paraguay + * `PE` - Peru + * `PH` - Philippines + * `PN` - Pitcairn + * `PL` - Poland + * `PT` - Portugal + * `PR` - Puerto Rico + * `QA` - Qatar + * `RE` - Réunion + * `RO` - Romania + * `RU` - Russia + * `RW` - Rwanda + * `BL` - Saint Barthélemy + * `SH` - Saint Helena, Ascension and Tristan da Cunha + * `KN` - Saint Kitts and Nevis + * `LC` - Saint Lucia + * `MF` - Saint Martin (French part) + * `PM` - Saint Pierre and Miquelon + * `VC` - Saint Vincent and the Grenadines + * `WS` - Samoa + * `SM` - San Marino + * `ST` - Sao Tome and Principe + * `SA` - Saudi Arabia + * `SN` - Senegal + * `RS` - Serbia + * `SC` - Seychelles + * `SL` - Sierra Leone + * `SG` - Singapore + * `SX` - Sint Maarten (Dutch part) + * `SK` - Slovakia + * `SI` - Slovenia + * `SB` - Solomon Islands + * `SO` - Somalia + * `ZA` - South Africa + * `GS` - South Georgia and the South Sandwich Islands + * `KR` - South Korea + * `SS` - South Sudan + * `ES` - Spain + * `LK` - Sri Lanka + * `SD` - Sudan + * `SR` - Suriname + * `SJ` - Svalbard and Jan Mayen + * `SE` - Sweden + * `CH` - Switzerland + * `SY` - Syria + * `TW` - Taiwan + * `TJ` - Tajikistan + * `TZ` - Tanzania + * `TH` - Thailand + * `TL` - Timor-Leste + * `TG` - Togo + * `TK` - Tokelau + * `TO` - Tonga + * `TT` - Trinidad and Tobago + * `TN` - Tunisia + * `TR` - Turkey + * `TM` - Turkmenistan + * `TC` - Turks and Caicos Islands + * `TV` - Tuvalu + * `UG` - Uganda + * `UA` - Ukraine + * `AE` - United Arab Emirates + * `GB` - United Kingdom + * `UM` - United States Minor Outlying Islands + * `US` - United States of America + * `UY` - Uruguay + * `UZ` - Uzbekistan + * `VU` - Vanuatu + * `VE` - Venezuela + * `VN` - Vietnam + * `VG` - Virgin Islands (British) + * `VI` - Virgin Islands (U.S.) + * `WF` - Wallis and Futuna + * `EH` - Western Sahara + * `YE` - Yemen + * `ZM` - Zambia + * `ZW` - Zimbabwe + source: + openapi: openapi/openapi.yml + CreditNoteContact: + discriminated: false + docs: The credit note's contact. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: openapi/openapi.yml + inline: true + CreditNoteCompany: + discriminated: false + docs: The company the credit note belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: openapi/openapi.yml + inline: true + CreditNoteTrackingCategoriesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: openapi/openapi.yml + inline: true + CreditNotePaymentsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Payment + source: + openapi: openapi/openapi.yml + inline: true + CreditNoteAppliedPaymentsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - PaymentLineItem + source: + openapi: openapi/openapi.yml + inline: true + CreditNoteAccountingPeriod: + discriminated: false + docs: The accounting period that the CreditNote was generated in. + union: + - type: string + validation: + format: uuid + - AccountingPeriod + source: + openapi: openapi/openapi.yml + inline: true + CreditNote: + docs: >- + # The CreditNote Object + + ### Description + + A `CreditNote` is transaction issued to a customer, indicating a reduction + or cancellation of the amount owed by the customer. It is most generally + used as an adjustment note used to rectify errors, returns, or + overpayments related to a sales transaction. A `CreditNote` can be applied + to *Accounts Receivable* Invoices to decrease the overall amount of the + Invoice. + + + ### Usage Example + + Fetch from the `LIST CreditNotes` endpoint and view a company's credit + notes. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + transaction_date: + type: optional + docs: The credit note's transaction date. + status: + type: optional + docs: |- + The credit note's status. + + * `SUBMITTED` - SUBMITTED + * `AUTHORIZED` - AUTHORIZED + * `PAID` - PAID + number: + type: optional + docs: The credit note's number. + contact: + type: optional + docs: The credit note's contact. + company: + type: optional + docs: The company the credit note belongs to. + exchange_rate: + type: optional + docs: The credit note's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + total_amount: + type: optional + docs: The credit note's total amount. + remaining_credit: + type: optional + docs: >- + The amount of value remaining in the credit note that the customer can + use. + inclusive_of_tax: + type: optional + docs: >- + If the transaction is inclusive or exclusive of tax. `True` if + inclusive, `False` if exclusive. + line_items: + type: optional> + access: read-only + tracking_categories: optional>> + currency: + type: optional + docs: >- + The credit note's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + remote_created_at: + type: optional + docs: When the third party's credit note was created. + remote_updated_at: + type: optional + docs: When the third party's credit note was updated. + payments: + type: optional>> + docs: Array of `Payment` object IDs + applied_payments: + type: optional>> + docs: >- + A list of the Payment Applied to Lines common models related to a + given Invoice, Credit Note, or Journal Entry. + accounting_period: + type: optional + docs: The accounting period that the CreditNote was generated in. + applied_to_lines: + type: optional> + docs: >- + A list of the CreditNote Applied to Lines common models related to a + given Credit Note + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + CreditNoteApplyLineForCreditNoteInvoice: + discriminated: false + union: + - type: string + validation: + format: uuid + - Invoice + source: + openapi: openapi/openapi.yml + inline: true + CreditNoteApplyLineForCreditNote: + docs: >- + # The CreditNoteApplyLine Object + + ### Description + + The `CreditNoteApplyLine` is attached to the CreditNote model. + + + ### Usage Example + + Fetch from the `GET CreditNote` endpoint and view the invoice's applied to + lines. + properties: + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + invoice: optional + applied_date: + type: optional + docs: Date that the credit note is applied to the invoice. + applied_amount: + type: optional + docs: The amount of the Credit Note applied to the invoice. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + source: + openapi: openapi/openapi.yml + CreditNoteApplyLineForCreditNoteRequestInvoice: + discriminated: false + union: + - type: string + validation: + format: uuid + - Invoice + source: + openapi: openapi/openapi.yml + inline: true + CreditNoteApplyLineForCreditNoteRequest: + docs: >- + # The CreditNoteApplyLine Object + + ### Description + + The `CreditNoteApplyLine` is attached to the CreditNote model. + + + ### Usage Example + + Fetch from the `GET CreditNote` endpoint and view the invoice's applied to + lines. + properties: + remote_id: + type: optional + docs: The third-party API ID of the matching object. + invoice: optional + applied_date: + type: optional + docs: Date that the credit note is applied to the invoice. + applied_amount: + type: optional + docs: The amount of the Credit Note applied to the invoice. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + CreditNoteApplyLineForInvoiceCreditNote: + discriminated: false + union: + - type: string + validation: + format: uuid + - CreditNote + source: + openapi: openapi/openapi.yml + inline: true + CreditNoteApplyLineForInvoice: + docs: >- + # The CreditNoteApplyLine Object + + ### Description + + The `CreditNoteApplyLine` is attached to the CreditNote model. + + + ### Usage Example + + Fetch from the `GET CreditNote` endpoint and view the invoice's applied to + lines. + properties: + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + credit_note: optional + applied_date: + type: optional + docs: Date that the credit note is applied to the invoice. + applied_amount: + type: optional + docs: The amount of the Credit Note applied to the invoice. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + source: + openapi: openapi/openapi.yml + CreditNoteLineItemItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Item + source: + openapi: openapi/openapi.yml + inline: true + CreditNoteLineItemCompany: + discriminated: false + docs: The company the credit note belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: openapi/openapi.yml + inline: true + CreditNoteLineItemContact: + discriminated: false + docs: The credit note's contact. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: openapi/openapi.yml + inline: true + CreditNoteLineItemProject: + discriminated: false + union: + - type: string + validation: + format: uuid + - Project + source: + openapi: openapi/openapi.yml + inline: true + CreditNoteLineItem: + docs: >- + # The CreditNoteLineItem Object + + ### Description + + The `CreditNoteLineItem` object is used to represent a credit note's line + items. + + + ### Usage Example + + Fetch from the `GET CreditNote` endpoint and view the credit note's line + items. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + item: optional + name: + type: optional + docs: The credit note line item's name. + description: + type: optional + docs: The description of the item that is owed. + quantity: + type: optional + docs: The credit note line item's quantity. + validation: + pattern: ^-?\d{0,24}(?:\.\d{0,8})?$ + memo: + type: optional + docs: The credit note line item's memo. + unit_price: + type: optional + docs: The credit note line item's unit price. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + tax_rate: + type: optional + docs: The tax rate that applies to this line item. + validation: + format: uuid + total_line_amount: + type: optional + docs: The credit note line item's total. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + tracking_category: + type: optional + docs: The credit note line item's associated tracking category. + validation: + format: uuid + availability: deprecated + tracking_categories: + type: optional>> + docs: The credit note line item's associated tracking categories. + account: + type: optional + docs: The credit note line item's account. + validation: + format: uuid + company: + type: optional + docs: The company the credit note belongs to. + contact: + type: optional + docs: The credit note's contact. + project: optional + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + source: + openapi: openapi/openapi.yml + CreditNoteLineItemRequestItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Item + source: + openapi: openapi/openapi.yml + inline: true + CreditNoteLineItemRequestCompany: + discriminated: false + docs: The company the credit note belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: openapi/openapi.yml + inline: true + CreditNoteLineItemRequestContact: + discriminated: false + docs: The credit note's contact. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: openapi/openapi.yml + inline: true + CreditNoteLineItemRequestProject: + discriminated: false + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: openapi/openapi.yml + inline: true + CreditNoteLineItemRequest: + docs: >- + # The CreditNoteLineItem Object + + ### Description + + The `CreditNoteLineItem` object is used to represent a credit note's line + items. + + + ### Usage Example + + Fetch from the `GET CreditNote` endpoint and view the credit note's line + items. + properties: + remote_id: + type: optional + docs: The third-party API ID of the matching object. + item: optional + name: + type: optional + docs: The credit note line item's name. + description: + type: optional + docs: The description of the item that is owed. + quantity: + type: optional + docs: The credit note line item's quantity. + validation: + pattern: ^-?\d{0,24}(?:\.\d{0,8})?$ + memo: + type: optional + docs: The credit note line item's memo. + unit_price: + type: optional + docs: The credit note line item's unit price. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + tax_rate: + type: optional + docs: The tax rate that applies to this line item. + validation: + format: uuid + total_line_amount: + type: optional + docs: The credit note line item's total. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + tracking_category: + type: optional + docs: The credit note line item's associated tracking category. + validation: + format: uuid + availability: deprecated + tracking_categories: + type: optional>> + docs: The credit note line item's associated tracking categories. + account: + type: optional + docs: The credit note line item's account. + validation: + format: uuid + company: + type: optional + docs: The company the credit note belongs to. + contact: + type: optional + docs: The credit note's contact. + project: optional + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + CreditNoteRequestContact: + discriminated: false + docs: The credit note's contact. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: openapi/openapi.yml + inline: true + CreditNoteRequestCompany: + discriminated: false + docs: The company the credit note belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: openapi/openapi.yml + inline: true + CreditNoteRequestLineItemsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - CreditNoteLineItemRequest + source: + openapi: openapi/openapi.yml + inline: true + CreditNoteRequestTrackingCategoriesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: openapi/openapi.yml + inline: true + CreditNoteRequestPaymentsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Payment + source: + openapi: openapi/openapi.yml + inline: true + CreditNoteRequestAppliedPaymentsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - PaymentLineItem + source: + openapi: openapi/openapi.yml + inline: true + CreditNoteRequestAccountingPeriod: + discriminated: false + docs: The accounting period that the CreditNote was generated in. + union: + - type: string + validation: + format: uuid + - AccountingPeriod + source: + openapi: openapi/openapi.yml + inline: true + CreditNoteRequest: + docs: >- + # The CreditNote Object + + ### Description + + A `CreditNote` is transaction issued to a customer, indicating a reduction + or cancellation of the amount owed by the customer. It is most generally + used as an adjustment note used to rectify errors, returns, or + overpayments related to a sales transaction. A `CreditNote` can be applied + to *Accounts Receivable* Invoices to decrease the overall amount of the + Invoice. + + + ### Usage Example + + Fetch from the `LIST CreditNotes` endpoint and view a company's credit + notes. + properties: + transaction_date: + type: optional + docs: The credit note's transaction date. + status: + type: optional + docs: |- + The credit note's status. + + * `SUBMITTED` - SUBMITTED + * `AUTHORIZED` - AUTHORIZED + * `PAID` - PAID + number: + type: optional + docs: The credit note's number. + contact: + type: optional + docs: The credit note's contact. + company: + type: optional + docs: The company the credit note belongs to. + exchange_rate: + type: optional + docs: The credit note's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + total_amount: + type: optional + docs: The credit note's total amount. + remaining_credit: + type: optional + docs: >- + The amount of value remaining in the credit note that the customer can + use. + inclusive_of_tax: + type: optional + docs: >- + If the transaction is inclusive or exclusive of tax. `True` if + inclusive, `False` if exclusive. + line_items: optional> + tracking_categories: optional>> + currency: + type: optional + docs: >- + The credit note's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + payments: + type: optional>> + docs: Array of `Payment` object IDs + applied_payments: + type: optional>> + docs: >- + A list of the Payment Applied to Lines common models related to a + given Invoice, Credit Note, or Journal Entry. + accounting_period: + type: optional + docs: The accounting period that the CreditNote was generated in. + applied_to_lines: + type: optional> + docs: >- + A list of the CreditNote Applied to Lines common models related to a + given Credit Note + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + CreditNoteResponse: + properties: + model: CreditNote + warnings: list + errors: list + logs: optional> + source: + openapi: openapi/openapi.yml + CreditNoteStatusEnum: + enum: + - SUBMITTED + - AUTHORIZED + - PAID + docs: |- + * `SUBMITTED` - SUBMITTED + * `AUTHORIZED` - AUTHORIZED + * `PAID` - PAID + source: + openapi: openapi/openapi.yml + CreditOrDebitEnum: + enum: + - CREDIT + - DEBIT + docs: |- + * `CREDIT` - CREDIT + * `DEBIT` - DEBIT + source: + openapi: openapi/openapi.yml + DataPassthroughRequest: + docs: >- + # The DataPassthrough Object + + ### Description + + The `DataPassthrough` object is used to send information to an + otherwise-unsupported third-party endpoint. + + + ### Usage Example + + Create a `DataPassthrough` to get team hierarchies from your Rippling + integration. + properties: + method: MethodEnum + path: + type: string + docs: The path of the request in the third party's platform. + validation: + minLength: 1 + base_url_override: + type: optional + docs: An optional override of the third party's base url for the request. + validation: + minLength: 1 + data: + type: optional + docs: >- + The data with the request. You must include a `request_format` + parameter matching the data's format + validation: + minLength: 1 + multipart_form_data: + type: optional> + docs: >- + Pass an array of `MultipartFormField` objects in here instead of using + the `data` param if `request_format` is set to `MULTIPART`. + headers: + type: optional> + docs: >- + The headers to use for the request (Merge will handle the account's + authorization headers). `Content-Type` header is required for + passthrough. Choose content type corresponding to expected format of + receiving server. + request_format: optional + normalize_response: + type: optional + docs: >- + Optional. If true, the response will always be an object of the form + `{"type": T, "value": ...}` where `T` will be one of `string, boolean, + number, null, array, object`. + source: + openapi: openapi/openapi.yml + DebugModeLog: + properties: + log_id: string + dashboard_view: string + log_summary: DebugModelLogSummary + source: + openapi: openapi/openapi.yml + DebugModelLogSummary: + properties: + url: string + method: string + status_code: integer + source: + openapi: openapi/openapi.yml + EmployeeCompany: + discriminated: false + docs: The subsidiary that the employee belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: openapi/openapi.yml + inline: true + Employee: + docs: >- + # The Employee Object + + ### Description + + An `Employee` is an individual who works for the company of the linked + account. The `Employee` model contains both contractors and full time + employees. + + * An `Employee` is a contractor if `is_contractor` property is `True` + + * An `Employee` is a full time employee if `is_contractor` property is + `False` + + + ### Usage Example + + Fetch from the `LIST Employees` endpoint and view a company's employees. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + first_name: + type: optional + docs: The employee's first name. + validation: + maxLength: 255 + last_name: + type: optional + docs: The employee's last name. + validation: + maxLength: 255 + is_contractor: + type: optional + docs: '`True` if the employee is a contractor, `False` if not.' + employee_number: + type: optional + docs: The employee's internal identification number. + validation: + maxLength: 50 + email_address: + type: optional + docs: The employee's email address. + company: + type: optional + docs: The subsidiary that the employee belongs to. + status: + type: Status895Enum + docs: |- + The employee's status in the accounting system. + + * `ACTIVE` - ACTIVE + * `INACTIVE` - INACTIVE + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + EnabledActionsEnum: + enum: + - READ + - WRITE + docs: |- + * `READ` - READ + * `WRITE` - WRITE + source: + openapi: openapi/openapi.yml + EncodingEnum: + enum: + - RAW + - BASE64 + - GZIP_BASE64 + docs: |- + * `RAW` - RAW + * `BASE64` - BASE64 + * `GZIP_BASE64` - GZIP_BASE64 + source: + openapi: openapi/openapi.yml + ErrorValidationProblem: + properties: + source: optional + title: string + detail: string + problem_type: string + source: + openapi: openapi/openapi.yml + EventTypeEnum: + enum: + - CREATED_REMOTE_PRODUCTION_API_KEY + - DELETED_REMOTE_PRODUCTION_API_KEY + - CREATED_TEST_API_KEY + - DELETED_TEST_API_KEY + - REGENERATED_PRODUCTION_API_KEY + - REGENERATED_WEBHOOK_SIGNATURE + - INVITED_USER + - TWO_FACTOR_AUTH_ENABLED + - TWO_FACTOR_AUTH_DISABLED + - DELETED_LINKED_ACCOUNT + - DELETED_ALL_COMMON_MODELS_FOR_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 + - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + - FORCED_LINKED_ACCOUNT_RESYNC + - MUTED_ISSUE + - GENERATED_MAGIC_LINK + - ENABLED_MERGE_WEBHOOK + - DISABLED_MERGE_WEBHOOK + - MERGE_WEBHOOK_TARGET_CHANGED + - END_USER_CREDENTIALS_ACCESSED + docs: >- + * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + + * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + + * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + + * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + + * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + + * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + + * `INVITED_USER` - INVITED_USER + + * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + + * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + + * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + + * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - + DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + + * `CREATED_DESTINATION` - CREATED_DESTINATION + + * `DELETED_DESTINATION` - DELETED_DESTINATION + + * `CHANGED_DESTINATION` - CHANGED_DESTINATION + + * `CHANGED_SCOPES` - CHANGED_SCOPES + + * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + + * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + + * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + + * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + + * `ENABLED_CATEGORY` - ENABLED_CATEGORY + + * `DISABLED_CATEGORY` - DISABLED_CATEGORY + + * `CHANGED_PASSWORD` - CHANGED_PASSWORD + + * `RESET_PASSWORD` - RESET_PASSWORD + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - + CREATED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - + CREATED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - + CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + + * `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 + + * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + + * `MUTED_ISSUE` - MUTED_ISSUE + + * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + + * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + + * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + + * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + + * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + source: + openapi: openapi/openapi.yml + ExpenseAccount: + discriminated: false + docs: The expense's payment account. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: openapi/openapi.yml + inline: true + ExpenseContact: + discriminated: false + docs: The expense's contact. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: openapi/openapi.yml + inline: true + ExpenseCompany: + discriminated: false + docs: The company the expense belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: openapi/openapi.yml + inline: true + ExpenseEmployee: + discriminated: false + docs: The employee this overall transaction relates to. + union: + - type: string + validation: + format: uuid + - Employee + source: + openapi: openapi/openapi.yml + inline: true + ExpenseTrackingCategoriesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: openapi/openapi.yml + inline: true + ExpenseAccountingPeriod: + discriminated: false + docs: The accounting period that the Expense was generated in. + union: + - type: string + validation: + format: uuid + - AccountingPeriod + source: + openapi: openapi/openapi.yml + inline: true + Expense: + docs: >- + # The Expense Object + + ### Description + + The `Expense` object is used to represent a direct purchase by a business, + typically made with a check, credit card, or cash. Each `Expense` object + is dedicated to a grouping of expenses, with each expense recorded in the + lines object. + + + The `Expense` object is used also used to represent refunds to direct + purchases. Refunds can be distinguished from purchases by the amount sign + of the records. Expense objects with a negative amount are purchases and + `Expense` objects with a positive amount are refunds to those purchases. + + + ### Usage Example + + Fetch from the `GET Expense` endpoint and view a company's expense. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + transaction_date: + type: optional + docs: When the transaction occurred. + remote_created_at: + type: optional + docs: When the expense was created. + account: + type: optional + docs: The expense's payment account. + contact: + type: optional + docs: The expense's contact. + total_amount: + type: optional + docs: The expense's total amount. + sub_total: + type: optional + docs: The expense's total amount before tax. + total_tax_amount: + type: optional + docs: The expense's total tax amount. + currency: + type: optional + docs: >- + The expense's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + exchange_rate: + type: optional + docs: The expense's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + inclusive_of_tax: + type: optional + docs: >- + If the transaction is inclusive or exclusive of tax. `True` if + inclusive, `False` if exclusive. + company: + type: optional + docs: The company the expense belongs to. + employee: + type: optional + docs: The employee this overall transaction relates to. + memo: + type: optional + docs: The expense's private note. + lines: optional> + tracking_categories: optional>> + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + accounting_period: + type: optional + docs: The accounting period that the Expense was generated in. + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + remote_fields: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + ExpenseLineItem: + discriminated: false + docs: The line's item. + union: + - type: string + validation: + format: uuid + - Item + source: + openapi: openapi/openapi.yml + inline: true + ExpenseLineTrackingCategory: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: openapi/openapi.yml + inline: true + ExpenseLineTrackingCategoriesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: openapi/openapi.yml + inline: true + ExpenseLineEmployee: + discriminated: false + docs: The employee this overall transaction relates to. + union: + - type: string + validation: + format: uuid + - Employee + source: + openapi: openapi/openapi.yml + inline: true + ExpenseLineAccount: + discriminated: false + docs: The expense's payment account. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: openapi/openapi.yml + inline: true + ExpenseLineContact: + discriminated: false + docs: The expense's contact. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: openapi/openapi.yml + inline: true + ExpenseLineProject: + discriminated: false + union: + - type: string + validation: + format: uuid + - Project + source: + openapi: openapi/openapi.yml + inline: true + ExpenseLine: + docs: |- + # The ExpenseLine Object + ### Description + The `ExpenseLine` object is used to represent an expense's line items. + + ### Usage Example + Fetch from the `GET Expense` endpoint and view the expense's line items. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + item: + type: optional + docs: The line's item. + net_amount: + type: optional + docs: The line's net amount. + tracking_category: + type: optional + availability: deprecated + tracking_categories: + type: optional>> + docs: The expense line item's associated tracking categories. + company: + type: optional + docs: The company the expense belongs to. + validation: + format: uuid + employee: + type: optional + docs: The employee this overall transaction relates to. + currency: + type: optional + docs: >- + The expense line item's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + account: + type: optional + docs: The expense's payment account. + contact: + type: optional + docs: The expense's contact. + project: optional + description: + type: optional + docs: The description of the item that was purchased by the company. + exchange_rate: + type: optional + docs: The expense line item's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + tax_rate: + type: optional + docs: The tax rate that applies to this line item. + validation: + format: uuid + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + source: + openapi: openapi/openapi.yml + ExpenseLineRequestItem: + discriminated: false + docs: The line's item. + union: + - type: string + validation: + format: uuid + - Item + source: + openapi: openapi/openapi.yml + inline: true + ExpenseLineRequestTrackingCategory: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: openapi/openapi.yml + inline: true + ExpenseLineRequestTrackingCategoriesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: openapi/openapi.yml + inline: true + ExpenseLineRequestEmployee: + discriminated: false + docs: The employee this overall transaction relates to. + union: + - type: string + validation: + format: uuid + - Employee + source: + openapi: openapi/openapi.yml + inline: true + ExpenseLineRequestAccount: + discriminated: false + docs: The expense's payment account. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: openapi/openapi.yml + inline: true + ExpenseLineRequestContact: + discriminated: false + docs: The expense's contact. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: openapi/openapi.yml + inline: true + ExpenseLineRequestProject: + discriminated: false + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: openapi/openapi.yml + inline: true + ExpenseLineRequest: + docs: |- + # The ExpenseLine Object + ### Description + The `ExpenseLine` object is used to represent an expense's line items. + + ### Usage Example + Fetch from the `GET Expense` endpoint and view the expense's line items. + properties: + remote_id: + type: optional + docs: The third-party API ID of the matching object. + item: + type: optional + docs: The line's item. + net_amount: + type: optional + docs: The line's net amount. + tracking_category: + type: optional + availability: deprecated + tracking_categories: + type: optional>> + docs: The expense line item's associated tracking categories. + company: + type: optional + docs: The company the expense belongs to. + validation: + format: uuid + employee: + type: optional + docs: The employee this overall transaction relates to. + currency: + type: optional + docs: >- + The expense line item's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + account: + type: optional + docs: The expense's payment account. + contact: + type: optional + docs: The expense's contact. + project: optional + description: + type: optional + docs: The description of the item that was purchased by the company. + exchange_rate: + type: optional + docs: The expense line item's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + tax_rate: + type: optional + docs: The tax rate that applies to this line item. + validation: + format: uuid + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + remote_fields: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + ExpenseRequestAccount: + discriminated: false + docs: The expense's payment account. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: openapi/openapi.yml + inline: true + ExpenseRequestContact: + discriminated: false + docs: The expense's contact. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: openapi/openapi.yml + inline: true + ExpenseRequestCompany: + discriminated: false + docs: The company the expense belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: openapi/openapi.yml + inline: true + ExpenseRequestEmployee: + discriminated: false + docs: The employee this overall transaction relates to. + union: + - type: string + validation: + format: uuid + - Employee + source: + openapi: openapi/openapi.yml + inline: true + ExpenseRequestTrackingCategoriesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: openapi/openapi.yml + inline: true + ExpenseRequestAccountingPeriod: + discriminated: false + docs: The accounting period that the Expense was generated in. + union: + - type: string + validation: + format: uuid + - AccountingPeriod + source: + openapi: openapi/openapi.yml + inline: true + ExpenseRequest: + docs: >- + # The Expense Object + + ### Description + + The `Expense` object is used to represent a direct purchase by a business, + typically made with a check, credit card, or cash. Each `Expense` object + is dedicated to a grouping of expenses, with each expense recorded in the + lines object. + + + The `Expense` object is used also used to represent refunds to direct + purchases. Refunds can be distinguished from purchases by the amount sign + of the records. Expense objects with a negative amount are purchases and + `Expense` objects with a positive amount are refunds to those purchases. + + + ### Usage Example + + Fetch from the `GET Expense` endpoint and view a company's expense. + properties: + transaction_date: + type: optional + docs: When the transaction occurred. + account: + type: optional + docs: The expense's payment account. + contact: + type: optional + docs: The expense's contact. + total_amount: + type: optional + docs: The expense's total amount. + sub_total: + type: optional + docs: The expense's total amount before tax. + total_tax_amount: + type: optional + docs: The expense's total tax amount. + currency: + type: optional + docs: >- + The expense's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + exchange_rate: + type: optional + docs: The expense's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + inclusive_of_tax: + type: optional + docs: >- + If the transaction is inclusive or exclusive of tax. `True` if + inclusive, `False` if exclusive. + company: + type: optional + docs: The company the expense belongs to. + employee: + type: optional + docs: The employee this overall transaction relates to. + memo: + type: optional + docs: The expense's private note. + lines: optional> + tracking_categories: optional>> + accounting_period: + type: optional + docs: The accounting period that the Expense was generated in. + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + remote_fields: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + ExpenseResponse: + properties: + model: Expense + warnings: list + errors: list + logs: optional> + source: + openapi: openapi/openapi.yml + ExternalTargetFieldApi: + properties: + name: + type: optional + access: read-only + description: + type: optional + access: read-only + is_mapped: + type: optional + access: read-only + source: + openapi: openapi/openapi.yml + ExternalTargetFieldApiResponse: + properties: + Account: optional> + AccountingAttachment: optional> + BalanceSheet: optional> + CashFlowStatement: optional> + CompanyInfo: optional> + Contact: optional> + IncomeStatement: optional> + CreditNote: optional> + Item: optional> + PurchaseOrder: optional> + TrackingCategory: optional> + JournalEntry: optional> + TaxRate: optional> + Invoice: optional> + Payment: optional> + Expense: optional> + VendorCredit: optional> + Transaction: optional> + AccountingPeriod: optional> + GeneralLedgerTransaction: optional> + BankFeedAccount: optional> + Employee: optional> + PaymentMethod: optional> + Project: optional> + PaymentTerm: optional> + source: + openapi: openapi/openapi.yml + FeedStatusEnum: + enum: + - ACTIVE + - INACTIVE + docs: |- + * `ACTIVE` - ACTIVE + * `INACTIVE` - INACTIVE + source: + openapi: openapi/openapi.yml + FieldFormatEnum: + enum: + - string + - number + - date + - datetime + - bool + - list + docs: |- + * `string` - string + * `number` - number + * `date` - date + * `datetime` - datetime + * `bool` - bool + * `list` - list + source: + openapi: openapi/openapi.yml + FieldMappingApiInstanceTargetField: + properties: + name: string + description: string + is_organization_wide: boolean + source: + openapi: openapi/openapi.yml + inline: true + FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo: + properties: + method: optional + url_path: optional + field_traversal_path: optional> + source: + openapi: openapi/openapi.yml + inline: true + FieldMappingApiInstanceRemoteField: + properties: + remote_key_name: optional + schema: optional> + remote_endpoint_info: FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo + source: + openapi: openapi/openapi.yml + inline: true + FieldMappingApiInstance: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + is_integration_wide: + type: optional + access: read-only + target_field: + type: optional + access: read-only + remote_field: + type: optional + access: read-only + source: + openapi: openapi/openapi.yml + FieldMappingApiInstanceResponse: + properties: + Account: optional> + AccountingAttachment: optional> + BalanceSheet: optional> + CashFlowStatement: optional> + CompanyInfo: optional> + Contact: optional> + IncomeStatement: optional> + CreditNote: optional> + Item: optional> + PurchaseOrder: optional> + TrackingCategory: optional> + JournalEntry: optional> + TaxRate: optional> + Invoice: optional> + Payment: optional> + Expense: optional> + VendorCredit: optional> + Transaction: optional> + AccountingPeriod: optional> + GeneralLedgerTransaction: optional> + BankFeedAccount: optional> + Employee: optional> + PaymentMethod: optional> + Project: optional> + PaymentTerm: optional> + source: + openapi: openapi/openapi.yml + FieldMappingInstanceResponse: + properties: + model: FieldMappingApiInstance + warnings: list + errors: list + logs: optional> + source: + openapi: openapi/openapi.yml + FieldPermissionDeserializer: + properties: + enabled_fields: optional> + disabled_fields: optional> + source: + openapi: openapi/openapi.yml + FieldPermissionDeserializerRequest: + properties: + enabled_fields: optional> + disabled_fields: optional> + source: + openapi: openapi/openapi.yml + FieldTypeEnum: + enum: + - string + - number + - date + - datetime + - bool + - list + docs: |- + * `string` - string + * `number` - number + * `date` - date + * `datetime` - datetime + * `bool` - bool + * `list` - list + source: + openapi: openapi/openapi.yml + GeneralLedgerTransactionAccountingPeriod: + discriminated: false + docs: The accounting period that the GeneralLedgerTransaction was generated in. + union: + - type: string + validation: + format: uuid + - AccountingPeriod + source: + openapi: openapi/openapi.yml + inline: true + GeneralLedgerTransactionCompany: + discriminated: false + docs: The company the GeneralLedgerTransaction belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: openapi/openapi.yml + inline: true + GeneralLedgerTransactionTrackingCategoriesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: openapi/openapi.yml + inline: true + GeneralLedgerTransactionGeneralLedgerTransactionLinesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - GeneralLedgerTransactionLine + source: + openapi: openapi/openapi.yml + inline: true + GeneralLedgerTransaction: + docs: >- + # The GeneralLedgerTransaction Object + + ### Description + + A General Ledger Entry is a record of a financial transaction that is + posted to the general ledger, the central repository of a company’s + financial data. + + + The `GeneralLedgerTransaction` object is a singular endpoint to pull all + transactions posted to a company’s general ledger. The transaction that + generated the `GeneralLedgerTransaction` can be found by referencing the + `underlying_transaction_type` and `underlying_transaction_remote_id` + fields. + + + The lines of a `GeneralLedgerTransaction` object will always have equal + amounts of debits and credits. + + + ### Usage Example + + Fetch from the `GET GeneralLedgerTransaction` endpoint and view a general + ledger transaction. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + underlying_transaction_remote_id: + type: optional + docs: The third party remote ID of the underlying transaction. + validation: + maxLength: 50 + underlying_transaction_type: + type: optional + docs: |- + The type of the underlying transaction. + + * `INVOICE` - INVOICE + * `EXPENSE` - EXPENSE + * `TRANSACTION` - TRANSACTION + * `JOURNAL_ENTRY` - JOURNAL_ENTRY + * `PAYMENT` - PAYMENT + * `VENDOR_CREDIT` - VENDOR_CREDIT + * `CREDIT_NOTE` - CREDIT_NOTE + accounting_period: + type: optional + docs: >- + The accounting period that the GeneralLedgerTransaction was generated + in. + company: + type: optional + docs: The company the GeneralLedgerTransaction belongs to. + remote_updated_at: + type: optional + docs: When the third party's GeneralLedgerTransaction entry was updated. + remote_created_at: + type: optional + docs: When the third party's GeneralLedgerTransaction entry was created. + tracking_categories: optional>> + posting_date: + type: optional + docs: The date that the transaction was posted to the general ledger. + general_ledger_transaction_lines: + type: >- + optional> + docs: A list of “General Ledger Transaction Applied to Lines” objects. + access: read-only + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + GeneralLedgerTransactionLineAccount: + discriminated: false + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: openapi/openapi.yml + inline: true + GeneralLedgerTransactionLineCompany: + discriminated: false + docs: The company the GeneralLedgerTransaction belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: openapi/openapi.yml + inline: true + GeneralLedgerTransactionLineEmployee: + discriminated: false + union: + - type: string + validation: + format: uuid + - Employee + source: + openapi: openapi/openapi.yml + inline: true + GeneralLedgerTransactionLineContact: + discriminated: false + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: openapi/openapi.yml + inline: true + GeneralLedgerTransactionLineProject: + discriminated: false + union: + - type: string + validation: + format: uuid + - Project + source: + openapi: openapi/openapi.yml + inline: true + GeneralLedgerTransactionLineTrackingCategoriesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: openapi/openapi.yml + inline: true + GeneralLedgerTransactionLineItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Item + source: + openapi: openapi/openapi.yml + inline: true + GeneralLedgerTransactionLine: + docs: >- + # The GeneralLedgerTransactionLineSerializer Object + + ### Description + + The `GeneralLedgerTransactionLineSerializer` object represents general + ledger transaction line item. + + + ### Usage Example Fetch from the `GET + GeneralLedgerTransactionLineSerializer` endpoint and view an + + `GeneralLedgerTransaction` line item. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + account: optional + company: + type: optional + docs: The company the GeneralLedgerTransaction belongs to. + employee: optional + contact: optional + project: optional + base_currency: + type: optional + docs: >- + The base currency of the transaction + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + transaction_currency: + type: optional + docs: >- + The transaction currency that the transaction is made in. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + exchange_rate: + type: optional + docs: >- + The exchange rate between the base currency and the transaction + currency. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + description: + type: optional + docs: A description of the line item. + tracking_categories: + type: optional> + access: read-only + debit_amount: string + credit_amount: string + item: optional + foreign_debit_amount: string + foreign_credit_amount: string + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + IncomeStatementCompany: + discriminated: false + docs: The company the income statement belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: openapi/openapi.yml + inline: true + IncomeStatement: + docs: >- + # The IncomeStatement Object + + ### Description + + The `IncomeStatement` object is used to represent a company’s income, the + cost of sales, operating expenses, and other non-operating expenses. The + object also includes other important values like gross profit, gross + operating profit, and net income. This represents a period of time (month, + quarter, or year). + + + ### Usage Example + + Fetch from the `GET IncomeStatement` endpoint and view a company's income + statement for a given period. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The income statement's name. + currency: + type: optional + docs: >- + The income statement's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + company: + type: optional + docs: The company the income statement belongs to. + start_period: + type: optional + docs: The income statement's start period. + end_period: + type: optional + docs: The income statement's end period. + income: + type: optional> + access: read-only + cost_of_sales: + type: optional> + access: read-only + gross_profit: + type: optional + docs: The revenue minus the cost of sale. + operating_expenses: + type: optional> + access: read-only + net_operating_income: + type: optional + docs: The revenue minus the operating expenses. + non_operating_expenses: + type: optional> + access: read-only + net_income: + type: optional + docs: The gross profit minus the total expenses. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + IndividualCommonModelScopeDeserializer: + properties: + model_name: string + model_permissions: optional> + field_permissions: optional + source: + openapi: openapi/openapi.yml + IndividualCommonModelScopeDeserializerRequest: + properties: + model_name: + type: string + validation: + minLength: 1 + model_permissions: optional> + field_permissions: optional + source: + openapi: openapi/openapi.yml + InvoiceContact: + discriminated: false + docs: The invoice's contact. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: openapi/openapi.yml + inline: true + InvoiceCompany: + discriminated: false + docs: The company the invoice belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: openapi/openapi.yml + inline: true + InvoiceEmployee: + discriminated: false + docs: The employee this overall transaction relates to. + union: + - type: string + validation: + format: uuid + - Employee + source: + openapi: openapi/openapi.yml + inline: true + InvoicePaymentTerm: + discriminated: false + docs: The payment term that applies to this transaction. + union: + - type: string + validation: + format: uuid + - PaymentTerm + source: + openapi: openapi/openapi.yml + inline: true + InvoiceTrackingCategoriesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: openapi/openapi.yml + inline: true + InvoiceAccountingPeriod: + discriminated: false + docs: The accounting period that the Invoice was generated in. + union: + - type: string + validation: + format: uuid + - AccountingPeriod + source: + openapi: openapi/openapi.yml + inline: true + InvoicePurchaseOrdersItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - PurchaseOrder + source: + openapi: openapi/openapi.yml + inline: true + InvoicePaymentsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Payment + source: + openapi: openapi/openapi.yml + inline: true + InvoiceAppliedPaymentsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - PaymentLineItem + source: + openapi: openapi/openapi.yml + inline: true + InvoiceAppliedCreditNotesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - CreditNoteApplyLineForInvoice + source: + openapi: openapi/openapi.yml + inline: true + InvoiceAppliedVendorCreditsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - VendorCreditApplyLineForInvoice + source: + openapi: openapi/openapi.yml + inline: true + Invoice: + docs: >- + # The Invoice Object + + ### Description + + The `Invoice` object represents an itemized record of goods and/or + services sold to a customer or bought from a vendor. + + + + Represents a Bill when the `Invoice` type is `ACCOUNTS_PAYABLE`. + References an Invoice when the `Invoice` type is `ACCOUNTS_RECEIVABLE`. + + + ### Usage Example + + Fetch from the `LIST Invoices` endpoint and view a company's invoices. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + type: + type: optional + docs: >- + 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. + + + * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE + + * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE + contact: + type: optional + docs: The invoice's contact. + number: + type: optional + docs: The invoice's number. + issue_date: + type: optional + docs: The invoice's issue date. + due_date: + type: optional + docs: The invoice's due date. + paid_on_date: + type: optional + docs: The invoice's paid date. + memo: + type: optional + docs: The invoice's private note. + company: + type: optional + docs: The company the invoice belongs to. + employee: + type: optional + docs: The employee this overall transaction relates to. + currency: + type: optional + docs: >- + The invoice's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + exchange_rate: + type: optional + docs: The invoice's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + payment_term: + type: optional + docs: The payment term that applies to this transaction. + total_discount: + type: optional + docs: The total discounts applied to the total cost. + sub_total: + type: optional + docs: The total amount being paid before taxes. + status: + type: optional + docs: |- + The status of the invoice. + + * `PAID` - PAID + * `DRAFT` - DRAFT + * `SUBMITTED` - SUBMITTED + * `PARTIALLY_PAID` - PARTIALLY_PAID + * `OPEN` - OPEN + * `VOID` - VOID + total_tax_amount: + type: optional + docs: The total amount being paid in taxes. + total_amount: + type: optional + docs: The invoice's total amount. + balance: + type: optional + docs: The invoice's remaining balance. + remote_updated_at: + type: optional + docs: When the third party's invoice entry was updated. + tracking_categories: optional>> + accounting_period: + type: optional + docs: The accounting period that the Invoice was generated in. + purchase_orders: optional>> + payments: + type: optional>> + docs: Array of `Payment` object IDs. + applied_payments: + type: optional>> + docs: >- + A list of the Payment Applied to Lines common models related to a + given Invoice, Credit Note, or Journal Entry. + line_items: + type: optional> + access: read-only + applied_credit_notes: + type: optional> + docs: '`CreditNoteApplyLines` applied to the Invoice.' + access: read-only + applied_vendor_credits: + type: optional> + docs: '`VendorCreditApplyLines` applied to the Invoice.' + access: read-only + inclusive_of_tax: + type: optional + docs: >- + If the transaction is inclusive or exclusive of tax. `True` if + inclusive, `False` if exclusive. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + remote_fields: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + InvoiceLineItemEmployee: + discriminated: false + docs: The employee this overall transaction relates to. + union: + - type: string + validation: + format: uuid + - Employee + source: + openapi: openapi/openapi.yml + inline: true + InvoiceLineItemProject: + discriminated: false + union: + - type: string + validation: + format: uuid + - Project + source: + openapi: openapi/openapi.yml + inline: true + InvoiceLineItemContact: + discriminated: false + docs: The invoice's contact. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: openapi/openapi.yml + inline: true + InvoiceLineItemItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Item + source: + openapi: openapi/openapi.yml + inline: true + InvoiceLineItemAccount: + discriminated: false + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: openapi/openapi.yml + inline: true + InvoiceLineItemTrackingCategory: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: openapi/openapi.yml + inline: true + InvoiceLineItemTrackingCategoriesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: openapi/openapi.yml + inline: true + InvoiceLineItem: + docs: >- + # The InvoiceLineItem Object + + ### Description + + The `InvoiceLineItem` object represents an itemized record of goods and/or + services sold to a customer. + + + ### Usage Example + + Fetch from the `GET Invoice` endpoint and view the invoice's line items. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + description: + type: optional + docs: The line item's description. + unit_price: + type: optional + docs: The line item's unit price. + quantity: + type: optional + docs: The line item's quantity. + total_amount: + type: optional + docs: The line item's total amount. + employee: + type: optional + docs: The employee this overall transaction relates to. + project: optional + contact: + type: optional + docs: The invoice's contact. + currency: + type: optional + docs: >- + The line item's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + exchange_rate: + type: optional + docs: The line item's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + item: optional + account: optional + tax_rate: + type: optional + docs: The tax rate that applies to this line item. + validation: + format: uuid + tracking_category: + type: optional + availability: deprecated + tracking_categories: + type: optional>> + docs: The invoice line item's associated tracking categories. + company: + type: optional + docs: The company the invoice belongs to. + validation: + format: uuid + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_fields: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + InvoiceLineItemRequestEmployee: + discriminated: false + docs: The employee this overall transaction relates to. + union: + - type: string + validation: + format: uuid + - Employee + source: + openapi: openapi/openapi.yml + inline: true + InvoiceLineItemRequestProject: + discriminated: false + union: + - type: string + validation: + format: uuid + - Project + source: + openapi: openapi/openapi.yml + inline: true + InvoiceLineItemRequestContact: + discriminated: false + docs: The invoice's contact. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: openapi/openapi.yml + inline: true + InvoiceLineItemRequestItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Item + source: + openapi: openapi/openapi.yml + inline: true + InvoiceLineItemRequestAccount: + discriminated: false + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: openapi/openapi.yml + inline: true + InvoiceLineItemRequestTrackingCategory: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: openapi/openapi.yml + inline: true + InvoiceLineItemRequestTrackingCategoriesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: openapi/openapi.yml + inline: true + InvoiceLineItemRequest: + docs: >- + # The InvoiceLineItem Object + + ### Description + + The `InvoiceLineItem` object represents an itemized record of goods and/or + services sold to a customer. + + + ### Usage Example + + Fetch from the `GET Invoice` endpoint and view the invoice's line items. + properties: + remote_id: + type: optional + docs: The third-party API ID of the matching object. + description: + type: optional + docs: The line item's description. + unit_price: + type: optional + docs: The line item's unit price. + quantity: + type: optional + docs: The line item's quantity. + total_amount: + type: optional + docs: The line item's total amount. + employee: + type: optional + docs: The employee this overall transaction relates to. + project: optional + contact: + type: optional + docs: The invoice's contact. + currency: + type: optional + docs: >- + The line item's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + exchange_rate: + type: optional + docs: The line item's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + item: optional + account: optional + tax_rate: + type: optional + docs: The tax rate that applies to this line item. + validation: + format: uuid + tracking_category: + type: optional + availability: deprecated + tracking_categories: + type: optional>> + docs: The invoice line item's associated tracking categories. + company: + type: optional + docs: The company the invoice belongs to. + validation: + format: uuid + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + remote_fields: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + InvoiceRequestContact: + discriminated: false + docs: The invoice's contact. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: openapi/openapi.yml + inline: true + InvoiceRequestEmployee: + discriminated: false + docs: The employee this overall transaction relates to. + union: + - type: string + validation: + format: uuid + - Employee + source: + openapi: openapi/openapi.yml + inline: true + InvoiceRequestCompany: + discriminated: false + docs: The company the invoice belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: openapi/openapi.yml + inline: true + InvoiceRequestPaymentTerm: + discriminated: false + docs: The payment term that applies to this transaction. + union: + - type: string + validation: + format: uuid + - PaymentTerm + source: + openapi: openapi/openapi.yml + inline: true + InvoiceRequestPaymentsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Payment + source: + openapi: openapi/openapi.yml + inline: true + InvoiceRequestTrackingCategoriesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: openapi/openapi.yml + inline: true + InvoiceRequestPurchaseOrdersItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - PurchaseOrder + source: + openapi: openapi/openapi.yml + inline: true + InvoiceRequest: + docs: >- + # The Invoice Object + + ### Description + + The `Invoice` object represents an itemized record of goods and/or + services sold to a customer or bought from a vendor. + + + + Represents a Bill when the `Invoice` type is `ACCOUNTS_PAYABLE`. + References an Invoice when the `Invoice` type is `ACCOUNTS_RECEIVABLE`. + + + ### Usage Example + + Fetch from the `LIST Invoices` endpoint and view a company's invoices. + properties: + type: + type: optional + docs: >- + 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. + + + * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE + + * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE + contact: + type: optional + docs: The invoice's contact. + number: + type: optional + docs: The invoice's number. + issue_date: + type: optional + docs: The invoice's issue date. + due_date: + type: optional + docs: The invoice's due date. + paid_on_date: + type: optional + docs: The invoice's paid date. + employee: + type: optional + docs: The employee this overall transaction relates to. + memo: + type: optional + docs: The invoice's private note. + status: + type: optional + docs: |- + The status of the invoice. + + * `PAID` - PAID + * `DRAFT` - DRAFT + * `SUBMITTED` - SUBMITTED + * `PARTIALLY_PAID` - PARTIALLY_PAID + * `OPEN` - OPEN + * `VOID` - VOID + company: + type: optional + docs: The company the invoice belongs to. + currency: + type: optional + docs: >- + The invoice's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + exchange_rate: + type: optional + docs: The invoice's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + total_discount: + type: optional + docs: The total discounts applied to the total cost. + sub_total: + type: optional + docs: The total amount being paid before taxes. + payment_term: + type: optional + docs: The payment term that applies to this transaction. + total_tax_amount: + type: optional + docs: The total amount being paid in taxes. + inclusive_of_tax: + type: optional + docs: >- + If the transaction is inclusive or exclusive of tax. `True` if + inclusive, `False` if exclusive. + total_amount: + type: optional + docs: The invoice's total amount. + balance: + type: optional + docs: The invoice's remaining balance. + payments: + type: optional>> + docs: Array of `Payment` object IDs. + tracking_categories: optional>> + line_items: optional> + purchase_orders: optional>> + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + remote_fields: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + InvoiceResponse: + properties: + model: Invoice + warnings: list + errors: list + logs: optional> + source: + openapi: openapi/openapi.yml + InvoiceStatusEnum: + enum: + - PAID + - DRAFT + - SUBMITTED + - PARTIALLY_PAID + - OPEN + - VOID + docs: |- + * `PAID` - PAID + * `DRAFT` - DRAFT + * `SUBMITTED` - SUBMITTED + * `PARTIALLY_PAID` - PARTIALLY_PAID + * `OPEN` - OPEN + * `VOID` - VOID + source: + openapi: openapi/openapi.yml + InvoiceTypeEnum: + enum: + - ACCOUNTS_RECEIVABLE + - ACCOUNTS_PAYABLE + docs: |- + * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE + * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE + source: + openapi: openapi/openapi.yml + Issue: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + status: + type: optional + docs: |- + Status of the issue. Options: ('ONGOING', 'RESOLVED') + + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + error_description: string + end_user: + type: optional> + access: read-only + first_incident_time: optional + last_incident_time: optional + is_muted: + type: optional + access: read-only + error_details: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + IssueStatusEnum: + enum: + - ONGOING + - RESOLVED + docs: |- + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + source: + openapi: openapi/openapi.yml + ItemPurchaseAccount: + discriminated: false + docs: References the default account used to record a purchase of the item. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: openapi/openapi.yml + inline: true + ItemSalesAccount: + discriminated: false + docs: References the default account used to record a sale. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: openapi/openapi.yml + inline: true + ItemCompany: + discriminated: false + docs: The company the item belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: openapi/openapi.yml + inline: true + ItemPurchaseTaxRate: + discriminated: false + docs: The default purchase tax rate for this item. + union: + - type: string + validation: + format: uuid + - TaxRate + source: + openapi: openapi/openapi.yml + inline: true + ItemSalesTaxRate: + discriminated: false + docs: The default sales tax rate for this item. + union: + - type: string + validation: + format: uuid + - TaxRate + source: + openapi: openapi/openapi.yml + inline: true + Item: + docs: |- + # The Item Object + ### Description + The `Item` object refers to the goods involved in a transaction. + + ### Usage Example + Fetch from the `LIST Items` endpoint and view a company's items. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The item's name. + status: + type: optional + docs: |- + The item's status. + + * `ACTIVE` - ACTIVE + * `ARCHIVED` - ARCHIVED + unit_price: + type: optional + docs: The item's unit price. + purchase_price: + type: optional + docs: The price at which the item is purchased from a vendor. + purchase_account: + type: optional + docs: References the default account used to record a purchase of the item. + sales_account: + type: optional + docs: References the default account used to record a sale. + company: + type: optional + docs: The company the item belongs to. + purchase_tax_rate: + type: optional + docs: The default purchase tax rate for this item. + sales_tax_rate: + type: optional + docs: The default sales tax rate for this item. + remote_updated_at: + type: optional + docs: When the third party's item note was updated. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + ItemFormatEnum: + enum: + - string + - number + - date + - datetime + - bool + - list + docs: |- + * `string` - uuid + * `number` - url + * `date` - email + * `datetime` - phone + * `bool` - currency + * `list` - decimal + source: + openapi: openapi/openapi.yml + ItemRequestRequestPurchaseAccount: + discriminated: false + docs: References the default account used to record a purchase of the item. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: openapi/openapi.yml + inline: true + ItemRequestRequestSalesAccount: + discriminated: false + docs: References the default account used to record a sale. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: openapi/openapi.yml + inline: true + ItemRequestRequestCompany: + discriminated: false + docs: The company the item belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: openapi/openapi.yml + inline: true + ItemRequestRequestPurchaseTaxRate: + discriminated: false + docs: The default purchase tax rate for this item. + union: + - type: string + validation: + format: uuid + - TaxRate + source: + openapi: openapi/openapi.yml + inline: true + ItemRequestRequestSalesTaxRate: + discriminated: false + docs: The default sales tax rate for this item. + union: + - type: string + validation: + format: uuid + - TaxRate + source: + openapi: openapi/openapi.yml + inline: true + ItemRequestRequest: + docs: |- + # The Item Object + ### Description + The `Item` object refers to the goods involved in a transaction. + + ### Usage Example + Fetch from the `LIST Items` endpoint and view a company's items. + properties: + name: + type: optional + docs: The item's name. + status: + type: optional + docs: |- + The item's status. + + * `ACTIVE` - ACTIVE + * `ARCHIVED` - ARCHIVED + type: + type: optional + docs: |- + The item's type. + + * `INVENTORY` - INVENTORY + * `NON_INVENTORY` - NON_INVENTORY + * `SERVICE` - SERVICE + * `UNKNOWN` - UNKNOWN + unit_price: + type: optional + docs: The item's unit price. + purchase_price: + type: optional + docs: The price at which the item is purchased from a vendor. + purchase_account: + type: optional + docs: References the default account used to record a purchase of the item. + sales_account: + type: optional + docs: References the default account used to record a sale. + company: + type: optional + docs: The company the item belongs to. + purchase_tax_rate: + type: optional + docs: The default purchase tax rate for this item. + sales_tax_rate: + type: optional + docs: The default sales tax rate for this item. + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + ItemResponse: + properties: + model: Item + warnings: list + errors: list + logs: optional> + source: + openapi: openapi/openapi.yml + ItemSchema: + properties: + item_type: optional + item_format: optional + item_choices: optional> + source: + openapi: openapi/openapi.yml + ItemTypeEnum: + enum: + - string + - number + - date + - datetime + - bool + - list + docs: |- + * `string` - string + * `number` - number + * `date` - date + * `datetime` - datetime + * `bool` - bool + * `list` - list + source: + openapi: openapi/openapi.yml + JournalEntryPaymentsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Payment + source: + openapi: openapi/openapi.yml + inline: true + JournalEntryAppliedPaymentsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - PaymentLineItem + source: + openapi: openapi/openapi.yml + inline: true + JournalEntryCompany: + discriminated: false + docs: The company the journal entry belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: openapi/openapi.yml + inline: true + JournalEntryTrackingCategoriesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: openapi/openapi.yml + inline: true + JournalEntryAccountingPeriod: + discriminated: false + docs: The accounting period that the JournalEntry was generated in. + union: + - type: string + validation: + format: uuid + - AccountingPeriod + source: + openapi: openapi/openapi.yml + inline: true + JournalEntry: + docs: >- + # The JournalEntry Object + + ### Description + + A `JournalEntry` is a record of a transaction or event that is entered + into a company's accounting system. + + + The `JournalEntry` common model contains records that are automatically + created as a result of a certain type of transaction, like an Invoice, and + records that are manually created against a company’s ledger. + + + The lines of a given `JournalEntry` object should always sum to 0. A + positive `net_amount` means the line represents a debit and a negative + net_amount represents a credit. + + + ### Usage Example + + Fetch from the `GET JournalEntry` endpoint and view a company's journey + entry. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + transaction_date: + type: optional + docs: The journal entry's transaction date. + payments: + type: optional>> + docs: Array of `Payment` object IDs. + applied_payments: + type: optional>> + docs: >- + A list of the Payment Applied to Lines common models related to a + given Invoice, Credit Note, or Journal Entry. + memo: + type: optional + docs: The journal entry's private note. + currency: + type: optional + docs: >- + The journal's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + exchange_rate: + type: optional + docs: The journal entry's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + company: + type: optional + docs: The company the journal entry belongs to. + inclusive_of_tax: + type: optional + docs: >- + If the transaction is inclusive or exclusive of tax. `True` if + inclusive, `False` if exclusive. + lines: + type: optional> + access: read-only + journal_number: + type: optional + docs: Reference number for identifying journal entries. + validation: + maxLength: 70 + tracking_categories: optional>> + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + posting_status: + type: optional + docs: |- + The journal's posting status. + + * `UNPOSTED` - UNPOSTED + * `POSTED` - POSTED + accounting_period: + type: optional + docs: The accounting period that the JournalEntry was generated in. + remote_created_at: + type: optional + docs: When the third party's journal entry was created. + remote_updated_at: + type: optional + docs: When the third party's journal entry was updated. + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + remote_fields: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + JournalEntryRequestPaymentsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Payment + source: + openapi: openapi/openapi.yml + inline: true + JournalEntryRequestCompany: + discriminated: false + docs: The company the journal entry belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: openapi/openapi.yml + inline: true + JournalEntryRequestTrackingCategoriesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: openapi/openapi.yml + inline: true + JournalEntryRequest: + docs: >- + # The JournalEntry Object + + ### Description + + The `JournalEntry` object is used to get a record of all manually created + entries made in a company’s general ledger. The journal line items for + each journal entry should sum to zero. + + + ### Usage Example + + Fetch from the `GET JournalEntry` endpoint and view a company's journey + entry. + properties: + transaction_date: + type: optional + docs: The journal entry's transaction date. + payments: + type: optional>> + docs: Array of `Payment` object IDs. + memo: + type: optional + docs: The journal entry's private note. + currency: + type: optional + docs: >- + The journal's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + exchange_rate: + type: optional + docs: The journal entry's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + company: + type: optional + docs: The company the journal entry belongs to. + tracking_categories: optional>> + inclusive_of_tax: + type: optional + docs: >- + If the transaction is inclusive or exclusive of tax. `True` if + inclusive, `False` if exclusive. + lines: optional> + journal_number: + type: optional + docs: Reference number for identifying journal entries. + validation: + maxLength: 70 + posting_status: + type: optional + docs: |- + The journal's posting status. + + * `UNPOSTED` - UNPOSTED + * `POSTED` - POSTED + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + remote_fields: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + JournalEntryResponse: + properties: + model: JournalEntry + warnings: list + errors: list + logs: optional> + source: + openapi: openapi/openapi.yml + JournalLineAccount: + discriminated: false + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: openapi/openapi.yml + inline: true + JournalLineTrackingCategory: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: openapi/openapi.yml + inline: true + JournalLineTrackingCategoriesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: openapi/openapi.yml + inline: true + JournalLineProject: + discriminated: false + union: + - type: string + validation: + format: uuid + - Project + source: + openapi: openapi/openapi.yml + inline: true + JournalLine: + docs: >- + # The JournalLine Object + + ### Description + + The `JournalLine` object is used to represent a journal entry's line + items. + + + ### Usage Example + + Fetch from the `GET JournalEntry` endpoint and view the journal entry's + line items. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + account: optional + net_amount: + type: optional + docs: The value of the line item including taxes and other fees. + tracking_category: + type: optional + availability: deprecated + tracking_categories: + type: optional>> + docs: The journal line item's associated tracking categories. + currency: + type: optional + docs: >- + The journal line item's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + company: + type: optional + docs: The company the journal entry belongs to. + validation: + format: uuid + employee: + type: optional + validation: + format: uuid + project: optional + contact: + type: optional + validation: + format: uuid + tax_rate: + type: optional + docs: The tax rate that applies to this line item. + validation: + format: uuid + description: + type: optional + docs: The line's description. + exchange_rate: + type: optional + docs: The journal line item's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + remote_fields: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + JournalLineRequestAccount: + discriminated: false + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: openapi/openapi.yml + inline: true + JournalLineRequestTrackingCategory: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: openapi/openapi.yml + inline: true + JournalLineRequestTrackingCategoriesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: openapi/openapi.yml + inline: true + JournalLineRequestProject: + discriminated: false + union: + - type: string + validation: + format: uuid + - Project + source: + openapi: openapi/openapi.yml + inline: true + JournalLineRequest: + docs: >- + # The JournalLine Object + + ### Description + + The `JournalLine` object is used to represent a journal entry's line + items. + + + ### Usage Example + + Fetch from the `GET JournalEntry` endpoint and view the journal entry's + line items. + properties: + remote_id: + type: optional + docs: The third-party API ID of the matching object. + account: optional + net_amount: + type: optional + docs: The value of the line item including taxes and other fees. + tracking_category: + type: optional + availability: deprecated + tracking_categories: + type: optional>> + docs: The journal line item's associated tracking categories. + currency: + type: optional + docs: >- + The journal line item's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + company: + type: optional + docs: The company the journal entry belongs to. + validation: + format: uuid + employee: + type: optional + validation: + format: uuid + project: optional + contact: + type: optional + validation: + format: uuid + tax_rate: + type: optional + docs: The tax rate that applies to this line item. + validation: + format: uuid + description: + type: optional + docs: The line's description. + exchange_rate: + type: optional + docs: The journal line item's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + remote_fields: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + LanguageEnum: + enum: + - en + - de + docs: |- + * `en` - en + * `de` - de + source: + openapi: openapi/openapi.yml + LastSyncResultEnum: + enum: + - SYNCING + - DONE + - FAILED + - DISABLED + - PAUSED + - PARTIALLY_SYNCED + docs: |- + * `SYNCING` - SYNCING + * `DONE` - DONE + * `FAILED` - FAILED + * `DISABLED` - DISABLED + * `PAUSED` - PAUSED + * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED + source: + openapi: openapi/openapi.yml + LinkToken: + properties: + link_token: string + integration_name: optional + magic_link_url: optional + source: + openapi: openapi/openapi.yml + LinkedAccountStatus: + properties: + linked_account_status: string + can_make_request: boolean + source: + openapi: openapi/openapi.yml + MetaResponse: + properties: + request_schema: map + remote_field_classes: optional> + status: optional + has_conditional_params: boolean + has_required_linked_account_params: boolean + source: + openapi: openapi/openapi.yml + MethodEnum: + enum: + - GET + - OPTIONS + - HEAD + - POST + - PUT + - PATCH + - DELETE + docs: |- + * `GET` - GET + * `OPTIONS` - OPTIONS + * `HEAD` - HEAD + * `POST` - POST + * `PUT` - PUT + * `PATCH` - PATCH + * `DELETE` - DELETE + source: + openapi: openapi/openapi.yml + MethodTypeEnum: + enum: + - CREDIT_CARD + - DEBIT_CARD + - ACH + - CASH + - CHECK + docs: |- + * `CREDIT_CARD` - CREDIT_CARD + * `DEBIT_CARD` - DEBIT_CARD + * `ACH` - ACH + * `CASH` - CASH + * `CHECK` - CHECK + source: + openapi: openapi/openapi.yml + ModelOperation: + docs: >- + # The ModelOperation Object + + ### Description + + The `ModelOperation` object is used to represent the operations that are + currently supported for a given model. + + + ### Usage Example + + View what operations are supported for the `Candidate` endpoint. + properties: + model_name: string + available_operations: list + required_post_parameters: list + supported_fields: list + source: + openapi: openapi/openapi.yml + ModelPermissionDeserializer: + properties: + is_enabled: optional + source: + openapi: openapi/openapi.yml + ModelPermissionDeserializerRequest: + properties: + is_enabled: optional + source: + openapi: openapi/openapi.yml + MultipartFormFieldRequest: + docs: >- + # The MultipartFormField Object + + ### Description + + The `MultipartFormField` object is used to represent fields in an HTTP + request using `multipart/form-data`. + + + ### Usage Example + + Create a `MultipartFormField` to define a multipart form entry. + properties: + name: + type: string + docs: The name of the form field + validation: + minLength: 1 + data: + type: string + docs: The data for the form field. + validation: + minLength: 1 + encoding: + type: optional + docs: |- + The encoding of the value of `data`. Defaults to `RAW` if not defined. + + * `RAW` - RAW + * `BASE64` - BASE64 + * `GZIP_BASE64` - GZIP_BASE64 + file_name: + type: optional + docs: The file name of the form field, if the field is for a file. + validation: + minLength: 1 + content_type: + type: optional + docs: The MIME type of the file, if the field is for a file. + validation: + minLength: 1 + source: + openapi: openapi/openapi.yml + PaginatedAccountDetailsAndActionsList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedAccountList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedAccountingAttachmentList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedAccountingPeriodList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedAuditLogEventList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedBalanceSheetList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedBankFeedAccountList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedBankFeedTransactionList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedCashFlowStatementList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedCompanyInfoList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedContactList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedCreditNoteList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedEmployeeList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedExpenseList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedGeneralLedgerTransactionList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedIncomeStatementList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedInvoiceList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedIssueList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedItemList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedJournalEntryList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedPaymentList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedPaymentMethodList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedPaymentTermList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedProjectList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedPurchaseOrderList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedRemoteFieldClassList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedSyncStatusList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedTaxRateList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedTrackingCategoryList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedTransactionList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedVendorCreditList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PatchedItemRequestRequest: + docs: |- + # The Item Object + ### Description + The `Item` object refers to the goods involved in a transaction. + + ### Usage Example + Fetch from the `LIST Items` endpoint and view a company's items. + properties: + name: + type: optional + docs: The item's name. + status: + type: optional + docs: |- + The item's status. + + * `ACTIVE` - ACTIVE + * `ARCHIVED` - ARCHIVED + type: + type: optional + docs: |- + The item's type. + + * `INVENTORY` - INVENTORY + * `NON_INVENTORY` - NON_INVENTORY + * `SERVICE` - SERVICE + * `UNKNOWN` - UNKNOWN + unit_price: + type: optional + docs: The item's unit price. + purchase_price: + type: optional + docs: The price at which the item is purchased from a vendor. + purchase_account: + type: optional + docs: References the default account used to record a purchase of the item. + validation: + format: uuid + sales_account: + type: optional + docs: References the default account used to record a sale. + validation: + format: uuid + company: + type: optional + docs: The company the item belongs to. + validation: + format: uuid + purchase_tax_rate: + type: optional + docs: The default purchase tax rate for this item. + validation: + format: uuid + sales_tax_rate: + type: optional + docs: The default sales tax rate for this item. + validation: + format: uuid + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + PatchedPaymentRequestContact: + discriminated: false + docs: The supplier, or customer involved in the payment. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: openapi/openapi.yml + inline: true + PatchedPaymentRequestAccount: + discriminated: false + docs: The supplier’s or customer’s account in which the payment is made. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: openapi/openapi.yml + inline: true + PatchedPaymentRequestPaymentMethod: + discriminated: false + docs: The method which this payment was made by. + union: + - type: string + validation: + format: uuid + - PaymentMethod + source: + openapi: openapi/openapi.yml + inline: true + PatchedPaymentRequestCompany: + discriminated: false + docs: The company the payment belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: openapi/openapi.yml + inline: true + PatchedPaymentRequestTrackingCategoriesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: openapi/openapi.yml + inline: true + PatchedPaymentRequestAccountingPeriod: + discriminated: false + docs: The accounting period that the Payment was generated in. + union: + - type: string + validation: + format: uuid + - AccountingPeriod + source: + openapi: openapi/openapi.yml + inline: true + PatchedPaymentRequestAppliedToLinesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - PaymentLineItemRequest + source: + openapi: openapi/openapi.yml + inline: true + PatchedPaymentRequest: + docs: >- + # 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. + properties: + transaction_date: + type: optional + docs: The payment's transaction date. + contact: + type: optional + docs: The supplier, or customer involved in the payment. + account: + type: optional + docs: The supplier’s or customer’s account in which the payment is made. + payment_method: + type: optional + docs: The method which this payment was made by. + currency: + type: optional + docs: >- + The payment's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + exchange_rate: + type: optional + docs: The payment's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + company: + type: optional + docs: The company the payment belongs to. + total_amount: + type: optional + docs: >- + The total amount of money being paid to the supplier, or customer, + after taxes. + type: + type: optional + docs: |- + The type of the invoice. + + * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE + * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE + tracking_categories: optional>> + accounting_period: + type: optional + docs: The accounting period that the Payment was generated in. + applied_to_lines: + type: optional> + docs: A list of “Payment Applied to Lines” objects. + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + remote_fields: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + PaymentContact: + discriminated: false + docs: The supplier, or customer involved in the payment. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: openapi/openapi.yml + inline: true + PaymentAccount: + discriminated: false + docs: The supplier’s or customer’s account in which the payment is made. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: openapi/openapi.yml + inline: true + PaymentPaymentMethod: + discriminated: false + docs: The method which this payment was made by. + union: + - type: string + validation: + format: uuid + - PaymentMethod + source: + openapi: openapi/openapi.yml + inline: true + PaymentCompany: + discriminated: false + docs: The company the payment belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: openapi/openapi.yml + inline: true + PaymentTrackingCategoriesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: openapi/openapi.yml + inline: true + PaymentAccountingPeriod: + discriminated: false + docs: The accounting period that the Payment was generated in. + union: + - type: string + validation: + format: uuid + - AccountingPeriod + source: + openapi: openapi/openapi.yml + inline: true + PaymentAppliedToLinesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - PaymentLineItem + source: + openapi: openapi/openapi.yml + inline: true + Payment: + docs: >- + # 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. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + transaction_date: + type: optional + docs: The payment's transaction date. + contact: + type: optional + docs: The supplier, or customer involved in the payment. + account: + type: optional + docs: The supplier’s or customer’s account in which the payment is made. + payment_method: + type: optional + docs: The method which this payment was made by. + currency: + type: optional + docs: >- + The payment's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + exchange_rate: + type: optional + docs: The payment's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + company: + type: optional + docs: The company the payment belongs to. + total_amount: + type: optional + docs: >- + The total amount of money being paid to the supplier, or customer, + after taxes. + type: + type: optional + docs: |- + The type of the invoice. + + * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE + * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE + tracking_categories: optional>> + accounting_period: + type: optional + docs: The accounting period that the Payment was generated in. + applied_to_lines: + type: optional> + docs: A list of “Payment Applied to Lines” objects. + remote_updated_at: + type: optional + docs: When the third party's payment entry was updated. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + remote_fields: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + PaymentLineItem: + docs: >- + # The PaymentLineItem Object + + ### Description + + The `PaymentLineItem` object is an applied-to-line on a `Payment` that can + either be a `Invoice`, `CreditNote`, or `JournalEntry`. + + + ### Usage Example + + `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`. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + applied_amount: + type: optional + docs: The amount being applied to the transaction. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + applied_date: + type: optional + docs: The date the payment portion is applied. + related_object_id: + type: optional + docs: >- + The Merge ID of the transaction the payment portion is being applied + to. + validation: + format: uuid + related_object_type: + type: optional + docs: >- + The type of transaction the payment portion is being applied to. + Possible values include: INVOICE, JOURNAL_ENTRY, or CREDIT_NOTE. + source: + openapi: openapi/openapi.yml + PaymentLineItemRequest: + docs: >- + # The PaymentLineItem Object + + ### Description + + The `PaymentLineItem` object is an applied-to-line on a `Payment` that can + either be a `Invoice`, `CreditNote`, or `JournalEntry`. + + + ### Usage Example + + `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`. + properties: + remote_id: + type: optional + docs: The third-party API ID of the matching object. + applied_amount: + type: optional + docs: The amount being applied to the transaction. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + applied_date: + type: optional + docs: The date the payment portion is applied. + related_object_id: + type: optional + docs: >- + The Merge ID of the transaction the payment portion is being applied + to. + validation: + format: uuid + related_object_type: + type: optional + docs: >- + The type of transaction the payment portion is being applied to. + Possible values include: INVOICE, JOURNAL_ENTRY, or CREDIT_NOTE. + validation: + minLength: 1 + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + remote_fields: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + PaymentMethod: + docs: >- + # The PaymentMethod Object + + ### Description + + The `PaymentMethod` object defines how a payment against an invoice is + made. + + + ### Usage Example + + Fetch from the `GET PaymentMethod` endpoint and view payment method + information. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + method_type: + type: MethodTypeEnum + docs: |- + The type of the payment method. + + * `CREDIT_CARD` - CREDIT_CARD + * `DEBIT_CARD` - DEBIT_CARD + * `ACH` - ACH + * `CASH` - CASH + * `CHECK` - CHECK + name: + type: string + docs: The payment method’s name + validation: + maxLength: 255 + is_active: + type: optional + docs: '`True` if the payment method is active, `False` if not.' + remote_updated_at: + type: optional + docs: When the third party's payment method was updated. + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + PaymentRequestContact: + discriminated: false + docs: The supplier, or customer involved in the payment. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: openapi/openapi.yml + inline: true + PaymentRequestAccount: + discriminated: false + docs: The supplier’s or customer’s account in which the payment is made. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: openapi/openapi.yml + inline: true + PaymentRequestPaymentMethod: + discriminated: false + docs: The method which this payment was made by. + union: + - type: string + validation: + format: uuid + - PaymentMethod + source: + openapi: openapi/openapi.yml + inline: true + PaymentRequestCompany: + discriminated: false + docs: The company the payment belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: openapi/openapi.yml + inline: true + PaymentRequestTrackingCategoriesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: openapi/openapi.yml + inline: true + PaymentRequestAccountingPeriod: + discriminated: false + docs: The accounting period that the Payment was generated in. + union: + - type: string + validation: + format: uuid + - AccountingPeriod + source: + openapi: openapi/openapi.yml + inline: true + PaymentRequestAppliedToLinesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - PaymentLineItemRequest + source: + openapi: openapi/openapi.yml + inline: true + PaymentRequest: + docs: >- + # 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. + properties: + transaction_date: + type: optional + docs: The payment's transaction date. + contact: + type: optional + docs: The supplier, or customer involved in the payment. + account: + type: optional + docs: The supplier’s or customer’s account in which the payment is made. + payment_method: + type: optional + docs: The method which this payment was made by. + currency: + type: optional + docs: >- + The payment's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + exchange_rate: + type: optional + docs: The payment's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + company: + type: optional + docs: The company the payment belongs to. + total_amount: + type: optional + docs: >- + The total amount of money being paid to the supplier, or customer, + after taxes. + type: + type: optional + docs: |- + The type of the invoice. + + * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE + * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE + tracking_categories: optional>> + accounting_period: + type: optional + docs: The accounting period that the Payment was generated in. + applied_to_lines: + type: optional> + docs: A list of “Payment Applied to Lines” objects. + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + remote_fields: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + PaymentResponse: + properties: + model: Payment + warnings: list + errors: list + logs: optional> + source: + openapi: openapi/openapi.yml + PaymentTermCompany: + discriminated: false + docs: The subsidiary that the payment term belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: openapi/openapi.yml + inline: true + PaymentTerm: + docs: >- + # The PaymentTerm Object + + ### Description + + The `PaymentTerm` object is the agreed-upon conditions between a buyer and + a seller that define the timing, + + amount, and conditions under which payment for goods or services must be + made. + + + ### Usage Example + + Fetch from the `GET PaymentTerm` endpoint and view payment term + information. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: string + docs: The name of the payment term. + validation: + maxLength: 255 + is_active: + type: optional + docs: '`True` if the payment term is active, `False` if not.' + company: + type: optional + docs: The subsidiary that the payment term belongs to. + days_until_due: + type: optional + docs: The number of days after the invoice date that payment is due. + validation: + min: -2147483648 + max: 2147483647 + discount_days: + type: optional + docs: The number of days the invoice must be paid before discounts expire. + validation: + min: -2147483648 + max: 2147483647 + remote_last_modified_at: + type: optional + docs: When the third party's payment term was modified. + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + PaymentTypeEnum: + enum: + - ACCOUNTS_PAYABLE + - ACCOUNTS_RECEIVABLE + docs: |- + * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE + * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE + source: + openapi: openapi/openapi.yml + PostingStatusEnum: + enum: + - UNPOSTED + - POSTED + docs: |- + * `UNPOSTED` - UNPOSTED + * `POSTED` - POSTED + source: + openapi: openapi/openapi.yml + ProjectCompany: + discriminated: false + docs: The subsidiary that the project belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: openapi/openapi.yml + inline: true + ProjectContact: + discriminated: false + docs: The supplier, or customer involved in the project. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: openapi/openapi.yml + inline: true + Project: + docs: >- + # The Project Object + + ### Description + + The `Project` object is used to track and manage time, costs, resources, + and revenue for specific initiatives or work efforts. + + It provides classification on transactions for allocating expenses, + revenue, and activities to a specific project for financial reporting. + + + ### Usage Example + + Fetch from the `GET Project` endpoint and view project information. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: string + docs: The project’s name + validation: + maxLength: 255 + is_active: + type: optional + docs: '`True` if the project is active, `False` if the project is not active.' + company: + type: optional + docs: The subsidiary that the project belongs to. + contact: + type: optional + docs: The supplier, or customer involved in the project. + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + PurchaseOrderDeliveryAddress: + discriminated: false + docs: The purchase order's delivery address. + union: + - type: string + validation: + format: uuid + - Address + source: + openapi: openapi/openapi.yml + inline: true + PurchaseOrderVendor: + discriminated: false + docs: The party fulfilling the purchase order. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: openapi/openapi.yml + inline: true + PurchaseOrderCompany: + discriminated: false + docs: The company the purchase order belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: openapi/openapi.yml + inline: true + PurchaseOrderPaymentTerm: + discriminated: false + docs: The payment term that applies to this transaction. + union: + - type: string + validation: + format: uuid + - PaymentTerm + source: + openapi: openapi/openapi.yml + inline: true + PurchaseOrderTrackingCategoriesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: openapi/openapi.yml + inline: true + PurchaseOrderAccountingPeriod: + discriminated: false + docs: The accounting period that the PurchaseOrder was generated in. + union: + - type: string + validation: + format: uuid + - AccountingPeriod + source: + openapi: openapi/openapi.yml + inline: true + PurchaseOrder: + docs: >- + # The PurchaseOrder Object + + ### Description + + A `PurchaseOrder` represents a request to purchase goods or services from + a vendor. It outlines the details of the purchase, such as the items or + services requested, quantities, prices, and delivery details. + + + A `PurchaseOrder` is a crucial component of the procurement process, but + does not typically result in any impact on the company’s general ledger. + The general ledger is typically only affected when the `PurchaseOrder` is + fulfilled as an *Accounts Payable* `Invoice` object (also known as a + Bill). + + + ### Usage Example + + Fetch from the `LIST PurchaseOrders` endpoint and view a company's + purchase orders. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + status: + type: optional + docs: |- + The purchase order's status. + + * `DRAFT` - DRAFT + * `SUBMITTED` - SUBMITTED + * `AUTHORIZED` - AUTHORIZED + * `BILLED` - BILLED + * `DELETED` - DELETED + issue_date: + type: optional + docs: The purchase order's issue date. + purchase_order_number: + type: optional + docs: The human-readable number of the purchase order. + validation: + maxLength: 100 + delivery_date: + type: optional + docs: The purchase order's delivery date. + delivery_address: + type: optional + docs: The purchase order's delivery address. + customer: + type: optional + docs: The contact making the purchase order. + validation: + format: uuid + vendor: + type: optional + docs: The party fulfilling the purchase order. + memo: + type: optional + docs: A memo attached to the purchase order. + company: + type: optional + docs: The company the purchase order belongs to. + total_amount: + type: optional + docs: The purchase order's total amount. + currency: + type: optional + docs: >- + The purchase order's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + exchange_rate: + type: optional + docs: The purchase order's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + payment_term: + type: optional + docs: The payment term that applies to this transaction. + line_items: + type: optional> + access: read-only + inclusive_of_tax: + type: optional + docs: >- + If the transaction is inclusive or exclusive of tax. `True` if + inclusive, `False` if exclusive. + tracking_categories: optional>> + accounting_period: + type: optional + docs: The accounting period that the PurchaseOrder was generated in. + remote_created_at: + type: optional + docs: When the third party's purchase order note was created. + remote_updated_at: + type: optional + docs: When the third party's purchase order note was updated. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + remote_fields: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + PurchaseOrderLineItemItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Item + source: + openapi: openapi/openapi.yml + inline: true + PurchaseOrderLineItem: + docs: >- + # The PurchaseOrderLineItem Object + + ### Description + + The `PurchaseOrderLineItem` object is used to represent a purchase order's + line item. + + + ### Usage Example + + Fetch from the `GET PurchaseOrder` endpoint and view a company's purchase + orders. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + description: + type: optional + docs: A description of the good being purchased. + unit_price: + type: optional + docs: The line item's unit price. + quantity: + type: optional + docs: The line item's quantity. + item: optional + account: + type: optional + docs: The purchase order line item's account. + validation: + format: uuid + tracking_category: + type: optional + docs: The purchase order line item's associated tracking category. + validation: + format: uuid + availability: deprecated + tracking_categories: + type: optional>> + docs: The purchase order line item's associated tracking categories. + tax_amount: + type: optional + docs: The purchase order line item's tax amount. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + total_line_amount: + type: optional + docs: The purchase order line item's total amount. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + currency: + type: optional + docs: >- + The purchase order line item's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + tax_rate: + type: optional + docs: The tax rate that applies to this line item. + validation: + format: uuid + exchange_rate: + type: optional + docs: The purchase order line item's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + company: + type: optional + docs: The company the purchase order line item belongs to. + validation: + format: uuid + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + remote_fields: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + PurchaseOrderLineItemRequestItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Item + source: + openapi: openapi/openapi.yml + inline: true + PurchaseOrderLineItemRequest: + docs: >- + # The PurchaseOrderLineItem Object + + ### Description + + The `PurchaseOrderLineItem` object is used to represent a purchase order's + line item. + + + ### Usage Example + + Fetch from the `GET PurchaseOrder` endpoint and view a company's purchase + orders. + properties: + remote_id: + type: optional + docs: The third-party API ID of the matching object. + description: + type: optional + docs: A description of the good being purchased. + unit_price: + type: optional + docs: The line item's unit price. + quantity: + type: optional + docs: The line item's quantity. + item: optional + account: + type: optional + docs: The purchase order line item's account. + validation: + format: uuid + tracking_category: + type: optional + docs: The purchase order line item's associated tracking category. + validation: + format: uuid + availability: deprecated + tracking_categories: + type: optional>> + docs: The purchase order line item's associated tracking categories. + tax_amount: + type: optional + docs: The purchase order line item's tax amount. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + total_line_amount: + type: optional + docs: The purchase order line item's total amount. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + currency: + type: optional + docs: >- + The purchase order line item's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + tax_rate: + type: optional + docs: The tax rate that applies to this line item. + validation: + format: uuid + exchange_rate: + type: optional + docs: The purchase order line item's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + company: + type: optional + docs: The company the purchase order line item belongs to. + validation: + format: uuid + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + remote_fields: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + PurchaseOrderRequestDeliveryAddress: + discriminated: false + docs: The purchase order's delivery address. + union: + - type: string + validation: + format: uuid + - Address + source: + openapi: openapi/openapi.yml + inline: true + PurchaseOrderRequestVendor: + discriminated: false + docs: The party fulfilling the purchase order. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: openapi/openapi.yml + inline: true + PurchaseOrderRequestCompany: + discriminated: false + docs: The company the purchase order belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: openapi/openapi.yml + inline: true + PurchaseOrderRequestPaymentTerm: + discriminated: false + docs: The payment term that applies to this transaction. + union: + - type: string + validation: + format: uuid + - PaymentTerm + source: + openapi: openapi/openapi.yml + inline: true + PurchaseOrderRequestTrackingCategoriesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: openapi/openapi.yml + inline: true + PurchaseOrderRequest: + docs: >- + # The PurchaseOrder Object + + ### Description + + The `PurchaseOrder` object is a record of request for a product or service + between a buyer and seller. + + + ### Usage Example + + Fetch from the `LIST PurchaseOrders` endpoint and view a company's + purchase orders. + properties: + status: + type: optional + docs: |- + The purchase order's status. + + * `DRAFT` - DRAFT + * `SUBMITTED` - SUBMITTED + * `AUTHORIZED` - AUTHORIZED + * `BILLED` - BILLED + * `DELETED` - DELETED + issue_date: + type: optional + docs: The purchase order's issue date. + delivery_date: + type: optional + docs: The purchase order's delivery date. + delivery_address: + type: optional + docs: The purchase order's delivery address. + customer: + type: optional + docs: The contact making the purchase order. + validation: + format: uuid + vendor: + type: optional + docs: The party fulfilling the purchase order. + memo: + type: optional + docs: A memo attached to the purchase order. + company: + type: optional + docs: The company the purchase order belongs to. + total_amount: + type: optional + docs: The purchase order's total amount. + payment_term: + type: optional + docs: The payment term that applies to this transaction. + currency: + type: optional + docs: >- + The purchase order's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + inclusive_of_tax: + type: optional + docs: >- + If the transaction is inclusive or exclusive of tax. `True` if + inclusive, `False` if exclusive. + exchange_rate: + type: optional + docs: The purchase order's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + tracking_categories: optional>> + line_items: optional> + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + remote_fields: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + PurchaseOrderResponse: + properties: + model: PurchaseOrder + warnings: list + errors: list + logs: optional> + source: + openapi: openapi/openapi.yml + PurchaseOrderStatusEnum: + enum: + - DRAFT + - SUBMITTED + - AUTHORIZED + - BILLED + - DELETED + docs: |- + * `DRAFT` - DRAFT + * `SUBMITTED` - SUBMITTED + * `AUTHORIZED` - AUTHORIZED + * `BILLED` - BILLED + * `DELETED` - DELETED + source: + openapi: openapi/openapi.yml + RemoteData: + docs: >- + # The RemoteData Object + + ### Description + + The `RemoteData` object is used to represent the full data pulled from the + third-party API for an object. + + + ### Usage Example + + TODO + properties: + path: + type: string + docs: The third-party API path that is being called. + data: + type: optional + access: read-only + source: + openapi: openapi/openapi.yml + RemoteEndpointInfo: + properties: + method: string + url_path: string + field_traversal_path: list + source: + openapi: openapi/openapi.yml + RemoteFieldRemoteFieldClass: + discriminated: false + union: + - string + - RemoteFieldClass + source: + openapi: openapi/openapi.yml + inline: true + RemoteField: + properties: + remote_field_class: RemoteFieldRemoteFieldClass + value: optional + source: + openapi: openapi/openapi.yml + RemoteFieldApiCoverage: + discriminated: false + union: + - integer + - double + source: + openapi: openapi/openapi.yml + inline: true + RemoteFieldApi: + properties: + schema: map + remote_key_name: string + remote_endpoint_info: RemoteEndpointInfo + example_values: optional> + advanced_metadata: optional + coverage: + type: optional + access: read-only + source: + openapi: openapi/openapi.yml + RemoteFieldApiResponse: + properties: + Account: optional> + AccountingAttachment: optional> + BalanceSheet: optional> + CashFlowStatement: optional> + CompanyInfo: optional> + Contact: optional> + IncomeStatement: optional> + CreditNote: optional> + Item: optional> + PurchaseOrder: optional> + TrackingCategory: optional> + JournalEntry: optional> + TaxRate: optional> + Invoice: optional> + Payment: optional> + Expense: optional> + VendorCredit: optional> + Transaction: optional> + AccountingPeriod: optional> + GeneralLedgerTransaction: optional> + BankFeedAccount: optional> + Employee: optional> + PaymentMethod: optional> + Project: optional> + PaymentTerm: optional> + source: + openapi: openapi/openapi.yml + RemoteFieldClass: + properties: + id: optional + display_name: optional + remote_key_name: optional + description: optional + is_custom: optional + is_required: optional + field_type: optional + field_format: optional + field_choices: optional> + item_schema: optional + source: + openapi: openapi/openapi.yml + RemoteFieldRequestRemoteFieldClass: + discriminated: false + union: + - type: string + validation: + format: uuid + - RemoteFieldClass + source: + openapi: openapi/openapi.yml + inline: true + RemoteFieldRequest: + properties: + remote_field_class: RemoteFieldRequestRemoteFieldClass + value: optional + source: + openapi: openapi/openapi.yml + RemoteKey: + docs: >- + # The RemoteKey Object + + ### Description + + The `RemoteKey` object is used to represent a request for a new remote + key. + + + ### Usage Example + + Post a `GenerateRemoteKey` to receive a new `RemoteKey`. + properties: + name: string + key: string + source: + openapi: openapi/openapi.yml + RemoteResponse: + docs: >- + # The RemoteResponse Object + + ### Description + + The `RemoteResponse` object is used to represent information returned from + a third-party endpoint. + + + ### Usage Example + + View the `RemoteResponse` returned from your `DataPassthrough`. + properties: + method: string + path: string + status: integer + response: unknown + response_headers: optional> + response_type: optional + headers: optional> + source: + openapi: openapi/openapi.yml + ReportItem: + docs: >- + # The ReportItem Object + + ### Description + + The `ReportItem` object is used to represent a report item for a Balance + Sheet, Cash Flow Statement or Profit and Loss Report. + + + ### Usage Example + + Fetch from the `GET BalanceSheet` endpoint and view the balance sheet's + report items. + properties: + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The report item's name. + value: + type: optional + docs: The report item's value. + sub_items: + type: optional>> + access: read-only + company: + type: optional + docs: The company the report item belongs to. + validation: + format: uuid + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + source: + openapi: openapi/openapi.yml + RequestFormatEnum: + enum: + - JSON + - XML + - MULTIPART + docs: |- + * `JSON` - JSON + * `XML` - XML + * `MULTIPART` - MULTIPART + source: + openapi: openapi/openapi.yml + ResponseTypeEnum: + enum: + - JSON + - BASE64_GZIP + docs: |- + * `JSON` - JSON + * `BASE64_GZIP` - BASE64_GZIP + source: + openapi: openapi/openapi.yml + RoleEnum: + enum: + - ADMIN + - DEVELOPER + - MEMBER + - API + - SYSTEM + - MERGE_TEAM + docs: |- + * `ADMIN` - ADMIN + * `DEVELOPER` - DEVELOPER + * `MEMBER` - MEMBER + * `API` - API + * `SYSTEM` - SYSTEM + * `MERGE_TEAM` - MERGE_TEAM + source: + openapi: openapi/openapi.yml + SelectiveSyncConfigurationsUsageEnum: + enum: + - IN_NEXT_SYNC + - IN_LAST_SYNC + docs: |- + * `IN_NEXT_SYNC` - IN_NEXT_SYNC + * `IN_LAST_SYNC` - IN_LAST_SYNC + source: + openapi: openapi/openapi.yml + Status7D1Enum: + enum: + - ACTIVE + - ARCHIVED + docs: |- + * `ACTIVE` - ACTIVE + * `ARCHIVED` - ARCHIVED + source: + openapi: openapi/openapi.yml + Status895Enum: + enum: + - ACTIVE + - INACTIVE + docs: |- + * `ACTIVE` - ACTIVE + * `INACTIVE` - INACTIVE + source: + openapi: openapi/openapi.yml + StatusFd5Enum: + enum: + - SYNCING + - DONE + - FAILED + - DISABLED + - PAUSED + - PARTIALLY_SYNCED + docs: |- + * `SYNCING` - SYNCING + * `DONE` - DONE + * `FAILED` - FAILED + * `DISABLED` - DISABLED + * `PAUSED` - PAUSED + * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED + source: + openapi: openapi/openapi.yml + SyncStatus: + docs: >- + # The SyncStatus Object + + ### Description + + The `SyncStatus` object is used to represent the syncing state of an + account + + + ### Usage Example + + View the `SyncStatus` for an account to see how recently its models were + synced. + properties: + model_name: string + model_id: string + last_sync_start: optional + next_sync_start: optional + last_sync_result: optional + last_sync_finished: optional + status: StatusFd5Enum + is_initial_sync: boolean + selective_sync_configurations_usage: optional + source: + openapi: openapi/openapi.yml + TaxComponent: + docs: >- + # The TaxRate Object + + ### Description + + The `TaxComponent` object is used to represent any sub-taxes that make up + the `TaxRate`. + + + ### Usage Example + + Fetch from the `LIST TaxRates` endpoint and view tax components relevant + to a tax rate. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The tax rate’s name. + validation: + maxLength: 100 + rate: + type: optional + docs: The tax component’s rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + is_compound: + type: optional + docs: Returns True if the tax component is compound, False if not. + component_type: + type: optional + docs: >- + Returns PURCHASE if the tax component corresponds to a purchase tax or + SALES if the tax component corresponds to a sales tax. + + + * `SALES` - SALES + + * `PURCHASE` - PURCHASE + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + source: + openapi: openapi/openapi.yml + TaxRateCompany: + discriminated: false + docs: >- + The subsidiary that the tax rate belongs to (in the case of multi-entity + systems). + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: openapi/openapi.yml + inline: true + TaxRateTaxComponentsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - TaxComponent + source: + openapi: openapi/openapi.yml + inline: true + TaxRate: + docs: >- + # The TaxRate Object + + ### Description + + The `TaxRate` object is used to represent a tax rate. + + + ### Usage Example + + Fetch from the `LIST TaxRates` endpoint and view tax rates relevant to a + company. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + company: + type: optional + docs: >- + The subsidiary that the tax rate belongs to (in the case of + multi-entity systems). + code: + type: optional + docs: >- + The tax code associated with this tax rate or group of tax rates from + the third-party platform. + validation: + maxLength: 100 + name: + type: optional + docs: The tax rate’s name. + validation: + maxLength: 100 + description: + type: optional + docs: The tax rate's description. + status: + type: optional + docs: >- + The tax rate’s status - `ACTIVE` if an active tax rate, `ARCHIVED` if + not active. + + + * `ACTIVE` - ACTIVE + + * `ARCHIVED` - ARCHIVED + country: + type: optional + docs: The country the tax rate is associated with. + validation: + maxLength: 100 + total_tax_rate: + type: optional + docs: The tax’s total tax rate - sum of the tax components (not compounded). + effective_tax_rate: + type: optional + docs: >- + The tax rate’s effective tax rate - total amount of tax with + compounding. + tax_components: + type: optional> + docs: The related tax components of the tax rate. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + TrackingCategoryCompany: + discriminated: false + docs: The company the GeneralLedgerTransaction belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: openapi/openapi.yml + inline: true + TrackingCategory: + docs: >- + # The TrackingCategory Object + + ### Description + + A `TrackingCategory` object represents a categorization method used to + classify transactions within an accounting platform. They are often used + to group records for reporting and analysis purposes. The most common + types of `TrackingCategories` are Classes and Departments. + + + ### Usage Example + + Fetch from the `GET TrackingCategory` endpoint and view a company's + tracking category. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The tracking category's name. + status: + type: optional + docs: |- + The tracking category's status. + + * `ACTIVE` - ACTIVE + * `ARCHIVED` - ARCHIVED + category_type: + type: optional + docs: |- + The tracking category’s type. + + * `CLASS` - CLASS + * `DEPARTMENT` - DEPARTMENT + parent_category: + type: optional + validation: + format: uuid + company: + type: optional + docs: The company the GeneralLedgerTransaction belongs to. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + TransactionAccount: + discriminated: false + docs: The transaction's account. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: openapi/openapi.yml + inline: true + TransactionContact: + discriminated: false + docs: The contact to whom the transaction relates to. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: openapi/openapi.yml + inline: true + TransactionTrackingCategoriesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: openapi/openapi.yml + inline: true + TransactionAccountingPeriod: + discriminated: false + docs: The accounting period that the Transaction was generated in. + union: + - type: string + validation: + format: uuid + - AccountingPeriod + source: + openapi: openapi/openapi.yml + inline: true + Transaction: + docs: >- + # The Transaction Object + + ### Description + + The `Transaction` common model includes records of all types of + transactions that do not appear in other common models. The type of + transaction can be identified through the type field. More specifically, + it will contain all types of transactions outside of: + + * __Credit Notes__ + + * __Expenses__ + + * __Invoices__ + + * __Journal Entries__ + + * __Payments__ + + * __Purchase Orders__ + + * __Vendor Credits__ + + + ### Usage Example + + Fetch from the `GET Transaction` endpoint and view a company's + transactions. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + transaction_type: + type: optional + docs: >- + The type of transaction, which can by any transaction object not + already included in Merge’s common model. + number: + type: optional + docs: The transaction's number used for identifying purposes. + transaction_date: + type: optional + docs: The date upon which the transaction occurred. + account: + type: optional + docs: The transaction's account. + contact: + type: optional + docs: The contact to whom the transaction relates to. + inclusive_of_tax: + type: optional + docs: >- + If the transaction is inclusive or exclusive of tax. `True` if + inclusive, `False` if exclusive. + total_amount: + type: optional + docs: The total amount being paid after taxes. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + currency: + type: optional + docs: >- + The transaction's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + exchange_rate: + type: optional + docs: The transaction's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + company: + type: optional + docs: The company the transaction belongs to. + validation: + format: uuid + tracking_categories: optional>> + line_items: + type: optional> + access: read-only + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + accounting_period: + type: optional + docs: The accounting period that the Transaction was generated in. + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + TransactionCurrencyEnum: + enum: + - XUA + - AFN + - AFA + - ALL + - ALK + - DZD + - ADP + - AOA + - AOK + - AON + - AOR + - ARA + - ARS + - ARM + - ARP + - ARL + - AMD + - AWG + - AUD + - ATS + - AZN + - AZM + - BSD + - BHD + - BDT + - BBD + - BYN + - BYB + - BYR + - BEF + - BEC + - BEL + - BZD + - BMD + - BTN + - BOB + - BOL + - BOV + - BOP + - BAM + - BAD + - BAN + - BWP + - BRC + - BRZ + - BRE + - BRR + - BRN + - BRB + - BRL + - GBP + - BND + - BGL + - BGN + - BGO + - BGM + - BUK + - BIF + - XPF + - KHR + - CAD + - CVE + - KYD + - XAF + - CLE + - CLP + - CLF + - CNX + - CNY + - CNH + - COP + - COU + - KMF + - CDF + - CRC + - HRD + - HRK + - CUC + - CUP + - CYP + - CZK + - CSK + - DKK + - DJF + - DOP + - NLG + - XCD + - DDM + - ECS + - ECV + - EGP + - GQE + - ERN + - EEK + - ETB + - EUR + - XBA + - XEU + - XBB + - XBC + - XBD + - FKP + - FJD + - FIM + - FRF + - XFO + - XFU + - GMD + - GEK + - GEL + - DEM + - GHS + - GHC + - GIP + - XAU + - GRD + - GTQ + - GWP + - GNF + - GNS + - GYD + - HTG + - HNL + - HKD + - HUF + - IMP + - ISK + - ISJ + - INR + - IDR + - IRR + - IQD + - IEP + - ILS + - ILP + - ILR + - ITL + - JMD + - JPY + - JOD + - KZT + - KES + - KWD + - KGS + - LAK + - LVL + - LVR + - LBP + - LSL + - LRD + - LYD + - LTL + - LTT + - LUL + - LUC + - LUF + - MOP + - MKD + - MKN + - MGA + - MGF + - MWK + - MYR + - MVR + - MVP + - MLF + - MTL + - MTP + - MRU + - MRO + - MUR + - MXV + - MXN + - MXP + - MDC + - MDL + - MCF + - MNT + - MAD + - MAF + - MZE + - MZN + - MZM + - MMK + - NAD + - NPR + - ANG + - TWD + - NZD + - NIO + - NIC + - NGN + - KPW + - NOK + - OMR + - PKR + - XPD + - PAB + - PGK + - PYG + - PEI + - PEN + - PES + - PHP + - XPT + - PLN + - PLZ + - PTE + - GWE + - QAR + - XRE + - RHD + - RON + - ROL + - RUB + - RUR + - RWF + - SVC + - WST + - SAR + - RSD + - CSD + - SCR + - SLL + - XAG + - SGD + - SKK + - SIT + - SBD + - SOS + - ZAR + - ZAL + - KRH + - KRW + - KRO + - SSP + - SUR + - ESP + - ESA + - ESB + - XDR + - LKR + - SHP + - XSU + - SDD + - SDG + - SDP + - SRD + - SRG + - SZL + - SEK + - CHF + - SYP + - STN + - STD + - TVD + - TJR + - TJS + - TZS + - XTS + - THB + - XXX + - TPE + - TOP + - TTD + - TND + - TRY + - TRL + - TMT + - TMM + - USD + - USN + - USS + - UGX + - UGS + - UAH + - UAK + - AED + - UYW + - UYU + - UYP + - UYI + - UZS + - VUV + - VES + - VEB + - VEF + - VND + - VNN + - CHE + - CHW + - XOF + - YDD + - YER + - YUN + - YUD + - YUM + - YUR + - ZWN + - ZRN + - ZRZ + - ZMW + - ZMK + - ZWD + - ZWR + - ZWL + docs: >- + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + source: + openapi: openapi/openapi.yml + TransactionLineItemItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Item + source: + openapi: openapi/openapi.yml + inline: true + TransactionLineItem: + docs: >- + # The TransactionLineItem Object + + ### Description + + The `TransactionLineItem` object is used to represent a transaction's line + items. + + + ### Usage Example + + Fetch from the `GET TransactionLineItem` endpoint and view the + transaction's line items. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + memo: + type: optional + docs: >- + An internal note used by the business to clarify purpose of the + transaction. + unit_price: + type: optional + docs: The line item's unit price. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + quantity: + type: optional + docs: The line item's quantity. + validation: + pattern: ^-?\d{0,24}(?:\.\d{0,8})?$ + item: optional + account: + type: optional + docs: The line item's account. + validation: + format: uuid + tracking_category: + type: optional + docs: The line's associated tracking category. + validation: + format: uuid + availability: deprecated + tracking_categories: + type: optional>> + docs: The transaction line item's associated tracking categories. + total_line_amount: + type: optional + docs: The line item's total. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + tax_rate: + type: optional + docs: The tax rate that applies to this line item. + validation: + format: uuid + currency: + type: optional + docs: >- + The line item's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + exchange_rate: + type: optional + docs: The line item's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + company: + type: optional + docs: The company the line belongs to. + validation: + format: uuid + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + source: + openapi: openapi/openapi.yml + Type2BbEnum: + enum: + - INVENTORY + - NON_INVENTORY + - SERVICE + - UNKNOWN + docs: |- + * `INVENTORY` - INVENTORY + * `NON_INVENTORY` - NON_INVENTORY + * `SERVICE` - SERVICE + * `UNKNOWN` - UNKNOWN + source: + openapi: openapi/openapi.yml + UnderlyingTransactionTypeEnum: + enum: + - INVOICE + - EXPENSE + - TRANSACTION + - JOURNAL_ENTRY + - PAYMENT + - VENDOR_CREDIT + - CREDIT_NOTE + docs: |- + * `INVOICE` - INVOICE + * `EXPENSE` - EXPENSE + * `TRANSACTION` - TRANSACTION + * `JOURNAL_ENTRY` - JOURNAL_ENTRY + * `PAYMENT` - PAYMENT + * `VENDOR_CREDIT` - VENDOR_CREDIT + * `CREDIT_NOTE` - CREDIT_NOTE + source: + openapi: openapi/openapi.yml + ValidationProblemSource: + properties: + pointer: string + source: + openapi: openapi/openapi.yml + VendorCreditVendor: + discriminated: false + docs: The vendor that owes the gift or refund. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: openapi/openapi.yml + inline: true + VendorCreditCompany: + discriminated: false + docs: The company the vendor credit belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: openapi/openapi.yml + inline: true + VendorCreditTrackingCategoriesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: openapi/openapi.yml + inline: true + VendorCreditAccountingPeriod: + discriminated: false + docs: The accounting period that the VendorCredit was generated in. + union: + - type: string + validation: + format: uuid + - AccountingPeriod + source: + openapi: openapi/openapi.yml + inline: true + VendorCredit: + docs: >- + # The VendorCredit Object + + ### Description + + A `VendorCredit` is transaction issued by a vendor to the accounting + company, indicating a reduction or cancellation of the amount owed to the + vendor. It is most generally used as an adjustment note used to rectify + errors, returns, or overpayments related to a purchasing transaction. A + `VendorCredit` can be applied to `Accounts Payable` Invoices to decrease + the overall amount of the `Invoice`. + + + ### Usage Example + + Fetch from the `GET VendorCredit` endpoint and view a company's vendor + credits. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + number: + type: optional + docs: The vendor credit's number. + transaction_date: + type: optional + docs: The vendor credit's transaction date. + vendor: + type: optional + docs: The vendor that owes the gift or refund. + total_amount: + type: optional + docs: The vendor credit's total amount. + currency: + type: optional + docs: >- + The vendor credit's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + exchange_rate: + type: optional + docs: The vendor credit's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + inclusive_of_tax: + type: optional + docs: >- + If the transaction is inclusive or exclusive of tax. `True` if + inclusive, `False` if exclusive. + company: + type: optional + docs: The company the vendor credit belongs to. + lines: + type: optional> + access: read-only + tracking_categories: optional>> + applied_to_lines: + type: optional> + docs: A list of VendorCredit Applied to Lines objects. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + accounting_period: + type: optional + docs: The accounting period that the VendorCredit was generated in. + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + VendorCreditApplyLineForInvoiceVendorCredit: + discriminated: false + union: + - type: string + validation: + format: uuid + - VendorCredit + source: + openapi: openapi/openapi.yml + inline: true + VendorCreditApplyLineForInvoice: + docs: >- + # The VendorCreditApplyLine Object + + ### Description + + The `VendorCreditApplyLine` object is used to represent a applied vendor + credit. + + + ### Usage Example + + Fetch from the `GET VendorCredit` endpoint and view the vendor credit's + applied to lines. + properties: + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + vendor_credit: optional + applied_date: + type: optional + docs: Date that the vendor credit is applied to the invoice. + applied_amount: + type: optional + docs: The amount of the VendorCredit applied to the invoice. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + source: + openapi: openapi/openapi.yml + VendorCreditApplyLineForVendorCreditInvoice: + discriminated: false + union: + - type: string + validation: + format: uuid + - Invoice + source: + openapi: openapi/openapi.yml + inline: true + VendorCreditApplyLineForVendorCredit: + docs: >- + # The VendorCreditApplyLine Object + + ### Description + + The `VendorCreditApplyLine` object is used to represent a applied vendor + credit. + + + ### Usage Example + + Fetch from the `GET VendorCredit` endpoint and view the vendor credit's + applied to lines. + properties: + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + invoice: optional + applied_date: + type: optional + docs: Date that the vendor credit is applied to the invoice. + applied_amount: + type: optional + docs: The amount of the VendorCredit applied to the invoice. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + source: + openapi: openapi/openapi.yml + VendorCreditApplyLineForVendorCreditRequestInvoice: + discriminated: false + union: + - type: string + validation: + format: uuid + - Invoice + source: + openapi: openapi/openapi.yml + inline: true + VendorCreditApplyLineForVendorCreditRequest: + docs: >- + # The VendorCreditApplyLine Object + + ### Description + + The `VendorCreditApplyLine` object is used to represent a applied vendor + credit. + + + ### Usage Example + + Fetch from the `GET VendorCredit` endpoint and view the vendor credit's + applied to lines. + properties: + remote_id: + type: optional + docs: The third-party API ID of the matching object. + invoice: optional + applied_date: + type: optional + docs: Date that the vendor credit is applied to the invoice. + applied_amount: + type: optional + docs: The amount of the VendorCredit applied to the invoice. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + VendorCreditLineAccount: + discriminated: false + docs: The line's account. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: openapi/openapi.yml + inline: true + VendorCreditLineProject: + discriminated: false + union: + - type: string + validation: + format: uuid + - Project + source: + openapi: openapi/openapi.yml + inline: true + VendorCreditLineContact: + discriminated: false + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: openapi/openapi.yml + inline: true + VendorCreditLine: + docs: >- + # The VendorCreditLine Object + + ### Description + + The `VendorCreditLine` object is used to represent a vendor credit's line + items. + + + ### Usage Example + + Fetch from the `GET VendorCredit` endpoint and view the vendor credit's + line items. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + net_amount: + type: optional + docs: The full value of the credit. + tracking_category: + type: optional + docs: The line's associated tracking category. + validation: + format: uuid + availability: deprecated + tracking_categories: + type: optional>> + docs: The vendor credit line item's associated tracking categories. + description: + type: optional + docs: The line's description. + account: + type: optional + docs: The line's account. + company: + type: optional + docs: The company the line belongs to. + validation: + format: uuid + project: optional + contact: optional + tax_rate: + type: optional + docs: The tax rate that applies to this line item. + validation: + format: uuid + exchange_rate: + type: optional + docs: The vendor credit line item's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + source: + openapi: openapi/openapi.yml + VendorCreditLineRequestAccount: + discriminated: false + docs: The line's account. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: openapi/openapi.yml + inline: true + VendorCreditLineRequestProject: + discriminated: false + union: + - type: string + validation: + format: uuid + - Project + source: + openapi: openapi/openapi.yml + inline: true + VendorCreditLineRequestContact: + discriminated: false + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: openapi/openapi.yml + inline: true + VendorCreditLineRequest: + docs: >- + # The VendorCreditLine Object + + ### Description + + The `VendorCreditLine` object is used to represent a vendor credit's line + items. + + + ### Usage Example + + Fetch from the `GET VendorCredit` endpoint and view the vendor credit's + line items. + properties: + remote_id: + type: optional + docs: The third-party API ID of the matching object. + net_amount: + type: optional + docs: The full value of the credit. + tracking_category: + type: optional + docs: The line's associated tracking category. + validation: + format: uuid + availability: deprecated + tracking_categories: + type: optional>> + docs: The vendor credit line item's associated tracking categories. + description: + type: optional + docs: The line's description. + account: + type: optional + docs: The line's account. + company: + type: optional + docs: The company the line belongs to. + validation: + format: uuid + project: optional + contact: optional + tax_rate: + type: optional + docs: The tax rate that applies to this line item. + validation: + format: uuid + exchange_rate: + type: optional + docs: The vendor credit line item's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + VendorCreditRequestVendor: + discriminated: false + docs: The vendor that owes the gift or refund. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: openapi/openapi.yml + inline: true + VendorCreditRequestCompany: + discriminated: false + docs: The company the vendor credit belongs to. + union: + - type: string + validation: + format: uuid + - CompanyInfo + source: + openapi: openapi/openapi.yml + inline: true + VendorCreditRequestTrackingCategoriesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - TrackingCategory + source: + openapi: openapi/openapi.yml + inline: true + VendorCreditRequestAccountingPeriod: + discriminated: false + docs: The accounting period that the VendorCredit was generated in. + union: + - type: string + validation: + format: uuid + - AccountingPeriod + source: + openapi: openapi/openapi.yml + inline: true + VendorCreditRequest: + docs: >- + # The VendorCredit Object + + ### Description + + A `VendorCredit` is transaction issued by a vendor to the accounting + company, indicating a reduction or cancellation of the amount owed to the + vendor. It is most generally used as an adjustment note used to rectify + errors, returns, or overpayments related to a purchasing transaction. A + `VendorCredit` can be applied to `Accounts Payable` Invoices to decrease + the overall amount of the `Invoice`. + + + ### Usage Example + + Fetch from the `GET VendorCredit` endpoint and view a company's vendor + credits. + properties: + number: + type: optional + docs: The vendor credit's number. + transaction_date: + type: optional + docs: The vendor credit's transaction date. + vendor: + type: optional + docs: The vendor that owes the gift or refund. + total_amount: + type: optional + docs: The vendor credit's total amount. + currency: + type: optional + docs: >- + The vendor credit's currency. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + exchange_rate: + type: optional + docs: The vendor credit's exchange rate. + validation: + pattern: ^-?\d{0,32}(?:\.\d{0,16})?$ + inclusive_of_tax: + type: optional + docs: >- + If the transaction is inclusive or exclusive of tax. `True` if + inclusive, `False` if exclusive. + company: + type: optional + docs: The company the vendor credit belongs to. + tracking_categories: optional>> + applied_to_lines: + type: optional> + docs: A list of VendorCredit Applied to Lines objects. + accounting_period: + type: optional + docs: The accounting period that the VendorCredit was generated in. + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + VendorCreditResponse: + properties: + model: VendorCredit + warnings: list + errors: list + logs: optional> + source: + openapi: openapi/openapi.yml + WarningValidationProblem: + properties: + source: optional + title: string + detail: string + problem_type: string + source: + openapi: openapi/openapi.yml + WebhookReceiver: + properties: + event: string + is_active: boolean + key: optional + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/accountDetails.yml b/.mock/definition/accounting/accountDetails.yml new file mode 100644 index 0000000..a9e9606 --- /dev/null +++ b/.mock/definition/accounting/accountDetails.yml @@ -0,0 +1,36 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + retrieve: + path: /accounting/v1/account-details + method: GET + auth: true + docs: Get details for a linked account. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.AccountDetails + status-code: 200 + examples: + - headers: {} + response: + body: + id: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd + integration: BambooHR + integration_slug: bamboohr + category: hris + end_user_origin_id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + end_user_organization_name: Waystar Royco + end_user_email_address: kendall.roy@waystar-royco.com + status: COMPLETE + webhook_listener_url: >- + https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 + is_duplicate: true + account_type: PRODUCTION + completed_at: '2024-08-26T20:11:19Z' + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/accountToken.yml b/.mock/definition/accounting/accountToken.yml new file mode 100644 index 0000000..e5fa047 --- /dev/null +++ b/.mock/definition/accounting/accountToken.yml @@ -0,0 +1,44 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + retrieve: + path: /accounting/v1/account-token/{public_token} + method: GET + auth: true + docs: >- + Returns the account token for the end user with the provided public + token. + source: + openapi: openapi/openapi.yml + path-parameters: + public_token: string + response: + docs: '' + type: root.AccountToken + status-code: 200 + examples: + - path-parameters: + public_token: public_token + response: + body: + account_token: T9klMDQrcHdm9jrtHuOS2Nf06BIHwMNjpPXPMB + integration: + name: name + abbreviated_name: abbreviated_name + categories: + - hris + image: image + square_image: square_image + color: color + slug: slug + api_endpoints_to_documentation_urls: + key: value + webhook_setup_guide_url: webhook_setup_guide_url + category_beta_status: + key: value + id: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/accountingPeriods.yml b/.mock/definition/accounting/accountingPeriods.yml new file mode 100644 index 0000000..d6fc7c6 --- /dev/null +++ b/.mock/definition/accounting/accountingPeriods.yml @@ -0,0 +1,119 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/accounting-periods + method: GET + auth: true + docs: Returns a list of `AccountingPeriod` objects. + source: + openapi: openapi/openapi.yml + request: + name: AccountingPeriodsListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: root.PaginatedAccountingPeriodList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 3015f7b1-4d01-460d-bfab-02a52d16cbd0 + remote_id: '2804580' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: April 2020 Financials + status: ACTIVE + start_date: '2020-03-31T00:00:00Z' + end_date: '2020-05-01T00:00:00Z' + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + retrieve: + path: /accounting/v1/accounting-periods/{id} + method: GET + auth: true + docs: Returns an `AccountingPeriod` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: AccountingPeriodsRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.AccountingPeriod + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 3015f7b1-4d01-460d-bfab-02a52d16cbd0 + remote_id: '2804580' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: April 2020 Financials + status: ACTIVE + start_date: '2020-03-31T00:00:00Z' + end_date: '2020-05-01T00:00:00Z' + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/accounts.yml b/.mock/definition/accounting/accounts.yml new file mode 100644 index 0000000..c674609 --- /dev/null +++ b/.mock/definition/accounting/accounts.yml @@ -0,0 +1,496 @@ +types: + AccountsListRequestRemoteFields: + enum: + - classification + - value: classification,status + name: ClassificationStatus + - status + source: + openapi: openapi/openapi.yml + AccountsListRequestShowEnumOrigins: + enum: + - classification + - value: classification,status + name: ClassificationStatus + - status + source: + openapi: openapi/openapi.yml + AccountsRetrieveRequestRemoteFields: + enum: + - classification + - value: classification,status + name: ClassificationStatus + - status + source: + openapi: openapi/openapi.yml + AccountsRetrieveRequestShowEnumOrigins: + enum: + - classification + - value: classification,status + name: ClassificationStatus + - status + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/accounts + method: GET + auth: true + docs: Returns a list of `Account` objects. + source: + openapi: openapi/openapi.yml + request: + name: AccountsListRequest + query-parameters: + account_type: + type: optional + docs: If provided, will only return accounts with the passed in enum. + classification: + type: optional + docs: If provided, will only return accounts with this classification. + company_id: + type: optional + docs: If provided, will only return accounts for this company. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + name: + type: optional + docs: If provided, will only return Accounts with this name. + page_size: + type: optional + docs: Number of results to return per page. + remote_fields: + type: optional + docs: Deprecated. Use show_enum_origins. + remote_id: + type: optional + docs: The API provider's ID for the given object. + show_enum_origins: + type: optional + docs: >- + 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: + type: optional + docs: If provided, will only return accounts with this status. + response: + docs: '' + type: root.PaginatedAccountList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '21' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Cash + description: Cash + classification: ASSET + type: Asset + account_type: BANK + status: ACTIVE + current_balance: 1.1 + currency: XUA + account_number: X12Y9AB + parent_account: 22d92d6c-22f9-11ed-861d-0242ac120002 + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + create: + path: /accounting/v1/accounts + method: POST + auth: true + docs: Creates an `Account` object with the given values. + source: + openapi: openapi/openapi.yml + request: + name: AccountEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: root.AccountRequest + content-type: application/json + response: + docs: '' + type: root.AccountResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '21' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Cash + description: Cash + classification: ASSET + type: Asset + account_type: BANK + status: ACTIVE + current_balance: 1.1 + currency: XUA + account_number: X12Y9AB + parent_account: 22d92d6c-22f9-11ed-861d-0242ac120002 + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /accounting/v1/accounts/{id} + method: GET + auth: true + docs: Returns an `Account` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: AccountsRetrieveRequest + query-parameters: + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional + docs: >- + 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) + response: + docs: '' + type: root.Account + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '21' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Cash + description: Cash + classification: ASSET + type: Asset + account_type: BANK + status: ACTIVE + current_balance: 1.1 + currency: XUA + account_number: X12Y9AB + parent_account: 22d92d6c-22f9-11ed-861d-0242ac120002 + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + metaPostRetrieve: + path: /accounting/v1/accounts/meta/post + method: GET + auth: true + docs: Returns metadata for `Account` POSTs. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/addresses.yml b/.mock/definition/accounting/addresses.yml new file mode 100644 index 0000000..989f0df --- /dev/null +++ b/.mock/definition/accounting/addresses.yml @@ -0,0 +1,61 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + retrieve: + path: /accounting/v1/addresses/{id} + method: GET + auth: true + docs: Returns an `Address` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: AddressesRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: root.Address + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + type: BILLING + street_1: 2920 Broadway + street_2: 2nd Floor + city: New York + state: + key: value + country_subdivision: NY + country: AF + zip_code: '10027' + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/asyncPassthrough.yml b/.mock/definition/accounting/asyncPassthrough.yml new file mode 100644 index 0000000..da15baf --- /dev/null +++ b/.mock/definition/accounting/asyncPassthrough.yml @@ -0,0 +1,70 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /accounting/v1/async-passthrough + method: POST + auth: true + docs: >- + Asynchronously pull data from an endpoint not currently supported by + Merge. + source: + openapi: openapi/openapi.yml + request: + body: root.DataPassthroughRequest + content-type: application/json + response: + docs: '' + type: root.AsyncPassthroughReciept + status-code: 200 + examples: + - headers: {} + request: + method: GET + path: /scooters + response: + body: + async_passthrough_receipt_id: fd29020f-2695-445e-922e-dcd5e81903fd + retrieve: + path: /accounting/v1/async-passthrough/{async_passthrough_receipt_id} + method: GET + auth: true + docs: Retrieves data from earlier async-passthrough POST request + source: + openapi: openapi/openapi.yml + path-parameters: + async_passthrough_receipt_id: string + response: + docs: '' + type: AsyncPassthroughRetrieveResponse + status-code: 200 + examples: + - path-parameters: + async_passthrough_receipt_id: async_passthrough_receipt_id + headers: {} + response: + body: + method: GET + path: /scooters + status: 200 + response: + key: value + response_headers: + X-Page-Token: value + response_type: JSON + headers: + EXTRA-HEADER: value + Authorization: + source: + openapi: openapi/openapi.yml +types: + AsyncPassthroughRetrieveResponse: + discriminated: false + union: + - root.RemoteResponse + - string + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/asyncTasks.yml b/.mock/definition/accounting/asyncTasks.yml new file mode 100644 index 0000000..6365c3a --- /dev/null +++ b/.mock/definition/accounting/asyncTasks.yml @@ -0,0 +1,81 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + retrieve: + path: /accounting/v1/async-tasks/{id} + method: GET + auth: true + docs: Returns an `AsyncPostTask` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + response: + docs: '' + type: root.AsyncPostTask + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + status: QUEUED + result: + status_code: 201 + response: + model: + id: 9871b4a9-f5d2-4f3b-a66b-dfedbed42c46 + remote_id: '990110' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + integration_params: + unique_integration_field: unique_integration_field_value + linked_account_params: + unique_linked_account_field: unique_linked_account_field_value + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + type: ACCOUNTS_RECEIVABLE + contact: 022a2bef-57e5-4def-8ed2-7c41bd9a5ed8 + number: AIQ12546 + issue_date: '2020-03-31T00:00:00Z' + due_date: '2020-04-15T00:00:00Z' + memo: Weekly Payment + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + employee: 7442f0d5-722d-45bd-b807-6e38489d37fe + paid_on_date: '2020-04-01T00:00:00Z' + currency: USD + exchange_rate: '2.9' + status: DRAFT + total_discount: 0 + sub_total: 100 + total_tax_amount: 5 + total_amount: 105 + balance: 105 + inclusive_of_tax: false + remote_updated_at: '2020-04-01T00:00:00Z' + tracking_categories: + - 7dc5ca17-d311-44cd-9ce0-333080367a18 + - 6aa0700c-48e1-4c4a-8162-02e6a582df05 + - 8c933d61-8f5b-4360-ac0c-c9dc87bee763 + purchase_orders: + - e7378d8f-3992-4c2a-8417-ebdc4f2bfeb7 + - dd70ca2f-b120-46fa-889a-9604037f45fd + - 889b281d-739c-4759-95b8-0aedb3947131 + accounting_period: 7dc5ca17-d311-44cd-9ce0-333080367a18 + payments: + - b26fd49a-cbae-470a-a8f8-bcbc119e0390 + applied_payments: + - 9017594e-dc33-4113-a5d2-b0f928e34fdd + remote_data: + - path: /actions + data: + - Varies by platform + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/attachments.yml b/.mock/definition/accounting/attachments.yml new file mode 100644 index 0000000..cae3762 --- /dev/null +++ b/.mock/definition/accounting/attachments.yml @@ -0,0 +1,402 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/attachments + method: GET + auth: true + docs: Returns a list of `AccountingAttachment` objects. + source: + openapi: openapi/openapi.yml + request: + name: AttachmentsListRequest + query-parameters: + company_id: + type: optional + docs: >- + If provided, will only return accounting attachments for this + company. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: root.PaginatedAccountingAttachmentList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '1018270' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + file_name: invoice.png + file_url: >- + https://merge-brand.s3.amazonaws.com/20210315/rect-logo-270x80%402x.png + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + create: + path: /accounting/v1/attachments + method: POST + auth: true + docs: Creates an `AccountingAttachment` object with the given values. + source: + openapi: openapi/openapi.yml + request: + name: AccountingAttachmentEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: root.AccountingAttachmentRequest + content-type: application/json + response: + docs: '' + type: root.AccountingAttachmentResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '1018270' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + file_name: invoice.png + file_url: >- + https://merge-brand.s3.amazonaws.com/20210315/rect-logo-270x80%402x.png + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /accounting/v1/attachments/{id} + method: GET + auth: true + docs: Returns an `AccountingAttachment` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: AttachmentsRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.AccountingAttachment + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '1018270' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + file_name: invoice.png + file_url: >- + https://merge-brand.s3.amazonaws.com/20210315/rect-logo-270x80%402x.png + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + metaPostRetrieve: + path: /accounting/v1/attachments/meta/post + method: GET + auth: true + docs: Returns metadata for `AccountingAttachment` POSTs. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/auditTrail.yml b/.mock/definition/accounting/auditTrail.yml new file mode 100644 index 0000000..6e1b867 --- /dev/null +++ b/.mock/definition/accounting/auditTrail.yml @@ -0,0 +1,94 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/audit-trail + method: GET + auth: true + docs: Gets a list of audit trail events. + source: + openapi: openapi/openapi.yml + request: + name: AuditTrailListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + end_date: + type: optional + docs: >- + If included, will only include audit trail events that occurred + before this time + event_type: + type: optional + docs: >- + 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`, + `REGENERATED_WEBHOOK_SIGNATURE`, `INVITED_USER`, + `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, + `DELETED_LINKED_ACCOUNT`, + `DELETED_ALL_COMMON_MODELS_FOR_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`, + `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, + `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, + `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, + `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, + `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, + `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, + `END_USER_CREDENTIALS_ACCESSED` + page_size: + type: optional + docs: Number of results to return per page. + start_date: + type: optional + docs: >- + If included, will only include audit trail events that occurred + after this time + user_email: + type: optional + docs: >- + If provided, this will return events associated with the specified + user email. Please note that the email address reflects the user's + email at the time of the event, and may not be their current + email. + response: + docs: '' + type: root.PaginatedAuditLogEventList + status-code: 200 + examples: + - response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: b5ceea2a-7171-47ce-8090-165cfce5572c + user_name: Gil Feig + user_email: hello@merge.dev + role: ADMIN + ip_address: 192.0.2.123 + event_type: CREATED_REMOTE_PRODUCTION_API_KEY + event_description: >- + Organization-wide Scopes for model hris.Employee updated + from Read to Read+Write + created_at: '2024-01-15T09:30:00Z' + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/availableActions.yml b/.mock/definition/accounting/availableActions.yml new file mode 100644 index 0000000..35fca3f --- /dev/null +++ b/.mock/definition/accounting/availableActions.yml @@ -0,0 +1,50 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + retrieve: + path: /accounting/v1/available-actions + method: GET + auth: true + docs: Returns a list of models and actions available for an account. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.AvailableActions + status-code: 200 + examples: + - headers: {} + response: + body: + integration: + name: name + abbreviated_name: abbreviated_name + categories: + - hris + image: image + square_image: square_image + color: color + slug: slug + api_endpoints_to_documentation_urls: + key: value + webhook_setup_guide_url: webhook_setup_guide_url + category_beta_status: + key: value + passthrough_available: true + available_model_operations: + - model_name: Candidate + available_operations: + - FETCH + - CREATE + required_post_parameters: + - remote_user_id + supported_fields: + - first_name + - last_name + - company + - title + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/balanceSheets.yml b/.mock/definition/accounting/balanceSheets.yml new file mode 100644 index 0000000..dde810e --- /dev/null +++ b/.mock/definition/accounting/balanceSheets.yml @@ -0,0 +1,241 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/balance-sheets + method: GET + auth: true + docs: Returns a list of `BalanceSheet` objects. + source: + openapi: openapi/openapi.yml + request: + name: BalanceSheetsListRequest + query-parameters: + company_id: + type: optional + docs: If provided, will only return balance sheets for this company. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: root.PaginatedBalanceSheetList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 9871b4a9-f5d2-4f3b-a66b-dfedbed42c46 + remote_id: '8937018' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: BalanceSheet + currency: XUA + company: company + date: '2021-10-01T00:00:00Z' + net_assets: 1000 + assets: + - remote_id: '10010' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Assets + value: 1000 + sub_items: + - remote_id: '10300' + name: Revenue - San Francisco + value: 500 + - remote_id: '10301' + name: Revenue - New York + value: 500 + liabilities: + - remote_id: '10011' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Liabilities + value: 500 + sub_items: + - remote_id: '10300' + name: Revenue - San Francisco + value: 500 + - remote_id: '10301' + name: Revenue - New York + value: 500 + equity: + - remote_id: '10012' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Equity + value: 500 + sub_items: + - remote_id: '10300' + name: Revenue - San Francisco + value: 500 + - remote_id: '10301' + name: Revenue - New York + value: 500 + remote_generated_at: '2021-10-01T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + retrieve: + path: /accounting/v1/balance-sheets/{id} + method: GET + auth: true + docs: Returns a `BalanceSheet` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: BalanceSheetsRetrieveRequest + query-parameters: + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.BalanceSheet + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 9871b4a9-f5d2-4f3b-a66b-dfedbed42c46 + remote_id: '8937018' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: BalanceSheet + currency: XUA + company: company + date: '2021-10-01T00:00:00Z' + net_assets: 1000 + assets: + - remote_id: '10010' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Assets + value: 1000 + sub_items: + - remote_id: '10300' + name: Revenue - San Francisco + value: 500 + - remote_id: '10301' + name: Revenue - New York + value: 500 + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: true + liabilities: + - remote_id: '10011' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Liabilities + value: 500 + sub_items: + - remote_id: '10300' + name: Revenue - San Francisco + value: 500 + - remote_id: '10301' + name: Revenue - New York + value: 500 + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: true + equity: + - remote_id: '10012' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Equity + value: 500 + sub_items: + - remote_id: '10300' + name: Revenue - San Francisco + value: 500 + - remote_id: '10301' + name: Revenue - New York + value: 500 + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: true + remote_generated_at: '2021-10-01T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + data: + key: value + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/bankFeedAccounts.yml b/.mock/definition/accounting/bankFeedAccounts.yml new file mode 100644 index 0000000..2e64d19 --- /dev/null +++ b/.mock/definition/accounting/bankFeedAccounts.yml @@ -0,0 +1,386 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/bank-feed-accounts + method: GET + auth: true + docs: Returns a list of `BankFeedAccount` objects. + source: + openapi: openapi/openapi.yml + request: + name: BankFeedAccountsListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: root.PaginatedBankFeedAccountList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: b26fd49a-cbae-470a-a8f8-bcbc119e0390 + remote_id: '987300' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + source_account_id: '123566909' + target_account_id: 49cd5a42-b311-4750-9361-52e2ed1d4653 + source_account_name: Travel Bank Account + source_account_number: '12567' + target_account_name: Netsuite Travel Bank Account + currency: XUA + feed_status: ACTIVE + feed_start_date: '2024-02-02T00:00:00Z' + source_account_balance: 123.94 + account_type: BANK + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + create: + path: /accounting/v1/bank-feed-accounts + method: POST + auth: true + docs: Creates a `BankFeedAccount` object with the given values. + source: + openapi: openapi/openapi.yml + request: + name: BankFeedAccountEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: root.BankFeedAccountRequest + content-type: application/json + response: + docs: '' + type: root.BankFeedAccountResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: b26fd49a-cbae-470a-a8f8-bcbc119e0390 + remote_id: '987300' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + source_account_id: '123566909' + target_account_id: 49cd5a42-b311-4750-9361-52e2ed1d4653 + source_account_name: Travel Bank Account + source_account_number: '12567' + target_account_name: Netsuite Travel Bank Account + currency: XUA + feed_status: ACTIVE + feed_start_date: '2024-02-02T00:00:00Z' + source_account_balance: 123.94 + account_type: BANK + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - key: value + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /accounting/v1/bank-feed-accounts/{id} + method: GET + auth: true + docs: Returns a `BankFeedAccount` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: BankFeedAccountsRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.BankFeedAccount + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: b26fd49a-cbae-470a-a8f8-bcbc119e0390 + remote_id: '987300' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + source_account_id: '123566909' + target_account_id: 49cd5a42-b311-4750-9361-52e2ed1d4653 + source_account_name: Travel Bank Account + source_account_number: '12567' + target_account_name: Netsuite Travel Bank Account + currency: XUA + feed_status: ACTIVE + feed_start_date: '2024-02-02T00:00:00Z' + source_account_balance: 123.94 + account_type: BANK + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - key: value + metaPostRetrieve: + path: /accounting/v1/bank-feed-accounts/meta/post + method: GET + auth: true + docs: Returns metadata for `BankFeedAccount` POSTs. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/bankFeedTransactions.yml b/.mock/definition/accounting/bankFeedTransactions.yml new file mode 100644 index 0000000..682615d --- /dev/null +++ b/.mock/definition/accounting/bankFeedTransactions.yml @@ -0,0 +1,403 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/bank-feed-transactions + method: GET + auth: true + docs: Returns a list of `BankFeedTransaction` objects. + source: + openapi: openapi/openapi.yml + request: + name: BankFeedTransactionsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_processed: + type: optional + docs: >- + If provided, will only return bank feed transactions with this + is_processed value + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: root.PaginatedBankFeedTransactionList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: b26fd49a-cbae-470a-a8f8-bcbc119e0390 + remote_id: '987300' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + bank_feed_account: bank_feed_account + transaction_date: '2024-02-02T00:00:00Z' + posted_date: '2024-02-03T00:00:00Z' + amount: 100.1 + description: Lunch expense + transaction_type: payment + payee: Elmo's diner + credit_or_debit: CREDIT + source_transaction_id: '124569' + remote_was_deleted: true + is_processed: true + create: + path: /accounting/v1/bank-feed-transactions + method: POST + auth: true + docs: Creates a `BankFeedTransaction` object with the given values. + source: + openapi: openapi/openapi.yml + request: + name: BankFeedTransactionEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: root.BankFeedTransactionRequestRequest + content-type: application/json + response: + docs: '' + type: root.BankFeedTransactionResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: b26fd49a-cbae-470a-a8f8-bcbc119e0390 + remote_id: '987300' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + bank_feed_account: bank_feed_account + transaction_date: '2024-02-02T00:00:00Z' + posted_date: '2024-02-03T00:00:00Z' + amount: 100.1 + description: Lunch expense + transaction_type: payment + payee: Elmo's diner + credit_or_debit: CREDIT + source_transaction_id: '124569' + remote_was_deleted: true + is_processed: true + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /accounting/v1/bank-feed-transactions/{id} + method: GET + auth: true + docs: Returns a `BankFeedTransaction` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: BankFeedTransactionsRetrieveRequest + query-parameters: + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.BankFeedTransaction + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: b26fd49a-cbae-470a-a8f8-bcbc119e0390 + remote_id: '987300' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + bank_feed_account: bank_feed_account + transaction_date: '2024-02-02T00:00:00Z' + posted_date: '2024-02-03T00:00:00Z' + amount: 100.1 + description: Lunch expense + transaction_type: payment + payee: Elmo's diner + credit_or_debit: CREDIT + source_transaction_id: '124569' + remote_was_deleted: true + is_processed: true + metaPostRetrieve: + path: /accounting/v1/bank-feed-transactions/meta/post + method: GET + auth: true + docs: Returns metadata for `BankFeedTransaction` POSTs. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/cashFlowStatements.yml b/.mock/definition/accounting/cashFlowStatements.yml new file mode 100644 index 0000000..179afb9 --- /dev/null +++ b/.mock/definition/accounting/cashFlowStatements.yml @@ -0,0 +1,241 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/cash-flow-statements + method: GET + auth: true + docs: Returns a list of `CashFlowStatement` objects. + source: + openapi: openapi/openapi.yml + request: + name: CashFlowStatementsListRequest + query-parameters: + company_id: + type: optional + docs: >- + If provided, will only return cash flow statements for this + company. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: root.PaginatedCashFlowStatementList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + remote_id: '8211088' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: CashFlow + currency: XUA + company: company + start_period: '2020-01-01T00:00:00Z' + end_period: '2020-03-31T00:00:00Z' + cash_at_beginning_of_period: 5000 + cash_at_end_of_period: 4063.52 + operating_activities: + - remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-09-18T00:00:00Z' + name: Operating Activities + value: 1000 + sub_items: + - remote_id: '23042938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-09-18T00:00:00Z' + name: Net Income + value: 1097.13 + investing_activities: + - remote_id: '192406939' + created_at: '2021-11-15T00:00:00Z' + modified_at: '2021-11-18T00:00:00Z' + name: Equipment + value: 1000 + sub_items: + - created_at: '2021-11-15T00:00:00Z' + modified_at: '2021-09-18T00:00:00Z' + name: Equipment + value: 1000 + financing_activities: + - remote_id: '192406939' + created_at: '2021-11-15T00:00:00Z' + modified_at: '2021-11-15T00:00:00Z' + sub_items: + - remote_id: '10300' + name: Revenue - San Francisco + value: 500 + - remote_id: '10301' + name: Revenue - New York + value: 500 + remote_generated_at: '2020-04-01T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + retrieve: + path: /accounting/v1/cash-flow-statements/{id} + method: GET + auth: true + docs: Returns a `CashFlowStatement` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: CashFlowStatementsRetrieveRequest + query-parameters: + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.CashFlowStatement + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + remote_id: '8211088' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: CashFlow + currency: XUA + company: company + start_period: '2020-01-01T00:00:00Z' + end_period: '2020-03-31T00:00:00Z' + cash_at_beginning_of_period: 5000 + cash_at_end_of_period: 4063.52 + operating_activities: + - remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-09-18T00:00:00Z' + name: Operating Activities + value: 1000 + sub_items: + - remote_id: '23042938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-09-18T00:00:00Z' + name: Net Income + value: 1097.13 + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: true + investing_activities: + - remote_id: '192406939' + created_at: '2021-11-15T00:00:00Z' + modified_at: '2021-11-18T00:00:00Z' + name: Equipment + value: 1000 + sub_items: + - created_at: '2021-11-15T00:00:00Z' + modified_at: '2021-09-18T00:00:00Z' + name: Equipment + value: 1000 + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: true + financing_activities: + - remote_id: '192406939' + created_at: '2021-11-15T00:00:00Z' + modified_at: '2021-11-15T00:00:00Z' + name: Revenue + value: 1000 + sub_items: + - remote_id: '10300' + name: Revenue - San Francisco + value: 500 + - remote_id: '10301' + name: Revenue - New York + value: 500 + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: true + remote_generated_at: '2020-04-01T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/companyInfo.yml b/.mock/definition/accounting/companyInfo.yml new file mode 100644 index 0000000..488a430 --- /dev/null +++ b/.mock/definition/accounting/companyInfo.yml @@ -0,0 +1,205 @@ +types: + CompanyInfoListRequestExpand: + enum: + - addresses + - value: addresses,phone_numbers + name: AddressesPhoneNumbers + - phone_numbers + source: + openapi: openapi/openapi.yml + CompanyInfoRetrieveRequestExpand: + enum: + - addresses + - value: addresses,phone_numbers + name: AddressesPhoneNumbers + - phone_numbers + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/company-info + method: GET + auth: true + docs: Returns a list of `CompanyInfo` objects. + source: + openapi: openapi/openapi.yml + request: + name: CompanyInfoListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: root.PaginatedCompanyInfoList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 65d8ffd0-211b-4ba4-b85a-fbe2ce220982 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Merge Pickleball Company + legal_name: Merge Pickleball Company Inc. + tax_number: 11-0011000 + fiscal_year_end_month: 12 + fiscal_year_end_day: 31 + currency: XUA + remote_created_at: '2020-03-31T00:00:00Z' + addresses: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + street_1: 2920 Broadway + street_2: 2nd Floor + city: New York + state: NY + country: US + zip_code: '10027' + phone_numbers: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + retrieve: + path: /accounting/v1/company-info/{id} + method: GET + auth: true + docs: Returns a `CompanyInfo` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: CompanyInfoRetrieveRequest + query-parameters: + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.CompanyInfo + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 65d8ffd0-211b-4ba4-b85a-fbe2ce220982 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Merge Pickleball Company + legal_name: Merge Pickleball Company Inc. + tax_number: 11-0011000 + fiscal_year_end_month: 12 + fiscal_year_end_day: 31 + currency: XUA + remote_created_at: '2020-03-31T00:00:00Z' + urls: + - urls + addresses: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + type: BILLING + street_1: 2920 Broadway + street_2: 2nd Floor + city: New York + state: NY + country_subdivision: NY + country: US + zip_code: '10027' + phone_numbers: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + number: '+3198675309' + type: Mobile + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/contacts.yml b/.mock/definition/accounting/contacts.yml new file mode 100644 index 0000000..ba75cfb --- /dev/null +++ b/.mock/definition/accounting/contacts.yml @@ -0,0 +1,602 @@ +types: + ContactsListRequestExpand: + enum: + - addresses + - value: addresses,company + name: AddressesCompany + - value: addresses,phone_numbers + name: AddressesPhoneNumbers + - value: addresses,phone_numbers,company + name: AddressesPhoneNumbersCompany + - company + - phone_numbers + - value: phone_numbers,company + name: PhoneNumbersCompany + source: + openapi: openapi/openapi.yml + ContactsRetrieveRequestExpand: + enum: + - addresses + - value: addresses,company + name: AddressesCompany + - value: addresses,phone_numbers + name: AddressesPhoneNumbers + - value: addresses,phone_numbers,company + name: AddressesPhoneNumbersCompany + - company + - phone_numbers + - value: phone_numbers,company + name: PhoneNumbersCompany + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/contacts + method: GET + auth: true + docs: Returns a list of `Contact` objects. + source: + openapi: openapi/openapi.yml + request: + name: ContactsListRequest + query-parameters: + company_id: + type: optional + docs: If provided, will only return contacts for this company. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + email_address: + type: optional + docs: If provided, will only return Contacts that match this email. + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_customer: + type: optional + docs: >- + If provided, will only return Contacts that are denoted as + customers. + is_supplier: + type: optional + docs: >- + If provided, will only return Contacts that are denoted as + suppliers. + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + name: + type: optional + docs: If provided, will only return Contacts that match this name. + page_size: + type: optional + docs: Number of results to return per page. + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + remote_id: + type: optional + docs: The API provider's ID for the given object. + show_enum_origins: + type: optional> + docs: >- + 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: + type: optional + docs: If provided, will only return Contacts that match this status. + response: + docs: '' + type: root.PaginatedContactList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: c640b80b-fac9-409f-aa19-1f9221aec445 + remote_id: '11167' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Gil Feig's pickleball store + is_supplier: true + is_customer: true + email_address: pickleball@merge.dev + tax_number: 12-3456789 + status: ACTIVE + currency: USD + remote_updated_at: '2020-03-31T00:00:00Z' + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + addresses: + - 2f2702aa-8948-492b-a412-2acdf6d2c499 + - d98c7428-8dda-48a8-a1da-c570f65e2375 + phone_numbers: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + number: '+3198675309' + type: Mobile + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + create: + path: /accounting/v1/contacts + method: POST + auth: true + docs: Creates a `Contact` object with the given values. + source: + openapi: openapi/openapi.yml + request: + name: ContactEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: root.ContactRequest + content-type: application/json + response: + docs: '' + type: root.ContactResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: c640b80b-fac9-409f-aa19-1f9221aec445 + remote_id: '11167' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Gil Feig's pickleball store + is_supplier: true + is_customer: true + email_address: pickleball@merge.dev + tax_number: 12-3456789 + status: ACTIVE + currency: USD + remote_updated_at: '2020-03-31T00:00:00Z' + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + addresses: + - 2f2702aa-8948-492b-a412-2acdf6d2c499 + - d98c7428-8dda-48a8-a1da-c570f65e2375 + phone_numbers: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + number: '+3198675309' + type: Mobile + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /accounting/v1/contacts/{id} + method: GET + auth: true + docs: Returns a `Contact` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: ContactsRetrieveRequest + query-parameters: + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: root.Contact + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: c640b80b-fac9-409f-aa19-1f9221aec445 + remote_id: '11167' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Gil Feig's pickleball store + is_supplier: true + is_customer: true + email_address: pickleball@merge.dev + tax_number: 12-3456789 + status: ACTIVE + currency: USD + remote_updated_at: '2020-03-31T00:00:00Z' + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + addresses: + - 2f2702aa-8948-492b-a412-2acdf6d2c499 + - d98c7428-8dda-48a8-a1da-c570f65e2375 + phone_numbers: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + number: '+3198675309' + type: Mobile + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + value: + key: value + metaPostRetrieve: + path: /accounting/v1/contacts/meta/post + method: GET + auth: true + docs: Returns metadata for `Contact` POSTs. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + remoteFieldClassesList: + path: /accounting/v1/contacts/remote-field-classes + method: GET + auth: true + docs: Returns a list of `RemoteFieldClass` objects. + source: + openapi: openapi/openapi.yml + request: + name: ContactsRemoteFieldClassesListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_common_model_field: + type: optional + docs: >- + If provided, will only return remote field classes with this + is_common_model_field value + is_custom: + type: optional + docs: >- + If provided, will only return remote fields classes with this + is_custom value + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: root.PaginatedRemoteFieldClassList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: id + display_name: display_name + remote_key_name: remote_key_name + description: description + is_custom: true + is_required: true + field_type: string + field_format: string + field_choices: + - field_choices + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/creditNotes.yml b/.mock/definition/accounting/creditNotes.yml new file mode 100644 index 0000000..edd1375 --- /dev/null +++ b/.mock/definition/accounting/creditNotes.yml @@ -0,0 +1,1145 @@ +types: + CreditNotesListRequestExpand: + enum: + - accounting_period + - applied_payments + - value: applied_payments,accounting_period + name: AppliedPaymentsAccountingPeriod + - value: applied_payments,company + name: AppliedPaymentsCompany + - value: applied_payments,company,accounting_period + name: AppliedPaymentsCompanyAccountingPeriod + - value: applied_payments,contact + name: AppliedPaymentsContact + - value: applied_payments,contact,accounting_period + name: AppliedPaymentsContactAccountingPeriod + - value: applied_payments,contact,company + name: AppliedPaymentsContactCompany + - value: applied_payments,contact,company,accounting_period + name: AppliedPaymentsContactCompanyAccountingPeriod + - value: applied_payments,line_items + name: AppliedPaymentsLineItems + - value: applied_payments,line_items,accounting_period + name: AppliedPaymentsLineItemsAccountingPeriod + - value: applied_payments,line_items,company + name: AppliedPaymentsLineItemsCompany + - value: applied_payments,line_items,company,accounting_period + name: AppliedPaymentsLineItemsCompanyAccountingPeriod + - value: applied_payments,line_items,contact + name: AppliedPaymentsLineItemsContact + - value: applied_payments,line_items,contact,accounting_period + name: AppliedPaymentsLineItemsContactAccountingPeriod + - value: applied_payments,line_items,contact,company + name: AppliedPaymentsLineItemsContactCompany + - value: applied_payments,line_items,contact,company,accounting_period + name: AppliedPaymentsLineItemsContactCompanyAccountingPeriod + - value: applied_payments,line_items,tracking_categories + name: AppliedPaymentsLineItemsTrackingCategories + - value: applied_payments,line_items,tracking_categories,accounting_period + name: AppliedPaymentsLineItemsTrackingCategoriesAccountingPeriod + - value: applied_payments,line_items,tracking_categories,company + name: AppliedPaymentsLineItemsTrackingCategoriesCompany + - value: >- + applied_payments,line_items,tracking_categories,company,accounting_period + name: AppliedPaymentsLineItemsTrackingCategoriesCompanyAccountingPeriod + - value: applied_payments,line_items,tracking_categories,contact + name: AppliedPaymentsLineItemsTrackingCategoriesContact + - value: >- + applied_payments,line_items,tracking_categories,contact,accounting_period + name: AppliedPaymentsLineItemsTrackingCategoriesContactAccountingPeriod + - value: applied_payments,line_items,tracking_categories,contact,company + name: AppliedPaymentsLineItemsTrackingCategoriesContactCompany + - value: >- + applied_payments,line_items,tracking_categories,contact,company,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesContactCompanyAccountingPeriod + - value: applied_payments,tracking_categories + name: AppliedPaymentsTrackingCategories + - value: applied_payments,tracking_categories,accounting_period + name: AppliedPaymentsTrackingCategoriesAccountingPeriod + - value: applied_payments,tracking_categories,company + name: AppliedPaymentsTrackingCategoriesCompany + - value: applied_payments,tracking_categories,company,accounting_period + name: AppliedPaymentsTrackingCategoriesCompanyAccountingPeriod + - value: applied_payments,tracking_categories,contact + name: AppliedPaymentsTrackingCategoriesContact + - value: applied_payments,tracking_categories,contact,accounting_period + name: AppliedPaymentsTrackingCategoriesContactAccountingPeriod + - value: applied_payments,tracking_categories,contact,company + name: AppliedPaymentsTrackingCategoriesContactCompany + - value: applied_payments,tracking_categories,contact,company,accounting_period + name: AppliedPaymentsTrackingCategoriesContactCompanyAccountingPeriod + - company + - value: company,accounting_period + name: CompanyAccountingPeriod + - contact + - value: contact,accounting_period + name: ContactAccountingPeriod + - value: contact,company + name: ContactCompany + - value: contact,company,accounting_period + name: ContactCompanyAccountingPeriod + - line_items + - value: line_items,accounting_period + name: LineItemsAccountingPeriod + - value: line_items,company + name: LineItemsCompany + - value: line_items,company,accounting_period + name: LineItemsCompanyAccountingPeriod + - value: line_items,contact + name: LineItemsContact + - value: line_items,contact,accounting_period + name: LineItemsContactAccountingPeriod + - value: line_items,contact,company + name: LineItemsContactCompany + - value: line_items,contact,company,accounting_period + name: LineItemsContactCompanyAccountingPeriod + - value: line_items,tracking_categories + name: LineItemsTrackingCategories + - value: line_items,tracking_categories,accounting_period + name: LineItemsTrackingCategoriesAccountingPeriod + - value: line_items,tracking_categories,company + name: LineItemsTrackingCategoriesCompany + - value: line_items,tracking_categories,company,accounting_period + name: LineItemsTrackingCategoriesCompanyAccountingPeriod + - value: line_items,tracking_categories,contact + name: LineItemsTrackingCategoriesContact + - value: line_items,tracking_categories,contact,accounting_period + name: LineItemsTrackingCategoriesContactAccountingPeriod + - value: line_items,tracking_categories,contact,company + name: LineItemsTrackingCategoriesContactCompany + - value: line_items,tracking_categories,contact,company,accounting_period + name: LineItemsTrackingCategoriesContactCompanyAccountingPeriod + - payments + - value: payments,accounting_period + name: PaymentsAccountingPeriod + - value: payments,applied_payments + name: PaymentsAppliedPayments + - value: payments,applied_payments,accounting_period + name: PaymentsAppliedPaymentsAccountingPeriod + - value: payments,applied_payments,company + name: PaymentsAppliedPaymentsCompany + - value: payments,applied_payments,company,accounting_period + name: PaymentsAppliedPaymentsCompanyAccountingPeriod + - value: payments,applied_payments,contact + name: PaymentsAppliedPaymentsContact + - value: payments,applied_payments,contact,accounting_period + name: PaymentsAppliedPaymentsContactAccountingPeriod + - value: payments,applied_payments,contact,company + name: PaymentsAppliedPaymentsContactCompany + - value: payments,applied_payments,contact,company,accounting_period + name: PaymentsAppliedPaymentsContactCompanyAccountingPeriod + - value: payments,applied_payments,line_items + name: PaymentsAppliedPaymentsLineItems + - value: payments,applied_payments,line_items,accounting_period + name: PaymentsAppliedPaymentsLineItemsAccountingPeriod + - value: payments,applied_payments,line_items,company + name: PaymentsAppliedPaymentsLineItemsCompany + - value: payments,applied_payments,line_items,company,accounting_period + name: PaymentsAppliedPaymentsLineItemsCompanyAccountingPeriod + - value: payments,applied_payments,line_items,contact + name: PaymentsAppliedPaymentsLineItemsContact + - value: payments,applied_payments,line_items,contact,accounting_period + name: PaymentsAppliedPaymentsLineItemsContactAccountingPeriod + - value: payments,applied_payments,line_items,contact,company + name: PaymentsAppliedPaymentsLineItemsContactCompany + - value: payments,applied_payments,line_items,contact,company,accounting_period + name: PaymentsAppliedPaymentsLineItemsContactCompanyAccountingPeriod + - value: payments,applied_payments,line_items,tracking_categories + name: PaymentsAppliedPaymentsLineItemsTrackingCategories + - value: >- + payments,applied_payments,line_items,tracking_categories,accounting_period + name: PaymentsAppliedPaymentsLineItemsTrackingCategoriesAccountingPeriod + - value: payments,applied_payments,line_items,tracking_categories,company + name: PaymentsAppliedPaymentsLineItemsTrackingCategoriesCompany + - value: >- + payments,applied_payments,line_items,tracking_categories,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesCompanyAccountingPeriod + - value: payments,applied_payments,line_items,tracking_categories,contact + name: PaymentsAppliedPaymentsLineItemsTrackingCategoriesContact + - value: >- + payments,applied_payments,line_items,tracking_categories,contact,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesContactAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,contact,company + name: PaymentsAppliedPaymentsLineItemsTrackingCategoriesContactCompany + - value: >- + payments,applied_payments,line_items,tracking_categories,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesContactCompanyAccountingPeriod + - value: payments,applied_payments,tracking_categories + name: PaymentsAppliedPaymentsTrackingCategories + - value: payments,applied_payments,tracking_categories,accounting_period + name: PaymentsAppliedPaymentsTrackingCategoriesAccountingPeriod + - value: payments,applied_payments,tracking_categories,company + name: PaymentsAppliedPaymentsTrackingCategoriesCompany + - value: >- + payments,applied_payments,tracking_categories,company,accounting_period + name: PaymentsAppliedPaymentsTrackingCategoriesCompanyAccountingPeriod + - value: payments,applied_payments,tracking_categories,contact + name: PaymentsAppliedPaymentsTrackingCategoriesContact + - value: >- + payments,applied_payments,tracking_categories,contact,accounting_period + name: PaymentsAppliedPaymentsTrackingCategoriesContactAccountingPeriod + - value: payments,applied_payments,tracking_categories,contact,company + name: PaymentsAppliedPaymentsTrackingCategoriesContactCompany + - value: >- + payments,applied_payments,tracking_categories,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesContactCompanyAccountingPeriod + - value: payments,company + name: PaymentsCompany + - value: payments,company,accounting_period + name: PaymentsCompanyAccountingPeriod + - value: payments,contact + name: PaymentsContact + - value: payments,contact,accounting_period + name: PaymentsContactAccountingPeriod + - value: payments,contact,company + name: PaymentsContactCompany + - value: payments,contact,company,accounting_period + name: PaymentsContactCompanyAccountingPeriod + - value: payments,line_items + name: PaymentsLineItems + - value: payments,line_items,accounting_period + name: PaymentsLineItemsAccountingPeriod + - value: payments,line_items,company + name: PaymentsLineItemsCompany + - value: payments,line_items,company,accounting_period + name: PaymentsLineItemsCompanyAccountingPeriod + - value: payments,line_items,contact + name: PaymentsLineItemsContact + - value: payments,line_items,contact,accounting_period + name: PaymentsLineItemsContactAccountingPeriod + - value: payments,line_items,contact,company + name: PaymentsLineItemsContactCompany + - value: payments,line_items,contact,company,accounting_period + name: PaymentsLineItemsContactCompanyAccountingPeriod + - value: payments,line_items,tracking_categories + name: PaymentsLineItemsTrackingCategories + - value: payments,line_items,tracking_categories,accounting_period + name: PaymentsLineItemsTrackingCategoriesAccountingPeriod + - value: payments,line_items,tracking_categories,company + name: PaymentsLineItemsTrackingCategoriesCompany + - value: payments,line_items,tracking_categories,company,accounting_period + name: PaymentsLineItemsTrackingCategoriesCompanyAccountingPeriod + - value: payments,line_items,tracking_categories,contact + name: PaymentsLineItemsTrackingCategoriesContact + - value: payments,line_items,tracking_categories,contact,accounting_period + name: PaymentsLineItemsTrackingCategoriesContactAccountingPeriod + - value: payments,line_items,tracking_categories,contact,company + name: PaymentsLineItemsTrackingCategoriesContactCompany + - value: >- + payments,line_items,tracking_categories,contact,company,accounting_period + name: PaymentsLineItemsTrackingCategoriesContactCompanyAccountingPeriod + - value: payments,tracking_categories + name: PaymentsTrackingCategories + - value: payments,tracking_categories,accounting_period + name: PaymentsTrackingCategoriesAccountingPeriod + - value: payments,tracking_categories,company + name: PaymentsTrackingCategoriesCompany + - value: payments,tracking_categories,company,accounting_period + name: PaymentsTrackingCategoriesCompanyAccountingPeriod + - value: payments,tracking_categories,contact + name: PaymentsTrackingCategoriesContact + - value: payments,tracking_categories,contact,accounting_period + name: PaymentsTrackingCategoriesContactAccountingPeriod + - value: payments,tracking_categories,contact,company + name: PaymentsTrackingCategoriesContactCompany + - value: payments,tracking_categories,contact,company,accounting_period + name: PaymentsTrackingCategoriesContactCompanyAccountingPeriod + - tracking_categories + - value: tracking_categories,accounting_period + name: TrackingCategoriesAccountingPeriod + - value: tracking_categories,company + name: TrackingCategoriesCompany + - value: tracking_categories,company,accounting_period + name: TrackingCategoriesCompanyAccountingPeriod + - value: tracking_categories,contact + name: TrackingCategoriesContact + - value: tracking_categories,contact,accounting_period + name: TrackingCategoriesContactAccountingPeriod + - value: tracking_categories,contact,company + name: TrackingCategoriesContactCompany + - value: tracking_categories,contact,company,accounting_period + name: TrackingCategoriesContactCompanyAccountingPeriod + source: + openapi: openapi/openapi.yml + CreditNotesListRequestRemoteFields: + enum: + - status + - value: status,type + name: StatusType + - type + source: + openapi: openapi/openapi.yml + CreditNotesListRequestShowEnumOrigins: + enum: + - status + - value: status,type + name: StatusType + - type + source: + openapi: openapi/openapi.yml + CreditNotesRetrieveRequestExpand: + enum: + - accounting_period + - applied_payments + - value: applied_payments,accounting_period + name: AppliedPaymentsAccountingPeriod + - value: applied_payments,company + name: AppliedPaymentsCompany + - value: applied_payments,company,accounting_period + name: AppliedPaymentsCompanyAccountingPeriod + - value: applied_payments,contact + name: AppliedPaymentsContact + - value: applied_payments,contact,accounting_period + name: AppliedPaymentsContactAccountingPeriod + - value: applied_payments,contact,company + name: AppliedPaymentsContactCompany + - value: applied_payments,contact,company,accounting_period + name: AppliedPaymentsContactCompanyAccountingPeriod + - value: applied_payments,line_items + name: AppliedPaymentsLineItems + - value: applied_payments,line_items,accounting_period + name: AppliedPaymentsLineItemsAccountingPeriod + - value: applied_payments,line_items,company + name: AppliedPaymentsLineItemsCompany + - value: applied_payments,line_items,company,accounting_period + name: AppliedPaymentsLineItemsCompanyAccountingPeriod + - value: applied_payments,line_items,contact + name: AppliedPaymentsLineItemsContact + - value: applied_payments,line_items,contact,accounting_period + name: AppliedPaymentsLineItemsContactAccountingPeriod + - value: applied_payments,line_items,contact,company + name: AppliedPaymentsLineItemsContactCompany + - value: applied_payments,line_items,contact,company,accounting_period + name: AppliedPaymentsLineItemsContactCompanyAccountingPeriod + - value: applied_payments,line_items,tracking_categories + name: AppliedPaymentsLineItemsTrackingCategories + - value: applied_payments,line_items,tracking_categories,accounting_period + name: AppliedPaymentsLineItemsTrackingCategoriesAccountingPeriod + - value: applied_payments,line_items,tracking_categories,company + name: AppliedPaymentsLineItemsTrackingCategoriesCompany + - value: >- + applied_payments,line_items,tracking_categories,company,accounting_period + name: AppliedPaymentsLineItemsTrackingCategoriesCompanyAccountingPeriod + - value: applied_payments,line_items,tracking_categories,contact + name: AppliedPaymentsLineItemsTrackingCategoriesContact + - value: >- + applied_payments,line_items,tracking_categories,contact,accounting_period + name: AppliedPaymentsLineItemsTrackingCategoriesContactAccountingPeriod + - value: applied_payments,line_items,tracking_categories,contact,company + name: AppliedPaymentsLineItemsTrackingCategoriesContactCompany + - value: >- + applied_payments,line_items,tracking_categories,contact,company,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesContactCompanyAccountingPeriod + - value: applied_payments,tracking_categories + name: AppliedPaymentsTrackingCategories + - value: applied_payments,tracking_categories,accounting_period + name: AppliedPaymentsTrackingCategoriesAccountingPeriod + - value: applied_payments,tracking_categories,company + name: AppliedPaymentsTrackingCategoriesCompany + - value: applied_payments,tracking_categories,company,accounting_period + name: AppliedPaymentsTrackingCategoriesCompanyAccountingPeriod + - value: applied_payments,tracking_categories,contact + name: AppliedPaymentsTrackingCategoriesContact + - value: applied_payments,tracking_categories,contact,accounting_period + name: AppliedPaymentsTrackingCategoriesContactAccountingPeriod + - value: applied_payments,tracking_categories,contact,company + name: AppliedPaymentsTrackingCategoriesContactCompany + - value: applied_payments,tracking_categories,contact,company,accounting_period + name: AppliedPaymentsTrackingCategoriesContactCompanyAccountingPeriod + - company + - value: company,accounting_period + name: CompanyAccountingPeriod + - contact + - value: contact,accounting_period + name: ContactAccountingPeriod + - value: contact,company + name: ContactCompany + - value: contact,company,accounting_period + name: ContactCompanyAccountingPeriod + - line_items + - value: line_items,accounting_period + name: LineItemsAccountingPeriod + - value: line_items,company + name: LineItemsCompany + - value: line_items,company,accounting_period + name: LineItemsCompanyAccountingPeriod + - value: line_items,contact + name: LineItemsContact + - value: line_items,contact,accounting_period + name: LineItemsContactAccountingPeriod + - value: line_items,contact,company + name: LineItemsContactCompany + - value: line_items,contact,company,accounting_period + name: LineItemsContactCompanyAccountingPeriod + - value: line_items,tracking_categories + name: LineItemsTrackingCategories + - value: line_items,tracking_categories,accounting_period + name: LineItemsTrackingCategoriesAccountingPeriod + - value: line_items,tracking_categories,company + name: LineItemsTrackingCategoriesCompany + - value: line_items,tracking_categories,company,accounting_period + name: LineItemsTrackingCategoriesCompanyAccountingPeriod + - value: line_items,tracking_categories,contact + name: LineItemsTrackingCategoriesContact + - value: line_items,tracking_categories,contact,accounting_period + name: LineItemsTrackingCategoriesContactAccountingPeriod + - value: line_items,tracking_categories,contact,company + name: LineItemsTrackingCategoriesContactCompany + - value: line_items,tracking_categories,contact,company,accounting_period + name: LineItemsTrackingCategoriesContactCompanyAccountingPeriod + - payments + - value: payments,accounting_period + name: PaymentsAccountingPeriod + - value: payments,applied_payments + name: PaymentsAppliedPayments + - value: payments,applied_payments,accounting_period + name: PaymentsAppliedPaymentsAccountingPeriod + - value: payments,applied_payments,company + name: PaymentsAppliedPaymentsCompany + - value: payments,applied_payments,company,accounting_period + name: PaymentsAppliedPaymentsCompanyAccountingPeriod + - value: payments,applied_payments,contact + name: PaymentsAppliedPaymentsContact + - value: payments,applied_payments,contact,accounting_period + name: PaymentsAppliedPaymentsContactAccountingPeriod + - value: payments,applied_payments,contact,company + name: PaymentsAppliedPaymentsContactCompany + - value: payments,applied_payments,contact,company,accounting_period + name: PaymentsAppliedPaymentsContactCompanyAccountingPeriod + - value: payments,applied_payments,line_items + name: PaymentsAppliedPaymentsLineItems + - value: payments,applied_payments,line_items,accounting_period + name: PaymentsAppliedPaymentsLineItemsAccountingPeriod + - value: payments,applied_payments,line_items,company + name: PaymentsAppliedPaymentsLineItemsCompany + - value: payments,applied_payments,line_items,company,accounting_period + name: PaymentsAppliedPaymentsLineItemsCompanyAccountingPeriod + - value: payments,applied_payments,line_items,contact + name: PaymentsAppliedPaymentsLineItemsContact + - value: payments,applied_payments,line_items,contact,accounting_period + name: PaymentsAppliedPaymentsLineItemsContactAccountingPeriod + - value: payments,applied_payments,line_items,contact,company + name: PaymentsAppliedPaymentsLineItemsContactCompany + - value: payments,applied_payments,line_items,contact,company,accounting_period + name: PaymentsAppliedPaymentsLineItemsContactCompanyAccountingPeriod + - value: payments,applied_payments,line_items,tracking_categories + name: PaymentsAppliedPaymentsLineItemsTrackingCategories + - value: >- + payments,applied_payments,line_items,tracking_categories,accounting_period + name: PaymentsAppliedPaymentsLineItemsTrackingCategoriesAccountingPeriod + - value: payments,applied_payments,line_items,tracking_categories,company + name: PaymentsAppliedPaymentsLineItemsTrackingCategoriesCompany + - value: >- + payments,applied_payments,line_items,tracking_categories,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesCompanyAccountingPeriod + - value: payments,applied_payments,line_items,tracking_categories,contact + name: PaymentsAppliedPaymentsLineItemsTrackingCategoriesContact + - value: >- + payments,applied_payments,line_items,tracking_categories,contact,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesContactAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,contact,company + name: PaymentsAppliedPaymentsLineItemsTrackingCategoriesContactCompany + - value: >- + payments,applied_payments,line_items,tracking_categories,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesContactCompanyAccountingPeriod + - value: payments,applied_payments,tracking_categories + name: PaymentsAppliedPaymentsTrackingCategories + - value: payments,applied_payments,tracking_categories,accounting_period + name: PaymentsAppliedPaymentsTrackingCategoriesAccountingPeriod + - value: payments,applied_payments,tracking_categories,company + name: PaymentsAppliedPaymentsTrackingCategoriesCompany + - value: >- + payments,applied_payments,tracking_categories,company,accounting_period + name: PaymentsAppliedPaymentsTrackingCategoriesCompanyAccountingPeriod + - value: payments,applied_payments,tracking_categories,contact + name: PaymentsAppliedPaymentsTrackingCategoriesContact + - value: >- + payments,applied_payments,tracking_categories,contact,accounting_period + name: PaymentsAppliedPaymentsTrackingCategoriesContactAccountingPeriod + - value: payments,applied_payments,tracking_categories,contact,company + name: PaymentsAppliedPaymentsTrackingCategoriesContactCompany + - value: >- + payments,applied_payments,tracking_categories,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesContactCompanyAccountingPeriod + - value: payments,company + name: PaymentsCompany + - value: payments,company,accounting_period + name: PaymentsCompanyAccountingPeriod + - value: payments,contact + name: PaymentsContact + - value: payments,contact,accounting_period + name: PaymentsContactAccountingPeriod + - value: payments,contact,company + name: PaymentsContactCompany + - value: payments,contact,company,accounting_period + name: PaymentsContactCompanyAccountingPeriod + - value: payments,line_items + name: PaymentsLineItems + - value: payments,line_items,accounting_period + name: PaymentsLineItemsAccountingPeriod + - value: payments,line_items,company + name: PaymentsLineItemsCompany + - value: payments,line_items,company,accounting_period + name: PaymentsLineItemsCompanyAccountingPeriod + - value: payments,line_items,contact + name: PaymentsLineItemsContact + - value: payments,line_items,contact,accounting_period + name: PaymentsLineItemsContactAccountingPeriod + - value: payments,line_items,contact,company + name: PaymentsLineItemsContactCompany + - value: payments,line_items,contact,company,accounting_period + name: PaymentsLineItemsContactCompanyAccountingPeriod + - value: payments,line_items,tracking_categories + name: PaymentsLineItemsTrackingCategories + - value: payments,line_items,tracking_categories,accounting_period + name: PaymentsLineItemsTrackingCategoriesAccountingPeriod + - value: payments,line_items,tracking_categories,company + name: PaymentsLineItemsTrackingCategoriesCompany + - value: payments,line_items,tracking_categories,company,accounting_period + name: PaymentsLineItemsTrackingCategoriesCompanyAccountingPeriod + - value: payments,line_items,tracking_categories,contact + name: PaymentsLineItemsTrackingCategoriesContact + - value: payments,line_items,tracking_categories,contact,accounting_period + name: PaymentsLineItemsTrackingCategoriesContactAccountingPeriod + - value: payments,line_items,tracking_categories,contact,company + name: PaymentsLineItemsTrackingCategoriesContactCompany + - value: >- + payments,line_items,tracking_categories,contact,company,accounting_period + name: PaymentsLineItemsTrackingCategoriesContactCompanyAccountingPeriod + - value: payments,tracking_categories + name: PaymentsTrackingCategories + - value: payments,tracking_categories,accounting_period + name: PaymentsTrackingCategoriesAccountingPeriod + - value: payments,tracking_categories,company + name: PaymentsTrackingCategoriesCompany + - value: payments,tracking_categories,company,accounting_period + name: PaymentsTrackingCategoriesCompanyAccountingPeriod + - value: payments,tracking_categories,contact + name: PaymentsTrackingCategoriesContact + - value: payments,tracking_categories,contact,accounting_period + name: PaymentsTrackingCategoriesContactAccountingPeriod + - value: payments,tracking_categories,contact,company + name: PaymentsTrackingCategoriesContactCompany + - value: payments,tracking_categories,contact,company,accounting_period + name: PaymentsTrackingCategoriesContactCompanyAccountingPeriod + - tracking_categories + - value: tracking_categories,accounting_period + name: TrackingCategoriesAccountingPeriod + - value: tracking_categories,company + name: TrackingCategoriesCompany + - value: tracking_categories,company,accounting_period + name: TrackingCategoriesCompanyAccountingPeriod + - value: tracking_categories,contact + name: TrackingCategoriesContact + - value: tracking_categories,contact,accounting_period + name: TrackingCategoriesContactAccountingPeriod + - value: tracking_categories,contact,company + name: TrackingCategoriesContactCompany + - value: tracking_categories,contact,company,accounting_period + name: TrackingCategoriesContactCompanyAccountingPeriod + source: + openapi: openapi/openapi.yml + CreditNotesRetrieveRequestRemoteFields: + enum: + - status + - value: status,type + name: StatusType + - type + source: + openapi: openapi/openapi.yml + CreditNotesRetrieveRequestShowEnumOrigins: + enum: + - status + - value: status,type + name: StatusType + - type + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/credit-notes + method: GET + auth: true + docs: Returns a list of `CreditNote` objects. + source: + openapi: openapi/openapi.yml + request: + name: CreditNotesListRequest + query-parameters: + company_id: + type: optional + docs: If provided, will only return credit notes for this company. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_fields: + type: optional + docs: Deprecated. Use show_enum_origins. + remote_id: + type: optional + docs: The API provider's ID for the given object. + show_enum_origins: + type: optional + docs: >- + 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: + type: optional + docs: If provided, will only return objects created after this datetime. + transaction_date_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + response: + docs: '' + type: root.PaginatedCreditNoteList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 8d9fd929-436c-4fd4-a48b-0c61f68d6178 + remote_id: '123877' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + transaction_date: '2020-03-31T00:00:00Z' + status: SUBMITTED + number: CN-29 + contact: contact + company: company + exchange_rate: '2.9' + total_amount: 50 + remaining_credit: 20 + inclusive_of_tax: true + line_items: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121222' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + item: 0e3fd929-436c-4fd4-a48b-0c61f68d6178 + name: Basic Monthly + description: prorated amount for items + quantity: quantity + memo: privNote + unit_price: '5.0' + tax_rate: 8d9fd929-436c-4fd4-a48b-0c61f68d6178 + total_line_amount: '5.0' + tracking_categories: + - 8d9fd929-436c-4fd4-a48b-0c61f68d6178 + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + account: 8d9fd929-436c-4fd4-a48b-0c61f68d6178 + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + contact: 908934-49j9-093f-0989-908923908 + project: 22e65a5d-2df5-4e6e-884a-e538d0339000 + remote_was_deleted: true + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + currency: XUA + remote_created_at: '2020-03-31T00:00:00Z' + remote_updated_at: '2020-03-31T00:00:00Z' + payments: + - b26fd49a-cbae-470a-a8f8-bcbc119e0390 + applied_payments: + - a9a94a75-19c1-41fe-90d8-d9ba959c38e5 + accounting_period: accounting_period + applied_to_lines: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + invoice: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + applied_date: '2020-03-31T00:00:00Z' + applied_amount: '2.9' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + create: + path: /accounting/v1/credit-notes + method: POST + auth: true + docs: Creates a `CreditNote` object with the given values. + source: + openapi: openapi/openapi.yml + request: + name: CreditNoteEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: root.CreditNoteRequest + content-type: application/json + response: + docs: '' + type: root.CreditNoteResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: 8d9fd929-436c-4fd4-a48b-0c61f68d6178 + remote_id: '123877' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + transaction_date: '2020-03-31T00:00:00Z' + status: SUBMITTED + number: CN-29 + contact: contact + company: company + exchange_rate: '2.9' + total_amount: 50 + remaining_credit: 20 + inclusive_of_tax: true + line_items: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121222' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + item: 0e3fd929-436c-4fd4-a48b-0c61f68d6178 + name: Basic Monthly + description: prorated amount for items + quantity: quantity + memo: privNote + unit_price: '5.0' + tax_rate: 8d9fd929-436c-4fd4-a48b-0c61f68d6178 + total_line_amount: '5.0' + tracking_categories: + - 8d9fd929-436c-4fd4-a48b-0c61f68d6178 + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + account: 8d9fd929-436c-4fd4-a48b-0c61f68d6178 + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + contact: 908934-49j9-093f-0989-908923908 + project: 22e65a5d-2df5-4e6e-884a-e538d0339000 + remote_was_deleted: true + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + currency: XUA + remote_created_at: '2020-03-31T00:00:00Z' + remote_updated_at: '2020-03-31T00:00:00Z' + payments: + - b26fd49a-cbae-470a-a8f8-bcbc119e0390 + applied_payments: + - a9a94a75-19c1-41fe-90d8-d9ba959c38e5 + accounting_period: accounting_period + applied_to_lines: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + invoice: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + applied_date: '2020-03-31T00:00:00Z' + applied_amount: '2.9' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /accounting/v1/credit-notes/{id} + method: GET + auth: true + docs: Returns a `CreditNote` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: CreditNotesRetrieveRequest + query-parameters: + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional + docs: >- + 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) + response: + docs: '' + type: root.CreditNote + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 8d9fd929-436c-4fd4-a48b-0c61f68d6178 + remote_id: '123877' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + transaction_date: '2020-03-31T00:00:00Z' + status: SUBMITTED + number: CN-29 + contact: contact + company: company + exchange_rate: '2.9' + total_amount: 50 + remaining_credit: 20 + inclusive_of_tax: true + line_items: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121222' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + item: 0e3fd929-436c-4fd4-a48b-0c61f68d6178 + name: Basic Monthly + description: prorated amount for items + quantity: quantity + memo: privNote + unit_price: '5.0' + tax_rate: 8d9fd929-436c-4fd4-a48b-0c61f68d6178 + total_line_amount: '5.0' + tracking_category: tracking_category + tracking_categories: + - 8d9fd929-436c-4fd4-a48b-0c61f68d6178 + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + account: 8d9fd929-436c-4fd4-a48b-0c61f68d6178 + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + contact: 908934-49j9-093f-0989-908923908 + project: 22e65a5d-2df5-4e6e-884a-e538d0339000 + remote_was_deleted: true + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + currency: XUA + remote_created_at: '2020-03-31T00:00:00Z' + remote_updated_at: '2020-03-31T00:00:00Z' + payments: + - b26fd49a-cbae-470a-a8f8-bcbc119e0390 + applied_payments: + - a9a94a75-19c1-41fe-90d8-d9ba959c38e5 + accounting_period: accounting_period + applied_to_lines: + - remote_id: '088899' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + invoice: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + applied_date: '2020-03-31T00:00:00Z' + applied_amount: '2.9' + remote_was_deleted: true + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + metaPostRetrieve: + path: /accounting/v1/credit-notes/meta/post + method: GET + auth: true + docs: Returns metadata for `CreditNote` POSTs. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/deleteAccount.yml b/.mock/definition/accounting/deleteAccount.yml new file mode 100644 index 0000000..402b4e7 --- /dev/null +++ b/.mock/definition/accounting/deleteAccount.yml @@ -0,0 +1,15 @@ +service: + auth: false + base-path: '' + endpoints: + delete: + path: /accounting/v1/delete-account + method: POST + auth: true + docs: Delete a linked account. + source: + openapi: openapi/openapi.yml + examples: + - headers: {} + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/employees.yml b/.mock/definition/accounting/employees.yml new file mode 100644 index 0000000..3ccf25f --- /dev/null +++ b/.mock/definition/accounting/employees.yml @@ -0,0 +1,137 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/employees + method: GET + auth: true + docs: Returns a list of `Employee` objects. + source: + openapi: openapi/openapi.yml + request: + name: EmployeesListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: root.PaginatedEmployeeList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: c640b80b-fac9-409f-aa19-1f9221aec445 + remote_id: '11167' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + first_name: John + last_name: Smith + is_contractor: true + employee_number: '325462' + email_address: johnsmith@merge.dev + company: company + status: ACTIVE + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + retrieve: + path: /accounting/v1/employees/{id} + method: GET + auth: true + docs: Returns an `Employee` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: EmployeesRetrieveRequest + query-parameters: + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.Employee + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: c640b80b-fac9-409f-aa19-1f9221aec445 + remote_id: '11167' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + first_name: John + last_name: Smith + is_contractor: true + employee_number: '325462' + email_address: johnsmith@merge.dev + company: company + status: ACTIVE + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/expenses.yml b/.mock/definition/accounting/expenses.yml new file mode 100644 index 0000000..98c48ed --- /dev/null +++ b/.mock/definition/accounting/expenses.yml @@ -0,0 +1,964 @@ +types: + ExpensesListRequestExpand: + enum: + - account + - value: account,accounting_period + name: AccountAccountingPeriod + - value: account,company + name: AccountCompany + - value: account,company,accounting_period + name: AccountCompanyAccountingPeriod + - value: account,company,employee + name: AccountCompanyEmployee + - value: account,company,employee,accounting_period + name: AccountCompanyEmployeeAccountingPeriod + - value: account,contact + name: AccountContact + - value: account,contact,accounting_period + name: AccountContactAccountingPeriod + - value: account,contact,company + name: AccountContactCompany + - value: account,contact,company,accounting_period + name: AccountContactCompanyAccountingPeriod + - value: account,contact,company,employee + name: AccountContactCompanyEmployee + - value: account,contact,company,employee,accounting_period + name: AccountContactCompanyEmployeeAccountingPeriod + - value: account,contact,employee + name: AccountContactEmployee + - value: account,contact,employee,accounting_period + name: AccountContactEmployeeAccountingPeriod + - value: account,employee + name: AccountEmployee + - value: account,employee,accounting_period + name: AccountEmployeeAccountingPeriod + - accounting_period + - company + - value: company,accounting_period + name: CompanyAccountingPeriod + - value: company,employee + name: CompanyEmployee + - value: company,employee,accounting_period + name: CompanyEmployeeAccountingPeriod + - contact + - value: contact,accounting_period + name: ContactAccountingPeriod + - value: contact,company + name: ContactCompany + - value: contact,company,accounting_period + name: ContactCompanyAccountingPeriod + - value: contact,company,employee + name: ContactCompanyEmployee + - value: contact,company,employee,accounting_period + name: ContactCompanyEmployeeAccountingPeriod + - value: contact,employee + name: ContactEmployee + - value: contact,employee,accounting_period + name: ContactEmployeeAccountingPeriod + - employee + - value: employee,accounting_period + name: EmployeeAccountingPeriod + - tracking_categories + - value: tracking_categories,account + name: TrackingCategoriesAccount + - value: tracking_categories,account,accounting_period + name: TrackingCategoriesAccountAccountingPeriod + - value: tracking_categories,account,company + name: TrackingCategoriesAccountCompany + - value: tracking_categories,account,company,accounting_period + name: TrackingCategoriesAccountCompanyAccountingPeriod + - value: tracking_categories,account,company,employee + name: TrackingCategoriesAccountCompanyEmployee + - value: tracking_categories,account,company,employee,accounting_period + name: TrackingCategoriesAccountCompanyEmployeeAccountingPeriod + - value: tracking_categories,account,contact + name: TrackingCategoriesAccountContact + - value: tracking_categories,account,contact,accounting_period + name: TrackingCategoriesAccountContactAccountingPeriod + - value: tracking_categories,account,contact,company + name: TrackingCategoriesAccountContactCompany + - value: tracking_categories,account,contact,company,accounting_period + name: TrackingCategoriesAccountContactCompanyAccountingPeriod + - value: tracking_categories,account,contact,company,employee + name: TrackingCategoriesAccountContactCompanyEmployee + - value: tracking_categories,account,contact,company,employee,accounting_period + name: TrackingCategoriesAccountContactCompanyEmployeeAccountingPeriod + - value: tracking_categories,account,contact,employee + name: TrackingCategoriesAccountContactEmployee + - value: tracking_categories,account,contact,employee,accounting_period + name: TrackingCategoriesAccountContactEmployeeAccountingPeriod + - value: tracking_categories,account,employee + name: TrackingCategoriesAccountEmployee + - value: tracking_categories,account,employee,accounting_period + name: TrackingCategoriesAccountEmployeeAccountingPeriod + - value: tracking_categories,accounting_period + name: TrackingCategoriesAccountingPeriod + - value: tracking_categories,company + name: TrackingCategoriesCompany + - value: tracking_categories,company,accounting_period + name: TrackingCategoriesCompanyAccountingPeriod + - value: tracking_categories,company,employee + name: TrackingCategoriesCompanyEmployee + - value: tracking_categories,company,employee,accounting_period + name: TrackingCategoriesCompanyEmployeeAccountingPeriod + - value: tracking_categories,contact + name: TrackingCategoriesContact + - value: tracking_categories,contact,accounting_period + name: TrackingCategoriesContactAccountingPeriod + - value: tracking_categories,contact,company + name: TrackingCategoriesContactCompany + - value: tracking_categories,contact,company,accounting_period + name: TrackingCategoriesContactCompanyAccountingPeriod + - value: tracking_categories,contact,company,employee + name: TrackingCategoriesContactCompanyEmployee + - value: tracking_categories,contact,company,employee,accounting_period + name: TrackingCategoriesContactCompanyEmployeeAccountingPeriod + - value: tracking_categories,contact,employee + name: TrackingCategoriesContactEmployee + - value: tracking_categories,contact,employee,accounting_period + name: TrackingCategoriesContactEmployeeAccountingPeriod + - value: tracking_categories,employee + name: TrackingCategoriesEmployee + - value: tracking_categories,employee,accounting_period + name: TrackingCategoriesEmployeeAccountingPeriod + source: + openapi: openapi/openapi.yml + ExpensesRetrieveRequestExpand: + enum: + - account + - value: account,accounting_period + name: AccountAccountingPeriod + - value: account,company + name: AccountCompany + - value: account,company,accounting_period + name: AccountCompanyAccountingPeriod + - value: account,company,employee + name: AccountCompanyEmployee + - value: account,company,employee,accounting_period + name: AccountCompanyEmployeeAccountingPeriod + - value: account,contact + name: AccountContact + - value: account,contact,accounting_period + name: AccountContactAccountingPeriod + - value: account,contact,company + name: AccountContactCompany + - value: account,contact,company,accounting_period + name: AccountContactCompanyAccountingPeriod + - value: account,contact,company,employee + name: AccountContactCompanyEmployee + - value: account,contact,company,employee,accounting_period + name: AccountContactCompanyEmployeeAccountingPeriod + - value: account,contact,employee + name: AccountContactEmployee + - value: account,contact,employee,accounting_period + name: AccountContactEmployeeAccountingPeriod + - value: account,employee + name: AccountEmployee + - value: account,employee,accounting_period + name: AccountEmployeeAccountingPeriod + - accounting_period + - company + - value: company,accounting_period + name: CompanyAccountingPeriod + - value: company,employee + name: CompanyEmployee + - value: company,employee,accounting_period + name: CompanyEmployeeAccountingPeriod + - contact + - value: contact,accounting_period + name: ContactAccountingPeriod + - value: contact,company + name: ContactCompany + - value: contact,company,accounting_period + name: ContactCompanyAccountingPeriod + - value: contact,company,employee + name: ContactCompanyEmployee + - value: contact,company,employee,accounting_period + name: ContactCompanyEmployeeAccountingPeriod + - value: contact,employee + name: ContactEmployee + - value: contact,employee,accounting_period + name: ContactEmployeeAccountingPeriod + - employee + - value: employee,accounting_period + name: EmployeeAccountingPeriod + - tracking_categories + - value: tracking_categories,account + name: TrackingCategoriesAccount + - value: tracking_categories,account,accounting_period + name: TrackingCategoriesAccountAccountingPeriod + - value: tracking_categories,account,company + name: TrackingCategoriesAccountCompany + - value: tracking_categories,account,company,accounting_period + name: TrackingCategoriesAccountCompanyAccountingPeriod + - value: tracking_categories,account,company,employee + name: TrackingCategoriesAccountCompanyEmployee + - value: tracking_categories,account,company,employee,accounting_period + name: TrackingCategoriesAccountCompanyEmployeeAccountingPeriod + - value: tracking_categories,account,contact + name: TrackingCategoriesAccountContact + - value: tracking_categories,account,contact,accounting_period + name: TrackingCategoriesAccountContactAccountingPeriod + - value: tracking_categories,account,contact,company + name: TrackingCategoriesAccountContactCompany + - value: tracking_categories,account,contact,company,accounting_period + name: TrackingCategoriesAccountContactCompanyAccountingPeriod + - value: tracking_categories,account,contact,company,employee + name: TrackingCategoriesAccountContactCompanyEmployee + - value: tracking_categories,account,contact,company,employee,accounting_period + name: TrackingCategoriesAccountContactCompanyEmployeeAccountingPeriod + - value: tracking_categories,account,contact,employee + name: TrackingCategoriesAccountContactEmployee + - value: tracking_categories,account,contact,employee,accounting_period + name: TrackingCategoriesAccountContactEmployeeAccountingPeriod + - value: tracking_categories,account,employee + name: TrackingCategoriesAccountEmployee + - value: tracking_categories,account,employee,accounting_period + name: TrackingCategoriesAccountEmployeeAccountingPeriod + - value: tracking_categories,accounting_period + name: TrackingCategoriesAccountingPeriod + - value: tracking_categories,company + name: TrackingCategoriesCompany + - value: tracking_categories,company,accounting_period + name: TrackingCategoriesCompanyAccountingPeriod + - value: tracking_categories,company,employee + name: TrackingCategoriesCompanyEmployee + - value: tracking_categories,company,employee,accounting_period + name: TrackingCategoriesCompanyEmployeeAccountingPeriod + - value: tracking_categories,contact + name: TrackingCategoriesContact + - value: tracking_categories,contact,accounting_period + name: TrackingCategoriesContactAccountingPeriod + - value: tracking_categories,contact,company + name: TrackingCategoriesContactCompany + - value: tracking_categories,contact,company,accounting_period + name: TrackingCategoriesContactCompanyAccountingPeriod + - value: tracking_categories,contact,company,employee + name: TrackingCategoriesContactCompanyEmployee + - value: tracking_categories,contact,company,employee,accounting_period + name: TrackingCategoriesContactCompanyEmployeeAccountingPeriod + - value: tracking_categories,contact,employee + name: TrackingCategoriesContactEmployee + - value: tracking_categories,contact,employee,accounting_period + name: TrackingCategoriesContactEmployeeAccountingPeriod + - value: tracking_categories,employee + name: TrackingCategoriesEmployee + - value: tracking_categories,employee,accounting_period + name: TrackingCategoriesEmployeeAccountingPeriod + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/expenses + method: GET + auth: true + docs: Returns a list of `Expense` objects. + source: + openapi: openapi/openapi.yml + request: + name: ExpensesListRequest + query-parameters: + company_id: + type: optional + docs: If provided, will only return expenses for this company. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + transaction_date_after: + type: optional + docs: If provided, will only return objects created after this datetime. + transaction_date_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + response: + docs: '' + type: root.PaginatedExpenseList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '088899' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + transaction_date: '2024-01-15T09:30:00Z' + remote_created_at: '2020-03-31T00:00:00Z' + account: account + contact: contact + total_amount: 10000 + sub_total: 1.1 + total_tax_amount: 1.1 + currency: XUA + exchange_rate: '2.9' + inclusive_of_tax: true + company: company + employee: employee + memo: New employee supplies + lines: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121222' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + item: b38c59b0-a9d7-4740-b1ee-5436c6751e3d + net_amount: 25.54 + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + employee: 7442f0d5-722d-45bd-b807-6e38489d37fe + account: 2a56344a-a491-11ec-b909-0242ac120002 + contact: c640b80b-fac9-409f-aa19-1f9221aec445 + project: 22e65a5d-2df5-4e6e-884a-e538d0339000 + description: MacBook Pro + exchange_rate: '2.9' + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + remote_was_deleted: false + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121223' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + item: b38c59b0-a9d7-4740-b1ee-5436c6751e3d + net_amount: 10 + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + account: 2a56344a-a491-11ec-b909-0242ac120002 + description: Desk Lamp + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + remote_was_deleted: true + accounting_period: accounting_period + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + create: + path: /accounting/v1/expenses + method: POST + auth: true + docs: Creates an `Expense` object with the given values. + source: + openapi: openapi/openapi.yml + request: + name: ExpenseEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: root.ExpenseRequest + content-type: application/json + response: + docs: '' + type: root.ExpenseResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '088899' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + transaction_date: '2024-01-15T09:30:00Z' + remote_created_at: '2020-03-31T00:00:00Z' + account: account + contact: contact + total_amount: 10000 + sub_total: 1.1 + total_tax_amount: 1.1 + currency: XUA + exchange_rate: '2.9' + inclusive_of_tax: true + company: company + employee: employee + memo: New employee supplies + lines: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121222' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + item: b38c59b0-a9d7-4740-b1ee-5436c6751e3d + net_amount: 25.54 + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + employee: 7442f0d5-722d-45bd-b807-6e38489d37fe + account: 2a56344a-a491-11ec-b909-0242ac120002 + contact: c640b80b-fac9-409f-aa19-1f9221aec445 + project: 22e65a5d-2df5-4e6e-884a-e538d0339000 + description: MacBook Pro + exchange_rate: '2.9' + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + remote_was_deleted: false + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121223' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + item: b38c59b0-a9d7-4740-b1ee-5436c6751e3d + net_amount: 10 + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + account: 2a56344a-a491-11ec-b909-0242ac120002 + description: Desk Lamp + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + remote_was_deleted: true + accounting_period: accounting_period + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /accounting/v1/expenses/{id} + method: GET + auth: true + docs: Returns an `Expense` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: ExpensesRetrieveRequest + query-parameters: + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.Expense + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '088899' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + transaction_date: '2024-01-15T09:30:00Z' + remote_created_at: '2020-03-31T00:00:00Z' + account: account + contact: contact + total_amount: 10000 + sub_total: 1.1 + total_tax_amount: 1.1 + currency: XUA + exchange_rate: '2.9' + inclusive_of_tax: true + company: company + employee: employee + memo: New employee supplies + lines: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121222' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + item: b38c59b0-a9d7-4740-b1ee-5436c6751e3d + net_amount: 25.54 + tracking_category: tracking_category + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + employee: 7442f0d5-722d-45bd-b807-6e38489d37fe + currency: XUA + account: 2a56344a-a491-11ec-b909-0242ac120002 + contact: c640b80b-fac9-409f-aa19-1f9221aec445 + project: 22e65a5d-2df5-4e6e-884a-e538d0339000 + description: MacBook Pro + exchange_rate: '2.9' + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + remote_was_deleted: false + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121223' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + item: b38c59b0-a9d7-4740-b1ee-5436c6751e3d + net_amount: 10 + tracking_category: tracking_category + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + employee: employee + currency: XUA + account: 2a56344a-a491-11ec-b909-0242ac120002 + contact: contact + project: project + description: Desk Lamp + exchange_rate: '2.9' + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + remote_was_deleted: true + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + remote_was_deleted: true + accounting_period: accounting_period + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + value: + key: value + linesRemoteFieldClassesList: + path: /accounting/v1/expenses/lines/remote-field-classes + method: GET + auth: true + docs: Returns a list of `RemoteFieldClass` objects. + source: + openapi: openapi/openapi.yml + request: + name: ExpensesLinesRemoteFieldClassesListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_common_model_field: + type: optional + docs: >- + If provided, will only return remote field classes with this + is_common_model_field value + is_custom: + type: optional + docs: >- + If provided, will only return remote fields classes with this + is_custom value + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: root.PaginatedRemoteFieldClassList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: id + display_name: display_name + remote_key_name: remote_key_name + description: description + is_custom: true + is_required: true + field_type: string + field_format: string + field_choices: + - field_choices + metaPostRetrieve: + path: /accounting/v1/expenses/meta/post + method: GET + auth: true + docs: Returns metadata for `Expense` POSTs. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + remoteFieldClassesList: + path: /accounting/v1/expenses/remote-field-classes + method: GET + auth: true + docs: Returns a list of `RemoteFieldClass` objects. + source: + openapi: openapi/openapi.yml + request: + name: ExpensesRemoteFieldClassesListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_common_model_field: + type: optional + docs: >- + If provided, will only return remote field classes with this + is_common_model_field value + is_custom: + type: optional + docs: >- + If provided, will only return remote fields classes with this + is_custom value + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: root.PaginatedRemoteFieldClassList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: id + display_name: display_name + remote_key_name: remote_key_name + description: description + is_custom: true + is_required: true + field_type: string + field_format: string + field_choices: + - field_choices + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/fieldMapping.yml b/.mock/definition/accounting/fieldMapping.yml new file mode 100644 index 0000000..7f10618 --- /dev/null +++ b/.mock/definition/accounting/fieldMapping.yml @@ -0,0 +1,1198 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + field_mappings_retrieve: + path: /accounting/v1/field-mappings + method: GET + auth: true + docs: >- + Get all Field Mappings for this Linked Account. Field Mappings are + mappings between third-party Remote Fields and user defined Merge + fields. [Learn + more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). + source: + openapi: openapi/openapi.yml + request: + name: FieldMappingsRetrieveRequest + query-parameters: + exclude_remote_field_metadata: + type: optional + docs: >- + If `true`, remote fields metadata is excluded from each field + mapping instance (i.e. `remote_fields.remote_key_name` and + `remote_fields.schema` will be null). This will increase the speed + of the request since these fields require some calculations. + response: + docs: '' + type: root.FieldMappingApiInstanceResponse + status-code: 200 + examples: + - headers: {} + response: + body: + Account: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + AccountingAttachment: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + BalanceSheet: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + CashFlowStatement: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + CompanyInfo: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Contact: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + IncomeStatement: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + CreditNote: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Item: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + PurchaseOrder: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + TrackingCategory: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + JournalEntry: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + TaxRate: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Invoice: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Payment: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Expense: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + VendorCredit: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Transaction: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + AccountingPeriod: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + GeneralLedgerTransaction: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + BankFeedAccount: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Employee: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + PaymentMethod: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Project: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + PaymentTerm: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + field_mappings_create: + path: /accounting/v1/field-mappings + method: POST + auth: true + docs: >- + Create new Field Mappings that will be available after the next + scheduled sync. This will cause the next sync for this Linked Account to + sync **ALL** data from start. + source: + openapi: openapi/openapi.yml + request: + name: CreateFieldMappingRequest + query-parameters: + exclude_remote_field_metadata: + type: optional + docs: >- + If `true`, remote fields metadata is excluded from each field + mapping instance (i.e. `remote_fields.remote_key_name` and + `remote_fields.schema` will be null). This will increase the speed + of the request since these fields require some calculations. + body: + properties: + target_field_name: + type: string + docs: >- + The name of the target field you want this remote field to map + to. + validation: + minLength: 1 + target_field_description: + type: string + docs: >- + The description of the target field you want this remote field + to map to. + validation: + minLength: 1 + remote_field_traversal_path: + docs: >- + The field traversal path of the remote field listed when you hit + the GET /remote-fields endpoint. + type: list + remote_method: + type: string + docs: >- + The method of the remote endpoint where the remote field is + coming from. + validation: + minLength: 1 + remote_url_path: + type: string + docs: >- + The path of the remote endpoint where the remote field is coming + from. + validation: + minLength: 1 + common_model_name: + type: string + docs: >- + The name of the Common Model that the remote field corresponds + to in a given category. + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: root.FieldMappingInstanceResponse + status-code: 201 + examples: + - headers: {} + request: + target_field_name: example_target_field_name + target_field_description: this is a example description of the target field + remote_field_traversal_path: + - example_remote_field + remote_method: GET + remote_url_path: /example-url-path + common_model_name: ExampleCommonModel + response: + body: + model: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + field_mappings_destroy: + path: /accounting/v1/field-mappings/{field_mapping_id} + method: DELETE + auth: true + docs: >- + Deletes Field Mappings for a Linked Account. All data related to this + Field Mapping will be deleted and these changes will be reflected after + the next scheduled sync. This will cause the next sync for this Linked + Account to sync **ALL** data from start. + source: + openapi: openapi/openapi.yml + path-parameters: + field_mapping_id: string + response: + docs: '' + type: root.FieldMappingInstanceResponse + status-code: 204 + examples: + - path-parameters: + field_mapping_id: field_mapping_id + headers: {} + response: + body: + model: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + field_mappings_partial_update: + path: /accounting/v1/field-mappings/{field_mapping_id} + method: PATCH + auth: true + docs: >- + Create or update existing Field Mappings for a Linked Account. Changes + will be reflected after the next scheduled sync. This will cause the + next sync for this Linked Account to sync **ALL** data from start. + source: + openapi: openapi/openapi.yml + path-parameters: + field_mapping_id: string + request: + name: PatchedEditFieldMappingRequest + body: + properties: + remote_field_traversal_path: + type: optional> + docs: >- + The field traversal path of the remote field listed when you hit + the GET /remote-fields endpoint. + remote_method: + type: optional + docs: >- + The method of the remote endpoint where the remote field is + coming from. + validation: + minLength: 1 + remote_url_path: + type: optional + docs: >- + The path of the remote endpoint where the remote field is coming + from. + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: root.FieldMappingInstanceResponse + status-code: 200 + examples: + - path-parameters: + field_mapping_id: field_mapping_id + headers: {} + request: {} + response: + body: + model: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + remote_fields_retrieve: + path: /accounting/v1/remote-fields + method: GET + auth: true + docs: >- + Get all remote fields for a Linked Account. Remote fields are + third-party fields that are accessible after initial sync if remote_data + is enabled. You can use remote fields to override existing Merge fields + or map a new Merge field. [Learn + more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). + source: + openapi: openapi/openapi.yml + request: + name: RemoteFieldsRetrieveRequest + query-parameters: + common_models: + type: optional + docs: >- + A comma seperated list of Common Model names. If included, will + only return Remote Fields for those Common Models. + include_example_values: + type: optional + docs: >- + If true, will include example values, where available, for remote + fields in the 3rd party platform. These examples come from active + data from your customers. + response: + docs: '' + type: root.RemoteFieldApiResponse + status-code: 200 + examples: + - headers: {} + response: + body: + Account: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + AccountingAttachment: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + BalanceSheet: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + CashFlowStatement: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + CompanyInfo: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Contact: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + IncomeStatement: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + CreditNote: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Item: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + PurchaseOrder: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + TrackingCategory: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + JournalEntry: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + TaxRate: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Invoice: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Payment: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Expense: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + VendorCredit: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Transaction: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + AccountingPeriod: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + GeneralLedgerTransaction: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + BankFeedAccount: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Employee: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + PaymentMethod: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Project: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + PaymentTerm: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + target_fields_retrieve: + path: /accounting/v1/target-fields + method: GET + auth: true + docs: >- + Get all organization-wide Target Fields, this will not include any + Linked Account specific Target Fields. Organization-wide Target Fields + are additional fields appended to the Merge Common Model for all Linked + Accounts in a category. [Learn + more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.ExternalTargetFieldApiResponse + status-code: 200 + examples: + - headers: {} + response: + body: + Account: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + AccountingAttachment: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + BalanceSheet: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + CashFlowStatement: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + CompanyInfo: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Contact: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + IncomeStatement: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + CreditNote: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Item: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + PurchaseOrder: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + TrackingCategory: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + JournalEntry: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + TaxRate: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Invoice: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Payment: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Expense: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + VendorCredit: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Transaction: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + AccountingPeriod: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + GeneralLedgerTransaction: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + BankFeedAccount: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Employee: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + PaymentMethod: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Project: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + PaymentTerm: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/forceResync.yml b/.mock/definition/accounting/forceResync.yml new file mode 100644 index 0000000..8e7e969 --- /dev/null +++ b/.mock/definition/accounting/forceResync.yml @@ -0,0 +1,37 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + sync_status_resync_create: + path: /accounting/v1/sync-status/resync + method: POST + auth: true + docs: >- + Force re-sync of all models. This endpoint is available for monthly, + quarterly, and highest sync frequency customers on the Professional or + Enterprise plans. Doing so will consume a sync credit for the relevant + linked account. Force re-syncs can also be triggered manually in the + Merge Dashboard and is available for all customers. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: list + status-code: 200 + examples: + - headers: {} + response: + body: + - model_name: Invoice + model_id: accounting.Invoices + last_sync_start: '2021-03-30T19:44:18Z' + next_sync_start: '2021-03-30T20:44:18Z' + last_sync_result: SYNCING + last_sync_finished: '2021-03-30T19:55:18Z' + status: SYNCING + is_initial_sync: true + selective_sync_configurations_usage: IN_NEXT_SYNC + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/generalLedgerTransactions.yml b/.mock/definition/accounting/generalLedgerTransactions.yml new file mode 100644 index 0000000..38fe729 --- /dev/null +++ b/.mock/definition/accounting/generalLedgerTransactions.yml @@ -0,0 +1,289 @@ +types: + GeneralLedgerTransactionsListRequestExpand: + enum: + - accounting_period + - company + - value: company,accounting_period + name: CompanyAccountingPeriod + - general_ledger_transaction_lines + - value: general_ledger_transaction_lines,accounting_period + name: GeneralLedgerTransactionLinesAccountingPeriod + - value: general_ledger_transaction_lines,company + name: GeneralLedgerTransactionLinesCompany + - value: general_ledger_transaction_lines,company,accounting_period + name: GeneralLedgerTransactionLinesCompanyAccountingPeriod + - tracking_categories + - value: tracking_categories,accounting_period + name: TrackingCategoriesAccountingPeriod + - value: tracking_categories,company + name: TrackingCategoriesCompany + - value: tracking_categories,company,accounting_period + name: TrackingCategoriesCompanyAccountingPeriod + - value: tracking_categories,general_ledger_transaction_lines + name: TrackingCategoriesGeneralLedgerTransactionLines + - value: tracking_categories,general_ledger_transaction_lines,accounting_period + name: TrackingCategoriesGeneralLedgerTransactionLinesAccountingPeriod + - value: tracking_categories,general_ledger_transaction_lines,company + name: TrackingCategoriesGeneralLedgerTransactionLinesCompany + - value: >- + tracking_categories,general_ledger_transaction_lines,company,accounting_period + name: TrackingCategoriesGeneralLedgerTransactionLinesCompanyAccountingPeriod + source: + openapi: openapi/openapi.yml + GeneralLedgerTransactionsRetrieveRequestExpand: + enum: + - accounting_period + - company + - value: company,accounting_period + name: CompanyAccountingPeriod + - general_ledger_transaction_lines + - value: general_ledger_transaction_lines,accounting_period + name: GeneralLedgerTransactionLinesAccountingPeriod + - value: general_ledger_transaction_lines,company + name: GeneralLedgerTransactionLinesCompany + - value: general_ledger_transaction_lines,company,accounting_period + name: GeneralLedgerTransactionLinesCompanyAccountingPeriod + - tracking_categories + - value: tracking_categories,accounting_period + name: TrackingCategoriesAccountingPeriod + - value: tracking_categories,company + name: TrackingCategoriesCompany + - value: tracking_categories,company,accounting_period + name: TrackingCategoriesCompanyAccountingPeriod + - value: tracking_categories,general_ledger_transaction_lines + name: TrackingCategoriesGeneralLedgerTransactionLines + - value: tracking_categories,general_ledger_transaction_lines,accounting_period + name: TrackingCategoriesGeneralLedgerTransactionLinesAccountingPeriod + - value: tracking_categories,general_ledger_transaction_lines,company + name: TrackingCategoriesGeneralLedgerTransactionLinesCompany + - value: >- + tracking_categories,general_ledger_transaction_lines,company,accounting_period + name: TrackingCategoriesGeneralLedgerTransactionLinesCompanyAccountingPeriod + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/general-ledger-transactions + method: GET + auth: true + docs: Returns a list of `GeneralLedgerTransaction` objects. + source: + openapi: openapi/openapi.yml + request: + name: GeneralLedgerTransactionsListRequest + query-parameters: + company_id: + type: optional + docs: >- + If provided, will only return general ledger transactions for this + company. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + posted_date_after: + type: optional + docs: If provided, will only return objects posted after this datetime. + posted_date_before: + type: optional + docs: If provided, will only return objects posted before this datetime. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: root.PaginatedGeneralLedgerTransactionList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: b26fd49a-cbae-470a-a8f8-bcbc119e0390 + remote_id: '987300' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + underlying_transaction_remote_id: '1234' + underlying_transaction_type: INVOICE + accounting_period: accounting_period + company: company + remote_updated_at: '2020-03-31T00:00:00Z' + remote_created_at: '2020-03-31T00:00:00Z' + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + posting_date: '2020-03-31T00:00:00Z' + general_ledger_transaction_lines: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '123' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + account: a47e11b6-c73b-4a0c-be31-130fc48177fa + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + contact: d6e687d6-0c36-48a1-8114-35324b5cb38f + base_currency: USD + transaction_currency: USD + exchange_rate: exchange_rate + description: Invoice created + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + debit_amount: debit_amount + credit_amount: credit_amount + item: a47e11b6-c73b-4a0c-be31-130fc48177fa + foreign_debit_amount: foreign_debit_amount + foreign_credit_amount: foreign_credit_amount + remote_was_deleted: false + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + retrieve: + path: /accounting/v1/general-ledger-transactions/{id} + method: GET + auth: true + docs: Returns a `GeneralLedgerTransaction` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: GeneralLedgerTransactionsRetrieveRequest + query-parameters: + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.GeneralLedgerTransaction + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: b26fd49a-cbae-470a-a8f8-bcbc119e0390 + remote_id: '987300' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + underlying_transaction_remote_id: '1234' + underlying_transaction_type: INVOICE + accounting_period: accounting_period + company: company + remote_updated_at: '2020-03-31T00:00:00Z' + remote_created_at: '2020-03-31T00:00:00Z' + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + posting_date: '2020-03-31T00:00:00Z' + general_ledger_transaction_lines: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '123' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + account: a47e11b6-c73b-4a0c-be31-130fc48177fa + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + employee: employee + contact: d6e687d6-0c36-48a1-8114-35324b5cb38f + project: project + base_currency: USD + transaction_currency: USD + exchange_rate: exchange_rate + description: Invoice created + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + debit_amount: debit_amount + credit_amount: credit_amount + item: a47e11b6-c73b-4a0c-be31-130fc48177fa + foreign_debit_amount: foreign_debit_amount + foreign_credit_amount: foreign_credit_amount + remote_was_deleted: false + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + data: + key: value + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/generateKey.yml b/.mock/definition/accounting/generateKey.yml new file mode 100644 index 0000000..4d79b8c --- /dev/null +++ b/.mock/definition/accounting/generateKey.yml @@ -0,0 +1,36 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /accounting/v1/generate-key + method: POST + auth: true + docs: Create a remote key. + source: + openapi: openapi/openapi.yml + request: + name: GenerateRemoteKeyRequest + body: + properties: + name: + type: string + docs: The name of the remote key + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: root.RemoteKey + status-code: 200 + examples: + - request: + name: Remote Deployment Key 1 + response: + body: + name: Remote Deployment Key 1 + key: hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/incomeStatements.yml b/.mock/definition/accounting/incomeStatements.yml new file mode 100644 index 0000000..92f62e7 --- /dev/null +++ b/.mock/definition/accounting/incomeStatements.yml @@ -0,0 +1,269 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/income-statements + method: GET + auth: true + docs: Returns a list of `IncomeStatement` objects. + source: + openapi: openapi/openapi.yml + request: + name: IncomeStatementsListRequest + query-parameters: + company_id: + type: optional + docs: If provided, will only return income statements for this company. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: root.PaginatedIncomeStatementList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 0958cbc6-6040-430a-848e-aafacbadf4ae + remote_id: '1342348' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: IncomeStatement + currency: XUA + company: company + start_period: '2024-01-15T09:30:00Z' + end_period: '2024-01-15T09:30:00Z' + income: + - remote_id: '10299' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Total Income + value: 325 + sub_items: + - remote_id: '10200' + name: Landscaping Services + value: 425 + - remote_id: '10201' + name: Pest Control Services + value: -100 + cost_of_sales: + - remote_id: '10299' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Total COGS + value: 25 + sub_items: + - remote_id: '10200' + name: Supplies + value: 10 + gross_profit: 300 + operating_expenses: + - remote_id: '10299' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Total Operating Expenses + value: 100 + sub_items: + - remote_id: '10300' + name: Revenue - San Francisco + value: 500 + - remote_id: '10301' + name: Revenue - New York + value: 500 + net_operating_income: 200 + non_operating_expenses: + - remote_id: '10299' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Total Non-Operating Expenses + value: 100 + sub_items: + - remote_id: '10300' + name: Revenue - San Francisco + value: 500 + - remote_id: '10301' + name: Revenue - New York + value: 500 + net_income: 100 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + retrieve: + path: /accounting/v1/income-statements/{id} + method: GET + auth: true + docs: Returns an `IncomeStatement` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: IncomeStatementsRetrieveRequest + query-parameters: + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.IncomeStatement + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 0958cbc6-6040-430a-848e-aafacbadf4ae + remote_id: '1342348' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: IncomeStatement + currency: XUA + company: company + start_period: '2024-01-15T09:30:00Z' + end_period: '2024-01-15T09:30:00Z' + income: + - remote_id: '10299' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Total Income + value: 325 + sub_items: + - remote_id: '10200' + name: Landscaping Services + value: 425 + - remote_id: '10201' + name: Pest Control Services + value: -100 + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: true + cost_of_sales: + - remote_id: '10299' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Total COGS + value: 25 + sub_items: + - remote_id: '10200' + name: Supplies + value: 10 + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: true + gross_profit: 300 + operating_expenses: + - remote_id: '10299' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Total Operating Expenses + value: 100 + sub_items: + - remote_id: '10300' + name: Revenue - San Francisco + value: 500 + - remote_id: '10301' + name: Revenue - New York + value: 500 + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: true + net_operating_income: 200 + non_operating_expenses: + - remote_id: '10299' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Total Non-Operating Expenses + value: 100 + sub_items: + - remote_id: '10300' + name: Revenue - San Francisco + value: 500 + - remote_id: '10301' + name: Revenue - New York + value: 500 + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: true + net_income: 100 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/invoices.yml b/.mock/definition/accounting/invoices.yml new file mode 100644 index 0000000..a3d8801 --- /dev/null +++ b/.mock/definition/accounting/invoices.yml @@ -0,0 +1,28100 @@ +types: + InvoicesListRequestExpand: + enum: + - accounting_period + - value: accounting_period,payment_term + name: AccountingPeriodPaymentTerm + - applied_credit_notes + - value: applied_credit_notes,accounting_period + name: AppliedCreditNotesAccountingPeriod + - value: applied_credit_notes,accounting_period,payment_term + name: AppliedCreditNotesAccountingPeriodPaymentTerm + - value: applied_credit_notes,applied_vendor_credits + name: AppliedCreditNotesAppliedVendorCredits + - value: applied_credit_notes,applied_vendor_credits,accounting_period + name: AppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: AppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: applied_credit_notes,applied_vendor_credits,company + name: AppliedCreditNotesAppliedVendorCreditsCompany + - value: applied_credit_notes,applied_vendor_credits,company,accounting_period + name: AppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + AppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: applied_credit_notes,applied_vendor_credits,company,employee + name: AppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: AppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + AppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: AppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: applied_credit_notes,applied_vendor_credits,company,payment_term + name: AppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: applied_credit_notes,applied_vendor_credits,contact + name: AppliedCreditNotesAppliedVendorCreditsContact + - value: applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: AppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + AppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: applied_credit_notes,applied_vendor_credits,contact,company + name: AppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: AppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + AppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: applied_credit_notes,applied_vendor_credits,contact,company,employee + name: AppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + AppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + AppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + AppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: AppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: applied_credit_notes,applied_vendor_credits,contact,employee + name: AppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: AppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + AppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: AppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: applied_credit_notes,applied_vendor_credits,contact,payment_term + name: AppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: applied_credit_notes,applied_vendor_credits,employee + name: AppliedCreditNotesAppliedVendorCreditsEmployee + - value: applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: AppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + AppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: applied_credit_notes,applied_vendor_credits,employee,payment_term + name: AppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: applied_credit_notes,applied_vendor_credits,payment_term + name: AppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: applied_credit_notes,company + name: AppliedCreditNotesCompany + - value: applied_credit_notes,company,accounting_period + name: AppliedCreditNotesCompanyAccountingPeriod + - value: applied_credit_notes,company,accounting_period,payment_term + name: AppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: applied_credit_notes,company,employee + name: AppliedCreditNotesCompanyEmployee + - value: applied_credit_notes,company,employee,accounting_period + name: AppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: applied_credit_notes,company,employee,accounting_period,payment_term + name: AppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: applied_credit_notes,company,employee,payment_term + name: AppliedCreditNotesCompanyEmployeePaymentTerm + - value: applied_credit_notes,company,payment_term + name: AppliedCreditNotesCompanyPaymentTerm + - value: applied_credit_notes,contact + name: AppliedCreditNotesContact + - value: applied_credit_notes,contact,accounting_period + name: AppliedCreditNotesContactAccountingPeriod + - value: applied_credit_notes,contact,accounting_period,payment_term + name: AppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: applied_credit_notes,contact,company + name: AppliedCreditNotesContactCompany + - value: applied_credit_notes,contact,company,accounting_period + name: AppliedCreditNotesContactCompanyAccountingPeriod + - value: applied_credit_notes,contact,company,accounting_period,payment_term + name: AppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: applied_credit_notes,contact,company,employee + name: AppliedCreditNotesContactCompanyEmployee + - value: applied_credit_notes,contact,company,employee,accounting_period + name: AppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: AppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: applied_credit_notes,contact,company,employee,payment_term + name: AppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: applied_credit_notes,contact,company,payment_term + name: AppliedCreditNotesContactCompanyPaymentTerm + - value: applied_credit_notes,contact,employee + name: AppliedCreditNotesContactEmployee + - value: applied_credit_notes,contact,employee,accounting_period + name: AppliedCreditNotesContactEmployeeAccountingPeriod + - value: applied_credit_notes,contact,employee,accounting_period,payment_term + name: AppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: applied_credit_notes,contact,employee,payment_term + name: AppliedCreditNotesContactEmployeePaymentTerm + - value: applied_credit_notes,contact,payment_term + name: AppliedCreditNotesContactPaymentTerm + - value: applied_credit_notes,employee + name: AppliedCreditNotesEmployee + - value: applied_credit_notes,employee,accounting_period + name: AppliedCreditNotesEmployeeAccountingPeriod + - value: applied_credit_notes,employee,accounting_period,payment_term + name: AppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: applied_credit_notes,employee,payment_term + name: AppliedCreditNotesEmployeePaymentTerm + - value: applied_credit_notes,payment_term + name: AppliedCreditNotesPaymentTerm + - applied_payments + - value: applied_payments,accounting_period + name: AppliedPaymentsAccountingPeriod + - value: applied_payments,accounting_period,payment_term + name: AppliedPaymentsAccountingPeriodPaymentTerm + - value: applied_payments,applied_credit_notes + name: AppliedPaymentsAppliedCreditNotes + - value: applied_payments,applied_credit_notes,accounting_period + name: AppliedPaymentsAppliedCreditNotesAccountingPeriod + - value: applied_payments,applied_credit_notes,accounting_period,payment_term + name: AppliedPaymentsAppliedCreditNotesAccountingPeriodPaymentTerm + - value: applied_payments,applied_credit_notes,applied_vendor_credits + name: AppliedPaymentsAppliedCreditNotesAppliedVendorCredits + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,accounting_period + name: AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: applied_payments,applied_credit_notes,applied_vendor_credits,company + name: AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,company,employee + name: AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: applied_payments,applied_credit_notes,applied_vendor_credits,contact + name: AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,contact,company + name: AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,contact,employee + name: AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: applied_payments,applied_credit_notes,applied_vendor_credits,employee + name: AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,payment_term + name: AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: applied_payments,applied_credit_notes,company + name: AppliedPaymentsAppliedCreditNotesCompany + - value: applied_payments,applied_credit_notes,company,accounting_period + name: AppliedPaymentsAppliedCreditNotesCompanyAccountingPeriod + - value: >- + applied_payments,applied_credit_notes,company,accounting_period,payment_term + name: AppliedPaymentsAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: applied_payments,applied_credit_notes,company,employee + name: AppliedPaymentsAppliedCreditNotesCompanyEmployee + - value: >- + applied_payments,applied_credit_notes,company,employee,accounting_period + name: AppliedPaymentsAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: applied_payments,applied_credit_notes,company,employee,payment_term + name: AppliedPaymentsAppliedCreditNotesCompanyEmployeePaymentTerm + - value: applied_payments,applied_credit_notes,company,payment_term + name: AppliedPaymentsAppliedCreditNotesCompanyPaymentTerm + - value: applied_payments,applied_credit_notes,contact + name: AppliedPaymentsAppliedCreditNotesContact + - value: applied_payments,applied_credit_notes,contact,accounting_period + name: AppliedPaymentsAppliedCreditNotesContactAccountingPeriod + - value: >- + applied_payments,applied_credit_notes,contact,accounting_period,payment_term + name: AppliedPaymentsAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: applied_payments,applied_credit_notes,contact,company + name: AppliedPaymentsAppliedCreditNotesContactCompany + - value: >- + applied_payments,applied_credit_notes,contact,company,accounting_period + name: AppliedPaymentsAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + applied_payments,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: applied_payments,applied_credit_notes,contact,company,employee + name: AppliedPaymentsAppliedCreditNotesContactCompanyEmployee + - value: >- + applied_payments,applied_credit_notes,contact,company,employee,accounting_period + name: >- + AppliedPaymentsAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,applied_credit_notes,contact,company,employee,payment_term + name: AppliedPaymentsAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: applied_payments,applied_credit_notes,contact,company,payment_term + name: AppliedPaymentsAppliedCreditNotesContactCompanyPaymentTerm + - value: applied_payments,applied_credit_notes,contact,employee + name: AppliedPaymentsAppliedCreditNotesContactEmployee + - value: >- + applied_payments,applied_credit_notes,contact,employee,accounting_period + name: AppliedPaymentsAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + applied_payments,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: applied_payments,applied_credit_notes,contact,employee,payment_term + name: AppliedPaymentsAppliedCreditNotesContactEmployeePaymentTerm + - value: applied_payments,applied_credit_notes,contact,payment_term + name: AppliedPaymentsAppliedCreditNotesContactPaymentTerm + - value: applied_payments,applied_credit_notes,employee + name: AppliedPaymentsAppliedCreditNotesEmployee + - value: applied_payments,applied_credit_notes,employee,accounting_period + name: AppliedPaymentsAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + applied_payments,applied_credit_notes,employee,accounting_period,payment_term + name: AppliedPaymentsAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: applied_payments,applied_credit_notes,employee,payment_term + name: AppliedPaymentsAppliedCreditNotesEmployeePaymentTerm + - value: applied_payments,applied_credit_notes,payment_term + name: AppliedPaymentsAppliedCreditNotesPaymentTerm + - value: applied_payments,applied_vendor_credits + name: AppliedPaymentsAppliedVendorCredits + - value: applied_payments,applied_vendor_credits,accounting_period + name: AppliedPaymentsAppliedVendorCreditsAccountingPeriod + - value: applied_payments,applied_vendor_credits,accounting_period,payment_term + name: AppliedPaymentsAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: applied_payments,applied_vendor_credits,company + name: AppliedPaymentsAppliedVendorCreditsCompany + - value: applied_payments,applied_vendor_credits,company,accounting_period + name: AppliedPaymentsAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + applied_payments,applied_vendor_credits,company,accounting_period,payment_term + name: AppliedPaymentsAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: applied_payments,applied_vendor_credits,company,employee + name: AppliedPaymentsAppliedVendorCreditsCompanyEmployee + - value: >- + applied_payments,applied_vendor_credits,company,employee,accounting_period + name: AppliedPaymentsAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: applied_payments,applied_vendor_credits,company,employee,payment_term + name: AppliedPaymentsAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: applied_payments,applied_vendor_credits,company,payment_term + name: AppliedPaymentsAppliedVendorCreditsCompanyPaymentTerm + - value: applied_payments,applied_vendor_credits,contact + name: AppliedPaymentsAppliedVendorCreditsContact + - value: applied_payments,applied_vendor_credits,contact,accounting_period + name: AppliedPaymentsAppliedVendorCreditsContactAccountingPeriod + - value: >- + applied_payments,applied_vendor_credits,contact,accounting_period,payment_term + name: AppliedPaymentsAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: applied_payments,applied_vendor_credits,contact,company + name: AppliedPaymentsAppliedVendorCreditsContactCompany + - value: >- + applied_payments,applied_vendor_credits,contact,company,accounting_period + name: AppliedPaymentsAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + applied_payments,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: applied_payments,applied_vendor_credits,contact,company,employee + name: AppliedPaymentsAppliedVendorCreditsContactCompanyEmployee + - value: >- + applied_payments,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + AppliedPaymentsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,applied_vendor_credits,contact,company,employee,payment_term + name: AppliedPaymentsAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: applied_payments,applied_vendor_credits,contact,company,payment_term + name: AppliedPaymentsAppliedVendorCreditsContactCompanyPaymentTerm + - value: applied_payments,applied_vendor_credits,contact,employee + name: AppliedPaymentsAppliedVendorCreditsContactEmployee + - value: >- + applied_payments,applied_vendor_credits,contact,employee,accounting_period + name: AppliedPaymentsAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + applied_payments,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: applied_payments,applied_vendor_credits,contact,employee,payment_term + name: AppliedPaymentsAppliedVendorCreditsContactEmployeePaymentTerm + - value: applied_payments,applied_vendor_credits,contact,payment_term + name: AppliedPaymentsAppliedVendorCreditsContactPaymentTerm + - value: applied_payments,applied_vendor_credits,employee + name: AppliedPaymentsAppliedVendorCreditsEmployee + - value: applied_payments,applied_vendor_credits,employee,accounting_period + name: AppliedPaymentsAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + applied_payments,applied_vendor_credits,employee,accounting_period,payment_term + name: AppliedPaymentsAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: applied_payments,applied_vendor_credits,employee,payment_term + name: AppliedPaymentsAppliedVendorCreditsEmployeePaymentTerm + - value: applied_payments,applied_vendor_credits,payment_term + name: AppliedPaymentsAppliedVendorCreditsPaymentTerm + - value: applied_payments,company + name: AppliedPaymentsCompany + - value: applied_payments,company,accounting_period + name: AppliedPaymentsCompanyAccountingPeriod + - value: applied_payments,company,accounting_period,payment_term + name: AppliedPaymentsCompanyAccountingPeriodPaymentTerm + - value: applied_payments,company,employee + name: AppliedPaymentsCompanyEmployee + - value: applied_payments,company,employee,accounting_period + name: AppliedPaymentsCompanyEmployeeAccountingPeriod + - value: applied_payments,company,employee,accounting_period,payment_term + name: AppliedPaymentsCompanyEmployeeAccountingPeriodPaymentTerm + - value: applied_payments,company,employee,payment_term + name: AppliedPaymentsCompanyEmployeePaymentTerm + - value: applied_payments,company,payment_term + name: AppliedPaymentsCompanyPaymentTerm + - value: applied_payments,contact + name: AppliedPaymentsContact + - value: applied_payments,contact,accounting_period + name: AppliedPaymentsContactAccountingPeriod + - value: applied_payments,contact,accounting_period,payment_term + name: AppliedPaymentsContactAccountingPeriodPaymentTerm + - value: applied_payments,contact,company + name: AppliedPaymentsContactCompany + - value: applied_payments,contact,company,accounting_period + name: AppliedPaymentsContactCompanyAccountingPeriod + - value: applied_payments,contact,company,accounting_period,payment_term + name: AppliedPaymentsContactCompanyAccountingPeriodPaymentTerm + - value: applied_payments,contact,company,employee + name: AppliedPaymentsContactCompanyEmployee + - value: applied_payments,contact,company,employee,accounting_period + name: AppliedPaymentsContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,contact,company,employee,accounting_period,payment_term + name: AppliedPaymentsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: applied_payments,contact,company,employee,payment_term + name: AppliedPaymentsContactCompanyEmployeePaymentTerm + - value: applied_payments,contact,company,payment_term + name: AppliedPaymentsContactCompanyPaymentTerm + - value: applied_payments,contact,employee + name: AppliedPaymentsContactEmployee + - value: applied_payments,contact,employee,accounting_period + name: AppliedPaymentsContactEmployeeAccountingPeriod + - value: applied_payments,contact,employee,accounting_period,payment_term + name: AppliedPaymentsContactEmployeeAccountingPeriodPaymentTerm + - value: applied_payments,contact,employee,payment_term + name: AppliedPaymentsContactEmployeePaymentTerm + - value: applied_payments,contact,payment_term + name: AppliedPaymentsContactPaymentTerm + - value: applied_payments,employee + name: AppliedPaymentsEmployee + - value: applied_payments,employee,accounting_period + name: AppliedPaymentsEmployeeAccountingPeriod + - value: applied_payments,employee,accounting_period,payment_term + name: AppliedPaymentsEmployeeAccountingPeriodPaymentTerm + - value: applied_payments,employee,payment_term + name: AppliedPaymentsEmployeePaymentTerm + - value: applied_payments,line_items + name: AppliedPaymentsLineItems + - value: applied_payments,line_items,accounting_period + name: AppliedPaymentsLineItemsAccountingPeriod + - value: applied_payments,line_items,accounting_period,payment_term + name: AppliedPaymentsLineItemsAccountingPeriodPaymentTerm + - value: applied_payments,line_items,applied_credit_notes + name: AppliedPaymentsLineItemsAppliedCreditNotes + - value: applied_payments,line_items,applied_credit_notes,accounting_period + name: AppliedPaymentsLineItemsAppliedCreditNotesAccountingPeriod + - value: >- + applied_payments,line_items,applied_credit_notes,accounting_period,payment_term + name: AppliedPaymentsLineItemsAppliedCreditNotesAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits + name: AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCredits + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company + name: AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company,employee + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact + name: AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,employee + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,employee + name: AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,payment_term + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: applied_payments,line_items,applied_credit_notes,company + name: AppliedPaymentsLineItemsAppliedCreditNotesCompany + - value: >- + applied_payments,line_items,applied_credit_notes,company,accounting_period + name: AppliedPaymentsLineItemsAppliedCreditNotesCompanyAccountingPeriod + - value: >- + applied_payments,line_items,applied_credit_notes,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: applied_payments,line_items,applied_credit_notes,company,employee + name: AppliedPaymentsLineItemsAppliedCreditNotesCompanyEmployee + - value: >- + applied_payments,line_items,applied_credit_notes,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,applied_credit_notes,company,employee,payment_term + name: AppliedPaymentsLineItemsAppliedCreditNotesCompanyEmployeePaymentTerm + - value: applied_payments,line_items,applied_credit_notes,company,payment_term + name: AppliedPaymentsLineItemsAppliedCreditNotesCompanyPaymentTerm + - value: applied_payments,line_items,applied_credit_notes,contact + name: AppliedPaymentsLineItemsAppliedCreditNotesContact + - value: >- + applied_payments,line_items,applied_credit_notes,contact,accounting_period + name: AppliedPaymentsLineItemsAppliedCreditNotesContactAccountingPeriod + - value: >- + applied_payments,line_items,applied_credit_notes,contact,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: applied_payments,line_items,applied_credit_notes,contact,company + name: AppliedPaymentsLineItemsAppliedCreditNotesContactCompany + - value: >- + applied_payments,line_items,applied_credit_notes,contact,company,accounting_period + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + applied_payments,line_items,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,applied_credit_notes,contact,company,employee + name: AppliedPaymentsLineItemsAppliedCreditNotesContactCompanyEmployee + - value: >- + applied_payments,line_items,applied_credit_notes,contact,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,applied_credit_notes,contact,company,employee,payment_term + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,applied_credit_notes,contact,company,payment_term + name: AppliedPaymentsLineItemsAppliedCreditNotesContactCompanyPaymentTerm + - value: applied_payments,line_items,applied_credit_notes,contact,employee + name: AppliedPaymentsLineItemsAppliedCreditNotesContactEmployee + - value: >- + applied_payments,line_items,applied_credit_notes,contact,employee,accounting_period + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,applied_credit_notes,contact,employee,payment_term + name: AppliedPaymentsLineItemsAppliedCreditNotesContactEmployeePaymentTerm + - value: applied_payments,line_items,applied_credit_notes,contact,payment_term + name: AppliedPaymentsLineItemsAppliedCreditNotesContactPaymentTerm + - value: applied_payments,line_items,applied_credit_notes,employee + name: AppliedPaymentsLineItemsAppliedCreditNotesEmployee + - value: >- + applied_payments,line_items,applied_credit_notes,employee,accounting_period + name: AppliedPaymentsLineItemsAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,applied_credit_notes,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: applied_payments,line_items,applied_credit_notes,employee,payment_term + name: AppliedPaymentsLineItemsAppliedCreditNotesEmployeePaymentTerm + - value: applied_payments,line_items,applied_credit_notes,payment_term + name: AppliedPaymentsLineItemsAppliedCreditNotesPaymentTerm + - value: applied_payments,line_items,applied_vendor_credits + name: AppliedPaymentsLineItemsAppliedVendorCredits + - value: applied_payments,line_items,applied_vendor_credits,accounting_period + name: AppliedPaymentsLineItemsAppliedVendorCreditsAccountingPeriod + - value: >- + applied_payments,line_items,applied_vendor_credits,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: applied_payments,line_items,applied_vendor_credits,company + name: AppliedPaymentsLineItemsAppliedVendorCreditsCompany + - value: >- + applied_payments,line_items,applied_vendor_credits,company,accounting_period + name: AppliedPaymentsLineItemsAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + applied_payments,line_items,applied_vendor_credits,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: applied_payments,line_items,applied_vendor_credits,company,employee + name: AppliedPaymentsLineItemsAppliedVendorCreditsCompanyEmployee + - value: >- + applied_payments,line_items,applied_vendor_credits,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,applied_vendor_credits,company,employee,payment_term + name: AppliedPaymentsLineItemsAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,applied_vendor_credits,company,payment_term + name: AppliedPaymentsLineItemsAppliedVendorCreditsCompanyPaymentTerm + - value: applied_payments,line_items,applied_vendor_credits,contact + name: AppliedPaymentsLineItemsAppliedVendorCreditsContact + - value: >- + applied_payments,line_items,applied_vendor_credits,contact,accounting_period + name: AppliedPaymentsLineItemsAppliedVendorCreditsContactAccountingPeriod + - value: >- + applied_payments,line_items,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: applied_payments,line_items,applied_vendor_credits,contact,company + name: AppliedPaymentsLineItemsAppliedVendorCreditsContactCompany + - value: >- + applied_payments,line_items,applied_vendor_credits,contact,company,accounting_period + name: >- + AppliedPaymentsLineItemsAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + applied_payments,line_items,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,applied_vendor_credits,contact,company,employee + name: AppliedPaymentsLineItemsAppliedVendorCreditsContactCompanyEmployee + - value: >- + applied_payments,line_items,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,applied_vendor_credits,contact,company,employee,payment_term + name: >- + AppliedPaymentsLineItemsAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,applied_vendor_credits,contact,company,payment_term + name: AppliedPaymentsLineItemsAppliedVendorCreditsContactCompanyPaymentTerm + - value: applied_payments,line_items,applied_vendor_credits,contact,employee + name: AppliedPaymentsLineItemsAppliedVendorCreditsContactEmployee + - value: >- + applied_payments,line_items,applied_vendor_credits,contact,employee,accounting_period + name: >- + AppliedPaymentsLineItemsAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,applied_vendor_credits,contact,employee,payment_term + name: AppliedPaymentsLineItemsAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + applied_payments,line_items,applied_vendor_credits,contact,payment_term + name: AppliedPaymentsLineItemsAppliedVendorCreditsContactPaymentTerm + - value: applied_payments,line_items,applied_vendor_credits,employee + name: AppliedPaymentsLineItemsAppliedVendorCreditsEmployee + - value: >- + applied_payments,line_items,applied_vendor_credits,employee,accounting_period + name: AppliedPaymentsLineItemsAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,applied_vendor_credits,employee,payment_term + name: AppliedPaymentsLineItemsAppliedVendorCreditsEmployeePaymentTerm + - value: applied_payments,line_items,applied_vendor_credits,payment_term + name: AppliedPaymentsLineItemsAppliedVendorCreditsPaymentTerm + - value: applied_payments,line_items,company + name: AppliedPaymentsLineItemsCompany + - value: applied_payments,line_items,company,accounting_period + name: AppliedPaymentsLineItemsCompanyAccountingPeriod + - value: applied_payments,line_items,company,accounting_period,payment_term + name: AppliedPaymentsLineItemsCompanyAccountingPeriodPaymentTerm + - value: applied_payments,line_items,company,employee + name: AppliedPaymentsLineItemsCompanyEmployee + - value: applied_payments,line_items,company,employee,accounting_period + name: AppliedPaymentsLineItemsCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,company,employee,accounting_period,payment_term + name: AppliedPaymentsLineItemsCompanyEmployeeAccountingPeriodPaymentTerm + - value: applied_payments,line_items,company,employee,payment_term + name: AppliedPaymentsLineItemsCompanyEmployeePaymentTerm + - value: applied_payments,line_items,company,payment_term + name: AppliedPaymentsLineItemsCompanyPaymentTerm + - value: applied_payments,line_items,contact + name: AppliedPaymentsLineItemsContact + - value: applied_payments,line_items,contact,accounting_period + name: AppliedPaymentsLineItemsContactAccountingPeriod + - value: applied_payments,line_items,contact,accounting_period,payment_term + name: AppliedPaymentsLineItemsContactAccountingPeriodPaymentTerm + - value: applied_payments,line_items,contact,company + name: AppliedPaymentsLineItemsContactCompany + - value: applied_payments,line_items,contact,company,accounting_period + name: AppliedPaymentsLineItemsContactCompanyAccountingPeriod + - value: >- + applied_payments,line_items,contact,company,accounting_period,payment_term + name: AppliedPaymentsLineItemsContactCompanyAccountingPeriodPaymentTerm + - value: applied_payments,line_items,contact,company,employee + name: AppliedPaymentsLineItemsContactCompanyEmployee + - value: applied_payments,line_items,contact,company,employee,accounting_period + name: AppliedPaymentsLineItemsContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: applied_payments,line_items,contact,company,employee,payment_term + name: AppliedPaymentsLineItemsContactCompanyEmployeePaymentTerm + - value: applied_payments,line_items,contact,company,payment_term + name: AppliedPaymentsLineItemsContactCompanyPaymentTerm + - value: applied_payments,line_items,contact,employee + name: AppliedPaymentsLineItemsContactEmployee + - value: applied_payments,line_items,contact,employee,accounting_period + name: AppliedPaymentsLineItemsContactEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,contact,employee,accounting_period,payment_term + name: AppliedPaymentsLineItemsContactEmployeeAccountingPeriodPaymentTerm + - value: applied_payments,line_items,contact,employee,payment_term + name: AppliedPaymentsLineItemsContactEmployeePaymentTerm + - value: applied_payments,line_items,contact,payment_term + name: AppliedPaymentsLineItemsContactPaymentTerm + - value: applied_payments,line_items,employee + name: AppliedPaymentsLineItemsEmployee + - value: applied_payments,line_items,employee,accounting_period + name: AppliedPaymentsLineItemsEmployeeAccountingPeriod + - value: applied_payments,line_items,employee,accounting_period,payment_term + name: AppliedPaymentsLineItemsEmployeeAccountingPeriodPaymentTerm + - value: applied_payments,line_items,employee,payment_term + name: AppliedPaymentsLineItemsEmployeePaymentTerm + - value: applied_payments,line_items,payment_term + name: AppliedPaymentsLineItemsPaymentTerm + - value: applied_payments,line_items,purchase_orders + name: AppliedPaymentsLineItemsPurchaseOrders + - value: applied_payments,line_items,purchase_orders,accounting_period + name: AppliedPaymentsLineItemsPurchaseOrdersAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,accounting_period,payment_term + name: AppliedPaymentsLineItemsPurchaseOrdersAccountingPeriodPaymentTerm + - value: applied_payments,line_items,purchase_orders,applied_credit_notes + name: AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotes + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,accounting_period + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCredits + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,company + name: AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompany + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,company,accounting_period + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,company,employee + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployee + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,company,employee,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,company,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,contact + name: AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContact + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,contact,accounting_period + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,contact,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company + name: AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompany + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company,accounting_period + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company,employee + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployee + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company,employee,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,contact,employee + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactEmployee + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,contact,employee,accounting_period + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,contact,employee,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactEmployeePaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,contact,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,employee + name: AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesEmployee + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,employee,accounting_period + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,employee,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesEmployeePaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,payment_term + name: AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesPaymentTerm + - value: applied_payments,line_items,purchase_orders,applied_vendor_credits + name: AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCredits + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,accounting_period + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,company + name: AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompany + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,company,accounting_period + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,company,employee + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployee + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,company,employee,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,company,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,contact + name: AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContact + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,accounting_period + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompany + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company,accounting_period + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company,employee + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company,employee,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,employee + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployee + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,employee,accounting_period + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,employee,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,employee + name: AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsEmployee + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,employee,accounting_period + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,employee,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsEmployeePaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,payment_term + name: AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsPaymentTerm + - value: applied_payments,line_items,purchase_orders,company + name: AppliedPaymentsLineItemsPurchaseOrdersCompany + - value: applied_payments,line_items,purchase_orders,company,accounting_period + name: AppliedPaymentsLineItemsPurchaseOrdersCompanyAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersCompanyAccountingPeriodPaymentTerm + - value: applied_payments,line_items,purchase_orders,company,employee + name: AppliedPaymentsLineItemsPurchaseOrdersCompanyEmployee + - value: >- + applied_payments,line_items,purchase_orders,company,employee,accounting_period + name: AppliedPaymentsLineItemsPurchaseOrdersCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,company,employee,payment_term + name: AppliedPaymentsLineItemsPurchaseOrdersCompanyEmployeePaymentTerm + - value: applied_payments,line_items,purchase_orders,company,payment_term + name: AppliedPaymentsLineItemsPurchaseOrdersCompanyPaymentTerm + - value: applied_payments,line_items,purchase_orders,contact + name: AppliedPaymentsLineItemsPurchaseOrdersContact + - value: applied_payments,line_items,purchase_orders,contact,accounting_period + name: AppliedPaymentsLineItemsPurchaseOrdersContactAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,contact,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersContactAccountingPeriodPaymentTerm + - value: applied_payments,line_items,purchase_orders,contact,company + name: AppliedPaymentsLineItemsPurchaseOrdersContactCompany + - value: >- + applied_payments,line_items,purchase_orders,contact,company,accounting_period + name: AppliedPaymentsLineItemsPurchaseOrdersContactCompanyAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersContactCompanyAccountingPeriodPaymentTerm + - value: applied_payments,line_items,purchase_orders,contact,company,employee + name: AppliedPaymentsLineItemsPurchaseOrdersContactCompanyEmployee + - value: >- + applied_payments,line_items,purchase_orders,contact,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsPurchaseOrdersContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,contact,company,employee,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersContactCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,contact,company,payment_term + name: AppliedPaymentsLineItemsPurchaseOrdersContactCompanyPaymentTerm + - value: applied_payments,line_items,purchase_orders,contact,employee + name: AppliedPaymentsLineItemsPurchaseOrdersContactEmployee + - value: >- + applied_payments,line_items,purchase_orders,contact,employee,accounting_period + name: AppliedPaymentsLineItemsPurchaseOrdersContactEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,contact,employee,payment_term + name: AppliedPaymentsLineItemsPurchaseOrdersContactEmployeePaymentTerm + - value: applied_payments,line_items,purchase_orders,contact,payment_term + name: AppliedPaymentsLineItemsPurchaseOrdersContactPaymentTerm + - value: applied_payments,line_items,purchase_orders,employee + name: AppliedPaymentsLineItemsPurchaseOrdersEmployee + - value: applied_payments,line_items,purchase_orders,employee,accounting_period + name: AppliedPaymentsLineItemsPurchaseOrdersEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersEmployeeAccountingPeriodPaymentTerm + - value: applied_payments,line_items,purchase_orders,employee,payment_term + name: AppliedPaymentsLineItemsPurchaseOrdersEmployeePaymentTerm + - value: applied_payments,line_items,purchase_orders,payment_term + name: AppliedPaymentsLineItemsPurchaseOrdersPaymentTerm + - value: applied_payments,line_items,tracking_categories + name: AppliedPaymentsLineItemsTrackingCategories + - value: applied_payments,line_items,tracking_categories,accounting_period + name: AppliedPaymentsLineItemsTrackingCategoriesAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,accounting_period,payment_term + name: AppliedPaymentsLineItemsTrackingCategoriesAccountingPeriodPaymentTerm + - value: applied_payments,line_items,tracking_categories,applied_credit_notes + name: AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotes + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCredits + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,company + name: AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompany + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,company,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,company,employee + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployee + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,company,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,company,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,contact + name: AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContact + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,contact,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,contact,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompany + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company,employee + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployee + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,contact,employee + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactEmployee + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,contact,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,contact,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,contact,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,employee + name: AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesEmployee + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesPaymentTerm + - value: applied_payments,line_items,tracking_categories,applied_vendor_credits + name: AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCredits + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,company + name: AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompany + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,company,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,company,employee + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployee + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,company,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,company,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,contact + name: AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContact + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompany + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company,employee + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployee + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,employee + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployee + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,employee + name: AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsEmployee + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsPaymentTerm + - value: applied_payments,line_items,tracking_categories,company + name: AppliedPaymentsLineItemsTrackingCategoriesCompany + - value: >- + applied_payments,line_items,tracking_categories,company,accounting_period + name: AppliedPaymentsLineItemsTrackingCategoriesCompanyAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesCompanyAccountingPeriodPaymentTerm + - value: applied_payments,line_items,tracking_categories,company,employee + name: AppliedPaymentsLineItemsTrackingCategoriesCompanyEmployee + - value: >- + applied_payments,line_items,tracking_categories,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,company,employee,payment_term + name: AppliedPaymentsLineItemsTrackingCategoriesCompanyEmployeePaymentTerm + - value: applied_payments,line_items,tracking_categories,company,payment_term + name: AppliedPaymentsLineItemsTrackingCategoriesCompanyPaymentTerm + - value: applied_payments,line_items,tracking_categories,contact + name: AppliedPaymentsLineItemsTrackingCategoriesContact + - value: >- + applied_payments,line_items,tracking_categories,contact,accounting_period + name: AppliedPaymentsLineItemsTrackingCategoriesContactAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,contact,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesContactAccountingPeriodPaymentTerm + - value: applied_payments,line_items,tracking_categories,contact,company + name: AppliedPaymentsLineItemsTrackingCategoriesContactCompany + - value: >- + applied_payments,line_items,tracking_categories,contact,company,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesContactCompanyAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesContactCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,contact,company,employee + name: AppliedPaymentsLineItemsTrackingCategoriesContactCompanyEmployee + - value: >- + applied_payments,line_items,tracking_categories,contact,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,contact,company,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesContactCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,contact,company,payment_term + name: AppliedPaymentsLineItemsTrackingCategoriesContactCompanyPaymentTerm + - value: applied_payments,line_items,tracking_categories,contact,employee + name: AppliedPaymentsLineItemsTrackingCategoriesContactEmployee + - value: >- + applied_payments,line_items,tracking_categories,contact,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesContactEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,contact,employee,payment_term + name: AppliedPaymentsLineItemsTrackingCategoriesContactEmployeePaymentTerm + - value: applied_payments,line_items,tracking_categories,contact,payment_term + name: AppliedPaymentsLineItemsTrackingCategoriesContactPaymentTerm + - value: applied_payments,line_items,tracking_categories,employee + name: AppliedPaymentsLineItemsTrackingCategoriesEmployee + - value: >- + applied_payments,line_items,tracking_categories,employee,accounting_period + name: AppliedPaymentsLineItemsTrackingCategoriesEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesEmployeeAccountingPeriodPaymentTerm + - value: applied_payments,line_items,tracking_categories,employee,payment_term + name: AppliedPaymentsLineItemsTrackingCategoriesEmployeePaymentTerm + - value: applied_payments,line_items,tracking_categories,payment_term + name: AppliedPaymentsLineItemsTrackingCategoriesPaymentTerm + - value: applied_payments,line_items,tracking_categories,purchase_orders + name: AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrders + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotes + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCredits + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompany + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployee + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContact + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompany + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployee + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployee + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,employee + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployee + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCredits + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompany + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployee + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContact + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompany + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployee + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployee + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,company + name: AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompany + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,company,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,company,employee + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployee + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,company,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,company,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,contact + name: AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContact + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,contact,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,contact,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,contact,company + name: AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompany + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,contact,company,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,contact,company,employee + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployee + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,contact,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,contact,company,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,contact,company,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,contact,employee + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactEmployee + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,contact,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,contact,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,contact,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,employee + name: AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersEmployee + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,payment_term + name: AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersPaymentTerm + - value: applied_payments,payment_term + name: AppliedPaymentsPaymentTerm + - value: applied_payments,purchase_orders + name: AppliedPaymentsPurchaseOrders + - value: applied_payments,purchase_orders,accounting_period + name: AppliedPaymentsPurchaseOrdersAccountingPeriod + - value: applied_payments,purchase_orders,accounting_period,payment_term + name: AppliedPaymentsPurchaseOrdersAccountingPeriodPaymentTerm + - value: applied_payments,purchase_orders,applied_credit_notes + name: AppliedPaymentsPurchaseOrdersAppliedCreditNotes + - value: >- + applied_payments,purchase_orders,applied_credit_notes,accounting_period + name: AppliedPaymentsPurchaseOrdersAppliedCreditNotesAccountingPeriod + - value: >- + applied_payments,purchase_orders,applied_credit_notes,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAccountingPeriodPaymentTerm + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits + name: AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCredits + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,employee + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: applied_payments,purchase_orders,applied_credit_notes,company + name: AppliedPaymentsPurchaseOrdersAppliedCreditNotesCompany + - value: >- + applied_payments,purchase_orders,applied_credit_notes,company,accounting_period + name: AppliedPaymentsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod + - value: >- + applied_payments,purchase_orders,applied_credit_notes,company,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: applied_payments,purchase_orders,applied_credit_notes,company,employee + name: AppliedPaymentsPurchaseOrdersAppliedCreditNotesCompanyEmployee + - value: >- + applied_payments,purchase_orders,applied_credit_notes,company,employee,accounting_period + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,purchase_orders,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,purchase_orders,applied_credit_notes,company,employee,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesCompanyEmployeePaymentTerm + - value: >- + applied_payments,purchase_orders,applied_credit_notes,company,payment_term + name: AppliedPaymentsPurchaseOrdersAppliedCreditNotesCompanyPaymentTerm + - value: applied_payments,purchase_orders,applied_credit_notes,contact + name: AppliedPaymentsPurchaseOrdersAppliedCreditNotesContact + - value: >- + applied_payments,purchase_orders,applied_credit_notes,contact,accounting_period + name: AppliedPaymentsPurchaseOrdersAppliedCreditNotesContactAccountingPeriod + - value: >- + applied_payments,purchase_orders,applied_credit_notes,contact,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: applied_payments,purchase_orders,applied_credit_notes,contact,company + name: AppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompany + - value: >- + applied_payments,purchase_orders,applied_credit_notes,contact,company,accounting_period + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + applied_payments,purchase_orders,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,purchase_orders,applied_credit_notes,contact,company,employee + name: AppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyEmployee + - value: >- + applied_payments,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,purchase_orders,applied_credit_notes,contact,company,employee,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: >- + applied_payments,purchase_orders,applied_credit_notes,contact,company,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyPaymentTerm + - value: applied_payments,purchase_orders,applied_credit_notes,contact,employee + name: AppliedPaymentsPurchaseOrdersAppliedCreditNotesContactEmployee + - value: >- + applied_payments,purchase_orders,applied_credit_notes,contact,employee,accounting_period + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + applied_payments,purchase_orders,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,purchase_orders,applied_credit_notes,contact,employee,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesContactEmployeePaymentTerm + - value: >- + applied_payments,purchase_orders,applied_credit_notes,contact,payment_term + name: AppliedPaymentsPurchaseOrdersAppliedCreditNotesContactPaymentTerm + - value: applied_payments,purchase_orders,applied_credit_notes,employee + name: AppliedPaymentsPurchaseOrdersAppliedCreditNotesEmployee + - value: >- + applied_payments,purchase_orders,applied_credit_notes,employee,accounting_period + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + applied_payments,purchase_orders,applied_credit_notes,employee,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,purchase_orders,applied_credit_notes,employee,payment_term + name: AppliedPaymentsPurchaseOrdersAppliedCreditNotesEmployeePaymentTerm + - value: applied_payments,purchase_orders,applied_credit_notes,payment_term + name: AppliedPaymentsPurchaseOrdersAppliedCreditNotesPaymentTerm + - value: applied_payments,purchase_orders,applied_vendor_credits + name: AppliedPaymentsPurchaseOrdersAppliedVendorCredits + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,accounting_period + name: AppliedPaymentsPurchaseOrdersAppliedVendorCreditsAccountingPeriod + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: applied_payments,purchase_orders,applied_vendor_credits,company + name: AppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompany + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,company,accounting_period + name: >- + AppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,company,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,company,employee + name: AppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompanyEmployee + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,company,employee,accounting_period + name: >- + AppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,company,employee,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,company,payment_term + name: AppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompanyPaymentTerm + - value: applied_payments,purchase_orders,applied_vendor_credits,contact + name: AppliedPaymentsPurchaseOrdersAppliedVendorCreditsContact + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,contact,accounting_period + name: >- + AppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,contact,company + name: AppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompany + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,contact,company,accounting_period + name: >- + AppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,contact,company,employee + name: >- + AppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + AppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,contact,company,employee,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,contact,company,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,contact,employee + name: AppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactEmployee + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,contact,employee,accounting_period + name: >- + AppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,contact,employee,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,contact,payment_term + name: AppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactPaymentTerm + - value: applied_payments,purchase_orders,applied_vendor_credits,employee + name: AppliedPaymentsPurchaseOrdersAppliedVendorCreditsEmployee + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,employee,accounting_period + name: >- + AppliedPaymentsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,employee,payment_term + name: AppliedPaymentsPurchaseOrdersAppliedVendorCreditsEmployeePaymentTerm + - value: applied_payments,purchase_orders,applied_vendor_credits,payment_term + name: AppliedPaymentsPurchaseOrdersAppliedVendorCreditsPaymentTerm + - value: applied_payments,purchase_orders,company + name: AppliedPaymentsPurchaseOrdersCompany + - value: applied_payments,purchase_orders,company,accounting_period + name: AppliedPaymentsPurchaseOrdersCompanyAccountingPeriod + - value: >- + applied_payments,purchase_orders,company,accounting_period,payment_term + name: AppliedPaymentsPurchaseOrdersCompanyAccountingPeriodPaymentTerm + - value: applied_payments,purchase_orders,company,employee + name: AppliedPaymentsPurchaseOrdersCompanyEmployee + - value: applied_payments,purchase_orders,company,employee,accounting_period + name: AppliedPaymentsPurchaseOrdersCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,purchase_orders,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersCompanyEmployeeAccountingPeriodPaymentTerm + - value: applied_payments,purchase_orders,company,employee,payment_term + name: AppliedPaymentsPurchaseOrdersCompanyEmployeePaymentTerm + - value: applied_payments,purchase_orders,company,payment_term + name: AppliedPaymentsPurchaseOrdersCompanyPaymentTerm + - value: applied_payments,purchase_orders,contact + name: AppliedPaymentsPurchaseOrdersContact + - value: applied_payments,purchase_orders,contact,accounting_period + name: AppliedPaymentsPurchaseOrdersContactAccountingPeriod + - value: >- + applied_payments,purchase_orders,contact,accounting_period,payment_term + name: AppliedPaymentsPurchaseOrdersContactAccountingPeriodPaymentTerm + - value: applied_payments,purchase_orders,contact,company + name: AppliedPaymentsPurchaseOrdersContactCompany + - value: applied_payments,purchase_orders,contact,company,accounting_period + name: AppliedPaymentsPurchaseOrdersContactCompanyAccountingPeriod + - value: >- + applied_payments,purchase_orders,contact,company,accounting_period,payment_term + name: AppliedPaymentsPurchaseOrdersContactCompanyAccountingPeriodPaymentTerm + - value: applied_payments,purchase_orders,contact,company,employee + name: AppliedPaymentsPurchaseOrdersContactCompanyEmployee + - value: >- + applied_payments,purchase_orders,contact,company,employee,accounting_period + name: AppliedPaymentsPurchaseOrdersContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,purchase_orders,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: applied_payments,purchase_orders,contact,company,employee,payment_term + name: AppliedPaymentsPurchaseOrdersContactCompanyEmployeePaymentTerm + - value: applied_payments,purchase_orders,contact,company,payment_term + name: AppliedPaymentsPurchaseOrdersContactCompanyPaymentTerm + - value: applied_payments,purchase_orders,contact,employee + name: AppliedPaymentsPurchaseOrdersContactEmployee + - value: applied_payments,purchase_orders,contact,employee,accounting_period + name: AppliedPaymentsPurchaseOrdersContactEmployeeAccountingPeriod + - value: >- + applied_payments,purchase_orders,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersContactEmployeeAccountingPeriodPaymentTerm + - value: applied_payments,purchase_orders,contact,employee,payment_term + name: AppliedPaymentsPurchaseOrdersContactEmployeePaymentTerm + - value: applied_payments,purchase_orders,contact,payment_term + name: AppliedPaymentsPurchaseOrdersContactPaymentTerm + - value: applied_payments,purchase_orders,employee + name: AppliedPaymentsPurchaseOrdersEmployee + - value: applied_payments,purchase_orders,employee,accounting_period + name: AppliedPaymentsPurchaseOrdersEmployeeAccountingPeriod + - value: >- + applied_payments,purchase_orders,employee,accounting_period,payment_term + name: AppliedPaymentsPurchaseOrdersEmployeeAccountingPeriodPaymentTerm + - value: applied_payments,purchase_orders,employee,payment_term + name: AppliedPaymentsPurchaseOrdersEmployeePaymentTerm + - value: applied_payments,purchase_orders,payment_term + name: AppliedPaymentsPurchaseOrdersPaymentTerm + - value: applied_payments,tracking_categories + name: AppliedPaymentsTrackingCategories + - value: applied_payments,tracking_categories,accounting_period + name: AppliedPaymentsTrackingCategoriesAccountingPeriod + - value: applied_payments,tracking_categories,accounting_period,payment_term + name: AppliedPaymentsTrackingCategoriesAccountingPeriodPaymentTerm + - value: applied_payments,tracking_categories,applied_credit_notes + name: AppliedPaymentsTrackingCategoriesAppliedCreditNotes + - value: >- + applied_payments,tracking_categories,applied_credit_notes,accounting_period + name: AppliedPaymentsTrackingCategoriesAppliedCreditNotesAccountingPeriod + - value: >- + applied_payments,tracking_categories,applied_credit_notes,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCredits + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,employee + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: applied_payments,tracking_categories,applied_credit_notes,company + name: AppliedPaymentsTrackingCategoriesAppliedCreditNotesCompany + - value: >- + applied_payments,tracking_categories,applied_credit_notes,company,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriod + - value: >- + applied_payments,tracking_categories,applied_credit_notes,company,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,company,employee + name: AppliedPaymentsTrackingCategoriesAppliedCreditNotesCompanyEmployee + - value: >- + applied_payments,tracking_categories,applied_credit_notes,company,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,company,employee,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesCompanyEmployeePaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,company,payment_term + name: AppliedPaymentsTrackingCategoriesAppliedCreditNotesCompanyPaymentTerm + - value: applied_payments,tracking_categories,applied_credit_notes,contact + name: AppliedPaymentsTrackingCategoriesAppliedCreditNotesContact + - value: >- + applied_payments,tracking_categories,applied_credit_notes,contact,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesContactAccountingPeriod + - value: >- + applied_payments,tracking_categories,applied_credit_notes,contact,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,contact,company + name: AppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompany + - value: >- + applied_payments,tracking_categories,applied_credit_notes,contact,company,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + applied_payments,tracking_categories,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,contact,company,employee + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyEmployee + - value: >- + applied_payments,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,contact,company,employee,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,contact,company,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,contact,employee + name: AppliedPaymentsTrackingCategoriesAppliedCreditNotesContactEmployee + - value: >- + applied_payments,tracking_categories,applied_credit_notes,contact,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,contact,employee,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesContactEmployeePaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,contact,payment_term + name: AppliedPaymentsTrackingCategoriesAppliedCreditNotesContactPaymentTerm + - value: applied_payments,tracking_categories,applied_credit_notes,employee + name: AppliedPaymentsTrackingCategoriesAppliedCreditNotesEmployee + - value: >- + applied_payments,tracking_categories,applied_credit_notes,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,applied_credit_notes,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,employee,payment_term + name: AppliedPaymentsTrackingCategoriesAppliedCreditNotesEmployeePaymentTerm + - value: applied_payments,tracking_categories,applied_credit_notes,payment_term + name: AppliedPaymentsTrackingCategoriesAppliedCreditNotesPaymentTerm + - value: applied_payments,tracking_categories,applied_vendor_credits + name: AppliedPaymentsTrackingCategoriesAppliedVendorCredits + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,accounting_period + name: AppliedPaymentsTrackingCategoriesAppliedVendorCreditsAccountingPeriod + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: applied_payments,tracking_categories,applied_vendor_credits,company + name: AppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompany + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,company,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,company,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,company,employee + name: AppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompanyEmployee + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,company,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,company,employee,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,company,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompanyPaymentTerm + - value: applied_payments,tracking_categories,applied_vendor_credits,contact + name: AppliedPaymentsTrackingCategoriesAppliedVendorCreditsContact + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,contact,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriod + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,contact,company + name: AppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompany + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,contact,company,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,contact,company,employee + name: >- + AppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployee + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,contact,company,employee,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,contact,company,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,contact,employee + name: AppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactEmployee + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,contact,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,contact,employee,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,contact,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactPaymentTerm + - value: applied_payments,tracking_categories,applied_vendor_credits,employee + name: AppliedPaymentsTrackingCategoriesAppliedVendorCreditsEmployee + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,employee,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,payment_term + name: AppliedPaymentsTrackingCategoriesAppliedVendorCreditsPaymentTerm + - value: applied_payments,tracking_categories,company + name: AppliedPaymentsTrackingCategoriesCompany + - value: applied_payments,tracking_categories,company,accounting_period + name: AppliedPaymentsTrackingCategoriesCompanyAccountingPeriod + - value: >- + applied_payments,tracking_categories,company,accounting_period,payment_term + name: AppliedPaymentsTrackingCategoriesCompanyAccountingPeriodPaymentTerm + - value: applied_payments,tracking_categories,company,employee + name: AppliedPaymentsTrackingCategoriesCompanyEmployee + - value: >- + applied_payments,tracking_categories,company,employee,accounting_period + name: AppliedPaymentsTrackingCategoriesCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesCompanyEmployeeAccountingPeriodPaymentTerm + - value: applied_payments,tracking_categories,company,employee,payment_term + name: AppliedPaymentsTrackingCategoriesCompanyEmployeePaymentTerm + - value: applied_payments,tracking_categories,company,payment_term + name: AppliedPaymentsTrackingCategoriesCompanyPaymentTerm + - value: applied_payments,tracking_categories,contact + name: AppliedPaymentsTrackingCategoriesContact + - value: applied_payments,tracking_categories,contact,accounting_period + name: AppliedPaymentsTrackingCategoriesContactAccountingPeriod + - value: >- + applied_payments,tracking_categories,contact,accounting_period,payment_term + name: AppliedPaymentsTrackingCategoriesContactAccountingPeriodPaymentTerm + - value: applied_payments,tracking_categories,contact,company + name: AppliedPaymentsTrackingCategoriesContactCompany + - value: applied_payments,tracking_categories,contact,company,accounting_period + name: AppliedPaymentsTrackingCategoriesContactCompanyAccountingPeriod + - value: >- + applied_payments,tracking_categories,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesContactCompanyAccountingPeriodPaymentTerm + - value: applied_payments,tracking_categories,contact,company,employee + name: AppliedPaymentsTrackingCategoriesContactCompanyEmployee + - value: >- + applied_payments,tracking_categories,contact,company,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,contact,company,employee,payment_term + name: AppliedPaymentsTrackingCategoriesContactCompanyEmployeePaymentTerm + - value: applied_payments,tracking_categories,contact,company,payment_term + name: AppliedPaymentsTrackingCategoriesContactCompanyPaymentTerm + - value: applied_payments,tracking_categories,contact,employee + name: AppliedPaymentsTrackingCategoriesContactEmployee + - value: >- + applied_payments,tracking_categories,contact,employee,accounting_period + name: AppliedPaymentsTrackingCategoriesContactEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesContactEmployeeAccountingPeriodPaymentTerm + - value: applied_payments,tracking_categories,contact,employee,payment_term + name: AppliedPaymentsTrackingCategoriesContactEmployeePaymentTerm + - value: applied_payments,tracking_categories,contact,payment_term + name: AppliedPaymentsTrackingCategoriesContactPaymentTerm + - value: applied_payments,tracking_categories,employee + name: AppliedPaymentsTrackingCategoriesEmployee + - value: applied_payments,tracking_categories,employee,accounting_period + name: AppliedPaymentsTrackingCategoriesEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,employee,accounting_period,payment_term + name: AppliedPaymentsTrackingCategoriesEmployeeAccountingPeriodPaymentTerm + - value: applied_payments,tracking_categories,employee,payment_term + name: AppliedPaymentsTrackingCategoriesEmployeePaymentTerm + - value: applied_payments,tracking_categories,payment_term + name: AppliedPaymentsTrackingCategoriesPaymentTerm + - value: applied_payments,tracking_categories,purchase_orders + name: AppliedPaymentsTrackingCategoriesPurchaseOrders + - value: applied_payments,tracking_categories,purchase_orders,accounting_period + name: AppliedPaymentsTrackingCategoriesPurchaseOrdersAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes + name: AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotes + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCredits + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompany + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company,employee + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployee + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company,employee,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeePaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContact + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompany + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployee + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,employee + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployee + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeePaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,employee + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployee + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,employee,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeePaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits + name: AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCredits + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompany + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company,employee + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployee + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContact + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompany + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployee + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,employee + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployee + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,employee,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeePaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsPaymentTerm + - value: applied_payments,tracking_categories,purchase_orders,company + name: AppliedPaymentsTrackingCategoriesPurchaseOrdersCompany + - value: >- + applied_payments,tracking_categories,purchase_orders,company,accounting_period + name: AppliedPaymentsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,company,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriodPaymentTerm + - value: applied_payments,tracking_categories,purchase_orders,company,employee + name: AppliedPaymentsTrackingCategoriesPurchaseOrdersCompanyEmployee + - value: >- + applied_payments,tracking_categories,purchase_orders,company,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,company,employee,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersCompanyEmployeePaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,company,payment_term + name: AppliedPaymentsTrackingCategoriesPurchaseOrdersCompanyPaymentTerm + - value: applied_payments,tracking_categories,purchase_orders,contact + name: AppliedPaymentsTrackingCategoriesPurchaseOrdersContact + - value: >- + applied_payments,tracking_categories,purchase_orders,contact,accounting_period + name: AppliedPaymentsTrackingCategoriesPurchaseOrdersContactAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,contact,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersContactAccountingPeriodPaymentTerm + - value: applied_payments,tracking_categories,purchase_orders,contact,company + name: AppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompany + - value: >- + applied_payments,tracking_categories,purchase_orders,contact,company,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,contact,company,employee + name: AppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompanyEmployee + - value: >- + applied_payments,tracking_categories,purchase_orders,contact,company,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,contact,company,employee,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompanyEmployeePaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,contact,company,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompanyPaymentTerm + - value: applied_payments,tracking_categories,purchase_orders,contact,employee + name: AppliedPaymentsTrackingCategoriesPurchaseOrdersContactEmployee + - value: >- + applied_payments,tracking_categories,purchase_orders,contact,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,contact,employee,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersContactEmployeePaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,contact,payment_term + name: AppliedPaymentsTrackingCategoriesPurchaseOrdersContactPaymentTerm + - value: applied_payments,tracking_categories,purchase_orders,employee + name: AppliedPaymentsTrackingCategoriesPurchaseOrdersEmployee + - value: >- + applied_payments,tracking_categories,purchase_orders,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,employee,payment_term + name: AppliedPaymentsTrackingCategoriesPurchaseOrdersEmployeePaymentTerm + - value: applied_payments,tracking_categories,purchase_orders,payment_term + name: AppliedPaymentsTrackingCategoriesPurchaseOrdersPaymentTerm + - applied_vendor_credits + - value: applied_vendor_credits,accounting_period + name: AppliedVendorCreditsAccountingPeriod + - value: applied_vendor_credits,accounting_period,payment_term + name: AppliedVendorCreditsAccountingPeriodPaymentTerm + - value: applied_vendor_credits,company + name: AppliedVendorCreditsCompany + - value: applied_vendor_credits,company,accounting_period + name: AppliedVendorCreditsCompanyAccountingPeriod + - value: applied_vendor_credits,company,accounting_period,payment_term + name: AppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: applied_vendor_credits,company,employee + name: AppliedVendorCreditsCompanyEmployee + - value: applied_vendor_credits,company,employee,accounting_period + name: AppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: applied_vendor_credits,company,employee,accounting_period,payment_term + name: AppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: applied_vendor_credits,company,employee,payment_term + name: AppliedVendorCreditsCompanyEmployeePaymentTerm + - value: applied_vendor_credits,company,payment_term + name: AppliedVendorCreditsCompanyPaymentTerm + - value: applied_vendor_credits,contact + name: AppliedVendorCreditsContact + - value: applied_vendor_credits,contact,accounting_period + name: AppliedVendorCreditsContactAccountingPeriod + - value: applied_vendor_credits,contact,accounting_period,payment_term + name: AppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: applied_vendor_credits,contact,company + name: AppliedVendorCreditsContactCompany + - value: applied_vendor_credits,contact,company,accounting_period + name: AppliedVendorCreditsContactCompanyAccountingPeriod + - value: applied_vendor_credits,contact,company,accounting_period,payment_term + name: AppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: applied_vendor_credits,contact,company,employee + name: AppliedVendorCreditsContactCompanyEmployee + - value: applied_vendor_credits,contact,company,employee,accounting_period + name: AppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: AppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: applied_vendor_credits,contact,company,employee,payment_term + name: AppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: applied_vendor_credits,contact,company,payment_term + name: AppliedVendorCreditsContactCompanyPaymentTerm + - value: applied_vendor_credits,contact,employee + name: AppliedVendorCreditsContactEmployee + - value: applied_vendor_credits,contact,employee,accounting_period + name: AppliedVendorCreditsContactEmployeeAccountingPeriod + - value: applied_vendor_credits,contact,employee,accounting_period,payment_term + name: AppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: applied_vendor_credits,contact,employee,payment_term + name: AppliedVendorCreditsContactEmployeePaymentTerm + - value: applied_vendor_credits,contact,payment_term + name: AppliedVendorCreditsContactPaymentTerm + - value: applied_vendor_credits,employee + name: AppliedVendorCreditsEmployee + - value: applied_vendor_credits,employee,accounting_period + name: AppliedVendorCreditsEmployeeAccountingPeriod + - value: applied_vendor_credits,employee,accounting_period,payment_term + name: AppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: applied_vendor_credits,employee,payment_term + name: AppliedVendorCreditsEmployeePaymentTerm + - value: applied_vendor_credits,payment_term + name: AppliedVendorCreditsPaymentTerm + - company + - value: company,accounting_period + name: CompanyAccountingPeriod + - value: company,accounting_period,payment_term + name: CompanyAccountingPeriodPaymentTerm + - value: company,employee + name: CompanyEmployee + - value: company,employee,accounting_period + name: CompanyEmployeeAccountingPeriod + - value: company,employee,accounting_period,payment_term + name: CompanyEmployeeAccountingPeriodPaymentTerm + - value: company,employee,payment_term + name: CompanyEmployeePaymentTerm + - value: company,payment_term + name: CompanyPaymentTerm + - contact + - value: contact,accounting_period + name: ContactAccountingPeriod + - value: contact,accounting_period,payment_term + name: ContactAccountingPeriodPaymentTerm + - value: contact,company + name: ContactCompany + - value: contact,company,accounting_period + name: ContactCompanyAccountingPeriod + - value: contact,company,accounting_period,payment_term + name: ContactCompanyAccountingPeriodPaymentTerm + - value: contact,company,employee + name: ContactCompanyEmployee + - value: contact,company,employee,accounting_period + name: ContactCompanyEmployeeAccountingPeriod + - value: contact,company,employee,accounting_period,payment_term + name: ContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: contact,company,employee,payment_term + name: ContactCompanyEmployeePaymentTerm + - value: contact,company,payment_term + name: ContactCompanyPaymentTerm + - value: contact,employee + name: ContactEmployee + - value: contact,employee,accounting_period + name: ContactEmployeeAccountingPeriod + - value: contact,employee,accounting_period,payment_term + name: ContactEmployeeAccountingPeriodPaymentTerm + - value: contact,employee,payment_term + name: ContactEmployeePaymentTerm + - value: contact,payment_term + name: ContactPaymentTerm + - employee + - value: employee,accounting_period + name: EmployeeAccountingPeriod + - value: employee,accounting_period,payment_term + name: EmployeeAccountingPeriodPaymentTerm + - value: employee,payment_term + name: EmployeePaymentTerm + - line_items + - value: line_items,accounting_period + name: LineItemsAccountingPeriod + - value: line_items,accounting_period,payment_term + name: LineItemsAccountingPeriodPaymentTerm + - value: line_items,applied_credit_notes + name: LineItemsAppliedCreditNotes + - value: line_items,applied_credit_notes,accounting_period + name: LineItemsAppliedCreditNotesAccountingPeriod + - value: line_items,applied_credit_notes,accounting_period,payment_term + name: LineItemsAppliedCreditNotesAccountingPeriodPaymentTerm + - value: line_items,applied_credit_notes,applied_vendor_credits + name: LineItemsAppliedCreditNotesAppliedVendorCredits + - value: >- + line_items,applied_credit_notes,applied_vendor_credits,accounting_period + name: LineItemsAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + line_items,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + LineItemsAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: line_items,applied_credit_notes,applied_vendor_credits,company + name: LineItemsAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + line_items,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: LineItemsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + line_items,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + LineItemsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + line_items,applied_credit_notes,applied_vendor_credits,company,employee + name: LineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + line_items,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + LineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + line_items,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + LineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + LineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + line_items,applied_credit_notes,applied_vendor_credits,company,payment_term + name: LineItemsAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: line_items,applied_credit_notes,applied_vendor_credits,contact + name: LineItemsAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + line_items,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: LineItemsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + line_items,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + LineItemsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: line_items,applied_credit_notes,applied_vendor_credits,contact,company + name: LineItemsAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + line_items,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + LineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + line_items,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + LineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: LineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + LineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + LineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + LineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + line_items,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + LineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + line_items,applied_credit_notes,applied_vendor_credits,contact,employee + name: LineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + line_items,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + LineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + line_items,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + LineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + LineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + line_items,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: LineItemsAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: line_items,applied_credit_notes,applied_vendor_credits,employee + name: LineItemsAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + line_items,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + LineItemsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + line_items,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + LineItemsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: LineItemsAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: line_items,applied_credit_notes,applied_vendor_credits,payment_term + name: LineItemsAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: line_items,applied_credit_notes,company + name: LineItemsAppliedCreditNotesCompany + - value: line_items,applied_credit_notes,company,accounting_period + name: LineItemsAppliedCreditNotesCompanyAccountingPeriod + - value: line_items,applied_credit_notes,company,accounting_period,payment_term + name: LineItemsAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: line_items,applied_credit_notes,company,employee + name: LineItemsAppliedCreditNotesCompanyEmployee + - value: line_items,applied_credit_notes,company,employee,accounting_period + name: LineItemsAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + line_items,applied_credit_notes,company,employee,accounting_period,payment_term + name: LineItemsAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: line_items,applied_credit_notes,company,employee,payment_term + name: LineItemsAppliedCreditNotesCompanyEmployeePaymentTerm + - value: line_items,applied_credit_notes,company,payment_term + name: LineItemsAppliedCreditNotesCompanyPaymentTerm + - value: line_items,applied_credit_notes,contact + name: LineItemsAppliedCreditNotesContact + - value: line_items,applied_credit_notes,contact,accounting_period + name: LineItemsAppliedCreditNotesContactAccountingPeriod + - value: line_items,applied_credit_notes,contact,accounting_period,payment_term + name: LineItemsAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: line_items,applied_credit_notes,contact,company + name: LineItemsAppliedCreditNotesContactCompany + - value: line_items,applied_credit_notes,contact,company,accounting_period + name: LineItemsAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + line_items,applied_credit_notes,contact,company,accounting_period,payment_term + name: LineItemsAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: line_items,applied_credit_notes,contact,company,employee + name: LineItemsAppliedCreditNotesContactCompanyEmployee + - value: >- + line_items,applied_credit_notes,contact,company,employee,accounting_period + name: LineItemsAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + line_items,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + LineItemsAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: line_items,applied_credit_notes,contact,company,employee,payment_term + name: LineItemsAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: line_items,applied_credit_notes,contact,company,payment_term + name: LineItemsAppliedCreditNotesContactCompanyPaymentTerm + - value: line_items,applied_credit_notes,contact,employee + name: LineItemsAppliedCreditNotesContactEmployee + - value: line_items,applied_credit_notes,contact,employee,accounting_period + name: LineItemsAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + line_items,applied_credit_notes,contact,employee,accounting_period,payment_term + name: LineItemsAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: line_items,applied_credit_notes,contact,employee,payment_term + name: LineItemsAppliedCreditNotesContactEmployeePaymentTerm + - value: line_items,applied_credit_notes,contact,payment_term + name: LineItemsAppliedCreditNotesContactPaymentTerm + - value: line_items,applied_credit_notes,employee + name: LineItemsAppliedCreditNotesEmployee + - value: line_items,applied_credit_notes,employee,accounting_period + name: LineItemsAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + line_items,applied_credit_notes,employee,accounting_period,payment_term + name: LineItemsAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: line_items,applied_credit_notes,employee,payment_term + name: LineItemsAppliedCreditNotesEmployeePaymentTerm + - value: line_items,applied_credit_notes,payment_term + name: LineItemsAppliedCreditNotesPaymentTerm + - value: line_items,applied_vendor_credits + name: LineItemsAppliedVendorCredits + - value: line_items,applied_vendor_credits,accounting_period + name: LineItemsAppliedVendorCreditsAccountingPeriod + - value: line_items,applied_vendor_credits,accounting_period,payment_term + name: LineItemsAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: line_items,applied_vendor_credits,company + name: LineItemsAppliedVendorCreditsCompany + - value: line_items,applied_vendor_credits,company,accounting_period + name: LineItemsAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + line_items,applied_vendor_credits,company,accounting_period,payment_term + name: LineItemsAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: line_items,applied_vendor_credits,company,employee + name: LineItemsAppliedVendorCreditsCompanyEmployee + - value: line_items,applied_vendor_credits,company,employee,accounting_period + name: LineItemsAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + line_items,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + LineItemsAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: line_items,applied_vendor_credits,company,employee,payment_term + name: LineItemsAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: line_items,applied_vendor_credits,company,payment_term + name: LineItemsAppliedVendorCreditsCompanyPaymentTerm + - value: line_items,applied_vendor_credits,contact + name: LineItemsAppliedVendorCreditsContact + - value: line_items,applied_vendor_credits,contact,accounting_period + name: LineItemsAppliedVendorCreditsContactAccountingPeriod + - value: >- + line_items,applied_vendor_credits,contact,accounting_period,payment_term + name: LineItemsAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: line_items,applied_vendor_credits,contact,company + name: LineItemsAppliedVendorCreditsContactCompany + - value: line_items,applied_vendor_credits,contact,company,accounting_period + name: LineItemsAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + line_items,applied_vendor_credits,contact,company,accounting_period,payment_term + name: LineItemsAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: line_items,applied_vendor_credits,contact,company,employee + name: LineItemsAppliedVendorCreditsContactCompanyEmployee + - value: >- + line_items,applied_vendor_credits,contact,company,employee,accounting_period + name: LineItemsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + line_items,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + LineItemsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,applied_vendor_credits,contact,company,employee,payment_term + name: LineItemsAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: line_items,applied_vendor_credits,contact,company,payment_term + name: LineItemsAppliedVendorCreditsContactCompanyPaymentTerm + - value: line_items,applied_vendor_credits,contact,employee + name: LineItemsAppliedVendorCreditsContactEmployee + - value: line_items,applied_vendor_credits,contact,employee,accounting_period + name: LineItemsAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + line_items,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + LineItemsAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: line_items,applied_vendor_credits,contact,employee,payment_term + name: LineItemsAppliedVendorCreditsContactEmployeePaymentTerm + - value: line_items,applied_vendor_credits,contact,payment_term + name: LineItemsAppliedVendorCreditsContactPaymentTerm + - value: line_items,applied_vendor_credits,employee + name: LineItemsAppliedVendorCreditsEmployee + - value: line_items,applied_vendor_credits,employee,accounting_period + name: LineItemsAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + line_items,applied_vendor_credits,employee,accounting_period,payment_term + name: LineItemsAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: line_items,applied_vendor_credits,employee,payment_term + name: LineItemsAppliedVendorCreditsEmployeePaymentTerm + - value: line_items,applied_vendor_credits,payment_term + name: LineItemsAppliedVendorCreditsPaymentTerm + - value: line_items,company + name: LineItemsCompany + - value: line_items,company,accounting_period + name: LineItemsCompanyAccountingPeriod + - value: line_items,company,accounting_period,payment_term + name: LineItemsCompanyAccountingPeriodPaymentTerm + - value: line_items,company,employee + name: LineItemsCompanyEmployee + - value: line_items,company,employee,accounting_period + name: LineItemsCompanyEmployeeAccountingPeriod + - value: line_items,company,employee,accounting_period,payment_term + name: LineItemsCompanyEmployeeAccountingPeriodPaymentTerm + - value: line_items,company,employee,payment_term + name: LineItemsCompanyEmployeePaymentTerm + - value: line_items,company,payment_term + name: LineItemsCompanyPaymentTerm + - value: line_items,contact + name: LineItemsContact + - value: line_items,contact,accounting_period + name: LineItemsContactAccountingPeriod + - value: line_items,contact,accounting_period,payment_term + name: LineItemsContactAccountingPeriodPaymentTerm + - value: line_items,contact,company + name: LineItemsContactCompany + - value: line_items,contact,company,accounting_period + name: LineItemsContactCompanyAccountingPeriod + - value: line_items,contact,company,accounting_period,payment_term + name: LineItemsContactCompanyAccountingPeriodPaymentTerm + - value: line_items,contact,company,employee + name: LineItemsContactCompanyEmployee + - value: line_items,contact,company,employee,accounting_period + name: LineItemsContactCompanyEmployeeAccountingPeriod + - value: line_items,contact,company,employee,accounting_period,payment_term + name: LineItemsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: line_items,contact,company,employee,payment_term + name: LineItemsContactCompanyEmployeePaymentTerm + - value: line_items,contact,company,payment_term + name: LineItemsContactCompanyPaymentTerm + - value: line_items,contact,employee + name: LineItemsContactEmployee + - value: line_items,contact,employee,accounting_period + name: LineItemsContactEmployeeAccountingPeriod + - value: line_items,contact,employee,accounting_period,payment_term + name: LineItemsContactEmployeeAccountingPeriodPaymentTerm + - value: line_items,contact,employee,payment_term + name: LineItemsContactEmployeePaymentTerm + - value: line_items,contact,payment_term + name: LineItemsContactPaymentTerm + - value: line_items,employee + name: LineItemsEmployee + - value: line_items,employee,accounting_period + name: LineItemsEmployeeAccountingPeriod + - value: line_items,employee,accounting_period,payment_term + name: LineItemsEmployeeAccountingPeriodPaymentTerm + - value: line_items,employee,payment_term + name: LineItemsEmployeePaymentTerm + - value: line_items,payment_term + name: LineItemsPaymentTerm + - value: line_items,purchase_orders + name: LineItemsPurchaseOrders + - value: line_items,purchase_orders,accounting_period + name: LineItemsPurchaseOrdersAccountingPeriod + - value: line_items,purchase_orders,accounting_period,payment_term + name: LineItemsPurchaseOrdersAccountingPeriodPaymentTerm + - value: line_items,purchase_orders,applied_credit_notes + name: LineItemsPurchaseOrdersAppliedCreditNotes + - value: line_items,purchase_orders,applied_credit_notes,accounting_period + name: LineItemsPurchaseOrdersAppliedCreditNotesAccountingPeriod + - value: >- + line_items,purchase_orders,applied_credit_notes,accounting_period,payment_term + name: LineItemsPurchaseOrdersAppliedCreditNotesAccountingPeriodPaymentTerm + - value: line_items,purchase_orders,applied_credit_notes,applied_vendor_credits + name: LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCredits + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company + name: LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact + name: LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee + name: LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,payment_term + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: line_items,purchase_orders,applied_credit_notes,company + name: LineItemsPurchaseOrdersAppliedCreditNotesCompany + - value: >- + line_items,purchase_orders,applied_credit_notes,company,accounting_period + name: LineItemsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod + - value: >- + line_items,purchase_orders,applied_credit_notes,company,accounting_period,payment_term + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: line_items,purchase_orders,applied_credit_notes,company,employee + name: LineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployee + - value: >- + line_items,purchase_orders,applied_credit_notes,company,employee,accounting_period + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + line_items,purchase_orders,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,purchase_orders,applied_credit_notes,company,employee,payment_term + name: LineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployeePaymentTerm + - value: line_items,purchase_orders,applied_credit_notes,company,payment_term + name: LineItemsPurchaseOrdersAppliedCreditNotesCompanyPaymentTerm + - value: line_items,purchase_orders,applied_credit_notes,contact + name: LineItemsPurchaseOrdersAppliedCreditNotesContact + - value: >- + line_items,purchase_orders,applied_credit_notes,contact,accounting_period + name: LineItemsPurchaseOrdersAppliedCreditNotesContactAccountingPeriod + - value: >- + line_items,purchase_orders,applied_credit_notes,contact,accounting_period,payment_term + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: line_items,purchase_orders,applied_credit_notes,contact,company + name: LineItemsPurchaseOrdersAppliedCreditNotesContactCompany + - value: >- + line_items,purchase_orders,applied_credit_notes,contact,company,accounting_period + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + line_items,purchase_orders,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: >- + line_items,purchase_orders,applied_credit_notes,contact,company,employee + name: LineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployee + - value: >- + line_items,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + line_items,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,purchase_orders,applied_credit_notes,contact,company,employee,payment_term + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: >- + line_items,purchase_orders,applied_credit_notes,contact,company,payment_term + name: LineItemsPurchaseOrdersAppliedCreditNotesContactCompanyPaymentTerm + - value: line_items,purchase_orders,applied_credit_notes,contact,employee + name: LineItemsPurchaseOrdersAppliedCreditNotesContactEmployee + - value: >- + line_items,purchase_orders,applied_credit_notes,contact,employee,accounting_period + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + line_items,purchase_orders,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,purchase_orders,applied_credit_notes,contact,employee,payment_term + name: LineItemsPurchaseOrdersAppliedCreditNotesContactEmployeePaymentTerm + - value: line_items,purchase_orders,applied_credit_notes,contact,payment_term + name: LineItemsPurchaseOrdersAppliedCreditNotesContactPaymentTerm + - value: line_items,purchase_orders,applied_credit_notes,employee + name: LineItemsPurchaseOrdersAppliedCreditNotesEmployee + - value: >- + line_items,purchase_orders,applied_credit_notes,employee,accounting_period + name: LineItemsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + line_items,purchase_orders,applied_credit_notes,employee,accounting_period,payment_term + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: line_items,purchase_orders,applied_credit_notes,employee,payment_term + name: LineItemsPurchaseOrdersAppliedCreditNotesEmployeePaymentTerm + - value: line_items,purchase_orders,applied_credit_notes,payment_term + name: LineItemsPurchaseOrdersAppliedCreditNotesPaymentTerm + - value: line_items,purchase_orders,applied_vendor_credits + name: LineItemsPurchaseOrdersAppliedVendorCredits + - value: line_items,purchase_orders,applied_vendor_credits,accounting_period + name: LineItemsPurchaseOrdersAppliedVendorCreditsAccountingPeriod + - value: >- + line_items,purchase_orders,applied_vendor_credits,accounting_period,payment_term + name: LineItemsPurchaseOrdersAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: line_items,purchase_orders,applied_vendor_credits,company + name: LineItemsPurchaseOrdersAppliedVendorCreditsCompany + - value: >- + line_items,purchase_orders,applied_vendor_credits,company,accounting_period + name: LineItemsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + line_items,purchase_orders,applied_vendor_credits,company,accounting_period,payment_term + name: >- + LineItemsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: line_items,purchase_orders,applied_vendor_credits,company,employee + name: LineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployee + - value: >- + line_items,purchase_orders,applied_vendor_credits,company,employee,accounting_period + name: >- + LineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + line_items,purchase_orders,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + LineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,purchase_orders,applied_vendor_credits,company,employee,payment_term + name: LineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: line_items,purchase_orders,applied_vendor_credits,company,payment_term + name: LineItemsPurchaseOrdersAppliedVendorCreditsCompanyPaymentTerm + - value: line_items,purchase_orders,applied_vendor_credits,contact + name: LineItemsPurchaseOrdersAppliedVendorCreditsContact + - value: >- + line_items,purchase_orders,applied_vendor_credits,contact,accounting_period + name: LineItemsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod + - value: >- + line_items,purchase_orders,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + LineItemsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: line_items,purchase_orders,applied_vendor_credits,contact,company + name: LineItemsPurchaseOrdersAppliedVendorCreditsContactCompany + - value: >- + line_items,purchase_orders,applied_vendor_credits,contact,company,accounting_period + name: >- + LineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + line_items,purchase_orders,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + LineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + line_items,purchase_orders,applied_vendor_credits,contact,company,employee + name: LineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee + - value: >- + line_items,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + LineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + line_items,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + LineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,purchase_orders,applied_vendor_credits,contact,company,employee,payment_term + name: >- + LineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + line_items,purchase_orders,applied_vendor_credits,contact,company,payment_term + name: LineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyPaymentTerm + - value: line_items,purchase_orders,applied_vendor_credits,contact,employee + name: LineItemsPurchaseOrdersAppliedVendorCreditsContactEmployee + - value: >- + line_items,purchase_orders,applied_vendor_credits,contact,employee,accounting_period + name: >- + LineItemsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + line_items,purchase_orders,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + LineItemsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,purchase_orders,applied_vendor_credits,contact,employee,payment_term + name: LineItemsPurchaseOrdersAppliedVendorCreditsContactEmployeePaymentTerm + - value: line_items,purchase_orders,applied_vendor_credits,contact,payment_term + name: LineItemsPurchaseOrdersAppliedVendorCreditsContactPaymentTerm + - value: line_items,purchase_orders,applied_vendor_credits,employee + name: LineItemsPurchaseOrdersAppliedVendorCreditsEmployee + - value: >- + line_items,purchase_orders,applied_vendor_credits,employee,accounting_period + name: LineItemsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + line_items,purchase_orders,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + LineItemsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,purchase_orders,applied_vendor_credits,employee,payment_term + name: LineItemsPurchaseOrdersAppliedVendorCreditsEmployeePaymentTerm + - value: line_items,purchase_orders,applied_vendor_credits,payment_term + name: LineItemsPurchaseOrdersAppliedVendorCreditsPaymentTerm + - value: line_items,purchase_orders,company + name: LineItemsPurchaseOrdersCompany + - value: line_items,purchase_orders,company,accounting_period + name: LineItemsPurchaseOrdersCompanyAccountingPeriod + - value: line_items,purchase_orders,company,accounting_period,payment_term + name: LineItemsPurchaseOrdersCompanyAccountingPeriodPaymentTerm + - value: line_items,purchase_orders,company,employee + name: LineItemsPurchaseOrdersCompanyEmployee + - value: line_items,purchase_orders,company,employee,accounting_period + name: LineItemsPurchaseOrdersCompanyEmployeeAccountingPeriod + - value: >- + line_items,purchase_orders,company,employee,accounting_period,payment_term + name: LineItemsPurchaseOrdersCompanyEmployeeAccountingPeriodPaymentTerm + - value: line_items,purchase_orders,company,employee,payment_term + name: LineItemsPurchaseOrdersCompanyEmployeePaymentTerm + - value: line_items,purchase_orders,company,payment_term + name: LineItemsPurchaseOrdersCompanyPaymentTerm + - value: line_items,purchase_orders,contact + name: LineItemsPurchaseOrdersContact + - value: line_items,purchase_orders,contact,accounting_period + name: LineItemsPurchaseOrdersContactAccountingPeriod + - value: line_items,purchase_orders,contact,accounting_period,payment_term + name: LineItemsPurchaseOrdersContactAccountingPeriodPaymentTerm + - value: line_items,purchase_orders,contact,company + name: LineItemsPurchaseOrdersContactCompany + - value: line_items,purchase_orders,contact,company,accounting_period + name: LineItemsPurchaseOrdersContactCompanyAccountingPeriod + - value: >- + line_items,purchase_orders,contact,company,accounting_period,payment_term + name: LineItemsPurchaseOrdersContactCompanyAccountingPeriodPaymentTerm + - value: line_items,purchase_orders,contact,company,employee + name: LineItemsPurchaseOrdersContactCompanyEmployee + - value: line_items,purchase_orders,contact,company,employee,accounting_period + name: LineItemsPurchaseOrdersContactCompanyEmployeeAccountingPeriod + - value: >- + line_items,purchase_orders,contact,company,employee,accounting_period,payment_term + name: >- + LineItemsPurchaseOrdersContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: line_items,purchase_orders,contact,company,employee,payment_term + name: LineItemsPurchaseOrdersContactCompanyEmployeePaymentTerm + - value: line_items,purchase_orders,contact,company,payment_term + name: LineItemsPurchaseOrdersContactCompanyPaymentTerm + - value: line_items,purchase_orders,contact,employee + name: LineItemsPurchaseOrdersContactEmployee + - value: line_items,purchase_orders,contact,employee,accounting_period + name: LineItemsPurchaseOrdersContactEmployeeAccountingPeriod + - value: >- + line_items,purchase_orders,contact,employee,accounting_period,payment_term + name: LineItemsPurchaseOrdersContactEmployeeAccountingPeriodPaymentTerm + - value: line_items,purchase_orders,contact,employee,payment_term + name: LineItemsPurchaseOrdersContactEmployeePaymentTerm + - value: line_items,purchase_orders,contact,payment_term + name: LineItemsPurchaseOrdersContactPaymentTerm + - value: line_items,purchase_orders,employee + name: LineItemsPurchaseOrdersEmployee + - value: line_items,purchase_orders,employee,accounting_period + name: LineItemsPurchaseOrdersEmployeeAccountingPeriod + - value: line_items,purchase_orders,employee,accounting_period,payment_term + name: LineItemsPurchaseOrdersEmployeeAccountingPeriodPaymentTerm + - value: line_items,purchase_orders,employee,payment_term + name: LineItemsPurchaseOrdersEmployeePaymentTerm + - value: line_items,purchase_orders,payment_term + name: LineItemsPurchaseOrdersPaymentTerm + - value: line_items,tracking_categories + name: LineItemsTrackingCategories + - value: line_items,tracking_categories,accounting_period + name: LineItemsTrackingCategoriesAccountingPeriod + - value: line_items,tracking_categories,accounting_period,payment_term + name: LineItemsTrackingCategoriesAccountingPeriodPaymentTerm + - value: line_items,tracking_categories,applied_credit_notes + name: LineItemsTrackingCategoriesAppliedCreditNotes + - value: line_items,tracking_categories,applied_credit_notes,accounting_period + name: LineItemsTrackingCategoriesAppliedCreditNotesAccountingPeriod + - value: >- + line_items,tracking_categories,applied_credit_notes,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits + name: LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCredits + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: line_items,tracking_categories,applied_credit_notes,company + name: LineItemsTrackingCategoriesAppliedCreditNotesCompany + - value: >- + line_items,tracking_categories,applied_credit_notes,company,accounting_period + name: LineItemsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriod + - value: >- + line_items,tracking_categories,applied_credit_notes,company,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: line_items,tracking_categories,applied_credit_notes,company,employee + name: LineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployee + - value: >- + line_items,tracking_categories,applied_credit_notes,company,employee,accounting_period + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,applied_credit_notes,company,employee,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployeePaymentTerm + - value: >- + line_items,tracking_categories,applied_credit_notes,company,payment_term + name: LineItemsTrackingCategoriesAppliedCreditNotesCompanyPaymentTerm + - value: line_items,tracking_categories,applied_credit_notes,contact + name: LineItemsTrackingCategoriesAppliedCreditNotesContact + - value: >- + line_items,tracking_categories,applied_credit_notes,contact,accounting_period + name: LineItemsTrackingCategoriesAppliedCreditNotesContactAccountingPeriod + - value: >- + line_items,tracking_categories,applied_credit_notes,contact,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: line_items,tracking_categories,applied_credit_notes,contact,company + name: LineItemsTrackingCategoriesAppliedCreditNotesContactCompany + - value: >- + line_items,tracking_categories,applied_credit_notes,contact,company,accounting_period + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + line_items,tracking_categories,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,applied_credit_notes,contact,company,employee + name: LineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployee + - value: >- + line_items,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,applied_credit_notes,contact,company,employee,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: >- + line_items,tracking_categories,applied_credit_notes,contact,company,payment_term + name: LineItemsTrackingCategoriesAppliedCreditNotesContactCompanyPaymentTerm + - value: line_items,tracking_categories,applied_credit_notes,contact,employee + name: LineItemsTrackingCategoriesAppliedCreditNotesContactEmployee + - value: >- + line_items,tracking_categories,applied_credit_notes,contact,employee,accounting_period + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,applied_credit_notes,contact,employee,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesContactEmployeePaymentTerm + - value: >- + line_items,tracking_categories,applied_credit_notes,contact,payment_term + name: LineItemsTrackingCategoriesAppliedCreditNotesContactPaymentTerm + - value: line_items,tracking_categories,applied_credit_notes,employee + name: LineItemsTrackingCategoriesAppliedCreditNotesEmployee + - value: >- + line_items,tracking_categories,applied_credit_notes,employee,accounting_period + name: LineItemsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,applied_credit_notes,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,applied_credit_notes,employee,payment_term + name: LineItemsTrackingCategoriesAppliedCreditNotesEmployeePaymentTerm + - value: line_items,tracking_categories,applied_credit_notes,payment_term + name: LineItemsTrackingCategoriesAppliedCreditNotesPaymentTerm + - value: line_items,tracking_categories,applied_vendor_credits + name: LineItemsTrackingCategoriesAppliedVendorCredits + - value: >- + line_items,tracking_categories,applied_vendor_credits,accounting_period + name: LineItemsTrackingCategoriesAppliedVendorCreditsAccountingPeriod + - value: >- + line_items,tracking_categories,applied_vendor_credits,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: line_items,tracking_categories,applied_vendor_credits,company + name: LineItemsTrackingCategoriesAppliedVendorCreditsCompany + - value: >- + line_items,tracking_categories,applied_vendor_credits,company,accounting_period + name: LineItemsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + line_items,tracking_categories,applied_vendor_credits,company,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: line_items,tracking_categories,applied_vendor_credits,company,employee + name: LineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployee + - value: >- + line_items,tracking_categories,applied_vendor_credits,company,employee,accounting_period + name: >- + LineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,applied_vendor_credits,company,employee,payment_term + name: >- + LineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + line_items,tracking_categories,applied_vendor_credits,company,payment_term + name: LineItemsTrackingCategoriesAppliedVendorCreditsCompanyPaymentTerm + - value: line_items,tracking_categories,applied_vendor_credits,contact + name: LineItemsTrackingCategoriesAppliedVendorCreditsContact + - value: >- + line_items,tracking_categories,applied_vendor_credits,contact,accounting_period + name: LineItemsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriod + - value: >- + line_items,tracking_categories,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: line_items,tracking_categories,applied_vendor_credits,contact,company + name: LineItemsTrackingCategoriesAppliedVendorCreditsContactCompany + - value: >- + line_items,tracking_categories,applied_vendor_credits,contact,company,accounting_period + name: >- + LineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + line_items,tracking_categories,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,applied_vendor_credits,contact,company,employee + name: LineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployee + - value: >- + line_items,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + LineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,applied_vendor_credits,contact,company,employee,payment_term + name: >- + LineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + line_items,tracking_categories,applied_vendor_credits,contact,company,payment_term + name: >- + LineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyPaymentTerm + - value: line_items,tracking_categories,applied_vendor_credits,contact,employee + name: LineItemsTrackingCategoriesAppliedVendorCreditsContactEmployee + - value: >- + line_items,tracking_categories,applied_vendor_credits,contact,employee,accounting_period + name: >- + LineItemsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,applied_vendor_credits,contact,employee,payment_term + name: >- + LineItemsTrackingCategoriesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + line_items,tracking_categories,applied_vendor_credits,contact,payment_term + name: LineItemsTrackingCategoriesAppliedVendorCreditsContactPaymentTerm + - value: line_items,tracking_categories,applied_vendor_credits,employee + name: LineItemsTrackingCategoriesAppliedVendorCreditsEmployee + - value: >- + line_items,tracking_categories,applied_vendor_credits,employee,accounting_period + name: >- + LineItemsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,applied_vendor_credits,employee,payment_term + name: LineItemsTrackingCategoriesAppliedVendorCreditsEmployeePaymentTerm + - value: line_items,tracking_categories,applied_vendor_credits,payment_term + name: LineItemsTrackingCategoriesAppliedVendorCreditsPaymentTerm + - value: line_items,tracking_categories,company + name: LineItemsTrackingCategoriesCompany + - value: line_items,tracking_categories,company,accounting_period + name: LineItemsTrackingCategoriesCompanyAccountingPeriod + - value: line_items,tracking_categories,company,accounting_period,payment_term + name: LineItemsTrackingCategoriesCompanyAccountingPeriodPaymentTerm + - value: line_items,tracking_categories,company,employee + name: LineItemsTrackingCategoriesCompanyEmployee + - value: line_items,tracking_categories,company,employee,accounting_period + name: LineItemsTrackingCategoriesCompanyEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,company,employee,accounting_period,payment_term + name: LineItemsTrackingCategoriesCompanyEmployeeAccountingPeriodPaymentTerm + - value: line_items,tracking_categories,company,employee,payment_term + name: LineItemsTrackingCategoriesCompanyEmployeePaymentTerm + - value: line_items,tracking_categories,company,payment_term + name: LineItemsTrackingCategoriesCompanyPaymentTerm + - value: line_items,tracking_categories,contact + name: LineItemsTrackingCategoriesContact + - value: line_items,tracking_categories,contact,accounting_period + name: LineItemsTrackingCategoriesContactAccountingPeriod + - value: line_items,tracking_categories,contact,accounting_period,payment_term + name: LineItemsTrackingCategoriesContactAccountingPeriodPaymentTerm + - value: line_items,tracking_categories,contact,company + name: LineItemsTrackingCategoriesContactCompany + - value: line_items,tracking_categories,contact,company,accounting_period + name: LineItemsTrackingCategoriesContactCompanyAccountingPeriod + - value: >- + line_items,tracking_categories,contact,company,accounting_period,payment_term + name: LineItemsTrackingCategoriesContactCompanyAccountingPeriodPaymentTerm + - value: line_items,tracking_categories,contact,company,employee + name: LineItemsTrackingCategoriesContactCompanyEmployee + - value: >- + line_items,tracking_categories,contact,company,employee,accounting_period + name: LineItemsTrackingCategoriesContactCompanyEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,contact,company,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: line_items,tracking_categories,contact,company,employee,payment_term + name: LineItemsTrackingCategoriesContactCompanyEmployeePaymentTerm + - value: line_items,tracking_categories,contact,company,payment_term + name: LineItemsTrackingCategoriesContactCompanyPaymentTerm + - value: line_items,tracking_categories,contact,employee + name: LineItemsTrackingCategoriesContactEmployee + - value: line_items,tracking_categories,contact,employee,accounting_period + name: LineItemsTrackingCategoriesContactEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,contact,employee,accounting_period,payment_term + name: LineItemsTrackingCategoriesContactEmployeeAccountingPeriodPaymentTerm + - value: line_items,tracking_categories,contact,employee,payment_term + name: LineItemsTrackingCategoriesContactEmployeePaymentTerm + - value: line_items,tracking_categories,contact,payment_term + name: LineItemsTrackingCategoriesContactPaymentTerm + - value: line_items,tracking_categories,employee + name: LineItemsTrackingCategoriesEmployee + - value: line_items,tracking_categories,employee,accounting_period + name: LineItemsTrackingCategoriesEmployeeAccountingPeriod + - value: line_items,tracking_categories,employee,accounting_period,payment_term + name: LineItemsTrackingCategoriesEmployeeAccountingPeriodPaymentTerm + - value: line_items,tracking_categories,employee,payment_term + name: LineItemsTrackingCategoriesEmployeePaymentTerm + - value: line_items,tracking_categories,payment_term + name: LineItemsTrackingCategoriesPaymentTerm + - value: line_items,tracking_categories,purchase_orders + name: LineItemsTrackingCategoriesPurchaseOrders + - value: line_items,tracking_categories,purchase_orders,accounting_period + name: LineItemsTrackingCategoriesPurchaseOrdersAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,accounting_period,payment_term + name: LineItemsTrackingCategoriesPurchaseOrdersAccountingPeriodPaymentTerm + - value: line_items,tracking_categories,purchase_orders,applied_credit_notes + name: LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotes + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCredits + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,company + name: LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompany + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployee + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeePaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,company,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,contact + name: LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContact + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompany + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployee + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployee + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeePaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,employee + name: LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployee + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,employee,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeePaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,payment_term + name: LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesPaymentTerm + - value: line_items,tracking_categories,purchase_orders,applied_vendor_credits + name: LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCredits + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,company + name: LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompany + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployee + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact + name: LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContact + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompany + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployee + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee + name: LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployee + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeePaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsPaymentTerm + - value: line_items,tracking_categories,purchase_orders,company + name: LineItemsTrackingCategoriesPurchaseOrdersCompany + - value: >- + line_items,tracking_categories,purchase_orders,company,accounting_period + name: LineItemsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,company,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriodPaymentTerm + - value: line_items,tracking_categories,purchase_orders,company,employee + name: LineItemsTrackingCategoriesPurchaseOrdersCompanyEmployee + - value: >- + line_items,tracking_categories,purchase_orders,company,employee,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,company,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,company,employee,payment_term + name: LineItemsTrackingCategoriesPurchaseOrdersCompanyEmployeePaymentTerm + - value: line_items,tracking_categories,purchase_orders,company,payment_term + name: LineItemsTrackingCategoriesPurchaseOrdersCompanyPaymentTerm + - value: line_items,tracking_categories,purchase_orders,contact + name: LineItemsTrackingCategoriesPurchaseOrdersContact + - value: >- + line_items,tracking_categories,purchase_orders,contact,accounting_period + name: LineItemsTrackingCategoriesPurchaseOrdersContactAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,contact,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersContactAccountingPeriodPaymentTerm + - value: line_items,tracking_categories,purchase_orders,contact,company + name: LineItemsTrackingCategoriesPurchaseOrdersContactCompany + - value: >- + line_items,tracking_categories,purchase_orders,contact,company,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,contact,company,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,contact,company,employee + name: LineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployee + - value: >- + line_items,tracking_categories,purchase_orders,contact,company,employee,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,contact,company,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,contact,company,employee,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployeePaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,contact,company,payment_term + name: LineItemsTrackingCategoriesPurchaseOrdersContactCompanyPaymentTerm + - value: line_items,tracking_categories,purchase_orders,contact,employee + name: LineItemsTrackingCategoriesPurchaseOrdersContactEmployee + - value: >- + line_items,tracking_categories,purchase_orders,contact,employee,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,contact,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,contact,employee,payment_term + name: LineItemsTrackingCategoriesPurchaseOrdersContactEmployeePaymentTerm + - value: line_items,tracking_categories,purchase_orders,contact,payment_term + name: LineItemsTrackingCategoriesPurchaseOrdersContactPaymentTerm + - value: line_items,tracking_categories,purchase_orders,employee + name: LineItemsTrackingCategoriesPurchaseOrdersEmployee + - value: >- + line_items,tracking_categories,purchase_orders,employee,accounting_period + name: LineItemsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriodPaymentTerm + - value: line_items,tracking_categories,purchase_orders,employee,payment_term + name: LineItemsTrackingCategoriesPurchaseOrdersEmployeePaymentTerm + - value: line_items,tracking_categories,purchase_orders,payment_term + name: LineItemsTrackingCategoriesPurchaseOrdersPaymentTerm + - payment_term + - payments + - value: payments,accounting_period + name: PaymentsAccountingPeriod + - value: payments,accounting_period,payment_term + name: PaymentsAccountingPeriodPaymentTerm + - value: payments,applied_credit_notes + name: PaymentsAppliedCreditNotes + - value: payments,applied_credit_notes,accounting_period + name: PaymentsAppliedCreditNotesAccountingPeriod + - value: payments,applied_credit_notes,accounting_period,payment_term + name: PaymentsAppliedCreditNotesAccountingPeriodPaymentTerm + - value: payments,applied_credit_notes,applied_vendor_credits + name: PaymentsAppliedCreditNotesAppliedVendorCredits + - value: payments,applied_credit_notes,applied_vendor_credits,accounting_period + name: PaymentsAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + payments,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: payments,applied_credit_notes,applied_vendor_credits,company + name: PaymentsAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + payments,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: PaymentsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: payments,applied_credit_notes,applied_vendor_credits,company,employee + name: PaymentsAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + payments,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,applied_credit_notes,applied_vendor_credits,company,payment_term + name: PaymentsAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: payments,applied_credit_notes,applied_vendor_credits,contact + name: PaymentsAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + payments,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: PaymentsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: payments,applied_credit_notes,applied_vendor_credits,contact,company + name: PaymentsAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + payments,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: PaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: payments,applied_credit_notes,applied_vendor_credits,contact,employee + name: PaymentsAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + payments,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: PaymentsAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: payments,applied_credit_notes,applied_vendor_credits,employee + name: PaymentsAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + payments,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: PaymentsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: PaymentsAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: payments,applied_credit_notes,applied_vendor_credits,payment_term + name: PaymentsAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: payments,applied_credit_notes,company + name: PaymentsAppliedCreditNotesCompany + - value: payments,applied_credit_notes,company,accounting_period + name: PaymentsAppliedCreditNotesCompanyAccountingPeriod + - value: payments,applied_credit_notes,company,accounting_period,payment_term + name: PaymentsAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: payments,applied_credit_notes,company,employee + name: PaymentsAppliedCreditNotesCompanyEmployee + - value: payments,applied_credit_notes,company,employee,accounting_period + name: PaymentsAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_credit_notes,company,employee,accounting_period,payment_term + name: PaymentsAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: payments,applied_credit_notes,company,employee,payment_term + name: PaymentsAppliedCreditNotesCompanyEmployeePaymentTerm + - value: payments,applied_credit_notes,company,payment_term + name: PaymentsAppliedCreditNotesCompanyPaymentTerm + - value: payments,applied_credit_notes,contact + name: PaymentsAppliedCreditNotesContact + - value: payments,applied_credit_notes,contact,accounting_period + name: PaymentsAppliedCreditNotesContactAccountingPeriod + - value: payments,applied_credit_notes,contact,accounting_period,payment_term + name: PaymentsAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: payments,applied_credit_notes,contact,company + name: PaymentsAppliedCreditNotesContactCompany + - value: payments,applied_credit_notes,contact,company,accounting_period + name: PaymentsAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + payments,applied_credit_notes,contact,company,accounting_period,payment_term + name: PaymentsAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: payments,applied_credit_notes,contact,company,employee + name: PaymentsAppliedCreditNotesContactCompanyEmployee + - value: >- + payments,applied_credit_notes,contact,company,employee,accounting_period + name: PaymentsAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: payments,applied_credit_notes,contact,company,employee,payment_term + name: PaymentsAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: payments,applied_credit_notes,contact,company,payment_term + name: PaymentsAppliedCreditNotesContactCompanyPaymentTerm + - value: payments,applied_credit_notes,contact,employee + name: PaymentsAppliedCreditNotesContactEmployee + - value: payments,applied_credit_notes,contact,employee,accounting_period + name: PaymentsAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + payments,applied_credit_notes,contact,employee,accounting_period,payment_term + name: PaymentsAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: payments,applied_credit_notes,contact,employee,payment_term + name: PaymentsAppliedCreditNotesContactEmployeePaymentTerm + - value: payments,applied_credit_notes,contact,payment_term + name: PaymentsAppliedCreditNotesContactPaymentTerm + - value: payments,applied_credit_notes,employee + name: PaymentsAppliedCreditNotesEmployee + - value: payments,applied_credit_notes,employee,accounting_period + name: PaymentsAppliedCreditNotesEmployeeAccountingPeriod + - value: payments,applied_credit_notes,employee,accounting_period,payment_term + name: PaymentsAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: payments,applied_credit_notes,employee,payment_term + name: PaymentsAppliedCreditNotesEmployeePaymentTerm + - value: payments,applied_credit_notes,payment_term + name: PaymentsAppliedCreditNotesPaymentTerm + - value: payments,applied_payments + name: PaymentsAppliedPayments + - value: payments,applied_payments,accounting_period + name: PaymentsAppliedPaymentsAccountingPeriod + - value: payments,applied_payments,accounting_period,payment_term + name: PaymentsAppliedPaymentsAccountingPeriodPaymentTerm + - value: payments,applied_payments,applied_credit_notes + name: PaymentsAppliedPaymentsAppliedCreditNotes + - value: payments,applied_payments,applied_credit_notes,accounting_period + name: PaymentsAppliedPaymentsAppliedCreditNotesAccountingPeriod + - value: >- + payments,applied_payments,applied_credit_notes,accounting_period,payment_term + name: PaymentsAppliedPaymentsAppliedCreditNotesAccountingPeriodPaymentTerm + - value: payments,applied_payments,applied_credit_notes,applied_vendor_credits + name: PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCredits + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,company + name: PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,company,employee + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact + name: PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,company + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,employee + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,employee + name: PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,payment_term + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: payments,applied_payments,applied_credit_notes,company + name: PaymentsAppliedPaymentsAppliedCreditNotesCompany + - value: >- + payments,applied_payments,applied_credit_notes,company,accounting_period + name: PaymentsAppliedPaymentsAppliedCreditNotesCompanyAccountingPeriod + - value: >- + payments,applied_payments,applied_credit_notes,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: payments,applied_payments,applied_credit_notes,company,employee + name: PaymentsAppliedPaymentsAppliedCreditNotesCompanyEmployee + - value: >- + payments,applied_payments,applied_credit_notes,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,applied_credit_notes,company,employee,payment_term + name: PaymentsAppliedPaymentsAppliedCreditNotesCompanyEmployeePaymentTerm + - value: payments,applied_payments,applied_credit_notes,company,payment_term + name: PaymentsAppliedPaymentsAppliedCreditNotesCompanyPaymentTerm + - value: payments,applied_payments,applied_credit_notes,contact + name: PaymentsAppliedPaymentsAppliedCreditNotesContact + - value: >- + payments,applied_payments,applied_credit_notes,contact,accounting_period + name: PaymentsAppliedPaymentsAppliedCreditNotesContactAccountingPeriod + - value: >- + payments,applied_payments,applied_credit_notes,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: payments,applied_payments,applied_credit_notes,contact,company + name: PaymentsAppliedPaymentsAppliedCreditNotesContactCompany + - value: >- + payments,applied_payments,applied_credit_notes,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,applied_credit_notes,contact,company,employee + name: PaymentsAppliedPaymentsAppliedCreditNotesContactCompanyEmployee + - value: >- + payments,applied_payments,applied_credit_notes,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,applied_credit_notes,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,applied_credit_notes,contact,company,payment_term + name: PaymentsAppliedPaymentsAppliedCreditNotesContactCompanyPaymentTerm + - value: payments,applied_payments,applied_credit_notes,contact,employee + name: PaymentsAppliedPaymentsAppliedCreditNotesContactEmployee + - value: >- + payments,applied_payments,applied_credit_notes,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,applied_credit_notes,contact,employee,payment_term + name: PaymentsAppliedPaymentsAppliedCreditNotesContactEmployeePaymentTerm + - value: payments,applied_payments,applied_credit_notes,contact,payment_term + name: PaymentsAppliedPaymentsAppliedCreditNotesContactPaymentTerm + - value: payments,applied_payments,applied_credit_notes,employee + name: PaymentsAppliedPaymentsAppliedCreditNotesEmployee + - value: >- + payments,applied_payments,applied_credit_notes,employee,accounting_period + name: PaymentsAppliedPaymentsAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + payments,applied_payments,applied_credit_notes,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: payments,applied_payments,applied_credit_notes,employee,payment_term + name: PaymentsAppliedPaymentsAppliedCreditNotesEmployeePaymentTerm + - value: payments,applied_payments,applied_credit_notes,payment_term + name: PaymentsAppliedPaymentsAppliedCreditNotesPaymentTerm + - value: payments,applied_payments,applied_vendor_credits + name: PaymentsAppliedPaymentsAppliedVendorCredits + - value: payments,applied_payments,applied_vendor_credits,accounting_period + name: PaymentsAppliedPaymentsAppliedVendorCreditsAccountingPeriod + - value: >- + payments,applied_payments,applied_vendor_credits,accounting_period,payment_term + name: PaymentsAppliedPaymentsAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: payments,applied_payments,applied_vendor_credits,company + name: PaymentsAppliedPaymentsAppliedVendorCreditsCompany + - value: >- + payments,applied_payments,applied_vendor_credits,company,accounting_period + name: PaymentsAppliedPaymentsAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,applied_payments,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: payments,applied_payments,applied_vendor_credits,company,employee + name: PaymentsAppliedPaymentsAppliedVendorCreditsCompanyEmployee + - value: >- + payments,applied_payments,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,applied_vendor_credits,company,employee,payment_term + name: PaymentsAppliedPaymentsAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: payments,applied_payments,applied_vendor_credits,company,payment_term + name: PaymentsAppliedPaymentsAppliedVendorCreditsCompanyPaymentTerm + - value: payments,applied_payments,applied_vendor_credits,contact + name: PaymentsAppliedPaymentsAppliedVendorCreditsContact + - value: >- + payments,applied_payments,applied_vendor_credits,contact,accounting_period + name: PaymentsAppliedPaymentsAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,applied_payments,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: payments,applied_payments,applied_vendor_credits,contact,company + name: PaymentsAppliedPaymentsAppliedVendorCreditsContactCompany + - value: >- + payments,applied_payments,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,applied_vendor_credits,contact,company,employee + name: PaymentsAppliedPaymentsAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,applied_payments,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,applied_vendor_credits,contact,company,payment_term + name: PaymentsAppliedPaymentsAppliedVendorCreditsContactCompanyPaymentTerm + - value: payments,applied_payments,applied_vendor_credits,contact,employee + name: PaymentsAppliedPaymentsAppliedVendorCreditsContactEmployee + - value: >- + payments,applied_payments,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,applied_vendor_credits,contact,employee,payment_term + name: PaymentsAppliedPaymentsAppliedVendorCreditsContactEmployeePaymentTerm + - value: payments,applied_payments,applied_vendor_credits,contact,payment_term + name: PaymentsAppliedPaymentsAppliedVendorCreditsContactPaymentTerm + - value: payments,applied_payments,applied_vendor_credits,employee + name: PaymentsAppliedPaymentsAppliedVendorCreditsEmployee + - value: >- + payments,applied_payments,applied_vendor_credits,employee,accounting_period + name: PaymentsAppliedPaymentsAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,applied_payments,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: payments,applied_payments,applied_vendor_credits,employee,payment_term + name: PaymentsAppliedPaymentsAppliedVendorCreditsEmployeePaymentTerm + - value: payments,applied_payments,applied_vendor_credits,payment_term + name: PaymentsAppliedPaymentsAppliedVendorCreditsPaymentTerm + - value: payments,applied_payments,company + name: PaymentsAppliedPaymentsCompany + - value: payments,applied_payments,company,accounting_period + name: PaymentsAppliedPaymentsCompanyAccountingPeriod + - value: payments,applied_payments,company,accounting_period,payment_term + name: PaymentsAppliedPaymentsCompanyAccountingPeriodPaymentTerm + - value: payments,applied_payments,company,employee + name: PaymentsAppliedPaymentsCompanyEmployee + - value: payments,applied_payments,company,employee,accounting_period + name: PaymentsAppliedPaymentsCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,company,employee,accounting_period,payment_term + name: PaymentsAppliedPaymentsCompanyEmployeeAccountingPeriodPaymentTerm + - value: payments,applied_payments,company,employee,payment_term + name: PaymentsAppliedPaymentsCompanyEmployeePaymentTerm + - value: payments,applied_payments,company,payment_term + name: PaymentsAppliedPaymentsCompanyPaymentTerm + - value: payments,applied_payments,contact + name: PaymentsAppliedPaymentsContact + - value: payments,applied_payments,contact,accounting_period + name: PaymentsAppliedPaymentsContactAccountingPeriod + - value: payments,applied_payments,contact,accounting_period,payment_term + name: PaymentsAppliedPaymentsContactAccountingPeriodPaymentTerm + - value: payments,applied_payments,contact,company + name: PaymentsAppliedPaymentsContactCompany + - value: payments,applied_payments,contact,company,accounting_period + name: PaymentsAppliedPaymentsContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,contact,company,accounting_period,payment_term + name: PaymentsAppliedPaymentsContactCompanyAccountingPeriodPaymentTerm + - value: payments,applied_payments,contact,company,employee + name: PaymentsAppliedPaymentsContactCompanyEmployee + - value: payments,applied_payments,contact,company,employee,accounting_period + name: PaymentsAppliedPaymentsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: payments,applied_payments,contact,company,employee,payment_term + name: PaymentsAppliedPaymentsContactCompanyEmployeePaymentTerm + - value: payments,applied_payments,contact,company,payment_term + name: PaymentsAppliedPaymentsContactCompanyPaymentTerm + - value: payments,applied_payments,contact,employee + name: PaymentsAppliedPaymentsContactEmployee + - value: payments,applied_payments,contact,employee,accounting_period + name: PaymentsAppliedPaymentsContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,contact,employee,accounting_period,payment_term + name: PaymentsAppliedPaymentsContactEmployeeAccountingPeriodPaymentTerm + - value: payments,applied_payments,contact,employee,payment_term + name: PaymentsAppliedPaymentsContactEmployeePaymentTerm + - value: payments,applied_payments,contact,payment_term + name: PaymentsAppliedPaymentsContactPaymentTerm + - value: payments,applied_payments,employee + name: PaymentsAppliedPaymentsEmployee + - value: payments,applied_payments,employee,accounting_period + name: PaymentsAppliedPaymentsEmployeeAccountingPeriod + - value: payments,applied_payments,employee,accounting_period,payment_term + name: PaymentsAppliedPaymentsEmployeeAccountingPeriodPaymentTerm + - value: payments,applied_payments,employee,payment_term + name: PaymentsAppliedPaymentsEmployeePaymentTerm + - value: payments,applied_payments,line_items + name: PaymentsAppliedPaymentsLineItems + - value: payments,applied_payments,line_items,accounting_period + name: PaymentsAppliedPaymentsLineItemsAccountingPeriod + - value: payments,applied_payments,line_items,accounting_period,payment_term + name: PaymentsAppliedPaymentsLineItemsAccountingPeriodPaymentTerm + - value: payments,applied_payments,line_items,applied_credit_notes + name: PaymentsAppliedPaymentsLineItemsAppliedCreditNotes + - value: >- + payments,applied_payments,line_items,applied_credit_notes,accounting_period + name: PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAccountingPeriod + - value: >- + payments,applied_payments,line_items,applied_credit_notes,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits + name: PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCredits + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company,employee + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,employee + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,employee + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: payments,applied_payments,line_items,applied_credit_notes,company + name: PaymentsAppliedPaymentsLineItemsAppliedCreditNotesCompany + - value: >- + payments,applied_payments,line_items,applied_credit_notes,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,applied_credit_notes,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,company,employee + name: PaymentsAppliedPaymentsLineItemsAppliedCreditNotesCompanyEmployee + - value: >- + payments,applied_payments,line_items,applied_credit_notes,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,company,payment_term + name: PaymentsAppliedPaymentsLineItemsAppliedCreditNotesCompanyPaymentTerm + - value: payments,applied_payments,line_items,applied_credit_notes,contact + name: PaymentsAppliedPaymentsLineItemsAppliedCreditNotesContact + - value: >- + payments,applied_payments,line_items,applied_credit_notes,contact,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactAccountingPeriod + - value: >- + payments,applied_payments,line_items,applied_credit_notes,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,contact,company + name: PaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactCompany + - value: >- + payments,applied_payments,line_items,applied_credit_notes,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,contact,company,employee + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactCompanyEmployee + - value: >- + payments,applied_payments,line_items,applied_credit_notes,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,contact,company,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactCompanyPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,contact,employee + name: PaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactEmployee + - value: >- + payments,applied_payments,line_items,applied_credit_notes,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,contact,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,contact,payment_term + name: PaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactPaymentTerm + - value: payments,applied_payments,line_items,applied_credit_notes,employee + name: PaymentsAppliedPaymentsLineItemsAppliedCreditNotesEmployee + - value: >- + payments,applied_payments,line_items,applied_credit_notes,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,applied_credit_notes,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,employee,payment_term + name: PaymentsAppliedPaymentsLineItemsAppliedCreditNotesEmployeePaymentTerm + - value: payments,applied_payments,line_items,applied_credit_notes,payment_term + name: PaymentsAppliedPaymentsLineItemsAppliedCreditNotesPaymentTerm + - value: payments,applied_payments,line_items,applied_vendor_credits + name: PaymentsAppliedPaymentsLineItemsAppliedVendorCredits + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,accounting_period + name: PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsAccountingPeriod + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: payments,applied_payments,line_items,applied_vendor_credits,company + name: PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsCompany + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,company,employee + name: PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsCompanyEmployee + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,company,payment_term + name: PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsCompanyPaymentTerm + - value: payments,applied_payments,line_items,applied_vendor_credits,contact + name: PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContact + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,contact,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,contact,company + name: PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactCompany + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,contact,company,employee + name: >- + PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,contact,employee + name: PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactEmployee + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,contact,payment_term + name: PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactPaymentTerm + - value: payments,applied_payments,line_items,applied_vendor_credits,employee + name: PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsEmployee + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,payment_term + name: PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsPaymentTerm + - value: payments,applied_payments,line_items,company + name: PaymentsAppliedPaymentsLineItemsCompany + - value: payments,applied_payments,line_items,company,accounting_period + name: PaymentsAppliedPaymentsLineItemsCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,company,accounting_period,payment_term + name: PaymentsAppliedPaymentsLineItemsCompanyAccountingPeriodPaymentTerm + - value: payments,applied_payments,line_items,company,employee + name: PaymentsAppliedPaymentsLineItemsCompanyEmployee + - value: >- + payments,applied_payments,line_items,company,employee,accounting_period + name: PaymentsAppliedPaymentsLineItemsCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsCompanyEmployeeAccountingPeriodPaymentTerm + - value: payments,applied_payments,line_items,company,employee,payment_term + name: PaymentsAppliedPaymentsLineItemsCompanyEmployeePaymentTerm + - value: payments,applied_payments,line_items,company,payment_term + name: PaymentsAppliedPaymentsLineItemsCompanyPaymentTerm + - value: payments,applied_payments,line_items,contact + name: PaymentsAppliedPaymentsLineItemsContact + - value: payments,applied_payments,line_items,contact,accounting_period + name: PaymentsAppliedPaymentsLineItemsContactAccountingPeriod + - value: >- + payments,applied_payments,line_items,contact,accounting_period,payment_term + name: PaymentsAppliedPaymentsLineItemsContactAccountingPeriodPaymentTerm + - value: payments,applied_payments,line_items,contact,company + name: PaymentsAppliedPaymentsLineItemsContactCompany + - value: payments,applied_payments,line_items,contact,company,accounting_period + name: PaymentsAppliedPaymentsLineItemsContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsContactCompanyAccountingPeriodPaymentTerm + - value: payments,applied_payments,line_items,contact,company,employee + name: PaymentsAppliedPaymentsLineItemsContactCompanyEmployee + - value: >- + payments,applied_payments,line_items,contact,company,employee,accounting_period + name: PaymentsAppliedPaymentsLineItemsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,contact,company,employee,payment_term + name: PaymentsAppliedPaymentsLineItemsContactCompanyEmployeePaymentTerm + - value: payments,applied_payments,line_items,contact,company,payment_term + name: PaymentsAppliedPaymentsLineItemsContactCompanyPaymentTerm + - value: payments,applied_payments,line_items,contact,employee + name: PaymentsAppliedPaymentsLineItemsContactEmployee + - value: >- + payments,applied_payments,line_items,contact,employee,accounting_period + name: PaymentsAppliedPaymentsLineItemsContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsContactEmployeeAccountingPeriodPaymentTerm + - value: payments,applied_payments,line_items,contact,employee,payment_term + name: PaymentsAppliedPaymentsLineItemsContactEmployeePaymentTerm + - value: payments,applied_payments,line_items,contact,payment_term + name: PaymentsAppliedPaymentsLineItemsContactPaymentTerm + - value: payments,applied_payments,line_items,employee + name: PaymentsAppliedPaymentsLineItemsEmployee + - value: payments,applied_payments,line_items,employee,accounting_period + name: PaymentsAppliedPaymentsLineItemsEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,employee,accounting_period,payment_term + name: PaymentsAppliedPaymentsLineItemsEmployeeAccountingPeriodPaymentTerm + - value: payments,applied_payments,line_items,employee,payment_term + name: PaymentsAppliedPaymentsLineItemsEmployeePaymentTerm + - value: payments,applied_payments,line_items,payment_term + name: PaymentsAppliedPaymentsLineItemsPaymentTerm + - value: payments,applied_payments,line_items,purchase_orders + name: PaymentsAppliedPaymentsLineItemsPurchaseOrders + - value: payments,applied_payments,line_items,purchase_orders,accounting_period + name: PaymentsAppliedPaymentsLineItemsPurchaseOrdersAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes + name: PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotes + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCredits + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,company + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompany + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,company,employee + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployee + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,company,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContact + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompany + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company,employee + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployee + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,employee + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactEmployee + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,employee + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesEmployee + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits + name: PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCredits + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,company + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompany + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,company,employee + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployee + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,company,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContact + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompany + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company,employee + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,employee + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployee + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,employee + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsEmployee + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsPaymentTerm + - value: payments,applied_payments,line_items,purchase_orders,company + name: PaymentsAppliedPaymentsLineItemsPurchaseOrdersCompany + - value: >- + payments,applied_payments,line_items,purchase_orders,company,accounting_period + name: PaymentsAppliedPaymentsLineItemsPurchaseOrdersCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersCompanyAccountingPeriodPaymentTerm + - value: payments,applied_payments,line_items,purchase_orders,company,employee + name: PaymentsAppliedPaymentsLineItemsPurchaseOrdersCompanyEmployee + - value: >- + payments,applied_payments,line_items,purchase_orders,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,company,payment_term + name: PaymentsAppliedPaymentsLineItemsPurchaseOrdersCompanyPaymentTerm + - value: payments,applied_payments,line_items,purchase_orders,contact + name: PaymentsAppliedPaymentsLineItemsPurchaseOrdersContact + - value: >- + payments,applied_payments,line_items,purchase_orders,contact,accounting_period + name: PaymentsAppliedPaymentsLineItemsPurchaseOrdersContactAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersContactAccountingPeriodPaymentTerm + - value: payments,applied_payments,line_items,purchase_orders,contact,company + name: PaymentsAppliedPaymentsLineItemsPurchaseOrdersContactCompany + - value: >- + payments,applied_payments,line_items,purchase_orders,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,contact,company,employee + name: PaymentsAppliedPaymentsLineItemsPurchaseOrdersContactCompanyEmployee + - value: >- + payments,applied_payments,line_items,purchase_orders,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,contact,company,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersContactCompanyPaymentTerm + - value: payments,applied_payments,line_items,purchase_orders,contact,employee + name: PaymentsAppliedPaymentsLineItemsPurchaseOrdersContactEmployee + - value: >- + payments,applied_payments,line_items,purchase_orders,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,contact,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersContactEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,contact,payment_term + name: PaymentsAppliedPaymentsLineItemsPurchaseOrdersContactPaymentTerm + - value: payments,applied_payments,line_items,purchase_orders,employee + name: PaymentsAppliedPaymentsLineItemsPurchaseOrdersEmployee + - value: >- + payments,applied_payments,line_items,purchase_orders,employee,accounting_period + name: PaymentsAppliedPaymentsLineItemsPurchaseOrdersEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,employee,payment_term + name: PaymentsAppliedPaymentsLineItemsPurchaseOrdersEmployeePaymentTerm + - value: payments,applied_payments,line_items,purchase_orders,payment_term + name: PaymentsAppliedPaymentsLineItemsPurchaseOrdersPaymentTerm + - value: payments,applied_payments,line_items,tracking_categories + name: PaymentsAppliedPaymentsLineItemsTrackingCategories + - value: >- + payments,applied_payments,line_items,tracking_categories,accounting_period + name: PaymentsAppliedPaymentsLineItemsTrackingCategoriesAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes + name: PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotes + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCredits + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,company + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompany + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,company,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,company,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContact + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompany + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits + name: PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCredits + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,company + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompany + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,company,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,company,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContact + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompany + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsPaymentTerm + - value: payments,applied_payments,line_items,tracking_categories,company + name: PaymentsAppliedPaymentsLineItemsTrackingCategoriesCompany + - value: >- + payments,applied_payments,line_items,tracking_categories,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,company,employee + name: PaymentsAppliedPaymentsLineItemsTrackingCategoriesCompanyEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,company,payment_term + name: PaymentsAppliedPaymentsLineItemsTrackingCategoriesCompanyPaymentTerm + - value: payments,applied_payments,line_items,tracking_categories,contact + name: PaymentsAppliedPaymentsLineItemsTrackingCategoriesContact + - value: >- + payments,applied_payments,line_items,tracking_categories,contact,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesContactAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesContactAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,contact,company + name: PaymentsAppliedPaymentsLineItemsTrackingCategoriesContactCompany + - value: >- + payments,applied_payments,line_items,tracking_categories,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,contact,company,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesContactCompanyEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,contact,company,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesContactCompanyPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,contact,employee + name: PaymentsAppliedPaymentsLineItemsTrackingCategoriesContactEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,contact,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesContactEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,contact,payment_term + name: PaymentsAppliedPaymentsLineItemsTrackingCategoriesContactPaymentTerm + - value: payments,applied_payments,line_items,tracking_categories,employee + name: PaymentsAppliedPaymentsLineItemsTrackingCategoriesEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,employee,payment_term + name: PaymentsAppliedPaymentsLineItemsTrackingCategoriesEmployeePaymentTerm + - value: payments,applied_payments,line_items,tracking_categories,payment_term + name: PaymentsAppliedPaymentsLineItemsTrackingCategoriesPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders + name: PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrders + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotes + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCredits + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompany + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContact + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompany + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCredits + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompany + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContact + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompany + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,company + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompany + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,company,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,company,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,contact + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContact + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,company + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompany + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,company,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,company,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersPaymentTerm + - value: payments,applied_payments,payment_term + name: PaymentsAppliedPaymentsPaymentTerm + - value: payments,applied_payments,purchase_orders + name: PaymentsAppliedPaymentsPurchaseOrders + - value: payments,applied_payments,purchase_orders,accounting_period + name: PaymentsAppliedPaymentsPurchaseOrdersAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,accounting_period,payment_term + name: PaymentsAppliedPaymentsPurchaseOrdersAccountingPeriodPaymentTerm + - value: payments,applied_payments,purchase_orders,applied_credit_notes + name: PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotes + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,accounting_period + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCredits + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,employee + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: payments,applied_payments,purchase_orders,applied_credit_notes,company + name: PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesCompany + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,company,accounting_period + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,company,employee + name: PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesCompanyEmployee + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,company,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesCompanyPaymentTerm + - value: payments,applied_payments,purchase_orders,applied_credit_notes,contact + name: PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContact + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,contact,accounting_period + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,contact,company + name: PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompany + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,contact,company,employee + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyEmployee + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,contact,company,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,contact,employee + name: PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactEmployee + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,contact,employee,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactEmployeePaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,contact,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,employee + name: PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesEmployee + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,employee,accounting_period + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,employee,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesEmployeePaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,payment_term + name: PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesPaymentTerm + - value: payments,applied_payments,purchase_orders,applied_vendor_credits + name: PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCredits + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,accounting_period + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,company + name: PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompany + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,company,accounting_period + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,company,employee + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompanyEmployee + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,company,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompanyPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,contact + name: PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContact + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,contact,accounting_period + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,contact,company + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompany + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,contact,company,employee + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,contact,employee + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactEmployee + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,contact,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,employee + name: PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsEmployee + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,employee,accounting_period + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,employee,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsEmployeePaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,payment_term + name: PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsPaymentTerm + - value: payments,applied_payments,purchase_orders,company + name: PaymentsAppliedPaymentsPurchaseOrdersCompany + - value: payments,applied_payments,purchase_orders,company,accounting_period + name: PaymentsAppliedPaymentsPurchaseOrdersCompanyAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersCompanyAccountingPeriodPaymentTerm + - value: payments,applied_payments,purchase_orders,company,employee + name: PaymentsAppliedPaymentsPurchaseOrdersCompanyEmployee + - value: >- + payments,applied_payments,purchase_orders,company,employee,accounting_period + name: PaymentsAppliedPaymentsPurchaseOrdersCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,company,employee,payment_term + name: PaymentsAppliedPaymentsPurchaseOrdersCompanyEmployeePaymentTerm + - value: payments,applied_payments,purchase_orders,company,payment_term + name: PaymentsAppliedPaymentsPurchaseOrdersCompanyPaymentTerm + - value: payments,applied_payments,purchase_orders,contact + name: PaymentsAppliedPaymentsPurchaseOrdersContact + - value: payments,applied_payments,purchase_orders,contact,accounting_period + name: PaymentsAppliedPaymentsPurchaseOrdersContactAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersContactAccountingPeriodPaymentTerm + - value: payments,applied_payments,purchase_orders,contact,company + name: PaymentsAppliedPaymentsPurchaseOrdersContactCompany + - value: >- + payments,applied_payments,purchase_orders,contact,company,accounting_period + name: PaymentsAppliedPaymentsPurchaseOrdersContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersContactCompanyAccountingPeriodPaymentTerm + - value: payments,applied_payments,purchase_orders,contact,company,employee + name: PaymentsAppliedPaymentsPurchaseOrdersContactCompanyEmployee + - value: >- + payments,applied_payments,purchase_orders,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsPurchaseOrdersContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,contact,company,employee,payment_term + name: PaymentsAppliedPaymentsPurchaseOrdersContactCompanyEmployeePaymentTerm + - value: payments,applied_payments,purchase_orders,contact,company,payment_term + name: PaymentsAppliedPaymentsPurchaseOrdersContactCompanyPaymentTerm + - value: payments,applied_payments,purchase_orders,contact,employee + name: PaymentsAppliedPaymentsPurchaseOrdersContactEmployee + - value: >- + payments,applied_payments,purchase_orders,contact,employee,accounting_period + name: PaymentsAppliedPaymentsPurchaseOrdersContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,contact,employee,payment_term + name: PaymentsAppliedPaymentsPurchaseOrdersContactEmployeePaymentTerm + - value: payments,applied_payments,purchase_orders,contact,payment_term + name: PaymentsAppliedPaymentsPurchaseOrdersContactPaymentTerm + - value: payments,applied_payments,purchase_orders,employee + name: PaymentsAppliedPaymentsPurchaseOrdersEmployee + - value: payments,applied_payments,purchase_orders,employee,accounting_period + name: PaymentsAppliedPaymentsPurchaseOrdersEmployeeAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersEmployeeAccountingPeriodPaymentTerm + - value: payments,applied_payments,purchase_orders,employee,payment_term + name: PaymentsAppliedPaymentsPurchaseOrdersEmployeePaymentTerm + - value: payments,applied_payments,purchase_orders,payment_term + name: PaymentsAppliedPaymentsPurchaseOrdersPaymentTerm + - value: payments,applied_payments,tracking_categories + name: PaymentsAppliedPaymentsTrackingCategories + - value: payments,applied_payments,tracking_categories,accounting_period + name: PaymentsAppliedPaymentsTrackingCategoriesAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,accounting_period,payment_term + name: PaymentsAppliedPaymentsTrackingCategoriesAccountingPeriodPaymentTerm + - value: payments,applied_payments,tracking_categories,applied_credit_notes + name: PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotes + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCredits + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,employee + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,company + name: PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesCompany + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,company,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,company,employee + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesCompanyEmployee + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,company,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesCompanyPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,contact + name: PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContact + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,contact,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,contact,company + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompany + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,contact,company,employee + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyEmployee + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,contact,company,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,contact,employee + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactEmployee + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,contact,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,contact,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,employee + name: PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesEmployee + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,payment_term + name: PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesPaymentTerm + - value: payments,applied_payments,tracking_categories,applied_vendor_credits + name: PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCredits + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,company + name: PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompany + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,company,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,company,employee + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompanyEmployee + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,company,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,contact + name: PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContact + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,contact,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,contact,company + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompany + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,contact,company,employee + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,contact,employee + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactEmployee + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,contact,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,employee + name: PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsEmployee + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsPaymentTerm + - value: payments,applied_payments,tracking_categories,company + name: PaymentsAppliedPaymentsTrackingCategoriesCompany + - value: >- + payments,applied_payments,tracking_categories,company,accounting_period + name: PaymentsAppliedPaymentsTrackingCategoriesCompanyAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesCompanyAccountingPeriodPaymentTerm + - value: payments,applied_payments,tracking_categories,company,employee + name: PaymentsAppliedPaymentsTrackingCategoriesCompanyEmployee + - value: >- + payments,applied_payments,tracking_categories,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,company,employee,payment_term + name: PaymentsAppliedPaymentsTrackingCategoriesCompanyEmployeePaymentTerm + - value: payments,applied_payments,tracking_categories,company,payment_term + name: PaymentsAppliedPaymentsTrackingCategoriesCompanyPaymentTerm + - value: payments,applied_payments,tracking_categories,contact + name: PaymentsAppliedPaymentsTrackingCategoriesContact + - value: >- + payments,applied_payments,tracking_categories,contact,accounting_period + name: PaymentsAppliedPaymentsTrackingCategoriesContactAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesContactAccountingPeriodPaymentTerm + - value: payments,applied_payments,tracking_categories,contact,company + name: PaymentsAppliedPaymentsTrackingCategoriesContactCompany + - value: >- + payments,applied_payments,tracking_categories,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesContactCompanyAccountingPeriodPaymentTerm + - value: payments,applied_payments,tracking_categories,contact,company,employee + name: PaymentsAppliedPaymentsTrackingCategoriesContactCompanyEmployee + - value: >- + payments,applied_payments,tracking_categories,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,contact,company,payment_term + name: PaymentsAppliedPaymentsTrackingCategoriesContactCompanyPaymentTerm + - value: payments,applied_payments,tracking_categories,contact,employee + name: PaymentsAppliedPaymentsTrackingCategoriesContactEmployee + - value: >- + payments,applied_payments,tracking_categories,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,contact,employee,payment_term + name: PaymentsAppliedPaymentsTrackingCategoriesContactEmployeePaymentTerm + - value: payments,applied_payments,tracking_categories,contact,payment_term + name: PaymentsAppliedPaymentsTrackingCategoriesContactPaymentTerm + - value: payments,applied_payments,tracking_categories,employee + name: PaymentsAppliedPaymentsTrackingCategoriesEmployee + - value: >- + payments,applied_payments,tracking_categories,employee,accounting_period + name: PaymentsAppliedPaymentsTrackingCategoriesEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesEmployeeAccountingPeriodPaymentTerm + - value: payments,applied_payments,tracking_categories,employee,payment_term + name: PaymentsAppliedPaymentsTrackingCategoriesEmployeePaymentTerm + - value: payments,applied_payments,tracking_categories,payment_term + name: PaymentsAppliedPaymentsTrackingCategoriesPaymentTerm + - value: payments,applied_payments,tracking_categories,purchase_orders + name: PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrders + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotes + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCredits + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompany + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company,employee + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployee + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContact + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompany + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployee + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,employee + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployee + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,employee + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployee + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCredits + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompany + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company,employee + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployee + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContact + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompany + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployee + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,employee + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployee + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsPaymentTerm + - value: payments,applied_payments,tracking_categories,purchase_orders,company + name: PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersCompany + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,company,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,company,employee + name: PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersCompanyEmployee + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,company,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersCompanyPaymentTerm + - value: payments,applied_payments,tracking_categories,purchase_orders,contact + name: PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContact + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,contact,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,contact,company + name: PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompany + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,contact,company,employee + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompanyEmployee + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,contact,company,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompanyPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,contact,employee + name: PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactEmployee + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,contact,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,contact,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactPaymentTerm + - value: payments,applied_payments,tracking_categories,purchase_orders,employee + name: PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersEmployee + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,payment_term + name: PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersPaymentTerm + - value: payments,applied_vendor_credits + name: PaymentsAppliedVendorCredits + - value: payments,applied_vendor_credits,accounting_period + name: PaymentsAppliedVendorCreditsAccountingPeriod + - value: payments,applied_vendor_credits,accounting_period,payment_term + name: PaymentsAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: payments,applied_vendor_credits,company + name: PaymentsAppliedVendorCreditsCompany + - value: payments,applied_vendor_credits,company,accounting_period + name: PaymentsAppliedVendorCreditsCompanyAccountingPeriod + - value: payments,applied_vendor_credits,company,accounting_period,payment_term + name: PaymentsAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: payments,applied_vendor_credits,company,employee + name: PaymentsAppliedVendorCreditsCompanyEmployee + - value: payments,applied_vendor_credits,company,employee,accounting_period + name: PaymentsAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_vendor_credits,company,employee,accounting_period,payment_term + name: PaymentsAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: payments,applied_vendor_credits,company,employee,payment_term + name: PaymentsAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: payments,applied_vendor_credits,company,payment_term + name: PaymentsAppliedVendorCreditsCompanyPaymentTerm + - value: payments,applied_vendor_credits,contact + name: PaymentsAppliedVendorCreditsContact + - value: payments,applied_vendor_credits,contact,accounting_period + name: PaymentsAppliedVendorCreditsContactAccountingPeriod + - value: payments,applied_vendor_credits,contact,accounting_period,payment_term + name: PaymentsAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: payments,applied_vendor_credits,contact,company + name: PaymentsAppliedVendorCreditsContactCompany + - value: payments,applied_vendor_credits,contact,company,accounting_period + name: PaymentsAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,applied_vendor_credits,contact,company,accounting_period,payment_term + name: PaymentsAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: payments,applied_vendor_credits,contact,company,employee + name: PaymentsAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,applied_vendor_credits,contact,company,employee,accounting_period + name: PaymentsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: payments,applied_vendor_credits,contact,company,employee,payment_term + name: PaymentsAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: payments,applied_vendor_credits,contact,company,payment_term + name: PaymentsAppliedVendorCreditsContactCompanyPaymentTerm + - value: payments,applied_vendor_credits,contact,employee + name: PaymentsAppliedVendorCreditsContactEmployee + - value: payments,applied_vendor_credits,contact,employee,accounting_period + name: PaymentsAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: PaymentsAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: payments,applied_vendor_credits,contact,employee,payment_term + name: PaymentsAppliedVendorCreditsContactEmployeePaymentTerm + - value: payments,applied_vendor_credits,contact,payment_term + name: PaymentsAppliedVendorCreditsContactPaymentTerm + - value: payments,applied_vendor_credits,employee + name: PaymentsAppliedVendorCreditsEmployee + - value: payments,applied_vendor_credits,employee,accounting_period + name: PaymentsAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,applied_vendor_credits,employee,accounting_period,payment_term + name: PaymentsAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: payments,applied_vendor_credits,employee,payment_term + name: PaymentsAppliedVendorCreditsEmployeePaymentTerm + - value: payments,applied_vendor_credits,payment_term + name: PaymentsAppliedVendorCreditsPaymentTerm + - value: payments,company + name: PaymentsCompany + - value: payments,company,accounting_period + name: PaymentsCompanyAccountingPeriod + - value: payments,company,accounting_period,payment_term + name: PaymentsCompanyAccountingPeriodPaymentTerm + - value: payments,company,employee + name: PaymentsCompanyEmployee + - value: payments,company,employee,accounting_period + name: PaymentsCompanyEmployeeAccountingPeriod + - value: payments,company,employee,accounting_period,payment_term + name: PaymentsCompanyEmployeeAccountingPeriodPaymentTerm + - value: payments,company,employee,payment_term + name: PaymentsCompanyEmployeePaymentTerm + - value: payments,company,payment_term + name: PaymentsCompanyPaymentTerm + - value: payments,contact + name: PaymentsContact + - value: payments,contact,accounting_period + name: PaymentsContactAccountingPeriod + - value: payments,contact,accounting_period,payment_term + name: PaymentsContactAccountingPeriodPaymentTerm + - value: payments,contact,company + name: PaymentsContactCompany + - value: payments,contact,company,accounting_period + name: PaymentsContactCompanyAccountingPeriod + - value: payments,contact,company,accounting_period,payment_term + name: PaymentsContactCompanyAccountingPeriodPaymentTerm + - value: payments,contact,company,employee + name: PaymentsContactCompanyEmployee + - value: payments,contact,company,employee,accounting_period + name: PaymentsContactCompanyEmployeeAccountingPeriod + - value: payments,contact,company,employee,accounting_period,payment_term + name: PaymentsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: payments,contact,company,employee,payment_term + name: PaymentsContactCompanyEmployeePaymentTerm + - value: payments,contact,company,payment_term + name: PaymentsContactCompanyPaymentTerm + - value: payments,contact,employee + name: PaymentsContactEmployee + - value: payments,contact,employee,accounting_period + name: PaymentsContactEmployeeAccountingPeriod + - value: payments,contact,employee,accounting_period,payment_term + name: PaymentsContactEmployeeAccountingPeriodPaymentTerm + - value: payments,contact,employee,payment_term + name: PaymentsContactEmployeePaymentTerm + - value: payments,contact,payment_term + name: PaymentsContactPaymentTerm + - value: payments,employee + name: PaymentsEmployee + - value: payments,employee,accounting_period + name: PaymentsEmployeeAccountingPeriod + - value: payments,employee,accounting_period,payment_term + name: PaymentsEmployeeAccountingPeriodPaymentTerm + - value: payments,employee,payment_term + name: PaymentsEmployeePaymentTerm + - value: payments,line_items + name: PaymentsLineItems + - value: payments,line_items,accounting_period + name: PaymentsLineItemsAccountingPeriod + - value: payments,line_items,accounting_period,payment_term + name: PaymentsLineItemsAccountingPeriodPaymentTerm + - value: payments,line_items,applied_credit_notes + name: PaymentsLineItemsAppliedCreditNotes + - value: payments,line_items,applied_credit_notes,accounting_period + name: PaymentsLineItemsAppliedCreditNotesAccountingPeriod + - value: >- + payments,line_items,applied_credit_notes,accounting_period,payment_term + name: PaymentsLineItemsAppliedCreditNotesAccountingPeriodPaymentTerm + - value: payments,line_items,applied_credit_notes,applied_vendor_credits + name: PaymentsLineItemsAppliedCreditNotesAppliedVendorCredits + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,company + name: PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,company,employee + name: PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,contact + name: PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company + name: PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,contact,employee + name: PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,employee + name: PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,payment_term + name: PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: payments,line_items,applied_credit_notes,company + name: PaymentsLineItemsAppliedCreditNotesCompany + - value: payments,line_items,applied_credit_notes,company,accounting_period + name: PaymentsLineItemsAppliedCreditNotesCompanyAccountingPeriod + - value: >- + payments,line_items,applied_credit_notes,company,accounting_period,payment_term + name: PaymentsLineItemsAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: payments,line_items,applied_credit_notes,company,employee + name: PaymentsLineItemsAppliedCreditNotesCompanyEmployee + - value: >- + payments,line_items,applied_credit_notes,company,employee,accounting_period + name: PaymentsLineItemsAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: payments,line_items,applied_credit_notes,company,employee,payment_term + name: PaymentsLineItemsAppliedCreditNotesCompanyEmployeePaymentTerm + - value: payments,line_items,applied_credit_notes,company,payment_term + name: PaymentsLineItemsAppliedCreditNotesCompanyPaymentTerm + - value: payments,line_items,applied_credit_notes,contact + name: PaymentsLineItemsAppliedCreditNotesContact + - value: payments,line_items,applied_credit_notes,contact,accounting_period + name: PaymentsLineItemsAppliedCreditNotesContactAccountingPeriod + - value: >- + payments,line_items,applied_credit_notes,contact,accounting_period,payment_term + name: PaymentsLineItemsAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: payments,line_items,applied_credit_notes,contact,company + name: PaymentsLineItemsAppliedCreditNotesContactCompany + - value: >- + payments,line_items,applied_credit_notes,contact,company,accounting_period + name: PaymentsLineItemsAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + payments,line_items,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + PaymentsLineItemsAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: payments,line_items,applied_credit_notes,contact,company,employee + name: PaymentsLineItemsAppliedCreditNotesContactCompanyEmployee + - value: >- + payments,line_items,applied_credit_notes,contact,company,employee,accounting_period + name: >- + PaymentsLineItemsAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,applied_credit_notes,contact,company,employee,payment_term + name: PaymentsLineItemsAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: payments,line_items,applied_credit_notes,contact,company,payment_term + name: PaymentsLineItemsAppliedCreditNotesContactCompanyPaymentTerm + - value: payments,line_items,applied_credit_notes,contact,employee + name: PaymentsLineItemsAppliedCreditNotesContactEmployee + - value: >- + payments,line_items,applied_credit_notes,contact,employee,accounting_period + name: PaymentsLineItemsAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + payments,line_items,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: payments,line_items,applied_credit_notes,contact,employee,payment_term + name: PaymentsLineItemsAppliedCreditNotesContactEmployeePaymentTerm + - value: payments,line_items,applied_credit_notes,contact,payment_term + name: PaymentsLineItemsAppliedCreditNotesContactPaymentTerm + - value: payments,line_items,applied_credit_notes,employee + name: PaymentsLineItemsAppliedCreditNotesEmployee + - value: payments,line_items,applied_credit_notes,employee,accounting_period + name: PaymentsLineItemsAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + payments,line_items,applied_credit_notes,employee,accounting_period,payment_term + name: PaymentsLineItemsAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: payments,line_items,applied_credit_notes,employee,payment_term + name: PaymentsLineItemsAppliedCreditNotesEmployeePaymentTerm + - value: payments,line_items,applied_credit_notes,payment_term + name: PaymentsLineItemsAppliedCreditNotesPaymentTerm + - value: payments,line_items,applied_vendor_credits + name: PaymentsLineItemsAppliedVendorCredits + - value: payments,line_items,applied_vendor_credits,accounting_period + name: PaymentsLineItemsAppliedVendorCreditsAccountingPeriod + - value: >- + payments,line_items,applied_vendor_credits,accounting_period,payment_term + name: PaymentsLineItemsAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: payments,line_items,applied_vendor_credits,company + name: PaymentsLineItemsAppliedVendorCreditsCompany + - value: payments,line_items,applied_vendor_credits,company,accounting_period + name: PaymentsLineItemsAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,line_items,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsLineItemsAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: payments,line_items,applied_vendor_credits,company,employee + name: PaymentsLineItemsAppliedVendorCreditsCompanyEmployee + - value: >- + payments,line_items,applied_vendor_credits,company,employee,accounting_period + name: PaymentsLineItemsAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,applied_vendor_credits,company,employee,payment_term + name: PaymentsLineItemsAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: payments,line_items,applied_vendor_credits,company,payment_term + name: PaymentsLineItemsAppliedVendorCreditsCompanyPaymentTerm + - value: payments,line_items,applied_vendor_credits,contact + name: PaymentsLineItemsAppliedVendorCreditsContact + - value: payments,line_items,applied_vendor_credits,contact,accounting_period + name: PaymentsLineItemsAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,line_items,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsLineItemsAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: payments,line_items,applied_vendor_credits,contact,company + name: PaymentsLineItemsAppliedVendorCreditsContactCompany + - value: >- + payments,line_items,applied_vendor_credits,contact,company,accounting_period + name: PaymentsLineItemsAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,line_items,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsLineItemsAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: payments,line_items,applied_vendor_credits,contact,company,employee + name: PaymentsLineItemsAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,line_items,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsLineItemsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,applied_vendor_credits,contact,company,employee,payment_term + name: PaymentsLineItemsAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,line_items,applied_vendor_credits,contact,company,payment_term + name: PaymentsLineItemsAppliedVendorCreditsContactCompanyPaymentTerm + - value: payments,line_items,applied_vendor_credits,contact,employee + name: PaymentsLineItemsAppliedVendorCreditsContactEmployee + - value: >- + payments,line_items,applied_vendor_credits,contact,employee,accounting_period + name: PaymentsLineItemsAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,line_items,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,applied_vendor_credits,contact,employee,payment_term + name: PaymentsLineItemsAppliedVendorCreditsContactEmployeePaymentTerm + - value: payments,line_items,applied_vendor_credits,contact,payment_term + name: PaymentsLineItemsAppliedVendorCreditsContactPaymentTerm + - value: payments,line_items,applied_vendor_credits,employee + name: PaymentsLineItemsAppliedVendorCreditsEmployee + - value: payments,line_items,applied_vendor_credits,employee,accounting_period + name: PaymentsLineItemsAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,line_items,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: payments,line_items,applied_vendor_credits,employee,payment_term + name: PaymentsLineItemsAppliedVendorCreditsEmployeePaymentTerm + - value: payments,line_items,applied_vendor_credits,payment_term + name: PaymentsLineItemsAppliedVendorCreditsPaymentTerm + - value: payments,line_items,company + name: PaymentsLineItemsCompany + - value: payments,line_items,company,accounting_period + name: PaymentsLineItemsCompanyAccountingPeriod + - value: payments,line_items,company,accounting_period,payment_term + name: PaymentsLineItemsCompanyAccountingPeriodPaymentTerm + - value: payments,line_items,company,employee + name: PaymentsLineItemsCompanyEmployee + - value: payments,line_items,company,employee,accounting_period + name: PaymentsLineItemsCompanyEmployeeAccountingPeriod + - value: payments,line_items,company,employee,accounting_period,payment_term + name: PaymentsLineItemsCompanyEmployeeAccountingPeriodPaymentTerm + - value: payments,line_items,company,employee,payment_term + name: PaymentsLineItemsCompanyEmployeePaymentTerm + - value: payments,line_items,company,payment_term + name: PaymentsLineItemsCompanyPaymentTerm + - value: payments,line_items,contact + name: PaymentsLineItemsContact + - value: payments,line_items,contact,accounting_period + name: PaymentsLineItemsContactAccountingPeriod + - value: payments,line_items,contact,accounting_period,payment_term + name: PaymentsLineItemsContactAccountingPeriodPaymentTerm + - value: payments,line_items,contact,company + name: PaymentsLineItemsContactCompany + - value: payments,line_items,contact,company,accounting_period + name: PaymentsLineItemsContactCompanyAccountingPeriod + - value: payments,line_items,contact,company,accounting_period,payment_term + name: PaymentsLineItemsContactCompanyAccountingPeriodPaymentTerm + - value: payments,line_items,contact,company,employee + name: PaymentsLineItemsContactCompanyEmployee + - value: payments,line_items,contact,company,employee,accounting_period + name: PaymentsLineItemsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,contact,company,employee,accounting_period,payment_term + name: PaymentsLineItemsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: payments,line_items,contact,company,employee,payment_term + name: PaymentsLineItemsContactCompanyEmployeePaymentTerm + - value: payments,line_items,contact,company,payment_term + name: PaymentsLineItemsContactCompanyPaymentTerm + - value: payments,line_items,contact,employee + name: PaymentsLineItemsContactEmployee + - value: payments,line_items,contact,employee,accounting_period + name: PaymentsLineItemsContactEmployeeAccountingPeriod + - value: payments,line_items,contact,employee,accounting_period,payment_term + name: PaymentsLineItemsContactEmployeeAccountingPeriodPaymentTerm + - value: payments,line_items,contact,employee,payment_term + name: PaymentsLineItemsContactEmployeePaymentTerm + - value: payments,line_items,contact,payment_term + name: PaymentsLineItemsContactPaymentTerm + - value: payments,line_items,employee + name: PaymentsLineItemsEmployee + - value: payments,line_items,employee,accounting_period + name: PaymentsLineItemsEmployeeAccountingPeriod + - value: payments,line_items,employee,accounting_period,payment_term + name: PaymentsLineItemsEmployeeAccountingPeriodPaymentTerm + - value: payments,line_items,employee,payment_term + name: PaymentsLineItemsEmployeePaymentTerm + - value: payments,line_items,payment_term + name: PaymentsLineItemsPaymentTerm + - value: payments,line_items,purchase_orders + name: PaymentsLineItemsPurchaseOrders + - value: payments,line_items,purchase_orders,accounting_period + name: PaymentsLineItemsPurchaseOrdersAccountingPeriod + - value: payments,line_items,purchase_orders,accounting_period,payment_term + name: PaymentsLineItemsPurchaseOrdersAccountingPeriodPaymentTerm + - value: payments,line_items,purchase_orders,applied_credit_notes + name: PaymentsLineItemsPurchaseOrdersAppliedCreditNotes + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,accounting_period + name: PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAccountingPeriod + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAccountingPeriodPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits + name: PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCredits + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: payments,line_items,purchase_orders,applied_credit_notes,company + name: PaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompany + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,company,accounting_period + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,company,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,company,employee + name: PaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployee + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,company,employee,accounting_period + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,company,employee,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployeePaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,company,payment_term + name: PaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyPaymentTerm + - value: payments,line_items,purchase_orders,applied_credit_notes,contact + name: PaymentsLineItemsPurchaseOrdersAppliedCreditNotesContact + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,contact,accounting_period + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactAccountingPeriod + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,contact,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,contact,company + name: PaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompany + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,contact,company,accounting_period + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,contact,company,employee + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployee + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,contact,company,employee,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,contact,company,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,contact,employee + name: PaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactEmployee + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,contact,employee,accounting_period + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,contact,employee,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactEmployeePaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,contact,payment_term + name: PaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactPaymentTerm + - value: payments,line_items,purchase_orders,applied_credit_notes,employee + name: PaymentsLineItemsPurchaseOrdersAppliedCreditNotesEmployee + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,employee,accounting_period + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,employee,payment_term + name: PaymentsLineItemsPurchaseOrdersAppliedCreditNotesEmployeePaymentTerm + - value: payments,line_items,purchase_orders,applied_credit_notes,payment_term + name: PaymentsLineItemsPurchaseOrdersAppliedCreditNotesPaymentTerm + - value: payments,line_items,purchase_orders,applied_vendor_credits + name: PaymentsLineItemsPurchaseOrdersAppliedVendorCredits + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,accounting_period + name: PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsAccountingPeriod + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: payments,line_items,purchase_orders,applied_vendor_credits,company + name: PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompany + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,company,accounting_period + name: >- + PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,company,employee + name: PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployee + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,company,payment_term + name: PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyPaymentTerm + - value: payments,line_items,purchase_orders,applied_vendor_credits,contact + name: PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContact + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,contact,accounting_period + name: >- + PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,contact,company + name: PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompany + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,contact,company,employee + name: >- + PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,contact,employee + name: PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployee + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,contact,payment_term + name: PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactPaymentTerm + - value: payments,line_items,purchase_orders,applied_vendor_credits,employee + name: PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsEmployee + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,employee,accounting_period + name: >- + PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,employee,payment_term + name: PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsEmployeePaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,payment_term + name: PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsPaymentTerm + - value: payments,line_items,purchase_orders,company + name: PaymentsLineItemsPurchaseOrdersCompany + - value: payments,line_items,purchase_orders,company,accounting_period + name: PaymentsLineItemsPurchaseOrdersCompanyAccountingPeriod + - value: >- + payments,line_items,purchase_orders,company,accounting_period,payment_term + name: PaymentsLineItemsPurchaseOrdersCompanyAccountingPeriodPaymentTerm + - value: payments,line_items,purchase_orders,company,employee + name: PaymentsLineItemsPurchaseOrdersCompanyEmployee + - value: payments,line_items,purchase_orders,company,employee,accounting_period + name: PaymentsLineItemsPurchaseOrdersCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,purchase_orders,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersCompanyEmployeeAccountingPeriodPaymentTerm + - value: payments,line_items,purchase_orders,company,employee,payment_term + name: PaymentsLineItemsPurchaseOrdersCompanyEmployeePaymentTerm + - value: payments,line_items,purchase_orders,company,payment_term + name: PaymentsLineItemsPurchaseOrdersCompanyPaymentTerm + - value: payments,line_items,purchase_orders,contact + name: PaymentsLineItemsPurchaseOrdersContact + - value: payments,line_items,purchase_orders,contact,accounting_period + name: PaymentsLineItemsPurchaseOrdersContactAccountingPeriod + - value: >- + payments,line_items,purchase_orders,contact,accounting_period,payment_term + name: PaymentsLineItemsPurchaseOrdersContactAccountingPeriodPaymentTerm + - value: payments,line_items,purchase_orders,contact,company + name: PaymentsLineItemsPurchaseOrdersContactCompany + - value: payments,line_items,purchase_orders,contact,company,accounting_period + name: PaymentsLineItemsPurchaseOrdersContactCompanyAccountingPeriod + - value: >- + payments,line_items,purchase_orders,contact,company,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersContactCompanyAccountingPeriodPaymentTerm + - value: payments,line_items,purchase_orders,contact,company,employee + name: PaymentsLineItemsPurchaseOrdersContactCompanyEmployee + - value: >- + payments,line_items,purchase_orders,contact,company,employee,accounting_period + name: PaymentsLineItemsPurchaseOrdersContactCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,purchase_orders,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,purchase_orders,contact,company,employee,payment_term + name: PaymentsLineItemsPurchaseOrdersContactCompanyEmployeePaymentTerm + - value: payments,line_items,purchase_orders,contact,company,payment_term + name: PaymentsLineItemsPurchaseOrdersContactCompanyPaymentTerm + - value: payments,line_items,purchase_orders,contact,employee + name: PaymentsLineItemsPurchaseOrdersContactEmployee + - value: payments,line_items,purchase_orders,contact,employee,accounting_period + name: PaymentsLineItemsPurchaseOrdersContactEmployeeAccountingPeriod + - value: >- + payments,line_items,purchase_orders,contact,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersContactEmployeeAccountingPeriodPaymentTerm + - value: payments,line_items,purchase_orders,contact,employee,payment_term + name: PaymentsLineItemsPurchaseOrdersContactEmployeePaymentTerm + - value: payments,line_items,purchase_orders,contact,payment_term + name: PaymentsLineItemsPurchaseOrdersContactPaymentTerm + - value: payments,line_items,purchase_orders,employee + name: PaymentsLineItemsPurchaseOrdersEmployee + - value: payments,line_items,purchase_orders,employee,accounting_period + name: PaymentsLineItemsPurchaseOrdersEmployeeAccountingPeriod + - value: >- + payments,line_items,purchase_orders,employee,accounting_period,payment_term + name: PaymentsLineItemsPurchaseOrdersEmployeeAccountingPeriodPaymentTerm + - value: payments,line_items,purchase_orders,employee,payment_term + name: PaymentsLineItemsPurchaseOrdersEmployeePaymentTerm + - value: payments,line_items,purchase_orders,payment_term + name: PaymentsLineItemsPurchaseOrdersPaymentTerm + - value: payments,line_items,tracking_categories + name: PaymentsLineItemsTrackingCategories + - value: payments,line_items,tracking_categories,accounting_period + name: PaymentsLineItemsTrackingCategoriesAccountingPeriod + - value: payments,line_items,tracking_categories,accounting_period,payment_term + name: PaymentsLineItemsTrackingCategoriesAccountingPeriodPaymentTerm + - value: payments,line_items,tracking_categories,applied_credit_notes + name: PaymentsLineItemsTrackingCategoriesAppliedCreditNotes + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,accounting_period + name: PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAccountingPeriod + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCredits + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: payments,line_items,tracking_categories,applied_credit_notes,company + name: PaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompany + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,company,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriod + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,company,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,company,employee + name: PaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployee + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,company,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,company,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,company,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyPaymentTerm + - value: payments,line_items,tracking_categories,applied_credit_notes,contact + name: PaymentsLineItemsTrackingCategoriesAppliedCreditNotesContact + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,contact,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactAccountingPeriod + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,contact,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,contact,company + name: PaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompany + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,contact,company,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,contact,company,employee + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployee + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,contact,company,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,contact,company,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,contact,employee + name: PaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactEmployee + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,contact,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,contact,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,contact,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactPaymentTerm + - value: payments,line_items,tracking_categories,applied_credit_notes,employee + name: PaymentsLineItemsTrackingCategoriesAppliedCreditNotesEmployee + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,payment_term + name: PaymentsLineItemsTrackingCategoriesAppliedCreditNotesPaymentTerm + - value: payments,line_items,tracking_categories,applied_vendor_credits + name: PaymentsLineItemsTrackingCategoriesAppliedVendorCredits + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsAccountingPeriod + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: payments,line_items,tracking_categories,applied_vendor_credits,company + name: PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompany + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,company,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,company,employee + name: PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployee + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,company,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyPaymentTerm + - value: payments,line_items,tracking_categories,applied_vendor_credits,contact + name: PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContact + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,contact,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,contact,company + name: PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompany + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,contact,company,employee + name: >- + PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,contact,employee + name: PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployee + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,contact,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,employee + name: PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsEmployee + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,payment_term + name: PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsPaymentTerm + - value: payments,line_items,tracking_categories,company + name: PaymentsLineItemsTrackingCategoriesCompany + - value: payments,line_items,tracking_categories,company,accounting_period + name: PaymentsLineItemsTrackingCategoriesCompanyAccountingPeriod + - value: >- + payments,line_items,tracking_categories,company,accounting_period,payment_term + name: PaymentsLineItemsTrackingCategoriesCompanyAccountingPeriodPaymentTerm + - value: payments,line_items,tracking_categories,company,employee + name: PaymentsLineItemsTrackingCategoriesCompanyEmployee + - value: >- + payments,line_items,tracking_categories,company,employee,accounting_period + name: PaymentsLineItemsTrackingCategoriesCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesCompanyEmployeeAccountingPeriodPaymentTerm + - value: payments,line_items,tracking_categories,company,employee,payment_term + name: PaymentsLineItemsTrackingCategoriesCompanyEmployeePaymentTerm + - value: payments,line_items,tracking_categories,company,payment_term + name: PaymentsLineItemsTrackingCategoriesCompanyPaymentTerm + - value: payments,line_items,tracking_categories,contact + name: PaymentsLineItemsTrackingCategoriesContact + - value: payments,line_items,tracking_categories,contact,accounting_period + name: PaymentsLineItemsTrackingCategoriesContactAccountingPeriod + - value: >- + payments,line_items,tracking_categories,contact,accounting_period,payment_term + name: PaymentsLineItemsTrackingCategoriesContactAccountingPeriodPaymentTerm + - value: payments,line_items,tracking_categories,contact,company + name: PaymentsLineItemsTrackingCategoriesContactCompany + - value: >- + payments,line_items,tracking_categories,contact,company,accounting_period + name: PaymentsLineItemsTrackingCategoriesContactCompanyAccountingPeriod + - value: >- + payments,line_items,tracking_categories,contact,company,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesContactCompanyAccountingPeriodPaymentTerm + - value: payments,line_items,tracking_categories,contact,company,employee + name: PaymentsLineItemsTrackingCategoriesContactCompanyEmployee + - value: >- + payments,line_items,tracking_categories,contact,company,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesContactCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,contact,company,employee,payment_term + name: PaymentsLineItemsTrackingCategoriesContactCompanyEmployeePaymentTerm + - value: payments,line_items,tracking_categories,contact,company,payment_term + name: PaymentsLineItemsTrackingCategoriesContactCompanyPaymentTerm + - value: payments,line_items,tracking_categories,contact,employee + name: PaymentsLineItemsTrackingCategoriesContactEmployee + - value: >- + payments,line_items,tracking_categories,contact,employee,accounting_period + name: PaymentsLineItemsTrackingCategoriesContactEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,contact,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesContactEmployeeAccountingPeriodPaymentTerm + - value: payments,line_items,tracking_categories,contact,employee,payment_term + name: PaymentsLineItemsTrackingCategoriesContactEmployeePaymentTerm + - value: payments,line_items,tracking_categories,contact,payment_term + name: PaymentsLineItemsTrackingCategoriesContactPaymentTerm + - value: payments,line_items,tracking_categories,employee + name: PaymentsLineItemsTrackingCategoriesEmployee + - value: payments,line_items,tracking_categories,employee,accounting_period + name: PaymentsLineItemsTrackingCategoriesEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,employee,accounting_period,payment_term + name: PaymentsLineItemsTrackingCategoriesEmployeeAccountingPeriodPaymentTerm + - value: payments,line_items,tracking_categories,employee,payment_term + name: PaymentsLineItemsTrackingCategoriesEmployeePaymentTerm + - value: payments,line_items,tracking_categories,payment_term + name: PaymentsLineItemsTrackingCategoriesPaymentTerm + - value: payments,line_items,tracking_categories,purchase_orders + name: PaymentsLineItemsTrackingCategoriesPurchaseOrders + - value: >- + payments,line_items,tracking_categories,purchase_orders,accounting_period + name: PaymentsLineItemsTrackingCategoriesPurchaseOrdersAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes + name: PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotes + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCredits + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompany + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployee + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContact + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompany + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployee + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployee + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,employee + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployee + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits + name: PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCredits + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompany + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployee + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContact + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompany + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployee + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployee + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsPaymentTerm + - value: payments,line_items,tracking_categories,purchase_orders,company + name: PaymentsLineItemsTrackingCategoriesPurchaseOrdersCompany + - value: >- + payments,line_items,tracking_categories,purchase_orders,company,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,company,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,company,employee + name: PaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployee + - value: >- + payments,line_items,tracking_categories,purchase_orders,company,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,company,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,company,payment_term + name: PaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyPaymentTerm + - value: payments,line_items,tracking_categories,purchase_orders,contact + name: PaymentsLineItemsTrackingCategoriesPurchaseOrdersContact + - value: >- + payments,line_items,tracking_categories,purchase_orders,contact,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersContactAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,contact,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersContactAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,contact,company + name: PaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompany + - value: >- + payments,line_items,tracking_categories,purchase_orders,contact,company,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,contact,company,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,contact,company,employee + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployee + - value: >- + payments,line_items,tracking_categories,purchase_orders,contact,company,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,contact,company,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,contact,company,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,contact,employee + name: PaymentsLineItemsTrackingCategoriesPurchaseOrdersContactEmployee + - value: >- + payments,line_items,tracking_categories,purchase_orders,contact,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,contact,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,contact,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersContactEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,contact,payment_term + name: PaymentsLineItemsTrackingCategoriesPurchaseOrdersContactPaymentTerm + - value: payments,line_items,tracking_categories,purchase_orders,employee + name: PaymentsLineItemsTrackingCategoriesPurchaseOrdersEmployee + - value: >- + payments,line_items,tracking_categories,purchase_orders,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,employee,payment_term + name: PaymentsLineItemsTrackingCategoriesPurchaseOrdersEmployeePaymentTerm + - value: payments,line_items,tracking_categories,purchase_orders,payment_term + name: PaymentsLineItemsTrackingCategoriesPurchaseOrdersPaymentTerm + - value: payments,payment_term + name: PaymentsPaymentTerm + - value: payments,purchase_orders + name: PaymentsPurchaseOrders + - value: payments,purchase_orders,accounting_period + name: PaymentsPurchaseOrdersAccountingPeriod + - value: payments,purchase_orders,accounting_period,payment_term + name: PaymentsPurchaseOrdersAccountingPeriodPaymentTerm + - value: payments,purchase_orders,applied_credit_notes + name: PaymentsPurchaseOrdersAppliedCreditNotes + - value: payments,purchase_orders,applied_credit_notes,accounting_period + name: PaymentsPurchaseOrdersAppliedCreditNotesAccountingPeriod + - value: >- + payments,purchase_orders,applied_credit_notes,accounting_period,payment_term + name: PaymentsPurchaseOrdersAppliedCreditNotesAccountingPeriodPaymentTerm + - value: payments,purchase_orders,applied_credit_notes,applied_vendor_credits + name: PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCredits + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company + name: PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact + name: PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,employee + name: PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,payment_term + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: payments,purchase_orders,applied_credit_notes,company + name: PaymentsPurchaseOrdersAppliedCreditNotesCompany + - value: >- + payments,purchase_orders,applied_credit_notes,company,accounting_period + name: PaymentsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod + - value: >- + payments,purchase_orders,applied_credit_notes,company,accounting_period,payment_term + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: payments,purchase_orders,applied_credit_notes,company,employee + name: PaymentsPurchaseOrdersAppliedCreditNotesCompanyEmployee + - value: >- + payments,purchase_orders,applied_credit_notes,company,employee,accounting_period + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + payments,purchase_orders,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,purchase_orders,applied_credit_notes,company,employee,payment_term + name: PaymentsPurchaseOrdersAppliedCreditNotesCompanyEmployeePaymentTerm + - value: payments,purchase_orders,applied_credit_notes,company,payment_term + name: PaymentsPurchaseOrdersAppliedCreditNotesCompanyPaymentTerm + - value: payments,purchase_orders,applied_credit_notes,contact + name: PaymentsPurchaseOrdersAppliedCreditNotesContact + - value: >- + payments,purchase_orders,applied_credit_notes,contact,accounting_period + name: PaymentsPurchaseOrdersAppliedCreditNotesContactAccountingPeriod + - value: >- + payments,purchase_orders,applied_credit_notes,contact,accounting_period,payment_term + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: payments,purchase_orders,applied_credit_notes,contact,company + name: PaymentsPurchaseOrdersAppliedCreditNotesContactCompany + - value: >- + payments,purchase_orders,applied_credit_notes,contact,company,accounting_period + name: PaymentsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + payments,purchase_orders,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: payments,purchase_orders,applied_credit_notes,contact,company,employee + name: PaymentsPurchaseOrdersAppliedCreditNotesContactCompanyEmployee + - value: >- + payments,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + payments,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,purchase_orders,applied_credit_notes,contact,company,employee,payment_term + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: >- + payments,purchase_orders,applied_credit_notes,contact,company,payment_term + name: PaymentsPurchaseOrdersAppliedCreditNotesContactCompanyPaymentTerm + - value: payments,purchase_orders,applied_credit_notes,contact,employee + name: PaymentsPurchaseOrdersAppliedCreditNotesContactEmployee + - value: >- + payments,purchase_orders,applied_credit_notes,contact,employee,accounting_period + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + payments,purchase_orders,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,purchase_orders,applied_credit_notes,contact,employee,payment_term + name: PaymentsPurchaseOrdersAppliedCreditNotesContactEmployeePaymentTerm + - value: payments,purchase_orders,applied_credit_notes,contact,payment_term + name: PaymentsPurchaseOrdersAppliedCreditNotesContactPaymentTerm + - value: payments,purchase_orders,applied_credit_notes,employee + name: PaymentsPurchaseOrdersAppliedCreditNotesEmployee + - value: >- + payments,purchase_orders,applied_credit_notes,employee,accounting_period + name: PaymentsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + payments,purchase_orders,applied_credit_notes,employee,accounting_period,payment_term + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: payments,purchase_orders,applied_credit_notes,employee,payment_term + name: PaymentsPurchaseOrdersAppliedCreditNotesEmployeePaymentTerm + - value: payments,purchase_orders,applied_credit_notes,payment_term + name: PaymentsPurchaseOrdersAppliedCreditNotesPaymentTerm + - value: payments,purchase_orders,applied_vendor_credits + name: PaymentsPurchaseOrdersAppliedVendorCredits + - value: payments,purchase_orders,applied_vendor_credits,accounting_period + name: PaymentsPurchaseOrdersAppliedVendorCreditsAccountingPeriod + - value: >- + payments,purchase_orders,applied_vendor_credits,accounting_period,payment_term + name: PaymentsPurchaseOrdersAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: payments,purchase_orders,applied_vendor_credits,company + name: PaymentsPurchaseOrdersAppliedVendorCreditsCompany + - value: >- + payments,purchase_orders,applied_vendor_credits,company,accounting_period + name: PaymentsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,purchase_orders,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: payments,purchase_orders,applied_vendor_credits,company,employee + name: PaymentsPurchaseOrdersAppliedVendorCreditsCompanyEmployee + - value: >- + payments,purchase_orders,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,purchase_orders,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,purchase_orders,applied_vendor_credits,company,employee,payment_term + name: PaymentsPurchaseOrdersAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: payments,purchase_orders,applied_vendor_credits,company,payment_term + name: PaymentsPurchaseOrdersAppliedVendorCreditsCompanyPaymentTerm + - value: payments,purchase_orders,applied_vendor_credits,contact + name: PaymentsPurchaseOrdersAppliedVendorCreditsContact + - value: >- + payments,purchase_orders,applied_vendor_credits,contact,accounting_period + name: PaymentsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,purchase_orders,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: payments,purchase_orders,applied_vendor_credits,contact,company + name: PaymentsPurchaseOrdersAppliedVendorCreditsContactCompany + - value: >- + payments,purchase_orders,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,purchase_orders,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,purchase_orders,applied_vendor_credits,contact,company,employee + name: PaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,purchase_orders,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,purchase_orders,applied_vendor_credits,contact,company,payment_term + name: PaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyPaymentTerm + - value: payments,purchase_orders,applied_vendor_credits,contact,employee + name: PaymentsPurchaseOrdersAppliedVendorCreditsContactEmployee + - value: >- + payments,purchase_orders,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,purchase_orders,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,purchase_orders,applied_vendor_credits,contact,employee,payment_term + name: PaymentsPurchaseOrdersAppliedVendorCreditsContactEmployeePaymentTerm + - value: payments,purchase_orders,applied_vendor_credits,contact,payment_term + name: PaymentsPurchaseOrdersAppliedVendorCreditsContactPaymentTerm + - value: payments,purchase_orders,applied_vendor_credits,employee + name: PaymentsPurchaseOrdersAppliedVendorCreditsEmployee + - value: >- + payments,purchase_orders,applied_vendor_credits,employee,accounting_period + name: PaymentsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,purchase_orders,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: payments,purchase_orders,applied_vendor_credits,employee,payment_term + name: PaymentsPurchaseOrdersAppliedVendorCreditsEmployeePaymentTerm + - value: payments,purchase_orders,applied_vendor_credits,payment_term + name: PaymentsPurchaseOrdersAppliedVendorCreditsPaymentTerm + - value: payments,purchase_orders,company + name: PaymentsPurchaseOrdersCompany + - value: payments,purchase_orders,company,accounting_period + name: PaymentsPurchaseOrdersCompanyAccountingPeriod + - value: payments,purchase_orders,company,accounting_period,payment_term + name: PaymentsPurchaseOrdersCompanyAccountingPeriodPaymentTerm + - value: payments,purchase_orders,company,employee + name: PaymentsPurchaseOrdersCompanyEmployee + - value: payments,purchase_orders,company,employee,accounting_period + name: PaymentsPurchaseOrdersCompanyEmployeeAccountingPeriod + - value: >- + payments,purchase_orders,company,employee,accounting_period,payment_term + name: PaymentsPurchaseOrdersCompanyEmployeeAccountingPeriodPaymentTerm + - value: payments,purchase_orders,company,employee,payment_term + name: PaymentsPurchaseOrdersCompanyEmployeePaymentTerm + - value: payments,purchase_orders,company,payment_term + name: PaymentsPurchaseOrdersCompanyPaymentTerm + - value: payments,purchase_orders,contact + name: PaymentsPurchaseOrdersContact + - value: payments,purchase_orders,contact,accounting_period + name: PaymentsPurchaseOrdersContactAccountingPeriod + - value: payments,purchase_orders,contact,accounting_period,payment_term + name: PaymentsPurchaseOrdersContactAccountingPeriodPaymentTerm + - value: payments,purchase_orders,contact,company + name: PaymentsPurchaseOrdersContactCompany + - value: payments,purchase_orders,contact,company,accounting_period + name: PaymentsPurchaseOrdersContactCompanyAccountingPeriod + - value: >- + payments,purchase_orders,contact,company,accounting_period,payment_term + name: PaymentsPurchaseOrdersContactCompanyAccountingPeriodPaymentTerm + - value: payments,purchase_orders,contact,company,employee + name: PaymentsPurchaseOrdersContactCompanyEmployee + - value: payments,purchase_orders,contact,company,employee,accounting_period + name: PaymentsPurchaseOrdersContactCompanyEmployeeAccountingPeriod + - value: >- + payments,purchase_orders,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsPurchaseOrdersContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: payments,purchase_orders,contact,company,employee,payment_term + name: PaymentsPurchaseOrdersContactCompanyEmployeePaymentTerm + - value: payments,purchase_orders,contact,company,payment_term + name: PaymentsPurchaseOrdersContactCompanyPaymentTerm + - value: payments,purchase_orders,contact,employee + name: PaymentsPurchaseOrdersContactEmployee + - value: payments,purchase_orders,contact,employee,accounting_period + name: PaymentsPurchaseOrdersContactEmployeeAccountingPeriod + - value: >- + payments,purchase_orders,contact,employee,accounting_period,payment_term + name: PaymentsPurchaseOrdersContactEmployeeAccountingPeriodPaymentTerm + - value: payments,purchase_orders,contact,employee,payment_term + name: PaymentsPurchaseOrdersContactEmployeePaymentTerm + - value: payments,purchase_orders,contact,payment_term + name: PaymentsPurchaseOrdersContactPaymentTerm + - value: payments,purchase_orders,employee + name: PaymentsPurchaseOrdersEmployee + - value: payments,purchase_orders,employee,accounting_period + name: PaymentsPurchaseOrdersEmployeeAccountingPeriod + - value: payments,purchase_orders,employee,accounting_period,payment_term + name: PaymentsPurchaseOrdersEmployeeAccountingPeriodPaymentTerm + - value: payments,purchase_orders,employee,payment_term + name: PaymentsPurchaseOrdersEmployeePaymentTerm + - value: payments,purchase_orders,payment_term + name: PaymentsPurchaseOrdersPaymentTerm + - value: payments,tracking_categories + name: PaymentsTrackingCategories + - value: payments,tracking_categories,accounting_period + name: PaymentsTrackingCategoriesAccountingPeriod + - value: payments,tracking_categories,accounting_period,payment_term + name: PaymentsTrackingCategoriesAccountingPeriodPaymentTerm + - value: payments,tracking_categories,applied_credit_notes + name: PaymentsTrackingCategoriesAppliedCreditNotes + - value: payments,tracking_categories,applied_credit_notes,accounting_period + name: PaymentsTrackingCategoriesAppliedCreditNotesAccountingPeriod + - value: >- + payments,tracking_categories,applied_credit_notes,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits + name: PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCredits + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,employee + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,payment_term + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: payments,tracking_categories,applied_credit_notes,company + name: PaymentsTrackingCategoriesAppliedCreditNotesCompany + - value: >- + payments,tracking_categories,applied_credit_notes,company,accounting_period + name: PaymentsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriod + - value: >- + payments,tracking_categories,applied_credit_notes,company,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: payments,tracking_categories,applied_credit_notes,company,employee + name: PaymentsTrackingCategoriesAppliedCreditNotesCompanyEmployee + - value: >- + payments,tracking_categories,applied_credit_notes,company,employee,accounting_period + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,applied_credit_notes,company,employee,payment_term + name: PaymentsTrackingCategoriesAppliedCreditNotesCompanyEmployeePaymentTerm + - value: payments,tracking_categories,applied_credit_notes,company,payment_term + name: PaymentsTrackingCategoriesAppliedCreditNotesCompanyPaymentTerm + - value: payments,tracking_categories,applied_credit_notes,contact + name: PaymentsTrackingCategoriesAppliedCreditNotesContact + - value: >- + payments,tracking_categories,applied_credit_notes,contact,accounting_period + name: PaymentsTrackingCategoriesAppliedCreditNotesContactAccountingPeriod + - value: >- + payments,tracking_categories,applied_credit_notes,contact,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: payments,tracking_categories,applied_credit_notes,contact,company + name: PaymentsTrackingCategoriesAppliedCreditNotesContactCompany + - value: >- + payments,tracking_categories,applied_credit_notes,contact,company,accounting_period + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + payments,tracking_categories,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,applied_credit_notes,contact,company,employee + name: PaymentsTrackingCategoriesAppliedCreditNotesContactCompanyEmployee + - value: >- + payments,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,applied_credit_notes,contact,company,employee,payment_term + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: >- + payments,tracking_categories,applied_credit_notes,contact,company,payment_term + name: PaymentsTrackingCategoriesAppliedCreditNotesContactCompanyPaymentTerm + - value: payments,tracking_categories,applied_credit_notes,contact,employee + name: PaymentsTrackingCategoriesAppliedCreditNotesContactEmployee + - value: >- + payments,tracking_categories,applied_credit_notes,contact,employee,accounting_period + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,applied_credit_notes,contact,employee,payment_term + name: PaymentsTrackingCategoriesAppliedCreditNotesContactEmployeePaymentTerm + - value: payments,tracking_categories,applied_credit_notes,contact,payment_term + name: PaymentsTrackingCategoriesAppliedCreditNotesContactPaymentTerm + - value: payments,tracking_categories,applied_credit_notes,employee + name: PaymentsTrackingCategoriesAppliedCreditNotesEmployee + - value: >- + payments,tracking_categories,applied_credit_notes,employee,accounting_period + name: PaymentsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,applied_credit_notes,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,applied_credit_notes,employee,payment_term + name: PaymentsTrackingCategoriesAppliedCreditNotesEmployeePaymentTerm + - value: payments,tracking_categories,applied_credit_notes,payment_term + name: PaymentsTrackingCategoriesAppliedCreditNotesPaymentTerm + - value: payments,tracking_categories,applied_vendor_credits + name: PaymentsTrackingCategoriesAppliedVendorCredits + - value: payments,tracking_categories,applied_vendor_credits,accounting_period + name: PaymentsTrackingCategoriesAppliedVendorCreditsAccountingPeriod + - value: >- + payments,tracking_categories,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: payments,tracking_categories,applied_vendor_credits,company + name: PaymentsTrackingCategoriesAppliedVendorCreditsCompany + - value: >- + payments,tracking_categories,applied_vendor_credits,company,accounting_period + name: PaymentsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,tracking_categories,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: payments,tracking_categories,applied_vendor_credits,company,employee + name: PaymentsTrackingCategoriesAppliedVendorCreditsCompanyEmployee + - value: >- + payments,tracking_categories,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsTrackingCategoriesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,tracking_categories,applied_vendor_credits,company,payment_term + name: PaymentsTrackingCategoriesAppliedVendorCreditsCompanyPaymentTerm + - value: payments,tracking_categories,applied_vendor_credits,contact + name: PaymentsTrackingCategoriesAppliedVendorCreditsContact + - value: >- + payments,tracking_categories,applied_vendor_credits,contact,accounting_period + name: PaymentsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,tracking_categories,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: payments,tracking_categories,applied_vendor_credits,contact,company + name: PaymentsTrackingCategoriesAppliedVendorCreditsContactCompany + - value: >- + payments,tracking_categories,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,tracking_categories,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,applied_vendor_credits,contact,company,employee + name: PaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,tracking_categories,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyPaymentTerm + - value: payments,tracking_categories,applied_vendor_credits,contact,employee + name: PaymentsTrackingCategoriesAppliedVendorCreditsContactEmployee + - value: >- + payments,tracking_categories,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsTrackingCategoriesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,tracking_categories,applied_vendor_credits,contact,payment_term + name: PaymentsTrackingCategoriesAppliedVendorCreditsContactPaymentTerm + - value: payments,tracking_categories,applied_vendor_credits,employee + name: PaymentsTrackingCategoriesAppliedVendorCreditsEmployee + - value: >- + payments,tracking_categories,applied_vendor_credits,employee,accounting_period + name: PaymentsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,applied_vendor_credits,employee,payment_term + name: PaymentsTrackingCategoriesAppliedVendorCreditsEmployeePaymentTerm + - value: payments,tracking_categories,applied_vendor_credits,payment_term + name: PaymentsTrackingCategoriesAppliedVendorCreditsPaymentTerm + - value: payments,tracking_categories,company + name: PaymentsTrackingCategoriesCompany + - value: payments,tracking_categories,company,accounting_period + name: PaymentsTrackingCategoriesCompanyAccountingPeriod + - value: payments,tracking_categories,company,accounting_period,payment_term + name: PaymentsTrackingCategoriesCompanyAccountingPeriodPaymentTerm + - value: payments,tracking_categories,company,employee + name: PaymentsTrackingCategoriesCompanyEmployee + - value: payments,tracking_categories,company,employee,accounting_period + name: PaymentsTrackingCategoriesCompanyEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,company,employee,accounting_period,payment_term + name: PaymentsTrackingCategoriesCompanyEmployeeAccountingPeriodPaymentTerm + - value: payments,tracking_categories,company,employee,payment_term + name: PaymentsTrackingCategoriesCompanyEmployeePaymentTerm + - value: payments,tracking_categories,company,payment_term + name: PaymentsTrackingCategoriesCompanyPaymentTerm + - value: payments,tracking_categories,contact + name: PaymentsTrackingCategoriesContact + - value: payments,tracking_categories,contact,accounting_period + name: PaymentsTrackingCategoriesContactAccountingPeriod + - value: payments,tracking_categories,contact,accounting_period,payment_term + name: PaymentsTrackingCategoriesContactAccountingPeriodPaymentTerm + - value: payments,tracking_categories,contact,company + name: PaymentsTrackingCategoriesContactCompany + - value: payments,tracking_categories,contact,company,accounting_period + name: PaymentsTrackingCategoriesContactCompanyAccountingPeriod + - value: >- + payments,tracking_categories,contact,company,accounting_period,payment_term + name: PaymentsTrackingCategoriesContactCompanyAccountingPeriodPaymentTerm + - value: payments,tracking_categories,contact,company,employee + name: PaymentsTrackingCategoriesContactCompanyEmployee + - value: >- + payments,tracking_categories,contact,company,employee,accounting_period + name: PaymentsTrackingCategoriesContactCompanyEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: payments,tracking_categories,contact,company,employee,payment_term + name: PaymentsTrackingCategoriesContactCompanyEmployeePaymentTerm + - value: payments,tracking_categories,contact,company,payment_term + name: PaymentsTrackingCategoriesContactCompanyPaymentTerm + - value: payments,tracking_categories,contact,employee + name: PaymentsTrackingCategoriesContactEmployee + - value: payments,tracking_categories,contact,employee,accounting_period + name: PaymentsTrackingCategoriesContactEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,contact,employee,accounting_period,payment_term + name: PaymentsTrackingCategoriesContactEmployeeAccountingPeriodPaymentTerm + - value: payments,tracking_categories,contact,employee,payment_term + name: PaymentsTrackingCategoriesContactEmployeePaymentTerm + - value: payments,tracking_categories,contact,payment_term + name: PaymentsTrackingCategoriesContactPaymentTerm + - value: payments,tracking_categories,employee + name: PaymentsTrackingCategoriesEmployee + - value: payments,tracking_categories,employee,accounting_period + name: PaymentsTrackingCategoriesEmployeeAccountingPeriod + - value: payments,tracking_categories,employee,accounting_period,payment_term + name: PaymentsTrackingCategoriesEmployeeAccountingPeriodPaymentTerm + - value: payments,tracking_categories,employee,payment_term + name: PaymentsTrackingCategoriesEmployeePaymentTerm + - value: payments,tracking_categories,payment_term + name: PaymentsTrackingCategoriesPaymentTerm + - value: payments,tracking_categories,purchase_orders + name: PaymentsTrackingCategoriesPurchaseOrders + - value: payments,tracking_categories,purchase_orders,accounting_period + name: PaymentsTrackingCategoriesPurchaseOrdersAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,accounting_period,payment_term + name: PaymentsTrackingCategoriesPurchaseOrdersAccountingPeriodPaymentTerm + - value: payments,tracking_categories,purchase_orders,applied_credit_notes + name: PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotes + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCredits + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,company + name: PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompany + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,company,employee + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployee + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,company,employee,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeePaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,company,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,contact + name: PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContact + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompany + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployee + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,contact,employee + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployee + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeePaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,contact,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,employee + name: PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployee + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,employee,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeePaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,payment_term + name: PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesPaymentTerm + - value: payments,tracking_categories,purchase_orders,applied_vendor_credits + name: PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCredits + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,company + name: PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompany + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,company,employee + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployee + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,company,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,contact + name: PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContact + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompany + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployee + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,employee + name: PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployee + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,employee,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeePaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsPaymentTerm + - value: payments,tracking_categories,purchase_orders,company + name: PaymentsTrackingCategoriesPurchaseOrdersCompany + - value: payments,tracking_categories,purchase_orders,company,accounting_period + name: PaymentsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,company,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriodPaymentTerm + - value: payments,tracking_categories,purchase_orders,company,employee + name: PaymentsTrackingCategoriesPurchaseOrdersCompanyEmployee + - value: >- + payments,tracking_categories,purchase_orders,company,employee,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,company,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,company,employee,payment_term + name: PaymentsTrackingCategoriesPurchaseOrdersCompanyEmployeePaymentTerm + - value: payments,tracking_categories,purchase_orders,company,payment_term + name: PaymentsTrackingCategoriesPurchaseOrdersCompanyPaymentTerm + - value: payments,tracking_categories,purchase_orders,contact + name: PaymentsTrackingCategoriesPurchaseOrdersContact + - value: payments,tracking_categories,purchase_orders,contact,accounting_period + name: PaymentsTrackingCategoriesPurchaseOrdersContactAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,contact,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersContactAccountingPeriodPaymentTerm + - value: payments,tracking_categories,purchase_orders,contact,company + name: PaymentsTrackingCategoriesPurchaseOrdersContactCompany + - value: >- + payments,tracking_categories,purchase_orders,contact,company,accounting_period + name: PaymentsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,contact,company,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriodPaymentTerm + - value: payments,tracking_categories,purchase_orders,contact,company,employee + name: PaymentsTrackingCategoriesPurchaseOrdersContactCompanyEmployee + - value: >- + payments,tracking_categories,purchase_orders,contact,company,employee,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,contact,company,employee,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersContactCompanyEmployeePaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,contact,company,payment_term + name: PaymentsTrackingCategoriesPurchaseOrdersContactCompanyPaymentTerm + - value: payments,tracking_categories,purchase_orders,contact,employee + name: PaymentsTrackingCategoriesPurchaseOrdersContactEmployee + - value: >- + payments,tracking_categories,purchase_orders,contact,employee,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,contact,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,contact,employee,payment_term + name: PaymentsTrackingCategoriesPurchaseOrdersContactEmployeePaymentTerm + - value: payments,tracking_categories,purchase_orders,contact,payment_term + name: PaymentsTrackingCategoriesPurchaseOrdersContactPaymentTerm + - value: payments,tracking_categories,purchase_orders,employee + name: PaymentsTrackingCategoriesPurchaseOrdersEmployee + - value: >- + payments,tracking_categories,purchase_orders,employee,accounting_period + name: PaymentsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriodPaymentTerm + - value: payments,tracking_categories,purchase_orders,employee,payment_term + name: PaymentsTrackingCategoriesPurchaseOrdersEmployeePaymentTerm + - value: payments,tracking_categories,purchase_orders,payment_term + name: PaymentsTrackingCategoriesPurchaseOrdersPaymentTerm + - purchase_orders + - value: purchase_orders,accounting_period + name: PurchaseOrdersAccountingPeriod + - value: purchase_orders,accounting_period,payment_term + name: PurchaseOrdersAccountingPeriodPaymentTerm + - value: purchase_orders,applied_credit_notes + name: PurchaseOrdersAppliedCreditNotes + - value: purchase_orders,applied_credit_notes,accounting_period + name: PurchaseOrdersAppliedCreditNotesAccountingPeriod + - value: purchase_orders,applied_credit_notes,accounting_period,payment_term + name: PurchaseOrdersAppliedCreditNotesAccountingPeriodPaymentTerm + - value: purchase_orders,applied_credit_notes,applied_vendor_credits + name: PurchaseOrdersAppliedCreditNotesAppliedVendorCredits + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period + name: PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: purchase_orders,applied_credit_notes,applied_vendor_credits,company + name: PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee + name: PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,company,payment_term + name: PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: purchase_orders,applied_credit_notes,applied_vendor_credits,contact + name: PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company + name: PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee + name: PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: purchase_orders,applied_credit_notes,applied_vendor_credits,employee + name: PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,payment_term + name: PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: purchase_orders,applied_credit_notes,company + name: PurchaseOrdersAppliedCreditNotesCompany + - value: purchase_orders,applied_credit_notes,company,accounting_period + name: PurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod + - value: >- + purchase_orders,applied_credit_notes,company,accounting_period,payment_term + name: PurchaseOrdersAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: purchase_orders,applied_credit_notes,company,employee + name: PurchaseOrdersAppliedCreditNotesCompanyEmployee + - value: >- + purchase_orders,applied_credit_notes,company,employee,accounting_period + name: PurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + purchase_orders,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + PurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: purchase_orders,applied_credit_notes,company,employee,payment_term + name: PurchaseOrdersAppliedCreditNotesCompanyEmployeePaymentTerm + - value: purchase_orders,applied_credit_notes,company,payment_term + name: PurchaseOrdersAppliedCreditNotesCompanyPaymentTerm + - value: purchase_orders,applied_credit_notes,contact + name: PurchaseOrdersAppliedCreditNotesContact + - value: purchase_orders,applied_credit_notes,contact,accounting_period + name: PurchaseOrdersAppliedCreditNotesContactAccountingPeriod + - value: >- + purchase_orders,applied_credit_notes,contact,accounting_period,payment_term + name: PurchaseOrdersAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: purchase_orders,applied_credit_notes,contact,company + name: PurchaseOrdersAppliedCreditNotesContactCompany + - value: purchase_orders,applied_credit_notes,contact,company,accounting_period + name: PurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + purchase_orders,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + PurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: purchase_orders,applied_credit_notes,contact,company,employee + name: PurchaseOrdersAppliedCreditNotesContactCompanyEmployee + - value: >- + purchase_orders,applied_credit_notes,contact,company,employee,accounting_period + name: PurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + purchase_orders,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + PurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + purchase_orders,applied_credit_notes,contact,company,employee,payment_term + name: PurchaseOrdersAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: purchase_orders,applied_credit_notes,contact,company,payment_term + name: PurchaseOrdersAppliedCreditNotesContactCompanyPaymentTerm + - value: purchase_orders,applied_credit_notes,contact,employee + name: PurchaseOrdersAppliedCreditNotesContactEmployee + - value: >- + purchase_orders,applied_credit_notes,contact,employee,accounting_period + name: PurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + purchase_orders,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + PurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: purchase_orders,applied_credit_notes,contact,employee,payment_term + name: PurchaseOrdersAppliedCreditNotesContactEmployeePaymentTerm + - value: purchase_orders,applied_credit_notes,contact,payment_term + name: PurchaseOrdersAppliedCreditNotesContactPaymentTerm + - value: purchase_orders,applied_credit_notes,employee + name: PurchaseOrdersAppliedCreditNotesEmployee + - value: purchase_orders,applied_credit_notes,employee,accounting_period + name: PurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + purchase_orders,applied_credit_notes,employee,accounting_period,payment_term + name: PurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: purchase_orders,applied_credit_notes,employee,payment_term + name: PurchaseOrdersAppliedCreditNotesEmployeePaymentTerm + - value: purchase_orders,applied_credit_notes,payment_term + name: PurchaseOrdersAppliedCreditNotesPaymentTerm + - value: purchase_orders,applied_vendor_credits + name: PurchaseOrdersAppliedVendorCredits + - value: purchase_orders,applied_vendor_credits,accounting_period + name: PurchaseOrdersAppliedVendorCreditsAccountingPeriod + - value: purchase_orders,applied_vendor_credits,accounting_period,payment_term + name: PurchaseOrdersAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: purchase_orders,applied_vendor_credits,company + name: PurchaseOrdersAppliedVendorCreditsCompany + - value: purchase_orders,applied_vendor_credits,company,accounting_period + name: PurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + purchase_orders,applied_vendor_credits,company,accounting_period,payment_term + name: PurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: purchase_orders,applied_vendor_credits,company,employee + name: PurchaseOrdersAppliedVendorCreditsCompanyEmployee + - value: >- + purchase_orders,applied_vendor_credits,company,employee,accounting_period + name: PurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + purchase_orders,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: purchase_orders,applied_vendor_credits,company,employee,payment_term + name: PurchaseOrdersAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: purchase_orders,applied_vendor_credits,company,payment_term + name: PurchaseOrdersAppliedVendorCreditsCompanyPaymentTerm + - value: purchase_orders,applied_vendor_credits,contact + name: PurchaseOrdersAppliedVendorCreditsContact + - value: purchase_orders,applied_vendor_credits,contact,accounting_period + name: PurchaseOrdersAppliedVendorCreditsContactAccountingPeriod + - value: >- + purchase_orders,applied_vendor_credits,contact,accounting_period,payment_term + name: PurchaseOrdersAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: purchase_orders,applied_vendor_credits,contact,company + name: PurchaseOrdersAppliedVendorCreditsContactCompany + - value: >- + purchase_orders,applied_vendor_credits,contact,company,accounting_period + name: PurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + purchase_orders,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: purchase_orders,applied_vendor_credits,contact,company,employee + name: PurchaseOrdersAppliedVendorCreditsContactCompanyEmployee + - value: >- + purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + purchase_orders,applied_vendor_credits,contact,company,employee,payment_term + name: PurchaseOrdersAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: purchase_orders,applied_vendor_credits,contact,company,payment_term + name: PurchaseOrdersAppliedVendorCreditsContactCompanyPaymentTerm + - value: purchase_orders,applied_vendor_credits,contact,employee + name: PurchaseOrdersAppliedVendorCreditsContactEmployee + - value: >- + purchase_orders,applied_vendor_credits,contact,employee,accounting_period + name: PurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + purchase_orders,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: purchase_orders,applied_vendor_credits,contact,employee,payment_term + name: PurchaseOrdersAppliedVendorCreditsContactEmployeePaymentTerm + - value: purchase_orders,applied_vendor_credits,contact,payment_term + name: PurchaseOrdersAppliedVendorCreditsContactPaymentTerm + - value: purchase_orders,applied_vendor_credits,employee + name: PurchaseOrdersAppliedVendorCreditsEmployee + - value: purchase_orders,applied_vendor_credits,employee,accounting_period + name: PurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + purchase_orders,applied_vendor_credits,employee,accounting_period,payment_term + name: PurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: purchase_orders,applied_vendor_credits,employee,payment_term + name: PurchaseOrdersAppliedVendorCreditsEmployeePaymentTerm + - value: purchase_orders,applied_vendor_credits,payment_term + name: PurchaseOrdersAppliedVendorCreditsPaymentTerm + - value: purchase_orders,company + name: PurchaseOrdersCompany + - value: purchase_orders,company,accounting_period + name: PurchaseOrdersCompanyAccountingPeriod + - value: purchase_orders,company,accounting_period,payment_term + name: PurchaseOrdersCompanyAccountingPeriodPaymentTerm + - value: purchase_orders,company,employee + name: PurchaseOrdersCompanyEmployee + - value: purchase_orders,company,employee,accounting_period + name: PurchaseOrdersCompanyEmployeeAccountingPeriod + - value: purchase_orders,company,employee,accounting_period,payment_term + name: PurchaseOrdersCompanyEmployeeAccountingPeriodPaymentTerm + - value: purchase_orders,company,employee,payment_term + name: PurchaseOrdersCompanyEmployeePaymentTerm + - value: purchase_orders,company,payment_term + name: PurchaseOrdersCompanyPaymentTerm + - value: purchase_orders,contact + name: PurchaseOrdersContact + - value: purchase_orders,contact,accounting_period + name: PurchaseOrdersContactAccountingPeriod + - value: purchase_orders,contact,accounting_period,payment_term + name: PurchaseOrdersContactAccountingPeriodPaymentTerm + - value: purchase_orders,contact,company + name: PurchaseOrdersContactCompany + - value: purchase_orders,contact,company,accounting_period + name: PurchaseOrdersContactCompanyAccountingPeriod + - value: purchase_orders,contact,company,accounting_period,payment_term + name: PurchaseOrdersContactCompanyAccountingPeriodPaymentTerm + - value: purchase_orders,contact,company,employee + name: PurchaseOrdersContactCompanyEmployee + - value: purchase_orders,contact,company,employee,accounting_period + name: PurchaseOrdersContactCompanyEmployeeAccountingPeriod + - value: >- + purchase_orders,contact,company,employee,accounting_period,payment_term + name: PurchaseOrdersContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: purchase_orders,contact,company,employee,payment_term + name: PurchaseOrdersContactCompanyEmployeePaymentTerm + - value: purchase_orders,contact,company,payment_term + name: PurchaseOrdersContactCompanyPaymentTerm + - value: purchase_orders,contact,employee + name: PurchaseOrdersContactEmployee + - value: purchase_orders,contact,employee,accounting_period + name: PurchaseOrdersContactEmployeeAccountingPeriod + - value: purchase_orders,contact,employee,accounting_period,payment_term + name: PurchaseOrdersContactEmployeeAccountingPeriodPaymentTerm + - value: purchase_orders,contact,employee,payment_term + name: PurchaseOrdersContactEmployeePaymentTerm + - value: purchase_orders,contact,payment_term + name: PurchaseOrdersContactPaymentTerm + - value: purchase_orders,employee + name: PurchaseOrdersEmployee + - value: purchase_orders,employee,accounting_period + name: PurchaseOrdersEmployeeAccountingPeriod + - value: purchase_orders,employee,accounting_period,payment_term + name: PurchaseOrdersEmployeeAccountingPeriodPaymentTerm + - value: purchase_orders,employee,payment_term + name: PurchaseOrdersEmployeePaymentTerm + - value: purchase_orders,payment_term + name: PurchaseOrdersPaymentTerm + - tracking_categories + - value: tracking_categories,accounting_period + name: TrackingCategoriesAccountingPeriod + - value: tracking_categories,accounting_period,payment_term + name: TrackingCategoriesAccountingPeriodPaymentTerm + - value: tracking_categories,applied_credit_notes + name: TrackingCategoriesAppliedCreditNotes + - value: tracking_categories,applied_credit_notes,accounting_period + name: TrackingCategoriesAppliedCreditNotesAccountingPeriod + - value: >- + tracking_categories,applied_credit_notes,accounting_period,payment_term + name: TrackingCategoriesAppliedCreditNotesAccountingPeriodPaymentTerm + - value: tracking_categories,applied_credit_notes,applied_vendor_credits + name: TrackingCategoriesAppliedCreditNotesAppliedVendorCredits + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,company + name: TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee + name: >- + TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,contact + name: TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company + name: TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee + name: >- + TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,employee + name: TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,payment_term + name: TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: tracking_categories,applied_credit_notes,company + name: TrackingCategoriesAppliedCreditNotesCompany + - value: tracking_categories,applied_credit_notes,company,accounting_period + name: TrackingCategoriesAppliedCreditNotesCompanyAccountingPeriod + - value: >- + tracking_categories,applied_credit_notes,company,accounting_period,payment_term + name: TrackingCategoriesAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: tracking_categories,applied_credit_notes,company,employee + name: TrackingCategoriesAppliedCreditNotesCompanyEmployee + - value: >- + tracking_categories,applied_credit_notes,company,employee,accounting_period + name: TrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + tracking_categories,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + TrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: tracking_categories,applied_credit_notes,company,employee,payment_term + name: TrackingCategoriesAppliedCreditNotesCompanyEmployeePaymentTerm + - value: tracking_categories,applied_credit_notes,company,payment_term + name: TrackingCategoriesAppliedCreditNotesCompanyPaymentTerm + - value: tracking_categories,applied_credit_notes,contact + name: TrackingCategoriesAppliedCreditNotesContact + - value: tracking_categories,applied_credit_notes,contact,accounting_period + name: TrackingCategoriesAppliedCreditNotesContactAccountingPeriod + - value: >- + tracking_categories,applied_credit_notes,contact,accounting_period,payment_term + name: TrackingCategoriesAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: tracking_categories,applied_credit_notes,contact,company + name: TrackingCategoriesAppliedCreditNotesContactCompany + - value: >- + tracking_categories,applied_credit_notes,contact,company,accounting_period + name: TrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + tracking_categories,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + TrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: tracking_categories,applied_credit_notes,contact,company,employee + name: TrackingCategoriesAppliedCreditNotesContactCompanyEmployee + - value: >- + tracking_categories,applied_credit_notes,contact,company,employee,accounting_period + name: >- + TrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + tracking_categories,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + TrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + tracking_categories,applied_credit_notes,contact,company,employee,payment_term + name: TrackingCategoriesAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: tracking_categories,applied_credit_notes,contact,company,payment_term + name: TrackingCategoriesAppliedCreditNotesContactCompanyPaymentTerm + - value: tracking_categories,applied_credit_notes,contact,employee + name: TrackingCategoriesAppliedCreditNotesContactEmployee + - value: >- + tracking_categories,applied_credit_notes,contact,employee,accounting_period + name: TrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + tracking_categories,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + TrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: tracking_categories,applied_credit_notes,contact,employee,payment_term + name: TrackingCategoriesAppliedCreditNotesContactEmployeePaymentTerm + - value: tracking_categories,applied_credit_notes,contact,payment_term + name: TrackingCategoriesAppliedCreditNotesContactPaymentTerm + - value: tracking_categories,applied_credit_notes,employee + name: TrackingCategoriesAppliedCreditNotesEmployee + - value: tracking_categories,applied_credit_notes,employee,accounting_period + name: TrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + tracking_categories,applied_credit_notes,employee,accounting_period,payment_term + name: >- + TrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: tracking_categories,applied_credit_notes,employee,payment_term + name: TrackingCategoriesAppliedCreditNotesEmployeePaymentTerm + - value: tracking_categories,applied_credit_notes,payment_term + name: TrackingCategoriesAppliedCreditNotesPaymentTerm + - value: tracking_categories,applied_vendor_credits + name: TrackingCategoriesAppliedVendorCredits + - value: tracking_categories,applied_vendor_credits,accounting_period + name: TrackingCategoriesAppliedVendorCreditsAccountingPeriod + - value: >- + tracking_categories,applied_vendor_credits,accounting_period,payment_term + name: TrackingCategoriesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: tracking_categories,applied_vendor_credits,company + name: TrackingCategoriesAppliedVendorCreditsCompany + - value: tracking_categories,applied_vendor_credits,company,accounting_period + name: TrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + tracking_categories,applied_vendor_credits,company,accounting_period,payment_term + name: >- + TrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: tracking_categories,applied_vendor_credits,company,employee + name: TrackingCategoriesAppliedVendorCreditsCompanyEmployee + - value: >- + tracking_categories,applied_vendor_credits,company,employee,accounting_period + name: TrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + tracking_categories,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + TrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + tracking_categories,applied_vendor_credits,company,employee,payment_term + name: TrackingCategoriesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: tracking_categories,applied_vendor_credits,company,payment_term + name: TrackingCategoriesAppliedVendorCreditsCompanyPaymentTerm + - value: tracking_categories,applied_vendor_credits,contact + name: TrackingCategoriesAppliedVendorCreditsContact + - value: tracking_categories,applied_vendor_credits,contact,accounting_period + name: TrackingCategoriesAppliedVendorCreditsContactAccountingPeriod + - value: >- + tracking_categories,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + TrackingCategoriesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: tracking_categories,applied_vendor_credits,contact,company + name: TrackingCategoriesAppliedVendorCreditsContactCompany + - value: >- + tracking_categories,applied_vendor_credits,contact,company,accounting_period + name: TrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + tracking_categories,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + TrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: tracking_categories,applied_vendor_credits,contact,company,employee + name: TrackingCategoriesAppliedVendorCreditsContactCompanyEmployee + - value: >- + tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + TrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + TrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + tracking_categories,applied_vendor_credits,contact,company,employee,payment_term + name: >- + TrackingCategoriesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + tracking_categories,applied_vendor_credits,contact,company,payment_term + name: TrackingCategoriesAppliedVendorCreditsContactCompanyPaymentTerm + - value: tracking_categories,applied_vendor_credits,contact,employee + name: TrackingCategoriesAppliedVendorCreditsContactEmployee + - value: >- + tracking_categories,applied_vendor_credits,contact,employee,accounting_period + name: TrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + tracking_categories,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + TrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + tracking_categories,applied_vendor_credits,contact,employee,payment_term + name: TrackingCategoriesAppliedVendorCreditsContactEmployeePaymentTerm + - value: tracking_categories,applied_vendor_credits,contact,payment_term + name: TrackingCategoriesAppliedVendorCreditsContactPaymentTerm + - value: tracking_categories,applied_vendor_credits,employee + name: TrackingCategoriesAppliedVendorCreditsEmployee + - value: tracking_categories,applied_vendor_credits,employee,accounting_period + name: TrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + tracking_categories,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + TrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: tracking_categories,applied_vendor_credits,employee,payment_term + name: TrackingCategoriesAppliedVendorCreditsEmployeePaymentTerm + - value: tracking_categories,applied_vendor_credits,payment_term + name: TrackingCategoriesAppliedVendorCreditsPaymentTerm + - value: tracking_categories,company + name: TrackingCategoriesCompany + - value: tracking_categories,company,accounting_period + name: TrackingCategoriesCompanyAccountingPeriod + - value: tracking_categories,company,accounting_period,payment_term + name: TrackingCategoriesCompanyAccountingPeriodPaymentTerm + - value: tracking_categories,company,employee + name: TrackingCategoriesCompanyEmployee + - value: tracking_categories,company,employee,accounting_period + name: TrackingCategoriesCompanyEmployeeAccountingPeriod + - value: tracking_categories,company,employee,accounting_period,payment_term + name: TrackingCategoriesCompanyEmployeeAccountingPeriodPaymentTerm + - value: tracking_categories,company,employee,payment_term + name: TrackingCategoriesCompanyEmployeePaymentTerm + - value: tracking_categories,company,payment_term + name: TrackingCategoriesCompanyPaymentTerm + - value: tracking_categories,contact + name: TrackingCategoriesContact + - value: tracking_categories,contact,accounting_period + name: TrackingCategoriesContactAccountingPeriod + - value: tracking_categories,contact,accounting_period,payment_term + name: TrackingCategoriesContactAccountingPeriodPaymentTerm + - value: tracking_categories,contact,company + name: TrackingCategoriesContactCompany + - value: tracking_categories,contact,company,accounting_period + name: TrackingCategoriesContactCompanyAccountingPeriod + - value: tracking_categories,contact,company,accounting_period,payment_term + name: TrackingCategoriesContactCompanyAccountingPeriodPaymentTerm + - value: tracking_categories,contact,company,employee + name: TrackingCategoriesContactCompanyEmployee + - value: tracking_categories,contact,company,employee,accounting_period + name: TrackingCategoriesContactCompanyEmployeeAccountingPeriod + - value: >- + tracking_categories,contact,company,employee,accounting_period,payment_term + name: TrackingCategoriesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: tracking_categories,contact,company,employee,payment_term + name: TrackingCategoriesContactCompanyEmployeePaymentTerm + - value: tracking_categories,contact,company,payment_term + name: TrackingCategoriesContactCompanyPaymentTerm + - value: tracking_categories,contact,employee + name: TrackingCategoriesContactEmployee + - value: tracking_categories,contact,employee,accounting_period + name: TrackingCategoriesContactEmployeeAccountingPeriod + - value: tracking_categories,contact,employee,accounting_period,payment_term + name: TrackingCategoriesContactEmployeeAccountingPeriodPaymentTerm + - value: tracking_categories,contact,employee,payment_term + name: TrackingCategoriesContactEmployeePaymentTerm + - value: tracking_categories,contact,payment_term + name: TrackingCategoriesContactPaymentTerm + - value: tracking_categories,employee + name: TrackingCategoriesEmployee + - value: tracking_categories,employee,accounting_period + name: TrackingCategoriesEmployeeAccountingPeriod + - value: tracking_categories,employee,accounting_period,payment_term + name: TrackingCategoriesEmployeeAccountingPeriodPaymentTerm + - value: tracking_categories,employee,payment_term + name: TrackingCategoriesEmployeePaymentTerm + - value: tracking_categories,payment_term + name: TrackingCategoriesPaymentTerm + - value: tracking_categories,purchase_orders + name: TrackingCategoriesPurchaseOrders + - value: tracking_categories,purchase_orders,accounting_period + name: TrackingCategoriesPurchaseOrdersAccountingPeriod + - value: tracking_categories,purchase_orders,accounting_period,payment_term + name: TrackingCategoriesPurchaseOrdersAccountingPeriodPaymentTerm + - value: tracking_categories,purchase_orders,applied_credit_notes + name: TrackingCategoriesPurchaseOrdersAppliedCreditNotes + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,accounting_period + name: TrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriod + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriodPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits + name: TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCredits + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: tracking_categories,purchase_orders,applied_credit_notes,company + name: TrackingCategoriesPurchaseOrdersAppliedCreditNotesCompany + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,company,employee + name: TrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployee + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,company,employee,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeePaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,company,payment_term + name: TrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyPaymentTerm + - value: tracking_categories,purchase_orders,applied_credit_notes,contact + name: TrackingCategoriesPurchaseOrdersAppliedCreditNotesContact + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriod + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,contact,company + name: TrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompany + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployee + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,contact,company,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,contact,employee + name: TrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployee + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,contact,employee,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeePaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,contact,payment_term + name: TrackingCategoriesPurchaseOrdersAppliedCreditNotesContactPaymentTerm + - value: tracking_categories,purchase_orders,applied_credit_notes,employee + name: TrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployee + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,employee,payment_term + name: TrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeePaymentTerm + - value: tracking_categories,purchase_orders,applied_credit_notes,payment_term + name: TrackingCategoriesPurchaseOrdersAppliedCreditNotesPaymentTerm + - value: tracking_categories,purchase_orders,applied_vendor_credits + name: TrackingCategoriesPurchaseOrdersAppliedVendorCredits + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,accounting_period + name: TrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriod + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: tracking_categories,purchase_orders,applied_vendor_credits,company + name: TrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompany + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period + name: >- + TrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,company,employee + name: TrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployee + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period + name: >- + TrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,company,employee,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,company,payment_term + name: TrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyPaymentTerm + - value: tracking_categories,purchase_orders,applied_vendor_credits,contact + name: TrackingCategoriesPurchaseOrdersAppliedVendorCreditsContact + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period + name: >- + TrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,contact,company + name: TrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompany + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period + name: >- + TrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee + name: >- + TrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + TrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,contact,company,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,contact,employee + name: TrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployee + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period + name: >- + TrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,contact,payment_term + name: TrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactPaymentTerm + - value: tracking_categories,purchase_orders,applied_vendor_credits,employee + name: TrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployee + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period + name: >- + TrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,employee,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeePaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,payment_term + name: TrackingCategoriesPurchaseOrdersAppliedVendorCreditsPaymentTerm + - value: tracking_categories,purchase_orders,company + name: TrackingCategoriesPurchaseOrdersCompany + - value: tracking_categories,purchase_orders,company,accounting_period + name: TrackingCategoriesPurchaseOrdersCompanyAccountingPeriod + - value: >- + tracking_categories,purchase_orders,company,accounting_period,payment_term + name: TrackingCategoriesPurchaseOrdersCompanyAccountingPeriodPaymentTerm + - value: tracking_categories,purchase_orders,company,employee + name: TrackingCategoriesPurchaseOrdersCompanyEmployee + - value: tracking_categories,purchase_orders,company,employee,accounting_period + name: TrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriod + - value: >- + tracking_categories,purchase_orders,company,employee,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriodPaymentTerm + - value: tracking_categories,purchase_orders,company,employee,payment_term + name: TrackingCategoriesPurchaseOrdersCompanyEmployeePaymentTerm + - value: tracking_categories,purchase_orders,company,payment_term + name: TrackingCategoriesPurchaseOrdersCompanyPaymentTerm + - value: tracking_categories,purchase_orders,contact + name: TrackingCategoriesPurchaseOrdersContact + - value: tracking_categories,purchase_orders,contact,accounting_period + name: TrackingCategoriesPurchaseOrdersContactAccountingPeriod + - value: >- + tracking_categories,purchase_orders,contact,accounting_period,payment_term + name: TrackingCategoriesPurchaseOrdersContactAccountingPeriodPaymentTerm + - value: tracking_categories,purchase_orders,contact,company + name: TrackingCategoriesPurchaseOrdersContactCompany + - value: tracking_categories,purchase_orders,contact,company,accounting_period + name: TrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriod + - value: >- + tracking_categories,purchase_orders,contact,company,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriodPaymentTerm + - value: tracking_categories,purchase_orders,contact,company,employee + name: TrackingCategoriesPurchaseOrdersContactCompanyEmployee + - value: >- + tracking_categories,purchase_orders,contact,company,employee,accounting_period + name: TrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriod + - value: >- + tracking_categories,purchase_orders,contact,company,employee,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + tracking_categories,purchase_orders,contact,company,employee,payment_term + name: TrackingCategoriesPurchaseOrdersContactCompanyEmployeePaymentTerm + - value: tracking_categories,purchase_orders,contact,company,payment_term + name: TrackingCategoriesPurchaseOrdersContactCompanyPaymentTerm + - value: tracking_categories,purchase_orders,contact,employee + name: TrackingCategoriesPurchaseOrdersContactEmployee + - value: tracking_categories,purchase_orders,contact,employee,accounting_period + name: TrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriod + - value: >- + tracking_categories,purchase_orders,contact,employee,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriodPaymentTerm + - value: tracking_categories,purchase_orders,contact,employee,payment_term + name: TrackingCategoriesPurchaseOrdersContactEmployeePaymentTerm + - value: tracking_categories,purchase_orders,contact,payment_term + name: TrackingCategoriesPurchaseOrdersContactPaymentTerm + - value: tracking_categories,purchase_orders,employee + name: TrackingCategoriesPurchaseOrdersEmployee + - value: tracking_categories,purchase_orders,employee,accounting_period + name: TrackingCategoriesPurchaseOrdersEmployeeAccountingPeriod + - value: >- + tracking_categories,purchase_orders,employee,accounting_period,payment_term + name: TrackingCategoriesPurchaseOrdersEmployeeAccountingPeriodPaymentTerm + - value: tracking_categories,purchase_orders,employee,payment_term + name: TrackingCategoriesPurchaseOrdersEmployeePaymentTerm + - value: tracking_categories,purchase_orders,payment_term + name: TrackingCategoriesPurchaseOrdersPaymentTerm + source: + openapi: openapi/openapi.yml + InvoicesListRequestStatus: + enum: + - DRAFT + - OPEN + - PAID + - PARTIALLY_PAID + - SUBMITTED + - VOID + source: + openapi: openapi/openapi.yml + InvoicesListRequestType: + enum: + - ACCOUNTS_PAYABLE + - ACCOUNTS_RECEIVABLE + source: + openapi: openapi/openapi.yml + InvoicesRetrieveRequestExpand: + enum: + - accounting_period + - value: accounting_period,payment_term + name: AccountingPeriodPaymentTerm + - applied_credit_notes + - value: applied_credit_notes,accounting_period + name: AppliedCreditNotesAccountingPeriod + - value: applied_credit_notes,accounting_period,payment_term + name: AppliedCreditNotesAccountingPeriodPaymentTerm + - value: applied_credit_notes,applied_vendor_credits + name: AppliedCreditNotesAppliedVendorCredits + - value: applied_credit_notes,applied_vendor_credits,accounting_period + name: AppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: AppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: applied_credit_notes,applied_vendor_credits,company + name: AppliedCreditNotesAppliedVendorCreditsCompany + - value: applied_credit_notes,applied_vendor_credits,company,accounting_period + name: AppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + AppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: applied_credit_notes,applied_vendor_credits,company,employee + name: AppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: AppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + AppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: AppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: applied_credit_notes,applied_vendor_credits,company,payment_term + name: AppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: applied_credit_notes,applied_vendor_credits,contact + name: AppliedCreditNotesAppliedVendorCreditsContact + - value: applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: AppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + AppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: applied_credit_notes,applied_vendor_credits,contact,company + name: AppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: AppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + AppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: applied_credit_notes,applied_vendor_credits,contact,company,employee + name: AppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + AppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + AppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + AppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: AppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: applied_credit_notes,applied_vendor_credits,contact,employee + name: AppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: AppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + AppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: AppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: applied_credit_notes,applied_vendor_credits,contact,payment_term + name: AppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: applied_credit_notes,applied_vendor_credits,employee + name: AppliedCreditNotesAppliedVendorCreditsEmployee + - value: applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: AppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + AppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: applied_credit_notes,applied_vendor_credits,employee,payment_term + name: AppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: applied_credit_notes,applied_vendor_credits,payment_term + name: AppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: applied_credit_notes,company + name: AppliedCreditNotesCompany + - value: applied_credit_notes,company,accounting_period + name: AppliedCreditNotesCompanyAccountingPeriod + - value: applied_credit_notes,company,accounting_period,payment_term + name: AppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: applied_credit_notes,company,employee + name: AppliedCreditNotesCompanyEmployee + - value: applied_credit_notes,company,employee,accounting_period + name: AppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: applied_credit_notes,company,employee,accounting_period,payment_term + name: AppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: applied_credit_notes,company,employee,payment_term + name: AppliedCreditNotesCompanyEmployeePaymentTerm + - value: applied_credit_notes,company,payment_term + name: AppliedCreditNotesCompanyPaymentTerm + - value: applied_credit_notes,contact + name: AppliedCreditNotesContact + - value: applied_credit_notes,contact,accounting_period + name: AppliedCreditNotesContactAccountingPeriod + - value: applied_credit_notes,contact,accounting_period,payment_term + name: AppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: applied_credit_notes,contact,company + name: AppliedCreditNotesContactCompany + - value: applied_credit_notes,contact,company,accounting_period + name: AppliedCreditNotesContactCompanyAccountingPeriod + - value: applied_credit_notes,contact,company,accounting_period,payment_term + name: AppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: applied_credit_notes,contact,company,employee + name: AppliedCreditNotesContactCompanyEmployee + - value: applied_credit_notes,contact,company,employee,accounting_period + name: AppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: AppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: applied_credit_notes,contact,company,employee,payment_term + name: AppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: applied_credit_notes,contact,company,payment_term + name: AppliedCreditNotesContactCompanyPaymentTerm + - value: applied_credit_notes,contact,employee + name: AppliedCreditNotesContactEmployee + - value: applied_credit_notes,contact,employee,accounting_period + name: AppliedCreditNotesContactEmployeeAccountingPeriod + - value: applied_credit_notes,contact,employee,accounting_period,payment_term + name: AppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: applied_credit_notes,contact,employee,payment_term + name: AppliedCreditNotesContactEmployeePaymentTerm + - value: applied_credit_notes,contact,payment_term + name: AppliedCreditNotesContactPaymentTerm + - value: applied_credit_notes,employee + name: AppliedCreditNotesEmployee + - value: applied_credit_notes,employee,accounting_period + name: AppliedCreditNotesEmployeeAccountingPeriod + - value: applied_credit_notes,employee,accounting_period,payment_term + name: AppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: applied_credit_notes,employee,payment_term + name: AppliedCreditNotesEmployeePaymentTerm + - value: applied_credit_notes,payment_term + name: AppliedCreditNotesPaymentTerm + - applied_payments + - value: applied_payments,accounting_period + name: AppliedPaymentsAccountingPeriod + - value: applied_payments,accounting_period,payment_term + name: AppliedPaymentsAccountingPeriodPaymentTerm + - value: applied_payments,applied_credit_notes + name: AppliedPaymentsAppliedCreditNotes + - value: applied_payments,applied_credit_notes,accounting_period + name: AppliedPaymentsAppliedCreditNotesAccountingPeriod + - value: applied_payments,applied_credit_notes,accounting_period,payment_term + name: AppliedPaymentsAppliedCreditNotesAccountingPeriodPaymentTerm + - value: applied_payments,applied_credit_notes,applied_vendor_credits + name: AppliedPaymentsAppliedCreditNotesAppliedVendorCredits + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,accounting_period + name: AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: applied_payments,applied_credit_notes,applied_vendor_credits,company + name: AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,company,employee + name: AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: applied_payments,applied_credit_notes,applied_vendor_credits,contact + name: AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,contact,company + name: AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,contact,employee + name: AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: applied_payments,applied_credit_notes,applied_vendor_credits,employee + name: AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + applied_payments,applied_credit_notes,applied_vendor_credits,payment_term + name: AppliedPaymentsAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: applied_payments,applied_credit_notes,company + name: AppliedPaymentsAppliedCreditNotesCompany + - value: applied_payments,applied_credit_notes,company,accounting_period + name: AppliedPaymentsAppliedCreditNotesCompanyAccountingPeriod + - value: >- + applied_payments,applied_credit_notes,company,accounting_period,payment_term + name: AppliedPaymentsAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: applied_payments,applied_credit_notes,company,employee + name: AppliedPaymentsAppliedCreditNotesCompanyEmployee + - value: >- + applied_payments,applied_credit_notes,company,employee,accounting_period + name: AppliedPaymentsAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: applied_payments,applied_credit_notes,company,employee,payment_term + name: AppliedPaymentsAppliedCreditNotesCompanyEmployeePaymentTerm + - value: applied_payments,applied_credit_notes,company,payment_term + name: AppliedPaymentsAppliedCreditNotesCompanyPaymentTerm + - value: applied_payments,applied_credit_notes,contact + name: AppliedPaymentsAppliedCreditNotesContact + - value: applied_payments,applied_credit_notes,contact,accounting_period + name: AppliedPaymentsAppliedCreditNotesContactAccountingPeriod + - value: >- + applied_payments,applied_credit_notes,contact,accounting_period,payment_term + name: AppliedPaymentsAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: applied_payments,applied_credit_notes,contact,company + name: AppliedPaymentsAppliedCreditNotesContactCompany + - value: >- + applied_payments,applied_credit_notes,contact,company,accounting_period + name: AppliedPaymentsAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + applied_payments,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: applied_payments,applied_credit_notes,contact,company,employee + name: AppliedPaymentsAppliedCreditNotesContactCompanyEmployee + - value: >- + applied_payments,applied_credit_notes,contact,company,employee,accounting_period + name: >- + AppliedPaymentsAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,applied_credit_notes,contact,company,employee,payment_term + name: AppliedPaymentsAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: applied_payments,applied_credit_notes,contact,company,payment_term + name: AppliedPaymentsAppliedCreditNotesContactCompanyPaymentTerm + - value: applied_payments,applied_credit_notes,contact,employee + name: AppliedPaymentsAppliedCreditNotesContactEmployee + - value: >- + applied_payments,applied_credit_notes,contact,employee,accounting_period + name: AppliedPaymentsAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + applied_payments,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: applied_payments,applied_credit_notes,contact,employee,payment_term + name: AppliedPaymentsAppliedCreditNotesContactEmployeePaymentTerm + - value: applied_payments,applied_credit_notes,contact,payment_term + name: AppliedPaymentsAppliedCreditNotesContactPaymentTerm + - value: applied_payments,applied_credit_notes,employee + name: AppliedPaymentsAppliedCreditNotesEmployee + - value: applied_payments,applied_credit_notes,employee,accounting_period + name: AppliedPaymentsAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + applied_payments,applied_credit_notes,employee,accounting_period,payment_term + name: AppliedPaymentsAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: applied_payments,applied_credit_notes,employee,payment_term + name: AppliedPaymentsAppliedCreditNotesEmployeePaymentTerm + - value: applied_payments,applied_credit_notes,payment_term + name: AppliedPaymentsAppliedCreditNotesPaymentTerm + - value: applied_payments,applied_vendor_credits + name: AppliedPaymentsAppliedVendorCredits + - value: applied_payments,applied_vendor_credits,accounting_period + name: AppliedPaymentsAppliedVendorCreditsAccountingPeriod + - value: applied_payments,applied_vendor_credits,accounting_period,payment_term + name: AppliedPaymentsAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: applied_payments,applied_vendor_credits,company + name: AppliedPaymentsAppliedVendorCreditsCompany + - value: applied_payments,applied_vendor_credits,company,accounting_period + name: AppliedPaymentsAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + applied_payments,applied_vendor_credits,company,accounting_period,payment_term + name: AppliedPaymentsAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: applied_payments,applied_vendor_credits,company,employee + name: AppliedPaymentsAppliedVendorCreditsCompanyEmployee + - value: >- + applied_payments,applied_vendor_credits,company,employee,accounting_period + name: AppliedPaymentsAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: applied_payments,applied_vendor_credits,company,employee,payment_term + name: AppliedPaymentsAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: applied_payments,applied_vendor_credits,company,payment_term + name: AppliedPaymentsAppliedVendorCreditsCompanyPaymentTerm + - value: applied_payments,applied_vendor_credits,contact + name: AppliedPaymentsAppliedVendorCreditsContact + - value: applied_payments,applied_vendor_credits,contact,accounting_period + name: AppliedPaymentsAppliedVendorCreditsContactAccountingPeriod + - value: >- + applied_payments,applied_vendor_credits,contact,accounting_period,payment_term + name: AppliedPaymentsAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: applied_payments,applied_vendor_credits,contact,company + name: AppliedPaymentsAppliedVendorCreditsContactCompany + - value: >- + applied_payments,applied_vendor_credits,contact,company,accounting_period + name: AppliedPaymentsAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + applied_payments,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: applied_payments,applied_vendor_credits,contact,company,employee + name: AppliedPaymentsAppliedVendorCreditsContactCompanyEmployee + - value: >- + applied_payments,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + AppliedPaymentsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,applied_vendor_credits,contact,company,employee,payment_term + name: AppliedPaymentsAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: applied_payments,applied_vendor_credits,contact,company,payment_term + name: AppliedPaymentsAppliedVendorCreditsContactCompanyPaymentTerm + - value: applied_payments,applied_vendor_credits,contact,employee + name: AppliedPaymentsAppliedVendorCreditsContactEmployee + - value: >- + applied_payments,applied_vendor_credits,contact,employee,accounting_period + name: AppliedPaymentsAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + applied_payments,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: applied_payments,applied_vendor_credits,contact,employee,payment_term + name: AppliedPaymentsAppliedVendorCreditsContactEmployeePaymentTerm + - value: applied_payments,applied_vendor_credits,contact,payment_term + name: AppliedPaymentsAppliedVendorCreditsContactPaymentTerm + - value: applied_payments,applied_vendor_credits,employee + name: AppliedPaymentsAppliedVendorCreditsEmployee + - value: applied_payments,applied_vendor_credits,employee,accounting_period + name: AppliedPaymentsAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + applied_payments,applied_vendor_credits,employee,accounting_period,payment_term + name: AppliedPaymentsAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: applied_payments,applied_vendor_credits,employee,payment_term + name: AppliedPaymentsAppliedVendorCreditsEmployeePaymentTerm + - value: applied_payments,applied_vendor_credits,payment_term + name: AppliedPaymentsAppliedVendorCreditsPaymentTerm + - value: applied_payments,company + name: AppliedPaymentsCompany + - value: applied_payments,company,accounting_period + name: AppliedPaymentsCompanyAccountingPeriod + - value: applied_payments,company,accounting_period,payment_term + name: AppliedPaymentsCompanyAccountingPeriodPaymentTerm + - value: applied_payments,company,employee + name: AppliedPaymentsCompanyEmployee + - value: applied_payments,company,employee,accounting_period + name: AppliedPaymentsCompanyEmployeeAccountingPeriod + - value: applied_payments,company,employee,accounting_period,payment_term + name: AppliedPaymentsCompanyEmployeeAccountingPeriodPaymentTerm + - value: applied_payments,company,employee,payment_term + name: AppliedPaymentsCompanyEmployeePaymentTerm + - value: applied_payments,company,payment_term + name: AppliedPaymentsCompanyPaymentTerm + - value: applied_payments,contact + name: AppliedPaymentsContact + - value: applied_payments,contact,accounting_period + name: AppliedPaymentsContactAccountingPeriod + - value: applied_payments,contact,accounting_period,payment_term + name: AppliedPaymentsContactAccountingPeriodPaymentTerm + - value: applied_payments,contact,company + name: AppliedPaymentsContactCompany + - value: applied_payments,contact,company,accounting_period + name: AppliedPaymentsContactCompanyAccountingPeriod + - value: applied_payments,contact,company,accounting_period,payment_term + name: AppliedPaymentsContactCompanyAccountingPeriodPaymentTerm + - value: applied_payments,contact,company,employee + name: AppliedPaymentsContactCompanyEmployee + - value: applied_payments,contact,company,employee,accounting_period + name: AppliedPaymentsContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,contact,company,employee,accounting_period,payment_term + name: AppliedPaymentsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: applied_payments,contact,company,employee,payment_term + name: AppliedPaymentsContactCompanyEmployeePaymentTerm + - value: applied_payments,contact,company,payment_term + name: AppliedPaymentsContactCompanyPaymentTerm + - value: applied_payments,contact,employee + name: AppliedPaymentsContactEmployee + - value: applied_payments,contact,employee,accounting_period + name: AppliedPaymentsContactEmployeeAccountingPeriod + - value: applied_payments,contact,employee,accounting_period,payment_term + name: AppliedPaymentsContactEmployeeAccountingPeriodPaymentTerm + - value: applied_payments,contact,employee,payment_term + name: AppliedPaymentsContactEmployeePaymentTerm + - value: applied_payments,contact,payment_term + name: AppliedPaymentsContactPaymentTerm + - value: applied_payments,employee + name: AppliedPaymentsEmployee + - value: applied_payments,employee,accounting_period + name: AppliedPaymentsEmployeeAccountingPeriod + - value: applied_payments,employee,accounting_period,payment_term + name: AppliedPaymentsEmployeeAccountingPeriodPaymentTerm + - value: applied_payments,employee,payment_term + name: AppliedPaymentsEmployeePaymentTerm + - value: applied_payments,line_items + name: AppliedPaymentsLineItems + - value: applied_payments,line_items,accounting_period + name: AppliedPaymentsLineItemsAccountingPeriod + - value: applied_payments,line_items,accounting_period,payment_term + name: AppliedPaymentsLineItemsAccountingPeriodPaymentTerm + - value: applied_payments,line_items,applied_credit_notes + name: AppliedPaymentsLineItemsAppliedCreditNotes + - value: applied_payments,line_items,applied_credit_notes,accounting_period + name: AppliedPaymentsLineItemsAppliedCreditNotesAccountingPeriod + - value: >- + applied_payments,line_items,applied_credit_notes,accounting_period,payment_term + name: AppliedPaymentsLineItemsAppliedCreditNotesAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits + name: AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCredits + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company + name: AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company,employee + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact + name: AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,employee + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,employee + name: AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + applied_payments,line_items,applied_credit_notes,applied_vendor_credits,payment_term + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: applied_payments,line_items,applied_credit_notes,company + name: AppliedPaymentsLineItemsAppliedCreditNotesCompany + - value: >- + applied_payments,line_items,applied_credit_notes,company,accounting_period + name: AppliedPaymentsLineItemsAppliedCreditNotesCompanyAccountingPeriod + - value: >- + applied_payments,line_items,applied_credit_notes,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: applied_payments,line_items,applied_credit_notes,company,employee + name: AppliedPaymentsLineItemsAppliedCreditNotesCompanyEmployee + - value: >- + applied_payments,line_items,applied_credit_notes,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,applied_credit_notes,company,employee,payment_term + name: AppliedPaymentsLineItemsAppliedCreditNotesCompanyEmployeePaymentTerm + - value: applied_payments,line_items,applied_credit_notes,company,payment_term + name: AppliedPaymentsLineItemsAppliedCreditNotesCompanyPaymentTerm + - value: applied_payments,line_items,applied_credit_notes,contact + name: AppliedPaymentsLineItemsAppliedCreditNotesContact + - value: >- + applied_payments,line_items,applied_credit_notes,contact,accounting_period + name: AppliedPaymentsLineItemsAppliedCreditNotesContactAccountingPeriod + - value: >- + applied_payments,line_items,applied_credit_notes,contact,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: applied_payments,line_items,applied_credit_notes,contact,company + name: AppliedPaymentsLineItemsAppliedCreditNotesContactCompany + - value: >- + applied_payments,line_items,applied_credit_notes,contact,company,accounting_period + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + applied_payments,line_items,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,applied_credit_notes,contact,company,employee + name: AppliedPaymentsLineItemsAppliedCreditNotesContactCompanyEmployee + - value: >- + applied_payments,line_items,applied_credit_notes,contact,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,applied_credit_notes,contact,company,employee,payment_term + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,applied_credit_notes,contact,company,payment_term + name: AppliedPaymentsLineItemsAppliedCreditNotesContactCompanyPaymentTerm + - value: applied_payments,line_items,applied_credit_notes,contact,employee + name: AppliedPaymentsLineItemsAppliedCreditNotesContactEmployee + - value: >- + applied_payments,line_items,applied_credit_notes,contact,employee,accounting_period + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,applied_credit_notes,contact,employee,payment_term + name: AppliedPaymentsLineItemsAppliedCreditNotesContactEmployeePaymentTerm + - value: applied_payments,line_items,applied_credit_notes,contact,payment_term + name: AppliedPaymentsLineItemsAppliedCreditNotesContactPaymentTerm + - value: applied_payments,line_items,applied_credit_notes,employee + name: AppliedPaymentsLineItemsAppliedCreditNotesEmployee + - value: >- + applied_payments,line_items,applied_credit_notes,employee,accounting_period + name: AppliedPaymentsLineItemsAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,applied_credit_notes,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: applied_payments,line_items,applied_credit_notes,employee,payment_term + name: AppliedPaymentsLineItemsAppliedCreditNotesEmployeePaymentTerm + - value: applied_payments,line_items,applied_credit_notes,payment_term + name: AppliedPaymentsLineItemsAppliedCreditNotesPaymentTerm + - value: applied_payments,line_items,applied_vendor_credits + name: AppliedPaymentsLineItemsAppliedVendorCredits + - value: applied_payments,line_items,applied_vendor_credits,accounting_period + name: AppliedPaymentsLineItemsAppliedVendorCreditsAccountingPeriod + - value: >- + applied_payments,line_items,applied_vendor_credits,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: applied_payments,line_items,applied_vendor_credits,company + name: AppliedPaymentsLineItemsAppliedVendorCreditsCompany + - value: >- + applied_payments,line_items,applied_vendor_credits,company,accounting_period + name: AppliedPaymentsLineItemsAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + applied_payments,line_items,applied_vendor_credits,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: applied_payments,line_items,applied_vendor_credits,company,employee + name: AppliedPaymentsLineItemsAppliedVendorCreditsCompanyEmployee + - value: >- + applied_payments,line_items,applied_vendor_credits,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,applied_vendor_credits,company,employee,payment_term + name: AppliedPaymentsLineItemsAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,applied_vendor_credits,company,payment_term + name: AppliedPaymentsLineItemsAppliedVendorCreditsCompanyPaymentTerm + - value: applied_payments,line_items,applied_vendor_credits,contact + name: AppliedPaymentsLineItemsAppliedVendorCreditsContact + - value: >- + applied_payments,line_items,applied_vendor_credits,contact,accounting_period + name: AppliedPaymentsLineItemsAppliedVendorCreditsContactAccountingPeriod + - value: >- + applied_payments,line_items,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: applied_payments,line_items,applied_vendor_credits,contact,company + name: AppliedPaymentsLineItemsAppliedVendorCreditsContactCompany + - value: >- + applied_payments,line_items,applied_vendor_credits,contact,company,accounting_period + name: >- + AppliedPaymentsLineItemsAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + applied_payments,line_items,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,applied_vendor_credits,contact,company,employee + name: AppliedPaymentsLineItemsAppliedVendorCreditsContactCompanyEmployee + - value: >- + applied_payments,line_items,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,applied_vendor_credits,contact,company,employee,payment_term + name: >- + AppliedPaymentsLineItemsAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,applied_vendor_credits,contact,company,payment_term + name: AppliedPaymentsLineItemsAppliedVendorCreditsContactCompanyPaymentTerm + - value: applied_payments,line_items,applied_vendor_credits,contact,employee + name: AppliedPaymentsLineItemsAppliedVendorCreditsContactEmployee + - value: >- + applied_payments,line_items,applied_vendor_credits,contact,employee,accounting_period + name: >- + AppliedPaymentsLineItemsAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,applied_vendor_credits,contact,employee,payment_term + name: AppliedPaymentsLineItemsAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + applied_payments,line_items,applied_vendor_credits,contact,payment_term + name: AppliedPaymentsLineItemsAppliedVendorCreditsContactPaymentTerm + - value: applied_payments,line_items,applied_vendor_credits,employee + name: AppliedPaymentsLineItemsAppliedVendorCreditsEmployee + - value: >- + applied_payments,line_items,applied_vendor_credits,employee,accounting_period + name: AppliedPaymentsLineItemsAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,applied_vendor_credits,employee,payment_term + name: AppliedPaymentsLineItemsAppliedVendorCreditsEmployeePaymentTerm + - value: applied_payments,line_items,applied_vendor_credits,payment_term + name: AppliedPaymentsLineItemsAppliedVendorCreditsPaymentTerm + - value: applied_payments,line_items,company + name: AppliedPaymentsLineItemsCompany + - value: applied_payments,line_items,company,accounting_period + name: AppliedPaymentsLineItemsCompanyAccountingPeriod + - value: applied_payments,line_items,company,accounting_period,payment_term + name: AppliedPaymentsLineItemsCompanyAccountingPeriodPaymentTerm + - value: applied_payments,line_items,company,employee + name: AppliedPaymentsLineItemsCompanyEmployee + - value: applied_payments,line_items,company,employee,accounting_period + name: AppliedPaymentsLineItemsCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,company,employee,accounting_period,payment_term + name: AppliedPaymentsLineItemsCompanyEmployeeAccountingPeriodPaymentTerm + - value: applied_payments,line_items,company,employee,payment_term + name: AppliedPaymentsLineItemsCompanyEmployeePaymentTerm + - value: applied_payments,line_items,company,payment_term + name: AppliedPaymentsLineItemsCompanyPaymentTerm + - value: applied_payments,line_items,contact + name: AppliedPaymentsLineItemsContact + - value: applied_payments,line_items,contact,accounting_period + name: AppliedPaymentsLineItemsContactAccountingPeriod + - value: applied_payments,line_items,contact,accounting_period,payment_term + name: AppliedPaymentsLineItemsContactAccountingPeriodPaymentTerm + - value: applied_payments,line_items,contact,company + name: AppliedPaymentsLineItemsContactCompany + - value: applied_payments,line_items,contact,company,accounting_period + name: AppliedPaymentsLineItemsContactCompanyAccountingPeriod + - value: >- + applied_payments,line_items,contact,company,accounting_period,payment_term + name: AppliedPaymentsLineItemsContactCompanyAccountingPeriodPaymentTerm + - value: applied_payments,line_items,contact,company,employee + name: AppliedPaymentsLineItemsContactCompanyEmployee + - value: applied_payments,line_items,contact,company,employee,accounting_period + name: AppliedPaymentsLineItemsContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: applied_payments,line_items,contact,company,employee,payment_term + name: AppliedPaymentsLineItemsContactCompanyEmployeePaymentTerm + - value: applied_payments,line_items,contact,company,payment_term + name: AppliedPaymentsLineItemsContactCompanyPaymentTerm + - value: applied_payments,line_items,contact,employee + name: AppliedPaymentsLineItemsContactEmployee + - value: applied_payments,line_items,contact,employee,accounting_period + name: AppliedPaymentsLineItemsContactEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,contact,employee,accounting_period,payment_term + name: AppliedPaymentsLineItemsContactEmployeeAccountingPeriodPaymentTerm + - value: applied_payments,line_items,contact,employee,payment_term + name: AppliedPaymentsLineItemsContactEmployeePaymentTerm + - value: applied_payments,line_items,contact,payment_term + name: AppliedPaymentsLineItemsContactPaymentTerm + - value: applied_payments,line_items,employee + name: AppliedPaymentsLineItemsEmployee + - value: applied_payments,line_items,employee,accounting_period + name: AppliedPaymentsLineItemsEmployeeAccountingPeriod + - value: applied_payments,line_items,employee,accounting_period,payment_term + name: AppliedPaymentsLineItemsEmployeeAccountingPeriodPaymentTerm + - value: applied_payments,line_items,employee,payment_term + name: AppliedPaymentsLineItemsEmployeePaymentTerm + - value: applied_payments,line_items,payment_term + name: AppliedPaymentsLineItemsPaymentTerm + - value: applied_payments,line_items,purchase_orders + name: AppliedPaymentsLineItemsPurchaseOrders + - value: applied_payments,line_items,purchase_orders,accounting_period + name: AppliedPaymentsLineItemsPurchaseOrdersAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,accounting_period,payment_term + name: AppliedPaymentsLineItemsPurchaseOrdersAccountingPeriodPaymentTerm + - value: applied_payments,line_items,purchase_orders,applied_credit_notes + name: AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotes + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,accounting_period + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCredits + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,company + name: AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompany + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,company,accounting_period + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,company,employee + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployee + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,company,employee,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,company,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,contact + name: AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContact + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,contact,accounting_period + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,contact,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company + name: AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompany + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company,accounting_period + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company,employee + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployee + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company,employee,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,contact,employee + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactEmployee + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,contact,employee,accounting_period + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,contact,employee,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactEmployeePaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,contact,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,employee + name: AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesEmployee + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,employee,accounting_period + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,employee,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesEmployeePaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_credit_notes,payment_term + name: AppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesPaymentTerm + - value: applied_payments,line_items,purchase_orders,applied_vendor_credits + name: AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCredits + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,accounting_period + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,company + name: AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompany + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,company,accounting_period + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,company,employee + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployee + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,company,employee,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,company,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,contact + name: AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContact + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,accounting_period + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompany + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company,accounting_period + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company,employee + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company,employee,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,employee + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployee + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,employee,accounting_period + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,employee,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,employee + name: AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsEmployee + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,employee,accounting_period + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,employee,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsEmployeePaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,applied_vendor_credits,payment_term + name: AppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsPaymentTerm + - value: applied_payments,line_items,purchase_orders,company + name: AppliedPaymentsLineItemsPurchaseOrdersCompany + - value: applied_payments,line_items,purchase_orders,company,accounting_period + name: AppliedPaymentsLineItemsPurchaseOrdersCompanyAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersCompanyAccountingPeriodPaymentTerm + - value: applied_payments,line_items,purchase_orders,company,employee + name: AppliedPaymentsLineItemsPurchaseOrdersCompanyEmployee + - value: >- + applied_payments,line_items,purchase_orders,company,employee,accounting_period + name: AppliedPaymentsLineItemsPurchaseOrdersCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,company,employee,payment_term + name: AppliedPaymentsLineItemsPurchaseOrdersCompanyEmployeePaymentTerm + - value: applied_payments,line_items,purchase_orders,company,payment_term + name: AppliedPaymentsLineItemsPurchaseOrdersCompanyPaymentTerm + - value: applied_payments,line_items,purchase_orders,contact + name: AppliedPaymentsLineItemsPurchaseOrdersContact + - value: applied_payments,line_items,purchase_orders,contact,accounting_period + name: AppliedPaymentsLineItemsPurchaseOrdersContactAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,contact,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersContactAccountingPeriodPaymentTerm + - value: applied_payments,line_items,purchase_orders,contact,company + name: AppliedPaymentsLineItemsPurchaseOrdersContactCompany + - value: >- + applied_payments,line_items,purchase_orders,contact,company,accounting_period + name: AppliedPaymentsLineItemsPurchaseOrdersContactCompanyAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersContactCompanyAccountingPeriodPaymentTerm + - value: applied_payments,line_items,purchase_orders,contact,company,employee + name: AppliedPaymentsLineItemsPurchaseOrdersContactCompanyEmployee + - value: >- + applied_payments,line_items,purchase_orders,contact,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsPurchaseOrdersContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,contact,company,employee,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersContactCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,contact,company,payment_term + name: AppliedPaymentsLineItemsPurchaseOrdersContactCompanyPaymentTerm + - value: applied_payments,line_items,purchase_orders,contact,employee + name: AppliedPaymentsLineItemsPurchaseOrdersContactEmployee + - value: >- + applied_payments,line_items,purchase_orders,contact,employee,accounting_period + name: AppliedPaymentsLineItemsPurchaseOrdersContactEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,purchase_orders,contact,employee,payment_term + name: AppliedPaymentsLineItemsPurchaseOrdersContactEmployeePaymentTerm + - value: applied_payments,line_items,purchase_orders,contact,payment_term + name: AppliedPaymentsLineItemsPurchaseOrdersContactPaymentTerm + - value: applied_payments,line_items,purchase_orders,employee + name: AppliedPaymentsLineItemsPurchaseOrdersEmployee + - value: applied_payments,line_items,purchase_orders,employee,accounting_period + name: AppliedPaymentsLineItemsPurchaseOrdersEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,purchase_orders,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsPurchaseOrdersEmployeeAccountingPeriodPaymentTerm + - value: applied_payments,line_items,purchase_orders,employee,payment_term + name: AppliedPaymentsLineItemsPurchaseOrdersEmployeePaymentTerm + - value: applied_payments,line_items,purchase_orders,payment_term + name: AppliedPaymentsLineItemsPurchaseOrdersPaymentTerm + - value: applied_payments,line_items,tracking_categories + name: AppliedPaymentsLineItemsTrackingCategories + - value: applied_payments,line_items,tracking_categories,accounting_period + name: AppliedPaymentsLineItemsTrackingCategoriesAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,accounting_period,payment_term + name: AppliedPaymentsLineItemsTrackingCategoriesAccountingPeriodPaymentTerm + - value: applied_payments,line_items,tracking_categories,applied_credit_notes + name: AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotes + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCredits + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,company + name: AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompany + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,company,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,company,employee + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployee + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,company,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,company,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,contact + name: AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContact + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,contact,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,contact,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompany + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company,employee + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployee + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,contact,employee + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactEmployee + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,contact,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,contact,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,contact,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,employee + name: AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesEmployee + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_credit_notes,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesPaymentTerm + - value: applied_payments,line_items,tracking_categories,applied_vendor_credits + name: AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCredits + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,company + name: AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompany + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,company,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,company,employee + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployee + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,company,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,company,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,contact + name: AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContact + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompany + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company,employee + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployee + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,employee + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployee + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,employee + name: AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsEmployee + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,applied_vendor_credits,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsPaymentTerm + - value: applied_payments,line_items,tracking_categories,company + name: AppliedPaymentsLineItemsTrackingCategoriesCompany + - value: >- + applied_payments,line_items,tracking_categories,company,accounting_period + name: AppliedPaymentsLineItemsTrackingCategoriesCompanyAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesCompanyAccountingPeriodPaymentTerm + - value: applied_payments,line_items,tracking_categories,company,employee + name: AppliedPaymentsLineItemsTrackingCategoriesCompanyEmployee + - value: >- + applied_payments,line_items,tracking_categories,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,company,employee,payment_term + name: AppliedPaymentsLineItemsTrackingCategoriesCompanyEmployeePaymentTerm + - value: applied_payments,line_items,tracking_categories,company,payment_term + name: AppliedPaymentsLineItemsTrackingCategoriesCompanyPaymentTerm + - value: applied_payments,line_items,tracking_categories,contact + name: AppliedPaymentsLineItemsTrackingCategoriesContact + - value: >- + applied_payments,line_items,tracking_categories,contact,accounting_period + name: AppliedPaymentsLineItemsTrackingCategoriesContactAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,contact,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesContactAccountingPeriodPaymentTerm + - value: applied_payments,line_items,tracking_categories,contact,company + name: AppliedPaymentsLineItemsTrackingCategoriesContactCompany + - value: >- + applied_payments,line_items,tracking_categories,contact,company,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesContactCompanyAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesContactCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,contact,company,employee + name: AppliedPaymentsLineItemsTrackingCategoriesContactCompanyEmployee + - value: >- + applied_payments,line_items,tracking_categories,contact,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,contact,company,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesContactCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,contact,company,payment_term + name: AppliedPaymentsLineItemsTrackingCategoriesContactCompanyPaymentTerm + - value: applied_payments,line_items,tracking_categories,contact,employee + name: AppliedPaymentsLineItemsTrackingCategoriesContactEmployee + - value: >- + applied_payments,line_items,tracking_categories,contact,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesContactEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,contact,employee,payment_term + name: AppliedPaymentsLineItemsTrackingCategoriesContactEmployeePaymentTerm + - value: applied_payments,line_items,tracking_categories,contact,payment_term + name: AppliedPaymentsLineItemsTrackingCategoriesContactPaymentTerm + - value: applied_payments,line_items,tracking_categories,employee + name: AppliedPaymentsLineItemsTrackingCategoriesEmployee + - value: >- + applied_payments,line_items,tracking_categories,employee,accounting_period + name: AppliedPaymentsLineItemsTrackingCategoriesEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesEmployeeAccountingPeriodPaymentTerm + - value: applied_payments,line_items,tracking_categories,employee,payment_term + name: AppliedPaymentsLineItemsTrackingCategoriesEmployeePaymentTerm + - value: applied_payments,line_items,tracking_categories,payment_term + name: AppliedPaymentsLineItemsTrackingCategoriesPaymentTerm + - value: applied_payments,line_items,tracking_categories,purchase_orders + name: AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrders + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotes + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCredits + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompany + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployee + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContact + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompany + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployee + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployee + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,employee + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployee + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCredits + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompany + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployee + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContact + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompany + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployee + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployee + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,company + name: AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompany + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,company,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,company,employee + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployee + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,company,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,company,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,contact + name: AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContact + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,contact,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,contact,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,contact,company + name: AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompany + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,contact,company,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,contact,company,employee + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployee + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,contact,company,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,contact,company,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,contact,company,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,contact,employee + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactEmployee + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,contact,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,contact,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,contact,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,employee + name: AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersEmployee + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,employee,accounting_period + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriod + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,employee,accounting_period,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,employee,payment_term + name: >- + AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersEmployeePaymentTerm + - value: >- + applied_payments,line_items,tracking_categories,purchase_orders,payment_term + name: AppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersPaymentTerm + - value: applied_payments,payment_term + name: AppliedPaymentsPaymentTerm + - value: applied_payments,purchase_orders + name: AppliedPaymentsPurchaseOrders + - value: applied_payments,purchase_orders,accounting_period + name: AppliedPaymentsPurchaseOrdersAccountingPeriod + - value: applied_payments,purchase_orders,accounting_period,payment_term + name: AppliedPaymentsPurchaseOrdersAccountingPeriodPaymentTerm + - value: applied_payments,purchase_orders,applied_credit_notes + name: AppliedPaymentsPurchaseOrdersAppliedCreditNotes + - value: >- + applied_payments,purchase_orders,applied_credit_notes,accounting_period + name: AppliedPaymentsPurchaseOrdersAppliedCreditNotesAccountingPeriod + - value: >- + applied_payments,purchase_orders,applied_credit_notes,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAccountingPeriodPaymentTerm + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits + name: AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCredits + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,employee + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: applied_payments,purchase_orders,applied_credit_notes,company + name: AppliedPaymentsPurchaseOrdersAppliedCreditNotesCompany + - value: >- + applied_payments,purchase_orders,applied_credit_notes,company,accounting_period + name: AppliedPaymentsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod + - value: >- + applied_payments,purchase_orders,applied_credit_notes,company,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: applied_payments,purchase_orders,applied_credit_notes,company,employee + name: AppliedPaymentsPurchaseOrdersAppliedCreditNotesCompanyEmployee + - value: >- + applied_payments,purchase_orders,applied_credit_notes,company,employee,accounting_period + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,purchase_orders,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,purchase_orders,applied_credit_notes,company,employee,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesCompanyEmployeePaymentTerm + - value: >- + applied_payments,purchase_orders,applied_credit_notes,company,payment_term + name: AppliedPaymentsPurchaseOrdersAppliedCreditNotesCompanyPaymentTerm + - value: applied_payments,purchase_orders,applied_credit_notes,contact + name: AppliedPaymentsPurchaseOrdersAppliedCreditNotesContact + - value: >- + applied_payments,purchase_orders,applied_credit_notes,contact,accounting_period + name: AppliedPaymentsPurchaseOrdersAppliedCreditNotesContactAccountingPeriod + - value: >- + applied_payments,purchase_orders,applied_credit_notes,contact,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: applied_payments,purchase_orders,applied_credit_notes,contact,company + name: AppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompany + - value: >- + applied_payments,purchase_orders,applied_credit_notes,contact,company,accounting_period + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + applied_payments,purchase_orders,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,purchase_orders,applied_credit_notes,contact,company,employee + name: AppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyEmployee + - value: >- + applied_payments,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,purchase_orders,applied_credit_notes,contact,company,employee,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: >- + applied_payments,purchase_orders,applied_credit_notes,contact,company,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyPaymentTerm + - value: applied_payments,purchase_orders,applied_credit_notes,contact,employee + name: AppliedPaymentsPurchaseOrdersAppliedCreditNotesContactEmployee + - value: >- + applied_payments,purchase_orders,applied_credit_notes,contact,employee,accounting_period + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + applied_payments,purchase_orders,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,purchase_orders,applied_credit_notes,contact,employee,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesContactEmployeePaymentTerm + - value: >- + applied_payments,purchase_orders,applied_credit_notes,contact,payment_term + name: AppliedPaymentsPurchaseOrdersAppliedCreditNotesContactPaymentTerm + - value: applied_payments,purchase_orders,applied_credit_notes,employee + name: AppliedPaymentsPurchaseOrdersAppliedCreditNotesEmployee + - value: >- + applied_payments,purchase_orders,applied_credit_notes,employee,accounting_period + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + applied_payments,purchase_orders,applied_credit_notes,employee,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,purchase_orders,applied_credit_notes,employee,payment_term + name: AppliedPaymentsPurchaseOrdersAppliedCreditNotesEmployeePaymentTerm + - value: applied_payments,purchase_orders,applied_credit_notes,payment_term + name: AppliedPaymentsPurchaseOrdersAppliedCreditNotesPaymentTerm + - value: applied_payments,purchase_orders,applied_vendor_credits + name: AppliedPaymentsPurchaseOrdersAppliedVendorCredits + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,accounting_period + name: AppliedPaymentsPurchaseOrdersAppliedVendorCreditsAccountingPeriod + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: applied_payments,purchase_orders,applied_vendor_credits,company + name: AppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompany + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,company,accounting_period + name: >- + AppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,company,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,company,employee + name: AppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompanyEmployee + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,company,employee,accounting_period + name: >- + AppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,company,employee,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,company,payment_term + name: AppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompanyPaymentTerm + - value: applied_payments,purchase_orders,applied_vendor_credits,contact + name: AppliedPaymentsPurchaseOrdersAppliedVendorCreditsContact + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,contact,accounting_period + name: >- + AppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,contact,company + name: AppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompany + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,contact,company,accounting_period + name: >- + AppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,contact,company,employee + name: >- + AppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + AppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,contact,company,employee,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,contact,company,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,contact,employee + name: AppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactEmployee + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,contact,employee,accounting_period + name: >- + AppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,contact,employee,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,contact,payment_term + name: AppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactPaymentTerm + - value: applied_payments,purchase_orders,applied_vendor_credits,employee + name: AppliedPaymentsPurchaseOrdersAppliedVendorCreditsEmployee + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,employee,accounting_period + name: >- + AppliedPaymentsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,purchase_orders,applied_vendor_credits,employee,payment_term + name: AppliedPaymentsPurchaseOrdersAppliedVendorCreditsEmployeePaymentTerm + - value: applied_payments,purchase_orders,applied_vendor_credits,payment_term + name: AppliedPaymentsPurchaseOrdersAppliedVendorCreditsPaymentTerm + - value: applied_payments,purchase_orders,company + name: AppliedPaymentsPurchaseOrdersCompany + - value: applied_payments,purchase_orders,company,accounting_period + name: AppliedPaymentsPurchaseOrdersCompanyAccountingPeriod + - value: >- + applied_payments,purchase_orders,company,accounting_period,payment_term + name: AppliedPaymentsPurchaseOrdersCompanyAccountingPeriodPaymentTerm + - value: applied_payments,purchase_orders,company,employee + name: AppliedPaymentsPurchaseOrdersCompanyEmployee + - value: applied_payments,purchase_orders,company,employee,accounting_period + name: AppliedPaymentsPurchaseOrdersCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,purchase_orders,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersCompanyEmployeeAccountingPeriodPaymentTerm + - value: applied_payments,purchase_orders,company,employee,payment_term + name: AppliedPaymentsPurchaseOrdersCompanyEmployeePaymentTerm + - value: applied_payments,purchase_orders,company,payment_term + name: AppliedPaymentsPurchaseOrdersCompanyPaymentTerm + - value: applied_payments,purchase_orders,contact + name: AppliedPaymentsPurchaseOrdersContact + - value: applied_payments,purchase_orders,contact,accounting_period + name: AppliedPaymentsPurchaseOrdersContactAccountingPeriod + - value: >- + applied_payments,purchase_orders,contact,accounting_period,payment_term + name: AppliedPaymentsPurchaseOrdersContactAccountingPeriodPaymentTerm + - value: applied_payments,purchase_orders,contact,company + name: AppliedPaymentsPurchaseOrdersContactCompany + - value: applied_payments,purchase_orders,contact,company,accounting_period + name: AppliedPaymentsPurchaseOrdersContactCompanyAccountingPeriod + - value: >- + applied_payments,purchase_orders,contact,company,accounting_period,payment_term + name: AppliedPaymentsPurchaseOrdersContactCompanyAccountingPeriodPaymentTerm + - value: applied_payments,purchase_orders,contact,company,employee + name: AppliedPaymentsPurchaseOrdersContactCompanyEmployee + - value: >- + applied_payments,purchase_orders,contact,company,employee,accounting_period + name: AppliedPaymentsPurchaseOrdersContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,purchase_orders,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: applied_payments,purchase_orders,contact,company,employee,payment_term + name: AppliedPaymentsPurchaseOrdersContactCompanyEmployeePaymentTerm + - value: applied_payments,purchase_orders,contact,company,payment_term + name: AppliedPaymentsPurchaseOrdersContactCompanyPaymentTerm + - value: applied_payments,purchase_orders,contact,employee + name: AppliedPaymentsPurchaseOrdersContactEmployee + - value: applied_payments,purchase_orders,contact,employee,accounting_period + name: AppliedPaymentsPurchaseOrdersContactEmployeeAccountingPeriod + - value: >- + applied_payments,purchase_orders,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsPurchaseOrdersContactEmployeeAccountingPeriodPaymentTerm + - value: applied_payments,purchase_orders,contact,employee,payment_term + name: AppliedPaymentsPurchaseOrdersContactEmployeePaymentTerm + - value: applied_payments,purchase_orders,contact,payment_term + name: AppliedPaymentsPurchaseOrdersContactPaymentTerm + - value: applied_payments,purchase_orders,employee + name: AppliedPaymentsPurchaseOrdersEmployee + - value: applied_payments,purchase_orders,employee,accounting_period + name: AppliedPaymentsPurchaseOrdersEmployeeAccountingPeriod + - value: >- + applied_payments,purchase_orders,employee,accounting_period,payment_term + name: AppliedPaymentsPurchaseOrdersEmployeeAccountingPeriodPaymentTerm + - value: applied_payments,purchase_orders,employee,payment_term + name: AppliedPaymentsPurchaseOrdersEmployeePaymentTerm + - value: applied_payments,purchase_orders,payment_term + name: AppliedPaymentsPurchaseOrdersPaymentTerm + - value: applied_payments,tracking_categories + name: AppliedPaymentsTrackingCategories + - value: applied_payments,tracking_categories,accounting_period + name: AppliedPaymentsTrackingCategoriesAccountingPeriod + - value: applied_payments,tracking_categories,accounting_period,payment_term + name: AppliedPaymentsTrackingCategoriesAccountingPeriodPaymentTerm + - value: applied_payments,tracking_categories,applied_credit_notes + name: AppliedPaymentsTrackingCategoriesAppliedCreditNotes + - value: >- + applied_payments,tracking_categories,applied_credit_notes,accounting_period + name: AppliedPaymentsTrackingCategoriesAppliedCreditNotesAccountingPeriod + - value: >- + applied_payments,tracking_categories,applied_credit_notes,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCredits + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,employee + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: applied_payments,tracking_categories,applied_credit_notes,company + name: AppliedPaymentsTrackingCategoriesAppliedCreditNotesCompany + - value: >- + applied_payments,tracking_categories,applied_credit_notes,company,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriod + - value: >- + applied_payments,tracking_categories,applied_credit_notes,company,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,company,employee + name: AppliedPaymentsTrackingCategoriesAppliedCreditNotesCompanyEmployee + - value: >- + applied_payments,tracking_categories,applied_credit_notes,company,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,company,employee,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesCompanyEmployeePaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,company,payment_term + name: AppliedPaymentsTrackingCategoriesAppliedCreditNotesCompanyPaymentTerm + - value: applied_payments,tracking_categories,applied_credit_notes,contact + name: AppliedPaymentsTrackingCategoriesAppliedCreditNotesContact + - value: >- + applied_payments,tracking_categories,applied_credit_notes,contact,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesContactAccountingPeriod + - value: >- + applied_payments,tracking_categories,applied_credit_notes,contact,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,contact,company + name: AppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompany + - value: >- + applied_payments,tracking_categories,applied_credit_notes,contact,company,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + applied_payments,tracking_categories,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,contact,company,employee + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyEmployee + - value: >- + applied_payments,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,contact,company,employee,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,contact,company,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,contact,employee + name: AppliedPaymentsTrackingCategoriesAppliedCreditNotesContactEmployee + - value: >- + applied_payments,tracking_categories,applied_credit_notes,contact,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,contact,employee,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesContactEmployeePaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,contact,payment_term + name: AppliedPaymentsTrackingCategoriesAppliedCreditNotesContactPaymentTerm + - value: applied_payments,tracking_categories,applied_credit_notes,employee + name: AppliedPaymentsTrackingCategoriesAppliedCreditNotesEmployee + - value: >- + applied_payments,tracking_categories,applied_credit_notes,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,applied_credit_notes,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_credit_notes,employee,payment_term + name: AppliedPaymentsTrackingCategoriesAppliedCreditNotesEmployeePaymentTerm + - value: applied_payments,tracking_categories,applied_credit_notes,payment_term + name: AppliedPaymentsTrackingCategoriesAppliedCreditNotesPaymentTerm + - value: applied_payments,tracking_categories,applied_vendor_credits + name: AppliedPaymentsTrackingCategoriesAppliedVendorCredits + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,accounting_period + name: AppliedPaymentsTrackingCategoriesAppliedVendorCreditsAccountingPeriod + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: applied_payments,tracking_categories,applied_vendor_credits,company + name: AppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompany + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,company,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,company,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,company,employee + name: AppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompanyEmployee + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,company,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,company,employee,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,company,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompanyPaymentTerm + - value: applied_payments,tracking_categories,applied_vendor_credits,contact + name: AppliedPaymentsTrackingCategoriesAppliedVendorCreditsContact + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,contact,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriod + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,contact,company + name: AppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompany + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,contact,company,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,contact,company,employee + name: >- + AppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployee + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,contact,company,employee,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,contact,company,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,contact,employee + name: AppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactEmployee + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,contact,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,contact,employee,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,contact,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactPaymentTerm + - value: applied_payments,tracking_categories,applied_vendor_credits,employee + name: AppliedPaymentsTrackingCategoriesAppliedVendorCreditsEmployee + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,employee,payment_term + name: >- + AppliedPaymentsTrackingCategoriesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + applied_payments,tracking_categories,applied_vendor_credits,payment_term + name: AppliedPaymentsTrackingCategoriesAppliedVendorCreditsPaymentTerm + - value: applied_payments,tracking_categories,company + name: AppliedPaymentsTrackingCategoriesCompany + - value: applied_payments,tracking_categories,company,accounting_period + name: AppliedPaymentsTrackingCategoriesCompanyAccountingPeriod + - value: >- + applied_payments,tracking_categories,company,accounting_period,payment_term + name: AppliedPaymentsTrackingCategoriesCompanyAccountingPeriodPaymentTerm + - value: applied_payments,tracking_categories,company,employee + name: AppliedPaymentsTrackingCategoriesCompanyEmployee + - value: >- + applied_payments,tracking_categories,company,employee,accounting_period + name: AppliedPaymentsTrackingCategoriesCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesCompanyEmployeeAccountingPeriodPaymentTerm + - value: applied_payments,tracking_categories,company,employee,payment_term + name: AppliedPaymentsTrackingCategoriesCompanyEmployeePaymentTerm + - value: applied_payments,tracking_categories,company,payment_term + name: AppliedPaymentsTrackingCategoriesCompanyPaymentTerm + - value: applied_payments,tracking_categories,contact + name: AppliedPaymentsTrackingCategoriesContact + - value: applied_payments,tracking_categories,contact,accounting_period + name: AppliedPaymentsTrackingCategoriesContactAccountingPeriod + - value: >- + applied_payments,tracking_categories,contact,accounting_period,payment_term + name: AppliedPaymentsTrackingCategoriesContactAccountingPeriodPaymentTerm + - value: applied_payments,tracking_categories,contact,company + name: AppliedPaymentsTrackingCategoriesContactCompany + - value: applied_payments,tracking_categories,contact,company,accounting_period + name: AppliedPaymentsTrackingCategoriesContactCompanyAccountingPeriod + - value: >- + applied_payments,tracking_categories,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesContactCompanyAccountingPeriodPaymentTerm + - value: applied_payments,tracking_categories,contact,company,employee + name: AppliedPaymentsTrackingCategoriesContactCompanyEmployee + - value: >- + applied_payments,tracking_categories,contact,company,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,contact,company,employee,payment_term + name: AppliedPaymentsTrackingCategoriesContactCompanyEmployeePaymentTerm + - value: applied_payments,tracking_categories,contact,company,payment_term + name: AppliedPaymentsTrackingCategoriesContactCompanyPaymentTerm + - value: applied_payments,tracking_categories,contact,employee + name: AppliedPaymentsTrackingCategoriesContactEmployee + - value: >- + applied_payments,tracking_categories,contact,employee,accounting_period + name: AppliedPaymentsTrackingCategoriesContactEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesContactEmployeeAccountingPeriodPaymentTerm + - value: applied_payments,tracking_categories,contact,employee,payment_term + name: AppliedPaymentsTrackingCategoriesContactEmployeePaymentTerm + - value: applied_payments,tracking_categories,contact,payment_term + name: AppliedPaymentsTrackingCategoriesContactPaymentTerm + - value: applied_payments,tracking_categories,employee + name: AppliedPaymentsTrackingCategoriesEmployee + - value: applied_payments,tracking_categories,employee,accounting_period + name: AppliedPaymentsTrackingCategoriesEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,employee,accounting_period,payment_term + name: AppliedPaymentsTrackingCategoriesEmployeeAccountingPeriodPaymentTerm + - value: applied_payments,tracking_categories,employee,payment_term + name: AppliedPaymentsTrackingCategoriesEmployeePaymentTerm + - value: applied_payments,tracking_categories,payment_term + name: AppliedPaymentsTrackingCategoriesPaymentTerm + - value: applied_payments,tracking_categories,purchase_orders + name: AppliedPaymentsTrackingCategoriesPurchaseOrders + - value: applied_payments,tracking_categories,purchase_orders,accounting_period + name: AppliedPaymentsTrackingCategoriesPurchaseOrdersAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes + name: AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotes + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCredits + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompany + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company,employee + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployee + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company,employee,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeePaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContact + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompany + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployee + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,employee + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployee + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeePaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,employee + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployee + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,employee,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeePaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_credit_notes,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits + name: AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCredits + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompany + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company,employee + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployee + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContact + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompany + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployee + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,employee + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployee + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,employee,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeePaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsPaymentTerm + - value: applied_payments,tracking_categories,purchase_orders,company + name: AppliedPaymentsTrackingCategoriesPurchaseOrdersCompany + - value: >- + applied_payments,tracking_categories,purchase_orders,company,accounting_period + name: AppliedPaymentsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,company,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriodPaymentTerm + - value: applied_payments,tracking_categories,purchase_orders,company,employee + name: AppliedPaymentsTrackingCategoriesPurchaseOrdersCompanyEmployee + - value: >- + applied_payments,tracking_categories,purchase_orders,company,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,company,employee,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersCompanyEmployeePaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,company,payment_term + name: AppliedPaymentsTrackingCategoriesPurchaseOrdersCompanyPaymentTerm + - value: applied_payments,tracking_categories,purchase_orders,contact + name: AppliedPaymentsTrackingCategoriesPurchaseOrdersContact + - value: >- + applied_payments,tracking_categories,purchase_orders,contact,accounting_period + name: AppliedPaymentsTrackingCategoriesPurchaseOrdersContactAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,contact,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersContactAccountingPeriodPaymentTerm + - value: applied_payments,tracking_categories,purchase_orders,contact,company + name: AppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompany + - value: >- + applied_payments,tracking_categories,purchase_orders,contact,company,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,contact,company,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,contact,company,employee + name: AppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompanyEmployee + - value: >- + applied_payments,tracking_categories,purchase_orders,contact,company,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,contact,company,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,contact,company,employee,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompanyEmployeePaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,contact,company,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompanyPaymentTerm + - value: applied_payments,tracking_categories,purchase_orders,contact,employee + name: AppliedPaymentsTrackingCategoriesPurchaseOrdersContactEmployee + - value: >- + applied_payments,tracking_categories,purchase_orders,contact,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,contact,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,contact,employee,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersContactEmployeePaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,contact,payment_term + name: AppliedPaymentsTrackingCategoriesPurchaseOrdersContactPaymentTerm + - value: applied_payments,tracking_categories,purchase_orders,employee + name: AppliedPaymentsTrackingCategoriesPurchaseOrdersEmployee + - value: >- + applied_payments,tracking_categories,purchase_orders,employee,accounting_period + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriod + - value: >- + applied_payments,tracking_categories,purchase_orders,employee,accounting_period,payment_term + name: >- + AppliedPaymentsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriodPaymentTerm + - value: >- + applied_payments,tracking_categories,purchase_orders,employee,payment_term + name: AppliedPaymentsTrackingCategoriesPurchaseOrdersEmployeePaymentTerm + - value: applied_payments,tracking_categories,purchase_orders,payment_term + name: AppliedPaymentsTrackingCategoriesPurchaseOrdersPaymentTerm + - applied_vendor_credits + - value: applied_vendor_credits,accounting_period + name: AppliedVendorCreditsAccountingPeriod + - value: applied_vendor_credits,accounting_period,payment_term + name: AppliedVendorCreditsAccountingPeriodPaymentTerm + - value: applied_vendor_credits,company + name: AppliedVendorCreditsCompany + - value: applied_vendor_credits,company,accounting_period + name: AppliedVendorCreditsCompanyAccountingPeriod + - value: applied_vendor_credits,company,accounting_period,payment_term + name: AppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: applied_vendor_credits,company,employee + name: AppliedVendorCreditsCompanyEmployee + - value: applied_vendor_credits,company,employee,accounting_period + name: AppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: applied_vendor_credits,company,employee,accounting_period,payment_term + name: AppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: applied_vendor_credits,company,employee,payment_term + name: AppliedVendorCreditsCompanyEmployeePaymentTerm + - value: applied_vendor_credits,company,payment_term + name: AppliedVendorCreditsCompanyPaymentTerm + - value: applied_vendor_credits,contact + name: AppliedVendorCreditsContact + - value: applied_vendor_credits,contact,accounting_period + name: AppliedVendorCreditsContactAccountingPeriod + - value: applied_vendor_credits,contact,accounting_period,payment_term + name: AppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: applied_vendor_credits,contact,company + name: AppliedVendorCreditsContactCompany + - value: applied_vendor_credits,contact,company,accounting_period + name: AppliedVendorCreditsContactCompanyAccountingPeriod + - value: applied_vendor_credits,contact,company,accounting_period,payment_term + name: AppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: applied_vendor_credits,contact,company,employee + name: AppliedVendorCreditsContactCompanyEmployee + - value: applied_vendor_credits,contact,company,employee,accounting_period + name: AppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: AppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: applied_vendor_credits,contact,company,employee,payment_term + name: AppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: applied_vendor_credits,contact,company,payment_term + name: AppliedVendorCreditsContactCompanyPaymentTerm + - value: applied_vendor_credits,contact,employee + name: AppliedVendorCreditsContactEmployee + - value: applied_vendor_credits,contact,employee,accounting_period + name: AppliedVendorCreditsContactEmployeeAccountingPeriod + - value: applied_vendor_credits,contact,employee,accounting_period,payment_term + name: AppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: applied_vendor_credits,contact,employee,payment_term + name: AppliedVendorCreditsContactEmployeePaymentTerm + - value: applied_vendor_credits,contact,payment_term + name: AppliedVendorCreditsContactPaymentTerm + - value: applied_vendor_credits,employee + name: AppliedVendorCreditsEmployee + - value: applied_vendor_credits,employee,accounting_period + name: AppliedVendorCreditsEmployeeAccountingPeriod + - value: applied_vendor_credits,employee,accounting_period,payment_term + name: AppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: applied_vendor_credits,employee,payment_term + name: AppliedVendorCreditsEmployeePaymentTerm + - value: applied_vendor_credits,payment_term + name: AppliedVendorCreditsPaymentTerm + - company + - value: company,accounting_period + name: CompanyAccountingPeriod + - value: company,accounting_period,payment_term + name: CompanyAccountingPeriodPaymentTerm + - value: company,employee + name: CompanyEmployee + - value: company,employee,accounting_period + name: CompanyEmployeeAccountingPeriod + - value: company,employee,accounting_period,payment_term + name: CompanyEmployeeAccountingPeriodPaymentTerm + - value: company,employee,payment_term + name: CompanyEmployeePaymentTerm + - value: company,payment_term + name: CompanyPaymentTerm + - contact + - value: contact,accounting_period + name: ContactAccountingPeriod + - value: contact,accounting_period,payment_term + name: ContactAccountingPeriodPaymentTerm + - value: contact,company + name: ContactCompany + - value: contact,company,accounting_period + name: ContactCompanyAccountingPeriod + - value: contact,company,accounting_period,payment_term + name: ContactCompanyAccountingPeriodPaymentTerm + - value: contact,company,employee + name: ContactCompanyEmployee + - value: contact,company,employee,accounting_period + name: ContactCompanyEmployeeAccountingPeriod + - value: contact,company,employee,accounting_period,payment_term + name: ContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: contact,company,employee,payment_term + name: ContactCompanyEmployeePaymentTerm + - value: contact,company,payment_term + name: ContactCompanyPaymentTerm + - value: contact,employee + name: ContactEmployee + - value: contact,employee,accounting_period + name: ContactEmployeeAccountingPeriod + - value: contact,employee,accounting_period,payment_term + name: ContactEmployeeAccountingPeriodPaymentTerm + - value: contact,employee,payment_term + name: ContactEmployeePaymentTerm + - value: contact,payment_term + name: ContactPaymentTerm + - employee + - value: employee,accounting_period + name: EmployeeAccountingPeriod + - value: employee,accounting_period,payment_term + name: EmployeeAccountingPeriodPaymentTerm + - value: employee,payment_term + name: EmployeePaymentTerm + - line_items + - value: line_items,accounting_period + name: LineItemsAccountingPeriod + - value: line_items,accounting_period,payment_term + name: LineItemsAccountingPeriodPaymentTerm + - value: line_items,applied_credit_notes + name: LineItemsAppliedCreditNotes + - value: line_items,applied_credit_notes,accounting_period + name: LineItemsAppliedCreditNotesAccountingPeriod + - value: line_items,applied_credit_notes,accounting_period,payment_term + name: LineItemsAppliedCreditNotesAccountingPeriodPaymentTerm + - value: line_items,applied_credit_notes,applied_vendor_credits + name: LineItemsAppliedCreditNotesAppliedVendorCredits + - value: >- + line_items,applied_credit_notes,applied_vendor_credits,accounting_period + name: LineItemsAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + line_items,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + LineItemsAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: line_items,applied_credit_notes,applied_vendor_credits,company + name: LineItemsAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + line_items,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: LineItemsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + line_items,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + LineItemsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + line_items,applied_credit_notes,applied_vendor_credits,company,employee + name: LineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + line_items,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + LineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + line_items,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + LineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + LineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + line_items,applied_credit_notes,applied_vendor_credits,company,payment_term + name: LineItemsAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: line_items,applied_credit_notes,applied_vendor_credits,contact + name: LineItemsAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + line_items,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: LineItemsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + line_items,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + LineItemsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: line_items,applied_credit_notes,applied_vendor_credits,contact,company + name: LineItemsAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + line_items,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + LineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + line_items,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + LineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: LineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + LineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + LineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + LineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + line_items,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + LineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + line_items,applied_credit_notes,applied_vendor_credits,contact,employee + name: LineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + line_items,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + LineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + line_items,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + LineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + LineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + line_items,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: LineItemsAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: line_items,applied_credit_notes,applied_vendor_credits,employee + name: LineItemsAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + line_items,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + LineItemsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + line_items,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + LineItemsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: LineItemsAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: line_items,applied_credit_notes,applied_vendor_credits,payment_term + name: LineItemsAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: line_items,applied_credit_notes,company + name: LineItemsAppliedCreditNotesCompany + - value: line_items,applied_credit_notes,company,accounting_period + name: LineItemsAppliedCreditNotesCompanyAccountingPeriod + - value: line_items,applied_credit_notes,company,accounting_period,payment_term + name: LineItemsAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: line_items,applied_credit_notes,company,employee + name: LineItemsAppliedCreditNotesCompanyEmployee + - value: line_items,applied_credit_notes,company,employee,accounting_period + name: LineItemsAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + line_items,applied_credit_notes,company,employee,accounting_period,payment_term + name: LineItemsAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: line_items,applied_credit_notes,company,employee,payment_term + name: LineItemsAppliedCreditNotesCompanyEmployeePaymentTerm + - value: line_items,applied_credit_notes,company,payment_term + name: LineItemsAppliedCreditNotesCompanyPaymentTerm + - value: line_items,applied_credit_notes,contact + name: LineItemsAppliedCreditNotesContact + - value: line_items,applied_credit_notes,contact,accounting_period + name: LineItemsAppliedCreditNotesContactAccountingPeriod + - value: line_items,applied_credit_notes,contact,accounting_period,payment_term + name: LineItemsAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: line_items,applied_credit_notes,contact,company + name: LineItemsAppliedCreditNotesContactCompany + - value: line_items,applied_credit_notes,contact,company,accounting_period + name: LineItemsAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + line_items,applied_credit_notes,contact,company,accounting_period,payment_term + name: LineItemsAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: line_items,applied_credit_notes,contact,company,employee + name: LineItemsAppliedCreditNotesContactCompanyEmployee + - value: >- + line_items,applied_credit_notes,contact,company,employee,accounting_period + name: LineItemsAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + line_items,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + LineItemsAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: line_items,applied_credit_notes,contact,company,employee,payment_term + name: LineItemsAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: line_items,applied_credit_notes,contact,company,payment_term + name: LineItemsAppliedCreditNotesContactCompanyPaymentTerm + - value: line_items,applied_credit_notes,contact,employee + name: LineItemsAppliedCreditNotesContactEmployee + - value: line_items,applied_credit_notes,contact,employee,accounting_period + name: LineItemsAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + line_items,applied_credit_notes,contact,employee,accounting_period,payment_term + name: LineItemsAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: line_items,applied_credit_notes,contact,employee,payment_term + name: LineItemsAppliedCreditNotesContactEmployeePaymentTerm + - value: line_items,applied_credit_notes,contact,payment_term + name: LineItemsAppliedCreditNotesContactPaymentTerm + - value: line_items,applied_credit_notes,employee + name: LineItemsAppliedCreditNotesEmployee + - value: line_items,applied_credit_notes,employee,accounting_period + name: LineItemsAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + line_items,applied_credit_notes,employee,accounting_period,payment_term + name: LineItemsAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: line_items,applied_credit_notes,employee,payment_term + name: LineItemsAppliedCreditNotesEmployeePaymentTerm + - value: line_items,applied_credit_notes,payment_term + name: LineItemsAppliedCreditNotesPaymentTerm + - value: line_items,applied_vendor_credits + name: LineItemsAppliedVendorCredits + - value: line_items,applied_vendor_credits,accounting_period + name: LineItemsAppliedVendorCreditsAccountingPeriod + - value: line_items,applied_vendor_credits,accounting_period,payment_term + name: LineItemsAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: line_items,applied_vendor_credits,company + name: LineItemsAppliedVendorCreditsCompany + - value: line_items,applied_vendor_credits,company,accounting_period + name: LineItemsAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + line_items,applied_vendor_credits,company,accounting_period,payment_term + name: LineItemsAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: line_items,applied_vendor_credits,company,employee + name: LineItemsAppliedVendorCreditsCompanyEmployee + - value: line_items,applied_vendor_credits,company,employee,accounting_period + name: LineItemsAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + line_items,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + LineItemsAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: line_items,applied_vendor_credits,company,employee,payment_term + name: LineItemsAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: line_items,applied_vendor_credits,company,payment_term + name: LineItemsAppliedVendorCreditsCompanyPaymentTerm + - value: line_items,applied_vendor_credits,contact + name: LineItemsAppliedVendorCreditsContact + - value: line_items,applied_vendor_credits,contact,accounting_period + name: LineItemsAppliedVendorCreditsContactAccountingPeriod + - value: >- + line_items,applied_vendor_credits,contact,accounting_period,payment_term + name: LineItemsAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: line_items,applied_vendor_credits,contact,company + name: LineItemsAppliedVendorCreditsContactCompany + - value: line_items,applied_vendor_credits,contact,company,accounting_period + name: LineItemsAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + line_items,applied_vendor_credits,contact,company,accounting_period,payment_term + name: LineItemsAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: line_items,applied_vendor_credits,contact,company,employee + name: LineItemsAppliedVendorCreditsContactCompanyEmployee + - value: >- + line_items,applied_vendor_credits,contact,company,employee,accounting_period + name: LineItemsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + line_items,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + LineItemsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,applied_vendor_credits,contact,company,employee,payment_term + name: LineItemsAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: line_items,applied_vendor_credits,contact,company,payment_term + name: LineItemsAppliedVendorCreditsContactCompanyPaymentTerm + - value: line_items,applied_vendor_credits,contact,employee + name: LineItemsAppliedVendorCreditsContactEmployee + - value: line_items,applied_vendor_credits,contact,employee,accounting_period + name: LineItemsAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + line_items,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + LineItemsAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: line_items,applied_vendor_credits,contact,employee,payment_term + name: LineItemsAppliedVendorCreditsContactEmployeePaymentTerm + - value: line_items,applied_vendor_credits,contact,payment_term + name: LineItemsAppliedVendorCreditsContactPaymentTerm + - value: line_items,applied_vendor_credits,employee + name: LineItemsAppliedVendorCreditsEmployee + - value: line_items,applied_vendor_credits,employee,accounting_period + name: LineItemsAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + line_items,applied_vendor_credits,employee,accounting_period,payment_term + name: LineItemsAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: line_items,applied_vendor_credits,employee,payment_term + name: LineItemsAppliedVendorCreditsEmployeePaymentTerm + - value: line_items,applied_vendor_credits,payment_term + name: LineItemsAppliedVendorCreditsPaymentTerm + - value: line_items,company + name: LineItemsCompany + - value: line_items,company,accounting_period + name: LineItemsCompanyAccountingPeriod + - value: line_items,company,accounting_period,payment_term + name: LineItemsCompanyAccountingPeriodPaymentTerm + - value: line_items,company,employee + name: LineItemsCompanyEmployee + - value: line_items,company,employee,accounting_period + name: LineItemsCompanyEmployeeAccountingPeriod + - value: line_items,company,employee,accounting_period,payment_term + name: LineItemsCompanyEmployeeAccountingPeriodPaymentTerm + - value: line_items,company,employee,payment_term + name: LineItemsCompanyEmployeePaymentTerm + - value: line_items,company,payment_term + name: LineItemsCompanyPaymentTerm + - value: line_items,contact + name: LineItemsContact + - value: line_items,contact,accounting_period + name: LineItemsContactAccountingPeriod + - value: line_items,contact,accounting_period,payment_term + name: LineItemsContactAccountingPeriodPaymentTerm + - value: line_items,contact,company + name: LineItemsContactCompany + - value: line_items,contact,company,accounting_period + name: LineItemsContactCompanyAccountingPeriod + - value: line_items,contact,company,accounting_period,payment_term + name: LineItemsContactCompanyAccountingPeriodPaymentTerm + - value: line_items,contact,company,employee + name: LineItemsContactCompanyEmployee + - value: line_items,contact,company,employee,accounting_period + name: LineItemsContactCompanyEmployeeAccountingPeriod + - value: line_items,contact,company,employee,accounting_period,payment_term + name: LineItemsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: line_items,contact,company,employee,payment_term + name: LineItemsContactCompanyEmployeePaymentTerm + - value: line_items,contact,company,payment_term + name: LineItemsContactCompanyPaymentTerm + - value: line_items,contact,employee + name: LineItemsContactEmployee + - value: line_items,contact,employee,accounting_period + name: LineItemsContactEmployeeAccountingPeriod + - value: line_items,contact,employee,accounting_period,payment_term + name: LineItemsContactEmployeeAccountingPeriodPaymentTerm + - value: line_items,contact,employee,payment_term + name: LineItemsContactEmployeePaymentTerm + - value: line_items,contact,payment_term + name: LineItemsContactPaymentTerm + - value: line_items,employee + name: LineItemsEmployee + - value: line_items,employee,accounting_period + name: LineItemsEmployeeAccountingPeriod + - value: line_items,employee,accounting_period,payment_term + name: LineItemsEmployeeAccountingPeriodPaymentTerm + - value: line_items,employee,payment_term + name: LineItemsEmployeePaymentTerm + - value: line_items,payment_term + name: LineItemsPaymentTerm + - value: line_items,purchase_orders + name: LineItemsPurchaseOrders + - value: line_items,purchase_orders,accounting_period + name: LineItemsPurchaseOrdersAccountingPeriod + - value: line_items,purchase_orders,accounting_period,payment_term + name: LineItemsPurchaseOrdersAccountingPeriodPaymentTerm + - value: line_items,purchase_orders,applied_credit_notes + name: LineItemsPurchaseOrdersAppliedCreditNotes + - value: line_items,purchase_orders,applied_credit_notes,accounting_period + name: LineItemsPurchaseOrdersAppliedCreditNotesAccountingPeriod + - value: >- + line_items,purchase_orders,applied_credit_notes,accounting_period,payment_term + name: LineItemsPurchaseOrdersAppliedCreditNotesAccountingPeriodPaymentTerm + - value: line_items,purchase_orders,applied_credit_notes,applied_vendor_credits + name: LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCredits + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company + name: LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact + name: LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee + name: LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,payment_term + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: line_items,purchase_orders,applied_credit_notes,company + name: LineItemsPurchaseOrdersAppliedCreditNotesCompany + - value: >- + line_items,purchase_orders,applied_credit_notes,company,accounting_period + name: LineItemsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod + - value: >- + line_items,purchase_orders,applied_credit_notes,company,accounting_period,payment_term + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: line_items,purchase_orders,applied_credit_notes,company,employee + name: LineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployee + - value: >- + line_items,purchase_orders,applied_credit_notes,company,employee,accounting_period + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + line_items,purchase_orders,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,purchase_orders,applied_credit_notes,company,employee,payment_term + name: LineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployeePaymentTerm + - value: line_items,purchase_orders,applied_credit_notes,company,payment_term + name: LineItemsPurchaseOrdersAppliedCreditNotesCompanyPaymentTerm + - value: line_items,purchase_orders,applied_credit_notes,contact + name: LineItemsPurchaseOrdersAppliedCreditNotesContact + - value: >- + line_items,purchase_orders,applied_credit_notes,contact,accounting_period + name: LineItemsPurchaseOrdersAppliedCreditNotesContactAccountingPeriod + - value: >- + line_items,purchase_orders,applied_credit_notes,contact,accounting_period,payment_term + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: line_items,purchase_orders,applied_credit_notes,contact,company + name: LineItemsPurchaseOrdersAppliedCreditNotesContactCompany + - value: >- + line_items,purchase_orders,applied_credit_notes,contact,company,accounting_period + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + line_items,purchase_orders,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: >- + line_items,purchase_orders,applied_credit_notes,contact,company,employee + name: LineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployee + - value: >- + line_items,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + line_items,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,purchase_orders,applied_credit_notes,contact,company,employee,payment_term + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: >- + line_items,purchase_orders,applied_credit_notes,contact,company,payment_term + name: LineItemsPurchaseOrdersAppliedCreditNotesContactCompanyPaymentTerm + - value: line_items,purchase_orders,applied_credit_notes,contact,employee + name: LineItemsPurchaseOrdersAppliedCreditNotesContactEmployee + - value: >- + line_items,purchase_orders,applied_credit_notes,contact,employee,accounting_period + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + line_items,purchase_orders,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,purchase_orders,applied_credit_notes,contact,employee,payment_term + name: LineItemsPurchaseOrdersAppliedCreditNotesContactEmployeePaymentTerm + - value: line_items,purchase_orders,applied_credit_notes,contact,payment_term + name: LineItemsPurchaseOrdersAppliedCreditNotesContactPaymentTerm + - value: line_items,purchase_orders,applied_credit_notes,employee + name: LineItemsPurchaseOrdersAppliedCreditNotesEmployee + - value: >- + line_items,purchase_orders,applied_credit_notes,employee,accounting_period + name: LineItemsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + line_items,purchase_orders,applied_credit_notes,employee,accounting_period,payment_term + name: >- + LineItemsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: line_items,purchase_orders,applied_credit_notes,employee,payment_term + name: LineItemsPurchaseOrdersAppliedCreditNotesEmployeePaymentTerm + - value: line_items,purchase_orders,applied_credit_notes,payment_term + name: LineItemsPurchaseOrdersAppliedCreditNotesPaymentTerm + - value: line_items,purchase_orders,applied_vendor_credits + name: LineItemsPurchaseOrdersAppliedVendorCredits + - value: line_items,purchase_orders,applied_vendor_credits,accounting_period + name: LineItemsPurchaseOrdersAppliedVendorCreditsAccountingPeriod + - value: >- + line_items,purchase_orders,applied_vendor_credits,accounting_period,payment_term + name: LineItemsPurchaseOrdersAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: line_items,purchase_orders,applied_vendor_credits,company + name: LineItemsPurchaseOrdersAppliedVendorCreditsCompany + - value: >- + line_items,purchase_orders,applied_vendor_credits,company,accounting_period + name: LineItemsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + line_items,purchase_orders,applied_vendor_credits,company,accounting_period,payment_term + name: >- + LineItemsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: line_items,purchase_orders,applied_vendor_credits,company,employee + name: LineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployee + - value: >- + line_items,purchase_orders,applied_vendor_credits,company,employee,accounting_period + name: >- + LineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + line_items,purchase_orders,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + LineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,purchase_orders,applied_vendor_credits,company,employee,payment_term + name: LineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: line_items,purchase_orders,applied_vendor_credits,company,payment_term + name: LineItemsPurchaseOrdersAppliedVendorCreditsCompanyPaymentTerm + - value: line_items,purchase_orders,applied_vendor_credits,contact + name: LineItemsPurchaseOrdersAppliedVendorCreditsContact + - value: >- + line_items,purchase_orders,applied_vendor_credits,contact,accounting_period + name: LineItemsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod + - value: >- + line_items,purchase_orders,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + LineItemsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: line_items,purchase_orders,applied_vendor_credits,contact,company + name: LineItemsPurchaseOrdersAppliedVendorCreditsContactCompany + - value: >- + line_items,purchase_orders,applied_vendor_credits,contact,company,accounting_period + name: >- + LineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + line_items,purchase_orders,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + LineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + line_items,purchase_orders,applied_vendor_credits,contact,company,employee + name: LineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee + - value: >- + line_items,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + LineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + line_items,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + LineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,purchase_orders,applied_vendor_credits,contact,company,employee,payment_term + name: >- + LineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + line_items,purchase_orders,applied_vendor_credits,contact,company,payment_term + name: LineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyPaymentTerm + - value: line_items,purchase_orders,applied_vendor_credits,contact,employee + name: LineItemsPurchaseOrdersAppliedVendorCreditsContactEmployee + - value: >- + line_items,purchase_orders,applied_vendor_credits,contact,employee,accounting_period + name: >- + LineItemsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + line_items,purchase_orders,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + LineItemsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,purchase_orders,applied_vendor_credits,contact,employee,payment_term + name: LineItemsPurchaseOrdersAppliedVendorCreditsContactEmployeePaymentTerm + - value: line_items,purchase_orders,applied_vendor_credits,contact,payment_term + name: LineItemsPurchaseOrdersAppliedVendorCreditsContactPaymentTerm + - value: line_items,purchase_orders,applied_vendor_credits,employee + name: LineItemsPurchaseOrdersAppliedVendorCreditsEmployee + - value: >- + line_items,purchase_orders,applied_vendor_credits,employee,accounting_period + name: LineItemsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + line_items,purchase_orders,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + LineItemsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,purchase_orders,applied_vendor_credits,employee,payment_term + name: LineItemsPurchaseOrdersAppliedVendorCreditsEmployeePaymentTerm + - value: line_items,purchase_orders,applied_vendor_credits,payment_term + name: LineItemsPurchaseOrdersAppliedVendorCreditsPaymentTerm + - value: line_items,purchase_orders,company + name: LineItemsPurchaseOrdersCompany + - value: line_items,purchase_orders,company,accounting_period + name: LineItemsPurchaseOrdersCompanyAccountingPeriod + - value: line_items,purchase_orders,company,accounting_period,payment_term + name: LineItemsPurchaseOrdersCompanyAccountingPeriodPaymentTerm + - value: line_items,purchase_orders,company,employee + name: LineItemsPurchaseOrdersCompanyEmployee + - value: line_items,purchase_orders,company,employee,accounting_period + name: LineItemsPurchaseOrdersCompanyEmployeeAccountingPeriod + - value: >- + line_items,purchase_orders,company,employee,accounting_period,payment_term + name: LineItemsPurchaseOrdersCompanyEmployeeAccountingPeriodPaymentTerm + - value: line_items,purchase_orders,company,employee,payment_term + name: LineItemsPurchaseOrdersCompanyEmployeePaymentTerm + - value: line_items,purchase_orders,company,payment_term + name: LineItemsPurchaseOrdersCompanyPaymentTerm + - value: line_items,purchase_orders,contact + name: LineItemsPurchaseOrdersContact + - value: line_items,purchase_orders,contact,accounting_period + name: LineItemsPurchaseOrdersContactAccountingPeriod + - value: line_items,purchase_orders,contact,accounting_period,payment_term + name: LineItemsPurchaseOrdersContactAccountingPeriodPaymentTerm + - value: line_items,purchase_orders,contact,company + name: LineItemsPurchaseOrdersContactCompany + - value: line_items,purchase_orders,contact,company,accounting_period + name: LineItemsPurchaseOrdersContactCompanyAccountingPeriod + - value: >- + line_items,purchase_orders,contact,company,accounting_period,payment_term + name: LineItemsPurchaseOrdersContactCompanyAccountingPeriodPaymentTerm + - value: line_items,purchase_orders,contact,company,employee + name: LineItemsPurchaseOrdersContactCompanyEmployee + - value: line_items,purchase_orders,contact,company,employee,accounting_period + name: LineItemsPurchaseOrdersContactCompanyEmployeeAccountingPeriod + - value: >- + line_items,purchase_orders,contact,company,employee,accounting_period,payment_term + name: >- + LineItemsPurchaseOrdersContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: line_items,purchase_orders,contact,company,employee,payment_term + name: LineItemsPurchaseOrdersContactCompanyEmployeePaymentTerm + - value: line_items,purchase_orders,contact,company,payment_term + name: LineItemsPurchaseOrdersContactCompanyPaymentTerm + - value: line_items,purchase_orders,contact,employee + name: LineItemsPurchaseOrdersContactEmployee + - value: line_items,purchase_orders,contact,employee,accounting_period + name: LineItemsPurchaseOrdersContactEmployeeAccountingPeriod + - value: >- + line_items,purchase_orders,contact,employee,accounting_period,payment_term + name: LineItemsPurchaseOrdersContactEmployeeAccountingPeriodPaymentTerm + - value: line_items,purchase_orders,contact,employee,payment_term + name: LineItemsPurchaseOrdersContactEmployeePaymentTerm + - value: line_items,purchase_orders,contact,payment_term + name: LineItemsPurchaseOrdersContactPaymentTerm + - value: line_items,purchase_orders,employee + name: LineItemsPurchaseOrdersEmployee + - value: line_items,purchase_orders,employee,accounting_period + name: LineItemsPurchaseOrdersEmployeeAccountingPeriod + - value: line_items,purchase_orders,employee,accounting_period,payment_term + name: LineItemsPurchaseOrdersEmployeeAccountingPeriodPaymentTerm + - value: line_items,purchase_orders,employee,payment_term + name: LineItemsPurchaseOrdersEmployeePaymentTerm + - value: line_items,purchase_orders,payment_term + name: LineItemsPurchaseOrdersPaymentTerm + - value: line_items,tracking_categories + name: LineItemsTrackingCategories + - value: line_items,tracking_categories,accounting_period + name: LineItemsTrackingCategoriesAccountingPeriod + - value: line_items,tracking_categories,accounting_period,payment_term + name: LineItemsTrackingCategoriesAccountingPeriodPaymentTerm + - value: line_items,tracking_categories,applied_credit_notes + name: LineItemsTrackingCategoriesAppliedCreditNotes + - value: line_items,tracking_categories,applied_credit_notes,accounting_period + name: LineItemsTrackingCategoriesAppliedCreditNotesAccountingPeriod + - value: >- + line_items,tracking_categories,applied_credit_notes,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits + name: LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCredits + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: line_items,tracking_categories,applied_credit_notes,company + name: LineItemsTrackingCategoriesAppliedCreditNotesCompany + - value: >- + line_items,tracking_categories,applied_credit_notes,company,accounting_period + name: LineItemsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriod + - value: >- + line_items,tracking_categories,applied_credit_notes,company,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: line_items,tracking_categories,applied_credit_notes,company,employee + name: LineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployee + - value: >- + line_items,tracking_categories,applied_credit_notes,company,employee,accounting_period + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,applied_credit_notes,company,employee,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployeePaymentTerm + - value: >- + line_items,tracking_categories,applied_credit_notes,company,payment_term + name: LineItemsTrackingCategoriesAppliedCreditNotesCompanyPaymentTerm + - value: line_items,tracking_categories,applied_credit_notes,contact + name: LineItemsTrackingCategoriesAppliedCreditNotesContact + - value: >- + line_items,tracking_categories,applied_credit_notes,contact,accounting_period + name: LineItemsTrackingCategoriesAppliedCreditNotesContactAccountingPeriod + - value: >- + line_items,tracking_categories,applied_credit_notes,contact,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: line_items,tracking_categories,applied_credit_notes,contact,company + name: LineItemsTrackingCategoriesAppliedCreditNotesContactCompany + - value: >- + line_items,tracking_categories,applied_credit_notes,contact,company,accounting_period + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + line_items,tracking_categories,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,applied_credit_notes,contact,company,employee + name: LineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployee + - value: >- + line_items,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,applied_credit_notes,contact,company,employee,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: >- + line_items,tracking_categories,applied_credit_notes,contact,company,payment_term + name: LineItemsTrackingCategoriesAppliedCreditNotesContactCompanyPaymentTerm + - value: line_items,tracking_categories,applied_credit_notes,contact,employee + name: LineItemsTrackingCategoriesAppliedCreditNotesContactEmployee + - value: >- + line_items,tracking_categories,applied_credit_notes,contact,employee,accounting_period + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,applied_credit_notes,contact,employee,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesContactEmployeePaymentTerm + - value: >- + line_items,tracking_categories,applied_credit_notes,contact,payment_term + name: LineItemsTrackingCategoriesAppliedCreditNotesContactPaymentTerm + - value: line_items,tracking_categories,applied_credit_notes,employee + name: LineItemsTrackingCategoriesAppliedCreditNotesEmployee + - value: >- + line_items,tracking_categories,applied_credit_notes,employee,accounting_period + name: LineItemsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,applied_credit_notes,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,applied_credit_notes,employee,payment_term + name: LineItemsTrackingCategoriesAppliedCreditNotesEmployeePaymentTerm + - value: line_items,tracking_categories,applied_credit_notes,payment_term + name: LineItemsTrackingCategoriesAppliedCreditNotesPaymentTerm + - value: line_items,tracking_categories,applied_vendor_credits + name: LineItemsTrackingCategoriesAppliedVendorCredits + - value: >- + line_items,tracking_categories,applied_vendor_credits,accounting_period + name: LineItemsTrackingCategoriesAppliedVendorCreditsAccountingPeriod + - value: >- + line_items,tracking_categories,applied_vendor_credits,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: line_items,tracking_categories,applied_vendor_credits,company + name: LineItemsTrackingCategoriesAppliedVendorCreditsCompany + - value: >- + line_items,tracking_categories,applied_vendor_credits,company,accounting_period + name: LineItemsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + line_items,tracking_categories,applied_vendor_credits,company,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: line_items,tracking_categories,applied_vendor_credits,company,employee + name: LineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployee + - value: >- + line_items,tracking_categories,applied_vendor_credits,company,employee,accounting_period + name: >- + LineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,applied_vendor_credits,company,employee,payment_term + name: >- + LineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + line_items,tracking_categories,applied_vendor_credits,company,payment_term + name: LineItemsTrackingCategoriesAppliedVendorCreditsCompanyPaymentTerm + - value: line_items,tracking_categories,applied_vendor_credits,contact + name: LineItemsTrackingCategoriesAppliedVendorCreditsContact + - value: >- + line_items,tracking_categories,applied_vendor_credits,contact,accounting_period + name: LineItemsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriod + - value: >- + line_items,tracking_categories,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: line_items,tracking_categories,applied_vendor_credits,contact,company + name: LineItemsTrackingCategoriesAppliedVendorCreditsContactCompany + - value: >- + line_items,tracking_categories,applied_vendor_credits,contact,company,accounting_period + name: >- + LineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + line_items,tracking_categories,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,applied_vendor_credits,contact,company,employee + name: LineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployee + - value: >- + line_items,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + LineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,applied_vendor_credits,contact,company,employee,payment_term + name: >- + LineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + line_items,tracking_categories,applied_vendor_credits,contact,company,payment_term + name: >- + LineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyPaymentTerm + - value: line_items,tracking_categories,applied_vendor_credits,contact,employee + name: LineItemsTrackingCategoriesAppliedVendorCreditsContactEmployee + - value: >- + line_items,tracking_categories,applied_vendor_credits,contact,employee,accounting_period + name: >- + LineItemsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,applied_vendor_credits,contact,employee,payment_term + name: >- + LineItemsTrackingCategoriesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + line_items,tracking_categories,applied_vendor_credits,contact,payment_term + name: LineItemsTrackingCategoriesAppliedVendorCreditsContactPaymentTerm + - value: line_items,tracking_categories,applied_vendor_credits,employee + name: LineItemsTrackingCategoriesAppliedVendorCreditsEmployee + - value: >- + line_items,tracking_categories,applied_vendor_credits,employee,accounting_period + name: >- + LineItemsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,applied_vendor_credits,employee,payment_term + name: LineItemsTrackingCategoriesAppliedVendorCreditsEmployeePaymentTerm + - value: line_items,tracking_categories,applied_vendor_credits,payment_term + name: LineItemsTrackingCategoriesAppliedVendorCreditsPaymentTerm + - value: line_items,tracking_categories,company + name: LineItemsTrackingCategoriesCompany + - value: line_items,tracking_categories,company,accounting_period + name: LineItemsTrackingCategoriesCompanyAccountingPeriod + - value: line_items,tracking_categories,company,accounting_period,payment_term + name: LineItemsTrackingCategoriesCompanyAccountingPeriodPaymentTerm + - value: line_items,tracking_categories,company,employee + name: LineItemsTrackingCategoriesCompanyEmployee + - value: line_items,tracking_categories,company,employee,accounting_period + name: LineItemsTrackingCategoriesCompanyEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,company,employee,accounting_period,payment_term + name: LineItemsTrackingCategoriesCompanyEmployeeAccountingPeriodPaymentTerm + - value: line_items,tracking_categories,company,employee,payment_term + name: LineItemsTrackingCategoriesCompanyEmployeePaymentTerm + - value: line_items,tracking_categories,company,payment_term + name: LineItemsTrackingCategoriesCompanyPaymentTerm + - value: line_items,tracking_categories,contact + name: LineItemsTrackingCategoriesContact + - value: line_items,tracking_categories,contact,accounting_period + name: LineItemsTrackingCategoriesContactAccountingPeriod + - value: line_items,tracking_categories,contact,accounting_period,payment_term + name: LineItemsTrackingCategoriesContactAccountingPeriodPaymentTerm + - value: line_items,tracking_categories,contact,company + name: LineItemsTrackingCategoriesContactCompany + - value: line_items,tracking_categories,contact,company,accounting_period + name: LineItemsTrackingCategoriesContactCompanyAccountingPeriod + - value: >- + line_items,tracking_categories,contact,company,accounting_period,payment_term + name: LineItemsTrackingCategoriesContactCompanyAccountingPeriodPaymentTerm + - value: line_items,tracking_categories,contact,company,employee + name: LineItemsTrackingCategoriesContactCompanyEmployee + - value: >- + line_items,tracking_categories,contact,company,employee,accounting_period + name: LineItemsTrackingCategoriesContactCompanyEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,contact,company,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: line_items,tracking_categories,contact,company,employee,payment_term + name: LineItemsTrackingCategoriesContactCompanyEmployeePaymentTerm + - value: line_items,tracking_categories,contact,company,payment_term + name: LineItemsTrackingCategoriesContactCompanyPaymentTerm + - value: line_items,tracking_categories,contact,employee + name: LineItemsTrackingCategoriesContactEmployee + - value: line_items,tracking_categories,contact,employee,accounting_period + name: LineItemsTrackingCategoriesContactEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,contact,employee,accounting_period,payment_term + name: LineItemsTrackingCategoriesContactEmployeeAccountingPeriodPaymentTerm + - value: line_items,tracking_categories,contact,employee,payment_term + name: LineItemsTrackingCategoriesContactEmployeePaymentTerm + - value: line_items,tracking_categories,contact,payment_term + name: LineItemsTrackingCategoriesContactPaymentTerm + - value: line_items,tracking_categories,employee + name: LineItemsTrackingCategoriesEmployee + - value: line_items,tracking_categories,employee,accounting_period + name: LineItemsTrackingCategoriesEmployeeAccountingPeriod + - value: line_items,tracking_categories,employee,accounting_period,payment_term + name: LineItemsTrackingCategoriesEmployeeAccountingPeriodPaymentTerm + - value: line_items,tracking_categories,employee,payment_term + name: LineItemsTrackingCategoriesEmployeePaymentTerm + - value: line_items,tracking_categories,payment_term + name: LineItemsTrackingCategoriesPaymentTerm + - value: line_items,tracking_categories,purchase_orders + name: LineItemsTrackingCategoriesPurchaseOrders + - value: line_items,tracking_categories,purchase_orders,accounting_period + name: LineItemsTrackingCategoriesPurchaseOrdersAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,accounting_period,payment_term + name: LineItemsTrackingCategoriesPurchaseOrdersAccountingPeriodPaymentTerm + - value: line_items,tracking_categories,purchase_orders,applied_credit_notes + name: LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotes + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCredits + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,company + name: LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompany + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployee + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeePaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,company,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,contact + name: LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContact + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompany + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployee + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployee + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeePaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,employee + name: LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployee + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,employee,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeePaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_credit_notes,payment_term + name: LineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesPaymentTerm + - value: line_items,tracking_categories,purchase_orders,applied_vendor_credits + name: LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCredits + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,company + name: LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompany + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployee + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact + name: LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContact + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompany + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployee + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee + name: LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployee + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeePaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,applied_vendor_credits,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsPaymentTerm + - value: line_items,tracking_categories,purchase_orders,company + name: LineItemsTrackingCategoriesPurchaseOrdersCompany + - value: >- + line_items,tracking_categories,purchase_orders,company,accounting_period + name: LineItemsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,company,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriodPaymentTerm + - value: line_items,tracking_categories,purchase_orders,company,employee + name: LineItemsTrackingCategoriesPurchaseOrdersCompanyEmployee + - value: >- + line_items,tracking_categories,purchase_orders,company,employee,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,company,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,company,employee,payment_term + name: LineItemsTrackingCategoriesPurchaseOrdersCompanyEmployeePaymentTerm + - value: line_items,tracking_categories,purchase_orders,company,payment_term + name: LineItemsTrackingCategoriesPurchaseOrdersCompanyPaymentTerm + - value: line_items,tracking_categories,purchase_orders,contact + name: LineItemsTrackingCategoriesPurchaseOrdersContact + - value: >- + line_items,tracking_categories,purchase_orders,contact,accounting_period + name: LineItemsTrackingCategoriesPurchaseOrdersContactAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,contact,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersContactAccountingPeriodPaymentTerm + - value: line_items,tracking_categories,purchase_orders,contact,company + name: LineItemsTrackingCategoriesPurchaseOrdersContactCompany + - value: >- + line_items,tracking_categories,purchase_orders,contact,company,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,contact,company,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,contact,company,employee + name: LineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployee + - value: >- + line_items,tracking_categories,purchase_orders,contact,company,employee,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,contact,company,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,contact,company,employee,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployeePaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,contact,company,payment_term + name: LineItemsTrackingCategoriesPurchaseOrdersContactCompanyPaymentTerm + - value: line_items,tracking_categories,purchase_orders,contact,employee + name: LineItemsTrackingCategoriesPurchaseOrdersContactEmployee + - value: >- + line_items,tracking_categories,purchase_orders,contact,employee,accounting_period + name: >- + LineItemsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,contact,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,purchase_orders,contact,employee,payment_term + name: LineItemsTrackingCategoriesPurchaseOrdersContactEmployeePaymentTerm + - value: line_items,tracking_categories,purchase_orders,contact,payment_term + name: LineItemsTrackingCategoriesPurchaseOrdersContactPaymentTerm + - value: line_items,tracking_categories,purchase_orders,employee + name: LineItemsTrackingCategoriesPurchaseOrdersEmployee + - value: >- + line_items,tracking_categories,purchase_orders,employee,accounting_period + name: LineItemsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriod + - value: >- + line_items,tracking_categories,purchase_orders,employee,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriodPaymentTerm + - value: line_items,tracking_categories,purchase_orders,employee,payment_term + name: LineItemsTrackingCategoriesPurchaseOrdersEmployeePaymentTerm + - value: line_items,tracking_categories,purchase_orders,payment_term + name: LineItemsTrackingCategoriesPurchaseOrdersPaymentTerm + - payment_term + - payments + - value: payments,accounting_period + name: PaymentsAccountingPeriod + - value: payments,accounting_period,payment_term + name: PaymentsAccountingPeriodPaymentTerm + - value: payments,applied_credit_notes + name: PaymentsAppliedCreditNotes + - value: payments,applied_credit_notes,accounting_period + name: PaymentsAppliedCreditNotesAccountingPeriod + - value: payments,applied_credit_notes,accounting_period,payment_term + name: PaymentsAppliedCreditNotesAccountingPeriodPaymentTerm + - value: payments,applied_credit_notes,applied_vendor_credits + name: PaymentsAppliedCreditNotesAppliedVendorCredits + - value: payments,applied_credit_notes,applied_vendor_credits,accounting_period + name: PaymentsAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + payments,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: payments,applied_credit_notes,applied_vendor_credits,company + name: PaymentsAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + payments,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: PaymentsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: payments,applied_credit_notes,applied_vendor_credits,company,employee + name: PaymentsAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + payments,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,applied_credit_notes,applied_vendor_credits,company,payment_term + name: PaymentsAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: payments,applied_credit_notes,applied_vendor_credits,contact + name: PaymentsAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + payments,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: PaymentsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: payments,applied_credit_notes,applied_vendor_credits,contact,company + name: PaymentsAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + payments,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: PaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: payments,applied_credit_notes,applied_vendor_credits,contact,employee + name: PaymentsAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + payments,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: PaymentsAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: payments,applied_credit_notes,applied_vendor_credits,employee + name: PaymentsAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + payments,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: PaymentsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: PaymentsAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: payments,applied_credit_notes,applied_vendor_credits,payment_term + name: PaymentsAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: payments,applied_credit_notes,company + name: PaymentsAppliedCreditNotesCompany + - value: payments,applied_credit_notes,company,accounting_period + name: PaymentsAppliedCreditNotesCompanyAccountingPeriod + - value: payments,applied_credit_notes,company,accounting_period,payment_term + name: PaymentsAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: payments,applied_credit_notes,company,employee + name: PaymentsAppliedCreditNotesCompanyEmployee + - value: payments,applied_credit_notes,company,employee,accounting_period + name: PaymentsAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_credit_notes,company,employee,accounting_period,payment_term + name: PaymentsAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: payments,applied_credit_notes,company,employee,payment_term + name: PaymentsAppliedCreditNotesCompanyEmployeePaymentTerm + - value: payments,applied_credit_notes,company,payment_term + name: PaymentsAppliedCreditNotesCompanyPaymentTerm + - value: payments,applied_credit_notes,contact + name: PaymentsAppliedCreditNotesContact + - value: payments,applied_credit_notes,contact,accounting_period + name: PaymentsAppliedCreditNotesContactAccountingPeriod + - value: payments,applied_credit_notes,contact,accounting_period,payment_term + name: PaymentsAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: payments,applied_credit_notes,contact,company + name: PaymentsAppliedCreditNotesContactCompany + - value: payments,applied_credit_notes,contact,company,accounting_period + name: PaymentsAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + payments,applied_credit_notes,contact,company,accounting_period,payment_term + name: PaymentsAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: payments,applied_credit_notes,contact,company,employee + name: PaymentsAppliedCreditNotesContactCompanyEmployee + - value: >- + payments,applied_credit_notes,contact,company,employee,accounting_period + name: PaymentsAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: payments,applied_credit_notes,contact,company,employee,payment_term + name: PaymentsAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: payments,applied_credit_notes,contact,company,payment_term + name: PaymentsAppliedCreditNotesContactCompanyPaymentTerm + - value: payments,applied_credit_notes,contact,employee + name: PaymentsAppliedCreditNotesContactEmployee + - value: payments,applied_credit_notes,contact,employee,accounting_period + name: PaymentsAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + payments,applied_credit_notes,contact,employee,accounting_period,payment_term + name: PaymentsAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: payments,applied_credit_notes,contact,employee,payment_term + name: PaymentsAppliedCreditNotesContactEmployeePaymentTerm + - value: payments,applied_credit_notes,contact,payment_term + name: PaymentsAppliedCreditNotesContactPaymentTerm + - value: payments,applied_credit_notes,employee + name: PaymentsAppliedCreditNotesEmployee + - value: payments,applied_credit_notes,employee,accounting_period + name: PaymentsAppliedCreditNotesEmployeeAccountingPeriod + - value: payments,applied_credit_notes,employee,accounting_period,payment_term + name: PaymentsAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: payments,applied_credit_notes,employee,payment_term + name: PaymentsAppliedCreditNotesEmployeePaymentTerm + - value: payments,applied_credit_notes,payment_term + name: PaymentsAppliedCreditNotesPaymentTerm + - value: payments,applied_payments + name: PaymentsAppliedPayments + - value: payments,applied_payments,accounting_period + name: PaymentsAppliedPaymentsAccountingPeriod + - value: payments,applied_payments,accounting_period,payment_term + name: PaymentsAppliedPaymentsAccountingPeriodPaymentTerm + - value: payments,applied_payments,applied_credit_notes + name: PaymentsAppliedPaymentsAppliedCreditNotes + - value: payments,applied_payments,applied_credit_notes,accounting_period + name: PaymentsAppliedPaymentsAppliedCreditNotesAccountingPeriod + - value: >- + payments,applied_payments,applied_credit_notes,accounting_period,payment_term + name: PaymentsAppliedPaymentsAppliedCreditNotesAccountingPeriodPaymentTerm + - value: payments,applied_payments,applied_credit_notes,applied_vendor_credits + name: PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCredits + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,company + name: PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,company,employee + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact + name: PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,company + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,employee + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,employee + name: PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + payments,applied_payments,applied_credit_notes,applied_vendor_credits,payment_term + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: payments,applied_payments,applied_credit_notes,company + name: PaymentsAppliedPaymentsAppliedCreditNotesCompany + - value: >- + payments,applied_payments,applied_credit_notes,company,accounting_period + name: PaymentsAppliedPaymentsAppliedCreditNotesCompanyAccountingPeriod + - value: >- + payments,applied_payments,applied_credit_notes,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: payments,applied_payments,applied_credit_notes,company,employee + name: PaymentsAppliedPaymentsAppliedCreditNotesCompanyEmployee + - value: >- + payments,applied_payments,applied_credit_notes,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,applied_credit_notes,company,employee,payment_term + name: PaymentsAppliedPaymentsAppliedCreditNotesCompanyEmployeePaymentTerm + - value: payments,applied_payments,applied_credit_notes,company,payment_term + name: PaymentsAppliedPaymentsAppliedCreditNotesCompanyPaymentTerm + - value: payments,applied_payments,applied_credit_notes,contact + name: PaymentsAppliedPaymentsAppliedCreditNotesContact + - value: >- + payments,applied_payments,applied_credit_notes,contact,accounting_period + name: PaymentsAppliedPaymentsAppliedCreditNotesContactAccountingPeriod + - value: >- + payments,applied_payments,applied_credit_notes,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: payments,applied_payments,applied_credit_notes,contact,company + name: PaymentsAppliedPaymentsAppliedCreditNotesContactCompany + - value: >- + payments,applied_payments,applied_credit_notes,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,applied_credit_notes,contact,company,employee + name: PaymentsAppliedPaymentsAppliedCreditNotesContactCompanyEmployee + - value: >- + payments,applied_payments,applied_credit_notes,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,applied_credit_notes,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,applied_credit_notes,contact,company,payment_term + name: PaymentsAppliedPaymentsAppliedCreditNotesContactCompanyPaymentTerm + - value: payments,applied_payments,applied_credit_notes,contact,employee + name: PaymentsAppliedPaymentsAppliedCreditNotesContactEmployee + - value: >- + payments,applied_payments,applied_credit_notes,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,applied_credit_notes,contact,employee,payment_term + name: PaymentsAppliedPaymentsAppliedCreditNotesContactEmployeePaymentTerm + - value: payments,applied_payments,applied_credit_notes,contact,payment_term + name: PaymentsAppliedPaymentsAppliedCreditNotesContactPaymentTerm + - value: payments,applied_payments,applied_credit_notes,employee + name: PaymentsAppliedPaymentsAppliedCreditNotesEmployee + - value: >- + payments,applied_payments,applied_credit_notes,employee,accounting_period + name: PaymentsAppliedPaymentsAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + payments,applied_payments,applied_credit_notes,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: payments,applied_payments,applied_credit_notes,employee,payment_term + name: PaymentsAppliedPaymentsAppliedCreditNotesEmployeePaymentTerm + - value: payments,applied_payments,applied_credit_notes,payment_term + name: PaymentsAppliedPaymentsAppliedCreditNotesPaymentTerm + - value: payments,applied_payments,applied_vendor_credits + name: PaymentsAppliedPaymentsAppliedVendorCredits + - value: payments,applied_payments,applied_vendor_credits,accounting_period + name: PaymentsAppliedPaymentsAppliedVendorCreditsAccountingPeriod + - value: >- + payments,applied_payments,applied_vendor_credits,accounting_period,payment_term + name: PaymentsAppliedPaymentsAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: payments,applied_payments,applied_vendor_credits,company + name: PaymentsAppliedPaymentsAppliedVendorCreditsCompany + - value: >- + payments,applied_payments,applied_vendor_credits,company,accounting_period + name: PaymentsAppliedPaymentsAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,applied_payments,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: payments,applied_payments,applied_vendor_credits,company,employee + name: PaymentsAppliedPaymentsAppliedVendorCreditsCompanyEmployee + - value: >- + payments,applied_payments,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,applied_vendor_credits,company,employee,payment_term + name: PaymentsAppliedPaymentsAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: payments,applied_payments,applied_vendor_credits,company,payment_term + name: PaymentsAppliedPaymentsAppliedVendorCreditsCompanyPaymentTerm + - value: payments,applied_payments,applied_vendor_credits,contact + name: PaymentsAppliedPaymentsAppliedVendorCreditsContact + - value: >- + payments,applied_payments,applied_vendor_credits,contact,accounting_period + name: PaymentsAppliedPaymentsAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,applied_payments,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: payments,applied_payments,applied_vendor_credits,contact,company + name: PaymentsAppliedPaymentsAppliedVendorCreditsContactCompany + - value: >- + payments,applied_payments,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,applied_vendor_credits,contact,company,employee + name: PaymentsAppliedPaymentsAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,applied_payments,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,applied_vendor_credits,contact,company,payment_term + name: PaymentsAppliedPaymentsAppliedVendorCreditsContactCompanyPaymentTerm + - value: payments,applied_payments,applied_vendor_credits,contact,employee + name: PaymentsAppliedPaymentsAppliedVendorCreditsContactEmployee + - value: >- + payments,applied_payments,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,applied_vendor_credits,contact,employee,payment_term + name: PaymentsAppliedPaymentsAppliedVendorCreditsContactEmployeePaymentTerm + - value: payments,applied_payments,applied_vendor_credits,contact,payment_term + name: PaymentsAppliedPaymentsAppliedVendorCreditsContactPaymentTerm + - value: payments,applied_payments,applied_vendor_credits,employee + name: PaymentsAppliedPaymentsAppliedVendorCreditsEmployee + - value: >- + payments,applied_payments,applied_vendor_credits,employee,accounting_period + name: PaymentsAppliedPaymentsAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,applied_payments,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: payments,applied_payments,applied_vendor_credits,employee,payment_term + name: PaymentsAppliedPaymentsAppliedVendorCreditsEmployeePaymentTerm + - value: payments,applied_payments,applied_vendor_credits,payment_term + name: PaymentsAppliedPaymentsAppliedVendorCreditsPaymentTerm + - value: payments,applied_payments,company + name: PaymentsAppliedPaymentsCompany + - value: payments,applied_payments,company,accounting_period + name: PaymentsAppliedPaymentsCompanyAccountingPeriod + - value: payments,applied_payments,company,accounting_period,payment_term + name: PaymentsAppliedPaymentsCompanyAccountingPeriodPaymentTerm + - value: payments,applied_payments,company,employee + name: PaymentsAppliedPaymentsCompanyEmployee + - value: payments,applied_payments,company,employee,accounting_period + name: PaymentsAppliedPaymentsCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,company,employee,accounting_period,payment_term + name: PaymentsAppliedPaymentsCompanyEmployeeAccountingPeriodPaymentTerm + - value: payments,applied_payments,company,employee,payment_term + name: PaymentsAppliedPaymentsCompanyEmployeePaymentTerm + - value: payments,applied_payments,company,payment_term + name: PaymentsAppliedPaymentsCompanyPaymentTerm + - value: payments,applied_payments,contact + name: PaymentsAppliedPaymentsContact + - value: payments,applied_payments,contact,accounting_period + name: PaymentsAppliedPaymentsContactAccountingPeriod + - value: payments,applied_payments,contact,accounting_period,payment_term + name: PaymentsAppliedPaymentsContactAccountingPeriodPaymentTerm + - value: payments,applied_payments,contact,company + name: PaymentsAppliedPaymentsContactCompany + - value: payments,applied_payments,contact,company,accounting_period + name: PaymentsAppliedPaymentsContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,contact,company,accounting_period,payment_term + name: PaymentsAppliedPaymentsContactCompanyAccountingPeriodPaymentTerm + - value: payments,applied_payments,contact,company,employee + name: PaymentsAppliedPaymentsContactCompanyEmployee + - value: payments,applied_payments,contact,company,employee,accounting_period + name: PaymentsAppliedPaymentsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: payments,applied_payments,contact,company,employee,payment_term + name: PaymentsAppliedPaymentsContactCompanyEmployeePaymentTerm + - value: payments,applied_payments,contact,company,payment_term + name: PaymentsAppliedPaymentsContactCompanyPaymentTerm + - value: payments,applied_payments,contact,employee + name: PaymentsAppliedPaymentsContactEmployee + - value: payments,applied_payments,contact,employee,accounting_period + name: PaymentsAppliedPaymentsContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,contact,employee,accounting_period,payment_term + name: PaymentsAppliedPaymentsContactEmployeeAccountingPeriodPaymentTerm + - value: payments,applied_payments,contact,employee,payment_term + name: PaymentsAppliedPaymentsContactEmployeePaymentTerm + - value: payments,applied_payments,contact,payment_term + name: PaymentsAppliedPaymentsContactPaymentTerm + - value: payments,applied_payments,employee + name: PaymentsAppliedPaymentsEmployee + - value: payments,applied_payments,employee,accounting_period + name: PaymentsAppliedPaymentsEmployeeAccountingPeriod + - value: payments,applied_payments,employee,accounting_period,payment_term + name: PaymentsAppliedPaymentsEmployeeAccountingPeriodPaymentTerm + - value: payments,applied_payments,employee,payment_term + name: PaymentsAppliedPaymentsEmployeePaymentTerm + - value: payments,applied_payments,line_items + name: PaymentsAppliedPaymentsLineItems + - value: payments,applied_payments,line_items,accounting_period + name: PaymentsAppliedPaymentsLineItemsAccountingPeriod + - value: payments,applied_payments,line_items,accounting_period,payment_term + name: PaymentsAppliedPaymentsLineItemsAccountingPeriodPaymentTerm + - value: payments,applied_payments,line_items,applied_credit_notes + name: PaymentsAppliedPaymentsLineItemsAppliedCreditNotes + - value: >- + payments,applied_payments,line_items,applied_credit_notes,accounting_period + name: PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAccountingPeriod + - value: >- + payments,applied_payments,line_items,applied_credit_notes,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits + name: PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCredits + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company,employee + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,employee + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,employee + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: payments,applied_payments,line_items,applied_credit_notes,company + name: PaymentsAppliedPaymentsLineItemsAppliedCreditNotesCompany + - value: >- + payments,applied_payments,line_items,applied_credit_notes,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,applied_credit_notes,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,company,employee + name: PaymentsAppliedPaymentsLineItemsAppliedCreditNotesCompanyEmployee + - value: >- + payments,applied_payments,line_items,applied_credit_notes,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,company,payment_term + name: PaymentsAppliedPaymentsLineItemsAppliedCreditNotesCompanyPaymentTerm + - value: payments,applied_payments,line_items,applied_credit_notes,contact + name: PaymentsAppliedPaymentsLineItemsAppliedCreditNotesContact + - value: >- + payments,applied_payments,line_items,applied_credit_notes,contact,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactAccountingPeriod + - value: >- + payments,applied_payments,line_items,applied_credit_notes,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,contact,company + name: PaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactCompany + - value: >- + payments,applied_payments,line_items,applied_credit_notes,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,contact,company,employee + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactCompanyEmployee + - value: >- + payments,applied_payments,line_items,applied_credit_notes,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,contact,company,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactCompanyPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,contact,employee + name: PaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactEmployee + - value: >- + payments,applied_payments,line_items,applied_credit_notes,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,contact,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,contact,payment_term + name: PaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactPaymentTerm + - value: payments,applied_payments,line_items,applied_credit_notes,employee + name: PaymentsAppliedPaymentsLineItemsAppliedCreditNotesEmployee + - value: >- + payments,applied_payments,line_items,applied_credit_notes,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,applied_credit_notes,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_credit_notes,employee,payment_term + name: PaymentsAppliedPaymentsLineItemsAppliedCreditNotesEmployeePaymentTerm + - value: payments,applied_payments,line_items,applied_credit_notes,payment_term + name: PaymentsAppliedPaymentsLineItemsAppliedCreditNotesPaymentTerm + - value: payments,applied_payments,line_items,applied_vendor_credits + name: PaymentsAppliedPaymentsLineItemsAppliedVendorCredits + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,accounting_period + name: PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsAccountingPeriod + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: payments,applied_payments,line_items,applied_vendor_credits,company + name: PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsCompany + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,company,employee + name: PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsCompanyEmployee + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,company,payment_term + name: PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsCompanyPaymentTerm + - value: payments,applied_payments,line_items,applied_vendor_credits,contact + name: PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContact + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,contact,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,contact,company + name: PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactCompany + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,contact,company,employee + name: >- + PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,contact,employee + name: PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactEmployee + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,contact,payment_term + name: PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactPaymentTerm + - value: payments,applied_payments,line_items,applied_vendor_credits,employee + name: PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsEmployee + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,applied_vendor_credits,payment_term + name: PaymentsAppliedPaymentsLineItemsAppliedVendorCreditsPaymentTerm + - value: payments,applied_payments,line_items,company + name: PaymentsAppliedPaymentsLineItemsCompany + - value: payments,applied_payments,line_items,company,accounting_period + name: PaymentsAppliedPaymentsLineItemsCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,company,accounting_period,payment_term + name: PaymentsAppliedPaymentsLineItemsCompanyAccountingPeriodPaymentTerm + - value: payments,applied_payments,line_items,company,employee + name: PaymentsAppliedPaymentsLineItemsCompanyEmployee + - value: >- + payments,applied_payments,line_items,company,employee,accounting_period + name: PaymentsAppliedPaymentsLineItemsCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsCompanyEmployeeAccountingPeriodPaymentTerm + - value: payments,applied_payments,line_items,company,employee,payment_term + name: PaymentsAppliedPaymentsLineItemsCompanyEmployeePaymentTerm + - value: payments,applied_payments,line_items,company,payment_term + name: PaymentsAppliedPaymentsLineItemsCompanyPaymentTerm + - value: payments,applied_payments,line_items,contact + name: PaymentsAppliedPaymentsLineItemsContact + - value: payments,applied_payments,line_items,contact,accounting_period + name: PaymentsAppliedPaymentsLineItemsContactAccountingPeriod + - value: >- + payments,applied_payments,line_items,contact,accounting_period,payment_term + name: PaymentsAppliedPaymentsLineItemsContactAccountingPeriodPaymentTerm + - value: payments,applied_payments,line_items,contact,company + name: PaymentsAppliedPaymentsLineItemsContactCompany + - value: payments,applied_payments,line_items,contact,company,accounting_period + name: PaymentsAppliedPaymentsLineItemsContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsContactCompanyAccountingPeriodPaymentTerm + - value: payments,applied_payments,line_items,contact,company,employee + name: PaymentsAppliedPaymentsLineItemsContactCompanyEmployee + - value: >- + payments,applied_payments,line_items,contact,company,employee,accounting_period + name: PaymentsAppliedPaymentsLineItemsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,contact,company,employee,payment_term + name: PaymentsAppliedPaymentsLineItemsContactCompanyEmployeePaymentTerm + - value: payments,applied_payments,line_items,contact,company,payment_term + name: PaymentsAppliedPaymentsLineItemsContactCompanyPaymentTerm + - value: payments,applied_payments,line_items,contact,employee + name: PaymentsAppliedPaymentsLineItemsContactEmployee + - value: >- + payments,applied_payments,line_items,contact,employee,accounting_period + name: PaymentsAppliedPaymentsLineItemsContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsContactEmployeeAccountingPeriodPaymentTerm + - value: payments,applied_payments,line_items,contact,employee,payment_term + name: PaymentsAppliedPaymentsLineItemsContactEmployeePaymentTerm + - value: payments,applied_payments,line_items,contact,payment_term + name: PaymentsAppliedPaymentsLineItemsContactPaymentTerm + - value: payments,applied_payments,line_items,employee + name: PaymentsAppliedPaymentsLineItemsEmployee + - value: payments,applied_payments,line_items,employee,accounting_period + name: PaymentsAppliedPaymentsLineItemsEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,employee,accounting_period,payment_term + name: PaymentsAppliedPaymentsLineItemsEmployeeAccountingPeriodPaymentTerm + - value: payments,applied_payments,line_items,employee,payment_term + name: PaymentsAppliedPaymentsLineItemsEmployeePaymentTerm + - value: payments,applied_payments,line_items,payment_term + name: PaymentsAppliedPaymentsLineItemsPaymentTerm + - value: payments,applied_payments,line_items,purchase_orders + name: PaymentsAppliedPaymentsLineItemsPurchaseOrders + - value: payments,applied_payments,line_items,purchase_orders,accounting_period + name: PaymentsAppliedPaymentsLineItemsPurchaseOrdersAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes + name: PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotes + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCredits + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,company + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompany + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,company,employee + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployee + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,company,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContact + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompany + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company,employee + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployee + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,employee + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactEmployee + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,employee + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesEmployee + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_credit_notes,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits + name: PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCredits + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,company + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompany + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,company,employee + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployee + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,company,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContact + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompany + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company,employee + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,employee + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployee + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,employee + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsEmployee + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsPaymentTerm + - value: payments,applied_payments,line_items,purchase_orders,company + name: PaymentsAppliedPaymentsLineItemsPurchaseOrdersCompany + - value: >- + payments,applied_payments,line_items,purchase_orders,company,accounting_period + name: PaymentsAppliedPaymentsLineItemsPurchaseOrdersCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersCompanyAccountingPeriodPaymentTerm + - value: payments,applied_payments,line_items,purchase_orders,company,employee + name: PaymentsAppliedPaymentsLineItemsPurchaseOrdersCompanyEmployee + - value: >- + payments,applied_payments,line_items,purchase_orders,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,company,payment_term + name: PaymentsAppliedPaymentsLineItemsPurchaseOrdersCompanyPaymentTerm + - value: payments,applied_payments,line_items,purchase_orders,contact + name: PaymentsAppliedPaymentsLineItemsPurchaseOrdersContact + - value: >- + payments,applied_payments,line_items,purchase_orders,contact,accounting_period + name: PaymentsAppliedPaymentsLineItemsPurchaseOrdersContactAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersContactAccountingPeriodPaymentTerm + - value: payments,applied_payments,line_items,purchase_orders,contact,company + name: PaymentsAppliedPaymentsLineItemsPurchaseOrdersContactCompany + - value: >- + payments,applied_payments,line_items,purchase_orders,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,contact,company,employee + name: PaymentsAppliedPaymentsLineItemsPurchaseOrdersContactCompanyEmployee + - value: >- + payments,applied_payments,line_items,purchase_orders,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,contact,company,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersContactCompanyPaymentTerm + - value: payments,applied_payments,line_items,purchase_orders,contact,employee + name: PaymentsAppliedPaymentsLineItemsPurchaseOrdersContactEmployee + - value: >- + payments,applied_payments,line_items,purchase_orders,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,contact,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersContactEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,contact,payment_term + name: PaymentsAppliedPaymentsLineItemsPurchaseOrdersContactPaymentTerm + - value: payments,applied_payments,line_items,purchase_orders,employee + name: PaymentsAppliedPaymentsLineItemsPurchaseOrdersEmployee + - value: >- + payments,applied_payments,line_items,purchase_orders,employee,accounting_period + name: PaymentsAppliedPaymentsLineItemsPurchaseOrdersEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,purchase_orders,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsPurchaseOrdersEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,purchase_orders,employee,payment_term + name: PaymentsAppliedPaymentsLineItemsPurchaseOrdersEmployeePaymentTerm + - value: payments,applied_payments,line_items,purchase_orders,payment_term + name: PaymentsAppliedPaymentsLineItemsPurchaseOrdersPaymentTerm + - value: payments,applied_payments,line_items,tracking_categories + name: PaymentsAppliedPaymentsLineItemsTrackingCategories + - value: >- + payments,applied_payments,line_items,tracking_categories,accounting_period + name: PaymentsAppliedPaymentsLineItemsTrackingCategoriesAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes + name: PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotes + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCredits + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,company + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompany + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,company,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,company,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContact + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompany + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_credit_notes,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits + name: PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCredits + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,company + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompany + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,company,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,company,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContact + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompany + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsPaymentTerm + - value: payments,applied_payments,line_items,tracking_categories,company + name: PaymentsAppliedPaymentsLineItemsTrackingCategoriesCompany + - value: >- + payments,applied_payments,line_items,tracking_categories,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,company,employee + name: PaymentsAppliedPaymentsLineItemsTrackingCategoriesCompanyEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,company,payment_term + name: PaymentsAppliedPaymentsLineItemsTrackingCategoriesCompanyPaymentTerm + - value: payments,applied_payments,line_items,tracking_categories,contact + name: PaymentsAppliedPaymentsLineItemsTrackingCategoriesContact + - value: >- + payments,applied_payments,line_items,tracking_categories,contact,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesContactAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesContactAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,contact,company + name: PaymentsAppliedPaymentsLineItemsTrackingCategoriesContactCompany + - value: >- + payments,applied_payments,line_items,tracking_categories,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,contact,company,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesContactCompanyEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,contact,company,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesContactCompanyPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,contact,employee + name: PaymentsAppliedPaymentsLineItemsTrackingCategoriesContactEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,contact,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesContactEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,contact,payment_term + name: PaymentsAppliedPaymentsLineItemsTrackingCategoriesContactPaymentTerm + - value: payments,applied_payments,line_items,tracking_categories,employee + name: PaymentsAppliedPaymentsLineItemsTrackingCategoriesEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,employee,payment_term + name: PaymentsAppliedPaymentsLineItemsTrackingCategoriesEmployeePaymentTerm + - value: payments,applied_payments,line_items,tracking_categories,payment_term + name: PaymentsAppliedPaymentsLineItemsTrackingCategoriesPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders + name: PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrders + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotes + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCredits + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompany + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContact + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompany + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCredits + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompany + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContact + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompany + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,company + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompany + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,company,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,company,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,contact + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContact + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,company + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompany + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,company,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,company,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,employee + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersEmployee + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,employee,accounting_period + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriod + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,employee,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersEmployeePaymentTerm + - value: >- + payments,applied_payments,line_items,tracking_categories,purchase_orders,payment_term + name: >- + PaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersPaymentTerm + - value: payments,applied_payments,payment_term + name: PaymentsAppliedPaymentsPaymentTerm + - value: payments,applied_payments,purchase_orders + name: PaymentsAppliedPaymentsPurchaseOrders + - value: payments,applied_payments,purchase_orders,accounting_period + name: PaymentsAppliedPaymentsPurchaseOrdersAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,accounting_period,payment_term + name: PaymentsAppliedPaymentsPurchaseOrdersAccountingPeriodPaymentTerm + - value: payments,applied_payments,purchase_orders,applied_credit_notes + name: PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotes + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,accounting_period + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCredits + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,employee + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: payments,applied_payments,purchase_orders,applied_credit_notes,company + name: PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesCompany + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,company,accounting_period + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,company,employee + name: PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesCompanyEmployee + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,company,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesCompanyPaymentTerm + - value: payments,applied_payments,purchase_orders,applied_credit_notes,contact + name: PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContact + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,contact,accounting_period + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,contact,company + name: PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompany + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,contact,company,employee + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyEmployee + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,contact,company,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,contact,employee + name: PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactEmployee + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,contact,employee,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactEmployeePaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,contact,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,employee + name: PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesEmployee + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,employee,accounting_period + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,employee,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesEmployeePaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_credit_notes,payment_term + name: PaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesPaymentTerm + - value: payments,applied_payments,purchase_orders,applied_vendor_credits + name: PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCredits + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,accounting_period + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,company + name: PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompany + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,company,accounting_period + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,company,employee + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompanyEmployee + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,company,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompanyPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,contact + name: PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContact + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,contact,accounting_period + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,contact,company + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompany + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,contact,company,employee + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,contact,employee + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactEmployee + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,contact,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,employee + name: PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsEmployee + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,employee,accounting_period + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,employee,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsEmployeePaymentTerm + - value: >- + payments,applied_payments,purchase_orders,applied_vendor_credits,payment_term + name: PaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsPaymentTerm + - value: payments,applied_payments,purchase_orders,company + name: PaymentsAppliedPaymentsPurchaseOrdersCompany + - value: payments,applied_payments,purchase_orders,company,accounting_period + name: PaymentsAppliedPaymentsPurchaseOrdersCompanyAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersCompanyAccountingPeriodPaymentTerm + - value: payments,applied_payments,purchase_orders,company,employee + name: PaymentsAppliedPaymentsPurchaseOrdersCompanyEmployee + - value: >- + payments,applied_payments,purchase_orders,company,employee,accounting_period + name: PaymentsAppliedPaymentsPurchaseOrdersCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,company,employee,payment_term + name: PaymentsAppliedPaymentsPurchaseOrdersCompanyEmployeePaymentTerm + - value: payments,applied_payments,purchase_orders,company,payment_term + name: PaymentsAppliedPaymentsPurchaseOrdersCompanyPaymentTerm + - value: payments,applied_payments,purchase_orders,contact + name: PaymentsAppliedPaymentsPurchaseOrdersContact + - value: payments,applied_payments,purchase_orders,contact,accounting_period + name: PaymentsAppliedPaymentsPurchaseOrdersContactAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersContactAccountingPeriodPaymentTerm + - value: payments,applied_payments,purchase_orders,contact,company + name: PaymentsAppliedPaymentsPurchaseOrdersContactCompany + - value: >- + payments,applied_payments,purchase_orders,contact,company,accounting_period + name: PaymentsAppliedPaymentsPurchaseOrdersContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersContactCompanyAccountingPeriodPaymentTerm + - value: payments,applied_payments,purchase_orders,contact,company,employee + name: PaymentsAppliedPaymentsPurchaseOrdersContactCompanyEmployee + - value: >- + payments,applied_payments,purchase_orders,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsPurchaseOrdersContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,contact,company,employee,payment_term + name: PaymentsAppliedPaymentsPurchaseOrdersContactCompanyEmployeePaymentTerm + - value: payments,applied_payments,purchase_orders,contact,company,payment_term + name: PaymentsAppliedPaymentsPurchaseOrdersContactCompanyPaymentTerm + - value: payments,applied_payments,purchase_orders,contact,employee + name: PaymentsAppliedPaymentsPurchaseOrdersContactEmployee + - value: >- + payments,applied_payments,purchase_orders,contact,employee,accounting_period + name: PaymentsAppliedPaymentsPurchaseOrdersContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,purchase_orders,contact,employee,payment_term + name: PaymentsAppliedPaymentsPurchaseOrdersContactEmployeePaymentTerm + - value: payments,applied_payments,purchase_orders,contact,payment_term + name: PaymentsAppliedPaymentsPurchaseOrdersContactPaymentTerm + - value: payments,applied_payments,purchase_orders,employee + name: PaymentsAppliedPaymentsPurchaseOrdersEmployee + - value: payments,applied_payments,purchase_orders,employee,accounting_period + name: PaymentsAppliedPaymentsPurchaseOrdersEmployeeAccountingPeriod + - value: >- + payments,applied_payments,purchase_orders,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsPurchaseOrdersEmployeeAccountingPeriodPaymentTerm + - value: payments,applied_payments,purchase_orders,employee,payment_term + name: PaymentsAppliedPaymentsPurchaseOrdersEmployeePaymentTerm + - value: payments,applied_payments,purchase_orders,payment_term + name: PaymentsAppliedPaymentsPurchaseOrdersPaymentTerm + - value: payments,applied_payments,tracking_categories + name: PaymentsAppliedPaymentsTrackingCategories + - value: payments,applied_payments,tracking_categories,accounting_period + name: PaymentsAppliedPaymentsTrackingCategoriesAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,accounting_period,payment_term + name: PaymentsAppliedPaymentsTrackingCategoriesAccountingPeriodPaymentTerm + - value: payments,applied_payments,tracking_categories,applied_credit_notes + name: PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotes + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCredits + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,employee + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,company + name: PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesCompany + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,company,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,company,employee + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesCompanyEmployee + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,company,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesCompanyPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,contact + name: PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContact + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,contact,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,contact,company + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompany + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,contact,company,employee + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyEmployee + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,contact,company,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,contact,employee + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactEmployee + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,contact,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,contact,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,employee + name: PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesEmployee + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_credit_notes,payment_term + name: PaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesPaymentTerm + - value: payments,applied_payments,tracking_categories,applied_vendor_credits + name: PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCredits + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,company + name: PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompany + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,company,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,company,employee + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompanyEmployee + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,company,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,contact + name: PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContact + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,contact,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,contact,company + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompany + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,contact,company,employee + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,contact,employee + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactEmployee + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,contact,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,employee + name: PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsEmployee + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,applied_vendor_credits,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsPaymentTerm + - value: payments,applied_payments,tracking_categories,company + name: PaymentsAppliedPaymentsTrackingCategoriesCompany + - value: >- + payments,applied_payments,tracking_categories,company,accounting_period + name: PaymentsAppliedPaymentsTrackingCategoriesCompanyAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesCompanyAccountingPeriodPaymentTerm + - value: payments,applied_payments,tracking_categories,company,employee + name: PaymentsAppliedPaymentsTrackingCategoriesCompanyEmployee + - value: >- + payments,applied_payments,tracking_categories,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,company,employee,payment_term + name: PaymentsAppliedPaymentsTrackingCategoriesCompanyEmployeePaymentTerm + - value: payments,applied_payments,tracking_categories,company,payment_term + name: PaymentsAppliedPaymentsTrackingCategoriesCompanyPaymentTerm + - value: payments,applied_payments,tracking_categories,contact + name: PaymentsAppliedPaymentsTrackingCategoriesContact + - value: >- + payments,applied_payments,tracking_categories,contact,accounting_period + name: PaymentsAppliedPaymentsTrackingCategoriesContactAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesContactAccountingPeriodPaymentTerm + - value: payments,applied_payments,tracking_categories,contact,company + name: PaymentsAppliedPaymentsTrackingCategoriesContactCompany + - value: >- + payments,applied_payments,tracking_categories,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesContactCompanyAccountingPeriodPaymentTerm + - value: payments,applied_payments,tracking_categories,contact,company,employee + name: PaymentsAppliedPaymentsTrackingCategoriesContactCompanyEmployee + - value: >- + payments,applied_payments,tracking_categories,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,contact,company,payment_term + name: PaymentsAppliedPaymentsTrackingCategoriesContactCompanyPaymentTerm + - value: payments,applied_payments,tracking_categories,contact,employee + name: PaymentsAppliedPaymentsTrackingCategoriesContactEmployee + - value: >- + payments,applied_payments,tracking_categories,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,contact,employee,payment_term + name: PaymentsAppliedPaymentsTrackingCategoriesContactEmployeePaymentTerm + - value: payments,applied_payments,tracking_categories,contact,payment_term + name: PaymentsAppliedPaymentsTrackingCategoriesContactPaymentTerm + - value: payments,applied_payments,tracking_categories,employee + name: PaymentsAppliedPaymentsTrackingCategoriesEmployee + - value: >- + payments,applied_payments,tracking_categories,employee,accounting_period + name: PaymentsAppliedPaymentsTrackingCategoriesEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesEmployeeAccountingPeriodPaymentTerm + - value: payments,applied_payments,tracking_categories,employee,payment_term + name: PaymentsAppliedPaymentsTrackingCategoriesEmployeePaymentTerm + - value: payments,applied_payments,tracking_categories,payment_term + name: PaymentsAppliedPaymentsTrackingCategoriesPaymentTerm + - value: payments,applied_payments,tracking_categories,purchase_orders + name: PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrders + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotes + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCredits + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompany + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company,employee + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployee + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContact + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompany + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployee + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,employee + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployee + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,employee + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployee + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCredits + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompany + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company,employee + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployee + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContact + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompany + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployee + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,employee + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployee + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsPaymentTerm + - value: payments,applied_payments,tracking_categories,purchase_orders,company + name: PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersCompany + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,company,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,company,employee + name: PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersCompanyEmployee + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,company,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersCompanyPaymentTerm + - value: payments,applied_payments,tracking_categories,purchase_orders,contact + name: PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContact + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,contact,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,contact,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,contact,company + name: PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompany + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,contact,company,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,contact,company,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,contact,company,employee + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompanyEmployee + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,contact,company,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,contact,company,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompanyEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,contact,company,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompanyPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,contact,employee + name: PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactEmployee + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,contact,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,contact,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,contact,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,contact,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactPaymentTerm + - value: payments,applied_payments,tracking_categories,purchase_orders,employee + name: PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersEmployee + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,employee,accounting_period + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriod + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,employee,accounting_period,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,employee,payment_term + name: >- + PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersEmployeePaymentTerm + - value: >- + payments,applied_payments,tracking_categories,purchase_orders,payment_term + name: PaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersPaymentTerm + - value: payments,applied_vendor_credits + name: PaymentsAppliedVendorCredits + - value: payments,applied_vendor_credits,accounting_period + name: PaymentsAppliedVendorCreditsAccountingPeriod + - value: payments,applied_vendor_credits,accounting_period,payment_term + name: PaymentsAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: payments,applied_vendor_credits,company + name: PaymentsAppliedVendorCreditsCompany + - value: payments,applied_vendor_credits,company,accounting_period + name: PaymentsAppliedVendorCreditsCompanyAccountingPeriod + - value: payments,applied_vendor_credits,company,accounting_period,payment_term + name: PaymentsAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: payments,applied_vendor_credits,company,employee + name: PaymentsAppliedVendorCreditsCompanyEmployee + - value: payments,applied_vendor_credits,company,employee,accounting_period + name: PaymentsAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_vendor_credits,company,employee,accounting_period,payment_term + name: PaymentsAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: payments,applied_vendor_credits,company,employee,payment_term + name: PaymentsAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: payments,applied_vendor_credits,company,payment_term + name: PaymentsAppliedVendorCreditsCompanyPaymentTerm + - value: payments,applied_vendor_credits,contact + name: PaymentsAppliedVendorCreditsContact + - value: payments,applied_vendor_credits,contact,accounting_period + name: PaymentsAppliedVendorCreditsContactAccountingPeriod + - value: payments,applied_vendor_credits,contact,accounting_period,payment_term + name: PaymentsAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: payments,applied_vendor_credits,contact,company + name: PaymentsAppliedVendorCreditsContactCompany + - value: payments,applied_vendor_credits,contact,company,accounting_period + name: PaymentsAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,applied_vendor_credits,contact,company,accounting_period,payment_term + name: PaymentsAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: payments,applied_vendor_credits,contact,company,employee + name: PaymentsAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,applied_vendor_credits,contact,company,employee,accounting_period + name: PaymentsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: payments,applied_vendor_credits,contact,company,employee,payment_term + name: PaymentsAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: payments,applied_vendor_credits,contact,company,payment_term + name: PaymentsAppliedVendorCreditsContactCompanyPaymentTerm + - value: payments,applied_vendor_credits,contact,employee + name: PaymentsAppliedVendorCreditsContactEmployee + - value: payments,applied_vendor_credits,contact,employee,accounting_period + name: PaymentsAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: PaymentsAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: payments,applied_vendor_credits,contact,employee,payment_term + name: PaymentsAppliedVendorCreditsContactEmployeePaymentTerm + - value: payments,applied_vendor_credits,contact,payment_term + name: PaymentsAppliedVendorCreditsContactPaymentTerm + - value: payments,applied_vendor_credits,employee + name: PaymentsAppliedVendorCreditsEmployee + - value: payments,applied_vendor_credits,employee,accounting_period + name: PaymentsAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,applied_vendor_credits,employee,accounting_period,payment_term + name: PaymentsAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: payments,applied_vendor_credits,employee,payment_term + name: PaymentsAppliedVendorCreditsEmployeePaymentTerm + - value: payments,applied_vendor_credits,payment_term + name: PaymentsAppliedVendorCreditsPaymentTerm + - value: payments,company + name: PaymentsCompany + - value: payments,company,accounting_period + name: PaymentsCompanyAccountingPeriod + - value: payments,company,accounting_period,payment_term + name: PaymentsCompanyAccountingPeriodPaymentTerm + - value: payments,company,employee + name: PaymentsCompanyEmployee + - value: payments,company,employee,accounting_period + name: PaymentsCompanyEmployeeAccountingPeriod + - value: payments,company,employee,accounting_period,payment_term + name: PaymentsCompanyEmployeeAccountingPeriodPaymentTerm + - value: payments,company,employee,payment_term + name: PaymentsCompanyEmployeePaymentTerm + - value: payments,company,payment_term + name: PaymentsCompanyPaymentTerm + - value: payments,contact + name: PaymentsContact + - value: payments,contact,accounting_period + name: PaymentsContactAccountingPeriod + - value: payments,contact,accounting_period,payment_term + name: PaymentsContactAccountingPeriodPaymentTerm + - value: payments,contact,company + name: PaymentsContactCompany + - value: payments,contact,company,accounting_period + name: PaymentsContactCompanyAccountingPeriod + - value: payments,contact,company,accounting_period,payment_term + name: PaymentsContactCompanyAccountingPeriodPaymentTerm + - value: payments,contact,company,employee + name: PaymentsContactCompanyEmployee + - value: payments,contact,company,employee,accounting_period + name: PaymentsContactCompanyEmployeeAccountingPeriod + - value: payments,contact,company,employee,accounting_period,payment_term + name: PaymentsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: payments,contact,company,employee,payment_term + name: PaymentsContactCompanyEmployeePaymentTerm + - value: payments,contact,company,payment_term + name: PaymentsContactCompanyPaymentTerm + - value: payments,contact,employee + name: PaymentsContactEmployee + - value: payments,contact,employee,accounting_period + name: PaymentsContactEmployeeAccountingPeriod + - value: payments,contact,employee,accounting_period,payment_term + name: PaymentsContactEmployeeAccountingPeriodPaymentTerm + - value: payments,contact,employee,payment_term + name: PaymentsContactEmployeePaymentTerm + - value: payments,contact,payment_term + name: PaymentsContactPaymentTerm + - value: payments,employee + name: PaymentsEmployee + - value: payments,employee,accounting_period + name: PaymentsEmployeeAccountingPeriod + - value: payments,employee,accounting_period,payment_term + name: PaymentsEmployeeAccountingPeriodPaymentTerm + - value: payments,employee,payment_term + name: PaymentsEmployeePaymentTerm + - value: payments,line_items + name: PaymentsLineItems + - value: payments,line_items,accounting_period + name: PaymentsLineItemsAccountingPeriod + - value: payments,line_items,accounting_period,payment_term + name: PaymentsLineItemsAccountingPeriodPaymentTerm + - value: payments,line_items,applied_credit_notes + name: PaymentsLineItemsAppliedCreditNotes + - value: payments,line_items,applied_credit_notes,accounting_period + name: PaymentsLineItemsAppliedCreditNotesAccountingPeriod + - value: >- + payments,line_items,applied_credit_notes,accounting_period,payment_term + name: PaymentsLineItemsAppliedCreditNotesAccountingPeriodPaymentTerm + - value: payments,line_items,applied_credit_notes,applied_vendor_credits + name: PaymentsLineItemsAppliedCreditNotesAppliedVendorCredits + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,company + name: PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,company,employee + name: PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,contact + name: PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company + name: PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,contact,employee + name: PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,employee + name: PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + payments,line_items,applied_credit_notes,applied_vendor_credits,payment_term + name: PaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: payments,line_items,applied_credit_notes,company + name: PaymentsLineItemsAppliedCreditNotesCompany + - value: payments,line_items,applied_credit_notes,company,accounting_period + name: PaymentsLineItemsAppliedCreditNotesCompanyAccountingPeriod + - value: >- + payments,line_items,applied_credit_notes,company,accounting_period,payment_term + name: PaymentsLineItemsAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: payments,line_items,applied_credit_notes,company,employee + name: PaymentsLineItemsAppliedCreditNotesCompanyEmployee + - value: >- + payments,line_items,applied_credit_notes,company,employee,accounting_period + name: PaymentsLineItemsAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: payments,line_items,applied_credit_notes,company,employee,payment_term + name: PaymentsLineItemsAppliedCreditNotesCompanyEmployeePaymentTerm + - value: payments,line_items,applied_credit_notes,company,payment_term + name: PaymentsLineItemsAppliedCreditNotesCompanyPaymentTerm + - value: payments,line_items,applied_credit_notes,contact + name: PaymentsLineItemsAppliedCreditNotesContact + - value: payments,line_items,applied_credit_notes,contact,accounting_period + name: PaymentsLineItemsAppliedCreditNotesContactAccountingPeriod + - value: >- + payments,line_items,applied_credit_notes,contact,accounting_period,payment_term + name: PaymentsLineItemsAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: payments,line_items,applied_credit_notes,contact,company + name: PaymentsLineItemsAppliedCreditNotesContactCompany + - value: >- + payments,line_items,applied_credit_notes,contact,company,accounting_period + name: PaymentsLineItemsAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + payments,line_items,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + PaymentsLineItemsAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: payments,line_items,applied_credit_notes,contact,company,employee + name: PaymentsLineItemsAppliedCreditNotesContactCompanyEmployee + - value: >- + payments,line_items,applied_credit_notes,contact,company,employee,accounting_period + name: >- + PaymentsLineItemsAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,applied_credit_notes,contact,company,employee,payment_term + name: PaymentsLineItemsAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: payments,line_items,applied_credit_notes,contact,company,payment_term + name: PaymentsLineItemsAppliedCreditNotesContactCompanyPaymentTerm + - value: payments,line_items,applied_credit_notes,contact,employee + name: PaymentsLineItemsAppliedCreditNotesContactEmployee + - value: >- + payments,line_items,applied_credit_notes,contact,employee,accounting_period + name: PaymentsLineItemsAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + payments,line_items,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: payments,line_items,applied_credit_notes,contact,employee,payment_term + name: PaymentsLineItemsAppliedCreditNotesContactEmployeePaymentTerm + - value: payments,line_items,applied_credit_notes,contact,payment_term + name: PaymentsLineItemsAppliedCreditNotesContactPaymentTerm + - value: payments,line_items,applied_credit_notes,employee + name: PaymentsLineItemsAppliedCreditNotesEmployee + - value: payments,line_items,applied_credit_notes,employee,accounting_period + name: PaymentsLineItemsAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + payments,line_items,applied_credit_notes,employee,accounting_period,payment_term + name: PaymentsLineItemsAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: payments,line_items,applied_credit_notes,employee,payment_term + name: PaymentsLineItemsAppliedCreditNotesEmployeePaymentTerm + - value: payments,line_items,applied_credit_notes,payment_term + name: PaymentsLineItemsAppliedCreditNotesPaymentTerm + - value: payments,line_items,applied_vendor_credits + name: PaymentsLineItemsAppliedVendorCredits + - value: payments,line_items,applied_vendor_credits,accounting_period + name: PaymentsLineItemsAppliedVendorCreditsAccountingPeriod + - value: >- + payments,line_items,applied_vendor_credits,accounting_period,payment_term + name: PaymentsLineItemsAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: payments,line_items,applied_vendor_credits,company + name: PaymentsLineItemsAppliedVendorCreditsCompany + - value: payments,line_items,applied_vendor_credits,company,accounting_period + name: PaymentsLineItemsAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,line_items,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsLineItemsAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: payments,line_items,applied_vendor_credits,company,employee + name: PaymentsLineItemsAppliedVendorCreditsCompanyEmployee + - value: >- + payments,line_items,applied_vendor_credits,company,employee,accounting_period + name: PaymentsLineItemsAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,applied_vendor_credits,company,employee,payment_term + name: PaymentsLineItemsAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: payments,line_items,applied_vendor_credits,company,payment_term + name: PaymentsLineItemsAppliedVendorCreditsCompanyPaymentTerm + - value: payments,line_items,applied_vendor_credits,contact + name: PaymentsLineItemsAppliedVendorCreditsContact + - value: payments,line_items,applied_vendor_credits,contact,accounting_period + name: PaymentsLineItemsAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,line_items,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsLineItemsAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: payments,line_items,applied_vendor_credits,contact,company + name: PaymentsLineItemsAppliedVendorCreditsContactCompany + - value: >- + payments,line_items,applied_vendor_credits,contact,company,accounting_period + name: PaymentsLineItemsAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,line_items,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsLineItemsAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: payments,line_items,applied_vendor_credits,contact,company,employee + name: PaymentsLineItemsAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,line_items,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsLineItemsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,applied_vendor_credits,contact,company,employee,payment_term + name: PaymentsLineItemsAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,line_items,applied_vendor_credits,contact,company,payment_term + name: PaymentsLineItemsAppliedVendorCreditsContactCompanyPaymentTerm + - value: payments,line_items,applied_vendor_credits,contact,employee + name: PaymentsLineItemsAppliedVendorCreditsContactEmployee + - value: >- + payments,line_items,applied_vendor_credits,contact,employee,accounting_period + name: PaymentsLineItemsAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,line_items,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,applied_vendor_credits,contact,employee,payment_term + name: PaymentsLineItemsAppliedVendorCreditsContactEmployeePaymentTerm + - value: payments,line_items,applied_vendor_credits,contact,payment_term + name: PaymentsLineItemsAppliedVendorCreditsContactPaymentTerm + - value: payments,line_items,applied_vendor_credits,employee + name: PaymentsLineItemsAppliedVendorCreditsEmployee + - value: payments,line_items,applied_vendor_credits,employee,accounting_period + name: PaymentsLineItemsAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,line_items,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: payments,line_items,applied_vendor_credits,employee,payment_term + name: PaymentsLineItemsAppliedVendorCreditsEmployeePaymentTerm + - value: payments,line_items,applied_vendor_credits,payment_term + name: PaymentsLineItemsAppliedVendorCreditsPaymentTerm + - value: payments,line_items,company + name: PaymentsLineItemsCompany + - value: payments,line_items,company,accounting_period + name: PaymentsLineItemsCompanyAccountingPeriod + - value: payments,line_items,company,accounting_period,payment_term + name: PaymentsLineItemsCompanyAccountingPeriodPaymentTerm + - value: payments,line_items,company,employee + name: PaymentsLineItemsCompanyEmployee + - value: payments,line_items,company,employee,accounting_period + name: PaymentsLineItemsCompanyEmployeeAccountingPeriod + - value: payments,line_items,company,employee,accounting_period,payment_term + name: PaymentsLineItemsCompanyEmployeeAccountingPeriodPaymentTerm + - value: payments,line_items,company,employee,payment_term + name: PaymentsLineItemsCompanyEmployeePaymentTerm + - value: payments,line_items,company,payment_term + name: PaymentsLineItemsCompanyPaymentTerm + - value: payments,line_items,contact + name: PaymentsLineItemsContact + - value: payments,line_items,contact,accounting_period + name: PaymentsLineItemsContactAccountingPeriod + - value: payments,line_items,contact,accounting_period,payment_term + name: PaymentsLineItemsContactAccountingPeriodPaymentTerm + - value: payments,line_items,contact,company + name: PaymentsLineItemsContactCompany + - value: payments,line_items,contact,company,accounting_period + name: PaymentsLineItemsContactCompanyAccountingPeriod + - value: payments,line_items,contact,company,accounting_period,payment_term + name: PaymentsLineItemsContactCompanyAccountingPeriodPaymentTerm + - value: payments,line_items,contact,company,employee + name: PaymentsLineItemsContactCompanyEmployee + - value: payments,line_items,contact,company,employee,accounting_period + name: PaymentsLineItemsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,contact,company,employee,accounting_period,payment_term + name: PaymentsLineItemsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: payments,line_items,contact,company,employee,payment_term + name: PaymentsLineItemsContactCompanyEmployeePaymentTerm + - value: payments,line_items,contact,company,payment_term + name: PaymentsLineItemsContactCompanyPaymentTerm + - value: payments,line_items,contact,employee + name: PaymentsLineItemsContactEmployee + - value: payments,line_items,contact,employee,accounting_period + name: PaymentsLineItemsContactEmployeeAccountingPeriod + - value: payments,line_items,contact,employee,accounting_period,payment_term + name: PaymentsLineItemsContactEmployeeAccountingPeriodPaymentTerm + - value: payments,line_items,contact,employee,payment_term + name: PaymentsLineItemsContactEmployeePaymentTerm + - value: payments,line_items,contact,payment_term + name: PaymentsLineItemsContactPaymentTerm + - value: payments,line_items,employee + name: PaymentsLineItemsEmployee + - value: payments,line_items,employee,accounting_period + name: PaymentsLineItemsEmployeeAccountingPeriod + - value: payments,line_items,employee,accounting_period,payment_term + name: PaymentsLineItemsEmployeeAccountingPeriodPaymentTerm + - value: payments,line_items,employee,payment_term + name: PaymentsLineItemsEmployeePaymentTerm + - value: payments,line_items,payment_term + name: PaymentsLineItemsPaymentTerm + - value: payments,line_items,purchase_orders + name: PaymentsLineItemsPurchaseOrders + - value: payments,line_items,purchase_orders,accounting_period + name: PaymentsLineItemsPurchaseOrdersAccountingPeriod + - value: payments,line_items,purchase_orders,accounting_period,payment_term + name: PaymentsLineItemsPurchaseOrdersAccountingPeriodPaymentTerm + - value: payments,line_items,purchase_orders,applied_credit_notes + name: PaymentsLineItemsPurchaseOrdersAppliedCreditNotes + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,accounting_period + name: PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAccountingPeriod + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAccountingPeriodPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits + name: PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCredits + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: payments,line_items,purchase_orders,applied_credit_notes,company + name: PaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompany + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,company,accounting_period + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,company,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,company,employee + name: PaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployee + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,company,employee,accounting_period + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,company,employee,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployeePaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,company,payment_term + name: PaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyPaymentTerm + - value: payments,line_items,purchase_orders,applied_credit_notes,contact + name: PaymentsLineItemsPurchaseOrdersAppliedCreditNotesContact + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,contact,accounting_period + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactAccountingPeriod + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,contact,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,contact,company + name: PaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompany + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,contact,company,accounting_period + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,contact,company,employee + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployee + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,contact,company,employee,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,contact,company,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,contact,employee + name: PaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactEmployee + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,contact,employee,accounting_period + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,contact,employee,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactEmployeePaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,contact,payment_term + name: PaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactPaymentTerm + - value: payments,line_items,purchase_orders,applied_credit_notes,employee + name: PaymentsLineItemsPurchaseOrdersAppliedCreditNotesEmployee + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,employee,accounting_period + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_credit_notes,employee,payment_term + name: PaymentsLineItemsPurchaseOrdersAppliedCreditNotesEmployeePaymentTerm + - value: payments,line_items,purchase_orders,applied_credit_notes,payment_term + name: PaymentsLineItemsPurchaseOrdersAppliedCreditNotesPaymentTerm + - value: payments,line_items,purchase_orders,applied_vendor_credits + name: PaymentsLineItemsPurchaseOrdersAppliedVendorCredits + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,accounting_period + name: PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsAccountingPeriod + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: payments,line_items,purchase_orders,applied_vendor_credits,company + name: PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompany + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,company,accounting_period + name: >- + PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,company,employee + name: PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployee + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,company,payment_term + name: PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyPaymentTerm + - value: payments,line_items,purchase_orders,applied_vendor_credits,contact + name: PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContact + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,contact,accounting_period + name: >- + PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,contact,company + name: PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompany + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,contact,company,employee + name: >- + PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,contact,employee + name: PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployee + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,contact,payment_term + name: PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactPaymentTerm + - value: payments,line_items,purchase_orders,applied_vendor_credits,employee + name: PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsEmployee + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,employee,accounting_period + name: >- + PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,employee,payment_term + name: PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsEmployeePaymentTerm + - value: >- + payments,line_items,purchase_orders,applied_vendor_credits,payment_term + name: PaymentsLineItemsPurchaseOrdersAppliedVendorCreditsPaymentTerm + - value: payments,line_items,purchase_orders,company + name: PaymentsLineItemsPurchaseOrdersCompany + - value: payments,line_items,purchase_orders,company,accounting_period + name: PaymentsLineItemsPurchaseOrdersCompanyAccountingPeriod + - value: >- + payments,line_items,purchase_orders,company,accounting_period,payment_term + name: PaymentsLineItemsPurchaseOrdersCompanyAccountingPeriodPaymentTerm + - value: payments,line_items,purchase_orders,company,employee + name: PaymentsLineItemsPurchaseOrdersCompanyEmployee + - value: payments,line_items,purchase_orders,company,employee,accounting_period + name: PaymentsLineItemsPurchaseOrdersCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,purchase_orders,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersCompanyEmployeeAccountingPeriodPaymentTerm + - value: payments,line_items,purchase_orders,company,employee,payment_term + name: PaymentsLineItemsPurchaseOrdersCompanyEmployeePaymentTerm + - value: payments,line_items,purchase_orders,company,payment_term + name: PaymentsLineItemsPurchaseOrdersCompanyPaymentTerm + - value: payments,line_items,purchase_orders,contact + name: PaymentsLineItemsPurchaseOrdersContact + - value: payments,line_items,purchase_orders,contact,accounting_period + name: PaymentsLineItemsPurchaseOrdersContactAccountingPeriod + - value: >- + payments,line_items,purchase_orders,contact,accounting_period,payment_term + name: PaymentsLineItemsPurchaseOrdersContactAccountingPeriodPaymentTerm + - value: payments,line_items,purchase_orders,contact,company + name: PaymentsLineItemsPurchaseOrdersContactCompany + - value: payments,line_items,purchase_orders,contact,company,accounting_period + name: PaymentsLineItemsPurchaseOrdersContactCompanyAccountingPeriod + - value: >- + payments,line_items,purchase_orders,contact,company,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersContactCompanyAccountingPeriodPaymentTerm + - value: payments,line_items,purchase_orders,contact,company,employee + name: PaymentsLineItemsPurchaseOrdersContactCompanyEmployee + - value: >- + payments,line_items,purchase_orders,contact,company,employee,accounting_period + name: PaymentsLineItemsPurchaseOrdersContactCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,purchase_orders,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,purchase_orders,contact,company,employee,payment_term + name: PaymentsLineItemsPurchaseOrdersContactCompanyEmployeePaymentTerm + - value: payments,line_items,purchase_orders,contact,company,payment_term + name: PaymentsLineItemsPurchaseOrdersContactCompanyPaymentTerm + - value: payments,line_items,purchase_orders,contact,employee + name: PaymentsLineItemsPurchaseOrdersContactEmployee + - value: payments,line_items,purchase_orders,contact,employee,accounting_period + name: PaymentsLineItemsPurchaseOrdersContactEmployeeAccountingPeriod + - value: >- + payments,line_items,purchase_orders,contact,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsPurchaseOrdersContactEmployeeAccountingPeriodPaymentTerm + - value: payments,line_items,purchase_orders,contact,employee,payment_term + name: PaymentsLineItemsPurchaseOrdersContactEmployeePaymentTerm + - value: payments,line_items,purchase_orders,contact,payment_term + name: PaymentsLineItemsPurchaseOrdersContactPaymentTerm + - value: payments,line_items,purchase_orders,employee + name: PaymentsLineItemsPurchaseOrdersEmployee + - value: payments,line_items,purchase_orders,employee,accounting_period + name: PaymentsLineItemsPurchaseOrdersEmployeeAccountingPeriod + - value: >- + payments,line_items,purchase_orders,employee,accounting_period,payment_term + name: PaymentsLineItemsPurchaseOrdersEmployeeAccountingPeriodPaymentTerm + - value: payments,line_items,purchase_orders,employee,payment_term + name: PaymentsLineItemsPurchaseOrdersEmployeePaymentTerm + - value: payments,line_items,purchase_orders,payment_term + name: PaymentsLineItemsPurchaseOrdersPaymentTerm + - value: payments,line_items,tracking_categories + name: PaymentsLineItemsTrackingCategories + - value: payments,line_items,tracking_categories,accounting_period + name: PaymentsLineItemsTrackingCategoriesAccountingPeriod + - value: payments,line_items,tracking_categories,accounting_period,payment_term + name: PaymentsLineItemsTrackingCategoriesAccountingPeriodPaymentTerm + - value: payments,line_items,tracking_categories,applied_credit_notes + name: PaymentsLineItemsTrackingCategoriesAppliedCreditNotes + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,accounting_period + name: PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAccountingPeriod + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCredits + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: payments,line_items,tracking_categories,applied_credit_notes,company + name: PaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompany + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,company,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriod + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,company,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,company,employee + name: PaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployee + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,company,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,company,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,company,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyPaymentTerm + - value: payments,line_items,tracking_categories,applied_credit_notes,contact + name: PaymentsLineItemsTrackingCategoriesAppliedCreditNotesContact + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,contact,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactAccountingPeriod + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,contact,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,contact,company + name: PaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompany + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,contact,company,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,contact,company,employee + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployee + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,contact,company,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,contact,company,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,contact,employee + name: PaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactEmployee + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,contact,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,contact,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,contact,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactPaymentTerm + - value: payments,line_items,tracking_categories,applied_credit_notes,employee + name: PaymentsLineItemsTrackingCategoriesAppliedCreditNotesEmployee + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedCreditNotesEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_credit_notes,payment_term + name: PaymentsLineItemsTrackingCategoriesAppliedCreditNotesPaymentTerm + - value: payments,line_items,tracking_categories,applied_vendor_credits + name: PaymentsLineItemsTrackingCategoriesAppliedVendorCredits + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsAccountingPeriod + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: payments,line_items,tracking_categories,applied_vendor_credits,company + name: PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompany + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,company,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,company,employee + name: PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployee + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,company,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyPaymentTerm + - value: payments,line_items,tracking_categories,applied_vendor_credits,contact + name: PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContact + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,contact,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,contact,company + name: PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompany + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,contact,company,employee + name: >- + PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,contact,employee + name: PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployee + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,contact,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,employee + name: PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsEmployee + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,applied_vendor_credits,payment_term + name: PaymentsLineItemsTrackingCategoriesAppliedVendorCreditsPaymentTerm + - value: payments,line_items,tracking_categories,company + name: PaymentsLineItemsTrackingCategoriesCompany + - value: payments,line_items,tracking_categories,company,accounting_period + name: PaymentsLineItemsTrackingCategoriesCompanyAccountingPeriod + - value: >- + payments,line_items,tracking_categories,company,accounting_period,payment_term + name: PaymentsLineItemsTrackingCategoriesCompanyAccountingPeriodPaymentTerm + - value: payments,line_items,tracking_categories,company,employee + name: PaymentsLineItemsTrackingCategoriesCompanyEmployee + - value: >- + payments,line_items,tracking_categories,company,employee,accounting_period + name: PaymentsLineItemsTrackingCategoriesCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesCompanyEmployeeAccountingPeriodPaymentTerm + - value: payments,line_items,tracking_categories,company,employee,payment_term + name: PaymentsLineItemsTrackingCategoriesCompanyEmployeePaymentTerm + - value: payments,line_items,tracking_categories,company,payment_term + name: PaymentsLineItemsTrackingCategoriesCompanyPaymentTerm + - value: payments,line_items,tracking_categories,contact + name: PaymentsLineItemsTrackingCategoriesContact + - value: payments,line_items,tracking_categories,contact,accounting_period + name: PaymentsLineItemsTrackingCategoriesContactAccountingPeriod + - value: >- + payments,line_items,tracking_categories,contact,accounting_period,payment_term + name: PaymentsLineItemsTrackingCategoriesContactAccountingPeriodPaymentTerm + - value: payments,line_items,tracking_categories,contact,company + name: PaymentsLineItemsTrackingCategoriesContactCompany + - value: >- + payments,line_items,tracking_categories,contact,company,accounting_period + name: PaymentsLineItemsTrackingCategoriesContactCompanyAccountingPeriod + - value: >- + payments,line_items,tracking_categories,contact,company,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesContactCompanyAccountingPeriodPaymentTerm + - value: payments,line_items,tracking_categories,contact,company,employee + name: PaymentsLineItemsTrackingCategoriesContactCompanyEmployee + - value: >- + payments,line_items,tracking_categories,contact,company,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesContactCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,contact,company,employee,payment_term + name: PaymentsLineItemsTrackingCategoriesContactCompanyEmployeePaymentTerm + - value: payments,line_items,tracking_categories,contact,company,payment_term + name: PaymentsLineItemsTrackingCategoriesContactCompanyPaymentTerm + - value: payments,line_items,tracking_categories,contact,employee + name: PaymentsLineItemsTrackingCategoriesContactEmployee + - value: >- + payments,line_items,tracking_categories,contact,employee,accounting_period + name: PaymentsLineItemsTrackingCategoriesContactEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,contact,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesContactEmployeeAccountingPeriodPaymentTerm + - value: payments,line_items,tracking_categories,contact,employee,payment_term + name: PaymentsLineItemsTrackingCategoriesContactEmployeePaymentTerm + - value: payments,line_items,tracking_categories,contact,payment_term + name: PaymentsLineItemsTrackingCategoriesContactPaymentTerm + - value: payments,line_items,tracking_categories,employee + name: PaymentsLineItemsTrackingCategoriesEmployee + - value: payments,line_items,tracking_categories,employee,accounting_period + name: PaymentsLineItemsTrackingCategoriesEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,employee,accounting_period,payment_term + name: PaymentsLineItemsTrackingCategoriesEmployeeAccountingPeriodPaymentTerm + - value: payments,line_items,tracking_categories,employee,payment_term + name: PaymentsLineItemsTrackingCategoriesEmployeePaymentTerm + - value: payments,line_items,tracking_categories,payment_term + name: PaymentsLineItemsTrackingCategoriesPaymentTerm + - value: payments,line_items,tracking_categories,purchase_orders + name: PaymentsLineItemsTrackingCategoriesPurchaseOrders + - value: >- + payments,line_items,tracking_categories,purchase_orders,accounting_period + name: PaymentsLineItemsTrackingCategoriesPurchaseOrdersAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes + name: PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotes + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCredits + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompany + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployee + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContact + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompany + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployee + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployee + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,employee + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployee + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits + name: PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCredits + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompany + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployee + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContact + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompany + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployee + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployee + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsPaymentTerm + - value: payments,line_items,tracking_categories,purchase_orders,company + name: PaymentsLineItemsTrackingCategoriesPurchaseOrdersCompany + - value: >- + payments,line_items,tracking_categories,purchase_orders,company,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,company,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,company,employee + name: PaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployee + - value: >- + payments,line_items,tracking_categories,purchase_orders,company,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,company,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,company,payment_term + name: PaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyPaymentTerm + - value: payments,line_items,tracking_categories,purchase_orders,contact + name: PaymentsLineItemsTrackingCategoriesPurchaseOrdersContact + - value: >- + payments,line_items,tracking_categories,purchase_orders,contact,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersContactAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,contact,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersContactAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,contact,company + name: PaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompany + - value: >- + payments,line_items,tracking_categories,purchase_orders,contact,company,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,contact,company,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,contact,company,employee + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployee + - value: >- + payments,line_items,tracking_categories,purchase_orders,contact,company,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,contact,company,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,contact,company,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,contact,employee + name: PaymentsLineItemsTrackingCategoriesPurchaseOrdersContactEmployee + - value: >- + payments,line_items,tracking_categories,purchase_orders,contact,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,contact,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,contact,employee,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersContactEmployeePaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,contact,payment_term + name: PaymentsLineItemsTrackingCategoriesPurchaseOrdersContactPaymentTerm + - value: payments,line_items,tracking_categories,purchase_orders,employee + name: PaymentsLineItemsTrackingCategoriesPurchaseOrdersEmployee + - value: >- + payments,line_items,tracking_categories,purchase_orders,employee,accounting_period + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriod + - value: >- + payments,line_items,tracking_categories,purchase_orders,employee,accounting_period,payment_term + name: >- + PaymentsLineItemsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,line_items,tracking_categories,purchase_orders,employee,payment_term + name: PaymentsLineItemsTrackingCategoriesPurchaseOrdersEmployeePaymentTerm + - value: payments,line_items,tracking_categories,purchase_orders,payment_term + name: PaymentsLineItemsTrackingCategoriesPurchaseOrdersPaymentTerm + - value: payments,payment_term + name: PaymentsPaymentTerm + - value: payments,purchase_orders + name: PaymentsPurchaseOrders + - value: payments,purchase_orders,accounting_period + name: PaymentsPurchaseOrdersAccountingPeriod + - value: payments,purchase_orders,accounting_period,payment_term + name: PaymentsPurchaseOrdersAccountingPeriodPaymentTerm + - value: payments,purchase_orders,applied_credit_notes + name: PaymentsPurchaseOrdersAppliedCreditNotes + - value: payments,purchase_orders,applied_credit_notes,accounting_period + name: PaymentsPurchaseOrdersAppliedCreditNotesAccountingPeriod + - value: >- + payments,purchase_orders,applied_credit_notes,accounting_period,payment_term + name: PaymentsPurchaseOrdersAppliedCreditNotesAccountingPeriodPaymentTerm + - value: payments,purchase_orders,applied_credit_notes,applied_vendor_credits + name: PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCredits + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company + name: PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact + name: PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,employee + name: PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + payments,purchase_orders,applied_credit_notes,applied_vendor_credits,payment_term + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: payments,purchase_orders,applied_credit_notes,company + name: PaymentsPurchaseOrdersAppliedCreditNotesCompany + - value: >- + payments,purchase_orders,applied_credit_notes,company,accounting_period + name: PaymentsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod + - value: >- + payments,purchase_orders,applied_credit_notes,company,accounting_period,payment_term + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: payments,purchase_orders,applied_credit_notes,company,employee + name: PaymentsPurchaseOrdersAppliedCreditNotesCompanyEmployee + - value: >- + payments,purchase_orders,applied_credit_notes,company,employee,accounting_period + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + payments,purchase_orders,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,purchase_orders,applied_credit_notes,company,employee,payment_term + name: PaymentsPurchaseOrdersAppliedCreditNotesCompanyEmployeePaymentTerm + - value: payments,purchase_orders,applied_credit_notes,company,payment_term + name: PaymentsPurchaseOrdersAppliedCreditNotesCompanyPaymentTerm + - value: payments,purchase_orders,applied_credit_notes,contact + name: PaymentsPurchaseOrdersAppliedCreditNotesContact + - value: >- + payments,purchase_orders,applied_credit_notes,contact,accounting_period + name: PaymentsPurchaseOrdersAppliedCreditNotesContactAccountingPeriod + - value: >- + payments,purchase_orders,applied_credit_notes,contact,accounting_period,payment_term + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: payments,purchase_orders,applied_credit_notes,contact,company + name: PaymentsPurchaseOrdersAppliedCreditNotesContactCompany + - value: >- + payments,purchase_orders,applied_credit_notes,contact,company,accounting_period + name: PaymentsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + payments,purchase_orders,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: payments,purchase_orders,applied_credit_notes,contact,company,employee + name: PaymentsPurchaseOrdersAppliedCreditNotesContactCompanyEmployee + - value: >- + payments,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + payments,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,purchase_orders,applied_credit_notes,contact,company,employee,payment_term + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: >- + payments,purchase_orders,applied_credit_notes,contact,company,payment_term + name: PaymentsPurchaseOrdersAppliedCreditNotesContactCompanyPaymentTerm + - value: payments,purchase_orders,applied_credit_notes,contact,employee + name: PaymentsPurchaseOrdersAppliedCreditNotesContactEmployee + - value: >- + payments,purchase_orders,applied_credit_notes,contact,employee,accounting_period + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + payments,purchase_orders,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,purchase_orders,applied_credit_notes,contact,employee,payment_term + name: PaymentsPurchaseOrdersAppliedCreditNotesContactEmployeePaymentTerm + - value: payments,purchase_orders,applied_credit_notes,contact,payment_term + name: PaymentsPurchaseOrdersAppliedCreditNotesContactPaymentTerm + - value: payments,purchase_orders,applied_credit_notes,employee + name: PaymentsPurchaseOrdersAppliedCreditNotesEmployee + - value: >- + payments,purchase_orders,applied_credit_notes,employee,accounting_period + name: PaymentsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + payments,purchase_orders,applied_credit_notes,employee,accounting_period,payment_term + name: >- + PaymentsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: payments,purchase_orders,applied_credit_notes,employee,payment_term + name: PaymentsPurchaseOrdersAppliedCreditNotesEmployeePaymentTerm + - value: payments,purchase_orders,applied_credit_notes,payment_term + name: PaymentsPurchaseOrdersAppliedCreditNotesPaymentTerm + - value: payments,purchase_orders,applied_vendor_credits + name: PaymentsPurchaseOrdersAppliedVendorCredits + - value: payments,purchase_orders,applied_vendor_credits,accounting_period + name: PaymentsPurchaseOrdersAppliedVendorCreditsAccountingPeriod + - value: >- + payments,purchase_orders,applied_vendor_credits,accounting_period,payment_term + name: PaymentsPurchaseOrdersAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: payments,purchase_orders,applied_vendor_credits,company + name: PaymentsPurchaseOrdersAppliedVendorCreditsCompany + - value: >- + payments,purchase_orders,applied_vendor_credits,company,accounting_period + name: PaymentsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,purchase_orders,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: payments,purchase_orders,applied_vendor_credits,company,employee + name: PaymentsPurchaseOrdersAppliedVendorCreditsCompanyEmployee + - value: >- + payments,purchase_orders,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,purchase_orders,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,purchase_orders,applied_vendor_credits,company,employee,payment_term + name: PaymentsPurchaseOrdersAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: payments,purchase_orders,applied_vendor_credits,company,payment_term + name: PaymentsPurchaseOrdersAppliedVendorCreditsCompanyPaymentTerm + - value: payments,purchase_orders,applied_vendor_credits,contact + name: PaymentsPurchaseOrdersAppliedVendorCreditsContact + - value: >- + payments,purchase_orders,applied_vendor_credits,contact,accounting_period + name: PaymentsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,purchase_orders,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: payments,purchase_orders,applied_vendor_credits,contact,company + name: PaymentsPurchaseOrdersAppliedVendorCreditsContactCompany + - value: >- + payments,purchase_orders,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,purchase_orders,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,purchase_orders,applied_vendor_credits,contact,company,employee + name: PaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,purchase_orders,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,purchase_orders,applied_vendor_credits,contact,company,payment_term + name: PaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyPaymentTerm + - value: payments,purchase_orders,applied_vendor_credits,contact,employee + name: PaymentsPurchaseOrdersAppliedVendorCreditsContactEmployee + - value: >- + payments,purchase_orders,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,purchase_orders,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,purchase_orders,applied_vendor_credits,contact,employee,payment_term + name: PaymentsPurchaseOrdersAppliedVendorCreditsContactEmployeePaymentTerm + - value: payments,purchase_orders,applied_vendor_credits,contact,payment_term + name: PaymentsPurchaseOrdersAppliedVendorCreditsContactPaymentTerm + - value: payments,purchase_orders,applied_vendor_credits,employee + name: PaymentsPurchaseOrdersAppliedVendorCreditsEmployee + - value: >- + payments,purchase_orders,applied_vendor_credits,employee,accounting_period + name: PaymentsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,purchase_orders,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: payments,purchase_orders,applied_vendor_credits,employee,payment_term + name: PaymentsPurchaseOrdersAppliedVendorCreditsEmployeePaymentTerm + - value: payments,purchase_orders,applied_vendor_credits,payment_term + name: PaymentsPurchaseOrdersAppliedVendorCreditsPaymentTerm + - value: payments,purchase_orders,company + name: PaymentsPurchaseOrdersCompany + - value: payments,purchase_orders,company,accounting_period + name: PaymentsPurchaseOrdersCompanyAccountingPeriod + - value: payments,purchase_orders,company,accounting_period,payment_term + name: PaymentsPurchaseOrdersCompanyAccountingPeriodPaymentTerm + - value: payments,purchase_orders,company,employee + name: PaymentsPurchaseOrdersCompanyEmployee + - value: payments,purchase_orders,company,employee,accounting_period + name: PaymentsPurchaseOrdersCompanyEmployeeAccountingPeriod + - value: >- + payments,purchase_orders,company,employee,accounting_period,payment_term + name: PaymentsPurchaseOrdersCompanyEmployeeAccountingPeriodPaymentTerm + - value: payments,purchase_orders,company,employee,payment_term + name: PaymentsPurchaseOrdersCompanyEmployeePaymentTerm + - value: payments,purchase_orders,company,payment_term + name: PaymentsPurchaseOrdersCompanyPaymentTerm + - value: payments,purchase_orders,contact + name: PaymentsPurchaseOrdersContact + - value: payments,purchase_orders,contact,accounting_period + name: PaymentsPurchaseOrdersContactAccountingPeriod + - value: payments,purchase_orders,contact,accounting_period,payment_term + name: PaymentsPurchaseOrdersContactAccountingPeriodPaymentTerm + - value: payments,purchase_orders,contact,company + name: PaymentsPurchaseOrdersContactCompany + - value: payments,purchase_orders,contact,company,accounting_period + name: PaymentsPurchaseOrdersContactCompanyAccountingPeriod + - value: >- + payments,purchase_orders,contact,company,accounting_period,payment_term + name: PaymentsPurchaseOrdersContactCompanyAccountingPeriodPaymentTerm + - value: payments,purchase_orders,contact,company,employee + name: PaymentsPurchaseOrdersContactCompanyEmployee + - value: payments,purchase_orders,contact,company,employee,accounting_period + name: PaymentsPurchaseOrdersContactCompanyEmployeeAccountingPeriod + - value: >- + payments,purchase_orders,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsPurchaseOrdersContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: payments,purchase_orders,contact,company,employee,payment_term + name: PaymentsPurchaseOrdersContactCompanyEmployeePaymentTerm + - value: payments,purchase_orders,contact,company,payment_term + name: PaymentsPurchaseOrdersContactCompanyPaymentTerm + - value: payments,purchase_orders,contact,employee + name: PaymentsPurchaseOrdersContactEmployee + - value: payments,purchase_orders,contact,employee,accounting_period + name: PaymentsPurchaseOrdersContactEmployeeAccountingPeriod + - value: >- + payments,purchase_orders,contact,employee,accounting_period,payment_term + name: PaymentsPurchaseOrdersContactEmployeeAccountingPeriodPaymentTerm + - value: payments,purchase_orders,contact,employee,payment_term + name: PaymentsPurchaseOrdersContactEmployeePaymentTerm + - value: payments,purchase_orders,contact,payment_term + name: PaymentsPurchaseOrdersContactPaymentTerm + - value: payments,purchase_orders,employee + name: PaymentsPurchaseOrdersEmployee + - value: payments,purchase_orders,employee,accounting_period + name: PaymentsPurchaseOrdersEmployeeAccountingPeriod + - value: payments,purchase_orders,employee,accounting_period,payment_term + name: PaymentsPurchaseOrdersEmployeeAccountingPeriodPaymentTerm + - value: payments,purchase_orders,employee,payment_term + name: PaymentsPurchaseOrdersEmployeePaymentTerm + - value: payments,purchase_orders,payment_term + name: PaymentsPurchaseOrdersPaymentTerm + - value: payments,tracking_categories + name: PaymentsTrackingCategories + - value: payments,tracking_categories,accounting_period + name: PaymentsTrackingCategoriesAccountingPeriod + - value: payments,tracking_categories,accounting_period,payment_term + name: PaymentsTrackingCategoriesAccountingPeriodPaymentTerm + - value: payments,tracking_categories,applied_credit_notes + name: PaymentsTrackingCategoriesAppliedCreditNotes + - value: payments,tracking_categories,applied_credit_notes,accounting_period + name: PaymentsTrackingCategoriesAppliedCreditNotesAccountingPeriod + - value: >- + payments,tracking_categories,applied_credit_notes,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits + name: PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCredits + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,employee + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + payments,tracking_categories,applied_credit_notes,applied_vendor_credits,payment_term + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: payments,tracking_categories,applied_credit_notes,company + name: PaymentsTrackingCategoriesAppliedCreditNotesCompany + - value: >- + payments,tracking_categories,applied_credit_notes,company,accounting_period + name: PaymentsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriod + - value: >- + payments,tracking_categories,applied_credit_notes,company,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: payments,tracking_categories,applied_credit_notes,company,employee + name: PaymentsTrackingCategoriesAppliedCreditNotesCompanyEmployee + - value: >- + payments,tracking_categories,applied_credit_notes,company,employee,accounting_period + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,applied_credit_notes,company,employee,payment_term + name: PaymentsTrackingCategoriesAppliedCreditNotesCompanyEmployeePaymentTerm + - value: payments,tracking_categories,applied_credit_notes,company,payment_term + name: PaymentsTrackingCategoriesAppliedCreditNotesCompanyPaymentTerm + - value: payments,tracking_categories,applied_credit_notes,contact + name: PaymentsTrackingCategoriesAppliedCreditNotesContact + - value: >- + payments,tracking_categories,applied_credit_notes,contact,accounting_period + name: PaymentsTrackingCategoriesAppliedCreditNotesContactAccountingPeriod + - value: >- + payments,tracking_categories,applied_credit_notes,contact,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: payments,tracking_categories,applied_credit_notes,contact,company + name: PaymentsTrackingCategoriesAppliedCreditNotesContactCompany + - value: >- + payments,tracking_categories,applied_credit_notes,contact,company,accounting_period + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + payments,tracking_categories,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,applied_credit_notes,contact,company,employee + name: PaymentsTrackingCategoriesAppliedCreditNotesContactCompanyEmployee + - value: >- + payments,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,applied_credit_notes,contact,company,employee,payment_term + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: >- + payments,tracking_categories,applied_credit_notes,contact,company,payment_term + name: PaymentsTrackingCategoriesAppliedCreditNotesContactCompanyPaymentTerm + - value: payments,tracking_categories,applied_credit_notes,contact,employee + name: PaymentsTrackingCategoriesAppliedCreditNotesContactEmployee + - value: >- + payments,tracking_categories,applied_credit_notes,contact,employee,accounting_period + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,applied_credit_notes,contact,employee,payment_term + name: PaymentsTrackingCategoriesAppliedCreditNotesContactEmployeePaymentTerm + - value: payments,tracking_categories,applied_credit_notes,contact,payment_term + name: PaymentsTrackingCategoriesAppliedCreditNotesContactPaymentTerm + - value: payments,tracking_categories,applied_credit_notes,employee + name: PaymentsTrackingCategoriesAppliedCreditNotesEmployee + - value: >- + payments,tracking_categories,applied_credit_notes,employee,accounting_period + name: PaymentsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,applied_credit_notes,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,applied_credit_notes,employee,payment_term + name: PaymentsTrackingCategoriesAppliedCreditNotesEmployeePaymentTerm + - value: payments,tracking_categories,applied_credit_notes,payment_term + name: PaymentsTrackingCategoriesAppliedCreditNotesPaymentTerm + - value: payments,tracking_categories,applied_vendor_credits + name: PaymentsTrackingCategoriesAppliedVendorCredits + - value: payments,tracking_categories,applied_vendor_credits,accounting_period + name: PaymentsTrackingCategoriesAppliedVendorCreditsAccountingPeriod + - value: >- + payments,tracking_categories,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: payments,tracking_categories,applied_vendor_credits,company + name: PaymentsTrackingCategoriesAppliedVendorCreditsCompany + - value: >- + payments,tracking_categories,applied_vendor_credits,company,accounting_period + name: PaymentsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,tracking_categories,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: payments,tracking_categories,applied_vendor_credits,company,employee + name: PaymentsTrackingCategoriesAppliedVendorCreditsCompanyEmployee + - value: >- + payments,tracking_categories,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsTrackingCategoriesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,tracking_categories,applied_vendor_credits,company,payment_term + name: PaymentsTrackingCategoriesAppliedVendorCreditsCompanyPaymentTerm + - value: payments,tracking_categories,applied_vendor_credits,contact + name: PaymentsTrackingCategoriesAppliedVendorCreditsContact + - value: >- + payments,tracking_categories,applied_vendor_credits,contact,accounting_period + name: PaymentsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,tracking_categories,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: payments,tracking_categories,applied_vendor_credits,contact,company + name: PaymentsTrackingCategoriesAppliedVendorCreditsContactCompany + - value: >- + payments,tracking_categories,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,tracking_categories,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,applied_vendor_credits,contact,company,employee + name: PaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,tracking_categories,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyPaymentTerm + - value: payments,tracking_categories,applied_vendor_credits,contact,employee + name: PaymentsTrackingCategoriesAppliedVendorCreditsContactEmployee + - value: >- + payments,tracking_categories,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsTrackingCategoriesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,tracking_categories,applied_vendor_credits,contact,payment_term + name: PaymentsTrackingCategoriesAppliedVendorCreditsContactPaymentTerm + - value: payments,tracking_categories,applied_vendor_credits,employee + name: PaymentsTrackingCategoriesAppliedVendorCreditsEmployee + - value: >- + payments,tracking_categories,applied_vendor_credits,employee,accounting_period + name: PaymentsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,applied_vendor_credits,employee,payment_term + name: PaymentsTrackingCategoriesAppliedVendorCreditsEmployeePaymentTerm + - value: payments,tracking_categories,applied_vendor_credits,payment_term + name: PaymentsTrackingCategoriesAppliedVendorCreditsPaymentTerm + - value: payments,tracking_categories,company + name: PaymentsTrackingCategoriesCompany + - value: payments,tracking_categories,company,accounting_period + name: PaymentsTrackingCategoriesCompanyAccountingPeriod + - value: payments,tracking_categories,company,accounting_period,payment_term + name: PaymentsTrackingCategoriesCompanyAccountingPeriodPaymentTerm + - value: payments,tracking_categories,company,employee + name: PaymentsTrackingCategoriesCompanyEmployee + - value: payments,tracking_categories,company,employee,accounting_period + name: PaymentsTrackingCategoriesCompanyEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,company,employee,accounting_period,payment_term + name: PaymentsTrackingCategoriesCompanyEmployeeAccountingPeriodPaymentTerm + - value: payments,tracking_categories,company,employee,payment_term + name: PaymentsTrackingCategoriesCompanyEmployeePaymentTerm + - value: payments,tracking_categories,company,payment_term + name: PaymentsTrackingCategoriesCompanyPaymentTerm + - value: payments,tracking_categories,contact + name: PaymentsTrackingCategoriesContact + - value: payments,tracking_categories,contact,accounting_period + name: PaymentsTrackingCategoriesContactAccountingPeriod + - value: payments,tracking_categories,contact,accounting_period,payment_term + name: PaymentsTrackingCategoriesContactAccountingPeriodPaymentTerm + - value: payments,tracking_categories,contact,company + name: PaymentsTrackingCategoriesContactCompany + - value: payments,tracking_categories,contact,company,accounting_period + name: PaymentsTrackingCategoriesContactCompanyAccountingPeriod + - value: >- + payments,tracking_categories,contact,company,accounting_period,payment_term + name: PaymentsTrackingCategoriesContactCompanyAccountingPeriodPaymentTerm + - value: payments,tracking_categories,contact,company,employee + name: PaymentsTrackingCategoriesContactCompanyEmployee + - value: >- + payments,tracking_categories,contact,company,employee,accounting_period + name: PaymentsTrackingCategoriesContactCompanyEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: payments,tracking_categories,contact,company,employee,payment_term + name: PaymentsTrackingCategoriesContactCompanyEmployeePaymentTerm + - value: payments,tracking_categories,contact,company,payment_term + name: PaymentsTrackingCategoriesContactCompanyPaymentTerm + - value: payments,tracking_categories,contact,employee + name: PaymentsTrackingCategoriesContactEmployee + - value: payments,tracking_categories,contact,employee,accounting_period + name: PaymentsTrackingCategoriesContactEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,contact,employee,accounting_period,payment_term + name: PaymentsTrackingCategoriesContactEmployeeAccountingPeriodPaymentTerm + - value: payments,tracking_categories,contact,employee,payment_term + name: PaymentsTrackingCategoriesContactEmployeePaymentTerm + - value: payments,tracking_categories,contact,payment_term + name: PaymentsTrackingCategoriesContactPaymentTerm + - value: payments,tracking_categories,employee + name: PaymentsTrackingCategoriesEmployee + - value: payments,tracking_categories,employee,accounting_period + name: PaymentsTrackingCategoriesEmployeeAccountingPeriod + - value: payments,tracking_categories,employee,accounting_period,payment_term + name: PaymentsTrackingCategoriesEmployeeAccountingPeriodPaymentTerm + - value: payments,tracking_categories,employee,payment_term + name: PaymentsTrackingCategoriesEmployeePaymentTerm + - value: payments,tracking_categories,payment_term + name: PaymentsTrackingCategoriesPaymentTerm + - value: payments,tracking_categories,purchase_orders + name: PaymentsTrackingCategoriesPurchaseOrders + - value: payments,tracking_categories,purchase_orders,accounting_period + name: PaymentsTrackingCategoriesPurchaseOrdersAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,accounting_period,payment_term + name: PaymentsTrackingCategoriesPurchaseOrdersAccountingPeriodPaymentTerm + - value: payments,tracking_categories,purchase_orders,applied_credit_notes + name: PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotes + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCredits + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,company + name: PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompany + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,company,employee + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployee + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,company,employee,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeePaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,company,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,contact + name: PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContact + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompany + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployee + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,contact,employee + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployee + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeePaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,contact,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,employee + name: PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployee + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,employee,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeePaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_credit_notes,payment_term + name: PaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesPaymentTerm + - value: payments,tracking_categories,purchase_orders,applied_vendor_credits + name: PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCredits + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,company + name: PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompany + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,company,employee + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployee + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,company,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,contact + name: PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContact + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompany + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployee + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,employee + name: PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployee + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,employee,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeePaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,applied_vendor_credits,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsPaymentTerm + - value: payments,tracking_categories,purchase_orders,company + name: PaymentsTrackingCategoriesPurchaseOrdersCompany + - value: payments,tracking_categories,purchase_orders,company,accounting_period + name: PaymentsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,company,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriodPaymentTerm + - value: payments,tracking_categories,purchase_orders,company,employee + name: PaymentsTrackingCategoriesPurchaseOrdersCompanyEmployee + - value: >- + payments,tracking_categories,purchase_orders,company,employee,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,company,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,company,employee,payment_term + name: PaymentsTrackingCategoriesPurchaseOrdersCompanyEmployeePaymentTerm + - value: payments,tracking_categories,purchase_orders,company,payment_term + name: PaymentsTrackingCategoriesPurchaseOrdersCompanyPaymentTerm + - value: payments,tracking_categories,purchase_orders,contact + name: PaymentsTrackingCategoriesPurchaseOrdersContact + - value: payments,tracking_categories,purchase_orders,contact,accounting_period + name: PaymentsTrackingCategoriesPurchaseOrdersContactAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,contact,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersContactAccountingPeriodPaymentTerm + - value: payments,tracking_categories,purchase_orders,contact,company + name: PaymentsTrackingCategoriesPurchaseOrdersContactCompany + - value: >- + payments,tracking_categories,purchase_orders,contact,company,accounting_period + name: PaymentsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,contact,company,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriodPaymentTerm + - value: payments,tracking_categories,purchase_orders,contact,company,employee + name: PaymentsTrackingCategoriesPurchaseOrdersContactCompanyEmployee + - value: >- + payments,tracking_categories,purchase_orders,contact,company,employee,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,contact,company,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,contact,company,employee,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersContactCompanyEmployeePaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,contact,company,payment_term + name: PaymentsTrackingCategoriesPurchaseOrdersContactCompanyPaymentTerm + - value: payments,tracking_categories,purchase_orders,contact,employee + name: PaymentsTrackingCategoriesPurchaseOrdersContactEmployee + - value: >- + payments,tracking_categories,purchase_orders,contact,employee,accounting_period + name: >- + PaymentsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,contact,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriodPaymentTerm + - value: >- + payments,tracking_categories,purchase_orders,contact,employee,payment_term + name: PaymentsTrackingCategoriesPurchaseOrdersContactEmployeePaymentTerm + - value: payments,tracking_categories,purchase_orders,contact,payment_term + name: PaymentsTrackingCategoriesPurchaseOrdersContactPaymentTerm + - value: payments,tracking_categories,purchase_orders,employee + name: PaymentsTrackingCategoriesPurchaseOrdersEmployee + - value: >- + payments,tracking_categories,purchase_orders,employee,accounting_period + name: PaymentsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriod + - value: >- + payments,tracking_categories,purchase_orders,employee,accounting_period,payment_term + name: >- + PaymentsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriodPaymentTerm + - value: payments,tracking_categories,purchase_orders,employee,payment_term + name: PaymentsTrackingCategoriesPurchaseOrdersEmployeePaymentTerm + - value: payments,tracking_categories,purchase_orders,payment_term + name: PaymentsTrackingCategoriesPurchaseOrdersPaymentTerm + - purchase_orders + - value: purchase_orders,accounting_period + name: PurchaseOrdersAccountingPeriod + - value: purchase_orders,accounting_period,payment_term + name: PurchaseOrdersAccountingPeriodPaymentTerm + - value: purchase_orders,applied_credit_notes + name: PurchaseOrdersAppliedCreditNotes + - value: purchase_orders,applied_credit_notes,accounting_period + name: PurchaseOrdersAppliedCreditNotesAccountingPeriod + - value: purchase_orders,applied_credit_notes,accounting_period,payment_term + name: PurchaseOrdersAppliedCreditNotesAccountingPeriodPaymentTerm + - value: purchase_orders,applied_credit_notes,applied_vendor_credits + name: PurchaseOrdersAppliedCreditNotesAppliedVendorCredits + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period + name: PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: purchase_orders,applied_credit_notes,applied_vendor_credits,company + name: PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee + name: PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,company,payment_term + name: PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: purchase_orders,applied_credit_notes,applied_vendor_credits,contact + name: PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company + name: PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee + name: PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: purchase_orders,applied_credit_notes,applied_vendor_credits,employee + name: PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + purchase_orders,applied_credit_notes,applied_vendor_credits,payment_term + name: PurchaseOrdersAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: purchase_orders,applied_credit_notes,company + name: PurchaseOrdersAppliedCreditNotesCompany + - value: purchase_orders,applied_credit_notes,company,accounting_period + name: PurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod + - value: >- + purchase_orders,applied_credit_notes,company,accounting_period,payment_term + name: PurchaseOrdersAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: purchase_orders,applied_credit_notes,company,employee + name: PurchaseOrdersAppliedCreditNotesCompanyEmployee + - value: >- + purchase_orders,applied_credit_notes,company,employee,accounting_period + name: PurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + purchase_orders,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + PurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: purchase_orders,applied_credit_notes,company,employee,payment_term + name: PurchaseOrdersAppliedCreditNotesCompanyEmployeePaymentTerm + - value: purchase_orders,applied_credit_notes,company,payment_term + name: PurchaseOrdersAppliedCreditNotesCompanyPaymentTerm + - value: purchase_orders,applied_credit_notes,contact + name: PurchaseOrdersAppliedCreditNotesContact + - value: purchase_orders,applied_credit_notes,contact,accounting_period + name: PurchaseOrdersAppliedCreditNotesContactAccountingPeriod + - value: >- + purchase_orders,applied_credit_notes,contact,accounting_period,payment_term + name: PurchaseOrdersAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: purchase_orders,applied_credit_notes,contact,company + name: PurchaseOrdersAppliedCreditNotesContactCompany + - value: purchase_orders,applied_credit_notes,contact,company,accounting_period + name: PurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + purchase_orders,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + PurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: purchase_orders,applied_credit_notes,contact,company,employee + name: PurchaseOrdersAppliedCreditNotesContactCompanyEmployee + - value: >- + purchase_orders,applied_credit_notes,contact,company,employee,accounting_period + name: PurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + purchase_orders,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + PurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + purchase_orders,applied_credit_notes,contact,company,employee,payment_term + name: PurchaseOrdersAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: purchase_orders,applied_credit_notes,contact,company,payment_term + name: PurchaseOrdersAppliedCreditNotesContactCompanyPaymentTerm + - value: purchase_orders,applied_credit_notes,contact,employee + name: PurchaseOrdersAppliedCreditNotesContactEmployee + - value: >- + purchase_orders,applied_credit_notes,contact,employee,accounting_period + name: PurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + purchase_orders,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + PurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: purchase_orders,applied_credit_notes,contact,employee,payment_term + name: PurchaseOrdersAppliedCreditNotesContactEmployeePaymentTerm + - value: purchase_orders,applied_credit_notes,contact,payment_term + name: PurchaseOrdersAppliedCreditNotesContactPaymentTerm + - value: purchase_orders,applied_credit_notes,employee + name: PurchaseOrdersAppliedCreditNotesEmployee + - value: purchase_orders,applied_credit_notes,employee,accounting_period + name: PurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + purchase_orders,applied_credit_notes,employee,accounting_period,payment_term + name: PurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: purchase_orders,applied_credit_notes,employee,payment_term + name: PurchaseOrdersAppliedCreditNotesEmployeePaymentTerm + - value: purchase_orders,applied_credit_notes,payment_term + name: PurchaseOrdersAppliedCreditNotesPaymentTerm + - value: purchase_orders,applied_vendor_credits + name: PurchaseOrdersAppliedVendorCredits + - value: purchase_orders,applied_vendor_credits,accounting_period + name: PurchaseOrdersAppliedVendorCreditsAccountingPeriod + - value: purchase_orders,applied_vendor_credits,accounting_period,payment_term + name: PurchaseOrdersAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: purchase_orders,applied_vendor_credits,company + name: PurchaseOrdersAppliedVendorCreditsCompany + - value: purchase_orders,applied_vendor_credits,company,accounting_period + name: PurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + purchase_orders,applied_vendor_credits,company,accounting_period,payment_term + name: PurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: purchase_orders,applied_vendor_credits,company,employee + name: PurchaseOrdersAppliedVendorCreditsCompanyEmployee + - value: >- + purchase_orders,applied_vendor_credits,company,employee,accounting_period + name: PurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + purchase_orders,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + PurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: purchase_orders,applied_vendor_credits,company,employee,payment_term + name: PurchaseOrdersAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: purchase_orders,applied_vendor_credits,company,payment_term + name: PurchaseOrdersAppliedVendorCreditsCompanyPaymentTerm + - value: purchase_orders,applied_vendor_credits,contact + name: PurchaseOrdersAppliedVendorCreditsContact + - value: purchase_orders,applied_vendor_credits,contact,accounting_period + name: PurchaseOrdersAppliedVendorCreditsContactAccountingPeriod + - value: >- + purchase_orders,applied_vendor_credits,contact,accounting_period,payment_term + name: PurchaseOrdersAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: purchase_orders,applied_vendor_credits,contact,company + name: PurchaseOrdersAppliedVendorCreditsContactCompany + - value: >- + purchase_orders,applied_vendor_credits,contact,company,accounting_period + name: PurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + purchase_orders,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + PurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: purchase_orders,applied_vendor_credits,contact,company,employee + name: PurchaseOrdersAppliedVendorCreditsContactCompanyEmployee + - value: >- + purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + PurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + PurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + purchase_orders,applied_vendor_credits,contact,company,employee,payment_term + name: PurchaseOrdersAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: purchase_orders,applied_vendor_credits,contact,company,payment_term + name: PurchaseOrdersAppliedVendorCreditsContactCompanyPaymentTerm + - value: purchase_orders,applied_vendor_credits,contact,employee + name: PurchaseOrdersAppliedVendorCreditsContactEmployee + - value: >- + purchase_orders,applied_vendor_credits,contact,employee,accounting_period + name: PurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + purchase_orders,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + PurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: purchase_orders,applied_vendor_credits,contact,employee,payment_term + name: PurchaseOrdersAppliedVendorCreditsContactEmployeePaymentTerm + - value: purchase_orders,applied_vendor_credits,contact,payment_term + name: PurchaseOrdersAppliedVendorCreditsContactPaymentTerm + - value: purchase_orders,applied_vendor_credits,employee + name: PurchaseOrdersAppliedVendorCreditsEmployee + - value: purchase_orders,applied_vendor_credits,employee,accounting_period + name: PurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + purchase_orders,applied_vendor_credits,employee,accounting_period,payment_term + name: PurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: purchase_orders,applied_vendor_credits,employee,payment_term + name: PurchaseOrdersAppliedVendorCreditsEmployeePaymentTerm + - value: purchase_orders,applied_vendor_credits,payment_term + name: PurchaseOrdersAppliedVendorCreditsPaymentTerm + - value: purchase_orders,company + name: PurchaseOrdersCompany + - value: purchase_orders,company,accounting_period + name: PurchaseOrdersCompanyAccountingPeriod + - value: purchase_orders,company,accounting_period,payment_term + name: PurchaseOrdersCompanyAccountingPeriodPaymentTerm + - value: purchase_orders,company,employee + name: PurchaseOrdersCompanyEmployee + - value: purchase_orders,company,employee,accounting_period + name: PurchaseOrdersCompanyEmployeeAccountingPeriod + - value: purchase_orders,company,employee,accounting_period,payment_term + name: PurchaseOrdersCompanyEmployeeAccountingPeriodPaymentTerm + - value: purchase_orders,company,employee,payment_term + name: PurchaseOrdersCompanyEmployeePaymentTerm + - value: purchase_orders,company,payment_term + name: PurchaseOrdersCompanyPaymentTerm + - value: purchase_orders,contact + name: PurchaseOrdersContact + - value: purchase_orders,contact,accounting_period + name: PurchaseOrdersContactAccountingPeriod + - value: purchase_orders,contact,accounting_period,payment_term + name: PurchaseOrdersContactAccountingPeriodPaymentTerm + - value: purchase_orders,contact,company + name: PurchaseOrdersContactCompany + - value: purchase_orders,contact,company,accounting_period + name: PurchaseOrdersContactCompanyAccountingPeriod + - value: purchase_orders,contact,company,accounting_period,payment_term + name: PurchaseOrdersContactCompanyAccountingPeriodPaymentTerm + - value: purchase_orders,contact,company,employee + name: PurchaseOrdersContactCompanyEmployee + - value: purchase_orders,contact,company,employee,accounting_period + name: PurchaseOrdersContactCompanyEmployeeAccountingPeriod + - value: >- + purchase_orders,contact,company,employee,accounting_period,payment_term + name: PurchaseOrdersContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: purchase_orders,contact,company,employee,payment_term + name: PurchaseOrdersContactCompanyEmployeePaymentTerm + - value: purchase_orders,contact,company,payment_term + name: PurchaseOrdersContactCompanyPaymentTerm + - value: purchase_orders,contact,employee + name: PurchaseOrdersContactEmployee + - value: purchase_orders,contact,employee,accounting_period + name: PurchaseOrdersContactEmployeeAccountingPeriod + - value: purchase_orders,contact,employee,accounting_period,payment_term + name: PurchaseOrdersContactEmployeeAccountingPeriodPaymentTerm + - value: purchase_orders,contact,employee,payment_term + name: PurchaseOrdersContactEmployeePaymentTerm + - value: purchase_orders,contact,payment_term + name: PurchaseOrdersContactPaymentTerm + - value: purchase_orders,employee + name: PurchaseOrdersEmployee + - value: purchase_orders,employee,accounting_period + name: PurchaseOrdersEmployeeAccountingPeriod + - value: purchase_orders,employee,accounting_period,payment_term + name: PurchaseOrdersEmployeeAccountingPeriodPaymentTerm + - value: purchase_orders,employee,payment_term + name: PurchaseOrdersEmployeePaymentTerm + - value: purchase_orders,payment_term + name: PurchaseOrdersPaymentTerm + - tracking_categories + - value: tracking_categories,accounting_period + name: TrackingCategoriesAccountingPeriod + - value: tracking_categories,accounting_period,payment_term + name: TrackingCategoriesAccountingPeriodPaymentTerm + - value: tracking_categories,applied_credit_notes + name: TrackingCategoriesAppliedCreditNotes + - value: tracking_categories,applied_credit_notes,accounting_period + name: TrackingCategoriesAppliedCreditNotesAccountingPeriod + - value: >- + tracking_categories,applied_credit_notes,accounting_period,payment_term + name: TrackingCategoriesAppliedCreditNotesAccountingPeriodPaymentTerm + - value: tracking_categories,applied_credit_notes,applied_vendor_credits + name: TrackingCategoriesAppliedCreditNotesAppliedVendorCredits + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,company + name: TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee + name: >- + TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,contact + name: TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company + name: TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee + name: >- + TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,employee + name: TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + tracking_categories,applied_credit_notes,applied_vendor_credits,payment_term + name: TrackingCategoriesAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: tracking_categories,applied_credit_notes,company + name: TrackingCategoriesAppliedCreditNotesCompany + - value: tracking_categories,applied_credit_notes,company,accounting_period + name: TrackingCategoriesAppliedCreditNotesCompanyAccountingPeriod + - value: >- + tracking_categories,applied_credit_notes,company,accounting_period,payment_term + name: TrackingCategoriesAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: tracking_categories,applied_credit_notes,company,employee + name: TrackingCategoriesAppliedCreditNotesCompanyEmployee + - value: >- + tracking_categories,applied_credit_notes,company,employee,accounting_period + name: TrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + tracking_categories,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + TrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: tracking_categories,applied_credit_notes,company,employee,payment_term + name: TrackingCategoriesAppliedCreditNotesCompanyEmployeePaymentTerm + - value: tracking_categories,applied_credit_notes,company,payment_term + name: TrackingCategoriesAppliedCreditNotesCompanyPaymentTerm + - value: tracking_categories,applied_credit_notes,contact + name: TrackingCategoriesAppliedCreditNotesContact + - value: tracking_categories,applied_credit_notes,contact,accounting_period + name: TrackingCategoriesAppliedCreditNotesContactAccountingPeriod + - value: >- + tracking_categories,applied_credit_notes,contact,accounting_period,payment_term + name: TrackingCategoriesAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: tracking_categories,applied_credit_notes,contact,company + name: TrackingCategoriesAppliedCreditNotesContactCompany + - value: >- + tracking_categories,applied_credit_notes,contact,company,accounting_period + name: TrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + tracking_categories,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + TrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: tracking_categories,applied_credit_notes,contact,company,employee + name: TrackingCategoriesAppliedCreditNotesContactCompanyEmployee + - value: >- + tracking_categories,applied_credit_notes,contact,company,employee,accounting_period + name: >- + TrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + tracking_categories,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + TrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + tracking_categories,applied_credit_notes,contact,company,employee,payment_term + name: TrackingCategoriesAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: tracking_categories,applied_credit_notes,contact,company,payment_term + name: TrackingCategoriesAppliedCreditNotesContactCompanyPaymentTerm + - value: tracking_categories,applied_credit_notes,contact,employee + name: TrackingCategoriesAppliedCreditNotesContactEmployee + - value: >- + tracking_categories,applied_credit_notes,contact,employee,accounting_period + name: TrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + tracking_categories,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + TrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: tracking_categories,applied_credit_notes,contact,employee,payment_term + name: TrackingCategoriesAppliedCreditNotesContactEmployeePaymentTerm + - value: tracking_categories,applied_credit_notes,contact,payment_term + name: TrackingCategoriesAppliedCreditNotesContactPaymentTerm + - value: tracking_categories,applied_credit_notes,employee + name: TrackingCategoriesAppliedCreditNotesEmployee + - value: tracking_categories,applied_credit_notes,employee,accounting_period + name: TrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + tracking_categories,applied_credit_notes,employee,accounting_period,payment_term + name: >- + TrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: tracking_categories,applied_credit_notes,employee,payment_term + name: TrackingCategoriesAppliedCreditNotesEmployeePaymentTerm + - value: tracking_categories,applied_credit_notes,payment_term + name: TrackingCategoriesAppliedCreditNotesPaymentTerm + - value: tracking_categories,applied_vendor_credits + name: TrackingCategoriesAppliedVendorCredits + - value: tracking_categories,applied_vendor_credits,accounting_period + name: TrackingCategoriesAppliedVendorCreditsAccountingPeriod + - value: >- + tracking_categories,applied_vendor_credits,accounting_period,payment_term + name: TrackingCategoriesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: tracking_categories,applied_vendor_credits,company + name: TrackingCategoriesAppliedVendorCreditsCompany + - value: tracking_categories,applied_vendor_credits,company,accounting_period + name: TrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + tracking_categories,applied_vendor_credits,company,accounting_period,payment_term + name: >- + TrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: tracking_categories,applied_vendor_credits,company,employee + name: TrackingCategoriesAppliedVendorCreditsCompanyEmployee + - value: >- + tracking_categories,applied_vendor_credits,company,employee,accounting_period + name: TrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + tracking_categories,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + TrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + tracking_categories,applied_vendor_credits,company,employee,payment_term + name: TrackingCategoriesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: tracking_categories,applied_vendor_credits,company,payment_term + name: TrackingCategoriesAppliedVendorCreditsCompanyPaymentTerm + - value: tracking_categories,applied_vendor_credits,contact + name: TrackingCategoriesAppliedVendorCreditsContact + - value: tracking_categories,applied_vendor_credits,contact,accounting_period + name: TrackingCategoriesAppliedVendorCreditsContactAccountingPeriod + - value: >- + tracking_categories,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + TrackingCategoriesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: tracking_categories,applied_vendor_credits,contact,company + name: TrackingCategoriesAppliedVendorCreditsContactCompany + - value: >- + tracking_categories,applied_vendor_credits,contact,company,accounting_period + name: TrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + tracking_categories,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + TrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: tracking_categories,applied_vendor_credits,contact,company,employee + name: TrackingCategoriesAppliedVendorCreditsContactCompanyEmployee + - value: >- + tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + TrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + TrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + tracking_categories,applied_vendor_credits,contact,company,employee,payment_term + name: >- + TrackingCategoriesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + tracking_categories,applied_vendor_credits,contact,company,payment_term + name: TrackingCategoriesAppliedVendorCreditsContactCompanyPaymentTerm + - value: tracking_categories,applied_vendor_credits,contact,employee + name: TrackingCategoriesAppliedVendorCreditsContactEmployee + - value: >- + tracking_categories,applied_vendor_credits,contact,employee,accounting_period + name: TrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + tracking_categories,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + TrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + tracking_categories,applied_vendor_credits,contact,employee,payment_term + name: TrackingCategoriesAppliedVendorCreditsContactEmployeePaymentTerm + - value: tracking_categories,applied_vendor_credits,contact,payment_term + name: TrackingCategoriesAppliedVendorCreditsContactPaymentTerm + - value: tracking_categories,applied_vendor_credits,employee + name: TrackingCategoriesAppliedVendorCreditsEmployee + - value: tracking_categories,applied_vendor_credits,employee,accounting_period + name: TrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + tracking_categories,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + TrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: tracking_categories,applied_vendor_credits,employee,payment_term + name: TrackingCategoriesAppliedVendorCreditsEmployeePaymentTerm + - value: tracking_categories,applied_vendor_credits,payment_term + name: TrackingCategoriesAppliedVendorCreditsPaymentTerm + - value: tracking_categories,company + name: TrackingCategoriesCompany + - value: tracking_categories,company,accounting_period + name: TrackingCategoriesCompanyAccountingPeriod + - value: tracking_categories,company,accounting_period,payment_term + name: TrackingCategoriesCompanyAccountingPeriodPaymentTerm + - value: tracking_categories,company,employee + name: TrackingCategoriesCompanyEmployee + - value: tracking_categories,company,employee,accounting_period + name: TrackingCategoriesCompanyEmployeeAccountingPeriod + - value: tracking_categories,company,employee,accounting_period,payment_term + name: TrackingCategoriesCompanyEmployeeAccountingPeriodPaymentTerm + - value: tracking_categories,company,employee,payment_term + name: TrackingCategoriesCompanyEmployeePaymentTerm + - value: tracking_categories,company,payment_term + name: TrackingCategoriesCompanyPaymentTerm + - value: tracking_categories,contact + name: TrackingCategoriesContact + - value: tracking_categories,contact,accounting_period + name: TrackingCategoriesContactAccountingPeriod + - value: tracking_categories,contact,accounting_period,payment_term + name: TrackingCategoriesContactAccountingPeriodPaymentTerm + - value: tracking_categories,contact,company + name: TrackingCategoriesContactCompany + - value: tracking_categories,contact,company,accounting_period + name: TrackingCategoriesContactCompanyAccountingPeriod + - value: tracking_categories,contact,company,accounting_period,payment_term + name: TrackingCategoriesContactCompanyAccountingPeriodPaymentTerm + - value: tracking_categories,contact,company,employee + name: TrackingCategoriesContactCompanyEmployee + - value: tracking_categories,contact,company,employee,accounting_period + name: TrackingCategoriesContactCompanyEmployeeAccountingPeriod + - value: >- + tracking_categories,contact,company,employee,accounting_period,payment_term + name: TrackingCategoriesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: tracking_categories,contact,company,employee,payment_term + name: TrackingCategoriesContactCompanyEmployeePaymentTerm + - value: tracking_categories,contact,company,payment_term + name: TrackingCategoriesContactCompanyPaymentTerm + - value: tracking_categories,contact,employee + name: TrackingCategoriesContactEmployee + - value: tracking_categories,contact,employee,accounting_period + name: TrackingCategoriesContactEmployeeAccountingPeriod + - value: tracking_categories,contact,employee,accounting_period,payment_term + name: TrackingCategoriesContactEmployeeAccountingPeriodPaymentTerm + - value: tracking_categories,contact,employee,payment_term + name: TrackingCategoriesContactEmployeePaymentTerm + - value: tracking_categories,contact,payment_term + name: TrackingCategoriesContactPaymentTerm + - value: tracking_categories,employee + name: TrackingCategoriesEmployee + - value: tracking_categories,employee,accounting_period + name: TrackingCategoriesEmployeeAccountingPeriod + - value: tracking_categories,employee,accounting_period,payment_term + name: TrackingCategoriesEmployeeAccountingPeriodPaymentTerm + - value: tracking_categories,employee,payment_term + name: TrackingCategoriesEmployeePaymentTerm + - value: tracking_categories,payment_term + name: TrackingCategoriesPaymentTerm + - value: tracking_categories,purchase_orders + name: TrackingCategoriesPurchaseOrders + - value: tracking_categories,purchase_orders,accounting_period + name: TrackingCategoriesPurchaseOrdersAccountingPeriod + - value: tracking_categories,purchase_orders,accounting_period,payment_term + name: TrackingCategoriesPurchaseOrdersAccountingPeriodPaymentTerm + - value: tracking_categories,purchase_orders,applied_credit_notes + name: TrackingCategoriesPurchaseOrdersAppliedCreditNotes + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,accounting_period + name: TrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriod + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriodPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits + name: TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCredits + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeePaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsPaymentTerm + - value: tracking_categories,purchase_orders,applied_credit_notes,company + name: TrackingCategoriesPurchaseOrdersAppliedCreditNotesCompany + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriodPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,company,employee + name: TrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployee + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,company,employee,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeePaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,company,payment_term + name: TrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyPaymentTerm + - value: tracking_categories,purchase_orders,applied_credit_notes,contact + name: TrackingCategoriesPurchaseOrdersAppliedCreditNotesContact + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriod + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriodPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,contact,company + name: TrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompany + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriodPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployee + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeePaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,contact,company,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,contact,employee + name: TrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployee + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriodPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,contact,employee,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeePaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,contact,payment_term + name: TrackingCategoriesPurchaseOrdersAppliedCreditNotesContactPaymentTerm + - value: tracking_categories,purchase_orders,applied_credit_notes,employee + name: TrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployee + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriodPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_credit_notes,employee,payment_term + name: TrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeePaymentTerm + - value: tracking_categories,purchase_orders,applied_credit_notes,payment_term + name: TrackingCategoriesPurchaseOrdersAppliedCreditNotesPaymentTerm + - value: tracking_categories,purchase_orders,applied_vendor_credits + name: TrackingCategoriesPurchaseOrdersAppliedVendorCredits + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,accounting_period + name: TrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriod + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriodPaymentTerm + - value: tracking_categories,purchase_orders,applied_vendor_credits,company + name: TrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompany + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period + name: >- + TrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriodPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,company,employee + name: TrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployee + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period + name: >- + TrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,company,employee,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeePaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,company,payment_term + name: TrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyPaymentTerm + - value: tracking_categories,purchase_orders,applied_vendor_credits,contact + name: TrackingCategoriesPurchaseOrdersAppliedVendorCreditsContact + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period + name: >- + TrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriodPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,contact,company + name: TrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompany + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period + name: >- + TrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriodPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee + name: >- + TrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period + name: >- + TrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeePaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,contact,company,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,contact,employee + name: TrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployee + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period + name: >- + TrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriodPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeePaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,contact,payment_term + name: TrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactPaymentTerm + - value: tracking_categories,purchase_orders,applied_vendor_credits,employee + name: TrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployee + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period + name: >- + TrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriodPaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,employee,payment_term + name: >- + TrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeePaymentTerm + - value: >- + tracking_categories,purchase_orders,applied_vendor_credits,payment_term + name: TrackingCategoriesPurchaseOrdersAppliedVendorCreditsPaymentTerm + - value: tracking_categories,purchase_orders,company + name: TrackingCategoriesPurchaseOrdersCompany + - value: tracking_categories,purchase_orders,company,accounting_period + name: TrackingCategoriesPurchaseOrdersCompanyAccountingPeriod + - value: >- + tracking_categories,purchase_orders,company,accounting_period,payment_term + name: TrackingCategoriesPurchaseOrdersCompanyAccountingPeriodPaymentTerm + - value: tracking_categories,purchase_orders,company,employee + name: TrackingCategoriesPurchaseOrdersCompanyEmployee + - value: tracking_categories,purchase_orders,company,employee,accounting_period + name: TrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriod + - value: >- + tracking_categories,purchase_orders,company,employee,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriodPaymentTerm + - value: tracking_categories,purchase_orders,company,employee,payment_term + name: TrackingCategoriesPurchaseOrdersCompanyEmployeePaymentTerm + - value: tracking_categories,purchase_orders,company,payment_term + name: TrackingCategoriesPurchaseOrdersCompanyPaymentTerm + - value: tracking_categories,purchase_orders,contact + name: TrackingCategoriesPurchaseOrdersContact + - value: tracking_categories,purchase_orders,contact,accounting_period + name: TrackingCategoriesPurchaseOrdersContactAccountingPeriod + - value: >- + tracking_categories,purchase_orders,contact,accounting_period,payment_term + name: TrackingCategoriesPurchaseOrdersContactAccountingPeriodPaymentTerm + - value: tracking_categories,purchase_orders,contact,company + name: TrackingCategoriesPurchaseOrdersContactCompany + - value: tracking_categories,purchase_orders,contact,company,accounting_period + name: TrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriod + - value: >- + tracking_categories,purchase_orders,contact,company,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriodPaymentTerm + - value: tracking_categories,purchase_orders,contact,company,employee + name: TrackingCategoriesPurchaseOrdersContactCompanyEmployee + - value: >- + tracking_categories,purchase_orders,contact,company,employee,accounting_period + name: TrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriod + - value: >- + tracking_categories,purchase_orders,contact,company,employee,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriodPaymentTerm + - value: >- + tracking_categories,purchase_orders,contact,company,employee,payment_term + name: TrackingCategoriesPurchaseOrdersContactCompanyEmployeePaymentTerm + - value: tracking_categories,purchase_orders,contact,company,payment_term + name: TrackingCategoriesPurchaseOrdersContactCompanyPaymentTerm + - value: tracking_categories,purchase_orders,contact,employee + name: TrackingCategoriesPurchaseOrdersContactEmployee + - value: tracking_categories,purchase_orders,contact,employee,accounting_period + name: TrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriod + - value: >- + tracking_categories,purchase_orders,contact,employee,accounting_period,payment_term + name: >- + TrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriodPaymentTerm + - value: tracking_categories,purchase_orders,contact,employee,payment_term + name: TrackingCategoriesPurchaseOrdersContactEmployeePaymentTerm + - value: tracking_categories,purchase_orders,contact,payment_term + name: TrackingCategoriesPurchaseOrdersContactPaymentTerm + - value: tracking_categories,purchase_orders,employee + name: TrackingCategoriesPurchaseOrdersEmployee + - value: tracking_categories,purchase_orders,employee,accounting_period + name: TrackingCategoriesPurchaseOrdersEmployeeAccountingPeriod + - value: >- + tracking_categories,purchase_orders,employee,accounting_period,payment_term + name: TrackingCategoriesPurchaseOrdersEmployeeAccountingPeriodPaymentTerm + - value: tracking_categories,purchase_orders,employee,payment_term + name: TrackingCategoriesPurchaseOrdersEmployeePaymentTerm + - value: tracking_categories,purchase_orders,payment_term + name: TrackingCategoriesPurchaseOrdersPaymentTerm + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/invoices + method: GET + auth: true + docs: Returns a list of `Invoice` objects. + source: + openapi: openapi/openapi.yml + request: + name: InvoicesListRequest + query-parameters: + company_id: + type: optional + docs: If provided, will only return invoices for this company. + contact_id: + type: optional + docs: If provided, will only return invoices for this contact. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + issue_date_after: + type: optional + docs: If provided, will only return objects created after this datetime. + issue_date_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + number: + type: optional + docs: If provided, will only return Invoices with this number. + page_size: + type: optional + docs: Number of results to return per page. + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + remote_id: + type: optional + docs: The API provider's ID for the given object. + show_enum_origins: + type: optional> + docs: >- + 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: + type: optional + docs: |- + If provided, will only return Invoices with this status. + + * `PAID` - PAID + * `DRAFT` - DRAFT + * `SUBMITTED` - SUBMITTED + * `PARTIALLY_PAID` - PARTIALLY_PAID + * `OPEN` - OPEN + * `VOID` - VOID + type: + type: optional + docs: |- + If provided, will only return Invoices with this type. + + * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE + * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE + response: + docs: '' + type: root.PaginatedInvoiceList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 9871b4a9-f5d2-4f3b-a66b-dfedbed42c46 + remote_id: '990110' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + type: ACCOUNTS_RECEIVABLE + contact: contact + number: AIQ12546 + issue_date: '2020-03-31T00:00:00Z' + due_date: '2020-04-15T00:00:00Z' + paid_on_date: '2020-04-01T00:00:00Z' + memo: Weekly Payment + company: company + employee: employee + currency: XUA + exchange_rate: '2.9' + payment_term: payment_term + total_discount: 1.1 + sub_total: 100 + status: PAID + total_tax_amount: 5 + total_amount: 105 + balance: 105 + remote_updated_at: '2020-04-01T00:00:00Z' + tracking_categories: + - 7dc5ca17-d311-44cd-9ce0-333080367a18 + - 6aa0700c-48e1-4c4a-8162-02e6a582df05 + - 8c933d61-8f5b-4360-ac0c-c9dc87bee763 + accounting_period: accounting_period + purchase_orders: + - e7378d8f-3992-4c2a-8417-ebdc4f2bfeb7 + - dd70ca2f-b120-46fa-889a-9604037f45fd + - 889b281d-739c-4759-95b8-0aedb3947131 + payments: + - b26fd49a-cbae-470a-a8f8-bcbc119e0390 + applied_payments: + - 9017594e-dc33-4113-a5d2-b0f928e34fdd + line_items: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '8765432' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + description: Pickleball lessons + unit_price: 50 + quantity: 1 + total_amount: 50 + employee: 7442f0d5-722d-45bd-b807-6e38489d37fe + project: 22e65a5d-2df5-4e6e-884a-e538d0339000 + contact: 908934-49j9-093f-0989-908923908 + currency: USD + exchange_rate: '2.9' + item: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + account: cd0f32d4-a493-11ec-b909-0242ac120002 + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + applied_credit_notes: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + credit_note: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + applied_date: '2020-03-31T00:00:00Z' + applied_amount: '2.9' + applied_vendor_credits: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + vendor_credit: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + applied_date: '2020-03-31T00:00:00Z' + applied_amount: '2.9' + inclusive_of_tax: true + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + create: + path: /accounting/v1/invoices + method: POST + auth: true + docs: |- + Creates an `Invoice` object with the given values. + Including a `PurchaseOrder` id in the `purchase_orders` property will generate an Accounts Payable Invoice from the specified Purchase Order(s). + + source: + openapi: openapi/openapi.yml + request: + name: InvoiceEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: root.InvoiceRequest + content-type: application/json + response: + docs: '' + type: root.InvoiceResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: 9871b4a9-f5d2-4f3b-a66b-dfedbed42c46 + remote_id: '990110' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + type: ACCOUNTS_RECEIVABLE + contact: contact + number: AIQ12546 + issue_date: '2020-03-31T00:00:00Z' + due_date: '2020-04-15T00:00:00Z' + paid_on_date: '2020-04-01T00:00:00Z' + memo: Weekly Payment + company: company + employee: employee + currency: XUA + exchange_rate: '2.9' + payment_term: payment_term + total_discount: 1.1 + sub_total: 100 + status: PAID + total_tax_amount: 5 + total_amount: 105 + balance: 105 + remote_updated_at: '2020-04-01T00:00:00Z' + tracking_categories: + - 7dc5ca17-d311-44cd-9ce0-333080367a18 + - 6aa0700c-48e1-4c4a-8162-02e6a582df05 + - 8c933d61-8f5b-4360-ac0c-c9dc87bee763 + accounting_period: accounting_period + purchase_orders: + - e7378d8f-3992-4c2a-8417-ebdc4f2bfeb7 + - dd70ca2f-b120-46fa-889a-9604037f45fd + - 889b281d-739c-4759-95b8-0aedb3947131 + payments: + - b26fd49a-cbae-470a-a8f8-bcbc119e0390 + applied_payments: + - 9017594e-dc33-4113-a5d2-b0f928e34fdd + line_items: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '8765432' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + description: Pickleball lessons + unit_price: 50 + quantity: 1 + total_amount: 50 + employee: 7442f0d5-722d-45bd-b807-6e38489d37fe + project: 22e65a5d-2df5-4e6e-884a-e538d0339000 + contact: 908934-49j9-093f-0989-908923908 + currency: USD + exchange_rate: '2.9' + item: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + account: cd0f32d4-a493-11ec-b909-0242ac120002 + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + applied_credit_notes: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + credit_note: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + applied_date: '2020-03-31T00:00:00Z' + applied_amount: '2.9' + applied_vendor_credits: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + vendor_credit: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + applied_date: '2020-03-31T00:00:00Z' + applied_amount: '2.9' + inclusive_of_tax: true + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /accounting/v1/invoices/{id} + method: GET + auth: true + docs: Returns an `Invoice` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: InvoicesRetrieveRequest + query-parameters: + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: root.Invoice + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 9871b4a9-f5d2-4f3b-a66b-dfedbed42c46 + remote_id: '990110' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + type: ACCOUNTS_RECEIVABLE + contact: contact + number: AIQ12546 + issue_date: '2020-03-31T00:00:00Z' + due_date: '2020-04-15T00:00:00Z' + paid_on_date: '2020-04-01T00:00:00Z' + memo: Weekly Payment + company: company + employee: employee + currency: XUA + exchange_rate: '2.9' + payment_term: payment_term + total_discount: 1.1 + sub_total: 100 + status: PAID + total_tax_amount: 5 + total_amount: 105 + balance: 105 + remote_updated_at: '2020-04-01T00:00:00Z' + tracking_categories: + - 7dc5ca17-d311-44cd-9ce0-333080367a18 + - 6aa0700c-48e1-4c4a-8162-02e6a582df05 + - 8c933d61-8f5b-4360-ac0c-c9dc87bee763 + accounting_period: accounting_period + purchase_orders: + - e7378d8f-3992-4c2a-8417-ebdc4f2bfeb7 + - dd70ca2f-b120-46fa-889a-9604037f45fd + - 889b281d-739c-4759-95b8-0aedb3947131 + payments: + - b26fd49a-cbae-470a-a8f8-bcbc119e0390 + applied_payments: + - 9017594e-dc33-4113-a5d2-b0f928e34fdd + line_items: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '8765432' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + description: Pickleball lessons + unit_price: 50 + quantity: 1 + total_amount: 50 + employee: 7442f0d5-722d-45bd-b807-6e38489d37fe + project: 22e65a5d-2df5-4e6e-884a-e538d0339000 + contact: 908934-49j9-093f-0989-908923908 + currency: USD + exchange_rate: '2.9' + item: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + account: cd0f32d4-a493-11ec-b909-0242ac120002 + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + tracking_category: tracking_category + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_fields: + - remote_field_class: remote_field_class + applied_credit_notes: + - remote_id: '088899' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + credit_note: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + applied_date: '2020-03-31T00:00:00Z' + applied_amount: '2.9' + remote_was_deleted: true + applied_vendor_credits: + - remote_id: '088899' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + vendor_credit: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + applied_date: '2020-03-31T00:00:00Z' + applied_amount: '2.9' + remote_was_deleted: true + inclusive_of_tax: true + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + value: + key: value + partialUpdate: + path: /accounting/v1/invoices/{id} + method: PATCH + auth: true + docs: Updates an `Invoice` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: PatchedInvoiceEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: root.InvoiceRequest + content-type: application/json + response: + docs: '' + type: root.InvoiceResponse + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + request: + model: {} + response: + body: + model: + id: 9871b4a9-f5d2-4f3b-a66b-dfedbed42c46 + remote_id: '990110' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + type: ACCOUNTS_RECEIVABLE + contact: contact + number: AIQ12546 + issue_date: '2020-03-31T00:00:00Z' + due_date: '2020-04-15T00:00:00Z' + paid_on_date: '2020-04-01T00:00:00Z' + memo: Weekly Payment + company: company + employee: employee + currency: XUA + exchange_rate: '2.9' + payment_term: payment_term + total_discount: 1.1 + sub_total: 100 + status: PAID + total_tax_amount: 5 + total_amount: 105 + balance: 105 + remote_updated_at: '2020-04-01T00:00:00Z' + tracking_categories: + - 7dc5ca17-d311-44cd-9ce0-333080367a18 + - 6aa0700c-48e1-4c4a-8162-02e6a582df05 + - 8c933d61-8f5b-4360-ac0c-c9dc87bee763 + accounting_period: accounting_period + purchase_orders: + - e7378d8f-3992-4c2a-8417-ebdc4f2bfeb7 + - dd70ca2f-b120-46fa-889a-9604037f45fd + - 889b281d-739c-4759-95b8-0aedb3947131 + payments: + - b26fd49a-cbae-470a-a8f8-bcbc119e0390 + applied_payments: + - 9017594e-dc33-4113-a5d2-b0f928e34fdd + line_items: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '8765432' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + description: Pickleball lessons + unit_price: 50 + quantity: 1 + total_amount: 50 + employee: 7442f0d5-722d-45bd-b807-6e38489d37fe + project: 22e65a5d-2df5-4e6e-884a-e538d0339000 + contact: 908934-49j9-093f-0989-908923908 + currency: USD + exchange_rate: '2.9' + item: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + account: cd0f32d4-a493-11ec-b909-0242ac120002 + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + applied_credit_notes: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + credit_note: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + applied_date: '2020-03-31T00:00:00Z' + applied_amount: '2.9' + applied_vendor_credits: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + vendor_credit: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + applied_date: '2020-03-31T00:00:00Z' + applied_amount: '2.9' + inclusive_of_tax: true + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + lineItemsRemoteFieldClassesList: + path: /accounting/v1/invoices/line-items/remote-field-classes + method: GET + auth: true + docs: Returns a list of `RemoteFieldClass` objects. + source: + openapi: openapi/openapi.yml + request: + name: InvoicesLineItemsRemoteFieldClassesListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_common_model_field: + type: optional + docs: >- + If provided, will only return remote field classes with this + is_common_model_field value + is_custom: + type: optional + docs: >- + If provided, will only return remote fields classes with this + is_custom value + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: root.PaginatedRemoteFieldClassList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: id + display_name: display_name + remote_key_name: remote_key_name + description: description + is_custom: true + is_required: true + field_type: string + field_format: string + field_choices: + - field_choices + metaPatchRetrieve: + path: /accounting/v1/invoices/meta/patch/{id} + method: GET + auth: true + docs: Returns metadata for `Invoice` PATCHs. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + response: + docs: '' + type: root.MetaResponse + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + metaPostRetrieve: + path: /accounting/v1/invoices/meta/post + method: GET + auth: true + docs: Returns metadata for `Invoice` POSTs. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + remoteFieldClassesList: + path: /accounting/v1/invoices/remote-field-classes + method: GET + auth: true + docs: Returns a list of `RemoteFieldClass` objects. + source: + openapi: openapi/openapi.yml + request: + name: InvoicesRemoteFieldClassesListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_common_model_field: + type: optional + docs: >- + If provided, will only return remote field classes with this + is_common_model_field value + is_custom: + type: optional + docs: >- + If provided, will only return remote fields classes with this + is_custom value + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: root.PaginatedRemoteFieldClassList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: id + display_name: display_name + remote_key_name: remote_key_name + description: description + is_custom: true + is_required: true + field_type: string + field_format: string + field_choices: + - field_choices + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/issues.yml b/.mock/definition/accounting/issues.yml new file mode 100644 index 0000000..58c4f3b --- /dev/null +++ b/.mock/definition/accounting/issues.yml @@ -0,0 +1,129 @@ +types: + IssuesListRequestStatus: + enum: + - ONGOING + - RESOLVED + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/issues + method: GET + auth: true + docs: Gets all issues for Organization. + source: + openapi: openapi/openapi.yml + request: + name: IssuesListRequest + query-parameters: + account_token: optional + cursor: + type: optional + docs: The pagination cursor value. + end_date: + type: optional + docs: >- + If included, will only include issues whose most recent action + occurred before this time + end_user_organization_name: optional + first_incident_time_after: + type: optional + docs: >- + If provided, will only return issues whose first incident time was + after this datetime. + first_incident_time_before: + type: optional + docs: >- + If provided, will only return issues whose first incident time was + before this datetime. + include_muted: + type: optional + docs: If true, will include muted issues + integration_name: optional + last_incident_time_after: + type: optional + docs: >- + If provided, will only return issues whose last incident time was + after this datetime. + last_incident_time_before: + type: optional + docs: >- + If provided, will only return issues whose last incident time was + before this datetime. + linked_account_id: + type: optional + docs: >- + If provided, will only include issues pertaining to the linked + account passed in. + page_size: + type: optional + docs: Number of results to return per page. + start_date: + type: optional + docs: >- + If included, will only include issues whose most recent action + occurred after this time + status: + type: optional + docs: |- + Status of the issue. Options: ('ONGOING', 'RESOLVED') + + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + response: + docs: '' + type: root.PaginatedIssueList + status-code: 200 + examples: + - response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + status: ONGOING + error_description: Missing Permissions + end_user: + key: value + first_incident_time: '2022-12-05T16:19:15Z' + last_incident_time: '2022-12-05T16:19:15Z' + is_muted: true + error_details: + - Missing employee permissions. + - Missing time off permissions. + retrieve: + path: /accounting/v1/issues/{id} + method: GET + auth: true + docs: Get a specific issue. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + response: + docs: '' + type: root.Issue + status-code: 200 + examples: + - path-parameters: + id: id + response: + body: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + status: ONGOING + error_description: Missing Permissions + end_user: + key: value + first_incident_time: '2022-12-05T16:19:15Z' + last_incident_time: '2022-12-05T16:19:15Z' + is_muted: true + error_details: + - Missing employee permissions. + - Missing time off permissions. + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/items.yml b/.mock/definition/accounting/items.yml new file mode 100644 index 0000000..7ee5dea --- /dev/null +++ b/.mock/definition/accounting/items.yml @@ -0,0 +1,842 @@ +types: + ItemsListRequestExpand: + enum: + - company + - value: company,purchase_tax_rate + name: CompanyPurchaseTaxRate + - value: company,sales_tax_rate + name: CompanySalesTaxRate + - value: company,sales_tax_rate,purchase_tax_rate + name: CompanySalesTaxRatePurchaseTaxRate + - purchase_account + - value: purchase_account,company + name: PurchaseAccountCompany + - value: purchase_account,company,purchase_tax_rate + name: PurchaseAccountCompanyPurchaseTaxRate + - value: purchase_account,company,sales_tax_rate + name: PurchaseAccountCompanySalesTaxRate + - value: purchase_account,company,sales_tax_rate,purchase_tax_rate + name: PurchaseAccountCompanySalesTaxRatePurchaseTaxRate + - value: purchase_account,purchase_tax_rate + name: PurchaseAccountPurchaseTaxRate + - value: purchase_account,sales_account + name: PurchaseAccountSalesAccount + - value: purchase_account,sales_account,company + name: PurchaseAccountSalesAccountCompany + - value: purchase_account,sales_account,company,purchase_tax_rate + name: PurchaseAccountSalesAccountCompanyPurchaseTaxRate + - value: purchase_account,sales_account,company,sales_tax_rate + name: PurchaseAccountSalesAccountCompanySalesTaxRate + - value: >- + purchase_account,sales_account,company,sales_tax_rate,purchase_tax_rate + name: PurchaseAccountSalesAccountCompanySalesTaxRatePurchaseTaxRate + - value: purchase_account,sales_account,purchase_tax_rate + name: PurchaseAccountSalesAccountPurchaseTaxRate + - value: purchase_account,sales_account,sales_tax_rate + name: PurchaseAccountSalesAccountSalesTaxRate + - value: purchase_account,sales_account,sales_tax_rate,purchase_tax_rate + name: PurchaseAccountSalesAccountSalesTaxRatePurchaseTaxRate + - value: purchase_account,sales_tax_rate + name: PurchaseAccountSalesTaxRate + - value: purchase_account,sales_tax_rate,purchase_tax_rate + name: PurchaseAccountSalesTaxRatePurchaseTaxRate + - purchase_tax_rate + - sales_account + - value: sales_account,company + name: SalesAccountCompany + - value: sales_account,company,purchase_tax_rate + name: SalesAccountCompanyPurchaseTaxRate + - value: sales_account,company,sales_tax_rate + name: SalesAccountCompanySalesTaxRate + - value: sales_account,company,sales_tax_rate,purchase_tax_rate + name: SalesAccountCompanySalesTaxRatePurchaseTaxRate + - value: sales_account,purchase_tax_rate + name: SalesAccountPurchaseTaxRate + - value: sales_account,sales_tax_rate + name: SalesAccountSalesTaxRate + - value: sales_account,sales_tax_rate,purchase_tax_rate + name: SalesAccountSalesTaxRatePurchaseTaxRate + - sales_tax_rate + - value: sales_tax_rate,purchase_tax_rate + name: SalesTaxRatePurchaseTaxRate + source: + openapi: openapi/openapi.yml + ItemsRetrieveRequestExpand: + enum: + - company + - value: company,purchase_tax_rate + name: CompanyPurchaseTaxRate + - value: company,sales_tax_rate + name: CompanySalesTaxRate + - value: company,sales_tax_rate,purchase_tax_rate + name: CompanySalesTaxRatePurchaseTaxRate + - purchase_account + - value: purchase_account,company + name: PurchaseAccountCompany + - value: purchase_account,company,purchase_tax_rate + name: PurchaseAccountCompanyPurchaseTaxRate + - value: purchase_account,company,sales_tax_rate + name: PurchaseAccountCompanySalesTaxRate + - value: purchase_account,company,sales_tax_rate,purchase_tax_rate + name: PurchaseAccountCompanySalesTaxRatePurchaseTaxRate + - value: purchase_account,purchase_tax_rate + name: PurchaseAccountPurchaseTaxRate + - value: purchase_account,sales_account + name: PurchaseAccountSalesAccount + - value: purchase_account,sales_account,company + name: PurchaseAccountSalesAccountCompany + - value: purchase_account,sales_account,company,purchase_tax_rate + name: PurchaseAccountSalesAccountCompanyPurchaseTaxRate + - value: purchase_account,sales_account,company,sales_tax_rate + name: PurchaseAccountSalesAccountCompanySalesTaxRate + - value: >- + purchase_account,sales_account,company,sales_tax_rate,purchase_tax_rate + name: PurchaseAccountSalesAccountCompanySalesTaxRatePurchaseTaxRate + - value: purchase_account,sales_account,purchase_tax_rate + name: PurchaseAccountSalesAccountPurchaseTaxRate + - value: purchase_account,sales_account,sales_tax_rate + name: PurchaseAccountSalesAccountSalesTaxRate + - value: purchase_account,sales_account,sales_tax_rate,purchase_tax_rate + name: PurchaseAccountSalesAccountSalesTaxRatePurchaseTaxRate + - value: purchase_account,sales_tax_rate + name: PurchaseAccountSalesTaxRate + - value: purchase_account,sales_tax_rate,purchase_tax_rate + name: PurchaseAccountSalesTaxRatePurchaseTaxRate + - purchase_tax_rate + - sales_account + - value: sales_account,company + name: SalesAccountCompany + - value: sales_account,company,purchase_tax_rate + name: SalesAccountCompanyPurchaseTaxRate + - value: sales_account,company,sales_tax_rate + name: SalesAccountCompanySalesTaxRate + - value: sales_account,company,sales_tax_rate,purchase_tax_rate + name: SalesAccountCompanySalesTaxRatePurchaseTaxRate + - value: sales_account,purchase_tax_rate + name: SalesAccountPurchaseTaxRate + - value: sales_account,sales_tax_rate + name: SalesAccountSalesTaxRate + - value: sales_account,sales_tax_rate,purchase_tax_rate + name: SalesAccountSalesTaxRatePurchaseTaxRate + - sales_tax_rate + - value: sales_tax_rate,purchase_tax_rate + name: SalesTaxRatePurchaseTaxRate + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/items + method: GET + auth: true + docs: Returns a list of `Item` objects. + source: + openapi: openapi/openapi.yml + request: + name: ItemsListRequest + query-parameters: + company_id: + type: optional + docs: If provided, will only return items for this company. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + remote_id: + type: optional + docs: The API provider's ID for the given object. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: root.PaginatedItemList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: d2f972d0-2526-434b-9409-4c3b468e08f0 + remote_id: '12374' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Pickleball Paddle + status: ACTIVE + unit_price: 10 + purchase_price: 25 + purchase_account: purchase_account + sales_account: sales_account + company: company + purchase_tax_rate: purchase_tax_rate + sales_tax_rate: sales_tax_rate + remote_updated_at: '2020-03-31T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + create: + path: /accounting/v1/items + method: POST + auth: true + docs: Creates an `Item` object with the given values. + source: + openapi: openapi/openapi.yml + request: + name: ItemEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: root.ItemRequestRequest + content-type: application/json + response: + docs: '' + type: root.ItemResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: d2f972d0-2526-434b-9409-4c3b468e08f0 + remote_id: '12374' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Pickleball Paddle + status: ACTIVE + unit_price: 10 + purchase_price: 25 + purchase_account: purchase_account + sales_account: sales_account + company: company + purchase_tax_rate: purchase_tax_rate + sales_tax_rate: sales_tax_rate + remote_updated_at: '2020-03-31T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /accounting/v1/items/{id} + method: GET + auth: true + docs: Returns an `Item` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: ItemsRetrieveRequest + query-parameters: + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: root.Item + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: d2f972d0-2526-434b-9409-4c3b468e08f0 + remote_id: '12374' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Pickleball Paddle + status: ACTIVE + unit_price: 10 + purchase_price: 25 + purchase_account: purchase_account + sales_account: sales_account + company: company + purchase_tax_rate: purchase_tax_rate + sales_tax_rate: sales_tax_rate + remote_updated_at: '2020-03-31T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + partialUpdate: + path: /accounting/v1/items/{id} + method: PATCH + auth: true + docs: Updates an `Item` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: PatchedItemEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: root.PatchedItemRequestRequest + content-type: application/json + response: + docs: '' + type: root.ItemResponse + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + request: + model: {} + response: + body: + model: + id: d2f972d0-2526-434b-9409-4c3b468e08f0 + remote_id: '12374' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Pickleball Paddle + status: ACTIVE + unit_price: 10 + purchase_price: 25 + purchase_account: purchase_account + sales_account: sales_account + company: company + purchase_tax_rate: purchase_tax_rate + sales_tax_rate: sales_tax_rate + remote_updated_at: '2020-03-31T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + metaPatchRetrieve: + path: /accounting/v1/items/meta/patch/{id} + method: GET + auth: true + docs: Returns metadata for `Item` PATCHs. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + response: + docs: '' + type: root.MetaResponse + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + metaPostRetrieve: + path: /accounting/v1/items/meta/post + method: GET + auth: true + docs: Returns metadata for `Item` POSTs. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/journalEntries.yml b/.mock/definition/accounting/journalEntries.yml new file mode 100644 index 0000000..feb7bad --- /dev/null +++ b/.mock/definition/accounting/journalEntries.yml @@ -0,0 +1,959 @@ +types: + JournalEntriesListRequestExpand: + enum: + - accounting_period + - applied_payments + - value: applied_payments,accounting_period + name: AppliedPaymentsAccountingPeriod + - value: applied_payments,company + name: AppliedPaymentsCompany + - value: applied_payments,company,accounting_period + name: AppliedPaymentsCompanyAccountingPeriod + - value: applied_payments,tracking_categories + name: AppliedPaymentsTrackingCategories + - value: applied_payments,tracking_categories,accounting_period + name: AppliedPaymentsTrackingCategoriesAccountingPeriod + - value: applied_payments,tracking_categories,company + name: AppliedPaymentsTrackingCategoriesCompany + - value: applied_payments,tracking_categories,company,accounting_period + name: AppliedPaymentsTrackingCategoriesCompanyAccountingPeriod + - company + - value: company,accounting_period + name: CompanyAccountingPeriod + - lines + - value: lines,accounting_period + name: LinesAccountingPeriod + - value: lines,applied_payments + name: LinesAppliedPayments + - value: lines,applied_payments,accounting_period + name: LinesAppliedPaymentsAccountingPeriod + - value: lines,applied_payments,company + name: LinesAppliedPaymentsCompany + - value: lines,applied_payments,company,accounting_period + name: LinesAppliedPaymentsCompanyAccountingPeriod + - value: lines,applied_payments,tracking_categories + name: LinesAppliedPaymentsTrackingCategories + - value: lines,applied_payments,tracking_categories,accounting_period + name: LinesAppliedPaymentsTrackingCategoriesAccountingPeriod + - value: lines,applied_payments,tracking_categories,company + name: LinesAppliedPaymentsTrackingCategoriesCompany + - value: lines,applied_payments,tracking_categories,company,accounting_period + name: LinesAppliedPaymentsTrackingCategoriesCompanyAccountingPeriod + - value: lines,company + name: LinesCompany + - value: lines,company,accounting_period + name: LinesCompanyAccountingPeriod + - value: lines,payments + name: LinesPayments + - value: lines,payments,accounting_period + name: LinesPaymentsAccountingPeriod + - value: lines,payments,applied_payments + name: LinesPaymentsAppliedPayments + - value: lines,payments,applied_payments,accounting_period + name: LinesPaymentsAppliedPaymentsAccountingPeriod + - value: lines,payments,applied_payments,company + name: LinesPaymentsAppliedPaymentsCompany + - value: lines,payments,applied_payments,company,accounting_period + name: LinesPaymentsAppliedPaymentsCompanyAccountingPeriod + - value: lines,payments,applied_payments,tracking_categories + name: LinesPaymentsAppliedPaymentsTrackingCategories + - value: lines,payments,applied_payments,tracking_categories,accounting_period + name: LinesPaymentsAppliedPaymentsTrackingCategoriesAccountingPeriod + - value: lines,payments,applied_payments,tracking_categories,company + name: LinesPaymentsAppliedPaymentsTrackingCategoriesCompany + - value: >- + lines,payments,applied_payments,tracking_categories,company,accounting_period + name: LinesPaymentsAppliedPaymentsTrackingCategoriesCompanyAccountingPeriod + - value: lines,payments,company + name: LinesPaymentsCompany + - value: lines,payments,company,accounting_period + name: LinesPaymentsCompanyAccountingPeriod + - value: lines,payments,tracking_categories + name: LinesPaymentsTrackingCategories + - value: lines,payments,tracking_categories,accounting_period + name: LinesPaymentsTrackingCategoriesAccountingPeriod + - value: lines,payments,tracking_categories,company + name: LinesPaymentsTrackingCategoriesCompany + - value: lines,payments,tracking_categories,company,accounting_period + name: LinesPaymentsTrackingCategoriesCompanyAccountingPeriod + - value: lines,tracking_categories + name: LinesTrackingCategories + - value: lines,tracking_categories,accounting_period + name: LinesTrackingCategoriesAccountingPeriod + - value: lines,tracking_categories,company + name: LinesTrackingCategoriesCompany + - value: lines,tracking_categories,company,accounting_period + name: LinesTrackingCategoriesCompanyAccountingPeriod + - payments + - value: payments,accounting_period + name: PaymentsAccountingPeriod + - value: payments,applied_payments + name: PaymentsAppliedPayments + - value: payments,applied_payments,accounting_period + name: PaymentsAppliedPaymentsAccountingPeriod + - value: payments,applied_payments,company + name: PaymentsAppliedPaymentsCompany + - value: payments,applied_payments,company,accounting_period + name: PaymentsAppliedPaymentsCompanyAccountingPeriod + - value: payments,applied_payments,tracking_categories + name: PaymentsAppliedPaymentsTrackingCategories + - value: payments,applied_payments,tracking_categories,accounting_period + name: PaymentsAppliedPaymentsTrackingCategoriesAccountingPeriod + - value: payments,applied_payments,tracking_categories,company + name: PaymentsAppliedPaymentsTrackingCategoriesCompany + - value: >- + payments,applied_payments,tracking_categories,company,accounting_period + name: PaymentsAppliedPaymentsTrackingCategoriesCompanyAccountingPeriod + - value: payments,company + name: PaymentsCompany + - value: payments,company,accounting_period + name: PaymentsCompanyAccountingPeriod + - value: payments,tracking_categories + name: PaymentsTrackingCategories + - value: payments,tracking_categories,accounting_period + name: PaymentsTrackingCategoriesAccountingPeriod + - value: payments,tracking_categories,company + name: PaymentsTrackingCategoriesCompany + - value: payments,tracking_categories,company,accounting_period + name: PaymentsTrackingCategoriesCompanyAccountingPeriod + - tracking_categories + - value: tracking_categories,accounting_period + name: TrackingCategoriesAccountingPeriod + - value: tracking_categories,company + name: TrackingCategoriesCompany + - value: tracking_categories,company,accounting_period + name: TrackingCategoriesCompanyAccountingPeriod + source: + openapi: openapi/openapi.yml + JournalEntriesRetrieveRequestExpand: + enum: + - accounting_period + - applied_payments + - value: applied_payments,accounting_period + name: AppliedPaymentsAccountingPeriod + - value: applied_payments,company + name: AppliedPaymentsCompany + - value: applied_payments,company,accounting_period + name: AppliedPaymentsCompanyAccountingPeriod + - value: applied_payments,tracking_categories + name: AppliedPaymentsTrackingCategories + - value: applied_payments,tracking_categories,accounting_period + name: AppliedPaymentsTrackingCategoriesAccountingPeriod + - value: applied_payments,tracking_categories,company + name: AppliedPaymentsTrackingCategoriesCompany + - value: applied_payments,tracking_categories,company,accounting_period + name: AppliedPaymentsTrackingCategoriesCompanyAccountingPeriod + - company + - value: company,accounting_period + name: CompanyAccountingPeriod + - lines + - value: lines,accounting_period + name: LinesAccountingPeriod + - value: lines,applied_payments + name: LinesAppliedPayments + - value: lines,applied_payments,accounting_period + name: LinesAppliedPaymentsAccountingPeriod + - value: lines,applied_payments,company + name: LinesAppliedPaymentsCompany + - value: lines,applied_payments,company,accounting_period + name: LinesAppliedPaymentsCompanyAccountingPeriod + - value: lines,applied_payments,tracking_categories + name: LinesAppliedPaymentsTrackingCategories + - value: lines,applied_payments,tracking_categories,accounting_period + name: LinesAppliedPaymentsTrackingCategoriesAccountingPeriod + - value: lines,applied_payments,tracking_categories,company + name: LinesAppliedPaymentsTrackingCategoriesCompany + - value: lines,applied_payments,tracking_categories,company,accounting_period + name: LinesAppliedPaymentsTrackingCategoriesCompanyAccountingPeriod + - value: lines,company + name: LinesCompany + - value: lines,company,accounting_period + name: LinesCompanyAccountingPeriod + - value: lines,payments + name: LinesPayments + - value: lines,payments,accounting_period + name: LinesPaymentsAccountingPeriod + - value: lines,payments,applied_payments + name: LinesPaymentsAppliedPayments + - value: lines,payments,applied_payments,accounting_period + name: LinesPaymentsAppliedPaymentsAccountingPeriod + - value: lines,payments,applied_payments,company + name: LinesPaymentsAppliedPaymentsCompany + - value: lines,payments,applied_payments,company,accounting_period + name: LinesPaymentsAppliedPaymentsCompanyAccountingPeriod + - value: lines,payments,applied_payments,tracking_categories + name: LinesPaymentsAppliedPaymentsTrackingCategories + - value: lines,payments,applied_payments,tracking_categories,accounting_period + name: LinesPaymentsAppliedPaymentsTrackingCategoriesAccountingPeriod + - value: lines,payments,applied_payments,tracking_categories,company + name: LinesPaymentsAppliedPaymentsTrackingCategoriesCompany + - value: >- + lines,payments,applied_payments,tracking_categories,company,accounting_period + name: LinesPaymentsAppliedPaymentsTrackingCategoriesCompanyAccountingPeriod + - value: lines,payments,company + name: LinesPaymentsCompany + - value: lines,payments,company,accounting_period + name: LinesPaymentsCompanyAccountingPeriod + - value: lines,payments,tracking_categories + name: LinesPaymentsTrackingCategories + - value: lines,payments,tracking_categories,accounting_period + name: LinesPaymentsTrackingCategoriesAccountingPeriod + - value: lines,payments,tracking_categories,company + name: LinesPaymentsTrackingCategoriesCompany + - value: lines,payments,tracking_categories,company,accounting_period + name: LinesPaymentsTrackingCategoriesCompanyAccountingPeriod + - value: lines,tracking_categories + name: LinesTrackingCategories + - value: lines,tracking_categories,accounting_period + name: LinesTrackingCategoriesAccountingPeriod + - value: lines,tracking_categories,company + name: LinesTrackingCategoriesCompany + - value: lines,tracking_categories,company,accounting_period + name: LinesTrackingCategoriesCompanyAccountingPeriod + - payments + - value: payments,accounting_period + name: PaymentsAccountingPeriod + - value: payments,applied_payments + name: PaymentsAppliedPayments + - value: payments,applied_payments,accounting_period + name: PaymentsAppliedPaymentsAccountingPeriod + - value: payments,applied_payments,company + name: PaymentsAppliedPaymentsCompany + - value: payments,applied_payments,company,accounting_period + name: PaymentsAppliedPaymentsCompanyAccountingPeriod + - value: payments,applied_payments,tracking_categories + name: PaymentsAppliedPaymentsTrackingCategories + - value: payments,applied_payments,tracking_categories,accounting_period + name: PaymentsAppliedPaymentsTrackingCategoriesAccountingPeriod + - value: payments,applied_payments,tracking_categories,company + name: PaymentsAppliedPaymentsTrackingCategoriesCompany + - value: >- + payments,applied_payments,tracking_categories,company,accounting_period + name: PaymentsAppliedPaymentsTrackingCategoriesCompanyAccountingPeriod + - value: payments,company + name: PaymentsCompany + - value: payments,company,accounting_period + name: PaymentsCompanyAccountingPeriod + - value: payments,tracking_categories + name: PaymentsTrackingCategories + - value: payments,tracking_categories,accounting_period + name: PaymentsTrackingCategoriesAccountingPeriod + - value: payments,tracking_categories,company + name: PaymentsTrackingCategoriesCompany + - value: payments,tracking_categories,company,accounting_period + name: PaymentsTrackingCategoriesCompanyAccountingPeriod + - tracking_categories + - value: tracking_categories,accounting_period + name: TrackingCategoriesAccountingPeriod + - value: tracking_categories,company + name: TrackingCategoriesCompany + - value: tracking_categories,company,accounting_period + name: TrackingCategoriesCompanyAccountingPeriod + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/journal-entries + method: GET + auth: true + docs: Returns a list of `JournalEntry` objects. + source: + openapi: openapi/openapi.yml + request: + name: JournalEntriesListRequest + query-parameters: + company_id: + type: optional + docs: If provided, will only return journal entries for this company. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + transaction_date_after: + type: optional + docs: If provided, will only return objects created after this datetime. + transaction_date_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + response: + docs: '' + type: root.PaginatedJournalEntryList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '088899' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + transaction_date: '2020-03-31T00:00:00Z' + payments: + - b26fd49a-cbae-470a-a8f8-bcbc119e0390 + applied_payments: + - 4311155d-f236-4a5d-9e0f-1cb167e38f95 + memo: Weekly Payment + currency: XUA + exchange_rate: '2.9' + company: company + inclusive_of_tax: true + lines: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121222' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + account: 9d892439-5fab-4dbb-8bd8-34f7f96c7912 + net_amount: 25.54 + tracking_categories: + - d25d609b-945f-4762-b55a-1c8fb220c43c + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + employee: 123c8r35-5kf5-12x5-r833-99bwf35210b5 + project: 22e65a5d-2df5-4e6e-884a-e538d0339000 + contact: d2d5ea3c-b032-11ec-b909-0242ac120002 + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + description: Cash payment for lunch + exchange_rate: '2.9' + remote_was_deleted: false + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121223' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + account: f963f34d-3d2f-4f77-b557-cf36bc7e6498 + net_amount: 10 + journal_number: '42' + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + remote_was_deleted: true + posting_status: UNPOSTED + accounting_period: accounting_period + remote_created_at: '2020-03-31T00:00:00Z' + remote_updated_at: '2020-03-31T00:00:00Z' + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + create: + path: /accounting/v1/journal-entries + method: POST + auth: true + docs: Creates a `JournalEntry` object with the given values. + source: + openapi: openapi/openapi.yml + request: + name: JournalEntryEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: root.JournalEntryRequest + content-type: application/json + response: + docs: '' + type: root.JournalEntryResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '088899' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + transaction_date: '2020-03-31T00:00:00Z' + payments: + - b26fd49a-cbae-470a-a8f8-bcbc119e0390 + applied_payments: + - 4311155d-f236-4a5d-9e0f-1cb167e38f95 + memo: Weekly Payment + currency: XUA + exchange_rate: '2.9' + company: company + inclusive_of_tax: true + lines: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121222' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + account: 9d892439-5fab-4dbb-8bd8-34f7f96c7912 + net_amount: 25.54 + tracking_categories: + - d25d609b-945f-4762-b55a-1c8fb220c43c + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + employee: 123c8r35-5kf5-12x5-r833-99bwf35210b5 + project: 22e65a5d-2df5-4e6e-884a-e538d0339000 + contact: d2d5ea3c-b032-11ec-b909-0242ac120002 + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + description: Cash payment for lunch + exchange_rate: '2.9' + remote_was_deleted: false + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121223' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + account: f963f34d-3d2f-4f77-b557-cf36bc7e6498 + net_amount: 10 + journal_number: '42' + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + remote_was_deleted: true + posting_status: UNPOSTED + accounting_period: accounting_period + remote_created_at: '2020-03-31T00:00:00Z' + remote_updated_at: '2020-03-31T00:00:00Z' + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /accounting/v1/journal-entries/{id} + method: GET + auth: true + docs: Returns a `JournalEntry` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: JournalEntriesRetrieveRequest + query-parameters: + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.JournalEntry + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '088899' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + transaction_date: '2020-03-31T00:00:00Z' + payments: + - b26fd49a-cbae-470a-a8f8-bcbc119e0390 + applied_payments: + - 4311155d-f236-4a5d-9e0f-1cb167e38f95 + memo: Weekly Payment + currency: XUA + exchange_rate: '2.9' + company: company + inclusive_of_tax: true + lines: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121222' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + account: 9d892439-5fab-4dbb-8bd8-34f7f96c7912 + net_amount: 25.54 + tracking_category: tracking_category + tracking_categories: + - d25d609b-945f-4762-b55a-1c8fb220c43c + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + currency: XUA + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + employee: 123c8r35-5kf5-12x5-r833-99bwf35210b5 + project: 22e65a5d-2df5-4e6e-884a-e538d0339000 + contact: d2d5ea3c-b032-11ec-b909-0242ac120002 + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + description: Cash payment for lunch + exchange_rate: '2.9' + remote_was_deleted: false + remote_fields: + - remote_field_class: remote_field_class + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121223' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + account: f963f34d-3d2f-4f77-b557-cf36bc7e6498 + net_amount: 10 + tracking_category: tracking_category + tracking_categories: + - d25d609b-945f-4762-b55a-1c8fb220c43c + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + currency: XUA + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + employee: 123c8r35-5kf5-12x5-r833-99bwf35210b5 + project: project + contact: d2d5ea3c-b032-11ec-b909-0242ac120002 + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + description: Cash payment for lunch + exchange_rate: '2.9' + remote_was_deleted: true + remote_fields: + - remote_field_class: remote_field_class + journal_number: '42' + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + remote_was_deleted: true + posting_status: UNPOSTED + accounting_period: accounting_period + remote_created_at: '2020-03-31T00:00:00Z' + remote_updated_at: '2020-03-31T00:00:00Z' + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + value: + key: value + linesRemoteFieldClassesList: + path: /accounting/v1/journal-entries/lines/remote-field-classes + method: GET + auth: true + docs: Returns a list of `RemoteFieldClass` objects. + source: + openapi: openapi/openapi.yml + request: + name: JournalEntriesLinesRemoteFieldClassesListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_common_model_field: + type: optional + docs: >- + If provided, will only return remote field classes with this + is_common_model_field value + is_custom: + type: optional + docs: >- + If provided, will only return remote fields classes with this + is_custom value + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: root.PaginatedRemoteFieldClassList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: id + display_name: display_name + remote_key_name: remote_key_name + description: description + is_custom: true + is_required: true + field_type: string + field_format: string + field_choices: + - field_choices + metaPostRetrieve: + path: /accounting/v1/journal-entries/meta/post + method: GET + auth: true + docs: Returns metadata for `JournalEntry` POSTs. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + remoteFieldClassesList: + path: /accounting/v1/journal-entries/remote-field-classes + method: GET + auth: true + docs: Returns a list of `RemoteFieldClass` objects. + source: + openapi: openapi/openapi.yml + request: + name: JournalEntriesRemoteFieldClassesListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_common_model_field: + type: optional + docs: >- + If provided, will only return remote field classes with this + is_common_model_field value + is_custom: + type: optional + docs: >- + If provided, will only return remote fields classes with this + is_custom value + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: root.PaginatedRemoteFieldClassList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: id + display_name: display_name + remote_key_name: remote_key_name + description: description + is_custom: true + is_required: true + field_type: string + field_format: string + field_choices: + - field_choices + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/linkToken.yml b/.mock/definition/accounting/linkToken.yml new file mode 100644 index 0000000..65ffc3c --- /dev/null +++ b/.mock/definition/accounting/linkToken.yml @@ -0,0 +1,135 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /accounting/v1/link-token + method: POST + auth: true + docs: Creates a link token to be used when linking a new end user. + source: + openapi: openapi/openapi.yml + request: + name: EndUserDetailsRequest + body: + properties: + end_user_email_address: + type: string + docs: >- + Your end user's email address. This is purely for identification + purposes - setting this value will not cause any emails to be + sent. + validation: + minLength: 1 + maxLength: 100 + end_user_organization_name: + type: string + docs: Your end user's organization. + validation: + minLength: 1 + maxLength: 100 + end_user_origin_id: + type: string + docs: >- + This unique identifier typically represents the ID for your end + user in your product's database. This value must be distinct + from other Linked Accounts' unique identifiers. + validation: + minLength: 1 + maxLength: 100 + categories: + docs: The integration categories to show in Merge Link. + type: list + integration: + type: optional + docs: >- + The slug of a specific pre-selected integration for this linking + flow token. For examples of slugs, see + https://docs.merge.dev/guides/merge-link/single-integration/. + validation: + minLength: 1 + link_expiry_mins: + type: optional + docs: >- + An integer number of minutes between [30, 720 or 10080 if for a + Magic Link URL] for how long this token is valid. Defaults to + 30. + default: 30 + validation: + min: 30 + max: 10080 + should_create_magic_link_url: + type: optional + docs: >- + Whether to generate a Magic Link URL. Defaults to false. For + more information on Magic Link, see + https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. + default: false + hide_admin_magic_link: + type: optional + docs: >- + Whether to generate a Magic Link URL on the Admin Needed screen + during the linking flow. Defaults to false. For more information + on Magic Link, see + https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. + default: false + common_models: + type: optional> + docs: >- + An array of objects to specify the models and fields that will + be disabled for a given Linked Account. Each object uses + model_id, enabled_actions, and disabled_fields to specify the + model, method, and fields that are scoped for a given Linked + Account. + category_common_model_scopes: + type: >- + optional>>> + docs: >- + 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: + type: optional + docs: >- + The following subset of IETF language tags can be used to + configure localization. + + + * `en` - en + + * `de` - de + are_syncs_disabled: + type: optional + docs: >- + The boolean that indicates whether initial, periodic, and force + syncs will be disabled. + default: false + integration_specific_config: + type: optional> + docs: >- + A JSON object containing integration-specific configuration + options. + content-type: application/json + response: + docs: '' + type: root.LinkToken + status-code: 200 + examples: + - request: + end_user_email_address: example@gmail.com + end_user_organization_name: Test Organization + end_user_origin_id: '12345' + categories: + - hris + - ats + response: + body: + link_token: necdP7FtdASl1fQwm62be2_dM4wBG8_GactqoUV0 + integration_name: Lever + magic_link_url: https://link.merge.dev/asdfjkl12345jsndfgi2i83n + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/linkedAccounts.yml b/.mock/definition/accounting/linkedAccounts.yml new file mode 100644 index 0000000..aa8806e --- /dev/null +++ b/.mock/definition/accounting/linkedAccounts.yml @@ -0,0 +1,150 @@ +types: + LinkedAccountsListRequestCategory: + enum: + - accounting + - ats + - crm + - filestorage + - hris + - mktg + - ticketing + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/linked-accounts + method: GET + auth: true + docs: List linked accounts for your organization. + source: + openapi: openapi/openapi.yml + request: + name: LinkedAccountsListRequest + query-parameters: + category: + type: optional + docs: >- + Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, + `mktg`, `ticketing` + + + * `hris` - hris + + * `ats` - ats + + * `accounting` - accounting + + * `ticketing` - ticketing + + * `crm` - crm + + * `mktg` - mktg + + * `filestorage` - filestorage + cursor: + type: optional + docs: The pagination cursor value. + end_user_email_address: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given email address. + end_user_organization_name: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given organization name. + end_user_origin_id: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given origin ID. + end_user_origin_ids: + type: optional + docs: >- + Comma-separated list of EndUser origin IDs, making it possible to + specify multiple EndUsers at once. + id: + type: optional + validation: + format: uuid + ids: + type: optional + docs: >- + Comma-separated list of LinkedAccount IDs, making it possible to + specify multiple LinkedAccounts at once. + include_duplicates: + type: optional + docs: >- + If `true`, will include complete production duplicates of the + account specified by the `id` query parameter in the response. + `id` must be for a complete production linked account. + integration_name: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given integration name. + is_test_account: + type: optional + docs: >- + If included, will only include test linked accounts. If not + included, will only include non-test linked accounts. + page_size: + type: optional + docs: Number of results to return per page. + status: + type: optional + docs: >- + Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, + `RELINK_NEEDED` + response: + docs: '' + type: root.PaginatedAccountDetailsAndActionsList + status-code: 200 + examples: + - response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: e59b1821-f85c-4e28-a6b3-1804156f3563 + category: hris + status: COMPLETE + status_detail: Invalid login credentials + end_user_origin_id: 3ac95cde-6c7f-4eef-afec-be710b42308d + end_user_organization_name: Foo Bar, LLC + end_user_email_address: hradmin@foobar.dev + subdomain: foobar + webhook_listener_url: >- + https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 + is_duplicate: true + integration: + name: name + categories: + - hris + color: color + slug: slug + passthrough_available: true + available_model_operations: + - model_name: Candidate + available_operations: + - FETCH + - CREATE + required_post_parameters: + - remote_user_id + supported_fields: + - first_name + - last_name + - company + - title + account_type: PRODUCTION + completed_at: '2024-08-26T20:11:19Z' + integration_specific_fields: + integration_specific_field: Varies by platform + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/passthrough.yml b/.mock/definition/accounting/passthrough.yml new file mode 100644 index 0000000..25ab767 --- /dev/null +++ b/.mock/definition/accounting/passthrough.yml @@ -0,0 +1,40 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /accounting/v1/passthrough + method: POST + auth: true + docs: Pull data from an endpoint not currently supported by Merge. + source: + openapi: openapi/openapi.yml + request: + body: root.DataPassthroughRequest + content-type: application/json + response: + docs: '' + type: root.RemoteResponse + status-code: 200 + examples: + - headers: {} + request: + method: GET + path: /scooters + response: + body: + method: GET + path: /scooters + status: 200 + response: + key: value + response_headers: + X-Page-Token: value + response_type: JSON + headers: + EXTRA-HEADER: value + Authorization: + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/paymentMethods.yml b/.mock/definition/accounting/paymentMethods.yml new file mode 100644 index 0000000..c53c952 --- /dev/null +++ b/.mock/definition/accounting/paymentMethods.yml @@ -0,0 +1,119 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/payment-methods + method: GET + auth: true + docs: Returns a list of `PaymentMethod` objects. + source: + openapi: openapi/openapi.yml + request: + name: PaymentMethodsListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: root.PaginatedPaymentMethodList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '088899' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + method_type: CREDIT_CARD + name: John Smith's Credit Card + is_active: true + remote_updated_at: '2021-09-15T00:00:00Z' + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + retrieve: + path: /accounting/v1/payment-methods/{id} + method: GET + auth: true + docs: Returns a `PaymentMethod` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: PaymentMethodsRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.PaymentMethod + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '088899' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + method_type: CREDIT_CARD + name: John Smith's Credit Card + is_active: true + remote_updated_at: '2021-09-15T00:00:00Z' + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/paymentTerms.yml b/.mock/definition/accounting/paymentTerms.yml new file mode 100644 index 0000000..688ed9c --- /dev/null +++ b/.mock/definition/accounting/paymentTerms.yml @@ -0,0 +1,133 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/payment-terms + method: GET + auth: true + docs: Returns a list of `PaymentTerm` objects. + source: + openapi: openapi/openapi.yml + request: + name: PaymentTermsListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: root.PaginatedPaymentTermList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '088899' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Net 30 + is_active: true + company: company + days_until_due: 30 + discount_days: 15 + remote_last_modified_at: '2024-10-16T00:00:00Z' + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + retrieve: + path: /accounting/v1/payment-terms/{id} + method: GET + auth: true + docs: Returns a `PaymentTerm` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: PaymentTermsRetrieveRequest + query-parameters: + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.PaymentTerm + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '088899' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Net 30 + is_active: true + company: company + days_until_due: 30 + discount_days: 15 + remote_last_modified_at: '2024-10-16T00:00:00Z' + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/payments.yml b/.mock/definition/accounting/payments.yml new file mode 100644 index 0000000..26c0f1b --- /dev/null +++ b/.mock/definition/accounting/payments.yml @@ -0,0 +1,1482 @@ +types: + PaymentsListRequestExpand: + enum: + - account + - value: account,accounting_period + name: AccountAccountingPeriod + - value: account,accounting_period,payment_method + name: AccountAccountingPeriodPaymentMethod + - value: account,company + name: AccountCompany + - value: account,company,accounting_period + name: AccountCompanyAccountingPeriod + - value: account,company,accounting_period,payment_method + name: AccountCompanyAccountingPeriodPaymentMethod + - value: account,company,payment_method + name: AccountCompanyPaymentMethod + - value: account,payment_method + name: AccountPaymentMethod + - accounting_period + - value: accounting_period,payment_method + name: AccountingPeriodPaymentMethod + - applied_to_lines + - value: applied_to_lines,account + name: AppliedToLinesAccount + - value: applied_to_lines,account,accounting_period + name: AppliedToLinesAccountAccountingPeriod + - value: applied_to_lines,account,accounting_period,payment_method + name: AppliedToLinesAccountAccountingPeriodPaymentMethod + - value: applied_to_lines,account,company + name: AppliedToLinesAccountCompany + - value: applied_to_lines,account,company,accounting_period + name: AppliedToLinesAccountCompanyAccountingPeriod + - value: applied_to_lines,account,company,accounting_period,payment_method + name: AppliedToLinesAccountCompanyAccountingPeriodPaymentMethod + - value: applied_to_lines,account,company,payment_method + name: AppliedToLinesAccountCompanyPaymentMethod + - value: applied_to_lines,account,payment_method + name: AppliedToLinesAccountPaymentMethod + - value: applied_to_lines,accounting_period + name: AppliedToLinesAccountingPeriod + - value: applied_to_lines,accounting_period,payment_method + name: AppliedToLinesAccountingPeriodPaymentMethod + - value: applied_to_lines,company + name: AppliedToLinesCompany + - value: applied_to_lines,company,accounting_period + name: AppliedToLinesCompanyAccountingPeriod + - value: applied_to_lines,company,accounting_period,payment_method + name: AppliedToLinesCompanyAccountingPeriodPaymentMethod + - value: applied_to_lines,company,payment_method + name: AppliedToLinesCompanyPaymentMethod + - value: applied_to_lines,contact + name: AppliedToLinesContact + - value: applied_to_lines,contact,account + name: AppliedToLinesContactAccount + - value: applied_to_lines,contact,account,accounting_period + name: AppliedToLinesContactAccountAccountingPeriod + - value: applied_to_lines,contact,account,accounting_period,payment_method + name: AppliedToLinesContactAccountAccountingPeriodPaymentMethod + - value: applied_to_lines,contact,account,company + name: AppliedToLinesContactAccountCompany + - value: applied_to_lines,contact,account,company,accounting_period + name: AppliedToLinesContactAccountCompanyAccountingPeriod + - value: >- + applied_to_lines,contact,account,company,accounting_period,payment_method + name: AppliedToLinesContactAccountCompanyAccountingPeriodPaymentMethod + - value: applied_to_lines,contact,account,company,payment_method + name: AppliedToLinesContactAccountCompanyPaymentMethod + - value: applied_to_lines,contact,account,payment_method + name: AppliedToLinesContactAccountPaymentMethod + - value: applied_to_lines,contact,accounting_period + name: AppliedToLinesContactAccountingPeriod + - value: applied_to_lines,contact,accounting_period,payment_method + name: AppliedToLinesContactAccountingPeriodPaymentMethod + - value: applied_to_lines,contact,company + name: AppliedToLinesContactCompany + - value: applied_to_lines,contact,company,accounting_period + name: AppliedToLinesContactCompanyAccountingPeriod + - value: applied_to_lines,contact,company,accounting_period,payment_method + name: AppliedToLinesContactCompanyAccountingPeriodPaymentMethod + - value: applied_to_lines,contact,company,payment_method + name: AppliedToLinesContactCompanyPaymentMethod + - value: applied_to_lines,contact,payment_method + name: AppliedToLinesContactPaymentMethod + - value: applied_to_lines,payment_method + name: AppliedToLinesPaymentMethod + - company + - value: company,accounting_period + name: CompanyAccountingPeriod + - value: company,accounting_period,payment_method + name: CompanyAccountingPeriodPaymentMethod + - value: company,payment_method + name: CompanyPaymentMethod + - contact + - value: contact,account + name: ContactAccount + - value: contact,account,accounting_period + name: ContactAccountAccountingPeriod + - value: contact,account,accounting_period,payment_method + name: ContactAccountAccountingPeriodPaymentMethod + - value: contact,account,company + name: ContactAccountCompany + - value: contact,account,company,accounting_period + name: ContactAccountCompanyAccountingPeriod + - value: contact,account,company,accounting_period,payment_method + name: ContactAccountCompanyAccountingPeriodPaymentMethod + - value: contact,account,company,payment_method + name: ContactAccountCompanyPaymentMethod + - value: contact,account,payment_method + name: ContactAccountPaymentMethod + - value: contact,accounting_period + name: ContactAccountingPeriod + - value: contact,accounting_period,payment_method + name: ContactAccountingPeriodPaymentMethod + - value: contact,company + name: ContactCompany + - value: contact,company,accounting_period + name: ContactCompanyAccountingPeriod + - value: contact,company,accounting_period,payment_method + name: ContactCompanyAccountingPeriodPaymentMethod + - value: contact,company,payment_method + name: ContactCompanyPaymentMethod + - value: contact,payment_method + name: ContactPaymentMethod + - payment_method + - tracking_categories + - value: tracking_categories,account + name: TrackingCategoriesAccount + - value: tracking_categories,account,accounting_period + name: TrackingCategoriesAccountAccountingPeriod + - value: tracking_categories,account,accounting_period,payment_method + name: TrackingCategoriesAccountAccountingPeriodPaymentMethod + - value: tracking_categories,account,company + name: TrackingCategoriesAccountCompany + - value: tracking_categories,account,company,accounting_period + name: TrackingCategoriesAccountCompanyAccountingPeriod + - value: tracking_categories,account,company,accounting_period,payment_method + name: TrackingCategoriesAccountCompanyAccountingPeriodPaymentMethod + - value: tracking_categories,account,company,payment_method + name: TrackingCategoriesAccountCompanyPaymentMethod + - value: tracking_categories,account,payment_method + name: TrackingCategoriesAccountPaymentMethod + - value: tracking_categories,accounting_period + name: TrackingCategoriesAccountingPeriod + - value: tracking_categories,accounting_period,payment_method + name: TrackingCategoriesAccountingPeriodPaymentMethod + - value: tracking_categories,applied_to_lines + name: TrackingCategoriesAppliedToLines + - value: tracking_categories,applied_to_lines,account + name: TrackingCategoriesAppliedToLinesAccount + - value: tracking_categories,applied_to_lines,account,accounting_period + name: TrackingCategoriesAppliedToLinesAccountAccountingPeriod + - value: >- + tracking_categories,applied_to_lines,account,accounting_period,payment_method + name: TrackingCategoriesAppliedToLinesAccountAccountingPeriodPaymentMethod + - value: tracking_categories,applied_to_lines,account,company + name: TrackingCategoriesAppliedToLinesAccountCompany + - value: tracking_categories,applied_to_lines,account,company,accounting_period + name: TrackingCategoriesAppliedToLinesAccountCompanyAccountingPeriod + - value: >- + tracking_categories,applied_to_lines,account,company,accounting_period,payment_method + name: >- + TrackingCategoriesAppliedToLinesAccountCompanyAccountingPeriodPaymentMethod + - value: tracking_categories,applied_to_lines,account,company,payment_method + name: TrackingCategoriesAppliedToLinesAccountCompanyPaymentMethod + - value: tracking_categories,applied_to_lines,account,payment_method + name: TrackingCategoriesAppliedToLinesAccountPaymentMethod + - value: tracking_categories,applied_to_lines,accounting_period + name: TrackingCategoriesAppliedToLinesAccountingPeriod + - value: tracking_categories,applied_to_lines,accounting_period,payment_method + name: TrackingCategoriesAppliedToLinesAccountingPeriodPaymentMethod + - value: tracking_categories,applied_to_lines,company + name: TrackingCategoriesAppliedToLinesCompany + - value: tracking_categories,applied_to_lines,company,accounting_period + name: TrackingCategoriesAppliedToLinesCompanyAccountingPeriod + - value: >- + tracking_categories,applied_to_lines,company,accounting_period,payment_method + name: TrackingCategoriesAppliedToLinesCompanyAccountingPeriodPaymentMethod + - value: tracking_categories,applied_to_lines,company,payment_method + name: TrackingCategoriesAppliedToLinesCompanyPaymentMethod + - value: tracking_categories,applied_to_lines,contact + name: TrackingCategoriesAppliedToLinesContact + - value: tracking_categories,applied_to_lines,contact,account + name: TrackingCategoriesAppliedToLinesContactAccount + - value: tracking_categories,applied_to_lines,contact,account,accounting_period + name: TrackingCategoriesAppliedToLinesContactAccountAccountingPeriod + - value: >- + tracking_categories,applied_to_lines,contact,account,accounting_period,payment_method + name: >- + TrackingCategoriesAppliedToLinesContactAccountAccountingPeriodPaymentMethod + - value: tracking_categories,applied_to_lines,contact,account,company + name: TrackingCategoriesAppliedToLinesContactAccountCompany + - value: >- + tracking_categories,applied_to_lines,contact,account,company,accounting_period + name: TrackingCategoriesAppliedToLinesContactAccountCompanyAccountingPeriod + - value: >- + tracking_categories,applied_to_lines,contact,account,company,accounting_period,payment_method + name: >- + TrackingCategoriesAppliedToLinesContactAccountCompanyAccountingPeriodPaymentMethod + - value: >- + tracking_categories,applied_to_lines,contact,account,company,payment_method + name: TrackingCategoriesAppliedToLinesContactAccountCompanyPaymentMethod + - value: tracking_categories,applied_to_lines,contact,account,payment_method + name: TrackingCategoriesAppliedToLinesContactAccountPaymentMethod + - value: tracking_categories,applied_to_lines,contact,accounting_period + name: TrackingCategoriesAppliedToLinesContactAccountingPeriod + - value: >- + tracking_categories,applied_to_lines,contact,accounting_period,payment_method + name: TrackingCategoriesAppliedToLinesContactAccountingPeriodPaymentMethod + - value: tracking_categories,applied_to_lines,contact,company + name: TrackingCategoriesAppliedToLinesContactCompany + - value: tracking_categories,applied_to_lines,contact,company,accounting_period + name: TrackingCategoriesAppliedToLinesContactCompanyAccountingPeriod + - value: >- + tracking_categories,applied_to_lines,contact,company,accounting_period,payment_method + name: >- + TrackingCategoriesAppliedToLinesContactCompanyAccountingPeriodPaymentMethod + - value: tracking_categories,applied_to_lines,contact,company,payment_method + name: TrackingCategoriesAppliedToLinesContactCompanyPaymentMethod + - value: tracking_categories,applied_to_lines,contact,payment_method + name: TrackingCategoriesAppliedToLinesContactPaymentMethod + - value: tracking_categories,applied_to_lines,payment_method + name: TrackingCategoriesAppliedToLinesPaymentMethod + - value: tracking_categories,company + name: TrackingCategoriesCompany + - value: tracking_categories,company,accounting_period + name: TrackingCategoriesCompanyAccountingPeriod + - value: tracking_categories,company,accounting_period,payment_method + name: TrackingCategoriesCompanyAccountingPeriodPaymentMethod + - value: tracking_categories,company,payment_method + name: TrackingCategoriesCompanyPaymentMethod + - value: tracking_categories,contact + name: TrackingCategoriesContact + - value: tracking_categories,contact,account + name: TrackingCategoriesContactAccount + - value: tracking_categories,contact,account,accounting_period + name: TrackingCategoriesContactAccountAccountingPeriod + - value: tracking_categories,contact,account,accounting_period,payment_method + name: TrackingCategoriesContactAccountAccountingPeriodPaymentMethod + - value: tracking_categories,contact,account,company + name: TrackingCategoriesContactAccountCompany + - value: tracking_categories,contact,account,company,accounting_period + name: TrackingCategoriesContactAccountCompanyAccountingPeriod + - value: >- + tracking_categories,contact,account,company,accounting_period,payment_method + name: TrackingCategoriesContactAccountCompanyAccountingPeriodPaymentMethod + - value: tracking_categories,contact,account,company,payment_method + name: TrackingCategoriesContactAccountCompanyPaymentMethod + - value: tracking_categories,contact,account,payment_method + name: TrackingCategoriesContactAccountPaymentMethod + - value: tracking_categories,contact,accounting_period + name: TrackingCategoriesContactAccountingPeriod + - value: tracking_categories,contact,accounting_period,payment_method + name: TrackingCategoriesContactAccountingPeriodPaymentMethod + - value: tracking_categories,contact,company + name: TrackingCategoriesContactCompany + - value: tracking_categories,contact,company,accounting_period + name: TrackingCategoriesContactCompanyAccountingPeriod + - value: tracking_categories,contact,company,accounting_period,payment_method + name: TrackingCategoriesContactCompanyAccountingPeriodPaymentMethod + - value: tracking_categories,contact,company,payment_method + name: TrackingCategoriesContactCompanyPaymentMethod + - value: tracking_categories,contact,payment_method + name: TrackingCategoriesContactPaymentMethod + - value: tracking_categories,payment_method + name: TrackingCategoriesPaymentMethod + source: + openapi: openapi/openapi.yml + PaymentsRetrieveRequestExpand: + enum: + - account + - value: account,accounting_period + name: AccountAccountingPeriod + - value: account,accounting_period,payment_method + name: AccountAccountingPeriodPaymentMethod + - value: account,company + name: AccountCompany + - value: account,company,accounting_period + name: AccountCompanyAccountingPeriod + - value: account,company,accounting_period,payment_method + name: AccountCompanyAccountingPeriodPaymentMethod + - value: account,company,payment_method + name: AccountCompanyPaymentMethod + - value: account,payment_method + name: AccountPaymentMethod + - accounting_period + - value: accounting_period,payment_method + name: AccountingPeriodPaymentMethod + - applied_to_lines + - value: applied_to_lines,account + name: AppliedToLinesAccount + - value: applied_to_lines,account,accounting_period + name: AppliedToLinesAccountAccountingPeriod + - value: applied_to_lines,account,accounting_period,payment_method + name: AppliedToLinesAccountAccountingPeriodPaymentMethod + - value: applied_to_lines,account,company + name: AppliedToLinesAccountCompany + - value: applied_to_lines,account,company,accounting_period + name: AppliedToLinesAccountCompanyAccountingPeriod + - value: applied_to_lines,account,company,accounting_period,payment_method + name: AppliedToLinesAccountCompanyAccountingPeriodPaymentMethod + - value: applied_to_lines,account,company,payment_method + name: AppliedToLinesAccountCompanyPaymentMethod + - value: applied_to_lines,account,payment_method + name: AppliedToLinesAccountPaymentMethod + - value: applied_to_lines,accounting_period + name: AppliedToLinesAccountingPeriod + - value: applied_to_lines,accounting_period,payment_method + name: AppliedToLinesAccountingPeriodPaymentMethod + - value: applied_to_lines,company + name: AppliedToLinesCompany + - value: applied_to_lines,company,accounting_period + name: AppliedToLinesCompanyAccountingPeriod + - value: applied_to_lines,company,accounting_period,payment_method + name: AppliedToLinesCompanyAccountingPeriodPaymentMethod + - value: applied_to_lines,company,payment_method + name: AppliedToLinesCompanyPaymentMethod + - value: applied_to_lines,contact + name: AppliedToLinesContact + - value: applied_to_lines,contact,account + name: AppliedToLinesContactAccount + - value: applied_to_lines,contact,account,accounting_period + name: AppliedToLinesContactAccountAccountingPeriod + - value: applied_to_lines,contact,account,accounting_period,payment_method + name: AppliedToLinesContactAccountAccountingPeriodPaymentMethod + - value: applied_to_lines,contact,account,company + name: AppliedToLinesContactAccountCompany + - value: applied_to_lines,contact,account,company,accounting_period + name: AppliedToLinesContactAccountCompanyAccountingPeriod + - value: >- + applied_to_lines,contact,account,company,accounting_period,payment_method + name: AppliedToLinesContactAccountCompanyAccountingPeriodPaymentMethod + - value: applied_to_lines,contact,account,company,payment_method + name: AppliedToLinesContactAccountCompanyPaymentMethod + - value: applied_to_lines,contact,account,payment_method + name: AppliedToLinesContactAccountPaymentMethod + - value: applied_to_lines,contact,accounting_period + name: AppliedToLinesContactAccountingPeriod + - value: applied_to_lines,contact,accounting_period,payment_method + name: AppliedToLinesContactAccountingPeriodPaymentMethod + - value: applied_to_lines,contact,company + name: AppliedToLinesContactCompany + - value: applied_to_lines,contact,company,accounting_period + name: AppliedToLinesContactCompanyAccountingPeriod + - value: applied_to_lines,contact,company,accounting_period,payment_method + name: AppliedToLinesContactCompanyAccountingPeriodPaymentMethod + - value: applied_to_lines,contact,company,payment_method + name: AppliedToLinesContactCompanyPaymentMethod + - value: applied_to_lines,contact,payment_method + name: AppliedToLinesContactPaymentMethod + - value: applied_to_lines,payment_method + name: AppliedToLinesPaymentMethod + - company + - value: company,accounting_period + name: CompanyAccountingPeriod + - value: company,accounting_period,payment_method + name: CompanyAccountingPeriodPaymentMethod + - value: company,payment_method + name: CompanyPaymentMethod + - contact + - value: contact,account + name: ContactAccount + - value: contact,account,accounting_period + name: ContactAccountAccountingPeriod + - value: contact,account,accounting_period,payment_method + name: ContactAccountAccountingPeriodPaymentMethod + - value: contact,account,company + name: ContactAccountCompany + - value: contact,account,company,accounting_period + name: ContactAccountCompanyAccountingPeriod + - value: contact,account,company,accounting_period,payment_method + name: ContactAccountCompanyAccountingPeriodPaymentMethod + - value: contact,account,company,payment_method + name: ContactAccountCompanyPaymentMethod + - value: contact,account,payment_method + name: ContactAccountPaymentMethod + - value: contact,accounting_period + name: ContactAccountingPeriod + - value: contact,accounting_period,payment_method + name: ContactAccountingPeriodPaymentMethod + - value: contact,company + name: ContactCompany + - value: contact,company,accounting_period + name: ContactCompanyAccountingPeriod + - value: contact,company,accounting_period,payment_method + name: ContactCompanyAccountingPeriodPaymentMethod + - value: contact,company,payment_method + name: ContactCompanyPaymentMethod + - value: contact,payment_method + name: ContactPaymentMethod + - payment_method + - tracking_categories + - value: tracking_categories,account + name: TrackingCategoriesAccount + - value: tracking_categories,account,accounting_period + name: TrackingCategoriesAccountAccountingPeriod + - value: tracking_categories,account,accounting_period,payment_method + name: TrackingCategoriesAccountAccountingPeriodPaymentMethod + - value: tracking_categories,account,company + name: TrackingCategoriesAccountCompany + - value: tracking_categories,account,company,accounting_period + name: TrackingCategoriesAccountCompanyAccountingPeriod + - value: tracking_categories,account,company,accounting_period,payment_method + name: TrackingCategoriesAccountCompanyAccountingPeriodPaymentMethod + - value: tracking_categories,account,company,payment_method + name: TrackingCategoriesAccountCompanyPaymentMethod + - value: tracking_categories,account,payment_method + name: TrackingCategoriesAccountPaymentMethod + - value: tracking_categories,accounting_period + name: TrackingCategoriesAccountingPeriod + - value: tracking_categories,accounting_period,payment_method + name: TrackingCategoriesAccountingPeriodPaymentMethod + - value: tracking_categories,applied_to_lines + name: TrackingCategoriesAppliedToLines + - value: tracking_categories,applied_to_lines,account + name: TrackingCategoriesAppliedToLinesAccount + - value: tracking_categories,applied_to_lines,account,accounting_period + name: TrackingCategoriesAppliedToLinesAccountAccountingPeriod + - value: >- + tracking_categories,applied_to_lines,account,accounting_period,payment_method + name: TrackingCategoriesAppliedToLinesAccountAccountingPeriodPaymentMethod + - value: tracking_categories,applied_to_lines,account,company + name: TrackingCategoriesAppliedToLinesAccountCompany + - value: tracking_categories,applied_to_lines,account,company,accounting_period + name: TrackingCategoriesAppliedToLinesAccountCompanyAccountingPeriod + - value: >- + tracking_categories,applied_to_lines,account,company,accounting_period,payment_method + name: >- + TrackingCategoriesAppliedToLinesAccountCompanyAccountingPeriodPaymentMethod + - value: tracking_categories,applied_to_lines,account,company,payment_method + name: TrackingCategoriesAppliedToLinesAccountCompanyPaymentMethod + - value: tracking_categories,applied_to_lines,account,payment_method + name: TrackingCategoriesAppliedToLinesAccountPaymentMethod + - value: tracking_categories,applied_to_lines,accounting_period + name: TrackingCategoriesAppliedToLinesAccountingPeriod + - value: tracking_categories,applied_to_lines,accounting_period,payment_method + name: TrackingCategoriesAppliedToLinesAccountingPeriodPaymentMethod + - value: tracking_categories,applied_to_lines,company + name: TrackingCategoriesAppliedToLinesCompany + - value: tracking_categories,applied_to_lines,company,accounting_period + name: TrackingCategoriesAppliedToLinesCompanyAccountingPeriod + - value: >- + tracking_categories,applied_to_lines,company,accounting_period,payment_method + name: TrackingCategoriesAppliedToLinesCompanyAccountingPeriodPaymentMethod + - value: tracking_categories,applied_to_lines,company,payment_method + name: TrackingCategoriesAppliedToLinesCompanyPaymentMethod + - value: tracking_categories,applied_to_lines,contact + name: TrackingCategoriesAppliedToLinesContact + - value: tracking_categories,applied_to_lines,contact,account + name: TrackingCategoriesAppliedToLinesContactAccount + - value: tracking_categories,applied_to_lines,contact,account,accounting_period + name: TrackingCategoriesAppliedToLinesContactAccountAccountingPeriod + - value: >- + tracking_categories,applied_to_lines,contact,account,accounting_period,payment_method + name: >- + TrackingCategoriesAppliedToLinesContactAccountAccountingPeriodPaymentMethod + - value: tracking_categories,applied_to_lines,contact,account,company + name: TrackingCategoriesAppliedToLinesContactAccountCompany + - value: >- + tracking_categories,applied_to_lines,contact,account,company,accounting_period + name: TrackingCategoriesAppliedToLinesContactAccountCompanyAccountingPeriod + - value: >- + tracking_categories,applied_to_lines,contact,account,company,accounting_period,payment_method + name: >- + TrackingCategoriesAppliedToLinesContactAccountCompanyAccountingPeriodPaymentMethod + - value: >- + tracking_categories,applied_to_lines,contact,account,company,payment_method + name: TrackingCategoriesAppliedToLinesContactAccountCompanyPaymentMethod + - value: tracking_categories,applied_to_lines,contact,account,payment_method + name: TrackingCategoriesAppliedToLinesContactAccountPaymentMethod + - value: tracking_categories,applied_to_lines,contact,accounting_period + name: TrackingCategoriesAppliedToLinesContactAccountingPeriod + - value: >- + tracking_categories,applied_to_lines,contact,accounting_period,payment_method + name: TrackingCategoriesAppliedToLinesContactAccountingPeriodPaymentMethod + - value: tracking_categories,applied_to_lines,contact,company + name: TrackingCategoriesAppliedToLinesContactCompany + - value: tracking_categories,applied_to_lines,contact,company,accounting_period + name: TrackingCategoriesAppliedToLinesContactCompanyAccountingPeriod + - value: >- + tracking_categories,applied_to_lines,contact,company,accounting_period,payment_method + name: >- + TrackingCategoriesAppliedToLinesContactCompanyAccountingPeriodPaymentMethod + - value: tracking_categories,applied_to_lines,contact,company,payment_method + name: TrackingCategoriesAppliedToLinesContactCompanyPaymentMethod + - value: tracking_categories,applied_to_lines,contact,payment_method + name: TrackingCategoriesAppliedToLinesContactPaymentMethod + - value: tracking_categories,applied_to_lines,payment_method + name: TrackingCategoriesAppliedToLinesPaymentMethod + - value: tracking_categories,company + name: TrackingCategoriesCompany + - value: tracking_categories,company,accounting_period + name: TrackingCategoriesCompanyAccountingPeriod + - value: tracking_categories,company,accounting_period,payment_method + name: TrackingCategoriesCompanyAccountingPeriodPaymentMethod + - value: tracking_categories,company,payment_method + name: TrackingCategoriesCompanyPaymentMethod + - value: tracking_categories,contact + name: TrackingCategoriesContact + - value: tracking_categories,contact,account + name: TrackingCategoriesContactAccount + - value: tracking_categories,contact,account,accounting_period + name: TrackingCategoriesContactAccountAccountingPeriod + - value: tracking_categories,contact,account,accounting_period,payment_method + name: TrackingCategoriesContactAccountAccountingPeriodPaymentMethod + - value: tracking_categories,contact,account,company + name: TrackingCategoriesContactAccountCompany + - value: tracking_categories,contact,account,company,accounting_period + name: TrackingCategoriesContactAccountCompanyAccountingPeriod + - value: >- + tracking_categories,contact,account,company,accounting_period,payment_method + name: TrackingCategoriesContactAccountCompanyAccountingPeriodPaymentMethod + - value: tracking_categories,contact,account,company,payment_method + name: TrackingCategoriesContactAccountCompanyPaymentMethod + - value: tracking_categories,contact,account,payment_method + name: TrackingCategoriesContactAccountPaymentMethod + - value: tracking_categories,contact,accounting_period + name: TrackingCategoriesContactAccountingPeriod + - value: tracking_categories,contact,accounting_period,payment_method + name: TrackingCategoriesContactAccountingPeriodPaymentMethod + - value: tracking_categories,contact,company + name: TrackingCategoriesContactCompany + - value: tracking_categories,contact,company,accounting_period + name: TrackingCategoriesContactCompanyAccountingPeriod + - value: tracking_categories,contact,company,accounting_period,payment_method + name: TrackingCategoriesContactCompanyAccountingPeriodPaymentMethod + - value: tracking_categories,contact,company,payment_method + name: TrackingCategoriesContactCompanyPaymentMethod + - value: tracking_categories,contact,payment_method + name: TrackingCategoriesContactPaymentMethod + - value: tracking_categories,payment_method + name: TrackingCategoriesPaymentMethod + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/payments + method: GET + auth: true + docs: Returns a list of `Payment` objects. + source: + openapi: openapi/openapi.yml + request: + name: PaymentsListRequest + query-parameters: + account_id: + type: optional + docs: If provided, will only return payments for this account. + company_id: + type: optional + docs: If provided, will only return payments for this company. + contact_id: + type: optional + docs: If provided, will only return payments for this contact. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + transaction_date_after: + type: optional + docs: If provided, will only return objects created after this datetime. + transaction_date_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + response: + docs: '' + type: root.PaginatedPaymentList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: b26fd49a-cbae-470a-a8f8-bcbc119e0390 + remote_id: '987300' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + transaction_date: '2020-03-31T00:00:00Z' + contact: contact + account: account + payment_method: payment_method + currency: XUA + exchange_rate: '2.9' + company: company + total_amount: 50 + type: ACCOUNTS_PAYABLE + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + accounting_period: accounting_period + applied_to_lines: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '234' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + applied_amount: applied_amount + applied_date: '2020-03-31T00:00:00Z' + related_object_id: a47e11b6-c73b-4a0c-be31-130fc48177fa + related_object_type: INVOICE + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '235' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + applied_amount: applied_amount + applied_date: '2020-03-31T00:00:00Z' + related_object_id: 9b96a886-29a5-452b-8733-2a1e03497cf4 + related_object_type: CREDIT_NOTE + remote_updated_at: '2020-03-31T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + create: + path: /accounting/v1/payments + method: POST + auth: true + docs: Creates a `Payment` object with the given values. + source: + openapi: openapi/openapi.yml + request: + name: PaymentEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: root.PaymentRequest + content-type: application/json + response: + docs: '' + type: root.PaymentResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: b26fd49a-cbae-470a-a8f8-bcbc119e0390 + remote_id: '987300' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + transaction_date: '2020-03-31T00:00:00Z' + contact: contact + account: account + payment_method: payment_method + currency: XUA + exchange_rate: '2.9' + company: company + total_amount: 50 + type: ACCOUNTS_PAYABLE + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + accounting_period: accounting_period + applied_to_lines: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '234' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + applied_amount: applied_amount + applied_date: '2020-03-31T00:00:00Z' + related_object_id: a47e11b6-c73b-4a0c-be31-130fc48177fa + related_object_type: INVOICE + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '235' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + applied_amount: applied_amount + applied_date: '2020-03-31T00:00:00Z' + related_object_id: 9b96a886-29a5-452b-8733-2a1e03497cf4 + related_object_type: CREDIT_NOTE + remote_updated_at: '2020-03-31T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /accounting/v1/payments/{id} + method: GET + auth: true + docs: Returns a `Payment` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: PaymentsRetrieveRequest + query-parameters: + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.Payment + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: b26fd49a-cbae-470a-a8f8-bcbc119e0390 + remote_id: '987300' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + transaction_date: '2020-03-31T00:00:00Z' + contact: contact + account: account + payment_method: payment_method + currency: XUA + exchange_rate: '2.9' + company: company + total_amount: 50 + type: ACCOUNTS_PAYABLE + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + accounting_period: accounting_period + applied_to_lines: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '234' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + applied_amount: applied_amount + applied_date: '2020-03-31T00:00:00Z' + related_object_id: a47e11b6-c73b-4a0c-be31-130fc48177fa + related_object_type: INVOICE + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '235' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + applied_amount: applied_amount + applied_date: '2020-03-31T00:00:00Z' + related_object_id: 9b96a886-29a5-452b-8733-2a1e03497cf4 + related_object_type: CREDIT_NOTE + remote_updated_at: '2020-03-31T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + value: + key: value + partialUpdate: + path: /accounting/v1/payments/{id} + method: PATCH + auth: true + docs: Updates a `Payment` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: PatchedPaymentEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: root.PatchedPaymentRequest + content-type: application/json + response: + docs: '' + type: root.PaymentResponse + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + request: + model: {} + response: + body: + model: + id: b26fd49a-cbae-470a-a8f8-bcbc119e0390 + remote_id: '987300' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + transaction_date: '2020-03-31T00:00:00Z' + contact: contact + account: account + payment_method: payment_method + currency: XUA + exchange_rate: '2.9' + company: company + total_amount: 50 + type: ACCOUNTS_PAYABLE + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + accounting_period: accounting_period + applied_to_lines: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '234' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + applied_amount: applied_amount + applied_date: '2020-03-31T00:00:00Z' + related_object_id: a47e11b6-c73b-4a0c-be31-130fc48177fa + related_object_type: INVOICE + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '235' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + applied_amount: applied_amount + applied_date: '2020-03-31T00:00:00Z' + related_object_id: 9b96a886-29a5-452b-8733-2a1e03497cf4 + related_object_type: CREDIT_NOTE + remote_updated_at: '2020-03-31T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + lineItemsRemoteFieldClassesList: + path: /accounting/v1/payments/line-items/remote-field-classes + method: GET + auth: true + docs: Returns a list of `RemoteFieldClass` objects. + source: + openapi: openapi/openapi.yml + request: + name: PaymentsLineItemsRemoteFieldClassesListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_common_model_field: + type: optional + docs: >- + If provided, will only return remote field classes with this + is_common_model_field value + is_custom: + type: optional + docs: >- + If provided, will only return remote fields classes with this + is_custom value + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: root.PaginatedRemoteFieldClassList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: id + display_name: display_name + remote_key_name: remote_key_name + description: description + is_custom: true + is_required: true + field_type: string + field_format: string + field_choices: + - field_choices + metaPatchRetrieve: + path: /accounting/v1/payments/meta/patch/{id} + method: GET + auth: true + docs: Returns metadata for `Payment` PATCHs. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + response: + docs: '' + type: root.MetaResponse + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + metaPostRetrieve: + path: /accounting/v1/payments/meta/post + method: GET + auth: true + docs: Returns metadata for `Payment` POSTs. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + remoteFieldClassesList: + path: /accounting/v1/payments/remote-field-classes + method: GET + auth: true + docs: Returns a list of `RemoteFieldClass` objects. + source: + openapi: openapi/openapi.yml + request: + name: PaymentsRemoteFieldClassesListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_common_model_field: + type: optional + docs: >- + If provided, will only return remote field classes with this + is_common_model_field value + is_custom: + type: optional + docs: >- + If provided, will only return remote fields classes with this + is_custom value + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: root.PaginatedRemoteFieldClassList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: id + display_name: display_name + remote_key_name: remote_key_name + description: description + is_custom: true + is_required: true + field_type: string + field_format: string + field_choices: + - field_choices + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/phoneNumbers.yml b/.mock/definition/accounting/phoneNumbers.yml new file mode 100644 index 0000000..b673238 --- /dev/null +++ b/.mock/definition/accounting/phoneNumbers.yml @@ -0,0 +1,44 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + retrieve: + path: /accounting/v1/phone-numbers/{id} + method: GET + auth: true + docs: Returns an `AccountingPhoneNumber` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: PhoneNumbersRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.AccountingPhoneNumber + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + number: '+3198675309' + type: Mobile + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/projects.yml b/.mock/definition/accounting/projects.yml new file mode 100644 index 0000000..097c0ff --- /dev/null +++ b/.mock/definition/accounting/projects.yml @@ -0,0 +1,146 @@ +types: + ProjectsListRequestExpand: + enum: + - company + - value: company,contact + name: CompanyContact + - contact + source: + openapi: openapi/openapi.yml + ProjectsRetrieveRequestExpand: + enum: + - company + - value: company,contact + name: CompanyContact + - contact + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/projects + method: GET + auth: true + docs: Returns a list of `Project` objects. + source: + openapi: openapi/openapi.yml + request: + name: ProjectsListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: root.PaginatedProjectList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '088899' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Permissions Mapping + is_active: true + company: company + contact: contact + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + retrieve: + path: /accounting/v1/projects/{id} + method: GET + auth: true + docs: Returns a `Project` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: ProjectsRetrieveRequest + query-parameters: + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.Project + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '088899' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Permissions Mapping + is_active: true + company: company + contact: contact + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/purchaseOrders.yml b/.mock/definition/accounting/purchaseOrders.yml new file mode 100644 index 0000000..e015763 --- /dev/null +++ b/.mock/definition/accounting/purchaseOrders.yml @@ -0,0 +1,1289 @@ +types: + PurchaseOrdersListRequestExpand: + enum: + - accounting_period + - value: accounting_period,payment_term + name: AccountingPeriodPaymentTerm + - company + - value: company,accounting_period + name: CompanyAccountingPeriod + - value: company,accounting_period,payment_term + name: CompanyAccountingPeriodPaymentTerm + - value: company,payment_term + name: CompanyPaymentTerm + - delivery_address + - value: delivery_address,accounting_period + name: DeliveryAddressAccountingPeriod + - value: delivery_address,accounting_period,payment_term + name: DeliveryAddressAccountingPeriodPaymentTerm + - value: delivery_address,company + name: DeliveryAddressCompany + - value: delivery_address,company,accounting_period + name: DeliveryAddressCompanyAccountingPeriod + - value: delivery_address,company,accounting_period,payment_term + name: DeliveryAddressCompanyAccountingPeriodPaymentTerm + - value: delivery_address,company,payment_term + name: DeliveryAddressCompanyPaymentTerm + - value: delivery_address,payment_term + name: DeliveryAddressPaymentTerm + - value: delivery_address,vendor + name: DeliveryAddressVendor + - value: delivery_address,vendor,accounting_period + name: DeliveryAddressVendorAccountingPeriod + - value: delivery_address,vendor,accounting_period,payment_term + name: DeliveryAddressVendorAccountingPeriodPaymentTerm + - value: delivery_address,vendor,company + name: DeliveryAddressVendorCompany + - value: delivery_address,vendor,company,accounting_period + name: DeliveryAddressVendorCompanyAccountingPeriod + - value: delivery_address,vendor,company,accounting_period,payment_term + name: DeliveryAddressVendorCompanyAccountingPeriodPaymentTerm + - value: delivery_address,vendor,company,payment_term + name: DeliveryAddressVendorCompanyPaymentTerm + - value: delivery_address,vendor,payment_term + name: DeliveryAddressVendorPaymentTerm + - line_items + - value: line_items,accounting_period + name: LineItemsAccountingPeriod + - value: line_items,accounting_period,payment_term + name: LineItemsAccountingPeriodPaymentTerm + - value: line_items,company + name: LineItemsCompany + - value: line_items,company,accounting_period + name: LineItemsCompanyAccountingPeriod + - value: line_items,company,accounting_period,payment_term + name: LineItemsCompanyAccountingPeriodPaymentTerm + - value: line_items,company,payment_term + name: LineItemsCompanyPaymentTerm + - value: line_items,delivery_address + name: LineItemsDeliveryAddress + - value: line_items,delivery_address,accounting_period + name: LineItemsDeliveryAddressAccountingPeriod + - value: line_items,delivery_address,accounting_period,payment_term + name: LineItemsDeliveryAddressAccountingPeriodPaymentTerm + - value: line_items,delivery_address,company + name: LineItemsDeliveryAddressCompany + - value: line_items,delivery_address,company,accounting_period + name: LineItemsDeliveryAddressCompanyAccountingPeriod + - value: line_items,delivery_address,company,accounting_period,payment_term + name: LineItemsDeliveryAddressCompanyAccountingPeriodPaymentTerm + - value: line_items,delivery_address,company,payment_term + name: LineItemsDeliveryAddressCompanyPaymentTerm + - value: line_items,delivery_address,payment_term + name: LineItemsDeliveryAddressPaymentTerm + - value: line_items,delivery_address,vendor + name: LineItemsDeliveryAddressVendor + - value: line_items,delivery_address,vendor,accounting_period + name: LineItemsDeliveryAddressVendorAccountingPeriod + - value: line_items,delivery_address,vendor,accounting_period,payment_term + name: LineItemsDeliveryAddressVendorAccountingPeriodPaymentTerm + - value: line_items,delivery_address,vendor,company + name: LineItemsDeliveryAddressVendorCompany + - value: line_items,delivery_address,vendor,company,accounting_period + name: LineItemsDeliveryAddressVendorCompanyAccountingPeriod + - value: >- + line_items,delivery_address,vendor,company,accounting_period,payment_term + name: LineItemsDeliveryAddressVendorCompanyAccountingPeriodPaymentTerm + - value: line_items,delivery_address,vendor,company,payment_term + name: LineItemsDeliveryAddressVendorCompanyPaymentTerm + - value: line_items,delivery_address,vendor,payment_term + name: LineItemsDeliveryAddressVendorPaymentTerm + - value: line_items,payment_term + name: LineItemsPaymentTerm + - value: line_items,tracking_categories + name: LineItemsTrackingCategories + - value: line_items,tracking_categories,accounting_period + name: LineItemsTrackingCategoriesAccountingPeriod + - value: line_items,tracking_categories,accounting_period,payment_term + name: LineItemsTrackingCategoriesAccountingPeriodPaymentTerm + - value: line_items,tracking_categories,company + name: LineItemsTrackingCategoriesCompany + - value: line_items,tracking_categories,company,accounting_period + name: LineItemsTrackingCategoriesCompanyAccountingPeriod + - value: line_items,tracking_categories,company,accounting_period,payment_term + name: LineItemsTrackingCategoriesCompanyAccountingPeriodPaymentTerm + - value: line_items,tracking_categories,company,payment_term + name: LineItemsTrackingCategoriesCompanyPaymentTerm + - value: line_items,tracking_categories,delivery_address + name: LineItemsTrackingCategoriesDeliveryAddress + - value: line_items,tracking_categories,delivery_address,accounting_period + name: LineItemsTrackingCategoriesDeliveryAddressAccountingPeriod + - value: >- + line_items,tracking_categories,delivery_address,accounting_period,payment_term + name: LineItemsTrackingCategoriesDeliveryAddressAccountingPeriodPaymentTerm + - value: line_items,tracking_categories,delivery_address,company + name: LineItemsTrackingCategoriesDeliveryAddressCompany + - value: >- + line_items,tracking_categories,delivery_address,company,accounting_period + name: LineItemsTrackingCategoriesDeliveryAddressCompanyAccountingPeriod + - value: >- + line_items,tracking_categories,delivery_address,company,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesDeliveryAddressCompanyAccountingPeriodPaymentTerm + - value: line_items,tracking_categories,delivery_address,company,payment_term + name: LineItemsTrackingCategoriesDeliveryAddressCompanyPaymentTerm + - value: line_items,tracking_categories,delivery_address,payment_term + name: LineItemsTrackingCategoriesDeliveryAddressPaymentTerm + - value: line_items,tracking_categories,delivery_address,vendor + name: LineItemsTrackingCategoriesDeliveryAddressVendor + - value: >- + line_items,tracking_categories,delivery_address,vendor,accounting_period + name: LineItemsTrackingCategoriesDeliveryAddressVendorAccountingPeriod + - value: >- + line_items,tracking_categories,delivery_address,vendor,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesDeliveryAddressVendorAccountingPeriodPaymentTerm + - value: line_items,tracking_categories,delivery_address,vendor,company + name: LineItemsTrackingCategoriesDeliveryAddressVendorCompany + - value: >- + line_items,tracking_categories,delivery_address,vendor,company,accounting_period + name: >- + LineItemsTrackingCategoriesDeliveryAddressVendorCompanyAccountingPeriod + - value: >- + line_items,tracking_categories,delivery_address,vendor,company,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesDeliveryAddressVendorCompanyAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,delivery_address,vendor,company,payment_term + name: LineItemsTrackingCategoriesDeliveryAddressVendorCompanyPaymentTerm + - value: line_items,tracking_categories,delivery_address,vendor,payment_term + name: LineItemsTrackingCategoriesDeliveryAddressVendorPaymentTerm + - value: line_items,tracking_categories,payment_term + name: LineItemsTrackingCategoriesPaymentTerm + - value: line_items,tracking_categories,vendor + name: LineItemsTrackingCategoriesVendor + - value: line_items,tracking_categories,vendor,accounting_period + name: LineItemsTrackingCategoriesVendorAccountingPeriod + - value: line_items,tracking_categories,vendor,accounting_period,payment_term + name: LineItemsTrackingCategoriesVendorAccountingPeriodPaymentTerm + - value: line_items,tracking_categories,vendor,company + name: LineItemsTrackingCategoriesVendorCompany + - value: line_items,tracking_categories,vendor,company,accounting_period + name: LineItemsTrackingCategoriesVendorCompanyAccountingPeriod + - value: >- + line_items,tracking_categories,vendor,company,accounting_period,payment_term + name: LineItemsTrackingCategoriesVendorCompanyAccountingPeriodPaymentTerm + - value: line_items,tracking_categories,vendor,company,payment_term + name: LineItemsTrackingCategoriesVendorCompanyPaymentTerm + - value: line_items,tracking_categories,vendor,payment_term + name: LineItemsTrackingCategoriesVendorPaymentTerm + - value: line_items,vendor + name: LineItemsVendor + - value: line_items,vendor,accounting_period + name: LineItemsVendorAccountingPeriod + - value: line_items,vendor,accounting_period,payment_term + name: LineItemsVendorAccountingPeriodPaymentTerm + - value: line_items,vendor,company + name: LineItemsVendorCompany + - value: line_items,vendor,company,accounting_period + name: LineItemsVendorCompanyAccountingPeriod + - value: line_items,vendor,company,accounting_period,payment_term + name: LineItemsVendorCompanyAccountingPeriodPaymentTerm + - value: line_items,vendor,company,payment_term + name: LineItemsVendorCompanyPaymentTerm + - value: line_items,vendor,payment_term + name: LineItemsVendorPaymentTerm + - payment_term + - tracking_categories + - value: tracking_categories,accounting_period + name: TrackingCategoriesAccountingPeriod + - value: tracking_categories,accounting_period,payment_term + name: TrackingCategoriesAccountingPeriodPaymentTerm + - value: tracking_categories,company + name: TrackingCategoriesCompany + - value: tracking_categories,company,accounting_period + name: TrackingCategoriesCompanyAccountingPeriod + - value: tracking_categories,company,accounting_period,payment_term + name: TrackingCategoriesCompanyAccountingPeriodPaymentTerm + - value: tracking_categories,company,payment_term + name: TrackingCategoriesCompanyPaymentTerm + - value: tracking_categories,delivery_address + name: TrackingCategoriesDeliveryAddress + - value: tracking_categories,delivery_address,accounting_period + name: TrackingCategoriesDeliveryAddressAccountingPeriod + - value: tracking_categories,delivery_address,accounting_period,payment_term + name: TrackingCategoriesDeliveryAddressAccountingPeriodPaymentTerm + - value: tracking_categories,delivery_address,company + name: TrackingCategoriesDeliveryAddressCompany + - value: tracking_categories,delivery_address,company,accounting_period + name: TrackingCategoriesDeliveryAddressCompanyAccountingPeriod + - value: >- + tracking_categories,delivery_address,company,accounting_period,payment_term + name: TrackingCategoriesDeliveryAddressCompanyAccountingPeriodPaymentTerm + - value: tracking_categories,delivery_address,company,payment_term + name: TrackingCategoriesDeliveryAddressCompanyPaymentTerm + - value: tracking_categories,delivery_address,payment_term + name: TrackingCategoriesDeliveryAddressPaymentTerm + - value: tracking_categories,delivery_address,vendor + name: TrackingCategoriesDeliveryAddressVendor + - value: tracking_categories,delivery_address,vendor,accounting_period + name: TrackingCategoriesDeliveryAddressVendorAccountingPeriod + - value: >- + tracking_categories,delivery_address,vendor,accounting_period,payment_term + name: TrackingCategoriesDeliveryAddressVendorAccountingPeriodPaymentTerm + - value: tracking_categories,delivery_address,vendor,company + name: TrackingCategoriesDeliveryAddressVendorCompany + - value: tracking_categories,delivery_address,vendor,company,accounting_period + name: TrackingCategoriesDeliveryAddressVendorCompanyAccountingPeriod + - value: >- + tracking_categories,delivery_address,vendor,company,accounting_period,payment_term + name: >- + TrackingCategoriesDeliveryAddressVendorCompanyAccountingPeriodPaymentTerm + - value: tracking_categories,delivery_address,vendor,company,payment_term + name: TrackingCategoriesDeliveryAddressVendorCompanyPaymentTerm + - value: tracking_categories,delivery_address,vendor,payment_term + name: TrackingCategoriesDeliveryAddressVendorPaymentTerm + - value: tracking_categories,payment_term + name: TrackingCategoriesPaymentTerm + - value: tracking_categories,vendor + name: TrackingCategoriesVendor + - value: tracking_categories,vendor,accounting_period + name: TrackingCategoriesVendorAccountingPeriod + - value: tracking_categories,vendor,accounting_period,payment_term + name: TrackingCategoriesVendorAccountingPeriodPaymentTerm + - value: tracking_categories,vendor,company + name: TrackingCategoriesVendorCompany + - value: tracking_categories,vendor,company,accounting_period + name: TrackingCategoriesVendorCompanyAccountingPeriod + - value: tracking_categories,vendor,company,accounting_period,payment_term + name: TrackingCategoriesVendorCompanyAccountingPeriodPaymentTerm + - value: tracking_categories,vendor,company,payment_term + name: TrackingCategoriesVendorCompanyPaymentTerm + - value: tracking_categories,vendor,payment_term + name: TrackingCategoriesVendorPaymentTerm + - vendor + - value: vendor,accounting_period + name: VendorAccountingPeriod + - value: vendor,accounting_period,payment_term + name: VendorAccountingPeriodPaymentTerm + - value: vendor,company + name: VendorCompany + - value: vendor,company,accounting_period + name: VendorCompanyAccountingPeriod + - value: vendor,company,accounting_period,payment_term + name: VendorCompanyAccountingPeriodPaymentTerm + - value: vendor,company,payment_term + name: VendorCompanyPaymentTerm + - value: vendor,payment_term + name: VendorPaymentTerm + source: + openapi: openapi/openapi.yml + PurchaseOrdersRetrieveRequestExpand: + enum: + - accounting_period + - value: accounting_period,payment_term + name: AccountingPeriodPaymentTerm + - company + - value: company,accounting_period + name: CompanyAccountingPeriod + - value: company,accounting_period,payment_term + name: CompanyAccountingPeriodPaymentTerm + - value: company,payment_term + name: CompanyPaymentTerm + - delivery_address + - value: delivery_address,accounting_period + name: DeliveryAddressAccountingPeriod + - value: delivery_address,accounting_period,payment_term + name: DeliveryAddressAccountingPeriodPaymentTerm + - value: delivery_address,company + name: DeliveryAddressCompany + - value: delivery_address,company,accounting_period + name: DeliveryAddressCompanyAccountingPeriod + - value: delivery_address,company,accounting_period,payment_term + name: DeliveryAddressCompanyAccountingPeriodPaymentTerm + - value: delivery_address,company,payment_term + name: DeliveryAddressCompanyPaymentTerm + - value: delivery_address,payment_term + name: DeliveryAddressPaymentTerm + - value: delivery_address,vendor + name: DeliveryAddressVendor + - value: delivery_address,vendor,accounting_period + name: DeliveryAddressVendorAccountingPeriod + - value: delivery_address,vendor,accounting_period,payment_term + name: DeliveryAddressVendorAccountingPeriodPaymentTerm + - value: delivery_address,vendor,company + name: DeliveryAddressVendorCompany + - value: delivery_address,vendor,company,accounting_period + name: DeliveryAddressVendorCompanyAccountingPeriod + - value: delivery_address,vendor,company,accounting_period,payment_term + name: DeliveryAddressVendorCompanyAccountingPeriodPaymentTerm + - value: delivery_address,vendor,company,payment_term + name: DeliveryAddressVendorCompanyPaymentTerm + - value: delivery_address,vendor,payment_term + name: DeliveryAddressVendorPaymentTerm + - line_items + - value: line_items,accounting_period + name: LineItemsAccountingPeriod + - value: line_items,accounting_period,payment_term + name: LineItemsAccountingPeriodPaymentTerm + - value: line_items,company + name: LineItemsCompany + - value: line_items,company,accounting_period + name: LineItemsCompanyAccountingPeriod + - value: line_items,company,accounting_period,payment_term + name: LineItemsCompanyAccountingPeriodPaymentTerm + - value: line_items,company,payment_term + name: LineItemsCompanyPaymentTerm + - value: line_items,delivery_address + name: LineItemsDeliveryAddress + - value: line_items,delivery_address,accounting_period + name: LineItemsDeliveryAddressAccountingPeriod + - value: line_items,delivery_address,accounting_period,payment_term + name: LineItemsDeliveryAddressAccountingPeriodPaymentTerm + - value: line_items,delivery_address,company + name: LineItemsDeliveryAddressCompany + - value: line_items,delivery_address,company,accounting_period + name: LineItemsDeliveryAddressCompanyAccountingPeriod + - value: line_items,delivery_address,company,accounting_period,payment_term + name: LineItemsDeliveryAddressCompanyAccountingPeriodPaymentTerm + - value: line_items,delivery_address,company,payment_term + name: LineItemsDeliveryAddressCompanyPaymentTerm + - value: line_items,delivery_address,payment_term + name: LineItemsDeliveryAddressPaymentTerm + - value: line_items,delivery_address,vendor + name: LineItemsDeliveryAddressVendor + - value: line_items,delivery_address,vendor,accounting_period + name: LineItemsDeliveryAddressVendorAccountingPeriod + - value: line_items,delivery_address,vendor,accounting_period,payment_term + name: LineItemsDeliveryAddressVendorAccountingPeriodPaymentTerm + - value: line_items,delivery_address,vendor,company + name: LineItemsDeliveryAddressVendorCompany + - value: line_items,delivery_address,vendor,company,accounting_period + name: LineItemsDeliveryAddressVendorCompanyAccountingPeriod + - value: >- + line_items,delivery_address,vendor,company,accounting_period,payment_term + name: LineItemsDeliveryAddressVendorCompanyAccountingPeriodPaymentTerm + - value: line_items,delivery_address,vendor,company,payment_term + name: LineItemsDeliveryAddressVendorCompanyPaymentTerm + - value: line_items,delivery_address,vendor,payment_term + name: LineItemsDeliveryAddressVendorPaymentTerm + - value: line_items,payment_term + name: LineItemsPaymentTerm + - value: line_items,tracking_categories + name: LineItemsTrackingCategories + - value: line_items,tracking_categories,accounting_period + name: LineItemsTrackingCategoriesAccountingPeriod + - value: line_items,tracking_categories,accounting_period,payment_term + name: LineItemsTrackingCategoriesAccountingPeriodPaymentTerm + - value: line_items,tracking_categories,company + name: LineItemsTrackingCategoriesCompany + - value: line_items,tracking_categories,company,accounting_period + name: LineItemsTrackingCategoriesCompanyAccountingPeriod + - value: line_items,tracking_categories,company,accounting_period,payment_term + name: LineItemsTrackingCategoriesCompanyAccountingPeriodPaymentTerm + - value: line_items,tracking_categories,company,payment_term + name: LineItemsTrackingCategoriesCompanyPaymentTerm + - value: line_items,tracking_categories,delivery_address + name: LineItemsTrackingCategoriesDeliveryAddress + - value: line_items,tracking_categories,delivery_address,accounting_period + name: LineItemsTrackingCategoriesDeliveryAddressAccountingPeriod + - value: >- + line_items,tracking_categories,delivery_address,accounting_period,payment_term + name: LineItemsTrackingCategoriesDeliveryAddressAccountingPeriodPaymentTerm + - value: line_items,tracking_categories,delivery_address,company + name: LineItemsTrackingCategoriesDeliveryAddressCompany + - value: >- + line_items,tracking_categories,delivery_address,company,accounting_period + name: LineItemsTrackingCategoriesDeliveryAddressCompanyAccountingPeriod + - value: >- + line_items,tracking_categories,delivery_address,company,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesDeliveryAddressCompanyAccountingPeriodPaymentTerm + - value: line_items,tracking_categories,delivery_address,company,payment_term + name: LineItemsTrackingCategoriesDeliveryAddressCompanyPaymentTerm + - value: line_items,tracking_categories,delivery_address,payment_term + name: LineItemsTrackingCategoriesDeliveryAddressPaymentTerm + - value: line_items,tracking_categories,delivery_address,vendor + name: LineItemsTrackingCategoriesDeliveryAddressVendor + - value: >- + line_items,tracking_categories,delivery_address,vendor,accounting_period + name: LineItemsTrackingCategoriesDeliveryAddressVendorAccountingPeriod + - value: >- + line_items,tracking_categories,delivery_address,vendor,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesDeliveryAddressVendorAccountingPeriodPaymentTerm + - value: line_items,tracking_categories,delivery_address,vendor,company + name: LineItemsTrackingCategoriesDeliveryAddressVendorCompany + - value: >- + line_items,tracking_categories,delivery_address,vendor,company,accounting_period + name: >- + LineItemsTrackingCategoriesDeliveryAddressVendorCompanyAccountingPeriod + - value: >- + line_items,tracking_categories,delivery_address,vendor,company,accounting_period,payment_term + name: >- + LineItemsTrackingCategoriesDeliveryAddressVendorCompanyAccountingPeriodPaymentTerm + - value: >- + line_items,tracking_categories,delivery_address,vendor,company,payment_term + name: LineItemsTrackingCategoriesDeliveryAddressVendorCompanyPaymentTerm + - value: line_items,tracking_categories,delivery_address,vendor,payment_term + name: LineItemsTrackingCategoriesDeliveryAddressVendorPaymentTerm + - value: line_items,tracking_categories,payment_term + name: LineItemsTrackingCategoriesPaymentTerm + - value: line_items,tracking_categories,vendor + name: LineItemsTrackingCategoriesVendor + - value: line_items,tracking_categories,vendor,accounting_period + name: LineItemsTrackingCategoriesVendorAccountingPeriod + - value: line_items,tracking_categories,vendor,accounting_period,payment_term + name: LineItemsTrackingCategoriesVendorAccountingPeriodPaymentTerm + - value: line_items,tracking_categories,vendor,company + name: LineItemsTrackingCategoriesVendorCompany + - value: line_items,tracking_categories,vendor,company,accounting_period + name: LineItemsTrackingCategoriesVendorCompanyAccountingPeriod + - value: >- + line_items,tracking_categories,vendor,company,accounting_period,payment_term + name: LineItemsTrackingCategoriesVendorCompanyAccountingPeriodPaymentTerm + - value: line_items,tracking_categories,vendor,company,payment_term + name: LineItemsTrackingCategoriesVendorCompanyPaymentTerm + - value: line_items,tracking_categories,vendor,payment_term + name: LineItemsTrackingCategoriesVendorPaymentTerm + - value: line_items,vendor + name: LineItemsVendor + - value: line_items,vendor,accounting_period + name: LineItemsVendorAccountingPeriod + - value: line_items,vendor,accounting_period,payment_term + name: LineItemsVendorAccountingPeriodPaymentTerm + - value: line_items,vendor,company + name: LineItemsVendorCompany + - value: line_items,vendor,company,accounting_period + name: LineItemsVendorCompanyAccountingPeriod + - value: line_items,vendor,company,accounting_period,payment_term + name: LineItemsVendorCompanyAccountingPeriodPaymentTerm + - value: line_items,vendor,company,payment_term + name: LineItemsVendorCompanyPaymentTerm + - value: line_items,vendor,payment_term + name: LineItemsVendorPaymentTerm + - payment_term + - tracking_categories + - value: tracking_categories,accounting_period + name: TrackingCategoriesAccountingPeriod + - value: tracking_categories,accounting_period,payment_term + name: TrackingCategoriesAccountingPeriodPaymentTerm + - value: tracking_categories,company + name: TrackingCategoriesCompany + - value: tracking_categories,company,accounting_period + name: TrackingCategoriesCompanyAccountingPeriod + - value: tracking_categories,company,accounting_period,payment_term + name: TrackingCategoriesCompanyAccountingPeriodPaymentTerm + - value: tracking_categories,company,payment_term + name: TrackingCategoriesCompanyPaymentTerm + - value: tracking_categories,delivery_address + name: TrackingCategoriesDeliveryAddress + - value: tracking_categories,delivery_address,accounting_period + name: TrackingCategoriesDeliveryAddressAccountingPeriod + - value: tracking_categories,delivery_address,accounting_period,payment_term + name: TrackingCategoriesDeliveryAddressAccountingPeriodPaymentTerm + - value: tracking_categories,delivery_address,company + name: TrackingCategoriesDeliveryAddressCompany + - value: tracking_categories,delivery_address,company,accounting_period + name: TrackingCategoriesDeliveryAddressCompanyAccountingPeriod + - value: >- + tracking_categories,delivery_address,company,accounting_period,payment_term + name: TrackingCategoriesDeliveryAddressCompanyAccountingPeriodPaymentTerm + - value: tracking_categories,delivery_address,company,payment_term + name: TrackingCategoriesDeliveryAddressCompanyPaymentTerm + - value: tracking_categories,delivery_address,payment_term + name: TrackingCategoriesDeliveryAddressPaymentTerm + - value: tracking_categories,delivery_address,vendor + name: TrackingCategoriesDeliveryAddressVendor + - value: tracking_categories,delivery_address,vendor,accounting_period + name: TrackingCategoriesDeliveryAddressVendorAccountingPeriod + - value: >- + tracking_categories,delivery_address,vendor,accounting_period,payment_term + name: TrackingCategoriesDeliveryAddressVendorAccountingPeriodPaymentTerm + - value: tracking_categories,delivery_address,vendor,company + name: TrackingCategoriesDeliveryAddressVendorCompany + - value: tracking_categories,delivery_address,vendor,company,accounting_period + name: TrackingCategoriesDeliveryAddressVendorCompanyAccountingPeriod + - value: >- + tracking_categories,delivery_address,vendor,company,accounting_period,payment_term + name: >- + TrackingCategoriesDeliveryAddressVendorCompanyAccountingPeriodPaymentTerm + - value: tracking_categories,delivery_address,vendor,company,payment_term + name: TrackingCategoriesDeliveryAddressVendorCompanyPaymentTerm + - value: tracking_categories,delivery_address,vendor,payment_term + name: TrackingCategoriesDeliveryAddressVendorPaymentTerm + - value: tracking_categories,payment_term + name: TrackingCategoriesPaymentTerm + - value: tracking_categories,vendor + name: TrackingCategoriesVendor + - value: tracking_categories,vendor,accounting_period + name: TrackingCategoriesVendorAccountingPeriod + - value: tracking_categories,vendor,accounting_period,payment_term + name: TrackingCategoriesVendorAccountingPeriodPaymentTerm + - value: tracking_categories,vendor,company + name: TrackingCategoriesVendorCompany + - value: tracking_categories,vendor,company,accounting_period + name: TrackingCategoriesVendorCompanyAccountingPeriod + - value: tracking_categories,vendor,company,accounting_period,payment_term + name: TrackingCategoriesVendorCompanyAccountingPeriodPaymentTerm + - value: tracking_categories,vendor,company,payment_term + name: TrackingCategoriesVendorCompanyPaymentTerm + - value: tracking_categories,vendor,payment_term + name: TrackingCategoriesVendorPaymentTerm + - vendor + - value: vendor,accounting_period + name: VendorAccountingPeriod + - value: vendor,accounting_period,payment_term + name: VendorAccountingPeriodPaymentTerm + - value: vendor,company + name: VendorCompany + - value: vendor,company,accounting_period + name: VendorCompanyAccountingPeriod + - value: vendor,company,accounting_period,payment_term + name: VendorCompanyAccountingPeriodPaymentTerm + - value: vendor,company,payment_term + name: VendorCompanyPaymentTerm + - value: vendor,payment_term + name: VendorPaymentTerm + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/purchase-orders + method: GET + auth: true + docs: Returns a list of `PurchaseOrder` objects. + source: + openapi: openapi/openapi.yml + request: + name: PurchaseOrdersListRequest + query-parameters: + company_id: + type: optional + docs: If provided, will only return purchase orders for this company. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + issue_date_after: + type: optional + docs: If provided, will only return objects created after this datetime. + issue_date_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + remote_id: + type: optional + docs: The API provider's ID for the given object. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: root.PaginatedPurchaseOrderList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 0048ea5b-911e-4dff-9364-92070dea62ff + remote_id: '239741' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + status: DRAFT + issue_date: '2020-03-31T00:00:00Z' + purchase_order_number: PO1234 + delivery_date: '2020-04-15T00:00:00Z' + delivery_address: delivery_address + customer: 3e442c5d-8f51-4103-b5c9-dcee39c30a08 + vendor: vendor + memo: private note + company: company + total_amount: 260 + currency: XUA + exchange_rate: '2.9' + payment_term: payment_term + line_items: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121222' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + description: Pickleball paddles + unit_price: 25 + quantity: 10 + item: 0958cbc6-6040-430a-848e-aafacbadf4ae + tracking_categories: + - f1214c24-2702-4617-b74b-3ddecfc0d384 + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + tax_amount: tax_amount + total_line_amount: total_line_amount + currency: USD + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + exchange_rate: '2.9' + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: false + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + description: Pickleball Balls + unit_price: 1 + quantity: 10 + item: 249c9faa-3045-4a31-953b-8f22d3613301 + tracking_categories: + - f1214c24-2702-4617-b74b-3ddecfc0d384 + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + tax_amount: tax_amount + total_line_amount: total_line_amount + inclusive_of_tax: true + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + accounting_period: accounting_period + remote_created_at: '2020-03-31T00:00:00Z' + remote_updated_at: '2020-03-31T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + create: + path: /accounting/v1/purchase-orders + method: POST + auth: true + docs: Creates a `PurchaseOrder` object with the given values. + source: + openapi: openapi/openapi.yml + request: + name: PurchaseOrderEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: root.PurchaseOrderRequest + content-type: application/json + response: + docs: '' + type: root.PurchaseOrderResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: 0048ea5b-911e-4dff-9364-92070dea62ff + remote_id: '239741' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + status: DRAFT + issue_date: '2020-03-31T00:00:00Z' + purchase_order_number: PO1234 + delivery_date: '2020-04-15T00:00:00Z' + delivery_address: delivery_address + customer: 3e442c5d-8f51-4103-b5c9-dcee39c30a08 + vendor: vendor + memo: private note + company: company + total_amount: 260 + currency: XUA + exchange_rate: '2.9' + payment_term: payment_term + line_items: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121222' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + description: Pickleball paddles + unit_price: 25 + quantity: 10 + item: 0958cbc6-6040-430a-848e-aafacbadf4ae + tracking_categories: + - f1214c24-2702-4617-b74b-3ddecfc0d384 + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + tax_amount: tax_amount + total_line_amount: total_line_amount + currency: USD + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + exchange_rate: '2.9' + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: false + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + description: Pickleball Balls + unit_price: 1 + quantity: 10 + item: 249c9faa-3045-4a31-953b-8f22d3613301 + tracking_categories: + - f1214c24-2702-4617-b74b-3ddecfc0d384 + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + tax_amount: tax_amount + total_line_amount: total_line_amount + inclusive_of_tax: true + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + accounting_period: accounting_period + remote_created_at: '2020-03-31T00:00:00Z' + remote_updated_at: '2020-03-31T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /accounting/v1/purchase-orders/{id} + method: GET + auth: true + docs: Returns a `PurchaseOrder` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: PurchaseOrdersRetrieveRequest + query-parameters: + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: root.PurchaseOrder + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 0048ea5b-911e-4dff-9364-92070dea62ff + remote_id: '239741' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + status: DRAFT + issue_date: '2020-03-31T00:00:00Z' + purchase_order_number: PO1234 + delivery_date: '2020-04-15T00:00:00Z' + delivery_address: delivery_address + customer: 3e442c5d-8f51-4103-b5c9-dcee39c30a08 + vendor: vendor + memo: private note + company: company + total_amount: 260 + currency: XUA + exchange_rate: '2.9' + payment_term: payment_term + line_items: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121222' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + description: Pickleball paddles + unit_price: 25 + quantity: 10 + item: 0958cbc6-6040-430a-848e-aafacbadf4ae + account: account + tracking_category: tracking_category + tracking_categories: + - f1214c24-2702-4617-b74b-3ddecfc0d384 + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + tax_amount: tax_amount + total_line_amount: total_line_amount + currency: USD + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + exchange_rate: '2.9' + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: false + remote_fields: + - remote_field_class: remote_field_class + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121222' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + description: Pickleball Balls + unit_price: 1 + quantity: 10 + item: 249c9faa-3045-4a31-953b-8f22d3613301 + account: account + tracking_category: tracking_category + tracking_categories: + - f1214c24-2702-4617-b74b-3ddecfc0d384 + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + tax_amount: tax_amount + total_line_amount: total_line_amount + currency: XUA + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + exchange_rate: '2.9' + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: true + remote_fields: + - remote_field_class: remote_field_class + inclusive_of_tax: true + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + accounting_period: accounting_period + remote_created_at: '2020-03-31T00:00:00Z' + remote_updated_at: '2020-03-31T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + value: + key: value + lineItemsRemoteFieldClassesList: + path: /accounting/v1/purchase-orders/line-items/remote-field-classes + method: GET + auth: true + docs: Returns a list of `RemoteFieldClass` objects. + source: + openapi: openapi/openapi.yml + request: + name: PurchaseOrdersLineItemsRemoteFieldClassesListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_common_model_field: + type: optional + docs: >- + If provided, will only return remote field classes with this + is_common_model_field value + is_custom: + type: optional + docs: >- + If provided, will only return remote fields classes with this + is_custom value + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: root.PaginatedRemoteFieldClassList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: id + display_name: display_name + remote_key_name: remote_key_name + description: description + is_custom: true + is_required: true + field_type: string + field_format: string + field_choices: + - field_choices + metaPostRetrieve: + path: /accounting/v1/purchase-orders/meta/post + method: GET + auth: true + docs: Returns metadata for `PurchaseOrder` POSTs. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + remoteFieldClassesList: + path: /accounting/v1/purchase-orders/remote-field-classes + method: GET + auth: true + docs: Returns a list of `RemoteFieldClass` objects. + source: + openapi: openapi/openapi.yml + request: + name: PurchaseOrdersRemoteFieldClassesListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_common_model_field: + type: optional + docs: >- + If provided, will only return remote field classes with this + is_common_model_field value + is_custom: + type: optional + docs: >- + If provided, will only return remote fields classes with this + is_custom value + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: root.PaginatedRemoteFieldClassList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: id + display_name: display_name + remote_key_name: remote_key_name + description: description + is_custom: true + is_required: true + field_type: string + field_format: string + field_choices: + - field_choices + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/regenerateKey.yml b/.mock/definition/accounting/regenerateKey.yml new file mode 100644 index 0000000..39fe26f --- /dev/null +++ b/.mock/definition/accounting/regenerateKey.yml @@ -0,0 +1,36 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /accounting/v1/regenerate-key + method: POST + auth: true + docs: Exchange remote keys. + source: + openapi: openapi/openapi.yml + request: + name: RemoteKeyForRegenerationRequest + body: + properties: + name: + type: string + docs: The name of the remote key + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: root.RemoteKey + status-code: 200 + examples: + - request: + name: Remote Deployment Key 1 + response: + body: + name: Remote Deployment Key 1 + key: hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/scopes.yml b/.mock/definition/accounting/scopes.yml new file mode 100644 index 0000000..ab81c59 --- /dev/null +++ b/.mock/definition/accounting/scopes.yml @@ -0,0 +1,160 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + default_scopes_retrieve: + path: /accounting/v1/default-scopes + method: GET + auth: true + docs: >- + 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/5950052-common-model-and-field-scopes). + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.CommonModelScopeApi + status-code: 200 + examples: + - response: + body: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - created_at + - custom_fields + - date_of_birth + - first_name + - gender + - remote_created_at + - remote_data + disabled_fields: + - company + - employments + - groups + - home_location + - manager + - work_location + linked_account_scopes_retrieve: + path: /accounting/v1/linked-account-scopes + method: GET + auth: true + docs: >- + Get all available permissions for Merge Common Models and fields for a + single Linked Account. [Learn + more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.CommonModelScopeApi + status-code: 200 + examples: + - headers: {} + response: + body: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - created_at + - custom_fields + - date_of_birth + - first_name + - gender + - remote_created_at + - remote_data + disabled_fields: + - company + - employments + - groups + - home_location + - manager + - work_location + linked_account_scopes_create: + path: /accounting/v1/linked-account-scopes + method: POST + auth: true + docs: >- + 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/5950052-common-model-and-field-scopes) + source: + openapi: openapi/openapi.yml + request: + name: LinkedAccountCommonModelScopeDeserializerRequest + body: + properties: + common_models: + docs: The common models you want to update the scopes for + type: list + content-type: application/json + response: + docs: '' + type: root.CommonModelScopeApi + status-code: 200 + examples: + - headers: {} + request: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - home_location + disabled_fields: + - work_location + - model_name: Benefit + model_permissions: + WRITE: + is_enabled: false + response: + body: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - created_at + - custom_fields + - date_of_birth + - first_name + - gender + - remote_created_at + - remote_data + disabled_fields: + - company + - employments + - groups + - home_location + - manager + - work_location + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/syncStatus.yml b/.mock/definition/accounting/syncStatus.yml new file mode 100644 index 0000000..38dcf2c --- /dev/null +++ b/.mock/definition/accounting/syncStatus.yml @@ -0,0 +1,55 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/sync-status + method: GET + auth: true + docs: >- + Get sync status for the current sync and the most recently finished + sync. `last_sync_start` represents the most recent time any sync began. + `last_sync_finished` represents the most recent time any sync completed. + These timestamps may correspond to different sync instances which may + result in a sync start time being later than a separate sync completed + time. To ensure you are retrieving the latest available data reference + the `last_sync_finished` timestamp where `last_sync_result` is `DONE`. + Possible values for `status` and `last_sync_result` are `DISABLED`, + `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more + about sync status in our [Help + Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). + source: + openapi: openapi/openapi.yml + request: + name: SyncStatusListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: root.PaginatedSyncStatusList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - model_name: Invoice + model_id: accounting.Invoices + last_sync_start: '2021-03-30T19:44:18Z' + next_sync_start: '2021-03-30T20:44:18Z' + last_sync_result: SYNCING + last_sync_finished: '2021-03-30T19:55:18Z' + status: SYNCING + is_initial_sync: true + selective_sync_configurations_usage: IN_NEXT_SYNC + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/taxRates.yml b/.mock/definition/accounting/taxRates.yml new file mode 100644 index 0000000..3ff1519 --- /dev/null +++ b/.mock/definition/accounting/taxRates.yml @@ -0,0 +1,185 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/tax-rates + method: GET + auth: true + docs: Returns a list of `TaxRate` objects. + source: + openapi: openapi/openapi.yml + request: + name: TaxRatesListRequest + query-parameters: + company_id: + type: optional + docs: If provided, will only return tax rates for this company. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + name: + type: optional + docs: If provided, will only return TaxRates with this name. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: root.PaginatedTaxRateList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: b82302de-852e-4e60-b050-edf9da3b7c02 + remote_id: '039111' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + company: company + code: '890' + name: State tax rate + description: Sales Tax + status: ACTIVE + country: US + total_tax_rate: 15 + effective_tax_rate: 15 + tax_components: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '039111' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Drink Tax Component + rate: rate + is_compound: true + component_type: SALES + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + retrieve: + path: /accounting/v1/tax-rates/{id} + method: GET + auth: true + docs: Returns a `TaxRate` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: TaxRatesRetrieveRequest + query-parameters: + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.TaxRate + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: b82302de-852e-4e60-b050-edf9da3b7c02 + remote_id: '039111' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + company: company + code: '890' + name: State tax rate + description: Sales Tax + status: ACTIVE + country: US + total_tax_rate: 15 + effective_tax_rate: 15 + tax_components: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '039111' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Drink Tax Component + rate: rate + is_compound: true + component_type: SALES + remote_was_deleted: true + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/trackingCategories.yml b/.mock/definition/accounting/trackingCategories.yml new file mode 100644 index 0000000..2e3f062 --- /dev/null +++ b/.mock/definition/accounting/trackingCategories.yml @@ -0,0 +1,182 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/tracking-categories + method: GET + auth: true + docs: Returns a list of `TrackingCategory` objects. + source: + openapi: openapi/openapi.yml + request: + name: TrackingCategoriesListRequest + query-parameters: + category_type: + type: optional + docs: If provided, will only return tracking categories with this type. + company_id: + type: optional + docs: >- + If provided, will only return tracking categories for this + company. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + name: + type: optional + docs: If provided, will only return tracking categories with this name. + page_size: + type: optional + docs: Number of results to return per page. + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + remote_id: + type: optional + docs: The API provider's ID for the given object. + show_enum_origins: + type: optional> + docs: >- + 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: + type: optional + docs: >- + If provided, will only return tracking categories with this + status. + response: + docs: '' + type: root.PaginatedTrackingCategoryList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '948201' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Marketing Department + status: ACTIVE + category_type: CLASS + parent_category: d25d609b-945f-4762-b55a-1c8fb220c43c + company: company + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + retrieve: + path: /accounting/v1/tracking-categories/{id} + method: GET + auth: true + docs: Returns a `TrackingCategory` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: TrackingCategoriesRetrieveRequest + query-parameters: + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: root.TrackingCategory + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '948201' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Marketing Department + status: ACTIVE + category_type: CLASS + parent_category: d25d609b-945f-4762-b55a-1c8fb220c43c + company: company + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/transactions.yml b/.mock/definition/accounting/transactions.yml new file mode 100644 index 0000000..94a999d --- /dev/null +++ b/.mock/definition/accounting/transactions.yml @@ -0,0 +1,385 @@ +types: + TransactionsListRequestExpand: + enum: + - account + - value: account,accounting_period + name: AccountAccountingPeriod + - accounting_period + - contact + - value: contact,account + name: ContactAccount + - value: contact,account,accounting_period + name: ContactAccountAccountingPeriod + - value: contact,accounting_period + name: ContactAccountingPeriod + - line_items + - value: line_items,account + name: LineItemsAccount + - value: line_items,account,accounting_period + name: LineItemsAccountAccountingPeriod + - value: line_items,accounting_period + name: LineItemsAccountingPeriod + - value: line_items,contact + name: LineItemsContact + - value: line_items,contact,account + name: LineItemsContactAccount + - value: line_items,contact,account,accounting_period + name: LineItemsContactAccountAccountingPeriod + - value: line_items,contact,accounting_period + name: LineItemsContactAccountingPeriod + - value: line_items,tracking_categories + name: LineItemsTrackingCategories + - value: line_items,tracking_categories,account + name: LineItemsTrackingCategoriesAccount + - value: line_items,tracking_categories,account,accounting_period + name: LineItemsTrackingCategoriesAccountAccountingPeriod + - value: line_items,tracking_categories,accounting_period + name: LineItemsTrackingCategoriesAccountingPeriod + - value: line_items,tracking_categories,contact + name: LineItemsTrackingCategoriesContact + - value: line_items,tracking_categories,contact,account + name: LineItemsTrackingCategoriesContactAccount + - value: line_items,tracking_categories,contact,account,accounting_period + name: LineItemsTrackingCategoriesContactAccountAccountingPeriod + - value: line_items,tracking_categories,contact,accounting_period + name: LineItemsTrackingCategoriesContactAccountingPeriod + - tracking_categories + - value: tracking_categories,account + name: TrackingCategoriesAccount + - value: tracking_categories,account,accounting_period + name: TrackingCategoriesAccountAccountingPeriod + - value: tracking_categories,accounting_period + name: TrackingCategoriesAccountingPeriod + - value: tracking_categories,contact + name: TrackingCategoriesContact + - value: tracking_categories,contact,account + name: TrackingCategoriesContactAccount + - value: tracking_categories,contact,account,accounting_period + name: TrackingCategoriesContactAccountAccountingPeriod + - value: tracking_categories,contact,accounting_period + name: TrackingCategoriesContactAccountingPeriod + source: + openapi: openapi/openapi.yml + TransactionsRetrieveRequestExpand: + enum: + - account + - value: account,accounting_period + name: AccountAccountingPeriod + - accounting_period + - contact + - value: contact,account + name: ContactAccount + - value: contact,account,accounting_period + name: ContactAccountAccountingPeriod + - value: contact,accounting_period + name: ContactAccountingPeriod + - line_items + - value: line_items,account + name: LineItemsAccount + - value: line_items,account,accounting_period + name: LineItemsAccountAccountingPeriod + - value: line_items,accounting_period + name: LineItemsAccountingPeriod + - value: line_items,contact + name: LineItemsContact + - value: line_items,contact,account + name: LineItemsContactAccount + - value: line_items,contact,account,accounting_period + name: LineItemsContactAccountAccountingPeriod + - value: line_items,contact,accounting_period + name: LineItemsContactAccountingPeriod + - value: line_items,tracking_categories + name: LineItemsTrackingCategories + - value: line_items,tracking_categories,account + name: LineItemsTrackingCategoriesAccount + - value: line_items,tracking_categories,account,accounting_period + name: LineItemsTrackingCategoriesAccountAccountingPeriod + - value: line_items,tracking_categories,accounting_period + name: LineItemsTrackingCategoriesAccountingPeriod + - value: line_items,tracking_categories,contact + name: LineItemsTrackingCategoriesContact + - value: line_items,tracking_categories,contact,account + name: LineItemsTrackingCategoriesContactAccount + - value: line_items,tracking_categories,contact,account,accounting_period + name: LineItemsTrackingCategoriesContactAccountAccountingPeriod + - value: line_items,tracking_categories,contact,accounting_period + name: LineItemsTrackingCategoriesContactAccountingPeriod + - tracking_categories + - value: tracking_categories,account + name: TrackingCategoriesAccount + - value: tracking_categories,account,accounting_period + name: TrackingCategoriesAccountAccountingPeriod + - value: tracking_categories,accounting_period + name: TrackingCategoriesAccountingPeriod + - value: tracking_categories,contact + name: TrackingCategoriesContact + - value: tracking_categories,contact,account + name: TrackingCategoriesContactAccount + - value: tracking_categories,contact,account,accounting_period + name: TrackingCategoriesContactAccountAccountingPeriod + - value: tracking_categories,contact,accounting_period + name: TrackingCategoriesContactAccountingPeriod + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/transactions + method: GET + auth: true + docs: Returns a list of `Transaction` objects. + source: + openapi: openapi/openapi.yml + request: + name: TransactionsListRequest + query-parameters: + company_id: + type: optional + docs: >- + If provided, will only return accounting transactions for this + company. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + transaction_date_after: + type: optional + docs: If provided, will only return objects created after this datetime. + transaction_date_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + response: + docs: '' + type: root.PaginatedTransactionList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 0048ea5b-911e-4dff-9364-92070dea62ff + remote_id: '239741' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + transaction_type: estimate + number: '122' + transaction_date: '2020-03-31T00:00:00Z' + account: account + contact: contact + inclusive_of_tax: true + total_amount: total_amount + currency: XUA + exchange_rate: '2.9' + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + line_items: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121222' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + memo: Pickleball paddles + unit_price: '25.0' + quantity: '10.0' + item: 0958cbc6-6040-430a-848e-aafacbadf4ae + account: 2b38c085-2620-4269-b5ec-75dd9095ed2c + tracking_categories: + - f1214c24-2702-4617-b74b-3ddecfc0d384 + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + total_line_amount: total_line_amount + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + currency: USD + exchange_rate: '2.9' + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: false + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + memo: Pickleball balls + unit_price: '25.0' + quantity: '10.0' + item: 249c9faa-3045-4a31-953b-8f22d3613301 + account: 3e442c5d-8f51-4103-b5c9-dcee39c30a08 + tracking_categories: + - f1214c24-2702-4617-b74b-3ddecfc0d384 + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + total_line_amount: total_line_amount + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + remote_was_deleted: true + accounting_period: accounting_period + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + retrieve: + path: /accounting/v1/transactions/{id} + method: GET + auth: true + docs: Returns a `Transaction` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: TransactionsRetrieveRequest + query-parameters: + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.Transaction + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 0048ea5b-911e-4dff-9364-92070dea62ff + remote_id: '239741' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + transaction_type: estimate + number: '122' + transaction_date: '2020-03-31T00:00:00Z' + account: account + contact: contact + inclusive_of_tax: true + total_amount: total_amount + currency: XUA + exchange_rate: '2.9' + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + line_items: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121222' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + memo: Pickleball paddles + unit_price: '25.0' + quantity: '10.0' + item: 0958cbc6-6040-430a-848e-aafacbadf4ae + account: 2b38c085-2620-4269-b5ec-75dd9095ed2c + tracking_category: tracking_category + tracking_categories: + - f1214c24-2702-4617-b74b-3ddecfc0d384 + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + total_line_amount: total_line_amount + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + currency: USD + exchange_rate: '2.9' + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: false + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121222' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + memo: Pickleball balls + unit_price: '25.0' + quantity: '10.0' + item: 249c9faa-3045-4a31-953b-8f22d3613301 + account: 3e442c5d-8f51-4103-b5c9-dcee39c30a08 + tracking_category: tracking_category + tracking_categories: + - f1214c24-2702-4617-b74b-3ddecfc0d384 + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + total_line_amount: total_line_amount + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + currency: XUA + exchange_rate: '2.9' + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + remote_was_deleted: true + remote_was_deleted: true + accounting_period: accounting_period + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/vendorCredits.yml b/.mock/definition/accounting/vendorCredits.yml new file mode 100644 index 0000000..39b4141 --- /dev/null +++ b/.mock/definition/accounting/vendorCredits.yml @@ -0,0 +1,683 @@ +types: + VendorCreditsListRequestExpand: + enum: + - accounting_period + - company + - value: company,accounting_period + name: CompanyAccountingPeriod + - lines + - value: lines,accounting_period + name: LinesAccountingPeriod + - value: lines,company + name: LinesCompany + - value: lines,company,accounting_period + name: LinesCompanyAccountingPeriod + - value: lines,tracking_categories + name: LinesTrackingCategories + - value: lines,tracking_categories,accounting_period + name: LinesTrackingCategoriesAccountingPeriod + - value: lines,tracking_categories,company + name: LinesTrackingCategoriesCompany + - value: lines,tracking_categories,company,accounting_period + name: LinesTrackingCategoriesCompanyAccountingPeriod + - value: lines,tracking_categories,vendor + name: LinesTrackingCategoriesVendor + - value: lines,tracking_categories,vendor,accounting_period + name: LinesTrackingCategoriesVendorAccountingPeriod + - value: lines,tracking_categories,vendor,company + name: LinesTrackingCategoriesVendorCompany + - value: lines,tracking_categories,vendor,company,accounting_period + name: LinesTrackingCategoriesVendorCompanyAccountingPeriod + - value: lines,vendor + name: LinesVendor + - value: lines,vendor,accounting_period + name: LinesVendorAccountingPeriod + - value: lines,vendor,company + name: LinesVendorCompany + - value: lines,vendor,company,accounting_period + name: LinesVendorCompanyAccountingPeriod + - tracking_categories + - value: tracking_categories,accounting_period + name: TrackingCategoriesAccountingPeriod + - value: tracking_categories,company + name: TrackingCategoriesCompany + - value: tracking_categories,company,accounting_period + name: TrackingCategoriesCompanyAccountingPeriod + - value: tracking_categories,vendor + name: TrackingCategoriesVendor + - value: tracking_categories,vendor,accounting_period + name: TrackingCategoriesVendorAccountingPeriod + - value: tracking_categories,vendor,company + name: TrackingCategoriesVendorCompany + - value: tracking_categories,vendor,company,accounting_period + name: TrackingCategoriesVendorCompanyAccountingPeriod + - vendor + - value: vendor,accounting_period + name: VendorAccountingPeriod + - value: vendor,company + name: VendorCompany + - value: vendor,company,accounting_period + name: VendorCompanyAccountingPeriod + source: + openapi: openapi/openapi.yml + VendorCreditsRetrieveRequestExpand: + enum: + - accounting_period + - company + - value: company,accounting_period + name: CompanyAccountingPeriod + - lines + - value: lines,accounting_period + name: LinesAccountingPeriod + - value: lines,company + name: LinesCompany + - value: lines,company,accounting_period + name: LinesCompanyAccountingPeriod + - value: lines,tracking_categories + name: LinesTrackingCategories + - value: lines,tracking_categories,accounting_period + name: LinesTrackingCategoriesAccountingPeriod + - value: lines,tracking_categories,company + name: LinesTrackingCategoriesCompany + - value: lines,tracking_categories,company,accounting_period + name: LinesTrackingCategoriesCompanyAccountingPeriod + - value: lines,tracking_categories,vendor + name: LinesTrackingCategoriesVendor + - value: lines,tracking_categories,vendor,accounting_period + name: LinesTrackingCategoriesVendorAccountingPeriod + - value: lines,tracking_categories,vendor,company + name: LinesTrackingCategoriesVendorCompany + - value: lines,tracking_categories,vendor,company,accounting_period + name: LinesTrackingCategoriesVendorCompanyAccountingPeriod + - value: lines,vendor + name: LinesVendor + - value: lines,vendor,accounting_period + name: LinesVendorAccountingPeriod + - value: lines,vendor,company + name: LinesVendorCompany + - value: lines,vendor,company,accounting_period + name: LinesVendorCompanyAccountingPeriod + - tracking_categories + - value: tracking_categories,accounting_period + name: TrackingCategoriesAccountingPeriod + - value: tracking_categories,company + name: TrackingCategoriesCompany + - value: tracking_categories,company,accounting_period + name: TrackingCategoriesCompanyAccountingPeriod + - value: tracking_categories,vendor + name: TrackingCategoriesVendor + - value: tracking_categories,vendor,accounting_period + name: TrackingCategoriesVendorAccountingPeriod + - value: tracking_categories,vendor,company + name: TrackingCategoriesVendorCompany + - value: tracking_categories,vendor,company,accounting_period + name: TrackingCategoriesVendorCompanyAccountingPeriod + - vendor + - value: vendor,accounting_period + name: VendorAccountingPeriod + - value: vendor,company + name: VendorCompany + - value: vendor,company,accounting_period + name: VendorCompanyAccountingPeriod + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/vendor-credits + method: GET + auth: true + docs: Returns a list of `VendorCredit` objects. + source: + openapi: openapi/openapi.yml + request: + name: VendorCreditsListRequest + query-parameters: + company_id: + type: optional + docs: If provided, will only return vendor credits for this company. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + transaction_date_after: + type: optional + docs: If provided, will only return objects created after this datetime. + transaction_date_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + response: + docs: '' + type: root.PaginatedVendorCreditList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '088899' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + number: '6' + transaction_date: '2020-03-31T00:00:00Z' + vendor: vendor + total_amount: 10000 + currency: XUA + exchange_rate: '2.9' + inclusive_of_tax: true + company: company + lines: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121222' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + net_amount: 25.54 + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + description: Gifted Merge Credit + account: 9d892439-5fab-4dbb-8bd8-34f7f96c7912 + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + project: 22e65a5d-2df5-4e6e-884a-e538d0339000 + contact: 908934-49j9-093f-0989-908923908 + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + exchange_rate: '2.9' + remote_was_deleted: false + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121223' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + net_amount: 10 + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + description: Refund for overpayment + account: 9d892439-5fab-4dbb-8bd8-34f7f96c7912 + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + applied_to_lines: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + invoice: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + applied_date: '2020-03-31T00:00:00Z' + applied_amount: '2.9' + remote_was_deleted: true + accounting_period: accounting_period + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + create: + path: /accounting/v1/vendor-credits + method: POST + auth: true + docs: Creates a `VendorCredit` object with the given values. + source: + openapi: openapi/openapi.yml + request: + name: VendorCreditEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: root.VendorCreditRequest + content-type: application/json + response: + docs: '' + type: root.VendorCreditResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '088899' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + number: '6' + transaction_date: '2020-03-31T00:00:00Z' + vendor: vendor + total_amount: 10000 + currency: XUA + exchange_rate: '2.9' + inclusive_of_tax: true + company: company + lines: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121222' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + net_amount: 25.54 + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + description: Gifted Merge Credit + account: 9d892439-5fab-4dbb-8bd8-34f7f96c7912 + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + project: 22e65a5d-2df5-4e6e-884a-e538d0339000 + contact: 908934-49j9-093f-0989-908923908 + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + exchange_rate: '2.9' + remote_was_deleted: false + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121223' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + net_amount: 10 + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + description: Refund for overpayment + account: 9d892439-5fab-4dbb-8bd8-34f7f96c7912 + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + applied_to_lines: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + invoice: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + applied_date: '2020-03-31T00:00:00Z' + applied_amount: '2.9' + remote_was_deleted: true + accounting_period: accounting_period + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /accounting/v1/vendor-credits/{id} + method: GET + auth: true + docs: Returns a `VendorCredit` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: VendorCreditsRetrieveRequest + query-parameters: + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.VendorCredit + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '088899' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + number: '6' + transaction_date: '2020-03-31T00:00:00Z' + vendor: vendor + total_amount: 10000 + currency: XUA + exchange_rate: '2.9' + inclusive_of_tax: true + company: company + lines: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121222' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + net_amount: 25.54 + tracking_category: tracking_category + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + description: Gifted Merge Credit + account: 9d892439-5fab-4dbb-8bd8-34f7f96c7912 + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + project: 22e65a5d-2df5-4e6e-884a-e538d0339000 + contact: 908934-49j9-093f-0989-908923908 + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + exchange_rate: '2.9' + remote_was_deleted: false + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '121223' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + net_amount: 10 + tracking_category: tracking_category + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + description: Refund for overpayment + account: 9d892439-5fab-4dbb-8bd8-34f7f96c7912 + company: 595c8f97-2ac4-45b7-b000-41bdf43240b5 + project: project + contact: contact + tax_rate: a12e7c20-1922-9df7-s75n-edfeewnn7384 + exchange_rate: '2.9' + remote_was_deleted: true + tracking_categories: + - b38c59b0-a9d7-4740-b1ee-5436c6751e3d + - 9b840d2-686a-465a-8a8e-7b028498f8e4 + - a47e11b6-c73b-4a0c-be31-130fc48177fa + applied_to_lines: + - remote_id: '088899' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + invoice: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + applied_date: '2020-03-31T00:00:00Z' + applied_amount: '2.9' + remote_was_deleted: true + remote_was_deleted: true + accounting_period: accounting_period + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + metaPostRetrieve: + path: /accounting/v1/vendor-credits/meta/post + method: GET + auth: true + docs: Returns metadata for `VendorCredit` POSTs. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/accounting/webhookReceivers.yml b/.mock/definition/accounting/webhookReceivers.yml new file mode 100644 index 0000000..0c90c82 --- /dev/null +++ b/.mock/definition/accounting/webhookReceivers.yml @@ -0,0 +1,61 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /accounting/v1/webhook-receivers + method: GET + auth: true + docs: Returns a list of `WebhookReceiver` objects. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: list + status-code: 200 + examples: + - headers: {} + response: + body: + - event: event + is_active: true + key: key + create: + path: /accounting/v1/webhook-receivers + method: POST + auth: true + docs: Creates a `WebhookReceiver` object with the given values. + source: + openapi: openapi/openapi.yml + request: + name: WebhookReceiverRequest + body: + properties: + event: + type: string + validation: + minLength: 1 + is_active: boolean + key: + type: optional + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: root.WebhookReceiver + status-code: 201 + examples: + - headers: {} + request: + event: event + is_active: true + response: + body: + event: event + is_active: true + key: key + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/api.yml b/.mock/definition/api.yml new file mode 100644 index 0000000..6e83d15 --- /dev/null +++ b/.mock/definition/api.yml @@ -0,0 +1,20 @@ +name: api +error-discrimination: + strategy: status-code +display-name: Merge +default-environment: Production +environments: + Production: https://api.merge.dev/api + Sandbox: https://api-sandbox.merge.dev/api + ProductionEu: https://api-eu.merge.dev/api +auth: BearerAuthScheme +auth-schemes: + BearerAuthScheme: + scheme: bearer + token: + name: api_key +headers: + X-Account-Token: + type: optional + docs: Token identifying the end user. + name: accountToken diff --git a/.mock/definition/ats/__package__.yml b/.mock/definition/ats/__package__.yml new file mode 100644 index 0000000..2056295 --- /dev/null +++ b/.mock/definition/ats/__package__.yml @@ -0,0 +1,4112 @@ +types: + AccessRoleEnum: + enum: + - SUPER_ADMIN + - ADMIN + - TEAM_MEMBER + - LIMITED_TEAM_MEMBER + - INTERVIEWER + docs: |- + * `SUPER_ADMIN` - SUPER_ADMIN + * `ADMIN` - ADMIN + * `TEAM_MEMBER` - TEAM_MEMBER + * `LIMITED_TEAM_MEMBER` - LIMITED_TEAM_MEMBER + * `INTERVIEWER` - INTERVIEWER + source: + openapi: openapi/openapi.yml + AccountDetails: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + integration: + type: optional + access: read-only + integration_slug: + type: optional + access: read-only + category: optional + end_user_origin_id: + type: optional + access: read-only + end_user_organization_name: + type: optional + access: read-only + end_user_email_address: + type: optional + validation: + format: email + access: read-only + status: + type: optional + access: read-only + webhook_listener_url: + type: optional + validation: + format: uri + access: read-only + is_duplicate: + type: optional + docs: >- + 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. + access: read-only + account_type: + type: optional + access: read-only + completed_at: + type: optional + docs: The time at which account completes the linking flow. + source: + openapi: openapi/openapi.yml + AccountDetailsAndActions: + docs: >- + # The LinkedAccount Object + + ### Description + + The `LinkedAccount` object is used to represent an end user's link with a + specific integration. + + + ### Usage Example + + View a list of your organization's `LinkedAccount` objects. + properties: + id: string + category: optional + status: AccountDetailsAndActionsStatusEnum + status_detail: optional + end_user_origin_id: optional + end_user_organization_name: string + end_user_email_address: string + subdomain: + type: optional + docs: The tenant or domain the customer has provided access to. + webhook_listener_url: string + is_duplicate: + type: optional + docs: >- + 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. + integration: optional + account_type: string + completed_at: datetime + integration_specific_fields: optional> + source: + openapi: openapi/openapi.yml + AccountDetailsAndActionsIntegration: + properties: + name: string + categories: list + image: optional + square_image: optional + color: string + slug: string + passthrough_available: boolean + available_model_operations: optional> + source: + openapi: openapi/openapi.yml + AccountDetailsAndActionsStatusEnum: + enum: + - COMPLETE + - INCOMPLETE + - RELINK_NEEDED + - IDLE + docs: |- + * `COMPLETE` - COMPLETE + * `INCOMPLETE` - INCOMPLETE + * `RELINK_NEEDED` - RELINK_NEEDED + * `IDLE` - IDLE + source: + openapi: openapi/openapi.yml + AccountIntegration: + properties: + name: + type: string + docs: Company name. + abbreviated_name: + type: optional + docs: >- + Optional. This shortened name appears in places with limited space, + usually in conjunction with the platform's logo (e.g., Merge Link + menu).

Example: Workforce Now (in lieu of ADP Workforce + Now), SuccessFactors (in lieu of SAP SuccessFactors) + categories: + type: optional> + docs: >- + Category or categories this integration belongs to. Multiple + categories should be comma separated, i.e. [ats, hris]. + access: read-only + image: + type: optional + docs: Company logo in rectangular shape. + validation: + format: uri + square_image: + type: optional + docs: Company logo in square shape. + validation: + format: uri + color: + type: optional + docs: >- + The color of this integration used for buttons and text throughout the + app and landing pages. Choose a darker, saturated color. + validation: + pattern: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ + maxLength: 18 + slug: + type: optional + access: read-only + api_endpoints_to_documentation_urls: + type: optional> + docs: >- + Mapping of API endpoints to documentation urls for support. Example: + {'GET': [['/common-model-scopes', + 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', + 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], + 'POST': []} + webhook_setup_guide_url: + type: optional + docs: >- + Setup guide URL for third party webhook creation. Exposed in Merge + Docs. + category_beta_status: + type: optional> + docs: Category or categories this integration is in beta status for. + access: read-only + source: + openapi: openapi/openapi.yml + AccountToken: + properties: + account_token: string + integration: AccountIntegration + id: string + source: + openapi: openapi/openapi.yml + ActivityUser: + discriminated: false + docs: The user that performed the action. + union: + - type: string + validation: + format: uuid + - RemoteUser + source: + openapi: openapi/openapi.yml + inline: true + Activity: + docs: >- + # The Activity Object + + ### Description + + The `Activity` object is used to represent an activity for a candidate + performed by a user. + + ### Usage Example + + Fetch from the `LIST Activities` endpoint and filter by `ID` to show all + activities. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + user: + type: optional + docs: The user that performed the action. + remote_created_at: + type: optional + docs: When the third party's activity was created. + activity_type: + type: optional + docs: |- + The activity's type. + + * `NOTE` - NOTE + * `EMAIL` - EMAIL + * `OTHER` - OTHER + subject: + type: optional + docs: The activity's subject. + body: + type: optional + docs: The activity's body. + visibility: + type: optional + docs: |- + The activity's visibility. + + * `ADMIN_ONLY` - ADMIN_ONLY + * `PUBLIC` - PUBLIC + * `PRIVATE` - PRIVATE + candidate: + type: optional + validation: + format: uuid + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + ActivityRequestUser: + discriminated: false + docs: The user that performed the action. + union: + - type: string + validation: + format: uuid + - RemoteUser + source: + openapi: openapi/openapi.yml + inline: true + ActivityRequest: + docs: >- + # The Activity Object + + ### Description + + The `Activity` object is used to represent an activity for a candidate + performed by a user. + + ### Usage Example + + Fetch from the `LIST Activities` endpoint and filter by `ID` to show all + activities. + properties: + user: + type: optional + docs: The user that performed the action. + activity_type: + type: optional + docs: |- + The activity's type. + + * `NOTE` - NOTE + * `EMAIL` - EMAIL + * `OTHER` - OTHER + subject: + type: optional + docs: The activity's subject. + body: + type: optional + docs: The activity's body. + visibility: + type: optional + docs: |- + The activity's visibility. + + * `ADMIN_ONLY` - ADMIN_ONLY + * `PUBLIC` - PUBLIC + * `PRIVATE` - PRIVATE + candidate: + type: optional + validation: + format: uuid + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + ActivityResponse: + properties: + model: Activity + warnings: list + errors: list + logs: optional> + source: + openapi: openapi/openapi.yml + ActivityTypeEnum: + enum: + - NOTE + - EMAIL + - OTHER + docs: |- + * `NOTE` - NOTE + * `EMAIL` - EMAIL + * `OTHER` - OTHER + source: + openapi: openapi/openapi.yml + AdvancedMetadata: + properties: + id: + type: string + validation: + format: uuid + display_name: optional + description: optional + is_required: optional + is_custom: optional + field_choices: optional> + source: + openapi: openapi/openapi.yml + ApplicationCandidate: + discriminated: false + docs: The candidate applying. + union: + - type: string + validation: + format: uuid + - Candidate + source: + openapi: openapi/openapi.yml + inline: true + ApplicationJob: + discriminated: false + docs: The job being applied for. + union: + - type: string + validation: + format: uuid + - Job + source: + openapi: openapi/openapi.yml + inline: true + ApplicationOffersItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Offer + source: + openapi: openapi/openapi.yml + inline: true + ApplicationCreditedTo: + discriminated: false + docs: The user credited for this application. + union: + - type: string + validation: + format: uuid + - RemoteUser + source: + openapi: openapi/openapi.yml + inline: true + ApplicationScreeningQuestionAnswersItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - ScreeningQuestionAnswer + source: + openapi: openapi/openapi.yml + inline: true + ApplicationCurrentStage: + discriminated: false + docs: The application's current stage. + union: + - type: string + validation: + format: uuid + - JobInterviewStage + source: + openapi: openapi/openapi.yml + inline: true + ApplicationRejectReason: + discriminated: false + docs: The application's reason for rejection. + union: + - type: string + validation: + format: uuid + - RejectReason + source: + openapi: openapi/openapi.yml + inline: true + Application: + docs: >- + # The Application Object + + ### Description + + The Application Object is used to represent a candidate's journey through + a particular Job's recruiting process. If a Candidate applies for multiple + Jobs, there will be a separate Application for each Job if the third-party + integration allows it. + + + ### Usage Example + + Fetch from the `LIST Applications` endpoint and filter by `ID` to show all + applications. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + candidate: + type: optional + docs: The candidate applying. + job: + type: optional + docs: The job being applied for. + applied_at: + type: optional + docs: When the application was submitted. + rejected_at: + type: optional + docs: When the application was rejected. + offers: optional>> + source: + type: optional + docs: The application's source. + credited_to: + type: optional + docs: The user credited for this application. + screening_question_answers: optional> + current_stage: + type: optional + docs: The application's current stage. + reject_reason: + type: optional + docs: The application's reason for rejection. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + ApplicationRequestCandidate: + discriminated: false + docs: The candidate applying. + union: + - type: string + validation: + format: uuid + - Candidate + source: + openapi: openapi/openapi.yml + inline: true + ApplicationRequestJob: + discriminated: false + docs: The job being applied for. + union: + - type: string + validation: + format: uuid + - Job + source: + openapi: openapi/openapi.yml + inline: true + ApplicationRequestOffersItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Offer + source: + openapi: openapi/openapi.yml + inline: true + ApplicationRequestCreditedTo: + discriminated: false + docs: The user credited for this application. + union: + - type: string + validation: + format: uuid + - RemoteUser + source: + openapi: openapi/openapi.yml + inline: true + ApplicationRequestScreeningQuestionAnswersItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - ScreeningQuestionAnswerRequest + source: + openapi: openapi/openapi.yml + inline: true + ApplicationRequestCurrentStage: + discriminated: false + docs: The application's current stage. + union: + - type: string + validation: + format: uuid + - JobInterviewStage + source: + openapi: openapi/openapi.yml + inline: true + ApplicationRequestRejectReason: + discriminated: false + docs: The application's reason for rejection. + union: + - type: string + validation: + format: uuid + - RejectReason + source: + openapi: openapi/openapi.yml + inline: true + ApplicationRequest: + docs: >- + # The Application Object + + ### Description + + The Application Object is used to represent a candidate's journey through + a particular Job's recruiting process. If a Candidate applies for multiple + Jobs, there will be a separate Application for each Job if the third-party + integration allows it. + + + ### Usage Example + + Fetch from the `LIST Applications` endpoint and filter by `ID` to show all + applications. + properties: + candidate: + type: optional + docs: The candidate applying. + job: + type: optional + docs: The job being applied for. + applied_at: + type: optional + docs: When the application was submitted. + rejected_at: + type: optional + docs: When the application was rejected. + offers: optional>> + source: + type: optional + docs: The application's source. + credited_to: + type: optional + docs: The user credited for this application. + screening_question_answers: optional> + current_stage: + type: optional + docs: The application's current stage. + reject_reason: + type: optional + docs: The application's reason for rejection. + remote_template_id: + type: optional + validation: + minLength: 1 + access: write-only + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + ApplicationResponse: + properties: + model: Application + warnings: list + errors: list + logs: optional> + source: + openapi: openapi/openapi.yml + AsyncPassthroughReciept: + properties: + async_passthrough_receipt_id: + type: string + validation: + format: uuid + source: + openapi: openapi/openapi.yml + Attachment: + docs: >- + # The Attachment Object + + ### Description + + The `Attachment` object is used to represent a file attached to a + candidate. + + ### Usage Example + + Fetch from the `LIST Attachments` endpoint and view attachments accessible + by a company. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + file_name: + type: optional + docs: The attachment's name. + file_url: + type: optional + docs: The attachment's url. + validation: + format: uri + maxLength: 2000 + candidate: + type: optional + docs: '' + validation: + format: uuid + attachment_type: + type: optional + docs: |- + The attachment's type. + + * `RESUME` - RESUME + * `COVER_LETTER` - COVER_LETTER + * `OFFER_LETTER` - OFFER_LETTER + * `OTHER` - OTHER + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + AttachmentRequest: + docs: >- + # The Attachment Object + + ### Description + + The `Attachment` object is used to represent a file attached to a + candidate. + + ### Usage Example + + Fetch from the `LIST Attachments` endpoint and view attachments accessible + by a company. + properties: + file_name: + type: optional + docs: The attachment's name. + file_url: + type: optional + docs: The attachment's url. + validation: + format: uri + maxLength: 2000 + candidate: + type: optional + docs: '' + validation: + format: uuid + attachment_type: + type: optional + docs: |- + The attachment's type. + + * `RESUME` - RESUME + * `COVER_LETTER` - COVER_LETTER + * `OFFER_LETTER` - OFFER_LETTER + * `OTHER` - OTHER + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + AttachmentResponse: + properties: + model: Attachment + warnings: list + errors: list + logs: optional> + source: + openapi: openapi/openapi.yml + AttachmentTypeEnum: + enum: + - RESUME + - COVER_LETTER + - OFFER_LETTER + - OTHER + docs: |- + * `RESUME` - RESUME + * `COVER_LETTER` - COVER_LETTER + * `OFFER_LETTER` - OFFER_LETTER + * `OTHER` - OTHER + source: + openapi: openapi/openapi.yml + AuditLogEvent: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + user_name: + type: optional + docs: The User's full name at the time of this Event occurring. + validation: + maxLength: 200 + user_email: + type: optional + docs: The User's email at the time of this Event occurring. + validation: + format: email + maxLength: 254 + role: + type: RoleEnum + docs: >- + Designates the role of the user (or SYSTEM/API if action not taken by + a user) at the time of this Event occurring. + + + * `ADMIN` - ADMIN + + * `DEVELOPER` - DEVELOPER + + * `MEMBER` - MEMBER + + * `API` - API + + * `SYSTEM` - SYSTEM + + * `MERGE_TEAM` - MERGE_TEAM + ip_address: + type: string + validation: + maxLength: 45 + event_type: + type: EventTypeEnum + docs: >- + Designates the type of event that occurred. + + + * `CREATED_REMOTE_PRODUCTION_API_KEY` - + CREATED_REMOTE_PRODUCTION_API_KEY + + * `DELETED_REMOTE_PRODUCTION_API_KEY` - + DELETED_REMOTE_PRODUCTION_API_KEY + + * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + + * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + + * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + + * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + + * `INVITED_USER` - INVITED_USER + + * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + + * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + + * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + + * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - + DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + + * `CREATED_DESTINATION` - CREATED_DESTINATION + + * `DELETED_DESTINATION` - DELETED_DESTINATION + + * `CHANGED_DESTINATION` - CHANGED_DESTINATION + + * `CHANGED_SCOPES` - CHANGED_SCOPES + + * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + + * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + + * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + + * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + + * `ENABLED_CATEGORY` - ENABLED_CATEGORY + + * `DISABLED_CATEGORY` - DISABLED_CATEGORY + + * `CHANGED_PASSWORD` - CHANGED_PASSWORD + + * `RESET_PASSWORD` - RESET_PASSWORD + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - + CREATED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - + CREATED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - + CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + + * `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 + + * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + + * `MUTED_ISSUE` - MUTED_ISSUE + + * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + + * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + + * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + + * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + + * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + event_description: string + created_at: + type: optional + access: read-only + source: + openapi: openapi/openapi.yml + AvailableActions: + docs: >- + # The AvailableActions Object + + ### Description + + The `Activity` object is used to see all available model/operation + combinations for an integration. + + + ### Usage Example + + Fetch all the actions available for the `Zenefits` integration. + properties: + integration: AccountIntegration + passthrough_available: boolean + available_model_operations: optional> + source: + openapi: openapi/openapi.yml + CandidateApplicationsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Application + source: + openapi: openapi/openapi.yml + inline: true + CandidateAttachmentsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Attachment + source: + openapi: openapi/openapi.yml + inline: true + Candidate: + docs: >- + # The Candidate Object + + ### Description + + The `Candidate` object is used to represent profile information about a + given Candidate. Because it is specific to a Candidate, this information + stays constant across applications. + + ### Usage Example + + Fetch from the `LIST Candidates` endpoint and filter by `ID` to show all + candidates. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + first_name: + type: optional + docs: The candidate's first name. + last_name: + type: optional + docs: The candidate's last name. + company: + type: optional + docs: The candidate's current company. + title: + type: optional + docs: The candidate's current title. + remote_created_at: + type: optional + docs: When the third party's candidate was created. + remote_updated_at: + type: optional + docs: When the third party's candidate was updated. + last_interaction_at: + type: optional + docs: When the most recent interaction with the candidate occurred. + is_private: + type: optional + docs: Whether or not the candidate is private. + can_email: + type: optional + docs: Whether or not the candidate can be emailed. + locations: + type: optional>> + docs: The candidate's locations. + phone_numbers: optional> + email_addresses: optional> + urls: optional> + tags: + type: optional>> + docs: Array of `Tag` names as strings. + applications: + type: optional>> + docs: Array of `Application` object IDs. + attachments: + type: optional>> + docs: Array of `Attachment` object IDs. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + CandidateRequestApplicationsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Application + source: + openapi: openapi/openapi.yml + inline: true + CandidateRequestAttachmentsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Attachment + source: + openapi: openapi/openapi.yml + inline: true + CandidateRequest: + docs: >- + # The Candidate Object + + ### Description + + The `Candidate` object is used to represent profile information about a + given Candidate. Because it is specific to a Candidate, this information + stays constant across applications. + + ### Usage Example + + Fetch from the `LIST Candidates` endpoint and filter by `ID` to show all + candidates. + properties: + first_name: + type: optional + docs: The candidate's first name. + last_name: + type: optional + docs: The candidate's last name. + company: + type: optional + docs: The candidate's current company. + title: + type: optional + docs: The candidate's current title. + last_interaction_at: + type: optional + docs: When the most recent interaction with the candidate occurred. + is_private: + type: optional + docs: Whether or not the candidate is private. + can_email: + type: optional + docs: Whether or not the candidate can be emailed. + locations: + type: optional>> + docs: The candidate's locations. + phone_numbers: optional> + email_addresses: optional> + urls: optional> + tags: + type: optional>> + docs: Array of `Tag` names as strings. + applications: + type: optional>> + docs: Array of `Application` object IDs. + attachments: + type: optional>> + docs: Array of `Attachment` object IDs. + remote_template_id: + type: optional + validation: + minLength: 1 + access: write-only + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + CandidateResponse: + properties: + model: Candidate + warnings: list + errors: list + logs: optional> + source: + openapi: openapi/openapi.yml + CategoriesEnum: + enum: + - hris + - ats + - accounting + - ticketing + - crm + - mktg + - filestorage + docs: |- + * `hris` - hris + * `ats` - ats + * `accounting` - accounting + * `ticketing` - ticketing + * `crm` - crm + * `mktg` - mktg + * `filestorage` - filestorage + source: + openapi: openapi/openapi.yml + CategoryEnum: + enum: + - hris + - ats + - accounting + - ticketing + - crm + - mktg + - filestorage + docs: |- + * `hris` - hris + * `ats` - ats + * `accounting` - accounting + * `ticketing` - ticketing + * `crm` - crm + * `mktg` - mktg + * `filestorage` - filestorage + source: + openapi: openapi/openapi.yml + CommonModelScopeApi: + properties: + common_models: + docs: The common models you want to update the scopes for + type: list + source: + openapi: openapi/openapi.yml + CommonModelScopesBodyRequest: + properties: + model_id: + type: string + validation: + minLength: 1 + enabled_actions: list + disabled_fields: list + source: + openapi: openapi/openapi.yml + DataPassthroughRequest: + docs: >- + # The DataPassthrough Object + + ### Description + + The `DataPassthrough` object is used to send information to an + otherwise-unsupported third-party endpoint. + + + ### Usage Example + + Create a `DataPassthrough` to get team hierarchies from your Rippling + integration. + properties: + method: MethodEnum + path: + type: string + docs: The path of the request in the third party's platform. + validation: + minLength: 1 + base_url_override: + type: optional + docs: An optional override of the third party's base url for the request. + validation: + minLength: 1 + data: + type: optional + docs: >- + The data with the request. You must include a `request_format` + parameter matching the data's format + validation: + minLength: 1 + multipart_form_data: + type: optional> + docs: >- + Pass an array of `MultipartFormField` objects in here instead of using + the `data` param if `request_format` is set to `MULTIPART`. + headers: + type: optional> + docs: >- + The headers to use for the request (Merge will handle the account's + authorization headers). `Content-Type` header is required for + passthrough. Choose content type corresponding to expected format of + receiving server. + request_format: optional + normalize_response: + type: optional + docs: >- + Optional. If true, the response will always be an object of the form + `{"type": T, "value": ...}` where `T` will be one of `string, boolean, + number, null, array, object`. + source: + openapi: openapi/openapi.yml + DebugModeLog: + properties: + log_id: string + dashboard_view: string + log_summary: DebugModelLogSummary + source: + openapi: openapi/openapi.yml + DebugModelLogSummary: + properties: + url: string + method: string + status_code: integer + source: + openapi: openapi/openapi.yml + Department: + docs: >- + # The Department Object + + ### Description + + The `Department` object is used to represent a department within a + company. + + ### Usage Example + + Fetch from the `LIST Departments` endpoint and view the departments within + a company. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The department's name. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + DisabilityStatusEnum: + enum: + - YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY + - NO_I_DONT_HAVE_A_DISABILITY + - I_DONT_WISH_TO_ANSWER + docs: >- + * `YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY` - + YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY + + * `NO_I_DONT_HAVE_A_DISABILITY` - NO_I_DONT_HAVE_A_DISABILITY + + * `I_DONT_WISH_TO_ANSWER` - I_DONT_WISH_TO_ANSWER + source: + openapi: openapi/openapi.yml + EeocCandidate: + discriminated: false + docs: The candidate being represented. + union: + - type: string + validation: + format: uuid + - Candidate + source: + openapi: openapi/openapi.yml + inline: true + Eeoc: + docs: >- + # The EEOC Object + + ### Description + + The `EEOC` object is used to represent the Equal Employment Opportunity + Commission information for a candidate (race, gender, veteran status, + disability status). + + ### Usage Example + + Fetch from the `LIST EEOCs` endpoint and filter by `candidate` to show all + EEOC information for a candidate. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + candidate: + type: optional + docs: The candidate being represented. + submitted_at: + type: optional + docs: When the information was submitted. + race: + type: optional + docs: >- + The candidate's race. + + + * `AMERICAN_INDIAN_OR_ALASKAN_NATIVE` - + AMERICAN_INDIAN_OR_ALASKAN_NATIVE + + * `ASIAN` - ASIAN + + * `BLACK_OR_AFRICAN_AMERICAN` - BLACK_OR_AFRICAN_AMERICAN + + * `HISPANIC_OR_LATINO` - HISPANIC_OR_LATINO + + * `WHITE` - WHITE + + * `NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER` - + NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER + + * `TWO_OR_MORE_RACES` - TWO_OR_MORE_RACES + + * `DECLINE_TO_SELF_IDENTIFY` - DECLINE_TO_SELF_IDENTIFY + gender: + type: optional + docs: |- + The candidate's gender. + + * `MALE` - MALE + * `FEMALE` - FEMALE + * `NON-BINARY` - NON-BINARY + * `OTHER` - OTHER + * `DECLINE_TO_SELF_IDENTIFY` - DECLINE_TO_SELF_IDENTIFY + veteran_status: + type: optional + docs: >- + The candidate's veteran status. + + + * `I_AM_NOT_A_PROTECTED_VETERAN` - I_AM_NOT_A_PROTECTED_VETERAN + + * + `I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN` + - + I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN + + * `I_DONT_WISH_TO_ANSWER` - I_DONT_WISH_TO_ANSWER + disability_status: + type: optional + docs: >- + The candidate's disability status. + + + * `YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY` - + YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY + + * `NO_I_DONT_HAVE_A_DISABILITY` - NO_I_DONT_HAVE_A_DISABILITY + + * `I_DONT_WISH_TO_ANSWER` - I_DONT_WISH_TO_ANSWER + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + EmailAddress: + docs: >- + # The EmailAddress Object + + ### Description + + The `EmailAddress` object is used to represent a candidate's email + address. + + ### Usage Example + + Fetch from the `GET Candidate` endpoint and view their email addresses. + properties: + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + value: + type: optional + docs: The email address. + validation: + format: email + maxLength: 254 + email_address_type: + type: optional + docs: |- + The type of email address. + + * `PERSONAL` - PERSONAL + * `WORK` - WORK + * `OTHER` - OTHER + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + source: + openapi: openapi/openapi.yml + EmailAddressRequest: + docs: >- + # The EmailAddress Object + + ### Description + + The `EmailAddress` object is used to represent a candidate's email + address. + + ### Usage Example + + Fetch from the `GET Candidate` endpoint and view their email addresses. + properties: + value: + type: optional + docs: The email address. + validation: + format: email + maxLength: 254 + email_address_type: + type: optional + docs: |- + The type of email address. + + * `PERSONAL` - PERSONAL + * `WORK` - WORK + * `OTHER` - OTHER + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + EmailAddressTypeEnum: + enum: + - PERSONAL + - WORK + - OTHER + docs: |- + * `PERSONAL` - PERSONAL + * `WORK` - WORK + * `OTHER` - OTHER + source: + openapi: openapi/openapi.yml + EnabledActionsEnum: + enum: + - READ + - WRITE + docs: |- + * `READ` - READ + * `WRITE` - WRITE + source: + openapi: openapi/openapi.yml + EncodingEnum: + enum: + - RAW + - BASE64 + - GZIP_BASE64 + docs: |- + * `RAW` - RAW + * `BASE64` - BASE64 + * `GZIP_BASE64` - GZIP_BASE64 + source: + openapi: openapi/openapi.yml + ErrorValidationProblem: + properties: + source: optional + title: string + detail: string + problem_type: string + source: + openapi: openapi/openapi.yml + EventTypeEnum: + enum: + - 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 + - DELETED_ALL_COMMON_MODELS_FOR_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 + - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + - FORCED_LINKED_ACCOUNT_RESYNC + - MUTED_ISSUE + - GENERATED_MAGIC_LINK + - ENABLED_MERGE_WEBHOOK + - DISABLED_MERGE_WEBHOOK + - MERGE_WEBHOOK_TARGET_CHANGED + - END_USER_CREDENTIALS_ACCESSED + docs: >- + * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + + * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + + * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + + * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + + * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + + * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + + * `INVITED_USER` - INVITED_USER + + * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + + * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + + * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + + * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - + DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + + * `CREATED_DESTINATION` - CREATED_DESTINATION + + * `DELETED_DESTINATION` - DELETED_DESTINATION + + * `CHANGED_DESTINATION` - CHANGED_DESTINATION + + * `CHANGED_SCOPES` - CHANGED_SCOPES + + * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + + * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + + * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + + * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + + * `ENABLED_CATEGORY` - ENABLED_CATEGORY + + * `DISABLED_CATEGORY` - DISABLED_CATEGORY + + * `CHANGED_PASSWORD` - CHANGED_PASSWORD + + * `RESET_PASSWORD` - RESET_PASSWORD + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - + CREATED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - + CREATED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - + CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + + * `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 + + * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + + * `MUTED_ISSUE` - MUTED_ISSUE + + * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + + * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + + * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + + * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + + * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + source: + openapi: openapi/openapi.yml + ExternalTargetFieldApi: + properties: + name: + type: optional + access: read-only + description: + type: optional + access: read-only + is_mapped: + type: optional + access: read-only + source: + openapi: openapi/openapi.yml + ExternalTargetFieldApiResponse: + properties: + Activity: optional> + Application: optional> + Attachment: optional> + Candidate: optional> + Department: optional> + EEOC: optional> + ScheduledInterview: optional> + Job: optional> + JobPosting: optional> + JobInterviewStage: optional> + Offer: optional> + Office: optional> + RejectReason: optional> + Scorecard: optional> + Tag: optional> + RemoteUser: optional> + source: + openapi: openapi/openapi.yml + FieldMappingApiInstanceTargetField: + properties: + name: string + description: string + is_organization_wide: boolean + source: + openapi: openapi/openapi.yml + inline: true + FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo: + properties: + method: optional + url_path: optional + field_traversal_path: optional> + source: + openapi: openapi/openapi.yml + inline: true + FieldMappingApiInstanceRemoteField: + properties: + remote_key_name: optional + schema: optional> + remote_endpoint_info: FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo + source: + openapi: openapi/openapi.yml + inline: true + FieldMappingApiInstance: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + is_integration_wide: + type: optional + access: read-only + target_field: + type: optional + access: read-only + remote_field: + type: optional + access: read-only + source: + openapi: openapi/openapi.yml + FieldMappingApiInstanceResponse: + properties: + Activity: optional> + Application: optional> + Attachment: optional> + Candidate: optional> + Department: optional> + EEOC: optional> + ScheduledInterview: optional> + Job: optional> + JobPosting: optional> + JobInterviewStage: optional> + Offer: optional> + Office: optional> + RejectReason: optional> + Scorecard: optional> + Tag: optional> + RemoteUser: optional> + source: + openapi: openapi/openapi.yml + FieldMappingInstanceResponse: + properties: + model: FieldMappingApiInstance + warnings: list + errors: list + logs: optional> + source: + openapi: openapi/openapi.yml + FieldPermissionDeserializer: + properties: + enabled_fields: optional> + disabled_fields: optional> + source: + openapi: openapi/openapi.yml + FieldPermissionDeserializerRequest: + properties: + enabled_fields: optional> + disabled_fields: optional> + source: + openapi: openapi/openapi.yml + GenderEnum: + enum: + - MALE + - FEMALE + - value: NON-BINARY + name: NonBinary + - OTHER + - DECLINE_TO_SELF_IDENTIFY + docs: |- + * `MALE` - MALE + * `FEMALE` - FEMALE + * `NON-BINARY` - NON-BINARY + * `OTHER` - OTHER + * `DECLINE_TO_SELF_IDENTIFY` - DECLINE_TO_SELF_IDENTIFY + source: + openapi: openapi/openapi.yml + IndividualCommonModelScopeDeserializer: + properties: + model_name: string + model_permissions: optional> + field_permissions: optional + source: + openapi: openapi/openapi.yml + IndividualCommonModelScopeDeserializerRequest: + properties: + model_name: + type: string + validation: + minLength: 1 + model_permissions: optional> + field_permissions: optional + source: + openapi: openapi/openapi.yml + Issue: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + status: + type: optional + docs: |- + Status of the issue. Options: ('ONGOING', 'RESOLVED') + + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + error_description: string + end_user: + type: optional> + access: read-only + first_incident_time: optional + last_incident_time: optional + is_muted: + type: optional + access: read-only + error_details: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + IssueStatusEnum: + enum: + - ONGOING + - RESOLVED + docs: |- + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + source: + openapi: openapi/openapi.yml + JobDepartmentsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Department + source: + openapi: openapi/openapi.yml + inline: true + JobOfficesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Office + source: + openapi: openapi/openapi.yml + inline: true + JobHiringManagersItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - RemoteUser + source: + openapi: openapi/openapi.yml + inline: true + JobRecruitersItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - RemoteUser + source: + openapi: openapi/openapi.yml + inline: true + Job: + docs: >- + # The Job Object + + ### Description + + The `Job` object can be used to track any jobs that are currently or will + be open/closed for applications. + + ### Usage Example + + Fetch from the `LIST Jobs` endpoint to show all job postings. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The job's name. + description: + type: optional + docs: The job's description. + code: + type: optional + docs: >- + The job's code. Typically an additional identifier used to reference + the particular job that is displayed on the ATS. + status: + type: optional + docs: |- + The job's status. + + * `OPEN` - OPEN + * `CLOSED` - CLOSED + * `DRAFT` - DRAFT + * `ARCHIVED` - ARCHIVED + * `PENDING` - PENDING + type: + type: optional + docs: |- + The job's type. + + * `POSTING` - POSTING + * `REQUISITION` - REQUISITION + * `PROFILE` - PROFILE + job_postings: + type: optional>> + docs: IDs of `JobPosting` objects that serve as job postings for this `Job`. + job_posting_urls: optional> + remote_created_at: + type: optional + docs: When the third party's job was created. + remote_updated_at: + type: optional + docs: When the third party's job was updated. + confidential: + type: optional + docs: Whether the job is confidential. + departments: + type: optional>> + docs: IDs of `Department` objects for this `Job`. + offices: + type: optional>> + docs: IDs of `Office` objects for this `Job`. + hiring_managers: + type: optional>> + docs: >- + IDs of `RemoteUser` objects that serve as hiring managers for this + `Job`. + recruiters: + type: optional>> + docs: IDs of `RemoteUser` objects that serve as recruiters for this `Job`. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + JobInterviewStageJob: + discriminated: false + docs: >- + This field is populated only if the stage is specific to a particular job. + If the stage is generic, this field will not be populated. + union: + - type: string + validation: + format: uuid + - Job + source: + openapi: openapi/openapi.yml + inline: true + JobInterviewStage: + docs: >- + # The JobInterviewStage Object + + ### Description + + The `JobInterviewStage` object is used to represent a particular + recruiting stage for an `Application`. A given `Application` typically has + the `JobInterviewStage` object represented in the current_stage field. + + ### Usage Example + + Fetch from the `LIST JobInterviewStages` endpoint and view the job + interview stages used by a company. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: >- + Standard stage names are offered by ATS systems but can be modified by + users. + job: + type: optional + docs: >- + This field is populated only if the stage is specific to a particular + job. If the stage is generic, this field will not be populated. + stage_order: + type: optional + docs: >- + The stage’s order, with the lowest values ordered first. If the + third-party does not return details on the order of stages, this field + will not be populated. + validation: + min: -2147483648 + max: 2147483647 + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + JobPostingJobPostingUrlsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Url + source: + openapi: openapi/openapi.yml + inline: true + JobPostingJob: + discriminated: false + docs: ID of `Job` object for this `JobPosting`. + union: + - type: string + validation: + format: uuid + - Job + source: + openapi: openapi/openapi.yml + inline: true + JobPosting: + docs: >- + # 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. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + title: + type: optional + docs: The job posting’s title. + job_posting_urls: + type: optional> + docs: >- + The Url object is used to represent hyperlinks for a candidate to + apply to a given job. + job: + type: optional + docs: ID of `Job` object for this `JobPosting`. + status: + type: optional + docs: |- + The job posting's status. + + * `PUBLISHED` - PUBLISHED + * `CLOSED` - CLOSED + * `DRAFT` - DRAFT + * `INTERNAL` - INTERNAL + * `PENDING` - PENDING + content: + type: optional + docs: The job posting’s content. + remote_created_at: + type: optional + docs: When the third party's job posting was created. + remote_updated_at: + type: optional + docs: When the third party's job posting was updated. + is_internal: + type: optional + docs: Indicates whether the job posting is internal or external. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + JobPostingStatusEnum: + enum: + - PUBLISHED + - CLOSED + - DRAFT + - INTERNAL + - PENDING + docs: |- + * `PUBLISHED` - PUBLISHED + * `CLOSED` - CLOSED + * `DRAFT` - DRAFT + * `INTERNAL` - INTERNAL + * `PENDING` - PENDING + source: + openapi: openapi/openapi.yml + JobStatusEnum: + enum: + - OPEN + - CLOSED + - DRAFT + - ARCHIVED + - PENDING + docs: |- + * `OPEN` - OPEN + * `CLOSED` - CLOSED + * `DRAFT` - DRAFT + * `ARCHIVED` - ARCHIVED + * `PENDING` - PENDING + source: + openapi: openapi/openapi.yml + JobTypeEnum: + enum: + - POSTING + - REQUISITION + - PROFILE + docs: |- + * `POSTING` - POSTING + * `REQUISITION` - REQUISITION + * `PROFILE` - PROFILE + source: + openapi: openapi/openapi.yml + LanguageEnum: + enum: + - en + - de + docs: |- + * `en` - en + * `de` - de + source: + openapi: openapi/openapi.yml + LastSyncResultEnum: + enum: + - SYNCING + - DONE + - FAILED + - DISABLED + - PAUSED + - PARTIALLY_SYNCED + docs: |- + * `SYNCING` - SYNCING + * `DONE` - DONE + * `FAILED` - FAILED + * `DISABLED` - DISABLED + * `PAUSED` - PAUSED + * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED + source: + openapi: openapi/openapi.yml + LinkToken: + properties: + link_token: string + integration_name: optional + magic_link_url: optional + source: + openapi: openapi/openapi.yml + LinkedAccountStatus: + properties: + linked_account_status: string + can_make_request: boolean + source: + openapi: openapi/openapi.yml + MetaResponse: + properties: + request_schema: map + remote_field_classes: optional> + status: optional + has_conditional_params: boolean + has_required_linked_account_params: boolean + source: + openapi: openapi/openapi.yml + MethodEnum: + enum: + - GET + - OPTIONS + - HEAD + - POST + - PUT + - PATCH + - DELETE + docs: |- + * `GET` - GET + * `OPTIONS` - OPTIONS + * `HEAD` - HEAD + * `POST` - POST + * `PUT` - PUT + * `PATCH` - PATCH + * `DELETE` - DELETE + source: + openapi: openapi/openapi.yml + ModelOperation: + docs: >- + # The ModelOperation Object + + ### Description + + The `ModelOperation` object is used to represent the operations that are + currently supported for a given model. + + + ### Usage Example + + View what operations are supported for the `Candidate` endpoint. + properties: + model_name: string + available_operations: list + required_post_parameters: list + supported_fields: list + source: + openapi: openapi/openapi.yml + ModelPermissionDeserializer: + properties: + is_enabled: optional + source: + openapi: openapi/openapi.yml + ModelPermissionDeserializerRequest: + properties: + is_enabled: optional + source: + openapi: openapi/openapi.yml + MultipartFormFieldRequest: + docs: >- + # The MultipartFormField Object + + ### Description + + The `MultipartFormField` object is used to represent fields in an HTTP + request using `multipart/form-data`. + + + ### Usage Example + + Create a `MultipartFormField` to define a multipart form entry. + properties: + name: + type: string + docs: The name of the form field + validation: + minLength: 1 + data: + type: string + docs: The data for the form field. + validation: + minLength: 1 + encoding: + type: optional + docs: |- + The encoding of the value of `data`. Defaults to `RAW` if not defined. + + * `RAW` - RAW + * `BASE64` - BASE64 + * `GZIP_BASE64` - GZIP_BASE64 + file_name: + type: optional + docs: The file name of the form field, if the field is for a file. + validation: + minLength: 1 + content_type: + type: optional + docs: The MIME type of the file, if the field is for a file. + validation: + minLength: 1 + source: + openapi: openapi/openapi.yml + OfferApplication: + discriminated: false + docs: The application who is receiving the offer. + union: + - type: string + validation: + format: uuid + - Application + source: + openapi: openapi/openapi.yml + inline: true + OfferCreator: + discriminated: false + docs: The user who created the offer. + union: + - type: string + validation: + format: uuid + - RemoteUser + source: + openapi: openapi/openapi.yml + inline: true + Offer: + docs: >- + # The Offer Object + + ### Description + + The `Offer` object is used to represent an offer for a candidate's + application specific to a job. + + ### Usage Example + + Fetch from the `LIST Offers` endpoint and filter by `ID` to show all + offers. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + application: + type: optional + docs: The application who is receiving the offer. + creator: + type: optional + docs: The user who created the offer. + remote_created_at: + type: optional + docs: When the third party's offer was created. + closed_at: + type: optional + docs: When the offer was closed. + sent_at: + type: optional + docs: When the offer was sent. + start_date: + type: optional + docs: The employment start date on the offer. + status: + type: optional + docs: |- + The offer's status. + + * `DRAFT` - DRAFT + * `APPROVAL-SENT` - APPROVAL-SENT + * `APPROVED` - APPROVED + * `SENT` - SENT + * `SENT-MANUALLY` - SENT-MANUALLY + * `OPENED` - OPENED + * `DENIED` - DENIED + * `SIGNED` - SIGNED + * `DEPRECATED` - DEPRECATED + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + OfferStatusEnum: + enum: + - DRAFT + - value: APPROVAL-SENT + name: ApprovalSent + - APPROVED + - SENT + - value: SENT-MANUALLY + name: SentManually + - OPENED + - DENIED + - SIGNED + - DEPRECATED + docs: |- + * `DRAFT` - DRAFT + * `APPROVAL-SENT` - APPROVAL-SENT + * `APPROVED` - APPROVED + * `SENT` - SENT + * `SENT-MANUALLY` - SENT-MANUALLY + * `OPENED` - OPENED + * `DENIED` - DENIED + * `SIGNED` - SIGNED + * `DEPRECATED` - DEPRECATED + source: + openapi: openapi/openapi.yml + Office: + docs: >- + # The Office Object + + ### Description + + The `Office` object is used to represent an office within a company. A + given `Job` has the `Office` ID in its offices field. + + ### Usage Example + + Fetch from the `LIST Offices` endpoint and view the offices within a + company. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The office's name. + location: + type: optional + docs: The office's location. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + OverallRecommendationEnum: + enum: + - DEFINITELY_NO + - 'NO' + - 'YES' + - STRONG_YES + - NO_DECISION + docs: |- + * `DEFINITELY_NO` - DEFINITELY_NO + * `NO` - NO + * `YES` - YES + * `STRONG_YES` - STRONG_YES + * `NO_DECISION` - NO_DECISION + source: + openapi: openapi/openapi.yml + PaginatedAccountDetailsAndActionsList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedActivityList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedApplicationList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedAttachmentList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedAuditLogEventList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedCandidateList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedDepartmentList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedEeocList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedIssueList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedJobInterviewStageList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedJobList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedJobPostingList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedOfferList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedOfficeList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedRejectReasonList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedRemoteUserList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedScheduledInterviewList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedScorecardList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedScreeningQuestionList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedSyncStatusList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedTagList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PatchedCandidateRequest: + docs: >- + # The Candidate Object + + ### Description + + The `Candidate` object is used to represent profile information about a + given Candidate. Because it is specific to a Candidate, this information + stays constant across applications. + + ### Usage Example + + Fetch from the `LIST Candidates` endpoint and filter by `ID` to show all + candidates. + properties: + first_name: + type: optional + docs: The candidate's first name. + last_name: + type: optional + docs: The candidate's last name. + company: + type: optional + docs: The candidate's current company. + title: + type: optional + docs: The candidate's current title. + last_interaction_at: + type: optional + docs: When the most recent interaction with the candidate occurred. + is_private: + type: optional + docs: Whether or not the candidate is private. + can_email: + type: optional + docs: Whether or not the candidate can be emailed. + locations: + type: optional>> + docs: The candidate's locations. + phone_numbers: optional> + email_addresses: optional> + urls: optional> + tags: + type: optional>> + docs: Array of `Tag` names as strings. + applications: + type: optional>> + docs: Array of `Application` object IDs. + attachments: + type: optional>> + docs: Array of `Attachment` object IDs. + remote_template_id: + type: optional + validation: + minLength: 1 + access: write-only + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + PhoneNumber: + docs: |- + # The PhoneNumber Object + ### Description + The `PhoneNumber` object is used to represent a candidate's phone number. + ### Usage Example + Fetch from the `GET Candidate` endpoint and view their phone numbers. + properties: + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + value: + type: optional + docs: The phone number. + phone_number_type: + type: optional + docs: |- + The type of phone number. + + * `HOME` - HOME + * `WORK` - WORK + * `MOBILE` - MOBILE + * `SKYPE` - SKYPE + * `OTHER` - OTHER + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + source: + openapi: openapi/openapi.yml + PhoneNumberRequest: + docs: |- + # The PhoneNumber Object + ### Description + The `PhoneNumber` object is used to represent a candidate's phone number. + ### Usage Example + Fetch from the `GET Candidate` endpoint and view their phone numbers. + properties: + value: + type: optional + docs: The phone number. + phone_number_type: + type: optional + docs: |- + The type of phone number. + + * `HOME` - HOME + * `WORK` - WORK + * `MOBILE` - MOBILE + * `SKYPE` - SKYPE + * `OTHER` - OTHER + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + PhoneNumberTypeEnum: + enum: + - HOME + - WORK + - MOBILE + - SKYPE + - OTHER + docs: |- + * `HOME` - HOME + * `WORK` - WORK + * `MOBILE` - MOBILE + * `SKYPE` - SKYPE + * `OTHER` - OTHER + source: + openapi: openapi/openapi.yml + RaceEnum: + enum: + - AMERICAN_INDIAN_OR_ALASKAN_NATIVE + - ASIAN + - BLACK_OR_AFRICAN_AMERICAN + - HISPANIC_OR_LATINO + - WHITE + - NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER + - TWO_OR_MORE_RACES + - DECLINE_TO_SELF_IDENTIFY + docs: >- + * `AMERICAN_INDIAN_OR_ALASKAN_NATIVE` - AMERICAN_INDIAN_OR_ALASKAN_NATIVE + + * `ASIAN` - ASIAN + + * `BLACK_OR_AFRICAN_AMERICAN` - BLACK_OR_AFRICAN_AMERICAN + + * `HISPANIC_OR_LATINO` - HISPANIC_OR_LATINO + + * `WHITE` - WHITE + + * `NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER` - + NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER + + * `TWO_OR_MORE_RACES` - TWO_OR_MORE_RACES + + * `DECLINE_TO_SELF_IDENTIFY` - DECLINE_TO_SELF_IDENTIFY + source: + openapi: openapi/openapi.yml + ReasonEnum: + enum: + - GENERAL_CUSTOMER_REQUEST + - GDPR + - OTHER + docs: |- + * `GENERAL_CUSTOMER_REQUEST` - GENERAL_CUSTOMER_REQUEST + * `GDPR` - GDPR + * `OTHER` - OTHER + source: + openapi: openapi/openapi.yml + RejectReason: + docs: >- + # The RejectReason Object + + ### Description + + The `RejectReason` object is used to represent a reason for rejecting an + application. These can typically be configured within an ATS system. + + ### Usage Example + + Fetch from the `LIST RejectReasons` endpoint and filter by `ID` to show + all reasons. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The rejection reason’s name. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + RemoteData: + docs: >- + # The RemoteData Object + + ### Description + + The `RemoteData` object is used to represent the full data pulled from the + third-party API for an object. + + + ### Usage Example + + TODO + properties: + path: + type: string + docs: The third-party API path that is being called. + data: + type: optional + access: read-only + source: + openapi: openapi/openapi.yml + RemoteEndpointInfo: + properties: + method: string + url_path: string + field_traversal_path: list + source: + openapi: openapi/openapi.yml + RemoteFieldApiCoverage: + discriminated: false + union: + - integer + - double + source: + openapi: openapi/openapi.yml + inline: true + RemoteFieldApi: + properties: + schema: map + remote_key_name: string + remote_endpoint_info: RemoteEndpointInfo + example_values: optional> + advanced_metadata: optional + coverage: + type: optional + access: read-only + source: + openapi: openapi/openapi.yml + RemoteFieldApiResponse: + properties: + Activity: optional> + Application: optional> + Attachment: optional> + Candidate: optional> + Department: optional> + EEOC: optional> + ScheduledInterview: optional> + Job: optional> + JobPosting: optional> + JobInterviewStage: optional> + Offer: optional> + Office: optional> + RejectReason: optional> + Scorecard: optional> + Tag: optional> + RemoteUser: optional> + source: + openapi: openapi/openapi.yml + RemoteKey: + docs: >- + # The RemoteKey Object + + ### Description + + The `RemoteKey` object is used to represent a request for a new remote + key. + + + ### Usage Example + + Post a `GenerateRemoteKey` to receive a new `RemoteKey`. + properties: + name: string + key: string + source: + openapi: openapi/openapi.yml + RemoteResponse: + docs: >- + # The RemoteResponse Object + + ### Description + + The `RemoteResponse` object is used to represent information returned from + a third-party endpoint. + + + ### Usage Example + + View the `RemoteResponse` returned from your `DataPassthrough`. + properties: + method: string + path: string + status: integer + response: unknown + response_headers: optional> + response_type: optional + headers: optional> + source: + openapi: openapi/openapi.yml + RemoteUser: + docs: >- + # The RemoteUser Object + + ### Description + + The `RemoteUser` object is used to represent a user with a login to the + ATS system. + + ### Usage Example + + Fetch from the `LIST RemoteUsers` endpoint to show all users for a third + party. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + first_name: + type: optional + docs: The user's first name. + last_name: + type: optional + docs: The user's last name. + email: + type: optional + docs: The user's email. + validation: + format: email + maxLength: 254 + disabled: + type: optional + docs: Whether the user's account had been disabled. + remote_created_at: + type: optional + docs: When the third party's user was created. + access_role: + type: optional + docs: |- + The user's role. + + * `SUPER_ADMIN` - SUPER_ADMIN + * `ADMIN` - ADMIN + * `TEAM_MEMBER` - TEAM_MEMBER + * `LIMITED_TEAM_MEMBER` - LIMITED_TEAM_MEMBER + * `INTERVIEWER` - INTERVIEWER + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + RequestFormatEnum: + enum: + - JSON + - XML + - MULTIPART + docs: |- + * `JSON` - JSON + * `XML` - XML + * `MULTIPART` - MULTIPART + source: + openapi: openapi/openapi.yml + ResponseTypeEnum: + enum: + - JSON + - BASE64_GZIP + docs: |- + * `JSON` - JSON + * `BASE64_GZIP` - BASE64_GZIP + source: + openapi: openapi/openapi.yml + RoleEnum: + enum: + - ADMIN + - DEVELOPER + - MEMBER + - API + - SYSTEM + - MERGE_TEAM + docs: |- + * `ADMIN` - ADMIN + * `DEVELOPER` - DEVELOPER + * `MEMBER` - MEMBER + * `API` - API + * `SYSTEM` - SYSTEM + * `MERGE_TEAM` - MERGE_TEAM + source: + openapi: openapi/openapi.yml + ScheduledInterviewApplication: + discriminated: false + docs: The application being interviewed. + union: + - type: string + validation: + format: uuid + - Application + source: + openapi: openapi/openapi.yml + inline: true + ScheduledInterviewJobInterviewStage: + discriminated: false + docs: The stage of the interview. + union: + - type: string + validation: + format: uuid + - JobInterviewStage + source: + openapi: openapi/openapi.yml + inline: true + ScheduledInterviewOrganizer: + discriminated: false + docs: The user organizing the interview. + union: + - type: string + validation: + format: uuid + - RemoteUser + source: + openapi: openapi/openapi.yml + inline: true + ScheduledInterviewInterviewersItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - RemoteUser + source: + openapi: openapi/openapi.yml + inline: true + ScheduledInterview: + docs: >- + # The ScheduledInterview Object + + ### Description + + The `ScheduledInterview` object is used to represent a scheduled interview + for a given candidate’s application to a job. An `Application` can have + multiple `ScheduledInterview`s depending on the particular hiring process. + + ### Usage Example + + Fetch from the `LIST ScheduledInterviews` endpoint and filter by + `interviewers` to show all office locations. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + application: + type: optional + docs: The application being interviewed. + job_interview_stage: + type: optional + docs: The stage of the interview. + organizer: + type: optional + docs: The user organizing the interview. + interviewers: + type: optional>> + docs: Array of `RemoteUser` IDs. + location: + type: optional + docs: The interview's location. + start_at: + type: optional + docs: When the interview was started. + end_at: + type: optional + docs: When the interview was ended. + remote_created_at: + type: optional + docs: When the third party's interview was created. + remote_updated_at: + type: optional + docs: When the third party's interview was updated. + status: + type: optional + docs: |- + The interview's status. + + * `SCHEDULED` - SCHEDULED + * `AWAITING_FEEDBACK` - AWAITING_FEEDBACK + * `COMPLETE` - COMPLETE + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + ScheduledInterviewRequestApplication: + discriminated: false + docs: The application being interviewed. + union: + - type: string + validation: + format: uuid + - Application + source: + openapi: openapi/openapi.yml + inline: true + ScheduledInterviewRequestJobInterviewStage: + discriminated: false + docs: The stage of the interview. + union: + - type: string + validation: + format: uuid + - JobInterviewStage + source: + openapi: openapi/openapi.yml + inline: true + ScheduledInterviewRequestOrganizer: + discriminated: false + docs: The user organizing the interview. + union: + - type: string + validation: + format: uuid + - RemoteUser + source: + openapi: openapi/openapi.yml + inline: true + ScheduledInterviewRequestInterviewersItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - RemoteUser + source: + openapi: openapi/openapi.yml + inline: true + ScheduledInterviewRequest: + docs: >- + # The ScheduledInterview Object + + ### Description + + The `ScheduledInterview` object is used to represent a scheduled interview + for a given candidate’s application to a job. An `Application` can have + multiple `ScheduledInterview`s depending on the particular hiring process. + + ### Usage Example + + Fetch from the `LIST ScheduledInterviews` endpoint and filter by + `interviewers` to show all office locations. + properties: + application: + type: optional + docs: The application being interviewed. + job_interview_stage: + type: optional + docs: The stage of the interview. + organizer: + type: optional + docs: The user organizing the interview. + interviewers: + type: optional>> + docs: Array of `RemoteUser` IDs. + location: + type: optional + docs: The interview's location. + start_at: + type: optional + docs: When the interview was started. + end_at: + type: optional + docs: When the interview was ended. + status: + type: optional + docs: |- + The interview's status. + + * `SCHEDULED` - SCHEDULED + * `AWAITING_FEEDBACK` - AWAITING_FEEDBACK + * `COMPLETE` - COMPLETE + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + ScheduledInterviewResponse: + properties: + model: ScheduledInterview + warnings: list + errors: list + logs: optional> + source: + openapi: openapi/openapi.yml + ScheduledInterviewStatusEnum: + enum: + - SCHEDULED + - AWAITING_FEEDBACK + - COMPLETE + docs: |- + * `SCHEDULED` - SCHEDULED + * `AWAITING_FEEDBACK` - AWAITING_FEEDBACK + * `COMPLETE` - COMPLETE + source: + openapi: openapi/openapi.yml + ScorecardApplication: + discriminated: false + docs: The application being scored. + union: + - type: string + validation: + format: uuid + - Application + source: + openapi: openapi/openapi.yml + inline: true + ScorecardInterview: + discriminated: false + docs: The interview being scored. + union: + - type: string + validation: + format: uuid + - ScheduledInterview + source: + openapi: openapi/openapi.yml + inline: true + ScorecardInterviewer: + discriminated: false + docs: The interviewer doing the scoring. + union: + - type: string + validation: + format: uuid + - RemoteUser + source: + openapi: openapi/openapi.yml + inline: true + Scorecard: + docs: >- + # The Scorecard Object + + ### Description + + The `Scorecard` object is used to represent an interviewer's candidate + recommendation based on a particular interview. + + ### Usage Example + + Fetch from the `LIST Scorecards` endpoint and filter by `application` to + show all scorecard for an applicant. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + application: + type: optional + docs: The application being scored. + interview: + type: optional + docs: The interview being scored. + interviewer: + type: optional + docs: The interviewer doing the scoring. + remote_created_at: + type: optional + docs: When the third party's scorecard was created. + submitted_at: + type: optional + docs: When the scorecard was submitted. + overall_recommendation: + type: optional + docs: |- + The inteviewer's recommendation. + + * `DEFINITELY_NO` - DEFINITELY_NO + * `NO` - NO + * `YES` - YES + * `STRONG_YES` - STRONG_YES + * `NO_DECISION` - NO_DECISION + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + ScreeningQuestionJob: + discriminated: false + docs: The job associated with the screening question. + union: + - type: string + validation: + format: uuid + - Job + source: + openapi: openapi/openapi.yml + inline: true + ScreeningQuestion: + docs: >- + # The ScreeningQuestion Object + + ### Description + + The `ScreeningQuestion` object is used to represent questions asked to + screen candidates for a job. + + + ### Usage Example + + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + job: + type: optional + docs: The job associated with the screening question. + description: + type: optional + docs: The description of the screening question + validation: + maxLength: 500 + title: + type: optional + docs: The title of the screening question + validation: + maxLength: 2500 + type: + type: optional + docs: |- + The data type for the screening question. + + * `DATE` - DATE + * `FILE` - FILE + * `SINGLE_SELECT` - SINGLE_SELECT + * `MULTI_SELECT` - MULTI_SELECT + * `SINGLE_LINE_TEXT` - SINGLE_LINE_TEXT + * `MULTI_LINE_TEXT` - MULTI_LINE_TEXT + * `NUMERIC` - NUMERIC + * `BOOLEAN` - BOOLEAN + required: + type: optional + docs: Whether or not the screening question is required. + options: optional> + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + source: + openapi: openapi/openapi.yml + ScreeningQuestionAnswerQuestion: + discriminated: false + docs: >- + The screening question associated with the candidate’s answer. To + determine the data type of the answer, you can expand on the screening + question by adding `screening_question_answers.question` to the `expand` + query parameter. + union: + - type: string + validation: + format: uuid + - ScreeningQuestion + source: + openapi: openapi/openapi.yml + inline: true + ScreeningQuestionAnswer: + docs: >- + # The ScreeningQuestionAnswer Object + + ### Description + + The `ScreeningQuestionAnswer` object is used to represent candidate + responses to a screening question, for a specific application. + + + ### Usage Example + + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + question: + type: optional + docs: >- + The screening question associated with the candidate’s answer. To + determine the data type of the answer, you can expand on the screening + question by adding `screening_question_answers.question` to the + `expand` query parameter. + answer: + type: optional + docs: The candidate’s response to the screening question. + validation: + maxLength: 10000 + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + source: + openapi: openapi/openapi.yml + ScreeningQuestionAnswerRequestQuestion: + discriminated: false + docs: >- + The screening question associated with the candidate’s answer. To + determine the data type of the answer, you can expand on the screening + question by adding `screening_question_answers.question` to the `expand` + query parameter. + union: + - type: string + validation: + format: uuid + - ScreeningQuestion + source: + openapi: openapi/openapi.yml + inline: true + ScreeningQuestionAnswerRequest: + docs: >- + # The ScreeningQuestionAnswer Object + + ### Description + + The `ScreeningQuestionAnswer` object is used to represent candidate + responses to a screening question, for a specific application. + + + ### Usage Example + + TODO + properties: + remote_id: + type: optional + docs: The third-party API ID of the matching object. + question: + type: optional + docs: >- + The screening question associated with the candidate’s answer. To + determine the data type of the answer, you can expand on the screening + question by adding `screening_question_answers.question` to the + `expand` query parameter. + answer: + type: optional + docs: The candidate’s response to the screening question. + validation: + maxLength: 10000 + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + ScreeningQuestionOption: + docs: >- + # The ScreeningQuestionOption Object + + ### Description + + The `ScreeningQuestionOption` object is used to represent options for a + `ScreeningQuestion` object + + + ### Usage Example + + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + label: + type: optional + docs: Available response options + validation: + maxLength: 300 + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + source: + openapi: openapi/openapi.yml + ScreeningQuestionTypeEnum: + enum: + - DATE + - FILE + - SINGLE_SELECT + - MULTI_SELECT + - SINGLE_LINE_TEXT + - MULTI_LINE_TEXT + - NUMERIC + - BOOLEAN + docs: |- + * `DATE` - DATE + * `FILE` - FILE + * `SINGLE_SELECT` - SINGLE_SELECT + * `MULTI_SELECT` - MULTI_SELECT + * `SINGLE_LINE_TEXT` - SINGLE_LINE_TEXT + * `MULTI_LINE_TEXT` - MULTI_LINE_TEXT + * `NUMERIC` - NUMERIC + * `BOOLEAN` - BOOLEAN + source: + openapi: openapi/openapi.yml + SelectiveSyncConfigurationsUsageEnum: + enum: + - IN_NEXT_SYNC + - IN_LAST_SYNC + docs: |- + * `IN_NEXT_SYNC` - IN_NEXT_SYNC + * `IN_LAST_SYNC` - IN_LAST_SYNC + source: + openapi: openapi/openapi.yml + StatusFd5Enum: + enum: + - SYNCING + - DONE + - FAILED + - DISABLED + - PAUSED + - PARTIALLY_SYNCED + docs: |- + * `SYNCING` - SYNCING + * `DONE` - DONE + * `FAILED` - FAILED + * `DISABLED` - DISABLED + * `PAUSED` - PAUSED + * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED + source: + openapi: openapi/openapi.yml + SyncStatus: + docs: >- + # The SyncStatus Object + + ### Description + + The `SyncStatus` object is used to represent the syncing state of an + account + + + ### Usage Example + + View the `SyncStatus` for an account to see how recently its models were + synced. + properties: + model_name: string + model_id: string + last_sync_start: optional + next_sync_start: optional + last_sync_result: optional + last_sync_finished: optional + status: StatusFd5Enum + is_initial_sync: boolean + selective_sync_configurations_usage: optional + source: + openapi: openapi/openapi.yml + Tag: + docs: >- + # The Tag Object + + ### Description + + The `Tag` object is used to represent a tag for a candidate. + + ### Usage Example + + Fetch from the `LIST Tags` endpoint and view the tags used within a + company. + properties: + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The tag's name. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: optional>>> + source: + openapi: openapi/openapi.yml + Url: + docs: >- + # The Url Object + + ### Description + + The `Url` object is used to represent hyperlinks associated with the + parent model. + + ### Usage Example + + Fetch from the `GET Candidate` endpoint and view their website urls. + properties: + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + value: + type: optional + docs: The site's url. + validation: + format: uri + maxLength: 2000 + url_type: + type: optional + docs: |- + The type of site. + + * `PERSONAL` - PERSONAL + * `COMPANY` - COMPANY + * `PORTFOLIO` - PORTFOLIO + * `BLOG` - BLOG + * `SOCIAL_MEDIA` - SOCIAL_MEDIA + * `OTHER` - OTHER + * `JOB_POSTING` - JOB_POSTING + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + source: + openapi: openapi/openapi.yml + UrlRequest: + docs: >- + # The Url Object + + ### Description + + The `Url` object is used to represent hyperlinks associated with the + parent model. + + ### Usage Example + + Fetch from the `GET Candidate` endpoint and view their website urls. + properties: + value: + type: optional + docs: The site's url. + validation: + format: uri + maxLength: 2000 + url_type: + type: optional + docs: |- + The type of site. + + * `PERSONAL` - PERSONAL + * `COMPANY` - COMPANY + * `PORTFOLIO` - PORTFOLIO + * `BLOG` - BLOG + * `SOCIAL_MEDIA` - SOCIAL_MEDIA + * `OTHER` - OTHER + * `JOB_POSTING` - JOB_POSTING + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + UrlTypeEnum: + enum: + - PERSONAL + - COMPANY + - PORTFOLIO + - BLOG + - SOCIAL_MEDIA + - OTHER + - JOB_POSTING + docs: |- + * `PERSONAL` - PERSONAL + * `COMPANY` - COMPANY + * `PORTFOLIO` - PORTFOLIO + * `BLOG` - BLOG + * `SOCIAL_MEDIA` - SOCIAL_MEDIA + * `OTHER` - OTHER + * `JOB_POSTING` - JOB_POSTING + source: + openapi: openapi/openapi.yml + ValidationProblemSource: + properties: + pointer: string + source: + openapi: openapi/openapi.yml + VeteranStatusEnum: + enum: + - I_AM_NOT_A_PROTECTED_VETERAN + - I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN + - I_DONT_WISH_TO_ANSWER + docs: >- + * `I_AM_NOT_A_PROTECTED_VETERAN` - I_AM_NOT_A_PROTECTED_VETERAN + + * + `I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN` + - I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN + + * `I_DONT_WISH_TO_ANSWER` - I_DONT_WISH_TO_ANSWER + source: + openapi: openapi/openapi.yml + VisibilityEnum: + enum: + - ADMIN_ONLY + - PUBLIC + - PRIVATE + docs: |- + * `ADMIN_ONLY` - ADMIN_ONLY + * `PUBLIC` - PUBLIC + * `PRIVATE` - PRIVATE + source: + openapi: openapi/openapi.yml + WarningValidationProblem: + properties: + source: optional + title: string + detail: string + problem_type: string + source: + openapi: openapi/openapi.yml + WebhookReceiver: + properties: + event: string + is_active: boolean + key: optional + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ats/accountDetails.yml b/.mock/definition/ats/accountDetails.yml new file mode 100644 index 0000000..fe37fa6 --- /dev/null +++ b/.mock/definition/ats/accountDetails.yml @@ -0,0 +1,36 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + retrieve: + path: /ats/v1/account-details + method: GET + auth: true + docs: Get details for a linked account. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.AccountDetails + status-code: 200 + examples: + - headers: {} + response: + body: + id: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd + integration: BambooHR + integration_slug: bamboohr + category: hris + end_user_origin_id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + end_user_organization_name: Waystar Royco + end_user_email_address: kendall.roy@waystar-royco.com + status: COMPLETE + webhook_listener_url: >- + https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 + is_duplicate: true + account_type: PRODUCTION + completed_at: '2024-08-26T20:11:19Z' + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ats/accountToken.yml b/.mock/definition/ats/accountToken.yml new file mode 100644 index 0000000..0c37279 --- /dev/null +++ b/.mock/definition/ats/accountToken.yml @@ -0,0 +1,44 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + retrieve: + path: /ats/v1/account-token/{public_token} + method: GET + auth: true + docs: >- + Returns the account token for the end user with the provided public + token. + source: + openapi: openapi/openapi.yml + path-parameters: + public_token: string + response: + docs: '' + type: root.AccountToken + status-code: 200 + examples: + - path-parameters: + public_token: public_token + response: + body: + account_token: T9klMDQrcHdm9jrtHuOS2Nf06BIHwMNjpPXPMB + integration: + name: name + abbreviated_name: abbreviated_name + categories: + - hris + image: image + square_image: square_image + color: color + slug: slug + api_endpoints_to_documentation_urls: + key: value + webhook_setup_guide_url: webhook_setup_guide_url + category_beta_status: + key: value + id: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ats/activities.yml b/.mock/definition/ats/activities.yml new file mode 100644 index 0000000..362836a --- /dev/null +++ b/.mock/definition/ats/activities.yml @@ -0,0 +1,474 @@ +types: + ActivitiesListRequestRemoteFields: + enum: + - activity_type + - value: activity_type,visibility + name: ActivityTypeVisibility + - visibility + source: + openapi: openapi/openapi.yml + ActivitiesListRequestShowEnumOrigins: + enum: + - activity_type + - value: activity_type,visibility + name: ActivityTypeVisibility + - visibility + source: + openapi: openapi/openapi.yml + ActivitiesRetrieveRequestRemoteFields: + enum: + - activity_type + - value: activity_type,visibility + name: ActivityTypeVisibility + - visibility + source: + openapi: openapi/openapi.yml + ActivitiesRetrieveRequestShowEnumOrigins: + enum: + - activity_type + - value: activity_type,visibility + name: ActivityTypeVisibility + - visibility + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ats/v1/activities + method: GET + auth: true + docs: Returns a list of `Activity` objects. + source: + openapi: openapi/openapi.yml + request: + name: ActivitiesListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_fields: + type: optional + docs: Deprecated. Use show_enum_origins. + remote_id: + type: optional + docs: The API provider's ID for the given object. + show_enum_origins: + type: optional + docs: >- + 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: + type: optional + docs: If provided, will only return activities done by this user. + response: + docs: '' + type: root.PaginatedActivityList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '198123' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + user: user + remote_created_at: '2021-10-15T00:00:00Z' + activity_type: NOTE + subject: Gil Feig's interview + body: Candidate loves integrations! + visibility: ADMIN_ONLY + candidate: 550e8400-e29b-41d4-a716-446655440000 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + create: + path: /ats/v1/activities + method: POST + auth: true + docs: Creates an `Activity` object with the given values. + source: + openapi: openapi/openapi.yml + request: + name: ActivityEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: root.ActivityRequest + remote_user_id: string + content-type: application/json + response: + docs: '' + type: root.ActivityResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + remote_user_id: remote_user_id + response: + body: + model: + id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '198123' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + user: user + remote_created_at: '2021-10-15T00:00:00Z' + activity_type: NOTE + subject: Gil Feig's interview + body: Candidate loves integrations! + visibility: ADMIN_ONLY + candidate: 550e8400-e29b-41d4-a716-446655440000 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /ats/v1/activities/{id} + method: GET + auth: true + docs: Returns an `Activity` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: ActivitiesRetrieveRequest + query-parameters: + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional + docs: >- + 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) + response: + docs: '' + type: root.Activity + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: ecbe05ac-62a3-46c5-ab31-4b478b37d1b4 + remote_id: '198123' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + user: user + remote_created_at: '2021-10-15T00:00:00Z' + activity_type: NOTE + subject: Gil Feig's interview + body: Candidate loves integrations! + visibility: ADMIN_ONLY + candidate: 550e8400-e29b-41d4-a716-446655440000 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + metaPostRetrieve: + path: /ats/v1/activities/meta/post + method: GET + auth: true + docs: Returns metadata for `Activity` POSTs. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ats/applications.yml b/.mock/definition/ats/applications.yml new file mode 100644 index 0000000..4a5822f --- /dev/null +++ b/.mock/definition/ats/applications.yml @@ -0,0 +1,1903 @@ +types: + ApplicationsListRequestExpand: + enum: + - candidate + - value: candidate,credited_to + name: CandidateCreditedTo + - value: candidate,credited_to,current_stage + name: CandidateCreditedToCurrentStage + - value: candidate,credited_to,current_stage,reject_reason + name: CandidateCreditedToCurrentStageRejectReason + - value: candidate,credited_to,reject_reason + name: CandidateCreditedToRejectReason + - value: candidate,current_stage + name: CandidateCurrentStage + - value: candidate,current_stage,reject_reason + name: CandidateCurrentStageRejectReason + - value: candidate,job + name: CandidateJob + - value: candidate,job,credited_to + name: CandidateJobCreditedTo + - value: candidate,job,credited_to,current_stage + name: CandidateJobCreditedToCurrentStage + - value: candidate,job,credited_to,current_stage,reject_reason + name: CandidateJobCreditedToCurrentStageRejectReason + - value: candidate,job,credited_to,reject_reason + name: CandidateJobCreditedToRejectReason + - value: candidate,job,current_stage + name: CandidateJobCurrentStage + - value: candidate,job,current_stage,reject_reason + name: CandidateJobCurrentStageRejectReason + - value: candidate,job,reject_reason + name: CandidateJobRejectReason + - value: candidate,reject_reason + name: CandidateRejectReason + - credited_to + - value: credited_to,current_stage + name: CreditedToCurrentStage + - value: credited_to,current_stage,reject_reason + name: CreditedToCurrentStageRejectReason + - value: credited_to,reject_reason + name: CreditedToRejectReason + - current_stage + - value: current_stage,reject_reason + name: CurrentStageRejectReason + - job + - value: job,credited_to + name: JobCreditedTo + - value: job,credited_to,current_stage + name: JobCreditedToCurrentStage + - value: job,credited_to,current_stage,reject_reason + name: JobCreditedToCurrentStageRejectReason + - value: job,credited_to,reject_reason + name: JobCreditedToRejectReason + - value: job,current_stage + name: JobCurrentStage + - value: job,current_stage,reject_reason + name: JobCurrentStageRejectReason + - value: job,reject_reason + name: JobRejectReason + - offers + - value: offers,candidate + name: OffersCandidate + - value: offers,candidate,credited_to + name: OffersCandidateCreditedTo + - value: offers,candidate,credited_to,current_stage + name: OffersCandidateCreditedToCurrentStage + - value: offers,candidate,credited_to,current_stage,reject_reason + name: OffersCandidateCreditedToCurrentStageRejectReason + - value: offers,candidate,credited_to,reject_reason + name: OffersCandidateCreditedToRejectReason + - value: offers,candidate,current_stage + name: OffersCandidateCurrentStage + - value: offers,candidate,current_stage,reject_reason + name: OffersCandidateCurrentStageRejectReason + - value: offers,candidate,job + name: OffersCandidateJob + - value: offers,candidate,job,credited_to + name: OffersCandidateJobCreditedTo + - value: offers,candidate,job,credited_to,current_stage + name: OffersCandidateJobCreditedToCurrentStage + - value: offers,candidate,job,credited_to,current_stage,reject_reason + name: OffersCandidateJobCreditedToCurrentStageRejectReason + - value: offers,candidate,job,credited_to,reject_reason + name: OffersCandidateJobCreditedToRejectReason + - value: offers,candidate,job,current_stage + name: OffersCandidateJobCurrentStage + - value: offers,candidate,job,current_stage,reject_reason + name: OffersCandidateJobCurrentStageRejectReason + - value: offers,candidate,job,reject_reason + name: OffersCandidateJobRejectReason + - value: offers,candidate,reject_reason + name: OffersCandidateRejectReason + - value: offers,credited_to + name: OffersCreditedTo + - value: offers,credited_to,current_stage + name: OffersCreditedToCurrentStage + - value: offers,credited_to,current_stage,reject_reason + name: OffersCreditedToCurrentStageRejectReason + - value: offers,credited_to,reject_reason + name: OffersCreditedToRejectReason + - value: offers,current_stage + name: OffersCurrentStage + - value: offers,current_stage,reject_reason + name: OffersCurrentStageRejectReason + - value: offers,job + name: OffersJob + - value: offers,job,credited_to + name: OffersJobCreditedTo + - value: offers,job,credited_to,current_stage + name: OffersJobCreditedToCurrentStage + - value: offers,job,credited_to,current_stage,reject_reason + name: OffersJobCreditedToCurrentStageRejectReason + - value: offers,job,credited_to,reject_reason + name: OffersJobCreditedToRejectReason + - value: offers,job,current_stage + name: OffersJobCurrentStage + - value: offers,job,current_stage,reject_reason + name: OffersJobCurrentStageRejectReason + - value: offers,job,reject_reason + name: OffersJobRejectReason + - value: offers,reject_reason + name: OffersRejectReason + - value: offers,screening_question_answers + name: OffersScreeningQuestionAnswers + - value: offers,screening_question_answers,candidate + name: OffersScreeningQuestionAnswersCandidate + - value: offers,screening_question_answers,candidate,credited_to + name: OffersScreeningQuestionAnswersCandidateCreditedTo + - value: offers,screening_question_answers,candidate,credited_to,current_stage + name: OffersScreeningQuestionAnswersCandidateCreditedToCurrentStage + - value: >- + offers,screening_question_answers,candidate,credited_to,current_stage,reject_reason + name: >- + OffersScreeningQuestionAnswersCandidateCreditedToCurrentStageRejectReason + - value: offers,screening_question_answers,candidate,credited_to,reject_reason + name: OffersScreeningQuestionAnswersCandidateCreditedToRejectReason + - value: offers,screening_question_answers,candidate,current_stage + name: OffersScreeningQuestionAnswersCandidateCurrentStage + - value: >- + offers,screening_question_answers,candidate,current_stage,reject_reason + name: OffersScreeningQuestionAnswersCandidateCurrentStageRejectReason + - value: offers,screening_question_answers,candidate,job + name: OffersScreeningQuestionAnswersCandidateJob + - value: offers,screening_question_answers,candidate,job,credited_to + name: OffersScreeningQuestionAnswersCandidateJobCreditedTo + - value: >- + offers,screening_question_answers,candidate,job,credited_to,current_stage + name: OffersScreeningQuestionAnswersCandidateJobCreditedToCurrentStage + - value: >- + offers,screening_question_answers,candidate,job,credited_to,current_stage,reject_reason + name: >- + OffersScreeningQuestionAnswersCandidateJobCreditedToCurrentStageRejectReason + - value: >- + offers,screening_question_answers,candidate,job,credited_to,reject_reason + name: OffersScreeningQuestionAnswersCandidateJobCreditedToRejectReason + - value: offers,screening_question_answers,candidate,job,current_stage + name: OffersScreeningQuestionAnswersCandidateJobCurrentStage + - value: >- + offers,screening_question_answers,candidate,job,current_stage,reject_reason + name: OffersScreeningQuestionAnswersCandidateJobCurrentStageRejectReason + - value: offers,screening_question_answers,candidate,job,reject_reason + name: OffersScreeningQuestionAnswersCandidateJobRejectReason + - value: offers,screening_question_answers,candidate,reject_reason + name: OffersScreeningQuestionAnswersCandidateRejectReason + - value: offers,screening_question_answers,credited_to + name: OffersScreeningQuestionAnswersCreditedTo + - value: offers,screening_question_answers,credited_to,current_stage + name: OffersScreeningQuestionAnswersCreditedToCurrentStage + - value: >- + offers,screening_question_answers,credited_to,current_stage,reject_reason + name: OffersScreeningQuestionAnswersCreditedToCurrentStageRejectReason + - value: offers,screening_question_answers,credited_to,reject_reason + name: OffersScreeningQuestionAnswersCreditedToRejectReason + - value: offers,screening_question_answers,current_stage + name: OffersScreeningQuestionAnswersCurrentStage + - value: offers,screening_question_answers,current_stage,reject_reason + name: OffersScreeningQuestionAnswersCurrentStageRejectReason + - value: offers,screening_question_answers,job + name: OffersScreeningQuestionAnswersJob + - value: offers,screening_question_answers,job,credited_to + name: OffersScreeningQuestionAnswersJobCreditedTo + - value: offers,screening_question_answers,job,credited_to,current_stage + name: OffersScreeningQuestionAnswersJobCreditedToCurrentStage + - value: >- + offers,screening_question_answers,job,credited_to,current_stage,reject_reason + name: OffersScreeningQuestionAnswersJobCreditedToCurrentStageRejectReason + - value: offers,screening_question_answers,job,credited_to,reject_reason + name: OffersScreeningQuestionAnswersJobCreditedToRejectReason + - value: offers,screening_question_answers,job,current_stage + name: OffersScreeningQuestionAnswersJobCurrentStage + - value: offers,screening_question_answers,job,current_stage,reject_reason + name: OffersScreeningQuestionAnswersJobCurrentStageRejectReason + - value: offers,screening_question_answers,job,reject_reason + name: OffersScreeningQuestionAnswersJobRejectReason + - value: offers,screening_question_answers,reject_reason + name: OffersScreeningQuestionAnswersRejectReason + - value: offers,screening_question_answers,screening_question_answers.question + name: OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestion + - value: >- + offers,screening_question_answers,screening_question_answers.question,candidate + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidate + - value: >- + offers,screening_question_answers,screening_question_answers.question,candidate,credited_to + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCreditedTo + - value: >- + offers,screening_question_answers,screening_question_answers.question,candidate,credited_to,current_stage + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCreditedToCurrentStage + - value: >- + offers,screening_question_answers,screening_question_answers.question,candidate,credited_to,current_stage,reject_reason + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCreditedToCurrentStageRejectReason + - value: >- + offers,screening_question_answers,screening_question_answers.question,candidate,credited_to,reject_reason + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCreditedToRejectReason + - value: >- + offers,screening_question_answers,screening_question_answers.question,candidate,current_stage + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCurrentStage + - value: >- + offers,screening_question_answers,screening_question_answers.question,candidate,current_stage,reject_reason + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCurrentStageRejectReason + - value: >- + offers,screening_question_answers,screening_question_answers.question,candidate,job + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJob + - value: >- + offers,screening_question_answers,screening_question_answers.question,candidate,job,credited_to + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCreditedTo + - value: >- + offers,screening_question_answers,screening_question_answers.question,candidate,job,credited_to,current_stage + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCreditedToCurrentStage + - value: >- + offers,screening_question_answers,screening_question_answers.question,candidate,job,credited_to,current_stage,reject_reason + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCreditedToCurrentStageRejectReason + - value: >- + offers,screening_question_answers,screening_question_answers.question,candidate,job,credited_to,reject_reason + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCreditedToRejectReason + - value: >- + offers,screening_question_answers,screening_question_answers.question,candidate,job,current_stage + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCurrentStage + - value: >- + offers,screening_question_answers,screening_question_answers.question,candidate,job,current_stage,reject_reason + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCurrentStageRejectReason + - value: >- + offers,screening_question_answers,screening_question_answers.question,candidate,job,reject_reason + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobRejectReason + - value: >- + offers,screening_question_answers,screening_question_answers.question,candidate,reject_reason + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateRejectReason + - value: >- + offers,screening_question_answers,screening_question_answers.question,credited_to + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCreditedTo + - value: >- + offers,screening_question_answers,screening_question_answers.question,credited_to,current_stage + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCreditedToCurrentStage + - value: >- + offers,screening_question_answers,screening_question_answers.question,credited_to,current_stage,reject_reason + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCreditedToCurrentStageRejectReason + - value: >- + offers,screening_question_answers,screening_question_answers.question,credited_to,reject_reason + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCreditedToRejectReason + - value: >- + offers,screening_question_answers,screening_question_answers.question,current_stage + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCurrentStage + - value: >- + offers,screening_question_answers,screening_question_answers.question,current_stage,reject_reason + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCurrentStageRejectReason + - value: >- + offers,screening_question_answers,screening_question_answers.question,job + name: OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionJob + - value: >- + offers,screening_question_answers,screening_question_answers.question,job,credited_to + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCreditedTo + - value: >- + offers,screening_question_answers,screening_question_answers.question,job,credited_to,current_stage + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCreditedToCurrentStage + - value: >- + offers,screening_question_answers,screening_question_answers.question,job,credited_to,current_stage,reject_reason + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCreditedToCurrentStageRejectReason + - value: >- + offers,screening_question_answers,screening_question_answers.question,job,credited_to,reject_reason + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCreditedToRejectReason + - value: >- + offers,screening_question_answers,screening_question_answers.question,job,current_stage + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCurrentStage + - value: >- + offers,screening_question_answers,screening_question_answers.question,job,current_stage,reject_reason + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCurrentStageRejectReason + - value: >- + offers,screening_question_answers,screening_question_answers.question,job,reject_reason + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobRejectReason + - value: >- + offers,screening_question_answers,screening_question_answers.question,reject_reason + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionRejectReason + - value: offers,screening_question_answers.question + name: OffersScreeningQuestionAnswersQuestion + - value: offers,screening_question_answers.question,candidate + name: OffersScreeningQuestionAnswersQuestionCandidate + - value: offers,screening_question_answers.question,candidate,credited_to + name: OffersScreeningQuestionAnswersQuestionCandidateCreditedTo + - value: >- + offers,screening_question_answers.question,candidate,credited_to,current_stage + name: OffersScreeningQuestionAnswersQuestionCandidateCreditedToCurrentStage + - value: >- + offers,screening_question_answers.question,candidate,credited_to,current_stage,reject_reason + name: >- + OffersScreeningQuestionAnswersQuestionCandidateCreditedToCurrentStageRejectReason + - value: >- + offers,screening_question_answers.question,candidate,credited_to,reject_reason + name: OffersScreeningQuestionAnswersQuestionCandidateCreditedToRejectReason + - value: offers,screening_question_answers.question,candidate,current_stage + name: OffersScreeningQuestionAnswersQuestionCandidateCurrentStage + - value: >- + offers,screening_question_answers.question,candidate,current_stage,reject_reason + name: >- + OffersScreeningQuestionAnswersQuestionCandidateCurrentStageRejectReason + - value: offers,screening_question_answers.question,candidate,job + name: OffersScreeningQuestionAnswersQuestionCandidateJob + - value: offers,screening_question_answers.question,candidate,job,credited_to + name: OffersScreeningQuestionAnswersQuestionCandidateJobCreditedTo + - value: >- + offers,screening_question_answers.question,candidate,job,credited_to,current_stage + name: >- + OffersScreeningQuestionAnswersQuestionCandidateJobCreditedToCurrentStage + - value: >- + offers,screening_question_answers.question,candidate,job,credited_to,current_stage,reject_reason + name: >- + OffersScreeningQuestionAnswersQuestionCandidateJobCreditedToCurrentStageRejectReason + - value: >- + offers,screening_question_answers.question,candidate,job,credited_to,reject_reason + name: >- + OffersScreeningQuestionAnswersQuestionCandidateJobCreditedToRejectReason + - value: offers,screening_question_answers.question,candidate,job,current_stage + name: OffersScreeningQuestionAnswersQuestionCandidateJobCurrentStage + - value: >- + offers,screening_question_answers.question,candidate,job,current_stage,reject_reason + name: >- + OffersScreeningQuestionAnswersQuestionCandidateJobCurrentStageRejectReason + - value: offers,screening_question_answers.question,candidate,job,reject_reason + name: OffersScreeningQuestionAnswersQuestionCandidateJobRejectReason + - value: offers,screening_question_answers.question,candidate,reject_reason + name: OffersScreeningQuestionAnswersQuestionCandidateRejectReason + - value: offers,screening_question_answers.question,credited_to + name: OffersScreeningQuestionAnswersQuestionCreditedTo + - value: offers,screening_question_answers.question,credited_to,current_stage + name: OffersScreeningQuestionAnswersQuestionCreditedToCurrentStage + - value: >- + offers,screening_question_answers.question,credited_to,current_stage,reject_reason + name: >- + OffersScreeningQuestionAnswersQuestionCreditedToCurrentStageRejectReason + - value: offers,screening_question_answers.question,credited_to,reject_reason + name: OffersScreeningQuestionAnswersQuestionCreditedToRejectReason + - value: offers,screening_question_answers.question,current_stage + name: OffersScreeningQuestionAnswersQuestionCurrentStage + - value: offers,screening_question_answers.question,current_stage,reject_reason + name: OffersScreeningQuestionAnswersQuestionCurrentStageRejectReason + - value: offers,screening_question_answers.question,job + name: OffersScreeningQuestionAnswersQuestionJob + - value: offers,screening_question_answers.question,job,credited_to + name: OffersScreeningQuestionAnswersQuestionJobCreditedTo + - value: >- + offers,screening_question_answers.question,job,credited_to,current_stage + name: OffersScreeningQuestionAnswersQuestionJobCreditedToCurrentStage + - value: >- + offers,screening_question_answers.question,job,credited_to,current_stage,reject_reason + name: >- + OffersScreeningQuestionAnswersQuestionJobCreditedToCurrentStageRejectReason + - value: >- + offers,screening_question_answers.question,job,credited_to,reject_reason + name: OffersScreeningQuestionAnswersQuestionJobCreditedToRejectReason + - value: offers,screening_question_answers.question,job,current_stage + name: OffersScreeningQuestionAnswersQuestionJobCurrentStage + - value: >- + offers,screening_question_answers.question,job,current_stage,reject_reason + name: OffersScreeningQuestionAnswersQuestionJobCurrentStageRejectReason + - value: offers,screening_question_answers.question,job,reject_reason + name: OffersScreeningQuestionAnswersQuestionJobRejectReason + - value: offers,screening_question_answers.question,reject_reason + name: OffersScreeningQuestionAnswersQuestionRejectReason + - reject_reason + - screening_question_answers + - value: screening_question_answers,candidate + name: ScreeningQuestionAnswersCandidate + - value: screening_question_answers,candidate,credited_to + name: ScreeningQuestionAnswersCandidateCreditedTo + - value: screening_question_answers,candidate,credited_to,current_stage + name: ScreeningQuestionAnswersCandidateCreditedToCurrentStage + - value: >- + screening_question_answers,candidate,credited_to,current_stage,reject_reason + name: ScreeningQuestionAnswersCandidateCreditedToCurrentStageRejectReason + - value: screening_question_answers,candidate,credited_to,reject_reason + name: ScreeningQuestionAnswersCandidateCreditedToRejectReason + - value: screening_question_answers,candidate,current_stage + name: ScreeningQuestionAnswersCandidateCurrentStage + - value: screening_question_answers,candidate,current_stage,reject_reason + name: ScreeningQuestionAnswersCandidateCurrentStageRejectReason + - value: screening_question_answers,candidate,job + name: ScreeningQuestionAnswersCandidateJob + - value: screening_question_answers,candidate,job,credited_to + name: ScreeningQuestionAnswersCandidateJobCreditedTo + - value: screening_question_answers,candidate,job,credited_to,current_stage + name: ScreeningQuestionAnswersCandidateJobCreditedToCurrentStage + - value: >- + screening_question_answers,candidate,job,credited_to,current_stage,reject_reason + name: ScreeningQuestionAnswersCandidateJobCreditedToCurrentStageRejectReason + - value: screening_question_answers,candidate,job,credited_to,reject_reason + name: ScreeningQuestionAnswersCandidateJobCreditedToRejectReason + - value: screening_question_answers,candidate,job,current_stage + name: ScreeningQuestionAnswersCandidateJobCurrentStage + - value: screening_question_answers,candidate,job,current_stage,reject_reason + name: ScreeningQuestionAnswersCandidateJobCurrentStageRejectReason + - value: screening_question_answers,candidate,job,reject_reason + name: ScreeningQuestionAnswersCandidateJobRejectReason + - value: screening_question_answers,candidate,reject_reason + name: ScreeningQuestionAnswersCandidateRejectReason + - value: screening_question_answers,credited_to + name: ScreeningQuestionAnswersCreditedTo + - value: screening_question_answers,credited_to,current_stage + name: ScreeningQuestionAnswersCreditedToCurrentStage + - value: screening_question_answers,credited_to,current_stage,reject_reason + name: ScreeningQuestionAnswersCreditedToCurrentStageRejectReason + - value: screening_question_answers,credited_to,reject_reason + name: ScreeningQuestionAnswersCreditedToRejectReason + - value: screening_question_answers,current_stage + name: ScreeningQuestionAnswersCurrentStage + - value: screening_question_answers,current_stage,reject_reason + name: ScreeningQuestionAnswersCurrentStageRejectReason + - value: screening_question_answers,job + name: ScreeningQuestionAnswersJob + - value: screening_question_answers,job,credited_to + name: ScreeningQuestionAnswersJobCreditedTo + - value: screening_question_answers,job,credited_to,current_stage + name: ScreeningQuestionAnswersJobCreditedToCurrentStage + - value: screening_question_answers,job,credited_to,current_stage,reject_reason + name: ScreeningQuestionAnswersJobCreditedToCurrentStageRejectReason + - value: screening_question_answers,job,credited_to,reject_reason + name: ScreeningQuestionAnswersJobCreditedToRejectReason + - value: screening_question_answers,job,current_stage + name: ScreeningQuestionAnswersJobCurrentStage + - value: screening_question_answers,job,current_stage,reject_reason + name: ScreeningQuestionAnswersJobCurrentStageRejectReason + - value: screening_question_answers,job,reject_reason + name: ScreeningQuestionAnswersJobRejectReason + - value: screening_question_answers,reject_reason + name: ScreeningQuestionAnswersRejectReason + - value: screening_question_answers,screening_question_answers.question + name: ScreeningQuestionAnswersScreeningQuestionAnswersQuestion + - value: >- + screening_question_answers,screening_question_answers.question,candidate + name: ScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidate + - value: >- + screening_question_answers,screening_question_answers.question,candidate,credited_to + name: >- + ScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCreditedTo + - value: >- + screening_question_answers,screening_question_answers.question,candidate,credited_to,current_stage + name: >- + ScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCreditedToCurrentStage + - value: >- + screening_question_answers,screening_question_answers.question,candidate,credited_to,current_stage,reject_reason + name: >- + ScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCreditedToCurrentStageRejectReason + - value: >- + screening_question_answers,screening_question_answers.question,candidate,credited_to,reject_reason + name: >- + ScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCreditedToRejectReason + - value: >- + screening_question_answers,screening_question_answers.question,candidate,current_stage + name: >- + ScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCurrentStage + - value: >- + screening_question_answers,screening_question_answers.question,candidate,current_stage,reject_reason + name: >- + ScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCurrentStageRejectReason + - value: >- + screening_question_answers,screening_question_answers.question,candidate,job + name: ScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJob + - value: >- + screening_question_answers,screening_question_answers.question,candidate,job,credited_to + name: >- + ScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCreditedTo + - value: >- + screening_question_answers,screening_question_answers.question,candidate,job,credited_to,current_stage + name: >- + ScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCreditedToCurrentStage + - value: >- + screening_question_answers,screening_question_answers.question,candidate,job,credited_to,current_stage,reject_reason + name: >- + ScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCreditedToCurrentStageRejectReason + - value: >- + screening_question_answers,screening_question_answers.question,candidate,job,credited_to,reject_reason + name: >- + ScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCreditedToRejectReason + - value: >- + screening_question_answers,screening_question_answers.question,candidate,job,current_stage + name: >- + ScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCurrentStage + - value: >- + screening_question_answers,screening_question_answers.question,candidate,job,current_stage,reject_reason + name: >- + ScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCurrentStageRejectReason + - value: >- + screening_question_answers,screening_question_answers.question,candidate,job,reject_reason + name: >- + ScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobRejectReason + - value: >- + screening_question_answers,screening_question_answers.question,candidate,reject_reason + name: >- + ScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateRejectReason + - value: >- + screening_question_answers,screening_question_answers.question,credited_to + name: ScreeningQuestionAnswersScreeningQuestionAnswersQuestionCreditedTo + - value: >- + screening_question_answers,screening_question_answers.question,credited_to,current_stage + name: >- + ScreeningQuestionAnswersScreeningQuestionAnswersQuestionCreditedToCurrentStage + - value: >- + screening_question_answers,screening_question_answers.question,credited_to,current_stage,reject_reason + name: >- + ScreeningQuestionAnswersScreeningQuestionAnswersQuestionCreditedToCurrentStageRejectReason + - value: >- + screening_question_answers,screening_question_answers.question,credited_to,reject_reason + name: >- + ScreeningQuestionAnswersScreeningQuestionAnswersQuestionCreditedToRejectReason + - value: >- + screening_question_answers,screening_question_answers.question,current_stage + name: ScreeningQuestionAnswersScreeningQuestionAnswersQuestionCurrentStage + - value: >- + screening_question_answers,screening_question_answers.question,current_stage,reject_reason + name: >- + ScreeningQuestionAnswersScreeningQuestionAnswersQuestionCurrentStageRejectReason + - value: screening_question_answers,screening_question_answers.question,job + name: ScreeningQuestionAnswersScreeningQuestionAnswersQuestionJob + - value: >- + screening_question_answers,screening_question_answers.question,job,credited_to + name: ScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCreditedTo + - value: >- + screening_question_answers,screening_question_answers.question,job,credited_to,current_stage + name: >- + ScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCreditedToCurrentStage + - value: >- + screening_question_answers,screening_question_answers.question,job,credited_to,current_stage,reject_reason + name: >- + ScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCreditedToCurrentStageRejectReason + - value: >- + screening_question_answers,screening_question_answers.question,job,credited_to,reject_reason + name: >- + ScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCreditedToRejectReason + - value: >- + screening_question_answers,screening_question_answers.question,job,current_stage + name: >- + ScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCurrentStage + - value: >- + screening_question_answers,screening_question_answers.question,job,current_stage,reject_reason + name: >- + ScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCurrentStageRejectReason + - value: >- + screening_question_answers,screening_question_answers.question,job,reject_reason + name: >- + ScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobRejectReason + - value: >- + screening_question_answers,screening_question_answers.question,reject_reason + name: ScreeningQuestionAnswersScreeningQuestionAnswersQuestionRejectReason + - value: screening_question_answers.question + name: ScreeningQuestionAnswersQuestion + - value: screening_question_answers.question,candidate + name: ScreeningQuestionAnswersQuestionCandidate + - value: screening_question_answers.question,candidate,credited_to + name: ScreeningQuestionAnswersQuestionCandidateCreditedTo + - value: >- + screening_question_answers.question,candidate,credited_to,current_stage + name: ScreeningQuestionAnswersQuestionCandidateCreditedToCurrentStage + - value: >- + screening_question_answers.question,candidate,credited_to,current_stage,reject_reason + name: >- + ScreeningQuestionAnswersQuestionCandidateCreditedToCurrentStageRejectReason + - value: >- + screening_question_answers.question,candidate,credited_to,reject_reason + name: ScreeningQuestionAnswersQuestionCandidateCreditedToRejectReason + - value: screening_question_answers.question,candidate,current_stage + name: ScreeningQuestionAnswersQuestionCandidateCurrentStage + - value: >- + screening_question_answers.question,candidate,current_stage,reject_reason + name: ScreeningQuestionAnswersQuestionCandidateCurrentStageRejectReason + - value: screening_question_answers.question,candidate,job + name: ScreeningQuestionAnswersQuestionCandidateJob + - value: screening_question_answers.question,candidate,job,credited_to + name: ScreeningQuestionAnswersQuestionCandidateJobCreditedTo + - value: >- + screening_question_answers.question,candidate,job,credited_to,current_stage + name: ScreeningQuestionAnswersQuestionCandidateJobCreditedToCurrentStage + - value: >- + screening_question_answers.question,candidate,job,credited_to,current_stage,reject_reason + name: >- + ScreeningQuestionAnswersQuestionCandidateJobCreditedToCurrentStageRejectReason + - value: >- + screening_question_answers.question,candidate,job,credited_to,reject_reason + name: ScreeningQuestionAnswersQuestionCandidateJobCreditedToRejectReason + - value: screening_question_answers.question,candidate,job,current_stage + name: ScreeningQuestionAnswersQuestionCandidateJobCurrentStage + - value: >- + screening_question_answers.question,candidate,job,current_stage,reject_reason + name: ScreeningQuestionAnswersQuestionCandidateJobCurrentStageRejectReason + - value: screening_question_answers.question,candidate,job,reject_reason + name: ScreeningQuestionAnswersQuestionCandidateJobRejectReason + - value: screening_question_answers.question,candidate,reject_reason + name: ScreeningQuestionAnswersQuestionCandidateRejectReason + - value: screening_question_answers.question,credited_to + name: ScreeningQuestionAnswersQuestionCreditedTo + - value: screening_question_answers.question,credited_to,current_stage + name: ScreeningQuestionAnswersQuestionCreditedToCurrentStage + - value: >- + screening_question_answers.question,credited_to,current_stage,reject_reason + name: ScreeningQuestionAnswersQuestionCreditedToCurrentStageRejectReason + - value: screening_question_answers.question,credited_to,reject_reason + name: ScreeningQuestionAnswersQuestionCreditedToRejectReason + - value: screening_question_answers.question,current_stage + name: ScreeningQuestionAnswersQuestionCurrentStage + - value: screening_question_answers.question,current_stage,reject_reason + name: ScreeningQuestionAnswersQuestionCurrentStageRejectReason + - value: screening_question_answers.question,job + name: ScreeningQuestionAnswersQuestionJob + - value: screening_question_answers.question,job,credited_to + name: ScreeningQuestionAnswersQuestionJobCreditedTo + - value: screening_question_answers.question,job,credited_to,current_stage + name: ScreeningQuestionAnswersQuestionJobCreditedToCurrentStage + - value: >- + screening_question_answers.question,job,credited_to,current_stage,reject_reason + name: ScreeningQuestionAnswersQuestionJobCreditedToCurrentStageRejectReason + - value: screening_question_answers.question,job,credited_to,reject_reason + name: ScreeningQuestionAnswersQuestionJobCreditedToRejectReason + - value: screening_question_answers.question,job,current_stage + name: ScreeningQuestionAnswersQuestionJobCurrentStage + - value: screening_question_answers.question,job,current_stage,reject_reason + name: ScreeningQuestionAnswersQuestionJobCurrentStageRejectReason + - value: screening_question_answers.question,job,reject_reason + name: ScreeningQuestionAnswersQuestionJobRejectReason + - value: screening_question_answers.question,reject_reason + name: ScreeningQuestionAnswersQuestionRejectReason + source: + openapi: openapi/openapi.yml + ApplicationsRetrieveRequestExpand: + enum: + - candidate + - value: candidate,credited_to + name: CandidateCreditedTo + - value: candidate,credited_to,current_stage + name: CandidateCreditedToCurrentStage + - value: candidate,credited_to,current_stage,reject_reason + name: CandidateCreditedToCurrentStageRejectReason + - value: candidate,credited_to,reject_reason + name: CandidateCreditedToRejectReason + - value: candidate,current_stage + name: CandidateCurrentStage + - value: candidate,current_stage,reject_reason + name: CandidateCurrentStageRejectReason + - value: candidate,job + name: CandidateJob + - value: candidate,job,credited_to + name: CandidateJobCreditedTo + - value: candidate,job,credited_to,current_stage + name: CandidateJobCreditedToCurrentStage + - value: candidate,job,credited_to,current_stage,reject_reason + name: CandidateJobCreditedToCurrentStageRejectReason + - value: candidate,job,credited_to,reject_reason + name: CandidateJobCreditedToRejectReason + - value: candidate,job,current_stage + name: CandidateJobCurrentStage + - value: candidate,job,current_stage,reject_reason + name: CandidateJobCurrentStageRejectReason + - value: candidate,job,reject_reason + name: CandidateJobRejectReason + - value: candidate,reject_reason + name: CandidateRejectReason + - credited_to + - value: credited_to,current_stage + name: CreditedToCurrentStage + - value: credited_to,current_stage,reject_reason + name: CreditedToCurrentStageRejectReason + - value: credited_to,reject_reason + name: CreditedToRejectReason + - current_stage + - value: current_stage,reject_reason + name: CurrentStageRejectReason + - job + - value: job,credited_to + name: JobCreditedTo + - value: job,credited_to,current_stage + name: JobCreditedToCurrentStage + - value: job,credited_to,current_stage,reject_reason + name: JobCreditedToCurrentStageRejectReason + - value: job,credited_to,reject_reason + name: JobCreditedToRejectReason + - value: job,current_stage + name: JobCurrentStage + - value: job,current_stage,reject_reason + name: JobCurrentStageRejectReason + - value: job,reject_reason + name: JobRejectReason + - offers + - value: offers,candidate + name: OffersCandidate + - value: offers,candidate,credited_to + name: OffersCandidateCreditedTo + - value: offers,candidate,credited_to,current_stage + name: OffersCandidateCreditedToCurrentStage + - value: offers,candidate,credited_to,current_stage,reject_reason + name: OffersCandidateCreditedToCurrentStageRejectReason + - value: offers,candidate,credited_to,reject_reason + name: OffersCandidateCreditedToRejectReason + - value: offers,candidate,current_stage + name: OffersCandidateCurrentStage + - value: offers,candidate,current_stage,reject_reason + name: OffersCandidateCurrentStageRejectReason + - value: offers,candidate,job + name: OffersCandidateJob + - value: offers,candidate,job,credited_to + name: OffersCandidateJobCreditedTo + - value: offers,candidate,job,credited_to,current_stage + name: OffersCandidateJobCreditedToCurrentStage + - value: offers,candidate,job,credited_to,current_stage,reject_reason + name: OffersCandidateJobCreditedToCurrentStageRejectReason + - value: offers,candidate,job,credited_to,reject_reason + name: OffersCandidateJobCreditedToRejectReason + - value: offers,candidate,job,current_stage + name: OffersCandidateJobCurrentStage + - value: offers,candidate,job,current_stage,reject_reason + name: OffersCandidateJobCurrentStageRejectReason + - value: offers,candidate,job,reject_reason + name: OffersCandidateJobRejectReason + - value: offers,candidate,reject_reason + name: OffersCandidateRejectReason + - value: offers,credited_to + name: OffersCreditedTo + - value: offers,credited_to,current_stage + name: OffersCreditedToCurrentStage + - value: offers,credited_to,current_stage,reject_reason + name: OffersCreditedToCurrentStageRejectReason + - value: offers,credited_to,reject_reason + name: OffersCreditedToRejectReason + - value: offers,current_stage + name: OffersCurrentStage + - value: offers,current_stage,reject_reason + name: OffersCurrentStageRejectReason + - value: offers,job + name: OffersJob + - value: offers,job,credited_to + name: OffersJobCreditedTo + - value: offers,job,credited_to,current_stage + name: OffersJobCreditedToCurrentStage + - value: offers,job,credited_to,current_stage,reject_reason + name: OffersJobCreditedToCurrentStageRejectReason + - value: offers,job,credited_to,reject_reason + name: OffersJobCreditedToRejectReason + - value: offers,job,current_stage + name: OffersJobCurrentStage + - value: offers,job,current_stage,reject_reason + name: OffersJobCurrentStageRejectReason + - value: offers,job,reject_reason + name: OffersJobRejectReason + - value: offers,reject_reason + name: OffersRejectReason + - value: offers,screening_question_answers + name: OffersScreeningQuestionAnswers + - value: offers,screening_question_answers,candidate + name: OffersScreeningQuestionAnswersCandidate + - value: offers,screening_question_answers,candidate,credited_to + name: OffersScreeningQuestionAnswersCandidateCreditedTo + - value: offers,screening_question_answers,candidate,credited_to,current_stage + name: OffersScreeningQuestionAnswersCandidateCreditedToCurrentStage + - value: >- + offers,screening_question_answers,candidate,credited_to,current_stage,reject_reason + name: >- + OffersScreeningQuestionAnswersCandidateCreditedToCurrentStageRejectReason + - value: offers,screening_question_answers,candidate,credited_to,reject_reason + name: OffersScreeningQuestionAnswersCandidateCreditedToRejectReason + - value: offers,screening_question_answers,candidate,current_stage + name: OffersScreeningQuestionAnswersCandidateCurrentStage + - value: >- + offers,screening_question_answers,candidate,current_stage,reject_reason + name: OffersScreeningQuestionAnswersCandidateCurrentStageRejectReason + - value: offers,screening_question_answers,candidate,job + name: OffersScreeningQuestionAnswersCandidateJob + - value: offers,screening_question_answers,candidate,job,credited_to + name: OffersScreeningQuestionAnswersCandidateJobCreditedTo + - value: >- + offers,screening_question_answers,candidate,job,credited_to,current_stage + name: OffersScreeningQuestionAnswersCandidateJobCreditedToCurrentStage + - value: >- + offers,screening_question_answers,candidate,job,credited_to,current_stage,reject_reason + name: >- + OffersScreeningQuestionAnswersCandidateJobCreditedToCurrentStageRejectReason + - value: >- + offers,screening_question_answers,candidate,job,credited_to,reject_reason + name: OffersScreeningQuestionAnswersCandidateJobCreditedToRejectReason + - value: offers,screening_question_answers,candidate,job,current_stage + name: OffersScreeningQuestionAnswersCandidateJobCurrentStage + - value: >- + offers,screening_question_answers,candidate,job,current_stage,reject_reason + name: OffersScreeningQuestionAnswersCandidateJobCurrentStageRejectReason + - value: offers,screening_question_answers,candidate,job,reject_reason + name: OffersScreeningQuestionAnswersCandidateJobRejectReason + - value: offers,screening_question_answers,candidate,reject_reason + name: OffersScreeningQuestionAnswersCandidateRejectReason + - value: offers,screening_question_answers,credited_to + name: OffersScreeningQuestionAnswersCreditedTo + - value: offers,screening_question_answers,credited_to,current_stage + name: OffersScreeningQuestionAnswersCreditedToCurrentStage + - value: >- + offers,screening_question_answers,credited_to,current_stage,reject_reason + name: OffersScreeningQuestionAnswersCreditedToCurrentStageRejectReason + - value: offers,screening_question_answers,credited_to,reject_reason + name: OffersScreeningQuestionAnswersCreditedToRejectReason + - value: offers,screening_question_answers,current_stage + name: OffersScreeningQuestionAnswersCurrentStage + - value: offers,screening_question_answers,current_stage,reject_reason + name: OffersScreeningQuestionAnswersCurrentStageRejectReason + - value: offers,screening_question_answers,job + name: OffersScreeningQuestionAnswersJob + - value: offers,screening_question_answers,job,credited_to + name: OffersScreeningQuestionAnswersJobCreditedTo + - value: offers,screening_question_answers,job,credited_to,current_stage + name: OffersScreeningQuestionAnswersJobCreditedToCurrentStage + - value: >- + offers,screening_question_answers,job,credited_to,current_stage,reject_reason + name: OffersScreeningQuestionAnswersJobCreditedToCurrentStageRejectReason + - value: offers,screening_question_answers,job,credited_to,reject_reason + name: OffersScreeningQuestionAnswersJobCreditedToRejectReason + - value: offers,screening_question_answers,job,current_stage + name: OffersScreeningQuestionAnswersJobCurrentStage + - value: offers,screening_question_answers,job,current_stage,reject_reason + name: OffersScreeningQuestionAnswersJobCurrentStageRejectReason + - value: offers,screening_question_answers,job,reject_reason + name: OffersScreeningQuestionAnswersJobRejectReason + - value: offers,screening_question_answers,reject_reason + name: OffersScreeningQuestionAnswersRejectReason + - value: offers,screening_question_answers,screening_question_answers.question + name: OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestion + - value: >- + offers,screening_question_answers,screening_question_answers.question,candidate + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidate + - value: >- + offers,screening_question_answers,screening_question_answers.question,candidate,credited_to + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCreditedTo + - value: >- + offers,screening_question_answers,screening_question_answers.question,candidate,credited_to,current_stage + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCreditedToCurrentStage + - value: >- + offers,screening_question_answers,screening_question_answers.question,candidate,credited_to,current_stage,reject_reason + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCreditedToCurrentStageRejectReason + - value: >- + offers,screening_question_answers,screening_question_answers.question,candidate,credited_to,reject_reason + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCreditedToRejectReason + - value: >- + offers,screening_question_answers,screening_question_answers.question,candidate,current_stage + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCurrentStage + - value: >- + offers,screening_question_answers,screening_question_answers.question,candidate,current_stage,reject_reason + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCurrentStageRejectReason + - value: >- + offers,screening_question_answers,screening_question_answers.question,candidate,job + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJob + - value: >- + offers,screening_question_answers,screening_question_answers.question,candidate,job,credited_to + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCreditedTo + - value: >- + offers,screening_question_answers,screening_question_answers.question,candidate,job,credited_to,current_stage + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCreditedToCurrentStage + - value: >- + offers,screening_question_answers,screening_question_answers.question,candidate,job,credited_to,current_stage,reject_reason + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCreditedToCurrentStageRejectReason + - value: >- + offers,screening_question_answers,screening_question_answers.question,candidate,job,credited_to,reject_reason + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCreditedToRejectReason + - value: >- + offers,screening_question_answers,screening_question_answers.question,candidate,job,current_stage + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCurrentStage + - value: >- + offers,screening_question_answers,screening_question_answers.question,candidate,job,current_stage,reject_reason + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCurrentStageRejectReason + - value: >- + offers,screening_question_answers,screening_question_answers.question,candidate,job,reject_reason + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobRejectReason + - value: >- + offers,screening_question_answers,screening_question_answers.question,candidate,reject_reason + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateRejectReason + - value: >- + offers,screening_question_answers,screening_question_answers.question,credited_to + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCreditedTo + - value: >- + offers,screening_question_answers,screening_question_answers.question,credited_to,current_stage + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCreditedToCurrentStage + - value: >- + offers,screening_question_answers,screening_question_answers.question,credited_to,current_stage,reject_reason + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCreditedToCurrentStageRejectReason + - value: >- + offers,screening_question_answers,screening_question_answers.question,credited_to,reject_reason + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCreditedToRejectReason + - value: >- + offers,screening_question_answers,screening_question_answers.question,current_stage + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCurrentStage + - value: >- + offers,screening_question_answers,screening_question_answers.question,current_stage,reject_reason + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCurrentStageRejectReason + - value: >- + offers,screening_question_answers,screening_question_answers.question,job + name: OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionJob + - value: >- + offers,screening_question_answers,screening_question_answers.question,job,credited_to + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCreditedTo + - value: >- + offers,screening_question_answers,screening_question_answers.question,job,credited_to,current_stage + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCreditedToCurrentStage + - value: >- + offers,screening_question_answers,screening_question_answers.question,job,credited_to,current_stage,reject_reason + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCreditedToCurrentStageRejectReason + - value: >- + offers,screening_question_answers,screening_question_answers.question,job,credited_to,reject_reason + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCreditedToRejectReason + - value: >- + offers,screening_question_answers,screening_question_answers.question,job,current_stage + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCurrentStage + - value: >- + offers,screening_question_answers,screening_question_answers.question,job,current_stage,reject_reason + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCurrentStageRejectReason + - value: >- + offers,screening_question_answers,screening_question_answers.question,job,reject_reason + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobRejectReason + - value: >- + offers,screening_question_answers,screening_question_answers.question,reject_reason + name: >- + OffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionRejectReason + - value: offers,screening_question_answers.question + name: OffersScreeningQuestionAnswersQuestion + - value: offers,screening_question_answers.question,candidate + name: OffersScreeningQuestionAnswersQuestionCandidate + - value: offers,screening_question_answers.question,candidate,credited_to + name: OffersScreeningQuestionAnswersQuestionCandidateCreditedTo + - value: >- + offers,screening_question_answers.question,candidate,credited_to,current_stage + name: OffersScreeningQuestionAnswersQuestionCandidateCreditedToCurrentStage + - value: >- + offers,screening_question_answers.question,candidate,credited_to,current_stage,reject_reason + name: >- + OffersScreeningQuestionAnswersQuestionCandidateCreditedToCurrentStageRejectReason + - value: >- + offers,screening_question_answers.question,candidate,credited_to,reject_reason + name: OffersScreeningQuestionAnswersQuestionCandidateCreditedToRejectReason + - value: offers,screening_question_answers.question,candidate,current_stage + name: OffersScreeningQuestionAnswersQuestionCandidateCurrentStage + - value: >- + offers,screening_question_answers.question,candidate,current_stage,reject_reason + name: >- + OffersScreeningQuestionAnswersQuestionCandidateCurrentStageRejectReason + - value: offers,screening_question_answers.question,candidate,job + name: OffersScreeningQuestionAnswersQuestionCandidateJob + - value: offers,screening_question_answers.question,candidate,job,credited_to + name: OffersScreeningQuestionAnswersQuestionCandidateJobCreditedTo + - value: >- + offers,screening_question_answers.question,candidate,job,credited_to,current_stage + name: >- + OffersScreeningQuestionAnswersQuestionCandidateJobCreditedToCurrentStage + - value: >- + offers,screening_question_answers.question,candidate,job,credited_to,current_stage,reject_reason + name: >- + OffersScreeningQuestionAnswersQuestionCandidateJobCreditedToCurrentStageRejectReason + - value: >- + offers,screening_question_answers.question,candidate,job,credited_to,reject_reason + name: >- + OffersScreeningQuestionAnswersQuestionCandidateJobCreditedToRejectReason + - value: offers,screening_question_answers.question,candidate,job,current_stage + name: OffersScreeningQuestionAnswersQuestionCandidateJobCurrentStage + - value: >- + offers,screening_question_answers.question,candidate,job,current_stage,reject_reason + name: >- + OffersScreeningQuestionAnswersQuestionCandidateJobCurrentStageRejectReason + - value: offers,screening_question_answers.question,candidate,job,reject_reason + name: OffersScreeningQuestionAnswersQuestionCandidateJobRejectReason + - value: offers,screening_question_answers.question,candidate,reject_reason + name: OffersScreeningQuestionAnswersQuestionCandidateRejectReason + - value: offers,screening_question_answers.question,credited_to + name: OffersScreeningQuestionAnswersQuestionCreditedTo + - value: offers,screening_question_answers.question,credited_to,current_stage + name: OffersScreeningQuestionAnswersQuestionCreditedToCurrentStage + - value: >- + offers,screening_question_answers.question,credited_to,current_stage,reject_reason + name: >- + OffersScreeningQuestionAnswersQuestionCreditedToCurrentStageRejectReason + - value: offers,screening_question_answers.question,credited_to,reject_reason + name: OffersScreeningQuestionAnswersQuestionCreditedToRejectReason + - value: offers,screening_question_answers.question,current_stage + name: OffersScreeningQuestionAnswersQuestionCurrentStage + - value: offers,screening_question_answers.question,current_stage,reject_reason + name: OffersScreeningQuestionAnswersQuestionCurrentStageRejectReason + - value: offers,screening_question_answers.question,job + name: OffersScreeningQuestionAnswersQuestionJob + - value: offers,screening_question_answers.question,job,credited_to + name: OffersScreeningQuestionAnswersQuestionJobCreditedTo + - value: >- + offers,screening_question_answers.question,job,credited_to,current_stage + name: OffersScreeningQuestionAnswersQuestionJobCreditedToCurrentStage + - value: >- + offers,screening_question_answers.question,job,credited_to,current_stage,reject_reason + name: >- + OffersScreeningQuestionAnswersQuestionJobCreditedToCurrentStageRejectReason + - value: >- + offers,screening_question_answers.question,job,credited_to,reject_reason + name: OffersScreeningQuestionAnswersQuestionJobCreditedToRejectReason + - value: offers,screening_question_answers.question,job,current_stage + name: OffersScreeningQuestionAnswersQuestionJobCurrentStage + - value: >- + offers,screening_question_answers.question,job,current_stage,reject_reason + name: OffersScreeningQuestionAnswersQuestionJobCurrentStageRejectReason + - value: offers,screening_question_answers.question,job,reject_reason + name: OffersScreeningQuestionAnswersQuestionJobRejectReason + - value: offers,screening_question_answers.question,reject_reason + name: OffersScreeningQuestionAnswersQuestionRejectReason + - reject_reason + - screening_question_answers + - value: screening_question_answers,candidate + name: ScreeningQuestionAnswersCandidate + - value: screening_question_answers,candidate,credited_to + name: ScreeningQuestionAnswersCandidateCreditedTo + - value: screening_question_answers,candidate,credited_to,current_stage + name: ScreeningQuestionAnswersCandidateCreditedToCurrentStage + - value: >- + screening_question_answers,candidate,credited_to,current_stage,reject_reason + name: ScreeningQuestionAnswersCandidateCreditedToCurrentStageRejectReason + - value: screening_question_answers,candidate,credited_to,reject_reason + name: ScreeningQuestionAnswersCandidateCreditedToRejectReason + - value: screening_question_answers,candidate,current_stage + name: ScreeningQuestionAnswersCandidateCurrentStage + - value: screening_question_answers,candidate,current_stage,reject_reason + name: ScreeningQuestionAnswersCandidateCurrentStageRejectReason + - value: screening_question_answers,candidate,job + name: ScreeningQuestionAnswersCandidateJob + - value: screening_question_answers,candidate,job,credited_to + name: ScreeningQuestionAnswersCandidateJobCreditedTo + - value: screening_question_answers,candidate,job,credited_to,current_stage + name: ScreeningQuestionAnswersCandidateJobCreditedToCurrentStage + - value: >- + screening_question_answers,candidate,job,credited_to,current_stage,reject_reason + name: ScreeningQuestionAnswersCandidateJobCreditedToCurrentStageRejectReason + - value: screening_question_answers,candidate,job,credited_to,reject_reason + name: ScreeningQuestionAnswersCandidateJobCreditedToRejectReason + - value: screening_question_answers,candidate,job,current_stage + name: ScreeningQuestionAnswersCandidateJobCurrentStage + - value: screening_question_answers,candidate,job,current_stage,reject_reason + name: ScreeningQuestionAnswersCandidateJobCurrentStageRejectReason + - value: screening_question_answers,candidate,job,reject_reason + name: ScreeningQuestionAnswersCandidateJobRejectReason + - value: screening_question_answers,candidate,reject_reason + name: ScreeningQuestionAnswersCandidateRejectReason + - value: screening_question_answers,credited_to + name: ScreeningQuestionAnswersCreditedTo + - value: screening_question_answers,credited_to,current_stage + name: ScreeningQuestionAnswersCreditedToCurrentStage + - value: screening_question_answers,credited_to,current_stage,reject_reason + name: ScreeningQuestionAnswersCreditedToCurrentStageRejectReason + - value: screening_question_answers,credited_to,reject_reason + name: ScreeningQuestionAnswersCreditedToRejectReason + - value: screening_question_answers,current_stage + name: ScreeningQuestionAnswersCurrentStage + - value: screening_question_answers,current_stage,reject_reason + name: ScreeningQuestionAnswersCurrentStageRejectReason + - value: screening_question_answers,job + name: ScreeningQuestionAnswersJob + - value: screening_question_answers,job,credited_to + name: ScreeningQuestionAnswersJobCreditedTo + - value: screening_question_answers,job,credited_to,current_stage + name: ScreeningQuestionAnswersJobCreditedToCurrentStage + - value: screening_question_answers,job,credited_to,current_stage,reject_reason + name: ScreeningQuestionAnswersJobCreditedToCurrentStageRejectReason + - value: screening_question_answers,job,credited_to,reject_reason + name: ScreeningQuestionAnswersJobCreditedToRejectReason + - value: screening_question_answers,job,current_stage + name: ScreeningQuestionAnswersJobCurrentStage + - value: screening_question_answers,job,current_stage,reject_reason + name: ScreeningQuestionAnswersJobCurrentStageRejectReason + - value: screening_question_answers,job,reject_reason + name: ScreeningQuestionAnswersJobRejectReason + - value: screening_question_answers,reject_reason + name: ScreeningQuestionAnswersRejectReason + - value: screening_question_answers,screening_question_answers.question + name: ScreeningQuestionAnswersScreeningQuestionAnswersQuestion + - value: >- + screening_question_answers,screening_question_answers.question,candidate + name: ScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidate + - value: >- + screening_question_answers,screening_question_answers.question,candidate,credited_to + name: >- + ScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCreditedTo + - value: >- + screening_question_answers,screening_question_answers.question,candidate,credited_to,current_stage + name: >- + ScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCreditedToCurrentStage + - value: >- + screening_question_answers,screening_question_answers.question,candidate,credited_to,current_stage,reject_reason + name: >- + ScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCreditedToCurrentStageRejectReason + - value: >- + screening_question_answers,screening_question_answers.question,candidate,credited_to,reject_reason + name: >- + ScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCreditedToRejectReason + - value: >- + screening_question_answers,screening_question_answers.question,candidate,current_stage + name: >- + ScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCurrentStage + - value: >- + screening_question_answers,screening_question_answers.question,candidate,current_stage,reject_reason + name: >- + ScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCurrentStageRejectReason + - value: >- + screening_question_answers,screening_question_answers.question,candidate,job + name: ScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJob + - value: >- + screening_question_answers,screening_question_answers.question,candidate,job,credited_to + name: >- + ScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCreditedTo + - value: >- + screening_question_answers,screening_question_answers.question,candidate,job,credited_to,current_stage + name: >- + ScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCreditedToCurrentStage + - value: >- + screening_question_answers,screening_question_answers.question,candidate,job,credited_to,current_stage,reject_reason + name: >- + ScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCreditedToCurrentStageRejectReason + - value: >- + screening_question_answers,screening_question_answers.question,candidate,job,credited_to,reject_reason + name: >- + ScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCreditedToRejectReason + - value: >- + screening_question_answers,screening_question_answers.question,candidate,job,current_stage + name: >- + ScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCurrentStage + - value: >- + screening_question_answers,screening_question_answers.question,candidate,job,current_stage,reject_reason + name: >- + ScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCurrentStageRejectReason + - value: >- + screening_question_answers,screening_question_answers.question,candidate,job,reject_reason + name: >- + ScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobRejectReason + - value: >- + screening_question_answers,screening_question_answers.question,candidate,reject_reason + name: >- + ScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateRejectReason + - value: >- + screening_question_answers,screening_question_answers.question,credited_to + name: ScreeningQuestionAnswersScreeningQuestionAnswersQuestionCreditedTo + - value: >- + screening_question_answers,screening_question_answers.question,credited_to,current_stage + name: >- + ScreeningQuestionAnswersScreeningQuestionAnswersQuestionCreditedToCurrentStage + - value: >- + screening_question_answers,screening_question_answers.question,credited_to,current_stage,reject_reason + name: >- + ScreeningQuestionAnswersScreeningQuestionAnswersQuestionCreditedToCurrentStageRejectReason + - value: >- + screening_question_answers,screening_question_answers.question,credited_to,reject_reason + name: >- + ScreeningQuestionAnswersScreeningQuestionAnswersQuestionCreditedToRejectReason + - value: >- + screening_question_answers,screening_question_answers.question,current_stage + name: ScreeningQuestionAnswersScreeningQuestionAnswersQuestionCurrentStage + - value: >- + screening_question_answers,screening_question_answers.question,current_stage,reject_reason + name: >- + ScreeningQuestionAnswersScreeningQuestionAnswersQuestionCurrentStageRejectReason + - value: screening_question_answers,screening_question_answers.question,job + name: ScreeningQuestionAnswersScreeningQuestionAnswersQuestionJob + - value: >- + screening_question_answers,screening_question_answers.question,job,credited_to + name: ScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCreditedTo + - value: >- + screening_question_answers,screening_question_answers.question,job,credited_to,current_stage + name: >- + ScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCreditedToCurrentStage + - value: >- + screening_question_answers,screening_question_answers.question,job,credited_to,current_stage,reject_reason + name: >- + ScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCreditedToCurrentStageRejectReason + - value: >- + screening_question_answers,screening_question_answers.question,job,credited_to,reject_reason + name: >- + ScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCreditedToRejectReason + - value: >- + screening_question_answers,screening_question_answers.question,job,current_stage + name: >- + ScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCurrentStage + - value: >- + screening_question_answers,screening_question_answers.question,job,current_stage,reject_reason + name: >- + ScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCurrentStageRejectReason + - value: >- + screening_question_answers,screening_question_answers.question,job,reject_reason + name: >- + ScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobRejectReason + - value: >- + screening_question_answers,screening_question_answers.question,reject_reason + name: ScreeningQuestionAnswersScreeningQuestionAnswersQuestionRejectReason + - value: screening_question_answers.question + name: ScreeningQuestionAnswersQuestion + - value: screening_question_answers.question,candidate + name: ScreeningQuestionAnswersQuestionCandidate + - value: screening_question_answers.question,candidate,credited_to + name: ScreeningQuestionAnswersQuestionCandidateCreditedTo + - value: >- + screening_question_answers.question,candidate,credited_to,current_stage + name: ScreeningQuestionAnswersQuestionCandidateCreditedToCurrentStage + - value: >- + screening_question_answers.question,candidate,credited_to,current_stage,reject_reason + name: >- + ScreeningQuestionAnswersQuestionCandidateCreditedToCurrentStageRejectReason + - value: >- + screening_question_answers.question,candidate,credited_to,reject_reason + name: ScreeningQuestionAnswersQuestionCandidateCreditedToRejectReason + - value: screening_question_answers.question,candidate,current_stage + name: ScreeningQuestionAnswersQuestionCandidateCurrentStage + - value: >- + screening_question_answers.question,candidate,current_stage,reject_reason + name: ScreeningQuestionAnswersQuestionCandidateCurrentStageRejectReason + - value: screening_question_answers.question,candidate,job + name: ScreeningQuestionAnswersQuestionCandidateJob + - value: screening_question_answers.question,candidate,job,credited_to + name: ScreeningQuestionAnswersQuestionCandidateJobCreditedTo + - value: >- + screening_question_answers.question,candidate,job,credited_to,current_stage + name: ScreeningQuestionAnswersQuestionCandidateJobCreditedToCurrentStage + - value: >- + screening_question_answers.question,candidate,job,credited_to,current_stage,reject_reason + name: >- + ScreeningQuestionAnswersQuestionCandidateJobCreditedToCurrentStageRejectReason + - value: >- + screening_question_answers.question,candidate,job,credited_to,reject_reason + name: ScreeningQuestionAnswersQuestionCandidateJobCreditedToRejectReason + - value: screening_question_answers.question,candidate,job,current_stage + name: ScreeningQuestionAnswersQuestionCandidateJobCurrentStage + - value: >- + screening_question_answers.question,candidate,job,current_stage,reject_reason + name: ScreeningQuestionAnswersQuestionCandidateJobCurrentStageRejectReason + - value: screening_question_answers.question,candidate,job,reject_reason + name: ScreeningQuestionAnswersQuestionCandidateJobRejectReason + - value: screening_question_answers.question,candidate,reject_reason + name: ScreeningQuestionAnswersQuestionCandidateRejectReason + - value: screening_question_answers.question,credited_to + name: ScreeningQuestionAnswersQuestionCreditedTo + - value: screening_question_answers.question,credited_to,current_stage + name: ScreeningQuestionAnswersQuestionCreditedToCurrentStage + - value: >- + screening_question_answers.question,credited_to,current_stage,reject_reason + name: ScreeningQuestionAnswersQuestionCreditedToCurrentStageRejectReason + - value: screening_question_answers.question,credited_to,reject_reason + name: ScreeningQuestionAnswersQuestionCreditedToRejectReason + - value: screening_question_answers.question,current_stage + name: ScreeningQuestionAnswersQuestionCurrentStage + - value: screening_question_answers.question,current_stage,reject_reason + name: ScreeningQuestionAnswersQuestionCurrentStageRejectReason + - value: screening_question_answers.question,job + name: ScreeningQuestionAnswersQuestionJob + - value: screening_question_answers.question,job,credited_to + name: ScreeningQuestionAnswersQuestionJobCreditedTo + - value: screening_question_answers.question,job,credited_to,current_stage + name: ScreeningQuestionAnswersQuestionJobCreditedToCurrentStage + - value: >- + screening_question_answers.question,job,credited_to,current_stage,reject_reason + name: ScreeningQuestionAnswersQuestionJobCreditedToCurrentStageRejectReason + - value: screening_question_answers.question,job,credited_to,reject_reason + name: ScreeningQuestionAnswersQuestionJobCreditedToRejectReason + - value: screening_question_answers.question,job,current_stage + name: ScreeningQuestionAnswersQuestionJobCurrentStage + - value: screening_question_answers.question,job,current_stage,reject_reason + name: ScreeningQuestionAnswersQuestionJobCurrentStageRejectReason + - value: screening_question_answers.question,job,reject_reason + name: ScreeningQuestionAnswersQuestionJobRejectReason + - value: screening_question_answers.question,reject_reason + name: ScreeningQuestionAnswersQuestionRejectReason + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ats/v1/applications + method: GET + auth: true + docs: Returns a list of `Application` objects. + source: + openapi: openapi/openapi.yml + request: + name: ApplicationsListRequest + query-parameters: + candidate_id: + type: optional + docs: If provided, will only return applications for this candidate. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + credited_to_id: + type: optional + docs: If provided, will only return applications credited to this user. + current_stage_id: + type: optional + docs: >- + If provided, will only return applications at this interview + stage. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + job_id: + type: optional + docs: If provided, will only return applications for this job. + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + reject_reason_id: + type: optional + docs: >- + If provided, will only return applications with this reject + reason. + remote_id: + type: optional + docs: The API provider's ID for the given object. + source: + type: optional + docs: If provided, will only return applications with this source. + response: + docs: '' + type: root.PaginatedApplicationList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 92e8a369-fffe-430d-b93a-f7e8a16563f1 + remote_id: '98796' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + candidate: candidate + job: job + applied_at: '2021-10-15T00:00:00Z' + rejected_at: '2021-11-15T00:00:00Z' + offers: + - e9b5c11d-c588-468e-8567-cd6992e42b62 + source: Campus recruiting event + credited_to: credited_to + screening_question_answers: + - screening_question_answers + - screening_question_answers + current_stage: current_stage + reject_reason: reject_reason + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /candidacies + data: + - Varies by platform + create: + path: /ats/v1/applications + method: POST + auth: true + docs: > + Creates an `Application` object with the given values. + + For certain integrations, but not all, our API detects duplicate + candidates and will associate applications with existing records in the + third-party. New candidates are created and automatically linked to the + application. + + + See our [Help Center + article](https://help.merge.dev/en/articles/10012366-updates-to-post-applications-oct-2024) + for detailed support per integration. + source: + openapi: openapi/openapi.yml + request: + name: ApplicationEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: root.ApplicationRequest + remote_user_id: string + content-type: application/json + response: + docs: '' + type: root.ApplicationResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + remote_user_id: remote_user_id + response: + body: + model: + id: 92e8a369-fffe-430d-b93a-f7e8a16563f1 + remote_id: '98796' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + candidate: candidate + job: job + applied_at: '2021-10-15T00:00:00Z' + rejected_at: '2021-11-15T00:00:00Z' + offers: + - e9b5c11d-c588-468e-8567-cd6992e42b62 + source: Campus recruiting event + credited_to: credited_to + screening_question_answers: + - screening_question_answers + - screening_question_answers + current_stage: current_stage + reject_reason: reject_reason + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /candidacies + data: + - Varies by platform + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /ats/v1/applications/{id} + method: GET + auth: true + docs: Returns an `Application` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: ApplicationsRetrieveRequest + query-parameters: + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.Application + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 92e8a369-fffe-430d-b93a-f7e8a16563f1 + remote_id: '98796' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + candidate: candidate + job: job + applied_at: '2021-10-15T00:00:00Z' + rejected_at: '2021-11-15T00:00:00Z' + offers: + - e9b5c11d-c588-468e-8567-cd6992e42b62 + source: Campus recruiting event + credited_to: credited_to + screening_question_answers: + - screening_question_answers + - screening_question_answers + current_stage: current_stage + reject_reason: reject_reason + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /candidacies + data: + - Varies by platform + changeStageCreate: + path: /ats/v1/applications/{id}/change-stage + method: POST + auth: true + docs: Updates the `current_stage` field of an `Application` object + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: UpdateApplicationStageRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + job_interview_stage: + type: optional + docs: The interview stage to move the application to. + validation: + format: uuid + remote_user_id: + type: optional + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: root.ApplicationResponse + status-code: 201 + examples: + - path-parameters: + id: id + headers: {} + request: {} + response: + body: + model: + id: 92e8a369-fffe-430d-b93a-f7e8a16563f1 + remote_id: '98796' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + candidate: candidate + job: job + applied_at: '2021-10-15T00:00:00Z' + rejected_at: '2021-11-15T00:00:00Z' + offers: + - e9b5c11d-c588-468e-8567-cd6992e42b62 + source: Campus recruiting event + credited_to: credited_to + screening_question_answers: + - screening_question_answers + - screening_question_answers + current_stage: current_stage + reject_reason: reject_reason + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /candidacies + data: + - Varies by platform + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + metaPostRetrieve: + path: /ats/v1/applications/meta/post + method: GET + auth: true + docs: Returns metadata for `Application` POSTs. + source: + openapi: openapi/openapi.yml + request: + name: ApplicationsMetaPostRetrieveRequest + query-parameters: + application_remote_template_id: + type: optional + docs: >- + The template ID associated with the nested application in the + request. + response: + docs: '' + type: root.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ats/asyncPassthrough.yml b/.mock/definition/ats/asyncPassthrough.yml new file mode 100644 index 0000000..94686f1 --- /dev/null +++ b/.mock/definition/ats/asyncPassthrough.yml @@ -0,0 +1,70 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /ats/v1/async-passthrough + method: POST + auth: true + docs: >- + Asynchronously pull data from an endpoint not currently supported by + Merge. + source: + openapi: openapi/openapi.yml + request: + body: root.DataPassthroughRequest + content-type: application/json + response: + docs: '' + type: root.AsyncPassthroughReciept + status-code: 200 + examples: + - headers: {} + request: + method: GET + path: /scooters + response: + body: + async_passthrough_receipt_id: fd29020f-2695-445e-922e-dcd5e81903fd + retrieve: + path: /ats/v1/async-passthrough/{async_passthrough_receipt_id} + method: GET + auth: true + docs: Retrieves data from earlier async-passthrough POST request + source: + openapi: openapi/openapi.yml + path-parameters: + async_passthrough_receipt_id: string + response: + docs: '' + type: AsyncPassthroughRetrieveResponse + status-code: 200 + examples: + - path-parameters: + async_passthrough_receipt_id: async_passthrough_receipt_id + headers: {} + response: + body: + method: GET + path: /scooters + status: 200 + response: + key: value + response_headers: + X-Page-Token: value + response_type: JSON + headers: + EXTRA-HEADER: value + Authorization: + source: + openapi: openapi/openapi.yml +types: + AsyncPassthroughRetrieveResponse: + discriminated: false + union: + - root.RemoteResponse + - string + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ats/attachments.yml b/.mock/definition/ats/attachments.yml new file mode 100644 index 0000000..14b45b1 --- /dev/null +++ b/.mock/definition/ats/attachments.yml @@ -0,0 +1,432 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ats/v1/attachments + method: GET + auth: true + docs: Returns a list of `Attachment` objects. + source: + openapi: openapi/openapi.yml + request: + name: AttachmentsListRequest + query-parameters: + candidate_id: + type: optional + docs: If provided, will only return attachments for this candidate. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + remote_id: + type: optional + docs: The API provider's ID for the given object. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: root.PaginatedAttachmentList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: c640b80b-fac9-409f-aa19-1f9221aec445 + remote_id: '11167' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + file_name: Candidate Resume + file_url: http://alturl.com/p749b + candidate: 2872ba14-4084-492b-be96-e5eee6fc33ef + attachment_type: RESUME + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /attachments + data: + - Varies by platform + create: + path: /ats/v1/attachments + method: POST + auth: true + docs: Creates an `Attachment` object with the given values. + source: + openapi: openapi/openapi.yml + request: + name: AttachmentEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: root.AttachmentRequest + remote_user_id: string + content-type: application/json + response: + docs: '' + type: root.AttachmentResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + remote_user_id: remote_user_id + response: + body: + model: + id: c640b80b-fac9-409f-aa19-1f9221aec445 + remote_id: '11167' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + file_name: Candidate Resume + file_url: http://alturl.com/p749b + candidate: 2872ba14-4084-492b-be96-e5eee6fc33ef + attachment_type: RESUME + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /attachments + data: + - Varies by platform + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /ats/v1/attachments/{id} + method: GET + auth: true + docs: Returns an `Attachment` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: AttachmentsRetrieveRequest + query-parameters: + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: root.Attachment + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: c640b80b-fac9-409f-aa19-1f9221aec445 + remote_id: '11167' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + file_name: Candidate Resume + file_url: http://alturl.com/p749b + candidate: 2872ba14-4084-492b-be96-e5eee6fc33ef + attachment_type: RESUME + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /attachments + data: + - Varies by platform + metaPostRetrieve: + path: /ats/v1/attachments/meta/post + method: GET + auth: true + docs: Returns metadata for `Attachment` POSTs. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ats/auditTrail.yml b/.mock/definition/ats/auditTrail.yml new file mode 100644 index 0000000..36833ff --- /dev/null +++ b/.mock/definition/ats/auditTrail.yml @@ -0,0 +1,94 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ats/v1/audit-trail + method: GET + auth: true + docs: Gets a list of audit trail events. + source: + openapi: openapi/openapi.yml + request: + name: AuditTrailListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + end_date: + type: optional + docs: >- + If included, will only include audit trail events that occurred + before this time + event_type: + type: optional + docs: >- + 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`, + `REGENERATED_WEBHOOK_SIGNATURE`, `INVITED_USER`, + `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, + `DELETED_LINKED_ACCOUNT`, + `DELETED_ALL_COMMON_MODELS_FOR_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`, + `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, + `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, + `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, + `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, + `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, + `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, + `END_USER_CREDENTIALS_ACCESSED` + page_size: + type: optional + docs: Number of results to return per page. + start_date: + type: optional + docs: >- + If included, will only include audit trail events that occurred + after this time + user_email: + type: optional + docs: >- + If provided, this will return events associated with the specified + user email. Please note that the email address reflects the user's + email at the time of the event, and may not be their current + email. + response: + docs: '' + type: root.PaginatedAuditLogEventList + status-code: 200 + examples: + - response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: b5ceea2a-7171-47ce-8090-165cfce5572c + user_name: Gil Feig + user_email: hello@merge.dev + role: ADMIN + ip_address: 192.0.2.123 + event_type: CREATED_REMOTE_PRODUCTION_API_KEY + event_description: >- + Organization-wide Scopes for model hris.Employee updated + from Read to Read+Write + created_at: '2024-01-15T09:30:00Z' + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ats/availableActions.yml b/.mock/definition/ats/availableActions.yml new file mode 100644 index 0000000..8e529df --- /dev/null +++ b/.mock/definition/ats/availableActions.yml @@ -0,0 +1,50 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + retrieve: + path: /ats/v1/available-actions + method: GET + auth: true + docs: Returns a list of models and actions available for an account. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.AvailableActions + status-code: 200 + examples: + - headers: {} + response: + body: + integration: + name: name + abbreviated_name: abbreviated_name + categories: + - hris + image: image + square_image: square_image + color: color + slug: slug + api_endpoints_to_documentation_urls: + key: value + webhook_setup_guide_url: webhook_setup_guide_url + category_beta_status: + key: value + passthrough_available: true + available_model_operations: + - model_name: Candidate + available_operations: + - FETCH + - CREATE + required_post_parameters: + - remote_user_id + supported_fields: + - first_name + - last_name + - company + - title + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ats/candidates.yml b/.mock/definition/ats/candidates.yml new file mode 100644 index 0000000..b4312f2 --- /dev/null +++ b/.mock/definition/ats/candidates.yml @@ -0,0 +1,868 @@ +types: + CandidatesListRequestExpand: + enum: + - applications + - value: applications,attachments + name: ApplicationsAttachments + - attachments + source: + openapi: openapi/openapi.yml + CandidatesRetrieveRequestExpand: + enum: + - applications + - value: applications,attachments + name: ApplicationsAttachments + - attachments + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ats/v1/candidates + method: GET + auth: true + docs: Returns a list of `Candidate` objects. + source: + openapi: openapi/openapi.yml + request: + name: CandidatesListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + email_addresses: + type: optional + docs: >- + If provided, will only return candidates with these email + addresses; multiple addresses can be separated by commas. + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + first_name: + type: optional + docs: If provided, will only return candidates with this first name. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + last_name: + type: optional + docs: If provided, will only return candidates with this last name. + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + tags: + type: optional + docs: >- + If provided, will only return candidates with these tags; multiple + tags can be separated by commas. + response: + docs: '' + type: root.PaginatedCandidateList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 521b18c2-4d01-4297-b451-19858d07c133 + remote_id: '21198' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + first_name: Gil + last_name: Feig + company: Columbia Dining App. + title: Software Engineer + remote_created_at: '2021-10-15T00:00:00Z' + remote_updated_at: '2021-10-16T00:00:00Z' + last_interaction_at: '2021-10-17T00:00:00Z' + is_private: true + can_email: true + locations: + - San Francisco + - New York + - Miami + phone_numbers: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + value: '+1234567890' + phone_number_type: MOBILE + email_addresses: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + value: hello@merge.dev + email_address_type: PERSONAL + urls: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + value: http://alturl.com/p749b + url_type: BLOG + tags: + - High-Priority + applications: + - 29eb9867-ce2a-403f-b8ce-f2844b89f078 + - b4d08e5c-de00-4d64-a29f-66addac9af99 + - 4ff877d2-fb3e-4a5b-a7a5-168ddf2ffa56 + attachments: + - bea08964-32b4-4a20-8bb4-2612ba09de1d + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /candidates + data: + - Varies by platform + create: + path: /ats/v1/candidates + method: POST + auth: true + docs: Creates a `Candidate` object with the given values. + source: + openapi: openapi/openapi.yml + request: + name: CandidateEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: root.CandidateRequest + remote_user_id: string + content-type: application/json + response: + docs: '' + type: root.CandidateResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + remote_user_id: remote_user_id + response: + body: + model: + id: 521b18c2-4d01-4297-b451-19858d07c133 + remote_id: '21198' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + first_name: Gil + last_name: Feig + company: Columbia Dining App. + title: Software Engineer + remote_created_at: '2021-10-15T00:00:00Z' + remote_updated_at: '2021-10-16T00:00:00Z' + last_interaction_at: '2021-10-17T00:00:00Z' + is_private: true + can_email: true + locations: + - San Francisco + - New York + - Miami + phone_numbers: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + value: '+1234567890' + phone_number_type: MOBILE + email_addresses: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + value: hello@merge.dev + email_address_type: PERSONAL + urls: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + value: http://alturl.com/p749b + url_type: BLOG + tags: + - High-Priority + applications: + - 29eb9867-ce2a-403f-b8ce-f2844b89f078 + - b4d08e5c-de00-4d64-a29f-66addac9af99 + - 4ff877d2-fb3e-4a5b-a7a5-168ddf2ffa56 + attachments: + - bea08964-32b4-4a20-8bb4-2612ba09de1d + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /candidates + data: + - Varies by platform + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /ats/v1/candidates/{id} + method: GET + auth: true + docs: Returns a `Candidate` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: CandidatesRetrieveRequest + query-parameters: + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.Candidate + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 521b18c2-4d01-4297-b451-19858d07c133 + remote_id: '21198' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + first_name: Gil + last_name: Feig + company: Columbia Dining App. + title: Software Engineer + remote_created_at: '2021-10-15T00:00:00Z' + remote_updated_at: '2021-10-16T00:00:00Z' + last_interaction_at: '2021-10-17T00:00:00Z' + is_private: true + can_email: true + locations: + - San Francisco + - New York + - Miami + phone_numbers: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + value: '+1234567890' + phone_number_type: MOBILE + remote_was_deleted: true + email_addresses: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + value: hello@merge.dev + email_address_type: PERSONAL + remote_was_deleted: true + urls: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + value: http://alturl.com/p749b + url_type: BLOG + remote_was_deleted: true + tags: + - High-Priority + applications: + - 29eb9867-ce2a-403f-b8ce-f2844b89f078 + - b4d08e5c-de00-4d64-a29f-66addac9af99 + - 4ff877d2-fb3e-4a5b-a7a5-168ddf2ffa56 + attachments: + - bea08964-32b4-4a20-8bb4-2612ba09de1d + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /candidates + data: + - Varies by platform + partialUpdate: + path: /ats/v1/candidates/{id} + method: PATCH + auth: true + docs: Updates a `Candidate` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: PatchedCandidateEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: root.PatchedCandidateRequest + remote_user_id: string + content-type: application/json + response: + docs: '' + type: root.CandidateResponse + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + request: + model: {} + remote_user_id: remote_user_id + response: + body: + model: + id: 521b18c2-4d01-4297-b451-19858d07c133 + remote_id: '21198' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + first_name: Gil + last_name: Feig + company: Columbia Dining App. + title: Software Engineer + remote_created_at: '2021-10-15T00:00:00Z' + remote_updated_at: '2021-10-16T00:00:00Z' + last_interaction_at: '2021-10-17T00:00:00Z' + is_private: true + can_email: true + locations: + - San Francisco + - New York + - Miami + phone_numbers: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + value: '+1234567890' + phone_number_type: MOBILE + email_addresses: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + value: hello@merge.dev + email_address_type: PERSONAL + urls: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + value: http://alturl.com/p749b + url_type: BLOG + tags: + - High-Priority + applications: + - 29eb9867-ce2a-403f-b8ce-f2844b89f078 + - b4d08e5c-de00-4d64-a29f-66addac9af99 + - 4ff877d2-fb3e-4a5b-a7a5-168ddf2ffa56 + attachments: + - bea08964-32b4-4a20-8bb4-2612ba09de1d + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /candidates + data: + - Varies by platform + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + ignoreCreate: + path: /ats/v1/candidates/ignore/{model_id} + method: POST + auth: true + docs: >- + Ignores a specific row based on the `model_id` in the url. These records + will have their properties set to null, and will not be updated in + future syncs. The "reason" and "message" fields in the request body will + be stored for audit purposes. + source: + openapi: openapi/openapi.yml + path-parameters: + model_id: string + request: + name: IgnoreCommonModelRequest + body: + properties: + reason: root.ReasonEnum + message: + type: optional + validation: + minLength: 1 + maxLength: 256 + content-type: application/json + examples: + - path-parameters: + model_id: model_id + headers: {} + request: + reason: GENERAL_CUSTOMER_REQUEST + metaPatchRetrieve: + path: /ats/v1/candidates/meta/patch/{id} + method: GET + auth: true + docs: Returns metadata for `Candidate` PATCHs. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + response: + docs: '' + type: root.MetaResponse + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + metaPostRetrieve: + path: /ats/v1/candidates/meta/post + method: GET + auth: true + docs: Returns metadata for `Candidate` POSTs. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ats/deleteAccount.yml b/.mock/definition/ats/deleteAccount.yml new file mode 100644 index 0000000..6255a39 --- /dev/null +++ b/.mock/definition/ats/deleteAccount.yml @@ -0,0 +1,15 @@ +service: + auth: false + base-path: '' + endpoints: + delete: + path: /ats/v1/delete-account + method: POST + auth: true + docs: Delete a linked account. + source: + openapi: openapi/openapi.yml + examples: + - headers: {} + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ats/departments.yml b/.mock/definition/ats/departments.yml new file mode 100644 index 0000000..8f001f4 --- /dev/null +++ b/.mock/definition/ats/departments.yml @@ -0,0 +1,136 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ats/v1/departments + method: GET + auth: true + docs: Returns a list of `Department` objects. + source: + openapi: openapi/openapi.yml + request: + name: DepartmentsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: root.PaginatedDepartmentList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + remote_id: '23456' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Engineering + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /departments + data: + - Varies by platform + retrieve: + path: /ats/v1/departments/{id} + method: GET + auth: true + docs: Returns a `Department` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: DepartmentsRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.Department + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 5b3c1341-a20f-4e51-b72c-f3830a16c97b + remote_id: '23456' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Engineering + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /departments + data: + - Varies by platform + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ats/eeocs.yml b/.mock/definition/ats/eeocs.yml new file mode 100644 index 0000000..91dbf6b --- /dev/null +++ b/.mock/definition/ats/eeocs.yml @@ -0,0 +1,300 @@ +types: + EeocsListRequestRemoteFields: + enum: + - disability_status + - value: disability_status,gender + name: DisabilityStatusGender + - value: disability_status,gender,race + name: DisabilityStatusGenderRace + - value: disability_status,gender,race,veteran_status + name: DisabilityStatusGenderRaceVeteranStatus + - value: disability_status,gender,veteran_status + name: DisabilityStatusGenderVeteranStatus + - value: disability_status,race + name: DisabilityStatusRace + - value: disability_status,race,veteran_status + name: DisabilityStatusRaceVeteranStatus + - value: disability_status,veteran_status + name: DisabilityStatusVeteranStatus + - gender + - value: gender,race + name: GenderRace + - value: gender,race,veteran_status + name: GenderRaceVeteranStatus + - value: gender,veteran_status + name: GenderVeteranStatus + - race + - value: race,veteran_status + name: RaceVeteranStatus + - veteran_status + source: + openapi: openapi/openapi.yml + EeocsListRequestShowEnumOrigins: + enum: + - disability_status + - value: disability_status,gender + name: DisabilityStatusGender + - value: disability_status,gender,race + name: DisabilityStatusGenderRace + - value: disability_status,gender,race,veteran_status + name: DisabilityStatusGenderRaceVeteranStatus + - value: disability_status,gender,veteran_status + name: DisabilityStatusGenderVeteranStatus + - value: disability_status,race + name: DisabilityStatusRace + - value: disability_status,race,veteran_status + name: DisabilityStatusRaceVeteranStatus + - value: disability_status,veteran_status + name: DisabilityStatusVeteranStatus + - gender + - value: gender,race + name: GenderRace + - value: gender,race,veteran_status + name: GenderRaceVeteranStatus + - value: gender,veteran_status + name: GenderVeteranStatus + - race + - value: race,veteran_status + name: RaceVeteranStatus + - veteran_status + source: + openapi: openapi/openapi.yml + EeocsRetrieveRequestRemoteFields: + enum: + - disability_status + - value: disability_status,gender + name: DisabilityStatusGender + - value: disability_status,gender,race + name: DisabilityStatusGenderRace + - value: disability_status,gender,race,veteran_status + name: DisabilityStatusGenderRaceVeteranStatus + - value: disability_status,gender,veteran_status + name: DisabilityStatusGenderVeteranStatus + - value: disability_status,race + name: DisabilityStatusRace + - value: disability_status,race,veteran_status + name: DisabilityStatusRaceVeteranStatus + - value: disability_status,veteran_status + name: DisabilityStatusVeteranStatus + - gender + - value: gender,race + name: GenderRace + - value: gender,race,veteran_status + name: GenderRaceVeteranStatus + - value: gender,veteran_status + name: GenderVeteranStatus + - race + - value: race,veteran_status + name: RaceVeteranStatus + - veteran_status + source: + openapi: openapi/openapi.yml + EeocsRetrieveRequestShowEnumOrigins: + enum: + - disability_status + - value: disability_status,gender + name: DisabilityStatusGender + - value: disability_status,gender,race + name: DisabilityStatusGenderRace + - value: disability_status,gender,race,veteran_status + name: DisabilityStatusGenderRaceVeteranStatus + - value: disability_status,gender,veteran_status + name: DisabilityStatusGenderVeteranStatus + - value: disability_status,race + name: DisabilityStatusRace + - value: disability_status,race,veteran_status + name: DisabilityStatusRaceVeteranStatus + - value: disability_status,veteran_status + name: DisabilityStatusVeteranStatus + - gender + - value: gender,race + name: GenderRace + - value: gender,race,veteran_status + name: GenderRaceVeteranStatus + - value: gender,veteran_status + name: GenderVeteranStatus + - race + - value: race,veteran_status + name: RaceVeteranStatus + - veteran_status + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ats/v1/eeocs + method: GET + auth: true + docs: Returns a list of `EEOC` objects. + source: + openapi: openapi/openapi.yml + request: + name: EeocsListRequest + query-parameters: + candidate_id: + type: optional + docs: If provided, will only return EEOC info for this candidate. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_fields: + type: optional + docs: Deprecated. Use show_enum_origins. + remote_id: + type: optional + docs: The API provider's ID for the given object. + show_enum_origins: + type: optional + docs: >- + 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) + response: + docs: '' + type: root.PaginatedEeocList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: f7dd7b4f-237e-4772-8bd4-3246384c6c58 + remote_id: '76' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + candidate: candidate + submitted_at: '2021-10-15T00:00:00Z' + race: AMERICAN_INDIAN_OR_ALASKAN_NATIVE + gender: MALE + veteran_status: I_AM_NOT_A_PROTECTED_VETERAN + disability_status: YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /eeoc + data: + - Varies by platform + retrieve: + path: /ats/v1/eeocs/{id} + method: GET + auth: true + docs: Returns an `EEOC` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: EeocsRetrieveRequest + query-parameters: + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional + docs: >- + 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) + response: + docs: '' + type: root.Eeoc + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: f7dd7b4f-237e-4772-8bd4-3246384c6c58 + remote_id: '76' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + candidate: candidate + submitted_at: '2021-10-15T00:00:00Z' + race: AMERICAN_INDIAN_OR_ALASKAN_NATIVE + gender: MALE + veteran_status: I_AM_NOT_A_PROTECTED_VETERAN + disability_status: YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /eeoc + data: + - Varies by platform + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ats/fieldMapping.yml b/.mock/definition/ats/fieldMapping.yml new file mode 100644 index 0000000..9d92fea --- /dev/null +++ b/.mock/definition/ats/fieldMapping.yml @@ -0,0 +1,892 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + field_mappings_retrieve: + path: /ats/v1/field-mappings + method: GET + auth: true + docs: >- + Get all Field Mappings for this Linked Account. Field Mappings are + mappings between third-party Remote Fields and user defined Merge + fields. [Learn + more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). + source: + openapi: openapi/openapi.yml + request: + name: FieldMappingsRetrieveRequest + query-parameters: + exclude_remote_field_metadata: + type: optional + docs: >- + If `true`, remote fields metadata is excluded from each field + mapping instance (i.e. `remote_fields.remote_key_name` and + `remote_fields.schema` will be null). This will increase the speed + of the request since these fields require some calculations. + response: + docs: '' + type: root.FieldMappingApiInstanceResponse + status-code: 200 + examples: + - headers: {} + response: + body: + Activity: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Application: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Attachment: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Candidate: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Department: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + EEOC: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + ScheduledInterview: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Job: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + JobPosting: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + JobInterviewStage: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Offer: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Office: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + RejectReason: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Scorecard: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Tag: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + RemoteUser: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + field_mappings_create: + path: /ats/v1/field-mappings + method: POST + auth: true + docs: >- + Create new Field Mappings that will be available after the next + scheduled sync. This will cause the next sync for this Linked Account to + sync **ALL** data from start. + source: + openapi: openapi/openapi.yml + request: + name: CreateFieldMappingRequest + query-parameters: + exclude_remote_field_metadata: + type: optional + docs: >- + If `true`, remote fields metadata is excluded from each field + mapping instance (i.e. `remote_fields.remote_key_name` and + `remote_fields.schema` will be null). This will increase the speed + of the request since these fields require some calculations. + body: + properties: + target_field_name: + type: string + docs: >- + The name of the target field you want this remote field to map + to. + validation: + minLength: 1 + target_field_description: + type: string + docs: >- + The description of the target field you want this remote field + to map to. + validation: + minLength: 1 + remote_field_traversal_path: + docs: >- + The field traversal path of the remote field listed when you hit + the GET /remote-fields endpoint. + type: list + remote_method: + type: string + docs: >- + The method of the remote endpoint where the remote field is + coming from. + validation: + minLength: 1 + remote_url_path: + type: string + docs: >- + The path of the remote endpoint where the remote field is coming + from. + validation: + minLength: 1 + common_model_name: + type: string + docs: >- + The name of the Common Model that the remote field corresponds + to in a given category. + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: root.FieldMappingInstanceResponse + status-code: 201 + examples: + - headers: {} + request: + target_field_name: example_target_field_name + target_field_description: this is a example description of the target field + remote_field_traversal_path: + - example_remote_field + remote_method: GET + remote_url_path: /example-url-path + common_model_name: ExampleCommonModel + response: + body: + model: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + field_mappings_destroy: + path: /ats/v1/field-mappings/{field_mapping_id} + method: DELETE + auth: true + docs: >- + Deletes Field Mappings for a Linked Account. All data related to this + Field Mapping will be deleted and these changes will be reflected after + the next scheduled sync. This will cause the next sync for this Linked + Account to sync **ALL** data from start. + source: + openapi: openapi/openapi.yml + path-parameters: + field_mapping_id: string + response: + docs: '' + type: root.FieldMappingInstanceResponse + status-code: 204 + examples: + - path-parameters: + field_mapping_id: field_mapping_id + headers: {} + response: + body: + model: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + field_mappings_partial_update: + path: /ats/v1/field-mappings/{field_mapping_id} + method: PATCH + auth: true + docs: >- + Create or update existing Field Mappings for a Linked Account. Changes + will be reflected after the next scheduled sync. This will cause the + next sync for this Linked Account to sync **ALL** data from start. + source: + openapi: openapi/openapi.yml + path-parameters: + field_mapping_id: string + request: + name: PatchedEditFieldMappingRequest + body: + properties: + remote_field_traversal_path: + type: optional> + docs: >- + The field traversal path of the remote field listed when you hit + the GET /remote-fields endpoint. + remote_method: + type: optional + docs: >- + The method of the remote endpoint where the remote field is + coming from. + validation: + minLength: 1 + remote_url_path: + type: optional + docs: >- + The path of the remote endpoint where the remote field is coming + from. + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: root.FieldMappingInstanceResponse + status-code: 200 + examples: + - path-parameters: + field_mapping_id: field_mapping_id + headers: {} + request: {} + response: + body: + model: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + remote_fields_retrieve: + path: /ats/v1/remote-fields + method: GET + auth: true + docs: >- + Get all remote fields for a Linked Account. Remote fields are + third-party fields that are accessible after initial sync if remote_data + is enabled. You can use remote fields to override existing Merge fields + or map a new Merge field. [Learn + more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). + source: + openapi: openapi/openapi.yml + request: + name: RemoteFieldsRetrieveRequest + query-parameters: + common_models: + type: optional + docs: >- + A comma seperated list of Common Model names. If included, will + only return Remote Fields for those Common Models. + include_example_values: + type: optional + docs: >- + If true, will include example values, where available, for remote + fields in the 3rd party platform. These examples come from active + data from your customers. + response: + docs: '' + type: root.RemoteFieldApiResponse + status-code: 200 + examples: + - headers: {} + response: + body: + Activity: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Application: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Attachment: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Candidate: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Department: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + EEOC: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + ScheduledInterview: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Job: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + JobPosting: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + JobInterviewStage: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Offer: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Office: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + RejectReason: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Scorecard: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Tag: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + RemoteUser: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + target_fields_retrieve: + path: /ats/v1/target-fields + method: GET + auth: true + docs: >- + Get all organization-wide Target Fields, this will not include any + Linked Account specific Target Fields. Organization-wide Target Fields + are additional fields appended to the Merge Common Model for all Linked + Accounts in a category. [Learn + more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.ExternalTargetFieldApiResponse + status-code: 200 + examples: + - headers: {} + response: + body: + Activity: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Application: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Attachment: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Candidate: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Department: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + EEOC: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + ScheduledInterview: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Job: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + JobPosting: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + JobInterviewStage: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Offer: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Office: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + RejectReason: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Scorecard: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Tag: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + RemoteUser: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ats/forceResync.yml b/.mock/definition/ats/forceResync.yml new file mode 100644 index 0000000..8a60399 --- /dev/null +++ b/.mock/definition/ats/forceResync.yml @@ -0,0 +1,37 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + sync_status_resync_create: + path: /ats/v1/sync-status/resync + method: POST + auth: true + docs: >- + Force re-sync of all models. This endpoint is available for monthly, + quarterly, and highest sync frequency customers on the Professional or + Enterprise plans. Doing so will consume a sync credit for the relevant + linked account. Force re-syncs can also be triggered manually in the + Merge Dashboard and is available for all customers. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: list + status-code: 200 + examples: + - headers: {} + response: + body: + - model_name: Candidate + model_id: ats.Candidate + last_sync_start: '2021-03-30T19:44:18Z' + next_sync_start: '2021-03-30T20:44:18Z' + last_sync_result: SYNCING + last_sync_finished: '2021-03-30T19:55:18Z' + status: SYNCING + is_initial_sync: true + selective_sync_configurations_usage: IN_NEXT_SYNC + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ats/generateKey.yml b/.mock/definition/ats/generateKey.yml new file mode 100644 index 0000000..40a39dc --- /dev/null +++ b/.mock/definition/ats/generateKey.yml @@ -0,0 +1,36 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /ats/v1/generate-key + method: POST + auth: true + docs: Create a remote key. + source: + openapi: openapi/openapi.yml + request: + name: GenerateRemoteKeyRequest + body: + properties: + name: + type: string + docs: The name of the remote key + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: root.RemoteKey + status-code: 200 + examples: + - request: + name: Remote Deployment Key 1 + response: + body: + name: Remote Deployment Key 1 + key: hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ats/interviews.yml b/.mock/definition/ats/interviews.yml new file mode 100644 index 0000000..aa95289 --- /dev/null +++ b/.mock/definition/ats/interviews.yml @@ -0,0 +1,526 @@ +types: + InterviewsListRequestExpand: + enum: + - application + - value: application,job_interview_stage + name: ApplicationJobInterviewStage + - interviewers + - value: interviewers,application + name: InterviewersApplication + - value: interviewers,application,job_interview_stage + name: InterviewersApplicationJobInterviewStage + - value: interviewers,job_interview_stage + name: InterviewersJobInterviewStage + - value: interviewers,organizer + name: InterviewersOrganizer + - value: interviewers,organizer,application + name: InterviewersOrganizerApplication + - value: interviewers,organizer,application,job_interview_stage + name: InterviewersOrganizerApplicationJobInterviewStage + - value: interviewers,organizer,job_interview_stage + name: InterviewersOrganizerJobInterviewStage + - job_interview_stage + - organizer + - value: organizer,application + name: OrganizerApplication + - value: organizer,application,job_interview_stage + name: OrganizerApplicationJobInterviewStage + - value: organizer,job_interview_stage + name: OrganizerJobInterviewStage + source: + openapi: openapi/openapi.yml + InterviewsRetrieveRequestExpand: + enum: + - application + - value: application,job_interview_stage + name: ApplicationJobInterviewStage + - interviewers + - value: interviewers,application + name: InterviewersApplication + - value: interviewers,application,job_interview_stage + name: InterviewersApplicationJobInterviewStage + - value: interviewers,job_interview_stage + name: InterviewersJobInterviewStage + - value: interviewers,organizer + name: InterviewersOrganizer + - value: interviewers,organizer,application + name: InterviewersOrganizerApplication + - value: interviewers,organizer,application,job_interview_stage + name: InterviewersOrganizerApplicationJobInterviewStage + - value: interviewers,organizer,job_interview_stage + name: InterviewersOrganizerJobInterviewStage + - job_interview_stage + - organizer + - value: organizer,application + name: OrganizerApplication + - value: organizer,application,job_interview_stage + name: OrganizerApplicationJobInterviewStage + - value: organizer,job_interview_stage + name: OrganizerJobInterviewStage + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ats/v1/interviews + method: GET + auth: true + docs: Returns a list of `ScheduledInterview` objects. + source: + openapi: openapi/openapi.yml + request: + name: InterviewsListRequest + query-parameters: + application_id: + type: optional + docs: If provided, will only return interviews for this application. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + job_id: + type: optional + docs: If provided, wll only return interviews organized for this job. + job_interview_stage_id: + type: optional + docs: If provided, will only return interviews at this stage. + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + organizer_id: + type: optional + docs: If provided, will only return interviews organized by this user. + page_size: + type: optional + docs: Number of results to return per page. + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + remote_id: + type: optional + docs: The API provider's ID for the given object. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: root.PaginatedScheduledInterviewList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: b8faf072-98b9-4445-8a9a-6b4950efca19 + remote_id: '3' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + application: application + job_interview_stage: job_interview_stage + organizer: organizer + interviewers: + - f9813dd5-e70b-484c-91d8-00acd6065b07 + - 89a86fcf-d540-4e6b-ac3d-ce07c4ec9b3c + location: Embarcadero Center 2 + start_at: '2021-10-15T00:00:00Z' + end_at: '2021-10-15T02:00:00Z' + remote_created_at: '2021-10-15T00:00:00Z' + remote_updated_at: '2021-10-15T00:00:00Z' + status: SCHEDULED + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /interviews + data: + - Varies by platform + create: + path: /ats/v1/interviews + method: POST + auth: true + docs: Creates a `ScheduledInterview` object with the given values. + source: + openapi: openapi/openapi.yml + request: + name: ScheduledInterviewEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: root.ScheduledInterviewRequest + remote_user_id: string + content-type: application/json + response: + docs: '' + type: root.ScheduledInterviewResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + remote_user_id: remote_user_id + response: + body: + model: + id: b8faf072-98b9-4445-8a9a-6b4950efca19 + remote_id: '3' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + application: application + job_interview_stage: job_interview_stage + organizer: organizer + interviewers: + - f9813dd5-e70b-484c-91d8-00acd6065b07 + - 89a86fcf-d540-4e6b-ac3d-ce07c4ec9b3c + location: Embarcadero Center 2 + start_at: '2021-10-15T00:00:00Z' + end_at: '2021-10-15T02:00:00Z' + remote_created_at: '2021-10-15T00:00:00Z' + remote_updated_at: '2021-10-15T00:00:00Z' + status: SCHEDULED + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /interviews + data: + - Varies by platform + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /ats/v1/interviews/{id} + method: GET + auth: true + docs: Returns a `ScheduledInterview` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: InterviewsRetrieveRequest + query-parameters: + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: root.ScheduledInterview + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: b8faf072-98b9-4445-8a9a-6b4950efca19 + remote_id: '3' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + application: application + job_interview_stage: job_interview_stage + organizer: organizer + interviewers: + - f9813dd5-e70b-484c-91d8-00acd6065b07 + - 89a86fcf-d540-4e6b-ac3d-ce07c4ec9b3c + location: Embarcadero Center 2 + start_at: '2021-10-15T00:00:00Z' + end_at: '2021-10-15T02:00:00Z' + remote_created_at: '2021-10-15T00:00:00Z' + remote_updated_at: '2021-10-15T00:00:00Z' + status: SCHEDULED + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /interviews + data: + - Varies by platform + metaPostRetrieve: + path: /ats/v1/interviews/meta/post + method: GET + auth: true + docs: Returns metadata for `ScheduledInterview` POSTs. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ats/issues.yml b/.mock/definition/ats/issues.yml new file mode 100644 index 0000000..4984ce4 --- /dev/null +++ b/.mock/definition/ats/issues.yml @@ -0,0 +1,129 @@ +types: + IssuesListRequestStatus: + enum: + - ONGOING + - RESOLVED + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ats/v1/issues + method: GET + auth: true + docs: Gets all issues for Organization. + source: + openapi: openapi/openapi.yml + request: + name: IssuesListRequest + query-parameters: + account_token: optional + cursor: + type: optional + docs: The pagination cursor value. + end_date: + type: optional + docs: >- + If included, will only include issues whose most recent action + occurred before this time + end_user_organization_name: optional + first_incident_time_after: + type: optional + docs: >- + If provided, will only return issues whose first incident time was + after this datetime. + first_incident_time_before: + type: optional + docs: >- + If provided, will only return issues whose first incident time was + before this datetime. + include_muted: + type: optional + docs: If true, will include muted issues + integration_name: optional + last_incident_time_after: + type: optional + docs: >- + If provided, will only return issues whose last incident time was + after this datetime. + last_incident_time_before: + type: optional + docs: >- + If provided, will only return issues whose last incident time was + before this datetime. + linked_account_id: + type: optional + docs: >- + If provided, will only include issues pertaining to the linked + account passed in. + page_size: + type: optional + docs: Number of results to return per page. + start_date: + type: optional + docs: >- + If included, will only include issues whose most recent action + occurred after this time + status: + type: optional + docs: |- + Status of the issue. Options: ('ONGOING', 'RESOLVED') + + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + response: + docs: '' + type: root.PaginatedIssueList + status-code: 200 + examples: + - response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + status: ONGOING + error_description: Missing Permissions + end_user: + key: value + first_incident_time: '2022-12-05T16:19:15Z' + last_incident_time: '2022-12-05T16:19:15Z' + is_muted: true + error_details: + - Missing employee permissions. + - Missing time off permissions. + retrieve: + path: /ats/v1/issues/{id} + method: GET + auth: true + docs: Get a specific issue. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + response: + docs: '' + type: root.Issue + status-code: 200 + examples: + - path-parameters: + id: id + response: + body: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + status: ONGOING + error_description: Missing Permissions + end_user: + key: value + first_incident_time: '2022-12-05T16:19:15Z' + last_incident_time: '2022-12-05T16:19:15Z' + is_muted: true + error_details: + - Missing employee permissions. + - Missing time off permissions. + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ats/jobInterviewStages.yml b/.mock/definition/ats/jobInterviewStages.yml new file mode 100644 index 0000000..5753b28 --- /dev/null +++ b/.mock/definition/ats/jobInterviewStages.yml @@ -0,0 +1,153 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ats/v1/job-interview-stages + method: GET + auth: true + docs: Returns a list of `JobInterviewStage` objects. + source: + openapi: openapi/openapi.yml + request: + name: JobInterviewStagesListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + job_id: + type: optional + docs: If provided, will only return interview stages for this job. + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: root.PaginatedJobInterviewStageList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: f9813dd5-e70b-484c-91d8-00acd6065b07 + remote_id: '876556788' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Phone Screen + job: job + stage_order: 2 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /interview-stages + data: + - Varies by platform + retrieve: + path: /ats/v1/job-interview-stages/{id} + method: GET + auth: true + docs: Returns a `JobInterviewStage` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: JobInterviewStagesRetrieveRequest + query-parameters: + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.JobInterviewStage + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: f9813dd5-e70b-484c-91d8-00acd6065b07 + remote_id: '876556788' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Phone Screen + job: job + stage_order: 2 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /interview-stages + data: + - Varies by platform + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ats/jobPostings.yml b/.mock/definition/ats/jobPostings.yml new file mode 100644 index 0000000..859b5bb --- /dev/null +++ b/.mock/definition/ats/jobPostings.yml @@ -0,0 +1,195 @@ +types: + JobPostingsListRequestStatus: + enum: + - CLOSED + - DRAFT + - INTERNAL + - PENDING + - PUBLISHED + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ats/v1/job-postings + method: GET + auth: true + docs: Returns a list of `JobPosting` objects. + source: + openapi: openapi/openapi.yml + request: + name: JobPostingsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + status: + type: optional + docs: >- + 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 + response: + docs: '' + type: root.PaginatedJobPostingList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 156a2bef-57e5-4def-8ed2-7c41bd9a554t + remote_id: '1341324' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + title: Platform - NYC + job_posting_urls: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + value: https://merge.dev/careers + url_type: JOB_POSTING + job: job + status: PUBLISHED + content: Apply at https://merge.dev/careers + remote_created_at: '2021-10-15T00:00:00Z' + remote_updated_at: '2021-10-16T00:00:00Z' + is_internal: true + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /positions + data: + - Varies by platform + retrieve: + path: /ats/v1/job-postings/{id} + method: GET + auth: true + docs: Returns a `JobPosting` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: JobPostingsRetrieveRequest + query-parameters: + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.JobPosting + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 156a2bef-57e5-4def-8ed2-7c41bd9a554t + remote_id: '1341324' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + title: Platform - NYC + job_posting_urls: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + value: https://merge.dev/careers + url_type: JOB_POSTING + remote_was_deleted: true + job: job + status: PUBLISHED + content: Apply at https://merge.dev/careers + remote_created_at: '2021-10-15T00:00:00Z' + remote_updated_at: '2021-10-16T00:00:00Z' + is_internal: true + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /positions + data: + - Varies by platform + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ats/jobs.yml b/.mock/definition/ats/jobs.yml new file mode 100644 index 0000000..7ec7441 --- /dev/null +++ b/.mock/definition/ats/jobs.yml @@ -0,0 +1,454 @@ +types: + JobsListRequestExpand: + enum: + - departments + - value: departments,hiring_managers + name: DepartmentsHiringManagers + - value: departments,hiring_managers,job_postings + name: DepartmentsHiringManagersJobPostings + - value: departments,hiring_managers,job_postings,recruiters + name: DepartmentsHiringManagersJobPostingsRecruiters + - value: departments,hiring_managers,recruiters + name: DepartmentsHiringManagersRecruiters + - value: departments,job_postings + name: DepartmentsJobPostings + - value: departments,job_postings,recruiters + name: DepartmentsJobPostingsRecruiters + - value: departments,offices + name: DepartmentsOffices + - value: departments,offices,hiring_managers + name: DepartmentsOfficesHiringManagers + - value: departments,offices,hiring_managers,job_postings + name: DepartmentsOfficesHiringManagersJobPostings + - value: departments,offices,hiring_managers,job_postings,recruiters + name: DepartmentsOfficesHiringManagersJobPostingsRecruiters + - value: departments,offices,hiring_managers,recruiters + name: DepartmentsOfficesHiringManagersRecruiters + - value: departments,offices,job_postings + name: DepartmentsOfficesJobPostings + - value: departments,offices,job_postings,recruiters + name: DepartmentsOfficesJobPostingsRecruiters + - value: departments,offices,recruiters + name: DepartmentsOfficesRecruiters + - value: departments,recruiters + name: DepartmentsRecruiters + - hiring_managers + - value: hiring_managers,job_postings + name: HiringManagersJobPostings + - value: hiring_managers,job_postings,recruiters + name: HiringManagersJobPostingsRecruiters + - value: hiring_managers,recruiters + name: HiringManagersRecruiters + - job_postings + - value: job_postings,recruiters + name: JobPostingsRecruiters + - offices + - value: offices,hiring_managers + name: OfficesHiringManagers + - value: offices,hiring_managers,job_postings + name: OfficesHiringManagersJobPostings + - value: offices,hiring_managers,job_postings,recruiters + name: OfficesHiringManagersJobPostingsRecruiters + - value: offices,hiring_managers,recruiters + name: OfficesHiringManagersRecruiters + - value: offices,job_postings + name: OfficesJobPostings + - value: offices,job_postings,recruiters + name: OfficesJobPostingsRecruiters + - value: offices,recruiters + name: OfficesRecruiters + - recruiters + source: + openapi: openapi/openapi.yml + JobsListRequestStatus: + enum: + - ARCHIVED + - CLOSED + - DRAFT + - OPEN + - PENDING + source: + openapi: openapi/openapi.yml + JobsRetrieveRequestExpand: + enum: + - departments + - value: departments,hiring_managers + name: DepartmentsHiringManagers + - value: departments,hiring_managers,job_postings + name: DepartmentsHiringManagersJobPostings + - value: departments,hiring_managers,job_postings,recruiters + name: DepartmentsHiringManagersJobPostingsRecruiters + - value: departments,hiring_managers,recruiters + name: DepartmentsHiringManagersRecruiters + - value: departments,job_postings + name: DepartmentsJobPostings + - value: departments,job_postings,recruiters + name: DepartmentsJobPostingsRecruiters + - value: departments,offices + name: DepartmentsOffices + - value: departments,offices,hiring_managers + name: DepartmentsOfficesHiringManagers + - value: departments,offices,hiring_managers,job_postings + name: DepartmentsOfficesHiringManagersJobPostings + - value: departments,offices,hiring_managers,job_postings,recruiters + name: DepartmentsOfficesHiringManagersJobPostingsRecruiters + - value: departments,offices,hiring_managers,recruiters + name: DepartmentsOfficesHiringManagersRecruiters + - value: departments,offices,job_postings + name: DepartmentsOfficesJobPostings + - value: departments,offices,job_postings,recruiters + name: DepartmentsOfficesJobPostingsRecruiters + - value: departments,offices,recruiters + name: DepartmentsOfficesRecruiters + - value: departments,recruiters + name: DepartmentsRecruiters + - hiring_managers + - value: hiring_managers,job_postings + name: HiringManagersJobPostings + - value: hiring_managers,job_postings,recruiters + name: HiringManagersJobPostingsRecruiters + - value: hiring_managers,recruiters + name: HiringManagersRecruiters + - job_postings + - value: job_postings,recruiters + name: JobPostingsRecruiters + - offices + - value: offices,hiring_managers + name: OfficesHiringManagers + - value: offices,hiring_managers,job_postings + name: OfficesHiringManagersJobPostings + - value: offices,hiring_managers,job_postings,recruiters + name: OfficesHiringManagersJobPostingsRecruiters + - value: offices,hiring_managers,recruiters + name: OfficesHiringManagersRecruiters + - value: offices,job_postings + name: OfficesJobPostings + - value: offices,job_postings,recruiters + name: OfficesJobPostingsRecruiters + - value: offices,recruiters + name: OfficesRecruiters + - recruiters + source: + openapi: openapi/openapi.yml + JobsScreeningQuestionsListRequestExpand: + enum: + - job + - options + - value: options,job + name: OptionsJob + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ats/v1/jobs + method: GET + auth: true + docs: Returns a list of `Job` objects. + source: + openapi: openapi/openapi.yml + request: + name: JobsListRequest + query-parameters: + code: + type: optional + docs: If provided, will only return jobs with this code. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + offices: + type: optional + docs: >- + If provided, will only return jobs for this office; multiple + offices can be separated by commas. + page_size: + type: optional + docs: Number of results to return per page. + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + remote_id: + type: optional + docs: The API provider's ID for the given object. + show_enum_origins: + type: optional> + docs: >- + 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: + type: optional + docs: >- + If provided, will only return jobs with this status. Options: + ('OPEN', 'CLOSED', 'DRAFT', 'ARCHIVED', 'PENDING') + + + * `OPEN` - OPEN + + * `CLOSED` - CLOSED + + * `DRAFT` - DRAFT + + * `ARCHIVED` - ARCHIVED + + * `PENDING` - PENDING + response: + docs: '' + type: root.PaginatedJobList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 022a2bef-57e5-4def-8ed2-7c41bd9a5ed8 + remote_id: '8765432' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Software Engineer (Merge is actually hiring btw) + description: >- + If you're reading this documentation, you might be a good + fit for Merge! + code: C0025 + status: OPEN + type: POSTING + job_postings: + - 2r3c1341-a20f-4e51-b72c-f3830a16c97b + - 543ed912-33ec-444e-a215-8d71cc42fc12 + job_posting_urls: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + value: https://merge.dev/careers + url_type: JOB_POSTING + remote_created_at: '2021-10-15T00:00:00Z' + remote_updated_at: '2021-10-16T00:00:00Z' + confidential: true + departments: + - 5b3c1341-a20f-4e51-b72c-f3830a16c97b + - d6e687d6-0c36-48a1-8114-35324b5cb38f + offices: + - 9871b4a9-f5d2-4f3b-a66b-dfedbed42c46 + hiring_managers: + - 787ed912-33ec-444e-a215-8d71cc42fc12 + recruiters: + - 787ed912-33ec-444e-a215-8d71cc42fc12 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /positions + data: + - Varies by platform + retrieve: + path: /ats/v1/jobs/{id} + method: GET + auth: true + docs: Returns a `Job` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: JobsRetrieveRequest + query-parameters: + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: root.Job + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 022a2bef-57e5-4def-8ed2-7c41bd9a5ed8 + remote_id: '8765432' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Software Engineer (Merge is actually hiring btw) + description: >- + If you're reading this documentation, you might be a good fit + for Merge! + code: C0025 + status: OPEN + type: POSTING + job_postings: + - 2r3c1341-a20f-4e51-b72c-f3830a16c97b + - 543ed912-33ec-444e-a215-8d71cc42fc12 + job_posting_urls: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + value: https://merge.dev/careers + url_type: JOB_POSTING + remote_was_deleted: true + remote_created_at: '2021-10-15T00:00:00Z' + remote_updated_at: '2021-10-16T00:00:00Z' + confidential: true + departments: + - 5b3c1341-a20f-4e51-b72c-f3830a16c97b + - d6e687d6-0c36-48a1-8114-35324b5cb38f + offices: + - 9871b4a9-f5d2-4f3b-a66b-dfedbed42c46 + hiring_managers: + - 787ed912-33ec-444e-a215-8d71cc42fc12 + recruiters: + - 787ed912-33ec-444e-a215-8d71cc42fc12 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /positions + data: + - Varies by platform + screeningQuestionsList: + path: /ats/v1/jobs/{job_id}/screening-questions + method: GET + auth: true + docs: Returns a list of `ScreeningQuestion` objects. + source: + openapi: openapi/openapi.yml + path-parameters: + job_id: string + request: + name: JobsScreeningQuestionsListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: root.PaginatedScreeningQuestionList + status-code: 200 + examples: + - path-parameters: + job_id: job_id + headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 0238cbc6-6040-430a-848e-aaiehfhdbadf4ae + remote_id: '23729392' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + job: job + description: >- + Are you currently authorized to work for any employer in the + country outlined for this role? + title: Work Authorisation + type: DATE + required: true + options: + - remote_id: '19281' + label: I am currently authorised + - remote_id: '38372' + label: I am currently not eligible + remote_was_deleted: true + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ats/linkToken.yml b/.mock/definition/ats/linkToken.yml new file mode 100644 index 0000000..2fa09e3 --- /dev/null +++ b/.mock/definition/ats/linkToken.yml @@ -0,0 +1,135 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /ats/v1/link-token + method: POST + auth: true + docs: Creates a link token to be used when linking a new end user. + source: + openapi: openapi/openapi.yml + request: + name: EndUserDetailsRequest + body: + properties: + end_user_email_address: + type: string + docs: >- + Your end user's email address. This is purely for identification + purposes - setting this value will not cause any emails to be + sent. + validation: + minLength: 1 + maxLength: 100 + end_user_organization_name: + type: string + docs: Your end user's organization. + validation: + minLength: 1 + maxLength: 100 + end_user_origin_id: + type: string + docs: >- + This unique identifier typically represents the ID for your end + user in your product's database. This value must be distinct + from other Linked Accounts' unique identifiers. + validation: + minLength: 1 + maxLength: 100 + categories: + docs: The integration categories to show in Merge Link. + type: list + integration: + type: optional + docs: >- + The slug of a specific pre-selected integration for this linking + flow token. For examples of slugs, see + https://docs.merge.dev/guides/merge-link/single-integration/. + validation: + minLength: 1 + link_expiry_mins: + type: optional + docs: >- + An integer number of minutes between [30, 720 or 10080 if for a + Magic Link URL] for how long this token is valid. Defaults to + 30. + default: 30 + validation: + min: 30 + max: 10080 + should_create_magic_link_url: + type: optional + docs: >- + Whether to generate a Magic Link URL. Defaults to false. For + more information on Magic Link, see + https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. + default: false + hide_admin_magic_link: + type: optional + docs: >- + Whether to generate a Magic Link URL on the Admin Needed screen + during the linking flow. Defaults to false. For more information + on Magic Link, see + https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. + default: false + common_models: + type: optional> + docs: >- + An array of objects to specify the models and fields that will + be disabled for a given Linked Account. Each object uses + model_id, enabled_actions, and disabled_fields to specify the + model, method, and fields that are scoped for a given Linked + Account. + category_common_model_scopes: + type: >- + optional>>> + docs: >- + 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: + type: optional + docs: >- + The following subset of IETF language tags can be used to + configure localization. + + + * `en` - en + + * `de` - de + are_syncs_disabled: + type: optional + docs: >- + The boolean that indicates whether initial, periodic, and force + syncs will be disabled. + default: false + integration_specific_config: + type: optional> + docs: >- + A JSON object containing integration-specific configuration + options. + content-type: application/json + response: + docs: '' + type: root.LinkToken + status-code: 200 + examples: + - request: + end_user_email_address: example@gmail.com + end_user_organization_name: Test Organization + end_user_origin_id: '12345' + categories: + - hris + - ats + response: + body: + link_token: necdP7FtdASl1fQwm62be2_dM4wBG8_GactqoUV0 + integration_name: Lever + magic_link_url: https://link.merge.dev/asdfjkl12345jsndfgi2i83n + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ats/linkedAccounts.yml b/.mock/definition/ats/linkedAccounts.yml new file mode 100644 index 0000000..7acf309 --- /dev/null +++ b/.mock/definition/ats/linkedAccounts.yml @@ -0,0 +1,150 @@ +types: + LinkedAccountsListRequestCategory: + enum: + - accounting + - ats + - crm + - filestorage + - hris + - mktg + - ticketing + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ats/v1/linked-accounts + method: GET + auth: true + docs: List linked accounts for your organization. + source: + openapi: openapi/openapi.yml + request: + name: LinkedAccountsListRequest + query-parameters: + category: + type: optional + docs: >- + Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, + `mktg`, `ticketing` + + + * `hris` - hris + + * `ats` - ats + + * `accounting` - accounting + + * `ticketing` - ticketing + + * `crm` - crm + + * `mktg` - mktg + + * `filestorage` - filestorage + cursor: + type: optional + docs: The pagination cursor value. + end_user_email_address: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given email address. + end_user_organization_name: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given organization name. + end_user_origin_id: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given origin ID. + end_user_origin_ids: + type: optional + docs: >- + Comma-separated list of EndUser origin IDs, making it possible to + specify multiple EndUsers at once. + id: + type: optional + validation: + format: uuid + ids: + type: optional + docs: >- + Comma-separated list of LinkedAccount IDs, making it possible to + specify multiple LinkedAccounts at once. + include_duplicates: + type: optional + docs: >- + If `true`, will include complete production duplicates of the + account specified by the `id` query parameter in the response. + `id` must be for a complete production linked account. + integration_name: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given integration name. + is_test_account: + type: optional + docs: >- + If included, will only include test linked accounts. If not + included, will only include non-test linked accounts. + page_size: + type: optional + docs: Number of results to return per page. + status: + type: optional + docs: >- + Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, + `RELINK_NEEDED` + response: + docs: '' + type: root.PaginatedAccountDetailsAndActionsList + status-code: 200 + examples: + - response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: e59b1821-f85c-4e28-a6b3-1804156f3563 + category: hris + status: COMPLETE + status_detail: Invalid login credentials + end_user_origin_id: 3ac95cde-6c7f-4eef-afec-be710b42308d + end_user_organization_name: Foo Bar, LLC + end_user_email_address: hradmin@foobar.dev + subdomain: foobar + webhook_listener_url: >- + https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 + is_duplicate: true + integration: + name: name + categories: + - hris + color: color + slug: slug + passthrough_available: true + available_model_operations: + - model_name: Candidate + available_operations: + - FETCH + - CREATE + required_post_parameters: + - remote_user_id + supported_fields: + - first_name + - last_name + - company + - title + account_type: PRODUCTION + completed_at: '2024-08-26T20:11:19Z' + integration_specific_fields: + integration_specific_field: Varies by platform + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ats/offers.yml b/.mock/definition/ats/offers.yml new file mode 100644 index 0000000..cb2591c --- /dev/null +++ b/.mock/definition/ats/offers.yml @@ -0,0 +1,201 @@ +types: + OffersListRequestExpand: + enum: + - application + - value: application,creator + name: ApplicationCreator + - creator + source: + openapi: openapi/openapi.yml + OffersRetrieveRequestExpand: + enum: + - application + - value: application,creator + name: ApplicationCreator + - creator + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ats/v1/offers + method: GET + auth: true + docs: Returns a list of `Offer` objects. + source: + openapi: openapi/openapi.yml + request: + name: OffersListRequest + query-parameters: + application_id: + type: optional + docs: If provided, will only return offers for this application. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + creator_id: + type: optional + docs: If provided, will only return offers created by this user. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + remote_id: + type: optional + docs: The API provider's ID for the given object. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: root.PaginatedOfferList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: dd85625c-6a59-446f-a317-6de64d83bae7 + remote_id: '9876' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + application: application + creator: creator + remote_created_at: '2021-10-15T00:00:00Z' + closed_at: '2021-10-16T00:00:00Z' + sent_at: '2021-10-15T00:00:00Z' + start_date: '2021-11-15T00:00:00Z' + status: DRAFT + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /offers + data: + - Varies by platform + retrieve: + path: /ats/v1/offers/{id} + method: GET + auth: true + docs: Returns an `Offer` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: OffersRetrieveRequest + query-parameters: + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: root.Offer + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: dd85625c-6a59-446f-a317-6de64d83bae7 + remote_id: '9876' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + application: application + creator: creator + remote_created_at: '2021-10-15T00:00:00Z' + closed_at: '2021-10-16T00:00:00Z' + sent_at: '2021-10-15T00:00:00Z' + start_date: '2021-11-15T00:00:00Z' + status: DRAFT + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /offers + data: + - Varies by platform + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ats/offices.yml b/.mock/definition/ats/offices.yml new file mode 100644 index 0000000..080386b --- /dev/null +++ b/.mock/definition/ats/offices.yml @@ -0,0 +1,138 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ats/v1/offices + method: GET + auth: true + docs: Returns a list of `Office` objects. + source: + openapi: openapi/openapi.yml + request: + name: OfficesListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: root.PaginatedOfficeList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 9871b4a9-f5d2-4f3b-a66b-dfedbed42c46 + remote_id: '876556788' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: SF Office + location: Embarcadero Center 2 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /locations + data: + - Varies by platform + retrieve: + path: /ats/v1/offices/{id} + method: GET + auth: true + docs: Returns an `Office` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: OfficesRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.Office + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 9871b4a9-f5d2-4f3b-a66b-dfedbed42c46 + remote_id: '876556788' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: SF Office + location: Embarcadero Center 2 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /locations + data: + - Varies by platform + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ats/passthrough.yml b/.mock/definition/ats/passthrough.yml new file mode 100644 index 0000000..7141a6b --- /dev/null +++ b/.mock/definition/ats/passthrough.yml @@ -0,0 +1,40 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /ats/v1/passthrough + method: POST + auth: true + docs: Pull data from an endpoint not currently supported by Merge. + source: + openapi: openapi/openapi.yml + request: + body: root.DataPassthroughRequest + content-type: application/json + response: + docs: '' + type: root.RemoteResponse + status-code: 200 + examples: + - headers: {} + request: + method: GET + path: /scooters + response: + body: + method: GET + path: /scooters + status: 200 + response: + key: value + response_headers: + X-Page-Token: value + response_type: JSON + headers: + EXTRA-HEADER: value + Authorization: + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ats/regenerateKey.yml b/.mock/definition/ats/regenerateKey.yml new file mode 100644 index 0000000..1ea4149 --- /dev/null +++ b/.mock/definition/ats/regenerateKey.yml @@ -0,0 +1,36 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /ats/v1/regenerate-key + method: POST + auth: true + docs: Exchange remote keys. + source: + openapi: openapi/openapi.yml + request: + name: RemoteKeyForRegenerationRequest + body: + properties: + name: + type: string + docs: The name of the remote key + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: root.RemoteKey + status-code: 200 + examples: + - request: + name: Remote Deployment Key 1 + response: + body: + name: Remote Deployment Key 1 + key: hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ats/rejectReasons.yml b/.mock/definition/ats/rejectReasons.yml new file mode 100644 index 0000000..1552c46 --- /dev/null +++ b/.mock/definition/ats/rejectReasons.yml @@ -0,0 +1,136 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ats/v1/reject-reasons + method: GET + auth: true + docs: Returns a list of `RejectReason` objects. + source: + openapi: openapi/openapi.yml + request: + name: RejectReasonsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: root.PaginatedRejectReasonList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 8be99a4a-f8d4-4339-bf1e-30eac970e217 + remote_id: '876556788' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Not passionate enough about APIs. + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /rejection-reasons + data: + - Varies by platform + retrieve: + path: /ats/v1/reject-reasons/{id} + method: GET + auth: true + docs: Returns a `RejectReason` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: RejectReasonsRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.RejectReason + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 8be99a4a-f8d4-4339-bf1e-30eac970e217 + remote_id: '876556788' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Not passionate enough about APIs. + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /rejection-reasons + data: + - Varies by platform + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ats/scopes.yml b/.mock/definition/ats/scopes.yml new file mode 100644 index 0000000..422d3fa --- /dev/null +++ b/.mock/definition/ats/scopes.yml @@ -0,0 +1,160 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + default_scopes_retrieve: + path: /ats/v1/default-scopes + method: GET + auth: true + docs: >- + 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/5950052-common-model-and-field-scopes). + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.CommonModelScopeApi + status-code: 200 + examples: + - response: + body: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - created_at + - custom_fields + - date_of_birth + - first_name + - gender + - remote_created_at + - remote_data + disabled_fields: + - company + - employments + - groups + - home_location + - manager + - work_location + linked_account_scopes_retrieve: + path: /ats/v1/linked-account-scopes + method: GET + auth: true + docs: >- + Get all available permissions for Merge Common Models and fields for a + single Linked Account. [Learn + more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.CommonModelScopeApi + status-code: 200 + examples: + - headers: {} + response: + body: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - created_at + - custom_fields + - date_of_birth + - first_name + - gender + - remote_created_at + - remote_data + disabled_fields: + - company + - employments + - groups + - home_location + - manager + - work_location + linked_account_scopes_create: + path: /ats/v1/linked-account-scopes + method: POST + auth: true + docs: >- + 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/5950052-common-model-and-field-scopes) + source: + openapi: openapi/openapi.yml + request: + name: LinkedAccountCommonModelScopeDeserializerRequest + body: + properties: + common_models: + docs: The common models you want to update the scopes for + type: list + content-type: application/json + response: + docs: '' + type: root.CommonModelScopeApi + status-code: 200 + examples: + - headers: {} + request: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - home_location + disabled_fields: + - work_location + - model_name: Benefit + model_permissions: + WRITE: + is_enabled: false + response: + body: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - created_at + - custom_fields + - date_of_birth + - first_name + - gender + - remote_created_at + - remote_data + disabled_fields: + - company + - employments + - groups + - home_location + - manager + - work_location + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ats/scorecards.yml b/.mock/definition/ats/scorecards.yml new file mode 100644 index 0000000..6f83e85 --- /dev/null +++ b/.mock/definition/ats/scorecards.yml @@ -0,0 +1,216 @@ +types: + ScorecardsListRequestExpand: + enum: + - application + - value: application,interview + name: ApplicationInterview + - value: application,interview,interviewer + name: ApplicationInterviewInterviewer + - value: application,interviewer + name: ApplicationInterviewer + - interview + - value: interview,interviewer + name: InterviewInterviewer + - interviewer + source: + openapi: openapi/openapi.yml + ScorecardsRetrieveRequestExpand: + enum: + - application + - value: application,interview + name: ApplicationInterview + - value: application,interview,interviewer + name: ApplicationInterviewInterviewer + - value: application,interviewer + name: ApplicationInterviewer + - interview + - value: interview,interviewer + name: InterviewInterviewer + - interviewer + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ats/v1/scorecards + method: GET + auth: true + docs: Returns a list of `Scorecard` objects. + source: + openapi: openapi/openapi.yml + request: + name: ScorecardsListRequest + query-parameters: + application_id: + type: optional + docs: If provided, will only return scorecards for this application. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + interview_id: + type: optional + docs: If provided, will only return scorecards for this interview. + interviewer_id: + type: optional + docs: If provided, will only return scorecards for this interviewer. + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + remote_id: + type: optional + docs: The API provider's ID for the given object. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: root.PaginatedScorecardList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 3eab2f17-eeb1-450d-97f0-029d8be1e06f + remote_id: '22234' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + application: application + interview: interview + interviewer: interviewer + remote_created_at: '2021-10-15T00:00:00Z' + submitted_at: '2021-10-15T00:00:00Z' + overall_recommendation: DEFINITELY_NO + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /ratings + data: + - Varies by platform + retrieve: + path: /ats/v1/scorecards/{id} + method: GET + auth: true + docs: Returns a `Scorecard` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: ScorecardsRetrieveRequest + query-parameters: + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: root.Scorecard + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 3eab2f17-eeb1-450d-97f0-029d8be1e06f + remote_id: '22234' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + application: application + interview: interview + interviewer: interviewer + remote_created_at: '2021-10-15T00:00:00Z' + submitted_at: '2021-10-15T00:00:00Z' + overall_recommendation: DEFINITELY_NO + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /ratings + data: + - Varies by platform + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ats/syncStatus.yml b/.mock/definition/ats/syncStatus.yml new file mode 100644 index 0000000..99b9bd5 --- /dev/null +++ b/.mock/definition/ats/syncStatus.yml @@ -0,0 +1,55 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ats/v1/sync-status + method: GET + auth: true + docs: >- + Get sync status for the current sync and the most recently finished + sync. `last_sync_start` represents the most recent time any sync began. + `last_sync_finished` represents the most recent time any sync completed. + These timestamps may correspond to different sync instances which may + result in a sync start time being later than a separate sync completed + time. To ensure you are retrieving the latest available data reference + the `last_sync_finished` timestamp where `last_sync_result` is `DONE`. + Possible values for `status` and `last_sync_result` are `DISABLED`, + `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more + about sync status in our [Help + Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). + source: + openapi: openapi/openapi.yml + request: + name: SyncStatusListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: root.PaginatedSyncStatusList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - model_name: Candidate + model_id: ats.Candidate + last_sync_start: '2021-03-30T19:44:18Z' + next_sync_start: '2021-03-30T20:44:18Z' + last_sync_result: SYNCING + last_sync_finished: '2021-03-30T19:55:18Z' + status: SYNCING + is_initial_sync: true + selective_sync_configurations_usage: IN_NEXT_SYNC + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ats/tags.yml b/.mock/definition/ats/tags.yml new file mode 100644 index 0000000..f6007d9 --- /dev/null +++ b/.mock/definition/ats/tags.yml @@ -0,0 +1,88 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ats/v1/tags + method: GET + auth: true + docs: Returns a list of `Tag` objects. + source: + openapi: openapi/openapi.yml + request: + name: TagsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: root.PaginatedTagList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - remote_id: '4567' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: High-Priority + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /tags + data: + - Varies by platform + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ats/users.yml b/.mock/definition/ats/users.yml new file mode 100644 index 0000000..3bd2db1 --- /dev/null +++ b/.mock/definition/ats/users.yml @@ -0,0 +1,173 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ats/v1/users + method: GET + auth: true + docs: Returns a list of `RemoteUser` objects. + source: + openapi: openapi/openapi.yml + request: + name: UsersListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + email: + type: optional + docs: >- + If provided, will only return remote users with the given email + address + validation: + format: email + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + remote_id: + type: optional + docs: The API provider's ID for the given object. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: root.PaginatedRemoteUserList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: b82302de-852e-4e60-b050-edf9da3b7c02 + remote_id: '344321' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + first_name: Shensi + last_name: Ding + email: hello@merge.dev + disabled: true + remote_created_at: '2020-11-10T00:00:00Z' + access_role: SUPER_ADMIN + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /users + data: + - Varies by platform + retrieve: + path: /ats/v1/users/{id} + method: GET + auth: true + docs: Returns a `RemoteUser` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: UsersRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: root.RemoteUser + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: b82302de-852e-4e60-b050-edf9da3b7c02 + remote_id: '344321' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + first_name: Shensi + last_name: Ding + email: hello@merge.dev + disabled: true + remote_created_at: '2020-11-10T00:00:00Z' + access_role: SUPER_ADMIN + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /users + data: + - Varies by platform + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ats/webhookReceivers.yml b/.mock/definition/ats/webhookReceivers.yml new file mode 100644 index 0000000..91d2ae6 --- /dev/null +++ b/.mock/definition/ats/webhookReceivers.yml @@ -0,0 +1,61 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ats/v1/webhook-receivers + method: GET + auth: true + docs: Returns a list of `WebhookReceiver` objects. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: list + status-code: 200 + examples: + - headers: {} + response: + body: + - event: event + is_active: true + key: key + create: + path: /ats/v1/webhook-receivers + method: POST + auth: true + docs: Creates a `WebhookReceiver` object with the given values. + source: + openapi: openapi/openapi.yml + request: + name: WebhookReceiverRequest + body: + properties: + event: + type: string + validation: + minLength: 1 + is_active: boolean + key: + type: optional + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: root.WebhookReceiver + status-code: 201 + examples: + - headers: {} + request: + event: event + is_active: true + response: + body: + event: event + is_active: true + key: key + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/crm/__package__.yml b/.mock/definition/crm/__package__.yml new file mode 100644 index 0000000..4146a38 --- /dev/null +++ b/.mock/definition/crm/__package__.yml @@ -0,0 +1,4807 @@ +types: + AccountOwner: + discriminated: false + docs: The account's owner. + union: + - type: string + validation: + format: uuid + - User + source: + openapi: openapi/openapi.yml + inline: true + Account: + docs: |- + # The Account Object + ### Description + The `Account` object is used to represent a company in a CRM system. + ### Usage Example + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + owner: + type: optional + docs: The account's owner. + name: + type: optional + docs: The account's name. + description: + type: optional + docs: The account's description. + industry: + type: optional + docs: The account's industry. + website: + type: optional + docs: The account's website. + validation: + format: uri + maxLength: 2000 + number_of_employees: + type: optional + docs: The account's number of employees. + validation: + min: -2147483648 + max: 2147483647 + addresses: optional> + phone_numbers: + type: optional> + access: read-only + last_activity_at: + type: optional + docs: >- + The last date (either most recent or furthest in the future) of when + an activity occurs in an account. + remote_updated_at: + type: optional + docs: >- + When the CRM system account data was last modified by a user with a + login. + remote_created_at: + type: optional + docs: When the third party's account was created. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + remote_fields: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + AccountDetails: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + integration: + type: optional + access: read-only + integration_slug: + type: optional + access: read-only + category: optional + end_user_origin_id: + type: optional + access: read-only + end_user_organization_name: + type: optional + access: read-only + end_user_email_address: + type: optional + validation: + format: email + access: read-only + status: + type: optional + access: read-only + webhook_listener_url: + type: optional + validation: + format: uri + access: read-only + is_duplicate: + type: optional + docs: >- + 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. + access: read-only + account_type: + type: optional + access: read-only + completed_at: + type: optional + docs: The time at which account completes the linking flow. + source: + openapi: openapi/openapi.yml + AccountDetailsAndActions: + docs: >- + # The LinkedAccount Object + + ### Description + + The `LinkedAccount` object is used to represent an end user's link with a + specific integration. + + + ### Usage Example + + View a list of your organization's `LinkedAccount` objects. + properties: + id: string + category: optional + status: AccountDetailsAndActionsStatusEnum + status_detail: optional + end_user_origin_id: optional + end_user_organization_name: string + end_user_email_address: string + subdomain: + type: optional + docs: The tenant or domain the customer has provided access to. + webhook_listener_url: string + is_duplicate: + type: optional + docs: >- + 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. + integration: optional + account_type: string + completed_at: datetime + source: + openapi: openapi/openapi.yml + AccountDetailsAndActionsIntegration: + properties: + name: string + categories: list + image: optional + square_image: optional + color: string + slug: string + passthrough_available: boolean + available_model_operations: optional> + source: + openapi: openapi/openapi.yml + AccountDetailsAndActionsStatusEnum: + enum: + - COMPLETE + - INCOMPLETE + - RELINK_NEEDED + - IDLE + docs: |- + * `COMPLETE` - COMPLETE + * `INCOMPLETE` - INCOMPLETE + * `RELINK_NEEDED` - RELINK_NEEDED + * `IDLE` - IDLE + source: + openapi: openapi/openapi.yml + AccountIntegration: + properties: + name: + type: string + docs: Company name. + abbreviated_name: + type: optional + docs: >- + Optional. This shortened name appears in places with limited space, + usually in conjunction with the platform's logo (e.g., Merge Link + menu).

Example: Workforce Now (in lieu of ADP Workforce + Now), SuccessFactors (in lieu of SAP SuccessFactors) + categories: + type: optional> + docs: >- + Category or categories this integration belongs to. Multiple + categories should be comma separated, i.e. [ats, hris]. + access: read-only + image: + type: optional + docs: Company logo in rectangular shape. + validation: + format: uri + square_image: + type: optional + docs: Company logo in square shape. + validation: + format: uri + color: + type: optional + docs: >- + The color of this integration used for buttons and text throughout the + app and landing pages. Choose a darker, saturated color. + validation: + pattern: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ + maxLength: 18 + slug: + type: optional + access: read-only + api_endpoints_to_documentation_urls: + type: optional> + docs: >- + Mapping of API endpoints to documentation urls for support. Example: + {'GET': [['/common-model-scopes', + 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', + 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], + 'POST': []} + webhook_setup_guide_url: + type: optional + docs: >- + Setup guide URL for third party webhook creation. Exposed in Merge + Docs. + category_beta_status: + type: optional> + docs: Category or categories this integration is in beta status for. + access: read-only + source: + openapi: openapi/openapi.yml + AccountRequestOwner: + discriminated: false + docs: The account's owner. + union: + - type: string + validation: + format: uuid + - User + source: + openapi: openapi/openapi.yml + inline: true + AccountRequest: + docs: |- + # The Account Object + ### Description + The `Account` object is used to represent a company in a CRM system. + ### Usage Example + TODO + properties: + owner: + type: optional + docs: The account's owner. + name: + type: optional + docs: The account's name. + description: + type: optional + docs: The account's description. + industry: + type: optional + docs: The account's industry. + website: + type: optional + docs: The account's website. + validation: + format: uri + maxLength: 2000 + number_of_employees: + type: optional + docs: The account's number of employees. + validation: + min: -2147483648 + max: 2147483647 + addresses: optional> + last_activity_at: + type: optional + docs: >- + The last date (either most recent or furthest in the future) of when + an activity occurs in an account. + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + remote_fields: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + AccountToken: + properties: + account_token: string + integration: AccountIntegration + id: string + source: + openapi: openapi/openapi.yml + ActivityTypeEnum: + enum: + - CALL + - MEETING + - EMAIL + docs: |- + * `CALL` - CALL + * `MEETING` - MEETING + * `EMAIL` - EMAIL + source: + openapi: openapi/openapi.yml + Address: + docs: |- + # The Address Object + ### Description + The `Address` object is used to represent an entity's address. + ### Usage Example + TODO + properties: + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + street_1: + type: optional + docs: Line 1 of the address's street. + street_2: + type: optional + docs: Line 2 of the address's street. + city: + type: optional + docs: The address's city. + state: + type: optional + docs: The address's state. + postal_code: + type: optional + docs: The address's postal code. + country: + type: optional + docs: |- + The address's country. + + * `AF` - Afghanistan + * `AX` - Åland Islands + * `AL` - Albania + * `DZ` - Algeria + * `AS` - American Samoa + * `AD` - Andorra + * `AO` - Angola + * `AI` - Anguilla + * `AQ` - Antarctica + * `AG` - Antigua and Barbuda + * `AR` - Argentina + * `AM` - Armenia + * `AW` - Aruba + * `AU` - Australia + * `AT` - Austria + * `AZ` - Azerbaijan + * `BS` - Bahamas + * `BH` - Bahrain + * `BD` - Bangladesh + * `BB` - Barbados + * `BY` - Belarus + * `BE` - Belgium + * `BZ` - Belize + * `BJ` - Benin + * `BM` - Bermuda + * `BT` - Bhutan + * `BO` - Bolivia + * `BQ` - Bonaire, Sint Eustatius and Saba + * `BA` - Bosnia and Herzegovina + * `BW` - Botswana + * `BV` - Bouvet Island + * `BR` - Brazil + * `IO` - British Indian Ocean Territory + * `BN` - Brunei + * `BG` - Bulgaria + * `BF` - Burkina Faso + * `BI` - Burundi + * `CV` - Cabo Verde + * `KH` - Cambodia + * `CM` - Cameroon + * `CA` - Canada + * `KY` - Cayman Islands + * `CF` - Central African Republic + * `TD` - Chad + * `CL` - Chile + * `CN` - China + * `CX` - Christmas Island + * `CC` - Cocos (Keeling) Islands + * `CO` - Colombia + * `KM` - Comoros + * `CG` - Congo + * `CD` - Congo (the Democratic Republic of the) + * `CK` - Cook Islands + * `CR` - Costa Rica + * `CI` - Côte d'Ivoire + * `HR` - Croatia + * `CU` - Cuba + * `CW` - Curaçao + * `CY` - Cyprus + * `CZ` - Czechia + * `DK` - Denmark + * `DJ` - Djibouti + * `DM` - Dominica + * `DO` - Dominican Republic + * `EC` - Ecuador + * `EG` - Egypt + * `SV` - El Salvador + * `GQ` - Equatorial Guinea + * `ER` - Eritrea + * `EE` - Estonia + * `SZ` - Eswatini + * `ET` - Ethiopia + * `FK` - Falkland Islands (Malvinas) + * `FO` - Faroe Islands + * `FJ` - Fiji + * `FI` - Finland + * `FR` - France + * `GF` - French Guiana + * `PF` - French Polynesia + * `TF` - French Southern Territories + * `GA` - Gabon + * `GM` - Gambia + * `GE` - Georgia + * `DE` - Germany + * `GH` - Ghana + * `GI` - Gibraltar + * `GR` - Greece + * `GL` - Greenland + * `GD` - Grenada + * `GP` - Guadeloupe + * `GU` - Guam + * `GT` - Guatemala + * `GG` - Guernsey + * `GN` - Guinea + * `GW` - Guinea-Bissau + * `GY` - Guyana + * `HT` - Haiti + * `HM` - Heard Island and McDonald Islands + * `VA` - Holy See + * `HN` - Honduras + * `HK` - Hong Kong + * `HU` - Hungary + * `IS` - Iceland + * `IN` - India + * `ID` - Indonesia + * `IR` - Iran + * `IQ` - Iraq + * `IE` - Ireland + * `IM` - Isle of Man + * `IL` - Israel + * `IT` - Italy + * `JM` - Jamaica + * `JP` - Japan + * `JE` - Jersey + * `JO` - Jordan + * `KZ` - Kazakhstan + * `KE` - Kenya + * `KI` - Kiribati + * `KW` - Kuwait + * `KG` - Kyrgyzstan + * `LA` - Laos + * `LV` - Latvia + * `LB` - Lebanon + * `LS` - Lesotho + * `LR` - Liberia + * `LY` - Libya + * `LI` - Liechtenstein + * `LT` - Lithuania + * `LU` - Luxembourg + * `MO` - Macao + * `MG` - Madagascar + * `MW` - Malawi + * `MY` - Malaysia + * `MV` - Maldives + * `ML` - Mali + * `MT` - Malta + * `MH` - Marshall Islands + * `MQ` - Martinique + * `MR` - Mauritania + * `MU` - Mauritius + * `YT` - Mayotte + * `MX` - Mexico + * `FM` - Micronesia (Federated States of) + * `MD` - Moldova + * `MC` - Monaco + * `MN` - Mongolia + * `ME` - Montenegro + * `MS` - Montserrat + * `MA` - Morocco + * `MZ` - Mozambique + * `MM` - Myanmar + * `NA` - Namibia + * `NR` - Nauru + * `NP` - Nepal + * `NL` - Netherlands + * `NC` - New Caledonia + * `NZ` - New Zealand + * `NI` - Nicaragua + * `NE` - Niger + * `NG` - Nigeria + * `NU` - Niue + * `NF` - Norfolk Island + * `KP` - North Korea + * `MK` - North Macedonia + * `MP` - Northern Mariana Islands + * `NO` - Norway + * `OM` - Oman + * `PK` - Pakistan + * `PW` - Palau + * `PS` - Palestine, State of + * `PA` - Panama + * `PG` - Papua New Guinea + * `PY` - Paraguay + * `PE` - Peru + * `PH` - Philippines + * `PN` - Pitcairn + * `PL` - Poland + * `PT` - Portugal + * `PR` - Puerto Rico + * `QA` - Qatar + * `RE` - Réunion + * `RO` - Romania + * `RU` - Russia + * `RW` - Rwanda + * `BL` - Saint Barthélemy + * `SH` - Saint Helena, Ascension and Tristan da Cunha + * `KN` - Saint Kitts and Nevis + * `LC` - Saint Lucia + * `MF` - Saint Martin (French part) + * `PM` - Saint Pierre and Miquelon + * `VC` - Saint Vincent and the Grenadines + * `WS` - Samoa + * `SM` - San Marino + * `ST` - Sao Tome and Principe + * `SA` - Saudi Arabia + * `SN` - Senegal + * `RS` - Serbia + * `SC` - Seychelles + * `SL` - Sierra Leone + * `SG` - Singapore + * `SX` - Sint Maarten (Dutch part) + * `SK` - Slovakia + * `SI` - Slovenia + * `SB` - Solomon Islands + * `SO` - Somalia + * `ZA` - South Africa + * `GS` - South Georgia and the South Sandwich Islands + * `KR` - South Korea + * `SS` - South Sudan + * `ES` - Spain + * `LK` - Sri Lanka + * `SD` - Sudan + * `SR` - Suriname + * `SJ` - Svalbard and Jan Mayen + * `SE` - Sweden + * `CH` - Switzerland + * `SY` - Syria + * `TW` - Taiwan + * `TJ` - Tajikistan + * `TZ` - Tanzania + * `TH` - Thailand + * `TL` - Timor-Leste + * `TG` - Togo + * `TK` - Tokelau + * `TO` - Tonga + * `TT` - Trinidad and Tobago + * `TN` - Tunisia + * `TR` - Turkey + * `TM` - Turkmenistan + * `TC` - Turks and Caicos Islands + * `TV` - Tuvalu + * `UG` - Uganda + * `UA` - Ukraine + * `AE` - United Arab Emirates + * `GB` - United Kingdom + * `UM` - United States Minor Outlying Islands + * `US` - United States of America + * `UY` - Uruguay + * `UZ` - Uzbekistan + * `VU` - Vanuatu + * `VE` - Venezuela + * `VN` - Vietnam + * `VG` - Virgin Islands (British) + * `VI` - Virgin Islands (U.S.) + * `WF` - Wallis and Futuna + * `EH` - Western Sahara + * `YE` - Yemen + * `ZM` - Zambia + * `ZW` - Zimbabwe + address_type: + type: optional + docs: |- + The address type. + + * `BILLING` - BILLING + * `SHIPPING` - SHIPPING + source: + openapi: openapi/openapi.yml + AddressRequest: + docs: |- + # The Address Object + ### Description + The `Address` object is used to represent an entity's address. + ### Usage Example + TODO + properties: + street_1: + type: optional + docs: Line 1 of the address's street. + street_2: + type: optional + docs: Line 2 of the address's street. + city: + type: optional + docs: The address's city. + state: + type: optional + docs: The address's state. + postal_code: + type: optional + docs: The address's postal code. + country: + type: optional + docs: |- + The address's country. + + * `AF` - Afghanistan + * `AX` - Åland Islands + * `AL` - Albania + * `DZ` - Algeria + * `AS` - American Samoa + * `AD` - Andorra + * `AO` - Angola + * `AI` - Anguilla + * `AQ` - Antarctica + * `AG` - Antigua and Barbuda + * `AR` - Argentina + * `AM` - Armenia + * `AW` - Aruba + * `AU` - Australia + * `AT` - Austria + * `AZ` - Azerbaijan + * `BS` - Bahamas + * `BH` - Bahrain + * `BD` - Bangladesh + * `BB` - Barbados + * `BY` - Belarus + * `BE` - Belgium + * `BZ` - Belize + * `BJ` - Benin + * `BM` - Bermuda + * `BT` - Bhutan + * `BO` - Bolivia + * `BQ` - Bonaire, Sint Eustatius and Saba + * `BA` - Bosnia and Herzegovina + * `BW` - Botswana + * `BV` - Bouvet Island + * `BR` - Brazil + * `IO` - British Indian Ocean Territory + * `BN` - Brunei + * `BG` - Bulgaria + * `BF` - Burkina Faso + * `BI` - Burundi + * `CV` - Cabo Verde + * `KH` - Cambodia + * `CM` - Cameroon + * `CA` - Canada + * `KY` - Cayman Islands + * `CF` - Central African Republic + * `TD` - Chad + * `CL` - Chile + * `CN` - China + * `CX` - Christmas Island + * `CC` - Cocos (Keeling) Islands + * `CO` - Colombia + * `KM` - Comoros + * `CG` - Congo + * `CD` - Congo (the Democratic Republic of the) + * `CK` - Cook Islands + * `CR` - Costa Rica + * `CI` - Côte d'Ivoire + * `HR` - Croatia + * `CU` - Cuba + * `CW` - Curaçao + * `CY` - Cyprus + * `CZ` - Czechia + * `DK` - Denmark + * `DJ` - Djibouti + * `DM` - Dominica + * `DO` - Dominican Republic + * `EC` - Ecuador + * `EG` - Egypt + * `SV` - El Salvador + * `GQ` - Equatorial Guinea + * `ER` - Eritrea + * `EE` - Estonia + * `SZ` - Eswatini + * `ET` - Ethiopia + * `FK` - Falkland Islands (Malvinas) + * `FO` - Faroe Islands + * `FJ` - Fiji + * `FI` - Finland + * `FR` - France + * `GF` - French Guiana + * `PF` - French Polynesia + * `TF` - French Southern Territories + * `GA` - Gabon + * `GM` - Gambia + * `GE` - Georgia + * `DE` - Germany + * `GH` - Ghana + * `GI` - Gibraltar + * `GR` - Greece + * `GL` - Greenland + * `GD` - Grenada + * `GP` - Guadeloupe + * `GU` - Guam + * `GT` - Guatemala + * `GG` - Guernsey + * `GN` - Guinea + * `GW` - Guinea-Bissau + * `GY` - Guyana + * `HT` - Haiti + * `HM` - Heard Island and McDonald Islands + * `VA` - Holy See + * `HN` - Honduras + * `HK` - Hong Kong + * `HU` - Hungary + * `IS` - Iceland + * `IN` - India + * `ID` - Indonesia + * `IR` - Iran + * `IQ` - Iraq + * `IE` - Ireland + * `IM` - Isle of Man + * `IL` - Israel + * `IT` - Italy + * `JM` - Jamaica + * `JP` - Japan + * `JE` - Jersey + * `JO` - Jordan + * `KZ` - Kazakhstan + * `KE` - Kenya + * `KI` - Kiribati + * `KW` - Kuwait + * `KG` - Kyrgyzstan + * `LA` - Laos + * `LV` - Latvia + * `LB` - Lebanon + * `LS` - Lesotho + * `LR` - Liberia + * `LY` - Libya + * `LI` - Liechtenstein + * `LT` - Lithuania + * `LU` - Luxembourg + * `MO` - Macao + * `MG` - Madagascar + * `MW` - Malawi + * `MY` - Malaysia + * `MV` - Maldives + * `ML` - Mali + * `MT` - Malta + * `MH` - Marshall Islands + * `MQ` - Martinique + * `MR` - Mauritania + * `MU` - Mauritius + * `YT` - Mayotte + * `MX` - Mexico + * `FM` - Micronesia (Federated States of) + * `MD` - Moldova + * `MC` - Monaco + * `MN` - Mongolia + * `ME` - Montenegro + * `MS` - Montserrat + * `MA` - Morocco + * `MZ` - Mozambique + * `MM` - Myanmar + * `NA` - Namibia + * `NR` - Nauru + * `NP` - Nepal + * `NL` - Netherlands + * `NC` - New Caledonia + * `NZ` - New Zealand + * `NI` - Nicaragua + * `NE` - Niger + * `NG` - Nigeria + * `NU` - Niue + * `NF` - Norfolk Island + * `KP` - North Korea + * `MK` - North Macedonia + * `MP` - Northern Mariana Islands + * `NO` - Norway + * `OM` - Oman + * `PK` - Pakistan + * `PW` - Palau + * `PS` - Palestine, State of + * `PA` - Panama + * `PG` - Papua New Guinea + * `PY` - Paraguay + * `PE` - Peru + * `PH` - Philippines + * `PN` - Pitcairn + * `PL` - Poland + * `PT` - Portugal + * `PR` - Puerto Rico + * `QA` - Qatar + * `RE` - Réunion + * `RO` - Romania + * `RU` - Russia + * `RW` - Rwanda + * `BL` - Saint Barthélemy + * `SH` - Saint Helena, Ascension and Tristan da Cunha + * `KN` - Saint Kitts and Nevis + * `LC` - Saint Lucia + * `MF` - Saint Martin (French part) + * `PM` - Saint Pierre and Miquelon + * `VC` - Saint Vincent and the Grenadines + * `WS` - Samoa + * `SM` - San Marino + * `ST` - Sao Tome and Principe + * `SA` - Saudi Arabia + * `SN` - Senegal + * `RS` - Serbia + * `SC` - Seychelles + * `SL` - Sierra Leone + * `SG` - Singapore + * `SX` - Sint Maarten (Dutch part) + * `SK` - Slovakia + * `SI` - Slovenia + * `SB` - Solomon Islands + * `SO` - Somalia + * `ZA` - South Africa + * `GS` - South Georgia and the South Sandwich Islands + * `KR` - South Korea + * `SS` - South Sudan + * `ES` - Spain + * `LK` - Sri Lanka + * `SD` - Sudan + * `SR` - Suriname + * `SJ` - Svalbard and Jan Mayen + * `SE` - Sweden + * `CH` - Switzerland + * `SY` - Syria + * `TW` - Taiwan + * `TJ` - Tajikistan + * `TZ` - Tanzania + * `TH` - Thailand + * `TL` - Timor-Leste + * `TG` - Togo + * `TK` - Tokelau + * `TO` - Tonga + * `TT` - Trinidad and Tobago + * `TN` - Tunisia + * `TR` - Turkey + * `TM` - Turkmenistan + * `TC` - Turks and Caicos Islands + * `TV` - Tuvalu + * `UG` - Uganda + * `UA` - Ukraine + * `AE` - United Arab Emirates + * `GB` - United Kingdom + * `UM` - United States Minor Outlying Islands + * `US` - United States of America + * `UY` - Uruguay + * `UZ` - Uzbekistan + * `VU` - Vanuatu + * `VE` - Venezuela + * `VN` - Vietnam + * `VG` - Virgin Islands (British) + * `VI` - Virgin Islands (U.S.) + * `WF` - Wallis and Futuna + * `EH` - Western Sahara + * `YE` - Yemen + * `ZM` - Zambia + * `ZW` - Zimbabwe + address_type: + type: optional + docs: |- + The address type. + + * `BILLING` - BILLING + * `SHIPPING` - SHIPPING + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + AddressTypeEnum: + enum: + - BILLING + - SHIPPING + docs: |- + * `BILLING` - BILLING + * `SHIPPING` - SHIPPING + source: + openapi: openapi/openapi.yml + AdvancedMetadata: + properties: + id: + type: string + validation: + format: uuid + display_name: optional + description: optional + is_required: optional + is_custom: optional + field_choices: optional> + source: + openapi: openapi/openapi.yml + AssociationAssociationType: + discriminated: false + docs: The association type the association belongs to. + union: + - type: string + validation: + format: uuid + - AssociationType + source: + openapi: openapi/openapi.yml + inline: true + Association: + docs: |- + # The Association Object + ### Description + The `Association` record refers to an instance of an Association Type. + ### Usage Example + TODO + properties: + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + source_object: + type: optional + validation: + format: uuid + access: read-only + target_object: + type: optional + validation: + format: uuid + access: read-only + association_type: + type: optional + docs: The association type the association belongs to. + source: + openapi: openapi/openapi.yml + AssociationSubType: + properties: + id: + type: optional + access: read-only + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + origin_type: + type: optional + access: read-only + source: + openapi: openapi/openapi.yml + AssociationType: + docs: >- + # The AssociationType Object + + ### Description + + The `Association Type` object represents the relationship between two + objects. + + ### Usage Example + + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + source_object_class: + type: optional> + docs: >- + The class of the source object (Custom Object or Common Model) for the + association type. + access: read-only + target_object_classes: + type: optional> + access: read-only + remote_key_name: optional + display_name: optional + cardinality: optional + is_required: optional + source: + openapi: openapi/openapi.yml + AssociationTypeRequestRequest: + properties: + source_object_class: ObjectClassDescriptionRequest + target_object_classes: list + remote_key_name: + type: string + validation: + minLength: 1 + display_name: + type: optional + validation: + minLength: 1 + cardinality: optional + is_required: + type: optional + default: false + source: + openapi: openapi/openapi.yml + AsyncPassthroughReciept: + properties: + async_passthrough_receipt_id: + type: string + validation: + format: uuid + source: + openapi: openapi/openapi.yml + AuditLogEvent: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + user_name: + type: optional + docs: The User's full name at the time of this Event occurring. + validation: + maxLength: 200 + user_email: + type: optional + docs: The User's email at the time of this Event occurring. + validation: + format: email + maxLength: 254 + role: + type: RoleEnum + docs: >- + Designates the role of the user (or SYSTEM/API if action not taken by + a user) at the time of this Event occurring. + + + * `ADMIN` - ADMIN + + * `DEVELOPER` - DEVELOPER + + * `MEMBER` - MEMBER + + * `API` - API + + * `SYSTEM` - SYSTEM + + * `MERGE_TEAM` - MERGE_TEAM + ip_address: + type: string + validation: + maxLength: 45 + event_type: + type: EventTypeEnum + docs: >- + Designates the type of event that occurred. + + + * `CREATED_REMOTE_PRODUCTION_API_KEY` - + CREATED_REMOTE_PRODUCTION_API_KEY + + * `DELETED_REMOTE_PRODUCTION_API_KEY` - + DELETED_REMOTE_PRODUCTION_API_KEY + + * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + + * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + + * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + + * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + + * `INVITED_USER` - INVITED_USER + + * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + + * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + + * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + + * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - + DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + + * `CREATED_DESTINATION` - CREATED_DESTINATION + + * `DELETED_DESTINATION` - DELETED_DESTINATION + + * `CHANGED_DESTINATION` - CHANGED_DESTINATION + + * `CHANGED_SCOPES` - CHANGED_SCOPES + + * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + + * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + + * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + + * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + + * `ENABLED_CATEGORY` - ENABLED_CATEGORY + + * `DISABLED_CATEGORY` - DISABLED_CATEGORY + + * `CHANGED_PASSWORD` - CHANGED_PASSWORD + + * `RESET_PASSWORD` - RESET_PASSWORD + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - + CREATED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - + CREATED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - + CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + + * `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 + + * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + + * `MUTED_ISSUE` - MUTED_ISSUE + + * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + + * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + + * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + + * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + + * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + event_description: string + created_at: + type: optional + access: read-only + source: + openapi: openapi/openapi.yml + AvailableActions: + docs: >- + # The AvailableActions Object + + ### Description + + The `Activity` object is used to see all available model/operation + combinations for an integration. + + + ### Usage Example + + Fetch all the actions available for the `Zenefits` integration. + properties: + integration: AccountIntegration + passthrough_available: boolean + available_model_operations: optional> + source: + openapi: openapi/openapi.yml + CrmAccountResponse: + properties: + model: Account + warnings: list + errors: list + logs: optional> + source: + openapi: openapi/openapi.yml + CrmAssociationTypeResponse: + properties: + model: AssociationType + warnings: list + errors: list + logs: optional> + source: + openapi: openapi/openapi.yml + CrmContactResponse: + properties: + model: Contact + warnings: list + errors: list + logs: optional> + source: + openapi: openapi/openapi.yml + CrmCustomObjectResponse: + properties: + model: CustomObject + warnings: list + errors: list + logs: optional> + source: + openapi: openapi/openapi.yml + CardinalityEnum: + enum: + - ONE_TO_ONE + - MANY_TO_ONE + - MANY_TO_MANY + - ONE_TO_MANY + docs: |- + * `ONE_TO_ONE` - ONE_TO_ONE + * `MANY_TO_ONE` - MANY_TO_ONE + * `MANY_TO_MANY` - MANY_TO_MANY + * `ONE_TO_MANY` - ONE_TO_MANY + source: + openapi: openapi/openapi.yml + CategoriesEnum: + enum: + - hris + - ats + - accounting + - ticketing + - crm + - mktg + - filestorage + docs: |- + * `hris` - hris + * `ats` - ats + * `accounting` - accounting + * `ticketing` - ticketing + * `crm` - crm + * `mktg` - mktg + * `filestorage` - filestorage + source: + openapi: openapi/openapi.yml + CategoryEnum: + enum: + - hris + - ats + - accounting + - ticketing + - crm + - mktg + - filestorage + docs: |- + * `hris` - hris + * `ats` - ats + * `accounting` - accounting + * `ticketing` - ticketing + * `crm` - crm + * `mktg` - mktg + * `filestorage` - filestorage + source: + openapi: openapi/openapi.yml + CommonModelScopeApi: + properties: + common_models: + docs: The common models you want to update the scopes for + type: list + source: + openapi: openapi/openapi.yml + CommonModelScopesBodyRequest: + properties: + model_id: + type: string + validation: + minLength: 1 + enabled_actions: list + disabled_fields: list + source: + openapi: openapi/openapi.yml + ContactAccount: + discriminated: false + docs: The contact's account. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: openapi/openapi.yml + inline: true + ContactOwner: + discriminated: false + docs: The contact's owner. + union: + - type: string + validation: + format: uuid + - User + source: + openapi: openapi/openapi.yml + inline: true + Contact: + docs: >- + # The Contact Object + + ### Description + + The `Contact` object is used to represent an existing point of contact at + a company in a CRM system. + + ### Usage Example + + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + first_name: + type: optional + docs: The contact's first name. + last_name: + type: optional + docs: The contact's last name. + account: + type: optional + docs: The contact's account. + owner: + type: optional + docs: The contact's owner. + addresses: optional> + email_addresses: optional> + phone_numbers: optional> + last_activity_at: + type: optional + docs: When the contact's last activity occurred. + remote_created_at: + type: optional + docs: When the third party's contact was created. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + remote_fields: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + ContactRequestAccount: + discriminated: false + docs: The contact's account. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: openapi/openapi.yml + inline: true + ContactRequestOwner: + discriminated: false + docs: The contact's owner. + union: + - type: string + validation: + format: uuid + - User + source: + openapi: openapi/openapi.yml + inline: true + ContactRequest: + docs: >- + # The Contact Object + + ### Description + + The `Contact` object is used to represent an existing point of contact at + a company in a CRM system. + + ### Usage Example + + TODO + properties: + first_name: + type: optional + docs: The contact's first name. + last_name: + type: optional + docs: The contact's last name. + account: + type: optional + docs: The contact's account. + owner: + type: optional + docs: The contact's owner. + addresses: optional> + email_addresses: optional> + phone_numbers: optional> + last_activity_at: + type: optional + docs: When the contact's last activity occurred. + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + remote_fields: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + CountryEnum: + enum: + - AF + - AX + - AL + - DZ + - AS + - AD + - AO + - AI + - AQ + - AG + - AR + - AM + - AW + - AU + - AT + - AZ + - BS + - BH + - BD + - BB + - BY + - BE + - BZ + - BJ + - BM + - BT + - BO + - BQ + - BA + - BW + - BV + - BR + - IO + - BN + - BG + - BF + - BI + - CV + - KH + - CM + - CA + - KY + - CF + - TD + - CL + - CN + - CX + - CC + - CO + - KM + - CG + - CD + - CK + - CR + - CI + - HR + - CU + - CW + - CY + - CZ + - DK + - DJ + - DM + - DO + - EC + - EG + - SV + - GQ + - ER + - EE + - SZ + - ET + - FK + - FO + - FJ + - FI + - FR + - GF + - PF + - TF + - GA + - GM + - GE + - DE + - GH + - GI + - GR + - GL + - GD + - GP + - GU + - GT + - GG + - GN + - GW + - GY + - HT + - HM + - VA + - HN + - HK + - HU + - IS + - IN + - ID + - IR + - IQ + - IE + - IM + - IL + - IT + - JM + - JP + - JE + - JO + - KZ + - KE + - KI + - KW + - KG + - LA + - LV + - LB + - LS + - LR + - LY + - LI + - LT + - LU + - MO + - MG + - MW + - MY + - MV + - ML + - MT + - MH + - MQ + - MR + - MU + - YT + - MX + - FM + - MD + - MC + - MN + - ME + - MS + - MA + - MZ + - MM + - NA + - NR + - NP + - NL + - NC + - NZ + - NI + - NE + - NG + - NU + - NF + - KP + - MK + - MP + - 'NO' + - OM + - PK + - PW + - PS + - PA + - PG + - PY + - PE + - PH + - PN + - PL + - PT + - PR + - QA + - RE + - RO + - RU + - RW + - BL + - SH + - KN + - LC + - MF + - PM + - VC + - WS + - SM + - ST + - SA + - SN + - RS + - SC + - SL + - SG + - SX + - SK + - SI + - SB + - SO + - ZA + - GS + - KR + - SS + - ES + - LK + - SD + - SR + - SJ + - SE + - CH + - SY + - TW + - TJ + - TZ + - TH + - TL + - TG + - TK + - TO + - TT + - TN + - TR + - TM + - TC + - TV + - UG + - UA + - AE + - GB + - UM + - US + - UY + - UZ + - VU + - VE + - VN + - VG + - VI + - WF + - EH + - YE + - ZM + - ZW + docs: |- + * `AF` - Afghanistan + * `AX` - Åland Islands + * `AL` - Albania + * `DZ` - Algeria + * `AS` - American Samoa + * `AD` - Andorra + * `AO` - Angola + * `AI` - Anguilla + * `AQ` - Antarctica + * `AG` - Antigua and Barbuda + * `AR` - Argentina + * `AM` - Armenia + * `AW` - Aruba + * `AU` - Australia + * `AT` - Austria + * `AZ` - Azerbaijan + * `BS` - Bahamas + * `BH` - Bahrain + * `BD` - Bangladesh + * `BB` - Barbados + * `BY` - Belarus + * `BE` - Belgium + * `BZ` - Belize + * `BJ` - Benin + * `BM` - Bermuda + * `BT` - Bhutan + * `BO` - Bolivia + * `BQ` - Bonaire, Sint Eustatius and Saba + * `BA` - Bosnia and Herzegovina + * `BW` - Botswana + * `BV` - Bouvet Island + * `BR` - Brazil + * `IO` - British Indian Ocean Territory + * `BN` - Brunei + * `BG` - Bulgaria + * `BF` - Burkina Faso + * `BI` - Burundi + * `CV` - Cabo Verde + * `KH` - Cambodia + * `CM` - Cameroon + * `CA` - Canada + * `KY` - Cayman Islands + * `CF` - Central African Republic + * `TD` - Chad + * `CL` - Chile + * `CN` - China + * `CX` - Christmas Island + * `CC` - Cocos (Keeling) Islands + * `CO` - Colombia + * `KM` - Comoros + * `CG` - Congo + * `CD` - Congo (the Democratic Republic of the) + * `CK` - Cook Islands + * `CR` - Costa Rica + * `CI` - Côte d'Ivoire + * `HR` - Croatia + * `CU` - Cuba + * `CW` - Curaçao + * `CY` - Cyprus + * `CZ` - Czechia + * `DK` - Denmark + * `DJ` - Djibouti + * `DM` - Dominica + * `DO` - Dominican Republic + * `EC` - Ecuador + * `EG` - Egypt + * `SV` - El Salvador + * `GQ` - Equatorial Guinea + * `ER` - Eritrea + * `EE` - Estonia + * `SZ` - Eswatini + * `ET` - Ethiopia + * `FK` - Falkland Islands (Malvinas) + * `FO` - Faroe Islands + * `FJ` - Fiji + * `FI` - Finland + * `FR` - France + * `GF` - French Guiana + * `PF` - French Polynesia + * `TF` - French Southern Territories + * `GA` - Gabon + * `GM` - Gambia + * `GE` - Georgia + * `DE` - Germany + * `GH` - Ghana + * `GI` - Gibraltar + * `GR` - Greece + * `GL` - Greenland + * `GD` - Grenada + * `GP` - Guadeloupe + * `GU` - Guam + * `GT` - Guatemala + * `GG` - Guernsey + * `GN` - Guinea + * `GW` - Guinea-Bissau + * `GY` - Guyana + * `HT` - Haiti + * `HM` - Heard Island and McDonald Islands + * `VA` - Holy See + * `HN` - Honduras + * `HK` - Hong Kong + * `HU` - Hungary + * `IS` - Iceland + * `IN` - India + * `ID` - Indonesia + * `IR` - Iran + * `IQ` - Iraq + * `IE` - Ireland + * `IM` - Isle of Man + * `IL` - Israel + * `IT` - Italy + * `JM` - Jamaica + * `JP` - Japan + * `JE` - Jersey + * `JO` - Jordan + * `KZ` - Kazakhstan + * `KE` - Kenya + * `KI` - Kiribati + * `KW` - Kuwait + * `KG` - Kyrgyzstan + * `LA` - Laos + * `LV` - Latvia + * `LB` - Lebanon + * `LS` - Lesotho + * `LR` - Liberia + * `LY` - Libya + * `LI` - Liechtenstein + * `LT` - Lithuania + * `LU` - Luxembourg + * `MO` - Macao + * `MG` - Madagascar + * `MW` - Malawi + * `MY` - Malaysia + * `MV` - Maldives + * `ML` - Mali + * `MT` - Malta + * `MH` - Marshall Islands + * `MQ` - Martinique + * `MR` - Mauritania + * `MU` - Mauritius + * `YT` - Mayotte + * `MX` - Mexico + * `FM` - Micronesia (Federated States of) + * `MD` - Moldova + * `MC` - Monaco + * `MN` - Mongolia + * `ME` - Montenegro + * `MS` - Montserrat + * `MA` - Morocco + * `MZ` - Mozambique + * `MM` - Myanmar + * `NA` - Namibia + * `NR` - Nauru + * `NP` - Nepal + * `NL` - Netherlands + * `NC` - New Caledonia + * `NZ` - New Zealand + * `NI` - Nicaragua + * `NE` - Niger + * `NG` - Nigeria + * `NU` - Niue + * `NF` - Norfolk Island + * `KP` - North Korea + * `MK` - North Macedonia + * `MP` - Northern Mariana Islands + * `NO` - Norway + * `OM` - Oman + * `PK` - Pakistan + * `PW` - Palau + * `PS` - Palestine, State of + * `PA` - Panama + * `PG` - Papua New Guinea + * `PY` - Paraguay + * `PE` - Peru + * `PH` - Philippines + * `PN` - Pitcairn + * `PL` - Poland + * `PT` - Portugal + * `PR` - Puerto Rico + * `QA` - Qatar + * `RE` - Réunion + * `RO` - Romania + * `RU` - Russia + * `RW` - Rwanda + * `BL` - Saint Barthélemy + * `SH` - Saint Helena, Ascension and Tristan da Cunha + * `KN` - Saint Kitts and Nevis + * `LC` - Saint Lucia + * `MF` - Saint Martin (French part) + * `PM` - Saint Pierre and Miquelon + * `VC` - Saint Vincent and the Grenadines + * `WS` - Samoa + * `SM` - San Marino + * `ST` - Sao Tome and Principe + * `SA` - Saudi Arabia + * `SN` - Senegal + * `RS` - Serbia + * `SC` - Seychelles + * `SL` - Sierra Leone + * `SG` - Singapore + * `SX` - Sint Maarten (Dutch part) + * `SK` - Slovakia + * `SI` - Slovenia + * `SB` - Solomon Islands + * `SO` - Somalia + * `ZA` - South Africa + * `GS` - South Georgia and the South Sandwich Islands + * `KR` - South Korea + * `SS` - South Sudan + * `ES` - Spain + * `LK` - Sri Lanka + * `SD` - Sudan + * `SR` - Suriname + * `SJ` - Svalbard and Jan Mayen + * `SE` - Sweden + * `CH` - Switzerland + * `SY` - Syria + * `TW` - Taiwan + * `TJ` - Tajikistan + * `TZ` - Tanzania + * `TH` - Thailand + * `TL` - Timor-Leste + * `TG` - Togo + * `TK` - Tokelau + * `TO` - Tonga + * `TT` - Trinidad and Tobago + * `TN` - Tunisia + * `TR` - Turkey + * `TM` - Turkmenistan + * `TC` - Turks and Caicos Islands + * `TV` - Tuvalu + * `UG` - Uganda + * `UA` - Ukraine + * `AE` - United Arab Emirates + * `GB` - United Kingdom + * `UM` - United States Minor Outlying Islands + * `US` - United States of America + * `UY` - Uruguay + * `UZ` - Uzbekistan + * `VU` - Vanuatu + * `VE` - Venezuela + * `VN` - Vietnam + * `VG` - Virgin Islands (British) + * `VI` - Virgin Islands (U.S.) + * `WF` - Wallis and Futuna + * `EH` - Western Sahara + * `YE` - Yemen + * `ZM` - Zambia + * `ZW` - Zimbabwe + source: + openapi: openapi/openapi.yml + CustomObject: + docs: |- + # The CustomObject Object + ### Description + The `Custom Object` record refers to an instance of a Custom Object Class. + ### Usage Example + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + object_class: + type: optional + docs: The custom object class the custom object record belongs to. + validation: + format: uuid + fields: + type: optional> + docs: The fields and values contained within the custom object record. + access: read-only + remote_fields: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + CustomObjectClass: + docs: >- + # The Custom Object Class Object + + ### Description + + The `Custom Object Class` object is used to represent a Custom Object + Schema in the remote system. + + ### Usage Example + + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + access: read-only + modified_at: + type: optional + access: read-only + name: + type: optional + docs: The custom object class's name. + description: + type: optional + docs: The custom object class's description. + labels: + type: optional>> + docs: The custom object class's singular and plural labels. + access: read-only + fields: + type: optional> + access: read-only + association_types: + type: optional>> + docs: >- + The types of associations with other models that the custom object + class can have. + access: read-only + source: + openapi: openapi/openapi.yml + CustomObjectRequest: + properties: + fields: map + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + DataPassthroughRequest: + docs: >- + # The DataPassthrough Object + + ### Description + + The `DataPassthrough` object is used to send information to an + otherwise-unsupported third-party endpoint. + + + ### Usage Example + + Create a `DataPassthrough` to get team hierarchies from your Rippling + integration. + properties: + method: MethodEnum + path: + type: string + docs: The path of the request in the third party's platform. + validation: + minLength: 1 + base_url_override: + type: optional + docs: An optional override of the third party's base url for the request. + validation: + minLength: 1 + data: + type: optional + docs: >- + The data with the request. You must include a `request_format` + parameter matching the data's format + validation: + minLength: 1 + multipart_form_data: + type: optional> + docs: >- + Pass an array of `MultipartFormField` objects in here instead of using + the `data` param if `request_format` is set to `MULTIPART`. + headers: + type: optional> + docs: >- + The headers to use for the request (Merge will handle the account's + authorization headers). `Content-Type` header is required for + passthrough. Choose content type corresponding to expected format of + receiving server. + request_format: optional + normalize_response: + type: optional + docs: >- + Optional. If true, the response will always be an object of the form + `{"type": T, "value": ...}` where `T` will be one of `string, boolean, + number, null, array, object`. + source: + openapi: openapi/openapi.yml + DebugModeLog: + properties: + log_id: string + dashboard_view: string + log_summary: DebugModelLogSummary + source: + openapi: openapi/openapi.yml + DebugModelLogSummary: + properties: + url: string + method: string + status_code: integer + source: + openapi: openapi/openapi.yml + DirectionEnum: + enum: + - INBOUND + - OUTBOUND + docs: |- + * `INBOUND` - INBOUND + * `OUTBOUND` - OUTBOUND + source: + openapi: openapi/openapi.yml + EmailAddress: + docs: |- + # The EmailAddress Object + ### Description + The `EmailAddress` object is used to represent an entity's email address. + ### Usage Example + Fetch from the `GET Contact` endpoint and view their email addresses. + properties: + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + email_address: + type: optional + docs: The email address. + email_address_type: + type: optional + docs: The email address's type. + source: + openapi: openapi/openapi.yml + EmailAddressRequest: + docs: |- + # The EmailAddress Object + ### Description + The `EmailAddress` object is used to represent an entity's email address. + ### Usage Example + Fetch from the `GET Contact` endpoint and view their email addresses. + properties: + email_address: + type: optional + docs: The email address. + email_address_type: + type: optional + docs: The email address's type. + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + EnabledActionsEnum: + enum: + - READ + - WRITE + docs: |- + * `READ` - READ + * `WRITE` - WRITE + source: + openapi: openapi/openapi.yml + EncodingEnum: + enum: + - RAW + - BASE64 + - GZIP_BASE64 + docs: |- + * `RAW` - RAW + * `BASE64` - BASE64 + * `GZIP_BASE64` - GZIP_BASE64 + source: + openapi: openapi/openapi.yml + EngagementOwner: + discriminated: false + docs: The engagement's owner. + union: + - type: string + validation: + format: uuid + - User + source: + openapi: openapi/openapi.yml + inline: true + EngagementEngagementType: + discriminated: false + docs: The engagement type of the engagement. + union: + - type: string + validation: + format: uuid + - EngagementType + source: + openapi: openapi/openapi.yml + inline: true + EngagementAccount: + discriminated: false + docs: The account of the engagement. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: openapi/openapi.yml + inline: true + EngagementContactsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: openapi/openapi.yml + inline: true + Engagement: + docs: >- + # The Engagement Object + + ### Description + + The `Engagement` object is used to represent an interaction noted in a CRM + system. + + ### Usage Example + + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + owner: + type: optional + docs: The engagement's owner. + content: + type: optional + docs: The engagement's content. + subject: + type: optional + docs: The engagement's subject. + direction: + type: optional + docs: |- + The engagement's direction. + + * `INBOUND` - INBOUND + * `OUTBOUND` - OUTBOUND + engagement_type: + type: optional + docs: The engagement type of the engagement. + start_time: + type: optional + docs: The time at which the engagement started. + end_time: + type: optional + docs: The time at which the engagement ended. + account: + type: optional + docs: The account of the engagement. + contacts: optional>> + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + remote_fields: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + EngagementRequestOwner: + discriminated: false + docs: The engagement's owner. + union: + - type: string + validation: + format: uuid + - User + source: + openapi: openapi/openapi.yml + inline: true + EngagementRequestEngagementType: + discriminated: false + docs: The engagement type of the engagement. + union: + - type: string + validation: + format: uuid + - EngagementType + source: + openapi: openapi/openapi.yml + inline: true + EngagementRequestAccount: + discriminated: false + docs: The account of the engagement. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: openapi/openapi.yml + inline: true + EngagementRequestContactsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: openapi/openapi.yml + inline: true + EngagementRequest: + docs: >- + # The Engagement Object + + ### Description + + The `Engagement` object is used to represent an interaction noted in a CRM + system. + + ### Usage Example + + TODO + properties: + owner: + type: optional + docs: The engagement's owner. + content: + type: optional + docs: The engagement's content. + subject: + type: optional + docs: The engagement's subject. + direction: + type: optional + docs: |- + The engagement's direction. + + * `INBOUND` - INBOUND + * `OUTBOUND` - OUTBOUND + engagement_type: + type: optional + docs: The engagement type of the engagement. + start_time: + type: optional + docs: The time at which the engagement started. + end_time: + type: optional + docs: The time at which the engagement ended. + account: + type: optional + docs: The account of the engagement. + contacts: optional>> + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + remote_fields: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + EngagementResponse: + properties: + model: Engagement + warnings: list + errors: list + logs: optional> + source: + openapi: openapi/openapi.yml + EngagementType: + docs: >- + # The Engagement Type Object + + ### Description + + The `Engagement Type` object is used to represent an interaction activity. + A given `Engagement` typically has an `Engagement Type` object represented + in the engagement_type field. + + ### Usage Example + + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + activity_type: + type: optional + docs: |- + The engagement type's activity type. + + * `CALL` - CALL + * `MEETING` - MEETING + * `EMAIL` - EMAIL + name: + type: optional + docs: The engagement type's name. + remote_fields: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + ErrorValidationProblem: + properties: + source: optional + title: string + detail: string + problem_type: string + source: + openapi: openapi/openapi.yml + EventTypeEnum: + enum: + - CREATED_REMOTE_PRODUCTION_API_KEY + - DELETED_REMOTE_PRODUCTION_API_KEY + - CREATED_TEST_API_KEY + - DELETED_TEST_API_KEY + - REGENERATED_PRODUCTION_API_KEY + - REGENERATED_WEBHOOK_SIGNATURE + - INVITED_USER + - TWO_FACTOR_AUTH_ENABLED + - TWO_FACTOR_AUTH_DISABLED + - DELETED_LINKED_ACCOUNT + - DELETED_ALL_COMMON_MODELS_FOR_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 + - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + - FORCED_LINKED_ACCOUNT_RESYNC + - MUTED_ISSUE + - GENERATED_MAGIC_LINK + - ENABLED_MERGE_WEBHOOK + - DISABLED_MERGE_WEBHOOK + - MERGE_WEBHOOK_TARGET_CHANGED + - END_USER_CREDENTIALS_ACCESSED + docs: >- + * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + + * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + + * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + + * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + + * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + + * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + + * `INVITED_USER` - INVITED_USER + + * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + + * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + + * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + + * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - + DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + + * `CREATED_DESTINATION` - CREATED_DESTINATION + + * `DELETED_DESTINATION` - DELETED_DESTINATION + + * `CHANGED_DESTINATION` - CHANGED_DESTINATION + + * `CHANGED_SCOPES` - CHANGED_SCOPES + + * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + + * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + + * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + + * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + + * `ENABLED_CATEGORY` - ENABLED_CATEGORY + + * `DISABLED_CATEGORY` - DISABLED_CATEGORY + + * `CHANGED_PASSWORD` - CHANGED_PASSWORD + + * `RESET_PASSWORD` - RESET_PASSWORD + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - + CREATED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - + CREATED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - + CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + + * `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 + + * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + + * `MUTED_ISSUE` - MUTED_ISSUE + + * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + + * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + + * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + + * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + + * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + source: + openapi: openapi/openapi.yml + ExternalTargetFieldApi: + properties: + name: + type: optional + access: read-only + description: + type: optional + access: read-only + is_mapped: + type: optional + access: read-only + source: + openapi: openapi/openapi.yml + ExternalTargetFieldApiResponse: + properties: + Account: optional> + Contact: optional> + Lead: optional> + Note: optional> + Opportunity: optional> + Stage: optional> + User: optional> + Task: optional> + Engagement: optional> + source: + openapi: openapi/openapi.yml + FieldFormatEnum: + enum: + - string + - number + - date + - datetime + - bool + - list + docs: |- + * `string` - string + * `number` - number + * `date` - date + * `datetime` - datetime + * `bool` - bool + * `list` - list + source: + openapi: openapi/openapi.yml + FieldMappingApiInstanceTargetField: + properties: + name: string + description: string + is_organization_wide: boolean + source: + openapi: openapi/openapi.yml + inline: true + FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo: + properties: + method: optional + url_path: optional + field_traversal_path: optional> + source: + openapi: openapi/openapi.yml + inline: true + FieldMappingApiInstanceRemoteField: + properties: + remote_key_name: optional + schema: optional> + remote_endpoint_info: FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo + source: + openapi: openapi/openapi.yml + inline: true + FieldMappingApiInstance: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + is_integration_wide: + type: optional + access: read-only + target_field: + type: optional + access: read-only + remote_field: + type: optional + access: read-only + source: + openapi: openapi/openapi.yml + FieldMappingApiInstanceResponse: + properties: + Account: optional> + Contact: optional> + Lead: optional> + Note: optional> + Opportunity: optional> + Stage: optional> + User: optional> + Task: optional> + Engagement: optional> + source: + openapi: openapi/openapi.yml + FieldMappingInstanceResponse: + properties: + model: FieldMappingApiInstance + warnings: list + errors: list + logs: optional> + source: + openapi: openapi/openapi.yml + FieldPermissionDeserializer: + properties: + enabled_fields: optional> + disabled_fields: optional> + source: + openapi: openapi/openapi.yml + FieldPermissionDeserializerRequest: + properties: + enabled_fields: optional> + disabled_fields: optional> + source: + openapi: openapi/openapi.yml + FieldTypeEnum: + enum: + - string + - number + - date + - datetime + - bool + - list + docs: |- + * `string` - string + * `number` - number + * `date` - date + * `datetime` - datetime + * `bool` - bool + * `list` - list + source: + openapi: openapi/openapi.yml + IgnoreCommonModelRequest: + properties: + reason: ReasonEnum + message: + type: optional + validation: + minLength: 1 + maxLength: 256 + source: + openapi: openapi/openapi.yml + IndividualCommonModelScopeDeserializer: + properties: + model_name: string + model_permissions: optional> + field_permissions: optional + source: + openapi: openapi/openapi.yml + IndividualCommonModelScopeDeserializerRequest: + properties: + model_name: + type: string + validation: + minLength: 1 + model_permissions: optional> + field_permissions: optional + source: + openapi: openapi/openapi.yml + Issue: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + status: + type: optional + docs: |- + Status of the issue. Options: ('ONGOING', 'RESOLVED') + + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + error_description: string + end_user: + type: optional> + access: read-only + first_incident_time: optional + last_incident_time: optional + is_muted: + type: optional + access: read-only + error_details: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + IssueStatusEnum: + enum: + - ONGOING + - RESOLVED + docs: |- + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + source: + openapi: openapi/openapi.yml + ItemFormatEnum: + enum: + - string + - number + - date + - datetime + - bool + - list + docs: |- + * `string` - uuid + * `number` - url + * `date` - email + * `datetime` - phone + * `bool` - currency + * `list` - decimal + source: + openapi: openapi/openapi.yml + ItemSchema: + properties: + item_type: optional + item_format: optional + item_choices: optional> + source: + openapi: openapi/openapi.yml + ItemTypeEnum: + enum: + - string + - number + - date + - datetime + - bool + - list + docs: |- + * `string` - string + * `number` - number + * `date` - date + * `datetime` - datetime + * `bool` - bool + * `list` - list + source: + openapi: openapi/openapi.yml + LanguageEnum: + enum: + - en + - de + docs: |- + * `en` - en + * `de` - de + source: + openapi: openapi/openapi.yml + LastSyncResultEnum: + enum: + - SYNCING + - DONE + - FAILED + - DISABLED + - PAUSED + - PARTIALLY_SYNCED + docs: |- + * `SYNCING` - SYNCING + * `DONE` - DONE + * `FAILED` - FAILED + * `DISABLED` - DISABLED + * `PAUSED` - PAUSED + * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED + source: + openapi: openapi/openapi.yml + LeadOwner: + discriminated: false + docs: The lead's owner. + union: + - type: string + validation: + format: uuid + - User + source: + openapi: openapi/openapi.yml + inline: true + LeadConvertedContact: + discriminated: false + docs: The contact of the converted lead. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: openapi/openapi.yml + inline: true + LeadConvertedAccount: + discriminated: false + docs: The account of the converted lead. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: openapi/openapi.yml + inline: true + Lead: + docs: >- + # The Lead Object + + ### Description + + The `Lead` object is used to represent an individual who is a potential + customer. + + ### Usage Example + + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + owner: + type: optional + docs: The lead's owner. + lead_source: + type: optional + docs: The lead's source. + title: + type: optional + docs: The lead's title. + company: + type: optional + docs: The lead's company. + first_name: + type: optional + docs: The lead's first name. + last_name: + type: optional + docs: The lead's last name. + addresses: + type: optional> + access: read-only + email_addresses: + type: optional> + access: read-only + phone_numbers: + type: optional> + access: read-only + remote_updated_at: + type: optional + docs: When the third party's lead was updated. + remote_created_at: + type: optional + docs: When the third party's lead was created. + converted_date: + type: optional + docs: When the lead was converted. + converted_contact: + type: optional + docs: The contact of the converted lead. + converted_account: + type: optional + docs: The account of the converted lead. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + remote_fields: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + LeadRequestOwner: + discriminated: false + docs: The lead's owner. + union: + - type: string + validation: + format: uuid + - User + source: + openapi: openapi/openapi.yml + inline: true + LeadRequestConvertedContact: + discriminated: false + docs: The contact of the converted lead. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: openapi/openapi.yml + inline: true + LeadRequestConvertedAccount: + discriminated: false + docs: The account of the converted lead. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: openapi/openapi.yml + inline: true + LeadRequest: + docs: >- + # The Lead Object + + ### Description + + The `Lead` object is used to represent an individual who is a potential + customer. + + ### Usage Example + + TODO + properties: + owner: + type: optional + docs: The lead's owner. + lead_source: + type: optional + docs: The lead's source. + title: + type: optional + docs: The lead's title. + company: + type: optional + docs: The lead's company. + first_name: + type: optional + docs: The lead's first name. + last_name: + type: optional + docs: The lead's last name. + addresses: optional> + email_addresses: optional> + phone_numbers: optional> + converted_date: + type: optional + docs: When the lead was converted. + converted_contact: + type: optional + docs: The contact of the converted lead. + converted_account: + type: optional + docs: The account of the converted lead. + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + remote_fields: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + LeadResponse: + properties: + model: Lead + warnings: list + errors: list + logs: optional> + source: + openapi: openapi/openapi.yml + LinkToken: + properties: + link_token: string + integration_name: optional + magic_link_url: optional + source: + openapi: openapi/openapi.yml + LinkedAccountStatus: + properties: + linked_account_status: string + can_make_request: boolean + source: + openapi: openapi/openapi.yml + MetaResponse: + properties: + request_schema: map + remote_field_classes: optional> + status: optional + has_conditional_params: boolean + has_required_linked_account_params: boolean + source: + openapi: openapi/openapi.yml + MethodEnum: + enum: + - GET + - OPTIONS + - HEAD + - POST + - PUT + - PATCH + - DELETE + docs: |- + * `GET` - GET + * `OPTIONS` - OPTIONS + * `HEAD` - HEAD + * `POST` - POST + * `PUT` - PUT + * `PATCH` - PATCH + * `DELETE` - DELETE + source: + openapi: openapi/openapi.yml + ModelOperation: + docs: >- + # The ModelOperation Object + + ### Description + + The `ModelOperation` object is used to represent the operations that are + currently supported for a given model. + + + ### Usage Example + + View what operations are supported for the `Candidate` endpoint. + properties: + model_name: string + available_operations: list + required_post_parameters: list + supported_fields: list + source: + openapi: openapi/openapi.yml + ModelPermissionDeserializer: + properties: + is_enabled: optional + source: + openapi: openapi/openapi.yml + ModelPermissionDeserializerRequest: + properties: + is_enabled: optional + source: + openapi: openapi/openapi.yml + MultipartFormFieldRequest: + docs: >- + # The MultipartFormField Object + + ### Description + + The `MultipartFormField` object is used to represent fields in an HTTP + request using `multipart/form-data`. + + + ### Usage Example + + Create a `MultipartFormField` to define a multipart form entry. + properties: + name: + type: string + docs: The name of the form field + validation: + minLength: 1 + data: + type: string + docs: The data for the form field. + validation: + minLength: 1 + encoding: + type: optional + docs: |- + The encoding of the value of `data`. Defaults to `RAW` if not defined. + + * `RAW` - RAW + * `BASE64` - BASE64 + * `GZIP_BASE64` - GZIP_BASE64 + file_name: + type: optional + docs: The file name of the form field, if the field is for a file. + validation: + minLength: 1 + content_type: + type: optional + docs: The MIME type of the file, if the field is for a file. + validation: + minLength: 1 + source: + openapi: openapi/openapi.yml + NoteOwner: + discriminated: false + docs: The note's owner. + union: + - type: string + validation: + format: uuid + - User + source: + openapi: openapi/openapi.yml + inline: true + NoteContact: + discriminated: false + docs: The note's contact. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: openapi/openapi.yml + inline: true + NoteAccount: + discriminated: false + docs: The note's account. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: openapi/openapi.yml + inline: true + NoteOpportunity: + discriminated: false + docs: The note's opportunity. + union: + - type: string + validation: + format: uuid + - Opportunity + source: + openapi: openapi/openapi.yml + inline: true + Note: + docs: |- + # The Note Object + ### Description + The `Note` object is used to represent a note on another object. + ### Usage Example + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + owner: + type: optional + docs: The note's owner. + content: + type: optional + docs: The note's content. + contact: + type: optional + docs: The note's contact. + account: + type: optional + docs: The note's account. + opportunity: + type: optional + docs: The note's opportunity. + remote_updated_at: + type: optional + docs: When the third party's lead was updated. + remote_created_at: + type: optional + docs: When the third party's lead was created. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + remote_fields: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + NoteRequestOwner: + discriminated: false + docs: The note's owner. + union: + - type: string + validation: + format: uuid + - User + source: + openapi: openapi/openapi.yml + inline: true + NoteRequestContact: + discriminated: false + docs: The note's contact. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: openapi/openapi.yml + inline: true + NoteRequestAccount: + discriminated: false + docs: The note's account. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: openapi/openapi.yml + inline: true + NoteRequestOpportunity: + discriminated: false + docs: The note's opportunity. + union: + - type: string + validation: + format: uuid + - Opportunity + source: + openapi: openapi/openapi.yml + inline: true + NoteRequest: + docs: |- + # The Note Object + ### Description + The `Note` object is used to represent a note on another object. + ### Usage Example + TODO + properties: + owner: + type: optional + docs: The note's owner. + content: + type: optional + docs: The note's content. + contact: + type: optional + docs: The note's contact. + account: + type: optional + docs: The note's account. + opportunity: + type: optional + docs: The note's opportunity. + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + remote_fields: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + NoteResponse: + properties: + model: Note + warnings: list + errors: list + logs: optional> + source: + openapi: openapi/openapi.yml + ObjectClassDescriptionRequest: + properties: + id: + type: string + validation: + minLength: 1 + origin_type: OriginTypeEnum + source: + openapi: openapi/openapi.yml + OpportunityOwner: + discriminated: false + docs: The opportunity's owner. + union: + - type: string + validation: + format: uuid + - User + source: + openapi: openapi/openapi.yml + inline: true + OpportunityAccount: + discriminated: false + docs: The account of the opportunity. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: openapi/openapi.yml + inline: true + OpportunityStage: + discriminated: false + docs: The stage of the opportunity. + union: + - type: string + validation: + format: uuid + - Stage + source: + openapi: openapi/openapi.yml + inline: true + Opportunity: + docs: >- + # The Opportunity Object + + ### Description + + The `Opportunity` object is used to represent a deal opportunity in a CRM + system. + + ### Usage Example + + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The opportunity's name. + description: + type: optional + docs: The opportunity's description. + amount: + type: optional + docs: The opportunity's amount. + validation: + min: -2147483648 + max: 2147483647 + owner: + type: optional + docs: The opportunity's owner. + account: + type: optional + docs: The account of the opportunity. + stage: + type: optional + docs: The stage of the opportunity. + status: + type: optional + docs: |- + The opportunity's status. + + * `OPEN` - OPEN + * `WON` - WON + * `LOST` - LOST + last_activity_at: + type: optional + docs: When the opportunity's last activity occurred. + close_date: + type: optional + docs: When the opportunity was closed. + remote_created_at: + type: optional + docs: When the third party's opportunity was created. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + remote_fields: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + OpportunityRequestOwner: + discriminated: false + docs: The opportunity's owner. + union: + - type: string + validation: + format: uuid + - User + source: + openapi: openapi/openapi.yml + inline: true + OpportunityRequestAccount: + discriminated: false + docs: The account of the opportunity. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: openapi/openapi.yml + inline: true + OpportunityRequestStage: + discriminated: false + docs: The stage of the opportunity. + union: + - type: string + validation: + format: uuid + - Stage + source: + openapi: openapi/openapi.yml + inline: true + OpportunityRequest: + docs: >- + # The Opportunity Object + + ### Description + + The `Opportunity` object is used to represent a deal opportunity in a CRM + system. + + ### Usage Example + + TODO + properties: + name: + type: optional + docs: The opportunity's name. + description: + type: optional + docs: The opportunity's description. + amount: + type: optional + docs: The opportunity's amount. + validation: + min: -2147483648 + max: 2147483647 + owner: + type: optional + docs: The opportunity's owner. + account: + type: optional + docs: The account of the opportunity. + stage: + type: optional + docs: The stage of the opportunity. + status: + type: optional + docs: |- + The opportunity's status. + + * `OPEN` - OPEN + * `WON` - WON + * `LOST` - LOST + last_activity_at: + type: optional + docs: When the opportunity's last activity occurred. + close_date: + type: optional + docs: When the opportunity was closed. + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + remote_fields: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + OpportunityResponse: + properties: + model: Opportunity + warnings: list + errors: list + logs: optional> + source: + openapi: openapi/openapi.yml + OpportunityStatusEnum: + enum: + - OPEN + - WON + - LOST + docs: |- + * `OPEN` - OPEN + * `WON` - WON + * `LOST` - LOST + source: + openapi: openapi/openapi.yml + OriginTypeEnum: + enum: + - CUSTOM_OBJECT + - COMMON_MODEL + - REMOTE_ONLY_MODEL + docs: |- + * `CUSTOM_OBJECT` - CUSTOM_OBJECT + * `COMMON_MODEL` - COMMON_MODEL + * `REMOTE_ONLY_MODEL` - REMOTE_ONLY_MODEL + source: + openapi: openapi/openapi.yml + PaginatedAccountDetailsAndActionsList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedAccountList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedAssociationList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedAssociationTypeList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedAuditLogEventList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedContactList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedCustomObjectClassList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedCustomObjectList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedEngagementList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedEngagementTypeList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedIssueList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedLeadList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedNoteList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedOpportunityList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedRemoteFieldClassList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedStageList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedSyncStatusList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedTaskList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedUserList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PatchedAccountRequest: + docs: |- + # The Account Object + ### Description + The `Account` object is used to represent a company in a CRM system. + ### Usage Example + TODO + properties: + owner: + type: optional + docs: The account's owner. + validation: + format: uuid + name: + type: optional + docs: The account's name. + description: + type: optional + docs: The account's description. + industry: + type: optional + docs: The account's industry. + website: + type: optional + docs: The account's website. + validation: + format: uri + maxLength: 2000 + number_of_employees: + type: optional + docs: The account's number of employees. + validation: + min: -2147483648 + max: 2147483647 + addresses: optional> + last_activity_at: + type: optional + docs: >- + The last date (either most recent or furthest in the future) of when + an activity occurs in an account. + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + remote_fields: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + PatchedContactRequestOwner: + discriminated: false + docs: The contact's owner. + union: + - type: string + validation: + format: uuid + - User + source: + openapi: openapi/openapi.yml + inline: true + PatchedContactRequest: + docs: >- + # The Contact Object + + ### Description + + The `Contact` object is used to represent an existing point of contact at + a company in a CRM system. + + ### Usage Example + + TODO + properties: + first_name: + type: optional + docs: The contact's first name. + last_name: + type: optional + docs: The contact's last name. + account: + type: optional + docs: The contact's account. + validation: + format: uuid + owner: + type: optional + docs: The contact's owner. + addresses: optional> + email_addresses: optional> + phone_numbers: optional> + last_activity_at: + type: optional + docs: When the contact's last activity occurred. + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + remote_fields: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + PatchedEngagementRequest: + docs: >- + # The Engagement Object + + ### Description + + The `Engagement` object is used to represent an interaction noted in a CRM + system. + + ### Usage Example + + TODO + properties: + owner: + type: optional + docs: The engagement's owner. + validation: + format: uuid + content: + type: optional + docs: The engagement's content. + subject: + type: optional + docs: The engagement's subject. + direction: + type: optional + docs: |- + The engagement's direction. + + * `INBOUND` - INBOUND + * `OUTBOUND` - OUTBOUND + engagement_type: + type: optional + docs: The engagement type of the engagement. + validation: + format: uuid + start_time: + type: optional + docs: The time at which the engagement started. + end_time: + type: optional + docs: The time at which the engagement ended. + account: + type: optional + docs: The account of the engagement. + validation: + format: uuid + contacts: optional>> + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + remote_fields: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + PatchedOpportunityRequest: + docs: >- + # The Opportunity Object + + ### Description + + The `Opportunity` object is used to represent a deal opportunity in a CRM + system. + + ### Usage Example + + TODO + properties: + name: + type: optional + docs: The opportunity's name. + description: + type: optional + docs: The opportunity's description. + amount: + type: optional + docs: The opportunity's amount. + validation: + min: -2147483648 + max: 2147483647 + owner: + type: optional + docs: The opportunity's owner. + validation: + format: uuid + account: + type: optional + docs: The account of the opportunity. + validation: + format: uuid + stage: + type: optional + docs: The stage of the opportunity. + validation: + format: uuid + status: + type: optional + docs: |- + The opportunity's status. + + * `OPEN` - OPEN + * `WON` - WON + * `LOST` - LOST + last_activity_at: + type: optional + docs: When the opportunity's last activity occurred. + close_date: + type: optional + docs: When the opportunity was closed. + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + remote_fields: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + PatchedTaskRequest: + docs: |- + # The Task Object + ### Description + The `Task` object is used to represent a task, such as a to-do item. + ### Usage Example + TODO + properties: + subject: + type: optional + docs: The task's subject. + content: + type: optional + docs: The task's content. + owner: + type: optional + docs: The task's owner. + validation: + format: uuid + account: + type: optional + docs: The task's account. + validation: + format: uuid + opportunity: + type: optional + docs: The task's opportunity. + validation: + format: uuid + completed_date: + type: optional + docs: When the task is completed. + due_date: + type: optional + docs: When the task is due. + status: + type: optional + docs: |- + The task's status. + + * `OPEN` - OPEN + * `CLOSED` - CLOSED + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + remote_fields: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + PhoneNumber: + docs: |- + # The PhoneNumber Object + ### Description + The `PhoneNumber` object is used to represent an entity's phone number. + ### Usage Example + Fetch from the `GET Contact` endpoint and view their phone numbers. + properties: + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + phone_number: + type: optional + docs: The phone number. + phone_number_type: + type: optional + docs: The phone number's type. + source: + openapi: openapi/openapi.yml + PhoneNumberRequest: + docs: |- + # The PhoneNumber Object + ### Description + The `PhoneNumber` object is used to represent an entity's phone number. + ### Usage Example + Fetch from the `GET Contact` endpoint and view their phone numbers. + properties: + phone_number: + type: optional + docs: The phone number. + phone_number_type: + type: optional + docs: The phone number's type. + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + ReasonEnum: + enum: + - GENERAL_CUSTOMER_REQUEST + - GDPR + - OTHER + docs: |- + * `GENERAL_CUSTOMER_REQUEST` - GENERAL_CUSTOMER_REQUEST + * `GDPR` - GDPR + * `OTHER` - OTHER + source: + openapi: openapi/openapi.yml + RemoteData: + docs: >- + # The RemoteData Object + + ### Description + + The `RemoteData` object is used to represent the full data pulled from the + third-party API for an object. + + + ### Usage Example + + TODO + properties: + path: + type: string + docs: The third-party API path that is being called. + data: + type: optional + access: read-only + source: + openapi: openapi/openapi.yml + RemoteEndpointInfo: + properties: + method: string + url_path: string + field_traversal_path: list + source: + openapi: openapi/openapi.yml + RemoteFieldRemoteFieldClass: + discriminated: false + union: + - string + - RemoteFieldClass + source: + openapi: openapi/openapi.yml + inline: true + RemoteField: + properties: + remote_field_class: RemoteFieldRemoteFieldClass + value: optional + source: + openapi: openapi/openapi.yml + RemoteFieldApiCoverage: + discriminated: false + union: + - integer + - double + source: + openapi: openapi/openapi.yml + inline: true + RemoteFieldApi: + properties: + schema: map + remote_key_name: string + remote_endpoint_info: RemoteEndpointInfo + example_values: optional> + advanced_metadata: optional + coverage: + type: optional + access: read-only + source: + openapi: openapi/openapi.yml + RemoteFieldApiResponse: + properties: + Account: optional> + Contact: optional> + Lead: optional> + Note: optional> + Opportunity: optional> + Stage: optional> + User: optional> + Task: optional> + Engagement: optional> + source: + openapi: openapi/openapi.yml + RemoteFieldClassFieldChoicesItem: + properties: + value: optional + display_name: optional + source: + openapi: openapi/openapi.yml + inline: true + RemoteFieldClass: + properties: + id: optional + display_name: optional + remote_key_name: optional + description: optional + is_custom: optional + is_required: optional + field_type: optional + field_format: optional + field_choices: optional> + item_schema: optional + source: + openapi: openapi/openapi.yml + RemoteFieldClassForCustomObjectClassFieldChoicesItem: + properties: + value: optional + display_name: optional + source: + openapi: openapi/openapi.yml + inline: true + RemoteFieldClassForCustomObjectClassItemSchema: + properties: + item_type: optional + item_format: optional + item_choices: optional>> + source: + openapi: openapi/openapi.yml + inline: true + RemoteFieldClassForCustomObjectClass: + properties: + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + display_name: optional + remote_key_name: optional + description: optional + is_required: optional + field_type: optional + field_format: optional + field_choices: + type: optional> + access: read-only + item_schema: + type: optional + access: read-only + source: + openapi: openapi/openapi.yml + RemoteFieldRequestRemoteFieldClass: + discriminated: false + union: + - type: string + validation: + format: uuid + - RemoteFieldClass + source: + openapi: openapi/openapi.yml + inline: true + RemoteFieldRequest: + properties: + remote_field_class: RemoteFieldRequestRemoteFieldClass + value: optional + source: + openapi: openapi/openapi.yml + RemoteKey: + docs: >- + # The RemoteKey Object + + ### Description + + The `RemoteKey` object is used to represent a request for a new remote + key. + + + ### Usage Example + + Post a `GenerateRemoteKey` to receive a new `RemoteKey`. + properties: + name: string + key: string + source: + openapi: openapi/openapi.yml + RemoteResponse: + docs: >- + # The RemoteResponse Object + + ### Description + + The `RemoteResponse` object is used to represent information returned from + a third-party endpoint. + + + ### Usage Example + + View the `RemoteResponse` returned from your `DataPassthrough`. + properties: + method: string + path: string + status: integer + response: unknown + response_headers: optional> + response_type: optional + headers: optional> + source: + openapi: openapi/openapi.yml + RequestFormatEnum: + enum: + - JSON + - XML + - MULTIPART + docs: |- + * `JSON` - JSON + * `XML` - XML + * `MULTIPART` - MULTIPART + source: + openapi: openapi/openapi.yml + ResponseTypeEnum: + enum: + - JSON + - BASE64_GZIP + docs: |- + * `JSON` - JSON + * `BASE64_GZIP` - BASE64_GZIP + source: + openapi: openapi/openapi.yml + RoleEnum: + enum: + - ADMIN + - DEVELOPER + - MEMBER + - API + - SYSTEM + - MERGE_TEAM + docs: |- + * `ADMIN` - ADMIN + * `DEVELOPER` - DEVELOPER + * `MEMBER` - MEMBER + * `API` - API + * `SYSTEM` - SYSTEM + * `MERGE_TEAM` - MERGE_TEAM + source: + openapi: openapi/openapi.yml + SelectiveSyncConfigurationsUsageEnum: + enum: + - IN_NEXT_SYNC + - IN_LAST_SYNC + docs: |- + * `IN_NEXT_SYNC` - IN_NEXT_SYNC + * `IN_LAST_SYNC` - IN_LAST_SYNC + source: + openapi: openapi/openapi.yml + Stage: + docs: |- + # The Stage Object + ### Description + The `Stage` object is used to represent the stage of an opportunity. + ### Usage Example + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The stage's name. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + remote_fields: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + StatusFd5Enum: + enum: + - SYNCING + - DONE + - FAILED + - DISABLED + - PAUSED + - PARTIALLY_SYNCED + docs: |- + * `SYNCING` - SYNCING + * `DONE` - DONE + * `FAILED` - FAILED + * `DISABLED` - DISABLED + * `PAUSED` - PAUSED + * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED + source: + openapi: openapi/openapi.yml + SyncStatus: + docs: >- + # The SyncStatus Object + + ### Description + + The `SyncStatus` object is used to represent the syncing state of an + account + + + ### Usage Example + + View the `SyncStatus` for an account to see how recently its models were + synced. + properties: + model_name: string + model_id: string + last_sync_start: optional + next_sync_start: optional + last_sync_result: optional + last_sync_finished: optional + status: StatusFd5Enum + is_initial_sync: boolean + selective_sync_configurations_usage: optional + source: + openapi: openapi/openapi.yml + TaskOwner: + discriminated: false + docs: The task's owner. + union: + - type: string + validation: + format: uuid + - User + source: + openapi: openapi/openapi.yml + inline: true + TaskAccount: + discriminated: false + docs: The task's account. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: openapi/openapi.yml + inline: true + TaskOpportunity: + discriminated: false + docs: The task's opportunity. + union: + - type: string + validation: + format: uuid + - Opportunity + source: + openapi: openapi/openapi.yml + inline: true + Task: + docs: |- + # The Task Object + ### Description + The `Task` object is used to represent a task, such as a to-do item. + ### Usage Example + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + subject: + type: optional + docs: The task's subject. + content: + type: optional + docs: The task's content. + owner: + type: optional + docs: The task's owner. + account: + type: optional + docs: The task's account. + opportunity: + type: optional + docs: The task's opportunity. + completed_date: + type: optional + docs: When the task is completed. + due_date: + type: optional + docs: When the task is due. + status: + type: optional + docs: |- + The task's status. + + * `OPEN` - OPEN + * `CLOSED` - CLOSED + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + remote_fields: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + TaskRequestOwner: + discriminated: false + docs: The task's owner. + union: + - type: string + validation: + format: uuid + - User + source: + openapi: openapi/openapi.yml + inline: true + TaskRequestAccount: + discriminated: false + docs: The task's account. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: openapi/openapi.yml + inline: true + TaskRequestOpportunity: + discriminated: false + docs: The task's opportunity. + union: + - type: string + validation: + format: uuid + - Opportunity + source: + openapi: openapi/openapi.yml + inline: true + TaskRequest: + docs: |- + # The Task Object + ### Description + The `Task` object is used to represent a task, such as a to-do item. + ### Usage Example + TODO + properties: + subject: + type: optional + docs: The task's subject. + content: + type: optional + docs: The task's content. + owner: + type: optional + docs: The task's owner. + account: + type: optional + docs: The task's account. + opportunity: + type: optional + docs: The task's opportunity. + completed_date: + type: optional + docs: When the task is completed. + due_date: + type: optional + docs: When the task is due. + status: + type: optional + docs: |- + The task's status. + + * `OPEN` - OPEN + * `CLOSED` - CLOSED + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + remote_fields: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + TaskResponse: + properties: + model: Task + warnings: list + errors: list + logs: optional> + source: + openapi: openapi/openapi.yml + TaskStatusEnum: + enum: + - OPEN + - CLOSED + docs: |- + * `OPEN` - OPEN + * `CLOSED` - CLOSED + source: + openapi: openapi/openapi.yml + User: + docs: >- + # The User Object + + ### Description + + The `User` object is used to represent a user with a login to the CRM + system. + + ### Usage Example + + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The user's name. + email: + type: optional + docs: The user's email address. + is_active: + type: optional + docs: Whether or not the user is active. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + remote_fields: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + ValidationProblemSource: + properties: + pointer: string + source: + openapi: openapi/openapi.yml + WarningValidationProblem: + properties: + source: optional + title: string + detail: string + problem_type: string + source: + openapi: openapi/openapi.yml + WebhookReceiver: + properties: + event: string + is_active: boolean + key: optional + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/crm/accountDetails.yml b/.mock/definition/crm/accountDetails.yml new file mode 100644 index 0000000..4fe53ba --- /dev/null +++ b/.mock/definition/crm/accountDetails.yml @@ -0,0 +1,36 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + retrieve: + path: /crm/v1/account-details + method: GET + auth: true + docs: Get details for a linked account. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.AccountDetails + status-code: 200 + examples: + - headers: {} + response: + body: + id: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd + integration: BambooHR + integration_slug: bamboohr + category: hris + end_user_origin_id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + end_user_organization_name: Waystar Royco + end_user_email_address: kendall.roy@waystar-royco.com + status: COMPLETE + webhook_listener_url: >- + https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 + is_duplicate: true + account_type: PRODUCTION + completed_at: '2024-08-26T20:11:19Z' + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/crm/accountToken.yml b/.mock/definition/crm/accountToken.yml new file mode 100644 index 0000000..f06c40c --- /dev/null +++ b/.mock/definition/crm/accountToken.yml @@ -0,0 +1,44 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + retrieve: + path: /crm/v1/account-token/{public_token} + method: GET + auth: true + docs: >- + Returns the account token for the end user with the provided public + token. + source: + openapi: openapi/openapi.yml + path-parameters: + public_token: string + response: + docs: '' + type: root.AccountToken + status-code: 200 + examples: + - path-parameters: + public_token: public_token + response: + body: + account_token: T9klMDQrcHdm9jrtHuOS2Nf06BIHwMNjpPXPMB + integration: + name: name + abbreviated_name: abbreviated_name + categories: + - hris + image: image + square_image: square_image + color: color + slug: slug + api_endpoints_to_documentation_urls: + key: value + webhook_setup_guide_url: webhook_setup_guide_url + category_beta_status: + key: value + id: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/crm/accounts.yml b/.mock/definition/crm/accounts.yml new file mode 100644 index 0000000..5893b29 --- /dev/null +++ b/.mock/definition/crm/accounts.yml @@ -0,0 +1,846 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /crm/v1/accounts + method: GET + auth: true + docs: Returns a list of `Account` objects. + source: + openapi: openapi/openapi.yml + request: + name: AccountsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + name: + type: optional + docs: If provided, will only return accounts with this name. + owner_id: + type: optional + docs: If provided, will only return accounts with this owner. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: root.PaginatedAccountList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 0958cbc6-6040-430a-848e-aafacbadf4ae + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + owner: owner + name: Merge API + description: One API for all integrations + industry: API's + website: https://merge.dev/ + number_of_employees: 276000 + addresses: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + street_1: 50 Bowling Green Dr + street_2: Golden Gate Park + city: San Francisco + state: CA + postal_code: '94122' + country: US + address_type: BILLING + phone_numbers: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + phone_number: '+16788879833' + phone_number_type: Mobile + last_activity_at: '2022-02-10T00:00:00Z' + remote_updated_at: '2022-01-09T00:00:00Z' + remote_created_at: '2021-11-10T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /accounts + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + create: + path: /crm/v1/accounts + method: POST + auth: true + docs: Creates an `Account` object with the given values. + source: + openapi: openapi/openapi.yml + request: + name: CrmAccountEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: root.AccountRequest + content-type: application/json + response: + docs: '' + type: root.CrmAccountResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: 0958cbc6-6040-430a-848e-aafacbadf4ae + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + owner: owner + name: Merge API + description: One API for all integrations + industry: API's + website: https://merge.dev/ + number_of_employees: 276000 + addresses: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + street_1: 50 Bowling Green Dr + street_2: Golden Gate Park + city: San Francisco + state: CA + postal_code: '94122' + country: US + address_type: BILLING + phone_numbers: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + phone_number: '+16788879833' + phone_number_type: Mobile + last_activity_at: '2022-02-10T00:00:00Z' + remote_updated_at: '2022-01-09T00:00:00Z' + remote_created_at: '2021-11-10T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /accounts + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /crm/v1/accounts/{id} + method: GET + auth: true + docs: Returns an `Account` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: AccountsRetrieveRequest + query-parameters: + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.Account + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 0958cbc6-6040-430a-848e-aafacbadf4ae + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + owner: owner + name: Merge API + description: One API for all integrations + industry: API's + website: https://merge.dev/ + number_of_employees: 276000 + addresses: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + street_1: 50 Bowling Green Dr + street_2: Golden Gate Park + city: San Francisco + state: CA + postal_code: '94122' + country: US + address_type: BILLING + phone_numbers: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + phone_number: '+16788879833' + phone_number_type: Mobile + last_activity_at: '2022-02-10T00:00:00Z' + remote_updated_at: '2022-01-09T00:00:00Z' + remote_created_at: '2021-11-10T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /accounts + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + value: + key: value + partialUpdate: + path: /crm/v1/accounts/{id} + method: PATCH + auth: true + docs: Updates an `Account` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: PatchedCrmAccountEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: root.PatchedAccountRequest + content-type: application/json + response: + docs: '' + type: root.CrmAccountResponse + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + request: + model: {} + response: + body: + model: + id: 0958cbc6-6040-430a-848e-aafacbadf4ae + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + owner: owner + name: Merge API + description: One API for all integrations + industry: API's + website: https://merge.dev/ + number_of_employees: 276000 + addresses: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + street_1: 50 Bowling Green Dr + street_2: Golden Gate Park + city: San Francisco + state: CA + postal_code: '94122' + country: US + address_type: BILLING + phone_numbers: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + phone_number: '+16788879833' + phone_number_type: Mobile + last_activity_at: '2022-02-10T00:00:00Z' + remote_updated_at: '2022-01-09T00:00:00Z' + remote_created_at: '2021-11-10T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /accounts + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + metaPatchRetrieve: + path: /crm/v1/accounts/meta/patch/{id} + method: GET + auth: true + docs: Returns metadata for `CRMAccount` PATCHs. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + response: + docs: '' + type: root.MetaResponse + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + metaPostRetrieve: + path: /crm/v1/accounts/meta/post + method: GET + auth: true + docs: Returns metadata for `CRMAccount` POSTs. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + remoteFieldClassesList: + path: /crm/v1/accounts/remote-field-classes + method: GET + auth: true + docs: Returns a list of `RemoteFieldClass` objects. + source: + openapi: openapi/openapi.yml + request: + name: AccountsRemoteFieldClassesListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_common_model_field: + type: optional + docs: >- + If provided, will only return remote field classes with this + is_common_model_field value + is_custom: + type: optional + docs: >- + If provided, will only return remote fields classes with this + is_custom value + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: root.PaginatedRemoteFieldClassList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: id + display_name: display_name + remote_key_name: remote_key_name + description: description + is_custom: true + is_required: true + field_type: string + field_format: string + field_choices: + - {} + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/crm/associationTypes.yml b/.mock/definition/crm/associationTypes.yml new file mode 100644 index 0000000..01f582d --- /dev/null +++ b/.mock/definition/crm/associationTypes.yml @@ -0,0 +1,420 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + custom_object_classes_association_types_list: + path: /crm/v1/custom-object-classes/{custom_object_class_id}/association-types + method: GET + auth: true + docs: Returns a list of `AssociationType` objects. + source: + openapi: openapi/openapi.yml + path-parameters: + custom_object_class_id: string + request: + name: CustomObjectClassesAssociationTypesListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: root.PaginatedAssociationTypeList + status-code: 200 + examples: + - path-parameters: + custom_object_class_id: custom_object_class_id + headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 5bb73c32-3c6c-4757-ab7d-7d3540a1be31 + remote_id: '93' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + source_object_class: + id: ff1ff4cb-a66b-47dc-8e2a-50388049e602 + origin_type: CUSTOM_OBJECT + target_object_classes: + - id: Opportunity + origin_type: COMMON_MODEL + remote_key_name: order_to_opportunity + display_name: Order to Opportunity + cardinality: ONE_TO_ONE + is_required: true + custom_object_classes_association_types_create: + path: /crm/v1/custom-object-classes/{custom_object_class_id}/association-types + method: POST + auth: true + docs: Creates an `AssociationType` object with the given values. + source: + openapi: openapi/openapi.yml + path-parameters: + custom_object_class_id: string + request: + name: CrmAssociationTypeEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: root.AssociationTypeRequestRequest + content-type: application/json + response: + docs: '' + type: root.CrmAssociationTypeResponse + status-code: 201 + examples: + - path-parameters: + custom_object_class_id: custom_object_class_id + headers: {} + request: + model: + source_object_class: + id: id + origin_type: CUSTOM_OBJECT + target_object_classes: + - id: id + origin_type: CUSTOM_OBJECT + remote_key_name: remote_key_name + response: + body: + model: + id: 5bb73c32-3c6c-4757-ab7d-7d3540a1be31 + remote_id: '93' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + source_object_class: + id: ff1ff4cb-a66b-47dc-8e2a-50388049e602 + origin_type: CUSTOM_OBJECT + target_object_classes: + - id: Opportunity + origin_type: COMMON_MODEL + remote_key_name: order_to_opportunity + display_name: Order to Opportunity + cardinality: ONE_TO_ONE + is_required: true + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + custom_object_classes_association_types_retrieve: + path: >- + /crm/v1/custom-object-classes/{custom_object_class_id}/association-types/{id} + method: GET + auth: true + docs: Returns an `AssociationType` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + custom_object_class_id: string + id: string + request: + name: CustomObjectClassesAssociationTypesRetrieveRequest + query-parameters: + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.AssociationType + status-code: 200 + examples: + - path-parameters: + custom_object_class_id: custom_object_class_id + id: id + headers: {} + response: + body: + id: 5bb73c32-3c6c-4757-ab7d-7d3540a1be31 + remote_id: '93' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + source_object_class: + id: ff1ff4cb-a66b-47dc-8e2a-50388049e602 + origin_type: CUSTOM_OBJECT + target_object_classes: + - id: Opportunity + created_at: '2024-01-15T09:30:00Z' + modified_at: '2024-01-15T09:30:00Z' + origin_type: COMMON_MODEL + remote_key_name: order_to_opportunity + display_name: Order to Opportunity + cardinality: ONE_TO_ONE + is_required: true + custom_object_classes_association_types_meta_post_retrieve: + path: >- + /crm/v1/custom-object-classes/{custom_object_class_id}/association-types/meta/post + method: GET + auth: true + docs: Returns metadata for `CRMAssociationType` POSTs. + source: + openapi: openapi/openapi.yml + path-parameters: + custom_object_class_id: string + response: + docs: '' + type: root.MetaResponse + status-code: 200 + examples: + - path-parameters: + custom_object_class_id: custom_object_class_id + headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/crm/associations.yml b/.mock/definition/crm/associations.yml new file mode 100644 index 0000000..bf27f3e --- /dev/null +++ b/.mock/definition/crm/associations.yml @@ -0,0 +1,142 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + custom_object_classes_custom_objects_associations_list: + path: >- + /crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects/{object_id}/associations + method: GET + auth: true + docs: Returns a list of `Association` objects. + source: + openapi: openapi/openapi.yml + path-parameters: + custom_object_class_id: string + object_id: string + request: + name: CustomObjectClassesCustomObjectsAssociationsListRequest + query-parameters: + association_type_id: + type: optional + docs: >- + If provided, will only return opportunities with this + association_type. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: root.PaginatedAssociationList + status-code: 200 + examples: + - path-parameters: + custom_object_class_id: custom_object_class_id + object_id: object_id + headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + source_object: a8f5d29f-4e50-473f-8f12-27128ffcd37a + target_object: da0b1963-be70-469c-9f8c-06a81d0fe759 + association_type: association_type + custom_object_classes_custom_objects_associations_update: + path: >- + /crm/v1/custom-object-classes/{source_class_id}/custom-objects/{source_object_id}/associations/{target_class_id}/{target_object_id}/{association_type_id} + method: PUT + auth: true + docs: >- + Creates an Association between `source_object_id` and `target_object_id` + of type `association_type_id`. + source: + openapi: openapi/openapi.yml + path-parameters: + association_type_id: string + source_class_id: string + source_object_id: string + target_class_id: string + target_object_id: string + request: + name: CustomObjectClassesCustomObjectsAssociationsUpdateRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + response: + docs: '' + type: root.Association + status-code: 200 + examples: + - path-parameters: + 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 + headers: {} + response: + body: + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + source_object: a8f5d29f-4e50-473f-8f12-27128ffcd37a + target_object: da0b1963-be70-469c-9f8c-06a81d0fe759 + association_type: association_type + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/crm/asyncPassthrough.yml b/.mock/definition/crm/asyncPassthrough.yml new file mode 100644 index 0000000..6a7e257 --- /dev/null +++ b/.mock/definition/crm/asyncPassthrough.yml @@ -0,0 +1,70 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /crm/v1/async-passthrough + method: POST + auth: true + docs: >- + Asynchronously pull data from an endpoint not currently supported by + Merge. + source: + openapi: openapi/openapi.yml + request: + body: root.DataPassthroughRequest + content-type: application/json + response: + docs: '' + type: root.AsyncPassthroughReciept + status-code: 200 + examples: + - headers: {} + request: + method: GET + path: /scooters + response: + body: + async_passthrough_receipt_id: fd29020f-2695-445e-922e-dcd5e81903fd + retrieve: + path: /crm/v1/async-passthrough/{async_passthrough_receipt_id} + method: GET + auth: true + docs: Retrieves data from earlier async-passthrough POST request + source: + openapi: openapi/openapi.yml + path-parameters: + async_passthrough_receipt_id: string + response: + docs: '' + type: AsyncPassthroughRetrieveResponse + status-code: 200 + examples: + - path-parameters: + async_passthrough_receipt_id: async_passthrough_receipt_id + headers: {} + response: + body: + method: GET + path: /scooters + status: 200 + response: + key: value + response_headers: + X-Page-Token: value + response_type: JSON + headers: + EXTRA-HEADER: value + Authorization: + source: + openapi: openapi/openapi.yml +types: + AsyncPassthroughRetrieveResponse: + discriminated: false + union: + - root.RemoteResponse + - string + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/crm/auditTrail.yml b/.mock/definition/crm/auditTrail.yml new file mode 100644 index 0000000..68ad5c2 --- /dev/null +++ b/.mock/definition/crm/auditTrail.yml @@ -0,0 +1,94 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /crm/v1/audit-trail + method: GET + auth: true + docs: Gets a list of audit trail events. + source: + openapi: openapi/openapi.yml + request: + name: AuditTrailListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + end_date: + type: optional + docs: >- + If included, will only include audit trail events that occurred + before this time + event_type: + type: optional + docs: >- + 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`, + `REGENERATED_WEBHOOK_SIGNATURE`, `INVITED_USER`, + `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, + `DELETED_LINKED_ACCOUNT`, + `DELETED_ALL_COMMON_MODELS_FOR_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`, + `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, + `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, + `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, + `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, + `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, + `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, + `END_USER_CREDENTIALS_ACCESSED` + page_size: + type: optional + docs: Number of results to return per page. + start_date: + type: optional + docs: >- + If included, will only include audit trail events that occurred + after this time + user_email: + type: optional + docs: >- + If provided, this will return events associated with the specified + user email. Please note that the email address reflects the user's + email at the time of the event, and may not be their current + email. + response: + docs: '' + type: root.PaginatedAuditLogEventList + status-code: 200 + examples: + - response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: b5ceea2a-7171-47ce-8090-165cfce5572c + user_name: Gil Feig + user_email: hello@merge.dev + role: ADMIN + ip_address: 192.0.2.123 + event_type: CREATED_REMOTE_PRODUCTION_API_KEY + event_description: >- + Organization-wide Scopes for model hris.Employee updated + from Read to Read+Write + created_at: '2024-01-15T09:30:00Z' + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/crm/availableActions.yml b/.mock/definition/crm/availableActions.yml new file mode 100644 index 0000000..4033803 --- /dev/null +++ b/.mock/definition/crm/availableActions.yml @@ -0,0 +1,50 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + retrieve: + path: /crm/v1/available-actions + method: GET + auth: true + docs: Returns a list of models and actions available for an account. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.AvailableActions + status-code: 200 + examples: + - headers: {} + response: + body: + integration: + name: name + abbreviated_name: abbreviated_name + categories: + - hris + image: image + square_image: square_image + color: color + slug: slug + api_endpoints_to_documentation_urls: + key: value + webhook_setup_guide_url: webhook_setup_guide_url + category_beta_status: + key: value + passthrough_available: true + available_model_operations: + - model_name: Candidate + available_operations: + - FETCH + - CREATE + required_post_parameters: + - remote_user_id + supported_fields: + - first_name + - last_name + - company + - title + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/crm/contacts.yml b/.mock/definition/crm/contacts.yml new file mode 100644 index 0000000..692d06b --- /dev/null +++ b/.mock/definition/crm/contacts.yml @@ -0,0 +1,900 @@ +types: + ContactsListRequestExpand: + enum: + - account + - value: account,owner + name: AccountOwner + - owner + source: + openapi: openapi/openapi.yml + ContactsRetrieveRequestExpand: + enum: + - account + - value: account,owner + name: AccountOwner + - owner + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /crm/v1/contacts + method: GET + auth: true + docs: Returns a list of `Contact` objects. + source: + openapi: openapi/openapi.yml + request: + name: ContactsListRequest + query-parameters: + account_id: + type: optional + docs: If provided, will only return contacts with this account. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + email_addresses: + type: optional + docs: >- + If provided, will only return contacts matching the email + addresses; multiple email_addresses can be separated by commas. + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + phone_numbers: + type: optional + docs: >- + If provided, will only return contacts matching the phone numbers; + multiple phone numbers can be separated by commas. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: root.PaginatedContactList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 550e8400-e29b-41d4-a716-446655440000 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + first_name: Gil + last_name: Feig + account: account + owner: owner + addresses: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + street_1: 50 Bowling Green Dr + street_2: Golden Gate Park + city: San Francisco + state: CA + postal_code: '94122' + country: US + address_type: BILLING + email_addresses: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + email_address: hello@merge.dev + email_address_type: Work + phone_numbers: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + phone_number: '+13785579223' + phone_number_type: Mobile + last_activity_at: '2022-02-10T00:00:00Z' + remote_created_at: '2021-11-10T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /contacts + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + create: + path: /crm/v1/contacts + method: POST + auth: true + docs: Creates a `Contact` object with the given values. + source: + openapi: openapi/openapi.yml + request: + name: CrmContactEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: root.ContactRequest + content-type: application/json + response: + docs: '' + type: root.CrmContactResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: 550e8400-e29b-41d4-a716-446655440000 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + first_name: Gil + last_name: Feig + account: account + owner: owner + addresses: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + street_1: 50 Bowling Green Dr + street_2: Golden Gate Park + city: San Francisco + state: CA + postal_code: '94122' + country: US + address_type: BILLING + email_addresses: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + email_address: hello@merge.dev + email_address_type: Work + phone_numbers: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + phone_number: '+13785579223' + phone_number_type: Mobile + last_activity_at: '2022-02-10T00:00:00Z' + remote_created_at: '2021-11-10T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /contacts + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /crm/v1/contacts/{id} + method: GET + auth: true + docs: Returns a `Contact` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: ContactsRetrieveRequest + query-parameters: + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.Contact + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 550e8400-e29b-41d4-a716-446655440000 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + first_name: Gil + last_name: Feig + account: account + owner: owner + addresses: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + street_1: 50 Bowling Green Dr + street_2: Golden Gate Park + city: San Francisco + state: CA + postal_code: '94122' + country: US + address_type: BILLING + email_addresses: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + email_address: hello@merge.dev + email_address_type: Work + phone_numbers: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + phone_number: '+13785579223' + phone_number_type: Mobile + last_activity_at: '2022-02-10T00:00:00Z' + remote_created_at: '2021-11-10T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /contacts + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + value: + key: value + partialUpdate: + path: /crm/v1/contacts/{id} + method: PATCH + auth: true + docs: Updates a `Contact` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: PatchedCrmContactEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: root.PatchedContactRequest + content-type: application/json + response: + docs: '' + type: root.CrmContactResponse + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + request: + model: {} + response: + body: + model: + id: 550e8400-e29b-41d4-a716-446655440000 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + first_name: Gil + last_name: Feig + account: account + owner: owner + addresses: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + street_1: 50 Bowling Green Dr + street_2: Golden Gate Park + city: San Francisco + state: CA + postal_code: '94122' + country: US + address_type: BILLING + email_addresses: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + email_address: hello@merge.dev + email_address_type: Work + phone_numbers: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + phone_number: '+13785579223' + phone_number_type: Mobile + last_activity_at: '2022-02-10T00:00:00Z' + remote_created_at: '2021-11-10T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /contacts + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + ignoreCreate: + path: /crm/v1/contacts/ignore/{model_id} + method: POST + auth: true + docs: >- + Ignores a specific row based on the `model_id` in the url. These records + will have their properties set to null, and will not be updated in + future syncs. The "reason" and "message" fields in the request body will + be stored for audit purposes. + source: + openapi: openapi/openapi.yml + path-parameters: + model_id: string + request: + body: root.IgnoreCommonModelRequest + content-type: application/json + examples: + - path-parameters: + model_id: model_id + headers: {} + request: + reason: GENERAL_CUSTOMER_REQUEST + metaPatchRetrieve: + path: /crm/v1/contacts/meta/patch/{id} + method: GET + auth: true + docs: Returns metadata for `CRMContact` PATCHs. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + response: + docs: '' + type: root.MetaResponse + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + metaPostRetrieve: + path: /crm/v1/contacts/meta/post + method: GET + auth: true + docs: Returns metadata for `CRMContact` POSTs. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + remoteFieldClassesList: + path: /crm/v1/contacts/remote-field-classes + method: GET + auth: true + docs: Returns a list of `RemoteFieldClass` objects. + source: + openapi: openapi/openapi.yml + request: + name: ContactsRemoteFieldClassesListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_common_model_field: + type: optional + docs: >- + If provided, will only return remote field classes with this + is_common_model_field value + is_custom: + type: optional + docs: >- + If provided, will only return remote fields classes with this + is_custom value + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: root.PaginatedRemoteFieldClassList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: id + display_name: display_name + remote_key_name: remote_key_name + description: description + is_custom: true + is_required: true + field_type: string + field_format: string + field_choices: + - {} + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/crm/customObjectClasses.yml b/.mock/definition/crm/customObjectClasses.yml new file mode 100644 index 0000000..094efd7 --- /dev/null +++ b/.mock/definition/crm/customObjectClasses.yml @@ -0,0 +1,196 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /crm/v1/custom-object-classes + method: GET + auth: true + docs: Returns a list of `CustomObjectClass` objects. + source: + openapi: openapi/openapi.yml + request: + name: CustomObjectClassesListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: root.PaginatedCustomObjectClassList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: ff1ff4cb-a66b-47dc-8e2a-50388049e602 + remote_id: '9579977' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: order + description: Order object + labels: + singular: Order + plural: Orders + fields: + - display_name: Order ID + remote_key_name: order_id + description: The unique ID for the order. + is_required: true + field_type: string + field_format: string + field_choices: + - {} + - display_name: Order Quantity + remote_key_name: order_quantity + description: The number of items ordered. + is_required: true + field_type: number + field_format: number + field_choices: + - {} + - display_name: Customer Type + remote_key_name: customer_type + description: The type of customer. + is_required: true + field_type: string + field_format: string + field_choices: + - {} + - {} + association_types: + - key: value + retrieve: + path: /crm/v1/custom-object-classes/{id} + method: GET + auth: true + docs: Returns a `CustomObjectClass` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: CustomObjectClassesRetrieveRequest + query-parameters: + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.CustomObjectClass + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: ff1ff4cb-a66b-47dc-8e2a-50388049e602 + remote_id: '9579977' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: order + description: Order object + labels: + singular: Order + plural: Orders + fields: + - created_at: '2024-01-15T09:30:00Z' + modified_at: '2024-01-15T09:30:00Z' + display_name: Order ID + remote_key_name: order_id + description: The unique ID for the order. + is_required: true + field_type: string + field_format: string + field_choices: + - {} + - created_at: '2024-01-15T09:30:00Z' + modified_at: '2024-01-15T09:30:00Z' + display_name: Order Quantity + remote_key_name: order_quantity + description: The number of items ordered. + is_required: true + field_type: number + field_format: number + field_choices: + - {} + - created_at: '2024-01-15T09:30:00Z' + modified_at: '2024-01-15T09:30:00Z' + display_name: Customer Type + remote_key_name: customer_type + description: The type of customer. + is_required: true + field_type: string + field_format: string + field_choices: + - {} + - {} + association_types: + - key: value + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/crm/customObjects.yml b/.mock/definition/crm/customObjects.yml new file mode 100644 index 0000000..d4904e5 --- /dev/null +++ b/.mock/definition/crm/customObjects.yml @@ -0,0 +1,476 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + custom_object_classes_custom_objects_list: + path: /crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects + method: GET + auth: true + docs: Returns a list of `CustomObject` objects. + source: + openapi: openapi/openapi.yml + path-parameters: + custom_object_class_id: string + request: + name: CustomObjectClassesCustomObjectsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: root.PaginatedCustomObjectList + status-code: 200 + examples: + - path-parameters: + custom_object_class_id: custom_object_class_id + headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: da0b1963-be70-469c-9f8c-06a81d0fe759 + remote_id: '4183634295' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + object_class: ff1ff4cb-a66b-47dc-8e2a-50388049e602 + fields: + order_id: '4183634295' + order_quantity: 50 + customer_type: Returning + remote_fields: + - remote_field_class: remote_field_class + custom_object_classes_custom_objects_create: + path: /crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects + method: POST + auth: true + docs: Creates a `CustomObject` object with the given values. + source: + openapi: openapi/openapi.yml + path-parameters: + custom_object_class_id: string + request: + name: CrmCustomObjectEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: root.CustomObjectRequest + content-type: application/json + response: + docs: '' + type: root.CrmCustomObjectResponse + status-code: 201 + examples: + - path-parameters: + custom_object_class_id: custom_object_class_id + headers: {} + request: + model: + fields: + test_field: hello + response: + body: + model: + id: da0b1963-be70-469c-9f8c-06a81d0fe759 + remote_id: '4183634295' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + object_class: ff1ff4cb-a66b-47dc-8e2a-50388049e602 + fields: + order_id: '4183634295' + order_quantity: 50 + customer_type: Returning + remote_fields: + - remote_field_class: remote_field_class + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + custom_object_classes_custom_objects_retrieve: + path: >- + /crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects/{id} + method: GET + auth: true + docs: Returns a `CustomObject` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + custom_object_class_id: string + id: string + request: + name: CustomObjectClassesCustomObjectsRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.CustomObject + status-code: 200 + examples: + - path-parameters: + custom_object_class_id: custom_object_class_id + id: id + headers: {} + response: + body: + id: da0b1963-be70-469c-9f8c-06a81d0fe759 + remote_id: '4183634295' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + object_class: ff1ff4cb-a66b-47dc-8e2a-50388049e602 + fields: + order_id: '4183634295' + order_quantity: 50 + customer_type: Returning + remote_fields: + - remote_field_class: remote_field_class + value: + key: value + custom_object_classes_custom_objects_meta_post_retrieve: + path: >- + /crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects/meta/post + method: GET + auth: true + docs: Returns metadata for `CRMCustomObject` POSTs. + source: + openapi: openapi/openapi.yml + path-parameters: + custom_object_class_id: string + response: + docs: '' + type: root.MetaResponse + status-code: 200 + examples: + - path-parameters: + custom_object_class_id: custom_object_class_id + headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + custom_object_classes_custom_objects_remote_field_classes_list: + path: /crm/v1/custom-object-classes/custom-objects/remote-field-classes + method: GET + auth: true + docs: Returns a list of `RemoteFieldClass` objects. + source: + openapi: openapi/openapi.yml + request: + name: CustomObjectClassesCustomObjectsRemoteFieldClassesListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_common_model_field: + type: optional + docs: >- + If provided, will only return remote field classes with this + is_common_model_field value + is_custom: + type: optional + docs: >- + If provided, will only return remote fields classes with this + is_custom value + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: root.PaginatedRemoteFieldClassList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: id + display_name: display_name + remote_key_name: remote_key_name + description: description + is_custom: true + is_required: true + field_type: string + field_format: string + field_choices: + - {} + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/crm/deleteAccount.yml b/.mock/definition/crm/deleteAccount.yml new file mode 100644 index 0000000..b0bfe1c --- /dev/null +++ b/.mock/definition/crm/deleteAccount.yml @@ -0,0 +1,15 @@ +service: + auth: false + base-path: '' + endpoints: + delete: + path: /crm/v1/delete-account + method: POST + auth: true + docs: Delete a linked account. + source: + openapi: openapi/openapi.yml + examples: + - headers: {} + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/crm/engagementTypes.yml b/.mock/definition/crm/engagementTypes.yml new file mode 100644 index 0000000..2070b2e --- /dev/null +++ b/.mock/definition/crm/engagementTypes.yml @@ -0,0 +1,204 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /crm/v1/engagement-types + method: GET + auth: true + docs: Returns a list of `EngagementType` objects. + source: + openapi: openapi/openapi.yml + request: + name: EngagementTypesListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: root.PaginatedEngagementTypeList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 550e8400-e29b-41d4-a716-446655440000 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + activity_type: CALL + name: First Call + remote_fields: + - remote_field_class: remote_field_class + retrieve: + path: /crm/v1/engagement-types/{id} + method: GET + auth: true + docs: Returns an `EngagementType` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: EngagementTypesRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.EngagementType + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 550e8400-e29b-41d4-a716-446655440000 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + activity_type: CALL + name: First Call + remote_fields: + - remote_field_class: remote_field_class + value: + key: value + remoteFieldClassesList: + path: /crm/v1/engagement-types/remote-field-classes + method: GET + auth: true + docs: Returns a list of `RemoteFieldClass` objects. + source: + openapi: openapi/openapi.yml + request: + name: EngagementTypesRemoteFieldClassesListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_common_model_field: + type: optional + docs: >- + If provided, will only return remote field classes with this + is_common_model_field value + is_custom: + type: optional + docs: >- + If provided, will only return remote fields classes with this + is_custom value + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: root.PaginatedRemoteFieldClassList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: id + display_name: display_name + remote_key_name: remote_key_name + description: description + is_custom: true + is_required: true + field_type: string + field_format: string + field_choices: + - {} + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/crm/engagements.yml b/.mock/definition/crm/engagements.yml new file mode 100644 index 0000000..aaf88ac --- /dev/null +++ b/.mock/definition/crm/engagements.yml @@ -0,0 +1,855 @@ +types: + EngagementsListRequestExpand: + enum: + - account + - value: account,engagement_type + name: AccountEngagementType + - contacts + - value: contacts,account + name: ContactsAccount + - value: contacts,account,engagement_type + name: ContactsAccountEngagementType + - value: contacts,engagement_type + name: ContactsEngagementType + - value: contacts,owner + name: ContactsOwner + - value: contacts,owner,account + name: ContactsOwnerAccount + - value: contacts,owner,account,engagement_type + name: ContactsOwnerAccountEngagementType + - value: contacts,owner,engagement_type + name: ContactsOwnerEngagementType + - engagement_type + - owner + - value: owner,account + name: OwnerAccount + - value: owner,account,engagement_type + name: OwnerAccountEngagementType + - value: owner,engagement_type + name: OwnerEngagementType + source: + openapi: openapi/openapi.yml + EngagementsRetrieveRequestExpand: + enum: + - account + - value: account,engagement_type + name: AccountEngagementType + - contacts + - value: contacts,account + name: ContactsAccount + - value: contacts,account,engagement_type + name: ContactsAccountEngagementType + - value: contacts,engagement_type + name: ContactsEngagementType + - value: contacts,owner + name: ContactsOwner + - value: contacts,owner,account + name: ContactsOwnerAccount + - value: contacts,owner,account,engagement_type + name: ContactsOwnerAccountEngagementType + - value: contacts,owner,engagement_type + name: ContactsOwnerEngagementType + - engagement_type + - owner + - value: owner,account + name: OwnerAccount + - value: owner,account,engagement_type + name: OwnerAccountEngagementType + - value: owner,engagement_type + name: OwnerEngagementType + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /crm/v1/engagements + method: GET + auth: true + docs: Returns a list of `Engagement` objects. + source: + openapi: openapi/openapi.yml + request: + name: EngagementsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + started_after: + type: optional + docs: >- + If provided, will only return engagements started after this + datetime. + started_before: + type: optional + docs: >- + If provided, will only return engagements started before this + datetime. + response: + docs: '' + type: root.PaginatedEngagementList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 550e8400-e29b-41d4-a716-446655440000 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + owner: owner + content: Call for negotiation + subject: Call from customer + direction: INBOUND + engagement_type: engagement_type + start_time: '2022-02-10T00:00:00Z' + end_time: '2022-02-10T00:05:00Z' + account: account + contacts: + - a7c55bc6-2940-c80a-848e-bbfacbfdf4fg + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /engagements + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + create: + path: /crm/v1/engagements + method: POST + auth: true + docs: Creates an `Engagement` object with the given values. + source: + openapi: openapi/openapi.yml + request: + name: EngagementEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: root.EngagementRequest + content-type: application/json + response: + docs: '' + type: root.EngagementResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: 550e8400-e29b-41d4-a716-446655440000 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + owner: owner + content: Call for negotiation + subject: Call from customer + direction: INBOUND + engagement_type: engagement_type + start_time: '2022-02-10T00:00:00Z' + end_time: '2022-02-10T00:05:00Z' + account: account + contacts: + - a7c55bc6-2940-c80a-848e-bbfacbfdf4fg + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /engagements + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /crm/v1/engagements/{id} + method: GET + auth: true + docs: Returns an `Engagement` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: EngagementsRetrieveRequest + query-parameters: + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.Engagement + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 550e8400-e29b-41d4-a716-446655440000 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + owner: owner + content: Call for negotiation + subject: Call from customer + direction: INBOUND + engagement_type: engagement_type + start_time: '2022-02-10T00:00:00Z' + end_time: '2022-02-10T00:05:00Z' + account: account + contacts: + - a7c55bc6-2940-c80a-848e-bbfacbfdf4fg + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /engagements + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + value: + key: value + partialUpdate: + path: /crm/v1/engagements/{id} + method: PATCH + auth: true + docs: Updates an `Engagement` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: PatchedEngagementEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: root.PatchedEngagementRequest + content-type: application/json + response: + docs: '' + type: root.EngagementResponse + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + request: + model: {} + response: + body: + model: + id: 550e8400-e29b-41d4-a716-446655440000 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + owner: owner + content: Call for negotiation + subject: Call from customer + direction: INBOUND + engagement_type: engagement_type + start_time: '2022-02-10T00:00:00Z' + end_time: '2022-02-10T00:05:00Z' + account: account + contacts: + - a7c55bc6-2940-c80a-848e-bbfacbfdf4fg + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /engagements + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + metaPatchRetrieve: + path: /crm/v1/engagements/meta/patch/{id} + method: GET + auth: true + docs: Returns metadata for `Engagement` PATCHs. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + response: + docs: '' + type: root.MetaResponse + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + metaPostRetrieve: + path: /crm/v1/engagements/meta/post + method: GET + auth: true + docs: Returns metadata for `Engagement` POSTs. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + remoteFieldClassesList: + path: /crm/v1/engagements/remote-field-classes + method: GET + auth: true + docs: Returns a list of `RemoteFieldClass` objects. + source: + openapi: openapi/openapi.yml + request: + name: EngagementsRemoteFieldClassesListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_common_model_field: + type: optional + docs: >- + If provided, will only return remote field classes with this + is_common_model_field value + is_custom: + type: optional + docs: >- + If provided, will only return remote fields classes with this + is_custom value + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: root.PaginatedRemoteFieldClassList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: id + display_name: display_name + remote_key_name: remote_key_name + description: description + is_custom: true + is_required: true + field_type: string + field_format: string + field_choices: + - {} + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/crm/fieldMapping.yml b/.mock/definition/crm/fieldMapping.yml new file mode 100644 index 0000000..5318dcf --- /dev/null +++ b/.mock/definition/crm/fieldMapping.yml @@ -0,0 +1,654 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + field_mappings_retrieve: + path: /crm/v1/field-mappings + method: GET + auth: true + docs: >- + Get all Field Mappings for this Linked Account. Field Mappings are + mappings between third-party Remote Fields and user defined Merge + fields. [Learn + more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). + source: + openapi: openapi/openapi.yml + request: + name: FieldMappingsRetrieveRequest + query-parameters: + exclude_remote_field_metadata: + type: optional + docs: >- + If `true`, remote fields metadata is excluded from each field + mapping instance (i.e. `remote_fields.remote_key_name` and + `remote_fields.schema` will be null). This will increase the speed + of the request since these fields require some calculations. + response: + docs: '' + type: root.FieldMappingApiInstanceResponse + status-code: 200 + examples: + - headers: {} + response: + body: + Account: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Contact: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Lead: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Note: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Opportunity: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Stage: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + User: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Task: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Engagement: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + field_mappings_create: + path: /crm/v1/field-mappings + method: POST + auth: true + docs: >- + Create new Field Mappings that will be available after the next + scheduled sync. This will cause the next sync for this Linked Account to + sync **ALL** data from start. + source: + openapi: openapi/openapi.yml + request: + name: CreateFieldMappingRequest + query-parameters: + exclude_remote_field_metadata: + type: optional + docs: >- + If `true`, remote fields metadata is excluded from each field + mapping instance (i.e. `remote_fields.remote_key_name` and + `remote_fields.schema` will be null). This will increase the speed + of the request since these fields require some calculations. + body: + properties: + target_field_name: + type: string + docs: >- + The name of the target field you want this remote field to map + to. + validation: + minLength: 1 + target_field_description: + type: string + docs: >- + The description of the target field you want this remote field + to map to. + validation: + minLength: 1 + remote_field_traversal_path: + docs: >- + The field traversal path of the remote field listed when you hit + the GET /remote-fields endpoint. + type: list + remote_method: + type: string + docs: >- + The method of the remote endpoint where the remote field is + coming from. + validation: + minLength: 1 + remote_url_path: + type: string + docs: >- + The path of the remote endpoint where the remote field is coming + from. + validation: + minLength: 1 + common_model_name: + type: string + docs: >- + The name of the Common Model that the remote field corresponds + to in a given category. + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: root.FieldMappingInstanceResponse + status-code: 201 + examples: + - headers: {} + request: + target_field_name: example_target_field_name + target_field_description: this is a example description of the target field + remote_field_traversal_path: + - example_remote_field + remote_method: GET + remote_url_path: /example-url-path + common_model_name: ExampleCommonModel + response: + body: + model: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + field_mappings_destroy: + path: /crm/v1/field-mappings/{field_mapping_id} + method: DELETE + auth: true + docs: >- + Deletes Field Mappings for a Linked Account. All data related to this + Field Mapping will be deleted and these changes will be reflected after + the next scheduled sync. This will cause the next sync for this Linked + Account to sync **ALL** data from start. + source: + openapi: openapi/openapi.yml + path-parameters: + field_mapping_id: string + response: + docs: '' + type: root.FieldMappingInstanceResponse + status-code: 204 + examples: + - path-parameters: + field_mapping_id: field_mapping_id + headers: {} + response: + body: + model: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + field_mappings_partial_update: + path: /crm/v1/field-mappings/{field_mapping_id} + method: PATCH + auth: true + docs: >- + Create or update existing Field Mappings for a Linked Account. Changes + will be reflected after the next scheduled sync. This will cause the + next sync for this Linked Account to sync **ALL** data from start. + source: + openapi: openapi/openapi.yml + path-parameters: + field_mapping_id: string + request: + name: PatchedEditFieldMappingRequest + body: + properties: + remote_field_traversal_path: + type: optional> + docs: >- + The field traversal path of the remote field listed when you hit + the GET /remote-fields endpoint. + remote_method: + type: optional + docs: >- + The method of the remote endpoint where the remote field is + coming from. + validation: + minLength: 1 + remote_url_path: + type: optional + docs: >- + The path of the remote endpoint where the remote field is coming + from. + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: root.FieldMappingInstanceResponse + status-code: 200 + examples: + - path-parameters: + field_mapping_id: field_mapping_id + headers: {} + request: {} + response: + body: + model: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + remote_fields_retrieve: + path: /crm/v1/remote-fields + method: GET + auth: true + docs: >- + Get all remote fields for a Linked Account. Remote fields are + third-party fields that are accessible after initial sync if remote_data + is enabled. You can use remote fields to override existing Merge fields + or map a new Merge field. [Learn + more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). + source: + openapi: openapi/openapi.yml + request: + name: RemoteFieldsRetrieveRequest + query-parameters: + common_models: + type: optional + docs: >- + A comma seperated list of Common Model names. If included, will + only return Remote Fields for those Common Models. + include_example_values: + type: optional + docs: >- + If true, will include example values, where available, for remote + fields in the 3rd party platform. These examples come from active + data from your customers. + response: + docs: '' + type: root.RemoteFieldApiResponse + status-code: 200 + examples: + - headers: {} + response: + body: + Account: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Contact: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Lead: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Note: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Opportunity: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Stage: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + User: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Task: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Engagement: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + target_fields_retrieve: + path: /crm/v1/target-fields + method: GET + auth: true + docs: >- + Get all organization-wide Target Fields, this will not include any + Linked Account specific Target Fields. Organization-wide Target Fields + are additional fields appended to the Merge Common Model for all Linked + Accounts in a category. [Learn + more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.ExternalTargetFieldApiResponse + status-code: 200 + examples: + - headers: {} + response: + body: + Account: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Contact: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Lead: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Note: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Opportunity: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Stage: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + User: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Task: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Engagement: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/crm/forceResync.yml b/.mock/definition/crm/forceResync.yml new file mode 100644 index 0000000..eb74ba1 --- /dev/null +++ b/.mock/definition/crm/forceResync.yml @@ -0,0 +1,37 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + sync_status_resync_create: + path: /crm/v1/sync-status/resync + method: POST + auth: true + docs: >- + Force re-sync of all models. This endpoint is available for monthly, + quarterly, and highest sync frequency customers on the Professional or + Enterprise plans. Doing so will consume a sync credit for the relevant + linked account. Force re-syncs can also be triggered manually in the + Merge Dashboard and is available for all customers. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: list + status-code: 200 + examples: + - headers: {} + response: + body: + - model_name: Account + model_id: crm.Account + last_sync_start: '2021-03-30T19:44:18Z' + next_sync_start: '2021-03-30T20:44:18Z' + last_sync_result: SYNCING + last_sync_finished: '2021-03-30T19:55:18Z' + status: SYNCING + is_initial_sync: true + selective_sync_configurations_usage: IN_NEXT_SYNC + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/crm/generateKey.yml b/.mock/definition/crm/generateKey.yml new file mode 100644 index 0000000..233479d --- /dev/null +++ b/.mock/definition/crm/generateKey.yml @@ -0,0 +1,36 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /crm/v1/generate-key + method: POST + auth: true + docs: Create a remote key. + source: + openapi: openapi/openapi.yml + request: + name: GenerateRemoteKeyRequest + body: + properties: + name: + type: string + docs: The name of the remote key + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: root.RemoteKey + status-code: 200 + examples: + - request: + name: Remote Deployment Key 1 + response: + body: + name: Remote Deployment Key 1 + key: hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/crm/issues.yml b/.mock/definition/crm/issues.yml new file mode 100644 index 0000000..ed21c69 --- /dev/null +++ b/.mock/definition/crm/issues.yml @@ -0,0 +1,129 @@ +types: + IssuesListRequestStatus: + enum: + - ONGOING + - RESOLVED + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /crm/v1/issues + method: GET + auth: true + docs: Gets all issues for Organization. + source: + openapi: openapi/openapi.yml + request: + name: IssuesListRequest + query-parameters: + account_token: optional + cursor: + type: optional + docs: The pagination cursor value. + end_date: + type: optional + docs: >- + If included, will only include issues whose most recent action + occurred before this time + end_user_organization_name: optional + first_incident_time_after: + type: optional + docs: >- + If provided, will only return issues whose first incident time was + after this datetime. + first_incident_time_before: + type: optional + docs: >- + If provided, will only return issues whose first incident time was + before this datetime. + include_muted: + type: optional + docs: If true, will include muted issues + integration_name: optional + last_incident_time_after: + type: optional + docs: >- + If provided, will only return issues whose last incident time was + after this datetime. + last_incident_time_before: + type: optional + docs: >- + If provided, will only return issues whose last incident time was + before this datetime. + linked_account_id: + type: optional + docs: >- + If provided, will only include issues pertaining to the linked + account passed in. + page_size: + type: optional + docs: Number of results to return per page. + start_date: + type: optional + docs: >- + If included, will only include issues whose most recent action + occurred after this time + status: + type: optional + docs: |- + Status of the issue. Options: ('ONGOING', 'RESOLVED') + + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + response: + docs: '' + type: root.PaginatedIssueList + status-code: 200 + examples: + - response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + status: ONGOING + error_description: Missing Permissions + end_user: + key: value + first_incident_time: '2022-12-05T16:19:15Z' + last_incident_time: '2022-12-05T16:19:15Z' + is_muted: true + error_details: + - Missing employee permissions. + - Missing time off permissions. + retrieve: + path: /crm/v1/issues/{id} + method: GET + auth: true + docs: Get a specific issue. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + response: + docs: '' + type: root.Issue + status-code: 200 + examples: + - path-parameters: + id: id + response: + body: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + status: ONGOING + error_description: Missing Permissions + end_user: + key: value + first_incident_time: '2022-12-05T16:19:15Z' + last_incident_time: '2022-12-05T16:19:15Z' + is_muted: true + error_details: + - Missing employee permissions. + - Missing time off permissions. + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/crm/leads.yml b/.mock/definition/crm/leads.yml new file mode 100644 index 0000000..d487027 --- /dev/null +++ b/.mock/definition/crm/leads.yml @@ -0,0 +1,626 @@ +types: + LeadsListRequestExpand: + enum: + - converted_account + - converted_contact + - value: converted_contact,converted_account + name: ConvertedContactConvertedAccount + - owner + - value: owner,converted_account + name: OwnerConvertedAccount + - value: owner,converted_contact + name: OwnerConvertedContact + - value: owner,converted_contact,converted_account + name: OwnerConvertedContactConvertedAccount + source: + openapi: openapi/openapi.yml + LeadsRetrieveRequestExpand: + enum: + - converted_account + - converted_contact + - value: converted_contact,converted_account + name: ConvertedContactConvertedAccount + - owner + - value: owner,converted_account + name: OwnerConvertedAccount + - value: owner,converted_contact + name: OwnerConvertedContact + - value: owner,converted_contact,converted_account + name: OwnerConvertedContactConvertedAccount + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /crm/v1/leads + method: GET + auth: true + docs: Returns a list of `Lead` objects. + source: + openapi: openapi/openapi.yml + request: + name: LeadsListRequest + query-parameters: + converted_account_id: + type: optional + docs: If provided, will only return leads with this account. + converted_contact_id: + type: optional + docs: If provided, will only return leads with this contact. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + email_addresses: + type: optional + docs: >- + If provided, will only return contacts matching the email + addresses; multiple email_addresses can be separated by commas. + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + owner_id: + type: optional + docs: If provided, will only return leads with this owner. + page_size: + type: optional + docs: Number of results to return per page. + phone_numbers: + type: optional + docs: >- + If provided, will only return contacts matching the phone numbers; + multiple phone numbers can be separated by commas. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: root.PaginatedLeadList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 550e8400-e29b-41d4-a716-446655440000 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + owner: owner + lead_source: API Blogger + title: Co-Founder + company: Merge API + first_name: Gil + last_name: Feig + addresses: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + street_1: 50 Bowling Green Dr + street_2: Golden Gate Park + city: San Francisco + state: CA + postal_code: '94122' + country: US + address_type: BILLING + email_addresses: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + email_address: hello@merge.dev + email_address_type: Work + phone_numbers: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + phone_number: '+16789932455' + phone_number_type: Mobile + remote_updated_at: '2022-02-10T00:00:00Z' + remote_created_at: '2021-11-10T00:00:00Z' + converted_date: '2022-03-10T00:00:00Z' + converted_contact: converted_contact + converted_account: converted_account + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /leads + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + create: + path: /crm/v1/leads + method: POST + auth: true + docs: Creates a `Lead` object with the given values. + source: + openapi: openapi/openapi.yml + request: + name: LeadEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: root.LeadRequest + content-type: application/json + response: + docs: '' + type: root.LeadResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: 550e8400-e29b-41d4-a716-446655440000 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + owner: owner + lead_source: API Blogger + title: Co-Founder + company: Merge API + first_name: Gil + last_name: Feig + addresses: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + street_1: 50 Bowling Green Dr + street_2: Golden Gate Park + city: San Francisco + state: CA + postal_code: '94122' + country: US + address_type: BILLING + email_addresses: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + email_address: hello@merge.dev + email_address_type: Work + phone_numbers: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + phone_number: '+16789932455' + phone_number_type: Mobile + remote_updated_at: '2022-02-10T00:00:00Z' + remote_created_at: '2021-11-10T00:00:00Z' + converted_date: '2022-03-10T00:00:00Z' + converted_contact: converted_contact + converted_account: converted_account + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /leads + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /crm/v1/leads/{id} + method: GET + auth: true + docs: Returns a `Lead` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: LeadsRetrieveRequest + query-parameters: + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.Lead + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 550e8400-e29b-41d4-a716-446655440000 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + owner: owner + lead_source: API Blogger + title: Co-Founder + company: Merge API + first_name: Gil + last_name: Feig + addresses: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + street_1: 50 Bowling Green Dr + street_2: Golden Gate Park + city: San Francisco + state: CA + postal_code: '94122' + country: US + address_type: BILLING + email_addresses: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + email_address: hello@merge.dev + email_address_type: Work + phone_numbers: + - created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + phone_number: '+16789932455' + phone_number_type: Mobile + remote_updated_at: '2022-02-10T00:00:00Z' + remote_created_at: '2021-11-10T00:00:00Z' + converted_date: '2022-03-10T00:00:00Z' + converted_contact: converted_contact + converted_account: converted_account + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /leads + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + value: + key: value + metaPostRetrieve: + path: /crm/v1/leads/meta/post + method: GET + auth: true + docs: Returns metadata for `Lead` POSTs. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + remoteFieldClassesList: + path: /crm/v1/leads/remote-field-classes + method: GET + auth: true + docs: Returns a list of `RemoteFieldClass` objects. + source: + openapi: openapi/openapi.yml + request: + name: LeadsRemoteFieldClassesListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_common_model_field: + type: optional + docs: >- + If provided, will only return remote field classes with this + is_common_model_field value + is_custom: + type: optional + docs: >- + If provided, will only return remote fields classes with this + is_custom value + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: root.PaginatedRemoteFieldClassList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: id + display_name: display_name + remote_key_name: remote_key_name + description: description + is_custom: true + is_required: true + field_type: string + field_format: string + field_choices: + - {} + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/crm/linkToken.yml b/.mock/definition/crm/linkToken.yml new file mode 100644 index 0000000..036f826 --- /dev/null +++ b/.mock/definition/crm/linkToken.yml @@ -0,0 +1,135 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /crm/v1/link-token + method: POST + auth: true + docs: Creates a link token to be used when linking a new end user. + source: + openapi: openapi/openapi.yml + request: + name: EndUserDetailsRequest + body: + properties: + end_user_email_address: + type: string + docs: >- + Your end user's email address. This is purely for identification + purposes - setting this value will not cause any emails to be + sent. + validation: + minLength: 1 + maxLength: 100 + end_user_organization_name: + type: string + docs: Your end user's organization. + validation: + minLength: 1 + maxLength: 100 + end_user_origin_id: + type: string + docs: >- + This unique identifier typically represents the ID for your end + user in your product's database. This value must be distinct + from other Linked Accounts' unique identifiers. + validation: + minLength: 1 + maxLength: 100 + categories: + docs: The integration categories to show in Merge Link. + type: list + integration: + type: optional + docs: >- + The slug of a specific pre-selected integration for this linking + flow token. For examples of slugs, see + https://docs.merge.dev/guides/merge-link/single-integration/. + validation: + minLength: 1 + link_expiry_mins: + type: optional + docs: >- + An integer number of minutes between [30, 720 or 10080 if for a + Magic Link URL] for how long this token is valid. Defaults to + 30. + default: 30 + validation: + min: 30 + max: 10080 + should_create_magic_link_url: + type: optional + docs: >- + Whether to generate a Magic Link URL. Defaults to false. For + more information on Magic Link, see + https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. + default: false + hide_admin_magic_link: + type: optional + docs: >- + Whether to generate a Magic Link URL on the Admin Needed screen + during the linking flow. Defaults to false. For more information + on Magic Link, see + https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. + default: false + common_models: + type: optional> + docs: >- + An array of objects to specify the models and fields that will + be disabled for a given Linked Account. Each object uses + model_id, enabled_actions, and disabled_fields to specify the + model, method, and fields that are scoped for a given Linked + Account. + category_common_model_scopes: + type: >- + optional>>> + docs: >- + 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: + type: optional + docs: >- + The following subset of IETF language tags can be used to + configure localization. + + + * `en` - en + + * `de` - de + are_syncs_disabled: + type: optional + docs: >- + The boolean that indicates whether initial, periodic, and force + syncs will be disabled. + default: false + integration_specific_config: + type: optional> + docs: >- + A JSON object containing integration-specific configuration + options. + content-type: application/json + response: + docs: '' + type: root.LinkToken + status-code: 200 + examples: + - request: + end_user_email_address: example@gmail.com + end_user_organization_name: Test Organization + end_user_origin_id: '12345' + categories: + - hris + - ats + response: + body: + link_token: necdP7FtdASl1fQwm62be2_dM4wBG8_GactqoUV0 + integration_name: Lever + magic_link_url: https://link.merge.dev/asdfjkl12345jsndfgi2i83n + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/crm/linkedAccounts.yml b/.mock/definition/crm/linkedAccounts.yml new file mode 100644 index 0000000..c6f4399 --- /dev/null +++ b/.mock/definition/crm/linkedAccounts.yml @@ -0,0 +1,148 @@ +types: + LinkedAccountsListRequestCategory: + enum: + - accounting + - ats + - crm + - filestorage + - hris + - mktg + - ticketing + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /crm/v1/linked-accounts + method: GET + auth: true + docs: List linked accounts for your organization. + source: + openapi: openapi/openapi.yml + request: + name: LinkedAccountsListRequest + query-parameters: + category: + type: optional + docs: >- + Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, + `mktg`, `ticketing` + + + * `hris` - hris + + * `ats` - ats + + * `accounting` - accounting + + * `ticketing` - ticketing + + * `crm` - crm + + * `mktg` - mktg + + * `filestorage` - filestorage + cursor: + type: optional + docs: The pagination cursor value. + end_user_email_address: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given email address. + end_user_organization_name: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given organization name. + end_user_origin_id: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given origin ID. + end_user_origin_ids: + type: optional + docs: >- + Comma-separated list of EndUser origin IDs, making it possible to + specify multiple EndUsers at once. + id: + type: optional + validation: + format: uuid + ids: + type: optional + docs: >- + Comma-separated list of LinkedAccount IDs, making it possible to + specify multiple LinkedAccounts at once. + include_duplicates: + type: optional + docs: >- + If `true`, will include complete production duplicates of the + account specified by the `id` query parameter in the response. + `id` must be for a complete production linked account. + integration_name: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given integration name. + is_test_account: + type: optional + docs: >- + If included, will only include test linked accounts. If not + included, will only include non-test linked accounts. + page_size: + type: optional + docs: Number of results to return per page. + status: + type: optional + docs: >- + Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, + `RELINK_NEEDED` + response: + docs: '' + type: root.PaginatedAccountDetailsAndActionsList + status-code: 200 + examples: + - response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: e59b1821-f85c-4e28-a6b3-1804156f3563 + category: hris + status: COMPLETE + status_detail: Invalid login credentials + end_user_origin_id: 3ac95cde-6c7f-4eef-afec-be710b42308d + end_user_organization_name: Foo Bar, LLC + end_user_email_address: hradmin@foobar.dev + subdomain: foobar + webhook_listener_url: >- + https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 + is_duplicate: true + integration: + name: name + categories: + - hris + color: color + slug: slug + passthrough_available: true + available_model_operations: + - model_name: Candidate + available_operations: + - FETCH + - CREATE + required_post_parameters: + - remote_user_id + supported_fields: + - first_name + - last_name + - company + - title + account_type: PRODUCTION + completed_at: '2024-08-26T20:11:19Z' + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/crm/notes.yml b/.mock/definition/crm/notes.yml new file mode 100644 index 0000000..df9293a --- /dev/null +++ b/.mock/definition/crm/notes.yml @@ -0,0 +1,577 @@ +types: + NotesListRequestExpand: + enum: + - account + - value: account,opportunity + name: AccountOpportunity + - contact + - value: contact,account + name: ContactAccount + - value: contact,account,opportunity + name: ContactAccountOpportunity + - value: contact,opportunity + name: ContactOpportunity + - opportunity + - owner + - value: owner,account + name: OwnerAccount + - value: owner,account,opportunity + name: OwnerAccountOpportunity + - value: owner,contact + name: OwnerContact + - value: owner,contact,account + name: OwnerContactAccount + - value: owner,contact,account,opportunity + name: OwnerContactAccountOpportunity + - value: owner,contact,opportunity + name: OwnerContactOpportunity + - value: owner,opportunity + name: OwnerOpportunity + source: + openapi: openapi/openapi.yml + NotesRetrieveRequestExpand: + enum: + - account + - value: account,opportunity + name: AccountOpportunity + - contact + - value: contact,account + name: ContactAccount + - value: contact,account,opportunity + name: ContactAccountOpportunity + - value: contact,opportunity + name: ContactOpportunity + - opportunity + - owner + - value: owner,account + name: OwnerAccount + - value: owner,account,opportunity + name: OwnerAccountOpportunity + - value: owner,contact + name: OwnerContact + - value: owner,contact,account + name: OwnerContactAccount + - value: owner,contact,account,opportunity + name: OwnerContactAccountOpportunity + - value: owner,contact,opportunity + name: OwnerContactOpportunity + - value: owner,opportunity + name: OwnerOpportunity + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /crm/v1/notes + method: GET + auth: true + docs: Returns a list of `Note` objects. + source: + openapi: openapi/openapi.yml + request: + name: NotesListRequest + query-parameters: + account_id: + type: optional + docs: If provided, will only return notes with this account. + contact_id: + type: optional + docs: If provided, will only return notes with this contact. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + opportunity_id: + type: optional + docs: If provided, will only return notes with this opportunity. + owner_id: + type: optional + docs: If provided, will only return notes with this owner. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: root.PaginatedNoteList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 550e8400-e29b-41d4-a716-446655440000 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + owner: owner + content: Merge is hiring! + contact: contact + account: account + opportunity: opportunity + remote_updated_at: '2022-02-10T00:00:00Z' + remote_created_at: '2021-11-10T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /notes + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + create: + path: /crm/v1/notes + method: POST + auth: true + docs: Creates a `Note` object with the given values. + source: + openapi: openapi/openapi.yml + request: + name: NoteEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: root.NoteRequest + content-type: application/json + response: + docs: '' + type: root.NoteResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: 550e8400-e29b-41d4-a716-446655440000 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + owner: owner + content: Merge is hiring! + contact: contact + account: account + opportunity: opportunity + remote_updated_at: '2022-02-10T00:00:00Z' + remote_created_at: '2021-11-10T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /notes + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /crm/v1/notes/{id} + method: GET + auth: true + docs: Returns a `Note` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: NotesRetrieveRequest + query-parameters: + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.Note + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 550e8400-e29b-41d4-a716-446655440000 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + owner: owner + content: Merge is hiring! + contact: contact + account: account + opportunity: opportunity + remote_updated_at: '2022-02-10T00:00:00Z' + remote_created_at: '2021-11-10T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /notes + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + value: + key: value + metaPostRetrieve: + path: /crm/v1/notes/meta/post + method: GET + auth: true + docs: Returns metadata for `Note` POSTs. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + remoteFieldClassesList: + path: /crm/v1/notes/remote-field-classes + method: GET + auth: true + docs: Returns a list of `RemoteFieldClass` objects. + source: + openapi: openapi/openapi.yml + request: + name: NotesRemoteFieldClassesListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_common_model_field: + type: optional + docs: >- + If provided, will only return remote field classes with this + is_common_model_field value + is_custom: + type: optional + docs: >- + If provided, will only return remote fields classes with this + is_custom value + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: root.PaginatedRemoteFieldClassList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: id + display_name: display_name + remote_key_name: remote_key_name + description: description + is_custom: true + is_required: true + field_type: string + field_format: string + field_choices: + - {} + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/crm/opportunities.yml b/.mock/definition/crm/opportunities.yml new file mode 100644 index 0000000..4a0253a --- /dev/null +++ b/.mock/definition/crm/opportunities.yml @@ -0,0 +1,868 @@ +types: + OpportunitiesListRequestExpand: + enum: + - account + - owner + - value: owner,account + name: OwnerAccount + - value: owner,stage + name: OwnerStage + - value: owner,stage,account + name: OwnerStageAccount + - stage + - value: stage,account + name: StageAccount + source: + openapi: openapi/openapi.yml + OpportunitiesListRequestStatus: + enum: + - LOST + - OPEN + - WON + source: + openapi: openapi/openapi.yml + OpportunitiesRetrieveRequestExpand: + enum: + - account + - owner + - value: owner,account + name: OwnerAccount + - value: owner,stage + name: OwnerStage + - value: owner,stage,account + name: OwnerStageAccount + - stage + - value: stage,account + name: StageAccount + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /crm/v1/opportunities + method: GET + auth: true + docs: Returns a list of `Opportunity` objects. + source: + openapi: openapi/openapi.yml + request: + name: OpportunitiesListRequest + query-parameters: + account_id: + type: optional + docs: If provided, will only return opportunities with this account. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + owner_id: + type: optional + docs: If provided, will only return opportunities with this owner. + page_size: + type: optional + docs: Number of results to return per page. + remote_created_after: + type: optional + docs: >- + If provided, will only return opportunities created in the third + party platform after this datetime. + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + remote_id: + type: optional + docs: The API provider's ID for the given object. + show_enum_origins: + type: optional> + docs: >- + 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: + type: optional + docs: If provided, will only return opportunities with this stage. + status: + type: optional + docs: >- + If provided, will only return opportunities with this status. + Options: ('OPEN', 'WON', 'LOST') + + + * `OPEN` - OPEN + + * `WON` - WON + + * `LOST` - LOST + response: + docs: '' + type: root.PaginatedOpportunityList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 550e8400-e29b-41d4-a716-446655440000 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Needs Integrations + description: Needs a Unified API for Integrations! + amount: 100000 + owner: owner + account: account + stage: stage + status: OPEN + last_activity_at: '2022-02-10T00:00:00Z' + close_date: '2022-02-10T00:00:00Z' + remote_created_at: '2021-11-10T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /opportunities + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + create: + path: /crm/v1/opportunities + method: POST + auth: true + docs: Creates an `Opportunity` object with the given values. + source: + openapi: openapi/openapi.yml + request: + name: OpportunityEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: root.OpportunityRequest + content-type: application/json + response: + docs: '' + type: root.OpportunityResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: 550e8400-e29b-41d4-a716-446655440000 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Needs Integrations + description: Needs a Unified API for Integrations! + amount: 100000 + owner: owner + account: account + stage: stage + status: OPEN + last_activity_at: '2022-02-10T00:00:00Z' + close_date: '2022-02-10T00:00:00Z' + remote_created_at: '2021-11-10T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /opportunities + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /crm/v1/opportunities/{id} + method: GET + auth: true + docs: Returns an `Opportunity` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: OpportunitiesRetrieveRequest + query-parameters: + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: root.Opportunity + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 550e8400-e29b-41d4-a716-446655440000 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Needs Integrations + description: Needs a Unified API for Integrations! + amount: 100000 + owner: owner + account: account + stage: stage + status: OPEN + last_activity_at: '2022-02-10T00:00:00Z' + close_date: '2022-02-10T00:00:00Z' + remote_created_at: '2021-11-10T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /opportunities + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + value: + key: value + partialUpdate: + path: /crm/v1/opportunities/{id} + method: PATCH + auth: true + docs: Updates an `Opportunity` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: PatchedOpportunityEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: root.PatchedOpportunityRequest + content-type: application/json + response: + docs: '' + type: root.OpportunityResponse + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + request: + model: {} + response: + body: + model: + id: 550e8400-e29b-41d4-a716-446655440000 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Needs Integrations + description: Needs a Unified API for Integrations! + amount: 100000 + owner: owner + account: account + stage: stage + status: OPEN + last_activity_at: '2022-02-10T00:00:00Z' + close_date: '2022-02-10T00:00:00Z' + remote_created_at: '2021-11-10T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /opportunities + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + metaPatchRetrieve: + path: /crm/v1/opportunities/meta/patch/{id} + method: GET + auth: true + docs: Returns metadata for `Opportunity` PATCHs. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + response: + docs: '' + type: root.MetaResponse + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + metaPostRetrieve: + path: /crm/v1/opportunities/meta/post + method: GET + auth: true + docs: Returns metadata for `Opportunity` POSTs. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + remoteFieldClassesList: + path: /crm/v1/opportunities/remote-field-classes + method: GET + auth: true + docs: Returns a list of `RemoteFieldClass` objects. + source: + openapi: openapi/openapi.yml + request: + name: OpportunitiesRemoteFieldClassesListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_common_model_field: + type: optional + docs: >- + If provided, will only return remote field classes with this + is_common_model_field value + is_custom: + type: optional + docs: >- + If provided, will only return remote fields classes with this + is_custom value + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: root.PaginatedRemoteFieldClassList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: id + display_name: display_name + remote_key_name: remote_key_name + description: description + is_custom: true + is_required: true + field_type: string + field_format: string + field_choices: + - {} + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/crm/passthrough.yml b/.mock/definition/crm/passthrough.yml new file mode 100644 index 0000000..902b459 --- /dev/null +++ b/.mock/definition/crm/passthrough.yml @@ -0,0 +1,40 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /crm/v1/passthrough + method: POST + auth: true + docs: Pull data from an endpoint not currently supported by Merge. + source: + openapi: openapi/openapi.yml + request: + body: root.DataPassthroughRequest + content-type: application/json + response: + docs: '' + type: root.RemoteResponse + status-code: 200 + examples: + - headers: {} + request: + method: GET + path: /scooters + response: + body: + method: GET + path: /scooters + status: 200 + response: + key: value + response_headers: + X-Page-Token: value + response_type: JSON + headers: + EXTRA-HEADER: value + Authorization: + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/crm/regenerateKey.yml b/.mock/definition/crm/regenerateKey.yml new file mode 100644 index 0000000..06a1b85 --- /dev/null +++ b/.mock/definition/crm/regenerateKey.yml @@ -0,0 +1,36 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /crm/v1/regenerate-key + method: POST + auth: true + docs: Exchange remote keys. + source: + openapi: openapi/openapi.yml + request: + name: RemoteKeyForRegenerationRequest + body: + properties: + name: + type: string + docs: The name of the remote key + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: root.RemoteKey + status-code: 200 + examples: + - request: + name: Remote Deployment Key 1 + response: + body: + name: Remote Deployment Key 1 + key: hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/crm/scopes.yml b/.mock/definition/crm/scopes.yml new file mode 100644 index 0000000..67286e7 --- /dev/null +++ b/.mock/definition/crm/scopes.yml @@ -0,0 +1,160 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + default_scopes_retrieve: + path: /crm/v1/default-scopes + method: GET + auth: true + docs: >- + 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/5950052-common-model-and-field-scopes). + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.CommonModelScopeApi + status-code: 200 + examples: + - response: + body: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - created_at + - custom_fields + - date_of_birth + - first_name + - gender + - remote_created_at + - remote_data + disabled_fields: + - company + - employments + - groups + - home_location + - manager + - work_location + linked_account_scopes_retrieve: + path: /crm/v1/linked-account-scopes + method: GET + auth: true + docs: >- + Get all available permissions for Merge Common Models and fields for a + single Linked Account. [Learn + more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.CommonModelScopeApi + status-code: 200 + examples: + - headers: {} + response: + body: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - created_at + - custom_fields + - date_of_birth + - first_name + - gender + - remote_created_at + - remote_data + disabled_fields: + - company + - employments + - groups + - home_location + - manager + - work_location + linked_account_scopes_create: + path: /crm/v1/linked-account-scopes + method: POST + auth: true + docs: >- + 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/5950052-common-model-and-field-scopes) + source: + openapi: openapi/openapi.yml + request: + name: LinkedAccountCommonModelScopeDeserializerRequest + body: + properties: + common_models: + docs: The common models you want to update the scopes for + type: list + content-type: application/json + response: + docs: '' + type: root.CommonModelScopeApi + status-code: 200 + examples: + - headers: {} + request: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - home_location + disabled_fields: + - work_location + - model_name: Benefit + model_permissions: + WRITE: + is_enabled: false + response: + body: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - created_at + - custom_fields + - date_of_birth + - first_name + - gender + - remote_created_at + - remote_data + disabled_fields: + - company + - employments + - groups + - home_location + - manager + - work_location + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/crm/stages.yml b/.mock/definition/crm/stages.yml new file mode 100644 index 0000000..a8676fa --- /dev/null +++ b/.mock/definition/crm/stages.yml @@ -0,0 +1,222 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /crm/v1/stages + method: GET + auth: true + docs: Returns a list of `Stage` objects. + source: + openapi: openapi/openapi.yml + request: + name: StagesListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: root.PaginatedStageList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 0358cbc6-2040-430a-848e-aafacbadf3aa + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Closed Won + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /stages + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + retrieve: + path: /crm/v1/stages/{id} + method: GET + auth: true + docs: Returns a `Stage` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: StagesRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.Stage + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 0358cbc6-2040-430a-848e-aafacbadf3aa + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Closed Won + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /stages + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + value: + key: value + remoteFieldClassesList: + path: /crm/v1/stages/remote-field-classes + method: GET + auth: true + docs: Returns a list of `RemoteFieldClass` objects. + source: + openapi: openapi/openapi.yml + request: + name: StagesRemoteFieldClassesListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_common_model_field: + type: optional + docs: >- + If provided, will only return remote field classes with this + is_common_model_field value + is_custom: + type: optional + docs: >- + If provided, will only return remote fields classes with this + is_custom value + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: root.PaginatedRemoteFieldClassList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: id + display_name: display_name + remote_key_name: remote_key_name + description: description + is_custom: true + is_required: true + field_type: string + field_format: string + field_choices: + - {} + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/crm/syncStatus.yml b/.mock/definition/crm/syncStatus.yml new file mode 100644 index 0000000..52d8c36 --- /dev/null +++ b/.mock/definition/crm/syncStatus.yml @@ -0,0 +1,55 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /crm/v1/sync-status + method: GET + auth: true + docs: >- + Get sync status for the current sync and the most recently finished + sync. `last_sync_start` represents the most recent time any sync began. + `last_sync_finished` represents the most recent time any sync completed. + These timestamps may correspond to different sync instances which may + result in a sync start time being later than a separate sync completed + time. To ensure you are retrieving the latest available data reference + the `last_sync_finished` timestamp where `last_sync_result` is `DONE`. + Possible values for `status` and `last_sync_result` are `DISABLED`, + `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more + about sync status in our [Help + Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). + source: + openapi: openapi/openapi.yml + request: + name: SyncStatusListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: root.PaginatedSyncStatusList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - model_name: Account + model_id: crm.Account + last_sync_start: '2021-03-30T19:44:18Z' + next_sync_start: '2021-03-30T20:44:18Z' + last_sync_result: SYNCING + last_sync_finished: '2021-03-30T19:55:18Z' + status: SYNCING + is_initial_sync: true + selective_sync_configurations_usage: IN_NEXT_SYNC + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/crm/tasks.yml b/.mock/definition/crm/tasks.yml new file mode 100644 index 0000000..befb0c5 --- /dev/null +++ b/.mock/definition/crm/tasks.yml @@ -0,0 +1,807 @@ +types: + TasksListRequestExpand: + enum: + - account + - value: account,opportunity + name: AccountOpportunity + - opportunity + - owner + - value: owner,account + name: OwnerAccount + - value: owner,account,opportunity + name: OwnerAccountOpportunity + - value: owner,opportunity + name: OwnerOpportunity + source: + openapi: openapi/openapi.yml + TasksRetrieveRequestExpand: + enum: + - account + - value: account,opportunity + name: AccountOpportunity + - opportunity + - owner + - value: owner,account + name: OwnerAccount + - value: owner,account,opportunity + name: OwnerAccountOpportunity + - value: owner,opportunity + name: OwnerOpportunity + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /crm/v1/tasks + method: GET + auth: true + docs: Returns a list of `Task` objects. + source: + openapi: openapi/openapi.yml + request: + name: TasksListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: root.PaginatedTaskList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 550e8400-e29b-41d4-a716-446655440000 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + subject: Contact about Integration Strategy + content: Follow up to see whether they need integrations + owner: owner + account: account + opportunity: opportunity + completed_date: '2022-02-11T00:00:00Z' + due_date: '2022-02-10T00:00:00Z' + status: OPEN + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /tasks + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + create: + path: /crm/v1/tasks + method: POST + auth: true + docs: Creates a `Task` object with the given values. + source: + openapi: openapi/openapi.yml + request: + name: TaskEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: root.TaskRequest + content-type: application/json + response: + docs: '' + type: root.TaskResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: 550e8400-e29b-41d4-a716-446655440000 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + subject: Contact about Integration Strategy + content: Follow up to see whether they need integrations + owner: owner + account: account + opportunity: opportunity + completed_date: '2022-02-11T00:00:00Z' + due_date: '2022-02-10T00:00:00Z' + status: OPEN + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /tasks + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /crm/v1/tasks/{id} + method: GET + auth: true + docs: Returns a `Task` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: TasksRetrieveRequest + query-parameters: + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.Task + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 550e8400-e29b-41d4-a716-446655440000 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + subject: Contact about Integration Strategy + content: Follow up to see whether they need integrations + owner: owner + account: account + opportunity: opportunity + completed_date: '2022-02-11T00:00:00Z' + due_date: '2022-02-10T00:00:00Z' + status: OPEN + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /tasks + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + value: + key: value + partialUpdate: + path: /crm/v1/tasks/{id} + method: PATCH + auth: true + docs: Updates a `Task` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: PatchedTaskEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: root.PatchedTaskRequest + content-type: application/json + response: + docs: '' + type: root.TaskResponse + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + request: + model: {} + response: + body: + model: + id: 550e8400-e29b-41d4-a716-446655440000 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + subject: Contact about Integration Strategy + content: Follow up to see whether they need integrations + owner: owner + account: account + opportunity: opportunity + completed_date: '2022-02-11T00:00:00Z' + due_date: '2022-02-10T00:00:00Z' + status: OPEN + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /tasks + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + metaPatchRetrieve: + path: /crm/v1/tasks/meta/patch/{id} + method: GET + auth: true + docs: Returns metadata for `Task` PATCHs. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + response: + docs: '' + type: root.MetaResponse + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + metaPostRetrieve: + path: /crm/v1/tasks/meta/post + method: GET + auth: true + docs: Returns metadata for `Task` POSTs. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + remoteFieldClassesList: + path: /crm/v1/tasks/remote-field-classes + method: GET + auth: true + docs: Returns a list of `RemoteFieldClass` objects. + source: + openapi: openapi/openapi.yml + request: + name: TasksRemoteFieldClassesListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_common_model_field: + type: optional + docs: >- + If provided, will only return remote field classes with this + is_common_model_field value + is_custom: + type: optional + docs: >- + If provided, will only return remote fields classes with this + is_custom value + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: root.PaginatedRemoteFieldClassList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: id + display_name: display_name + remote_key_name: remote_key_name + description: description + is_custom: true + is_required: true + field_type: string + field_format: string + field_choices: + - {} + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/crm/users.yml b/.mock/definition/crm/users.yml new file mode 100644 index 0000000..6762984 --- /dev/null +++ b/.mock/definition/crm/users.yml @@ -0,0 +1,251 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /crm/v1/users + method: GET + auth: true + docs: Returns a list of `User` objects. + source: + openapi: openapi/openapi.yml + request: + name: UsersListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + email: + type: optional + docs: If provided, will only return users with this email. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: root.PaginatedUserList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 0358cbc6-2040-430a-848e-aafacbadf3aa + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Gil Feig + email: merge_is_hiring@merge.dev + is_active: true + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /users + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + retrieve: + path: /crm/v1/users/{id} + method: GET + auth: true + docs: Returns a `User` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: UsersRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.User + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 0358cbc6-2040-430a-848e-aafacbadf3aa + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Gil Feig + email: merge_is_hiring@merge.dev + is_active: true + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /users + data: + - Varies by platform + remote_fields: + - remote_field_class: remote_field_class + value: + key: value + ignoreCreate: + path: /crm/v1/users/ignore/{model_id} + method: POST + auth: true + docs: >- + Ignores a specific row based on the `model_id` in the url. These records + will have their properties set to null, and will not be updated in + future syncs. The "reason" and "message" fields in the request body will + be stored for audit purposes. + source: + openapi: openapi/openapi.yml + path-parameters: + model_id: string + request: + body: root.IgnoreCommonModelRequest + content-type: application/json + examples: + - path-parameters: + model_id: model_id + headers: {} + request: + reason: GENERAL_CUSTOMER_REQUEST + remoteFieldClassesList: + path: /crm/v1/users/remote-field-classes + method: GET + auth: true + docs: Returns a list of `RemoteFieldClass` objects. + source: + openapi: openapi/openapi.yml + request: + name: UsersRemoteFieldClassesListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_common_model_field: + type: optional + docs: >- + If provided, will only return remote field classes with this + is_common_model_field value + is_custom: + type: optional + docs: >- + If provided, will only return remote fields classes with this + is_custom value + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: root.PaginatedRemoteFieldClassList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: id + display_name: display_name + remote_key_name: remote_key_name + description: description + is_custom: true + is_required: true + field_type: string + field_format: string + field_choices: + - {} + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/crm/webhookReceivers.yml b/.mock/definition/crm/webhookReceivers.yml new file mode 100644 index 0000000..c68cd98 --- /dev/null +++ b/.mock/definition/crm/webhookReceivers.yml @@ -0,0 +1,61 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /crm/v1/webhook-receivers + method: GET + auth: true + docs: Returns a list of `WebhookReceiver` objects. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: list + status-code: 200 + examples: + - headers: {} + response: + body: + - event: event + is_active: true + key: key + create: + path: /crm/v1/webhook-receivers + method: POST + auth: true + docs: Creates a `WebhookReceiver` object with the given values. + source: + openapi: openapi/openapi.yml + request: + name: WebhookReceiverRequest + body: + properties: + event: + type: string + validation: + minLength: 1 + is_active: boolean + key: + type: optional + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: root.WebhookReceiver + status-code: 201 + examples: + - headers: {} + request: + event: event + is_active: true + response: + body: + event: event + is_active: true + key: key + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/filestorage/__package__.yml b/.mock/definition/filestorage/__package__.yml new file mode 100644 index 0000000..1d955bc --- /dev/null +++ b/.mock/definition/filestorage/__package__.yml @@ -0,0 +1,2137 @@ +types: + AccountDetails: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + integration: + type: optional + access: read-only + integration_slug: + type: optional + access: read-only + category: optional + end_user_origin_id: + type: optional + access: read-only + end_user_organization_name: + type: optional + access: read-only + end_user_email_address: + type: optional + validation: + format: email + access: read-only + status: + type: optional + access: read-only + webhook_listener_url: + type: optional + validation: + format: uri + access: read-only + is_duplicate: + type: optional + docs: >- + 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. + access: read-only + account_type: + type: optional + access: read-only + completed_at: + type: optional + docs: The time at which account completes the linking flow. + source: + openapi: openapi/openapi.yml + AccountDetailsAndActions: + docs: >- + # The LinkedAccount Object + + ### Description + + The `LinkedAccount` object is used to represent an end user's link with a + specific integration. + + + ### Usage Example + + View a list of your organization's `LinkedAccount` objects. + properties: + id: string + category: optional + status: AccountDetailsAndActionsStatusEnum + status_detail: optional + end_user_origin_id: optional + end_user_organization_name: string + end_user_email_address: string + subdomain: + type: optional + docs: The tenant or domain the customer has provided access to. + webhook_listener_url: string + is_duplicate: + type: optional + docs: >- + 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. + integration: optional + account_type: string + completed_at: datetime + integration_specific_fields: optional> + source: + openapi: openapi/openapi.yml + AccountDetailsAndActionsIntegration: + properties: + name: string + categories: list + image: optional + square_image: optional + color: string + slug: string + passthrough_available: boolean + available_model_operations: optional> + source: + openapi: openapi/openapi.yml + AccountDetailsAndActionsStatusEnum: + enum: + - COMPLETE + - INCOMPLETE + - RELINK_NEEDED + - IDLE + docs: |- + * `COMPLETE` - COMPLETE + * `INCOMPLETE` - INCOMPLETE + * `RELINK_NEEDED` - RELINK_NEEDED + * `IDLE` - IDLE + source: + openapi: openapi/openapi.yml + AccountIntegration: + properties: + name: + type: string + docs: Company name. + abbreviated_name: + type: optional + docs: >- + Optional. This shortened name appears in places with limited space, + usually in conjunction with the platform's logo (e.g., Merge Link + menu).

Example: Workforce Now (in lieu of ADP Workforce + Now), SuccessFactors (in lieu of SAP SuccessFactors) + categories: + type: optional> + docs: >- + Category or categories this integration belongs to. Multiple + categories should be comma separated, i.e. [ats, hris]. + access: read-only + image: + type: optional + docs: Company logo in rectangular shape. + validation: + format: uri + square_image: + type: optional + docs: Company logo in square shape. + validation: + format: uri + color: + type: optional + docs: >- + The color of this integration used for buttons and text throughout the + app and landing pages. Choose a darker, saturated color. + validation: + pattern: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ + maxLength: 18 + slug: + type: optional + access: read-only + api_endpoints_to_documentation_urls: + type: optional> + docs: >- + Mapping of API endpoints to documentation urls for support. Example: + {'GET': [['/common-model-scopes', + 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', + 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], + 'POST': []} + webhook_setup_guide_url: + type: optional + docs: >- + Setup guide URL for third party webhook creation. Exposed in Merge + Docs. + category_beta_status: + type: optional> + docs: Category or categories this integration is in beta status for. + access: read-only + source: + openapi: openapi/openapi.yml + AccountToken: + properties: + account_token: string + integration: AccountIntegration + id: string + source: + openapi: openapi/openapi.yml + AdvancedMetadata: + properties: + id: + type: string + validation: + format: uuid + display_name: optional + description: optional + is_required: optional + is_custom: optional + field_choices: optional> + source: + openapi: openapi/openapi.yml + AsyncPassthroughReciept: + properties: + async_passthrough_receipt_id: + type: string + validation: + format: uuid + source: + openapi: openapi/openapi.yml + AuditLogEvent: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + user_name: + type: optional + docs: The User's full name at the time of this Event occurring. + validation: + maxLength: 200 + user_email: + type: optional + docs: The User's email at the time of this Event occurring. + validation: + format: email + maxLength: 254 + role: + type: RoleEnum + docs: >- + Designates the role of the user (or SYSTEM/API if action not taken by + a user) at the time of this Event occurring. + + + * `ADMIN` - ADMIN + + * `DEVELOPER` - DEVELOPER + + * `MEMBER` - MEMBER + + * `API` - API + + * `SYSTEM` - SYSTEM + + * `MERGE_TEAM` - MERGE_TEAM + ip_address: + type: string + validation: + maxLength: 45 + event_type: + type: EventTypeEnum + docs: >- + Designates the type of event that occurred. + + + * `CREATED_REMOTE_PRODUCTION_API_KEY` - + CREATED_REMOTE_PRODUCTION_API_KEY + + * `DELETED_REMOTE_PRODUCTION_API_KEY` - + DELETED_REMOTE_PRODUCTION_API_KEY + + * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + + * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + + * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + + * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + + * `INVITED_USER` - INVITED_USER + + * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + + * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + + * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + + * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - + DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + + * `CREATED_DESTINATION` - CREATED_DESTINATION + + * `DELETED_DESTINATION` - DELETED_DESTINATION + + * `CHANGED_DESTINATION` - CHANGED_DESTINATION + + * `CHANGED_SCOPES` - CHANGED_SCOPES + + * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + + * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + + * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + + * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + + * `ENABLED_CATEGORY` - ENABLED_CATEGORY + + * `DISABLED_CATEGORY` - DISABLED_CATEGORY + + * `CHANGED_PASSWORD` - CHANGED_PASSWORD + + * `RESET_PASSWORD` - RESET_PASSWORD + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - + CREATED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - + CREATED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - + CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + + * `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 + + * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + + * `MUTED_ISSUE` - MUTED_ISSUE + + * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + + * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + + * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + + * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + + * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + event_description: string + created_at: + type: optional + access: read-only + source: + openapi: openapi/openapi.yml + AvailableActions: + docs: >- + # The AvailableActions Object + + ### Description + + The `Activity` object is used to see all available model/operation + combinations for an integration. + + + ### Usage Example + + Fetch all the actions available for the `Zenefits` integration. + properties: + integration: AccountIntegration + passthrough_available: boolean + available_model_operations: optional> + source: + openapi: openapi/openapi.yml + CategoriesEnum: + enum: + - hris + - ats + - accounting + - ticketing + - crm + - mktg + - filestorage + docs: |- + * `hris` - hris + * `ats` - ats + * `accounting` - accounting + * `ticketing` - ticketing + * `crm` - crm + * `mktg` - mktg + * `filestorage` - filestorage + source: + openapi: openapi/openapi.yml + CategoryEnum: + enum: + - hris + - ats + - accounting + - ticketing + - crm + - mktg + - filestorage + docs: |- + * `hris` - hris + * `ats` - ats + * `accounting` - accounting + * `ticketing` - ticketing + * `crm` - crm + * `mktg` - mktg + * `filestorage` - filestorage + source: + openapi: openapi/openapi.yml + CommonModelScopeApi: + properties: + common_models: + docs: The common models you want to update the scopes for + type: list + source: + openapi: openapi/openapi.yml + CommonModelScopesBodyRequest: + properties: + model_id: + type: string + validation: + minLength: 1 + enabled_actions: list + disabled_fields: list + source: + openapi: openapi/openapi.yml + DataPassthroughRequest: + docs: >- + # The DataPassthrough Object + + ### Description + + The `DataPassthrough` object is used to send information to an + otherwise-unsupported third-party endpoint. + + + ### Usage Example + + Create a `DataPassthrough` to get team hierarchies from your Rippling + integration. + properties: + method: MethodEnum + path: + type: string + docs: The path of the request in the third party's platform. + validation: + minLength: 1 + base_url_override: + type: optional + docs: An optional override of the third party's base url for the request. + validation: + minLength: 1 + data: + type: optional + docs: >- + The data with the request. You must include a `request_format` + parameter matching the data's format + validation: + minLength: 1 + multipart_form_data: + type: optional> + docs: >- + Pass an array of `MultipartFormField` objects in here instead of using + the `data` param if `request_format` is set to `MULTIPART`. + headers: + type: optional> + docs: >- + The headers to use for the request (Merge will handle the account's + authorization headers). `Content-Type` header is required for + passthrough. Choose content type corresponding to expected format of + receiving server. + request_format: optional + normalize_response: + type: optional + docs: >- + Optional. If true, the response will always be an object of the form + `{"type": T, "value": ...}` where `T` will be one of `string, boolean, + number, null, array, object`. + source: + openapi: openapi/openapi.yml + DebugModeLog: + properties: + log_id: string + dashboard_view: string + log_summary: DebugModelLogSummary + source: + openapi: openapi/openapi.yml + DebugModelLogSummary: + properties: + url: string + method: string + status_code: integer + source: + openapi: openapi/openapi.yml + DownloadRequestMeta: + properties: + id: string + url: string + method: string + headers: map + source: + openapi: openapi/openapi.yml + Drive: + docs: >- + # The Drive Object + + ### Description + + The `Drive` object is used to represent a drive that contains the folders + and files in the user's workspace. + + ### Usage Example + + Fetch from the `GET /api/filestorage/v1/drives` endpoint and view their + drives. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The drive's name. + validation: + maxLength: 254 + remote_created_at: + type: optional + docs: When the third party's drive was created. + drive_url: + type: optional + docs: The drive's url. + validation: + maxLength: 2000 + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + EnabledActionsEnum: + enum: + - READ + - WRITE + docs: |- + * `READ` - READ + * `WRITE` - WRITE + source: + openapi: openapi/openapi.yml + EncodingEnum: + enum: + - RAW + - BASE64 + - GZIP_BASE64 + docs: |- + * `RAW` - RAW + * `BASE64` - BASE64 + * `GZIP_BASE64` - GZIP_BASE64 + source: + openapi: openapi/openapi.yml + ErrorValidationProblem: + properties: + source: optional + title: string + detail: string + problem_type: string + source: + openapi: openapi/openapi.yml + EventTypeEnum: + enum: + - CREATED_REMOTE_PRODUCTION_API_KEY + - DELETED_REMOTE_PRODUCTION_API_KEY + - CREATED_TEST_API_KEY + - DELETED_TEST_API_KEY + - REGENERATED_PRODUCTION_API_KEY + - REGENERATED_WEBHOOK_SIGNATURE + - INVITED_USER + - TWO_FACTOR_AUTH_ENABLED + - TWO_FACTOR_AUTH_DISABLED + - DELETED_LINKED_ACCOUNT + - DELETED_ALL_COMMON_MODELS_FOR_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 + - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + - FORCED_LINKED_ACCOUNT_RESYNC + - MUTED_ISSUE + - GENERATED_MAGIC_LINK + - ENABLED_MERGE_WEBHOOK + - DISABLED_MERGE_WEBHOOK + - MERGE_WEBHOOK_TARGET_CHANGED + - END_USER_CREDENTIALS_ACCESSED + docs: >- + * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + + * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + + * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + + * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + + * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + + * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + + * `INVITED_USER` - INVITED_USER + + * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + + * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + + * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + + * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - + DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + + * `CREATED_DESTINATION` - CREATED_DESTINATION + + * `DELETED_DESTINATION` - DELETED_DESTINATION + + * `CHANGED_DESTINATION` - CHANGED_DESTINATION + + * `CHANGED_SCOPES` - CHANGED_SCOPES + + * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + + * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + + * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + + * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + + * `ENABLED_CATEGORY` - ENABLED_CATEGORY + + * `DISABLED_CATEGORY` - DISABLED_CATEGORY + + * `CHANGED_PASSWORD` - CHANGED_PASSWORD + + * `RESET_PASSWORD` - RESET_PASSWORD + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - + CREATED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - + CREATED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - + CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + + * `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 + + * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + + * `MUTED_ISSUE` - MUTED_ISSUE + + * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + + * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + + * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + + * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + + * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + source: + openapi: openapi/openapi.yml + ExternalTargetFieldApi: + properties: + name: + type: optional + access: read-only + description: + type: optional + access: read-only + is_mapped: + type: optional + access: read-only + source: + openapi: openapi/openapi.yml + ExternalTargetFieldApiResponse: + properties: + File: optional> + Folder: optional> + Drive: optional> + Group: optional> + User: optional> + source: + openapi: openapi/openapi.yml + FieldMappingApiInstanceTargetField: + properties: + name: string + description: string + is_organization_wide: boolean + source: + openapi: openapi/openapi.yml + inline: true + FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo: + properties: + method: optional + url_path: optional + field_traversal_path: optional> + source: + openapi: openapi/openapi.yml + inline: true + FieldMappingApiInstanceRemoteField: + properties: + remote_key_name: optional + schema: optional> + remote_endpoint_info: FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo + source: + openapi: openapi/openapi.yml + inline: true + FieldMappingApiInstance: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + is_integration_wide: + type: optional + access: read-only + target_field: + type: optional + access: read-only + remote_field: + type: optional + access: read-only + source: + openapi: openapi/openapi.yml + FieldMappingApiInstanceResponse: + properties: + File: optional> + Folder: optional> + Drive: optional> + Group: optional> + User: optional> + source: + openapi: openapi/openapi.yml + FieldMappingInstanceResponse: + properties: + model: FieldMappingApiInstance + warnings: list + errors: list + logs: optional> + source: + openapi: openapi/openapi.yml + FieldPermissionDeserializer: + properties: + enabled_fields: optional> + disabled_fields: optional> + source: + openapi: openapi/openapi.yml + FieldPermissionDeserializerRequest: + properties: + enabled_fields: optional> + disabled_fields: optional> + source: + openapi: openapi/openapi.yml + FileFolder: + discriminated: false + docs: The folder that the file belongs to. + union: + - type: string + validation: + format: uuid + - Folder + source: + openapi: openapi/openapi.yml + inline: true + FilePermissionsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Permission + source: + openapi: openapi/openapi.yml + inline: true + FilePermissions: + discriminated: false + docs: >- + The Permission object is used to represent a user's or group's access to a + File or Folder. Permissions are unexpanded by default. Use the query param + `expand=permissions` to see more details under `GET /files`. + union: + - type: string + validation: + format: uuid + - Permission + - list + source: + openapi: openapi/openapi.yml + inline: true + FileDrive: + discriminated: false + docs: The drive that the file belongs to. + union: + - type: string + validation: + format: uuid + - Drive + source: + openapi: openapi/openapi.yml + inline: true + File: + docs: >- + # The File Object + + ### Description + + The `File` object is used to represent a file in the workspace. The Object + typically exists under a folder or drive, if it exists. + + ### Usage Example + + Fetch from the `GET /api/filestorage/v1/files` endpoint and view their + files. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The file's name. + validation: + maxLength: 254 + file_url: + type: optional + docs: The URL to access the file. + validation: + maxLength: 2000 + file_thumbnail_url: + type: optional + docs: >- + The URL that produces a thumbnail preview of the file. Typically an + image. + validation: + maxLength: 2000 + size: + type: optional + docs: The file's size, in bytes. + mime_type: + type: optional + docs: The file's mime type. + validation: + maxLength: 128 + description: + type: optional + docs: The file's description. + validation: + maxLength: 2000 + folder: + type: optional + docs: The folder that the file belongs to. + checksum: + type: optional> + docs: >- + This field stores file checksum data. 'type' indicates the algorithm + (e.g. crc_32, sha1, sha256, quickXor, or md5), and 'content_hash' is + the unique hash used to verify file integrity and detect alterations. + permissions: + type: optional + docs: >- + The Permission object is used to represent a user's or group's access + to a File or Folder. Permissions are unexpanded by default. Use the + query param `expand=permissions` to see more details under `GET + /files`. + drive: + type: optional + docs: The drive that the file belongs to. + remote_created_at: + type: optional + docs: When the third party's file was created. + remote_updated_at: + type: optional + docs: When the third party's file was updated. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + FileRequestFolder: + discriminated: false + docs: The folder that the file belongs to. + union: + - type: string + validation: + format: uuid + - Folder + source: + openapi: openapi/openapi.yml + inline: true + FileRequestPermissionsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - PermissionRequest + source: + openapi: openapi/openapi.yml + inline: true + FileRequestPermissions: + discriminated: false + docs: >- + The Permission object is used to represent a user's or group's access to a + File or Folder. Permissions are unexpanded by default. Use the query param + `expand=permissions` to see more details under `GET /files`. + union: + - type: string + validation: + format: uuid + - PermissionRequest + - list + source: + openapi: openapi/openapi.yml + inline: true + FileRequestDrive: + discriminated: false + docs: The drive that the file belongs to. + union: + - type: string + validation: + format: uuid + - Drive + source: + openapi: openapi/openapi.yml + inline: true + FileRequest: + docs: >- + # The File Object + + ### Description + + The `File` object is used to represent a file in the workspace. The Object + typically exists under a folder or drive, if it exists. + + ### Usage Example + + Fetch from the `GET /api/filestorage/v1/files` endpoint and view their + files. + properties: + name: + type: optional + docs: The file's name. + validation: + maxLength: 254 + file_url: + type: optional + docs: The URL to access the file. + validation: + maxLength: 2000 + file_thumbnail_url: + type: optional + docs: >- + The URL that produces a thumbnail preview of the file. Typically an + image. + validation: + maxLength: 2000 + size: + type: optional + docs: The file's size, in bytes. + mime_type: + type: optional + docs: The file's mime type. + validation: + maxLength: 128 + description: + type: optional + docs: The file's description. + validation: + maxLength: 2000 + folder: + type: optional + docs: The folder that the file belongs to. + checksum: + type: optional> + docs: >- + This field stores file checksum data. 'type' indicates the algorithm + (e.g. crc_32, sha1, sha256, quickXor, or md5), and 'content_hash' is + the unique hash used to verify file integrity and detect alterations. + permissions: + type: optional + docs: >- + The Permission object is used to represent a user's or group's access + to a File or Folder. Permissions are unexpanded by default. Use the + query param `expand=permissions` to see more details under `GET + /files`. + drive: + type: optional + docs: The drive that the file belongs to. + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + FileStorageFileResponse: + properties: + model: File + warnings: list + errors: list + logs: optional> + source: + openapi: openapi/openapi.yml + FileStorageFolderResponse: + properties: + model: Folder + warnings: list + errors: list + logs: optional> + source: + openapi: openapi/openapi.yml + FolderParentFolder: + discriminated: false + docs: The folder that the folder belongs to. + union: + - type: string + validation: + format: uuid + - Folder + source: + openapi: openapi/openapi.yml + inline: true + FolderDrive: + discriminated: false + docs: The drive that the folder belongs to. + union: + - type: string + validation: + format: uuid + - Drive + source: + openapi: openapi/openapi.yml + inline: true + FolderPermissionsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Permission + source: + openapi: openapi/openapi.yml + inline: true + FolderPermissions: + discriminated: false + docs: >- + The Permission object is used to represent a user's or group's access to a + File or Folder. Permissions are unexpanded by default. Use the query param + `expand=permissions` to see more details under `GET /folders`. + union: + - type: string + validation: + format: uuid + - Permission + - list + source: + openapi: openapi/openapi.yml + inline: true + Folder: + docs: >- + # The Folder Object + + ### Description + + The `Folder` object is used to represent a collection of files and/or + folders in the workspace. Could be within a drive, if it exists. + + ### Usage Example + + Fetch from the `GET /api/filestorage/v1/folders` endpoint and view their + folders. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The folder's name. + validation: + maxLength: 254 + folder_url: + type: optional + docs: The URL to access the folder. + validation: + maxLength: 2000 + size: + type: optional + docs: The folder's size, in bytes. + description: + type: optional + docs: The folder's description. + validation: + maxLength: 2000 + parent_folder: + type: optional + docs: The folder that the folder belongs to. + drive: + type: optional + docs: The drive that the folder belongs to. + permissions: + type: optional + docs: >- + The Permission object is used to represent a user's or group's access + to a File or Folder. Permissions are unexpanded by default. Use the + query param `expand=permissions` to see more details under `GET + /folders`. + remote_created_at: + type: optional + docs: When the third party's folder was created. + remote_updated_at: + type: optional + docs: When the third party's folder was updated. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + FolderRequestParentFolder: + discriminated: false + docs: The folder that the folder belongs to. + union: + - type: string + validation: + format: uuid + - Folder + source: + openapi: openapi/openapi.yml + inline: true + FolderRequestDrive: + discriminated: false + docs: The drive that the folder belongs to. + union: + - type: string + validation: + format: uuid + - Drive + source: + openapi: openapi/openapi.yml + inline: true + FolderRequestPermissionsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - PermissionRequest + source: + openapi: openapi/openapi.yml + inline: true + FolderRequestPermissions: + discriminated: false + docs: >- + The Permission object is used to represent a user's or group's access to a + File or Folder. Permissions are unexpanded by default. Use the query param + `expand=permissions` to see more details under `GET /folders`. + union: + - type: string + validation: + format: uuid + - PermissionRequest + - list + source: + openapi: openapi/openapi.yml + inline: true + FolderRequest: + docs: >- + # The Folder Object + + ### Description + + The `Folder` object is used to represent a collection of files and/or + folders in the workspace. Could be within a drive, if it exists. + + ### Usage Example + + Fetch from the `GET /api/filestorage/v1/folders` endpoint and view their + folders. + properties: + name: + type: optional + docs: The folder's name. + validation: + maxLength: 254 + folder_url: + type: optional + docs: The URL to access the folder. + validation: + maxLength: 2000 + size: + type: optional + docs: The folder's size, in bytes. + description: + type: optional + docs: The folder's description. + validation: + maxLength: 2000 + parent_folder: + type: optional + docs: The folder that the folder belongs to. + drive: + type: optional + docs: The drive that the folder belongs to. + permissions: + type: optional + docs: >- + The Permission object is used to represent a user's or group's access + to a File or Folder. Permissions are unexpanded by default. Use the + query param `expand=permissions` to see more details under `GET + /folders`. + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + GroupChildGroupsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Group + source: + openapi: openapi/openapi.yml + inline: true + Group: + docs: >- + # The Group Object + + ### Description + + The `Group` object is used to represent any subset of `Users`. This can + extend to company domains as well. + + ### Usage Example + + Fetch from the `GET /api/filestorage/v1/groups` endpoint and view their + groups. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The group's name. + validation: + maxLength: 254 + users: + docs: >- + 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. + type: list + child_groups: + type: optional> + docs: Groups that inherit the permissions of the parent group. + access: read-only + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + IndividualCommonModelScopeDeserializer: + properties: + model_name: string + model_permissions: optional> + field_permissions: optional + source: + openapi: openapi/openapi.yml + IndividualCommonModelScopeDeserializerRequest: + properties: + model_name: + type: string + validation: + minLength: 1 + model_permissions: optional> + field_permissions: optional + source: + openapi: openapi/openapi.yml + Issue: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + status: + type: optional + docs: |- + Status of the issue. Options: ('ONGOING', 'RESOLVED') + + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + error_description: string + end_user: + type: optional> + access: read-only + first_incident_time: optional + last_incident_time: optional + is_muted: + type: optional + access: read-only + error_details: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + IssueStatusEnum: + enum: + - ONGOING + - RESOLVED + docs: |- + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + source: + openapi: openapi/openapi.yml + LanguageEnum: + enum: + - en + - de + docs: |- + * `en` - en + * `de` - de + source: + openapi: openapi/openapi.yml + LastSyncResultEnum: + enum: + - SYNCING + - DONE + - FAILED + - DISABLED + - PAUSED + - PARTIALLY_SYNCED + docs: |- + * `SYNCING` - SYNCING + * `DONE` - DONE + * `FAILED` - FAILED + * `DISABLED` - DISABLED + * `PAUSED` - PAUSED + * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED + source: + openapi: openapi/openapi.yml + LinkToken: + properties: + link_token: string + integration_name: optional + magic_link_url: optional + source: + openapi: openapi/openapi.yml + LinkedAccountStatus: + properties: + linked_account_status: string + can_make_request: boolean + source: + openapi: openapi/openapi.yml + MetaResponse: + properties: + request_schema: map + remote_field_classes: optional> + status: optional + has_conditional_params: boolean + has_required_linked_account_params: boolean + source: + openapi: openapi/openapi.yml + MethodEnum: + enum: + - GET + - OPTIONS + - HEAD + - POST + - PUT + - PATCH + - DELETE + docs: |- + * `GET` - GET + * `OPTIONS` - OPTIONS + * `HEAD` - HEAD + * `POST` - POST + * `PUT` - PUT + * `PATCH` - PATCH + * `DELETE` - DELETE + source: + openapi: openapi/openapi.yml + ModelOperation: + docs: >- + # The ModelOperation Object + + ### Description + + The `ModelOperation` object is used to represent the operations that are + currently supported for a given model. + + + ### Usage Example + + View what operations are supported for the `Candidate` endpoint. + properties: + model_name: string + available_operations: list + required_post_parameters: list + supported_fields: list + source: + openapi: openapi/openapi.yml + ModelPermissionDeserializer: + properties: + is_enabled: optional + source: + openapi: openapi/openapi.yml + ModelPermissionDeserializerRequest: + properties: + is_enabled: optional + source: + openapi: openapi/openapi.yml + MultipartFormFieldRequest: + docs: >- + # The MultipartFormField Object + + ### Description + + The `MultipartFormField` object is used to represent fields in an HTTP + request using `multipart/form-data`. + + + ### Usage Example + + Create a `MultipartFormField` to define a multipart form entry. + properties: + name: + type: string + docs: The name of the form field + validation: + minLength: 1 + data: + type: string + docs: The data for the form field. + validation: + minLength: 1 + encoding: + type: optional + docs: |- + The encoding of the value of `data`. Defaults to `RAW` if not defined. + + * `RAW` - RAW + * `BASE64` - BASE64 + * `GZIP_BASE64` - GZIP_BASE64 + file_name: + type: optional + docs: The file name of the form field, if the field is for a file. + validation: + minLength: 1 + content_type: + type: optional + docs: The MIME type of the file, if the field is for a file. + validation: + minLength: 1 + source: + openapi: openapi/openapi.yml + PaginatedAccountDetailsAndActionsList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedAuditLogEventList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedDownloadRequestMetaList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedDriveList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedFileList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedFolderList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedGroupList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedIssueList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedSyncStatusList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedUserList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PermissionUser: + discriminated: false + docs: >- + The user that is granted this permission. This will only be populated if + the type is `USER`. + union: + - type: string + validation: + format: uuid + - User + source: + openapi: openapi/openapi.yml + inline: true + PermissionGroup: + discriminated: false + docs: >- + The group that is granted this permission. This will only be populated if + the type is `GROUP`. + union: + - type: string + validation: + format: uuid + - Group + source: + openapi: openapi/openapi.yml + inline: true + Permission: + docs: >- + # The Permission Object + + ### Description + + The Permission object is used to represent a user's or group's access to a + File or Folder. Permissions are unexpanded by default. + + + ### Usage Example + + Fetch from the `GET Files` or `GET Folders` endpoint. Permissions are + unexpanded by default. Use the query param `expand=permissions` to see + more details. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + user: + type: optional + docs: >- + The user that is granted this permission. This will only be populated + if the type is `USER`. + group: + type: optional + docs: >- + The group that is granted this permission. This will only be populated + if the type is `GROUP`. + type: + type: optional + docs: |- + Denotes what type of people have access to the file. + + * `USER` - USER + * `GROUP` - GROUP + * `COMPANY` - COMPANY + * `ANYONE` - ANYONE + roles: + type: optional> + docs: >- + 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. + source: + openapi: openapi/openapi.yml + PermissionRequestUser: + discriminated: false + docs: >- + The user that is granted this permission. This will only be populated if + the type is `USER`. + union: + - type: string + validation: + format: uuid + - User + source: + openapi: openapi/openapi.yml + inline: true + PermissionRequestGroup: + discriminated: false + docs: >- + The group that is granted this permission. This will only be populated if + the type is `GROUP`. + union: + - type: string + validation: + format: uuid + - Group + source: + openapi: openapi/openapi.yml + inline: true + PermissionRequest: + docs: >- + # The Permission Object + + ### Description + + The Permission object is used to represent a user's or group's access to a + File or Folder. Permissions are unexpanded by default. + + + ### Usage Example + + Fetch from the `GET Files` or `GET Folders` endpoint. Permissions are + unexpanded by default. Use the query param `expand=permissions` to see + more details. + properties: + remote_id: + type: optional + docs: The third-party API ID of the matching object. + user: + type: optional + docs: >- + The user that is granted this permission. This will only be populated + if the type is `USER`. + group: + type: optional + docs: >- + The group that is granted this permission. This will only be populated + if the type is `GROUP`. + type: + type: optional + docs: |- + Denotes what type of people have access to the file. + + * `USER` - USER + * `GROUP` - GROUP + * `COMPANY` - COMPANY + * `ANYONE` - ANYONE + roles: + type: optional> + docs: >- + 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. + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + RemoteData: + docs: >- + # The RemoteData Object + + ### Description + + The `RemoteData` object is used to represent the full data pulled from the + third-party API for an object. + + + ### Usage Example + + TODO + properties: + path: + type: string + docs: The third-party API path that is being called. + data: + type: optional + access: read-only + source: + openapi: openapi/openapi.yml + RemoteEndpointInfo: + properties: + method: string + url_path: string + field_traversal_path: list + source: + openapi: openapi/openapi.yml + RemoteFieldApiCoverage: + discriminated: false + union: + - integer + - double + source: + openapi: openapi/openapi.yml + inline: true + RemoteFieldApi: + properties: + schema: map + remote_key_name: string + remote_endpoint_info: RemoteEndpointInfo + example_values: optional> + advanced_metadata: optional + coverage: + type: optional + access: read-only + source: + openapi: openapi/openapi.yml + RemoteFieldApiResponse: + properties: + File: optional> + Folder: optional> + Drive: optional> + Group: optional> + User: optional> + source: + openapi: openapi/openapi.yml + RemoteKey: + docs: >- + # The RemoteKey Object + + ### Description + + The `RemoteKey` object is used to represent a request for a new remote + key. + + + ### Usage Example + + Post a `GenerateRemoteKey` to receive a new `RemoteKey`. + properties: + name: string + key: string + source: + openapi: openapi/openapi.yml + RemoteResponse: + docs: >- + # The RemoteResponse Object + + ### Description + + The `RemoteResponse` object is used to represent information returned from + a third-party endpoint. + + + ### Usage Example + + View the `RemoteResponse` returned from your `DataPassthrough`. + properties: + method: string + path: string + status: integer + response: unknown + response_headers: optional> + response_type: optional + headers: optional> + source: + openapi: openapi/openapi.yml + RequestFormatEnum: + enum: + - JSON + - XML + - MULTIPART + docs: |- + * `JSON` - JSON + * `XML` - XML + * `MULTIPART` - MULTIPART + source: + openapi: openapi/openapi.yml + ResponseTypeEnum: + enum: + - JSON + - BASE64_GZIP + docs: |- + * `JSON` - JSON + * `BASE64_GZIP` - BASE64_GZIP + source: + openapi: openapi/openapi.yml + RoleEnum: + enum: + - ADMIN + - DEVELOPER + - MEMBER + - API + - SYSTEM + - MERGE_TEAM + docs: |- + * `ADMIN` - ADMIN + * `DEVELOPER` - DEVELOPER + * `MEMBER` - MEMBER + * `API` - API + * `SYSTEM` - SYSTEM + * `MERGE_TEAM` - MERGE_TEAM + source: + openapi: openapi/openapi.yml + RolesEnum: + enum: + - READ + - WRITE + - OWNER + docs: |- + * `READ` - READ + * `WRITE` - WRITE + * `OWNER` - OWNER + source: + openapi: openapi/openapi.yml + SelectiveSyncConfigurationsUsageEnum: + enum: + - IN_NEXT_SYNC + - IN_LAST_SYNC + docs: |- + * `IN_NEXT_SYNC` - IN_NEXT_SYNC + * `IN_LAST_SYNC` - IN_LAST_SYNC + source: + openapi: openapi/openapi.yml + StatusFd5Enum: + enum: + - SYNCING + - DONE + - FAILED + - DISABLED + - PAUSED + - PARTIALLY_SYNCED + docs: |- + * `SYNCING` - SYNCING + * `DONE` - DONE + * `FAILED` - FAILED + * `DISABLED` - DISABLED + * `PAUSED` - PAUSED + * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED + source: + openapi: openapi/openapi.yml + SyncStatus: + docs: >- + # The SyncStatus Object + + ### Description + + The `SyncStatus` object is used to represent the syncing state of an + account + + + ### Usage Example + + View the `SyncStatus` for an account to see how recently its models were + synced. + properties: + model_name: string + model_id: string + last_sync_start: optional + next_sync_start: optional + last_sync_result: optional + last_sync_finished: optional + status: StatusFd5Enum + is_initial_sync: boolean + selective_sync_configurations_usage: optional + source: + openapi: openapi/openapi.yml + TypeEnum: + enum: + - USER + - GROUP + - COMPANY + - ANYONE + docs: |- + * `USER` - USER + * `GROUP` - GROUP + * `COMPANY` - COMPANY + * `ANYONE` - ANYONE + source: + openapi: openapi/openapi.yml + User: + docs: >- + # The User Object + + ### Description + + The `User` object is used to represent a user within the File Storage + account. + + ### Usage Example + + Fetch from the `GET /api/filestorage/v1/users` endpoint and view their + users. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The user's name. + validation: + maxLength: 254 + email_address: + type: optional + docs: >- + The user's email address. This is typically used to identify a user + across linked accounts. + validation: + maxLength: 2000 + is_me: + type: optional + docs: Whether the user is the one who linked this account. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + ValidationProblemSource: + properties: + pointer: string + source: + openapi: openapi/openapi.yml + WarningValidationProblem: + properties: + source: optional + title: string + detail: string + problem_type: string + source: + openapi: openapi/openapi.yml + WebhookReceiver: + properties: + event: string + is_active: boolean + key: optional + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/filestorage/accountDetails.yml b/.mock/definition/filestorage/accountDetails.yml new file mode 100644 index 0000000..2411f37 --- /dev/null +++ b/.mock/definition/filestorage/accountDetails.yml @@ -0,0 +1,36 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + retrieve: + path: /filestorage/v1/account-details + method: GET + auth: true + docs: Get details for a linked account. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.AccountDetails + status-code: 200 + examples: + - headers: {} + response: + body: + id: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd + integration: BambooHR + integration_slug: bamboohr + category: hris + end_user_origin_id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + end_user_organization_name: Waystar Royco + end_user_email_address: kendall.roy@waystar-royco.com + status: COMPLETE + webhook_listener_url: >- + https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 + is_duplicate: true + account_type: PRODUCTION + completed_at: '2024-08-26T20:11:19Z' + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/filestorage/accountToken.yml b/.mock/definition/filestorage/accountToken.yml new file mode 100644 index 0000000..2c17a04 --- /dev/null +++ b/.mock/definition/filestorage/accountToken.yml @@ -0,0 +1,44 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + retrieve: + path: /filestorage/v1/account-token/{public_token} + method: GET + auth: true + docs: >- + Returns the account token for the end user with the provided public + token. + source: + openapi: openapi/openapi.yml + path-parameters: + public_token: string + response: + docs: '' + type: root.AccountToken + status-code: 200 + examples: + - path-parameters: + public_token: public_token + response: + body: + account_token: T9klMDQrcHdm9jrtHuOS2Nf06BIHwMNjpPXPMB + integration: + name: name + abbreviated_name: abbreviated_name + categories: + - hris + image: image + square_image: square_image + color: color + slug: slug + api_endpoints_to_documentation_urls: + key: value + webhook_setup_guide_url: webhook_setup_guide_url + category_beta_status: + key: value + id: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/filestorage/asyncPassthrough.yml b/.mock/definition/filestorage/asyncPassthrough.yml new file mode 100644 index 0000000..58df835 --- /dev/null +++ b/.mock/definition/filestorage/asyncPassthrough.yml @@ -0,0 +1,70 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /filestorage/v1/async-passthrough + method: POST + auth: true + docs: >- + Asynchronously pull data from an endpoint not currently supported by + Merge. + source: + openapi: openapi/openapi.yml + request: + body: root.DataPassthroughRequest + content-type: application/json + response: + docs: '' + type: root.AsyncPassthroughReciept + status-code: 200 + examples: + - headers: {} + request: + method: GET + path: /scooters + response: + body: + async_passthrough_receipt_id: fd29020f-2695-445e-922e-dcd5e81903fd + retrieve: + path: /filestorage/v1/async-passthrough/{async_passthrough_receipt_id} + method: GET + auth: true + docs: Retrieves data from earlier async-passthrough POST request + source: + openapi: openapi/openapi.yml + path-parameters: + async_passthrough_receipt_id: string + response: + docs: '' + type: AsyncPassthroughRetrieveResponse + status-code: 200 + examples: + - path-parameters: + async_passthrough_receipt_id: async_passthrough_receipt_id + headers: {} + response: + body: + method: GET + path: /scooters + status: 200 + response: + key: value + response_headers: + X-Page-Token: value + response_type: JSON + headers: + EXTRA-HEADER: value + Authorization: + source: + openapi: openapi/openapi.yml +types: + AsyncPassthroughRetrieveResponse: + discriminated: false + union: + - root.RemoteResponse + - string + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/filestorage/auditTrail.yml b/.mock/definition/filestorage/auditTrail.yml new file mode 100644 index 0000000..f21c35f --- /dev/null +++ b/.mock/definition/filestorage/auditTrail.yml @@ -0,0 +1,94 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /filestorage/v1/audit-trail + method: GET + auth: true + docs: Gets a list of audit trail events. + source: + openapi: openapi/openapi.yml + request: + name: AuditTrailListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + end_date: + type: optional + docs: >- + If included, will only include audit trail events that occurred + before this time + event_type: + type: optional + docs: >- + 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`, + `REGENERATED_WEBHOOK_SIGNATURE`, `INVITED_USER`, + `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, + `DELETED_LINKED_ACCOUNT`, + `DELETED_ALL_COMMON_MODELS_FOR_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`, + `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, + `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, + `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, + `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, + `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, + `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, + `END_USER_CREDENTIALS_ACCESSED` + page_size: + type: optional + docs: Number of results to return per page. + start_date: + type: optional + docs: >- + If included, will only include audit trail events that occurred + after this time + user_email: + type: optional + docs: >- + If provided, this will return events associated with the specified + user email. Please note that the email address reflects the user's + email at the time of the event, and may not be their current + email. + response: + docs: '' + type: root.PaginatedAuditLogEventList + status-code: 200 + examples: + - response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: b5ceea2a-7171-47ce-8090-165cfce5572c + user_name: Gil Feig + user_email: hello@merge.dev + role: ADMIN + ip_address: 192.0.2.123 + event_type: CREATED_REMOTE_PRODUCTION_API_KEY + event_description: >- + Organization-wide Scopes for model hris.Employee updated + from Read to Read+Write + created_at: '2024-01-15T09:30:00Z' + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/filestorage/availableActions.yml b/.mock/definition/filestorage/availableActions.yml new file mode 100644 index 0000000..b7a5e2b --- /dev/null +++ b/.mock/definition/filestorage/availableActions.yml @@ -0,0 +1,50 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + retrieve: + path: /filestorage/v1/available-actions + method: GET + auth: true + docs: Returns a list of models and actions available for an account. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.AvailableActions + status-code: 200 + examples: + - headers: {} + response: + body: + integration: + name: name + abbreviated_name: abbreviated_name + categories: + - hris + image: image + square_image: square_image + color: color + slug: slug + api_endpoints_to_documentation_urls: + key: value + webhook_setup_guide_url: webhook_setup_guide_url + category_beta_status: + key: value + passthrough_available: true + available_model_operations: + - model_name: Candidate + available_operations: + - FETCH + - CREATE + required_post_parameters: + - remote_user_id + supported_fields: + - first_name + - last_name + - company + - title + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/filestorage/deleteAccount.yml b/.mock/definition/filestorage/deleteAccount.yml new file mode 100644 index 0000000..9b69115 --- /dev/null +++ b/.mock/definition/filestorage/deleteAccount.yml @@ -0,0 +1,15 @@ +service: + auth: false + base-path: '' + endpoints: + delete: + path: /filestorage/v1/delete-account + method: POST + auth: true + docs: Delete a linked account. + source: + openapi: openapi/openapi.yml + examples: + - headers: {} + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/filestorage/drives.yml b/.mock/definition/filestorage/drives.yml new file mode 100644 index 0000000..969b232 --- /dev/null +++ b/.mock/definition/filestorage/drives.yml @@ -0,0 +1,145 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /filestorage/v1/drives + method: GET + auth: true + docs: Returns a list of `Drive` objects. + source: + openapi: openapi/openapi.yml + request: + name: DrivesListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + name: + type: optional + docs: >- + If provided, will only return drives with this name. This performs + an exact match. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: root.PaginatedDriveList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: f9e3d315-d6c2-458e-85c4-fa773d6ff4a6 + remote_id: '2039348' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: My Drive + remote_created_at: '2024-01-15T09:30:00Z' + drive_url: https://drive.com/drives/2039349 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /drives + data: + - Varies by platform + retrieve: + path: /filestorage/v1/drives/{id} + method: GET + auth: true + docs: Returns a `Drive` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: DrivesRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.Drive + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: f9e3d315-d6c2-458e-85c4-fa773d6ff4a6 + remote_id: '2039348' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: My Drive + remote_created_at: '2024-01-15T09:30:00Z' + drive_url: https://drive.com/drives/2039349 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /drives + data: + - Varies by platform + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/filestorage/fieldMapping.yml b/.mock/definition/filestorage/fieldMapping.yml new file mode 100644 index 0000000..0ef97a1 --- /dev/null +++ b/.mock/definition/filestorage/fieldMapping.yml @@ -0,0 +1,518 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + field_mappings_retrieve: + path: /filestorage/v1/field-mappings + method: GET + auth: true + docs: >- + Get all Field Mappings for this Linked Account. Field Mappings are + mappings between third-party Remote Fields and user defined Merge + fields. [Learn + more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). + source: + openapi: openapi/openapi.yml + request: + name: FieldMappingsRetrieveRequest + query-parameters: + exclude_remote_field_metadata: + type: optional + docs: >- + If `true`, remote fields metadata is excluded from each field + mapping instance (i.e. `remote_fields.remote_key_name` and + `remote_fields.schema` will be null). This will increase the speed + of the request since these fields require some calculations. + response: + docs: '' + type: root.FieldMappingApiInstanceResponse + status-code: 200 + examples: + - headers: {} + response: + body: + File: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Folder: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Drive: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Group: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + User: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + field_mappings_create: + path: /filestorage/v1/field-mappings + method: POST + auth: true + docs: >- + Create new Field Mappings that will be available after the next + scheduled sync. This will cause the next sync for this Linked Account to + sync **ALL** data from start. + source: + openapi: openapi/openapi.yml + request: + name: CreateFieldMappingRequest + query-parameters: + exclude_remote_field_metadata: + type: optional + docs: >- + If `true`, remote fields metadata is excluded from each field + mapping instance (i.e. `remote_fields.remote_key_name` and + `remote_fields.schema` will be null). This will increase the speed + of the request since these fields require some calculations. + body: + properties: + target_field_name: + type: string + docs: >- + The name of the target field you want this remote field to map + to. + validation: + minLength: 1 + target_field_description: + type: string + docs: >- + The description of the target field you want this remote field + to map to. + validation: + minLength: 1 + remote_field_traversal_path: + docs: >- + The field traversal path of the remote field listed when you hit + the GET /remote-fields endpoint. + type: list + remote_method: + type: string + docs: >- + The method of the remote endpoint where the remote field is + coming from. + validation: + minLength: 1 + remote_url_path: + type: string + docs: >- + The path of the remote endpoint where the remote field is coming + from. + validation: + minLength: 1 + common_model_name: + type: string + docs: >- + The name of the Common Model that the remote field corresponds + to in a given category. + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: root.FieldMappingInstanceResponse + status-code: 201 + examples: + - headers: {} + request: + target_field_name: example_target_field_name + target_field_description: this is a example description of the target field + remote_field_traversal_path: + - example_remote_field + remote_method: GET + remote_url_path: /example-url-path + common_model_name: ExampleCommonModel + response: + body: + model: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + field_mappings_destroy: + path: /filestorage/v1/field-mappings/{field_mapping_id} + method: DELETE + auth: true + docs: >- + Deletes Field Mappings for a Linked Account. All data related to this + Field Mapping will be deleted and these changes will be reflected after + the next scheduled sync. This will cause the next sync for this Linked + Account to sync **ALL** data from start. + source: + openapi: openapi/openapi.yml + path-parameters: + field_mapping_id: string + response: + docs: '' + type: root.FieldMappingInstanceResponse + status-code: 204 + examples: + - path-parameters: + field_mapping_id: field_mapping_id + headers: {} + response: + body: + model: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + field_mappings_partial_update: + path: /filestorage/v1/field-mappings/{field_mapping_id} + method: PATCH + auth: true + docs: >- + Create or update existing Field Mappings for a Linked Account. Changes + will be reflected after the next scheduled sync. This will cause the + next sync for this Linked Account to sync **ALL** data from start. + source: + openapi: openapi/openapi.yml + path-parameters: + field_mapping_id: string + request: + name: PatchedEditFieldMappingRequest + body: + properties: + remote_field_traversal_path: + type: optional> + docs: >- + The field traversal path of the remote field listed when you hit + the GET /remote-fields endpoint. + remote_method: + type: optional + docs: >- + The method of the remote endpoint where the remote field is + coming from. + validation: + minLength: 1 + remote_url_path: + type: optional + docs: >- + The path of the remote endpoint where the remote field is coming + from. + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: root.FieldMappingInstanceResponse + status-code: 200 + examples: + - path-parameters: + field_mapping_id: field_mapping_id + headers: {} + request: {} + response: + body: + model: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + remote_fields_retrieve: + path: /filestorage/v1/remote-fields + method: GET + auth: true + docs: >- + Get all remote fields for a Linked Account. Remote fields are + third-party fields that are accessible after initial sync if remote_data + is enabled. You can use remote fields to override existing Merge fields + or map a new Merge field. [Learn + more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). + source: + openapi: openapi/openapi.yml + request: + name: RemoteFieldsRetrieveRequest + query-parameters: + common_models: + type: optional + docs: >- + A comma seperated list of Common Model names. If included, will + only return Remote Fields for those Common Models. + include_example_values: + type: optional + docs: >- + If true, will include example values, where available, for remote + fields in the 3rd party platform. These examples come from active + data from your customers. + response: + docs: '' + type: root.RemoteFieldApiResponse + status-code: 200 + examples: + - headers: {} + response: + body: + File: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Folder: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Drive: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Group: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + User: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + target_fields_retrieve: + path: /filestorage/v1/target-fields + method: GET + auth: true + docs: >- + Get all organization-wide Target Fields, this will not include any + Linked Account specific Target Fields. Organization-wide Target Fields + are additional fields appended to the Merge Common Model for all Linked + Accounts in a category. [Learn + more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.ExternalTargetFieldApiResponse + status-code: 200 + examples: + - headers: {} + response: + body: + File: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Folder: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Drive: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Group: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + User: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/filestorage/files.yml b/.mock/definition/filestorage/files.yml new file mode 100644 index 0000000..7230424 --- /dev/null +++ b/.mock/definition/filestorage/files.yml @@ -0,0 +1,672 @@ +types: + FilesListRequestExpand: + enum: + - drive + - folder + - value: folder,drive + name: FolderDrive + - permissions + - value: permissions,drive + name: PermissionsDrive + - value: permissions,folder + name: PermissionsFolder + - value: permissions,folder,drive + name: PermissionsFolderDrive + source: + openapi: openapi/openapi.yml + FilesListRequestOrderBy: + enum: + - value: '-created_at' + name: CreatedAtDescending + - value: '-modified_at' + name: ModifiedAtDescending + - value: created_at + name: CreatedAtAscending + - value: modified_at + name: ModifiedAtAscending + source: + openapi: openapi/openapi.yml + FilesRetrieveRequestExpand: + enum: + - drive + - folder + - value: folder,drive + name: FolderDrive + - permissions + - value: permissions,drive + name: PermissionsDrive + - value: permissions,folder + name: PermissionsFolder + - value: permissions,folder,drive + name: PermissionsFolderDrive + source: + openapi: openapi/openapi.yml + FilesDownloadRequestMetaListRequestOrderBy: + enum: + - value: '-created_at' + name: CreatedAtDescending + - value: '-modified_at' + name: ModifiedAtDescending + - value: created_at + name: CreatedAtAscending + - value: modified_at + name: ModifiedAtAscending + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /filestorage/v1/files + method: GET + auth: true + docs: Returns a list of `File` objects. + source: + openapi: openapi/openapi.yml + request: + name: FilesListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + drive_id: + type: optional + docs: >- + Specifying a drive id returns only the files in that drive. + Specifying null returns only the files outside the top-level + drive. + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + folder_id: + type: optional + docs: >- + Specifying a folder id returns only the files in that folder. + Specifying null returns only the files in root directory. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + mime_type: + type: optional + docs: >- + If provided, will only return files with these mime_types. + Multiple values can be separated by commas. + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + name: + type: optional + docs: >- + If provided, will only return files with this name. This performs + an exact match. + order_by: + type: optional + docs: >- + Overrides the default ordering for this endpoint. Possible values + include: created_at, -created_at, modified_at, -modified_at. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: root.PaginatedFileList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 45ce474c-dhcj-43a6-754r-629f799f7d68 + remote_id: '12' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: merge_file_storage_launch.docx + file_url: https://drive.com/1234 + file_thumbnail_url: https://drive.com/1234/thumbnail.png + size: 254 + mime_type: >- + application/vnd.openxmlformats-officedocument.wordprocessingml.document + description: >- + Use common model scopes to redact data returned in Merge's + Common Models! + folder: folder + checksum: + type: sha256 + content_hash: >- + e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 + permissions: permissions + drive: drive + remote_created_at: '2022-02-02T00:00:00Z' + remote_updated_at: '2022-02-03T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /files + data: + - Varies by platform + create: + path: /filestorage/v1/files + method: POST + auth: true + docs: Creates a `File` object with the given values. + source: + openapi: openapi/openapi.yml + request: + name: FileStorageFileEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: root.FileRequest + content-type: application/json + response: + docs: '' + type: root.FileStorageFileResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: 45ce474c-dhcj-43a6-754r-629f799f7d68 + remote_id: '12' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: merge_file_storage_launch.docx + file_url: https://drive.com/1234 + file_thumbnail_url: https://drive.com/1234/thumbnail.png + size: 254 + mime_type: >- + application/vnd.openxmlformats-officedocument.wordprocessingml.document + description: >- + Use common model scopes to redact data returned in Merge's + Common Models! + folder: folder + checksum: + type: sha256 + content_hash: >- + e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 + permissions: permissions + drive: drive + remote_created_at: '2022-02-02T00:00:00Z' + remote_updated_at: '2022-02-03T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /files + data: + - Varies by platform + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /filestorage/v1/files/{id} + method: GET + auth: true + docs: Returns a `File` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: FilesRetrieveRequest + query-parameters: + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.File + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 45ce474c-dhcj-43a6-754r-629f799f7d68 + remote_id: '12' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: merge_file_storage_launch.docx + file_url: https://drive.com/1234 + file_thumbnail_url: https://drive.com/1234/thumbnail.png + size: 254 + mime_type: >- + application/vnd.openxmlformats-officedocument.wordprocessingml.document + description: >- + Use common model scopes to redact data returned in Merge's + Common Models! + folder: folder + checksum: + type: sha256 + content_hash: >- + e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 + permissions: permissions + drive: drive + remote_created_at: '2022-02-02T00:00:00Z' + remote_updated_at: '2022-02-03T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /files + data: + - Varies by platform + downloadRetrieve: + path: /filestorage/v1/files/{id}/download + method: GET + auth: true + docs: Returns the `File` content with the given `id` as a stream of bytes. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: FilesDownloadRetrieveRequest + query-parameters: + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + mime_type: + type: optional + docs: >- + If provided, specifies the export format of the file to be + downloaded. For information on supported export formats, please + refer to our export format help center article. + response: + docs: '' + type: file + status-code: 200 + downloadRequestMetaRetrieve: + path: /filestorage/v1/files/{id}/download/request-meta + method: GET + auth: true + docs: >- + Returns metadata to construct an authenticated file download request for + a singular file, allowing you to download file directly from the + third-party. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: FilesDownloadRequestMetaRetrieveRequest + query-parameters: + mime_type: + type: optional + docs: >- + If provided, specifies the export format of the file to be + downloaded. For information on supported export formats, please + refer to our export format help center article. + response: + docs: '' + type: root.DownloadRequestMeta + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + url: https://www.googleapis.com/drive/v3/files/234?alt=media + method: GET + headers: + Authorization: Bearer 1234 + downloadRequestMetaList: + path: /filestorage/v1/files/download/request-meta + method: GET + auth: true + docs: >- + Returns metadata to construct authenticated file download requests, + allowing you to download files directly from the third-party. + source: + openapi: openapi/openapi.yml + request: + name: FilesDownloadRequestMetaListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + mime_types: + type: optional + docs: >- + A comma-separated list of preferred MIME types in order of + priority. If supported by the third-party provider, the file(s) + will be returned in the first supported MIME type from the list. + The default MIME type is PDF. To see supported MIME types by file + type, refer to our export format help center article. + modified_after: + type: optional + docs: >- + If provided, will only return objects modified after this + datetime. + modified_before: + type: optional + docs: >- + If provided, will only return objects modified before this + datetime. + order_by: + type: optional + docs: >- + Overrides the default ordering for this endpoint. Possible values + include: created_at, -created_at, modified_at, -modified_at. + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: root.PaginatedDownloadRequestMetaList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + url: https://www.googleapis.com/drive/v3/files/234?alt=media + method: GET + headers: + Authorization: Bearer 1234 + metaPostRetrieve: + path: /filestorage/v1/files/meta/post + method: GET + auth: true + docs: Returns metadata for `FileStorageFile` POSTs. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/filestorage/folders.yml b/.mock/definition/filestorage/folders.yml new file mode 100644 index 0000000..50ad205 --- /dev/null +++ b/.mock/definition/filestorage/folders.yml @@ -0,0 +1,466 @@ +types: + FoldersListRequestExpand: + enum: + - drive + - parent_folder + - value: parent_folder,drive + name: ParentFolderDrive + - permissions + - value: permissions,drive + name: PermissionsDrive + - value: permissions,parent_folder + name: PermissionsParentFolder + - value: permissions,parent_folder,drive + name: PermissionsParentFolderDrive + source: + openapi: openapi/openapi.yml + FoldersRetrieveRequestExpand: + enum: + - drive + - parent_folder + - value: parent_folder,drive + name: ParentFolderDrive + - permissions + - value: permissions,drive + name: PermissionsDrive + - value: permissions,parent_folder + name: PermissionsParentFolder + - value: permissions,parent_folder,drive + name: PermissionsParentFolderDrive + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /filestorage/v1/folders + method: GET + auth: true + docs: Returns a list of `Folder` objects. + source: + openapi: openapi/openapi.yml + request: + name: FoldersListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + drive_id: + type: optional + docs: If provided, will only return folders in this drive. + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + name: + type: optional + docs: >- + If provided, will only return folders with this name. This + performs an exact match. + page_size: + type: optional + docs: Number of results to return per page. + parent_folder_id: + type: optional + docs: >- + If provided, will only return folders in this parent folder. If + null, will return folders in root directory. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: root.PaginatedFolderList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: e021f7a7-74fc-4487-8e12-14180c92d3b7 + remote_id: '14' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: R&D + folder_url: https://drive.com/1234 + size: 2738000 + description: All things R&D related at Merge! + parent_folder: parent_folder + drive: drive + permissions: permissions + remote_created_at: '2024-02-02T00:00:00Z' + remote_updated_at: '2024-06-10T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /folders + data: + - Varies by platform + create: + path: /filestorage/v1/folders + method: POST + auth: true + docs: Creates a `Folder` object with the given values. + source: + openapi: openapi/openapi.yml + request: + name: FileStorageFolderEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: root.FolderRequest + content-type: application/json + response: + docs: '' + type: root.FileStorageFolderResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: e021f7a7-74fc-4487-8e12-14180c92d3b7 + remote_id: '14' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: R&D + folder_url: https://drive.com/1234 + size: 2738000 + description: All things R&D related at Merge! + parent_folder: parent_folder + drive: drive + permissions: permissions + remote_created_at: '2024-02-02T00:00:00Z' + remote_updated_at: '2024-06-10T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /folders + data: + - Varies by platform + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /filestorage/v1/folders/{id} + method: GET + auth: true + docs: Returns a `Folder` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: FoldersRetrieveRequest + query-parameters: + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.Folder + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: e021f7a7-74fc-4487-8e12-14180c92d3b7 + remote_id: '14' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: R&D + folder_url: https://drive.com/1234 + size: 2738000 + description: All things R&D related at Merge! + parent_folder: parent_folder + drive: drive + permissions: permissions + remote_created_at: '2024-02-02T00:00:00Z' + remote_updated_at: '2024-06-10T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /folders + data: + - Varies by platform + metaPostRetrieve: + path: /filestorage/v1/folders/meta/post + method: GET + auth: true + docs: Returns metadata for `FileStorageFolder` POSTs. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/filestorage/forceResync.yml b/.mock/definition/filestorage/forceResync.yml new file mode 100644 index 0000000..644c49b --- /dev/null +++ b/.mock/definition/filestorage/forceResync.yml @@ -0,0 +1,37 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + sync_status_resync_create: + path: /filestorage/v1/sync-status/resync + method: POST + auth: true + docs: >- + Force re-sync of all models. This endpoint is available for monthly, + quarterly, and highest sync frequency customers on the Professional or + Enterprise plans. Doing so will consume a sync credit for the relevant + linked account. Force re-syncs can also be triggered manually in the + Merge Dashboard and is available for all customers. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: list + status-code: 200 + examples: + - headers: {} + response: + body: + - model_name: File + model_id: filestorage.FileStorageFile + last_sync_start: '2021-03-30T19:44:18Z' + next_sync_start: '2021-03-30T20:44:18Z' + last_sync_result: SYNCING + last_sync_finished: '2021-03-30T19:55:18Z' + status: SYNCING + is_initial_sync: true + selective_sync_configurations_usage: IN_NEXT_SYNC + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/filestorage/generateKey.yml b/.mock/definition/filestorage/generateKey.yml new file mode 100644 index 0000000..04ac41b --- /dev/null +++ b/.mock/definition/filestorage/generateKey.yml @@ -0,0 +1,36 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /filestorage/v1/generate-key + method: POST + auth: true + docs: Create a remote key. + source: + openapi: openapi/openapi.yml + request: + name: GenerateRemoteKeyRequest + body: + properties: + name: + type: string + docs: The name of the remote key + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: root.RemoteKey + status-code: 200 + examples: + - request: + name: Remote Deployment Key 1 + response: + body: + name: Remote Deployment Key 1 + key: hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/filestorage/groups.yml b/.mock/definition/filestorage/groups.yml new file mode 100644 index 0000000..247ce30 --- /dev/null +++ b/.mock/definition/filestorage/groups.yml @@ -0,0 +1,154 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /filestorage/v1/groups + method: GET + auth: true + docs: Returns a list of `Group` objects. + source: + openapi: openapi/openapi.yml + request: + name: GroupsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: root.PaginatedGroupList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 5624aceb-0ea2-4864-ba08-354ac56b9884 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Administrators + users: + - 6e93361b-8ae7-444b-bfa2-71206cbbee24 + child_groups: + - a1f90b3c-633d-404e-a696-05cd54808676 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /groups + data: + - Varies by platform + retrieve: + path: /filestorage/v1/groups/{id} + method: GET + auth: true + docs: Returns a `Group` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: GroupsRetrieveRequest + query-parameters: + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.Group + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 5624aceb-0ea2-4864-ba08-354ac56b9884 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Administrators + users: + - 6e93361b-8ae7-444b-bfa2-71206cbbee24 + child_groups: + - a1f90b3c-633d-404e-a696-05cd54808676 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /groups + data: + - Varies by platform + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/filestorage/issues.yml b/.mock/definition/filestorage/issues.yml new file mode 100644 index 0000000..b6a1d19 --- /dev/null +++ b/.mock/definition/filestorage/issues.yml @@ -0,0 +1,129 @@ +types: + IssuesListRequestStatus: + enum: + - ONGOING + - RESOLVED + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /filestorage/v1/issues + method: GET + auth: true + docs: Gets all issues for Organization. + source: + openapi: openapi/openapi.yml + request: + name: IssuesListRequest + query-parameters: + account_token: optional + cursor: + type: optional + docs: The pagination cursor value. + end_date: + type: optional + docs: >- + If included, will only include issues whose most recent action + occurred before this time + end_user_organization_name: optional + first_incident_time_after: + type: optional + docs: >- + If provided, will only return issues whose first incident time was + after this datetime. + first_incident_time_before: + type: optional + docs: >- + If provided, will only return issues whose first incident time was + before this datetime. + include_muted: + type: optional + docs: If true, will include muted issues + integration_name: optional + last_incident_time_after: + type: optional + docs: >- + If provided, will only return issues whose last incident time was + after this datetime. + last_incident_time_before: + type: optional + docs: >- + If provided, will only return issues whose last incident time was + before this datetime. + linked_account_id: + type: optional + docs: >- + If provided, will only include issues pertaining to the linked + account passed in. + page_size: + type: optional + docs: Number of results to return per page. + start_date: + type: optional + docs: >- + If included, will only include issues whose most recent action + occurred after this time + status: + type: optional + docs: |- + Status of the issue. Options: ('ONGOING', 'RESOLVED') + + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + response: + docs: '' + type: root.PaginatedIssueList + status-code: 200 + examples: + - response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + status: ONGOING + error_description: Missing Permissions + end_user: + key: value + first_incident_time: '2022-12-05T16:19:15Z' + last_incident_time: '2022-12-05T16:19:15Z' + is_muted: true + error_details: + - Missing employee permissions. + - Missing time off permissions. + retrieve: + path: /filestorage/v1/issues/{id} + method: GET + auth: true + docs: Get a specific issue. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + response: + docs: '' + type: root.Issue + status-code: 200 + examples: + - path-parameters: + id: id + response: + body: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + status: ONGOING + error_description: Missing Permissions + end_user: + key: value + first_incident_time: '2022-12-05T16:19:15Z' + last_incident_time: '2022-12-05T16:19:15Z' + is_muted: true + error_details: + - Missing employee permissions. + - Missing time off permissions. + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/filestorage/linkToken.yml b/.mock/definition/filestorage/linkToken.yml new file mode 100644 index 0000000..fda54a0 --- /dev/null +++ b/.mock/definition/filestorage/linkToken.yml @@ -0,0 +1,135 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /filestorage/v1/link-token + method: POST + auth: true + docs: Creates a link token to be used when linking a new end user. + source: + openapi: openapi/openapi.yml + request: + name: EndUserDetailsRequest + body: + properties: + end_user_email_address: + type: string + docs: >- + Your end user's email address. This is purely for identification + purposes - setting this value will not cause any emails to be + sent. + validation: + minLength: 1 + maxLength: 100 + end_user_organization_name: + type: string + docs: Your end user's organization. + validation: + minLength: 1 + maxLength: 100 + end_user_origin_id: + type: string + docs: >- + This unique identifier typically represents the ID for your end + user in your product's database. This value must be distinct + from other Linked Accounts' unique identifiers. + validation: + minLength: 1 + maxLength: 100 + categories: + docs: The integration categories to show in Merge Link. + type: list + integration: + type: optional + docs: >- + The slug of a specific pre-selected integration for this linking + flow token. For examples of slugs, see + https://docs.merge.dev/guides/merge-link/single-integration/. + validation: + minLength: 1 + link_expiry_mins: + type: optional + docs: >- + An integer number of minutes between [30, 720 or 10080 if for a + Magic Link URL] for how long this token is valid. Defaults to + 30. + default: 30 + validation: + min: 30 + max: 10080 + should_create_magic_link_url: + type: optional + docs: >- + Whether to generate a Magic Link URL. Defaults to false. For + more information on Magic Link, see + https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. + default: false + hide_admin_magic_link: + type: optional + docs: >- + Whether to generate a Magic Link URL on the Admin Needed screen + during the linking flow. Defaults to false. For more information + on Magic Link, see + https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. + default: false + common_models: + type: optional> + docs: >- + An array of objects to specify the models and fields that will + be disabled for a given Linked Account. Each object uses + model_id, enabled_actions, and disabled_fields to specify the + model, method, and fields that are scoped for a given Linked + Account. + category_common_model_scopes: + type: >- + optional>>> + docs: >- + 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: + type: optional + docs: >- + The following subset of IETF language tags can be used to + configure localization. + + + * `en` - en + + * `de` - de + are_syncs_disabled: + type: optional + docs: >- + The boolean that indicates whether initial, periodic, and force + syncs will be disabled. + default: false + integration_specific_config: + type: optional> + docs: >- + A JSON object containing integration-specific configuration + options. + content-type: application/json + response: + docs: '' + type: root.LinkToken + status-code: 200 + examples: + - request: + end_user_email_address: example@gmail.com + end_user_organization_name: Test Organization + end_user_origin_id: '12345' + categories: + - hris + - ats + response: + body: + link_token: necdP7FtdASl1fQwm62be2_dM4wBG8_GactqoUV0 + integration_name: Lever + magic_link_url: https://link.merge.dev/asdfjkl12345jsndfgi2i83n + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/filestorage/linkedAccounts.yml b/.mock/definition/filestorage/linkedAccounts.yml new file mode 100644 index 0000000..d8fb0eb --- /dev/null +++ b/.mock/definition/filestorage/linkedAccounts.yml @@ -0,0 +1,150 @@ +types: + LinkedAccountsListRequestCategory: + enum: + - accounting + - ats + - crm + - filestorage + - hris + - mktg + - ticketing + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /filestorage/v1/linked-accounts + method: GET + auth: true + docs: List linked accounts for your organization. + source: + openapi: openapi/openapi.yml + request: + name: LinkedAccountsListRequest + query-parameters: + category: + type: optional + docs: >- + Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, + `mktg`, `ticketing` + + + * `hris` - hris + + * `ats` - ats + + * `accounting` - accounting + + * `ticketing` - ticketing + + * `crm` - crm + + * `mktg` - mktg + + * `filestorage` - filestorage + cursor: + type: optional + docs: The pagination cursor value. + end_user_email_address: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given email address. + end_user_organization_name: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given organization name. + end_user_origin_id: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given origin ID. + end_user_origin_ids: + type: optional + docs: >- + Comma-separated list of EndUser origin IDs, making it possible to + specify multiple EndUsers at once. + id: + type: optional + validation: + format: uuid + ids: + type: optional + docs: >- + Comma-separated list of LinkedAccount IDs, making it possible to + specify multiple LinkedAccounts at once. + include_duplicates: + type: optional + docs: >- + If `true`, will include complete production duplicates of the + account specified by the `id` query parameter in the response. + `id` must be for a complete production linked account. + integration_name: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given integration name. + is_test_account: + type: optional + docs: >- + If included, will only include test linked accounts. If not + included, will only include non-test linked accounts. + page_size: + type: optional + docs: Number of results to return per page. + status: + type: optional + docs: >- + Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, + `RELINK_NEEDED` + response: + docs: '' + type: root.PaginatedAccountDetailsAndActionsList + status-code: 200 + examples: + - response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: e59b1821-f85c-4e28-a6b3-1804156f3563 + category: hris + status: COMPLETE + status_detail: Invalid login credentials + end_user_origin_id: 3ac95cde-6c7f-4eef-afec-be710b42308d + end_user_organization_name: Foo Bar, LLC + end_user_email_address: hradmin@foobar.dev + subdomain: foobar + webhook_listener_url: >- + https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 + is_duplicate: true + integration: + name: name + categories: + - hris + color: color + slug: slug + passthrough_available: true + available_model_operations: + - model_name: Candidate + available_operations: + - FETCH + - CREATE + required_post_parameters: + - remote_user_id + supported_fields: + - first_name + - last_name + - company + - title + account_type: PRODUCTION + completed_at: '2024-08-26T20:11:19Z' + integration_specific_fields: + integration_specific_field: Varies by platform + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/filestorage/passthrough.yml b/.mock/definition/filestorage/passthrough.yml new file mode 100644 index 0000000..432034b --- /dev/null +++ b/.mock/definition/filestorage/passthrough.yml @@ -0,0 +1,40 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /filestorage/v1/passthrough + method: POST + auth: true + docs: Pull data from an endpoint not currently supported by Merge. + source: + openapi: openapi/openapi.yml + request: + body: root.DataPassthroughRequest + content-type: application/json + response: + docs: '' + type: root.RemoteResponse + status-code: 200 + examples: + - headers: {} + request: + method: GET + path: /scooters + response: + body: + method: GET + path: /scooters + status: 200 + response: + key: value + response_headers: + X-Page-Token: value + response_type: JSON + headers: + EXTRA-HEADER: value + Authorization: + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/filestorage/regenerateKey.yml b/.mock/definition/filestorage/regenerateKey.yml new file mode 100644 index 0000000..cd80f78 --- /dev/null +++ b/.mock/definition/filestorage/regenerateKey.yml @@ -0,0 +1,36 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /filestorage/v1/regenerate-key + method: POST + auth: true + docs: Exchange remote keys. + source: + openapi: openapi/openapi.yml + request: + name: RemoteKeyForRegenerationRequest + body: + properties: + name: + type: string + docs: The name of the remote key + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: root.RemoteKey + status-code: 200 + examples: + - request: + name: Remote Deployment Key 1 + response: + body: + name: Remote Deployment Key 1 + key: hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/filestorage/scopes.yml b/.mock/definition/filestorage/scopes.yml new file mode 100644 index 0000000..a48a164 --- /dev/null +++ b/.mock/definition/filestorage/scopes.yml @@ -0,0 +1,160 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + default_scopes_retrieve: + path: /filestorage/v1/default-scopes + method: GET + auth: true + docs: >- + 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/5950052-common-model-and-field-scopes). + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.CommonModelScopeApi + status-code: 200 + examples: + - response: + body: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - created_at + - custom_fields + - date_of_birth + - first_name + - gender + - remote_created_at + - remote_data + disabled_fields: + - company + - employments + - groups + - home_location + - manager + - work_location + linked_account_scopes_retrieve: + path: /filestorage/v1/linked-account-scopes + method: GET + auth: true + docs: >- + Get all available permissions for Merge Common Models and fields for a + single Linked Account. [Learn + more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.CommonModelScopeApi + status-code: 200 + examples: + - headers: {} + response: + body: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - created_at + - custom_fields + - date_of_birth + - first_name + - gender + - remote_created_at + - remote_data + disabled_fields: + - company + - employments + - groups + - home_location + - manager + - work_location + linked_account_scopes_create: + path: /filestorage/v1/linked-account-scopes + method: POST + auth: true + docs: >- + 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/5950052-common-model-and-field-scopes) + source: + openapi: openapi/openapi.yml + request: + name: LinkedAccountCommonModelScopeDeserializerRequest + body: + properties: + common_models: + docs: The common models you want to update the scopes for + type: list + content-type: application/json + response: + docs: '' + type: root.CommonModelScopeApi + status-code: 200 + examples: + - headers: {} + request: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - home_location + disabled_fields: + - work_location + - model_name: Benefit + model_permissions: + WRITE: + is_enabled: false + response: + body: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - created_at + - custom_fields + - date_of_birth + - first_name + - gender + - remote_created_at + - remote_data + disabled_fields: + - company + - employments + - groups + - home_location + - manager + - work_location + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/filestorage/syncStatus.yml b/.mock/definition/filestorage/syncStatus.yml new file mode 100644 index 0000000..53140e4 --- /dev/null +++ b/.mock/definition/filestorage/syncStatus.yml @@ -0,0 +1,55 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /filestorage/v1/sync-status + method: GET + auth: true + docs: >- + Get sync status for the current sync and the most recently finished + sync. `last_sync_start` represents the most recent time any sync began. + `last_sync_finished` represents the most recent time any sync completed. + These timestamps may correspond to different sync instances which may + result in a sync start time being later than a separate sync completed + time. To ensure you are retrieving the latest available data reference + the `last_sync_finished` timestamp where `last_sync_result` is `DONE`. + Possible values for `status` and `last_sync_result` are `DISABLED`, + `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more + about sync status in our [Help + Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). + source: + openapi: openapi/openapi.yml + request: + name: SyncStatusListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: root.PaginatedSyncStatusList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - model_name: File + model_id: filestorage.FileStorageFile + last_sync_start: '2021-03-30T19:44:18Z' + next_sync_start: '2021-03-30T20:44:18Z' + last_sync_result: SYNCING + last_sync_finished: '2021-03-30T19:55:18Z' + status: SYNCING + is_initial_sync: true + selective_sync_configurations_usage: IN_NEXT_SYNC + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/filestorage/users.yml b/.mock/definition/filestorage/users.yml new file mode 100644 index 0000000..6921bd6 --- /dev/null +++ b/.mock/definition/filestorage/users.yml @@ -0,0 +1,143 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /filestorage/v1/users + method: GET + auth: true + docs: Returns a list of `User` objects. + source: + openapi: openapi/openapi.yml + request: + name: UsersListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_me: + type: optional + docs: If provided, will only return the user object for requestor. + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: root.PaginatedUserList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 83902e75-4362-4803-b76c-a7d6be292cbd + remote_id: '2039349' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Gil Feig + email_address: hello@merge.dev + is_me: true + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /users + data: + - Varies by platform + retrieve: + path: /filestorage/v1/users/{id} + method: GET + auth: true + docs: Returns a `User` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: UsersRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.User + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 83902e75-4362-4803-b76c-a7d6be292cbd + remote_id: '2039349' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Gil Feig + email_address: hello@merge.dev + is_me: true + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /users + data: + - Varies by platform + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/filestorage/webhookReceivers.yml b/.mock/definition/filestorage/webhookReceivers.yml new file mode 100644 index 0000000..3b0bcac --- /dev/null +++ b/.mock/definition/filestorage/webhookReceivers.yml @@ -0,0 +1,61 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /filestorage/v1/webhook-receivers + method: GET + auth: true + docs: Returns a list of `WebhookReceiver` objects. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: list + status-code: 200 + examples: + - headers: {} + response: + body: + - event: event + is_active: true + key: key + create: + path: /filestorage/v1/webhook-receivers + method: POST + auth: true + docs: Creates a `WebhookReceiver` object with the given values. + source: + openapi: openapi/openapi.yml + request: + name: WebhookReceiverRequest + body: + properties: + event: + type: string + validation: + minLength: 1 + is_active: boolean + key: + type: optional + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: root.WebhookReceiver + status-code: 201 + examples: + - headers: {} + request: + event: event + is_active: true + response: + body: + event: event + is_active: true + key: key + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/hris/__package__.yml b/.mock/definition/hris/__package__.yml new file mode 100644 index 0000000..40543cd --- /dev/null +++ b/.mock/definition/hris/__package__.yml @@ -0,0 +1,6132 @@ +types: + AccountDetails: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + integration: + type: optional + access: read-only + integration_slug: + type: optional + access: read-only + category: optional + end_user_origin_id: + type: optional + access: read-only + end_user_organization_name: + type: optional + access: read-only + end_user_email_address: + type: optional + validation: + format: email + access: read-only + status: + type: optional + access: read-only + webhook_listener_url: + type: optional + validation: + format: uri + access: read-only + is_duplicate: + type: optional + docs: >- + 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. + access: read-only + account_type: + type: optional + access: read-only + completed_at: + type: optional + docs: The time at which account completes the linking flow. + source: + openapi: openapi/openapi.yml + AccountDetailsAndActions: + docs: >- + # The LinkedAccount Object + + ### Description + + The `LinkedAccount` object is used to represent an end user's link with a + specific integration. + + + ### Usage Example + + View a list of your organization's `LinkedAccount` objects. + properties: + id: string + category: optional + status: AccountDetailsAndActionsStatusEnum + status_detail: optional + end_user_origin_id: optional + end_user_organization_name: string + end_user_email_address: string + subdomain: + type: optional + docs: The tenant or domain the customer has provided access to. + webhook_listener_url: string + is_duplicate: + type: optional + docs: >- + 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. + integration: optional + account_type: string + completed_at: datetime + integration_specific_fields: optional> + source: + openapi: openapi/openapi.yml + AccountDetailsAndActionsIntegration: + properties: + name: string + categories: list + image: optional + square_image: optional + color: string + slug: string + passthrough_available: boolean + available_model_operations: optional> + source: + openapi: openapi/openapi.yml + AccountDetailsAndActionsStatusEnum: + enum: + - COMPLETE + - INCOMPLETE + - RELINK_NEEDED + - IDLE + docs: |- + * `COMPLETE` - COMPLETE + * `INCOMPLETE` - INCOMPLETE + * `RELINK_NEEDED` - RELINK_NEEDED + * `IDLE` - IDLE + source: + openapi: openapi/openapi.yml + AccountIntegration: + properties: + name: + type: string + docs: Company name. + abbreviated_name: + type: optional + docs: >- + Optional. This shortened name appears in places with limited space, + usually in conjunction with the platform's logo (e.g., Merge Link + menu).

Example: Workforce Now (in lieu of ADP Workforce + Now), SuccessFactors (in lieu of SAP SuccessFactors) + categories: + type: optional> + docs: >- + Category or categories this integration belongs to. Multiple + categories should be comma separated, i.e. [ats, hris]. + access: read-only + image: + type: optional + docs: Company logo in rectangular shape. + validation: + format: uri + square_image: + type: optional + docs: Company logo in square shape. + validation: + format: uri + color: + type: optional + docs: >- + The color of this integration used for buttons and text throughout the + app and landing pages. Choose a darker, saturated color. + validation: + pattern: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ + maxLength: 18 + slug: + type: optional + access: read-only + api_endpoints_to_documentation_urls: + type: optional> + docs: >- + Mapping of API endpoints to documentation urls for support. Example: + {'GET': [['/common-model-scopes', + 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', + 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], + 'POST': []} + webhook_setup_guide_url: + type: optional + docs: >- + Setup guide URL for third party webhook creation. Exposed in Merge + Docs. + category_beta_status: + type: optional> + docs: Category or categories this integration is in beta status for. + access: read-only + source: + openapi: openapi/openapi.yml + AccountToken: + properties: + account_token: string + integration: AccountIntegration + id: string + source: + openapi: openapi/openapi.yml + AccountTypeEnum: + enum: + - SAVINGS + - CHECKING + docs: |- + * `SAVINGS` - SAVINGS + * `CHECKING` - CHECKING + source: + openapi: openapi/openapi.yml + AdvancedMetadata: + properties: + id: + type: string + validation: + format: uuid + display_name: optional + description: optional + is_required: optional + is_custom: optional + field_choices: optional> + source: + openapi: openapi/openapi.yml + AsyncPassthroughReciept: + properties: + async_passthrough_receipt_id: + type: string + validation: + format: uuid + source: + openapi: openapi/openapi.yml + AuditLogEvent: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + user_name: + type: optional + docs: The User's full name at the time of this Event occurring. + validation: + maxLength: 200 + user_email: + type: optional + docs: The User's email at the time of this Event occurring. + validation: + format: email + maxLength: 254 + role: + type: RoleEnum + docs: >- + Designates the role of the user (or SYSTEM/API if action not taken by + a user) at the time of this Event occurring. + + + * `ADMIN` - ADMIN + + * `DEVELOPER` - DEVELOPER + + * `MEMBER` - MEMBER + + * `API` - API + + * `SYSTEM` - SYSTEM + + * `MERGE_TEAM` - MERGE_TEAM + ip_address: + type: string + validation: + maxLength: 45 + event_type: + type: EventTypeEnum + docs: >- + Designates the type of event that occurred. + + + * `CREATED_REMOTE_PRODUCTION_API_KEY` - + CREATED_REMOTE_PRODUCTION_API_KEY + + * `DELETED_REMOTE_PRODUCTION_API_KEY` - + DELETED_REMOTE_PRODUCTION_API_KEY + + * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + + * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + + * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + + * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + + * `INVITED_USER` - INVITED_USER + + * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + + * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + + * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + + * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - + DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + + * `CREATED_DESTINATION` - CREATED_DESTINATION + + * `DELETED_DESTINATION` - DELETED_DESTINATION + + * `CHANGED_DESTINATION` - CHANGED_DESTINATION + + * `CHANGED_SCOPES` - CHANGED_SCOPES + + * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + + * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + + * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + + * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + + * `ENABLED_CATEGORY` - ENABLED_CATEGORY + + * `DISABLED_CATEGORY` - DISABLED_CATEGORY + + * `CHANGED_PASSWORD` - CHANGED_PASSWORD + + * `RESET_PASSWORD` - RESET_PASSWORD + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - + CREATED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - + CREATED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - + CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + + * `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 + + * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + + * `MUTED_ISSUE` - MUTED_ISSUE + + * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + + * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + + * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + + * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + + * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + event_description: string + created_at: + type: optional + access: read-only + source: + openapi: openapi/openapi.yml + AvailableActions: + docs: >- + # The AvailableActions Object + + ### Description + + The `Activity` object is used to see all available model/operation + combinations for an integration. + + + ### Usage Example + + Fetch all the actions available for the `Zenefits` integration. + properties: + integration: AccountIntegration + passthrough_available: boolean + available_model_operations: optional> + source: + openapi: openapi/openapi.yml + BankInfoEmployee: + discriminated: false + docs: The employee with this bank account. + union: + - type: string + validation: + format: uuid + - Employee + source: + openapi: openapi/openapi.yml + inline: true + BankInfo: + docs: >- + # The BankInfo Object + + ### Description + + The `BankInfo` object is used to represent the Bank Account information + for an Employee. + + + ### Usage Example + + Fetch from the `LIST BankInfo` endpoint and filter by `ID` to show all + bank information. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + employee: + type: optional + docs: The employee with this bank account. + account_number: + type: optional + docs: The account number. + validation: + maxLength: 100 + routing_number: + type: optional + docs: The routing number. + bank_name: + type: optional + docs: The bank name. + account_type: + type: optional + docs: |- + The bank account type + + * `SAVINGS` - SAVINGS + * `CHECKING` - CHECKING + remote_created_at: + type: optional + docs: When the matching bank object was created in the third party system. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + BenefitEmployee: + discriminated: false + docs: The employee on the plan. + union: + - type: string + validation: + format: uuid + - Employee + source: + openapi: openapi/openapi.yml + inline: true + Benefit: + docs: >- + # The Benefit Object + + ### Description + + The `Benefit` object is used to represent a benefit that an employee has + enrolled in. + + + ### Usage Example + + Fetch from the `LIST Benefits` endpoint and filter by `ID` to show all + benefits. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + employee: + type: optional + docs: The employee on the plan. + provider_name: + type: optional + docs: The name of the benefit provider. + benefit_plan_type: + type: optional + docs: The type of benefit plan + availability: deprecated + employee_contribution: + type: optional + docs: The employee's contribution. + company_contribution: + type: optional + docs: The company's contribution. + start_date: + type: optional + docs: The day and time the benefit started. + end_date: + type: optional + docs: The day and time the benefit ended. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + employer_benefit: + type: optional + docs: The employer benefit plan the employee is enrolled in. + validation: + format: uuid + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + BenefitPlanTypeEnum: + enum: + - MEDICAL + - HEALTH_SAVINGS + - INSURANCE + - RETIREMENT + - OTHER + docs: |- + * `MEDICAL` - MEDICAL + * `HEALTH_SAVINGS` - HEALTH_SAVINGS + * `INSURANCE` - INSURANCE + * `RETIREMENT` - RETIREMENT + * `OTHER` - OTHER + source: + openapi: openapi/openapi.yml + CategoriesEnum: + enum: + - hris + - ats + - accounting + - ticketing + - crm + - mktg + - filestorage + docs: |- + * `hris` - hris + * `ats` - ats + * `accounting` - accounting + * `ticketing` - ticketing + * `crm` - crm + * `mktg` - mktg + * `filestorage` - filestorage + source: + openapi: openapi/openapi.yml + CategoryEnum: + enum: + - hris + - ats + - accounting + - ticketing + - crm + - mktg + - filestorage + docs: |- + * `hris` - hris + * `ats` - ats + * `accounting` - accounting + * `ticketing` - ticketing + * `crm` - crm + * `mktg` - mktg + * `filestorage` - filestorage + source: + openapi: openapi/openapi.yml + CommonModelScopeApi: + properties: + common_models: + docs: The common models you want to update the scopes for + type: list + source: + openapi: openapi/openapi.yml + CommonModelScopesBodyRequest: + properties: + model_id: + type: string + validation: + minLength: 1 + enabled_actions: list + disabled_fields: list + source: + openapi: openapi/openapi.yml + Company: + docs: >- + # The Company Object + + ### Description + + The `Company` object is used to represent a company within the HRIS / + Payroll system. + + + ### Usage Example + + Fetch from the `LIST Companies` endpoint and filter by `ID` to show all + companies. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + legal_name: + type: optional + docs: The company's legal name. + display_name: + type: optional + docs: The company's display name. + eins: + type: optional>> + docs: The company's Employer Identification Numbers. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + CountryEnum: + enum: + - AF + - AX + - AL + - DZ + - AS + - AD + - AO + - AI + - AQ + - AG + - AR + - AM + - AW + - AU + - AT + - AZ + - BS + - BH + - BD + - BB + - BY + - BE + - BZ + - BJ + - BM + - BT + - BO + - BQ + - BA + - BW + - BV + - BR + - IO + - BN + - BG + - BF + - BI + - CV + - KH + - CM + - CA + - KY + - CF + - TD + - CL + - CN + - CX + - CC + - CO + - KM + - CG + - CD + - CK + - CR + - CI + - HR + - CU + - CW + - CY + - CZ + - DK + - DJ + - DM + - DO + - EC + - EG + - SV + - GQ + - ER + - EE + - SZ + - ET + - FK + - FO + - FJ + - FI + - FR + - GF + - PF + - TF + - GA + - GM + - GE + - DE + - GH + - GI + - GR + - GL + - GD + - GP + - GU + - GT + - GG + - GN + - GW + - GY + - HT + - HM + - VA + - HN + - HK + - HU + - IS + - IN + - ID + - IR + - IQ + - IE + - IM + - IL + - IT + - JM + - JP + - JE + - JO + - KZ + - KE + - KI + - KW + - KG + - LA + - LV + - LB + - LS + - LR + - LY + - LI + - LT + - LU + - MO + - MG + - MW + - MY + - MV + - ML + - MT + - MH + - MQ + - MR + - MU + - YT + - MX + - FM + - MD + - MC + - MN + - ME + - MS + - MA + - MZ + - MM + - NA + - NR + - NP + - NL + - NC + - NZ + - NI + - NE + - NG + - NU + - NF + - KP + - MK + - MP + - 'NO' + - OM + - PK + - PW + - PS + - PA + - PG + - PY + - PE + - PH + - PN + - PL + - PT + - PR + - QA + - RE + - RO + - RU + - RW + - BL + - SH + - KN + - LC + - MF + - PM + - VC + - WS + - SM + - ST + - SA + - SN + - RS + - SC + - SL + - SG + - SX + - SK + - SI + - SB + - SO + - ZA + - GS + - KR + - SS + - ES + - LK + - SD + - SR + - SJ + - SE + - CH + - SY + - TW + - TJ + - TZ + - TH + - TL + - TG + - TK + - TO + - TT + - TN + - TR + - TM + - TC + - TV + - UG + - UA + - AE + - GB + - UM + - US + - UY + - UZ + - VU + - VE + - VN + - VG + - VI + - WF + - EH + - YE + - ZM + - ZW + docs: |- + * `AF` - Afghanistan + * `AX` - Åland Islands + * `AL` - Albania + * `DZ` - Algeria + * `AS` - American Samoa + * `AD` - Andorra + * `AO` - Angola + * `AI` - Anguilla + * `AQ` - Antarctica + * `AG` - Antigua and Barbuda + * `AR` - Argentina + * `AM` - Armenia + * `AW` - Aruba + * `AU` - Australia + * `AT` - Austria + * `AZ` - Azerbaijan + * `BS` - Bahamas + * `BH` - Bahrain + * `BD` - Bangladesh + * `BB` - Barbados + * `BY` - Belarus + * `BE` - Belgium + * `BZ` - Belize + * `BJ` - Benin + * `BM` - Bermuda + * `BT` - Bhutan + * `BO` - Bolivia + * `BQ` - Bonaire, Sint Eustatius and Saba + * `BA` - Bosnia and Herzegovina + * `BW` - Botswana + * `BV` - Bouvet Island + * `BR` - Brazil + * `IO` - British Indian Ocean Territory + * `BN` - Brunei + * `BG` - Bulgaria + * `BF` - Burkina Faso + * `BI` - Burundi + * `CV` - Cabo Verde + * `KH` - Cambodia + * `CM` - Cameroon + * `CA` - Canada + * `KY` - Cayman Islands + * `CF` - Central African Republic + * `TD` - Chad + * `CL` - Chile + * `CN` - China + * `CX` - Christmas Island + * `CC` - Cocos (Keeling) Islands + * `CO` - Colombia + * `KM` - Comoros + * `CG` - Congo + * `CD` - Congo (the Democratic Republic of the) + * `CK` - Cook Islands + * `CR` - Costa Rica + * `CI` - Côte d'Ivoire + * `HR` - Croatia + * `CU` - Cuba + * `CW` - Curaçao + * `CY` - Cyprus + * `CZ` - Czechia + * `DK` - Denmark + * `DJ` - Djibouti + * `DM` - Dominica + * `DO` - Dominican Republic + * `EC` - Ecuador + * `EG` - Egypt + * `SV` - El Salvador + * `GQ` - Equatorial Guinea + * `ER` - Eritrea + * `EE` - Estonia + * `SZ` - Eswatini + * `ET` - Ethiopia + * `FK` - Falkland Islands (Malvinas) + * `FO` - Faroe Islands + * `FJ` - Fiji + * `FI` - Finland + * `FR` - France + * `GF` - French Guiana + * `PF` - French Polynesia + * `TF` - French Southern Territories + * `GA` - Gabon + * `GM` - Gambia + * `GE` - Georgia + * `DE` - Germany + * `GH` - Ghana + * `GI` - Gibraltar + * `GR` - Greece + * `GL` - Greenland + * `GD` - Grenada + * `GP` - Guadeloupe + * `GU` - Guam + * `GT` - Guatemala + * `GG` - Guernsey + * `GN` - Guinea + * `GW` - Guinea-Bissau + * `GY` - Guyana + * `HT` - Haiti + * `HM` - Heard Island and McDonald Islands + * `VA` - Holy See + * `HN` - Honduras + * `HK` - Hong Kong + * `HU` - Hungary + * `IS` - Iceland + * `IN` - India + * `ID` - Indonesia + * `IR` - Iran + * `IQ` - Iraq + * `IE` - Ireland + * `IM` - Isle of Man + * `IL` - Israel + * `IT` - Italy + * `JM` - Jamaica + * `JP` - Japan + * `JE` - Jersey + * `JO` - Jordan + * `KZ` - Kazakhstan + * `KE` - Kenya + * `KI` - Kiribati + * `KW` - Kuwait + * `KG` - Kyrgyzstan + * `LA` - Laos + * `LV` - Latvia + * `LB` - Lebanon + * `LS` - Lesotho + * `LR` - Liberia + * `LY` - Libya + * `LI` - Liechtenstein + * `LT` - Lithuania + * `LU` - Luxembourg + * `MO` - Macao + * `MG` - Madagascar + * `MW` - Malawi + * `MY` - Malaysia + * `MV` - Maldives + * `ML` - Mali + * `MT` - Malta + * `MH` - Marshall Islands + * `MQ` - Martinique + * `MR` - Mauritania + * `MU` - Mauritius + * `YT` - Mayotte + * `MX` - Mexico + * `FM` - Micronesia (Federated States of) + * `MD` - Moldova + * `MC` - Monaco + * `MN` - Mongolia + * `ME` - Montenegro + * `MS` - Montserrat + * `MA` - Morocco + * `MZ` - Mozambique + * `MM` - Myanmar + * `NA` - Namibia + * `NR` - Nauru + * `NP` - Nepal + * `NL` - Netherlands + * `NC` - New Caledonia + * `NZ` - New Zealand + * `NI` - Nicaragua + * `NE` - Niger + * `NG` - Nigeria + * `NU` - Niue + * `NF` - Norfolk Island + * `KP` - North Korea + * `MK` - North Macedonia + * `MP` - Northern Mariana Islands + * `NO` - Norway + * `OM` - Oman + * `PK` - Pakistan + * `PW` - Palau + * `PS` - Palestine, State of + * `PA` - Panama + * `PG` - Papua New Guinea + * `PY` - Paraguay + * `PE` - Peru + * `PH` - Philippines + * `PN` - Pitcairn + * `PL` - Poland + * `PT` - Portugal + * `PR` - Puerto Rico + * `QA` - Qatar + * `RE` - Réunion + * `RO` - Romania + * `RU` - Russia + * `RW` - Rwanda + * `BL` - Saint Barthélemy + * `SH` - Saint Helena, Ascension and Tristan da Cunha + * `KN` - Saint Kitts and Nevis + * `LC` - Saint Lucia + * `MF` - Saint Martin (French part) + * `PM` - Saint Pierre and Miquelon + * `VC` - Saint Vincent and the Grenadines + * `WS` - Samoa + * `SM` - San Marino + * `ST` - Sao Tome and Principe + * `SA` - Saudi Arabia + * `SN` - Senegal + * `RS` - Serbia + * `SC` - Seychelles + * `SL` - Sierra Leone + * `SG` - Singapore + * `SX` - Sint Maarten (Dutch part) + * `SK` - Slovakia + * `SI` - Slovenia + * `SB` - Solomon Islands + * `SO` - Somalia + * `ZA` - South Africa + * `GS` - South Georgia and the South Sandwich Islands + * `KR` - South Korea + * `SS` - South Sudan + * `ES` - Spain + * `LK` - Sri Lanka + * `SD` - Sudan + * `SR` - Suriname + * `SJ` - Svalbard and Jan Mayen + * `SE` - Sweden + * `CH` - Switzerland + * `SY` - Syria + * `TW` - Taiwan + * `TJ` - Tajikistan + * `TZ` - Tanzania + * `TH` - Thailand + * `TL` - Timor-Leste + * `TG` - Togo + * `TK` - Tokelau + * `TO` - Tonga + * `TT` - Trinidad and Tobago + * `TN` - Tunisia + * `TR` - Turkey + * `TM` - Turkmenistan + * `TC` - Turks and Caicos Islands + * `TV` - Tuvalu + * `UG` - Uganda + * `UA` - Ukraine + * `AE` - United Arab Emirates + * `GB` - United Kingdom + * `UM` - United States Minor Outlying Islands + * `US` - United States of America + * `UY` - Uruguay + * `UZ` - Uzbekistan + * `VU` - Vanuatu + * `VE` - Venezuela + * `VN` - Vietnam + * `VG` - Virgin Islands (British) + * `VI` - Virgin Islands (U.S.) + * `WF` - Wallis and Futuna + * `EH` - Western Sahara + * `YE` - Yemen + * `ZM` - Zambia + * `ZW` - Zimbabwe + source: + openapi: openapi/openapi.yml + DataPassthroughRequest: + docs: >- + # The DataPassthrough Object + + ### Description + + The `DataPassthrough` object is used to send information to an + otherwise-unsupported third-party endpoint. + + + ### Usage Example + + Create a `DataPassthrough` to get team hierarchies from your Rippling + integration. + properties: + method: MethodEnum + path: + type: string + docs: The path of the request in the third party's platform. + validation: + minLength: 1 + base_url_override: + type: optional + docs: An optional override of the third party's base url for the request. + validation: + minLength: 1 + data: + type: optional + docs: >- + The data with the request. You must include a `request_format` + parameter matching the data's format + validation: + minLength: 1 + multipart_form_data: + type: optional> + docs: >- + Pass an array of `MultipartFormField` objects in here instead of using + the `data` param if `request_format` is set to `MULTIPART`. + headers: + type: optional> + docs: >- + The headers to use for the request (Merge will handle the account's + authorization headers). `Content-Type` header is required for + passthrough. Choose content type corresponding to expected format of + receiving server. + request_format: optional + normalize_response: + type: optional + docs: >- + Optional. If true, the response will always be an object of the form + `{"type": T, "value": ...}` where `T` will be one of `string, boolean, + number, null, array, object`. + source: + openapi: openapi/openapi.yml + DebugModeLog: + properties: + log_id: string + dashboard_view: string + log_summary: DebugModelLogSummary + source: + openapi: openapi/openapi.yml + DebugModelLogSummary: + properties: + url: string + method: string + status_code: integer + source: + openapi: openapi/openapi.yml + Deduction: + docs: >- + # The Deduction Object + + ### Description + + The `Deduction` object is used to represent an array of the wages withheld + from total earnings for the purpose of paying taxes. + + + ### Usage Example + + Fetch from the `LIST Deductions` endpoint and filter by `ID` to show all + deductions. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + employee_payroll_run: + type: optional + validation: + format: uuid + name: + type: optional + docs: The deduction's name. + employee_deduction: + type: optional + docs: >- + The amount of money that is withheld from an employee's gross pay by + the employee. + company_deduction: + type: optional + docs: >- + The amount of money that is withheld on behalf of an employee by the + company. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + Dependent: + docs: >- + # The Dependent Object + + ### Description + + The `Dependent` object is used to represent a dependent (e.g. child, + spouse, domestic partner, etc) of an `Employee` + + + ### Usage Example + + Fetch from the `LIST Dependents` endpoint and filter by `ID` to show all + dependents. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + first_name: + type: optional + docs: The dependents's first name. + validation: + maxLength: 60 + middle_name: + type: optional + docs: The dependents's middle name. + validation: + maxLength: 60 + last_name: + type: optional + docs: The dependents's last name. + validation: + maxLength: 60 + relationship: + type: optional + docs: |- + The dependent's relationship to the employee. + + * `CHILD` - CHILD + * `SPOUSE` - SPOUSE + * `DOMESTIC_PARTNER` - DOMESTIC_PARTNER + employee: + type: optional + docs: The employee this person is a dependent of. + validation: + format: uuid + date_of_birth: + type: optional + docs: The dependent's date of birth. + gender: + type: optional + docs: |- + The dependent's gender. + + * `MALE` - MALE + * `FEMALE` - FEMALE + * `NON-BINARY` - NON-BINARY + * `OTHER` - OTHER + * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE + phone_number: + type: optional + docs: The dependent's phone number. + validation: + maxLength: 50 + home_location: + type: optional + docs: The dependents's home address. + validation: + format: uuid + is_student: + type: optional + docs: Whether or not the dependent is a student + ssn: + type: optional + docs: The dependents's social security number. + validation: + maxLength: 50 + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + Earning: + docs: >- + # The Earning Object + + ### Description + + The `Earning` object is used to represent an array of different + compensations that an employee receives within specific wage categories. + + + ### Usage Example + + Fetch from the `LIST Earnings` endpoint and filter by `ID` to show all + earnings. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + employee_payroll_run: + type: optional + validation: + format: uuid + amount: + type: optional + docs: The amount earned. + type: + type: optional + docs: |- + The type of earning. + + * `SALARY` - SALARY + * `REIMBURSEMENT` - REIMBURSEMENT + * `OVERTIME` - OVERTIME + * `BONUS` - BONUS + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + EarningTypeEnum: + enum: + - SALARY + - REIMBURSEMENT + - OVERTIME + - BONUS + docs: |- + * `SALARY` - SALARY + * `REIMBURSEMENT` - REIMBURSEMENT + * `OVERTIME` - OVERTIME + * `BONUS` - BONUS + source: + openapi: openapi/openapi.yml + EmployeeCompany: + discriminated: false + docs: The ID of the employee's company. + union: + - type: string + validation: + format: uuid + - Company + source: + openapi: openapi/openapi.yml + inline: true + EmployeeGroupsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Group + source: + openapi: openapi/openapi.yml + inline: true + EmployeeEmploymentsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Employment + source: + openapi: openapi/openapi.yml + inline: true + EmployeeHomeLocation: + discriminated: false + docs: The employee's home address. + union: + - type: string + validation: + format: uuid + - Location + source: + openapi: openapi/openapi.yml + inline: true + EmployeeWorkLocation: + discriminated: false + docs: The employee's work address. + union: + - type: string + validation: + format: uuid + - Location + source: + openapi: openapi/openapi.yml + inline: true + EmployeeManager: + discriminated: false + docs: The employee ID of the employee's manager. + union: + - type: string + validation: + format: uuid + - Employee + source: + openapi: openapi/openapi.yml + inline: true + EmployeeTeam: + discriminated: false + docs: The employee's team. + union: + - type: string + validation: + format: uuid + - Team + source: + openapi: openapi/openapi.yml + inline: true + EmployeePayGroup: + discriminated: false + docs: The employee's pay group + union: + - type: string + validation: + format: uuid + - PayGroup + source: + openapi: openapi/openapi.yml + inline: true + Employee: + docs: >- + # The Employee Object + + ### Description + + The `Employee` object is used to represent any person who has been + employed by a company. By default, it returns all employees. To filter for + only active employees, set the `employment_status` query parameter to + `ACTIVE`. + + + ### Usage Example + + Fetch from the `LIST Employee` endpoint and filter by `ID` to show all + employees. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + employee_number: + type: optional + docs: >- + The employee's number that appears in the third-party integration's + UI. + company: + type: optional + docs: The ID of the employee's company. + first_name: + type: optional + docs: The employee's first name. + last_name: + type: optional + docs: The employee's last name. + preferred_name: + type: optional + docs: The employee's preferred first name. + display_full_name: + type: optional + docs: >- + The employee's full name, to use for display purposes. If a preferred + first name is available, the full name will include the preferred + first name. + username: + type: optional + docs: The employee's username that appears in the remote UI. + groups: optional>> + work_email: + type: optional + docs: The employee's work email. + validation: + format: email + maxLength: 254 + personal_email: + type: optional + docs: The employee's personal email. + validation: + format: email + maxLength: 254 + mobile_phone_number: + type: optional + docs: The employee's mobile phone number. + employments: + type: optional>> + docs: Array of `Employment` IDs for this Employee. + home_location: + type: optional + docs: The employee's home address. + work_location: + type: optional + docs: The employee's work address. + manager: + type: optional + docs: The employee ID of the employee's manager. + team: + type: optional + docs: The employee's team. + availability: deprecated + pay_group: + type: optional + docs: The employee's pay group + ssn: + type: optional + docs: The employee's social security number. + validation: + maxLength: 100 + gender: + type: optional + docs: |- + The employee's gender. + + * `MALE` - MALE + * `FEMALE` - FEMALE + * `NON-BINARY` - NON-BINARY + * `OTHER` - OTHER + * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE + ethnicity: + type: optional + docs: >- + The employee's ethnicity. + + + * `AMERICAN_INDIAN_OR_ALASKA_NATIVE` - + AMERICAN_INDIAN_OR_ALASKA_NATIVE + + * `ASIAN_OR_INDIAN_SUBCONTINENT` - ASIAN_OR_INDIAN_SUBCONTINENT + + * `BLACK_OR_AFRICAN_AMERICAN` - BLACK_OR_AFRICAN_AMERICAN + + * `HISPANIC_OR_LATINO` - HISPANIC_OR_LATINO + + * `NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER` - + NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER + + * `TWO_OR_MORE_RACES` - TWO_OR_MORE_RACES + + * `WHITE` - WHITE + + * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE + marital_status: + type: optional + docs: >- + The employee's filing status as related to marital status. + + + * `SINGLE` - SINGLE + + * `MARRIED_FILING_JOINTLY` - MARRIED_FILING_JOINTLY + + * `MARRIED_FILING_SEPARATELY` - MARRIED_FILING_SEPARATELY + + * `HEAD_OF_HOUSEHOLD` - HEAD_OF_HOUSEHOLD + + * `QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD` - + QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD + date_of_birth: + type: optional + docs: The employee's date of birth. + hire_date: + type: optional + docs: >- + The date that the employee was hired, usually the day that an offer + letter is signed. If an employee has multiple hire dates from previous + employments, this represents the most recent hire date. Note: If + you're looking for the employee's start date, refer to the start_date + field. + availability: deprecated + start_date: + type: optional + docs: >- + The date that the employee started working. If an employee was + rehired, the most recent start date will be returned. + remote_created_at: + type: optional + docs: When the third party's employee was created. + employment_status: + type: optional + docs: |- + The employment status of the employee. + + * `ACTIVE` - ACTIVE + * `PENDING` - PENDING + * `INACTIVE` - INACTIVE + termination_date: + type: optional + docs: The employee's termination date. + avatar: + type: optional + docs: The URL of the employee's avatar image. + validation: + format: uri + maxLength: 2000 + custom_fields: + type: optional> + docs: Custom fields configured for a given model. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + EmployeePayrollRunEmployee: + discriminated: false + docs: The employee whose payroll is being run. + union: + - type: string + validation: + format: uuid + - Employee + source: + openapi: openapi/openapi.yml + inline: true + EmployeePayrollRunPayrollRun: + discriminated: false + docs: The payroll being run. + union: + - type: string + validation: + format: uuid + - PayrollRun + source: + openapi: openapi/openapi.yml + inline: true + EmployeePayrollRun: + docs: >- + # The EmployeePayrollRun Object + + ### Description + + The `EmployeePayrollRun` object is used to represent an employee's pay + statement for a specific payroll run. + + + ### Usage Example + + Fetch from the `LIST EmployeePayrollRun` endpoint and filter by `ID` to + show all employee payroll runs. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + employee: + type: optional + docs: The employee whose payroll is being run. + payroll_run: + type: optional + docs: The payroll being run. + gross_pay: + type: optional + docs: >- + The total earnings throughout a given period for an employee before + any deductions are made. + net_pay: + type: optional + docs: >- + The take-home pay throughout a given period for an employee after + deductions are made. + start_date: + type: optional + docs: The day and time the payroll run started. + end_date: + type: optional + docs: The day and time the payroll run ended. + check_date: + type: optional + docs: The day and time the payroll run was checked. + earnings: + type: optional> + access: read-only + deductions: + type: optional> + access: read-only + taxes: + type: optional> + access: read-only + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + EmployeeRequestCompany: + discriminated: false + docs: The ID of the employee's company. + union: + - type: string + validation: + format: uuid + - Company + source: + openapi: openapi/openapi.yml + inline: true + EmployeeRequestGroupsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Group + source: + openapi: openapi/openapi.yml + inline: true + EmployeeRequestEmploymentsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Employment + source: + openapi: openapi/openapi.yml + inline: true + EmployeeRequestHomeLocation: + discriminated: false + docs: The employee's home address. + union: + - type: string + validation: + format: uuid + - Location + source: + openapi: openapi/openapi.yml + inline: true + EmployeeRequestWorkLocation: + discriminated: false + docs: The employee's work address. + union: + - type: string + validation: + format: uuid + - Location + source: + openapi: openapi/openapi.yml + inline: true + EmployeeRequestManager: + discriminated: false + docs: The employee ID of the employee's manager. + union: + - type: string + validation: + format: uuid + - Employee + source: + openapi: openapi/openapi.yml + inline: true + EmployeeRequestTeam: + discriminated: false + docs: The employee's team. + union: + - type: string + validation: + format: uuid + - Team + source: + openapi: openapi/openapi.yml + inline: true + EmployeeRequestPayGroup: + discriminated: false + docs: The employee's pay group + union: + - type: string + validation: + format: uuid + - PayGroup + source: + openapi: openapi/openapi.yml + inline: true + EmployeeRequest: + docs: >- + # The Employee Object + + ### Description + + The `Employee` object is used to represent any person who has been + employed by a company. By default, it returns all employees. To filter for + only active employees, set the `employment_status` query parameter to + `ACTIVE`. + + + ### Usage Example + + Fetch from the `LIST Employee` endpoint and filter by `ID` to show all + employees. + properties: + employee_number: + type: optional + docs: >- + The employee's number that appears in the third-party integration's + UI. + company: + type: optional + docs: The ID of the employee's company. + first_name: + type: optional + docs: The employee's first name. + last_name: + type: optional + docs: The employee's last name. + preferred_name: + type: optional + docs: The employee's preferred first name. + display_full_name: + type: optional + docs: >- + The employee's full name, to use for display purposes. If a preferred + first name is available, the full name will include the preferred + first name. + username: + type: optional + docs: The employee's username that appears in the remote UI. + groups: optional>> + work_email: + type: optional + docs: The employee's work email. + validation: + format: email + maxLength: 254 + personal_email: + type: optional + docs: The employee's personal email. + validation: + format: email + maxLength: 254 + mobile_phone_number: + type: optional + docs: The employee's mobile phone number. + employments: + type: optional>> + docs: Array of `Employment` IDs for this Employee. + home_location: + type: optional + docs: The employee's home address. + work_location: + type: optional + docs: The employee's work address. + manager: + type: optional + docs: The employee ID of the employee's manager. + team: + type: optional + docs: The employee's team. + availability: deprecated + pay_group: + type: optional + docs: The employee's pay group + ssn: + type: optional + docs: The employee's social security number. + validation: + maxLength: 100 + gender: + type: optional + docs: |- + The employee's gender. + + * `MALE` - MALE + * `FEMALE` - FEMALE + * `NON-BINARY` - NON-BINARY + * `OTHER` - OTHER + * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE + ethnicity: + type: optional + docs: >- + The employee's ethnicity. + + + * `AMERICAN_INDIAN_OR_ALASKA_NATIVE` - + AMERICAN_INDIAN_OR_ALASKA_NATIVE + + * `ASIAN_OR_INDIAN_SUBCONTINENT` - ASIAN_OR_INDIAN_SUBCONTINENT + + * `BLACK_OR_AFRICAN_AMERICAN` - BLACK_OR_AFRICAN_AMERICAN + + * `HISPANIC_OR_LATINO` - HISPANIC_OR_LATINO + + * `NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER` - + NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER + + * `TWO_OR_MORE_RACES` - TWO_OR_MORE_RACES + + * `WHITE` - WHITE + + * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE + marital_status: + type: optional + docs: >- + The employee's filing status as related to marital status. + + + * `SINGLE` - SINGLE + + * `MARRIED_FILING_JOINTLY` - MARRIED_FILING_JOINTLY + + * `MARRIED_FILING_SEPARATELY` - MARRIED_FILING_SEPARATELY + + * `HEAD_OF_HOUSEHOLD` - HEAD_OF_HOUSEHOLD + + * `QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD` - + QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD + date_of_birth: + type: optional + docs: The employee's date of birth. + hire_date: + type: optional + docs: >- + The date that the employee was hired, usually the day that an offer + letter is signed. If an employee has multiple hire dates from previous + employments, this represents the most recent hire date. Note: If + you're looking for the employee's start date, refer to the start_date + field. + availability: deprecated + start_date: + type: optional + docs: >- + The date that the employee started working. If an employee was + rehired, the most recent start date will be returned. + employment_status: + type: optional + docs: |- + The employment status of the employee. + + * `ACTIVE` - ACTIVE + * `PENDING` - PENDING + * `INACTIVE` - INACTIVE + termination_date: + type: optional + docs: The employee's termination date. + avatar: + type: optional + docs: The URL of the employee's avatar image. + validation: + format: uri + maxLength: 2000 + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + EmployeeResponse: + properties: + model: Employee + warnings: list + errors: list + logs: optional> + source: + openapi: openapi/openapi.yml + EmployerBenefit: + docs: >- + # The EmployerBenefit Object + + ### Description + + The `Employer Benefit` object is used to represent a benefit plan offered + by a company. + + + ### Usage Example + + Fetch from the `LIST EmployerBenefits` endpoint and filter by `ID` to show + all EmployerBenefits. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + benefit_plan_type: + type: optional + docs: |- + The type of benefit plan. + + * `MEDICAL` - MEDICAL + * `HEALTH_SAVINGS` - HEALTH_SAVINGS + * `INSURANCE` - INSURANCE + * `RETIREMENT` - RETIREMENT + * `OTHER` - OTHER + name: + type: optional + docs: The employer benefit's name - typically the carrier or network name. + validation: + maxLength: 200 + description: + type: optional + docs: The employer benefit's description. + validation: + maxLength: 2000 + deduction_code: + type: optional + docs: The employer benefit's deduction code. + validation: + maxLength: 60 + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + EmploymentEmployee: + discriminated: false + docs: The employee holding this position. + union: + - type: string + validation: + format: uuid + - Employee + source: + openapi: openapi/openapi.yml + inline: true + EmploymentPayGroup: + discriminated: false + docs: The employment's pay group + union: + - type: string + validation: + format: uuid + - PayGroup + source: + openapi: openapi/openapi.yml + inline: true + Employment: + docs: >- + # The Employment Object + + ### Description + + The `Employment` object is used to represent a job position at a company. + + + If an integration supports historical tracking of employments, it will be + reflected in the data. If not, a new `Employment` object will be created + whenever there is a change in job title or pay. The `effective_date` field + should be used to order `Employment` objects, with the most recent date + corresponding to the latest employment record for an employee. + + + ### Usage Example + + Fetch from the `LIST Employments` endpoint and filter by `ID` to show all + employees. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + employee: + type: optional + docs: The employee holding this position. + job_title: + type: optional + docs: The position's title. + pay_rate: + type: optional + docs: The position's pay rate. + pay_period: + type: optional + docs: |- + The time period this pay rate encompasses. + + * `HOUR` - HOUR + * `DAY` - DAY + * `WEEK` - WEEK + * `EVERY_TWO_WEEKS` - EVERY_TWO_WEEKS + * `SEMIMONTHLY` - SEMIMONTHLY + * `MONTH` - MONTH + * `QUARTER` - QUARTER + * `EVERY_SIX_MONTHS` - EVERY_SIX_MONTHS + * `YEAR` - YEAR + pay_frequency: + type: optional + docs: |- + The position's pay frequency. + + * `WEEKLY` - WEEKLY + * `BIWEEKLY` - BIWEEKLY + * `MONTHLY` - MONTHLY + * `QUARTERLY` - QUARTERLY + * `SEMIANNUALLY` - SEMIANNUALLY + * `ANNUALLY` - ANNUALLY + * `THIRTEEN-MONTHLY` - THIRTEEN-MONTHLY + * `PRO_RATA` - PRO_RATA + * `SEMIMONTHLY` - SEMIMONTHLY + pay_currency: + type: optional + docs: >- + The position's currency code. + + + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + pay_group: + type: optional + docs: The employment's pay group + flsa_status: + type: optional + docs: |- + The position's FLSA status. + + * `EXEMPT` - EXEMPT + * `SALARIED_NONEXEMPT` - SALARIED_NONEXEMPT + * `NONEXEMPT` - NONEXEMPT + * `OWNER` - OWNER + effective_date: + type: optional + docs: The position's effective date. + employment_type: + type: optional + docs: |- + The position's type of employment. + + * `FULL_TIME` - FULL_TIME + * `PART_TIME` - PART_TIME + * `INTERN` - INTERN + * `CONTRACTOR` - CONTRACTOR + * `FREELANCE` - FREELANCE + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + EmploymentStatusEnum: + enum: + - ACTIVE + - PENDING + - INACTIVE + docs: |- + * `ACTIVE` - ACTIVE + * `PENDING` - PENDING + * `INACTIVE` - INACTIVE + source: + openapi: openapi/openapi.yml + EmploymentTypeEnum: + enum: + - FULL_TIME + - PART_TIME + - INTERN + - CONTRACTOR + - FREELANCE + docs: |- + * `FULL_TIME` - FULL_TIME + * `PART_TIME` - PART_TIME + * `INTERN` - INTERN + * `CONTRACTOR` - CONTRACTOR + * `FREELANCE` - FREELANCE + source: + openapi: openapi/openapi.yml + EnabledActionsEnum: + enum: + - READ + - WRITE + docs: |- + * `READ` - READ + * `WRITE` - WRITE + source: + openapi: openapi/openapi.yml + EncodingEnum: + enum: + - RAW + - BASE64 + - GZIP_BASE64 + docs: |- + * `RAW` - RAW + * `BASE64` - BASE64 + * `GZIP_BASE64` - GZIP_BASE64 + source: + openapi: openapi/openapi.yml + ErrorValidationProblem: + properties: + source: optional + title: string + detail: string + problem_type: string + source: + openapi: openapi/openapi.yml + EthnicityEnum: + enum: + - AMERICAN_INDIAN_OR_ALASKA_NATIVE + - ASIAN_OR_INDIAN_SUBCONTINENT + - BLACK_OR_AFRICAN_AMERICAN + - HISPANIC_OR_LATINO + - NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER + - TWO_OR_MORE_RACES + - WHITE + - PREFER_NOT_TO_DISCLOSE + docs: >- + * `AMERICAN_INDIAN_OR_ALASKA_NATIVE` - AMERICAN_INDIAN_OR_ALASKA_NATIVE + + * `ASIAN_OR_INDIAN_SUBCONTINENT` - ASIAN_OR_INDIAN_SUBCONTINENT + + * `BLACK_OR_AFRICAN_AMERICAN` - BLACK_OR_AFRICAN_AMERICAN + + * `HISPANIC_OR_LATINO` - HISPANIC_OR_LATINO + + * `NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER` - + NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER + + * `TWO_OR_MORE_RACES` - TWO_OR_MORE_RACES + + * `WHITE` - WHITE + + * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE + source: + openapi: openapi/openapi.yml + EventTypeEnum: + enum: + - CREATED_REMOTE_PRODUCTION_API_KEY + - DELETED_REMOTE_PRODUCTION_API_KEY + - CREATED_TEST_API_KEY + - DELETED_TEST_API_KEY + - REGENERATED_PRODUCTION_API_KEY + - REGENERATED_WEBHOOK_SIGNATURE + - INVITED_USER + - TWO_FACTOR_AUTH_ENABLED + - TWO_FACTOR_AUTH_DISABLED + - DELETED_LINKED_ACCOUNT + - DELETED_ALL_COMMON_MODELS_FOR_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 + - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + - FORCED_LINKED_ACCOUNT_RESYNC + - MUTED_ISSUE + - GENERATED_MAGIC_LINK + - ENABLED_MERGE_WEBHOOK + - DISABLED_MERGE_WEBHOOK + - MERGE_WEBHOOK_TARGET_CHANGED + - END_USER_CREDENTIALS_ACCESSED + docs: >- + * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + + * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + + * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + + * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + + * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + + * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + + * `INVITED_USER` - INVITED_USER + + * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + + * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + + * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + + * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - + DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + + * `CREATED_DESTINATION` - CREATED_DESTINATION + + * `DELETED_DESTINATION` - DELETED_DESTINATION + + * `CHANGED_DESTINATION` - CHANGED_DESTINATION + + * `CHANGED_SCOPES` - CHANGED_SCOPES + + * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + + * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + + * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + + * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + + * `ENABLED_CATEGORY` - ENABLED_CATEGORY + + * `DISABLED_CATEGORY` - DISABLED_CATEGORY + + * `CHANGED_PASSWORD` - CHANGED_PASSWORD + + * `RESET_PASSWORD` - RESET_PASSWORD + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - + CREATED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - + CREATED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - + CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + + * `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 + + * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + + * `MUTED_ISSUE` - MUTED_ISSUE + + * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + + * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + + * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + + * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + + * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + source: + openapi: openapi/openapi.yml + ExternalTargetFieldApi: + properties: + name: + type: optional + access: read-only + description: + type: optional + access: read-only + is_mapped: + type: optional + access: read-only + source: + openapi: openapi/openapi.yml + ExternalTargetFieldApiResponse: + properties: + Benefit: optional> + EmployerBenefit: optional> + Company: optional> + EmployeePayrollRun: optional> + Employee: optional> + Employment: optional> + Location: optional> + PayrollRun: optional> + Team: optional> + TimeOff: optional> + TimeOffBalance: optional> + BankInfo: optional> + PayGroup: optional> + Group: optional> + Dependent: optional> + TimesheetEntry: optional> + source: + openapi: openapi/openapi.yml + FieldMappingApiInstanceTargetField: + properties: + name: string + description: string + is_organization_wide: boolean + source: + openapi: openapi/openapi.yml + inline: true + FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo: + properties: + method: optional + url_path: optional + field_traversal_path: optional> + source: + openapi: openapi/openapi.yml + inline: true + FieldMappingApiInstanceRemoteField: + properties: + remote_key_name: optional + schema: optional> + remote_endpoint_info: FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo + source: + openapi: openapi/openapi.yml + inline: true + FieldMappingApiInstance: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + is_integration_wide: + type: optional + access: read-only + target_field: + type: optional + access: read-only + remote_field: + type: optional + access: read-only + source: + openapi: openapi/openapi.yml + FieldMappingApiInstanceResponse: + properties: + Benefit: optional> + EmployerBenefit: optional> + Company: optional> + EmployeePayrollRun: optional> + Employee: optional> + Employment: optional> + Location: optional> + PayrollRun: optional> + Team: optional> + TimeOff: optional> + TimeOffBalance: optional> + BankInfo: optional> + PayGroup: optional> + Group: optional> + Dependent: optional> + TimesheetEntry: optional> + source: + openapi: openapi/openapi.yml + FieldMappingInstanceResponse: + properties: + model: FieldMappingApiInstance + warnings: list + errors: list + logs: optional> + source: + openapi: openapi/openapi.yml + FieldPermissionDeserializer: + properties: + enabled_fields: optional> + disabled_fields: optional> + source: + openapi: openapi/openapi.yml + FieldPermissionDeserializerRequest: + properties: + enabled_fields: optional> + disabled_fields: optional> + source: + openapi: openapi/openapi.yml + FlsaStatusEnum: + enum: + - EXEMPT + - SALARIED_NONEXEMPT + - NONEXEMPT + - OWNER + docs: |- + * `EXEMPT` - EXEMPT + * `SALARIED_NONEXEMPT` - SALARIED_NONEXEMPT + * `NONEXEMPT` - NONEXEMPT + * `OWNER` - OWNER + source: + openapi: openapi/openapi.yml + GenderEnum: + enum: + - MALE + - FEMALE + - value: NON-BINARY + name: NonBinary + - OTHER + - PREFER_NOT_TO_DISCLOSE + docs: |- + * `MALE` - MALE + * `FEMALE` - FEMALE + * `NON-BINARY` - NON-BINARY + * `OTHER` - OTHER + * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE + source: + openapi: openapi/openapi.yml + Group: + docs: >- + # The Group Object + + ### Description + + The `Group` object is used to represent any subset of employees across, + for example, `DEPARTMENT` or `TEAM`. Employees can be in multiple Groups. + + + ### Usage Example + + Fetch from the `LIST Employee` endpoint and expand groups to view an + employee's groups. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + parent_group: + type: optional + docs: The parent group for this group. + validation: + format: uuid + name: + type: optional + docs: The group name. + type: + type: optional + docs: |- + The Group type returned directly from the third-party. + + * `TEAM` - TEAM + * `DEPARTMENT` - DEPARTMENT + * `COST_CENTER` - COST_CENTER + * `BUSINESS_UNIT` - BUSINESS_UNIT + * `GROUP` - GROUP + is_commonly_used_as_team: + type: optional + docs: >- + Indicates whether the Group refers to a team in the third party + platform. Note that this is an opinionated view based on how Merge + observes most organizations representing teams in each third party + platform. If your customer uses a platform different from most, there + is a chance this will not be correct. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + GroupTypeEnum: + enum: + - TEAM + - DEPARTMENT + - COST_CENTER + - BUSINESS_UNIT + - GROUP + docs: |- + * `TEAM` - TEAM + * `DEPARTMENT` - DEPARTMENT + * `COST_CENTER` - COST_CENTER + * `BUSINESS_UNIT` - BUSINESS_UNIT + * `GROUP` - GROUP + source: + openapi: openapi/openapi.yml + IndividualCommonModelScopeDeserializer: + properties: + model_name: string + model_permissions: optional> + field_permissions: optional + source: + openapi: openapi/openapi.yml + IndividualCommonModelScopeDeserializerRequest: + properties: + model_name: + type: string + validation: + minLength: 1 + model_permissions: optional> + field_permissions: optional + source: + openapi: openapi/openapi.yml + Issue: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + status: + type: optional + docs: |- + Status of the issue. Options: ('ONGOING', 'RESOLVED') + + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + error_description: string + end_user: + type: optional> + access: read-only + first_incident_time: optional + last_incident_time: optional + is_muted: + type: optional + access: read-only + error_details: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + IssueStatusEnum: + enum: + - ONGOING + - RESOLVED + docs: |- + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + source: + openapi: openapi/openapi.yml + LanguageEnum: + enum: + - en + - de + docs: |- + * `en` - en + * `de` - de + source: + openapi: openapi/openapi.yml + LastSyncResultEnum: + enum: + - SYNCING + - DONE + - FAILED + - DISABLED + - PAUSED + - PARTIALLY_SYNCED + docs: |- + * `SYNCING` - SYNCING + * `DONE` - DONE + * `FAILED` - FAILED + * `DISABLED` - DISABLED + * `PAUSED` - PAUSED + * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED + source: + openapi: openapi/openapi.yml + LinkToken: + properties: + link_token: string + integration_name: optional + magic_link_url: optional + source: + openapi: openapi/openapi.yml + LinkedAccountStatus: + properties: + linked_account_status: string + can_make_request: boolean + source: + openapi: openapi/openapi.yml + Location: + docs: >- + # The Location Object + + ### Description + + The `Location` object is used to represent an address that can be + associated with an employee. + + + ### Usage Example + + Fetch from the `LIST Locations` endpoint and filter by `ID` to show all + office locations. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The location's name. + phone_number: + type: optional + docs: The location's phone number. + street_1: + type: optional + docs: Line 1 of the location's street address. + street_2: + type: optional + docs: Line 2 of the location's street address. + city: + type: optional + docs: The location's city. + state: + type: optional + docs: The location's state. Represents a region if outside of the US. + zip_code: + type: optional + docs: The location's zip code or postal code. + country: + type: optional + docs: |- + The location's country. + + * `AF` - Afghanistan + * `AX` - Åland Islands + * `AL` - Albania + * `DZ` - Algeria + * `AS` - American Samoa + * `AD` - Andorra + * `AO` - Angola + * `AI` - Anguilla + * `AQ` - Antarctica + * `AG` - Antigua and Barbuda + * `AR` - Argentina + * `AM` - Armenia + * `AW` - Aruba + * `AU` - Australia + * `AT` - Austria + * `AZ` - Azerbaijan + * `BS` - Bahamas + * `BH` - Bahrain + * `BD` - Bangladesh + * `BB` - Barbados + * `BY` - Belarus + * `BE` - Belgium + * `BZ` - Belize + * `BJ` - Benin + * `BM` - Bermuda + * `BT` - Bhutan + * `BO` - Bolivia + * `BQ` - Bonaire, Sint Eustatius and Saba + * `BA` - Bosnia and Herzegovina + * `BW` - Botswana + * `BV` - Bouvet Island + * `BR` - Brazil + * `IO` - British Indian Ocean Territory + * `BN` - Brunei + * `BG` - Bulgaria + * `BF` - Burkina Faso + * `BI` - Burundi + * `CV` - Cabo Verde + * `KH` - Cambodia + * `CM` - Cameroon + * `CA` - Canada + * `KY` - Cayman Islands + * `CF` - Central African Republic + * `TD` - Chad + * `CL` - Chile + * `CN` - China + * `CX` - Christmas Island + * `CC` - Cocos (Keeling) Islands + * `CO` - Colombia + * `KM` - Comoros + * `CG` - Congo + * `CD` - Congo (the Democratic Republic of the) + * `CK` - Cook Islands + * `CR` - Costa Rica + * `CI` - Côte d'Ivoire + * `HR` - Croatia + * `CU` - Cuba + * `CW` - Curaçao + * `CY` - Cyprus + * `CZ` - Czechia + * `DK` - Denmark + * `DJ` - Djibouti + * `DM` - Dominica + * `DO` - Dominican Republic + * `EC` - Ecuador + * `EG` - Egypt + * `SV` - El Salvador + * `GQ` - Equatorial Guinea + * `ER` - Eritrea + * `EE` - Estonia + * `SZ` - Eswatini + * `ET` - Ethiopia + * `FK` - Falkland Islands (Malvinas) + * `FO` - Faroe Islands + * `FJ` - Fiji + * `FI` - Finland + * `FR` - France + * `GF` - French Guiana + * `PF` - French Polynesia + * `TF` - French Southern Territories + * `GA` - Gabon + * `GM` - Gambia + * `GE` - Georgia + * `DE` - Germany + * `GH` - Ghana + * `GI` - Gibraltar + * `GR` - Greece + * `GL` - Greenland + * `GD` - Grenada + * `GP` - Guadeloupe + * `GU` - Guam + * `GT` - Guatemala + * `GG` - Guernsey + * `GN` - Guinea + * `GW` - Guinea-Bissau + * `GY` - Guyana + * `HT` - Haiti + * `HM` - Heard Island and McDonald Islands + * `VA` - Holy See + * `HN` - Honduras + * `HK` - Hong Kong + * `HU` - Hungary + * `IS` - Iceland + * `IN` - India + * `ID` - Indonesia + * `IR` - Iran + * `IQ` - Iraq + * `IE` - Ireland + * `IM` - Isle of Man + * `IL` - Israel + * `IT` - Italy + * `JM` - Jamaica + * `JP` - Japan + * `JE` - Jersey + * `JO` - Jordan + * `KZ` - Kazakhstan + * `KE` - Kenya + * `KI` - Kiribati + * `KW` - Kuwait + * `KG` - Kyrgyzstan + * `LA` - Laos + * `LV` - Latvia + * `LB` - Lebanon + * `LS` - Lesotho + * `LR` - Liberia + * `LY` - Libya + * `LI` - Liechtenstein + * `LT` - Lithuania + * `LU` - Luxembourg + * `MO` - Macao + * `MG` - Madagascar + * `MW` - Malawi + * `MY` - Malaysia + * `MV` - Maldives + * `ML` - Mali + * `MT` - Malta + * `MH` - Marshall Islands + * `MQ` - Martinique + * `MR` - Mauritania + * `MU` - Mauritius + * `YT` - Mayotte + * `MX` - Mexico + * `FM` - Micronesia (Federated States of) + * `MD` - Moldova + * `MC` - Monaco + * `MN` - Mongolia + * `ME` - Montenegro + * `MS` - Montserrat + * `MA` - Morocco + * `MZ` - Mozambique + * `MM` - Myanmar + * `NA` - Namibia + * `NR` - Nauru + * `NP` - Nepal + * `NL` - Netherlands + * `NC` - New Caledonia + * `NZ` - New Zealand + * `NI` - Nicaragua + * `NE` - Niger + * `NG` - Nigeria + * `NU` - Niue + * `NF` - Norfolk Island + * `KP` - North Korea + * `MK` - North Macedonia + * `MP` - Northern Mariana Islands + * `NO` - Norway + * `OM` - Oman + * `PK` - Pakistan + * `PW` - Palau + * `PS` - Palestine, State of + * `PA` - Panama + * `PG` - Papua New Guinea + * `PY` - Paraguay + * `PE` - Peru + * `PH` - Philippines + * `PN` - Pitcairn + * `PL` - Poland + * `PT` - Portugal + * `PR` - Puerto Rico + * `QA` - Qatar + * `RE` - Réunion + * `RO` - Romania + * `RU` - Russia + * `RW` - Rwanda + * `BL` - Saint Barthélemy + * `SH` - Saint Helena, Ascension and Tristan da Cunha + * `KN` - Saint Kitts and Nevis + * `LC` - Saint Lucia + * `MF` - Saint Martin (French part) + * `PM` - Saint Pierre and Miquelon + * `VC` - Saint Vincent and the Grenadines + * `WS` - Samoa + * `SM` - San Marino + * `ST` - Sao Tome and Principe + * `SA` - Saudi Arabia + * `SN` - Senegal + * `RS` - Serbia + * `SC` - Seychelles + * `SL` - Sierra Leone + * `SG` - Singapore + * `SX` - Sint Maarten (Dutch part) + * `SK` - Slovakia + * `SI` - Slovenia + * `SB` - Solomon Islands + * `SO` - Somalia + * `ZA` - South Africa + * `GS` - South Georgia and the South Sandwich Islands + * `KR` - South Korea + * `SS` - South Sudan + * `ES` - Spain + * `LK` - Sri Lanka + * `SD` - Sudan + * `SR` - Suriname + * `SJ` - Svalbard and Jan Mayen + * `SE` - Sweden + * `CH` - Switzerland + * `SY` - Syria + * `TW` - Taiwan + * `TJ` - Tajikistan + * `TZ` - Tanzania + * `TH` - Thailand + * `TL` - Timor-Leste + * `TG` - Togo + * `TK` - Tokelau + * `TO` - Tonga + * `TT` - Trinidad and Tobago + * `TN` - Tunisia + * `TR` - Turkey + * `TM` - Turkmenistan + * `TC` - Turks and Caicos Islands + * `TV` - Tuvalu + * `UG` - Uganda + * `UA` - Ukraine + * `AE` - United Arab Emirates + * `GB` - United Kingdom + * `UM` - United States Minor Outlying Islands + * `US` - United States of America + * `UY` - Uruguay + * `UZ` - Uzbekistan + * `VU` - Vanuatu + * `VE` - Venezuela + * `VN` - Vietnam + * `VG` - Virgin Islands (British) + * `VI` - Virgin Islands (U.S.) + * `WF` - Wallis and Futuna + * `EH` - Western Sahara + * `YE` - Yemen + * `ZM` - Zambia + * `ZW` - Zimbabwe + location_type: + type: optional + docs: |- + The location's type. Can be either WORK or HOME + + * `HOME` - HOME + * `WORK` - WORK + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + LocationTypeEnum: + enum: + - HOME + - WORK + docs: |- + * `HOME` - HOME + * `WORK` - WORK + source: + openapi: openapi/openapi.yml + MaritalStatusEnum: + enum: + - SINGLE + - MARRIED_FILING_JOINTLY + - MARRIED_FILING_SEPARATELY + - HEAD_OF_HOUSEHOLD + - QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD + docs: >- + * `SINGLE` - SINGLE + + * `MARRIED_FILING_JOINTLY` - MARRIED_FILING_JOINTLY + + * `MARRIED_FILING_SEPARATELY` - MARRIED_FILING_SEPARATELY + + * `HEAD_OF_HOUSEHOLD` - HEAD_OF_HOUSEHOLD + + * `QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD` - + QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD + source: + openapi: openapi/openapi.yml + MetaResponse: + properties: + request_schema: map + remote_field_classes: optional> + status: optional + has_conditional_params: boolean + has_required_linked_account_params: boolean + source: + openapi: openapi/openapi.yml + MethodEnum: + enum: + - GET + - OPTIONS + - HEAD + - POST + - PUT + - PATCH + - DELETE + docs: |- + * `GET` - GET + * `OPTIONS` - OPTIONS + * `HEAD` - HEAD + * `POST` - POST + * `PUT` - PUT + * `PATCH` - PATCH + * `DELETE` - DELETE + source: + openapi: openapi/openapi.yml + ModelOperation: + docs: >- + # The ModelOperation Object + + ### Description + + The `ModelOperation` object is used to represent the operations that are + currently supported for a given model. + + + ### Usage Example + + View what operations are supported for the `Candidate` endpoint. + properties: + model_name: string + available_operations: list + required_post_parameters: list + supported_fields: list + source: + openapi: openapi/openapi.yml + ModelPermissionDeserializer: + properties: + is_enabled: optional + source: + openapi: openapi/openapi.yml + ModelPermissionDeserializerRequest: + properties: + is_enabled: optional + source: + openapi: openapi/openapi.yml + MultipartFormFieldRequest: + docs: >- + # The MultipartFormField Object + + ### Description + + The `MultipartFormField` object is used to represent fields in an HTTP + request using `multipart/form-data`. + + + ### Usage Example + + Create a `MultipartFormField` to define a multipart form entry. + properties: + name: + type: string + docs: The name of the form field + validation: + minLength: 1 + data: + type: string + docs: The data for the form field. + validation: + minLength: 1 + encoding: + type: optional + docs: |- + The encoding of the value of `data`. Defaults to `RAW` if not defined. + + * `RAW` - RAW + * `BASE64` - BASE64 + * `GZIP_BASE64` - GZIP_BASE64 + file_name: + type: optional + docs: The file name of the form field, if the field is for a file. + validation: + minLength: 1 + content_type: + type: optional + docs: The MIME type of the file, if the field is for a file. + validation: + minLength: 1 + source: + openapi: openapi/openapi.yml + PaginatedAccountDetailsAndActionsList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedAuditLogEventList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedBankInfoList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedBenefitList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedCompanyList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedDependentList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedEmployeeList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedEmployeePayrollRunList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedEmployerBenefitList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedEmploymentList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedGroupList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedIssueList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedLocationList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedPayGroupList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedPayrollRunList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedSyncStatusList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedTeamList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedTimeOffBalanceList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedTimeOffList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedTimesheetEntryList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PayCurrencyEnum: + enum: + - XUA + - AFN + - AFA + - ALL + - ALK + - DZD + - ADP + - AOA + - AOK + - AON + - AOR + - ARA + - ARS + - ARM + - ARP + - ARL + - AMD + - AWG + - AUD + - ATS + - AZN + - AZM + - BSD + - BHD + - BDT + - BBD + - BYN + - BYB + - BYR + - BEF + - BEC + - BEL + - BZD + - BMD + - BTN + - BOB + - BOL + - BOV + - BOP + - BAM + - BAD + - BAN + - BWP + - BRC + - BRZ + - BRE + - BRR + - BRN + - BRB + - BRL + - GBP + - BND + - BGL + - BGN + - BGO + - BGM + - BUK + - BIF + - XPF + - KHR + - CAD + - CVE + - KYD + - XAF + - CLE + - CLP + - CLF + - CNX + - CNY + - CNH + - COP + - COU + - KMF + - CDF + - CRC + - HRD + - HRK + - CUC + - CUP + - CYP + - CZK + - CSK + - DKK + - DJF + - DOP + - NLG + - XCD + - DDM + - ECS + - ECV + - EGP + - GQE + - ERN + - EEK + - ETB + - EUR + - XBA + - XEU + - XBB + - XBC + - XBD + - FKP + - FJD + - FIM + - FRF + - XFO + - XFU + - GMD + - GEK + - GEL + - DEM + - GHS + - GHC + - GIP + - XAU + - GRD + - GTQ + - GWP + - GNF + - GNS + - GYD + - HTG + - HNL + - HKD + - HUF + - IMP + - ISK + - ISJ + - INR + - IDR + - IRR + - IQD + - IEP + - ILS + - ILP + - ILR + - ITL + - JMD + - JPY + - JOD + - KZT + - KES + - KWD + - KGS + - LAK + - LVL + - LVR + - LBP + - LSL + - LRD + - LYD + - LTL + - LTT + - LUL + - LUC + - LUF + - MOP + - MKD + - MKN + - MGA + - MGF + - MWK + - MYR + - MVR + - MVP + - MLF + - MTL + - MTP + - MRU + - MRO + - MUR + - MXV + - MXN + - MXP + - MDC + - MDL + - MCF + - MNT + - MAD + - MAF + - MZE + - MZN + - MZM + - MMK + - NAD + - NPR + - ANG + - TWD + - NZD + - NIO + - NIC + - NGN + - KPW + - NOK + - OMR + - PKR + - XPD + - PAB + - PGK + - PYG + - PEI + - PEN + - PES + - PHP + - XPT + - PLN + - PLZ + - PTE + - GWE + - QAR + - XRE + - RHD + - RON + - ROL + - RUB + - RUR + - RWF + - SVC + - WST + - SAR + - RSD + - CSD + - SCR + - SLL + - XAG + - SGD + - SKK + - SIT + - SBD + - SOS + - ZAR + - ZAL + - KRH + - KRW + - KRO + - SSP + - SUR + - ESP + - ESA + - ESB + - XDR + - LKR + - SHP + - XSU + - SDD + - SDG + - SDP + - SRD + - SRG + - SZL + - SEK + - CHF + - SYP + - STN + - STD + - TVD + - TJR + - TJS + - TZS + - XTS + - THB + - XXX + - TPE + - TOP + - TTD + - TND + - TRY + - TRL + - TMT + - TMM + - USD + - USN + - USS + - UGX + - UGS + - UAH + - UAK + - AED + - UYW + - UYU + - UYP + - UYI + - UZS + - VUV + - VES + - VEB + - VEF + - VND + - VNN + - CHE + - CHW + - XOF + - YDD + - YER + - YUN + - YUD + - YUM + - YUR + - ZWN + - ZRN + - ZRZ + - ZMW + - ZMK + - ZWD + - ZWR + - ZWL + docs: >- + * `XUA` - ADB Unit of Account + + * `AFN` - Afghan Afghani + + * `AFA` - Afghan Afghani (1927–2002) + + * `ALL` - Albanian Lek + + * `ALK` - Albanian Lek (1946–1965) + + * `DZD` - Algerian Dinar + + * `ADP` - Andorran Peseta + + * `AOA` - Angolan Kwanza + + * `AOK` - Angolan Kwanza (1977–1991) + + * `AON` - Angolan New Kwanza (1990–2000) + + * `AOR` - Angolan Readjusted Kwanza (1995–1999) + + * `ARA` - Argentine Austral + + * `ARS` - Argentine Peso + + * `ARM` - Argentine Peso (1881–1970) + + * `ARP` - Argentine Peso (1983–1985) + + * `ARL` - Argentine Peso Ley (1970–1983) + + * `AMD` - Armenian Dram + + * `AWG` - Aruban Florin + + * `AUD` - Australian Dollar + + * `ATS` - Austrian Schilling + + * `AZN` - Azerbaijani Manat + + * `AZM` - Azerbaijani Manat (1993–2006) + + * `BSD` - Bahamian Dollar + + * `BHD` - Bahraini Dinar + + * `BDT` - Bangladeshi Taka + + * `BBD` - Barbadian Dollar + + * `BYN` - Belarusian Ruble + + * `BYB` - Belarusian Ruble (1994–1999) + + * `BYR` - Belarusian Ruble (2000–2016) + + * `BEF` - Belgian Franc + + * `BEC` - Belgian Franc (convertible) + + * `BEL` - Belgian Franc (financial) + + * `BZD` - Belize Dollar + + * `BMD` - Bermudan Dollar + + * `BTN` - Bhutanese Ngultrum + + * `BOB` - Bolivian Boliviano + + * `BOL` - Bolivian Boliviano (1863–1963) + + * `BOV` - Bolivian Mvdol + + * `BOP` - Bolivian Peso + + * `BAM` - Bosnia-Herzegovina Convertible Mark + + * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + + * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + + * `BWP` - Botswanan Pula + + * `BRC` - Brazilian Cruzado (1986–1989) + + * `BRZ` - Brazilian Cruzeiro (1942–1967) + + * `BRE` - Brazilian Cruzeiro (1990–1993) + + * `BRR` - Brazilian Cruzeiro (1993–1994) + + * `BRN` - Brazilian New Cruzado (1989–1990) + + * `BRB` - Brazilian New Cruzeiro (1967–1986) + + * `BRL` - Brazilian Real + + * `GBP` - British Pound + + * `BND` - Brunei Dollar + + * `BGL` - Bulgarian Hard Lev + + * `BGN` - Bulgarian Lev + + * `BGO` - Bulgarian Lev (1879–1952) + + * `BGM` - Bulgarian Socialist Lev + + * `BUK` - Burmese Kyat + + * `BIF` - Burundian Franc + + * `XPF` - CFP Franc + + * `KHR` - Cambodian Riel + + * `CAD` - Canadian Dollar + + * `CVE` - Cape Verdean Escudo + + * `KYD` - Cayman Islands Dollar + + * `XAF` - Central African CFA Franc + + * `CLE` - Chilean Escudo + + * `CLP` - Chilean Peso + + * `CLF` - Chilean Unit of Account (UF) + + * `CNX` - Chinese People’s Bank Dollar + + * `CNY` - Chinese Yuan + + * `CNH` - Chinese Yuan (offshore) + + * `COP` - Colombian Peso + + * `COU` - Colombian Real Value Unit + + * `KMF` - Comorian Franc + + * `CDF` - Congolese Franc + + * `CRC` - Costa Rican Colón + + * `HRD` - Croatian Dinar + + * `HRK` - Croatian Kuna + + * `CUC` - Cuban Convertible Peso + + * `CUP` - Cuban Peso + + * `CYP` - Cypriot Pound + + * `CZK` - Czech Koruna + + * `CSK` - Czechoslovak Hard Koruna + + * `DKK` - Danish Krone + + * `DJF` - Djiboutian Franc + + * `DOP` - Dominican Peso + + * `NLG` - Dutch Guilder + + * `XCD` - East Caribbean Dollar + + * `DDM` - East German Mark + + * `ECS` - Ecuadorian Sucre + + * `ECV` - Ecuadorian Unit of Constant Value + + * `EGP` - Egyptian Pound + + * `GQE` - Equatorial Guinean Ekwele + + * `ERN` - Eritrean Nakfa + + * `EEK` - Estonian Kroon + + * `ETB` - Ethiopian Birr + + * `EUR` - Euro + + * `XBA` - European Composite Unit + + * `XEU` - European Currency Unit + + * `XBB` - European Monetary Unit + + * `XBC` - European Unit of Account (XBC) + + * `XBD` - European Unit of Account (XBD) + + * `FKP` - Falkland Islands Pound + + * `FJD` - Fijian Dollar + + * `FIM` - Finnish Markka + + * `FRF` - French Franc + + * `XFO` - French Gold Franc + + * `XFU` - French UIC-Franc + + * `GMD` - Gambian Dalasi + + * `GEK` - Georgian Kupon Larit + + * `GEL` - Georgian Lari + + * `DEM` - German Mark + + * `GHS` - Ghanaian Cedi + + * `GHC` - Ghanaian Cedi (1979–2007) + + * `GIP` - Gibraltar Pound + + * `XAU` - Gold + + * `GRD` - Greek Drachma + + * `GTQ` - Guatemalan Quetzal + + * `GWP` - Guinea-Bissau Peso + + * `GNF` - Guinean Franc + + * `GNS` - Guinean Syli + + * `GYD` - Guyanaese Dollar + + * `HTG` - Haitian Gourde + + * `HNL` - Honduran Lempira + + * `HKD` - Hong Kong Dollar + + * `HUF` - Hungarian Forint + + * `IMP` - IMP + + * `ISK` - Icelandic Króna + + * `ISJ` - Icelandic Króna (1918–1981) + + * `INR` - Indian Rupee + + * `IDR` - Indonesian Rupiah + + * `IRR` - Iranian Rial + + * `IQD` - Iraqi Dinar + + * `IEP` - Irish Pound + + * `ILS` - Israeli New Shekel + + * `ILP` - Israeli Pound + + * `ILR` - Israeli Shekel (1980–1985) + + * `ITL` - Italian Lira + + * `JMD` - Jamaican Dollar + + * `JPY` - Japanese Yen + + * `JOD` - Jordanian Dinar + + * `KZT` - Kazakhstani Tenge + + * `KES` - Kenyan Shilling + + * `KWD` - Kuwaiti Dinar + + * `KGS` - Kyrgystani Som + + * `LAK` - Laotian Kip + + * `LVL` - Latvian Lats + + * `LVR` - Latvian Ruble + + * `LBP` - Lebanese Pound + + * `LSL` - Lesotho Loti + + * `LRD` - Liberian Dollar + + * `LYD` - Libyan Dinar + + * `LTL` - Lithuanian Litas + + * `LTT` - Lithuanian Talonas + + * `LUL` - Luxembourg Financial Franc + + * `LUC` - Luxembourgian Convertible Franc + + * `LUF` - Luxembourgian Franc + + * `MOP` - Macanese Pataca + + * `MKD` - Macedonian Denar + + * `MKN` - Macedonian Denar (1992–1993) + + * `MGA` - Malagasy Ariary + + * `MGF` - Malagasy Franc + + * `MWK` - Malawian Kwacha + + * `MYR` - Malaysian Ringgit + + * `MVR` - Maldivian Rufiyaa + + * `MVP` - Maldivian Rupee (1947–1981) + + * `MLF` - Malian Franc + + * `MTL` - Maltese Lira + + * `MTP` - Maltese Pound + + * `MRU` - Mauritanian Ouguiya + + * `MRO` - Mauritanian Ouguiya (1973–2017) + + * `MUR` - Mauritian Rupee + + * `MXV` - Mexican Investment Unit + + * `MXN` - Mexican Peso + + * `MXP` - Mexican Silver Peso (1861–1992) + + * `MDC` - Moldovan Cupon + + * `MDL` - Moldovan Leu + + * `MCF` - Monegasque Franc + + * `MNT` - Mongolian Tugrik + + * `MAD` - Moroccan Dirham + + * `MAF` - Moroccan Franc + + * `MZE` - Mozambican Escudo + + * `MZN` - Mozambican Metical + + * `MZM` - Mozambican Metical (1980–2006) + + * `MMK` - Myanmar Kyat + + * `NAD` - Namibian Dollar + + * `NPR` - Nepalese Rupee + + * `ANG` - Netherlands Antillean Guilder + + * `TWD` - New Taiwan Dollar + + * `NZD` - New Zealand Dollar + + * `NIO` - Nicaraguan Córdoba + + * `NIC` - Nicaraguan Córdoba (1988–1991) + + * `NGN` - Nigerian Naira + + * `KPW` - North Korean Won + + * `NOK` - Norwegian Krone + + * `OMR` - Omani Rial + + * `PKR` - Pakistani Rupee + + * `XPD` - Palladium + + * `PAB` - Panamanian Balboa + + * `PGK` - Papua New Guinean Kina + + * `PYG` - Paraguayan Guarani + + * `PEI` - Peruvian Inti + + * `PEN` - Peruvian Sol + + * `PES` - Peruvian Sol (1863–1965) + + * `PHP` - Philippine Peso + + * `XPT` - Platinum + + * `PLN` - Polish Zloty + + * `PLZ` - Polish Zloty (1950–1995) + + * `PTE` - Portuguese Escudo + + * `GWE` - Portuguese Guinea Escudo + + * `QAR` - Qatari Rial + + * `XRE` - RINET Funds + + * `RHD` - Rhodesian Dollar + + * `RON` - Romanian Leu + + * `ROL` - Romanian Leu (1952–2006) + + * `RUB` - Russian Ruble + + * `RUR` - Russian Ruble (1991–1998) + + * `RWF` - Rwandan Franc + + * `SVC` - Salvadoran Colón + + * `WST` - Samoan Tala + + * `SAR` - Saudi Riyal + + * `RSD` - Serbian Dinar + + * `CSD` - Serbian Dinar (2002–2006) + + * `SCR` - Seychellois Rupee + + * `SLL` - Sierra Leonean Leone + + * `XAG` - Silver + + * `SGD` - Singapore Dollar + + * `SKK` - Slovak Koruna + + * `SIT` - Slovenian Tolar + + * `SBD` - Solomon Islands Dollar + + * `SOS` - Somali Shilling + + * `ZAR` - South African Rand + + * `ZAL` - South African Rand (financial) + + * `KRH` - South Korean Hwan (1953–1962) + + * `KRW` - South Korean Won + + * `KRO` - South Korean Won (1945–1953) + + * `SSP` - South Sudanese Pound + + * `SUR` - Soviet Rouble + + * `ESP` - Spanish Peseta + + * `ESA` - Spanish Peseta (A account) + + * `ESB` - Spanish Peseta (convertible account) + + * `XDR` - Special Drawing Rights + + * `LKR` - Sri Lankan Rupee + + * `SHP` - St. Helena Pound + + * `XSU` - Sucre + + * `SDD` - Sudanese Dinar (1992–2007) + + * `SDG` - Sudanese Pound + + * `SDP` - Sudanese Pound (1957–1998) + + * `SRD` - Surinamese Dollar + + * `SRG` - Surinamese Guilder + + * `SZL` - Swazi Lilangeni + + * `SEK` - Swedish Krona + + * `CHF` - Swiss Franc + + * `SYP` - Syrian Pound + + * `STN` - São Tomé & Príncipe Dobra + + * `STD` - São Tomé & Príncipe Dobra (1977–2017) + + * `TVD` - TVD + + * `TJR` - Tajikistani Ruble + + * `TJS` - Tajikistani Somoni + + * `TZS` - Tanzanian Shilling + + * `XTS` - Testing Currency Code + + * `THB` - Thai Baht + + * `XXX` - The codes assigned for transactions where no currency is + involved + + * `TPE` - Timorese Escudo + + * `TOP` - Tongan Paʻanga + + * `TTD` - Trinidad & Tobago Dollar + + * `TND` - Tunisian Dinar + + * `TRY` - Turkish Lira + + * `TRL` - Turkish Lira (1922–2005) + + * `TMT` - Turkmenistani Manat + + * `TMM` - Turkmenistani Manat (1993–2009) + + * `USD` - US Dollar + + * `USN` - US Dollar (Next day) + + * `USS` - US Dollar (Same day) + + * `UGX` - Ugandan Shilling + + * `UGS` - Ugandan Shilling (1966–1987) + + * `UAH` - Ukrainian Hryvnia + + * `UAK` - Ukrainian Karbovanets + + * `AED` - United Arab Emirates Dirham + + * `UYW` - Uruguayan Nominal Wage Index Unit + + * `UYU` - Uruguayan Peso + + * `UYP` - Uruguayan Peso (1975–1993) + + * `UYI` - Uruguayan Peso (Indexed Units) + + * `UZS` - Uzbekistani Som + + * `VUV` - Vanuatu Vatu + + * `VES` - Venezuelan Bolívar + + * `VEB` - Venezuelan Bolívar (1871–2008) + + * `VEF` - Venezuelan Bolívar (2008–2018) + + * `VND` - Vietnamese Dong + + * `VNN` - Vietnamese Dong (1978–1985) + + * `CHE` - WIR Euro + + * `CHW` - WIR Franc + + * `XOF` - West African CFA Franc + + * `YDD` - Yemeni Dinar + + * `YER` - Yemeni Rial + + * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + + * `YUD` - Yugoslavian Hard Dinar (1966–1990) + + * `YUM` - Yugoslavian New Dinar (1994–2002) + + * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + + * `ZWN` - ZWN + + * `ZRN` - Zairean New Zaire (1993–1998) + + * `ZRZ` - Zairean Zaire (1971–1993) + + * `ZMW` - Zambian Kwacha + + * `ZMK` - Zambian Kwacha (1968–2012) + + * `ZWD` - Zimbabwean Dollar (1980–2008) + + * `ZWR` - Zimbabwean Dollar (2008) + + * `ZWL` - Zimbabwean Dollar (2009) + source: + openapi: openapi/openapi.yml + PayFrequencyEnum: + enum: + - WEEKLY + - BIWEEKLY + - MONTHLY + - QUARTERLY + - SEMIANNUALLY + - ANNUALLY + - value: THIRTEEN-MONTHLY + name: ThirteenMonthly + - PRO_RATA + - SEMIMONTHLY + docs: |- + * `WEEKLY` - WEEKLY + * `BIWEEKLY` - BIWEEKLY + * `MONTHLY` - MONTHLY + * `QUARTERLY` - QUARTERLY + * `SEMIANNUALLY` - SEMIANNUALLY + * `ANNUALLY` - ANNUALLY + * `THIRTEEN-MONTHLY` - THIRTEEN-MONTHLY + * `PRO_RATA` - PRO_RATA + * `SEMIMONTHLY` - SEMIMONTHLY + source: + openapi: openapi/openapi.yml + PayGroup: + docs: >- + # The PayGroup Object + + ### Description + + The `PayGroup` object is used to represent a subset of employees that are + put together for payroll processing purposes. + + + ### Usage Example + + Fetch from the `LIST PayGroup` endpoint and filter by `ID` to show all pay + group information. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + pay_group_name: + type: optional + docs: The pay group name. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + PayPeriodEnum: + enum: + - HOUR + - DAY + - WEEK + - EVERY_TWO_WEEKS + - SEMIMONTHLY + - MONTH + - QUARTER + - EVERY_SIX_MONTHS + - YEAR + docs: |- + * `HOUR` - HOUR + * `DAY` - DAY + * `WEEK` - WEEK + * `EVERY_TWO_WEEKS` - EVERY_TWO_WEEKS + * `SEMIMONTHLY` - SEMIMONTHLY + * `MONTH` - MONTH + * `QUARTER` - QUARTER + * `EVERY_SIX_MONTHS` - EVERY_SIX_MONTHS + * `YEAR` - YEAR + source: + openapi: openapi/openapi.yml + PayrollRun: + docs: >- + # The PayrollRun Object + + ### Description + + The `PayrollRun` object is used to represent a group of pay statements for + a specific pay schedule. + + + ### Usage Example + + Fetch from the `LIST PayrollRuns` endpoint and filter by `ID` to show all + payroll runs. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + run_state: + type: optional + docs: |- + The state of the payroll run + + * `PAID` - PAID + * `DRAFT` - DRAFT + * `APPROVED` - APPROVED + * `FAILED` - FAILED + * `CLOSED` - CLOSED + run_type: + type: optional + docs: |- + The type of the payroll run + + * `REGULAR` - REGULAR + * `OFF_CYCLE` - OFF_CYCLE + * `CORRECTION` - CORRECTION + * `TERMINATION` - TERMINATION + * `SIGN_ON_BONUS` - SIGN_ON_BONUS + start_date: + type: optional + docs: The day and time the payroll run started. + end_date: + type: optional + docs: The day and time the payroll run ended. + check_date: + type: optional + docs: The day and time the payroll run was checked. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + PolicyTypeEnum: + enum: + - VACATION + - SICK + - PERSONAL + - JURY_DUTY + - VOLUNTEER + - BEREAVEMENT + docs: |- + * `VACATION` - VACATION + * `SICK` - SICK + * `PERSONAL` - PERSONAL + * `JURY_DUTY` - JURY_DUTY + * `VOLUNTEER` - VOLUNTEER + * `BEREAVEMENT` - BEREAVEMENT + source: + openapi: openapi/openapi.yml + ReasonEnum: + enum: + - GENERAL_CUSTOMER_REQUEST + - GDPR + - OTHER + docs: |- + * `GENERAL_CUSTOMER_REQUEST` - GENERAL_CUSTOMER_REQUEST + * `GDPR` - GDPR + * `OTHER` - OTHER + source: + openapi: openapi/openapi.yml + RelationshipEnum: + enum: + - CHILD + - SPOUSE + - DOMESTIC_PARTNER + docs: |- + * `CHILD` - CHILD + * `SPOUSE` - SPOUSE + * `DOMESTIC_PARTNER` - DOMESTIC_PARTNER + source: + openapi: openapi/openapi.yml + RemoteData: + docs: >- + # The RemoteData Object + + ### Description + + The `RemoteData` object is used to represent the full data pulled from the + third-party API for an object. + + + ### Usage Example + + TODO + properties: + path: + type: string + docs: The third-party API path that is being called. + data: + type: optional + access: read-only + source: + openapi: openapi/openapi.yml + RemoteEndpointInfo: + properties: + method: string + url_path: string + field_traversal_path: list + source: + openapi: openapi/openapi.yml + RemoteFieldApiCoverage: + discriminated: false + union: + - integer + - double + source: + openapi: openapi/openapi.yml + inline: true + RemoteFieldApi: + properties: + schema: map + remote_key_name: string + remote_endpoint_info: RemoteEndpointInfo + example_values: optional> + advanced_metadata: optional + coverage: + type: optional + access: read-only + source: + openapi: openapi/openapi.yml + RemoteFieldApiResponse: + properties: + Benefit: optional> + EmployerBenefit: optional> + Company: optional> + EmployeePayrollRun: optional> + Employee: optional> + Employment: optional> + Location: optional> + PayrollRun: optional> + Team: optional> + TimeOff: optional> + TimeOffBalance: optional> + BankInfo: optional> + PayGroup: optional> + Group: optional> + Dependent: optional> + TimesheetEntry: optional> + source: + openapi: openapi/openapi.yml + RemoteKey: + docs: >- + # The RemoteKey Object + + ### Description + + The `RemoteKey` object is used to represent a request for a new remote + key. + + + ### Usage Example + + Post a `GenerateRemoteKey` to receive a new `RemoteKey`. + properties: + name: string + key: string + source: + openapi: openapi/openapi.yml + RemoteResponse: + docs: >- + # The RemoteResponse Object + + ### Description + + The `RemoteResponse` object is used to represent information returned from + a third-party endpoint. + + + ### Usage Example + + View the `RemoteResponse` returned from your `DataPassthrough`. + properties: + method: string + path: string + status: integer + response: unknown + response_headers: optional> + response_type: optional + headers: optional> + source: + openapi: openapi/openapi.yml + RequestFormatEnum: + enum: + - JSON + - XML + - MULTIPART + docs: |- + * `JSON` - JSON + * `XML` - XML + * `MULTIPART` - MULTIPART + source: + openapi: openapi/openapi.yml + RequestTypeEnum: + enum: + - VACATION + - SICK + - PERSONAL + - JURY_DUTY + - VOLUNTEER + - BEREAVEMENT + docs: |- + * `VACATION` - VACATION + * `SICK` - SICK + * `PERSONAL` - PERSONAL + * `JURY_DUTY` - JURY_DUTY + * `VOLUNTEER` - VOLUNTEER + * `BEREAVEMENT` - BEREAVEMENT + source: + openapi: openapi/openapi.yml + ResponseTypeEnum: + enum: + - JSON + - BASE64_GZIP + docs: |- + * `JSON` - JSON + * `BASE64_GZIP` - BASE64_GZIP + source: + openapi: openapi/openapi.yml + RoleEnum: + enum: + - ADMIN + - DEVELOPER + - MEMBER + - API + - SYSTEM + - MERGE_TEAM + docs: |- + * `ADMIN` - ADMIN + * `DEVELOPER` - DEVELOPER + * `MEMBER` - MEMBER + * `API` - API + * `SYSTEM` - SYSTEM + * `MERGE_TEAM` - MERGE_TEAM + source: + openapi: openapi/openapi.yml + RunStateEnum: + enum: + - PAID + - DRAFT + - APPROVED + - FAILED + - CLOSED + docs: |- + * `PAID` - PAID + * `DRAFT` - DRAFT + * `APPROVED` - APPROVED + * `FAILED` - FAILED + * `CLOSED` - CLOSED + source: + openapi: openapi/openapi.yml + RunTypeEnum: + enum: + - REGULAR + - OFF_CYCLE + - CORRECTION + - TERMINATION + - SIGN_ON_BONUS + docs: |- + * `REGULAR` - REGULAR + * `OFF_CYCLE` - OFF_CYCLE + * `CORRECTION` - CORRECTION + * `TERMINATION` - TERMINATION + * `SIGN_ON_BONUS` - SIGN_ON_BONUS + source: + openapi: openapi/openapi.yml + SelectiveSyncConfigurationsUsageEnum: + enum: + - IN_NEXT_SYNC + - IN_LAST_SYNC + docs: |- + * `IN_NEXT_SYNC` - IN_NEXT_SYNC + * `IN_LAST_SYNC` - IN_LAST_SYNC + source: + openapi: openapi/openapi.yml + StatusFd5Enum: + enum: + - SYNCING + - DONE + - FAILED + - DISABLED + - PAUSED + - PARTIALLY_SYNCED + docs: |- + * `SYNCING` - SYNCING + * `DONE` - DONE + * `FAILED` - FAILED + * `DISABLED` - DISABLED + * `PAUSED` - PAUSED + * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED + source: + openapi: openapi/openapi.yml + SyncStatus: + docs: >- + # The SyncStatus Object + + ### Description + + The `SyncStatus` object is used to represent the syncing state of an + account + + + ### Usage Example + + View the `SyncStatus` for an account to see how recently its models were + synced. + properties: + model_name: string + model_id: string + last_sync_start: optional + next_sync_start: optional + last_sync_result: optional + last_sync_finished: optional + status: StatusFd5Enum + is_initial_sync: boolean + selective_sync_configurations_usage: optional + source: + openapi: openapi/openapi.yml + Tax: + docs: >- + # The Tax Object + + ### Description + + The `Tax` object is used to represent an array of the tax deductions for a + given employee's payroll run. + + + ### Usage Example + + Fetch from the `LIST Taxes` endpoint and filter by `ID` to show all taxes. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + employee_payroll_run: + type: optional + validation: + format: uuid + name: + type: optional + docs: The tax's name. + amount: + type: optional + docs: The tax amount. + employer_tax: + type: optional + docs: Whether or not the employer is responsible for paying the tax. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + TeamParentTeam: + discriminated: false + docs: The team's parent team. + union: + - type: string + validation: + format: uuid + - Team + source: + openapi: openapi/openapi.yml + inline: true + Team: + docs: >- + # The Team Object + + ### Description + + The `Team` object is used to represent a subdivision of the company, + usually a department. Each employee will be grouped into one specific + Team. + + + ### Usage Example + + If you're building a way to filter by `Team`, you'd hit the `GET Teams` + endpoint to fetch the `Teams`, and then use the `ID` of the team your user + selects to filter the `GET Employees` endpoint. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The team's name. + parent_team: + type: optional + docs: The team's parent team. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + TimeOffEmployee: + discriminated: false + docs: The employee requesting time off. + union: + - type: string + validation: + format: uuid + - Employee + source: + openapi: openapi/openapi.yml + inline: true + TimeOffApprover: + discriminated: false + docs: >- + The Merge ID of the employee with the ability to approve the time off + request. + union: + - type: string + validation: + format: uuid + - Employee + source: + openapi: openapi/openapi.yml + inline: true + TimeOff: + docs: >- + # The TimeOff Object + + ### Description + + The `TimeOff` object is used to represent all employees' Time Off entries. + + + ### Usage Example + + Fetch from the `LIST TimeOffs` endpoint and filter by `ID` to show all + time off requests. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + employee: + type: optional + docs: The employee requesting time off. + approver: + type: optional + docs: >- + The Merge ID of the employee with the ability to approve the time off + request. + status: + type: optional + docs: |- + The status of this time off request. + + * `REQUESTED` - REQUESTED + * `APPROVED` - APPROVED + * `DECLINED` - DECLINED + * `CANCELLED` - CANCELLED + * `DELETED` - DELETED + employee_note: + type: optional + docs: The employee note for this time off request. + units: + type: optional + docs: >- + The measurement that the third-party integration uses to count time + requested. + + + * `HOURS` - HOURS + + * `DAYS` - DAYS + amount: + type: optional + docs: The time off quantity measured by the prescribed “units”. + request_type: + type: optional + docs: |- + The type of time off request. + + * `VACATION` - VACATION + * `SICK` - SICK + * `PERSONAL` - PERSONAL + * `JURY_DUTY` - JURY_DUTY + * `VOLUNTEER` - VOLUNTEER + * `BEREAVEMENT` - BEREAVEMENT + start_time: + type: optional + docs: The day and time of the start of the time requested off. + end_time: + type: optional + docs: The day and time of the end of the time requested off. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + TimeOffBalanceEmployee: + discriminated: false + docs: The employee the balance belongs to. + union: + - type: string + validation: + format: uuid + - Employee + source: + openapi: openapi/openapi.yml + inline: true + TimeOffBalance: + docs: >- + # The TimeOffBalance Object + + ### Description + + The `TimeOffBalance` object is used to represent current balances for an + employee's Time Off plan. + + + ### Usage Example + + Fetch from the `LIST TimeOffBalances` endpoint and filter by `ID` to show + all time off balances. + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + employee: + type: optional + docs: The employee the balance belongs to. + balance: + type: optional + docs: >- + The current remaining PTO balance, measured in hours. For integrations + that return this value in days, Merge multiplies by 8 to calculate + hours. + used: + type: optional + docs: >- + The amount of PTO used in terms of hours. For integrations that return + this value in days, Merge multiplies by 8 to calculate hours. + policy_type: + type: optional + docs: |- + The policy type of this time off balance. + + * `VACATION` - VACATION + * `SICK` - SICK + * `PERSONAL` - PERSONAL + * `JURY_DUTY` - JURY_DUTY + * `VOLUNTEER` - VOLUNTEER + * `BEREAVEMENT` - BEREAVEMENT + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + TimeOffRequestEmployee: + discriminated: false + docs: The employee requesting time off. + union: + - type: string + validation: + format: uuid + - Employee + source: + openapi: openapi/openapi.yml + inline: true + TimeOffRequestApprover: + discriminated: false + docs: >- + The Merge ID of the employee with the ability to approve the time off + request. + union: + - type: string + validation: + format: uuid + - Employee + source: + openapi: openapi/openapi.yml + inline: true + TimeOffRequest: + docs: >- + # The TimeOff Object + + ### Description + + The `TimeOff` object is used to represent all employees' Time Off entries. + + + ### Usage Example + + Fetch from the `LIST TimeOffs` endpoint and filter by `ID` to show all + time off requests. + properties: + employee: + type: optional + docs: The employee requesting time off. + approver: + type: optional + docs: >- + The Merge ID of the employee with the ability to approve the time off + request. + status: + type: optional + docs: |- + The status of this time off request. + + * `REQUESTED` - REQUESTED + * `APPROVED` - APPROVED + * `DECLINED` - DECLINED + * `CANCELLED` - CANCELLED + * `DELETED` - DELETED + employee_note: + type: optional + docs: The employee note for this time off request. + units: + type: optional + docs: >- + The measurement that the third-party integration uses to count time + requested. + + + * `HOURS` - HOURS + + * `DAYS` - DAYS + amount: + type: optional + docs: The time off quantity measured by the prescribed “units”. + request_type: + type: optional + docs: |- + The type of time off request. + + * `VACATION` - VACATION + * `SICK` - SICK + * `PERSONAL` - PERSONAL + * `JURY_DUTY` - JURY_DUTY + * `VOLUNTEER` - VOLUNTEER + * `BEREAVEMENT` - BEREAVEMENT + start_time: + type: optional + docs: The day and time of the start of the time requested off. + end_time: + type: optional + docs: The day and time of the end of the time requested off. + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + TimeOffResponse: + properties: + model: TimeOff + warnings: list + errors: list + logs: optional> + source: + openapi: openapi/openapi.yml + TimeOffStatusEnum: + enum: + - REQUESTED + - APPROVED + - DECLINED + - CANCELLED + - DELETED + docs: |- + * `REQUESTED` - REQUESTED + * `APPROVED` - APPROVED + * `DECLINED` - DECLINED + * `CANCELLED` - CANCELLED + * `DELETED` - DELETED + source: + openapi: openapi/openapi.yml + TimesheetEntryEmployee: + discriminated: false + docs: The employee the timesheet entry is for. + union: + - type: string + validation: + format: uuid + - Employee + source: + openapi: openapi/openapi.yml + inline: true + TimesheetEntry: + docs: >- + # The Timesheet Entry Object + + ### Description + + The `Timesheet Entry` object is used to track coverage for hours worked by + an 'Employee'. + + + + ### Usage Example + + GET and POST Timesheet Entries + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + employee: + type: optional + docs: The employee the timesheet entry is for. + hours_worked: + type: optional + docs: The number of hours logged by the employee. + start_time: + type: optional + docs: The time at which the employee started work. + end_time: + type: optional + docs: The time at which the employee ended work. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + TimesheetEntryRequestEmployee: + discriminated: false + docs: The employee the timesheet entry is for. + union: + - type: string + validation: + format: uuid + - Employee + source: + openapi: openapi/openapi.yml + inline: true + TimesheetEntryRequest: + docs: >- + # The Timesheet Entry Object + + ### Description + + The `Timesheet Entry` object is used to track coverage for hours worked by + an 'Employee'. + + + + ### Usage Example + + GET and POST Timesheet Entries + properties: + employee: + type: optional + docs: The employee the timesheet entry is for. + hours_worked: + type: optional + docs: The number of hours logged by the employee. + start_time: + type: optional + docs: The time at which the employee started work. + end_time: + type: optional + docs: The time at which the employee ended work. + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + TimesheetEntryResponse: + properties: + model: TimesheetEntry + warnings: list + errors: list + logs: optional> + source: + openapi: openapi/openapi.yml + UnitsEnum: + enum: + - HOURS + - DAYS + docs: |- + * `HOURS` - HOURS + * `DAYS` - DAYS + source: + openapi: openapi/openapi.yml + ValidationProblemSource: + properties: + pointer: string + source: + openapi: openapi/openapi.yml + WarningValidationProblem: + properties: + source: optional + title: string + detail: string + problem_type: string + source: + openapi: openapi/openapi.yml + WebhookReceiver: + properties: + event: string + is_active: boolean + key: optional + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/hris/accountDetails.yml b/.mock/definition/hris/accountDetails.yml new file mode 100644 index 0000000..2d4833d --- /dev/null +++ b/.mock/definition/hris/accountDetails.yml @@ -0,0 +1,36 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + retrieve: + path: /hris/v1/account-details + method: GET + auth: true + docs: Get details for a linked account. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.AccountDetails + status-code: 200 + examples: + - headers: {} + response: + body: + id: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd + integration: BambooHR + integration_slug: bamboohr + category: hris + end_user_origin_id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + end_user_organization_name: Waystar Royco + end_user_email_address: kendall.roy@waystar-royco.com + status: COMPLETE + webhook_listener_url: >- + https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 + is_duplicate: true + account_type: PRODUCTION + completed_at: '2024-08-26T20:11:19Z' + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/hris/accountToken.yml b/.mock/definition/hris/accountToken.yml new file mode 100644 index 0000000..84185ff --- /dev/null +++ b/.mock/definition/hris/accountToken.yml @@ -0,0 +1,44 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + retrieve: + path: /hris/v1/account-token/{public_token} + method: GET + auth: true + docs: >- + Returns the account token for the end user with the provided public + token. + source: + openapi: openapi/openapi.yml + path-parameters: + public_token: string + response: + docs: '' + type: root.AccountToken + status-code: 200 + examples: + - path-parameters: + public_token: public_token + response: + body: + account_token: T9klMDQrcHdm9jrtHuOS2Nf06BIHwMNjpPXPMB + integration: + name: name + abbreviated_name: abbreviated_name + categories: + - hris + image: image + square_image: square_image + color: color + slug: slug + api_endpoints_to_documentation_urls: + key: value + webhook_setup_guide_url: webhook_setup_guide_url + category_beta_status: + key: value + id: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/hris/asyncPassthrough.yml b/.mock/definition/hris/asyncPassthrough.yml new file mode 100644 index 0000000..841c4d9 --- /dev/null +++ b/.mock/definition/hris/asyncPassthrough.yml @@ -0,0 +1,70 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /hris/v1/async-passthrough + method: POST + auth: true + docs: >- + Asynchronously pull data from an endpoint not currently supported by + Merge. + source: + openapi: openapi/openapi.yml + request: + body: root.DataPassthroughRequest + content-type: application/json + response: + docs: '' + type: root.AsyncPassthroughReciept + status-code: 200 + examples: + - headers: {} + request: + method: GET + path: /scooters + response: + body: + async_passthrough_receipt_id: fd29020f-2695-445e-922e-dcd5e81903fd + retrieve: + path: /hris/v1/async-passthrough/{async_passthrough_receipt_id} + method: GET + auth: true + docs: Retrieves data from earlier async-passthrough POST request + source: + openapi: openapi/openapi.yml + path-parameters: + async_passthrough_receipt_id: string + response: + docs: '' + type: AsyncPassthroughRetrieveResponse + status-code: 200 + examples: + - path-parameters: + async_passthrough_receipt_id: async_passthrough_receipt_id + headers: {} + response: + body: + method: GET + path: /scooters + status: 200 + response: + key: value + response_headers: + X-Page-Token: value + response_type: JSON + headers: + EXTRA-HEADER: value + Authorization: + source: + openapi: openapi/openapi.yml +types: + AsyncPassthroughRetrieveResponse: + discriminated: false + union: + - root.RemoteResponse + - string + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/hris/auditTrail.yml b/.mock/definition/hris/auditTrail.yml new file mode 100644 index 0000000..19e653e --- /dev/null +++ b/.mock/definition/hris/auditTrail.yml @@ -0,0 +1,94 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /hris/v1/audit-trail + method: GET + auth: true + docs: Gets a list of audit trail events. + source: + openapi: openapi/openapi.yml + request: + name: AuditTrailListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + end_date: + type: optional + docs: >- + If included, will only include audit trail events that occurred + before this time + event_type: + type: optional + docs: >- + 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`, + `REGENERATED_WEBHOOK_SIGNATURE`, `INVITED_USER`, + `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, + `DELETED_LINKED_ACCOUNT`, + `DELETED_ALL_COMMON_MODELS_FOR_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`, + `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, + `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, + `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, + `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, + `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, + `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, + `END_USER_CREDENTIALS_ACCESSED` + page_size: + type: optional + docs: Number of results to return per page. + start_date: + type: optional + docs: >- + If included, will only include audit trail events that occurred + after this time + user_email: + type: optional + docs: >- + If provided, this will return events associated with the specified + user email. Please note that the email address reflects the user's + email at the time of the event, and may not be their current + email. + response: + docs: '' + type: root.PaginatedAuditLogEventList + status-code: 200 + examples: + - response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: b5ceea2a-7171-47ce-8090-165cfce5572c + user_name: Gil Feig + user_email: hello@merge.dev + role: ADMIN + ip_address: 192.0.2.123 + event_type: CREATED_REMOTE_PRODUCTION_API_KEY + event_description: >- + Organization-wide Scopes for model hris.Employee updated + from Read to Read+Write + created_at: '2024-01-15T09:30:00Z' + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/hris/availableActions.yml b/.mock/definition/hris/availableActions.yml new file mode 100644 index 0000000..74b6e65 --- /dev/null +++ b/.mock/definition/hris/availableActions.yml @@ -0,0 +1,50 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + retrieve: + path: /hris/v1/available-actions + method: GET + auth: true + docs: Returns a list of models and actions available for an account. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.AvailableActions + status-code: 200 + examples: + - headers: {} + response: + body: + integration: + name: name + abbreviated_name: abbreviated_name + categories: + - hris + image: image + square_image: square_image + color: color + slug: slug + api_endpoints_to_documentation_urls: + key: value + webhook_setup_guide_url: webhook_setup_guide_url + category_beta_status: + key: value + passthrough_available: true + available_model_operations: + - model_name: Candidate + available_operations: + - FETCH + - CREATE + required_post_parameters: + - remote_user_id + supported_fields: + - first_name + - last_name + - company + - title + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/hris/bankInfo.yml b/.mock/definition/hris/bankInfo.yml new file mode 100644 index 0000000..d8d8fc2 --- /dev/null +++ b/.mock/definition/hris/bankInfo.yml @@ -0,0 +1,212 @@ +types: + BankInfoListRequestAccountType: + enum: + - CHECKING + - SAVINGS + source: + openapi: openapi/openapi.yml + BankInfoListRequestOrderBy: + enum: + - value: '-remote_created_at' + name: RemoteCreatedAtDescending + - value: remote_created_at + name: RemoteCreatedAtAscending + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /hris/v1/bank-info + method: GET + auth: true + docs: Returns a list of `BankInfo` objects. + source: + openapi: openapi/openapi.yml + request: + name: BankInfoListRequest + query-parameters: + account_type: + type: optional + docs: >- + If provided, will only return BankInfo's with this account type. + Options: ('SAVINGS', 'CHECKING') + + + * `SAVINGS` - SAVINGS + + * `CHECKING` - CHECKING + bank_name: + type: optional + docs: If provided, will only return BankInfo's with this bank name. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + employee_id: + type: optional + docs: If provided, will only return bank accounts for this employee. + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + order_by: + type: optional + docs: >- + Overrides the default ordering for this endpoint. Possible values + include: remote_created_at, -remote_created_at. + page_size: + type: optional + docs: Number of results to return per page. + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + remote_id: + type: optional + docs: The API provider's ID for the given object. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: root.PaginatedBankInfoList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: fd1e0fb5-8f92-4ec9-9f32-179cf732867d + remote_id: '123234' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee: employee + account_number: '439291590' + routing_number: '089690059' + bank_name: Chase + account_type: SAVINGS + remote_created_at: '2021-12-06T10:11:26Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /bank-info + data: + - Varies by platform + retrieve: + path: /hris/v1/bank-info/{id} + method: GET + auth: true + docs: Returns a `BankInfo` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: BankInfoRetrieveRequest + query-parameters: + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: root.BankInfo + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: fd1e0fb5-8f92-4ec9-9f32-179cf732867d + remote_id: '123234' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee: employee + account_number: '439291590' + routing_number: '089690059' + bank_name: Chase + account_type: SAVINGS + remote_created_at: '2021-12-06T10:11:26Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /bank-info + data: + - Varies by platform + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/hris/benefits.yml b/.mock/definition/hris/benefits.yml new file mode 100644 index 0000000..2a98a37 --- /dev/null +++ b/.mock/definition/hris/benefits.yml @@ -0,0 +1,165 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /hris/v1/benefits + method: GET + auth: true + docs: Returns a list of `Benefit` objects. + source: + openapi: openapi/openapi.yml + request: + name: BenefitsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + employee_id: + type: optional + docs: >- + If provided, will return the benefits associated with the + employee. + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: root.PaginatedBenefitList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 3fe5ae7a-f1ba-4529-b7af-84e86dc6d232 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee: employee + provider_name: Blue Shield of California + benefit_plan_type: benefit_plan_type + employee_contribution: 23.65 + company_contribution: 150 + start_date: '2020-11-15T00:59:25Z' + end_date: '2021-10-15T00:23:25Z' + remote_was_deleted: true + employer_benefit: 025fjlc6-6000-430a-848e-aafacbadf4fe + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /benefits + data: + - Varies by platform + retrieve: + path: /hris/v1/benefits/{id} + method: GET + auth: true + docs: Returns a `Benefit` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: BenefitsRetrieveRequest + query-parameters: + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.Benefit + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 3fe5ae7a-f1ba-4529-b7af-84e86dc6d232 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee: employee + provider_name: Blue Shield of California + benefit_plan_type: benefit_plan_type + employee_contribution: 23.65 + company_contribution: 150 + start_date: '2020-11-15T00:59:25Z' + end_date: '2021-10-15T00:23:25Z' + remote_was_deleted: true + employer_benefit: 025fjlc6-6000-430a-848e-aafacbadf4fe + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /benefits + data: + - Varies by platform + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/hris/companies.yml b/.mock/definition/hris/companies.yml new file mode 100644 index 0000000..3b10795 --- /dev/null +++ b/.mock/definition/hris/companies.yml @@ -0,0 +1,146 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /hris/v1/companies + method: GET + auth: true + docs: Returns a list of `Company` objects. + source: + openapi: openapi/openapi.yml + request: + name: CompaniesListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: root.PaginatedCompanyList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 1b998423-db0a-4037-a4cf-f79c60cb67b3 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + legal_name: Waystar Royco, Inc. + display_name: Waystar Royco + eins: + - 12-3456789 + - 12-3451111 + - 11-0011000 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /companies + data: + - Varies by platform + retrieve: + path: /hris/v1/companies/{id} + method: GET + auth: true + docs: Returns a `Company` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: CompaniesRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.Company + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 1b998423-db0a-4037-a4cf-f79c60cb67b3 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + legal_name: Waystar Royco, Inc. + display_name: Waystar Royco + eins: + - 12-3456789 + - 12-3451111 + - 11-0011000 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /companies + data: + - Varies by platform + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/hris/deleteAccount.yml b/.mock/definition/hris/deleteAccount.yml new file mode 100644 index 0000000..d8b1e45 --- /dev/null +++ b/.mock/definition/hris/deleteAccount.yml @@ -0,0 +1,15 @@ +service: + auth: false + base-path: '' + endpoints: + delete: + path: /hris/v1/delete-account + method: POST + auth: true + docs: Delete a linked account. + source: + openapi: openapi/openapi.yml + examples: + - headers: {} + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/hris/dependents.yml b/.mock/definition/hris/dependents.yml new file mode 100644 index 0000000..a4254dd --- /dev/null +++ b/.mock/definition/hris/dependents.yml @@ -0,0 +1,166 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /hris/v1/dependents + method: GET + auth: true + docs: Returns a list of `Dependent` objects. + source: + openapi: openapi/openapi.yml + request: + name: DependentsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_sensitive_fields: + type: optional + docs: >- + Whether to include sensitive fields (such as social security + numbers) in the response. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: root.PaginatedDependentList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 025fjlc6-6000-430a-848e-aafacbadf4fe + remote_id: '19202940' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + first_name: Greg + middle_name: A + last_name: Hirsch + relationship: CHILD + employee: 0958cbc6-6040-430a-848e-aafacbadf4ae + date_of_birth: '1990-11-10T00:00:00Z' + gender: MALE + phone_number: '+1234567890' + home_location: d2f972d0-2526-434b-9409-4c3b468e08f0 + is_student: true + ssn: '1234567890' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /dependent + data: + - Varies by platform + retrieve: + path: /hris/v1/dependents/{id} + method: GET + auth: true + docs: Returns a `Dependent` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: DependentsRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_sensitive_fields: + type: optional + docs: >- + Whether to include sensitive fields (such as social security + numbers) in the response. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.Dependent + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 025fjlc6-6000-430a-848e-aafacbadf4fe + remote_id: '19202940' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + first_name: Greg + middle_name: A + last_name: Hirsch + relationship: CHILD + employee: 0958cbc6-6040-430a-848e-aafacbadf4ae + date_of_birth: '1990-11-10T00:00:00Z' + gender: MALE + phone_number: '+1234567890' + home_location: d2f972d0-2526-434b-9409-4c3b468e08f0 + is_student: true + ssn: '1234567890' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /dependent + data: + - Varies by platform + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/hris/employeePayrollRuns.yml b/.mock/definition/hris/employeePayrollRuns.yml new file mode 100644 index 0000000..c4ffb0b --- /dev/null +++ b/.mock/definition/hris/employeePayrollRuns.yml @@ -0,0 +1,301 @@ +types: + EmployeePayrollRunsListRequestExpand: + enum: + - employee + - value: employee,payroll_run + name: EmployeePayrollRun + - payroll_run + source: + openapi: openapi/openapi.yml + EmployeePayrollRunsRetrieveRequestExpand: + enum: + - employee + - value: employee,payroll_run + name: EmployeePayrollRun + - payroll_run + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /hris/v1/employee-payroll-runs + method: GET + auth: true + docs: Returns a list of `EmployeePayrollRun` objects. + source: + openapi: openapi/openapi.yml + request: + name: EmployeePayrollRunsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + employee_id: + type: optional + docs: >- + If provided, will only return employee payroll runs for this + employee. + ended_after: + type: optional + docs: >- + If provided, will only return employee payroll runs ended after + this datetime. + ended_before: + type: optional + docs: >- + If provided, will only return employee payroll runs ended before + this datetime. + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + payroll_run_id: + type: optional + docs: >- + If provided, will only return employee payroll runs for this + employee. + remote_id: + type: optional + docs: The API provider's ID for the given object. + started_after: + type: optional + docs: >- + If provided, will only return employee payroll runs started after + this datetime. + started_before: + type: optional + docs: >- + If provided, will only return employee payroll runs started before + this datetime. + response: + docs: '' + type: root.PaginatedEmployeePayrollRunList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: fb8c55b6-1cb8-4b4c-9fb6-17924231619d + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee: employee + payroll_run: payroll_run + gross_pay: 1342.67 + net_pay: 865.78 + start_date: '2020-11-08T00:00:00Z' + end_date: '2020-11-09T00:00:00Z' + check_date: '2020-11-10T00:00:00Z' + earnings: + - id: babbced6-3a81-4775-8da2-490dc6385259 + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee_payroll_run: 35347df1-95e7-46e2-93cc-66f1191edca5 + amount: 1002.34 + type: SALARY + - id: babbced6-3a81-4775-8da2-490dc6385259 + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee_payroll_run: 35347df1-95e7-46e2-93cc-66f1191edca5 + amount: 8342.34 + type: OVERTIME + deductions: + - id: 5fd439fc-1b64-4755-b275-64918936c365 + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee_payroll_run: 35347df1-95e7-46e2-93cc-66f1191edca5 + name: Social Security + employee_deduction: 34.54 + company_deduction: 78.78 + taxes: + - id: e3a825fd-c38d-4095-a717-df98c4cb9ebc + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee_payroll_run: 35347df1-95e7-46e2-93cc-66f1191edca5 + name: California State Income Tax + amount: 100.25 + employer_tax: true + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /employee-payroll + data: + - Varies by platform + retrieve: + path: /hris/v1/employee-payroll-runs/{id} + method: GET + auth: true + docs: Returns an `EmployeePayrollRun` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: EmployeePayrollRunsRetrieveRequest + query-parameters: + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.EmployeePayrollRun + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: fb8c55b6-1cb8-4b4c-9fb6-17924231619d + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee: employee + payroll_run: payroll_run + gross_pay: 1342.67 + net_pay: 865.78 + start_date: '2020-11-08T00:00:00Z' + end_date: '2020-11-09T00:00:00Z' + check_date: '2020-11-10T00:00:00Z' + earnings: + - id: babbced6-3a81-4775-8da2-490dc6385259 + remote_id: '52802' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee_payroll_run: 35347df1-95e7-46e2-93cc-66f1191edca5 + amount: 1002.34 + type: SALARY + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + - id: babbced6-3a81-4775-8da2-490dc6385259 + remote_id: '52802' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee_payroll_run: 35347df1-95e7-46e2-93cc-66f1191edca5 + amount: 8342.34 + type: OVERTIME + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + deductions: + - id: 5fd439fc-1b64-4755-b275-64918936c365 + remote_id: '93478612' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee_payroll_run: 35347df1-95e7-46e2-93cc-66f1191edca5 + name: Social Security + employee_deduction: 34.54 + company_deduction: 78.78 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /payroll-deduction + data: + - Varies by platform + taxes: + - id: e3a825fd-c38d-4095-a717-df98c4cb9ebc + remote_id: '26806834' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee_payroll_run: 35347df1-95e7-46e2-93cc-66f1191edca5 + name: California State Income Tax + amount: 100.25 + employer_tax: true + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /employee-payroll + data: + - Varies by platform + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/hris/employees.yml b/.mock/definition/hris/employees.yml new file mode 100644 index 0000000..cfbca08 --- /dev/null +++ b/.mock/definition/hris/employees.yml @@ -0,0 +1,1779 @@ +types: + EmployeesListRequestEmploymentStatus: + enum: + - ACTIVE + - INACTIVE + - PENDING + source: + openapi: openapi/openapi.yml + EmployeesListRequestExpand: + enum: + - company + - value: company,pay_group + name: CompanyPayGroup + - employments + - value: employments,company + name: EmploymentsCompany + - value: employments,company,pay_group + name: EmploymentsCompanyPayGroup + - value: employments,groups + name: EmploymentsGroups + - value: employments,groups,company + name: EmploymentsGroupsCompany + - value: employments,groups,company,pay_group + name: EmploymentsGroupsCompanyPayGroup + - value: employments,groups,home_location + name: EmploymentsGroupsHomeLocation + - value: employments,groups,home_location,company + name: EmploymentsGroupsHomeLocationCompany + - value: employments,groups,home_location,company,pay_group + name: EmploymentsGroupsHomeLocationCompanyPayGroup + - value: employments,groups,home_location,manager + name: EmploymentsGroupsHomeLocationManager + - value: employments,groups,home_location,manager,company + name: EmploymentsGroupsHomeLocationManagerCompany + - value: employments,groups,home_location,manager,company,pay_group + name: EmploymentsGroupsHomeLocationManagerCompanyPayGroup + - value: employments,groups,home_location,manager,pay_group + name: EmploymentsGroupsHomeLocationManagerPayGroup + - value: employments,groups,home_location,manager,team + name: EmploymentsGroupsHomeLocationManagerTeam + - value: employments,groups,home_location,manager,team,company + name: EmploymentsGroupsHomeLocationManagerTeamCompany + - value: employments,groups,home_location,manager,team,company,pay_group + name: EmploymentsGroupsHomeLocationManagerTeamCompanyPayGroup + - value: employments,groups,home_location,manager,team,pay_group + name: EmploymentsGroupsHomeLocationManagerTeamPayGroup + - value: employments,groups,home_location,pay_group + name: EmploymentsGroupsHomeLocationPayGroup + - value: employments,groups,home_location,team + name: EmploymentsGroupsHomeLocationTeam + - value: employments,groups,home_location,team,company + name: EmploymentsGroupsHomeLocationTeamCompany + - value: employments,groups,home_location,team,company,pay_group + name: EmploymentsGroupsHomeLocationTeamCompanyPayGroup + - value: employments,groups,home_location,team,pay_group + name: EmploymentsGroupsHomeLocationTeamPayGroup + - value: employments,groups,home_location,work_location + name: EmploymentsGroupsHomeLocationWorkLocation + - value: employments,groups,home_location,work_location,company + name: EmploymentsGroupsHomeLocationWorkLocationCompany + - value: employments,groups,home_location,work_location,company,pay_group + name: EmploymentsGroupsHomeLocationWorkLocationCompanyPayGroup + - value: employments,groups,home_location,work_location,manager + name: EmploymentsGroupsHomeLocationWorkLocationManager + - value: employments,groups,home_location,work_location,manager,company + name: EmploymentsGroupsHomeLocationWorkLocationManagerCompany + - value: >- + employments,groups,home_location,work_location,manager,company,pay_group + name: EmploymentsGroupsHomeLocationWorkLocationManagerCompanyPayGroup + - value: employments,groups,home_location,work_location,manager,pay_group + name: EmploymentsGroupsHomeLocationWorkLocationManagerPayGroup + - value: employments,groups,home_location,work_location,manager,team + name: EmploymentsGroupsHomeLocationWorkLocationManagerTeam + - value: employments,groups,home_location,work_location,manager,team,company + name: EmploymentsGroupsHomeLocationWorkLocationManagerTeamCompany + - value: >- + employments,groups,home_location,work_location,manager,team,company,pay_group + name: EmploymentsGroupsHomeLocationWorkLocationManagerTeamCompanyPayGroup + - value: employments,groups,home_location,work_location,manager,team,pay_group + name: EmploymentsGroupsHomeLocationWorkLocationManagerTeamPayGroup + - value: employments,groups,home_location,work_location,pay_group + name: EmploymentsGroupsHomeLocationWorkLocationPayGroup + - value: employments,groups,home_location,work_location,team + name: EmploymentsGroupsHomeLocationWorkLocationTeam + - value: employments,groups,home_location,work_location,team,company + name: EmploymentsGroupsHomeLocationWorkLocationTeamCompany + - value: employments,groups,home_location,work_location,team,company,pay_group + name: EmploymentsGroupsHomeLocationWorkLocationTeamCompanyPayGroup + - value: employments,groups,home_location,work_location,team,pay_group + name: EmploymentsGroupsHomeLocationWorkLocationTeamPayGroup + - value: employments,groups,manager + name: EmploymentsGroupsManager + - value: employments,groups,manager,company + name: EmploymentsGroupsManagerCompany + - value: employments,groups,manager,company,pay_group + name: EmploymentsGroupsManagerCompanyPayGroup + - value: employments,groups,manager,pay_group + name: EmploymentsGroupsManagerPayGroup + - value: employments,groups,manager,team + name: EmploymentsGroupsManagerTeam + - value: employments,groups,manager,team,company + name: EmploymentsGroupsManagerTeamCompany + - value: employments,groups,manager,team,company,pay_group + name: EmploymentsGroupsManagerTeamCompanyPayGroup + - value: employments,groups,manager,team,pay_group + name: EmploymentsGroupsManagerTeamPayGroup + - value: employments,groups,pay_group + name: EmploymentsGroupsPayGroup + - value: employments,groups,team + name: EmploymentsGroupsTeam + - value: employments,groups,team,company + name: EmploymentsGroupsTeamCompany + - value: employments,groups,team,company,pay_group + name: EmploymentsGroupsTeamCompanyPayGroup + - value: employments,groups,team,pay_group + name: EmploymentsGroupsTeamPayGroup + - value: employments,groups,work_location + name: EmploymentsGroupsWorkLocation + - value: employments,groups,work_location,company + name: EmploymentsGroupsWorkLocationCompany + - value: employments,groups,work_location,company,pay_group + name: EmploymentsGroupsWorkLocationCompanyPayGroup + - value: employments,groups,work_location,manager + name: EmploymentsGroupsWorkLocationManager + - value: employments,groups,work_location,manager,company + name: EmploymentsGroupsWorkLocationManagerCompany + - value: employments,groups,work_location,manager,company,pay_group + name: EmploymentsGroupsWorkLocationManagerCompanyPayGroup + - value: employments,groups,work_location,manager,pay_group + name: EmploymentsGroupsWorkLocationManagerPayGroup + - value: employments,groups,work_location,manager,team + name: EmploymentsGroupsWorkLocationManagerTeam + - value: employments,groups,work_location,manager,team,company + name: EmploymentsGroupsWorkLocationManagerTeamCompany + - value: employments,groups,work_location,manager,team,company,pay_group + name: EmploymentsGroupsWorkLocationManagerTeamCompanyPayGroup + - value: employments,groups,work_location,manager,team,pay_group + name: EmploymentsGroupsWorkLocationManagerTeamPayGroup + - value: employments,groups,work_location,pay_group + name: EmploymentsGroupsWorkLocationPayGroup + - value: employments,groups,work_location,team + name: EmploymentsGroupsWorkLocationTeam + - value: employments,groups,work_location,team,company + name: EmploymentsGroupsWorkLocationTeamCompany + - value: employments,groups,work_location,team,company,pay_group + name: EmploymentsGroupsWorkLocationTeamCompanyPayGroup + - value: employments,groups,work_location,team,pay_group + name: EmploymentsGroupsWorkLocationTeamPayGroup + - value: employments,home_location + name: EmploymentsHomeLocation + - value: employments,home_location,company + name: EmploymentsHomeLocationCompany + - value: employments,home_location,company,pay_group + name: EmploymentsHomeLocationCompanyPayGroup + - value: employments,home_location,manager + name: EmploymentsHomeLocationManager + - value: employments,home_location,manager,company + name: EmploymentsHomeLocationManagerCompany + - value: employments,home_location,manager,company,pay_group + name: EmploymentsHomeLocationManagerCompanyPayGroup + - value: employments,home_location,manager,pay_group + name: EmploymentsHomeLocationManagerPayGroup + - value: employments,home_location,manager,team + name: EmploymentsHomeLocationManagerTeam + - value: employments,home_location,manager,team,company + name: EmploymentsHomeLocationManagerTeamCompany + - value: employments,home_location,manager,team,company,pay_group + name: EmploymentsHomeLocationManagerTeamCompanyPayGroup + - value: employments,home_location,manager,team,pay_group + name: EmploymentsHomeLocationManagerTeamPayGroup + - value: employments,home_location,pay_group + name: EmploymentsHomeLocationPayGroup + - value: employments,home_location,team + name: EmploymentsHomeLocationTeam + - value: employments,home_location,team,company + name: EmploymentsHomeLocationTeamCompany + - value: employments,home_location,team,company,pay_group + name: EmploymentsHomeLocationTeamCompanyPayGroup + - value: employments,home_location,team,pay_group + name: EmploymentsHomeLocationTeamPayGroup + - value: employments,home_location,work_location + name: EmploymentsHomeLocationWorkLocation + - value: employments,home_location,work_location,company + name: EmploymentsHomeLocationWorkLocationCompany + - value: employments,home_location,work_location,company,pay_group + name: EmploymentsHomeLocationWorkLocationCompanyPayGroup + - value: employments,home_location,work_location,manager + name: EmploymentsHomeLocationWorkLocationManager + - value: employments,home_location,work_location,manager,company + name: EmploymentsHomeLocationWorkLocationManagerCompany + - value: employments,home_location,work_location,manager,company,pay_group + name: EmploymentsHomeLocationWorkLocationManagerCompanyPayGroup + - value: employments,home_location,work_location,manager,pay_group + name: EmploymentsHomeLocationWorkLocationManagerPayGroup + - value: employments,home_location,work_location,manager,team + name: EmploymentsHomeLocationWorkLocationManagerTeam + - value: employments,home_location,work_location,manager,team,company + name: EmploymentsHomeLocationWorkLocationManagerTeamCompany + - value: employments,home_location,work_location,manager,team,company,pay_group + name: EmploymentsHomeLocationWorkLocationManagerTeamCompanyPayGroup + - value: employments,home_location,work_location,manager,team,pay_group + name: EmploymentsHomeLocationWorkLocationManagerTeamPayGroup + - value: employments,home_location,work_location,pay_group + name: EmploymentsHomeLocationWorkLocationPayGroup + - value: employments,home_location,work_location,team + name: EmploymentsHomeLocationWorkLocationTeam + - value: employments,home_location,work_location,team,company + name: EmploymentsHomeLocationWorkLocationTeamCompany + - value: employments,home_location,work_location,team,company,pay_group + name: EmploymentsHomeLocationWorkLocationTeamCompanyPayGroup + - value: employments,home_location,work_location,team,pay_group + name: EmploymentsHomeLocationWorkLocationTeamPayGroup + - value: employments,manager + name: EmploymentsManager + - value: employments,manager,company + name: EmploymentsManagerCompany + - value: employments,manager,company,pay_group + name: EmploymentsManagerCompanyPayGroup + - value: employments,manager,pay_group + name: EmploymentsManagerPayGroup + - value: employments,manager,team + name: EmploymentsManagerTeam + - value: employments,manager,team,company + name: EmploymentsManagerTeamCompany + - value: employments,manager,team,company,pay_group + name: EmploymentsManagerTeamCompanyPayGroup + - value: employments,manager,team,pay_group + name: EmploymentsManagerTeamPayGroup + - value: employments,pay_group + name: EmploymentsPayGroup + - value: employments,team + name: EmploymentsTeam + - value: employments,team,company + name: EmploymentsTeamCompany + - value: employments,team,company,pay_group + name: EmploymentsTeamCompanyPayGroup + - value: employments,team,pay_group + name: EmploymentsTeamPayGroup + - value: employments,work_location + name: EmploymentsWorkLocation + - value: employments,work_location,company + name: EmploymentsWorkLocationCompany + - value: employments,work_location,company,pay_group + name: EmploymentsWorkLocationCompanyPayGroup + - value: employments,work_location,manager + name: EmploymentsWorkLocationManager + - value: employments,work_location,manager,company + name: EmploymentsWorkLocationManagerCompany + - value: employments,work_location,manager,company,pay_group + name: EmploymentsWorkLocationManagerCompanyPayGroup + - value: employments,work_location,manager,pay_group + name: EmploymentsWorkLocationManagerPayGroup + - value: employments,work_location,manager,team + name: EmploymentsWorkLocationManagerTeam + - value: employments,work_location,manager,team,company + name: EmploymentsWorkLocationManagerTeamCompany + - value: employments,work_location,manager,team,company,pay_group + name: EmploymentsWorkLocationManagerTeamCompanyPayGroup + - value: employments,work_location,manager,team,pay_group + name: EmploymentsWorkLocationManagerTeamPayGroup + - value: employments,work_location,pay_group + name: EmploymentsWorkLocationPayGroup + - value: employments,work_location,team + name: EmploymentsWorkLocationTeam + - value: employments,work_location,team,company + name: EmploymentsWorkLocationTeamCompany + - value: employments,work_location,team,company,pay_group + name: EmploymentsWorkLocationTeamCompanyPayGroup + - value: employments,work_location,team,pay_group + name: EmploymentsWorkLocationTeamPayGroup + - groups + - value: groups,company + name: GroupsCompany + - value: groups,company,pay_group + name: GroupsCompanyPayGroup + - value: groups,home_location + name: GroupsHomeLocation + - value: groups,home_location,company + name: GroupsHomeLocationCompany + - value: groups,home_location,company,pay_group + name: GroupsHomeLocationCompanyPayGroup + - value: groups,home_location,manager + name: GroupsHomeLocationManager + - value: groups,home_location,manager,company + name: GroupsHomeLocationManagerCompany + - value: groups,home_location,manager,company,pay_group + name: GroupsHomeLocationManagerCompanyPayGroup + - value: groups,home_location,manager,pay_group + name: GroupsHomeLocationManagerPayGroup + - value: groups,home_location,manager,team + name: GroupsHomeLocationManagerTeam + - value: groups,home_location,manager,team,company + name: GroupsHomeLocationManagerTeamCompany + - value: groups,home_location,manager,team,company,pay_group + name: GroupsHomeLocationManagerTeamCompanyPayGroup + - value: groups,home_location,manager,team,pay_group + name: GroupsHomeLocationManagerTeamPayGroup + - value: groups,home_location,pay_group + name: GroupsHomeLocationPayGroup + - value: groups,home_location,team + name: GroupsHomeLocationTeam + - value: groups,home_location,team,company + name: GroupsHomeLocationTeamCompany + - value: groups,home_location,team,company,pay_group + name: GroupsHomeLocationTeamCompanyPayGroup + - value: groups,home_location,team,pay_group + name: GroupsHomeLocationTeamPayGroup + - value: groups,home_location,work_location + name: GroupsHomeLocationWorkLocation + - value: groups,home_location,work_location,company + name: GroupsHomeLocationWorkLocationCompany + - value: groups,home_location,work_location,company,pay_group + name: GroupsHomeLocationWorkLocationCompanyPayGroup + - value: groups,home_location,work_location,manager + name: GroupsHomeLocationWorkLocationManager + - value: groups,home_location,work_location,manager,company + name: GroupsHomeLocationWorkLocationManagerCompany + - value: groups,home_location,work_location,manager,company,pay_group + name: GroupsHomeLocationWorkLocationManagerCompanyPayGroup + - value: groups,home_location,work_location,manager,pay_group + name: GroupsHomeLocationWorkLocationManagerPayGroup + - value: groups,home_location,work_location,manager,team + name: GroupsHomeLocationWorkLocationManagerTeam + - value: groups,home_location,work_location,manager,team,company + name: GroupsHomeLocationWorkLocationManagerTeamCompany + - value: groups,home_location,work_location,manager,team,company,pay_group + name: GroupsHomeLocationWorkLocationManagerTeamCompanyPayGroup + - value: groups,home_location,work_location,manager,team,pay_group + name: GroupsHomeLocationWorkLocationManagerTeamPayGroup + - value: groups,home_location,work_location,pay_group + name: GroupsHomeLocationWorkLocationPayGroup + - value: groups,home_location,work_location,team + name: GroupsHomeLocationWorkLocationTeam + - value: groups,home_location,work_location,team,company + name: GroupsHomeLocationWorkLocationTeamCompany + - value: groups,home_location,work_location,team,company,pay_group + name: GroupsHomeLocationWorkLocationTeamCompanyPayGroup + - value: groups,home_location,work_location,team,pay_group + name: GroupsHomeLocationWorkLocationTeamPayGroup + - value: groups,manager + name: GroupsManager + - value: groups,manager,company + name: GroupsManagerCompany + - value: groups,manager,company,pay_group + name: GroupsManagerCompanyPayGroup + - value: groups,manager,pay_group + name: GroupsManagerPayGroup + - value: groups,manager,team + name: GroupsManagerTeam + - value: groups,manager,team,company + name: GroupsManagerTeamCompany + - value: groups,manager,team,company,pay_group + name: GroupsManagerTeamCompanyPayGroup + - value: groups,manager,team,pay_group + name: GroupsManagerTeamPayGroup + - value: groups,pay_group + name: GroupsPayGroup + - value: groups,team + name: GroupsTeam + - value: groups,team,company + name: GroupsTeamCompany + - value: groups,team,company,pay_group + name: GroupsTeamCompanyPayGroup + - value: groups,team,pay_group + name: GroupsTeamPayGroup + - value: groups,work_location + name: GroupsWorkLocation + - value: groups,work_location,company + name: GroupsWorkLocationCompany + - value: groups,work_location,company,pay_group + name: GroupsWorkLocationCompanyPayGroup + - value: groups,work_location,manager + name: GroupsWorkLocationManager + - value: groups,work_location,manager,company + name: GroupsWorkLocationManagerCompany + - value: groups,work_location,manager,company,pay_group + name: GroupsWorkLocationManagerCompanyPayGroup + - value: groups,work_location,manager,pay_group + name: GroupsWorkLocationManagerPayGroup + - value: groups,work_location,manager,team + name: GroupsWorkLocationManagerTeam + - value: groups,work_location,manager,team,company + name: GroupsWorkLocationManagerTeamCompany + - value: groups,work_location,manager,team,company,pay_group + name: GroupsWorkLocationManagerTeamCompanyPayGroup + - value: groups,work_location,manager,team,pay_group + name: GroupsWorkLocationManagerTeamPayGroup + - value: groups,work_location,pay_group + name: GroupsWorkLocationPayGroup + - value: groups,work_location,team + name: GroupsWorkLocationTeam + - value: groups,work_location,team,company + name: GroupsWorkLocationTeamCompany + - value: groups,work_location,team,company,pay_group + name: GroupsWorkLocationTeamCompanyPayGroup + - value: groups,work_location,team,pay_group + name: GroupsWorkLocationTeamPayGroup + - home_location + - value: home_location,company + name: HomeLocationCompany + - value: home_location,company,pay_group + name: HomeLocationCompanyPayGroup + - value: home_location,manager + name: HomeLocationManager + - value: home_location,manager,company + name: HomeLocationManagerCompany + - value: home_location,manager,company,pay_group + name: HomeLocationManagerCompanyPayGroup + - value: home_location,manager,pay_group + name: HomeLocationManagerPayGroup + - value: home_location,manager,team + name: HomeLocationManagerTeam + - value: home_location,manager,team,company + name: HomeLocationManagerTeamCompany + - value: home_location,manager,team,company,pay_group + name: HomeLocationManagerTeamCompanyPayGroup + - value: home_location,manager,team,pay_group + name: HomeLocationManagerTeamPayGroup + - value: home_location,pay_group + name: HomeLocationPayGroup + - value: home_location,team + name: HomeLocationTeam + - value: home_location,team,company + name: HomeLocationTeamCompany + - value: home_location,team,company,pay_group + name: HomeLocationTeamCompanyPayGroup + - value: home_location,team,pay_group + name: HomeLocationTeamPayGroup + - value: home_location,work_location + name: HomeLocationWorkLocation + - value: home_location,work_location,company + name: HomeLocationWorkLocationCompany + - value: home_location,work_location,company,pay_group + name: HomeLocationWorkLocationCompanyPayGroup + - value: home_location,work_location,manager + name: HomeLocationWorkLocationManager + - value: home_location,work_location,manager,company + name: HomeLocationWorkLocationManagerCompany + - value: home_location,work_location,manager,company,pay_group + name: HomeLocationWorkLocationManagerCompanyPayGroup + - value: home_location,work_location,manager,pay_group + name: HomeLocationWorkLocationManagerPayGroup + - value: home_location,work_location,manager,team + name: HomeLocationWorkLocationManagerTeam + - value: home_location,work_location,manager,team,company + name: HomeLocationWorkLocationManagerTeamCompany + - value: home_location,work_location,manager,team,company,pay_group + name: HomeLocationWorkLocationManagerTeamCompanyPayGroup + - value: home_location,work_location,manager,team,pay_group + name: HomeLocationWorkLocationManagerTeamPayGroup + - value: home_location,work_location,pay_group + name: HomeLocationWorkLocationPayGroup + - value: home_location,work_location,team + name: HomeLocationWorkLocationTeam + - value: home_location,work_location,team,company + name: HomeLocationWorkLocationTeamCompany + - value: home_location,work_location,team,company,pay_group + name: HomeLocationWorkLocationTeamCompanyPayGroup + - value: home_location,work_location,team,pay_group + name: HomeLocationWorkLocationTeamPayGroup + - manager + - value: manager,company + name: ManagerCompany + - value: manager,company,pay_group + name: ManagerCompanyPayGroup + - value: manager,pay_group + name: ManagerPayGroup + - value: manager,team + name: ManagerTeam + - value: manager,team,company + name: ManagerTeamCompany + - value: manager,team,company,pay_group + name: ManagerTeamCompanyPayGroup + - value: manager,team,pay_group + name: ManagerTeamPayGroup + - pay_group + - team + - value: team,company + name: TeamCompany + - value: team,company,pay_group + name: TeamCompanyPayGroup + - value: team,pay_group + name: TeamPayGroup + - work_location + - value: work_location,company + name: WorkLocationCompany + - value: work_location,company,pay_group + name: WorkLocationCompanyPayGroup + - value: work_location,manager + name: WorkLocationManager + - value: work_location,manager,company + name: WorkLocationManagerCompany + - value: work_location,manager,company,pay_group + name: WorkLocationManagerCompanyPayGroup + - value: work_location,manager,pay_group + name: WorkLocationManagerPayGroup + - value: work_location,manager,team + name: WorkLocationManagerTeam + - value: work_location,manager,team,company + name: WorkLocationManagerTeamCompany + - value: work_location,manager,team,company,pay_group + name: WorkLocationManagerTeamCompanyPayGroup + - value: work_location,manager,team,pay_group + name: WorkLocationManagerTeamPayGroup + - value: work_location,pay_group + name: WorkLocationPayGroup + - value: work_location,team + name: WorkLocationTeam + - value: work_location,team,company + name: WorkLocationTeamCompany + - value: work_location,team,company,pay_group + name: WorkLocationTeamCompanyPayGroup + - value: work_location,team,pay_group + name: WorkLocationTeamPayGroup + source: + openapi: openapi/openapi.yml + EmployeesListRequestRemoteFields: + enum: + - employment_status + - value: employment_status,ethnicity + name: EmploymentStatusEthnicity + - value: employment_status,ethnicity,gender + name: EmploymentStatusEthnicityGender + - value: employment_status,ethnicity,gender,marital_status + name: EmploymentStatusEthnicityGenderMaritalStatus + - value: employment_status,ethnicity,marital_status + name: EmploymentStatusEthnicityMaritalStatus + - value: employment_status,gender + name: EmploymentStatusGender + - value: employment_status,gender,marital_status + name: EmploymentStatusGenderMaritalStatus + - value: employment_status,marital_status + name: EmploymentStatusMaritalStatus + - ethnicity + - value: ethnicity,gender + name: EthnicityGender + - value: ethnicity,gender,marital_status + name: EthnicityGenderMaritalStatus + - value: ethnicity,marital_status + name: EthnicityMaritalStatus + - gender + - value: gender,marital_status + name: GenderMaritalStatus + - marital_status + source: + openapi: openapi/openapi.yml + EmployeesListRequestShowEnumOrigins: + enum: + - employment_status + - value: employment_status,ethnicity + name: EmploymentStatusEthnicity + - value: employment_status,ethnicity,gender + name: EmploymentStatusEthnicityGender + - value: employment_status,ethnicity,gender,marital_status + name: EmploymentStatusEthnicityGenderMaritalStatus + - value: employment_status,ethnicity,marital_status + name: EmploymentStatusEthnicityMaritalStatus + - value: employment_status,gender + name: EmploymentStatusGender + - value: employment_status,gender,marital_status + name: EmploymentStatusGenderMaritalStatus + - value: employment_status,marital_status + name: EmploymentStatusMaritalStatus + - ethnicity + - value: ethnicity,gender + name: EthnicityGender + - value: ethnicity,gender,marital_status + name: EthnicityGenderMaritalStatus + - value: ethnicity,marital_status + name: EthnicityMaritalStatus + - gender + - value: gender,marital_status + name: GenderMaritalStatus + - marital_status + source: + openapi: openapi/openapi.yml + EmployeesRetrieveRequestExpand: + enum: + - company + - value: company,pay_group + name: CompanyPayGroup + - employments + - value: employments,company + name: EmploymentsCompany + - value: employments,company,pay_group + name: EmploymentsCompanyPayGroup + - value: employments,groups + name: EmploymentsGroups + - value: employments,groups,company + name: EmploymentsGroupsCompany + - value: employments,groups,company,pay_group + name: EmploymentsGroupsCompanyPayGroup + - value: employments,groups,home_location + name: EmploymentsGroupsHomeLocation + - value: employments,groups,home_location,company + name: EmploymentsGroupsHomeLocationCompany + - value: employments,groups,home_location,company,pay_group + name: EmploymentsGroupsHomeLocationCompanyPayGroup + - value: employments,groups,home_location,manager + name: EmploymentsGroupsHomeLocationManager + - value: employments,groups,home_location,manager,company + name: EmploymentsGroupsHomeLocationManagerCompany + - value: employments,groups,home_location,manager,company,pay_group + name: EmploymentsGroupsHomeLocationManagerCompanyPayGroup + - value: employments,groups,home_location,manager,pay_group + name: EmploymentsGroupsHomeLocationManagerPayGroup + - value: employments,groups,home_location,manager,team + name: EmploymentsGroupsHomeLocationManagerTeam + - value: employments,groups,home_location,manager,team,company + name: EmploymentsGroupsHomeLocationManagerTeamCompany + - value: employments,groups,home_location,manager,team,company,pay_group + name: EmploymentsGroupsHomeLocationManagerTeamCompanyPayGroup + - value: employments,groups,home_location,manager,team,pay_group + name: EmploymentsGroupsHomeLocationManagerTeamPayGroup + - value: employments,groups,home_location,pay_group + name: EmploymentsGroupsHomeLocationPayGroup + - value: employments,groups,home_location,team + name: EmploymentsGroupsHomeLocationTeam + - value: employments,groups,home_location,team,company + name: EmploymentsGroupsHomeLocationTeamCompany + - value: employments,groups,home_location,team,company,pay_group + name: EmploymentsGroupsHomeLocationTeamCompanyPayGroup + - value: employments,groups,home_location,team,pay_group + name: EmploymentsGroupsHomeLocationTeamPayGroup + - value: employments,groups,home_location,work_location + name: EmploymentsGroupsHomeLocationWorkLocation + - value: employments,groups,home_location,work_location,company + name: EmploymentsGroupsHomeLocationWorkLocationCompany + - value: employments,groups,home_location,work_location,company,pay_group + name: EmploymentsGroupsHomeLocationWorkLocationCompanyPayGroup + - value: employments,groups,home_location,work_location,manager + name: EmploymentsGroupsHomeLocationWorkLocationManager + - value: employments,groups,home_location,work_location,manager,company + name: EmploymentsGroupsHomeLocationWorkLocationManagerCompany + - value: >- + employments,groups,home_location,work_location,manager,company,pay_group + name: EmploymentsGroupsHomeLocationWorkLocationManagerCompanyPayGroup + - value: employments,groups,home_location,work_location,manager,pay_group + name: EmploymentsGroupsHomeLocationWorkLocationManagerPayGroup + - value: employments,groups,home_location,work_location,manager,team + name: EmploymentsGroupsHomeLocationWorkLocationManagerTeam + - value: employments,groups,home_location,work_location,manager,team,company + name: EmploymentsGroupsHomeLocationWorkLocationManagerTeamCompany + - value: >- + employments,groups,home_location,work_location,manager,team,company,pay_group + name: EmploymentsGroupsHomeLocationWorkLocationManagerTeamCompanyPayGroup + - value: employments,groups,home_location,work_location,manager,team,pay_group + name: EmploymentsGroupsHomeLocationWorkLocationManagerTeamPayGroup + - value: employments,groups,home_location,work_location,pay_group + name: EmploymentsGroupsHomeLocationWorkLocationPayGroup + - value: employments,groups,home_location,work_location,team + name: EmploymentsGroupsHomeLocationWorkLocationTeam + - value: employments,groups,home_location,work_location,team,company + name: EmploymentsGroupsHomeLocationWorkLocationTeamCompany + - value: employments,groups,home_location,work_location,team,company,pay_group + name: EmploymentsGroupsHomeLocationWorkLocationTeamCompanyPayGroup + - value: employments,groups,home_location,work_location,team,pay_group + name: EmploymentsGroupsHomeLocationWorkLocationTeamPayGroup + - value: employments,groups,manager + name: EmploymentsGroupsManager + - value: employments,groups,manager,company + name: EmploymentsGroupsManagerCompany + - value: employments,groups,manager,company,pay_group + name: EmploymentsGroupsManagerCompanyPayGroup + - value: employments,groups,manager,pay_group + name: EmploymentsGroupsManagerPayGroup + - value: employments,groups,manager,team + name: EmploymentsGroupsManagerTeam + - value: employments,groups,manager,team,company + name: EmploymentsGroupsManagerTeamCompany + - value: employments,groups,manager,team,company,pay_group + name: EmploymentsGroupsManagerTeamCompanyPayGroup + - value: employments,groups,manager,team,pay_group + name: EmploymentsGroupsManagerTeamPayGroup + - value: employments,groups,pay_group + name: EmploymentsGroupsPayGroup + - value: employments,groups,team + name: EmploymentsGroupsTeam + - value: employments,groups,team,company + name: EmploymentsGroupsTeamCompany + - value: employments,groups,team,company,pay_group + name: EmploymentsGroupsTeamCompanyPayGroup + - value: employments,groups,team,pay_group + name: EmploymentsGroupsTeamPayGroup + - value: employments,groups,work_location + name: EmploymentsGroupsWorkLocation + - value: employments,groups,work_location,company + name: EmploymentsGroupsWorkLocationCompany + - value: employments,groups,work_location,company,pay_group + name: EmploymentsGroupsWorkLocationCompanyPayGroup + - value: employments,groups,work_location,manager + name: EmploymentsGroupsWorkLocationManager + - value: employments,groups,work_location,manager,company + name: EmploymentsGroupsWorkLocationManagerCompany + - value: employments,groups,work_location,manager,company,pay_group + name: EmploymentsGroupsWorkLocationManagerCompanyPayGroup + - value: employments,groups,work_location,manager,pay_group + name: EmploymentsGroupsWorkLocationManagerPayGroup + - value: employments,groups,work_location,manager,team + name: EmploymentsGroupsWorkLocationManagerTeam + - value: employments,groups,work_location,manager,team,company + name: EmploymentsGroupsWorkLocationManagerTeamCompany + - value: employments,groups,work_location,manager,team,company,pay_group + name: EmploymentsGroupsWorkLocationManagerTeamCompanyPayGroup + - value: employments,groups,work_location,manager,team,pay_group + name: EmploymentsGroupsWorkLocationManagerTeamPayGroup + - value: employments,groups,work_location,pay_group + name: EmploymentsGroupsWorkLocationPayGroup + - value: employments,groups,work_location,team + name: EmploymentsGroupsWorkLocationTeam + - value: employments,groups,work_location,team,company + name: EmploymentsGroupsWorkLocationTeamCompany + - value: employments,groups,work_location,team,company,pay_group + name: EmploymentsGroupsWorkLocationTeamCompanyPayGroup + - value: employments,groups,work_location,team,pay_group + name: EmploymentsGroupsWorkLocationTeamPayGroup + - value: employments,home_location + name: EmploymentsHomeLocation + - value: employments,home_location,company + name: EmploymentsHomeLocationCompany + - value: employments,home_location,company,pay_group + name: EmploymentsHomeLocationCompanyPayGroup + - value: employments,home_location,manager + name: EmploymentsHomeLocationManager + - value: employments,home_location,manager,company + name: EmploymentsHomeLocationManagerCompany + - value: employments,home_location,manager,company,pay_group + name: EmploymentsHomeLocationManagerCompanyPayGroup + - value: employments,home_location,manager,pay_group + name: EmploymentsHomeLocationManagerPayGroup + - value: employments,home_location,manager,team + name: EmploymentsHomeLocationManagerTeam + - value: employments,home_location,manager,team,company + name: EmploymentsHomeLocationManagerTeamCompany + - value: employments,home_location,manager,team,company,pay_group + name: EmploymentsHomeLocationManagerTeamCompanyPayGroup + - value: employments,home_location,manager,team,pay_group + name: EmploymentsHomeLocationManagerTeamPayGroup + - value: employments,home_location,pay_group + name: EmploymentsHomeLocationPayGroup + - value: employments,home_location,team + name: EmploymentsHomeLocationTeam + - value: employments,home_location,team,company + name: EmploymentsHomeLocationTeamCompany + - value: employments,home_location,team,company,pay_group + name: EmploymentsHomeLocationTeamCompanyPayGroup + - value: employments,home_location,team,pay_group + name: EmploymentsHomeLocationTeamPayGroup + - value: employments,home_location,work_location + name: EmploymentsHomeLocationWorkLocation + - value: employments,home_location,work_location,company + name: EmploymentsHomeLocationWorkLocationCompany + - value: employments,home_location,work_location,company,pay_group + name: EmploymentsHomeLocationWorkLocationCompanyPayGroup + - value: employments,home_location,work_location,manager + name: EmploymentsHomeLocationWorkLocationManager + - value: employments,home_location,work_location,manager,company + name: EmploymentsHomeLocationWorkLocationManagerCompany + - value: employments,home_location,work_location,manager,company,pay_group + name: EmploymentsHomeLocationWorkLocationManagerCompanyPayGroup + - value: employments,home_location,work_location,manager,pay_group + name: EmploymentsHomeLocationWorkLocationManagerPayGroup + - value: employments,home_location,work_location,manager,team + name: EmploymentsHomeLocationWorkLocationManagerTeam + - value: employments,home_location,work_location,manager,team,company + name: EmploymentsHomeLocationWorkLocationManagerTeamCompany + - value: employments,home_location,work_location,manager,team,company,pay_group + name: EmploymentsHomeLocationWorkLocationManagerTeamCompanyPayGroup + - value: employments,home_location,work_location,manager,team,pay_group + name: EmploymentsHomeLocationWorkLocationManagerTeamPayGroup + - value: employments,home_location,work_location,pay_group + name: EmploymentsHomeLocationWorkLocationPayGroup + - value: employments,home_location,work_location,team + name: EmploymentsHomeLocationWorkLocationTeam + - value: employments,home_location,work_location,team,company + name: EmploymentsHomeLocationWorkLocationTeamCompany + - value: employments,home_location,work_location,team,company,pay_group + name: EmploymentsHomeLocationWorkLocationTeamCompanyPayGroup + - value: employments,home_location,work_location,team,pay_group + name: EmploymentsHomeLocationWorkLocationTeamPayGroup + - value: employments,manager + name: EmploymentsManager + - value: employments,manager,company + name: EmploymentsManagerCompany + - value: employments,manager,company,pay_group + name: EmploymentsManagerCompanyPayGroup + - value: employments,manager,pay_group + name: EmploymentsManagerPayGroup + - value: employments,manager,team + name: EmploymentsManagerTeam + - value: employments,manager,team,company + name: EmploymentsManagerTeamCompany + - value: employments,manager,team,company,pay_group + name: EmploymentsManagerTeamCompanyPayGroup + - value: employments,manager,team,pay_group + name: EmploymentsManagerTeamPayGroup + - value: employments,pay_group + name: EmploymentsPayGroup + - value: employments,team + name: EmploymentsTeam + - value: employments,team,company + name: EmploymentsTeamCompany + - value: employments,team,company,pay_group + name: EmploymentsTeamCompanyPayGroup + - value: employments,team,pay_group + name: EmploymentsTeamPayGroup + - value: employments,work_location + name: EmploymentsWorkLocation + - value: employments,work_location,company + name: EmploymentsWorkLocationCompany + - value: employments,work_location,company,pay_group + name: EmploymentsWorkLocationCompanyPayGroup + - value: employments,work_location,manager + name: EmploymentsWorkLocationManager + - value: employments,work_location,manager,company + name: EmploymentsWorkLocationManagerCompany + - value: employments,work_location,manager,company,pay_group + name: EmploymentsWorkLocationManagerCompanyPayGroup + - value: employments,work_location,manager,pay_group + name: EmploymentsWorkLocationManagerPayGroup + - value: employments,work_location,manager,team + name: EmploymentsWorkLocationManagerTeam + - value: employments,work_location,manager,team,company + name: EmploymentsWorkLocationManagerTeamCompany + - value: employments,work_location,manager,team,company,pay_group + name: EmploymentsWorkLocationManagerTeamCompanyPayGroup + - value: employments,work_location,manager,team,pay_group + name: EmploymentsWorkLocationManagerTeamPayGroup + - value: employments,work_location,pay_group + name: EmploymentsWorkLocationPayGroup + - value: employments,work_location,team + name: EmploymentsWorkLocationTeam + - value: employments,work_location,team,company + name: EmploymentsWorkLocationTeamCompany + - value: employments,work_location,team,company,pay_group + name: EmploymentsWorkLocationTeamCompanyPayGroup + - value: employments,work_location,team,pay_group + name: EmploymentsWorkLocationTeamPayGroup + - groups + - value: groups,company + name: GroupsCompany + - value: groups,company,pay_group + name: GroupsCompanyPayGroup + - value: groups,home_location + name: GroupsHomeLocation + - value: groups,home_location,company + name: GroupsHomeLocationCompany + - value: groups,home_location,company,pay_group + name: GroupsHomeLocationCompanyPayGroup + - value: groups,home_location,manager + name: GroupsHomeLocationManager + - value: groups,home_location,manager,company + name: GroupsHomeLocationManagerCompany + - value: groups,home_location,manager,company,pay_group + name: GroupsHomeLocationManagerCompanyPayGroup + - value: groups,home_location,manager,pay_group + name: GroupsHomeLocationManagerPayGroup + - value: groups,home_location,manager,team + name: GroupsHomeLocationManagerTeam + - value: groups,home_location,manager,team,company + name: GroupsHomeLocationManagerTeamCompany + - value: groups,home_location,manager,team,company,pay_group + name: GroupsHomeLocationManagerTeamCompanyPayGroup + - value: groups,home_location,manager,team,pay_group + name: GroupsHomeLocationManagerTeamPayGroup + - value: groups,home_location,pay_group + name: GroupsHomeLocationPayGroup + - value: groups,home_location,team + name: GroupsHomeLocationTeam + - value: groups,home_location,team,company + name: GroupsHomeLocationTeamCompany + - value: groups,home_location,team,company,pay_group + name: GroupsHomeLocationTeamCompanyPayGroup + - value: groups,home_location,team,pay_group + name: GroupsHomeLocationTeamPayGroup + - value: groups,home_location,work_location + name: GroupsHomeLocationWorkLocation + - value: groups,home_location,work_location,company + name: GroupsHomeLocationWorkLocationCompany + - value: groups,home_location,work_location,company,pay_group + name: GroupsHomeLocationWorkLocationCompanyPayGroup + - value: groups,home_location,work_location,manager + name: GroupsHomeLocationWorkLocationManager + - value: groups,home_location,work_location,manager,company + name: GroupsHomeLocationWorkLocationManagerCompany + - value: groups,home_location,work_location,manager,company,pay_group + name: GroupsHomeLocationWorkLocationManagerCompanyPayGroup + - value: groups,home_location,work_location,manager,pay_group + name: GroupsHomeLocationWorkLocationManagerPayGroup + - value: groups,home_location,work_location,manager,team + name: GroupsHomeLocationWorkLocationManagerTeam + - value: groups,home_location,work_location,manager,team,company + name: GroupsHomeLocationWorkLocationManagerTeamCompany + - value: groups,home_location,work_location,manager,team,company,pay_group + name: GroupsHomeLocationWorkLocationManagerTeamCompanyPayGroup + - value: groups,home_location,work_location,manager,team,pay_group + name: GroupsHomeLocationWorkLocationManagerTeamPayGroup + - value: groups,home_location,work_location,pay_group + name: GroupsHomeLocationWorkLocationPayGroup + - value: groups,home_location,work_location,team + name: GroupsHomeLocationWorkLocationTeam + - value: groups,home_location,work_location,team,company + name: GroupsHomeLocationWorkLocationTeamCompany + - value: groups,home_location,work_location,team,company,pay_group + name: GroupsHomeLocationWorkLocationTeamCompanyPayGroup + - value: groups,home_location,work_location,team,pay_group + name: GroupsHomeLocationWorkLocationTeamPayGroup + - value: groups,manager + name: GroupsManager + - value: groups,manager,company + name: GroupsManagerCompany + - value: groups,manager,company,pay_group + name: GroupsManagerCompanyPayGroup + - value: groups,manager,pay_group + name: GroupsManagerPayGroup + - value: groups,manager,team + name: GroupsManagerTeam + - value: groups,manager,team,company + name: GroupsManagerTeamCompany + - value: groups,manager,team,company,pay_group + name: GroupsManagerTeamCompanyPayGroup + - value: groups,manager,team,pay_group + name: GroupsManagerTeamPayGroup + - value: groups,pay_group + name: GroupsPayGroup + - value: groups,team + name: GroupsTeam + - value: groups,team,company + name: GroupsTeamCompany + - value: groups,team,company,pay_group + name: GroupsTeamCompanyPayGroup + - value: groups,team,pay_group + name: GroupsTeamPayGroup + - value: groups,work_location + name: GroupsWorkLocation + - value: groups,work_location,company + name: GroupsWorkLocationCompany + - value: groups,work_location,company,pay_group + name: GroupsWorkLocationCompanyPayGroup + - value: groups,work_location,manager + name: GroupsWorkLocationManager + - value: groups,work_location,manager,company + name: GroupsWorkLocationManagerCompany + - value: groups,work_location,manager,company,pay_group + name: GroupsWorkLocationManagerCompanyPayGroup + - value: groups,work_location,manager,pay_group + name: GroupsWorkLocationManagerPayGroup + - value: groups,work_location,manager,team + name: GroupsWorkLocationManagerTeam + - value: groups,work_location,manager,team,company + name: GroupsWorkLocationManagerTeamCompany + - value: groups,work_location,manager,team,company,pay_group + name: GroupsWorkLocationManagerTeamCompanyPayGroup + - value: groups,work_location,manager,team,pay_group + name: GroupsWorkLocationManagerTeamPayGroup + - value: groups,work_location,pay_group + name: GroupsWorkLocationPayGroup + - value: groups,work_location,team + name: GroupsWorkLocationTeam + - value: groups,work_location,team,company + name: GroupsWorkLocationTeamCompany + - value: groups,work_location,team,company,pay_group + name: GroupsWorkLocationTeamCompanyPayGroup + - value: groups,work_location,team,pay_group + name: GroupsWorkLocationTeamPayGroup + - home_location + - value: home_location,company + name: HomeLocationCompany + - value: home_location,company,pay_group + name: HomeLocationCompanyPayGroup + - value: home_location,manager + name: HomeLocationManager + - value: home_location,manager,company + name: HomeLocationManagerCompany + - value: home_location,manager,company,pay_group + name: HomeLocationManagerCompanyPayGroup + - value: home_location,manager,pay_group + name: HomeLocationManagerPayGroup + - value: home_location,manager,team + name: HomeLocationManagerTeam + - value: home_location,manager,team,company + name: HomeLocationManagerTeamCompany + - value: home_location,manager,team,company,pay_group + name: HomeLocationManagerTeamCompanyPayGroup + - value: home_location,manager,team,pay_group + name: HomeLocationManagerTeamPayGroup + - value: home_location,pay_group + name: HomeLocationPayGroup + - value: home_location,team + name: HomeLocationTeam + - value: home_location,team,company + name: HomeLocationTeamCompany + - value: home_location,team,company,pay_group + name: HomeLocationTeamCompanyPayGroup + - value: home_location,team,pay_group + name: HomeLocationTeamPayGroup + - value: home_location,work_location + name: HomeLocationWorkLocation + - value: home_location,work_location,company + name: HomeLocationWorkLocationCompany + - value: home_location,work_location,company,pay_group + name: HomeLocationWorkLocationCompanyPayGroup + - value: home_location,work_location,manager + name: HomeLocationWorkLocationManager + - value: home_location,work_location,manager,company + name: HomeLocationWorkLocationManagerCompany + - value: home_location,work_location,manager,company,pay_group + name: HomeLocationWorkLocationManagerCompanyPayGroup + - value: home_location,work_location,manager,pay_group + name: HomeLocationWorkLocationManagerPayGroup + - value: home_location,work_location,manager,team + name: HomeLocationWorkLocationManagerTeam + - value: home_location,work_location,manager,team,company + name: HomeLocationWorkLocationManagerTeamCompany + - value: home_location,work_location,manager,team,company,pay_group + name: HomeLocationWorkLocationManagerTeamCompanyPayGroup + - value: home_location,work_location,manager,team,pay_group + name: HomeLocationWorkLocationManagerTeamPayGroup + - value: home_location,work_location,pay_group + name: HomeLocationWorkLocationPayGroup + - value: home_location,work_location,team + name: HomeLocationWorkLocationTeam + - value: home_location,work_location,team,company + name: HomeLocationWorkLocationTeamCompany + - value: home_location,work_location,team,company,pay_group + name: HomeLocationWorkLocationTeamCompanyPayGroup + - value: home_location,work_location,team,pay_group + name: HomeLocationWorkLocationTeamPayGroup + - manager + - value: manager,company + name: ManagerCompany + - value: manager,company,pay_group + name: ManagerCompanyPayGroup + - value: manager,pay_group + name: ManagerPayGroup + - value: manager,team + name: ManagerTeam + - value: manager,team,company + name: ManagerTeamCompany + - value: manager,team,company,pay_group + name: ManagerTeamCompanyPayGroup + - value: manager,team,pay_group + name: ManagerTeamPayGroup + - pay_group + - team + - value: team,company + name: TeamCompany + - value: team,company,pay_group + name: TeamCompanyPayGroup + - value: team,pay_group + name: TeamPayGroup + - work_location + - value: work_location,company + name: WorkLocationCompany + - value: work_location,company,pay_group + name: WorkLocationCompanyPayGroup + - value: work_location,manager + name: WorkLocationManager + - value: work_location,manager,company + name: WorkLocationManagerCompany + - value: work_location,manager,company,pay_group + name: WorkLocationManagerCompanyPayGroup + - value: work_location,manager,pay_group + name: WorkLocationManagerPayGroup + - value: work_location,manager,team + name: WorkLocationManagerTeam + - value: work_location,manager,team,company + name: WorkLocationManagerTeamCompany + - value: work_location,manager,team,company,pay_group + name: WorkLocationManagerTeamCompanyPayGroup + - value: work_location,manager,team,pay_group + name: WorkLocationManagerTeamPayGroup + - value: work_location,pay_group + name: WorkLocationPayGroup + - value: work_location,team + name: WorkLocationTeam + - value: work_location,team,company + name: WorkLocationTeamCompany + - value: work_location,team,company,pay_group + name: WorkLocationTeamCompanyPayGroup + - value: work_location,team,pay_group + name: WorkLocationTeamPayGroup + source: + openapi: openapi/openapi.yml + EmployeesRetrieveRequestRemoteFields: + enum: + - employment_status + - value: employment_status,ethnicity + name: EmploymentStatusEthnicity + - value: employment_status,ethnicity,gender + name: EmploymentStatusEthnicityGender + - value: employment_status,ethnicity,gender,marital_status + name: EmploymentStatusEthnicityGenderMaritalStatus + - value: employment_status,ethnicity,marital_status + name: EmploymentStatusEthnicityMaritalStatus + - value: employment_status,gender + name: EmploymentStatusGender + - value: employment_status,gender,marital_status + name: EmploymentStatusGenderMaritalStatus + - value: employment_status,marital_status + name: EmploymentStatusMaritalStatus + - ethnicity + - value: ethnicity,gender + name: EthnicityGender + - value: ethnicity,gender,marital_status + name: EthnicityGenderMaritalStatus + - value: ethnicity,marital_status + name: EthnicityMaritalStatus + - gender + - value: gender,marital_status + name: GenderMaritalStatus + - marital_status + source: + openapi: openapi/openapi.yml + EmployeesRetrieveRequestShowEnumOrigins: + enum: + - employment_status + - value: employment_status,ethnicity + name: EmploymentStatusEthnicity + - value: employment_status,ethnicity,gender + name: EmploymentStatusEthnicityGender + - value: employment_status,ethnicity,gender,marital_status + name: EmploymentStatusEthnicityGenderMaritalStatus + - value: employment_status,ethnicity,marital_status + name: EmploymentStatusEthnicityMaritalStatus + - value: employment_status,gender + name: EmploymentStatusGender + - value: employment_status,gender,marital_status + name: EmploymentStatusGenderMaritalStatus + - value: employment_status,marital_status + name: EmploymentStatusMaritalStatus + - ethnicity + - value: ethnicity,gender + name: EthnicityGender + - value: ethnicity,gender,marital_status + name: EthnicityGenderMaritalStatus + - value: ethnicity,marital_status + name: EthnicityMaritalStatus + - gender + - value: gender,marital_status + name: GenderMaritalStatus + - marital_status + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /hris/v1/employees + method: GET + auth: true + docs: Returns a list of `Employee` objects. + source: + openapi: openapi/openapi.yml + request: + name: EmployeesListRequest + query-parameters: + company_id: + type: optional + docs: If provided, will only return employees for this company. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + display_full_name: + type: optional + docs: If provided, will only return employees with this display name. + employment_status: + type: optional + docs: >- + If provided, will only return employees with this employment + status. + + + * `ACTIVE` - ACTIVE + + * `PENDING` - PENDING + + * `INACTIVE` - INACTIVE + employment_type: + type: optional + docs: >- + If provided, will only return employees that have an employment of + the specified employment_type. + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + first_name: + type: optional + docs: If provided, will only return employees with this first name. + groups: + type: optional + docs: >- + If provided, will only return employees matching the group ids; + multiple groups can be separated by commas. + home_location_id: + type: optional + docs: If provided, will only return employees for this home location. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_sensitive_fields: + type: optional + docs: >- + Whether to include sensitive fields (such as social security + numbers) in the response. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + job_title: + type: optional + docs: >- + If provided, will only return employees that have an employment of + the specified job_title. + last_name: + type: optional + docs: If provided, will only return employees with this last name. + manager_id: + type: optional + docs: If provided, will only return employees for this manager. + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + pay_group_id: + type: optional + docs: If provided, will only return employees for this pay group + personal_email: + type: optional + docs: If provided, will only return Employees with this personal email + validation: + format: email + remote_fields: + type: optional + docs: Deprecated. Use show_enum_origins. + remote_id: + type: optional + docs: The API provider's ID for the given object. + show_enum_origins: + type: optional + docs: >- + 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: + type: optional + docs: >- + If provided, will only return employees that started after this + datetime. + started_before: + type: optional + docs: >- + If provided, will only return employees that started before this + datetime. + team_id: + type: optional + docs: If provided, will only return employees for this team. + terminated_after: + type: optional + docs: >- + If provided, will only return employees that were terminated after + this datetime. + terminated_before: + type: optional + docs: >- + If provided, will only return employees that were terminated + before this datetime. + work_email: + type: optional + docs: If provided, will only return Employees with this work email + validation: + format: email + work_location_id: + type: optional + docs: If provided, will only return employees for this location. + response: + docs: '' + type: root.PaginatedEmployeeList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 0958cbc6-6040-430a-848e-aafacbadf4ae + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee_number: '2' + company: company + first_name: Greg + last_name: Hirsch + preferred_name: Greg the egg + display_full_name: Cousin Greg Hirsch + username: cousingreg + groups: + - 21a54124-397f-494d-985e-3c5b330b8a68 + work_email: greg@merge.dev + personal_email: greg@gmail.com + mobile_phone_number: '+1234567890' + employments: + - 17a54124-287f-494d-965e-3c5b330c9a68 + home_location: home_location + work_location: work_location + manager: manager + team: team + pay_group: pay_group + ssn: '1234567890' + gender: MALE + ethnicity: AMERICAN_INDIAN_OR_ALASKA_NATIVE + marital_status: SINGLE + date_of_birth: '1990-11-10T00:00:00Z' + hire_date: '2020-10-10T00:00:00Z' + start_date: '2020-10-11T00:00:00Z' + remote_created_at: '2020-10-11T00:00:00Z' + employment_status: ACTIVE + termination_date: '2021-10-12T00:00:00Z' + avatar: http://alturl.com/h2h8m + custom_fields: + key: value + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /people + data: + - Varies by platform + create: + path: /hris/v1/employees + method: POST + auth: true + docs: Creates an `Employee` object with the given values. + source: + openapi: openapi/openapi.yml + request: + name: EmployeeEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: root.EmployeeRequest + content-type: application/json + response: + docs: '' + type: root.EmployeeResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: 0958cbc6-6040-430a-848e-aafacbadf4ae + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee_number: '2' + company: company + first_name: Greg + last_name: Hirsch + preferred_name: Greg the egg + display_full_name: Cousin Greg Hirsch + username: cousingreg + groups: + - 21a54124-397f-494d-985e-3c5b330b8a68 + work_email: greg@merge.dev + personal_email: greg@gmail.com + mobile_phone_number: '+1234567890' + employments: + - 17a54124-287f-494d-965e-3c5b330c9a68 + home_location: home_location + work_location: work_location + manager: manager + team: team + pay_group: pay_group + ssn: '1234567890' + gender: MALE + ethnicity: AMERICAN_INDIAN_OR_ALASKA_NATIVE + marital_status: SINGLE + date_of_birth: '1990-11-10T00:00:00Z' + hire_date: '2020-10-10T00:00:00Z' + start_date: '2020-10-11T00:00:00Z' + remote_created_at: '2020-10-11T00:00:00Z' + employment_status: ACTIVE + termination_date: '2021-10-12T00:00:00Z' + avatar: http://alturl.com/h2h8m + custom_fields: + key: value + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /people + data: + - Varies by platform + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /hris/v1/employees/{id} + method: GET + auth: true + docs: Returns an `Employee` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: EmployeesRetrieveRequest + query-parameters: + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_sensitive_fields: + type: optional + docs: >- + Whether to include sensitive fields (such as social security + numbers) in the response. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional + docs: >- + 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) + response: + docs: '' + type: root.Employee + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 0958cbc6-6040-430a-848e-aafacbadf4ae + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee_number: '2' + company: company + first_name: Greg + last_name: Hirsch + preferred_name: Greg the egg + display_full_name: Cousin Greg Hirsch + username: cousingreg + groups: + - 21a54124-397f-494d-985e-3c5b330b8a68 + work_email: greg@merge.dev + personal_email: greg@gmail.com + mobile_phone_number: '+1234567890' + employments: + - 17a54124-287f-494d-965e-3c5b330c9a68 + home_location: home_location + work_location: work_location + manager: manager + team: team + pay_group: pay_group + ssn: '1234567890' + gender: MALE + ethnicity: AMERICAN_INDIAN_OR_ALASKA_NATIVE + marital_status: SINGLE + date_of_birth: '1990-11-10T00:00:00Z' + hire_date: '2020-10-10T00:00:00Z' + start_date: '2020-10-11T00:00:00Z' + remote_created_at: '2020-10-11T00:00:00Z' + employment_status: ACTIVE + termination_date: '2021-10-12T00:00:00Z' + avatar: http://alturl.com/h2h8m + custom_fields: + key: value + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /people + data: + - Varies by platform + ignoreCreate: + path: /hris/v1/employees/ignore/{model_id} + method: POST + auth: true + docs: >- + Ignores a specific row based on the `model_id` in the url. These records + will have their properties set to null, and will not be updated in + future syncs. The "reason" and "message" fields in the request body will + be stored for audit purposes. + source: + openapi: openapi/openapi.yml + path-parameters: + model_id: string + request: + name: IgnoreCommonModelRequest + body: + properties: + reason: root.ReasonEnum + message: + type: optional + validation: + minLength: 1 + maxLength: 256 + content-type: application/json + examples: + - path-parameters: + model_id: model_id + headers: {} + request: + reason: GENERAL_CUSTOMER_REQUEST + metaPostRetrieve: + path: /hris/v1/employees/meta/post + method: GET + auth: true + docs: Returns metadata for `Employee` POSTs. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/hris/employerBenefits.yml b/.mock/definition/hris/employerBenefits.yml new file mode 100644 index 0000000..f110617 --- /dev/null +++ b/.mock/definition/hris/employerBenefits.yml @@ -0,0 +1,140 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /hris/v1/employer-benefits + method: GET + auth: true + docs: Returns a list of `EmployerBenefit` objects. + source: + openapi: openapi/openapi.yml + request: + name: EmployerBenefitsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: root.PaginatedEmployerBenefitList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 025fjlc6-6000-430a-848e-aafacbadf4fele + remote_id: '19202939' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + benefit_plan_type: MEDICAL + name: Kaiser Permanente Medical Plan + description: HDHP Silver Plan + deduction_code: COL + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + retrieve: + path: /hris/v1/employer-benefits/{id} + method: GET + auth: true + docs: Returns an `EmployerBenefit` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: EmployerBenefitsRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.EmployerBenefit + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 025fjlc6-6000-430a-848e-aafacbadf4fele + remote_id: '19202939' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + benefit_plan_type: MEDICAL + name: Kaiser Permanente Medical Plan + description: HDHP Silver Plan + deduction_code: COL + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + data: + key: value + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/hris/employments.yml b/.mock/definition/hris/employments.yml new file mode 100644 index 0000000..f676c7d --- /dev/null +++ b/.mock/definition/hris/employments.yml @@ -0,0 +1,337 @@ +types: + EmploymentsListRequestExpand: + enum: + - employee + - value: employee,pay_group + name: EmployeePayGroup + - pay_group + source: + openapi: openapi/openapi.yml + EmploymentsListRequestOrderBy: + enum: + - value: '-effective_date' + name: EffectiveDateDescending + - value: effective_date + name: EffectiveDateAscending + source: + openapi: openapi/openapi.yml + EmploymentsListRequestRemoteFields: + enum: + - employment_type + - value: employment_type,flsa_status + name: EmploymentTypeFlsaStatus + - value: employment_type,flsa_status,pay_frequency + name: EmploymentTypeFlsaStatusPayFrequency + - value: employment_type,flsa_status,pay_frequency,pay_period + name: EmploymentTypeFlsaStatusPayFrequencyPayPeriod + - value: employment_type,flsa_status,pay_period + name: EmploymentTypeFlsaStatusPayPeriod + - value: employment_type,pay_frequency + name: EmploymentTypePayFrequency + - value: employment_type,pay_frequency,pay_period + name: EmploymentTypePayFrequencyPayPeriod + - value: employment_type,pay_period + name: EmploymentTypePayPeriod + - flsa_status + - value: flsa_status,pay_frequency + name: FlsaStatusPayFrequency + - value: flsa_status,pay_frequency,pay_period + name: FlsaStatusPayFrequencyPayPeriod + - value: flsa_status,pay_period + name: FlsaStatusPayPeriod + - pay_frequency + - value: pay_frequency,pay_period + name: PayFrequencyPayPeriod + - pay_period + source: + openapi: openapi/openapi.yml + EmploymentsListRequestShowEnumOrigins: + enum: + - employment_type + - value: employment_type,flsa_status + name: EmploymentTypeFlsaStatus + - value: employment_type,flsa_status,pay_frequency + name: EmploymentTypeFlsaStatusPayFrequency + - value: employment_type,flsa_status,pay_frequency,pay_period + name: EmploymentTypeFlsaStatusPayFrequencyPayPeriod + - value: employment_type,flsa_status,pay_period + name: EmploymentTypeFlsaStatusPayPeriod + - value: employment_type,pay_frequency + name: EmploymentTypePayFrequency + - value: employment_type,pay_frequency,pay_period + name: EmploymentTypePayFrequencyPayPeriod + - value: employment_type,pay_period + name: EmploymentTypePayPeriod + - flsa_status + - value: flsa_status,pay_frequency + name: FlsaStatusPayFrequency + - value: flsa_status,pay_frequency,pay_period + name: FlsaStatusPayFrequencyPayPeriod + - value: flsa_status,pay_period + name: FlsaStatusPayPeriod + - pay_frequency + - value: pay_frequency,pay_period + name: PayFrequencyPayPeriod + - pay_period + source: + openapi: openapi/openapi.yml + EmploymentsRetrieveRequestExpand: + enum: + - employee + - value: employee,pay_group + name: EmployeePayGroup + - pay_group + source: + openapi: openapi/openapi.yml + EmploymentsRetrieveRequestRemoteFields: + enum: + - employment_type + - value: employment_type,flsa_status + name: EmploymentTypeFlsaStatus + - value: employment_type,flsa_status,pay_frequency + name: EmploymentTypeFlsaStatusPayFrequency + - value: employment_type,flsa_status,pay_frequency,pay_period + name: EmploymentTypeFlsaStatusPayFrequencyPayPeriod + - value: employment_type,flsa_status,pay_period + name: EmploymentTypeFlsaStatusPayPeriod + - value: employment_type,pay_frequency + name: EmploymentTypePayFrequency + - value: employment_type,pay_frequency,pay_period + name: EmploymentTypePayFrequencyPayPeriod + - value: employment_type,pay_period + name: EmploymentTypePayPeriod + - flsa_status + - value: flsa_status,pay_frequency + name: FlsaStatusPayFrequency + - value: flsa_status,pay_frequency,pay_period + name: FlsaStatusPayFrequencyPayPeriod + - value: flsa_status,pay_period + name: FlsaStatusPayPeriod + - pay_frequency + - value: pay_frequency,pay_period + name: PayFrequencyPayPeriod + - pay_period + source: + openapi: openapi/openapi.yml + EmploymentsRetrieveRequestShowEnumOrigins: + enum: + - employment_type + - value: employment_type,flsa_status + name: EmploymentTypeFlsaStatus + - value: employment_type,flsa_status,pay_frequency + name: EmploymentTypeFlsaStatusPayFrequency + - value: employment_type,flsa_status,pay_frequency,pay_period + name: EmploymentTypeFlsaStatusPayFrequencyPayPeriod + - value: employment_type,flsa_status,pay_period + name: EmploymentTypeFlsaStatusPayPeriod + - value: employment_type,pay_frequency + name: EmploymentTypePayFrequency + - value: employment_type,pay_frequency,pay_period + name: EmploymentTypePayFrequencyPayPeriod + - value: employment_type,pay_period + name: EmploymentTypePayPeriod + - flsa_status + - value: flsa_status,pay_frequency + name: FlsaStatusPayFrequency + - value: flsa_status,pay_frequency,pay_period + name: FlsaStatusPayFrequencyPayPeriod + - value: flsa_status,pay_period + name: FlsaStatusPayPeriod + - pay_frequency + - value: pay_frequency,pay_period + name: PayFrequencyPayPeriod + - pay_period + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /hris/v1/employments + method: GET + auth: true + docs: Returns a list of `Employment` objects. + source: + openapi: openapi/openapi.yml + request: + name: EmploymentsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + employee_id: + type: optional + docs: If provided, will only return employments for this employee. + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + order_by: + type: optional + docs: >- + Overrides the default ordering for this endpoint. Possible values + include: effective_date, -effective_date. + page_size: + type: optional + docs: Number of results to return per page. + remote_fields: + type: optional + docs: Deprecated. Use show_enum_origins. + remote_id: + type: optional + docs: The API provider's ID for the given object. + show_enum_origins: + type: optional + docs: >- + 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) + response: + docs: '' + type: root.PaginatedEmploymentList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 65d8ffd0-211b-4ba4-b85a-fbe2ce220982 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee: employee + job_title: Executive Assistant to Tom Wambsgans + pay_rate: 1.1 + pay_period: HOUR + pay_frequency: WEEKLY + pay_currency: XUA + pay_group: pay_group + flsa_status: EXEMPT + effective_date: '2023-10-06T18:42:34Z' + employment_type: FULL_TIME + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /jobs + data: + - Varies by platform + retrieve: + path: /hris/v1/employments/{id} + method: GET + auth: true + docs: Returns an `Employment` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: EmploymentsRetrieveRequest + query-parameters: + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional + docs: >- + 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) + response: + docs: '' + type: root.Employment + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 65d8ffd0-211b-4ba4-b85a-fbe2ce220982 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee: employee + job_title: Executive Assistant to Tom Wambsgans + pay_rate: 1.1 + pay_period: HOUR + pay_frequency: WEEKLY + pay_currency: XUA + pay_group: pay_group + flsa_status: EXEMPT + effective_date: '2023-10-06T18:42:34Z' + employment_type: FULL_TIME + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /jobs + data: + - Varies by platform + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/hris/fieldMapping.yml b/.mock/definition/hris/fieldMapping.yml new file mode 100644 index 0000000..2c83b14 --- /dev/null +++ b/.mock/definition/hris/fieldMapping.yml @@ -0,0 +1,892 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + field_mappings_retrieve: + path: /hris/v1/field-mappings + method: GET + auth: true + docs: >- + Get all Field Mappings for this Linked Account. Field Mappings are + mappings between third-party Remote Fields and user defined Merge + fields. [Learn + more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). + source: + openapi: openapi/openapi.yml + request: + name: FieldMappingsRetrieveRequest + query-parameters: + exclude_remote_field_metadata: + type: optional + docs: >- + If `true`, remote fields metadata is excluded from each field + mapping instance (i.e. `remote_fields.remote_key_name` and + `remote_fields.schema` will be null). This will increase the speed + of the request since these fields require some calculations. + response: + docs: '' + type: root.FieldMappingApiInstanceResponse + status-code: 200 + examples: + - headers: {} + response: + body: + Benefit: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + EmployerBenefit: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Company: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + EmployeePayrollRun: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Employee: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Employment: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Location: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + PayrollRun: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Team: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + TimeOff: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + TimeOffBalance: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + BankInfo: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + PayGroup: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Group: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Dependent: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + TimesheetEntry: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + field_mappings_create: + path: /hris/v1/field-mappings + method: POST + auth: true + docs: >- + Create new Field Mappings that will be available after the next + scheduled sync. This will cause the next sync for this Linked Account to + sync **ALL** data from start. + source: + openapi: openapi/openapi.yml + request: + name: CreateFieldMappingRequest + query-parameters: + exclude_remote_field_metadata: + type: optional + docs: >- + If `true`, remote fields metadata is excluded from each field + mapping instance (i.e. `remote_fields.remote_key_name` and + `remote_fields.schema` will be null). This will increase the speed + of the request since these fields require some calculations. + body: + properties: + target_field_name: + type: string + docs: >- + The name of the target field you want this remote field to map + to. + validation: + minLength: 1 + target_field_description: + type: string + docs: >- + The description of the target field you want this remote field + to map to. + validation: + minLength: 1 + remote_field_traversal_path: + docs: >- + The field traversal path of the remote field listed when you hit + the GET /remote-fields endpoint. + type: list + remote_method: + type: string + docs: >- + The method of the remote endpoint where the remote field is + coming from. + validation: + minLength: 1 + remote_url_path: + type: string + docs: >- + The path of the remote endpoint where the remote field is coming + from. + validation: + minLength: 1 + common_model_name: + type: string + docs: >- + The name of the Common Model that the remote field corresponds + to in a given category. + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: root.FieldMappingInstanceResponse + status-code: 201 + examples: + - headers: {} + request: + target_field_name: example_target_field_name + target_field_description: this is a example description of the target field + remote_field_traversal_path: + - example_remote_field + remote_method: GET + remote_url_path: /example-url-path + common_model_name: ExampleCommonModel + response: + body: + model: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + field_mappings_destroy: + path: /hris/v1/field-mappings/{field_mapping_id} + method: DELETE + auth: true + docs: >- + Deletes Field Mappings for a Linked Account. All data related to this + Field Mapping will be deleted and these changes will be reflected after + the next scheduled sync. This will cause the next sync for this Linked + Account to sync **ALL** data from start. + source: + openapi: openapi/openapi.yml + path-parameters: + field_mapping_id: string + response: + docs: '' + type: root.FieldMappingInstanceResponse + status-code: 204 + examples: + - path-parameters: + field_mapping_id: field_mapping_id + headers: {} + response: + body: + model: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + field_mappings_partial_update: + path: /hris/v1/field-mappings/{field_mapping_id} + method: PATCH + auth: true + docs: >- + Create or update existing Field Mappings for a Linked Account. Changes + will be reflected after the next scheduled sync. This will cause the + next sync for this Linked Account to sync **ALL** data from start. + source: + openapi: openapi/openapi.yml + path-parameters: + field_mapping_id: string + request: + name: PatchedEditFieldMappingRequest + body: + properties: + remote_field_traversal_path: + type: optional> + docs: >- + The field traversal path of the remote field listed when you hit + the GET /remote-fields endpoint. + remote_method: + type: optional + docs: >- + The method of the remote endpoint where the remote field is + coming from. + validation: + minLength: 1 + remote_url_path: + type: optional + docs: >- + The path of the remote endpoint where the remote field is coming + from. + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: root.FieldMappingInstanceResponse + status-code: 200 + examples: + - path-parameters: + field_mapping_id: field_mapping_id + headers: {} + request: {} + response: + body: + model: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + remote_fields_retrieve: + path: /hris/v1/remote-fields + method: GET + auth: true + docs: >- + Get all remote fields for a Linked Account. Remote fields are + third-party fields that are accessible after initial sync if remote_data + is enabled. You can use remote fields to override existing Merge fields + or map a new Merge field. [Learn + more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). + source: + openapi: openapi/openapi.yml + request: + name: RemoteFieldsRetrieveRequest + query-parameters: + common_models: + type: optional + docs: >- + A comma seperated list of Common Model names. If included, will + only return Remote Fields for those Common Models. + include_example_values: + type: optional + docs: >- + If true, will include example values, where available, for remote + fields in the 3rd party platform. These examples come from active + data from your customers. + response: + docs: '' + type: root.RemoteFieldApiResponse + status-code: 200 + examples: + - headers: {} + response: + body: + Benefit: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + EmployerBenefit: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Company: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + EmployeePayrollRun: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Employee: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Employment: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Location: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + PayrollRun: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Team: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + TimeOff: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + TimeOffBalance: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + BankInfo: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + PayGroup: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Group: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Dependent: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + TimesheetEntry: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + target_fields_retrieve: + path: /hris/v1/target-fields + method: GET + auth: true + docs: >- + Get all organization-wide Target Fields, this will not include any + Linked Account specific Target Fields. Organization-wide Target Fields + are additional fields appended to the Merge Common Model for all Linked + Accounts in a category. [Learn + more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.ExternalTargetFieldApiResponse + status-code: 200 + examples: + - headers: {} + response: + body: + Benefit: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + EmployerBenefit: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Company: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + EmployeePayrollRun: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Employee: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Employment: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Location: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + PayrollRun: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Team: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + TimeOff: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + TimeOffBalance: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + BankInfo: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + PayGroup: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Group: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Dependent: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + TimesheetEntry: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/hris/forceResync.yml b/.mock/definition/hris/forceResync.yml new file mode 100644 index 0000000..ccae8e7 --- /dev/null +++ b/.mock/definition/hris/forceResync.yml @@ -0,0 +1,37 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + sync_status_resync_create: + path: /hris/v1/sync-status/resync + method: POST + auth: true + docs: >- + Force re-sync of all models. This endpoint is available for monthly, + quarterly, and highest sync frequency customers on the Professional or + Enterprise plans. Doing so will consume a sync credit for the relevant + linked account. Force re-syncs can also be triggered manually in the + Merge Dashboard and is available for all customers. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: list + status-code: 200 + examples: + - headers: {} + response: + body: + - model_name: Employee + model_id: hris.Employee + last_sync_start: '2021-03-30T19:44:18Z' + next_sync_start: '2021-03-30T20:44:18Z' + last_sync_result: SYNCING + last_sync_finished: '2021-03-30T19:55:18Z' + status: SYNCING + is_initial_sync: true + selective_sync_configurations_usage: IN_NEXT_SYNC + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/hris/generateKey.yml b/.mock/definition/hris/generateKey.yml new file mode 100644 index 0000000..94a399f --- /dev/null +++ b/.mock/definition/hris/generateKey.yml @@ -0,0 +1,36 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /hris/v1/generate-key + method: POST + auth: true + docs: Create a remote key. + source: + openapi: openapi/openapi.yml + request: + name: GenerateRemoteKeyRequest + body: + properties: + name: + type: string + docs: The name of the remote key + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: root.RemoteKey + status-code: 200 + examples: + - request: + name: Remote Deployment Key 1 + response: + body: + name: Remote Deployment Key 1 + key: hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/hris/groups.yml b/.mock/definition/hris/groups.yml new file mode 100644 index 0000000..942ebed --- /dev/null +++ b/.mock/definition/hris/groups.yml @@ -0,0 +1,179 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /hris/v1/groups + method: GET + auth: true + docs: Returns a list of `Group` objects. + source: + openapi: openapi/openapi.yml + request: + name: GroupsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_commonly_used_as_team: + type: optional + docs: >- + If provided, specifies whether to return only Group objects which + refer to a team in the third party platform. Note that this is an + opinionated view based on how a team may be represented in the + third party platform. + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + names: + type: optional + docs: >- + If provided, will only return groups with these names. Multiple + values can be separated by commas. + page_size: + type: optional + docs: Number of results to return per page. + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + remote_id: + type: optional + docs: The API provider's ID for the given object. + show_enum_origins: + type: optional> + docs: >- + 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: + type: optional + docs: >- + If provided, will only return groups of these types. Multiple + values can be separated by commas. + response: + docs: '' + type: root.PaginatedGroupList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 134e0111-0f67-44f6-98f0-597000290bb3 + remote_id: '800293' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + parent_group: 2ef51b11-2c4e-4b02-8d1d-50592d9e96ef + name: COST_CENTER_US + type: TEAM + is_commonly_used_as_team: true + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /group + data: + - Varies by platform + retrieve: + path: /hris/v1/groups/{id} + method: GET + auth: true + docs: Returns a `Group` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: GroupsRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: root.Group + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 134e0111-0f67-44f6-98f0-597000290bb3 + remote_id: '800293' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + parent_group: 2ef51b11-2c4e-4b02-8d1d-50592d9e96ef + name: COST_CENTER_US + type: TEAM + is_commonly_used_as_team: true + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /group + data: + - Varies by platform + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/hris/issues.yml b/.mock/definition/hris/issues.yml new file mode 100644 index 0000000..9fd39ae --- /dev/null +++ b/.mock/definition/hris/issues.yml @@ -0,0 +1,129 @@ +types: + IssuesListRequestStatus: + enum: + - ONGOING + - RESOLVED + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /hris/v1/issues + method: GET + auth: true + docs: Gets all issues for Organization. + source: + openapi: openapi/openapi.yml + request: + name: IssuesListRequest + query-parameters: + account_token: optional + cursor: + type: optional + docs: The pagination cursor value. + end_date: + type: optional + docs: >- + If included, will only include issues whose most recent action + occurred before this time + end_user_organization_name: optional + first_incident_time_after: + type: optional + docs: >- + If provided, will only return issues whose first incident time was + after this datetime. + first_incident_time_before: + type: optional + docs: >- + If provided, will only return issues whose first incident time was + before this datetime. + include_muted: + type: optional + docs: If true, will include muted issues + integration_name: optional + last_incident_time_after: + type: optional + docs: >- + If provided, will only return issues whose last incident time was + after this datetime. + last_incident_time_before: + type: optional + docs: >- + If provided, will only return issues whose last incident time was + before this datetime. + linked_account_id: + type: optional + docs: >- + If provided, will only include issues pertaining to the linked + account passed in. + page_size: + type: optional + docs: Number of results to return per page. + start_date: + type: optional + docs: >- + If included, will only include issues whose most recent action + occurred after this time + status: + type: optional + docs: |- + Status of the issue. Options: ('ONGOING', 'RESOLVED') + + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + response: + docs: '' + type: root.PaginatedIssueList + status-code: 200 + examples: + - response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + status: ONGOING + error_description: Missing Permissions + end_user: + key: value + first_incident_time: '2022-12-05T16:19:15Z' + last_incident_time: '2022-12-05T16:19:15Z' + is_muted: true + error_details: + - Missing employee permissions. + - Missing time off permissions. + retrieve: + path: /hris/v1/issues/{id} + method: GET + auth: true + docs: Get a specific issue. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + response: + docs: '' + type: root.Issue + status-code: 200 + examples: + - path-parameters: + id: id + response: + body: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + status: ONGOING + error_description: Missing Permissions + end_user: + key: value + first_incident_time: '2022-12-05T16:19:15Z' + last_incident_time: '2022-12-05T16:19:15Z' + is_muted: true + error_details: + - Missing employee permissions. + - Missing time off permissions. + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/hris/linkToken.yml b/.mock/definition/hris/linkToken.yml new file mode 100644 index 0000000..1e78c2e --- /dev/null +++ b/.mock/definition/hris/linkToken.yml @@ -0,0 +1,135 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /hris/v1/link-token + method: POST + auth: true + docs: Creates a link token to be used when linking a new end user. + source: + openapi: openapi/openapi.yml + request: + name: EndUserDetailsRequest + body: + properties: + end_user_email_address: + type: string + docs: >- + Your end user's email address. This is purely for identification + purposes - setting this value will not cause any emails to be + sent. + validation: + minLength: 1 + maxLength: 100 + end_user_organization_name: + type: string + docs: Your end user's organization. + validation: + minLength: 1 + maxLength: 100 + end_user_origin_id: + type: string + docs: >- + This unique identifier typically represents the ID for your end + user in your product's database. This value must be distinct + from other Linked Accounts' unique identifiers. + validation: + minLength: 1 + maxLength: 100 + categories: + docs: The integration categories to show in Merge Link. + type: list + integration: + type: optional + docs: >- + The slug of a specific pre-selected integration for this linking + flow token. For examples of slugs, see + https://docs.merge.dev/guides/merge-link/single-integration/. + validation: + minLength: 1 + link_expiry_mins: + type: optional + docs: >- + An integer number of minutes between [30, 720 or 10080 if for a + Magic Link URL] for how long this token is valid. Defaults to + 30. + default: 30 + validation: + min: 30 + max: 10080 + should_create_magic_link_url: + type: optional + docs: >- + Whether to generate a Magic Link URL. Defaults to false. For + more information on Magic Link, see + https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. + default: false + hide_admin_magic_link: + type: optional + docs: >- + Whether to generate a Magic Link URL on the Admin Needed screen + during the linking flow. Defaults to false. For more information + on Magic Link, see + https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. + default: false + common_models: + type: optional> + docs: >- + An array of objects to specify the models and fields that will + be disabled for a given Linked Account. Each object uses + model_id, enabled_actions, and disabled_fields to specify the + model, method, and fields that are scoped for a given Linked + Account. + category_common_model_scopes: + type: >- + optional>>> + docs: >- + 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: + type: optional + docs: >- + The following subset of IETF language tags can be used to + configure localization. + + + * `en` - en + + * `de` - de + are_syncs_disabled: + type: optional + docs: >- + The boolean that indicates whether initial, periodic, and force + syncs will be disabled. + default: false + integration_specific_config: + type: optional> + docs: >- + A JSON object containing integration-specific configuration + options. + content-type: application/json + response: + docs: '' + type: root.LinkToken + status-code: 200 + examples: + - request: + end_user_email_address: example@gmail.com + end_user_organization_name: Test Organization + end_user_origin_id: '12345' + categories: + - hris + - ats + response: + body: + link_token: necdP7FtdASl1fQwm62be2_dM4wBG8_GactqoUV0 + integration_name: Lever + magic_link_url: https://link.merge.dev/asdfjkl12345jsndfgi2i83n + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/hris/linkedAccounts.yml b/.mock/definition/hris/linkedAccounts.yml new file mode 100644 index 0000000..3ed6393 --- /dev/null +++ b/.mock/definition/hris/linkedAccounts.yml @@ -0,0 +1,150 @@ +types: + LinkedAccountsListRequestCategory: + enum: + - accounting + - ats + - crm + - filestorage + - hris + - mktg + - ticketing + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /hris/v1/linked-accounts + method: GET + auth: true + docs: List linked accounts for your organization. + source: + openapi: openapi/openapi.yml + request: + name: LinkedAccountsListRequest + query-parameters: + category: + type: optional + docs: >- + Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, + `mktg`, `ticketing` + + + * `hris` - hris + + * `ats` - ats + + * `accounting` - accounting + + * `ticketing` - ticketing + + * `crm` - crm + + * `mktg` - mktg + + * `filestorage` - filestorage + cursor: + type: optional + docs: The pagination cursor value. + end_user_email_address: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given email address. + end_user_organization_name: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given organization name. + end_user_origin_id: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given origin ID. + end_user_origin_ids: + type: optional + docs: >- + Comma-separated list of EndUser origin IDs, making it possible to + specify multiple EndUsers at once. + id: + type: optional + validation: + format: uuid + ids: + type: optional + docs: >- + Comma-separated list of LinkedAccount IDs, making it possible to + specify multiple LinkedAccounts at once. + include_duplicates: + type: optional + docs: >- + If `true`, will include complete production duplicates of the + account specified by the `id` query parameter in the response. + `id` must be for a complete production linked account. + integration_name: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given integration name. + is_test_account: + type: optional + docs: >- + If included, will only include test linked accounts. If not + included, will only include non-test linked accounts. + page_size: + type: optional + docs: Number of results to return per page. + status: + type: optional + docs: >- + Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, + `RELINK_NEEDED` + response: + docs: '' + type: root.PaginatedAccountDetailsAndActionsList + status-code: 200 + examples: + - response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: e59b1821-f85c-4e28-a6b3-1804156f3563 + category: hris + status: COMPLETE + status_detail: Invalid login credentials + end_user_origin_id: 3ac95cde-6c7f-4eef-afec-be710b42308d + end_user_organization_name: Foo Bar, LLC + end_user_email_address: hradmin@foobar.dev + subdomain: foobar + webhook_listener_url: >- + https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 + is_duplicate: true + integration: + name: name + categories: + - hris + color: color + slug: slug + passthrough_available: true + available_model_operations: + - model_name: Candidate + available_operations: + - FETCH + - CREATE + required_post_parameters: + - remote_user_id + supported_fields: + - first_name + - last_name + - company + - title + account_type: PRODUCTION + completed_at: '2024-08-26T20:11:19Z' + integration_specific_fields: + integration_specific_field: Varies by platform + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/hris/locations.yml b/.mock/definition/hris/locations.yml new file mode 100644 index 0000000..a4c2f9b --- /dev/null +++ b/.mock/definition/hris/locations.yml @@ -0,0 +1,218 @@ +types: + LocationsListRequestLocationType: + enum: + - HOME + - WORK + source: + openapi: openapi/openapi.yml + LocationsListRequestRemoteFields: + enum: + - country + - value: country,location_type + name: CountryLocationType + - location_type + source: + openapi: openapi/openapi.yml + LocationsListRequestShowEnumOrigins: + enum: + - country + - value: country,location_type + name: CountryLocationType + - location_type + source: + openapi: openapi/openapi.yml + LocationsRetrieveRequestRemoteFields: + enum: + - country + - value: country,location_type + name: CountryLocationType + - location_type + source: + openapi: openapi/openapi.yml + LocationsRetrieveRequestShowEnumOrigins: + enum: + - country + - value: country,location_type + name: CountryLocationType + - location_type + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /hris/v1/locations + method: GET + auth: true + docs: Returns a list of `Location` objects. + source: + openapi: openapi/openapi.yml + request: + name: LocationsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + location_type: + type: optional + docs: |- + If provided, will only return locations with this location_type + + * `HOME` - HOME + * `WORK` - WORK + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_fields: + type: optional + docs: Deprecated. Use show_enum_origins. + remote_id: + type: optional + docs: The API provider's ID for the given object. + show_enum_origins: + type: optional + docs: >- + 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) + response: + docs: '' + type: root.PaginatedLocationList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: f5e6a151-f44e-449a-afb1-8fd781905958 + remote_id: '93018402' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: NYC Office + phone_number: '+1111111111' + street_1: 2920 Broadway + street_2: 2nd Floor + city: 'New York ' + state: NY + zip_code: '10027' + country: AF + location_type: HOME + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /locations + data: + - Varies by platform + retrieve: + path: /hris/v1/locations/{id} + method: GET + auth: true + docs: Returns a `Location` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: LocationsRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional + docs: >- + 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) + response: + docs: '' + type: root.Location + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: f5e6a151-f44e-449a-afb1-8fd781905958 + remote_id: '93018402' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: NYC Office + phone_number: '+1111111111' + street_1: 2920 Broadway + street_2: 2nd Floor + city: 'New York ' + state: NY + zip_code: '10027' + country: AF + location_type: HOME + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /locations + data: + - Varies by platform + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/hris/passthrough.yml b/.mock/definition/hris/passthrough.yml new file mode 100644 index 0000000..602b2cd --- /dev/null +++ b/.mock/definition/hris/passthrough.yml @@ -0,0 +1,40 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /hris/v1/passthrough + method: POST + auth: true + docs: Pull data from an endpoint not currently supported by Merge. + source: + openapi: openapi/openapi.yml + request: + body: root.DataPassthroughRequest + content-type: application/json + response: + docs: '' + type: root.RemoteResponse + status-code: 200 + examples: + - headers: {} + request: + method: GET + path: /scooters + response: + body: + method: GET + path: /scooters + status: 200 + response: + key: value + response_headers: + X-Page-Token: value + response_type: JSON + headers: + EXTRA-HEADER: value + Authorization: + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/hris/payGroups.yml b/.mock/definition/hris/payGroups.yml new file mode 100644 index 0000000..981803d --- /dev/null +++ b/.mock/definition/hris/payGroups.yml @@ -0,0 +1,136 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /hris/v1/pay-groups + method: GET + auth: true + docs: Returns a list of `PayGroup` objects. + source: + openapi: openapi/openapi.yml + request: + name: PayGroupsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: root.PaginatedPayGroupList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: fd1e0fb5-8f92-4ec9-9f32-179cf732867d + remote_id: '800293' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + pay_group_name: contractor + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /pay-group + data: + - Varies by platform + retrieve: + path: /hris/v1/pay-groups/{id} + method: GET + auth: true + docs: Returns a `PayGroup` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: PayGroupsRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.PayGroup + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: fd1e0fb5-8f92-4ec9-9f32-179cf732867d + remote_id: '800293' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + pay_group_name: contractor + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /pay-group + data: + - Varies by platform + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/hris/payrollRuns.yml b/.mock/definition/hris/payrollRuns.yml new file mode 100644 index 0000000..b4414e4 --- /dev/null +++ b/.mock/definition/hris/payrollRuns.yml @@ -0,0 +1,243 @@ +types: + PayrollRunsListRequestRemoteFields: + enum: + - run_state + - value: run_state,run_type + name: RunStateRunType + - run_type + source: + openapi: openapi/openapi.yml + PayrollRunsListRequestRunType: + enum: + - CORRECTION + - OFF_CYCLE + - REGULAR + - SIGN_ON_BONUS + - TERMINATION + source: + openapi: openapi/openapi.yml + PayrollRunsListRequestShowEnumOrigins: + enum: + - run_state + - value: run_state,run_type + name: RunStateRunType + - run_type + source: + openapi: openapi/openapi.yml + PayrollRunsRetrieveRequestRemoteFields: + enum: + - run_state + - value: run_state,run_type + name: RunStateRunType + - run_type + source: + openapi: openapi/openapi.yml + PayrollRunsRetrieveRequestShowEnumOrigins: + enum: + - run_state + - value: run_state,run_type + name: RunStateRunType + - run_type + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /hris/v1/payroll-runs + method: GET + auth: true + docs: Returns a list of `PayrollRun` objects. + source: + openapi: openapi/openapi.yml + request: + name: PayrollRunsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + ended_after: + type: optional + docs: >- + If provided, will only return payroll runs ended after this + datetime. + ended_before: + type: optional + docs: >- + If provided, will only return payroll runs ended before this + datetime. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_fields: + type: optional + docs: Deprecated. Use show_enum_origins. + remote_id: + type: optional + docs: The API provider's ID for the given object. + run_type: + type: optional + docs: >- + If provided, will only return PayrollRun's with this status. + Options: ('REGULAR', 'OFF_CYCLE', 'CORRECTION', 'TERMINATION', + 'SIGN_ON_BONUS') + + + * `REGULAR` - REGULAR + + * `OFF_CYCLE` - OFF_CYCLE + + * `CORRECTION` - CORRECTION + + * `TERMINATION` - TERMINATION + + * `SIGN_ON_BONUS` - SIGN_ON_BONUS + show_enum_origins: + type: optional + docs: >- + 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: + type: optional + docs: >- + If provided, will only return payroll runs started after this + datetime. + started_before: + type: optional + docs: >- + If provided, will only return payroll runs started before this + datetime. + response: + docs: '' + type: root.PaginatedPayrollRunList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 37336947-b3d4-4a4c-a310-ab6ab510e079 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + run_state: PAID + run_type: REGULAR + start_date: '2020-11-08T00:00:00Z' + end_date: '2020-11-15T00:00:00Z' + check_date: '2020-11-15T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /payroll + data: + - Varies by platform + retrieve: + path: /hris/v1/payroll-runs/{id} + method: GET + auth: true + docs: Returns a `PayrollRun` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: PayrollRunsRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional + docs: >- + 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) + response: + docs: '' + type: root.PayrollRun + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 37336947-b3d4-4a4c-a310-ab6ab510e079 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + run_state: PAID + run_type: REGULAR + start_date: '2020-11-08T00:00:00Z' + end_date: '2020-11-15T00:00:00Z' + check_date: '2020-11-15T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /payroll + data: + - Varies by platform + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/hris/regenerateKey.yml b/.mock/definition/hris/regenerateKey.yml new file mode 100644 index 0000000..e29e77d --- /dev/null +++ b/.mock/definition/hris/regenerateKey.yml @@ -0,0 +1,36 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /hris/v1/regenerate-key + method: POST + auth: true + docs: Exchange remote keys. + source: + openapi: openapi/openapi.yml + request: + name: RemoteKeyForRegenerationRequest + body: + properties: + name: + type: string + docs: The name of the remote key + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: root.RemoteKey + status-code: 200 + examples: + - request: + name: Remote Deployment Key 1 + response: + body: + name: Remote Deployment Key 1 + key: hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/hris/scopes.yml b/.mock/definition/hris/scopes.yml new file mode 100644 index 0000000..59ec6a7 --- /dev/null +++ b/.mock/definition/hris/scopes.yml @@ -0,0 +1,160 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + default_scopes_retrieve: + path: /hris/v1/default-scopes + method: GET + auth: true + docs: >- + 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/5950052-common-model-and-field-scopes). + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.CommonModelScopeApi + status-code: 200 + examples: + - response: + body: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - created_at + - custom_fields + - date_of_birth + - first_name + - gender + - remote_created_at + - remote_data + disabled_fields: + - company + - employments + - groups + - home_location + - manager + - work_location + linked_account_scopes_retrieve: + path: /hris/v1/linked-account-scopes + method: GET + auth: true + docs: >- + Get all available permissions for Merge Common Models and fields for a + single Linked Account. [Learn + more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.CommonModelScopeApi + status-code: 200 + examples: + - headers: {} + response: + body: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - created_at + - custom_fields + - date_of_birth + - first_name + - gender + - remote_created_at + - remote_data + disabled_fields: + - company + - employments + - groups + - home_location + - manager + - work_location + linked_account_scopes_create: + path: /hris/v1/linked-account-scopes + method: POST + auth: true + docs: >- + 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/5950052-common-model-and-field-scopes) + source: + openapi: openapi/openapi.yml + request: + name: LinkedAccountCommonModelScopeDeserializerRequest + body: + properties: + common_models: + docs: The common models you want to update the scopes for + type: list + content-type: application/json + response: + docs: '' + type: root.CommonModelScopeApi + status-code: 200 + examples: + - headers: {} + request: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - home_location + disabled_fields: + - work_location + - model_name: Benefit + model_permissions: + WRITE: + is_enabled: false + response: + body: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - created_at + - custom_fields + - date_of_birth + - first_name + - gender + - remote_created_at + - remote_data + disabled_fields: + - company + - employments + - groups + - home_location + - manager + - work_location + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/hris/syncStatus.yml b/.mock/definition/hris/syncStatus.yml new file mode 100644 index 0000000..c7e03e6 --- /dev/null +++ b/.mock/definition/hris/syncStatus.yml @@ -0,0 +1,55 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /hris/v1/sync-status + method: GET + auth: true + docs: >- + Get sync status for the current sync and the most recently finished + sync. `last_sync_start` represents the most recent time any sync began. + `last_sync_finished` represents the most recent time any sync completed. + These timestamps may correspond to different sync instances which may + result in a sync start time being later than a separate sync completed + time. To ensure you are retrieving the latest available data reference + the `last_sync_finished` timestamp where `last_sync_result` is `DONE`. + Possible values for `status` and `last_sync_result` are `DISABLED`, + `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more + about sync status in our [Help + Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). + source: + openapi: openapi/openapi.yml + request: + name: SyncStatusListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: root.PaginatedSyncStatusList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - model_name: Employee + model_id: hris.Employee + last_sync_start: '2021-03-30T19:44:18Z' + next_sync_start: '2021-03-30T20:44:18Z' + last_sync_result: SYNCING + last_sync_finished: '2021-03-30T19:55:18Z' + status: SYNCING + is_initial_sync: true + selective_sync_configurations_usage: IN_NEXT_SYNC + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/hris/teams.yml b/.mock/definition/hris/teams.yml new file mode 100644 index 0000000..4cb8741 --- /dev/null +++ b/.mock/definition/hris/teams.yml @@ -0,0 +1,151 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /hris/v1/teams + method: GET + auth: true + docs: Returns a list of `Team` objects. + source: + openapi: openapi/openapi.yml + request: + name: TeamsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + parent_team_id: + type: optional + docs: If provided, will only return teams with this parent team. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: root.PaginatedTeamList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 13a72919-9fae-4f54-81ca-ddfd8712a1ba + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Engineering + parent_team: parent_team + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /teams + data: + - Varies by platform + retrieve: + path: /hris/v1/teams/{id} + method: GET + auth: true + docs: Returns a `Team` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: TeamsRetrieveRequest + query-parameters: + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.Team + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 13a72919-9fae-4f54-81ca-ddfd8712a1ba + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Engineering + parent_team: parent_team + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /teams + data: + - Varies by platform + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/hris/timeOff.yml b/.mock/definition/hris/timeOff.yml new file mode 100644 index 0000000..9481811 --- /dev/null +++ b/.mock/definition/hris/timeOff.yml @@ -0,0 +1,599 @@ +types: + TimeOffListRequestExpand: + enum: + - approver + - employee + - value: employee,approver + name: EmployeeApprover + source: + openapi: openapi/openapi.yml + TimeOffListRequestRemoteFields: + enum: + - request_type + - value: request_type,status + name: RequestTypeStatus + - value: request_type,status,units + name: RequestTypeStatusUnits + - value: request_type,units + name: RequestTypeUnits + - status + - value: status,units + name: StatusUnits + - units + source: + openapi: openapi/openapi.yml + TimeOffListRequestRequestType: + enum: + - BEREAVEMENT + - JURY_DUTY + - PERSONAL + - SICK + - VACATION + - VOLUNTEER + source: + openapi: openapi/openapi.yml + TimeOffListRequestShowEnumOrigins: + enum: + - request_type + - value: request_type,status + name: RequestTypeStatus + - value: request_type,status,units + name: RequestTypeStatusUnits + - value: request_type,units + name: RequestTypeUnits + - status + - value: status,units + name: StatusUnits + - units + source: + openapi: openapi/openapi.yml + TimeOffListRequestStatus: + enum: + - APPROVED + - CANCELLED + - DECLINED + - DELETED + - REQUESTED + source: + openapi: openapi/openapi.yml + TimeOffRetrieveRequestExpand: + enum: + - approver + - employee + - value: employee,approver + name: EmployeeApprover + source: + openapi: openapi/openapi.yml + TimeOffRetrieveRequestRemoteFields: + enum: + - request_type + - value: request_type,status + name: RequestTypeStatus + - value: request_type,status,units + name: RequestTypeStatusUnits + - value: request_type,units + name: RequestTypeUnits + - status + - value: status,units + name: StatusUnits + - units + source: + openapi: openapi/openapi.yml + TimeOffRetrieveRequestShowEnumOrigins: + enum: + - request_type + - value: request_type,status + name: RequestTypeStatus + - value: request_type,status,units + name: RequestTypeStatusUnits + - value: request_type,units + name: RequestTypeUnits + - status + - value: status,units + name: StatusUnits + - units + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /hris/v1/time-off + method: GET + auth: true + docs: Returns a list of `TimeOff` objects. + source: + openapi: openapi/openapi.yml + request: + name: TimeOffListRequest + query-parameters: + approver_id: + type: optional + docs: If provided, will only return time off for this approver. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + employee_id: + type: optional + docs: If provided, will only return time off for this employee. + ended_after: + type: optional + docs: >- + If provided, will only return employees that ended after this + datetime. + ended_before: + type: optional + docs: >- + If provided, will only return time-offs that ended before this + datetime. + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_fields: + type: optional + docs: Deprecated. Use show_enum_origins. + remote_id: + type: optional + docs: The API provider's ID for the given object. + request_type: + type: optional + docs: >- + If provided, will only return TimeOff with this request type. + Options: ('VACATION', 'SICK', 'PERSONAL', 'JURY_DUTY', + 'VOLUNTEER', 'BEREAVEMENT') + + + * `VACATION` - VACATION + + * `SICK` - SICK + + * `PERSONAL` - PERSONAL + + * `JURY_DUTY` - JURY_DUTY + + * `VOLUNTEER` - VOLUNTEER + + * `BEREAVEMENT` - BEREAVEMENT + show_enum_origins: + type: optional + docs: >- + 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: + type: optional + docs: >- + If provided, will only return time-offs that started after this + datetime. + started_before: + type: optional + docs: >- + If provided, will only return time-offs that started before this + datetime. + status: + type: optional + docs: >- + If provided, will only return TimeOff with this status. Options: + ('REQUESTED', 'APPROVED', 'DECLINED', 'CANCELLED', 'DELETED') + + + * `REQUESTED` - REQUESTED + + * `APPROVED` - APPROVED + + * `DECLINED` - DECLINED + + * `CANCELLED` - CANCELLED + + * `DELETED` - DELETED + response: + docs: '' + type: root.PaginatedTimeOffList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 91b2b905-e866-40c8-8be2-efe53827a0aa + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee: employee + approver: approver + status: REQUESTED + employee_note: Moving into the new apartment Kendall Roy gave me! + units: HOURS + amount: 3 + request_type: VACATION + start_time: '2020-11-10T00:00:00Z' + end_time: '2020-11-17T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /leave + data: + - Varies by platform + create: + path: /hris/v1/time-off + method: POST + auth: true + docs: Creates a `TimeOff` object with the given values. + source: + openapi: openapi/openapi.yml + request: + name: TimeOffEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: root.TimeOffRequest + content-type: application/json + response: + docs: '' + type: root.TimeOffResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: 91b2b905-e866-40c8-8be2-efe53827a0aa + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee: employee + approver: approver + status: REQUESTED + employee_note: Moving into the new apartment Kendall Roy gave me! + units: HOURS + amount: 3 + request_type: VACATION + start_time: '2020-11-10T00:00:00Z' + end_time: '2020-11-17T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /leave + data: + - Varies by platform + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /hris/v1/time-off/{id} + method: GET + auth: true + docs: Returns a `TimeOff` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: TimeOffRetrieveRequest + query-parameters: + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional + docs: >- + 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) + response: + docs: '' + type: root.TimeOff + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 91b2b905-e866-40c8-8be2-efe53827a0aa + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee: employee + approver: approver + status: REQUESTED + employee_note: Moving into the new apartment Kendall Roy gave me! + units: HOURS + amount: 3 + request_type: VACATION + start_time: '2020-11-10T00:00:00Z' + end_time: '2020-11-17T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /leave + data: + - Varies by platform + metaPostRetrieve: + path: /hris/v1/time-off/meta/post + method: GET + auth: true + docs: Returns metadata for `TimeOff` POSTs. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/hris/timeOffBalances.yml b/.mock/definition/hris/timeOffBalances.yml new file mode 100644 index 0000000..509df36 --- /dev/null +++ b/.mock/definition/hris/timeOffBalances.yml @@ -0,0 +1,205 @@ +types: + TimeOffBalancesListRequestPolicyType: + enum: + - BEREAVEMENT + - JURY_DUTY + - PERSONAL + - SICK + - VACATION + - VOLUNTEER + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /hris/v1/time-off-balances + method: GET + auth: true + docs: Returns a list of `TimeOffBalance` objects. + source: + openapi: openapi/openapi.yml + request: + name: TimeOffBalancesListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + employee_id: + type: optional + docs: If provided, will only return time off balances for this employee. + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + policy_type: + type: optional + docs: >- + If provided, will only return TimeOffBalance with this policy + type. Options: ('VACATION', 'SICK', 'PERSONAL', 'JURY_DUTY', + 'VOLUNTEER', 'BEREAVEMENT') + + + * `VACATION` - VACATION + + * `SICK` - SICK + + * `PERSONAL` - PERSONAL + + * `JURY_DUTY` - JURY_DUTY + + * `VOLUNTEER` - VOLUNTEER + + * `BEREAVEMENT` - BEREAVEMENT + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + remote_id: + type: optional + docs: The API provider's ID for the given object. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: root.PaginatedTimeOffBalanceList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 91b2b905-e866-40c8-8be2-efe53827a0aa + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee: employee + balance: 1.1 + used: 1.1 + policy_type: VACATION + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /leave + data: + - Varies by platform + retrieve: + path: /hris/v1/time-off-balances/{id} + method: GET + auth: true + docs: Returns a `TimeOffBalance` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: TimeOffBalancesRetrieveRequest + query-parameters: + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: root.TimeOffBalance + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 91b2b905-e866-40c8-8be2-efe53827a0aa + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee: employee + balance: 1.1 + used: 1.1 + policy_type: VACATION + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /leave + data: + - Varies by platform + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/hris/timesheetEntries.yml b/.mock/definition/hris/timesheetEntries.yml new file mode 100644 index 0000000..69380ef --- /dev/null +++ b/.mock/definition/hris/timesheetEntries.yml @@ -0,0 +1,444 @@ +types: + TimesheetEntriesListRequestOrderBy: + enum: + - value: '-start_time' + name: StartTimeDescending + - value: start_time + name: StartTimeAscending + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /hris/v1/timesheet-entries + method: GET + auth: true + docs: Returns a list of `TimesheetEntry` objects. + source: + openapi: openapi/openapi.yml + request: + name: TimesheetEntriesListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + employee_id: + type: optional + docs: If provided, will only return timesheet entries for this employee. + ended_after: + type: optional + docs: >- + If provided, will only return timesheet entries ended after this + datetime. + ended_before: + type: optional + docs: >- + If provided, will only return timesheet entries ended before this + datetime. + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + order_by: + type: optional + docs: >- + Overrides the default ordering for this endpoint. Possible values + include: start_time, -start_time. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + started_after: + type: optional + docs: >- + If provided, will only return timesheet entries started after this + datetime. + started_before: + type: optional + docs: >- + If provided, will only return timesheet entries started before + this datetime. + response: + docs: '' + type: root.PaginatedTimesheetEntryList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 91b2b905-e866-40c8-8be2-efe53827a0aa + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee: employee + hours_worked: 10 + start_time: '2020-11-10T00:00:00Z' + end_time: '2020-11-10T00:10:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /dependent + data: + - Varies by platform + create: + path: /hris/v1/timesheet-entries + method: POST + auth: true + docs: Creates a `TimesheetEntry` object with the given values. + source: + openapi: openapi/openapi.yml + request: + name: TimesheetEntryEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: root.TimesheetEntryRequest + content-type: application/json + response: + docs: '' + type: root.TimesheetEntryResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: 91b2b905-e866-40c8-8be2-efe53827a0aa + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee: employee + hours_worked: 10 + start_time: '2020-11-10T00:00:00Z' + end_time: '2020-11-10T00:10:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /dependent + data: + - Varies by platform + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /hris/v1/timesheet-entries/{id} + method: GET + auth: true + docs: Returns a `TimesheetEntry` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: TimesheetEntriesRetrieveRequest + query-parameters: + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.TimesheetEntry + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 91b2b905-e866-40c8-8be2-efe53827a0aa + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + employee: employee + hours_worked: 10 + start_time: '2020-11-10T00:00:00Z' + end_time: '2020-11-10T00:10:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /dependent + data: + - Varies by platform + metaPostRetrieve: + path: /hris/v1/timesheet-entries/meta/post + method: GET + auth: true + docs: Returns metadata for `TimesheetEntry` POSTs. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/hris/webhookReceivers.yml b/.mock/definition/hris/webhookReceivers.yml new file mode 100644 index 0000000..05eae39 --- /dev/null +++ b/.mock/definition/hris/webhookReceivers.yml @@ -0,0 +1,61 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /hris/v1/webhook-receivers + method: GET + auth: true + docs: Returns a list of `WebhookReceiver` objects. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: list + status-code: 200 + examples: + - headers: {} + response: + body: + - event: event + is_active: true + key: key + create: + path: /hris/v1/webhook-receivers + method: POST + auth: true + docs: Creates a `WebhookReceiver` object with the given values. + source: + openapi: openapi/openapi.yml + request: + name: WebhookReceiverRequest + body: + properties: + event: + type: string + validation: + minLength: 1 + is_active: boolean + key: + type: optional + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: root.WebhookReceiver + status-code: 201 + examples: + - headers: {} + request: + event: event + is_active: true + response: + body: + event: event + is_active: true + key: key + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ticketing/__package__.yml b/.mock/definition/ticketing/__package__.yml new file mode 100644 index 0000000..7b2fb89 --- /dev/null +++ b/.mock/definition/ticketing/__package__.yml @@ -0,0 +1,3011 @@ +types: + Account: + docs: >- + # The Account Object + + ### Description + + The `Account` object is used to represent the account that a ticket is + associated with. + + + The account is a company that may be a customer. This does not represent + the company that is receiving the ticket. + + + ### Usage Example + + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The account's name. + domains: + type: optional>> + docs: The account's domain names. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + AccountDetails: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + integration: + type: optional + access: read-only + integration_slug: + type: optional + access: read-only + category: optional + end_user_origin_id: + type: optional + access: read-only + end_user_organization_name: + type: optional + access: read-only + end_user_email_address: + type: optional + validation: + format: email + access: read-only + status: + type: optional + access: read-only + webhook_listener_url: + type: optional + validation: + format: uri + access: read-only + is_duplicate: + type: optional + docs: >- + 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. + access: read-only + account_type: + type: optional + access: read-only + completed_at: + type: optional + docs: The time at which account completes the linking flow. + source: + openapi: openapi/openapi.yml + AccountDetailsAndActions: + docs: >- + # The LinkedAccount Object + + ### Description + + The `LinkedAccount` object is used to represent an end user's link with a + specific integration. + + + ### Usage Example + + View a list of your organization's `LinkedAccount` objects. + properties: + id: string + category: optional + status: AccountDetailsAndActionsStatusEnum + status_detail: optional + end_user_origin_id: optional + end_user_organization_name: string + end_user_email_address: string + subdomain: + type: optional + docs: The tenant or domain the customer has provided access to. + webhook_listener_url: string + is_duplicate: + type: optional + docs: >- + 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. + integration: optional + account_type: string + completed_at: datetime + integration_specific_fields: optional> + source: + openapi: openapi/openapi.yml + AccountDetailsAndActionsIntegration: + properties: + name: string + categories: list + image: optional + square_image: optional + color: string + slug: string + passthrough_available: boolean + available_model_operations: optional> + source: + openapi: openapi/openapi.yml + AccountDetailsAndActionsStatusEnum: + enum: + - COMPLETE + - INCOMPLETE + - RELINK_NEEDED + - IDLE + docs: |- + * `COMPLETE` - COMPLETE + * `INCOMPLETE` - INCOMPLETE + * `RELINK_NEEDED` - RELINK_NEEDED + * `IDLE` - IDLE + source: + openapi: openapi/openapi.yml + AccountIntegration: + properties: + name: + type: string + docs: Company name. + abbreviated_name: + type: optional + docs: >- + Optional. This shortened name appears in places with limited space, + usually in conjunction with the platform's logo (e.g., Merge Link + menu).

Example: Workforce Now (in lieu of ADP Workforce + Now), SuccessFactors (in lieu of SAP SuccessFactors) + categories: + type: optional> + docs: >- + Category or categories this integration belongs to. Multiple + categories should be comma separated, i.e. [ats, hris]. + access: read-only + image: + type: optional + docs: Company logo in rectangular shape. + validation: + format: uri + square_image: + type: optional + docs: Company logo in square shape. + validation: + format: uri + color: + type: optional + docs: >- + The color of this integration used for buttons and text throughout the + app and landing pages. Choose a darker, saturated color. + validation: + pattern: ^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ + maxLength: 18 + slug: + type: optional + access: read-only + api_endpoints_to_documentation_urls: + type: optional> + docs: >- + Mapping of API endpoints to documentation urls for support. Example: + {'GET': [['/common-model-scopes', + 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', + 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], + 'POST': []} + webhook_setup_guide_url: + type: optional + docs: >- + Setup guide URL for third party webhook creation. Exposed in Merge + Docs. + category_beta_status: + type: optional> + docs: Category or categories this integration is in beta status for. + access: read-only + source: + openapi: openapi/openapi.yml + AccountToken: + properties: + account_token: string + integration: AccountIntegration + id: string + source: + openapi: openapi/openapi.yml + AdvancedMetadata: + properties: + id: + type: string + validation: + format: uuid + display_name: optional + description: optional + is_required: optional + is_custom: optional + field_choices: optional> + source: + openapi: openapi/openapi.yml + AsyncPassthroughReciept: + properties: + async_passthrough_receipt_id: + type: string + validation: + format: uuid + source: + openapi: openapi/openapi.yml + AttachmentTicket: + discriminated: false + docs: The ticket associated with the attachment. + union: + - type: string + validation: + format: uuid + - Ticket + source: + openapi: openapi/openapi.yml + inline: true + Attachment: + docs: |- + # The Attachment Object + ### Description + The `Attachment` object is used to represent an attachment for a ticket. + + ### Usage Example + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + file_name: + type: optional + docs: >- + The attachment's name. It is required to include the file extension in + the attachment's name. + ticket: + type: optional + docs: The ticket associated with the attachment. + file_url: + type: optional + docs: >- + The attachment's url. It is required to include the file extension in + the file's URL. + content_type: + type: optional + docs: The attachment's file format. + uploaded_by: + type: optional + docs: The user who uploaded the attachment. + validation: + format: uuid + remote_created_at: + type: optional + docs: When the third party's attachment was created. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + AttachmentRequestTicket: + discriminated: false + docs: The ticket associated with the attachment. + union: + - type: string + validation: + format: uuid + - Ticket + source: + openapi: openapi/openapi.yml + inline: true + AttachmentRequest: + docs: |- + # The Attachment Object + ### Description + The `Attachment` object is used to represent an attachment for a ticket. + + ### Usage Example + TODO + properties: + file_name: + type: optional + docs: >- + The attachment's name. It is required to include the file extension in + the attachment's name. + ticket: + type: optional + docs: The ticket associated with the attachment. + file_url: + type: optional + docs: >- + The attachment's url. It is required to include the file extension in + the file's URL. + content_type: + type: optional + docs: The attachment's file format. + uploaded_by: + type: optional + docs: The user who uploaded the attachment. + validation: + format: uuid + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + AuditLogEvent: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + user_name: + type: optional + docs: The User's full name at the time of this Event occurring. + validation: + maxLength: 200 + user_email: + type: optional + docs: The User's email at the time of this Event occurring. + validation: + format: email + maxLength: 254 + role: + type: RoleEnum + docs: >- + Designates the role of the user (or SYSTEM/API if action not taken by + a user) at the time of this Event occurring. + + + * `ADMIN` - ADMIN + + * `DEVELOPER` - DEVELOPER + + * `MEMBER` - MEMBER + + * `API` - API + + * `SYSTEM` - SYSTEM + + * `MERGE_TEAM` - MERGE_TEAM + ip_address: + type: string + validation: + maxLength: 45 + event_type: + type: EventTypeEnum + docs: >- + Designates the type of event that occurred. + + + * `CREATED_REMOTE_PRODUCTION_API_KEY` - + CREATED_REMOTE_PRODUCTION_API_KEY + + * `DELETED_REMOTE_PRODUCTION_API_KEY` - + DELETED_REMOTE_PRODUCTION_API_KEY + + * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + + * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + + * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + + * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + + * `INVITED_USER` - INVITED_USER + + * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + + * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + + * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + + * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - + DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + + * `CREATED_DESTINATION` - CREATED_DESTINATION + + * `DELETED_DESTINATION` - DELETED_DESTINATION + + * `CHANGED_DESTINATION` - CHANGED_DESTINATION + + * `CHANGED_SCOPES` - CHANGED_SCOPES + + * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + + * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + + * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + + * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + + * `ENABLED_CATEGORY` - ENABLED_CATEGORY + + * `DISABLED_CATEGORY` - DISABLED_CATEGORY + + * `CHANGED_PASSWORD` - CHANGED_PASSWORD + + * `RESET_PASSWORD` - RESET_PASSWORD + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - + CREATED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - + CREATED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - + CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + + * `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 + + * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + + * `MUTED_ISSUE` - MUTED_ISSUE + + * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + + * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + + * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + + * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + + * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + event_description: string + created_at: + type: optional + access: read-only + source: + openapi: openapi/openapi.yml + AvailableActions: + docs: >- + # The AvailableActions Object + + ### Description + + The `Activity` object is used to see all available model/operation + combinations for an integration. + + + ### Usage Example + + Fetch all the actions available for the `Zenefits` integration. + properties: + integration: AccountIntegration + passthrough_available: boolean + available_model_operations: optional> + source: + openapi: openapi/openapi.yml + CategoriesEnum: + enum: + - hris + - ats + - accounting + - ticketing + - crm + - mktg + - filestorage + docs: |- + * `hris` - hris + * `ats` - ats + * `accounting` - accounting + * `ticketing` - ticketing + * `crm` - crm + * `mktg` - mktg + * `filestorage` - filestorage + source: + openapi: openapi/openapi.yml + CategoryEnum: + enum: + - hris + - ats + - accounting + - ticketing + - crm + - mktg + - filestorage + docs: |- + * `hris` - hris + * `ats` - ats + * `accounting` - accounting + * `ticketing` - ticketing + * `crm` - crm + * `mktg` - mktg + * `filestorage` - filestorage + source: + openapi: openapi/openapi.yml + CollectionParentCollection: + discriminated: false + docs: The parent collection for this collection. + union: + - type: string + validation: + format: uuid + - Collection + source: + openapi: openapi/openapi.yml + inline: true + Collection: + docs: >- + # The Collection Object + + ### Description + + The `Collection` object is used to represent one or more `Tickets`. There + can be a hierarchy of `Collections`, in which a sub-collection belongs to + a parent-collection. + + + ### Usage Example + + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The collection's name. + description: + type: optional + docs: The collection's description. + access_level: + type: optional + docs: |- + The level of access a User has to the Collection and its sub-objects. + + * `PRIVATE` - PRIVATE + * `COMPANY` - COMPANY + * `PUBLIC` - PUBLIC + * `PARENT_COLLECTION` - PARENT_COLLECTION + collection_type: + type: optional + docs: |- + The collection's type. + + * `LIST` - LIST + * `PROJECT` - PROJECT + parent_collection: + type: optional + docs: The parent collection for this collection. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + CollectionAccessLevelEnum: + enum: + - PRIVATE + - COMPANY + - PUBLIC + - PARENT_COLLECTION + docs: |- + * `PRIVATE` - PRIVATE + * `COMPANY` - COMPANY + * `PUBLIC` - PUBLIC + * `PARENT_COLLECTION` - PARENT_COLLECTION + source: + openapi: openapi/openapi.yml + CollectionTypeEnum: + enum: + - LIST + - PROJECT + docs: |- + * `LIST` - LIST + * `PROJECT` - PROJECT + source: + openapi: openapi/openapi.yml + CommentUser: + discriminated: false + docs: >- + The author of the Comment, if the author is a User. If the third party + does not support specifying an author, we will append "[Posted on behalf + of {name}]" to the comment. + union: + - type: string + validation: + format: uuid + - User + source: + openapi: openapi/openapi.yml + inline: true + CommentContact: + discriminated: false + docs: >- + The author of the Comment, if the author is a Contact.If the third party + does not support specifying an author, we will append "[Posted on behalf + of {name}]" to the comment. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: openapi/openapi.yml + inline: true + CommentTicket: + discriminated: false + docs: 'The ticket associated with the comment. ' + union: + - type: string + validation: + format: uuid + - Ticket + source: + openapi: openapi/openapi.yml + inline: true + Comment: + docs: |- + # The Comment Object + ### Description + The `Comment` object is used to represent a comment on a ticket. + + ### Usage Example + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + user: + type: optional + docs: >- + The author of the Comment, if the author is a User. If the third party + does not support specifying an author, we will append "[Posted on + behalf of {name}]" to the comment. + contact: + type: optional + docs: >- + The author of the Comment, if the author is a Contact.If the third + party does not support specifying an author, we will append "[Posted + on behalf of {name}]" to the comment. + body: + type: optional + docs: The comment's text body. + html_body: + type: optional + docs: The comment's text body formatted as html. + ticket: + type: optional + docs: 'The ticket associated with the comment. ' + is_private: + type: optional + docs: Whether or not the comment is internal. + remote_created_at: + type: optional + docs: When the third party's comment was created. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + CommentRequestUser: + discriminated: false + docs: >- + The author of the Comment, if the author is a User. If the third party + does not support specifying an author, we will append "[Posted on behalf + of {name}]" to the comment. + union: + - type: string + validation: + format: uuid + - User + source: + openapi: openapi/openapi.yml + inline: true + CommentRequestContact: + discriminated: false + docs: >- + The author of the Comment, if the author is a Contact.If the third party + does not support specifying an author, we will append "[Posted on behalf + of {name}]" to the comment. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: openapi/openapi.yml + inline: true + CommentRequestTicket: + discriminated: false + docs: 'The ticket associated with the comment. ' + union: + - type: string + validation: + format: uuid + - Ticket + source: + openapi: openapi/openapi.yml + inline: true + CommentRequest: + docs: |- + # The Comment Object + ### Description + The `Comment` object is used to represent a comment on a ticket. + + ### Usage Example + TODO + properties: + user: + type: optional + docs: >- + The author of the Comment, if the author is a User. If the third party + does not support specifying an author, we will append "[Posted on + behalf of {name}]" to the comment. + contact: + type: optional + docs: >- + The author of the Comment, if the author is a Contact.If the third + party does not support specifying an author, we will append "[Posted + on behalf of {name}]" to the comment. + body: + type: optional + docs: The comment's text body. + html_body: + type: optional + docs: The comment's text body formatted as html. + ticket: + type: optional + docs: 'The ticket associated with the comment. ' + is_private: + type: optional + docs: Whether or not the comment is internal. + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + CommentResponse: + properties: + model: Comment + warnings: list + errors: list + logs: optional> + source: + openapi: openapi/openapi.yml + CommonModelScopeApi: + properties: + common_models: + docs: The common models you want to update the scopes for + type: list + source: + openapi: openapi/openapi.yml + CommonModelScopesBodyRequest: + properties: + model_id: + type: string + validation: + minLength: 1 + enabled_actions: list + disabled_fields: list + source: + openapi: openapi/openapi.yml + ContactAccount: + discriminated: false + docs: The contact's account. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: openapi/openapi.yml + inline: true + Contact: + docs: >- + # The Contact Object + + ### Description + + The `Contact` object is used to represent the customer, lead, or external + user that a ticket is associated with. + + + ### Usage Example + + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The contact's name. + email_address: + type: optional + docs: The contact's email address. + phone_number: + type: optional + docs: The contact's phone number. + details: + type: optional + docs: The contact's details. + account: + type: optional + docs: The contact's account. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + ContactRequestAccount: + discriminated: false + docs: The contact's account. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: openapi/openapi.yml + inline: true + ContactRequest: + docs: >- + # The Contact Object + + ### Description + + The `Contact` object is used to represent the customer, lead, or external + user that a ticket is associated with. + + + ### Usage Example + + TODO + properties: + name: + type: optional + docs: The contact's name. + email_address: + type: optional + docs: The contact's email address. + phone_number: + type: optional + docs: The contact's phone number. + details: + type: optional + docs: The contact's details. + account: + type: optional + docs: The contact's account. + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + DataPassthroughRequest: + docs: >- + # The DataPassthrough Object + + ### Description + + The `DataPassthrough` object is used to send information to an + otherwise-unsupported third-party endpoint. + + + ### Usage Example + + Create a `DataPassthrough` to get team hierarchies from your Rippling + integration. + properties: + method: MethodEnum + path: + type: string + docs: The path of the request in the third party's platform. + validation: + minLength: 1 + base_url_override: + type: optional + docs: An optional override of the third party's base url for the request. + validation: + minLength: 1 + data: + type: optional + docs: >- + The data with the request. You must include a `request_format` + parameter matching the data's format + validation: + minLength: 1 + multipart_form_data: + type: optional> + docs: >- + Pass an array of `MultipartFormField` objects in here instead of using + the `data` param if `request_format` is set to `MULTIPART`. + headers: + type: optional> + docs: >- + The headers to use for the request (Merge will handle the account's + authorization headers). `Content-Type` header is required for + passthrough. Choose content type corresponding to expected format of + receiving server. + request_format: optional + normalize_response: + type: optional + docs: >- + Optional. If true, the response will always be an object of the form + `{"type": T, "value": ...}` where `T` will be one of `string, boolean, + number, null, array, object`. + source: + openapi: openapi/openapi.yml + DebugModeLog: + properties: + log_id: string + dashboard_view: string + log_summary: DebugModelLogSummary + source: + openapi: openapi/openapi.yml + DebugModelLogSummary: + properties: + url: string + method: string + status_code: integer + source: + openapi: openapi/openapi.yml + EnabledActionsEnum: + enum: + - READ + - WRITE + docs: |- + * `READ` - READ + * `WRITE` - WRITE + source: + openapi: openapi/openapi.yml + EncodingEnum: + enum: + - RAW + - BASE64 + - GZIP_BASE64 + docs: |- + * `RAW` - RAW + * `BASE64` - BASE64 + * `GZIP_BASE64` - GZIP_BASE64 + source: + openapi: openapi/openapi.yml + ErrorValidationProblem: + properties: + source: optional + title: string + detail: string + problem_type: string + source: + openapi: openapi/openapi.yml + EventTypeEnum: + enum: + - CREATED_REMOTE_PRODUCTION_API_KEY + - DELETED_REMOTE_PRODUCTION_API_KEY + - CREATED_TEST_API_KEY + - DELETED_TEST_API_KEY + - REGENERATED_PRODUCTION_API_KEY + - REGENERATED_WEBHOOK_SIGNATURE + - INVITED_USER + - TWO_FACTOR_AUTH_ENABLED + - TWO_FACTOR_AUTH_DISABLED + - DELETED_LINKED_ACCOUNT + - DELETED_ALL_COMMON_MODELS_FOR_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 + - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + - FORCED_LINKED_ACCOUNT_RESYNC + - MUTED_ISSUE + - GENERATED_MAGIC_LINK + - ENABLED_MERGE_WEBHOOK + - DISABLED_MERGE_WEBHOOK + - MERGE_WEBHOOK_TARGET_CHANGED + - END_USER_CREDENTIALS_ACCESSED + docs: >- + * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + + * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + + * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + + * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + + * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + + * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + + * `INVITED_USER` - INVITED_USER + + * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + + * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + + * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + + * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - + DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + + * `CREATED_DESTINATION` - CREATED_DESTINATION + + * `DELETED_DESTINATION` - DELETED_DESTINATION + + * `CHANGED_DESTINATION` - CHANGED_DESTINATION + + * `CHANGED_SCOPES` - CHANGED_SCOPES + + * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + + * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + + * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + + * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + + * `ENABLED_CATEGORY` - ENABLED_CATEGORY + + * `DISABLED_CATEGORY` - DISABLED_CATEGORY + + * `CHANGED_PASSWORD` - CHANGED_PASSWORD + + * `RESET_PASSWORD` - RESET_PASSWORD + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + + * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - + DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + + * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - + CREATED_INTEGRATION_WIDE_FIELD_MAPPING + + * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - + CREATED_LINKED_ACCOUNT_FIELD_MAPPING + + * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - + CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + + * `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 + + * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - + DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + + * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + + * `MUTED_ISSUE` - MUTED_ISSUE + + * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + + * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + + * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + + * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + + * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + source: + openapi: openapi/openapi.yml + ExternalTargetFieldApi: + properties: + name: + type: optional + access: read-only + description: + type: optional + access: read-only + is_mapped: + type: optional + access: read-only + source: + openapi: openapi/openapi.yml + ExternalTargetFieldApiResponse: + properties: + Ticket: optional> + Comment: optional> + Project: optional> + Collection: optional> + User: optional> + Role: optional> + Account: optional> + Team: optional> + Attachment: optional> + Tag: optional> + Contact: optional> + source: + openapi: openapi/openapi.yml + FieldFormatEnum: + enum: + - string + - number + - date + - datetime + - bool + - list + docs: |- + * `string` - string + * `number` - number + * `date` - date + * `datetime` - datetime + * `bool` - bool + * `list` - list + source: + openapi: openapi/openapi.yml + FieldMappingApiInstanceTargetField: + properties: + name: string + description: string + is_organization_wide: boolean + source: + openapi: openapi/openapi.yml + inline: true + FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo: + properties: + method: optional + url_path: optional + field_traversal_path: optional> + source: + openapi: openapi/openapi.yml + inline: true + FieldMappingApiInstanceRemoteField: + properties: + remote_key_name: optional + schema: optional> + remote_endpoint_info: FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo + source: + openapi: openapi/openapi.yml + inline: true + FieldMappingApiInstance: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + is_integration_wide: + type: optional + access: read-only + target_field: + type: optional + access: read-only + remote_field: + type: optional + access: read-only + source: + openapi: openapi/openapi.yml + FieldMappingApiInstanceResponse: + properties: + Ticket: optional> + Comment: optional> + Project: optional> + Collection: optional> + User: optional> + Role: optional> + Account: optional> + Team: optional> + Attachment: optional> + Tag: optional> + Contact: optional> + source: + openapi: openapi/openapi.yml + FieldMappingInstanceResponse: + properties: + model: FieldMappingApiInstance + warnings: list + errors: list + logs: optional> + source: + openapi: openapi/openapi.yml + FieldPermissionDeserializer: + properties: + enabled_fields: optional> + disabled_fields: optional> + source: + openapi: openapi/openapi.yml + FieldPermissionDeserializerRequest: + properties: + enabled_fields: optional> + disabled_fields: optional> + source: + openapi: openapi/openapi.yml + FieldTypeEnum: + enum: + - string + - number + - date + - datetime + - bool + - list + docs: |- + * `string` - string + * `number` - number + * `date` - date + * `datetime` - datetime + * `bool` - bool + * `list` - list + source: + openapi: openapi/openapi.yml + IndividualCommonModelScopeDeserializer: + properties: + model_name: string + model_permissions: optional> + field_permissions: optional + source: + openapi: openapi/openapi.yml + IndividualCommonModelScopeDeserializerRequest: + properties: + model_name: + type: string + validation: + minLength: 1 + model_permissions: optional> + field_permissions: optional + source: + openapi: openapi/openapi.yml + Issue: + properties: + id: + type: optional + validation: + format: uuid + access: read-only + status: + type: optional + docs: |- + Status of the issue. Options: ('ONGOING', 'RESOLVED') + + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + error_description: string + end_user: + type: optional> + access: read-only + first_incident_time: optional + last_incident_time: optional + is_muted: + type: optional + access: read-only + error_details: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + IssueStatusEnum: + enum: + - ONGOING + - RESOLVED + docs: |- + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + source: + openapi: openapi/openapi.yml + ItemFormatEnum: + enum: + - string + - number + - date + - datetime + - bool + - list + docs: |- + * `string` - uuid + * `number` - url + * `date` - email + * `datetime` - phone + * `bool` - currency + * `list` - decimal + source: + openapi: openapi/openapi.yml + ItemSchema: + properties: + item_type: optional + item_format: optional + item_choices: optional> + source: + openapi: openapi/openapi.yml + ItemTypeEnum: + enum: + - string + - number + - date + - datetime + - bool + - list + docs: |- + * `string` - string + * `number` - number + * `date` - date + * `datetime` - datetime + * `bool` - bool + * `list` - list + source: + openapi: openapi/openapi.yml + LanguageEnum: + enum: + - en + - de + docs: |- + * `en` - en + * `de` - de + source: + openapi: openapi/openapi.yml + LastSyncResultEnum: + enum: + - SYNCING + - DONE + - FAILED + - DISABLED + - PAUSED + - PARTIALLY_SYNCED + docs: |- + * `SYNCING` - SYNCING + * `DONE` - DONE + * `FAILED` - FAILED + * `DISABLED` - DISABLED + * `PAUSED` - PAUSED + * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED + source: + openapi: openapi/openapi.yml + LinkToken: + properties: + link_token: string + integration_name: optional + magic_link_url: optional + source: + openapi: openapi/openapi.yml + LinkedAccountStatus: + properties: + linked_account_status: string + can_make_request: boolean + source: + openapi: openapi/openapi.yml + MetaResponse: + properties: + request_schema: map + remote_field_classes: optional> + status: optional + has_conditional_params: boolean + has_required_linked_account_params: boolean + source: + openapi: openapi/openapi.yml + MethodEnum: + enum: + - GET + - OPTIONS + - HEAD + - POST + - PUT + - PATCH + - DELETE + docs: |- + * `GET` - GET + * `OPTIONS` - OPTIONS + * `HEAD` - HEAD + * `POST` - POST + * `PUT` - PUT + * `PATCH` - PATCH + * `DELETE` - DELETE + source: + openapi: openapi/openapi.yml + ModelOperation: + docs: >- + # The ModelOperation Object + + ### Description + + The `ModelOperation` object is used to represent the operations that are + currently supported for a given model. + + + ### Usage Example + + View what operations are supported for the `Candidate` endpoint. + properties: + model_name: string + available_operations: list + required_post_parameters: list + supported_fields: list + source: + openapi: openapi/openapi.yml + ModelPermissionDeserializer: + properties: + is_enabled: optional + source: + openapi: openapi/openapi.yml + ModelPermissionDeserializerRequest: + properties: + is_enabled: optional + source: + openapi: openapi/openapi.yml + MultipartFormFieldRequest: + docs: >- + # The MultipartFormField Object + + ### Description + + The `MultipartFormField` object is used to represent fields in an HTTP + request using `multipart/form-data`. + + + ### Usage Example + + Create a `MultipartFormField` to define a multipart form entry. + properties: + name: + type: string + docs: The name of the form field + validation: + minLength: 1 + data: + type: string + docs: The data for the form field. + validation: + minLength: 1 + encoding: + type: optional + docs: |- + The encoding of the value of `data`. Defaults to `RAW` if not defined. + + * `RAW` - RAW + * `BASE64` - BASE64 + * `GZIP_BASE64` - GZIP_BASE64 + file_name: + type: optional + docs: The file name of the form field, if the field is for a file. + validation: + minLength: 1 + content_type: + type: optional + docs: The MIME type of the file, if the field is for a file. + validation: + minLength: 1 + source: + openapi: openapi/openapi.yml + PaginatedAccountDetailsAndActionsList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedAccountList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedAttachmentList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedAuditLogEventList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedCollectionList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedCommentList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedContactList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedIssueList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedProjectList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedRemoteFieldClassList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedRoleList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedSyncStatusList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedTagList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedTeamList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedTicketList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedUserList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PaginatedViewerList: + properties: + next: optional + previous: optional + results: optional> + source: + openapi: openapi/openapi.yml + PatchedTicketRequest: + docs: |- + # The Ticket Object + ### Description + The `Ticket` object is used to represent a ticket, issue, task or case. + ### Usage Example + TODO + properties: + name: + type: optional + docs: The ticket's name. + assignees: + type: optional>> + docs: >- + The individual `Users` who are assigned to this ticket. This does not + include `Users` who just have view access to this ticket. To fetch all + `Users` and `Teams` that can access the ticket, use the `GET + /tickets/{ticket_id}/viewers` + [endpoint](https://docs.merge.dev/ticketing/tickets/#tickets_viewers_list). + assigned_teams: + type: optional>> + docs: >- + The `Teams` that are assigned to this ticket. This does not include + `Teams` who just have view access to this ticket. To fetch all `Users` + and `Teams` that can access this ticket, use the `GET + /tickets/{ticket_id}/viewers` + [endpoint](https://docs.merge.dev/ticketing/tickets/#tickets_viewers_list). + creator: + type: optional + docs: The user who created this ticket. + validation: + format: uuid + due_date: + type: optional + docs: The ticket's due date. + status: + type: optional + docs: |- + The current status of the ticket. + + * `OPEN` - OPEN + * `CLOSED` - CLOSED + * `IN_PROGRESS` - IN_PROGRESS + * `ON_HOLD` - ON_HOLD + description: + type: optional + docs: >- + The ticket’s description. HTML version of description is mapped if + supported by the third-party platform. + collections: + type: optional>> + docs: The `Collections` that this `Ticket` is included in. + ticket_type: + type: optional + docs: >- + The sub category of the ticket within the 3rd party system. Examples + include incident, task, subtask or to-do. + account: + type: optional + docs: The account associated with the ticket. + validation: + format: uuid + contact: + type: optional + docs: The contact associated with the ticket. + validation: + format: uuid + parent_ticket: + type: optional + docs: The ticket's parent ticket. + validation: + format: uuid + access_level: + type: optional + docs: >- + The description of who is able to access a given ticket, or where + access is inherited from. + + + * `COMPANY` - COMPANY + + * `PUBLIC` - PUBLIC + + * `PRIVATE` - PRIVATE + + * `COLLECTION` - COLLECTION + tags: optional>> + roles: optional>> + completed_at: + type: optional + docs: When the ticket was completed. + ticket_url: + type: optional + docs: The 3rd party url of the Ticket. + validation: + format: uri + maxLength: 2000 + priority: + type: optional + docs: |- + The priority or urgency of the Ticket. + + * `URGENT` - URGENT + * `HIGH` - HIGH + * `NORMAL` - NORMAL + * `LOW` - LOW + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + remote_fields: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + PriorityEnum: + enum: + - URGENT + - HIGH + - NORMAL + - LOW + docs: |- + * `URGENT` - URGENT + * `HIGH` - HIGH + * `NORMAL` - NORMAL + * `LOW` - LOW + source: + openapi: openapi/openapi.yml + Project: + docs: >- + # The Project Object + + ### Description + + Please use the `Collection` model. This model will be fully deprecated on + 3/30/2024. + + + ### Usage Example + + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: 'The project''s name. ' + description: + type: optional + docs: The project's description. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + RemoteData: + docs: >- + # The RemoteData Object + + ### Description + + The `RemoteData` object is used to represent the full data pulled from the + third-party API for an object. + + + ### Usage Example + + TODO + properties: + path: + type: string + docs: The third-party API path that is being called. + data: + type: optional + access: read-only + source: + openapi: openapi/openapi.yml + RemoteEndpointInfo: + properties: + method: string + url_path: string + field_traversal_path: list + source: + openapi: openapi/openapi.yml + RemoteFieldRemoteFieldClass: + discriminated: false + union: + - string + - RemoteFieldClass + source: + openapi: openapi/openapi.yml + inline: true + RemoteField: + properties: + remote_field_class: RemoteFieldRemoteFieldClass + value: optional + source: + openapi: openapi/openapi.yml + RemoteFieldApiCoverage: + discriminated: false + union: + - integer + - double + source: + openapi: openapi/openapi.yml + inline: true + RemoteFieldApi: + properties: + schema: map + remote_key_name: string + remote_endpoint_info: RemoteEndpointInfo + example_values: optional> + advanced_metadata: optional + coverage: + type: optional + access: read-only + source: + openapi: openapi/openapi.yml + RemoteFieldApiResponse: + properties: + Ticket: optional> + Comment: optional> + Project: optional> + Collection: optional> + User: optional> + Role: optional> + Account: optional> + Team: optional> + Attachment: optional> + Tag: optional> + Contact: optional> + source: + openapi: openapi/openapi.yml + RemoteFieldClassFieldChoicesItem: + properties: + value: optional + display_name: optional + source: + openapi: openapi/openapi.yml + inline: true + RemoteFieldClass: + properties: + id: optional + display_name: optional + remote_key_name: optional + description: optional + is_custom: optional + is_required: optional + field_type: optional + field_format: optional + field_choices: + type: optional> + access: read-only + item_schema: optional + source: + openapi: openapi/openapi.yml + RemoteFieldRequestRemoteFieldClass: + discriminated: false + union: + - type: string + validation: + format: uuid + - RemoteFieldClass + source: + openapi: openapi/openapi.yml + inline: true + RemoteFieldRequest: + properties: + remote_field_class: RemoteFieldRequestRemoteFieldClass + value: optional + source: + openapi: openapi/openapi.yml + RemoteKey: + docs: >- + # The RemoteKey Object + + ### Description + + The `RemoteKey` object is used to represent a request for a new remote + key. + + + ### Usage Example + + Post a `GenerateRemoteKey` to receive a new `RemoteKey`. + properties: + name: string + key: string + source: + openapi: openapi/openapi.yml + RemoteResponse: + docs: >- + # The RemoteResponse Object + + ### Description + + The `RemoteResponse` object is used to represent information returned from + a third-party endpoint. + + + ### Usage Example + + View the `RemoteResponse` returned from your `DataPassthrough`. + properties: + method: string + path: string + status: integer + response: unknown + response_headers: optional> + response_type: optional + headers: optional> + source: + openapi: openapi/openapi.yml + RequestFormatEnum: + enum: + - JSON + - XML + - MULTIPART + docs: |- + * `JSON` - JSON + * `XML` - XML + * `MULTIPART` - MULTIPART + source: + openapi: openapi/openapi.yml + ResponseTypeEnum: + enum: + - JSON + - BASE64_GZIP + docs: |- + * `JSON` - JSON + * `BASE64_GZIP` - BASE64_GZIP + source: + openapi: openapi/openapi.yml + Role: + docs: >- + # The Role Object + + ### Description + + The `Role` object is used to represent the set of actions & access that a + user with this role is allowed to perform. + + + ### Usage Example + + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The name of the Role. + ticket_actions: + type: optional> + docs: >- + The set of actions that a User with this Role can perform. Possible + enum values include: `VIEW`, `CREATE`, `EDIT`, `DELETE`, `CLOSE`, and + `ASSIGN`. + ticket_access: + type: optional + docs: |- + The level of Ticket access that a User with this Role can perform. + + * `ALL` - ALL + * `ASSIGNED_ONLY` - ASSIGNED_ONLY + * `TEAM_ONLY` - TEAM_ONLY + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + RoleEnum: + enum: + - ADMIN + - DEVELOPER + - MEMBER + - API + - SYSTEM + - MERGE_TEAM + docs: |- + * `ADMIN` - ADMIN + * `DEVELOPER` - DEVELOPER + * `MEMBER` - MEMBER + * `API` - API + * `SYSTEM` - SYSTEM + * `MERGE_TEAM` - MERGE_TEAM + source: + openapi: openapi/openapi.yml + SelectiveSyncConfigurationsUsageEnum: + enum: + - IN_NEXT_SYNC + - IN_LAST_SYNC + docs: |- + * `IN_NEXT_SYNC` - IN_NEXT_SYNC + * `IN_LAST_SYNC` - IN_LAST_SYNC + source: + openapi: openapi/openapi.yml + StatusFd5Enum: + enum: + - SYNCING + - DONE + - FAILED + - DISABLED + - PAUSED + - PARTIALLY_SYNCED + docs: |- + * `SYNCING` - SYNCING + * `DONE` - DONE + * `FAILED` - FAILED + * `DISABLED` - DISABLED + * `PAUSED` - PAUSED + * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED + source: + openapi: openapi/openapi.yml + SyncStatus: + docs: >- + # The SyncStatus Object + + ### Description + + The `SyncStatus` object is used to represent the syncing state of an + account + + + ### Usage Example + + View the `SyncStatus` for an account to see how recently its models were + synced. + properties: + model_name: string + model_id: string + last_sync_start: optional + next_sync_start: optional + last_sync_result: optional + last_sync_finished: optional + status: StatusFd5Enum + is_initial_sync: boolean + selective_sync_configurations_usage: optional + source: + openapi: openapi/openapi.yml + Tag: + docs: |- + # The Tag Object + ### Description + The `Tag` object is used to represent a tag or label for a ticket. + + ### Usage Example + TODO + properties: + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + id: + type: optional + validation: + format: uuid + access: read-only + name: + type: optional + docs: The tag's name. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + Team: + docs: >- + # The Team Object + + ### Description + + The `Team` object is used to represent one or more `Users` within the + company receiving the ticket. + + + ### Usage Example + + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The team's name. + description: + type: optional + docs: The team's description. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + TicketAssigneesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - User + source: + openapi: openapi/openapi.yml + inline: true + TicketAssignedTeamsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Team + source: + openapi: openapi/openapi.yml + inline: true + TicketCreator: + discriminated: false + docs: The user who created this ticket. + union: + - type: string + validation: + format: uuid + - User + source: + openapi: openapi/openapi.yml + inline: true + TicketCollectionsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Collection + source: + openapi: openapi/openapi.yml + inline: true + TicketAccount: + discriminated: false + docs: The account associated with the ticket. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: openapi/openapi.yml + inline: true + TicketContact: + discriminated: false + docs: The contact associated with the ticket. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: openapi/openapi.yml + inline: true + TicketParentTicket: + discriminated: false + docs: The ticket's parent ticket. + union: + - type: string + validation: + format: uuid + - Ticket + source: + openapi: openapi/openapi.yml + inline: true + TicketAttachmentsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Attachment + source: + openapi: openapi/openapi.yml + inline: true + Ticket: + docs: |- + # The Ticket Object + ### Description + The `Ticket` object is used to represent a ticket, issue, task or case. + ### Usage Example + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The ticket's name. + assignees: + type: optional>> + docs: >- + The individual `Users` who are assigned to this ticket. This does not + include `Users` who just have view access to this ticket. To fetch all + `Users` and `Teams` that can access the ticket, use the `GET + /tickets/{ticket_id}/viewers` + [endpoint](https://docs.merge.dev/ticketing/tickets/#tickets_viewers_list). + assigned_teams: + type: optional>> + docs: >- + The `Teams` that are assigned to this ticket. This does not include + `Teams` who just have view access to this ticket. To fetch all `Users` + and `Teams` that can access this ticket, use the `GET + /tickets/{ticket_id}/viewers` + [endpoint](https://docs.merge.dev/ticketing/tickets/#tickets_viewers_list). + creator: + type: optional + docs: The user who created this ticket. + due_date: + type: optional + docs: The ticket's due date. + status: + type: optional + docs: |- + The current status of the ticket. + + * `OPEN` - OPEN + * `CLOSED` - CLOSED + * `IN_PROGRESS` - IN_PROGRESS + * `ON_HOLD` - ON_HOLD + description: + type: optional + docs: >- + The ticket’s description. HTML version of description is mapped if + supported by the third-party platform. + collections: + type: optional>> + docs: The `Collections` that this `Ticket` is included in. + ticket_type: + type: optional + docs: >- + The sub category of the ticket within the 3rd party system. Examples + include incident, task, subtask or to-do. + account: + type: optional + docs: The account associated with the ticket. + contact: + type: optional + docs: The contact associated with the ticket. + parent_ticket: + type: optional + docs: The ticket's parent ticket. + attachments: optional>> + access_level: + type: optional + docs: >- + The description of who is able to access a given ticket, or where + access is inherited from. + + + * `COMPANY` - COMPANY + + * `PUBLIC` - PUBLIC + + * `PRIVATE` - PRIVATE + + * `COLLECTION` - COLLECTION + tags: optional>> + roles: optional>> + remote_created_at: + type: optional + docs: When the third party's ticket was created. + remote_updated_at: + type: optional + docs: When the third party's ticket was updated. + completed_at: + type: optional + docs: When the ticket was completed. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + ticket_url: + type: optional + docs: The 3rd party url of the Ticket. + validation: + format: uri + maxLength: 2000 + priority: + type: optional + docs: |- + The priority or urgency of the Ticket. + + * `URGENT` - URGENT + * `HIGH` - HIGH + * `NORMAL` - NORMAL + * `LOW` - LOW + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + remote_fields: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + TicketAccessEnum: + enum: + - ALL + - ASSIGNED_ONLY + - TEAM_ONLY + docs: |- + * `ALL` - ALL + * `ASSIGNED_ONLY` - ASSIGNED_ONLY + * `TEAM_ONLY` - TEAM_ONLY + source: + openapi: openapi/openapi.yml + TicketAccessLevelEnum: + enum: + - COMPANY + - PUBLIC + - PRIVATE + - COLLECTION + docs: |- + * `COMPANY` - COMPANY + * `PUBLIC` - PUBLIC + * `PRIVATE` - PRIVATE + * `COLLECTION` - COLLECTION + source: + openapi: openapi/openapi.yml + TicketActionsEnum: + enum: + - VIEW + - CREATE + - EDIT + - DELETE + - CLOSE + - ASSIGN + docs: |- + * `VIEW` - VIEW + * `CREATE` - CREATE + * `EDIT` - EDIT + * `DELETE` - DELETE + * `CLOSE` - CLOSE + * `ASSIGN` - ASSIGN + source: + openapi: openapi/openapi.yml + TicketRequestAssigneesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - User + source: + openapi: openapi/openapi.yml + inline: true + TicketRequestAssignedTeamsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Team + source: + openapi: openapi/openapi.yml + inline: true + TicketRequestCreator: + discriminated: false + docs: The user who created this ticket. + union: + - type: string + validation: + format: uuid + - User + source: + openapi: openapi/openapi.yml + inline: true + TicketRequestCollectionsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Collection + source: + openapi: openapi/openapi.yml + inline: true + TicketRequestAccount: + discriminated: false + docs: The account associated with the ticket. + union: + - type: string + validation: + format: uuid + - Account + source: + openapi: openapi/openapi.yml + inline: true + TicketRequestContact: + discriminated: false + docs: The contact associated with the ticket. + union: + - type: string + validation: + format: uuid + - Contact + source: + openapi: openapi/openapi.yml + inline: true + TicketRequestParentTicket: + discriminated: false + docs: The ticket's parent ticket. + union: + - type: string + validation: + format: uuid + - Ticket + source: + openapi: openapi/openapi.yml + inline: true + TicketRequestAttachmentsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Attachment + source: + openapi: openapi/openapi.yml + inline: true + TicketRequest: + docs: |- + # The Ticket Object + ### Description + The `Ticket` object is used to represent a ticket, issue, task or case. + ### Usage Example + TODO + properties: + name: + type: optional + docs: The ticket's name. + assignees: + type: optional>> + docs: >- + The individual `Users` who are assigned to this ticket. This does not + include `Users` who just have view access to this ticket. To fetch all + `Users` and `Teams` that can access the ticket, use the `GET + /tickets/{ticket_id}/viewers` + [endpoint](https://docs.merge.dev/ticketing/tickets/#tickets_viewers_list). + assigned_teams: + type: optional>> + docs: >- + The `Teams` that are assigned to this ticket. This does not include + `Teams` who just have view access to this ticket. To fetch all `Users` + and `Teams` that can access this ticket, use the `GET + /tickets/{ticket_id}/viewers` + [endpoint](https://docs.merge.dev/ticketing/tickets/#tickets_viewers_list). + creator: + type: optional + docs: The user who created this ticket. + due_date: + type: optional + docs: The ticket's due date. + status: + type: optional + docs: |- + The current status of the ticket. + + * `OPEN` - OPEN + * `CLOSED` - CLOSED + * `IN_PROGRESS` - IN_PROGRESS + * `ON_HOLD` - ON_HOLD + description: + type: optional + docs: >- + The ticket’s description. HTML version of description is mapped if + supported by the third-party platform. + collections: + type: optional>> + docs: The `Collections` that this `Ticket` is included in. + ticket_type: + type: optional + docs: >- + The sub category of the ticket within the 3rd party system. Examples + include incident, task, subtask or to-do. + account: + type: optional + docs: The account associated with the ticket. + contact: + type: optional + docs: The contact associated with the ticket. + parent_ticket: + type: optional + docs: The ticket's parent ticket. + attachments: optional>> + access_level: + type: optional + docs: >- + The description of who is able to access a given ticket, or where + access is inherited from. + + + * `COMPANY` - COMPANY + + * `PUBLIC` - PUBLIC + + * `PRIVATE` - PRIVATE + + * `COLLECTION` - COLLECTION + tags: optional>> + roles: optional>> + completed_at: + type: optional + docs: When the ticket was completed. + ticket_url: + type: optional + docs: The 3rd party url of the Ticket. + validation: + format: uri + maxLength: 2000 + priority: + type: optional + docs: |- + The priority or urgency of the Ticket. + + * `URGENT` - URGENT + * `HIGH` - HIGH + * `NORMAL` - NORMAL + * `LOW` - LOW + integration_params: + type: optional> + access: write-only + linked_account_params: + type: optional> + access: write-only + remote_fields: + type: optional> + access: write-only + source: + openapi: openapi/openapi.yml + TicketResponse: + properties: + model: Ticket + warnings: list + errors: list + logs: optional> + source: + openapi: openapi/openapi.yml + TicketStatusEnum: + enum: + - OPEN + - CLOSED + - IN_PROGRESS + - ON_HOLD + docs: |- + * `OPEN` - OPEN + * `CLOSED` - CLOSED + * `IN_PROGRESS` - IN_PROGRESS + * `ON_HOLD` - ON_HOLD + source: + openapi: openapi/openapi.yml + TicketingAttachmentResponse: + properties: + model: Attachment + warnings: list + errors: list + logs: optional> + source: + openapi: openapi/openapi.yml + TicketingContactResponse: + properties: + model: Contact + warnings: list + errors: list + logs: optional> + source: + openapi: openapi/openapi.yml + UserTeamsItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Team + source: + openapi: openapi/openapi.yml + inline: true + UserRolesItem: + discriminated: false + union: + - type: string + validation: + format: uuid + - Role + source: + openapi: openapi/openapi.yml + inline: true + User: + docs: >- + # The User Object + + ### Description + + The `User` object is used to represent a user with a login to the + ticketing system. + + Users are either assignees who are directly responsible or a viewer on a + `Ticket`/ `Collection`. + + + ### Usage Example + + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + name: + type: optional + docs: The user's name. + email_address: + type: optional + docs: The user's email address. + is_active: + type: optional + docs: Whether or not the user is active. + teams: optional>> + roles: optional>> + avatar: + type: optional + docs: The user's avatar picture. + remote_was_deleted: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium add-on. + Native deletion detection is offered for free with limited coverage. + [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + access: read-only + field_mappings: + type: optional> + access: read-only + remote_data: + type: optional> + access: read-only + source: + openapi: openapi/openapi.yml + ValidationProblemSource: + properties: + pointer: string + source: + openapi: openapi/openapi.yml + ViewerTeam: + discriminated: false + docs: The Team this Viewer belongs to. + union: + - type: string + validation: + format: uuid + - Team + source: + openapi: openapi/openapi.yml + inline: true + ViewerUser: + discriminated: false + docs: The User this Viewer belongs to. + union: + - type: string + validation: + format: uuid + - User + source: + openapi: openapi/openapi.yml + inline: true + Viewer: + docs: |- + # The Viewer Object + ### Description + The `Viewer` object is used to represent a User or Team within a company. + + ### Usage Example + TODO + properties: + id: + type: optional + validation: + format: uuid + access: read-only + remote_id: + type: optional + docs: The third-party API ID of the matching object. + created_at: + type: optional + docs: The datetime that this object was created by Merge. + access: read-only + modified_at: + type: optional + docs: The datetime that this object was modified by Merge. + access: read-only + team: + type: optional + docs: The Team this Viewer belongs to. + user: + type: optional + docs: The User this Viewer belongs to. + source: + openapi: openapi/openapi.yml + WarningValidationProblem: + properties: + source: optional + title: string + detail: string + problem_type: string + source: + openapi: openapi/openapi.yml + WebhookReceiver: + properties: + event: string + is_active: boolean + key: optional + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ticketing/accountDetails.yml b/.mock/definition/ticketing/accountDetails.yml new file mode 100644 index 0000000..1cd26dd --- /dev/null +++ b/.mock/definition/ticketing/accountDetails.yml @@ -0,0 +1,36 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + retrieve: + path: /ticketing/v1/account-details + method: GET + auth: true + docs: Get details for a linked account. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.AccountDetails + status-code: 200 + examples: + - headers: {} + response: + body: + id: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd + integration: BambooHR + integration_slug: bamboohr + category: hris + end_user_origin_id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + end_user_organization_name: Waystar Royco + end_user_email_address: kendall.roy@waystar-royco.com + status: COMPLETE + webhook_listener_url: >- + https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 + is_duplicate: true + account_type: PRODUCTION + completed_at: '2024-08-26T20:11:19Z' + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ticketing/accountToken.yml b/.mock/definition/ticketing/accountToken.yml new file mode 100644 index 0000000..e3b505e --- /dev/null +++ b/.mock/definition/ticketing/accountToken.yml @@ -0,0 +1,44 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + retrieve: + path: /ticketing/v1/account-token/{public_token} + method: GET + auth: true + docs: >- + Returns the account token for the end user with the provided public + token. + source: + openapi: openapi/openapi.yml + path-parameters: + public_token: string + response: + docs: '' + type: root.AccountToken + status-code: 200 + examples: + - path-parameters: + public_token: public_token + response: + body: + account_token: T9klMDQrcHdm9jrtHuOS2Nf06BIHwMNjpPXPMB + integration: + name: name + abbreviated_name: abbreviated_name + categories: + - hris + image: image + square_image: square_image + color: color + slug: slug + api_endpoints_to_documentation_urls: + key: value + webhook_setup_guide_url: webhook_setup_guide_url + category_beta_status: + key: value + id: 0496d4c2-42e6-4072-80b3-7b69bfdc76fd + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ticketing/accounts.yml b/.mock/definition/ticketing/accounts.yml new file mode 100644 index 0000000..9dc3f7a --- /dev/null +++ b/.mock/definition/ticketing/accounts.yml @@ -0,0 +1,142 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ticketing/v1/accounts + method: GET + auth: true + docs: Returns a list of `Account` objects. + source: + openapi: openapi/openapi.yml + request: + name: AccountsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: root.PaginatedAccountList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 17a54124-287f-494d-965e-3c5b330c9a68 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Waystar Royco + domains: + - waystar-royco.com + - royco.com + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + retrieve: + path: /ticketing/v1/accounts/{id} + method: GET + auth: true + docs: Returns an `Account` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: AccountsRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.Account + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 17a54124-287f-494d-965e-3c5b330c9a68 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Waystar Royco + domains: + - waystar-royco.com + - royco.com + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /actions + data: + - Varies by platform + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ticketing/asyncPassthrough.yml b/.mock/definition/ticketing/asyncPassthrough.yml new file mode 100644 index 0000000..0a2001f --- /dev/null +++ b/.mock/definition/ticketing/asyncPassthrough.yml @@ -0,0 +1,70 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /ticketing/v1/async-passthrough + method: POST + auth: true + docs: >- + Asynchronously pull data from an endpoint not currently supported by + Merge. + source: + openapi: openapi/openapi.yml + request: + body: root.DataPassthroughRequest + content-type: application/json + response: + docs: '' + type: root.AsyncPassthroughReciept + status-code: 200 + examples: + - headers: {} + request: + method: GET + path: /scooters + response: + body: + async_passthrough_receipt_id: fd29020f-2695-445e-922e-dcd5e81903fd + retrieve: + path: /ticketing/v1/async-passthrough/{async_passthrough_receipt_id} + method: GET + auth: true + docs: Retrieves data from earlier async-passthrough POST request + source: + openapi: openapi/openapi.yml + path-parameters: + async_passthrough_receipt_id: string + response: + docs: '' + type: AsyncPassthroughRetrieveResponse + status-code: 200 + examples: + - path-parameters: + async_passthrough_receipt_id: async_passthrough_receipt_id + headers: {} + response: + body: + method: GET + path: /scooters + status: 200 + response: + key: value + response_headers: + X-Page-Token: value + response_type: JSON + headers: + EXTRA-HEADER: value + Authorization: + source: + openapi: openapi/openapi.yml +types: + AsyncPassthroughRetrieveResponse: + discriminated: false + union: + - root.RemoteResponse + - string + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ticketing/attachments.yml b/.mock/definition/ticketing/attachments.yml new file mode 100644 index 0000000..9a8a8a9 --- /dev/null +++ b/.mock/definition/ticketing/attachments.yml @@ -0,0 +1,446 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ticketing/v1/attachments + method: GET + auth: true + docs: Returns a list of `Attachment` objects. + source: + openapi: openapi/openapi.yml + request: + name: AttachmentsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_created_after: + type: optional + docs: >- + If provided, will only return attachments created in the third + party platform after this datetime. + remote_id: + type: optional + docs: The API provider's ID for the given object. + ticket_id: + type: optional + docs: If provided, will only return comments for this ticket. + response: + docs: '' + type: root.PaginatedAttachmentList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 17a54124-287f-494d-965e-3c5b330c9a68 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + file_name: Screenshot.png + ticket: ticket + file_url: http://alturl.com/p749b + content_type: jpeg + uploaded_by: 28b54125-287f-494d-965e-3c5b330c9a68 + remote_created_at: '2022-11-10T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + create: + path: /ticketing/v1/attachments + method: POST + auth: true + docs: Creates an `Attachment` object with the given values. + source: + openapi: openapi/openapi.yml + request: + name: TicketingAttachmentEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: root.AttachmentRequest + content-type: application/json + response: + docs: '' + type: root.TicketingAttachmentResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: 17a54124-287f-494d-965e-3c5b330c9a68 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + file_name: Screenshot.png + ticket: ticket + file_url: http://alturl.com/p749b + content_type: jpeg + uploaded_by: 28b54125-287f-494d-965e-3c5b330c9a68 + remote_created_at: '2022-11-10T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /ticketing/v1/attachments/{id} + method: GET + auth: true + docs: Returns an `Attachment` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: AttachmentsRetrieveRequest + query-parameters: + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.Attachment + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 17a54124-287f-494d-965e-3c5b330c9a68 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + file_name: Screenshot.png + ticket: ticket + file_url: http://alturl.com/p749b + content_type: jpeg + uploaded_by: 28b54125-287f-494d-965e-3c5b330c9a68 + remote_created_at: '2022-11-10T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + data: + key: value + downloadRetrieve: + path: /ticketing/v1/attachments/{id}/download + method: GET + auth: true + docs: Returns the `File` content with the given `id` as a stream of bytes. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: AttachmentsDownloadRetrieveRequest + query-parameters: + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + mime_type: + type: optional + docs: >- + If provided, specifies the export format of the file to be + downloaded. For information on supported export formats, please + refer to our export format help center article. + response: + docs: '' + type: file + status-code: 200 + metaPostRetrieve: + path: /ticketing/v1/attachments/meta/post + method: GET + auth: true + docs: Returns metadata for `TicketingAttachment` POSTs. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ticketing/auditTrail.yml b/.mock/definition/ticketing/auditTrail.yml new file mode 100644 index 0000000..82660fa --- /dev/null +++ b/.mock/definition/ticketing/auditTrail.yml @@ -0,0 +1,94 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ticketing/v1/audit-trail + method: GET + auth: true + docs: Gets a list of audit trail events. + source: + openapi: openapi/openapi.yml + request: + name: AuditTrailListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + end_date: + type: optional + docs: >- + If included, will only include audit trail events that occurred + before this time + event_type: + type: optional + docs: >- + 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`, + `REGENERATED_WEBHOOK_SIGNATURE`, `INVITED_USER`, + `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, + `DELETED_LINKED_ACCOUNT`, + `DELETED_ALL_COMMON_MODELS_FOR_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`, + `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, + `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, + `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, + `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, + `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, + `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, + `END_USER_CREDENTIALS_ACCESSED` + page_size: + type: optional + docs: Number of results to return per page. + start_date: + type: optional + docs: >- + If included, will only include audit trail events that occurred + after this time + user_email: + type: optional + docs: >- + If provided, this will return events associated with the specified + user email. Please note that the email address reflects the user's + email at the time of the event, and may not be their current + email. + response: + docs: '' + type: root.PaginatedAuditLogEventList + status-code: 200 + examples: + - response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: b5ceea2a-7171-47ce-8090-165cfce5572c + user_name: Gil Feig + user_email: hello@merge.dev + role: ADMIN + ip_address: 192.0.2.123 + event_type: CREATED_REMOTE_PRODUCTION_API_KEY + event_description: >- + Organization-wide Scopes for model hris.Employee updated + from Read to Read+Write + created_at: '2024-01-15T09:30:00Z' + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ticketing/availableActions.yml b/.mock/definition/ticketing/availableActions.yml new file mode 100644 index 0000000..745b76c --- /dev/null +++ b/.mock/definition/ticketing/availableActions.yml @@ -0,0 +1,50 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + retrieve: + path: /ticketing/v1/available-actions + method: GET + auth: true + docs: Returns a list of models and actions available for an account. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.AvailableActions + status-code: 200 + examples: + - headers: {} + response: + body: + integration: + name: name + abbreviated_name: abbreviated_name + categories: + - hris + image: image + square_image: square_image + color: color + slug: slug + api_endpoints_to_documentation_urls: + key: value + webhook_setup_guide_url: webhook_setup_guide_url + category_beta_status: + key: value + passthrough_available: true + available_model_operations: + - model_name: Candidate + available_operations: + - FETCH + - CREATE + required_post_parameters: + - remote_user_id + supported_fields: + - first_name + - last_name + - company + - title + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ticketing/collections.yml b/.mock/definition/ticketing/collections.yml new file mode 100644 index 0000000..dbf6f13 --- /dev/null +++ b/.mock/definition/ticketing/collections.yml @@ -0,0 +1,253 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ticketing/v1/collections + method: GET + auth: true + docs: Returns a list of `Collection` objects. + source: + openapi: openapi/openapi.yml + request: + name: CollectionsListRequest + query-parameters: + collection_type: + type: optional + docs: If provided, will only return collections of the given type. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + parent_collection_id: + type: optional + docs: >- + If provided, will only return collections whose parent collection + matches the given id. + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + remote_id: + type: optional + docs: The API provider's ID for the given object. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: root.PaginatedCollectionList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: fb8c55b6-1cb8-4b4c-9fb6-17924231619d + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Q1 Platform + description: For tracking all tasks related to Platform for Q1 + access_level: PRIVATE + collection_type: LIST + parent_collection: parent_collection + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + viewersList: + path: /ticketing/v1/collections/{collection_id}/viewers + method: GET + auth: true + docs: >- + Returns a list of `Viewer` objects that point to a User id or Team id + that is either an assignee or viewer on a `Collection` with the given + id. [Learn + more.](https://help.merge.dev/en/articles/10333658-ticketing-access-control-list-acls) + source: + openapi: openapi/openapi.yml + path-parameters: + collection_id: string + request: + name: CollectionsViewersListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: root.PaginatedViewerList + status-code: 200 + examples: + - path-parameters: + collection_id: collection_id + headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 17a54124-287f-494d-965e-3c5b330c9a68 + remote_id: '088899' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + team: team + user: user + retrieve: + path: /ticketing/v1/collections/{id} + method: GET + auth: true + docs: Returns a `Collection` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: CollectionsRetrieveRequest + query-parameters: + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional> + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional> + docs: >- + 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) + response: + docs: '' + type: root.Collection + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: fb8c55b6-1cb8-4b4c-9fb6-17924231619d + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Q1 Platform + description: For tracking all tasks related to Platform for Q1 + access_level: PRIVATE + collection_type: LIST + parent_collection: parent_collection + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + data: + key: value + source: + openapi: openapi/openapi.yml +types: + CollectionsViewersListRequestExpand: + enum: + - team + - user + - value: user,team + name: UserTeam + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ticketing/comments.yml b/.mock/definition/ticketing/comments.yml new file mode 100644 index 0000000..71a70dc --- /dev/null +++ b/.mock/definition/ticketing/comments.yml @@ -0,0 +1,461 @@ +types: + CommentsListRequestExpand: + enum: + - contact + - value: contact,ticket + name: ContactTicket + - ticket + - user + - value: user,contact + name: UserContact + - value: user,contact,ticket + name: UserContactTicket + - value: user,ticket + name: UserTicket + source: + openapi: openapi/openapi.yml + CommentsRetrieveRequestExpand: + enum: + - contact + - value: contact,ticket + name: ContactTicket + - ticket + - user + - value: user,contact + name: UserContact + - value: user,contact,ticket + name: UserContactTicket + - value: user,ticket + name: UserTicket + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ticketing/v1/comments + method: GET + auth: true + docs: Returns a list of `Comment` objects. + source: + openapi: openapi/openapi.yml + request: + name: CommentsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_created_after: + type: optional + docs: >- + If provided, will only return Comments created in the third party + platform after this datetime. + remote_id: + type: optional + docs: The API provider's ID for the given object. + ticket_id: + type: optional + docs: If provided, will only return comments for this ticket. + response: + docs: '' + type: root.PaginatedCommentList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 0958cbc6-6040-430a-848e-aafacbadf4ae + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + user: user + contact: contact + 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. + ticket: ticket + is_private: true + remote_created_at: '1990-11-10T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + create: + path: /ticketing/v1/comments + method: POST + auth: true + docs: Creates a `Comment` object with the given values. + source: + openapi: openapi/openapi.yml + request: + name: CommentEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: root.CommentRequest + content-type: application/json + response: + docs: '' + type: root.CommentResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: 0958cbc6-6040-430a-848e-aafacbadf4ae + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + user: user + contact: contact + 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. + ticket: ticket + is_private: true + remote_created_at: '1990-11-10T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /ticketing/v1/comments/{id} + method: GET + auth: true + docs: Returns a `Comment` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: CommentsRetrieveRequest + query-parameters: + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.Comment + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 0958cbc6-6040-430a-848e-aafacbadf4ae + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + user: user + contact: contact + 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. + ticket: ticket + is_private: true + remote_created_at: '1990-11-10T00:00:00Z' + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + data: + key: value + metaPostRetrieve: + path: /ticketing/v1/comments/meta/post + method: GET + auth: true + docs: Returns metadata for `Comment` POSTs. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ticketing/contacts.yml b/.mock/definition/ticketing/contacts.yml new file mode 100644 index 0000000..e4a13d7 --- /dev/null +++ b/.mock/definition/ticketing/contacts.yml @@ -0,0 +1,406 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ticketing/v1/contacts + method: GET + auth: true + docs: Returns a list of `Contact` objects. + source: + openapi: openapi/openapi.yml + request: + name: ContactsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: root.PaginatedContactList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 17a54124-287f-494d-965e-3c5b330c9a68 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Cousin Greg + email_address: greg@waystar-royco.com + phone_number: '5108890293' + details: Executive Assistant to Tom Wambsgans + account: account + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + create: + path: /ticketing/v1/contacts + method: POST + auth: true + docs: Creates a `Contact` object with the given values. + source: + openapi: openapi/openapi.yml + request: + name: TicketingContactEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: root.ContactRequest + content-type: application/json + response: + docs: '' + type: root.TicketingContactResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: 17a54124-287f-494d-965e-3c5b330c9a68 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Cousin Greg + email_address: greg@waystar-royco.com + phone_number: '5108890293' + details: Executive Assistant to Tom Wambsgans + account: account + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /ticketing/v1/contacts/{id} + method: GET + auth: true + docs: Returns a `Contact` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: ContactsRetrieveRequest + query-parameters: + expand: + type: optional> + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.Contact + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 17a54124-287f-494d-965e-3c5b330c9a68 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Cousin Greg + email_address: greg@waystar-royco.com + phone_number: '5108890293' + details: Executive Assistant to Tom Wambsgans + account: account + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + data: + key: value + metaPostRetrieve: + path: /ticketing/v1/contacts/meta/post + method: GET + auth: true + docs: Returns metadata for `TicketingContact` POSTs. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ticketing/deleteAccount.yml b/.mock/definition/ticketing/deleteAccount.yml new file mode 100644 index 0000000..b2d1911 --- /dev/null +++ b/.mock/definition/ticketing/deleteAccount.yml @@ -0,0 +1,15 @@ +service: + auth: false + base-path: '' + endpoints: + delete: + path: /ticketing/v1/delete-account + method: POST + auth: true + docs: Delete a linked account. + source: + openapi: openapi/openapi.yml + examples: + - headers: {} + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ticketing/fieldMapping.yml b/.mock/definition/ticketing/fieldMapping.yml new file mode 100644 index 0000000..3051c3f --- /dev/null +++ b/.mock/definition/ticketing/fieldMapping.yml @@ -0,0 +1,722 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + field_mappings_retrieve: + path: /ticketing/v1/field-mappings + method: GET + auth: true + docs: >- + Get all Field Mappings for this Linked Account. Field Mappings are + mappings between third-party Remote Fields and user defined Merge + fields. [Learn + more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). + source: + openapi: openapi/openapi.yml + request: + name: FieldMappingsRetrieveRequest + query-parameters: + exclude_remote_field_metadata: + type: optional + docs: >- + If `true`, remote fields metadata is excluded from each field + mapping instance (i.e. `remote_fields.remote_key_name` and + `remote_fields.schema` will be null). This will increase the speed + of the request since these fields require some calculations. + response: + docs: '' + type: root.FieldMappingApiInstanceResponse + status-code: 200 + examples: + - headers: {} + response: + body: + Ticket: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Comment: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Project: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Collection: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + User: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Role: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Account: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Team: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Attachment: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Tag: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + Contact: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + field_mappings_create: + path: /ticketing/v1/field-mappings + method: POST + auth: true + docs: >- + Create new Field Mappings that will be available after the next + scheduled sync. This will cause the next sync for this Linked Account to + sync **ALL** data from start. + source: + openapi: openapi/openapi.yml + request: + name: CreateFieldMappingRequest + query-parameters: + exclude_remote_field_metadata: + type: optional + docs: >- + If `true`, remote fields metadata is excluded from each field + mapping instance (i.e. `remote_fields.remote_key_name` and + `remote_fields.schema` will be null). This will increase the speed + of the request since these fields require some calculations. + body: + properties: + target_field_name: + type: string + docs: >- + The name of the target field you want this remote field to map + to. + validation: + minLength: 1 + target_field_description: + type: string + docs: >- + The description of the target field you want this remote field + to map to. + validation: + minLength: 1 + remote_field_traversal_path: + docs: >- + The field traversal path of the remote field listed when you hit + the GET /remote-fields endpoint. + type: list + remote_method: + type: string + docs: >- + The method of the remote endpoint where the remote field is + coming from. + validation: + minLength: 1 + remote_url_path: + type: string + docs: >- + The path of the remote endpoint where the remote field is coming + from. + validation: + minLength: 1 + common_model_name: + type: string + docs: >- + The name of the Common Model that the remote field corresponds + to in a given category. + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: root.FieldMappingInstanceResponse + status-code: 201 + examples: + - headers: {} + request: + target_field_name: example_target_field_name + target_field_description: this is a example description of the target field + remote_field_traversal_path: + - example_remote_field + remote_method: GET + remote_url_path: /example-url-path + common_model_name: ExampleCommonModel + response: + body: + model: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + field_mappings_destroy: + path: /ticketing/v1/field-mappings/{field_mapping_id} + method: DELETE + auth: true + docs: >- + Deletes Field Mappings for a Linked Account. All data related to this + Field Mapping will be deleted and these changes will be reflected after + the next scheduled sync. This will cause the next sync for this Linked + Account to sync **ALL** data from start. + source: + openapi: openapi/openapi.yml + path-parameters: + field_mapping_id: string + response: + docs: '' + type: root.FieldMappingInstanceResponse + status-code: 204 + examples: + - path-parameters: + field_mapping_id: field_mapping_id + headers: {} + response: + body: + model: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + field_mappings_partial_update: + path: /ticketing/v1/field-mappings/{field_mapping_id} + method: PATCH + auth: true + docs: >- + Create or update existing Field Mappings for a Linked Account. Changes + will be reflected after the next scheduled sync. This will cause the + next sync for this Linked Account to sync **ALL** data from start. + source: + openapi: openapi/openapi.yml + path-parameters: + field_mapping_id: string + request: + name: PatchedEditFieldMappingRequest + body: + properties: + remote_field_traversal_path: + type: optional> + docs: >- + The field traversal path of the remote field listed when you hit + the GET /remote-fields endpoint. + remote_method: + type: optional + docs: >- + The method of the remote endpoint where the remote field is + coming from. + validation: + minLength: 1 + remote_url_path: + type: optional + docs: >- + The path of the remote endpoint where the remote field is coming + from. + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: root.FieldMappingInstanceResponse + status-code: 200 + examples: + - path-parameters: + field_mapping_id: field_mapping_id + headers: {} + request: {} + response: + body: + model: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + is_integration_wide: true + target_field: + name: example_target_field_name + description: this is a example description of a target field + is_organization_wide: true + remote_field: + remote_key_name: example_remote_field_key + schema: + type: string + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_remote_field_key + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + remote_fields_retrieve: + path: /ticketing/v1/remote-fields + method: GET + auth: true + docs: >- + Get all remote fields for a Linked Account. Remote fields are + third-party fields that are accessible after initial sync if remote_data + is enabled. You can use remote fields to override existing Merge fields + or map a new Merge field. [Learn + more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). + source: + openapi: openapi/openapi.yml + request: + name: RemoteFieldsRetrieveRequest + query-parameters: + common_models: + type: optional + docs: >- + A comma seperated list of Common Model names. If included, will + only return Remote Fields for those Common Models. + include_example_values: + type: optional + docs: >- + If true, will include example values, where available, for remote + fields in the 3rd party platform. These examples come from active + data from your customers. + response: + docs: '' + type: root.RemoteFieldApiResponse + status-code: 200 + examples: + - headers: {} + response: + body: + Ticket: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Comment: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Project: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Collection: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + User: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Role: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Account: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Team: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Attachment: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Tag: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + Contact: + - schema: + type: string + remote_key_name: example_remote_key_name + remote_endpoint_info: + method: GET + url_path: /example-url-path + field_traversal_path: + - example_key_name + example_values: + - example + advanced_metadata: + id: id + coverage: 1 + target_fields_retrieve: + path: /ticketing/v1/target-fields + method: GET + auth: true + docs: >- + Get all organization-wide Target Fields, this will not include any + Linked Account specific Target Fields. Organization-wide Target Fields + are additional fields appended to the Merge Common Model for all Linked + Accounts in a category. [Learn + more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.ExternalTargetFieldApiResponse + status-code: 200 + examples: + - headers: {} + response: + body: + Ticket: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Comment: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Project: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Collection: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + User: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Role: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Account: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Team: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Attachment: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Tag: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + Contact: + - name: example_target_field_name + description: this is a example description of a target field + is_mapped: is_mapped + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ticketing/forceResync.yml b/.mock/definition/ticketing/forceResync.yml new file mode 100644 index 0000000..a9669fa --- /dev/null +++ b/.mock/definition/ticketing/forceResync.yml @@ -0,0 +1,37 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + sync_status_resync_create: + path: /ticketing/v1/sync-status/resync + method: POST + auth: true + docs: >- + Force re-sync of all models. This endpoint is available for monthly, + quarterly, and highest sync frequency customers on the Professional or + Enterprise plans. Doing so will consume a sync credit for the relevant + linked account. Force re-syncs can also be triggered manually in the + Merge Dashboard and is available for all customers. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: list + status-code: 200 + examples: + - headers: {} + response: + body: + - model_name: Ticket + model_id: ticketing.Ticket + last_sync_start: '2021-03-30T19:44:18Z' + next_sync_start: '2021-03-30T20:44:18Z' + last_sync_result: SYNCING + last_sync_finished: '2021-03-30T19:55:18Z' + status: SYNCING + is_initial_sync: true + selective_sync_configurations_usage: IN_NEXT_SYNC + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ticketing/generateKey.yml b/.mock/definition/ticketing/generateKey.yml new file mode 100644 index 0000000..54e7585 --- /dev/null +++ b/.mock/definition/ticketing/generateKey.yml @@ -0,0 +1,36 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /ticketing/v1/generate-key + method: POST + auth: true + docs: Create a remote key. + source: + openapi: openapi/openapi.yml + request: + name: GenerateRemoteKeyRequest + body: + properties: + name: + type: string + docs: The name of the remote key + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: root.RemoteKey + status-code: 200 + examples: + - request: + name: Remote Deployment Key 1 + response: + body: + name: Remote Deployment Key 1 + key: hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ticketing/issues.yml b/.mock/definition/ticketing/issues.yml new file mode 100644 index 0000000..badd03c --- /dev/null +++ b/.mock/definition/ticketing/issues.yml @@ -0,0 +1,129 @@ +types: + IssuesListRequestStatus: + enum: + - ONGOING + - RESOLVED + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ticketing/v1/issues + method: GET + auth: true + docs: Gets all issues for Organization. + source: + openapi: openapi/openapi.yml + request: + name: IssuesListRequest + query-parameters: + account_token: optional + cursor: + type: optional + docs: The pagination cursor value. + end_date: + type: optional + docs: >- + If included, will only include issues whose most recent action + occurred before this time + end_user_organization_name: optional + first_incident_time_after: + type: optional + docs: >- + If provided, will only return issues whose first incident time was + after this datetime. + first_incident_time_before: + type: optional + docs: >- + If provided, will only return issues whose first incident time was + before this datetime. + include_muted: + type: optional + docs: If true, will include muted issues + integration_name: optional + last_incident_time_after: + type: optional + docs: >- + If provided, will only return issues whose last incident time was + after this datetime. + last_incident_time_before: + type: optional + docs: >- + If provided, will only return issues whose last incident time was + before this datetime. + linked_account_id: + type: optional + docs: >- + If provided, will only include issues pertaining to the linked + account passed in. + page_size: + type: optional + docs: Number of results to return per page. + start_date: + type: optional + docs: >- + If included, will only include issues whose most recent action + occurred after this time + status: + type: optional + docs: |- + Status of the issue. Options: ('ONGOING', 'RESOLVED') + + * `ONGOING` - ONGOING + * `RESOLVED` - RESOLVED + response: + docs: '' + type: root.PaginatedIssueList + status-code: 200 + examples: + - response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + status: ONGOING + error_description: Missing Permissions + end_user: + key: value + first_incident_time: '2022-12-05T16:19:15Z' + last_incident_time: '2022-12-05T16:19:15Z' + is_muted: true + error_details: + - Missing employee permissions. + - Missing time off permissions. + retrieve: + path: /ticketing/v1/issues/{id} + method: GET + auth: true + docs: Get a specific issue. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + response: + docs: '' + type: root.Issue + status-code: 200 + examples: + - path-parameters: + id: id + response: + body: + id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + status: ONGOING + error_description: Missing Permissions + end_user: + key: value + first_incident_time: '2022-12-05T16:19:15Z' + last_incident_time: '2022-12-05T16:19:15Z' + is_muted: true + error_details: + - Missing employee permissions. + - Missing time off permissions. + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ticketing/linkToken.yml b/.mock/definition/ticketing/linkToken.yml new file mode 100644 index 0000000..0ad3ad1 --- /dev/null +++ b/.mock/definition/ticketing/linkToken.yml @@ -0,0 +1,135 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /ticketing/v1/link-token + method: POST + auth: true + docs: Creates a link token to be used when linking a new end user. + source: + openapi: openapi/openapi.yml + request: + name: EndUserDetailsRequest + body: + properties: + end_user_email_address: + type: string + docs: >- + Your end user's email address. This is purely for identification + purposes - setting this value will not cause any emails to be + sent. + validation: + minLength: 1 + maxLength: 100 + end_user_organization_name: + type: string + docs: Your end user's organization. + validation: + minLength: 1 + maxLength: 100 + end_user_origin_id: + type: string + docs: >- + This unique identifier typically represents the ID for your end + user in your product's database. This value must be distinct + from other Linked Accounts' unique identifiers. + validation: + minLength: 1 + maxLength: 100 + categories: + docs: The integration categories to show in Merge Link. + type: list + integration: + type: optional + docs: >- + The slug of a specific pre-selected integration for this linking + flow token. For examples of slugs, see + https://docs.merge.dev/guides/merge-link/single-integration/. + validation: + minLength: 1 + link_expiry_mins: + type: optional + docs: >- + An integer number of minutes between [30, 720 or 10080 if for a + Magic Link URL] for how long this token is valid. Defaults to + 30. + default: 30 + validation: + min: 30 + max: 10080 + should_create_magic_link_url: + type: optional + docs: >- + Whether to generate a Magic Link URL. Defaults to false. For + more information on Magic Link, see + https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. + default: false + hide_admin_magic_link: + type: optional + docs: >- + Whether to generate a Magic Link URL on the Admin Needed screen + during the linking flow. Defaults to false. For more information + on Magic Link, see + https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. + default: false + common_models: + type: optional> + docs: >- + An array of objects to specify the models and fields that will + be disabled for a given Linked Account. Each object uses + model_id, enabled_actions, and disabled_fields to specify the + model, method, and fields that are scoped for a given Linked + Account. + category_common_model_scopes: + type: >- + optional>>> + docs: >- + 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: + type: optional + docs: >- + The following subset of IETF language tags can be used to + configure localization. + + + * `en` - en + + * `de` - de + are_syncs_disabled: + type: optional + docs: >- + The boolean that indicates whether initial, periodic, and force + syncs will be disabled. + default: false + integration_specific_config: + type: optional> + docs: >- + A JSON object containing integration-specific configuration + options. + content-type: application/json + response: + docs: '' + type: root.LinkToken + status-code: 200 + examples: + - request: + end_user_email_address: example@gmail.com + end_user_organization_name: Test Organization + end_user_origin_id: '12345' + categories: + - hris + - ats + response: + body: + link_token: necdP7FtdASl1fQwm62be2_dM4wBG8_GactqoUV0 + integration_name: Lever + magic_link_url: https://link.merge.dev/asdfjkl12345jsndfgi2i83n + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ticketing/linkedAccounts.yml b/.mock/definition/ticketing/linkedAccounts.yml new file mode 100644 index 0000000..072cf0e --- /dev/null +++ b/.mock/definition/ticketing/linkedAccounts.yml @@ -0,0 +1,150 @@ +types: + LinkedAccountsListRequestCategory: + enum: + - accounting + - ats + - crm + - filestorage + - hris + - mktg + - ticketing + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ticketing/v1/linked-accounts + method: GET + auth: true + docs: List linked accounts for your organization. + source: + openapi: openapi/openapi.yml + request: + name: LinkedAccountsListRequest + query-parameters: + category: + type: optional + docs: >- + Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, + `mktg`, `ticketing` + + + * `hris` - hris + + * `ats` - ats + + * `accounting` - accounting + + * `ticketing` - ticketing + + * `crm` - crm + + * `mktg` - mktg + + * `filestorage` - filestorage + cursor: + type: optional + docs: The pagination cursor value. + end_user_email_address: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given email address. + end_user_organization_name: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given organization name. + end_user_origin_id: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given origin ID. + end_user_origin_ids: + type: optional + docs: >- + Comma-separated list of EndUser origin IDs, making it possible to + specify multiple EndUsers at once. + id: + type: optional + validation: + format: uuid + ids: + type: optional + docs: >- + Comma-separated list of LinkedAccount IDs, making it possible to + specify multiple LinkedAccounts at once. + include_duplicates: + type: optional + docs: >- + If `true`, will include complete production duplicates of the + account specified by the `id` query parameter in the response. + `id` must be for a complete production linked account. + integration_name: + type: optional + docs: >- + If provided, will only return linked accounts associated with the + given integration name. + is_test_account: + type: optional + docs: >- + If included, will only include test linked accounts. If not + included, will only include non-test linked accounts. + page_size: + type: optional + docs: Number of results to return per page. + status: + type: optional + docs: >- + Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, + `RELINK_NEEDED` + response: + docs: '' + type: root.PaginatedAccountDetailsAndActionsList + status-code: 200 + examples: + - response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: e59b1821-f85c-4e28-a6b3-1804156f3563 + category: hris + status: COMPLETE + status_detail: Invalid login credentials + end_user_origin_id: 3ac95cde-6c7f-4eef-afec-be710b42308d + end_user_organization_name: Foo Bar, LLC + end_user_email_address: hradmin@foobar.dev + subdomain: foobar + webhook_listener_url: >- + https://api.merge.dev/api/integrations/webhook-listener/7fc3mee0UW8ecV4 + is_duplicate: true + integration: + name: name + categories: + - hris + color: color + slug: slug + passthrough_available: true + available_model_operations: + - model_name: Candidate + available_operations: + - FETCH + - CREATE + required_post_parameters: + - remote_user_id + supported_fields: + - first_name + - last_name + - company + - title + account_type: PRODUCTION + completed_at: '2024-08-26T20:11:19Z' + integration_specific_fields: + integration_specific_field: Varies by platform + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ticketing/passthrough.yml b/.mock/definition/ticketing/passthrough.yml new file mode 100644 index 0000000..44434d1 --- /dev/null +++ b/.mock/definition/ticketing/passthrough.yml @@ -0,0 +1,40 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /ticketing/v1/passthrough + method: POST + auth: true + docs: Pull data from an endpoint not currently supported by Merge. + source: + openapi: openapi/openapi.yml + request: + body: root.DataPassthroughRequest + content-type: application/json + response: + docs: '' + type: root.RemoteResponse + status-code: 200 + examples: + - headers: {} + request: + method: GET + path: /scooters + response: + body: + method: GET + path: /scooters + status: 200 + response: + key: value + response_headers: + X-Page-Token: value + response_type: JSON + headers: + EXTRA-HEADER: value + Authorization: + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ticketing/projects.yml b/.mock/definition/ticketing/projects.yml new file mode 100644 index 0000000..dd74934 --- /dev/null +++ b/.mock/definition/ticketing/projects.yml @@ -0,0 +1,220 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ticketing/v1/projects + method: GET + auth: true + docs: Returns a list of `Project` objects. + source: + openapi: openapi/openapi.yml + request: + name: ProjectsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: root.PaginatedProjectList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: fb8c55b6-1cb8-4b4c-9fb6-17924231619d + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Q1 Platform + description: For tracking all tasks related to Platform for Q1 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + retrieve: + path: /ticketing/v1/projects/{id} + method: GET + auth: true + docs: Returns a `Project` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: ProjectsRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.Project + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: fb8c55b6-1cb8-4b4c-9fb6-17924231619d + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Q1 Platform + description: For tracking all tasks related to Platform for Q1 + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + data: + key: value + usersList: + path: /ticketing/v1/projects/{parent_id}/users + method: GET + auth: true + docs: Returns a list of `User` objects. + source: + openapi: openapi/openapi.yml + path-parameters: + parent_id: string + request: + name: ProjectsUsersListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: root.PaginatedUserList + status-code: 200 + examples: + - path-parameters: + parent_id: parent_id + headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 17a54124-287f-494d-965e-3c5b330c9a68 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Gil Feig + email_address: help@merge.dev + is_active: true + teams: + - 28b54125-287f-494d-965e-3c5b330c9a68 + - 17a54124-287f-494d-965e-3c5b330c9a68 + roles: + - 23454124-387f-494d-265e-345b330c9123 + avatar: https://merge.dev/user_profile_pic.png + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + source: + openapi: openapi/openapi.yml +types: + ProjectsUsersListRequestExpand: + enum: + - roles + - teams + - value: teams,roles + name: TeamsRoles + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ticketing/regenerateKey.yml b/.mock/definition/ticketing/regenerateKey.yml new file mode 100644 index 0000000..5dab779 --- /dev/null +++ b/.mock/definition/ticketing/regenerateKey.yml @@ -0,0 +1,36 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + create: + path: /ticketing/v1/regenerate-key + method: POST + auth: true + docs: Exchange remote keys. + source: + openapi: openapi/openapi.yml + request: + name: RemoteKeyForRegenerationRequest + body: + properties: + name: + type: string + docs: The name of the remote key + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: root.RemoteKey + status-code: 200 + examples: + - request: + name: Remote Deployment Key 1 + response: + body: + name: Remote Deployment Key 1 + key: hXY57W0g0WkdRHjCaPvwijK63fwfN-o_Wh7f30SLTq_uPCOLo-WFcA + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ticketing/roles.yml b/.mock/definition/ticketing/roles.yml new file mode 100644 index 0000000..9e22d59 --- /dev/null +++ b/.mock/definition/ticketing/roles.yml @@ -0,0 +1,144 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ticketing/v1/roles + method: GET + auth: true + docs: Returns a list of `Role` objects. + source: + openapi: openapi/openapi.yml + request: + name: RolesListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: root.PaginatedRoleList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 23454124-387f-494d-265e-345b330c9123 + remote_id: '123' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Member + ticket_actions: + - VIEW + - EDIT + - CREATE + ticket_access: ALL + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + retrieve: + path: /ticketing/v1/roles/{id} + method: GET + auth: true + docs: Returns a `Role` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: RolesRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.Role + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 23454124-387f-494d-265e-345b330c9123 + remote_id: '123' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Member + ticket_actions: + - VIEW + - EDIT + - CREATE + ticket_access: ALL + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + data: + key: value + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ticketing/scopes.yml b/.mock/definition/ticketing/scopes.yml new file mode 100644 index 0000000..1186665 --- /dev/null +++ b/.mock/definition/ticketing/scopes.yml @@ -0,0 +1,160 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + default_scopes_retrieve: + path: /ticketing/v1/default-scopes + method: GET + auth: true + docs: >- + 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/5950052-common-model-and-field-scopes). + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.CommonModelScopeApi + status-code: 200 + examples: + - response: + body: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - created_at + - custom_fields + - date_of_birth + - first_name + - gender + - remote_created_at + - remote_data + disabled_fields: + - company + - employments + - groups + - home_location + - manager + - work_location + linked_account_scopes_retrieve: + path: /ticketing/v1/linked-account-scopes + method: GET + auth: true + docs: >- + Get all available permissions for Merge Common Models and fields for a + single Linked Account. [Learn + more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: root.CommonModelScopeApi + status-code: 200 + examples: + - headers: {} + response: + body: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - created_at + - custom_fields + - date_of_birth + - first_name + - gender + - remote_created_at + - remote_data + disabled_fields: + - company + - employments + - groups + - home_location + - manager + - work_location + linked_account_scopes_create: + path: /ticketing/v1/linked-account-scopes + method: POST + auth: true + docs: >- + 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/5950052-common-model-and-field-scopes) + source: + openapi: openapi/openapi.yml + request: + name: LinkedAccountCommonModelScopeDeserializerRequest + body: + properties: + common_models: + docs: The common models you want to update the scopes for + type: list + content-type: application/json + response: + docs: '' + type: root.CommonModelScopeApi + status-code: 200 + examples: + - headers: {} + request: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - home_location + disabled_fields: + - work_location + - model_name: Benefit + model_permissions: + WRITE: + is_enabled: false + response: + body: + common_models: + - model_name: Employee + model_permissions: + READ: + is_enabled: true + WRITE: + is_enabled: false + field_permissions: + enabled_fields: + - avatar + - created_at + - custom_fields + - date_of_birth + - first_name + - gender + - remote_created_at + - remote_data + disabled_fields: + - company + - employments + - groups + - home_location + - manager + - work_location + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ticketing/syncStatus.yml b/.mock/definition/ticketing/syncStatus.yml new file mode 100644 index 0000000..5b49f2a --- /dev/null +++ b/.mock/definition/ticketing/syncStatus.yml @@ -0,0 +1,55 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ticketing/v1/sync-status + method: GET + auth: true + docs: >- + Get sync status for the current sync and the most recently finished + sync. `last_sync_start` represents the most recent time any sync began. + `last_sync_finished` represents the most recent time any sync completed. + These timestamps may correspond to different sync instances which may + result in a sync start time being later than a separate sync completed + time. To ensure you are retrieving the latest available data reference + the `last_sync_finished` timestamp where `last_sync_result` is `DONE`. + Possible values for `status` and `last_sync_result` are `DISABLED`, + `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more + about sync status in our [Help + Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). + source: + openapi: openapi/openapi.yml + request: + name: SyncStatusListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: root.PaginatedSyncStatusList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - model_name: Ticket + model_id: ticketing.Ticket + last_sync_start: '2021-03-30T19:44:18Z' + next_sync_start: '2021-03-30T20:44:18Z' + last_sync_result: SYNCING + last_sync_finished: '2021-03-30T19:55:18Z' + status: SYNCING + is_initial_sync: true + selective_sync_configurations_usage: IN_NEXT_SYNC + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ticketing/tags.yml b/.mock/definition/ticketing/tags.yml new file mode 100644 index 0000000..7ebaf15 --- /dev/null +++ b/.mock/definition/ticketing/tags.yml @@ -0,0 +1,134 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ticketing/v1/tags + method: GET + auth: true + docs: Returns a list of `Tag` objects. + source: + openapi: openapi/openapi.yml + request: + name: TagsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: root.PaginatedTagList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + id: 17a54124-287f-494d-965e-3c5b330c9a68 + name: Ticketing API + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + retrieve: + path: /ticketing/v1/tags/{id} + method: GET + auth: true + docs: Returns a `Tag` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: TagsRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.Tag + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + id: 17a54124-287f-494d-965e-3c5b330c9a68 + name: Ticketing API + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + data: + key: value + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ticketing/teams.yml b/.mock/definition/ticketing/teams.yml new file mode 100644 index 0000000..47bcb68 --- /dev/null +++ b/.mock/definition/ticketing/teams.yml @@ -0,0 +1,136 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ticketing/v1/teams + method: GET + auth: true + docs: Returns a list of `Team` objects. + source: + openapi: openapi/openapi.yml + request: + name: TeamsListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + response: + docs: '' + type: root.PaginatedTeamList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 17a54124-287f-494d-965e-3c5b330c9a68 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Platform + description: Platform and Integrations Team + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + retrieve: + path: /ticketing/v1/teams/{id} + method: GET + auth: true + docs: Returns a `Team` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: TeamsRetrieveRequest + query-parameters: + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.Team + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 17a54124-287f-494d-965e-3c5b330c9a68 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Platform + description: Platform and Integrations Team + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + data: + key: value + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ticketing/tickets.yml b/.mock/definition/ticketing/tickets.yml new file mode 100644 index 0000000..aa4b669 --- /dev/null +++ b/.mock/definition/ticketing/tickets.yml @@ -0,0 +1,2151 @@ +types: + TicketsListRequestExpand: + enum: + - account + - value: account,contact + name: AccountContact + - value: account,contact,creator + name: AccountContactCreator + - value: account,contact,creator,parent_ticket + name: AccountContactCreatorParentTicket + - value: account,contact,parent_ticket + name: AccountContactParentTicket + - value: account,creator + name: AccountCreator + - value: account,creator,parent_ticket + name: AccountCreatorParentTicket + - value: account,parent_ticket + name: AccountParentTicket + - assigned_teams + - value: assigned_teams,account + name: AssignedTeamsAccount + - value: assigned_teams,account,contact + name: AssignedTeamsAccountContact + - value: assigned_teams,account,contact,creator + name: AssignedTeamsAccountContactCreator + - value: assigned_teams,account,contact,creator,parent_ticket + name: AssignedTeamsAccountContactCreatorParentTicket + - value: assigned_teams,account,contact,parent_ticket + name: AssignedTeamsAccountContactParentTicket + - value: assigned_teams,account,creator + name: AssignedTeamsAccountCreator + - value: assigned_teams,account,creator,parent_ticket + name: AssignedTeamsAccountCreatorParentTicket + - value: assigned_teams,account,parent_ticket + name: AssignedTeamsAccountParentTicket + - value: assigned_teams,contact + name: AssignedTeamsContact + - value: assigned_teams,contact,creator + name: AssignedTeamsContactCreator + - value: assigned_teams,contact,creator,parent_ticket + name: AssignedTeamsContactCreatorParentTicket + - value: assigned_teams,contact,parent_ticket + name: AssignedTeamsContactParentTicket + - value: assigned_teams,creator + name: AssignedTeamsCreator + - value: assigned_teams,creator,parent_ticket + name: AssignedTeamsCreatorParentTicket + - value: assigned_teams,parent_ticket + name: AssignedTeamsParentTicket + - assignees + - value: assignees,account + name: AssigneesAccount + - value: assignees,account,contact + name: AssigneesAccountContact + - value: assignees,account,contact,creator + name: AssigneesAccountContactCreator + - value: assignees,account,contact,creator,parent_ticket + name: AssigneesAccountContactCreatorParentTicket + - value: assignees,account,contact,parent_ticket + name: AssigneesAccountContactParentTicket + - value: assignees,account,creator + name: AssigneesAccountCreator + - value: assignees,account,creator,parent_ticket + name: AssigneesAccountCreatorParentTicket + - value: assignees,account,parent_ticket + name: AssigneesAccountParentTicket + - value: assignees,assigned_teams + name: AssigneesAssignedTeams + - value: assignees,assigned_teams,account + name: AssigneesAssignedTeamsAccount + - value: assignees,assigned_teams,account,contact + name: AssigneesAssignedTeamsAccountContact + - value: assignees,assigned_teams,account,contact,creator + name: AssigneesAssignedTeamsAccountContactCreator + - value: assignees,assigned_teams,account,contact,creator,parent_ticket + name: AssigneesAssignedTeamsAccountContactCreatorParentTicket + - value: assignees,assigned_teams,account,contact,parent_ticket + name: AssigneesAssignedTeamsAccountContactParentTicket + - value: assignees,assigned_teams,account,creator + name: AssigneesAssignedTeamsAccountCreator + - value: assignees,assigned_teams,account,creator,parent_ticket + name: AssigneesAssignedTeamsAccountCreatorParentTicket + - value: assignees,assigned_teams,account,parent_ticket + name: AssigneesAssignedTeamsAccountParentTicket + - value: assignees,assigned_teams,contact + name: AssigneesAssignedTeamsContact + - value: assignees,assigned_teams,contact,creator + name: AssigneesAssignedTeamsContactCreator + - value: assignees,assigned_teams,contact,creator,parent_ticket + name: AssigneesAssignedTeamsContactCreatorParentTicket + - value: assignees,assigned_teams,contact,parent_ticket + name: AssigneesAssignedTeamsContactParentTicket + - value: assignees,assigned_teams,creator + name: AssigneesAssignedTeamsCreator + - value: assignees,assigned_teams,creator,parent_ticket + name: AssigneesAssignedTeamsCreatorParentTicket + - value: assignees,assigned_teams,parent_ticket + name: AssigneesAssignedTeamsParentTicket + - value: assignees,collections + name: AssigneesCollections + - value: assignees,collections,account + name: AssigneesCollectionsAccount + - value: assignees,collections,account,contact + name: AssigneesCollectionsAccountContact + - value: assignees,collections,account,contact,creator + name: AssigneesCollectionsAccountContactCreator + - value: assignees,collections,account,contact,creator,parent_ticket + name: AssigneesCollectionsAccountContactCreatorParentTicket + - value: assignees,collections,account,contact,parent_ticket + name: AssigneesCollectionsAccountContactParentTicket + - value: assignees,collections,account,creator + name: AssigneesCollectionsAccountCreator + - value: assignees,collections,account,creator,parent_ticket + name: AssigneesCollectionsAccountCreatorParentTicket + - value: assignees,collections,account,parent_ticket + name: AssigneesCollectionsAccountParentTicket + - value: assignees,collections,assigned_teams + name: AssigneesCollectionsAssignedTeams + - value: assignees,collections,assigned_teams,account + name: AssigneesCollectionsAssignedTeamsAccount + - value: assignees,collections,assigned_teams,account,contact + name: AssigneesCollectionsAssignedTeamsAccountContact + - value: assignees,collections,assigned_teams,account,contact,creator + name: AssigneesCollectionsAssignedTeamsAccountContactCreator + - value: >- + assignees,collections,assigned_teams,account,contact,creator,parent_ticket + name: AssigneesCollectionsAssignedTeamsAccountContactCreatorParentTicket + - value: assignees,collections,assigned_teams,account,contact,parent_ticket + name: AssigneesCollectionsAssignedTeamsAccountContactParentTicket + - value: assignees,collections,assigned_teams,account,creator + name: AssigneesCollectionsAssignedTeamsAccountCreator + - value: assignees,collections,assigned_teams,account,creator,parent_ticket + name: AssigneesCollectionsAssignedTeamsAccountCreatorParentTicket + - value: assignees,collections,assigned_teams,account,parent_ticket + name: AssigneesCollectionsAssignedTeamsAccountParentTicket + - value: assignees,collections,assigned_teams,contact + name: AssigneesCollectionsAssignedTeamsContact + - value: assignees,collections,assigned_teams,contact,creator + name: AssigneesCollectionsAssignedTeamsContactCreator + - value: assignees,collections,assigned_teams,contact,creator,parent_ticket + name: AssigneesCollectionsAssignedTeamsContactCreatorParentTicket + - value: assignees,collections,assigned_teams,contact,parent_ticket + name: AssigneesCollectionsAssignedTeamsContactParentTicket + - value: assignees,collections,assigned_teams,creator + name: AssigneesCollectionsAssignedTeamsCreator + - value: assignees,collections,assigned_teams,creator,parent_ticket + name: AssigneesCollectionsAssignedTeamsCreatorParentTicket + - value: assignees,collections,assigned_teams,parent_ticket + name: AssigneesCollectionsAssignedTeamsParentTicket + - value: assignees,collections,contact + name: AssigneesCollectionsContact + - value: assignees,collections,contact,creator + name: AssigneesCollectionsContactCreator + - value: assignees,collections,contact,creator,parent_ticket + name: AssigneesCollectionsContactCreatorParentTicket + - value: assignees,collections,contact,parent_ticket + name: AssigneesCollectionsContactParentTicket + - value: assignees,collections,creator + name: AssigneesCollectionsCreator + - value: assignees,collections,creator,parent_ticket + name: AssigneesCollectionsCreatorParentTicket + - value: assignees,collections,parent_ticket + name: AssigneesCollectionsParentTicket + - value: assignees,contact + name: AssigneesContact + - value: assignees,contact,creator + name: AssigneesContactCreator + - value: assignees,contact,creator,parent_ticket + name: AssigneesContactCreatorParentTicket + - value: assignees,contact,parent_ticket + name: AssigneesContactParentTicket + - value: assignees,creator + name: AssigneesCreator + - value: assignees,creator,parent_ticket + name: AssigneesCreatorParentTicket + - value: assignees,parent_ticket + name: AssigneesParentTicket + - attachments + - value: attachments,account + name: AttachmentsAccount + - value: attachments,account,contact + name: AttachmentsAccountContact + - value: attachments,account,contact,creator + name: AttachmentsAccountContactCreator + - value: attachments,account,contact,creator,parent_ticket + name: AttachmentsAccountContactCreatorParentTicket + - value: attachments,account,contact,parent_ticket + name: AttachmentsAccountContactParentTicket + - value: attachments,account,creator + name: AttachmentsAccountCreator + - value: attachments,account,creator,parent_ticket + name: AttachmentsAccountCreatorParentTicket + - value: attachments,account,parent_ticket + name: AttachmentsAccountParentTicket + - value: attachments,assigned_teams + name: AttachmentsAssignedTeams + - value: attachments,assigned_teams,account + name: AttachmentsAssignedTeamsAccount + - value: attachments,assigned_teams,account,contact + name: AttachmentsAssignedTeamsAccountContact + - value: attachments,assigned_teams,account,contact,creator + name: AttachmentsAssignedTeamsAccountContactCreator + - value: attachments,assigned_teams,account,contact,creator,parent_ticket + name: AttachmentsAssignedTeamsAccountContactCreatorParentTicket + - value: attachments,assigned_teams,account,contact,parent_ticket + name: AttachmentsAssignedTeamsAccountContactParentTicket + - value: attachments,assigned_teams,account,creator + name: AttachmentsAssignedTeamsAccountCreator + - value: attachments,assigned_teams,account,creator,parent_ticket + name: AttachmentsAssignedTeamsAccountCreatorParentTicket + - value: attachments,assigned_teams,account,parent_ticket + name: AttachmentsAssignedTeamsAccountParentTicket + - value: attachments,assigned_teams,contact + name: AttachmentsAssignedTeamsContact + - value: attachments,assigned_teams,contact,creator + name: AttachmentsAssignedTeamsContactCreator + - value: attachments,assigned_teams,contact,creator,parent_ticket + name: AttachmentsAssignedTeamsContactCreatorParentTicket + - value: attachments,assigned_teams,contact,parent_ticket + name: AttachmentsAssignedTeamsContactParentTicket + - value: attachments,assigned_teams,creator + name: AttachmentsAssignedTeamsCreator + - value: attachments,assigned_teams,creator,parent_ticket + name: AttachmentsAssignedTeamsCreatorParentTicket + - value: attachments,assigned_teams,parent_ticket + name: AttachmentsAssignedTeamsParentTicket + - value: attachments,assignees + name: AttachmentsAssignees + - value: attachments,assignees,account + name: AttachmentsAssigneesAccount + - value: attachments,assignees,account,contact + name: AttachmentsAssigneesAccountContact + - value: attachments,assignees,account,contact,creator + name: AttachmentsAssigneesAccountContactCreator + - value: attachments,assignees,account,contact,creator,parent_ticket + name: AttachmentsAssigneesAccountContactCreatorParentTicket + - value: attachments,assignees,account,contact,parent_ticket + name: AttachmentsAssigneesAccountContactParentTicket + - value: attachments,assignees,account,creator + name: AttachmentsAssigneesAccountCreator + - value: attachments,assignees,account,creator,parent_ticket + name: AttachmentsAssigneesAccountCreatorParentTicket + - value: attachments,assignees,account,parent_ticket + name: AttachmentsAssigneesAccountParentTicket + - value: attachments,assignees,assigned_teams + name: AttachmentsAssigneesAssignedTeams + - value: attachments,assignees,assigned_teams,account + name: AttachmentsAssigneesAssignedTeamsAccount + - value: attachments,assignees,assigned_teams,account,contact + name: AttachmentsAssigneesAssignedTeamsAccountContact + - value: attachments,assignees,assigned_teams,account,contact,creator + name: AttachmentsAssigneesAssignedTeamsAccountContactCreator + - value: >- + attachments,assignees,assigned_teams,account,contact,creator,parent_ticket + name: AttachmentsAssigneesAssignedTeamsAccountContactCreatorParentTicket + - value: attachments,assignees,assigned_teams,account,contact,parent_ticket + name: AttachmentsAssigneesAssignedTeamsAccountContactParentTicket + - value: attachments,assignees,assigned_teams,account,creator + name: AttachmentsAssigneesAssignedTeamsAccountCreator + - value: attachments,assignees,assigned_teams,account,creator,parent_ticket + name: AttachmentsAssigneesAssignedTeamsAccountCreatorParentTicket + - value: attachments,assignees,assigned_teams,account,parent_ticket + name: AttachmentsAssigneesAssignedTeamsAccountParentTicket + - value: attachments,assignees,assigned_teams,contact + name: AttachmentsAssigneesAssignedTeamsContact + - value: attachments,assignees,assigned_teams,contact,creator + name: AttachmentsAssigneesAssignedTeamsContactCreator + - value: attachments,assignees,assigned_teams,contact,creator,parent_ticket + name: AttachmentsAssigneesAssignedTeamsContactCreatorParentTicket + - value: attachments,assignees,assigned_teams,contact,parent_ticket + name: AttachmentsAssigneesAssignedTeamsContactParentTicket + - value: attachments,assignees,assigned_teams,creator + name: AttachmentsAssigneesAssignedTeamsCreator + - value: attachments,assignees,assigned_teams,creator,parent_ticket + name: AttachmentsAssigneesAssignedTeamsCreatorParentTicket + - value: attachments,assignees,assigned_teams,parent_ticket + name: AttachmentsAssigneesAssignedTeamsParentTicket + - value: attachments,assignees,collections + name: AttachmentsAssigneesCollections + - value: attachments,assignees,collections,account + name: AttachmentsAssigneesCollectionsAccount + - value: attachments,assignees,collections,account,contact + name: AttachmentsAssigneesCollectionsAccountContact + - value: attachments,assignees,collections,account,contact,creator + name: AttachmentsAssigneesCollectionsAccountContactCreator + - value: >- + attachments,assignees,collections,account,contact,creator,parent_ticket + name: AttachmentsAssigneesCollectionsAccountContactCreatorParentTicket + - value: attachments,assignees,collections,account,contact,parent_ticket + name: AttachmentsAssigneesCollectionsAccountContactParentTicket + - value: attachments,assignees,collections,account,creator + name: AttachmentsAssigneesCollectionsAccountCreator + - value: attachments,assignees,collections,account,creator,parent_ticket + name: AttachmentsAssigneesCollectionsAccountCreatorParentTicket + - value: attachments,assignees,collections,account,parent_ticket + name: AttachmentsAssigneesCollectionsAccountParentTicket + - value: attachments,assignees,collections,assigned_teams + name: AttachmentsAssigneesCollectionsAssignedTeams + - value: attachments,assignees,collections,assigned_teams,account + name: AttachmentsAssigneesCollectionsAssignedTeamsAccount + - value: attachments,assignees,collections,assigned_teams,account,contact + name: AttachmentsAssigneesCollectionsAssignedTeamsAccountContact + - value: >- + attachments,assignees,collections,assigned_teams,account,contact,creator + name: AttachmentsAssigneesCollectionsAssignedTeamsAccountContactCreator + - value: >- + attachments,assignees,collections,assigned_teams,account,contact,creator,parent_ticket + name: >- + AttachmentsAssigneesCollectionsAssignedTeamsAccountContactCreatorParentTicket + - value: >- + attachments,assignees,collections,assigned_teams,account,contact,parent_ticket + name: AttachmentsAssigneesCollectionsAssignedTeamsAccountContactParentTicket + - value: attachments,assignees,collections,assigned_teams,account,creator + name: AttachmentsAssigneesCollectionsAssignedTeamsAccountCreator + - value: >- + attachments,assignees,collections,assigned_teams,account,creator,parent_ticket + name: AttachmentsAssigneesCollectionsAssignedTeamsAccountCreatorParentTicket + - value: attachments,assignees,collections,assigned_teams,account,parent_ticket + name: AttachmentsAssigneesCollectionsAssignedTeamsAccountParentTicket + - value: attachments,assignees,collections,assigned_teams,contact + name: AttachmentsAssigneesCollectionsAssignedTeamsContact + - value: attachments,assignees,collections,assigned_teams,contact,creator + name: AttachmentsAssigneesCollectionsAssignedTeamsContactCreator + - value: >- + attachments,assignees,collections,assigned_teams,contact,creator,parent_ticket + name: AttachmentsAssigneesCollectionsAssignedTeamsContactCreatorParentTicket + - value: attachments,assignees,collections,assigned_teams,contact,parent_ticket + name: AttachmentsAssigneesCollectionsAssignedTeamsContactParentTicket + - value: attachments,assignees,collections,assigned_teams,creator + name: AttachmentsAssigneesCollectionsAssignedTeamsCreator + - value: attachments,assignees,collections,assigned_teams,creator,parent_ticket + name: AttachmentsAssigneesCollectionsAssignedTeamsCreatorParentTicket + - value: attachments,assignees,collections,assigned_teams,parent_ticket + name: AttachmentsAssigneesCollectionsAssignedTeamsParentTicket + - value: attachments,assignees,collections,contact + name: AttachmentsAssigneesCollectionsContact + - value: attachments,assignees,collections,contact,creator + name: AttachmentsAssigneesCollectionsContactCreator + - value: attachments,assignees,collections,contact,creator,parent_ticket + name: AttachmentsAssigneesCollectionsContactCreatorParentTicket + - value: attachments,assignees,collections,contact,parent_ticket + name: AttachmentsAssigneesCollectionsContactParentTicket + - value: attachments,assignees,collections,creator + name: AttachmentsAssigneesCollectionsCreator + - value: attachments,assignees,collections,creator,parent_ticket + name: AttachmentsAssigneesCollectionsCreatorParentTicket + - value: attachments,assignees,collections,parent_ticket + name: AttachmentsAssigneesCollectionsParentTicket + - value: attachments,assignees,contact + name: AttachmentsAssigneesContact + - value: attachments,assignees,contact,creator + name: AttachmentsAssigneesContactCreator + - value: attachments,assignees,contact,creator,parent_ticket + name: AttachmentsAssigneesContactCreatorParentTicket + - value: attachments,assignees,contact,parent_ticket + name: AttachmentsAssigneesContactParentTicket + - value: attachments,assignees,creator + name: AttachmentsAssigneesCreator + - value: attachments,assignees,creator,parent_ticket + name: AttachmentsAssigneesCreatorParentTicket + - value: attachments,assignees,parent_ticket + name: AttachmentsAssigneesParentTicket + - value: attachments,collections + name: AttachmentsCollections + - value: attachments,collections,account + name: AttachmentsCollectionsAccount + - value: attachments,collections,account,contact + name: AttachmentsCollectionsAccountContact + - value: attachments,collections,account,contact,creator + name: AttachmentsCollectionsAccountContactCreator + - value: attachments,collections,account,contact,creator,parent_ticket + name: AttachmentsCollectionsAccountContactCreatorParentTicket + - value: attachments,collections,account,contact,parent_ticket + name: AttachmentsCollectionsAccountContactParentTicket + - value: attachments,collections,account,creator + name: AttachmentsCollectionsAccountCreator + - value: attachments,collections,account,creator,parent_ticket + name: AttachmentsCollectionsAccountCreatorParentTicket + - value: attachments,collections,account,parent_ticket + name: AttachmentsCollectionsAccountParentTicket + - value: attachments,collections,assigned_teams + name: AttachmentsCollectionsAssignedTeams + - value: attachments,collections,assigned_teams,account + name: AttachmentsCollectionsAssignedTeamsAccount + - value: attachments,collections,assigned_teams,account,contact + name: AttachmentsCollectionsAssignedTeamsAccountContact + - value: attachments,collections,assigned_teams,account,contact,creator + name: AttachmentsCollectionsAssignedTeamsAccountContactCreator + - value: >- + attachments,collections,assigned_teams,account,contact,creator,parent_ticket + name: AttachmentsCollectionsAssignedTeamsAccountContactCreatorParentTicket + - value: attachments,collections,assigned_teams,account,contact,parent_ticket + name: AttachmentsCollectionsAssignedTeamsAccountContactParentTicket + - value: attachments,collections,assigned_teams,account,creator + name: AttachmentsCollectionsAssignedTeamsAccountCreator + - value: attachments,collections,assigned_teams,account,creator,parent_ticket + name: AttachmentsCollectionsAssignedTeamsAccountCreatorParentTicket + - value: attachments,collections,assigned_teams,account,parent_ticket + name: AttachmentsCollectionsAssignedTeamsAccountParentTicket + - value: attachments,collections,assigned_teams,contact + name: AttachmentsCollectionsAssignedTeamsContact + - value: attachments,collections,assigned_teams,contact,creator + name: AttachmentsCollectionsAssignedTeamsContactCreator + - value: attachments,collections,assigned_teams,contact,creator,parent_ticket + name: AttachmentsCollectionsAssignedTeamsContactCreatorParentTicket + - value: attachments,collections,assigned_teams,contact,parent_ticket + name: AttachmentsCollectionsAssignedTeamsContactParentTicket + - value: attachments,collections,assigned_teams,creator + name: AttachmentsCollectionsAssignedTeamsCreator + - value: attachments,collections,assigned_teams,creator,parent_ticket + name: AttachmentsCollectionsAssignedTeamsCreatorParentTicket + - value: attachments,collections,assigned_teams,parent_ticket + name: AttachmentsCollectionsAssignedTeamsParentTicket + - value: attachments,collections,contact + name: AttachmentsCollectionsContact + - value: attachments,collections,contact,creator + name: AttachmentsCollectionsContactCreator + - value: attachments,collections,contact,creator,parent_ticket + name: AttachmentsCollectionsContactCreatorParentTicket + - value: attachments,collections,contact,parent_ticket + name: AttachmentsCollectionsContactParentTicket + - value: attachments,collections,creator + name: AttachmentsCollectionsCreator + - value: attachments,collections,creator,parent_ticket + name: AttachmentsCollectionsCreatorParentTicket + - value: attachments,collections,parent_ticket + name: AttachmentsCollectionsParentTicket + - value: attachments,contact + name: AttachmentsContact + - value: attachments,contact,creator + name: AttachmentsContactCreator + - value: attachments,contact,creator,parent_ticket + name: AttachmentsContactCreatorParentTicket + - value: attachments,contact,parent_ticket + name: AttachmentsContactParentTicket + - value: attachments,creator + name: AttachmentsCreator + - value: attachments,creator,parent_ticket + name: AttachmentsCreatorParentTicket + - value: attachments,parent_ticket + name: AttachmentsParentTicket + - collections + - value: collections,account + name: CollectionsAccount + - value: collections,account,contact + name: CollectionsAccountContact + - value: collections,account,contact,creator + name: CollectionsAccountContactCreator + - value: collections,account,contact,creator,parent_ticket + name: CollectionsAccountContactCreatorParentTicket + - value: collections,account,contact,parent_ticket + name: CollectionsAccountContactParentTicket + - value: collections,account,creator + name: CollectionsAccountCreator + - value: collections,account,creator,parent_ticket + name: CollectionsAccountCreatorParentTicket + - value: collections,account,parent_ticket + name: CollectionsAccountParentTicket + - value: collections,assigned_teams + name: CollectionsAssignedTeams + - value: collections,assigned_teams,account + name: CollectionsAssignedTeamsAccount + - value: collections,assigned_teams,account,contact + name: CollectionsAssignedTeamsAccountContact + - value: collections,assigned_teams,account,contact,creator + name: CollectionsAssignedTeamsAccountContactCreator + - value: collections,assigned_teams,account,contact,creator,parent_ticket + name: CollectionsAssignedTeamsAccountContactCreatorParentTicket + - value: collections,assigned_teams,account,contact,parent_ticket + name: CollectionsAssignedTeamsAccountContactParentTicket + - value: collections,assigned_teams,account,creator + name: CollectionsAssignedTeamsAccountCreator + - value: collections,assigned_teams,account,creator,parent_ticket + name: CollectionsAssignedTeamsAccountCreatorParentTicket + - value: collections,assigned_teams,account,parent_ticket + name: CollectionsAssignedTeamsAccountParentTicket + - value: collections,assigned_teams,contact + name: CollectionsAssignedTeamsContact + - value: collections,assigned_teams,contact,creator + name: CollectionsAssignedTeamsContactCreator + - value: collections,assigned_teams,contact,creator,parent_ticket + name: CollectionsAssignedTeamsContactCreatorParentTicket + - value: collections,assigned_teams,contact,parent_ticket + name: CollectionsAssignedTeamsContactParentTicket + - value: collections,assigned_teams,creator + name: CollectionsAssignedTeamsCreator + - value: collections,assigned_teams,creator,parent_ticket + name: CollectionsAssignedTeamsCreatorParentTicket + - value: collections,assigned_teams,parent_ticket + name: CollectionsAssignedTeamsParentTicket + - value: collections,contact + name: CollectionsContact + - value: collections,contact,creator + name: CollectionsContactCreator + - value: collections,contact,creator,parent_ticket + name: CollectionsContactCreatorParentTicket + - value: collections,contact,parent_ticket + name: CollectionsContactParentTicket + - value: collections,creator + name: CollectionsCreator + - value: collections,creator,parent_ticket + name: CollectionsCreatorParentTicket + - value: collections,parent_ticket + name: CollectionsParentTicket + - contact + - value: contact,creator + name: ContactCreator + - value: contact,creator,parent_ticket + name: ContactCreatorParentTicket + - value: contact,parent_ticket + name: ContactParentTicket + - creator + - value: creator,parent_ticket + name: CreatorParentTicket + - parent_ticket + source: + openapi: openapi/openapi.yml + TicketsListRequestPriority: + enum: + - HIGH + - LOW + - NORMAL + - URGENT + source: + openapi: openapi/openapi.yml + TicketsListRequestRemoteFields: + enum: + - priority + - value: priority,status + name: PriorityStatus + - value: priority,status,ticket_type + name: PriorityStatusTicketType + - value: priority,ticket_type + name: PriorityTicketType + - status + - value: status,ticket_type + name: StatusTicketType + - ticket_type + source: + openapi: openapi/openapi.yml + TicketsListRequestShowEnumOrigins: + enum: + - priority + - value: priority,status + name: PriorityStatus + - value: priority,status,ticket_type + name: PriorityStatusTicketType + - value: priority,ticket_type + name: PriorityTicketType + - status + - value: status,ticket_type + name: StatusTicketType + - ticket_type + source: + openapi: openapi/openapi.yml + TicketsRetrieveRequestExpand: + enum: + - account + - value: account,contact + name: AccountContact + - value: account,contact,creator + name: AccountContactCreator + - value: account,contact,creator,parent_ticket + name: AccountContactCreatorParentTicket + - value: account,contact,parent_ticket + name: AccountContactParentTicket + - value: account,creator + name: AccountCreator + - value: account,creator,parent_ticket + name: AccountCreatorParentTicket + - value: account,parent_ticket + name: AccountParentTicket + - assigned_teams + - value: assigned_teams,account + name: AssignedTeamsAccount + - value: assigned_teams,account,contact + name: AssignedTeamsAccountContact + - value: assigned_teams,account,contact,creator + name: AssignedTeamsAccountContactCreator + - value: assigned_teams,account,contact,creator,parent_ticket + name: AssignedTeamsAccountContactCreatorParentTicket + - value: assigned_teams,account,contact,parent_ticket + name: AssignedTeamsAccountContactParentTicket + - value: assigned_teams,account,creator + name: AssignedTeamsAccountCreator + - value: assigned_teams,account,creator,parent_ticket + name: AssignedTeamsAccountCreatorParentTicket + - value: assigned_teams,account,parent_ticket + name: AssignedTeamsAccountParentTicket + - value: assigned_teams,contact + name: AssignedTeamsContact + - value: assigned_teams,contact,creator + name: AssignedTeamsContactCreator + - value: assigned_teams,contact,creator,parent_ticket + name: AssignedTeamsContactCreatorParentTicket + - value: assigned_teams,contact,parent_ticket + name: AssignedTeamsContactParentTicket + - value: assigned_teams,creator + name: AssignedTeamsCreator + - value: assigned_teams,creator,parent_ticket + name: AssignedTeamsCreatorParentTicket + - value: assigned_teams,parent_ticket + name: AssignedTeamsParentTicket + - assignees + - value: assignees,account + name: AssigneesAccount + - value: assignees,account,contact + name: AssigneesAccountContact + - value: assignees,account,contact,creator + name: AssigneesAccountContactCreator + - value: assignees,account,contact,creator,parent_ticket + name: AssigneesAccountContactCreatorParentTicket + - value: assignees,account,contact,parent_ticket + name: AssigneesAccountContactParentTicket + - value: assignees,account,creator + name: AssigneesAccountCreator + - value: assignees,account,creator,parent_ticket + name: AssigneesAccountCreatorParentTicket + - value: assignees,account,parent_ticket + name: AssigneesAccountParentTicket + - value: assignees,assigned_teams + name: AssigneesAssignedTeams + - value: assignees,assigned_teams,account + name: AssigneesAssignedTeamsAccount + - value: assignees,assigned_teams,account,contact + name: AssigneesAssignedTeamsAccountContact + - value: assignees,assigned_teams,account,contact,creator + name: AssigneesAssignedTeamsAccountContactCreator + - value: assignees,assigned_teams,account,contact,creator,parent_ticket + name: AssigneesAssignedTeamsAccountContactCreatorParentTicket + - value: assignees,assigned_teams,account,contact,parent_ticket + name: AssigneesAssignedTeamsAccountContactParentTicket + - value: assignees,assigned_teams,account,creator + name: AssigneesAssignedTeamsAccountCreator + - value: assignees,assigned_teams,account,creator,parent_ticket + name: AssigneesAssignedTeamsAccountCreatorParentTicket + - value: assignees,assigned_teams,account,parent_ticket + name: AssigneesAssignedTeamsAccountParentTicket + - value: assignees,assigned_teams,contact + name: AssigneesAssignedTeamsContact + - value: assignees,assigned_teams,contact,creator + name: AssigneesAssignedTeamsContactCreator + - value: assignees,assigned_teams,contact,creator,parent_ticket + name: AssigneesAssignedTeamsContactCreatorParentTicket + - value: assignees,assigned_teams,contact,parent_ticket + name: AssigneesAssignedTeamsContactParentTicket + - value: assignees,assigned_teams,creator + name: AssigneesAssignedTeamsCreator + - value: assignees,assigned_teams,creator,parent_ticket + name: AssigneesAssignedTeamsCreatorParentTicket + - value: assignees,assigned_teams,parent_ticket + name: AssigneesAssignedTeamsParentTicket + - value: assignees,collections + name: AssigneesCollections + - value: assignees,collections,account + name: AssigneesCollectionsAccount + - value: assignees,collections,account,contact + name: AssigneesCollectionsAccountContact + - value: assignees,collections,account,contact,creator + name: AssigneesCollectionsAccountContactCreator + - value: assignees,collections,account,contact,creator,parent_ticket + name: AssigneesCollectionsAccountContactCreatorParentTicket + - value: assignees,collections,account,contact,parent_ticket + name: AssigneesCollectionsAccountContactParentTicket + - value: assignees,collections,account,creator + name: AssigneesCollectionsAccountCreator + - value: assignees,collections,account,creator,parent_ticket + name: AssigneesCollectionsAccountCreatorParentTicket + - value: assignees,collections,account,parent_ticket + name: AssigneesCollectionsAccountParentTicket + - value: assignees,collections,assigned_teams + name: AssigneesCollectionsAssignedTeams + - value: assignees,collections,assigned_teams,account + name: AssigneesCollectionsAssignedTeamsAccount + - value: assignees,collections,assigned_teams,account,contact + name: AssigneesCollectionsAssignedTeamsAccountContact + - value: assignees,collections,assigned_teams,account,contact,creator + name: AssigneesCollectionsAssignedTeamsAccountContactCreator + - value: >- + assignees,collections,assigned_teams,account,contact,creator,parent_ticket + name: AssigneesCollectionsAssignedTeamsAccountContactCreatorParentTicket + - value: assignees,collections,assigned_teams,account,contact,parent_ticket + name: AssigneesCollectionsAssignedTeamsAccountContactParentTicket + - value: assignees,collections,assigned_teams,account,creator + name: AssigneesCollectionsAssignedTeamsAccountCreator + - value: assignees,collections,assigned_teams,account,creator,parent_ticket + name: AssigneesCollectionsAssignedTeamsAccountCreatorParentTicket + - value: assignees,collections,assigned_teams,account,parent_ticket + name: AssigneesCollectionsAssignedTeamsAccountParentTicket + - value: assignees,collections,assigned_teams,contact + name: AssigneesCollectionsAssignedTeamsContact + - value: assignees,collections,assigned_teams,contact,creator + name: AssigneesCollectionsAssignedTeamsContactCreator + - value: assignees,collections,assigned_teams,contact,creator,parent_ticket + name: AssigneesCollectionsAssignedTeamsContactCreatorParentTicket + - value: assignees,collections,assigned_teams,contact,parent_ticket + name: AssigneesCollectionsAssignedTeamsContactParentTicket + - value: assignees,collections,assigned_teams,creator + name: AssigneesCollectionsAssignedTeamsCreator + - value: assignees,collections,assigned_teams,creator,parent_ticket + name: AssigneesCollectionsAssignedTeamsCreatorParentTicket + - value: assignees,collections,assigned_teams,parent_ticket + name: AssigneesCollectionsAssignedTeamsParentTicket + - value: assignees,collections,contact + name: AssigneesCollectionsContact + - value: assignees,collections,contact,creator + name: AssigneesCollectionsContactCreator + - value: assignees,collections,contact,creator,parent_ticket + name: AssigneesCollectionsContactCreatorParentTicket + - value: assignees,collections,contact,parent_ticket + name: AssigneesCollectionsContactParentTicket + - value: assignees,collections,creator + name: AssigneesCollectionsCreator + - value: assignees,collections,creator,parent_ticket + name: AssigneesCollectionsCreatorParentTicket + - value: assignees,collections,parent_ticket + name: AssigneesCollectionsParentTicket + - value: assignees,contact + name: AssigneesContact + - value: assignees,contact,creator + name: AssigneesContactCreator + - value: assignees,contact,creator,parent_ticket + name: AssigneesContactCreatorParentTicket + - value: assignees,contact,parent_ticket + name: AssigneesContactParentTicket + - value: assignees,creator + name: AssigneesCreator + - value: assignees,creator,parent_ticket + name: AssigneesCreatorParentTicket + - value: assignees,parent_ticket + name: AssigneesParentTicket + - attachments + - value: attachments,account + name: AttachmentsAccount + - value: attachments,account,contact + name: AttachmentsAccountContact + - value: attachments,account,contact,creator + name: AttachmentsAccountContactCreator + - value: attachments,account,contact,creator,parent_ticket + name: AttachmentsAccountContactCreatorParentTicket + - value: attachments,account,contact,parent_ticket + name: AttachmentsAccountContactParentTicket + - value: attachments,account,creator + name: AttachmentsAccountCreator + - value: attachments,account,creator,parent_ticket + name: AttachmentsAccountCreatorParentTicket + - value: attachments,account,parent_ticket + name: AttachmentsAccountParentTicket + - value: attachments,assigned_teams + name: AttachmentsAssignedTeams + - value: attachments,assigned_teams,account + name: AttachmentsAssignedTeamsAccount + - value: attachments,assigned_teams,account,contact + name: AttachmentsAssignedTeamsAccountContact + - value: attachments,assigned_teams,account,contact,creator + name: AttachmentsAssignedTeamsAccountContactCreator + - value: attachments,assigned_teams,account,contact,creator,parent_ticket + name: AttachmentsAssignedTeamsAccountContactCreatorParentTicket + - value: attachments,assigned_teams,account,contact,parent_ticket + name: AttachmentsAssignedTeamsAccountContactParentTicket + - value: attachments,assigned_teams,account,creator + name: AttachmentsAssignedTeamsAccountCreator + - value: attachments,assigned_teams,account,creator,parent_ticket + name: AttachmentsAssignedTeamsAccountCreatorParentTicket + - value: attachments,assigned_teams,account,parent_ticket + name: AttachmentsAssignedTeamsAccountParentTicket + - value: attachments,assigned_teams,contact + name: AttachmentsAssignedTeamsContact + - value: attachments,assigned_teams,contact,creator + name: AttachmentsAssignedTeamsContactCreator + - value: attachments,assigned_teams,contact,creator,parent_ticket + name: AttachmentsAssignedTeamsContactCreatorParentTicket + - value: attachments,assigned_teams,contact,parent_ticket + name: AttachmentsAssignedTeamsContactParentTicket + - value: attachments,assigned_teams,creator + name: AttachmentsAssignedTeamsCreator + - value: attachments,assigned_teams,creator,parent_ticket + name: AttachmentsAssignedTeamsCreatorParentTicket + - value: attachments,assigned_teams,parent_ticket + name: AttachmentsAssignedTeamsParentTicket + - value: attachments,assignees + name: AttachmentsAssignees + - value: attachments,assignees,account + name: AttachmentsAssigneesAccount + - value: attachments,assignees,account,contact + name: AttachmentsAssigneesAccountContact + - value: attachments,assignees,account,contact,creator + name: AttachmentsAssigneesAccountContactCreator + - value: attachments,assignees,account,contact,creator,parent_ticket + name: AttachmentsAssigneesAccountContactCreatorParentTicket + - value: attachments,assignees,account,contact,parent_ticket + name: AttachmentsAssigneesAccountContactParentTicket + - value: attachments,assignees,account,creator + name: AttachmentsAssigneesAccountCreator + - value: attachments,assignees,account,creator,parent_ticket + name: AttachmentsAssigneesAccountCreatorParentTicket + - value: attachments,assignees,account,parent_ticket + name: AttachmentsAssigneesAccountParentTicket + - value: attachments,assignees,assigned_teams + name: AttachmentsAssigneesAssignedTeams + - value: attachments,assignees,assigned_teams,account + name: AttachmentsAssigneesAssignedTeamsAccount + - value: attachments,assignees,assigned_teams,account,contact + name: AttachmentsAssigneesAssignedTeamsAccountContact + - value: attachments,assignees,assigned_teams,account,contact,creator + name: AttachmentsAssigneesAssignedTeamsAccountContactCreator + - value: >- + attachments,assignees,assigned_teams,account,contact,creator,parent_ticket + name: AttachmentsAssigneesAssignedTeamsAccountContactCreatorParentTicket + - value: attachments,assignees,assigned_teams,account,contact,parent_ticket + name: AttachmentsAssigneesAssignedTeamsAccountContactParentTicket + - value: attachments,assignees,assigned_teams,account,creator + name: AttachmentsAssigneesAssignedTeamsAccountCreator + - value: attachments,assignees,assigned_teams,account,creator,parent_ticket + name: AttachmentsAssigneesAssignedTeamsAccountCreatorParentTicket + - value: attachments,assignees,assigned_teams,account,parent_ticket + name: AttachmentsAssigneesAssignedTeamsAccountParentTicket + - value: attachments,assignees,assigned_teams,contact + name: AttachmentsAssigneesAssignedTeamsContact + - value: attachments,assignees,assigned_teams,contact,creator + name: AttachmentsAssigneesAssignedTeamsContactCreator + - value: attachments,assignees,assigned_teams,contact,creator,parent_ticket + name: AttachmentsAssigneesAssignedTeamsContactCreatorParentTicket + - value: attachments,assignees,assigned_teams,contact,parent_ticket + name: AttachmentsAssigneesAssignedTeamsContactParentTicket + - value: attachments,assignees,assigned_teams,creator + name: AttachmentsAssigneesAssignedTeamsCreator + - value: attachments,assignees,assigned_teams,creator,parent_ticket + name: AttachmentsAssigneesAssignedTeamsCreatorParentTicket + - value: attachments,assignees,assigned_teams,parent_ticket + name: AttachmentsAssigneesAssignedTeamsParentTicket + - value: attachments,assignees,collections + name: AttachmentsAssigneesCollections + - value: attachments,assignees,collections,account + name: AttachmentsAssigneesCollectionsAccount + - value: attachments,assignees,collections,account,contact + name: AttachmentsAssigneesCollectionsAccountContact + - value: attachments,assignees,collections,account,contact,creator + name: AttachmentsAssigneesCollectionsAccountContactCreator + - value: >- + attachments,assignees,collections,account,contact,creator,parent_ticket + name: AttachmentsAssigneesCollectionsAccountContactCreatorParentTicket + - value: attachments,assignees,collections,account,contact,parent_ticket + name: AttachmentsAssigneesCollectionsAccountContactParentTicket + - value: attachments,assignees,collections,account,creator + name: AttachmentsAssigneesCollectionsAccountCreator + - value: attachments,assignees,collections,account,creator,parent_ticket + name: AttachmentsAssigneesCollectionsAccountCreatorParentTicket + - value: attachments,assignees,collections,account,parent_ticket + name: AttachmentsAssigneesCollectionsAccountParentTicket + - value: attachments,assignees,collections,assigned_teams + name: AttachmentsAssigneesCollectionsAssignedTeams + - value: attachments,assignees,collections,assigned_teams,account + name: AttachmentsAssigneesCollectionsAssignedTeamsAccount + - value: attachments,assignees,collections,assigned_teams,account,contact + name: AttachmentsAssigneesCollectionsAssignedTeamsAccountContact + - value: >- + attachments,assignees,collections,assigned_teams,account,contact,creator + name: AttachmentsAssigneesCollectionsAssignedTeamsAccountContactCreator + - value: >- + attachments,assignees,collections,assigned_teams,account,contact,creator,parent_ticket + name: >- + AttachmentsAssigneesCollectionsAssignedTeamsAccountContactCreatorParentTicket + - value: >- + attachments,assignees,collections,assigned_teams,account,contact,parent_ticket + name: AttachmentsAssigneesCollectionsAssignedTeamsAccountContactParentTicket + - value: attachments,assignees,collections,assigned_teams,account,creator + name: AttachmentsAssigneesCollectionsAssignedTeamsAccountCreator + - value: >- + attachments,assignees,collections,assigned_teams,account,creator,parent_ticket + name: AttachmentsAssigneesCollectionsAssignedTeamsAccountCreatorParentTicket + - value: attachments,assignees,collections,assigned_teams,account,parent_ticket + name: AttachmentsAssigneesCollectionsAssignedTeamsAccountParentTicket + - value: attachments,assignees,collections,assigned_teams,contact + name: AttachmentsAssigneesCollectionsAssignedTeamsContact + - value: attachments,assignees,collections,assigned_teams,contact,creator + name: AttachmentsAssigneesCollectionsAssignedTeamsContactCreator + - value: >- + attachments,assignees,collections,assigned_teams,contact,creator,parent_ticket + name: AttachmentsAssigneesCollectionsAssignedTeamsContactCreatorParentTicket + - value: attachments,assignees,collections,assigned_teams,contact,parent_ticket + name: AttachmentsAssigneesCollectionsAssignedTeamsContactParentTicket + - value: attachments,assignees,collections,assigned_teams,creator + name: AttachmentsAssigneesCollectionsAssignedTeamsCreator + - value: attachments,assignees,collections,assigned_teams,creator,parent_ticket + name: AttachmentsAssigneesCollectionsAssignedTeamsCreatorParentTicket + - value: attachments,assignees,collections,assigned_teams,parent_ticket + name: AttachmentsAssigneesCollectionsAssignedTeamsParentTicket + - value: attachments,assignees,collections,contact + name: AttachmentsAssigneesCollectionsContact + - value: attachments,assignees,collections,contact,creator + name: AttachmentsAssigneesCollectionsContactCreator + - value: attachments,assignees,collections,contact,creator,parent_ticket + name: AttachmentsAssigneesCollectionsContactCreatorParentTicket + - value: attachments,assignees,collections,contact,parent_ticket + name: AttachmentsAssigneesCollectionsContactParentTicket + - value: attachments,assignees,collections,creator + name: AttachmentsAssigneesCollectionsCreator + - value: attachments,assignees,collections,creator,parent_ticket + name: AttachmentsAssigneesCollectionsCreatorParentTicket + - value: attachments,assignees,collections,parent_ticket + name: AttachmentsAssigneesCollectionsParentTicket + - value: attachments,assignees,contact + name: AttachmentsAssigneesContact + - value: attachments,assignees,contact,creator + name: AttachmentsAssigneesContactCreator + - value: attachments,assignees,contact,creator,parent_ticket + name: AttachmentsAssigneesContactCreatorParentTicket + - value: attachments,assignees,contact,parent_ticket + name: AttachmentsAssigneesContactParentTicket + - value: attachments,assignees,creator + name: AttachmentsAssigneesCreator + - value: attachments,assignees,creator,parent_ticket + name: AttachmentsAssigneesCreatorParentTicket + - value: attachments,assignees,parent_ticket + name: AttachmentsAssigneesParentTicket + - value: attachments,collections + name: AttachmentsCollections + - value: attachments,collections,account + name: AttachmentsCollectionsAccount + - value: attachments,collections,account,contact + name: AttachmentsCollectionsAccountContact + - value: attachments,collections,account,contact,creator + name: AttachmentsCollectionsAccountContactCreator + - value: attachments,collections,account,contact,creator,parent_ticket + name: AttachmentsCollectionsAccountContactCreatorParentTicket + - value: attachments,collections,account,contact,parent_ticket + name: AttachmentsCollectionsAccountContactParentTicket + - value: attachments,collections,account,creator + name: AttachmentsCollectionsAccountCreator + - value: attachments,collections,account,creator,parent_ticket + name: AttachmentsCollectionsAccountCreatorParentTicket + - value: attachments,collections,account,parent_ticket + name: AttachmentsCollectionsAccountParentTicket + - value: attachments,collections,assigned_teams + name: AttachmentsCollectionsAssignedTeams + - value: attachments,collections,assigned_teams,account + name: AttachmentsCollectionsAssignedTeamsAccount + - value: attachments,collections,assigned_teams,account,contact + name: AttachmentsCollectionsAssignedTeamsAccountContact + - value: attachments,collections,assigned_teams,account,contact,creator + name: AttachmentsCollectionsAssignedTeamsAccountContactCreator + - value: >- + attachments,collections,assigned_teams,account,contact,creator,parent_ticket + name: AttachmentsCollectionsAssignedTeamsAccountContactCreatorParentTicket + - value: attachments,collections,assigned_teams,account,contact,parent_ticket + name: AttachmentsCollectionsAssignedTeamsAccountContactParentTicket + - value: attachments,collections,assigned_teams,account,creator + name: AttachmentsCollectionsAssignedTeamsAccountCreator + - value: attachments,collections,assigned_teams,account,creator,parent_ticket + name: AttachmentsCollectionsAssignedTeamsAccountCreatorParentTicket + - value: attachments,collections,assigned_teams,account,parent_ticket + name: AttachmentsCollectionsAssignedTeamsAccountParentTicket + - value: attachments,collections,assigned_teams,contact + name: AttachmentsCollectionsAssignedTeamsContact + - value: attachments,collections,assigned_teams,contact,creator + name: AttachmentsCollectionsAssignedTeamsContactCreator + - value: attachments,collections,assigned_teams,contact,creator,parent_ticket + name: AttachmentsCollectionsAssignedTeamsContactCreatorParentTicket + - value: attachments,collections,assigned_teams,contact,parent_ticket + name: AttachmentsCollectionsAssignedTeamsContactParentTicket + - value: attachments,collections,assigned_teams,creator + name: AttachmentsCollectionsAssignedTeamsCreator + - value: attachments,collections,assigned_teams,creator,parent_ticket + name: AttachmentsCollectionsAssignedTeamsCreatorParentTicket + - value: attachments,collections,assigned_teams,parent_ticket + name: AttachmentsCollectionsAssignedTeamsParentTicket + - value: attachments,collections,contact + name: AttachmentsCollectionsContact + - value: attachments,collections,contact,creator + name: AttachmentsCollectionsContactCreator + - value: attachments,collections,contact,creator,parent_ticket + name: AttachmentsCollectionsContactCreatorParentTicket + - value: attachments,collections,contact,parent_ticket + name: AttachmentsCollectionsContactParentTicket + - value: attachments,collections,creator + name: AttachmentsCollectionsCreator + - value: attachments,collections,creator,parent_ticket + name: AttachmentsCollectionsCreatorParentTicket + - value: attachments,collections,parent_ticket + name: AttachmentsCollectionsParentTicket + - value: attachments,contact + name: AttachmentsContact + - value: attachments,contact,creator + name: AttachmentsContactCreator + - value: attachments,contact,creator,parent_ticket + name: AttachmentsContactCreatorParentTicket + - value: attachments,contact,parent_ticket + name: AttachmentsContactParentTicket + - value: attachments,creator + name: AttachmentsCreator + - value: attachments,creator,parent_ticket + name: AttachmentsCreatorParentTicket + - value: attachments,parent_ticket + name: AttachmentsParentTicket + - collections + - value: collections,account + name: CollectionsAccount + - value: collections,account,contact + name: CollectionsAccountContact + - value: collections,account,contact,creator + name: CollectionsAccountContactCreator + - value: collections,account,contact,creator,parent_ticket + name: CollectionsAccountContactCreatorParentTicket + - value: collections,account,contact,parent_ticket + name: CollectionsAccountContactParentTicket + - value: collections,account,creator + name: CollectionsAccountCreator + - value: collections,account,creator,parent_ticket + name: CollectionsAccountCreatorParentTicket + - value: collections,account,parent_ticket + name: CollectionsAccountParentTicket + - value: collections,assigned_teams + name: CollectionsAssignedTeams + - value: collections,assigned_teams,account + name: CollectionsAssignedTeamsAccount + - value: collections,assigned_teams,account,contact + name: CollectionsAssignedTeamsAccountContact + - value: collections,assigned_teams,account,contact,creator + name: CollectionsAssignedTeamsAccountContactCreator + - value: collections,assigned_teams,account,contact,creator,parent_ticket + name: CollectionsAssignedTeamsAccountContactCreatorParentTicket + - value: collections,assigned_teams,account,contact,parent_ticket + name: CollectionsAssignedTeamsAccountContactParentTicket + - value: collections,assigned_teams,account,creator + name: CollectionsAssignedTeamsAccountCreator + - value: collections,assigned_teams,account,creator,parent_ticket + name: CollectionsAssignedTeamsAccountCreatorParentTicket + - value: collections,assigned_teams,account,parent_ticket + name: CollectionsAssignedTeamsAccountParentTicket + - value: collections,assigned_teams,contact + name: CollectionsAssignedTeamsContact + - value: collections,assigned_teams,contact,creator + name: CollectionsAssignedTeamsContactCreator + - value: collections,assigned_teams,contact,creator,parent_ticket + name: CollectionsAssignedTeamsContactCreatorParentTicket + - value: collections,assigned_teams,contact,parent_ticket + name: CollectionsAssignedTeamsContactParentTicket + - value: collections,assigned_teams,creator + name: CollectionsAssignedTeamsCreator + - value: collections,assigned_teams,creator,parent_ticket + name: CollectionsAssignedTeamsCreatorParentTicket + - value: collections,assigned_teams,parent_ticket + name: CollectionsAssignedTeamsParentTicket + - value: collections,contact + name: CollectionsContact + - value: collections,contact,creator + name: CollectionsContactCreator + - value: collections,contact,creator,parent_ticket + name: CollectionsContactCreatorParentTicket + - value: collections,contact,parent_ticket + name: CollectionsContactParentTicket + - value: collections,creator + name: CollectionsCreator + - value: collections,creator,parent_ticket + name: CollectionsCreatorParentTicket + - value: collections,parent_ticket + name: CollectionsParentTicket + - contact + - value: contact,creator + name: ContactCreator + - value: contact,creator,parent_ticket + name: ContactCreatorParentTicket + - value: contact,parent_ticket + name: ContactParentTicket + - creator + - value: creator,parent_ticket + name: CreatorParentTicket + - parent_ticket + source: + openapi: openapi/openapi.yml + TicketsRetrieveRequestRemoteFields: + enum: + - priority + - value: priority,status + name: PriorityStatus + - value: priority,status,ticket_type + name: PriorityStatusTicketType + - value: priority,ticket_type + name: PriorityTicketType + - status + - value: status,ticket_type + name: StatusTicketType + - ticket_type + source: + openapi: openapi/openapi.yml + TicketsRetrieveRequestShowEnumOrigins: + enum: + - priority + - value: priority,status + name: PriorityStatus + - value: priority,status,ticket_type + name: PriorityStatusTicketType + - value: priority,ticket_type + name: PriorityTicketType + - status + - value: status,ticket_type + name: StatusTicketType + - ticket_type + source: + openapi: openapi/openapi.yml + TicketsViewersListRequestExpand: + enum: + - team + - user + - value: user,team + name: UserTeam + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ticketing/v1/tickets + method: GET + auth: true + docs: Returns a list of `Ticket` objects. + source: + openapi: openapi/openapi.yml + request: + name: TicketsListRequest + query-parameters: + account_id: + type: optional + docs: If provided, will only return tickets for this account. + assignee_ids: + type: optional + docs: >- + If provided, will only return tickets assigned to the + assignee_ids; multiple assignee_ids can be separated by commas. + collection_ids: + type: optional + docs: >- + If provided, will only return tickets assigned to the + collection_ids; multiple collection_ids can be separated by + commas. + completed_after: + type: optional + docs: >- + If provided, will only return tickets completed after this + datetime. + completed_before: + type: optional + docs: >- + If provided, will only return tickets completed before this + datetime. + contact_id: + type: optional + docs: If provided, will only return tickets for this contact. + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + due_after: + type: optional + docs: If provided, will only return tickets due after this datetime. + due_before: + type: optional + docs: If provided, will only return tickets due before this datetime. + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + parent_ticket_id: + type: optional + docs: If provided, will only return sub tickets of the parent_ticket_id. + priority: + type: optional + docs: |- + If provided, will only return tickets of this priority. + + * `URGENT` - URGENT + * `HIGH` - HIGH + * `NORMAL` - NORMAL + * `LOW` - LOW + remote_created_after: + type: optional + docs: >- + If provided, will only return tickets created in the third party + platform after this datetime. + remote_created_before: + type: optional + docs: >- + If provided, will only return tickets created in the third party + platform before this datetime. + remote_fields: + type: optional + docs: Deprecated. Use show_enum_origins. + remote_id: + type: optional + docs: The API provider's ID for the given object. + remote_updated_after: + type: optional + docs: >- + If provided, will only return tickets updated in the third party + platform after this datetime. + remote_updated_before: + type: optional + docs: >- + If provided, will only return tickets updated in the third party + platform before this datetime. + show_enum_origins: + type: optional + docs: >- + 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: + type: optional + docs: If provided, will only return tickets of this status. + tags: + type: optional + docs: >- + If provided, will only return tickets matching the tags; multiple + tags can be separated by commas. + ticket_type: + type: optional + docs: If provided, will only return tickets of this type. + ticket_url: + type: optional + docs: >- + If provided, will only return tickets where the URL matches or + contains the substring + validation: + format: uri + response: + docs: '' + type: root.PaginatedTicketList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 0958cbc6-6040-430a-848e-aafacbadf4ae + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Please add more integrations + assignees: + - 17a54124-287f-494d-965e-3c5b330c9a68 + assigned_teams: + - 4857c306-c1f9-489e-a6b6-90902f736dfe + creator: creator + due_date: '2022-10-11T00:00:00Z' + status: OPEN + description: >- + Can you please add more integrations? It'll make syncing + data much easier! + collections: + - fb8c55b6-1cb8-4b4c-9fb6-17924231619d + ticket_type: incident + account: account + contact: contact + parent_ticket: parent_ticket + attachments: + - 42747df1-95e7-46e2-93cc-66f1191edca5 + - 92f972d0-2526-434b-9409-4c3b468e08f0 + access_level: COMPANY + tags: + - enterprise + - other-tag + roles: + - 21a54124-397f-494d-985e-3c5b330b8a68 + - 17a54124-287f-494d-965e-3c5b330c9a68 + remote_created_at: '2021-11-10T00:00:00Z' + remote_updated_at: '2021-12-09T00:00:00Z' + completed_at: '2021-12-09T00:00:00Z' + remote_was_deleted: true + ticket_url: https://thirdpartysoftware.com/project/3/issue/1 + priority: URGENT + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + remote_fields: + - remote_field_class: remote_field_class + create: + path: /ticketing/v1/tickets + method: POST + auth: true + docs: Creates a `Ticket` object with the given values. + source: + openapi: openapi/openapi.yml + request: + name: TicketEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: root.TicketRequest + content-type: application/json + response: + docs: '' + type: root.TicketResponse + status-code: 201 + examples: + - headers: {} + request: + model: {} + response: + body: + model: + id: 0958cbc6-6040-430a-848e-aafacbadf4ae + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Please add more integrations + assignees: + - 17a54124-287f-494d-965e-3c5b330c9a68 + assigned_teams: + - 4857c306-c1f9-489e-a6b6-90902f736dfe + creator: creator + due_date: '2022-10-11T00:00:00Z' + status: OPEN + description: >- + Can you please add more integrations? It'll make syncing data + much easier! + collections: + - fb8c55b6-1cb8-4b4c-9fb6-17924231619d + ticket_type: incident + account: account + contact: contact + parent_ticket: parent_ticket + attachments: + - 42747df1-95e7-46e2-93cc-66f1191edca5 + - 92f972d0-2526-434b-9409-4c3b468e08f0 + access_level: COMPANY + tags: + - enterprise + - other-tag + roles: + - 21a54124-397f-494d-985e-3c5b330b8a68 + - 17a54124-287f-494d-965e-3c5b330c9a68 + remote_created_at: '2021-11-10T00:00:00Z' + remote_updated_at: '2021-12-09T00:00:00Z' + completed_at: '2021-12-09T00:00:00Z' + remote_was_deleted: true + ticket_url: https://thirdpartysoftware.com/project/3/issue/1 + priority: URGENT + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + remote_fields: + - remote_field_class: remote_field_class + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + retrieve: + path: /ticketing/v1/tickets/{id} + method: GET + auth: true + docs: Returns a `Ticket` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: TicketsRetrieveRequest + query-parameters: + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_remote_fields: + type: optional + docs: >- + Whether to include all remote fields, including fields that Merge + did not map to common models, in a normalized format. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + remote_fields: + type: optional + docs: Deprecated. Use show_enum_origins. + show_enum_origins: + type: optional + docs: >- + 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) + response: + docs: '' + type: root.Ticket + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 0958cbc6-6040-430a-848e-aafacbadf4ae + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Please add more integrations + assignees: + - 17a54124-287f-494d-965e-3c5b330c9a68 + assigned_teams: + - 4857c306-c1f9-489e-a6b6-90902f736dfe + creator: creator + due_date: '2022-10-11T00:00:00Z' + status: OPEN + description: >- + Can you please add more integrations? It'll make syncing data + much easier! + collections: + - fb8c55b6-1cb8-4b4c-9fb6-17924231619d + ticket_type: incident + account: account + contact: contact + parent_ticket: parent_ticket + attachments: + - 42747df1-95e7-46e2-93cc-66f1191edca5 + - 92f972d0-2526-434b-9409-4c3b468e08f0 + access_level: COMPANY + tags: + - enterprise + - other-tag + roles: + - 21a54124-397f-494d-985e-3c5b330b8a68 + - 17a54124-287f-494d-965e-3c5b330c9a68 + remote_created_at: '2021-11-10T00:00:00Z' + remote_updated_at: '2021-12-09T00:00:00Z' + completed_at: '2021-12-09T00:00:00Z' + remote_was_deleted: true + ticket_url: https://thirdpartysoftware.com/project/3/issue/1 + priority: URGENT + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + data: + key: value + remote_fields: + - remote_field_class: remote_field_class + value: + key: value + partialUpdate: + path: /ticketing/v1/tickets/{id} + method: PATCH + auth: true + docs: Updates a `Ticket` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: PatchedTicketEndpointRequest + query-parameters: + is_debug_mode: + type: optional + docs: >- + Whether to include debug fields (such as log file links) in the + response. + run_async: + type: optional + docs: Whether or not third-party updates should be run asynchronously. + body: + properties: + model: root.PatchedTicketRequest + content-type: application/json + response: + docs: '' + type: root.TicketResponse + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + request: + model: {} + response: + body: + model: + id: 0958cbc6-6040-430a-848e-aafacbadf4ae + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Please add more integrations + assignees: + - 17a54124-287f-494d-965e-3c5b330c9a68 + assigned_teams: + - 4857c306-c1f9-489e-a6b6-90902f736dfe + creator: creator + due_date: '2022-10-11T00:00:00Z' + status: OPEN + description: >- + Can you please add more integrations? It'll make syncing data + much easier! + collections: + - fb8c55b6-1cb8-4b4c-9fb6-17924231619d + ticket_type: incident + account: account + contact: contact + parent_ticket: parent_ticket + attachments: + - 42747df1-95e7-46e2-93cc-66f1191edca5 + - 92f972d0-2526-434b-9409-4c3b468e08f0 + access_level: COMPANY + tags: + - enterprise + - other-tag + roles: + - 21a54124-397f-494d-985e-3c5b330b8a68 + - 17a54124-287f-494d-965e-3c5b330c9a68 + remote_created_at: '2021-11-10T00:00:00Z' + remote_updated_at: '2021-12-09T00:00:00Z' + completed_at: '2021-12-09T00:00:00Z' + remote_was_deleted: true + ticket_url: https://thirdpartysoftware.com/project/3/issue/1 + priority: URGENT + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + remote_fields: + - remote_field_class: remote_field_class + warnings: + - source: + pointer: pointer + title: Unrecognized Field + detail: An unrecognized field, age, was passed in with request data. + problem_type: UNRECOGNIZED_FIELD + errors: + - source: + pointer: pointer + title: Missing Required Field + detail: custom_fields is a required field on model. + problem_type: MISSING_REQUIRED_FIELD + logs: + - log_id: 99433219-8017-4acd-bb3c-ceb23d663832 + dashboard_view: >- + https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832 + log_summary: + url: www.exampleintegration.com/api/v1/exampleapi + method: POST + status_code: 200 + viewersList: + path: /ticketing/v1/tickets/{ticket_id}/viewers + method: GET + auth: true + docs: >- + Returns a list of `Viewer` objects that point to a User id or Team id + that is either an assignee or viewer on a `Ticket` with the given id. + [Learn + more.](https://help.merge.dev/en/articles/10333658-ticketing-access-control-list-acls) + source: + openapi: openapi/openapi.yml + path-parameters: + ticket_id: string + request: + name: TicketsViewersListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: root.PaginatedViewerList + status-code: 200 + examples: + - path-parameters: + ticket_id: ticket_id + headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 17a54124-287f-494d-965e-3c5b330c9a68 + remote_id: '088899' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + team: team + user: user + metaPatchRetrieve: + path: /ticketing/v1/tickets/meta/patch/{id} + method: GET + auth: true + docs: Returns metadata for `Ticket` PATCHs. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + response: + docs: '' + type: root.MetaResponse + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + metaPostRetrieve: + path: /ticketing/v1/tickets/meta/post + method: GET + auth: true + docs: Returns metadata for `Ticket` POSTs. + source: + openapi: openapi/openapi.yml + request: + name: TicketsMetaPostRetrieveRequest + query-parameters: + collection_id: + type: optional + docs: If provided, will only return tickets for this collection. + ticket_type: + type: optional + docs: If provided, will only return tickets for this ticket type. + response: + docs: '' + type: root.MetaResponse + status-code: 200 + examples: + - headers: {} + response: + body: + request_schema: + type: object + properties: + model: + type: object + required: + - last_name + - first_name + - merge_categories + - new_york_city_neighborhood + - favorite_tv_shows + - favorite_watch + properties: + email_addresses: + type: array + items: + type: object + properties: + value: + type: string + title: value + email_address_type: + type: string + title: email_address_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: email_addresses + description: Array of email_addresses objects + urls: + type: array + items: + type: object + properties: + value: + type: string + title: value + url_type: + type: string + title: url_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: urls + description: Array of urls objects + first_name: + type: string + title: first_name + description: The first name. + last_name: + type: string + title: last_name + description: The last name. + phone_numbers: + type: array + items: + type: object + properties: + value: + type: string + title: value + phone_number_type: + type: string + title: phone_number_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: phone_numbers + description: Array of phone_numbers objects + tags: + type: array + items: + type: string + format: uuid + title: tags + description: Array of tags names + attachments: + type: array + items: + type: object + properties: + id: + type: string + title: id + file_url: + type: string + title: file_url + file_name: + type: string + title: file_name + attachment_type: + type: string + title: attachment_type + integration_params: + type: object + title: integration_params + properties: {} + linked_account_params: + type: object + title: linked_account_params + properties: {} + title: attachments + description: 'Array of attachments objects ' + merge_categories: + type: array + categories: + type: string + enum: + - HRIS + - ATS + - Accounting + - Ticketing + - File Storage + - CRM + - Marketing Automation + enum_information: + - value: HRIS + description: Merge HRIS Category + - value: ATS + description: Merge ATS Category + - value: Accounting + description: Merge Accounting Category + - value: Ticketing + description: Merge Ticketing Category + - value: File Storage + description: Merge File Storage Category + - value: CRM + description: Merge CRM Category + - value: Marketing Automation + description: Merge Marketing Automation Category + title: Merge Categories + description: Array of Merge's Unified API Categories + new_york_city_neighborhood: + type: string + title: Borough + description: One of the 5 Boroughs of New York City + favorite_tv_shows: + type: array + items: + type: string + format: uuid + title: Favorite TV Shows + description: Array of TV Show objects on merge.tv_shows + favorite_watch: + type: string + title: Favorite Watch + description: Favorite watch of all time + remote_field_classes: + key: value + status: + linked_account_status: linked_account_status + can_make_request: true + has_conditional_params: true + has_required_linked_account_params: true + remoteFieldClassesList: + path: /ticketing/v1/tickets/remote-field-classes + method: GET + auth: true + docs: Returns a list of `RemoteFieldClass` objects. + source: + openapi: openapi/openapi.yml + request: + name: TicketsRemoteFieldClassesListRequest + query-parameters: + cursor: + type: optional + docs: The pagination cursor value. + ids: + type: optional + docs: >- + If provided, will only return remote field classes with the `ids` + in this list + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + is_common_model_field: + type: optional + docs: >- + If provided, will only return remote field classes with this + is_common_model_field value + is_custom: + type: optional + docs: >- + If provided, will only return remote fields classes with this + is_custom value + page_size: + type: optional + docs: Number of results to return per page. + response: + docs: '' + type: root.PaginatedRemoteFieldClassList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: id + display_name: display_name + remote_key_name: remote_key_name + description: description + is_custom: true + is_required: true + field_type: string + field_format: string + field_choices: + - {} + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ticketing/users.yml b/.mock/definition/ticketing/users.yml new file mode 100644 index 0000000..76cfbe5 --- /dev/null +++ b/.mock/definition/ticketing/users.yml @@ -0,0 +1,185 @@ +types: + UsersListRequestExpand: + enum: + - roles + - teams + - value: teams,roles + name: TeamsRoles + source: + openapi: openapi/openapi.yml + UsersRetrieveRequestExpand: + enum: + - roles + - teams + - value: teams,roles + name: TeamsRoles + source: + openapi: openapi/openapi.yml +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ticketing/v1/users + method: GET + auth: true + docs: Returns a list of `User` objects. + source: + openapi: openapi/openapi.yml + request: + name: UsersListRequest + query-parameters: + created_after: + type: optional + docs: If provided, will only return objects created after this datetime. + created_before: + type: optional + docs: >- + If provided, will only return objects created before this + datetime. + cursor: + type: optional + docs: The pagination cursor value. + email_address: + type: optional + docs: >- + If provided, will only return users with emails equal to this + value (case insensitive). + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_deleted_data: + type: optional + docs: >- + Indicates whether or not this object has been deleted in the third + party platform. Full coverage deletion detection is a premium + add-on. Native deletion detection is offered for free with limited + coverage. [Learn + more](https://docs.merge.dev/integrations/hris/supported-features/). + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + modified_after: + type: optional + docs: >- + If provided, only objects synced by Merge after this date time + will be returned. + modified_before: + type: optional + docs: >- + If provided, only objects synced by Merge before this date time + will be returned. + page_size: + type: optional + docs: Number of results to return per page. + remote_id: + type: optional + docs: The API provider's ID for the given object. + team: + type: optional + docs: If provided, will only return users matching in this team. + response: + docs: '' + type: root.PaginatedUserList + status-code: 200 + examples: + - headers: {} + response: + body: + next: cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw + previous: cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ + results: + - id: 17a54124-287f-494d-965e-3c5b330c9a68 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Gil Feig + email_address: help@merge.dev + is_active: true + teams: + - 28b54125-287f-494d-965e-3c5b330c9a68 + - 17a54124-287f-494d-965e-3c5b330c9a68 + roles: + - 23454124-387f-494d-265e-345b330c9123 + avatar: https://merge.dev/user_profile_pic.png + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + retrieve: + path: /ticketing/v1/users/{id} + method: GET + auth: true + docs: Returns a `User` object with the given `id`. + source: + openapi: openapi/openapi.yml + path-parameters: + id: string + request: + name: UsersRetrieveRequest + query-parameters: + expand: + type: optional + docs: >- + Which relations should be returned in expanded form. Multiple + relation names should be comma separated without spaces. + include_remote_data: + type: optional + docs: >- + Whether to include the original data Merge fetched from the + third-party to produce these models. + include_shell_data: + type: optional + docs: >- + Whether to include shell records. Shell records are empty records + (they may contain some metadata but all other fields are null). + response: + docs: '' + type: root.User + status-code: 200 + examples: + - path-parameters: + id: id + headers: {} + response: + body: + id: 17a54124-287f-494d-965e-3c5b330c9a68 + remote_id: '19202938' + created_at: '2021-09-15T00:00:00Z' + modified_at: '2021-10-16T00:00:00Z' + name: Gil Feig + email_address: help@merge.dev + is_active: true + teams: + - 28b54125-287f-494d-965e-3c5b330c9a68 + - 17a54124-287f-494d-965e-3c5b330c9a68 + roles: + - 23454124-387f-494d-265e-345b330c9123 + avatar: https://merge.dev/user_profile_pic.png + remote_was_deleted: true + field_mappings: + organization_defined_targets: + custom_key: custom_value + linked_account_defined_targets: + custom_key: custom_value + remote_data: + - path: /platform-endpoint + data: + key: value + source: + openapi: openapi/openapi.yml diff --git a/.mock/definition/ticketing/webhookReceivers.yml b/.mock/definition/ticketing/webhookReceivers.yml new file mode 100644 index 0000000..54b5126 --- /dev/null +++ b/.mock/definition/ticketing/webhookReceivers.yml @@ -0,0 +1,61 @@ +imports: + root: __package__.yml +service: + auth: false + base-path: '' + endpoints: + list: + path: /ticketing/v1/webhook-receivers + method: GET + auth: true + docs: Returns a list of `WebhookReceiver` objects. + source: + openapi: openapi/openapi.yml + response: + docs: '' + type: list + status-code: 200 + examples: + - headers: {} + response: + body: + - event: event + is_active: true + key: key + create: + path: /ticketing/v1/webhook-receivers + method: POST + auth: true + docs: Creates a `WebhookReceiver` object with the given values. + source: + openapi: openapi/openapi.yml + request: + name: WebhookReceiverRequest + body: + properties: + event: + type: string + validation: + minLength: 1 + is_active: boolean + key: + type: optional + validation: + minLength: 1 + content-type: application/json + response: + docs: '' + type: root.WebhookReceiver + status-code: 201 + examples: + - headers: {} + request: + event: event + is_active: true + response: + body: + event: event + is_active: true + key: key + source: + openapi: openapi/openapi.yml diff --git a/.mock/fern.config.json b/.mock/fern.config.json new file mode 100644 index 0000000..c4faf10 --- /dev/null +++ b/.mock/fern.config.json @@ -0,0 +1,4 @@ +{ + "organization" : "merge", + "version" : "0.63.28" +} \ No newline at end of file diff --git a/accounting/account_details.go b/accounting/account_details.go new file mode 100644 index 0000000..11c286f --- /dev/null +++ b/accounting/account_details.go @@ -0,0 +1,164 @@ +// Code generated by Fern. DO NOT EDIT. + +package accounting + +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" + time "time" +) + +type AccountDetails struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + Integration *string `json:"integration,omitempty" url:"integration,omitempty"` + IntegrationSlug *string `json:"integration_slug,omitempty" url:"integration_slug,omitempty"` + Category *CategoryEnum `json:"category,omitempty" url:"category,omitempty"` + EndUserOriginId *string `json:"end_user_origin_id,omitempty" url:"end_user_origin_id,omitempty"` + EndUserOrganizationName *string `json:"end_user_organization_name,omitempty" url:"end_user_organization_name,omitempty"` + EndUserEmailAddress *string `json:"end_user_email_address,omitempty" url:"end_user_email_address,omitempty"` + Status *string `json:"status,omitempty" url:"status,omitempty"` + WebhookListenerUrl *string `json:"webhook_listener_url,omitempty" url:"webhook_listener_url,omitempty"` + // 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. + IsDuplicate *bool `json:"is_duplicate,omitempty" url:"is_duplicate,omitempty"` + AccountType *string `json:"account_type,omitempty" url:"account_type,omitempty"` + // The time at which account completes the linking flow. + CompletedAt *time.Time `json:"completed_at,omitempty" url:"completed_at,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AccountDetails) GetId() *string { + if a == nil { + return nil + } + return a.Id +} + +func (a *AccountDetails) GetIntegration() *string { + if a == nil { + return nil + } + return a.Integration +} + +func (a *AccountDetails) GetIntegrationSlug() *string { + if a == nil { + return nil + } + return a.IntegrationSlug +} + +func (a *AccountDetails) GetCategory() *CategoryEnum { + if a == nil { + return nil + } + return a.Category +} + +func (a *AccountDetails) GetEndUserOriginId() *string { + if a == nil { + return nil + } + return a.EndUserOriginId +} + +func (a *AccountDetails) GetEndUserOrganizationName() *string { + if a == nil { + return nil + } + return a.EndUserOrganizationName +} + +func (a *AccountDetails) GetEndUserEmailAddress() *string { + if a == nil { + return nil + } + return a.EndUserEmailAddress +} + +func (a *AccountDetails) GetStatus() *string { + if a == nil { + return nil + } + return a.Status +} + +func (a *AccountDetails) GetWebhookListenerUrl() *string { + if a == nil { + return nil + } + return a.WebhookListenerUrl +} + +func (a *AccountDetails) GetIsDuplicate() *bool { + if a == nil { + return nil + } + return a.IsDuplicate +} + +func (a *AccountDetails) GetAccountType() *string { + if a == nil { + return nil + } + return a.AccountType +} + +func (a *AccountDetails) GetCompletedAt() *time.Time { + if a == nil { + return nil + } + return a.CompletedAt +} + +func (a *AccountDetails) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AccountDetails) UnmarshalJSON(data []byte) error { + type embed AccountDetails + var unmarshaler = struct { + embed + CompletedAt *internal.DateTime `json:"completed_at,omitempty"` + }{ + embed: embed(*a), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *a = AccountDetails(unmarshaler.embed) + a.CompletedAt = unmarshaler.CompletedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AccountDetails) MarshalJSON() ([]byte, error) { + type embed AccountDetails + var marshaler = struct { + embed + CompletedAt *internal.DateTime `json:"completed_at,omitempty"` + }{ + embed: embed(*a), + CompletedAt: internal.NewOptionalDateTime(a.CompletedAt), + } + return json.Marshal(marshaler) +} + +func (a *AccountDetails) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} diff --git a/accounting/account_token.go b/accounting/account_token.go new file mode 100644 index 0000000..54f0ed2 --- /dev/null +++ b/accounting/account_token.go @@ -0,0 +1,71 @@ +// Code generated by Fern. DO NOT EDIT. + +package accounting + +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" +) + +type AccountToken struct { + AccountToken string `json:"account_token" url:"account_token"` + Integration *AccountIntegration `json:"integration" url:"integration"` + Id string `json:"id" url:"id"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AccountToken) GetAccountToken() string { + if a == nil { + return "" + } + return a.AccountToken +} + +func (a *AccountToken) GetIntegration() *AccountIntegration { + if a == nil { + return nil + } + return a.Integration +} + +func (a *AccountToken) GetId() string { + if a == nil { + return "" + } + return a.Id +} + +func (a *AccountToken) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AccountToken) UnmarshalJSON(data []byte) error { + type unmarshaler AccountToken + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *a = AccountToken(value) + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AccountToken) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} diff --git a/accounting/accountdetails/client.go b/accounting/accountdetails/client.go index e76b445..11c06cd 100644 --- a/accounting/accountdetails/client.go +++ b/accounting/accountdetails/client.go @@ -1,48 +1,65 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package accountdetails import ( context "context" - accounting "github.com/merge-api/merge-go-client/accounting" - core "github.com/merge-api/merge-go-client/core" + accounting "github.com/merge-api/merge-go-client/v2/accounting" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Get details for a linked account. -func (c *Client) Retrieve(ctx context.Context) (*accounting.AccountDetails, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/account-details" +func (c *Client) Retrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*accounting.AccountDetails, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/account-details" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *accounting.AccountDetails if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/accounting/accounting_periods.go b/accounting/accounting_periods.go index f446398..b31abc5 100644 --- a/accounting/accounting_periods.go +++ b/accounting/accounting_periods.go @@ -1,21 +1,91 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package accounting +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" +) + type AccountingPeriodsListRequest struct { // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` } type AccountingPeriodsRetrieveRequest struct { // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` +} + +type PaginatedAccountingPeriodList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*AccountingPeriod `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedAccountingPeriodList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedAccountingPeriodList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedAccountingPeriodList) GetResults() []*AccountingPeriod { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedAccountingPeriodList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedAccountingPeriodList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedAccountingPeriodList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedAccountingPeriodList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedAccountingPeriodList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) } diff --git a/accounting/accountingperiods/client.go b/accounting/accountingperiods/client.go index 3c95325..fa31645 100644 --- a/accounting/accountingperiods/client.go +++ b/accounting/accountingperiods/client.go @@ -1,101 +1,137 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package accountingperiods import ( context "context" fmt "fmt" - accounting "github.com/merge-api/merge-go-client/accounting" - core "github.com/merge-api/merge-go-client/core" + accounting "github.com/merge-api/merge-go-client/v2/accounting" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `AccountingPeriod` objects. -func (c *Client) List(ctx context.Context, request *accounting.AccountingPeriodsListRequest) (*accounting.PaginatedAccountingPeriodList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL +func (c *Client) List( + ctx context.Context, + request *accounting.AccountingPeriodsListRequest, + opts ...option.RequestOption, +) (*core.Page[*accounting.AccountingPeriod], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/accounting-periods" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } - endpointURL := baseURL + "/" + "accounting/v1/accounting-periods" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) - queryParams := make(url.Values) - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) + readPageResponse := func(response *accounting.PaginatedAccountingPeriodList) *internal.PageResponse[*string, *accounting.AccountingPeriod] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *accounting.AccountingPeriod]{ + Next: next, + Results: results, + Done: next == zeroValue, + } } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *accounting.PaginatedAccountingPeriodList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { - return nil, err - } - return response, nil + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Returns an `AccountingPeriod` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *accounting.AccountingPeriodsRetrieveRequest) (*accounting.AccountingPeriod, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"accounting/v1/accounting-periods/%v", id) - - queryParams := make(url.Values) - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *accounting.AccountingPeriodsRetrieveRequest, + opts ...option.RequestOption, +) (*accounting.AccountingPeriod, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/accounting/v1/accounting-periods/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *accounting.AccountingPeriod if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/accounting/accounts.go b/accounting/accounts.go index e5d0a3f..05777b0 100644 --- a/accounting/accounts.go +++ b/accounting/accounts.go @@ -1,62 +1,72 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package accounting import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type AccountEndpointRequest struct { // Whether to include debug fields (such as log file links) in the response. - IsDebugMode *bool `json:"-"` + IsDebugMode *bool `json:"-" url:"is_debug_mode,omitempty"` // Whether or not third-party updates should be run asynchronously. - RunAsync *bool `json:"-"` - Model *AccountRequest `json:"model,omitempty"` + RunAsync *bool `json:"-" url:"run_async,omitempty"` + Model *AccountRequest `json:"model,omitempty" url:"-"` } type AccountsListRequest struct { - // If provided, will only provide accounts with the passed in enum. - AccountType *string `json:"-"` + // If provided, will only return accounts with the passed in enum. + AccountType *string `json:"-" url:"account_type,omitempty"` + // If provided, will only return accounts with this classification. + Classification *string `json:"-" url:"classification,omitempty"` // If provided, will only return accounts for this company. - CompanyId *string `json:"-"` + CompanyId *string `json:"-" url:"company_id,omitempty"` // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *string `json:"-"` + Expand []*string `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` + // If provided, will only return Accounts with this name. + Name *string `json:"-" url:"name,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // Deprecated. Use show_enum_origins. - RemoteFields *AccountsListRequestRemoteFields `json:"-"` + RemoteFields *AccountsListRequestRemoteFields `json:"-" url:"remote_fields,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` // 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) - ShowEnumOrigins *AccountsListRequestShowEnumOrigins `json:"-"` + ShowEnumOrigins *AccountsListRequestShowEnumOrigins `json:"-" url:"show_enum_origins,omitempty"` + // If provided, will only return accounts with this status. + Status *string `json:"-" url:"status,omitempty"` } type AccountsRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *string `json:"-"` + Expand []*string `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // Deprecated. Use show_enum_origins. - RemoteFields *AccountsRetrieveRequestRemoteFields `json:"-"` + RemoteFields *AccountsRetrieveRequestRemoteFields `json:"-" url:"remote_fields,omitempty"` // 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) - ShowEnumOrigins *AccountsRetrieveRequestShowEnumOrigins `json:"-"` + ShowEnumOrigins *AccountsRetrieveRequestShowEnumOrigins `json:"-" url:"show_enum_origins,omitempty"` } type AccountsListRequestRemoteFields string @@ -158,3 +168,1215 @@ func NewAccountsRetrieveRequestShowEnumOriginsFromString(s string) (AccountsRetr func (a AccountsRetrieveRequestShowEnumOrigins) Ptr() *AccountsRetrieveRequestShowEnumOrigins { return &a } + +// # The Account Object +// ### Description +// An `Account` represents a category in a company’s ledger in which a financial transaction is recorded against. The aggregation of each `Account` object is often referred to as the **Chart of Accounts**. +// +// An `Account` can be classified into one of the following categories, determined through the `classification` field: +// * __Asset:__ Accounts Receivable and Bank Accounts +// * __Liability:__ Accounts Payable and Credit Card Accounts +// * __Equity:__ Treasury Accounts and Retained Earnings +// * __Revenue:__ Income and Other Income +// * __Expense:__ Cost of Goods Sold and Office Expenses +// +// ### Usage Example +// Fetch from the `LIST Accounts` endpoint and view a company's accounts. +type AccountRequest struct { + // The account's name. + Name *string `json:"name,omitempty" url:"name,omitempty"` + // The account's description. + Description *string `json:"description,omitempty" url:"description,omitempty"` + // The account's broadest grouping. + // + // * `ASSET` - ASSET + // * `EQUITY` - EQUITY + // * `EXPENSE` - EXPENSE + // * `LIABILITY` - LIABILITY + // * `REVENUE` - REVENUE + Classification *AccountRequestClassification `json:"classification,omitempty" url:"classification,omitempty"` + // The account's type is a narrower and more specific grouping within the account's classification. + Type *string `json:"type,omitempty" url:"type,omitempty"` + // Normalized account type- which is a narrower and more specific grouping within the account's classification. + // + // * `BANK` - BANK + // * `CREDIT_CARD` - CREDIT_CARD + // * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE + // * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE + // * `FIXED_ASSET` - FIXED_ASSET + // * `OTHER_ASSET` - OTHER_ASSET + // * `OTHER_CURRENT_ASSET` - OTHER_CURRENT_ASSET + // * `OTHER_EXPENSE` - OTHER_EXPENSE + // * `OTHER_INCOME` - OTHER_INCOME + // * `COST_OF_GOODS_SOLD` - COST_OF_GOODS_SOLD + // * `OTHER_CURRENT_LIABILITY` - OTHER_CURRENT_LIABILITY + // * `LONG_TERM_LIABILITY` - LONG_TERM_LIABILITY + // * `NON_POSTING` - NON_POSTING + AccountType *AccountRequestAccountType `json:"account_type,omitempty" url:"account_type,omitempty"` + // The account's status. + // + // * `ACTIVE` - ACTIVE + // * `PENDING` - PENDING + // * `INACTIVE` - INACTIVE + Status *AccountRequestStatus `json:"status,omitempty" url:"status,omitempty"` + // The account's current balance. + CurrentBalance *float64 `json:"current_balance,omitempty" url:"current_balance,omitempty"` + // The account's currency. + // + // * `XUA` - ADB Unit of Account + // * `AFN` - Afghan Afghani + // * `AFA` - Afghan Afghani (1927–2002) + // * `ALL` - Albanian Lek + // * `ALK` - Albanian Lek (1946–1965) + // * `DZD` - Algerian Dinar + // * `ADP` - Andorran Peseta + // * `AOA` - Angolan Kwanza + // * `AOK` - Angolan Kwanza (1977–1991) + // * `AON` - Angolan New Kwanza (1990–2000) + // * `AOR` - Angolan Readjusted Kwanza (1995–1999) + // * `ARA` - Argentine Austral + // * `ARS` - Argentine Peso + // * `ARM` - Argentine Peso (1881–1970) + // * `ARP` - Argentine Peso (1983–1985) + // * `ARL` - Argentine Peso Ley (1970–1983) + // * `AMD` - Armenian Dram + // * `AWG` - Aruban Florin + // * `AUD` - Australian Dollar + // * `ATS` - Austrian Schilling + // * `AZN` - Azerbaijani Manat + // * `AZM` - Azerbaijani Manat (1993–2006) + // * `BSD` - Bahamian Dollar + // * `BHD` - Bahraini Dinar + // * `BDT` - Bangladeshi Taka + // * `BBD` - Barbadian Dollar + // * `BYN` - Belarusian Ruble + // * `BYB` - Belarusian Ruble (1994–1999) + // * `BYR` - Belarusian Ruble (2000–2016) + // * `BEF` - Belgian Franc + // * `BEC` - Belgian Franc (convertible) + // * `BEL` - Belgian Franc (financial) + // * `BZD` - Belize Dollar + // * `BMD` - Bermudan Dollar + // * `BTN` - Bhutanese Ngultrum + // * `BOB` - Bolivian Boliviano + // * `BOL` - Bolivian Boliviano (1863–1963) + // * `BOV` - Bolivian Mvdol + // * `BOP` - Bolivian Peso + // * `BAM` - Bosnia-Herzegovina Convertible Mark + // * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + // * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + // * `BWP` - Botswanan Pula + // * `BRC` - Brazilian Cruzado (1986–1989) + // * `BRZ` - Brazilian Cruzeiro (1942–1967) + // * `BRE` - Brazilian Cruzeiro (1990–1993) + // * `BRR` - Brazilian Cruzeiro (1993–1994) + // * `BRN` - Brazilian New Cruzado (1989–1990) + // * `BRB` - Brazilian New Cruzeiro (1967–1986) + // * `BRL` - Brazilian Real + // * `GBP` - British Pound + // * `BND` - Brunei Dollar + // * `BGL` - Bulgarian Hard Lev + // * `BGN` - Bulgarian Lev + // * `BGO` - Bulgarian Lev (1879–1952) + // * `BGM` - Bulgarian Socialist Lev + // * `BUK` - Burmese Kyat + // * `BIF` - Burundian Franc + // * `XPF` - CFP Franc + // * `KHR` - Cambodian Riel + // * `CAD` - Canadian Dollar + // * `CVE` - Cape Verdean Escudo + // * `KYD` - Cayman Islands Dollar + // * `XAF` - Central African CFA Franc + // * `CLE` - Chilean Escudo + // * `CLP` - Chilean Peso + // * `CLF` - Chilean Unit of Account (UF) + // * `CNX` - Chinese People’s Bank Dollar + // * `CNY` - Chinese Yuan + // * `CNH` - Chinese Yuan (offshore) + // * `COP` - Colombian Peso + // * `COU` - Colombian Real Value Unit + // * `KMF` - Comorian Franc + // * `CDF` - Congolese Franc + // * `CRC` - Costa Rican Colón + // * `HRD` - Croatian Dinar + // * `HRK` - Croatian Kuna + // * `CUC` - Cuban Convertible Peso + // * `CUP` - Cuban Peso + // * `CYP` - Cypriot Pound + // * `CZK` - Czech Koruna + // * `CSK` - Czechoslovak Hard Koruna + // * `DKK` - Danish Krone + // * `DJF` - Djiboutian Franc + // * `DOP` - Dominican Peso + // * `NLG` - Dutch Guilder + // * `XCD` - East Caribbean Dollar + // * `DDM` - East German Mark + // * `ECS` - Ecuadorian Sucre + // * `ECV` - Ecuadorian Unit of Constant Value + // * `EGP` - Egyptian Pound + // * `GQE` - Equatorial Guinean Ekwele + // * `ERN` - Eritrean Nakfa + // * `EEK` - Estonian Kroon + // * `ETB` - Ethiopian Birr + // * `EUR` - Euro + // * `XBA` - European Composite Unit + // * `XEU` - European Currency Unit + // * `XBB` - European Monetary Unit + // * `XBC` - European Unit of Account (XBC) + // * `XBD` - European Unit of Account (XBD) + // * `FKP` - Falkland Islands Pound + // * `FJD` - Fijian Dollar + // * `FIM` - Finnish Markka + // * `FRF` - French Franc + // * `XFO` - French Gold Franc + // * `XFU` - French UIC-Franc + // * `GMD` - Gambian Dalasi + // * `GEK` - Georgian Kupon Larit + // * `GEL` - Georgian Lari + // * `DEM` - German Mark + // * `GHS` - Ghanaian Cedi + // * `GHC` - Ghanaian Cedi (1979–2007) + // * `GIP` - Gibraltar Pound + // * `XAU` - Gold + // * `GRD` - Greek Drachma + // * `GTQ` - Guatemalan Quetzal + // * `GWP` - Guinea-Bissau Peso + // * `GNF` - Guinean Franc + // * `GNS` - Guinean Syli + // * `GYD` - Guyanaese Dollar + // * `HTG` - Haitian Gourde + // * `HNL` - Honduran Lempira + // * `HKD` - Hong Kong Dollar + // * `HUF` - Hungarian Forint + // * `IMP` - IMP + // * `ISK` - Icelandic Króna + // * `ISJ` - Icelandic Króna (1918–1981) + // * `INR` - Indian Rupee + // * `IDR` - Indonesian Rupiah + // * `IRR` - Iranian Rial + // * `IQD` - Iraqi Dinar + // * `IEP` - Irish Pound + // * `ILS` - Israeli New Shekel + // * `ILP` - Israeli Pound + // * `ILR` - Israeli Shekel (1980–1985) + // * `ITL` - Italian Lira + // * `JMD` - Jamaican Dollar + // * `JPY` - Japanese Yen + // * `JOD` - Jordanian Dinar + // * `KZT` - Kazakhstani Tenge + // * `KES` - Kenyan Shilling + // * `KWD` - Kuwaiti Dinar + // * `KGS` - Kyrgystani Som + // * `LAK` - Laotian Kip + // * `LVL` - Latvian Lats + // * `LVR` - Latvian Ruble + // * `LBP` - Lebanese Pound + // * `LSL` - Lesotho Loti + // * `LRD` - Liberian Dollar + // * `LYD` - Libyan Dinar + // * `LTL` - Lithuanian Litas + // * `LTT` - Lithuanian Talonas + // * `LUL` - Luxembourg Financial Franc + // * `LUC` - Luxembourgian Convertible Franc + // * `LUF` - Luxembourgian Franc + // * `MOP` - Macanese Pataca + // * `MKD` - Macedonian Denar + // * `MKN` - Macedonian Denar (1992–1993) + // * `MGA` - Malagasy Ariary + // * `MGF` - Malagasy Franc + // * `MWK` - Malawian Kwacha + // * `MYR` - Malaysian Ringgit + // * `MVR` - Maldivian Rufiyaa + // * `MVP` - Maldivian Rupee (1947–1981) + // * `MLF` - Malian Franc + // * `MTL` - Maltese Lira + // * `MTP` - Maltese Pound + // * `MRU` - Mauritanian Ouguiya + // * `MRO` - Mauritanian Ouguiya (1973–2017) + // * `MUR` - Mauritian Rupee + // * `MXV` - Mexican Investment Unit + // * `MXN` - Mexican Peso + // * `MXP` - Mexican Silver Peso (1861–1992) + // * `MDC` - Moldovan Cupon + // * `MDL` - Moldovan Leu + // * `MCF` - Monegasque Franc + // * `MNT` - Mongolian Tugrik + // * `MAD` - Moroccan Dirham + // * `MAF` - Moroccan Franc + // * `MZE` - Mozambican Escudo + // * `MZN` - Mozambican Metical + // * `MZM` - Mozambican Metical (1980–2006) + // * `MMK` - Myanmar Kyat + // * `NAD` - Namibian Dollar + // * `NPR` - Nepalese Rupee + // * `ANG` - Netherlands Antillean Guilder + // * `TWD` - New Taiwan Dollar + // * `NZD` - New Zealand Dollar + // * `NIO` - Nicaraguan Córdoba + // * `NIC` - Nicaraguan Córdoba (1988–1991) + // * `NGN` - Nigerian Naira + // * `KPW` - North Korean Won + // * `NOK` - Norwegian Krone + // * `OMR` - Omani Rial + // * `PKR` - Pakistani Rupee + // * `XPD` - Palladium + // * `PAB` - Panamanian Balboa + // * `PGK` - Papua New Guinean Kina + // * `PYG` - Paraguayan Guarani + // * `PEI` - Peruvian Inti + // * `PEN` - Peruvian Sol + // * `PES` - Peruvian Sol (1863–1965) + // * `PHP` - Philippine Peso + // * `XPT` - Platinum + // * `PLN` - Polish Zloty + // * `PLZ` - Polish Zloty (1950–1995) + // * `PTE` - Portuguese Escudo + // * `GWE` - Portuguese Guinea Escudo + // * `QAR` - Qatari Rial + // * `XRE` - RINET Funds + // * `RHD` - Rhodesian Dollar + // * `RON` - Romanian Leu + // * `ROL` - Romanian Leu (1952–2006) + // * `RUB` - Russian Ruble + // * `RUR` - Russian Ruble (1991–1998) + // * `RWF` - Rwandan Franc + // * `SVC` - Salvadoran Colón + // * `WST` - Samoan Tala + // * `SAR` - Saudi Riyal + // * `RSD` - Serbian Dinar + // * `CSD` - Serbian Dinar (2002–2006) + // * `SCR` - Seychellois Rupee + // * `SLL` - Sierra Leonean Leone + // * `XAG` - Silver + // * `SGD` - Singapore Dollar + // * `SKK` - Slovak Koruna + // * `SIT` - Slovenian Tolar + // * `SBD` - Solomon Islands Dollar + // * `SOS` - Somali Shilling + // * `ZAR` - South African Rand + // * `ZAL` - South African Rand (financial) + // * `KRH` - South Korean Hwan (1953–1962) + // * `KRW` - South Korean Won + // * `KRO` - South Korean Won (1945–1953) + // * `SSP` - South Sudanese Pound + // * `SUR` - Soviet Rouble + // * `ESP` - Spanish Peseta + // * `ESA` - Spanish Peseta (A account) + // * `ESB` - Spanish Peseta (convertible account) + // * `XDR` - Special Drawing Rights + // * `LKR` - Sri Lankan Rupee + // * `SHP` - St. Helena Pound + // * `XSU` - Sucre + // * `SDD` - Sudanese Dinar (1992–2007) + // * `SDG` - Sudanese Pound + // * `SDP` - Sudanese Pound (1957–1998) + // * `SRD` - Surinamese Dollar + // * `SRG` - Surinamese Guilder + // * `SZL` - Swazi Lilangeni + // * `SEK` - Swedish Krona + // * `CHF` - Swiss Franc + // * `SYP` - Syrian Pound + // * `STN` - São Tomé & Príncipe Dobra + // * `STD` - São Tomé & Príncipe Dobra (1977–2017) + // * `TVD` - TVD + // * `TJR` - Tajikistani Ruble + // * `TJS` - Tajikistani Somoni + // * `TZS` - Tanzanian Shilling + // * `XTS` - Testing Currency Code + // * `THB` - Thai Baht + // * `XXX` - The codes assigned for transactions where no currency is involved + // * `TPE` - Timorese Escudo + // * `TOP` - Tongan Paʻanga + // * `TTD` - Trinidad & Tobago Dollar + // * `TND` - Tunisian Dinar + // * `TRY` - Turkish Lira + // * `TRL` - Turkish Lira (1922–2005) + // * `TMT` - Turkmenistani Manat + // * `TMM` - Turkmenistani Manat (1993–2009) + // * `USD` - US Dollar + // * `USN` - US Dollar (Next day) + // * `USS` - US Dollar (Same day) + // * `UGX` - Ugandan Shilling + // * `UGS` - Ugandan Shilling (1966–1987) + // * `UAH` - Ukrainian Hryvnia + // * `UAK` - Ukrainian Karbovanets + // * `AED` - United Arab Emirates Dirham + // * `UYW` - Uruguayan Nominal Wage Index Unit + // * `UYU` - Uruguayan Peso + // * `UYP` - Uruguayan Peso (1975–1993) + // * `UYI` - Uruguayan Peso (Indexed Units) + // * `UZS` - Uzbekistani Som + // * `VUV` - Vanuatu Vatu + // * `VES` - Venezuelan Bolívar + // * `VEB` - Venezuelan Bolívar (1871–2008) + // * `VEF` - Venezuelan Bolívar (2008–2018) + // * `VND` - Vietnamese Dong + // * `VNN` - Vietnamese Dong (1978–1985) + // * `CHE` - WIR Euro + // * `CHW` - WIR Franc + // * `XOF` - West African CFA Franc + // * `YDD` - Yemeni Dinar + // * `YER` - Yemeni Rial + // * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + // * `YUD` - Yugoslavian Hard Dinar (1966–1990) + // * `YUM` - Yugoslavian New Dinar (1994–2002) + // * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + // * `ZWN` - ZWN + // * `ZRN` - Zairean New Zaire (1993–1998) + // * `ZRZ` - Zairean Zaire (1971–1993) + // * `ZMW` - Zambian Kwacha + // * `ZMK` - Zambian Kwacha (1968–2012) + // * `ZWD` - Zimbabwean Dollar (1980–2008) + // * `ZWR` - Zimbabwean Dollar (2008) + // * `ZWL` - Zimbabwean Dollar (2009) + Currency *AccountRequestCurrency `json:"currency,omitempty" url:"currency,omitempty"` + // The account's number. + AccountNumber *string `json:"account_number,omitempty" url:"account_number,omitempty"` + // ID of the parent account. + ParentAccount *string `json:"parent_account,omitempty" url:"parent_account,omitempty"` + // The company the account belongs to. + Company *string `json:"company,omitempty" url:"company,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AccountRequest) GetName() *string { + if a == nil { + return nil + } + return a.Name +} + +func (a *AccountRequest) GetDescription() *string { + if a == nil { + return nil + } + return a.Description +} + +func (a *AccountRequest) GetClassification() *AccountRequestClassification { + if a == nil { + return nil + } + return a.Classification +} + +func (a *AccountRequest) GetType() *string { + if a == nil { + return nil + } + return a.Type +} + +func (a *AccountRequest) GetAccountType() *AccountRequestAccountType { + if a == nil { + return nil + } + return a.AccountType +} + +func (a *AccountRequest) GetStatus() *AccountRequestStatus { + if a == nil { + return nil + } + return a.Status +} + +func (a *AccountRequest) GetCurrentBalance() *float64 { + if a == nil { + return nil + } + return a.CurrentBalance +} + +func (a *AccountRequest) GetCurrency() *AccountRequestCurrency { + if a == nil { + return nil + } + return a.Currency +} + +func (a *AccountRequest) GetAccountNumber() *string { + if a == nil { + return nil + } + return a.AccountNumber +} + +func (a *AccountRequest) GetParentAccount() *string { + if a == nil { + return nil + } + return a.ParentAccount +} + +func (a *AccountRequest) GetCompany() *string { + if a == nil { + return nil + } + return a.Company +} + +func (a *AccountRequest) GetIntegrationParams() map[string]interface{} { + if a == nil { + return nil + } + return a.IntegrationParams +} + +func (a *AccountRequest) GetLinkedAccountParams() map[string]interface{} { + if a == nil { + return nil + } + return a.LinkedAccountParams +} + +func (a *AccountRequest) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AccountRequest) UnmarshalJSON(data []byte) error { + type unmarshaler AccountRequest + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *a = AccountRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AccountRequest) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} + +// Normalized account type- which is a narrower and more specific grouping within the account's classification. +// +// * `BANK` - BANK +// * `CREDIT_CARD` - CREDIT_CARD +// * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE +// * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE +// * `FIXED_ASSET` - FIXED_ASSET +// * `OTHER_ASSET` - OTHER_ASSET +// * `OTHER_CURRENT_ASSET` - OTHER_CURRENT_ASSET +// * `OTHER_EXPENSE` - OTHER_EXPENSE +// * `OTHER_INCOME` - OTHER_INCOME +// * `COST_OF_GOODS_SOLD` - COST_OF_GOODS_SOLD +// * `OTHER_CURRENT_LIABILITY` - OTHER_CURRENT_LIABILITY +// * `LONG_TERM_LIABILITY` - LONG_TERM_LIABILITY +// * `NON_POSTING` - NON_POSTING +type AccountRequestAccountType struct { + AccountAccountTypeEnum AccountAccountTypeEnum + String string + + typ string +} + +func (a *AccountRequestAccountType) GetAccountAccountTypeEnum() AccountAccountTypeEnum { + if a == nil { + return "" + } + return a.AccountAccountTypeEnum +} + +func (a *AccountRequestAccountType) GetString() string { + if a == nil { + return "" + } + return a.String +} + +func (a *AccountRequestAccountType) UnmarshalJSON(data []byte) error { + var valueAccountAccountTypeEnum AccountAccountTypeEnum + if err := json.Unmarshal(data, &valueAccountAccountTypeEnum); err == nil { + a.typ = "AccountAccountTypeEnum" + a.AccountAccountTypeEnum = valueAccountAccountTypeEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + a.typ = "String" + a.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, a) +} + +func (a AccountRequestAccountType) MarshalJSON() ([]byte, error) { + if a.typ == "AccountAccountTypeEnum" || a.AccountAccountTypeEnum != "" { + return json.Marshal(a.AccountAccountTypeEnum) + } + if a.typ == "String" || a.String != "" { + return json.Marshal(a.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type AccountRequestAccountTypeVisitor interface { + VisitAccountAccountTypeEnum(AccountAccountTypeEnum) error + VisitString(string) error +} + +func (a *AccountRequestAccountType) Accept(visitor AccountRequestAccountTypeVisitor) error { + if a.typ == "AccountAccountTypeEnum" || a.AccountAccountTypeEnum != "" { + return visitor.VisitAccountAccountTypeEnum(a.AccountAccountTypeEnum) + } + if a.typ == "String" || a.String != "" { + return visitor.VisitString(a.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} + +// The account's broadest grouping. +// +// * `ASSET` - ASSET +// * `EQUITY` - EQUITY +// * `EXPENSE` - EXPENSE +// * `LIABILITY` - LIABILITY +// * `REVENUE` - REVENUE +type AccountRequestClassification struct { + ClassificationEnum ClassificationEnum + String string + + typ string +} + +func (a *AccountRequestClassification) GetClassificationEnum() ClassificationEnum { + if a == nil { + return "" + } + return a.ClassificationEnum +} + +func (a *AccountRequestClassification) GetString() string { + if a == nil { + return "" + } + return a.String +} + +func (a *AccountRequestClassification) UnmarshalJSON(data []byte) error { + var valueClassificationEnum ClassificationEnum + if err := json.Unmarshal(data, &valueClassificationEnum); err == nil { + a.typ = "ClassificationEnum" + a.ClassificationEnum = valueClassificationEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + a.typ = "String" + a.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, a) +} + +func (a AccountRequestClassification) MarshalJSON() ([]byte, error) { + if a.typ == "ClassificationEnum" || a.ClassificationEnum != "" { + return json.Marshal(a.ClassificationEnum) + } + if a.typ == "String" || a.String != "" { + return json.Marshal(a.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type AccountRequestClassificationVisitor interface { + VisitClassificationEnum(ClassificationEnum) error + VisitString(string) error +} + +func (a *AccountRequestClassification) Accept(visitor AccountRequestClassificationVisitor) error { + if a.typ == "ClassificationEnum" || a.ClassificationEnum != "" { + return visitor.VisitClassificationEnum(a.ClassificationEnum) + } + if a.typ == "String" || a.String != "" { + return visitor.VisitString(a.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} + +// The account's currency. +// +// * `XUA` - ADB Unit of Account +// * `AFN` - Afghan Afghani +// * `AFA` - Afghan Afghani (1927–2002) +// * `ALL` - Albanian Lek +// * `ALK` - Albanian Lek (1946–1965) +// * `DZD` - Algerian Dinar +// * `ADP` - Andorran Peseta +// * `AOA` - Angolan Kwanza +// * `AOK` - Angolan Kwanza (1977–1991) +// * `AON` - Angolan New Kwanza (1990–2000) +// * `AOR` - Angolan Readjusted Kwanza (1995–1999) +// * `ARA` - Argentine Austral +// * `ARS` - Argentine Peso +// * `ARM` - Argentine Peso (1881–1970) +// * `ARP` - Argentine Peso (1983–1985) +// * `ARL` - Argentine Peso Ley (1970–1983) +// * `AMD` - Armenian Dram +// * `AWG` - Aruban Florin +// * `AUD` - Australian Dollar +// * `ATS` - Austrian Schilling +// * `AZN` - Azerbaijani Manat +// * `AZM` - Azerbaijani Manat (1993–2006) +// * `BSD` - Bahamian Dollar +// * `BHD` - Bahraini Dinar +// * `BDT` - Bangladeshi Taka +// * `BBD` - Barbadian Dollar +// * `BYN` - Belarusian Ruble +// * `BYB` - Belarusian Ruble (1994–1999) +// * `BYR` - Belarusian Ruble (2000–2016) +// * `BEF` - Belgian Franc +// * `BEC` - Belgian Franc (convertible) +// * `BEL` - Belgian Franc (financial) +// * `BZD` - Belize Dollar +// * `BMD` - Bermudan Dollar +// * `BTN` - Bhutanese Ngultrum +// * `BOB` - Bolivian Boliviano +// * `BOL` - Bolivian Boliviano (1863–1963) +// * `BOV` - Bolivian Mvdol +// * `BOP` - Bolivian Peso +// * `BAM` - Bosnia-Herzegovina Convertible Mark +// * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) +// * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) +// * `BWP` - Botswanan Pula +// * `BRC` - Brazilian Cruzado (1986–1989) +// * `BRZ` - Brazilian Cruzeiro (1942–1967) +// * `BRE` - Brazilian Cruzeiro (1990–1993) +// * `BRR` - Brazilian Cruzeiro (1993–1994) +// * `BRN` - Brazilian New Cruzado (1989–1990) +// * `BRB` - Brazilian New Cruzeiro (1967–1986) +// * `BRL` - Brazilian Real +// * `GBP` - British Pound +// * `BND` - Brunei Dollar +// * `BGL` - Bulgarian Hard Lev +// * `BGN` - Bulgarian Lev +// * `BGO` - Bulgarian Lev (1879–1952) +// * `BGM` - Bulgarian Socialist Lev +// * `BUK` - Burmese Kyat +// * `BIF` - Burundian Franc +// * `XPF` - CFP Franc +// * `KHR` - Cambodian Riel +// * `CAD` - Canadian Dollar +// * `CVE` - Cape Verdean Escudo +// * `KYD` - Cayman Islands Dollar +// * `XAF` - Central African CFA Franc +// * `CLE` - Chilean Escudo +// * `CLP` - Chilean Peso +// * `CLF` - Chilean Unit of Account (UF) +// * `CNX` - Chinese People’s Bank Dollar +// * `CNY` - Chinese Yuan +// * `CNH` - Chinese Yuan (offshore) +// * `COP` - Colombian Peso +// * `COU` - Colombian Real Value Unit +// * `KMF` - Comorian Franc +// * `CDF` - Congolese Franc +// * `CRC` - Costa Rican Colón +// * `HRD` - Croatian Dinar +// * `HRK` - Croatian Kuna +// * `CUC` - Cuban Convertible Peso +// * `CUP` - Cuban Peso +// * `CYP` - Cypriot Pound +// * `CZK` - Czech Koruna +// * `CSK` - Czechoslovak Hard Koruna +// * `DKK` - Danish Krone +// * `DJF` - Djiboutian Franc +// * `DOP` - Dominican Peso +// * `NLG` - Dutch Guilder +// * `XCD` - East Caribbean Dollar +// * `DDM` - East German Mark +// * `ECS` - Ecuadorian Sucre +// * `ECV` - Ecuadorian Unit of Constant Value +// * `EGP` - Egyptian Pound +// * `GQE` - Equatorial Guinean Ekwele +// * `ERN` - Eritrean Nakfa +// * `EEK` - Estonian Kroon +// * `ETB` - Ethiopian Birr +// * `EUR` - Euro +// * `XBA` - European Composite Unit +// * `XEU` - European Currency Unit +// * `XBB` - European Monetary Unit +// * `XBC` - European Unit of Account (XBC) +// * `XBD` - European Unit of Account (XBD) +// * `FKP` - Falkland Islands Pound +// * `FJD` - Fijian Dollar +// * `FIM` - Finnish Markka +// * `FRF` - French Franc +// * `XFO` - French Gold Franc +// * `XFU` - French UIC-Franc +// * `GMD` - Gambian Dalasi +// * `GEK` - Georgian Kupon Larit +// * `GEL` - Georgian Lari +// * `DEM` - German Mark +// * `GHS` - Ghanaian Cedi +// * `GHC` - Ghanaian Cedi (1979–2007) +// * `GIP` - Gibraltar Pound +// * `XAU` - Gold +// * `GRD` - Greek Drachma +// * `GTQ` - Guatemalan Quetzal +// * `GWP` - Guinea-Bissau Peso +// * `GNF` - Guinean Franc +// * `GNS` - Guinean Syli +// * `GYD` - Guyanaese Dollar +// * `HTG` - Haitian Gourde +// * `HNL` - Honduran Lempira +// * `HKD` - Hong Kong Dollar +// * `HUF` - Hungarian Forint +// * `IMP` - IMP +// * `ISK` - Icelandic Króna +// * `ISJ` - Icelandic Króna (1918–1981) +// * `INR` - Indian Rupee +// * `IDR` - Indonesian Rupiah +// * `IRR` - Iranian Rial +// * `IQD` - Iraqi Dinar +// * `IEP` - Irish Pound +// * `ILS` - Israeli New Shekel +// * `ILP` - Israeli Pound +// * `ILR` - Israeli Shekel (1980–1985) +// * `ITL` - Italian Lira +// * `JMD` - Jamaican Dollar +// * `JPY` - Japanese Yen +// * `JOD` - Jordanian Dinar +// * `KZT` - Kazakhstani Tenge +// * `KES` - Kenyan Shilling +// * `KWD` - Kuwaiti Dinar +// * `KGS` - Kyrgystani Som +// * `LAK` - Laotian Kip +// * `LVL` - Latvian Lats +// * `LVR` - Latvian Ruble +// * `LBP` - Lebanese Pound +// * `LSL` - Lesotho Loti +// * `LRD` - Liberian Dollar +// * `LYD` - Libyan Dinar +// * `LTL` - Lithuanian Litas +// * `LTT` - Lithuanian Talonas +// * `LUL` - Luxembourg Financial Franc +// * `LUC` - Luxembourgian Convertible Franc +// * `LUF` - Luxembourgian Franc +// * `MOP` - Macanese Pataca +// * `MKD` - Macedonian Denar +// * `MKN` - Macedonian Denar (1992–1993) +// * `MGA` - Malagasy Ariary +// * `MGF` - Malagasy Franc +// * `MWK` - Malawian Kwacha +// * `MYR` - Malaysian Ringgit +// * `MVR` - Maldivian Rufiyaa +// * `MVP` - Maldivian Rupee (1947–1981) +// * `MLF` - Malian Franc +// * `MTL` - Maltese Lira +// * `MTP` - Maltese Pound +// * `MRU` - Mauritanian Ouguiya +// * `MRO` - Mauritanian Ouguiya (1973–2017) +// * `MUR` - Mauritian Rupee +// * `MXV` - Mexican Investment Unit +// * `MXN` - Mexican Peso +// * `MXP` - Mexican Silver Peso (1861–1992) +// * `MDC` - Moldovan Cupon +// * `MDL` - Moldovan Leu +// * `MCF` - Monegasque Franc +// * `MNT` - Mongolian Tugrik +// * `MAD` - Moroccan Dirham +// * `MAF` - Moroccan Franc +// * `MZE` - Mozambican Escudo +// * `MZN` - Mozambican Metical +// * `MZM` - Mozambican Metical (1980–2006) +// * `MMK` - Myanmar Kyat +// * `NAD` - Namibian Dollar +// * `NPR` - Nepalese Rupee +// * `ANG` - Netherlands Antillean Guilder +// * `TWD` - New Taiwan Dollar +// * `NZD` - New Zealand Dollar +// * `NIO` - Nicaraguan Córdoba +// * `NIC` - Nicaraguan Córdoba (1988–1991) +// * `NGN` - Nigerian Naira +// * `KPW` - North Korean Won +// * `NOK` - Norwegian Krone +// * `OMR` - Omani Rial +// * `PKR` - Pakistani Rupee +// * `XPD` - Palladium +// * `PAB` - Panamanian Balboa +// * `PGK` - Papua New Guinean Kina +// * `PYG` - Paraguayan Guarani +// * `PEI` - Peruvian Inti +// * `PEN` - Peruvian Sol +// * `PES` - Peruvian Sol (1863–1965) +// * `PHP` - Philippine Peso +// * `XPT` - Platinum +// * `PLN` - Polish Zloty +// * `PLZ` - Polish Zloty (1950–1995) +// * `PTE` - Portuguese Escudo +// * `GWE` - Portuguese Guinea Escudo +// * `QAR` - Qatari Rial +// * `XRE` - RINET Funds +// * `RHD` - Rhodesian Dollar +// * `RON` - Romanian Leu +// * `ROL` - Romanian Leu (1952–2006) +// * `RUB` - Russian Ruble +// * `RUR` - Russian Ruble (1991–1998) +// * `RWF` - Rwandan Franc +// * `SVC` - Salvadoran Colón +// * `WST` - Samoan Tala +// * `SAR` - Saudi Riyal +// * `RSD` - Serbian Dinar +// * `CSD` - Serbian Dinar (2002–2006) +// * `SCR` - Seychellois Rupee +// * `SLL` - Sierra Leonean Leone +// * `XAG` - Silver +// * `SGD` - Singapore Dollar +// * `SKK` - Slovak Koruna +// * `SIT` - Slovenian Tolar +// * `SBD` - Solomon Islands Dollar +// * `SOS` - Somali Shilling +// * `ZAR` - South African Rand +// * `ZAL` - South African Rand (financial) +// * `KRH` - South Korean Hwan (1953–1962) +// * `KRW` - South Korean Won +// * `KRO` - South Korean Won (1945–1953) +// * `SSP` - South Sudanese Pound +// * `SUR` - Soviet Rouble +// * `ESP` - Spanish Peseta +// * `ESA` - Spanish Peseta (A account) +// * `ESB` - Spanish Peseta (convertible account) +// * `XDR` - Special Drawing Rights +// * `LKR` - Sri Lankan Rupee +// * `SHP` - St. Helena Pound +// * `XSU` - Sucre +// * `SDD` - Sudanese Dinar (1992–2007) +// * `SDG` - Sudanese Pound +// * `SDP` - Sudanese Pound (1957–1998) +// * `SRD` - Surinamese Dollar +// * `SRG` - Surinamese Guilder +// * `SZL` - Swazi Lilangeni +// * `SEK` - Swedish Krona +// * `CHF` - Swiss Franc +// * `SYP` - Syrian Pound +// * `STN` - São Tomé & Príncipe Dobra +// * `STD` - São Tomé & Príncipe Dobra (1977–2017) +// * `TVD` - TVD +// * `TJR` - Tajikistani Ruble +// * `TJS` - Tajikistani Somoni +// * `TZS` - Tanzanian Shilling +// * `XTS` - Testing Currency Code +// * `THB` - Thai Baht +// * `XXX` - The codes assigned for transactions where no currency is involved +// * `TPE` - Timorese Escudo +// * `TOP` - Tongan Paʻanga +// * `TTD` - Trinidad & Tobago Dollar +// * `TND` - Tunisian Dinar +// * `TRY` - Turkish Lira +// * `TRL` - Turkish Lira (1922–2005) +// * `TMT` - Turkmenistani Manat +// * `TMM` - Turkmenistani Manat (1993–2009) +// * `USD` - US Dollar +// * `USN` - US Dollar (Next day) +// * `USS` - US Dollar (Same day) +// * `UGX` - Ugandan Shilling +// * `UGS` - Ugandan Shilling (1966–1987) +// * `UAH` - Ukrainian Hryvnia +// * `UAK` - Ukrainian Karbovanets +// * `AED` - United Arab Emirates Dirham +// * `UYW` - Uruguayan Nominal Wage Index Unit +// * `UYU` - Uruguayan Peso +// * `UYP` - Uruguayan Peso (1975–1993) +// * `UYI` - Uruguayan Peso (Indexed Units) +// * `UZS` - Uzbekistani Som +// * `VUV` - Vanuatu Vatu +// * `VES` - Venezuelan Bolívar +// * `VEB` - Venezuelan Bolívar (1871–2008) +// * `VEF` - Venezuelan Bolívar (2008–2018) +// * `VND` - Vietnamese Dong +// * `VNN` - Vietnamese Dong (1978–1985) +// * `CHE` - WIR Euro +// * `CHW` - WIR Franc +// * `XOF` - West African CFA Franc +// * `YDD` - Yemeni Dinar +// * `YER` - Yemeni Rial +// * `YUN` - Yugoslavian Convertible Dinar (1990–1992) +// * `YUD` - Yugoslavian Hard Dinar (1966–1990) +// * `YUM` - Yugoslavian New Dinar (1994–2002) +// * `YUR` - Yugoslavian Reformed Dinar (1992–1993) +// * `ZWN` - ZWN +// * `ZRN` - Zairean New Zaire (1993–1998) +// * `ZRZ` - Zairean Zaire (1971–1993) +// * `ZMW` - Zambian Kwacha +// * `ZMK` - Zambian Kwacha (1968–2012) +// * `ZWD` - Zimbabwean Dollar (1980–2008) +// * `ZWR` - Zimbabwean Dollar (2008) +// * `ZWL` - Zimbabwean Dollar (2009) +type AccountRequestCurrency struct { + TransactionCurrencyEnum TransactionCurrencyEnum + String string + + typ string +} + +func (a *AccountRequestCurrency) GetTransactionCurrencyEnum() TransactionCurrencyEnum { + if a == nil { + return "" + } + return a.TransactionCurrencyEnum +} + +func (a *AccountRequestCurrency) GetString() string { + if a == nil { + return "" + } + return a.String +} + +func (a *AccountRequestCurrency) UnmarshalJSON(data []byte) error { + var valueTransactionCurrencyEnum TransactionCurrencyEnum + if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { + a.typ = "TransactionCurrencyEnum" + a.TransactionCurrencyEnum = valueTransactionCurrencyEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + a.typ = "String" + a.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, a) +} + +func (a AccountRequestCurrency) MarshalJSON() ([]byte, error) { + if a.typ == "TransactionCurrencyEnum" || a.TransactionCurrencyEnum != "" { + return json.Marshal(a.TransactionCurrencyEnum) + } + if a.typ == "String" || a.String != "" { + return json.Marshal(a.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type AccountRequestCurrencyVisitor interface { + VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error + VisitString(string) error +} + +func (a *AccountRequestCurrency) Accept(visitor AccountRequestCurrencyVisitor) error { + if a.typ == "TransactionCurrencyEnum" || a.TransactionCurrencyEnum != "" { + return visitor.VisitTransactionCurrencyEnum(a.TransactionCurrencyEnum) + } + if a.typ == "String" || a.String != "" { + return visitor.VisitString(a.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} + +// The account's status. +// +// * `ACTIVE` - ACTIVE +// * `PENDING` - PENDING +// * `INACTIVE` - INACTIVE +type AccountRequestStatus struct { + AccountStatusEnum AccountStatusEnum + String string + + typ string +} + +func (a *AccountRequestStatus) GetAccountStatusEnum() AccountStatusEnum { + if a == nil { + return "" + } + return a.AccountStatusEnum +} + +func (a *AccountRequestStatus) GetString() string { + if a == nil { + return "" + } + return a.String +} + +func (a *AccountRequestStatus) UnmarshalJSON(data []byte) error { + var valueAccountStatusEnum AccountStatusEnum + if err := json.Unmarshal(data, &valueAccountStatusEnum); err == nil { + a.typ = "AccountStatusEnum" + a.AccountStatusEnum = valueAccountStatusEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + a.typ = "String" + a.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, a) +} + +func (a AccountRequestStatus) MarshalJSON() ([]byte, error) { + if a.typ == "AccountStatusEnum" || a.AccountStatusEnum != "" { + return json.Marshal(a.AccountStatusEnum) + } + if a.typ == "String" || a.String != "" { + return json.Marshal(a.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type AccountRequestStatusVisitor interface { + VisitAccountStatusEnum(AccountStatusEnum) error + VisitString(string) error +} + +func (a *AccountRequestStatus) Accept(visitor AccountRequestStatusVisitor) error { + if a.typ == "AccountStatusEnum" || a.AccountStatusEnum != "" { + return visitor.VisitAccountStatusEnum(a.AccountStatusEnum) + } + if a.typ == "String" || a.String != "" { + return visitor.VisitString(a.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type AccountResponse struct { + Model *Account `json:"model" url:"model"` + Warnings []*WarningValidationProblem `json:"warnings" url:"warnings"` + Errors []*ErrorValidationProblem `json:"errors" url:"errors"` + Logs []*DebugModeLog `json:"logs,omitempty" url:"logs,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AccountResponse) GetModel() *Account { + if a == nil { + return nil + } + return a.Model +} + +func (a *AccountResponse) GetWarnings() []*WarningValidationProblem { + if a == nil { + return nil + } + return a.Warnings +} + +func (a *AccountResponse) GetErrors() []*ErrorValidationProblem { + if a == nil { + return nil + } + return a.Errors +} + +func (a *AccountResponse) GetLogs() []*DebugModeLog { + if a == nil { + return nil + } + return a.Logs +} + +func (a *AccountResponse) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AccountResponse) UnmarshalJSON(data []byte) error { + type unmarshaler AccountResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *a = AccountResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AccountResponse) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} + +type PaginatedAccountList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Account `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedAccountList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedAccountList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedAccountList) GetResults() []*Account { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedAccountList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedAccountList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedAccountList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedAccountList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedAccountList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} diff --git a/accounting/accounts/client.go b/accounting/accounts/client.go index 76289ba..da40e6a 100644 --- a/accounting/accounts/client.go +++ b/accounting/accounts/client.go @@ -1,136 +1,135 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package accounts import ( context "context" fmt "fmt" - accounting "github.com/merge-api/merge-go-client/accounting" - core "github.com/merge-api/merge-go-client/core" + accounting "github.com/merge-api/merge-go-client/v2/accounting" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `Account` objects. -func (c *Client) List(ctx context.Context, request *accounting.AccountsListRequest) (*accounting.PaginatedAccountList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/accounts" - - queryParams := make(url.Values) - if request.AccountType != nil { - queryParams.Add("account_type", fmt.Sprintf("%v", *request.AccountType)) - } - if request.CompanyId != nil { - queryParams.Add("company_id", fmt.Sprintf("%v", *request.CompanyId)) - } - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteFields != nil { - queryParams.Add("remote_fields", fmt.Sprintf("%v", *request.RemoteFields)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if request.ShowEnumOrigins != nil { - queryParams.Add("show_enum_origins", fmt.Sprintf("%v", *request.ShowEnumOrigins)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *accounting.PaginatedAccountList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *accounting.AccountsListRequest, + opts ...option.RequestOption, +) (*core.Page[*accounting.Account], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/accounts" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *accounting.PaginatedAccountList) *internal.PageResponse[*string, *accounting.Account] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *accounting.Account]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Creates an `Account` object with the given values. -func (c *Client) Create(ctx context.Context, request *accounting.AccountEndpointRequest) (*accounting.AccountResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/accounts" - - queryParams := make(url.Values) - if request.IsDebugMode != nil { - queryParams.Add("is_debug_mode", fmt.Sprintf("%v", *request.IsDebugMode)) - } - if request.RunAsync != nil { - queryParams.Add("run_async", fmt.Sprintf("%v", *request.RunAsync)) +func (c *Client) Create( + ctx context.Context, + request *accounting.AccountEndpointRequest, + opts ...option.RequestOption, +) (*accounting.AccountResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/accounts" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *accounting.AccountResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -139,38 +138,46 @@ func (c *Client) Create(ctx context.Context, request *accounting.AccountEndpoint } // Returns an `Account` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *accounting.AccountsRetrieveRequest) (*accounting.Account, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"accounting/v1/accounts/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.RemoteFields != nil { - queryParams.Add("remote_fields", fmt.Sprintf("%v", *request.RemoteFields)) - } - if request.ShowEnumOrigins != nil { - queryParams.Add("show_enum_origins", fmt.Sprintf("%v", *request.ShowEnumOrigins)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *accounting.AccountsRetrieveRequest, + opts ...option.RequestOption, +) (*accounting.Account, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/accounting/v1/accounts/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *accounting.Account if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -179,21 +186,34 @@ func (c *Client) Retrieve(ctx context.Context, id string, request *accounting.Ac } // Returns metadata for `Account` POSTs. -func (c *Client) MetaPostRetrieve(ctx context.Context) (*accounting.MetaResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/accounts/meta/post" +func (c *Client) MetaPostRetrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*accounting.MetaResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/accounts/meta/post" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *accounting.MetaResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/accounting/accounttoken/client.go b/accounting/accounttoken/client.go index 78fec1a..af67301 100644 --- a/accounting/accounttoken/client.go +++ b/accounting/accounttoken/client.go @@ -1,49 +1,69 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package accounttoken import ( context "context" - fmt "fmt" - accounting "github.com/merge-api/merge-go-client/accounting" - core "github.com/merge-api/merge-go-client/core" + accounting "github.com/merge-api/merge-go-client/v2/accounting" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns the account token for the end user with the provided public token. -func (c *Client) Retrieve(ctx context.Context, publicToken string) (*accounting.AccountToken, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"accounting/v1/account-token/%v", publicToken) +func (c *Client) Retrieve( + ctx context.Context, + publicToken string, + opts ...option.RequestOption, +) (*accounting.AccountToken, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/accounting/v1/account-token/%v", + publicToken, + ) + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *accounting.AccountToken if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/accounting/addresses.go b/accounting/addresses.go index 777bbc4..5749f9c 100644 --- a/accounting/addresses.go +++ b/accounting/addresses.go @@ -1,12 +1,14 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package accounting type AddressesRetrieveRequest struct { // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // Deprecated. Use show_enum_origins. - RemoteFields *string `json:"-"` + RemoteFields *string `json:"-" url:"remote_fields,omitempty"` // 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) - ShowEnumOrigins *string `json:"-"` + ShowEnumOrigins *string `json:"-" url:"show_enum_origins,omitempty"` } diff --git a/accounting/addresses/client.go b/accounting/addresses/client.go index 21454cc..4bec58d 100644 --- a/accounting/addresses/client.go +++ b/accounting/addresses/client.go @@ -1,64 +1,77 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package addresses import ( context "context" - fmt "fmt" - accounting "github.com/merge-api/merge-go-client/accounting" - core "github.com/merge-api/merge-go-client/core" + accounting "github.com/merge-api/merge-go-client/v2/accounting" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns an `Address` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *accounting.AddressesRetrieveRequest) (*accounting.Address, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"accounting/v1/addresses/%v", id) - - queryParams := make(url.Values) - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.RemoteFields != nil { - queryParams.Add("remote_fields", fmt.Sprintf("%v", request.RemoteFields)) - } - if request.ShowEnumOrigins != nil { - queryParams.Add("show_enum_origins", fmt.Sprintf("%v", request.ShowEnumOrigins)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *accounting.AddressesRetrieveRequest, + opts ...option.RequestOption, +) (*accounting.Address, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/accounting/v1/addresses/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *accounting.Address if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/accounting/async_passthrough.go b/accounting/async_passthrough.go index b45b070..e8d30b6 100644 --- a/accounting/async_passthrough.go +++ b/accounting/async_passthrough.go @@ -1,36 +1,44 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package accounting import ( json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" ) type AsyncPassthroughRetrieveResponse struct { - typeName string RemoteResponse *RemoteResponse String string + + typ string } -func NewAsyncPassthroughRetrieveResponseFromRemoteResponse(value *RemoteResponse) *AsyncPassthroughRetrieveResponse { - return &AsyncPassthroughRetrieveResponse{typeName: "remoteResponse", RemoteResponse: value} +func (a *AsyncPassthroughRetrieveResponse) GetRemoteResponse() *RemoteResponse { + if a == nil { + return nil + } + return a.RemoteResponse } -func NewAsyncPassthroughRetrieveResponseFromString(value string) *AsyncPassthroughRetrieveResponse { - return &AsyncPassthroughRetrieveResponse{typeName: "string", String: value} +func (a *AsyncPassthroughRetrieveResponse) GetString() string { + if a == nil { + return "" + } + return a.String } func (a *AsyncPassthroughRetrieveResponse) UnmarshalJSON(data []byte) error { valueRemoteResponse := new(RemoteResponse) if err := json.Unmarshal(data, &valueRemoteResponse); err == nil { - a.typeName = "remoteResponse" + a.typ = "RemoteResponse" a.RemoteResponse = valueRemoteResponse return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" + a.typ = "String" a.String = valueString return nil } @@ -38,14 +46,13 @@ func (a *AsyncPassthroughRetrieveResponse) UnmarshalJSON(data []byte) error { } func (a AsyncPassthroughRetrieveResponse) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "remoteResponse": + if a.typ == "RemoteResponse" || a.RemoteResponse != nil { return json.Marshal(a.RemoteResponse) - case "string": + } + if a.typ == "String" || a.String != "" { return json.Marshal(a.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) } type AsyncPassthroughRetrieveResponseVisitor interface { @@ -54,12 +61,57 @@ type AsyncPassthroughRetrieveResponseVisitor interface { } func (a *AsyncPassthroughRetrieveResponse) Accept(visitor AsyncPassthroughRetrieveResponseVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "remoteResponse": + if a.typ == "RemoteResponse" || a.RemoteResponse != nil { return visitor.VisitRemoteResponse(a.RemoteResponse) - case "string": + } + if a.typ == "String" || a.String != "" { return visitor.VisitString(a.String) } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type AsyncPassthroughReciept struct { + AsyncPassthroughReceiptId string `json:"async_passthrough_receipt_id" url:"async_passthrough_receipt_id"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AsyncPassthroughReciept) GetAsyncPassthroughReceiptId() string { + if a == nil { + return "" + } + return a.AsyncPassthroughReceiptId +} + +func (a *AsyncPassthroughReciept) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AsyncPassthroughReciept) UnmarshalJSON(data []byte) error { + type unmarshaler AsyncPassthroughReciept + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *a = AsyncPassthroughReciept(value) + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AsyncPassthroughReciept) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) } diff --git a/accounting/async_tasks.go b/accounting/async_tasks.go new file mode 100644 index 0000000..4b26910 --- /dev/null +++ b/accounting/async_tasks.go @@ -0,0 +1,211 @@ +// Code generated by Fern. DO NOT EDIT. + +package accounting + +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" +) + +type AsyncPostTask struct { + Status *AsyncPostTaskStatus `json:"status" url:"status"` + Result *AsyncPostTaskResult `json:"result" url:"result"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AsyncPostTask) GetStatus() *AsyncPostTaskStatus { + if a == nil { + return nil + } + return a.Status +} + +func (a *AsyncPostTask) GetResult() *AsyncPostTaskResult { + if a == nil { + return nil + } + return a.Result +} + +func (a *AsyncPostTask) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AsyncPostTask) UnmarshalJSON(data []byte) error { + type unmarshaler AsyncPostTask + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *a = AsyncPostTask(value) + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AsyncPostTask) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} + +type AsyncPostTaskResult struct { + StatusCode *int `json:"status_code,omitempty" url:"status_code,omitempty"` + Response map[string]interface{} `json:"response,omitempty" url:"response,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AsyncPostTaskResult) GetStatusCode() *int { + if a == nil { + return nil + } + return a.StatusCode +} + +func (a *AsyncPostTaskResult) GetResponse() map[string]interface{} { + if a == nil { + return nil + } + return a.Response +} + +func (a *AsyncPostTaskResult) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AsyncPostTaskResult) UnmarshalJSON(data []byte) error { + type unmarshaler AsyncPostTaskResult + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *a = AsyncPostTaskResult(value) + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AsyncPostTaskResult) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} + +type AsyncPostTaskStatus struct { + AsyncPostTaskStatusEnum AsyncPostTaskStatusEnum + String string + + typ string +} + +func (a *AsyncPostTaskStatus) GetAsyncPostTaskStatusEnum() AsyncPostTaskStatusEnum { + if a == nil { + return "" + } + return a.AsyncPostTaskStatusEnum +} + +func (a *AsyncPostTaskStatus) GetString() string { + if a == nil { + return "" + } + return a.String +} + +func (a *AsyncPostTaskStatus) UnmarshalJSON(data []byte) error { + var valueAsyncPostTaskStatusEnum AsyncPostTaskStatusEnum + if err := json.Unmarshal(data, &valueAsyncPostTaskStatusEnum); err == nil { + a.typ = "AsyncPostTaskStatusEnum" + a.AsyncPostTaskStatusEnum = valueAsyncPostTaskStatusEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + a.typ = "String" + a.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, a) +} + +func (a AsyncPostTaskStatus) MarshalJSON() ([]byte, error) { + if a.typ == "AsyncPostTaskStatusEnum" || a.AsyncPostTaskStatusEnum != "" { + return json.Marshal(a.AsyncPostTaskStatusEnum) + } + if a.typ == "String" || a.String != "" { + return json.Marshal(a.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type AsyncPostTaskStatusVisitor interface { + VisitAsyncPostTaskStatusEnum(AsyncPostTaskStatusEnum) error + VisitString(string) error +} + +func (a *AsyncPostTaskStatus) Accept(visitor AsyncPostTaskStatusVisitor) error { + if a.typ == "AsyncPostTaskStatusEnum" || a.AsyncPostTaskStatusEnum != "" { + return visitor.VisitAsyncPostTaskStatusEnum(a.AsyncPostTaskStatusEnum) + } + if a.typ == "String" || a.String != "" { + return visitor.VisitString(a.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} + +// * `QUEUED` - QUEUED +// * `IN_PROGRESS` - IN_PROGRESS +// * `COMPLETED` - COMPLETED +// * `FAILURE` - FAILURE +type AsyncPostTaskStatusEnum string + +const ( + AsyncPostTaskStatusEnumQueued AsyncPostTaskStatusEnum = "QUEUED" + AsyncPostTaskStatusEnumInProgress AsyncPostTaskStatusEnum = "IN_PROGRESS" + AsyncPostTaskStatusEnumCompleted AsyncPostTaskStatusEnum = "COMPLETED" + AsyncPostTaskStatusEnumFailure AsyncPostTaskStatusEnum = "FAILURE" +) + +func NewAsyncPostTaskStatusEnumFromString(s string) (AsyncPostTaskStatusEnum, error) { + switch s { + case "QUEUED": + return AsyncPostTaskStatusEnumQueued, nil + case "IN_PROGRESS": + return AsyncPostTaskStatusEnumInProgress, nil + case "COMPLETED": + return AsyncPostTaskStatusEnumCompleted, nil + case "FAILURE": + return AsyncPostTaskStatusEnumFailure, nil + } + var t AsyncPostTaskStatusEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (a AsyncPostTaskStatusEnum) Ptr() *AsyncPostTaskStatusEnum { + return &a +} diff --git a/accounting/asyncpassthrough/client.go b/accounting/asyncpassthrough/client.go index d0b7ead..87214de 100644 --- a/accounting/asyncpassthrough/client.go +++ b/accounting/asyncpassthrough/client.go @@ -1,50 +1,68 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package asyncpassthrough import ( context "context" - fmt "fmt" - accounting "github.com/merge-api/merge-go-client/accounting" - core "github.com/merge-api/merge-go-client/core" + accounting "github.com/merge-api/merge-go-client/v2/accounting" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Asynchronously pull data from an endpoint not currently supported by Merge. -func (c *Client) Create(ctx context.Context, request *accounting.DataPassthroughRequest) (*accounting.AsyncPassthroughReciept, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/async-passthrough" +func (c *Client) Create( + ctx context.Context, + request *accounting.DataPassthroughRequest, + opts ...option.RequestOption, +) (*accounting.AsyncPassthroughReciept, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/async-passthrough" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *accounting.AsyncPassthroughReciept if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -53,21 +71,38 @@ func (c *Client) Create(ctx context.Context, request *accounting.DataPassthrough } // Retrieves data from earlier async-passthrough POST request -func (c *Client) Retrieve(ctx context.Context, asyncPassthroughReceiptId string) (*accounting.AsyncPassthroughRetrieveResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"accounting/v1/async-passthrough/%v", asyncPassthroughReceiptId) +func (c *Client) Retrieve( + ctx context.Context, + asyncPassthroughReceiptId string, + opts ...option.RequestOption, +) (*accounting.AsyncPassthroughRetrieveResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/accounting/v1/async-passthrough/%v", + asyncPassthroughReceiptId, + ) + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *accounting.AsyncPassthroughRetrieveResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/accounting/asynctasks/client.go b/accounting/asynctasks/client.go index aee80c0..c04e04c 100644 --- a/accounting/asynctasks/client.go +++ b/accounting/asynctasks/client.go @@ -1,49 +1,69 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package asynctasks import ( context "context" - fmt "fmt" - accounting "github.com/merge-api/merge-go-client/accounting" - core "github.com/merge-api/merge-go-client/core" + accounting "github.com/merge-api/merge-go-client/v2/accounting" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns an `AsyncPostTask` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string) (*accounting.AsyncPostTask, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"accounting/v1/async-tasks/%v", id) +func (c *Client) Retrieve( + ctx context.Context, + id string, + opts ...option.RequestOption, +) (*accounting.AsyncPostTask, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/accounting/v1/async-tasks/%v", + id, + ) + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *accounting.AsyncPostTask if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/accounting/attachments.go b/accounting/attachments.go index cf9c0d8..245ee60 100644 --- a/accounting/attachments.go +++ b/accounting/attachments.go @@ -1,45 +1,422 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package accounting import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type AccountingAttachmentEndpointRequest struct { // Whether to include debug fields (such as log file links) in the response. - IsDebugMode *bool `json:"-"` + IsDebugMode *bool `json:"-" url:"is_debug_mode,omitempty"` // Whether or not third-party updates should be run asynchronously. - RunAsync *bool `json:"-"` - Model *AccountingAttachmentRequest `json:"model,omitempty"` + RunAsync *bool `json:"-" url:"run_async,omitempty"` + Model *AccountingAttachmentRequest `json:"model,omitempty" url:"-"` } type AttachmentsListRequest struct { // If provided, will only return accounting attachments for this company. - CompanyId *string `json:"-"` + CompanyId *string `json:"-" url:"company_id,omitempty"` // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` } type AttachmentsRetrieveRequest struct { // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` +} + +// # The Accounting Attachment Object +// ### Description +// The `AccountingAttachment` object is used to represent a company's attachments. +// +// ### Usage Example +// Fetch from the `LIST AccountingAttachments` endpoint and view a company's attachments. +type AccountingAttachment struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The attachment's name. + FileName *string `json:"file_name,omitempty" url:"file_name,omitempty"` + // The attachment's url. + FileUrl *string `json:"file_url,omitempty" url:"file_url,omitempty"` + // The company the accounting attachment belongs to. + Company *string `json:"company,omitempty" url:"company,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AccountingAttachment) GetId() *string { + if a == nil { + return nil + } + return a.Id +} + +func (a *AccountingAttachment) GetRemoteId() *string { + if a == nil { + return nil + } + return a.RemoteId +} + +func (a *AccountingAttachment) GetCreatedAt() *time.Time { + if a == nil { + return nil + } + return a.CreatedAt +} + +func (a *AccountingAttachment) GetModifiedAt() *time.Time { + if a == nil { + return nil + } + return a.ModifiedAt +} + +func (a *AccountingAttachment) GetFileName() *string { + if a == nil { + return nil + } + return a.FileName +} + +func (a *AccountingAttachment) GetFileUrl() *string { + if a == nil { + return nil + } + return a.FileUrl +} + +func (a *AccountingAttachment) GetCompany() *string { + if a == nil { + return nil + } + return a.Company +} + +func (a *AccountingAttachment) GetRemoteWasDeleted() *bool { + if a == nil { + return nil + } + return a.RemoteWasDeleted +} + +func (a *AccountingAttachment) GetFieldMappings() map[string]interface{} { + if a == nil { + return nil + } + return a.FieldMappings +} + +func (a *AccountingAttachment) GetRemoteData() []*RemoteData { + if a == nil { + return nil + } + return a.RemoteData +} + +func (a *AccountingAttachment) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AccountingAttachment) UnmarshalJSON(data []byte) error { + type embed AccountingAttachment + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*a), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *a = AccountingAttachment(unmarshaler.embed) + a.CreatedAt = unmarshaler.CreatedAt.TimePtr() + a.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AccountingAttachment) MarshalJSON() ([]byte, error) { + type embed AccountingAttachment + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*a), + CreatedAt: internal.NewOptionalDateTime(a.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(a.ModifiedAt), + } + return json.Marshal(marshaler) +} + +func (a *AccountingAttachment) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} + +// # The Accounting Attachment Object +// ### Description +// The `AccountingAttachment` object is used to represent a company's attachments. +// +// ### Usage Example +// Fetch from the `LIST AccountingAttachments` endpoint and view a company's attachments. +type AccountingAttachmentRequest struct { + // The attachment's name. + FileName *string `json:"file_name,omitempty" url:"file_name,omitempty"` + // The attachment's url. + FileUrl *string `json:"file_url,omitempty" url:"file_url,omitempty"` + // The company the accounting attachment belongs to. + Company *string `json:"company,omitempty" url:"company,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AccountingAttachmentRequest) GetFileName() *string { + if a == nil { + return nil + } + return a.FileName +} + +func (a *AccountingAttachmentRequest) GetFileUrl() *string { + if a == nil { + return nil + } + return a.FileUrl +} + +func (a *AccountingAttachmentRequest) GetCompany() *string { + if a == nil { + return nil + } + return a.Company +} + +func (a *AccountingAttachmentRequest) GetIntegrationParams() map[string]interface{} { + if a == nil { + return nil + } + return a.IntegrationParams +} + +func (a *AccountingAttachmentRequest) GetLinkedAccountParams() map[string]interface{} { + if a == nil { + return nil + } + return a.LinkedAccountParams +} + +func (a *AccountingAttachmentRequest) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AccountingAttachmentRequest) UnmarshalJSON(data []byte) error { + type unmarshaler AccountingAttachmentRequest + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *a = AccountingAttachmentRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AccountingAttachmentRequest) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} + +type AccountingAttachmentResponse struct { + Model *AccountingAttachment `json:"model" url:"model"` + Warnings []*WarningValidationProblem `json:"warnings" url:"warnings"` + Errors []*ErrorValidationProblem `json:"errors" url:"errors"` + Logs []*DebugModeLog `json:"logs,omitempty" url:"logs,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AccountingAttachmentResponse) GetModel() *AccountingAttachment { + if a == nil { + return nil + } + return a.Model +} + +func (a *AccountingAttachmentResponse) GetWarnings() []*WarningValidationProblem { + if a == nil { + return nil + } + return a.Warnings +} + +func (a *AccountingAttachmentResponse) GetErrors() []*ErrorValidationProblem { + if a == nil { + return nil + } + return a.Errors +} + +func (a *AccountingAttachmentResponse) GetLogs() []*DebugModeLog { + if a == nil { + return nil + } + return a.Logs +} + +func (a *AccountingAttachmentResponse) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AccountingAttachmentResponse) UnmarshalJSON(data []byte) error { + type unmarshaler AccountingAttachmentResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *a = AccountingAttachmentResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AccountingAttachmentResponse) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} + +type PaginatedAccountingAttachmentList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*AccountingAttachment `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedAccountingAttachmentList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedAccountingAttachmentList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedAccountingAttachmentList) GetResults() []*AccountingAttachment { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedAccountingAttachmentList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedAccountingAttachmentList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedAccountingAttachmentList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedAccountingAttachmentList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedAccountingAttachmentList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) } diff --git a/accounting/attachments/client.go b/accounting/attachments/client.go index 24bccb1..d0b3db3 100644 --- a/accounting/attachments/client.go +++ b/accounting/attachments/client.go @@ -1,124 +1,135 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package attachments import ( context "context" fmt "fmt" - accounting "github.com/merge-api/merge-go-client/accounting" - core "github.com/merge-api/merge-go-client/core" + accounting "github.com/merge-api/merge-go-client/v2/accounting" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `AccountingAttachment` objects. -func (c *Client) List(ctx context.Context, request *accounting.AttachmentsListRequest) (*accounting.PaginatedAccountingAttachmentList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/attachments" - - queryParams := make(url.Values) - if request.CompanyId != nil { - queryParams.Add("company_id", fmt.Sprintf("%v", *request.CompanyId)) - } - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *accounting.PaginatedAccountingAttachmentList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *accounting.AttachmentsListRequest, + opts ...option.RequestOption, +) (*core.Page[*accounting.AccountingAttachment], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/attachments" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *accounting.PaginatedAccountingAttachmentList) *internal.PageResponse[*string, *accounting.AccountingAttachment] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *accounting.AccountingAttachment]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Creates an `AccountingAttachment` object with the given values. -func (c *Client) Create(ctx context.Context, request *accounting.AccountingAttachmentEndpointRequest) (*accounting.AccountingAttachmentResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/attachments" - - queryParams := make(url.Values) - if request.IsDebugMode != nil { - queryParams.Add("is_debug_mode", fmt.Sprintf("%v", *request.IsDebugMode)) - } - if request.RunAsync != nil { - queryParams.Add("run_async", fmt.Sprintf("%v", *request.RunAsync)) +func (c *Client) Create( + ctx context.Context, + request *accounting.AccountingAttachmentEndpointRequest, + opts ...option.RequestOption, +) (*accounting.AccountingAttachmentResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/attachments" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *accounting.AccountingAttachmentResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -127,29 +138,46 @@ func (c *Client) Create(ctx context.Context, request *accounting.AccountingAttac } // Returns an `AccountingAttachment` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *accounting.AttachmentsRetrieveRequest) (*accounting.AccountingAttachment, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"accounting/v1/attachments/%v", id) - - queryParams := make(url.Values) - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *accounting.AttachmentsRetrieveRequest, + opts ...option.RequestOption, +) (*accounting.AccountingAttachment, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/accounting/v1/attachments/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *accounting.AccountingAttachment if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -158,21 +186,34 @@ func (c *Client) Retrieve(ctx context.Context, id string, request *accounting.At } // Returns metadata for `AccountingAttachment` POSTs. -func (c *Client) MetaPostRetrieve(ctx context.Context) (*accounting.MetaResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/attachments/meta/post" +func (c *Client) MetaPostRetrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*accounting.MetaResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/attachments/meta/post" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *accounting.MetaResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/accounting/audit_trail.go b/accounting/audit_trail.go index 5f4eec0..185ecaf 100644 --- a/accounting/audit_trail.go +++ b/accounting/audit_trail.go @@ -1,18 +1,667 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package accounting +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" + time "time" +) + type AuditTrailListRequest struct { // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // If included, will only include audit trail events that occurred before this time - EndDate *string `json:"-"` - // 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`, `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED` - EventType *string `json:"-"` + EndDate *string `json:"-" url:"end_date,omitempty"` + // 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`, `REGENERATED_WEBHOOK_SIGNATURE`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `DELETED_ALL_COMMON_MODELS_FOR_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`, `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED` + EventType *string `json:"-" url:"event_type,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // If included, will only include audit trail events that occurred after this time - StartDate *string `json:"-"` + StartDate *string `json:"-" url:"start_date,omitempty"` // If provided, this will return events associated with the specified user email. Please note that the email address reflects the user's email at the time of the event, and may not be their current email. - UserEmail *string `json:"-"` + UserEmail *string `json:"-" url:"user_email,omitempty"` +} + +type AuditLogEvent struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The User's full name at the time of this Event occurring. + UserName *string `json:"user_name,omitempty" url:"user_name,omitempty"` + // The User's email at the time of this Event occurring. + UserEmail *string `json:"user_email,omitempty" url:"user_email,omitempty"` + // Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. + // + // * `ADMIN` - ADMIN + // * `DEVELOPER` - DEVELOPER + // * `MEMBER` - MEMBER + // * `API` - API + // * `SYSTEM` - SYSTEM + // * `MERGE_TEAM` - MERGE_TEAM + Role *AuditLogEventRole `json:"role" url:"role"` + IpAddress string `json:"ip_address" url:"ip_address"` + // Designates the type of event that occurred. + // + // * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + // * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + // * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + // * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + // * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + // * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + // * `INVITED_USER` - INVITED_USER + // * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + // * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + // * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + // * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + // * `CREATED_DESTINATION` - CREATED_DESTINATION + // * `DELETED_DESTINATION` - DELETED_DESTINATION + // * `CHANGED_DESTINATION` - CHANGED_DESTINATION + // * `CHANGED_SCOPES` - CHANGED_SCOPES + // * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + // * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + // * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + // * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + // * `ENABLED_CATEGORY` - ENABLED_CATEGORY + // * `DISABLED_CATEGORY` - DISABLED_CATEGORY + // * `CHANGED_PASSWORD` - CHANGED_PASSWORD + // * `RESET_PASSWORD` - RESET_PASSWORD + // * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + // * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + // * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + // * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + // * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING + // * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING + // * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + // * `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 + // * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + // * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + // * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + // * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + // * `MUTED_ISSUE` - MUTED_ISSUE + // * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + // * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + // * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + // * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + // * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + EventType *AuditLogEventEventType `json:"event_type" url:"event_type"` + EventDescription string `json:"event_description" url:"event_description"` + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AuditLogEvent) GetId() *string { + if a == nil { + return nil + } + return a.Id +} + +func (a *AuditLogEvent) GetUserName() *string { + if a == nil { + return nil + } + return a.UserName +} + +func (a *AuditLogEvent) GetUserEmail() *string { + if a == nil { + return nil + } + return a.UserEmail +} + +func (a *AuditLogEvent) GetRole() *AuditLogEventRole { + if a == nil { + return nil + } + return a.Role +} + +func (a *AuditLogEvent) GetIpAddress() string { + if a == nil { + return "" + } + return a.IpAddress +} + +func (a *AuditLogEvent) GetEventType() *AuditLogEventEventType { + if a == nil { + return nil + } + return a.EventType +} + +func (a *AuditLogEvent) GetEventDescription() string { + if a == nil { + return "" + } + return a.EventDescription +} + +func (a *AuditLogEvent) GetCreatedAt() *time.Time { + if a == nil { + return nil + } + return a.CreatedAt +} + +func (a *AuditLogEvent) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AuditLogEvent) UnmarshalJSON(data []byte) error { + type embed AuditLogEvent + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + }{ + embed: embed(*a), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *a = AuditLogEvent(unmarshaler.embed) + a.CreatedAt = unmarshaler.CreatedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AuditLogEvent) MarshalJSON() ([]byte, error) { + type embed AuditLogEvent + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + }{ + embed: embed(*a), + CreatedAt: internal.NewOptionalDateTime(a.CreatedAt), + } + return json.Marshal(marshaler) +} + +func (a *AuditLogEvent) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} + +// Designates the type of event that occurred. +// +// * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY +// * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY +// * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY +// * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY +// * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY +// * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE +// * `INVITED_USER` - INVITED_USER +// * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED +// * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED +// * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT +// * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT +// * `CREATED_DESTINATION` - CREATED_DESTINATION +// * `DELETED_DESTINATION` - DELETED_DESTINATION +// * `CHANGED_DESTINATION` - CHANGED_DESTINATION +// * `CHANGED_SCOPES` - CHANGED_SCOPES +// * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION +// * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS +// * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION +// * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION +// * `ENABLED_CATEGORY` - ENABLED_CATEGORY +// * `DISABLED_CATEGORY` - DISABLED_CATEGORY +// * `CHANGED_PASSWORD` - CHANGED_PASSWORD +// * `RESET_PASSWORD` - RESET_PASSWORD +// * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION +// * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT +// * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION +// * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT +// * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING +// * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING +// * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING +// * `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 +// * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE +// * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE +// * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE +// * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC +// * `MUTED_ISSUE` - MUTED_ISSUE +// * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK +// * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK +// * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK +// * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED +// * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED +type AuditLogEventEventType struct { + EventTypeEnum EventTypeEnum + String string + + typ string +} + +func (a *AuditLogEventEventType) GetEventTypeEnum() EventTypeEnum { + if a == nil { + return "" + } + return a.EventTypeEnum +} + +func (a *AuditLogEventEventType) GetString() string { + if a == nil { + return "" + } + return a.String +} + +func (a *AuditLogEventEventType) UnmarshalJSON(data []byte) error { + var valueEventTypeEnum EventTypeEnum + if err := json.Unmarshal(data, &valueEventTypeEnum); err == nil { + a.typ = "EventTypeEnum" + a.EventTypeEnum = valueEventTypeEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + a.typ = "String" + a.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, a) +} + +func (a AuditLogEventEventType) MarshalJSON() ([]byte, error) { + if a.typ == "EventTypeEnum" || a.EventTypeEnum != "" { + return json.Marshal(a.EventTypeEnum) + } + if a.typ == "String" || a.String != "" { + return json.Marshal(a.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type AuditLogEventEventTypeVisitor interface { + VisitEventTypeEnum(EventTypeEnum) error + VisitString(string) error +} + +func (a *AuditLogEventEventType) Accept(visitor AuditLogEventEventTypeVisitor) error { + if a.typ == "EventTypeEnum" || a.EventTypeEnum != "" { + return visitor.VisitEventTypeEnum(a.EventTypeEnum) + } + if a.typ == "String" || a.String != "" { + return visitor.VisitString(a.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} + +// Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. +// +// * `ADMIN` - ADMIN +// * `DEVELOPER` - DEVELOPER +// * `MEMBER` - MEMBER +// * `API` - API +// * `SYSTEM` - SYSTEM +// * `MERGE_TEAM` - MERGE_TEAM +type AuditLogEventRole struct { + RoleEnum RoleEnum + String string + + typ string +} + +func (a *AuditLogEventRole) GetRoleEnum() RoleEnum { + if a == nil { + return "" + } + return a.RoleEnum +} + +func (a *AuditLogEventRole) GetString() string { + if a == nil { + return "" + } + return a.String +} + +func (a *AuditLogEventRole) UnmarshalJSON(data []byte) error { + var valueRoleEnum RoleEnum + if err := json.Unmarshal(data, &valueRoleEnum); err == nil { + a.typ = "RoleEnum" + a.RoleEnum = valueRoleEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + a.typ = "String" + a.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, a) +} + +func (a AuditLogEventRole) MarshalJSON() ([]byte, error) { + if a.typ == "RoleEnum" || a.RoleEnum != "" { + return json.Marshal(a.RoleEnum) + } + if a.typ == "String" || a.String != "" { + return json.Marshal(a.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type AuditLogEventRoleVisitor interface { + VisitRoleEnum(RoleEnum) error + VisitString(string) error +} + +func (a *AuditLogEventRole) Accept(visitor AuditLogEventRoleVisitor) error { + if a.typ == "RoleEnum" || a.RoleEnum != "" { + return visitor.VisitRoleEnum(a.RoleEnum) + } + if a.typ == "String" || a.String != "" { + return visitor.VisitString(a.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} + +// * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY +// * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY +// * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY +// * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY +// * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY +// * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE +// * `INVITED_USER` - INVITED_USER +// * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED +// * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED +// * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT +// * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT +// * `CREATED_DESTINATION` - CREATED_DESTINATION +// * `DELETED_DESTINATION` - DELETED_DESTINATION +// * `CHANGED_DESTINATION` - CHANGED_DESTINATION +// * `CHANGED_SCOPES` - CHANGED_SCOPES +// * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION +// * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS +// * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION +// * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION +// * `ENABLED_CATEGORY` - ENABLED_CATEGORY +// * `DISABLED_CATEGORY` - DISABLED_CATEGORY +// * `CHANGED_PASSWORD` - CHANGED_PASSWORD +// * `RESET_PASSWORD` - RESET_PASSWORD +// * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION +// * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT +// * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION +// * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT +// * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING +// * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING +// * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING +// * `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 +// * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE +// * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE +// * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE +// * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC +// * `MUTED_ISSUE` - MUTED_ISSUE +// * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK +// * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK +// * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK +// * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED +// * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED +type EventTypeEnum string + +const ( + EventTypeEnumCreatedRemoteProductionApiKey EventTypeEnum = "CREATED_REMOTE_PRODUCTION_API_KEY" + EventTypeEnumDeletedRemoteProductionApiKey EventTypeEnum = "DELETED_REMOTE_PRODUCTION_API_KEY" + EventTypeEnumCreatedTestApiKey EventTypeEnum = "CREATED_TEST_API_KEY" + EventTypeEnumDeletedTestApiKey EventTypeEnum = "DELETED_TEST_API_KEY" + EventTypeEnumRegeneratedProductionApiKey EventTypeEnum = "REGENERATED_PRODUCTION_API_KEY" + EventTypeEnumRegeneratedWebhookSignature EventTypeEnum = "REGENERATED_WEBHOOK_SIGNATURE" + EventTypeEnumInvitedUser EventTypeEnum = "INVITED_USER" + EventTypeEnumTwoFactorAuthEnabled EventTypeEnum = "TWO_FACTOR_AUTH_ENABLED" + EventTypeEnumTwoFactorAuthDisabled EventTypeEnum = "TWO_FACTOR_AUTH_DISABLED" + EventTypeEnumDeletedLinkedAccount EventTypeEnum = "DELETED_LINKED_ACCOUNT" + EventTypeEnumDeletedAllCommonModelsForLinkedAccount EventTypeEnum = "DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT" + EventTypeEnumCreatedDestination EventTypeEnum = "CREATED_DESTINATION" + EventTypeEnumDeletedDestination EventTypeEnum = "DELETED_DESTINATION" + EventTypeEnumChangedDestination EventTypeEnum = "CHANGED_DESTINATION" + EventTypeEnumChangedScopes EventTypeEnum = "CHANGED_SCOPES" + EventTypeEnumChangedPersonalInformation EventTypeEnum = "CHANGED_PERSONAL_INFORMATION" + EventTypeEnumChangedOrganizationSettings EventTypeEnum = "CHANGED_ORGANIZATION_SETTINGS" + EventTypeEnumEnabledIntegration EventTypeEnum = "ENABLED_INTEGRATION" + EventTypeEnumDisabledIntegration EventTypeEnum = "DISABLED_INTEGRATION" + EventTypeEnumEnabledCategory EventTypeEnum = "ENABLED_CATEGORY" + EventTypeEnumDisabledCategory EventTypeEnum = "DISABLED_CATEGORY" + EventTypeEnumChangedPassword EventTypeEnum = "CHANGED_PASSWORD" + EventTypeEnumResetPassword EventTypeEnum = "RESET_PASSWORD" + EventTypeEnumEnabledRedactUnmappedDataForOrganization EventTypeEnum = "ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION" + EventTypeEnumEnabledRedactUnmappedDataForLinkedAccount EventTypeEnum = "ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT" + EventTypeEnumDisabledRedactUnmappedDataForOrganization EventTypeEnum = "DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION" + EventTypeEnumDisabledRedactUnmappedDataForLinkedAccount EventTypeEnum = "DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT" + EventTypeEnumCreatedIntegrationWideFieldMapping EventTypeEnum = "CREATED_INTEGRATION_WIDE_FIELD_MAPPING" + EventTypeEnumCreatedLinkedAccountFieldMapping EventTypeEnum = "CREATED_LINKED_ACCOUNT_FIELD_MAPPING" + EventTypeEnumChangedIntegrationWideFieldMapping EventTypeEnum = "CHANGED_INTEGRATION_WIDE_FIELD_MAPPING" + EventTypeEnumChangedLinkedAccountFieldMapping EventTypeEnum = "CHANGED_LINKED_ACCOUNT_FIELD_MAPPING" + EventTypeEnumDeletedIntegrationWideFieldMapping EventTypeEnum = "DELETED_INTEGRATION_WIDE_FIELD_MAPPING" + EventTypeEnumDeletedLinkedAccountFieldMapping EventTypeEnum = "DELETED_LINKED_ACCOUNT_FIELD_MAPPING" + EventTypeEnumCreatedLinkedAccountCommonModelOverride EventTypeEnum = "CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE" + EventTypeEnumChangedLinkedAccountCommonModelOverride EventTypeEnum = "CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE" + EventTypeEnumDeletedLinkedAccountCommonModelOverride EventTypeEnum = "DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE" + EventTypeEnumForcedLinkedAccountResync EventTypeEnum = "FORCED_LINKED_ACCOUNT_RESYNC" + EventTypeEnumMutedIssue EventTypeEnum = "MUTED_ISSUE" + EventTypeEnumGeneratedMagicLink EventTypeEnum = "GENERATED_MAGIC_LINK" + EventTypeEnumEnabledMergeWebhook EventTypeEnum = "ENABLED_MERGE_WEBHOOK" + EventTypeEnumDisabledMergeWebhook EventTypeEnum = "DISABLED_MERGE_WEBHOOK" + EventTypeEnumMergeWebhookTargetChanged EventTypeEnum = "MERGE_WEBHOOK_TARGET_CHANGED" + EventTypeEnumEndUserCredentialsAccessed EventTypeEnum = "END_USER_CREDENTIALS_ACCESSED" +) + +func NewEventTypeEnumFromString(s string) (EventTypeEnum, error) { + switch s { + case "CREATED_REMOTE_PRODUCTION_API_KEY": + return EventTypeEnumCreatedRemoteProductionApiKey, nil + case "DELETED_REMOTE_PRODUCTION_API_KEY": + return EventTypeEnumDeletedRemoteProductionApiKey, nil + case "CREATED_TEST_API_KEY": + return EventTypeEnumCreatedTestApiKey, nil + case "DELETED_TEST_API_KEY": + return EventTypeEnumDeletedTestApiKey, nil + case "REGENERATED_PRODUCTION_API_KEY": + return EventTypeEnumRegeneratedProductionApiKey, nil + case "REGENERATED_WEBHOOK_SIGNATURE": + return EventTypeEnumRegeneratedWebhookSignature, nil + case "INVITED_USER": + return EventTypeEnumInvitedUser, nil + case "TWO_FACTOR_AUTH_ENABLED": + return EventTypeEnumTwoFactorAuthEnabled, nil + case "TWO_FACTOR_AUTH_DISABLED": + return EventTypeEnumTwoFactorAuthDisabled, nil + case "DELETED_LINKED_ACCOUNT": + return EventTypeEnumDeletedLinkedAccount, nil + case "DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT": + return EventTypeEnumDeletedAllCommonModelsForLinkedAccount, nil + case "CREATED_DESTINATION": + return EventTypeEnumCreatedDestination, nil + case "DELETED_DESTINATION": + return EventTypeEnumDeletedDestination, nil + case "CHANGED_DESTINATION": + return EventTypeEnumChangedDestination, nil + case "CHANGED_SCOPES": + return EventTypeEnumChangedScopes, nil + case "CHANGED_PERSONAL_INFORMATION": + return EventTypeEnumChangedPersonalInformation, nil + case "CHANGED_ORGANIZATION_SETTINGS": + return EventTypeEnumChangedOrganizationSettings, nil + case "ENABLED_INTEGRATION": + return EventTypeEnumEnabledIntegration, nil + case "DISABLED_INTEGRATION": + return EventTypeEnumDisabledIntegration, nil + case "ENABLED_CATEGORY": + return EventTypeEnumEnabledCategory, nil + case "DISABLED_CATEGORY": + return EventTypeEnumDisabledCategory, nil + case "CHANGED_PASSWORD": + return EventTypeEnumChangedPassword, nil + case "RESET_PASSWORD": + return EventTypeEnumResetPassword, nil + case "ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION": + return EventTypeEnumEnabledRedactUnmappedDataForOrganization, nil + case "ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT": + return EventTypeEnumEnabledRedactUnmappedDataForLinkedAccount, nil + case "DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION": + return EventTypeEnumDisabledRedactUnmappedDataForOrganization, nil + case "DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT": + return EventTypeEnumDisabledRedactUnmappedDataForLinkedAccount, nil + case "CREATED_INTEGRATION_WIDE_FIELD_MAPPING": + return EventTypeEnumCreatedIntegrationWideFieldMapping, nil + case "CREATED_LINKED_ACCOUNT_FIELD_MAPPING": + return EventTypeEnumCreatedLinkedAccountFieldMapping, nil + case "CHANGED_INTEGRATION_WIDE_FIELD_MAPPING": + return EventTypeEnumChangedIntegrationWideFieldMapping, nil + case "CHANGED_LINKED_ACCOUNT_FIELD_MAPPING": + return EventTypeEnumChangedLinkedAccountFieldMapping, nil + case "DELETED_INTEGRATION_WIDE_FIELD_MAPPING": + return EventTypeEnumDeletedIntegrationWideFieldMapping, nil + case "DELETED_LINKED_ACCOUNT_FIELD_MAPPING": + return EventTypeEnumDeletedLinkedAccountFieldMapping, nil + case "CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE": + return EventTypeEnumCreatedLinkedAccountCommonModelOverride, nil + case "CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE": + return EventTypeEnumChangedLinkedAccountCommonModelOverride, nil + case "DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE": + return EventTypeEnumDeletedLinkedAccountCommonModelOverride, nil + case "FORCED_LINKED_ACCOUNT_RESYNC": + return EventTypeEnumForcedLinkedAccountResync, nil + case "MUTED_ISSUE": + return EventTypeEnumMutedIssue, nil + case "GENERATED_MAGIC_LINK": + return EventTypeEnumGeneratedMagicLink, nil + case "ENABLED_MERGE_WEBHOOK": + return EventTypeEnumEnabledMergeWebhook, nil + case "DISABLED_MERGE_WEBHOOK": + return EventTypeEnumDisabledMergeWebhook, nil + case "MERGE_WEBHOOK_TARGET_CHANGED": + return EventTypeEnumMergeWebhookTargetChanged, nil + case "END_USER_CREDENTIALS_ACCESSED": + return EventTypeEnumEndUserCredentialsAccessed, nil + } + var t EventTypeEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (e EventTypeEnum) Ptr() *EventTypeEnum { + return &e +} + +type PaginatedAuditLogEventList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*AuditLogEvent `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedAuditLogEventList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedAuditLogEventList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedAuditLogEventList) GetResults() []*AuditLogEvent { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedAuditLogEventList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedAuditLogEventList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedAuditLogEventList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedAuditLogEventList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedAuditLogEventList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +// * `ADMIN` - ADMIN +// * `DEVELOPER` - DEVELOPER +// * `MEMBER` - MEMBER +// * `API` - API +// * `SYSTEM` - SYSTEM +// * `MERGE_TEAM` - MERGE_TEAM +type RoleEnum string + +const ( + RoleEnumAdmin RoleEnum = "ADMIN" + RoleEnumDeveloper RoleEnum = "DEVELOPER" + RoleEnumMember RoleEnum = "MEMBER" + RoleEnumApi RoleEnum = "API" + RoleEnumSystem RoleEnum = "SYSTEM" + RoleEnumMergeTeam RoleEnum = "MERGE_TEAM" +) + +func NewRoleEnumFromString(s string) (RoleEnum, error) { + switch s { + case "ADMIN": + return RoleEnumAdmin, nil + case "DEVELOPER": + return RoleEnumDeveloper, nil + case "MEMBER": + return RoleEnumMember, nil + case "API": + return RoleEnumApi, nil + case "SYSTEM": + return RoleEnumSystem, nil + case "MERGE_TEAM": + return RoleEnumMergeTeam, nil + } + var t RoleEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (r RoleEnum) Ptr() *RoleEnum { + return &r } diff --git a/accounting/audittrail/client.go b/accounting/audittrail/client.go index 01b147c..7c8e4b9 100644 --- a/accounting/audittrail/client.go +++ b/accounting/audittrail/client.go @@ -1,76 +1,92 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package audittrail import ( context "context" fmt "fmt" - accounting "github.com/merge-api/merge-go-client/accounting" - core "github.com/merge-api/merge-go-client/core" + accounting "github.com/merge-api/merge-go-client/v2/accounting" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Gets a list of audit trail events. -func (c *Client) List(ctx context.Context, request *accounting.AuditTrailListRequest) (*accounting.PaginatedAuditLogEventList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL +func (c *Client) List( + ctx context.Context, + request *accounting.AuditTrailListRequest, + opts ...option.RequestOption, +) (*core.Page[*accounting.AuditLogEvent], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/audit-trail" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } - endpointURL := baseURL + "/" + "accounting/v1/audit-trail" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) - queryParams := make(url.Values) - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.EndDate != nil { - queryParams.Add("end_date", fmt.Sprintf("%v", *request.EndDate)) - } - if request.EventType != nil { - queryParams.Add("event_type", fmt.Sprintf("%v", *request.EventType)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } } - if request.StartDate != nil { - queryParams.Add("start_date", fmt.Sprintf("%v", *request.StartDate)) - } - if request.UserEmail != nil { - queryParams.Add("user_email", fmt.Sprintf("%v", *request.UserEmail)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *accounting.PaginatedAuditLogEventList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { - return nil, err + readPageResponse := func(response *accounting.PaginatedAuditLogEventList) *internal.PageResponse[*string, *accounting.AuditLogEvent] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *accounting.AuditLogEvent]{ + Next: next, + Results: results, + Done: next == zeroValue, + } } - return response, nil + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } diff --git a/accounting/available_actions.go b/accounting/available_actions.go new file mode 100644 index 0000000..53bc9c2 --- /dev/null +++ b/accounting/available_actions.go @@ -0,0 +1,77 @@ +// Code generated by Fern. DO NOT EDIT. + +package accounting + +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" +) + +// # The AvailableActions Object +// ### Description +// The `Activity` object is used to see all available model/operation combinations for an integration. +// +// ### Usage Example +// Fetch all the actions available for the `Zenefits` integration. +type AvailableActions struct { + Integration *AccountIntegration `json:"integration" url:"integration"` + PassthroughAvailable bool `json:"passthrough_available" url:"passthrough_available"` + AvailableModelOperations []*ModelOperation `json:"available_model_operations,omitempty" url:"available_model_operations,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AvailableActions) GetIntegration() *AccountIntegration { + if a == nil { + return nil + } + return a.Integration +} + +func (a *AvailableActions) GetPassthroughAvailable() bool { + if a == nil { + return false + } + return a.PassthroughAvailable +} + +func (a *AvailableActions) GetAvailableModelOperations() []*ModelOperation { + if a == nil { + return nil + } + return a.AvailableModelOperations +} + +func (a *AvailableActions) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AvailableActions) UnmarshalJSON(data []byte) error { + type unmarshaler AvailableActions + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *a = AvailableActions(value) + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AvailableActions) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} diff --git a/accounting/availableactions/client.go b/accounting/availableactions/client.go index 19ab68f..422eabf 100644 --- a/accounting/availableactions/client.go +++ b/accounting/availableactions/client.go @@ -1,48 +1,65 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package availableactions import ( context "context" - accounting "github.com/merge-api/merge-go-client/accounting" - core "github.com/merge-api/merge-go-client/core" + accounting "github.com/merge-api/merge-go-client/v2/accounting" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of models and actions available for an account. -func (c *Client) Retrieve(ctx context.Context) (*accounting.AvailableActions, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/available-actions" +func (c *Client) Retrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*accounting.AvailableActions, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/available-actions" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *accounting.AvailableActions if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/accounting/balance_sheets.go b/accounting/balance_sheets.go index e9b03b6..01434dc 100644 --- a/accounting/balance_sheets.go +++ b/accounting/balance_sheets.go @@ -1,41 +1,1060 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package accounting import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type BalanceSheetsListRequest struct { // If provided, will only return balance sheets for this company. - CompanyId *string `json:"-"` + CompanyId *string `json:"-" url:"company_id,omitempty"` // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *string `json:"-"` + Expand []*string `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` } type BalanceSheetsRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *string `json:"-"` + Expand []*string `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` +} + +// # The BalanceSheet Object +// ### Description +// The `BalanceSheet` object shows a company’s assets, liabilities, and equity. Assets should be equal to liability and equity combined. This shows the company’s financial health at a specific point in time. +// +// ### Usage Example +// Fetch from the `LIST BalanceSheets` endpoint and view a company's balance sheets. +type BalanceSheet struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The balance sheet's name. + Name *string `json:"name,omitempty" url:"name,omitempty"` + // The balance sheet's currency. + // + // * `XUA` - ADB Unit of Account + // * `AFN` - Afghan Afghani + // * `AFA` - Afghan Afghani (1927–2002) + // * `ALL` - Albanian Lek + // * `ALK` - Albanian Lek (1946–1965) + // * `DZD` - Algerian Dinar + // * `ADP` - Andorran Peseta + // * `AOA` - Angolan Kwanza + // * `AOK` - Angolan Kwanza (1977–1991) + // * `AON` - Angolan New Kwanza (1990–2000) + // * `AOR` - Angolan Readjusted Kwanza (1995–1999) + // * `ARA` - Argentine Austral + // * `ARS` - Argentine Peso + // * `ARM` - Argentine Peso (1881–1970) + // * `ARP` - Argentine Peso (1983–1985) + // * `ARL` - Argentine Peso Ley (1970–1983) + // * `AMD` - Armenian Dram + // * `AWG` - Aruban Florin + // * `AUD` - Australian Dollar + // * `ATS` - Austrian Schilling + // * `AZN` - Azerbaijani Manat + // * `AZM` - Azerbaijani Manat (1993–2006) + // * `BSD` - Bahamian Dollar + // * `BHD` - Bahraini Dinar + // * `BDT` - Bangladeshi Taka + // * `BBD` - Barbadian Dollar + // * `BYN` - Belarusian Ruble + // * `BYB` - Belarusian Ruble (1994–1999) + // * `BYR` - Belarusian Ruble (2000–2016) + // * `BEF` - Belgian Franc + // * `BEC` - Belgian Franc (convertible) + // * `BEL` - Belgian Franc (financial) + // * `BZD` - Belize Dollar + // * `BMD` - Bermudan Dollar + // * `BTN` - Bhutanese Ngultrum + // * `BOB` - Bolivian Boliviano + // * `BOL` - Bolivian Boliviano (1863–1963) + // * `BOV` - Bolivian Mvdol + // * `BOP` - Bolivian Peso + // * `BAM` - Bosnia-Herzegovina Convertible Mark + // * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + // * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + // * `BWP` - Botswanan Pula + // * `BRC` - Brazilian Cruzado (1986–1989) + // * `BRZ` - Brazilian Cruzeiro (1942–1967) + // * `BRE` - Brazilian Cruzeiro (1990–1993) + // * `BRR` - Brazilian Cruzeiro (1993–1994) + // * `BRN` - Brazilian New Cruzado (1989–1990) + // * `BRB` - Brazilian New Cruzeiro (1967–1986) + // * `BRL` - Brazilian Real + // * `GBP` - British Pound + // * `BND` - Brunei Dollar + // * `BGL` - Bulgarian Hard Lev + // * `BGN` - Bulgarian Lev + // * `BGO` - Bulgarian Lev (1879–1952) + // * `BGM` - Bulgarian Socialist Lev + // * `BUK` - Burmese Kyat + // * `BIF` - Burundian Franc + // * `XPF` - CFP Franc + // * `KHR` - Cambodian Riel + // * `CAD` - Canadian Dollar + // * `CVE` - Cape Verdean Escudo + // * `KYD` - Cayman Islands Dollar + // * `XAF` - Central African CFA Franc + // * `CLE` - Chilean Escudo + // * `CLP` - Chilean Peso + // * `CLF` - Chilean Unit of Account (UF) + // * `CNX` - Chinese People’s Bank Dollar + // * `CNY` - Chinese Yuan + // * `CNH` - Chinese Yuan (offshore) + // * `COP` - Colombian Peso + // * `COU` - Colombian Real Value Unit + // * `KMF` - Comorian Franc + // * `CDF` - Congolese Franc + // * `CRC` - Costa Rican Colón + // * `HRD` - Croatian Dinar + // * `HRK` - Croatian Kuna + // * `CUC` - Cuban Convertible Peso + // * `CUP` - Cuban Peso + // * `CYP` - Cypriot Pound + // * `CZK` - Czech Koruna + // * `CSK` - Czechoslovak Hard Koruna + // * `DKK` - Danish Krone + // * `DJF` - Djiboutian Franc + // * `DOP` - Dominican Peso + // * `NLG` - Dutch Guilder + // * `XCD` - East Caribbean Dollar + // * `DDM` - East German Mark + // * `ECS` - Ecuadorian Sucre + // * `ECV` - Ecuadorian Unit of Constant Value + // * `EGP` - Egyptian Pound + // * `GQE` - Equatorial Guinean Ekwele + // * `ERN` - Eritrean Nakfa + // * `EEK` - Estonian Kroon + // * `ETB` - Ethiopian Birr + // * `EUR` - Euro + // * `XBA` - European Composite Unit + // * `XEU` - European Currency Unit + // * `XBB` - European Monetary Unit + // * `XBC` - European Unit of Account (XBC) + // * `XBD` - European Unit of Account (XBD) + // * `FKP` - Falkland Islands Pound + // * `FJD` - Fijian Dollar + // * `FIM` - Finnish Markka + // * `FRF` - French Franc + // * `XFO` - French Gold Franc + // * `XFU` - French UIC-Franc + // * `GMD` - Gambian Dalasi + // * `GEK` - Georgian Kupon Larit + // * `GEL` - Georgian Lari + // * `DEM` - German Mark + // * `GHS` - Ghanaian Cedi + // * `GHC` - Ghanaian Cedi (1979–2007) + // * `GIP` - Gibraltar Pound + // * `XAU` - Gold + // * `GRD` - Greek Drachma + // * `GTQ` - Guatemalan Quetzal + // * `GWP` - Guinea-Bissau Peso + // * `GNF` - Guinean Franc + // * `GNS` - Guinean Syli + // * `GYD` - Guyanaese Dollar + // * `HTG` - Haitian Gourde + // * `HNL` - Honduran Lempira + // * `HKD` - Hong Kong Dollar + // * `HUF` - Hungarian Forint + // * `IMP` - IMP + // * `ISK` - Icelandic Króna + // * `ISJ` - Icelandic Króna (1918–1981) + // * `INR` - Indian Rupee + // * `IDR` - Indonesian Rupiah + // * `IRR` - Iranian Rial + // * `IQD` - Iraqi Dinar + // * `IEP` - Irish Pound + // * `ILS` - Israeli New Shekel + // * `ILP` - Israeli Pound + // * `ILR` - Israeli Shekel (1980–1985) + // * `ITL` - Italian Lira + // * `JMD` - Jamaican Dollar + // * `JPY` - Japanese Yen + // * `JOD` - Jordanian Dinar + // * `KZT` - Kazakhstani Tenge + // * `KES` - Kenyan Shilling + // * `KWD` - Kuwaiti Dinar + // * `KGS` - Kyrgystani Som + // * `LAK` - Laotian Kip + // * `LVL` - Latvian Lats + // * `LVR` - Latvian Ruble + // * `LBP` - Lebanese Pound + // * `LSL` - Lesotho Loti + // * `LRD` - Liberian Dollar + // * `LYD` - Libyan Dinar + // * `LTL` - Lithuanian Litas + // * `LTT` - Lithuanian Talonas + // * `LUL` - Luxembourg Financial Franc + // * `LUC` - Luxembourgian Convertible Franc + // * `LUF` - Luxembourgian Franc + // * `MOP` - Macanese Pataca + // * `MKD` - Macedonian Denar + // * `MKN` - Macedonian Denar (1992–1993) + // * `MGA` - Malagasy Ariary + // * `MGF` - Malagasy Franc + // * `MWK` - Malawian Kwacha + // * `MYR` - Malaysian Ringgit + // * `MVR` - Maldivian Rufiyaa + // * `MVP` - Maldivian Rupee (1947–1981) + // * `MLF` - Malian Franc + // * `MTL` - Maltese Lira + // * `MTP` - Maltese Pound + // * `MRU` - Mauritanian Ouguiya + // * `MRO` - Mauritanian Ouguiya (1973–2017) + // * `MUR` - Mauritian Rupee + // * `MXV` - Mexican Investment Unit + // * `MXN` - Mexican Peso + // * `MXP` - Mexican Silver Peso (1861–1992) + // * `MDC` - Moldovan Cupon + // * `MDL` - Moldovan Leu + // * `MCF` - Monegasque Franc + // * `MNT` - Mongolian Tugrik + // * `MAD` - Moroccan Dirham + // * `MAF` - Moroccan Franc + // * `MZE` - Mozambican Escudo + // * `MZN` - Mozambican Metical + // * `MZM` - Mozambican Metical (1980–2006) + // * `MMK` - Myanmar Kyat + // * `NAD` - Namibian Dollar + // * `NPR` - Nepalese Rupee + // * `ANG` - Netherlands Antillean Guilder + // * `TWD` - New Taiwan Dollar + // * `NZD` - New Zealand Dollar + // * `NIO` - Nicaraguan Córdoba + // * `NIC` - Nicaraguan Córdoba (1988–1991) + // * `NGN` - Nigerian Naira + // * `KPW` - North Korean Won + // * `NOK` - Norwegian Krone + // * `OMR` - Omani Rial + // * `PKR` - Pakistani Rupee + // * `XPD` - Palladium + // * `PAB` - Panamanian Balboa + // * `PGK` - Papua New Guinean Kina + // * `PYG` - Paraguayan Guarani + // * `PEI` - Peruvian Inti + // * `PEN` - Peruvian Sol + // * `PES` - Peruvian Sol (1863–1965) + // * `PHP` - Philippine Peso + // * `XPT` - Platinum + // * `PLN` - Polish Zloty + // * `PLZ` - Polish Zloty (1950–1995) + // * `PTE` - Portuguese Escudo + // * `GWE` - Portuguese Guinea Escudo + // * `QAR` - Qatari Rial + // * `XRE` - RINET Funds + // * `RHD` - Rhodesian Dollar + // * `RON` - Romanian Leu + // * `ROL` - Romanian Leu (1952–2006) + // * `RUB` - Russian Ruble + // * `RUR` - Russian Ruble (1991–1998) + // * `RWF` - Rwandan Franc + // * `SVC` - Salvadoran Colón + // * `WST` - Samoan Tala + // * `SAR` - Saudi Riyal + // * `RSD` - Serbian Dinar + // * `CSD` - Serbian Dinar (2002–2006) + // * `SCR` - Seychellois Rupee + // * `SLL` - Sierra Leonean Leone + // * `XAG` - Silver + // * `SGD` - Singapore Dollar + // * `SKK` - Slovak Koruna + // * `SIT` - Slovenian Tolar + // * `SBD` - Solomon Islands Dollar + // * `SOS` - Somali Shilling + // * `ZAR` - South African Rand + // * `ZAL` - South African Rand (financial) + // * `KRH` - South Korean Hwan (1953–1962) + // * `KRW` - South Korean Won + // * `KRO` - South Korean Won (1945–1953) + // * `SSP` - South Sudanese Pound + // * `SUR` - Soviet Rouble + // * `ESP` - Spanish Peseta + // * `ESA` - Spanish Peseta (A account) + // * `ESB` - Spanish Peseta (convertible account) + // * `XDR` - Special Drawing Rights + // * `LKR` - Sri Lankan Rupee + // * `SHP` - St. Helena Pound + // * `XSU` - Sucre + // * `SDD` - Sudanese Dinar (1992–2007) + // * `SDG` - Sudanese Pound + // * `SDP` - Sudanese Pound (1957–1998) + // * `SRD` - Surinamese Dollar + // * `SRG` - Surinamese Guilder + // * `SZL` - Swazi Lilangeni + // * `SEK` - Swedish Krona + // * `CHF` - Swiss Franc + // * `SYP` - Syrian Pound + // * `STN` - São Tomé & Príncipe Dobra + // * `STD` - São Tomé & Príncipe Dobra (1977–2017) + // * `TVD` - TVD + // * `TJR` - Tajikistani Ruble + // * `TJS` - Tajikistani Somoni + // * `TZS` - Tanzanian Shilling + // * `XTS` - Testing Currency Code + // * `THB` - Thai Baht + // * `XXX` - The codes assigned for transactions where no currency is involved + // * `TPE` - Timorese Escudo + // * `TOP` - Tongan Paʻanga + // * `TTD` - Trinidad & Tobago Dollar + // * `TND` - Tunisian Dinar + // * `TRY` - Turkish Lira + // * `TRL` - Turkish Lira (1922–2005) + // * `TMT` - Turkmenistani Manat + // * `TMM` - Turkmenistani Manat (1993–2009) + // * `USD` - US Dollar + // * `USN` - US Dollar (Next day) + // * `USS` - US Dollar (Same day) + // * `UGX` - Ugandan Shilling + // * `UGS` - Ugandan Shilling (1966–1987) + // * `UAH` - Ukrainian Hryvnia + // * `UAK` - Ukrainian Karbovanets + // * `AED` - United Arab Emirates Dirham + // * `UYW` - Uruguayan Nominal Wage Index Unit + // * `UYU` - Uruguayan Peso + // * `UYP` - Uruguayan Peso (1975–1993) + // * `UYI` - Uruguayan Peso (Indexed Units) + // * `UZS` - Uzbekistani Som + // * `VUV` - Vanuatu Vatu + // * `VES` - Venezuelan Bolívar + // * `VEB` - Venezuelan Bolívar (1871–2008) + // * `VEF` - Venezuelan Bolívar (2008–2018) + // * `VND` - Vietnamese Dong + // * `VNN` - Vietnamese Dong (1978–1985) + // * `CHE` - WIR Euro + // * `CHW` - WIR Franc + // * `XOF` - West African CFA Franc + // * `YDD` - Yemeni Dinar + // * `YER` - Yemeni Rial + // * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + // * `YUD` - Yugoslavian Hard Dinar (1966–1990) + // * `YUM` - Yugoslavian New Dinar (1994–2002) + // * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + // * `ZWN` - ZWN + // * `ZRN` - Zairean New Zaire (1993–1998) + // * `ZRZ` - Zairean Zaire (1971–1993) + // * `ZMW` - Zambian Kwacha + // * `ZMK` - Zambian Kwacha (1968–2012) + // * `ZWD` - Zimbabwean Dollar (1980–2008) + // * `ZWR` - Zimbabwean Dollar (2008) + // * `ZWL` - Zimbabwean Dollar (2009) + Currency *BalanceSheetCurrency `json:"currency,omitempty" url:"currency,omitempty"` + // `Company` object for the given `BalanceSheet` object. + Company *BalanceSheetCompany `json:"company,omitempty" url:"company,omitempty"` + // The balance sheet's date. The balance sheet data will reflect the company's financial position this point in time. + Date *time.Time `json:"date,omitempty" url:"date,omitempty"` + // The balance sheet's net assets. + NetAssets *float64 `json:"net_assets,omitempty" url:"net_assets,omitempty"` + Assets []*ReportItem `json:"assets,omitempty" url:"assets,omitempty"` + Liabilities []*ReportItem `json:"liabilities,omitempty" url:"liabilities,omitempty"` + Equity []*ReportItem `json:"equity,omitempty" url:"equity,omitempty"` + // The time that balance sheet was generated by the accounting system. + RemoteGeneratedAt *time.Time `json:"remote_generated_at,omitempty" url:"remote_generated_at,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (b *BalanceSheet) GetId() *string { + if b == nil { + return nil + } + return b.Id +} + +func (b *BalanceSheet) GetRemoteId() *string { + if b == nil { + return nil + } + return b.RemoteId +} + +func (b *BalanceSheet) GetCreatedAt() *time.Time { + if b == nil { + return nil + } + return b.CreatedAt +} + +func (b *BalanceSheet) GetModifiedAt() *time.Time { + if b == nil { + return nil + } + return b.ModifiedAt +} + +func (b *BalanceSheet) GetName() *string { + if b == nil { + return nil + } + return b.Name +} + +func (b *BalanceSheet) GetCurrency() *BalanceSheetCurrency { + if b == nil { + return nil + } + return b.Currency +} + +func (b *BalanceSheet) GetCompany() *BalanceSheetCompany { + if b == nil { + return nil + } + return b.Company +} + +func (b *BalanceSheet) GetDate() *time.Time { + if b == nil { + return nil + } + return b.Date +} + +func (b *BalanceSheet) GetNetAssets() *float64 { + if b == nil { + return nil + } + return b.NetAssets +} + +func (b *BalanceSheet) GetAssets() []*ReportItem { + if b == nil { + return nil + } + return b.Assets +} + +func (b *BalanceSheet) GetLiabilities() []*ReportItem { + if b == nil { + return nil + } + return b.Liabilities +} + +func (b *BalanceSheet) GetEquity() []*ReportItem { + if b == nil { + return nil + } + return b.Equity +} + +func (b *BalanceSheet) GetRemoteGeneratedAt() *time.Time { + if b == nil { + return nil + } + return b.RemoteGeneratedAt +} + +func (b *BalanceSheet) GetRemoteWasDeleted() *bool { + if b == nil { + return nil + } + return b.RemoteWasDeleted +} + +func (b *BalanceSheet) GetFieldMappings() map[string]interface{} { + if b == nil { + return nil + } + return b.FieldMappings +} + +func (b *BalanceSheet) GetRemoteData() []*RemoteData { + if b == nil { + return nil + } + return b.RemoteData +} + +func (b *BalanceSheet) GetExtraProperties() map[string]interface{} { + return b.extraProperties +} + +func (b *BalanceSheet) UnmarshalJSON(data []byte) error { + type embed BalanceSheet + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + Date *internal.DateTime `json:"date,omitempty"` + RemoteGeneratedAt *internal.DateTime `json:"remote_generated_at,omitempty"` + }{ + embed: embed(*b), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *b = BalanceSheet(unmarshaler.embed) + b.CreatedAt = unmarshaler.CreatedAt.TimePtr() + b.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + b.Date = unmarshaler.Date.TimePtr() + b.RemoteGeneratedAt = unmarshaler.RemoteGeneratedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *b) + if err != nil { + return err + } + b.extraProperties = extraProperties + b.rawJSON = json.RawMessage(data) + return nil +} + +func (b *BalanceSheet) MarshalJSON() ([]byte, error) { + type embed BalanceSheet + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + Date *internal.DateTime `json:"date,omitempty"` + RemoteGeneratedAt *internal.DateTime `json:"remote_generated_at,omitempty"` + }{ + embed: embed(*b), + CreatedAt: internal.NewOptionalDateTime(b.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(b.ModifiedAt), + Date: internal.NewOptionalDateTime(b.Date), + RemoteGeneratedAt: internal.NewOptionalDateTime(b.RemoteGeneratedAt), + } + return json.Marshal(marshaler) +} + +func (b *BalanceSheet) String() string { + if len(b.rawJSON) > 0 { + if value, err := internal.StringifyJSON(b.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(b); err == nil { + return value + } + return fmt.Sprintf("%#v", b) +} + +// `Company` object for the given `BalanceSheet` object. +type BalanceSheetCompany struct { + String string + CompanyInfo *CompanyInfo + + typ string +} + +func (b *BalanceSheetCompany) GetString() string { + if b == nil { + return "" + } + return b.String +} + +func (b *BalanceSheetCompany) GetCompanyInfo() *CompanyInfo { + if b == nil { + return nil + } + return b.CompanyInfo +} + +func (b *BalanceSheetCompany) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + b.typ = "String" + b.String = valueString + return nil + } + valueCompanyInfo := new(CompanyInfo) + if err := json.Unmarshal(data, &valueCompanyInfo); err == nil { + b.typ = "CompanyInfo" + b.CompanyInfo = valueCompanyInfo + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, b) +} + +func (b BalanceSheetCompany) MarshalJSON() ([]byte, error) { + if b.typ == "String" || b.String != "" { + return json.Marshal(b.String) + } + if b.typ == "CompanyInfo" || b.CompanyInfo != nil { + return json.Marshal(b.CompanyInfo) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", b) +} + +type BalanceSheetCompanyVisitor interface { + VisitString(string) error + VisitCompanyInfo(*CompanyInfo) error +} + +func (b *BalanceSheetCompany) Accept(visitor BalanceSheetCompanyVisitor) error { + if b.typ == "String" || b.String != "" { + return visitor.VisitString(b.String) + } + if b.typ == "CompanyInfo" || b.CompanyInfo != nil { + return visitor.VisitCompanyInfo(b.CompanyInfo) + } + return fmt.Errorf("type %T does not include a non-empty union type", b) +} + +// The balance sheet's currency. +// +// * `XUA` - ADB Unit of Account +// * `AFN` - Afghan Afghani +// * `AFA` - Afghan Afghani (1927–2002) +// * `ALL` - Albanian Lek +// * `ALK` - Albanian Lek (1946–1965) +// * `DZD` - Algerian Dinar +// * `ADP` - Andorran Peseta +// * `AOA` - Angolan Kwanza +// * `AOK` - Angolan Kwanza (1977–1991) +// * `AON` - Angolan New Kwanza (1990–2000) +// * `AOR` - Angolan Readjusted Kwanza (1995–1999) +// * `ARA` - Argentine Austral +// * `ARS` - Argentine Peso +// * `ARM` - Argentine Peso (1881–1970) +// * `ARP` - Argentine Peso (1983–1985) +// * `ARL` - Argentine Peso Ley (1970–1983) +// * `AMD` - Armenian Dram +// * `AWG` - Aruban Florin +// * `AUD` - Australian Dollar +// * `ATS` - Austrian Schilling +// * `AZN` - Azerbaijani Manat +// * `AZM` - Azerbaijani Manat (1993–2006) +// * `BSD` - Bahamian Dollar +// * `BHD` - Bahraini Dinar +// * `BDT` - Bangladeshi Taka +// * `BBD` - Barbadian Dollar +// * `BYN` - Belarusian Ruble +// * `BYB` - Belarusian Ruble (1994–1999) +// * `BYR` - Belarusian Ruble (2000–2016) +// * `BEF` - Belgian Franc +// * `BEC` - Belgian Franc (convertible) +// * `BEL` - Belgian Franc (financial) +// * `BZD` - Belize Dollar +// * `BMD` - Bermudan Dollar +// * `BTN` - Bhutanese Ngultrum +// * `BOB` - Bolivian Boliviano +// * `BOL` - Bolivian Boliviano (1863–1963) +// * `BOV` - Bolivian Mvdol +// * `BOP` - Bolivian Peso +// * `BAM` - Bosnia-Herzegovina Convertible Mark +// * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) +// * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) +// * `BWP` - Botswanan Pula +// * `BRC` - Brazilian Cruzado (1986–1989) +// * `BRZ` - Brazilian Cruzeiro (1942–1967) +// * `BRE` - Brazilian Cruzeiro (1990–1993) +// * `BRR` - Brazilian Cruzeiro (1993–1994) +// * `BRN` - Brazilian New Cruzado (1989–1990) +// * `BRB` - Brazilian New Cruzeiro (1967–1986) +// * `BRL` - Brazilian Real +// * `GBP` - British Pound +// * `BND` - Brunei Dollar +// * `BGL` - Bulgarian Hard Lev +// * `BGN` - Bulgarian Lev +// * `BGO` - Bulgarian Lev (1879–1952) +// * `BGM` - Bulgarian Socialist Lev +// * `BUK` - Burmese Kyat +// * `BIF` - Burundian Franc +// * `XPF` - CFP Franc +// * `KHR` - Cambodian Riel +// * `CAD` - Canadian Dollar +// * `CVE` - Cape Verdean Escudo +// * `KYD` - Cayman Islands Dollar +// * `XAF` - Central African CFA Franc +// * `CLE` - Chilean Escudo +// * `CLP` - Chilean Peso +// * `CLF` - Chilean Unit of Account (UF) +// * `CNX` - Chinese People’s Bank Dollar +// * `CNY` - Chinese Yuan +// * `CNH` - Chinese Yuan (offshore) +// * `COP` - Colombian Peso +// * `COU` - Colombian Real Value Unit +// * `KMF` - Comorian Franc +// * `CDF` - Congolese Franc +// * `CRC` - Costa Rican Colón +// * `HRD` - Croatian Dinar +// * `HRK` - Croatian Kuna +// * `CUC` - Cuban Convertible Peso +// * `CUP` - Cuban Peso +// * `CYP` - Cypriot Pound +// * `CZK` - Czech Koruna +// * `CSK` - Czechoslovak Hard Koruna +// * `DKK` - Danish Krone +// * `DJF` - Djiboutian Franc +// * `DOP` - Dominican Peso +// * `NLG` - Dutch Guilder +// * `XCD` - East Caribbean Dollar +// * `DDM` - East German Mark +// * `ECS` - Ecuadorian Sucre +// * `ECV` - Ecuadorian Unit of Constant Value +// * `EGP` - Egyptian Pound +// * `GQE` - Equatorial Guinean Ekwele +// * `ERN` - Eritrean Nakfa +// * `EEK` - Estonian Kroon +// * `ETB` - Ethiopian Birr +// * `EUR` - Euro +// * `XBA` - European Composite Unit +// * `XEU` - European Currency Unit +// * `XBB` - European Monetary Unit +// * `XBC` - European Unit of Account (XBC) +// * `XBD` - European Unit of Account (XBD) +// * `FKP` - Falkland Islands Pound +// * `FJD` - Fijian Dollar +// * `FIM` - Finnish Markka +// * `FRF` - French Franc +// * `XFO` - French Gold Franc +// * `XFU` - French UIC-Franc +// * `GMD` - Gambian Dalasi +// * `GEK` - Georgian Kupon Larit +// * `GEL` - Georgian Lari +// * `DEM` - German Mark +// * `GHS` - Ghanaian Cedi +// * `GHC` - Ghanaian Cedi (1979–2007) +// * `GIP` - Gibraltar Pound +// * `XAU` - Gold +// * `GRD` - Greek Drachma +// * `GTQ` - Guatemalan Quetzal +// * `GWP` - Guinea-Bissau Peso +// * `GNF` - Guinean Franc +// * `GNS` - Guinean Syli +// * `GYD` - Guyanaese Dollar +// * `HTG` - Haitian Gourde +// * `HNL` - Honduran Lempira +// * `HKD` - Hong Kong Dollar +// * `HUF` - Hungarian Forint +// * `IMP` - IMP +// * `ISK` - Icelandic Króna +// * `ISJ` - Icelandic Króna (1918–1981) +// * `INR` - Indian Rupee +// * `IDR` - Indonesian Rupiah +// * `IRR` - Iranian Rial +// * `IQD` - Iraqi Dinar +// * `IEP` - Irish Pound +// * `ILS` - Israeli New Shekel +// * `ILP` - Israeli Pound +// * `ILR` - Israeli Shekel (1980–1985) +// * `ITL` - Italian Lira +// * `JMD` - Jamaican Dollar +// * `JPY` - Japanese Yen +// * `JOD` - Jordanian Dinar +// * `KZT` - Kazakhstani Tenge +// * `KES` - Kenyan Shilling +// * `KWD` - Kuwaiti Dinar +// * `KGS` - Kyrgystani Som +// * `LAK` - Laotian Kip +// * `LVL` - Latvian Lats +// * `LVR` - Latvian Ruble +// * `LBP` - Lebanese Pound +// * `LSL` - Lesotho Loti +// * `LRD` - Liberian Dollar +// * `LYD` - Libyan Dinar +// * `LTL` - Lithuanian Litas +// * `LTT` - Lithuanian Talonas +// * `LUL` - Luxembourg Financial Franc +// * `LUC` - Luxembourgian Convertible Franc +// * `LUF` - Luxembourgian Franc +// * `MOP` - Macanese Pataca +// * `MKD` - Macedonian Denar +// * `MKN` - Macedonian Denar (1992–1993) +// * `MGA` - Malagasy Ariary +// * `MGF` - Malagasy Franc +// * `MWK` - Malawian Kwacha +// * `MYR` - Malaysian Ringgit +// * `MVR` - Maldivian Rufiyaa +// * `MVP` - Maldivian Rupee (1947–1981) +// * `MLF` - Malian Franc +// * `MTL` - Maltese Lira +// * `MTP` - Maltese Pound +// * `MRU` - Mauritanian Ouguiya +// * `MRO` - Mauritanian Ouguiya (1973–2017) +// * `MUR` - Mauritian Rupee +// * `MXV` - Mexican Investment Unit +// * `MXN` - Mexican Peso +// * `MXP` - Mexican Silver Peso (1861–1992) +// * `MDC` - Moldovan Cupon +// * `MDL` - Moldovan Leu +// * `MCF` - Monegasque Franc +// * `MNT` - Mongolian Tugrik +// * `MAD` - Moroccan Dirham +// * `MAF` - Moroccan Franc +// * `MZE` - Mozambican Escudo +// * `MZN` - Mozambican Metical +// * `MZM` - Mozambican Metical (1980–2006) +// * `MMK` - Myanmar Kyat +// * `NAD` - Namibian Dollar +// * `NPR` - Nepalese Rupee +// * `ANG` - Netherlands Antillean Guilder +// * `TWD` - New Taiwan Dollar +// * `NZD` - New Zealand Dollar +// * `NIO` - Nicaraguan Córdoba +// * `NIC` - Nicaraguan Córdoba (1988–1991) +// * `NGN` - Nigerian Naira +// * `KPW` - North Korean Won +// * `NOK` - Norwegian Krone +// * `OMR` - Omani Rial +// * `PKR` - Pakistani Rupee +// * `XPD` - Palladium +// * `PAB` - Panamanian Balboa +// * `PGK` - Papua New Guinean Kina +// * `PYG` - Paraguayan Guarani +// * `PEI` - Peruvian Inti +// * `PEN` - Peruvian Sol +// * `PES` - Peruvian Sol (1863–1965) +// * `PHP` - Philippine Peso +// * `XPT` - Platinum +// * `PLN` - Polish Zloty +// * `PLZ` - Polish Zloty (1950–1995) +// * `PTE` - Portuguese Escudo +// * `GWE` - Portuguese Guinea Escudo +// * `QAR` - Qatari Rial +// * `XRE` - RINET Funds +// * `RHD` - Rhodesian Dollar +// * `RON` - Romanian Leu +// * `ROL` - Romanian Leu (1952–2006) +// * `RUB` - Russian Ruble +// * `RUR` - Russian Ruble (1991–1998) +// * `RWF` - Rwandan Franc +// * `SVC` - Salvadoran Colón +// * `WST` - Samoan Tala +// * `SAR` - Saudi Riyal +// * `RSD` - Serbian Dinar +// * `CSD` - Serbian Dinar (2002–2006) +// * `SCR` - Seychellois Rupee +// * `SLL` - Sierra Leonean Leone +// * `XAG` - Silver +// * `SGD` - Singapore Dollar +// * `SKK` - Slovak Koruna +// * `SIT` - Slovenian Tolar +// * `SBD` - Solomon Islands Dollar +// * `SOS` - Somali Shilling +// * `ZAR` - South African Rand +// * `ZAL` - South African Rand (financial) +// * `KRH` - South Korean Hwan (1953–1962) +// * `KRW` - South Korean Won +// * `KRO` - South Korean Won (1945–1953) +// * `SSP` - South Sudanese Pound +// * `SUR` - Soviet Rouble +// * `ESP` - Spanish Peseta +// * `ESA` - Spanish Peseta (A account) +// * `ESB` - Spanish Peseta (convertible account) +// * `XDR` - Special Drawing Rights +// * `LKR` - Sri Lankan Rupee +// * `SHP` - St. Helena Pound +// * `XSU` - Sucre +// * `SDD` - Sudanese Dinar (1992–2007) +// * `SDG` - Sudanese Pound +// * `SDP` - Sudanese Pound (1957–1998) +// * `SRD` - Surinamese Dollar +// * `SRG` - Surinamese Guilder +// * `SZL` - Swazi Lilangeni +// * `SEK` - Swedish Krona +// * `CHF` - Swiss Franc +// * `SYP` - Syrian Pound +// * `STN` - São Tomé & Príncipe Dobra +// * `STD` - São Tomé & Príncipe Dobra (1977–2017) +// * `TVD` - TVD +// * `TJR` - Tajikistani Ruble +// * `TJS` - Tajikistani Somoni +// * `TZS` - Tanzanian Shilling +// * `XTS` - Testing Currency Code +// * `THB` - Thai Baht +// * `XXX` - The codes assigned for transactions where no currency is involved +// * `TPE` - Timorese Escudo +// * `TOP` - Tongan Paʻanga +// * `TTD` - Trinidad & Tobago Dollar +// * `TND` - Tunisian Dinar +// * `TRY` - Turkish Lira +// * `TRL` - Turkish Lira (1922–2005) +// * `TMT` - Turkmenistani Manat +// * `TMM` - Turkmenistani Manat (1993–2009) +// * `USD` - US Dollar +// * `USN` - US Dollar (Next day) +// * `USS` - US Dollar (Same day) +// * `UGX` - Ugandan Shilling +// * `UGS` - Ugandan Shilling (1966–1987) +// * `UAH` - Ukrainian Hryvnia +// * `UAK` - Ukrainian Karbovanets +// * `AED` - United Arab Emirates Dirham +// * `UYW` - Uruguayan Nominal Wage Index Unit +// * `UYU` - Uruguayan Peso +// * `UYP` - Uruguayan Peso (1975–1993) +// * `UYI` - Uruguayan Peso (Indexed Units) +// * `UZS` - Uzbekistani Som +// * `VUV` - Vanuatu Vatu +// * `VES` - Venezuelan Bolívar +// * `VEB` - Venezuelan Bolívar (1871–2008) +// * `VEF` - Venezuelan Bolívar (2008–2018) +// * `VND` - Vietnamese Dong +// * `VNN` - Vietnamese Dong (1978–1985) +// * `CHE` - WIR Euro +// * `CHW` - WIR Franc +// * `XOF` - West African CFA Franc +// * `YDD` - Yemeni Dinar +// * `YER` - Yemeni Rial +// * `YUN` - Yugoslavian Convertible Dinar (1990–1992) +// * `YUD` - Yugoslavian Hard Dinar (1966–1990) +// * `YUM` - Yugoslavian New Dinar (1994–2002) +// * `YUR` - Yugoslavian Reformed Dinar (1992–1993) +// * `ZWN` - ZWN +// * `ZRN` - Zairean New Zaire (1993–1998) +// * `ZRZ` - Zairean Zaire (1971–1993) +// * `ZMW` - Zambian Kwacha +// * `ZMK` - Zambian Kwacha (1968–2012) +// * `ZWD` - Zimbabwean Dollar (1980–2008) +// * `ZWR` - Zimbabwean Dollar (2008) +// * `ZWL` - Zimbabwean Dollar (2009) +type BalanceSheetCurrency struct { + TransactionCurrencyEnum TransactionCurrencyEnum + String string + + typ string +} + +func (b *BalanceSheetCurrency) GetTransactionCurrencyEnum() TransactionCurrencyEnum { + if b == nil { + return "" + } + return b.TransactionCurrencyEnum +} + +func (b *BalanceSheetCurrency) GetString() string { + if b == nil { + return "" + } + return b.String +} + +func (b *BalanceSheetCurrency) UnmarshalJSON(data []byte) error { + var valueTransactionCurrencyEnum TransactionCurrencyEnum + if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { + b.typ = "TransactionCurrencyEnum" + b.TransactionCurrencyEnum = valueTransactionCurrencyEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + b.typ = "String" + b.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, b) +} + +func (b BalanceSheetCurrency) MarshalJSON() ([]byte, error) { + if b.typ == "TransactionCurrencyEnum" || b.TransactionCurrencyEnum != "" { + return json.Marshal(b.TransactionCurrencyEnum) + } + if b.typ == "String" || b.String != "" { + return json.Marshal(b.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", b) +} + +type BalanceSheetCurrencyVisitor interface { + VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error + VisitString(string) error +} + +func (b *BalanceSheetCurrency) Accept(visitor BalanceSheetCurrencyVisitor) error { + if b.typ == "TransactionCurrencyEnum" || b.TransactionCurrencyEnum != "" { + return visitor.VisitTransactionCurrencyEnum(b.TransactionCurrencyEnum) + } + if b.typ == "String" || b.String != "" { + return visitor.VisitString(b.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", b) +} + +type PaginatedBalanceSheetList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*BalanceSheet `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedBalanceSheetList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedBalanceSheetList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedBalanceSheetList) GetResults() []*BalanceSheet { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedBalanceSheetList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedBalanceSheetList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedBalanceSheetList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedBalanceSheetList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedBalanceSheetList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) } diff --git a/accounting/balancesheets/client.go b/accounting/balancesheets/client.go index 5894e5e..469eb59 100644 --- a/accounting/balancesheets/client.go +++ b/accounting/balancesheets/client.go @@ -1,126 +1,137 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package balancesheets import ( context "context" fmt "fmt" - accounting "github.com/merge-api/merge-go-client/accounting" - core "github.com/merge-api/merge-go-client/core" + accounting "github.com/merge-api/merge-go-client/v2/accounting" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `BalanceSheet` objects. -func (c *Client) List(ctx context.Context, request *accounting.BalanceSheetsListRequest) (*accounting.PaginatedBalanceSheetList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/balance-sheets" - - queryParams := make(url.Values) - if request.CompanyId != nil { - queryParams.Add("company_id", fmt.Sprintf("%v", *request.CompanyId)) - } - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *accounting.PaginatedBalanceSheetList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *accounting.BalanceSheetsListRequest, + opts ...option.RequestOption, +) (*core.Page[*accounting.BalanceSheet], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/balance-sheets" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *accounting.PaginatedBalanceSheetList) *internal.PageResponse[*string, *accounting.BalanceSheet] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *accounting.BalanceSheet]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Returns a `BalanceSheet` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *accounting.BalanceSheetsRetrieveRequest) (*accounting.BalanceSheet, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"accounting/v1/balance-sheets/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *accounting.BalanceSheetsRetrieveRequest, + opts ...option.RequestOption, +) (*accounting.BalanceSheet, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/accounting/v1/balance-sheets/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *accounting.BalanceSheet if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/accounting/bank_feed_accounts.go b/accounting/bank_feed_accounts.go index c485ddf..b3b4bab 100644 --- a/accounting/bank_feed_accounts.go +++ b/accounting/bank_feed_accounts.go @@ -1,29 +1,1153 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package accounting +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" + time "time" +) + type BankFeedAccountEndpointRequest struct { // Whether to include debug fields (such as log file links) in the response. - IsDebugMode *bool `json:"-"` + IsDebugMode *bool `json:"-" url:"is_debug_mode,omitempty"` // Whether or not third-party updates should be run asynchronously. - RunAsync *bool `json:"-"` - Model *BankFeedAccountRequest `json:"model,omitempty"` + RunAsync *bool `json:"-" url:"run_async,omitempty"` + Model *BankFeedAccountRequest `json:"model,omitempty" url:"-"` } type BankFeedAccountsListRequest struct { // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` } type BankFeedAccountsRetrieveRequest struct { // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` +} + +// # The BankFeedAccount Object +// ### Description +// The `BankFeedAccount` object represents a bank feed account, detailing various attributes including account identifiers, names, currency, and balance information. This object is central to managing and tracking bank feed accounts within the system. +// +// ### Usage Example +// Fetch from the `GET BankFeedAccount` endpoint to view details of a bank feed account. +type BankFeedAccountRequest struct { + // The unique identifier of the source account from our customer’s platform. + SourceAccountId *string `json:"source_account_id,omitempty" url:"source_account_id,omitempty"` + // The unique identifier of the target account from the third party software. + TargetAccountId *string `json:"target_account_id,omitempty" url:"target_account_id,omitempty"` + // The name of the source account as stored in our customer’s platform. + SourceAccountName *string `json:"source_account_name,omitempty" url:"source_account_name,omitempty"` + // The human-readable account number of the source account as stored in our customer’s platform. + SourceAccountNumber *string `json:"source_account_number,omitempty" url:"source_account_number,omitempty"` + // The name of the target account from the third party software. + TargetAccountName *string `json:"target_account_name,omitempty" url:"target_account_name,omitempty"` + // The currency code of the bank feed. + // + // * `XUA` - ADB Unit of Account + // * `AFN` - Afghan Afghani + // * `AFA` - Afghan Afghani (1927–2002) + // * `ALL` - Albanian Lek + // * `ALK` - Albanian Lek (1946–1965) + // * `DZD` - Algerian Dinar + // * `ADP` - Andorran Peseta + // * `AOA` - Angolan Kwanza + // * `AOK` - Angolan Kwanza (1977–1991) + // * `AON` - Angolan New Kwanza (1990–2000) + // * `AOR` - Angolan Readjusted Kwanza (1995–1999) + // * `ARA` - Argentine Austral + // * `ARS` - Argentine Peso + // * `ARM` - Argentine Peso (1881–1970) + // * `ARP` - Argentine Peso (1983–1985) + // * `ARL` - Argentine Peso Ley (1970–1983) + // * `AMD` - Armenian Dram + // * `AWG` - Aruban Florin + // * `AUD` - Australian Dollar + // * `ATS` - Austrian Schilling + // * `AZN` - Azerbaijani Manat + // * `AZM` - Azerbaijani Manat (1993–2006) + // * `BSD` - Bahamian Dollar + // * `BHD` - Bahraini Dinar + // * `BDT` - Bangladeshi Taka + // * `BBD` - Barbadian Dollar + // * `BYN` - Belarusian Ruble + // * `BYB` - Belarusian Ruble (1994–1999) + // * `BYR` - Belarusian Ruble (2000–2016) + // * `BEF` - Belgian Franc + // * `BEC` - Belgian Franc (convertible) + // * `BEL` - Belgian Franc (financial) + // * `BZD` - Belize Dollar + // * `BMD` - Bermudan Dollar + // * `BTN` - Bhutanese Ngultrum + // * `BOB` - Bolivian Boliviano + // * `BOL` - Bolivian Boliviano (1863–1963) + // * `BOV` - Bolivian Mvdol + // * `BOP` - Bolivian Peso + // * `BAM` - Bosnia-Herzegovina Convertible Mark + // * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + // * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + // * `BWP` - Botswanan Pula + // * `BRC` - Brazilian Cruzado (1986–1989) + // * `BRZ` - Brazilian Cruzeiro (1942–1967) + // * `BRE` - Brazilian Cruzeiro (1990–1993) + // * `BRR` - Brazilian Cruzeiro (1993–1994) + // * `BRN` - Brazilian New Cruzado (1989–1990) + // * `BRB` - Brazilian New Cruzeiro (1967–1986) + // * `BRL` - Brazilian Real + // * `GBP` - British Pound + // * `BND` - Brunei Dollar + // * `BGL` - Bulgarian Hard Lev + // * `BGN` - Bulgarian Lev + // * `BGO` - Bulgarian Lev (1879–1952) + // * `BGM` - Bulgarian Socialist Lev + // * `BUK` - Burmese Kyat + // * `BIF` - Burundian Franc + // * `XPF` - CFP Franc + // * `KHR` - Cambodian Riel + // * `CAD` - Canadian Dollar + // * `CVE` - Cape Verdean Escudo + // * `KYD` - Cayman Islands Dollar + // * `XAF` - Central African CFA Franc + // * `CLE` - Chilean Escudo + // * `CLP` - Chilean Peso + // * `CLF` - Chilean Unit of Account (UF) + // * `CNX` - Chinese People’s Bank Dollar + // * `CNY` - Chinese Yuan + // * `CNH` - Chinese Yuan (offshore) + // * `COP` - Colombian Peso + // * `COU` - Colombian Real Value Unit + // * `KMF` - Comorian Franc + // * `CDF` - Congolese Franc + // * `CRC` - Costa Rican Colón + // * `HRD` - Croatian Dinar + // * `HRK` - Croatian Kuna + // * `CUC` - Cuban Convertible Peso + // * `CUP` - Cuban Peso + // * `CYP` - Cypriot Pound + // * `CZK` - Czech Koruna + // * `CSK` - Czechoslovak Hard Koruna + // * `DKK` - Danish Krone + // * `DJF` - Djiboutian Franc + // * `DOP` - Dominican Peso + // * `NLG` - Dutch Guilder + // * `XCD` - East Caribbean Dollar + // * `DDM` - East German Mark + // * `ECS` - Ecuadorian Sucre + // * `ECV` - Ecuadorian Unit of Constant Value + // * `EGP` - Egyptian Pound + // * `GQE` - Equatorial Guinean Ekwele + // * `ERN` - Eritrean Nakfa + // * `EEK` - Estonian Kroon + // * `ETB` - Ethiopian Birr + // * `EUR` - Euro + // * `XBA` - European Composite Unit + // * `XEU` - European Currency Unit + // * `XBB` - European Monetary Unit + // * `XBC` - European Unit of Account (XBC) + // * `XBD` - European Unit of Account (XBD) + // * `FKP` - Falkland Islands Pound + // * `FJD` - Fijian Dollar + // * `FIM` - Finnish Markka + // * `FRF` - French Franc + // * `XFO` - French Gold Franc + // * `XFU` - French UIC-Franc + // * `GMD` - Gambian Dalasi + // * `GEK` - Georgian Kupon Larit + // * `GEL` - Georgian Lari + // * `DEM` - German Mark + // * `GHS` - Ghanaian Cedi + // * `GHC` - Ghanaian Cedi (1979–2007) + // * `GIP` - Gibraltar Pound + // * `XAU` - Gold + // * `GRD` - Greek Drachma + // * `GTQ` - Guatemalan Quetzal + // * `GWP` - Guinea-Bissau Peso + // * `GNF` - Guinean Franc + // * `GNS` - Guinean Syli + // * `GYD` - Guyanaese Dollar + // * `HTG` - Haitian Gourde + // * `HNL` - Honduran Lempira + // * `HKD` - Hong Kong Dollar + // * `HUF` - Hungarian Forint + // * `IMP` - IMP + // * `ISK` - Icelandic Króna + // * `ISJ` - Icelandic Króna (1918–1981) + // * `INR` - Indian Rupee + // * `IDR` - Indonesian Rupiah + // * `IRR` - Iranian Rial + // * `IQD` - Iraqi Dinar + // * `IEP` - Irish Pound + // * `ILS` - Israeli New Shekel + // * `ILP` - Israeli Pound + // * `ILR` - Israeli Shekel (1980–1985) + // * `ITL` - Italian Lira + // * `JMD` - Jamaican Dollar + // * `JPY` - Japanese Yen + // * `JOD` - Jordanian Dinar + // * `KZT` - Kazakhstani Tenge + // * `KES` - Kenyan Shilling + // * `KWD` - Kuwaiti Dinar + // * `KGS` - Kyrgystani Som + // * `LAK` - Laotian Kip + // * `LVL` - Latvian Lats + // * `LVR` - Latvian Ruble + // * `LBP` - Lebanese Pound + // * `LSL` - Lesotho Loti + // * `LRD` - Liberian Dollar + // * `LYD` - Libyan Dinar + // * `LTL` - Lithuanian Litas + // * `LTT` - Lithuanian Talonas + // * `LUL` - Luxembourg Financial Franc + // * `LUC` - Luxembourgian Convertible Franc + // * `LUF` - Luxembourgian Franc + // * `MOP` - Macanese Pataca + // * `MKD` - Macedonian Denar + // * `MKN` - Macedonian Denar (1992–1993) + // * `MGA` - Malagasy Ariary + // * `MGF` - Malagasy Franc + // * `MWK` - Malawian Kwacha + // * `MYR` - Malaysian Ringgit + // * `MVR` - Maldivian Rufiyaa + // * `MVP` - Maldivian Rupee (1947–1981) + // * `MLF` - Malian Franc + // * `MTL` - Maltese Lira + // * `MTP` - Maltese Pound + // * `MRU` - Mauritanian Ouguiya + // * `MRO` - Mauritanian Ouguiya (1973–2017) + // * `MUR` - Mauritian Rupee + // * `MXV` - Mexican Investment Unit + // * `MXN` - Mexican Peso + // * `MXP` - Mexican Silver Peso (1861–1992) + // * `MDC` - Moldovan Cupon + // * `MDL` - Moldovan Leu + // * `MCF` - Monegasque Franc + // * `MNT` - Mongolian Tugrik + // * `MAD` - Moroccan Dirham + // * `MAF` - Moroccan Franc + // * `MZE` - Mozambican Escudo + // * `MZN` - Mozambican Metical + // * `MZM` - Mozambican Metical (1980–2006) + // * `MMK` - Myanmar Kyat + // * `NAD` - Namibian Dollar + // * `NPR` - Nepalese Rupee + // * `ANG` - Netherlands Antillean Guilder + // * `TWD` - New Taiwan Dollar + // * `NZD` - New Zealand Dollar + // * `NIO` - Nicaraguan Córdoba + // * `NIC` - Nicaraguan Córdoba (1988–1991) + // * `NGN` - Nigerian Naira + // * `KPW` - North Korean Won + // * `NOK` - Norwegian Krone + // * `OMR` - Omani Rial + // * `PKR` - Pakistani Rupee + // * `XPD` - Palladium + // * `PAB` - Panamanian Balboa + // * `PGK` - Papua New Guinean Kina + // * `PYG` - Paraguayan Guarani + // * `PEI` - Peruvian Inti + // * `PEN` - Peruvian Sol + // * `PES` - Peruvian Sol (1863–1965) + // * `PHP` - Philippine Peso + // * `XPT` - Platinum + // * `PLN` - Polish Zloty + // * `PLZ` - Polish Zloty (1950–1995) + // * `PTE` - Portuguese Escudo + // * `GWE` - Portuguese Guinea Escudo + // * `QAR` - Qatari Rial + // * `XRE` - RINET Funds + // * `RHD` - Rhodesian Dollar + // * `RON` - Romanian Leu + // * `ROL` - Romanian Leu (1952–2006) + // * `RUB` - Russian Ruble + // * `RUR` - Russian Ruble (1991–1998) + // * `RWF` - Rwandan Franc + // * `SVC` - Salvadoran Colón + // * `WST` - Samoan Tala + // * `SAR` - Saudi Riyal + // * `RSD` - Serbian Dinar + // * `CSD` - Serbian Dinar (2002–2006) + // * `SCR` - Seychellois Rupee + // * `SLL` - Sierra Leonean Leone + // * `XAG` - Silver + // * `SGD` - Singapore Dollar + // * `SKK` - Slovak Koruna + // * `SIT` - Slovenian Tolar + // * `SBD` - Solomon Islands Dollar + // * `SOS` - Somali Shilling + // * `ZAR` - South African Rand + // * `ZAL` - South African Rand (financial) + // * `KRH` - South Korean Hwan (1953–1962) + // * `KRW` - South Korean Won + // * `KRO` - South Korean Won (1945–1953) + // * `SSP` - South Sudanese Pound + // * `SUR` - Soviet Rouble + // * `ESP` - Spanish Peseta + // * `ESA` - Spanish Peseta (A account) + // * `ESB` - Spanish Peseta (convertible account) + // * `XDR` - Special Drawing Rights + // * `LKR` - Sri Lankan Rupee + // * `SHP` - St. Helena Pound + // * `XSU` - Sucre + // * `SDD` - Sudanese Dinar (1992–2007) + // * `SDG` - Sudanese Pound + // * `SDP` - Sudanese Pound (1957–1998) + // * `SRD` - Surinamese Dollar + // * `SRG` - Surinamese Guilder + // * `SZL` - Swazi Lilangeni + // * `SEK` - Swedish Krona + // * `CHF` - Swiss Franc + // * `SYP` - Syrian Pound + // * `STN` - São Tomé & Príncipe Dobra + // * `STD` - São Tomé & Príncipe Dobra (1977–2017) + // * `TVD` - TVD + // * `TJR` - Tajikistani Ruble + // * `TJS` - Tajikistani Somoni + // * `TZS` - Tanzanian Shilling + // * `XTS` - Testing Currency Code + // * `THB` - Thai Baht + // * `XXX` - The codes assigned for transactions where no currency is involved + // * `TPE` - Timorese Escudo + // * `TOP` - Tongan Paʻanga + // * `TTD` - Trinidad & Tobago Dollar + // * `TND` - Tunisian Dinar + // * `TRY` - Turkish Lira + // * `TRL` - Turkish Lira (1922–2005) + // * `TMT` - Turkmenistani Manat + // * `TMM` - Turkmenistani Manat (1993–2009) + // * `USD` - US Dollar + // * `USN` - US Dollar (Next day) + // * `USS` - US Dollar (Same day) + // * `UGX` - Ugandan Shilling + // * `UGS` - Ugandan Shilling (1966–1987) + // * `UAH` - Ukrainian Hryvnia + // * `UAK` - Ukrainian Karbovanets + // * `AED` - United Arab Emirates Dirham + // * `UYW` - Uruguayan Nominal Wage Index Unit + // * `UYU` - Uruguayan Peso + // * `UYP` - Uruguayan Peso (1975–1993) + // * `UYI` - Uruguayan Peso (Indexed Units) + // * `UZS` - Uzbekistani Som + // * `VUV` - Vanuatu Vatu + // * `VES` - Venezuelan Bolívar + // * `VEB` - Venezuelan Bolívar (1871–2008) + // * `VEF` - Venezuelan Bolívar (2008–2018) + // * `VND` - Vietnamese Dong + // * `VNN` - Vietnamese Dong (1978–1985) + // * `CHE` - WIR Euro + // * `CHW` - WIR Franc + // * `XOF` - West African CFA Franc + // * `YDD` - Yemeni Dinar + // * `YER` - Yemeni Rial + // * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + // * `YUD` - Yugoslavian Hard Dinar (1966–1990) + // * `YUM` - Yugoslavian New Dinar (1994–2002) + // * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + // * `ZWN` - ZWN + // * `ZRN` - Zairean New Zaire (1993–1998) + // * `ZRZ` - Zairean Zaire (1971–1993) + // * `ZMW` - Zambian Kwacha + // * `ZMK` - Zambian Kwacha (1968–2012) + // * `ZWD` - Zimbabwean Dollar (1980–2008) + // * `ZWR` - Zimbabwean Dollar (2008) + // * `ZWL` - Zimbabwean Dollar (2009) + Currency *BankFeedAccountRequestCurrency `json:"currency,omitempty" url:"currency,omitempty"` + // The status of the bank feed. + // + // * `ACTIVE` - ACTIVE + // * `INACTIVE` - INACTIVE + FeedStatus *BankFeedAccountRequestFeedStatus `json:"feed_status,omitempty" url:"feed_status,omitempty"` + // The start date of the bank feed’s transactions. + FeedStartDate *time.Time `json:"feed_start_date,omitempty" url:"feed_start_date,omitempty"` + // The current balance of funds in the source account. + SourceAccountBalance *float64 `json:"source_account_balance,omitempty" url:"source_account_balance,omitempty"` + // The type of the account. + // + // * `BANK` - BANK + // * `CREDIT_CARD` - CREDIT_CARD + AccountType *BankFeedAccountRequestAccountType `json:"account_type,omitempty" url:"account_type,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (b *BankFeedAccountRequest) GetSourceAccountId() *string { + if b == nil { + return nil + } + return b.SourceAccountId +} + +func (b *BankFeedAccountRequest) GetTargetAccountId() *string { + if b == nil { + return nil + } + return b.TargetAccountId +} + +func (b *BankFeedAccountRequest) GetSourceAccountName() *string { + if b == nil { + return nil + } + return b.SourceAccountName +} + +func (b *BankFeedAccountRequest) GetSourceAccountNumber() *string { + if b == nil { + return nil + } + return b.SourceAccountNumber +} + +func (b *BankFeedAccountRequest) GetTargetAccountName() *string { + if b == nil { + return nil + } + return b.TargetAccountName +} + +func (b *BankFeedAccountRequest) GetCurrency() *BankFeedAccountRequestCurrency { + if b == nil { + return nil + } + return b.Currency +} + +func (b *BankFeedAccountRequest) GetFeedStatus() *BankFeedAccountRequestFeedStatus { + if b == nil { + return nil + } + return b.FeedStatus +} + +func (b *BankFeedAccountRequest) GetFeedStartDate() *time.Time { + if b == nil { + return nil + } + return b.FeedStartDate +} + +func (b *BankFeedAccountRequest) GetSourceAccountBalance() *float64 { + if b == nil { + return nil + } + return b.SourceAccountBalance +} + +func (b *BankFeedAccountRequest) GetAccountType() *BankFeedAccountRequestAccountType { + if b == nil { + return nil + } + return b.AccountType +} + +func (b *BankFeedAccountRequest) GetIntegrationParams() map[string]interface{} { + if b == nil { + return nil + } + return b.IntegrationParams +} + +func (b *BankFeedAccountRequest) GetLinkedAccountParams() map[string]interface{} { + if b == nil { + return nil + } + return b.LinkedAccountParams +} + +func (b *BankFeedAccountRequest) GetExtraProperties() map[string]interface{} { + return b.extraProperties +} + +func (b *BankFeedAccountRequest) UnmarshalJSON(data []byte) error { + type embed BankFeedAccountRequest + var unmarshaler = struct { + embed + FeedStartDate *internal.DateTime `json:"feed_start_date,omitempty"` + }{ + embed: embed(*b), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *b = BankFeedAccountRequest(unmarshaler.embed) + b.FeedStartDate = unmarshaler.FeedStartDate.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *b) + if err != nil { + return err + } + b.extraProperties = extraProperties + b.rawJSON = json.RawMessage(data) + return nil +} + +func (b *BankFeedAccountRequest) MarshalJSON() ([]byte, error) { + type embed BankFeedAccountRequest + var marshaler = struct { + embed + FeedStartDate *internal.DateTime `json:"feed_start_date,omitempty"` + }{ + embed: embed(*b), + FeedStartDate: internal.NewOptionalDateTime(b.FeedStartDate), + } + return json.Marshal(marshaler) +} + +func (b *BankFeedAccountRequest) String() string { + if len(b.rawJSON) > 0 { + if value, err := internal.StringifyJSON(b.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(b); err == nil { + return value + } + return fmt.Sprintf("%#v", b) +} + +// The type of the account. +// +// * `BANK` - BANK +// * `CREDIT_CARD` - CREDIT_CARD +type BankFeedAccountRequestAccountType struct { + BankFeedAccountAccountTypeEnum BankFeedAccountAccountTypeEnum + String string + + typ string +} + +func (b *BankFeedAccountRequestAccountType) GetBankFeedAccountAccountTypeEnum() BankFeedAccountAccountTypeEnum { + if b == nil { + return "" + } + return b.BankFeedAccountAccountTypeEnum +} + +func (b *BankFeedAccountRequestAccountType) GetString() string { + if b == nil { + return "" + } + return b.String +} + +func (b *BankFeedAccountRequestAccountType) UnmarshalJSON(data []byte) error { + var valueBankFeedAccountAccountTypeEnum BankFeedAccountAccountTypeEnum + if err := json.Unmarshal(data, &valueBankFeedAccountAccountTypeEnum); err == nil { + b.typ = "BankFeedAccountAccountTypeEnum" + b.BankFeedAccountAccountTypeEnum = valueBankFeedAccountAccountTypeEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + b.typ = "String" + b.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, b) +} + +func (b BankFeedAccountRequestAccountType) MarshalJSON() ([]byte, error) { + if b.typ == "BankFeedAccountAccountTypeEnum" || b.BankFeedAccountAccountTypeEnum != "" { + return json.Marshal(b.BankFeedAccountAccountTypeEnum) + } + if b.typ == "String" || b.String != "" { + return json.Marshal(b.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", b) +} + +type BankFeedAccountRequestAccountTypeVisitor interface { + VisitBankFeedAccountAccountTypeEnum(BankFeedAccountAccountTypeEnum) error + VisitString(string) error +} + +func (b *BankFeedAccountRequestAccountType) Accept(visitor BankFeedAccountRequestAccountTypeVisitor) error { + if b.typ == "BankFeedAccountAccountTypeEnum" || b.BankFeedAccountAccountTypeEnum != "" { + return visitor.VisitBankFeedAccountAccountTypeEnum(b.BankFeedAccountAccountTypeEnum) + } + if b.typ == "String" || b.String != "" { + return visitor.VisitString(b.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", b) +} + +// The currency code of the bank feed. +// +// * `XUA` - ADB Unit of Account +// * `AFN` - Afghan Afghani +// * `AFA` - Afghan Afghani (1927–2002) +// * `ALL` - Albanian Lek +// * `ALK` - Albanian Lek (1946–1965) +// * `DZD` - Algerian Dinar +// * `ADP` - Andorran Peseta +// * `AOA` - Angolan Kwanza +// * `AOK` - Angolan Kwanza (1977–1991) +// * `AON` - Angolan New Kwanza (1990–2000) +// * `AOR` - Angolan Readjusted Kwanza (1995–1999) +// * `ARA` - Argentine Austral +// * `ARS` - Argentine Peso +// * `ARM` - Argentine Peso (1881–1970) +// * `ARP` - Argentine Peso (1983–1985) +// * `ARL` - Argentine Peso Ley (1970–1983) +// * `AMD` - Armenian Dram +// * `AWG` - Aruban Florin +// * `AUD` - Australian Dollar +// * `ATS` - Austrian Schilling +// * `AZN` - Azerbaijani Manat +// * `AZM` - Azerbaijani Manat (1993–2006) +// * `BSD` - Bahamian Dollar +// * `BHD` - Bahraini Dinar +// * `BDT` - Bangladeshi Taka +// * `BBD` - Barbadian Dollar +// * `BYN` - Belarusian Ruble +// * `BYB` - Belarusian Ruble (1994–1999) +// * `BYR` - Belarusian Ruble (2000–2016) +// * `BEF` - Belgian Franc +// * `BEC` - Belgian Franc (convertible) +// * `BEL` - Belgian Franc (financial) +// * `BZD` - Belize Dollar +// * `BMD` - Bermudan Dollar +// * `BTN` - Bhutanese Ngultrum +// * `BOB` - Bolivian Boliviano +// * `BOL` - Bolivian Boliviano (1863–1963) +// * `BOV` - Bolivian Mvdol +// * `BOP` - Bolivian Peso +// * `BAM` - Bosnia-Herzegovina Convertible Mark +// * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) +// * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) +// * `BWP` - Botswanan Pula +// * `BRC` - Brazilian Cruzado (1986–1989) +// * `BRZ` - Brazilian Cruzeiro (1942–1967) +// * `BRE` - Brazilian Cruzeiro (1990–1993) +// * `BRR` - Brazilian Cruzeiro (1993–1994) +// * `BRN` - Brazilian New Cruzado (1989–1990) +// * `BRB` - Brazilian New Cruzeiro (1967–1986) +// * `BRL` - Brazilian Real +// * `GBP` - British Pound +// * `BND` - Brunei Dollar +// * `BGL` - Bulgarian Hard Lev +// * `BGN` - Bulgarian Lev +// * `BGO` - Bulgarian Lev (1879–1952) +// * `BGM` - Bulgarian Socialist Lev +// * `BUK` - Burmese Kyat +// * `BIF` - Burundian Franc +// * `XPF` - CFP Franc +// * `KHR` - Cambodian Riel +// * `CAD` - Canadian Dollar +// * `CVE` - Cape Verdean Escudo +// * `KYD` - Cayman Islands Dollar +// * `XAF` - Central African CFA Franc +// * `CLE` - Chilean Escudo +// * `CLP` - Chilean Peso +// * `CLF` - Chilean Unit of Account (UF) +// * `CNX` - Chinese People’s Bank Dollar +// * `CNY` - Chinese Yuan +// * `CNH` - Chinese Yuan (offshore) +// * `COP` - Colombian Peso +// * `COU` - Colombian Real Value Unit +// * `KMF` - Comorian Franc +// * `CDF` - Congolese Franc +// * `CRC` - Costa Rican Colón +// * `HRD` - Croatian Dinar +// * `HRK` - Croatian Kuna +// * `CUC` - Cuban Convertible Peso +// * `CUP` - Cuban Peso +// * `CYP` - Cypriot Pound +// * `CZK` - Czech Koruna +// * `CSK` - Czechoslovak Hard Koruna +// * `DKK` - Danish Krone +// * `DJF` - Djiboutian Franc +// * `DOP` - Dominican Peso +// * `NLG` - Dutch Guilder +// * `XCD` - East Caribbean Dollar +// * `DDM` - East German Mark +// * `ECS` - Ecuadorian Sucre +// * `ECV` - Ecuadorian Unit of Constant Value +// * `EGP` - Egyptian Pound +// * `GQE` - Equatorial Guinean Ekwele +// * `ERN` - Eritrean Nakfa +// * `EEK` - Estonian Kroon +// * `ETB` - Ethiopian Birr +// * `EUR` - Euro +// * `XBA` - European Composite Unit +// * `XEU` - European Currency Unit +// * `XBB` - European Monetary Unit +// * `XBC` - European Unit of Account (XBC) +// * `XBD` - European Unit of Account (XBD) +// * `FKP` - Falkland Islands Pound +// * `FJD` - Fijian Dollar +// * `FIM` - Finnish Markka +// * `FRF` - French Franc +// * `XFO` - French Gold Franc +// * `XFU` - French UIC-Franc +// * `GMD` - Gambian Dalasi +// * `GEK` - Georgian Kupon Larit +// * `GEL` - Georgian Lari +// * `DEM` - German Mark +// * `GHS` - Ghanaian Cedi +// * `GHC` - Ghanaian Cedi (1979–2007) +// * `GIP` - Gibraltar Pound +// * `XAU` - Gold +// * `GRD` - Greek Drachma +// * `GTQ` - Guatemalan Quetzal +// * `GWP` - Guinea-Bissau Peso +// * `GNF` - Guinean Franc +// * `GNS` - Guinean Syli +// * `GYD` - Guyanaese Dollar +// * `HTG` - Haitian Gourde +// * `HNL` - Honduran Lempira +// * `HKD` - Hong Kong Dollar +// * `HUF` - Hungarian Forint +// * `IMP` - IMP +// * `ISK` - Icelandic Króna +// * `ISJ` - Icelandic Króna (1918–1981) +// * `INR` - Indian Rupee +// * `IDR` - Indonesian Rupiah +// * `IRR` - Iranian Rial +// * `IQD` - Iraqi Dinar +// * `IEP` - Irish Pound +// * `ILS` - Israeli New Shekel +// * `ILP` - Israeli Pound +// * `ILR` - Israeli Shekel (1980–1985) +// * `ITL` - Italian Lira +// * `JMD` - Jamaican Dollar +// * `JPY` - Japanese Yen +// * `JOD` - Jordanian Dinar +// * `KZT` - Kazakhstani Tenge +// * `KES` - Kenyan Shilling +// * `KWD` - Kuwaiti Dinar +// * `KGS` - Kyrgystani Som +// * `LAK` - Laotian Kip +// * `LVL` - Latvian Lats +// * `LVR` - Latvian Ruble +// * `LBP` - Lebanese Pound +// * `LSL` - Lesotho Loti +// * `LRD` - Liberian Dollar +// * `LYD` - Libyan Dinar +// * `LTL` - Lithuanian Litas +// * `LTT` - Lithuanian Talonas +// * `LUL` - Luxembourg Financial Franc +// * `LUC` - Luxembourgian Convertible Franc +// * `LUF` - Luxembourgian Franc +// * `MOP` - Macanese Pataca +// * `MKD` - Macedonian Denar +// * `MKN` - Macedonian Denar (1992–1993) +// * `MGA` - Malagasy Ariary +// * `MGF` - Malagasy Franc +// * `MWK` - Malawian Kwacha +// * `MYR` - Malaysian Ringgit +// * `MVR` - Maldivian Rufiyaa +// * `MVP` - Maldivian Rupee (1947–1981) +// * `MLF` - Malian Franc +// * `MTL` - Maltese Lira +// * `MTP` - Maltese Pound +// * `MRU` - Mauritanian Ouguiya +// * `MRO` - Mauritanian Ouguiya (1973–2017) +// * `MUR` - Mauritian Rupee +// * `MXV` - Mexican Investment Unit +// * `MXN` - Mexican Peso +// * `MXP` - Mexican Silver Peso (1861–1992) +// * `MDC` - Moldovan Cupon +// * `MDL` - Moldovan Leu +// * `MCF` - Monegasque Franc +// * `MNT` - Mongolian Tugrik +// * `MAD` - Moroccan Dirham +// * `MAF` - Moroccan Franc +// * `MZE` - Mozambican Escudo +// * `MZN` - Mozambican Metical +// * `MZM` - Mozambican Metical (1980–2006) +// * `MMK` - Myanmar Kyat +// * `NAD` - Namibian Dollar +// * `NPR` - Nepalese Rupee +// * `ANG` - Netherlands Antillean Guilder +// * `TWD` - New Taiwan Dollar +// * `NZD` - New Zealand Dollar +// * `NIO` - Nicaraguan Córdoba +// * `NIC` - Nicaraguan Córdoba (1988–1991) +// * `NGN` - Nigerian Naira +// * `KPW` - North Korean Won +// * `NOK` - Norwegian Krone +// * `OMR` - Omani Rial +// * `PKR` - Pakistani Rupee +// * `XPD` - Palladium +// * `PAB` - Panamanian Balboa +// * `PGK` - Papua New Guinean Kina +// * `PYG` - Paraguayan Guarani +// * `PEI` - Peruvian Inti +// * `PEN` - Peruvian Sol +// * `PES` - Peruvian Sol (1863–1965) +// * `PHP` - Philippine Peso +// * `XPT` - Platinum +// * `PLN` - Polish Zloty +// * `PLZ` - Polish Zloty (1950–1995) +// * `PTE` - Portuguese Escudo +// * `GWE` - Portuguese Guinea Escudo +// * `QAR` - Qatari Rial +// * `XRE` - RINET Funds +// * `RHD` - Rhodesian Dollar +// * `RON` - Romanian Leu +// * `ROL` - Romanian Leu (1952–2006) +// * `RUB` - Russian Ruble +// * `RUR` - Russian Ruble (1991–1998) +// * `RWF` - Rwandan Franc +// * `SVC` - Salvadoran Colón +// * `WST` - Samoan Tala +// * `SAR` - Saudi Riyal +// * `RSD` - Serbian Dinar +// * `CSD` - Serbian Dinar (2002–2006) +// * `SCR` - Seychellois Rupee +// * `SLL` - Sierra Leonean Leone +// * `XAG` - Silver +// * `SGD` - Singapore Dollar +// * `SKK` - Slovak Koruna +// * `SIT` - Slovenian Tolar +// * `SBD` - Solomon Islands Dollar +// * `SOS` - Somali Shilling +// * `ZAR` - South African Rand +// * `ZAL` - South African Rand (financial) +// * `KRH` - South Korean Hwan (1953–1962) +// * `KRW` - South Korean Won +// * `KRO` - South Korean Won (1945–1953) +// * `SSP` - South Sudanese Pound +// * `SUR` - Soviet Rouble +// * `ESP` - Spanish Peseta +// * `ESA` - Spanish Peseta (A account) +// * `ESB` - Spanish Peseta (convertible account) +// * `XDR` - Special Drawing Rights +// * `LKR` - Sri Lankan Rupee +// * `SHP` - St. Helena Pound +// * `XSU` - Sucre +// * `SDD` - Sudanese Dinar (1992–2007) +// * `SDG` - Sudanese Pound +// * `SDP` - Sudanese Pound (1957–1998) +// * `SRD` - Surinamese Dollar +// * `SRG` - Surinamese Guilder +// * `SZL` - Swazi Lilangeni +// * `SEK` - Swedish Krona +// * `CHF` - Swiss Franc +// * `SYP` - Syrian Pound +// * `STN` - São Tomé & Príncipe Dobra +// * `STD` - São Tomé & Príncipe Dobra (1977–2017) +// * `TVD` - TVD +// * `TJR` - Tajikistani Ruble +// * `TJS` - Tajikistani Somoni +// * `TZS` - Tanzanian Shilling +// * `XTS` - Testing Currency Code +// * `THB` - Thai Baht +// * `XXX` - The codes assigned for transactions where no currency is involved +// * `TPE` - Timorese Escudo +// * `TOP` - Tongan Paʻanga +// * `TTD` - Trinidad & Tobago Dollar +// * `TND` - Tunisian Dinar +// * `TRY` - Turkish Lira +// * `TRL` - Turkish Lira (1922–2005) +// * `TMT` - Turkmenistani Manat +// * `TMM` - Turkmenistani Manat (1993–2009) +// * `USD` - US Dollar +// * `USN` - US Dollar (Next day) +// * `USS` - US Dollar (Same day) +// * `UGX` - Ugandan Shilling +// * `UGS` - Ugandan Shilling (1966–1987) +// * `UAH` - Ukrainian Hryvnia +// * `UAK` - Ukrainian Karbovanets +// * `AED` - United Arab Emirates Dirham +// * `UYW` - Uruguayan Nominal Wage Index Unit +// * `UYU` - Uruguayan Peso +// * `UYP` - Uruguayan Peso (1975–1993) +// * `UYI` - Uruguayan Peso (Indexed Units) +// * `UZS` - Uzbekistani Som +// * `VUV` - Vanuatu Vatu +// * `VES` - Venezuelan Bolívar +// * `VEB` - Venezuelan Bolívar (1871–2008) +// * `VEF` - Venezuelan Bolívar (2008–2018) +// * `VND` - Vietnamese Dong +// * `VNN` - Vietnamese Dong (1978–1985) +// * `CHE` - WIR Euro +// * `CHW` - WIR Franc +// * `XOF` - West African CFA Franc +// * `YDD` - Yemeni Dinar +// * `YER` - Yemeni Rial +// * `YUN` - Yugoslavian Convertible Dinar (1990–1992) +// * `YUD` - Yugoslavian Hard Dinar (1966–1990) +// * `YUM` - Yugoslavian New Dinar (1994–2002) +// * `YUR` - Yugoslavian Reformed Dinar (1992–1993) +// * `ZWN` - ZWN +// * `ZRN` - Zairean New Zaire (1993–1998) +// * `ZRZ` - Zairean Zaire (1971–1993) +// * `ZMW` - Zambian Kwacha +// * `ZMK` - Zambian Kwacha (1968–2012) +// * `ZWD` - Zimbabwean Dollar (1980–2008) +// * `ZWR` - Zimbabwean Dollar (2008) +// * `ZWL` - Zimbabwean Dollar (2009) +type BankFeedAccountRequestCurrency struct { + TransactionCurrencyEnum TransactionCurrencyEnum + String string + + typ string +} + +func (b *BankFeedAccountRequestCurrency) GetTransactionCurrencyEnum() TransactionCurrencyEnum { + if b == nil { + return "" + } + return b.TransactionCurrencyEnum +} + +func (b *BankFeedAccountRequestCurrency) GetString() string { + if b == nil { + return "" + } + return b.String +} + +func (b *BankFeedAccountRequestCurrency) UnmarshalJSON(data []byte) error { + var valueTransactionCurrencyEnum TransactionCurrencyEnum + if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { + b.typ = "TransactionCurrencyEnum" + b.TransactionCurrencyEnum = valueTransactionCurrencyEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + b.typ = "String" + b.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, b) +} + +func (b BankFeedAccountRequestCurrency) MarshalJSON() ([]byte, error) { + if b.typ == "TransactionCurrencyEnum" || b.TransactionCurrencyEnum != "" { + return json.Marshal(b.TransactionCurrencyEnum) + } + if b.typ == "String" || b.String != "" { + return json.Marshal(b.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", b) +} + +type BankFeedAccountRequestCurrencyVisitor interface { + VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error + VisitString(string) error +} + +func (b *BankFeedAccountRequestCurrency) Accept(visitor BankFeedAccountRequestCurrencyVisitor) error { + if b.typ == "TransactionCurrencyEnum" || b.TransactionCurrencyEnum != "" { + return visitor.VisitTransactionCurrencyEnum(b.TransactionCurrencyEnum) + } + if b.typ == "String" || b.String != "" { + return visitor.VisitString(b.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", b) +} + +// The status of the bank feed. +// +// * `ACTIVE` - ACTIVE +// * `INACTIVE` - INACTIVE +type BankFeedAccountRequestFeedStatus struct { + FeedStatusEnum FeedStatusEnum + String string + + typ string +} + +func (b *BankFeedAccountRequestFeedStatus) GetFeedStatusEnum() FeedStatusEnum { + if b == nil { + return "" + } + return b.FeedStatusEnum +} + +func (b *BankFeedAccountRequestFeedStatus) GetString() string { + if b == nil { + return "" + } + return b.String +} + +func (b *BankFeedAccountRequestFeedStatus) UnmarshalJSON(data []byte) error { + var valueFeedStatusEnum FeedStatusEnum + if err := json.Unmarshal(data, &valueFeedStatusEnum); err == nil { + b.typ = "FeedStatusEnum" + b.FeedStatusEnum = valueFeedStatusEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + b.typ = "String" + b.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, b) +} + +func (b BankFeedAccountRequestFeedStatus) MarshalJSON() ([]byte, error) { + if b.typ == "FeedStatusEnum" || b.FeedStatusEnum != "" { + return json.Marshal(b.FeedStatusEnum) + } + if b.typ == "String" || b.String != "" { + return json.Marshal(b.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", b) +} + +type BankFeedAccountRequestFeedStatusVisitor interface { + VisitFeedStatusEnum(FeedStatusEnum) error + VisitString(string) error +} + +func (b *BankFeedAccountRequestFeedStatus) Accept(visitor BankFeedAccountRequestFeedStatusVisitor) error { + if b.typ == "FeedStatusEnum" || b.FeedStatusEnum != "" { + return visitor.VisitFeedStatusEnum(b.FeedStatusEnum) + } + if b.typ == "String" || b.String != "" { + return visitor.VisitString(b.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", b) +} + +type BankFeedAccountResponse struct { + Model *BankFeedAccount `json:"model" url:"model"` + Warnings []*WarningValidationProblem `json:"warnings" url:"warnings"` + Errors []*ErrorValidationProblem `json:"errors" url:"errors"` + Logs []*DebugModeLog `json:"logs,omitempty" url:"logs,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (b *BankFeedAccountResponse) GetModel() *BankFeedAccount { + if b == nil { + return nil + } + return b.Model +} + +func (b *BankFeedAccountResponse) GetWarnings() []*WarningValidationProblem { + if b == nil { + return nil + } + return b.Warnings +} + +func (b *BankFeedAccountResponse) GetErrors() []*ErrorValidationProblem { + if b == nil { + return nil + } + return b.Errors +} + +func (b *BankFeedAccountResponse) GetLogs() []*DebugModeLog { + if b == nil { + return nil + } + return b.Logs +} + +func (b *BankFeedAccountResponse) GetExtraProperties() map[string]interface{} { + return b.extraProperties +} + +func (b *BankFeedAccountResponse) UnmarshalJSON(data []byte) error { + type unmarshaler BankFeedAccountResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *b = BankFeedAccountResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *b) + if err != nil { + return err + } + b.extraProperties = extraProperties + b.rawJSON = json.RawMessage(data) + return nil +} + +func (b *BankFeedAccountResponse) String() string { + if len(b.rawJSON) > 0 { + if value, err := internal.StringifyJSON(b.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(b); err == nil { + return value + } + return fmt.Sprintf("%#v", b) +} + +type PaginatedBankFeedAccountList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*BankFeedAccount `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedBankFeedAccountList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedBankFeedAccountList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedBankFeedAccountList) GetResults() []*BankFeedAccount { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedBankFeedAccountList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedBankFeedAccountList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedBankFeedAccountList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedBankFeedAccountList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedBankFeedAccountList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) } diff --git a/accounting/bank_feed_transactions.go b/accounting/bank_feed_transactions.go index 656739b..ec43a2f 100644 --- a/accounting/bank_feed_transactions.go +++ b/accounting/bank_feed_transactions.go @@ -1,49 +1,845 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package accounting import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type BankFeedTransactionEndpointRequest struct { // Whether to include debug fields (such as log file links) in the response. - IsDebugMode *bool `json:"-"` + IsDebugMode *bool `json:"-" url:"is_debug_mode,omitempty"` // Whether or not third-party updates should be run asynchronously. - RunAsync *bool `json:"-"` - Model *BankFeedTransactionRequestRequest `json:"model,omitempty"` + RunAsync *bool `json:"-" url:"run_async,omitempty"` + Model *BankFeedTransactionRequestRequest `json:"model,omitempty" url:"-"` } type BankFeedTransactionsListRequest struct { // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *string `json:"-"` + Expand []*string `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, will only return bank feed transactions with this is_processed value - IsProcessed *bool `json:"-"` + IsProcessed *bool `json:"-" url:"is_processed,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` } type BankFeedTransactionsRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *string `json:"-"` + Expand []*string `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` +} + +// # The BankFeedTransaction Object +// ### Description +// The `BankFeedTransaction` object is used to represent transactions linked to a bank feed account. This includes details about the transaction such as the date, amount, description, and type. +// +// ### Usage Example +// Fetch from the `GET BankFeedTransaction` endpoint to view details of a transaction associated with a bank feed account. +type BankFeedTransaction struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The bank feed account associated with the transaction. + BankFeedAccount *BankFeedTransactionBankFeedAccount `json:"bank_feed_account,omitempty" url:"bank_feed_account,omitempty"` + // The date that the transaction occurred. + TransactionDate *time.Time `json:"transaction_date,omitempty" url:"transaction_date,omitempty"` + // The date the transaction was posted to the bank account. + PostedDate *time.Time `json:"posted_date,omitempty" url:"posted_date,omitempty"` + // The amount of the transaction. + Amount *float64 `json:"amount,omitempty" url:"amount,omitempty"` + // The description of the transaction. + Description *string `json:"description,omitempty" url:"description,omitempty"` + // The underlying type of the transaction. + TransactionType *string `json:"transaction_type,omitempty" url:"transaction_type,omitempty"` + // The person or merchant who initiated the transaction, or alternatively, to whom the transaction was paid. + Payee *string `json:"payee,omitempty" url:"payee,omitempty"` + // If the transaction is of type debit or credit. + // + // * `CREDIT` - CREDIT + // * `DEBIT` - DEBIT + CreditOrDebit *BankFeedTransactionCreditOrDebit `json:"credit_or_debit,omitempty" url:"credit_or_debit,omitempty"` + // The customer’s identifier for the transaction. + SourceTransactionId *string `json:"source_transaction_id,omitempty" url:"source_transaction_id,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + // Whether or not this transaction has been processed by the external system. For example, NetSuite writes this field as True when the SuiteApp has processed the transaction. + IsProcessed *bool `json:"is_processed,omitempty" url:"is_processed,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (b *BankFeedTransaction) GetId() *string { + if b == nil { + return nil + } + return b.Id +} + +func (b *BankFeedTransaction) GetRemoteId() *string { + if b == nil { + return nil + } + return b.RemoteId +} + +func (b *BankFeedTransaction) GetCreatedAt() *time.Time { + if b == nil { + return nil + } + return b.CreatedAt +} + +func (b *BankFeedTransaction) GetModifiedAt() *time.Time { + if b == nil { + return nil + } + return b.ModifiedAt +} + +func (b *BankFeedTransaction) GetBankFeedAccount() *BankFeedTransactionBankFeedAccount { + if b == nil { + return nil + } + return b.BankFeedAccount +} + +func (b *BankFeedTransaction) GetTransactionDate() *time.Time { + if b == nil { + return nil + } + return b.TransactionDate +} + +func (b *BankFeedTransaction) GetPostedDate() *time.Time { + if b == nil { + return nil + } + return b.PostedDate +} + +func (b *BankFeedTransaction) GetAmount() *float64 { + if b == nil { + return nil + } + return b.Amount +} + +func (b *BankFeedTransaction) GetDescription() *string { + if b == nil { + return nil + } + return b.Description +} + +func (b *BankFeedTransaction) GetTransactionType() *string { + if b == nil { + return nil + } + return b.TransactionType +} + +func (b *BankFeedTransaction) GetPayee() *string { + if b == nil { + return nil + } + return b.Payee +} + +func (b *BankFeedTransaction) GetCreditOrDebit() *BankFeedTransactionCreditOrDebit { + if b == nil { + return nil + } + return b.CreditOrDebit +} + +func (b *BankFeedTransaction) GetSourceTransactionId() *string { + if b == nil { + return nil + } + return b.SourceTransactionId +} + +func (b *BankFeedTransaction) GetRemoteWasDeleted() *bool { + if b == nil { + return nil + } + return b.RemoteWasDeleted +} + +func (b *BankFeedTransaction) GetIsProcessed() *bool { + if b == nil { + return nil + } + return b.IsProcessed +} + +func (b *BankFeedTransaction) GetExtraProperties() map[string]interface{} { + return b.extraProperties +} + +func (b *BankFeedTransaction) UnmarshalJSON(data []byte) error { + type embed BankFeedTransaction + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + TransactionDate *internal.DateTime `json:"transaction_date,omitempty"` + PostedDate *internal.DateTime `json:"posted_date,omitempty"` + }{ + embed: embed(*b), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *b = BankFeedTransaction(unmarshaler.embed) + b.CreatedAt = unmarshaler.CreatedAt.TimePtr() + b.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + b.TransactionDate = unmarshaler.TransactionDate.TimePtr() + b.PostedDate = unmarshaler.PostedDate.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *b) + if err != nil { + return err + } + b.extraProperties = extraProperties + b.rawJSON = json.RawMessage(data) + return nil +} + +func (b *BankFeedTransaction) MarshalJSON() ([]byte, error) { + type embed BankFeedTransaction + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + TransactionDate *internal.DateTime `json:"transaction_date,omitempty"` + PostedDate *internal.DateTime `json:"posted_date,omitempty"` + }{ + embed: embed(*b), + CreatedAt: internal.NewOptionalDateTime(b.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(b.ModifiedAt), + TransactionDate: internal.NewOptionalDateTime(b.TransactionDate), + PostedDate: internal.NewOptionalDateTime(b.PostedDate), + } + return json.Marshal(marshaler) +} + +func (b *BankFeedTransaction) String() string { + if len(b.rawJSON) > 0 { + if value, err := internal.StringifyJSON(b.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(b); err == nil { + return value + } + return fmt.Sprintf("%#v", b) +} + +// The bank feed account associated with the transaction. +type BankFeedTransactionBankFeedAccount struct { + String string + BankFeedAccount *BankFeedAccount + + typ string +} + +func (b *BankFeedTransactionBankFeedAccount) GetString() string { + if b == nil { + return "" + } + return b.String +} + +func (b *BankFeedTransactionBankFeedAccount) GetBankFeedAccount() *BankFeedAccount { + if b == nil { + return nil + } + return b.BankFeedAccount +} + +func (b *BankFeedTransactionBankFeedAccount) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + b.typ = "String" + b.String = valueString + return nil + } + valueBankFeedAccount := new(BankFeedAccount) + if err := json.Unmarshal(data, &valueBankFeedAccount); err == nil { + b.typ = "BankFeedAccount" + b.BankFeedAccount = valueBankFeedAccount + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, b) +} + +func (b BankFeedTransactionBankFeedAccount) MarshalJSON() ([]byte, error) { + if b.typ == "String" || b.String != "" { + return json.Marshal(b.String) + } + if b.typ == "BankFeedAccount" || b.BankFeedAccount != nil { + return json.Marshal(b.BankFeedAccount) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", b) +} + +type BankFeedTransactionBankFeedAccountVisitor interface { + VisitString(string) error + VisitBankFeedAccount(*BankFeedAccount) error +} + +func (b *BankFeedTransactionBankFeedAccount) Accept(visitor BankFeedTransactionBankFeedAccountVisitor) error { + if b.typ == "String" || b.String != "" { + return visitor.VisitString(b.String) + } + if b.typ == "BankFeedAccount" || b.BankFeedAccount != nil { + return visitor.VisitBankFeedAccount(b.BankFeedAccount) + } + return fmt.Errorf("type %T does not include a non-empty union type", b) +} + +// If the transaction is of type debit or credit. +// +// * `CREDIT` - CREDIT +// * `DEBIT` - DEBIT +type BankFeedTransactionCreditOrDebit struct { + CreditOrDebitEnum CreditOrDebitEnum + String string + + typ string +} + +func (b *BankFeedTransactionCreditOrDebit) GetCreditOrDebitEnum() CreditOrDebitEnum { + if b == nil { + return "" + } + return b.CreditOrDebitEnum +} + +func (b *BankFeedTransactionCreditOrDebit) GetString() string { + if b == nil { + return "" + } + return b.String +} + +func (b *BankFeedTransactionCreditOrDebit) UnmarshalJSON(data []byte) error { + var valueCreditOrDebitEnum CreditOrDebitEnum + if err := json.Unmarshal(data, &valueCreditOrDebitEnum); err == nil { + b.typ = "CreditOrDebitEnum" + b.CreditOrDebitEnum = valueCreditOrDebitEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + b.typ = "String" + b.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, b) +} + +func (b BankFeedTransactionCreditOrDebit) MarshalJSON() ([]byte, error) { + if b.typ == "CreditOrDebitEnum" || b.CreditOrDebitEnum != "" { + return json.Marshal(b.CreditOrDebitEnum) + } + if b.typ == "String" || b.String != "" { + return json.Marshal(b.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", b) +} + +type BankFeedTransactionCreditOrDebitVisitor interface { + VisitCreditOrDebitEnum(CreditOrDebitEnum) error + VisitString(string) error +} + +func (b *BankFeedTransactionCreditOrDebit) Accept(visitor BankFeedTransactionCreditOrDebitVisitor) error { + if b.typ == "CreditOrDebitEnum" || b.CreditOrDebitEnum != "" { + return visitor.VisitCreditOrDebitEnum(b.CreditOrDebitEnum) + } + if b.typ == "String" || b.String != "" { + return visitor.VisitString(b.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", b) +} + +// # The BankFeedTransaction Object +// ### Description +// The `BankFeedTransaction` object is used to represent transactions linked to a bank feed account. This includes details about the transaction such as the date, amount, description, and type. +// +// ### Usage Example +// Fetch from the `GET BankFeedTransaction` endpoint to view details of a transaction associated with a bank feed account. +type BankFeedTransactionRequestRequest struct { + // The bank feed account associated with the transaction. + BankFeedAccount *BankFeedTransactionRequestRequestBankFeedAccount `json:"bank_feed_account,omitempty" url:"bank_feed_account,omitempty"` + // The date that the transaction occurred. + TransactionDate *time.Time `json:"transaction_date,omitempty" url:"transaction_date,omitempty"` + // The date the transaction was posted to the bank account. + PostedDate *time.Time `json:"posted_date,omitempty" url:"posted_date,omitempty"` + // The amount of the transaction. + Amount *float64 `json:"amount,omitempty" url:"amount,omitempty"` + // The description of the transaction. + Description *string `json:"description,omitempty" url:"description,omitempty"` + // The underlying type of the transaction. + TransactionType *string `json:"transaction_type,omitempty" url:"transaction_type,omitempty"` + // The person or merchant who initiated the transaction, or alternatively, to whom the transaction was paid. + Payee *string `json:"payee,omitempty" url:"payee,omitempty"` + // If the transaction is of type debit or credit. + // + // * `CREDIT` - CREDIT + // * `DEBIT` - DEBIT + CreditOrDebit *BankFeedTransactionRequestRequestCreditOrDebit `json:"credit_or_debit,omitempty" url:"credit_or_debit,omitempty"` + // The customer’s identifier for the transaction. + SourceTransactionId *string `json:"source_transaction_id,omitempty" url:"source_transaction_id,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (b *BankFeedTransactionRequestRequest) GetBankFeedAccount() *BankFeedTransactionRequestRequestBankFeedAccount { + if b == nil { + return nil + } + return b.BankFeedAccount +} + +func (b *BankFeedTransactionRequestRequest) GetTransactionDate() *time.Time { + if b == nil { + return nil + } + return b.TransactionDate +} + +func (b *BankFeedTransactionRequestRequest) GetPostedDate() *time.Time { + if b == nil { + return nil + } + return b.PostedDate +} + +func (b *BankFeedTransactionRequestRequest) GetAmount() *float64 { + if b == nil { + return nil + } + return b.Amount +} + +func (b *BankFeedTransactionRequestRequest) GetDescription() *string { + if b == nil { + return nil + } + return b.Description +} + +func (b *BankFeedTransactionRequestRequest) GetTransactionType() *string { + if b == nil { + return nil + } + return b.TransactionType +} + +func (b *BankFeedTransactionRequestRequest) GetPayee() *string { + if b == nil { + return nil + } + return b.Payee +} + +func (b *BankFeedTransactionRequestRequest) GetCreditOrDebit() *BankFeedTransactionRequestRequestCreditOrDebit { + if b == nil { + return nil + } + return b.CreditOrDebit +} + +func (b *BankFeedTransactionRequestRequest) GetSourceTransactionId() *string { + if b == nil { + return nil + } + return b.SourceTransactionId +} + +func (b *BankFeedTransactionRequestRequest) GetIntegrationParams() map[string]interface{} { + if b == nil { + return nil + } + return b.IntegrationParams +} + +func (b *BankFeedTransactionRequestRequest) GetLinkedAccountParams() map[string]interface{} { + if b == nil { + return nil + } + return b.LinkedAccountParams +} + +func (b *BankFeedTransactionRequestRequest) GetExtraProperties() map[string]interface{} { + return b.extraProperties +} + +func (b *BankFeedTransactionRequestRequest) UnmarshalJSON(data []byte) error { + type embed BankFeedTransactionRequestRequest + var unmarshaler = struct { + embed + TransactionDate *internal.DateTime `json:"transaction_date,omitempty"` + PostedDate *internal.DateTime `json:"posted_date,omitempty"` + }{ + embed: embed(*b), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *b = BankFeedTransactionRequestRequest(unmarshaler.embed) + b.TransactionDate = unmarshaler.TransactionDate.TimePtr() + b.PostedDate = unmarshaler.PostedDate.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *b) + if err != nil { + return err + } + b.extraProperties = extraProperties + b.rawJSON = json.RawMessage(data) + return nil +} + +func (b *BankFeedTransactionRequestRequest) MarshalJSON() ([]byte, error) { + type embed BankFeedTransactionRequestRequest + var marshaler = struct { + embed + TransactionDate *internal.DateTime `json:"transaction_date,omitempty"` + PostedDate *internal.DateTime `json:"posted_date,omitempty"` + }{ + embed: embed(*b), + TransactionDate: internal.NewOptionalDateTime(b.TransactionDate), + PostedDate: internal.NewOptionalDateTime(b.PostedDate), + } + return json.Marshal(marshaler) +} + +func (b *BankFeedTransactionRequestRequest) String() string { + if len(b.rawJSON) > 0 { + if value, err := internal.StringifyJSON(b.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(b); err == nil { + return value + } + return fmt.Sprintf("%#v", b) +} + +// The bank feed account associated with the transaction. +type BankFeedTransactionRequestRequestBankFeedAccount struct { + String string + BankFeedAccount *BankFeedAccount + + typ string +} + +func (b *BankFeedTransactionRequestRequestBankFeedAccount) GetString() string { + if b == nil { + return "" + } + return b.String +} + +func (b *BankFeedTransactionRequestRequestBankFeedAccount) GetBankFeedAccount() *BankFeedAccount { + if b == nil { + return nil + } + return b.BankFeedAccount +} + +func (b *BankFeedTransactionRequestRequestBankFeedAccount) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + b.typ = "String" + b.String = valueString + return nil + } + valueBankFeedAccount := new(BankFeedAccount) + if err := json.Unmarshal(data, &valueBankFeedAccount); err == nil { + b.typ = "BankFeedAccount" + b.BankFeedAccount = valueBankFeedAccount + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, b) +} + +func (b BankFeedTransactionRequestRequestBankFeedAccount) MarshalJSON() ([]byte, error) { + if b.typ == "String" || b.String != "" { + return json.Marshal(b.String) + } + if b.typ == "BankFeedAccount" || b.BankFeedAccount != nil { + return json.Marshal(b.BankFeedAccount) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", b) +} + +type BankFeedTransactionRequestRequestBankFeedAccountVisitor interface { + VisitString(string) error + VisitBankFeedAccount(*BankFeedAccount) error +} + +func (b *BankFeedTransactionRequestRequestBankFeedAccount) Accept(visitor BankFeedTransactionRequestRequestBankFeedAccountVisitor) error { + if b.typ == "String" || b.String != "" { + return visitor.VisitString(b.String) + } + if b.typ == "BankFeedAccount" || b.BankFeedAccount != nil { + return visitor.VisitBankFeedAccount(b.BankFeedAccount) + } + return fmt.Errorf("type %T does not include a non-empty union type", b) +} + +// If the transaction is of type debit or credit. +// +// * `CREDIT` - CREDIT +// * `DEBIT` - DEBIT +type BankFeedTransactionRequestRequestCreditOrDebit struct { + CreditOrDebitEnum CreditOrDebitEnum + String string + + typ string +} + +func (b *BankFeedTransactionRequestRequestCreditOrDebit) GetCreditOrDebitEnum() CreditOrDebitEnum { + if b == nil { + return "" + } + return b.CreditOrDebitEnum +} + +func (b *BankFeedTransactionRequestRequestCreditOrDebit) GetString() string { + if b == nil { + return "" + } + return b.String +} + +func (b *BankFeedTransactionRequestRequestCreditOrDebit) UnmarshalJSON(data []byte) error { + var valueCreditOrDebitEnum CreditOrDebitEnum + if err := json.Unmarshal(data, &valueCreditOrDebitEnum); err == nil { + b.typ = "CreditOrDebitEnum" + b.CreditOrDebitEnum = valueCreditOrDebitEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + b.typ = "String" + b.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, b) +} + +func (b BankFeedTransactionRequestRequestCreditOrDebit) MarshalJSON() ([]byte, error) { + if b.typ == "CreditOrDebitEnum" || b.CreditOrDebitEnum != "" { + return json.Marshal(b.CreditOrDebitEnum) + } + if b.typ == "String" || b.String != "" { + return json.Marshal(b.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", b) +} + +type BankFeedTransactionRequestRequestCreditOrDebitVisitor interface { + VisitCreditOrDebitEnum(CreditOrDebitEnum) error + VisitString(string) error +} + +func (b *BankFeedTransactionRequestRequestCreditOrDebit) Accept(visitor BankFeedTransactionRequestRequestCreditOrDebitVisitor) error { + if b.typ == "CreditOrDebitEnum" || b.CreditOrDebitEnum != "" { + return visitor.VisitCreditOrDebitEnum(b.CreditOrDebitEnum) + } + if b.typ == "String" || b.String != "" { + return visitor.VisitString(b.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", b) +} + +type BankFeedTransactionResponse struct { + Model *BankFeedTransaction `json:"model" url:"model"` + Warnings []*WarningValidationProblem `json:"warnings" url:"warnings"` + Errors []*ErrorValidationProblem `json:"errors" url:"errors"` + Logs []*DebugModeLog `json:"logs,omitempty" url:"logs,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (b *BankFeedTransactionResponse) GetModel() *BankFeedTransaction { + if b == nil { + return nil + } + return b.Model +} + +func (b *BankFeedTransactionResponse) GetWarnings() []*WarningValidationProblem { + if b == nil { + return nil + } + return b.Warnings +} + +func (b *BankFeedTransactionResponse) GetErrors() []*ErrorValidationProblem { + if b == nil { + return nil + } + return b.Errors +} + +func (b *BankFeedTransactionResponse) GetLogs() []*DebugModeLog { + if b == nil { + return nil + } + return b.Logs +} + +func (b *BankFeedTransactionResponse) GetExtraProperties() map[string]interface{} { + return b.extraProperties +} + +func (b *BankFeedTransactionResponse) UnmarshalJSON(data []byte) error { + type unmarshaler BankFeedTransactionResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *b = BankFeedTransactionResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *b) + if err != nil { + return err + } + b.extraProperties = extraProperties + b.rawJSON = json.RawMessage(data) + return nil +} + +func (b *BankFeedTransactionResponse) String() string { + if len(b.rawJSON) > 0 { + if value, err := internal.StringifyJSON(b.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(b); err == nil { + return value + } + return fmt.Sprintf("%#v", b) +} + +// * `CREDIT` - CREDIT +// * `DEBIT` - DEBIT +type CreditOrDebitEnum string + +const ( + CreditOrDebitEnumCredit CreditOrDebitEnum = "CREDIT" + CreditOrDebitEnumDebit CreditOrDebitEnum = "DEBIT" +) + +func NewCreditOrDebitEnumFromString(s string) (CreditOrDebitEnum, error) { + switch s { + case "CREDIT": + return CreditOrDebitEnumCredit, nil + case "DEBIT": + return CreditOrDebitEnumDebit, nil + } + var t CreditOrDebitEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (c CreditOrDebitEnum) Ptr() *CreditOrDebitEnum { + return &c +} + +type PaginatedBankFeedTransactionList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*BankFeedTransaction `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedBankFeedTransactionList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedBankFeedTransactionList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedBankFeedTransactionList) GetResults() []*BankFeedTransaction { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedBankFeedTransactionList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedBankFeedTransactionList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedBankFeedTransactionList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedBankFeedTransactionList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedBankFeedTransactionList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) } diff --git a/accounting/bankfeedaccounts/client.go b/accounting/bankfeedaccounts/client.go index 549f7ae..40c8748 100644 --- a/accounting/bankfeedaccounts/client.go +++ b/accounting/bankfeedaccounts/client.go @@ -1,105 +1,135 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package bankfeedaccounts import ( context "context" fmt "fmt" - accounting "github.com/merge-api/merge-go-client/accounting" - core "github.com/merge-api/merge-go-client/core" + accounting "github.com/merge-api/merge-go-client/v2/accounting" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `BankFeedAccount` objects. -func (c *Client) List(ctx context.Context, request *accounting.BankFeedAccountsListRequest) (*accounting.PaginatedBankFeedAccountList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/bank-feed-accounts" - - queryParams := make(url.Values) - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *accounting.PaginatedBankFeedAccountList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *accounting.BankFeedAccountsListRequest, + opts ...option.RequestOption, +) (*core.Page[*accounting.BankFeedAccount], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/bank-feed-accounts" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *accounting.PaginatedBankFeedAccountList) *internal.PageResponse[*string, *accounting.BankFeedAccount] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *accounting.BankFeedAccount]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Creates a `BankFeedAccount` object with the given values. -func (c *Client) Create(ctx context.Context, request *accounting.BankFeedAccountEndpointRequest) (*accounting.BankFeedAccountResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/bank-feed-accounts" - - queryParams := make(url.Values) - if request.IsDebugMode != nil { - queryParams.Add("is_debug_mode", fmt.Sprintf("%v", *request.IsDebugMode)) - } - if request.RunAsync != nil { - queryParams.Add("run_async", fmt.Sprintf("%v", *request.RunAsync)) +func (c *Client) Create( + ctx context.Context, + request *accounting.BankFeedAccountEndpointRequest, + opts ...option.RequestOption, +) (*accounting.BankFeedAccountResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/bank-feed-accounts" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *accounting.BankFeedAccountResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -108,29 +138,46 @@ func (c *Client) Create(ctx context.Context, request *accounting.BankFeedAccount } // Returns a `BankFeedAccount` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *accounting.BankFeedAccountsRetrieveRequest) (*accounting.BankFeedAccount, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"accounting/v1/bank-feed-accounts/%v", id) - - queryParams := make(url.Values) - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *accounting.BankFeedAccountsRetrieveRequest, + opts ...option.RequestOption, +) (*accounting.BankFeedAccount, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/accounting/v1/bank-feed-accounts/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *accounting.BankFeedAccount if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -139,21 +186,34 @@ func (c *Client) Retrieve(ctx context.Context, id string, request *accounting.Ba } // Returns metadata for `BankFeedAccount` POSTs. -func (c *Client) MetaPostRetrieve(ctx context.Context) (*accounting.MetaResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/bank-feed-accounts/meta/post" +func (c *Client) MetaPostRetrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*accounting.MetaResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/bank-feed-accounts/meta/post" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *accounting.MetaResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/accounting/bankfeedtransactions/client.go b/accounting/bankfeedtransactions/client.go index 6c44996..510ac96 100644 --- a/accounting/bankfeedtransactions/client.go +++ b/accounting/bankfeedtransactions/client.go @@ -1,127 +1,135 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package bankfeedtransactions import ( context "context" fmt "fmt" - accounting "github.com/merge-api/merge-go-client/accounting" - core "github.com/merge-api/merge-go-client/core" + accounting "github.com/merge-api/merge-go-client/v2/accounting" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `BankFeedTransaction` objects. -func (c *Client) List(ctx context.Context, request *accounting.BankFeedTransactionsListRequest) (*accounting.PaginatedBankFeedTransactionList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/bank-feed-transactions" - - queryParams := make(url.Values) - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.IsProcessed != nil { - queryParams.Add("is_processed", fmt.Sprintf("%v", *request.IsProcessed)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *accounting.PaginatedBankFeedTransactionList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *accounting.BankFeedTransactionsListRequest, + opts ...option.RequestOption, +) (*core.Page[*accounting.BankFeedTransaction], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/bank-feed-transactions" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *accounting.PaginatedBankFeedTransactionList) *internal.PageResponse[*string, *accounting.BankFeedTransaction] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *accounting.BankFeedTransaction]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Creates a `BankFeedTransaction` object with the given values. -func (c *Client) Create(ctx context.Context, request *accounting.BankFeedTransactionEndpointRequest) (*accounting.BankFeedTransactionResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/bank-feed-transactions" - - queryParams := make(url.Values) - if request.IsDebugMode != nil { - queryParams.Add("is_debug_mode", fmt.Sprintf("%v", *request.IsDebugMode)) - } - if request.RunAsync != nil { - queryParams.Add("run_async", fmt.Sprintf("%v", *request.RunAsync)) +func (c *Client) Create( + ctx context.Context, + request *accounting.BankFeedTransactionEndpointRequest, + opts ...option.RequestOption, +) (*accounting.BankFeedTransactionResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/bank-feed-transactions" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *accounting.BankFeedTransactionResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -130,32 +138,46 @@ func (c *Client) Create(ctx context.Context, request *accounting.BankFeedTransac } // Returns a `BankFeedTransaction` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *accounting.BankFeedTransactionsRetrieveRequest) (*accounting.BankFeedTransaction, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"accounting/v1/bank-feed-transactions/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *accounting.BankFeedTransactionsRetrieveRequest, + opts ...option.RequestOption, +) (*accounting.BankFeedTransaction, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/accounting/v1/bank-feed-transactions/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *accounting.BankFeedTransaction if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -164,21 +186,34 @@ func (c *Client) Retrieve(ctx context.Context, id string, request *accounting.Ba } // Returns metadata for `BankFeedTransaction` POSTs. -func (c *Client) MetaPostRetrieve(ctx context.Context) (*accounting.MetaResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/bank-feed-transactions/meta/post" +func (c *Client) MetaPostRetrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*accounting.MetaResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/bank-feed-transactions/meta/post" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *accounting.MetaResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/accounting/cash_flow_statements.go b/accounting/cash_flow_statements.go index a78d0cb..634ddfe 100644 --- a/accounting/cash_flow_statements.go +++ b/accounting/cash_flow_statements.go @@ -1,41 +1,1082 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package accounting import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type CashFlowStatementsListRequest struct { // If provided, will only return cash flow statements for this company. - CompanyId *string `json:"-"` + CompanyId *string `json:"-" url:"company_id,omitempty"` // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *string `json:"-"` + Expand []*string `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` } type CashFlowStatementsRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *string `json:"-"` + Expand []*string `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` +} + +// # The CashFlowStatement Object +// ### Description +// The `CashFlowStatement` object shows operating activities, investing activities, and financing activities over a period of time (month, quarter, or year). +// +// ### Usage Example +// Fetch from the `LIST CashFlowStatements` endpoint and view a company's cash flow statements. +type CashFlowStatement struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The cash flow statement's name. + Name *string `json:"name,omitempty" url:"name,omitempty"` + // The cash flow statement's currency. + // + // * `XUA` - ADB Unit of Account + // * `AFN` - Afghan Afghani + // * `AFA` - Afghan Afghani (1927–2002) + // * `ALL` - Albanian Lek + // * `ALK` - Albanian Lek (1946–1965) + // * `DZD` - Algerian Dinar + // * `ADP` - Andorran Peseta + // * `AOA` - Angolan Kwanza + // * `AOK` - Angolan Kwanza (1977–1991) + // * `AON` - Angolan New Kwanza (1990–2000) + // * `AOR` - Angolan Readjusted Kwanza (1995–1999) + // * `ARA` - Argentine Austral + // * `ARS` - Argentine Peso + // * `ARM` - Argentine Peso (1881–1970) + // * `ARP` - Argentine Peso (1983–1985) + // * `ARL` - Argentine Peso Ley (1970–1983) + // * `AMD` - Armenian Dram + // * `AWG` - Aruban Florin + // * `AUD` - Australian Dollar + // * `ATS` - Austrian Schilling + // * `AZN` - Azerbaijani Manat + // * `AZM` - Azerbaijani Manat (1993–2006) + // * `BSD` - Bahamian Dollar + // * `BHD` - Bahraini Dinar + // * `BDT` - Bangladeshi Taka + // * `BBD` - Barbadian Dollar + // * `BYN` - Belarusian Ruble + // * `BYB` - Belarusian Ruble (1994–1999) + // * `BYR` - Belarusian Ruble (2000–2016) + // * `BEF` - Belgian Franc + // * `BEC` - Belgian Franc (convertible) + // * `BEL` - Belgian Franc (financial) + // * `BZD` - Belize Dollar + // * `BMD` - Bermudan Dollar + // * `BTN` - Bhutanese Ngultrum + // * `BOB` - Bolivian Boliviano + // * `BOL` - Bolivian Boliviano (1863–1963) + // * `BOV` - Bolivian Mvdol + // * `BOP` - Bolivian Peso + // * `BAM` - Bosnia-Herzegovina Convertible Mark + // * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + // * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + // * `BWP` - Botswanan Pula + // * `BRC` - Brazilian Cruzado (1986–1989) + // * `BRZ` - Brazilian Cruzeiro (1942–1967) + // * `BRE` - Brazilian Cruzeiro (1990–1993) + // * `BRR` - Brazilian Cruzeiro (1993–1994) + // * `BRN` - Brazilian New Cruzado (1989–1990) + // * `BRB` - Brazilian New Cruzeiro (1967–1986) + // * `BRL` - Brazilian Real + // * `GBP` - British Pound + // * `BND` - Brunei Dollar + // * `BGL` - Bulgarian Hard Lev + // * `BGN` - Bulgarian Lev + // * `BGO` - Bulgarian Lev (1879–1952) + // * `BGM` - Bulgarian Socialist Lev + // * `BUK` - Burmese Kyat + // * `BIF` - Burundian Franc + // * `XPF` - CFP Franc + // * `KHR` - Cambodian Riel + // * `CAD` - Canadian Dollar + // * `CVE` - Cape Verdean Escudo + // * `KYD` - Cayman Islands Dollar + // * `XAF` - Central African CFA Franc + // * `CLE` - Chilean Escudo + // * `CLP` - Chilean Peso + // * `CLF` - Chilean Unit of Account (UF) + // * `CNX` - Chinese People’s Bank Dollar + // * `CNY` - Chinese Yuan + // * `CNH` - Chinese Yuan (offshore) + // * `COP` - Colombian Peso + // * `COU` - Colombian Real Value Unit + // * `KMF` - Comorian Franc + // * `CDF` - Congolese Franc + // * `CRC` - Costa Rican Colón + // * `HRD` - Croatian Dinar + // * `HRK` - Croatian Kuna + // * `CUC` - Cuban Convertible Peso + // * `CUP` - Cuban Peso + // * `CYP` - Cypriot Pound + // * `CZK` - Czech Koruna + // * `CSK` - Czechoslovak Hard Koruna + // * `DKK` - Danish Krone + // * `DJF` - Djiboutian Franc + // * `DOP` - Dominican Peso + // * `NLG` - Dutch Guilder + // * `XCD` - East Caribbean Dollar + // * `DDM` - East German Mark + // * `ECS` - Ecuadorian Sucre + // * `ECV` - Ecuadorian Unit of Constant Value + // * `EGP` - Egyptian Pound + // * `GQE` - Equatorial Guinean Ekwele + // * `ERN` - Eritrean Nakfa + // * `EEK` - Estonian Kroon + // * `ETB` - Ethiopian Birr + // * `EUR` - Euro + // * `XBA` - European Composite Unit + // * `XEU` - European Currency Unit + // * `XBB` - European Monetary Unit + // * `XBC` - European Unit of Account (XBC) + // * `XBD` - European Unit of Account (XBD) + // * `FKP` - Falkland Islands Pound + // * `FJD` - Fijian Dollar + // * `FIM` - Finnish Markka + // * `FRF` - French Franc + // * `XFO` - French Gold Franc + // * `XFU` - French UIC-Franc + // * `GMD` - Gambian Dalasi + // * `GEK` - Georgian Kupon Larit + // * `GEL` - Georgian Lari + // * `DEM` - German Mark + // * `GHS` - Ghanaian Cedi + // * `GHC` - Ghanaian Cedi (1979–2007) + // * `GIP` - Gibraltar Pound + // * `XAU` - Gold + // * `GRD` - Greek Drachma + // * `GTQ` - Guatemalan Quetzal + // * `GWP` - Guinea-Bissau Peso + // * `GNF` - Guinean Franc + // * `GNS` - Guinean Syli + // * `GYD` - Guyanaese Dollar + // * `HTG` - Haitian Gourde + // * `HNL` - Honduran Lempira + // * `HKD` - Hong Kong Dollar + // * `HUF` - Hungarian Forint + // * `IMP` - IMP + // * `ISK` - Icelandic Króna + // * `ISJ` - Icelandic Króna (1918–1981) + // * `INR` - Indian Rupee + // * `IDR` - Indonesian Rupiah + // * `IRR` - Iranian Rial + // * `IQD` - Iraqi Dinar + // * `IEP` - Irish Pound + // * `ILS` - Israeli New Shekel + // * `ILP` - Israeli Pound + // * `ILR` - Israeli Shekel (1980–1985) + // * `ITL` - Italian Lira + // * `JMD` - Jamaican Dollar + // * `JPY` - Japanese Yen + // * `JOD` - Jordanian Dinar + // * `KZT` - Kazakhstani Tenge + // * `KES` - Kenyan Shilling + // * `KWD` - Kuwaiti Dinar + // * `KGS` - Kyrgystani Som + // * `LAK` - Laotian Kip + // * `LVL` - Latvian Lats + // * `LVR` - Latvian Ruble + // * `LBP` - Lebanese Pound + // * `LSL` - Lesotho Loti + // * `LRD` - Liberian Dollar + // * `LYD` - Libyan Dinar + // * `LTL` - Lithuanian Litas + // * `LTT` - Lithuanian Talonas + // * `LUL` - Luxembourg Financial Franc + // * `LUC` - Luxembourgian Convertible Franc + // * `LUF` - Luxembourgian Franc + // * `MOP` - Macanese Pataca + // * `MKD` - Macedonian Denar + // * `MKN` - Macedonian Denar (1992–1993) + // * `MGA` - Malagasy Ariary + // * `MGF` - Malagasy Franc + // * `MWK` - Malawian Kwacha + // * `MYR` - Malaysian Ringgit + // * `MVR` - Maldivian Rufiyaa + // * `MVP` - Maldivian Rupee (1947–1981) + // * `MLF` - Malian Franc + // * `MTL` - Maltese Lira + // * `MTP` - Maltese Pound + // * `MRU` - Mauritanian Ouguiya + // * `MRO` - Mauritanian Ouguiya (1973–2017) + // * `MUR` - Mauritian Rupee + // * `MXV` - Mexican Investment Unit + // * `MXN` - Mexican Peso + // * `MXP` - Mexican Silver Peso (1861–1992) + // * `MDC` - Moldovan Cupon + // * `MDL` - Moldovan Leu + // * `MCF` - Monegasque Franc + // * `MNT` - Mongolian Tugrik + // * `MAD` - Moroccan Dirham + // * `MAF` - Moroccan Franc + // * `MZE` - Mozambican Escudo + // * `MZN` - Mozambican Metical + // * `MZM` - Mozambican Metical (1980–2006) + // * `MMK` - Myanmar Kyat + // * `NAD` - Namibian Dollar + // * `NPR` - Nepalese Rupee + // * `ANG` - Netherlands Antillean Guilder + // * `TWD` - New Taiwan Dollar + // * `NZD` - New Zealand Dollar + // * `NIO` - Nicaraguan Córdoba + // * `NIC` - Nicaraguan Córdoba (1988–1991) + // * `NGN` - Nigerian Naira + // * `KPW` - North Korean Won + // * `NOK` - Norwegian Krone + // * `OMR` - Omani Rial + // * `PKR` - Pakistani Rupee + // * `XPD` - Palladium + // * `PAB` - Panamanian Balboa + // * `PGK` - Papua New Guinean Kina + // * `PYG` - Paraguayan Guarani + // * `PEI` - Peruvian Inti + // * `PEN` - Peruvian Sol + // * `PES` - Peruvian Sol (1863–1965) + // * `PHP` - Philippine Peso + // * `XPT` - Platinum + // * `PLN` - Polish Zloty + // * `PLZ` - Polish Zloty (1950–1995) + // * `PTE` - Portuguese Escudo + // * `GWE` - Portuguese Guinea Escudo + // * `QAR` - Qatari Rial + // * `XRE` - RINET Funds + // * `RHD` - Rhodesian Dollar + // * `RON` - Romanian Leu + // * `ROL` - Romanian Leu (1952–2006) + // * `RUB` - Russian Ruble + // * `RUR` - Russian Ruble (1991–1998) + // * `RWF` - Rwandan Franc + // * `SVC` - Salvadoran Colón + // * `WST` - Samoan Tala + // * `SAR` - Saudi Riyal + // * `RSD` - Serbian Dinar + // * `CSD` - Serbian Dinar (2002–2006) + // * `SCR` - Seychellois Rupee + // * `SLL` - Sierra Leonean Leone + // * `XAG` - Silver + // * `SGD` - Singapore Dollar + // * `SKK` - Slovak Koruna + // * `SIT` - Slovenian Tolar + // * `SBD` - Solomon Islands Dollar + // * `SOS` - Somali Shilling + // * `ZAR` - South African Rand + // * `ZAL` - South African Rand (financial) + // * `KRH` - South Korean Hwan (1953–1962) + // * `KRW` - South Korean Won + // * `KRO` - South Korean Won (1945–1953) + // * `SSP` - South Sudanese Pound + // * `SUR` - Soviet Rouble + // * `ESP` - Spanish Peseta + // * `ESA` - Spanish Peseta (A account) + // * `ESB` - Spanish Peseta (convertible account) + // * `XDR` - Special Drawing Rights + // * `LKR` - Sri Lankan Rupee + // * `SHP` - St. Helena Pound + // * `XSU` - Sucre + // * `SDD` - Sudanese Dinar (1992–2007) + // * `SDG` - Sudanese Pound + // * `SDP` - Sudanese Pound (1957–1998) + // * `SRD` - Surinamese Dollar + // * `SRG` - Surinamese Guilder + // * `SZL` - Swazi Lilangeni + // * `SEK` - Swedish Krona + // * `CHF` - Swiss Franc + // * `SYP` - Syrian Pound + // * `STN` - São Tomé & Príncipe Dobra + // * `STD` - São Tomé & Príncipe Dobra (1977–2017) + // * `TVD` - TVD + // * `TJR` - Tajikistani Ruble + // * `TJS` - Tajikistani Somoni + // * `TZS` - Tanzanian Shilling + // * `XTS` - Testing Currency Code + // * `THB` - Thai Baht + // * `XXX` - The codes assigned for transactions where no currency is involved + // * `TPE` - Timorese Escudo + // * `TOP` - Tongan Paʻanga + // * `TTD` - Trinidad & Tobago Dollar + // * `TND` - Tunisian Dinar + // * `TRY` - Turkish Lira + // * `TRL` - Turkish Lira (1922–2005) + // * `TMT` - Turkmenistani Manat + // * `TMM` - Turkmenistani Manat (1993–2009) + // * `USD` - US Dollar + // * `USN` - US Dollar (Next day) + // * `USS` - US Dollar (Same day) + // * `UGX` - Ugandan Shilling + // * `UGS` - Ugandan Shilling (1966–1987) + // * `UAH` - Ukrainian Hryvnia + // * `UAK` - Ukrainian Karbovanets + // * `AED` - United Arab Emirates Dirham + // * `UYW` - Uruguayan Nominal Wage Index Unit + // * `UYU` - Uruguayan Peso + // * `UYP` - Uruguayan Peso (1975–1993) + // * `UYI` - Uruguayan Peso (Indexed Units) + // * `UZS` - Uzbekistani Som + // * `VUV` - Vanuatu Vatu + // * `VES` - Venezuelan Bolívar + // * `VEB` - Venezuelan Bolívar (1871–2008) + // * `VEF` - Venezuelan Bolívar (2008–2018) + // * `VND` - Vietnamese Dong + // * `VNN` - Vietnamese Dong (1978–1985) + // * `CHE` - WIR Euro + // * `CHW` - WIR Franc + // * `XOF` - West African CFA Franc + // * `YDD` - Yemeni Dinar + // * `YER` - Yemeni Rial + // * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + // * `YUD` - Yugoslavian Hard Dinar (1966–1990) + // * `YUM` - Yugoslavian New Dinar (1994–2002) + // * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + // * `ZWN` - ZWN + // * `ZRN` - Zairean New Zaire (1993–1998) + // * `ZRZ` - Zairean Zaire (1971–1993) + // * `ZMW` - Zambian Kwacha + // * `ZMK` - Zambian Kwacha (1968–2012) + // * `ZWD` - Zimbabwean Dollar (1980–2008) + // * `ZWR` - Zimbabwean Dollar (2008) + // * `ZWL` - Zimbabwean Dollar (2009) + Currency *CashFlowStatementCurrency `json:"currency,omitempty" url:"currency,omitempty"` + // The company the cash flow statement belongs to. + Company *CashFlowStatementCompany `json:"company,omitempty" url:"company,omitempty"` + // The cash flow statement's start period. + StartPeriod *time.Time `json:"start_period,omitempty" url:"start_period,omitempty"` + // The cash flow statement's end period. + EndPeriod *time.Time `json:"end_period,omitempty" url:"end_period,omitempty"` + // Cash and cash equivalents at the beginning of the cash flow statement's period. + CashAtBeginningOfPeriod *float64 `json:"cash_at_beginning_of_period,omitempty" url:"cash_at_beginning_of_period,omitempty"` + // Cash and cash equivalents at the beginning of the cash flow statement's period. + CashAtEndOfPeriod *float64 `json:"cash_at_end_of_period,omitempty" url:"cash_at_end_of_period,omitempty"` + OperatingActivities []*ReportItem `json:"operating_activities,omitempty" url:"operating_activities,omitempty"` + InvestingActivities []*ReportItem `json:"investing_activities,omitempty" url:"investing_activities,omitempty"` + FinancingActivities []*ReportItem `json:"financing_activities,omitempty" url:"financing_activities,omitempty"` + // The time that cash flow statement was generated by the accounting system. + RemoteGeneratedAt *time.Time `json:"remote_generated_at,omitempty" url:"remote_generated_at,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (c *CashFlowStatement) GetId() *string { + if c == nil { + return nil + } + return c.Id +} + +func (c *CashFlowStatement) GetRemoteId() *string { + if c == nil { + return nil + } + return c.RemoteId +} + +func (c *CashFlowStatement) GetCreatedAt() *time.Time { + if c == nil { + return nil + } + return c.CreatedAt +} + +func (c *CashFlowStatement) GetModifiedAt() *time.Time { + if c == nil { + return nil + } + return c.ModifiedAt +} + +func (c *CashFlowStatement) GetName() *string { + if c == nil { + return nil + } + return c.Name +} + +func (c *CashFlowStatement) GetCurrency() *CashFlowStatementCurrency { + if c == nil { + return nil + } + return c.Currency +} + +func (c *CashFlowStatement) GetCompany() *CashFlowStatementCompany { + if c == nil { + return nil + } + return c.Company +} + +func (c *CashFlowStatement) GetStartPeriod() *time.Time { + if c == nil { + return nil + } + return c.StartPeriod +} + +func (c *CashFlowStatement) GetEndPeriod() *time.Time { + if c == nil { + return nil + } + return c.EndPeriod +} + +func (c *CashFlowStatement) GetCashAtBeginningOfPeriod() *float64 { + if c == nil { + return nil + } + return c.CashAtBeginningOfPeriod +} + +func (c *CashFlowStatement) GetCashAtEndOfPeriod() *float64 { + if c == nil { + return nil + } + return c.CashAtEndOfPeriod +} + +func (c *CashFlowStatement) GetOperatingActivities() []*ReportItem { + if c == nil { + return nil + } + return c.OperatingActivities +} + +func (c *CashFlowStatement) GetInvestingActivities() []*ReportItem { + if c == nil { + return nil + } + return c.InvestingActivities +} + +func (c *CashFlowStatement) GetFinancingActivities() []*ReportItem { + if c == nil { + return nil + } + return c.FinancingActivities +} + +func (c *CashFlowStatement) GetRemoteGeneratedAt() *time.Time { + if c == nil { + return nil + } + return c.RemoteGeneratedAt +} + +func (c *CashFlowStatement) GetRemoteWasDeleted() *bool { + if c == nil { + return nil + } + return c.RemoteWasDeleted +} + +func (c *CashFlowStatement) GetFieldMappings() map[string]interface{} { + if c == nil { + return nil + } + return c.FieldMappings +} + +func (c *CashFlowStatement) GetRemoteData() []*RemoteData { + if c == nil { + return nil + } + return c.RemoteData +} + +func (c *CashFlowStatement) GetExtraProperties() map[string]interface{} { + return c.extraProperties +} + +func (c *CashFlowStatement) UnmarshalJSON(data []byte) error { + type embed CashFlowStatement + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + StartPeriod *internal.DateTime `json:"start_period,omitempty"` + EndPeriod *internal.DateTime `json:"end_period,omitempty"` + RemoteGeneratedAt *internal.DateTime `json:"remote_generated_at,omitempty"` + }{ + embed: embed(*c), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *c = CashFlowStatement(unmarshaler.embed) + c.CreatedAt = unmarshaler.CreatedAt.TimePtr() + c.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + c.StartPeriod = unmarshaler.StartPeriod.TimePtr() + c.EndPeriod = unmarshaler.EndPeriod.TimePtr() + c.RemoteGeneratedAt = unmarshaler.RemoteGeneratedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *c) + if err != nil { + return err + } + c.extraProperties = extraProperties + c.rawJSON = json.RawMessage(data) + return nil +} + +func (c *CashFlowStatement) MarshalJSON() ([]byte, error) { + type embed CashFlowStatement + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + StartPeriod *internal.DateTime `json:"start_period,omitempty"` + EndPeriod *internal.DateTime `json:"end_period,omitempty"` + RemoteGeneratedAt *internal.DateTime `json:"remote_generated_at,omitempty"` + }{ + embed: embed(*c), + CreatedAt: internal.NewOptionalDateTime(c.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(c.ModifiedAt), + StartPeriod: internal.NewOptionalDateTime(c.StartPeriod), + EndPeriod: internal.NewOptionalDateTime(c.EndPeriod), + RemoteGeneratedAt: internal.NewOptionalDateTime(c.RemoteGeneratedAt), + } + return json.Marshal(marshaler) +} + +func (c *CashFlowStatement) String() string { + if len(c.rawJSON) > 0 { + if value, err := internal.StringifyJSON(c.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(c); err == nil { + return value + } + return fmt.Sprintf("%#v", c) +} + +// The company the cash flow statement belongs to. +type CashFlowStatementCompany struct { + String string + CompanyInfo *CompanyInfo + + typ string +} + +func (c *CashFlowStatementCompany) GetString() string { + if c == nil { + return "" + } + return c.String +} + +func (c *CashFlowStatementCompany) GetCompanyInfo() *CompanyInfo { + if c == nil { + return nil + } + return c.CompanyInfo +} + +func (c *CashFlowStatementCompany) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + c.typ = "String" + c.String = valueString + return nil + } + valueCompanyInfo := new(CompanyInfo) + if err := json.Unmarshal(data, &valueCompanyInfo); err == nil { + c.typ = "CompanyInfo" + c.CompanyInfo = valueCompanyInfo + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, c) +} + +func (c CashFlowStatementCompany) MarshalJSON() ([]byte, error) { + if c.typ == "String" || c.String != "" { + return json.Marshal(c.String) + } + if c.typ == "CompanyInfo" || c.CompanyInfo != nil { + return json.Marshal(c.CompanyInfo) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", c) +} + +type CashFlowStatementCompanyVisitor interface { + VisitString(string) error + VisitCompanyInfo(*CompanyInfo) error +} + +func (c *CashFlowStatementCompany) Accept(visitor CashFlowStatementCompanyVisitor) error { + if c.typ == "String" || c.String != "" { + return visitor.VisitString(c.String) + } + if c.typ == "CompanyInfo" || c.CompanyInfo != nil { + return visitor.VisitCompanyInfo(c.CompanyInfo) + } + return fmt.Errorf("type %T does not include a non-empty union type", c) +} + +// The cash flow statement's currency. +// +// * `XUA` - ADB Unit of Account +// * `AFN` - Afghan Afghani +// * `AFA` - Afghan Afghani (1927–2002) +// * `ALL` - Albanian Lek +// * `ALK` - Albanian Lek (1946–1965) +// * `DZD` - Algerian Dinar +// * `ADP` - Andorran Peseta +// * `AOA` - Angolan Kwanza +// * `AOK` - Angolan Kwanza (1977–1991) +// * `AON` - Angolan New Kwanza (1990–2000) +// * `AOR` - Angolan Readjusted Kwanza (1995–1999) +// * `ARA` - Argentine Austral +// * `ARS` - Argentine Peso +// * `ARM` - Argentine Peso (1881–1970) +// * `ARP` - Argentine Peso (1983–1985) +// * `ARL` - Argentine Peso Ley (1970–1983) +// * `AMD` - Armenian Dram +// * `AWG` - Aruban Florin +// * `AUD` - Australian Dollar +// * `ATS` - Austrian Schilling +// * `AZN` - Azerbaijani Manat +// * `AZM` - Azerbaijani Manat (1993–2006) +// * `BSD` - Bahamian Dollar +// * `BHD` - Bahraini Dinar +// * `BDT` - Bangladeshi Taka +// * `BBD` - Barbadian Dollar +// * `BYN` - Belarusian Ruble +// * `BYB` - Belarusian Ruble (1994–1999) +// * `BYR` - Belarusian Ruble (2000–2016) +// * `BEF` - Belgian Franc +// * `BEC` - Belgian Franc (convertible) +// * `BEL` - Belgian Franc (financial) +// * `BZD` - Belize Dollar +// * `BMD` - Bermudan Dollar +// * `BTN` - Bhutanese Ngultrum +// * `BOB` - Bolivian Boliviano +// * `BOL` - Bolivian Boliviano (1863–1963) +// * `BOV` - Bolivian Mvdol +// * `BOP` - Bolivian Peso +// * `BAM` - Bosnia-Herzegovina Convertible Mark +// * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) +// * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) +// * `BWP` - Botswanan Pula +// * `BRC` - Brazilian Cruzado (1986–1989) +// * `BRZ` - Brazilian Cruzeiro (1942–1967) +// * `BRE` - Brazilian Cruzeiro (1990–1993) +// * `BRR` - Brazilian Cruzeiro (1993–1994) +// * `BRN` - Brazilian New Cruzado (1989–1990) +// * `BRB` - Brazilian New Cruzeiro (1967–1986) +// * `BRL` - Brazilian Real +// * `GBP` - British Pound +// * `BND` - Brunei Dollar +// * `BGL` - Bulgarian Hard Lev +// * `BGN` - Bulgarian Lev +// * `BGO` - Bulgarian Lev (1879–1952) +// * `BGM` - Bulgarian Socialist Lev +// * `BUK` - Burmese Kyat +// * `BIF` - Burundian Franc +// * `XPF` - CFP Franc +// * `KHR` - Cambodian Riel +// * `CAD` - Canadian Dollar +// * `CVE` - Cape Verdean Escudo +// * `KYD` - Cayman Islands Dollar +// * `XAF` - Central African CFA Franc +// * `CLE` - Chilean Escudo +// * `CLP` - Chilean Peso +// * `CLF` - Chilean Unit of Account (UF) +// * `CNX` - Chinese People’s Bank Dollar +// * `CNY` - Chinese Yuan +// * `CNH` - Chinese Yuan (offshore) +// * `COP` - Colombian Peso +// * `COU` - Colombian Real Value Unit +// * `KMF` - Comorian Franc +// * `CDF` - Congolese Franc +// * `CRC` - Costa Rican Colón +// * `HRD` - Croatian Dinar +// * `HRK` - Croatian Kuna +// * `CUC` - Cuban Convertible Peso +// * `CUP` - Cuban Peso +// * `CYP` - Cypriot Pound +// * `CZK` - Czech Koruna +// * `CSK` - Czechoslovak Hard Koruna +// * `DKK` - Danish Krone +// * `DJF` - Djiboutian Franc +// * `DOP` - Dominican Peso +// * `NLG` - Dutch Guilder +// * `XCD` - East Caribbean Dollar +// * `DDM` - East German Mark +// * `ECS` - Ecuadorian Sucre +// * `ECV` - Ecuadorian Unit of Constant Value +// * `EGP` - Egyptian Pound +// * `GQE` - Equatorial Guinean Ekwele +// * `ERN` - Eritrean Nakfa +// * `EEK` - Estonian Kroon +// * `ETB` - Ethiopian Birr +// * `EUR` - Euro +// * `XBA` - European Composite Unit +// * `XEU` - European Currency Unit +// * `XBB` - European Monetary Unit +// * `XBC` - European Unit of Account (XBC) +// * `XBD` - European Unit of Account (XBD) +// * `FKP` - Falkland Islands Pound +// * `FJD` - Fijian Dollar +// * `FIM` - Finnish Markka +// * `FRF` - French Franc +// * `XFO` - French Gold Franc +// * `XFU` - French UIC-Franc +// * `GMD` - Gambian Dalasi +// * `GEK` - Georgian Kupon Larit +// * `GEL` - Georgian Lari +// * `DEM` - German Mark +// * `GHS` - Ghanaian Cedi +// * `GHC` - Ghanaian Cedi (1979–2007) +// * `GIP` - Gibraltar Pound +// * `XAU` - Gold +// * `GRD` - Greek Drachma +// * `GTQ` - Guatemalan Quetzal +// * `GWP` - Guinea-Bissau Peso +// * `GNF` - Guinean Franc +// * `GNS` - Guinean Syli +// * `GYD` - Guyanaese Dollar +// * `HTG` - Haitian Gourde +// * `HNL` - Honduran Lempira +// * `HKD` - Hong Kong Dollar +// * `HUF` - Hungarian Forint +// * `IMP` - IMP +// * `ISK` - Icelandic Króna +// * `ISJ` - Icelandic Króna (1918–1981) +// * `INR` - Indian Rupee +// * `IDR` - Indonesian Rupiah +// * `IRR` - Iranian Rial +// * `IQD` - Iraqi Dinar +// * `IEP` - Irish Pound +// * `ILS` - Israeli New Shekel +// * `ILP` - Israeli Pound +// * `ILR` - Israeli Shekel (1980–1985) +// * `ITL` - Italian Lira +// * `JMD` - Jamaican Dollar +// * `JPY` - Japanese Yen +// * `JOD` - Jordanian Dinar +// * `KZT` - Kazakhstani Tenge +// * `KES` - Kenyan Shilling +// * `KWD` - Kuwaiti Dinar +// * `KGS` - Kyrgystani Som +// * `LAK` - Laotian Kip +// * `LVL` - Latvian Lats +// * `LVR` - Latvian Ruble +// * `LBP` - Lebanese Pound +// * `LSL` - Lesotho Loti +// * `LRD` - Liberian Dollar +// * `LYD` - Libyan Dinar +// * `LTL` - Lithuanian Litas +// * `LTT` - Lithuanian Talonas +// * `LUL` - Luxembourg Financial Franc +// * `LUC` - Luxembourgian Convertible Franc +// * `LUF` - Luxembourgian Franc +// * `MOP` - Macanese Pataca +// * `MKD` - Macedonian Denar +// * `MKN` - Macedonian Denar (1992–1993) +// * `MGA` - Malagasy Ariary +// * `MGF` - Malagasy Franc +// * `MWK` - Malawian Kwacha +// * `MYR` - Malaysian Ringgit +// * `MVR` - Maldivian Rufiyaa +// * `MVP` - Maldivian Rupee (1947–1981) +// * `MLF` - Malian Franc +// * `MTL` - Maltese Lira +// * `MTP` - Maltese Pound +// * `MRU` - Mauritanian Ouguiya +// * `MRO` - Mauritanian Ouguiya (1973–2017) +// * `MUR` - Mauritian Rupee +// * `MXV` - Mexican Investment Unit +// * `MXN` - Mexican Peso +// * `MXP` - Mexican Silver Peso (1861–1992) +// * `MDC` - Moldovan Cupon +// * `MDL` - Moldovan Leu +// * `MCF` - Monegasque Franc +// * `MNT` - Mongolian Tugrik +// * `MAD` - Moroccan Dirham +// * `MAF` - Moroccan Franc +// * `MZE` - Mozambican Escudo +// * `MZN` - Mozambican Metical +// * `MZM` - Mozambican Metical (1980–2006) +// * `MMK` - Myanmar Kyat +// * `NAD` - Namibian Dollar +// * `NPR` - Nepalese Rupee +// * `ANG` - Netherlands Antillean Guilder +// * `TWD` - New Taiwan Dollar +// * `NZD` - New Zealand Dollar +// * `NIO` - Nicaraguan Córdoba +// * `NIC` - Nicaraguan Córdoba (1988–1991) +// * `NGN` - Nigerian Naira +// * `KPW` - North Korean Won +// * `NOK` - Norwegian Krone +// * `OMR` - Omani Rial +// * `PKR` - Pakistani Rupee +// * `XPD` - Palladium +// * `PAB` - Panamanian Balboa +// * `PGK` - Papua New Guinean Kina +// * `PYG` - Paraguayan Guarani +// * `PEI` - Peruvian Inti +// * `PEN` - Peruvian Sol +// * `PES` - Peruvian Sol (1863–1965) +// * `PHP` - Philippine Peso +// * `XPT` - Platinum +// * `PLN` - Polish Zloty +// * `PLZ` - Polish Zloty (1950–1995) +// * `PTE` - Portuguese Escudo +// * `GWE` - Portuguese Guinea Escudo +// * `QAR` - Qatari Rial +// * `XRE` - RINET Funds +// * `RHD` - Rhodesian Dollar +// * `RON` - Romanian Leu +// * `ROL` - Romanian Leu (1952–2006) +// * `RUB` - Russian Ruble +// * `RUR` - Russian Ruble (1991–1998) +// * `RWF` - Rwandan Franc +// * `SVC` - Salvadoran Colón +// * `WST` - Samoan Tala +// * `SAR` - Saudi Riyal +// * `RSD` - Serbian Dinar +// * `CSD` - Serbian Dinar (2002–2006) +// * `SCR` - Seychellois Rupee +// * `SLL` - Sierra Leonean Leone +// * `XAG` - Silver +// * `SGD` - Singapore Dollar +// * `SKK` - Slovak Koruna +// * `SIT` - Slovenian Tolar +// * `SBD` - Solomon Islands Dollar +// * `SOS` - Somali Shilling +// * `ZAR` - South African Rand +// * `ZAL` - South African Rand (financial) +// * `KRH` - South Korean Hwan (1953–1962) +// * `KRW` - South Korean Won +// * `KRO` - South Korean Won (1945–1953) +// * `SSP` - South Sudanese Pound +// * `SUR` - Soviet Rouble +// * `ESP` - Spanish Peseta +// * `ESA` - Spanish Peseta (A account) +// * `ESB` - Spanish Peseta (convertible account) +// * `XDR` - Special Drawing Rights +// * `LKR` - Sri Lankan Rupee +// * `SHP` - St. Helena Pound +// * `XSU` - Sucre +// * `SDD` - Sudanese Dinar (1992–2007) +// * `SDG` - Sudanese Pound +// * `SDP` - Sudanese Pound (1957–1998) +// * `SRD` - Surinamese Dollar +// * `SRG` - Surinamese Guilder +// * `SZL` - Swazi Lilangeni +// * `SEK` - Swedish Krona +// * `CHF` - Swiss Franc +// * `SYP` - Syrian Pound +// * `STN` - São Tomé & Príncipe Dobra +// * `STD` - São Tomé & Príncipe Dobra (1977–2017) +// * `TVD` - TVD +// * `TJR` - Tajikistani Ruble +// * `TJS` - Tajikistani Somoni +// * `TZS` - Tanzanian Shilling +// * `XTS` - Testing Currency Code +// * `THB` - Thai Baht +// * `XXX` - The codes assigned for transactions where no currency is involved +// * `TPE` - Timorese Escudo +// * `TOP` - Tongan Paʻanga +// * `TTD` - Trinidad & Tobago Dollar +// * `TND` - Tunisian Dinar +// * `TRY` - Turkish Lira +// * `TRL` - Turkish Lira (1922–2005) +// * `TMT` - Turkmenistani Manat +// * `TMM` - Turkmenistani Manat (1993–2009) +// * `USD` - US Dollar +// * `USN` - US Dollar (Next day) +// * `USS` - US Dollar (Same day) +// * `UGX` - Ugandan Shilling +// * `UGS` - Ugandan Shilling (1966–1987) +// * `UAH` - Ukrainian Hryvnia +// * `UAK` - Ukrainian Karbovanets +// * `AED` - United Arab Emirates Dirham +// * `UYW` - Uruguayan Nominal Wage Index Unit +// * `UYU` - Uruguayan Peso +// * `UYP` - Uruguayan Peso (1975–1993) +// * `UYI` - Uruguayan Peso (Indexed Units) +// * `UZS` - Uzbekistani Som +// * `VUV` - Vanuatu Vatu +// * `VES` - Venezuelan Bolívar +// * `VEB` - Venezuelan Bolívar (1871–2008) +// * `VEF` - Venezuelan Bolívar (2008–2018) +// * `VND` - Vietnamese Dong +// * `VNN` - Vietnamese Dong (1978–1985) +// * `CHE` - WIR Euro +// * `CHW` - WIR Franc +// * `XOF` - West African CFA Franc +// * `YDD` - Yemeni Dinar +// * `YER` - Yemeni Rial +// * `YUN` - Yugoslavian Convertible Dinar (1990–1992) +// * `YUD` - Yugoslavian Hard Dinar (1966–1990) +// * `YUM` - Yugoslavian New Dinar (1994–2002) +// * `YUR` - Yugoslavian Reformed Dinar (1992–1993) +// * `ZWN` - ZWN +// * `ZRN` - Zairean New Zaire (1993–1998) +// * `ZRZ` - Zairean Zaire (1971–1993) +// * `ZMW` - Zambian Kwacha +// * `ZMK` - Zambian Kwacha (1968–2012) +// * `ZWD` - Zimbabwean Dollar (1980–2008) +// * `ZWR` - Zimbabwean Dollar (2008) +// * `ZWL` - Zimbabwean Dollar (2009) +type CashFlowStatementCurrency struct { + TransactionCurrencyEnum TransactionCurrencyEnum + String string + + typ string +} + +func (c *CashFlowStatementCurrency) GetTransactionCurrencyEnum() TransactionCurrencyEnum { + if c == nil { + return "" + } + return c.TransactionCurrencyEnum +} + +func (c *CashFlowStatementCurrency) GetString() string { + if c == nil { + return "" + } + return c.String +} + +func (c *CashFlowStatementCurrency) UnmarshalJSON(data []byte) error { + var valueTransactionCurrencyEnum TransactionCurrencyEnum + if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { + c.typ = "TransactionCurrencyEnum" + c.TransactionCurrencyEnum = valueTransactionCurrencyEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + c.typ = "String" + c.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, c) +} + +func (c CashFlowStatementCurrency) MarshalJSON() ([]byte, error) { + if c.typ == "TransactionCurrencyEnum" || c.TransactionCurrencyEnum != "" { + return json.Marshal(c.TransactionCurrencyEnum) + } + if c.typ == "String" || c.String != "" { + return json.Marshal(c.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", c) +} + +type CashFlowStatementCurrencyVisitor interface { + VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error + VisitString(string) error +} + +func (c *CashFlowStatementCurrency) Accept(visitor CashFlowStatementCurrencyVisitor) error { + if c.typ == "TransactionCurrencyEnum" || c.TransactionCurrencyEnum != "" { + return visitor.VisitTransactionCurrencyEnum(c.TransactionCurrencyEnum) + } + if c.typ == "String" || c.String != "" { + return visitor.VisitString(c.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", c) +} + +type PaginatedCashFlowStatementList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*CashFlowStatement `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedCashFlowStatementList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedCashFlowStatementList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedCashFlowStatementList) GetResults() []*CashFlowStatement { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedCashFlowStatementList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedCashFlowStatementList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedCashFlowStatementList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedCashFlowStatementList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedCashFlowStatementList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) } diff --git a/accounting/cashflowstatements/client.go b/accounting/cashflowstatements/client.go index 464510a..229444a 100644 --- a/accounting/cashflowstatements/client.go +++ b/accounting/cashflowstatements/client.go @@ -1,126 +1,137 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package cashflowstatements import ( context "context" fmt "fmt" - accounting "github.com/merge-api/merge-go-client/accounting" - core "github.com/merge-api/merge-go-client/core" + accounting "github.com/merge-api/merge-go-client/v2/accounting" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `CashFlowStatement` objects. -func (c *Client) List(ctx context.Context, request *accounting.CashFlowStatementsListRequest) (*accounting.PaginatedCashFlowStatementList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/cash-flow-statements" - - queryParams := make(url.Values) - if request.CompanyId != nil { - queryParams.Add("company_id", fmt.Sprintf("%v", *request.CompanyId)) - } - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *accounting.PaginatedCashFlowStatementList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *accounting.CashFlowStatementsListRequest, + opts ...option.RequestOption, +) (*core.Page[*accounting.CashFlowStatement], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/cash-flow-statements" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *accounting.PaginatedCashFlowStatementList) *internal.PageResponse[*string, *accounting.CashFlowStatement] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *accounting.CashFlowStatement]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Returns a `CashFlowStatement` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *accounting.CashFlowStatementsRetrieveRequest) (*accounting.CashFlowStatement, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"accounting/v1/cash-flow-statements/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *accounting.CashFlowStatementsRetrieveRequest, + opts ...option.RequestOption, +) (*accounting.CashFlowStatement, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/accounting/v1/cash-flow-statements/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *accounting.CashFlowStatement if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/accounting/client/client.go b/accounting/client/client.go index 5c8140e..ffd3423 100644 --- a/accounting/client/client.go +++ b/accounting/client/client.go @@ -1,58 +1,63 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package client import ( - accountdetails "github.com/merge-api/merge-go-client/accounting/accountdetails" - accountingperiods "github.com/merge-api/merge-go-client/accounting/accountingperiods" - accounts "github.com/merge-api/merge-go-client/accounting/accounts" - accounttoken "github.com/merge-api/merge-go-client/accounting/accounttoken" - addresses "github.com/merge-api/merge-go-client/accounting/addresses" - asyncpassthrough "github.com/merge-api/merge-go-client/accounting/asyncpassthrough" - asynctasks "github.com/merge-api/merge-go-client/accounting/asynctasks" - attachments "github.com/merge-api/merge-go-client/accounting/attachments" - audittrail "github.com/merge-api/merge-go-client/accounting/audittrail" - availableactions "github.com/merge-api/merge-go-client/accounting/availableactions" - balancesheets "github.com/merge-api/merge-go-client/accounting/balancesheets" - bankfeedaccounts "github.com/merge-api/merge-go-client/accounting/bankfeedaccounts" - bankfeedtransactions "github.com/merge-api/merge-go-client/accounting/bankfeedtransactions" - cashflowstatements "github.com/merge-api/merge-go-client/accounting/cashflowstatements" - companyinfo "github.com/merge-api/merge-go-client/accounting/companyinfo" - contacts "github.com/merge-api/merge-go-client/accounting/contacts" - creditnotes "github.com/merge-api/merge-go-client/accounting/creditnotes" - deleteaccount "github.com/merge-api/merge-go-client/accounting/deleteaccount" - employees "github.com/merge-api/merge-go-client/accounting/employees" - expenses "github.com/merge-api/merge-go-client/accounting/expenses" - fieldmapping "github.com/merge-api/merge-go-client/accounting/fieldmapping" - forceresync "github.com/merge-api/merge-go-client/accounting/forceresync" - generalledgertransactions "github.com/merge-api/merge-go-client/accounting/generalledgertransactions" - generatekey "github.com/merge-api/merge-go-client/accounting/generatekey" - incomestatements "github.com/merge-api/merge-go-client/accounting/incomestatements" - invoices "github.com/merge-api/merge-go-client/accounting/invoices" - issues "github.com/merge-api/merge-go-client/accounting/issues" - items "github.com/merge-api/merge-go-client/accounting/items" - journalentries "github.com/merge-api/merge-go-client/accounting/journalentries" - linkedaccounts "github.com/merge-api/merge-go-client/accounting/linkedaccounts" - linktoken "github.com/merge-api/merge-go-client/accounting/linktoken" - passthrough "github.com/merge-api/merge-go-client/accounting/passthrough" - payments "github.com/merge-api/merge-go-client/accounting/payments" - phonenumbers "github.com/merge-api/merge-go-client/accounting/phonenumbers" - purchaseorders "github.com/merge-api/merge-go-client/accounting/purchaseorders" - regeneratekey "github.com/merge-api/merge-go-client/accounting/regeneratekey" - scopes "github.com/merge-api/merge-go-client/accounting/scopes" - syncstatus "github.com/merge-api/merge-go-client/accounting/syncstatus" - taxrates "github.com/merge-api/merge-go-client/accounting/taxrates" - trackingcategories "github.com/merge-api/merge-go-client/accounting/trackingcategories" - transactions "github.com/merge-api/merge-go-client/accounting/transactions" - vendorcredits "github.com/merge-api/merge-go-client/accounting/vendorcredits" - webhookreceivers "github.com/merge-api/merge-go-client/accounting/webhookreceivers" - core "github.com/merge-api/merge-go-client/core" + accountdetails "github.com/merge-api/merge-go-client/v2/accounting/accountdetails" + accountingperiods "github.com/merge-api/merge-go-client/v2/accounting/accountingperiods" + accounts "github.com/merge-api/merge-go-client/v2/accounting/accounts" + accounttoken "github.com/merge-api/merge-go-client/v2/accounting/accounttoken" + addresses "github.com/merge-api/merge-go-client/v2/accounting/addresses" + asyncpassthrough "github.com/merge-api/merge-go-client/v2/accounting/asyncpassthrough" + asynctasks "github.com/merge-api/merge-go-client/v2/accounting/asynctasks" + attachments "github.com/merge-api/merge-go-client/v2/accounting/attachments" + audittrail "github.com/merge-api/merge-go-client/v2/accounting/audittrail" + availableactions "github.com/merge-api/merge-go-client/v2/accounting/availableactions" + balancesheets "github.com/merge-api/merge-go-client/v2/accounting/balancesheets" + bankfeedaccounts "github.com/merge-api/merge-go-client/v2/accounting/bankfeedaccounts" + bankfeedtransactions "github.com/merge-api/merge-go-client/v2/accounting/bankfeedtransactions" + cashflowstatements "github.com/merge-api/merge-go-client/v2/accounting/cashflowstatements" + companyinfo "github.com/merge-api/merge-go-client/v2/accounting/companyinfo" + contacts "github.com/merge-api/merge-go-client/v2/accounting/contacts" + creditnotes "github.com/merge-api/merge-go-client/v2/accounting/creditnotes" + deleteaccount "github.com/merge-api/merge-go-client/v2/accounting/deleteaccount" + employees "github.com/merge-api/merge-go-client/v2/accounting/employees" + expenses "github.com/merge-api/merge-go-client/v2/accounting/expenses" + fieldmapping "github.com/merge-api/merge-go-client/v2/accounting/fieldmapping" + forceresync "github.com/merge-api/merge-go-client/v2/accounting/forceresync" + generalledgertransactions "github.com/merge-api/merge-go-client/v2/accounting/generalledgertransactions" + generatekey "github.com/merge-api/merge-go-client/v2/accounting/generatekey" + incomestatements "github.com/merge-api/merge-go-client/v2/accounting/incomestatements" + invoices "github.com/merge-api/merge-go-client/v2/accounting/invoices" + issues "github.com/merge-api/merge-go-client/v2/accounting/issues" + items "github.com/merge-api/merge-go-client/v2/accounting/items" + journalentries "github.com/merge-api/merge-go-client/v2/accounting/journalentries" + linkedaccounts "github.com/merge-api/merge-go-client/v2/accounting/linkedaccounts" + linktoken "github.com/merge-api/merge-go-client/v2/accounting/linktoken" + passthrough "github.com/merge-api/merge-go-client/v2/accounting/passthrough" + paymentmethods "github.com/merge-api/merge-go-client/v2/accounting/paymentmethods" + payments "github.com/merge-api/merge-go-client/v2/accounting/payments" + paymentterms "github.com/merge-api/merge-go-client/v2/accounting/paymentterms" + phonenumbers "github.com/merge-api/merge-go-client/v2/accounting/phonenumbers" + projects "github.com/merge-api/merge-go-client/v2/accounting/projects" + purchaseorders "github.com/merge-api/merge-go-client/v2/accounting/purchaseorders" + regeneratekey "github.com/merge-api/merge-go-client/v2/accounting/regeneratekey" + scopes "github.com/merge-api/merge-go-client/v2/accounting/scopes" + syncstatus "github.com/merge-api/merge-go-client/v2/accounting/syncstatus" + taxrates "github.com/merge-api/merge-go-client/v2/accounting/taxrates" + trackingcategories "github.com/merge-api/merge-go-client/v2/accounting/trackingcategories" + transactions "github.com/merge-api/merge-go-client/v2/accounting/transactions" + vendorcredits "github.com/merge-api/merge-go-client/v2/accounting/vendorcredits" + webhookreceivers "github.com/merge-api/merge-go-client/v2/accounting/webhookreceivers" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header AccountDetails *accountdetails.Client @@ -87,8 +92,11 @@ type Client struct { LinkToken *linktoken.Client LinkedAccounts *linkedaccounts.Client Passthrough *passthrough.Client + PaymentMethods *paymentmethods.Client + PaymentTerms *paymentterms.Client Payments *payments.Client PhoneNumbers *phonenumbers.Client + Projects *projects.Client PurchaseOrders *purchaseorders.Client RegenerateKey *regeneratekey.Client SyncStatus *syncstatus.Client @@ -100,14 +108,16 @@ type Client struct { WebhookReceivers *webhookreceivers.Client } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ - baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), + baseURL: options.BaseURL, + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), header: options.ToHeader(), AccountDetails: accountdetails.NewClient(opts...), AccountToken: accounttoken.NewClient(opts...), @@ -141,8 +151,11 @@ func NewClient(opts ...core.ClientOption) *Client { LinkToken: linktoken.NewClient(opts...), LinkedAccounts: linkedaccounts.NewClient(opts...), Passthrough: passthrough.NewClient(opts...), + PaymentMethods: paymentmethods.NewClient(opts...), + PaymentTerms: paymentterms.NewClient(opts...), Payments: payments.NewClient(opts...), PhoneNumbers: phonenumbers.NewClient(opts...), + Projects: projects.NewClient(opts...), PurchaseOrders: purchaseorders.NewClient(opts...), RegenerateKey: regeneratekey.NewClient(opts...), SyncStatus: syncstatus.NewClient(opts...), diff --git a/accounting/company_info.go b/accounting/company_info.go index 64fc674..b0457b5 100644 --- a/accounting/company_info.go +++ b/accounting/company_info.go @@ -1,90 +1,150 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package accounting import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type CompanyInfoListRequest struct { // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *CompanyInfoListRequestExpand `json:"-"` + Expand []*CompanyInfoListRequestExpandItem `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` } type CompanyInfoRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *CompanyInfoRetrieveRequestExpand `json:"-"` + Expand []*CompanyInfoRetrieveRequestExpandItem `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` } -type CompanyInfoListRequestExpand string +type CompanyInfoListRequestExpandItem string const ( - CompanyInfoListRequestExpandAddresses CompanyInfoListRequestExpand = "addresses" - CompanyInfoListRequestExpandAddressesPhoneNumbers CompanyInfoListRequestExpand = "addresses,phone_numbers" - CompanyInfoListRequestExpandPhoneNumbers CompanyInfoListRequestExpand = "phone_numbers" + CompanyInfoListRequestExpandItemAddresses CompanyInfoListRequestExpandItem = "addresses" + CompanyInfoListRequestExpandItemPhoneNumbers CompanyInfoListRequestExpandItem = "phone_numbers" ) -func NewCompanyInfoListRequestExpandFromString(s string) (CompanyInfoListRequestExpand, error) { +func NewCompanyInfoListRequestExpandItemFromString(s string) (CompanyInfoListRequestExpandItem, error) { switch s { case "addresses": - return CompanyInfoListRequestExpandAddresses, nil - case "addresses,phone_numbers": - return CompanyInfoListRequestExpandAddressesPhoneNumbers, nil + return CompanyInfoListRequestExpandItemAddresses, nil case "phone_numbers": - return CompanyInfoListRequestExpandPhoneNumbers, nil + return CompanyInfoListRequestExpandItemPhoneNumbers, nil } - var t CompanyInfoListRequestExpand + var t CompanyInfoListRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (c CompanyInfoListRequestExpand) Ptr() *CompanyInfoListRequestExpand { +func (c CompanyInfoListRequestExpandItem) Ptr() *CompanyInfoListRequestExpandItem { return &c } -type CompanyInfoRetrieveRequestExpand string +type CompanyInfoRetrieveRequestExpandItem string const ( - CompanyInfoRetrieveRequestExpandAddresses CompanyInfoRetrieveRequestExpand = "addresses" - CompanyInfoRetrieveRequestExpandAddressesPhoneNumbers CompanyInfoRetrieveRequestExpand = "addresses,phone_numbers" - CompanyInfoRetrieveRequestExpandPhoneNumbers CompanyInfoRetrieveRequestExpand = "phone_numbers" + CompanyInfoRetrieveRequestExpandItemAddresses CompanyInfoRetrieveRequestExpandItem = "addresses" + CompanyInfoRetrieveRequestExpandItemPhoneNumbers CompanyInfoRetrieveRequestExpandItem = "phone_numbers" ) -func NewCompanyInfoRetrieveRequestExpandFromString(s string) (CompanyInfoRetrieveRequestExpand, error) { +func NewCompanyInfoRetrieveRequestExpandItemFromString(s string) (CompanyInfoRetrieveRequestExpandItem, error) { switch s { case "addresses": - return CompanyInfoRetrieveRequestExpandAddresses, nil - case "addresses,phone_numbers": - return CompanyInfoRetrieveRequestExpandAddressesPhoneNumbers, nil + return CompanyInfoRetrieveRequestExpandItemAddresses, nil case "phone_numbers": - return CompanyInfoRetrieveRequestExpandPhoneNumbers, nil + return CompanyInfoRetrieveRequestExpandItemPhoneNumbers, nil } - var t CompanyInfoRetrieveRequestExpand + var t CompanyInfoRetrieveRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (c CompanyInfoRetrieveRequestExpand) Ptr() *CompanyInfoRetrieveRequestExpand { +func (c CompanyInfoRetrieveRequestExpandItem) Ptr() *CompanyInfoRetrieveRequestExpandItem { return &c } + +type PaginatedCompanyInfoList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*CompanyInfo `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedCompanyInfoList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedCompanyInfoList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedCompanyInfoList) GetResults() []*CompanyInfo { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedCompanyInfoList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedCompanyInfoList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedCompanyInfoList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedCompanyInfoList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedCompanyInfoList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} diff --git a/accounting/companyinfo/client.go b/accounting/companyinfo/client.go index a657981..8b0ca7f 100644 --- a/accounting/companyinfo/client.go +++ b/accounting/companyinfo/client.go @@ -1,123 +1,137 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package companyinfo import ( context "context" fmt "fmt" - accounting "github.com/merge-api/merge-go-client/accounting" - core "github.com/merge-api/merge-go-client/core" + accounting "github.com/merge-api/merge-go-client/v2/accounting" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `CompanyInfo` objects. -func (c *Client) List(ctx context.Context, request *accounting.CompanyInfoListRequest) (*accounting.PaginatedCompanyInfoList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/company-info" - - queryParams := make(url.Values) - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *accounting.PaginatedCompanyInfoList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *accounting.CompanyInfoListRequest, + opts ...option.RequestOption, +) (*core.Page[*accounting.CompanyInfo], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/company-info" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *accounting.PaginatedCompanyInfoList) *internal.PageResponse[*string, *accounting.CompanyInfo] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *accounting.CompanyInfo]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Returns a `CompanyInfo` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *accounting.CompanyInfoRetrieveRequest) (*accounting.CompanyInfo, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"accounting/v1/company-info/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *accounting.CompanyInfoRetrieveRequest, + opts ...option.RequestOption, +) (*accounting.CompanyInfo, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/accounting/v1/company-info/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *accounting.CompanyInfo if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/accounting/contacts.go b/accounting/contacts.go index d275abb..4cd9169 100644 --- a/accounting/contacts.go +++ b/accounting/contacts.go @@ -1,159 +1,644 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package accounting import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type ContactEndpointRequest struct { // Whether to include debug fields (such as log file links) in the response. - IsDebugMode *bool `json:"-"` + IsDebugMode *bool `json:"-" url:"is_debug_mode,omitempty"` // Whether or not third-party updates should be run asynchronously. - RunAsync *bool `json:"-"` - Model *ContactRequest `json:"model,omitempty"` + RunAsync *bool `json:"-" url:"run_async,omitempty"` + Model *ContactRequest `json:"model,omitempty" url:"-"` } type ContactsListRequest struct { // If provided, will only return contacts for this company. - CompanyId *string `json:"-"` + CompanyId *string `json:"-" url:"company_id,omitempty"` // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // If provided, will only return Contacts that match this email. - EmailAddress *string `json:"-"` + EmailAddress *string `json:"-" url:"email_address,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *ContactsListRequestExpand `json:"-"` + Expand []*ContactsListRequestExpandItem `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - IncludeRemoteFields *bool `json:"-"` + IncludeRemoteFields *bool `json:"-" url:"include_remote_fields,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, will only return Contacts that are denoted as customers. - IsCustomer *string `json:"-"` + IsCustomer *string `json:"-" url:"is_customer,omitempty"` // If provided, will only return Contacts that are denoted as suppliers. - IsSupplier *string `json:"-"` + IsSupplier *string `json:"-" url:"is_supplier,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // If provided, will only return Contacts that match this name. - Name *string `json:"-"` + Name *string `json:"-" url:"name,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // Deprecated. Use show_enum_origins. - RemoteFields *string `json:"-"` + RemoteFields *string `json:"-" url:"remote_fields,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` // 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) - ShowEnumOrigins *string `json:"-"` + ShowEnumOrigins *string `json:"-" url:"show_enum_origins,omitempty"` + // If provided, will only return Contacts that match this status. + Status *string `json:"-" url:"status,omitempty"` } type ContactsRemoteFieldClassesListRequest struct { // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, will only return remote field classes with this is_common_model_field value - IsCommonModelField *bool `json:"-"` + IsCommonModelField *bool `json:"-" url:"is_common_model_field,omitempty"` + // If provided, will only return remote fields classes with this is_custom value + IsCustom *bool `json:"-" url:"is_custom,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` } type ContactsRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *ContactsRetrieveRequestExpand `json:"-"` + Expand []*ContactsRetrieveRequestExpandItem `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - IncludeRemoteFields *bool `json:"-"` + IncludeRemoteFields *bool `json:"-" url:"include_remote_fields,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // Deprecated. Use show_enum_origins. - RemoteFields *string `json:"-"` + RemoteFields *string `json:"-" url:"remote_fields,omitempty"` // 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) - ShowEnumOrigins *string `json:"-"` + ShowEnumOrigins *string `json:"-" url:"show_enum_origins,omitempty"` } -type ContactsListRequestExpand string +type ContactsListRequestExpandItem string const ( - ContactsListRequestExpandAddresses ContactsListRequestExpand = "addresses" - ContactsListRequestExpandAddressesCompany ContactsListRequestExpand = "addresses,company" - ContactsListRequestExpandAddressesPhoneNumbers ContactsListRequestExpand = "addresses,phone_numbers" - ContactsListRequestExpandAddressesPhoneNumbersCompany ContactsListRequestExpand = "addresses,phone_numbers,company" - ContactsListRequestExpandCompany ContactsListRequestExpand = "company" - ContactsListRequestExpandPhoneNumbers ContactsListRequestExpand = "phone_numbers" - ContactsListRequestExpandPhoneNumbersCompany ContactsListRequestExpand = "phone_numbers,company" + ContactsListRequestExpandItemAddresses ContactsListRequestExpandItem = "addresses" + ContactsListRequestExpandItemCompany ContactsListRequestExpandItem = "company" + ContactsListRequestExpandItemPhoneNumbers ContactsListRequestExpandItem = "phone_numbers" ) -func NewContactsListRequestExpandFromString(s string) (ContactsListRequestExpand, error) { +func NewContactsListRequestExpandItemFromString(s string) (ContactsListRequestExpandItem, error) { switch s { case "addresses": - return ContactsListRequestExpandAddresses, nil - case "addresses,company": - return ContactsListRequestExpandAddressesCompany, nil - case "addresses,phone_numbers": - return ContactsListRequestExpandAddressesPhoneNumbers, nil - case "addresses,phone_numbers,company": - return ContactsListRequestExpandAddressesPhoneNumbersCompany, nil + return ContactsListRequestExpandItemAddresses, nil case "company": - return ContactsListRequestExpandCompany, nil + return ContactsListRequestExpandItemCompany, nil case "phone_numbers": - return ContactsListRequestExpandPhoneNumbers, nil - case "phone_numbers,company": - return ContactsListRequestExpandPhoneNumbersCompany, nil + return ContactsListRequestExpandItemPhoneNumbers, nil } - var t ContactsListRequestExpand + var t ContactsListRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (c ContactsListRequestExpand) Ptr() *ContactsListRequestExpand { +func (c ContactsListRequestExpandItem) Ptr() *ContactsListRequestExpandItem { return &c } -type ContactsRetrieveRequestExpand string +type ContactsRetrieveRequestExpandItem string const ( - ContactsRetrieveRequestExpandAddresses ContactsRetrieveRequestExpand = "addresses" - ContactsRetrieveRequestExpandAddressesCompany ContactsRetrieveRequestExpand = "addresses,company" - ContactsRetrieveRequestExpandAddressesPhoneNumbers ContactsRetrieveRequestExpand = "addresses,phone_numbers" - ContactsRetrieveRequestExpandAddressesPhoneNumbersCompany ContactsRetrieveRequestExpand = "addresses,phone_numbers,company" - ContactsRetrieveRequestExpandCompany ContactsRetrieveRequestExpand = "company" - ContactsRetrieveRequestExpandPhoneNumbers ContactsRetrieveRequestExpand = "phone_numbers" - ContactsRetrieveRequestExpandPhoneNumbersCompany ContactsRetrieveRequestExpand = "phone_numbers,company" + ContactsRetrieveRequestExpandItemAddresses ContactsRetrieveRequestExpandItem = "addresses" + ContactsRetrieveRequestExpandItemCompany ContactsRetrieveRequestExpandItem = "company" + ContactsRetrieveRequestExpandItemPhoneNumbers ContactsRetrieveRequestExpandItem = "phone_numbers" ) -func NewContactsRetrieveRequestExpandFromString(s string) (ContactsRetrieveRequestExpand, error) { +func NewContactsRetrieveRequestExpandItemFromString(s string) (ContactsRetrieveRequestExpandItem, error) { switch s { case "addresses": - return ContactsRetrieveRequestExpandAddresses, nil - case "addresses,company": - return ContactsRetrieveRequestExpandAddressesCompany, nil - case "addresses,phone_numbers": - return ContactsRetrieveRequestExpandAddressesPhoneNumbers, nil - case "addresses,phone_numbers,company": - return ContactsRetrieveRequestExpandAddressesPhoneNumbersCompany, nil + return ContactsRetrieveRequestExpandItemAddresses, nil case "company": - return ContactsRetrieveRequestExpandCompany, nil + return ContactsRetrieveRequestExpandItemCompany, nil case "phone_numbers": - return ContactsRetrieveRequestExpandPhoneNumbers, nil - case "phone_numbers,company": - return ContactsRetrieveRequestExpandPhoneNumbersCompany, nil + return ContactsRetrieveRequestExpandItemPhoneNumbers, nil } - var t ContactsRetrieveRequestExpand + var t ContactsRetrieveRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (c ContactsRetrieveRequestExpand) Ptr() *ContactsRetrieveRequestExpand { +func (c ContactsRetrieveRequestExpandItem) Ptr() *ContactsRetrieveRequestExpandItem { return &c } + +// # The AccountingPhoneNumber Object +// ### Description +// The `AccountingPhoneNumber` object is used to represent a contact's or company's phone number. +// +// ### Usage Example +// Fetch from the `GET CompanyInfo` endpoint and view the company's phone numbers. +type AccountingPhoneNumberRequest struct { + // The phone number. + Number *string `json:"number,omitempty" url:"number,omitempty"` + // The phone number's type. + Type *string `json:"type,omitempty" url:"type,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AccountingPhoneNumberRequest) GetNumber() *string { + if a == nil { + return nil + } + return a.Number +} + +func (a *AccountingPhoneNumberRequest) GetType() *string { + if a == nil { + return nil + } + return a.Type +} + +func (a *AccountingPhoneNumberRequest) GetIntegrationParams() map[string]interface{} { + if a == nil { + return nil + } + return a.IntegrationParams +} + +func (a *AccountingPhoneNumberRequest) GetLinkedAccountParams() map[string]interface{} { + if a == nil { + return nil + } + return a.LinkedAccountParams +} + +func (a *AccountingPhoneNumberRequest) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AccountingPhoneNumberRequest) UnmarshalJSON(data []byte) error { + type unmarshaler AccountingPhoneNumberRequest + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *a = AccountingPhoneNumberRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AccountingPhoneNumberRequest) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} + +// # The Contact Object +// ### Description +// A `Contact` is an individual or business entity to which products and services are sold to or purchased from. The `Contact` model contains both Customers, in which products and services are sold to, and Vendors (or Suppliers), in which products and services are purchased from. +// * A `Contact` is a Vendor/Supplier if the `is_supplier` property is true. +// * A `Contact` is a customer if the `is_customer` property is true. +// +// ### Usage Example +// Fetch from the `LIST Contacts` endpoint and view a company's contacts. +type ContactRequest struct { + // The contact's name. + Name *string `json:"name,omitempty" url:"name,omitempty"` + // Whether the contact is a supplier. + IsSupplier *bool `json:"is_supplier,omitempty" url:"is_supplier,omitempty"` + // Whether the contact is a customer. + IsCustomer *bool `json:"is_customer,omitempty" url:"is_customer,omitempty"` + // The contact's email address. + EmailAddress *string `json:"email_address,omitempty" url:"email_address,omitempty"` + // The contact's tax number. + TaxNumber *string `json:"tax_number,omitempty" url:"tax_number,omitempty"` + // The contact's status + // + // * `ACTIVE` - ACTIVE + // * `ARCHIVED` - ARCHIVED + Status *ContactRequestStatus `json:"status,omitempty" url:"status,omitempty"` + // The currency the contact's transactions are in. + Currency *string `json:"currency,omitempty" url:"currency,omitempty"` + // The company the contact belongs to. + Company *string `json:"company,omitempty" url:"company,omitempty"` + // `Address` object IDs for the given `Contacts` object. + Addresses []*ContactRequestAddressesItem `json:"addresses,omitempty" url:"addresses,omitempty"` + // `AccountingPhoneNumber` object for the given `Contacts` object. + PhoneNumbers []*AccountingPhoneNumberRequest `json:"phone_numbers,omitempty" url:"phone_numbers,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + RemoteFields []*RemoteFieldRequest `json:"remote_fields,omitempty" url:"remote_fields,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (c *ContactRequest) GetName() *string { + if c == nil { + return nil + } + return c.Name +} + +func (c *ContactRequest) GetIsSupplier() *bool { + if c == nil { + return nil + } + return c.IsSupplier +} + +func (c *ContactRequest) GetIsCustomer() *bool { + if c == nil { + return nil + } + return c.IsCustomer +} + +func (c *ContactRequest) GetEmailAddress() *string { + if c == nil { + return nil + } + return c.EmailAddress +} + +func (c *ContactRequest) GetTaxNumber() *string { + if c == nil { + return nil + } + return c.TaxNumber +} + +func (c *ContactRequest) GetStatus() *ContactRequestStatus { + if c == nil { + return nil + } + return c.Status +} + +func (c *ContactRequest) GetCurrency() *string { + if c == nil { + return nil + } + return c.Currency +} + +func (c *ContactRequest) GetCompany() *string { + if c == nil { + return nil + } + return c.Company +} + +func (c *ContactRequest) GetAddresses() []*ContactRequestAddressesItem { + if c == nil { + return nil + } + return c.Addresses +} + +func (c *ContactRequest) GetPhoneNumbers() []*AccountingPhoneNumberRequest { + if c == nil { + return nil + } + return c.PhoneNumbers +} + +func (c *ContactRequest) GetIntegrationParams() map[string]interface{} { + if c == nil { + return nil + } + return c.IntegrationParams +} + +func (c *ContactRequest) GetLinkedAccountParams() map[string]interface{} { + if c == nil { + return nil + } + return c.LinkedAccountParams +} + +func (c *ContactRequest) GetRemoteFields() []*RemoteFieldRequest { + if c == nil { + return nil + } + return c.RemoteFields +} + +func (c *ContactRequest) GetExtraProperties() map[string]interface{} { + return c.extraProperties +} + +func (c *ContactRequest) UnmarshalJSON(data []byte) error { + type unmarshaler ContactRequest + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *c = ContactRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *c) + if err != nil { + return err + } + c.extraProperties = extraProperties + c.rawJSON = json.RawMessage(data) + return nil +} + +func (c *ContactRequest) String() string { + if len(c.rawJSON) > 0 { + if value, err := internal.StringifyJSON(c.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(c); err == nil { + return value + } + return fmt.Sprintf("%#v", c) +} + +type ContactRequestAddressesItem struct { + String string + Address *Address + + typ string +} + +func (c *ContactRequestAddressesItem) GetString() string { + if c == nil { + return "" + } + return c.String +} + +func (c *ContactRequestAddressesItem) GetAddress() *Address { + if c == nil { + return nil + } + return c.Address +} + +func (c *ContactRequestAddressesItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + c.typ = "String" + c.String = valueString + return nil + } + valueAddress := new(Address) + if err := json.Unmarshal(data, &valueAddress); err == nil { + c.typ = "Address" + c.Address = valueAddress + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, c) +} + +func (c ContactRequestAddressesItem) MarshalJSON() ([]byte, error) { + if c.typ == "String" || c.String != "" { + return json.Marshal(c.String) + } + if c.typ == "Address" || c.Address != nil { + return json.Marshal(c.Address) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", c) +} + +type ContactRequestAddressesItemVisitor interface { + VisitString(string) error + VisitAddress(*Address) error +} + +func (c *ContactRequestAddressesItem) Accept(visitor ContactRequestAddressesItemVisitor) error { + if c.typ == "String" || c.String != "" { + return visitor.VisitString(c.String) + } + if c.typ == "Address" || c.Address != nil { + return visitor.VisitAddress(c.Address) + } + return fmt.Errorf("type %T does not include a non-empty union type", c) +} + +// The contact's status +// +// * `ACTIVE` - ACTIVE +// * `ARCHIVED` - ARCHIVED +type ContactRequestStatus struct { + Status7D1Enum Status7D1Enum + String string + + typ string +} + +func (c *ContactRequestStatus) GetStatus7D1Enum() Status7D1Enum { + if c == nil { + return "" + } + return c.Status7D1Enum +} + +func (c *ContactRequestStatus) GetString() string { + if c == nil { + return "" + } + return c.String +} + +func (c *ContactRequestStatus) UnmarshalJSON(data []byte) error { + var valueStatus7D1Enum Status7D1Enum + if err := json.Unmarshal(data, &valueStatus7D1Enum); err == nil { + c.typ = "Status7D1Enum" + c.Status7D1Enum = valueStatus7D1Enum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + c.typ = "String" + c.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, c) +} + +func (c ContactRequestStatus) MarshalJSON() ([]byte, error) { + if c.typ == "Status7D1Enum" || c.Status7D1Enum != "" { + return json.Marshal(c.Status7D1Enum) + } + if c.typ == "String" || c.String != "" { + return json.Marshal(c.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", c) +} + +type ContactRequestStatusVisitor interface { + VisitStatus7D1Enum(Status7D1Enum) error + VisitString(string) error +} + +func (c *ContactRequestStatus) Accept(visitor ContactRequestStatusVisitor) error { + if c.typ == "Status7D1Enum" || c.Status7D1Enum != "" { + return visitor.VisitStatus7D1Enum(c.Status7D1Enum) + } + if c.typ == "String" || c.String != "" { + return visitor.VisitString(c.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", c) +} + +type ContactResponse struct { + Model *Contact `json:"model" url:"model"` + Warnings []*WarningValidationProblem `json:"warnings" url:"warnings"` + Errors []*ErrorValidationProblem `json:"errors" url:"errors"` + Logs []*DebugModeLog `json:"logs,omitempty" url:"logs,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (c *ContactResponse) GetModel() *Contact { + if c == nil { + return nil + } + return c.Model +} + +func (c *ContactResponse) GetWarnings() []*WarningValidationProblem { + if c == nil { + return nil + } + return c.Warnings +} + +func (c *ContactResponse) GetErrors() []*ErrorValidationProblem { + if c == nil { + return nil + } + return c.Errors +} + +func (c *ContactResponse) GetLogs() []*DebugModeLog { + if c == nil { + return nil + } + return c.Logs +} + +func (c *ContactResponse) GetExtraProperties() map[string]interface{} { + return c.extraProperties +} + +func (c *ContactResponse) UnmarshalJSON(data []byte) error { + type unmarshaler ContactResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *c = ContactResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *c) + if err != nil { + return err + } + c.extraProperties = extraProperties + c.rawJSON = json.RawMessage(data) + return nil +} + +func (c *ContactResponse) String() string { + if len(c.rawJSON) > 0 { + if value, err := internal.StringifyJSON(c.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(c); err == nil { + return value + } + return fmt.Sprintf("%#v", c) +} + +type PaginatedContactList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Contact `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedContactList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedContactList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedContactList) GetResults() []*Contact { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedContactList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedContactList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedContactList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedContactList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedContactList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} diff --git a/accounting/contacts/client.go b/accounting/contacts/client.go index d605299..4cc9bb7 100644 --- a/accounting/contacts/client.go +++ b/accounting/contacts/client.go @@ -1,148 +1,135 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package contacts import ( context "context" fmt "fmt" - accounting "github.com/merge-api/merge-go-client/accounting" - core "github.com/merge-api/merge-go-client/core" + accounting "github.com/merge-api/merge-go-client/v2/accounting" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `Contact` objects. -func (c *Client) List(ctx context.Context, request *accounting.ContactsListRequest) (*accounting.PaginatedContactList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/contacts" - - queryParams := make(url.Values) - if request.CompanyId != nil { - queryParams.Add("company_id", fmt.Sprintf("%v", *request.CompanyId)) - } - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.EmailAddress != nil { - queryParams.Add("email_address", fmt.Sprintf("%v", *request.EmailAddress)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeRemoteFields != nil { - queryParams.Add("include_remote_fields", fmt.Sprintf("%v", *request.IncludeRemoteFields)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.IsCustomer != nil { - queryParams.Add("is_customer", fmt.Sprintf("%v", *request.IsCustomer)) - } - if request.IsSupplier != nil { - queryParams.Add("is_supplier", fmt.Sprintf("%v", *request.IsSupplier)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.Name != nil { - queryParams.Add("name", fmt.Sprintf("%v", *request.Name)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteFields != nil { - queryParams.Add("remote_fields", fmt.Sprintf("%v", request.RemoteFields)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if request.ShowEnumOrigins != nil { - queryParams.Add("show_enum_origins", fmt.Sprintf("%v", request.ShowEnumOrigins)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *accounting.PaginatedContactList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *accounting.ContactsListRequest, + opts ...option.RequestOption, +) (*core.Page[*accounting.Contact], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/contacts" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *accounting.PaginatedContactList) *internal.PageResponse[*string, *accounting.Contact] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *accounting.Contact]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Creates a `Contact` object with the given values. -func (c *Client) Create(ctx context.Context, request *accounting.ContactEndpointRequest) (*accounting.ContactResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/contacts" - - queryParams := make(url.Values) - if request.IsDebugMode != nil { - queryParams.Add("is_debug_mode", fmt.Sprintf("%v", *request.IsDebugMode)) - } - if request.RunAsync != nil { - queryParams.Add("run_async", fmt.Sprintf("%v", *request.RunAsync)) +func (c *Client) Create( + ctx context.Context, + request *accounting.ContactEndpointRequest, + opts ...option.RequestOption, +) (*accounting.ContactResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/contacts" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *accounting.ContactResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -151,41 +138,46 @@ func (c *Client) Create(ctx context.Context, request *accounting.ContactEndpoint } // Returns a `Contact` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *accounting.ContactsRetrieveRequest) (*accounting.Contact, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"accounting/v1/contacts/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeRemoteFields != nil { - queryParams.Add("include_remote_fields", fmt.Sprintf("%v", *request.IncludeRemoteFields)) - } - if request.RemoteFields != nil { - queryParams.Add("remote_fields", fmt.Sprintf("%v", request.RemoteFields)) - } - if request.ShowEnumOrigins != nil { - queryParams.Add("show_enum_origins", fmt.Sprintf("%v", request.ShowEnumOrigins)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *accounting.ContactsRetrieveRequest, + opts ...option.RequestOption, +) (*accounting.Contact, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/accounting/v1/contacts/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *accounting.Contact if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -194,21 +186,34 @@ func (c *Client) Retrieve(ctx context.Context, id string, request *accounting.Co } // Returns metadata for `Contact` POSTs. -func (c *Client) MetaPostRetrieve(ctx context.Context) (*accounting.MetaResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/contacts/meta/post" +func (c *Client) MetaPostRetrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*accounting.MetaResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/contacts/meta/post" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *accounting.MetaResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -217,47 +222,60 @@ func (c *Client) MetaPostRetrieve(ctx context.Context) (*accounting.MetaResponse } // Returns a list of `RemoteFieldClass` objects. -func (c *Client) RemoteFieldClassesList(ctx context.Context, request *accounting.ContactsRemoteFieldClassesListRequest) (*accounting.PaginatedRemoteFieldClassList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/contacts/remote-field-classes" - - queryParams := make(url.Values) - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.IsCommonModelField != nil { - queryParams.Add("is_common_model_field", fmt.Sprintf("%v", *request.IsCommonModelField)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *accounting.PaginatedRemoteFieldClassList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) RemoteFieldClassesList( + ctx context.Context, + request *accounting.ContactsRemoteFieldClassesListRequest, + opts ...option.RequestOption, +) (*core.Page[*accounting.RemoteFieldClass], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/contacts/remote-field-classes" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *accounting.PaginatedRemoteFieldClassList) *internal.PageResponse[*string, *accounting.RemoteFieldClass] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *accounting.RemoteFieldClass]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } diff --git a/accounting/credit_notes.go b/accounting/credit_notes.go index 12f106f..f2de4b9 100644 --- a/accounting/credit_notes.go +++ b/accounting/credit_notes.go @@ -1,460 +1,104 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package accounting import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type CreditNoteEndpointRequest struct { // Whether to include debug fields (such as log file links) in the response. - IsDebugMode *bool `json:"-"` + IsDebugMode *bool `json:"-" url:"is_debug_mode,omitempty"` // Whether or not third-party updates should be run asynchronously. - RunAsync *bool `json:"-"` - Model *CreditNoteRequest `json:"model,omitempty"` + RunAsync *bool `json:"-" url:"run_async,omitempty"` + Model *CreditNoteRequest `json:"model,omitempty" url:"-"` } type CreditNotesListRequest struct { // If provided, will only return credit notes for this company. - CompanyId *string `json:"-"` + CompanyId *string `json:"-" url:"company_id,omitempty"` // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *CreditNotesListRequestExpand `json:"-"` + Expand []*CreditNotesListRequestExpandItem `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // Deprecated. Use show_enum_origins. - RemoteFields *CreditNotesListRequestRemoteFields `json:"-"` + RemoteFields *CreditNotesListRequestRemoteFields `json:"-" url:"remote_fields,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` // 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) - ShowEnumOrigins *CreditNotesListRequestShowEnumOrigins `json:"-"` + ShowEnumOrigins *CreditNotesListRequestShowEnumOrigins `json:"-" url:"show_enum_origins,omitempty"` // If provided, will only return objects created after this datetime. - TransactionDateAfter *time.Time `json:"-"` + TransactionDateAfter *time.Time `json:"-" url:"transaction_date_after,omitempty"` // If provided, will only return objects created before this datetime. - TransactionDateBefore *time.Time `json:"-"` + TransactionDateBefore *time.Time `json:"-" url:"transaction_date_before,omitempty"` } type CreditNotesRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *CreditNotesRetrieveRequestExpand `json:"-"` + Expand []*CreditNotesRetrieveRequestExpandItem `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // Deprecated. Use show_enum_origins. - RemoteFields *CreditNotesRetrieveRequestRemoteFields `json:"-"` + RemoteFields *CreditNotesRetrieveRequestRemoteFields `json:"-" url:"remote_fields,omitempty"` // 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) - ShowEnumOrigins *CreditNotesRetrieveRequestShowEnumOrigins `json:"-"` + ShowEnumOrigins *CreditNotesRetrieveRequestShowEnumOrigins `json:"-" url:"show_enum_origins,omitempty"` } -type CreditNotesListRequestExpand string +type CreditNotesListRequestExpandItem string const ( - CreditNotesListRequestExpandAccountingPeriod CreditNotesListRequestExpand = "accounting_period" - CreditNotesListRequestExpandAppliedPayments CreditNotesListRequestExpand = "applied_payments" - CreditNotesListRequestExpandAppliedPaymentsAccountingPeriod CreditNotesListRequestExpand = "applied_payments,accounting_period" - CreditNotesListRequestExpandAppliedPaymentsCompany CreditNotesListRequestExpand = "applied_payments,company" - CreditNotesListRequestExpandAppliedPaymentsCompanyAccountingPeriod CreditNotesListRequestExpand = "applied_payments,company,accounting_period" - CreditNotesListRequestExpandAppliedPaymentsContact CreditNotesListRequestExpand = "applied_payments,contact" - CreditNotesListRequestExpandAppliedPaymentsContactAccountingPeriod CreditNotesListRequestExpand = "applied_payments,contact,accounting_period" - CreditNotesListRequestExpandAppliedPaymentsContactCompany CreditNotesListRequestExpand = "applied_payments,contact,company" - CreditNotesListRequestExpandAppliedPaymentsContactCompanyAccountingPeriod CreditNotesListRequestExpand = "applied_payments,contact,company,accounting_period" - CreditNotesListRequestExpandAppliedPaymentsLineItems CreditNotesListRequestExpand = "applied_payments,line_items" - CreditNotesListRequestExpandAppliedPaymentsLineItemsAccountingPeriod CreditNotesListRequestExpand = "applied_payments,line_items,accounting_period" - CreditNotesListRequestExpandAppliedPaymentsLineItemsCompany CreditNotesListRequestExpand = "applied_payments,line_items,company" - CreditNotesListRequestExpandAppliedPaymentsLineItemsCompanyAccountingPeriod CreditNotesListRequestExpand = "applied_payments,line_items,company,accounting_period" - CreditNotesListRequestExpandAppliedPaymentsLineItemsContact CreditNotesListRequestExpand = "applied_payments,line_items,contact" - CreditNotesListRequestExpandAppliedPaymentsLineItemsContactAccountingPeriod CreditNotesListRequestExpand = "applied_payments,line_items,contact,accounting_period" - CreditNotesListRequestExpandAppliedPaymentsLineItemsContactCompany CreditNotesListRequestExpand = "applied_payments,line_items,contact,company" - CreditNotesListRequestExpandAppliedPaymentsLineItemsContactCompanyAccountingPeriod CreditNotesListRequestExpand = "applied_payments,line_items,contact,company,accounting_period" - CreditNotesListRequestExpandAppliedPaymentsLineItemsTrackingCategories CreditNotesListRequestExpand = "applied_payments,line_items,tracking_categories" - CreditNotesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAccountingPeriod CreditNotesListRequestExpand = "applied_payments,line_items,tracking_categories,accounting_period" - CreditNotesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesCompany CreditNotesListRequestExpand = "applied_payments,line_items,tracking_categories,company" - CreditNotesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesCompanyAccountingPeriod CreditNotesListRequestExpand = "applied_payments,line_items,tracking_categories,company,accounting_period" - CreditNotesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesContact CreditNotesListRequestExpand = "applied_payments,line_items,tracking_categories,contact" - CreditNotesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesContactAccountingPeriod CreditNotesListRequestExpand = "applied_payments,line_items,tracking_categories,contact,accounting_period" - CreditNotesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesContactCompany CreditNotesListRequestExpand = "applied_payments,line_items,tracking_categories,contact,company" - CreditNotesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesContactCompanyAccountingPeriod CreditNotesListRequestExpand = "applied_payments,line_items,tracking_categories,contact,company,accounting_period" - CreditNotesListRequestExpandAppliedPaymentsTrackingCategories CreditNotesListRequestExpand = "applied_payments,tracking_categories" - CreditNotesListRequestExpandAppliedPaymentsTrackingCategoriesAccountingPeriod CreditNotesListRequestExpand = "applied_payments,tracking_categories,accounting_period" - CreditNotesListRequestExpandAppliedPaymentsTrackingCategoriesCompany CreditNotesListRequestExpand = "applied_payments,tracking_categories,company" - CreditNotesListRequestExpandAppliedPaymentsTrackingCategoriesCompanyAccountingPeriod CreditNotesListRequestExpand = "applied_payments,tracking_categories,company,accounting_period" - CreditNotesListRequestExpandAppliedPaymentsTrackingCategoriesContact CreditNotesListRequestExpand = "applied_payments,tracking_categories,contact" - CreditNotesListRequestExpandAppliedPaymentsTrackingCategoriesContactAccountingPeriod CreditNotesListRequestExpand = "applied_payments,tracking_categories,contact,accounting_period" - CreditNotesListRequestExpandAppliedPaymentsTrackingCategoriesContactCompany CreditNotesListRequestExpand = "applied_payments,tracking_categories,contact,company" - CreditNotesListRequestExpandAppliedPaymentsTrackingCategoriesContactCompanyAccountingPeriod CreditNotesListRequestExpand = "applied_payments,tracking_categories,contact,company,accounting_period" - CreditNotesListRequestExpandCompany CreditNotesListRequestExpand = "company" - CreditNotesListRequestExpandCompanyAccountingPeriod CreditNotesListRequestExpand = "company,accounting_period" - CreditNotesListRequestExpandContact CreditNotesListRequestExpand = "contact" - CreditNotesListRequestExpandContactAccountingPeriod CreditNotesListRequestExpand = "contact,accounting_period" - CreditNotesListRequestExpandContactCompany CreditNotesListRequestExpand = "contact,company" - CreditNotesListRequestExpandContactCompanyAccountingPeriod CreditNotesListRequestExpand = "contact,company,accounting_period" - CreditNotesListRequestExpandLineItems CreditNotesListRequestExpand = "line_items" - CreditNotesListRequestExpandLineItemsAccountingPeriod CreditNotesListRequestExpand = "line_items,accounting_period" - CreditNotesListRequestExpandLineItemsCompany CreditNotesListRequestExpand = "line_items,company" - CreditNotesListRequestExpandLineItemsCompanyAccountingPeriod CreditNotesListRequestExpand = "line_items,company,accounting_period" - CreditNotesListRequestExpandLineItemsContact CreditNotesListRequestExpand = "line_items,contact" - CreditNotesListRequestExpandLineItemsContactAccountingPeriod CreditNotesListRequestExpand = "line_items,contact,accounting_period" - CreditNotesListRequestExpandLineItemsContactCompany CreditNotesListRequestExpand = "line_items,contact,company" - CreditNotesListRequestExpandLineItemsContactCompanyAccountingPeriod CreditNotesListRequestExpand = "line_items,contact,company,accounting_period" - CreditNotesListRequestExpandLineItemsTrackingCategories CreditNotesListRequestExpand = "line_items,tracking_categories" - CreditNotesListRequestExpandLineItemsTrackingCategoriesAccountingPeriod CreditNotesListRequestExpand = "line_items,tracking_categories,accounting_period" - CreditNotesListRequestExpandLineItemsTrackingCategoriesCompany CreditNotesListRequestExpand = "line_items,tracking_categories,company" - CreditNotesListRequestExpandLineItemsTrackingCategoriesCompanyAccountingPeriod CreditNotesListRequestExpand = "line_items,tracking_categories,company,accounting_period" - CreditNotesListRequestExpandLineItemsTrackingCategoriesContact CreditNotesListRequestExpand = "line_items,tracking_categories,contact" - CreditNotesListRequestExpandLineItemsTrackingCategoriesContactAccountingPeriod CreditNotesListRequestExpand = "line_items,tracking_categories,contact,accounting_period" - CreditNotesListRequestExpandLineItemsTrackingCategoriesContactCompany CreditNotesListRequestExpand = "line_items,tracking_categories,contact,company" - CreditNotesListRequestExpandLineItemsTrackingCategoriesContactCompanyAccountingPeriod CreditNotesListRequestExpand = "line_items,tracking_categories,contact,company,accounting_period" - CreditNotesListRequestExpandPayments CreditNotesListRequestExpand = "payments" - CreditNotesListRequestExpandPaymentsAccountingPeriod CreditNotesListRequestExpand = "payments,accounting_period" - CreditNotesListRequestExpandPaymentsAppliedPayments CreditNotesListRequestExpand = "payments,applied_payments" - CreditNotesListRequestExpandPaymentsAppliedPaymentsAccountingPeriod CreditNotesListRequestExpand = "payments,applied_payments,accounting_period" - CreditNotesListRequestExpandPaymentsAppliedPaymentsCompany CreditNotesListRequestExpand = "payments,applied_payments,company" - CreditNotesListRequestExpandPaymentsAppliedPaymentsCompanyAccountingPeriod CreditNotesListRequestExpand = "payments,applied_payments,company,accounting_period" - CreditNotesListRequestExpandPaymentsAppliedPaymentsContact CreditNotesListRequestExpand = "payments,applied_payments,contact" - CreditNotesListRequestExpandPaymentsAppliedPaymentsContactAccountingPeriod CreditNotesListRequestExpand = "payments,applied_payments,contact,accounting_period" - CreditNotesListRequestExpandPaymentsAppliedPaymentsContactCompany CreditNotesListRequestExpand = "payments,applied_payments,contact,company" - CreditNotesListRequestExpandPaymentsAppliedPaymentsContactCompanyAccountingPeriod CreditNotesListRequestExpand = "payments,applied_payments,contact,company,accounting_period" - CreditNotesListRequestExpandPaymentsAppliedPaymentsLineItems CreditNotesListRequestExpand = "payments,applied_payments,line_items" - CreditNotesListRequestExpandPaymentsAppliedPaymentsLineItemsAccountingPeriod CreditNotesListRequestExpand = "payments,applied_payments,line_items,accounting_period" - CreditNotesListRequestExpandPaymentsAppliedPaymentsLineItemsCompany CreditNotesListRequestExpand = "payments,applied_payments,line_items,company" - CreditNotesListRequestExpandPaymentsAppliedPaymentsLineItemsCompanyAccountingPeriod CreditNotesListRequestExpand = "payments,applied_payments,line_items,company,accounting_period" - CreditNotesListRequestExpandPaymentsAppliedPaymentsLineItemsContact CreditNotesListRequestExpand = "payments,applied_payments,line_items,contact" - CreditNotesListRequestExpandPaymentsAppliedPaymentsLineItemsContactAccountingPeriod CreditNotesListRequestExpand = "payments,applied_payments,line_items,contact,accounting_period" - CreditNotesListRequestExpandPaymentsAppliedPaymentsLineItemsContactCompany CreditNotesListRequestExpand = "payments,applied_payments,line_items,contact,company" - CreditNotesListRequestExpandPaymentsAppliedPaymentsLineItemsContactCompanyAccountingPeriod CreditNotesListRequestExpand = "payments,applied_payments,line_items,contact,company,accounting_period" - CreditNotesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategories CreditNotesListRequestExpand = "payments,applied_payments,line_items,tracking_categories" - CreditNotesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAccountingPeriod CreditNotesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,accounting_period" - CreditNotesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesCompany CreditNotesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,company" - CreditNotesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesCompanyAccountingPeriod CreditNotesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,company,accounting_period" - CreditNotesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesContact CreditNotesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,contact" - CreditNotesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesContactAccountingPeriod CreditNotesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,contact,accounting_period" - CreditNotesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesContactCompany CreditNotesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,contact,company" - CreditNotesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesContactCompanyAccountingPeriod CreditNotesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,contact,company,accounting_period" - CreditNotesListRequestExpandPaymentsAppliedPaymentsTrackingCategories CreditNotesListRequestExpand = "payments,applied_payments,tracking_categories" - CreditNotesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAccountingPeriod CreditNotesListRequestExpand = "payments,applied_payments,tracking_categories,accounting_period" - CreditNotesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesCompany CreditNotesListRequestExpand = "payments,applied_payments,tracking_categories,company" - CreditNotesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesCompanyAccountingPeriod CreditNotesListRequestExpand = "payments,applied_payments,tracking_categories,company,accounting_period" - CreditNotesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesContact CreditNotesListRequestExpand = "payments,applied_payments,tracking_categories,contact" - CreditNotesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesContactAccountingPeriod CreditNotesListRequestExpand = "payments,applied_payments,tracking_categories,contact,accounting_period" - CreditNotesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesContactCompany CreditNotesListRequestExpand = "payments,applied_payments,tracking_categories,contact,company" - CreditNotesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesContactCompanyAccountingPeriod CreditNotesListRequestExpand = "payments,applied_payments,tracking_categories,contact,company,accounting_period" - CreditNotesListRequestExpandPaymentsCompany CreditNotesListRequestExpand = "payments,company" - CreditNotesListRequestExpandPaymentsCompanyAccountingPeriod CreditNotesListRequestExpand = "payments,company,accounting_period" - CreditNotesListRequestExpandPaymentsContact CreditNotesListRequestExpand = "payments,contact" - CreditNotesListRequestExpandPaymentsContactAccountingPeriod CreditNotesListRequestExpand = "payments,contact,accounting_period" - CreditNotesListRequestExpandPaymentsContactCompany CreditNotesListRequestExpand = "payments,contact,company" - CreditNotesListRequestExpandPaymentsContactCompanyAccountingPeriod CreditNotesListRequestExpand = "payments,contact,company,accounting_period" - CreditNotesListRequestExpandPaymentsLineItems CreditNotesListRequestExpand = "payments,line_items" - CreditNotesListRequestExpandPaymentsLineItemsAccountingPeriod CreditNotesListRequestExpand = "payments,line_items,accounting_period" - CreditNotesListRequestExpandPaymentsLineItemsCompany CreditNotesListRequestExpand = "payments,line_items,company" - CreditNotesListRequestExpandPaymentsLineItemsCompanyAccountingPeriod CreditNotesListRequestExpand = "payments,line_items,company,accounting_period" - CreditNotesListRequestExpandPaymentsLineItemsContact CreditNotesListRequestExpand = "payments,line_items,contact" - CreditNotesListRequestExpandPaymentsLineItemsContactAccountingPeriod CreditNotesListRequestExpand = "payments,line_items,contact,accounting_period" - CreditNotesListRequestExpandPaymentsLineItemsContactCompany CreditNotesListRequestExpand = "payments,line_items,contact,company" - CreditNotesListRequestExpandPaymentsLineItemsContactCompanyAccountingPeriod CreditNotesListRequestExpand = "payments,line_items,contact,company,accounting_period" - CreditNotesListRequestExpandPaymentsLineItemsTrackingCategories CreditNotesListRequestExpand = "payments,line_items,tracking_categories" - CreditNotesListRequestExpandPaymentsLineItemsTrackingCategoriesAccountingPeriod CreditNotesListRequestExpand = "payments,line_items,tracking_categories,accounting_period" - CreditNotesListRequestExpandPaymentsLineItemsTrackingCategoriesCompany CreditNotesListRequestExpand = "payments,line_items,tracking_categories,company" - CreditNotesListRequestExpandPaymentsLineItemsTrackingCategoriesCompanyAccountingPeriod CreditNotesListRequestExpand = "payments,line_items,tracking_categories,company,accounting_period" - CreditNotesListRequestExpandPaymentsLineItemsTrackingCategoriesContact CreditNotesListRequestExpand = "payments,line_items,tracking_categories,contact" - CreditNotesListRequestExpandPaymentsLineItemsTrackingCategoriesContactAccountingPeriod CreditNotesListRequestExpand = "payments,line_items,tracking_categories,contact,accounting_period" - CreditNotesListRequestExpandPaymentsLineItemsTrackingCategoriesContactCompany CreditNotesListRequestExpand = "payments,line_items,tracking_categories,contact,company" - CreditNotesListRequestExpandPaymentsLineItemsTrackingCategoriesContactCompanyAccountingPeriod CreditNotesListRequestExpand = "payments,line_items,tracking_categories,contact,company,accounting_period" - CreditNotesListRequestExpandPaymentsTrackingCategories CreditNotesListRequestExpand = "payments,tracking_categories" - CreditNotesListRequestExpandPaymentsTrackingCategoriesAccountingPeriod CreditNotesListRequestExpand = "payments,tracking_categories,accounting_period" - CreditNotesListRequestExpandPaymentsTrackingCategoriesCompany CreditNotesListRequestExpand = "payments,tracking_categories,company" - CreditNotesListRequestExpandPaymentsTrackingCategoriesCompanyAccountingPeriod CreditNotesListRequestExpand = "payments,tracking_categories,company,accounting_period" - CreditNotesListRequestExpandPaymentsTrackingCategoriesContact CreditNotesListRequestExpand = "payments,tracking_categories,contact" - CreditNotesListRequestExpandPaymentsTrackingCategoriesContactAccountingPeriod CreditNotesListRequestExpand = "payments,tracking_categories,contact,accounting_period" - CreditNotesListRequestExpandPaymentsTrackingCategoriesContactCompany CreditNotesListRequestExpand = "payments,tracking_categories,contact,company" - CreditNotesListRequestExpandPaymentsTrackingCategoriesContactCompanyAccountingPeriod CreditNotesListRequestExpand = "payments,tracking_categories,contact,company,accounting_period" - CreditNotesListRequestExpandTrackingCategories CreditNotesListRequestExpand = "tracking_categories" - CreditNotesListRequestExpandTrackingCategoriesAccountingPeriod CreditNotesListRequestExpand = "tracking_categories,accounting_period" - CreditNotesListRequestExpandTrackingCategoriesCompany CreditNotesListRequestExpand = "tracking_categories,company" - CreditNotesListRequestExpandTrackingCategoriesCompanyAccountingPeriod CreditNotesListRequestExpand = "tracking_categories,company,accounting_period" - CreditNotesListRequestExpandTrackingCategoriesContact CreditNotesListRequestExpand = "tracking_categories,contact" - CreditNotesListRequestExpandTrackingCategoriesContactAccountingPeriod CreditNotesListRequestExpand = "tracking_categories,contact,accounting_period" - CreditNotesListRequestExpandTrackingCategoriesContactCompany CreditNotesListRequestExpand = "tracking_categories,contact,company" - CreditNotesListRequestExpandTrackingCategoriesContactCompanyAccountingPeriod CreditNotesListRequestExpand = "tracking_categories,contact,company,accounting_period" + CreditNotesListRequestExpandItemAccountingPeriod CreditNotesListRequestExpandItem = "accounting_period" + CreditNotesListRequestExpandItemAppliedPayments CreditNotesListRequestExpandItem = "applied_payments" + CreditNotesListRequestExpandItemCompany CreditNotesListRequestExpandItem = "company" + CreditNotesListRequestExpandItemContact CreditNotesListRequestExpandItem = "contact" + CreditNotesListRequestExpandItemLineItems CreditNotesListRequestExpandItem = "line_items" + CreditNotesListRequestExpandItemPayments CreditNotesListRequestExpandItem = "payments" + CreditNotesListRequestExpandItemTrackingCategories CreditNotesListRequestExpandItem = "tracking_categories" ) -func NewCreditNotesListRequestExpandFromString(s string) (CreditNotesListRequestExpand, error) { +func NewCreditNotesListRequestExpandItemFromString(s string) (CreditNotesListRequestExpandItem, error) { switch s { case "accounting_period": - return CreditNotesListRequestExpandAccountingPeriod, nil + return CreditNotesListRequestExpandItemAccountingPeriod, nil case "applied_payments": - return CreditNotesListRequestExpandAppliedPayments, nil - case "applied_payments,accounting_period": - return CreditNotesListRequestExpandAppliedPaymentsAccountingPeriod, nil - case "applied_payments,company": - return CreditNotesListRequestExpandAppliedPaymentsCompany, nil - case "applied_payments,company,accounting_period": - return CreditNotesListRequestExpandAppliedPaymentsCompanyAccountingPeriod, nil - case "applied_payments,contact": - return CreditNotesListRequestExpandAppliedPaymentsContact, nil - case "applied_payments,contact,accounting_period": - return CreditNotesListRequestExpandAppliedPaymentsContactAccountingPeriod, nil - case "applied_payments,contact,company": - return CreditNotesListRequestExpandAppliedPaymentsContactCompany, nil - case "applied_payments,contact,company,accounting_period": - return CreditNotesListRequestExpandAppliedPaymentsContactCompanyAccountingPeriod, nil - case "applied_payments,line_items": - return CreditNotesListRequestExpandAppliedPaymentsLineItems, nil - case "applied_payments,line_items,accounting_period": - return CreditNotesListRequestExpandAppliedPaymentsLineItemsAccountingPeriod, nil - case "applied_payments,line_items,company": - return CreditNotesListRequestExpandAppliedPaymentsLineItemsCompany, nil - case "applied_payments,line_items,company,accounting_period": - return CreditNotesListRequestExpandAppliedPaymentsLineItemsCompanyAccountingPeriod, nil - case "applied_payments,line_items,contact": - return CreditNotesListRequestExpandAppliedPaymentsLineItemsContact, nil - case "applied_payments,line_items,contact,accounting_period": - return CreditNotesListRequestExpandAppliedPaymentsLineItemsContactAccountingPeriod, nil - case "applied_payments,line_items,contact,company": - return CreditNotesListRequestExpandAppliedPaymentsLineItemsContactCompany, nil - case "applied_payments,line_items,contact,company,accounting_period": - return CreditNotesListRequestExpandAppliedPaymentsLineItemsContactCompanyAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories": - return CreditNotesListRequestExpandAppliedPaymentsLineItemsTrackingCategories, nil - case "applied_payments,line_items,tracking_categories,accounting_period": - return CreditNotesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,company": - return CreditNotesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesCompany, nil - case "applied_payments,line_items,tracking_categories,company,accounting_period": - return CreditNotesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesCompanyAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,contact": - return CreditNotesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesContact, nil - case "applied_payments,line_items,tracking_categories,contact,accounting_period": - return CreditNotesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesContactAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,contact,company": - return CreditNotesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesContactCompany, nil - case "applied_payments,line_items,tracking_categories,contact,company,accounting_period": - return CreditNotesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesContactCompanyAccountingPeriod, nil - case "applied_payments,tracking_categories": - return CreditNotesListRequestExpandAppliedPaymentsTrackingCategories, nil - case "applied_payments,tracking_categories,accounting_period": - return CreditNotesListRequestExpandAppliedPaymentsTrackingCategoriesAccountingPeriod, nil - case "applied_payments,tracking_categories,company": - return CreditNotesListRequestExpandAppliedPaymentsTrackingCategoriesCompany, nil - case "applied_payments,tracking_categories,company,accounting_period": - return CreditNotesListRequestExpandAppliedPaymentsTrackingCategoriesCompanyAccountingPeriod, nil - case "applied_payments,tracking_categories,contact": - return CreditNotesListRequestExpandAppliedPaymentsTrackingCategoriesContact, nil - case "applied_payments,tracking_categories,contact,accounting_period": - return CreditNotesListRequestExpandAppliedPaymentsTrackingCategoriesContactAccountingPeriod, nil - case "applied_payments,tracking_categories,contact,company": - return CreditNotesListRequestExpandAppliedPaymentsTrackingCategoriesContactCompany, nil - case "applied_payments,tracking_categories,contact,company,accounting_period": - return CreditNotesListRequestExpandAppliedPaymentsTrackingCategoriesContactCompanyAccountingPeriod, nil + return CreditNotesListRequestExpandItemAppliedPayments, nil case "company": - return CreditNotesListRequestExpandCompany, nil - case "company,accounting_period": - return CreditNotesListRequestExpandCompanyAccountingPeriod, nil + return CreditNotesListRequestExpandItemCompany, nil case "contact": - return CreditNotesListRequestExpandContact, nil - case "contact,accounting_period": - return CreditNotesListRequestExpandContactAccountingPeriod, nil - case "contact,company": - return CreditNotesListRequestExpandContactCompany, nil - case "contact,company,accounting_period": - return CreditNotesListRequestExpandContactCompanyAccountingPeriod, nil + return CreditNotesListRequestExpandItemContact, nil case "line_items": - return CreditNotesListRequestExpandLineItems, nil - case "line_items,accounting_period": - return CreditNotesListRequestExpandLineItemsAccountingPeriod, nil - case "line_items,company": - return CreditNotesListRequestExpandLineItemsCompany, nil - case "line_items,company,accounting_period": - return CreditNotesListRequestExpandLineItemsCompanyAccountingPeriod, nil - case "line_items,contact": - return CreditNotesListRequestExpandLineItemsContact, nil - case "line_items,contact,accounting_period": - return CreditNotesListRequestExpandLineItemsContactAccountingPeriod, nil - case "line_items,contact,company": - return CreditNotesListRequestExpandLineItemsContactCompany, nil - case "line_items,contact,company,accounting_period": - return CreditNotesListRequestExpandLineItemsContactCompanyAccountingPeriod, nil - case "line_items,tracking_categories": - return CreditNotesListRequestExpandLineItemsTrackingCategories, nil - case "line_items,tracking_categories,accounting_period": - return CreditNotesListRequestExpandLineItemsTrackingCategoriesAccountingPeriod, nil - case "line_items,tracking_categories,company": - return CreditNotesListRequestExpandLineItemsTrackingCategoriesCompany, nil - case "line_items,tracking_categories,company,accounting_period": - return CreditNotesListRequestExpandLineItemsTrackingCategoriesCompanyAccountingPeriod, nil - case "line_items,tracking_categories,contact": - return CreditNotesListRequestExpandLineItemsTrackingCategoriesContact, nil - case "line_items,tracking_categories,contact,accounting_period": - return CreditNotesListRequestExpandLineItemsTrackingCategoriesContactAccountingPeriod, nil - case "line_items,tracking_categories,contact,company": - return CreditNotesListRequestExpandLineItemsTrackingCategoriesContactCompany, nil - case "line_items,tracking_categories,contact,company,accounting_period": - return CreditNotesListRequestExpandLineItemsTrackingCategoriesContactCompanyAccountingPeriod, nil + return CreditNotesListRequestExpandItemLineItems, nil case "payments": - return CreditNotesListRequestExpandPayments, nil - case "payments,accounting_period": - return CreditNotesListRequestExpandPaymentsAccountingPeriod, nil - case "payments,applied_payments": - return CreditNotesListRequestExpandPaymentsAppliedPayments, nil - case "payments,applied_payments,accounting_period": - return CreditNotesListRequestExpandPaymentsAppliedPaymentsAccountingPeriod, nil - case "payments,applied_payments,company": - return CreditNotesListRequestExpandPaymentsAppliedPaymentsCompany, nil - case "payments,applied_payments,company,accounting_period": - return CreditNotesListRequestExpandPaymentsAppliedPaymentsCompanyAccountingPeriod, nil - case "payments,applied_payments,contact": - return CreditNotesListRequestExpandPaymentsAppliedPaymentsContact, nil - case "payments,applied_payments,contact,accounting_period": - return CreditNotesListRequestExpandPaymentsAppliedPaymentsContactAccountingPeriod, nil - case "payments,applied_payments,contact,company": - return CreditNotesListRequestExpandPaymentsAppliedPaymentsContactCompany, nil - case "payments,applied_payments,contact,company,accounting_period": - return CreditNotesListRequestExpandPaymentsAppliedPaymentsContactCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items": - return CreditNotesListRequestExpandPaymentsAppliedPaymentsLineItems, nil - case "payments,applied_payments,line_items,accounting_period": - return CreditNotesListRequestExpandPaymentsAppliedPaymentsLineItemsAccountingPeriod, nil - case "payments,applied_payments,line_items,company": - return CreditNotesListRequestExpandPaymentsAppliedPaymentsLineItemsCompany, nil - case "payments,applied_payments,line_items,company,accounting_period": - return CreditNotesListRequestExpandPaymentsAppliedPaymentsLineItemsCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,contact": - return CreditNotesListRequestExpandPaymentsAppliedPaymentsLineItemsContact, nil - case "payments,applied_payments,line_items,contact,accounting_period": - return CreditNotesListRequestExpandPaymentsAppliedPaymentsLineItemsContactAccountingPeriod, nil - case "payments,applied_payments,line_items,contact,company": - return CreditNotesListRequestExpandPaymentsAppliedPaymentsLineItemsContactCompany, nil - case "payments,applied_payments,line_items,contact,company,accounting_period": - return CreditNotesListRequestExpandPaymentsAppliedPaymentsLineItemsContactCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories": - return CreditNotesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategories, nil - case "payments,applied_payments,line_items,tracking_categories,accounting_period": - return CreditNotesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,company": - return CreditNotesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesCompany, nil - case "payments,applied_payments,line_items,tracking_categories,company,accounting_period": - return CreditNotesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,contact": - return CreditNotesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesContact, nil - case "payments,applied_payments,line_items,tracking_categories,contact,accounting_period": - return CreditNotesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesContactAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,contact,company": - return CreditNotesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesContactCompany, nil - case "payments,applied_payments,line_items,tracking_categories,contact,company,accounting_period": - return CreditNotesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesContactCompanyAccountingPeriod, nil - case "payments,applied_payments,tracking_categories": - return CreditNotesListRequestExpandPaymentsAppliedPaymentsTrackingCategories, nil - case "payments,applied_payments,tracking_categories,accounting_period": - return CreditNotesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,company": - return CreditNotesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesCompany, nil - case "payments,applied_payments,tracking_categories,company,accounting_period": - return CreditNotesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesCompanyAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,contact": - return CreditNotesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesContact, nil - case "payments,applied_payments,tracking_categories,contact,accounting_period": - return CreditNotesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesContactAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,contact,company": - return CreditNotesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesContactCompany, nil - case "payments,applied_payments,tracking_categories,contact,company,accounting_period": - return CreditNotesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesContactCompanyAccountingPeriod, nil - case "payments,company": - return CreditNotesListRequestExpandPaymentsCompany, nil - case "payments,company,accounting_period": - return CreditNotesListRequestExpandPaymentsCompanyAccountingPeriod, nil - case "payments,contact": - return CreditNotesListRequestExpandPaymentsContact, nil - case "payments,contact,accounting_period": - return CreditNotesListRequestExpandPaymentsContactAccountingPeriod, nil - case "payments,contact,company": - return CreditNotesListRequestExpandPaymentsContactCompany, nil - case "payments,contact,company,accounting_period": - return CreditNotesListRequestExpandPaymentsContactCompanyAccountingPeriod, nil - case "payments,line_items": - return CreditNotesListRequestExpandPaymentsLineItems, nil - case "payments,line_items,accounting_period": - return CreditNotesListRequestExpandPaymentsLineItemsAccountingPeriod, nil - case "payments,line_items,company": - return CreditNotesListRequestExpandPaymentsLineItemsCompany, nil - case "payments,line_items,company,accounting_period": - return CreditNotesListRequestExpandPaymentsLineItemsCompanyAccountingPeriod, nil - case "payments,line_items,contact": - return CreditNotesListRequestExpandPaymentsLineItemsContact, nil - case "payments,line_items,contact,accounting_period": - return CreditNotesListRequestExpandPaymentsLineItemsContactAccountingPeriod, nil - case "payments,line_items,contact,company": - return CreditNotesListRequestExpandPaymentsLineItemsContactCompany, nil - case "payments,line_items,contact,company,accounting_period": - return CreditNotesListRequestExpandPaymentsLineItemsContactCompanyAccountingPeriod, nil - case "payments,line_items,tracking_categories": - return CreditNotesListRequestExpandPaymentsLineItemsTrackingCategories, nil - case "payments,line_items,tracking_categories,accounting_period": - return CreditNotesListRequestExpandPaymentsLineItemsTrackingCategoriesAccountingPeriod, nil - case "payments,line_items,tracking_categories,company": - return CreditNotesListRequestExpandPaymentsLineItemsTrackingCategoriesCompany, nil - case "payments,line_items,tracking_categories,company,accounting_period": - return CreditNotesListRequestExpandPaymentsLineItemsTrackingCategoriesCompanyAccountingPeriod, nil - case "payments,line_items,tracking_categories,contact": - return CreditNotesListRequestExpandPaymentsLineItemsTrackingCategoriesContact, nil - case "payments,line_items,tracking_categories,contact,accounting_period": - return CreditNotesListRequestExpandPaymentsLineItemsTrackingCategoriesContactAccountingPeriod, nil - case "payments,line_items,tracking_categories,contact,company": - return CreditNotesListRequestExpandPaymentsLineItemsTrackingCategoriesContactCompany, nil - case "payments,line_items,tracking_categories,contact,company,accounting_period": - return CreditNotesListRequestExpandPaymentsLineItemsTrackingCategoriesContactCompanyAccountingPeriod, nil - case "payments,tracking_categories": - return CreditNotesListRequestExpandPaymentsTrackingCategories, nil - case "payments,tracking_categories,accounting_period": - return CreditNotesListRequestExpandPaymentsTrackingCategoriesAccountingPeriod, nil - case "payments,tracking_categories,company": - return CreditNotesListRequestExpandPaymentsTrackingCategoriesCompany, nil - case "payments,tracking_categories,company,accounting_period": - return CreditNotesListRequestExpandPaymentsTrackingCategoriesCompanyAccountingPeriod, nil - case "payments,tracking_categories,contact": - return CreditNotesListRequestExpandPaymentsTrackingCategoriesContact, nil - case "payments,tracking_categories,contact,accounting_period": - return CreditNotesListRequestExpandPaymentsTrackingCategoriesContactAccountingPeriod, nil - case "payments,tracking_categories,contact,company": - return CreditNotesListRequestExpandPaymentsTrackingCategoriesContactCompany, nil - case "payments,tracking_categories,contact,company,accounting_period": - return CreditNotesListRequestExpandPaymentsTrackingCategoriesContactCompanyAccountingPeriod, nil + return CreditNotesListRequestExpandItemPayments, nil case "tracking_categories": - return CreditNotesListRequestExpandTrackingCategories, nil - case "tracking_categories,accounting_period": - return CreditNotesListRequestExpandTrackingCategoriesAccountingPeriod, nil - case "tracking_categories,company": - return CreditNotesListRequestExpandTrackingCategoriesCompany, nil - case "tracking_categories,company,accounting_period": - return CreditNotesListRequestExpandTrackingCategoriesCompanyAccountingPeriod, nil - case "tracking_categories,contact": - return CreditNotesListRequestExpandTrackingCategoriesContact, nil - case "tracking_categories,contact,accounting_period": - return CreditNotesListRequestExpandTrackingCategoriesContactAccountingPeriod, nil - case "tracking_categories,contact,company": - return CreditNotesListRequestExpandTrackingCategoriesContactCompany, nil - case "tracking_categories,contact,company,accounting_period": - return CreditNotesListRequestExpandTrackingCategoriesContactCompanyAccountingPeriod, nil - } - var t CreditNotesListRequestExpand + return CreditNotesListRequestExpandItemTrackingCategories, nil + } + var t CreditNotesListRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (c CreditNotesListRequestExpand) Ptr() *CreditNotesListRequestExpand { +func (c CreditNotesListRequestExpandItem) Ptr() *CreditNotesListRequestExpandItem { return &c } @@ -508,400 +152,40 @@ func (c CreditNotesListRequestShowEnumOrigins) Ptr() *CreditNotesListRequestShow return &c } -type CreditNotesRetrieveRequestExpand string +type CreditNotesRetrieveRequestExpandItem string const ( - CreditNotesRetrieveRequestExpandAccountingPeriod CreditNotesRetrieveRequestExpand = "accounting_period" - CreditNotesRetrieveRequestExpandAppliedPayments CreditNotesRetrieveRequestExpand = "applied_payments" - CreditNotesRetrieveRequestExpandAppliedPaymentsAccountingPeriod CreditNotesRetrieveRequestExpand = "applied_payments,accounting_period" - CreditNotesRetrieveRequestExpandAppliedPaymentsCompany CreditNotesRetrieveRequestExpand = "applied_payments,company" - CreditNotesRetrieveRequestExpandAppliedPaymentsCompanyAccountingPeriod CreditNotesRetrieveRequestExpand = "applied_payments,company,accounting_period" - CreditNotesRetrieveRequestExpandAppliedPaymentsContact CreditNotesRetrieveRequestExpand = "applied_payments,contact" - CreditNotesRetrieveRequestExpandAppliedPaymentsContactAccountingPeriod CreditNotesRetrieveRequestExpand = "applied_payments,contact,accounting_period" - CreditNotesRetrieveRequestExpandAppliedPaymentsContactCompany CreditNotesRetrieveRequestExpand = "applied_payments,contact,company" - CreditNotesRetrieveRequestExpandAppliedPaymentsContactCompanyAccountingPeriod CreditNotesRetrieveRequestExpand = "applied_payments,contact,company,accounting_period" - CreditNotesRetrieveRequestExpandAppliedPaymentsLineItems CreditNotesRetrieveRequestExpand = "applied_payments,line_items" - CreditNotesRetrieveRequestExpandAppliedPaymentsLineItemsAccountingPeriod CreditNotesRetrieveRequestExpand = "applied_payments,line_items,accounting_period" - CreditNotesRetrieveRequestExpandAppliedPaymentsLineItemsCompany CreditNotesRetrieveRequestExpand = "applied_payments,line_items,company" - CreditNotesRetrieveRequestExpandAppliedPaymentsLineItemsCompanyAccountingPeriod CreditNotesRetrieveRequestExpand = "applied_payments,line_items,company,accounting_period" - CreditNotesRetrieveRequestExpandAppliedPaymentsLineItemsContact CreditNotesRetrieveRequestExpand = "applied_payments,line_items,contact" - CreditNotesRetrieveRequestExpandAppliedPaymentsLineItemsContactAccountingPeriod CreditNotesRetrieveRequestExpand = "applied_payments,line_items,contact,accounting_period" - CreditNotesRetrieveRequestExpandAppliedPaymentsLineItemsContactCompany CreditNotesRetrieveRequestExpand = "applied_payments,line_items,contact,company" - CreditNotesRetrieveRequestExpandAppliedPaymentsLineItemsContactCompanyAccountingPeriod CreditNotesRetrieveRequestExpand = "applied_payments,line_items,contact,company,accounting_period" - CreditNotesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategories CreditNotesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories" - CreditNotesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAccountingPeriod CreditNotesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,accounting_period" - CreditNotesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesCompany CreditNotesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,company" - CreditNotesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesCompanyAccountingPeriod CreditNotesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,company,accounting_period" - CreditNotesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesContact CreditNotesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,contact" - CreditNotesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesContactAccountingPeriod CreditNotesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,contact,accounting_period" - CreditNotesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesContactCompany CreditNotesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,contact,company" - CreditNotesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesContactCompanyAccountingPeriod CreditNotesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,contact,company,accounting_period" - CreditNotesRetrieveRequestExpandAppliedPaymentsTrackingCategories CreditNotesRetrieveRequestExpand = "applied_payments,tracking_categories" - CreditNotesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAccountingPeriod CreditNotesRetrieveRequestExpand = "applied_payments,tracking_categories,accounting_period" - CreditNotesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesCompany CreditNotesRetrieveRequestExpand = "applied_payments,tracking_categories,company" - CreditNotesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesCompanyAccountingPeriod CreditNotesRetrieveRequestExpand = "applied_payments,tracking_categories,company,accounting_period" - CreditNotesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesContact CreditNotesRetrieveRequestExpand = "applied_payments,tracking_categories,contact" - CreditNotesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesContactAccountingPeriod CreditNotesRetrieveRequestExpand = "applied_payments,tracking_categories,contact,accounting_period" - CreditNotesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesContactCompany CreditNotesRetrieveRequestExpand = "applied_payments,tracking_categories,contact,company" - CreditNotesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesContactCompanyAccountingPeriod CreditNotesRetrieveRequestExpand = "applied_payments,tracking_categories,contact,company,accounting_period" - CreditNotesRetrieveRequestExpandCompany CreditNotesRetrieveRequestExpand = "company" - CreditNotesRetrieveRequestExpandCompanyAccountingPeriod CreditNotesRetrieveRequestExpand = "company,accounting_period" - CreditNotesRetrieveRequestExpandContact CreditNotesRetrieveRequestExpand = "contact" - CreditNotesRetrieveRequestExpandContactAccountingPeriod CreditNotesRetrieveRequestExpand = "contact,accounting_period" - CreditNotesRetrieveRequestExpandContactCompany CreditNotesRetrieveRequestExpand = "contact,company" - CreditNotesRetrieveRequestExpandContactCompanyAccountingPeriod CreditNotesRetrieveRequestExpand = "contact,company,accounting_period" - CreditNotesRetrieveRequestExpandLineItems CreditNotesRetrieveRequestExpand = "line_items" - CreditNotesRetrieveRequestExpandLineItemsAccountingPeriod CreditNotesRetrieveRequestExpand = "line_items,accounting_period" - CreditNotesRetrieveRequestExpandLineItemsCompany CreditNotesRetrieveRequestExpand = "line_items,company" - CreditNotesRetrieveRequestExpandLineItemsCompanyAccountingPeriod CreditNotesRetrieveRequestExpand = "line_items,company,accounting_period" - CreditNotesRetrieveRequestExpandLineItemsContact CreditNotesRetrieveRequestExpand = "line_items,contact" - CreditNotesRetrieveRequestExpandLineItemsContactAccountingPeriod CreditNotesRetrieveRequestExpand = "line_items,contact,accounting_period" - CreditNotesRetrieveRequestExpandLineItemsContactCompany CreditNotesRetrieveRequestExpand = "line_items,contact,company" - CreditNotesRetrieveRequestExpandLineItemsContactCompanyAccountingPeriod CreditNotesRetrieveRequestExpand = "line_items,contact,company,accounting_period" - CreditNotesRetrieveRequestExpandLineItemsTrackingCategories CreditNotesRetrieveRequestExpand = "line_items,tracking_categories" - CreditNotesRetrieveRequestExpandLineItemsTrackingCategoriesAccountingPeriod CreditNotesRetrieveRequestExpand = "line_items,tracking_categories,accounting_period" - CreditNotesRetrieveRequestExpandLineItemsTrackingCategoriesCompany CreditNotesRetrieveRequestExpand = "line_items,tracking_categories,company" - CreditNotesRetrieveRequestExpandLineItemsTrackingCategoriesCompanyAccountingPeriod CreditNotesRetrieveRequestExpand = "line_items,tracking_categories,company,accounting_period" - CreditNotesRetrieveRequestExpandLineItemsTrackingCategoriesContact CreditNotesRetrieveRequestExpand = "line_items,tracking_categories,contact" - CreditNotesRetrieveRequestExpandLineItemsTrackingCategoriesContactAccountingPeriod CreditNotesRetrieveRequestExpand = "line_items,tracking_categories,contact,accounting_period" - CreditNotesRetrieveRequestExpandLineItemsTrackingCategoriesContactCompany CreditNotesRetrieveRequestExpand = "line_items,tracking_categories,contact,company" - CreditNotesRetrieveRequestExpandLineItemsTrackingCategoriesContactCompanyAccountingPeriod CreditNotesRetrieveRequestExpand = "line_items,tracking_categories,contact,company,accounting_period" - CreditNotesRetrieveRequestExpandPayments CreditNotesRetrieveRequestExpand = "payments" - CreditNotesRetrieveRequestExpandPaymentsAccountingPeriod CreditNotesRetrieveRequestExpand = "payments,accounting_period" - CreditNotesRetrieveRequestExpandPaymentsAppliedPayments CreditNotesRetrieveRequestExpand = "payments,applied_payments" - CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsAccountingPeriod CreditNotesRetrieveRequestExpand = "payments,applied_payments,accounting_period" - CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsCompany CreditNotesRetrieveRequestExpand = "payments,applied_payments,company" - CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsCompanyAccountingPeriod CreditNotesRetrieveRequestExpand = "payments,applied_payments,company,accounting_period" - CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsContact CreditNotesRetrieveRequestExpand = "payments,applied_payments,contact" - CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsContactAccountingPeriod CreditNotesRetrieveRequestExpand = "payments,applied_payments,contact,accounting_period" - CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsContactCompany CreditNotesRetrieveRequestExpand = "payments,applied_payments,contact,company" - CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsContactCompanyAccountingPeriod CreditNotesRetrieveRequestExpand = "payments,applied_payments,contact,company,accounting_period" - CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsLineItems CreditNotesRetrieveRequestExpand = "payments,applied_payments,line_items" - CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAccountingPeriod CreditNotesRetrieveRequestExpand = "payments,applied_payments,line_items,accounting_period" - CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsCompany CreditNotesRetrieveRequestExpand = "payments,applied_payments,line_items,company" - CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsCompanyAccountingPeriod CreditNotesRetrieveRequestExpand = "payments,applied_payments,line_items,company,accounting_period" - CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsContact CreditNotesRetrieveRequestExpand = "payments,applied_payments,line_items,contact" - CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsContactAccountingPeriod CreditNotesRetrieveRequestExpand = "payments,applied_payments,line_items,contact,accounting_period" - CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsContactCompany CreditNotesRetrieveRequestExpand = "payments,applied_payments,line_items,contact,company" - CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsContactCompanyAccountingPeriod CreditNotesRetrieveRequestExpand = "payments,applied_payments,line_items,contact,company,accounting_period" - CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategories CreditNotesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories" - CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAccountingPeriod CreditNotesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,accounting_period" - CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesCompany CreditNotesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,company" - CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesCompanyAccountingPeriod CreditNotesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,company,accounting_period" - CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesContact CreditNotesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,contact" - CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesContactAccountingPeriod CreditNotesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,contact,accounting_period" - CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesContactCompany CreditNotesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,contact,company" - CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesContactCompanyAccountingPeriod CreditNotesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,contact,company,accounting_period" - CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategories CreditNotesRetrieveRequestExpand = "payments,applied_payments,tracking_categories" - CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAccountingPeriod CreditNotesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,accounting_period" - CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesCompany CreditNotesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,company" - CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesCompanyAccountingPeriod CreditNotesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,company,accounting_period" - CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesContact CreditNotesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,contact" - CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesContactAccountingPeriod CreditNotesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,contact,accounting_period" - CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesContactCompany CreditNotesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,contact,company" - CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesContactCompanyAccountingPeriod CreditNotesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,contact,company,accounting_period" - CreditNotesRetrieveRequestExpandPaymentsCompany CreditNotesRetrieveRequestExpand = "payments,company" - CreditNotesRetrieveRequestExpandPaymentsCompanyAccountingPeriod CreditNotesRetrieveRequestExpand = "payments,company,accounting_period" - CreditNotesRetrieveRequestExpandPaymentsContact CreditNotesRetrieveRequestExpand = "payments,contact" - CreditNotesRetrieveRequestExpandPaymentsContactAccountingPeriod CreditNotesRetrieveRequestExpand = "payments,contact,accounting_period" - CreditNotesRetrieveRequestExpandPaymentsContactCompany CreditNotesRetrieveRequestExpand = "payments,contact,company" - CreditNotesRetrieveRequestExpandPaymentsContactCompanyAccountingPeriod CreditNotesRetrieveRequestExpand = "payments,contact,company,accounting_period" - CreditNotesRetrieveRequestExpandPaymentsLineItems CreditNotesRetrieveRequestExpand = "payments,line_items" - CreditNotesRetrieveRequestExpandPaymentsLineItemsAccountingPeriod CreditNotesRetrieveRequestExpand = "payments,line_items,accounting_period" - CreditNotesRetrieveRequestExpandPaymentsLineItemsCompany CreditNotesRetrieveRequestExpand = "payments,line_items,company" - CreditNotesRetrieveRequestExpandPaymentsLineItemsCompanyAccountingPeriod CreditNotesRetrieveRequestExpand = "payments,line_items,company,accounting_period" - CreditNotesRetrieveRequestExpandPaymentsLineItemsContact CreditNotesRetrieveRequestExpand = "payments,line_items,contact" - CreditNotesRetrieveRequestExpandPaymentsLineItemsContactAccountingPeriod CreditNotesRetrieveRequestExpand = "payments,line_items,contact,accounting_period" - CreditNotesRetrieveRequestExpandPaymentsLineItemsContactCompany CreditNotesRetrieveRequestExpand = "payments,line_items,contact,company" - CreditNotesRetrieveRequestExpandPaymentsLineItemsContactCompanyAccountingPeriod CreditNotesRetrieveRequestExpand = "payments,line_items,contact,company,accounting_period" - CreditNotesRetrieveRequestExpandPaymentsLineItemsTrackingCategories CreditNotesRetrieveRequestExpand = "payments,line_items,tracking_categories" - CreditNotesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAccountingPeriod CreditNotesRetrieveRequestExpand = "payments,line_items,tracking_categories,accounting_period" - CreditNotesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesCompany CreditNotesRetrieveRequestExpand = "payments,line_items,tracking_categories,company" - CreditNotesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesCompanyAccountingPeriod CreditNotesRetrieveRequestExpand = "payments,line_items,tracking_categories,company,accounting_period" - CreditNotesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesContact CreditNotesRetrieveRequestExpand = "payments,line_items,tracking_categories,contact" - CreditNotesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesContactAccountingPeriod CreditNotesRetrieveRequestExpand = "payments,line_items,tracking_categories,contact,accounting_period" - CreditNotesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesContactCompany CreditNotesRetrieveRequestExpand = "payments,line_items,tracking_categories,contact,company" - CreditNotesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesContactCompanyAccountingPeriod CreditNotesRetrieveRequestExpand = "payments,line_items,tracking_categories,contact,company,accounting_period" - CreditNotesRetrieveRequestExpandPaymentsTrackingCategories CreditNotesRetrieveRequestExpand = "payments,tracking_categories" - CreditNotesRetrieveRequestExpandPaymentsTrackingCategoriesAccountingPeriod CreditNotesRetrieveRequestExpand = "payments,tracking_categories,accounting_period" - CreditNotesRetrieveRequestExpandPaymentsTrackingCategoriesCompany CreditNotesRetrieveRequestExpand = "payments,tracking_categories,company" - CreditNotesRetrieveRequestExpandPaymentsTrackingCategoriesCompanyAccountingPeriod CreditNotesRetrieveRequestExpand = "payments,tracking_categories,company,accounting_period" - CreditNotesRetrieveRequestExpandPaymentsTrackingCategoriesContact CreditNotesRetrieveRequestExpand = "payments,tracking_categories,contact" - CreditNotesRetrieveRequestExpandPaymentsTrackingCategoriesContactAccountingPeriod CreditNotesRetrieveRequestExpand = "payments,tracking_categories,contact,accounting_period" - CreditNotesRetrieveRequestExpandPaymentsTrackingCategoriesContactCompany CreditNotesRetrieveRequestExpand = "payments,tracking_categories,contact,company" - CreditNotesRetrieveRequestExpandPaymentsTrackingCategoriesContactCompanyAccountingPeriod CreditNotesRetrieveRequestExpand = "payments,tracking_categories,contact,company,accounting_period" - CreditNotesRetrieveRequestExpandTrackingCategories CreditNotesRetrieveRequestExpand = "tracking_categories" - CreditNotesRetrieveRequestExpandTrackingCategoriesAccountingPeriod CreditNotesRetrieveRequestExpand = "tracking_categories,accounting_period" - CreditNotesRetrieveRequestExpandTrackingCategoriesCompany CreditNotesRetrieveRequestExpand = "tracking_categories,company" - CreditNotesRetrieveRequestExpandTrackingCategoriesCompanyAccountingPeriod CreditNotesRetrieveRequestExpand = "tracking_categories,company,accounting_period" - CreditNotesRetrieveRequestExpandTrackingCategoriesContact CreditNotesRetrieveRequestExpand = "tracking_categories,contact" - CreditNotesRetrieveRequestExpandTrackingCategoriesContactAccountingPeriod CreditNotesRetrieveRequestExpand = "tracking_categories,contact,accounting_period" - CreditNotesRetrieveRequestExpandTrackingCategoriesContactCompany CreditNotesRetrieveRequestExpand = "tracking_categories,contact,company" - CreditNotesRetrieveRequestExpandTrackingCategoriesContactCompanyAccountingPeriod CreditNotesRetrieveRequestExpand = "tracking_categories,contact,company,accounting_period" + CreditNotesRetrieveRequestExpandItemAccountingPeriod CreditNotesRetrieveRequestExpandItem = "accounting_period" + CreditNotesRetrieveRequestExpandItemAppliedPayments CreditNotesRetrieveRequestExpandItem = "applied_payments" + CreditNotesRetrieveRequestExpandItemCompany CreditNotesRetrieveRequestExpandItem = "company" + CreditNotesRetrieveRequestExpandItemContact CreditNotesRetrieveRequestExpandItem = "contact" + CreditNotesRetrieveRequestExpandItemLineItems CreditNotesRetrieveRequestExpandItem = "line_items" + CreditNotesRetrieveRequestExpandItemPayments CreditNotesRetrieveRequestExpandItem = "payments" + CreditNotesRetrieveRequestExpandItemTrackingCategories CreditNotesRetrieveRequestExpandItem = "tracking_categories" ) -func NewCreditNotesRetrieveRequestExpandFromString(s string) (CreditNotesRetrieveRequestExpand, error) { +func NewCreditNotesRetrieveRequestExpandItemFromString(s string) (CreditNotesRetrieveRequestExpandItem, error) { switch s { case "accounting_period": - return CreditNotesRetrieveRequestExpandAccountingPeriod, nil + return CreditNotesRetrieveRequestExpandItemAccountingPeriod, nil case "applied_payments": - return CreditNotesRetrieveRequestExpandAppliedPayments, nil - case "applied_payments,accounting_period": - return CreditNotesRetrieveRequestExpandAppliedPaymentsAccountingPeriod, nil - case "applied_payments,company": - return CreditNotesRetrieveRequestExpandAppliedPaymentsCompany, nil - case "applied_payments,company,accounting_period": - return CreditNotesRetrieveRequestExpandAppliedPaymentsCompanyAccountingPeriod, nil - case "applied_payments,contact": - return CreditNotesRetrieveRequestExpandAppliedPaymentsContact, nil - case "applied_payments,contact,accounting_period": - return CreditNotesRetrieveRequestExpandAppliedPaymentsContactAccountingPeriod, nil - case "applied_payments,contact,company": - return CreditNotesRetrieveRequestExpandAppliedPaymentsContactCompany, nil - case "applied_payments,contact,company,accounting_period": - return CreditNotesRetrieveRequestExpandAppliedPaymentsContactCompanyAccountingPeriod, nil - case "applied_payments,line_items": - return CreditNotesRetrieveRequestExpandAppliedPaymentsLineItems, nil - case "applied_payments,line_items,accounting_period": - return CreditNotesRetrieveRequestExpandAppliedPaymentsLineItemsAccountingPeriod, nil - case "applied_payments,line_items,company": - return CreditNotesRetrieveRequestExpandAppliedPaymentsLineItemsCompany, nil - case "applied_payments,line_items,company,accounting_period": - return CreditNotesRetrieveRequestExpandAppliedPaymentsLineItemsCompanyAccountingPeriod, nil - case "applied_payments,line_items,contact": - return CreditNotesRetrieveRequestExpandAppliedPaymentsLineItemsContact, nil - case "applied_payments,line_items,contact,accounting_period": - return CreditNotesRetrieveRequestExpandAppliedPaymentsLineItemsContactAccountingPeriod, nil - case "applied_payments,line_items,contact,company": - return CreditNotesRetrieveRequestExpandAppliedPaymentsLineItemsContactCompany, nil - case "applied_payments,line_items,contact,company,accounting_period": - return CreditNotesRetrieveRequestExpandAppliedPaymentsLineItemsContactCompanyAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories": - return CreditNotesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategories, nil - case "applied_payments,line_items,tracking_categories,accounting_period": - return CreditNotesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,company": - return CreditNotesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesCompany, nil - case "applied_payments,line_items,tracking_categories,company,accounting_period": - return CreditNotesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesCompanyAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,contact": - return CreditNotesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesContact, nil - case "applied_payments,line_items,tracking_categories,contact,accounting_period": - return CreditNotesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesContactAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,contact,company": - return CreditNotesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesContactCompany, nil - case "applied_payments,line_items,tracking_categories,contact,company,accounting_period": - return CreditNotesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesContactCompanyAccountingPeriod, nil - case "applied_payments,tracking_categories": - return CreditNotesRetrieveRequestExpandAppliedPaymentsTrackingCategories, nil - case "applied_payments,tracking_categories,accounting_period": - return CreditNotesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAccountingPeriod, nil - case "applied_payments,tracking_categories,company": - return CreditNotesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesCompany, nil - case "applied_payments,tracking_categories,company,accounting_period": - return CreditNotesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesCompanyAccountingPeriod, nil - case "applied_payments,tracking_categories,contact": - return CreditNotesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesContact, nil - case "applied_payments,tracking_categories,contact,accounting_period": - return CreditNotesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesContactAccountingPeriod, nil - case "applied_payments,tracking_categories,contact,company": - return CreditNotesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesContactCompany, nil - case "applied_payments,tracking_categories,contact,company,accounting_period": - return CreditNotesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesContactCompanyAccountingPeriod, nil + return CreditNotesRetrieveRequestExpandItemAppliedPayments, nil case "company": - return CreditNotesRetrieveRequestExpandCompany, nil - case "company,accounting_period": - return CreditNotesRetrieveRequestExpandCompanyAccountingPeriod, nil + return CreditNotesRetrieveRequestExpandItemCompany, nil case "contact": - return CreditNotesRetrieveRequestExpandContact, nil - case "contact,accounting_period": - return CreditNotesRetrieveRequestExpandContactAccountingPeriod, nil - case "contact,company": - return CreditNotesRetrieveRequestExpandContactCompany, nil - case "contact,company,accounting_period": - return CreditNotesRetrieveRequestExpandContactCompanyAccountingPeriod, nil + return CreditNotesRetrieveRequestExpandItemContact, nil case "line_items": - return CreditNotesRetrieveRequestExpandLineItems, nil - case "line_items,accounting_period": - return CreditNotesRetrieveRequestExpandLineItemsAccountingPeriod, nil - case "line_items,company": - return CreditNotesRetrieveRequestExpandLineItemsCompany, nil - case "line_items,company,accounting_period": - return CreditNotesRetrieveRequestExpandLineItemsCompanyAccountingPeriod, nil - case "line_items,contact": - return CreditNotesRetrieveRequestExpandLineItemsContact, nil - case "line_items,contact,accounting_period": - return CreditNotesRetrieveRequestExpandLineItemsContactAccountingPeriod, nil - case "line_items,contact,company": - return CreditNotesRetrieveRequestExpandLineItemsContactCompany, nil - case "line_items,contact,company,accounting_period": - return CreditNotesRetrieveRequestExpandLineItemsContactCompanyAccountingPeriod, nil - case "line_items,tracking_categories": - return CreditNotesRetrieveRequestExpandLineItemsTrackingCategories, nil - case "line_items,tracking_categories,accounting_period": - return CreditNotesRetrieveRequestExpandLineItemsTrackingCategoriesAccountingPeriod, nil - case "line_items,tracking_categories,company": - return CreditNotesRetrieveRequestExpandLineItemsTrackingCategoriesCompany, nil - case "line_items,tracking_categories,company,accounting_period": - return CreditNotesRetrieveRequestExpandLineItemsTrackingCategoriesCompanyAccountingPeriod, nil - case "line_items,tracking_categories,contact": - return CreditNotesRetrieveRequestExpandLineItemsTrackingCategoriesContact, nil - case "line_items,tracking_categories,contact,accounting_period": - return CreditNotesRetrieveRequestExpandLineItemsTrackingCategoriesContactAccountingPeriod, nil - case "line_items,tracking_categories,contact,company": - return CreditNotesRetrieveRequestExpandLineItemsTrackingCategoriesContactCompany, nil - case "line_items,tracking_categories,contact,company,accounting_period": - return CreditNotesRetrieveRequestExpandLineItemsTrackingCategoriesContactCompanyAccountingPeriod, nil + return CreditNotesRetrieveRequestExpandItemLineItems, nil case "payments": - return CreditNotesRetrieveRequestExpandPayments, nil - case "payments,accounting_period": - return CreditNotesRetrieveRequestExpandPaymentsAccountingPeriod, nil - case "payments,applied_payments": - return CreditNotesRetrieveRequestExpandPaymentsAppliedPayments, nil - case "payments,applied_payments,accounting_period": - return CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsAccountingPeriod, nil - case "payments,applied_payments,company": - return CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsCompany, nil - case "payments,applied_payments,company,accounting_period": - return CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsCompanyAccountingPeriod, nil - case "payments,applied_payments,contact": - return CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsContact, nil - case "payments,applied_payments,contact,accounting_period": - return CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsContactAccountingPeriod, nil - case "payments,applied_payments,contact,company": - return CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsContactCompany, nil - case "payments,applied_payments,contact,company,accounting_period": - return CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsContactCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items": - return CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsLineItems, nil - case "payments,applied_payments,line_items,accounting_period": - return CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAccountingPeriod, nil - case "payments,applied_payments,line_items,company": - return CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsCompany, nil - case "payments,applied_payments,line_items,company,accounting_period": - return CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,contact": - return CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsContact, nil - case "payments,applied_payments,line_items,contact,accounting_period": - return CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsContactAccountingPeriod, nil - case "payments,applied_payments,line_items,contact,company": - return CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsContactCompany, nil - case "payments,applied_payments,line_items,contact,company,accounting_period": - return CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsContactCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories": - return CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategories, nil - case "payments,applied_payments,line_items,tracking_categories,accounting_period": - return CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,company": - return CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesCompany, nil - case "payments,applied_payments,line_items,tracking_categories,company,accounting_period": - return CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,contact": - return CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesContact, nil - case "payments,applied_payments,line_items,tracking_categories,contact,accounting_period": - return CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesContactAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,contact,company": - return CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesContactCompany, nil - case "payments,applied_payments,line_items,tracking_categories,contact,company,accounting_period": - return CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesContactCompanyAccountingPeriod, nil - case "payments,applied_payments,tracking_categories": - return CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategories, nil - case "payments,applied_payments,tracking_categories,accounting_period": - return CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,company": - return CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesCompany, nil - case "payments,applied_payments,tracking_categories,company,accounting_period": - return CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesCompanyAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,contact": - return CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesContact, nil - case "payments,applied_payments,tracking_categories,contact,accounting_period": - return CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesContactAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,contact,company": - return CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesContactCompany, nil - case "payments,applied_payments,tracking_categories,contact,company,accounting_period": - return CreditNotesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesContactCompanyAccountingPeriod, nil - case "payments,company": - return CreditNotesRetrieveRequestExpandPaymentsCompany, nil - case "payments,company,accounting_period": - return CreditNotesRetrieveRequestExpandPaymentsCompanyAccountingPeriod, nil - case "payments,contact": - return CreditNotesRetrieveRequestExpandPaymentsContact, nil - case "payments,contact,accounting_period": - return CreditNotesRetrieveRequestExpandPaymentsContactAccountingPeriod, nil - case "payments,contact,company": - return CreditNotesRetrieveRequestExpandPaymentsContactCompany, nil - case "payments,contact,company,accounting_period": - return CreditNotesRetrieveRequestExpandPaymentsContactCompanyAccountingPeriod, nil - case "payments,line_items": - return CreditNotesRetrieveRequestExpandPaymentsLineItems, nil - case "payments,line_items,accounting_period": - return CreditNotesRetrieveRequestExpandPaymentsLineItemsAccountingPeriod, nil - case "payments,line_items,company": - return CreditNotesRetrieveRequestExpandPaymentsLineItemsCompany, nil - case "payments,line_items,company,accounting_period": - return CreditNotesRetrieveRequestExpandPaymentsLineItemsCompanyAccountingPeriod, nil - case "payments,line_items,contact": - return CreditNotesRetrieveRequestExpandPaymentsLineItemsContact, nil - case "payments,line_items,contact,accounting_period": - return CreditNotesRetrieveRequestExpandPaymentsLineItemsContactAccountingPeriod, nil - case "payments,line_items,contact,company": - return CreditNotesRetrieveRequestExpandPaymentsLineItemsContactCompany, nil - case "payments,line_items,contact,company,accounting_period": - return CreditNotesRetrieveRequestExpandPaymentsLineItemsContactCompanyAccountingPeriod, nil - case "payments,line_items,tracking_categories": - return CreditNotesRetrieveRequestExpandPaymentsLineItemsTrackingCategories, nil - case "payments,line_items,tracking_categories,accounting_period": - return CreditNotesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAccountingPeriod, nil - case "payments,line_items,tracking_categories,company": - return CreditNotesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesCompany, nil - case "payments,line_items,tracking_categories,company,accounting_period": - return CreditNotesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesCompanyAccountingPeriod, nil - case "payments,line_items,tracking_categories,contact": - return CreditNotesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesContact, nil - case "payments,line_items,tracking_categories,contact,accounting_period": - return CreditNotesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesContactAccountingPeriod, nil - case "payments,line_items,tracking_categories,contact,company": - return CreditNotesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesContactCompany, nil - case "payments,line_items,tracking_categories,contact,company,accounting_period": - return CreditNotesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesContactCompanyAccountingPeriod, nil - case "payments,tracking_categories": - return CreditNotesRetrieveRequestExpandPaymentsTrackingCategories, nil - case "payments,tracking_categories,accounting_period": - return CreditNotesRetrieveRequestExpandPaymentsTrackingCategoriesAccountingPeriod, nil - case "payments,tracking_categories,company": - return CreditNotesRetrieveRequestExpandPaymentsTrackingCategoriesCompany, nil - case "payments,tracking_categories,company,accounting_period": - return CreditNotesRetrieveRequestExpandPaymentsTrackingCategoriesCompanyAccountingPeriod, nil - case "payments,tracking_categories,contact": - return CreditNotesRetrieveRequestExpandPaymentsTrackingCategoriesContact, nil - case "payments,tracking_categories,contact,accounting_period": - return CreditNotesRetrieveRequestExpandPaymentsTrackingCategoriesContactAccountingPeriod, nil - case "payments,tracking_categories,contact,company": - return CreditNotesRetrieveRequestExpandPaymentsTrackingCategoriesContactCompany, nil - case "payments,tracking_categories,contact,company,accounting_period": - return CreditNotesRetrieveRequestExpandPaymentsTrackingCategoriesContactCompanyAccountingPeriod, nil + return CreditNotesRetrieveRequestExpandItemPayments, nil case "tracking_categories": - return CreditNotesRetrieveRequestExpandTrackingCategories, nil - case "tracking_categories,accounting_period": - return CreditNotesRetrieveRequestExpandTrackingCategoriesAccountingPeriod, nil - case "tracking_categories,company": - return CreditNotesRetrieveRequestExpandTrackingCategoriesCompany, nil - case "tracking_categories,company,accounting_period": - return CreditNotesRetrieveRequestExpandTrackingCategoriesCompanyAccountingPeriod, nil - case "tracking_categories,contact": - return CreditNotesRetrieveRequestExpandTrackingCategoriesContact, nil - case "tracking_categories,contact,accounting_period": - return CreditNotesRetrieveRequestExpandTrackingCategoriesContactAccountingPeriod, nil - case "tracking_categories,contact,company": - return CreditNotesRetrieveRequestExpandTrackingCategoriesContactCompany, nil - case "tracking_categories,contact,company,accounting_period": - return CreditNotesRetrieveRequestExpandTrackingCategoriesContactCompanyAccountingPeriod, nil - } - var t CreditNotesRetrieveRequestExpand + return CreditNotesRetrieveRequestExpandItemTrackingCategories, nil + } + var t CreditNotesRetrieveRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (c CreditNotesRetrieveRequestExpand) Ptr() *CreditNotesRetrieveRequestExpand { +func (c CreditNotesRetrieveRequestExpandItem) Ptr() *CreditNotesRetrieveRequestExpandItem { return &c } @@ -954,3 +238,2158 @@ func NewCreditNotesRetrieveRequestShowEnumOriginsFromString(s string) (CreditNot func (c CreditNotesRetrieveRequestShowEnumOrigins) Ptr() *CreditNotesRetrieveRequestShowEnumOrigins { return &c } + +// # The CreditNoteApplyLine Object +// ### Description +// The `CreditNoteApplyLine` is attached to the CreditNote model. +// +// ### Usage Example +// Fetch from the `GET CreditNote` endpoint and view the invoice's applied to lines. +type CreditNoteApplyLineForCreditNoteRequest struct { + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + Invoice *CreditNoteApplyLineForCreditNoteRequestInvoice `json:"invoice,omitempty" url:"invoice,omitempty"` + // Date that the credit note is applied to the invoice. + AppliedDate *time.Time `json:"applied_date,omitempty" url:"applied_date,omitempty"` + // The amount of the Credit Note applied to the invoice. + AppliedAmount *string `json:"applied_amount,omitempty" url:"applied_amount,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (c *CreditNoteApplyLineForCreditNoteRequest) GetRemoteId() *string { + if c == nil { + return nil + } + return c.RemoteId +} + +func (c *CreditNoteApplyLineForCreditNoteRequest) GetInvoice() *CreditNoteApplyLineForCreditNoteRequestInvoice { + if c == nil { + return nil + } + return c.Invoice +} + +func (c *CreditNoteApplyLineForCreditNoteRequest) GetAppliedDate() *time.Time { + if c == nil { + return nil + } + return c.AppliedDate +} + +func (c *CreditNoteApplyLineForCreditNoteRequest) GetAppliedAmount() *string { + if c == nil { + return nil + } + return c.AppliedAmount +} + +func (c *CreditNoteApplyLineForCreditNoteRequest) GetIntegrationParams() map[string]interface{} { + if c == nil { + return nil + } + return c.IntegrationParams +} + +func (c *CreditNoteApplyLineForCreditNoteRequest) GetLinkedAccountParams() map[string]interface{} { + if c == nil { + return nil + } + return c.LinkedAccountParams +} + +func (c *CreditNoteApplyLineForCreditNoteRequest) GetExtraProperties() map[string]interface{} { + return c.extraProperties +} + +func (c *CreditNoteApplyLineForCreditNoteRequest) UnmarshalJSON(data []byte) error { + type embed CreditNoteApplyLineForCreditNoteRequest + var unmarshaler = struct { + embed + AppliedDate *internal.DateTime `json:"applied_date,omitempty"` + }{ + embed: embed(*c), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *c = CreditNoteApplyLineForCreditNoteRequest(unmarshaler.embed) + c.AppliedDate = unmarshaler.AppliedDate.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *c) + if err != nil { + return err + } + c.extraProperties = extraProperties + c.rawJSON = json.RawMessage(data) + return nil +} + +func (c *CreditNoteApplyLineForCreditNoteRequest) MarshalJSON() ([]byte, error) { + type embed CreditNoteApplyLineForCreditNoteRequest + var marshaler = struct { + embed + AppliedDate *internal.DateTime `json:"applied_date,omitempty"` + }{ + embed: embed(*c), + AppliedDate: internal.NewOptionalDateTime(c.AppliedDate), + } + return json.Marshal(marshaler) +} + +func (c *CreditNoteApplyLineForCreditNoteRequest) String() string { + if len(c.rawJSON) > 0 { + if value, err := internal.StringifyJSON(c.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(c); err == nil { + return value + } + return fmt.Sprintf("%#v", c) +} + +type CreditNoteApplyLineForCreditNoteRequestInvoice struct { + String string + Invoice *Invoice + + typ string +} + +func (c *CreditNoteApplyLineForCreditNoteRequestInvoice) GetString() string { + if c == nil { + return "" + } + return c.String +} + +func (c *CreditNoteApplyLineForCreditNoteRequestInvoice) GetInvoice() *Invoice { + if c == nil { + return nil + } + return c.Invoice +} + +func (c *CreditNoteApplyLineForCreditNoteRequestInvoice) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + c.typ = "String" + c.String = valueString + return nil + } + valueInvoice := new(Invoice) + if err := json.Unmarshal(data, &valueInvoice); err == nil { + c.typ = "Invoice" + c.Invoice = valueInvoice + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, c) +} + +func (c CreditNoteApplyLineForCreditNoteRequestInvoice) MarshalJSON() ([]byte, error) { + if c.typ == "String" || c.String != "" { + return json.Marshal(c.String) + } + if c.typ == "Invoice" || c.Invoice != nil { + return json.Marshal(c.Invoice) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", c) +} + +type CreditNoteApplyLineForCreditNoteRequestInvoiceVisitor interface { + VisitString(string) error + VisitInvoice(*Invoice) error +} + +func (c *CreditNoteApplyLineForCreditNoteRequestInvoice) Accept(visitor CreditNoteApplyLineForCreditNoteRequestInvoiceVisitor) error { + if c.typ == "String" || c.String != "" { + return visitor.VisitString(c.String) + } + if c.typ == "Invoice" || c.Invoice != nil { + return visitor.VisitInvoice(c.Invoice) + } + return fmt.Errorf("type %T does not include a non-empty union type", c) +} + +// # The CreditNoteLineItem Object +// ### Description +// The `CreditNoteLineItem` object is used to represent a credit note's line items. +// +// ### Usage Example +// Fetch from the `GET CreditNote` endpoint and view the credit note's line items. +type CreditNoteLineItemRequest struct { + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + Item *CreditNoteLineItemRequestItem `json:"item,omitempty" url:"item,omitempty"` + // The credit note line item's name. + Name *string `json:"name,omitempty" url:"name,omitempty"` + // The description of the item that is owed. + Description *string `json:"description,omitempty" url:"description,omitempty"` + // The credit note line item's quantity. + Quantity *string `json:"quantity,omitempty" url:"quantity,omitempty"` + // The credit note line item's memo. + Memo *string `json:"memo,omitempty" url:"memo,omitempty"` + // The credit note line item's unit price. + UnitPrice *string `json:"unit_price,omitempty" url:"unit_price,omitempty"` + // The tax rate that applies to this line item. + TaxRate *string `json:"tax_rate,omitempty" url:"tax_rate,omitempty"` + // The credit note line item's total. + TotalLineAmount *string `json:"total_line_amount,omitempty" url:"total_line_amount,omitempty"` + // The credit note line item's associated tracking category. + TrackingCategory *string `json:"tracking_category,omitempty" url:"tracking_category,omitempty"` + // The credit note line item's associated tracking categories. + TrackingCategories []*string `json:"tracking_categories,omitempty" url:"tracking_categories,omitempty"` + // The credit note line item's account. + Account *string `json:"account,omitempty" url:"account,omitempty"` + // The company the credit note belongs to. + Company *CreditNoteLineItemRequestCompany `json:"company,omitempty" url:"company,omitempty"` + // The credit note's contact. + Contact *CreditNoteLineItemRequestContact `json:"contact,omitempty" url:"contact,omitempty"` + Project *CreditNoteLineItemRequestProject `json:"project,omitempty" url:"project,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (c *CreditNoteLineItemRequest) GetRemoteId() *string { + if c == nil { + return nil + } + return c.RemoteId +} + +func (c *CreditNoteLineItemRequest) GetItem() *CreditNoteLineItemRequestItem { + if c == nil { + return nil + } + return c.Item +} + +func (c *CreditNoteLineItemRequest) GetName() *string { + if c == nil { + return nil + } + return c.Name +} + +func (c *CreditNoteLineItemRequest) GetDescription() *string { + if c == nil { + return nil + } + return c.Description +} + +func (c *CreditNoteLineItemRequest) GetQuantity() *string { + if c == nil { + return nil + } + return c.Quantity +} + +func (c *CreditNoteLineItemRequest) GetMemo() *string { + if c == nil { + return nil + } + return c.Memo +} + +func (c *CreditNoteLineItemRequest) GetUnitPrice() *string { + if c == nil { + return nil + } + return c.UnitPrice +} + +func (c *CreditNoteLineItemRequest) GetTaxRate() *string { + if c == nil { + return nil + } + return c.TaxRate +} + +func (c *CreditNoteLineItemRequest) GetTotalLineAmount() *string { + if c == nil { + return nil + } + return c.TotalLineAmount +} + +func (c *CreditNoteLineItemRequest) GetTrackingCategory() *string { + if c == nil { + return nil + } + return c.TrackingCategory +} + +func (c *CreditNoteLineItemRequest) GetTrackingCategories() []*string { + if c == nil { + return nil + } + return c.TrackingCategories +} + +func (c *CreditNoteLineItemRequest) GetAccount() *string { + if c == nil { + return nil + } + return c.Account +} + +func (c *CreditNoteLineItemRequest) GetCompany() *CreditNoteLineItemRequestCompany { + if c == nil { + return nil + } + return c.Company +} + +func (c *CreditNoteLineItemRequest) GetContact() *CreditNoteLineItemRequestContact { + if c == nil { + return nil + } + return c.Contact +} + +func (c *CreditNoteLineItemRequest) GetProject() *CreditNoteLineItemRequestProject { + if c == nil { + return nil + } + return c.Project +} + +func (c *CreditNoteLineItemRequest) GetIntegrationParams() map[string]interface{} { + if c == nil { + return nil + } + return c.IntegrationParams +} + +func (c *CreditNoteLineItemRequest) GetLinkedAccountParams() map[string]interface{} { + if c == nil { + return nil + } + return c.LinkedAccountParams +} + +func (c *CreditNoteLineItemRequest) GetExtraProperties() map[string]interface{} { + return c.extraProperties +} + +func (c *CreditNoteLineItemRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CreditNoteLineItemRequest + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *c = CreditNoteLineItemRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *c) + if err != nil { + return err + } + c.extraProperties = extraProperties + c.rawJSON = json.RawMessage(data) + return nil +} + +func (c *CreditNoteLineItemRequest) String() string { + if len(c.rawJSON) > 0 { + if value, err := internal.StringifyJSON(c.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(c); err == nil { + return value + } + return fmt.Sprintf("%#v", c) +} + +// The company the credit note belongs to. +type CreditNoteLineItemRequestCompany struct { + String string + CompanyInfo *CompanyInfo + + typ string +} + +func (c *CreditNoteLineItemRequestCompany) GetString() string { + if c == nil { + return "" + } + return c.String +} + +func (c *CreditNoteLineItemRequestCompany) GetCompanyInfo() *CompanyInfo { + if c == nil { + return nil + } + return c.CompanyInfo +} + +func (c *CreditNoteLineItemRequestCompany) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + c.typ = "String" + c.String = valueString + return nil + } + valueCompanyInfo := new(CompanyInfo) + if err := json.Unmarshal(data, &valueCompanyInfo); err == nil { + c.typ = "CompanyInfo" + c.CompanyInfo = valueCompanyInfo + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, c) +} + +func (c CreditNoteLineItemRequestCompany) MarshalJSON() ([]byte, error) { + if c.typ == "String" || c.String != "" { + return json.Marshal(c.String) + } + if c.typ == "CompanyInfo" || c.CompanyInfo != nil { + return json.Marshal(c.CompanyInfo) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", c) +} + +type CreditNoteLineItemRequestCompanyVisitor interface { + VisitString(string) error + VisitCompanyInfo(*CompanyInfo) error +} + +func (c *CreditNoteLineItemRequestCompany) Accept(visitor CreditNoteLineItemRequestCompanyVisitor) error { + if c.typ == "String" || c.String != "" { + return visitor.VisitString(c.String) + } + if c.typ == "CompanyInfo" || c.CompanyInfo != nil { + return visitor.VisitCompanyInfo(c.CompanyInfo) + } + return fmt.Errorf("type %T does not include a non-empty union type", c) +} + +// The credit note's contact. +type CreditNoteLineItemRequestContact struct { + String string + Contact *Contact + + typ string +} + +func (c *CreditNoteLineItemRequestContact) GetString() string { + if c == nil { + return "" + } + return c.String +} + +func (c *CreditNoteLineItemRequestContact) GetContact() *Contact { + if c == nil { + return nil + } + return c.Contact +} + +func (c *CreditNoteLineItemRequestContact) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + c.typ = "String" + c.String = valueString + return nil + } + valueContact := new(Contact) + if err := json.Unmarshal(data, &valueContact); err == nil { + c.typ = "Contact" + c.Contact = valueContact + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, c) +} + +func (c CreditNoteLineItemRequestContact) MarshalJSON() ([]byte, error) { + if c.typ == "String" || c.String != "" { + return json.Marshal(c.String) + } + if c.typ == "Contact" || c.Contact != nil { + return json.Marshal(c.Contact) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", c) +} + +type CreditNoteLineItemRequestContactVisitor interface { + VisitString(string) error + VisitContact(*Contact) error +} + +func (c *CreditNoteLineItemRequestContact) Accept(visitor CreditNoteLineItemRequestContactVisitor) error { + if c.typ == "String" || c.String != "" { + return visitor.VisitString(c.String) + } + if c.typ == "Contact" || c.Contact != nil { + return visitor.VisitContact(c.Contact) + } + return fmt.Errorf("type %T does not include a non-empty union type", c) +} + +type CreditNoteLineItemRequestItem struct { + String string + Item *Item + + typ string +} + +func (c *CreditNoteLineItemRequestItem) GetString() string { + if c == nil { + return "" + } + return c.String +} + +func (c *CreditNoteLineItemRequestItem) GetItem() *Item { + if c == nil { + return nil + } + return c.Item +} + +func (c *CreditNoteLineItemRequestItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + c.typ = "String" + c.String = valueString + return nil + } + valueItem := new(Item) + if err := json.Unmarshal(data, &valueItem); err == nil { + c.typ = "Item" + c.Item = valueItem + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, c) +} + +func (c CreditNoteLineItemRequestItem) MarshalJSON() ([]byte, error) { + if c.typ == "String" || c.String != "" { + return json.Marshal(c.String) + } + if c.typ == "Item" || c.Item != nil { + return json.Marshal(c.Item) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", c) +} + +type CreditNoteLineItemRequestItemVisitor interface { + VisitString(string) error + VisitItem(*Item) error +} + +func (c *CreditNoteLineItemRequestItem) Accept(visitor CreditNoteLineItemRequestItemVisitor) error { + if c.typ == "String" || c.String != "" { + return visitor.VisitString(c.String) + } + if c.typ == "Item" || c.Item != nil { + return visitor.VisitItem(c.Item) + } + return fmt.Errorf("type %T does not include a non-empty union type", c) +} + +type CreditNoteLineItemRequestProject struct { + String string + Project *Project + + typ string +} + +func (c *CreditNoteLineItemRequestProject) GetString() string { + if c == nil { + return "" + } + return c.String +} + +func (c *CreditNoteLineItemRequestProject) GetProject() *Project { + if c == nil { + return nil + } + return c.Project +} + +func (c *CreditNoteLineItemRequestProject) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + c.typ = "String" + c.String = valueString + return nil + } + valueProject := new(Project) + if err := json.Unmarshal(data, &valueProject); err == nil { + c.typ = "Project" + c.Project = valueProject + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, c) +} + +func (c CreditNoteLineItemRequestProject) MarshalJSON() ([]byte, error) { + if c.typ == "String" || c.String != "" { + return json.Marshal(c.String) + } + if c.typ == "Project" || c.Project != nil { + return json.Marshal(c.Project) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", c) +} + +type CreditNoteLineItemRequestProjectVisitor interface { + VisitString(string) error + VisitProject(*Project) error +} + +func (c *CreditNoteLineItemRequestProject) Accept(visitor CreditNoteLineItemRequestProjectVisitor) error { + if c.typ == "String" || c.String != "" { + return visitor.VisitString(c.String) + } + if c.typ == "Project" || c.Project != nil { + return visitor.VisitProject(c.Project) + } + return fmt.Errorf("type %T does not include a non-empty union type", c) +} + +// # The CreditNote Object +// ### Description +// A `CreditNote` is transaction issued to a customer, indicating a reduction or cancellation of the amount owed by the customer. It is most generally used as an adjustment note used to rectify errors, returns, or overpayments related to a sales transaction. A `CreditNote` can be applied to *Accounts Receivable* Invoices to decrease the overall amount of the Invoice. +// +// ### Usage Example +// Fetch from the `LIST CreditNotes` endpoint and view a company's credit notes. +type CreditNoteRequest struct { + // The credit note's transaction date. + TransactionDate *time.Time `json:"transaction_date,omitempty" url:"transaction_date,omitempty"` + // The credit note's status. + // + // * `SUBMITTED` - SUBMITTED + // * `AUTHORIZED` - AUTHORIZED + // * `PAID` - PAID + Status *CreditNoteRequestStatus `json:"status,omitempty" url:"status,omitempty"` + // The credit note's number. + Number *string `json:"number,omitempty" url:"number,omitempty"` + // The credit note's contact. + Contact *CreditNoteRequestContact `json:"contact,omitempty" url:"contact,omitempty"` + // The company the credit note belongs to. + Company *CreditNoteRequestCompany `json:"company,omitempty" url:"company,omitempty"` + // The credit note's exchange rate. + ExchangeRate *string `json:"exchange_rate,omitempty" url:"exchange_rate,omitempty"` + // The credit note's total amount. + TotalAmount *float64 `json:"total_amount,omitempty" url:"total_amount,omitempty"` + // The amount of value remaining in the credit note that the customer can use. + RemainingCredit *float64 `json:"remaining_credit,omitempty" url:"remaining_credit,omitempty"` + // If the transaction is inclusive or exclusive of tax. `True` if inclusive, `False` if exclusive. + InclusiveOfTax *bool `json:"inclusive_of_tax,omitempty" url:"inclusive_of_tax,omitempty"` + LineItems []*CreditNoteRequestLineItemsItem `json:"line_items,omitempty" url:"line_items,omitempty"` + TrackingCategories []*CreditNoteRequestTrackingCategoriesItem `json:"tracking_categories,omitempty" url:"tracking_categories,omitempty"` + // The credit note's currency. + // + // * `XUA` - ADB Unit of Account + // * `AFN` - Afghan Afghani + // * `AFA` - Afghan Afghani (1927–2002) + // * `ALL` - Albanian Lek + // * `ALK` - Albanian Lek (1946–1965) + // * `DZD` - Algerian Dinar + // * `ADP` - Andorran Peseta + // * `AOA` - Angolan Kwanza + // * `AOK` - Angolan Kwanza (1977–1991) + // * `AON` - Angolan New Kwanza (1990–2000) + // * `AOR` - Angolan Readjusted Kwanza (1995–1999) + // * `ARA` - Argentine Austral + // * `ARS` - Argentine Peso + // * `ARM` - Argentine Peso (1881–1970) + // * `ARP` - Argentine Peso (1983–1985) + // * `ARL` - Argentine Peso Ley (1970–1983) + // * `AMD` - Armenian Dram + // * `AWG` - Aruban Florin + // * `AUD` - Australian Dollar + // * `ATS` - Austrian Schilling + // * `AZN` - Azerbaijani Manat + // * `AZM` - Azerbaijani Manat (1993–2006) + // * `BSD` - Bahamian Dollar + // * `BHD` - Bahraini Dinar + // * `BDT` - Bangladeshi Taka + // * `BBD` - Barbadian Dollar + // * `BYN` - Belarusian Ruble + // * `BYB` - Belarusian Ruble (1994–1999) + // * `BYR` - Belarusian Ruble (2000–2016) + // * `BEF` - Belgian Franc + // * `BEC` - Belgian Franc (convertible) + // * `BEL` - Belgian Franc (financial) + // * `BZD` - Belize Dollar + // * `BMD` - Bermudan Dollar + // * `BTN` - Bhutanese Ngultrum + // * `BOB` - Bolivian Boliviano + // * `BOL` - Bolivian Boliviano (1863–1963) + // * `BOV` - Bolivian Mvdol + // * `BOP` - Bolivian Peso + // * `BAM` - Bosnia-Herzegovina Convertible Mark + // * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + // * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + // * `BWP` - Botswanan Pula + // * `BRC` - Brazilian Cruzado (1986–1989) + // * `BRZ` - Brazilian Cruzeiro (1942–1967) + // * `BRE` - Brazilian Cruzeiro (1990–1993) + // * `BRR` - Brazilian Cruzeiro (1993–1994) + // * `BRN` - Brazilian New Cruzado (1989–1990) + // * `BRB` - Brazilian New Cruzeiro (1967–1986) + // * `BRL` - Brazilian Real + // * `GBP` - British Pound + // * `BND` - Brunei Dollar + // * `BGL` - Bulgarian Hard Lev + // * `BGN` - Bulgarian Lev + // * `BGO` - Bulgarian Lev (1879–1952) + // * `BGM` - Bulgarian Socialist Lev + // * `BUK` - Burmese Kyat + // * `BIF` - Burundian Franc + // * `XPF` - CFP Franc + // * `KHR` - Cambodian Riel + // * `CAD` - Canadian Dollar + // * `CVE` - Cape Verdean Escudo + // * `KYD` - Cayman Islands Dollar + // * `XAF` - Central African CFA Franc + // * `CLE` - Chilean Escudo + // * `CLP` - Chilean Peso + // * `CLF` - Chilean Unit of Account (UF) + // * `CNX` - Chinese People’s Bank Dollar + // * `CNY` - Chinese Yuan + // * `CNH` - Chinese Yuan (offshore) + // * `COP` - Colombian Peso + // * `COU` - Colombian Real Value Unit + // * `KMF` - Comorian Franc + // * `CDF` - Congolese Franc + // * `CRC` - Costa Rican Colón + // * `HRD` - Croatian Dinar + // * `HRK` - Croatian Kuna + // * `CUC` - Cuban Convertible Peso + // * `CUP` - Cuban Peso + // * `CYP` - Cypriot Pound + // * `CZK` - Czech Koruna + // * `CSK` - Czechoslovak Hard Koruna + // * `DKK` - Danish Krone + // * `DJF` - Djiboutian Franc + // * `DOP` - Dominican Peso + // * `NLG` - Dutch Guilder + // * `XCD` - East Caribbean Dollar + // * `DDM` - East German Mark + // * `ECS` - Ecuadorian Sucre + // * `ECV` - Ecuadorian Unit of Constant Value + // * `EGP` - Egyptian Pound + // * `GQE` - Equatorial Guinean Ekwele + // * `ERN` - Eritrean Nakfa + // * `EEK` - Estonian Kroon + // * `ETB` - Ethiopian Birr + // * `EUR` - Euro + // * `XBA` - European Composite Unit + // * `XEU` - European Currency Unit + // * `XBB` - European Monetary Unit + // * `XBC` - European Unit of Account (XBC) + // * `XBD` - European Unit of Account (XBD) + // * `FKP` - Falkland Islands Pound + // * `FJD` - Fijian Dollar + // * `FIM` - Finnish Markka + // * `FRF` - French Franc + // * `XFO` - French Gold Franc + // * `XFU` - French UIC-Franc + // * `GMD` - Gambian Dalasi + // * `GEK` - Georgian Kupon Larit + // * `GEL` - Georgian Lari + // * `DEM` - German Mark + // * `GHS` - Ghanaian Cedi + // * `GHC` - Ghanaian Cedi (1979–2007) + // * `GIP` - Gibraltar Pound + // * `XAU` - Gold + // * `GRD` - Greek Drachma + // * `GTQ` - Guatemalan Quetzal + // * `GWP` - Guinea-Bissau Peso + // * `GNF` - Guinean Franc + // * `GNS` - Guinean Syli + // * `GYD` - Guyanaese Dollar + // * `HTG` - Haitian Gourde + // * `HNL` - Honduran Lempira + // * `HKD` - Hong Kong Dollar + // * `HUF` - Hungarian Forint + // * `IMP` - IMP + // * `ISK` - Icelandic Króna + // * `ISJ` - Icelandic Króna (1918–1981) + // * `INR` - Indian Rupee + // * `IDR` - Indonesian Rupiah + // * `IRR` - Iranian Rial + // * `IQD` - Iraqi Dinar + // * `IEP` - Irish Pound + // * `ILS` - Israeli New Shekel + // * `ILP` - Israeli Pound + // * `ILR` - Israeli Shekel (1980–1985) + // * `ITL` - Italian Lira + // * `JMD` - Jamaican Dollar + // * `JPY` - Japanese Yen + // * `JOD` - Jordanian Dinar + // * `KZT` - Kazakhstani Tenge + // * `KES` - Kenyan Shilling + // * `KWD` - Kuwaiti Dinar + // * `KGS` - Kyrgystani Som + // * `LAK` - Laotian Kip + // * `LVL` - Latvian Lats + // * `LVR` - Latvian Ruble + // * `LBP` - Lebanese Pound + // * `LSL` - Lesotho Loti + // * `LRD` - Liberian Dollar + // * `LYD` - Libyan Dinar + // * `LTL` - Lithuanian Litas + // * `LTT` - Lithuanian Talonas + // * `LUL` - Luxembourg Financial Franc + // * `LUC` - Luxembourgian Convertible Franc + // * `LUF` - Luxembourgian Franc + // * `MOP` - Macanese Pataca + // * `MKD` - Macedonian Denar + // * `MKN` - Macedonian Denar (1992–1993) + // * `MGA` - Malagasy Ariary + // * `MGF` - Malagasy Franc + // * `MWK` - Malawian Kwacha + // * `MYR` - Malaysian Ringgit + // * `MVR` - Maldivian Rufiyaa + // * `MVP` - Maldivian Rupee (1947–1981) + // * `MLF` - Malian Franc + // * `MTL` - Maltese Lira + // * `MTP` - Maltese Pound + // * `MRU` - Mauritanian Ouguiya + // * `MRO` - Mauritanian Ouguiya (1973–2017) + // * `MUR` - Mauritian Rupee + // * `MXV` - Mexican Investment Unit + // * `MXN` - Mexican Peso + // * `MXP` - Mexican Silver Peso (1861–1992) + // * `MDC` - Moldovan Cupon + // * `MDL` - Moldovan Leu + // * `MCF` - Monegasque Franc + // * `MNT` - Mongolian Tugrik + // * `MAD` - Moroccan Dirham + // * `MAF` - Moroccan Franc + // * `MZE` - Mozambican Escudo + // * `MZN` - Mozambican Metical + // * `MZM` - Mozambican Metical (1980–2006) + // * `MMK` - Myanmar Kyat + // * `NAD` - Namibian Dollar + // * `NPR` - Nepalese Rupee + // * `ANG` - Netherlands Antillean Guilder + // * `TWD` - New Taiwan Dollar + // * `NZD` - New Zealand Dollar + // * `NIO` - Nicaraguan Córdoba + // * `NIC` - Nicaraguan Córdoba (1988–1991) + // * `NGN` - Nigerian Naira + // * `KPW` - North Korean Won + // * `NOK` - Norwegian Krone + // * `OMR` - Omani Rial + // * `PKR` - Pakistani Rupee + // * `XPD` - Palladium + // * `PAB` - Panamanian Balboa + // * `PGK` - Papua New Guinean Kina + // * `PYG` - Paraguayan Guarani + // * `PEI` - Peruvian Inti + // * `PEN` - Peruvian Sol + // * `PES` - Peruvian Sol (1863–1965) + // * `PHP` - Philippine Peso + // * `XPT` - Platinum + // * `PLN` - Polish Zloty + // * `PLZ` - Polish Zloty (1950–1995) + // * `PTE` - Portuguese Escudo + // * `GWE` - Portuguese Guinea Escudo + // * `QAR` - Qatari Rial + // * `XRE` - RINET Funds + // * `RHD` - Rhodesian Dollar + // * `RON` - Romanian Leu + // * `ROL` - Romanian Leu (1952–2006) + // * `RUB` - Russian Ruble + // * `RUR` - Russian Ruble (1991–1998) + // * `RWF` - Rwandan Franc + // * `SVC` - Salvadoran Colón + // * `WST` - Samoan Tala + // * `SAR` - Saudi Riyal + // * `RSD` - Serbian Dinar + // * `CSD` - Serbian Dinar (2002–2006) + // * `SCR` - Seychellois Rupee + // * `SLL` - Sierra Leonean Leone + // * `XAG` - Silver + // * `SGD` - Singapore Dollar + // * `SKK` - Slovak Koruna + // * `SIT` - Slovenian Tolar + // * `SBD` - Solomon Islands Dollar + // * `SOS` - Somali Shilling + // * `ZAR` - South African Rand + // * `ZAL` - South African Rand (financial) + // * `KRH` - South Korean Hwan (1953–1962) + // * `KRW` - South Korean Won + // * `KRO` - South Korean Won (1945–1953) + // * `SSP` - South Sudanese Pound + // * `SUR` - Soviet Rouble + // * `ESP` - Spanish Peseta + // * `ESA` - Spanish Peseta (A account) + // * `ESB` - Spanish Peseta (convertible account) + // * `XDR` - Special Drawing Rights + // * `LKR` - Sri Lankan Rupee + // * `SHP` - St. Helena Pound + // * `XSU` - Sucre + // * `SDD` - Sudanese Dinar (1992–2007) + // * `SDG` - Sudanese Pound + // * `SDP` - Sudanese Pound (1957–1998) + // * `SRD` - Surinamese Dollar + // * `SRG` - Surinamese Guilder + // * `SZL` - Swazi Lilangeni + // * `SEK` - Swedish Krona + // * `CHF` - Swiss Franc + // * `SYP` - Syrian Pound + // * `STN` - São Tomé & Príncipe Dobra + // * `STD` - São Tomé & Príncipe Dobra (1977–2017) + // * `TVD` - TVD + // * `TJR` - Tajikistani Ruble + // * `TJS` - Tajikistani Somoni + // * `TZS` - Tanzanian Shilling + // * `XTS` - Testing Currency Code + // * `THB` - Thai Baht + // * `XXX` - The codes assigned for transactions where no currency is involved + // * `TPE` - Timorese Escudo + // * `TOP` - Tongan Paʻanga + // * `TTD` - Trinidad & Tobago Dollar + // * `TND` - Tunisian Dinar + // * `TRY` - Turkish Lira + // * `TRL` - Turkish Lira (1922–2005) + // * `TMT` - Turkmenistani Manat + // * `TMM` - Turkmenistani Manat (1993–2009) + // * `USD` - US Dollar + // * `USN` - US Dollar (Next day) + // * `USS` - US Dollar (Same day) + // * `UGX` - Ugandan Shilling + // * `UGS` - Ugandan Shilling (1966–1987) + // * `UAH` - Ukrainian Hryvnia + // * `UAK` - Ukrainian Karbovanets + // * `AED` - United Arab Emirates Dirham + // * `UYW` - Uruguayan Nominal Wage Index Unit + // * `UYU` - Uruguayan Peso + // * `UYP` - Uruguayan Peso (1975–1993) + // * `UYI` - Uruguayan Peso (Indexed Units) + // * `UZS` - Uzbekistani Som + // * `VUV` - Vanuatu Vatu + // * `VES` - Venezuelan Bolívar + // * `VEB` - Venezuelan Bolívar (1871–2008) + // * `VEF` - Venezuelan Bolívar (2008–2018) + // * `VND` - Vietnamese Dong + // * `VNN` - Vietnamese Dong (1978–1985) + // * `CHE` - WIR Euro + // * `CHW` - WIR Franc + // * `XOF` - West African CFA Franc + // * `YDD` - Yemeni Dinar + // * `YER` - Yemeni Rial + // * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + // * `YUD` - Yugoslavian Hard Dinar (1966–1990) + // * `YUM` - Yugoslavian New Dinar (1994–2002) + // * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + // * `ZWN` - ZWN + // * `ZRN` - Zairean New Zaire (1993–1998) + // * `ZRZ` - Zairean Zaire (1971–1993) + // * `ZMW` - Zambian Kwacha + // * `ZMK` - Zambian Kwacha (1968–2012) + // * `ZWD` - Zimbabwean Dollar (1980–2008) + // * `ZWR` - Zimbabwean Dollar (2008) + // * `ZWL` - Zimbabwean Dollar (2009) + Currency *CreditNoteRequestCurrency `json:"currency,omitempty" url:"currency,omitempty"` + // Array of `Payment` object IDs + Payments []*CreditNoteRequestPaymentsItem `json:"payments,omitempty" url:"payments,omitempty"` + // A list of the Payment Applied to Lines common models related to a given Invoice, Credit Note, or Journal Entry. + AppliedPayments []*CreditNoteRequestAppliedPaymentsItem `json:"applied_payments,omitempty" url:"applied_payments,omitempty"` + // The accounting period that the CreditNote was generated in. + AccountingPeriod *CreditNoteRequestAccountingPeriod `json:"accounting_period,omitempty" url:"accounting_period,omitempty"` + // A list of the CreditNote Applied to Lines common models related to a given Credit Note + AppliedToLines []*CreditNoteApplyLineForCreditNoteRequest `json:"applied_to_lines,omitempty" url:"applied_to_lines,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (c *CreditNoteRequest) GetTransactionDate() *time.Time { + if c == nil { + return nil + } + return c.TransactionDate +} + +func (c *CreditNoteRequest) GetStatus() *CreditNoteRequestStatus { + if c == nil { + return nil + } + return c.Status +} + +func (c *CreditNoteRequest) GetNumber() *string { + if c == nil { + return nil + } + return c.Number +} + +func (c *CreditNoteRequest) GetContact() *CreditNoteRequestContact { + if c == nil { + return nil + } + return c.Contact +} + +func (c *CreditNoteRequest) GetCompany() *CreditNoteRequestCompany { + if c == nil { + return nil + } + return c.Company +} + +func (c *CreditNoteRequest) GetExchangeRate() *string { + if c == nil { + return nil + } + return c.ExchangeRate +} + +func (c *CreditNoteRequest) GetTotalAmount() *float64 { + if c == nil { + return nil + } + return c.TotalAmount +} + +func (c *CreditNoteRequest) GetRemainingCredit() *float64 { + if c == nil { + return nil + } + return c.RemainingCredit +} + +func (c *CreditNoteRequest) GetInclusiveOfTax() *bool { + if c == nil { + return nil + } + return c.InclusiveOfTax +} + +func (c *CreditNoteRequest) GetLineItems() []*CreditNoteRequestLineItemsItem { + if c == nil { + return nil + } + return c.LineItems +} + +func (c *CreditNoteRequest) GetTrackingCategories() []*CreditNoteRequestTrackingCategoriesItem { + if c == nil { + return nil + } + return c.TrackingCategories +} + +func (c *CreditNoteRequest) GetCurrency() *CreditNoteRequestCurrency { + if c == nil { + return nil + } + return c.Currency +} + +func (c *CreditNoteRequest) GetPayments() []*CreditNoteRequestPaymentsItem { + if c == nil { + return nil + } + return c.Payments +} + +func (c *CreditNoteRequest) GetAppliedPayments() []*CreditNoteRequestAppliedPaymentsItem { + if c == nil { + return nil + } + return c.AppliedPayments +} + +func (c *CreditNoteRequest) GetAccountingPeriod() *CreditNoteRequestAccountingPeriod { + if c == nil { + return nil + } + return c.AccountingPeriod +} + +func (c *CreditNoteRequest) GetAppliedToLines() []*CreditNoteApplyLineForCreditNoteRequest { + if c == nil { + return nil + } + return c.AppliedToLines +} + +func (c *CreditNoteRequest) GetIntegrationParams() map[string]interface{} { + if c == nil { + return nil + } + return c.IntegrationParams +} + +func (c *CreditNoteRequest) GetLinkedAccountParams() map[string]interface{} { + if c == nil { + return nil + } + return c.LinkedAccountParams +} + +func (c *CreditNoteRequest) GetExtraProperties() map[string]interface{} { + return c.extraProperties +} + +func (c *CreditNoteRequest) UnmarshalJSON(data []byte) error { + type embed CreditNoteRequest + var unmarshaler = struct { + embed + TransactionDate *internal.DateTime `json:"transaction_date,omitempty"` + }{ + embed: embed(*c), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *c = CreditNoteRequest(unmarshaler.embed) + c.TransactionDate = unmarshaler.TransactionDate.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *c) + if err != nil { + return err + } + c.extraProperties = extraProperties + c.rawJSON = json.RawMessage(data) + return nil +} + +func (c *CreditNoteRequest) MarshalJSON() ([]byte, error) { + type embed CreditNoteRequest + var marshaler = struct { + embed + TransactionDate *internal.DateTime `json:"transaction_date,omitempty"` + }{ + embed: embed(*c), + TransactionDate: internal.NewOptionalDateTime(c.TransactionDate), + } + return json.Marshal(marshaler) +} + +func (c *CreditNoteRequest) String() string { + if len(c.rawJSON) > 0 { + if value, err := internal.StringifyJSON(c.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(c); err == nil { + return value + } + return fmt.Sprintf("%#v", c) +} + +// The accounting period that the CreditNote was generated in. +type CreditNoteRequestAccountingPeriod struct { + String string + AccountingPeriod *AccountingPeriod + + typ string +} + +func (c *CreditNoteRequestAccountingPeriod) GetString() string { + if c == nil { + return "" + } + return c.String +} + +func (c *CreditNoteRequestAccountingPeriod) GetAccountingPeriod() *AccountingPeriod { + if c == nil { + return nil + } + return c.AccountingPeriod +} + +func (c *CreditNoteRequestAccountingPeriod) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + c.typ = "String" + c.String = valueString + return nil + } + valueAccountingPeriod := new(AccountingPeriod) + if err := json.Unmarshal(data, &valueAccountingPeriod); err == nil { + c.typ = "AccountingPeriod" + c.AccountingPeriod = valueAccountingPeriod + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, c) +} + +func (c CreditNoteRequestAccountingPeriod) MarshalJSON() ([]byte, error) { + if c.typ == "String" || c.String != "" { + return json.Marshal(c.String) + } + if c.typ == "AccountingPeriod" || c.AccountingPeriod != nil { + return json.Marshal(c.AccountingPeriod) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", c) +} + +type CreditNoteRequestAccountingPeriodVisitor interface { + VisitString(string) error + VisitAccountingPeriod(*AccountingPeriod) error +} + +func (c *CreditNoteRequestAccountingPeriod) Accept(visitor CreditNoteRequestAccountingPeriodVisitor) error { + if c.typ == "String" || c.String != "" { + return visitor.VisitString(c.String) + } + if c.typ == "AccountingPeriod" || c.AccountingPeriod != nil { + return visitor.VisitAccountingPeriod(c.AccountingPeriod) + } + return fmt.Errorf("type %T does not include a non-empty union type", c) +} + +type CreditNoteRequestAppliedPaymentsItem struct { + String string + PaymentLineItem *PaymentLineItem + + typ string +} + +func (c *CreditNoteRequestAppliedPaymentsItem) GetString() string { + if c == nil { + return "" + } + return c.String +} + +func (c *CreditNoteRequestAppliedPaymentsItem) GetPaymentLineItem() *PaymentLineItem { + if c == nil { + return nil + } + return c.PaymentLineItem +} + +func (c *CreditNoteRequestAppliedPaymentsItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + c.typ = "String" + c.String = valueString + return nil + } + valuePaymentLineItem := new(PaymentLineItem) + if err := json.Unmarshal(data, &valuePaymentLineItem); err == nil { + c.typ = "PaymentLineItem" + c.PaymentLineItem = valuePaymentLineItem + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, c) +} + +func (c CreditNoteRequestAppliedPaymentsItem) MarshalJSON() ([]byte, error) { + if c.typ == "String" || c.String != "" { + return json.Marshal(c.String) + } + if c.typ == "PaymentLineItem" || c.PaymentLineItem != nil { + return json.Marshal(c.PaymentLineItem) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", c) +} + +type CreditNoteRequestAppliedPaymentsItemVisitor interface { + VisitString(string) error + VisitPaymentLineItem(*PaymentLineItem) error +} + +func (c *CreditNoteRequestAppliedPaymentsItem) Accept(visitor CreditNoteRequestAppliedPaymentsItemVisitor) error { + if c.typ == "String" || c.String != "" { + return visitor.VisitString(c.String) + } + if c.typ == "PaymentLineItem" || c.PaymentLineItem != nil { + return visitor.VisitPaymentLineItem(c.PaymentLineItem) + } + return fmt.Errorf("type %T does not include a non-empty union type", c) +} + +// The company the credit note belongs to. +type CreditNoteRequestCompany struct { + String string + CompanyInfo *CompanyInfo + + typ string +} + +func (c *CreditNoteRequestCompany) GetString() string { + if c == nil { + return "" + } + return c.String +} + +func (c *CreditNoteRequestCompany) GetCompanyInfo() *CompanyInfo { + if c == nil { + return nil + } + return c.CompanyInfo +} + +func (c *CreditNoteRequestCompany) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + c.typ = "String" + c.String = valueString + return nil + } + valueCompanyInfo := new(CompanyInfo) + if err := json.Unmarshal(data, &valueCompanyInfo); err == nil { + c.typ = "CompanyInfo" + c.CompanyInfo = valueCompanyInfo + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, c) +} + +func (c CreditNoteRequestCompany) MarshalJSON() ([]byte, error) { + if c.typ == "String" || c.String != "" { + return json.Marshal(c.String) + } + if c.typ == "CompanyInfo" || c.CompanyInfo != nil { + return json.Marshal(c.CompanyInfo) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", c) +} + +type CreditNoteRequestCompanyVisitor interface { + VisitString(string) error + VisitCompanyInfo(*CompanyInfo) error +} + +func (c *CreditNoteRequestCompany) Accept(visitor CreditNoteRequestCompanyVisitor) error { + if c.typ == "String" || c.String != "" { + return visitor.VisitString(c.String) + } + if c.typ == "CompanyInfo" || c.CompanyInfo != nil { + return visitor.VisitCompanyInfo(c.CompanyInfo) + } + return fmt.Errorf("type %T does not include a non-empty union type", c) +} + +// The credit note's contact. +type CreditNoteRequestContact struct { + String string + Contact *Contact + + typ string +} + +func (c *CreditNoteRequestContact) GetString() string { + if c == nil { + return "" + } + return c.String +} + +func (c *CreditNoteRequestContact) GetContact() *Contact { + if c == nil { + return nil + } + return c.Contact +} + +func (c *CreditNoteRequestContact) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + c.typ = "String" + c.String = valueString + return nil + } + valueContact := new(Contact) + if err := json.Unmarshal(data, &valueContact); err == nil { + c.typ = "Contact" + c.Contact = valueContact + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, c) +} + +func (c CreditNoteRequestContact) MarshalJSON() ([]byte, error) { + if c.typ == "String" || c.String != "" { + return json.Marshal(c.String) + } + if c.typ == "Contact" || c.Contact != nil { + return json.Marshal(c.Contact) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", c) +} + +type CreditNoteRequestContactVisitor interface { + VisitString(string) error + VisitContact(*Contact) error +} + +func (c *CreditNoteRequestContact) Accept(visitor CreditNoteRequestContactVisitor) error { + if c.typ == "String" || c.String != "" { + return visitor.VisitString(c.String) + } + if c.typ == "Contact" || c.Contact != nil { + return visitor.VisitContact(c.Contact) + } + return fmt.Errorf("type %T does not include a non-empty union type", c) +} + +// The credit note's currency. +// +// * `XUA` - ADB Unit of Account +// * `AFN` - Afghan Afghani +// * `AFA` - Afghan Afghani (1927–2002) +// * `ALL` - Albanian Lek +// * `ALK` - Albanian Lek (1946–1965) +// * `DZD` - Algerian Dinar +// * `ADP` - Andorran Peseta +// * `AOA` - Angolan Kwanza +// * `AOK` - Angolan Kwanza (1977–1991) +// * `AON` - Angolan New Kwanza (1990–2000) +// * `AOR` - Angolan Readjusted Kwanza (1995–1999) +// * `ARA` - Argentine Austral +// * `ARS` - Argentine Peso +// * `ARM` - Argentine Peso (1881–1970) +// * `ARP` - Argentine Peso (1983–1985) +// * `ARL` - Argentine Peso Ley (1970–1983) +// * `AMD` - Armenian Dram +// * `AWG` - Aruban Florin +// * `AUD` - Australian Dollar +// * `ATS` - Austrian Schilling +// * `AZN` - Azerbaijani Manat +// * `AZM` - Azerbaijani Manat (1993–2006) +// * `BSD` - Bahamian Dollar +// * `BHD` - Bahraini Dinar +// * `BDT` - Bangladeshi Taka +// * `BBD` - Barbadian Dollar +// * `BYN` - Belarusian Ruble +// * `BYB` - Belarusian Ruble (1994–1999) +// * `BYR` - Belarusian Ruble (2000–2016) +// * `BEF` - Belgian Franc +// * `BEC` - Belgian Franc (convertible) +// * `BEL` - Belgian Franc (financial) +// * `BZD` - Belize Dollar +// * `BMD` - Bermudan Dollar +// * `BTN` - Bhutanese Ngultrum +// * `BOB` - Bolivian Boliviano +// * `BOL` - Bolivian Boliviano (1863–1963) +// * `BOV` - Bolivian Mvdol +// * `BOP` - Bolivian Peso +// * `BAM` - Bosnia-Herzegovina Convertible Mark +// * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) +// * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) +// * `BWP` - Botswanan Pula +// * `BRC` - Brazilian Cruzado (1986–1989) +// * `BRZ` - Brazilian Cruzeiro (1942–1967) +// * `BRE` - Brazilian Cruzeiro (1990–1993) +// * `BRR` - Brazilian Cruzeiro (1993–1994) +// * `BRN` - Brazilian New Cruzado (1989–1990) +// * `BRB` - Brazilian New Cruzeiro (1967–1986) +// * `BRL` - Brazilian Real +// * `GBP` - British Pound +// * `BND` - Brunei Dollar +// * `BGL` - Bulgarian Hard Lev +// * `BGN` - Bulgarian Lev +// * `BGO` - Bulgarian Lev (1879–1952) +// * `BGM` - Bulgarian Socialist Lev +// * `BUK` - Burmese Kyat +// * `BIF` - Burundian Franc +// * `XPF` - CFP Franc +// * `KHR` - Cambodian Riel +// * `CAD` - Canadian Dollar +// * `CVE` - Cape Verdean Escudo +// * `KYD` - Cayman Islands Dollar +// * `XAF` - Central African CFA Franc +// * `CLE` - Chilean Escudo +// * `CLP` - Chilean Peso +// * `CLF` - Chilean Unit of Account (UF) +// * `CNX` - Chinese People’s Bank Dollar +// * `CNY` - Chinese Yuan +// * `CNH` - Chinese Yuan (offshore) +// * `COP` - Colombian Peso +// * `COU` - Colombian Real Value Unit +// * `KMF` - Comorian Franc +// * `CDF` - Congolese Franc +// * `CRC` - Costa Rican Colón +// * `HRD` - Croatian Dinar +// * `HRK` - Croatian Kuna +// * `CUC` - Cuban Convertible Peso +// * `CUP` - Cuban Peso +// * `CYP` - Cypriot Pound +// * `CZK` - Czech Koruna +// * `CSK` - Czechoslovak Hard Koruna +// * `DKK` - Danish Krone +// * `DJF` - Djiboutian Franc +// * `DOP` - Dominican Peso +// * `NLG` - Dutch Guilder +// * `XCD` - East Caribbean Dollar +// * `DDM` - East German Mark +// * `ECS` - Ecuadorian Sucre +// * `ECV` - Ecuadorian Unit of Constant Value +// * `EGP` - Egyptian Pound +// * `GQE` - Equatorial Guinean Ekwele +// * `ERN` - Eritrean Nakfa +// * `EEK` - Estonian Kroon +// * `ETB` - Ethiopian Birr +// * `EUR` - Euro +// * `XBA` - European Composite Unit +// * `XEU` - European Currency Unit +// * `XBB` - European Monetary Unit +// * `XBC` - European Unit of Account (XBC) +// * `XBD` - European Unit of Account (XBD) +// * `FKP` - Falkland Islands Pound +// * `FJD` - Fijian Dollar +// * `FIM` - Finnish Markka +// * `FRF` - French Franc +// * `XFO` - French Gold Franc +// * `XFU` - French UIC-Franc +// * `GMD` - Gambian Dalasi +// * `GEK` - Georgian Kupon Larit +// * `GEL` - Georgian Lari +// * `DEM` - German Mark +// * `GHS` - Ghanaian Cedi +// * `GHC` - Ghanaian Cedi (1979–2007) +// * `GIP` - Gibraltar Pound +// * `XAU` - Gold +// * `GRD` - Greek Drachma +// * `GTQ` - Guatemalan Quetzal +// * `GWP` - Guinea-Bissau Peso +// * `GNF` - Guinean Franc +// * `GNS` - Guinean Syli +// * `GYD` - Guyanaese Dollar +// * `HTG` - Haitian Gourde +// * `HNL` - Honduran Lempira +// * `HKD` - Hong Kong Dollar +// * `HUF` - Hungarian Forint +// * `IMP` - IMP +// * `ISK` - Icelandic Króna +// * `ISJ` - Icelandic Króna (1918–1981) +// * `INR` - Indian Rupee +// * `IDR` - Indonesian Rupiah +// * `IRR` - Iranian Rial +// * `IQD` - Iraqi Dinar +// * `IEP` - Irish Pound +// * `ILS` - Israeli New Shekel +// * `ILP` - Israeli Pound +// * `ILR` - Israeli Shekel (1980–1985) +// * `ITL` - Italian Lira +// * `JMD` - Jamaican Dollar +// * `JPY` - Japanese Yen +// * `JOD` - Jordanian Dinar +// * `KZT` - Kazakhstani Tenge +// * `KES` - Kenyan Shilling +// * `KWD` - Kuwaiti Dinar +// * `KGS` - Kyrgystani Som +// * `LAK` - Laotian Kip +// * `LVL` - Latvian Lats +// * `LVR` - Latvian Ruble +// * `LBP` - Lebanese Pound +// * `LSL` - Lesotho Loti +// * `LRD` - Liberian Dollar +// * `LYD` - Libyan Dinar +// * `LTL` - Lithuanian Litas +// * `LTT` - Lithuanian Talonas +// * `LUL` - Luxembourg Financial Franc +// * `LUC` - Luxembourgian Convertible Franc +// * `LUF` - Luxembourgian Franc +// * `MOP` - Macanese Pataca +// * `MKD` - Macedonian Denar +// * `MKN` - Macedonian Denar (1992–1993) +// * `MGA` - Malagasy Ariary +// * `MGF` - Malagasy Franc +// * `MWK` - Malawian Kwacha +// * `MYR` - Malaysian Ringgit +// * `MVR` - Maldivian Rufiyaa +// * `MVP` - Maldivian Rupee (1947–1981) +// * `MLF` - Malian Franc +// * `MTL` - Maltese Lira +// * `MTP` - Maltese Pound +// * `MRU` - Mauritanian Ouguiya +// * `MRO` - Mauritanian Ouguiya (1973–2017) +// * `MUR` - Mauritian Rupee +// * `MXV` - Mexican Investment Unit +// * `MXN` - Mexican Peso +// * `MXP` - Mexican Silver Peso (1861–1992) +// * `MDC` - Moldovan Cupon +// * `MDL` - Moldovan Leu +// * `MCF` - Monegasque Franc +// * `MNT` - Mongolian Tugrik +// * `MAD` - Moroccan Dirham +// * `MAF` - Moroccan Franc +// * `MZE` - Mozambican Escudo +// * `MZN` - Mozambican Metical +// * `MZM` - Mozambican Metical (1980–2006) +// * `MMK` - Myanmar Kyat +// * `NAD` - Namibian Dollar +// * `NPR` - Nepalese Rupee +// * `ANG` - Netherlands Antillean Guilder +// * `TWD` - New Taiwan Dollar +// * `NZD` - New Zealand Dollar +// * `NIO` - Nicaraguan Córdoba +// * `NIC` - Nicaraguan Córdoba (1988–1991) +// * `NGN` - Nigerian Naira +// * `KPW` - North Korean Won +// * `NOK` - Norwegian Krone +// * `OMR` - Omani Rial +// * `PKR` - Pakistani Rupee +// * `XPD` - Palladium +// * `PAB` - Panamanian Balboa +// * `PGK` - Papua New Guinean Kina +// * `PYG` - Paraguayan Guarani +// * `PEI` - Peruvian Inti +// * `PEN` - Peruvian Sol +// * `PES` - Peruvian Sol (1863–1965) +// * `PHP` - Philippine Peso +// * `XPT` - Platinum +// * `PLN` - Polish Zloty +// * `PLZ` - Polish Zloty (1950–1995) +// * `PTE` - Portuguese Escudo +// * `GWE` - Portuguese Guinea Escudo +// * `QAR` - Qatari Rial +// * `XRE` - RINET Funds +// * `RHD` - Rhodesian Dollar +// * `RON` - Romanian Leu +// * `ROL` - Romanian Leu (1952–2006) +// * `RUB` - Russian Ruble +// * `RUR` - Russian Ruble (1991–1998) +// * `RWF` - Rwandan Franc +// * `SVC` - Salvadoran Colón +// * `WST` - Samoan Tala +// * `SAR` - Saudi Riyal +// * `RSD` - Serbian Dinar +// * `CSD` - Serbian Dinar (2002–2006) +// * `SCR` - Seychellois Rupee +// * `SLL` - Sierra Leonean Leone +// * `XAG` - Silver +// * `SGD` - Singapore Dollar +// * `SKK` - Slovak Koruna +// * `SIT` - Slovenian Tolar +// * `SBD` - Solomon Islands Dollar +// * `SOS` - Somali Shilling +// * `ZAR` - South African Rand +// * `ZAL` - South African Rand (financial) +// * `KRH` - South Korean Hwan (1953–1962) +// * `KRW` - South Korean Won +// * `KRO` - South Korean Won (1945–1953) +// * `SSP` - South Sudanese Pound +// * `SUR` - Soviet Rouble +// * `ESP` - Spanish Peseta +// * `ESA` - Spanish Peseta (A account) +// * `ESB` - Spanish Peseta (convertible account) +// * `XDR` - Special Drawing Rights +// * `LKR` - Sri Lankan Rupee +// * `SHP` - St. Helena Pound +// * `XSU` - Sucre +// * `SDD` - Sudanese Dinar (1992–2007) +// * `SDG` - Sudanese Pound +// * `SDP` - Sudanese Pound (1957–1998) +// * `SRD` - Surinamese Dollar +// * `SRG` - Surinamese Guilder +// * `SZL` - Swazi Lilangeni +// * `SEK` - Swedish Krona +// * `CHF` - Swiss Franc +// * `SYP` - Syrian Pound +// * `STN` - São Tomé & Príncipe Dobra +// * `STD` - São Tomé & Príncipe Dobra (1977–2017) +// * `TVD` - TVD +// * `TJR` - Tajikistani Ruble +// * `TJS` - Tajikistani Somoni +// * `TZS` - Tanzanian Shilling +// * `XTS` - Testing Currency Code +// * `THB` - Thai Baht +// * `XXX` - The codes assigned for transactions where no currency is involved +// * `TPE` - Timorese Escudo +// * `TOP` - Tongan Paʻanga +// * `TTD` - Trinidad & Tobago Dollar +// * `TND` - Tunisian Dinar +// * `TRY` - Turkish Lira +// * `TRL` - Turkish Lira (1922–2005) +// * `TMT` - Turkmenistani Manat +// * `TMM` - Turkmenistani Manat (1993–2009) +// * `USD` - US Dollar +// * `USN` - US Dollar (Next day) +// * `USS` - US Dollar (Same day) +// * `UGX` - Ugandan Shilling +// * `UGS` - Ugandan Shilling (1966–1987) +// * `UAH` - Ukrainian Hryvnia +// * `UAK` - Ukrainian Karbovanets +// * `AED` - United Arab Emirates Dirham +// * `UYW` - Uruguayan Nominal Wage Index Unit +// * `UYU` - Uruguayan Peso +// * `UYP` - Uruguayan Peso (1975–1993) +// * `UYI` - Uruguayan Peso (Indexed Units) +// * `UZS` - Uzbekistani Som +// * `VUV` - Vanuatu Vatu +// * `VES` - Venezuelan Bolívar +// * `VEB` - Venezuelan Bolívar (1871–2008) +// * `VEF` - Venezuelan Bolívar (2008–2018) +// * `VND` - Vietnamese Dong +// * `VNN` - Vietnamese Dong (1978–1985) +// * `CHE` - WIR Euro +// * `CHW` - WIR Franc +// * `XOF` - West African CFA Franc +// * `YDD` - Yemeni Dinar +// * `YER` - Yemeni Rial +// * `YUN` - Yugoslavian Convertible Dinar (1990–1992) +// * `YUD` - Yugoslavian Hard Dinar (1966–1990) +// * `YUM` - Yugoslavian New Dinar (1994–2002) +// * `YUR` - Yugoslavian Reformed Dinar (1992–1993) +// * `ZWN` - ZWN +// * `ZRN` - Zairean New Zaire (1993–1998) +// * `ZRZ` - Zairean Zaire (1971–1993) +// * `ZMW` - Zambian Kwacha +// * `ZMK` - Zambian Kwacha (1968–2012) +// * `ZWD` - Zimbabwean Dollar (1980–2008) +// * `ZWR` - Zimbabwean Dollar (2008) +// * `ZWL` - Zimbabwean Dollar (2009) +type CreditNoteRequestCurrency struct { + TransactionCurrencyEnum TransactionCurrencyEnum + String string + + typ string +} + +func (c *CreditNoteRequestCurrency) GetTransactionCurrencyEnum() TransactionCurrencyEnum { + if c == nil { + return "" + } + return c.TransactionCurrencyEnum +} + +func (c *CreditNoteRequestCurrency) GetString() string { + if c == nil { + return "" + } + return c.String +} + +func (c *CreditNoteRequestCurrency) UnmarshalJSON(data []byte) error { + var valueTransactionCurrencyEnum TransactionCurrencyEnum + if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { + c.typ = "TransactionCurrencyEnum" + c.TransactionCurrencyEnum = valueTransactionCurrencyEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + c.typ = "String" + c.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, c) +} + +func (c CreditNoteRequestCurrency) MarshalJSON() ([]byte, error) { + if c.typ == "TransactionCurrencyEnum" || c.TransactionCurrencyEnum != "" { + return json.Marshal(c.TransactionCurrencyEnum) + } + if c.typ == "String" || c.String != "" { + return json.Marshal(c.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", c) +} + +type CreditNoteRequestCurrencyVisitor interface { + VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error + VisitString(string) error +} + +func (c *CreditNoteRequestCurrency) Accept(visitor CreditNoteRequestCurrencyVisitor) error { + if c.typ == "TransactionCurrencyEnum" || c.TransactionCurrencyEnum != "" { + return visitor.VisitTransactionCurrencyEnum(c.TransactionCurrencyEnum) + } + if c.typ == "String" || c.String != "" { + return visitor.VisitString(c.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", c) +} + +type CreditNoteRequestLineItemsItem struct { + String string + CreditNoteLineItemRequest *CreditNoteLineItemRequest + + typ string +} + +func (c *CreditNoteRequestLineItemsItem) GetString() string { + if c == nil { + return "" + } + return c.String +} + +func (c *CreditNoteRequestLineItemsItem) GetCreditNoteLineItemRequest() *CreditNoteLineItemRequest { + if c == nil { + return nil + } + return c.CreditNoteLineItemRequest +} + +func (c *CreditNoteRequestLineItemsItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + c.typ = "String" + c.String = valueString + return nil + } + valueCreditNoteLineItemRequest := new(CreditNoteLineItemRequest) + if err := json.Unmarshal(data, &valueCreditNoteLineItemRequest); err == nil { + c.typ = "CreditNoteLineItemRequest" + c.CreditNoteLineItemRequest = valueCreditNoteLineItemRequest + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, c) +} + +func (c CreditNoteRequestLineItemsItem) MarshalJSON() ([]byte, error) { + if c.typ == "String" || c.String != "" { + return json.Marshal(c.String) + } + if c.typ == "CreditNoteLineItemRequest" || c.CreditNoteLineItemRequest != nil { + return json.Marshal(c.CreditNoteLineItemRequest) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", c) +} + +type CreditNoteRequestLineItemsItemVisitor interface { + VisitString(string) error + VisitCreditNoteLineItemRequest(*CreditNoteLineItemRequest) error +} + +func (c *CreditNoteRequestLineItemsItem) Accept(visitor CreditNoteRequestLineItemsItemVisitor) error { + if c.typ == "String" || c.String != "" { + return visitor.VisitString(c.String) + } + if c.typ == "CreditNoteLineItemRequest" || c.CreditNoteLineItemRequest != nil { + return visitor.VisitCreditNoteLineItemRequest(c.CreditNoteLineItemRequest) + } + return fmt.Errorf("type %T does not include a non-empty union type", c) +} + +type CreditNoteRequestPaymentsItem struct { + String string + Payment *Payment + + typ string +} + +func (c *CreditNoteRequestPaymentsItem) GetString() string { + if c == nil { + return "" + } + return c.String +} + +func (c *CreditNoteRequestPaymentsItem) GetPayment() *Payment { + if c == nil { + return nil + } + return c.Payment +} + +func (c *CreditNoteRequestPaymentsItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + c.typ = "String" + c.String = valueString + return nil + } + valuePayment := new(Payment) + if err := json.Unmarshal(data, &valuePayment); err == nil { + c.typ = "Payment" + c.Payment = valuePayment + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, c) +} + +func (c CreditNoteRequestPaymentsItem) MarshalJSON() ([]byte, error) { + if c.typ == "String" || c.String != "" { + return json.Marshal(c.String) + } + if c.typ == "Payment" || c.Payment != nil { + return json.Marshal(c.Payment) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", c) +} + +type CreditNoteRequestPaymentsItemVisitor interface { + VisitString(string) error + VisitPayment(*Payment) error +} + +func (c *CreditNoteRequestPaymentsItem) Accept(visitor CreditNoteRequestPaymentsItemVisitor) error { + if c.typ == "String" || c.String != "" { + return visitor.VisitString(c.String) + } + if c.typ == "Payment" || c.Payment != nil { + return visitor.VisitPayment(c.Payment) + } + return fmt.Errorf("type %T does not include a non-empty union type", c) +} + +// The credit note's status. +// +// * `SUBMITTED` - SUBMITTED +// * `AUTHORIZED` - AUTHORIZED +// * `PAID` - PAID +type CreditNoteRequestStatus struct { + CreditNoteStatusEnum CreditNoteStatusEnum + String string + + typ string +} + +func (c *CreditNoteRequestStatus) GetCreditNoteStatusEnum() CreditNoteStatusEnum { + if c == nil { + return "" + } + return c.CreditNoteStatusEnum +} + +func (c *CreditNoteRequestStatus) GetString() string { + if c == nil { + return "" + } + return c.String +} + +func (c *CreditNoteRequestStatus) UnmarshalJSON(data []byte) error { + var valueCreditNoteStatusEnum CreditNoteStatusEnum + if err := json.Unmarshal(data, &valueCreditNoteStatusEnum); err == nil { + c.typ = "CreditNoteStatusEnum" + c.CreditNoteStatusEnum = valueCreditNoteStatusEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + c.typ = "String" + c.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, c) +} + +func (c CreditNoteRequestStatus) MarshalJSON() ([]byte, error) { + if c.typ == "CreditNoteStatusEnum" || c.CreditNoteStatusEnum != "" { + return json.Marshal(c.CreditNoteStatusEnum) + } + if c.typ == "String" || c.String != "" { + return json.Marshal(c.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", c) +} + +type CreditNoteRequestStatusVisitor interface { + VisitCreditNoteStatusEnum(CreditNoteStatusEnum) error + VisitString(string) error +} + +func (c *CreditNoteRequestStatus) Accept(visitor CreditNoteRequestStatusVisitor) error { + if c.typ == "CreditNoteStatusEnum" || c.CreditNoteStatusEnum != "" { + return visitor.VisitCreditNoteStatusEnum(c.CreditNoteStatusEnum) + } + if c.typ == "String" || c.String != "" { + return visitor.VisitString(c.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", c) +} + +type CreditNoteRequestTrackingCategoriesItem struct { + String string + TrackingCategory *TrackingCategory + + typ string +} + +func (c *CreditNoteRequestTrackingCategoriesItem) GetString() string { + if c == nil { + return "" + } + return c.String +} + +func (c *CreditNoteRequestTrackingCategoriesItem) GetTrackingCategory() *TrackingCategory { + if c == nil { + return nil + } + return c.TrackingCategory +} + +func (c *CreditNoteRequestTrackingCategoriesItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + c.typ = "String" + c.String = valueString + return nil + } + valueTrackingCategory := new(TrackingCategory) + if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { + c.typ = "TrackingCategory" + c.TrackingCategory = valueTrackingCategory + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, c) +} + +func (c CreditNoteRequestTrackingCategoriesItem) MarshalJSON() ([]byte, error) { + if c.typ == "String" || c.String != "" { + return json.Marshal(c.String) + } + if c.typ == "TrackingCategory" || c.TrackingCategory != nil { + return json.Marshal(c.TrackingCategory) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", c) +} + +type CreditNoteRequestTrackingCategoriesItemVisitor interface { + VisitString(string) error + VisitTrackingCategory(*TrackingCategory) error +} + +func (c *CreditNoteRequestTrackingCategoriesItem) Accept(visitor CreditNoteRequestTrackingCategoriesItemVisitor) error { + if c.typ == "String" || c.String != "" { + return visitor.VisitString(c.String) + } + if c.typ == "TrackingCategory" || c.TrackingCategory != nil { + return visitor.VisitTrackingCategory(c.TrackingCategory) + } + return fmt.Errorf("type %T does not include a non-empty union type", c) +} + +type CreditNoteResponse struct { + Model *CreditNote `json:"model" url:"model"` + Warnings []*WarningValidationProblem `json:"warnings" url:"warnings"` + Errors []*ErrorValidationProblem `json:"errors" url:"errors"` + Logs []*DebugModeLog `json:"logs,omitempty" url:"logs,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (c *CreditNoteResponse) GetModel() *CreditNote { + if c == nil { + return nil + } + return c.Model +} + +func (c *CreditNoteResponse) GetWarnings() []*WarningValidationProblem { + if c == nil { + return nil + } + return c.Warnings +} + +func (c *CreditNoteResponse) GetErrors() []*ErrorValidationProblem { + if c == nil { + return nil + } + return c.Errors +} + +func (c *CreditNoteResponse) GetLogs() []*DebugModeLog { + if c == nil { + return nil + } + return c.Logs +} + +func (c *CreditNoteResponse) GetExtraProperties() map[string]interface{} { + return c.extraProperties +} + +func (c *CreditNoteResponse) UnmarshalJSON(data []byte) error { + type unmarshaler CreditNoteResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *c = CreditNoteResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *c) + if err != nil { + return err + } + c.extraProperties = extraProperties + c.rawJSON = json.RawMessage(data) + return nil +} + +func (c *CreditNoteResponse) String() string { + if len(c.rawJSON) > 0 { + if value, err := internal.StringifyJSON(c.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(c); err == nil { + return value + } + return fmt.Sprintf("%#v", c) +} + +type PaginatedCreditNoteList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*CreditNote `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedCreditNoteList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedCreditNoteList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedCreditNoteList) GetResults() []*CreditNote { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedCreditNoteList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedCreditNoteList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedCreditNoteList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedCreditNoteList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedCreditNoteList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} diff --git a/accounting/creditnotes/client.go b/accounting/creditnotes/client.go index e9a5ff8..df2447e 100644 --- a/accounting/creditnotes/client.go +++ b/accounting/creditnotes/client.go @@ -1,139 +1,135 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package creditnotes import ( context "context" fmt "fmt" - accounting "github.com/merge-api/merge-go-client/accounting" - core "github.com/merge-api/merge-go-client/core" + accounting "github.com/merge-api/merge-go-client/v2/accounting" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `CreditNote` objects. -func (c *Client) List(ctx context.Context, request *accounting.CreditNotesListRequest) (*accounting.PaginatedCreditNoteList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/credit-notes" - - queryParams := make(url.Values) - if request.CompanyId != nil { - queryParams.Add("company_id", fmt.Sprintf("%v", *request.CompanyId)) - } - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteFields != nil { - queryParams.Add("remote_fields", fmt.Sprintf("%v", *request.RemoteFields)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if request.ShowEnumOrigins != nil { - queryParams.Add("show_enum_origins", fmt.Sprintf("%v", *request.ShowEnumOrigins)) - } - if request.TransactionDateAfter != nil { - queryParams.Add("transaction_date_after", fmt.Sprintf("%v", request.TransactionDateAfter.Format(time.RFC3339))) - } - if request.TransactionDateBefore != nil { - queryParams.Add("transaction_date_before", fmt.Sprintf("%v", request.TransactionDateBefore.Format(time.RFC3339))) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *accounting.PaginatedCreditNoteList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *accounting.CreditNotesListRequest, + opts ...option.RequestOption, +) (*core.Page[*accounting.CreditNote], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/credit-notes" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *accounting.PaginatedCreditNoteList) *internal.PageResponse[*string, *accounting.CreditNote] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *accounting.CreditNote]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Creates a `CreditNote` object with the given values. -func (c *Client) Create(ctx context.Context, request *accounting.CreditNoteEndpointRequest) (*accounting.CreditNoteResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/credit-notes" - - queryParams := make(url.Values) - if request.IsDebugMode != nil { - queryParams.Add("is_debug_mode", fmt.Sprintf("%v", *request.IsDebugMode)) - } - if request.RunAsync != nil { - queryParams.Add("run_async", fmt.Sprintf("%v", *request.RunAsync)) +func (c *Client) Create( + ctx context.Context, + request *accounting.CreditNoteEndpointRequest, + opts ...option.RequestOption, +) (*accounting.CreditNoteResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/credit-notes" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *accounting.CreditNoteResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -142,38 +138,46 @@ func (c *Client) Create(ctx context.Context, request *accounting.CreditNoteEndpo } // Returns a `CreditNote` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *accounting.CreditNotesRetrieveRequest) (*accounting.CreditNote, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"accounting/v1/credit-notes/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.RemoteFields != nil { - queryParams.Add("remote_fields", fmt.Sprintf("%v", *request.RemoteFields)) - } - if request.ShowEnumOrigins != nil { - queryParams.Add("show_enum_origins", fmt.Sprintf("%v", *request.ShowEnumOrigins)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *accounting.CreditNotesRetrieveRequest, + opts ...option.RequestOption, +) (*accounting.CreditNote, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/accounting/v1/credit-notes/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *accounting.CreditNote if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -182,21 +186,34 @@ func (c *Client) Retrieve(ctx context.Context, id string, request *accounting.Cr } // Returns metadata for `CreditNote` POSTs. -func (c *Client) MetaPostRetrieve(ctx context.Context) (*accounting.MetaResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/credit-notes/meta/post" +func (c *Client) MetaPostRetrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*accounting.MetaResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/credit-notes/meta/post" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *accounting.MetaResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/accounting/deleteaccount/client.go b/accounting/deleteaccount/client.go index efaf671..63091e6 100644 --- a/accounting/deleteaccount/client.go +++ b/accounting/deleteaccount/client.go @@ -1,45 +1,62 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package deleteaccount import ( context "context" - core "github.com/merge-api/merge-go-client/core" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Delete a linked account. -func (c *Client) Delete(ctx context.Context) error { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/delete-account" +func (c *Client) Delete( + ctx context.Context, + opts ...option.RequestOption, +) error { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/delete-account" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, }, ); err != nil { return err diff --git a/accounting/employees.go b/accounting/employees.go index 92c5ca5..48e8e7a 100644 --- a/accounting/employees.go +++ b/accounting/employees.go @@ -1,25 +1,95 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package accounting +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" +) + type EmployeesListRequest struct { // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *string `json:"-"` + Expand []*string `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` } type EmployeesRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *string `json:"-"` + Expand []*string `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` +} + +type PaginatedEmployeeList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Employee `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedEmployeeList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedEmployeeList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedEmployeeList) GetResults() []*Employee { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedEmployeeList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedEmployeeList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedEmployeeList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedEmployeeList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedEmployeeList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) } diff --git a/accounting/employees/client.go b/accounting/employees/client.go index d2005e6..101346a 100644 --- a/accounting/employees/client.go +++ b/accounting/employees/client.go @@ -1,107 +1,137 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package employees import ( context "context" fmt "fmt" - accounting "github.com/merge-api/merge-go-client/accounting" - core "github.com/merge-api/merge-go-client/core" + accounting "github.com/merge-api/merge-go-client/v2/accounting" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `Employee` objects. -func (c *Client) List(ctx context.Context, request *accounting.EmployeesListRequest) (*accounting.PaginatedEmployeeList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/employees" - - queryParams := make(url.Values) - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *accounting.PaginatedEmployeeList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *accounting.EmployeesListRequest, + opts ...option.RequestOption, +) (*core.Page[*accounting.Employee], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/employees" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *accounting.PaginatedEmployeeList) *internal.PageResponse[*string, *accounting.Employee] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *accounting.Employee]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Returns an `Employee` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *accounting.EmployeesRetrieveRequest) (*accounting.Employee, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"accounting/v1/employees/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *accounting.EmployeesRetrieveRequest, + opts ...option.RequestOption, +) (*accounting.Employee, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/accounting/v1/employees/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *accounting.Employee if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/accounting/expenses.go b/accounting/expenses.go index d54216f..faae613 100644 --- a/accounting/expenses.go +++ b/accounting/expenses.go @@ -1,498 +1,4818 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package accounting import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type ExpenseEndpointRequest struct { // Whether to include debug fields (such as log file links) in the response. - IsDebugMode *bool `json:"-"` + IsDebugMode *bool `json:"-" url:"is_debug_mode,omitempty"` // Whether or not third-party updates should be run asynchronously. - RunAsync *bool `json:"-"` - Model *ExpenseRequest `json:"model,omitempty"` + RunAsync *bool `json:"-" url:"run_async,omitempty"` + Model *ExpenseRequest `json:"model,omitempty" url:"-"` } type ExpensesLinesRemoteFieldClassesListRequest struct { // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, will only return remote field classes with this is_common_model_field value - IsCommonModelField *bool `json:"-"` + IsCommonModelField *bool `json:"-" url:"is_common_model_field,omitempty"` + // If provided, will only return remote fields classes with this is_custom value + IsCustom *bool `json:"-" url:"is_custom,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` } type ExpensesListRequest struct { // If provided, will only return expenses for this company. - CompanyId *string `json:"-"` + CompanyId *string `json:"-" url:"company_id,omitempty"` // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *ExpensesListRequestExpand `json:"-"` + Expand []*ExpensesListRequestExpandItem `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - IncludeRemoteFields *bool `json:"-"` + IncludeRemoteFields *bool `json:"-" url:"include_remote_fields,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` // If provided, will only return objects created after this datetime. - TransactionDateAfter *time.Time `json:"-"` + TransactionDateAfter *time.Time `json:"-" url:"transaction_date_after,omitempty"` // If provided, will only return objects created before this datetime. - TransactionDateBefore *time.Time `json:"-"` + TransactionDateBefore *time.Time `json:"-" url:"transaction_date_before,omitempty"` } type ExpensesRemoteFieldClassesListRequest struct { // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, will only return remote field classes with this is_common_model_field value - IsCommonModelField *bool `json:"-"` + IsCommonModelField *bool `json:"-" url:"is_common_model_field,omitempty"` + // If provided, will only return remote fields classes with this is_custom value + IsCustom *bool `json:"-" url:"is_custom,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` } type ExpensesRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *ExpensesRetrieveRequestExpand `json:"-"` + Expand []*ExpensesRetrieveRequestExpandItem `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - IncludeRemoteFields *bool `json:"-"` + IncludeRemoteFields *bool `json:"-" url:"include_remote_fields,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` } -type ExpensesListRequestExpand string +type ExpensesListRequestExpandItem string const ( - ExpensesListRequestExpandAccount ExpensesListRequestExpand = "account" - ExpensesListRequestExpandAccountAccountingPeriod ExpensesListRequestExpand = "account,accounting_period" - ExpensesListRequestExpandAccountCompany ExpensesListRequestExpand = "account,company" - ExpensesListRequestExpandAccountCompanyAccountingPeriod ExpensesListRequestExpand = "account,company,accounting_period" - ExpensesListRequestExpandAccountCompanyEmployee ExpensesListRequestExpand = "account,company,employee" - ExpensesListRequestExpandAccountCompanyEmployeeAccountingPeriod ExpensesListRequestExpand = "account,company,employee,accounting_period" - ExpensesListRequestExpandAccountContact ExpensesListRequestExpand = "account,contact" - ExpensesListRequestExpandAccountContactAccountingPeriod ExpensesListRequestExpand = "account,contact,accounting_period" - ExpensesListRequestExpandAccountContactCompany ExpensesListRequestExpand = "account,contact,company" - ExpensesListRequestExpandAccountContactCompanyAccountingPeriod ExpensesListRequestExpand = "account,contact,company,accounting_period" - ExpensesListRequestExpandAccountContactCompanyEmployee ExpensesListRequestExpand = "account,contact,company,employee" - ExpensesListRequestExpandAccountContactCompanyEmployeeAccountingPeriod ExpensesListRequestExpand = "account,contact,company,employee,accounting_period" - ExpensesListRequestExpandAccountContactEmployee ExpensesListRequestExpand = "account,contact,employee" - ExpensesListRequestExpandAccountContactEmployeeAccountingPeriod ExpensesListRequestExpand = "account,contact,employee,accounting_period" - ExpensesListRequestExpandAccountEmployee ExpensesListRequestExpand = "account,employee" - ExpensesListRequestExpandAccountEmployeeAccountingPeriod ExpensesListRequestExpand = "account,employee,accounting_period" - ExpensesListRequestExpandAccountingPeriod ExpensesListRequestExpand = "accounting_period" - ExpensesListRequestExpandCompany ExpensesListRequestExpand = "company" - ExpensesListRequestExpandCompanyAccountingPeriod ExpensesListRequestExpand = "company,accounting_period" - ExpensesListRequestExpandCompanyEmployee ExpensesListRequestExpand = "company,employee" - ExpensesListRequestExpandCompanyEmployeeAccountingPeriod ExpensesListRequestExpand = "company,employee,accounting_period" - ExpensesListRequestExpandContact ExpensesListRequestExpand = "contact" - ExpensesListRequestExpandContactAccountingPeriod ExpensesListRequestExpand = "contact,accounting_period" - ExpensesListRequestExpandContactCompany ExpensesListRequestExpand = "contact,company" - ExpensesListRequestExpandContactCompanyAccountingPeriod ExpensesListRequestExpand = "contact,company,accounting_period" - ExpensesListRequestExpandContactCompanyEmployee ExpensesListRequestExpand = "contact,company,employee" - ExpensesListRequestExpandContactCompanyEmployeeAccountingPeriod ExpensesListRequestExpand = "contact,company,employee,accounting_period" - ExpensesListRequestExpandContactEmployee ExpensesListRequestExpand = "contact,employee" - ExpensesListRequestExpandContactEmployeeAccountingPeriod ExpensesListRequestExpand = "contact,employee,accounting_period" - ExpensesListRequestExpandEmployee ExpensesListRequestExpand = "employee" - ExpensesListRequestExpandEmployeeAccountingPeriod ExpensesListRequestExpand = "employee,accounting_period" - ExpensesListRequestExpandTrackingCategories ExpensesListRequestExpand = "tracking_categories" - ExpensesListRequestExpandTrackingCategoriesAccount ExpensesListRequestExpand = "tracking_categories,account" - ExpensesListRequestExpandTrackingCategoriesAccountAccountingPeriod ExpensesListRequestExpand = "tracking_categories,account,accounting_period" - ExpensesListRequestExpandTrackingCategoriesAccountCompany ExpensesListRequestExpand = "tracking_categories,account,company" - ExpensesListRequestExpandTrackingCategoriesAccountCompanyAccountingPeriod ExpensesListRequestExpand = "tracking_categories,account,company,accounting_period" - ExpensesListRequestExpandTrackingCategoriesAccountCompanyEmployee ExpensesListRequestExpand = "tracking_categories,account,company,employee" - ExpensesListRequestExpandTrackingCategoriesAccountCompanyEmployeeAccountingPeriod ExpensesListRequestExpand = "tracking_categories,account,company,employee,accounting_period" - ExpensesListRequestExpandTrackingCategoriesAccountContact ExpensesListRequestExpand = "tracking_categories,account,contact" - ExpensesListRequestExpandTrackingCategoriesAccountContactAccountingPeriod ExpensesListRequestExpand = "tracking_categories,account,contact,accounting_period" - ExpensesListRequestExpandTrackingCategoriesAccountContactCompany ExpensesListRequestExpand = "tracking_categories,account,contact,company" - ExpensesListRequestExpandTrackingCategoriesAccountContactCompanyAccountingPeriod ExpensesListRequestExpand = "tracking_categories,account,contact,company,accounting_period" - ExpensesListRequestExpandTrackingCategoriesAccountContactCompanyEmployee ExpensesListRequestExpand = "tracking_categories,account,contact,company,employee" - ExpensesListRequestExpandTrackingCategoriesAccountContactCompanyEmployeeAccountingPeriod ExpensesListRequestExpand = "tracking_categories,account,contact,company,employee,accounting_period" - ExpensesListRequestExpandTrackingCategoriesAccountContactEmployee ExpensesListRequestExpand = "tracking_categories,account,contact,employee" - ExpensesListRequestExpandTrackingCategoriesAccountContactEmployeeAccountingPeriod ExpensesListRequestExpand = "tracking_categories,account,contact,employee,accounting_period" - ExpensesListRequestExpandTrackingCategoriesAccountEmployee ExpensesListRequestExpand = "tracking_categories,account,employee" - ExpensesListRequestExpandTrackingCategoriesAccountEmployeeAccountingPeriod ExpensesListRequestExpand = "tracking_categories,account,employee,accounting_period" - ExpensesListRequestExpandTrackingCategoriesAccountingPeriod ExpensesListRequestExpand = "tracking_categories,accounting_period" - ExpensesListRequestExpandTrackingCategoriesCompany ExpensesListRequestExpand = "tracking_categories,company" - ExpensesListRequestExpandTrackingCategoriesCompanyAccountingPeriod ExpensesListRequestExpand = "tracking_categories,company,accounting_period" - ExpensesListRequestExpandTrackingCategoriesCompanyEmployee ExpensesListRequestExpand = "tracking_categories,company,employee" - ExpensesListRequestExpandTrackingCategoriesCompanyEmployeeAccountingPeriod ExpensesListRequestExpand = "tracking_categories,company,employee,accounting_period" - ExpensesListRequestExpandTrackingCategoriesContact ExpensesListRequestExpand = "tracking_categories,contact" - ExpensesListRequestExpandTrackingCategoriesContactAccountingPeriod ExpensesListRequestExpand = "tracking_categories,contact,accounting_period" - ExpensesListRequestExpandTrackingCategoriesContactCompany ExpensesListRequestExpand = "tracking_categories,contact,company" - ExpensesListRequestExpandTrackingCategoriesContactCompanyAccountingPeriod ExpensesListRequestExpand = "tracking_categories,contact,company,accounting_period" - ExpensesListRequestExpandTrackingCategoriesContactCompanyEmployee ExpensesListRequestExpand = "tracking_categories,contact,company,employee" - ExpensesListRequestExpandTrackingCategoriesContactCompanyEmployeeAccountingPeriod ExpensesListRequestExpand = "tracking_categories,contact,company,employee,accounting_period" - ExpensesListRequestExpandTrackingCategoriesContactEmployee ExpensesListRequestExpand = "tracking_categories,contact,employee" - ExpensesListRequestExpandTrackingCategoriesContactEmployeeAccountingPeriod ExpensesListRequestExpand = "tracking_categories,contact,employee,accounting_period" - ExpensesListRequestExpandTrackingCategoriesEmployee ExpensesListRequestExpand = "tracking_categories,employee" - ExpensesListRequestExpandTrackingCategoriesEmployeeAccountingPeriod ExpensesListRequestExpand = "tracking_categories,employee,accounting_period" + ExpensesListRequestExpandItemAccount ExpensesListRequestExpandItem = "account" + ExpensesListRequestExpandItemAccountingPeriod ExpensesListRequestExpandItem = "accounting_period" + ExpensesListRequestExpandItemCompany ExpensesListRequestExpandItem = "company" + ExpensesListRequestExpandItemContact ExpensesListRequestExpandItem = "contact" + ExpensesListRequestExpandItemEmployee ExpensesListRequestExpandItem = "employee" + ExpensesListRequestExpandItemTrackingCategories ExpensesListRequestExpandItem = "tracking_categories" ) -func NewExpensesListRequestExpandFromString(s string) (ExpensesListRequestExpand, error) { +func NewExpensesListRequestExpandItemFromString(s string) (ExpensesListRequestExpandItem, error) { switch s { case "account": - return ExpensesListRequestExpandAccount, nil - case "account,accounting_period": - return ExpensesListRequestExpandAccountAccountingPeriod, nil - case "account,company": - return ExpensesListRequestExpandAccountCompany, nil - case "account,company,accounting_period": - return ExpensesListRequestExpandAccountCompanyAccountingPeriod, nil - case "account,company,employee": - return ExpensesListRequestExpandAccountCompanyEmployee, nil - case "account,company,employee,accounting_period": - return ExpensesListRequestExpandAccountCompanyEmployeeAccountingPeriod, nil - case "account,contact": - return ExpensesListRequestExpandAccountContact, nil - case "account,contact,accounting_period": - return ExpensesListRequestExpandAccountContactAccountingPeriod, nil - case "account,contact,company": - return ExpensesListRequestExpandAccountContactCompany, nil - case "account,contact,company,accounting_period": - return ExpensesListRequestExpandAccountContactCompanyAccountingPeriod, nil - case "account,contact,company,employee": - return ExpensesListRequestExpandAccountContactCompanyEmployee, nil - case "account,contact,company,employee,accounting_period": - return ExpensesListRequestExpandAccountContactCompanyEmployeeAccountingPeriod, nil - case "account,contact,employee": - return ExpensesListRequestExpandAccountContactEmployee, nil - case "account,contact,employee,accounting_period": - return ExpensesListRequestExpandAccountContactEmployeeAccountingPeriod, nil - case "account,employee": - return ExpensesListRequestExpandAccountEmployee, nil - case "account,employee,accounting_period": - return ExpensesListRequestExpandAccountEmployeeAccountingPeriod, nil + return ExpensesListRequestExpandItemAccount, nil case "accounting_period": - return ExpensesListRequestExpandAccountingPeriod, nil + return ExpensesListRequestExpandItemAccountingPeriod, nil case "company": - return ExpensesListRequestExpandCompany, nil - case "company,accounting_period": - return ExpensesListRequestExpandCompanyAccountingPeriod, nil - case "company,employee": - return ExpensesListRequestExpandCompanyEmployee, nil - case "company,employee,accounting_period": - return ExpensesListRequestExpandCompanyEmployeeAccountingPeriod, nil + return ExpensesListRequestExpandItemCompany, nil case "contact": - return ExpensesListRequestExpandContact, nil - case "contact,accounting_period": - return ExpensesListRequestExpandContactAccountingPeriod, nil - case "contact,company": - return ExpensesListRequestExpandContactCompany, nil - case "contact,company,accounting_period": - return ExpensesListRequestExpandContactCompanyAccountingPeriod, nil - case "contact,company,employee": - return ExpensesListRequestExpandContactCompanyEmployee, nil - case "contact,company,employee,accounting_period": - return ExpensesListRequestExpandContactCompanyEmployeeAccountingPeriod, nil - case "contact,employee": - return ExpensesListRequestExpandContactEmployee, nil - case "contact,employee,accounting_period": - return ExpensesListRequestExpandContactEmployeeAccountingPeriod, nil + return ExpensesListRequestExpandItemContact, nil case "employee": - return ExpensesListRequestExpandEmployee, nil - case "employee,accounting_period": - return ExpensesListRequestExpandEmployeeAccountingPeriod, nil + return ExpensesListRequestExpandItemEmployee, nil case "tracking_categories": - return ExpensesListRequestExpandTrackingCategories, nil - case "tracking_categories,account": - return ExpensesListRequestExpandTrackingCategoriesAccount, nil - case "tracking_categories,account,accounting_period": - return ExpensesListRequestExpandTrackingCategoriesAccountAccountingPeriod, nil - case "tracking_categories,account,company": - return ExpensesListRequestExpandTrackingCategoriesAccountCompany, nil - case "tracking_categories,account,company,accounting_period": - return ExpensesListRequestExpandTrackingCategoriesAccountCompanyAccountingPeriod, nil - case "tracking_categories,account,company,employee": - return ExpensesListRequestExpandTrackingCategoriesAccountCompanyEmployee, nil - case "tracking_categories,account,company,employee,accounting_period": - return ExpensesListRequestExpandTrackingCategoriesAccountCompanyEmployeeAccountingPeriod, nil - case "tracking_categories,account,contact": - return ExpensesListRequestExpandTrackingCategoriesAccountContact, nil - case "tracking_categories,account,contact,accounting_period": - return ExpensesListRequestExpandTrackingCategoriesAccountContactAccountingPeriod, nil - case "tracking_categories,account,contact,company": - return ExpensesListRequestExpandTrackingCategoriesAccountContactCompany, nil - case "tracking_categories,account,contact,company,accounting_period": - return ExpensesListRequestExpandTrackingCategoriesAccountContactCompanyAccountingPeriod, nil - case "tracking_categories,account,contact,company,employee": - return ExpensesListRequestExpandTrackingCategoriesAccountContactCompanyEmployee, nil - case "tracking_categories,account,contact,company,employee,accounting_period": - return ExpensesListRequestExpandTrackingCategoriesAccountContactCompanyEmployeeAccountingPeriod, nil - case "tracking_categories,account,contact,employee": - return ExpensesListRequestExpandTrackingCategoriesAccountContactEmployee, nil - case "tracking_categories,account,contact,employee,accounting_period": - return ExpensesListRequestExpandTrackingCategoriesAccountContactEmployeeAccountingPeriod, nil - case "tracking_categories,account,employee": - return ExpensesListRequestExpandTrackingCategoriesAccountEmployee, nil - case "tracking_categories,account,employee,accounting_period": - return ExpensesListRequestExpandTrackingCategoriesAccountEmployeeAccountingPeriod, nil - case "tracking_categories,accounting_period": - return ExpensesListRequestExpandTrackingCategoriesAccountingPeriod, nil - case "tracking_categories,company": - return ExpensesListRequestExpandTrackingCategoriesCompany, nil - case "tracking_categories,company,accounting_period": - return ExpensesListRequestExpandTrackingCategoriesCompanyAccountingPeriod, nil - case "tracking_categories,company,employee": - return ExpensesListRequestExpandTrackingCategoriesCompanyEmployee, nil - case "tracking_categories,company,employee,accounting_period": - return ExpensesListRequestExpandTrackingCategoriesCompanyEmployeeAccountingPeriod, nil - case "tracking_categories,contact": - return ExpensesListRequestExpandTrackingCategoriesContact, nil - case "tracking_categories,contact,accounting_period": - return ExpensesListRequestExpandTrackingCategoriesContactAccountingPeriod, nil - case "tracking_categories,contact,company": - return ExpensesListRequestExpandTrackingCategoriesContactCompany, nil - case "tracking_categories,contact,company,accounting_period": - return ExpensesListRequestExpandTrackingCategoriesContactCompanyAccountingPeriod, nil - case "tracking_categories,contact,company,employee": - return ExpensesListRequestExpandTrackingCategoriesContactCompanyEmployee, nil - case "tracking_categories,contact,company,employee,accounting_period": - return ExpensesListRequestExpandTrackingCategoriesContactCompanyEmployeeAccountingPeriod, nil - case "tracking_categories,contact,employee": - return ExpensesListRequestExpandTrackingCategoriesContactEmployee, nil - case "tracking_categories,contact,employee,accounting_period": - return ExpensesListRequestExpandTrackingCategoriesContactEmployeeAccountingPeriod, nil - case "tracking_categories,employee": - return ExpensesListRequestExpandTrackingCategoriesEmployee, nil - case "tracking_categories,employee,accounting_period": - return ExpensesListRequestExpandTrackingCategoriesEmployeeAccountingPeriod, nil - } - var t ExpensesListRequestExpand + return ExpensesListRequestExpandItemTrackingCategories, nil + } + var t ExpensesListRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (e ExpensesListRequestExpand) Ptr() *ExpensesListRequestExpand { +func (e ExpensesListRequestExpandItem) Ptr() *ExpensesListRequestExpandItem { return &e } -type ExpensesRetrieveRequestExpand string +type ExpensesRetrieveRequestExpandItem string const ( - ExpensesRetrieveRequestExpandAccount ExpensesRetrieveRequestExpand = "account" - ExpensesRetrieveRequestExpandAccountAccountingPeriod ExpensesRetrieveRequestExpand = "account,accounting_period" - ExpensesRetrieveRequestExpandAccountCompany ExpensesRetrieveRequestExpand = "account,company" - ExpensesRetrieveRequestExpandAccountCompanyAccountingPeriod ExpensesRetrieveRequestExpand = "account,company,accounting_period" - ExpensesRetrieveRequestExpandAccountCompanyEmployee ExpensesRetrieveRequestExpand = "account,company,employee" - ExpensesRetrieveRequestExpandAccountCompanyEmployeeAccountingPeriod ExpensesRetrieveRequestExpand = "account,company,employee,accounting_period" - ExpensesRetrieveRequestExpandAccountContact ExpensesRetrieveRequestExpand = "account,contact" - ExpensesRetrieveRequestExpandAccountContactAccountingPeriod ExpensesRetrieveRequestExpand = "account,contact,accounting_period" - ExpensesRetrieveRequestExpandAccountContactCompany ExpensesRetrieveRequestExpand = "account,contact,company" - ExpensesRetrieveRequestExpandAccountContactCompanyAccountingPeriod ExpensesRetrieveRequestExpand = "account,contact,company,accounting_period" - ExpensesRetrieveRequestExpandAccountContactCompanyEmployee ExpensesRetrieveRequestExpand = "account,contact,company,employee" - ExpensesRetrieveRequestExpandAccountContactCompanyEmployeeAccountingPeriod ExpensesRetrieveRequestExpand = "account,contact,company,employee,accounting_period" - ExpensesRetrieveRequestExpandAccountContactEmployee ExpensesRetrieveRequestExpand = "account,contact,employee" - ExpensesRetrieveRequestExpandAccountContactEmployeeAccountingPeriod ExpensesRetrieveRequestExpand = "account,contact,employee,accounting_period" - ExpensesRetrieveRequestExpandAccountEmployee ExpensesRetrieveRequestExpand = "account,employee" - ExpensesRetrieveRequestExpandAccountEmployeeAccountingPeriod ExpensesRetrieveRequestExpand = "account,employee,accounting_period" - ExpensesRetrieveRequestExpandAccountingPeriod ExpensesRetrieveRequestExpand = "accounting_period" - ExpensesRetrieveRequestExpandCompany ExpensesRetrieveRequestExpand = "company" - ExpensesRetrieveRequestExpandCompanyAccountingPeriod ExpensesRetrieveRequestExpand = "company,accounting_period" - ExpensesRetrieveRequestExpandCompanyEmployee ExpensesRetrieveRequestExpand = "company,employee" - ExpensesRetrieveRequestExpandCompanyEmployeeAccountingPeriod ExpensesRetrieveRequestExpand = "company,employee,accounting_period" - ExpensesRetrieveRequestExpandContact ExpensesRetrieveRequestExpand = "contact" - ExpensesRetrieveRequestExpandContactAccountingPeriod ExpensesRetrieveRequestExpand = "contact,accounting_period" - ExpensesRetrieveRequestExpandContactCompany ExpensesRetrieveRequestExpand = "contact,company" - ExpensesRetrieveRequestExpandContactCompanyAccountingPeriod ExpensesRetrieveRequestExpand = "contact,company,accounting_period" - ExpensesRetrieveRequestExpandContactCompanyEmployee ExpensesRetrieveRequestExpand = "contact,company,employee" - ExpensesRetrieveRequestExpandContactCompanyEmployeeAccountingPeriod ExpensesRetrieveRequestExpand = "contact,company,employee,accounting_period" - ExpensesRetrieveRequestExpandContactEmployee ExpensesRetrieveRequestExpand = "contact,employee" - ExpensesRetrieveRequestExpandContactEmployeeAccountingPeriod ExpensesRetrieveRequestExpand = "contact,employee,accounting_period" - ExpensesRetrieveRequestExpandEmployee ExpensesRetrieveRequestExpand = "employee" - ExpensesRetrieveRequestExpandEmployeeAccountingPeriod ExpensesRetrieveRequestExpand = "employee,accounting_period" - ExpensesRetrieveRequestExpandTrackingCategories ExpensesRetrieveRequestExpand = "tracking_categories" - ExpensesRetrieveRequestExpandTrackingCategoriesAccount ExpensesRetrieveRequestExpand = "tracking_categories,account" - ExpensesRetrieveRequestExpandTrackingCategoriesAccountAccountingPeriod ExpensesRetrieveRequestExpand = "tracking_categories,account,accounting_period" - ExpensesRetrieveRequestExpandTrackingCategoriesAccountCompany ExpensesRetrieveRequestExpand = "tracking_categories,account,company" - ExpensesRetrieveRequestExpandTrackingCategoriesAccountCompanyAccountingPeriod ExpensesRetrieveRequestExpand = "tracking_categories,account,company,accounting_period" - ExpensesRetrieveRequestExpandTrackingCategoriesAccountCompanyEmployee ExpensesRetrieveRequestExpand = "tracking_categories,account,company,employee" - ExpensesRetrieveRequestExpandTrackingCategoriesAccountCompanyEmployeeAccountingPeriod ExpensesRetrieveRequestExpand = "tracking_categories,account,company,employee,accounting_period" - ExpensesRetrieveRequestExpandTrackingCategoriesAccountContact ExpensesRetrieveRequestExpand = "tracking_categories,account,contact" - ExpensesRetrieveRequestExpandTrackingCategoriesAccountContactAccountingPeriod ExpensesRetrieveRequestExpand = "tracking_categories,account,contact,accounting_period" - ExpensesRetrieveRequestExpandTrackingCategoriesAccountContactCompany ExpensesRetrieveRequestExpand = "tracking_categories,account,contact,company" - ExpensesRetrieveRequestExpandTrackingCategoriesAccountContactCompanyAccountingPeriod ExpensesRetrieveRequestExpand = "tracking_categories,account,contact,company,accounting_period" - ExpensesRetrieveRequestExpandTrackingCategoriesAccountContactCompanyEmployee ExpensesRetrieveRequestExpand = "tracking_categories,account,contact,company,employee" - ExpensesRetrieveRequestExpandTrackingCategoriesAccountContactCompanyEmployeeAccountingPeriod ExpensesRetrieveRequestExpand = "tracking_categories,account,contact,company,employee,accounting_period" - ExpensesRetrieveRequestExpandTrackingCategoriesAccountContactEmployee ExpensesRetrieveRequestExpand = "tracking_categories,account,contact,employee" - ExpensesRetrieveRequestExpandTrackingCategoriesAccountContactEmployeeAccountingPeriod ExpensesRetrieveRequestExpand = "tracking_categories,account,contact,employee,accounting_period" - ExpensesRetrieveRequestExpandTrackingCategoriesAccountEmployee ExpensesRetrieveRequestExpand = "tracking_categories,account,employee" - ExpensesRetrieveRequestExpandTrackingCategoriesAccountEmployeeAccountingPeriod ExpensesRetrieveRequestExpand = "tracking_categories,account,employee,accounting_period" - ExpensesRetrieveRequestExpandTrackingCategoriesAccountingPeriod ExpensesRetrieveRequestExpand = "tracking_categories,accounting_period" - ExpensesRetrieveRequestExpandTrackingCategoriesCompany ExpensesRetrieveRequestExpand = "tracking_categories,company" - ExpensesRetrieveRequestExpandTrackingCategoriesCompanyAccountingPeriod ExpensesRetrieveRequestExpand = "tracking_categories,company,accounting_period" - ExpensesRetrieveRequestExpandTrackingCategoriesCompanyEmployee ExpensesRetrieveRequestExpand = "tracking_categories,company,employee" - ExpensesRetrieveRequestExpandTrackingCategoriesCompanyEmployeeAccountingPeriod ExpensesRetrieveRequestExpand = "tracking_categories,company,employee,accounting_period" - ExpensesRetrieveRequestExpandTrackingCategoriesContact ExpensesRetrieveRequestExpand = "tracking_categories,contact" - ExpensesRetrieveRequestExpandTrackingCategoriesContactAccountingPeriod ExpensesRetrieveRequestExpand = "tracking_categories,contact,accounting_period" - ExpensesRetrieveRequestExpandTrackingCategoriesContactCompany ExpensesRetrieveRequestExpand = "tracking_categories,contact,company" - ExpensesRetrieveRequestExpandTrackingCategoriesContactCompanyAccountingPeriod ExpensesRetrieveRequestExpand = "tracking_categories,contact,company,accounting_period" - ExpensesRetrieveRequestExpandTrackingCategoriesContactCompanyEmployee ExpensesRetrieveRequestExpand = "tracking_categories,contact,company,employee" - ExpensesRetrieveRequestExpandTrackingCategoriesContactCompanyEmployeeAccountingPeriod ExpensesRetrieveRequestExpand = "tracking_categories,contact,company,employee,accounting_period" - ExpensesRetrieveRequestExpandTrackingCategoriesContactEmployee ExpensesRetrieveRequestExpand = "tracking_categories,contact,employee" - ExpensesRetrieveRequestExpandTrackingCategoriesContactEmployeeAccountingPeriod ExpensesRetrieveRequestExpand = "tracking_categories,contact,employee,accounting_period" - ExpensesRetrieveRequestExpandTrackingCategoriesEmployee ExpensesRetrieveRequestExpand = "tracking_categories,employee" - ExpensesRetrieveRequestExpandTrackingCategoriesEmployeeAccountingPeriod ExpensesRetrieveRequestExpand = "tracking_categories,employee,accounting_period" + ExpensesRetrieveRequestExpandItemAccount ExpensesRetrieveRequestExpandItem = "account" + ExpensesRetrieveRequestExpandItemAccountingPeriod ExpensesRetrieveRequestExpandItem = "accounting_period" + ExpensesRetrieveRequestExpandItemCompany ExpensesRetrieveRequestExpandItem = "company" + ExpensesRetrieveRequestExpandItemContact ExpensesRetrieveRequestExpandItem = "contact" + ExpensesRetrieveRequestExpandItemEmployee ExpensesRetrieveRequestExpandItem = "employee" + ExpensesRetrieveRequestExpandItemTrackingCategories ExpensesRetrieveRequestExpandItem = "tracking_categories" ) -func NewExpensesRetrieveRequestExpandFromString(s string) (ExpensesRetrieveRequestExpand, error) { +func NewExpensesRetrieveRequestExpandItemFromString(s string) (ExpensesRetrieveRequestExpandItem, error) { switch s { case "account": - return ExpensesRetrieveRequestExpandAccount, nil - case "account,accounting_period": - return ExpensesRetrieveRequestExpandAccountAccountingPeriod, nil - case "account,company": - return ExpensesRetrieveRequestExpandAccountCompany, nil - case "account,company,accounting_period": - return ExpensesRetrieveRequestExpandAccountCompanyAccountingPeriod, nil - case "account,company,employee": - return ExpensesRetrieveRequestExpandAccountCompanyEmployee, nil - case "account,company,employee,accounting_period": - return ExpensesRetrieveRequestExpandAccountCompanyEmployeeAccountingPeriod, nil - case "account,contact": - return ExpensesRetrieveRequestExpandAccountContact, nil - case "account,contact,accounting_period": - return ExpensesRetrieveRequestExpandAccountContactAccountingPeriod, nil - case "account,contact,company": - return ExpensesRetrieveRequestExpandAccountContactCompany, nil - case "account,contact,company,accounting_period": - return ExpensesRetrieveRequestExpandAccountContactCompanyAccountingPeriod, nil - case "account,contact,company,employee": - return ExpensesRetrieveRequestExpandAccountContactCompanyEmployee, nil - case "account,contact,company,employee,accounting_period": - return ExpensesRetrieveRequestExpandAccountContactCompanyEmployeeAccountingPeriod, nil - case "account,contact,employee": - return ExpensesRetrieveRequestExpandAccountContactEmployee, nil - case "account,contact,employee,accounting_period": - return ExpensesRetrieveRequestExpandAccountContactEmployeeAccountingPeriod, nil - case "account,employee": - return ExpensesRetrieveRequestExpandAccountEmployee, nil - case "account,employee,accounting_period": - return ExpensesRetrieveRequestExpandAccountEmployeeAccountingPeriod, nil + return ExpensesRetrieveRequestExpandItemAccount, nil case "accounting_period": - return ExpensesRetrieveRequestExpandAccountingPeriod, nil + return ExpensesRetrieveRequestExpandItemAccountingPeriod, nil case "company": - return ExpensesRetrieveRequestExpandCompany, nil - case "company,accounting_period": - return ExpensesRetrieveRequestExpandCompanyAccountingPeriod, nil - case "company,employee": - return ExpensesRetrieveRequestExpandCompanyEmployee, nil - case "company,employee,accounting_period": - return ExpensesRetrieveRequestExpandCompanyEmployeeAccountingPeriod, nil + return ExpensesRetrieveRequestExpandItemCompany, nil case "contact": - return ExpensesRetrieveRequestExpandContact, nil - case "contact,accounting_period": - return ExpensesRetrieveRequestExpandContactAccountingPeriod, nil - case "contact,company": - return ExpensesRetrieveRequestExpandContactCompany, nil - case "contact,company,accounting_period": - return ExpensesRetrieveRequestExpandContactCompanyAccountingPeriod, nil - case "contact,company,employee": - return ExpensesRetrieveRequestExpandContactCompanyEmployee, nil - case "contact,company,employee,accounting_period": - return ExpensesRetrieveRequestExpandContactCompanyEmployeeAccountingPeriod, nil - case "contact,employee": - return ExpensesRetrieveRequestExpandContactEmployee, nil - case "contact,employee,accounting_period": - return ExpensesRetrieveRequestExpandContactEmployeeAccountingPeriod, nil + return ExpensesRetrieveRequestExpandItemContact, nil case "employee": - return ExpensesRetrieveRequestExpandEmployee, nil - case "employee,accounting_period": - return ExpensesRetrieveRequestExpandEmployeeAccountingPeriod, nil + return ExpensesRetrieveRequestExpandItemEmployee, nil case "tracking_categories": - return ExpensesRetrieveRequestExpandTrackingCategories, nil - case "tracking_categories,account": - return ExpensesRetrieveRequestExpandTrackingCategoriesAccount, nil - case "tracking_categories,account,accounting_period": - return ExpensesRetrieveRequestExpandTrackingCategoriesAccountAccountingPeriod, nil - case "tracking_categories,account,company": - return ExpensesRetrieveRequestExpandTrackingCategoriesAccountCompany, nil - case "tracking_categories,account,company,accounting_period": - return ExpensesRetrieveRequestExpandTrackingCategoriesAccountCompanyAccountingPeriod, nil - case "tracking_categories,account,company,employee": - return ExpensesRetrieveRequestExpandTrackingCategoriesAccountCompanyEmployee, nil - case "tracking_categories,account,company,employee,accounting_period": - return ExpensesRetrieveRequestExpandTrackingCategoriesAccountCompanyEmployeeAccountingPeriod, nil - case "tracking_categories,account,contact": - return ExpensesRetrieveRequestExpandTrackingCategoriesAccountContact, nil - case "tracking_categories,account,contact,accounting_period": - return ExpensesRetrieveRequestExpandTrackingCategoriesAccountContactAccountingPeriod, nil - case "tracking_categories,account,contact,company": - return ExpensesRetrieveRequestExpandTrackingCategoriesAccountContactCompany, nil - case "tracking_categories,account,contact,company,accounting_period": - return ExpensesRetrieveRequestExpandTrackingCategoriesAccountContactCompanyAccountingPeriod, nil - case "tracking_categories,account,contact,company,employee": - return ExpensesRetrieveRequestExpandTrackingCategoriesAccountContactCompanyEmployee, nil - case "tracking_categories,account,contact,company,employee,accounting_period": - return ExpensesRetrieveRequestExpandTrackingCategoriesAccountContactCompanyEmployeeAccountingPeriod, nil - case "tracking_categories,account,contact,employee": - return ExpensesRetrieveRequestExpandTrackingCategoriesAccountContactEmployee, nil - case "tracking_categories,account,contact,employee,accounting_period": - return ExpensesRetrieveRequestExpandTrackingCategoriesAccountContactEmployeeAccountingPeriod, nil - case "tracking_categories,account,employee": - return ExpensesRetrieveRequestExpandTrackingCategoriesAccountEmployee, nil - case "tracking_categories,account,employee,accounting_period": - return ExpensesRetrieveRequestExpandTrackingCategoriesAccountEmployeeAccountingPeriod, nil - case "tracking_categories,accounting_period": - return ExpensesRetrieveRequestExpandTrackingCategoriesAccountingPeriod, nil - case "tracking_categories,company": - return ExpensesRetrieveRequestExpandTrackingCategoriesCompany, nil - case "tracking_categories,company,accounting_period": - return ExpensesRetrieveRequestExpandTrackingCategoriesCompanyAccountingPeriod, nil - case "tracking_categories,company,employee": - return ExpensesRetrieveRequestExpandTrackingCategoriesCompanyEmployee, nil - case "tracking_categories,company,employee,accounting_period": - return ExpensesRetrieveRequestExpandTrackingCategoriesCompanyEmployeeAccountingPeriod, nil - case "tracking_categories,contact": - return ExpensesRetrieveRequestExpandTrackingCategoriesContact, nil - case "tracking_categories,contact,accounting_period": - return ExpensesRetrieveRequestExpandTrackingCategoriesContactAccountingPeriod, nil - case "tracking_categories,contact,company": - return ExpensesRetrieveRequestExpandTrackingCategoriesContactCompany, nil - case "tracking_categories,contact,company,accounting_period": - return ExpensesRetrieveRequestExpandTrackingCategoriesContactCompanyAccountingPeriod, nil - case "tracking_categories,contact,company,employee": - return ExpensesRetrieveRequestExpandTrackingCategoriesContactCompanyEmployee, nil - case "tracking_categories,contact,company,employee,accounting_period": - return ExpensesRetrieveRequestExpandTrackingCategoriesContactCompanyEmployeeAccountingPeriod, nil - case "tracking_categories,contact,employee": - return ExpensesRetrieveRequestExpandTrackingCategoriesContactEmployee, nil - case "tracking_categories,contact,employee,accounting_period": - return ExpensesRetrieveRequestExpandTrackingCategoriesContactEmployeeAccountingPeriod, nil - case "tracking_categories,employee": - return ExpensesRetrieveRequestExpandTrackingCategoriesEmployee, nil - case "tracking_categories,employee,accounting_period": - return ExpensesRetrieveRequestExpandTrackingCategoriesEmployeeAccountingPeriod, nil - } - var t ExpensesRetrieveRequestExpand + return ExpensesRetrieveRequestExpandItemTrackingCategories, nil + } + var t ExpensesRetrieveRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (e ExpensesRetrieveRequestExpand) Ptr() *ExpensesRetrieveRequestExpand { +func (e ExpensesRetrieveRequestExpandItem) Ptr() *ExpensesRetrieveRequestExpandItem { return &e } + +// # The Expense Object +// ### Description +// The `Expense` object is used to represent a direct purchase by a business, typically made with a check, credit card, or cash. Each `Expense` object is dedicated to a grouping of expenses, with each expense recorded in the lines object. +// +// The `Expense` object is used also used to represent refunds to direct purchases. Refunds can be distinguished from purchases by the amount sign of the records. Expense objects with a negative amount are purchases and `Expense` objects with a positive amount are refunds to those purchases. +// +// ### Usage Example +// Fetch from the `GET Expense` endpoint and view a company's expense. +type Expense struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // When the transaction occurred. + TransactionDate *time.Time `json:"transaction_date,omitempty" url:"transaction_date,omitempty"` + // When the expense was created. + RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty" url:"remote_created_at,omitempty"` + // The expense's payment account. + Account *ExpenseAccount `json:"account,omitempty" url:"account,omitempty"` + // The expense's contact. + Contact *ExpenseContact `json:"contact,omitempty" url:"contact,omitempty"` + // The expense's total amount. + TotalAmount *float64 `json:"total_amount,omitempty" url:"total_amount,omitempty"` + // The expense's total amount before tax. + SubTotal *float64 `json:"sub_total,omitempty" url:"sub_total,omitempty"` + // The expense's total tax amount. + TotalTaxAmount *float64 `json:"total_tax_amount,omitempty" url:"total_tax_amount,omitempty"` + // The expense's currency. + // + // * `XUA` - ADB Unit of Account + // * `AFN` - Afghan Afghani + // * `AFA` - Afghan Afghani (1927–2002) + // * `ALL` - Albanian Lek + // * `ALK` - Albanian Lek (1946–1965) + // * `DZD` - Algerian Dinar + // * `ADP` - Andorran Peseta + // * `AOA` - Angolan Kwanza + // * `AOK` - Angolan Kwanza (1977–1991) + // * `AON` - Angolan New Kwanza (1990–2000) + // * `AOR` - Angolan Readjusted Kwanza (1995–1999) + // * `ARA` - Argentine Austral + // * `ARS` - Argentine Peso + // * `ARM` - Argentine Peso (1881–1970) + // * `ARP` - Argentine Peso (1983–1985) + // * `ARL` - Argentine Peso Ley (1970–1983) + // * `AMD` - Armenian Dram + // * `AWG` - Aruban Florin + // * `AUD` - Australian Dollar + // * `ATS` - Austrian Schilling + // * `AZN` - Azerbaijani Manat + // * `AZM` - Azerbaijani Manat (1993–2006) + // * `BSD` - Bahamian Dollar + // * `BHD` - Bahraini Dinar + // * `BDT` - Bangladeshi Taka + // * `BBD` - Barbadian Dollar + // * `BYN` - Belarusian Ruble + // * `BYB` - Belarusian Ruble (1994–1999) + // * `BYR` - Belarusian Ruble (2000–2016) + // * `BEF` - Belgian Franc + // * `BEC` - Belgian Franc (convertible) + // * `BEL` - Belgian Franc (financial) + // * `BZD` - Belize Dollar + // * `BMD` - Bermudan Dollar + // * `BTN` - Bhutanese Ngultrum + // * `BOB` - Bolivian Boliviano + // * `BOL` - Bolivian Boliviano (1863–1963) + // * `BOV` - Bolivian Mvdol + // * `BOP` - Bolivian Peso + // * `BAM` - Bosnia-Herzegovina Convertible Mark + // * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + // * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + // * `BWP` - Botswanan Pula + // * `BRC` - Brazilian Cruzado (1986–1989) + // * `BRZ` - Brazilian Cruzeiro (1942–1967) + // * `BRE` - Brazilian Cruzeiro (1990–1993) + // * `BRR` - Brazilian Cruzeiro (1993–1994) + // * `BRN` - Brazilian New Cruzado (1989–1990) + // * `BRB` - Brazilian New Cruzeiro (1967–1986) + // * `BRL` - Brazilian Real + // * `GBP` - British Pound + // * `BND` - Brunei Dollar + // * `BGL` - Bulgarian Hard Lev + // * `BGN` - Bulgarian Lev + // * `BGO` - Bulgarian Lev (1879–1952) + // * `BGM` - Bulgarian Socialist Lev + // * `BUK` - Burmese Kyat + // * `BIF` - Burundian Franc + // * `XPF` - CFP Franc + // * `KHR` - Cambodian Riel + // * `CAD` - Canadian Dollar + // * `CVE` - Cape Verdean Escudo + // * `KYD` - Cayman Islands Dollar + // * `XAF` - Central African CFA Franc + // * `CLE` - Chilean Escudo + // * `CLP` - Chilean Peso + // * `CLF` - Chilean Unit of Account (UF) + // * `CNX` - Chinese People’s Bank Dollar + // * `CNY` - Chinese Yuan + // * `CNH` - Chinese Yuan (offshore) + // * `COP` - Colombian Peso + // * `COU` - Colombian Real Value Unit + // * `KMF` - Comorian Franc + // * `CDF` - Congolese Franc + // * `CRC` - Costa Rican Colón + // * `HRD` - Croatian Dinar + // * `HRK` - Croatian Kuna + // * `CUC` - Cuban Convertible Peso + // * `CUP` - Cuban Peso + // * `CYP` - Cypriot Pound + // * `CZK` - Czech Koruna + // * `CSK` - Czechoslovak Hard Koruna + // * `DKK` - Danish Krone + // * `DJF` - Djiboutian Franc + // * `DOP` - Dominican Peso + // * `NLG` - Dutch Guilder + // * `XCD` - East Caribbean Dollar + // * `DDM` - East German Mark + // * `ECS` - Ecuadorian Sucre + // * `ECV` - Ecuadorian Unit of Constant Value + // * `EGP` - Egyptian Pound + // * `GQE` - Equatorial Guinean Ekwele + // * `ERN` - Eritrean Nakfa + // * `EEK` - Estonian Kroon + // * `ETB` - Ethiopian Birr + // * `EUR` - Euro + // * `XBA` - European Composite Unit + // * `XEU` - European Currency Unit + // * `XBB` - European Monetary Unit + // * `XBC` - European Unit of Account (XBC) + // * `XBD` - European Unit of Account (XBD) + // * `FKP` - Falkland Islands Pound + // * `FJD` - Fijian Dollar + // * `FIM` - Finnish Markka + // * `FRF` - French Franc + // * `XFO` - French Gold Franc + // * `XFU` - French UIC-Franc + // * `GMD` - Gambian Dalasi + // * `GEK` - Georgian Kupon Larit + // * `GEL` - Georgian Lari + // * `DEM` - German Mark + // * `GHS` - Ghanaian Cedi + // * `GHC` - Ghanaian Cedi (1979–2007) + // * `GIP` - Gibraltar Pound + // * `XAU` - Gold + // * `GRD` - Greek Drachma + // * `GTQ` - Guatemalan Quetzal + // * `GWP` - Guinea-Bissau Peso + // * `GNF` - Guinean Franc + // * `GNS` - Guinean Syli + // * `GYD` - Guyanaese Dollar + // * `HTG` - Haitian Gourde + // * `HNL` - Honduran Lempira + // * `HKD` - Hong Kong Dollar + // * `HUF` - Hungarian Forint + // * `IMP` - IMP + // * `ISK` - Icelandic Króna + // * `ISJ` - Icelandic Króna (1918–1981) + // * `INR` - Indian Rupee + // * `IDR` - Indonesian Rupiah + // * `IRR` - Iranian Rial + // * `IQD` - Iraqi Dinar + // * `IEP` - Irish Pound + // * `ILS` - Israeli New Shekel + // * `ILP` - Israeli Pound + // * `ILR` - Israeli Shekel (1980–1985) + // * `ITL` - Italian Lira + // * `JMD` - Jamaican Dollar + // * `JPY` - Japanese Yen + // * `JOD` - Jordanian Dinar + // * `KZT` - Kazakhstani Tenge + // * `KES` - Kenyan Shilling + // * `KWD` - Kuwaiti Dinar + // * `KGS` - Kyrgystani Som + // * `LAK` - Laotian Kip + // * `LVL` - Latvian Lats + // * `LVR` - Latvian Ruble + // * `LBP` - Lebanese Pound + // * `LSL` - Lesotho Loti + // * `LRD` - Liberian Dollar + // * `LYD` - Libyan Dinar + // * `LTL` - Lithuanian Litas + // * `LTT` - Lithuanian Talonas + // * `LUL` - Luxembourg Financial Franc + // * `LUC` - Luxembourgian Convertible Franc + // * `LUF` - Luxembourgian Franc + // * `MOP` - Macanese Pataca + // * `MKD` - Macedonian Denar + // * `MKN` - Macedonian Denar (1992–1993) + // * `MGA` - Malagasy Ariary + // * `MGF` - Malagasy Franc + // * `MWK` - Malawian Kwacha + // * `MYR` - Malaysian Ringgit + // * `MVR` - Maldivian Rufiyaa + // * `MVP` - Maldivian Rupee (1947–1981) + // * `MLF` - Malian Franc + // * `MTL` - Maltese Lira + // * `MTP` - Maltese Pound + // * `MRU` - Mauritanian Ouguiya + // * `MRO` - Mauritanian Ouguiya (1973–2017) + // * `MUR` - Mauritian Rupee + // * `MXV` - Mexican Investment Unit + // * `MXN` - Mexican Peso + // * `MXP` - Mexican Silver Peso (1861–1992) + // * `MDC` - Moldovan Cupon + // * `MDL` - Moldovan Leu + // * `MCF` - Monegasque Franc + // * `MNT` - Mongolian Tugrik + // * `MAD` - Moroccan Dirham + // * `MAF` - Moroccan Franc + // * `MZE` - Mozambican Escudo + // * `MZN` - Mozambican Metical + // * `MZM` - Mozambican Metical (1980–2006) + // * `MMK` - Myanmar Kyat + // * `NAD` - Namibian Dollar + // * `NPR` - Nepalese Rupee + // * `ANG` - Netherlands Antillean Guilder + // * `TWD` - New Taiwan Dollar + // * `NZD` - New Zealand Dollar + // * `NIO` - Nicaraguan Córdoba + // * `NIC` - Nicaraguan Córdoba (1988–1991) + // * `NGN` - Nigerian Naira + // * `KPW` - North Korean Won + // * `NOK` - Norwegian Krone + // * `OMR` - Omani Rial + // * `PKR` - Pakistani Rupee + // * `XPD` - Palladium + // * `PAB` - Panamanian Balboa + // * `PGK` - Papua New Guinean Kina + // * `PYG` - Paraguayan Guarani + // * `PEI` - Peruvian Inti + // * `PEN` - Peruvian Sol + // * `PES` - Peruvian Sol (1863–1965) + // * `PHP` - Philippine Peso + // * `XPT` - Platinum + // * `PLN` - Polish Zloty + // * `PLZ` - Polish Zloty (1950–1995) + // * `PTE` - Portuguese Escudo + // * `GWE` - Portuguese Guinea Escudo + // * `QAR` - Qatari Rial + // * `XRE` - RINET Funds + // * `RHD` - Rhodesian Dollar + // * `RON` - Romanian Leu + // * `ROL` - Romanian Leu (1952–2006) + // * `RUB` - Russian Ruble + // * `RUR` - Russian Ruble (1991–1998) + // * `RWF` - Rwandan Franc + // * `SVC` - Salvadoran Colón + // * `WST` - Samoan Tala + // * `SAR` - Saudi Riyal + // * `RSD` - Serbian Dinar + // * `CSD` - Serbian Dinar (2002–2006) + // * `SCR` - Seychellois Rupee + // * `SLL` - Sierra Leonean Leone + // * `XAG` - Silver + // * `SGD` - Singapore Dollar + // * `SKK` - Slovak Koruna + // * `SIT` - Slovenian Tolar + // * `SBD` - Solomon Islands Dollar + // * `SOS` - Somali Shilling + // * `ZAR` - South African Rand + // * `ZAL` - South African Rand (financial) + // * `KRH` - South Korean Hwan (1953–1962) + // * `KRW` - South Korean Won + // * `KRO` - South Korean Won (1945–1953) + // * `SSP` - South Sudanese Pound + // * `SUR` - Soviet Rouble + // * `ESP` - Spanish Peseta + // * `ESA` - Spanish Peseta (A account) + // * `ESB` - Spanish Peseta (convertible account) + // * `XDR` - Special Drawing Rights + // * `LKR` - Sri Lankan Rupee + // * `SHP` - St. Helena Pound + // * `XSU` - Sucre + // * `SDD` - Sudanese Dinar (1992–2007) + // * `SDG` - Sudanese Pound + // * `SDP` - Sudanese Pound (1957–1998) + // * `SRD` - Surinamese Dollar + // * `SRG` - Surinamese Guilder + // * `SZL` - Swazi Lilangeni + // * `SEK` - Swedish Krona + // * `CHF` - Swiss Franc + // * `SYP` - Syrian Pound + // * `STN` - São Tomé & Príncipe Dobra + // * `STD` - São Tomé & Príncipe Dobra (1977–2017) + // * `TVD` - TVD + // * `TJR` - Tajikistani Ruble + // * `TJS` - Tajikistani Somoni + // * `TZS` - Tanzanian Shilling + // * `XTS` - Testing Currency Code + // * `THB` - Thai Baht + // * `XXX` - The codes assigned for transactions where no currency is involved + // * `TPE` - Timorese Escudo + // * `TOP` - Tongan Paʻanga + // * `TTD` - Trinidad & Tobago Dollar + // * `TND` - Tunisian Dinar + // * `TRY` - Turkish Lira + // * `TRL` - Turkish Lira (1922–2005) + // * `TMT` - Turkmenistani Manat + // * `TMM` - Turkmenistani Manat (1993–2009) + // * `USD` - US Dollar + // * `USN` - US Dollar (Next day) + // * `USS` - US Dollar (Same day) + // * `UGX` - Ugandan Shilling + // * `UGS` - Ugandan Shilling (1966–1987) + // * `UAH` - Ukrainian Hryvnia + // * `UAK` - Ukrainian Karbovanets + // * `AED` - United Arab Emirates Dirham + // * `UYW` - Uruguayan Nominal Wage Index Unit + // * `UYU` - Uruguayan Peso + // * `UYP` - Uruguayan Peso (1975–1993) + // * `UYI` - Uruguayan Peso (Indexed Units) + // * `UZS` - Uzbekistani Som + // * `VUV` - Vanuatu Vatu + // * `VES` - Venezuelan Bolívar + // * `VEB` - Venezuelan Bolívar (1871–2008) + // * `VEF` - Venezuelan Bolívar (2008–2018) + // * `VND` - Vietnamese Dong + // * `VNN` - Vietnamese Dong (1978–1985) + // * `CHE` - WIR Euro + // * `CHW` - WIR Franc + // * `XOF` - West African CFA Franc + // * `YDD` - Yemeni Dinar + // * `YER` - Yemeni Rial + // * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + // * `YUD` - Yugoslavian Hard Dinar (1966–1990) + // * `YUM` - Yugoslavian New Dinar (1994–2002) + // * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + // * `ZWN` - ZWN + // * `ZRN` - Zairean New Zaire (1993–1998) + // * `ZRZ` - Zairean Zaire (1971–1993) + // * `ZMW` - Zambian Kwacha + // * `ZMK` - Zambian Kwacha (1968–2012) + // * `ZWD` - Zimbabwean Dollar (1980–2008) + // * `ZWR` - Zimbabwean Dollar (2008) + // * `ZWL` - Zimbabwean Dollar (2009) + Currency *ExpenseCurrency `json:"currency,omitempty" url:"currency,omitempty"` + // The expense's exchange rate. + ExchangeRate *string `json:"exchange_rate,omitempty" url:"exchange_rate,omitempty"` + // If the transaction is inclusive or exclusive of tax. `True` if inclusive, `False` if exclusive. + InclusiveOfTax *bool `json:"inclusive_of_tax,omitempty" url:"inclusive_of_tax,omitempty"` + // The company the expense belongs to. + Company *ExpenseCompany `json:"company,omitempty" url:"company,omitempty"` + // The employee this overall transaction relates to. + Employee *ExpenseEmployee `json:"employee,omitempty" url:"employee,omitempty"` + // The expense's private note. + Memo *string `json:"memo,omitempty" url:"memo,omitempty"` + Lines []*ExpenseLine `json:"lines,omitempty" url:"lines,omitempty"` + TrackingCategories []*ExpenseTrackingCategoriesItem `json:"tracking_categories,omitempty" url:"tracking_categories,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + // The accounting period that the Expense was generated in. + AccountingPeriod *ExpenseAccountingPeriod `json:"accounting_period,omitempty" url:"accounting_period,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + RemoteFields []*RemoteField `json:"remote_fields,omitempty" url:"remote_fields,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (e *Expense) GetId() *string { + if e == nil { + return nil + } + return e.Id +} + +func (e *Expense) GetRemoteId() *string { + if e == nil { + return nil + } + return e.RemoteId +} + +func (e *Expense) GetCreatedAt() *time.Time { + if e == nil { + return nil + } + return e.CreatedAt +} + +func (e *Expense) GetModifiedAt() *time.Time { + if e == nil { + return nil + } + return e.ModifiedAt +} + +func (e *Expense) GetTransactionDate() *time.Time { + if e == nil { + return nil + } + return e.TransactionDate +} + +func (e *Expense) GetRemoteCreatedAt() *time.Time { + if e == nil { + return nil + } + return e.RemoteCreatedAt +} + +func (e *Expense) GetAccount() *ExpenseAccount { + if e == nil { + return nil + } + return e.Account +} + +func (e *Expense) GetContact() *ExpenseContact { + if e == nil { + return nil + } + return e.Contact +} + +func (e *Expense) GetTotalAmount() *float64 { + if e == nil { + return nil + } + return e.TotalAmount +} + +func (e *Expense) GetSubTotal() *float64 { + if e == nil { + return nil + } + return e.SubTotal +} + +func (e *Expense) GetTotalTaxAmount() *float64 { + if e == nil { + return nil + } + return e.TotalTaxAmount +} + +func (e *Expense) GetCurrency() *ExpenseCurrency { + if e == nil { + return nil + } + return e.Currency +} + +func (e *Expense) GetExchangeRate() *string { + if e == nil { + return nil + } + return e.ExchangeRate +} + +func (e *Expense) GetInclusiveOfTax() *bool { + if e == nil { + return nil + } + return e.InclusiveOfTax +} + +func (e *Expense) GetCompany() *ExpenseCompany { + if e == nil { + return nil + } + return e.Company +} + +func (e *Expense) GetEmployee() *ExpenseEmployee { + if e == nil { + return nil + } + return e.Employee +} + +func (e *Expense) GetMemo() *string { + if e == nil { + return nil + } + return e.Memo +} + +func (e *Expense) GetLines() []*ExpenseLine { + if e == nil { + return nil + } + return e.Lines +} + +func (e *Expense) GetTrackingCategories() []*ExpenseTrackingCategoriesItem { + if e == nil { + return nil + } + return e.TrackingCategories +} + +func (e *Expense) GetRemoteWasDeleted() *bool { + if e == nil { + return nil + } + return e.RemoteWasDeleted +} + +func (e *Expense) GetAccountingPeriod() *ExpenseAccountingPeriod { + if e == nil { + return nil + } + return e.AccountingPeriod +} + +func (e *Expense) GetFieldMappings() map[string]interface{} { + if e == nil { + return nil + } + return e.FieldMappings +} + +func (e *Expense) GetRemoteData() []*RemoteData { + if e == nil { + return nil + } + return e.RemoteData +} + +func (e *Expense) GetRemoteFields() []*RemoteField { + if e == nil { + return nil + } + return e.RemoteFields +} + +func (e *Expense) GetExtraProperties() map[string]interface{} { + return e.extraProperties +} + +func (e *Expense) UnmarshalJSON(data []byte) error { + type embed Expense + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + TransactionDate *internal.DateTime `json:"transaction_date,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + }{ + embed: embed(*e), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *e = Expense(unmarshaler.embed) + e.CreatedAt = unmarshaler.CreatedAt.TimePtr() + e.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + e.TransactionDate = unmarshaler.TransactionDate.TimePtr() + e.RemoteCreatedAt = unmarshaler.RemoteCreatedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *e) + if err != nil { + return err + } + e.extraProperties = extraProperties + e.rawJSON = json.RawMessage(data) + return nil +} + +func (e *Expense) MarshalJSON() ([]byte, error) { + type embed Expense + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + TransactionDate *internal.DateTime `json:"transaction_date,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + }{ + embed: embed(*e), + CreatedAt: internal.NewOptionalDateTime(e.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(e.ModifiedAt), + TransactionDate: internal.NewOptionalDateTime(e.TransactionDate), + RemoteCreatedAt: internal.NewOptionalDateTime(e.RemoteCreatedAt), + } + return json.Marshal(marshaler) +} + +func (e *Expense) String() string { + if len(e.rawJSON) > 0 { + if value, err := internal.StringifyJSON(e.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(e); err == nil { + return value + } + return fmt.Sprintf("%#v", e) +} + +// The expense's payment account. +type ExpenseAccount struct { + String string + Account *Account + + typ string +} + +func (e *ExpenseAccount) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *ExpenseAccount) GetAccount() *Account { + if e == nil { + return nil + } + return e.Account +} + +func (e *ExpenseAccount) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + valueAccount := new(Account) + if err := json.Unmarshal(data, &valueAccount); err == nil { + e.typ = "Account" + e.Account = valueAccount + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e ExpenseAccount) MarshalJSON() ([]byte, error) { + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + if e.typ == "Account" || e.Account != nil { + return json.Marshal(e.Account) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type ExpenseAccountVisitor interface { + VisitString(string) error + VisitAccount(*Account) error +} + +func (e *ExpenseAccount) Accept(visitor ExpenseAccountVisitor) error { + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + if e.typ == "Account" || e.Account != nil { + return visitor.VisitAccount(e.Account) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +// The accounting period that the Expense was generated in. +type ExpenseAccountingPeriod struct { + String string + AccountingPeriod *AccountingPeriod + + typ string +} + +func (e *ExpenseAccountingPeriod) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *ExpenseAccountingPeriod) GetAccountingPeriod() *AccountingPeriod { + if e == nil { + return nil + } + return e.AccountingPeriod +} + +func (e *ExpenseAccountingPeriod) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + valueAccountingPeriod := new(AccountingPeriod) + if err := json.Unmarshal(data, &valueAccountingPeriod); err == nil { + e.typ = "AccountingPeriod" + e.AccountingPeriod = valueAccountingPeriod + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e ExpenseAccountingPeriod) MarshalJSON() ([]byte, error) { + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + if e.typ == "AccountingPeriod" || e.AccountingPeriod != nil { + return json.Marshal(e.AccountingPeriod) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type ExpenseAccountingPeriodVisitor interface { + VisitString(string) error + VisitAccountingPeriod(*AccountingPeriod) error +} + +func (e *ExpenseAccountingPeriod) Accept(visitor ExpenseAccountingPeriodVisitor) error { + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + if e.typ == "AccountingPeriod" || e.AccountingPeriod != nil { + return visitor.VisitAccountingPeriod(e.AccountingPeriod) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +// The company the expense belongs to. +type ExpenseCompany struct { + String string + CompanyInfo *CompanyInfo + + typ string +} + +func (e *ExpenseCompany) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *ExpenseCompany) GetCompanyInfo() *CompanyInfo { + if e == nil { + return nil + } + return e.CompanyInfo +} + +func (e *ExpenseCompany) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + valueCompanyInfo := new(CompanyInfo) + if err := json.Unmarshal(data, &valueCompanyInfo); err == nil { + e.typ = "CompanyInfo" + e.CompanyInfo = valueCompanyInfo + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e ExpenseCompany) MarshalJSON() ([]byte, error) { + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + if e.typ == "CompanyInfo" || e.CompanyInfo != nil { + return json.Marshal(e.CompanyInfo) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type ExpenseCompanyVisitor interface { + VisitString(string) error + VisitCompanyInfo(*CompanyInfo) error +} + +func (e *ExpenseCompany) Accept(visitor ExpenseCompanyVisitor) error { + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + if e.typ == "CompanyInfo" || e.CompanyInfo != nil { + return visitor.VisitCompanyInfo(e.CompanyInfo) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +// The expense's contact. +type ExpenseContact struct { + String string + Contact *Contact + + typ string +} + +func (e *ExpenseContact) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *ExpenseContact) GetContact() *Contact { + if e == nil { + return nil + } + return e.Contact +} + +func (e *ExpenseContact) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + valueContact := new(Contact) + if err := json.Unmarshal(data, &valueContact); err == nil { + e.typ = "Contact" + e.Contact = valueContact + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e ExpenseContact) MarshalJSON() ([]byte, error) { + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + if e.typ == "Contact" || e.Contact != nil { + return json.Marshal(e.Contact) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type ExpenseContactVisitor interface { + VisitString(string) error + VisitContact(*Contact) error +} + +func (e *ExpenseContact) Accept(visitor ExpenseContactVisitor) error { + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + if e.typ == "Contact" || e.Contact != nil { + return visitor.VisitContact(e.Contact) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +// The expense's currency. +// +// * `XUA` - ADB Unit of Account +// * `AFN` - Afghan Afghani +// * `AFA` - Afghan Afghani (1927–2002) +// * `ALL` - Albanian Lek +// * `ALK` - Albanian Lek (1946–1965) +// * `DZD` - Algerian Dinar +// * `ADP` - Andorran Peseta +// * `AOA` - Angolan Kwanza +// * `AOK` - Angolan Kwanza (1977–1991) +// * `AON` - Angolan New Kwanza (1990–2000) +// * `AOR` - Angolan Readjusted Kwanza (1995–1999) +// * `ARA` - Argentine Austral +// * `ARS` - Argentine Peso +// * `ARM` - Argentine Peso (1881–1970) +// * `ARP` - Argentine Peso (1983–1985) +// * `ARL` - Argentine Peso Ley (1970–1983) +// * `AMD` - Armenian Dram +// * `AWG` - Aruban Florin +// * `AUD` - Australian Dollar +// * `ATS` - Austrian Schilling +// * `AZN` - Azerbaijani Manat +// * `AZM` - Azerbaijani Manat (1993–2006) +// * `BSD` - Bahamian Dollar +// * `BHD` - Bahraini Dinar +// * `BDT` - Bangladeshi Taka +// * `BBD` - Barbadian Dollar +// * `BYN` - Belarusian Ruble +// * `BYB` - Belarusian Ruble (1994–1999) +// * `BYR` - Belarusian Ruble (2000–2016) +// * `BEF` - Belgian Franc +// * `BEC` - Belgian Franc (convertible) +// * `BEL` - Belgian Franc (financial) +// * `BZD` - Belize Dollar +// * `BMD` - Bermudan Dollar +// * `BTN` - Bhutanese Ngultrum +// * `BOB` - Bolivian Boliviano +// * `BOL` - Bolivian Boliviano (1863–1963) +// * `BOV` - Bolivian Mvdol +// * `BOP` - Bolivian Peso +// * `BAM` - Bosnia-Herzegovina Convertible Mark +// * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) +// * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) +// * `BWP` - Botswanan Pula +// * `BRC` - Brazilian Cruzado (1986–1989) +// * `BRZ` - Brazilian Cruzeiro (1942–1967) +// * `BRE` - Brazilian Cruzeiro (1990–1993) +// * `BRR` - Brazilian Cruzeiro (1993–1994) +// * `BRN` - Brazilian New Cruzado (1989–1990) +// * `BRB` - Brazilian New Cruzeiro (1967–1986) +// * `BRL` - Brazilian Real +// * `GBP` - British Pound +// * `BND` - Brunei Dollar +// * `BGL` - Bulgarian Hard Lev +// * `BGN` - Bulgarian Lev +// * `BGO` - Bulgarian Lev (1879–1952) +// * `BGM` - Bulgarian Socialist Lev +// * `BUK` - Burmese Kyat +// * `BIF` - Burundian Franc +// * `XPF` - CFP Franc +// * `KHR` - Cambodian Riel +// * `CAD` - Canadian Dollar +// * `CVE` - Cape Verdean Escudo +// * `KYD` - Cayman Islands Dollar +// * `XAF` - Central African CFA Franc +// * `CLE` - Chilean Escudo +// * `CLP` - Chilean Peso +// * `CLF` - Chilean Unit of Account (UF) +// * `CNX` - Chinese People’s Bank Dollar +// * `CNY` - Chinese Yuan +// * `CNH` - Chinese Yuan (offshore) +// * `COP` - Colombian Peso +// * `COU` - Colombian Real Value Unit +// * `KMF` - Comorian Franc +// * `CDF` - Congolese Franc +// * `CRC` - Costa Rican Colón +// * `HRD` - Croatian Dinar +// * `HRK` - Croatian Kuna +// * `CUC` - Cuban Convertible Peso +// * `CUP` - Cuban Peso +// * `CYP` - Cypriot Pound +// * `CZK` - Czech Koruna +// * `CSK` - Czechoslovak Hard Koruna +// * `DKK` - Danish Krone +// * `DJF` - Djiboutian Franc +// * `DOP` - Dominican Peso +// * `NLG` - Dutch Guilder +// * `XCD` - East Caribbean Dollar +// * `DDM` - East German Mark +// * `ECS` - Ecuadorian Sucre +// * `ECV` - Ecuadorian Unit of Constant Value +// * `EGP` - Egyptian Pound +// * `GQE` - Equatorial Guinean Ekwele +// * `ERN` - Eritrean Nakfa +// * `EEK` - Estonian Kroon +// * `ETB` - Ethiopian Birr +// * `EUR` - Euro +// * `XBA` - European Composite Unit +// * `XEU` - European Currency Unit +// * `XBB` - European Monetary Unit +// * `XBC` - European Unit of Account (XBC) +// * `XBD` - European Unit of Account (XBD) +// * `FKP` - Falkland Islands Pound +// * `FJD` - Fijian Dollar +// * `FIM` - Finnish Markka +// * `FRF` - French Franc +// * `XFO` - French Gold Franc +// * `XFU` - French UIC-Franc +// * `GMD` - Gambian Dalasi +// * `GEK` - Georgian Kupon Larit +// * `GEL` - Georgian Lari +// * `DEM` - German Mark +// * `GHS` - Ghanaian Cedi +// * `GHC` - Ghanaian Cedi (1979–2007) +// * `GIP` - Gibraltar Pound +// * `XAU` - Gold +// * `GRD` - Greek Drachma +// * `GTQ` - Guatemalan Quetzal +// * `GWP` - Guinea-Bissau Peso +// * `GNF` - Guinean Franc +// * `GNS` - Guinean Syli +// * `GYD` - Guyanaese Dollar +// * `HTG` - Haitian Gourde +// * `HNL` - Honduran Lempira +// * `HKD` - Hong Kong Dollar +// * `HUF` - Hungarian Forint +// * `IMP` - IMP +// * `ISK` - Icelandic Króna +// * `ISJ` - Icelandic Króna (1918–1981) +// * `INR` - Indian Rupee +// * `IDR` - Indonesian Rupiah +// * `IRR` - Iranian Rial +// * `IQD` - Iraqi Dinar +// * `IEP` - Irish Pound +// * `ILS` - Israeli New Shekel +// * `ILP` - Israeli Pound +// * `ILR` - Israeli Shekel (1980–1985) +// * `ITL` - Italian Lira +// * `JMD` - Jamaican Dollar +// * `JPY` - Japanese Yen +// * `JOD` - Jordanian Dinar +// * `KZT` - Kazakhstani Tenge +// * `KES` - Kenyan Shilling +// * `KWD` - Kuwaiti Dinar +// * `KGS` - Kyrgystani Som +// * `LAK` - Laotian Kip +// * `LVL` - Latvian Lats +// * `LVR` - Latvian Ruble +// * `LBP` - Lebanese Pound +// * `LSL` - Lesotho Loti +// * `LRD` - Liberian Dollar +// * `LYD` - Libyan Dinar +// * `LTL` - Lithuanian Litas +// * `LTT` - Lithuanian Talonas +// * `LUL` - Luxembourg Financial Franc +// * `LUC` - Luxembourgian Convertible Franc +// * `LUF` - Luxembourgian Franc +// * `MOP` - Macanese Pataca +// * `MKD` - Macedonian Denar +// * `MKN` - Macedonian Denar (1992–1993) +// * `MGA` - Malagasy Ariary +// * `MGF` - Malagasy Franc +// * `MWK` - Malawian Kwacha +// * `MYR` - Malaysian Ringgit +// * `MVR` - Maldivian Rufiyaa +// * `MVP` - Maldivian Rupee (1947–1981) +// * `MLF` - Malian Franc +// * `MTL` - Maltese Lira +// * `MTP` - Maltese Pound +// * `MRU` - Mauritanian Ouguiya +// * `MRO` - Mauritanian Ouguiya (1973–2017) +// * `MUR` - Mauritian Rupee +// * `MXV` - Mexican Investment Unit +// * `MXN` - Mexican Peso +// * `MXP` - Mexican Silver Peso (1861–1992) +// * `MDC` - Moldovan Cupon +// * `MDL` - Moldovan Leu +// * `MCF` - Monegasque Franc +// * `MNT` - Mongolian Tugrik +// * `MAD` - Moroccan Dirham +// * `MAF` - Moroccan Franc +// * `MZE` - Mozambican Escudo +// * `MZN` - Mozambican Metical +// * `MZM` - Mozambican Metical (1980–2006) +// * `MMK` - Myanmar Kyat +// * `NAD` - Namibian Dollar +// * `NPR` - Nepalese Rupee +// * `ANG` - Netherlands Antillean Guilder +// * `TWD` - New Taiwan Dollar +// * `NZD` - New Zealand Dollar +// * `NIO` - Nicaraguan Córdoba +// * `NIC` - Nicaraguan Córdoba (1988–1991) +// * `NGN` - Nigerian Naira +// * `KPW` - North Korean Won +// * `NOK` - Norwegian Krone +// * `OMR` - Omani Rial +// * `PKR` - Pakistani Rupee +// * `XPD` - Palladium +// * `PAB` - Panamanian Balboa +// * `PGK` - Papua New Guinean Kina +// * `PYG` - Paraguayan Guarani +// * `PEI` - Peruvian Inti +// * `PEN` - Peruvian Sol +// * `PES` - Peruvian Sol (1863–1965) +// * `PHP` - Philippine Peso +// * `XPT` - Platinum +// * `PLN` - Polish Zloty +// * `PLZ` - Polish Zloty (1950–1995) +// * `PTE` - Portuguese Escudo +// * `GWE` - Portuguese Guinea Escudo +// * `QAR` - Qatari Rial +// * `XRE` - RINET Funds +// * `RHD` - Rhodesian Dollar +// * `RON` - Romanian Leu +// * `ROL` - Romanian Leu (1952–2006) +// * `RUB` - Russian Ruble +// * `RUR` - Russian Ruble (1991–1998) +// * `RWF` - Rwandan Franc +// * `SVC` - Salvadoran Colón +// * `WST` - Samoan Tala +// * `SAR` - Saudi Riyal +// * `RSD` - Serbian Dinar +// * `CSD` - Serbian Dinar (2002–2006) +// * `SCR` - Seychellois Rupee +// * `SLL` - Sierra Leonean Leone +// * `XAG` - Silver +// * `SGD` - Singapore Dollar +// * `SKK` - Slovak Koruna +// * `SIT` - Slovenian Tolar +// * `SBD` - Solomon Islands Dollar +// * `SOS` - Somali Shilling +// * `ZAR` - South African Rand +// * `ZAL` - South African Rand (financial) +// * `KRH` - South Korean Hwan (1953–1962) +// * `KRW` - South Korean Won +// * `KRO` - South Korean Won (1945–1953) +// * `SSP` - South Sudanese Pound +// * `SUR` - Soviet Rouble +// * `ESP` - Spanish Peseta +// * `ESA` - Spanish Peseta (A account) +// * `ESB` - Spanish Peseta (convertible account) +// * `XDR` - Special Drawing Rights +// * `LKR` - Sri Lankan Rupee +// * `SHP` - St. Helena Pound +// * `XSU` - Sucre +// * `SDD` - Sudanese Dinar (1992–2007) +// * `SDG` - Sudanese Pound +// * `SDP` - Sudanese Pound (1957–1998) +// * `SRD` - Surinamese Dollar +// * `SRG` - Surinamese Guilder +// * `SZL` - Swazi Lilangeni +// * `SEK` - Swedish Krona +// * `CHF` - Swiss Franc +// * `SYP` - Syrian Pound +// * `STN` - São Tomé & Príncipe Dobra +// * `STD` - São Tomé & Príncipe Dobra (1977–2017) +// * `TVD` - TVD +// * `TJR` - Tajikistani Ruble +// * `TJS` - Tajikistani Somoni +// * `TZS` - Tanzanian Shilling +// * `XTS` - Testing Currency Code +// * `THB` - Thai Baht +// * `XXX` - The codes assigned for transactions where no currency is involved +// * `TPE` - Timorese Escudo +// * `TOP` - Tongan Paʻanga +// * `TTD` - Trinidad & Tobago Dollar +// * `TND` - Tunisian Dinar +// * `TRY` - Turkish Lira +// * `TRL` - Turkish Lira (1922–2005) +// * `TMT` - Turkmenistani Manat +// * `TMM` - Turkmenistani Manat (1993–2009) +// * `USD` - US Dollar +// * `USN` - US Dollar (Next day) +// * `USS` - US Dollar (Same day) +// * `UGX` - Ugandan Shilling +// * `UGS` - Ugandan Shilling (1966–1987) +// * `UAH` - Ukrainian Hryvnia +// * `UAK` - Ukrainian Karbovanets +// * `AED` - United Arab Emirates Dirham +// * `UYW` - Uruguayan Nominal Wage Index Unit +// * `UYU` - Uruguayan Peso +// * `UYP` - Uruguayan Peso (1975–1993) +// * `UYI` - Uruguayan Peso (Indexed Units) +// * `UZS` - Uzbekistani Som +// * `VUV` - Vanuatu Vatu +// * `VES` - Venezuelan Bolívar +// * `VEB` - Venezuelan Bolívar (1871–2008) +// * `VEF` - Venezuelan Bolívar (2008–2018) +// * `VND` - Vietnamese Dong +// * `VNN` - Vietnamese Dong (1978–1985) +// * `CHE` - WIR Euro +// * `CHW` - WIR Franc +// * `XOF` - West African CFA Franc +// * `YDD` - Yemeni Dinar +// * `YER` - Yemeni Rial +// * `YUN` - Yugoslavian Convertible Dinar (1990–1992) +// * `YUD` - Yugoslavian Hard Dinar (1966–1990) +// * `YUM` - Yugoslavian New Dinar (1994–2002) +// * `YUR` - Yugoslavian Reformed Dinar (1992–1993) +// * `ZWN` - ZWN +// * `ZRN` - Zairean New Zaire (1993–1998) +// * `ZRZ` - Zairean Zaire (1971–1993) +// * `ZMW` - Zambian Kwacha +// * `ZMK` - Zambian Kwacha (1968–2012) +// * `ZWD` - Zimbabwean Dollar (1980–2008) +// * `ZWR` - Zimbabwean Dollar (2008) +// * `ZWL` - Zimbabwean Dollar (2009) +type ExpenseCurrency struct { + TransactionCurrencyEnum TransactionCurrencyEnum + String string + + typ string +} + +func (e *ExpenseCurrency) GetTransactionCurrencyEnum() TransactionCurrencyEnum { + if e == nil { + return "" + } + return e.TransactionCurrencyEnum +} + +func (e *ExpenseCurrency) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *ExpenseCurrency) UnmarshalJSON(data []byte) error { + var valueTransactionCurrencyEnum TransactionCurrencyEnum + if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { + e.typ = "TransactionCurrencyEnum" + e.TransactionCurrencyEnum = valueTransactionCurrencyEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e ExpenseCurrency) MarshalJSON() ([]byte, error) { + if e.typ == "TransactionCurrencyEnum" || e.TransactionCurrencyEnum != "" { + return json.Marshal(e.TransactionCurrencyEnum) + } + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type ExpenseCurrencyVisitor interface { + VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error + VisitString(string) error +} + +func (e *ExpenseCurrency) Accept(visitor ExpenseCurrencyVisitor) error { + if e.typ == "TransactionCurrencyEnum" || e.TransactionCurrencyEnum != "" { + return visitor.VisitTransactionCurrencyEnum(e.TransactionCurrencyEnum) + } + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +// The employee this overall transaction relates to. +type ExpenseEmployee struct { + String string + Employee *Employee + + typ string +} + +func (e *ExpenseEmployee) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *ExpenseEmployee) GetEmployee() *Employee { + if e == nil { + return nil + } + return e.Employee +} + +func (e *ExpenseEmployee) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + valueEmployee := new(Employee) + if err := json.Unmarshal(data, &valueEmployee); err == nil { + e.typ = "Employee" + e.Employee = valueEmployee + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e ExpenseEmployee) MarshalJSON() ([]byte, error) { + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + if e.typ == "Employee" || e.Employee != nil { + return json.Marshal(e.Employee) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type ExpenseEmployeeVisitor interface { + VisitString(string) error + VisitEmployee(*Employee) error +} + +func (e *ExpenseEmployee) Accept(visitor ExpenseEmployeeVisitor) error { + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + if e.typ == "Employee" || e.Employee != nil { + return visitor.VisitEmployee(e.Employee) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +// # The ExpenseLine Object +// ### Description +// The `ExpenseLine` object is used to represent an expense's line items. +// +// ### Usage Example +// Fetch from the `GET Expense` endpoint and view the expense's line items. +type ExpenseLine struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The line's item. + Item *ExpenseLineItem `json:"item,omitempty" url:"item,omitempty"` + // The line's net amount. + NetAmount *float64 `json:"net_amount,omitempty" url:"net_amount,omitempty"` + TrackingCategory *ExpenseLineTrackingCategory `json:"tracking_category,omitempty" url:"tracking_category,omitempty"` + // The expense line item's associated tracking categories. + TrackingCategories []*ExpenseLineTrackingCategoriesItem `json:"tracking_categories,omitempty" url:"tracking_categories,omitempty"` + // The company the expense belongs to. + Company *string `json:"company,omitempty" url:"company,omitempty"` + // The employee this overall transaction relates to. + Employee *ExpenseLineEmployee `json:"employee,omitempty" url:"employee,omitempty"` + // The expense line item's currency. + // + // * `XUA` - ADB Unit of Account + // * `AFN` - Afghan Afghani + // * `AFA` - Afghan Afghani (1927–2002) + // * `ALL` - Albanian Lek + // * `ALK` - Albanian Lek (1946–1965) + // * `DZD` - Algerian Dinar + // * `ADP` - Andorran Peseta + // * `AOA` - Angolan Kwanza + // * `AOK` - Angolan Kwanza (1977–1991) + // * `AON` - Angolan New Kwanza (1990–2000) + // * `AOR` - Angolan Readjusted Kwanza (1995–1999) + // * `ARA` - Argentine Austral + // * `ARS` - Argentine Peso + // * `ARM` - Argentine Peso (1881–1970) + // * `ARP` - Argentine Peso (1983–1985) + // * `ARL` - Argentine Peso Ley (1970–1983) + // * `AMD` - Armenian Dram + // * `AWG` - Aruban Florin + // * `AUD` - Australian Dollar + // * `ATS` - Austrian Schilling + // * `AZN` - Azerbaijani Manat + // * `AZM` - Azerbaijani Manat (1993–2006) + // * `BSD` - Bahamian Dollar + // * `BHD` - Bahraini Dinar + // * `BDT` - Bangladeshi Taka + // * `BBD` - Barbadian Dollar + // * `BYN` - Belarusian Ruble + // * `BYB` - Belarusian Ruble (1994–1999) + // * `BYR` - Belarusian Ruble (2000–2016) + // * `BEF` - Belgian Franc + // * `BEC` - Belgian Franc (convertible) + // * `BEL` - Belgian Franc (financial) + // * `BZD` - Belize Dollar + // * `BMD` - Bermudan Dollar + // * `BTN` - Bhutanese Ngultrum + // * `BOB` - Bolivian Boliviano + // * `BOL` - Bolivian Boliviano (1863–1963) + // * `BOV` - Bolivian Mvdol + // * `BOP` - Bolivian Peso + // * `BAM` - Bosnia-Herzegovina Convertible Mark + // * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + // * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + // * `BWP` - Botswanan Pula + // * `BRC` - Brazilian Cruzado (1986–1989) + // * `BRZ` - Brazilian Cruzeiro (1942–1967) + // * `BRE` - Brazilian Cruzeiro (1990–1993) + // * `BRR` - Brazilian Cruzeiro (1993–1994) + // * `BRN` - Brazilian New Cruzado (1989–1990) + // * `BRB` - Brazilian New Cruzeiro (1967–1986) + // * `BRL` - Brazilian Real + // * `GBP` - British Pound + // * `BND` - Brunei Dollar + // * `BGL` - Bulgarian Hard Lev + // * `BGN` - Bulgarian Lev + // * `BGO` - Bulgarian Lev (1879–1952) + // * `BGM` - Bulgarian Socialist Lev + // * `BUK` - Burmese Kyat + // * `BIF` - Burundian Franc + // * `XPF` - CFP Franc + // * `KHR` - Cambodian Riel + // * `CAD` - Canadian Dollar + // * `CVE` - Cape Verdean Escudo + // * `KYD` - Cayman Islands Dollar + // * `XAF` - Central African CFA Franc + // * `CLE` - Chilean Escudo + // * `CLP` - Chilean Peso + // * `CLF` - Chilean Unit of Account (UF) + // * `CNX` - Chinese People’s Bank Dollar + // * `CNY` - Chinese Yuan + // * `CNH` - Chinese Yuan (offshore) + // * `COP` - Colombian Peso + // * `COU` - Colombian Real Value Unit + // * `KMF` - Comorian Franc + // * `CDF` - Congolese Franc + // * `CRC` - Costa Rican Colón + // * `HRD` - Croatian Dinar + // * `HRK` - Croatian Kuna + // * `CUC` - Cuban Convertible Peso + // * `CUP` - Cuban Peso + // * `CYP` - Cypriot Pound + // * `CZK` - Czech Koruna + // * `CSK` - Czechoslovak Hard Koruna + // * `DKK` - Danish Krone + // * `DJF` - Djiboutian Franc + // * `DOP` - Dominican Peso + // * `NLG` - Dutch Guilder + // * `XCD` - East Caribbean Dollar + // * `DDM` - East German Mark + // * `ECS` - Ecuadorian Sucre + // * `ECV` - Ecuadorian Unit of Constant Value + // * `EGP` - Egyptian Pound + // * `GQE` - Equatorial Guinean Ekwele + // * `ERN` - Eritrean Nakfa + // * `EEK` - Estonian Kroon + // * `ETB` - Ethiopian Birr + // * `EUR` - Euro + // * `XBA` - European Composite Unit + // * `XEU` - European Currency Unit + // * `XBB` - European Monetary Unit + // * `XBC` - European Unit of Account (XBC) + // * `XBD` - European Unit of Account (XBD) + // * `FKP` - Falkland Islands Pound + // * `FJD` - Fijian Dollar + // * `FIM` - Finnish Markka + // * `FRF` - French Franc + // * `XFO` - French Gold Franc + // * `XFU` - French UIC-Franc + // * `GMD` - Gambian Dalasi + // * `GEK` - Georgian Kupon Larit + // * `GEL` - Georgian Lari + // * `DEM` - German Mark + // * `GHS` - Ghanaian Cedi + // * `GHC` - Ghanaian Cedi (1979–2007) + // * `GIP` - Gibraltar Pound + // * `XAU` - Gold + // * `GRD` - Greek Drachma + // * `GTQ` - Guatemalan Quetzal + // * `GWP` - Guinea-Bissau Peso + // * `GNF` - Guinean Franc + // * `GNS` - Guinean Syli + // * `GYD` - Guyanaese Dollar + // * `HTG` - Haitian Gourde + // * `HNL` - Honduran Lempira + // * `HKD` - Hong Kong Dollar + // * `HUF` - Hungarian Forint + // * `IMP` - IMP + // * `ISK` - Icelandic Króna + // * `ISJ` - Icelandic Króna (1918–1981) + // * `INR` - Indian Rupee + // * `IDR` - Indonesian Rupiah + // * `IRR` - Iranian Rial + // * `IQD` - Iraqi Dinar + // * `IEP` - Irish Pound + // * `ILS` - Israeli New Shekel + // * `ILP` - Israeli Pound + // * `ILR` - Israeli Shekel (1980–1985) + // * `ITL` - Italian Lira + // * `JMD` - Jamaican Dollar + // * `JPY` - Japanese Yen + // * `JOD` - Jordanian Dinar + // * `KZT` - Kazakhstani Tenge + // * `KES` - Kenyan Shilling + // * `KWD` - Kuwaiti Dinar + // * `KGS` - Kyrgystani Som + // * `LAK` - Laotian Kip + // * `LVL` - Latvian Lats + // * `LVR` - Latvian Ruble + // * `LBP` - Lebanese Pound + // * `LSL` - Lesotho Loti + // * `LRD` - Liberian Dollar + // * `LYD` - Libyan Dinar + // * `LTL` - Lithuanian Litas + // * `LTT` - Lithuanian Talonas + // * `LUL` - Luxembourg Financial Franc + // * `LUC` - Luxembourgian Convertible Franc + // * `LUF` - Luxembourgian Franc + // * `MOP` - Macanese Pataca + // * `MKD` - Macedonian Denar + // * `MKN` - Macedonian Denar (1992–1993) + // * `MGA` - Malagasy Ariary + // * `MGF` - Malagasy Franc + // * `MWK` - Malawian Kwacha + // * `MYR` - Malaysian Ringgit + // * `MVR` - Maldivian Rufiyaa + // * `MVP` - Maldivian Rupee (1947–1981) + // * `MLF` - Malian Franc + // * `MTL` - Maltese Lira + // * `MTP` - Maltese Pound + // * `MRU` - Mauritanian Ouguiya + // * `MRO` - Mauritanian Ouguiya (1973–2017) + // * `MUR` - Mauritian Rupee + // * `MXV` - Mexican Investment Unit + // * `MXN` - Mexican Peso + // * `MXP` - Mexican Silver Peso (1861–1992) + // * `MDC` - Moldovan Cupon + // * `MDL` - Moldovan Leu + // * `MCF` - Monegasque Franc + // * `MNT` - Mongolian Tugrik + // * `MAD` - Moroccan Dirham + // * `MAF` - Moroccan Franc + // * `MZE` - Mozambican Escudo + // * `MZN` - Mozambican Metical + // * `MZM` - Mozambican Metical (1980–2006) + // * `MMK` - Myanmar Kyat + // * `NAD` - Namibian Dollar + // * `NPR` - Nepalese Rupee + // * `ANG` - Netherlands Antillean Guilder + // * `TWD` - New Taiwan Dollar + // * `NZD` - New Zealand Dollar + // * `NIO` - Nicaraguan Córdoba + // * `NIC` - Nicaraguan Córdoba (1988–1991) + // * `NGN` - Nigerian Naira + // * `KPW` - North Korean Won + // * `NOK` - Norwegian Krone + // * `OMR` - Omani Rial + // * `PKR` - Pakistani Rupee + // * `XPD` - Palladium + // * `PAB` - Panamanian Balboa + // * `PGK` - Papua New Guinean Kina + // * `PYG` - Paraguayan Guarani + // * `PEI` - Peruvian Inti + // * `PEN` - Peruvian Sol + // * `PES` - Peruvian Sol (1863–1965) + // * `PHP` - Philippine Peso + // * `XPT` - Platinum + // * `PLN` - Polish Zloty + // * `PLZ` - Polish Zloty (1950–1995) + // * `PTE` - Portuguese Escudo + // * `GWE` - Portuguese Guinea Escudo + // * `QAR` - Qatari Rial + // * `XRE` - RINET Funds + // * `RHD` - Rhodesian Dollar + // * `RON` - Romanian Leu + // * `ROL` - Romanian Leu (1952–2006) + // * `RUB` - Russian Ruble + // * `RUR` - Russian Ruble (1991–1998) + // * `RWF` - Rwandan Franc + // * `SVC` - Salvadoran Colón + // * `WST` - Samoan Tala + // * `SAR` - Saudi Riyal + // * `RSD` - Serbian Dinar + // * `CSD` - Serbian Dinar (2002–2006) + // * `SCR` - Seychellois Rupee + // * `SLL` - Sierra Leonean Leone + // * `XAG` - Silver + // * `SGD` - Singapore Dollar + // * `SKK` - Slovak Koruna + // * `SIT` - Slovenian Tolar + // * `SBD` - Solomon Islands Dollar + // * `SOS` - Somali Shilling + // * `ZAR` - South African Rand + // * `ZAL` - South African Rand (financial) + // * `KRH` - South Korean Hwan (1953–1962) + // * `KRW` - South Korean Won + // * `KRO` - South Korean Won (1945–1953) + // * `SSP` - South Sudanese Pound + // * `SUR` - Soviet Rouble + // * `ESP` - Spanish Peseta + // * `ESA` - Spanish Peseta (A account) + // * `ESB` - Spanish Peseta (convertible account) + // * `XDR` - Special Drawing Rights + // * `LKR` - Sri Lankan Rupee + // * `SHP` - St. Helena Pound + // * `XSU` - Sucre + // * `SDD` - Sudanese Dinar (1992–2007) + // * `SDG` - Sudanese Pound + // * `SDP` - Sudanese Pound (1957–1998) + // * `SRD` - Surinamese Dollar + // * `SRG` - Surinamese Guilder + // * `SZL` - Swazi Lilangeni + // * `SEK` - Swedish Krona + // * `CHF` - Swiss Franc + // * `SYP` - Syrian Pound + // * `STN` - São Tomé & Príncipe Dobra + // * `STD` - São Tomé & Príncipe Dobra (1977–2017) + // * `TVD` - TVD + // * `TJR` - Tajikistani Ruble + // * `TJS` - Tajikistani Somoni + // * `TZS` - Tanzanian Shilling + // * `XTS` - Testing Currency Code + // * `THB` - Thai Baht + // * `XXX` - The codes assigned for transactions where no currency is involved + // * `TPE` - Timorese Escudo + // * `TOP` - Tongan Paʻanga + // * `TTD` - Trinidad & Tobago Dollar + // * `TND` - Tunisian Dinar + // * `TRY` - Turkish Lira + // * `TRL` - Turkish Lira (1922–2005) + // * `TMT` - Turkmenistani Manat + // * `TMM` - Turkmenistani Manat (1993–2009) + // * `USD` - US Dollar + // * `USN` - US Dollar (Next day) + // * `USS` - US Dollar (Same day) + // * `UGX` - Ugandan Shilling + // * `UGS` - Ugandan Shilling (1966–1987) + // * `UAH` - Ukrainian Hryvnia + // * `UAK` - Ukrainian Karbovanets + // * `AED` - United Arab Emirates Dirham + // * `UYW` - Uruguayan Nominal Wage Index Unit + // * `UYU` - Uruguayan Peso + // * `UYP` - Uruguayan Peso (1975–1993) + // * `UYI` - Uruguayan Peso (Indexed Units) + // * `UZS` - Uzbekistani Som + // * `VUV` - Vanuatu Vatu + // * `VES` - Venezuelan Bolívar + // * `VEB` - Venezuelan Bolívar (1871–2008) + // * `VEF` - Venezuelan Bolívar (2008–2018) + // * `VND` - Vietnamese Dong + // * `VNN` - Vietnamese Dong (1978–1985) + // * `CHE` - WIR Euro + // * `CHW` - WIR Franc + // * `XOF` - West African CFA Franc + // * `YDD` - Yemeni Dinar + // * `YER` - Yemeni Rial + // * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + // * `YUD` - Yugoslavian Hard Dinar (1966–1990) + // * `YUM` - Yugoslavian New Dinar (1994–2002) + // * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + // * `ZWN` - ZWN + // * `ZRN` - Zairean New Zaire (1993–1998) + // * `ZRZ` - Zairean Zaire (1971–1993) + // * `ZMW` - Zambian Kwacha + // * `ZMK` - Zambian Kwacha (1968–2012) + // * `ZWD` - Zimbabwean Dollar (1980–2008) + // * `ZWR` - Zimbabwean Dollar (2008) + // * `ZWL` - Zimbabwean Dollar (2009) + Currency *TransactionCurrencyEnum `json:"currency,omitempty" url:"currency,omitempty"` + // The expense's payment account. + Account *ExpenseLineAccount `json:"account,omitempty" url:"account,omitempty"` + // The expense's contact. + Contact *ExpenseLineContact `json:"contact,omitempty" url:"contact,omitempty"` + Project *ExpenseLineProject `json:"project,omitempty" url:"project,omitempty"` + // The description of the item that was purchased by the company. + Description *string `json:"description,omitempty" url:"description,omitempty"` + // The expense line item's exchange rate. + ExchangeRate *string `json:"exchange_rate,omitempty" url:"exchange_rate,omitempty"` + // The tax rate that applies to this line item. + TaxRate *string `json:"tax_rate,omitempty" url:"tax_rate,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (e *ExpenseLine) GetId() *string { + if e == nil { + return nil + } + return e.Id +} + +func (e *ExpenseLine) GetRemoteId() *string { + if e == nil { + return nil + } + return e.RemoteId +} + +func (e *ExpenseLine) GetCreatedAt() *time.Time { + if e == nil { + return nil + } + return e.CreatedAt +} + +func (e *ExpenseLine) GetModifiedAt() *time.Time { + if e == nil { + return nil + } + return e.ModifiedAt +} + +func (e *ExpenseLine) GetItem() *ExpenseLineItem { + if e == nil { + return nil + } + return e.Item +} + +func (e *ExpenseLine) GetNetAmount() *float64 { + if e == nil { + return nil + } + return e.NetAmount +} + +func (e *ExpenseLine) GetTrackingCategory() *ExpenseLineTrackingCategory { + if e == nil { + return nil + } + return e.TrackingCategory +} + +func (e *ExpenseLine) GetTrackingCategories() []*ExpenseLineTrackingCategoriesItem { + if e == nil { + return nil + } + return e.TrackingCategories +} + +func (e *ExpenseLine) GetCompany() *string { + if e == nil { + return nil + } + return e.Company +} + +func (e *ExpenseLine) GetEmployee() *ExpenseLineEmployee { + if e == nil { + return nil + } + return e.Employee +} + +func (e *ExpenseLine) GetCurrency() *TransactionCurrencyEnum { + if e == nil { + return nil + } + return e.Currency +} + +func (e *ExpenseLine) GetAccount() *ExpenseLineAccount { + if e == nil { + return nil + } + return e.Account +} + +func (e *ExpenseLine) GetContact() *ExpenseLineContact { + if e == nil { + return nil + } + return e.Contact +} + +func (e *ExpenseLine) GetProject() *ExpenseLineProject { + if e == nil { + return nil + } + return e.Project +} + +func (e *ExpenseLine) GetDescription() *string { + if e == nil { + return nil + } + return e.Description +} + +func (e *ExpenseLine) GetExchangeRate() *string { + if e == nil { + return nil + } + return e.ExchangeRate +} + +func (e *ExpenseLine) GetTaxRate() *string { + if e == nil { + return nil + } + return e.TaxRate +} + +func (e *ExpenseLine) GetRemoteWasDeleted() *bool { + if e == nil { + return nil + } + return e.RemoteWasDeleted +} + +func (e *ExpenseLine) GetExtraProperties() map[string]interface{} { + return e.extraProperties +} + +func (e *ExpenseLine) UnmarshalJSON(data []byte) error { + type embed ExpenseLine + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*e), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *e = ExpenseLine(unmarshaler.embed) + e.CreatedAt = unmarshaler.CreatedAt.TimePtr() + e.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *e) + if err != nil { + return err + } + e.extraProperties = extraProperties + e.rawJSON = json.RawMessage(data) + return nil +} + +func (e *ExpenseLine) MarshalJSON() ([]byte, error) { + type embed ExpenseLine + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*e), + CreatedAt: internal.NewOptionalDateTime(e.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(e.ModifiedAt), + } + return json.Marshal(marshaler) +} + +func (e *ExpenseLine) String() string { + if len(e.rawJSON) > 0 { + if value, err := internal.StringifyJSON(e.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(e); err == nil { + return value + } + return fmt.Sprintf("%#v", e) +} + +// The expense's payment account. +type ExpenseLineAccount struct { + String string + Account *Account + + typ string +} + +func (e *ExpenseLineAccount) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *ExpenseLineAccount) GetAccount() *Account { + if e == nil { + return nil + } + return e.Account +} + +func (e *ExpenseLineAccount) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + valueAccount := new(Account) + if err := json.Unmarshal(data, &valueAccount); err == nil { + e.typ = "Account" + e.Account = valueAccount + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e ExpenseLineAccount) MarshalJSON() ([]byte, error) { + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + if e.typ == "Account" || e.Account != nil { + return json.Marshal(e.Account) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type ExpenseLineAccountVisitor interface { + VisitString(string) error + VisitAccount(*Account) error +} + +func (e *ExpenseLineAccount) Accept(visitor ExpenseLineAccountVisitor) error { + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + if e.typ == "Account" || e.Account != nil { + return visitor.VisitAccount(e.Account) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +// The expense's contact. +type ExpenseLineContact struct { + String string + Contact *Contact + + typ string +} + +func (e *ExpenseLineContact) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *ExpenseLineContact) GetContact() *Contact { + if e == nil { + return nil + } + return e.Contact +} + +func (e *ExpenseLineContact) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + valueContact := new(Contact) + if err := json.Unmarshal(data, &valueContact); err == nil { + e.typ = "Contact" + e.Contact = valueContact + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e ExpenseLineContact) MarshalJSON() ([]byte, error) { + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + if e.typ == "Contact" || e.Contact != nil { + return json.Marshal(e.Contact) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type ExpenseLineContactVisitor interface { + VisitString(string) error + VisitContact(*Contact) error +} + +func (e *ExpenseLineContact) Accept(visitor ExpenseLineContactVisitor) error { + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + if e.typ == "Contact" || e.Contact != nil { + return visitor.VisitContact(e.Contact) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +// The employee this overall transaction relates to. +type ExpenseLineEmployee struct { + String string + Employee *Employee + + typ string +} + +func (e *ExpenseLineEmployee) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *ExpenseLineEmployee) GetEmployee() *Employee { + if e == nil { + return nil + } + return e.Employee +} + +func (e *ExpenseLineEmployee) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + valueEmployee := new(Employee) + if err := json.Unmarshal(data, &valueEmployee); err == nil { + e.typ = "Employee" + e.Employee = valueEmployee + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e ExpenseLineEmployee) MarshalJSON() ([]byte, error) { + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + if e.typ == "Employee" || e.Employee != nil { + return json.Marshal(e.Employee) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type ExpenseLineEmployeeVisitor interface { + VisitString(string) error + VisitEmployee(*Employee) error +} + +func (e *ExpenseLineEmployee) Accept(visitor ExpenseLineEmployeeVisitor) error { + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + if e.typ == "Employee" || e.Employee != nil { + return visitor.VisitEmployee(e.Employee) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +// The line's item. +type ExpenseLineItem struct { + String string + Item *Item + + typ string +} + +func (e *ExpenseLineItem) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *ExpenseLineItem) GetItem() *Item { + if e == nil { + return nil + } + return e.Item +} + +func (e *ExpenseLineItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + valueItem := new(Item) + if err := json.Unmarshal(data, &valueItem); err == nil { + e.typ = "Item" + e.Item = valueItem + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e ExpenseLineItem) MarshalJSON() ([]byte, error) { + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + if e.typ == "Item" || e.Item != nil { + return json.Marshal(e.Item) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type ExpenseLineItemVisitor interface { + VisitString(string) error + VisitItem(*Item) error +} + +func (e *ExpenseLineItem) Accept(visitor ExpenseLineItemVisitor) error { + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + if e.typ == "Item" || e.Item != nil { + return visitor.VisitItem(e.Item) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type ExpenseLineProject struct { + String string + Project *Project + + typ string +} + +func (e *ExpenseLineProject) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *ExpenseLineProject) GetProject() *Project { + if e == nil { + return nil + } + return e.Project +} + +func (e *ExpenseLineProject) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + valueProject := new(Project) + if err := json.Unmarshal(data, &valueProject); err == nil { + e.typ = "Project" + e.Project = valueProject + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e ExpenseLineProject) MarshalJSON() ([]byte, error) { + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + if e.typ == "Project" || e.Project != nil { + return json.Marshal(e.Project) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type ExpenseLineProjectVisitor interface { + VisitString(string) error + VisitProject(*Project) error +} + +func (e *ExpenseLineProject) Accept(visitor ExpenseLineProjectVisitor) error { + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + if e.typ == "Project" || e.Project != nil { + return visitor.VisitProject(e.Project) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +// # The ExpenseLine Object +// ### Description +// The `ExpenseLine` object is used to represent an expense's line items. +// +// ### Usage Example +// Fetch from the `GET Expense` endpoint and view the expense's line items. +type ExpenseLineRequest struct { + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The line's item. + Item *ExpenseLineRequestItem `json:"item,omitempty" url:"item,omitempty"` + // The line's net amount. + NetAmount *float64 `json:"net_amount,omitempty" url:"net_amount,omitempty"` + TrackingCategory *ExpenseLineRequestTrackingCategory `json:"tracking_category,omitempty" url:"tracking_category,omitempty"` + // The expense line item's associated tracking categories. + TrackingCategories []*ExpenseLineRequestTrackingCategoriesItem `json:"tracking_categories,omitempty" url:"tracking_categories,omitempty"` + // The company the expense belongs to. + Company *string `json:"company,omitempty" url:"company,omitempty"` + // The employee this overall transaction relates to. + Employee *ExpenseLineRequestEmployee `json:"employee,omitempty" url:"employee,omitempty"` + // The expense line item's currency. + // + // * `XUA` - ADB Unit of Account + // * `AFN` - Afghan Afghani + // * `AFA` - Afghan Afghani (1927–2002) + // * `ALL` - Albanian Lek + // * `ALK` - Albanian Lek (1946–1965) + // * `DZD` - Algerian Dinar + // * `ADP` - Andorran Peseta + // * `AOA` - Angolan Kwanza + // * `AOK` - Angolan Kwanza (1977–1991) + // * `AON` - Angolan New Kwanza (1990–2000) + // * `AOR` - Angolan Readjusted Kwanza (1995–1999) + // * `ARA` - Argentine Austral + // * `ARS` - Argentine Peso + // * `ARM` - Argentine Peso (1881–1970) + // * `ARP` - Argentine Peso (1983–1985) + // * `ARL` - Argentine Peso Ley (1970–1983) + // * `AMD` - Armenian Dram + // * `AWG` - Aruban Florin + // * `AUD` - Australian Dollar + // * `ATS` - Austrian Schilling + // * `AZN` - Azerbaijani Manat + // * `AZM` - Azerbaijani Manat (1993–2006) + // * `BSD` - Bahamian Dollar + // * `BHD` - Bahraini Dinar + // * `BDT` - Bangladeshi Taka + // * `BBD` - Barbadian Dollar + // * `BYN` - Belarusian Ruble + // * `BYB` - Belarusian Ruble (1994–1999) + // * `BYR` - Belarusian Ruble (2000–2016) + // * `BEF` - Belgian Franc + // * `BEC` - Belgian Franc (convertible) + // * `BEL` - Belgian Franc (financial) + // * `BZD` - Belize Dollar + // * `BMD` - Bermudan Dollar + // * `BTN` - Bhutanese Ngultrum + // * `BOB` - Bolivian Boliviano + // * `BOL` - Bolivian Boliviano (1863–1963) + // * `BOV` - Bolivian Mvdol + // * `BOP` - Bolivian Peso + // * `BAM` - Bosnia-Herzegovina Convertible Mark + // * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + // * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + // * `BWP` - Botswanan Pula + // * `BRC` - Brazilian Cruzado (1986–1989) + // * `BRZ` - Brazilian Cruzeiro (1942–1967) + // * `BRE` - Brazilian Cruzeiro (1990–1993) + // * `BRR` - Brazilian Cruzeiro (1993–1994) + // * `BRN` - Brazilian New Cruzado (1989–1990) + // * `BRB` - Brazilian New Cruzeiro (1967–1986) + // * `BRL` - Brazilian Real + // * `GBP` - British Pound + // * `BND` - Brunei Dollar + // * `BGL` - Bulgarian Hard Lev + // * `BGN` - Bulgarian Lev + // * `BGO` - Bulgarian Lev (1879–1952) + // * `BGM` - Bulgarian Socialist Lev + // * `BUK` - Burmese Kyat + // * `BIF` - Burundian Franc + // * `XPF` - CFP Franc + // * `KHR` - Cambodian Riel + // * `CAD` - Canadian Dollar + // * `CVE` - Cape Verdean Escudo + // * `KYD` - Cayman Islands Dollar + // * `XAF` - Central African CFA Franc + // * `CLE` - Chilean Escudo + // * `CLP` - Chilean Peso + // * `CLF` - Chilean Unit of Account (UF) + // * `CNX` - Chinese People’s Bank Dollar + // * `CNY` - Chinese Yuan + // * `CNH` - Chinese Yuan (offshore) + // * `COP` - Colombian Peso + // * `COU` - Colombian Real Value Unit + // * `KMF` - Comorian Franc + // * `CDF` - Congolese Franc + // * `CRC` - Costa Rican Colón + // * `HRD` - Croatian Dinar + // * `HRK` - Croatian Kuna + // * `CUC` - Cuban Convertible Peso + // * `CUP` - Cuban Peso + // * `CYP` - Cypriot Pound + // * `CZK` - Czech Koruna + // * `CSK` - Czechoslovak Hard Koruna + // * `DKK` - Danish Krone + // * `DJF` - Djiboutian Franc + // * `DOP` - Dominican Peso + // * `NLG` - Dutch Guilder + // * `XCD` - East Caribbean Dollar + // * `DDM` - East German Mark + // * `ECS` - Ecuadorian Sucre + // * `ECV` - Ecuadorian Unit of Constant Value + // * `EGP` - Egyptian Pound + // * `GQE` - Equatorial Guinean Ekwele + // * `ERN` - Eritrean Nakfa + // * `EEK` - Estonian Kroon + // * `ETB` - Ethiopian Birr + // * `EUR` - Euro + // * `XBA` - European Composite Unit + // * `XEU` - European Currency Unit + // * `XBB` - European Monetary Unit + // * `XBC` - European Unit of Account (XBC) + // * `XBD` - European Unit of Account (XBD) + // * `FKP` - Falkland Islands Pound + // * `FJD` - Fijian Dollar + // * `FIM` - Finnish Markka + // * `FRF` - French Franc + // * `XFO` - French Gold Franc + // * `XFU` - French UIC-Franc + // * `GMD` - Gambian Dalasi + // * `GEK` - Georgian Kupon Larit + // * `GEL` - Georgian Lari + // * `DEM` - German Mark + // * `GHS` - Ghanaian Cedi + // * `GHC` - Ghanaian Cedi (1979–2007) + // * `GIP` - Gibraltar Pound + // * `XAU` - Gold + // * `GRD` - Greek Drachma + // * `GTQ` - Guatemalan Quetzal + // * `GWP` - Guinea-Bissau Peso + // * `GNF` - Guinean Franc + // * `GNS` - Guinean Syli + // * `GYD` - Guyanaese Dollar + // * `HTG` - Haitian Gourde + // * `HNL` - Honduran Lempira + // * `HKD` - Hong Kong Dollar + // * `HUF` - Hungarian Forint + // * `IMP` - IMP + // * `ISK` - Icelandic Króna + // * `ISJ` - Icelandic Króna (1918–1981) + // * `INR` - Indian Rupee + // * `IDR` - Indonesian Rupiah + // * `IRR` - Iranian Rial + // * `IQD` - Iraqi Dinar + // * `IEP` - Irish Pound + // * `ILS` - Israeli New Shekel + // * `ILP` - Israeli Pound + // * `ILR` - Israeli Shekel (1980–1985) + // * `ITL` - Italian Lira + // * `JMD` - Jamaican Dollar + // * `JPY` - Japanese Yen + // * `JOD` - Jordanian Dinar + // * `KZT` - Kazakhstani Tenge + // * `KES` - Kenyan Shilling + // * `KWD` - Kuwaiti Dinar + // * `KGS` - Kyrgystani Som + // * `LAK` - Laotian Kip + // * `LVL` - Latvian Lats + // * `LVR` - Latvian Ruble + // * `LBP` - Lebanese Pound + // * `LSL` - Lesotho Loti + // * `LRD` - Liberian Dollar + // * `LYD` - Libyan Dinar + // * `LTL` - Lithuanian Litas + // * `LTT` - Lithuanian Talonas + // * `LUL` - Luxembourg Financial Franc + // * `LUC` - Luxembourgian Convertible Franc + // * `LUF` - Luxembourgian Franc + // * `MOP` - Macanese Pataca + // * `MKD` - Macedonian Denar + // * `MKN` - Macedonian Denar (1992–1993) + // * `MGA` - Malagasy Ariary + // * `MGF` - Malagasy Franc + // * `MWK` - Malawian Kwacha + // * `MYR` - Malaysian Ringgit + // * `MVR` - Maldivian Rufiyaa + // * `MVP` - Maldivian Rupee (1947–1981) + // * `MLF` - Malian Franc + // * `MTL` - Maltese Lira + // * `MTP` - Maltese Pound + // * `MRU` - Mauritanian Ouguiya + // * `MRO` - Mauritanian Ouguiya (1973–2017) + // * `MUR` - Mauritian Rupee + // * `MXV` - Mexican Investment Unit + // * `MXN` - Mexican Peso + // * `MXP` - Mexican Silver Peso (1861–1992) + // * `MDC` - Moldovan Cupon + // * `MDL` - Moldovan Leu + // * `MCF` - Monegasque Franc + // * `MNT` - Mongolian Tugrik + // * `MAD` - Moroccan Dirham + // * `MAF` - Moroccan Franc + // * `MZE` - Mozambican Escudo + // * `MZN` - Mozambican Metical + // * `MZM` - Mozambican Metical (1980–2006) + // * `MMK` - Myanmar Kyat + // * `NAD` - Namibian Dollar + // * `NPR` - Nepalese Rupee + // * `ANG` - Netherlands Antillean Guilder + // * `TWD` - New Taiwan Dollar + // * `NZD` - New Zealand Dollar + // * `NIO` - Nicaraguan Córdoba + // * `NIC` - Nicaraguan Córdoba (1988–1991) + // * `NGN` - Nigerian Naira + // * `KPW` - North Korean Won + // * `NOK` - Norwegian Krone + // * `OMR` - Omani Rial + // * `PKR` - Pakistani Rupee + // * `XPD` - Palladium + // * `PAB` - Panamanian Balboa + // * `PGK` - Papua New Guinean Kina + // * `PYG` - Paraguayan Guarani + // * `PEI` - Peruvian Inti + // * `PEN` - Peruvian Sol + // * `PES` - Peruvian Sol (1863–1965) + // * `PHP` - Philippine Peso + // * `XPT` - Platinum + // * `PLN` - Polish Zloty + // * `PLZ` - Polish Zloty (1950–1995) + // * `PTE` - Portuguese Escudo + // * `GWE` - Portuguese Guinea Escudo + // * `QAR` - Qatari Rial + // * `XRE` - RINET Funds + // * `RHD` - Rhodesian Dollar + // * `RON` - Romanian Leu + // * `ROL` - Romanian Leu (1952–2006) + // * `RUB` - Russian Ruble + // * `RUR` - Russian Ruble (1991–1998) + // * `RWF` - Rwandan Franc + // * `SVC` - Salvadoran Colón + // * `WST` - Samoan Tala + // * `SAR` - Saudi Riyal + // * `RSD` - Serbian Dinar + // * `CSD` - Serbian Dinar (2002–2006) + // * `SCR` - Seychellois Rupee + // * `SLL` - Sierra Leonean Leone + // * `XAG` - Silver + // * `SGD` - Singapore Dollar + // * `SKK` - Slovak Koruna + // * `SIT` - Slovenian Tolar + // * `SBD` - Solomon Islands Dollar + // * `SOS` - Somali Shilling + // * `ZAR` - South African Rand + // * `ZAL` - South African Rand (financial) + // * `KRH` - South Korean Hwan (1953–1962) + // * `KRW` - South Korean Won + // * `KRO` - South Korean Won (1945–1953) + // * `SSP` - South Sudanese Pound + // * `SUR` - Soviet Rouble + // * `ESP` - Spanish Peseta + // * `ESA` - Spanish Peseta (A account) + // * `ESB` - Spanish Peseta (convertible account) + // * `XDR` - Special Drawing Rights + // * `LKR` - Sri Lankan Rupee + // * `SHP` - St. Helena Pound + // * `XSU` - Sucre + // * `SDD` - Sudanese Dinar (1992–2007) + // * `SDG` - Sudanese Pound + // * `SDP` - Sudanese Pound (1957–1998) + // * `SRD` - Surinamese Dollar + // * `SRG` - Surinamese Guilder + // * `SZL` - Swazi Lilangeni + // * `SEK` - Swedish Krona + // * `CHF` - Swiss Franc + // * `SYP` - Syrian Pound + // * `STN` - São Tomé & Príncipe Dobra + // * `STD` - São Tomé & Príncipe Dobra (1977–2017) + // * `TVD` - TVD + // * `TJR` - Tajikistani Ruble + // * `TJS` - Tajikistani Somoni + // * `TZS` - Tanzanian Shilling + // * `XTS` - Testing Currency Code + // * `THB` - Thai Baht + // * `XXX` - The codes assigned for transactions where no currency is involved + // * `TPE` - Timorese Escudo + // * `TOP` - Tongan Paʻanga + // * `TTD` - Trinidad & Tobago Dollar + // * `TND` - Tunisian Dinar + // * `TRY` - Turkish Lira + // * `TRL` - Turkish Lira (1922–2005) + // * `TMT` - Turkmenistani Manat + // * `TMM` - Turkmenistani Manat (1993–2009) + // * `USD` - US Dollar + // * `USN` - US Dollar (Next day) + // * `USS` - US Dollar (Same day) + // * `UGX` - Ugandan Shilling + // * `UGS` - Ugandan Shilling (1966–1987) + // * `UAH` - Ukrainian Hryvnia + // * `UAK` - Ukrainian Karbovanets + // * `AED` - United Arab Emirates Dirham + // * `UYW` - Uruguayan Nominal Wage Index Unit + // * `UYU` - Uruguayan Peso + // * `UYP` - Uruguayan Peso (1975–1993) + // * `UYI` - Uruguayan Peso (Indexed Units) + // * `UZS` - Uzbekistani Som + // * `VUV` - Vanuatu Vatu + // * `VES` - Venezuelan Bolívar + // * `VEB` - Venezuelan Bolívar (1871–2008) + // * `VEF` - Venezuelan Bolívar (2008–2018) + // * `VND` - Vietnamese Dong + // * `VNN` - Vietnamese Dong (1978–1985) + // * `CHE` - WIR Euro + // * `CHW` - WIR Franc + // * `XOF` - West African CFA Franc + // * `YDD` - Yemeni Dinar + // * `YER` - Yemeni Rial + // * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + // * `YUD` - Yugoslavian Hard Dinar (1966–1990) + // * `YUM` - Yugoslavian New Dinar (1994–2002) + // * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + // * `ZWN` - ZWN + // * `ZRN` - Zairean New Zaire (1993–1998) + // * `ZRZ` - Zairean Zaire (1971–1993) + // * `ZMW` - Zambian Kwacha + // * `ZMK` - Zambian Kwacha (1968–2012) + // * `ZWD` - Zimbabwean Dollar (1980–2008) + // * `ZWR` - Zimbabwean Dollar (2008) + // * `ZWL` - Zimbabwean Dollar (2009) + Currency *ExpenseLineRequestCurrency `json:"currency,omitempty" url:"currency,omitempty"` + // The expense's payment account. + Account *ExpenseLineRequestAccount `json:"account,omitempty" url:"account,omitempty"` + // The expense's contact. + Contact *ExpenseLineRequestContact `json:"contact,omitempty" url:"contact,omitempty"` + Project *ExpenseLineRequestProject `json:"project,omitempty" url:"project,omitempty"` + // The description of the item that was purchased by the company. + Description *string `json:"description,omitempty" url:"description,omitempty"` + // The expense line item's exchange rate. + ExchangeRate *string `json:"exchange_rate,omitempty" url:"exchange_rate,omitempty"` + // The tax rate that applies to this line item. + TaxRate *string `json:"tax_rate,omitempty" url:"tax_rate,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + RemoteFields []*RemoteFieldRequest `json:"remote_fields,omitempty" url:"remote_fields,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (e *ExpenseLineRequest) GetRemoteId() *string { + if e == nil { + return nil + } + return e.RemoteId +} + +func (e *ExpenseLineRequest) GetItem() *ExpenseLineRequestItem { + if e == nil { + return nil + } + return e.Item +} + +func (e *ExpenseLineRequest) GetNetAmount() *float64 { + if e == nil { + return nil + } + return e.NetAmount +} + +func (e *ExpenseLineRequest) GetTrackingCategory() *ExpenseLineRequestTrackingCategory { + if e == nil { + return nil + } + return e.TrackingCategory +} + +func (e *ExpenseLineRequest) GetTrackingCategories() []*ExpenseLineRequestTrackingCategoriesItem { + if e == nil { + return nil + } + return e.TrackingCategories +} + +func (e *ExpenseLineRequest) GetCompany() *string { + if e == nil { + return nil + } + return e.Company +} + +func (e *ExpenseLineRequest) GetEmployee() *ExpenseLineRequestEmployee { + if e == nil { + return nil + } + return e.Employee +} + +func (e *ExpenseLineRequest) GetCurrency() *ExpenseLineRequestCurrency { + if e == nil { + return nil + } + return e.Currency +} + +func (e *ExpenseLineRequest) GetAccount() *ExpenseLineRequestAccount { + if e == nil { + return nil + } + return e.Account +} + +func (e *ExpenseLineRequest) GetContact() *ExpenseLineRequestContact { + if e == nil { + return nil + } + return e.Contact +} + +func (e *ExpenseLineRequest) GetProject() *ExpenseLineRequestProject { + if e == nil { + return nil + } + return e.Project +} + +func (e *ExpenseLineRequest) GetDescription() *string { + if e == nil { + return nil + } + return e.Description +} + +func (e *ExpenseLineRequest) GetExchangeRate() *string { + if e == nil { + return nil + } + return e.ExchangeRate +} + +func (e *ExpenseLineRequest) GetTaxRate() *string { + if e == nil { + return nil + } + return e.TaxRate +} + +func (e *ExpenseLineRequest) GetIntegrationParams() map[string]interface{} { + if e == nil { + return nil + } + return e.IntegrationParams +} + +func (e *ExpenseLineRequest) GetLinkedAccountParams() map[string]interface{} { + if e == nil { + return nil + } + return e.LinkedAccountParams +} + +func (e *ExpenseLineRequest) GetRemoteFields() []*RemoteFieldRequest { + if e == nil { + return nil + } + return e.RemoteFields +} + +func (e *ExpenseLineRequest) GetExtraProperties() map[string]interface{} { + return e.extraProperties +} + +func (e *ExpenseLineRequest) UnmarshalJSON(data []byte) error { + type unmarshaler ExpenseLineRequest + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *e = ExpenseLineRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *e) + if err != nil { + return err + } + e.extraProperties = extraProperties + e.rawJSON = json.RawMessage(data) + return nil +} + +func (e *ExpenseLineRequest) String() string { + if len(e.rawJSON) > 0 { + if value, err := internal.StringifyJSON(e.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(e); err == nil { + return value + } + return fmt.Sprintf("%#v", e) +} + +// The expense's payment account. +type ExpenseLineRequestAccount struct { + String string + Account *Account + + typ string +} + +func (e *ExpenseLineRequestAccount) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *ExpenseLineRequestAccount) GetAccount() *Account { + if e == nil { + return nil + } + return e.Account +} + +func (e *ExpenseLineRequestAccount) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + valueAccount := new(Account) + if err := json.Unmarshal(data, &valueAccount); err == nil { + e.typ = "Account" + e.Account = valueAccount + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e ExpenseLineRequestAccount) MarshalJSON() ([]byte, error) { + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + if e.typ == "Account" || e.Account != nil { + return json.Marshal(e.Account) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type ExpenseLineRequestAccountVisitor interface { + VisitString(string) error + VisitAccount(*Account) error +} + +func (e *ExpenseLineRequestAccount) Accept(visitor ExpenseLineRequestAccountVisitor) error { + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + if e.typ == "Account" || e.Account != nil { + return visitor.VisitAccount(e.Account) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +// The expense's contact. +type ExpenseLineRequestContact struct { + String string + Contact *Contact + + typ string +} + +func (e *ExpenseLineRequestContact) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *ExpenseLineRequestContact) GetContact() *Contact { + if e == nil { + return nil + } + return e.Contact +} + +func (e *ExpenseLineRequestContact) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + valueContact := new(Contact) + if err := json.Unmarshal(data, &valueContact); err == nil { + e.typ = "Contact" + e.Contact = valueContact + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e ExpenseLineRequestContact) MarshalJSON() ([]byte, error) { + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + if e.typ == "Contact" || e.Contact != nil { + return json.Marshal(e.Contact) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type ExpenseLineRequestContactVisitor interface { + VisitString(string) error + VisitContact(*Contact) error +} + +func (e *ExpenseLineRequestContact) Accept(visitor ExpenseLineRequestContactVisitor) error { + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + if e.typ == "Contact" || e.Contact != nil { + return visitor.VisitContact(e.Contact) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +// The expense line item's currency. +// +// * `XUA` - ADB Unit of Account +// * `AFN` - Afghan Afghani +// * `AFA` - Afghan Afghani (1927–2002) +// * `ALL` - Albanian Lek +// * `ALK` - Albanian Lek (1946–1965) +// * `DZD` - Algerian Dinar +// * `ADP` - Andorran Peseta +// * `AOA` - Angolan Kwanza +// * `AOK` - Angolan Kwanza (1977–1991) +// * `AON` - Angolan New Kwanza (1990–2000) +// * `AOR` - Angolan Readjusted Kwanza (1995–1999) +// * `ARA` - Argentine Austral +// * `ARS` - Argentine Peso +// * `ARM` - Argentine Peso (1881–1970) +// * `ARP` - Argentine Peso (1983–1985) +// * `ARL` - Argentine Peso Ley (1970–1983) +// * `AMD` - Armenian Dram +// * `AWG` - Aruban Florin +// * `AUD` - Australian Dollar +// * `ATS` - Austrian Schilling +// * `AZN` - Azerbaijani Manat +// * `AZM` - Azerbaijani Manat (1993–2006) +// * `BSD` - Bahamian Dollar +// * `BHD` - Bahraini Dinar +// * `BDT` - Bangladeshi Taka +// * `BBD` - Barbadian Dollar +// * `BYN` - Belarusian Ruble +// * `BYB` - Belarusian Ruble (1994–1999) +// * `BYR` - Belarusian Ruble (2000–2016) +// * `BEF` - Belgian Franc +// * `BEC` - Belgian Franc (convertible) +// * `BEL` - Belgian Franc (financial) +// * `BZD` - Belize Dollar +// * `BMD` - Bermudan Dollar +// * `BTN` - Bhutanese Ngultrum +// * `BOB` - Bolivian Boliviano +// * `BOL` - Bolivian Boliviano (1863–1963) +// * `BOV` - Bolivian Mvdol +// * `BOP` - Bolivian Peso +// * `BAM` - Bosnia-Herzegovina Convertible Mark +// * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) +// * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) +// * `BWP` - Botswanan Pula +// * `BRC` - Brazilian Cruzado (1986–1989) +// * `BRZ` - Brazilian Cruzeiro (1942–1967) +// * `BRE` - Brazilian Cruzeiro (1990–1993) +// * `BRR` - Brazilian Cruzeiro (1993–1994) +// * `BRN` - Brazilian New Cruzado (1989–1990) +// * `BRB` - Brazilian New Cruzeiro (1967–1986) +// * `BRL` - Brazilian Real +// * `GBP` - British Pound +// * `BND` - Brunei Dollar +// * `BGL` - Bulgarian Hard Lev +// * `BGN` - Bulgarian Lev +// * `BGO` - Bulgarian Lev (1879–1952) +// * `BGM` - Bulgarian Socialist Lev +// * `BUK` - Burmese Kyat +// * `BIF` - Burundian Franc +// * `XPF` - CFP Franc +// * `KHR` - Cambodian Riel +// * `CAD` - Canadian Dollar +// * `CVE` - Cape Verdean Escudo +// * `KYD` - Cayman Islands Dollar +// * `XAF` - Central African CFA Franc +// * `CLE` - Chilean Escudo +// * `CLP` - Chilean Peso +// * `CLF` - Chilean Unit of Account (UF) +// * `CNX` - Chinese People’s Bank Dollar +// * `CNY` - Chinese Yuan +// * `CNH` - Chinese Yuan (offshore) +// * `COP` - Colombian Peso +// * `COU` - Colombian Real Value Unit +// * `KMF` - Comorian Franc +// * `CDF` - Congolese Franc +// * `CRC` - Costa Rican Colón +// * `HRD` - Croatian Dinar +// * `HRK` - Croatian Kuna +// * `CUC` - Cuban Convertible Peso +// * `CUP` - Cuban Peso +// * `CYP` - Cypriot Pound +// * `CZK` - Czech Koruna +// * `CSK` - Czechoslovak Hard Koruna +// * `DKK` - Danish Krone +// * `DJF` - Djiboutian Franc +// * `DOP` - Dominican Peso +// * `NLG` - Dutch Guilder +// * `XCD` - East Caribbean Dollar +// * `DDM` - East German Mark +// * `ECS` - Ecuadorian Sucre +// * `ECV` - Ecuadorian Unit of Constant Value +// * `EGP` - Egyptian Pound +// * `GQE` - Equatorial Guinean Ekwele +// * `ERN` - Eritrean Nakfa +// * `EEK` - Estonian Kroon +// * `ETB` - Ethiopian Birr +// * `EUR` - Euro +// * `XBA` - European Composite Unit +// * `XEU` - European Currency Unit +// * `XBB` - European Monetary Unit +// * `XBC` - European Unit of Account (XBC) +// * `XBD` - European Unit of Account (XBD) +// * `FKP` - Falkland Islands Pound +// * `FJD` - Fijian Dollar +// * `FIM` - Finnish Markka +// * `FRF` - French Franc +// * `XFO` - French Gold Franc +// * `XFU` - French UIC-Franc +// * `GMD` - Gambian Dalasi +// * `GEK` - Georgian Kupon Larit +// * `GEL` - Georgian Lari +// * `DEM` - German Mark +// * `GHS` - Ghanaian Cedi +// * `GHC` - Ghanaian Cedi (1979–2007) +// * `GIP` - Gibraltar Pound +// * `XAU` - Gold +// * `GRD` - Greek Drachma +// * `GTQ` - Guatemalan Quetzal +// * `GWP` - Guinea-Bissau Peso +// * `GNF` - Guinean Franc +// * `GNS` - Guinean Syli +// * `GYD` - Guyanaese Dollar +// * `HTG` - Haitian Gourde +// * `HNL` - Honduran Lempira +// * `HKD` - Hong Kong Dollar +// * `HUF` - Hungarian Forint +// * `IMP` - IMP +// * `ISK` - Icelandic Króna +// * `ISJ` - Icelandic Króna (1918–1981) +// * `INR` - Indian Rupee +// * `IDR` - Indonesian Rupiah +// * `IRR` - Iranian Rial +// * `IQD` - Iraqi Dinar +// * `IEP` - Irish Pound +// * `ILS` - Israeli New Shekel +// * `ILP` - Israeli Pound +// * `ILR` - Israeli Shekel (1980–1985) +// * `ITL` - Italian Lira +// * `JMD` - Jamaican Dollar +// * `JPY` - Japanese Yen +// * `JOD` - Jordanian Dinar +// * `KZT` - Kazakhstani Tenge +// * `KES` - Kenyan Shilling +// * `KWD` - Kuwaiti Dinar +// * `KGS` - Kyrgystani Som +// * `LAK` - Laotian Kip +// * `LVL` - Latvian Lats +// * `LVR` - Latvian Ruble +// * `LBP` - Lebanese Pound +// * `LSL` - Lesotho Loti +// * `LRD` - Liberian Dollar +// * `LYD` - Libyan Dinar +// * `LTL` - Lithuanian Litas +// * `LTT` - Lithuanian Talonas +// * `LUL` - Luxembourg Financial Franc +// * `LUC` - Luxembourgian Convertible Franc +// * `LUF` - Luxembourgian Franc +// * `MOP` - Macanese Pataca +// * `MKD` - Macedonian Denar +// * `MKN` - Macedonian Denar (1992–1993) +// * `MGA` - Malagasy Ariary +// * `MGF` - Malagasy Franc +// * `MWK` - Malawian Kwacha +// * `MYR` - Malaysian Ringgit +// * `MVR` - Maldivian Rufiyaa +// * `MVP` - Maldivian Rupee (1947–1981) +// * `MLF` - Malian Franc +// * `MTL` - Maltese Lira +// * `MTP` - Maltese Pound +// * `MRU` - Mauritanian Ouguiya +// * `MRO` - Mauritanian Ouguiya (1973–2017) +// * `MUR` - Mauritian Rupee +// * `MXV` - Mexican Investment Unit +// * `MXN` - Mexican Peso +// * `MXP` - Mexican Silver Peso (1861–1992) +// * `MDC` - Moldovan Cupon +// * `MDL` - Moldovan Leu +// * `MCF` - Monegasque Franc +// * `MNT` - Mongolian Tugrik +// * `MAD` - Moroccan Dirham +// * `MAF` - Moroccan Franc +// * `MZE` - Mozambican Escudo +// * `MZN` - Mozambican Metical +// * `MZM` - Mozambican Metical (1980–2006) +// * `MMK` - Myanmar Kyat +// * `NAD` - Namibian Dollar +// * `NPR` - Nepalese Rupee +// * `ANG` - Netherlands Antillean Guilder +// * `TWD` - New Taiwan Dollar +// * `NZD` - New Zealand Dollar +// * `NIO` - Nicaraguan Córdoba +// * `NIC` - Nicaraguan Córdoba (1988–1991) +// * `NGN` - Nigerian Naira +// * `KPW` - North Korean Won +// * `NOK` - Norwegian Krone +// * `OMR` - Omani Rial +// * `PKR` - Pakistani Rupee +// * `XPD` - Palladium +// * `PAB` - Panamanian Balboa +// * `PGK` - Papua New Guinean Kina +// * `PYG` - Paraguayan Guarani +// * `PEI` - Peruvian Inti +// * `PEN` - Peruvian Sol +// * `PES` - Peruvian Sol (1863–1965) +// * `PHP` - Philippine Peso +// * `XPT` - Platinum +// * `PLN` - Polish Zloty +// * `PLZ` - Polish Zloty (1950–1995) +// * `PTE` - Portuguese Escudo +// * `GWE` - Portuguese Guinea Escudo +// * `QAR` - Qatari Rial +// * `XRE` - RINET Funds +// * `RHD` - Rhodesian Dollar +// * `RON` - Romanian Leu +// * `ROL` - Romanian Leu (1952–2006) +// * `RUB` - Russian Ruble +// * `RUR` - Russian Ruble (1991–1998) +// * `RWF` - Rwandan Franc +// * `SVC` - Salvadoran Colón +// * `WST` - Samoan Tala +// * `SAR` - Saudi Riyal +// * `RSD` - Serbian Dinar +// * `CSD` - Serbian Dinar (2002–2006) +// * `SCR` - Seychellois Rupee +// * `SLL` - Sierra Leonean Leone +// * `XAG` - Silver +// * `SGD` - Singapore Dollar +// * `SKK` - Slovak Koruna +// * `SIT` - Slovenian Tolar +// * `SBD` - Solomon Islands Dollar +// * `SOS` - Somali Shilling +// * `ZAR` - South African Rand +// * `ZAL` - South African Rand (financial) +// * `KRH` - South Korean Hwan (1953–1962) +// * `KRW` - South Korean Won +// * `KRO` - South Korean Won (1945–1953) +// * `SSP` - South Sudanese Pound +// * `SUR` - Soviet Rouble +// * `ESP` - Spanish Peseta +// * `ESA` - Spanish Peseta (A account) +// * `ESB` - Spanish Peseta (convertible account) +// * `XDR` - Special Drawing Rights +// * `LKR` - Sri Lankan Rupee +// * `SHP` - St. Helena Pound +// * `XSU` - Sucre +// * `SDD` - Sudanese Dinar (1992–2007) +// * `SDG` - Sudanese Pound +// * `SDP` - Sudanese Pound (1957–1998) +// * `SRD` - Surinamese Dollar +// * `SRG` - Surinamese Guilder +// * `SZL` - Swazi Lilangeni +// * `SEK` - Swedish Krona +// * `CHF` - Swiss Franc +// * `SYP` - Syrian Pound +// * `STN` - São Tomé & Príncipe Dobra +// * `STD` - São Tomé & Príncipe Dobra (1977–2017) +// * `TVD` - TVD +// * `TJR` - Tajikistani Ruble +// * `TJS` - Tajikistani Somoni +// * `TZS` - Tanzanian Shilling +// * `XTS` - Testing Currency Code +// * `THB` - Thai Baht +// * `XXX` - The codes assigned for transactions where no currency is involved +// * `TPE` - Timorese Escudo +// * `TOP` - Tongan Paʻanga +// * `TTD` - Trinidad & Tobago Dollar +// * `TND` - Tunisian Dinar +// * `TRY` - Turkish Lira +// * `TRL` - Turkish Lira (1922–2005) +// * `TMT` - Turkmenistani Manat +// * `TMM` - Turkmenistani Manat (1993–2009) +// * `USD` - US Dollar +// * `USN` - US Dollar (Next day) +// * `USS` - US Dollar (Same day) +// * `UGX` - Ugandan Shilling +// * `UGS` - Ugandan Shilling (1966–1987) +// * `UAH` - Ukrainian Hryvnia +// * `UAK` - Ukrainian Karbovanets +// * `AED` - United Arab Emirates Dirham +// * `UYW` - Uruguayan Nominal Wage Index Unit +// * `UYU` - Uruguayan Peso +// * `UYP` - Uruguayan Peso (1975–1993) +// * `UYI` - Uruguayan Peso (Indexed Units) +// * `UZS` - Uzbekistani Som +// * `VUV` - Vanuatu Vatu +// * `VES` - Venezuelan Bolívar +// * `VEB` - Venezuelan Bolívar (1871–2008) +// * `VEF` - Venezuelan Bolívar (2008–2018) +// * `VND` - Vietnamese Dong +// * `VNN` - Vietnamese Dong (1978–1985) +// * `CHE` - WIR Euro +// * `CHW` - WIR Franc +// * `XOF` - West African CFA Franc +// * `YDD` - Yemeni Dinar +// * `YER` - Yemeni Rial +// * `YUN` - Yugoslavian Convertible Dinar (1990–1992) +// * `YUD` - Yugoslavian Hard Dinar (1966–1990) +// * `YUM` - Yugoslavian New Dinar (1994–2002) +// * `YUR` - Yugoslavian Reformed Dinar (1992–1993) +// * `ZWN` - ZWN +// * `ZRN` - Zairean New Zaire (1993–1998) +// * `ZRZ` - Zairean Zaire (1971–1993) +// * `ZMW` - Zambian Kwacha +// * `ZMK` - Zambian Kwacha (1968–2012) +// * `ZWD` - Zimbabwean Dollar (1980–2008) +// * `ZWR` - Zimbabwean Dollar (2008) +// * `ZWL` - Zimbabwean Dollar (2009) +type ExpenseLineRequestCurrency struct { + TransactionCurrencyEnum TransactionCurrencyEnum + String string + + typ string +} + +func (e *ExpenseLineRequestCurrency) GetTransactionCurrencyEnum() TransactionCurrencyEnum { + if e == nil { + return "" + } + return e.TransactionCurrencyEnum +} + +func (e *ExpenseLineRequestCurrency) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *ExpenseLineRequestCurrency) UnmarshalJSON(data []byte) error { + var valueTransactionCurrencyEnum TransactionCurrencyEnum + if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { + e.typ = "TransactionCurrencyEnum" + e.TransactionCurrencyEnum = valueTransactionCurrencyEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e ExpenseLineRequestCurrency) MarshalJSON() ([]byte, error) { + if e.typ == "TransactionCurrencyEnum" || e.TransactionCurrencyEnum != "" { + return json.Marshal(e.TransactionCurrencyEnum) + } + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type ExpenseLineRequestCurrencyVisitor interface { + VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error + VisitString(string) error +} + +func (e *ExpenseLineRequestCurrency) Accept(visitor ExpenseLineRequestCurrencyVisitor) error { + if e.typ == "TransactionCurrencyEnum" || e.TransactionCurrencyEnum != "" { + return visitor.VisitTransactionCurrencyEnum(e.TransactionCurrencyEnum) + } + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +// The employee this overall transaction relates to. +type ExpenseLineRequestEmployee struct { + String string + Employee *Employee + + typ string +} + +func (e *ExpenseLineRequestEmployee) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *ExpenseLineRequestEmployee) GetEmployee() *Employee { + if e == nil { + return nil + } + return e.Employee +} + +func (e *ExpenseLineRequestEmployee) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + valueEmployee := new(Employee) + if err := json.Unmarshal(data, &valueEmployee); err == nil { + e.typ = "Employee" + e.Employee = valueEmployee + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e ExpenseLineRequestEmployee) MarshalJSON() ([]byte, error) { + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + if e.typ == "Employee" || e.Employee != nil { + return json.Marshal(e.Employee) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type ExpenseLineRequestEmployeeVisitor interface { + VisitString(string) error + VisitEmployee(*Employee) error +} + +func (e *ExpenseLineRequestEmployee) Accept(visitor ExpenseLineRequestEmployeeVisitor) error { + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + if e.typ == "Employee" || e.Employee != nil { + return visitor.VisitEmployee(e.Employee) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +// The line's item. +type ExpenseLineRequestItem struct { + String string + Item *Item + + typ string +} + +func (e *ExpenseLineRequestItem) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *ExpenseLineRequestItem) GetItem() *Item { + if e == nil { + return nil + } + return e.Item +} + +func (e *ExpenseLineRequestItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + valueItem := new(Item) + if err := json.Unmarshal(data, &valueItem); err == nil { + e.typ = "Item" + e.Item = valueItem + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e ExpenseLineRequestItem) MarshalJSON() ([]byte, error) { + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + if e.typ == "Item" || e.Item != nil { + return json.Marshal(e.Item) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type ExpenseLineRequestItemVisitor interface { + VisitString(string) error + VisitItem(*Item) error +} + +func (e *ExpenseLineRequestItem) Accept(visitor ExpenseLineRequestItemVisitor) error { + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + if e.typ == "Item" || e.Item != nil { + return visitor.VisitItem(e.Item) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type ExpenseLineRequestProject struct { + String string + Project *Project + + typ string +} + +func (e *ExpenseLineRequestProject) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *ExpenseLineRequestProject) GetProject() *Project { + if e == nil { + return nil + } + return e.Project +} + +func (e *ExpenseLineRequestProject) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + valueProject := new(Project) + if err := json.Unmarshal(data, &valueProject); err == nil { + e.typ = "Project" + e.Project = valueProject + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e ExpenseLineRequestProject) MarshalJSON() ([]byte, error) { + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + if e.typ == "Project" || e.Project != nil { + return json.Marshal(e.Project) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type ExpenseLineRequestProjectVisitor interface { + VisitString(string) error + VisitProject(*Project) error +} + +func (e *ExpenseLineRequestProject) Accept(visitor ExpenseLineRequestProjectVisitor) error { + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + if e.typ == "Project" || e.Project != nil { + return visitor.VisitProject(e.Project) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type ExpenseLineRequestTrackingCategoriesItem struct { + String string + TrackingCategory *TrackingCategory + + typ string +} + +func (e *ExpenseLineRequestTrackingCategoriesItem) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *ExpenseLineRequestTrackingCategoriesItem) GetTrackingCategory() *TrackingCategory { + if e == nil { + return nil + } + return e.TrackingCategory +} + +func (e *ExpenseLineRequestTrackingCategoriesItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + valueTrackingCategory := new(TrackingCategory) + if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { + e.typ = "TrackingCategory" + e.TrackingCategory = valueTrackingCategory + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e ExpenseLineRequestTrackingCategoriesItem) MarshalJSON() ([]byte, error) { + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + if e.typ == "TrackingCategory" || e.TrackingCategory != nil { + return json.Marshal(e.TrackingCategory) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type ExpenseLineRequestTrackingCategoriesItemVisitor interface { + VisitString(string) error + VisitTrackingCategory(*TrackingCategory) error +} + +func (e *ExpenseLineRequestTrackingCategoriesItem) Accept(visitor ExpenseLineRequestTrackingCategoriesItemVisitor) error { + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + if e.typ == "TrackingCategory" || e.TrackingCategory != nil { + return visitor.VisitTrackingCategory(e.TrackingCategory) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type ExpenseLineRequestTrackingCategory struct { + String string + TrackingCategory *TrackingCategory + + typ string +} + +func (e *ExpenseLineRequestTrackingCategory) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *ExpenseLineRequestTrackingCategory) GetTrackingCategory() *TrackingCategory { + if e == nil { + return nil + } + return e.TrackingCategory +} + +func (e *ExpenseLineRequestTrackingCategory) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + valueTrackingCategory := new(TrackingCategory) + if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { + e.typ = "TrackingCategory" + e.TrackingCategory = valueTrackingCategory + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e ExpenseLineRequestTrackingCategory) MarshalJSON() ([]byte, error) { + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + if e.typ == "TrackingCategory" || e.TrackingCategory != nil { + return json.Marshal(e.TrackingCategory) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type ExpenseLineRequestTrackingCategoryVisitor interface { + VisitString(string) error + VisitTrackingCategory(*TrackingCategory) error +} + +func (e *ExpenseLineRequestTrackingCategory) Accept(visitor ExpenseLineRequestTrackingCategoryVisitor) error { + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + if e.typ == "TrackingCategory" || e.TrackingCategory != nil { + return visitor.VisitTrackingCategory(e.TrackingCategory) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type ExpenseLineTrackingCategoriesItem struct { + String string + TrackingCategory *TrackingCategory + + typ string +} + +func (e *ExpenseLineTrackingCategoriesItem) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *ExpenseLineTrackingCategoriesItem) GetTrackingCategory() *TrackingCategory { + if e == nil { + return nil + } + return e.TrackingCategory +} + +func (e *ExpenseLineTrackingCategoriesItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + valueTrackingCategory := new(TrackingCategory) + if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { + e.typ = "TrackingCategory" + e.TrackingCategory = valueTrackingCategory + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e ExpenseLineTrackingCategoriesItem) MarshalJSON() ([]byte, error) { + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + if e.typ == "TrackingCategory" || e.TrackingCategory != nil { + return json.Marshal(e.TrackingCategory) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type ExpenseLineTrackingCategoriesItemVisitor interface { + VisitString(string) error + VisitTrackingCategory(*TrackingCategory) error +} + +func (e *ExpenseLineTrackingCategoriesItem) Accept(visitor ExpenseLineTrackingCategoriesItemVisitor) error { + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + if e.typ == "TrackingCategory" || e.TrackingCategory != nil { + return visitor.VisitTrackingCategory(e.TrackingCategory) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type ExpenseLineTrackingCategory struct { + String string + TrackingCategory *TrackingCategory + + typ string +} + +func (e *ExpenseLineTrackingCategory) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *ExpenseLineTrackingCategory) GetTrackingCategory() *TrackingCategory { + if e == nil { + return nil + } + return e.TrackingCategory +} + +func (e *ExpenseLineTrackingCategory) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + valueTrackingCategory := new(TrackingCategory) + if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { + e.typ = "TrackingCategory" + e.TrackingCategory = valueTrackingCategory + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e ExpenseLineTrackingCategory) MarshalJSON() ([]byte, error) { + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + if e.typ == "TrackingCategory" || e.TrackingCategory != nil { + return json.Marshal(e.TrackingCategory) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type ExpenseLineTrackingCategoryVisitor interface { + VisitString(string) error + VisitTrackingCategory(*TrackingCategory) error +} + +func (e *ExpenseLineTrackingCategory) Accept(visitor ExpenseLineTrackingCategoryVisitor) error { + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + if e.typ == "TrackingCategory" || e.TrackingCategory != nil { + return visitor.VisitTrackingCategory(e.TrackingCategory) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +// # The Expense Object +// ### Description +// The `Expense` object is used to represent a direct purchase by a business, typically made with a check, credit card, or cash. Each `Expense` object is dedicated to a grouping of expenses, with each expense recorded in the lines object. +// +// The `Expense` object is used also used to represent refunds to direct purchases. Refunds can be distinguished from purchases by the amount sign of the records. Expense objects with a negative amount are purchases and `Expense` objects with a positive amount are refunds to those purchases. +// +// ### Usage Example +// Fetch from the `GET Expense` endpoint and view a company's expense. +type ExpenseRequest struct { + // When the transaction occurred. + TransactionDate *time.Time `json:"transaction_date,omitempty" url:"transaction_date,omitempty"` + // The expense's payment account. + Account *ExpenseRequestAccount `json:"account,omitempty" url:"account,omitempty"` + // The expense's contact. + Contact *ExpenseRequestContact `json:"contact,omitempty" url:"contact,omitempty"` + // The expense's total amount. + TotalAmount *float64 `json:"total_amount,omitempty" url:"total_amount,omitempty"` + // The expense's total amount before tax. + SubTotal *float64 `json:"sub_total,omitempty" url:"sub_total,omitempty"` + // The expense's total tax amount. + TotalTaxAmount *float64 `json:"total_tax_amount,omitempty" url:"total_tax_amount,omitempty"` + // The expense's currency. + // + // * `XUA` - ADB Unit of Account + // * `AFN` - Afghan Afghani + // * `AFA` - Afghan Afghani (1927–2002) + // * `ALL` - Albanian Lek + // * `ALK` - Albanian Lek (1946–1965) + // * `DZD` - Algerian Dinar + // * `ADP` - Andorran Peseta + // * `AOA` - Angolan Kwanza + // * `AOK` - Angolan Kwanza (1977–1991) + // * `AON` - Angolan New Kwanza (1990–2000) + // * `AOR` - Angolan Readjusted Kwanza (1995–1999) + // * `ARA` - Argentine Austral + // * `ARS` - Argentine Peso + // * `ARM` - Argentine Peso (1881–1970) + // * `ARP` - Argentine Peso (1983–1985) + // * `ARL` - Argentine Peso Ley (1970–1983) + // * `AMD` - Armenian Dram + // * `AWG` - Aruban Florin + // * `AUD` - Australian Dollar + // * `ATS` - Austrian Schilling + // * `AZN` - Azerbaijani Manat + // * `AZM` - Azerbaijani Manat (1993–2006) + // * `BSD` - Bahamian Dollar + // * `BHD` - Bahraini Dinar + // * `BDT` - Bangladeshi Taka + // * `BBD` - Barbadian Dollar + // * `BYN` - Belarusian Ruble + // * `BYB` - Belarusian Ruble (1994–1999) + // * `BYR` - Belarusian Ruble (2000–2016) + // * `BEF` - Belgian Franc + // * `BEC` - Belgian Franc (convertible) + // * `BEL` - Belgian Franc (financial) + // * `BZD` - Belize Dollar + // * `BMD` - Bermudan Dollar + // * `BTN` - Bhutanese Ngultrum + // * `BOB` - Bolivian Boliviano + // * `BOL` - Bolivian Boliviano (1863–1963) + // * `BOV` - Bolivian Mvdol + // * `BOP` - Bolivian Peso + // * `BAM` - Bosnia-Herzegovina Convertible Mark + // * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + // * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + // * `BWP` - Botswanan Pula + // * `BRC` - Brazilian Cruzado (1986–1989) + // * `BRZ` - Brazilian Cruzeiro (1942–1967) + // * `BRE` - Brazilian Cruzeiro (1990–1993) + // * `BRR` - Brazilian Cruzeiro (1993–1994) + // * `BRN` - Brazilian New Cruzado (1989–1990) + // * `BRB` - Brazilian New Cruzeiro (1967–1986) + // * `BRL` - Brazilian Real + // * `GBP` - British Pound + // * `BND` - Brunei Dollar + // * `BGL` - Bulgarian Hard Lev + // * `BGN` - Bulgarian Lev + // * `BGO` - Bulgarian Lev (1879–1952) + // * `BGM` - Bulgarian Socialist Lev + // * `BUK` - Burmese Kyat + // * `BIF` - Burundian Franc + // * `XPF` - CFP Franc + // * `KHR` - Cambodian Riel + // * `CAD` - Canadian Dollar + // * `CVE` - Cape Verdean Escudo + // * `KYD` - Cayman Islands Dollar + // * `XAF` - Central African CFA Franc + // * `CLE` - Chilean Escudo + // * `CLP` - Chilean Peso + // * `CLF` - Chilean Unit of Account (UF) + // * `CNX` - Chinese People’s Bank Dollar + // * `CNY` - Chinese Yuan + // * `CNH` - Chinese Yuan (offshore) + // * `COP` - Colombian Peso + // * `COU` - Colombian Real Value Unit + // * `KMF` - Comorian Franc + // * `CDF` - Congolese Franc + // * `CRC` - Costa Rican Colón + // * `HRD` - Croatian Dinar + // * `HRK` - Croatian Kuna + // * `CUC` - Cuban Convertible Peso + // * `CUP` - Cuban Peso + // * `CYP` - Cypriot Pound + // * `CZK` - Czech Koruna + // * `CSK` - Czechoslovak Hard Koruna + // * `DKK` - Danish Krone + // * `DJF` - Djiboutian Franc + // * `DOP` - Dominican Peso + // * `NLG` - Dutch Guilder + // * `XCD` - East Caribbean Dollar + // * `DDM` - East German Mark + // * `ECS` - Ecuadorian Sucre + // * `ECV` - Ecuadorian Unit of Constant Value + // * `EGP` - Egyptian Pound + // * `GQE` - Equatorial Guinean Ekwele + // * `ERN` - Eritrean Nakfa + // * `EEK` - Estonian Kroon + // * `ETB` - Ethiopian Birr + // * `EUR` - Euro + // * `XBA` - European Composite Unit + // * `XEU` - European Currency Unit + // * `XBB` - European Monetary Unit + // * `XBC` - European Unit of Account (XBC) + // * `XBD` - European Unit of Account (XBD) + // * `FKP` - Falkland Islands Pound + // * `FJD` - Fijian Dollar + // * `FIM` - Finnish Markka + // * `FRF` - French Franc + // * `XFO` - French Gold Franc + // * `XFU` - French UIC-Franc + // * `GMD` - Gambian Dalasi + // * `GEK` - Georgian Kupon Larit + // * `GEL` - Georgian Lari + // * `DEM` - German Mark + // * `GHS` - Ghanaian Cedi + // * `GHC` - Ghanaian Cedi (1979–2007) + // * `GIP` - Gibraltar Pound + // * `XAU` - Gold + // * `GRD` - Greek Drachma + // * `GTQ` - Guatemalan Quetzal + // * `GWP` - Guinea-Bissau Peso + // * `GNF` - Guinean Franc + // * `GNS` - Guinean Syli + // * `GYD` - Guyanaese Dollar + // * `HTG` - Haitian Gourde + // * `HNL` - Honduran Lempira + // * `HKD` - Hong Kong Dollar + // * `HUF` - Hungarian Forint + // * `IMP` - IMP + // * `ISK` - Icelandic Króna + // * `ISJ` - Icelandic Króna (1918–1981) + // * `INR` - Indian Rupee + // * `IDR` - Indonesian Rupiah + // * `IRR` - Iranian Rial + // * `IQD` - Iraqi Dinar + // * `IEP` - Irish Pound + // * `ILS` - Israeli New Shekel + // * `ILP` - Israeli Pound + // * `ILR` - Israeli Shekel (1980–1985) + // * `ITL` - Italian Lira + // * `JMD` - Jamaican Dollar + // * `JPY` - Japanese Yen + // * `JOD` - Jordanian Dinar + // * `KZT` - Kazakhstani Tenge + // * `KES` - Kenyan Shilling + // * `KWD` - Kuwaiti Dinar + // * `KGS` - Kyrgystani Som + // * `LAK` - Laotian Kip + // * `LVL` - Latvian Lats + // * `LVR` - Latvian Ruble + // * `LBP` - Lebanese Pound + // * `LSL` - Lesotho Loti + // * `LRD` - Liberian Dollar + // * `LYD` - Libyan Dinar + // * `LTL` - Lithuanian Litas + // * `LTT` - Lithuanian Talonas + // * `LUL` - Luxembourg Financial Franc + // * `LUC` - Luxembourgian Convertible Franc + // * `LUF` - Luxembourgian Franc + // * `MOP` - Macanese Pataca + // * `MKD` - Macedonian Denar + // * `MKN` - Macedonian Denar (1992–1993) + // * `MGA` - Malagasy Ariary + // * `MGF` - Malagasy Franc + // * `MWK` - Malawian Kwacha + // * `MYR` - Malaysian Ringgit + // * `MVR` - Maldivian Rufiyaa + // * `MVP` - Maldivian Rupee (1947–1981) + // * `MLF` - Malian Franc + // * `MTL` - Maltese Lira + // * `MTP` - Maltese Pound + // * `MRU` - Mauritanian Ouguiya + // * `MRO` - Mauritanian Ouguiya (1973–2017) + // * `MUR` - Mauritian Rupee + // * `MXV` - Mexican Investment Unit + // * `MXN` - Mexican Peso + // * `MXP` - Mexican Silver Peso (1861–1992) + // * `MDC` - Moldovan Cupon + // * `MDL` - Moldovan Leu + // * `MCF` - Monegasque Franc + // * `MNT` - Mongolian Tugrik + // * `MAD` - Moroccan Dirham + // * `MAF` - Moroccan Franc + // * `MZE` - Mozambican Escudo + // * `MZN` - Mozambican Metical + // * `MZM` - Mozambican Metical (1980–2006) + // * `MMK` - Myanmar Kyat + // * `NAD` - Namibian Dollar + // * `NPR` - Nepalese Rupee + // * `ANG` - Netherlands Antillean Guilder + // * `TWD` - New Taiwan Dollar + // * `NZD` - New Zealand Dollar + // * `NIO` - Nicaraguan Córdoba + // * `NIC` - Nicaraguan Córdoba (1988–1991) + // * `NGN` - Nigerian Naira + // * `KPW` - North Korean Won + // * `NOK` - Norwegian Krone + // * `OMR` - Omani Rial + // * `PKR` - Pakistani Rupee + // * `XPD` - Palladium + // * `PAB` - Panamanian Balboa + // * `PGK` - Papua New Guinean Kina + // * `PYG` - Paraguayan Guarani + // * `PEI` - Peruvian Inti + // * `PEN` - Peruvian Sol + // * `PES` - Peruvian Sol (1863–1965) + // * `PHP` - Philippine Peso + // * `XPT` - Platinum + // * `PLN` - Polish Zloty + // * `PLZ` - Polish Zloty (1950–1995) + // * `PTE` - Portuguese Escudo + // * `GWE` - Portuguese Guinea Escudo + // * `QAR` - Qatari Rial + // * `XRE` - RINET Funds + // * `RHD` - Rhodesian Dollar + // * `RON` - Romanian Leu + // * `ROL` - Romanian Leu (1952–2006) + // * `RUB` - Russian Ruble + // * `RUR` - Russian Ruble (1991–1998) + // * `RWF` - Rwandan Franc + // * `SVC` - Salvadoran Colón + // * `WST` - Samoan Tala + // * `SAR` - Saudi Riyal + // * `RSD` - Serbian Dinar + // * `CSD` - Serbian Dinar (2002–2006) + // * `SCR` - Seychellois Rupee + // * `SLL` - Sierra Leonean Leone + // * `XAG` - Silver + // * `SGD` - Singapore Dollar + // * `SKK` - Slovak Koruna + // * `SIT` - Slovenian Tolar + // * `SBD` - Solomon Islands Dollar + // * `SOS` - Somali Shilling + // * `ZAR` - South African Rand + // * `ZAL` - South African Rand (financial) + // * `KRH` - South Korean Hwan (1953–1962) + // * `KRW` - South Korean Won + // * `KRO` - South Korean Won (1945–1953) + // * `SSP` - South Sudanese Pound + // * `SUR` - Soviet Rouble + // * `ESP` - Spanish Peseta + // * `ESA` - Spanish Peseta (A account) + // * `ESB` - Spanish Peseta (convertible account) + // * `XDR` - Special Drawing Rights + // * `LKR` - Sri Lankan Rupee + // * `SHP` - St. Helena Pound + // * `XSU` - Sucre + // * `SDD` - Sudanese Dinar (1992–2007) + // * `SDG` - Sudanese Pound + // * `SDP` - Sudanese Pound (1957–1998) + // * `SRD` - Surinamese Dollar + // * `SRG` - Surinamese Guilder + // * `SZL` - Swazi Lilangeni + // * `SEK` - Swedish Krona + // * `CHF` - Swiss Franc + // * `SYP` - Syrian Pound + // * `STN` - São Tomé & Príncipe Dobra + // * `STD` - São Tomé & Príncipe Dobra (1977–2017) + // * `TVD` - TVD + // * `TJR` - Tajikistani Ruble + // * `TJS` - Tajikistani Somoni + // * `TZS` - Tanzanian Shilling + // * `XTS` - Testing Currency Code + // * `THB` - Thai Baht + // * `XXX` - The codes assigned for transactions where no currency is involved + // * `TPE` - Timorese Escudo + // * `TOP` - Tongan Paʻanga + // * `TTD` - Trinidad & Tobago Dollar + // * `TND` - Tunisian Dinar + // * `TRY` - Turkish Lira + // * `TRL` - Turkish Lira (1922–2005) + // * `TMT` - Turkmenistani Manat + // * `TMM` - Turkmenistani Manat (1993–2009) + // * `USD` - US Dollar + // * `USN` - US Dollar (Next day) + // * `USS` - US Dollar (Same day) + // * `UGX` - Ugandan Shilling + // * `UGS` - Ugandan Shilling (1966–1987) + // * `UAH` - Ukrainian Hryvnia + // * `UAK` - Ukrainian Karbovanets + // * `AED` - United Arab Emirates Dirham + // * `UYW` - Uruguayan Nominal Wage Index Unit + // * `UYU` - Uruguayan Peso + // * `UYP` - Uruguayan Peso (1975–1993) + // * `UYI` - Uruguayan Peso (Indexed Units) + // * `UZS` - Uzbekistani Som + // * `VUV` - Vanuatu Vatu + // * `VES` - Venezuelan Bolívar + // * `VEB` - Venezuelan Bolívar (1871–2008) + // * `VEF` - Venezuelan Bolívar (2008–2018) + // * `VND` - Vietnamese Dong + // * `VNN` - Vietnamese Dong (1978–1985) + // * `CHE` - WIR Euro + // * `CHW` - WIR Franc + // * `XOF` - West African CFA Franc + // * `YDD` - Yemeni Dinar + // * `YER` - Yemeni Rial + // * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + // * `YUD` - Yugoslavian Hard Dinar (1966–1990) + // * `YUM` - Yugoslavian New Dinar (1994–2002) + // * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + // * `ZWN` - ZWN + // * `ZRN` - Zairean New Zaire (1993–1998) + // * `ZRZ` - Zairean Zaire (1971–1993) + // * `ZMW` - Zambian Kwacha + // * `ZMK` - Zambian Kwacha (1968–2012) + // * `ZWD` - Zimbabwean Dollar (1980–2008) + // * `ZWR` - Zimbabwean Dollar (2008) + // * `ZWL` - Zimbabwean Dollar (2009) + Currency *TransactionCurrencyEnum `json:"currency,omitempty" url:"currency,omitempty"` + // The expense's exchange rate. + ExchangeRate *string `json:"exchange_rate,omitempty" url:"exchange_rate,omitempty"` + // If the transaction is inclusive or exclusive of tax. `True` if inclusive, `False` if exclusive. + InclusiveOfTax *bool `json:"inclusive_of_tax,omitempty" url:"inclusive_of_tax,omitempty"` + // The company the expense belongs to. + Company *ExpenseRequestCompany `json:"company,omitempty" url:"company,omitempty"` + // The employee this overall transaction relates to. + Employee *ExpenseRequestEmployee `json:"employee,omitempty" url:"employee,omitempty"` + // The expense's private note. + Memo *string `json:"memo,omitempty" url:"memo,omitempty"` + Lines []*ExpenseLineRequest `json:"lines,omitempty" url:"lines,omitempty"` + TrackingCategories []*ExpenseRequestTrackingCategoriesItem `json:"tracking_categories,omitempty" url:"tracking_categories,omitempty"` + // The accounting period that the Expense was generated in. + AccountingPeriod *ExpenseRequestAccountingPeriod `json:"accounting_period,omitempty" url:"accounting_period,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + RemoteFields []*RemoteFieldRequest `json:"remote_fields,omitempty" url:"remote_fields,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (e *ExpenseRequest) GetTransactionDate() *time.Time { + if e == nil { + return nil + } + return e.TransactionDate +} + +func (e *ExpenseRequest) GetAccount() *ExpenseRequestAccount { + if e == nil { + return nil + } + return e.Account +} + +func (e *ExpenseRequest) GetContact() *ExpenseRequestContact { + if e == nil { + return nil + } + return e.Contact +} + +func (e *ExpenseRequest) GetTotalAmount() *float64 { + if e == nil { + return nil + } + return e.TotalAmount +} + +func (e *ExpenseRequest) GetSubTotal() *float64 { + if e == nil { + return nil + } + return e.SubTotal +} + +func (e *ExpenseRequest) GetTotalTaxAmount() *float64 { + if e == nil { + return nil + } + return e.TotalTaxAmount +} + +func (e *ExpenseRequest) GetCurrency() *TransactionCurrencyEnum { + if e == nil { + return nil + } + return e.Currency +} + +func (e *ExpenseRequest) GetExchangeRate() *string { + if e == nil { + return nil + } + return e.ExchangeRate +} + +func (e *ExpenseRequest) GetInclusiveOfTax() *bool { + if e == nil { + return nil + } + return e.InclusiveOfTax +} + +func (e *ExpenseRequest) GetCompany() *ExpenseRequestCompany { + if e == nil { + return nil + } + return e.Company +} + +func (e *ExpenseRequest) GetEmployee() *ExpenseRequestEmployee { + if e == nil { + return nil + } + return e.Employee +} + +func (e *ExpenseRequest) GetMemo() *string { + if e == nil { + return nil + } + return e.Memo +} + +func (e *ExpenseRequest) GetLines() []*ExpenseLineRequest { + if e == nil { + return nil + } + return e.Lines +} + +func (e *ExpenseRequest) GetTrackingCategories() []*ExpenseRequestTrackingCategoriesItem { + if e == nil { + return nil + } + return e.TrackingCategories +} + +func (e *ExpenseRequest) GetAccountingPeriod() *ExpenseRequestAccountingPeriod { + if e == nil { + return nil + } + return e.AccountingPeriod +} + +func (e *ExpenseRequest) GetIntegrationParams() map[string]interface{} { + if e == nil { + return nil + } + return e.IntegrationParams +} + +func (e *ExpenseRequest) GetLinkedAccountParams() map[string]interface{} { + if e == nil { + return nil + } + return e.LinkedAccountParams +} + +func (e *ExpenseRequest) GetRemoteFields() []*RemoteFieldRequest { + if e == nil { + return nil + } + return e.RemoteFields +} + +func (e *ExpenseRequest) GetExtraProperties() map[string]interface{} { + return e.extraProperties +} + +func (e *ExpenseRequest) UnmarshalJSON(data []byte) error { + type embed ExpenseRequest + var unmarshaler = struct { + embed + TransactionDate *internal.DateTime `json:"transaction_date,omitempty"` + }{ + embed: embed(*e), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *e = ExpenseRequest(unmarshaler.embed) + e.TransactionDate = unmarshaler.TransactionDate.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *e) + if err != nil { + return err + } + e.extraProperties = extraProperties + e.rawJSON = json.RawMessage(data) + return nil +} + +func (e *ExpenseRequest) MarshalJSON() ([]byte, error) { + type embed ExpenseRequest + var marshaler = struct { + embed + TransactionDate *internal.DateTime `json:"transaction_date,omitempty"` + }{ + embed: embed(*e), + TransactionDate: internal.NewOptionalDateTime(e.TransactionDate), + } + return json.Marshal(marshaler) +} + +func (e *ExpenseRequest) String() string { + if len(e.rawJSON) > 0 { + if value, err := internal.StringifyJSON(e.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(e); err == nil { + return value + } + return fmt.Sprintf("%#v", e) +} + +// The expense's payment account. +type ExpenseRequestAccount struct { + String string + Account *Account + + typ string +} + +func (e *ExpenseRequestAccount) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *ExpenseRequestAccount) GetAccount() *Account { + if e == nil { + return nil + } + return e.Account +} + +func (e *ExpenseRequestAccount) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + valueAccount := new(Account) + if err := json.Unmarshal(data, &valueAccount); err == nil { + e.typ = "Account" + e.Account = valueAccount + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e ExpenseRequestAccount) MarshalJSON() ([]byte, error) { + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + if e.typ == "Account" || e.Account != nil { + return json.Marshal(e.Account) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type ExpenseRequestAccountVisitor interface { + VisitString(string) error + VisitAccount(*Account) error +} + +func (e *ExpenseRequestAccount) Accept(visitor ExpenseRequestAccountVisitor) error { + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + if e.typ == "Account" || e.Account != nil { + return visitor.VisitAccount(e.Account) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +// The accounting period that the Expense was generated in. +type ExpenseRequestAccountingPeriod struct { + String string + AccountingPeriod *AccountingPeriod + + typ string +} + +func (e *ExpenseRequestAccountingPeriod) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *ExpenseRequestAccountingPeriod) GetAccountingPeriod() *AccountingPeriod { + if e == nil { + return nil + } + return e.AccountingPeriod +} + +func (e *ExpenseRequestAccountingPeriod) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + valueAccountingPeriod := new(AccountingPeriod) + if err := json.Unmarshal(data, &valueAccountingPeriod); err == nil { + e.typ = "AccountingPeriod" + e.AccountingPeriod = valueAccountingPeriod + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e ExpenseRequestAccountingPeriod) MarshalJSON() ([]byte, error) { + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + if e.typ == "AccountingPeriod" || e.AccountingPeriod != nil { + return json.Marshal(e.AccountingPeriod) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type ExpenseRequestAccountingPeriodVisitor interface { + VisitString(string) error + VisitAccountingPeriod(*AccountingPeriod) error +} + +func (e *ExpenseRequestAccountingPeriod) Accept(visitor ExpenseRequestAccountingPeriodVisitor) error { + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + if e.typ == "AccountingPeriod" || e.AccountingPeriod != nil { + return visitor.VisitAccountingPeriod(e.AccountingPeriod) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +// The company the expense belongs to. +type ExpenseRequestCompany struct { + String string + CompanyInfo *CompanyInfo + + typ string +} + +func (e *ExpenseRequestCompany) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *ExpenseRequestCompany) GetCompanyInfo() *CompanyInfo { + if e == nil { + return nil + } + return e.CompanyInfo +} + +func (e *ExpenseRequestCompany) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + valueCompanyInfo := new(CompanyInfo) + if err := json.Unmarshal(data, &valueCompanyInfo); err == nil { + e.typ = "CompanyInfo" + e.CompanyInfo = valueCompanyInfo + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e ExpenseRequestCompany) MarshalJSON() ([]byte, error) { + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + if e.typ == "CompanyInfo" || e.CompanyInfo != nil { + return json.Marshal(e.CompanyInfo) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type ExpenseRequestCompanyVisitor interface { + VisitString(string) error + VisitCompanyInfo(*CompanyInfo) error +} + +func (e *ExpenseRequestCompany) Accept(visitor ExpenseRequestCompanyVisitor) error { + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + if e.typ == "CompanyInfo" || e.CompanyInfo != nil { + return visitor.VisitCompanyInfo(e.CompanyInfo) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +// The expense's contact. +type ExpenseRequestContact struct { + String string + Contact *Contact + + typ string +} + +func (e *ExpenseRequestContact) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *ExpenseRequestContact) GetContact() *Contact { + if e == nil { + return nil + } + return e.Contact +} + +func (e *ExpenseRequestContact) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + valueContact := new(Contact) + if err := json.Unmarshal(data, &valueContact); err == nil { + e.typ = "Contact" + e.Contact = valueContact + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e ExpenseRequestContact) MarshalJSON() ([]byte, error) { + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + if e.typ == "Contact" || e.Contact != nil { + return json.Marshal(e.Contact) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type ExpenseRequestContactVisitor interface { + VisitString(string) error + VisitContact(*Contact) error +} + +func (e *ExpenseRequestContact) Accept(visitor ExpenseRequestContactVisitor) error { + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + if e.typ == "Contact" || e.Contact != nil { + return visitor.VisitContact(e.Contact) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +// The employee this overall transaction relates to. +type ExpenseRequestEmployee struct { + String string + Employee *Employee + + typ string +} + +func (e *ExpenseRequestEmployee) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *ExpenseRequestEmployee) GetEmployee() *Employee { + if e == nil { + return nil + } + return e.Employee +} + +func (e *ExpenseRequestEmployee) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + valueEmployee := new(Employee) + if err := json.Unmarshal(data, &valueEmployee); err == nil { + e.typ = "Employee" + e.Employee = valueEmployee + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e ExpenseRequestEmployee) MarshalJSON() ([]byte, error) { + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + if e.typ == "Employee" || e.Employee != nil { + return json.Marshal(e.Employee) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type ExpenseRequestEmployeeVisitor interface { + VisitString(string) error + VisitEmployee(*Employee) error +} + +func (e *ExpenseRequestEmployee) Accept(visitor ExpenseRequestEmployeeVisitor) error { + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + if e.typ == "Employee" || e.Employee != nil { + return visitor.VisitEmployee(e.Employee) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type ExpenseRequestTrackingCategoriesItem struct { + String string + TrackingCategory *TrackingCategory + + typ string +} + +func (e *ExpenseRequestTrackingCategoriesItem) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *ExpenseRequestTrackingCategoriesItem) GetTrackingCategory() *TrackingCategory { + if e == nil { + return nil + } + return e.TrackingCategory +} + +func (e *ExpenseRequestTrackingCategoriesItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + valueTrackingCategory := new(TrackingCategory) + if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { + e.typ = "TrackingCategory" + e.TrackingCategory = valueTrackingCategory + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e ExpenseRequestTrackingCategoriesItem) MarshalJSON() ([]byte, error) { + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + if e.typ == "TrackingCategory" || e.TrackingCategory != nil { + return json.Marshal(e.TrackingCategory) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type ExpenseRequestTrackingCategoriesItemVisitor interface { + VisitString(string) error + VisitTrackingCategory(*TrackingCategory) error +} + +func (e *ExpenseRequestTrackingCategoriesItem) Accept(visitor ExpenseRequestTrackingCategoriesItemVisitor) error { + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + if e.typ == "TrackingCategory" || e.TrackingCategory != nil { + return visitor.VisitTrackingCategory(e.TrackingCategory) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type ExpenseResponse struct { + Model *Expense `json:"model" url:"model"` + Warnings []*WarningValidationProblem `json:"warnings" url:"warnings"` + Errors []*ErrorValidationProblem `json:"errors" url:"errors"` + Logs []*DebugModeLog `json:"logs,omitempty" url:"logs,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (e *ExpenseResponse) GetModel() *Expense { + if e == nil { + return nil + } + return e.Model +} + +func (e *ExpenseResponse) GetWarnings() []*WarningValidationProblem { + if e == nil { + return nil + } + return e.Warnings +} + +func (e *ExpenseResponse) GetErrors() []*ErrorValidationProblem { + if e == nil { + return nil + } + return e.Errors +} + +func (e *ExpenseResponse) GetLogs() []*DebugModeLog { + if e == nil { + return nil + } + return e.Logs +} + +func (e *ExpenseResponse) GetExtraProperties() map[string]interface{} { + return e.extraProperties +} + +func (e *ExpenseResponse) UnmarshalJSON(data []byte) error { + type unmarshaler ExpenseResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *e = ExpenseResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *e) + if err != nil { + return err + } + e.extraProperties = extraProperties + e.rawJSON = json.RawMessage(data) + return nil +} + +func (e *ExpenseResponse) String() string { + if len(e.rawJSON) > 0 { + if value, err := internal.StringifyJSON(e.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(e); err == nil { + return value + } + return fmt.Sprintf("%#v", e) +} + +type ExpenseTrackingCategoriesItem struct { + String string + TrackingCategory *TrackingCategory + + typ string +} + +func (e *ExpenseTrackingCategoriesItem) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *ExpenseTrackingCategoriesItem) GetTrackingCategory() *TrackingCategory { + if e == nil { + return nil + } + return e.TrackingCategory +} + +func (e *ExpenseTrackingCategoriesItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + valueTrackingCategory := new(TrackingCategory) + if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { + e.typ = "TrackingCategory" + e.TrackingCategory = valueTrackingCategory + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e ExpenseTrackingCategoriesItem) MarshalJSON() ([]byte, error) { + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + if e.typ == "TrackingCategory" || e.TrackingCategory != nil { + return json.Marshal(e.TrackingCategory) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type ExpenseTrackingCategoriesItemVisitor interface { + VisitString(string) error + VisitTrackingCategory(*TrackingCategory) error +} + +func (e *ExpenseTrackingCategoriesItem) Accept(visitor ExpenseTrackingCategoriesItemVisitor) error { + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + if e.typ == "TrackingCategory" || e.TrackingCategory != nil { + return visitor.VisitTrackingCategory(e.TrackingCategory) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type PaginatedExpenseList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Expense `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedExpenseList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedExpenseList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedExpenseList) GetResults() []*Expense { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedExpenseList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedExpenseList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedExpenseList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedExpenseList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedExpenseList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} diff --git a/accounting/expenses/client.go b/accounting/expenses/client.go index 3ecaf00..3b8615d 100644 --- a/accounting/expenses/client.go +++ b/accounting/expenses/client.go @@ -1,136 +1,135 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package expenses import ( context "context" fmt "fmt" - accounting "github.com/merge-api/merge-go-client/accounting" - core "github.com/merge-api/merge-go-client/core" + accounting "github.com/merge-api/merge-go-client/v2/accounting" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `Expense` objects. -func (c *Client) List(ctx context.Context, request *accounting.ExpensesListRequest) (*accounting.PaginatedExpenseList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/expenses" - - queryParams := make(url.Values) - if request.CompanyId != nil { - queryParams.Add("company_id", fmt.Sprintf("%v", *request.CompanyId)) - } - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeRemoteFields != nil { - queryParams.Add("include_remote_fields", fmt.Sprintf("%v", *request.IncludeRemoteFields)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if request.TransactionDateAfter != nil { - queryParams.Add("transaction_date_after", fmt.Sprintf("%v", request.TransactionDateAfter.Format(time.RFC3339))) - } - if request.TransactionDateBefore != nil { - queryParams.Add("transaction_date_before", fmt.Sprintf("%v", request.TransactionDateBefore.Format(time.RFC3339))) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *accounting.PaginatedExpenseList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *accounting.ExpensesListRequest, + opts ...option.RequestOption, +) (*core.Page[*accounting.Expense], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/expenses" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *accounting.PaginatedExpenseList) *internal.PageResponse[*string, *accounting.Expense] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *accounting.Expense]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Creates an `Expense` object with the given values. -func (c *Client) Create(ctx context.Context, request *accounting.ExpenseEndpointRequest) (*accounting.ExpenseResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/expenses" - - queryParams := make(url.Values) - if request.IsDebugMode != nil { - queryParams.Add("is_debug_mode", fmt.Sprintf("%v", *request.IsDebugMode)) - } - if request.RunAsync != nil { - queryParams.Add("run_async", fmt.Sprintf("%v", *request.RunAsync)) +func (c *Client) Create( + ctx context.Context, + request *accounting.ExpenseEndpointRequest, + opts ...option.RequestOption, +) (*accounting.ExpenseResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/expenses" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *accounting.ExpenseResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -139,35 +138,46 @@ func (c *Client) Create(ctx context.Context, request *accounting.ExpenseEndpoint } // Returns an `Expense` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *accounting.ExpensesRetrieveRequest) (*accounting.Expense, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"accounting/v1/expenses/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeRemoteFields != nil { - queryParams.Add("include_remote_fields", fmt.Sprintf("%v", *request.IncludeRemoteFields)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *accounting.ExpensesRetrieveRequest, + opts ...option.RequestOption, +) (*accounting.Expense, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/accounting/v1/expenses/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *accounting.Expense if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -176,67 +186,93 @@ func (c *Client) Retrieve(ctx context.Context, id string, request *accounting.Ex } // Returns a list of `RemoteFieldClass` objects. -func (c *Client) LinesRemoteFieldClassesList(ctx context.Context, request *accounting.ExpensesLinesRemoteFieldClassesListRequest) (*accounting.PaginatedRemoteFieldClassList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/expenses/lines/remote-field-classes" - - queryParams := make(url.Values) - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.IsCommonModelField != nil { - queryParams.Add("is_common_model_field", fmt.Sprintf("%v", *request.IsCommonModelField)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *accounting.PaginatedRemoteFieldClassList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) LinesRemoteFieldClassesList( + ctx context.Context, + request *accounting.ExpensesLinesRemoteFieldClassesListRequest, + opts ...option.RequestOption, +) (*core.Page[*accounting.RemoteFieldClass], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/expenses/lines/remote-field-classes" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *accounting.PaginatedRemoteFieldClassList) *internal.PageResponse[*string, *accounting.RemoteFieldClass] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *accounting.RemoteFieldClass]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Returns metadata for `Expense` POSTs. -func (c *Client) MetaPostRetrieve(ctx context.Context) (*accounting.MetaResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/expenses/meta/post" +func (c *Client) MetaPostRetrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*accounting.MetaResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/expenses/meta/post" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *accounting.MetaResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -245,47 +281,60 @@ func (c *Client) MetaPostRetrieve(ctx context.Context) (*accounting.MetaResponse } // Returns a list of `RemoteFieldClass` objects. -func (c *Client) RemoteFieldClassesList(ctx context.Context, request *accounting.ExpensesRemoteFieldClassesListRequest) (*accounting.PaginatedRemoteFieldClassList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/expenses/remote-field-classes" - - queryParams := make(url.Values) - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.IsCommonModelField != nil { - queryParams.Add("is_common_model_field", fmt.Sprintf("%v", *request.IsCommonModelField)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *accounting.PaginatedRemoteFieldClassList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) RemoteFieldClassesList( + ctx context.Context, + request *accounting.ExpensesRemoteFieldClassesListRequest, + opts ...option.RequestOption, +) (*core.Page[*accounting.RemoteFieldClass], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/expenses/remote-field-classes" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *accounting.PaginatedRemoteFieldClassList) *internal.PageResponse[*string, *accounting.RemoteFieldClass] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *accounting.RemoteFieldClass]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } diff --git a/accounting/field_mapping.go b/accounting/field_mapping.go index ecc1aae..a726b64 100644 --- a/accounting/field_mapping.go +++ b/accounting/field_mapping.go @@ -1,41 +1,1445 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package accounting +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" +) + type CreateFieldMappingRequest struct { // If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. - ExcludeRemoteFieldMetadata *bool `json:"-"` + ExcludeRemoteFieldMetadata *bool `json:"-" url:"exclude_remote_field_metadata,omitempty"` // The name of the target field you want this remote field to map to. - TargetFieldName string `json:"target_field_name"` + TargetFieldName string `json:"target_field_name" url:"-"` // The description of the target field you want this remote field to map to. - TargetFieldDescription string `json:"target_field_description"` + TargetFieldDescription string `json:"target_field_description" url:"-"` // The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint. - RemoteFieldTraversalPath []interface{} `json:"remote_field_traversal_path,omitempty"` + RemoteFieldTraversalPath []interface{} `json:"remote_field_traversal_path,omitempty" url:"-"` // The method of the remote endpoint where the remote field is coming from. - RemoteMethod string `json:"remote_method"` + RemoteMethod string `json:"remote_method" url:"-"` // The path of the remote endpoint where the remote field is coming from. - RemoteUrlPath string `json:"remote_url_path"` + RemoteUrlPath string `json:"remote_url_path" url:"-"` // The name of the Common Model that the remote field corresponds to in a given category. - CommonModelName string `json:"common_model_name"` + CommonModelName string `json:"common_model_name" url:"-"` } type PatchedEditFieldMappingRequest struct { // The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint. - RemoteFieldTraversalPath []interface{} `json:"remote_field_traversal_path,omitempty"` + RemoteFieldTraversalPath []interface{} `json:"remote_field_traversal_path,omitempty" url:"-"` // The method of the remote endpoint where the remote field is coming from. - RemoteMethod *string `json:"remote_method,omitempty"` + RemoteMethod *string `json:"remote_method,omitempty" url:"-"` // The path of the remote endpoint where the remote field is coming from. - RemoteUrlPath *string `json:"remote_url_path,omitempty"` + RemoteUrlPath *string `json:"remote_url_path,omitempty" url:"-"` } type FieldMappingsRetrieveRequest struct { // If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. - ExcludeRemoteFieldMetadata *bool `json:"-"` + ExcludeRemoteFieldMetadata *bool `json:"-" url:"exclude_remote_field_metadata,omitempty"` } type RemoteFieldsRetrieveRequest struct { // A comma seperated list of Common Model names. If included, will only return Remote Fields for those Common Models. - CommonModels *string `json:"-"` + CommonModels *string `json:"-" url:"common_models,omitempty"` // If true, will include example values, where available, for remote fields in the 3rd party platform. These examples come from active data from your customers. - IncludeExampleValues *string `json:"-"` + IncludeExampleValues *string `json:"-" url:"include_example_values,omitempty"` +} + +type AdvancedMetadata struct { + Id string `json:"id" url:"id"` + DisplayName *string `json:"display_name,omitempty" url:"display_name,omitempty"` + Description *string `json:"description,omitempty" url:"description,omitempty"` + IsRequired *bool `json:"is_required,omitempty" url:"is_required,omitempty"` + IsCustom *bool `json:"is_custom,omitempty" url:"is_custom,omitempty"` + FieldChoices []interface{} `json:"field_choices,omitempty" url:"field_choices,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AdvancedMetadata) GetId() string { + if a == nil { + return "" + } + return a.Id +} + +func (a *AdvancedMetadata) GetDisplayName() *string { + if a == nil { + return nil + } + return a.DisplayName +} + +func (a *AdvancedMetadata) GetDescription() *string { + if a == nil { + return nil + } + return a.Description +} + +func (a *AdvancedMetadata) GetIsRequired() *bool { + if a == nil { + return nil + } + return a.IsRequired +} + +func (a *AdvancedMetadata) GetIsCustom() *bool { + if a == nil { + return nil + } + return a.IsCustom +} + +func (a *AdvancedMetadata) GetFieldChoices() []interface{} { + if a == nil { + return nil + } + return a.FieldChoices +} + +func (a *AdvancedMetadata) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AdvancedMetadata) UnmarshalJSON(data []byte) error { + type unmarshaler AdvancedMetadata + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *a = AdvancedMetadata(value) + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AdvancedMetadata) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} + +type ExternalTargetFieldApi struct { + Name *string `json:"name,omitempty" url:"name,omitempty"` + Description *string `json:"description,omitempty" url:"description,omitempty"` + IsMapped *string `json:"is_mapped,omitempty" url:"is_mapped,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (e *ExternalTargetFieldApi) GetName() *string { + if e == nil { + return nil + } + return e.Name +} + +func (e *ExternalTargetFieldApi) GetDescription() *string { + if e == nil { + return nil + } + return e.Description +} + +func (e *ExternalTargetFieldApi) GetIsMapped() *string { + if e == nil { + return nil + } + return e.IsMapped +} + +func (e *ExternalTargetFieldApi) GetExtraProperties() map[string]interface{} { + return e.extraProperties +} + +func (e *ExternalTargetFieldApi) UnmarshalJSON(data []byte) error { + type unmarshaler ExternalTargetFieldApi + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *e = ExternalTargetFieldApi(value) + extraProperties, err := internal.ExtractExtraProperties(data, *e) + if err != nil { + return err + } + e.extraProperties = extraProperties + e.rawJSON = json.RawMessage(data) + return nil +} + +func (e *ExternalTargetFieldApi) String() string { + if len(e.rawJSON) > 0 { + if value, err := internal.StringifyJSON(e.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(e); err == nil { + return value + } + return fmt.Sprintf("%#v", e) +} + +type ExternalTargetFieldApiResponse struct { + Account []*ExternalTargetFieldApi `json:"Account,omitempty" url:"Account,omitempty"` + AccountingAttachment []*ExternalTargetFieldApi `json:"AccountingAttachment,omitempty" url:"AccountingAttachment,omitempty"` + BalanceSheet []*ExternalTargetFieldApi `json:"BalanceSheet,omitempty" url:"BalanceSheet,omitempty"` + CashFlowStatement []*ExternalTargetFieldApi `json:"CashFlowStatement,omitempty" url:"CashFlowStatement,omitempty"` + CompanyInfo []*ExternalTargetFieldApi `json:"CompanyInfo,omitempty" url:"CompanyInfo,omitempty"` + Contact []*ExternalTargetFieldApi `json:"Contact,omitempty" url:"Contact,omitempty"` + IncomeStatement []*ExternalTargetFieldApi `json:"IncomeStatement,omitempty" url:"IncomeStatement,omitempty"` + CreditNote []*ExternalTargetFieldApi `json:"CreditNote,omitempty" url:"CreditNote,omitempty"` + Item []*ExternalTargetFieldApi `json:"Item,omitempty" url:"Item,omitempty"` + PurchaseOrder []*ExternalTargetFieldApi `json:"PurchaseOrder,omitempty" url:"PurchaseOrder,omitempty"` + TrackingCategory []*ExternalTargetFieldApi `json:"TrackingCategory,omitempty" url:"TrackingCategory,omitempty"` + JournalEntry []*ExternalTargetFieldApi `json:"JournalEntry,omitempty" url:"JournalEntry,omitempty"` + TaxRate []*ExternalTargetFieldApi `json:"TaxRate,omitempty" url:"TaxRate,omitempty"` + Invoice []*ExternalTargetFieldApi `json:"Invoice,omitempty" url:"Invoice,omitempty"` + Payment []*ExternalTargetFieldApi `json:"Payment,omitempty" url:"Payment,omitempty"` + Expense []*ExternalTargetFieldApi `json:"Expense,omitempty" url:"Expense,omitempty"` + VendorCredit []*ExternalTargetFieldApi `json:"VendorCredit,omitempty" url:"VendorCredit,omitempty"` + Transaction []*ExternalTargetFieldApi `json:"Transaction,omitempty" url:"Transaction,omitempty"` + AccountingPeriod []*ExternalTargetFieldApi `json:"AccountingPeriod,omitempty" url:"AccountingPeriod,omitempty"` + GeneralLedgerTransaction []*ExternalTargetFieldApi `json:"GeneralLedgerTransaction,omitempty" url:"GeneralLedgerTransaction,omitempty"` + BankFeedAccount []*ExternalTargetFieldApi `json:"BankFeedAccount,omitempty" url:"BankFeedAccount,omitempty"` + Employee []*ExternalTargetFieldApi `json:"Employee,omitempty" url:"Employee,omitempty"` + PaymentMethod []*ExternalTargetFieldApi `json:"PaymentMethod,omitempty" url:"PaymentMethod,omitempty"` + Project []*ExternalTargetFieldApi `json:"Project,omitempty" url:"Project,omitempty"` + PaymentTerm []*ExternalTargetFieldApi `json:"PaymentTerm,omitempty" url:"PaymentTerm,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (e *ExternalTargetFieldApiResponse) GetAccount() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.Account +} + +func (e *ExternalTargetFieldApiResponse) GetAccountingAttachment() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.AccountingAttachment +} + +func (e *ExternalTargetFieldApiResponse) GetBalanceSheet() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.BalanceSheet +} + +func (e *ExternalTargetFieldApiResponse) GetCashFlowStatement() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.CashFlowStatement +} + +func (e *ExternalTargetFieldApiResponse) GetCompanyInfo() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.CompanyInfo +} + +func (e *ExternalTargetFieldApiResponse) GetContact() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.Contact +} + +func (e *ExternalTargetFieldApiResponse) GetIncomeStatement() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.IncomeStatement +} + +func (e *ExternalTargetFieldApiResponse) GetCreditNote() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.CreditNote +} + +func (e *ExternalTargetFieldApiResponse) GetItem() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.Item +} + +func (e *ExternalTargetFieldApiResponse) GetPurchaseOrder() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.PurchaseOrder +} + +func (e *ExternalTargetFieldApiResponse) GetTrackingCategory() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.TrackingCategory +} + +func (e *ExternalTargetFieldApiResponse) GetJournalEntry() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.JournalEntry +} + +func (e *ExternalTargetFieldApiResponse) GetTaxRate() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.TaxRate +} + +func (e *ExternalTargetFieldApiResponse) GetInvoice() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.Invoice +} + +func (e *ExternalTargetFieldApiResponse) GetPayment() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.Payment +} + +func (e *ExternalTargetFieldApiResponse) GetExpense() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.Expense +} + +func (e *ExternalTargetFieldApiResponse) GetVendorCredit() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.VendorCredit +} + +func (e *ExternalTargetFieldApiResponse) GetTransaction() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.Transaction +} + +func (e *ExternalTargetFieldApiResponse) GetAccountingPeriod() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.AccountingPeriod +} + +func (e *ExternalTargetFieldApiResponse) GetGeneralLedgerTransaction() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.GeneralLedgerTransaction +} + +func (e *ExternalTargetFieldApiResponse) GetBankFeedAccount() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.BankFeedAccount +} + +func (e *ExternalTargetFieldApiResponse) GetEmployee() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.Employee +} + +func (e *ExternalTargetFieldApiResponse) GetPaymentMethod() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.PaymentMethod +} + +func (e *ExternalTargetFieldApiResponse) GetProject() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.Project +} + +func (e *ExternalTargetFieldApiResponse) GetPaymentTerm() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.PaymentTerm +} + +func (e *ExternalTargetFieldApiResponse) GetExtraProperties() map[string]interface{} { + return e.extraProperties +} + +func (e *ExternalTargetFieldApiResponse) UnmarshalJSON(data []byte) error { + type unmarshaler ExternalTargetFieldApiResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *e = ExternalTargetFieldApiResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *e) + if err != nil { + return err + } + e.extraProperties = extraProperties + e.rawJSON = json.RawMessage(data) + return nil +} + +func (e *ExternalTargetFieldApiResponse) String() string { + if len(e.rawJSON) > 0 { + if value, err := internal.StringifyJSON(e.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(e); err == nil { + return value + } + return fmt.Sprintf("%#v", e) +} + +type FieldMappingApiInstance struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + IsIntegrationWide *bool `json:"is_integration_wide,omitempty" url:"is_integration_wide,omitempty"` + TargetField *FieldMappingApiInstanceTargetField `json:"target_field,omitempty" url:"target_field,omitempty"` + RemoteField *FieldMappingApiInstanceRemoteField `json:"remote_field,omitempty" url:"remote_field,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (f *FieldMappingApiInstance) GetId() *string { + if f == nil { + return nil + } + return f.Id +} + +func (f *FieldMappingApiInstance) GetIsIntegrationWide() *bool { + if f == nil { + return nil + } + return f.IsIntegrationWide +} + +func (f *FieldMappingApiInstance) GetTargetField() *FieldMappingApiInstanceTargetField { + if f == nil { + return nil + } + return f.TargetField +} + +func (f *FieldMappingApiInstance) GetRemoteField() *FieldMappingApiInstanceRemoteField { + if f == nil { + return nil + } + return f.RemoteField +} + +func (f *FieldMappingApiInstance) GetExtraProperties() map[string]interface{} { + return f.extraProperties +} + +func (f *FieldMappingApiInstance) UnmarshalJSON(data []byte) error { + type unmarshaler FieldMappingApiInstance + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *f = FieldMappingApiInstance(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { + return err + } + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) + return nil +} + +func (f *FieldMappingApiInstance) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(f); err == nil { + return value + } + return fmt.Sprintf("%#v", f) +} + +type FieldMappingApiInstanceRemoteField struct { + RemoteKeyName *string `json:"remote_key_name,omitempty" url:"remote_key_name,omitempty"` + Schema map[string]interface{} `json:"schema,omitempty" url:"schema,omitempty"` + RemoteEndpointInfo *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo `json:"remote_endpoint_info" url:"remote_endpoint_info"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (f *FieldMappingApiInstanceRemoteField) GetRemoteKeyName() *string { + if f == nil { + return nil + } + return f.RemoteKeyName +} + +func (f *FieldMappingApiInstanceRemoteField) GetSchema() map[string]interface{} { + if f == nil { + return nil + } + return f.Schema +} + +func (f *FieldMappingApiInstanceRemoteField) GetRemoteEndpointInfo() *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo { + if f == nil { + return nil + } + return f.RemoteEndpointInfo +} + +func (f *FieldMappingApiInstanceRemoteField) GetExtraProperties() map[string]interface{} { + return f.extraProperties +} + +func (f *FieldMappingApiInstanceRemoteField) UnmarshalJSON(data []byte) error { + type unmarshaler FieldMappingApiInstanceRemoteField + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *f = FieldMappingApiInstanceRemoteField(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { + return err + } + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) + return nil +} + +func (f *FieldMappingApiInstanceRemoteField) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(f); err == nil { + return value + } + return fmt.Sprintf("%#v", f) +} + +type FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo struct { + Method *string `json:"method,omitempty" url:"method,omitempty"` + UrlPath *string `json:"url_path,omitempty" url:"url_path,omitempty"` + FieldTraversalPath []string `json:"field_traversal_path,omitempty" url:"field_traversal_path,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (f *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo) GetMethod() *string { + if f == nil { + return nil + } + return f.Method +} + +func (f *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo) GetUrlPath() *string { + if f == nil { + return nil + } + return f.UrlPath +} + +func (f *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo) GetFieldTraversalPath() []string { + if f == nil { + return nil + } + return f.FieldTraversalPath +} + +func (f *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo) GetExtraProperties() map[string]interface{} { + return f.extraProperties +} + +func (f *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo) UnmarshalJSON(data []byte) error { + type unmarshaler FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *f = FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { + return err + } + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) + return nil +} + +func (f *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(f); err == nil { + return value + } + return fmt.Sprintf("%#v", f) +} + +type FieldMappingApiInstanceResponse struct { + Account []*FieldMappingApiInstance `json:"Account,omitempty" url:"Account,omitempty"` + AccountingAttachment []*FieldMappingApiInstance `json:"AccountingAttachment,omitempty" url:"AccountingAttachment,omitempty"` + BalanceSheet []*FieldMappingApiInstance `json:"BalanceSheet,omitempty" url:"BalanceSheet,omitempty"` + CashFlowStatement []*FieldMappingApiInstance `json:"CashFlowStatement,omitempty" url:"CashFlowStatement,omitempty"` + CompanyInfo []*FieldMappingApiInstance `json:"CompanyInfo,omitempty" url:"CompanyInfo,omitempty"` + Contact []*FieldMappingApiInstance `json:"Contact,omitempty" url:"Contact,omitempty"` + IncomeStatement []*FieldMappingApiInstance `json:"IncomeStatement,omitempty" url:"IncomeStatement,omitempty"` + CreditNote []*FieldMappingApiInstance `json:"CreditNote,omitempty" url:"CreditNote,omitempty"` + Item []*FieldMappingApiInstance `json:"Item,omitempty" url:"Item,omitempty"` + PurchaseOrder []*FieldMappingApiInstance `json:"PurchaseOrder,omitempty" url:"PurchaseOrder,omitempty"` + TrackingCategory []*FieldMappingApiInstance `json:"TrackingCategory,omitempty" url:"TrackingCategory,omitempty"` + JournalEntry []*FieldMappingApiInstance `json:"JournalEntry,omitempty" url:"JournalEntry,omitempty"` + TaxRate []*FieldMappingApiInstance `json:"TaxRate,omitempty" url:"TaxRate,omitempty"` + Invoice []*FieldMappingApiInstance `json:"Invoice,omitempty" url:"Invoice,omitempty"` + Payment []*FieldMappingApiInstance `json:"Payment,omitempty" url:"Payment,omitempty"` + Expense []*FieldMappingApiInstance `json:"Expense,omitempty" url:"Expense,omitempty"` + VendorCredit []*FieldMappingApiInstance `json:"VendorCredit,omitempty" url:"VendorCredit,omitempty"` + Transaction []*FieldMappingApiInstance `json:"Transaction,omitempty" url:"Transaction,omitempty"` + AccountingPeriod []*FieldMappingApiInstance `json:"AccountingPeriod,omitempty" url:"AccountingPeriod,omitempty"` + GeneralLedgerTransaction []*FieldMappingApiInstance `json:"GeneralLedgerTransaction,omitempty" url:"GeneralLedgerTransaction,omitempty"` + BankFeedAccount []*FieldMappingApiInstance `json:"BankFeedAccount,omitempty" url:"BankFeedAccount,omitempty"` + Employee []*FieldMappingApiInstance `json:"Employee,omitempty" url:"Employee,omitempty"` + PaymentMethod []*FieldMappingApiInstance `json:"PaymentMethod,omitempty" url:"PaymentMethod,omitempty"` + Project []*FieldMappingApiInstance `json:"Project,omitempty" url:"Project,omitempty"` + PaymentTerm []*FieldMappingApiInstance `json:"PaymentTerm,omitempty" url:"PaymentTerm,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (f *FieldMappingApiInstanceResponse) GetAccount() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Account +} + +func (f *FieldMappingApiInstanceResponse) GetAccountingAttachment() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.AccountingAttachment +} + +func (f *FieldMappingApiInstanceResponse) GetBalanceSheet() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.BalanceSheet +} + +func (f *FieldMappingApiInstanceResponse) GetCashFlowStatement() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.CashFlowStatement +} + +func (f *FieldMappingApiInstanceResponse) GetCompanyInfo() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.CompanyInfo +} + +func (f *FieldMappingApiInstanceResponse) GetContact() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Contact +} + +func (f *FieldMappingApiInstanceResponse) GetIncomeStatement() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.IncomeStatement +} + +func (f *FieldMappingApiInstanceResponse) GetCreditNote() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.CreditNote +} + +func (f *FieldMappingApiInstanceResponse) GetItem() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Item +} + +func (f *FieldMappingApiInstanceResponse) GetPurchaseOrder() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.PurchaseOrder +} + +func (f *FieldMappingApiInstanceResponse) GetTrackingCategory() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.TrackingCategory +} + +func (f *FieldMappingApiInstanceResponse) GetJournalEntry() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.JournalEntry +} + +func (f *FieldMappingApiInstanceResponse) GetTaxRate() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.TaxRate +} + +func (f *FieldMappingApiInstanceResponse) GetInvoice() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Invoice +} + +func (f *FieldMappingApiInstanceResponse) GetPayment() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Payment +} + +func (f *FieldMappingApiInstanceResponse) GetExpense() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Expense +} + +func (f *FieldMappingApiInstanceResponse) GetVendorCredit() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.VendorCredit +} + +func (f *FieldMappingApiInstanceResponse) GetTransaction() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Transaction +} + +func (f *FieldMappingApiInstanceResponse) GetAccountingPeriod() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.AccountingPeriod +} + +func (f *FieldMappingApiInstanceResponse) GetGeneralLedgerTransaction() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.GeneralLedgerTransaction +} + +func (f *FieldMappingApiInstanceResponse) GetBankFeedAccount() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.BankFeedAccount +} + +func (f *FieldMappingApiInstanceResponse) GetEmployee() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Employee +} + +func (f *FieldMappingApiInstanceResponse) GetPaymentMethod() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.PaymentMethod +} + +func (f *FieldMappingApiInstanceResponse) GetProject() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Project +} + +func (f *FieldMappingApiInstanceResponse) GetPaymentTerm() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.PaymentTerm +} + +func (f *FieldMappingApiInstanceResponse) GetExtraProperties() map[string]interface{} { + return f.extraProperties +} + +func (f *FieldMappingApiInstanceResponse) UnmarshalJSON(data []byte) error { + type unmarshaler FieldMappingApiInstanceResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *f = FieldMappingApiInstanceResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { + return err + } + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) + return nil +} + +func (f *FieldMappingApiInstanceResponse) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(f); err == nil { + return value + } + return fmt.Sprintf("%#v", f) +} + +type FieldMappingApiInstanceTargetField struct { + Name string `json:"name" url:"name"` + Description string `json:"description" url:"description"` + IsOrganizationWide bool `json:"is_organization_wide" url:"is_organization_wide"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (f *FieldMappingApiInstanceTargetField) GetName() string { + if f == nil { + return "" + } + return f.Name +} + +func (f *FieldMappingApiInstanceTargetField) GetDescription() string { + if f == nil { + return "" + } + return f.Description +} + +func (f *FieldMappingApiInstanceTargetField) GetIsOrganizationWide() bool { + if f == nil { + return false + } + return f.IsOrganizationWide +} + +func (f *FieldMappingApiInstanceTargetField) GetExtraProperties() map[string]interface{} { + return f.extraProperties +} + +func (f *FieldMappingApiInstanceTargetField) UnmarshalJSON(data []byte) error { + type unmarshaler FieldMappingApiInstanceTargetField + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *f = FieldMappingApiInstanceTargetField(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { + return err + } + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) + return nil +} + +func (f *FieldMappingApiInstanceTargetField) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(f); err == nil { + return value + } + return fmt.Sprintf("%#v", f) +} + +type FieldMappingInstanceResponse struct { + Model *FieldMappingApiInstance `json:"model" url:"model"` + Warnings []*WarningValidationProblem `json:"warnings" url:"warnings"` + Errors []*ErrorValidationProblem `json:"errors" url:"errors"` + Logs []*DebugModeLog `json:"logs,omitempty" url:"logs,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (f *FieldMappingInstanceResponse) GetModel() *FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Model +} + +func (f *FieldMappingInstanceResponse) GetWarnings() []*WarningValidationProblem { + if f == nil { + return nil + } + return f.Warnings +} + +func (f *FieldMappingInstanceResponse) GetErrors() []*ErrorValidationProblem { + if f == nil { + return nil + } + return f.Errors +} + +func (f *FieldMappingInstanceResponse) GetLogs() []*DebugModeLog { + if f == nil { + return nil + } + return f.Logs +} + +func (f *FieldMappingInstanceResponse) GetExtraProperties() map[string]interface{} { + return f.extraProperties +} + +func (f *FieldMappingInstanceResponse) UnmarshalJSON(data []byte) error { + type unmarshaler FieldMappingInstanceResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *f = FieldMappingInstanceResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { + return err + } + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) + return nil +} + +func (f *FieldMappingInstanceResponse) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(f); err == nil { + return value + } + return fmt.Sprintf("%#v", f) +} + +type RemoteEndpointInfo struct { + Method string `json:"method" url:"method"` + UrlPath string `json:"url_path" url:"url_path"` + FieldTraversalPath []interface{} `json:"field_traversal_path" url:"field_traversal_path"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (r *RemoteEndpointInfo) GetMethod() string { + if r == nil { + return "" + } + return r.Method +} + +func (r *RemoteEndpointInfo) GetUrlPath() string { + if r == nil { + return "" + } + return r.UrlPath +} + +func (r *RemoteEndpointInfo) GetFieldTraversalPath() []interface{} { + if r == nil { + return nil + } + return r.FieldTraversalPath +} + +func (r *RemoteEndpointInfo) GetExtraProperties() map[string]interface{} { + return r.extraProperties +} + +func (r *RemoteEndpointInfo) UnmarshalJSON(data []byte) error { + type unmarshaler RemoteEndpointInfo + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *r = RemoteEndpointInfo(value) + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { + return err + } + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) + return nil +} + +func (r *RemoteEndpointInfo) String() string { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(r); err == nil { + return value + } + return fmt.Sprintf("%#v", r) +} + +type RemoteFieldApi struct { + Schema map[string]interface{} `json:"schema" url:"schema"` + RemoteKeyName string `json:"remote_key_name" url:"remote_key_name"` + RemoteEndpointInfo *RemoteEndpointInfo `json:"remote_endpoint_info" url:"remote_endpoint_info"` + ExampleValues []interface{} `json:"example_values,omitempty" url:"example_values,omitempty"` + AdvancedMetadata *AdvancedMetadata `json:"advanced_metadata,omitempty" url:"advanced_metadata,omitempty"` + Coverage *RemoteFieldApiCoverage `json:"coverage,omitempty" url:"coverage,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (r *RemoteFieldApi) GetSchema() map[string]interface{} { + if r == nil { + return nil + } + return r.Schema +} + +func (r *RemoteFieldApi) GetRemoteKeyName() string { + if r == nil { + return "" + } + return r.RemoteKeyName +} + +func (r *RemoteFieldApi) GetRemoteEndpointInfo() *RemoteEndpointInfo { + if r == nil { + return nil + } + return r.RemoteEndpointInfo +} + +func (r *RemoteFieldApi) GetExampleValues() []interface{} { + if r == nil { + return nil + } + return r.ExampleValues +} + +func (r *RemoteFieldApi) GetAdvancedMetadata() *AdvancedMetadata { + if r == nil { + return nil + } + return r.AdvancedMetadata +} + +func (r *RemoteFieldApi) GetCoverage() *RemoteFieldApiCoverage { + if r == nil { + return nil + } + return r.Coverage +} + +func (r *RemoteFieldApi) GetExtraProperties() map[string]interface{} { + return r.extraProperties +} + +func (r *RemoteFieldApi) UnmarshalJSON(data []byte) error { + type unmarshaler RemoteFieldApi + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *r = RemoteFieldApi(value) + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { + return err + } + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) + return nil +} + +func (r *RemoteFieldApi) String() string { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(r); err == nil { + return value + } + return fmt.Sprintf("%#v", r) +} + +type RemoteFieldApiCoverage struct { + Integer int + Double float64 + + typ string +} + +func (r *RemoteFieldApiCoverage) GetInteger() int { + if r == nil { + return 0 + } + return r.Integer +} + +func (r *RemoteFieldApiCoverage) GetDouble() float64 { + if r == nil { + return 0 + } + return r.Double +} + +func (r *RemoteFieldApiCoverage) UnmarshalJSON(data []byte) error { + var valueInteger int + if err := json.Unmarshal(data, &valueInteger); err == nil { + r.typ = "Integer" + r.Integer = valueInteger + return nil + } + var valueDouble float64 + if err := json.Unmarshal(data, &valueDouble); err == nil { + r.typ = "Double" + r.Double = valueDouble + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, r) +} + +func (r RemoteFieldApiCoverage) MarshalJSON() ([]byte, error) { + if r.typ == "Integer" || r.Integer != 0 { + return json.Marshal(r.Integer) + } + if r.typ == "Double" || r.Double != 0 { + return json.Marshal(r.Double) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", r) +} + +type RemoteFieldApiCoverageVisitor interface { + VisitInteger(int) error + VisitDouble(float64) error +} + +func (r *RemoteFieldApiCoverage) Accept(visitor RemoteFieldApiCoverageVisitor) error { + if r.typ == "Integer" || r.Integer != 0 { + return visitor.VisitInteger(r.Integer) + } + if r.typ == "Double" || r.Double != 0 { + return visitor.VisitDouble(r.Double) + } + return fmt.Errorf("type %T does not include a non-empty union type", r) +} + +type RemoteFieldApiResponse struct { + Account []*RemoteFieldApi `json:"Account,omitempty" url:"Account,omitempty"` + AccountingAttachment []*RemoteFieldApi `json:"AccountingAttachment,omitempty" url:"AccountingAttachment,omitempty"` + BalanceSheet []*RemoteFieldApi `json:"BalanceSheet,omitempty" url:"BalanceSheet,omitempty"` + CashFlowStatement []*RemoteFieldApi `json:"CashFlowStatement,omitempty" url:"CashFlowStatement,omitempty"` + CompanyInfo []*RemoteFieldApi `json:"CompanyInfo,omitempty" url:"CompanyInfo,omitempty"` + Contact []*RemoteFieldApi `json:"Contact,omitempty" url:"Contact,omitempty"` + IncomeStatement []*RemoteFieldApi `json:"IncomeStatement,omitempty" url:"IncomeStatement,omitempty"` + CreditNote []*RemoteFieldApi `json:"CreditNote,omitempty" url:"CreditNote,omitempty"` + Item []*RemoteFieldApi `json:"Item,omitempty" url:"Item,omitempty"` + PurchaseOrder []*RemoteFieldApi `json:"PurchaseOrder,omitempty" url:"PurchaseOrder,omitempty"` + TrackingCategory []*RemoteFieldApi `json:"TrackingCategory,omitempty" url:"TrackingCategory,omitempty"` + JournalEntry []*RemoteFieldApi `json:"JournalEntry,omitempty" url:"JournalEntry,omitempty"` + TaxRate []*RemoteFieldApi `json:"TaxRate,omitempty" url:"TaxRate,omitempty"` + Invoice []*RemoteFieldApi `json:"Invoice,omitempty" url:"Invoice,omitempty"` + Payment []*RemoteFieldApi `json:"Payment,omitempty" url:"Payment,omitempty"` + Expense []*RemoteFieldApi `json:"Expense,omitempty" url:"Expense,omitempty"` + VendorCredit []*RemoteFieldApi `json:"VendorCredit,omitempty" url:"VendorCredit,omitempty"` + Transaction []*RemoteFieldApi `json:"Transaction,omitempty" url:"Transaction,omitempty"` + AccountingPeriod []*RemoteFieldApi `json:"AccountingPeriod,omitempty" url:"AccountingPeriod,omitempty"` + GeneralLedgerTransaction []*RemoteFieldApi `json:"GeneralLedgerTransaction,omitempty" url:"GeneralLedgerTransaction,omitempty"` + BankFeedAccount []*RemoteFieldApi `json:"BankFeedAccount,omitempty" url:"BankFeedAccount,omitempty"` + Employee []*RemoteFieldApi `json:"Employee,omitempty" url:"Employee,omitempty"` + PaymentMethod []*RemoteFieldApi `json:"PaymentMethod,omitempty" url:"PaymentMethod,omitempty"` + Project []*RemoteFieldApi `json:"Project,omitempty" url:"Project,omitempty"` + PaymentTerm []*RemoteFieldApi `json:"PaymentTerm,omitempty" url:"PaymentTerm,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (r *RemoteFieldApiResponse) GetAccount() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.Account +} + +func (r *RemoteFieldApiResponse) GetAccountingAttachment() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.AccountingAttachment +} + +func (r *RemoteFieldApiResponse) GetBalanceSheet() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.BalanceSheet +} + +func (r *RemoteFieldApiResponse) GetCashFlowStatement() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.CashFlowStatement +} + +func (r *RemoteFieldApiResponse) GetCompanyInfo() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.CompanyInfo +} + +func (r *RemoteFieldApiResponse) GetContact() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.Contact +} + +func (r *RemoteFieldApiResponse) GetIncomeStatement() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.IncomeStatement +} + +func (r *RemoteFieldApiResponse) GetCreditNote() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.CreditNote +} + +func (r *RemoteFieldApiResponse) GetItem() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.Item +} + +func (r *RemoteFieldApiResponse) GetPurchaseOrder() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.PurchaseOrder +} + +func (r *RemoteFieldApiResponse) GetTrackingCategory() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.TrackingCategory +} + +func (r *RemoteFieldApiResponse) GetJournalEntry() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.JournalEntry +} + +func (r *RemoteFieldApiResponse) GetTaxRate() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.TaxRate +} + +func (r *RemoteFieldApiResponse) GetInvoice() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.Invoice +} + +func (r *RemoteFieldApiResponse) GetPayment() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.Payment +} + +func (r *RemoteFieldApiResponse) GetExpense() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.Expense +} + +func (r *RemoteFieldApiResponse) GetVendorCredit() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.VendorCredit +} + +func (r *RemoteFieldApiResponse) GetTransaction() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.Transaction +} + +func (r *RemoteFieldApiResponse) GetAccountingPeriod() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.AccountingPeriod +} + +func (r *RemoteFieldApiResponse) GetGeneralLedgerTransaction() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.GeneralLedgerTransaction +} + +func (r *RemoteFieldApiResponse) GetBankFeedAccount() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.BankFeedAccount +} + +func (r *RemoteFieldApiResponse) GetEmployee() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.Employee +} + +func (r *RemoteFieldApiResponse) GetPaymentMethod() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.PaymentMethod +} + +func (r *RemoteFieldApiResponse) GetProject() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.Project +} + +func (r *RemoteFieldApiResponse) GetPaymentTerm() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.PaymentTerm +} + +func (r *RemoteFieldApiResponse) GetExtraProperties() map[string]interface{} { + return r.extraProperties +} + +func (r *RemoteFieldApiResponse) UnmarshalJSON(data []byte) error { + type unmarshaler RemoteFieldApiResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *r = RemoteFieldApiResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { + return err + } + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) + return nil +} + +func (r *RemoteFieldApiResponse) String() string { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(r); err == nil { + return value + } + return fmt.Sprintf("%#v", r) } diff --git a/accounting/fieldmapping/client.go b/accounting/fieldmapping/client.go index 4895475..ed2e42d 100644 --- a/accounting/fieldmapping/client.go +++ b/accounting/fieldmapping/client.go @@ -1,58 +1,73 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package fieldmapping import ( context "context" - fmt "fmt" - accounting "github.com/merge-api/merge-go-client/accounting" - core "github.com/merge-api/merge-go-client/core" + accounting "github.com/merge-api/merge-go-client/v2/accounting" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge fields. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). -func (c *Client) FieldMappingsRetrieve(ctx context.Context, request *accounting.FieldMappingsRetrieveRequest) (*accounting.FieldMappingApiInstanceResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/field-mappings" - - queryParams := make(url.Values) - if request.ExcludeRemoteFieldMetadata != nil { - queryParams.Add("exclude_remote_field_metadata", fmt.Sprintf("%v", *request.ExcludeRemoteFieldMetadata)) +func (c *Client) FieldMappingsRetrieve( + ctx context.Context, + request *accounting.FieldMappingsRetrieveRequest, + opts ...option.RequestOption, +) (*accounting.FieldMappingApiInstanceResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/field-mappings" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *accounting.FieldMappingApiInstanceResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -61,30 +76,44 @@ func (c *Client) FieldMappingsRetrieve(ctx context.Context, request *accounting. } // Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. -func (c *Client) FieldMappingsCreate(ctx context.Context, request *accounting.CreateFieldMappingRequest) (*accounting.FieldMappingInstanceResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/field-mappings" - - queryParams := make(url.Values) - if request.ExcludeRemoteFieldMetadata != nil { - queryParams.Add("exclude_remote_field_metadata", fmt.Sprintf("%v", *request.ExcludeRemoteFieldMetadata)) +func (c *Client) FieldMappingsCreate( + ctx context.Context, + request *accounting.CreateFieldMappingRequest, + opts ...option.RequestOption, +) (*accounting.FieldMappingInstanceResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/field-mappings" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *accounting.FieldMappingInstanceResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -93,21 +122,38 @@ func (c *Client) FieldMappingsCreate(ctx context.Context, request *accounting.Cr } // Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. -func (c *Client) FieldMappingsDestroy(ctx context.Context, fieldMappingId string) (*accounting.FieldMappingInstanceResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"accounting/v1/field-mappings/%v", fieldMappingId) +func (c *Client) FieldMappingsDestroy( + ctx context.Context, + fieldMappingId string, + opts ...option.RequestOption, +) (*accounting.FieldMappingInstanceResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/accounting/v1/field-mappings/%v", + fieldMappingId, + ) + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *accounting.FieldMappingInstanceResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodDelete, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodDelete, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -116,22 +162,41 @@ func (c *Client) FieldMappingsDestroy(ctx context.Context, fieldMappingId string } // Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. -func (c *Client) FieldMappingsPartialUpdate(ctx context.Context, fieldMappingId string, request *accounting.PatchedEditFieldMappingRequest) (*accounting.FieldMappingInstanceResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"accounting/v1/field-mappings/%v", fieldMappingId) +func (c *Client) FieldMappingsPartialUpdate( + ctx context.Context, + fieldMappingId string, + request *accounting.PatchedEditFieldMappingRequest, + opts ...option.RequestOption, +) (*accounting.FieldMappingInstanceResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/accounting/v1/field-mappings/%v", + fieldMappingId, + ) + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *accounting.FieldMappingInstanceResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPatch, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPatch, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -140,32 +205,42 @@ func (c *Client) FieldMappingsPartialUpdate(ctx context.Context, fieldMappingId } // Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data is enabled. You can use remote fields to override existing Merge fields or map a new Merge field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). -func (c *Client) RemoteFieldsRetrieve(ctx context.Context, request *accounting.RemoteFieldsRetrieveRequest) (*accounting.RemoteFieldApiResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/remote-fields" - - queryParams := make(url.Values) - if request.CommonModels != nil { - queryParams.Add("common_models", fmt.Sprintf("%v", *request.CommonModels)) - } - if request.IncludeExampleValues != nil { - queryParams.Add("include_example_values", fmt.Sprintf("%v", *request.IncludeExampleValues)) +func (c *Client) RemoteFieldsRetrieve( + ctx context.Context, + request *accounting.RemoteFieldsRetrieveRequest, + opts ...option.RequestOption, +) (*accounting.RemoteFieldApiResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/remote-fields" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *accounting.RemoteFieldApiResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -174,21 +249,34 @@ func (c *Client) RemoteFieldsRetrieve(ctx context.Context, request *accounting.R } // Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields are additional fields appended to the Merge Common Model for all Linked Accounts in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). -func (c *Client) TargetFieldsRetrieve(ctx context.Context) (*accounting.ExternalTargetFieldApiResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/target-fields" +func (c *Client) TargetFieldsRetrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*accounting.ExternalTargetFieldApiResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/target-fields" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *accounting.ExternalTargetFieldApiResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/accounting/forceresync/client.go b/accounting/forceresync/client.go index 0435d3e..25784b0 100644 --- a/accounting/forceresync/client.go +++ b/accounting/forceresync/client.go @@ -1,48 +1,65 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package forceresync import ( context "context" - accounting "github.com/merge-api/merge-go-client/accounting" - core "github.com/merge-api/merge-go-client/core" + accounting "github.com/merge-api/merge-go-client/v2/accounting" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } -// Force re-sync of all models. This is available for all organizations via the dashboard. Force re-sync is also available programmatically via API for monthly, quarterly, and highest sync frequency customers on the Professional or Enterprise plans. Doing so will consume a sync credit for the relevant linked account. -func (c *Client) SyncStatusResyncCreate(ctx context.Context) ([]*accounting.SyncStatus, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/sync-status/resync" +// Force re-sync of all models. This endpoint is available for monthly, quarterly, and highest sync frequency customers on the Professional or Enterprise plans. Doing so will consume a sync credit for the relevant linked account. Force re-syncs can also be triggered manually in the Merge Dashboard and is available for all customers. +func (c *Client) SyncStatusResyncCreate( + ctx context.Context, + opts ...option.RequestOption, +) ([]*accounting.SyncStatus, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/sync-status/resync" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response []*accounting.SyncStatus if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/accounting/general_ledger_transactions.go b/accounting/general_ledger_transactions.go index 6bd9bd3..cc9c181 100644 --- a/accounting/general_ledger_transactions.go +++ b/accounting/general_ledger_transactions.go @@ -1,168 +1,2425 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package accounting import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type GeneralLedgerTransactionsListRequest struct { // If provided, will only return general ledger transactions for this company. - CompanyId *string `json:"-"` + CompanyId *string `json:"-" url:"company_id,omitempty"` // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *GeneralLedgerTransactionsListRequestExpand `json:"-"` + Expand []*GeneralLedgerTransactionsListRequestExpandItem `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // If provided, will only return objects posted after this datetime. - PostedDateAfter *time.Time `json:"-"` + PostedDateAfter *time.Time `json:"-" url:"posted_date_after,omitempty"` // If provided, will only return objects posted before this datetime. - PostedDateBefore *time.Time `json:"-"` + PostedDateBefore *time.Time `json:"-" url:"posted_date_before,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` } type GeneralLedgerTransactionsRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *GeneralLedgerTransactionsRetrieveRequestExpand `json:"-"` + Expand []*GeneralLedgerTransactionsRetrieveRequestExpandItem `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` } -type GeneralLedgerTransactionsListRequestExpand string +type GeneralLedgerTransactionsListRequestExpandItem string const ( - GeneralLedgerTransactionsListRequestExpandAccountingPeriod GeneralLedgerTransactionsListRequestExpand = "accounting_period" - GeneralLedgerTransactionsListRequestExpandCompany GeneralLedgerTransactionsListRequestExpand = "company" - GeneralLedgerTransactionsListRequestExpandCompanyAccountingPeriod GeneralLedgerTransactionsListRequestExpand = "company,accounting_period" - GeneralLedgerTransactionsListRequestExpandGeneralLedgerTransactionLines GeneralLedgerTransactionsListRequestExpand = "general_ledger_transaction_lines" - GeneralLedgerTransactionsListRequestExpandGeneralLedgerTransactionLinesAccountingPeriod GeneralLedgerTransactionsListRequestExpand = "general_ledger_transaction_lines,accounting_period" - GeneralLedgerTransactionsListRequestExpandGeneralLedgerTransactionLinesCompany GeneralLedgerTransactionsListRequestExpand = "general_ledger_transaction_lines,company" - GeneralLedgerTransactionsListRequestExpandGeneralLedgerTransactionLinesCompanyAccountingPeriod GeneralLedgerTransactionsListRequestExpand = "general_ledger_transaction_lines,company,accounting_period" - GeneralLedgerTransactionsListRequestExpandTrackingCategories GeneralLedgerTransactionsListRequestExpand = "tracking_categories" - GeneralLedgerTransactionsListRequestExpandTrackingCategoriesAccountingPeriod GeneralLedgerTransactionsListRequestExpand = "tracking_categories,accounting_period" - GeneralLedgerTransactionsListRequestExpandTrackingCategoriesCompany GeneralLedgerTransactionsListRequestExpand = "tracking_categories,company" - GeneralLedgerTransactionsListRequestExpandTrackingCategoriesCompanyAccountingPeriod GeneralLedgerTransactionsListRequestExpand = "tracking_categories,company,accounting_period" - GeneralLedgerTransactionsListRequestExpandTrackingCategoriesGeneralLedgerTransactionLines GeneralLedgerTransactionsListRequestExpand = "tracking_categories,general_ledger_transaction_lines" - GeneralLedgerTransactionsListRequestExpandTrackingCategoriesGeneralLedgerTransactionLinesAccountingPeriod GeneralLedgerTransactionsListRequestExpand = "tracking_categories,general_ledger_transaction_lines,accounting_period" - GeneralLedgerTransactionsListRequestExpandTrackingCategoriesGeneralLedgerTransactionLinesCompany GeneralLedgerTransactionsListRequestExpand = "tracking_categories,general_ledger_transaction_lines,company" - GeneralLedgerTransactionsListRequestExpandTrackingCategoriesGeneralLedgerTransactionLinesCompanyAccountingPeriod GeneralLedgerTransactionsListRequestExpand = "tracking_categories,general_ledger_transaction_lines,company,accounting_period" + GeneralLedgerTransactionsListRequestExpandItemAccountingPeriod GeneralLedgerTransactionsListRequestExpandItem = "accounting_period" + GeneralLedgerTransactionsListRequestExpandItemCompany GeneralLedgerTransactionsListRequestExpandItem = "company" + GeneralLedgerTransactionsListRequestExpandItemGeneralLedgerTransactionLines GeneralLedgerTransactionsListRequestExpandItem = "general_ledger_transaction_lines" + GeneralLedgerTransactionsListRequestExpandItemTrackingCategories GeneralLedgerTransactionsListRequestExpandItem = "tracking_categories" ) -func NewGeneralLedgerTransactionsListRequestExpandFromString(s string) (GeneralLedgerTransactionsListRequestExpand, error) { +func NewGeneralLedgerTransactionsListRequestExpandItemFromString(s string) (GeneralLedgerTransactionsListRequestExpandItem, error) { switch s { case "accounting_period": - return GeneralLedgerTransactionsListRequestExpandAccountingPeriod, nil + return GeneralLedgerTransactionsListRequestExpandItemAccountingPeriod, nil case "company": - return GeneralLedgerTransactionsListRequestExpandCompany, nil - case "company,accounting_period": - return GeneralLedgerTransactionsListRequestExpandCompanyAccountingPeriod, nil + return GeneralLedgerTransactionsListRequestExpandItemCompany, nil case "general_ledger_transaction_lines": - return GeneralLedgerTransactionsListRequestExpandGeneralLedgerTransactionLines, nil - case "general_ledger_transaction_lines,accounting_period": - return GeneralLedgerTransactionsListRequestExpandGeneralLedgerTransactionLinesAccountingPeriod, nil - case "general_ledger_transaction_lines,company": - return GeneralLedgerTransactionsListRequestExpandGeneralLedgerTransactionLinesCompany, nil - case "general_ledger_transaction_lines,company,accounting_period": - return GeneralLedgerTransactionsListRequestExpandGeneralLedgerTransactionLinesCompanyAccountingPeriod, nil + return GeneralLedgerTransactionsListRequestExpandItemGeneralLedgerTransactionLines, nil case "tracking_categories": - return GeneralLedgerTransactionsListRequestExpandTrackingCategories, nil - case "tracking_categories,accounting_period": - return GeneralLedgerTransactionsListRequestExpandTrackingCategoriesAccountingPeriod, nil - case "tracking_categories,company": - return GeneralLedgerTransactionsListRequestExpandTrackingCategoriesCompany, nil - case "tracking_categories,company,accounting_period": - return GeneralLedgerTransactionsListRequestExpandTrackingCategoriesCompanyAccountingPeriod, nil - case "tracking_categories,general_ledger_transaction_lines": - return GeneralLedgerTransactionsListRequestExpandTrackingCategoriesGeneralLedgerTransactionLines, nil - case "tracking_categories,general_ledger_transaction_lines,accounting_period": - return GeneralLedgerTransactionsListRequestExpandTrackingCategoriesGeneralLedgerTransactionLinesAccountingPeriod, nil - case "tracking_categories,general_ledger_transaction_lines,company": - return GeneralLedgerTransactionsListRequestExpandTrackingCategoriesGeneralLedgerTransactionLinesCompany, nil - case "tracking_categories,general_ledger_transaction_lines,company,accounting_period": - return GeneralLedgerTransactionsListRequestExpandTrackingCategoriesGeneralLedgerTransactionLinesCompanyAccountingPeriod, nil - } - var t GeneralLedgerTransactionsListRequestExpand + return GeneralLedgerTransactionsListRequestExpandItemTrackingCategories, nil + } + var t GeneralLedgerTransactionsListRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (g GeneralLedgerTransactionsListRequestExpand) Ptr() *GeneralLedgerTransactionsListRequestExpand { +func (g GeneralLedgerTransactionsListRequestExpandItem) Ptr() *GeneralLedgerTransactionsListRequestExpandItem { return &g } -type GeneralLedgerTransactionsRetrieveRequestExpand string +type GeneralLedgerTransactionsRetrieveRequestExpandItem string const ( - GeneralLedgerTransactionsRetrieveRequestExpandAccountingPeriod GeneralLedgerTransactionsRetrieveRequestExpand = "accounting_period" - GeneralLedgerTransactionsRetrieveRequestExpandCompany GeneralLedgerTransactionsRetrieveRequestExpand = "company" - GeneralLedgerTransactionsRetrieveRequestExpandCompanyAccountingPeriod GeneralLedgerTransactionsRetrieveRequestExpand = "company,accounting_period" - GeneralLedgerTransactionsRetrieveRequestExpandGeneralLedgerTransactionLines GeneralLedgerTransactionsRetrieveRequestExpand = "general_ledger_transaction_lines" - GeneralLedgerTransactionsRetrieveRequestExpandGeneralLedgerTransactionLinesAccountingPeriod GeneralLedgerTransactionsRetrieveRequestExpand = "general_ledger_transaction_lines,accounting_period" - GeneralLedgerTransactionsRetrieveRequestExpandGeneralLedgerTransactionLinesCompany GeneralLedgerTransactionsRetrieveRequestExpand = "general_ledger_transaction_lines,company" - GeneralLedgerTransactionsRetrieveRequestExpandGeneralLedgerTransactionLinesCompanyAccountingPeriod GeneralLedgerTransactionsRetrieveRequestExpand = "general_ledger_transaction_lines,company,accounting_period" - GeneralLedgerTransactionsRetrieveRequestExpandTrackingCategories GeneralLedgerTransactionsRetrieveRequestExpand = "tracking_categories" - GeneralLedgerTransactionsRetrieveRequestExpandTrackingCategoriesAccountingPeriod GeneralLedgerTransactionsRetrieveRequestExpand = "tracking_categories,accounting_period" - GeneralLedgerTransactionsRetrieveRequestExpandTrackingCategoriesCompany GeneralLedgerTransactionsRetrieveRequestExpand = "tracking_categories,company" - GeneralLedgerTransactionsRetrieveRequestExpandTrackingCategoriesCompanyAccountingPeriod GeneralLedgerTransactionsRetrieveRequestExpand = "tracking_categories,company,accounting_period" - GeneralLedgerTransactionsRetrieveRequestExpandTrackingCategoriesGeneralLedgerTransactionLines GeneralLedgerTransactionsRetrieveRequestExpand = "tracking_categories,general_ledger_transaction_lines" - GeneralLedgerTransactionsRetrieveRequestExpandTrackingCategoriesGeneralLedgerTransactionLinesAccountingPeriod GeneralLedgerTransactionsRetrieveRequestExpand = "tracking_categories,general_ledger_transaction_lines,accounting_period" - GeneralLedgerTransactionsRetrieveRequestExpandTrackingCategoriesGeneralLedgerTransactionLinesCompany GeneralLedgerTransactionsRetrieveRequestExpand = "tracking_categories,general_ledger_transaction_lines,company" - GeneralLedgerTransactionsRetrieveRequestExpandTrackingCategoriesGeneralLedgerTransactionLinesCompanyAccountingPeriod GeneralLedgerTransactionsRetrieveRequestExpand = "tracking_categories,general_ledger_transaction_lines,company,accounting_period" + GeneralLedgerTransactionsRetrieveRequestExpandItemAccountingPeriod GeneralLedgerTransactionsRetrieveRequestExpandItem = "accounting_period" + GeneralLedgerTransactionsRetrieveRequestExpandItemCompany GeneralLedgerTransactionsRetrieveRequestExpandItem = "company" + GeneralLedgerTransactionsRetrieveRequestExpandItemGeneralLedgerTransactionLines GeneralLedgerTransactionsRetrieveRequestExpandItem = "general_ledger_transaction_lines" + GeneralLedgerTransactionsRetrieveRequestExpandItemTrackingCategories GeneralLedgerTransactionsRetrieveRequestExpandItem = "tracking_categories" ) -func NewGeneralLedgerTransactionsRetrieveRequestExpandFromString(s string) (GeneralLedgerTransactionsRetrieveRequestExpand, error) { +func NewGeneralLedgerTransactionsRetrieveRequestExpandItemFromString(s string) (GeneralLedgerTransactionsRetrieveRequestExpandItem, error) { switch s { case "accounting_period": - return GeneralLedgerTransactionsRetrieveRequestExpandAccountingPeriod, nil + return GeneralLedgerTransactionsRetrieveRequestExpandItemAccountingPeriod, nil case "company": - return GeneralLedgerTransactionsRetrieveRequestExpandCompany, nil - case "company,accounting_period": - return GeneralLedgerTransactionsRetrieveRequestExpandCompanyAccountingPeriod, nil + return GeneralLedgerTransactionsRetrieveRequestExpandItemCompany, nil case "general_ledger_transaction_lines": - return GeneralLedgerTransactionsRetrieveRequestExpandGeneralLedgerTransactionLines, nil - case "general_ledger_transaction_lines,accounting_period": - return GeneralLedgerTransactionsRetrieveRequestExpandGeneralLedgerTransactionLinesAccountingPeriod, nil - case "general_ledger_transaction_lines,company": - return GeneralLedgerTransactionsRetrieveRequestExpandGeneralLedgerTransactionLinesCompany, nil - case "general_ledger_transaction_lines,company,accounting_period": - return GeneralLedgerTransactionsRetrieveRequestExpandGeneralLedgerTransactionLinesCompanyAccountingPeriod, nil + return GeneralLedgerTransactionsRetrieveRequestExpandItemGeneralLedgerTransactionLines, nil case "tracking_categories": - return GeneralLedgerTransactionsRetrieveRequestExpandTrackingCategories, nil - case "tracking_categories,accounting_period": - return GeneralLedgerTransactionsRetrieveRequestExpandTrackingCategoriesAccountingPeriod, nil - case "tracking_categories,company": - return GeneralLedgerTransactionsRetrieveRequestExpandTrackingCategoriesCompany, nil - case "tracking_categories,company,accounting_period": - return GeneralLedgerTransactionsRetrieveRequestExpandTrackingCategoriesCompanyAccountingPeriod, nil - case "tracking_categories,general_ledger_transaction_lines": - return GeneralLedgerTransactionsRetrieveRequestExpandTrackingCategoriesGeneralLedgerTransactionLines, nil - case "tracking_categories,general_ledger_transaction_lines,accounting_period": - return GeneralLedgerTransactionsRetrieveRequestExpandTrackingCategoriesGeneralLedgerTransactionLinesAccountingPeriod, nil - case "tracking_categories,general_ledger_transaction_lines,company": - return GeneralLedgerTransactionsRetrieveRequestExpandTrackingCategoriesGeneralLedgerTransactionLinesCompany, nil - case "tracking_categories,general_ledger_transaction_lines,company,accounting_period": - return GeneralLedgerTransactionsRetrieveRequestExpandTrackingCategoriesGeneralLedgerTransactionLinesCompanyAccountingPeriod, nil - } - var t GeneralLedgerTransactionsRetrieveRequestExpand + return GeneralLedgerTransactionsRetrieveRequestExpandItemTrackingCategories, nil + } + var t GeneralLedgerTransactionsRetrieveRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (g GeneralLedgerTransactionsRetrieveRequestExpand) Ptr() *GeneralLedgerTransactionsRetrieveRequestExpand { +func (g GeneralLedgerTransactionsRetrieveRequestExpandItem) Ptr() *GeneralLedgerTransactionsRetrieveRequestExpandItem { return &g } + +// # The GeneralLedgerTransaction Object +// ### Description +// A General Ledger Entry is a record of a financial transaction that is posted to the general ledger, the central repository of a company’s financial data. +// +// The `GeneralLedgerTransaction` object is a singular endpoint to pull all transactions posted to a company’s general ledger. The transaction that generated the `GeneralLedgerTransaction` can be found by referencing the `underlying_transaction_type` and `underlying_transaction_remote_id` fields. +// +// The lines of a `GeneralLedgerTransaction` object will always have equal amounts of debits and credits. +// +// ### Usage Example +// Fetch from the `GET GeneralLedgerTransaction` endpoint and view a general ledger transaction. +type GeneralLedgerTransaction struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The third party remote ID of the underlying transaction. + UnderlyingTransactionRemoteId *string `json:"underlying_transaction_remote_id,omitempty" url:"underlying_transaction_remote_id,omitempty"` + // The type of the underlying transaction. + // + // * `INVOICE` - INVOICE + // * `EXPENSE` - EXPENSE + // * `TRANSACTION` - TRANSACTION + // * `JOURNAL_ENTRY` - JOURNAL_ENTRY + // * `PAYMENT` - PAYMENT + // * `VENDOR_CREDIT` - VENDOR_CREDIT + // * `CREDIT_NOTE` - CREDIT_NOTE + UnderlyingTransactionType *GeneralLedgerTransactionUnderlyingTransactionType `json:"underlying_transaction_type,omitempty" url:"underlying_transaction_type,omitempty"` + // The accounting period that the GeneralLedgerTransaction was generated in. + AccountingPeriod *GeneralLedgerTransactionAccountingPeriod `json:"accounting_period,omitempty" url:"accounting_period,omitempty"` + // The company the GeneralLedgerTransaction belongs to. + Company *GeneralLedgerTransactionCompany `json:"company,omitempty" url:"company,omitempty"` + // When the third party's GeneralLedgerTransaction entry was updated. + RemoteUpdatedAt *time.Time `json:"remote_updated_at,omitempty" url:"remote_updated_at,omitempty"` + // When the third party's GeneralLedgerTransaction entry was created. + RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty" url:"remote_created_at,omitempty"` + TrackingCategories []*GeneralLedgerTransactionTrackingCategoriesItem `json:"tracking_categories,omitempty" url:"tracking_categories,omitempty"` + // The date that the transaction was posted to the general ledger. + PostingDate *time.Time `json:"posting_date,omitempty" url:"posting_date,omitempty"` + // A list of “General Ledger Transaction Applied to Lines” objects. + GeneralLedgerTransactionLines []*GeneralLedgerTransactionGeneralLedgerTransactionLinesItem `json:"general_ledger_transaction_lines,omitempty" url:"general_ledger_transaction_lines,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (g *GeneralLedgerTransaction) GetId() *string { + if g == nil { + return nil + } + return g.Id +} + +func (g *GeneralLedgerTransaction) GetRemoteId() *string { + if g == nil { + return nil + } + return g.RemoteId +} + +func (g *GeneralLedgerTransaction) GetCreatedAt() *time.Time { + if g == nil { + return nil + } + return g.CreatedAt +} + +func (g *GeneralLedgerTransaction) GetModifiedAt() *time.Time { + if g == nil { + return nil + } + return g.ModifiedAt +} + +func (g *GeneralLedgerTransaction) GetUnderlyingTransactionRemoteId() *string { + if g == nil { + return nil + } + return g.UnderlyingTransactionRemoteId +} + +func (g *GeneralLedgerTransaction) GetUnderlyingTransactionType() *GeneralLedgerTransactionUnderlyingTransactionType { + if g == nil { + return nil + } + return g.UnderlyingTransactionType +} + +func (g *GeneralLedgerTransaction) GetAccountingPeriod() *GeneralLedgerTransactionAccountingPeriod { + if g == nil { + return nil + } + return g.AccountingPeriod +} + +func (g *GeneralLedgerTransaction) GetCompany() *GeneralLedgerTransactionCompany { + if g == nil { + return nil + } + return g.Company +} + +func (g *GeneralLedgerTransaction) GetRemoteUpdatedAt() *time.Time { + if g == nil { + return nil + } + return g.RemoteUpdatedAt +} + +func (g *GeneralLedgerTransaction) GetRemoteCreatedAt() *time.Time { + if g == nil { + return nil + } + return g.RemoteCreatedAt +} + +func (g *GeneralLedgerTransaction) GetTrackingCategories() []*GeneralLedgerTransactionTrackingCategoriesItem { + if g == nil { + return nil + } + return g.TrackingCategories +} + +func (g *GeneralLedgerTransaction) GetPostingDate() *time.Time { + if g == nil { + return nil + } + return g.PostingDate +} + +func (g *GeneralLedgerTransaction) GetGeneralLedgerTransactionLines() []*GeneralLedgerTransactionGeneralLedgerTransactionLinesItem { + if g == nil { + return nil + } + return g.GeneralLedgerTransactionLines +} + +func (g *GeneralLedgerTransaction) GetRemoteWasDeleted() *bool { + if g == nil { + return nil + } + return g.RemoteWasDeleted +} + +func (g *GeneralLedgerTransaction) GetFieldMappings() map[string]interface{} { + if g == nil { + return nil + } + return g.FieldMappings +} + +func (g *GeneralLedgerTransaction) GetRemoteData() []*RemoteData { + if g == nil { + return nil + } + return g.RemoteData +} + +func (g *GeneralLedgerTransaction) GetExtraProperties() map[string]interface{} { + return g.extraProperties +} + +func (g *GeneralLedgerTransaction) UnmarshalJSON(data []byte) error { + type embed GeneralLedgerTransaction + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + RemoteUpdatedAt *internal.DateTime `json:"remote_updated_at,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + PostingDate *internal.DateTime `json:"posting_date,omitempty"` + }{ + embed: embed(*g), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *g = GeneralLedgerTransaction(unmarshaler.embed) + g.CreatedAt = unmarshaler.CreatedAt.TimePtr() + g.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + g.RemoteUpdatedAt = unmarshaler.RemoteUpdatedAt.TimePtr() + g.RemoteCreatedAt = unmarshaler.RemoteCreatedAt.TimePtr() + g.PostingDate = unmarshaler.PostingDate.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *g) + if err != nil { + return err + } + g.extraProperties = extraProperties + g.rawJSON = json.RawMessage(data) + return nil +} + +func (g *GeneralLedgerTransaction) MarshalJSON() ([]byte, error) { + type embed GeneralLedgerTransaction + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + RemoteUpdatedAt *internal.DateTime `json:"remote_updated_at,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + PostingDate *internal.DateTime `json:"posting_date,omitempty"` + }{ + embed: embed(*g), + CreatedAt: internal.NewOptionalDateTime(g.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(g.ModifiedAt), + RemoteUpdatedAt: internal.NewOptionalDateTime(g.RemoteUpdatedAt), + RemoteCreatedAt: internal.NewOptionalDateTime(g.RemoteCreatedAt), + PostingDate: internal.NewOptionalDateTime(g.PostingDate), + } + return json.Marshal(marshaler) +} + +func (g *GeneralLedgerTransaction) String() string { + if len(g.rawJSON) > 0 { + if value, err := internal.StringifyJSON(g.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(g); err == nil { + return value + } + return fmt.Sprintf("%#v", g) +} + +// The accounting period that the GeneralLedgerTransaction was generated in. +type GeneralLedgerTransactionAccountingPeriod struct { + String string + AccountingPeriod *AccountingPeriod + + typ string +} + +func (g *GeneralLedgerTransactionAccountingPeriod) GetString() string { + if g == nil { + return "" + } + return g.String +} + +func (g *GeneralLedgerTransactionAccountingPeriod) GetAccountingPeriod() *AccountingPeriod { + if g == nil { + return nil + } + return g.AccountingPeriod +} + +func (g *GeneralLedgerTransactionAccountingPeriod) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + g.typ = "String" + g.String = valueString + return nil + } + valueAccountingPeriod := new(AccountingPeriod) + if err := json.Unmarshal(data, &valueAccountingPeriod); err == nil { + g.typ = "AccountingPeriod" + g.AccountingPeriod = valueAccountingPeriod + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, g) +} + +func (g GeneralLedgerTransactionAccountingPeriod) MarshalJSON() ([]byte, error) { + if g.typ == "String" || g.String != "" { + return json.Marshal(g.String) + } + if g.typ == "AccountingPeriod" || g.AccountingPeriod != nil { + return json.Marshal(g.AccountingPeriod) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", g) +} + +type GeneralLedgerTransactionAccountingPeriodVisitor interface { + VisitString(string) error + VisitAccountingPeriod(*AccountingPeriod) error +} + +func (g *GeneralLedgerTransactionAccountingPeriod) Accept(visitor GeneralLedgerTransactionAccountingPeriodVisitor) error { + if g.typ == "String" || g.String != "" { + return visitor.VisitString(g.String) + } + if g.typ == "AccountingPeriod" || g.AccountingPeriod != nil { + return visitor.VisitAccountingPeriod(g.AccountingPeriod) + } + return fmt.Errorf("type %T does not include a non-empty union type", g) +} + +// The company the GeneralLedgerTransaction belongs to. +type GeneralLedgerTransactionCompany struct { + String string + CompanyInfo *CompanyInfo + + typ string +} + +func (g *GeneralLedgerTransactionCompany) GetString() string { + if g == nil { + return "" + } + return g.String +} + +func (g *GeneralLedgerTransactionCompany) GetCompanyInfo() *CompanyInfo { + if g == nil { + return nil + } + return g.CompanyInfo +} + +func (g *GeneralLedgerTransactionCompany) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + g.typ = "String" + g.String = valueString + return nil + } + valueCompanyInfo := new(CompanyInfo) + if err := json.Unmarshal(data, &valueCompanyInfo); err == nil { + g.typ = "CompanyInfo" + g.CompanyInfo = valueCompanyInfo + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, g) +} + +func (g GeneralLedgerTransactionCompany) MarshalJSON() ([]byte, error) { + if g.typ == "String" || g.String != "" { + return json.Marshal(g.String) + } + if g.typ == "CompanyInfo" || g.CompanyInfo != nil { + return json.Marshal(g.CompanyInfo) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", g) +} + +type GeneralLedgerTransactionCompanyVisitor interface { + VisitString(string) error + VisitCompanyInfo(*CompanyInfo) error +} + +func (g *GeneralLedgerTransactionCompany) Accept(visitor GeneralLedgerTransactionCompanyVisitor) error { + if g.typ == "String" || g.String != "" { + return visitor.VisitString(g.String) + } + if g.typ == "CompanyInfo" || g.CompanyInfo != nil { + return visitor.VisitCompanyInfo(g.CompanyInfo) + } + return fmt.Errorf("type %T does not include a non-empty union type", g) +} + +type GeneralLedgerTransactionGeneralLedgerTransactionLinesItem struct { + String string + GeneralLedgerTransactionLine *GeneralLedgerTransactionLine + + typ string +} + +func (g *GeneralLedgerTransactionGeneralLedgerTransactionLinesItem) GetString() string { + if g == nil { + return "" + } + return g.String +} + +func (g *GeneralLedgerTransactionGeneralLedgerTransactionLinesItem) GetGeneralLedgerTransactionLine() *GeneralLedgerTransactionLine { + if g == nil { + return nil + } + return g.GeneralLedgerTransactionLine +} + +func (g *GeneralLedgerTransactionGeneralLedgerTransactionLinesItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + g.typ = "String" + g.String = valueString + return nil + } + valueGeneralLedgerTransactionLine := new(GeneralLedgerTransactionLine) + if err := json.Unmarshal(data, &valueGeneralLedgerTransactionLine); err == nil { + g.typ = "GeneralLedgerTransactionLine" + g.GeneralLedgerTransactionLine = valueGeneralLedgerTransactionLine + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, g) +} + +func (g GeneralLedgerTransactionGeneralLedgerTransactionLinesItem) MarshalJSON() ([]byte, error) { + if g.typ == "String" || g.String != "" { + return json.Marshal(g.String) + } + if g.typ == "GeneralLedgerTransactionLine" || g.GeneralLedgerTransactionLine != nil { + return json.Marshal(g.GeneralLedgerTransactionLine) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", g) +} + +type GeneralLedgerTransactionGeneralLedgerTransactionLinesItemVisitor interface { + VisitString(string) error + VisitGeneralLedgerTransactionLine(*GeneralLedgerTransactionLine) error +} + +func (g *GeneralLedgerTransactionGeneralLedgerTransactionLinesItem) Accept(visitor GeneralLedgerTransactionGeneralLedgerTransactionLinesItemVisitor) error { + if g.typ == "String" || g.String != "" { + return visitor.VisitString(g.String) + } + if g.typ == "GeneralLedgerTransactionLine" || g.GeneralLedgerTransactionLine != nil { + return visitor.VisitGeneralLedgerTransactionLine(g.GeneralLedgerTransactionLine) + } + return fmt.Errorf("type %T does not include a non-empty union type", g) +} + +// # The GeneralLedgerTransactionLineSerializer Object +// ### Description +// The `GeneralLedgerTransactionLineSerializer` object represents general ledger transaction line item. +// +// ### Usage Example Fetch from the `GET GeneralLedgerTransactionLineSerializer` endpoint and view an +// `GeneralLedgerTransaction` line item. +type GeneralLedgerTransactionLine struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + Account *GeneralLedgerTransactionLineAccount `json:"account,omitempty" url:"account,omitempty"` + // The company the GeneralLedgerTransaction belongs to. + Company *GeneralLedgerTransactionLineCompany `json:"company,omitempty" url:"company,omitempty"` + Employee *GeneralLedgerTransactionLineEmployee `json:"employee,omitempty" url:"employee,omitempty"` + Contact *GeneralLedgerTransactionLineContact `json:"contact,omitempty" url:"contact,omitempty"` + Project *GeneralLedgerTransactionLineProject `json:"project,omitempty" url:"project,omitempty"` + // The base currency of the transaction + // + // * `XUA` - ADB Unit of Account + // * `AFN` - Afghan Afghani + // * `AFA` - Afghan Afghani (1927–2002) + // * `ALL` - Albanian Lek + // * `ALK` - Albanian Lek (1946–1965) + // * `DZD` - Algerian Dinar + // * `ADP` - Andorran Peseta + // * `AOA` - Angolan Kwanza + // * `AOK` - Angolan Kwanza (1977–1991) + // * `AON` - Angolan New Kwanza (1990–2000) + // * `AOR` - Angolan Readjusted Kwanza (1995–1999) + // * `ARA` - Argentine Austral + // * `ARS` - Argentine Peso + // * `ARM` - Argentine Peso (1881–1970) + // * `ARP` - Argentine Peso (1983–1985) + // * `ARL` - Argentine Peso Ley (1970–1983) + // * `AMD` - Armenian Dram + // * `AWG` - Aruban Florin + // * `AUD` - Australian Dollar + // * `ATS` - Austrian Schilling + // * `AZN` - Azerbaijani Manat + // * `AZM` - Azerbaijani Manat (1993–2006) + // * `BSD` - Bahamian Dollar + // * `BHD` - Bahraini Dinar + // * `BDT` - Bangladeshi Taka + // * `BBD` - Barbadian Dollar + // * `BYN` - Belarusian Ruble + // * `BYB` - Belarusian Ruble (1994–1999) + // * `BYR` - Belarusian Ruble (2000–2016) + // * `BEF` - Belgian Franc + // * `BEC` - Belgian Franc (convertible) + // * `BEL` - Belgian Franc (financial) + // * `BZD` - Belize Dollar + // * `BMD` - Bermudan Dollar + // * `BTN` - Bhutanese Ngultrum + // * `BOB` - Bolivian Boliviano + // * `BOL` - Bolivian Boliviano (1863–1963) + // * `BOV` - Bolivian Mvdol + // * `BOP` - Bolivian Peso + // * `BAM` - Bosnia-Herzegovina Convertible Mark + // * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + // * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + // * `BWP` - Botswanan Pula + // * `BRC` - Brazilian Cruzado (1986–1989) + // * `BRZ` - Brazilian Cruzeiro (1942–1967) + // * `BRE` - Brazilian Cruzeiro (1990–1993) + // * `BRR` - Brazilian Cruzeiro (1993–1994) + // * `BRN` - Brazilian New Cruzado (1989–1990) + // * `BRB` - Brazilian New Cruzeiro (1967–1986) + // * `BRL` - Brazilian Real + // * `GBP` - British Pound + // * `BND` - Brunei Dollar + // * `BGL` - Bulgarian Hard Lev + // * `BGN` - Bulgarian Lev + // * `BGO` - Bulgarian Lev (1879–1952) + // * `BGM` - Bulgarian Socialist Lev + // * `BUK` - Burmese Kyat + // * `BIF` - Burundian Franc + // * `XPF` - CFP Franc + // * `KHR` - Cambodian Riel + // * `CAD` - Canadian Dollar + // * `CVE` - Cape Verdean Escudo + // * `KYD` - Cayman Islands Dollar + // * `XAF` - Central African CFA Franc + // * `CLE` - Chilean Escudo + // * `CLP` - Chilean Peso + // * `CLF` - Chilean Unit of Account (UF) + // * `CNX` - Chinese People’s Bank Dollar + // * `CNY` - Chinese Yuan + // * `CNH` - Chinese Yuan (offshore) + // * `COP` - Colombian Peso + // * `COU` - Colombian Real Value Unit + // * `KMF` - Comorian Franc + // * `CDF` - Congolese Franc + // * `CRC` - Costa Rican Colón + // * `HRD` - Croatian Dinar + // * `HRK` - Croatian Kuna + // * `CUC` - Cuban Convertible Peso + // * `CUP` - Cuban Peso + // * `CYP` - Cypriot Pound + // * `CZK` - Czech Koruna + // * `CSK` - Czechoslovak Hard Koruna + // * `DKK` - Danish Krone + // * `DJF` - Djiboutian Franc + // * `DOP` - Dominican Peso + // * `NLG` - Dutch Guilder + // * `XCD` - East Caribbean Dollar + // * `DDM` - East German Mark + // * `ECS` - Ecuadorian Sucre + // * `ECV` - Ecuadorian Unit of Constant Value + // * `EGP` - Egyptian Pound + // * `GQE` - Equatorial Guinean Ekwele + // * `ERN` - Eritrean Nakfa + // * `EEK` - Estonian Kroon + // * `ETB` - Ethiopian Birr + // * `EUR` - Euro + // * `XBA` - European Composite Unit + // * `XEU` - European Currency Unit + // * `XBB` - European Monetary Unit + // * `XBC` - European Unit of Account (XBC) + // * `XBD` - European Unit of Account (XBD) + // * `FKP` - Falkland Islands Pound + // * `FJD` - Fijian Dollar + // * `FIM` - Finnish Markka + // * `FRF` - French Franc + // * `XFO` - French Gold Franc + // * `XFU` - French UIC-Franc + // * `GMD` - Gambian Dalasi + // * `GEK` - Georgian Kupon Larit + // * `GEL` - Georgian Lari + // * `DEM` - German Mark + // * `GHS` - Ghanaian Cedi + // * `GHC` - Ghanaian Cedi (1979–2007) + // * `GIP` - Gibraltar Pound + // * `XAU` - Gold + // * `GRD` - Greek Drachma + // * `GTQ` - Guatemalan Quetzal + // * `GWP` - Guinea-Bissau Peso + // * `GNF` - Guinean Franc + // * `GNS` - Guinean Syli + // * `GYD` - Guyanaese Dollar + // * `HTG` - Haitian Gourde + // * `HNL` - Honduran Lempira + // * `HKD` - Hong Kong Dollar + // * `HUF` - Hungarian Forint + // * `IMP` - IMP + // * `ISK` - Icelandic Króna + // * `ISJ` - Icelandic Króna (1918–1981) + // * `INR` - Indian Rupee + // * `IDR` - Indonesian Rupiah + // * `IRR` - Iranian Rial + // * `IQD` - Iraqi Dinar + // * `IEP` - Irish Pound + // * `ILS` - Israeli New Shekel + // * `ILP` - Israeli Pound + // * `ILR` - Israeli Shekel (1980–1985) + // * `ITL` - Italian Lira + // * `JMD` - Jamaican Dollar + // * `JPY` - Japanese Yen + // * `JOD` - Jordanian Dinar + // * `KZT` - Kazakhstani Tenge + // * `KES` - Kenyan Shilling + // * `KWD` - Kuwaiti Dinar + // * `KGS` - Kyrgystani Som + // * `LAK` - Laotian Kip + // * `LVL` - Latvian Lats + // * `LVR` - Latvian Ruble + // * `LBP` - Lebanese Pound + // * `LSL` - Lesotho Loti + // * `LRD` - Liberian Dollar + // * `LYD` - Libyan Dinar + // * `LTL` - Lithuanian Litas + // * `LTT` - Lithuanian Talonas + // * `LUL` - Luxembourg Financial Franc + // * `LUC` - Luxembourgian Convertible Franc + // * `LUF` - Luxembourgian Franc + // * `MOP` - Macanese Pataca + // * `MKD` - Macedonian Denar + // * `MKN` - Macedonian Denar (1992–1993) + // * `MGA` - Malagasy Ariary + // * `MGF` - Malagasy Franc + // * `MWK` - Malawian Kwacha + // * `MYR` - Malaysian Ringgit + // * `MVR` - Maldivian Rufiyaa + // * `MVP` - Maldivian Rupee (1947–1981) + // * `MLF` - Malian Franc + // * `MTL` - Maltese Lira + // * `MTP` - Maltese Pound + // * `MRU` - Mauritanian Ouguiya + // * `MRO` - Mauritanian Ouguiya (1973–2017) + // * `MUR` - Mauritian Rupee + // * `MXV` - Mexican Investment Unit + // * `MXN` - Mexican Peso + // * `MXP` - Mexican Silver Peso (1861–1992) + // * `MDC` - Moldovan Cupon + // * `MDL` - Moldovan Leu + // * `MCF` - Monegasque Franc + // * `MNT` - Mongolian Tugrik + // * `MAD` - Moroccan Dirham + // * `MAF` - Moroccan Franc + // * `MZE` - Mozambican Escudo + // * `MZN` - Mozambican Metical + // * `MZM` - Mozambican Metical (1980–2006) + // * `MMK` - Myanmar Kyat + // * `NAD` - Namibian Dollar + // * `NPR` - Nepalese Rupee + // * `ANG` - Netherlands Antillean Guilder + // * `TWD` - New Taiwan Dollar + // * `NZD` - New Zealand Dollar + // * `NIO` - Nicaraguan Córdoba + // * `NIC` - Nicaraguan Córdoba (1988–1991) + // * `NGN` - Nigerian Naira + // * `KPW` - North Korean Won + // * `NOK` - Norwegian Krone + // * `OMR` - Omani Rial + // * `PKR` - Pakistani Rupee + // * `XPD` - Palladium + // * `PAB` - Panamanian Balboa + // * `PGK` - Papua New Guinean Kina + // * `PYG` - Paraguayan Guarani + // * `PEI` - Peruvian Inti + // * `PEN` - Peruvian Sol + // * `PES` - Peruvian Sol (1863–1965) + // * `PHP` - Philippine Peso + // * `XPT` - Platinum + // * `PLN` - Polish Zloty + // * `PLZ` - Polish Zloty (1950–1995) + // * `PTE` - Portuguese Escudo + // * `GWE` - Portuguese Guinea Escudo + // * `QAR` - Qatari Rial + // * `XRE` - RINET Funds + // * `RHD` - Rhodesian Dollar + // * `RON` - Romanian Leu + // * `ROL` - Romanian Leu (1952–2006) + // * `RUB` - Russian Ruble + // * `RUR` - Russian Ruble (1991–1998) + // * `RWF` - Rwandan Franc + // * `SVC` - Salvadoran Colón + // * `WST` - Samoan Tala + // * `SAR` - Saudi Riyal + // * `RSD` - Serbian Dinar + // * `CSD` - Serbian Dinar (2002–2006) + // * `SCR` - Seychellois Rupee + // * `SLL` - Sierra Leonean Leone + // * `XAG` - Silver + // * `SGD` - Singapore Dollar + // * `SKK` - Slovak Koruna + // * `SIT` - Slovenian Tolar + // * `SBD` - Solomon Islands Dollar + // * `SOS` - Somali Shilling + // * `ZAR` - South African Rand + // * `ZAL` - South African Rand (financial) + // * `KRH` - South Korean Hwan (1953–1962) + // * `KRW` - South Korean Won + // * `KRO` - South Korean Won (1945–1953) + // * `SSP` - South Sudanese Pound + // * `SUR` - Soviet Rouble + // * `ESP` - Spanish Peseta + // * `ESA` - Spanish Peseta (A account) + // * `ESB` - Spanish Peseta (convertible account) + // * `XDR` - Special Drawing Rights + // * `LKR` - Sri Lankan Rupee + // * `SHP` - St. Helena Pound + // * `XSU` - Sucre + // * `SDD` - Sudanese Dinar (1992–2007) + // * `SDG` - Sudanese Pound + // * `SDP` - Sudanese Pound (1957–1998) + // * `SRD` - Surinamese Dollar + // * `SRG` - Surinamese Guilder + // * `SZL` - Swazi Lilangeni + // * `SEK` - Swedish Krona + // * `CHF` - Swiss Franc + // * `SYP` - Syrian Pound + // * `STN` - São Tomé & Príncipe Dobra + // * `STD` - São Tomé & Príncipe Dobra (1977–2017) + // * `TVD` - TVD + // * `TJR` - Tajikistani Ruble + // * `TJS` - Tajikistani Somoni + // * `TZS` - Tanzanian Shilling + // * `XTS` - Testing Currency Code + // * `THB` - Thai Baht + // * `XXX` - The codes assigned for transactions where no currency is involved + // * `TPE` - Timorese Escudo + // * `TOP` - Tongan Paʻanga + // * `TTD` - Trinidad & Tobago Dollar + // * `TND` - Tunisian Dinar + // * `TRY` - Turkish Lira + // * `TRL` - Turkish Lira (1922–2005) + // * `TMT` - Turkmenistani Manat + // * `TMM` - Turkmenistani Manat (1993–2009) + // * `USD` - US Dollar + // * `USN` - US Dollar (Next day) + // * `USS` - US Dollar (Same day) + // * `UGX` - Ugandan Shilling + // * `UGS` - Ugandan Shilling (1966–1987) + // * `UAH` - Ukrainian Hryvnia + // * `UAK` - Ukrainian Karbovanets + // * `AED` - United Arab Emirates Dirham + // * `UYW` - Uruguayan Nominal Wage Index Unit + // * `UYU` - Uruguayan Peso + // * `UYP` - Uruguayan Peso (1975–1993) + // * `UYI` - Uruguayan Peso (Indexed Units) + // * `UZS` - Uzbekistani Som + // * `VUV` - Vanuatu Vatu + // * `VES` - Venezuelan Bolívar + // * `VEB` - Venezuelan Bolívar (1871–2008) + // * `VEF` - Venezuelan Bolívar (2008–2018) + // * `VND` - Vietnamese Dong + // * `VNN` - Vietnamese Dong (1978–1985) + // * `CHE` - WIR Euro + // * `CHW` - WIR Franc + // * `XOF` - West African CFA Franc + // * `YDD` - Yemeni Dinar + // * `YER` - Yemeni Rial + // * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + // * `YUD` - Yugoslavian Hard Dinar (1966–1990) + // * `YUM` - Yugoslavian New Dinar (1994–2002) + // * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + // * `ZWN` - ZWN + // * `ZRN` - Zairean New Zaire (1993–1998) + // * `ZRZ` - Zairean Zaire (1971–1993) + // * `ZMW` - Zambian Kwacha + // * `ZMK` - Zambian Kwacha (1968–2012) + // * `ZWD` - Zimbabwean Dollar (1980–2008) + // * `ZWR` - Zimbabwean Dollar (2008) + // * `ZWL` - Zimbabwean Dollar (2009) + BaseCurrency *TransactionCurrencyEnum `json:"base_currency,omitempty" url:"base_currency,omitempty"` + // The transaction currency that the transaction is made in. + // + // * `XUA` - ADB Unit of Account + // * `AFN` - Afghan Afghani + // * `AFA` - Afghan Afghani (1927–2002) + // * `ALL` - Albanian Lek + // * `ALK` - Albanian Lek (1946–1965) + // * `DZD` - Algerian Dinar + // * `ADP` - Andorran Peseta + // * `AOA` - Angolan Kwanza + // * `AOK` - Angolan Kwanza (1977–1991) + // * `AON` - Angolan New Kwanza (1990–2000) + // * `AOR` - Angolan Readjusted Kwanza (1995–1999) + // * `ARA` - Argentine Austral + // * `ARS` - Argentine Peso + // * `ARM` - Argentine Peso (1881–1970) + // * `ARP` - Argentine Peso (1983–1985) + // * `ARL` - Argentine Peso Ley (1970–1983) + // * `AMD` - Armenian Dram + // * `AWG` - Aruban Florin + // * `AUD` - Australian Dollar + // * `ATS` - Austrian Schilling + // * `AZN` - Azerbaijani Manat + // * `AZM` - Azerbaijani Manat (1993–2006) + // * `BSD` - Bahamian Dollar + // * `BHD` - Bahraini Dinar + // * `BDT` - Bangladeshi Taka + // * `BBD` - Barbadian Dollar + // * `BYN` - Belarusian Ruble + // * `BYB` - Belarusian Ruble (1994–1999) + // * `BYR` - Belarusian Ruble (2000–2016) + // * `BEF` - Belgian Franc + // * `BEC` - Belgian Franc (convertible) + // * `BEL` - Belgian Franc (financial) + // * `BZD` - Belize Dollar + // * `BMD` - Bermudan Dollar + // * `BTN` - Bhutanese Ngultrum + // * `BOB` - Bolivian Boliviano + // * `BOL` - Bolivian Boliviano (1863–1963) + // * `BOV` - Bolivian Mvdol + // * `BOP` - Bolivian Peso + // * `BAM` - Bosnia-Herzegovina Convertible Mark + // * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + // * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + // * `BWP` - Botswanan Pula + // * `BRC` - Brazilian Cruzado (1986–1989) + // * `BRZ` - Brazilian Cruzeiro (1942–1967) + // * `BRE` - Brazilian Cruzeiro (1990–1993) + // * `BRR` - Brazilian Cruzeiro (1993–1994) + // * `BRN` - Brazilian New Cruzado (1989–1990) + // * `BRB` - Brazilian New Cruzeiro (1967–1986) + // * `BRL` - Brazilian Real + // * `GBP` - British Pound + // * `BND` - Brunei Dollar + // * `BGL` - Bulgarian Hard Lev + // * `BGN` - Bulgarian Lev + // * `BGO` - Bulgarian Lev (1879–1952) + // * `BGM` - Bulgarian Socialist Lev + // * `BUK` - Burmese Kyat + // * `BIF` - Burundian Franc + // * `XPF` - CFP Franc + // * `KHR` - Cambodian Riel + // * `CAD` - Canadian Dollar + // * `CVE` - Cape Verdean Escudo + // * `KYD` - Cayman Islands Dollar + // * `XAF` - Central African CFA Franc + // * `CLE` - Chilean Escudo + // * `CLP` - Chilean Peso + // * `CLF` - Chilean Unit of Account (UF) + // * `CNX` - Chinese People’s Bank Dollar + // * `CNY` - Chinese Yuan + // * `CNH` - Chinese Yuan (offshore) + // * `COP` - Colombian Peso + // * `COU` - Colombian Real Value Unit + // * `KMF` - Comorian Franc + // * `CDF` - Congolese Franc + // * `CRC` - Costa Rican Colón + // * `HRD` - Croatian Dinar + // * `HRK` - Croatian Kuna + // * `CUC` - Cuban Convertible Peso + // * `CUP` - Cuban Peso + // * `CYP` - Cypriot Pound + // * `CZK` - Czech Koruna + // * `CSK` - Czechoslovak Hard Koruna + // * `DKK` - Danish Krone + // * `DJF` - Djiboutian Franc + // * `DOP` - Dominican Peso + // * `NLG` - Dutch Guilder + // * `XCD` - East Caribbean Dollar + // * `DDM` - East German Mark + // * `ECS` - Ecuadorian Sucre + // * `ECV` - Ecuadorian Unit of Constant Value + // * `EGP` - Egyptian Pound + // * `GQE` - Equatorial Guinean Ekwele + // * `ERN` - Eritrean Nakfa + // * `EEK` - Estonian Kroon + // * `ETB` - Ethiopian Birr + // * `EUR` - Euro + // * `XBA` - European Composite Unit + // * `XEU` - European Currency Unit + // * `XBB` - European Monetary Unit + // * `XBC` - European Unit of Account (XBC) + // * `XBD` - European Unit of Account (XBD) + // * `FKP` - Falkland Islands Pound + // * `FJD` - Fijian Dollar + // * `FIM` - Finnish Markka + // * `FRF` - French Franc + // * `XFO` - French Gold Franc + // * `XFU` - French UIC-Franc + // * `GMD` - Gambian Dalasi + // * `GEK` - Georgian Kupon Larit + // * `GEL` - Georgian Lari + // * `DEM` - German Mark + // * `GHS` - Ghanaian Cedi + // * `GHC` - Ghanaian Cedi (1979–2007) + // * `GIP` - Gibraltar Pound + // * `XAU` - Gold + // * `GRD` - Greek Drachma + // * `GTQ` - Guatemalan Quetzal + // * `GWP` - Guinea-Bissau Peso + // * `GNF` - Guinean Franc + // * `GNS` - Guinean Syli + // * `GYD` - Guyanaese Dollar + // * `HTG` - Haitian Gourde + // * `HNL` - Honduran Lempira + // * `HKD` - Hong Kong Dollar + // * `HUF` - Hungarian Forint + // * `IMP` - IMP + // * `ISK` - Icelandic Króna + // * `ISJ` - Icelandic Króna (1918–1981) + // * `INR` - Indian Rupee + // * `IDR` - Indonesian Rupiah + // * `IRR` - Iranian Rial + // * `IQD` - Iraqi Dinar + // * `IEP` - Irish Pound + // * `ILS` - Israeli New Shekel + // * `ILP` - Israeli Pound + // * `ILR` - Israeli Shekel (1980–1985) + // * `ITL` - Italian Lira + // * `JMD` - Jamaican Dollar + // * `JPY` - Japanese Yen + // * `JOD` - Jordanian Dinar + // * `KZT` - Kazakhstani Tenge + // * `KES` - Kenyan Shilling + // * `KWD` - Kuwaiti Dinar + // * `KGS` - Kyrgystani Som + // * `LAK` - Laotian Kip + // * `LVL` - Latvian Lats + // * `LVR` - Latvian Ruble + // * `LBP` - Lebanese Pound + // * `LSL` - Lesotho Loti + // * `LRD` - Liberian Dollar + // * `LYD` - Libyan Dinar + // * `LTL` - Lithuanian Litas + // * `LTT` - Lithuanian Talonas + // * `LUL` - Luxembourg Financial Franc + // * `LUC` - Luxembourgian Convertible Franc + // * `LUF` - Luxembourgian Franc + // * `MOP` - Macanese Pataca + // * `MKD` - Macedonian Denar + // * `MKN` - Macedonian Denar (1992–1993) + // * `MGA` - Malagasy Ariary + // * `MGF` - Malagasy Franc + // * `MWK` - Malawian Kwacha + // * `MYR` - Malaysian Ringgit + // * `MVR` - Maldivian Rufiyaa + // * `MVP` - Maldivian Rupee (1947–1981) + // * `MLF` - Malian Franc + // * `MTL` - Maltese Lira + // * `MTP` - Maltese Pound + // * `MRU` - Mauritanian Ouguiya + // * `MRO` - Mauritanian Ouguiya (1973–2017) + // * `MUR` - Mauritian Rupee + // * `MXV` - Mexican Investment Unit + // * `MXN` - Mexican Peso + // * `MXP` - Mexican Silver Peso (1861–1992) + // * `MDC` - Moldovan Cupon + // * `MDL` - Moldovan Leu + // * `MCF` - Monegasque Franc + // * `MNT` - Mongolian Tugrik + // * `MAD` - Moroccan Dirham + // * `MAF` - Moroccan Franc + // * `MZE` - Mozambican Escudo + // * `MZN` - Mozambican Metical + // * `MZM` - Mozambican Metical (1980–2006) + // * `MMK` - Myanmar Kyat + // * `NAD` - Namibian Dollar + // * `NPR` - Nepalese Rupee + // * `ANG` - Netherlands Antillean Guilder + // * `TWD` - New Taiwan Dollar + // * `NZD` - New Zealand Dollar + // * `NIO` - Nicaraguan Córdoba + // * `NIC` - Nicaraguan Córdoba (1988–1991) + // * `NGN` - Nigerian Naira + // * `KPW` - North Korean Won + // * `NOK` - Norwegian Krone + // * `OMR` - Omani Rial + // * `PKR` - Pakistani Rupee + // * `XPD` - Palladium + // * `PAB` - Panamanian Balboa + // * `PGK` - Papua New Guinean Kina + // * `PYG` - Paraguayan Guarani + // * `PEI` - Peruvian Inti + // * `PEN` - Peruvian Sol + // * `PES` - Peruvian Sol (1863–1965) + // * `PHP` - Philippine Peso + // * `XPT` - Platinum + // * `PLN` - Polish Zloty + // * `PLZ` - Polish Zloty (1950–1995) + // * `PTE` - Portuguese Escudo + // * `GWE` - Portuguese Guinea Escudo + // * `QAR` - Qatari Rial + // * `XRE` - RINET Funds + // * `RHD` - Rhodesian Dollar + // * `RON` - Romanian Leu + // * `ROL` - Romanian Leu (1952–2006) + // * `RUB` - Russian Ruble + // * `RUR` - Russian Ruble (1991–1998) + // * `RWF` - Rwandan Franc + // * `SVC` - Salvadoran Colón + // * `WST` - Samoan Tala + // * `SAR` - Saudi Riyal + // * `RSD` - Serbian Dinar + // * `CSD` - Serbian Dinar (2002–2006) + // * `SCR` - Seychellois Rupee + // * `SLL` - Sierra Leonean Leone + // * `XAG` - Silver + // * `SGD` - Singapore Dollar + // * `SKK` - Slovak Koruna + // * `SIT` - Slovenian Tolar + // * `SBD` - Solomon Islands Dollar + // * `SOS` - Somali Shilling + // * `ZAR` - South African Rand + // * `ZAL` - South African Rand (financial) + // * `KRH` - South Korean Hwan (1953–1962) + // * `KRW` - South Korean Won + // * `KRO` - South Korean Won (1945–1953) + // * `SSP` - South Sudanese Pound + // * `SUR` - Soviet Rouble + // * `ESP` - Spanish Peseta + // * `ESA` - Spanish Peseta (A account) + // * `ESB` - Spanish Peseta (convertible account) + // * `XDR` - Special Drawing Rights + // * `LKR` - Sri Lankan Rupee + // * `SHP` - St. Helena Pound + // * `XSU` - Sucre + // * `SDD` - Sudanese Dinar (1992–2007) + // * `SDG` - Sudanese Pound + // * `SDP` - Sudanese Pound (1957–1998) + // * `SRD` - Surinamese Dollar + // * `SRG` - Surinamese Guilder + // * `SZL` - Swazi Lilangeni + // * `SEK` - Swedish Krona + // * `CHF` - Swiss Franc + // * `SYP` - Syrian Pound + // * `STN` - São Tomé & Príncipe Dobra + // * `STD` - São Tomé & Príncipe Dobra (1977–2017) + // * `TVD` - TVD + // * `TJR` - Tajikistani Ruble + // * `TJS` - Tajikistani Somoni + // * `TZS` - Tanzanian Shilling + // * `XTS` - Testing Currency Code + // * `THB` - Thai Baht + // * `XXX` - The codes assigned for transactions where no currency is involved + // * `TPE` - Timorese Escudo + // * `TOP` - Tongan Paʻanga + // * `TTD` - Trinidad & Tobago Dollar + // * `TND` - Tunisian Dinar + // * `TRY` - Turkish Lira + // * `TRL` - Turkish Lira (1922–2005) + // * `TMT` - Turkmenistani Manat + // * `TMM` - Turkmenistani Manat (1993–2009) + // * `USD` - US Dollar + // * `USN` - US Dollar (Next day) + // * `USS` - US Dollar (Same day) + // * `UGX` - Ugandan Shilling + // * `UGS` - Ugandan Shilling (1966–1987) + // * `UAH` - Ukrainian Hryvnia + // * `UAK` - Ukrainian Karbovanets + // * `AED` - United Arab Emirates Dirham + // * `UYW` - Uruguayan Nominal Wage Index Unit + // * `UYU` - Uruguayan Peso + // * `UYP` - Uruguayan Peso (1975–1993) + // * `UYI` - Uruguayan Peso (Indexed Units) + // * `UZS` - Uzbekistani Som + // * `VUV` - Vanuatu Vatu + // * `VES` - Venezuelan Bolívar + // * `VEB` - Venezuelan Bolívar (1871–2008) + // * `VEF` - Venezuelan Bolívar (2008–2018) + // * `VND` - Vietnamese Dong + // * `VNN` - Vietnamese Dong (1978–1985) + // * `CHE` - WIR Euro + // * `CHW` - WIR Franc + // * `XOF` - West African CFA Franc + // * `YDD` - Yemeni Dinar + // * `YER` - Yemeni Rial + // * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + // * `YUD` - Yugoslavian Hard Dinar (1966–1990) + // * `YUM` - Yugoslavian New Dinar (1994–2002) + // * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + // * `ZWN` - ZWN + // * `ZRN` - Zairean New Zaire (1993–1998) + // * `ZRZ` - Zairean Zaire (1971–1993) + // * `ZMW` - Zambian Kwacha + // * `ZMK` - Zambian Kwacha (1968–2012) + // * `ZWD` - Zimbabwean Dollar (1980–2008) + // * `ZWR` - Zimbabwean Dollar (2008) + // * `ZWL` - Zimbabwean Dollar (2009) + TransactionCurrency *GeneralLedgerTransactionLineTransactionCurrency `json:"transaction_currency,omitempty" url:"transaction_currency,omitempty"` + // The exchange rate between the base currency and the transaction currency. + ExchangeRate *string `json:"exchange_rate,omitempty" url:"exchange_rate,omitempty"` + // A description of the line item. + Description *string `json:"description,omitempty" url:"description,omitempty"` + TrackingCategories []*GeneralLedgerTransactionLineTrackingCategoriesItem `json:"tracking_categories,omitempty" url:"tracking_categories,omitempty"` + DebitAmount string `json:"debit_amount" url:"debit_amount"` + CreditAmount string `json:"credit_amount" url:"credit_amount"` + Item *GeneralLedgerTransactionLineItem `json:"item,omitempty" url:"item,omitempty"` + ForeignDebitAmount string `json:"foreign_debit_amount" url:"foreign_debit_amount"` + ForeignCreditAmount string `json:"foreign_credit_amount" url:"foreign_credit_amount"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (g *GeneralLedgerTransactionLine) GetId() *string { + if g == nil { + return nil + } + return g.Id +} + +func (g *GeneralLedgerTransactionLine) GetRemoteId() *string { + if g == nil { + return nil + } + return g.RemoteId +} + +func (g *GeneralLedgerTransactionLine) GetCreatedAt() *time.Time { + if g == nil { + return nil + } + return g.CreatedAt +} + +func (g *GeneralLedgerTransactionLine) GetModifiedAt() *time.Time { + if g == nil { + return nil + } + return g.ModifiedAt +} + +func (g *GeneralLedgerTransactionLine) GetAccount() *GeneralLedgerTransactionLineAccount { + if g == nil { + return nil + } + return g.Account +} + +func (g *GeneralLedgerTransactionLine) GetCompany() *GeneralLedgerTransactionLineCompany { + if g == nil { + return nil + } + return g.Company +} + +func (g *GeneralLedgerTransactionLine) GetEmployee() *GeneralLedgerTransactionLineEmployee { + if g == nil { + return nil + } + return g.Employee +} + +func (g *GeneralLedgerTransactionLine) GetContact() *GeneralLedgerTransactionLineContact { + if g == nil { + return nil + } + return g.Contact +} + +func (g *GeneralLedgerTransactionLine) GetProject() *GeneralLedgerTransactionLineProject { + if g == nil { + return nil + } + return g.Project +} + +func (g *GeneralLedgerTransactionLine) GetBaseCurrency() *TransactionCurrencyEnum { + if g == nil { + return nil + } + return g.BaseCurrency +} + +func (g *GeneralLedgerTransactionLine) GetTransactionCurrency() *GeneralLedgerTransactionLineTransactionCurrency { + if g == nil { + return nil + } + return g.TransactionCurrency +} + +func (g *GeneralLedgerTransactionLine) GetExchangeRate() *string { + if g == nil { + return nil + } + return g.ExchangeRate +} + +func (g *GeneralLedgerTransactionLine) GetDescription() *string { + if g == nil { + return nil + } + return g.Description +} + +func (g *GeneralLedgerTransactionLine) GetTrackingCategories() []*GeneralLedgerTransactionLineTrackingCategoriesItem { + if g == nil { + return nil + } + return g.TrackingCategories +} + +func (g *GeneralLedgerTransactionLine) GetDebitAmount() string { + if g == nil { + return "" + } + return g.DebitAmount +} + +func (g *GeneralLedgerTransactionLine) GetCreditAmount() string { + if g == nil { + return "" + } + return g.CreditAmount +} + +func (g *GeneralLedgerTransactionLine) GetItem() *GeneralLedgerTransactionLineItem { + if g == nil { + return nil + } + return g.Item +} + +func (g *GeneralLedgerTransactionLine) GetForeignDebitAmount() string { + if g == nil { + return "" + } + return g.ForeignDebitAmount +} + +func (g *GeneralLedgerTransactionLine) GetForeignCreditAmount() string { + if g == nil { + return "" + } + return g.ForeignCreditAmount +} + +func (g *GeneralLedgerTransactionLine) GetRemoteWasDeleted() *bool { + if g == nil { + return nil + } + return g.RemoteWasDeleted +} + +func (g *GeneralLedgerTransactionLine) GetFieldMappings() map[string]interface{} { + if g == nil { + return nil + } + return g.FieldMappings +} + +func (g *GeneralLedgerTransactionLine) GetExtraProperties() map[string]interface{} { + return g.extraProperties +} + +func (g *GeneralLedgerTransactionLine) UnmarshalJSON(data []byte) error { + type embed GeneralLedgerTransactionLine + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*g), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *g = GeneralLedgerTransactionLine(unmarshaler.embed) + g.CreatedAt = unmarshaler.CreatedAt.TimePtr() + g.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *g) + if err != nil { + return err + } + g.extraProperties = extraProperties + g.rawJSON = json.RawMessage(data) + return nil +} + +func (g *GeneralLedgerTransactionLine) MarshalJSON() ([]byte, error) { + type embed GeneralLedgerTransactionLine + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*g), + CreatedAt: internal.NewOptionalDateTime(g.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(g.ModifiedAt), + } + return json.Marshal(marshaler) +} + +func (g *GeneralLedgerTransactionLine) String() string { + if len(g.rawJSON) > 0 { + if value, err := internal.StringifyJSON(g.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(g); err == nil { + return value + } + return fmt.Sprintf("%#v", g) +} + +type GeneralLedgerTransactionLineAccount struct { + String string + Account *Account + + typ string +} + +func (g *GeneralLedgerTransactionLineAccount) GetString() string { + if g == nil { + return "" + } + return g.String +} + +func (g *GeneralLedgerTransactionLineAccount) GetAccount() *Account { + if g == nil { + return nil + } + return g.Account +} + +func (g *GeneralLedgerTransactionLineAccount) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + g.typ = "String" + g.String = valueString + return nil + } + valueAccount := new(Account) + if err := json.Unmarshal(data, &valueAccount); err == nil { + g.typ = "Account" + g.Account = valueAccount + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, g) +} + +func (g GeneralLedgerTransactionLineAccount) MarshalJSON() ([]byte, error) { + if g.typ == "String" || g.String != "" { + return json.Marshal(g.String) + } + if g.typ == "Account" || g.Account != nil { + return json.Marshal(g.Account) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", g) +} + +type GeneralLedgerTransactionLineAccountVisitor interface { + VisitString(string) error + VisitAccount(*Account) error +} + +func (g *GeneralLedgerTransactionLineAccount) Accept(visitor GeneralLedgerTransactionLineAccountVisitor) error { + if g.typ == "String" || g.String != "" { + return visitor.VisitString(g.String) + } + if g.typ == "Account" || g.Account != nil { + return visitor.VisitAccount(g.Account) + } + return fmt.Errorf("type %T does not include a non-empty union type", g) +} + +// The company the GeneralLedgerTransaction belongs to. +type GeneralLedgerTransactionLineCompany struct { + String string + CompanyInfo *CompanyInfo + + typ string +} + +func (g *GeneralLedgerTransactionLineCompany) GetString() string { + if g == nil { + return "" + } + return g.String +} + +func (g *GeneralLedgerTransactionLineCompany) GetCompanyInfo() *CompanyInfo { + if g == nil { + return nil + } + return g.CompanyInfo +} + +func (g *GeneralLedgerTransactionLineCompany) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + g.typ = "String" + g.String = valueString + return nil + } + valueCompanyInfo := new(CompanyInfo) + if err := json.Unmarshal(data, &valueCompanyInfo); err == nil { + g.typ = "CompanyInfo" + g.CompanyInfo = valueCompanyInfo + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, g) +} + +func (g GeneralLedgerTransactionLineCompany) MarshalJSON() ([]byte, error) { + if g.typ == "String" || g.String != "" { + return json.Marshal(g.String) + } + if g.typ == "CompanyInfo" || g.CompanyInfo != nil { + return json.Marshal(g.CompanyInfo) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", g) +} + +type GeneralLedgerTransactionLineCompanyVisitor interface { + VisitString(string) error + VisitCompanyInfo(*CompanyInfo) error +} + +func (g *GeneralLedgerTransactionLineCompany) Accept(visitor GeneralLedgerTransactionLineCompanyVisitor) error { + if g.typ == "String" || g.String != "" { + return visitor.VisitString(g.String) + } + if g.typ == "CompanyInfo" || g.CompanyInfo != nil { + return visitor.VisitCompanyInfo(g.CompanyInfo) + } + return fmt.Errorf("type %T does not include a non-empty union type", g) +} + +type GeneralLedgerTransactionLineContact struct { + String string + Contact *Contact + + typ string +} + +func (g *GeneralLedgerTransactionLineContact) GetString() string { + if g == nil { + return "" + } + return g.String +} + +func (g *GeneralLedgerTransactionLineContact) GetContact() *Contact { + if g == nil { + return nil + } + return g.Contact +} + +func (g *GeneralLedgerTransactionLineContact) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + g.typ = "String" + g.String = valueString + return nil + } + valueContact := new(Contact) + if err := json.Unmarshal(data, &valueContact); err == nil { + g.typ = "Contact" + g.Contact = valueContact + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, g) +} + +func (g GeneralLedgerTransactionLineContact) MarshalJSON() ([]byte, error) { + if g.typ == "String" || g.String != "" { + return json.Marshal(g.String) + } + if g.typ == "Contact" || g.Contact != nil { + return json.Marshal(g.Contact) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", g) +} + +type GeneralLedgerTransactionLineContactVisitor interface { + VisitString(string) error + VisitContact(*Contact) error +} + +func (g *GeneralLedgerTransactionLineContact) Accept(visitor GeneralLedgerTransactionLineContactVisitor) error { + if g.typ == "String" || g.String != "" { + return visitor.VisitString(g.String) + } + if g.typ == "Contact" || g.Contact != nil { + return visitor.VisitContact(g.Contact) + } + return fmt.Errorf("type %T does not include a non-empty union type", g) +} + +type GeneralLedgerTransactionLineEmployee struct { + String string + Employee *Employee + + typ string +} + +func (g *GeneralLedgerTransactionLineEmployee) GetString() string { + if g == nil { + return "" + } + return g.String +} + +func (g *GeneralLedgerTransactionLineEmployee) GetEmployee() *Employee { + if g == nil { + return nil + } + return g.Employee +} + +func (g *GeneralLedgerTransactionLineEmployee) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + g.typ = "String" + g.String = valueString + return nil + } + valueEmployee := new(Employee) + if err := json.Unmarshal(data, &valueEmployee); err == nil { + g.typ = "Employee" + g.Employee = valueEmployee + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, g) +} + +func (g GeneralLedgerTransactionLineEmployee) MarshalJSON() ([]byte, error) { + if g.typ == "String" || g.String != "" { + return json.Marshal(g.String) + } + if g.typ == "Employee" || g.Employee != nil { + return json.Marshal(g.Employee) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", g) +} + +type GeneralLedgerTransactionLineEmployeeVisitor interface { + VisitString(string) error + VisitEmployee(*Employee) error +} + +func (g *GeneralLedgerTransactionLineEmployee) Accept(visitor GeneralLedgerTransactionLineEmployeeVisitor) error { + if g.typ == "String" || g.String != "" { + return visitor.VisitString(g.String) + } + if g.typ == "Employee" || g.Employee != nil { + return visitor.VisitEmployee(g.Employee) + } + return fmt.Errorf("type %T does not include a non-empty union type", g) +} + +type GeneralLedgerTransactionLineItem struct { + String string + Item *Item + + typ string +} + +func (g *GeneralLedgerTransactionLineItem) GetString() string { + if g == nil { + return "" + } + return g.String +} + +func (g *GeneralLedgerTransactionLineItem) GetItem() *Item { + if g == nil { + return nil + } + return g.Item +} + +func (g *GeneralLedgerTransactionLineItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + g.typ = "String" + g.String = valueString + return nil + } + valueItem := new(Item) + if err := json.Unmarshal(data, &valueItem); err == nil { + g.typ = "Item" + g.Item = valueItem + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, g) +} + +func (g GeneralLedgerTransactionLineItem) MarshalJSON() ([]byte, error) { + if g.typ == "String" || g.String != "" { + return json.Marshal(g.String) + } + if g.typ == "Item" || g.Item != nil { + return json.Marshal(g.Item) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", g) +} + +type GeneralLedgerTransactionLineItemVisitor interface { + VisitString(string) error + VisitItem(*Item) error +} + +func (g *GeneralLedgerTransactionLineItem) Accept(visitor GeneralLedgerTransactionLineItemVisitor) error { + if g.typ == "String" || g.String != "" { + return visitor.VisitString(g.String) + } + if g.typ == "Item" || g.Item != nil { + return visitor.VisitItem(g.Item) + } + return fmt.Errorf("type %T does not include a non-empty union type", g) +} + +type GeneralLedgerTransactionLineProject struct { + String string + Project *Project + + typ string +} + +func (g *GeneralLedgerTransactionLineProject) GetString() string { + if g == nil { + return "" + } + return g.String +} + +func (g *GeneralLedgerTransactionLineProject) GetProject() *Project { + if g == nil { + return nil + } + return g.Project +} + +func (g *GeneralLedgerTransactionLineProject) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + g.typ = "String" + g.String = valueString + return nil + } + valueProject := new(Project) + if err := json.Unmarshal(data, &valueProject); err == nil { + g.typ = "Project" + g.Project = valueProject + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, g) +} + +func (g GeneralLedgerTransactionLineProject) MarshalJSON() ([]byte, error) { + if g.typ == "String" || g.String != "" { + return json.Marshal(g.String) + } + if g.typ == "Project" || g.Project != nil { + return json.Marshal(g.Project) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", g) +} + +type GeneralLedgerTransactionLineProjectVisitor interface { + VisitString(string) error + VisitProject(*Project) error +} + +func (g *GeneralLedgerTransactionLineProject) Accept(visitor GeneralLedgerTransactionLineProjectVisitor) error { + if g.typ == "String" || g.String != "" { + return visitor.VisitString(g.String) + } + if g.typ == "Project" || g.Project != nil { + return visitor.VisitProject(g.Project) + } + return fmt.Errorf("type %T does not include a non-empty union type", g) +} + +type GeneralLedgerTransactionLineTrackingCategoriesItem struct { + String string + TrackingCategory *TrackingCategory + + typ string +} + +func (g *GeneralLedgerTransactionLineTrackingCategoriesItem) GetString() string { + if g == nil { + return "" + } + return g.String +} + +func (g *GeneralLedgerTransactionLineTrackingCategoriesItem) GetTrackingCategory() *TrackingCategory { + if g == nil { + return nil + } + return g.TrackingCategory +} + +func (g *GeneralLedgerTransactionLineTrackingCategoriesItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + g.typ = "String" + g.String = valueString + return nil + } + valueTrackingCategory := new(TrackingCategory) + if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { + g.typ = "TrackingCategory" + g.TrackingCategory = valueTrackingCategory + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, g) +} + +func (g GeneralLedgerTransactionLineTrackingCategoriesItem) MarshalJSON() ([]byte, error) { + if g.typ == "String" || g.String != "" { + return json.Marshal(g.String) + } + if g.typ == "TrackingCategory" || g.TrackingCategory != nil { + return json.Marshal(g.TrackingCategory) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", g) +} + +type GeneralLedgerTransactionLineTrackingCategoriesItemVisitor interface { + VisitString(string) error + VisitTrackingCategory(*TrackingCategory) error +} + +func (g *GeneralLedgerTransactionLineTrackingCategoriesItem) Accept(visitor GeneralLedgerTransactionLineTrackingCategoriesItemVisitor) error { + if g.typ == "String" || g.String != "" { + return visitor.VisitString(g.String) + } + if g.typ == "TrackingCategory" || g.TrackingCategory != nil { + return visitor.VisitTrackingCategory(g.TrackingCategory) + } + return fmt.Errorf("type %T does not include a non-empty union type", g) +} + +// The transaction currency that the transaction is made in. +// +// * `XUA` - ADB Unit of Account +// * `AFN` - Afghan Afghani +// * `AFA` - Afghan Afghani (1927–2002) +// * `ALL` - Albanian Lek +// * `ALK` - Albanian Lek (1946–1965) +// * `DZD` - Algerian Dinar +// * `ADP` - Andorran Peseta +// * `AOA` - Angolan Kwanza +// * `AOK` - Angolan Kwanza (1977–1991) +// * `AON` - Angolan New Kwanza (1990–2000) +// * `AOR` - Angolan Readjusted Kwanza (1995–1999) +// * `ARA` - Argentine Austral +// * `ARS` - Argentine Peso +// * `ARM` - Argentine Peso (1881–1970) +// * `ARP` - Argentine Peso (1983–1985) +// * `ARL` - Argentine Peso Ley (1970–1983) +// * `AMD` - Armenian Dram +// * `AWG` - Aruban Florin +// * `AUD` - Australian Dollar +// * `ATS` - Austrian Schilling +// * `AZN` - Azerbaijani Manat +// * `AZM` - Azerbaijani Manat (1993–2006) +// * `BSD` - Bahamian Dollar +// * `BHD` - Bahraini Dinar +// * `BDT` - Bangladeshi Taka +// * `BBD` - Barbadian Dollar +// * `BYN` - Belarusian Ruble +// * `BYB` - Belarusian Ruble (1994–1999) +// * `BYR` - Belarusian Ruble (2000–2016) +// * `BEF` - Belgian Franc +// * `BEC` - Belgian Franc (convertible) +// * `BEL` - Belgian Franc (financial) +// * `BZD` - Belize Dollar +// * `BMD` - Bermudan Dollar +// * `BTN` - Bhutanese Ngultrum +// * `BOB` - Bolivian Boliviano +// * `BOL` - Bolivian Boliviano (1863–1963) +// * `BOV` - Bolivian Mvdol +// * `BOP` - Bolivian Peso +// * `BAM` - Bosnia-Herzegovina Convertible Mark +// * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) +// * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) +// * `BWP` - Botswanan Pula +// * `BRC` - Brazilian Cruzado (1986–1989) +// * `BRZ` - Brazilian Cruzeiro (1942–1967) +// * `BRE` - Brazilian Cruzeiro (1990–1993) +// * `BRR` - Brazilian Cruzeiro (1993–1994) +// * `BRN` - Brazilian New Cruzado (1989–1990) +// * `BRB` - Brazilian New Cruzeiro (1967–1986) +// * `BRL` - Brazilian Real +// * `GBP` - British Pound +// * `BND` - Brunei Dollar +// * `BGL` - Bulgarian Hard Lev +// * `BGN` - Bulgarian Lev +// * `BGO` - Bulgarian Lev (1879–1952) +// * `BGM` - Bulgarian Socialist Lev +// * `BUK` - Burmese Kyat +// * `BIF` - Burundian Franc +// * `XPF` - CFP Franc +// * `KHR` - Cambodian Riel +// * `CAD` - Canadian Dollar +// * `CVE` - Cape Verdean Escudo +// * `KYD` - Cayman Islands Dollar +// * `XAF` - Central African CFA Franc +// * `CLE` - Chilean Escudo +// * `CLP` - Chilean Peso +// * `CLF` - Chilean Unit of Account (UF) +// * `CNX` - Chinese People’s Bank Dollar +// * `CNY` - Chinese Yuan +// * `CNH` - Chinese Yuan (offshore) +// * `COP` - Colombian Peso +// * `COU` - Colombian Real Value Unit +// * `KMF` - Comorian Franc +// * `CDF` - Congolese Franc +// * `CRC` - Costa Rican Colón +// * `HRD` - Croatian Dinar +// * `HRK` - Croatian Kuna +// * `CUC` - Cuban Convertible Peso +// * `CUP` - Cuban Peso +// * `CYP` - Cypriot Pound +// * `CZK` - Czech Koruna +// * `CSK` - Czechoslovak Hard Koruna +// * `DKK` - Danish Krone +// * `DJF` - Djiboutian Franc +// * `DOP` - Dominican Peso +// * `NLG` - Dutch Guilder +// * `XCD` - East Caribbean Dollar +// * `DDM` - East German Mark +// * `ECS` - Ecuadorian Sucre +// * `ECV` - Ecuadorian Unit of Constant Value +// * `EGP` - Egyptian Pound +// * `GQE` - Equatorial Guinean Ekwele +// * `ERN` - Eritrean Nakfa +// * `EEK` - Estonian Kroon +// * `ETB` - Ethiopian Birr +// * `EUR` - Euro +// * `XBA` - European Composite Unit +// * `XEU` - European Currency Unit +// * `XBB` - European Monetary Unit +// * `XBC` - European Unit of Account (XBC) +// * `XBD` - European Unit of Account (XBD) +// * `FKP` - Falkland Islands Pound +// * `FJD` - Fijian Dollar +// * `FIM` - Finnish Markka +// * `FRF` - French Franc +// * `XFO` - French Gold Franc +// * `XFU` - French UIC-Franc +// * `GMD` - Gambian Dalasi +// * `GEK` - Georgian Kupon Larit +// * `GEL` - Georgian Lari +// * `DEM` - German Mark +// * `GHS` - Ghanaian Cedi +// * `GHC` - Ghanaian Cedi (1979–2007) +// * `GIP` - Gibraltar Pound +// * `XAU` - Gold +// * `GRD` - Greek Drachma +// * `GTQ` - Guatemalan Quetzal +// * `GWP` - Guinea-Bissau Peso +// * `GNF` - Guinean Franc +// * `GNS` - Guinean Syli +// * `GYD` - Guyanaese Dollar +// * `HTG` - Haitian Gourde +// * `HNL` - Honduran Lempira +// * `HKD` - Hong Kong Dollar +// * `HUF` - Hungarian Forint +// * `IMP` - IMP +// * `ISK` - Icelandic Króna +// * `ISJ` - Icelandic Króna (1918–1981) +// * `INR` - Indian Rupee +// * `IDR` - Indonesian Rupiah +// * `IRR` - Iranian Rial +// * `IQD` - Iraqi Dinar +// * `IEP` - Irish Pound +// * `ILS` - Israeli New Shekel +// * `ILP` - Israeli Pound +// * `ILR` - Israeli Shekel (1980–1985) +// * `ITL` - Italian Lira +// * `JMD` - Jamaican Dollar +// * `JPY` - Japanese Yen +// * `JOD` - Jordanian Dinar +// * `KZT` - Kazakhstani Tenge +// * `KES` - Kenyan Shilling +// * `KWD` - Kuwaiti Dinar +// * `KGS` - Kyrgystani Som +// * `LAK` - Laotian Kip +// * `LVL` - Latvian Lats +// * `LVR` - Latvian Ruble +// * `LBP` - Lebanese Pound +// * `LSL` - Lesotho Loti +// * `LRD` - Liberian Dollar +// * `LYD` - Libyan Dinar +// * `LTL` - Lithuanian Litas +// * `LTT` - Lithuanian Talonas +// * `LUL` - Luxembourg Financial Franc +// * `LUC` - Luxembourgian Convertible Franc +// * `LUF` - Luxembourgian Franc +// * `MOP` - Macanese Pataca +// * `MKD` - Macedonian Denar +// * `MKN` - Macedonian Denar (1992–1993) +// * `MGA` - Malagasy Ariary +// * `MGF` - Malagasy Franc +// * `MWK` - Malawian Kwacha +// * `MYR` - Malaysian Ringgit +// * `MVR` - Maldivian Rufiyaa +// * `MVP` - Maldivian Rupee (1947–1981) +// * `MLF` - Malian Franc +// * `MTL` - Maltese Lira +// * `MTP` - Maltese Pound +// * `MRU` - Mauritanian Ouguiya +// * `MRO` - Mauritanian Ouguiya (1973–2017) +// * `MUR` - Mauritian Rupee +// * `MXV` - Mexican Investment Unit +// * `MXN` - Mexican Peso +// * `MXP` - Mexican Silver Peso (1861–1992) +// * `MDC` - Moldovan Cupon +// * `MDL` - Moldovan Leu +// * `MCF` - Monegasque Franc +// * `MNT` - Mongolian Tugrik +// * `MAD` - Moroccan Dirham +// * `MAF` - Moroccan Franc +// * `MZE` - Mozambican Escudo +// * `MZN` - Mozambican Metical +// * `MZM` - Mozambican Metical (1980–2006) +// * `MMK` - Myanmar Kyat +// * `NAD` - Namibian Dollar +// * `NPR` - Nepalese Rupee +// * `ANG` - Netherlands Antillean Guilder +// * `TWD` - New Taiwan Dollar +// * `NZD` - New Zealand Dollar +// * `NIO` - Nicaraguan Córdoba +// * `NIC` - Nicaraguan Córdoba (1988–1991) +// * `NGN` - Nigerian Naira +// * `KPW` - North Korean Won +// * `NOK` - Norwegian Krone +// * `OMR` - Omani Rial +// * `PKR` - Pakistani Rupee +// * `XPD` - Palladium +// * `PAB` - Panamanian Balboa +// * `PGK` - Papua New Guinean Kina +// * `PYG` - Paraguayan Guarani +// * `PEI` - Peruvian Inti +// * `PEN` - Peruvian Sol +// * `PES` - Peruvian Sol (1863–1965) +// * `PHP` - Philippine Peso +// * `XPT` - Platinum +// * `PLN` - Polish Zloty +// * `PLZ` - Polish Zloty (1950–1995) +// * `PTE` - Portuguese Escudo +// * `GWE` - Portuguese Guinea Escudo +// * `QAR` - Qatari Rial +// * `XRE` - RINET Funds +// * `RHD` - Rhodesian Dollar +// * `RON` - Romanian Leu +// * `ROL` - Romanian Leu (1952–2006) +// * `RUB` - Russian Ruble +// * `RUR` - Russian Ruble (1991–1998) +// * `RWF` - Rwandan Franc +// * `SVC` - Salvadoran Colón +// * `WST` - Samoan Tala +// * `SAR` - Saudi Riyal +// * `RSD` - Serbian Dinar +// * `CSD` - Serbian Dinar (2002–2006) +// * `SCR` - Seychellois Rupee +// * `SLL` - Sierra Leonean Leone +// * `XAG` - Silver +// * `SGD` - Singapore Dollar +// * `SKK` - Slovak Koruna +// * `SIT` - Slovenian Tolar +// * `SBD` - Solomon Islands Dollar +// * `SOS` - Somali Shilling +// * `ZAR` - South African Rand +// * `ZAL` - South African Rand (financial) +// * `KRH` - South Korean Hwan (1953–1962) +// * `KRW` - South Korean Won +// * `KRO` - South Korean Won (1945–1953) +// * `SSP` - South Sudanese Pound +// * `SUR` - Soviet Rouble +// * `ESP` - Spanish Peseta +// * `ESA` - Spanish Peseta (A account) +// * `ESB` - Spanish Peseta (convertible account) +// * `XDR` - Special Drawing Rights +// * `LKR` - Sri Lankan Rupee +// * `SHP` - St. Helena Pound +// * `XSU` - Sucre +// * `SDD` - Sudanese Dinar (1992–2007) +// * `SDG` - Sudanese Pound +// * `SDP` - Sudanese Pound (1957–1998) +// * `SRD` - Surinamese Dollar +// * `SRG` - Surinamese Guilder +// * `SZL` - Swazi Lilangeni +// * `SEK` - Swedish Krona +// * `CHF` - Swiss Franc +// * `SYP` - Syrian Pound +// * `STN` - São Tomé & Príncipe Dobra +// * `STD` - São Tomé & Príncipe Dobra (1977–2017) +// * `TVD` - TVD +// * `TJR` - Tajikistani Ruble +// * `TJS` - Tajikistani Somoni +// * `TZS` - Tanzanian Shilling +// * `XTS` - Testing Currency Code +// * `THB` - Thai Baht +// * `XXX` - The codes assigned for transactions where no currency is involved +// * `TPE` - Timorese Escudo +// * `TOP` - Tongan Paʻanga +// * `TTD` - Trinidad & Tobago Dollar +// * `TND` - Tunisian Dinar +// * `TRY` - Turkish Lira +// * `TRL` - Turkish Lira (1922–2005) +// * `TMT` - Turkmenistani Manat +// * `TMM` - Turkmenistani Manat (1993–2009) +// * `USD` - US Dollar +// * `USN` - US Dollar (Next day) +// * `USS` - US Dollar (Same day) +// * `UGX` - Ugandan Shilling +// * `UGS` - Ugandan Shilling (1966–1987) +// * `UAH` - Ukrainian Hryvnia +// * `UAK` - Ukrainian Karbovanets +// * `AED` - United Arab Emirates Dirham +// * `UYW` - Uruguayan Nominal Wage Index Unit +// * `UYU` - Uruguayan Peso +// * `UYP` - Uruguayan Peso (1975–1993) +// * `UYI` - Uruguayan Peso (Indexed Units) +// * `UZS` - Uzbekistani Som +// * `VUV` - Vanuatu Vatu +// * `VES` - Venezuelan Bolívar +// * `VEB` - Venezuelan Bolívar (1871–2008) +// * `VEF` - Venezuelan Bolívar (2008–2018) +// * `VND` - Vietnamese Dong +// * `VNN` - Vietnamese Dong (1978–1985) +// * `CHE` - WIR Euro +// * `CHW` - WIR Franc +// * `XOF` - West African CFA Franc +// * `YDD` - Yemeni Dinar +// * `YER` - Yemeni Rial +// * `YUN` - Yugoslavian Convertible Dinar (1990–1992) +// * `YUD` - Yugoslavian Hard Dinar (1966–1990) +// * `YUM` - Yugoslavian New Dinar (1994–2002) +// * `YUR` - Yugoslavian Reformed Dinar (1992–1993) +// * `ZWN` - ZWN +// * `ZRN` - Zairean New Zaire (1993–1998) +// * `ZRZ` - Zairean Zaire (1971–1993) +// * `ZMW` - Zambian Kwacha +// * `ZMK` - Zambian Kwacha (1968–2012) +// * `ZWD` - Zimbabwean Dollar (1980–2008) +// * `ZWR` - Zimbabwean Dollar (2008) +// * `ZWL` - Zimbabwean Dollar (2009) +type GeneralLedgerTransactionLineTransactionCurrency struct { + TransactionCurrencyEnum TransactionCurrencyEnum + String string + + typ string +} + +func (g *GeneralLedgerTransactionLineTransactionCurrency) GetTransactionCurrencyEnum() TransactionCurrencyEnum { + if g == nil { + return "" + } + return g.TransactionCurrencyEnum +} + +func (g *GeneralLedgerTransactionLineTransactionCurrency) GetString() string { + if g == nil { + return "" + } + return g.String +} + +func (g *GeneralLedgerTransactionLineTransactionCurrency) UnmarshalJSON(data []byte) error { + var valueTransactionCurrencyEnum TransactionCurrencyEnum + if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { + g.typ = "TransactionCurrencyEnum" + g.TransactionCurrencyEnum = valueTransactionCurrencyEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + g.typ = "String" + g.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, g) +} + +func (g GeneralLedgerTransactionLineTransactionCurrency) MarshalJSON() ([]byte, error) { + if g.typ == "TransactionCurrencyEnum" || g.TransactionCurrencyEnum != "" { + return json.Marshal(g.TransactionCurrencyEnum) + } + if g.typ == "String" || g.String != "" { + return json.Marshal(g.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", g) +} + +type GeneralLedgerTransactionLineTransactionCurrencyVisitor interface { + VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error + VisitString(string) error +} + +func (g *GeneralLedgerTransactionLineTransactionCurrency) Accept(visitor GeneralLedgerTransactionLineTransactionCurrencyVisitor) error { + if g.typ == "TransactionCurrencyEnum" || g.TransactionCurrencyEnum != "" { + return visitor.VisitTransactionCurrencyEnum(g.TransactionCurrencyEnum) + } + if g.typ == "String" || g.String != "" { + return visitor.VisitString(g.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", g) +} + +type GeneralLedgerTransactionTrackingCategoriesItem struct { + String string + TrackingCategory *TrackingCategory + + typ string +} + +func (g *GeneralLedgerTransactionTrackingCategoriesItem) GetString() string { + if g == nil { + return "" + } + return g.String +} + +func (g *GeneralLedgerTransactionTrackingCategoriesItem) GetTrackingCategory() *TrackingCategory { + if g == nil { + return nil + } + return g.TrackingCategory +} + +func (g *GeneralLedgerTransactionTrackingCategoriesItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + g.typ = "String" + g.String = valueString + return nil + } + valueTrackingCategory := new(TrackingCategory) + if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { + g.typ = "TrackingCategory" + g.TrackingCategory = valueTrackingCategory + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, g) +} + +func (g GeneralLedgerTransactionTrackingCategoriesItem) MarshalJSON() ([]byte, error) { + if g.typ == "String" || g.String != "" { + return json.Marshal(g.String) + } + if g.typ == "TrackingCategory" || g.TrackingCategory != nil { + return json.Marshal(g.TrackingCategory) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", g) +} + +type GeneralLedgerTransactionTrackingCategoriesItemVisitor interface { + VisitString(string) error + VisitTrackingCategory(*TrackingCategory) error +} + +func (g *GeneralLedgerTransactionTrackingCategoriesItem) Accept(visitor GeneralLedgerTransactionTrackingCategoriesItemVisitor) error { + if g.typ == "String" || g.String != "" { + return visitor.VisitString(g.String) + } + if g.typ == "TrackingCategory" || g.TrackingCategory != nil { + return visitor.VisitTrackingCategory(g.TrackingCategory) + } + return fmt.Errorf("type %T does not include a non-empty union type", g) +} + +// The type of the underlying transaction. +// +// * `INVOICE` - INVOICE +// * `EXPENSE` - EXPENSE +// * `TRANSACTION` - TRANSACTION +// * `JOURNAL_ENTRY` - JOURNAL_ENTRY +// * `PAYMENT` - PAYMENT +// * `VENDOR_CREDIT` - VENDOR_CREDIT +// * `CREDIT_NOTE` - CREDIT_NOTE +type GeneralLedgerTransactionUnderlyingTransactionType struct { + UnderlyingTransactionTypeEnum UnderlyingTransactionTypeEnum + String string + + typ string +} + +func (g *GeneralLedgerTransactionUnderlyingTransactionType) GetUnderlyingTransactionTypeEnum() UnderlyingTransactionTypeEnum { + if g == nil { + return "" + } + return g.UnderlyingTransactionTypeEnum +} + +func (g *GeneralLedgerTransactionUnderlyingTransactionType) GetString() string { + if g == nil { + return "" + } + return g.String +} + +func (g *GeneralLedgerTransactionUnderlyingTransactionType) UnmarshalJSON(data []byte) error { + var valueUnderlyingTransactionTypeEnum UnderlyingTransactionTypeEnum + if err := json.Unmarshal(data, &valueUnderlyingTransactionTypeEnum); err == nil { + g.typ = "UnderlyingTransactionTypeEnum" + g.UnderlyingTransactionTypeEnum = valueUnderlyingTransactionTypeEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + g.typ = "String" + g.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, g) +} + +func (g GeneralLedgerTransactionUnderlyingTransactionType) MarshalJSON() ([]byte, error) { + if g.typ == "UnderlyingTransactionTypeEnum" || g.UnderlyingTransactionTypeEnum != "" { + return json.Marshal(g.UnderlyingTransactionTypeEnum) + } + if g.typ == "String" || g.String != "" { + return json.Marshal(g.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", g) +} + +type GeneralLedgerTransactionUnderlyingTransactionTypeVisitor interface { + VisitUnderlyingTransactionTypeEnum(UnderlyingTransactionTypeEnum) error + VisitString(string) error +} + +func (g *GeneralLedgerTransactionUnderlyingTransactionType) Accept(visitor GeneralLedgerTransactionUnderlyingTransactionTypeVisitor) error { + if g.typ == "UnderlyingTransactionTypeEnum" || g.UnderlyingTransactionTypeEnum != "" { + return visitor.VisitUnderlyingTransactionTypeEnum(g.UnderlyingTransactionTypeEnum) + } + if g.typ == "String" || g.String != "" { + return visitor.VisitString(g.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", g) +} + +type PaginatedGeneralLedgerTransactionList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*GeneralLedgerTransaction `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedGeneralLedgerTransactionList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedGeneralLedgerTransactionList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedGeneralLedgerTransactionList) GetResults() []*GeneralLedgerTransaction { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedGeneralLedgerTransactionList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedGeneralLedgerTransactionList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedGeneralLedgerTransactionList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedGeneralLedgerTransactionList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedGeneralLedgerTransactionList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +// * `INVOICE` - INVOICE +// * `EXPENSE` - EXPENSE +// * `TRANSACTION` - TRANSACTION +// * `JOURNAL_ENTRY` - JOURNAL_ENTRY +// * `PAYMENT` - PAYMENT +// * `VENDOR_CREDIT` - VENDOR_CREDIT +// * `CREDIT_NOTE` - CREDIT_NOTE +type UnderlyingTransactionTypeEnum string + +const ( + UnderlyingTransactionTypeEnumInvoice UnderlyingTransactionTypeEnum = "INVOICE" + UnderlyingTransactionTypeEnumExpense UnderlyingTransactionTypeEnum = "EXPENSE" + UnderlyingTransactionTypeEnumTransaction UnderlyingTransactionTypeEnum = "TRANSACTION" + UnderlyingTransactionTypeEnumJournalEntry UnderlyingTransactionTypeEnum = "JOURNAL_ENTRY" + UnderlyingTransactionTypeEnumPayment UnderlyingTransactionTypeEnum = "PAYMENT" + UnderlyingTransactionTypeEnumVendorCredit UnderlyingTransactionTypeEnum = "VENDOR_CREDIT" + UnderlyingTransactionTypeEnumCreditNote UnderlyingTransactionTypeEnum = "CREDIT_NOTE" +) + +func NewUnderlyingTransactionTypeEnumFromString(s string) (UnderlyingTransactionTypeEnum, error) { + switch s { + case "INVOICE": + return UnderlyingTransactionTypeEnumInvoice, nil + case "EXPENSE": + return UnderlyingTransactionTypeEnumExpense, nil + case "TRANSACTION": + return UnderlyingTransactionTypeEnumTransaction, nil + case "JOURNAL_ENTRY": + return UnderlyingTransactionTypeEnumJournalEntry, nil + case "PAYMENT": + return UnderlyingTransactionTypeEnumPayment, nil + case "VENDOR_CREDIT": + return UnderlyingTransactionTypeEnumVendorCredit, nil + case "CREDIT_NOTE": + return UnderlyingTransactionTypeEnumCreditNote, nil + } + var t UnderlyingTransactionTypeEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (u UnderlyingTransactionTypeEnum) Ptr() *UnderlyingTransactionTypeEnum { + return &u +} diff --git a/accounting/generalledgertransactions/client.go b/accounting/generalledgertransactions/client.go index 4529f83..3573b3e 100644 --- a/accounting/generalledgertransactions/client.go +++ b/accounting/generalledgertransactions/client.go @@ -1,132 +1,137 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package generalledgertransactions import ( context "context" fmt "fmt" - accounting "github.com/merge-api/merge-go-client/accounting" - core "github.com/merge-api/merge-go-client/core" + accounting "github.com/merge-api/merge-go-client/v2/accounting" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `GeneralLedgerTransaction` objects. -func (c *Client) List(ctx context.Context, request *accounting.GeneralLedgerTransactionsListRequest) (*accounting.PaginatedGeneralLedgerTransactionList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/general-ledger-transactions" - - queryParams := make(url.Values) - if request.CompanyId != nil { - queryParams.Add("company_id", fmt.Sprintf("%v", *request.CompanyId)) - } - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.PostedDateAfter != nil { - queryParams.Add("posted_date_after", fmt.Sprintf("%v", request.PostedDateAfter.Format(time.RFC3339))) - } - if request.PostedDateBefore != nil { - queryParams.Add("posted_date_before", fmt.Sprintf("%v", request.PostedDateBefore.Format(time.RFC3339))) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *accounting.PaginatedGeneralLedgerTransactionList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *accounting.GeneralLedgerTransactionsListRequest, + opts ...option.RequestOption, +) (*core.Page[*accounting.GeneralLedgerTransaction], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/general-ledger-transactions" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *accounting.PaginatedGeneralLedgerTransactionList) *internal.PageResponse[*string, *accounting.GeneralLedgerTransaction] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *accounting.GeneralLedgerTransaction]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Returns a `GeneralLedgerTransaction` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *accounting.GeneralLedgerTransactionsRetrieveRequest) (*accounting.GeneralLedgerTransaction, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"accounting/v1/general-ledger-transactions/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *accounting.GeneralLedgerTransactionsRetrieveRequest, + opts ...option.RequestOption, +) (*accounting.GeneralLedgerTransaction, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/accounting/v1/general-ledger-transactions/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *accounting.GeneralLedgerTransaction if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/accounting/generate_key.go b/accounting/generate_key.go index 91a4c23..3fe53f4 100644 --- a/accounting/generate_key.go +++ b/accounting/generate_key.go @@ -1,8 +1,8 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package accounting type GenerateRemoteKeyRequest struct { // The name of the remote key - Name string `json:"name"` + Name string `json:"name" url:"-"` } diff --git a/accounting/generatekey/client.go b/accounting/generatekey/client.go index c02bd4b..512026b 100644 --- a/accounting/generatekey/client.go +++ b/accounting/generatekey/client.go @@ -1,49 +1,68 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package generatekey import ( context "context" - accounting "github.com/merge-api/merge-go-client/accounting" - core "github.com/merge-api/merge-go-client/core" + accounting "github.com/merge-api/merge-go-client/v2/accounting" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Create a remote key. -func (c *Client) Create(ctx context.Context, request *accounting.GenerateRemoteKeyRequest) (*accounting.RemoteKey, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/generate-key" +func (c *Client) Create( + ctx context.Context, + request *accounting.GenerateRemoteKeyRequest, + opts ...option.RequestOption, +) (*accounting.RemoteKey, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/generate-key" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *accounting.RemoteKey if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err diff --git a/accounting/income_statements.go b/accounting/income_statements.go index fb2a6e7..eb5daaa 100644 --- a/accounting/income_statements.go +++ b/accounting/income_statements.go @@ -1,41 +1,1086 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package accounting import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type IncomeStatementsListRequest struct { // If provided, will only return income statements for this company. - CompanyId *string `json:"-"` + CompanyId *string `json:"-" url:"company_id,omitempty"` // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *string `json:"-"` + Expand []*string `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` } type IncomeStatementsRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *string `json:"-"` + Expand []*string `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` +} + +// # The IncomeStatement Object +// ### Description +// The `IncomeStatement` object is used to represent a company’s income, the cost of sales, operating expenses, and other non-operating expenses. The object also includes other important values like gross profit, gross operating profit, and net income. This represents a period of time (month, quarter, or year). +// +// ### Usage Example +// Fetch from the `GET IncomeStatement` endpoint and view a company's income statement for a given period. +type IncomeStatement struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The income statement's name. + Name *string `json:"name,omitempty" url:"name,omitempty"` + // The income statement's currency. + // + // * `XUA` - ADB Unit of Account + // * `AFN` - Afghan Afghani + // * `AFA` - Afghan Afghani (1927–2002) + // * `ALL` - Albanian Lek + // * `ALK` - Albanian Lek (1946–1965) + // * `DZD` - Algerian Dinar + // * `ADP` - Andorran Peseta + // * `AOA` - Angolan Kwanza + // * `AOK` - Angolan Kwanza (1977–1991) + // * `AON` - Angolan New Kwanza (1990–2000) + // * `AOR` - Angolan Readjusted Kwanza (1995–1999) + // * `ARA` - Argentine Austral + // * `ARS` - Argentine Peso + // * `ARM` - Argentine Peso (1881–1970) + // * `ARP` - Argentine Peso (1983–1985) + // * `ARL` - Argentine Peso Ley (1970–1983) + // * `AMD` - Armenian Dram + // * `AWG` - Aruban Florin + // * `AUD` - Australian Dollar + // * `ATS` - Austrian Schilling + // * `AZN` - Azerbaijani Manat + // * `AZM` - Azerbaijani Manat (1993–2006) + // * `BSD` - Bahamian Dollar + // * `BHD` - Bahraini Dinar + // * `BDT` - Bangladeshi Taka + // * `BBD` - Barbadian Dollar + // * `BYN` - Belarusian Ruble + // * `BYB` - Belarusian Ruble (1994–1999) + // * `BYR` - Belarusian Ruble (2000–2016) + // * `BEF` - Belgian Franc + // * `BEC` - Belgian Franc (convertible) + // * `BEL` - Belgian Franc (financial) + // * `BZD` - Belize Dollar + // * `BMD` - Bermudan Dollar + // * `BTN` - Bhutanese Ngultrum + // * `BOB` - Bolivian Boliviano + // * `BOL` - Bolivian Boliviano (1863–1963) + // * `BOV` - Bolivian Mvdol + // * `BOP` - Bolivian Peso + // * `BAM` - Bosnia-Herzegovina Convertible Mark + // * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + // * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + // * `BWP` - Botswanan Pula + // * `BRC` - Brazilian Cruzado (1986–1989) + // * `BRZ` - Brazilian Cruzeiro (1942–1967) + // * `BRE` - Brazilian Cruzeiro (1990–1993) + // * `BRR` - Brazilian Cruzeiro (1993–1994) + // * `BRN` - Brazilian New Cruzado (1989–1990) + // * `BRB` - Brazilian New Cruzeiro (1967–1986) + // * `BRL` - Brazilian Real + // * `GBP` - British Pound + // * `BND` - Brunei Dollar + // * `BGL` - Bulgarian Hard Lev + // * `BGN` - Bulgarian Lev + // * `BGO` - Bulgarian Lev (1879–1952) + // * `BGM` - Bulgarian Socialist Lev + // * `BUK` - Burmese Kyat + // * `BIF` - Burundian Franc + // * `XPF` - CFP Franc + // * `KHR` - Cambodian Riel + // * `CAD` - Canadian Dollar + // * `CVE` - Cape Verdean Escudo + // * `KYD` - Cayman Islands Dollar + // * `XAF` - Central African CFA Franc + // * `CLE` - Chilean Escudo + // * `CLP` - Chilean Peso + // * `CLF` - Chilean Unit of Account (UF) + // * `CNX` - Chinese People’s Bank Dollar + // * `CNY` - Chinese Yuan + // * `CNH` - Chinese Yuan (offshore) + // * `COP` - Colombian Peso + // * `COU` - Colombian Real Value Unit + // * `KMF` - Comorian Franc + // * `CDF` - Congolese Franc + // * `CRC` - Costa Rican Colón + // * `HRD` - Croatian Dinar + // * `HRK` - Croatian Kuna + // * `CUC` - Cuban Convertible Peso + // * `CUP` - Cuban Peso + // * `CYP` - Cypriot Pound + // * `CZK` - Czech Koruna + // * `CSK` - Czechoslovak Hard Koruna + // * `DKK` - Danish Krone + // * `DJF` - Djiboutian Franc + // * `DOP` - Dominican Peso + // * `NLG` - Dutch Guilder + // * `XCD` - East Caribbean Dollar + // * `DDM` - East German Mark + // * `ECS` - Ecuadorian Sucre + // * `ECV` - Ecuadorian Unit of Constant Value + // * `EGP` - Egyptian Pound + // * `GQE` - Equatorial Guinean Ekwele + // * `ERN` - Eritrean Nakfa + // * `EEK` - Estonian Kroon + // * `ETB` - Ethiopian Birr + // * `EUR` - Euro + // * `XBA` - European Composite Unit + // * `XEU` - European Currency Unit + // * `XBB` - European Monetary Unit + // * `XBC` - European Unit of Account (XBC) + // * `XBD` - European Unit of Account (XBD) + // * `FKP` - Falkland Islands Pound + // * `FJD` - Fijian Dollar + // * `FIM` - Finnish Markka + // * `FRF` - French Franc + // * `XFO` - French Gold Franc + // * `XFU` - French UIC-Franc + // * `GMD` - Gambian Dalasi + // * `GEK` - Georgian Kupon Larit + // * `GEL` - Georgian Lari + // * `DEM` - German Mark + // * `GHS` - Ghanaian Cedi + // * `GHC` - Ghanaian Cedi (1979–2007) + // * `GIP` - Gibraltar Pound + // * `XAU` - Gold + // * `GRD` - Greek Drachma + // * `GTQ` - Guatemalan Quetzal + // * `GWP` - Guinea-Bissau Peso + // * `GNF` - Guinean Franc + // * `GNS` - Guinean Syli + // * `GYD` - Guyanaese Dollar + // * `HTG` - Haitian Gourde + // * `HNL` - Honduran Lempira + // * `HKD` - Hong Kong Dollar + // * `HUF` - Hungarian Forint + // * `IMP` - IMP + // * `ISK` - Icelandic Króna + // * `ISJ` - Icelandic Króna (1918–1981) + // * `INR` - Indian Rupee + // * `IDR` - Indonesian Rupiah + // * `IRR` - Iranian Rial + // * `IQD` - Iraqi Dinar + // * `IEP` - Irish Pound + // * `ILS` - Israeli New Shekel + // * `ILP` - Israeli Pound + // * `ILR` - Israeli Shekel (1980–1985) + // * `ITL` - Italian Lira + // * `JMD` - Jamaican Dollar + // * `JPY` - Japanese Yen + // * `JOD` - Jordanian Dinar + // * `KZT` - Kazakhstani Tenge + // * `KES` - Kenyan Shilling + // * `KWD` - Kuwaiti Dinar + // * `KGS` - Kyrgystani Som + // * `LAK` - Laotian Kip + // * `LVL` - Latvian Lats + // * `LVR` - Latvian Ruble + // * `LBP` - Lebanese Pound + // * `LSL` - Lesotho Loti + // * `LRD` - Liberian Dollar + // * `LYD` - Libyan Dinar + // * `LTL` - Lithuanian Litas + // * `LTT` - Lithuanian Talonas + // * `LUL` - Luxembourg Financial Franc + // * `LUC` - Luxembourgian Convertible Franc + // * `LUF` - Luxembourgian Franc + // * `MOP` - Macanese Pataca + // * `MKD` - Macedonian Denar + // * `MKN` - Macedonian Denar (1992–1993) + // * `MGA` - Malagasy Ariary + // * `MGF` - Malagasy Franc + // * `MWK` - Malawian Kwacha + // * `MYR` - Malaysian Ringgit + // * `MVR` - Maldivian Rufiyaa + // * `MVP` - Maldivian Rupee (1947–1981) + // * `MLF` - Malian Franc + // * `MTL` - Maltese Lira + // * `MTP` - Maltese Pound + // * `MRU` - Mauritanian Ouguiya + // * `MRO` - Mauritanian Ouguiya (1973–2017) + // * `MUR` - Mauritian Rupee + // * `MXV` - Mexican Investment Unit + // * `MXN` - Mexican Peso + // * `MXP` - Mexican Silver Peso (1861–1992) + // * `MDC` - Moldovan Cupon + // * `MDL` - Moldovan Leu + // * `MCF` - Monegasque Franc + // * `MNT` - Mongolian Tugrik + // * `MAD` - Moroccan Dirham + // * `MAF` - Moroccan Franc + // * `MZE` - Mozambican Escudo + // * `MZN` - Mozambican Metical + // * `MZM` - Mozambican Metical (1980–2006) + // * `MMK` - Myanmar Kyat + // * `NAD` - Namibian Dollar + // * `NPR` - Nepalese Rupee + // * `ANG` - Netherlands Antillean Guilder + // * `TWD` - New Taiwan Dollar + // * `NZD` - New Zealand Dollar + // * `NIO` - Nicaraguan Córdoba + // * `NIC` - Nicaraguan Córdoba (1988–1991) + // * `NGN` - Nigerian Naira + // * `KPW` - North Korean Won + // * `NOK` - Norwegian Krone + // * `OMR` - Omani Rial + // * `PKR` - Pakistani Rupee + // * `XPD` - Palladium + // * `PAB` - Panamanian Balboa + // * `PGK` - Papua New Guinean Kina + // * `PYG` - Paraguayan Guarani + // * `PEI` - Peruvian Inti + // * `PEN` - Peruvian Sol + // * `PES` - Peruvian Sol (1863–1965) + // * `PHP` - Philippine Peso + // * `XPT` - Platinum + // * `PLN` - Polish Zloty + // * `PLZ` - Polish Zloty (1950–1995) + // * `PTE` - Portuguese Escudo + // * `GWE` - Portuguese Guinea Escudo + // * `QAR` - Qatari Rial + // * `XRE` - RINET Funds + // * `RHD` - Rhodesian Dollar + // * `RON` - Romanian Leu + // * `ROL` - Romanian Leu (1952–2006) + // * `RUB` - Russian Ruble + // * `RUR` - Russian Ruble (1991–1998) + // * `RWF` - Rwandan Franc + // * `SVC` - Salvadoran Colón + // * `WST` - Samoan Tala + // * `SAR` - Saudi Riyal + // * `RSD` - Serbian Dinar + // * `CSD` - Serbian Dinar (2002–2006) + // * `SCR` - Seychellois Rupee + // * `SLL` - Sierra Leonean Leone + // * `XAG` - Silver + // * `SGD` - Singapore Dollar + // * `SKK` - Slovak Koruna + // * `SIT` - Slovenian Tolar + // * `SBD` - Solomon Islands Dollar + // * `SOS` - Somali Shilling + // * `ZAR` - South African Rand + // * `ZAL` - South African Rand (financial) + // * `KRH` - South Korean Hwan (1953–1962) + // * `KRW` - South Korean Won + // * `KRO` - South Korean Won (1945–1953) + // * `SSP` - South Sudanese Pound + // * `SUR` - Soviet Rouble + // * `ESP` - Spanish Peseta + // * `ESA` - Spanish Peseta (A account) + // * `ESB` - Spanish Peseta (convertible account) + // * `XDR` - Special Drawing Rights + // * `LKR` - Sri Lankan Rupee + // * `SHP` - St. Helena Pound + // * `XSU` - Sucre + // * `SDD` - Sudanese Dinar (1992–2007) + // * `SDG` - Sudanese Pound + // * `SDP` - Sudanese Pound (1957–1998) + // * `SRD` - Surinamese Dollar + // * `SRG` - Surinamese Guilder + // * `SZL` - Swazi Lilangeni + // * `SEK` - Swedish Krona + // * `CHF` - Swiss Franc + // * `SYP` - Syrian Pound + // * `STN` - São Tomé & Príncipe Dobra + // * `STD` - São Tomé & Príncipe Dobra (1977–2017) + // * `TVD` - TVD + // * `TJR` - Tajikistani Ruble + // * `TJS` - Tajikistani Somoni + // * `TZS` - Tanzanian Shilling + // * `XTS` - Testing Currency Code + // * `THB` - Thai Baht + // * `XXX` - The codes assigned for transactions where no currency is involved + // * `TPE` - Timorese Escudo + // * `TOP` - Tongan Paʻanga + // * `TTD` - Trinidad & Tobago Dollar + // * `TND` - Tunisian Dinar + // * `TRY` - Turkish Lira + // * `TRL` - Turkish Lira (1922–2005) + // * `TMT` - Turkmenistani Manat + // * `TMM` - Turkmenistani Manat (1993–2009) + // * `USD` - US Dollar + // * `USN` - US Dollar (Next day) + // * `USS` - US Dollar (Same day) + // * `UGX` - Ugandan Shilling + // * `UGS` - Ugandan Shilling (1966–1987) + // * `UAH` - Ukrainian Hryvnia + // * `UAK` - Ukrainian Karbovanets + // * `AED` - United Arab Emirates Dirham + // * `UYW` - Uruguayan Nominal Wage Index Unit + // * `UYU` - Uruguayan Peso + // * `UYP` - Uruguayan Peso (1975–1993) + // * `UYI` - Uruguayan Peso (Indexed Units) + // * `UZS` - Uzbekistani Som + // * `VUV` - Vanuatu Vatu + // * `VES` - Venezuelan Bolívar + // * `VEB` - Venezuelan Bolívar (1871–2008) + // * `VEF` - Venezuelan Bolívar (2008–2018) + // * `VND` - Vietnamese Dong + // * `VNN` - Vietnamese Dong (1978–1985) + // * `CHE` - WIR Euro + // * `CHW` - WIR Franc + // * `XOF` - West African CFA Franc + // * `YDD` - Yemeni Dinar + // * `YER` - Yemeni Rial + // * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + // * `YUD` - Yugoslavian Hard Dinar (1966–1990) + // * `YUM` - Yugoslavian New Dinar (1994–2002) + // * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + // * `ZWN` - ZWN + // * `ZRN` - Zairean New Zaire (1993–1998) + // * `ZRZ` - Zairean Zaire (1971–1993) + // * `ZMW` - Zambian Kwacha + // * `ZMK` - Zambian Kwacha (1968–2012) + // * `ZWD` - Zimbabwean Dollar (1980–2008) + // * `ZWR` - Zimbabwean Dollar (2008) + // * `ZWL` - Zimbabwean Dollar (2009) + Currency *IncomeStatementCurrency `json:"currency,omitempty" url:"currency,omitempty"` + // The company the income statement belongs to. + Company *IncomeStatementCompany `json:"company,omitempty" url:"company,omitempty"` + // The income statement's start period. + StartPeriod *time.Time `json:"start_period,omitempty" url:"start_period,omitempty"` + // The income statement's end period. + EndPeriod *time.Time `json:"end_period,omitempty" url:"end_period,omitempty"` + Income []*ReportItem `json:"income,omitempty" url:"income,omitempty"` + CostOfSales []*ReportItem `json:"cost_of_sales,omitempty" url:"cost_of_sales,omitempty"` + // The revenue minus the cost of sale. + GrossProfit *float64 `json:"gross_profit,omitempty" url:"gross_profit,omitempty"` + OperatingExpenses []*ReportItem `json:"operating_expenses,omitempty" url:"operating_expenses,omitempty"` + // The revenue minus the operating expenses. + NetOperatingIncome *float64 `json:"net_operating_income,omitempty" url:"net_operating_income,omitempty"` + NonOperatingExpenses []*ReportItem `json:"non_operating_expenses,omitempty" url:"non_operating_expenses,omitempty"` + // The gross profit minus the total expenses. + NetIncome *float64 `json:"net_income,omitempty" url:"net_income,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (i *IncomeStatement) GetId() *string { + if i == nil { + return nil + } + return i.Id +} + +func (i *IncomeStatement) GetRemoteId() *string { + if i == nil { + return nil + } + return i.RemoteId +} + +func (i *IncomeStatement) GetCreatedAt() *time.Time { + if i == nil { + return nil + } + return i.CreatedAt +} + +func (i *IncomeStatement) GetModifiedAt() *time.Time { + if i == nil { + return nil + } + return i.ModifiedAt +} + +func (i *IncomeStatement) GetName() *string { + if i == nil { + return nil + } + return i.Name +} + +func (i *IncomeStatement) GetCurrency() *IncomeStatementCurrency { + if i == nil { + return nil + } + return i.Currency +} + +func (i *IncomeStatement) GetCompany() *IncomeStatementCompany { + if i == nil { + return nil + } + return i.Company +} + +func (i *IncomeStatement) GetStartPeriod() *time.Time { + if i == nil { + return nil + } + return i.StartPeriod +} + +func (i *IncomeStatement) GetEndPeriod() *time.Time { + if i == nil { + return nil + } + return i.EndPeriod +} + +func (i *IncomeStatement) GetIncome() []*ReportItem { + if i == nil { + return nil + } + return i.Income +} + +func (i *IncomeStatement) GetCostOfSales() []*ReportItem { + if i == nil { + return nil + } + return i.CostOfSales +} + +func (i *IncomeStatement) GetGrossProfit() *float64 { + if i == nil { + return nil + } + return i.GrossProfit +} + +func (i *IncomeStatement) GetOperatingExpenses() []*ReportItem { + if i == nil { + return nil + } + return i.OperatingExpenses +} + +func (i *IncomeStatement) GetNetOperatingIncome() *float64 { + if i == nil { + return nil + } + return i.NetOperatingIncome +} + +func (i *IncomeStatement) GetNonOperatingExpenses() []*ReportItem { + if i == nil { + return nil + } + return i.NonOperatingExpenses +} + +func (i *IncomeStatement) GetNetIncome() *float64 { + if i == nil { + return nil + } + return i.NetIncome +} + +func (i *IncomeStatement) GetRemoteWasDeleted() *bool { + if i == nil { + return nil + } + return i.RemoteWasDeleted +} + +func (i *IncomeStatement) GetFieldMappings() map[string]interface{} { + if i == nil { + return nil + } + return i.FieldMappings +} + +func (i *IncomeStatement) GetRemoteData() []*RemoteData { + if i == nil { + return nil + } + return i.RemoteData +} + +func (i *IncomeStatement) GetExtraProperties() map[string]interface{} { + return i.extraProperties +} + +func (i *IncomeStatement) UnmarshalJSON(data []byte) error { + type embed IncomeStatement + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + StartPeriod *internal.DateTime `json:"start_period,omitempty"` + EndPeriod *internal.DateTime `json:"end_period,omitempty"` + }{ + embed: embed(*i), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *i = IncomeStatement(unmarshaler.embed) + i.CreatedAt = unmarshaler.CreatedAt.TimePtr() + i.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + i.StartPeriod = unmarshaler.StartPeriod.TimePtr() + i.EndPeriod = unmarshaler.EndPeriod.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *i) + if err != nil { + return err + } + i.extraProperties = extraProperties + i.rawJSON = json.RawMessage(data) + return nil +} + +func (i *IncomeStatement) MarshalJSON() ([]byte, error) { + type embed IncomeStatement + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + StartPeriod *internal.DateTime `json:"start_period,omitempty"` + EndPeriod *internal.DateTime `json:"end_period,omitempty"` + }{ + embed: embed(*i), + CreatedAt: internal.NewOptionalDateTime(i.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(i.ModifiedAt), + StartPeriod: internal.NewOptionalDateTime(i.StartPeriod), + EndPeriod: internal.NewOptionalDateTime(i.EndPeriod), + } + return json.Marshal(marshaler) +} + +func (i *IncomeStatement) String() string { + if len(i.rawJSON) > 0 { + if value, err := internal.StringifyJSON(i.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(i); err == nil { + return value + } + return fmt.Sprintf("%#v", i) +} + +// The company the income statement belongs to. +type IncomeStatementCompany struct { + String string + CompanyInfo *CompanyInfo + + typ string +} + +func (i *IncomeStatementCompany) GetString() string { + if i == nil { + return "" + } + return i.String +} + +func (i *IncomeStatementCompany) GetCompanyInfo() *CompanyInfo { + if i == nil { + return nil + } + return i.CompanyInfo +} + +func (i *IncomeStatementCompany) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + i.typ = "String" + i.String = valueString + return nil + } + valueCompanyInfo := new(CompanyInfo) + if err := json.Unmarshal(data, &valueCompanyInfo); err == nil { + i.typ = "CompanyInfo" + i.CompanyInfo = valueCompanyInfo + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) +} + +func (i IncomeStatementCompany) MarshalJSON() ([]byte, error) { + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) + } + if i.typ == "CompanyInfo" || i.CompanyInfo != nil { + return json.Marshal(i.CompanyInfo) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) +} + +type IncomeStatementCompanyVisitor interface { + VisitString(string) error + VisitCompanyInfo(*CompanyInfo) error +} + +func (i *IncomeStatementCompany) Accept(visitor IncomeStatementCompanyVisitor) error { + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) + } + if i.typ == "CompanyInfo" || i.CompanyInfo != nil { + return visitor.VisitCompanyInfo(i.CompanyInfo) + } + return fmt.Errorf("type %T does not include a non-empty union type", i) +} + +// The income statement's currency. +// +// * `XUA` - ADB Unit of Account +// * `AFN` - Afghan Afghani +// * `AFA` - Afghan Afghani (1927–2002) +// * `ALL` - Albanian Lek +// * `ALK` - Albanian Lek (1946–1965) +// * `DZD` - Algerian Dinar +// * `ADP` - Andorran Peseta +// * `AOA` - Angolan Kwanza +// * `AOK` - Angolan Kwanza (1977–1991) +// * `AON` - Angolan New Kwanza (1990–2000) +// * `AOR` - Angolan Readjusted Kwanza (1995–1999) +// * `ARA` - Argentine Austral +// * `ARS` - Argentine Peso +// * `ARM` - Argentine Peso (1881–1970) +// * `ARP` - Argentine Peso (1983–1985) +// * `ARL` - Argentine Peso Ley (1970–1983) +// * `AMD` - Armenian Dram +// * `AWG` - Aruban Florin +// * `AUD` - Australian Dollar +// * `ATS` - Austrian Schilling +// * `AZN` - Azerbaijani Manat +// * `AZM` - Azerbaijani Manat (1993–2006) +// * `BSD` - Bahamian Dollar +// * `BHD` - Bahraini Dinar +// * `BDT` - Bangladeshi Taka +// * `BBD` - Barbadian Dollar +// * `BYN` - Belarusian Ruble +// * `BYB` - Belarusian Ruble (1994–1999) +// * `BYR` - Belarusian Ruble (2000–2016) +// * `BEF` - Belgian Franc +// * `BEC` - Belgian Franc (convertible) +// * `BEL` - Belgian Franc (financial) +// * `BZD` - Belize Dollar +// * `BMD` - Bermudan Dollar +// * `BTN` - Bhutanese Ngultrum +// * `BOB` - Bolivian Boliviano +// * `BOL` - Bolivian Boliviano (1863–1963) +// * `BOV` - Bolivian Mvdol +// * `BOP` - Bolivian Peso +// * `BAM` - Bosnia-Herzegovina Convertible Mark +// * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) +// * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) +// * `BWP` - Botswanan Pula +// * `BRC` - Brazilian Cruzado (1986–1989) +// * `BRZ` - Brazilian Cruzeiro (1942–1967) +// * `BRE` - Brazilian Cruzeiro (1990–1993) +// * `BRR` - Brazilian Cruzeiro (1993–1994) +// * `BRN` - Brazilian New Cruzado (1989–1990) +// * `BRB` - Brazilian New Cruzeiro (1967–1986) +// * `BRL` - Brazilian Real +// * `GBP` - British Pound +// * `BND` - Brunei Dollar +// * `BGL` - Bulgarian Hard Lev +// * `BGN` - Bulgarian Lev +// * `BGO` - Bulgarian Lev (1879–1952) +// * `BGM` - Bulgarian Socialist Lev +// * `BUK` - Burmese Kyat +// * `BIF` - Burundian Franc +// * `XPF` - CFP Franc +// * `KHR` - Cambodian Riel +// * `CAD` - Canadian Dollar +// * `CVE` - Cape Verdean Escudo +// * `KYD` - Cayman Islands Dollar +// * `XAF` - Central African CFA Franc +// * `CLE` - Chilean Escudo +// * `CLP` - Chilean Peso +// * `CLF` - Chilean Unit of Account (UF) +// * `CNX` - Chinese People’s Bank Dollar +// * `CNY` - Chinese Yuan +// * `CNH` - Chinese Yuan (offshore) +// * `COP` - Colombian Peso +// * `COU` - Colombian Real Value Unit +// * `KMF` - Comorian Franc +// * `CDF` - Congolese Franc +// * `CRC` - Costa Rican Colón +// * `HRD` - Croatian Dinar +// * `HRK` - Croatian Kuna +// * `CUC` - Cuban Convertible Peso +// * `CUP` - Cuban Peso +// * `CYP` - Cypriot Pound +// * `CZK` - Czech Koruna +// * `CSK` - Czechoslovak Hard Koruna +// * `DKK` - Danish Krone +// * `DJF` - Djiboutian Franc +// * `DOP` - Dominican Peso +// * `NLG` - Dutch Guilder +// * `XCD` - East Caribbean Dollar +// * `DDM` - East German Mark +// * `ECS` - Ecuadorian Sucre +// * `ECV` - Ecuadorian Unit of Constant Value +// * `EGP` - Egyptian Pound +// * `GQE` - Equatorial Guinean Ekwele +// * `ERN` - Eritrean Nakfa +// * `EEK` - Estonian Kroon +// * `ETB` - Ethiopian Birr +// * `EUR` - Euro +// * `XBA` - European Composite Unit +// * `XEU` - European Currency Unit +// * `XBB` - European Monetary Unit +// * `XBC` - European Unit of Account (XBC) +// * `XBD` - European Unit of Account (XBD) +// * `FKP` - Falkland Islands Pound +// * `FJD` - Fijian Dollar +// * `FIM` - Finnish Markka +// * `FRF` - French Franc +// * `XFO` - French Gold Franc +// * `XFU` - French UIC-Franc +// * `GMD` - Gambian Dalasi +// * `GEK` - Georgian Kupon Larit +// * `GEL` - Georgian Lari +// * `DEM` - German Mark +// * `GHS` - Ghanaian Cedi +// * `GHC` - Ghanaian Cedi (1979–2007) +// * `GIP` - Gibraltar Pound +// * `XAU` - Gold +// * `GRD` - Greek Drachma +// * `GTQ` - Guatemalan Quetzal +// * `GWP` - Guinea-Bissau Peso +// * `GNF` - Guinean Franc +// * `GNS` - Guinean Syli +// * `GYD` - Guyanaese Dollar +// * `HTG` - Haitian Gourde +// * `HNL` - Honduran Lempira +// * `HKD` - Hong Kong Dollar +// * `HUF` - Hungarian Forint +// * `IMP` - IMP +// * `ISK` - Icelandic Króna +// * `ISJ` - Icelandic Króna (1918–1981) +// * `INR` - Indian Rupee +// * `IDR` - Indonesian Rupiah +// * `IRR` - Iranian Rial +// * `IQD` - Iraqi Dinar +// * `IEP` - Irish Pound +// * `ILS` - Israeli New Shekel +// * `ILP` - Israeli Pound +// * `ILR` - Israeli Shekel (1980–1985) +// * `ITL` - Italian Lira +// * `JMD` - Jamaican Dollar +// * `JPY` - Japanese Yen +// * `JOD` - Jordanian Dinar +// * `KZT` - Kazakhstani Tenge +// * `KES` - Kenyan Shilling +// * `KWD` - Kuwaiti Dinar +// * `KGS` - Kyrgystani Som +// * `LAK` - Laotian Kip +// * `LVL` - Latvian Lats +// * `LVR` - Latvian Ruble +// * `LBP` - Lebanese Pound +// * `LSL` - Lesotho Loti +// * `LRD` - Liberian Dollar +// * `LYD` - Libyan Dinar +// * `LTL` - Lithuanian Litas +// * `LTT` - Lithuanian Talonas +// * `LUL` - Luxembourg Financial Franc +// * `LUC` - Luxembourgian Convertible Franc +// * `LUF` - Luxembourgian Franc +// * `MOP` - Macanese Pataca +// * `MKD` - Macedonian Denar +// * `MKN` - Macedonian Denar (1992–1993) +// * `MGA` - Malagasy Ariary +// * `MGF` - Malagasy Franc +// * `MWK` - Malawian Kwacha +// * `MYR` - Malaysian Ringgit +// * `MVR` - Maldivian Rufiyaa +// * `MVP` - Maldivian Rupee (1947–1981) +// * `MLF` - Malian Franc +// * `MTL` - Maltese Lira +// * `MTP` - Maltese Pound +// * `MRU` - Mauritanian Ouguiya +// * `MRO` - Mauritanian Ouguiya (1973–2017) +// * `MUR` - Mauritian Rupee +// * `MXV` - Mexican Investment Unit +// * `MXN` - Mexican Peso +// * `MXP` - Mexican Silver Peso (1861–1992) +// * `MDC` - Moldovan Cupon +// * `MDL` - Moldovan Leu +// * `MCF` - Monegasque Franc +// * `MNT` - Mongolian Tugrik +// * `MAD` - Moroccan Dirham +// * `MAF` - Moroccan Franc +// * `MZE` - Mozambican Escudo +// * `MZN` - Mozambican Metical +// * `MZM` - Mozambican Metical (1980–2006) +// * `MMK` - Myanmar Kyat +// * `NAD` - Namibian Dollar +// * `NPR` - Nepalese Rupee +// * `ANG` - Netherlands Antillean Guilder +// * `TWD` - New Taiwan Dollar +// * `NZD` - New Zealand Dollar +// * `NIO` - Nicaraguan Córdoba +// * `NIC` - Nicaraguan Córdoba (1988–1991) +// * `NGN` - Nigerian Naira +// * `KPW` - North Korean Won +// * `NOK` - Norwegian Krone +// * `OMR` - Omani Rial +// * `PKR` - Pakistani Rupee +// * `XPD` - Palladium +// * `PAB` - Panamanian Balboa +// * `PGK` - Papua New Guinean Kina +// * `PYG` - Paraguayan Guarani +// * `PEI` - Peruvian Inti +// * `PEN` - Peruvian Sol +// * `PES` - Peruvian Sol (1863–1965) +// * `PHP` - Philippine Peso +// * `XPT` - Platinum +// * `PLN` - Polish Zloty +// * `PLZ` - Polish Zloty (1950–1995) +// * `PTE` - Portuguese Escudo +// * `GWE` - Portuguese Guinea Escudo +// * `QAR` - Qatari Rial +// * `XRE` - RINET Funds +// * `RHD` - Rhodesian Dollar +// * `RON` - Romanian Leu +// * `ROL` - Romanian Leu (1952–2006) +// * `RUB` - Russian Ruble +// * `RUR` - Russian Ruble (1991–1998) +// * `RWF` - Rwandan Franc +// * `SVC` - Salvadoran Colón +// * `WST` - Samoan Tala +// * `SAR` - Saudi Riyal +// * `RSD` - Serbian Dinar +// * `CSD` - Serbian Dinar (2002–2006) +// * `SCR` - Seychellois Rupee +// * `SLL` - Sierra Leonean Leone +// * `XAG` - Silver +// * `SGD` - Singapore Dollar +// * `SKK` - Slovak Koruna +// * `SIT` - Slovenian Tolar +// * `SBD` - Solomon Islands Dollar +// * `SOS` - Somali Shilling +// * `ZAR` - South African Rand +// * `ZAL` - South African Rand (financial) +// * `KRH` - South Korean Hwan (1953–1962) +// * `KRW` - South Korean Won +// * `KRO` - South Korean Won (1945–1953) +// * `SSP` - South Sudanese Pound +// * `SUR` - Soviet Rouble +// * `ESP` - Spanish Peseta +// * `ESA` - Spanish Peseta (A account) +// * `ESB` - Spanish Peseta (convertible account) +// * `XDR` - Special Drawing Rights +// * `LKR` - Sri Lankan Rupee +// * `SHP` - St. Helena Pound +// * `XSU` - Sucre +// * `SDD` - Sudanese Dinar (1992–2007) +// * `SDG` - Sudanese Pound +// * `SDP` - Sudanese Pound (1957–1998) +// * `SRD` - Surinamese Dollar +// * `SRG` - Surinamese Guilder +// * `SZL` - Swazi Lilangeni +// * `SEK` - Swedish Krona +// * `CHF` - Swiss Franc +// * `SYP` - Syrian Pound +// * `STN` - São Tomé & Príncipe Dobra +// * `STD` - São Tomé & Príncipe Dobra (1977–2017) +// * `TVD` - TVD +// * `TJR` - Tajikistani Ruble +// * `TJS` - Tajikistani Somoni +// * `TZS` - Tanzanian Shilling +// * `XTS` - Testing Currency Code +// * `THB` - Thai Baht +// * `XXX` - The codes assigned for transactions where no currency is involved +// * `TPE` - Timorese Escudo +// * `TOP` - Tongan Paʻanga +// * `TTD` - Trinidad & Tobago Dollar +// * `TND` - Tunisian Dinar +// * `TRY` - Turkish Lira +// * `TRL` - Turkish Lira (1922–2005) +// * `TMT` - Turkmenistani Manat +// * `TMM` - Turkmenistani Manat (1993–2009) +// * `USD` - US Dollar +// * `USN` - US Dollar (Next day) +// * `USS` - US Dollar (Same day) +// * `UGX` - Ugandan Shilling +// * `UGS` - Ugandan Shilling (1966–1987) +// * `UAH` - Ukrainian Hryvnia +// * `UAK` - Ukrainian Karbovanets +// * `AED` - United Arab Emirates Dirham +// * `UYW` - Uruguayan Nominal Wage Index Unit +// * `UYU` - Uruguayan Peso +// * `UYP` - Uruguayan Peso (1975–1993) +// * `UYI` - Uruguayan Peso (Indexed Units) +// * `UZS` - Uzbekistani Som +// * `VUV` - Vanuatu Vatu +// * `VES` - Venezuelan Bolívar +// * `VEB` - Venezuelan Bolívar (1871–2008) +// * `VEF` - Venezuelan Bolívar (2008–2018) +// * `VND` - Vietnamese Dong +// * `VNN` - Vietnamese Dong (1978–1985) +// * `CHE` - WIR Euro +// * `CHW` - WIR Franc +// * `XOF` - West African CFA Franc +// * `YDD` - Yemeni Dinar +// * `YER` - Yemeni Rial +// * `YUN` - Yugoslavian Convertible Dinar (1990–1992) +// * `YUD` - Yugoslavian Hard Dinar (1966–1990) +// * `YUM` - Yugoslavian New Dinar (1994–2002) +// * `YUR` - Yugoslavian Reformed Dinar (1992–1993) +// * `ZWN` - ZWN +// * `ZRN` - Zairean New Zaire (1993–1998) +// * `ZRZ` - Zairean Zaire (1971–1993) +// * `ZMW` - Zambian Kwacha +// * `ZMK` - Zambian Kwacha (1968–2012) +// * `ZWD` - Zimbabwean Dollar (1980–2008) +// * `ZWR` - Zimbabwean Dollar (2008) +// * `ZWL` - Zimbabwean Dollar (2009) +type IncomeStatementCurrency struct { + TransactionCurrencyEnum TransactionCurrencyEnum + String string + + typ string +} + +func (i *IncomeStatementCurrency) GetTransactionCurrencyEnum() TransactionCurrencyEnum { + if i == nil { + return "" + } + return i.TransactionCurrencyEnum +} + +func (i *IncomeStatementCurrency) GetString() string { + if i == nil { + return "" + } + return i.String +} + +func (i *IncomeStatementCurrency) UnmarshalJSON(data []byte) error { + var valueTransactionCurrencyEnum TransactionCurrencyEnum + if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { + i.typ = "TransactionCurrencyEnum" + i.TransactionCurrencyEnum = valueTransactionCurrencyEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + i.typ = "String" + i.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) +} + +func (i IncomeStatementCurrency) MarshalJSON() ([]byte, error) { + if i.typ == "TransactionCurrencyEnum" || i.TransactionCurrencyEnum != "" { + return json.Marshal(i.TransactionCurrencyEnum) + } + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) +} + +type IncomeStatementCurrencyVisitor interface { + VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error + VisitString(string) error +} + +func (i *IncomeStatementCurrency) Accept(visitor IncomeStatementCurrencyVisitor) error { + if i.typ == "TransactionCurrencyEnum" || i.TransactionCurrencyEnum != "" { + return visitor.VisitTransactionCurrencyEnum(i.TransactionCurrencyEnum) + } + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", i) +} + +type PaginatedIncomeStatementList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*IncomeStatement `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedIncomeStatementList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedIncomeStatementList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedIncomeStatementList) GetResults() []*IncomeStatement { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedIncomeStatementList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedIncomeStatementList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedIncomeStatementList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedIncomeStatementList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedIncomeStatementList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) } diff --git a/accounting/incomestatements/client.go b/accounting/incomestatements/client.go index 8b66566..1b7d66d 100644 --- a/accounting/incomestatements/client.go +++ b/accounting/incomestatements/client.go @@ -1,126 +1,137 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package incomestatements import ( context "context" fmt "fmt" - accounting "github.com/merge-api/merge-go-client/accounting" - core "github.com/merge-api/merge-go-client/core" + accounting "github.com/merge-api/merge-go-client/v2/accounting" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `IncomeStatement` objects. -func (c *Client) List(ctx context.Context, request *accounting.IncomeStatementsListRequest) (*accounting.PaginatedIncomeStatementList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/income-statements" - - queryParams := make(url.Values) - if request.CompanyId != nil { - queryParams.Add("company_id", fmt.Sprintf("%v", *request.CompanyId)) - } - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *accounting.PaginatedIncomeStatementList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *accounting.IncomeStatementsListRequest, + opts ...option.RequestOption, +) (*core.Page[*accounting.IncomeStatement], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/income-statements" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *accounting.PaginatedIncomeStatementList) *internal.PageResponse[*string, *accounting.IncomeStatement] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *accounting.IncomeStatement]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Returns an `IncomeStatement` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *accounting.IncomeStatementsRetrieveRequest) (*accounting.IncomeStatement, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"accounting/v1/income-statements/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *accounting.IncomeStatementsRetrieveRequest, + opts ...option.RequestOption, +) (*accounting.IncomeStatement, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/accounting/v1/income-statements/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *accounting.IncomeStatement if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/accounting/invoices.go b/accounting/invoices.go index 04cbaa7..b7431c2 100644 --- a/accounting/invoices.go +++ b/accounting/invoices.go @@ -1,6280 +1,183 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package accounting import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type InvoiceEndpointRequest struct { // Whether to include debug fields (such as log file links) in the response. - IsDebugMode *bool `json:"-"` + IsDebugMode *bool `json:"-" url:"is_debug_mode,omitempty"` // Whether or not third-party updates should be run asynchronously. - RunAsync *bool `json:"-"` - Model *InvoiceRequest `json:"model,omitempty"` + RunAsync *bool `json:"-" url:"run_async,omitempty"` + Model *InvoiceRequest `json:"model,omitempty" url:"-"` } type InvoicesLineItemsRemoteFieldClassesListRequest struct { // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, will only return remote field classes with this is_common_model_field value - IsCommonModelField *bool `json:"-"` + IsCommonModelField *bool `json:"-" url:"is_common_model_field,omitempty"` + // If provided, will only return remote fields classes with this is_custom value + IsCustom *bool `json:"-" url:"is_custom,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` } type InvoicesListRequest struct { // If provided, will only return invoices for this company. - CompanyId *string `json:"-"` + CompanyId *string `json:"-" url:"company_id,omitempty"` // If provided, will only return invoices for this contact. - ContactId *string `json:"-"` + ContactId *string `json:"-" url:"contact_id,omitempty"` // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *InvoicesListRequestExpand `json:"-"` + Expand []*InvoicesListRequestExpandItem `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - IncludeRemoteFields *bool `json:"-"` + IncludeRemoteFields *bool `json:"-" url:"include_remote_fields,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, will only return objects created after this datetime. - IssueDateAfter *time.Time `json:"-"` + IssueDateAfter *time.Time `json:"-" url:"issue_date_after,omitempty"` // If provided, will only return objects created before this datetime. - IssueDateBefore *time.Time `json:"-"` + IssueDateBefore *time.Time `json:"-" url:"issue_date_before,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // If provided, will only return Invoices with this number. - Number *string `json:"-"` + Number *string `json:"-" url:"number,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // Deprecated. Use show_enum_origins. - RemoteFields *string `json:"-"` + RemoteFields *string `json:"-" url:"remote_fields,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` // 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) - ShowEnumOrigins *string `json:"-"` + ShowEnumOrigins *string `json:"-" url:"show_enum_origins,omitempty"` // If provided, will only return Invoices with this status. // - // - `PAID` - PAID - // - `DRAFT` - DRAFT - // - `SUBMITTED` - SUBMITTED - // - `PARTIALLY_PAID` - PARTIALLY_PAID - // - `OPEN` - OPEN - // - `VOID` - VOID - Status *InvoicesListRequestStatus `json:"-"` + // * `PAID` - PAID + // * `DRAFT` - DRAFT + // * `SUBMITTED` - SUBMITTED + // * `PARTIALLY_PAID` - PARTIALLY_PAID + // * `OPEN` - OPEN + // * `VOID` - VOID + Status *InvoicesListRequestStatus `json:"-" url:"status,omitempty"` // If provided, will only return Invoices with this type. // - // - `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE - // - `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE - Type *InvoicesListRequestType `json:"-"` + // * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE + // * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE + Type *InvoicesListRequestType `json:"-" url:"type,omitempty"` } type PatchedInvoiceEndpointRequest struct { // Whether to include debug fields (such as log file links) in the response. - IsDebugMode *bool `json:"-"` + IsDebugMode *bool `json:"-" url:"is_debug_mode,omitempty"` // Whether or not third-party updates should be run asynchronously. - RunAsync *bool `json:"-"` - Model *InvoiceRequest `json:"model,omitempty"` + RunAsync *bool `json:"-" url:"run_async,omitempty"` + Model *InvoiceRequest `json:"model,omitempty" url:"-"` } type InvoicesRemoteFieldClassesListRequest struct { // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, will only return remote field classes with this is_common_model_field value - IsCommonModelField *bool `json:"-"` + IsCommonModelField *bool `json:"-" url:"is_common_model_field,omitempty"` + // If provided, will only return remote fields classes with this is_custom value + IsCustom *bool `json:"-" url:"is_custom,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` } type InvoicesRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *InvoicesRetrieveRequestExpand `json:"-"` + Expand []*InvoicesRetrieveRequestExpandItem `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - IncludeRemoteFields *bool `json:"-"` + IncludeRemoteFields *bool `json:"-" url:"include_remote_fields,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // Deprecated. Use show_enum_origins. - RemoteFields *string `json:"-"` + RemoteFields *string `json:"-" url:"remote_fields,omitempty"` // 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) - ShowEnumOrigins *string `json:"-"` + ShowEnumOrigins *string `json:"-" url:"show_enum_origins,omitempty"` } -type InvoicesListRequestExpand string +type InvoicesListRequestExpandItem string const ( - InvoicesListRequestExpandAccountingPeriod InvoicesListRequestExpand = "accounting_period" - InvoicesListRequestExpandAppliedCreditNotes InvoicesListRequestExpand = "applied_credit_notes" - InvoicesListRequestExpandAppliedCreditNotesAccountingPeriod InvoicesListRequestExpand = "applied_credit_notes,accounting_period" - InvoicesListRequestExpandAppliedCreditNotesAppliedVendorCredits InvoicesListRequestExpand = "applied_credit_notes,applied_vendor_credits" - InvoicesListRequestExpandAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandAppliedCreditNotesAppliedVendorCreditsCompany InvoicesListRequestExpand = "applied_credit_notes,applied_vendor_credits,company" - InvoicesListRequestExpandAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesListRequestExpandAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandAppliedCreditNotesAppliedVendorCreditsContact InvoicesListRequestExpand = "applied_credit_notes,applied_vendor_credits,contact" - InvoicesListRequestExpandAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesListRequestExpandAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesListRequestExpand = "applied_credit_notes,applied_vendor_credits,employee" - InvoicesListRequestExpandAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandAppliedCreditNotesCompany InvoicesListRequestExpand = "applied_credit_notes,company" - InvoicesListRequestExpandAppliedCreditNotesCompanyAccountingPeriod InvoicesListRequestExpand = "applied_credit_notes,company,accounting_period" - InvoicesListRequestExpandAppliedCreditNotesCompanyEmployee InvoicesListRequestExpand = "applied_credit_notes,company,employee" - InvoicesListRequestExpandAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_credit_notes,company,employee,accounting_period" - InvoicesListRequestExpandAppliedCreditNotesContact InvoicesListRequestExpand = "applied_credit_notes,contact" - InvoicesListRequestExpandAppliedCreditNotesContactAccountingPeriod InvoicesListRequestExpand = "applied_credit_notes,contact,accounting_period" - InvoicesListRequestExpandAppliedCreditNotesContactCompany InvoicesListRequestExpand = "applied_credit_notes,contact,company" - InvoicesListRequestExpandAppliedCreditNotesContactCompanyAccountingPeriod InvoicesListRequestExpand = "applied_credit_notes,contact,company,accounting_period" - InvoicesListRequestExpandAppliedCreditNotesContactCompanyEmployee InvoicesListRequestExpand = "applied_credit_notes,contact,company,employee" - InvoicesListRequestExpandAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_credit_notes,contact,company,employee,accounting_period" - InvoicesListRequestExpandAppliedCreditNotesContactEmployee InvoicesListRequestExpand = "applied_credit_notes,contact,employee" - InvoicesListRequestExpandAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_credit_notes,contact,employee,accounting_period" - InvoicesListRequestExpandAppliedCreditNotesEmployee InvoicesListRequestExpand = "applied_credit_notes,employee" - InvoicesListRequestExpandAppliedCreditNotesEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_credit_notes,employee,accounting_period" - InvoicesListRequestExpandAppliedPayments InvoicesListRequestExpand = "applied_payments" - InvoicesListRequestExpandAppliedPaymentsAccountingPeriod InvoicesListRequestExpand = "applied_payments,accounting_period" - InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotes InvoicesListRequestExpand = "applied_payments,applied_credit_notes" - InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesAccountingPeriod InvoicesListRequestExpand = "applied_payments,applied_credit_notes,accounting_period" - InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCredits InvoicesListRequestExpand = "applied_payments,applied_credit_notes,applied_vendor_credits" - InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "applied_payments,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompany InvoicesListRequestExpand = "applied_payments,applied_credit_notes,applied_vendor_credits,company" - InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "applied_payments,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContact InvoicesListRequestExpand = "applied_payments,applied_credit_notes,applied_vendor_credits,contact" - InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "applied_payments,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "applied_payments,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "applied_payments,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "applied_payments,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesListRequestExpand = "applied_payments,applied_credit_notes,applied_vendor_credits,employee" - InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesCompany InvoicesListRequestExpand = "applied_payments,applied_credit_notes,company" - InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,applied_credit_notes,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesCompanyEmployee InvoicesListRequestExpand = "applied_payments,applied_credit_notes,company,employee" - InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,applied_credit_notes,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesContact InvoicesListRequestExpand = "applied_payments,applied_credit_notes,contact" - InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesContactAccountingPeriod InvoicesListRequestExpand = "applied_payments,applied_credit_notes,contact,accounting_period" - InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesContactCompany InvoicesListRequestExpand = "applied_payments,applied_credit_notes,contact,company" - InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesContactCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,applied_credit_notes,contact,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesContactCompanyEmployee InvoicesListRequestExpand = "applied_payments,applied_credit_notes,contact,company,employee" - InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesContactEmployee InvoicesListRequestExpand = "applied_payments,applied_credit_notes,contact,employee" - InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,applied_credit_notes,contact,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesEmployee InvoicesListRequestExpand = "applied_payments,applied_credit_notes,employee" - InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,applied_credit_notes,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsAppliedVendorCredits InvoicesListRequestExpand = "applied_payments,applied_vendor_credits" - InvoicesListRequestExpandAppliedPaymentsAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "applied_payments,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandAppliedPaymentsAppliedVendorCreditsCompany InvoicesListRequestExpand = "applied_payments,applied_vendor_credits,company" - InvoicesListRequestExpandAppliedPaymentsAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "applied_payments,applied_vendor_credits,company,employee" - InvoicesListRequestExpandAppliedPaymentsAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsAppliedVendorCreditsContact InvoicesListRequestExpand = "applied_payments,applied_vendor_credits,contact" - InvoicesListRequestExpandAppliedPaymentsAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "applied_payments,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandAppliedPaymentsAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "applied_payments,applied_vendor_credits,contact,company" - InvoicesListRequestExpandAppliedPaymentsAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "applied_payments,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandAppliedPaymentsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "applied_payments,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandAppliedPaymentsAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsAppliedVendorCreditsEmployee InvoicesListRequestExpand = "applied_payments,applied_vendor_credits,employee" - InvoicesListRequestExpandAppliedPaymentsAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsCompany InvoicesListRequestExpand = "applied_payments,company" - InvoicesListRequestExpandAppliedPaymentsCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsCompanyEmployee InvoicesListRequestExpand = "applied_payments,company,employee" - InvoicesListRequestExpandAppliedPaymentsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsContact InvoicesListRequestExpand = "applied_payments,contact" - InvoicesListRequestExpandAppliedPaymentsContactAccountingPeriod InvoicesListRequestExpand = "applied_payments,contact,accounting_period" - InvoicesListRequestExpandAppliedPaymentsContactCompany InvoicesListRequestExpand = "applied_payments,contact,company" - InvoicesListRequestExpandAppliedPaymentsContactCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,contact,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsContactCompanyEmployee InvoicesListRequestExpand = "applied_payments,contact,company,employee" - InvoicesListRequestExpandAppliedPaymentsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,contact,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsContactEmployee InvoicesListRequestExpand = "applied_payments,contact,employee" - InvoicesListRequestExpandAppliedPaymentsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,contact,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsEmployee InvoicesListRequestExpand = "applied_payments,employee" - InvoicesListRequestExpandAppliedPaymentsEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItems InvoicesListRequestExpand = "applied_payments,line_items" - InvoicesListRequestExpandAppliedPaymentsLineItemsAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotes InvoicesListRequestExpand = "applied_payments,line_items,applied_credit_notes" - InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,applied_credit_notes,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCredits InvoicesListRequestExpand = "applied_payments,line_items,applied_credit_notes,applied_vendor_credits" - InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompany InvoicesListRequestExpand = "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company" - InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContact InvoicesListRequestExpand = "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact" - InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesListRequestExpand = "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesCompany InvoicesListRequestExpand = "applied_payments,line_items,applied_credit_notes,company" - InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,applied_credit_notes,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesCompanyEmployee InvoicesListRequestExpand = "applied_payments,line_items,applied_credit_notes,company,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,applied_credit_notes,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesContact InvoicesListRequestExpand = "applied_payments,line_items,applied_credit_notes,contact" - InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesContactAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,applied_credit_notes,contact,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesContactCompany InvoicesListRequestExpand = "applied_payments,line_items,applied_credit_notes,contact,company" - InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesContactCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,applied_credit_notes,contact,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesContactCompanyEmployee InvoicesListRequestExpand = "applied_payments,line_items,applied_credit_notes,contact,company,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesContactEmployee InvoicesListRequestExpand = "applied_payments,line_items,applied_credit_notes,contact,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,applied_credit_notes,contact,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesEmployee InvoicesListRequestExpand = "applied_payments,line_items,applied_credit_notes,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,applied_credit_notes,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedVendorCredits InvoicesListRequestExpand = "applied_payments,line_items,applied_vendor_credits" - InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsCompany InvoicesListRequestExpand = "applied_payments,line_items,applied_vendor_credits,company" - InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "applied_payments,line_items,applied_vendor_credits,company,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsContact InvoicesListRequestExpand = "applied_payments,line_items,applied_vendor_credits,contact" - InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "applied_payments,line_items,applied_vendor_credits,contact,company" - InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "applied_payments,line_items,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "applied_payments,line_items,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsEmployee InvoicesListRequestExpand = "applied_payments,line_items,applied_vendor_credits,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsCompany InvoicesListRequestExpand = "applied_payments,line_items,company" - InvoicesListRequestExpandAppliedPaymentsLineItemsCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsCompanyEmployee InvoicesListRequestExpand = "applied_payments,line_items,company,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsContact InvoicesListRequestExpand = "applied_payments,line_items,contact" - InvoicesListRequestExpandAppliedPaymentsLineItemsContactAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,contact,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsContactCompany InvoicesListRequestExpand = "applied_payments,line_items,contact,company" - InvoicesListRequestExpandAppliedPaymentsLineItemsContactCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,contact,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsContactCompanyEmployee InvoicesListRequestExpand = "applied_payments,line_items,contact,company,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,contact,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsContactEmployee InvoicesListRequestExpand = "applied_payments,line_items,contact,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,contact,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsEmployee InvoicesListRequestExpand = "applied_payments,line_items,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrders InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotes InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCredits InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompany InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,company" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployee InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,company,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContact InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,contact" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,contact,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompany InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployee InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactEmployee InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,contact,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,contact,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesEmployee InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCredits InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,applied_vendor_credits" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompany InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,applied_vendor_credits,company" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,applied_vendor_credits,company,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContact InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,applied_vendor_credits,contact" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsEmployee InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,applied_vendor_credits,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersCompany InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,company" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersCompanyEmployee InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,company,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersContact InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,contact" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersContactAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,contact,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersContactCompany InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,contact,company" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersContactCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,contact,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersContactCompanyEmployee InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,contact,company,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,contact,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersContactEmployee InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,contact,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersContactEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,contact,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersEmployee InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,purchase_orders,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategories InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotes InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCredits InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompany InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContact InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompany InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,company" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployee InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,company,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContact InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,contact" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,contact,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompany InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployee InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactEmployee InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,contact,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,contact,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesEmployee InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCredits InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,applied_vendor_credits" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompany InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,applied_vendor_credits,company" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,applied_vendor_credits,company,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContact InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,applied_vendor_credits,contact" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsEmployee InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,applied_vendor_credits,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesCompany InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,company" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesCompanyEmployee InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,company,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesContact InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,contact" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesContactAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,contact,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesContactCompany InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,contact,company" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesContactCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,contact,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesContactCompanyEmployee InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,contact,company,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,contact,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesContactEmployee InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,contact,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesContactEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,contact,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesEmployee InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrders InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotes InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCredits InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompany InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployee InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContact InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompany InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployee InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployee InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployee InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCredits InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompany InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContact InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployee InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompany InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,company" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployee InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,company,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContact InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,contact" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,contact,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompany InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,contact,company" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,contact,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployee InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,contact,company,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,contact,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactEmployee InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,contact,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,contact,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersEmployee InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,employee" - InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrders InvoicesListRequestExpand = "applied_payments,purchase_orders" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAccountingPeriod InvoicesListRequestExpand = "applied_payments,purchase_orders,accounting_period" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotes InvoicesListRequestExpand = "applied_payments,purchase_orders,applied_credit_notes" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAccountingPeriod InvoicesListRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,accounting_period" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCredits InvoicesListRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany InvoicesListRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact InvoicesListRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesListRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,employee" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesCompany InvoicesListRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,company" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesCompanyEmployee InvoicesListRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,company,employee" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesContact InvoicesListRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,contact" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactAccountingPeriod InvoicesListRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,contact,accounting_period" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompany InvoicesListRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,contact,company" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,contact,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyEmployee InvoicesListRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,contact,company,employee" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactEmployee InvoicesListRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,contact,employee" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,contact,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesEmployee InvoicesListRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,employee" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCredits InvoicesListRequestExpand = "applied_payments,purchase_orders,applied_vendor_credits" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "applied_payments,purchase_orders,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompany InvoicesListRequestExpand = "applied_payments,purchase_orders,applied_vendor_credits,company" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,purchase_orders,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "applied_payments,purchase_orders,applied_vendor_credits,company,employee" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,purchase_orders,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContact InvoicesListRequestExpand = "applied_payments,purchase_orders,applied_vendor_credits,contact" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "applied_payments,purchase_orders,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "applied_payments,purchase_orders,applied_vendor_credits,contact,company" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,purchase_orders,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "applied_payments,purchase_orders,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "applied_payments,purchase_orders,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,purchase_orders,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsEmployee InvoicesListRequestExpand = "applied_payments,purchase_orders,applied_vendor_credits,employee" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,purchase_orders,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersCompany InvoicesListRequestExpand = "applied_payments,purchase_orders,company" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,purchase_orders,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersCompanyEmployee InvoicesListRequestExpand = "applied_payments,purchase_orders,company,employee" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,purchase_orders,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersContact InvoicesListRequestExpand = "applied_payments,purchase_orders,contact" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersContactAccountingPeriod InvoicesListRequestExpand = "applied_payments,purchase_orders,contact,accounting_period" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersContactCompany InvoicesListRequestExpand = "applied_payments,purchase_orders,contact,company" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersContactCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,purchase_orders,contact,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersContactCompanyEmployee InvoicesListRequestExpand = "applied_payments,purchase_orders,contact,company,employee" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,purchase_orders,contact,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersContactEmployee InvoicesListRequestExpand = "applied_payments,purchase_orders,contact,employee" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersContactEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,purchase_orders,contact,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersEmployee InvoicesListRequestExpand = "applied_payments,purchase_orders,employee" - InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,purchase_orders,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategories InvoicesListRequestExpand = "applied_payments,tracking_categories" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotes InvoicesListRequestExpand = "applied_payments,tracking_categories,applied_credit_notes" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCredits InvoicesListRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompany InvoicesListRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContact InvoicesListRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesListRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,employee" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesCompany InvoicesListRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,company" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesCompanyEmployee InvoicesListRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,company,employee" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesContact InvoicesListRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,contact" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,contact,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompany InvoicesListRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,contact,company" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,contact,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyEmployee InvoicesListRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,contact,company,employee" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactEmployee InvoicesListRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,contact,employee" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,contact,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesEmployee InvoicesListRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,employee" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCredits InvoicesListRequestExpand = "applied_payments,tracking_categories,applied_vendor_credits" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompany InvoicesListRequestExpand = "applied_payments,tracking_categories,applied_vendor_credits,company" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "applied_payments,tracking_categories,applied_vendor_credits,company,employee" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContact InvoicesListRequestExpand = "applied_payments,tracking_categories,applied_vendor_credits,contact" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "applied_payments,tracking_categories,applied_vendor_credits,contact,company" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "applied_payments,tracking_categories,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "applied_payments,tracking_categories,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsEmployee InvoicesListRequestExpand = "applied_payments,tracking_categories,applied_vendor_credits,employee" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesCompany InvoicesListRequestExpand = "applied_payments,tracking_categories,company" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesCompanyEmployee InvoicesListRequestExpand = "applied_payments,tracking_categories,company,employee" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesContact InvoicesListRequestExpand = "applied_payments,tracking_categories,contact" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesContactAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,contact,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesContactCompany InvoicesListRequestExpand = "applied_payments,tracking_categories,contact,company" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesContactCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,contact,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesContactCompanyEmployee InvoicesListRequestExpand = "applied_payments,tracking_categories,contact,company,employee" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,contact,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesContactEmployee InvoicesListRequestExpand = "applied_payments,tracking_categories,contact,employee" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesContactEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,contact,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesEmployee InvoicesListRequestExpand = "applied_payments,tracking_categories,employee" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrders InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotes InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCredits InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompany InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployee InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company,employee" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContact InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompany InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployee InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployee InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,employee" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployee InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,employee" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCredits InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompany InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company,employee" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContact InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployee InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,employee" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersCompany InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,company" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersCompanyEmployee InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,company,employee" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersContact InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,contact" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersContactAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,contact,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompany InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,contact,company" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,contact,company,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompanyEmployee InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,contact,company,employee" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,contact,company,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersContactEmployee InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,contact,employee" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,contact,employee,accounting_period" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersEmployee InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,employee" - InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_payments,tracking_categories,purchase_orders,employee,accounting_period" - InvoicesListRequestExpandAppliedVendorCredits InvoicesListRequestExpand = "applied_vendor_credits" - InvoicesListRequestExpandAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "applied_vendor_credits,accounting_period" - InvoicesListRequestExpandAppliedVendorCreditsCompany InvoicesListRequestExpand = "applied_vendor_credits,company" - InvoicesListRequestExpandAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "applied_vendor_credits,company,employee" - InvoicesListRequestExpandAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandAppliedVendorCreditsContact InvoicesListRequestExpand = "applied_vendor_credits,contact" - InvoicesListRequestExpandAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "applied_vendor_credits,contact,company" - InvoicesListRequestExpandAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "applied_vendor_credits,contact,employee" - InvoicesListRequestExpandAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandAppliedVendorCreditsEmployee InvoicesListRequestExpand = "applied_vendor_credits,employee" - InvoicesListRequestExpandAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandCompany InvoicesListRequestExpand = "company" - InvoicesListRequestExpandCompanyAccountingPeriod InvoicesListRequestExpand = "company,accounting_period" - InvoicesListRequestExpandCompanyEmployee InvoicesListRequestExpand = "company,employee" - InvoicesListRequestExpandCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "company,employee,accounting_period" - InvoicesListRequestExpandContact InvoicesListRequestExpand = "contact" - InvoicesListRequestExpandContactAccountingPeriod InvoicesListRequestExpand = "contact,accounting_period" - InvoicesListRequestExpandContactCompany InvoicesListRequestExpand = "contact,company" - InvoicesListRequestExpandContactCompanyAccountingPeriod InvoicesListRequestExpand = "contact,company,accounting_period" - InvoicesListRequestExpandContactCompanyEmployee InvoicesListRequestExpand = "contact,company,employee" - InvoicesListRequestExpandContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "contact,company,employee,accounting_period" - InvoicesListRequestExpandContactEmployee InvoicesListRequestExpand = "contact,employee" - InvoicesListRequestExpandContactEmployeeAccountingPeriod InvoicesListRequestExpand = "contact,employee,accounting_period" - InvoicesListRequestExpandEmployee InvoicesListRequestExpand = "employee" - InvoicesListRequestExpandEmployeeAccountingPeriod InvoicesListRequestExpand = "employee,accounting_period" - InvoicesListRequestExpandLineItems InvoicesListRequestExpand = "line_items" - InvoicesListRequestExpandLineItemsAccountingPeriod InvoicesListRequestExpand = "line_items,accounting_period" - InvoicesListRequestExpandLineItemsAppliedCreditNotes InvoicesListRequestExpand = "line_items,applied_credit_notes" - InvoicesListRequestExpandLineItemsAppliedCreditNotesAccountingPeriod InvoicesListRequestExpand = "line_items,applied_credit_notes,accounting_period" - InvoicesListRequestExpandLineItemsAppliedCreditNotesAppliedVendorCredits InvoicesListRequestExpand = "line_items,applied_credit_notes,applied_vendor_credits" - InvoicesListRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "line_items,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsCompany InvoicesListRequestExpand = "line_items,applied_credit_notes,applied_vendor_credits,company" - InvoicesListRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "line_items,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "line_items,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesListRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsContact InvoicesListRequestExpand = "line_items,applied_credit_notes,applied_vendor_credits,contact" - InvoicesListRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "line_items,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "line_items,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesListRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "line_items,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "line_items,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesListRequestExpand = "line_items,applied_credit_notes,applied_vendor_credits,employee" - InvoicesListRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandLineItemsAppliedCreditNotesCompany InvoicesListRequestExpand = "line_items,applied_credit_notes,company" - InvoicesListRequestExpandLineItemsAppliedCreditNotesCompanyAccountingPeriod InvoicesListRequestExpand = "line_items,applied_credit_notes,company,accounting_period" - InvoicesListRequestExpandLineItemsAppliedCreditNotesCompanyEmployee InvoicesListRequestExpand = "line_items,applied_credit_notes,company,employee" - InvoicesListRequestExpandLineItemsAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,applied_credit_notes,company,employee,accounting_period" - InvoicesListRequestExpandLineItemsAppliedCreditNotesContact InvoicesListRequestExpand = "line_items,applied_credit_notes,contact" - InvoicesListRequestExpandLineItemsAppliedCreditNotesContactAccountingPeriod InvoicesListRequestExpand = "line_items,applied_credit_notes,contact,accounting_period" - InvoicesListRequestExpandLineItemsAppliedCreditNotesContactCompany InvoicesListRequestExpand = "line_items,applied_credit_notes,contact,company" - InvoicesListRequestExpandLineItemsAppliedCreditNotesContactCompanyAccountingPeriod InvoicesListRequestExpand = "line_items,applied_credit_notes,contact,company,accounting_period" - InvoicesListRequestExpandLineItemsAppliedCreditNotesContactCompanyEmployee InvoicesListRequestExpand = "line_items,applied_credit_notes,contact,company,employee" - InvoicesListRequestExpandLineItemsAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesListRequestExpandLineItemsAppliedCreditNotesContactEmployee InvoicesListRequestExpand = "line_items,applied_credit_notes,contact,employee" - InvoicesListRequestExpandLineItemsAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,applied_credit_notes,contact,employee,accounting_period" - InvoicesListRequestExpandLineItemsAppliedCreditNotesEmployee InvoicesListRequestExpand = "line_items,applied_credit_notes,employee" - InvoicesListRequestExpandLineItemsAppliedCreditNotesEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,applied_credit_notes,employee,accounting_period" - InvoicesListRequestExpandLineItemsAppliedVendorCredits InvoicesListRequestExpand = "line_items,applied_vendor_credits" - InvoicesListRequestExpandLineItemsAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "line_items,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandLineItemsAppliedVendorCreditsCompany InvoicesListRequestExpand = "line_items,applied_vendor_credits,company" - InvoicesListRequestExpandLineItemsAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "line_items,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandLineItemsAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "line_items,applied_vendor_credits,company,employee" - InvoicesListRequestExpandLineItemsAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandLineItemsAppliedVendorCreditsContact InvoicesListRequestExpand = "line_items,applied_vendor_credits,contact" - InvoicesListRequestExpandLineItemsAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "line_items,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandLineItemsAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "line_items,applied_vendor_credits,contact,company" - InvoicesListRequestExpandLineItemsAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "line_items,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandLineItemsAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "line_items,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandLineItemsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandLineItemsAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "line_items,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandLineItemsAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandLineItemsAppliedVendorCreditsEmployee InvoicesListRequestExpand = "line_items,applied_vendor_credits,employee" - InvoicesListRequestExpandLineItemsAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandLineItemsCompany InvoicesListRequestExpand = "line_items,company" - InvoicesListRequestExpandLineItemsCompanyAccountingPeriod InvoicesListRequestExpand = "line_items,company,accounting_period" - InvoicesListRequestExpandLineItemsCompanyEmployee InvoicesListRequestExpand = "line_items,company,employee" - InvoicesListRequestExpandLineItemsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,company,employee,accounting_period" - InvoicesListRequestExpandLineItemsContact InvoicesListRequestExpand = "line_items,contact" - InvoicesListRequestExpandLineItemsContactAccountingPeriod InvoicesListRequestExpand = "line_items,contact,accounting_period" - InvoicesListRequestExpandLineItemsContactCompany InvoicesListRequestExpand = "line_items,contact,company" - InvoicesListRequestExpandLineItemsContactCompanyAccountingPeriod InvoicesListRequestExpand = "line_items,contact,company,accounting_period" - InvoicesListRequestExpandLineItemsContactCompanyEmployee InvoicesListRequestExpand = "line_items,contact,company,employee" - InvoicesListRequestExpandLineItemsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,contact,company,employee,accounting_period" - InvoicesListRequestExpandLineItemsContactEmployee InvoicesListRequestExpand = "line_items,contact,employee" - InvoicesListRequestExpandLineItemsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,contact,employee,accounting_period" - InvoicesListRequestExpandLineItemsEmployee InvoicesListRequestExpand = "line_items,employee" - InvoicesListRequestExpandLineItemsEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,employee,accounting_period" - InvoicesListRequestExpandLineItemsPurchaseOrders InvoicesListRequestExpand = "line_items,purchase_orders" - InvoicesListRequestExpandLineItemsPurchaseOrdersAccountingPeriod InvoicesListRequestExpand = "line_items,purchase_orders,accounting_period" - InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotes InvoicesListRequestExpand = "line_items,purchase_orders,applied_credit_notes" - InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAccountingPeriod InvoicesListRequestExpand = "line_items,purchase_orders,applied_credit_notes,accounting_period" - InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCredits InvoicesListRequestExpand = "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits" - InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany InvoicesListRequestExpand = "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company" - InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact InvoicesListRequestExpand = "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact" - InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesListRequestExpand = "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee" - InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesCompany InvoicesListRequestExpand = "line_items,purchase_orders,applied_credit_notes,company" - InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod InvoicesListRequestExpand = "line_items,purchase_orders,applied_credit_notes,company,accounting_period" - InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployee InvoicesListRequestExpand = "line_items,purchase_orders,applied_credit_notes,company,employee" - InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,purchase_orders,applied_credit_notes,company,employee,accounting_period" - InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesContact InvoicesListRequestExpand = "line_items,purchase_orders,applied_credit_notes,contact" - InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesContactAccountingPeriod InvoicesListRequestExpand = "line_items,purchase_orders,applied_credit_notes,contact,accounting_period" - InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesContactCompany InvoicesListRequestExpand = "line_items,purchase_orders,applied_credit_notes,contact,company" - InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod InvoicesListRequestExpand = "line_items,purchase_orders,applied_credit_notes,contact,company,accounting_period" - InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployee InvoicesListRequestExpand = "line_items,purchase_orders,applied_credit_notes,contact,company,employee" - InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesContactEmployee InvoicesListRequestExpand = "line_items,purchase_orders,applied_credit_notes,contact,employee" - InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,purchase_orders,applied_credit_notes,contact,employee,accounting_period" - InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesEmployee InvoicesListRequestExpand = "line_items,purchase_orders,applied_credit_notes,employee" - InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,purchase_orders,applied_credit_notes,employee,accounting_period" - InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedVendorCredits InvoicesListRequestExpand = "line_items,purchase_orders,applied_vendor_credits" - InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "line_items,purchase_orders,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsCompany InvoicesListRequestExpand = "line_items,purchase_orders,applied_vendor_credits,company" - InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "line_items,purchase_orders,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "line_items,purchase_orders,applied_vendor_credits,company,employee" - InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,purchase_orders,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsContact InvoicesListRequestExpand = "line_items,purchase_orders,applied_vendor_credits,contact" - InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "line_items,purchase_orders,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "line_items,purchase_orders,applied_vendor_credits,contact,company" - InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "line_items,purchase_orders,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "line_items,purchase_orders,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "line_items,purchase_orders,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,purchase_orders,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsEmployee InvoicesListRequestExpand = "line_items,purchase_orders,applied_vendor_credits,employee" - InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,purchase_orders,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandLineItemsPurchaseOrdersCompany InvoicesListRequestExpand = "line_items,purchase_orders,company" - InvoicesListRequestExpandLineItemsPurchaseOrdersCompanyAccountingPeriod InvoicesListRequestExpand = "line_items,purchase_orders,company,accounting_period" - InvoicesListRequestExpandLineItemsPurchaseOrdersCompanyEmployee InvoicesListRequestExpand = "line_items,purchase_orders,company,employee" - InvoicesListRequestExpandLineItemsPurchaseOrdersCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,purchase_orders,company,employee,accounting_period" - InvoicesListRequestExpandLineItemsPurchaseOrdersContact InvoicesListRequestExpand = "line_items,purchase_orders,contact" - InvoicesListRequestExpandLineItemsPurchaseOrdersContactAccountingPeriod InvoicesListRequestExpand = "line_items,purchase_orders,contact,accounting_period" - InvoicesListRequestExpandLineItemsPurchaseOrdersContactCompany InvoicesListRequestExpand = "line_items,purchase_orders,contact,company" - InvoicesListRequestExpandLineItemsPurchaseOrdersContactCompanyAccountingPeriod InvoicesListRequestExpand = "line_items,purchase_orders,contact,company,accounting_period" - InvoicesListRequestExpandLineItemsPurchaseOrdersContactCompanyEmployee InvoicesListRequestExpand = "line_items,purchase_orders,contact,company,employee" - InvoicesListRequestExpandLineItemsPurchaseOrdersContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,purchase_orders,contact,company,employee,accounting_period" - InvoicesListRequestExpandLineItemsPurchaseOrdersContactEmployee InvoicesListRequestExpand = "line_items,purchase_orders,contact,employee" - InvoicesListRequestExpandLineItemsPurchaseOrdersContactEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,purchase_orders,contact,employee,accounting_period" - InvoicesListRequestExpandLineItemsPurchaseOrdersEmployee InvoicesListRequestExpand = "line_items,purchase_orders,employee" - InvoicesListRequestExpandLineItemsPurchaseOrdersEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,purchase_orders,employee,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategories InvoicesListRequestExpand = "line_items,tracking_categories" - InvoicesListRequestExpandLineItemsTrackingCategoriesAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotes InvoicesListRequestExpand = "line_items,tracking_categories,applied_credit_notes" - InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,applied_credit_notes,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCredits InvoicesListRequestExpand = "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits" - InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompany InvoicesListRequestExpand = "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company" - InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContact InvoicesListRequestExpand = "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact" - InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesListRequestExpand = "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee" - InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesCompany InvoicesListRequestExpand = "line_items,tracking_categories,applied_credit_notes,company" - InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,applied_credit_notes,company,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployee InvoicesListRequestExpand = "line_items,tracking_categories,applied_credit_notes,company,employee" - InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,applied_credit_notes,company,employee,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesContact InvoicesListRequestExpand = "line_items,tracking_categories,applied_credit_notes,contact" - InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesContactAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,applied_credit_notes,contact,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesContactCompany InvoicesListRequestExpand = "line_items,tracking_categories,applied_credit_notes,contact,company" - InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,applied_credit_notes,contact,company,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployee InvoicesListRequestExpand = "line_items,tracking_categories,applied_credit_notes,contact,company,employee" - InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesContactEmployee InvoicesListRequestExpand = "line_items,tracking_categories,applied_credit_notes,contact,employee" - InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,applied_credit_notes,contact,employee,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesEmployee InvoicesListRequestExpand = "line_items,tracking_categories,applied_credit_notes,employee" - InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,applied_credit_notes,employee,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedVendorCredits InvoicesListRequestExpand = "line_items,tracking_categories,applied_vendor_credits" - InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsCompany InvoicesListRequestExpand = "line_items,tracking_categories,applied_vendor_credits,company" - InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "line_items,tracking_categories,applied_vendor_credits,company,employee" - InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsContact InvoicesListRequestExpand = "line_items,tracking_categories,applied_vendor_credits,contact" - InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "line_items,tracking_categories,applied_vendor_credits,contact,company" - InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "line_items,tracking_categories,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "line_items,tracking_categories,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsEmployee InvoicesListRequestExpand = "line_items,tracking_categories,applied_vendor_credits,employee" - InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesCompany InvoicesListRequestExpand = "line_items,tracking_categories,company" - InvoicesListRequestExpandLineItemsTrackingCategoriesCompanyAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,company,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesCompanyEmployee InvoicesListRequestExpand = "line_items,tracking_categories,company,employee" - InvoicesListRequestExpandLineItemsTrackingCategoriesCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,company,employee,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesContact InvoicesListRequestExpand = "line_items,tracking_categories,contact" - InvoicesListRequestExpandLineItemsTrackingCategoriesContactAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,contact,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesContactCompany InvoicesListRequestExpand = "line_items,tracking_categories,contact,company" - InvoicesListRequestExpandLineItemsTrackingCategoriesContactCompanyAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,contact,company,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesContactCompanyEmployee InvoicesListRequestExpand = "line_items,tracking_categories,contact,company,employee" - InvoicesListRequestExpandLineItemsTrackingCategoriesContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,contact,company,employee,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesContactEmployee InvoicesListRequestExpand = "line_items,tracking_categories,contact,employee" - InvoicesListRequestExpandLineItemsTrackingCategoriesContactEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,contact,employee,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesEmployee InvoicesListRequestExpand = "line_items,tracking_categories,employee" - InvoicesListRequestExpandLineItemsTrackingCategoriesEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,employee,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrders InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotes InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCredits InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompany InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,company" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployee InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContact InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,contact" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompany InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployee InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployee InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployee InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,employee" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCredits InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,applied_vendor_credits" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompany InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,applied_vendor_credits,company" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContact InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployee InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersCompany InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,company" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,company,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployee InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,company,employee" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,company,employee,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersContact InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,contact" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersContactAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,contact,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersContactCompany InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,contact,company" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,contact,company,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployee InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,contact,company,employee" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,contact,company,employee,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersContactEmployee InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,contact,employee" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,contact,employee,accounting_period" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersEmployee InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,employee" - InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriod InvoicesListRequestExpand = "line_items,tracking_categories,purchase_orders,employee,accounting_period" - InvoicesListRequestExpandPayments InvoicesListRequestExpand = "payments" - InvoicesListRequestExpandPaymentsAccountingPeriod InvoicesListRequestExpand = "payments,accounting_period" - InvoicesListRequestExpandPaymentsAppliedCreditNotes InvoicesListRequestExpand = "payments,applied_credit_notes" - InvoicesListRequestExpandPaymentsAppliedCreditNotesAccountingPeriod InvoicesListRequestExpand = "payments,applied_credit_notes,accounting_period" - InvoicesListRequestExpandPaymentsAppliedCreditNotesAppliedVendorCredits InvoicesListRequestExpand = "payments,applied_credit_notes,applied_vendor_credits" - InvoicesListRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "payments,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsCompany InvoicesListRequestExpand = "payments,applied_credit_notes,applied_vendor_credits,company" - InvoicesListRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "payments,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesListRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsContact InvoicesListRequestExpand = "payments,applied_credit_notes,applied_vendor_credits,contact" - InvoicesListRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "payments,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "payments,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesListRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "payments,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "payments,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesListRequestExpand = "payments,applied_credit_notes,applied_vendor_credits,employee" - InvoicesListRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedCreditNotesCompany InvoicesListRequestExpand = "payments,applied_credit_notes,company" - InvoicesListRequestExpandPaymentsAppliedCreditNotesCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_credit_notes,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedCreditNotesCompanyEmployee InvoicesListRequestExpand = "payments,applied_credit_notes,company,employee" - InvoicesListRequestExpandPaymentsAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_credit_notes,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedCreditNotesContact InvoicesListRequestExpand = "payments,applied_credit_notes,contact" - InvoicesListRequestExpandPaymentsAppliedCreditNotesContactAccountingPeriod InvoicesListRequestExpand = "payments,applied_credit_notes,contact,accounting_period" - InvoicesListRequestExpandPaymentsAppliedCreditNotesContactCompany InvoicesListRequestExpand = "payments,applied_credit_notes,contact,company" - InvoicesListRequestExpandPaymentsAppliedCreditNotesContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_credit_notes,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedCreditNotesContactCompanyEmployee InvoicesListRequestExpand = "payments,applied_credit_notes,contact,company,employee" - InvoicesListRequestExpandPaymentsAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedCreditNotesContactEmployee InvoicesListRequestExpand = "payments,applied_credit_notes,contact,employee" - InvoicesListRequestExpandPaymentsAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_credit_notes,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedCreditNotesEmployee InvoicesListRequestExpand = "payments,applied_credit_notes,employee" - InvoicesListRequestExpandPaymentsAppliedCreditNotesEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_credit_notes,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPayments InvoicesListRequestExpand = "payments,applied_payments" - InvoicesListRequestExpandPaymentsAppliedPaymentsAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotes InvoicesListRequestExpand = "payments,applied_payments,applied_credit_notes" - InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,applied_credit_notes,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCredits InvoicesListRequestExpand = "payments,applied_payments,applied_credit_notes,applied_vendor_credits" - InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompany InvoicesListRequestExpand = "payments,applied_payments,applied_credit_notes,applied_vendor_credits,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContact InvoicesListRequestExpand = "payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact" - InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesListRequestExpand = "payments,applied_payments,applied_credit_notes,applied_vendor_credits,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesCompany InvoicesListRequestExpand = "payments,applied_payments,applied_credit_notes,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,applied_credit_notes,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,applied_credit_notes,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,applied_credit_notes,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesContact InvoicesListRequestExpand = "payments,applied_payments,applied_credit_notes,contact" - InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesContactAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,applied_credit_notes,contact,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesContactCompany InvoicesListRequestExpand = "payments,applied_payments,applied_credit_notes,contact,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,applied_credit_notes,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesContactCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,applied_credit_notes,contact,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesContactEmployee InvoicesListRequestExpand = "payments,applied_payments,applied_credit_notes,contact,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,applied_credit_notes,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesEmployee InvoicesListRequestExpand = "payments,applied_payments,applied_credit_notes,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,applied_credit_notes,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedVendorCredits InvoicesListRequestExpand = "payments,applied_payments,applied_vendor_credits" - InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsCompany InvoicesListRequestExpand = "payments,applied_payments,applied_vendor_credits,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,applied_vendor_credits,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsContact InvoicesListRequestExpand = "payments,applied_payments,applied_vendor_credits,contact" - InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "payments,applied_payments,applied_vendor_credits,contact,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "payments,applied_payments,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsEmployee InvoicesListRequestExpand = "payments,applied_payments,applied_vendor_credits,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsCompany InvoicesListRequestExpand = "payments,applied_payments,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsContact InvoicesListRequestExpand = "payments,applied_payments,contact" - InvoicesListRequestExpandPaymentsAppliedPaymentsContactAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,contact,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsContactCompany InvoicesListRequestExpand = "payments,applied_payments,contact,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsContactCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,contact,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsContactEmployee InvoicesListRequestExpand = "payments,applied_payments,contact,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsEmployee InvoicesListRequestExpand = "payments,applied_payments,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItems InvoicesListRequestExpand = "payments,applied_payments,line_items" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotes InvoicesListRequestExpand = "payments,applied_payments,line_items,applied_credit_notes" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCredits InvoicesListRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompany InvoicesListRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContact InvoicesListRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesCompany InvoicesListRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesContact InvoicesListRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,contact" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,contact,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactCompany InvoicesListRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,contact,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,contact,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,contact,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCredits InvoicesListRequestExpand = "payments,applied_payments,line_items,applied_vendor_credits" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsCompany InvoicesListRequestExpand = "payments,applied_payments,line_items,applied_vendor_credits,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,applied_vendor_credits,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContact InvoicesListRequestExpand = "payments,applied_payments,line_items,applied_vendor_credits,contact" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "payments,applied_payments,line_items,applied_vendor_credits,contact,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,applied_vendor_credits,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsCompany InvoicesListRequestExpand = "payments,applied_payments,line_items,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsContact InvoicesListRequestExpand = "payments,applied_payments,line_items,contact" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsContactAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,contact,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsContactCompany InvoicesListRequestExpand = "payments,applied_payments,line_items,contact,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsContactCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,contact,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsContactEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,contact,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrders InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotes InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCredits InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompany InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContact InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompany InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCredits InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompany InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContact InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersCompany InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersContact InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,contact" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersContactAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,contact,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersContactCompany InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,contact,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersContactCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,contact,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersContactEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,contact,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,purchase_orders,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategories InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotes InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCredits InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompany InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContact InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompany InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContact InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompany InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCredits InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompany InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContact InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesCompany InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesContact InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,contact" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesContactAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,contact,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesContactCompany InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,contact,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesContactCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,contact,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesContactEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,contact,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrders InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotes InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCredits InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompany InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContact InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompany InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCredits InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompany InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContact InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompany InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContact InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,contact" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompany InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersEmployee InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrders InvoicesListRequestExpand = "payments,applied_payments,purchase_orders" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotes InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCredits InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesCompany InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContact InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,contact" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,contact,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompany InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,contact,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,contact,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactEmployee InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,contact,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesEmployee InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCredits InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,applied_vendor_credits" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompany InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,applied_vendor_credits,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,applied_vendor_credits,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContact InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,applied_vendor_credits,contact" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,applied_vendor_credits,contact,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsEmployee InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,applied_vendor_credits,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersCompany InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersContact InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,contact" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersContactAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,contact,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersContactCompany InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,contact,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersContactCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,contact,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersContactEmployee InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,contact,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersEmployee InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,purchase_orders,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategories InvoicesListRequestExpand = "payments,applied_payments,tracking_categories" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotes InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCredits InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompany InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContact InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesCompany InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContact InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,contact" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,contact,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompany InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,contact,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,contact,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactEmployee InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,contact,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesEmployee InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCredits InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,applied_vendor_credits" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompany InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,applied_vendor_credits,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,applied_vendor_credits,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContact InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,applied_vendor_credits,contact" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,applied_vendor_credits,contact,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsEmployee InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,applied_vendor_credits,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesCompany InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesContact InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,contact" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesContactAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,contact,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesContactCompany InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,contact,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesContactCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,contact,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesContactEmployee InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,contact,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesEmployee InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrders InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotes InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCredits InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompany InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContact InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompany InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployee InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployee InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCredits InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompany InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContact InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployee InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersCompany InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContact InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,contact" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,contact,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompany InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,contact,company" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompanyEmployee InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,contact,company,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactEmployee InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,contact,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersEmployee InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,employee" - InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedVendorCredits InvoicesListRequestExpand = "payments,applied_vendor_credits" - InvoicesListRequestExpandPaymentsAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "payments,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandPaymentsAppliedVendorCreditsCompany InvoicesListRequestExpand = "payments,applied_vendor_credits,company" - InvoicesListRequestExpandPaymentsAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "payments,applied_vendor_credits,company,employee" - InvoicesListRequestExpandPaymentsAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedVendorCreditsContact InvoicesListRequestExpand = "payments,applied_vendor_credits,contact" - InvoicesListRequestExpandPaymentsAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "payments,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandPaymentsAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "payments,applied_vendor_credits,contact,company" - InvoicesListRequestExpandPaymentsAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "payments,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandPaymentsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "payments,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandPaymentsAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsAppliedVendorCreditsEmployee InvoicesListRequestExpand = "payments,applied_vendor_credits,employee" - InvoicesListRequestExpandPaymentsAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandPaymentsCompany InvoicesListRequestExpand = "payments,company" - InvoicesListRequestExpandPaymentsCompanyAccountingPeriod InvoicesListRequestExpand = "payments,company,accounting_period" - InvoicesListRequestExpandPaymentsCompanyEmployee InvoicesListRequestExpand = "payments,company,employee" - InvoicesListRequestExpandPaymentsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsContact InvoicesListRequestExpand = "payments,contact" - InvoicesListRequestExpandPaymentsContactAccountingPeriod InvoicesListRequestExpand = "payments,contact,accounting_period" - InvoicesListRequestExpandPaymentsContactCompany InvoicesListRequestExpand = "payments,contact,company" - InvoicesListRequestExpandPaymentsContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsContactCompanyEmployee InvoicesListRequestExpand = "payments,contact,company,employee" - InvoicesListRequestExpandPaymentsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsContactEmployee InvoicesListRequestExpand = "payments,contact,employee" - InvoicesListRequestExpandPaymentsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsEmployee InvoicesListRequestExpand = "payments,employee" - InvoicesListRequestExpandPaymentsEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItems InvoicesListRequestExpand = "payments,line_items" - InvoicesListRequestExpandPaymentsLineItemsAccountingPeriod InvoicesListRequestExpand = "payments,line_items,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotes InvoicesListRequestExpand = "payments,line_items,applied_credit_notes" - InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesAccountingPeriod InvoicesListRequestExpand = "payments,line_items,applied_credit_notes,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCredits InvoicesListRequestExpand = "payments,line_items,applied_credit_notes,applied_vendor_credits" - InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "payments,line_items,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompany InvoicesListRequestExpand = "payments,line_items,applied_credit_notes,applied_vendor_credits,company" - InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "payments,line_items,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "payments,line_items,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContact InvoicesListRequestExpand = "payments,line_items,applied_credit_notes,applied_vendor_credits,contact" - InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "payments,line_items,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "payments,line_items,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesListRequestExpand = "payments,line_items,applied_credit_notes,applied_vendor_credits,employee" - InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesCompany InvoicesListRequestExpand = "payments,line_items,applied_credit_notes,company" - InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesCompanyAccountingPeriod InvoicesListRequestExpand = "payments,line_items,applied_credit_notes,company,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesCompanyEmployee InvoicesListRequestExpand = "payments,line_items,applied_credit_notes,company,employee" - InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,applied_credit_notes,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesContact InvoicesListRequestExpand = "payments,line_items,applied_credit_notes,contact" - InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesContactAccountingPeriod InvoicesListRequestExpand = "payments,line_items,applied_credit_notes,contact,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesContactCompany InvoicesListRequestExpand = "payments,line_items,applied_credit_notes,contact,company" - InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,line_items,applied_credit_notes,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesContactCompanyEmployee InvoicesListRequestExpand = "payments,line_items,applied_credit_notes,contact,company,employee" - InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesContactEmployee InvoicesListRequestExpand = "payments,line_items,applied_credit_notes,contact,employee" - InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,applied_credit_notes,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesEmployee InvoicesListRequestExpand = "payments,line_items,applied_credit_notes,employee" - InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,applied_credit_notes,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsAppliedVendorCredits InvoicesListRequestExpand = "payments,line_items,applied_vendor_credits" - InvoicesListRequestExpandPaymentsLineItemsAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "payments,line_items,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsAppliedVendorCreditsCompany InvoicesListRequestExpand = "payments,line_items,applied_vendor_credits,company" - InvoicesListRequestExpandPaymentsLineItemsAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "payments,line_items,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "payments,line_items,applied_vendor_credits,company,employee" - InvoicesListRequestExpandPaymentsLineItemsAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsAppliedVendorCreditsContact InvoicesListRequestExpand = "payments,line_items,applied_vendor_credits,contact" - InvoicesListRequestExpandPaymentsLineItemsAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "payments,line_items,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "payments,line_items,applied_vendor_credits,contact,company" - InvoicesListRequestExpandPaymentsLineItemsAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,line_items,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "payments,line_items,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandPaymentsLineItemsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "payments,line_items,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandPaymentsLineItemsAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsAppliedVendorCreditsEmployee InvoicesListRequestExpand = "payments,line_items,applied_vendor_credits,employee" - InvoicesListRequestExpandPaymentsLineItemsAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsCompany InvoicesListRequestExpand = "payments,line_items,company" - InvoicesListRequestExpandPaymentsLineItemsCompanyAccountingPeriod InvoicesListRequestExpand = "payments,line_items,company,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsCompanyEmployee InvoicesListRequestExpand = "payments,line_items,company,employee" - InvoicesListRequestExpandPaymentsLineItemsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsContact InvoicesListRequestExpand = "payments,line_items,contact" - InvoicesListRequestExpandPaymentsLineItemsContactAccountingPeriod InvoicesListRequestExpand = "payments,line_items,contact,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsContactCompany InvoicesListRequestExpand = "payments,line_items,contact,company" - InvoicesListRequestExpandPaymentsLineItemsContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,line_items,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsContactCompanyEmployee InvoicesListRequestExpand = "payments,line_items,contact,company,employee" - InvoicesListRequestExpandPaymentsLineItemsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsContactEmployee InvoicesListRequestExpand = "payments,line_items,contact,employee" - InvoicesListRequestExpandPaymentsLineItemsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsEmployee InvoicesListRequestExpand = "payments,line_items,employee" - InvoicesListRequestExpandPaymentsLineItemsEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrders InvoicesListRequestExpand = "payments,line_items,purchase_orders" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAccountingPeriod InvoicesListRequestExpand = "payments,line_items,purchase_orders,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotes InvoicesListRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAccountingPeriod InvoicesListRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCredits InvoicesListRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany InvoicesListRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact InvoicesListRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesListRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompany InvoicesListRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,company" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod InvoicesListRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,company,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployee InvoicesListRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,company,employee" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContact InvoicesListRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,contact" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactAccountingPeriod InvoicesListRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,contact,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompany InvoicesListRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,contact,company" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployee InvoicesListRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,contact,company,employee" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactEmployee InvoicesListRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,contact,employee" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesEmployee InvoicesListRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,employee" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCredits InvoicesListRequestExpand = "payments,line_items,purchase_orders,applied_vendor_credits" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "payments,line_items,purchase_orders,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompany InvoicesListRequestExpand = "payments,line_items,purchase_orders,applied_vendor_credits,company" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "payments,line_items,purchase_orders,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "payments,line_items,purchase_orders,applied_vendor_credits,company,employee" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,purchase_orders,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContact InvoicesListRequestExpand = "payments,line_items,purchase_orders,applied_vendor_credits,contact" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "payments,line_items,purchase_orders,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "payments,line_items,purchase_orders,applied_vendor_credits,contact,company" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,line_items,purchase_orders,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "payments,line_items,purchase_orders,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "payments,line_items,purchase_orders,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,purchase_orders,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsEmployee InvoicesListRequestExpand = "payments,line_items,purchase_orders,applied_vendor_credits,employee" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,purchase_orders,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersCompany InvoicesListRequestExpand = "payments,line_items,purchase_orders,company" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersCompanyAccountingPeriod InvoicesListRequestExpand = "payments,line_items,purchase_orders,company,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersCompanyEmployee InvoicesListRequestExpand = "payments,line_items,purchase_orders,company,employee" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,purchase_orders,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersContact InvoicesListRequestExpand = "payments,line_items,purchase_orders,contact" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersContactAccountingPeriod InvoicesListRequestExpand = "payments,line_items,purchase_orders,contact,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersContactCompany InvoicesListRequestExpand = "payments,line_items,purchase_orders,contact,company" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,line_items,purchase_orders,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersContactCompanyEmployee InvoicesListRequestExpand = "payments,line_items,purchase_orders,contact,company,employee" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,purchase_orders,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersContactEmployee InvoicesListRequestExpand = "payments,line_items,purchase_orders,contact,employee" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,purchase_orders,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersEmployee InvoicesListRequestExpand = "payments,line_items,purchase_orders,employee" - InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,purchase_orders,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategories InvoicesListRequestExpand = "payments,line_items,tracking_categories" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotes InvoicesListRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCredits InvoicesListRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompany InvoicesListRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContact InvoicesListRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesListRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompany InvoicesListRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,company" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,company,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployee InvoicesListRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,company,employee" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContact InvoicesListRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,contact" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,contact,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompany InvoicesListRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,contact,company" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployee InvoicesListRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,contact,company,employee" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactEmployee InvoicesListRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,contact,employee" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesEmployee InvoicesListRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,employee" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCredits InvoicesListRequestExpand = "payments,line_items,tracking_categories,applied_vendor_credits" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompany InvoicesListRequestExpand = "payments,line_items,tracking_categories,applied_vendor_credits,company" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "payments,line_items,tracking_categories,applied_vendor_credits,company,employee" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContact InvoicesListRequestExpand = "payments,line_items,tracking_categories,applied_vendor_credits,contact" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "payments,line_items,tracking_categories,applied_vendor_credits,contact,company" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "payments,line_items,tracking_categories,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "payments,line_items,tracking_categories,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsEmployee InvoicesListRequestExpand = "payments,line_items,tracking_categories,applied_vendor_credits,employee" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesCompany InvoicesListRequestExpand = "payments,line_items,tracking_categories,company" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesCompanyAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,company,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesCompanyEmployee InvoicesListRequestExpand = "payments,line_items,tracking_categories,company,employee" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesContact InvoicesListRequestExpand = "payments,line_items,tracking_categories,contact" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesContactAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,contact,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesContactCompany InvoicesListRequestExpand = "payments,line_items,tracking_categories,contact,company" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesContactCompanyEmployee InvoicesListRequestExpand = "payments,line_items,tracking_categories,contact,company,employee" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesContactEmployee InvoicesListRequestExpand = "payments,line_items,tracking_categories,contact,employee" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesEmployee InvoicesListRequestExpand = "payments,line_items,tracking_categories,employee" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrders InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotes InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCredits InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompany InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployee InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContact InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompany InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployee InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployee InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployee InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,employee" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCredits InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompany InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContact InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployee InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompany InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,company" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,company,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployee InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,company,employee" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersContact InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,contact" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,contact,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompany InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,contact,company" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployee InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,contact,company,employee" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactEmployee InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,contact,employee" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersEmployee InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,employee" - InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,line_items,tracking_categories,purchase_orders,employee,accounting_period" - InvoicesListRequestExpandPaymentsPurchaseOrders InvoicesListRequestExpand = "payments,purchase_orders" - InvoicesListRequestExpandPaymentsPurchaseOrdersAccountingPeriod InvoicesListRequestExpand = "payments,purchase_orders,accounting_period" - InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotes InvoicesListRequestExpand = "payments,purchase_orders,applied_credit_notes" - InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAccountingPeriod InvoicesListRequestExpand = "payments,purchase_orders,applied_credit_notes,accounting_period" - InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCredits InvoicesListRequestExpand = "payments,purchase_orders,applied_credit_notes,applied_vendor_credits" - InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany InvoicesListRequestExpand = "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company" - InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact InvoicesListRequestExpand = "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact" - InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesListRequestExpand = "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,employee" - InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesCompany InvoicesListRequestExpand = "payments,purchase_orders,applied_credit_notes,company" - InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod InvoicesListRequestExpand = "payments,purchase_orders,applied_credit_notes,company,accounting_period" - InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesCompanyEmployee InvoicesListRequestExpand = "payments,purchase_orders,applied_credit_notes,company,employee" - InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,purchase_orders,applied_credit_notes,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesContact InvoicesListRequestExpand = "payments,purchase_orders,applied_credit_notes,contact" - InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesContactAccountingPeriod InvoicesListRequestExpand = "payments,purchase_orders,applied_credit_notes,contact,accounting_period" - InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesContactCompany InvoicesListRequestExpand = "payments,purchase_orders,applied_credit_notes,contact,company" - InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,purchase_orders,applied_credit_notes,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyEmployee InvoicesListRequestExpand = "payments,purchase_orders,applied_credit_notes,contact,company,employee" - InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesContactEmployee InvoicesListRequestExpand = "payments,purchase_orders,applied_credit_notes,contact,employee" - InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,purchase_orders,applied_credit_notes,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesEmployee InvoicesListRequestExpand = "payments,purchase_orders,applied_credit_notes,employee" - InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,purchase_orders,applied_credit_notes,employee,accounting_period" - InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedVendorCredits InvoicesListRequestExpand = "payments,purchase_orders,applied_vendor_credits" - InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "payments,purchase_orders,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsCompany InvoicesListRequestExpand = "payments,purchase_orders,applied_vendor_credits,company" - InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "payments,purchase_orders,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "payments,purchase_orders,applied_vendor_credits,company,employee" - InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,purchase_orders,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsContact InvoicesListRequestExpand = "payments,purchase_orders,applied_vendor_credits,contact" - InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "payments,purchase_orders,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "payments,purchase_orders,applied_vendor_credits,contact,company" - InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,purchase_orders,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "payments,purchase_orders,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "payments,purchase_orders,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,purchase_orders,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsEmployee InvoicesListRequestExpand = "payments,purchase_orders,applied_vendor_credits,employee" - InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,purchase_orders,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandPaymentsPurchaseOrdersCompany InvoicesListRequestExpand = "payments,purchase_orders,company" - InvoicesListRequestExpandPaymentsPurchaseOrdersCompanyAccountingPeriod InvoicesListRequestExpand = "payments,purchase_orders,company,accounting_period" - InvoicesListRequestExpandPaymentsPurchaseOrdersCompanyEmployee InvoicesListRequestExpand = "payments,purchase_orders,company,employee" - InvoicesListRequestExpandPaymentsPurchaseOrdersCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,purchase_orders,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsPurchaseOrdersContact InvoicesListRequestExpand = "payments,purchase_orders,contact" - InvoicesListRequestExpandPaymentsPurchaseOrdersContactAccountingPeriod InvoicesListRequestExpand = "payments,purchase_orders,contact,accounting_period" - InvoicesListRequestExpandPaymentsPurchaseOrdersContactCompany InvoicesListRequestExpand = "payments,purchase_orders,contact,company" - InvoicesListRequestExpandPaymentsPurchaseOrdersContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,purchase_orders,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsPurchaseOrdersContactCompanyEmployee InvoicesListRequestExpand = "payments,purchase_orders,contact,company,employee" - InvoicesListRequestExpandPaymentsPurchaseOrdersContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,purchase_orders,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsPurchaseOrdersContactEmployee InvoicesListRequestExpand = "payments,purchase_orders,contact,employee" - InvoicesListRequestExpandPaymentsPurchaseOrdersContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,purchase_orders,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsPurchaseOrdersEmployee InvoicesListRequestExpand = "payments,purchase_orders,employee" - InvoicesListRequestExpandPaymentsPurchaseOrdersEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,purchase_orders,employee,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategories InvoicesListRequestExpand = "payments,tracking_categories" - InvoicesListRequestExpandPaymentsTrackingCategoriesAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotes InvoicesListRequestExpand = "payments,tracking_categories,applied_credit_notes" - InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,applied_credit_notes,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCredits InvoicesListRequestExpand = "payments,tracking_categories,applied_credit_notes,applied_vendor_credits" - InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompany InvoicesListRequestExpand = "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company" - InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContact InvoicesListRequestExpand = "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact" - InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesListRequestExpand = "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,employee" - InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesCompany InvoicesListRequestExpand = "payments,tracking_categories,applied_credit_notes,company" - InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,applied_credit_notes,company,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesCompanyEmployee InvoicesListRequestExpand = "payments,tracking_categories,applied_credit_notes,company,employee" - InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,applied_credit_notes,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesContact InvoicesListRequestExpand = "payments,tracking_categories,applied_credit_notes,contact" - InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesContactAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,applied_credit_notes,contact,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesContactCompany InvoicesListRequestExpand = "payments,tracking_categories,applied_credit_notes,contact,company" - InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,applied_credit_notes,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyEmployee InvoicesListRequestExpand = "payments,tracking_categories,applied_credit_notes,contact,company,employee" - InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesContactEmployee InvoicesListRequestExpand = "payments,tracking_categories,applied_credit_notes,contact,employee" - InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,applied_credit_notes,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesEmployee InvoicesListRequestExpand = "payments,tracking_categories,applied_credit_notes,employee" - InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,applied_credit_notes,employee,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedVendorCredits InvoicesListRequestExpand = "payments,tracking_categories,applied_vendor_credits" - InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsCompany InvoicesListRequestExpand = "payments,tracking_categories,applied_vendor_credits,company" - InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "payments,tracking_categories,applied_vendor_credits,company,employee" - InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsContact InvoicesListRequestExpand = "payments,tracking_categories,applied_vendor_credits,contact" - InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "payments,tracking_categories,applied_vendor_credits,contact,company" - InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "payments,tracking_categories,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "payments,tracking_categories,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsEmployee InvoicesListRequestExpand = "payments,tracking_categories,applied_vendor_credits,employee" - InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesCompany InvoicesListRequestExpand = "payments,tracking_categories,company" - InvoicesListRequestExpandPaymentsTrackingCategoriesCompanyAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,company,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesCompanyEmployee InvoicesListRequestExpand = "payments,tracking_categories,company,employee" - InvoicesListRequestExpandPaymentsTrackingCategoriesCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesContact InvoicesListRequestExpand = "payments,tracking_categories,contact" - InvoicesListRequestExpandPaymentsTrackingCategoriesContactAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,contact,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesContactCompany InvoicesListRequestExpand = "payments,tracking_categories,contact,company" - InvoicesListRequestExpandPaymentsTrackingCategoriesContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesContactCompanyEmployee InvoicesListRequestExpand = "payments,tracking_categories,contact,company,employee" - InvoicesListRequestExpandPaymentsTrackingCategoriesContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesContactEmployee InvoicesListRequestExpand = "payments,tracking_categories,contact,employee" - InvoicesListRequestExpandPaymentsTrackingCategoriesContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesEmployee InvoicesListRequestExpand = "payments,tracking_categories,employee" - InvoicesListRequestExpandPaymentsTrackingCategoriesEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,employee,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrders InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotes InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCredits InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompany InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,company" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployee InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,company,employee" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContact InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,contact" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompany InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployee InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployee InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,contact,employee" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployee InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,employee" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCredits InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,applied_vendor_credits" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompany InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,applied_vendor_credits,company" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,applied_vendor_credits,company,employee" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContact InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,applied_vendor_credits,contact" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployee InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,applied_vendor_credits,employee" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersCompany InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,company" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,company,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersCompanyEmployee InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,company,employee" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersContact InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,contact" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersContactAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,contact,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersContactCompany InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,contact,company" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,contact,company,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersContactCompanyEmployee InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,contact,company,employee" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,contact,company,employee,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersContactEmployee InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,contact,employee" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,contact,employee,accounting_period" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersEmployee InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,employee" - InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriod InvoicesListRequestExpand = "payments,tracking_categories,purchase_orders,employee,accounting_period" - InvoicesListRequestExpandPurchaseOrders InvoicesListRequestExpand = "purchase_orders" - InvoicesListRequestExpandPurchaseOrdersAccountingPeriod InvoicesListRequestExpand = "purchase_orders,accounting_period" - InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotes InvoicesListRequestExpand = "purchase_orders,applied_credit_notes" - InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesAccountingPeriod InvoicesListRequestExpand = "purchase_orders,applied_credit_notes,accounting_period" - InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCredits InvoicesListRequestExpand = "purchase_orders,applied_credit_notes,applied_vendor_credits" - InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany InvoicesListRequestExpand = "purchase_orders,applied_credit_notes,applied_vendor_credits,company" - InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact InvoicesListRequestExpand = "purchase_orders,applied_credit_notes,applied_vendor_credits,contact" - InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesListRequestExpand = "purchase_orders,applied_credit_notes,applied_vendor_credits,employee" - InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesCompany InvoicesListRequestExpand = "purchase_orders,applied_credit_notes,company" - InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod InvoicesListRequestExpand = "purchase_orders,applied_credit_notes,company,accounting_period" - InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesCompanyEmployee InvoicesListRequestExpand = "purchase_orders,applied_credit_notes,company,employee" - InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "purchase_orders,applied_credit_notes,company,employee,accounting_period" - InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesContact InvoicesListRequestExpand = "purchase_orders,applied_credit_notes,contact" - InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesContactAccountingPeriod InvoicesListRequestExpand = "purchase_orders,applied_credit_notes,contact,accounting_period" - InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesContactCompany InvoicesListRequestExpand = "purchase_orders,applied_credit_notes,contact,company" - InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod InvoicesListRequestExpand = "purchase_orders,applied_credit_notes,contact,company,accounting_period" - InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesContactCompanyEmployee InvoicesListRequestExpand = "purchase_orders,applied_credit_notes,contact,company,employee" - InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "purchase_orders,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesContactEmployee InvoicesListRequestExpand = "purchase_orders,applied_credit_notes,contact,employee" - InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesListRequestExpand = "purchase_orders,applied_credit_notes,contact,employee,accounting_period" - InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesEmployee InvoicesListRequestExpand = "purchase_orders,applied_credit_notes,employee" - InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod InvoicesListRequestExpand = "purchase_orders,applied_credit_notes,employee,accounting_period" - InvoicesListRequestExpandPurchaseOrdersAppliedVendorCredits InvoicesListRequestExpand = "purchase_orders,applied_vendor_credits" - InvoicesListRequestExpandPurchaseOrdersAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "purchase_orders,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandPurchaseOrdersAppliedVendorCreditsCompany InvoicesListRequestExpand = "purchase_orders,applied_vendor_credits,company" - InvoicesListRequestExpandPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "purchase_orders,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandPurchaseOrdersAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "purchase_orders,applied_vendor_credits,company,employee" - InvoicesListRequestExpandPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "purchase_orders,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandPurchaseOrdersAppliedVendorCreditsContact InvoicesListRequestExpand = "purchase_orders,applied_vendor_credits,contact" - InvoicesListRequestExpandPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "purchase_orders,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandPurchaseOrdersAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "purchase_orders,applied_vendor_credits,contact,company" - InvoicesListRequestExpandPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "purchase_orders,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "purchase_orders,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandPurchaseOrdersAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "purchase_orders,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "purchase_orders,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandPurchaseOrdersAppliedVendorCreditsEmployee InvoicesListRequestExpand = "purchase_orders,applied_vendor_credits,employee" - InvoicesListRequestExpandPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "purchase_orders,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandPurchaseOrdersCompany InvoicesListRequestExpand = "purchase_orders,company" - InvoicesListRequestExpandPurchaseOrdersCompanyAccountingPeriod InvoicesListRequestExpand = "purchase_orders,company,accounting_period" - InvoicesListRequestExpandPurchaseOrdersCompanyEmployee InvoicesListRequestExpand = "purchase_orders,company,employee" - InvoicesListRequestExpandPurchaseOrdersCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "purchase_orders,company,employee,accounting_period" - InvoicesListRequestExpandPurchaseOrdersContact InvoicesListRequestExpand = "purchase_orders,contact" - InvoicesListRequestExpandPurchaseOrdersContactAccountingPeriod InvoicesListRequestExpand = "purchase_orders,contact,accounting_period" - InvoicesListRequestExpandPurchaseOrdersContactCompany InvoicesListRequestExpand = "purchase_orders,contact,company" - InvoicesListRequestExpandPurchaseOrdersContactCompanyAccountingPeriod InvoicesListRequestExpand = "purchase_orders,contact,company,accounting_period" - InvoicesListRequestExpandPurchaseOrdersContactCompanyEmployee InvoicesListRequestExpand = "purchase_orders,contact,company,employee" - InvoicesListRequestExpandPurchaseOrdersContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "purchase_orders,contact,company,employee,accounting_period" - InvoicesListRequestExpandPurchaseOrdersContactEmployee InvoicesListRequestExpand = "purchase_orders,contact,employee" - InvoicesListRequestExpandPurchaseOrdersContactEmployeeAccountingPeriod InvoicesListRequestExpand = "purchase_orders,contact,employee,accounting_period" - InvoicesListRequestExpandPurchaseOrdersEmployee InvoicesListRequestExpand = "purchase_orders,employee" - InvoicesListRequestExpandPurchaseOrdersEmployeeAccountingPeriod InvoicesListRequestExpand = "purchase_orders,employee,accounting_period" - InvoicesListRequestExpandTrackingCategories InvoicesListRequestExpand = "tracking_categories" - InvoicesListRequestExpandTrackingCategoriesAccountingPeriod InvoicesListRequestExpand = "tracking_categories,accounting_period" - InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotes InvoicesListRequestExpand = "tracking_categories,applied_credit_notes" - InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesAccountingPeriod InvoicesListRequestExpand = "tracking_categories,applied_credit_notes,accounting_period" - InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCredits InvoicesListRequestExpand = "tracking_categories,applied_credit_notes,applied_vendor_credits" - InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompany InvoicesListRequestExpand = "tracking_categories,applied_credit_notes,applied_vendor_credits,company" - InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContact InvoicesListRequestExpand = "tracking_categories,applied_credit_notes,applied_vendor_credits,contact" - InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesListRequestExpand = "tracking_categories,applied_credit_notes,applied_vendor_credits,employee" - InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesCompany InvoicesListRequestExpand = "tracking_categories,applied_credit_notes,company" - InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriod InvoicesListRequestExpand = "tracking_categories,applied_credit_notes,company,accounting_period" - InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesCompanyEmployee InvoicesListRequestExpand = "tracking_categories,applied_credit_notes,company,employee" - InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "tracking_categories,applied_credit_notes,company,employee,accounting_period" - InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesContact InvoicesListRequestExpand = "tracking_categories,applied_credit_notes,contact" - InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesContactAccountingPeriod InvoicesListRequestExpand = "tracking_categories,applied_credit_notes,contact,accounting_period" - InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesContactCompany InvoicesListRequestExpand = "tracking_categories,applied_credit_notes,contact,company" - InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriod InvoicesListRequestExpand = "tracking_categories,applied_credit_notes,contact,company,accounting_period" - InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesContactCompanyEmployee InvoicesListRequestExpand = "tracking_categories,applied_credit_notes,contact,company,employee" - InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "tracking_categories,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesContactEmployee InvoicesListRequestExpand = "tracking_categories,applied_credit_notes,contact,employee" - InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesListRequestExpand = "tracking_categories,applied_credit_notes,contact,employee,accounting_period" - InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesEmployee InvoicesListRequestExpand = "tracking_categories,applied_credit_notes,employee" - InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriod InvoicesListRequestExpand = "tracking_categories,applied_credit_notes,employee,accounting_period" - InvoicesListRequestExpandTrackingCategoriesAppliedVendorCredits InvoicesListRequestExpand = "tracking_categories,applied_vendor_credits" - InvoicesListRequestExpandTrackingCategoriesAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "tracking_categories,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandTrackingCategoriesAppliedVendorCreditsCompany InvoicesListRequestExpand = "tracking_categories,applied_vendor_credits,company" - InvoicesListRequestExpandTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "tracking_categories,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandTrackingCategoriesAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "tracking_categories,applied_vendor_credits,company,employee" - InvoicesListRequestExpandTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "tracking_categories,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandTrackingCategoriesAppliedVendorCreditsContact InvoicesListRequestExpand = "tracking_categories,applied_vendor_credits,contact" - InvoicesListRequestExpandTrackingCategoriesAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "tracking_categories,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandTrackingCategoriesAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "tracking_categories,applied_vendor_credits,contact,company" - InvoicesListRequestExpandTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "tracking_categories,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandTrackingCategoriesAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "tracking_categories,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandTrackingCategoriesAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "tracking_categories,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "tracking_categories,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandTrackingCategoriesAppliedVendorCreditsEmployee InvoicesListRequestExpand = "tracking_categories,applied_vendor_credits,employee" - InvoicesListRequestExpandTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "tracking_categories,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandTrackingCategoriesCompany InvoicesListRequestExpand = "tracking_categories,company" - InvoicesListRequestExpandTrackingCategoriesCompanyAccountingPeriod InvoicesListRequestExpand = "tracking_categories,company,accounting_period" - InvoicesListRequestExpandTrackingCategoriesCompanyEmployee InvoicesListRequestExpand = "tracking_categories,company,employee" - InvoicesListRequestExpandTrackingCategoriesCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "tracking_categories,company,employee,accounting_period" - InvoicesListRequestExpandTrackingCategoriesContact InvoicesListRequestExpand = "tracking_categories,contact" - InvoicesListRequestExpandTrackingCategoriesContactAccountingPeriod InvoicesListRequestExpand = "tracking_categories,contact,accounting_period" - InvoicesListRequestExpandTrackingCategoriesContactCompany InvoicesListRequestExpand = "tracking_categories,contact,company" - InvoicesListRequestExpandTrackingCategoriesContactCompanyAccountingPeriod InvoicesListRequestExpand = "tracking_categories,contact,company,accounting_period" - InvoicesListRequestExpandTrackingCategoriesContactCompanyEmployee InvoicesListRequestExpand = "tracking_categories,contact,company,employee" - InvoicesListRequestExpandTrackingCategoriesContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "tracking_categories,contact,company,employee,accounting_period" - InvoicesListRequestExpandTrackingCategoriesContactEmployee InvoicesListRequestExpand = "tracking_categories,contact,employee" - InvoicesListRequestExpandTrackingCategoriesContactEmployeeAccountingPeriod InvoicesListRequestExpand = "tracking_categories,contact,employee,accounting_period" - InvoicesListRequestExpandTrackingCategoriesEmployee InvoicesListRequestExpand = "tracking_categories,employee" - InvoicesListRequestExpandTrackingCategoriesEmployeeAccountingPeriod InvoicesListRequestExpand = "tracking_categories,employee,accounting_period" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrders InvoicesListRequestExpand = "tracking_categories,purchase_orders" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAccountingPeriod InvoicesListRequestExpand = "tracking_categories,purchase_orders,accounting_period" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotes InvoicesListRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriod InvoicesListRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,accounting_period" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCredits InvoicesListRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany InvoicesListRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact InvoicesListRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesListRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompany InvoicesListRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,company" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod InvoicesListRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployee InvoicesListRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,company,employee" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesContact InvoicesListRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,contact" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriod InvoicesListRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompany InvoicesListRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,contact,company" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod InvoicesListRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployee InvoicesListRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployee InvoicesListRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,contact,employee" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesListRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployee InvoicesListRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,employee" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod InvoicesListRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCredits InvoicesListRequestExpand = "tracking_categories,purchase_orders,applied_vendor_credits" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriod InvoicesListRequestExpand = "tracking_categories,purchase_orders,applied_vendor_credits,accounting_period" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompany InvoicesListRequestExpand = "tracking_categories,purchase_orders,applied_vendor_credits,company" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod InvoicesListRequestExpand = "tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployee InvoicesListRequestExpand = "tracking_categories,purchase_orders,applied_vendor_credits,company,employee" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContact InvoicesListRequestExpand = "tracking_categories,purchase_orders,applied_vendor_credits,contact" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod InvoicesListRequestExpand = "tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompany InvoicesListRequestExpand = "tracking_categories,purchase_orders,applied_vendor_credits,contact,company" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesListRequestExpand = "tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee InvoicesListRequestExpand = "tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployee InvoicesListRequestExpand = "tracking_categories,purchase_orders,applied_vendor_credits,contact,employee" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesListRequestExpand = "tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployee InvoicesListRequestExpand = "tracking_categories,purchase_orders,applied_vendor_credits,employee" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod InvoicesListRequestExpand = "tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersCompany InvoicesListRequestExpand = "tracking_categories,purchase_orders,company" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersCompanyAccountingPeriod InvoicesListRequestExpand = "tracking_categories,purchase_orders,company,accounting_period" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersCompanyEmployee InvoicesListRequestExpand = "tracking_categories,purchase_orders,company,employee" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "tracking_categories,purchase_orders,company,employee,accounting_period" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersContact InvoicesListRequestExpand = "tracking_categories,purchase_orders,contact" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersContactAccountingPeriod InvoicesListRequestExpand = "tracking_categories,purchase_orders,contact,accounting_period" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersContactCompany InvoicesListRequestExpand = "tracking_categories,purchase_orders,contact,company" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriod InvoicesListRequestExpand = "tracking_categories,purchase_orders,contact,company,accounting_period" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersContactCompanyEmployee InvoicesListRequestExpand = "tracking_categories,purchase_orders,contact,company,employee" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriod InvoicesListRequestExpand = "tracking_categories,purchase_orders,contact,company,employee,accounting_period" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersContactEmployee InvoicesListRequestExpand = "tracking_categories,purchase_orders,contact,employee" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriod InvoicesListRequestExpand = "tracking_categories,purchase_orders,contact,employee,accounting_period" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersEmployee InvoicesListRequestExpand = "tracking_categories,purchase_orders,employee" - InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriod InvoicesListRequestExpand = "tracking_categories,purchase_orders,employee,accounting_period" + InvoicesListRequestExpandItemAccountingPeriod InvoicesListRequestExpandItem = "accounting_period" + InvoicesListRequestExpandItemAppliedCreditNotes InvoicesListRequestExpandItem = "applied_credit_notes" + InvoicesListRequestExpandItemAppliedPayments InvoicesListRequestExpandItem = "applied_payments" + InvoicesListRequestExpandItemAppliedVendorCredits InvoicesListRequestExpandItem = "applied_vendor_credits" + InvoicesListRequestExpandItemCompany InvoicesListRequestExpandItem = "company" + InvoicesListRequestExpandItemContact InvoicesListRequestExpandItem = "contact" + InvoicesListRequestExpandItemEmployee InvoicesListRequestExpandItem = "employee" + InvoicesListRequestExpandItemLineItems InvoicesListRequestExpandItem = "line_items" + InvoicesListRequestExpandItemPaymentTerm InvoicesListRequestExpandItem = "payment_term" + InvoicesListRequestExpandItemPayments InvoicesListRequestExpandItem = "payments" + InvoicesListRequestExpandItemPurchaseOrders InvoicesListRequestExpandItem = "purchase_orders" + InvoicesListRequestExpandItemTrackingCategories InvoicesListRequestExpandItem = "tracking_categories" ) -func NewInvoicesListRequestExpandFromString(s string) (InvoicesListRequestExpand, error) { +func NewInvoicesListRequestExpandItemFromString(s string) (InvoicesListRequestExpandItem, error) { switch s { case "accounting_period": - return InvoicesListRequestExpandAccountingPeriod, nil + return InvoicesListRequestExpandItemAccountingPeriod, nil case "applied_credit_notes": - return InvoicesListRequestExpandAppliedCreditNotes, nil - case "applied_credit_notes,accounting_period": - return InvoicesListRequestExpandAppliedCreditNotesAccountingPeriod, nil - case "applied_credit_notes,applied_vendor_credits": - return InvoicesListRequestExpandAppliedCreditNotesAppliedVendorCredits, nil - case "applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "applied_credit_notes,applied_vendor_credits,company": - return InvoicesListRequestExpandAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "applied_credit_notes,applied_vendor_credits,contact": - return InvoicesListRequestExpandAppliedCreditNotesAppliedVendorCreditsContact, nil - case "applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "applied_credit_notes,applied_vendor_credits,employee": - return InvoicesListRequestExpandAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "applied_credit_notes,company": - return InvoicesListRequestExpandAppliedCreditNotesCompany, nil - case "applied_credit_notes,company,accounting_period": - return InvoicesListRequestExpandAppliedCreditNotesCompanyAccountingPeriod, nil - case "applied_credit_notes,company,employee": - return InvoicesListRequestExpandAppliedCreditNotesCompanyEmployee, nil - case "applied_credit_notes,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "applied_credit_notes,contact": - return InvoicesListRequestExpandAppliedCreditNotesContact, nil - case "applied_credit_notes,contact,accounting_period": - return InvoicesListRequestExpandAppliedCreditNotesContactAccountingPeriod, nil - case "applied_credit_notes,contact,company": - return InvoicesListRequestExpandAppliedCreditNotesContactCompany, nil - case "applied_credit_notes,contact,company,accounting_period": - return InvoicesListRequestExpandAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "applied_credit_notes,contact,company,employee": - return InvoicesListRequestExpandAppliedCreditNotesContactCompanyEmployee, nil - case "applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "applied_credit_notes,contact,employee": - return InvoicesListRequestExpandAppliedCreditNotesContactEmployee, nil - case "applied_credit_notes,contact,employee,accounting_period": - return InvoicesListRequestExpandAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "applied_credit_notes,employee": - return InvoicesListRequestExpandAppliedCreditNotesEmployee, nil - case "applied_credit_notes,employee,accounting_period": - return InvoicesListRequestExpandAppliedCreditNotesEmployeeAccountingPeriod, nil + return InvoicesListRequestExpandItemAppliedCreditNotes, nil case "applied_payments": - return InvoicesListRequestExpandAppliedPayments, nil - case "applied_payments,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsAccountingPeriod, nil - case "applied_payments,applied_credit_notes": - return InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotes, nil - case "applied_payments,applied_credit_notes,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesAccountingPeriod, nil - case "applied_payments,applied_credit_notes,applied_vendor_credits": - return InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCredits, nil - case "applied_payments,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "applied_payments,applied_credit_notes,applied_vendor_credits,company": - return InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "applied_payments,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "applied_payments,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "applied_payments,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "applied_payments,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContact, nil - case "applied_payments,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "applied_payments,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "applied_payments,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "applied_payments,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "applied_payments,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "applied_payments,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "applied_payments,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "applied_payments,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "applied_payments,applied_credit_notes,company": - return InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesCompany, nil - case "applied_payments,applied_credit_notes,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesCompanyAccountingPeriod, nil - case "applied_payments,applied_credit_notes,company,employee": - return InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesCompanyEmployee, nil - case "applied_payments,applied_credit_notes,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "applied_payments,applied_credit_notes,contact": - return InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesContact, nil - case "applied_payments,applied_credit_notes,contact,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesContactAccountingPeriod, nil - case "applied_payments,applied_credit_notes,contact,company": - return InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesContactCompany, nil - case "applied_payments,applied_credit_notes,contact,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "applied_payments,applied_credit_notes,contact,company,employee": - return InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesContactCompanyEmployee, nil - case "applied_payments,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,applied_credit_notes,contact,employee": - return InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesContactEmployee, nil - case "applied_payments,applied_credit_notes,contact,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "applied_payments,applied_credit_notes,employee": - return InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesEmployee, nil - case "applied_payments,applied_credit_notes,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsAppliedCreditNotesEmployeeAccountingPeriod, nil - case "applied_payments,applied_vendor_credits": - return InvoicesListRequestExpandAppliedPaymentsAppliedVendorCredits, nil - case "applied_payments,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsAppliedVendorCreditsAccountingPeriod, nil - case "applied_payments,applied_vendor_credits,company": - return InvoicesListRequestExpandAppliedPaymentsAppliedVendorCreditsCompany, nil - case "applied_payments,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsAppliedVendorCreditsCompanyAccountingPeriod, nil - case "applied_payments,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandAppliedPaymentsAppliedVendorCreditsCompanyEmployee, nil - case "applied_payments,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "applied_payments,applied_vendor_credits,contact": - return InvoicesListRequestExpandAppliedPaymentsAppliedVendorCreditsContact, nil - case "applied_payments,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsAppliedVendorCreditsContactAccountingPeriod, nil - case "applied_payments,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandAppliedPaymentsAppliedVendorCreditsContactCompany, nil - case "applied_payments,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "applied_payments,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandAppliedPaymentsAppliedVendorCreditsContactCompanyEmployee, nil - case "applied_payments,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandAppliedPaymentsAppliedVendorCreditsContactEmployee, nil - case "applied_payments,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "applied_payments,applied_vendor_credits,employee": - return InvoicesListRequestExpandAppliedPaymentsAppliedVendorCreditsEmployee, nil - case "applied_payments,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "applied_payments,company": - return InvoicesListRequestExpandAppliedPaymentsCompany, nil - case "applied_payments,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsCompanyAccountingPeriod, nil - case "applied_payments,company,employee": - return InvoicesListRequestExpandAppliedPaymentsCompanyEmployee, nil - case "applied_payments,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsCompanyEmployeeAccountingPeriod, nil - case "applied_payments,contact": - return InvoicesListRequestExpandAppliedPaymentsContact, nil - case "applied_payments,contact,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsContactAccountingPeriod, nil - case "applied_payments,contact,company": - return InvoicesListRequestExpandAppliedPaymentsContactCompany, nil - case "applied_payments,contact,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsContactCompanyAccountingPeriod, nil - case "applied_payments,contact,company,employee": - return InvoicesListRequestExpandAppliedPaymentsContactCompanyEmployee, nil - case "applied_payments,contact,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,contact,employee": - return InvoicesListRequestExpandAppliedPaymentsContactEmployee, nil - case "applied_payments,contact,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsContactEmployeeAccountingPeriod, nil - case "applied_payments,employee": - return InvoicesListRequestExpandAppliedPaymentsEmployee, nil - case "applied_payments,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsEmployeeAccountingPeriod, nil - case "applied_payments,line_items": - return InvoicesListRequestExpandAppliedPaymentsLineItems, nil - case "applied_payments,line_items,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsAccountingPeriod, nil - case "applied_payments,line_items,applied_credit_notes": - return InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotes, nil - case "applied_payments,line_items,applied_credit_notes,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAccountingPeriod, nil - case "applied_payments,line_items,applied_credit_notes,applied_vendor_credits": - return InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCredits, nil - case "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company": - return InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContact, nil - case "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "applied_payments,line_items,applied_credit_notes,company": - return InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesCompany, nil - case "applied_payments,line_items,applied_credit_notes,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesCompanyAccountingPeriod, nil - case "applied_payments,line_items,applied_credit_notes,company,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesCompanyEmployee, nil - case "applied_payments,line_items,applied_credit_notes,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,applied_credit_notes,contact": - return InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesContact, nil - case "applied_payments,line_items,applied_credit_notes,contact,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesContactAccountingPeriod, nil - case "applied_payments,line_items,applied_credit_notes,contact,company": - return InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesContactCompany, nil - case "applied_payments,line_items,applied_credit_notes,contact,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "applied_payments,line_items,applied_credit_notes,contact,company,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesContactCompanyEmployee, nil - case "applied_payments,line_items,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,applied_credit_notes,contact,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesContactEmployee, nil - case "applied_payments,line_items,applied_credit_notes,contact,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "applied_payments,line_items,applied_credit_notes,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesEmployee, nil - case "applied_payments,line_items,applied_credit_notes,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesEmployeeAccountingPeriod, nil - case "applied_payments,line_items,applied_vendor_credits": - return InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedVendorCredits, nil - case "applied_payments,line_items,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsAccountingPeriod, nil - case "applied_payments,line_items,applied_vendor_credits,company": - return InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsCompany, nil - case "applied_payments,line_items,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsCompanyAccountingPeriod, nil - case "applied_payments,line_items,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsCompanyEmployee, nil - case "applied_payments,line_items,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,applied_vendor_credits,contact": - return InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsContact, nil - case "applied_payments,line_items,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsContactAccountingPeriod, nil - case "applied_payments,line_items,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsContactCompany, nil - case "applied_payments,line_items,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "applied_payments,line_items,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsContactCompanyEmployee, nil - case "applied_payments,line_items,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsContactEmployee, nil - case "applied_payments,line_items,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "applied_payments,line_items,applied_vendor_credits,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsEmployee, nil - case "applied_payments,line_items,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "applied_payments,line_items,company": - return InvoicesListRequestExpandAppliedPaymentsLineItemsCompany, nil - case "applied_payments,line_items,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsCompanyAccountingPeriod, nil - case "applied_payments,line_items,company,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsCompanyEmployee, nil - case "applied_payments,line_items,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,contact": - return InvoicesListRequestExpandAppliedPaymentsLineItemsContact, nil - case "applied_payments,line_items,contact,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsContactAccountingPeriod, nil - case "applied_payments,line_items,contact,company": - return InvoicesListRequestExpandAppliedPaymentsLineItemsContactCompany, nil - case "applied_payments,line_items,contact,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsContactCompanyAccountingPeriod, nil - case "applied_payments,line_items,contact,company,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsContactCompanyEmployee, nil - case "applied_payments,line_items,contact,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,contact,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsContactEmployee, nil - case "applied_payments,line_items,contact,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsContactEmployeeAccountingPeriod, nil - case "applied_payments,line_items,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsEmployee, nil - case "applied_payments,line_items,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsEmployeeAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrders, nil - case "applied_payments,line_items,purchase_orders,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotes, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCredits, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,company": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompany, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,company,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployee, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,contact": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContact, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,contact,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompany, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployee, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,contact,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactEmployee, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,contact,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesEmployee, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,applied_vendor_credits": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCredits, nil - case "applied_payments,line_items,purchase_orders,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,applied_vendor_credits,company": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompany, nil - case "applied_payments,line_items,purchase_orders,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployee, nil - case "applied_payments,line_items,purchase_orders,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,applied_vendor_credits,contact": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContact, nil - case "applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompany, nil - case "applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee, nil - case "applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployee, nil - case "applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,applied_vendor_credits,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsEmployee, nil - case "applied_payments,line_items,purchase_orders,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,company": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersCompany, nil - case "applied_payments,line_items,purchase_orders,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersCompanyAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,company,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersCompanyEmployee, nil - case "applied_payments,line_items,purchase_orders,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,contact": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersContact, nil - case "applied_payments,line_items,purchase_orders,contact,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersContactAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,contact,company": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersContactCompany, nil - case "applied_payments,line_items,purchase_orders,contact,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersContactCompanyAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,contact,company,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersContactCompanyEmployee, nil - case "applied_payments,line_items,purchase_orders,contact,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,contact,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersContactEmployee, nil - case "applied_payments,line_items,purchase_orders,contact,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersContactEmployeeAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersEmployee, nil - case "applied_payments,line_items,purchase_orders,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsPurchaseOrdersEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategories, nil - case "applied_payments,line_items,tracking_categories,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotes, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCredits, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContact, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,company": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompany, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,company,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployee, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,contact": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContact, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,contact,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompany, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployee, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,contact,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactEmployee, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,contact,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesEmployee, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,applied_vendor_credits": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCredits, nil - case "applied_payments,line_items,tracking_categories,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,applied_vendor_credits,company": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompany, nil - case "applied_payments,line_items,tracking_categories,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployee, nil - case "applied_payments,line_items,tracking_categories,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,applied_vendor_credits,contact": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContact, nil - case "applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompany, nil - case "applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployee, nil - case "applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployee, nil - case "applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,applied_vendor_credits,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsEmployee, nil - case "applied_payments,line_items,tracking_categories,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,company": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesCompany, nil - case "applied_payments,line_items,tracking_categories,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesCompanyAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,company,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesCompanyEmployee, nil - case "applied_payments,line_items,tracking_categories,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,contact": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesContact, nil - case "applied_payments,line_items,tracking_categories,contact,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesContactAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,contact,company": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesContactCompany, nil - case "applied_payments,line_items,tracking_categories,contact,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesContactCompanyAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,contact,company,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesContactCompanyEmployee, nil - case "applied_payments,line_items,tracking_categories,contact,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,contact,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesContactEmployee, nil - case "applied_payments,line_items,tracking_categories,contact,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesContactEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesEmployee, nil - case "applied_payments,line_items,tracking_categories,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrders, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotes, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCredits, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompany, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployee, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContact, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompany, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployee, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployee, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployee, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCredits, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompany, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployee, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContact, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompany, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployee, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployee, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,company": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompany, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,company,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployee, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,contact": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContact, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,contact,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,contact,company": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompany, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,contact,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,contact,company,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployee, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,contact,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,contact,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactEmployee, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,contact,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,employee": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersEmployee, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriod, nil - case "applied_payments,purchase_orders": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrders, nil - case "applied_payments,purchase_orders,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAccountingPeriod, nil - case "applied_payments,purchase_orders,applied_credit_notes": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotes, nil - case "applied_payments,purchase_orders,applied_credit_notes,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAccountingPeriod, nil - case "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCredits, nil - case "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact, nil - case "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "applied_payments,purchase_orders,applied_credit_notes,company": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesCompany, nil - case "applied_payments,purchase_orders,applied_credit_notes,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod, nil - case "applied_payments,purchase_orders,applied_credit_notes,company,employee": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesCompanyEmployee, nil - case "applied_payments,purchase_orders,applied_credit_notes,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "applied_payments,purchase_orders,applied_credit_notes,contact": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesContact, nil - case "applied_payments,purchase_orders,applied_credit_notes,contact,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactAccountingPeriod, nil - case "applied_payments,purchase_orders,applied_credit_notes,contact,company": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompany, nil - case "applied_payments,purchase_orders,applied_credit_notes,contact,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "applied_payments,purchase_orders,applied_credit_notes,contact,company,employee": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyEmployee, nil - case "applied_payments,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,purchase_orders,applied_credit_notes,contact,employee": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactEmployee, nil - case "applied_payments,purchase_orders,applied_credit_notes,contact,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "applied_payments,purchase_orders,applied_credit_notes,employee": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesEmployee, nil - case "applied_payments,purchase_orders,applied_credit_notes,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod, nil - case "applied_payments,purchase_orders,applied_vendor_credits": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCredits, nil - case "applied_payments,purchase_orders,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsAccountingPeriod, nil - case "applied_payments,purchase_orders,applied_vendor_credits,company": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompany, nil - case "applied_payments,purchase_orders,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod, nil - case "applied_payments,purchase_orders,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompanyEmployee, nil - case "applied_payments,purchase_orders,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "applied_payments,purchase_orders,applied_vendor_credits,contact": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContact, nil - case "applied_payments,purchase_orders,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod, nil - case "applied_payments,purchase_orders,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompany, nil - case "applied_payments,purchase_orders,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "applied_payments,purchase_orders,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee, nil - case "applied_payments,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,purchase_orders,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactEmployee, nil - case "applied_payments,purchase_orders,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "applied_payments,purchase_orders,applied_vendor_credits,employee": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsEmployee, nil - case "applied_payments,purchase_orders,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "applied_payments,purchase_orders,company": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersCompany, nil - case "applied_payments,purchase_orders,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersCompanyAccountingPeriod, nil - case "applied_payments,purchase_orders,company,employee": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersCompanyEmployee, nil - case "applied_payments,purchase_orders,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersCompanyEmployeeAccountingPeriod, nil - case "applied_payments,purchase_orders,contact": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersContact, nil - case "applied_payments,purchase_orders,contact,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersContactAccountingPeriod, nil - case "applied_payments,purchase_orders,contact,company": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersContactCompany, nil - case "applied_payments,purchase_orders,contact,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersContactCompanyAccountingPeriod, nil - case "applied_payments,purchase_orders,contact,company,employee": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersContactCompanyEmployee, nil - case "applied_payments,purchase_orders,contact,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,purchase_orders,contact,employee": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersContactEmployee, nil - case "applied_payments,purchase_orders,contact,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersContactEmployeeAccountingPeriod, nil - case "applied_payments,purchase_orders,employee": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersEmployee, nil - case "applied_payments,purchase_orders,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsPurchaseOrdersEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategories, nil - case "applied_payments,tracking_categories,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAccountingPeriod, nil - case "applied_payments,tracking_categories,applied_credit_notes": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotes, nil - case "applied_payments,tracking_categories,applied_credit_notes,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAccountingPeriod, nil - case "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCredits, nil - case "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContact, nil - case "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,applied_credit_notes,company": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesCompany, nil - case "applied_payments,tracking_categories,applied_credit_notes,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriod, nil - case "applied_payments,tracking_categories,applied_credit_notes,company,employee": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesCompanyEmployee, nil - case "applied_payments,tracking_categories,applied_credit_notes,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,applied_credit_notes,contact": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesContact, nil - case "applied_payments,tracking_categories,applied_credit_notes,contact,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactAccountingPeriod, nil - case "applied_payments,tracking_categories,applied_credit_notes,contact,company": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompany, nil - case "applied_payments,tracking_categories,applied_credit_notes,contact,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "applied_payments,tracking_categories,applied_credit_notes,contact,company,employee": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyEmployee, nil - case "applied_payments,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,applied_credit_notes,contact,employee": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactEmployee, nil - case "applied_payments,tracking_categories,applied_credit_notes,contact,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,applied_credit_notes,employee": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesEmployee, nil - case "applied_payments,tracking_categories,applied_credit_notes,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,applied_vendor_credits": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCredits, nil - case "applied_payments,tracking_categories,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsAccountingPeriod, nil - case "applied_payments,tracking_categories,applied_vendor_credits,company": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompany, nil - case "applied_payments,tracking_categories,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "applied_payments,tracking_categories,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompanyEmployee, nil - case "applied_payments,tracking_categories,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,applied_vendor_credits,contact": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContact, nil - case "applied_payments,tracking_categories,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriod, nil - case "applied_payments,tracking_categories,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompany, nil - case "applied_payments,tracking_categories,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "applied_payments,tracking_categories,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployee, nil - case "applied_payments,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactEmployee, nil - case "applied_payments,tracking_categories,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,applied_vendor_credits,employee": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsEmployee, nil - case "applied_payments,tracking_categories,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,company": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesCompany, nil - case "applied_payments,tracking_categories,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesCompanyAccountingPeriod, nil - case "applied_payments,tracking_categories,company,employee": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesCompanyEmployee, nil - case "applied_payments,tracking_categories,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesCompanyEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,contact": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesContact, nil - case "applied_payments,tracking_categories,contact,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesContactAccountingPeriod, nil - case "applied_payments,tracking_categories,contact,company": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesContactCompany, nil - case "applied_payments,tracking_categories,contact,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesContactCompanyAccountingPeriod, nil - case "applied_payments,tracking_categories,contact,company,employee": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesContactCompanyEmployee, nil - case "applied_payments,tracking_categories,contact,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,contact,employee": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesContactEmployee, nil - case "applied_payments,tracking_categories,contact,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesContactEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,employee": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesEmployee, nil - case "applied_payments,tracking_categories,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrders, nil - case "applied_payments,tracking_categories,purchase_orders,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotes, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCredits, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompany, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company,employee": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployee, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContact, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompany, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployee, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,employee": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployee, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,employee": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployee, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCredits, nil - case "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompany, nil - case "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployee, nil - case "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContact, nil - case "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompany, nil - case "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee, nil - case "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployee, nil - case "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,employee": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployee, nil - case "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,company": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersCompany, nil - case "applied_payments,tracking_categories,purchase_orders,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,company,employee": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersCompanyEmployee, nil - case "applied_payments,tracking_categories,purchase_orders,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,contact": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersContact, nil - case "applied_payments,tracking_categories,purchase_orders,contact,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersContactAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,contact,company": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompany, nil - case "applied_payments,tracking_categories,purchase_orders,contact,company,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,contact,company,employee": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompanyEmployee, nil - case "applied_payments,tracking_categories,purchase_orders,contact,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,contact,employee": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersContactEmployee, nil - case "applied_payments,tracking_categories,purchase_orders,contact,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,employee": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersEmployee, nil - case "applied_payments,tracking_categories,purchase_orders,employee,accounting_period": - return InvoicesListRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriod, nil + return InvoicesListRequestExpandItemAppliedPayments, nil case "applied_vendor_credits": - return InvoicesListRequestExpandAppliedVendorCredits, nil - case "applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandAppliedVendorCreditsAccountingPeriod, nil - case "applied_vendor_credits,company": - return InvoicesListRequestExpandAppliedVendorCreditsCompany, nil - case "applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandAppliedVendorCreditsCompanyAccountingPeriod, nil - case "applied_vendor_credits,company,employee": - return InvoicesListRequestExpandAppliedVendorCreditsCompanyEmployee, nil - case "applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "applied_vendor_credits,contact": - return InvoicesListRequestExpandAppliedVendorCreditsContact, nil - case "applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandAppliedVendorCreditsContactAccountingPeriod, nil - case "applied_vendor_credits,contact,company": - return InvoicesListRequestExpandAppliedVendorCreditsContactCompany, nil - case "applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandAppliedVendorCreditsContactCompanyEmployee, nil - case "applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandAppliedVendorCreditsContactEmployee, nil - case "applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "applied_vendor_credits,employee": - return InvoicesListRequestExpandAppliedVendorCreditsEmployee, nil - case "applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandAppliedVendorCreditsEmployeeAccountingPeriod, nil + return InvoicesListRequestExpandItemAppliedVendorCredits, nil case "company": - return InvoicesListRequestExpandCompany, nil - case "company,accounting_period": - return InvoicesListRequestExpandCompanyAccountingPeriod, nil - case "company,employee": - return InvoicesListRequestExpandCompanyEmployee, nil - case "company,employee,accounting_period": - return InvoicesListRequestExpandCompanyEmployeeAccountingPeriod, nil + return InvoicesListRequestExpandItemCompany, nil case "contact": - return InvoicesListRequestExpandContact, nil - case "contact,accounting_period": - return InvoicesListRequestExpandContactAccountingPeriod, nil - case "contact,company": - return InvoicesListRequestExpandContactCompany, nil - case "contact,company,accounting_period": - return InvoicesListRequestExpandContactCompanyAccountingPeriod, nil - case "contact,company,employee": - return InvoicesListRequestExpandContactCompanyEmployee, nil - case "contact,company,employee,accounting_period": - return InvoicesListRequestExpandContactCompanyEmployeeAccountingPeriod, nil - case "contact,employee": - return InvoicesListRequestExpandContactEmployee, nil - case "contact,employee,accounting_period": - return InvoicesListRequestExpandContactEmployeeAccountingPeriod, nil + return InvoicesListRequestExpandItemContact, nil case "employee": - return InvoicesListRequestExpandEmployee, nil - case "employee,accounting_period": - return InvoicesListRequestExpandEmployeeAccountingPeriod, nil + return InvoicesListRequestExpandItemEmployee, nil case "line_items": - return InvoicesListRequestExpandLineItems, nil - case "line_items,accounting_period": - return InvoicesListRequestExpandLineItemsAccountingPeriod, nil - case "line_items,applied_credit_notes": - return InvoicesListRequestExpandLineItemsAppliedCreditNotes, nil - case "line_items,applied_credit_notes,accounting_period": - return InvoicesListRequestExpandLineItemsAppliedCreditNotesAccountingPeriod, nil - case "line_items,applied_credit_notes,applied_vendor_credits": - return InvoicesListRequestExpandLineItemsAppliedCreditNotesAppliedVendorCredits, nil - case "line_items,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "line_items,applied_credit_notes,applied_vendor_credits,company": - return InvoicesListRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "line_items,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "line_items,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "line_items,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "line_items,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesListRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsContact, nil - case "line_items,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "line_items,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "line_items,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "line_items,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "line_items,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "line_items,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesListRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "line_items,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "line_items,applied_credit_notes,company": - return InvoicesListRequestExpandLineItemsAppliedCreditNotesCompany, nil - case "line_items,applied_credit_notes,company,accounting_period": - return InvoicesListRequestExpandLineItemsAppliedCreditNotesCompanyAccountingPeriod, nil - case "line_items,applied_credit_notes,company,employee": - return InvoicesListRequestExpandLineItemsAppliedCreditNotesCompanyEmployee, nil - case "line_items,applied_credit_notes,company,employee,accounting_period": - return InvoicesListRequestExpandLineItemsAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "line_items,applied_credit_notes,contact": - return InvoicesListRequestExpandLineItemsAppliedCreditNotesContact, nil - case "line_items,applied_credit_notes,contact,accounting_period": - return InvoicesListRequestExpandLineItemsAppliedCreditNotesContactAccountingPeriod, nil - case "line_items,applied_credit_notes,contact,company": - return InvoicesListRequestExpandLineItemsAppliedCreditNotesContactCompany, nil - case "line_items,applied_credit_notes,contact,company,accounting_period": - return InvoicesListRequestExpandLineItemsAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "line_items,applied_credit_notes,contact,company,employee": - return InvoicesListRequestExpandLineItemsAppliedCreditNotesContactCompanyEmployee, nil - case "line_items,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesListRequestExpandLineItemsAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "line_items,applied_credit_notes,contact,employee": - return InvoicesListRequestExpandLineItemsAppliedCreditNotesContactEmployee, nil - case "line_items,applied_credit_notes,contact,employee,accounting_period": - return InvoicesListRequestExpandLineItemsAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "line_items,applied_credit_notes,employee": - return InvoicesListRequestExpandLineItemsAppliedCreditNotesEmployee, nil - case "line_items,applied_credit_notes,employee,accounting_period": - return InvoicesListRequestExpandLineItemsAppliedCreditNotesEmployeeAccountingPeriod, nil - case "line_items,applied_vendor_credits": - return InvoicesListRequestExpandLineItemsAppliedVendorCredits, nil - case "line_items,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandLineItemsAppliedVendorCreditsAccountingPeriod, nil - case "line_items,applied_vendor_credits,company": - return InvoicesListRequestExpandLineItemsAppliedVendorCreditsCompany, nil - case "line_items,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandLineItemsAppliedVendorCreditsCompanyAccountingPeriod, nil - case "line_items,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandLineItemsAppliedVendorCreditsCompanyEmployee, nil - case "line_items,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandLineItemsAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "line_items,applied_vendor_credits,contact": - return InvoicesListRequestExpandLineItemsAppliedVendorCreditsContact, nil - case "line_items,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandLineItemsAppliedVendorCreditsContactAccountingPeriod, nil - case "line_items,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandLineItemsAppliedVendorCreditsContactCompany, nil - case "line_items,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandLineItemsAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "line_items,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandLineItemsAppliedVendorCreditsContactCompanyEmployee, nil - case "line_items,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandLineItemsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "line_items,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandLineItemsAppliedVendorCreditsContactEmployee, nil - case "line_items,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandLineItemsAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "line_items,applied_vendor_credits,employee": - return InvoicesListRequestExpandLineItemsAppliedVendorCreditsEmployee, nil - case "line_items,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandLineItemsAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "line_items,company": - return InvoicesListRequestExpandLineItemsCompany, nil - case "line_items,company,accounting_period": - return InvoicesListRequestExpandLineItemsCompanyAccountingPeriod, nil - case "line_items,company,employee": - return InvoicesListRequestExpandLineItemsCompanyEmployee, nil - case "line_items,company,employee,accounting_period": - return InvoicesListRequestExpandLineItemsCompanyEmployeeAccountingPeriod, nil - case "line_items,contact": - return InvoicesListRequestExpandLineItemsContact, nil - case "line_items,contact,accounting_period": - return InvoicesListRequestExpandLineItemsContactAccountingPeriod, nil - case "line_items,contact,company": - return InvoicesListRequestExpandLineItemsContactCompany, nil - case "line_items,contact,company,accounting_period": - return InvoicesListRequestExpandLineItemsContactCompanyAccountingPeriod, nil - case "line_items,contact,company,employee": - return InvoicesListRequestExpandLineItemsContactCompanyEmployee, nil - case "line_items,contact,company,employee,accounting_period": - return InvoicesListRequestExpandLineItemsContactCompanyEmployeeAccountingPeriod, nil - case "line_items,contact,employee": - return InvoicesListRequestExpandLineItemsContactEmployee, nil - case "line_items,contact,employee,accounting_period": - return InvoicesListRequestExpandLineItemsContactEmployeeAccountingPeriod, nil - case "line_items,employee": - return InvoicesListRequestExpandLineItemsEmployee, nil - case "line_items,employee,accounting_period": - return InvoicesListRequestExpandLineItemsEmployeeAccountingPeriod, nil - case "line_items,purchase_orders": - return InvoicesListRequestExpandLineItemsPurchaseOrders, nil - case "line_items,purchase_orders,accounting_period": - return InvoicesListRequestExpandLineItemsPurchaseOrdersAccountingPeriod, nil - case "line_items,purchase_orders,applied_credit_notes": - return InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotes, nil - case "line_items,purchase_orders,applied_credit_notes,accounting_period": - return InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAccountingPeriod, nil - case "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits": - return InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCredits, nil - case "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company": - return InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact, nil - case "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "line_items,purchase_orders,applied_credit_notes,company": - return InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesCompany, nil - case "line_items,purchase_orders,applied_credit_notes,company,accounting_period": - return InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod, nil - case "line_items,purchase_orders,applied_credit_notes,company,employee": - return InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployee, nil - case "line_items,purchase_orders,applied_credit_notes,company,employee,accounting_period": - return InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "line_items,purchase_orders,applied_credit_notes,contact": - return InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesContact, nil - case "line_items,purchase_orders,applied_credit_notes,contact,accounting_period": - return InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesContactAccountingPeriod, nil - case "line_items,purchase_orders,applied_credit_notes,contact,company": - return InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesContactCompany, nil - case "line_items,purchase_orders,applied_credit_notes,contact,company,accounting_period": - return InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "line_items,purchase_orders,applied_credit_notes,contact,company,employee": - return InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployee, nil - case "line_items,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "line_items,purchase_orders,applied_credit_notes,contact,employee": - return InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesContactEmployee, nil - case "line_items,purchase_orders,applied_credit_notes,contact,employee,accounting_period": - return InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "line_items,purchase_orders,applied_credit_notes,employee": - return InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesEmployee, nil - case "line_items,purchase_orders,applied_credit_notes,employee,accounting_period": - return InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod, nil - case "line_items,purchase_orders,applied_vendor_credits": - return InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedVendorCredits, nil - case "line_items,purchase_orders,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsAccountingPeriod, nil - case "line_items,purchase_orders,applied_vendor_credits,company": - return InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsCompany, nil - case "line_items,purchase_orders,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod, nil - case "line_items,purchase_orders,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployee, nil - case "line_items,purchase_orders,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "line_items,purchase_orders,applied_vendor_credits,contact": - return InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsContact, nil - case "line_items,purchase_orders,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod, nil - case "line_items,purchase_orders,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsContactCompany, nil - case "line_items,purchase_orders,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "line_items,purchase_orders,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee, nil - case "line_items,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "line_items,purchase_orders,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployee, nil - case "line_items,purchase_orders,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "line_items,purchase_orders,applied_vendor_credits,employee": - return InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsEmployee, nil - case "line_items,purchase_orders,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "line_items,purchase_orders,company": - return InvoicesListRequestExpandLineItemsPurchaseOrdersCompany, nil - case "line_items,purchase_orders,company,accounting_period": - return InvoicesListRequestExpandLineItemsPurchaseOrdersCompanyAccountingPeriod, nil - case "line_items,purchase_orders,company,employee": - return InvoicesListRequestExpandLineItemsPurchaseOrdersCompanyEmployee, nil - case "line_items,purchase_orders,company,employee,accounting_period": - return InvoicesListRequestExpandLineItemsPurchaseOrdersCompanyEmployeeAccountingPeriod, nil - case "line_items,purchase_orders,contact": - return InvoicesListRequestExpandLineItemsPurchaseOrdersContact, nil - case "line_items,purchase_orders,contact,accounting_period": - return InvoicesListRequestExpandLineItemsPurchaseOrdersContactAccountingPeriod, nil - case "line_items,purchase_orders,contact,company": - return InvoicesListRequestExpandLineItemsPurchaseOrdersContactCompany, nil - case "line_items,purchase_orders,contact,company,accounting_period": - return InvoicesListRequestExpandLineItemsPurchaseOrdersContactCompanyAccountingPeriod, nil - case "line_items,purchase_orders,contact,company,employee": - return InvoicesListRequestExpandLineItemsPurchaseOrdersContactCompanyEmployee, nil - case "line_items,purchase_orders,contact,company,employee,accounting_period": - return InvoicesListRequestExpandLineItemsPurchaseOrdersContactCompanyEmployeeAccountingPeriod, nil - case "line_items,purchase_orders,contact,employee": - return InvoicesListRequestExpandLineItemsPurchaseOrdersContactEmployee, nil - case "line_items,purchase_orders,contact,employee,accounting_period": - return InvoicesListRequestExpandLineItemsPurchaseOrdersContactEmployeeAccountingPeriod, nil - case "line_items,purchase_orders,employee": - return InvoicesListRequestExpandLineItemsPurchaseOrdersEmployee, nil - case "line_items,purchase_orders,employee,accounting_period": - return InvoicesListRequestExpandLineItemsPurchaseOrdersEmployeeAccountingPeriod, nil - case "line_items,tracking_categories": - return InvoicesListRequestExpandLineItemsTrackingCategories, nil - case "line_items,tracking_categories,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesAccountingPeriod, nil - case "line_items,tracking_categories,applied_credit_notes": - return InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotes, nil - case "line_items,tracking_categories,applied_credit_notes,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAccountingPeriod, nil - case "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits": - return InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCredits, nil - case "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company": - return InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContact, nil - case "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,applied_credit_notes,company": - return InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesCompany, nil - case "line_items,tracking_categories,applied_credit_notes,company,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriod, nil - case "line_items,tracking_categories,applied_credit_notes,company,employee": - return InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployee, nil - case "line_items,tracking_categories,applied_credit_notes,company,employee,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,applied_credit_notes,contact": - return InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesContact, nil - case "line_items,tracking_categories,applied_credit_notes,contact,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesContactAccountingPeriod, nil - case "line_items,tracking_categories,applied_credit_notes,contact,company": - return InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesContactCompany, nil - case "line_items,tracking_categories,applied_credit_notes,contact,company,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "line_items,tracking_categories,applied_credit_notes,contact,company,employee": - return InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployee, nil - case "line_items,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,applied_credit_notes,contact,employee": - return InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesContactEmployee, nil - case "line_items,tracking_categories,applied_credit_notes,contact,employee,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,applied_credit_notes,employee": - return InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesEmployee, nil - case "line_items,tracking_categories,applied_credit_notes,employee,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,applied_vendor_credits": - return InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedVendorCredits, nil - case "line_items,tracking_categories,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsAccountingPeriod, nil - case "line_items,tracking_categories,applied_vendor_credits,company": - return InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsCompany, nil - case "line_items,tracking_categories,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "line_items,tracking_categories,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployee, nil - case "line_items,tracking_categories,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,applied_vendor_credits,contact": - return InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsContact, nil - case "line_items,tracking_categories,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriod, nil - case "line_items,tracking_categories,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsContactCompany, nil - case "line_items,tracking_categories,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "line_items,tracking_categories,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployee, nil - case "line_items,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployee, nil - case "line_items,tracking_categories,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,applied_vendor_credits,employee": - return InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsEmployee, nil - case "line_items,tracking_categories,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,company": - return InvoicesListRequestExpandLineItemsTrackingCategoriesCompany, nil - case "line_items,tracking_categories,company,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesCompanyAccountingPeriod, nil - case "line_items,tracking_categories,company,employee": - return InvoicesListRequestExpandLineItemsTrackingCategoriesCompanyEmployee, nil - case "line_items,tracking_categories,company,employee,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesCompanyEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,contact": - return InvoicesListRequestExpandLineItemsTrackingCategoriesContact, nil - case "line_items,tracking_categories,contact,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesContactAccountingPeriod, nil - case "line_items,tracking_categories,contact,company": - return InvoicesListRequestExpandLineItemsTrackingCategoriesContactCompany, nil - case "line_items,tracking_categories,contact,company,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesContactCompanyAccountingPeriod, nil - case "line_items,tracking_categories,contact,company,employee": - return InvoicesListRequestExpandLineItemsTrackingCategoriesContactCompanyEmployee, nil - case "line_items,tracking_categories,contact,company,employee,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesContactCompanyEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,contact,employee": - return InvoicesListRequestExpandLineItemsTrackingCategoriesContactEmployee, nil - case "line_items,tracking_categories,contact,employee,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesContactEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,employee": - return InvoicesListRequestExpandLineItemsTrackingCategoriesEmployee, nil - case "line_items,tracking_categories,employee,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrders, nil - case "line_items,tracking_categories,purchase_orders,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotes, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCredits, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,company": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompany, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployee, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,contact": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContact, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompany, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployee, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployee, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,employee": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployee, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,applied_vendor_credits": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCredits, nil - case "line_items,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,applied_vendor_credits,company": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompany, nil - case "line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployee, nil - case "line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContact, nil - case "line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompany, nil - case "line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee, nil - case "line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployee, nil - case "line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployee, nil - case "line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,company": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersCompany, nil - case "line_items,tracking_categories,purchase_orders,company,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,company,employee": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployee, nil - case "line_items,tracking_categories,purchase_orders,company,employee,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,contact": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersContact, nil - case "line_items,tracking_categories,purchase_orders,contact,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersContactAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,contact,company": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersContactCompany, nil - case "line_items,tracking_categories,purchase_orders,contact,company,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,contact,company,employee": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployee, nil - case "line_items,tracking_categories,purchase_orders,contact,company,employee,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,contact,employee": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersContactEmployee, nil - case "line_items,tracking_categories,purchase_orders,contact,employee,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,employee": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersEmployee, nil - case "line_items,tracking_categories,purchase_orders,employee,accounting_period": - return InvoicesListRequestExpandLineItemsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriod, nil + return InvoicesListRequestExpandItemLineItems, nil + case "payment_term": + return InvoicesListRequestExpandItemPaymentTerm, nil case "payments": - return InvoicesListRequestExpandPayments, nil - case "payments,accounting_period": - return InvoicesListRequestExpandPaymentsAccountingPeriod, nil - case "payments,applied_credit_notes": - return InvoicesListRequestExpandPaymentsAppliedCreditNotes, nil - case "payments,applied_credit_notes,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedCreditNotesAccountingPeriod, nil - case "payments,applied_credit_notes,applied_vendor_credits": - return InvoicesListRequestExpandPaymentsAppliedCreditNotesAppliedVendorCredits, nil - case "payments,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "payments,applied_credit_notes,applied_vendor_credits,company": - return InvoicesListRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "payments,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "payments,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesListRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsContact, nil - case "payments,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "payments,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "payments,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesListRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "payments,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,applied_credit_notes,company": - return InvoicesListRequestExpandPaymentsAppliedCreditNotesCompany, nil - case "payments,applied_credit_notes,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedCreditNotesCompanyAccountingPeriod, nil - case "payments,applied_credit_notes,company,employee": - return InvoicesListRequestExpandPaymentsAppliedCreditNotesCompanyEmployee, nil - case "payments,applied_credit_notes,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "payments,applied_credit_notes,contact": - return InvoicesListRequestExpandPaymentsAppliedCreditNotesContact, nil - case "payments,applied_credit_notes,contact,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedCreditNotesContactAccountingPeriod, nil - case "payments,applied_credit_notes,contact,company": - return InvoicesListRequestExpandPaymentsAppliedCreditNotesContactCompany, nil - case "payments,applied_credit_notes,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "payments,applied_credit_notes,contact,company,employee": - return InvoicesListRequestExpandPaymentsAppliedCreditNotesContactCompanyEmployee, nil - case "payments,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_credit_notes,contact,employee": - return InvoicesListRequestExpandPaymentsAppliedCreditNotesContactEmployee, nil - case "payments,applied_credit_notes,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "payments,applied_credit_notes,employee": - return InvoicesListRequestExpandPaymentsAppliedCreditNotesEmployee, nil - case "payments,applied_credit_notes,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedCreditNotesEmployeeAccountingPeriod, nil - case "payments,applied_payments": - return InvoicesListRequestExpandPaymentsAppliedPayments, nil - case "payments,applied_payments,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsAccountingPeriod, nil - case "payments,applied_payments,applied_credit_notes": - return InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotes, nil - case "payments,applied_payments,applied_credit_notes,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAccountingPeriod, nil - case "payments,applied_payments,applied_credit_notes,applied_vendor_credits": - return InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCredits, nil - case "payments,applied_payments,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "payments,applied_payments,applied_credit_notes,applied_vendor_credits,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "payments,applied_payments,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,applied_payments,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "payments,applied_payments,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContact, nil - case "payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "payments,applied_payments,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,applied_payments,applied_credit_notes,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesCompany, nil - case "payments,applied_payments,applied_credit_notes,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesCompanyAccountingPeriod, nil - case "payments,applied_payments,applied_credit_notes,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesCompanyEmployee, nil - case "payments,applied_payments,applied_credit_notes,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,applied_credit_notes,contact": - return InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesContact, nil - case "payments,applied_payments,applied_credit_notes,contact,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesContactAccountingPeriod, nil - case "payments,applied_payments,applied_credit_notes,contact,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesContactCompany, nil - case "payments,applied_payments,applied_credit_notes,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "payments,applied_payments,applied_credit_notes,contact,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesContactCompanyEmployee, nil - case "payments,applied_payments,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,applied_credit_notes,contact,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesContactEmployee, nil - case "payments,applied_payments,applied_credit_notes,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,applied_credit_notes,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesEmployee, nil - case "payments,applied_payments,applied_credit_notes,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesEmployeeAccountingPeriod, nil - case "payments,applied_payments,applied_vendor_credits": - return InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedVendorCredits, nil - case "payments,applied_payments,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsAccountingPeriod, nil - case "payments,applied_payments,applied_vendor_credits,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsCompany, nil - case "payments,applied_payments,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,applied_payments,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsCompanyEmployee, nil - case "payments,applied_payments,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,applied_vendor_credits,contact": - return InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsContact, nil - case "payments,applied_payments,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,applied_payments,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsContactCompany, nil - case "payments,applied_payments,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,applied_payments,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,applied_payments,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsContactEmployee, nil - case "payments,applied_payments,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,applied_vendor_credits,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsEmployee, nil - case "payments,applied_payments,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,applied_payments,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsCompany, nil - case "payments,applied_payments,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsCompanyAccountingPeriod, nil - case "payments,applied_payments,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsCompanyEmployee, nil - case "payments,applied_payments,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,contact": - return InvoicesListRequestExpandPaymentsAppliedPaymentsContact, nil - case "payments,applied_payments,contact,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsContactAccountingPeriod, nil - case "payments,applied_payments,contact,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsContactCompany, nil - case "payments,applied_payments,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsContactCompanyAccountingPeriod, nil - case "payments,applied_payments,contact,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsContactCompanyEmployee, nil - case "payments,applied_payments,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,contact,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsContactEmployee, nil - case "payments,applied_payments,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsEmployee, nil - case "payments,applied_payments,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItems, nil - case "payments,applied_payments,line_items,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAccountingPeriod, nil - case "payments,applied_payments,line_items,applied_credit_notes": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotes, nil - case "payments,applied_payments,line_items,applied_credit_notes,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAccountingPeriod, nil - case "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCredits, nil - case "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContact, nil - case "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,applied_credit_notes,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesCompany, nil - case "payments,applied_payments,line_items,applied_credit_notes,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,applied_credit_notes,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesCompanyEmployee, nil - case "payments,applied_payments,line_items,applied_credit_notes,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,applied_credit_notes,contact": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesContact, nil - case "payments,applied_payments,line_items,applied_credit_notes,contact,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactAccountingPeriod, nil - case "payments,applied_payments,line_items,applied_credit_notes,contact,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactCompany, nil - case "payments,applied_payments,line_items,applied_credit_notes,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,applied_credit_notes,contact,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactCompanyEmployee, nil - case "payments,applied_payments,line_items,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,applied_credit_notes,contact,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactEmployee, nil - case "payments,applied_payments,line_items,applied_credit_notes,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,applied_credit_notes,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesEmployee, nil - case "payments,applied_payments,line_items,applied_credit_notes,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,applied_vendor_credits": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCredits, nil - case "payments,applied_payments,line_items,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsAccountingPeriod, nil - case "payments,applied_payments,line_items,applied_vendor_credits,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsCompany, nil - case "payments,applied_payments,line_items,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsCompanyEmployee, nil - case "payments,applied_payments,line_items,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,applied_vendor_credits,contact": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContact, nil - case "payments,applied_payments,line_items,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,applied_payments,line_items,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactCompany, nil - case "payments,applied_payments,line_items,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,applied_payments,line_items,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactEmployee, nil - case "payments,applied_payments,line_items,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,applied_vendor_credits,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsEmployee, nil - case "payments,applied_payments,line_items,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsCompany, nil - case "payments,applied_payments,line_items,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsCompanyEmployee, nil - case "payments,applied_payments,line_items,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,contact": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsContact, nil - case "payments,applied_payments,line_items,contact,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsContactAccountingPeriod, nil - case "payments,applied_payments,line_items,contact,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsContactCompany, nil - case "payments,applied_payments,line_items,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsContactCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,contact,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsContactCompanyEmployee, nil - case "payments,applied_payments,line_items,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,contact,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsContactEmployee, nil - case "payments,applied_payments,line_items,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsEmployee, nil - case "payments,applied_payments,line_items,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrders, nil - case "payments,applied_payments,line_items,purchase_orders,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotes, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCredits, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompany, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployee, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContact, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompany, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployee, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactEmployee, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesEmployee, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCredits, nil - case "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompany, nil - case "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployee, nil - case "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContact, nil - case "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompany, nil - case "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployee, nil - case "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsEmployee, nil - case "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersCompany, nil - case "payments,applied_payments,line_items,purchase_orders,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersCompanyEmployee, nil - case "payments,applied_payments,line_items,purchase_orders,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,contact": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersContact, nil - case "payments,applied_payments,line_items,purchase_orders,contact,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersContactAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,contact,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersContactCompany, nil - case "payments,applied_payments,line_items,purchase_orders,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersContactCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,contact,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersContactCompanyEmployee, nil - case "payments,applied_payments,line_items,purchase_orders,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,contact,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersContactEmployee, nil - case "payments,applied_payments,line_items,purchase_orders,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersEmployee, nil - case "payments,applied_payments,line_items,purchase_orders,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategories, nil - case "payments,applied_payments,line_items,tracking_categories,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotes, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCredits, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContact, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompany, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContact, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompany, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCredits, nil - case "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompany, nil - case "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContact, nil - case "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompany, nil - case "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesCompany, nil - case "payments,applied_payments,line_items,tracking_categories,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesCompanyEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,contact": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesContact, nil - case "payments,applied_payments,line_items,tracking_categories,contact,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesContactAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,contact,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesContactCompany, nil - case "payments,applied_payments,line_items,tracking_categories,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesContactCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,contact,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesContactCompanyEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,contact,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesContactEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrders, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotes, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCredits, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompany, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContact, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompany, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCredits, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompany, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContact, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompany, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompany, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,contact": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContact, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompany, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriod, nil - case "payments,applied_payments,purchase_orders": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrders, nil - case "payments,applied_payments,purchase_orders,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotes, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCredits, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesCompany, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesCompanyEmployee, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,contact": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContact, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,contact,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,contact,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompany, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,contact,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyEmployee, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,contact,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactEmployee, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesEmployee, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,applied_vendor_credits": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCredits, nil - case "payments,applied_payments,purchase_orders,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,applied_vendor_credits,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompany, nil - case "payments,applied_payments,purchase_orders,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompanyEmployee, nil - case "payments,applied_payments,purchase_orders,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,applied_vendor_credits,contact": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContact, nil - case "payments,applied_payments,purchase_orders,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompany, nil - case "payments,applied_payments,purchase_orders,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,applied_payments,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactEmployee, nil - case "payments,applied_payments,purchase_orders,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,applied_vendor_credits,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsEmployee, nil - case "payments,applied_payments,purchase_orders,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersCompany, nil - case "payments,applied_payments,purchase_orders,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersCompanyAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersCompanyEmployee, nil - case "payments,applied_payments,purchase_orders,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,contact": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersContact, nil - case "payments,applied_payments,purchase_orders,contact,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersContactAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,contact,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersContactCompany, nil - case "payments,applied_payments,purchase_orders,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersContactCompanyAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,contact,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersContactCompanyEmployee, nil - case "payments,applied_payments,purchase_orders,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,contact,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersContactEmployee, nil - case "payments,applied_payments,purchase_orders,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersEmployee, nil - case "payments,applied_payments,purchase_orders,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsPurchaseOrdersEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategories, nil - case "payments,applied_payments,tracking_categories,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotes, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCredits, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContact, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesCompany, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesCompanyEmployee, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,contact": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContact, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,contact,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,contact,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompany, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,contact,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyEmployee, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,contact,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactEmployee, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesEmployee, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,applied_vendor_credits": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCredits, nil - case "payments,applied_payments,tracking_categories,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,applied_vendor_credits,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompany, nil - case "payments,applied_payments,tracking_categories,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompanyEmployee, nil - case "payments,applied_payments,tracking_categories,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,applied_vendor_credits,contact": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContact, nil - case "payments,applied_payments,tracking_categories,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompany, nil - case "payments,applied_payments,tracking_categories,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,applied_payments,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactEmployee, nil - case "payments,applied_payments,tracking_categories,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,applied_vendor_credits,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsEmployee, nil - case "payments,applied_payments,tracking_categories,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesCompany, nil - case "payments,applied_payments,tracking_categories,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesCompanyAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesCompanyEmployee, nil - case "payments,applied_payments,tracking_categories,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,contact": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesContact, nil - case "payments,applied_payments,tracking_categories,contact,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesContactAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,contact,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesContactCompany, nil - case "payments,applied_payments,tracking_categories,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesContactCompanyAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,contact,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesContactCompanyEmployee, nil - case "payments,applied_payments,tracking_categories,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,contact,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesContactEmployee, nil - case "payments,applied_payments,tracking_categories,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesEmployee, nil - case "payments,applied_payments,tracking_categories,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrders, nil - case "payments,applied_payments,tracking_categories,purchase_orders,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotes, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCredits, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompany, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployee, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContact, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompany, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployee, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployee, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployee, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCredits, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompany, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployee, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContact, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompany, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployee, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployee, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersCompany, nil - case "payments,applied_payments,tracking_categories,purchase_orders,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersCompanyEmployee, nil - case "payments,applied_payments,tracking_categories,purchase_orders,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,contact": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContact, nil - case "payments,applied_payments,tracking_categories,purchase_orders,contact,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,contact,company": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompany, nil - case "payments,applied_payments,tracking_categories,purchase_orders,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,contact,company,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompanyEmployee, nil - case "payments,applied_payments,tracking_categories,purchase_orders,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,contact,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactEmployee, nil - case "payments,applied_payments,tracking_categories,purchase_orders,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,employee": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersEmployee, nil - case "payments,applied_payments,tracking_categories,purchase_orders,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriod, nil - case "payments,applied_vendor_credits": - return InvoicesListRequestExpandPaymentsAppliedVendorCredits, nil - case "payments,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedVendorCreditsAccountingPeriod, nil - case "payments,applied_vendor_credits,company": - return InvoicesListRequestExpandPaymentsAppliedVendorCreditsCompany, nil - case "payments,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandPaymentsAppliedVendorCreditsCompanyEmployee, nil - case "payments,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,applied_vendor_credits,contact": - return InvoicesListRequestExpandPaymentsAppliedVendorCreditsContact, nil - case "payments,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandPaymentsAppliedVendorCreditsContactCompany, nil - case "payments,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandPaymentsAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandPaymentsAppliedVendorCreditsContactEmployee, nil - case "payments,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,applied_vendor_credits,employee": - return InvoicesListRequestExpandPaymentsAppliedVendorCreditsEmployee, nil - case "payments,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandPaymentsAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,company": - return InvoicesListRequestExpandPaymentsCompany, nil - case "payments,company,accounting_period": - return InvoicesListRequestExpandPaymentsCompanyAccountingPeriod, nil - case "payments,company,employee": - return InvoicesListRequestExpandPaymentsCompanyEmployee, nil - case "payments,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsCompanyEmployeeAccountingPeriod, nil - case "payments,contact": - return InvoicesListRequestExpandPaymentsContact, nil - case "payments,contact,accounting_period": - return InvoicesListRequestExpandPaymentsContactAccountingPeriod, nil - case "payments,contact,company": - return InvoicesListRequestExpandPaymentsContactCompany, nil - case "payments,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsContactCompanyAccountingPeriod, nil - case "payments,contact,company,employee": - return InvoicesListRequestExpandPaymentsContactCompanyEmployee, nil - case "payments,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsContactCompanyEmployeeAccountingPeriod, nil - case "payments,contact,employee": - return InvoicesListRequestExpandPaymentsContactEmployee, nil - case "payments,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsContactEmployeeAccountingPeriod, nil - case "payments,employee": - return InvoicesListRequestExpandPaymentsEmployee, nil - case "payments,employee,accounting_period": - return InvoicesListRequestExpandPaymentsEmployeeAccountingPeriod, nil - case "payments,line_items": - return InvoicesListRequestExpandPaymentsLineItems, nil - case "payments,line_items,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsAccountingPeriod, nil - case "payments,line_items,applied_credit_notes": - return InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotes, nil - case "payments,line_items,applied_credit_notes,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesAccountingPeriod, nil - case "payments,line_items,applied_credit_notes,applied_vendor_credits": - return InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCredits, nil - case "payments,line_items,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "payments,line_items,applied_credit_notes,applied_vendor_credits,company": - return InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "payments,line_items,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,line_items,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "payments,line_items,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContact, nil - case "payments,line_items,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "payments,line_items,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,line_items,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "payments,line_items,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,line_items,applied_credit_notes,company": - return InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesCompany, nil - case "payments,line_items,applied_credit_notes,company,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesCompanyAccountingPeriod, nil - case "payments,line_items,applied_credit_notes,company,employee": - return InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesCompanyEmployee, nil - case "payments,line_items,applied_credit_notes,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,applied_credit_notes,contact": - return InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesContact, nil - case "payments,line_items,applied_credit_notes,contact,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesContactAccountingPeriod, nil - case "payments,line_items,applied_credit_notes,contact,company": - return InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesContactCompany, nil - case "payments,line_items,applied_credit_notes,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "payments,line_items,applied_credit_notes,contact,company,employee": - return InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesContactCompanyEmployee, nil - case "payments,line_items,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,applied_credit_notes,contact,employee": - return InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesContactEmployee, nil - case "payments,line_items,applied_credit_notes,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "payments,line_items,applied_credit_notes,employee": - return InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesEmployee, nil - case "payments,line_items,applied_credit_notes,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsAppliedCreditNotesEmployeeAccountingPeriod, nil - case "payments,line_items,applied_vendor_credits": - return InvoicesListRequestExpandPaymentsLineItemsAppliedVendorCredits, nil - case "payments,line_items,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsAppliedVendorCreditsAccountingPeriod, nil - case "payments,line_items,applied_vendor_credits,company": - return InvoicesListRequestExpandPaymentsLineItemsAppliedVendorCreditsCompany, nil - case "payments,line_items,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,line_items,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandPaymentsLineItemsAppliedVendorCreditsCompanyEmployee, nil - case "payments,line_items,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,applied_vendor_credits,contact": - return InvoicesListRequestExpandPaymentsLineItemsAppliedVendorCreditsContact, nil - case "payments,line_items,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,line_items,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandPaymentsLineItemsAppliedVendorCreditsContactCompany, nil - case "payments,line_items,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,line_items,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandPaymentsLineItemsAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,line_items,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandPaymentsLineItemsAppliedVendorCreditsContactEmployee, nil - case "payments,line_items,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,line_items,applied_vendor_credits,employee": - return InvoicesListRequestExpandPaymentsLineItemsAppliedVendorCreditsEmployee, nil - case "payments,line_items,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,line_items,company": - return InvoicesListRequestExpandPaymentsLineItemsCompany, nil - case "payments,line_items,company,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsCompanyAccountingPeriod, nil - case "payments,line_items,company,employee": - return InvoicesListRequestExpandPaymentsLineItemsCompanyEmployee, nil - case "payments,line_items,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,contact": - return InvoicesListRequestExpandPaymentsLineItemsContact, nil - case "payments,line_items,contact,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsContactAccountingPeriod, nil - case "payments,line_items,contact,company": - return InvoicesListRequestExpandPaymentsLineItemsContactCompany, nil - case "payments,line_items,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsContactCompanyAccountingPeriod, nil - case "payments,line_items,contact,company,employee": - return InvoicesListRequestExpandPaymentsLineItemsContactCompanyEmployee, nil - case "payments,line_items,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsContactCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,contact,employee": - return InvoicesListRequestExpandPaymentsLineItemsContactEmployee, nil - case "payments,line_items,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsContactEmployeeAccountingPeriod, nil - case "payments,line_items,employee": - return InvoicesListRequestExpandPaymentsLineItemsEmployee, nil - case "payments,line_items,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsEmployeeAccountingPeriod, nil - case "payments,line_items,purchase_orders": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrders, nil - case "payments,line_items,purchase_orders,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAccountingPeriod, nil - case "payments,line_items,purchase_orders,applied_credit_notes": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotes, nil - case "payments,line_items,purchase_orders,applied_credit_notes,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAccountingPeriod, nil - case "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCredits, nil - case "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact, nil - case "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,line_items,purchase_orders,applied_credit_notes,company": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompany, nil - case "payments,line_items,purchase_orders,applied_credit_notes,company,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod, nil - case "payments,line_items,purchase_orders,applied_credit_notes,company,employee": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployee, nil - case "payments,line_items,purchase_orders,applied_credit_notes,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,purchase_orders,applied_credit_notes,contact": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContact, nil - case "payments,line_items,purchase_orders,applied_credit_notes,contact,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactAccountingPeriod, nil - case "payments,line_items,purchase_orders,applied_credit_notes,contact,company": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompany, nil - case "payments,line_items,purchase_orders,applied_credit_notes,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "payments,line_items,purchase_orders,applied_credit_notes,contact,company,employee": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployee, nil - case "payments,line_items,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,purchase_orders,applied_credit_notes,contact,employee": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactEmployee, nil - case "payments,line_items,purchase_orders,applied_credit_notes,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "payments,line_items,purchase_orders,applied_credit_notes,employee": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesEmployee, nil - case "payments,line_items,purchase_orders,applied_credit_notes,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod, nil - case "payments,line_items,purchase_orders,applied_vendor_credits": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCredits, nil - case "payments,line_items,purchase_orders,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsAccountingPeriod, nil - case "payments,line_items,purchase_orders,applied_vendor_credits,company": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompany, nil - case "payments,line_items,purchase_orders,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,line_items,purchase_orders,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployee, nil - case "payments,line_items,purchase_orders,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,purchase_orders,applied_vendor_credits,contact": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContact, nil - case "payments,line_items,purchase_orders,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,line_items,purchase_orders,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompany, nil - case "payments,line_items,purchase_orders,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,line_items,purchase_orders,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,line_items,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,purchase_orders,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployee, nil - case "payments,line_items,purchase_orders,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,line_items,purchase_orders,applied_vendor_credits,employee": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsEmployee, nil - case "payments,line_items,purchase_orders,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,line_items,purchase_orders,company": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersCompany, nil - case "payments,line_items,purchase_orders,company,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersCompanyAccountingPeriod, nil - case "payments,line_items,purchase_orders,company,employee": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersCompanyEmployee, nil - case "payments,line_items,purchase_orders,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,purchase_orders,contact": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersContact, nil - case "payments,line_items,purchase_orders,contact,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersContactAccountingPeriod, nil - case "payments,line_items,purchase_orders,contact,company": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersContactCompany, nil - case "payments,line_items,purchase_orders,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersContactCompanyAccountingPeriod, nil - case "payments,line_items,purchase_orders,contact,company,employee": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersContactCompanyEmployee, nil - case "payments,line_items,purchase_orders,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersContactCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,purchase_orders,contact,employee": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersContactEmployee, nil - case "payments,line_items,purchase_orders,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersContactEmployeeAccountingPeriod, nil - case "payments,line_items,purchase_orders,employee": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersEmployee, nil - case "payments,line_items,purchase_orders,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsPurchaseOrdersEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategories, nil - case "payments,line_items,tracking_categories,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAccountingPeriod, nil - case "payments,line_items,tracking_categories,applied_credit_notes": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotes, nil - case "payments,line_items,tracking_categories,applied_credit_notes,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAccountingPeriod, nil - case "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCredits, nil - case "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContact, nil - case "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,applied_credit_notes,company": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompany, nil - case "payments,line_items,tracking_categories,applied_credit_notes,company,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriod, nil - case "payments,line_items,tracking_categories,applied_credit_notes,company,employee": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployee, nil - case "payments,line_items,tracking_categories,applied_credit_notes,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,applied_credit_notes,contact": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContact, nil - case "payments,line_items,tracking_categories,applied_credit_notes,contact,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactAccountingPeriod, nil - case "payments,line_items,tracking_categories,applied_credit_notes,contact,company": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompany, nil - case "payments,line_items,tracking_categories,applied_credit_notes,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "payments,line_items,tracking_categories,applied_credit_notes,contact,company,employee": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployee, nil - case "payments,line_items,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,applied_credit_notes,contact,employee": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactEmployee, nil - case "payments,line_items,tracking_categories,applied_credit_notes,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,applied_credit_notes,employee": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesEmployee, nil - case "payments,line_items,tracking_categories,applied_credit_notes,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,applied_vendor_credits": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCredits, nil - case "payments,line_items,tracking_categories,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsAccountingPeriod, nil - case "payments,line_items,tracking_categories,applied_vendor_credits,company": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompany, nil - case "payments,line_items,tracking_categories,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,line_items,tracking_categories,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployee, nil - case "payments,line_items,tracking_categories,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,applied_vendor_credits,contact": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContact, nil - case "payments,line_items,tracking_categories,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,line_items,tracking_categories,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompany, nil - case "payments,line_items,tracking_categories,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,line_items,tracking_categories,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,line_items,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployee, nil - case "payments,line_items,tracking_categories,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,applied_vendor_credits,employee": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsEmployee, nil - case "payments,line_items,tracking_categories,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,company": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesCompany, nil - case "payments,line_items,tracking_categories,company,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesCompanyAccountingPeriod, nil - case "payments,line_items,tracking_categories,company,employee": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesCompanyEmployee, nil - case "payments,line_items,tracking_categories,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,contact": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesContact, nil - case "payments,line_items,tracking_categories,contact,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesContactAccountingPeriod, nil - case "payments,line_items,tracking_categories,contact,company": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesContactCompany, nil - case "payments,line_items,tracking_categories,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesContactCompanyAccountingPeriod, nil - case "payments,line_items,tracking_categories,contact,company,employee": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesContactCompanyEmployee, nil - case "payments,line_items,tracking_categories,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesContactCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,contact,employee": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesContactEmployee, nil - case "payments,line_items,tracking_categories,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesContactEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,employee": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesEmployee, nil - case "payments,line_items,tracking_categories,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrders, nil - case "payments,line_items,tracking_categories,purchase_orders,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotes, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCredits, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompany, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployee, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContact, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompany, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployee, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployee, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,employee": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployee, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCredits, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompany, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployee, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContact, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompany, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployee, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployee, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,company": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompany, nil - case "payments,line_items,tracking_categories,purchase_orders,company,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,company,employee": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployee, nil - case "payments,line_items,tracking_categories,purchase_orders,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,contact": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersContact, nil - case "payments,line_items,tracking_categories,purchase_orders,contact,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,contact,company": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompany, nil - case "payments,line_items,tracking_categories,purchase_orders,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,contact,company,employee": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployee, nil - case "payments,line_items,tracking_categories,purchase_orders,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,contact,employee": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactEmployee, nil - case "payments,line_items,tracking_categories,purchase_orders,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,employee": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersEmployee, nil - case "payments,line_items,tracking_categories,purchase_orders,employee,accounting_period": - return InvoicesListRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriod, nil - case "payments,purchase_orders": - return InvoicesListRequestExpandPaymentsPurchaseOrders, nil - case "payments,purchase_orders,accounting_period": - return InvoicesListRequestExpandPaymentsPurchaseOrdersAccountingPeriod, nil - case "payments,purchase_orders,applied_credit_notes": - return InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotes, nil - case "payments,purchase_orders,applied_credit_notes,accounting_period": - return InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAccountingPeriod, nil - case "payments,purchase_orders,applied_credit_notes,applied_vendor_credits": - return InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCredits, nil - case "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company": - return InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact, nil - case "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,purchase_orders,applied_credit_notes,company": - return InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesCompany, nil - case "payments,purchase_orders,applied_credit_notes,company,accounting_period": - return InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod, nil - case "payments,purchase_orders,applied_credit_notes,company,employee": - return InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesCompanyEmployee, nil - case "payments,purchase_orders,applied_credit_notes,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "payments,purchase_orders,applied_credit_notes,contact": - return InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesContact, nil - case "payments,purchase_orders,applied_credit_notes,contact,accounting_period": - return InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesContactAccountingPeriod, nil - case "payments,purchase_orders,applied_credit_notes,contact,company": - return InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesContactCompany, nil - case "payments,purchase_orders,applied_credit_notes,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "payments,purchase_orders,applied_credit_notes,contact,company,employee": - return InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyEmployee, nil - case "payments,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "payments,purchase_orders,applied_credit_notes,contact,employee": - return InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesContactEmployee, nil - case "payments,purchase_orders,applied_credit_notes,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "payments,purchase_orders,applied_credit_notes,employee": - return InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesEmployee, nil - case "payments,purchase_orders,applied_credit_notes,employee,accounting_period": - return InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod, nil - case "payments,purchase_orders,applied_vendor_credits": - return InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedVendorCredits, nil - case "payments,purchase_orders,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsAccountingPeriod, nil - case "payments,purchase_orders,applied_vendor_credits,company": - return InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsCompany, nil - case "payments,purchase_orders,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,purchase_orders,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsCompanyEmployee, nil - case "payments,purchase_orders,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,purchase_orders,applied_vendor_credits,contact": - return InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsContact, nil - case "payments,purchase_orders,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,purchase_orders,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsContactCompany, nil - case "payments,purchase_orders,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,purchase_orders,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,purchase_orders,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsContactEmployee, nil - case "payments,purchase_orders,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,purchase_orders,applied_vendor_credits,employee": - return InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsEmployee, nil - case "payments,purchase_orders,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,purchase_orders,company": - return InvoicesListRequestExpandPaymentsPurchaseOrdersCompany, nil - case "payments,purchase_orders,company,accounting_period": - return InvoicesListRequestExpandPaymentsPurchaseOrdersCompanyAccountingPeriod, nil - case "payments,purchase_orders,company,employee": - return InvoicesListRequestExpandPaymentsPurchaseOrdersCompanyEmployee, nil - case "payments,purchase_orders,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsPurchaseOrdersCompanyEmployeeAccountingPeriod, nil - case "payments,purchase_orders,contact": - return InvoicesListRequestExpandPaymentsPurchaseOrdersContact, nil - case "payments,purchase_orders,contact,accounting_period": - return InvoicesListRequestExpandPaymentsPurchaseOrdersContactAccountingPeriod, nil - case "payments,purchase_orders,contact,company": - return InvoicesListRequestExpandPaymentsPurchaseOrdersContactCompany, nil - case "payments,purchase_orders,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsPurchaseOrdersContactCompanyAccountingPeriod, nil - case "payments,purchase_orders,contact,company,employee": - return InvoicesListRequestExpandPaymentsPurchaseOrdersContactCompanyEmployee, nil - case "payments,purchase_orders,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsPurchaseOrdersContactCompanyEmployeeAccountingPeriod, nil - case "payments,purchase_orders,contact,employee": - return InvoicesListRequestExpandPaymentsPurchaseOrdersContactEmployee, nil - case "payments,purchase_orders,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsPurchaseOrdersContactEmployeeAccountingPeriod, nil - case "payments,purchase_orders,employee": - return InvoicesListRequestExpandPaymentsPurchaseOrdersEmployee, nil - case "payments,purchase_orders,employee,accounting_period": - return InvoicesListRequestExpandPaymentsPurchaseOrdersEmployeeAccountingPeriod, nil - case "payments,tracking_categories": - return InvoicesListRequestExpandPaymentsTrackingCategories, nil - case "payments,tracking_categories,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesAccountingPeriod, nil - case "payments,tracking_categories,applied_credit_notes": - return InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotes, nil - case "payments,tracking_categories,applied_credit_notes,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAccountingPeriod, nil - case "payments,tracking_categories,applied_credit_notes,applied_vendor_credits": - return InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCredits, nil - case "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company": - return InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContact, nil - case "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,tracking_categories,applied_credit_notes,company": - return InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesCompany, nil - case "payments,tracking_categories,applied_credit_notes,company,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriod, nil - case "payments,tracking_categories,applied_credit_notes,company,employee": - return InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesCompanyEmployee, nil - case "payments,tracking_categories,applied_credit_notes,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "payments,tracking_categories,applied_credit_notes,contact": - return InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesContact, nil - case "payments,tracking_categories,applied_credit_notes,contact,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesContactAccountingPeriod, nil - case "payments,tracking_categories,applied_credit_notes,contact,company": - return InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesContactCompany, nil - case "payments,tracking_categories,applied_credit_notes,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "payments,tracking_categories,applied_credit_notes,contact,company,employee": - return InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyEmployee, nil - case "payments,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "payments,tracking_categories,applied_credit_notes,contact,employee": - return InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesContactEmployee, nil - case "payments,tracking_categories,applied_credit_notes,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "payments,tracking_categories,applied_credit_notes,employee": - return InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesEmployee, nil - case "payments,tracking_categories,applied_credit_notes,employee,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriod, nil - case "payments,tracking_categories,applied_vendor_credits": - return InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedVendorCredits, nil - case "payments,tracking_categories,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsAccountingPeriod, nil - case "payments,tracking_categories,applied_vendor_credits,company": - return InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsCompany, nil - case "payments,tracking_categories,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,tracking_categories,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsCompanyEmployee, nil - case "payments,tracking_categories,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,tracking_categories,applied_vendor_credits,contact": - return InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsContact, nil - case "payments,tracking_categories,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,tracking_categories,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsContactCompany, nil - case "payments,tracking_categories,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,tracking_categories,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,tracking_categories,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsContactEmployee, nil - case "payments,tracking_categories,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,tracking_categories,applied_vendor_credits,employee": - return InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsEmployee, nil - case "payments,tracking_categories,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,tracking_categories,company": - return InvoicesListRequestExpandPaymentsTrackingCategoriesCompany, nil - case "payments,tracking_categories,company,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesCompanyAccountingPeriod, nil - case "payments,tracking_categories,company,employee": - return InvoicesListRequestExpandPaymentsTrackingCategoriesCompanyEmployee, nil - case "payments,tracking_categories,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesCompanyEmployeeAccountingPeriod, nil - case "payments,tracking_categories,contact": - return InvoicesListRequestExpandPaymentsTrackingCategoriesContact, nil - case "payments,tracking_categories,contact,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesContactAccountingPeriod, nil - case "payments,tracking_categories,contact,company": - return InvoicesListRequestExpandPaymentsTrackingCategoriesContactCompany, nil - case "payments,tracking_categories,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesContactCompanyAccountingPeriod, nil - case "payments,tracking_categories,contact,company,employee": - return InvoicesListRequestExpandPaymentsTrackingCategoriesContactCompanyEmployee, nil - case "payments,tracking_categories,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesContactCompanyEmployeeAccountingPeriod, nil - case "payments,tracking_categories,contact,employee": - return InvoicesListRequestExpandPaymentsTrackingCategoriesContactEmployee, nil - case "payments,tracking_categories,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesContactEmployeeAccountingPeriod, nil - case "payments,tracking_categories,employee": - return InvoicesListRequestExpandPaymentsTrackingCategoriesEmployee, nil - case "payments,tracking_categories,employee,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesEmployeeAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrders, nil - case "payments,tracking_categories,purchase_orders,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotes, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCredits, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,company": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompany, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,company,employee": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployee, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,contact": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContact, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompany, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployee, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,contact,employee": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployee, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,employee": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployee, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,applied_vendor_credits": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCredits, nil - case "payments,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,applied_vendor_credits,company": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompany, nil - case "payments,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployee, nil - case "payments,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,applied_vendor_credits,contact": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContact, nil - case "payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompany, nil - case "payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployee, nil - case "payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,applied_vendor_credits,employee": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployee, nil - case "payments,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,company": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersCompany, nil - case "payments,tracking_categories,purchase_orders,company,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,company,employee": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersCompanyEmployee, nil - case "payments,tracking_categories,purchase_orders,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,contact": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersContact, nil - case "payments,tracking_categories,purchase_orders,contact,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersContactAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,contact,company": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersContactCompany, nil - case "payments,tracking_categories,purchase_orders,contact,company,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,contact,company,employee": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersContactCompanyEmployee, nil - case "payments,tracking_categories,purchase_orders,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,contact,employee": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersContactEmployee, nil - case "payments,tracking_categories,purchase_orders,contact,employee,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,employee": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersEmployee, nil - case "payments,tracking_categories,purchase_orders,employee,accounting_period": - return InvoicesListRequestExpandPaymentsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriod, nil + return InvoicesListRequestExpandItemPayments, nil case "purchase_orders": - return InvoicesListRequestExpandPurchaseOrders, nil - case "purchase_orders,accounting_period": - return InvoicesListRequestExpandPurchaseOrdersAccountingPeriod, nil - case "purchase_orders,applied_credit_notes": - return InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotes, nil - case "purchase_orders,applied_credit_notes,accounting_period": - return InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesAccountingPeriod, nil - case "purchase_orders,applied_credit_notes,applied_vendor_credits": - return InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCredits, nil - case "purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "purchase_orders,applied_credit_notes,applied_vendor_credits,company": - return InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "purchase_orders,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact, nil - case "purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "purchase_orders,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "purchase_orders,applied_credit_notes,company": - return InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesCompany, nil - case "purchase_orders,applied_credit_notes,company,accounting_period": - return InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod, nil - case "purchase_orders,applied_credit_notes,company,employee": - return InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesCompanyEmployee, nil - case "purchase_orders,applied_credit_notes,company,employee,accounting_period": - return InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "purchase_orders,applied_credit_notes,contact": - return InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesContact, nil - case "purchase_orders,applied_credit_notes,contact,accounting_period": - return InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesContactAccountingPeriod, nil - case "purchase_orders,applied_credit_notes,contact,company": - return InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesContactCompany, nil - case "purchase_orders,applied_credit_notes,contact,company,accounting_period": - return InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "purchase_orders,applied_credit_notes,contact,company,employee": - return InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesContactCompanyEmployee, nil - case "purchase_orders,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "purchase_orders,applied_credit_notes,contact,employee": - return InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesContactEmployee, nil - case "purchase_orders,applied_credit_notes,contact,employee,accounting_period": - return InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "purchase_orders,applied_credit_notes,employee": - return InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesEmployee, nil - case "purchase_orders,applied_credit_notes,employee,accounting_period": - return InvoicesListRequestExpandPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod, nil - case "purchase_orders,applied_vendor_credits": - return InvoicesListRequestExpandPurchaseOrdersAppliedVendorCredits, nil - case "purchase_orders,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandPurchaseOrdersAppliedVendorCreditsAccountingPeriod, nil - case "purchase_orders,applied_vendor_credits,company": - return InvoicesListRequestExpandPurchaseOrdersAppliedVendorCreditsCompany, nil - case "purchase_orders,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod, nil - case "purchase_orders,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandPurchaseOrdersAppliedVendorCreditsCompanyEmployee, nil - case "purchase_orders,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "purchase_orders,applied_vendor_credits,contact": - return InvoicesListRequestExpandPurchaseOrdersAppliedVendorCreditsContact, nil - case "purchase_orders,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod, nil - case "purchase_orders,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandPurchaseOrdersAppliedVendorCreditsContactCompany, nil - case "purchase_orders,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "purchase_orders,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee, nil - case "purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "purchase_orders,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandPurchaseOrdersAppliedVendorCreditsContactEmployee, nil - case "purchase_orders,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "purchase_orders,applied_vendor_credits,employee": - return InvoicesListRequestExpandPurchaseOrdersAppliedVendorCreditsEmployee, nil - case "purchase_orders,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "purchase_orders,company": - return InvoicesListRequestExpandPurchaseOrdersCompany, nil - case "purchase_orders,company,accounting_period": - return InvoicesListRequestExpandPurchaseOrdersCompanyAccountingPeriod, nil - case "purchase_orders,company,employee": - return InvoicesListRequestExpandPurchaseOrdersCompanyEmployee, nil - case "purchase_orders,company,employee,accounting_period": - return InvoicesListRequestExpandPurchaseOrdersCompanyEmployeeAccountingPeriod, nil - case "purchase_orders,contact": - return InvoicesListRequestExpandPurchaseOrdersContact, nil - case "purchase_orders,contact,accounting_period": - return InvoicesListRequestExpandPurchaseOrdersContactAccountingPeriod, nil - case "purchase_orders,contact,company": - return InvoicesListRequestExpandPurchaseOrdersContactCompany, nil - case "purchase_orders,contact,company,accounting_period": - return InvoicesListRequestExpandPurchaseOrdersContactCompanyAccountingPeriod, nil - case "purchase_orders,contact,company,employee": - return InvoicesListRequestExpandPurchaseOrdersContactCompanyEmployee, nil - case "purchase_orders,contact,company,employee,accounting_period": - return InvoicesListRequestExpandPurchaseOrdersContactCompanyEmployeeAccountingPeriod, nil - case "purchase_orders,contact,employee": - return InvoicesListRequestExpandPurchaseOrdersContactEmployee, nil - case "purchase_orders,contact,employee,accounting_period": - return InvoicesListRequestExpandPurchaseOrdersContactEmployeeAccountingPeriod, nil - case "purchase_orders,employee": - return InvoicesListRequestExpandPurchaseOrdersEmployee, nil - case "purchase_orders,employee,accounting_period": - return InvoicesListRequestExpandPurchaseOrdersEmployeeAccountingPeriod, nil + return InvoicesListRequestExpandItemPurchaseOrders, nil case "tracking_categories": - return InvoicesListRequestExpandTrackingCategories, nil - case "tracking_categories,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesAccountingPeriod, nil - case "tracking_categories,applied_credit_notes": - return InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotes, nil - case "tracking_categories,applied_credit_notes,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesAccountingPeriod, nil - case "tracking_categories,applied_credit_notes,applied_vendor_credits": - return InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCredits, nil - case "tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "tracking_categories,applied_credit_notes,applied_vendor_credits,company": - return InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "tracking_categories,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContact, nil - case "tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "tracking_categories,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "tracking_categories,applied_credit_notes,company": - return InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesCompany, nil - case "tracking_categories,applied_credit_notes,company,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriod, nil - case "tracking_categories,applied_credit_notes,company,employee": - return InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesCompanyEmployee, nil - case "tracking_categories,applied_credit_notes,company,employee,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "tracking_categories,applied_credit_notes,contact": - return InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesContact, nil - case "tracking_categories,applied_credit_notes,contact,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesContactAccountingPeriod, nil - case "tracking_categories,applied_credit_notes,contact,company": - return InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesContactCompany, nil - case "tracking_categories,applied_credit_notes,contact,company,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "tracking_categories,applied_credit_notes,contact,company,employee": - return InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesContactCompanyEmployee, nil - case "tracking_categories,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "tracking_categories,applied_credit_notes,contact,employee": - return InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesContactEmployee, nil - case "tracking_categories,applied_credit_notes,contact,employee,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "tracking_categories,applied_credit_notes,employee": - return InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesEmployee, nil - case "tracking_categories,applied_credit_notes,employee,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriod, nil - case "tracking_categories,applied_vendor_credits": - return InvoicesListRequestExpandTrackingCategoriesAppliedVendorCredits, nil - case "tracking_categories,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesAppliedVendorCreditsAccountingPeriod, nil - case "tracking_categories,applied_vendor_credits,company": - return InvoicesListRequestExpandTrackingCategoriesAppliedVendorCreditsCompany, nil - case "tracking_categories,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "tracking_categories,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandTrackingCategoriesAppliedVendorCreditsCompanyEmployee, nil - case "tracking_categories,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "tracking_categories,applied_vendor_credits,contact": - return InvoicesListRequestExpandTrackingCategoriesAppliedVendorCreditsContact, nil - case "tracking_categories,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesAppliedVendorCreditsContactAccountingPeriod, nil - case "tracking_categories,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandTrackingCategoriesAppliedVendorCreditsContactCompany, nil - case "tracking_categories,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "tracking_categories,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandTrackingCategoriesAppliedVendorCreditsContactCompanyEmployee, nil - case "tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "tracking_categories,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandTrackingCategoriesAppliedVendorCreditsContactEmployee, nil - case "tracking_categories,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "tracking_categories,applied_vendor_credits,employee": - return InvoicesListRequestExpandTrackingCategoriesAppliedVendorCreditsEmployee, nil - case "tracking_categories,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "tracking_categories,company": - return InvoicesListRequestExpandTrackingCategoriesCompany, nil - case "tracking_categories,company,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesCompanyAccountingPeriod, nil - case "tracking_categories,company,employee": - return InvoicesListRequestExpandTrackingCategoriesCompanyEmployee, nil - case "tracking_categories,company,employee,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesCompanyEmployeeAccountingPeriod, nil - case "tracking_categories,contact": - return InvoicesListRequestExpandTrackingCategoriesContact, nil - case "tracking_categories,contact,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesContactAccountingPeriod, nil - case "tracking_categories,contact,company": - return InvoicesListRequestExpandTrackingCategoriesContactCompany, nil - case "tracking_categories,contact,company,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesContactCompanyAccountingPeriod, nil - case "tracking_categories,contact,company,employee": - return InvoicesListRequestExpandTrackingCategoriesContactCompanyEmployee, nil - case "tracking_categories,contact,company,employee,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesContactCompanyEmployeeAccountingPeriod, nil - case "tracking_categories,contact,employee": - return InvoicesListRequestExpandTrackingCategoriesContactEmployee, nil - case "tracking_categories,contact,employee,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesContactEmployeeAccountingPeriod, nil - case "tracking_categories,employee": - return InvoicesListRequestExpandTrackingCategoriesEmployee, nil - case "tracking_categories,employee,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesEmployeeAccountingPeriod, nil - case "tracking_categories,purchase_orders": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrders, nil - case "tracking_categories,purchase_orders,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAccountingPeriod, nil - case "tracking_categories,purchase_orders,applied_credit_notes": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotes, nil - case "tracking_categories,purchase_orders,applied_credit_notes,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriod, nil - case "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCredits, nil - case "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact, nil - case "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "tracking_categories,purchase_orders,applied_credit_notes,company": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompany, nil - case "tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod, nil - case "tracking_categories,purchase_orders,applied_credit_notes,company,employee": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployee, nil - case "tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "tracking_categories,purchase_orders,applied_credit_notes,contact": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesContact, nil - case "tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriod, nil - case "tracking_categories,purchase_orders,applied_credit_notes,contact,company": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompany, nil - case "tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployee, nil - case "tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "tracking_categories,purchase_orders,applied_credit_notes,contact,employee": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployee, nil - case "tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "tracking_categories,purchase_orders,applied_credit_notes,employee": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployee, nil - case "tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod, nil - case "tracking_categories,purchase_orders,applied_vendor_credits": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCredits, nil - case "tracking_categories,purchase_orders,applied_vendor_credits,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriod, nil - case "tracking_categories,purchase_orders,applied_vendor_credits,company": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompany, nil - case "tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod, nil - case "tracking_categories,purchase_orders,applied_vendor_credits,company,employee": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployee, nil - case "tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "tracking_categories,purchase_orders,applied_vendor_credits,contact": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContact, nil - case "tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod, nil - case "tracking_categories,purchase_orders,applied_vendor_credits,contact,company": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompany, nil - case "tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee, nil - case "tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "tracking_categories,purchase_orders,applied_vendor_credits,contact,employee": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployee, nil - case "tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "tracking_categories,purchase_orders,applied_vendor_credits,employee": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployee, nil - case "tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "tracking_categories,purchase_orders,company": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersCompany, nil - case "tracking_categories,purchase_orders,company,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersCompanyAccountingPeriod, nil - case "tracking_categories,purchase_orders,company,employee": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersCompanyEmployee, nil - case "tracking_categories,purchase_orders,company,employee,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriod, nil - case "tracking_categories,purchase_orders,contact": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersContact, nil - case "tracking_categories,purchase_orders,contact,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersContactAccountingPeriod, nil - case "tracking_categories,purchase_orders,contact,company": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersContactCompany, nil - case "tracking_categories,purchase_orders,contact,company,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriod, nil - case "tracking_categories,purchase_orders,contact,company,employee": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersContactCompanyEmployee, nil - case "tracking_categories,purchase_orders,contact,company,employee,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriod, nil - case "tracking_categories,purchase_orders,contact,employee": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersContactEmployee, nil - case "tracking_categories,purchase_orders,contact,employee,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriod, nil - case "tracking_categories,purchase_orders,employee": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersEmployee, nil - case "tracking_categories,purchase_orders,employee,accounting_period": - return InvoicesListRequestExpandTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriod, nil - } - var t InvoicesListRequestExpand + return InvoicesListRequestExpandItemTrackingCategories, nil + } + var t InvoicesListRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (i InvoicesListRequestExpand) Ptr() *InvoicesListRequestExpand { +func (i InvoicesListRequestExpandItem) Ptr() *InvoicesListRequestExpandItem { return &i } @@ -6334,6159 +237,3068 @@ func (i InvoicesListRequestType) Ptr() *InvoicesListRequestType { return &i } -type InvoicesRetrieveRequestExpand string +type InvoicesRetrieveRequestExpandItem string const ( - InvoicesRetrieveRequestExpandAccountingPeriod InvoicesRetrieveRequestExpand = "accounting_period" - InvoicesRetrieveRequestExpandAppliedCreditNotes InvoicesRetrieveRequestExpand = "applied_credit_notes" - InvoicesRetrieveRequestExpandAppliedCreditNotesAccountingPeriod InvoicesRetrieveRequestExpand = "applied_credit_notes,accounting_period" - InvoicesRetrieveRequestExpandAppliedCreditNotesAppliedVendorCredits InvoicesRetrieveRequestExpand = "applied_credit_notes,applied_vendor_credits" - InvoicesRetrieveRequestExpandAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandAppliedCreditNotesAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "applied_credit_notes,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedCreditNotesAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "applied_credit_notes,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "applied_credit_notes,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedCreditNotesCompany InvoicesRetrieveRequestExpand = "applied_credit_notes,company" - InvoicesRetrieveRequestExpandAppliedCreditNotesCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_credit_notes,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedCreditNotesCompanyEmployee InvoicesRetrieveRequestExpand = "applied_credit_notes,company,employee" - InvoicesRetrieveRequestExpandAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_credit_notes,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedCreditNotesContact InvoicesRetrieveRequestExpand = "applied_credit_notes,contact" - InvoicesRetrieveRequestExpandAppliedCreditNotesContactAccountingPeriod InvoicesRetrieveRequestExpand = "applied_credit_notes,contact,accounting_period" - InvoicesRetrieveRequestExpandAppliedCreditNotesContactCompany InvoicesRetrieveRequestExpand = "applied_credit_notes,contact,company" - InvoicesRetrieveRequestExpandAppliedCreditNotesContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_credit_notes,contact,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedCreditNotesContactCompanyEmployee InvoicesRetrieveRequestExpand = "applied_credit_notes,contact,company,employee" - InvoicesRetrieveRequestExpandAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_credit_notes,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedCreditNotesContactEmployee InvoicesRetrieveRequestExpand = "applied_credit_notes,contact,employee" - InvoicesRetrieveRequestExpandAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_credit_notes,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedCreditNotesEmployee InvoicesRetrieveRequestExpand = "applied_credit_notes,employee" - InvoicesRetrieveRequestExpandAppliedCreditNotesEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_credit_notes,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPayments InvoicesRetrieveRequestExpand = "applied_payments" - InvoicesRetrieveRequestExpandAppliedPaymentsAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotes InvoicesRetrieveRequestExpand = "applied_payments,applied_credit_notes" - InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,applied_credit_notes,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCredits InvoicesRetrieveRequestExpand = "applied_payments,applied_credit_notes,applied_vendor_credits" - InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "applied_payments,applied_credit_notes,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "applied_payments,applied_credit_notes,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "applied_payments,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "applied_payments,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "applied_payments,applied_credit_notes,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesCompany InvoicesRetrieveRequestExpand = "applied_payments,applied_credit_notes,company" - InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,applied_credit_notes,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,applied_credit_notes,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,applied_credit_notes,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesContact InvoicesRetrieveRequestExpand = "applied_payments,applied_credit_notes,contact" - InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesContactAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,applied_credit_notes,contact,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesContactCompany InvoicesRetrieveRequestExpand = "applied_payments,applied_credit_notes,contact,company" - InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,applied_credit_notes,contact,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesContactCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,applied_credit_notes,contact,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesContactEmployee InvoicesRetrieveRequestExpand = "applied_payments,applied_credit_notes,contact,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,applied_credit_notes,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesEmployee InvoicesRetrieveRequestExpand = "applied_payments,applied_credit_notes,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,applied_credit_notes,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsAppliedVendorCredits InvoicesRetrieveRequestExpand = "applied_payments,applied_vendor_credits" - InvoicesRetrieveRequestExpandAppliedPaymentsAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "applied_payments,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandAppliedPaymentsAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "applied_payments,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandAppliedPaymentsAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "applied_payments,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandAppliedPaymentsAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "applied_payments,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "applied_payments,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsCompany InvoicesRetrieveRequestExpand = "applied_payments,company" - InvoicesRetrieveRequestExpandAppliedPaymentsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsContact InvoicesRetrieveRequestExpand = "applied_payments,contact" - InvoicesRetrieveRequestExpandAppliedPaymentsContactAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,contact,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsContactCompany InvoicesRetrieveRequestExpand = "applied_payments,contact,company" - InvoicesRetrieveRequestExpandAppliedPaymentsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,contact,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsContactCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,contact,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsContactEmployee InvoicesRetrieveRequestExpand = "applied_payments,contact,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsEmployee InvoicesRetrieveRequestExpand = "applied_payments,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItems InvoicesRetrieveRequestExpand = "applied_payments,line_items" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotes InvoicesRetrieveRequestExpand = "applied_payments,line_items,applied_credit_notes" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,applied_credit_notes,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCredits InvoicesRetrieveRequestExpand = "applied_payments,line_items,applied_credit_notes,applied_vendor_credits" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesCompany InvoicesRetrieveRequestExpand = "applied_payments,line_items,applied_credit_notes,company" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,applied_credit_notes,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,applied_credit_notes,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,applied_credit_notes,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesContact InvoicesRetrieveRequestExpand = "applied_payments,line_items,applied_credit_notes,contact" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesContactAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,applied_credit_notes,contact,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesContactCompany InvoicesRetrieveRequestExpand = "applied_payments,line_items,applied_credit_notes,contact,company" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,applied_credit_notes,contact,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesContactCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,applied_credit_notes,contact,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesContactEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,applied_credit_notes,contact,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,applied_credit_notes,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,applied_credit_notes,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,applied_credit_notes,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedVendorCredits InvoicesRetrieveRequestExpand = "applied_payments,line_items,applied_vendor_credits" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "applied_payments,line_items,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "applied_payments,line_items,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "applied_payments,line_items,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsCompany InvoicesRetrieveRequestExpand = "applied_payments,line_items,company" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsContact InvoicesRetrieveRequestExpand = "applied_payments,line_items,contact" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsContactAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,contact,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsContactCompany InvoicesRetrieveRequestExpand = "applied_payments,line_items,contact,company" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,contact,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsContactCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,contact,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsContactEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,contact,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrders InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotes InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCredits InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompany InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,company" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContact InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,contact" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,contact,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompany InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,contact,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,applied_credit_notes,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCredits InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,applied_vendor_credits" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersCompany InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,company" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersContact InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,contact" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersContactAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,contact,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersContactCompany InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,contact,company" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,contact,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersContactCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,contact,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersContactEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,contact,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,purchase_orders,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategories InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotes InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCredits InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompany InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,company" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContact InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,contact" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,contact,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompany InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,contact,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,applied_credit_notes,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCredits InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,applied_vendor_credits" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesCompany InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,company" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesContact InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,contact" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesContactAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,contact,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesContactCompany InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,contact,company" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,contact,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesContactCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,contact,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesContactEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,contact,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrders InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotes InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCredits InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompany InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContact InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompany InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCredits InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompany InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,company" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContact InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,contact" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,contact,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompany InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,contact,company" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,contact,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,contact,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,contact,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersEmployee InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,line_items,tracking_categories,purchase_orders,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrders InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotes InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,applied_credit_notes" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCredits InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesCompany InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,company" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesContact InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,contact" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,contact,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompany InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,contact,company" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,contact,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,contact,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactEmployee InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,contact,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesEmployee InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,applied_credit_notes,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCredits InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,applied_vendor_credits" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersCompany InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,company" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersContact InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,contact" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersContactAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,contact,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersContactCompany InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,contact,company" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,contact,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersContactCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,contact,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersContactEmployee InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,contact,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersEmployee InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,purchase_orders,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategories InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotes InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,applied_credit_notes" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCredits InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesCompany InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,company" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesContact InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,contact" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,contact,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompany InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,contact,company" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,contact,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,contact,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactEmployee InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,contact,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesEmployee InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,applied_credit_notes,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCredits InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,applied_vendor_credits" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesCompany InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,company" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesContact InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,contact" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesContactAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,contact,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesContactCompany InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,contact,company" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,contact,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesContactCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,contact,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesContactEmployee InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,contact,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesEmployee InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrders InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotes InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCredits InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompany InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContact InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompany InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployee InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployee InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCredits InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersCompany InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,company" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersContact InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,contact" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersContactAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,contact,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompany InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,contact,company" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,contact,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompanyEmployee InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,contact,company,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersContactEmployee InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,contact,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersEmployee InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,employee" - InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_payments,tracking_categories,purchase_orders,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedVendorCredits InvoicesRetrieveRequestExpand = "applied_vendor_credits" - InvoicesRetrieveRequestExpandAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "applied_vendor_credits,company" - InvoicesRetrieveRequestExpandAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandCompany InvoicesRetrieveRequestExpand = "company" - InvoicesRetrieveRequestExpandCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "company,accounting_period" - InvoicesRetrieveRequestExpandCompanyEmployee InvoicesRetrieveRequestExpand = "company,employee" - InvoicesRetrieveRequestExpandCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "company,employee,accounting_period" - InvoicesRetrieveRequestExpandContact InvoicesRetrieveRequestExpand = "contact" - InvoicesRetrieveRequestExpandContactAccountingPeriod InvoicesRetrieveRequestExpand = "contact,accounting_period" - InvoicesRetrieveRequestExpandContactCompany InvoicesRetrieveRequestExpand = "contact,company" - InvoicesRetrieveRequestExpandContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "contact,company,accounting_period" - InvoicesRetrieveRequestExpandContactCompanyEmployee InvoicesRetrieveRequestExpand = "contact,company,employee" - InvoicesRetrieveRequestExpandContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandContactEmployee InvoicesRetrieveRequestExpand = "contact,employee" - InvoicesRetrieveRequestExpandContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "contact,employee,accounting_period" - InvoicesRetrieveRequestExpandEmployee InvoicesRetrieveRequestExpand = "employee" - InvoicesRetrieveRequestExpandEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "employee,accounting_period" - InvoicesRetrieveRequestExpandLineItems InvoicesRetrieveRequestExpand = "line_items" - InvoicesRetrieveRequestExpandLineItemsAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,accounting_period" - InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotes InvoicesRetrieveRequestExpand = "line_items,applied_credit_notes" - InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,applied_credit_notes,accounting_period" - InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesAppliedVendorCredits InvoicesRetrieveRequestExpand = "line_items,applied_credit_notes,applied_vendor_credits" - InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "line_items,applied_credit_notes,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "line_items,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "line_items,applied_credit_notes,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "line_items,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "line_items,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "line_items,applied_credit_notes,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesCompany InvoicesRetrieveRequestExpand = "line_items,applied_credit_notes,company" - InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,applied_credit_notes,company,accounting_period" - InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesCompanyEmployee InvoicesRetrieveRequestExpand = "line_items,applied_credit_notes,company,employee" - InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,applied_credit_notes,company,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesContact InvoicesRetrieveRequestExpand = "line_items,applied_credit_notes,contact" - InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesContactAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,applied_credit_notes,contact,accounting_period" - InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesContactCompany InvoicesRetrieveRequestExpand = "line_items,applied_credit_notes,contact,company" - InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,applied_credit_notes,contact,company,accounting_period" - InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesContactCompanyEmployee InvoicesRetrieveRequestExpand = "line_items,applied_credit_notes,contact,company,employee" - InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesContactEmployee InvoicesRetrieveRequestExpand = "line_items,applied_credit_notes,contact,employee" - InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,applied_credit_notes,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesEmployee InvoicesRetrieveRequestExpand = "line_items,applied_credit_notes,employee" - InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,applied_credit_notes,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsAppliedVendorCredits InvoicesRetrieveRequestExpand = "line_items,applied_vendor_credits" - InvoicesRetrieveRequestExpandLineItemsAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandLineItemsAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "line_items,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandLineItemsAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandLineItemsAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "line_items,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandLineItemsAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "line_items,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandLineItemsAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandLineItemsAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "line_items,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandLineItemsAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandLineItemsAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "line_items,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandLineItemsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "line_items,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandLineItemsAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "line_items,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandLineItemsAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsCompany InvoicesRetrieveRequestExpand = "line_items,company" - InvoicesRetrieveRequestExpandLineItemsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,company,accounting_period" - InvoicesRetrieveRequestExpandLineItemsCompanyEmployee InvoicesRetrieveRequestExpand = "line_items,company,employee" - InvoicesRetrieveRequestExpandLineItemsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,company,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsContact InvoicesRetrieveRequestExpand = "line_items,contact" - InvoicesRetrieveRequestExpandLineItemsContactAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,contact,accounting_period" - InvoicesRetrieveRequestExpandLineItemsContactCompany InvoicesRetrieveRequestExpand = "line_items,contact,company" - InvoicesRetrieveRequestExpandLineItemsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,contact,company,accounting_period" - InvoicesRetrieveRequestExpandLineItemsContactCompanyEmployee InvoicesRetrieveRequestExpand = "line_items,contact,company,employee" - InvoicesRetrieveRequestExpandLineItemsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsContactEmployee InvoicesRetrieveRequestExpand = "line_items,contact,employee" - InvoicesRetrieveRequestExpandLineItemsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsEmployee InvoicesRetrieveRequestExpand = "line_items,employee" - InvoicesRetrieveRequestExpandLineItemsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrders InvoicesRetrieveRequestExpand = "line_items,purchase_orders" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,purchase_orders,accounting_period" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotes InvoicesRetrieveRequestExpand = "line_items,purchase_orders,applied_credit_notes" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,purchase_orders,applied_credit_notes,accounting_period" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCredits InvoicesRetrieveRequestExpand = "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesCompany InvoicesRetrieveRequestExpand = "line_items,purchase_orders,applied_credit_notes,company" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,purchase_orders,applied_credit_notes,company,accounting_period" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployee InvoicesRetrieveRequestExpand = "line_items,purchase_orders,applied_credit_notes,company,employee" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,purchase_orders,applied_credit_notes,company,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesContact InvoicesRetrieveRequestExpand = "line_items,purchase_orders,applied_credit_notes,contact" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesContactAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,purchase_orders,applied_credit_notes,contact,accounting_period" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesContactCompany InvoicesRetrieveRequestExpand = "line_items,purchase_orders,applied_credit_notes,contact,company" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,purchase_orders,applied_credit_notes,contact,company,accounting_period" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployee InvoicesRetrieveRequestExpand = "line_items,purchase_orders,applied_credit_notes,contact,company,employee" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesContactEmployee InvoicesRetrieveRequestExpand = "line_items,purchase_orders,applied_credit_notes,contact,employee" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,purchase_orders,applied_credit_notes,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesEmployee InvoicesRetrieveRequestExpand = "line_items,purchase_orders,applied_credit_notes,employee" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,purchase_orders,applied_credit_notes,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedVendorCredits InvoicesRetrieveRequestExpand = "line_items,purchase_orders,applied_vendor_credits" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,purchase_orders,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "line_items,purchase_orders,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,purchase_orders,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "line_items,purchase_orders,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,purchase_orders,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "line_items,purchase_orders,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,purchase_orders,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "line_items,purchase_orders,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,purchase_orders,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "line_items,purchase_orders,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "line_items,purchase_orders,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,purchase_orders,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "line_items,purchase_orders,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,purchase_orders,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersCompany InvoicesRetrieveRequestExpand = "line_items,purchase_orders,company" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,purchase_orders,company,accounting_period" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersCompanyEmployee InvoicesRetrieveRequestExpand = "line_items,purchase_orders,company,employee" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,purchase_orders,company,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersContact InvoicesRetrieveRequestExpand = "line_items,purchase_orders,contact" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersContactAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,purchase_orders,contact,accounting_period" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersContactCompany InvoicesRetrieveRequestExpand = "line_items,purchase_orders,contact,company" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,purchase_orders,contact,company,accounting_period" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersContactCompanyEmployee InvoicesRetrieveRequestExpand = "line_items,purchase_orders,contact,company,employee" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,purchase_orders,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersContactEmployee InvoicesRetrieveRequestExpand = "line_items,purchase_orders,contact,employee" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,purchase_orders,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersEmployee InvoicesRetrieveRequestExpand = "line_items,purchase_orders,employee" - InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,purchase_orders,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategories InvoicesRetrieveRequestExpand = "line_items,tracking_categories" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotes InvoicesRetrieveRequestExpand = "line_items,tracking_categories,applied_credit_notes" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,applied_credit_notes,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCredits InvoicesRetrieveRequestExpand = "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesCompany InvoicesRetrieveRequestExpand = "line_items,tracking_categories,applied_credit_notes,company" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,applied_credit_notes,company,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployee InvoicesRetrieveRequestExpand = "line_items,tracking_categories,applied_credit_notes,company,employee" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,applied_credit_notes,company,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesContact InvoicesRetrieveRequestExpand = "line_items,tracking_categories,applied_credit_notes,contact" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesContactAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,applied_credit_notes,contact,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesContactCompany InvoicesRetrieveRequestExpand = "line_items,tracking_categories,applied_credit_notes,contact,company" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,applied_credit_notes,contact,company,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployee InvoicesRetrieveRequestExpand = "line_items,tracking_categories,applied_credit_notes,contact,company,employee" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesContactEmployee InvoicesRetrieveRequestExpand = "line_items,tracking_categories,applied_credit_notes,contact,employee" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,applied_credit_notes,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesEmployee InvoicesRetrieveRequestExpand = "line_items,tracking_categories,applied_credit_notes,employee" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,applied_credit_notes,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedVendorCredits InvoicesRetrieveRequestExpand = "line_items,tracking_categories,applied_vendor_credits" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "line_items,tracking_categories,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "line_items,tracking_categories,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "line_items,tracking_categories,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "line_items,tracking_categories,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "line_items,tracking_categories,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "line_items,tracking_categories,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "line_items,tracking_categories,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesCompany InvoicesRetrieveRequestExpand = "line_items,tracking_categories,company" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,company,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesCompanyEmployee InvoicesRetrieveRequestExpand = "line_items,tracking_categories,company,employee" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,company,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesContact InvoicesRetrieveRequestExpand = "line_items,tracking_categories,contact" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesContactAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,contact,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesContactCompany InvoicesRetrieveRequestExpand = "line_items,tracking_categories,contact,company" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,contact,company,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesContactCompanyEmployee InvoicesRetrieveRequestExpand = "line_items,tracking_categories,contact,company,employee" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesContactEmployee InvoicesRetrieveRequestExpand = "line_items,tracking_categories,contact,employee" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesEmployee InvoicesRetrieveRequestExpand = "line_items,tracking_categories,employee" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrders InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotes InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCredits InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompany InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,company" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployee InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContact InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,contact" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompany InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployee InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployee InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployee InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,employee" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCredits InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,applied_vendor_credits" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersCompany InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,company" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,company,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployee InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,company,employee" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,company,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersContact InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,contact" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersContactAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,contact,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersContactCompany InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,contact,company" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,contact,company,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployee InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,contact,company,employee" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersContactEmployee InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,contact,employee" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersEmployee InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,employee" - InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "line_items,tracking_categories,purchase_orders,employee,accounting_period" - InvoicesRetrieveRequestExpandPayments InvoicesRetrieveRequestExpand = "payments" - InvoicesRetrieveRequestExpandPaymentsAccountingPeriod InvoicesRetrieveRequestExpand = "payments,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotes InvoicesRetrieveRequestExpand = "payments,applied_credit_notes" - InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_credit_notes,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesAppliedVendorCredits InvoicesRetrieveRequestExpand = "payments,applied_credit_notes,applied_vendor_credits" - InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "payments,applied_credit_notes,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "payments,applied_credit_notes,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "payments,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "payments,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "payments,applied_credit_notes,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesCompany InvoicesRetrieveRequestExpand = "payments,applied_credit_notes,company" - InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_credit_notes,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_credit_notes,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_credit_notes,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesContact InvoicesRetrieveRequestExpand = "payments,applied_credit_notes,contact" - InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_credit_notes,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesContactCompany InvoicesRetrieveRequestExpand = "payments,applied_credit_notes,contact,company" - InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_credit_notes,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_credit_notes,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesContactEmployee InvoicesRetrieveRequestExpand = "payments,applied_credit_notes,contact,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_credit_notes,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesEmployee InvoicesRetrieveRequestExpand = "payments,applied_credit_notes,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_credit_notes,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPayments InvoicesRetrieveRequestExpand = "payments,applied_payments" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotes InvoicesRetrieveRequestExpand = "payments,applied_payments,applied_credit_notes" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,applied_credit_notes,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCredits InvoicesRetrieveRequestExpand = "payments,applied_payments,applied_credit_notes,applied_vendor_credits" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,applied_credit_notes,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,applied_credit_notes,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,applied_credit_notes,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,applied_credit_notes,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,applied_credit_notes,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,applied_credit_notes,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesContact InvoicesRetrieveRequestExpand = "payments,applied_payments,applied_credit_notes,contact" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,applied_credit_notes,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesContactCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,applied_credit_notes,contact,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,applied_credit_notes,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,applied_credit_notes,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesContactEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,applied_credit_notes,contact,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,applied_credit_notes,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,applied_credit_notes,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,applied_credit_notes,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedVendorCredits InvoicesRetrieveRequestExpand = "payments,applied_payments,applied_vendor_credits" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "payments,applied_payments,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsContact InvoicesRetrieveRequestExpand = "payments,applied_payments,contact" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsContactCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,contact,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsContactEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,contact,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItems InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotes InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,applied_credit_notes" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCredits InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesContact InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,contact" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,contact,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,contact,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,applied_credit_notes,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCredits InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,applied_vendor_credits" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsContact InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,contact" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsContactCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,contact,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsContactEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,contact,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrders InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotes InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCredits InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContact InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCredits InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersContact InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,contact" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersContactCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,contact,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersContactEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,contact,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,purchase_orders,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategories InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotes InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCredits InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContact InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCredits InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesContact InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,contact" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesContactCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,contact,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesContactEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,contact,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrders InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotes InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCredits InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContact InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCredits InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContact InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,contact" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,line_items,tracking_categories,purchase_orders,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrders InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotes InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCredits InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContact InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,contact" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,contact,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,contact,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,applied_credit_notes,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCredits InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,applied_vendor_credits" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersContact InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,contact" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersContactCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,contact,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersContactEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,contact,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,purchase_orders,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategories InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotes InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCredits InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContact InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,contact" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,contact,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,contact,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,applied_credit_notes,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCredits InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,applied_vendor_credits" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesContact InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,contact" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesContactCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,contact,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesContactEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,contact,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrders InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotes InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCredits InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContact InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCredits InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContact InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,contact" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompany InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,contact,company" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,contact,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersEmployee InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,purchase_orders,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedVendorCredits InvoicesRetrieveRequestExpand = "payments,applied_vendor_credits" - InvoicesRetrieveRequestExpandPaymentsAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "payments,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandPaymentsAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "payments,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandPaymentsAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "payments,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandPaymentsAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "payments,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "payments,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandPaymentsAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsCompany InvoicesRetrieveRequestExpand = "payments,company" - InvoicesRetrieveRequestExpandPaymentsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsCompanyEmployee InvoicesRetrieveRequestExpand = "payments,company,employee" - InvoicesRetrieveRequestExpandPaymentsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsContact InvoicesRetrieveRequestExpand = "payments,contact" - InvoicesRetrieveRequestExpandPaymentsContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsContactCompany InvoicesRetrieveRequestExpand = "payments,contact,company" - InvoicesRetrieveRequestExpandPaymentsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsContactEmployee InvoicesRetrieveRequestExpand = "payments,contact,employee" - InvoicesRetrieveRequestExpandPaymentsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsEmployee InvoicesRetrieveRequestExpand = "payments,employee" - InvoicesRetrieveRequestExpandPaymentsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItems InvoicesRetrieveRequestExpand = "payments,line_items" - InvoicesRetrieveRequestExpandPaymentsLineItemsAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotes InvoicesRetrieveRequestExpand = "payments,line_items,applied_credit_notes" - InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,applied_credit_notes,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCredits InvoicesRetrieveRequestExpand = "payments,line_items,applied_credit_notes,applied_vendor_credits" - InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "payments,line_items,applied_credit_notes,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "payments,line_items,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "payments,line_items,applied_credit_notes,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "payments,line_items,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "payments,line_items,applied_credit_notes,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesCompany InvoicesRetrieveRequestExpand = "payments,line_items,applied_credit_notes,company" - InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,applied_credit_notes,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesCompanyEmployee InvoicesRetrieveRequestExpand = "payments,line_items,applied_credit_notes,company,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,applied_credit_notes,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesContact InvoicesRetrieveRequestExpand = "payments,line_items,applied_credit_notes,contact" - InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,applied_credit_notes,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesContactCompany InvoicesRetrieveRequestExpand = "payments,line_items,applied_credit_notes,contact,company" - InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,applied_credit_notes,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,line_items,applied_credit_notes,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesContactEmployee InvoicesRetrieveRequestExpand = "payments,line_items,applied_credit_notes,contact,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,applied_credit_notes,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesEmployee InvoicesRetrieveRequestExpand = "payments,line_items,applied_credit_notes,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,applied_credit_notes,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedVendorCredits InvoicesRetrieveRequestExpand = "payments,line_items,applied_vendor_credits" - InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "payments,line_items,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "payments,line_items,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "payments,line_items,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "payments,line_items,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,line_items,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "payments,line_items,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "payments,line_items,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsCompany InvoicesRetrieveRequestExpand = "payments,line_items,company" - InvoicesRetrieveRequestExpandPaymentsLineItemsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsCompanyEmployee InvoicesRetrieveRequestExpand = "payments,line_items,company,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsContact InvoicesRetrieveRequestExpand = "payments,line_items,contact" - InvoicesRetrieveRequestExpandPaymentsLineItemsContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsContactCompany InvoicesRetrieveRequestExpand = "payments,line_items,contact,company" - InvoicesRetrieveRequestExpandPaymentsLineItemsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,line_items,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsContactEmployee InvoicesRetrieveRequestExpand = "payments,line_items,contact,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsEmployee InvoicesRetrieveRequestExpand = "payments,line_items,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrders InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotes InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCredits InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompany InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,company" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployee InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,company,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContact InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,contact" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompany InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,contact,company" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactEmployee InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,contact,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesEmployee InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,applied_credit_notes,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCredits InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,applied_vendor_credits" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersCompany InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,company" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersCompanyEmployee InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,company,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersContact InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,contact" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersContactCompany InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,contact,company" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersContactEmployee InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,contact,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersEmployee InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,purchase_orders,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategories InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotes InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCredits InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompany InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,company" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployee InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,company,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContact InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,contact" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompany InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,contact,company" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactEmployee InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,contact,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesEmployee InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,applied_credit_notes,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCredits InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,applied_vendor_credits" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesCompany InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,company" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesCompanyEmployee InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,company,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesContact InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,contact" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesContactCompany InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,contact,company" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesContactEmployee InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,contact,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesEmployee InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrders InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotes InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCredits InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompany InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployee InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContact InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompany InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployee InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployee InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCredits InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompany InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,company" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployee InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,company,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersContact InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,contact" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompany InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,contact,company" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactEmployee InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,contact,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersEmployee InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,employee" - InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,line_items,tracking_categories,purchase_orders,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrders InvoicesRetrieveRequestExpand = "payments,purchase_orders" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAccountingPeriod InvoicesRetrieveRequestExpand = "payments,purchase_orders,accounting_period" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotes InvoicesRetrieveRequestExpand = "payments,purchase_orders,applied_credit_notes" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAccountingPeriod InvoicesRetrieveRequestExpand = "payments,purchase_orders,applied_credit_notes,accounting_period" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCredits InvoicesRetrieveRequestExpand = "payments,purchase_orders,applied_credit_notes,applied_vendor_credits" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesCompany InvoicesRetrieveRequestExpand = "payments,purchase_orders,applied_credit_notes,company" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,purchase_orders,applied_credit_notes,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesCompanyEmployee InvoicesRetrieveRequestExpand = "payments,purchase_orders,applied_credit_notes,company,employee" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,purchase_orders,applied_credit_notes,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesContact InvoicesRetrieveRequestExpand = "payments,purchase_orders,applied_credit_notes,contact" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,purchase_orders,applied_credit_notes,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesContactCompany InvoicesRetrieveRequestExpand = "payments,purchase_orders,applied_credit_notes,contact,company" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,purchase_orders,applied_credit_notes,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,purchase_orders,applied_credit_notes,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesContactEmployee InvoicesRetrieveRequestExpand = "payments,purchase_orders,applied_credit_notes,contact,employee" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,purchase_orders,applied_credit_notes,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesEmployee InvoicesRetrieveRequestExpand = "payments,purchase_orders,applied_credit_notes,employee" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,purchase_orders,applied_credit_notes,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedVendorCredits InvoicesRetrieveRequestExpand = "payments,purchase_orders,applied_vendor_credits" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "payments,purchase_orders,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "payments,purchase_orders,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,purchase_orders,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "payments,purchase_orders,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,purchase_orders,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "payments,purchase_orders,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,purchase_orders,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "payments,purchase_orders,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,purchase_orders,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,purchase_orders,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "payments,purchase_orders,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,purchase_orders,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "payments,purchase_orders,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,purchase_orders,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersCompany InvoicesRetrieveRequestExpand = "payments,purchase_orders,company" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,purchase_orders,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersCompanyEmployee InvoicesRetrieveRequestExpand = "payments,purchase_orders,company,employee" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,purchase_orders,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersContact InvoicesRetrieveRequestExpand = "payments,purchase_orders,contact" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,purchase_orders,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersContactCompany InvoicesRetrieveRequestExpand = "payments,purchase_orders,contact,company" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,purchase_orders,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,purchase_orders,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,purchase_orders,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersContactEmployee InvoicesRetrieveRequestExpand = "payments,purchase_orders,contact,employee" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,purchase_orders,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersEmployee InvoicesRetrieveRequestExpand = "payments,purchase_orders,employee" - InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,purchase_orders,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategories InvoicesRetrieveRequestExpand = "payments,tracking_categories" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotes InvoicesRetrieveRequestExpand = "payments,tracking_categories,applied_credit_notes" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,applied_credit_notes,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCredits InvoicesRetrieveRequestExpand = "payments,tracking_categories,applied_credit_notes,applied_vendor_credits" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesCompany InvoicesRetrieveRequestExpand = "payments,tracking_categories,applied_credit_notes,company" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,applied_credit_notes,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesCompanyEmployee InvoicesRetrieveRequestExpand = "payments,tracking_categories,applied_credit_notes,company,employee" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,applied_credit_notes,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesContact InvoicesRetrieveRequestExpand = "payments,tracking_categories,applied_credit_notes,contact" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,applied_credit_notes,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesContactCompany InvoicesRetrieveRequestExpand = "payments,tracking_categories,applied_credit_notes,contact,company" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,applied_credit_notes,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,tracking_categories,applied_credit_notes,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesContactEmployee InvoicesRetrieveRequestExpand = "payments,tracking_categories,applied_credit_notes,contact,employee" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,applied_credit_notes,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesEmployee InvoicesRetrieveRequestExpand = "payments,tracking_categories,applied_credit_notes,employee" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,applied_credit_notes,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedVendorCredits InvoicesRetrieveRequestExpand = "payments,tracking_categories,applied_vendor_credits" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "payments,tracking_categories,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "payments,tracking_categories,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "payments,tracking_categories,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "payments,tracking_categories,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,tracking_categories,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "payments,tracking_categories,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "payments,tracking_categories,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesCompany InvoicesRetrieveRequestExpand = "payments,tracking_categories,company" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesCompanyEmployee InvoicesRetrieveRequestExpand = "payments,tracking_categories,company,employee" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesContact InvoicesRetrieveRequestExpand = "payments,tracking_categories,contact" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesContactCompany InvoicesRetrieveRequestExpand = "payments,tracking_categories,contact,company" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,tracking_categories,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesContactEmployee InvoicesRetrieveRequestExpand = "payments,tracking_categories,contact,employee" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesEmployee InvoicesRetrieveRequestExpand = "payments,tracking_categories,employee" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrders InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotes InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCredits InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompany InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,company" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployee InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,company,employee" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContact InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,contact" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompany InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployee InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,contact,employee" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployee InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,employee" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCredits InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,applied_vendor_credits" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersCompany InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,company" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersCompanyEmployee InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,company,employee" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersContact InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,contact" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersContactAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,contact,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersContactCompany InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,contact,company" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersContactCompanyEmployee InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,contact,company,employee" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersContactEmployee InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,contact,employee" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersEmployee InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,employee" - InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "payments,tracking_categories,purchase_orders,employee,accounting_period" - InvoicesRetrieveRequestExpandPurchaseOrders InvoicesRetrieveRequestExpand = "purchase_orders" - InvoicesRetrieveRequestExpandPurchaseOrdersAccountingPeriod InvoicesRetrieveRequestExpand = "purchase_orders,accounting_period" - InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotes InvoicesRetrieveRequestExpand = "purchase_orders,applied_credit_notes" - InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesAccountingPeriod InvoicesRetrieveRequestExpand = "purchase_orders,applied_credit_notes,accounting_period" - InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCredits InvoicesRetrieveRequestExpand = "purchase_orders,applied_credit_notes,applied_vendor_credits" - InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "purchase_orders,applied_credit_notes,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "purchase_orders,applied_credit_notes,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "purchase_orders,applied_credit_notes,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesCompany InvoicesRetrieveRequestExpand = "purchase_orders,applied_credit_notes,company" - InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "purchase_orders,applied_credit_notes,company,accounting_period" - InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesCompanyEmployee InvoicesRetrieveRequestExpand = "purchase_orders,applied_credit_notes,company,employee" - InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "purchase_orders,applied_credit_notes,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesContact InvoicesRetrieveRequestExpand = "purchase_orders,applied_credit_notes,contact" - InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesContactAccountingPeriod InvoicesRetrieveRequestExpand = "purchase_orders,applied_credit_notes,contact,accounting_period" - InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesContactCompany InvoicesRetrieveRequestExpand = "purchase_orders,applied_credit_notes,contact,company" - InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "purchase_orders,applied_credit_notes,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesContactCompanyEmployee InvoicesRetrieveRequestExpand = "purchase_orders,applied_credit_notes,contact,company,employee" - InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "purchase_orders,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesContactEmployee InvoicesRetrieveRequestExpand = "purchase_orders,applied_credit_notes,contact,employee" - InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "purchase_orders,applied_credit_notes,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesEmployee InvoicesRetrieveRequestExpand = "purchase_orders,applied_credit_notes,employee" - InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "purchase_orders,applied_credit_notes,employee,accounting_period" - InvoicesRetrieveRequestExpandPurchaseOrdersAppliedVendorCredits InvoicesRetrieveRequestExpand = "purchase_orders,applied_vendor_credits" - InvoicesRetrieveRequestExpandPurchaseOrdersAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "purchase_orders,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandPurchaseOrdersAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "purchase_orders,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "purchase_orders,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandPurchaseOrdersAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "purchase_orders,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "purchase_orders,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPurchaseOrdersAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "purchase_orders,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "purchase_orders,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandPurchaseOrdersAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "purchase_orders,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "purchase_orders,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "purchase_orders,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPurchaseOrdersAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "purchase_orders,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "purchase_orders,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPurchaseOrdersAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "purchase_orders,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "purchase_orders,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandPurchaseOrdersCompany InvoicesRetrieveRequestExpand = "purchase_orders,company" - InvoicesRetrieveRequestExpandPurchaseOrdersCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "purchase_orders,company,accounting_period" - InvoicesRetrieveRequestExpandPurchaseOrdersCompanyEmployee InvoicesRetrieveRequestExpand = "purchase_orders,company,employee" - InvoicesRetrieveRequestExpandPurchaseOrdersCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "purchase_orders,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPurchaseOrdersContact InvoicesRetrieveRequestExpand = "purchase_orders,contact" - InvoicesRetrieveRequestExpandPurchaseOrdersContactAccountingPeriod InvoicesRetrieveRequestExpand = "purchase_orders,contact,accounting_period" - InvoicesRetrieveRequestExpandPurchaseOrdersContactCompany InvoicesRetrieveRequestExpand = "purchase_orders,contact,company" - InvoicesRetrieveRequestExpandPurchaseOrdersContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "purchase_orders,contact,company,accounting_period" - InvoicesRetrieveRequestExpandPurchaseOrdersContactCompanyEmployee InvoicesRetrieveRequestExpand = "purchase_orders,contact,company,employee" - InvoicesRetrieveRequestExpandPurchaseOrdersContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "purchase_orders,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandPurchaseOrdersContactEmployee InvoicesRetrieveRequestExpand = "purchase_orders,contact,employee" - InvoicesRetrieveRequestExpandPurchaseOrdersContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "purchase_orders,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandPurchaseOrdersEmployee InvoicesRetrieveRequestExpand = "purchase_orders,employee" - InvoicesRetrieveRequestExpandPurchaseOrdersEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "purchase_orders,employee,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategories InvoicesRetrieveRequestExpand = "tracking_categories" - InvoicesRetrieveRequestExpandTrackingCategoriesAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotes InvoicesRetrieveRequestExpand = "tracking_categories,applied_credit_notes" - InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,applied_credit_notes,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCredits InvoicesRetrieveRequestExpand = "tracking_categories,applied_credit_notes,applied_vendor_credits" - InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "tracking_categories,applied_credit_notes,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "tracking_categories,applied_credit_notes,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "tracking_categories,applied_credit_notes,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesCompany InvoicesRetrieveRequestExpand = "tracking_categories,applied_credit_notes,company" - InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,applied_credit_notes,company,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesCompanyEmployee InvoicesRetrieveRequestExpand = "tracking_categories,applied_credit_notes,company,employee" - InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,applied_credit_notes,company,employee,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesContact InvoicesRetrieveRequestExpand = "tracking_categories,applied_credit_notes,contact" - InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesContactAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,applied_credit_notes,contact,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesContactCompany InvoicesRetrieveRequestExpand = "tracking_categories,applied_credit_notes,contact,company" - InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,applied_credit_notes,contact,company,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesContactCompanyEmployee InvoicesRetrieveRequestExpand = "tracking_categories,applied_credit_notes,contact,company,employee" - InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesContactEmployee InvoicesRetrieveRequestExpand = "tracking_categories,applied_credit_notes,contact,employee" - InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,applied_credit_notes,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesEmployee InvoicesRetrieveRequestExpand = "tracking_categories,applied_credit_notes,employee" - InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,applied_credit_notes,employee,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesAppliedVendorCredits InvoicesRetrieveRequestExpand = "tracking_categories,applied_vendor_credits" - InvoicesRetrieveRequestExpandTrackingCategoriesAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "tracking_categories,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "tracking_categories,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "tracking_categories,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandTrackingCategoriesAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "tracking_categories,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "tracking_categories,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "tracking_categories,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "tracking_categories,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesCompany InvoicesRetrieveRequestExpand = "tracking_categories,company" - InvoicesRetrieveRequestExpandTrackingCategoriesCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,company,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesCompanyEmployee InvoicesRetrieveRequestExpand = "tracking_categories,company,employee" - InvoicesRetrieveRequestExpandTrackingCategoriesCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,company,employee,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesContact InvoicesRetrieveRequestExpand = "tracking_categories,contact" - InvoicesRetrieveRequestExpandTrackingCategoriesContactAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,contact,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesContactCompany InvoicesRetrieveRequestExpand = "tracking_categories,contact,company" - InvoicesRetrieveRequestExpandTrackingCategoriesContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,contact,company,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesContactCompanyEmployee InvoicesRetrieveRequestExpand = "tracking_categories,contact,company,employee" - InvoicesRetrieveRequestExpandTrackingCategoriesContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesContactEmployee InvoicesRetrieveRequestExpand = "tracking_categories,contact,employee" - InvoicesRetrieveRequestExpandTrackingCategoriesContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesEmployee InvoicesRetrieveRequestExpand = "tracking_categories,employee" - InvoicesRetrieveRequestExpandTrackingCategoriesEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,employee,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrders InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotes InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCredits InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompany InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,company" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployee InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,company,employee" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesContact InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,contact" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompany InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,contact,company" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployee InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployee InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,contact,employee" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployee InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,employee" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCredits InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,applied_vendor_credits" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,applied_vendor_credits,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompany InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,applied_vendor_credits,company" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployee InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,applied_vendor_credits,company,employee" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContact InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,applied_vendor_credits,contact" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompany InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,applied_vendor_credits,contact,company" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployee InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,applied_vendor_credits,contact,employee" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployee InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,applied_vendor_credits,employee" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersCompany InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,company" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,company,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersCompanyEmployee InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,company,employee" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,company,employee,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersContact InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,contact" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersContactAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,contact,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersContactCompany InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,contact,company" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,contact,company,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersContactCompanyEmployee InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,contact,company,employee" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,contact,company,employee,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersContactEmployee InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,contact,employee" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,contact,employee,accounting_period" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersEmployee InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,employee" - InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriod InvoicesRetrieveRequestExpand = "tracking_categories,purchase_orders,employee,accounting_period" + InvoicesRetrieveRequestExpandItemAccountingPeriod InvoicesRetrieveRequestExpandItem = "accounting_period" + InvoicesRetrieveRequestExpandItemAppliedCreditNotes InvoicesRetrieveRequestExpandItem = "applied_credit_notes" + InvoicesRetrieveRequestExpandItemAppliedPayments InvoicesRetrieveRequestExpandItem = "applied_payments" + InvoicesRetrieveRequestExpandItemAppliedVendorCredits InvoicesRetrieveRequestExpandItem = "applied_vendor_credits" + InvoicesRetrieveRequestExpandItemCompany InvoicesRetrieveRequestExpandItem = "company" + InvoicesRetrieveRequestExpandItemContact InvoicesRetrieveRequestExpandItem = "contact" + InvoicesRetrieveRequestExpandItemEmployee InvoicesRetrieveRequestExpandItem = "employee" + InvoicesRetrieveRequestExpandItemLineItems InvoicesRetrieveRequestExpandItem = "line_items" + InvoicesRetrieveRequestExpandItemPaymentTerm InvoicesRetrieveRequestExpandItem = "payment_term" + InvoicesRetrieveRequestExpandItemPayments InvoicesRetrieveRequestExpandItem = "payments" + InvoicesRetrieveRequestExpandItemPurchaseOrders InvoicesRetrieveRequestExpandItem = "purchase_orders" + InvoicesRetrieveRequestExpandItemTrackingCategories InvoicesRetrieveRequestExpandItem = "tracking_categories" ) -func NewInvoicesRetrieveRequestExpandFromString(s string) (InvoicesRetrieveRequestExpand, error) { +func NewInvoicesRetrieveRequestExpandItemFromString(s string) (InvoicesRetrieveRequestExpandItem, error) { switch s { case "accounting_period": - return InvoicesRetrieveRequestExpandAccountingPeriod, nil + return InvoicesRetrieveRequestExpandItemAccountingPeriod, nil case "applied_credit_notes": - return InvoicesRetrieveRequestExpandAppliedCreditNotes, nil - case "applied_credit_notes,accounting_period": - return InvoicesRetrieveRequestExpandAppliedCreditNotesAccountingPeriod, nil - case "applied_credit_notes,applied_vendor_credits": - return InvoicesRetrieveRequestExpandAppliedCreditNotesAppliedVendorCredits, nil - case "applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "applied_credit_notes,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "applied_credit_notes,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandAppliedCreditNotesAppliedVendorCreditsContact, nil - case "applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "applied_credit_notes,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "applied_credit_notes,company": - return InvoicesRetrieveRequestExpandAppliedCreditNotesCompany, nil - case "applied_credit_notes,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedCreditNotesCompanyAccountingPeriod, nil - case "applied_credit_notes,company,employee": - return InvoicesRetrieveRequestExpandAppliedCreditNotesCompanyEmployee, nil - case "applied_credit_notes,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "applied_credit_notes,contact": - return InvoicesRetrieveRequestExpandAppliedCreditNotesContact, nil - case "applied_credit_notes,contact,accounting_period": - return InvoicesRetrieveRequestExpandAppliedCreditNotesContactAccountingPeriod, nil - case "applied_credit_notes,contact,company": - return InvoicesRetrieveRequestExpandAppliedCreditNotesContactCompany, nil - case "applied_credit_notes,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "applied_credit_notes,contact,company,employee": - return InvoicesRetrieveRequestExpandAppliedCreditNotesContactCompanyEmployee, nil - case "applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "applied_credit_notes,contact,employee": - return InvoicesRetrieveRequestExpandAppliedCreditNotesContactEmployee, nil - case "applied_credit_notes,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "applied_credit_notes,employee": - return InvoicesRetrieveRequestExpandAppliedCreditNotesEmployee, nil - case "applied_credit_notes,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedCreditNotesEmployeeAccountingPeriod, nil + return InvoicesRetrieveRequestExpandItemAppliedCreditNotes, nil case "applied_payments": - return InvoicesRetrieveRequestExpandAppliedPayments, nil - case "applied_payments,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsAccountingPeriod, nil - case "applied_payments,applied_credit_notes": - return InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotes, nil - case "applied_payments,applied_credit_notes,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesAccountingPeriod, nil - case "applied_payments,applied_credit_notes,applied_vendor_credits": - return InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCredits, nil - case "applied_payments,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "applied_payments,applied_credit_notes,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "applied_payments,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "applied_payments,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "applied_payments,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "applied_payments,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContact, nil - case "applied_payments,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "applied_payments,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "applied_payments,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "applied_payments,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "applied_payments,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "applied_payments,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "applied_payments,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "applied_payments,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "applied_payments,applied_credit_notes,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesCompany, nil - case "applied_payments,applied_credit_notes,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesCompanyAccountingPeriod, nil - case "applied_payments,applied_credit_notes,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesCompanyEmployee, nil - case "applied_payments,applied_credit_notes,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "applied_payments,applied_credit_notes,contact": - return InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesContact, nil - case "applied_payments,applied_credit_notes,contact,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesContactAccountingPeriod, nil - case "applied_payments,applied_credit_notes,contact,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesContactCompany, nil - case "applied_payments,applied_credit_notes,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "applied_payments,applied_credit_notes,contact,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesContactCompanyEmployee, nil - case "applied_payments,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,applied_credit_notes,contact,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesContactEmployee, nil - case "applied_payments,applied_credit_notes,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "applied_payments,applied_credit_notes,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesEmployee, nil - case "applied_payments,applied_credit_notes,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsAppliedCreditNotesEmployeeAccountingPeriod, nil - case "applied_payments,applied_vendor_credits": - return InvoicesRetrieveRequestExpandAppliedPaymentsAppliedVendorCredits, nil - case "applied_payments,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsAppliedVendorCreditsAccountingPeriod, nil - case "applied_payments,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsAppliedVendorCreditsCompany, nil - case "applied_payments,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsAppliedVendorCreditsCompanyAccountingPeriod, nil - case "applied_payments,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsAppliedVendorCreditsCompanyEmployee, nil - case "applied_payments,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "applied_payments,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandAppliedPaymentsAppliedVendorCreditsContact, nil - case "applied_payments,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsAppliedVendorCreditsContactAccountingPeriod, nil - case "applied_payments,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsAppliedVendorCreditsContactCompany, nil - case "applied_payments,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "applied_payments,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsAppliedVendorCreditsContactCompanyEmployee, nil - case "applied_payments,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsAppliedVendorCreditsContactEmployee, nil - case "applied_payments,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "applied_payments,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsAppliedVendorCreditsEmployee, nil - case "applied_payments,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "applied_payments,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsCompany, nil - case "applied_payments,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsCompanyAccountingPeriod, nil - case "applied_payments,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsCompanyEmployee, nil - case "applied_payments,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsCompanyEmployeeAccountingPeriod, nil - case "applied_payments,contact": - return InvoicesRetrieveRequestExpandAppliedPaymentsContact, nil - case "applied_payments,contact,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsContactAccountingPeriod, nil - case "applied_payments,contact,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsContactCompany, nil - case "applied_payments,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsContactCompanyAccountingPeriod, nil - case "applied_payments,contact,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsContactCompanyEmployee, nil - case "applied_payments,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,contact,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsContactEmployee, nil - case "applied_payments,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsContactEmployeeAccountingPeriod, nil - case "applied_payments,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsEmployee, nil - case "applied_payments,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsEmployeeAccountingPeriod, nil - case "applied_payments,line_items": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItems, nil - case "applied_payments,line_items,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAccountingPeriod, nil - case "applied_payments,line_items,applied_credit_notes": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotes, nil - case "applied_payments,line_items,applied_credit_notes,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAccountingPeriod, nil - case "applied_payments,line_items,applied_credit_notes,applied_vendor_credits": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCredits, nil - case "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContact, nil - case "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "applied_payments,line_items,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "applied_payments,line_items,applied_credit_notes,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesCompany, nil - case "applied_payments,line_items,applied_credit_notes,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesCompanyAccountingPeriod, nil - case "applied_payments,line_items,applied_credit_notes,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesCompanyEmployee, nil - case "applied_payments,line_items,applied_credit_notes,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,applied_credit_notes,contact": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesContact, nil - case "applied_payments,line_items,applied_credit_notes,contact,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesContactAccountingPeriod, nil - case "applied_payments,line_items,applied_credit_notes,contact,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesContactCompany, nil - case "applied_payments,line_items,applied_credit_notes,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "applied_payments,line_items,applied_credit_notes,contact,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesContactCompanyEmployee, nil - case "applied_payments,line_items,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,applied_credit_notes,contact,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesContactEmployee, nil - case "applied_payments,line_items,applied_credit_notes,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "applied_payments,line_items,applied_credit_notes,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesEmployee, nil - case "applied_payments,line_items,applied_credit_notes,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedCreditNotesEmployeeAccountingPeriod, nil - case "applied_payments,line_items,applied_vendor_credits": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedVendorCredits, nil - case "applied_payments,line_items,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsAccountingPeriod, nil - case "applied_payments,line_items,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsCompany, nil - case "applied_payments,line_items,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsCompanyAccountingPeriod, nil - case "applied_payments,line_items,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsCompanyEmployee, nil - case "applied_payments,line_items,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsContact, nil - case "applied_payments,line_items,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsContactAccountingPeriod, nil - case "applied_payments,line_items,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsContactCompany, nil - case "applied_payments,line_items,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "applied_payments,line_items,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsContactCompanyEmployee, nil - case "applied_payments,line_items,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsContactEmployee, nil - case "applied_payments,line_items,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "applied_payments,line_items,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsEmployee, nil - case "applied_payments,line_items,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "applied_payments,line_items,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsCompany, nil - case "applied_payments,line_items,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsCompanyAccountingPeriod, nil - case "applied_payments,line_items,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsCompanyEmployee, nil - case "applied_payments,line_items,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,contact": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsContact, nil - case "applied_payments,line_items,contact,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsContactAccountingPeriod, nil - case "applied_payments,line_items,contact,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsContactCompany, nil - case "applied_payments,line_items,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsContactCompanyAccountingPeriod, nil - case "applied_payments,line_items,contact,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsContactCompanyEmployee, nil - case "applied_payments,line_items,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,contact,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsContactEmployee, nil - case "applied_payments,line_items,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsContactEmployeeAccountingPeriod, nil - case "applied_payments,line_items,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsEmployee, nil - case "applied_payments,line_items,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsEmployeeAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrders, nil - case "applied_payments,line_items,purchase_orders,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotes, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCredits, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompany, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployee, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,contact": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContact, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,contact,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompany, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployee, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,contact,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactEmployee, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesEmployee, nil - case "applied_payments,line_items,purchase_orders,applied_credit_notes,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,applied_vendor_credits": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCredits, nil - case "applied_payments,line_items,purchase_orders,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompany, nil - case "applied_payments,line_items,purchase_orders,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployee, nil - case "applied_payments,line_items,purchase_orders,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContact, nil - case "applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompany, nil - case "applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee, nil - case "applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployee, nil - case "applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsEmployee, nil - case "applied_payments,line_items,purchase_orders,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersCompany, nil - case "applied_payments,line_items,purchase_orders,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersCompanyAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersCompanyEmployee, nil - case "applied_payments,line_items,purchase_orders,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,contact": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersContact, nil - case "applied_payments,line_items,purchase_orders,contact,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersContactAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,contact,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersContactCompany, nil - case "applied_payments,line_items,purchase_orders,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersContactCompanyAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,contact,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersContactCompanyEmployee, nil - case "applied_payments,line_items,purchase_orders,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,contact,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersContactEmployee, nil - case "applied_payments,line_items,purchase_orders,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersContactEmployeeAccountingPeriod, nil - case "applied_payments,line_items,purchase_orders,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersEmployee, nil - case "applied_payments,line_items,purchase_orders,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsPurchaseOrdersEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategories, nil - case "applied_payments,line_items,tracking_categories,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotes, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCredits, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContact, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompany, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployee, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,contact": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContact, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,contact,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompany, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployee, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,contact,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactEmployee, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesEmployee, nil - case "applied_payments,line_items,tracking_categories,applied_credit_notes,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,applied_vendor_credits": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCredits, nil - case "applied_payments,line_items,tracking_categories,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompany, nil - case "applied_payments,line_items,tracking_categories,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployee, nil - case "applied_payments,line_items,tracking_categories,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContact, nil - case "applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompany, nil - case "applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployee, nil - case "applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployee, nil - case "applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsEmployee, nil - case "applied_payments,line_items,tracking_categories,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesCompany, nil - case "applied_payments,line_items,tracking_categories,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesCompanyAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesCompanyEmployee, nil - case "applied_payments,line_items,tracking_categories,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,contact": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesContact, nil - case "applied_payments,line_items,tracking_categories,contact,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesContactAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,contact,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesContactCompany, nil - case "applied_payments,line_items,tracking_categories,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesContactCompanyAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,contact,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesContactCompanyEmployee, nil - case "applied_payments,line_items,tracking_categories,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,contact,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesContactEmployee, nil - case "applied_payments,line_items,tracking_categories,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesContactEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesEmployee, nil - case "applied_payments,line_items,tracking_categories,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrders, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotes, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCredits, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompany, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployee, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContact, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompany, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployee, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployee, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployee, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCredits, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompany, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployee, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContact, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompany, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployee, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployee, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompany, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployee, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,contact": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContact, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,contact,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,contact,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompany, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,contact,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployee, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,contact,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactEmployee, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriod, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersEmployee, nil - case "applied_payments,line_items,tracking_categories,purchase_orders,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriod, nil - case "applied_payments,purchase_orders": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrders, nil - case "applied_payments,purchase_orders,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAccountingPeriod, nil - case "applied_payments,purchase_orders,applied_credit_notes": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotes, nil - case "applied_payments,purchase_orders,applied_credit_notes,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAccountingPeriod, nil - case "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCredits, nil - case "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact, nil - case "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "applied_payments,purchase_orders,applied_credit_notes,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesCompany, nil - case "applied_payments,purchase_orders,applied_credit_notes,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod, nil - case "applied_payments,purchase_orders,applied_credit_notes,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesCompanyEmployee, nil - case "applied_payments,purchase_orders,applied_credit_notes,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "applied_payments,purchase_orders,applied_credit_notes,contact": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesContact, nil - case "applied_payments,purchase_orders,applied_credit_notes,contact,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactAccountingPeriod, nil - case "applied_payments,purchase_orders,applied_credit_notes,contact,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompany, nil - case "applied_payments,purchase_orders,applied_credit_notes,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "applied_payments,purchase_orders,applied_credit_notes,contact,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyEmployee, nil - case "applied_payments,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,purchase_orders,applied_credit_notes,contact,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactEmployee, nil - case "applied_payments,purchase_orders,applied_credit_notes,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "applied_payments,purchase_orders,applied_credit_notes,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesEmployee, nil - case "applied_payments,purchase_orders,applied_credit_notes,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod, nil - case "applied_payments,purchase_orders,applied_vendor_credits": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCredits, nil - case "applied_payments,purchase_orders,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsAccountingPeriod, nil - case "applied_payments,purchase_orders,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompany, nil - case "applied_payments,purchase_orders,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod, nil - case "applied_payments,purchase_orders,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompanyEmployee, nil - case "applied_payments,purchase_orders,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "applied_payments,purchase_orders,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContact, nil - case "applied_payments,purchase_orders,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod, nil - case "applied_payments,purchase_orders,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompany, nil - case "applied_payments,purchase_orders,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "applied_payments,purchase_orders,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee, nil - case "applied_payments,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,purchase_orders,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactEmployee, nil - case "applied_payments,purchase_orders,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "applied_payments,purchase_orders,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsEmployee, nil - case "applied_payments,purchase_orders,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "applied_payments,purchase_orders,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersCompany, nil - case "applied_payments,purchase_orders,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersCompanyAccountingPeriod, nil - case "applied_payments,purchase_orders,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersCompanyEmployee, nil - case "applied_payments,purchase_orders,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersCompanyEmployeeAccountingPeriod, nil - case "applied_payments,purchase_orders,contact": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersContact, nil - case "applied_payments,purchase_orders,contact,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersContactAccountingPeriod, nil - case "applied_payments,purchase_orders,contact,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersContactCompany, nil - case "applied_payments,purchase_orders,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersContactCompanyAccountingPeriod, nil - case "applied_payments,purchase_orders,contact,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersContactCompanyEmployee, nil - case "applied_payments,purchase_orders,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,purchase_orders,contact,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersContactEmployee, nil - case "applied_payments,purchase_orders,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersContactEmployeeAccountingPeriod, nil - case "applied_payments,purchase_orders,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersEmployee, nil - case "applied_payments,purchase_orders,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsPurchaseOrdersEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategories, nil - case "applied_payments,tracking_categories,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAccountingPeriod, nil - case "applied_payments,tracking_categories,applied_credit_notes": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotes, nil - case "applied_payments,tracking_categories,applied_credit_notes,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAccountingPeriod, nil - case "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCredits, nil - case "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContact, nil - case "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,applied_credit_notes,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesCompany, nil - case "applied_payments,tracking_categories,applied_credit_notes,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriod, nil - case "applied_payments,tracking_categories,applied_credit_notes,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesCompanyEmployee, nil - case "applied_payments,tracking_categories,applied_credit_notes,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,applied_credit_notes,contact": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesContact, nil - case "applied_payments,tracking_categories,applied_credit_notes,contact,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactAccountingPeriod, nil - case "applied_payments,tracking_categories,applied_credit_notes,contact,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompany, nil - case "applied_payments,tracking_categories,applied_credit_notes,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "applied_payments,tracking_categories,applied_credit_notes,contact,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyEmployee, nil - case "applied_payments,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,applied_credit_notes,contact,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactEmployee, nil - case "applied_payments,tracking_categories,applied_credit_notes,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,applied_credit_notes,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesEmployee, nil - case "applied_payments,tracking_categories,applied_credit_notes,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,applied_vendor_credits": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCredits, nil - case "applied_payments,tracking_categories,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsAccountingPeriod, nil - case "applied_payments,tracking_categories,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompany, nil - case "applied_payments,tracking_categories,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "applied_payments,tracking_categories,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompanyEmployee, nil - case "applied_payments,tracking_categories,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContact, nil - case "applied_payments,tracking_categories,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriod, nil - case "applied_payments,tracking_categories,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompany, nil - case "applied_payments,tracking_categories,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "applied_payments,tracking_categories,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployee, nil - case "applied_payments,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactEmployee, nil - case "applied_payments,tracking_categories,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsEmployee, nil - case "applied_payments,tracking_categories,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesCompany, nil - case "applied_payments,tracking_categories,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesCompanyAccountingPeriod, nil - case "applied_payments,tracking_categories,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesCompanyEmployee, nil - case "applied_payments,tracking_categories,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesCompanyEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,contact": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesContact, nil - case "applied_payments,tracking_categories,contact,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesContactAccountingPeriod, nil - case "applied_payments,tracking_categories,contact,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesContactCompany, nil - case "applied_payments,tracking_categories,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesContactCompanyAccountingPeriod, nil - case "applied_payments,tracking_categories,contact,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesContactCompanyEmployee, nil - case "applied_payments,tracking_categories,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,contact,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesContactEmployee, nil - case "applied_payments,tracking_categories,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesContactEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesEmployee, nil - case "applied_payments,tracking_categories,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrders, nil - case "applied_payments,tracking_categories,purchase_orders,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotes, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCredits, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompany, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployee, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContact, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompany, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployee, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployee, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployee, nil - case "applied_payments,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCredits, nil - case "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompany, nil - case "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployee, nil - case "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContact, nil - case "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompany, nil - case "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee, nil - case "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployee, nil - case "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployee, nil - case "applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersCompany, nil - case "applied_payments,tracking_categories,purchase_orders,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersCompanyEmployee, nil - case "applied_payments,tracking_categories,purchase_orders,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,contact": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersContact, nil - case "applied_payments,tracking_categories,purchase_orders,contact,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersContactAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,contact,company": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompany, nil - case "applied_payments,tracking_categories,purchase_orders,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,contact,company,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompanyEmployee, nil - case "applied_payments,tracking_categories,purchase_orders,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,contact,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersContactEmployee, nil - case "applied_payments,tracking_categories,purchase_orders,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriod, nil - case "applied_payments,tracking_categories,purchase_orders,employee": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersEmployee, nil - case "applied_payments,tracking_categories,purchase_orders,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriod, nil + return InvoicesRetrieveRequestExpandItemAppliedPayments, nil case "applied_vendor_credits": - return InvoicesRetrieveRequestExpandAppliedVendorCredits, nil - case "applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandAppliedVendorCreditsAccountingPeriod, nil - case "applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandAppliedVendorCreditsCompany, nil - case "applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedVendorCreditsCompanyAccountingPeriod, nil - case "applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandAppliedVendorCreditsCompanyEmployee, nil - case "applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandAppliedVendorCreditsContact, nil - case "applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandAppliedVendorCreditsContactAccountingPeriod, nil - case "applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandAppliedVendorCreditsContactCompany, nil - case "applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandAppliedVendorCreditsContactCompanyEmployee, nil - case "applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandAppliedVendorCreditsContactEmployee, nil - case "applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandAppliedVendorCreditsEmployee, nil - case "applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandAppliedVendorCreditsEmployeeAccountingPeriod, nil + return InvoicesRetrieveRequestExpandItemAppliedVendorCredits, nil case "company": - return InvoicesRetrieveRequestExpandCompany, nil - case "company,accounting_period": - return InvoicesRetrieveRequestExpandCompanyAccountingPeriod, nil - case "company,employee": - return InvoicesRetrieveRequestExpandCompanyEmployee, nil - case "company,employee,accounting_period": - return InvoicesRetrieveRequestExpandCompanyEmployeeAccountingPeriod, nil + return InvoicesRetrieveRequestExpandItemCompany, nil case "contact": - return InvoicesRetrieveRequestExpandContact, nil - case "contact,accounting_period": - return InvoicesRetrieveRequestExpandContactAccountingPeriod, nil - case "contact,company": - return InvoicesRetrieveRequestExpandContactCompany, nil - case "contact,company,accounting_period": - return InvoicesRetrieveRequestExpandContactCompanyAccountingPeriod, nil - case "contact,company,employee": - return InvoicesRetrieveRequestExpandContactCompanyEmployee, nil - case "contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandContactCompanyEmployeeAccountingPeriod, nil - case "contact,employee": - return InvoicesRetrieveRequestExpandContactEmployee, nil - case "contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandContactEmployeeAccountingPeriod, nil + return InvoicesRetrieveRequestExpandItemContact, nil case "employee": - return InvoicesRetrieveRequestExpandEmployee, nil - case "employee,accounting_period": - return InvoicesRetrieveRequestExpandEmployeeAccountingPeriod, nil + return InvoicesRetrieveRequestExpandItemEmployee, nil case "line_items": - return InvoicesRetrieveRequestExpandLineItems, nil - case "line_items,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsAccountingPeriod, nil - case "line_items,applied_credit_notes": - return InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotes, nil - case "line_items,applied_credit_notes,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesAccountingPeriod, nil - case "line_items,applied_credit_notes,applied_vendor_credits": - return InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesAppliedVendorCredits, nil - case "line_items,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "line_items,applied_credit_notes,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "line_items,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "line_items,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "line_items,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "line_items,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsContact, nil - case "line_items,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "line_items,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "line_items,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "line_items,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "line_items,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "line_items,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "line_items,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "line_items,applied_credit_notes,company": - return InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesCompany, nil - case "line_items,applied_credit_notes,company,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesCompanyAccountingPeriod, nil - case "line_items,applied_credit_notes,company,employee": - return InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesCompanyEmployee, nil - case "line_items,applied_credit_notes,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "line_items,applied_credit_notes,contact": - return InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesContact, nil - case "line_items,applied_credit_notes,contact,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesContactAccountingPeriod, nil - case "line_items,applied_credit_notes,contact,company": - return InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesContactCompany, nil - case "line_items,applied_credit_notes,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "line_items,applied_credit_notes,contact,company,employee": - return InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesContactCompanyEmployee, nil - case "line_items,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "line_items,applied_credit_notes,contact,employee": - return InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesContactEmployee, nil - case "line_items,applied_credit_notes,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "line_items,applied_credit_notes,employee": - return InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesEmployee, nil - case "line_items,applied_credit_notes,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsAppliedCreditNotesEmployeeAccountingPeriod, nil - case "line_items,applied_vendor_credits": - return InvoicesRetrieveRequestExpandLineItemsAppliedVendorCredits, nil - case "line_items,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsAppliedVendorCreditsAccountingPeriod, nil - case "line_items,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandLineItemsAppliedVendorCreditsCompany, nil - case "line_items,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsAppliedVendorCreditsCompanyAccountingPeriod, nil - case "line_items,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandLineItemsAppliedVendorCreditsCompanyEmployee, nil - case "line_items,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "line_items,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandLineItemsAppliedVendorCreditsContact, nil - case "line_items,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsAppliedVendorCreditsContactAccountingPeriod, nil - case "line_items,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandLineItemsAppliedVendorCreditsContactCompany, nil - case "line_items,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "line_items,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandLineItemsAppliedVendorCreditsContactCompanyEmployee, nil - case "line_items,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "line_items,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandLineItemsAppliedVendorCreditsContactEmployee, nil - case "line_items,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "line_items,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandLineItemsAppliedVendorCreditsEmployee, nil - case "line_items,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "line_items,company": - return InvoicesRetrieveRequestExpandLineItemsCompany, nil - case "line_items,company,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsCompanyAccountingPeriod, nil - case "line_items,company,employee": - return InvoicesRetrieveRequestExpandLineItemsCompanyEmployee, nil - case "line_items,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsCompanyEmployeeAccountingPeriod, nil - case "line_items,contact": - return InvoicesRetrieveRequestExpandLineItemsContact, nil - case "line_items,contact,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsContactAccountingPeriod, nil - case "line_items,contact,company": - return InvoicesRetrieveRequestExpandLineItemsContactCompany, nil - case "line_items,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsContactCompanyAccountingPeriod, nil - case "line_items,contact,company,employee": - return InvoicesRetrieveRequestExpandLineItemsContactCompanyEmployee, nil - case "line_items,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsContactCompanyEmployeeAccountingPeriod, nil - case "line_items,contact,employee": - return InvoicesRetrieveRequestExpandLineItemsContactEmployee, nil - case "line_items,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsContactEmployeeAccountingPeriod, nil - case "line_items,employee": - return InvoicesRetrieveRequestExpandLineItemsEmployee, nil - case "line_items,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsEmployeeAccountingPeriod, nil - case "line_items,purchase_orders": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrders, nil - case "line_items,purchase_orders,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAccountingPeriod, nil - case "line_items,purchase_orders,applied_credit_notes": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotes, nil - case "line_items,purchase_orders,applied_credit_notes,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAccountingPeriod, nil - case "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCredits, nil - case "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact, nil - case "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "line_items,purchase_orders,applied_credit_notes,company": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesCompany, nil - case "line_items,purchase_orders,applied_credit_notes,company,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod, nil - case "line_items,purchase_orders,applied_credit_notes,company,employee": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployee, nil - case "line_items,purchase_orders,applied_credit_notes,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "line_items,purchase_orders,applied_credit_notes,contact": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesContact, nil - case "line_items,purchase_orders,applied_credit_notes,contact,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesContactAccountingPeriod, nil - case "line_items,purchase_orders,applied_credit_notes,contact,company": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesContactCompany, nil - case "line_items,purchase_orders,applied_credit_notes,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "line_items,purchase_orders,applied_credit_notes,contact,company,employee": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployee, nil - case "line_items,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "line_items,purchase_orders,applied_credit_notes,contact,employee": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesContactEmployee, nil - case "line_items,purchase_orders,applied_credit_notes,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "line_items,purchase_orders,applied_credit_notes,employee": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesEmployee, nil - case "line_items,purchase_orders,applied_credit_notes,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod, nil - case "line_items,purchase_orders,applied_vendor_credits": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedVendorCredits, nil - case "line_items,purchase_orders,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsAccountingPeriod, nil - case "line_items,purchase_orders,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsCompany, nil - case "line_items,purchase_orders,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod, nil - case "line_items,purchase_orders,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployee, nil - case "line_items,purchase_orders,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "line_items,purchase_orders,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsContact, nil - case "line_items,purchase_orders,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod, nil - case "line_items,purchase_orders,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsContactCompany, nil - case "line_items,purchase_orders,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "line_items,purchase_orders,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee, nil - case "line_items,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "line_items,purchase_orders,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployee, nil - case "line_items,purchase_orders,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "line_items,purchase_orders,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsEmployee, nil - case "line_items,purchase_orders,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "line_items,purchase_orders,company": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersCompany, nil - case "line_items,purchase_orders,company,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersCompanyAccountingPeriod, nil - case "line_items,purchase_orders,company,employee": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersCompanyEmployee, nil - case "line_items,purchase_orders,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersCompanyEmployeeAccountingPeriod, nil - case "line_items,purchase_orders,contact": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersContact, nil - case "line_items,purchase_orders,contact,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersContactAccountingPeriod, nil - case "line_items,purchase_orders,contact,company": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersContactCompany, nil - case "line_items,purchase_orders,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersContactCompanyAccountingPeriod, nil - case "line_items,purchase_orders,contact,company,employee": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersContactCompanyEmployee, nil - case "line_items,purchase_orders,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersContactCompanyEmployeeAccountingPeriod, nil - case "line_items,purchase_orders,contact,employee": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersContactEmployee, nil - case "line_items,purchase_orders,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersContactEmployeeAccountingPeriod, nil - case "line_items,purchase_orders,employee": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersEmployee, nil - case "line_items,purchase_orders,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsPurchaseOrdersEmployeeAccountingPeriod, nil - case "line_items,tracking_categories": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategories, nil - case "line_items,tracking_categories,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAccountingPeriod, nil - case "line_items,tracking_categories,applied_credit_notes": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotes, nil - case "line_items,tracking_categories,applied_credit_notes,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAccountingPeriod, nil - case "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCredits, nil - case "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContact, nil - case "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,applied_credit_notes,company": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesCompany, nil - case "line_items,tracking_categories,applied_credit_notes,company,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriod, nil - case "line_items,tracking_categories,applied_credit_notes,company,employee": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployee, nil - case "line_items,tracking_categories,applied_credit_notes,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,applied_credit_notes,contact": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesContact, nil - case "line_items,tracking_categories,applied_credit_notes,contact,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesContactAccountingPeriod, nil - case "line_items,tracking_categories,applied_credit_notes,contact,company": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesContactCompany, nil - case "line_items,tracking_categories,applied_credit_notes,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "line_items,tracking_categories,applied_credit_notes,contact,company,employee": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployee, nil - case "line_items,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,applied_credit_notes,contact,employee": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesContactEmployee, nil - case "line_items,tracking_categories,applied_credit_notes,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,applied_credit_notes,employee": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesEmployee, nil - case "line_items,tracking_categories,applied_credit_notes,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,applied_vendor_credits": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedVendorCredits, nil - case "line_items,tracking_categories,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsAccountingPeriod, nil - case "line_items,tracking_categories,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsCompany, nil - case "line_items,tracking_categories,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "line_items,tracking_categories,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployee, nil - case "line_items,tracking_categories,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsContact, nil - case "line_items,tracking_categories,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriod, nil - case "line_items,tracking_categories,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsContactCompany, nil - case "line_items,tracking_categories,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "line_items,tracking_categories,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployee, nil - case "line_items,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployee, nil - case "line_items,tracking_categories,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsEmployee, nil - case "line_items,tracking_categories,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,company": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesCompany, nil - case "line_items,tracking_categories,company,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesCompanyAccountingPeriod, nil - case "line_items,tracking_categories,company,employee": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesCompanyEmployee, nil - case "line_items,tracking_categories,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesCompanyEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,contact": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesContact, nil - case "line_items,tracking_categories,contact,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesContactAccountingPeriod, nil - case "line_items,tracking_categories,contact,company": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesContactCompany, nil - case "line_items,tracking_categories,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesContactCompanyAccountingPeriod, nil - case "line_items,tracking_categories,contact,company,employee": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesContactCompanyEmployee, nil - case "line_items,tracking_categories,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesContactCompanyEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,contact,employee": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesContactEmployee, nil - case "line_items,tracking_categories,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesContactEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,employee": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesEmployee, nil - case "line_items,tracking_categories,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrders, nil - case "line_items,tracking_categories,purchase_orders,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotes, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCredits, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,company": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompany, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployee, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,contact": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContact, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompany, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployee, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployee, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,employee": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployee, nil - case "line_items,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,applied_vendor_credits": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCredits, nil - case "line_items,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompany, nil - case "line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployee, nil - case "line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContact, nil - case "line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompany, nil - case "line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee, nil - case "line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployee, nil - case "line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployee, nil - case "line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,company": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersCompany, nil - case "line_items,tracking_categories,purchase_orders,company,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,company,employee": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployee, nil - case "line_items,tracking_categories,purchase_orders,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,contact": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersContact, nil - case "line_items,tracking_categories,purchase_orders,contact,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersContactAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,contact,company": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersContactCompany, nil - case "line_items,tracking_categories,purchase_orders,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,contact,company,employee": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployee, nil - case "line_items,tracking_categories,purchase_orders,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,contact,employee": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersContactEmployee, nil - case "line_items,tracking_categories,purchase_orders,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriod, nil - case "line_items,tracking_categories,purchase_orders,employee": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersEmployee, nil - case "line_items,tracking_categories,purchase_orders,employee,accounting_period": - return InvoicesRetrieveRequestExpandLineItemsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriod, nil + return InvoicesRetrieveRequestExpandItemLineItems, nil + case "payment_term": + return InvoicesRetrieveRequestExpandItemPaymentTerm, nil case "payments": - return InvoicesRetrieveRequestExpandPayments, nil - case "payments,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAccountingPeriod, nil - case "payments,applied_credit_notes": - return InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotes, nil - case "payments,applied_credit_notes,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesAccountingPeriod, nil - case "payments,applied_credit_notes,applied_vendor_credits": - return InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesAppliedVendorCredits, nil - case "payments,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "payments,applied_credit_notes,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "payments,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "payments,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsContact, nil - case "payments,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "payments,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "payments,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "payments,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,applied_credit_notes,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesCompany, nil - case "payments,applied_credit_notes,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesCompanyAccountingPeriod, nil - case "payments,applied_credit_notes,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesCompanyEmployee, nil - case "payments,applied_credit_notes,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "payments,applied_credit_notes,contact": - return InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesContact, nil - case "payments,applied_credit_notes,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesContactAccountingPeriod, nil - case "payments,applied_credit_notes,contact,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesContactCompany, nil - case "payments,applied_credit_notes,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "payments,applied_credit_notes,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesContactCompanyEmployee, nil - case "payments,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_credit_notes,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesContactEmployee, nil - case "payments,applied_credit_notes,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "payments,applied_credit_notes,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesEmployee, nil - case "payments,applied_credit_notes,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedCreditNotesEmployeeAccountingPeriod, nil - case "payments,applied_payments": - return InvoicesRetrieveRequestExpandPaymentsAppliedPayments, nil - case "payments,applied_payments,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAccountingPeriod, nil - case "payments,applied_payments,applied_credit_notes": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotes, nil - case "payments,applied_payments,applied_credit_notes,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAccountingPeriod, nil - case "payments,applied_payments,applied_credit_notes,applied_vendor_credits": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCredits, nil - case "payments,applied_payments,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "payments,applied_payments,applied_credit_notes,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "payments,applied_payments,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,applied_payments,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "payments,applied_payments,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContact, nil - case "payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "payments,applied_payments,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "payments,applied_payments,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,applied_payments,applied_credit_notes,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesCompany, nil - case "payments,applied_payments,applied_credit_notes,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesCompanyAccountingPeriod, nil - case "payments,applied_payments,applied_credit_notes,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesCompanyEmployee, nil - case "payments,applied_payments,applied_credit_notes,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,applied_credit_notes,contact": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesContact, nil - case "payments,applied_payments,applied_credit_notes,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesContactAccountingPeriod, nil - case "payments,applied_payments,applied_credit_notes,contact,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesContactCompany, nil - case "payments,applied_payments,applied_credit_notes,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "payments,applied_payments,applied_credit_notes,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesContactCompanyEmployee, nil - case "payments,applied_payments,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,applied_credit_notes,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesContactEmployee, nil - case "payments,applied_payments,applied_credit_notes,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,applied_credit_notes,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesEmployee, nil - case "payments,applied_payments,applied_credit_notes,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedCreditNotesEmployeeAccountingPeriod, nil - case "payments,applied_payments,applied_vendor_credits": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedVendorCredits, nil - case "payments,applied_payments,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsAccountingPeriod, nil - case "payments,applied_payments,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsCompany, nil - case "payments,applied_payments,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,applied_payments,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsCompanyEmployee, nil - case "payments,applied_payments,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsContact, nil - case "payments,applied_payments,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,applied_payments,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsContactCompany, nil - case "payments,applied_payments,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,applied_payments,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,applied_payments,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsContactEmployee, nil - case "payments,applied_payments,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsEmployee, nil - case "payments,applied_payments,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,applied_payments,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsCompany, nil - case "payments,applied_payments,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsCompanyAccountingPeriod, nil - case "payments,applied_payments,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsCompanyEmployee, nil - case "payments,applied_payments,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,contact": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsContact, nil - case "payments,applied_payments,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsContactAccountingPeriod, nil - case "payments,applied_payments,contact,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsContactCompany, nil - case "payments,applied_payments,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsContactCompanyAccountingPeriod, nil - case "payments,applied_payments,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsContactCompanyEmployee, nil - case "payments,applied_payments,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsContactEmployee, nil - case "payments,applied_payments,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsEmployee, nil - case "payments,applied_payments,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItems, nil - case "payments,applied_payments,line_items,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAccountingPeriod, nil - case "payments,applied_payments,line_items,applied_credit_notes": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotes, nil - case "payments,applied_payments,line_items,applied_credit_notes,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAccountingPeriod, nil - case "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCredits, nil - case "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContact, nil - case "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "payments,applied_payments,line_items,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,applied_credit_notes,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesCompany, nil - case "payments,applied_payments,line_items,applied_credit_notes,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,applied_credit_notes,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesCompanyEmployee, nil - case "payments,applied_payments,line_items,applied_credit_notes,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,applied_credit_notes,contact": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesContact, nil - case "payments,applied_payments,line_items,applied_credit_notes,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactAccountingPeriod, nil - case "payments,applied_payments,line_items,applied_credit_notes,contact,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactCompany, nil - case "payments,applied_payments,line_items,applied_credit_notes,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,applied_credit_notes,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactCompanyEmployee, nil - case "payments,applied_payments,line_items,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,applied_credit_notes,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactEmployee, nil - case "payments,applied_payments,line_items,applied_credit_notes,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,applied_credit_notes,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesEmployee, nil - case "payments,applied_payments,line_items,applied_credit_notes,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedCreditNotesEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,applied_vendor_credits": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCredits, nil - case "payments,applied_payments,line_items,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsAccountingPeriod, nil - case "payments,applied_payments,line_items,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsCompany, nil - case "payments,applied_payments,line_items,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsCompanyEmployee, nil - case "payments,applied_payments,line_items,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContact, nil - case "payments,applied_payments,line_items,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,applied_payments,line_items,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactCompany, nil - case "payments,applied_payments,line_items,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,applied_payments,line_items,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactEmployee, nil - case "payments,applied_payments,line_items,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsEmployee, nil - case "payments,applied_payments,line_items,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsCompany, nil - case "payments,applied_payments,line_items,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsCompanyEmployee, nil - case "payments,applied_payments,line_items,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,contact": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsContact, nil - case "payments,applied_payments,line_items,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsContactAccountingPeriod, nil - case "payments,applied_payments,line_items,contact,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsContactCompany, nil - case "payments,applied_payments,line_items,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsContactCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsContactCompanyEmployee, nil - case "payments,applied_payments,line_items,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsContactEmployee, nil - case "payments,applied_payments,line_items,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsEmployee, nil - case "payments,applied_payments,line_items,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrders, nil - case "payments,applied_payments,line_items,purchase_orders,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotes, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCredits, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompany, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployee, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContact, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompany, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployee, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactEmployee, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesEmployee, nil - case "payments,applied_payments,line_items,purchase_orders,applied_credit_notes,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCredits, nil - case "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompany, nil - case "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployee, nil - case "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContact, nil - case "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompany, nil - case "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployee, nil - case "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsEmployee, nil - case "payments,applied_payments,line_items,purchase_orders,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersCompany, nil - case "payments,applied_payments,line_items,purchase_orders,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersCompanyEmployee, nil - case "payments,applied_payments,line_items,purchase_orders,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,contact": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersContact, nil - case "payments,applied_payments,line_items,purchase_orders,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersContactAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,contact,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersContactCompany, nil - case "payments,applied_payments,line_items,purchase_orders,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersContactCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersContactCompanyEmployee, nil - case "payments,applied_payments,line_items,purchase_orders,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersContactEmployee, nil - case "payments,applied_payments,line_items,purchase_orders,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,purchase_orders,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersEmployee, nil - case "payments,applied_payments,line_items,purchase_orders,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsPurchaseOrdersEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategories, nil - case "payments,applied_payments,line_items,tracking_categories,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotes, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCredits, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContact, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompany, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContact, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompany, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,applied_credit_notes,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCredits, nil - case "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompany, nil - case "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContact, nil - case "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompany, nil - case "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesCompany, nil - case "payments,applied_payments,line_items,tracking_categories,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesCompanyEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,contact": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesContact, nil - case "payments,applied_payments,line_items,tracking_categories,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesContactAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,contact,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesContactCompany, nil - case "payments,applied_payments,line_items,tracking_categories,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesContactCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesContactCompanyEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesContactEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrders, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotes, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCredits, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompany, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContact, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompany, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCredits, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompany, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContact, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompany, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompany, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,contact": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContact, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompany, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersEmployee, nil - case "payments,applied_payments,line_items,tracking_categories,purchase_orders,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsLineItemsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriod, nil - case "payments,applied_payments,purchase_orders": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrders, nil - case "payments,applied_payments,purchase_orders,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotes, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCredits, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesCompany, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesCompanyEmployee, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,contact": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContact, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,contact,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompany, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyEmployee, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactEmployee, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesEmployee, nil - case "payments,applied_payments,purchase_orders,applied_credit_notes,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,applied_vendor_credits": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCredits, nil - case "payments,applied_payments,purchase_orders,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompany, nil - case "payments,applied_payments,purchase_orders,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompanyEmployee, nil - case "payments,applied_payments,purchase_orders,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContact, nil - case "payments,applied_payments,purchase_orders,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompany, nil - case "payments,applied_payments,purchase_orders,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,applied_payments,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactEmployee, nil - case "payments,applied_payments,purchase_orders,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsEmployee, nil - case "payments,applied_payments,purchase_orders,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersCompany, nil - case "payments,applied_payments,purchase_orders,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersCompanyAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersCompanyEmployee, nil - case "payments,applied_payments,purchase_orders,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,contact": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersContact, nil - case "payments,applied_payments,purchase_orders,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersContactAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,contact,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersContactCompany, nil - case "payments,applied_payments,purchase_orders,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersContactCompanyAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersContactCompanyEmployee, nil - case "payments,applied_payments,purchase_orders,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersContactEmployee, nil - case "payments,applied_payments,purchase_orders,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,purchase_orders,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersEmployee, nil - case "payments,applied_payments,purchase_orders,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsPurchaseOrdersEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategories, nil - case "payments,applied_payments,tracking_categories,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotes, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCredits, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContact, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesCompany, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesCompanyEmployee, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,contact": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContact, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,contact,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompany, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyEmployee, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactEmployee, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesEmployee, nil - case "payments,applied_payments,tracking_categories,applied_credit_notes,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,applied_vendor_credits": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCredits, nil - case "payments,applied_payments,tracking_categories,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompany, nil - case "payments,applied_payments,tracking_categories,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompanyEmployee, nil - case "payments,applied_payments,tracking_categories,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContact, nil - case "payments,applied_payments,tracking_categories,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompany, nil - case "payments,applied_payments,tracking_categories,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,applied_payments,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactEmployee, nil - case "payments,applied_payments,tracking_categories,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsEmployee, nil - case "payments,applied_payments,tracking_categories,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesCompany, nil - case "payments,applied_payments,tracking_categories,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesCompanyAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesCompanyEmployee, nil - case "payments,applied_payments,tracking_categories,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,contact": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesContact, nil - case "payments,applied_payments,tracking_categories,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesContactAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,contact,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesContactCompany, nil - case "payments,applied_payments,tracking_categories,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesContactCompanyAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesContactCompanyEmployee, nil - case "payments,applied_payments,tracking_categories,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesContactEmployee, nil - case "payments,applied_payments,tracking_categories,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesEmployee, nil - case "payments,applied_payments,tracking_categories,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrders, nil - case "payments,applied_payments,tracking_categories,purchase_orders,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotes, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCredits, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompany, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployee, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContact, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompany, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployee, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployee, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployee, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCredits, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompany, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployee, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContact, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompany, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployee, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployee, nil - case "payments,applied_payments,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersCompany, nil - case "payments,applied_payments,tracking_categories,purchase_orders,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersCompanyEmployee, nil - case "payments,applied_payments,tracking_categories,purchase_orders,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,contact": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContact, nil - case "payments,applied_payments,tracking_categories,purchase_orders,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,contact,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompany, nil - case "payments,applied_payments,tracking_categories,purchase_orders,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompanyEmployee, nil - case "payments,applied_payments,tracking_categories,purchase_orders,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactEmployee, nil - case "payments,applied_payments,tracking_categories,purchase_orders,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,purchase_orders,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersEmployee, nil - case "payments,applied_payments,tracking_categories,purchase_orders,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriod, nil - case "payments,applied_vendor_credits": - return InvoicesRetrieveRequestExpandPaymentsAppliedVendorCredits, nil - case "payments,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedVendorCreditsAccountingPeriod, nil - case "payments,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedVendorCreditsCompany, nil - case "payments,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedVendorCreditsCompanyEmployee, nil - case "payments,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandPaymentsAppliedVendorCreditsContact, nil - case "payments,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandPaymentsAppliedVendorCreditsContactCompany, nil - case "payments,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedVendorCreditsContactEmployee, nil - case "payments,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandPaymentsAppliedVendorCreditsEmployee, nil - case "payments,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,company": - return InvoicesRetrieveRequestExpandPaymentsCompany, nil - case "payments,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsCompanyAccountingPeriod, nil - case "payments,company,employee": - return InvoicesRetrieveRequestExpandPaymentsCompanyEmployee, nil - case "payments,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsCompanyEmployeeAccountingPeriod, nil - case "payments,contact": - return InvoicesRetrieveRequestExpandPaymentsContact, nil - case "payments,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsContactAccountingPeriod, nil - case "payments,contact,company": - return InvoicesRetrieveRequestExpandPaymentsContactCompany, nil - case "payments,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsContactCompanyAccountingPeriod, nil - case "payments,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsContactCompanyEmployee, nil - case "payments,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsContactCompanyEmployeeAccountingPeriod, nil - case "payments,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsContactEmployee, nil - case "payments,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsContactEmployeeAccountingPeriod, nil - case "payments,employee": - return InvoicesRetrieveRequestExpandPaymentsEmployee, nil - case "payments,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsEmployeeAccountingPeriod, nil - case "payments,line_items": - return InvoicesRetrieveRequestExpandPaymentsLineItems, nil - case "payments,line_items,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsAccountingPeriod, nil - case "payments,line_items,applied_credit_notes": - return InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotes, nil - case "payments,line_items,applied_credit_notes,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesAccountingPeriod, nil - case "payments,line_items,applied_credit_notes,applied_vendor_credits": - return InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCredits, nil - case "payments,line_items,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "payments,line_items,applied_credit_notes,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "payments,line_items,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,line_items,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "payments,line_items,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContact, nil - case "payments,line_items,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,line_items,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "payments,line_items,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,line_items,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "payments,line_items,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,line_items,applied_credit_notes,company": - return InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesCompany, nil - case "payments,line_items,applied_credit_notes,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesCompanyAccountingPeriod, nil - case "payments,line_items,applied_credit_notes,company,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesCompanyEmployee, nil - case "payments,line_items,applied_credit_notes,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,applied_credit_notes,contact": - return InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesContact, nil - case "payments,line_items,applied_credit_notes,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesContactAccountingPeriod, nil - case "payments,line_items,applied_credit_notes,contact,company": - return InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesContactCompany, nil - case "payments,line_items,applied_credit_notes,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "payments,line_items,applied_credit_notes,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesContactCompanyEmployee, nil - case "payments,line_items,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,applied_credit_notes,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesContactEmployee, nil - case "payments,line_items,applied_credit_notes,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "payments,line_items,applied_credit_notes,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesEmployee, nil - case "payments,line_items,applied_credit_notes,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedCreditNotesEmployeeAccountingPeriod, nil - case "payments,line_items,applied_vendor_credits": - return InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedVendorCredits, nil - case "payments,line_items,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedVendorCreditsAccountingPeriod, nil - case "payments,line_items,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedVendorCreditsCompany, nil - case "payments,line_items,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,line_items,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedVendorCreditsCompanyEmployee, nil - case "payments,line_items,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedVendorCreditsContact, nil - case "payments,line_items,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,line_items,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedVendorCreditsContactCompany, nil - case "payments,line_items,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,line_items,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,line_items,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedVendorCreditsContactEmployee, nil - case "payments,line_items,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,line_items,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedVendorCreditsEmployee, nil - case "payments,line_items,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,line_items,company": - return InvoicesRetrieveRequestExpandPaymentsLineItemsCompany, nil - case "payments,line_items,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsCompanyAccountingPeriod, nil - case "payments,line_items,company,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsCompanyEmployee, nil - case "payments,line_items,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,contact": - return InvoicesRetrieveRequestExpandPaymentsLineItemsContact, nil - case "payments,line_items,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsContactAccountingPeriod, nil - case "payments,line_items,contact,company": - return InvoicesRetrieveRequestExpandPaymentsLineItemsContactCompany, nil - case "payments,line_items,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsContactCompanyAccountingPeriod, nil - case "payments,line_items,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsContactCompanyEmployee, nil - case "payments,line_items,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsContactCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsContactEmployee, nil - case "payments,line_items,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsContactEmployeeAccountingPeriod, nil - case "payments,line_items,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsEmployee, nil - case "payments,line_items,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsEmployeeAccountingPeriod, nil - case "payments,line_items,purchase_orders": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrders, nil - case "payments,line_items,purchase_orders,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAccountingPeriod, nil - case "payments,line_items,purchase_orders,applied_credit_notes": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotes, nil - case "payments,line_items,purchase_orders,applied_credit_notes,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAccountingPeriod, nil - case "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCredits, nil - case "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact, nil - case "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "payments,line_items,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,line_items,purchase_orders,applied_credit_notes,company": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompany, nil - case "payments,line_items,purchase_orders,applied_credit_notes,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod, nil - case "payments,line_items,purchase_orders,applied_credit_notes,company,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployee, nil - case "payments,line_items,purchase_orders,applied_credit_notes,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,purchase_orders,applied_credit_notes,contact": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContact, nil - case "payments,line_items,purchase_orders,applied_credit_notes,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactAccountingPeriod, nil - case "payments,line_items,purchase_orders,applied_credit_notes,contact,company": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompany, nil - case "payments,line_items,purchase_orders,applied_credit_notes,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "payments,line_items,purchase_orders,applied_credit_notes,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployee, nil - case "payments,line_items,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,purchase_orders,applied_credit_notes,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactEmployee, nil - case "payments,line_items,purchase_orders,applied_credit_notes,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "payments,line_items,purchase_orders,applied_credit_notes,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesEmployee, nil - case "payments,line_items,purchase_orders,applied_credit_notes,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod, nil - case "payments,line_items,purchase_orders,applied_vendor_credits": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCredits, nil - case "payments,line_items,purchase_orders,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsAccountingPeriod, nil - case "payments,line_items,purchase_orders,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompany, nil - case "payments,line_items,purchase_orders,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,line_items,purchase_orders,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployee, nil - case "payments,line_items,purchase_orders,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,purchase_orders,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContact, nil - case "payments,line_items,purchase_orders,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,line_items,purchase_orders,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompany, nil - case "payments,line_items,purchase_orders,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,line_items,purchase_orders,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,line_items,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,purchase_orders,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployee, nil - case "payments,line_items,purchase_orders,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,line_items,purchase_orders,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsEmployee, nil - case "payments,line_items,purchase_orders,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,line_items,purchase_orders,company": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersCompany, nil - case "payments,line_items,purchase_orders,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersCompanyAccountingPeriod, nil - case "payments,line_items,purchase_orders,company,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersCompanyEmployee, nil - case "payments,line_items,purchase_orders,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,purchase_orders,contact": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersContact, nil - case "payments,line_items,purchase_orders,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersContactAccountingPeriod, nil - case "payments,line_items,purchase_orders,contact,company": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersContactCompany, nil - case "payments,line_items,purchase_orders,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersContactCompanyAccountingPeriod, nil - case "payments,line_items,purchase_orders,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersContactCompanyEmployee, nil - case "payments,line_items,purchase_orders,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersContactCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,purchase_orders,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersContactEmployee, nil - case "payments,line_items,purchase_orders,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersContactEmployeeAccountingPeriod, nil - case "payments,line_items,purchase_orders,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersEmployee, nil - case "payments,line_items,purchase_orders,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsPurchaseOrdersEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategories, nil - case "payments,line_items,tracking_categories,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAccountingPeriod, nil - case "payments,line_items,tracking_categories,applied_credit_notes": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotes, nil - case "payments,line_items,tracking_categories,applied_credit_notes,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAccountingPeriod, nil - case "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCredits, nil - case "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContact, nil - case "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "payments,line_items,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,applied_credit_notes,company": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompany, nil - case "payments,line_items,tracking_categories,applied_credit_notes,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriod, nil - case "payments,line_items,tracking_categories,applied_credit_notes,company,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployee, nil - case "payments,line_items,tracking_categories,applied_credit_notes,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,applied_credit_notes,contact": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContact, nil - case "payments,line_items,tracking_categories,applied_credit_notes,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactAccountingPeriod, nil - case "payments,line_items,tracking_categories,applied_credit_notes,contact,company": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompany, nil - case "payments,line_items,tracking_categories,applied_credit_notes,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "payments,line_items,tracking_categories,applied_credit_notes,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployee, nil - case "payments,line_items,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,applied_credit_notes,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactEmployee, nil - case "payments,line_items,tracking_categories,applied_credit_notes,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,applied_credit_notes,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesEmployee, nil - case "payments,line_items,tracking_categories,applied_credit_notes,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,applied_vendor_credits": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCredits, nil - case "payments,line_items,tracking_categories,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsAccountingPeriod, nil - case "payments,line_items,tracking_categories,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompany, nil - case "payments,line_items,tracking_categories,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,line_items,tracking_categories,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployee, nil - case "payments,line_items,tracking_categories,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContact, nil - case "payments,line_items,tracking_categories,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,line_items,tracking_categories,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompany, nil - case "payments,line_items,tracking_categories,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,line_items,tracking_categories,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,line_items,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployee, nil - case "payments,line_items,tracking_categories,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsEmployee, nil - case "payments,line_items,tracking_categories,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,company": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesCompany, nil - case "payments,line_items,tracking_categories,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesCompanyAccountingPeriod, nil - case "payments,line_items,tracking_categories,company,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesCompanyEmployee, nil - case "payments,line_items,tracking_categories,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,contact": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesContact, nil - case "payments,line_items,tracking_categories,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesContactAccountingPeriod, nil - case "payments,line_items,tracking_categories,contact,company": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesContactCompany, nil - case "payments,line_items,tracking_categories,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesContactCompanyAccountingPeriod, nil - case "payments,line_items,tracking_categories,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesContactCompanyEmployee, nil - case "payments,line_items,tracking_categories,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesContactCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesContactEmployee, nil - case "payments,line_items,tracking_categories,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesContactEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesEmployee, nil - case "payments,line_items,tracking_categories,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrders, nil - case "payments,line_items,tracking_categories,purchase_orders,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotes, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCredits, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompany, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployee, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContact, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompany, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployee, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployee, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployee, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCredits, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompany, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployee, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContact, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompany, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployee, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployee, nil - case "payments,line_items,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,company": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompany, nil - case "payments,line_items,tracking_categories,purchase_orders,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,company,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployee, nil - case "payments,line_items,tracking_categories,purchase_orders,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,contact": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersContact, nil - case "payments,line_items,tracking_categories,purchase_orders,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,contact,company": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompany, nil - case "payments,line_items,tracking_categories,purchase_orders,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployee, nil - case "payments,line_items,tracking_categories,purchase_orders,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactEmployee, nil - case "payments,line_items,tracking_categories,purchase_orders,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriod, nil - case "payments,line_items,tracking_categories,purchase_orders,employee": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersEmployee, nil - case "payments,line_items,tracking_categories,purchase_orders,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsLineItemsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriod, nil - case "payments,purchase_orders": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrders, nil - case "payments,purchase_orders,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAccountingPeriod, nil - case "payments,purchase_orders,applied_credit_notes": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotes, nil - case "payments,purchase_orders,applied_credit_notes,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAccountingPeriod, nil - case "payments,purchase_orders,applied_credit_notes,applied_vendor_credits": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCredits, nil - case "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact, nil - case "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "payments,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,purchase_orders,applied_credit_notes,company": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesCompany, nil - case "payments,purchase_orders,applied_credit_notes,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod, nil - case "payments,purchase_orders,applied_credit_notes,company,employee": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesCompanyEmployee, nil - case "payments,purchase_orders,applied_credit_notes,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "payments,purchase_orders,applied_credit_notes,contact": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesContact, nil - case "payments,purchase_orders,applied_credit_notes,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesContactAccountingPeriod, nil - case "payments,purchase_orders,applied_credit_notes,contact,company": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesContactCompany, nil - case "payments,purchase_orders,applied_credit_notes,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "payments,purchase_orders,applied_credit_notes,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyEmployee, nil - case "payments,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "payments,purchase_orders,applied_credit_notes,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesContactEmployee, nil - case "payments,purchase_orders,applied_credit_notes,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "payments,purchase_orders,applied_credit_notes,employee": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesEmployee, nil - case "payments,purchase_orders,applied_credit_notes,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod, nil - case "payments,purchase_orders,applied_vendor_credits": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedVendorCredits, nil - case "payments,purchase_orders,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsAccountingPeriod, nil - case "payments,purchase_orders,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsCompany, nil - case "payments,purchase_orders,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,purchase_orders,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsCompanyEmployee, nil - case "payments,purchase_orders,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,purchase_orders,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsContact, nil - case "payments,purchase_orders,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,purchase_orders,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsContactCompany, nil - case "payments,purchase_orders,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,purchase_orders,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,purchase_orders,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsContactEmployee, nil - case "payments,purchase_orders,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,purchase_orders,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsEmployee, nil - case "payments,purchase_orders,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,purchase_orders,company": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersCompany, nil - case "payments,purchase_orders,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersCompanyAccountingPeriod, nil - case "payments,purchase_orders,company,employee": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersCompanyEmployee, nil - case "payments,purchase_orders,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersCompanyEmployeeAccountingPeriod, nil - case "payments,purchase_orders,contact": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersContact, nil - case "payments,purchase_orders,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersContactAccountingPeriod, nil - case "payments,purchase_orders,contact,company": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersContactCompany, nil - case "payments,purchase_orders,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersContactCompanyAccountingPeriod, nil - case "payments,purchase_orders,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersContactCompanyEmployee, nil - case "payments,purchase_orders,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersContactCompanyEmployeeAccountingPeriod, nil - case "payments,purchase_orders,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersContactEmployee, nil - case "payments,purchase_orders,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersContactEmployeeAccountingPeriod, nil - case "payments,purchase_orders,employee": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersEmployee, nil - case "payments,purchase_orders,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsPurchaseOrdersEmployeeAccountingPeriod, nil - case "payments,tracking_categories": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategories, nil - case "payments,tracking_categories,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAccountingPeriod, nil - case "payments,tracking_categories,applied_credit_notes": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotes, nil - case "payments,tracking_categories,applied_credit_notes,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAccountingPeriod, nil - case "payments,tracking_categories,applied_credit_notes,applied_vendor_credits": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCredits, nil - case "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContact, nil - case "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "payments,tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,tracking_categories,applied_credit_notes,company": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesCompany, nil - case "payments,tracking_categories,applied_credit_notes,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriod, nil - case "payments,tracking_categories,applied_credit_notes,company,employee": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesCompanyEmployee, nil - case "payments,tracking_categories,applied_credit_notes,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "payments,tracking_categories,applied_credit_notes,contact": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesContact, nil - case "payments,tracking_categories,applied_credit_notes,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesContactAccountingPeriod, nil - case "payments,tracking_categories,applied_credit_notes,contact,company": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesContactCompany, nil - case "payments,tracking_categories,applied_credit_notes,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "payments,tracking_categories,applied_credit_notes,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyEmployee, nil - case "payments,tracking_categories,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "payments,tracking_categories,applied_credit_notes,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesContactEmployee, nil - case "payments,tracking_categories,applied_credit_notes,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "payments,tracking_categories,applied_credit_notes,employee": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesEmployee, nil - case "payments,tracking_categories,applied_credit_notes,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriod, nil - case "payments,tracking_categories,applied_vendor_credits": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedVendorCredits, nil - case "payments,tracking_categories,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsAccountingPeriod, nil - case "payments,tracking_categories,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsCompany, nil - case "payments,tracking_categories,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,tracking_categories,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsCompanyEmployee, nil - case "payments,tracking_categories,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,tracking_categories,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsContact, nil - case "payments,tracking_categories,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,tracking_categories,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsContactCompany, nil - case "payments,tracking_categories,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,tracking_categories,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,tracking_categories,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsContactEmployee, nil - case "payments,tracking_categories,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,tracking_categories,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsEmployee, nil - case "payments,tracking_categories,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,tracking_categories,company": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesCompany, nil - case "payments,tracking_categories,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesCompanyAccountingPeriod, nil - case "payments,tracking_categories,company,employee": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesCompanyEmployee, nil - case "payments,tracking_categories,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesCompanyEmployeeAccountingPeriod, nil - case "payments,tracking_categories,contact": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesContact, nil - case "payments,tracking_categories,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesContactAccountingPeriod, nil - case "payments,tracking_categories,contact,company": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesContactCompany, nil - case "payments,tracking_categories,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesContactCompanyAccountingPeriod, nil - case "payments,tracking_categories,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesContactCompanyEmployee, nil - case "payments,tracking_categories,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesContactCompanyEmployeeAccountingPeriod, nil - case "payments,tracking_categories,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesContactEmployee, nil - case "payments,tracking_categories,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesContactEmployeeAccountingPeriod, nil - case "payments,tracking_categories,employee": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesEmployee, nil - case "payments,tracking_categories,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesEmployeeAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrders, nil - case "payments,tracking_categories,purchase_orders,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotes, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCredits, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,company": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompany, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,company,employee": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployee, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,contact": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContact, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompany, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployee, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployee, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,employee": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployee, nil - case "payments,tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,applied_vendor_credits": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCredits, nil - case "payments,tracking_categories,purchase_orders,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompany, nil - case "payments,tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployee, nil - case "payments,tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContact, nil - case "payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompany, nil - case "payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee, nil - case "payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployee, nil - case "payments,tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployee, nil - case "payments,tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,company": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersCompany, nil - case "payments,tracking_categories,purchase_orders,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersCompanyAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,company,employee": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersCompanyEmployee, nil - case "payments,tracking_categories,purchase_orders,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,contact": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersContact, nil - case "payments,tracking_categories,purchase_orders,contact,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersContactAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,contact,company": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersContactCompany, nil - case "payments,tracking_categories,purchase_orders,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,contact,company,employee": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersContactCompanyEmployee, nil - case "payments,tracking_categories,purchase_orders,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,contact,employee": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersContactEmployee, nil - case "payments,tracking_categories,purchase_orders,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriod, nil - case "payments,tracking_categories,purchase_orders,employee": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersEmployee, nil - case "payments,tracking_categories,purchase_orders,employee,accounting_period": - return InvoicesRetrieveRequestExpandPaymentsTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriod, nil + return InvoicesRetrieveRequestExpandItemPayments, nil case "purchase_orders": - return InvoicesRetrieveRequestExpandPurchaseOrders, nil - case "purchase_orders,accounting_period": - return InvoicesRetrieveRequestExpandPurchaseOrdersAccountingPeriod, nil - case "purchase_orders,applied_credit_notes": - return InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotes, nil - case "purchase_orders,applied_credit_notes,accounting_period": - return InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesAccountingPeriod, nil - case "purchase_orders,applied_credit_notes,applied_vendor_credits": - return InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCredits, nil - case "purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "purchase_orders,applied_credit_notes,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "purchase_orders,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact, nil - case "purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "purchase_orders,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "purchase_orders,applied_credit_notes,company": - return InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesCompany, nil - case "purchase_orders,applied_credit_notes,company,accounting_period": - return InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod, nil - case "purchase_orders,applied_credit_notes,company,employee": - return InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesCompanyEmployee, nil - case "purchase_orders,applied_credit_notes,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "purchase_orders,applied_credit_notes,contact": - return InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesContact, nil - case "purchase_orders,applied_credit_notes,contact,accounting_period": - return InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesContactAccountingPeriod, nil - case "purchase_orders,applied_credit_notes,contact,company": - return InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesContactCompany, nil - case "purchase_orders,applied_credit_notes,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "purchase_orders,applied_credit_notes,contact,company,employee": - return InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesContactCompanyEmployee, nil - case "purchase_orders,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "purchase_orders,applied_credit_notes,contact,employee": - return InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesContactEmployee, nil - case "purchase_orders,applied_credit_notes,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "purchase_orders,applied_credit_notes,employee": - return InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesEmployee, nil - case "purchase_orders,applied_credit_notes,employee,accounting_period": - return InvoicesRetrieveRequestExpandPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod, nil - case "purchase_orders,applied_vendor_credits": - return InvoicesRetrieveRequestExpandPurchaseOrdersAppliedVendorCredits, nil - case "purchase_orders,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandPurchaseOrdersAppliedVendorCreditsAccountingPeriod, nil - case "purchase_orders,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandPurchaseOrdersAppliedVendorCreditsCompany, nil - case "purchase_orders,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod, nil - case "purchase_orders,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandPurchaseOrdersAppliedVendorCreditsCompanyEmployee, nil - case "purchase_orders,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "purchase_orders,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandPurchaseOrdersAppliedVendorCreditsContact, nil - case "purchase_orders,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod, nil - case "purchase_orders,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandPurchaseOrdersAppliedVendorCreditsContactCompany, nil - case "purchase_orders,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "purchase_orders,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee, nil - case "purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "purchase_orders,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandPurchaseOrdersAppliedVendorCreditsContactEmployee, nil - case "purchase_orders,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "purchase_orders,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandPurchaseOrdersAppliedVendorCreditsEmployee, nil - case "purchase_orders,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "purchase_orders,company": - return InvoicesRetrieveRequestExpandPurchaseOrdersCompany, nil - case "purchase_orders,company,accounting_period": - return InvoicesRetrieveRequestExpandPurchaseOrdersCompanyAccountingPeriod, nil - case "purchase_orders,company,employee": - return InvoicesRetrieveRequestExpandPurchaseOrdersCompanyEmployee, nil - case "purchase_orders,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPurchaseOrdersCompanyEmployeeAccountingPeriod, nil - case "purchase_orders,contact": - return InvoicesRetrieveRequestExpandPurchaseOrdersContact, nil - case "purchase_orders,contact,accounting_period": - return InvoicesRetrieveRequestExpandPurchaseOrdersContactAccountingPeriod, nil - case "purchase_orders,contact,company": - return InvoicesRetrieveRequestExpandPurchaseOrdersContactCompany, nil - case "purchase_orders,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandPurchaseOrdersContactCompanyAccountingPeriod, nil - case "purchase_orders,contact,company,employee": - return InvoicesRetrieveRequestExpandPurchaseOrdersContactCompanyEmployee, nil - case "purchase_orders,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandPurchaseOrdersContactCompanyEmployeeAccountingPeriod, nil - case "purchase_orders,contact,employee": - return InvoicesRetrieveRequestExpandPurchaseOrdersContactEmployee, nil - case "purchase_orders,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandPurchaseOrdersContactEmployeeAccountingPeriod, nil - case "purchase_orders,employee": - return InvoicesRetrieveRequestExpandPurchaseOrdersEmployee, nil - case "purchase_orders,employee,accounting_period": - return InvoicesRetrieveRequestExpandPurchaseOrdersEmployeeAccountingPeriod, nil + return InvoicesRetrieveRequestExpandItemPurchaseOrders, nil case "tracking_categories": - return InvoicesRetrieveRequestExpandTrackingCategories, nil - case "tracking_categories,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesAccountingPeriod, nil - case "tracking_categories,applied_credit_notes": - return InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotes, nil - case "tracking_categories,applied_credit_notes,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesAccountingPeriod, nil - case "tracking_categories,applied_credit_notes,applied_vendor_credits": - return InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCredits, nil - case "tracking_categories,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "tracking_categories,applied_credit_notes,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "tracking_categories,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "tracking_categories,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "tracking_categories,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContact, nil - case "tracking_categories,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "tracking_categories,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "tracking_categories,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "tracking_categories,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "tracking_categories,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "tracking_categories,applied_credit_notes,company": - return InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesCompany, nil - case "tracking_categories,applied_credit_notes,company,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesCompanyAccountingPeriod, nil - case "tracking_categories,applied_credit_notes,company,employee": - return InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesCompanyEmployee, nil - case "tracking_categories,applied_credit_notes,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "tracking_categories,applied_credit_notes,contact": - return InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesContact, nil - case "tracking_categories,applied_credit_notes,contact,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesContactAccountingPeriod, nil - case "tracking_categories,applied_credit_notes,contact,company": - return InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesContactCompany, nil - case "tracking_categories,applied_credit_notes,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "tracking_categories,applied_credit_notes,contact,company,employee": - return InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesContactCompanyEmployee, nil - case "tracking_categories,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "tracking_categories,applied_credit_notes,contact,employee": - return InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesContactEmployee, nil - case "tracking_categories,applied_credit_notes,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "tracking_categories,applied_credit_notes,employee": - return InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesEmployee, nil - case "tracking_categories,applied_credit_notes,employee,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesAppliedCreditNotesEmployeeAccountingPeriod, nil - case "tracking_categories,applied_vendor_credits": - return InvoicesRetrieveRequestExpandTrackingCategoriesAppliedVendorCredits, nil - case "tracking_categories,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesAppliedVendorCreditsAccountingPeriod, nil - case "tracking_categories,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandTrackingCategoriesAppliedVendorCreditsCompany, nil - case "tracking_categories,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "tracking_categories,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandTrackingCategoriesAppliedVendorCreditsCompanyEmployee, nil - case "tracking_categories,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "tracking_categories,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandTrackingCategoriesAppliedVendorCreditsContact, nil - case "tracking_categories,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesAppliedVendorCreditsContactAccountingPeriod, nil - case "tracking_categories,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandTrackingCategoriesAppliedVendorCreditsContactCompany, nil - case "tracking_categories,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "tracking_categories,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandTrackingCategoriesAppliedVendorCreditsContactCompanyEmployee, nil - case "tracking_categories,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "tracking_categories,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandTrackingCategoriesAppliedVendorCreditsContactEmployee, nil - case "tracking_categories,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "tracking_categories,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandTrackingCategoriesAppliedVendorCreditsEmployee, nil - case "tracking_categories,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "tracking_categories,company": - return InvoicesRetrieveRequestExpandTrackingCategoriesCompany, nil - case "tracking_categories,company,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesCompanyAccountingPeriod, nil - case "tracking_categories,company,employee": - return InvoicesRetrieveRequestExpandTrackingCategoriesCompanyEmployee, nil - case "tracking_categories,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesCompanyEmployeeAccountingPeriod, nil - case "tracking_categories,contact": - return InvoicesRetrieveRequestExpandTrackingCategoriesContact, nil - case "tracking_categories,contact,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesContactAccountingPeriod, nil - case "tracking_categories,contact,company": - return InvoicesRetrieveRequestExpandTrackingCategoriesContactCompany, nil - case "tracking_categories,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesContactCompanyAccountingPeriod, nil - case "tracking_categories,contact,company,employee": - return InvoicesRetrieveRequestExpandTrackingCategoriesContactCompanyEmployee, nil - case "tracking_categories,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesContactCompanyEmployeeAccountingPeriod, nil - case "tracking_categories,contact,employee": - return InvoicesRetrieveRequestExpandTrackingCategoriesContactEmployee, nil - case "tracking_categories,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesContactEmployeeAccountingPeriod, nil - case "tracking_categories,employee": - return InvoicesRetrieveRequestExpandTrackingCategoriesEmployee, nil - case "tracking_categories,employee,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesEmployeeAccountingPeriod, nil - case "tracking_categories,purchase_orders": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrders, nil - case "tracking_categories,purchase_orders,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAccountingPeriod, nil - case "tracking_categories,purchase_orders,applied_credit_notes": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotes, nil - case "tracking_categories,purchase_orders,applied_credit_notes,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAccountingPeriod, nil - case "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCredits, nil - case "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsAccountingPeriod, nil - case "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompany, nil - case "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyAccountingPeriod, nil - case "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployee, nil - case "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContact, nil - case "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactAccountingPeriod, nil - case "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompany, nil - case "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployee, nil - case "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployee, nil - case "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployee, nil - case "tracking_categories,purchase_orders,applied_credit_notes,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "tracking_categories,purchase_orders,applied_credit_notes,company": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompany, nil - case "tracking_categories,purchase_orders,applied_credit_notes,company,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyAccountingPeriod, nil - case "tracking_categories,purchase_orders,applied_credit_notes,company,employee": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployee, nil - case "tracking_categories,purchase_orders,applied_credit_notes,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesCompanyEmployeeAccountingPeriod, nil - case "tracking_categories,purchase_orders,applied_credit_notes,contact": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesContact, nil - case "tracking_categories,purchase_orders,applied_credit_notes,contact,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactAccountingPeriod, nil - case "tracking_categories,purchase_orders,applied_credit_notes,contact,company": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompany, nil - case "tracking_categories,purchase_orders,applied_credit_notes,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyAccountingPeriod, nil - case "tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployee, nil - case "tracking_categories,purchase_orders,applied_credit_notes,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactCompanyEmployeeAccountingPeriod, nil - case "tracking_categories,purchase_orders,applied_credit_notes,contact,employee": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployee, nil - case "tracking_categories,purchase_orders,applied_credit_notes,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesContactEmployeeAccountingPeriod, nil - case "tracking_categories,purchase_orders,applied_credit_notes,employee": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployee, nil - case "tracking_categories,purchase_orders,applied_credit_notes,employee,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedCreditNotesEmployeeAccountingPeriod, nil - case "tracking_categories,purchase_orders,applied_vendor_credits": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCredits, nil - case "tracking_categories,purchase_orders,applied_vendor_credits,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsAccountingPeriod, nil - case "tracking_categories,purchase_orders,applied_vendor_credits,company": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompany, nil - case "tracking_categories,purchase_orders,applied_vendor_credits,company,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyAccountingPeriod, nil - case "tracking_categories,purchase_orders,applied_vendor_credits,company,employee": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployee, nil - case "tracking_categories,purchase_orders,applied_vendor_credits,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsCompanyEmployeeAccountingPeriod, nil - case "tracking_categories,purchase_orders,applied_vendor_credits,contact": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContact, nil - case "tracking_categories,purchase_orders,applied_vendor_credits,contact,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactAccountingPeriod, nil - case "tracking_categories,purchase_orders,applied_vendor_credits,contact,company": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompany, nil - case "tracking_categories,purchase_orders,applied_vendor_credits,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyAccountingPeriod, nil - case "tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployee, nil - case "tracking_categories,purchase_orders,applied_vendor_credits,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactCompanyEmployeeAccountingPeriod, nil - case "tracking_categories,purchase_orders,applied_vendor_credits,contact,employee": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployee, nil - case "tracking_categories,purchase_orders,applied_vendor_credits,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsContactEmployeeAccountingPeriod, nil - case "tracking_categories,purchase_orders,applied_vendor_credits,employee": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployee, nil - case "tracking_categories,purchase_orders,applied_vendor_credits,employee,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersAppliedVendorCreditsEmployeeAccountingPeriod, nil - case "tracking_categories,purchase_orders,company": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersCompany, nil - case "tracking_categories,purchase_orders,company,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersCompanyAccountingPeriod, nil - case "tracking_categories,purchase_orders,company,employee": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersCompanyEmployee, nil - case "tracking_categories,purchase_orders,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersCompanyEmployeeAccountingPeriod, nil - case "tracking_categories,purchase_orders,contact": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersContact, nil - case "tracking_categories,purchase_orders,contact,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersContactAccountingPeriod, nil - case "tracking_categories,purchase_orders,contact,company": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersContactCompany, nil - case "tracking_categories,purchase_orders,contact,company,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersContactCompanyAccountingPeriod, nil - case "tracking_categories,purchase_orders,contact,company,employee": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersContactCompanyEmployee, nil - case "tracking_categories,purchase_orders,contact,company,employee,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersContactCompanyEmployeeAccountingPeriod, nil - case "tracking_categories,purchase_orders,contact,employee": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersContactEmployee, nil - case "tracking_categories,purchase_orders,contact,employee,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersContactEmployeeAccountingPeriod, nil - case "tracking_categories,purchase_orders,employee": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersEmployee, nil - case "tracking_categories,purchase_orders,employee,accounting_period": - return InvoicesRetrieveRequestExpandTrackingCategoriesPurchaseOrdersEmployeeAccountingPeriod, nil - } - var t InvoicesRetrieveRequestExpand + return InvoicesRetrieveRequestExpandItemTrackingCategories, nil + } + var t InvoicesRetrieveRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (i InvoicesRetrieveRequestExpand) Ptr() *InvoicesRetrieveRequestExpand { +func (i InvoicesRetrieveRequestExpandItem) Ptr() *InvoicesRetrieveRequestExpandItem { return &i } + +// # The InvoiceLineItem Object +// ### Description +// The `InvoiceLineItem` object represents an itemized record of goods and/or services sold to a customer. +// +// ### Usage Example +// Fetch from the `GET Invoice` endpoint and view the invoice's line items. +type InvoiceLineItemRequest struct { + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The line item's description. + Description *string `json:"description,omitempty" url:"description,omitempty"` + // The line item's unit price. + UnitPrice *float64 `json:"unit_price,omitempty" url:"unit_price,omitempty"` + // The line item's quantity. + Quantity *float64 `json:"quantity,omitempty" url:"quantity,omitempty"` + // The line item's total amount. + TotalAmount *float64 `json:"total_amount,omitempty" url:"total_amount,omitempty"` + // The employee this overall transaction relates to. + Employee *InvoiceLineItemRequestEmployee `json:"employee,omitempty" url:"employee,omitempty"` + Project *InvoiceLineItemRequestProject `json:"project,omitempty" url:"project,omitempty"` + // The invoice's contact. + Contact *InvoiceLineItemRequestContact `json:"contact,omitempty" url:"contact,omitempty"` + // The line item's currency. + // + // * `XUA` - ADB Unit of Account + // * `AFN` - Afghan Afghani + // * `AFA` - Afghan Afghani (1927–2002) + // * `ALL` - Albanian Lek + // * `ALK` - Albanian Lek (1946–1965) + // * `DZD` - Algerian Dinar + // * `ADP` - Andorran Peseta + // * `AOA` - Angolan Kwanza + // * `AOK` - Angolan Kwanza (1977–1991) + // * `AON` - Angolan New Kwanza (1990–2000) + // * `AOR` - Angolan Readjusted Kwanza (1995–1999) + // * `ARA` - Argentine Austral + // * `ARS` - Argentine Peso + // * `ARM` - Argentine Peso (1881–1970) + // * `ARP` - Argentine Peso (1983–1985) + // * `ARL` - Argentine Peso Ley (1970–1983) + // * `AMD` - Armenian Dram + // * `AWG` - Aruban Florin + // * `AUD` - Australian Dollar + // * `ATS` - Austrian Schilling + // * `AZN` - Azerbaijani Manat + // * `AZM` - Azerbaijani Manat (1993–2006) + // * `BSD` - Bahamian Dollar + // * `BHD` - Bahraini Dinar + // * `BDT` - Bangladeshi Taka + // * `BBD` - Barbadian Dollar + // * `BYN` - Belarusian Ruble + // * `BYB` - Belarusian Ruble (1994–1999) + // * `BYR` - Belarusian Ruble (2000–2016) + // * `BEF` - Belgian Franc + // * `BEC` - Belgian Franc (convertible) + // * `BEL` - Belgian Franc (financial) + // * `BZD` - Belize Dollar + // * `BMD` - Bermudan Dollar + // * `BTN` - Bhutanese Ngultrum + // * `BOB` - Bolivian Boliviano + // * `BOL` - Bolivian Boliviano (1863–1963) + // * `BOV` - Bolivian Mvdol + // * `BOP` - Bolivian Peso + // * `BAM` - Bosnia-Herzegovina Convertible Mark + // * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + // * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + // * `BWP` - Botswanan Pula + // * `BRC` - Brazilian Cruzado (1986–1989) + // * `BRZ` - Brazilian Cruzeiro (1942–1967) + // * `BRE` - Brazilian Cruzeiro (1990–1993) + // * `BRR` - Brazilian Cruzeiro (1993–1994) + // * `BRN` - Brazilian New Cruzado (1989–1990) + // * `BRB` - Brazilian New Cruzeiro (1967–1986) + // * `BRL` - Brazilian Real + // * `GBP` - British Pound + // * `BND` - Brunei Dollar + // * `BGL` - Bulgarian Hard Lev + // * `BGN` - Bulgarian Lev + // * `BGO` - Bulgarian Lev (1879–1952) + // * `BGM` - Bulgarian Socialist Lev + // * `BUK` - Burmese Kyat + // * `BIF` - Burundian Franc + // * `XPF` - CFP Franc + // * `KHR` - Cambodian Riel + // * `CAD` - Canadian Dollar + // * `CVE` - Cape Verdean Escudo + // * `KYD` - Cayman Islands Dollar + // * `XAF` - Central African CFA Franc + // * `CLE` - Chilean Escudo + // * `CLP` - Chilean Peso + // * `CLF` - Chilean Unit of Account (UF) + // * `CNX` - Chinese People’s Bank Dollar + // * `CNY` - Chinese Yuan + // * `CNH` - Chinese Yuan (offshore) + // * `COP` - Colombian Peso + // * `COU` - Colombian Real Value Unit + // * `KMF` - Comorian Franc + // * `CDF` - Congolese Franc + // * `CRC` - Costa Rican Colón + // * `HRD` - Croatian Dinar + // * `HRK` - Croatian Kuna + // * `CUC` - Cuban Convertible Peso + // * `CUP` - Cuban Peso + // * `CYP` - Cypriot Pound + // * `CZK` - Czech Koruna + // * `CSK` - Czechoslovak Hard Koruna + // * `DKK` - Danish Krone + // * `DJF` - Djiboutian Franc + // * `DOP` - Dominican Peso + // * `NLG` - Dutch Guilder + // * `XCD` - East Caribbean Dollar + // * `DDM` - East German Mark + // * `ECS` - Ecuadorian Sucre + // * `ECV` - Ecuadorian Unit of Constant Value + // * `EGP` - Egyptian Pound + // * `GQE` - Equatorial Guinean Ekwele + // * `ERN` - Eritrean Nakfa + // * `EEK` - Estonian Kroon + // * `ETB` - Ethiopian Birr + // * `EUR` - Euro + // * `XBA` - European Composite Unit + // * `XEU` - European Currency Unit + // * `XBB` - European Monetary Unit + // * `XBC` - European Unit of Account (XBC) + // * `XBD` - European Unit of Account (XBD) + // * `FKP` - Falkland Islands Pound + // * `FJD` - Fijian Dollar + // * `FIM` - Finnish Markka + // * `FRF` - French Franc + // * `XFO` - French Gold Franc + // * `XFU` - French UIC-Franc + // * `GMD` - Gambian Dalasi + // * `GEK` - Georgian Kupon Larit + // * `GEL` - Georgian Lari + // * `DEM` - German Mark + // * `GHS` - Ghanaian Cedi + // * `GHC` - Ghanaian Cedi (1979–2007) + // * `GIP` - Gibraltar Pound + // * `XAU` - Gold + // * `GRD` - Greek Drachma + // * `GTQ` - Guatemalan Quetzal + // * `GWP` - Guinea-Bissau Peso + // * `GNF` - Guinean Franc + // * `GNS` - Guinean Syli + // * `GYD` - Guyanaese Dollar + // * `HTG` - Haitian Gourde + // * `HNL` - Honduran Lempira + // * `HKD` - Hong Kong Dollar + // * `HUF` - Hungarian Forint + // * `IMP` - IMP + // * `ISK` - Icelandic Króna + // * `ISJ` - Icelandic Króna (1918–1981) + // * `INR` - Indian Rupee + // * `IDR` - Indonesian Rupiah + // * `IRR` - Iranian Rial + // * `IQD` - Iraqi Dinar + // * `IEP` - Irish Pound + // * `ILS` - Israeli New Shekel + // * `ILP` - Israeli Pound + // * `ILR` - Israeli Shekel (1980–1985) + // * `ITL` - Italian Lira + // * `JMD` - Jamaican Dollar + // * `JPY` - Japanese Yen + // * `JOD` - Jordanian Dinar + // * `KZT` - Kazakhstani Tenge + // * `KES` - Kenyan Shilling + // * `KWD` - Kuwaiti Dinar + // * `KGS` - Kyrgystani Som + // * `LAK` - Laotian Kip + // * `LVL` - Latvian Lats + // * `LVR` - Latvian Ruble + // * `LBP` - Lebanese Pound + // * `LSL` - Lesotho Loti + // * `LRD` - Liberian Dollar + // * `LYD` - Libyan Dinar + // * `LTL` - Lithuanian Litas + // * `LTT` - Lithuanian Talonas + // * `LUL` - Luxembourg Financial Franc + // * `LUC` - Luxembourgian Convertible Franc + // * `LUF` - Luxembourgian Franc + // * `MOP` - Macanese Pataca + // * `MKD` - Macedonian Denar + // * `MKN` - Macedonian Denar (1992–1993) + // * `MGA` - Malagasy Ariary + // * `MGF` - Malagasy Franc + // * `MWK` - Malawian Kwacha + // * `MYR` - Malaysian Ringgit + // * `MVR` - Maldivian Rufiyaa + // * `MVP` - Maldivian Rupee (1947–1981) + // * `MLF` - Malian Franc + // * `MTL` - Maltese Lira + // * `MTP` - Maltese Pound + // * `MRU` - Mauritanian Ouguiya + // * `MRO` - Mauritanian Ouguiya (1973–2017) + // * `MUR` - Mauritian Rupee + // * `MXV` - Mexican Investment Unit + // * `MXN` - Mexican Peso + // * `MXP` - Mexican Silver Peso (1861–1992) + // * `MDC` - Moldovan Cupon + // * `MDL` - Moldovan Leu + // * `MCF` - Monegasque Franc + // * `MNT` - Mongolian Tugrik + // * `MAD` - Moroccan Dirham + // * `MAF` - Moroccan Franc + // * `MZE` - Mozambican Escudo + // * `MZN` - Mozambican Metical + // * `MZM` - Mozambican Metical (1980–2006) + // * `MMK` - Myanmar Kyat + // * `NAD` - Namibian Dollar + // * `NPR` - Nepalese Rupee + // * `ANG` - Netherlands Antillean Guilder + // * `TWD` - New Taiwan Dollar + // * `NZD` - New Zealand Dollar + // * `NIO` - Nicaraguan Córdoba + // * `NIC` - Nicaraguan Córdoba (1988–1991) + // * `NGN` - Nigerian Naira + // * `KPW` - North Korean Won + // * `NOK` - Norwegian Krone + // * `OMR` - Omani Rial + // * `PKR` - Pakistani Rupee + // * `XPD` - Palladium + // * `PAB` - Panamanian Balboa + // * `PGK` - Papua New Guinean Kina + // * `PYG` - Paraguayan Guarani + // * `PEI` - Peruvian Inti + // * `PEN` - Peruvian Sol + // * `PES` - Peruvian Sol (1863–1965) + // * `PHP` - Philippine Peso + // * `XPT` - Platinum + // * `PLN` - Polish Zloty + // * `PLZ` - Polish Zloty (1950–1995) + // * `PTE` - Portuguese Escudo + // * `GWE` - Portuguese Guinea Escudo + // * `QAR` - Qatari Rial + // * `XRE` - RINET Funds + // * `RHD` - Rhodesian Dollar + // * `RON` - Romanian Leu + // * `ROL` - Romanian Leu (1952–2006) + // * `RUB` - Russian Ruble + // * `RUR` - Russian Ruble (1991–1998) + // * `RWF` - Rwandan Franc + // * `SVC` - Salvadoran Colón + // * `WST` - Samoan Tala + // * `SAR` - Saudi Riyal + // * `RSD` - Serbian Dinar + // * `CSD` - Serbian Dinar (2002–2006) + // * `SCR` - Seychellois Rupee + // * `SLL` - Sierra Leonean Leone + // * `XAG` - Silver + // * `SGD` - Singapore Dollar + // * `SKK` - Slovak Koruna + // * `SIT` - Slovenian Tolar + // * `SBD` - Solomon Islands Dollar + // * `SOS` - Somali Shilling + // * `ZAR` - South African Rand + // * `ZAL` - South African Rand (financial) + // * `KRH` - South Korean Hwan (1953–1962) + // * `KRW` - South Korean Won + // * `KRO` - South Korean Won (1945–1953) + // * `SSP` - South Sudanese Pound + // * `SUR` - Soviet Rouble + // * `ESP` - Spanish Peseta + // * `ESA` - Spanish Peseta (A account) + // * `ESB` - Spanish Peseta (convertible account) + // * `XDR` - Special Drawing Rights + // * `LKR` - Sri Lankan Rupee + // * `SHP` - St. Helena Pound + // * `XSU` - Sucre + // * `SDD` - Sudanese Dinar (1992–2007) + // * `SDG` - Sudanese Pound + // * `SDP` - Sudanese Pound (1957–1998) + // * `SRD` - Surinamese Dollar + // * `SRG` - Surinamese Guilder + // * `SZL` - Swazi Lilangeni + // * `SEK` - Swedish Krona + // * `CHF` - Swiss Franc + // * `SYP` - Syrian Pound + // * `STN` - São Tomé & Príncipe Dobra + // * `STD` - São Tomé & Príncipe Dobra (1977–2017) + // * `TVD` - TVD + // * `TJR` - Tajikistani Ruble + // * `TJS` - Tajikistani Somoni + // * `TZS` - Tanzanian Shilling + // * `XTS` - Testing Currency Code + // * `THB` - Thai Baht + // * `XXX` - The codes assigned for transactions where no currency is involved + // * `TPE` - Timorese Escudo + // * `TOP` - Tongan Paʻanga + // * `TTD` - Trinidad & Tobago Dollar + // * `TND` - Tunisian Dinar + // * `TRY` - Turkish Lira + // * `TRL` - Turkish Lira (1922–2005) + // * `TMT` - Turkmenistani Manat + // * `TMM` - Turkmenistani Manat (1993–2009) + // * `USD` - US Dollar + // * `USN` - US Dollar (Next day) + // * `USS` - US Dollar (Same day) + // * `UGX` - Ugandan Shilling + // * `UGS` - Ugandan Shilling (1966–1987) + // * `UAH` - Ukrainian Hryvnia + // * `UAK` - Ukrainian Karbovanets + // * `AED` - United Arab Emirates Dirham + // * `UYW` - Uruguayan Nominal Wage Index Unit + // * `UYU` - Uruguayan Peso + // * `UYP` - Uruguayan Peso (1975–1993) + // * `UYI` - Uruguayan Peso (Indexed Units) + // * `UZS` - Uzbekistani Som + // * `VUV` - Vanuatu Vatu + // * `VES` - Venezuelan Bolívar + // * `VEB` - Venezuelan Bolívar (1871–2008) + // * `VEF` - Venezuelan Bolívar (2008–2018) + // * `VND` - Vietnamese Dong + // * `VNN` - Vietnamese Dong (1978–1985) + // * `CHE` - WIR Euro + // * `CHW` - WIR Franc + // * `XOF` - West African CFA Franc + // * `YDD` - Yemeni Dinar + // * `YER` - Yemeni Rial + // * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + // * `YUD` - Yugoslavian Hard Dinar (1966–1990) + // * `YUM` - Yugoslavian New Dinar (1994–2002) + // * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + // * `ZWN` - ZWN + // * `ZRN` - Zairean New Zaire (1993–1998) + // * `ZRZ` - Zairean Zaire (1971–1993) + // * `ZMW` - Zambian Kwacha + // * `ZMK` - Zambian Kwacha (1968–2012) + // * `ZWD` - Zimbabwean Dollar (1980–2008) + // * `ZWR` - Zimbabwean Dollar (2008) + // * `ZWL` - Zimbabwean Dollar (2009) + Currency *InvoiceLineItemRequestCurrency `json:"currency,omitempty" url:"currency,omitempty"` + // The line item's exchange rate. + ExchangeRate *string `json:"exchange_rate,omitempty" url:"exchange_rate,omitempty"` + Item *InvoiceLineItemRequestItem `json:"item,omitempty" url:"item,omitempty"` + Account *InvoiceLineItemRequestAccount `json:"account,omitempty" url:"account,omitempty"` + // The tax rate that applies to this line item. + TaxRate *string `json:"tax_rate,omitempty" url:"tax_rate,omitempty"` + TrackingCategory *InvoiceLineItemRequestTrackingCategory `json:"tracking_category,omitempty" url:"tracking_category,omitempty"` + // The invoice line item's associated tracking categories. + TrackingCategories []*InvoiceLineItemRequestTrackingCategoriesItem `json:"tracking_categories,omitempty" url:"tracking_categories,omitempty"` + // The company the invoice belongs to. + Company *string `json:"company,omitempty" url:"company,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + RemoteFields []*RemoteFieldRequest `json:"remote_fields,omitempty" url:"remote_fields,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (i *InvoiceLineItemRequest) GetRemoteId() *string { + if i == nil { + return nil + } + return i.RemoteId +} + +func (i *InvoiceLineItemRequest) GetDescription() *string { + if i == nil { + return nil + } + return i.Description +} + +func (i *InvoiceLineItemRequest) GetUnitPrice() *float64 { + if i == nil { + return nil + } + return i.UnitPrice +} + +func (i *InvoiceLineItemRequest) GetQuantity() *float64 { + if i == nil { + return nil + } + return i.Quantity +} + +func (i *InvoiceLineItemRequest) GetTotalAmount() *float64 { + if i == nil { + return nil + } + return i.TotalAmount +} + +func (i *InvoiceLineItemRequest) GetEmployee() *InvoiceLineItemRequestEmployee { + if i == nil { + return nil + } + return i.Employee +} + +func (i *InvoiceLineItemRequest) GetProject() *InvoiceLineItemRequestProject { + if i == nil { + return nil + } + return i.Project +} + +func (i *InvoiceLineItemRequest) GetContact() *InvoiceLineItemRequestContact { + if i == nil { + return nil + } + return i.Contact +} + +func (i *InvoiceLineItemRequest) GetCurrency() *InvoiceLineItemRequestCurrency { + if i == nil { + return nil + } + return i.Currency +} + +func (i *InvoiceLineItemRequest) GetExchangeRate() *string { + if i == nil { + return nil + } + return i.ExchangeRate +} + +func (i *InvoiceLineItemRequest) GetItem() *InvoiceLineItemRequestItem { + if i == nil { + return nil + } + return i.Item +} + +func (i *InvoiceLineItemRequest) GetAccount() *InvoiceLineItemRequestAccount { + if i == nil { + return nil + } + return i.Account +} + +func (i *InvoiceLineItemRequest) GetTaxRate() *string { + if i == nil { + return nil + } + return i.TaxRate +} + +func (i *InvoiceLineItemRequest) GetTrackingCategory() *InvoiceLineItemRequestTrackingCategory { + if i == nil { + return nil + } + return i.TrackingCategory +} + +func (i *InvoiceLineItemRequest) GetTrackingCategories() []*InvoiceLineItemRequestTrackingCategoriesItem { + if i == nil { + return nil + } + return i.TrackingCategories +} + +func (i *InvoiceLineItemRequest) GetCompany() *string { + if i == nil { + return nil + } + return i.Company +} + +func (i *InvoiceLineItemRequest) GetIntegrationParams() map[string]interface{} { + if i == nil { + return nil + } + return i.IntegrationParams +} + +func (i *InvoiceLineItemRequest) GetLinkedAccountParams() map[string]interface{} { + if i == nil { + return nil + } + return i.LinkedAccountParams +} + +func (i *InvoiceLineItemRequest) GetRemoteFields() []*RemoteFieldRequest { + if i == nil { + return nil + } + return i.RemoteFields +} + +func (i *InvoiceLineItemRequest) GetExtraProperties() map[string]interface{} { + return i.extraProperties +} + +func (i *InvoiceLineItemRequest) UnmarshalJSON(data []byte) error { + type unmarshaler InvoiceLineItemRequest + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *i = InvoiceLineItemRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *i) + if err != nil { + return err + } + i.extraProperties = extraProperties + i.rawJSON = json.RawMessage(data) + return nil +} + +func (i *InvoiceLineItemRequest) String() string { + if len(i.rawJSON) > 0 { + if value, err := internal.StringifyJSON(i.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(i); err == nil { + return value + } + return fmt.Sprintf("%#v", i) +} + +type InvoiceLineItemRequestAccount struct { + String string + Account *Account + + typ string +} + +func (i *InvoiceLineItemRequestAccount) GetString() string { + if i == nil { + return "" + } + return i.String +} + +func (i *InvoiceLineItemRequestAccount) GetAccount() *Account { + if i == nil { + return nil + } + return i.Account +} + +func (i *InvoiceLineItemRequestAccount) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + i.typ = "String" + i.String = valueString + return nil + } + valueAccount := new(Account) + if err := json.Unmarshal(data, &valueAccount); err == nil { + i.typ = "Account" + i.Account = valueAccount + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) +} + +func (i InvoiceLineItemRequestAccount) MarshalJSON() ([]byte, error) { + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) + } + if i.typ == "Account" || i.Account != nil { + return json.Marshal(i.Account) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) +} + +type InvoiceLineItemRequestAccountVisitor interface { + VisitString(string) error + VisitAccount(*Account) error +} + +func (i *InvoiceLineItemRequestAccount) Accept(visitor InvoiceLineItemRequestAccountVisitor) error { + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) + } + if i.typ == "Account" || i.Account != nil { + return visitor.VisitAccount(i.Account) + } + return fmt.Errorf("type %T does not include a non-empty union type", i) +} + +// The invoice's contact. +type InvoiceLineItemRequestContact struct { + String string + Contact *Contact + + typ string +} + +func (i *InvoiceLineItemRequestContact) GetString() string { + if i == nil { + return "" + } + return i.String +} + +func (i *InvoiceLineItemRequestContact) GetContact() *Contact { + if i == nil { + return nil + } + return i.Contact +} + +func (i *InvoiceLineItemRequestContact) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + i.typ = "String" + i.String = valueString + return nil + } + valueContact := new(Contact) + if err := json.Unmarshal(data, &valueContact); err == nil { + i.typ = "Contact" + i.Contact = valueContact + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) +} + +func (i InvoiceLineItemRequestContact) MarshalJSON() ([]byte, error) { + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) + } + if i.typ == "Contact" || i.Contact != nil { + return json.Marshal(i.Contact) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) +} + +type InvoiceLineItemRequestContactVisitor interface { + VisitString(string) error + VisitContact(*Contact) error +} + +func (i *InvoiceLineItemRequestContact) Accept(visitor InvoiceLineItemRequestContactVisitor) error { + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) + } + if i.typ == "Contact" || i.Contact != nil { + return visitor.VisitContact(i.Contact) + } + return fmt.Errorf("type %T does not include a non-empty union type", i) +} + +// The line item's currency. +// +// * `XUA` - ADB Unit of Account +// * `AFN` - Afghan Afghani +// * `AFA` - Afghan Afghani (1927–2002) +// * `ALL` - Albanian Lek +// * `ALK` - Albanian Lek (1946–1965) +// * `DZD` - Algerian Dinar +// * `ADP` - Andorran Peseta +// * `AOA` - Angolan Kwanza +// * `AOK` - Angolan Kwanza (1977–1991) +// * `AON` - Angolan New Kwanza (1990–2000) +// * `AOR` - Angolan Readjusted Kwanza (1995–1999) +// * `ARA` - Argentine Austral +// * `ARS` - Argentine Peso +// * `ARM` - Argentine Peso (1881–1970) +// * `ARP` - Argentine Peso (1983–1985) +// * `ARL` - Argentine Peso Ley (1970–1983) +// * `AMD` - Armenian Dram +// * `AWG` - Aruban Florin +// * `AUD` - Australian Dollar +// * `ATS` - Austrian Schilling +// * `AZN` - Azerbaijani Manat +// * `AZM` - Azerbaijani Manat (1993–2006) +// * `BSD` - Bahamian Dollar +// * `BHD` - Bahraini Dinar +// * `BDT` - Bangladeshi Taka +// * `BBD` - Barbadian Dollar +// * `BYN` - Belarusian Ruble +// * `BYB` - Belarusian Ruble (1994–1999) +// * `BYR` - Belarusian Ruble (2000–2016) +// * `BEF` - Belgian Franc +// * `BEC` - Belgian Franc (convertible) +// * `BEL` - Belgian Franc (financial) +// * `BZD` - Belize Dollar +// * `BMD` - Bermudan Dollar +// * `BTN` - Bhutanese Ngultrum +// * `BOB` - Bolivian Boliviano +// * `BOL` - Bolivian Boliviano (1863–1963) +// * `BOV` - Bolivian Mvdol +// * `BOP` - Bolivian Peso +// * `BAM` - Bosnia-Herzegovina Convertible Mark +// * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) +// * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) +// * `BWP` - Botswanan Pula +// * `BRC` - Brazilian Cruzado (1986–1989) +// * `BRZ` - Brazilian Cruzeiro (1942–1967) +// * `BRE` - Brazilian Cruzeiro (1990–1993) +// * `BRR` - Brazilian Cruzeiro (1993–1994) +// * `BRN` - Brazilian New Cruzado (1989–1990) +// * `BRB` - Brazilian New Cruzeiro (1967–1986) +// * `BRL` - Brazilian Real +// * `GBP` - British Pound +// * `BND` - Brunei Dollar +// * `BGL` - Bulgarian Hard Lev +// * `BGN` - Bulgarian Lev +// * `BGO` - Bulgarian Lev (1879–1952) +// * `BGM` - Bulgarian Socialist Lev +// * `BUK` - Burmese Kyat +// * `BIF` - Burundian Franc +// * `XPF` - CFP Franc +// * `KHR` - Cambodian Riel +// * `CAD` - Canadian Dollar +// * `CVE` - Cape Verdean Escudo +// * `KYD` - Cayman Islands Dollar +// * `XAF` - Central African CFA Franc +// * `CLE` - Chilean Escudo +// * `CLP` - Chilean Peso +// * `CLF` - Chilean Unit of Account (UF) +// * `CNX` - Chinese People’s Bank Dollar +// * `CNY` - Chinese Yuan +// * `CNH` - Chinese Yuan (offshore) +// * `COP` - Colombian Peso +// * `COU` - Colombian Real Value Unit +// * `KMF` - Comorian Franc +// * `CDF` - Congolese Franc +// * `CRC` - Costa Rican Colón +// * `HRD` - Croatian Dinar +// * `HRK` - Croatian Kuna +// * `CUC` - Cuban Convertible Peso +// * `CUP` - Cuban Peso +// * `CYP` - Cypriot Pound +// * `CZK` - Czech Koruna +// * `CSK` - Czechoslovak Hard Koruna +// * `DKK` - Danish Krone +// * `DJF` - Djiboutian Franc +// * `DOP` - Dominican Peso +// * `NLG` - Dutch Guilder +// * `XCD` - East Caribbean Dollar +// * `DDM` - East German Mark +// * `ECS` - Ecuadorian Sucre +// * `ECV` - Ecuadorian Unit of Constant Value +// * `EGP` - Egyptian Pound +// * `GQE` - Equatorial Guinean Ekwele +// * `ERN` - Eritrean Nakfa +// * `EEK` - Estonian Kroon +// * `ETB` - Ethiopian Birr +// * `EUR` - Euro +// * `XBA` - European Composite Unit +// * `XEU` - European Currency Unit +// * `XBB` - European Monetary Unit +// * `XBC` - European Unit of Account (XBC) +// * `XBD` - European Unit of Account (XBD) +// * `FKP` - Falkland Islands Pound +// * `FJD` - Fijian Dollar +// * `FIM` - Finnish Markka +// * `FRF` - French Franc +// * `XFO` - French Gold Franc +// * `XFU` - French UIC-Franc +// * `GMD` - Gambian Dalasi +// * `GEK` - Georgian Kupon Larit +// * `GEL` - Georgian Lari +// * `DEM` - German Mark +// * `GHS` - Ghanaian Cedi +// * `GHC` - Ghanaian Cedi (1979–2007) +// * `GIP` - Gibraltar Pound +// * `XAU` - Gold +// * `GRD` - Greek Drachma +// * `GTQ` - Guatemalan Quetzal +// * `GWP` - Guinea-Bissau Peso +// * `GNF` - Guinean Franc +// * `GNS` - Guinean Syli +// * `GYD` - Guyanaese Dollar +// * `HTG` - Haitian Gourde +// * `HNL` - Honduran Lempira +// * `HKD` - Hong Kong Dollar +// * `HUF` - Hungarian Forint +// * `IMP` - IMP +// * `ISK` - Icelandic Króna +// * `ISJ` - Icelandic Króna (1918–1981) +// * `INR` - Indian Rupee +// * `IDR` - Indonesian Rupiah +// * `IRR` - Iranian Rial +// * `IQD` - Iraqi Dinar +// * `IEP` - Irish Pound +// * `ILS` - Israeli New Shekel +// * `ILP` - Israeli Pound +// * `ILR` - Israeli Shekel (1980–1985) +// * `ITL` - Italian Lira +// * `JMD` - Jamaican Dollar +// * `JPY` - Japanese Yen +// * `JOD` - Jordanian Dinar +// * `KZT` - Kazakhstani Tenge +// * `KES` - Kenyan Shilling +// * `KWD` - Kuwaiti Dinar +// * `KGS` - Kyrgystani Som +// * `LAK` - Laotian Kip +// * `LVL` - Latvian Lats +// * `LVR` - Latvian Ruble +// * `LBP` - Lebanese Pound +// * `LSL` - Lesotho Loti +// * `LRD` - Liberian Dollar +// * `LYD` - Libyan Dinar +// * `LTL` - Lithuanian Litas +// * `LTT` - Lithuanian Talonas +// * `LUL` - Luxembourg Financial Franc +// * `LUC` - Luxembourgian Convertible Franc +// * `LUF` - Luxembourgian Franc +// * `MOP` - Macanese Pataca +// * `MKD` - Macedonian Denar +// * `MKN` - Macedonian Denar (1992–1993) +// * `MGA` - Malagasy Ariary +// * `MGF` - Malagasy Franc +// * `MWK` - Malawian Kwacha +// * `MYR` - Malaysian Ringgit +// * `MVR` - Maldivian Rufiyaa +// * `MVP` - Maldivian Rupee (1947–1981) +// * `MLF` - Malian Franc +// * `MTL` - Maltese Lira +// * `MTP` - Maltese Pound +// * `MRU` - Mauritanian Ouguiya +// * `MRO` - Mauritanian Ouguiya (1973–2017) +// * `MUR` - Mauritian Rupee +// * `MXV` - Mexican Investment Unit +// * `MXN` - Mexican Peso +// * `MXP` - Mexican Silver Peso (1861–1992) +// * `MDC` - Moldovan Cupon +// * `MDL` - Moldovan Leu +// * `MCF` - Monegasque Franc +// * `MNT` - Mongolian Tugrik +// * `MAD` - Moroccan Dirham +// * `MAF` - Moroccan Franc +// * `MZE` - Mozambican Escudo +// * `MZN` - Mozambican Metical +// * `MZM` - Mozambican Metical (1980–2006) +// * `MMK` - Myanmar Kyat +// * `NAD` - Namibian Dollar +// * `NPR` - Nepalese Rupee +// * `ANG` - Netherlands Antillean Guilder +// * `TWD` - New Taiwan Dollar +// * `NZD` - New Zealand Dollar +// * `NIO` - Nicaraguan Córdoba +// * `NIC` - Nicaraguan Córdoba (1988–1991) +// * `NGN` - Nigerian Naira +// * `KPW` - North Korean Won +// * `NOK` - Norwegian Krone +// * `OMR` - Omani Rial +// * `PKR` - Pakistani Rupee +// * `XPD` - Palladium +// * `PAB` - Panamanian Balboa +// * `PGK` - Papua New Guinean Kina +// * `PYG` - Paraguayan Guarani +// * `PEI` - Peruvian Inti +// * `PEN` - Peruvian Sol +// * `PES` - Peruvian Sol (1863–1965) +// * `PHP` - Philippine Peso +// * `XPT` - Platinum +// * `PLN` - Polish Zloty +// * `PLZ` - Polish Zloty (1950–1995) +// * `PTE` - Portuguese Escudo +// * `GWE` - Portuguese Guinea Escudo +// * `QAR` - Qatari Rial +// * `XRE` - RINET Funds +// * `RHD` - Rhodesian Dollar +// * `RON` - Romanian Leu +// * `ROL` - Romanian Leu (1952–2006) +// * `RUB` - Russian Ruble +// * `RUR` - Russian Ruble (1991–1998) +// * `RWF` - Rwandan Franc +// * `SVC` - Salvadoran Colón +// * `WST` - Samoan Tala +// * `SAR` - Saudi Riyal +// * `RSD` - Serbian Dinar +// * `CSD` - Serbian Dinar (2002–2006) +// * `SCR` - Seychellois Rupee +// * `SLL` - Sierra Leonean Leone +// * `XAG` - Silver +// * `SGD` - Singapore Dollar +// * `SKK` - Slovak Koruna +// * `SIT` - Slovenian Tolar +// * `SBD` - Solomon Islands Dollar +// * `SOS` - Somali Shilling +// * `ZAR` - South African Rand +// * `ZAL` - South African Rand (financial) +// * `KRH` - South Korean Hwan (1953–1962) +// * `KRW` - South Korean Won +// * `KRO` - South Korean Won (1945–1953) +// * `SSP` - South Sudanese Pound +// * `SUR` - Soviet Rouble +// * `ESP` - Spanish Peseta +// * `ESA` - Spanish Peseta (A account) +// * `ESB` - Spanish Peseta (convertible account) +// * `XDR` - Special Drawing Rights +// * `LKR` - Sri Lankan Rupee +// * `SHP` - St. Helena Pound +// * `XSU` - Sucre +// * `SDD` - Sudanese Dinar (1992–2007) +// * `SDG` - Sudanese Pound +// * `SDP` - Sudanese Pound (1957–1998) +// * `SRD` - Surinamese Dollar +// * `SRG` - Surinamese Guilder +// * `SZL` - Swazi Lilangeni +// * `SEK` - Swedish Krona +// * `CHF` - Swiss Franc +// * `SYP` - Syrian Pound +// * `STN` - São Tomé & Príncipe Dobra +// * `STD` - São Tomé & Príncipe Dobra (1977–2017) +// * `TVD` - TVD +// * `TJR` - Tajikistani Ruble +// * `TJS` - Tajikistani Somoni +// * `TZS` - Tanzanian Shilling +// * `XTS` - Testing Currency Code +// * `THB` - Thai Baht +// * `XXX` - The codes assigned for transactions where no currency is involved +// * `TPE` - Timorese Escudo +// * `TOP` - Tongan Paʻanga +// * `TTD` - Trinidad & Tobago Dollar +// * `TND` - Tunisian Dinar +// * `TRY` - Turkish Lira +// * `TRL` - Turkish Lira (1922–2005) +// * `TMT` - Turkmenistani Manat +// * `TMM` - Turkmenistani Manat (1993–2009) +// * `USD` - US Dollar +// * `USN` - US Dollar (Next day) +// * `USS` - US Dollar (Same day) +// * `UGX` - Ugandan Shilling +// * `UGS` - Ugandan Shilling (1966–1987) +// * `UAH` - Ukrainian Hryvnia +// * `UAK` - Ukrainian Karbovanets +// * `AED` - United Arab Emirates Dirham +// * `UYW` - Uruguayan Nominal Wage Index Unit +// * `UYU` - Uruguayan Peso +// * `UYP` - Uruguayan Peso (1975–1993) +// * `UYI` - Uruguayan Peso (Indexed Units) +// * `UZS` - Uzbekistani Som +// * `VUV` - Vanuatu Vatu +// * `VES` - Venezuelan Bolívar +// * `VEB` - Venezuelan Bolívar (1871–2008) +// * `VEF` - Venezuelan Bolívar (2008–2018) +// * `VND` - Vietnamese Dong +// * `VNN` - Vietnamese Dong (1978–1985) +// * `CHE` - WIR Euro +// * `CHW` - WIR Franc +// * `XOF` - West African CFA Franc +// * `YDD` - Yemeni Dinar +// * `YER` - Yemeni Rial +// * `YUN` - Yugoslavian Convertible Dinar (1990–1992) +// * `YUD` - Yugoslavian Hard Dinar (1966–1990) +// * `YUM` - Yugoslavian New Dinar (1994–2002) +// * `YUR` - Yugoslavian Reformed Dinar (1992–1993) +// * `ZWN` - ZWN +// * `ZRN` - Zairean New Zaire (1993–1998) +// * `ZRZ` - Zairean Zaire (1971–1993) +// * `ZMW` - Zambian Kwacha +// * `ZMK` - Zambian Kwacha (1968–2012) +// * `ZWD` - Zimbabwean Dollar (1980–2008) +// * `ZWR` - Zimbabwean Dollar (2008) +// * `ZWL` - Zimbabwean Dollar (2009) +type InvoiceLineItemRequestCurrency struct { + TransactionCurrencyEnum TransactionCurrencyEnum + String string + + typ string +} + +func (i *InvoiceLineItemRequestCurrency) GetTransactionCurrencyEnum() TransactionCurrencyEnum { + if i == nil { + return "" + } + return i.TransactionCurrencyEnum +} + +func (i *InvoiceLineItemRequestCurrency) GetString() string { + if i == nil { + return "" + } + return i.String +} + +func (i *InvoiceLineItemRequestCurrency) UnmarshalJSON(data []byte) error { + var valueTransactionCurrencyEnum TransactionCurrencyEnum + if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { + i.typ = "TransactionCurrencyEnum" + i.TransactionCurrencyEnum = valueTransactionCurrencyEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + i.typ = "String" + i.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) +} + +func (i InvoiceLineItemRequestCurrency) MarshalJSON() ([]byte, error) { + if i.typ == "TransactionCurrencyEnum" || i.TransactionCurrencyEnum != "" { + return json.Marshal(i.TransactionCurrencyEnum) + } + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) +} + +type InvoiceLineItemRequestCurrencyVisitor interface { + VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error + VisitString(string) error +} + +func (i *InvoiceLineItemRequestCurrency) Accept(visitor InvoiceLineItemRequestCurrencyVisitor) error { + if i.typ == "TransactionCurrencyEnum" || i.TransactionCurrencyEnum != "" { + return visitor.VisitTransactionCurrencyEnum(i.TransactionCurrencyEnum) + } + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", i) +} + +// The employee this overall transaction relates to. +type InvoiceLineItemRequestEmployee struct { + String string + Employee *Employee + + typ string +} + +func (i *InvoiceLineItemRequestEmployee) GetString() string { + if i == nil { + return "" + } + return i.String +} + +func (i *InvoiceLineItemRequestEmployee) GetEmployee() *Employee { + if i == nil { + return nil + } + return i.Employee +} + +func (i *InvoiceLineItemRequestEmployee) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + i.typ = "String" + i.String = valueString + return nil + } + valueEmployee := new(Employee) + if err := json.Unmarshal(data, &valueEmployee); err == nil { + i.typ = "Employee" + i.Employee = valueEmployee + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) +} + +func (i InvoiceLineItemRequestEmployee) MarshalJSON() ([]byte, error) { + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) + } + if i.typ == "Employee" || i.Employee != nil { + return json.Marshal(i.Employee) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) +} + +type InvoiceLineItemRequestEmployeeVisitor interface { + VisitString(string) error + VisitEmployee(*Employee) error +} + +func (i *InvoiceLineItemRequestEmployee) Accept(visitor InvoiceLineItemRequestEmployeeVisitor) error { + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) + } + if i.typ == "Employee" || i.Employee != nil { + return visitor.VisitEmployee(i.Employee) + } + return fmt.Errorf("type %T does not include a non-empty union type", i) +} + +type InvoiceLineItemRequestItem struct { + String string + Item *Item + + typ string +} + +func (i *InvoiceLineItemRequestItem) GetString() string { + if i == nil { + return "" + } + return i.String +} + +func (i *InvoiceLineItemRequestItem) GetItem() *Item { + if i == nil { + return nil + } + return i.Item +} + +func (i *InvoiceLineItemRequestItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + i.typ = "String" + i.String = valueString + return nil + } + valueItem := new(Item) + if err := json.Unmarshal(data, &valueItem); err == nil { + i.typ = "Item" + i.Item = valueItem + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) +} + +func (i InvoiceLineItemRequestItem) MarshalJSON() ([]byte, error) { + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) + } + if i.typ == "Item" || i.Item != nil { + return json.Marshal(i.Item) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) +} + +type InvoiceLineItemRequestItemVisitor interface { + VisitString(string) error + VisitItem(*Item) error +} + +func (i *InvoiceLineItemRequestItem) Accept(visitor InvoiceLineItemRequestItemVisitor) error { + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) + } + if i.typ == "Item" || i.Item != nil { + return visitor.VisitItem(i.Item) + } + return fmt.Errorf("type %T does not include a non-empty union type", i) +} + +type InvoiceLineItemRequestProject struct { + String string + Project *Project + + typ string +} + +func (i *InvoiceLineItemRequestProject) GetString() string { + if i == nil { + return "" + } + return i.String +} + +func (i *InvoiceLineItemRequestProject) GetProject() *Project { + if i == nil { + return nil + } + return i.Project +} + +func (i *InvoiceLineItemRequestProject) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + i.typ = "String" + i.String = valueString + return nil + } + valueProject := new(Project) + if err := json.Unmarshal(data, &valueProject); err == nil { + i.typ = "Project" + i.Project = valueProject + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) +} + +func (i InvoiceLineItemRequestProject) MarshalJSON() ([]byte, error) { + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) + } + if i.typ == "Project" || i.Project != nil { + return json.Marshal(i.Project) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) +} + +type InvoiceLineItemRequestProjectVisitor interface { + VisitString(string) error + VisitProject(*Project) error +} + +func (i *InvoiceLineItemRequestProject) Accept(visitor InvoiceLineItemRequestProjectVisitor) error { + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) + } + if i.typ == "Project" || i.Project != nil { + return visitor.VisitProject(i.Project) + } + return fmt.Errorf("type %T does not include a non-empty union type", i) +} + +type InvoiceLineItemRequestTrackingCategoriesItem struct { + String string + TrackingCategory *TrackingCategory + + typ string +} + +func (i *InvoiceLineItemRequestTrackingCategoriesItem) GetString() string { + if i == nil { + return "" + } + return i.String +} + +func (i *InvoiceLineItemRequestTrackingCategoriesItem) GetTrackingCategory() *TrackingCategory { + if i == nil { + return nil + } + return i.TrackingCategory +} + +func (i *InvoiceLineItemRequestTrackingCategoriesItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + i.typ = "String" + i.String = valueString + return nil + } + valueTrackingCategory := new(TrackingCategory) + if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { + i.typ = "TrackingCategory" + i.TrackingCategory = valueTrackingCategory + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) +} + +func (i InvoiceLineItemRequestTrackingCategoriesItem) MarshalJSON() ([]byte, error) { + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) + } + if i.typ == "TrackingCategory" || i.TrackingCategory != nil { + return json.Marshal(i.TrackingCategory) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) +} + +type InvoiceLineItemRequestTrackingCategoriesItemVisitor interface { + VisitString(string) error + VisitTrackingCategory(*TrackingCategory) error +} + +func (i *InvoiceLineItemRequestTrackingCategoriesItem) Accept(visitor InvoiceLineItemRequestTrackingCategoriesItemVisitor) error { + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) + } + if i.typ == "TrackingCategory" || i.TrackingCategory != nil { + return visitor.VisitTrackingCategory(i.TrackingCategory) + } + return fmt.Errorf("type %T does not include a non-empty union type", i) +} + +type InvoiceLineItemRequestTrackingCategory struct { + String string + TrackingCategory *TrackingCategory + + typ string +} + +func (i *InvoiceLineItemRequestTrackingCategory) GetString() string { + if i == nil { + return "" + } + return i.String +} + +func (i *InvoiceLineItemRequestTrackingCategory) GetTrackingCategory() *TrackingCategory { + if i == nil { + return nil + } + return i.TrackingCategory +} + +func (i *InvoiceLineItemRequestTrackingCategory) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + i.typ = "String" + i.String = valueString + return nil + } + valueTrackingCategory := new(TrackingCategory) + if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { + i.typ = "TrackingCategory" + i.TrackingCategory = valueTrackingCategory + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) +} + +func (i InvoiceLineItemRequestTrackingCategory) MarshalJSON() ([]byte, error) { + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) + } + if i.typ == "TrackingCategory" || i.TrackingCategory != nil { + return json.Marshal(i.TrackingCategory) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) +} + +type InvoiceLineItemRequestTrackingCategoryVisitor interface { + VisitString(string) error + VisitTrackingCategory(*TrackingCategory) error +} + +func (i *InvoiceLineItemRequestTrackingCategory) Accept(visitor InvoiceLineItemRequestTrackingCategoryVisitor) error { + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) + } + if i.typ == "TrackingCategory" || i.TrackingCategory != nil { + return visitor.VisitTrackingCategory(i.TrackingCategory) + } + return fmt.Errorf("type %T does not include a non-empty union type", i) +} + +// # The Invoice Object +// ### Description +// The `Invoice` object represents an itemized record of goods and/or services sold to a customer or bought from a vendor. +// +// Represents a Bill when the `Invoice` type is `ACCOUNTS_PAYABLE`. References an Invoice when the `Invoice` type is `ACCOUNTS_RECEIVABLE`. +// +// ### Usage Example +// Fetch from the `LIST Invoices` endpoint and view a company's invoices. +type InvoiceRequest struct { + // 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. + // + // * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE + // * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE + Type *InvoiceRequestType `json:"type,omitempty" url:"type,omitempty"` + // The invoice's contact. + Contact *InvoiceRequestContact `json:"contact,omitempty" url:"contact,omitempty"` + // The invoice's number. + Number *string `json:"number,omitempty" url:"number,omitempty"` + // The invoice's issue date. + IssueDate *time.Time `json:"issue_date,omitempty" url:"issue_date,omitempty"` + // The invoice's due date. + DueDate *time.Time `json:"due_date,omitempty" url:"due_date,omitempty"` + // The invoice's paid date. + PaidOnDate *time.Time `json:"paid_on_date,omitempty" url:"paid_on_date,omitempty"` + // The employee this overall transaction relates to. + Employee *InvoiceRequestEmployee `json:"employee,omitempty" url:"employee,omitempty"` + // The invoice's private note. + Memo *string `json:"memo,omitempty" url:"memo,omitempty"` + // The status of the invoice. + // + // * `PAID` - PAID + // * `DRAFT` - DRAFT + // * `SUBMITTED` - SUBMITTED + // * `PARTIALLY_PAID` - PARTIALLY_PAID + // * `OPEN` - OPEN + // * `VOID` - VOID + Status *InvoiceRequestStatus `json:"status,omitempty" url:"status,omitempty"` + // The company the invoice belongs to. + Company *InvoiceRequestCompany `json:"company,omitempty" url:"company,omitempty"` + // The invoice's currency. + // + // * `XUA` - ADB Unit of Account + // * `AFN` - Afghan Afghani + // * `AFA` - Afghan Afghani (1927–2002) + // * `ALL` - Albanian Lek + // * `ALK` - Albanian Lek (1946–1965) + // * `DZD` - Algerian Dinar + // * `ADP` - Andorran Peseta + // * `AOA` - Angolan Kwanza + // * `AOK` - Angolan Kwanza (1977–1991) + // * `AON` - Angolan New Kwanza (1990–2000) + // * `AOR` - Angolan Readjusted Kwanza (1995–1999) + // * `ARA` - Argentine Austral + // * `ARS` - Argentine Peso + // * `ARM` - Argentine Peso (1881–1970) + // * `ARP` - Argentine Peso (1983–1985) + // * `ARL` - Argentine Peso Ley (1970–1983) + // * `AMD` - Armenian Dram + // * `AWG` - Aruban Florin + // * `AUD` - Australian Dollar + // * `ATS` - Austrian Schilling + // * `AZN` - Azerbaijani Manat + // * `AZM` - Azerbaijani Manat (1993–2006) + // * `BSD` - Bahamian Dollar + // * `BHD` - Bahraini Dinar + // * `BDT` - Bangladeshi Taka + // * `BBD` - Barbadian Dollar + // * `BYN` - Belarusian Ruble + // * `BYB` - Belarusian Ruble (1994–1999) + // * `BYR` - Belarusian Ruble (2000–2016) + // * `BEF` - Belgian Franc + // * `BEC` - Belgian Franc (convertible) + // * `BEL` - Belgian Franc (financial) + // * `BZD` - Belize Dollar + // * `BMD` - Bermudan Dollar + // * `BTN` - Bhutanese Ngultrum + // * `BOB` - Bolivian Boliviano + // * `BOL` - Bolivian Boliviano (1863–1963) + // * `BOV` - Bolivian Mvdol + // * `BOP` - Bolivian Peso + // * `BAM` - Bosnia-Herzegovina Convertible Mark + // * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + // * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + // * `BWP` - Botswanan Pula + // * `BRC` - Brazilian Cruzado (1986–1989) + // * `BRZ` - Brazilian Cruzeiro (1942–1967) + // * `BRE` - Brazilian Cruzeiro (1990–1993) + // * `BRR` - Brazilian Cruzeiro (1993–1994) + // * `BRN` - Brazilian New Cruzado (1989–1990) + // * `BRB` - Brazilian New Cruzeiro (1967–1986) + // * `BRL` - Brazilian Real + // * `GBP` - British Pound + // * `BND` - Brunei Dollar + // * `BGL` - Bulgarian Hard Lev + // * `BGN` - Bulgarian Lev + // * `BGO` - Bulgarian Lev (1879–1952) + // * `BGM` - Bulgarian Socialist Lev + // * `BUK` - Burmese Kyat + // * `BIF` - Burundian Franc + // * `XPF` - CFP Franc + // * `KHR` - Cambodian Riel + // * `CAD` - Canadian Dollar + // * `CVE` - Cape Verdean Escudo + // * `KYD` - Cayman Islands Dollar + // * `XAF` - Central African CFA Franc + // * `CLE` - Chilean Escudo + // * `CLP` - Chilean Peso + // * `CLF` - Chilean Unit of Account (UF) + // * `CNX` - Chinese People’s Bank Dollar + // * `CNY` - Chinese Yuan + // * `CNH` - Chinese Yuan (offshore) + // * `COP` - Colombian Peso + // * `COU` - Colombian Real Value Unit + // * `KMF` - Comorian Franc + // * `CDF` - Congolese Franc + // * `CRC` - Costa Rican Colón + // * `HRD` - Croatian Dinar + // * `HRK` - Croatian Kuna + // * `CUC` - Cuban Convertible Peso + // * `CUP` - Cuban Peso + // * `CYP` - Cypriot Pound + // * `CZK` - Czech Koruna + // * `CSK` - Czechoslovak Hard Koruna + // * `DKK` - Danish Krone + // * `DJF` - Djiboutian Franc + // * `DOP` - Dominican Peso + // * `NLG` - Dutch Guilder + // * `XCD` - East Caribbean Dollar + // * `DDM` - East German Mark + // * `ECS` - Ecuadorian Sucre + // * `ECV` - Ecuadorian Unit of Constant Value + // * `EGP` - Egyptian Pound + // * `GQE` - Equatorial Guinean Ekwele + // * `ERN` - Eritrean Nakfa + // * `EEK` - Estonian Kroon + // * `ETB` - Ethiopian Birr + // * `EUR` - Euro + // * `XBA` - European Composite Unit + // * `XEU` - European Currency Unit + // * `XBB` - European Monetary Unit + // * `XBC` - European Unit of Account (XBC) + // * `XBD` - European Unit of Account (XBD) + // * `FKP` - Falkland Islands Pound + // * `FJD` - Fijian Dollar + // * `FIM` - Finnish Markka + // * `FRF` - French Franc + // * `XFO` - French Gold Franc + // * `XFU` - French UIC-Franc + // * `GMD` - Gambian Dalasi + // * `GEK` - Georgian Kupon Larit + // * `GEL` - Georgian Lari + // * `DEM` - German Mark + // * `GHS` - Ghanaian Cedi + // * `GHC` - Ghanaian Cedi (1979–2007) + // * `GIP` - Gibraltar Pound + // * `XAU` - Gold + // * `GRD` - Greek Drachma + // * `GTQ` - Guatemalan Quetzal + // * `GWP` - Guinea-Bissau Peso + // * `GNF` - Guinean Franc + // * `GNS` - Guinean Syli + // * `GYD` - Guyanaese Dollar + // * `HTG` - Haitian Gourde + // * `HNL` - Honduran Lempira + // * `HKD` - Hong Kong Dollar + // * `HUF` - Hungarian Forint + // * `IMP` - IMP + // * `ISK` - Icelandic Króna + // * `ISJ` - Icelandic Króna (1918–1981) + // * `INR` - Indian Rupee + // * `IDR` - Indonesian Rupiah + // * `IRR` - Iranian Rial + // * `IQD` - Iraqi Dinar + // * `IEP` - Irish Pound + // * `ILS` - Israeli New Shekel + // * `ILP` - Israeli Pound + // * `ILR` - Israeli Shekel (1980–1985) + // * `ITL` - Italian Lira + // * `JMD` - Jamaican Dollar + // * `JPY` - Japanese Yen + // * `JOD` - Jordanian Dinar + // * `KZT` - Kazakhstani Tenge + // * `KES` - Kenyan Shilling + // * `KWD` - Kuwaiti Dinar + // * `KGS` - Kyrgystani Som + // * `LAK` - Laotian Kip + // * `LVL` - Latvian Lats + // * `LVR` - Latvian Ruble + // * `LBP` - Lebanese Pound + // * `LSL` - Lesotho Loti + // * `LRD` - Liberian Dollar + // * `LYD` - Libyan Dinar + // * `LTL` - Lithuanian Litas + // * `LTT` - Lithuanian Talonas + // * `LUL` - Luxembourg Financial Franc + // * `LUC` - Luxembourgian Convertible Franc + // * `LUF` - Luxembourgian Franc + // * `MOP` - Macanese Pataca + // * `MKD` - Macedonian Denar + // * `MKN` - Macedonian Denar (1992–1993) + // * `MGA` - Malagasy Ariary + // * `MGF` - Malagasy Franc + // * `MWK` - Malawian Kwacha + // * `MYR` - Malaysian Ringgit + // * `MVR` - Maldivian Rufiyaa + // * `MVP` - Maldivian Rupee (1947–1981) + // * `MLF` - Malian Franc + // * `MTL` - Maltese Lira + // * `MTP` - Maltese Pound + // * `MRU` - Mauritanian Ouguiya + // * `MRO` - Mauritanian Ouguiya (1973–2017) + // * `MUR` - Mauritian Rupee + // * `MXV` - Mexican Investment Unit + // * `MXN` - Mexican Peso + // * `MXP` - Mexican Silver Peso (1861–1992) + // * `MDC` - Moldovan Cupon + // * `MDL` - Moldovan Leu + // * `MCF` - Monegasque Franc + // * `MNT` - Mongolian Tugrik + // * `MAD` - Moroccan Dirham + // * `MAF` - Moroccan Franc + // * `MZE` - Mozambican Escudo + // * `MZN` - Mozambican Metical + // * `MZM` - Mozambican Metical (1980–2006) + // * `MMK` - Myanmar Kyat + // * `NAD` - Namibian Dollar + // * `NPR` - Nepalese Rupee + // * `ANG` - Netherlands Antillean Guilder + // * `TWD` - New Taiwan Dollar + // * `NZD` - New Zealand Dollar + // * `NIO` - Nicaraguan Córdoba + // * `NIC` - Nicaraguan Córdoba (1988–1991) + // * `NGN` - Nigerian Naira + // * `KPW` - North Korean Won + // * `NOK` - Norwegian Krone + // * `OMR` - Omani Rial + // * `PKR` - Pakistani Rupee + // * `XPD` - Palladium + // * `PAB` - Panamanian Balboa + // * `PGK` - Papua New Guinean Kina + // * `PYG` - Paraguayan Guarani + // * `PEI` - Peruvian Inti + // * `PEN` - Peruvian Sol + // * `PES` - Peruvian Sol (1863–1965) + // * `PHP` - Philippine Peso + // * `XPT` - Platinum + // * `PLN` - Polish Zloty + // * `PLZ` - Polish Zloty (1950–1995) + // * `PTE` - Portuguese Escudo + // * `GWE` - Portuguese Guinea Escudo + // * `QAR` - Qatari Rial + // * `XRE` - RINET Funds + // * `RHD` - Rhodesian Dollar + // * `RON` - Romanian Leu + // * `ROL` - Romanian Leu (1952–2006) + // * `RUB` - Russian Ruble + // * `RUR` - Russian Ruble (1991–1998) + // * `RWF` - Rwandan Franc + // * `SVC` - Salvadoran Colón + // * `WST` - Samoan Tala + // * `SAR` - Saudi Riyal + // * `RSD` - Serbian Dinar + // * `CSD` - Serbian Dinar (2002–2006) + // * `SCR` - Seychellois Rupee + // * `SLL` - Sierra Leonean Leone + // * `XAG` - Silver + // * `SGD` - Singapore Dollar + // * `SKK` - Slovak Koruna + // * `SIT` - Slovenian Tolar + // * `SBD` - Solomon Islands Dollar + // * `SOS` - Somali Shilling + // * `ZAR` - South African Rand + // * `ZAL` - South African Rand (financial) + // * `KRH` - South Korean Hwan (1953–1962) + // * `KRW` - South Korean Won + // * `KRO` - South Korean Won (1945–1953) + // * `SSP` - South Sudanese Pound + // * `SUR` - Soviet Rouble + // * `ESP` - Spanish Peseta + // * `ESA` - Spanish Peseta (A account) + // * `ESB` - Spanish Peseta (convertible account) + // * `XDR` - Special Drawing Rights + // * `LKR` - Sri Lankan Rupee + // * `SHP` - St. Helena Pound + // * `XSU` - Sucre + // * `SDD` - Sudanese Dinar (1992–2007) + // * `SDG` - Sudanese Pound + // * `SDP` - Sudanese Pound (1957–1998) + // * `SRD` - Surinamese Dollar + // * `SRG` - Surinamese Guilder + // * `SZL` - Swazi Lilangeni + // * `SEK` - Swedish Krona + // * `CHF` - Swiss Franc + // * `SYP` - Syrian Pound + // * `STN` - São Tomé & Príncipe Dobra + // * `STD` - São Tomé & Príncipe Dobra (1977–2017) + // * `TVD` - TVD + // * `TJR` - Tajikistani Ruble + // * `TJS` - Tajikistani Somoni + // * `TZS` - Tanzanian Shilling + // * `XTS` - Testing Currency Code + // * `THB` - Thai Baht + // * `XXX` - The codes assigned for transactions where no currency is involved + // * `TPE` - Timorese Escudo + // * `TOP` - Tongan Paʻanga + // * `TTD` - Trinidad & Tobago Dollar + // * `TND` - Tunisian Dinar + // * `TRY` - Turkish Lira + // * `TRL` - Turkish Lira (1922–2005) + // * `TMT` - Turkmenistani Manat + // * `TMM` - Turkmenistani Manat (1993–2009) + // * `USD` - US Dollar + // * `USN` - US Dollar (Next day) + // * `USS` - US Dollar (Same day) + // * `UGX` - Ugandan Shilling + // * `UGS` - Ugandan Shilling (1966–1987) + // * `UAH` - Ukrainian Hryvnia + // * `UAK` - Ukrainian Karbovanets + // * `AED` - United Arab Emirates Dirham + // * `UYW` - Uruguayan Nominal Wage Index Unit + // * `UYU` - Uruguayan Peso + // * `UYP` - Uruguayan Peso (1975–1993) + // * `UYI` - Uruguayan Peso (Indexed Units) + // * `UZS` - Uzbekistani Som + // * `VUV` - Vanuatu Vatu + // * `VES` - Venezuelan Bolívar + // * `VEB` - Venezuelan Bolívar (1871–2008) + // * `VEF` - Venezuelan Bolívar (2008–2018) + // * `VND` - Vietnamese Dong + // * `VNN` - Vietnamese Dong (1978–1985) + // * `CHE` - WIR Euro + // * `CHW` - WIR Franc + // * `XOF` - West African CFA Franc + // * `YDD` - Yemeni Dinar + // * `YER` - Yemeni Rial + // * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + // * `YUD` - Yugoslavian Hard Dinar (1966–1990) + // * `YUM` - Yugoslavian New Dinar (1994–2002) + // * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + // * `ZWN` - ZWN + // * `ZRN` - Zairean New Zaire (1993–1998) + // * `ZRZ` - Zairean Zaire (1971–1993) + // * `ZMW` - Zambian Kwacha + // * `ZMK` - Zambian Kwacha (1968–2012) + // * `ZWD` - Zimbabwean Dollar (1980–2008) + // * `ZWR` - Zimbabwean Dollar (2008) + // * `ZWL` - Zimbabwean Dollar (2009) + Currency *InvoiceRequestCurrency `json:"currency,omitempty" url:"currency,omitempty"` + // The invoice's exchange rate. + ExchangeRate *string `json:"exchange_rate,omitempty" url:"exchange_rate,omitempty"` + // The total discounts applied to the total cost. + TotalDiscount *float64 `json:"total_discount,omitempty" url:"total_discount,omitempty"` + // The total amount being paid before taxes. + SubTotal *float64 `json:"sub_total,omitempty" url:"sub_total,omitempty"` + // The payment term that applies to this transaction. + PaymentTerm *InvoiceRequestPaymentTerm `json:"payment_term,omitempty" url:"payment_term,omitempty"` + // The total amount being paid in taxes. + TotalTaxAmount *float64 `json:"total_tax_amount,omitempty" url:"total_tax_amount,omitempty"` + // If the transaction is inclusive or exclusive of tax. `True` if inclusive, `False` if exclusive. + InclusiveOfTax *bool `json:"inclusive_of_tax,omitempty" url:"inclusive_of_tax,omitempty"` + // The invoice's total amount. + TotalAmount *float64 `json:"total_amount,omitempty" url:"total_amount,omitempty"` + // The invoice's remaining balance. + Balance *float64 `json:"balance,omitempty" url:"balance,omitempty"` + // Array of `Payment` object IDs. + Payments []*InvoiceRequestPaymentsItem `json:"payments,omitempty" url:"payments,omitempty"` + TrackingCategories []*InvoiceRequestTrackingCategoriesItem `json:"tracking_categories,omitempty" url:"tracking_categories,omitempty"` + LineItems []*InvoiceLineItemRequest `json:"line_items,omitempty" url:"line_items,omitempty"` + PurchaseOrders []*InvoiceRequestPurchaseOrdersItem `json:"purchase_orders,omitempty" url:"purchase_orders,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + RemoteFields []*RemoteFieldRequest `json:"remote_fields,omitempty" url:"remote_fields,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (i *InvoiceRequest) GetType() *InvoiceRequestType { + if i == nil { + return nil + } + return i.Type +} + +func (i *InvoiceRequest) GetContact() *InvoiceRequestContact { + if i == nil { + return nil + } + return i.Contact +} + +func (i *InvoiceRequest) GetNumber() *string { + if i == nil { + return nil + } + return i.Number +} + +func (i *InvoiceRequest) GetIssueDate() *time.Time { + if i == nil { + return nil + } + return i.IssueDate +} + +func (i *InvoiceRequest) GetDueDate() *time.Time { + if i == nil { + return nil + } + return i.DueDate +} + +func (i *InvoiceRequest) GetPaidOnDate() *time.Time { + if i == nil { + return nil + } + return i.PaidOnDate +} + +func (i *InvoiceRequest) GetEmployee() *InvoiceRequestEmployee { + if i == nil { + return nil + } + return i.Employee +} + +func (i *InvoiceRequest) GetMemo() *string { + if i == nil { + return nil + } + return i.Memo +} + +func (i *InvoiceRequest) GetStatus() *InvoiceRequestStatus { + if i == nil { + return nil + } + return i.Status +} + +func (i *InvoiceRequest) GetCompany() *InvoiceRequestCompany { + if i == nil { + return nil + } + return i.Company +} + +func (i *InvoiceRequest) GetCurrency() *InvoiceRequestCurrency { + if i == nil { + return nil + } + return i.Currency +} + +func (i *InvoiceRequest) GetExchangeRate() *string { + if i == nil { + return nil + } + return i.ExchangeRate +} + +func (i *InvoiceRequest) GetTotalDiscount() *float64 { + if i == nil { + return nil + } + return i.TotalDiscount +} + +func (i *InvoiceRequest) GetSubTotal() *float64 { + if i == nil { + return nil + } + return i.SubTotal +} + +func (i *InvoiceRequest) GetPaymentTerm() *InvoiceRequestPaymentTerm { + if i == nil { + return nil + } + return i.PaymentTerm +} + +func (i *InvoiceRequest) GetTotalTaxAmount() *float64 { + if i == nil { + return nil + } + return i.TotalTaxAmount +} + +func (i *InvoiceRequest) GetInclusiveOfTax() *bool { + if i == nil { + return nil + } + return i.InclusiveOfTax +} + +func (i *InvoiceRequest) GetTotalAmount() *float64 { + if i == nil { + return nil + } + return i.TotalAmount +} + +func (i *InvoiceRequest) GetBalance() *float64 { + if i == nil { + return nil + } + return i.Balance +} + +func (i *InvoiceRequest) GetPayments() []*InvoiceRequestPaymentsItem { + if i == nil { + return nil + } + return i.Payments +} + +func (i *InvoiceRequest) GetTrackingCategories() []*InvoiceRequestTrackingCategoriesItem { + if i == nil { + return nil + } + return i.TrackingCategories +} + +func (i *InvoiceRequest) GetLineItems() []*InvoiceLineItemRequest { + if i == nil { + return nil + } + return i.LineItems +} + +func (i *InvoiceRequest) GetPurchaseOrders() []*InvoiceRequestPurchaseOrdersItem { + if i == nil { + return nil + } + return i.PurchaseOrders +} + +func (i *InvoiceRequest) GetIntegrationParams() map[string]interface{} { + if i == nil { + return nil + } + return i.IntegrationParams +} + +func (i *InvoiceRequest) GetLinkedAccountParams() map[string]interface{} { + if i == nil { + return nil + } + return i.LinkedAccountParams +} + +func (i *InvoiceRequest) GetRemoteFields() []*RemoteFieldRequest { + if i == nil { + return nil + } + return i.RemoteFields +} + +func (i *InvoiceRequest) GetExtraProperties() map[string]interface{} { + return i.extraProperties +} + +func (i *InvoiceRequest) UnmarshalJSON(data []byte) error { + type embed InvoiceRequest + var unmarshaler = struct { + embed + IssueDate *internal.DateTime `json:"issue_date,omitempty"` + DueDate *internal.DateTime `json:"due_date,omitempty"` + PaidOnDate *internal.DateTime `json:"paid_on_date,omitempty"` + }{ + embed: embed(*i), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *i = InvoiceRequest(unmarshaler.embed) + i.IssueDate = unmarshaler.IssueDate.TimePtr() + i.DueDate = unmarshaler.DueDate.TimePtr() + i.PaidOnDate = unmarshaler.PaidOnDate.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *i) + if err != nil { + return err + } + i.extraProperties = extraProperties + i.rawJSON = json.RawMessage(data) + return nil +} + +func (i *InvoiceRequest) MarshalJSON() ([]byte, error) { + type embed InvoiceRequest + var marshaler = struct { + embed + IssueDate *internal.DateTime `json:"issue_date,omitempty"` + DueDate *internal.DateTime `json:"due_date,omitempty"` + PaidOnDate *internal.DateTime `json:"paid_on_date,omitempty"` + }{ + embed: embed(*i), + IssueDate: internal.NewOptionalDateTime(i.IssueDate), + DueDate: internal.NewOptionalDateTime(i.DueDate), + PaidOnDate: internal.NewOptionalDateTime(i.PaidOnDate), + } + return json.Marshal(marshaler) +} + +func (i *InvoiceRequest) String() string { + if len(i.rawJSON) > 0 { + if value, err := internal.StringifyJSON(i.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(i); err == nil { + return value + } + return fmt.Sprintf("%#v", i) +} + +// The company the invoice belongs to. +type InvoiceRequestCompany struct { + String string + CompanyInfo *CompanyInfo + + typ string +} + +func (i *InvoiceRequestCompany) GetString() string { + if i == nil { + return "" + } + return i.String +} + +func (i *InvoiceRequestCompany) GetCompanyInfo() *CompanyInfo { + if i == nil { + return nil + } + return i.CompanyInfo +} + +func (i *InvoiceRequestCompany) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + i.typ = "String" + i.String = valueString + return nil + } + valueCompanyInfo := new(CompanyInfo) + if err := json.Unmarshal(data, &valueCompanyInfo); err == nil { + i.typ = "CompanyInfo" + i.CompanyInfo = valueCompanyInfo + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) +} + +func (i InvoiceRequestCompany) MarshalJSON() ([]byte, error) { + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) + } + if i.typ == "CompanyInfo" || i.CompanyInfo != nil { + return json.Marshal(i.CompanyInfo) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) +} + +type InvoiceRequestCompanyVisitor interface { + VisitString(string) error + VisitCompanyInfo(*CompanyInfo) error +} + +func (i *InvoiceRequestCompany) Accept(visitor InvoiceRequestCompanyVisitor) error { + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) + } + if i.typ == "CompanyInfo" || i.CompanyInfo != nil { + return visitor.VisitCompanyInfo(i.CompanyInfo) + } + return fmt.Errorf("type %T does not include a non-empty union type", i) +} + +// The invoice's contact. +type InvoiceRequestContact struct { + String string + Contact *Contact + + typ string +} + +func (i *InvoiceRequestContact) GetString() string { + if i == nil { + return "" + } + return i.String +} + +func (i *InvoiceRequestContact) GetContact() *Contact { + if i == nil { + return nil + } + return i.Contact +} + +func (i *InvoiceRequestContact) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + i.typ = "String" + i.String = valueString + return nil + } + valueContact := new(Contact) + if err := json.Unmarshal(data, &valueContact); err == nil { + i.typ = "Contact" + i.Contact = valueContact + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) +} + +func (i InvoiceRequestContact) MarshalJSON() ([]byte, error) { + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) + } + if i.typ == "Contact" || i.Contact != nil { + return json.Marshal(i.Contact) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) +} + +type InvoiceRequestContactVisitor interface { + VisitString(string) error + VisitContact(*Contact) error +} + +func (i *InvoiceRequestContact) Accept(visitor InvoiceRequestContactVisitor) error { + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) + } + if i.typ == "Contact" || i.Contact != nil { + return visitor.VisitContact(i.Contact) + } + return fmt.Errorf("type %T does not include a non-empty union type", i) +} + +// The invoice's currency. +// +// * `XUA` - ADB Unit of Account +// * `AFN` - Afghan Afghani +// * `AFA` - Afghan Afghani (1927–2002) +// * `ALL` - Albanian Lek +// * `ALK` - Albanian Lek (1946–1965) +// * `DZD` - Algerian Dinar +// * `ADP` - Andorran Peseta +// * `AOA` - Angolan Kwanza +// * `AOK` - Angolan Kwanza (1977–1991) +// * `AON` - Angolan New Kwanza (1990–2000) +// * `AOR` - Angolan Readjusted Kwanza (1995–1999) +// * `ARA` - Argentine Austral +// * `ARS` - Argentine Peso +// * `ARM` - Argentine Peso (1881–1970) +// * `ARP` - Argentine Peso (1983–1985) +// * `ARL` - Argentine Peso Ley (1970–1983) +// * `AMD` - Armenian Dram +// * `AWG` - Aruban Florin +// * `AUD` - Australian Dollar +// * `ATS` - Austrian Schilling +// * `AZN` - Azerbaijani Manat +// * `AZM` - Azerbaijani Manat (1993–2006) +// * `BSD` - Bahamian Dollar +// * `BHD` - Bahraini Dinar +// * `BDT` - Bangladeshi Taka +// * `BBD` - Barbadian Dollar +// * `BYN` - Belarusian Ruble +// * `BYB` - Belarusian Ruble (1994–1999) +// * `BYR` - Belarusian Ruble (2000–2016) +// * `BEF` - Belgian Franc +// * `BEC` - Belgian Franc (convertible) +// * `BEL` - Belgian Franc (financial) +// * `BZD` - Belize Dollar +// * `BMD` - Bermudan Dollar +// * `BTN` - Bhutanese Ngultrum +// * `BOB` - Bolivian Boliviano +// * `BOL` - Bolivian Boliviano (1863–1963) +// * `BOV` - Bolivian Mvdol +// * `BOP` - Bolivian Peso +// * `BAM` - Bosnia-Herzegovina Convertible Mark +// * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) +// * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) +// * `BWP` - Botswanan Pula +// * `BRC` - Brazilian Cruzado (1986–1989) +// * `BRZ` - Brazilian Cruzeiro (1942–1967) +// * `BRE` - Brazilian Cruzeiro (1990–1993) +// * `BRR` - Brazilian Cruzeiro (1993–1994) +// * `BRN` - Brazilian New Cruzado (1989–1990) +// * `BRB` - Brazilian New Cruzeiro (1967–1986) +// * `BRL` - Brazilian Real +// * `GBP` - British Pound +// * `BND` - Brunei Dollar +// * `BGL` - Bulgarian Hard Lev +// * `BGN` - Bulgarian Lev +// * `BGO` - Bulgarian Lev (1879–1952) +// * `BGM` - Bulgarian Socialist Lev +// * `BUK` - Burmese Kyat +// * `BIF` - Burundian Franc +// * `XPF` - CFP Franc +// * `KHR` - Cambodian Riel +// * `CAD` - Canadian Dollar +// * `CVE` - Cape Verdean Escudo +// * `KYD` - Cayman Islands Dollar +// * `XAF` - Central African CFA Franc +// * `CLE` - Chilean Escudo +// * `CLP` - Chilean Peso +// * `CLF` - Chilean Unit of Account (UF) +// * `CNX` - Chinese People’s Bank Dollar +// * `CNY` - Chinese Yuan +// * `CNH` - Chinese Yuan (offshore) +// * `COP` - Colombian Peso +// * `COU` - Colombian Real Value Unit +// * `KMF` - Comorian Franc +// * `CDF` - Congolese Franc +// * `CRC` - Costa Rican Colón +// * `HRD` - Croatian Dinar +// * `HRK` - Croatian Kuna +// * `CUC` - Cuban Convertible Peso +// * `CUP` - Cuban Peso +// * `CYP` - Cypriot Pound +// * `CZK` - Czech Koruna +// * `CSK` - Czechoslovak Hard Koruna +// * `DKK` - Danish Krone +// * `DJF` - Djiboutian Franc +// * `DOP` - Dominican Peso +// * `NLG` - Dutch Guilder +// * `XCD` - East Caribbean Dollar +// * `DDM` - East German Mark +// * `ECS` - Ecuadorian Sucre +// * `ECV` - Ecuadorian Unit of Constant Value +// * `EGP` - Egyptian Pound +// * `GQE` - Equatorial Guinean Ekwele +// * `ERN` - Eritrean Nakfa +// * `EEK` - Estonian Kroon +// * `ETB` - Ethiopian Birr +// * `EUR` - Euro +// * `XBA` - European Composite Unit +// * `XEU` - European Currency Unit +// * `XBB` - European Monetary Unit +// * `XBC` - European Unit of Account (XBC) +// * `XBD` - European Unit of Account (XBD) +// * `FKP` - Falkland Islands Pound +// * `FJD` - Fijian Dollar +// * `FIM` - Finnish Markka +// * `FRF` - French Franc +// * `XFO` - French Gold Franc +// * `XFU` - French UIC-Franc +// * `GMD` - Gambian Dalasi +// * `GEK` - Georgian Kupon Larit +// * `GEL` - Georgian Lari +// * `DEM` - German Mark +// * `GHS` - Ghanaian Cedi +// * `GHC` - Ghanaian Cedi (1979–2007) +// * `GIP` - Gibraltar Pound +// * `XAU` - Gold +// * `GRD` - Greek Drachma +// * `GTQ` - Guatemalan Quetzal +// * `GWP` - Guinea-Bissau Peso +// * `GNF` - Guinean Franc +// * `GNS` - Guinean Syli +// * `GYD` - Guyanaese Dollar +// * `HTG` - Haitian Gourde +// * `HNL` - Honduran Lempira +// * `HKD` - Hong Kong Dollar +// * `HUF` - Hungarian Forint +// * `IMP` - IMP +// * `ISK` - Icelandic Króna +// * `ISJ` - Icelandic Króna (1918–1981) +// * `INR` - Indian Rupee +// * `IDR` - Indonesian Rupiah +// * `IRR` - Iranian Rial +// * `IQD` - Iraqi Dinar +// * `IEP` - Irish Pound +// * `ILS` - Israeli New Shekel +// * `ILP` - Israeli Pound +// * `ILR` - Israeli Shekel (1980–1985) +// * `ITL` - Italian Lira +// * `JMD` - Jamaican Dollar +// * `JPY` - Japanese Yen +// * `JOD` - Jordanian Dinar +// * `KZT` - Kazakhstani Tenge +// * `KES` - Kenyan Shilling +// * `KWD` - Kuwaiti Dinar +// * `KGS` - Kyrgystani Som +// * `LAK` - Laotian Kip +// * `LVL` - Latvian Lats +// * `LVR` - Latvian Ruble +// * `LBP` - Lebanese Pound +// * `LSL` - Lesotho Loti +// * `LRD` - Liberian Dollar +// * `LYD` - Libyan Dinar +// * `LTL` - Lithuanian Litas +// * `LTT` - Lithuanian Talonas +// * `LUL` - Luxembourg Financial Franc +// * `LUC` - Luxembourgian Convertible Franc +// * `LUF` - Luxembourgian Franc +// * `MOP` - Macanese Pataca +// * `MKD` - Macedonian Denar +// * `MKN` - Macedonian Denar (1992–1993) +// * `MGA` - Malagasy Ariary +// * `MGF` - Malagasy Franc +// * `MWK` - Malawian Kwacha +// * `MYR` - Malaysian Ringgit +// * `MVR` - Maldivian Rufiyaa +// * `MVP` - Maldivian Rupee (1947–1981) +// * `MLF` - Malian Franc +// * `MTL` - Maltese Lira +// * `MTP` - Maltese Pound +// * `MRU` - Mauritanian Ouguiya +// * `MRO` - Mauritanian Ouguiya (1973–2017) +// * `MUR` - Mauritian Rupee +// * `MXV` - Mexican Investment Unit +// * `MXN` - Mexican Peso +// * `MXP` - Mexican Silver Peso (1861–1992) +// * `MDC` - Moldovan Cupon +// * `MDL` - Moldovan Leu +// * `MCF` - Monegasque Franc +// * `MNT` - Mongolian Tugrik +// * `MAD` - Moroccan Dirham +// * `MAF` - Moroccan Franc +// * `MZE` - Mozambican Escudo +// * `MZN` - Mozambican Metical +// * `MZM` - Mozambican Metical (1980–2006) +// * `MMK` - Myanmar Kyat +// * `NAD` - Namibian Dollar +// * `NPR` - Nepalese Rupee +// * `ANG` - Netherlands Antillean Guilder +// * `TWD` - New Taiwan Dollar +// * `NZD` - New Zealand Dollar +// * `NIO` - Nicaraguan Córdoba +// * `NIC` - Nicaraguan Córdoba (1988–1991) +// * `NGN` - Nigerian Naira +// * `KPW` - North Korean Won +// * `NOK` - Norwegian Krone +// * `OMR` - Omani Rial +// * `PKR` - Pakistani Rupee +// * `XPD` - Palladium +// * `PAB` - Panamanian Balboa +// * `PGK` - Papua New Guinean Kina +// * `PYG` - Paraguayan Guarani +// * `PEI` - Peruvian Inti +// * `PEN` - Peruvian Sol +// * `PES` - Peruvian Sol (1863–1965) +// * `PHP` - Philippine Peso +// * `XPT` - Platinum +// * `PLN` - Polish Zloty +// * `PLZ` - Polish Zloty (1950–1995) +// * `PTE` - Portuguese Escudo +// * `GWE` - Portuguese Guinea Escudo +// * `QAR` - Qatari Rial +// * `XRE` - RINET Funds +// * `RHD` - Rhodesian Dollar +// * `RON` - Romanian Leu +// * `ROL` - Romanian Leu (1952–2006) +// * `RUB` - Russian Ruble +// * `RUR` - Russian Ruble (1991–1998) +// * `RWF` - Rwandan Franc +// * `SVC` - Salvadoran Colón +// * `WST` - Samoan Tala +// * `SAR` - Saudi Riyal +// * `RSD` - Serbian Dinar +// * `CSD` - Serbian Dinar (2002–2006) +// * `SCR` - Seychellois Rupee +// * `SLL` - Sierra Leonean Leone +// * `XAG` - Silver +// * `SGD` - Singapore Dollar +// * `SKK` - Slovak Koruna +// * `SIT` - Slovenian Tolar +// * `SBD` - Solomon Islands Dollar +// * `SOS` - Somali Shilling +// * `ZAR` - South African Rand +// * `ZAL` - South African Rand (financial) +// * `KRH` - South Korean Hwan (1953–1962) +// * `KRW` - South Korean Won +// * `KRO` - South Korean Won (1945–1953) +// * `SSP` - South Sudanese Pound +// * `SUR` - Soviet Rouble +// * `ESP` - Spanish Peseta +// * `ESA` - Spanish Peseta (A account) +// * `ESB` - Spanish Peseta (convertible account) +// * `XDR` - Special Drawing Rights +// * `LKR` - Sri Lankan Rupee +// * `SHP` - St. Helena Pound +// * `XSU` - Sucre +// * `SDD` - Sudanese Dinar (1992–2007) +// * `SDG` - Sudanese Pound +// * `SDP` - Sudanese Pound (1957–1998) +// * `SRD` - Surinamese Dollar +// * `SRG` - Surinamese Guilder +// * `SZL` - Swazi Lilangeni +// * `SEK` - Swedish Krona +// * `CHF` - Swiss Franc +// * `SYP` - Syrian Pound +// * `STN` - São Tomé & Príncipe Dobra +// * `STD` - São Tomé & Príncipe Dobra (1977–2017) +// * `TVD` - TVD +// * `TJR` - Tajikistani Ruble +// * `TJS` - Tajikistani Somoni +// * `TZS` - Tanzanian Shilling +// * `XTS` - Testing Currency Code +// * `THB` - Thai Baht +// * `XXX` - The codes assigned for transactions where no currency is involved +// * `TPE` - Timorese Escudo +// * `TOP` - Tongan Paʻanga +// * `TTD` - Trinidad & Tobago Dollar +// * `TND` - Tunisian Dinar +// * `TRY` - Turkish Lira +// * `TRL` - Turkish Lira (1922–2005) +// * `TMT` - Turkmenistani Manat +// * `TMM` - Turkmenistani Manat (1993–2009) +// * `USD` - US Dollar +// * `USN` - US Dollar (Next day) +// * `USS` - US Dollar (Same day) +// * `UGX` - Ugandan Shilling +// * `UGS` - Ugandan Shilling (1966–1987) +// * `UAH` - Ukrainian Hryvnia +// * `UAK` - Ukrainian Karbovanets +// * `AED` - United Arab Emirates Dirham +// * `UYW` - Uruguayan Nominal Wage Index Unit +// * `UYU` - Uruguayan Peso +// * `UYP` - Uruguayan Peso (1975–1993) +// * `UYI` - Uruguayan Peso (Indexed Units) +// * `UZS` - Uzbekistani Som +// * `VUV` - Vanuatu Vatu +// * `VES` - Venezuelan Bolívar +// * `VEB` - Venezuelan Bolívar (1871–2008) +// * `VEF` - Venezuelan Bolívar (2008–2018) +// * `VND` - Vietnamese Dong +// * `VNN` - Vietnamese Dong (1978–1985) +// * `CHE` - WIR Euro +// * `CHW` - WIR Franc +// * `XOF` - West African CFA Franc +// * `YDD` - Yemeni Dinar +// * `YER` - Yemeni Rial +// * `YUN` - Yugoslavian Convertible Dinar (1990–1992) +// * `YUD` - Yugoslavian Hard Dinar (1966–1990) +// * `YUM` - Yugoslavian New Dinar (1994–2002) +// * `YUR` - Yugoslavian Reformed Dinar (1992–1993) +// * `ZWN` - ZWN +// * `ZRN` - Zairean New Zaire (1993–1998) +// * `ZRZ` - Zairean Zaire (1971–1993) +// * `ZMW` - Zambian Kwacha +// * `ZMK` - Zambian Kwacha (1968–2012) +// * `ZWD` - Zimbabwean Dollar (1980–2008) +// * `ZWR` - Zimbabwean Dollar (2008) +// * `ZWL` - Zimbabwean Dollar (2009) +type InvoiceRequestCurrency struct { + TransactionCurrencyEnum TransactionCurrencyEnum + String string + + typ string +} + +func (i *InvoiceRequestCurrency) GetTransactionCurrencyEnum() TransactionCurrencyEnum { + if i == nil { + return "" + } + return i.TransactionCurrencyEnum +} + +func (i *InvoiceRequestCurrency) GetString() string { + if i == nil { + return "" + } + return i.String +} + +func (i *InvoiceRequestCurrency) UnmarshalJSON(data []byte) error { + var valueTransactionCurrencyEnum TransactionCurrencyEnum + if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { + i.typ = "TransactionCurrencyEnum" + i.TransactionCurrencyEnum = valueTransactionCurrencyEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + i.typ = "String" + i.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) +} + +func (i InvoiceRequestCurrency) MarshalJSON() ([]byte, error) { + if i.typ == "TransactionCurrencyEnum" || i.TransactionCurrencyEnum != "" { + return json.Marshal(i.TransactionCurrencyEnum) + } + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) +} + +type InvoiceRequestCurrencyVisitor interface { + VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error + VisitString(string) error +} + +func (i *InvoiceRequestCurrency) Accept(visitor InvoiceRequestCurrencyVisitor) error { + if i.typ == "TransactionCurrencyEnum" || i.TransactionCurrencyEnum != "" { + return visitor.VisitTransactionCurrencyEnum(i.TransactionCurrencyEnum) + } + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", i) +} + +// The employee this overall transaction relates to. +type InvoiceRequestEmployee struct { + String string + Employee *Employee + + typ string +} + +func (i *InvoiceRequestEmployee) GetString() string { + if i == nil { + return "" + } + return i.String +} + +func (i *InvoiceRequestEmployee) GetEmployee() *Employee { + if i == nil { + return nil + } + return i.Employee +} + +func (i *InvoiceRequestEmployee) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + i.typ = "String" + i.String = valueString + return nil + } + valueEmployee := new(Employee) + if err := json.Unmarshal(data, &valueEmployee); err == nil { + i.typ = "Employee" + i.Employee = valueEmployee + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) +} + +func (i InvoiceRequestEmployee) MarshalJSON() ([]byte, error) { + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) + } + if i.typ == "Employee" || i.Employee != nil { + return json.Marshal(i.Employee) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) +} + +type InvoiceRequestEmployeeVisitor interface { + VisitString(string) error + VisitEmployee(*Employee) error +} + +func (i *InvoiceRequestEmployee) Accept(visitor InvoiceRequestEmployeeVisitor) error { + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) + } + if i.typ == "Employee" || i.Employee != nil { + return visitor.VisitEmployee(i.Employee) + } + return fmt.Errorf("type %T does not include a non-empty union type", i) +} + +// The payment term that applies to this transaction. +type InvoiceRequestPaymentTerm struct { + String string + PaymentTerm *PaymentTerm + + typ string +} + +func (i *InvoiceRequestPaymentTerm) GetString() string { + if i == nil { + return "" + } + return i.String +} + +func (i *InvoiceRequestPaymentTerm) GetPaymentTerm() *PaymentTerm { + if i == nil { + return nil + } + return i.PaymentTerm +} + +func (i *InvoiceRequestPaymentTerm) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + i.typ = "String" + i.String = valueString + return nil + } + valuePaymentTerm := new(PaymentTerm) + if err := json.Unmarshal(data, &valuePaymentTerm); err == nil { + i.typ = "PaymentTerm" + i.PaymentTerm = valuePaymentTerm + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) +} + +func (i InvoiceRequestPaymentTerm) MarshalJSON() ([]byte, error) { + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) + } + if i.typ == "PaymentTerm" || i.PaymentTerm != nil { + return json.Marshal(i.PaymentTerm) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) +} + +type InvoiceRequestPaymentTermVisitor interface { + VisitString(string) error + VisitPaymentTerm(*PaymentTerm) error +} + +func (i *InvoiceRequestPaymentTerm) Accept(visitor InvoiceRequestPaymentTermVisitor) error { + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) + } + if i.typ == "PaymentTerm" || i.PaymentTerm != nil { + return visitor.VisitPaymentTerm(i.PaymentTerm) + } + return fmt.Errorf("type %T does not include a non-empty union type", i) +} + +type InvoiceRequestPaymentsItem struct { + String string + Payment *Payment + + typ string +} + +func (i *InvoiceRequestPaymentsItem) GetString() string { + if i == nil { + return "" + } + return i.String +} + +func (i *InvoiceRequestPaymentsItem) GetPayment() *Payment { + if i == nil { + return nil + } + return i.Payment +} + +func (i *InvoiceRequestPaymentsItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + i.typ = "String" + i.String = valueString + return nil + } + valuePayment := new(Payment) + if err := json.Unmarshal(data, &valuePayment); err == nil { + i.typ = "Payment" + i.Payment = valuePayment + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) +} + +func (i InvoiceRequestPaymentsItem) MarshalJSON() ([]byte, error) { + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) + } + if i.typ == "Payment" || i.Payment != nil { + return json.Marshal(i.Payment) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) +} + +type InvoiceRequestPaymentsItemVisitor interface { + VisitString(string) error + VisitPayment(*Payment) error +} + +func (i *InvoiceRequestPaymentsItem) Accept(visitor InvoiceRequestPaymentsItemVisitor) error { + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) + } + if i.typ == "Payment" || i.Payment != nil { + return visitor.VisitPayment(i.Payment) + } + return fmt.Errorf("type %T does not include a non-empty union type", i) +} + +type InvoiceRequestPurchaseOrdersItem struct { + String string + PurchaseOrder *PurchaseOrder + + typ string +} + +func (i *InvoiceRequestPurchaseOrdersItem) GetString() string { + if i == nil { + return "" + } + return i.String +} + +func (i *InvoiceRequestPurchaseOrdersItem) GetPurchaseOrder() *PurchaseOrder { + if i == nil { + return nil + } + return i.PurchaseOrder +} + +func (i *InvoiceRequestPurchaseOrdersItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + i.typ = "String" + i.String = valueString + return nil + } + valuePurchaseOrder := new(PurchaseOrder) + if err := json.Unmarshal(data, &valuePurchaseOrder); err == nil { + i.typ = "PurchaseOrder" + i.PurchaseOrder = valuePurchaseOrder + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) +} + +func (i InvoiceRequestPurchaseOrdersItem) MarshalJSON() ([]byte, error) { + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) + } + if i.typ == "PurchaseOrder" || i.PurchaseOrder != nil { + return json.Marshal(i.PurchaseOrder) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) +} + +type InvoiceRequestPurchaseOrdersItemVisitor interface { + VisitString(string) error + VisitPurchaseOrder(*PurchaseOrder) error +} + +func (i *InvoiceRequestPurchaseOrdersItem) Accept(visitor InvoiceRequestPurchaseOrdersItemVisitor) error { + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) + } + if i.typ == "PurchaseOrder" || i.PurchaseOrder != nil { + return visitor.VisitPurchaseOrder(i.PurchaseOrder) + } + return fmt.Errorf("type %T does not include a non-empty union type", i) +} + +// The status of the invoice. +// +// * `PAID` - PAID +// * `DRAFT` - DRAFT +// * `SUBMITTED` - SUBMITTED +// * `PARTIALLY_PAID` - PARTIALLY_PAID +// * `OPEN` - OPEN +// * `VOID` - VOID +type InvoiceRequestStatus struct { + InvoiceStatusEnum InvoiceStatusEnum + String string + + typ string +} + +func (i *InvoiceRequestStatus) GetInvoiceStatusEnum() InvoiceStatusEnum { + if i == nil { + return "" + } + return i.InvoiceStatusEnum +} + +func (i *InvoiceRequestStatus) GetString() string { + if i == nil { + return "" + } + return i.String +} + +func (i *InvoiceRequestStatus) UnmarshalJSON(data []byte) error { + var valueInvoiceStatusEnum InvoiceStatusEnum + if err := json.Unmarshal(data, &valueInvoiceStatusEnum); err == nil { + i.typ = "InvoiceStatusEnum" + i.InvoiceStatusEnum = valueInvoiceStatusEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + i.typ = "String" + i.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) +} + +func (i InvoiceRequestStatus) MarshalJSON() ([]byte, error) { + if i.typ == "InvoiceStatusEnum" || i.InvoiceStatusEnum != "" { + return json.Marshal(i.InvoiceStatusEnum) + } + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) +} + +type InvoiceRequestStatusVisitor interface { + VisitInvoiceStatusEnum(InvoiceStatusEnum) error + VisitString(string) error +} + +func (i *InvoiceRequestStatus) Accept(visitor InvoiceRequestStatusVisitor) error { + if i.typ == "InvoiceStatusEnum" || i.InvoiceStatusEnum != "" { + return visitor.VisitInvoiceStatusEnum(i.InvoiceStatusEnum) + } + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", i) +} + +type InvoiceRequestTrackingCategoriesItem struct { + String string + TrackingCategory *TrackingCategory + + typ string +} + +func (i *InvoiceRequestTrackingCategoriesItem) GetString() string { + if i == nil { + return "" + } + return i.String +} + +func (i *InvoiceRequestTrackingCategoriesItem) GetTrackingCategory() *TrackingCategory { + if i == nil { + return nil + } + return i.TrackingCategory +} + +func (i *InvoiceRequestTrackingCategoriesItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + i.typ = "String" + i.String = valueString + return nil + } + valueTrackingCategory := new(TrackingCategory) + if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { + i.typ = "TrackingCategory" + i.TrackingCategory = valueTrackingCategory + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) +} + +func (i InvoiceRequestTrackingCategoriesItem) MarshalJSON() ([]byte, error) { + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) + } + if i.typ == "TrackingCategory" || i.TrackingCategory != nil { + return json.Marshal(i.TrackingCategory) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) +} + +type InvoiceRequestTrackingCategoriesItemVisitor interface { + VisitString(string) error + VisitTrackingCategory(*TrackingCategory) error +} + +func (i *InvoiceRequestTrackingCategoriesItem) Accept(visitor InvoiceRequestTrackingCategoriesItemVisitor) error { + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) + } + if i.typ == "TrackingCategory" || i.TrackingCategory != nil { + return visitor.VisitTrackingCategory(i.TrackingCategory) + } + return fmt.Errorf("type %T does not include a non-empty union type", i) +} + +// 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. +// +// * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE +// * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE +type InvoiceRequestType struct { + InvoiceTypeEnum InvoiceTypeEnum + String string + + typ string +} + +func (i *InvoiceRequestType) GetInvoiceTypeEnum() InvoiceTypeEnum { + if i == nil { + return "" + } + return i.InvoiceTypeEnum +} + +func (i *InvoiceRequestType) GetString() string { + if i == nil { + return "" + } + return i.String +} + +func (i *InvoiceRequestType) UnmarshalJSON(data []byte) error { + var valueInvoiceTypeEnum InvoiceTypeEnum + if err := json.Unmarshal(data, &valueInvoiceTypeEnum); err == nil { + i.typ = "InvoiceTypeEnum" + i.InvoiceTypeEnum = valueInvoiceTypeEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + i.typ = "String" + i.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) +} + +func (i InvoiceRequestType) MarshalJSON() ([]byte, error) { + if i.typ == "InvoiceTypeEnum" || i.InvoiceTypeEnum != "" { + return json.Marshal(i.InvoiceTypeEnum) + } + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) +} + +type InvoiceRequestTypeVisitor interface { + VisitInvoiceTypeEnum(InvoiceTypeEnum) error + VisitString(string) error +} + +func (i *InvoiceRequestType) Accept(visitor InvoiceRequestTypeVisitor) error { + if i.typ == "InvoiceTypeEnum" || i.InvoiceTypeEnum != "" { + return visitor.VisitInvoiceTypeEnum(i.InvoiceTypeEnum) + } + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", i) +} + +type InvoiceResponse struct { + Model *Invoice `json:"model" url:"model"` + Warnings []*WarningValidationProblem `json:"warnings" url:"warnings"` + Errors []*ErrorValidationProblem `json:"errors" url:"errors"` + Logs []*DebugModeLog `json:"logs,omitempty" url:"logs,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (i *InvoiceResponse) GetModel() *Invoice { + if i == nil { + return nil + } + return i.Model +} + +func (i *InvoiceResponse) GetWarnings() []*WarningValidationProblem { + if i == nil { + return nil + } + return i.Warnings +} + +func (i *InvoiceResponse) GetErrors() []*ErrorValidationProblem { + if i == nil { + return nil + } + return i.Errors +} + +func (i *InvoiceResponse) GetLogs() []*DebugModeLog { + if i == nil { + return nil + } + return i.Logs +} + +func (i *InvoiceResponse) GetExtraProperties() map[string]interface{} { + return i.extraProperties +} + +func (i *InvoiceResponse) UnmarshalJSON(data []byte) error { + type unmarshaler InvoiceResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *i = InvoiceResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *i) + if err != nil { + return err + } + i.extraProperties = extraProperties + i.rawJSON = json.RawMessage(data) + return nil +} + +func (i *InvoiceResponse) String() string { + if len(i.rawJSON) > 0 { + if value, err := internal.StringifyJSON(i.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(i); err == nil { + return value + } + return fmt.Sprintf("%#v", i) +} + +type PaginatedInvoiceList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Invoice `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedInvoiceList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedInvoiceList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedInvoiceList) GetResults() []*Invoice { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedInvoiceList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedInvoiceList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedInvoiceList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedInvoiceList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedInvoiceList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} diff --git a/accounting/invoices/client.go b/accounting/invoices/client.go index e4c43b2..f302cc9 100644 --- a/accounting/invoices/client.go +++ b/accounting/invoices/client.go @@ -1,155 +1,137 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package invoices import ( context "context" fmt "fmt" - accounting "github.com/merge-api/merge-go-client/accounting" - core "github.com/merge-api/merge-go-client/core" + accounting "github.com/merge-api/merge-go-client/v2/accounting" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `Invoice` objects. -func (c *Client) List(ctx context.Context, request *accounting.InvoicesListRequest) (*accounting.PaginatedInvoiceList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/invoices" - - queryParams := make(url.Values) - if request.CompanyId != nil { - queryParams.Add("company_id", fmt.Sprintf("%v", *request.CompanyId)) - } - if request.ContactId != nil { - queryParams.Add("contact_id", fmt.Sprintf("%v", *request.ContactId)) - } - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeRemoteFields != nil { - queryParams.Add("include_remote_fields", fmt.Sprintf("%v", *request.IncludeRemoteFields)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.IssueDateAfter != nil { - queryParams.Add("issue_date_after", fmt.Sprintf("%v", request.IssueDateAfter.Format(time.RFC3339))) - } - if request.IssueDateBefore != nil { - queryParams.Add("issue_date_before", fmt.Sprintf("%v", request.IssueDateBefore.Format(time.RFC3339))) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.Number != nil { - queryParams.Add("number", fmt.Sprintf("%v", *request.Number)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteFields != nil { - queryParams.Add("remote_fields", fmt.Sprintf("%v", request.RemoteFields)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if request.ShowEnumOrigins != nil { - queryParams.Add("show_enum_origins", fmt.Sprintf("%v", request.ShowEnumOrigins)) - } - if request.Status != nil { - queryParams.Add("status", fmt.Sprintf("%v", *request.Status)) - } - if request.Type != nil { - queryParams.Add("type", fmt.Sprintf("%v", *request.Type)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *accounting.PaginatedInvoiceList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *accounting.InvoicesListRequest, + opts ...option.RequestOption, +) (*core.Page[*accounting.Invoice], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/invoices" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *accounting.PaginatedInvoiceList) *internal.PageResponse[*string, *accounting.Invoice] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *accounting.Invoice]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Creates an `Invoice` object with the given values. -// Including a `PurchaseOrder` id in the `purchase_orders` property will generate an Accounts Payable Invoice from the specified Purchase Order(s). -func (c *Client) Create(ctx context.Context, request *accounting.InvoiceEndpointRequest) (*accounting.InvoiceResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/invoices" - - queryParams := make(url.Values) - if request.IsDebugMode != nil { - queryParams.Add("is_debug_mode", fmt.Sprintf("%v", *request.IsDebugMode)) - } - if request.RunAsync != nil { - queryParams.Add("run_async", fmt.Sprintf("%v", *request.RunAsync)) +// +// Including a `PurchaseOrder` id in the `purchase_orders` property will generate an Accounts Payable Invoice from the specified Purchase Order(s). +func (c *Client) Create( + ctx context.Context, + request *accounting.InvoiceEndpointRequest, + opts ...option.RequestOption, +) (*accounting.InvoiceResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/invoices" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *accounting.InvoiceResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -158,41 +140,46 @@ func (c *Client) Create(ctx context.Context, request *accounting.InvoiceEndpoint } // Returns an `Invoice` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *accounting.InvoicesRetrieveRequest) (*accounting.Invoice, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"accounting/v1/invoices/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeRemoteFields != nil { - queryParams.Add("include_remote_fields", fmt.Sprintf("%v", *request.IncludeRemoteFields)) - } - if request.RemoteFields != nil { - queryParams.Add("remote_fields", fmt.Sprintf("%v", request.RemoteFields)) - } - if request.ShowEnumOrigins != nil { - queryParams.Add("show_enum_origins", fmt.Sprintf("%v", request.ShowEnumOrigins)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *accounting.InvoicesRetrieveRequest, + opts ...option.RequestOption, +) (*accounting.Invoice, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/accounting/v1/invoices/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *accounting.Invoice if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -201,33 +188,48 @@ func (c *Client) Retrieve(ctx context.Context, id string, request *accounting.In } // Updates an `Invoice` object with the given `id`. -func (c *Client) PartialUpdate(ctx context.Context, id string, request *accounting.PatchedInvoiceEndpointRequest) (*accounting.InvoiceResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"accounting/v1/invoices/%v", id) - - queryParams := make(url.Values) - if request.IsDebugMode != nil { - queryParams.Add("is_debug_mode", fmt.Sprintf("%v", *request.IsDebugMode)) - } - if request.RunAsync != nil { - queryParams.Add("run_async", fmt.Sprintf("%v", *request.RunAsync)) +func (c *Client) PartialUpdate( + ctx context.Context, + id string, + request *accounting.PatchedInvoiceEndpointRequest, + opts ...option.RequestOption, +) (*accounting.InvoiceResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/accounting/v1/invoices/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *accounting.InvoiceResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPatch, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPatch, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -236,67 +238,97 @@ func (c *Client) PartialUpdate(ctx context.Context, id string, request *accounti } // Returns a list of `RemoteFieldClass` objects. -func (c *Client) LineItemsRemoteFieldClassesList(ctx context.Context, request *accounting.InvoicesLineItemsRemoteFieldClassesListRequest) (*accounting.PaginatedRemoteFieldClassList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/invoices/line-items/remote-field-classes" - - queryParams := make(url.Values) - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.IsCommonModelField != nil { - queryParams.Add("is_common_model_field", fmt.Sprintf("%v", *request.IsCommonModelField)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *accounting.PaginatedRemoteFieldClassList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) LineItemsRemoteFieldClassesList( + ctx context.Context, + request *accounting.InvoicesLineItemsRemoteFieldClassesListRequest, + opts ...option.RequestOption, +) (*core.Page[*accounting.RemoteFieldClass], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/invoices/line-items/remote-field-classes" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *accounting.PaginatedRemoteFieldClassList) *internal.PageResponse[*string, *accounting.RemoteFieldClass] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *accounting.RemoteFieldClass]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Returns metadata for `Invoice` PATCHs. -func (c *Client) MetaPatchRetrieve(ctx context.Context, id string) (*accounting.MetaResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"accounting/v1/invoices/meta/patch/%v", id) +func (c *Client) MetaPatchRetrieve( + ctx context.Context, + id string, + opts ...option.RequestOption, +) (*accounting.MetaResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/accounting/v1/invoices/meta/patch/%v", + id, + ) + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *accounting.MetaResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -305,21 +337,34 @@ func (c *Client) MetaPatchRetrieve(ctx context.Context, id string) (*accounting. } // Returns metadata for `Invoice` POSTs. -func (c *Client) MetaPostRetrieve(ctx context.Context) (*accounting.MetaResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/invoices/meta/post" +func (c *Client) MetaPostRetrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*accounting.MetaResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/invoices/meta/post" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *accounting.MetaResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -328,47 +373,60 @@ func (c *Client) MetaPostRetrieve(ctx context.Context) (*accounting.MetaResponse } // Returns a list of `RemoteFieldClass` objects. -func (c *Client) RemoteFieldClassesList(ctx context.Context, request *accounting.InvoicesRemoteFieldClassesListRequest) (*accounting.PaginatedRemoteFieldClassList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/invoices/remote-field-classes" - - queryParams := make(url.Values) - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.IsCommonModelField != nil { - queryParams.Add("is_common_model_field", fmt.Sprintf("%v", *request.IsCommonModelField)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *accounting.PaginatedRemoteFieldClassList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) RemoteFieldClassesList( + ctx context.Context, + request *accounting.InvoicesRemoteFieldClassesListRequest, + opts ...option.RequestOption, +) (*core.Page[*accounting.RemoteFieldClass], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/invoices/remote-field-classes" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *accounting.PaginatedRemoteFieldClassList) *internal.PageResponse[*string, *accounting.RemoteFieldClass] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *accounting.RemoteFieldClass]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } diff --git a/accounting/issues.go b/accounting/issues.go index 0f6f566..2d63926 100644 --- a/accounting/issues.go +++ b/accounting/issues.go @@ -1,41 +1,43 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package accounting import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type IssuesListRequest struct { - AccountToken *string `json:"-"` + AccountToken *string `json:"-" url:"account_token,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // If included, will only include issues whose most recent action occurred before this time - EndDate *string `json:"-"` - EndUserOrganizationName *string `json:"-"` + EndDate *string `json:"-" url:"end_date,omitempty"` + EndUserOrganizationName *string `json:"-" url:"end_user_organization_name,omitempty"` // If provided, will only return issues whose first incident time was after this datetime. - FirstIncidentTimeAfter *time.Time `json:"-"` + FirstIncidentTimeAfter *time.Time `json:"-" url:"first_incident_time_after,omitempty"` // If provided, will only return issues whose first incident time was before this datetime. - FirstIncidentTimeBefore *time.Time `json:"-"` + FirstIncidentTimeBefore *time.Time `json:"-" url:"first_incident_time_before,omitempty"` // If true, will include muted issues - IncludeMuted *string `json:"-"` - IntegrationName *string `json:"-"` + IncludeMuted *string `json:"-" url:"include_muted,omitempty"` + IntegrationName *string `json:"-" url:"integration_name,omitempty"` // If provided, will only return issues whose last incident time was after this datetime. - LastIncidentTimeAfter *time.Time `json:"-"` + LastIncidentTimeAfter *time.Time `json:"-" url:"last_incident_time_after,omitempty"` // If provided, will only return issues whose last incident time was before this datetime. - LastIncidentTimeBefore *time.Time `json:"-"` + LastIncidentTimeBefore *time.Time `json:"-" url:"last_incident_time_before,omitempty"` // If provided, will only include issues pertaining to the linked account passed in. - LinkedAccountId *string `json:"-"` + LinkedAccountId *string `json:"-" url:"linked_account_id,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // If included, will only include issues whose most recent action occurred after this time - StartDate *string `json:"-"` + StartDate *string `json:"-" url:"start_date,omitempty"` // Status of the issue. Options: ('ONGOING', 'RESOLVED') // - // - `ONGOING` - ONGOING - // - `RESOLVED` - RESOLVED - Status *IssuesListRequestStatus `json:"-"` + // * `ONGOING` - ONGOING + // * `RESOLVED` - RESOLVED + Status *IssuesListRequestStatus `json:"-" url:"status,omitempty"` } type IssuesListRequestStatus string @@ -59,3 +61,283 @@ func NewIssuesListRequestStatusFromString(s string) (IssuesListRequestStatus, er func (i IssuesListRequestStatus) Ptr() *IssuesListRequestStatus { return &i } + +type Issue struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // Status of the issue. Options: ('ONGOING', 'RESOLVED') + // + // * `ONGOING` - ONGOING + // * `RESOLVED` - RESOLVED + Status *IssueStatus `json:"status,omitempty" url:"status,omitempty"` + ErrorDescription string `json:"error_description" url:"error_description"` + EndUser map[string]interface{} `json:"end_user,omitempty" url:"end_user,omitempty"` + FirstIncidentTime *time.Time `json:"first_incident_time,omitempty" url:"first_incident_time,omitempty"` + LastIncidentTime *time.Time `json:"last_incident_time,omitempty" url:"last_incident_time,omitempty"` + IsMuted *bool `json:"is_muted,omitempty" url:"is_muted,omitempty"` + ErrorDetails []string `json:"error_details,omitempty" url:"error_details,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (i *Issue) GetId() *string { + if i == nil { + return nil + } + return i.Id +} + +func (i *Issue) GetStatus() *IssueStatus { + if i == nil { + return nil + } + return i.Status +} + +func (i *Issue) GetErrorDescription() string { + if i == nil { + return "" + } + return i.ErrorDescription +} + +func (i *Issue) GetEndUser() map[string]interface{} { + if i == nil { + return nil + } + return i.EndUser +} + +func (i *Issue) GetFirstIncidentTime() *time.Time { + if i == nil { + return nil + } + return i.FirstIncidentTime +} + +func (i *Issue) GetLastIncidentTime() *time.Time { + if i == nil { + return nil + } + return i.LastIncidentTime +} + +func (i *Issue) GetIsMuted() *bool { + if i == nil { + return nil + } + return i.IsMuted +} + +func (i *Issue) GetErrorDetails() []string { + if i == nil { + return nil + } + return i.ErrorDetails +} + +func (i *Issue) GetExtraProperties() map[string]interface{} { + return i.extraProperties +} + +func (i *Issue) UnmarshalJSON(data []byte) error { + type embed Issue + var unmarshaler = struct { + embed + FirstIncidentTime *internal.DateTime `json:"first_incident_time,omitempty"` + LastIncidentTime *internal.DateTime `json:"last_incident_time,omitempty"` + }{ + embed: embed(*i), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *i = Issue(unmarshaler.embed) + i.FirstIncidentTime = unmarshaler.FirstIncidentTime.TimePtr() + i.LastIncidentTime = unmarshaler.LastIncidentTime.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *i) + if err != nil { + return err + } + i.extraProperties = extraProperties + i.rawJSON = json.RawMessage(data) + return nil +} + +func (i *Issue) MarshalJSON() ([]byte, error) { + type embed Issue + var marshaler = struct { + embed + FirstIncidentTime *internal.DateTime `json:"first_incident_time,omitempty"` + LastIncidentTime *internal.DateTime `json:"last_incident_time,omitempty"` + }{ + embed: embed(*i), + FirstIncidentTime: internal.NewOptionalDateTime(i.FirstIncidentTime), + LastIncidentTime: internal.NewOptionalDateTime(i.LastIncidentTime), + } + return json.Marshal(marshaler) +} + +func (i *Issue) String() string { + if len(i.rawJSON) > 0 { + if value, err := internal.StringifyJSON(i.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(i); err == nil { + return value + } + return fmt.Sprintf("%#v", i) +} + +// Status of the issue. Options: ('ONGOING', 'RESOLVED') +// +// * `ONGOING` - ONGOING +// * `RESOLVED` - RESOLVED +type IssueStatus struct { + IssueStatusEnum IssueStatusEnum + String string + + typ string +} + +func (i *IssueStatus) GetIssueStatusEnum() IssueStatusEnum { + if i == nil { + return "" + } + return i.IssueStatusEnum +} + +func (i *IssueStatus) GetString() string { + if i == nil { + return "" + } + return i.String +} + +func (i *IssueStatus) UnmarshalJSON(data []byte) error { + var valueIssueStatusEnum IssueStatusEnum + if err := json.Unmarshal(data, &valueIssueStatusEnum); err == nil { + i.typ = "IssueStatusEnum" + i.IssueStatusEnum = valueIssueStatusEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + i.typ = "String" + i.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) +} + +func (i IssueStatus) MarshalJSON() ([]byte, error) { + if i.typ == "IssueStatusEnum" || i.IssueStatusEnum != "" { + return json.Marshal(i.IssueStatusEnum) + } + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) +} + +type IssueStatusVisitor interface { + VisitIssueStatusEnum(IssueStatusEnum) error + VisitString(string) error +} + +func (i *IssueStatus) Accept(visitor IssueStatusVisitor) error { + if i.typ == "IssueStatusEnum" || i.IssueStatusEnum != "" { + return visitor.VisitIssueStatusEnum(i.IssueStatusEnum) + } + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", i) +} + +// * `ONGOING` - ONGOING +// * `RESOLVED` - RESOLVED +type IssueStatusEnum string + +const ( + IssueStatusEnumOngoing IssueStatusEnum = "ONGOING" + IssueStatusEnumResolved IssueStatusEnum = "RESOLVED" +) + +func NewIssueStatusEnumFromString(s string) (IssueStatusEnum, error) { + switch s { + case "ONGOING": + return IssueStatusEnumOngoing, nil + case "RESOLVED": + return IssueStatusEnumResolved, nil + } + var t IssueStatusEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (i IssueStatusEnum) Ptr() *IssueStatusEnum { + return &i +} + +type PaginatedIssueList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Issue `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedIssueList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedIssueList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedIssueList) GetResults() []*Issue { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedIssueList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedIssueList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedIssueList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedIssueList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedIssueList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} diff --git a/accounting/issues/client.go b/accounting/issues/client.go index 507e72f..08d77fb 100644 --- a/accounting/issues/client.go +++ b/accounting/issues/client.go @@ -1,121 +1,129 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package issues import ( context "context" fmt "fmt" - accounting "github.com/merge-api/merge-go-client/accounting" - core "github.com/merge-api/merge-go-client/core" + accounting "github.com/merge-api/merge-go-client/v2/accounting" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Gets all issues for Organization. -func (c *Client) List(ctx context.Context, request *accounting.IssuesListRequest) (*accounting.PaginatedIssueList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/issues" - - queryParams := make(url.Values) - if request.AccountToken != nil { - queryParams.Add("account_token", fmt.Sprintf("%v", *request.AccountToken)) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.EndDate != nil { - queryParams.Add("end_date", fmt.Sprintf("%v", *request.EndDate)) - } - if request.EndUserOrganizationName != nil { - queryParams.Add("end_user_organization_name", fmt.Sprintf("%v", *request.EndUserOrganizationName)) - } - if request.FirstIncidentTimeAfter != nil { - queryParams.Add("first_incident_time_after", fmt.Sprintf("%v", request.FirstIncidentTimeAfter.Format(time.RFC3339))) - } - if request.FirstIncidentTimeBefore != nil { - queryParams.Add("first_incident_time_before", fmt.Sprintf("%v", request.FirstIncidentTimeBefore.Format(time.RFC3339))) - } - if request.IncludeMuted != nil { - queryParams.Add("include_muted", fmt.Sprintf("%v", *request.IncludeMuted)) - } - if request.IntegrationName != nil { - queryParams.Add("integration_name", fmt.Sprintf("%v", *request.IntegrationName)) - } - if request.LastIncidentTimeAfter != nil { - queryParams.Add("last_incident_time_after", fmt.Sprintf("%v", request.LastIncidentTimeAfter.Format(time.RFC3339))) - } - if request.LastIncidentTimeBefore != nil { - queryParams.Add("last_incident_time_before", fmt.Sprintf("%v", request.LastIncidentTimeBefore.Format(time.RFC3339))) - } - if request.LinkedAccountId != nil { - queryParams.Add("linked_account_id", fmt.Sprintf("%v", *request.LinkedAccountId)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.StartDate != nil { - queryParams.Add("start_date", fmt.Sprintf("%v", *request.StartDate)) - } - if request.Status != nil { - queryParams.Add("status", fmt.Sprintf("%v", *request.Status)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *accounting.PaginatedIssueList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *accounting.IssuesListRequest, + opts ...option.RequestOption, +) (*core.Page[*accounting.Issue], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/issues" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *accounting.PaginatedIssueList) *internal.PageResponse[*string, *accounting.Issue] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *accounting.Issue]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Get a specific issue. -func (c *Client) Retrieve(ctx context.Context, id string) (*accounting.Issue, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"accounting/v1/issues/%v", id) +func (c *Client) Retrieve( + ctx context.Context, + id string, + opts ...option.RequestOption, +) (*accounting.Issue, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/accounting/v1/issues/%v", + id, + ) + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *accounting.Issue if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/accounting/items.go b/accounting/items.go index b4d9c56..4edab38 100644 --- a/accounting/items.go +++ b/accounting/items.go @@ -1,268 +1,1163 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package accounting import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) +type ItemEndpointRequest struct { + // Whether to include debug fields (such as log file links) in the response. + IsDebugMode *bool `json:"-" url:"is_debug_mode,omitempty"` + // Whether or not third-party updates should be run asynchronously. + RunAsync *bool `json:"-" url:"run_async,omitempty"` + Model *ItemRequestRequest `json:"model,omitempty" url:"-"` +} + type ItemsListRequest struct { // If provided, will only return items for this company. - CompanyId *string `json:"-"` + CompanyId *string `json:"-" url:"company_id,omitempty"` // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *ItemsListRequestExpand `json:"-"` + Expand []*ItemsListRequestExpandItem `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // Deprecated. Use show_enum_origins. - RemoteFields *string `json:"-"` + RemoteFields *string `json:"-" url:"remote_fields,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` // 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) - ShowEnumOrigins *string `json:"-"` + ShowEnumOrigins *string `json:"-" url:"show_enum_origins,omitempty"` +} + +type PatchedItemEndpointRequest struct { + // Whether to include debug fields (such as log file links) in the response. + IsDebugMode *bool `json:"-" url:"is_debug_mode,omitempty"` + // Whether or not third-party updates should be run asynchronously. + RunAsync *bool `json:"-" url:"run_async,omitempty"` + Model *PatchedItemRequestRequest `json:"model,omitempty" url:"-"` } type ItemsRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *ItemsRetrieveRequestExpand `json:"-"` + Expand []*ItemsRetrieveRequestExpandItem `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // Deprecated. Use show_enum_origins. - RemoteFields *string `json:"-"` + RemoteFields *string `json:"-" url:"remote_fields,omitempty"` // 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) - ShowEnumOrigins *string `json:"-"` + ShowEnumOrigins *string `json:"-" url:"show_enum_origins,omitempty"` } -type ItemsListRequestExpand string +type ItemsListRequestExpandItem string const ( - ItemsListRequestExpandCompany ItemsListRequestExpand = "company" - ItemsListRequestExpandCompanyPurchaseTaxRate ItemsListRequestExpand = "company,purchase_tax_rate" - ItemsListRequestExpandCompanySalesTaxRate ItemsListRequestExpand = "company,sales_tax_rate" - ItemsListRequestExpandCompanySalesTaxRatePurchaseTaxRate ItemsListRequestExpand = "company,sales_tax_rate,purchase_tax_rate" - ItemsListRequestExpandPurchaseAccount ItemsListRequestExpand = "purchase_account" - ItemsListRequestExpandPurchaseAccountCompany ItemsListRequestExpand = "purchase_account,company" - ItemsListRequestExpandPurchaseAccountCompanyPurchaseTaxRate ItemsListRequestExpand = "purchase_account,company,purchase_tax_rate" - ItemsListRequestExpandPurchaseAccountCompanySalesTaxRate ItemsListRequestExpand = "purchase_account,company,sales_tax_rate" - ItemsListRequestExpandPurchaseAccountCompanySalesTaxRatePurchaseTaxRate ItemsListRequestExpand = "purchase_account,company,sales_tax_rate,purchase_tax_rate" - ItemsListRequestExpandPurchaseAccountPurchaseTaxRate ItemsListRequestExpand = "purchase_account,purchase_tax_rate" - ItemsListRequestExpandPurchaseAccountSalesAccount ItemsListRequestExpand = "purchase_account,sales_account" - ItemsListRequestExpandPurchaseAccountSalesAccountCompany ItemsListRequestExpand = "purchase_account,sales_account,company" - ItemsListRequestExpandPurchaseAccountSalesAccountCompanyPurchaseTaxRate ItemsListRequestExpand = "purchase_account,sales_account,company,purchase_tax_rate" - ItemsListRequestExpandPurchaseAccountSalesAccountCompanySalesTaxRate ItemsListRequestExpand = "purchase_account,sales_account,company,sales_tax_rate" - ItemsListRequestExpandPurchaseAccountSalesAccountCompanySalesTaxRatePurchaseTaxRate ItemsListRequestExpand = "purchase_account,sales_account,company,sales_tax_rate,purchase_tax_rate" - ItemsListRequestExpandPurchaseAccountSalesAccountPurchaseTaxRate ItemsListRequestExpand = "purchase_account,sales_account,purchase_tax_rate" - ItemsListRequestExpandPurchaseAccountSalesAccountSalesTaxRate ItemsListRequestExpand = "purchase_account,sales_account,sales_tax_rate" - ItemsListRequestExpandPurchaseAccountSalesAccountSalesTaxRatePurchaseTaxRate ItemsListRequestExpand = "purchase_account,sales_account,sales_tax_rate,purchase_tax_rate" - ItemsListRequestExpandPurchaseAccountSalesTaxRate ItemsListRequestExpand = "purchase_account,sales_tax_rate" - ItemsListRequestExpandPurchaseAccountSalesTaxRatePurchaseTaxRate ItemsListRequestExpand = "purchase_account,sales_tax_rate,purchase_tax_rate" - ItemsListRequestExpandPurchaseTaxRate ItemsListRequestExpand = "purchase_tax_rate" - ItemsListRequestExpandSalesAccount ItemsListRequestExpand = "sales_account" - ItemsListRequestExpandSalesAccountCompany ItemsListRequestExpand = "sales_account,company" - ItemsListRequestExpandSalesAccountCompanyPurchaseTaxRate ItemsListRequestExpand = "sales_account,company,purchase_tax_rate" - ItemsListRequestExpandSalesAccountCompanySalesTaxRate ItemsListRequestExpand = "sales_account,company,sales_tax_rate" - ItemsListRequestExpandSalesAccountCompanySalesTaxRatePurchaseTaxRate ItemsListRequestExpand = "sales_account,company,sales_tax_rate,purchase_tax_rate" - ItemsListRequestExpandSalesAccountPurchaseTaxRate ItemsListRequestExpand = "sales_account,purchase_tax_rate" - ItemsListRequestExpandSalesAccountSalesTaxRate ItemsListRequestExpand = "sales_account,sales_tax_rate" - ItemsListRequestExpandSalesAccountSalesTaxRatePurchaseTaxRate ItemsListRequestExpand = "sales_account,sales_tax_rate,purchase_tax_rate" - ItemsListRequestExpandSalesTaxRate ItemsListRequestExpand = "sales_tax_rate" - ItemsListRequestExpandSalesTaxRatePurchaseTaxRate ItemsListRequestExpand = "sales_tax_rate,purchase_tax_rate" + ItemsListRequestExpandItemCompany ItemsListRequestExpandItem = "company" + ItemsListRequestExpandItemPurchaseAccount ItemsListRequestExpandItem = "purchase_account" + ItemsListRequestExpandItemPurchaseTaxRate ItemsListRequestExpandItem = "purchase_tax_rate" + ItemsListRequestExpandItemSalesAccount ItemsListRequestExpandItem = "sales_account" + ItemsListRequestExpandItemSalesTaxRate ItemsListRequestExpandItem = "sales_tax_rate" ) -func NewItemsListRequestExpandFromString(s string) (ItemsListRequestExpand, error) { +func NewItemsListRequestExpandItemFromString(s string) (ItemsListRequestExpandItem, error) { switch s { case "company": - return ItemsListRequestExpandCompany, nil - case "company,purchase_tax_rate": - return ItemsListRequestExpandCompanyPurchaseTaxRate, nil - case "company,sales_tax_rate": - return ItemsListRequestExpandCompanySalesTaxRate, nil - case "company,sales_tax_rate,purchase_tax_rate": - return ItemsListRequestExpandCompanySalesTaxRatePurchaseTaxRate, nil + return ItemsListRequestExpandItemCompany, nil case "purchase_account": - return ItemsListRequestExpandPurchaseAccount, nil - case "purchase_account,company": - return ItemsListRequestExpandPurchaseAccountCompany, nil - case "purchase_account,company,purchase_tax_rate": - return ItemsListRequestExpandPurchaseAccountCompanyPurchaseTaxRate, nil - case "purchase_account,company,sales_tax_rate": - return ItemsListRequestExpandPurchaseAccountCompanySalesTaxRate, nil - case "purchase_account,company,sales_tax_rate,purchase_tax_rate": - return ItemsListRequestExpandPurchaseAccountCompanySalesTaxRatePurchaseTaxRate, nil - case "purchase_account,purchase_tax_rate": - return ItemsListRequestExpandPurchaseAccountPurchaseTaxRate, nil - case "purchase_account,sales_account": - return ItemsListRequestExpandPurchaseAccountSalesAccount, nil - case "purchase_account,sales_account,company": - return ItemsListRequestExpandPurchaseAccountSalesAccountCompany, nil - case "purchase_account,sales_account,company,purchase_tax_rate": - return ItemsListRequestExpandPurchaseAccountSalesAccountCompanyPurchaseTaxRate, nil - case "purchase_account,sales_account,company,sales_tax_rate": - return ItemsListRequestExpandPurchaseAccountSalesAccountCompanySalesTaxRate, nil - case "purchase_account,sales_account,company,sales_tax_rate,purchase_tax_rate": - return ItemsListRequestExpandPurchaseAccountSalesAccountCompanySalesTaxRatePurchaseTaxRate, nil - case "purchase_account,sales_account,purchase_tax_rate": - return ItemsListRequestExpandPurchaseAccountSalesAccountPurchaseTaxRate, nil - case "purchase_account,sales_account,sales_tax_rate": - return ItemsListRequestExpandPurchaseAccountSalesAccountSalesTaxRate, nil - case "purchase_account,sales_account,sales_tax_rate,purchase_tax_rate": - return ItemsListRequestExpandPurchaseAccountSalesAccountSalesTaxRatePurchaseTaxRate, nil - case "purchase_account,sales_tax_rate": - return ItemsListRequestExpandPurchaseAccountSalesTaxRate, nil - case "purchase_account,sales_tax_rate,purchase_tax_rate": - return ItemsListRequestExpandPurchaseAccountSalesTaxRatePurchaseTaxRate, nil + return ItemsListRequestExpandItemPurchaseAccount, nil case "purchase_tax_rate": - return ItemsListRequestExpandPurchaseTaxRate, nil + return ItemsListRequestExpandItemPurchaseTaxRate, nil case "sales_account": - return ItemsListRequestExpandSalesAccount, nil - case "sales_account,company": - return ItemsListRequestExpandSalesAccountCompany, nil - case "sales_account,company,purchase_tax_rate": - return ItemsListRequestExpandSalesAccountCompanyPurchaseTaxRate, nil - case "sales_account,company,sales_tax_rate": - return ItemsListRequestExpandSalesAccountCompanySalesTaxRate, nil - case "sales_account,company,sales_tax_rate,purchase_tax_rate": - return ItemsListRequestExpandSalesAccountCompanySalesTaxRatePurchaseTaxRate, nil - case "sales_account,purchase_tax_rate": - return ItemsListRequestExpandSalesAccountPurchaseTaxRate, nil - case "sales_account,sales_tax_rate": - return ItemsListRequestExpandSalesAccountSalesTaxRate, nil - case "sales_account,sales_tax_rate,purchase_tax_rate": - return ItemsListRequestExpandSalesAccountSalesTaxRatePurchaseTaxRate, nil + return ItemsListRequestExpandItemSalesAccount, nil case "sales_tax_rate": - return ItemsListRequestExpandSalesTaxRate, nil - case "sales_tax_rate,purchase_tax_rate": - return ItemsListRequestExpandSalesTaxRatePurchaseTaxRate, nil + return ItemsListRequestExpandItemSalesTaxRate, nil } - var t ItemsListRequestExpand + var t ItemsListRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (i ItemsListRequestExpand) Ptr() *ItemsListRequestExpand { +func (i ItemsListRequestExpandItem) Ptr() *ItemsListRequestExpandItem { return &i } -type ItemsRetrieveRequestExpand string +type ItemsRetrieveRequestExpandItem string const ( - ItemsRetrieveRequestExpandCompany ItemsRetrieveRequestExpand = "company" - ItemsRetrieveRequestExpandCompanyPurchaseTaxRate ItemsRetrieveRequestExpand = "company,purchase_tax_rate" - ItemsRetrieveRequestExpandCompanySalesTaxRate ItemsRetrieveRequestExpand = "company,sales_tax_rate" - ItemsRetrieveRequestExpandCompanySalesTaxRatePurchaseTaxRate ItemsRetrieveRequestExpand = "company,sales_tax_rate,purchase_tax_rate" - ItemsRetrieveRequestExpandPurchaseAccount ItemsRetrieveRequestExpand = "purchase_account" - ItemsRetrieveRequestExpandPurchaseAccountCompany ItemsRetrieveRequestExpand = "purchase_account,company" - ItemsRetrieveRequestExpandPurchaseAccountCompanyPurchaseTaxRate ItemsRetrieveRequestExpand = "purchase_account,company,purchase_tax_rate" - ItemsRetrieveRequestExpandPurchaseAccountCompanySalesTaxRate ItemsRetrieveRequestExpand = "purchase_account,company,sales_tax_rate" - ItemsRetrieveRequestExpandPurchaseAccountCompanySalesTaxRatePurchaseTaxRate ItemsRetrieveRequestExpand = "purchase_account,company,sales_tax_rate,purchase_tax_rate" - ItemsRetrieveRequestExpandPurchaseAccountPurchaseTaxRate ItemsRetrieveRequestExpand = "purchase_account,purchase_tax_rate" - ItemsRetrieveRequestExpandPurchaseAccountSalesAccount ItemsRetrieveRequestExpand = "purchase_account,sales_account" - ItemsRetrieveRequestExpandPurchaseAccountSalesAccountCompany ItemsRetrieveRequestExpand = "purchase_account,sales_account,company" - ItemsRetrieveRequestExpandPurchaseAccountSalesAccountCompanyPurchaseTaxRate ItemsRetrieveRequestExpand = "purchase_account,sales_account,company,purchase_tax_rate" - ItemsRetrieveRequestExpandPurchaseAccountSalesAccountCompanySalesTaxRate ItemsRetrieveRequestExpand = "purchase_account,sales_account,company,sales_tax_rate" - ItemsRetrieveRequestExpandPurchaseAccountSalesAccountCompanySalesTaxRatePurchaseTaxRate ItemsRetrieveRequestExpand = "purchase_account,sales_account,company,sales_tax_rate,purchase_tax_rate" - ItemsRetrieveRequestExpandPurchaseAccountSalesAccountPurchaseTaxRate ItemsRetrieveRequestExpand = "purchase_account,sales_account,purchase_tax_rate" - ItemsRetrieveRequestExpandPurchaseAccountSalesAccountSalesTaxRate ItemsRetrieveRequestExpand = "purchase_account,sales_account,sales_tax_rate" - ItemsRetrieveRequestExpandPurchaseAccountSalesAccountSalesTaxRatePurchaseTaxRate ItemsRetrieveRequestExpand = "purchase_account,sales_account,sales_tax_rate,purchase_tax_rate" - ItemsRetrieveRequestExpandPurchaseAccountSalesTaxRate ItemsRetrieveRequestExpand = "purchase_account,sales_tax_rate" - ItemsRetrieveRequestExpandPurchaseAccountSalesTaxRatePurchaseTaxRate ItemsRetrieveRequestExpand = "purchase_account,sales_tax_rate,purchase_tax_rate" - ItemsRetrieveRequestExpandPurchaseTaxRate ItemsRetrieveRequestExpand = "purchase_tax_rate" - ItemsRetrieveRequestExpandSalesAccount ItemsRetrieveRequestExpand = "sales_account" - ItemsRetrieveRequestExpandSalesAccountCompany ItemsRetrieveRequestExpand = "sales_account,company" - ItemsRetrieveRequestExpandSalesAccountCompanyPurchaseTaxRate ItemsRetrieveRequestExpand = "sales_account,company,purchase_tax_rate" - ItemsRetrieveRequestExpandSalesAccountCompanySalesTaxRate ItemsRetrieveRequestExpand = "sales_account,company,sales_tax_rate" - ItemsRetrieveRequestExpandSalesAccountCompanySalesTaxRatePurchaseTaxRate ItemsRetrieveRequestExpand = "sales_account,company,sales_tax_rate,purchase_tax_rate" - ItemsRetrieveRequestExpandSalesAccountPurchaseTaxRate ItemsRetrieveRequestExpand = "sales_account,purchase_tax_rate" - ItemsRetrieveRequestExpandSalesAccountSalesTaxRate ItemsRetrieveRequestExpand = "sales_account,sales_tax_rate" - ItemsRetrieveRequestExpandSalesAccountSalesTaxRatePurchaseTaxRate ItemsRetrieveRequestExpand = "sales_account,sales_tax_rate,purchase_tax_rate" - ItemsRetrieveRequestExpandSalesTaxRate ItemsRetrieveRequestExpand = "sales_tax_rate" - ItemsRetrieveRequestExpandSalesTaxRatePurchaseTaxRate ItemsRetrieveRequestExpand = "sales_tax_rate,purchase_tax_rate" + ItemsRetrieveRequestExpandItemCompany ItemsRetrieveRequestExpandItem = "company" + ItemsRetrieveRequestExpandItemPurchaseAccount ItemsRetrieveRequestExpandItem = "purchase_account" + ItemsRetrieveRequestExpandItemPurchaseTaxRate ItemsRetrieveRequestExpandItem = "purchase_tax_rate" + ItemsRetrieveRequestExpandItemSalesAccount ItemsRetrieveRequestExpandItem = "sales_account" + ItemsRetrieveRequestExpandItemSalesTaxRate ItemsRetrieveRequestExpandItem = "sales_tax_rate" ) -func NewItemsRetrieveRequestExpandFromString(s string) (ItemsRetrieveRequestExpand, error) { +func NewItemsRetrieveRequestExpandItemFromString(s string) (ItemsRetrieveRequestExpandItem, error) { switch s { case "company": - return ItemsRetrieveRequestExpandCompany, nil - case "company,purchase_tax_rate": - return ItemsRetrieveRequestExpandCompanyPurchaseTaxRate, nil - case "company,sales_tax_rate": - return ItemsRetrieveRequestExpandCompanySalesTaxRate, nil - case "company,sales_tax_rate,purchase_tax_rate": - return ItemsRetrieveRequestExpandCompanySalesTaxRatePurchaseTaxRate, nil + return ItemsRetrieveRequestExpandItemCompany, nil case "purchase_account": - return ItemsRetrieveRequestExpandPurchaseAccount, nil - case "purchase_account,company": - return ItemsRetrieveRequestExpandPurchaseAccountCompany, nil - case "purchase_account,company,purchase_tax_rate": - return ItemsRetrieveRequestExpandPurchaseAccountCompanyPurchaseTaxRate, nil - case "purchase_account,company,sales_tax_rate": - return ItemsRetrieveRequestExpandPurchaseAccountCompanySalesTaxRate, nil - case "purchase_account,company,sales_tax_rate,purchase_tax_rate": - return ItemsRetrieveRequestExpandPurchaseAccountCompanySalesTaxRatePurchaseTaxRate, nil - case "purchase_account,purchase_tax_rate": - return ItemsRetrieveRequestExpandPurchaseAccountPurchaseTaxRate, nil - case "purchase_account,sales_account": - return ItemsRetrieveRequestExpandPurchaseAccountSalesAccount, nil - case "purchase_account,sales_account,company": - return ItemsRetrieveRequestExpandPurchaseAccountSalesAccountCompany, nil - case "purchase_account,sales_account,company,purchase_tax_rate": - return ItemsRetrieveRequestExpandPurchaseAccountSalesAccountCompanyPurchaseTaxRate, nil - case "purchase_account,sales_account,company,sales_tax_rate": - return ItemsRetrieveRequestExpandPurchaseAccountSalesAccountCompanySalesTaxRate, nil - case "purchase_account,sales_account,company,sales_tax_rate,purchase_tax_rate": - return ItemsRetrieveRequestExpandPurchaseAccountSalesAccountCompanySalesTaxRatePurchaseTaxRate, nil - case "purchase_account,sales_account,purchase_tax_rate": - return ItemsRetrieveRequestExpandPurchaseAccountSalesAccountPurchaseTaxRate, nil - case "purchase_account,sales_account,sales_tax_rate": - return ItemsRetrieveRequestExpandPurchaseAccountSalesAccountSalesTaxRate, nil - case "purchase_account,sales_account,sales_tax_rate,purchase_tax_rate": - return ItemsRetrieveRequestExpandPurchaseAccountSalesAccountSalesTaxRatePurchaseTaxRate, nil - case "purchase_account,sales_tax_rate": - return ItemsRetrieveRequestExpandPurchaseAccountSalesTaxRate, nil - case "purchase_account,sales_tax_rate,purchase_tax_rate": - return ItemsRetrieveRequestExpandPurchaseAccountSalesTaxRatePurchaseTaxRate, nil + return ItemsRetrieveRequestExpandItemPurchaseAccount, nil case "purchase_tax_rate": - return ItemsRetrieveRequestExpandPurchaseTaxRate, nil + return ItemsRetrieveRequestExpandItemPurchaseTaxRate, nil case "sales_account": - return ItemsRetrieveRequestExpandSalesAccount, nil - case "sales_account,company": - return ItemsRetrieveRequestExpandSalesAccountCompany, nil - case "sales_account,company,purchase_tax_rate": - return ItemsRetrieveRequestExpandSalesAccountCompanyPurchaseTaxRate, nil - case "sales_account,company,sales_tax_rate": - return ItemsRetrieveRequestExpandSalesAccountCompanySalesTaxRate, nil - case "sales_account,company,sales_tax_rate,purchase_tax_rate": - return ItemsRetrieveRequestExpandSalesAccountCompanySalesTaxRatePurchaseTaxRate, nil - case "sales_account,purchase_tax_rate": - return ItemsRetrieveRequestExpandSalesAccountPurchaseTaxRate, nil - case "sales_account,sales_tax_rate": - return ItemsRetrieveRequestExpandSalesAccountSalesTaxRate, nil - case "sales_account,sales_tax_rate,purchase_tax_rate": - return ItemsRetrieveRequestExpandSalesAccountSalesTaxRatePurchaseTaxRate, nil + return ItemsRetrieveRequestExpandItemSalesAccount, nil case "sales_tax_rate": - return ItemsRetrieveRequestExpandSalesTaxRate, nil - case "sales_tax_rate,purchase_tax_rate": - return ItemsRetrieveRequestExpandSalesTaxRatePurchaseTaxRate, nil + return ItemsRetrieveRequestExpandItemSalesTaxRate, nil } - var t ItemsRetrieveRequestExpand + var t ItemsRetrieveRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (i ItemsRetrieveRequestExpand) Ptr() *ItemsRetrieveRequestExpand { +func (i ItemsRetrieveRequestExpandItem) Ptr() *ItemsRetrieveRequestExpandItem { return &i } + +// # The Item Object +// ### Description +// The `Item` object refers to the goods involved in a transaction. +// +// ### Usage Example +// Fetch from the `LIST Items` endpoint and view a company's items. +type ItemRequestRequest struct { + // The item's name. + Name *string `json:"name,omitempty" url:"name,omitempty"` + // The item's status. + // + // * `ACTIVE` - ACTIVE + // * `ARCHIVED` - ARCHIVED + Status *ItemRequestRequestStatus `json:"status,omitempty" url:"status,omitempty"` + // The item's type. + // + // * `INVENTORY` - INVENTORY + // * `NON_INVENTORY` - NON_INVENTORY + // * `SERVICE` - SERVICE + // * `UNKNOWN` - UNKNOWN + Type *ItemRequestRequestType `json:"type,omitempty" url:"type,omitempty"` + // The item's unit price. + UnitPrice *float64 `json:"unit_price,omitempty" url:"unit_price,omitempty"` + // The price at which the item is purchased from a vendor. + PurchasePrice *float64 `json:"purchase_price,omitempty" url:"purchase_price,omitempty"` + // References the default account used to record a purchase of the item. + PurchaseAccount *ItemRequestRequestPurchaseAccount `json:"purchase_account,omitempty" url:"purchase_account,omitempty"` + // References the default account used to record a sale. + SalesAccount *ItemRequestRequestSalesAccount `json:"sales_account,omitempty" url:"sales_account,omitempty"` + // The company the item belongs to. + Company *ItemRequestRequestCompany `json:"company,omitempty" url:"company,omitempty"` + // The default purchase tax rate for this item. + PurchaseTaxRate *ItemRequestRequestPurchaseTaxRate `json:"purchase_tax_rate,omitempty" url:"purchase_tax_rate,omitempty"` + // The default sales tax rate for this item. + SalesTaxRate *ItemRequestRequestSalesTaxRate `json:"sales_tax_rate,omitempty" url:"sales_tax_rate,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (i *ItemRequestRequest) GetName() *string { + if i == nil { + return nil + } + return i.Name +} + +func (i *ItemRequestRequest) GetStatus() *ItemRequestRequestStatus { + if i == nil { + return nil + } + return i.Status +} + +func (i *ItemRequestRequest) GetType() *ItemRequestRequestType { + if i == nil { + return nil + } + return i.Type +} + +func (i *ItemRequestRequest) GetUnitPrice() *float64 { + if i == nil { + return nil + } + return i.UnitPrice +} + +func (i *ItemRequestRequest) GetPurchasePrice() *float64 { + if i == nil { + return nil + } + return i.PurchasePrice +} + +func (i *ItemRequestRequest) GetPurchaseAccount() *ItemRequestRequestPurchaseAccount { + if i == nil { + return nil + } + return i.PurchaseAccount +} + +func (i *ItemRequestRequest) GetSalesAccount() *ItemRequestRequestSalesAccount { + if i == nil { + return nil + } + return i.SalesAccount +} + +func (i *ItemRequestRequest) GetCompany() *ItemRequestRequestCompany { + if i == nil { + return nil + } + return i.Company +} + +func (i *ItemRequestRequest) GetPurchaseTaxRate() *ItemRequestRequestPurchaseTaxRate { + if i == nil { + return nil + } + return i.PurchaseTaxRate +} + +func (i *ItemRequestRequest) GetSalesTaxRate() *ItemRequestRequestSalesTaxRate { + if i == nil { + return nil + } + return i.SalesTaxRate +} + +func (i *ItemRequestRequest) GetIntegrationParams() map[string]interface{} { + if i == nil { + return nil + } + return i.IntegrationParams +} + +func (i *ItemRequestRequest) GetLinkedAccountParams() map[string]interface{} { + if i == nil { + return nil + } + return i.LinkedAccountParams +} + +func (i *ItemRequestRequest) GetExtraProperties() map[string]interface{} { + return i.extraProperties +} + +func (i *ItemRequestRequest) UnmarshalJSON(data []byte) error { + type unmarshaler ItemRequestRequest + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *i = ItemRequestRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *i) + if err != nil { + return err + } + i.extraProperties = extraProperties + i.rawJSON = json.RawMessage(data) + return nil +} + +func (i *ItemRequestRequest) String() string { + if len(i.rawJSON) > 0 { + if value, err := internal.StringifyJSON(i.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(i); err == nil { + return value + } + return fmt.Sprintf("%#v", i) +} + +// The company the item belongs to. +type ItemRequestRequestCompany struct { + String string + CompanyInfo *CompanyInfo + + typ string +} + +func (i *ItemRequestRequestCompany) GetString() string { + if i == nil { + return "" + } + return i.String +} + +func (i *ItemRequestRequestCompany) GetCompanyInfo() *CompanyInfo { + if i == nil { + return nil + } + return i.CompanyInfo +} + +func (i *ItemRequestRequestCompany) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + i.typ = "String" + i.String = valueString + return nil + } + valueCompanyInfo := new(CompanyInfo) + if err := json.Unmarshal(data, &valueCompanyInfo); err == nil { + i.typ = "CompanyInfo" + i.CompanyInfo = valueCompanyInfo + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) +} + +func (i ItemRequestRequestCompany) MarshalJSON() ([]byte, error) { + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) + } + if i.typ == "CompanyInfo" || i.CompanyInfo != nil { + return json.Marshal(i.CompanyInfo) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) +} + +type ItemRequestRequestCompanyVisitor interface { + VisitString(string) error + VisitCompanyInfo(*CompanyInfo) error +} + +func (i *ItemRequestRequestCompany) Accept(visitor ItemRequestRequestCompanyVisitor) error { + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) + } + if i.typ == "CompanyInfo" || i.CompanyInfo != nil { + return visitor.VisitCompanyInfo(i.CompanyInfo) + } + return fmt.Errorf("type %T does not include a non-empty union type", i) +} + +// References the default account used to record a purchase of the item. +type ItemRequestRequestPurchaseAccount struct { + String string + Account *Account + + typ string +} + +func (i *ItemRequestRequestPurchaseAccount) GetString() string { + if i == nil { + return "" + } + return i.String +} + +func (i *ItemRequestRequestPurchaseAccount) GetAccount() *Account { + if i == nil { + return nil + } + return i.Account +} + +func (i *ItemRequestRequestPurchaseAccount) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + i.typ = "String" + i.String = valueString + return nil + } + valueAccount := new(Account) + if err := json.Unmarshal(data, &valueAccount); err == nil { + i.typ = "Account" + i.Account = valueAccount + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) +} + +func (i ItemRequestRequestPurchaseAccount) MarshalJSON() ([]byte, error) { + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) + } + if i.typ == "Account" || i.Account != nil { + return json.Marshal(i.Account) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) +} + +type ItemRequestRequestPurchaseAccountVisitor interface { + VisitString(string) error + VisitAccount(*Account) error +} + +func (i *ItemRequestRequestPurchaseAccount) Accept(visitor ItemRequestRequestPurchaseAccountVisitor) error { + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) + } + if i.typ == "Account" || i.Account != nil { + return visitor.VisitAccount(i.Account) + } + return fmt.Errorf("type %T does not include a non-empty union type", i) +} + +// The default purchase tax rate for this item. +type ItemRequestRequestPurchaseTaxRate struct { + String string + TaxRate *TaxRate + + typ string +} + +func (i *ItemRequestRequestPurchaseTaxRate) GetString() string { + if i == nil { + return "" + } + return i.String +} + +func (i *ItemRequestRequestPurchaseTaxRate) GetTaxRate() *TaxRate { + if i == nil { + return nil + } + return i.TaxRate +} + +func (i *ItemRequestRequestPurchaseTaxRate) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + i.typ = "String" + i.String = valueString + return nil + } + valueTaxRate := new(TaxRate) + if err := json.Unmarshal(data, &valueTaxRate); err == nil { + i.typ = "TaxRate" + i.TaxRate = valueTaxRate + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) +} + +func (i ItemRequestRequestPurchaseTaxRate) MarshalJSON() ([]byte, error) { + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) + } + if i.typ == "TaxRate" || i.TaxRate != nil { + return json.Marshal(i.TaxRate) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) +} + +type ItemRequestRequestPurchaseTaxRateVisitor interface { + VisitString(string) error + VisitTaxRate(*TaxRate) error +} + +func (i *ItemRequestRequestPurchaseTaxRate) Accept(visitor ItemRequestRequestPurchaseTaxRateVisitor) error { + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) + } + if i.typ == "TaxRate" || i.TaxRate != nil { + return visitor.VisitTaxRate(i.TaxRate) + } + return fmt.Errorf("type %T does not include a non-empty union type", i) +} + +// References the default account used to record a sale. +type ItemRequestRequestSalesAccount struct { + String string + Account *Account + + typ string +} + +func (i *ItemRequestRequestSalesAccount) GetString() string { + if i == nil { + return "" + } + return i.String +} + +func (i *ItemRequestRequestSalesAccount) GetAccount() *Account { + if i == nil { + return nil + } + return i.Account +} + +func (i *ItemRequestRequestSalesAccount) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + i.typ = "String" + i.String = valueString + return nil + } + valueAccount := new(Account) + if err := json.Unmarshal(data, &valueAccount); err == nil { + i.typ = "Account" + i.Account = valueAccount + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) +} + +func (i ItemRequestRequestSalesAccount) MarshalJSON() ([]byte, error) { + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) + } + if i.typ == "Account" || i.Account != nil { + return json.Marshal(i.Account) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) +} + +type ItemRequestRequestSalesAccountVisitor interface { + VisitString(string) error + VisitAccount(*Account) error +} + +func (i *ItemRequestRequestSalesAccount) Accept(visitor ItemRequestRequestSalesAccountVisitor) error { + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) + } + if i.typ == "Account" || i.Account != nil { + return visitor.VisitAccount(i.Account) + } + return fmt.Errorf("type %T does not include a non-empty union type", i) +} + +// The default sales tax rate for this item. +type ItemRequestRequestSalesTaxRate struct { + String string + TaxRate *TaxRate + + typ string +} + +func (i *ItemRequestRequestSalesTaxRate) GetString() string { + if i == nil { + return "" + } + return i.String +} + +func (i *ItemRequestRequestSalesTaxRate) GetTaxRate() *TaxRate { + if i == nil { + return nil + } + return i.TaxRate +} + +func (i *ItemRequestRequestSalesTaxRate) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + i.typ = "String" + i.String = valueString + return nil + } + valueTaxRate := new(TaxRate) + if err := json.Unmarshal(data, &valueTaxRate); err == nil { + i.typ = "TaxRate" + i.TaxRate = valueTaxRate + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) +} + +func (i ItemRequestRequestSalesTaxRate) MarshalJSON() ([]byte, error) { + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) + } + if i.typ == "TaxRate" || i.TaxRate != nil { + return json.Marshal(i.TaxRate) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) +} + +type ItemRequestRequestSalesTaxRateVisitor interface { + VisitString(string) error + VisitTaxRate(*TaxRate) error +} + +func (i *ItemRequestRequestSalesTaxRate) Accept(visitor ItemRequestRequestSalesTaxRateVisitor) error { + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) + } + if i.typ == "TaxRate" || i.TaxRate != nil { + return visitor.VisitTaxRate(i.TaxRate) + } + return fmt.Errorf("type %T does not include a non-empty union type", i) +} + +// The item's status. +// +// * `ACTIVE` - ACTIVE +// * `ARCHIVED` - ARCHIVED +type ItemRequestRequestStatus struct { + Status7D1Enum Status7D1Enum + String string + + typ string +} + +func (i *ItemRequestRequestStatus) GetStatus7D1Enum() Status7D1Enum { + if i == nil { + return "" + } + return i.Status7D1Enum +} + +func (i *ItemRequestRequestStatus) GetString() string { + if i == nil { + return "" + } + return i.String +} + +func (i *ItemRequestRequestStatus) UnmarshalJSON(data []byte) error { + var valueStatus7D1Enum Status7D1Enum + if err := json.Unmarshal(data, &valueStatus7D1Enum); err == nil { + i.typ = "Status7D1Enum" + i.Status7D1Enum = valueStatus7D1Enum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + i.typ = "String" + i.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) +} + +func (i ItemRequestRequestStatus) MarshalJSON() ([]byte, error) { + if i.typ == "Status7D1Enum" || i.Status7D1Enum != "" { + return json.Marshal(i.Status7D1Enum) + } + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) +} + +type ItemRequestRequestStatusVisitor interface { + VisitStatus7D1Enum(Status7D1Enum) error + VisitString(string) error +} + +func (i *ItemRequestRequestStatus) Accept(visitor ItemRequestRequestStatusVisitor) error { + if i.typ == "Status7D1Enum" || i.Status7D1Enum != "" { + return visitor.VisitStatus7D1Enum(i.Status7D1Enum) + } + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", i) +} + +// The item's type. +// +// * `INVENTORY` - INVENTORY +// * `NON_INVENTORY` - NON_INVENTORY +// * `SERVICE` - SERVICE +// * `UNKNOWN` - UNKNOWN +type ItemRequestRequestType struct { + Type2BbEnum Type2BbEnum + String string + + typ string +} + +func (i *ItemRequestRequestType) GetType2BbEnum() Type2BbEnum { + if i == nil { + return "" + } + return i.Type2BbEnum +} + +func (i *ItemRequestRequestType) GetString() string { + if i == nil { + return "" + } + return i.String +} + +func (i *ItemRequestRequestType) UnmarshalJSON(data []byte) error { + var valueType2BbEnum Type2BbEnum + if err := json.Unmarshal(data, &valueType2BbEnum); err == nil { + i.typ = "Type2BbEnum" + i.Type2BbEnum = valueType2BbEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + i.typ = "String" + i.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) +} + +func (i ItemRequestRequestType) MarshalJSON() ([]byte, error) { + if i.typ == "Type2BbEnum" || i.Type2BbEnum != "" { + return json.Marshal(i.Type2BbEnum) + } + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) +} + +type ItemRequestRequestTypeVisitor interface { + VisitType2BbEnum(Type2BbEnum) error + VisitString(string) error +} + +func (i *ItemRequestRequestType) Accept(visitor ItemRequestRequestTypeVisitor) error { + if i.typ == "Type2BbEnum" || i.Type2BbEnum != "" { + return visitor.VisitType2BbEnum(i.Type2BbEnum) + } + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", i) +} + +type ItemResponse struct { + Model *Item `json:"model" url:"model"` + Warnings []*WarningValidationProblem `json:"warnings" url:"warnings"` + Errors []*ErrorValidationProblem `json:"errors" url:"errors"` + Logs []*DebugModeLog `json:"logs,omitempty" url:"logs,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (i *ItemResponse) GetModel() *Item { + if i == nil { + return nil + } + return i.Model +} + +func (i *ItemResponse) GetWarnings() []*WarningValidationProblem { + if i == nil { + return nil + } + return i.Warnings +} + +func (i *ItemResponse) GetErrors() []*ErrorValidationProblem { + if i == nil { + return nil + } + return i.Errors +} + +func (i *ItemResponse) GetLogs() []*DebugModeLog { + if i == nil { + return nil + } + return i.Logs +} + +func (i *ItemResponse) GetExtraProperties() map[string]interface{} { + return i.extraProperties +} + +func (i *ItemResponse) UnmarshalJSON(data []byte) error { + type unmarshaler ItemResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *i = ItemResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *i) + if err != nil { + return err + } + i.extraProperties = extraProperties + i.rawJSON = json.RawMessage(data) + return nil +} + +func (i *ItemResponse) String() string { + if len(i.rawJSON) > 0 { + if value, err := internal.StringifyJSON(i.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(i); err == nil { + return value + } + return fmt.Sprintf("%#v", i) +} + +type PaginatedItemList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Item `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedItemList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedItemList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedItemList) GetResults() []*Item { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedItemList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedItemList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedItemList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedItemList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedItemList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +// # The Item Object +// ### Description +// The `Item` object refers to the goods involved in a transaction. +// +// ### Usage Example +// Fetch from the `LIST Items` endpoint and view a company's items. +type PatchedItemRequestRequest struct { + // The item's name. + Name *string `json:"name,omitempty" url:"name,omitempty"` + // The item's status. + // + // * `ACTIVE` - ACTIVE + // * `ARCHIVED` - ARCHIVED + Status *PatchedItemRequestRequestStatus `json:"status,omitempty" url:"status,omitempty"` + // The item's type. + // + // * `INVENTORY` - INVENTORY + // * `NON_INVENTORY` - NON_INVENTORY + // * `SERVICE` - SERVICE + // * `UNKNOWN` - UNKNOWN + Type *PatchedItemRequestRequestType `json:"type,omitempty" url:"type,omitempty"` + // The item's unit price. + UnitPrice *float64 `json:"unit_price,omitempty" url:"unit_price,omitempty"` + // The price at which the item is purchased from a vendor. + PurchasePrice *float64 `json:"purchase_price,omitempty" url:"purchase_price,omitempty"` + // References the default account used to record a purchase of the item. + PurchaseAccount *string `json:"purchase_account,omitempty" url:"purchase_account,omitempty"` + // References the default account used to record a sale. + SalesAccount *string `json:"sales_account,omitempty" url:"sales_account,omitempty"` + // The company the item belongs to. + Company *string `json:"company,omitempty" url:"company,omitempty"` + // The default purchase tax rate for this item. + PurchaseTaxRate *string `json:"purchase_tax_rate,omitempty" url:"purchase_tax_rate,omitempty"` + // The default sales tax rate for this item. + SalesTaxRate *string `json:"sales_tax_rate,omitempty" url:"sales_tax_rate,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PatchedItemRequestRequest) GetName() *string { + if p == nil { + return nil + } + return p.Name +} + +func (p *PatchedItemRequestRequest) GetStatus() *PatchedItemRequestRequestStatus { + if p == nil { + return nil + } + return p.Status +} + +func (p *PatchedItemRequestRequest) GetType() *PatchedItemRequestRequestType { + if p == nil { + return nil + } + return p.Type +} + +func (p *PatchedItemRequestRequest) GetUnitPrice() *float64 { + if p == nil { + return nil + } + return p.UnitPrice +} + +func (p *PatchedItemRequestRequest) GetPurchasePrice() *float64 { + if p == nil { + return nil + } + return p.PurchasePrice +} + +func (p *PatchedItemRequestRequest) GetPurchaseAccount() *string { + if p == nil { + return nil + } + return p.PurchaseAccount +} + +func (p *PatchedItemRequestRequest) GetSalesAccount() *string { + if p == nil { + return nil + } + return p.SalesAccount +} + +func (p *PatchedItemRequestRequest) GetCompany() *string { + if p == nil { + return nil + } + return p.Company +} + +func (p *PatchedItemRequestRequest) GetPurchaseTaxRate() *string { + if p == nil { + return nil + } + return p.PurchaseTaxRate +} + +func (p *PatchedItemRequestRequest) GetSalesTaxRate() *string { + if p == nil { + return nil + } + return p.SalesTaxRate +} + +func (p *PatchedItemRequestRequest) GetIntegrationParams() map[string]interface{} { + if p == nil { + return nil + } + return p.IntegrationParams +} + +func (p *PatchedItemRequestRequest) GetLinkedAccountParams() map[string]interface{} { + if p == nil { + return nil + } + return p.LinkedAccountParams +} + +func (p *PatchedItemRequestRequest) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PatchedItemRequestRequest) UnmarshalJSON(data []byte) error { + type unmarshaler PatchedItemRequestRequest + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PatchedItemRequestRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PatchedItemRequestRequest) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +// The item's status. +// +// * `ACTIVE` - ACTIVE +// * `ARCHIVED` - ARCHIVED +type PatchedItemRequestRequestStatus struct { + Status7D1Enum Status7D1Enum + String string + + typ string +} + +func (p *PatchedItemRequestRequestStatus) GetStatus7D1Enum() Status7D1Enum { + if p == nil { + return "" + } + return p.Status7D1Enum +} + +func (p *PatchedItemRequestRequestStatus) GetString() string { + if p == nil { + return "" + } + return p.String +} + +func (p *PatchedItemRequestRequestStatus) UnmarshalJSON(data []byte) error { + var valueStatus7D1Enum Status7D1Enum + if err := json.Unmarshal(data, &valueStatus7D1Enum); err == nil { + p.typ = "Status7D1Enum" + p.Status7D1Enum = valueStatus7D1Enum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + p.typ = "String" + p.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, p) +} + +func (p PatchedItemRequestRequestStatus) MarshalJSON() ([]byte, error) { + if p.typ == "Status7D1Enum" || p.Status7D1Enum != "" { + return json.Marshal(p.Status7D1Enum) + } + if p.typ == "String" || p.String != "" { + return json.Marshal(p.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) +} + +type PatchedItemRequestRequestStatusVisitor interface { + VisitStatus7D1Enum(Status7D1Enum) error + VisitString(string) error +} + +func (p *PatchedItemRequestRequestStatus) Accept(visitor PatchedItemRequestRequestStatusVisitor) error { + if p.typ == "Status7D1Enum" || p.Status7D1Enum != "" { + return visitor.VisitStatus7D1Enum(p.Status7D1Enum) + } + if p.typ == "String" || p.String != "" { + return visitor.VisitString(p.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", p) +} + +// The item's type. +// +// * `INVENTORY` - INVENTORY +// * `NON_INVENTORY` - NON_INVENTORY +// * `SERVICE` - SERVICE +// * `UNKNOWN` - UNKNOWN +type PatchedItemRequestRequestType struct { + Type2BbEnum Type2BbEnum + String string + + typ string +} + +func (p *PatchedItemRequestRequestType) GetType2BbEnum() Type2BbEnum { + if p == nil { + return "" + } + return p.Type2BbEnum +} + +func (p *PatchedItemRequestRequestType) GetString() string { + if p == nil { + return "" + } + return p.String +} + +func (p *PatchedItemRequestRequestType) UnmarshalJSON(data []byte) error { + var valueType2BbEnum Type2BbEnum + if err := json.Unmarshal(data, &valueType2BbEnum); err == nil { + p.typ = "Type2BbEnum" + p.Type2BbEnum = valueType2BbEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + p.typ = "String" + p.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, p) +} + +func (p PatchedItemRequestRequestType) MarshalJSON() ([]byte, error) { + if p.typ == "Type2BbEnum" || p.Type2BbEnum != "" { + return json.Marshal(p.Type2BbEnum) + } + if p.typ == "String" || p.String != "" { + return json.Marshal(p.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) +} + +type PatchedItemRequestRequestTypeVisitor interface { + VisitType2BbEnum(Type2BbEnum) error + VisitString(string) error +} + +func (p *PatchedItemRequestRequestType) Accept(visitor PatchedItemRequestRequestTypeVisitor) error { + if p.typ == "Type2BbEnum" || p.Type2BbEnum != "" { + return visitor.VisitType2BbEnum(p.Type2BbEnum) + } + if p.typ == "String" || p.String != "" { + return visitor.VisitString(p.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", p) +} diff --git a/accounting/items/client.go b/accounting/items/client.go index 63b9e32..092f92b 100644 --- a/accounting/items/client.go +++ b/accounting/items/client.go @@ -1,98 +1,135 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package items import ( context "context" fmt "fmt" - accounting "github.com/merge-api/merge-go-client/accounting" - core "github.com/merge-api/merge-go-client/core" + accounting "github.com/merge-api/merge-go-client/v2/accounting" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `Item` objects. -func (c *Client) List(ctx context.Context, request *accounting.ItemsListRequest) (*accounting.PaginatedItemList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL +func (c *Client) List( + ctx context.Context, + request *accounting.ItemsListRequest, + opts ...option.RequestOption, +) (*core.Page[*accounting.Item], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/items" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } - endpointURL := baseURL + "/" + "accounting/v1/items" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) - queryParams := make(url.Values) - if request.CompanyId != nil { - queryParams.Add("company_id", fmt.Sprintf("%v", *request.CompanyId)) - } - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) + readPageResponse := func(response *accounting.PaginatedItemList) *internal.PageResponse[*string, *accounting.Item] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *accounting.Item]{ + Next: next, + Results: results, + Done: next == zeroValue, + } } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteFields != nil { - queryParams.Add("remote_fields", fmt.Sprintf("%v", request.RemoteFields)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if request.ShowEnumOrigins != nil { - queryParams.Add("show_enum_origins", fmt.Sprintf("%v", request.ShowEnumOrigins)) + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) +} + +// Creates an `Item` object with the given values. +func (c *Client) Create( + ctx context.Context, + request *accounting.ItemEndpointRequest, + opts ...option.RequestOption, +) (*accounting.ItemResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/items" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") - var response *accounting.PaginatedItemList + var response *accounting.ItemResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -101,38 +138,172 @@ func (c *Client) List(ctx context.Context, request *accounting.ItemsListRequest) } // Returns an `Item` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *accounting.ItemsRetrieveRequest) (*accounting.Item, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"accounting/v1/items/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *accounting.ItemsRetrieveRequest, + opts ...option.RequestOption, +) (*accounting.Item, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/accounting/v1/items/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) + if len(queryParams) > 0 { + endpointURL += "?" + queryParams.Encode() } - if request.RemoteFields != nil { - queryParams.Add("remote_fields", fmt.Sprintf("%v", request.RemoteFields)) + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + var response *accounting.Item + if err := c.caller.Call( + ctx, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, + }, + ); err != nil { + return nil, err } - if request.ShowEnumOrigins != nil { - queryParams.Add("show_enum_origins", fmt.Sprintf("%v", request.ShowEnumOrigins)) + return response, nil +} + +// Updates an `Item` object with the given `id`. +func (c *Client) PartialUpdate( + ctx context.Context, + id string, + request *accounting.PatchedItemEndpointRequest, + opts ...option.RequestOption, +) (*accounting.ItemResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/accounting/v1/items/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") - var response *accounting.Item + var response *accounting.ItemResponse + if err := c.caller.Call( + ctx, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPatch, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, + }, + ); err != nil { + return nil, err + } + return response, nil +} + +// Returns metadata for `Item` PATCHs. +func (c *Client) MetaPatchRetrieve( + ctx context.Context, + id string, + opts ...option.RequestOption, +) (*accounting.MetaResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/accounting/v1/items/meta/patch/%v", + id, + ) + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + var response *accounting.MetaResponse + if err := c.caller.Call( + ctx, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, + }, + ); err != nil { + return nil, err + } + return response, nil +} + +// Returns metadata for `Item` POSTs. +func (c *Client) MetaPostRetrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*accounting.MetaResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/items/meta/post" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + var response *accounting.MetaResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/accounting/journal_entries.go b/accounting/journal_entries.go index 6958c01..a2c52e0 100644 --- a/accounting/journal_entries.go +++ b/accounting/journal_entries.go @@ -1,498 +1,5028 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package accounting import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type JournalEntryEndpointRequest struct { // Whether to include debug fields (such as log file links) in the response. - IsDebugMode *bool `json:"-"` + IsDebugMode *bool `json:"-" url:"is_debug_mode,omitempty"` // Whether or not third-party updates should be run asynchronously. - RunAsync *bool `json:"-"` - Model *JournalEntryRequest `json:"model,omitempty"` + RunAsync *bool `json:"-" url:"run_async,omitempty"` + Model *JournalEntryRequest `json:"model,omitempty" url:"-"` } type JournalEntriesLinesRemoteFieldClassesListRequest struct { // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, will only return remote field classes with this is_common_model_field value - IsCommonModelField *bool `json:"-"` + IsCommonModelField *bool `json:"-" url:"is_common_model_field,omitempty"` + // If provided, will only return remote fields classes with this is_custom value + IsCustom *bool `json:"-" url:"is_custom,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` } type JournalEntriesListRequest struct { // If provided, will only return journal entries for this company. - CompanyId *string `json:"-"` + CompanyId *string `json:"-" url:"company_id,omitempty"` // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *JournalEntriesListRequestExpand `json:"-"` + Expand []*JournalEntriesListRequestExpandItem `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - IncludeRemoteFields *bool `json:"-"` + IncludeRemoteFields *bool `json:"-" url:"include_remote_fields,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` // If provided, will only return objects created after this datetime. - TransactionDateAfter *time.Time `json:"-"` + TransactionDateAfter *time.Time `json:"-" url:"transaction_date_after,omitempty"` // If provided, will only return objects created before this datetime. - TransactionDateBefore *time.Time `json:"-"` + TransactionDateBefore *time.Time `json:"-" url:"transaction_date_before,omitempty"` } type JournalEntriesRemoteFieldClassesListRequest struct { // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, will only return remote field classes with this is_common_model_field value - IsCommonModelField *bool `json:"-"` + IsCommonModelField *bool `json:"-" url:"is_common_model_field,omitempty"` + // If provided, will only return remote fields classes with this is_custom value + IsCustom *bool `json:"-" url:"is_custom,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` } type JournalEntriesRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *JournalEntriesRetrieveRequestExpand `json:"-"` + Expand []*JournalEntriesRetrieveRequestExpandItem `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - IncludeRemoteFields *bool `json:"-"` + IncludeRemoteFields *bool `json:"-" url:"include_remote_fields,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` } -type JournalEntriesListRequestExpand string +type JournalEntriesListRequestExpandItem string const ( - JournalEntriesListRequestExpandAccountingPeriod JournalEntriesListRequestExpand = "accounting_period" - JournalEntriesListRequestExpandAppliedPayments JournalEntriesListRequestExpand = "applied_payments" - JournalEntriesListRequestExpandAppliedPaymentsAccountingPeriod JournalEntriesListRequestExpand = "applied_payments,accounting_period" - JournalEntriesListRequestExpandAppliedPaymentsCompany JournalEntriesListRequestExpand = "applied_payments,company" - JournalEntriesListRequestExpandAppliedPaymentsCompanyAccountingPeriod JournalEntriesListRequestExpand = "applied_payments,company,accounting_period" - JournalEntriesListRequestExpandAppliedPaymentsTrackingCategories JournalEntriesListRequestExpand = "applied_payments,tracking_categories" - JournalEntriesListRequestExpandAppliedPaymentsTrackingCategoriesAccountingPeriod JournalEntriesListRequestExpand = "applied_payments,tracking_categories,accounting_period" - JournalEntriesListRequestExpandAppliedPaymentsTrackingCategoriesCompany JournalEntriesListRequestExpand = "applied_payments,tracking_categories,company" - JournalEntriesListRequestExpandAppliedPaymentsTrackingCategoriesCompanyAccountingPeriod JournalEntriesListRequestExpand = "applied_payments,tracking_categories,company,accounting_period" - JournalEntriesListRequestExpandCompany JournalEntriesListRequestExpand = "company" - JournalEntriesListRequestExpandCompanyAccountingPeriod JournalEntriesListRequestExpand = "company,accounting_period" - JournalEntriesListRequestExpandLines JournalEntriesListRequestExpand = "lines" - JournalEntriesListRequestExpandLinesAccountingPeriod JournalEntriesListRequestExpand = "lines,accounting_period" - JournalEntriesListRequestExpandLinesAppliedPayments JournalEntriesListRequestExpand = "lines,applied_payments" - JournalEntriesListRequestExpandLinesAppliedPaymentsAccountingPeriod JournalEntriesListRequestExpand = "lines,applied_payments,accounting_period" - JournalEntriesListRequestExpandLinesAppliedPaymentsCompany JournalEntriesListRequestExpand = "lines,applied_payments,company" - JournalEntriesListRequestExpandLinesAppliedPaymentsCompanyAccountingPeriod JournalEntriesListRequestExpand = "lines,applied_payments,company,accounting_period" - JournalEntriesListRequestExpandLinesAppliedPaymentsTrackingCategories JournalEntriesListRequestExpand = "lines,applied_payments,tracking_categories" - JournalEntriesListRequestExpandLinesAppliedPaymentsTrackingCategoriesAccountingPeriod JournalEntriesListRequestExpand = "lines,applied_payments,tracking_categories,accounting_period" - JournalEntriesListRequestExpandLinesAppliedPaymentsTrackingCategoriesCompany JournalEntriesListRequestExpand = "lines,applied_payments,tracking_categories,company" - JournalEntriesListRequestExpandLinesAppliedPaymentsTrackingCategoriesCompanyAccountingPeriod JournalEntriesListRequestExpand = "lines,applied_payments,tracking_categories,company,accounting_period" - JournalEntriesListRequestExpandLinesCompany JournalEntriesListRequestExpand = "lines,company" - JournalEntriesListRequestExpandLinesCompanyAccountingPeriod JournalEntriesListRequestExpand = "lines,company,accounting_period" - JournalEntriesListRequestExpandLinesPayments JournalEntriesListRequestExpand = "lines,payments" - JournalEntriesListRequestExpandLinesPaymentsAccountingPeriod JournalEntriesListRequestExpand = "lines,payments,accounting_period" - JournalEntriesListRequestExpandLinesPaymentsAppliedPayments JournalEntriesListRequestExpand = "lines,payments,applied_payments" - JournalEntriesListRequestExpandLinesPaymentsAppliedPaymentsAccountingPeriod JournalEntriesListRequestExpand = "lines,payments,applied_payments,accounting_period" - JournalEntriesListRequestExpandLinesPaymentsAppliedPaymentsCompany JournalEntriesListRequestExpand = "lines,payments,applied_payments,company" - JournalEntriesListRequestExpandLinesPaymentsAppliedPaymentsCompanyAccountingPeriod JournalEntriesListRequestExpand = "lines,payments,applied_payments,company,accounting_period" - JournalEntriesListRequestExpandLinesPaymentsAppliedPaymentsTrackingCategories JournalEntriesListRequestExpand = "lines,payments,applied_payments,tracking_categories" - JournalEntriesListRequestExpandLinesPaymentsAppliedPaymentsTrackingCategoriesAccountingPeriod JournalEntriesListRequestExpand = "lines,payments,applied_payments,tracking_categories,accounting_period" - JournalEntriesListRequestExpandLinesPaymentsAppliedPaymentsTrackingCategoriesCompany JournalEntriesListRequestExpand = "lines,payments,applied_payments,tracking_categories,company" - JournalEntriesListRequestExpandLinesPaymentsAppliedPaymentsTrackingCategoriesCompanyAccountingPeriod JournalEntriesListRequestExpand = "lines,payments,applied_payments,tracking_categories,company,accounting_period" - JournalEntriesListRequestExpandLinesPaymentsCompany JournalEntriesListRequestExpand = "lines,payments,company" - JournalEntriesListRequestExpandLinesPaymentsCompanyAccountingPeriod JournalEntriesListRequestExpand = "lines,payments,company,accounting_period" - JournalEntriesListRequestExpandLinesPaymentsTrackingCategories JournalEntriesListRequestExpand = "lines,payments,tracking_categories" - JournalEntriesListRequestExpandLinesPaymentsTrackingCategoriesAccountingPeriod JournalEntriesListRequestExpand = "lines,payments,tracking_categories,accounting_period" - JournalEntriesListRequestExpandLinesPaymentsTrackingCategoriesCompany JournalEntriesListRequestExpand = "lines,payments,tracking_categories,company" - JournalEntriesListRequestExpandLinesPaymentsTrackingCategoriesCompanyAccountingPeriod JournalEntriesListRequestExpand = "lines,payments,tracking_categories,company,accounting_period" - JournalEntriesListRequestExpandLinesTrackingCategories JournalEntriesListRequestExpand = "lines,tracking_categories" - JournalEntriesListRequestExpandLinesTrackingCategoriesAccountingPeriod JournalEntriesListRequestExpand = "lines,tracking_categories,accounting_period" - JournalEntriesListRequestExpandLinesTrackingCategoriesCompany JournalEntriesListRequestExpand = "lines,tracking_categories,company" - JournalEntriesListRequestExpandLinesTrackingCategoriesCompanyAccountingPeriod JournalEntriesListRequestExpand = "lines,tracking_categories,company,accounting_period" - JournalEntriesListRequestExpandPayments JournalEntriesListRequestExpand = "payments" - JournalEntriesListRequestExpandPaymentsAccountingPeriod JournalEntriesListRequestExpand = "payments,accounting_period" - JournalEntriesListRequestExpandPaymentsAppliedPayments JournalEntriesListRequestExpand = "payments,applied_payments" - JournalEntriesListRequestExpandPaymentsAppliedPaymentsAccountingPeriod JournalEntriesListRequestExpand = "payments,applied_payments,accounting_period" - JournalEntriesListRequestExpandPaymentsAppliedPaymentsCompany JournalEntriesListRequestExpand = "payments,applied_payments,company" - JournalEntriesListRequestExpandPaymentsAppliedPaymentsCompanyAccountingPeriod JournalEntriesListRequestExpand = "payments,applied_payments,company,accounting_period" - JournalEntriesListRequestExpandPaymentsAppliedPaymentsTrackingCategories JournalEntriesListRequestExpand = "payments,applied_payments,tracking_categories" - JournalEntriesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAccountingPeriod JournalEntriesListRequestExpand = "payments,applied_payments,tracking_categories,accounting_period" - JournalEntriesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesCompany JournalEntriesListRequestExpand = "payments,applied_payments,tracking_categories,company" - JournalEntriesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesCompanyAccountingPeriod JournalEntriesListRequestExpand = "payments,applied_payments,tracking_categories,company,accounting_period" - JournalEntriesListRequestExpandPaymentsCompany JournalEntriesListRequestExpand = "payments,company" - JournalEntriesListRequestExpandPaymentsCompanyAccountingPeriod JournalEntriesListRequestExpand = "payments,company,accounting_period" - JournalEntriesListRequestExpandPaymentsTrackingCategories JournalEntriesListRequestExpand = "payments,tracking_categories" - JournalEntriesListRequestExpandPaymentsTrackingCategoriesAccountingPeriod JournalEntriesListRequestExpand = "payments,tracking_categories,accounting_period" - JournalEntriesListRequestExpandPaymentsTrackingCategoriesCompany JournalEntriesListRequestExpand = "payments,tracking_categories,company" - JournalEntriesListRequestExpandPaymentsTrackingCategoriesCompanyAccountingPeriod JournalEntriesListRequestExpand = "payments,tracking_categories,company,accounting_period" - JournalEntriesListRequestExpandTrackingCategories JournalEntriesListRequestExpand = "tracking_categories" - JournalEntriesListRequestExpandTrackingCategoriesAccountingPeriod JournalEntriesListRequestExpand = "tracking_categories,accounting_period" - JournalEntriesListRequestExpandTrackingCategoriesCompany JournalEntriesListRequestExpand = "tracking_categories,company" - JournalEntriesListRequestExpandTrackingCategoriesCompanyAccountingPeriod JournalEntriesListRequestExpand = "tracking_categories,company,accounting_period" + JournalEntriesListRequestExpandItemAccountingPeriod JournalEntriesListRequestExpandItem = "accounting_period" + JournalEntriesListRequestExpandItemAppliedPayments JournalEntriesListRequestExpandItem = "applied_payments" + JournalEntriesListRequestExpandItemCompany JournalEntriesListRequestExpandItem = "company" + JournalEntriesListRequestExpandItemLines JournalEntriesListRequestExpandItem = "lines" + JournalEntriesListRequestExpandItemPayments JournalEntriesListRequestExpandItem = "payments" + JournalEntriesListRequestExpandItemTrackingCategories JournalEntriesListRequestExpandItem = "tracking_categories" ) -func NewJournalEntriesListRequestExpandFromString(s string) (JournalEntriesListRequestExpand, error) { +func NewJournalEntriesListRequestExpandItemFromString(s string) (JournalEntriesListRequestExpandItem, error) { switch s { case "accounting_period": - return JournalEntriesListRequestExpandAccountingPeriod, nil + return JournalEntriesListRequestExpandItemAccountingPeriod, nil case "applied_payments": - return JournalEntriesListRequestExpandAppliedPayments, nil - case "applied_payments,accounting_period": - return JournalEntriesListRequestExpandAppliedPaymentsAccountingPeriod, nil - case "applied_payments,company": - return JournalEntriesListRequestExpandAppliedPaymentsCompany, nil - case "applied_payments,company,accounting_period": - return JournalEntriesListRequestExpandAppliedPaymentsCompanyAccountingPeriod, nil - case "applied_payments,tracking_categories": - return JournalEntriesListRequestExpandAppliedPaymentsTrackingCategories, nil - case "applied_payments,tracking_categories,accounting_period": - return JournalEntriesListRequestExpandAppliedPaymentsTrackingCategoriesAccountingPeriod, nil - case "applied_payments,tracking_categories,company": - return JournalEntriesListRequestExpandAppliedPaymentsTrackingCategoriesCompany, nil - case "applied_payments,tracking_categories,company,accounting_period": - return JournalEntriesListRequestExpandAppliedPaymentsTrackingCategoriesCompanyAccountingPeriod, nil + return JournalEntriesListRequestExpandItemAppliedPayments, nil case "company": - return JournalEntriesListRequestExpandCompany, nil - case "company,accounting_period": - return JournalEntriesListRequestExpandCompanyAccountingPeriod, nil + return JournalEntriesListRequestExpandItemCompany, nil case "lines": - return JournalEntriesListRequestExpandLines, nil - case "lines,accounting_period": - return JournalEntriesListRequestExpandLinesAccountingPeriod, nil - case "lines,applied_payments": - return JournalEntriesListRequestExpandLinesAppliedPayments, nil - case "lines,applied_payments,accounting_period": - return JournalEntriesListRequestExpandLinesAppliedPaymentsAccountingPeriod, nil - case "lines,applied_payments,company": - return JournalEntriesListRequestExpandLinesAppliedPaymentsCompany, nil - case "lines,applied_payments,company,accounting_period": - return JournalEntriesListRequestExpandLinesAppliedPaymentsCompanyAccountingPeriod, nil - case "lines,applied_payments,tracking_categories": - return JournalEntriesListRequestExpandLinesAppliedPaymentsTrackingCategories, nil - case "lines,applied_payments,tracking_categories,accounting_period": - return JournalEntriesListRequestExpandLinesAppliedPaymentsTrackingCategoriesAccountingPeriod, nil - case "lines,applied_payments,tracking_categories,company": - return JournalEntriesListRequestExpandLinesAppliedPaymentsTrackingCategoriesCompany, nil - case "lines,applied_payments,tracking_categories,company,accounting_period": - return JournalEntriesListRequestExpandLinesAppliedPaymentsTrackingCategoriesCompanyAccountingPeriod, nil - case "lines,company": - return JournalEntriesListRequestExpandLinesCompany, nil - case "lines,company,accounting_period": - return JournalEntriesListRequestExpandLinesCompanyAccountingPeriod, nil - case "lines,payments": - return JournalEntriesListRequestExpandLinesPayments, nil - case "lines,payments,accounting_period": - return JournalEntriesListRequestExpandLinesPaymentsAccountingPeriod, nil - case "lines,payments,applied_payments": - return JournalEntriesListRequestExpandLinesPaymentsAppliedPayments, nil - case "lines,payments,applied_payments,accounting_period": - return JournalEntriesListRequestExpandLinesPaymentsAppliedPaymentsAccountingPeriod, nil - case "lines,payments,applied_payments,company": - return JournalEntriesListRequestExpandLinesPaymentsAppliedPaymentsCompany, nil - case "lines,payments,applied_payments,company,accounting_period": - return JournalEntriesListRequestExpandLinesPaymentsAppliedPaymentsCompanyAccountingPeriod, nil - case "lines,payments,applied_payments,tracking_categories": - return JournalEntriesListRequestExpandLinesPaymentsAppliedPaymentsTrackingCategories, nil - case "lines,payments,applied_payments,tracking_categories,accounting_period": - return JournalEntriesListRequestExpandLinesPaymentsAppliedPaymentsTrackingCategoriesAccountingPeriod, nil - case "lines,payments,applied_payments,tracking_categories,company": - return JournalEntriesListRequestExpandLinesPaymentsAppliedPaymentsTrackingCategoriesCompany, nil - case "lines,payments,applied_payments,tracking_categories,company,accounting_period": - return JournalEntriesListRequestExpandLinesPaymentsAppliedPaymentsTrackingCategoriesCompanyAccountingPeriod, nil - case "lines,payments,company": - return JournalEntriesListRequestExpandLinesPaymentsCompany, nil - case "lines,payments,company,accounting_period": - return JournalEntriesListRequestExpandLinesPaymentsCompanyAccountingPeriod, nil - case "lines,payments,tracking_categories": - return JournalEntriesListRequestExpandLinesPaymentsTrackingCategories, nil - case "lines,payments,tracking_categories,accounting_period": - return JournalEntriesListRequestExpandLinesPaymentsTrackingCategoriesAccountingPeriod, nil - case "lines,payments,tracking_categories,company": - return JournalEntriesListRequestExpandLinesPaymentsTrackingCategoriesCompany, nil - case "lines,payments,tracking_categories,company,accounting_period": - return JournalEntriesListRequestExpandLinesPaymentsTrackingCategoriesCompanyAccountingPeriod, nil - case "lines,tracking_categories": - return JournalEntriesListRequestExpandLinesTrackingCategories, nil - case "lines,tracking_categories,accounting_period": - return JournalEntriesListRequestExpandLinesTrackingCategoriesAccountingPeriod, nil - case "lines,tracking_categories,company": - return JournalEntriesListRequestExpandLinesTrackingCategoriesCompany, nil - case "lines,tracking_categories,company,accounting_period": - return JournalEntriesListRequestExpandLinesTrackingCategoriesCompanyAccountingPeriod, nil + return JournalEntriesListRequestExpandItemLines, nil case "payments": - return JournalEntriesListRequestExpandPayments, nil - case "payments,accounting_period": - return JournalEntriesListRequestExpandPaymentsAccountingPeriod, nil - case "payments,applied_payments": - return JournalEntriesListRequestExpandPaymentsAppliedPayments, nil - case "payments,applied_payments,accounting_period": - return JournalEntriesListRequestExpandPaymentsAppliedPaymentsAccountingPeriod, nil - case "payments,applied_payments,company": - return JournalEntriesListRequestExpandPaymentsAppliedPaymentsCompany, nil - case "payments,applied_payments,company,accounting_period": - return JournalEntriesListRequestExpandPaymentsAppliedPaymentsCompanyAccountingPeriod, nil - case "payments,applied_payments,tracking_categories": - return JournalEntriesListRequestExpandPaymentsAppliedPaymentsTrackingCategories, nil - case "payments,applied_payments,tracking_categories,accounting_period": - return JournalEntriesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,company": - return JournalEntriesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesCompany, nil - case "payments,applied_payments,tracking_categories,company,accounting_period": - return JournalEntriesListRequestExpandPaymentsAppliedPaymentsTrackingCategoriesCompanyAccountingPeriod, nil - case "payments,company": - return JournalEntriesListRequestExpandPaymentsCompany, nil - case "payments,company,accounting_period": - return JournalEntriesListRequestExpandPaymentsCompanyAccountingPeriod, nil - case "payments,tracking_categories": - return JournalEntriesListRequestExpandPaymentsTrackingCategories, nil - case "payments,tracking_categories,accounting_period": - return JournalEntriesListRequestExpandPaymentsTrackingCategoriesAccountingPeriod, nil - case "payments,tracking_categories,company": - return JournalEntriesListRequestExpandPaymentsTrackingCategoriesCompany, nil - case "payments,tracking_categories,company,accounting_period": - return JournalEntriesListRequestExpandPaymentsTrackingCategoriesCompanyAccountingPeriod, nil + return JournalEntriesListRequestExpandItemPayments, nil case "tracking_categories": - return JournalEntriesListRequestExpandTrackingCategories, nil - case "tracking_categories,accounting_period": - return JournalEntriesListRequestExpandTrackingCategoriesAccountingPeriod, nil - case "tracking_categories,company": - return JournalEntriesListRequestExpandTrackingCategoriesCompany, nil - case "tracking_categories,company,accounting_period": - return JournalEntriesListRequestExpandTrackingCategoriesCompanyAccountingPeriod, nil - } - var t JournalEntriesListRequestExpand + return JournalEntriesListRequestExpandItemTrackingCategories, nil + } + var t JournalEntriesListRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (j JournalEntriesListRequestExpand) Ptr() *JournalEntriesListRequestExpand { +func (j JournalEntriesListRequestExpandItem) Ptr() *JournalEntriesListRequestExpandItem { return &j } -type JournalEntriesRetrieveRequestExpand string +type JournalEntriesRetrieveRequestExpandItem string const ( - JournalEntriesRetrieveRequestExpandAccountingPeriod JournalEntriesRetrieveRequestExpand = "accounting_period" - JournalEntriesRetrieveRequestExpandAppliedPayments JournalEntriesRetrieveRequestExpand = "applied_payments" - JournalEntriesRetrieveRequestExpandAppliedPaymentsAccountingPeriod JournalEntriesRetrieveRequestExpand = "applied_payments,accounting_period" - JournalEntriesRetrieveRequestExpandAppliedPaymentsCompany JournalEntriesRetrieveRequestExpand = "applied_payments,company" - JournalEntriesRetrieveRequestExpandAppliedPaymentsCompanyAccountingPeriod JournalEntriesRetrieveRequestExpand = "applied_payments,company,accounting_period" - JournalEntriesRetrieveRequestExpandAppliedPaymentsTrackingCategories JournalEntriesRetrieveRequestExpand = "applied_payments,tracking_categories" - JournalEntriesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAccountingPeriod JournalEntriesRetrieveRequestExpand = "applied_payments,tracking_categories,accounting_period" - JournalEntriesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesCompany JournalEntriesRetrieveRequestExpand = "applied_payments,tracking_categories,company" - JournalEntriesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesCompanyAccountingPeriod JournalEntriesRetrieveRequestExpand = "applied_payments,tracking_categories,company,accounting_period" - JournalEntriesRetrieveRequestExpandCompany JournalEntriesRetrieveRequestExpand = "company" - JournalEntriesRetrieveRequestExpandCompanyAccountingPeriod JournalEntriesRetrieveRequestExpand = "company,accounting_period" - JournalEntriesRetrieveRequestExpandLines JournalEntriesRetrieveRequestExpand = "lines" - JournalEntriesRetrieveRequestExpandLinesAccountingPeriod JournalEntriesRetrieveRequestExpand = "lines,accounting_period" - JournalEntriesRetrieveRequestExpandLinesAppliedPayments JournalEntriesRetrieveRequestExpand = "lines,applied_payments" - JournalEntriesRetrieveRequestExpandLinesAppliedPaymentsAccountingPeriod JournalEntriesRetrieveRequestExpand = "lines,applied_payments,accounting_period" - JournalEntriesRetrieveRequestExpandLinesAppliedPaymentsCompany JournalEntriesRetrieveRequestExpand = "lines,applied_payments,company" - JournalEntriesRetrieveRequestExpandLinesAppliedPaymentsCompanyAccountingPeriod JournalEntriesRetrieveRequestExpand = "lines,applied_payments,company,accounting_period" - JournalEntriesRetrieveRequestExpandLinesAppliedPaymentsTrackingCategories JournalEntriesRetrieveRequestExpand = "lines,applied_payments,tracking_categories" - JournalEntriesRetrieveRequestExpandLinesAppliedPaymentsTrackingCategoriesAccountingPeriod JournalEntriesRetrieveRequestExpand = "lines,applied_payments,tracking_categories,accounting_period" - JournalEntriesRetrieveRequestExpandLinesAppliedPaymentsTrackingCategoriesCompany JournalEntriesRetrieveRequestExpand = "lines,applied_payments,tracking_categories,company" - JournalEntriesRetrieveRequestExpandLinesAppliedPaymentsTrackingCategoriesCompanyAccountingPeriod JournalEntriesRetrieveRequestExpand = "lines,applied_payments,tracking_categories,company,accounting_period" - JournalEntriesRetrieveRequestExpandLinesCompany JournalEntriesRetrieveRequestExpand = "lines,company" - JournalEntriesRetrieveRequestExpandLinesCompanyAccountingPeriod JournalEntriesRetrieveRequestExpand = "lines,company,accounting_period" - JournalEntriesRetrieveRequestExpandLinesPayments JournalEntriesRetrieveRequestExpand = "lines,payments" - JournalEntriesRetrieveRequestExpandLinesPaymentsAccountingPeriod JournalEntriesRetrieveRequestExpand = "lines,payments,accounting_period" - JournalEntriesRetrieveRequestExpandLinesPaymentsAppliedPayments JournalEntriesRetrieveRequestExpand = "lines,payments,applied_payments" - JournalEntriesRetrieveRequestExpandLinesPaymentsAppliedPaymentsAccountingPeriod JournalEntriesRetrieveRequestExpand = "lines,payments,applied_payments,accounting_period" - JournalEntriesRetrieveRequestExpandLinesPaymentsAppliedPaymentsCompany JournalEntriesRetrieveRequestExpand = "lines,payments,applied_payments,company" - JournalEntriesRetrieveRequestExpandLinesPaymentsAppliedPaymentsCompanyAccountingPeriod JournalEntriesRetrieveRequestExpand = "lines,payments,applied_payments,company,accounting_period" - JournalEntriesRetrieveRequestExpandLinesPaymentsAppliedPaymentsTrackingCategories JournalEntriesRetrieveRequestExpand = "lines,payments,applied_payments,tracking_categories" - JournalEntriesRetrieveRequestExpandLinesPaymentsAppliedPaymentsTrackingCategoriesAccountingPeriod JournalEntriesRetrieveRequestExpand = "lines,payments,applied_payments,tracking_categories,accounting_period" - JournalEntriesRetrieveRequestExpandLinesPaymentsAppliedPaymentsTrackingCategoriesCompany JournalEntriesRetrieveRequestExpand = "lines,payments,applied_payments,tracking_categories,company" - JournalEntriesRetrieveRequestExpandLinesPaymentsAppliedPaymentsTrackingCategoriesCompanyAccountingPeriod JournalEntriesRetrieveRequestExpand = "lines,payments,applied_payments,tracking_categories,company,accounting_period" - JournalEntriesRetrieveRequestExpandLinesPaymentsCompany JournalEntriesRetrieveRequestExpand = "lines,payments,company" - JournalEntriesRetrieveRequestExpandLinesPaymentsCompanyAccountingPeriod JournalEntriesRetrieveRequestExpand = "lines,payments,company,accounting_period" - JournalEntriesRetrieveRequestExpandLinesPaymentsTrackingCategories JournalEntriesRetrieveRequestExpand = "lines,payments,tracking_categories" - JournalEntriesRetrieveRequestExpandLinesPaymentsTrackingCategoriesAccountingPeriod JournalEntriesRetrieveRequestExpand = "lines,payments,tracking_categories,accounting_period" - JournalEntriesRetrieveRequestExpandLinesPaymentsTrackingCategoriesCompany JournalEntriesRetrieveRequestExpand = "lines,payments,tracking_categories,company" - JournalEntriesRetrieveRequestExpandLinesPaymentsTrackingCategoriesCompanyAccountingPeriod JournalEntriesRetrieveRequestExpand = "lines,payments,tracking_categories,company,accounting_period" - JournalEntriesRetrieveRequestExpandLinesTrackingCategories JournalEntriesRetrieveRequestExpand = "lines,tracking_categories" - JournalEntriesRetrieveRequestExpandLinesTrackingCategoriesAccountingPeriod JournalEntriesRetrieveRequestExpand = "lines,tracking_categories,accounting_period" - JournalEntriesRetrieveRequestExpandLinesTrackingCategoriesCompany JournalEntriesRetrieveRequestExpand = "lines,tracking_categories,company" - JournalEntriesRetrieveRequestExpandLinesTrackingCategoriesCompanyAccountingPeriod JournalEntriesRetrieveRequestExpand = "lines,tracking_categories,company,accounting_period" - JournalEntriesRetrieveRequestExpandPayments JournalEntriesRetrieveRequestExpand = "payments" - JournalEntriesRetrieveRequestExpandPaymentsAccountingPeriod JournalEntriesRetrieveRequestExpand = "payments,accounting_period" - JournalEntriesRetrieveRequestExpandPaymentsAppliedPayments JournalEntriesRetrieveRequestExpand = "payments,applied_payments" - JournalEntriesRetrieveRequestExpandPaymentsAppliedPaymentsAccountingPeriod JournalEntriesRetrieveRequestExpand = "payments,applied_payments,accounting_period" - JournalEntriesRetrieveRequestExpandPaymentsAppliedPaymentsCompany JournalEntriesRetrieveRequestExpand = "payments,applied_payments,company" - JournalEntriesRetrieveRequestExpandPaymentsAppliedPaymentsCompanyAccountingPeriod JournalEntriesRetrieveRequestExpand = "payments,applied_payments,company,accounting_period" - JournalEntriesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategories JournalEntriesRetrieveRequestExpand = "payments,applied_payments,tracking_categories" - JournalEntriesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAccountingPeriod JournalEntriesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,accounting_period" - JournalEntriesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesCompany JournalEntriesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,company" - JournalEntriesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesCompanyAccountingPeriod JournalEntriesRetrieveRequestExpand = "payments,applied_payments,tracking_categories,company,accounting_period" - JournalEntriesRetrieveRequestExpandPaymentsCompany JournalEntriesRetrieveRequestExpand = "payments,company" - JournalEntriesRetrieveRequestExpandPaymentsCompanyAccountingPeriod JournalEntriesRetrieveRequestExpand = "payments,company,accounting_period" - JournalEntriesRetrieveRequestExpandPaymentsTrackingCategories JournalEntriesRetrieveRequestExpand = "payments,tracking_categories" - JournalEntriesRetrieveRequestExpandPaymentsTrackingCategoriesAccountingPeriod JournalEntriesRetrieveRequestExpand = "payments,tracking_categories,accounting_period" - JournalEntriesRetrieveRequestExpandPaymentsTrackingCategoriesCompany JournalEntriesRetrieveRequestExpand = "payments,tracking_categories,company" - JournalEntriesRetrieveRequestExpandPaymentsTrackingCategoriesCompanyAccountingPeriod JournalEntriesRetrieveRequestExpand = "payments,tracking_categories,company,accounting_period" - JournalEntriesRetrieveRequestExpandTrackingCategories JournalEntriesRetrieveRequestExpand = "tracking_categories" - JournalEntriesRetrieveRequestExpandTrackingCategoriesAccountingPeriod JournalEntriesRetrieveRequestExpand = "tracking_categories,accounting_period" - JournalEntriesRetrieveRequestExpandTrackingCategoriesCompany JournalEntriesRetrieveRequestExpand = "tracking_categories,company" - JournalEntriesRetrieveRequestExpandTrackingCategoriesCompanyAccountingPeriod JournalEntriesRetrieveRequestExpand = "tracking_categories,company,accounting_period" + JournalEntriesRetrieveRequestExpandItemAccountingPeriod JournalEntriesRetrieveRequestExpandItem = "accounting_period" + JournalEntriesRetrieveRequestExpandItemAppliedPayments JournalEntriesRetrieveRequestExpandItem = "applied_payments" + JournalEntriesRetrieveRequestExpandItemCompany JournalEntriesRetrieveRequestExpandItem = "company" + JournalEntriesRetrieveRequestExpandItemLines JournalEntriesRetrieveRequestExpandItem = "lines" + JournalEntriesRetrieveRequestExpandItemPayments JournalEntriesRetrieveRequestExpandItem = "payments" + JournalEntriesRetrieveRequestExpandItemTrackingCategories JournalEntriesRetrieveRequestExpandItem = "tracking_categories" ) -func NewJournalEntriesRetrieveRequestExpandFromString(s string) (JournalEntriesRetrieveRequestExpand, error) { +func NewJournalEntriesRetrieveRequestExpandItemFromString(s string) (JournalEntriesRetrieveRequestExpandItem, error) { switch s { case "accounting_period": - return JournalEntriesRetrieveRequestExpandAccountingPeriod, nil + return JournalEntriesRetrieveRequestExpandItemAccountingPeriod, nil case "applied_payments": - return JournalEntriesRetrieveRequestExpandAppliedPayments, nil - case "applied_payments,accounting_period": - return JournalEntriesRetrieveRequestExpandAppliedPaymentsAccountingPeriod, nil - case "applied_payments,company": - return JournalEntriesRetrieveRequestExpandAppliedPaymentsCompany, nil - case "applied_payments,company,accounting_period": - return JournalEntriesRetrieveRequestExpandAppliedPaymentsCompanyAccountingPeriod, nil - case "applied_payments,tracking_categories": - return JournalEntriesRetrieveRequestExpandAppliedPaymentsTrackingCategories, nil - case "applied_payments,tracking_categories,accounting_period": - return JournalEntriesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesAccountingPeriod, nil - case "applied_payments,tracking_categories,company": - return JournalEntriesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesCompany, nil - case "applied_payments,tracking_categories,company,accounting_period": - return JournalEntriesRetrieveRequestExpandAppliedPaymentsTrackingCategoriesCompanyAccountingPeriod, nil + return JournalEntriesRetrieveRequestExpandItemAppliedPayments, nil case "company": - return JournalEntriesRetrieveRequestExpandCompany, nil - case "company,accounting_period": - return JournalEntriesRetrieveRequestExpandCompanyAccountingPeriod, nil + return JournalEntriesRetrieveRequestExpandItemCompany, nil case "lines": - return JournalEntriesRetrieveRequestExpandLines, nil - case "lines,accounting_period": - return JournalEntriesRetrieveRequestExpandLinesAccountingPeriod, nil - case "lines,applied_payments": - return JournalEntriesRetrieveRequestExpandLinesAppliedPayments, nil - case "lines,applied_payments,accounting_period": - return JournalEntriesRetrieveRequestExpandLinesAppliedPaymentsAccountingPeriod, nil - case "lines,applied_payments,company": - return JournalEntriesRetrieveRequestExpandLinesAppliedPaymentsCompany, nil - case "lines,applied_payments,company,accounting_period": - return JournalEntriesRetrieveRequestExpandLinesAppliedPaymentsCompanyAccountingPeriod, nil - case "lines,applied_payments,tracking_categories": - return JournalEntriesRetrieveRequestExpandLinesAppliedPaymentsTrackingCategories, nil - case "lines,applied_payments,tracking_categories,accounting_period": - return JournalEntriesRetrieveRequestExpandLinesAppliedPaymentsTrackingCategoriesAccountingPeriod, nil - case "lines,applied_payments,tracking_categories,company": - return JournalEntriesRetrieveRequestExpandLinesAppliedPaymentsTrackingCategoriesCompany, nil - case "lines,applied_payments,tracking_categories,company,accounting_period": - return JournalEntriesRetrieveRequestExpandLinesAppliedPaymentsTrackingCategoriesCompanyAccountingPeriod, nil - case "lines,company": - return JournalEntriesRetrieveRequestExpandLinesCompany, nil - case "lines,company,accounting_period": - return JournalEntriesRetrieveRequestExpandLinesCompanyAccountingPeriod, nil - case "lines,payments": - return JournalEntriesRetrieveRequestExpandLinesPayments, nil - case "lines,payments,accounting_period": - return JournalEntriesRetrieveRequestExpandLinesPaymentsAccountingPeriod, nil - case "lines,payments,applied_payments": - return JournalEntriesRetrieveRequestExpandLinesPaymentsAppliedPayments, nil - case "lines,payments,applied_payments,accounting_period": - return JournalEntriesRetrieveRequestExpandLinesPaymentsAppliedPaymentsAccountingPeriod, nil - case "lines,payments,applied_payments,company": - return JournalEntriesRetrieveRequestExpandLinesPaymentsAppliedPaymentsCompany, nil - case "lines,payments,applied_payments,company,accounting_period": - return JournalEntriesRetrieveRequestExpandLinesPaymentsAppliedPaymentsCompanyAccountingPeriod, nil - case "lines,payments,applied_payments,tracking_categories": - return JournalEntriesRetrieveRequestExpandLinesPaymentsAppliedPaymentsTrackingCategories, nil - case "lines,payments,applied_payments,tracking_categories,accounting_period": - return JournalEntriesRetrieveRequestExpandLinesPaymentsAppliedPaymentsTrackingCategoriesAccountingPeriod, nil - case "lines,payments,applied_payments,tracking_categories,company": - return JournalEntriesRetrieveRequestExpandLinesPaymentsAppliedPaymentsTrackingCategoriesCompany, nil - case "lines,payments,applied_payments,tracking_categories,company,accounting_period": - return JournalEntriesRetrieveRequestExpandLinesPaymentsAppliedPaymentsTrackingCategoriesCompanyAccountingPeriod, nil - case "lines,payments,company": - return JournalEntriesRetrieveRequestExpandLinesPaymentsCompany, nil - case "lines,payments,company,accounting_period": - return JournalEntriesRetrieveRequestExpandLinesPaymentsCompanyAccountingPeriod, nil - case "lines,payments,tracking_categories": - return JournalEntriesRetrieveRequestExpandLinesPaymentsTrackingCategories, nil - case "lines,payments,tracking_categories,accounting_period": - return JournalEntriesRetrieveRequestExpandLinesPaymentsTrackingCategoriesAccountingPeriod, nil - case "lines,payments,tracking_categories,company": - return JournalEntriesRetrieveRequestExpandLinesPaymentsTrackingCategoriesCompany, nil - case "lines,payments,tracking_categories,company,accounting_period": - return JournalEntriesRetrieveRequestExpandLinesPaymentsTrackingCategoriesCompanyAccountingPeriod, nil - case "lines,tracking_categories": - return JournalEntriesRetrieveRequestExpandLinesTrackingCategories, nil - case "lines,tracking_categories,accounting_period": - return JournalEntriesRetrieveRequestExpandLinesTrackingCategoriesAccountingPeriod, nil - case "lines,tracking_categories,company": - return JournalEntriesRetrieveRequestExpandLinesTrackingCategoriesCompany, nil - case "lines,tracking_categories,company,accounting_period": - return JournalEntriesRetrieveRequestExpandLinesTrackingCategoriesCompanyAccountingPeriod, nil + return JournalEntriesRetrieveRequestExpandItemLines, nil case "payments": - return JournalEntriesRetrieveRequestExpandPayments, nil - case "payments,accounting_period": - return JournalEntriesRetrieveRequestExpandPaymentsAccountingPeriod, nil - case "payments,applied_payments": - return JournalEntriesRetrieveRequestExpandPaymentsAppliedPayments, nil - case "payments,applied_payments,accounting_period": - return JournalEntriesRetrieveRequestExpandPaymentsAppliedPaymentsAccountingPeriod, nil - case "payments,applied_payments,company": - return JournalEntriesRetrieveRequestExpandPaymentsAppliedPaymentsCompany, nil - case "payments,applied_payments,company,accounting_period": - return JournalEntriesRetrieveRequestExpandPaymentsAppliedPaymentsCompanyAccountingPeriod, nil - case "payments,applied_payments,tracking_categories": - return JournalEntriesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategories, nil - case "payments,applied_payments,tracking_categories,accounting_period": - return JournalEntriesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesAccountingPeriod, nil - case "payments,applied_payments,tracking_categories,company": - return JournalEntriesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesCompany, nil - case "payments,applied_payments,tracking_categories,company,accounting_period": - return JournalEntriesRetrieveRequestExpandPaymentsAppliedPaymentsTrackingCategoriesCompanyAccountingPeriod, nil - case "payments,company": - return JournalEntriesRetrieveRequestExpandPaymentsCompany, nil - case "payments,company,accounting_period": - return JournalEntriesRetrieveRequestExpandPaymentsCompanyAccountingPeriod, nil - case "payments,tracking_categories": - return JournalEntriesRetrieveRequestExpandPaymentsTrackingCategories, nil - case "payments,tracking_categories,accounting_period": - return JournalEntriesRetrieveRequestExpandPaymentsTrackingCategoriesAccountingPeriod, nil - case "payments,tracking_categories,company": - return JournalEntriesRetrieveRequestExpandPaymentsTrackingCategoriesCompany, nil - case "payments,tracking_categories,company,accounting_period": - return JournalEntriesRetrieveRequestExpandPaymentsTrackingCategoriesCompanyAccountingPeriod, nil + return JournalEntriesRetrieveRequestExpandItemPayments, nil case "tracking_categories": - return JournalEntriesRetrieveRequestExpandTrackingCategories, nil - case "tracking_categories,accounting_period": - return JournalEntriesRetrieveRequestExpandTrackingCategoriesAccountingPeriod, nil - case "tracking_categories,company": - return JournalEntriesRetrieveRequestExpandTrackingCategoriesCompany, nil - case "tracking_categories,company,accounting_period": - return JournalEntriesRetrieveRequestExpandTrackingCategoriesCompanyAccountingPeriod, nil - } - var t JournalEntriesRetrieveRequestExpand + return JournalEntriesRetrieveRequestExpandItemTrackingCategories, nil + } + var t JournalEntriesRetrieveRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (j JournalEntriesRetrieveRequestExpand) Ptr() *JournalEntriesRetrieveRequestExpand { +func (j JournalEntriesRetrieveRequestExpandItem) Ptr() *JournalEntriesRetrieveRequestExpandItem { return &j } + +// # The JournalEntry Object +// ### Description +// A `JournalEntry` is a record of a transaction or event that is entered into a company's accounting system. +// +// The `JournalEntry` common model contains records that are automatically created as a result of a certain type of transaction, like an Invoice, and records that are manually created against a company’s ledger. +// +// The lines of a given `JournalEntry` object should always sum to 0. A positive `net_amount` means the line represents a debit and a negative net_amount represents a credit. +// +// ### Usage Example +// Fetch from the `GET JournalEntry` endpoint and view a company's journey entry. +type JournalEntry struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The journal entry's transaction date. + TransactionDate *time.Time `json:"transaction_date,omitempty" url:"transaction_date,omitempty"` + // Array of `Payment` object IDs. + Payments []*JournalEntryPaymentsItem `json:"payments,omitempty" url:"payments,omitempty"` + // A list of the Payment Applied to Lines common models related to a given Invoice, Credit Note, or Journal Entry. + AppliedPayments []*JournalEntryAppliedPaymentsItem `json:"applied_payments,omitempty" url:"applied_payments,omitempty"` + // The journal entry's private note. + Memo *string `json:"memo,omitempty" url:"memo,omitempty"` + // The journal's currency. + // + // * `XUA` - ADB Unit of Account + // * `AFN` - Afghan Afghani + // * `AFA` - Afghan Afghani (1927–2002) + // * `ALL` - Albanian Lek + // * `ALK` - Albanian Lek (1946–1965) + // * `DZD` - Algerian Dinar + // * `ADP` - Andorran Peseta + // * `AOA` - Angolan Kwanza + // * `AOK` - Angolan Kwanza (1977–1991) + // * `AON` - Angolan New Kwanza (1990–2000) + // * `AOR` - Angolan Readjusted Kwanza (1995–1999) + // * `ARA` - Argentine Austral + // * `ARS` - Argentine Peso + // * `ARM` - Argentine Peso (1881–1970) + // * `ARP` - Argentine Peso (1983–1985) + // * `ARL` - Argentine Peso Ley (1970–1983) + // * `AMD` - Armenian Dram + // * `AWG` - Aruban Florin + // * `AUD` - Australian Dollar + // * `ATS` - Austrian Schilling + // * `AZN` - Azerbaijani Manat + // * `AZM` - Azerbaijani Manat (1993–2006) + // * `BSD` - Bahamian Dollar + // * `BHD` - Bahraini Dinar + // * `BDT` - Bangladeshi Taka + // * `BBD` - Barbadian Dollar + // * `BYN` - Belarusian Ruble + // * `BYB` - Belarusian Ruble (1994–1999) + // * `BYR` - Belarusian Ruble (2000–2016) + // * `BEF` - Belgian Franc + // * `BEC` - Belgian Franc (convertible) + // * `BEL` - Belgian Franc (financial) + // * `BZD` - Belize Dollar + // * `BMD` - Bermudan Dollar + // * `BTN` - Bhutanese Ngultrum + // * `BOB` - Bolivian Boliviano + // * `BOL` - Bolivian Boliviano (1863–1963) + // * `BOV` - Bolivian Mvdol + // * `BOP` - Bolivian Peso + // * `BAM` - Bosnia-Herzegovina Convertible Mark + // * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + // * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + // * `BWP` - Botswanan Pula + // * `BRC` - Brazilian Cruzado (1986–1989) + // * `BRZ` - Brazilian Cruzeiro (1942–1967) + // * `BRE` - Brazilian Cruzeiro (1990–1993) + // * `BRR` - Brazilian Cruzeiro (1993–1994) + // * `BRN` - Brazilian New Cruzado (1989–1990) + // * `BRB` - Brazilian New Cruzeiro (1967–1986) + // * `BRL` - Brazilian Real + // * `GBP` - British Pound + // * `BND` - Brunei Dollar + // * `BGL` - Bulgarian Hard Lev + // * `BGN` - Bulgarian Lev + // * `BGO` - Bulgarian Lev (1879–1952) + // * `BGM` - Bulgarian Socialist Lev + // * `BUK` - Burmese Kyat + // * `BIF` - Burundian Franc + // * `XPF` - CFP Franc + // * `KHR` - Cambodian Riel + // * `CAD` - Canadian Dollar + // * `CVE` - Cape Verdean Escudo + // * `KYD` - Cayman Islands Dollar + // * `XAF` - Central African CFA Franc + // * `CLE` - Chilean Escudo + // * `CLP` - Chilean Peso + // * `CLF` - Chilean Unit of Account (UF) + // * `CNX` - Chinese People’s Bank Dollar + // * `CNY` - Chinese Yuan + // * `CNH` - Chinese Yuan (offshore) + // * `COP` - Colombian Peso + // * `COU` - Colombian Real Value Unit + // * `KMF` - Comorian Franc + // * `CDF` - Congolese Franc + // * `CRC` - Costa Rican Colón + // * `HRD` - Croatian Dinar + // * `HRK` - Croatian Kuna + // * `CUC` - Cuban Convertible Peso + // * `CUP` - Cuban Peso + // * `CYP` - Cypriot Pound + // * `CZK` - Czech Koruna + // * `CSK` - Czechoslovak Hard Koruna + // * `DKK` - Danish Krone + // * `DJF` - Djiboutian Franc + // * `DOP` - Dominican Peso + // * `NLG` - Dutch Guilder + // * `XCD` - East Caribbean Dollar + // * `DDM` - East German Mark + // * `ECS` - Ecuadorian Sucre + // * `ECV` - Ecuadorian Unit of Constant Value + // * `EGP` - Egyptian Pound + // * `GQE` - Equatorial Guinean Ekwele + // * `ERN` - Eritrean Nakfa + // * `EEK` - Estonian Kroon + // * `ETB` - Ethiopian Birr + // * `EUR` - Euro + // * `XBA` - European Composite Unit + // * `XEU` - European Currency Unit + // * `XBB` - European Monetary Unit + // * `XBC` - European Unit of Account (XBC) + // * `XBD` - European Unit of Account (XBD) + // * `FKP` - Falkland Islands Pound + // * `FJD` - Fijian Dollar + // * `FIM` - Finnish Markka + // * `FRF` - French Franc + // * `XFO` - French Gold Franc + // * `XFU` - French UIC-Franc + // * `GMD` - Gambian Dalasi + // * `GEK` - Georgian Kupon Larit + // * `GEL` - Georgian Lari + // * `DEM` - German Mark + // * `GHS` - Ghanaian Cedi + // * `GHC` - Ghanaian Cedi (1979–2007) + // * `GIP` - Gibraltar Pound + // * `XAU` - Gold + // * `GRD` - Greek Drachma + // * `GTQ` - Guatemalan Quetzal + // * `GWP` - Guinea-Bissau Peso + // * `GNF` - Guinean Franc + // * `GNS` - Guinean Syli + // * `GYD` - Guyanaese Dollar + // * `HTG` - Haitian Gourde + // * `HNL` - Honduran Lempira + // * `HKD` - Hong Kong Dollar + // * `HUF` - Hungarian Forint + // * `IMP` - IMP + // * `ISK` - Icelandic Króna + // * `ISJ` - Icelandic Króna (1918–1981) + // * `INR` - Indian Rupee + // * `IDR` - Indonesian Rupiah + // * `IRR` - Iranian Rial + // * `IQD` - Iraqi Dinar + // * `IEP` - Irish Pound + // * `ILS` - Israeli New Shekel + // * `ILP` - Israeli Pound + // * `ILR` - Israeli Shekel (1980–1985) + // * `ITL` - Italian Lira + // * `JMD` - Jamaican Dollar + // * `JPY` - Japanese Yen + // * `JOD` - Jordanian Dinar + // * `KZT` - Kazakhstani Tenge + // * `KES` - Kenyan Shilling + // * `KWD` - Kuwaiti Dinar + // * `KGS` - Kyrgystani Som + // * `LAK` - Laotian Kip + // * `LVL` - Latvian Lats + // * `LVR` - Latvian Ruble + // * `LBP` - Lebanese Pound + // * `LSL` - Lesotho Loti + // * `LRD` - Liberian Dollar + // * `LYD` - Libyan Dinar + // * `LTL` - Lithuanian Litas + // * `LTT` - Lithuanian Talonas + // * `LUL` - Luxembourg Financial Franc + // * `LUC` - Luxembourgian Convertible Franc + // * `LUF` - Luxembourgian Franc + // * `MOP` - Macanese Pataca + // * `MKD` - Macedonian Denar + // * `MKN` - Macedonian Denar (1992–1993) + // * `MGA` - Malagasy Ariary + // * `MGF` - Malagasy Franc + // * `MWK` - Malawian Kwacha + // * `MYR` - Malaysian Ringgit + // * `MVR` - Maldivian Rufiyaa + // * `MVP` - Maldivian Rupee (1947–1981) + // * `MLF` - Malian Franc + // * `MTL` - Maltese Lira + // * `MTP` - Maltese Pound + // * `MRU` - Mauritanian Ouguiya + // * `MRO` - Mauritanian Ouguiya (1973–2017) + // * `MUR` - Mauritian Rupee + // * `MXV` - Mexican Investment Unit + // * `MXN` - Mexican Peso + // * `MXP` - Mexican Silver Peso (1861–1992) + // * `MDC` - Moldovan Cupon + // * `MDL` - Moldovan Leu + // * `MCF` - Monegasque Franc + // * `MNT` - Mongolian Tugrik + // * `MAD` - Moroccan Dirham + // * `MAF` - Moroccan Franc + // * `MZE` - Mozambican Escudo + // * `MZN` - Mozambican Metical + // * `MZM` - Mozambican Metical (1980–2006) + // * `MMK` - Myanmar Kyat + // * `NAD` - Namibian Dollar + // * `NPR` - Nepalese Rupee + // * `ANG` - Netherlands Antillean Guilder + // * `TWD` - New Taiwan Dollar + // * `NZD` - New Zealand Dollar + // * `NIO` - Nicaraguan Córdoba + // * `NIC` - Nicaraguan Córdoba (1988–1991) + // * `NGN` - Nigerian Naira + // * `KPW` - North Korean Won + // * `NOK` - Norwegian Krone + // * `OMR` - Omani Rial + // * `PKR` - Pakistani Rupee + // * `XPD` - Palladium + // * `PAB` - Panamanian Balboa + // * `PGK` - Papua New Guinean Kina + // * `PYG` - Paraguayan Guarani + // * `PEI` - Peruvian Inti + // * `PEN` - Peruvian Sol + // * `PES` - Peruvian Sol (1863–1965) + // * `PHP` - Philippine Peso + // * `XPT` - Platinum + // * `PLN` - Polish Zloty + // * `PLZ` - Polish Zloty (1950–1995) + // * `PTE` - Portuguese Escudo + // * `GWE` - Portuguese Guinea Escudo + // * `QAR` - Qatari Rial + // * `XRE` - RINET Funds + // * `RHD` - Rhodesian Dollar + // * `RON` - Romanian Leu + // * `ROL` - Romanian Leu (1952–2006) + // * `RUB` - Russian Ruble + // * `RUR` - Russian Ruble (1991–1998) + // * `RWF` - Rwandan Franc + // * `SVC` - Salvadoran Colón + // * `WST` - Samoan Tala + // * `SAR` - Saudi Riyal + // * `RSD` - Serbian Dinar + // * `CSD` - Serbian Dinar (2002–2006) + // * `SCR` - Seychellois Rupee + // * `SLL` - Sierra Leonean Leone + // * `XAG` - Silver + // * `SGD` - Singapore Dollar + // * `SKK` - Slovak Koruna + // * `SIT` - Slovenian Tolar + // * `SBD` - Solomon Islands Dollar + // * `SOS` - Somali Shilling + // * `ZAR` - South African Rand + // * `ZAL` - South African Rand (financial) + // * `KRH` - South Korean Hwan (1953–1962) + // * `KRW` - South Korean Won + // * `KRO` - South Korean Won (1945–1953) + // * `SSP` - South Sudanese Pound + // * `SUR` - Soviet Rouble + // * `ESP` - Spanish Peseta + // * `ESA` - Spanish Peseta (A account) + // * `ESB` - Spanish Peseta (convertible account) + // * `XDR` - Special Drawing Rights + // * `LKR` - Sri Lankan Rupee + // * `SHP` - St. Helena Pound + // * `XSU` - Sucre + // * `SDD` - Sudanese Dinar (1992–2007) + // * `SDG` - Sudanese Pound + // * `SDP` - Sudanese Pound (1957–1998) + // * `SRD` - Surinamese Dollar + // * `SRG` - Surinamese Guilder + // * `SZL` - Swazi Lilangeni + // * `SEK` - Swedish Krona + // * `CHF` - Swiss Franc + // * `SYP` - Syrian Pound + // * `STN` - São Tomé & Príncipe Dobra + // * `STD` - São Tomé & Príncipe Dobra (1977–2017) + // * `TVD` - TVD + // * `TJR` - Tajikistani Ruble + // * `TJS` - Tajikistani Somoni + // * `TZS` - Tanzanian Shilling + // * `XTS` - Testing Currency Code + // * `THB` - Thai Baht + // * `XXX` - The codes assigned for transactions where no currency is involved + // * `TPE` - Timorese Escudo + // * `TOP` - Tongan Paʻanga + // * `TTD` - Trinidad & Tobago Dollar + // * `TND` - Tunisian Dinar + // * `TRY` - Turkish Lira + // * `TRL` - Turkish Lira (1922–2005) + // * `TMT` - Turkmenistani Manat + // * `TMM` - Turkmenistani Manat (1993–2009) + // * `USD` - US Dollar + // * `USN` - US Dollar (Next day) + // * `USS` - US Dollar (Same day) + // * `UGX` - Ugandan Shilling + // * `UGS` - Ugandan Shilling (1966–1987) + // * `UAH` - Ukrainian Hryvnia + // * `UAK` - Ukrainian Karbovanets + // * `AED` - United Arab Emirates Dirham + // * `UYW` - Uruguayan Nominal Wage Index Unit + // * `UYU` - Uruguayan Peso + // * `UYP` - Uruguayan Peso (1975–1993) + // * `UYI` - Uruguayan Peso (Indexed Units) + // * `UZS` - Uzbekistani Som + // * `VUV` - Vanuatu Vatu + // * `VES` - Venezuelan Bolívar + // * `VEB` - Venezuelan Bolívar (1871–2008) + // * `VEF` - Venezuelan Bolívar (2008–2018) + // * `VND` - Vietnamese Dong + // * `VNN` - Vietnamese Dong (1978–1985) + // * `CHE` - WIR Euro + // * `CHW` - WIR Franc + // * `XOF` - West African CFA Franc + // * `YDD` - Yemeni Dinar + // * `YER` - Yemeni Rial + // * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + // * `YUD` - Yugoslavian Hard Dinar (1966–1990) + // * `YUM` - Yugoslavian New Dinar (1994–2002) + // * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + // * `ZWN` - ZWN + // * `ZRN` - Zairean New Zaire (1993–1998) + // * `ZRZ` - Zairean Zaire (1971–1993) + // * `ZMW` - Zambian Kwacha + // * `ZMK` - Zambian Kwacha (1968–2012) + // * `ZWD` - Zimbabwean Dollar (1980–2008) + // * `ZWR` - Zimbabwean Dollar (2008) + // * `ZWL` - Zimbabwean Dollar (2009) + Currency *JournalEntryCurrency `json:"currency,omitempty" url:"currency,omitempty"` + // The journal entry's exchange rate. + ExchangeRate *string `json:"exchange_rate,omitempty" url:"exchange_rate,omitempty"` + // The company the journal entry belongs to. + Company *JournalEntryCompany `json:"company,omitempty" url:"company,omitempty"` + // If the transaction is inclusive or exclusive of tax. `True` if inclusive, `False` if exclusive. + InclusiveOfTax *bool `json:"inclusive_of_tax,omitempty" url:"inclusive_of_tax,omitempty"` + Lines []*JournalLine `json:"lines,omitempty" url:"lines,omitempty"` + // Reference number for identifying journal entries. + JournalNumber *string `json:"journal_number,omitempty" url:"journal_number,omitempty"` + TrackingCategories []*JournalEntryTrackingCategoriesItem `json:"tracking_categories,omitempty" url:"tracking_categories,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + // The journal's posting status. + // + // * `UNPOSTED` - UNPOSTED + // * `POSTED` - POSTED + PostingStatus *JournalEntryPostingStatus `json:"posting_status,omitempty" url:"posting_status,omitempty"` + // The accounting period that the JournalEntry was generated in. + AccountingPeriod *JournalEntryAccountingPeriod `json:"accounting_period,omitempty" url:"accounting_period,omitempty"` + // When the third party's journal entry was created. + RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty" url:"remote_created_at,omitempty"` + // When the third party's journal entry was updated. + RemoteUpdatedAt *time.Time `json:"remote_updated_at,omitempty" url:"remote_updated_at,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + RemoteFields []*RemoteField `json:"remote_fields,omitempty" url:"remote_fields,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (j *JournalEntry) GetId() *string { + if j == nil { + return nil + } + return j.Id +} + +func (j *JournalEntry) GetRemoteId() *string { + if j == nil { + return nil + } + return j.RemoteId +} + +func (j *JournalEntry) GetCreatedAt() *time.Time { + if j == nil { + return nil + } + return j.CreatedAt +} + +func (j *JournalEntry) GetModifiedAt() *time.Time { + if j == nil { + return nil + } + return j.ModifiedAt +} + +func (j *JournalEntry) GetTransactionDate() *time.Time { + if j == nil { + return nil + } + return j.TransactionDate +} + +func (j *JournalEntry) GetPayments() []*JournalEntryPaymentsItem { + if j == nil { + return nil + } + return j.Payments +} + +func (j *JournalEntry) GetAppliedPayments() []*JournalEntryAppliedPaymentsItem { + if j == nil { + return nil + } + return j.AppliedPayments +} + +func (j *JournalEntry) GetMemo() *string { + if j == nil { + return nil + } + return j.Memo +} + +func (j *JournalEntry) GetCurrency() *JournalEntryCurrency { + if j == nil { + return nil + } + return j.Currency +} + +func (j *JournalEntry) GetExchangeRate() *string { + if j == nil { + return nil + } + return j.ExchangeRate +} + +func (j *JournalEntry) GetCompany() *JournalEntryCompany { + if j == nil { + return nil + } + return j.Company +} + +func (j *JournalEntry) GetInclusiveOfTax() *bool { + if j == nil { + return nil + } + return j.InclusiveOfTax +} + +func (j *JournalEntry) GetLines() []*JournalLine { + if j == nil { + return nil + } + return j.Lines +} + +func (j *JournalEntry) GetJournalNumber() *string { + if j == nil { + return nil + } + return j.JournalNumber +} + +func (j *JournalEntry) GetTrackingCategories() []*JournalEntryTrackingCategoriesItem { + if j == nil { + return nil + } + return j.TrackingCategories +} + +func (j *JournalEntry) GetRemoteWasDeleted() *bool { + if j == nil { + return nil + } + return j.RemoteWasDeleted +} + +func (j *JournalEntry) GetPostingStatus() *JournalEntryPostingStatus { + if j == nil { + return nil + } + return j.PostingStatus +} + +func (j *JournalEntry) GetAccountingPeriod() *JournalEntryAccountingPeriod { + if j == nil { + return nil + } + return j.AccountingPeriod +} + +func (j *JournalEntry) GetRemoteCreatedAt() *time.Time { + if j == nil { + return nil + } + return j.RemoteCreatedAt +} + +func (j *JournalEntry) GetRemoteUpdatedAt() *time.Time { + if j == nil { + return nil + } + return j.RemoteUpdatedAt +} + +func (j *JournalEntry) GetFieldMappings() map[string]interface{} { + if j == nil { + return nil + } + return j.FieldMappings +} + +func (j *JournalEntry) GetRemoteData() []*RemoteData { + if j == nil { + return nil + } + return j.RemoteData +} + +func (j *JournalEntry) GetRemoteFields() []*RemoteField { + if j == nil { + return nil + } + return j.RemoteFields +} + +func (j *JournalEntry) GetExtraProperties() map[string]interface{} { + return j.extraProperties +} + +func (j *JournalEntry) UnmarshalJSON(data []byte) error { + type embed JournalEntry + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + TransactionDate *internal.DateTime `json:"transaction_date,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + RemoteUpdatedAt *internal.DateTime `json:"remote_updated_at,omitempty"` + }{ + embed: embed(*j), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *j = JournalEntry(unmarshaler.embed) + j.CreatedAt = unmarshaler.CreatedAt.TimePtr() + j.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + j.TransactionDate = unmarshaler.TransactionDate.TimePtr() + j.RemoteCreatedAt = unmarshaler.RemoteCreatedAt.TimePtr() + j.RemoteUpdatedAt = unmarshaler.RemoteUpdatedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *j) + if err != nil { + return err + } + j.extraProperties = extraProperties + j.rawJSON = json.RawMessage(data) + return nil +} + +func (j *JournalEntry) MarshalJSON() ([]byte, error) { + type embed JournalEntry + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + TransactionDate *internal.DateTime `json:"transaction_date,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + RemoteUpdatedAt *internal.DateTime `json:"remote_updated_at,omitempty"` + }{ + embed: embed(*j), + CreatedAt: internal.NewOptionalDateTime(j.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(j.ModifiedAt), + TransactionDate: internal.NewOptionalDateTime(j.TransactionDate), + RemoteCreatedAt: internal.NewOptionalDateTime(j.RemoteCreatedAt), + RemoteUpdatedAt: internal.NewOptionalDateTime(j.RemoteUpdatedAt), + } + return json.Marshal(marshaler) +} + +func (j *JournalEntry) String() string { + if len(j.rawJSON) > 0 { + if value, err := internal.StringifyJSON(j.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(j); err == nil { + return value + } + return fmt.Sprintf("%#v", j) +} + +// The accounting period that the JournalEntry was generated in. +type JournalEntryAccountingPeriod struct { + String string + AccountingPeriod *AccountingPeriod + + typ string +} + +func (j *JournalEntryAccountingPeriod) GetString() string { + if j == nil { + return "" + } + return j.String +} + +func (j *JournalEntryAccountingPeriod) GetAccountingPeriod() *AccountingPeriod { + if j == nil { + return nil + } + return j.AccountingPeriod +} + +func (j *JournalEntryAccountingPeriod) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + j.typ = "String" + j.String = valueString + return nil + } + valueAccountingPeriod := new(AccountingPeriod) + if err := json.Unmarshal(data, &valueAccountingPeriod); err == nil { + j.typ = "AccountingPeriod" + j.AccountingPeriod = valueAccountingPeriod + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, j) +} + +func (j JournalEntryAccountingPeriod) MarshalJSON() ([]byte, error) { + if j.typ == "String" || j.String != "" { + return json.Marshal(j.String) + } + if j.typ == "AccountingPeriod" || j.AccountingPeriod != nil { + return json.Marshal(j.AccountingPeriod) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", j) +} + +type JournalEntryAccountingPeriodVisitor interface { + VisitString(string) error + VisitAccountingPeriod(*AccountingPeriod) error +} + +func (j *JournalEntryAccountingPeriod) Accept(visitor JournalEntryAccountingPeriodVisitor) error { + if j.typ == "String" || j.String != "" { + return visitor.VisitString(j.String) + } + if j.typ == "AccountingPeriod" || j.AccountingPeriod != nil { + return visitor.VisitAccountingPeriod(j.AccountingPeriod) + } + return fmt.Errorf("type %T does not include a non-empty union type", j) +} + +type JournalEntryAppliedPaymentsItem struct { + String string + PaymentLineItem *PaymentLineItem + + typ string +} + +func (j *JournalEntryAppliedPaymentsItem) GetString() string { + if j == nil { + return "" + } + return j.String +} + +func (j *JournalEntryAppliedPaymentsItem) GetPaymentLineItem() *PaymentLineItem { + if j == nil { + return nil + } + return j.PaymentLineItem +} + +func (j *JournalEntryAppliedPaymentsItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + j.typ = "String" + j.String = valueString + return nil + } + valuePaymentLineItem := new(PaymentLineItem) + if err := json.Unmarshal(data, &valuePaymentLineItem); err == nil { + j.typ = "PaymentLineItem" + j.PaymentLineItem = valuePaymentLineItem + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, j) +} + +func (j JournalEntryAppliedPaymentsItem) MarshalJSON() ([]byte, error) { + if j.typ == "String" || j.String != "" { + return json.Marshal(j.String) + } + if j.typ == "PaymentLineItem" || j.PaymentLineItem != nil { + return json.Marshal(j.PaymentLineItem) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", j) +} + +type JournalEntryAppliedPaymentsItemVisitor interface { + VisitString(string) error + VisitPaymentLineItem(*PaymentLineItem) error +} + +func (j *JournalEntryAppliedPaymentsItem) Accept(visitor JournalEntryAppliedPaymentsItemVisitor) error { + if j.typ == "String" || j.String != "" { + return visitor.VisitString(j.String) + } + if j.typ == "PaymentLineItem" || j.PaymentLineItem != nil { + return visitor.VisitPaymentLineItem(j.PaymentLineItem) + } + return fmt.Errorf("type %T does not include a non-empty union type", j) +} + +// The company the journal entry belongs to. +type JournalEntryCompany struct { + String string + CompanyInfo *CompanyInfo + + typ string +} + +func (j *JournalEntryCompany) GetString() string { + if j == nil { + return "" + } + return j.String +} + +func (j *JournalEntryCompany) GetCompanyInfo() *CompanyInfo { + if j == nil { + return nil + } + return j.CompanyInfo +} + +func (j *JournalEntryCompany) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + j.typ = "String" + j.String = valueString + return nil + } + valueCompanyInfo := new(CompanyInfo) + if err := json.Unmarshal(data, &valueCompanyInfo); err == nil { + j.typ = "CompanyInfo" + j.CompanyInfo = valueCompanyInfo + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, j) +} + +func (j JournalEntryCompany) MarshalJSON() ([]byte, error) { + if j.typ == "String" || j.String != "" { + return json.Marshal(j.String) + } + if j.typ == "CompanyInfo" || j.CompanyInfo != nil { + return json.Marshal(j.CompanyInfo) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", j) +} + +type JournalEntryCompanyVisitor interface { + VisitString(string) error + VisitCompanyInfo(*CompanyInfo) error +} + +func (j *JournalEntryCompany) Accept(visitor JournalEntryCompanyVisitor) error { + if j.typ == "String" || j.String != "" { + return visitor.VisitString(j.String) + } + if j.typ == "CompanyInfo" || j.CompanyInfo != nil { + return visitor.VisitCompanyInfo(j.CompanyInfo) + } + return fmt.Errorf("type %T does not include a non-empty union type", j) +} + +// The journal's currency. +// +// * `XUA` - ADB Unit of Account +// * `AFN` - Afghan Afghani +// * `AFA` - Afghan Afghani (1927–2002) +// * `ALL` - Albanian Lek +// * `ALK` - Albanian Lek (1946–1965) +// * `DZD` - Algerian Dinar +// * `ADP` - Andorran Peseta +// * `AOA` - Angolan Kwanza +// * `AOK` - Angolan Kwanza (1977–1991) +// * `AON` - Angolan New Kwanza (1990–2000) +// * `AOR` - Angolan Readjusted Kwanza (1995–1999) +// * `ARA` - Argentine Austral +// * `ARS` - Argentine Peso +// * `ARM` - Argentine Peso (1881–1970) +// * `ARP` - Argentine Peso (1983–1985) +// * `ARL` - Argentine Peso Ley (1970–1983) +// * `AMD` - Armenian Dram +// * `AWG` - Aruban Florin +// * `AUD` - Australian Dollar +// * `ATS` - Austrian Schilling +// * `AZN` - Azerbaijani Manat +// * `AZM` - Azerbaijani Manat (1993–2006) +// * `BSD` - Bahamian Dollar +// * `BHD` - Bahraini Dinar +// * `BDT` - Bangladeshi Taka +// * `BBD` - Barbadian Dollar +// * `BYN` - Belarusian Ruble +// * `BYB` - Belarusian Ruble (1994–1999) +// * `BYR` - Belarusian Ruble (2000–2016) +// * `BEF` - Belgian Franc +// * `BEC` - Belgian Franc (convertible) +// * `BEL` - Belgian Franc (financial) +// * `BZD` - Belize Dollar +// * `BMD` - Bermudan Dollar +// * `BTN` - Bhutanese Ngultrum +// * `BOB` - Bolivian Boliviano +// * `BOL` - Bolivian Boliviano (1863–1963) +// * `BOV` - Bolivian Mvdol +// * `BOP` - Bolivian Peso +// * `BAM` - Bosnia-Herzegovina Convertible Mark +// * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) +// * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) +// * `BWP` - Botswanan Pula +// * `BRC` - Brazilian Cruzado (1986–1989) +// * `BRZ` - Brazilian Cruzeiro (1942–1967) +// * `BRE` - Brazilian Cruzeiro (1990–1993) +// * `BRR` - Brazilian Cruzeiro (1993–1994) +// * `BRN` - Brazilian New Cruzado (1989–1990) +// * `BRB` - Brazilian New Cruzeiro (1967–1986) +// * `BRL` - Brazilian Real +// * `GBP` - British Pound +// * `BND` - Brunei Dollar +// * `BGL` - Bulgarian Hard Lev +// * `BGN` - Bulgarian Lev +// * `BGO` - Bulgarian Lev (1879–1952) +// * `BGM` - Bulgarian Socialist Lev +// * `BUK` - Burmese Kyat +// * `BIF` - Burundian Franc +// * `XPF` - CFP Franc +// * `KHR` - Cambodian Riel +// * `CAD` - Canadian Dollar +// * `CVE` - Cape Verdean Escudo +// * `KYD` - Cayman Islands Dollar +// * `XAF` - Central African CFA Franc +// * `CLE` - Chilean Escudo +// * `CLP` - Chilean Peso +// * `CLF` - Chilean Unit of Account (UF) +// * `CNX` - Chinese People’s Bank Dollar +// * `CNY` - Chinese Yuan +// * `CNH` - Chinese Yuan (offshore) +// * `COP` - Colombian Peso +// * `COU` - Colombian Real Value Unit +// * `KMF` - Comorian Franc +// * `CDF` - Congolese Franc +// * `CRC` - Costa Rican Colón +// * `HRD` - Croatian Dinar +// * `HRK` - Croatian Kuna +// * `CUC` - Cuban Convertible Peso +// * `CUP` - Cuban Peso +// * `CYP` - Cypriot Pound +// * `CZK` - Czech Koruna +// * `CSK` - Czechoslovak Hard Koruna +// * `DKK` - Danish Krone +// * `DJF` - Djiboutian Franc +// * `DOP` - Dominican Peso +// * `NLG` - Dutch Guilder +// * `XCD` - East Caribbean Dollar +// * `DDM` - East German Mark +// * `ECS` - Ecuadorian Sucre +// * `ECV` - Ecuadorian Unit of Constant Value +// * `EGP` - Egyptian Pound +// * `GQE` - Equatorial Guinean Ekwele +// * `ERN` - Eritrean Nakfa +// * `EEK` - Estonian Kroon +// * `ETB` - Ethiopian Birr +// * `EUR` - Euro +// * `XBA` - European Composite Unit +// * `XEU` - European Currency Unit +// * `XBB` - European Monetary Unit +// * `XBC` - European Unit of Account (XBC) +// * `XBD` - European Unit of Account (XBD) +// * `FKP` - Falkland Islands Pound +// * `FJD` - Fijian Dollar +// * `FIM` - Finnish Markka +// * `FRF` - French Franc +// * `XFO` - French Gold Franc +// * `XFU` - French UIC-Franc +// * `GMD` - Gambian Dalasi +// * `GEK` - Georgian Kupon Larit +// * `GEL` - Georgian Lari +// * `DEM` - German Mark +// * `GHS` - Ghanaian Cedi +// * `GHC` - Ghanaian Cedi (1979–2007) +// * `GIP` - Gibraltar Pound +// * `XAU` - Gold +// * `GRD` - Greek Drachma +// * `GTQ` - Guatemalan Quetzal +// * `GWP` - Guinea-Bissau Peso +// * `GNF` - Guinean Franc +// * `GNS` - Guinean Syli +// * `GYD` - Guyanaese Dollar +// * `HTG` - Haitian Gourde +// * `HNL` - Honduran Lempira +// * `HKD` - Hong Kong Dollar +// * `HUF` - Hungarian Forint +// * `IMP` - IMP +// * `ISK` - Icelandic Króna +// * `ISJ` - Icelandic Króna (1918–1981) +// * `INR` - Indian Rupee +// * `IDR` - Indonesian Rupiah +// * `IRR` - Iranian Rial +// * `IQD` - Iraqi Dinar +// * `IEP` - Irish Pound +// * `ILS` - Israeli New Shekel +// * `ILP` - Israeli Pound +// * `ILR` - Israeli Shekel (1980–1985) +// * `ITL` - Italian Lira +// * `JMD` - Jamaican Dollar +// * `JPY` - Japanese Yen +// * `JOD` - Jordanian Dinar +// * `KZT` - Kazakhstani Tenge +// * `KES` - Kenyan Shilling +// * `KWD` - Kuwaiti Dinar +// * `KGS` - Kyrgystani Som +// * `LAK` - Laotian Kip +// * `LVL` - Latvian Lats +// * `LVR` - Latvian Ruble +// * `LBP` - Lebanese Pound +// * `LSL` - Lesotho Loti +// * `LRD` - Liberian Dollar +// * `LYD` - Libyan Dinar +// * `LTL` - Lithuanian Litas +// * `LTT` - Lithuanian Talonas +// * `LUL` - Luxembourg Financial Franc +// * `LUC` - Luxembourgian Convertible Franc +// * `LUF` - Luxembourgian Franc +// * `MOP` - Macanese Pataca +// * `MKD` - Macedonian Denar +// * `MKN` - Macedonian Denar (1992–1993) +// * `MGA` - Malagasy Ariary +// * `MGF` - Malagasy Franc +// * `MWK` - Malawian Kwacha +// * `MYR` - Malaysian Ringgit +// * `MVR` - Maldivian Rufiyaa +// * `MVP` - Maldivian Rupee (1947–1981) +// * `MLF` - Malian Franc +// * `MTL` - Maltese Lira +// * `MTP` - Maltese Pound +// * `MRU` - Mauritanian Ouguiya +// * `MRO` - Mauritanian Ouguiya (1973–2017) +// * `MUR` - Mauritian Rupee +// * `MXV` - Mexican Investment Unit +// * `MXN` - Mexican Peso +// * `MXP` - Mexican Silver Peso (1861–1992) +// * `MDC` - Moldovan Cupon +// * `MDL` - Moldovan Leu +// * `MCF` - Monegasque Franc +// * `MNT` - Mongolian Tugrik +// * `MAD` - Moroccan Dirham +// * `MAF` - Moroccan Franc +// * `MZE` - Mozambican Escudo +// * `MZN` - Mozambican Metical +// * `MZM` - Mozambican Metical (1980–2006) +// * `MMK` - Myanmar Kyat +// * `NAD` - Namibian Dollar +// * `NPR` - Nepalese Rupee +// * `ANG` - Netherlands Antillean Guilder +// * `TWD` - New Taiwan Dollar +// * `NZD` - New Zealand Dollar +// * `NIO` - Nicaraguan Córdoba +// * `NIC` - Nicaraguan Córdoba (1988–1991) +// * `NGN` - Nigerian Naira +// * `KPW` - North Korean Won +// * `NOK` - Norwegian Krone +// * `OMR` - Omani Rial +// * `PKR` - Pakistani Rupee +// * `XPD` - Palladium +// * `PAB` - Panamanian Balboa +// * `PGK` - Papua New Guinean Kina +// * `PYG` - Paraguayan Guarani +// * `PEI` - Peruvian Inti +// * `PEN` - Peruvian Sol +// * `PES` - Peruvian Sol (1863–1965) +// * `PHP` - Philippine Peso +// * `XPT` - Platinum +// * `PLN` - Polish Zloty +// * `PLZ` - Polish Zloty (1950–1995) +// * `PTE` - Portuguese Escudo +// * `GWE` - Portuguese Guinea Escudo +// * `QAR` - Qatari Rial +// * `XRE` - RINET Funds +// * `RHD` - Rhodesian Dollar +// * `RON` - Romanian Leu +// * `ROL` - Romanian Leu (1952–2006) +// * `RUB` - Russian Ruble +// * `RUR` - Russian Ruble (1991–1998) +// * `RWF` - Rwandan Franc +// * `SVC` - Salvadoran Colón +// * `WST` - Samoan Tala +// * `SAR` - Saudi Riyal +// * `RSD` - Serbian Dinar +// * `CSD` - Serbian Dinar (2002–2006) +// * `SCR` - Seychellois Rupee +// * `SLL` - Sierra Leonean Leone +// * `XAG` - Silver +// * `SGD` - Singapore Dollar +// * `SKK` - Slovak Koruna +// * `SIT` - Slovenian Tolar +// * `SBD` - Solomon Islands Dollar +// * `SOS` - Somali Shilling +// * `ZAR` - South African Rand +// * `ZAL` - South African Rand (financial) +// * `KRH` - South Korean Hwan (1953–1962) +// * `KRW` - South Korean Won +// * `KRO` - South Korean Won (1945–1953) +// * `SSP` - South Sudanese Pound +// * `SUR` - Soviet Rouble +// * `ESP` - Spanish Peseta +// * `ESA` - Spanish Peseta (A account) +// * `ESB` - Spanish Peseta (convertible account) +// * `XDR` - Special Drawing Rights +// * `LKR` - Sri Lankan Rupee +// * `SHP` - St. Helena Pound +// * `XSU` - Sucre +// * `SDD` - Sudanese Dinar (1992–2007) +// * `SDG` - Sudanese Pound +// * `SDP` - Sudanese Pound (1957–1998) +// * `SRD` - Surinamese Dollar +// * `SRG` - Surinamese Guilder +// * `SZL` - Swazi Lilangeni +// * `SEK` - Swedish Krona +// * `CHF` - Swiss Franc +// * `SYP` - Syrian Pound +// * `STN` - São Tomé & Príncipe Dobra +// * `STD` - São Tomé & Príncipe Dobra (1977–2017) +// * `TVD` - TVD +// * `TJR` - Tajikistani Ruble +// * `TJS` - Tajikistani Somoni +// * `TZS` - Tanzanian Shilling +// * `XTS` - Testing Currency Code +// * `THB` - Thai Baht +// * `XXX` - The codes assigned for transactions where no currency is involved +// * `TPE` - Timorese Escudo +// * `TOP` - Tongan Paʻanga +// * `TTD` - Trinidad & Tobago Dollar +// * `TND` - Tunisian Dinar +// * `TRY` - Turkish Lira +// * `TRL` - Turkish Lira (1922–2005) +// * `TMT` - Turkmenistani Manat +// * `TMM` - Turkmenistani Manat (1993–2009) +// * `USD` - US Dollar +// * `USN` - US Dollar (Next day) +// * `USS` - US Dollar (Same day) +// * `UGX` - Ugandan Shilling +// * `UGS` - Ugandan Shilling (1966–1987) +// * `UAH` - Ukrainian Hryvnia +// * `UAK` - Ukrainian Karbovanets +// * `AED` - United Arab Emirates Dirham +// * `UYW` - Uruguayan Nominal Wage Index Unit +// * `UYU` - Uruguayan Peso +// * `UYP` - Uruguayan Peso (1975–1993) +// * `UYI` - Uruguayan Peso (Indexed Units) +// * `UZS` - Uzbekistani Som +// * `VUV` - Vanuatu Vatu +// * `VES` - Venezuelan Bolívar +// * `VEB` - Venezuelan Bolívar (1871–2008) +// * `VEF` - Venezuelan Bolívar (2008–2018) +// * `VND` - Vietnamese Dong +// * `VNN` - Vietnamese Dong (1978–1985) +// * `CHE` - WIR Euro +// * `CHW` - WIR Franc +// * `XOF` - West African CFA Franc +// * `YDD` - Yemeni Dinar +// * `YER` - Yemeni Rial +// * `YUN` - Yugoslavian Convertible Dinar (1990–1992) +// * `YUD` - Yugoslavian Hard Dinar (1966–1990) +// * `YUM` - Yugoslavian New Dinar (1994–2002) +// * `YUR` - Yugoslavian Reformed Dinar (1992–1993) +// * `ZWN` - ZWN +// * `ZRN` - Zairean New Zaire (1993–1998) +// * `ZRZ` - Zairean Zaire (1971–1993) +// * `ZMW` - Zambian Kwacha +// * `ZMK` - Zambian Kwacha (1968–2012) +// * `ZWD` - Zimbabwean Dollar (1980–2008) +// * `ZWR` - Zimbabwean Dollar (2008) +// * `ZWL` - Zimbabwean Dollar (2009) +type JournalEntryCurrency struct { + TransactionCurrencyEnum TransactionCurrencyEnum + String string + + typ string +} + +func (j *JournalEntryCurrency) GetTransactionCurrencyEnum() TransactionCurrencyEnum { + if j == nil { + return "" + } + return j.TransactionCurrencyEnum +} + +func (j *JournalEntryCurrency) GetString() string { + if j == nil { + return "" + } + return j.String +} + +func (j *JournalEntryCurrency) UnmarshalJSON(data []byte) error { + var valueTransactionCurrencyEnum TransactionCurrencyEnum + if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { + j.typ = "TransactionCurrencyEnum" + j.TransactionCurrencyEnum = valueTransactionCurrencyEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + j.typ = "String" + j.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, j) +} + +func (j JournalEntryCurrency) MarshalJSON() ([]byte, error) { + if j.typ == "TransactionCurrencyEnum" || j.TransactionCurrencyEnum != "" { + return json.Marshal(j.TransactionCurrencyEnum) + } + if j.typ == "String" || j.String != "" { + return json.Marshal(j.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", j) +} + +type JournalEntryCurrencyVisitor interface { + VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error + VisitString(string) error +} + +func (j *JournalEntryCurrency) Accept(visitor JournalEntryCurrencyVisitor) error { + if j.typ == "TransactionCurrencyEnum" || j.TransactionCurrencyEnum != "" { + return visitor.VisitTransactionCurrencyEnum(j.TransactionCurrencyEnum) + } + if j.typ == "String" || j.String != "" { + return visitor.VisitString(j.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", j) +} + +type JournalEntryPaymentsItem struct { + String string + Payment *Payment + + typ string +} + +func (j *JournalEntryPaymentsItem) GetString() string { + if j == nil { + return "" + } + return j.String +} + +func (j *JournalEntryPaymentsItem) GetPayment() *Payment { + if j == nil { + return nil + } + return j.Payment +} + +func (j *JournalEntryPaymentsItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + j.typ = "String" + j.String = valueString + return nil + } + valuePayment := new(Payment) + if err := json.Unmarshal(data, &valuePayment); err == nil { + j.typ = "Payment" + j.Payment = valuePayment + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, j) +} + +func (j JournalEntryPaymentsItem) MarshalJSON() ([]byte, error) { + if j.typ == "String" || j.String != "" { + return json.Marshal(j.String) + } + if j.typ == "Payment" || j.Payment != nil { + return json.Marshal(j.Payment) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", j) +} + +type JournalEntryPaymentsItemVisitor interface { + VisitString(string) error + VisitPayment(*Payment) error +} + +func (j *JournalEntryPaymentsItem) Accept(visitor JournalEntryPaymentsItemVisitor) error { + if j.typ == "String" || j.String != "" { + return visitor.VisitString(j.String) + } + if j.typ == "Payment" || j.Payment != nil { + return visitor.VisitPayment(j.Payment) + } + return fmt.Errorf("type %T does not include a non-empty union type", j) +} + +// The journal's posting status. +// +// * `UNPOSTED` - UNPOSTED +// * `POSTED` - POSTED +type JournalEntryPostingStatus struct { + PostingStatusEnum PostingStatusEnum + String string + + typ string +} + +func (j *JournalEntryPostingStatus) GetPostingStatusEnum() PostingStatusEnum { + if j == nil { + return "" + } + return j.PostingStatusEnum +} + +func (j *JournalEntryPostingStatus) GetString() string { + if j == nil { + return "" + } + return j.String +} + +func (j *JournalEntryPostingStatus) UnmarshalJSON(data []byte) error { + var valuePostingStatusEnum PostingStatusEnum + if err := json.Unmarshal(data, &valuePostingStatusEnum); err == nil { + j.typ = "PostingStatusEnum" + j.PostingStatusEnum = valuePostingStatusEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + j.typ = "String" + j.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, j) +} + +func (j JournalEntryPostingStatus) MarshalJSON() ([]byte, error) { + if j.typ == "PostingStatusEnum" || j.PostingStatusEnum != "" { + return json.Marshal(j.PostingStatusEnum) + } + if j.typ == "String" || j.String != "" { + return json.Marshal(j.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", j) +} + +type JournalEntryPostingStatusVisitor interface { + VisitPostingStatusEnum(PostingStatusEnum) error + VisitString(string) error +} + +func (j *JournalEntryPostingStatus) Accept(visitor JournalEntryPostingStatusVisitor) error { + if j.typ == "PostingStatusEnum" || j.PostingStatusEnum != "" { + return visitor.VisitPostingStatusEnum(j.PostingStatusEnum) + } + if j.typ == "String" || j.String != "" { + return visitor.VisitString(j.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", j) +} + +// # The JournalEntry Object +// ### Description +// The `JournalEntry` object is used to get a record of all manually created entries made in a company’s general ledger. The journal line items for each journal entry should sum to zero. +// +// ### Usage Example +// Fetch from the `GET JournalEntry` endpoint and view a company's journey entry. +type JournalEntryRequest struct { + // The journal entry's transaction date. + TransactionDate *time.Time `json:"transaction_date,omitempty" url:"transaction_date,omitempty"` + // Array of `Payment` object IDs. + Payments []*JournalEntryRequestPaymentsItem `json:"payments,omitempty" url:"payments,omitempty"` + // The journal entry's private note. + Memo *string `json:"memo,omitempty" url:"memo,omitempty"` + // The journal's currency. + // + // * `XUA` - ADB Unit of Account + // * `AFN` - Afghan Afghani + // * `AFA` - Afghan Afghani (1927–2002) + // * `ALL` - Albanian Lek + // * `ALK` - Albanian Lek (1946–1965) + // * `DZD` - Algerian Dinar + // * `ADP` - Andorran Peseta + // * `AOA` - Angolan Kwanza + // * `AOK` - Angolan Kwanza (1977–1991) + // * `AON` - Angolan New Kwanza (1990–2000) + // * `AOR` - Angolan Readjusted Kwanza (1995–1999) + // * `ARA` - Argentine Austral + // * `ARS` - Argentine Peso + // * `ARM` - Argentine Peso (1881–1970) + // * `ARP` - Argentine Peso (1983–1985) + // * `ARL` - Argentine Peso Ley (1970–1983) + // * `AMD` - Armenian Dram + // * `AWG` - Aruban Florin + // * `AUD` - Australian Dollar + // * `ATS` - Austrian Schilling + // * `AZN` - Azerbaijani Manat + // * `AZM` - Azerbaijani Manat (1993–2006) + // * `BSD` - Bahamian Dollar + // * `BHD` - Bahraini Dinar + // * `BDT` - Bangladeshi Taka + // * `BBD` - Barbadian Dollar + // * `BYN` - Belarusian Ruble + // * `BYB` - Belarusian Ruble (1994–1999) + // * `BYR` - Belarusian Ruble (2000–2016) + // * `BEF` - Belgian Franc + // * `BEC` - Belgian Franc (convertible) + // * `BEL` - Belgian Franc (financial) + // * `BZD` - Belize Dollar + // * `BMD` - Bermudan Dollar + // * `BTN` - Bhutanese Ngultrum + // * `BOB` - Bolivian Boliviano + // * `BOL` - Bolivian Boliviano (1863–1963) + // * `BOV` - Bolivian Mvdol + // * `BOP` - Bolivian Peso + // * `BAM` - Bosnia-Herzegovina Convertible Mark + // * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + // * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + // * `BWP` - Botswanan Pula + // * `BRC` - Brazilian Cruzado (1986–1989) + // * `BRZ` - Brazilian Cruzeiro (1942–1967) + // * `BRE` - Brazilian Cruzeiro (1990–1993) + // * `BRR` - Brazilian Cruzeiro (1993–1994) + // * `BRN` - Brazilian New Cruzado (1989–1990) + // * `BRB` - Brazilian New Cruzeiro (1967–1986) + // * `BRL` - Brazilian Real + // * `GBP` - British Pound + // * `BND` - Brunei Dollar + // * `BGL` - Bulgarian Hard Lev + // * `BGN` - Bulgarian Lev + // * `BGO` - Bulgarian Lev (1879–1952) + // * `BGM` - Bulgarian Socialist Lev + // * `BUK` - Burmese Kyat + // * `BIF` - Burundian Franc + // * `XPF` - CFP Franc + // * `KHR` - Cambodian Riel + // * `CAD` - Canadian Dollar + // * `CVE` - Cape Verdean Escudo + // * `KYD` - Cayman Islands Dollar + // * `XAF` - Central African CFA Franc + // * `CLE` - Chilean Escudo + // * `CLP` - Chilean Peso + // * `CLF` - Chilean Unit of Account (UF) + // * `CNX` - Chinese People’s Bank Dollar + // * `CNY` - Chinese Yuan + // * `CNH` - Chinese Yuan (offshore) + // * `COP` - Colombian Peso + // * `COU` - Colombian Real Value Unit + // * `KMF` - Comorian Franc + // * `CDF` - Congolese Franc + // * `CRC` - Costa Rican Colón + // * `HRD` - Croatian Dinar + // * `HRK` - Croatian Kuna + // * `CUC` - Cuban Convertible Peso + // * `CUP` - Cuban Peso + // * `CYP` - Cypriot Pound + // * `CZK` - Czech Koruna + // * `CSK` - Czechoslovak Hard Koruna + // * `DKK` - Danish Krone + // * `DJF` - Djiboutian Franc + // * `DOP` - Dominican Peso + // * `NLG` - Dutch Guilder + // * `XCD` - East Caribbean Dollar + // * `DDM` - East German Mark + // * `ECS` - Ecuadorian Sucre + // * `ECV` - Ecuadorian Unit of Constant Value + // * `EGP` - Egyptian Pound + // * `GQE` - Equatorial Guinean Ekwele + // * `ERN` - Eritrean Nakfa + // * `EEK` - Estonian Kroon + // * `ETB` - Ethiopian Birr + // * `EUR` - Euro + // * `XBA` - European Composite Unit + // * `XEU` - European Currency Unit + // * `XBB` - European Monetary Unit + // * `XBC` - European Unit of Account (XBC) + // * `XBD` - European Unit of Account (XBD) + // * `FKP` - Falkland Islands Pound + // * `FJD` - Fijian Dollar + // * `FIM` - Finnish Markka + // * `FRF` - French Franc + // * `XFO` - French Gold Franc + // * `XFU` - French UIC-Franc + // * `GMD` - Gambian Dalasi + // * `GEK` - Georgian Kupon Larit + // * `GEL` - Georgian Lari + // * `DEM` - German Mark + // * `GHS` - Ghanaian Cedi + // * `GHC` - Ghanaian Cedi (1979–2007) + // * `GIP` - Gibraltar Pound + // * `XAU` - Gold + // * `GRD` - Greek Drachma + // * `GTQ` - Guatemalan Quetzal + // * `GWP` - Guinea-Bissau Peso + // * `GNF` - Guinean Franc + // * `GNS` - Guinean Syli + // * `GYD` - Guyanaese Dollar + // * `HTG` - Haitian Gourde + // * `HNL` - Honduran Lempira + // * `HKD` - Hong Kong Dollar + // * `HUF` - Hungarian Forint + // * `IMP` - IMP + // * `ISK` - Icelandic Króna + // * `ISJ` - Icelandic Króna (1918–1981) + // * `INR` - Indian Rupee + // * `IDR` - Indonesian Rupiah + // * `IRR` - Iranian Rial + // * `IQD` - Iraqi Dinar + // * `IEP` - Irish Pound + // * `ILS` - Israeli New Shekel + // * `ILP` - Israeli Pound + // * `ILR` - Israeli Shekel (1980–1985) + // * `ITL` - Italian Lira + // * `JMD` - Jamaican Dollar + // * `JPY` - Japanese Yen + // * `JOD` - Jordanian Dinar + // * `KZT` - Kazakhstani Tenge + // * `KES` - Kenyan Shilling + // * `KWD` - Kuwaiti Dinar + // * `KGS` - Kyrgystani Som + // * `LAK` - Laotian Kip + // * `LVL` - Latvian Lats + // * `LVR` - Latvian Ruble + // * `LBP` - Lebanese Pound + // * `LSL` - Lesotho Loti + // * `LRD` - Liberian Dollar + // * `LYD` - Libyan Dinar + // * `LTL` - Lithuanian Litas + // * `LTT` - Lithuanian Talonas + // * `LUL` - Luxembourg Financial Franc + // * `LUC` - Luxembourgian Convertible Franc + // * `LUF` - Luxembourgian Franc + // * `MOP` - Macanese Pataca + // * `MKD` - Macedonian Denar + // * `MKN` - Macedonian Denar (1992–1993) + // * `MGA` - Malagasy Ariary + // * `MGF` - Malagasy Franc + // * `MWK` - Malawian Kwacha + // * `MYR` - Malaysian Ringgit + // * `MVR` - Maldivian Rufiyaa + // * `MVP` - Maldivian Rupee (1947–1981) + // * `MLF` - Malian Franc + // * `MTL` - Maltese Lira + // * `MTP` - Maltese Pound + // * `MRU` - Mauritanian Ouguiya + // * `MRO` - Mauritanian Ouguiya (1973–2017) + // * `MUR` - Mauritian Rupee + // * `MXV` - Mexican Investment Unit + // * `MXN` - Mexican Peso + // * `MXP` - Mexican Silver Peso (1861–1992) + // * `MDC` - Moldovan Cupon + // * `MDL` - Moldovan Leu + // * `MCF` - Monegasque Franc + // * `MNT` - Mongolian Tugrik + // * `MAD` - Moroccan Dirham + // * `MAF` - Moroccan Franc + // * `MZE` - Mozambican Escudo + // * `MZN` - Mozambican Metical + // * `MZM` - Mozambican Metical (1980–2006) + // * `MMK` - Myanmar Kyat + // * `NAD` - Namibian Dollar + // * `NPR` - Nepalese Rupee + // * `ANG` - Netherlands Antillean Guilder + // * `TWD` - New Taiwan Dollar + // * `NZD` - New Zealand Dollar + // * `NIO` - Nicaraguan Córdoba + // * `NIC` - Nicaraguan Córdoba (1988–1991) + // * `NGN` - Nigerian Naira + // * `KPW` - North Korean Won + // * `NOK` - Norwegian Krone + // * `OMR` - Omani Rial + // * `PKR` - Pakistani Rupee + // * `XPD` - Palladium + // * `PAB` - Panamanian Balboa + // * `PGK` - Papua New Guinean Kina + // * `PYG` - Paraguayan Guarani + // * `PEI` - Peruvian Inti + // * `PEN` - Peruvian Sol + // * `PES` - Peruvian Sol (1863–1965) + // * `PHP` - Philippine Peso + // * `XPT` - Platinum + // * `PLN` - Polish Zloty + // * `PLZ` - Polish Zloty (1950–1995) + // * `PTE` - Portuguese Escudo + // * `GWE` - Portuguese Guinea Escudo + // * `QAR` - Qatari Rial + // * `XRE` - RINET Funds + // * `RHD` - Rhodesian Dollar + // * `RON` - Romanian Leu + // * `ROL` - Romanian Leu (1952–2006) + // * `RUB` - Russian Ruble + // * `RUR` - Russian Ruble (1991–1998) + // * `RWF` - Rwandan Franc + // * `SVC` - Salvadoran Colón + // * `WST` - Samoan Tala + // * `SAR` - Saudi Riyal + // * `RSD` - Serbian Dinar + // * `CSD` - Serbian Dinar (2002–2006) + // * `SCR` - Seychellois Rupee + // * `SLL` - Sierra Leonean Leone + // * `XAG` - Silver + // * `SGD` - Singapore Dollar + // * `SKK` - Slovak Koruna + // * `SIT` - Slovenian Tolar + // * `SBD` - Solomon Islands Dollar + // * `SOS` - Somali Shilling + // * `ZAR` - South African Rand + // * `ZAL` - South African Rand (financial) + // * `KRH` - South Korean Hwan (1953–1962) + // * `KRW` - South Korean Won + // * `KRO` - South Korean Won (1945–1953) + // * `SSP` - South Sudanese Pound + // * `SUR` - Soviet Rouble + // * `ESP` - Spanish Peseta + // * `ESA` - Spanish Peseta (A account) + // * `ESB` - Spanish Peseta (convertible account) + // * `XDR` - Special Drawing Rights + // * `LKR` - Sri Lankan Rupee + // * `SHP` - St. Helena Pound + // * `XSU` - Sucre + // * `SDD` - Sudanese Dinar (1992–2007) + // * `SDG` - Sudanese Pound + // * `SDP` - Sudanese Pound (1957–1998) + // * `SRD` - Surinamese Dollar + // * `SRG` - Surinamese Guilder + // * `SZL` - Swazi Lilangeni + // * `SEK` - Swedish Krona + // * `CHF` - Swiss Franc + // * `SYP` - Syrian Pound + // * `STN` - São Tomé & Príncipe Dobra + // * `STD` - São Tomé & Príncipe Dobra (1977–2017) + // * `TVD` - TVD + // * `TJR` - Tajikistani Ruble + // * `TJS` - Tajikistani Somoni + // * `TZS` - Tanzanian Shilling + // * `XTS` - Testing Currency Code + // * `THB` - Thai Baht + // * `XXX` - The codes assigned for transactions where no currency is involved + // * `TPE` - Timorese Escudo + // * `TOP` - Tongan Paʻanga + // * `TTD` - Trinidad & Tobago Dollar + // * `TND` - Tunisian Dinar + // * `TRY` - Turkish Lira + // * `TRL` - Turkish Lira (1922–2005) + // * `TMT` - Turkmenistani Manat + // * `TMM` - Turkmenistani Manat (1993–2009) + // * `USD` - US Dollar + // * `USN` - US Dollar (Next day) + // * `USS` - US Dollar (Same day) + // * `UGX` - Ugandan Shilling + // * `UGS` - Ugandan Shilling (1966–1987) + // * `UAH` - Ukrainian Hryvnia + // * `UAK` - Ukrainian Karbovanets + // * `AED` - United Arab Emirates Dirham + // * `UYW` - Uruguayan Nominal Wage Index Unit + // * `UYU` - Uruguayan Peso + // * `UYP` - Uruguayan Peso (1975–1993) + // * `UYI` - Uruguayan Peso (Indexed Units) + // * `UZS` - Uzbekistani Som + // * `VUV` - Vanuatu Vatu + // * `VES` - Venezuelan Bolívar + // * `VEB` - Venezuelan Bolívar (1871–2008) + // * `VEF` - Venezuelan Bolívar (2008–2018) + // * `VND` - Vietnamese Dong + // * `VNN` - Vietnamese Dong (1978–1985) + // * `CHE` - WIR Euro + // * `CHW` - WIR Franc + // * `XOF` - West African CFA Franc + // * `YDD` - Yemeni Dinar + // * `YER` - Yemeni Rial + // * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + // * `YUD` - Yugoslavian Hard Dinar (1966–1990) + // * `YUM` - Yugoslavian New Dinar (1994–2002) + // * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + // * `ZWN` - ZWN + // * `ZRN` - Zairean New Zaire (1993–1998) + // * `ZRZ` - Zairean Zaire (1971–1993) + // * `ZMW` - Zambian Kwacha + // * `ZMK` - Zambian Kwacha (1968–2012) + // * `ZWD` - Zimbabwean Dollar (1980–2008) + // * `ZWR` - Zimbabwean Dollar (2008) + // * `ZWL` - Zimbabwean Dollar (2009) + Currency *JournalEntryRequestCurrency `json:"currency,omitempty" url:"currency,omitempty"` + // The journal entry's exchange rate. + ExchangeRate *string `json:"exchange_rate,omitempty" url:"exchange_rate,omitempty"` + // The company the journal entry belongs to. + Company *JournalEntryRequestCompany `json:"company,omitempty" url:"company,omitempty"` + TrackingCategories []*JournalEntryRequestTrackingCategoriesItem `json:"tracking_categories,omitempty" url:"tracking_categories,omitempty"` + // If the transaction is inclusive or exclusive of tax. `True` if inclusive, `False` if exclusive. + InclusiveOfTax *bool `json:"inclusive_of_tax,omitempty" url:"inclusive_of_tax,omitempty"` + Lines []*JournalLineRequest `json:"lines,omitempty" url:"lines,omitempty"` + // Reference number for identifying journal entries. + JournalNumber *string `json:"journal_number,omitempty" url:"journal_number,omitempty"` + // The journal's posting status. + // + // * `UNPOSTED` - UNPOSTED + // * `POSTED` - POSTED + PostingStatus *JournalEntryRequestPostingStatus `json:"posting_status,omitempty" url:"posting_status,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + RemoteFields []*RemoteFieldRequest `json:"remote_fields,omitempty" url:"remote_fields,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (j *JournalEntryRequest) GetTransactionDate() *time.Time { + if j == nil { + return nil + } + return j.TransactionDate +} + +func (j *JournalEntryRequest) GetPayments() []*JournalEntryRequestPaymentsItem { + if j == nil { + return nil + } + return j.Payments +} + +func (j *JournalEntryRequest) GetMemo() *string { + if j == nil { + return nil + } + return j.Memo +} + +func (j *JournalEntryRequest) GetCurrency() *JournalEntryRequestCurrency { + if j == nil { + return nil + } + return j.Currency +} + +func (j *JournalEntryRequest) GetExchangeRate() *string { + if j == nil { + return nil + } + return j.ExchangeRate +} + +func (j *JournalEntryRequest) GetCompany() *JournalEntryRequestCompany { + if j == nil { + return nil + } + return j.Company +} + +func (j *JournalEntryRequest) GetTrackingCategories() []*JournalEntryRequestTrackingCategoriesItem { + if j == nil { + return nil + } + return j.TrackingCategories +} + +func (j *JournalEntryRequest) GetInclusiveOfTax() *bool { + if j == nil { + return nil + } + return j.InclusiveOfTax +} + +func (j *JournalEntryRequest) GetLines() []*JournalLineRequest { + if j == nil { + return nil + } + return j.Lines +} + +func (j *JournalEntryRequest) GetJournalNumber() *string { + if j == nil { + return nil + } + return j.JournalNumber +} + +func (j *JournalEntryRequest) GetPostingStatus() *JournalEntryRequestPostingStatus { + if j == nil { + return nil + } + return j.PostingStatus +} + +func (j *JournalEntryRequest) GetIntegrationParams() map[string]interface{} { + if j == nil { + return nil + } + return j.IntegrationParams +} + +func (j *JournalEntryRequest) GetLinkedAccountParams() map[string]interface{} { + if j == nil { + return nil + } + return j.LinkedAccountParams +} + +func (j *JournalEntryRequest) GetRemoteFields() []*RemoteFieldRequest { + if j == nil { + return nil + } + return j.RemoteFields +} + +func (j *JournalEntryRequest) GetExtraProperties() map[string]interface{} { + return j.extraProperties +} + +func (j *JournalEntryRequest) UnmarshalJSON(data []byte) error { + type embed JournalEntryRequest + var unmarshaler = struct { + embed + TransactionDate *internal.DateTime `json:"transaction_date,omitempty"` + }{ + embed: embed(*j), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *j = JournalEntryRequest(unmarshaler.embed) + j.TransactionDate = unmarshaler.TransactionDate.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *j) + if err != nil { + return err + } + j.extraProperties = extraProperties + j.rawJSON = json.RawMessage(data) + return nil +} + +func (j *JournalEntryRequest) MarshalJSON() ([]byte, error) { + type embed JournalEntryRequest + var marshaler = struct { + embed + TransactionDate *internal.DateTime `json:"transaction_date,omitempty"` + }{ + embed: embed(*j), + TransactionDate: internal.NewOptionalDateTime(j.TransactionDate), + } + return json.Marshal(marshaler) +} + +func (j *JournalEntryRequest) String() string { + if len(j.rawJSON) > 0 { + if value, err := internal.StringifyJSON(j.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(j); err == nil { + return value + } + return fmt.Sprintf("%#v", j) +} + +// The company the journal entry belongs to. +type JournalEntryRequestCompany struct { + String string + CompanyInfo *CompanyInfo + + typ string +} + +func (j *JournalEntryRequestCompany) GetString() string { + if j == nil { + return "" + } + return j.String +} + +func (j *JournalEntryRequestCompany) GetCompanyInfo() *CompanyInfo { + if j == nil { + return nil + } + return j.CompanyInfo +} + +func (j *JournalEntryRequestCompany) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + j.typ = "String" + j.String = valueString + return nil + } + valueCompanyInfo := new(CompanyInfo) + if err := json.Unmarshal(data, &valueCompanyInfo); err == nil { + j.typ = "CompanyInfo" + j.CompanyInfo = valueCompanyInfo + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, j) +} + +func (j JournalEntryRequestCompany) MarshalJSON() ([]byte, error) { + if j.typ == "String" || j.String != "" { + return json.Marshal(j.String) + } + if j.typ == "CompanyInfo" || j.CompanyInfo != nil { + return json.Marshal(j.CompanyInfo) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", j) +} + +type JournalEntryRequestCompanyVisitor interface { + VisitString(string) error + VisitCompanyInfo(*CompanyInfo) error +} + +func (j *JournalEntryRequestCompany) Accept(visitor JournalEntryRequestCompanyVisitor) error { + if j.typ == "String" || j.String != "" { + return visitor.VisitString(j.String) + } + if j.typ == "CompanyInfo" || j.CompanyInfo != nil { + return visitor.VisitCompanyInfo(j.CompanyInfo) + } + return fmt.Errorf("type %T does not include a non-empty union type", j) +} + +// The journal's currency. +// +// * `XUA` - ADB Unit of Account +// * `AFN` - Afghan Afghani +// * `AFA` - Afghan Afghani (1927–2002) +// * `ALL` - Albanian Lek +// * `ALK` - Albanian Lek (1946–1965) +// * `DZD` - Algerian Dinar +// * `ADP` - Andorran Peseta +// * `AOA` - Angolan Kwanza +// * `AOK` - Angolan Kwanza (1977–1991) +// * `AON` - Angolan New Kwanza (1990–2000) +// * `AOR` - Angolan Readjusted Kwanza (1995–1999) +// * `ARA` - Argentine Austral +// * `ARS` - Argentine Peso +// * `ARM` - Argentine Peso (1881–1970) +// * `ARP` - Argentine Peso (1983–1985) +// * `ARL` - Argentine Peso Ley (1970–1983) +// * `AMD` - Armenian Dram +// * `AWG` - Aruban Florin +// * `AUD` - Australian Dollar +// * `ATS` - Austrian Schilling +// * `AZN` - Azerbaijani Manat +// * `AZM` - Azerbaijani Manat (1993–2006) +// * `BSD` - Bahamian Dollar +// * `BHD` - Bahraini Dinar +// * `BDT` - Bangladeshi Taka +// * `BBD` - Barbadian Dollar +// * `BYN` - Belarusian Ruble +// * `BYB` - Belarusian Ruble (1994–1999) +// * `BYR` - Belarusian Ruble (2000–2016) +// * `BEF` - Belgian Franc +// * `BEC` - Belgian Franc (convertible) +// * `BEL` - Belgian Franc (financial) +// * `BZD` - Belize Dollar +// * `BMD` - Bermudan Dollar +// * `BTN` - Bhutanese Ngultrum +// * `BOB` - Bolivian Boliviano +// * `BOL` - Bolivian Boliviano (1863–1963) +// * `BOV` - Bolivian Mvdol +// * `BOP` - Bolivian Peso +// * `BAM` - Bosnia-Herzegovina Convertible Mark +// * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) +// * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) +// * `BWP` - Botswanan Pula +// * `BRC` - Brazilian Cruzado (1986–1989) +// * `BRZ` - Brazilian Cruzeiro (1942–1967) +// * `BRE` - Brazilian Cruzeiro (1990–1993) +// * `BRR` - Brazilian Cruzeiro (1993–1994) +// * `BRN` - Brazilian New Cruzado (1989–1990) +// * `BRB` - Brazilian New Cruzeiro (1967–1986) +// * `BRL` - Brazilian Real +// * `GBP` - British Pound +// * `BND` - Brunei Dollar +// * `BGL` - Bulgarian Hard Lev +// * `BGN` - Bulgarian Lev +// * `BGO` - Bulgarian Lev (1879–1952) +// * `BGM` - Bulgarian Socialist Lev +// * `BUK` - Burmese Kyat +// * `BIF` - Burundian Franc +// * `XPF` - CFP Franc +// * `KHR` - Cambodian Riel +// * `CAD` - Canadian Dollar +// * `CVE` - Cape Verdean Escudo +// * `KYD` - Cayman Islands Dollar +// * `XAF` - Central African CFA Franc +// * `CLE` - Chilean Escudo +// * `CLP` - Chilean Peso +// * `CLF` - Chilean Unit of Account (UF) +// * `CNX` - Chinese People’s Bank Dollar +// * `CNY` - Chinese Yuan +// * `CNH` - Chinese Yuan (offshore) +// * `COP` - Colombian Peso +// * `COU` - Colombian Real Value Unit +// * `KMF` - Comorian Franc +// * `CDF` - Congolese Franc +// * `CRC` - Costa Rican Colón +// * `HRD` - Croatian Dinar +// * `HRK` - Croatian Kuna +// * `CUC` - Cuban Convertible Peso +// * `CUP` - Cuban Peso +// * `CYP` - Cypriot Pound +// * `CZK` - Czech Koruna +// * `CSK` - Czechoslovak Hard Koruna +// * `DKK` - Danish Krone +// * `DJF` - Djiboutian Franc +// * `DOP` - Dominican Peso +// * `NLG` - Dutch Guilder +// * `XCD` - East Caribbean Dollar +// * `DDM` - East German Mark +// * `ECS` - Ecuadorian Sucre +// * `ECV` - Ecuadorian Unit of Constant Value +// * `EGP` - Egyptian Pound +// * `GQE` - Equatorial Guinean Ekwele +// * `ERN` - Eritrean Nakfa +// * `EEK` - Estonian Kroon +// * `ETB` - Ethiopian Birr +// * `EUR` - Euro +// * `XBA` - European Composite Unit +// * `XEU` - European Currency Unit +// * `XBB` - European Monetary Unit +// * `XBC` - European Unit of Account (XBC) +// * `XBD` - European Unit of Account (XBD) +// * `FKP` - Falkland Islands Pound +// * `FJD` - Fijian Dollar +// * `FIM` - Finnish Markka +// * `FRF` - French Franc +// * `XFO` - French Gold Franc +// * `XFU` - French UIC-Franc +// * `GMD` - Gambian Dalasi +// * `GEK` - Georgian Kupon Larit +// * `GEL` - Georgian Lari +// * `DEM` - German Mark +// * `GHS` - Ghanaian Cedi +// * `GHC` - Ghanaian Cedi (1979–2007) +// * `GIP` - Gibraltar Pound +// * `XAU` - Gold +// * `GRD` - Greek Drachma +// * `GTQ` - Guatemalan Quetzal +// * `GWP` - Guinea-Bissau Peso +// * `GNF` - Guinean Franc +// * `GNS` - Guinean Syli +// * `GYD` - Guyanaese Dollar +// * `HTG` - Haitian Gourde +// * `HNL` - Honduran Lempira +// * `HKD` - Hong Kong Dollar +// * `HUF` - Hungarian Forint +// * `IMP` - IMP +// * `ISK` - Icelandic Króna +// * `ISJ` - Icelandic Króna (1918–1981) +// * `INR` - Indian Rupee +// * `IDR` - Indonesian Rupiah +// * `IRR` - Iranian Rial +// * `IQD` - Iraqi Dinar +// * `IEP` - Irish Pound +// * `ILS` - Israeli New Shekel +// * `ILP` - Israeli Pound +// * `ILR` - Israeli Shekel (1980–1985) +// * `ITL` - Italian Lira +// * `JMD` - Jamaican Dollar +// * `JPY` - Japanese Yen +// * `JOD` - Jordanian Dinar +// * `KZT` - Kazakhstani Tenge +// * `KES` - Kenyan Shilling +// * `KWD` - Kuwaiti Dinar +// * `KGS` - Kyrgystani Som +// * `LAK` - Laotian Kip +// * `LVL` - Latvian Lats +// * `LVR` - Latvian Ruble +// * `LBP` - Lebanese Pound +// * `LSL` - Lesotho Loti +// * `LRD` - Liberian Dollar +// * `LYD` - Libyan Dinar +// * `LTL` - Lithuanian Litas +// * `LTT` - Lithuanian Talonas +// * `LUL` - Luxembourg Financial Franc +// * `LUC` - Luxembourgian Convertible Franc +// * `LUF` - Luxembourgian Franc +// * `MOP` - Macanese Pataca +// * `MKD` - Macedonian Denar +// * `MKN` - Macedonian Denar (1992–1993) +// * `MGA` - Malagasy Ariary +// * `MGF` - Malagasy Franc +// * `MWK` - Malawian Kwacha +// * `MYR` - Malaysian Ringgit +// * `MVR` - Maldivian Rufiyaa +// * `MVP` - Maldivian Rupee (1947–1981) +// * `MLF` - Malian Franc +// * `MTL` - Maltese Lira +// * `MTP` - Maltese Pound +// * `MRU` - Mauritanian Ouguiya +// * `MRO` - Mauritanian Ouguiya (1973–2017) +// * `MUR` - Mauritian Rupee +// * `MXV` - Mexican Investment Unit +// * `MXN` - Mexican Peso +// * `MXP` - Mexican Silver Peso (1861–1992) +// * `MDC` - Moldovan Cupon +// * `MDL` - Moldovan Leu +// * `MCF` - Monegasque Franc +// * `MNT` - Mongolian Tugrik +// * `MAD` - Moroccan Dirham +// * `MAF` - Moroccan Franc +// * `MZE` - Mozambican Escudo +// * `MZN` - Mozambican Metical +// * `MZM` - Mozambican Metical (1980–2006) +// * `MMK` - Myanmar Kyat +// * `NAD` - Namibian Dollar +// * `NPR` - Nepalese Rupee +// * `ANG` - Netherlands Antillean Guilder +// * `TWD` - New Taiwan Dollar +// * `NZD` - New Zealand Dollar +// * `NIO` - Nicaraguan Córdoba +// * `NIC` - Nicaraguan Córdoba (1988–1991) +// * `NGN` - Nigerian Naira +// * `KPW` - North Korean Won +// * `NOK` - Norwegian Krone +// * `OMR` - Omani Rial +// * `PKR` - Pakistani Rupee +// * `XPD` - Palladium +// * `PAB` - Panamanian Balboa +// * `PGK` - Papua New Guinean Kina +// * `PYG` - Paraguayan Guarani +// * `PEI` - Peruvian Inti +// * `PEN` - Peruvian Sol +// * `PES` - Peruvian Sol (1863–1965) +// * `PHP` - Philippine Peso +// * `XPT` - Platinum +// * `PLN` - Polish Zloty +// * `PLZ` - Polish Zloty (1950–1995) +// * `PTE` - Portuguese Escudo +// * `GWE` - Portuguese Guinea Escudo +// * `QAR` - Qatari Rial +// * `XRE` - RINET Funds +// * `RHD` - Rhodesian Dollar +// * `RON` - Romanian Leu +// * `ROL` - Romanian Leu (1952–2006) +// * `RUB` - Russian Ruble +// * `RUR` - Russian Ruble (1991–1998) +// * `RWF` - Rwandan Franc +// * `SVC` - Salvadoran Colón +// * `WST` - Samoan Tala +// * `SAR` - Saudi Riyal +// * `RSD` - Serbian Dinar +// * `CSD` - Serbian Dinar (2002–2006) +// * `SCR` - Seychellois Rupee +// * `SLL` - Sierra Leonean Leone +// * `XAG` - Silver +// * `SGD` - Singapore Dollar +// * `SKK` - Slovak Koruna +// * `SIT` - Slovenian Tolar +// * `SBD` - Solomon Islands Dollar +// * `SOS` - Somali Shilling +// * `ZAR` - South African Rand +// * `ZAL` - South African Rand (financial) +// * `KRH` - South Korean Hwan (1953–1962) +// * `KRW` - South Korean Won +// * `KRO` - South Korean Won (1945–1953) +// * `SSP` - South Sudanese Pound +// * `SUR` - Soviet Rouble +// * `ESP` - Spanish Peseta +// * `ESA` - Spanish Peseta (A account) +// * `ESB` - Spanish Peseta (convertible account) +// * `XDR` - Special Drawing Rights +// * `LKR` - Sri Lankan Rupee +// * `SHP` - St. Helena Pound +// * `XSU` - Sucre +// * `SDD` - Sudanese Dinar (1992–2007) +// * `SDG` - Sudanese Pound +// * `SDP` - Sudanese Pound (1957–1998) +// * `SRD` - Surinamese Dollar +// * `SRG` - Surinamese Guilder +// * `SZL` - Swazi Lilangeni +// * `SEK` - Swedish Krona +// * `CHF` - Swiss Franc +// * `SYP` - Syrian Pound +// * `STN` - São Tomé & Príncipe Dobra +// * `STD` - São Tomé & Príncipe Dobra (1977–2017) +// * `TVD` - TVD +// * `TJR` - Tajikistani Ruble +// * `TJS` - Tajikistani Somoni +// * `TZS` - Tanzanian Shilling +// * `XTS` - Testing Currency Code +// * `THB` - Thai Baht +// * `XXX` - The codes assigned for transactions where no currency is involved +// * `TPE` - Timorese Escudo +// * `TOP` - Tongan Paʻanga +// * `TTD` - Trinidad & Tobago Dollar +// * `TND` - Tunisian Dinar +// * `TRY` - Turkish Lira +// * `TRL` - Turkish Lira (1922–2005) +// * `TMT` - Turkmenistani Manat +// * `TMM` - Turkmenistani Manat (1993–2009) +// * `USD` - US Dollar +// * `USN` - US Dollar (Next day) +// * `USS` - US Dollar (Same day) +// * `UGX` - Ugandan Shilling +// * `UGS` - Ugandan Shilling (1966–1987) +// * `UAH` - Ukrainian Hryvnia +// * `UAK` - Ukrainian Karbovanets +// * `AED` - United Arab Emirates Dirham +// * `UYW` - Uruguayan Nominal Wage Index Unit +// * `UYU` - Uruguayan Peso +// * `UYP` - Uruguayan Peso (1975–1993) +// * `UYI` - Uruguayan Peso (Indexed Units) +// * `UZS` - Uzbekistani Som +// * `VUV` - Vanuatu Vatu +// * `VES` - Venezuelan Bolívar +// * `VEB` - Venezuelan Bolívar (1871–2008) +// * `VEF` - Venezuelan Bolívar (2008–2018) +// * `VND` - Vietnamese Dong +// * `VNN` - Vietnamese Dong (1978–1985) +// * `CHE` - WIR Euro +// * `CHW` - WIR Franc +// * `XOF` - West African CFA Franc +// * `YDD` - Yemeni Dinar +// * `YER` - Yemeni Rial +// * `YUN` - Yugoslavian Convertible Dinar (1990–1992) +// * `YUD` - Yugoslavian Hard Dinar (1966–1990) +// * `YUM` - Yugoslavian New Dinar (1994–2002) +// * `YUR` - Yugoslavian Reformed Dinar (1992–1993) +// * `ZWN` - ZWN +// * `ZRN` - Zairean New Zaire (1993–1998) +// * `ZRZ` - Zairean Zaire (1971–1993) +// * `ZMW` - Zambian Kwacha +// * `ZMK` - Zambian Kwacha (1968–2012) +// * `ZWD` - Zimbabwean Dollar (1980–2008) +// * `ZWR` - Zimbabwean Dollar (2008) +// * `ZWL` - Zimbabwean Dollar (2009) +type JournalEntryRequestCurrency struct { + TransactionCurrencyEnum TransactionCurrencyEnum + String string + + typ string +} + +func (j *JournalEntryRequestCurrency) GetTransactionCurrencyEnum() TransactionCurrencyEnum { + if j == nil { + return "" + } + return j.TransactionCurrencyEnum +} + +func (j *JournalEntryRequestCurrency) GetString() string { + if j == nil { + return "" + } + return j.String +} + +func (j *JournalEntryRequestCurrency) UnmarshalJSON(data []byte) error { + var valueTransactionCurrencyEnum TransactionCurrencyEnum + if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { + j.typ = "TransactionCurrencyEnum" + j.TransactionCurrencyEnum = valueTransactionCurrencyEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + j.typ = "String" + j.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, j) +} + +func (j JournalEntryRequestCurrency) MarshalJSON() ([]byte, error) { + if j.typ == "TransactionCurrencyEnum" || j.TransactionCurrencyEnum != "" { + return json.Marshal(j.TransactionCurrencyEnum) + } + if j.typ == "String" || j.String != "" { + return json.Marshal(j.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", j) +} + +type JournalEntryRequestCurrencyVisitor interface { + VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error + VisitString(string) error +} + +func (j *JournalEntryRequestCurrency) Accept(visitor JournalEntryRequestCurrencyVisitor) error { + if j.typ == "TransactionCurrencyEnum" || j.TransactionCurrencyEnum != "" { + return visitor.VisitTransactionCurrencyEnum(j.TransactionCurrencyEnum) + } + if j.typ == "String" || j.String != "" { + return visitor.VisitString(j.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", j) +} + +type JournalEntryRequestPaymentsItem struct { + String string + Payment *Payment + + typ string +} + +func (j *JournalEntryRequestPaymentsItem) GetString() string { + if j == nil { + return "" + } + return j.String +} + +func (j *JournalEntryRequestPaymentsItem) GetPayment() *Payment { + if j == nil { + return nil + } + return j.Payment +} + +func (j *JournalEntryRequestPaymentsItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + j.typ = "String" + j.String = valueString + return nil + } + valuePayment := new(Payment) + if err := json.Unmarshal(data, &valuePayment); err == nil { + j.typ = "Payment" + j.Payment = valuePayment + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, j) +} + +func (j JournalEntryRequestPaymentsItem) MarshalJSON() ([]byte, error) { + if j.typ == "String" || j.String != "" { + return json.Marshal(j.String) + } + if j.typ == "Payment" || j.Payment != nil { + return json.Marshal(j.Payment) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", j) +} + +type JournalEntryRequestPaymentsItemVisitor interface { + VisitString(string) error + VisitPayment(*Payment) error +} + +func (j *JournalEntryRequestPaymentsItem) Accept(visitor JournalEntryRequestPaymentsItemVisitor) error { + if j.typ == "String" || j.String != "" { + return visitor.VisitString(j.String) + } + if j.typ == "Payment" || j.Payment != nil { + return visitor.VisitPayment(j.Payment) + } + return fmt.Errorf("type %T does not include a non-empty union type", j) +} + +// The journal's posting status. +// +// * `UNPOSTED` - UNPOSTED +// * `POSTED` - POSTED +type JournalEntryRequestPostingStatus struct { + PostingStatusEnum PostingStatusEnum + String string + + typ string +} + +func (j *JournalEntryRequestPostingStatus) GetPostingStatusEnum() PostingStatusEnum { + if j == nil { + return "" + } + return j.PostingStatusEnum +} + +func (j *JournalEntryRequestPostingStatus) GetString() string { + if j == nil { + return "" + } + return j.String +} + +func (j *JournalEntryRequestPostingStatus) UnmarshalJSON(data []byte) error { + var valuePostingStatusEnum PostingStatusEnum + if err := json.Unmarshal(data, &valuePostingStatusEnum); err == nil { + j.typ = "PostingStatusEnum" + j.PostingStatusEnum = valuePostingStatusEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + j.typ = "String" + j.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, j) +} + +func (j JournalEntryRequestPostingStatus) MarshalJSON() ([]byte, error) { + if j.typ == "PostingStatusEnum" || j.PostingStatusEnum != "" { + return json.Marshal(j.PostingStatusEnum) + } + if j.typ == "String" || j.String != "" { + return json.Marshal(j.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", j) +} + +type JournalEntryRequestPostingStatusVisitor interface { + VisitPostingStatusEnum(PostingStatusEnum) error + VisitString(string) error +} + +func (j *JournalEntryRequestPostingStatus) Accept(visitor JournalEntryRequestPostingStatusVisitor) error { + if j.typ == "PostingStatusEnum" || j.PostingStatusEnum != "" { + return visitor.VisitPostingStatusEnum(j.PostingStatusEnum) + } + if j.typ == "String" || j.String != "" { + return visitor.VisitString(j.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", j) +} + +type JournalEntryRequestTrackingCategoriesItem struct { + String string + TrackingCategory *TrackingCategory + + typ string +} + +func (j *JournalEntryRequestTrackingCategoriesItem) GetString() string { + if j == nil { + return "" + } + return j.String +} + +func (j *JournalEntryRequestTrackingCategoriesItem) GetTrackingCategory() *TrackingCategory { + if j == nil { + return nil + } + return j.TrackingCategory +} + +func (j *JournalEntryRequestTrackingCategoriesItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + j.typ = "String" + j.String = valueString + return nil + } + valueTrackingCategory := new(TrackingCategory) + if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { + j.typ = "TrackingCategory" + j.TrackingCategory = valueTrackingCategory + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, j) +} + +func (j JournalEntryRequestTrackingCategoriesItem) MarshalJSON() ([]byte, error) { + if j.typ == "String" || j.String != "" { + return json.Marshal(j.String) + } + if j.typ == "TrackingCategory" || j.TrackingCategory != nil { + return json.Marshal(j.TrackingCategory) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", j) +} + +type JournalEntryRequestTrackingCategoriesItemVisitor interface { + VisitString(string) error + VisitTrackingCategory(*TrackingCategory) error +} + +func (j *JournalEntryRequestTrackingCategoriesItem) Accept(visitor JournalEntryRequestTrackingCategoriesItemVisitor) error { + if j.typ == "String" || j.String != "" { + return visitor.VisitString(j.String) + } + if j.typ == "TrackingCategory" || j.TrackingCategory != nil { + return visitor.VisitTrackingCategory(j.TrackingCategory) + } + return fmt.Errorf("type %T does not include a non-empty union type", j) +} + +type JournalEntryResponse struct { + Model *JournalEntry `json:"model" url:"model"` + Warnings []*WarningValidationProblem `json:"warnings" url:"warnings"` + Errors []*ErrorValidationProblem `json:"errors" url:"errors"` + Logs []*DebugModeLog `json:"logs,omitempty" url:"logs,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (j *JournalEntryResponse) GetModel() *JournalEntry { + if j == nil { + return nil + } + return j.Model +} + +func (j *JournalEntryResponse) GetWarnings() []*WarningValidationProblem { + if j == nil { + return nil + } + return j.Warnings +} + +func (j *JournalEntryResponse) GetErrors() []*ErrorValidationProblem { + if j == nil { + return nil + } + return j.Errors +} + +func (j *JournalEntryResponse) GetLogs() []*DebugModeLog { + if j == nil { + return nil + } + return j.Logs +} + +func (j *JournalEntryResponse) GetExtraProperties() map[string]interface{} { + return j.extraProperties +} + +func (j *JournalEntryResponse) UnmarshalJSON(data []byte) error { + type unmarshaler JournalEntryResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *j = JournalEntryResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *j) + if err != nil { + return err + } + j.extraProperties = extraProperties + j.rawJSON = json.RawMessage(data) + return nil +} + +func (j *JournalEntryResponse) String() string { + if len(j.rawJSON) > 0 { + if value, err := internal.StringifyJSON(j.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(j); err == nil { + return value + } + return fmt.Sprintf("%#v", j) +} + +type JournalEntryTrackingCategoriesItem struct { + String string + TrackingCategory *TrackingCategory + + typ string +} + +func (j *JournalEntryTrackingCategoriesItem) GetString() string { + if j == nil { + return "" + } + return j.String +} + +func (j *JournalEntryTrackingCategoriesItem) GetTrackingCategory() *TrackingCategory { + if j == nil { + return nil + } + return j.TrackingCategory +} + +func (j *JournalEntryTrackingCategoriesItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + j.typ = "String" + j.String = valueString + return nil + } + valueTrackingCategory := new(TrackingCategory) + if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { + j.typ = "TrackingCategory" + j.TrackingCategory = valueTrackingCategory + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, j) +} + +func (j JournalEntryTrackingCategoriesItem) MarshalJSON() ([]byte, error) { + if j.typ == "String" || j.String != "" { + return json.Marshal(j.String) + } + if j.typ == "TrackingCategory" || j.TrackingCategory != nil { + return json.Marshal(j.TrackingCategory) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", j) +} + +type JournalEntryTrackingCategoriesItemVisitor interface { + VisitString(string) error + VisitTrackingCategory(*TrackingCategory) error +} + +func (j *JournalEntryTrackingCategoriesItem) Accept(visitor JournalEntryTrackingCategoriesItemVisitor) error { + if j.typ == "String" || j.String != "" { + return visitor.VisitString(j.String) + } + if j.typ == "TrackingCategory" || j.TrackingCategory != nil { + return visitor.VisitTrackingCategory(j.TrackingCategory) + } + return fmt.Errorf("type %T does not include a non-empty union type", j) +} + +// # The JournalLine Object +// ### Description +// The `JournalLine` object is used to represent a journal entry's line items. +// +// ### Usage Example +// Fetch from the `GET JournalEntry` endpoint and view the journal entry's line items. +type JournalLine struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + Account *JournalLineAccount `json:"account,omitempty" url:"account,omitempty"` + // The value of the line item including taxes and other fees. + NetAmount *float64 `json:"net_amount,omitempty" url:"net_amount,omitempty"` + TrackingCategory *JournalLineTrackingCategory `json:"tracking_category,omitempty" url:"tracking_category,omitempty"` + // The journal line item's associated tracking categories. + TrackingCategories []*JournalLineTrackingCategoriesItem `json:"tracking_categories,omitempty" url:"tracking_categories,omitempty"` + // The journal line item's currency. + // + // * `XUA` - ADB Unit of Account + // * `AFN` - Afghan Afghani + // * `AFA` - Afghan Afghani (1927–2002) + // * `ALL` - Albanian Lek + // * `ALK` - Albanian Lek (1946–1965) + // * `DZD` - Algerian Dinar + // * `ADP` - Andorran Peseta + // * `AOA` - Angolan Kwanza + // * `AOK` - Angolan Kwanza (1977–1991) + // * `AON` - Angolan New Kwanza (1990–2000) + // * `AOR` - Angolan Readjusted Kwanza (1995–1999) + // * `ARA` - Argentine Austral + // * `ARS` - Argentine Peso + // * `ARM` - Argentine Peso (1881–1970) + // * `ARP` - Argentine Peso (1983–1985) + // * `ARL` - Argentine Peso Ley (1970–1983) + // * `AMD` - Armenian Dram + // * `AWG` - Aruban Florin + // * `AUD` - Australian Dollar + // * `ATS` - Austrian Schilling + // * `AZN` - Azerbaijani Manat + // * `AZM` - Azerbaijani Manat (1993–2006) + // * `BSD` - Bahamian Dollar + // * `BHD` - Bahraini Dinar + // * `BDT` - Bangladeshi Taka + // * `BBD` - Barbadian Dollar + // * `BYN` - Belarusian Ruble + // * `BYB` - Belarusian Ruble (1994–1999) + // * `BYR` - Belarusian Ruble (2000–2016) + // * `BEF` - Belgian Franc + // * `BEC` - Belgian Franc (convertible) + // * `BEL` - Belgian Franc (financial) + // * `BZD` - Belize Dollar + // * `BMD` - Bermudan Dollar + // * `BTN` - Bhutanese Ngultrum + // * `BOB` - Bolivian Boliviano + // * `BOL` - Bolivian Boliviano (1863–1963) + // * `BOV` - Bolivian Mvdol + // * `BOP` - Bolivian Peso + // * `BAM` - Bosnia-Herzegovina Convertible Mark + // * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + // * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + // * `BWP` - Botswanan Pula + // * `BRC` - Brazilian Cruzado (1986–1989) + // * `BRZ` - Brazilian Cruzeiro (1942–1967) + // * `BRE` - Brazilian Cruzeiro (1990–1993) + // * `BRR` - Brazilian Cruzeiro (1993–1994) + // * `BRN` - Brazilian New Cruzado (1989–1990) + // * `BRB` - Brazilian New Cruzeiro (1967–1986) + // * `BRL` - Brazilian Real + // * `GBP` - British Pound + // * `BND` - Brunei Dollar + // * `BGL` - Bulgarian Hard Lev + // * `BGN` - Bulgarian Lev + // * `BGO` - Bulgarian Lev (1879–1952) + // * `BGM` - Bulgarian Socialist Lev + // * `BUK` - Burmese Kyat + // * `BIF` - Burundian Franc + // * `XPF` - CFP Franc + // * `KHR` - Cambodian Riel + // * `CAD` - Canadian Dollar + // * `CVE` - Cape Verdean Escudo + // * `KYD` - Cayman Islands Dollar + // * `XAF` - Central African CFA Franc + // * `CLE` - Chilean Escudo + // * `CLP` - Chilean Peso + // * `CLF` - Chilean Unit of Account (UF) + // * `CNX` - Chinese People’s Bank Dollar + // * `CNY` - Chinese Yuan + // * `CNH` - Chinese Yuan (offshore) + // * `COP` - Colombian Peso + // * `COU` - Colombian Real Value Unit + // * `KMF` - Comorian Franc + // * `CDF` - Congolese Franc + // * `CRC` - Costa Rican Colón + // * `HRD` - Croatian Dinar + // * `HRK` - Croatian Kuna + // * `CUC` - Cuban Convertible Peso + // * `CUP` - Cuban Peso + // * `CYP` - Cypriot Pound + // * `CZK` - Czech Koruna + // * `CSK` - Czechoslovak Hard Koruna + // * `DKK` - Danish Krone + // * `DJF` - Djiboutian Franc + // * `DOP` - Dominican Peso + // * `NLG` - Dutch Guilder + // * `XCD` - East Caribbean Dollar + // * `DDM` - East German Mark + // * `ECS` - Ecuadorian Sucre + // * `ECV` - Ecuadorian Unit of Constant Value + // * `EGP` - Egyptian Pound + // * `GQE` - Equatorial Guinean Ekwele + // * `ERN` - Eritrean Nakfa + // * `EEK` - Estonian Kroon + // * `ETB` - Ethiopian Birr + // * `EUR` - Euro + // * `XBA` - European Composite Unit + // * `XEU` - European Currency Unit + // * `XBB` - European Monetary Unit + // * `XBC` - European Unit of Account (XBC) + // * `XBD` - European Unit of Account (XBD) + // * `FKP` - Falkland Islands Pound + // * `FJD` - Fijian Dollar + // * `FIM` - Finnish Markka + // * `FRF` - French Franc + // * `XFO` - French Gold Franc + // * `XFU` - French UIC-Franc + // * `GMD` - Gambian Dalasi + // * `GEK` - Georgian Kupon Larit + // * `GEL` - Georgian Lari + // * `DEM` - German Mark + // * `GHS` - Ghanaian Cedi + // * `GHC` - Ghanaian Cedi (1979–2007) + // * `GIP` - Gibraltar Pound + // * `XAU` - Gold + // * `GRD` - Greek Drachma + // * `GTQ` - Guatemalan Quetzal + // * `GWP` - Guinea-Bissau Peso + // * `GNF` - Guinean Franc + // * `GNS` - Guinean Syli + // * `GYD` - Guyanaese Dollar + // * `HTG` - Haitian Gourde + // * `HNL` - Honduran Lempira + // * `HKD` - Hong Kong Dollar + // * `HUF` - Hungarian Forint + // * `IMP` - IMP + // * `ISK` - Icelandic Króna + // * `ISJ` - Icelandic Króna (1918–1981) + // * `INR` - Indian Rupee + // * `IDR` - Indonesian Rupiah + // * `IRR` - Iranian Rial + // * `IQD` - Iraqi Dinar + // * `IEP` - Irish Pound + // * `ILS` - Israeli New Shekel + // * `ILP` - Israeli Pound + // * `ILR` - Israeli Shekel (1980–1985) + // * `ITL` - Italian Lira + // * `JMD` - Jamaican Dollar + // * `JPY` - Japanese Yen + // * `JOD` - Jordanian Dinar + // * `KZT` - Kazakhstani Tenge + // * `KES` - Kenyan Shilling + // * `KWD` - Kuwaiti Dinar + // * `KGS` - Kyrgystani Som + // * `LAK` - Laotian Kip + // * `LVL` - Latvian Lats + // * `LVR` - Latvian Ruble + // * `LBP` - Lebanese Pound + // * `LSL` - Lesotho Loti + // * `LRD` - Liberian Dollar + // * `LYD` - Libyan Dinar + // * `LTL` - Lithuanian Litas + // * `LTT` - Lithuanian Talonas + // * `LUL` - Luxembourg Financial Franc + // * `LUC` - Luxembourgian Convertible Franc + // * `LUF` - Luxembourgian Franc + // * `MOP` - Macanese Pataca + // * `MKD` - Macedonian Denar + // * `MKN` - Macedonian Denar (1992–1993) + // * `MGA` - Malagasy Ariary + // * `MGF` - Malagasy Franc + // * `MWK` - Malawian Kwacha + // * `MYR` - Malaysian Ringgit + // * `MVR` - Maldivian Rufiyaa + // * `MVP` - Maldivian Rupee (1947–1981) + // * `MLF` - Malian Franc + // * `MTL` - Maltese Lira + // * `MTP` - Maltese Pound + // * `MRU` - Mauritanian Ouguiya + // * `MRO` - Mauritanian Ouguiya (1973–2017) + // * `MUR` - Mauritian Rupee + // * `MXV` - Mexican Investment Unit + // * `MXN` - Mexican Peso + // * `MXP` - Mexican Silver Peso (1861–1992) + // * `MDC` - Moldovan Cupon + // * `MDL` - Moldovan Leu + // * `MCF` - Monegasque Franc + // * `MNT` - Mongolian Tugrik + // * `MAD` - Moroccan Dirham + // * `MAF` - Moroccan Franc + // * `MZE` - Mozambican Escudo + // * `MZN` - Mozambican Metical + // * `MZM` - Mozambican Metical (1980–2006) + // * `MMK` - Myanmar Kyat + // * `NAD` - Namibian Dollar + // * `NPR` - Nepalese Rupee + // * `ANG` - Netherlands Antillean Guilder + // * `TWD` - New Taiwan Dollar + // * `NZD` - New Zealand Dollar + // * `NIO` - Nicaraguan Córdoba + // * `NIC` - Nicaraguan Córdoba (1988–1991) + // * `NGN` - Nigerian Naira + // * `KPW` - North Korean Won + // * `NOK` - Norwegian Krone + // * `OMR` - Omani Rial + // * `PKR` - Pakistani Rupee + // * `XPD` - Palladium + // * `PAB` - Panamanian Balboa + // * `PGK` - Papua New Guinean Kina + // * `PYG` - Paraguayan Guarani + // * `PEI` - Peruvian Inti + // * `PEN` - Peruvian Sol + // * `PES` - Peruvian Sol (1863–1965) + // * `PHP` - Philippine Peso + // * `XPT` - Platinum + // * `PLN` - Polish Zloty + // * `PLZ` - Polish Zloty (1950–1995) + // * `PTE` - Portuguese Escudo + // * `GWE` - Portuguese Guinea Escudo + // * `QAR` - Qatari Rial + // * `XRE` - RINET Funds + // * `RHD` - Rhodesian Dollar + // * `RON` - Romanian Leu + // * `ROL` - Romanian Leu (1952–2006) + // * `RUB` - Russian Ruble + // * `RUR` - Russian Ruble (1991–1998) + // * `RWF` - Rwandan Franc + // * `SVC` - Salvadoran Colón + // * `WST` - Samoan Tala + // * `SAR` - Saudi Riyal + // * `RSD` - Serbian Dinar + // * `CSD` - Serbian Dinar (2002–2006) + // * `SCR` - Seychellois Rupee + // * `SLL` - Sierra Leonean Leone + // * `XAG` - Silver + // * `SGD` - Singapore Dollar + // * `SKK` - Slovak Koruna + // * `SIT` - Slovenian Tolar + // * `SBD` - Solomon Islands Dollar + // * `SOS` - Somali Shilling + // * `ZAR` - South African Rand + // * `ZAL` - South African Rand (financial) + // * `KRH` - South Korean Hwan (1953–1962) + // * `KRW` - South Korean Won + // * `KRO` - South Korean Won (1945–1953) + // * `SSP` - South Sudanese Pound + // * `SUR` - Soviet Rouble + // * `ESP` - Spanish Peseta + // * `ESA` - Spanish Peseta (A account) + // * `ESB` - Spanish Peseta (convertible account) + // * `XDR` - Special Drawing Rights + // * `LKR` - Sri Lankan Rupee + // * `SHP` - St. Helena Pound + // * `XSU` - Sucre + // * `SDD` - Sudanese Dinar (1992–2007) + // * `SDG` - Sudanese Pound + // * `SDP` - Sudanese Pound (1957–1998) + // * `SRD` - Surinamese Dollar + // * `SRG` - Surinamese Guilder + // * `SZL` - Swazi Lilangeni + // * `SEK` - Swedish Krona + // * `CHF` - Swiss Franc + // * `SYP` - Syrian Pound + // * `STN` - São Tomé & Príncipe Dobra + // * `STD` - São Tomé & Príncipe Dobra (1977–2017) + // * `TVD` - TVD + // * `TJR` - Tajikistani Ruble + // * `TJS` - Tajikistani Somoni + // * `TZS` - Tanzanian Shilling + // * `XTS` - Testing Currency Code + // * `THB` - Thai Baht + // * `XXX` - The codes assigned for transactions where no currency is involved + // * `TPE` - Timorese Escudo + // * `TOP` - Tongan Paʻanga + // * `TTD` - Trinidad & Tobago Dollar + // * `TND` - Tunisian Dinar + // * `TRY` - Turkish Lira + // * `TRL` - Turkish Lira (1922–2005) + // * `TMT` - Turkmenistani Manat + // * `TMM` - Turkmenistani Manat (1993–2009) + // * `USD` - US Dollar + // * `USN` - US Dollar (Next day) + // * `USS` - US Dollar (Same day) + // * `UGX` - Ugandan Shilling + // * `UGS` - Ugandan Shilling (1966–1987) + // * `UAH` - Ukrainian Hryvnia + // * `UAK` - Ukrainian Karbovanets + // * `AED` - United Arab Emirates Dirham + // * `UYW` - Uruguayan Nominal Wage Index Unit + // * `UYU` - Uruguayan Peso + // * `UYP` - Uruguayan Peso (1975–1993) + // * `UYI` - Uruguayan Peso (Indexed Units) + // * `UZS` - Uzbekistani Som + // * `VUV` - Vanuatu Vatu + // * `VES` - Venezuelan Bolívar + // * `VEB` - Venezuelan Bolívar (1871–2008) + // * `VEF` - Venezuelan Bolívar (2008–2018) + // * `VND` - Vietnamese Dong + // * `VNN` - Vietnamese Dong (1978–1985) + // * `CHE` - WIR Euro + // * `CHW` - WIR Franc + // * `XOF` - West African CFA Franc + // * `YDD` - Yemeni Dinar + // * `YER` - Yemeni Rial + // * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + // * `YUD` - Yugoslavian Hard Dinar (1966–1990) + // * `YUM` - Yugoslavian New Dinar (1994–2002) + // * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + // * `ZWN` - ZWN + // * `ZRN` - Zairean New Zaire (1993–1998) + // * `ZRZ` - Zairean Zaire (1971–1993) + // * `ZMW` - Zambian Kwacha + // * `ZMK` - Zambian Kwacha (1968–2012) + // * `ZWD` - Zimbabwean Dollar (1980–2008) + // * `ZWR` - Zimbabwean Dollar (2008) + // * `ZWL` - Zimbabwean Dollar (2009) + Currency *JournalLineCurrency `json:"currency,omitempty" url:"currency,omitempty"` + // The company the journal entry belongs to. + Company *string `json:"company,omitempty" url:"company,omitempty"` + Employee *string `json:"employee,omitempty" url:"employee,omitempty"` + Project *JournalLineProject `json:"project,omitempty" url:"project,omitempty"` + Contact *string `json:"contact,omitempty" url:"contact,omitempty"` + // The tax rate that applies to this line item. + TaxRate *string `json:"tax_rate,omitempty" url:"tax_rate,omitempty"` + // The line's description. + Description *string `json:"description,omitempty" url:"description,omitempty"` + // The journal line item's exchange rate. + ExchangeRate *string `json:"exchange_rate,omitempty" url:"exchange_rate,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + RemoteFields []*RemoteField `json:"remote_fields,omitempty" url:"remote_fields,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (j *JournalLine) GetId() *string { + if j == nil { + return nil + } + return j.Id +} + +func (j *JournalLine) GetRemoteId() *string { + if j == nil { + return nil + } + return j.RemoteId +} + +func (j *JournalLine) GetCreatedAt() *time.Time { + if j == nil { + return nil + } + return j.CreatedAt +} + +func (j *JournalLine) GetModifiedAt() *time.Time { + if j == nil { + return nil + } + return j.ModifiedAt +} + +func (j *JournalLine) GetAccount() *JournalLineAccount { + if j == nil { + return nil + } + return j.Account +} + +func (j *JournalLine) GetNetAmount() *float64 { + if j == nil { + return nil + } + return j.NetAmount +} + +func (j *JournalLine) GetTrackingCategory() *JournalLineTrackingCategory { + if j == nil { + return nil + } + return j.TrackingCategory +} + +func (j *JournalLine) GetTrackingCategories() []*JournalLineTrackingCategoriesItem { + if j == nil { + return nil + } + return j.TrackingCategories +} + +func (j *JournalLine) GetCurrency() *JournalLineCurrency { + if j == nil { + return nil + } + return j.Currency +} + +func (j *JournalLine) GetCompany() *string { + if j == nil { + return nil + } + return j.Company +} + +func (j *JournalLine) GetEmployee() *string { + if j == nil { + return nil + } + return j.Employee +} + +func (j *JournalLine) GetProject() *JournalLineProject { + if j == nil { + return nil + } + return j.Project +} + +func (j *JournalLine) GetContact() *string { + if j == nil { + return nil + } + return j.Contact +} + +func (j *JournalLine) GetTaxRate() *string { + if j == nil { + return nil + } + return j.TaxRate +} + +func (j *JournalLine) GetDescription() *string { + if j == nil { + return nil + } + return j.Description +} + +func (j *JournalLine) GetExchangeRate() *string { + if j == nil { + return nil + } + return j.ExchangeRate +} + +func (j *JournalLine) GetRemoteWasDeleted() *bool { + if j == nil { + return nil + } + return j.RemoteWasDeleted +} + +func (j *JournalLine) GetRemoteFields() []*RemoteField { + if j == nil { + return nil + } + return j.RemoteFields +} + +func (j *JournalLine) GetExtraProperties() map[string]interface{} { + return j.extraProperties +} + +func (j *JournalLine) UnmarshalJSON(data []byte) error { + type embed JournalLine + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*j), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *j = JournalLine(unmarshaler.embed) + j.CreatedAt = unmarshaler.CreatedAt.TimePtr() + j.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *j) + if err != nil { + return err + } + j.extraProperties = extraProperties + j.rawJSON = json.RawMessage(data) + return nil +} + +func (j *JournalLine) MarshalJSON() ([]byte, error) { + type embed JournalLine + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*j), + CreatedAt: internal.NewOptionalDateTime(j.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(j.ModifiedAt), + } + return json.Marshal(marshaler) +} + +func (j *JournalLine) String() string { + if len(j.rawJSON) > 0 { + if value, err := internal.StringifyJSON(j.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(j); err == nil { + return value + } + return fmt.Sprintf("%#v", j) +} + +type JournalLineAccount struct { + String string + Account *Account + + typ string +} + +func (j *JournalLineAccount) GetString() string { + if j == nil { + return "" + } + return j.String +} + +func (j *JournalLineAccount) GetAccount() *Account { + if j == nil { + return nil + } + return j.Account +} + +func (j *JournalLineAccount) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + j.typ = "String" + j.String = valueString + return nil + } + valueAccount := new(Account) + if err := json.Unmarshal(data, &valueAccount); err == nil { + j.typ = "Account" + j.Account = valueAccount + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, j) +} + +func (j JournalLineAccount) MarshalJSON() ([]byte, error) { + if j.typ == "String" || j.String != "" { + return json.Marshal(j.String) + } + if j.typ == "Account" || j.Account != nil { + return json.Marshal(j.Account) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", j) +} + +type JournalLineAccountVisitor interface { + VisitString(string) error + VisitAccount(*Account) error +} + +func (j *JournalLineAccount) Accept(visitor JournalLineAccountVisitor) error { + if j.typ == "String" || j.String != "" { + return visitor.VisitString(j.String) + } + if j.typ == "Account" || j.Account != nil { + return visitor.VisitAccount(j.Account) + } + return fmt.Errorf("type %T does not include a non-empty union type", j) +} + +// The journal line item's currency. +// +// * `XUA` - ADB Unit of Account +// * `AFN` - Afghan Afghani +// * `AFA` - Afghan Afghani (1927–2002) +// * `ALL` - Albanian Lek +// * `ALK` - Albanian Lek (1946–1965) +// * `DZD` - Algerian Dinar +// * `ADP` - Andorran Peseta +// * `AOA` - Angolan Kwanza +// * `AOK` - Angolan Kwanza (1977–1991) +// * `AON` - Angolan New Kwanza (1990–2000) +// * `AOR` - Angolan Readjusted Kwanza (1995–1999) +// * `ARA` - Argentine Austral +// * `ARS` - Argentine Peso +// * `ARM` - Argentine Peso (1881–1970) +// * `ARP` - Argentine Peso (1983–1985) +// * `ARL` - Argentine Peso Ley (1970–1983) +// * `AMD` - Armenian Dram +// * `AWG` - Aruban Florin +// * `AUD` - Australian Dollar +// * `ATS` - Austrian Schilling +// * `AZN` - Azerbaijani Manat +// * `AZM` - Azerbaijani Manat (1993–2006) +// * `BSD` - Bahamian Dollar +// * `BHD` - Bahraini Dinar +// * `BDT` - Bangladeshi Taka +// * `BBD` - Barbadian Dollar +// * `BYN` - Belarusian Ruble +// * `BYB` - Belarusian Ruble (1994–1999) +// * `BYR` - Belarusian Ruble (2000–2016) +// * `BEF` - Belgian Franc +// * `BEC` - Belgian Franc (convertible) +// * `BEL` - Belgian Franc (financial) +// * `BZD` - Belize Dollar +// * `BMD` - Bermudan Dollar +// * `BTN` - Bhutanese Ngultrum +// * `BOB` - Bolivian Boliviano +// * `BOL` - Bolivian Boliviano (1863–1963) +// * `BOV` - Bolivian Mvdol +// * `BOP` - Bolivian Peso +// * `BAM` - Bosnia-Herzegovina Convertible Mark +// * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) +// * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) +// * `BWP` - Botswanan Pula +// * `BRC` - Brazilian Cruzado (1986–1989) +// * `BRZ` - Brazilian Cruzeiro (1942–1967) +// * `BRE` - Brazilian Cruzeiro (1990–1993) +// * `BRR` - Brazilian Cruzeiro (1993–1994) +// * `BRN` - Brazilian New Cruzado (1989–1990) +// * `BRB` - Brazilian New Cruzeiro (1967–1986) +// * `BRL` - Brazilian Real +// * `GBP` - British Pound +// * `BND` - Brunei Dollar +// * `BGL` - Bulgarian Hard Lev +// * `BGN` - Bulgarian Lev +// * `BGO` - Bulgarian Lev (1879–1952) +// * `BGM` - Bulgarian Socialist Lev +// * `BUK` - Burmese Kyat +// * `BIF` - Burundian Franc +// * `XPF` - CFP Franc +// * `KHR` - Cambodian Riel +// * `CAD` - Canadian Dollar +// * `CVE` - Cape Verdean Escudo +// * `KYD` - Cayman Islands Dollar +// * `XAF` - Central African CFA Franc +// * `CLE` - Chilean Escudo +// * `CLP` - Chilean Peso +// * `CLF` - Chilean Unit of Account (UF) +// * `CNX` - Chinese People’s Bank Dollar +// * `CNY` - Chinese Yuan +// * `CNH` - Chinese Yuan (offshore) +// * `COP` - Colombian Peso +// * `COU` - Colombian Real Value Unit +// * `KMF` - Comorian Franc +// * `CDF` - Congolese Franc +// * `CRC` - Costa Rican Colón +// * `HRD` - Croatian Dinar +// * `HRK` - Croatian Kuna +// * `CUC` - Cuban Convertible Peso +// * `CUP` - Cuban Peso +// * `CYP` - Cypriot Pound +// * `CZK` - Czech Koruna +// * `CSK` - Czechoslovak Hard Koruna +// * `DKK` - Danish Krone +// * `DJF` - Djiboutian Franc +// * `DOP` - Dominican Peso +// * `NLG` - Dutch Guilder +// * `XCD` - East Caribbean Dollar +// * `DDM` - East German Mark +// * `ECS` - Ecuadorian Sucre +// * `ECV` - Ecuadorian Unit of Constant Value +// * `EGP` - Egyptian Pound +// * `GQE` - Equatorial Guinean Ekwele +// * `ERN` - Eritrean Nakfa +// * `EEK` - Estonian Kroon +// * `ETB` - Ethiopian Birr +// * `EUR` - Euro +// * `XBA` - European Composite Unit +// * `XEU` - European Currency Unit +// * `XBB` - European Monetary Unit +// * `XBC` - European Unit of Account (XBC) +// * `XBD` - European Unit of Account (XBD) +// * `FKP` - Falkland Islands Pound +// * `FJD` - Fijian Dollar +// * `FIM` - Finnish Markka +// * `FRF` - French Franc +// * `XFO` - French Gold Franc +// * `XFU` - French UIC-Franc +// * `GMD` - Gambian Dalasi +// * `GEK` - Georgian Kupon Larit +// * `GEL` - Georgian Lari +// * `DEM` - German Mark +// * `GHS` - Ghanaian Cedi +// * `GHC` - Ghanaian Cedi (1979–2007) +// * `GIP` - Gibraltar Pound +// * `XAU` - Gold +// * `GRD` - Greek Drachma +// * `GTQ` - Guatemalan Quetzal +// * `GWP` - Guinea-Bissau Peso +// * `GNF` - Guinean Franc +// * `GNS` - Guinean Syli +// * `GYD` - Guyanaese Dollar +// * `HTG` - Haitian Gourde +// * `HNL` - Honduran Lempira +// * `HKD` - Hong Kong Dollar +// * `HUF` - Hungarian Forint +// * `IMP` - IMP +// * `ISK` - Icelandic Króna +// * `ISJ` - Icelandic Króna (1918–1981) +// * `INR` - Indian Rupee +// * `IDR` - Indonesian Rupiah +// * `IRR` - Iranian Rial +// * `IQD` - Iraqi Dinar +// * `IEP` - Irish Pound +// * `ILS` - Israeli New Shekel +// * `ILP` - Israeli Pound +// * `ILR` - Israeli Shekel (1980–1985) +// * `ITL` - Italian Lira +// * `JMD` - Jamaican Dollar +// * `JPY` - Japanese Yen +// * `JOD` - Jordanian Dinar +// * `KZT` - Kazakhstani Tenge +// * `KES` - Kenyan Shilling +// * `KWD` - Kuwaiti Dinar +// * `KGS` - Kyrgystani Som +// * `LAK` - Laotian Kip +// * `LVL` - Latvian Lats +// * `LVR` - Latvian Ruble +// * `LBP` - Lebanese Pound +// * `LSL` - Lesotho Loti +// * `LRD` - Liberian Dollar +// * `LYD` - Libyan Dinar +// * `LTL` - Lithuanian Litas +// * `LTT` - Lithuanian Talonas +// * `LUL` - Luxembourg Financial Franc +// * `LUC` - Luxembourgian Convertible Franc +// * `LUF` - Luxembourgian Franc +// * `MOP` - Macanese Pataca +// * `MKD` - Macedonian Denar +// * `MKN` - Macedonian Denar (1992–1993) +// * `MGA` - Malagasy Ariary +// * `MGF` - Malagasy Franc +// * `MWK` - Malawian Kwacha +// * `MYR` - Malaysian Ringgit +// * `MVR` - Maldivian Rufiyaa +// * `MVP` - Maldivian Rupee (1947–1981) +// * `MLF` - Malian Franc +// * `MTL` - Maltese Lira +// * `MTP` - Maltese Pound +// * `MRU` - Mauritanian Ouguiya +// * `MRO` - Mauritanian Ouguiya (1973–2017) +// * `MUR` - Mauritian Rupee +// * `MXV` - Mexican Investment Unit +// * `MXN` - Mexican Peso +// * `MXP` - Mexican Silver Peso (1861–1992) +// * `MDC` - Moldovan Cupon +// * `MDL` - Moldovan Leu +// * `MCF` - Monegasque Franc +// * `MNT` - Mongolian Tugrik +// * `MAD` - Moroccan Dirham +// * `MAF` - Moroccan Franc +// * `MZE` - Mozambican Escudo +// * `MZN` - Mozambican Metical +// * `MZM` - Mozambican Metical (1980–2006) +// * `MMK` - Myanmar Kyat +// * `NAD` - Namibian Dollar +// * `NPR` - Nepalese Rupee +// * `ANG` - Netherlands Antillean Guilder +// * `TWD` - New Taiwan Dollar +// * `NZD` - New Zealand Dollar +// * `NIO` - Nicaraguan Córdoba +// * `NIC` - Nicaraguan Córdoba (1988–1991) +// * `NGN` - Nigerian Naira +// * `KPW` - North Korean Won +// * `NOK` - Norwegian Krone +// * `OMR` - Omani Rial +// * `PKR` - Pakistani Rupee +// * `XPD` - Palladium +// * `PAB` - Panamanian Balboa +// * `PGK` - Papua New Guinean Kina +// * `PYG` - Paraguayan Guarani +// * `PEI` - Peruvian Inti +// * `PEN` - Peruvian Sol +// * `PES` - Peruvian Sol (1863–1965) +// * `PHP` - Philippine Peso +// * `XPT` - Platinum +// * `PLN` - Polish Zloty +// * `PLZ` - Polish Zloty (1950–1995) +// * `PTE` - Portuguese Escudo +// * `GWE` - Portuguese Guinea Escudo +// * `QAR` - Qatari Rial +// * `XRE` - RINET Funds +// * `RHD` - Rhodesian Dollar +// * `RON` - Romanian Leu +// * `ROL` - Romanian Leu (1952–2006) +// * `RUB` - Russian Ruble +// * `RUR` - Russian Ruble (1991–1998) +// * `RWF` - Rwandan Franc +// * `SVC` - Salvadoran Colón +// * `WST` - Samoan Tala +// * `SAR` - Saudi Riyal +// * `RSD` - Serbian Dinar +// * `CSD` - Serbian Dinar (2002–2006) +// * `SCR` - Seychellois Rupee +// * `SLL` - Sierra Leonean Leone +// * `XAG` - Silver +// * `SGD` - Singapore Dollar +// * `SKK` - Slovak Koruna +// * `SIT` - Slovenian Tolar +// * `SBD` - Solomon Islands Dollar +// * `SOS` - Somali Shilling +// * `ZAR` - South African Rand +// * `ZAL` - South African Rand (financial) +// * `KRH` - South Korean Hwan (1953–1962) +// * `KRW` - South Korean Won +// * `KRO` - South Korean Won (1945–1953) +// * `SSP` - South Sudanese Pound +// * `SUR` - Soviet Rouble +// * `ESP` - Spanish Peseta +// * `ESA` - Spanish Peseta (A account) +// * `ESB` - Spanish Peseta (convertible account) +// * `XDR` - Special Drawing Rights +// * `LKR` - Sri Lankan Rupee +// * `SHP` - St. Helena Pound +// * `XSU` - Sucre +// * `SDD` - Sudanese Dinar (1992–2007) +// * `SDG` - Sudanese Pound +// * `SDP` - Sudanese Pound (1957–1998) +// * `SRD` - Surinamese Dollar +// * `SRG` - Surinamese Guilder +// * `SZL` - Swazi Lilangeni +// * `SEK` - Swedish Krona +// * `CHF` - Swiss Franc +// * `SYP` - Syrian Pound +// * `STN` - São Tomé & Príncipe Dobra +// * `STD` - São Tomé & Príncipe Dobra (1977–2017) +// * `TVD` - TVD +// * `TJR` - Tajikistani Ruble +// * `TJS` - Tajikistani Somoni +// * `TZS` - Tanzanian Shilling +// * `XTS` - Testing Currency Code +// * `THB` - Thai Baht +// * `XXX` - The codes assigned for transactions where no currency is involved +// * `TPE` - Timorese Escudo +// * `TOP` - Tongan Paʻanga +// * `TTD` - Trinidad & Tobago Dollar +// * `TND` - Tunisian Dinar +// * `TRY` - Turkish Lira +// * `TRL` - Turkish Lira (1922–2005) +// * `TMT` - Turkmenistani Manat +// * `TMM` - Turkmenistani Manat (1993–2009) +// * `USD` - US Dollar +// * `USN` - US Dollar (Next day) +// * `USS` - US Dollar (Same day) +// * `UGX` - Ugandan Shilling +// * `UGS` - Ugandan Shilling (1966–1987) +// * `UAH` - Ukrainian Hryvnia +// * `UAK` - Ukrainian Karbovanets +// * `AED` - United Arab Emirates Dirham +// * `UYW` - Uruguayan Nominal Wage Index Unit +// * `UYU` - Uruguayan Peso +// * `UYP` - Uruguayan Peso (1975–1993) +// * `UYI` - Uruguayan Peso (Indexed Units) +// * `UZS` - Uzbekistani Som +// * `VUV` - Vanuatu Vatu +// * `VES` - Venezuelan Bolívar +// * `VEB` - Venezuelan Bolívar (1871–2008) +// * `VEF` - Venezuelan Bolívar (2008–2018) +// * `VND` - Vietnamese Dong +// * `VNN` - Vietnamese Dong (1978–1985) +// * `CHE` - WIR Euro +// * `CHW` - WIR Franc +// * `XOF` - West African CFA Franc +// * `YDD` - Yemeni Dinar +// * `YER` - Yemeni Rial +// * `YUN` - Yugoslavian Convertible Dinar (1990–1992) +// * `YUD` - Yugoslavian Hard Dinar (1966–1990) +// * `YUM` - Yugoslavian New Dinar (1994–2002) +// * `YUR` - Yugoslavian Reformed Dinar (1992–1993) +// * `ZWN` - ZWN +// * `ZRN` - Zairean New Zaire (1993–1998) +// * `ZRZ` - Zairean Zaire (1971–1993) +// * `ZMW` - Zambian Kwacha +// * `ZMK` - Zambian Kwacha (1968–2012) +// * `ZWD` - Zimbabwean Dollar (1980–2008) +// * `ZWR` - Zimbabwean Dollar (2008) +// * `ZWL` - Zimbabwean Dollar (2009) +type JournalLineCurrency struct { + TransactionCurrencyEnum TransactionCurrencyEnum + String string + + typ string +} + +func (j *JournalLineCurrency) GetTransactionCurrencyEnum() TransactionCurrencyEnum { + if j == nil { + return "" + } + return j.TransactionCurrencyEnum +} + +func (j *JournalLineCurrency) GetString() string { + if j == nil { + return "" + } + return j.String +} + +func (j *JournalLineCurrency) UnmarshalJSON(data []byte) error { + var valueTransactionCurrencyEnum TransactionCurrencyEnum + if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { + j.typ = "TransactionCurrencyEnum" + j.TransactionCurrencyEnum = valueTransactionCurrencyEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + j.typ = "String" + j.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, j) +} + +func (j JournalLineCurrency) MarshalJSON() ([]byte, error) { + if j.typ == "TransactionCurrencyEnum" || j.TransactionCurrencyEnum != "" { + return json.Marshal(j.TransactionCurrencyEnum) + } + if j.typ == "String" || j.String != "" { + return json.Marshal(j.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", j) +} + +type JournalLineCurrencyVisitor interface { + VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error + VisitString(string) error +} + +func (j *JournalLineCurrency) Accept(visitor JournalLineCurrencyVisitor) error { + if j.typ == "TransactionCurrencyEnum" || j.TransactionCurrencyEnum != "" { + return visitor.VisitTransactionCurrencyEnum(j.TransactionCurrencyEnum) + } + if j.typ == "String" || j.String != "" { + return visitor.VisitString(j.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", j) +} + +type JournalLineProject struct { + String string + Project *Project + + typ string +} + +func (j *JournalLineProject) GetString() string { + if j == nil { + return "" + } + return j.String +} + +func (j *JournalLineProject) GetProject() *Project { + if j == nil { + return nil + } + return j.Project +} + +func (j *JournalLineProject) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + j.typ = "String" + j.String = valueString + return nil + } + valueProject := new(Project) + if err := json.Unmarshal(data, &valueProject); err == nil { + j.typ = "Project" + j.Project = valueProject + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, j) +} + +func (j JournalLineProject) MarshalJSON() ([]byte, error) { + if j.typ == "String" || j.String != "" { + return json.Marshal(j.String) + } + if j.typ == "Project" || j.Project != nil { + return json.Marshal(j.Project) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", j) +} + +type JournalLineProjectVisitor interface { + VisitString(string) error + VisitProject(*Project) error +} + +func (j *JournalLineProject) Accept(visitor JournalLineProjectVisitor) error { + if j.typ == "String" || j.String != "" { + return visitor.VisitString(j.String) + } + if j.typ == "Project" || j.Project != nil { + return visitor.VisitProject(j.Project) + } + return fmt.Errorf("type %T does not include a non-empty union type", j) +} + +// # The JournalLine Object +// ### Description +// The `JournalLine` object is used to represent a journal entry's line items. +// +// ### Usage Example +// Fetch from the `GET JournalEntry` endpoint and view the journal entry's line items. +type JournalLineRequest struct { + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + Account *JournalLineRequestAccount `json:"account,omitempty" url:"account,omitempty"` + // The value of the line item including taxes and other fees. + NetAmount *float64 `json:"net_amount,omitempty" url:"net_amount,omitempty"` + TrackingCategory *JournalLineRequestTrackingCategory `json:"tracking_category,omitempty" url:"tracking_category,omitempty"` + // The journal line item's associated tracking categories. + TrackingCategories []*JournalLineRequestTrackingCategoriesItem `json:"tracking_categories,omitempty" url:"tracking_categories,omitempty"` + // The journal line item's currency. + // + // * `XUA` - ADB Unit of Account + // * `AFN` - Afghan Afghani + // * `AFA` - Afghan Afghani (1927–2002) + // * `ALL` - Albanian Lek + // * `ALK` - Albanian Lek (1946–1965) + // * `DZD` - Algerian Dinar + // * `ADP` - Andorran Peseta + // * `AOA` - Angolan Kwanza + // * `AOK` - Angolan Kwanza (1977–1991) + // * `AON` - Angolan New Kwanza (1990–2000) + // * `AOR` - Angolan Readjusted Kwanza (1995–1999) + // * `ARA` - Argentine Austral + // * `ARS` - Argentine Peso + // * `ARM` - Argentine Peso (1881–1970) + // * `ARP` - Argentine Peso (1983–1985) + // * `ARL` - Argentine Peso Ley (1970–1983) + // * `AMD` - Armenian Dram + // * `AWG` - Aruban Florin + // * `AUD` - Australian Dollar + // * `ATS` - Austrian Schilling + // * `AZN` - Azerbaijani Manat + // * `AZM` - Azerbaijani Manat (1993–2006) + // * `BSD` - Bahamian Dollar + // * `BHD` - Bahraini Dinar + // * `BDT` - Bangladeshi Taka + // * `BBD` - Barbadian Dollar + // * `BYN` - Belarusian Ruble + // * `BYB` - Belarusian Ruble (1994–1999) + // * `BYR` - Belarusian Ruble (2000–2016) + // * `BEF` - Belgian Franc + // * `BEC` - Belgian Franc (convertible) + // * `BEL` - Belgian Franc (financial) + // * `BZD` - Belize Dollar + // * `BMD` - Bermudan Dollar + // * `BTN` - Bhutanese Ngultrum + // * `BOB` - Bolivian Boliviano + // * `BOL` - Bolivian Boliviano (1863–1963) + // * `BOV` - Bolivian Mvdol + // * `BOP` - Bolivian Peso + // * `BAM` - Bosnia-Herzegovina Convertible Mark + // * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + // * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + // * `BWP` - Botswanan Pula + // * `BRC` - Brazilian Cruzado (1986–1989) + // * `BRZ` - Brazilian Cruzeiro (1942–1967) + // * `BRE` - Brazilian Cruzeiro (1990–1993) + // * `BRR` - Brazilian Cruzeiro (1993–1994) + // * `BRN` - Brazilian New Cruzado (1989–1990) + // * `BRB` - Brazilian New Cruzeiro (1967–1986) + // * `BRL` - Brazilian Real + // * `GBP` - British Pound + // * `BND` - Brunei Dollar + // * `BGL` - Bulgarian Hard Lev + // * `BGN` - Bulgarian Lev + // * `BGO` - Bulgarian Lev (1879–1952) + // * `BGM` - Bulgarian Socialist Lev + // * `BUK` - Burmese Kyat + // * `BIF` - Burundian Franc + // * `XPF` - CFP Franc + // * `KHR` - Cambodian Riel + // * `CAD` - Canadian Dollar + // * `CVE` - Cape Verdean Escudo + // * `KYD` - Cayman Islands Dollar + // * `XAF` - Central African CFA Franc + // * `CLE` - Chilean Escudo + // * `CLP` - Chilean Peso + // * `CLF` - Chilean Unit of Account (UF) + // * `CNX` - Chinese People’s Bank Dollar + // * `CNY` - Chinese Yuan + // * `CNH` - Chinese Yuan (offshore) + // * `COP` - Colombian Peso + // * `COU` - Colombian Real Value Unit + // * `KMF` - Comorian Franc + // * `CDF` - Congolese Franc + // * `CRC` - Costa Rican Colón + // * `HRD` - Croatian Dinar + // * `HRK` - Croatian Kuna + // * `CUC` - Cuban Convertible Peso + // * `CUP` - Cuban Peso + // * `CYP` - Cypriot Pound + // * `CZK` - Czech Koruna + // * `CSK` - Czechoslovak Hard Koruna + // * `DKK` - Danish Krone + // * `DJF` - Djiboutian Franc + // * `DOP` - Dominican Peso + // * `NLG` - Dutch Guilder + // * `XCD` - East Caribbean Dollar + // * `DDM` - East German Mark + // * `ECS` - Ecuadorian Sucre + // * `ECV` - Ecuadorian Unit of Constant Value + // * `EGP` - Egyptian Pound + // * `GQE` - Equatorial Guinean Ekwele + // * `ERN` - Eritrean Nakfa + // * `EEK` - Estonian Kroon + // * `ETB` - Ethiopian Birr + // * `EUR` - Euro + // * `XBA` - European Composite Unit + // * `XEU` - European Currency Unit + // * `XBB` - European Monetary Unit + // * `XBC` - European Unit of Account (XBC) + // * `XBD` - European Unit of Account (XBD) + // * `FKP` - Falkland Islands Pound + // * `FJD` - Fijian Dollar + // * `FIM` - Finnish Markka + // * `FRF` - French Franc + // * `XFO` - French Gold Franc + // * `XFU` - French UIC-Franc + // * `GMD` - Gambian Dalasi + // * `GEK` - Georgian Kupon Larit + // * `GEL` - Georgian Lari + // * `DEM` - German Mark + // * `GHS` - Ghanaian Cedi + // * `GHC` - Ghanaian Cedi (1979–2007) + // * `GIP` - Gibraltar Pound + // * `XAU` - Gold + // * `GRD` - Greek Drachma + // * `GTQ` - Guatemalan Quetzal + // * `GWP` - Guinea-Bissau Peso + // * `GNF` - Guinean Franc + // * `GNS` - Guinean Syli + // * `GYD` - Guyanaese Dollar + // * `HTG` - Haitian Gourde + // * `HNL` - Honduran Lempira + // * `HKD` - Hong Kong Dollar + // * `HUF` - Hungarian Forint + // * `IMP` - IMP + // * `ISK` - Icelandic Króna + // * `ISJ` - Icelandic Króna (1918–1981) + // * `INR` - Indian Rupee + // * `IDR` - Indonesian Rupiah + // * `IRR` - Iranian Rial + // * `IQD` - Iraqi Dinar + // * `IEP` - Irish Pound + // * `ILS` - Israeli New Shekel + // * `ILP` - Israeli Pound + // * `ILR` - Israeli Shekel (1980–1985) + // * `ITL` - Italian Lira + // * `JMD` - Jamaican Dollar + // * `JPY` - Japanese Yen + // * `JOD` - Jordanian Dinar + // * `KZT` - Kazakhstani Tenge + // * `KES` - Kenyan Shilling + // * `KWD` - Kuwaiti Dinar + // * `KGS` - Kyrgystani Som + // * `LAK` - Laotian Kip + // * `LVL` - Latvian Lats + // * `LVR` - Latvian Ruble + // * `LBP` - Lebanese Pound + // * `LSL` - Lesotho Loti + // * `LRD` - Liberian Dollar + // * `LYD` - Libyan Dinar + // * `LTL` - Lithuanian Litas + // * `LTT` - Lithuanian Talonas + // * `LUL` - Luxembourg Financial Franc + // * `LUC` - Luxembourgian Convertible Franc + // * `LUF` - Luxembourgian Franc + // * `MOP` - Macanese Pataca + // * `MKD` - Macedonian Denar + // * `MKN` - Macedonian Denar (1992–1993) + // * `MGA` - Malagasy Ariary + // * `MGF` - Malagasy Franc + // * `MWK` - Malawian Kwacha + // * `MYR` - Malaysian Ringgit + // * `MVR` - Maldivian Rufiyaa + // * `MVP` - Maldivian Rupee (1947–1981) + // * `MLF` - Malian Franc + // * `MTL` - Maltese Lira + // * `MTP` - Maltese Pound + // * `MRU` - Mauritanian Ouguiya + // * `MRO` - Mauritanian Ouguiya (1973–2017) + // * `MUR` - Mauritian Rupee + // * `MXV` - Mexican Investment Unit + // * `MXN` - Mexican Peso + // * `MXP` - Mexican Silver Peso (1861–1992) + // * `MDC` - Moldovan Cupon + // * `MDL` - Moldovan Leu + // * `MCF` - Monegasque Franc + // * `MNT` - Mongolian Tugrik + // * `MAD` - Moroccan Dirham + // * `MAF` - Moroccan Franc + // * `MZE` - Mozambican Escudo + // * `MZN` - Mozambican Metical + // * `MZM` - Mozambican Metical (1980–2006) + // * `MMK` - Myanmar Kyat + // * `NAD` - Namibian Dollar + // * `NPR` - Nepalese Rupee + // * `ANG` - Netherlands Antillean Guilder + // * `TWD` - New Taiwan Dollar + // * `NZD` - New Zealand Dollar + // * `NIO` - Nicaraguan Córdoba + // * `NIC` - Nicaraguan Córdoba (1988–1991) + // * `NGN` - Nigerian Naira + // * `KPW` - North Korean Won + // * `NOK` - Norwegian Krone + // * `OMR` - Omani Rial + // * `PKR` - Pakistani Rupee + // * `XPD` - Palladium + // * `PAB` - Panamanian Balboa + // * `PGK` - Papua New Guinean Kina + // * `PYG` - Paraguayan Guarani + // * `PEI` - Peruvian Inti + // * `PEN` - Peruvian Sol + // * `PES` - Peruvian Sol (1863–1965) + // * `PHP` - Philippine Peso + // * `XPT` - Platinum + // * `PLN` - Polish Zloty + // * `PLZ` - Polish Zloty (1950–1995) + // * `PTE` - Portuguese Escudo + // * `GWE` - Portuguese Guinea Escudo + // * `QAR` - Qatari Rial + // * `XRE` - RINET Funds + // * `RHD` - Rhodesian Dollar + // * `RON` - Romanian Leu + // * `ROL` - Romanian Leu (1952–2006) + // * `RUB` - Russian Ruble + // * `RUR` - Russian Ruble (1991–1998) + // * `RWF` - Rwandan Franc + // * `SVC` - Salvadoran Colón + // * `WST` - Samoan Tala + // * `SAR` - Saudi Riyal + // * `RSD` - Serbian Dinar + // * `CSD` - Serbian Dinar (2002–2006) + // * `SCR` - Seychellois Rupee + // * `SLL` - Sierra Leonean Leone + // * `XAG` - Silver + // * `SGD` - Singapore Dollar + // * `SKK` - Slovak Koruna + // * `SIT` - Slovenian Tolar + // * `SBD` - Solomon Islands Dollar + // * `SOS` - Somali Shilling + // * `ZAR` - South African Rand + // * `ZAL` - South African Rand (financial) + // * `KRH` - South Korean Hwan (1953–1962) + // * `KRW` - South Korean Won + // * `KRO` - South Korean Won (1945–1953) + // * `SSP` - South Sudanese Pound + // * `SUR` - Soviet Rouble + // * `ESP` - Spanish Peseta + // * `ESA` - Spanish Peseta (A account) + // * `ESB` - Spanish Peseta (convertible account) + // * `XDR` - Special Drawing Rights + // * `LKR` - Sri Lankan Rupee + // * `SHP` - St. Helena Pound + // * `XSU` - Sucre + // * `SDD` - Sudanese Dinar (1992–2007) + // * `SDG` - Sudanese Pound + // * `SDP` - Sudanese Pound (1957–1998) + // * `SRD` - Surinamese Dollar + // * `SRG` - Surinamese Guilder + // * `SZL` - Swazi Lilangeni + // * `SEK` - Swedish Krona + // * `CHF` - Swiss Franc + // * `SYP` - Syrian Pound + // * `STN` - São Tomé & Príncipe Dobra + // * `STD` - São Tomé & Príncipe Dobra (1977–2017) + // * `TVD` - TVD + // * `TJR` - Tajikistani Ruble + // * `TJS` - Tajikistani Somoni + // * `TZS` - Tanzanian Shilling + // * `XTS` - Testing Currency Code + // * `THB` - Thai Baht + // * `XXX` - The codes assigned for transactions where no currency is involved + // * `TPE` - Timorese Escudo + // * `TOP` - Tongan Paʻanga + // * `TTD` - Trinidad & Tobago Dollar + // * `TND` - Tunisian Dinar + // * `TRY` - Turkish Lira + // * `TRL` - Turkish Lira (1922–2005) + // * `TMT` - Turkmenistani Manat + // * `TMM` - Turkmenistani Manat (1993–2009) + // * `USD` - US Dollar + // * `USN` - US Dollar (Next day) + // * `USS` - US Dollar (Same day) + // * `UGX` - Ugandan Shilling + // * `UGS` - Ugandan Shilling (1966–1987) + // * `UAH` - Ukrainian Hryvnia + // * `UAK` - Ukrainian Karbovanets + // * `AED` - United Arab Emirates Dirham + // * `UYW` - Uruguayan Nominal Wage Index Unit + // * `UYU` - Uruguayan Peso + // * `UYP` - Uruguayan Peso (1975–1993) + // * `UYI` - Uruguayan Peso (Indexed Units) + // * `UZS` - Uzbekistani Som + // * `VUV` - Vanuatu Vatu + // * `VES` - Venezuelan Bolívar + // * `VEB` - Venezuelan Bolívar (1871–2008) + // * `VEF` - Venezuelan Bolívar (2008–2018) + // * `VND` - Vietnamese Dong + // * `VNN` - Vietnamese Dong (1978–1985) + // * `CHE` - WIR Euro + // * `CHW` - WIR Franc + // * `XOF` - West African CFA Franc + // * `YDD` - Yemeni Dinar + // * `YER` - Yemeni Rial + // * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + // * `YUD` - Yugoslavian Hard Dinar (1966–1990) + // * `YUM` - Yugoslavian New Dinar (1994–2002) + // * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + // * `ZWN` - ZWN + // * `ZRN` - Zairean New Zaire (1993–1998) + // * `ZRZ` - Zairean Zaire (1971–1993) + // * `ZMW` - Zambian Kwacha + // * `ZMK` - Zambian Kwacha (1968–2012) + // * `ZWD` - Zimbabwean Dollar (1980–2008) + // * `ZWR` - Zimbabwean Dollar (2008) + // * `ZWL` - Zimbabwean Dollar (2009) + Currency *JournalLineRequestCurrency `json:"currency,omitempty" url:"currency,omitempty"` + // The company the journal entry belongs to. + Company *string `json:"company,omitempty" url:"company,omitempty"` + Employee *string `json:"employee,omitempty" url:"employee,omitempty"` + Project *JournalLineRequestProject `json:"project,omitempty" url:"project,omitempty"` + Contact *string `json:"contact,omitempty" url:"contact,omitempty"` + // The tax rate that applies to this line item. + TaxRate *string `json:"tax_rate,omitempty" url:"tax_rate,omitempty"` + // The line's description. + Description *string `json:"description,omitempty" url:"description,omitempty"` + // The journal line item's exchange rate. + ExchangeRate *string `json:"exchange_rate,omitempty" url:"exchange_rate,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + RemoteFields []*RemoteFieldRequest `json:"remote_fields,omitempty" url:"remote_fields,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (j *JournalLineRequest) GetRemoteId() *string { + if j == nil { + return nil + } + return j.RemoteId +} + +func (j *JournalLineRequest) GetAccount() *JournalLineRequestAccount { + if j == nil { + return nil + } + return j.Account +} + +func (j *JournalLineRequest) GetNetAmount() *float64 { + if j == nil { + return nil + } + return j.NetAmount +} + +func (j *JournalLineRequest) GetTrackingCategory() *JournalLineRequestTrackingCategory { + if j == nil { + return nil + } + return j.TrackingCategory +} + +func (j *JournalLineRequest) GetTrackingCategories() []*JournalLineRequestTrackingCategoriesItem { + if j == nil { + return nil + } + return j.TrackingCategories +} + +func (j *JournalLineRequest) GetCurrency() *JournalLineRequestCurrency { + if j == nil { + return nil + } + return j.Currency +} + +func (j *JournalLineRequest) GetCompany() *string { + if j == nil { + return nil + } + return j.Company +} + +func (j *JournalLineRequest) GetEmployee() *string { + if j == nil { + return nil + } + return j.Employee +} + +func (j *JournalLineRequest) GetProject() *JournalLineRequestProject { + if j == nil { + return nil + } + return j.Project +} + +func (j *JournalLineRequest) GetContact() *string { + if j == nil { + return nil + } + return j.Contact +} + +func (j *JournalLineRequest) GetTaxRate() *string { + if j == nil { + return nil + } + return j.TaxRate +} + +func (j *JournalLineRequest) GetDescription() *string { + if j == nil { + return nil + } + return j.Description +} + +func (j *JournalLineRequest) GetExchangeRate() *string { + if j == nil { + return nil + } + return j.ExchangeRate +} + +func (j *JournalLineRequest) GetIntegrationParams() map[string]interface{} { + if j == nil { + return nil + } + return j.IntegrationParams +} + +func (j *JournalLineRequest) GetLinkedAccountParams() map[string]interface{} { + if j == nil { + return nil + } + return j.LinkedAccountParams +} + +func (j *JournalLineRequest) GetRemoteFields() []*RemoteFieldRequest { + if j == nil { + return nil + } + return j.RemoteFields +} + +func (j *JournalLineRequest) GetExtraProperties() map[string]interface{} { + return j.extraProperties +} + +func (j *JournalLineRequest) UnmarshalJSON(data []byte) error { + type unmarshaler JournalLineRequest + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *j = JournalLineRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *j) + if err != nil { + return err + } + j.extraProperties = extraProperties + j.rawJSON = json.RawMessage(data) + return nil +} + +func (j *JournalLineRequest) String() string { + if len(j.rawJSON) > 0 { + if value, err := internal.StringifyJSON(j.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(j); err == nil { + return value + } + return fmt.Sprintf("%#v", j) +} + +type JournalLineRequestAccount struct { + String string + Account *Account + + typ string +} + +func (j *JournalLineRequestAccount) GetString() string { + if j == nil { + return "" + } + return j.String +} + +func (j *JournalLineRequestAccount) GetAccount() *Account { + if j == nil { + return nil + } + return j.Account +} + +func (j *JournalLineRequestAccount) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + j.typ = "String" + j.String = valueString + return nil + } + valueAccount := new(Account) + if err := json.Unmarshal(data, &valueAccount); err == nil { + j.typ = "Account" + j.Account = valueAccount + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, j) +} + +func (j JournalLineRequestAccount) MarshalJSON() ([]byte, error) { + if j.typ == "String" || j.String != "" { + return json.Marshal(j.String) + } + if j.typ == "Account" || j.Account != nil { + return json.Marshal(j.Account) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", j) +} + +type JournalLineRequestAccountVisitor interface { + VisitString(string) error + VisitAccount(*Account) error +} + +func (j *JournalLineRequestAccount) Accept(visitor JournalLineRequestAccountVisitor) error { + if j.typ == "String" || j.String != "" { + return visitor.VisitString(j.String) + } + if j.typ == "Account" || j.Account != nil { + return visitor.VisitAccount(j.Account) + } + return fmt.Errorf("type %T does not include a non-empty union type", j) +} + +// The journal line item's currency. +// +// * `XUA` - ADB Unit of Account +// * `AFN` - Afghan Afghani +// * `AFA` - Afghan Afghani (1927–2002) +// * `ALL` - Albanian Lek +// * `ALK` - Albanian Lek (1946–1965) +// * `DZD` - Algerian Dinar +// * `ADP` - Andorran Peseta +// * `AOA` - Angolan Kwanza +// * `AOK` - Angolan Kwanza (1977–1991) +// * `AON` - Angolan New Kwanza (1990–2000) +// * `AOR` - Angolan Readjusted Kwanza (1995–1999) +// * `ARA` - Argentine Austral +// * `ARS` - Argentine Peso +// * `ARM` - Argentine Peso (1881–1970) +// * `ARP` - Argentine Peso (1983–1985) +// * `ARL` - Argentine Peso Ley (1970–1983) +// * `AMD` - Armenian Dram +// * `AWG` - Aruban Florin +// * `AUD` - Australian Dollar +// * `ATS` - Austrian Schilling +// * `AZN` - Azerbaijani Manat +// * `AZM` - Azerbaijani Manat (1993–2006) +// * `BSD` - Bahamian Dollar +// * `BHD` - Bahraini Dinar +// * `BDT` - Bangladeshi Taka +// * `BBD` - Barbadian Dollar +// * `BYN` - Belarusian Ruble +// * `BYB` - Belarusian Ruble (1994–1999) +// * `BYR` - Belarusian Ruble (2000–2016) +// * `BEF` - Belgian Franc +// * `BEC` - Belgian Franc (convertible) +// * `BEL` - Belgian Franc (financial) +// * `BZD` - Belize Dollar +// * `BMD` - Bermudan Dollar +// * `BTN` - Bhutanese Ngultrum +// * `BOB` - Bolivian Boliviano +// * `BOL` - Bolivian Boliviano (1863–1963) +// * `BOV` - Bolivian Mvdol +// * `BOP` - Bolivian Peso +// * `BAM` - Bosnia-Herzegovina Convertible Mark +// * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) +// * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) +// * `BWP` - Botswanan Pula +// * `BRC` - Brazilian Cruzado (1986–1989) +// * `BRZ` - Brazilian Cruzeiro (1942–1967) +// * `BRE` - Brazilian Cruzeiro (1990–1993) +// * `BRR` - Brazilian Cruzeiro (1993–1994) +// * `BRN` - Brazilian New Cruzado (1989–1990) +// * `BRB` - Brazilian New Cruzeiro (1967–1986) +// * `BRL` - Brazilian Real +// * `GBP` - British Pound +// * `BND` - Brunei Dollar +// * `BGL` - Bulgarian Hard Lev +// * `BGN` - Bulgarian Lev +// * `BGO` - Bulgarian Lev (1879–1952) +// * `BGM` - Bulgarian Socialist Lev +// * `BUK` - Burmese Kyat +// * `BIF` - Burundian Franc +// * `XPF` - CFP Franc +// * `KHR` - Cambodian Riel +// * `CAD` - Canadian Dollar +// * `CVE` - Cape Verdean Escudo +// * `KYD` - Cayman Islands Dollar +// * `XAF` - Central African CFA Franc +// * `CLE` - Chilean Escudo +// * `CLP` - Chilean Peso +// * `CLF` - Chilean Unit of Account (UF) +// * `CNX` - Chinese People’s Bank Dollar +// * `CNY` - Chinese Yuan +// * `CNH` - Chinese Yuan (offshore) +// * `COP` - Colombian Peso +// * `COU` - Colombian Real Value Unit +// * `KMF` - Comorian Franc +// * `CDF` - Congolese Franc +// * `CRC` - Costa Rican Colón +// * `HRD` - Croatian Dinar +// * `HRK` - Croatian Kuna +// * `CUC` - Cuban Convertible Peso +// * `CUP` - Cuban Peso +// * `CYP` - Cypriot Pound +// * `CZK` - Czech Koruna +// * `CSK` - Czechoslovak Hard Koruna +// * `DKK` - Danish Krone +// * `DJF` - Djiboutian Franc +// * `DOP` - Dominican Peso +// * `NLG` - Dutch Guilder +// * `XCD` - East Caribbean Dollar +// * `DDM` - East German Mark +// * `ECS` - Ecuadorian Sucre +// * `ECV` - Ecuadorian Unit of Constant Value +// * `EGP` - Egyptian Pound +// * `GQE` - Equatorial Guinean Ekwele +// * `ERN` - Eritrean Nakfa +// * `EEK` - Estonian Kroon +// * `ETB` - Ethiopian Birr +// * `EUR` - Euro +// * `XBA` - European Composite Unit +// * `XEU` - European Currency Unit +// * `XBB` - European Monetary Unit +// * `XBC` - European Unit of Account (XBC) +// * `XBD` - European Unit of Account (XBD) +// * `FKP` - Falkland Islands Pound +// * `FJD` - Fijian Dollar +// * `FIM` - Finnish Markka +// * `FRF` - French Franc +// * `XFO` - French Gold Franc +// * `XFU` - French UIC-Franc +// * `GMD` - Gambian Dalasi +// * `GEK` - Georgian Kupon Larit +// * `GEL` - Georgian Lari +// * `DEM` - German Mark +// * `GHS` - Ghanaian Cedi +// * `GHC` - Ghanaian Cedi (1979–2007) +// * `GIP` - Gibraltar Pound +// * `XAU` - Gold +// * `GRD` - Greek Drachma +// * `GTQ` - Guatemalan Quetzal +// * `GWP` - Guinea-Bissau Peso +// * `GNF` - Guinean Franc +// * `GNS` - Guinean Syli +// * `GYD` - Guyanaese Dollar +// * `HTG` - Haitian Gourde +// * `HNL` - Honduran Lempira +// * `HKD` - Hong Kong Dollar +// * `HUF` - Hungarian Forint +// * `IMP` - IMP +// * `ISK` - Icelandic Króna +// * `ISJ` - Icelandic Króna (1918–1981) +// * `INR` - Indian Rupee +// * `IDR` - Indonesian Rupiah +// * `IRR` - Iranian Rial +// * `IQD` - Iraqi Dinar +// * `IEP` - Irish Pound +// * `ILS` - Israeli New Shekel +// * `ILP` - Israeli Pound +// * `ILR` - Israeli Shekel (1980–1985) +// * `ITL` - Italian Lira +// * `JMD` - Jamaican Dollar +// * `JPY` - Japanese Yen +// * `JOD` - Jordanian Dinar +// * `KZT` - Kazakhstani Tenge +// * `KES` - Kenyan Shilling +// * `KWD` - Kuwaiti Dinar +// * `KGS` - Kyrgystani Som +// * `LAK` - Laotian Kip +// * `LVL` - Latvian Lats +// * `LVR` - Latvian Ruble +// * `LBP` - Lebanese Pound +// * `LSL` - Lesotho Loti +// * `LRD` - Liberian Dollar +// * `LYD` - Libyan Dinar +// * `LTL` - Lithuanian Litas +// * `LTT` - Lithuanian Talonas +// * `LUL` - Luxembourg Financial Franc +// * `LUC` - Luxembourgian Convertible Franc +// * `LUF` - Luxembourgian Franc +// * `MOP` - Macanese Pataca +// * `MKD` - Macedonian Denar +// * `MKN` - Macedonian Denar (1992–1993) +// * `MGA` - Malagasy Ariary +// * `MGF` - Malagasy Franc +// * `MWK` - Malawian Kwacha +// * `MYR` - Malaysian Ringgit +// * `MVR` - Maldivian Rufiyaa +// * `MVP` - Maldivian Rupee (1947–1981) +// * `MLF` - Malian Franc +// * `MTL` - Maltese Lira +// * `MTP` - Maltese Pound +// * `MRU` - Mauritanian Ouguiya +// * `MRO` - Mauritanian Ouguiya (1973–2017) +// * `MUR` - Mauritian Rupee +// * `MXV` - Mexican Investment Unit +// * `MXN` - Mexican Peso +// * `MXP` - Mexican Silver Peso (1861–1992) +// * `MDC` - Moldovan Cupon +// * `MDL` - Moldovan Leu +// * `MCF` - Monegasque Franc +// * `MNT` - Mongolian Tugrik +// * `MAD` - Moroccan Dirham +// * `MAF` - Moroccan Franc +// * `MZE` - Mozambican Escudo +// * `MZN` - Mozambican Metical +// * `MZM` - Mozambican Metical (1980–2006) +// * `MMK` - Myanmar Kyat +// * `NAD` - Namibian Dollar +// * `NPR` - Nepalese Rupee +// * `ANG` - Netherlands Antillean Guilder +// * `TWD` - New Taiwan Dollar +// * `NZD` - New Zealand Dollar +// * `NIO` - Nicaraguan Córdoba +// * `NIC` - Nicaraguan Córdoba (1988–1991) +// * `NGN` - Nigerian Naira +// * `KPW` - North Korean Won +// * `NOK` - Norwegian Krone +// * `OMR` - Omani Rial +// * `PKR` - Pakistani Rupee +// * `XPD` - Palladium +// * `PAB` - Panamanian Balboa +// * `PGK` - Papua New Guinean Kina +// * `PYG` - Paraguayan Guarani +// * `PEI` - Peruvian Inti +// * `PEN` - Peruvian Sol +// * `PES` - Peruvian Sol (1863–1965) +// * `PHP` - Philippine Peso +// * `XPT` - Platinum +// * `PLN` - Polish Zloty +// * `PLZ` - Polish Zloty (1950–1995) +// * `PTE` - Portuguese Escudo +// * `GWE` - Portuguese Guinea Escudo +// * `QAR` - Qatari Rial +// * `XRE` - RINET Funds +// * `RHD` - Rhodesian Dollar +// * `RON` - Romanian Leu +// * `ROL` - Romanian Leu (1952–2006) +// * `RUB` - Russian Ruble +// * `RUR` - Russian Ruble (1991–1998) +// * `RWF` - Rwandan Franc +// * `SVC` - Salvadoran Colón +// * `WST` - Samoan Tala +// * `SAR` - Saudi Riyal +// * `RSD` - Serbian Dinar +// * `CSD` - Serbian Dinar (2002–2006) +// * `SCR` - Seychellois Rupee +// * `SLL` - Sierra Leonean Leone +// * `XAG` - Silver +// * `SGD` - Singapore Dollar +// * `SKK` - Slovak Koruna +// * `SIT` - Slovenian Tolar +// * `SBD` - Solomon Islands Dollar +// * `SOS` - Somali Shilling +// * `ZAR` - South African Rand +// * `ZAL` - South African Rand (financial) +// * `KRH` - South Korean Hwan (1953–1962) +// * `KRW` - South Korean Won +// * `KRO` - South Korean Won (1945–1953) +// * `SSP` - South Sudanese Pound +// * `SUR` - Soviet Rouble +// * `ESP` - Spanish Peseta +// * `ESA` - Spanish Peseta (A account) +// * `ESB` - Spanish Peseta (convertible account) +// * `XDR` - Special Drawing Rights +// * `LKR` - Sri Lankan Rupee +// * `SHP` - St. Helena Pound +// * `XSU` - Sucre +// * `SDD` - Sudanese Dinar (1992–2007) +// * `SDG` - Sudanese Pound +// * `SDP` - Sudanese Pound (1957–1998) +// * `SRD` - Surinamese Dollar +// * `SRG` - Surinamese Guilder +// * `SZL` - Swazi Lilangeni +// * `SEK` - Swedish Krona +// * `CHF` - Swiss Franc +// * `SYP` - Syrian Pound +// * `STN` - São Tomé & Príncipe Dobra +// * `STD` - São Tomé & Príncipe Dobra (1977–2017) +// * `TVD` - TVD +// * `TJR` - Tajikistani Ruble +// * `TJS` - Tajikistani Somoni +// * `TZS` - Tanzanian Shilling +// * `XTS` - Testing Currency Code +// * `THB` - Thai Baht +// * `XXX` - The codes assigned for transactions where no currency is involved +// * `TPE` - Timorese Escudo +// * `TOP` - Tongan Paʻanga +// * `TTD` - Trinidad & Tobago Dollar +// * `TND` - Tunisian Dinar +// * `TRY` - Turkish Lira +// * `TRL` - Turkish Lira (1922–2005) +// * `TMT` - Turkmenistani Manat +// * `TMM` - Turkmenistani Manat (1993–2009) +// * `USD` - US Dollar +// * `USN` - US Dollar (Next day) +// * `USS` - US Dollar (Same day) +// * `UGX` - Ugandan Shilling +// * `UGS` - Ugandan Shilling (1966–1987) +// * `UAH` - Ukrainian Hryvnia +// * `UAK` - Ukrainian Karbovanets +// * `AED` - United Arab Emirates Dirham +// * `UYW` - Uruguayan Nominal Wage Index Unit +// * `UYU` - Uruguayan Peso +// * `UYP` - Uruguayan Peso (1975–1993) +// * `UYI` - Uruguayan Peso (Indexed Units) +// * `UZS` - Uzbekistani Som +// * `VUV` - Vanuatu Vatu +// * `VES` - Venezuelan Bolívar +// * `VEB` - Venezuelan Bolívar (1871–2008) +// * `VEF` - Venezuelan Bolívar (2008–2018) +// * `VND` - Vietnamese Dong +// * `VNN` - Vietnamese Dong (1978–1985) +// * `CHE` - WIR Euro +// * `CHW` - WIR Franc +// * `XOF` - West African CFA Franc +// * `YDD` - Yemeni Dinar +// * `YER` - Yemeni Rial +// * `YUN` - Yugoslavian Convertible Dinar (1990–1992) +// * `YUD` - Yugoslavian Hard Dinar (1966–1990) +// * `YUM` - Yugoslavian New Dinar (1994–2002) +// * `YUR` - Yugoslavian Reformed Dinar (1992–1993) +// * `ZWN` - ZWN +// * `ZRN` - Zairean New Zaire (1993–1998) +// * `ZRZ` - Zairean Zaire (1971–1993) +// * `ZMW` - Zambian Kwacha +// * `ZMK` - Zambian Kwacha (1968–2012) +// * `ZWD` - Zimbabwean Dollar (1980–2008) +// * `ZWR` - Zimbabwean Dollar (2008) +// * `ZWL` - Zimbabwean Dollar (2009) +type JournalLineRequestCurrency struct { + TransactionCurrencyEnum TransactionCurrencyEnum + String string + + typ string +} + +func (j *JournalLineRequestCurrency) GetTransactionCurrencyEnum() TransactionCurrencyEnum { + if j == nil { + return "" + } + return j.TransactionCurrencyEnum +} + +func (j *JournalLineRequestCurrency) GetString() string { + if j == nil { + return "" + } + return j.String +} + +func (j *JournalLineRequestCurrency) UnmarshalJSON(data []byte) error { + var valueTransactionCurrencyEnum TransactionCurrencyEnum + if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { + j.typ = "TransactionCurrencyEnum" + j.TransactionCurrencyEnum = valueTransactionCurrencyEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + j.typ = "String" + j.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, j) +} + +func (j JournalLineRequestCurrency) MarshalJSON() ([]byte, error) { + if j.typ == "TransactionCurrencyEnum" || j.TransactionCurrencyEnum != "" { + return json.Marshal(j.TransactionCurrencyEnum) + } + if j.typ == "String" || j.String != "" { + return json.Marshal(j.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", j) +} + +type JournalLineRequestCurrencyVisitor interface { + VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error + VisitString(string) error +} + +func (j *JournalLineRequestCurrency) Accept(visitor JournalLineRequestCurrencyVisitor) error { + if j.typ == "TransactionCurrencyEnum" || j.TransactionCurrencyEnum != "" { + return visitor.VisitTransactionCurrencyEnum(j.TransactionCurrencyEnum) + } + if j.typ == "String" || j.String != "" { + return visitor.VisitString(j.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", j) +} + +type JournalLineRequestProject struct { + String string + Project *Project + + typ string +} + +func (j *JournalLineRequestProject) GetString() string { + if j == nil { + return "" + } + return j.String +} + +func (j *JournalLineRequestProject) GetProject() *Project { + if j == nil { + return nil + } + return j.Project +} + +func (j *JournalLineRequestProject) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + j.typ = "String" + j.String = valueString + return nil + } + valueProject := new(Project) + if err := json.Unmarshal(data, &valueProject); err == nil { + j.typ = "Project" + j.Project = valueProject + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, j) +} + +func (j JournalLineRequestProject) MarshalJSON() ([]byte, error) { + if j.typ == "String" || j.String != "" { + return json.Marshal(j.String) + } + if j.typ == "Project" || j.Project != nil { + return json.Marshal(j.Project) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", j) +} + +type JournalLineRequestProjectVisitor interface { + VisitString(string) error + VisitProject(*Project) error +} + +func (j *JournalLineRequestProject) Accept(visitor JournalLineRequestProjectVisitor) error { + if j.typ == "String" || j.String != "" { + return visitor.VisitString(j.String) + } + if j.typ == "Project" || j.Project != nil { + return visitor.VisitProject(j.Project) + } + return fmt.Errorf("type %T does not include a non-empty union type", j) +} + +type JournalLineRequestTrackingCategoriesItem struct { + String string + TrackingCategory *TrackingCategory + + typ string +} + +func (j *JournalLineRequestTrackingCategoriesItem) GetString() string { + if j == nil { + return "" + } + return j.String +} + +func (j *JournalLineRequestTrackingCategoriesItem) GetTrackingCategory() *TrackingCategory { + if j == nil { + return nil + } + return j.TrackingCategory +} + +func (j *JournalLineRequestTrackingCategoriesItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + j.typ = "String" + j.String = valueString + return nil + } + valueTrackingCategory := new(TrackingCategory) + if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { + j.typ = "TrackingCategory" + j.TrackingCategory = valueTrackingCategory + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, j) +} + +func (j JournalLineRequestTrackingCategoriesItem) MarshalJSON() ([]byte, error) { + if j.typ == "String" || j.String != "" { + return json.Marshal(j.String) + } + if j.typ == "TrackingCategory" || j.TrackingCategory != nil { + return json.Marshal(j.TrackingCategory) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", j) +} + +type JournalLineRequestTrackingCategoriesItemVisitor interface { + VisitString(string) error + VisitTrackingCategory(*TrackingCategory) error +} + +func (j *JournalLineRequestTrackingCategoriesItem) Accept(visitor JournalLineRequestTrackingCategoriesItemVisitor) error { + if j.typ == "String" || j.String != "" { + return visitor.VisitString(j.String) + } + if j.typ == "TrackingCategory" || j.TrackingCategory != nil { + return visitor.VisitTrackingCategory(j.TrackingCategory) + } + return fmt.Errorf("type %T does not include a non-empty union type", j) +} + +type JournalLineRequestTrackingCategory struct { + String string + TrackingCategory *TrackingCategory + + typ string +} + +func (j *JournalLineRequestTrackingCategory) GetString() string { + if j == nil { + return "" + } + return j.String +} + +func (j *JournalLineRequestTrackingCategory) GetTrackingCategory() *TrackingCategory { + if j == nil { + return nil + } + return j.TrackingCategory +} + +func (j *JournalLineRequestTrackingCategory) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + j.typ = "String" + j.String = valueString + return nil + } + valueTrackingCategory := new(TrackingCategory) + if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { + j.typ = "TrackingCategory" + j.TrackingCategory = valueTrackingCategory + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, j) +} + +func (j JournalLineRequestTrackingCategory) MarshalJSON() ([]byte, error) { + if j.typ == "String" || j.String != "" { + return json.Marshal(j.String) + } + if j.typ == "TrackingCategory" || j.TrackingCategory != nil { + return json.Marshal(j.TrackingCategory) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", j) +} + +type JournalLineRequestTrackingCategoryVisitor interface { + VisitString(string) error + VisitTrackingCategory(*TrackingCategory) error +} + +func (j *JournalLineRequestTrackingCategory) Accept(visitor JournalLineRequestTrackingCategoryVisitor) error { + if j.typ == "String" || j.String != "" { + return visitor.VisitString(j.String) + } + if j.typ == "TrackingCategory" || j.TrackingCategory != nil { + return visitor.VisitTrackingCategory(j.TrackingCategory) + } + return fmt.Errorf("type %T does not include a non-empty union type", j) +} + +type JournalLineTrackingCategoriesItem struct { + String string + TrackingCategory *TrackingCategory + + typ string +} + +func (j *JournalLineTrackingCategoriesItem) GetString() string { + if j == nil { + return "" + } + return j.String +} + +func (j *JournalLineTrackingCategoriesItem) GetTrackingCategory() *TrackingCategory { + if j == nil { + return nil + } + return j.TrackingCategory +} + +func (j *JournalLineTrackingCategoriesItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + j.typ = "String" + j.String = valueString + return nil + } + valueTrackingCategory := new(TrackingCategory) + if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { + j.typ = "TrackingCategory" + j.TrackingCategory = valueTrackingCategory + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, j) +} + +func (j JournalLineTrackingCategoriesItem) MarshalJSON() ([]byte, error) { + if j.typ == "String" || j.String != "" { + return json.Marshal(j.String) + } + if j.typ == "TrackingCategory" || j.TrackingCategory != nil { + return json.Marshal(j.TrackingCategory) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", j) +} + +type JournalLineTrackingCategoriesItemVisitor interface { + VisitString(string) error + VisitTrackingCategory(*TrackingCategory) error +} + +func (j *JournalLineTrackingCategoriesItem) Accept(visitor JournalLineTrackingCategoriesItemVisitor) error { + if j.typ == "String" || j.String != "" { + return visitor.VisitString(j.String) + } + if j.typ == "TrackingCategory" || j.TrackingCategory != nil { + return visitor.VisitTrackingCategory(j.TrackingCategory) + } + return fmt.Errorf("type %T does not include a non-empty union type", j) +} + +type JournalLineTrackingCategory struct { + String string + TrackingCategory *TrackingCategory + + typ string +} + +func (j *JournalLineTrackingCategory) GetString() string { + if j == nil { + return "" + } + return j.String +} + +func (j *JournalLineTrackingCategory) GetTrackingCategory() *TrackingCategory { + if j == nil { + return nil + } + return j.TrackingCategory +} + +func (j *JournalLineTrackingCategory) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + j.typ = "String" + j.String = valueString + return nil + } + valueTrackingCategory := new(TrackingCategory) + if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { + j.typ = "TrackingCategory" + j.TrackingCategory = valueTrackingCategory + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, j) +} + +func (j JournalLineTrackingCategory) MarshalJSON() ([]byte, error) { + if j.typ == "String" || j.String != "" { + return json.Marshal(j.String) + } + if j.typ == "TrackingCategory" || j.TrackingCategory != nil { + return json.Marshal(j.TrackingCategory) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", j) +} + +type JournalLineTrackingCategoryVisitor interface { + VisitString(string) error + VisitTrackingCategory(*TrackingCategory) error +} + +func (j *JournalLineTrackingCategory) Accept(visitor JournalLineTrackingCategoryVisitor) error { + if j.typ == "String" || j.String != "" { + return visitor.VisitString(j.String) + } + if j.typ == "TrackingCategory" || j.TrackingCategory != nil { + return visitor.VisitTrackingCategory(j.TrackingCategory) + } + return fmt.Errorf("type %T does not include a non-empty union type", j) +} + +type PaginatedJournalEntryList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*JournalEntry `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedJournalEntryList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedJournalEntryList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedJournalEntryList) GetResults() []*JournalEntry { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedJournalEntryList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedJournalEntryList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedJournalEntryList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedJournalEntryList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedJournalEntryList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +// * `UNPOSTED` - UNPOSTED +// * `POSTED` - POSTED +type PostingStatusEnum string + +const ( + PostingStatusEnumUnposted PostingStatusEnum = "UNPOSTED" + PostingStatusEnumPosted PostingStatusEnum = "POSTED" +) + +func NewPostingStatusEnumFromString(s string) (PostingStatusEnum, error) { + switch s { + case "UNPOSTED": + return PostingStatusEnumUnposted, nil + case "POSTED": + return PostingStatusEnumPosted, nil + } + var t PostingStatusEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (p PostingStatusEnum) Ptr() *PostingStatusEnum { + return &p +} diff --git a/accounting/journalentries/client.go b/accounting/journalentries/client.go index bd7ec36..4ed0bfa 100644 --- a/accounting/journalentries/client.go +++ b/accounting/journalentries/client.go @@ -1,136 +1,135 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package journalentries import ( context "context" fmt "fmt" - accounting "github.com/merge-api/merge-go-client/accounting" - core "github.com/merge-api/merge-go-client/core" + accounting "github.com/merge-api/merge-go-client/v2/accounting" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `JournalEntry` objects. -func (c *Client) List(ctx context.Context, request *accounting.JournalEntriesListRequest) (*accounting.PaginatedJournalEntryList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/journal-entries" - - queryParams := make(url.Values) - if request.CompanyId != nil { - queryParams.Add("company_id", fmt.Sprintf("%v", *request.CompanyId)) - } - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeRemoteFields != nil { - queryParams.Add("include_remote_fields", fmt.Sprintf("%v", *request.IncludeRemoteFields)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if request.TransactionDateAfter != nil { - queryParams.Add("transaction_date_after", fmt.Sprintf("%v", request.TransactionDateAfter.Format(time.RFC3339))) - } - if request.TransactionDateBefore != nil { - queryParams.Add("transaction_date_before", fmt.Sprintf("%v", request.TransactionDateBefore.Format(time.RFC3339))) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *accounting.PaginatedJournalEntryList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *accounting.JournalEntriesListRequest, + opts ...option.RequestOption, +) (*core.Page[*accounting.JournalEntry], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/journal-entries" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *accounting.PaginatedJournalEntryList) *internal.PageResponse[*string, *accounting.JournalEntry] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *accounting.JournalEntry]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Creates a `JournalEntry` object with the given values. -func (c *Client) Create(ctx context.Context, request *accounting.JournalEntryEndpointRequest) (*accounting.JournalEntryResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/journal-entries" - - queryParams := make(url.Values) - if request.IsDebugMode != nil { - queryParams.Add("is_debug_mode", fmt.Sprintf("%v", *request.IsDebugMode)) - } - if request.RunAsync != nil { - queryParams.Add("run_async", fmt.Sprintf("%v", *request.RunAsync)) +func (c *Client) Create( + ctx context.Context, + request *accounting.JournalEntryEndpointRequest, + opts ...option.RequestOption, +) (*accounting.JournalEntryResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/journal-entries" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *accounting.JournalEntryResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -139,35 +138,46 @@ func (c *Client) Create(ctx context.Context, request *accounting.JournalEntryEnd } // Returns a `JournalEntry` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *accounting.JournalEntriesRetrieveRequest) (*accounting.JournalEntry, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"accounting/v1/journal-entries/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeRemoteFields != nil { - queryParams.Add("include_remote_fields", fmt.Sprintf("%v", *request.IncludeRemoteFields)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *accounting.JournalEntriesRetrieveRequest, + opts ...option.RequestOption, +) (*accounting.JournalEntry, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/accounting/v1/journal-entries/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *accounting.JournalEntry if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -176,67 +186,93 @@ func (c *Client) Retrieve(ctx context.Context, id string, request *accounting.Jo } // Returns a list of `RemoteFieldClass` objects. -func (c *Client) LinesRemoteFieldClassesList(ctx context.Context, request *accounting.JournalEntriesLinesRemoteFieldClassesListRequest) (*accounting.PaginatedRemoteFieldClassList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/journal-entries/lines/remote-field-classes" - - queryParams := make(url.Values) - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.IsCommonModelField != nil { - queryParams.Add("is_common_model_field", fmt.Sprintf("%v", *request.IsCommonModelField)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *accounting.PaginatedRemoteFieldClassList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) LinesRemoteFieldClassesList( + ctx context.Context, + request *accounting.JournalEntriesLinesRemoteFieldClassesListRequest, + opts ...option.RequestOption, +) (*core.Page[*accounting.RemoteFieldClass], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/journal-entries/lines/remote-field-classes" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *accounting.PaginatedRemoteFieldClassList) *internal.PageResponse[*string, *accounting.RemoteFieldClass] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *accounting.RemoteFieldClass]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Returns metadata for `JournalEntry` POSTs. -func (c *Client) MetaPostRetrieve(ctx context.Context) (*accounting.MetaResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/journal-entries/meta/post" +func (c *Client) MetaPostRetrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*accounting.MetaResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/journal-entries/meta/post" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *accounting.MetaResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -245,47 +281,60 @@ func (c *Client) MetaPostRetrieve(ctx context.Context) (*accounting.MetaResponse } // Returns a list of `RemoteFieldClass` objects. -func (c *Client) RemoteFieldClassesList(ctx context.Context, request *accounting.JournalEntriesRemoteFieldClassesListRequest) (*accounting.PaginatedRemoteFieldClassList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/journal-entries/remote-field-classes" - - queryParams := make(url.Values) - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.IsCommonModelField != nil { - queryParams.Add("is_common_model_field", fmt.Sprintf("%v", *request.IsCommonModelField)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *accounting.PaginatedRemoteFieldClassList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) RemoteFieldClassesList( + ctx context.Context, + request *accounting.JournalEntriesRemoteFieldClassesListRequest, + opts ...option.RequestOption, +) (*core.Page[*accounting.RemoteFieldClass], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/journal-entries/remote-field-classes" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *accounting.PaginatedRemoteFieldClassList) *internal.PageResponse[*string, *accounting.RemoteFieldClass] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *accounting.RemoteFieldClass]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } diff --git a/accounting/link_token.go b/accounting/link_token.go index d9efb1c..a700135 100644 --- a/accounting/link_token.go +++ b/accounting/link_token.go @@ -1,35 +1,279 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package accounting +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" +) + type EndUserDetailsRequest struct { // Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent. - EndUserEmailAddress string `json:"end_user_email_address"` + EndUserEmailAddress string `json:"end_user_email_address" url:"-"` // Your end user's organization. - EndUserOrganizationName string `json:"end_user_organization_name"` + EndUserOrganizationName string `json:"end_user_organization_name" url:"-"` // This unique identifier typically represents the ID for your end user in your product's database. This value must be distinct from other Linked Accounts' unique identifiers. - EndUserOriginId string `json:"end_user_origin_id"` + EndUserOriginId string `json:"end_user_origin_id" url:"-"` // The integration categories to show in Merge Link. - Categories []CategoriesEnum `json:"categories,omitempty"` + Categories []CategoriesEnum `json:"categories,omitempty" url:"-"` // The slug of a specific pre-selected integration for this linking flow token. For examples of slugs, see https://docs.merge.dev/guides/merge-link/single-integration/. - Integration *string `json:"integration,omitempty"` + Integration *string `json:"integration,omitempty" url:"-"` // An integer number of minutes between [30, 720 or 10080 if for a Magic Link URL] for how long this token is valid. Defaults to 30. - LinkExpiryMins *int `json:"link_expiry_mins,omitempty"` + LinkExpiryMins *int `json:"link_expiry_mins,omitempty" url:"-"` // Whether to generate a Magic Link URL. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. - ShouldCreateMagicLinkUrl *bool `json:"should_create_magic_link_url,omitempty"` + ShouldCreateMagicLinkUrl *bool `json:"should_create_magic_link_url,omitempty" url:"-"` // Whether to generate a Magic Link URL on the Admin Needed screen during the linking flow. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. - HideAdminMagicLink *bool `json:"hide_admin_magic_link,omitempty"` + HideAdminMagicLink *bool `json:"hide_admin_magic_link,omitempty" url:"-"` // An array of objects to specify the models and fields that will be disabled for a given Linked Account. Each object uses model_id, enabled_actions, and disabled_fields to specify the model, method, and fields that are scoped for a given Linked Account. - CommonModels []*CommonModelScopesBodyRequest `json:"common_models,omitempty"` + CommonModels []*CommonModelScopesBodyRequest `json:"common_models,omitempty" url:"-"` // 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. - CategoryCommonModelScopes map[string][]*IndividualCommonModelScopeDeserializerRequest `json:"category_common_model_scopes,omitempty"` + CategoryCommonModelScopes map[string][]*IndividualCommonModelScopeDeserializerRequest `json:"category_common_model_scopes,omitempty" url:"-"` // The following subset of IETF language tags can be used to configure localization. // // * `en` - en // * `de` - de - Language *LanguageEnum `json:"language,omitempty"` + Language *EndUserDetailsRequestLanguage `json:"language,omitempty" url:"-"` // The boolean that indicates whether initial, periodic, and force syncs will be disabled. - AreSyncsDisabled *bool `json:"are_syncs_disabled,omitempty"` + AreSyncsDisabled *bool `json:"are_syncs_disabled,omitempty" url:"-"` // A JSON object containing integration-specific configuration options. - IntegrationSpecificConfig map[string]interface{} `json:"integration_specific_config,omitempty"` + IntegrationSpecificConfig map[string]interface{} `json:"integration_specific_config,omitempty" url:"-"` +} + +// The following subset of IETF language tags can be used to configure localization. +// +// * `en` - en +// * `de` - de +type EndUserDetailsRequestLanguage struct { + LanguageEnum LanguageEnum + String string + + typ string +} + +func (e *EndUserDetailsRequestLanguage) GetLanguageEnum() LanguageEnum { + if e == nil { + return "" + } + return e.LanguageEnum +} + +func (e *EndUserDetailsRequestLanguage) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *EndUserDetailsRequestLanguage) UnmarshalJSON(data []byte) error { + var valueLanguageEnum LanguageEnum + if err := json.Unmarshal(data, &valueLanguageEnum); err == nil { + e.typ = "LanguageEnum" + e.LanguageEnum = valueLanguageEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e EndUserDetailsRequestLanguage) MarshalJSON() ([]byte, error) { + if e.typ == "LanguageEnum" || e.LanguageEnum != "" { + return json.Marshal(e.LanguageEnum) + } + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type EndUserDetailsRequestLanguageVisitor interface { + VisitLanguageEnum(LanguageEnum) error + VisitString(string) error +} + +func (e *EndUserDetailsRequestLanguage) Accept(visitor EndUserDetailsRequestLanguageVisitor) error { + if e.typ == "LanguageEnum" || e.LanguageEnum != "" { + return visitor.VisitLanguageEnum(e.LanguageEnum) + } + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type CommonModelScopesBodyRequest struct { + ModelId string `json:"model_id" url:"model_id"` + EnabledActions []EnabledActionsEnum `json:"enabled_actions" url:"enabled_actions"` + DisabledFields []string `json:"disabled_fields" url:"disabled_fields"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (c *CommonModelScopesBodyRequest) GetModelId() string { + if c == nil { + return "" + } + return c.ModelId +} + +func (c *CommonModelScopesBodyRequest) GetEnabledActions() []EnabledActionsEnum { + if c == nil { + return nil + } + return c.EnabledActions +} + +func (c *CommonModelScopesBodyRequest) GetDisabledFields() []string { + if c == nil { + return nil + } + return c.DisabledFields +} + +func (c *CommonModelScopesBodyRequest) GetExtraProperties() map[string]interface{} { + return c.extraProperties +} + +func (c *CommonModelScopesBodyRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CommonModelScopesBodyRequest + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *c = CommonModelScopesBodyRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *c) + if err != nil { + return err + } + c.extraProperties = extraProperties + c.rawJSON = json.RawMessage(data) + return nil +} + +func (c *CommonModelScopesBodyRequest) String() string { + if len(c.rawJSON) > 0 { + if value, err := internal.StringifyJSON(c.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(c); err == nil { + return value + } + return fmt.Sprintf("%#v", c) +} + +// * `READ` - READ +// * `WRITE` - WRITE +type EnabledActionsEnum string + +const ( + EnabledActionsEnumRead EnabledActionsEnum = "READ" + EnabledActionsEnumWrite EnabledActionsEnum = "WRITE" +) + +func NewEnabledActionsEnumFromString(s string) (EnabledActionsEnum, error) { + switch s { + case "READ": + return EnabledActionsEnumRead, nil + case "WRITE": + return EnabledActionsEnumWrite, nil + } + var t EnabledActionsEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (e EnabledActionsEnum) Ptr() *EnabledActionsEnum { + return &e +} + +// * `en` - en +// * `de` - de +type LanguageEnum string + +const ( + LanguageEnumEn LanguageEnum = "en" + LanguageEnumDe LanguageEnum = "de" +) + +func NewLanguageEnumFromString(s string) (LanguageEnum, error) { + switch s { + case "en": + return LanguageEnumEn, nil + case "de": + return LanguageEnumDe, nil + } + var t LanguageEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (l LanguageEnum) Ptr() *LanguageEnum { + return &l +} + +type LinkToken struct { + LinkToken string `json:"link_token" url:"link_token"` + IntegrationName *string `json:"integration_name,omitempty" url:"integration_name,omitempty"` + MagicLinkUrl *string `json:"magic_link_url,omitempty" url:"magic_link_url,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (l *LinkToken) GetLinkToken() string { + if l == nil { + return "" + } + return l.LinkToken +} + +func (l *LinkToken) GetIntegrationName() *string { + if l == nil { + return nil + } + return l.IntegrationName +} + +func (l *LinkToken) GetMagicLinkUrl() *string { + if l == nil { + return nil + } + return l.MagicLinkUrl +} + +func (l *LinkToken) GetExtraProperties() map[string]interface{} { + return l.extraProperties +} + +func (l *LinkToken) UnmarshalJSON(data []byte) error { + type unmarshaler LinkToken + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *l = LinkToken(value) + extraProperties, err := internal.ExtractExtraProperties(data, *l) + if err != nil { + return err + } + l.extraProperties = extraProperties + l.rawJSON = json.RawMessage(data) + return nil +} + +func (l *LinkToken) String() string { + if len(l.rawJSON) > 0 { + if value, err := internal.StringifyJSON(l.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(l); err == nil { + return value + } + return fmt.Sprintf("%#v", l) } diff --git a/accounting/linked_accounts.go b/accounting/linked_accounts.go index 59a15e8..899987e 100644 --- a/accounting/linked_accounts.go +++ b/accounting/linked_accounts.go @@ -1,45 +1,48 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package accounting import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" + time "time" ) type LinkedAccountsListRequest struct { // Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing` // - // - `hris` - hris - // - `ats` - ats - // - `accounting` - accounting - // - `ticketing` - ticketing - // - `crm` - crm - // - `mktg` - mktg - // - `filestorage` - filestorage - Category *LinkedAccountsListRequestCategory `json:"-"` + // * `hris` - hris + // * `ats` - ats + // * `accounting` - accounting + // * `ticketing` - ticketing + // * `crm` - crm + // * `mktg` - mktg + // * `filestorage` - filestorage + Category *LinkedAccountsListRequestCategory `json:"-" url:"category,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // If provided, will only return linked accounts associated with the given email address. - EndUserEmailAddress *string `json:"-"` + EndUserEmailAddress *string `json:"-" url:"end_user_email_address,omitempty"` // If provided, will only return linked accounts associated with the given organization name. - EndUserOrganizationName *string `json:"-"` + EndUserOrganizationName *string `json:"-" url:"end_user_organization_name,omitempty"` // If provided, will only return linked accounts associated with the given origin ID. - EndUserOriginId *string `json:"-"` + EndUserOriginId *string `json:"-" url:"end_user_origin_id,omitempty"` // Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once. - EndUserOriginIds *string `json:"-"` - Id *string `json:"-"` + EndUserOriginIds *string `json:"-" url:"end_user_origin_ids,omitempty"` + Id *string `json:"-" url:"id,omitempty"` // Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once. - Ids *string `json:"-"` + Ids *string `json:"-" url:"ids,omitempty"` // If `true`, will include complete production duplicates of the account specified by the `id` query parameter in the response. `id` must be for a complete production linked account. - IncludeDuplicates *bool `json:"-"` + IncludeDuplicates *bool `json:"-" url:"include_duplicates,omitempty"` // If provided, will only return linked accounts associated with the given integration name. - IntegrationName *string `json:"-"` + IntegrationName *string `json:"-" url:"integration_name,omitempty"` // If included, will only include test linked accounts. If not included, will only include non-test linked accounts. - IsTestAccount *string `json:"-"` + IsTestAccount *string `json:"-" url:"is_test_account,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED` - Status *string `json:"-"` + Status *string `json:"-" url:"status,omitempty"` } type LinkedAccountsListRequestCategory string @@ -78,3 +81,491 @@ func NewLinkedAccountsListRequestCategoryFromString(s string) (LinkedAccountsLis func (l LinkedAccountsListRequestCategory) Ptr() *LinkedAccountsListRequestCategory { return &l } + +// # The LinkedAccount Object +// ### Description +// The `LinkedAccount` object is used to represent an end user's link with a specific integration. +// +// ### Usage Example +// View a list of your organization's `LinkedAccount` objects. +type AccountDetailsAndActions struct { + Id string `json:"id" url:"id"` + Category *AccountDetailsAndActionsCategory `json:"category,omitempty" url:"category,omitempty"` + Status *AccountDetailsAndActionsStatus `json:"status" url:"status"` + StatusDetail *string `json:"status_detail,omitempty" url:"status_detail,omitempty"` + EndUserOriginId *string `json:"end_user_origin_id,omitempty" url:"end_user_origin_id,omitempty"` + EndUserOrganizationName string `json:"end_user_organization_name" url:"end_user_organization_name"` + EndUserEmailAddress string `json:"end_user_email_address" url:"end_user_email_address"` + // The tenant or domain the customer has provided access to. + Subdomain *string `json:"subdomain,omitempty" url:"subdomain,omitempty"` + WebhookListenerUrl string `json:"webhook_listener_url" url:"webhook_listener_url"` + // 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. + IsDuplicate *bool `json:"is_duplicate,omitempty" url:"is_duplicate,omitempty"` + Integration *AccountDetailsAndActionsIntegration `json:"integration,omitempty" url:"integration,omitempty"` + AccountType string `json:"account_type" url:"account_type"` + CompletedAt time.Time `json:"completed_at" url:"completed_at"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AccountDetailsAndActions) GetId() string { + if a == nil { + return "" + } + return a.Id +} + +func (a *AccountDetailsAndActions) GetCategory() *AccountDetailsAndActionsCategory { + if a == nil { + return nil + } + return a.Category +} + +func (a *AccountDetailsAndActions) GetStatus() *AccountDetailsAndActionsStatus { + if a == nil { + return nil + } + return a.Status +} + +func (a *AccountDetailsAndActions) GetStatusDetail() *string { + if a == nil { + return nil + } + return a.StatusDetail +} + +func (a *AccountDetailsAndActions) GetEndUserOriginId() *string { + if a == nil { + return nil + } + return a.EndUserOriginId +} + +func (a *AccountDetailsAndActions) GetEndUserOrganizationName() string { + if a == nil { + return "" + } + return a.EndUserOrganizationName +} + +func (a *AccountDetailsAndActions) GetEndUserEmailAddress() string { + if a == nil { + return "" + } + return a.EndUserEmailAddress +} + +func (a *AccountDetailsAndActions) GetSubdomain() *string { + if a == nil { + return nil + } + return a.Subdomain +} + +func (a *AccountDetailsAndActions) GetWebhookListenerUrl() string { + if a == nil { + return "" + } + return a.WebhookListenerUrl +} + +func (a *AccountDetailsAndActions) GetIsDuplicate() *bool { + if a == nil { + return nil + } + return a.IsDuplicate +} + +func (a *AccountDetailsAndActions) GetIntegration() *AccountDetailsAndActionsIntegration { + if a == nil { + return nil + } + return a.Integration +} + +func (a *AccountDetailsAndActions) GetAccountType() string { + if a == nil { + return "" + } + return a.AccountType +} + +func (a *AccountDetailsAndActions) GetCompletedAt() time.Time { + if a == nil { + return time.Time{} + } + return a.CompletedAt +} + +func (a *AccountDetailsAndActions) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AccountDetailsAndActions) UnmarshalJSON(data []byte) error { + type embed AccountDetailsAndActions + var unmarshaler = struct { + embed + CompletedAt *internal.DateTime `json:"completed_at"` + }{ + embed: embed(*a), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *a = AccountDetailsAndActions(unmarshaler.embed) + a.CompletedAt = unmarshaler.CompletedAt.Time() + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AccountDetailsAndActions) MarshalJSON() ([]byte, error) { + type embed AccountDetailsAndActions + var marshaler = struct { + embed + CompletedAt *internal.DateTime `json:"completed_at"` + }{ + embed: embed(*a), + CompletedAt: internal.NewDateTime(a.CompletedAt), + } + return json.Marshal(marshaler) +} + +func (a *AccountDetailsAndActions) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} + +type AccountDetailsAndActionsCategory struct { + CategoryEnum CategoryEnum + String string + + typ string +} + +func (a *AccountDetailsAndActionsCategory) GetCategoryEnum() CategoryEnum { + if a == nil { + return "" + } + return a.CategoryEnum +} + +func (a *AccountDetailsAndActionsCategory) GetString() string { + if a == nil { + return "" + } + return a.String +} + +func (a *AccountDetailsAndActionsCategory) UnmarshalJSON(data []byte) error { + var valueCategoryEnum CategoryEnum + if err := json.Unmarshal(data, &valueCategoryEnum); err == nil { + a.typ = "CategoryEnum" + a.CategoryEnum = valueCategoryEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + a.typ = "String" + a.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, a) +} + +func (a AccountDetailsAndActionsCategory) MarshalJSON() ([]byte, error) { + if a.typ == "CategoryEnum" || a.CategoryEnum != "" { + return json.Marshal(a.CategoryEnum) + } + if a.typ == "String" || a.String != "" { + return json.Marshal(a.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type AccountDetailsAndActionsCategoryVisitor interface { + VisitCategoryEnum(CategoryEnum) error + VisitString(string) error +} + +func (a *AccountDetailsAndActionsCategory) Accept(visitor AccountDetailsAndActionsCategoryVisitor) error { + if a.typ == "CategoryEnum" || a.CategoryEnum != "" { + return visitor.VisitCategoryEnum(a.CategoryEnum) + } + if a.typ == "String" || a.String != "" { + return visitor.VisitString(a.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type AccountDetailsAndActionsIntegration struct { + Name string `json:"name" url:"name"` + Categories []CategoriesEnum `json:"categories" url:"categories"` + Image *string `json:"image,omitempty" url:"image,omitempty"` + SquareImage *string `json:"square_image,omitempty" url:"square_image,omitempty"` + Color string `json:"color" url:"color"` + Slug string `json:"slug" url:"slug"` + PassthroughAvailable bool `json:"passthrough_available" url:"passthrough_available"` + AvailableModelOperations []*ModelOperation `json:"available_model_operations,omitempty" url:"available_model_operations,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AccountDetailsAndActionsIntegration) GetName() string { + if a == nil { + return "" + } + return a.Name +} + +func (a *AccountDetailsAndActionsIntegration) GetCategories() []CategoriesEnum { + if a == nil { + return nil + } + return a.Categories +} + +func (a *AccountDetailsAndActionsIntegration) GetImage() *string { + if a == nil { + return nil + } + return a.Image +} + +func (a *AccountDetailsAndActionsIntegration) GetSquareImage() *string { + if a == nil { + return nil + } + return a.SquareImage +} + +func (a *AccountDetailsAndActionsIntegration) GetColor() string { + if a == nil { + return "" + } + return a.Color +} + +func (a *AccountDetailsAndActionsIntegration) GetSlug() string { + if a == nil { + return "" + } + return a.Slug +} + +func (a *AccountDetailsAndActionsIntegration) GetPassthroughAvailable() bool { + if a == nil { + return false + } + return a.PassthroughAvailable +} + +func (a *AccountDetailsAndActionsIntegration) GetAvailableModelOperations() []*ModelOperation { + if a == nil { + return nil + } + return a.AvailableModelOperations +} + +func (a *AccountDetailsAndActionsIntegration) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AccountDetailsAndActionsIntegration) UnmarshalJSON(data []byte) error { + type unmarshaler AccountDetailsAndActionsIntegration + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *a = AccountDetailsAndActionsIntegration(value) + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AccountDetailsAndActionsIntegration) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} + +type AccountDetailsAndActionsStatus struct { + AccountDetailsAndActionsStatusEnum AccountDetailsAndActionsStatusEnum + String string + + typ string +} + +func (a *AccountDetailsAndActionsStatus) GetAccountDetailsAndActionsStatusEnum() AccountDetailsAndActionsStatusEnum { + if a == nil { + return "" + } + return a.AccountDetailsAndActionsStatusEnum +} + +func (a *AccountDetailsAndActionsStatus) GetString() string { + if a == nil { + return "" + } + return a.String +} + +func (a *AccountDetailsAndActionsStatus) UnmarshalJSON(data []byte) error { + var valueAccountDetailsAndActionsStatusEnum AccountDetailsAndActionsStatusEnum + if err := json.Unmarshal(data, &valueAccountDetailsAndActionsStatusEnum); err == nil { + a.typ = "AccountDetailsAndActionsStatusEnum" + a.AccountDetailsAndActionsStatusEnum = valueAccountDetailsAndActionsStatusEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + a.typ = "String" + a.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, a) +} + +func (a AccountDetailsAndActionsStatus) MarshalJSON() ([]byte, error) { + if a.typ == "AccountDetailsAndActionsStatusEnum" || a.AccountDetailsAndActionsStatusEnum != "" { + return json.Marshal(a.AccountDetailsAndActionsStatusEnum) + } + if a.typ == "String" || a.String != "" { + return json.Marshal(a.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type AccountDetailsAndActionsStatusVisitor interface { + VisitAccountDetailsAndActionsStatusEnum(AccountDetailsAndActionsStatusEnum) error + VisitString(string) error +} + +func (a *AccountDetailsAndActionsStatus) Accept(visitor AccountDetailsAndActionsStatusVisitor) error { + if a.typ == "AccountDetailsAndActionsStatusEnum" || a.AccountDetailsAndActionsStatusEnum != "" { + return visitor.VisitAccountDetailsAndActionsStatusEnum(a.AccountDetailsAndActionsStatusEnum) + } + if a.typ == "String" || a.String != "" { + return visitor.VisitString(a.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} + +// * `COMPLETE` - COMPLETE +// * `INCOMPLETE` - INCOMPLETE +// * `RELINK_NEEDED` - RELINK_NEEDED +// * `IDLE` - IDLE +type AccountDetailsAndActionsStatusEnum string + +const ( + AccountDetailsAndActionsStatusEnumComplete AccountDetailsAndActionsStatusEnum = "COMPLETE" + AccountDetailsAndActionsStatusEnumIncomplete AccountDetailsAndActionsStatusEnum = "INCOMPLETE" + AccountDetailsAndActionsStatusEnumRelinkNeeded AccountDetailsAndActionsStatusEnum = "RELINK_NEEDED" + AccountDetailsAndActionsStatusEnumIdle AccountDetailsAndActionsStatusEnum = "IDLE" +) + +func NewAccountDetailsAndActionsStatusEnumFromString(s string) (AccountDetailsAndActionsStatusEnum, error) { + switch s { + case "COMPLETE": + return AccountDetailsAndActionsStatusEnumComplete, nil + case "INCOMPLETE": + return AccountDetailsAndActionsStatusEnumIncomplete, nil + case "RELINK_NEEDED": + return AccountDetailsAndActionsStatusEnumRelinkNeeded, nil + case "IDLE": + return AccountDetailsAndActionsStatusEnumIdle, nil + } + var t AccountDetailsAndActionsStatusEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (a AccountDetailsAndActionsStatusEnum) Ptr() *AccountDetailsAndActionsStatusEnum { + return &a +} + +type PaginatedAccountDetailsAndActionsList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*AccountDetailsAndActions `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedAccountDetailsAndActionsList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedAccountDetailsAndActionsList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedAccountDetailsAndActionsList) GetResults() []*AccountDetailsAndActions { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedAccountDetailsAndActionsList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedAccountDetailsAndActionsList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedAccountDetailsAndActionsList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedAccountDetailsAndActionsList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedAccountDetailsAndActionsList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} diff --git a/accounting/linkedaccounts/client.go b/accounting/linkedaccounts/client.go index a7a0cb7..c089c20 100644 --- a/accounting/linkedaccounts/client.go +++ b/accounting/linkedaccounts/client.go @@ -1,97 +1,92 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package linkedaccounts import ( context "context" fmt "fmt" - accounting "github.com/merge-api/merge-go-client/accounting" - core "github.com/merge-api/merge-go-client/core" + accounting "github.com/merge-api/merge-go-client/v2/accounting" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // List linked accounts for your organization. -func (c *Client) List(ctx context.Context, request *accounting.LinkedAccountsListRequest) (*accounting.PaginatedAccountDetailsAndActionsList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/linked-accounts" - - queryParams := make(url.Values) - if request.Category != nil { - queryParams.Add("category", fmt.Sprintf("%v", *request.Category)) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.EndUserEmailAddress != nil { - queryParams.Add("end_user_email_address", fmt.Sprintf("%v", *request.EndUserEmailAddress)) - } - if request.EndUserOrganizationName != nil { - queryParams.Add("end_user_organization_name", fmt.Sprintf("%v", *request.EndUserOrganizationName)) - } - if request.EndUserOriginId != nil { - queryParams.Add("end_user_origin_id", fmt.Sprintf("%v", *request.EndUserOriginId)) - } - if request.EndUserOriginIds != nil { - queryParams.Add("end_user_origin_ids", fmt.Sprintf("%v", *request.EndUserOriginIds)) - } - if request.Id != nil { - queryParams.Add("id", fmt.Sprintf("%v", *request.Id)) - } - if request.Ids != nil { - queryParams.Add("ids", fmt.Sprintf("%v", *request.Ids)) - } - if request.IncludeDuplicates != nil { - queryParams.Add("include_duplicates", fmt.Sprintf("%v", *request.IncludeDuplicates)) - } - if request.IntegrationName != nil { - queryParams.Add("integration_name", fmt.Sprintf("%v", *request.IntegrationName)) - } - if request.IsTestAccount != nil { - queryParams.Add("is_test_account", fmt.Sprintf("%v", *request.IsTestAccount)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.Status != nil { - queryParams.Add("status", fmt.Sprintf("%v", *request.Status)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *accounting.PaginatedAccountDetailsAndActionsList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *accounting.LinkedAccountsListRequest, + opts ...option.RequestOption, +) (*core.Page[*accounting.AccountDetailsAndActions], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/linked-accounts" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *accounting.PaginatedAccountDetailsAndActionsList) *internal.PageResponse[*string, *accounting.AccountDetailsAndActions] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *accounting.AccountDetailsAndActions]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } diff --git a/accounting/linktoken/client.go b/accounting/linktoken/client.go index 980fd13..7a9b40f 100644 --- a/accounting/linktoken/client.go +++ b/accounting/linktoken/client.go @@ -1,49 +1,68 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package linktoken import ( context "context" - accounting "github.com/merge-api/merge-go-client/accounting" - core "github.com/merge-api/merge-go-client/core" + accounting "github.com/merge-api/merge-go-client/v2/accounting" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Creates a link token to be used when linking a new end user. -func (c *Client) Create(ctx context.Context, request *accounting.EndUserDetailsRequest) (*accounting.LinkToken, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/link-token" +func (c *Client) Create( + ctx context.Context, + request *accounting.EndUserDetailsRequest, + opts ...option.RequestOption, +) (*accounting.LinkToken, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/link-token" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *accounting.LinkToken if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err diff --git a/accounting/passthrough/client.go b/accounting/passthrough/client.go index ee92d94..1fc9d57 100644 --- a/accounting/passthrough/client.go +++ b/accounting/passthrough/client.go @@ -1,49 +1,68 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package passthrough import ( context "context" - accounting "github.com/merge-api/merge-go-client/accounting" - core "github.com/merge-api/merge-go-client/core" + accounting "github.com/merge-api/merge-go-client/v2/accounting" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Pull data from an endpoint not currently supported by Merge. -func (c *Client) Create(ctx context.Context, request *accounting.DataPassthroughRequest) (*accounting.RemoteResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/passthrough" +func (c *Client) Create( + ctx context.Context, + request *accounting.DataPassthroughRequest, + opts ...option.RequestOption, +) (*accounting.RemoteResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/passthrough" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *accounting.RemoteResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err diff --git a/accounting/payment_methods.go b/accounting/payment_methods.go new file mode 100644 index 0000000..915ab1b --- /dev/null +++ b/accounting/payment_methods.go @@ -0,0 +1,91 @@ +// Code generated by Fern. DO NOT EDIT. + +package accounting + +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" +) + +type PaymentMethodsListRequest struct { + // The pagination cursor value. + Cursor *string `json:"-" url:"cursor,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` + // Whether to include the original data Merge fetched from the third-party to produce these models. + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` + // Number of results to return per page. + PageSize *int `json:"-" url:"page_size,omitempty"` +} + +type PaymentMethodsRetrieveRequest struct { + // Whether to include the original data Merge fetched from the third-party to produce these models. + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` +} + +type PaginatedPaymentMethodList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*PaymentMethod `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedPaymentMethodList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedPaymentMethodList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedPaymentMethodList) GetResults() []*PaymentMethod { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedPaymentMethodList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedPaymentMethodList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedPaymentMethodList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedPaymentMethodList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedPaymentMethodList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} diff --git a/accounting/payment_terms.go b/accounting/payment_terms.go new file mode 100644 index 0000000..330d27e --- /dev/null +++ b/accounting/payment_terms.go @@ -0,0 +1,95 @@ +// Code generated by Fern. DO NOT EDIT. + +package accounting + +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" +) + +type PaymentTermsListRequest struct { + // The pagination cursor value. + Cursor *string `json:"-" url:"cursor,omitempty"` + // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + Expand []*string `json:"-" url:"expand,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` + // Whether to include the original data Merge fetched from the third-party to produce these models. + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` + // Number of results to return per page. + PageSize *int `json:"-" url:"page_size,omitempty"` +} + +type PaymentTermsRetrieveRequest struct { + // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + Expand []*string `json:"-" url:"expand,omitempty"` + // Whether to include the original data Merge fetched from the third-party to produce these models. + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` +} + +type PaginatedPaymentTermList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*PaymentTerm `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedPaymentTermList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedPaymentTermList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedPaymentTermList) GetResults() []*PaymentTerm { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedPaymentTermList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedPaymentTermList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedPaymentTermList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedPaymentTermList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedPaymentTermList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} diff --git a/accounting/paymentmethods/client.go b/accounting/paymentmethods/client.go new file mode 100644 index 0000000..1c48d1c --- /dev/null +++ b/accounting/paymentmethods/client.go @@ -0,0 +1,140 @@ +// Code generated by Fern. DO NOT EDIT. + +package paymentmethods + +import ( + context "context" + fmt "fmt" + accounting "github.com/merge-api/merge-go-client/v2/accounting" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" + http "net/http" +) + +type Client struct { + baseURL string + caller *internal.Caller + header http.Header +} + +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) + return &Client{ + baseURL: options.BaseURL, + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), + } +} + +// Returns a list of `PaymentMethod` objects. +func (c *Client) List( + ctx context.Context, + request *accounting.PaymentMethodsListRequest, + opts ...option.RequestOption, +) (*core.Page[*accounting.PaymentMethod], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/payment-methods" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err + } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *accounting.PaginatedPaymentMethodList) *internal.PageResponse[*string, *accounting.PaymentMethod] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *accounting.PaymentMethod]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) +} + +// Returns a `PaymentMethod` object with the given `id`. +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *accounting.PaymentMethodsRetrieveRequest, + opts ...option.RequestOption, +) (*accounting.PaymentMethod, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/accounting/v1/payment-methods/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err + } + if len(queryParams) > 0 { + endpointURL += "?" + queryParams.Encode() + } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + var response *accounting.PaymentMethod + if err := c.caller.Call( + ctx, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, + }, + ); err != nil { + return nil, err + } + return response, nil +} diff --git a/accounting/payments.go b/accounting/payments.go index 1434311..2dbbafc 100644 --- a/accounting/payments.go +++ b/accounting/payments.go @@ -1,510 +1,3201 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package accounting import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type PaymentEndpointRequest struct { // Whether to include debug fields (such as log file links) in the response. - IsDebugMode *bool `json:"-"` + IsDebugMode *bool `json:"-" url:"is_debug_mode,omitempty"` // Whether or not third-party updates should be run asynchronously. - RunAsync *bool `json:"-"` - Model *PaymentRequest `json:"model,omitempty"` + RunAsync *bool `json:"-" url:"run_async,omitempty"` + Model *PaymentRequest `json:"model,omitempty" url:"-"` } type PaymentsLineItemsRemoteFieldClassesListRequest struct { // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, will only return remote field classes with this is_common_model_field value - IsCommonModelField *bool `json:"-"` + IsCommonModelField *bool `json:"-" url:"is_common_model_field,omitempty"` + // If provided, will only return remote fields classes with this is_custom value + IsCustom *bool `json:"-" url:"is_custom,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` } type PaymentsListRequest struct { // If provided, will only return payments for this account. - AccountId *string `json:"-"` + AccountId *string `json:"-" url:"account_id,omitempty"` // If provided, will only return payments for this company. - CompanyId *string `json:"-"` + CompanyId *string `json:"-" url:"company_id,omitempty"` // If provided, will only return payments for this contact. - ContactId *string `json:"-"` + ContactId *string `json:"-" url:"contact_id,omitempty"` // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *PaymentsListRequestExpand `json:"-"` + Expand []*PaymentsListRequestExpandItem `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - IncludeRemoteFields *bool `json:"-"` + IncludeRemoteFields *bool `json:"-" url:"include_remote_fields,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` // If provided, will only return objects created after this datetime. - TransactionDateAfter *time.Time `json:"-"` + TransactionDateAfter *time.Time `json:"-" url:"transaction_date_after,omitempty"` // If provided, will only return objects created before this datetime. - TransactionDateBefore *time.Time `json:"-"` + TransactionDateBefore *time.Time `json:"-" url:"transaction_date_before,omitempty"` } type PatchedPaymentEndpointRequest struct { // Whether to include debug fields (such as log file links) in the response. - IsDebugMode *bool `json:"-"` + IsDebugMode *bool `json:"-" url:"is_debug_mode,omitempty"` // Whether or not third-party updates should be run asynchronously. - RunAsync *bool `json:"-"` - Model *PatchedPaymentRequest `json:"model,omitempty"` + RunAsync *bool `json:"-" url:"run_async,omitempty"` + Model *PatchedPaymentRequest `json:"model,omitempty" url:"-"` } type PaymentsRemoteFieldClassesListRequest struct { // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, will only return remote field classes with this is_common_model_field value - IsCommonModelField *bool `json:"-"` + IsCommonModelField *bool `json:"-" url:"is_common_model_field,omitempty"` + // If provided, will only return remote fields classes with this is_custom value + IsCustom *bool `json:"-" url:"is_custom,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` } type PaymentsRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *PaymentsRetrieveRequestExpand `json:"-"` + Expand []*PaymentsRetrieveRequestExpandItem `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - IncludeRemoteFields *bool `json:"-"` + IncludeRemoteFields *bool `json:"-" url:"include_remote_fields,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` } -type PaymentsListRequestExpand string +type PaymentsListRequestExpandItem string const ( - PaymentsListRequestExpandAccount PaymentsListRequestExpand = "account" - PaymentsListRequestExpandAccountAccountingPeriod PaymentsListRequestExpand = "account,accounting_period" - PaymentsListRequestExpandAccountCompany PaymentsListRequestExpand = "account,company" - PaymentsListRequestExpandAccountCompanyAccountingPeriod PaymentsListRequestExpand = "account,company,accounting_period" - PaymentsListRequestExpandAccountingPeriod PaymentsListRequestExpand = "accounting_period" - PaymentsListRequestExpandAppliedToLines PaymentsListRequestExpand = "applied_to_lines" - PaymentsListRequestExpandAppliedToLinesAccount PaymentsListRequestExpand = "applied_to_lines,account" - PaymentsListRequestExpandAppliedToLinesAccountAccountingPeriod PaymentsListRequestExpand = "applied_to_lines,account,accounting_period" - PaymentsListRequestExpandAppliedToLinesAccountCompany PaymentsListRequestExpand = "applied_to_lines,account,company" - PaymentsListRequestExpandAppliedToLinesAccountCompanyAccountingPeriod PaymentsListRequestExpand = "applied_to_lines,account,company,accounting_period" - PaymentsListRequestExpandAppliedToLinesAccountingPeriod PaymentsListRequestExpand = "applied_to_lines,accounting_period" - PaymentsListRequestExpandAppliedToLinesCompany PaymentsListRequestExpand = "applied_to_lines,company" - PaymentsListRequestExpandAppliedToLinesCompanyAccountingPeriod PaymentsListRequestExpand = "applied_to_lines,company,accounting_period" - PaymentsListRequestExpandAppliedToLinesContact PaymentsListRequestExpand = "applied_to_lines,contact" - PaymentsListRequestExpandAppliedToLinesContactAccount PaymentsListRequestExpand = "applied_to_lines,contact,account" - PaymentsListRequestExpandAppliedToLinesContactAccountAccountingPeriod PaymentsListRequestExpand = "applied_to_lines,contact,account,accounting_period" - PaymentsListRequestExpandAppliedToLinesContactAccountCompany PaymentsListRequestExpand = "applied_to_lines,contact,account,company" - PaymentsListRequestExpandAppliedToLinesContactAccountCompanyAccountingPeriod PaymentsListRequestExpand = "applied_to_lines,contact,account,company,accounting_period" - PaymentsListRequestExpandAppliedToLinesContactAccountingPeriod PaymentsListRequestExpand = "applied_to_lines,contact,accounting_period" - PaymentsListRequestExpandAppliedToLinesContactCompany PaymentsListRequestExpand = "applied_to_lines,contact,company" - PaymentsListRequestExpandAppliedToLinesContactCompanyAccountingPeriod PaymentsListRequestExpand = "applied_to_lines,contact,company,accounting_period" - PaymentsListRequestExpandCompany PaymentsListRequestExpand = "company" - PaymentsListRequestExpandCompanyAccountingPeriod PaymentsListRequestExpand = "company,accounting_period" - PaymentsListRequestExpandContact PaymentsListRequestExpand = "contact" - PaymentsListRequestExpandContactAccount PaymentsListRequestExpand = "contact,account" - PaymentsListRequestExpandContactAccountAccountingPeriod PaymentsListRequestExpand = "contact,account,accounting_period" - PaymentsListRequestExpandContactAccountCompany PaymentsListRequestExpand = "contact,account,company" - PaymentsListRequestExpandContactAccountCompanyAccountingPeriod PaymentsListRequestExpand = "contact,account,company,accounting_period" - PaymentsListRequestExpandContactAccountingPeriod PaymentsListRequestExpand = "contact,accounting_period" - PaymentsListRequestExpandContactCompany PaymentsListRequestExpand = "contact,company" - PaymentsListRequestExpandContactCompanyAccountingPeriod PaymentsListRequestExpand = "contact,company,accounting_period" - PaymentsListRequestExpandTrackingCategories PaymentsListRequestExpand = "tracking_categories" - PaymentsListRequestExpandTrackingCategoriesAccount PaymentsListRequestExpand = "tracking_categories,account" - PaymentsListRequestExpandTrackingCategoriesAccountAccountingPeriod PaymentsListRequestExpand = "tracking_categories,account,accounting_period" - PaymentsListRequestExpandTrackingCategoriesAccountCompany PaymentsListRequestExpand = "tracking_categories,account,company" - PaymentsListRequestExpandTrackingCategoriesAccountCompanyAccountingPeriod PaymentsListRequestExpand = "tracking_categories,account,company,accounting_period" - PaymentsListRequestExpandTrackingCategoriesAccountingPeriod PaymentsListRequestExpand = "tracking_categories,accounting_period" - PaymentsListRequestExpandTrackingCategoriesAppliedToLines PaymentsListRequestExpand = "tracking_categories,applied_to_lines" - PaymentsListRequestExpandTrackingCategoriesAppliedToLinesAccount PaymentsListRequestExpand = "tracking_categories,applied_to_lines,account" - PaymentsListRequestExpandTrackingCategoriesAppliedToLinesAccountAccountingPeriod PaymentsListRequestExpand = "tracking_categories,applied_to_lines,account,accounting_period" - PaymentsListRequestExpandTrackingCategoriesAppliedToLinesAccountCompany PaymentsListRequestExpand = "tracking_categories,applied_to_lines,account,company" - PaymentsListRequestExpandTrackingCategoriesAppliedToLinesAccountCompanyAccountingPeriod PaymentsListRequestExpand = "tracking_categories,applied_to_lines,account,company,accounting_period" - PaymentsListRequestExpandTrackingCategoriesAppliedToLinesAccountingPeriod PaymentsListRequestExpand = "tracking_categories,applied_to_lines,accounting_period" - PaymentsListRequestExpandTrackingCategoriesAppliedToLinesCompany PaymentsListRequestExpand = "tracking_categories,applied_to_lines,company" - PaymentsListRequestExpandTrackingCategoriesAppliedToLinesCompanyAccountingPeriod PaymentsListRequestExpand = "tracking_categories,applied_to_lines,company,accounting_period" - PaymentsListRequestExpandTrackingCategoriesAppliedToLinesContact PaymentsListRequestExpand = "tracking_categories,applied_to_lines,contact" - PaymentsListRequestExpandTrackingCategoriesAppliedToLinesContactAccount PaymentsListRequestExpand = "tracking_categories,applied_to_lines,contact,account" - PaymentsListRequestExpandTrackingCategoriesAppliedToLinesContactAccountAccountingPeriod PaymentsListRequestExpand = "tracking_categories,applied_to_lines,contact,account,accounting_period" - PaymentsListRequestExpandTrackingCategoriesAppliedToLinesContactAccountCompany PaymentsListRequestExpand = "tracking_categories,applied_to_lines,contact,account,company" - PaymentsListRequestExpandTrackingCategoriesAppliedToLinesContactAccountCompanyAccountingPeriod PaymentsListRequestExpand = "tracking_categories,applied_to_lines,contact,account,company,accounting_period" - PaymentsListRequestExpandTrackingCategoriesAppliedToLinesContactAccountingPeriod PaymentsListRequestExpand = "tracking_categories,applied_to_lines,contact,accounting_period" - PaymentsListRequestExpandTrackingCategoriesAppliedToLinesContactCompany PaymentsListRequestExpand = "tracking_categories,applied_to_lines,contact,company" - PaymentsListRequestExpandTrackingCategoriesAppliedToLinesContactCompanyAccountingPeriod PaymentsListRequestExpand = "tracking_categories,applied_to_lines,contact,company,accounting_period" - PaymentsListRequestExpandTrackingCategoriesCompany PaymentsListRequestExpand = "tracking_categories,company" - PaymentsListRequestExpandTrackingCategoriesCompanyAccountingPeriod PaymentsListRequestExpand = "tracking_categories,company,accounting_period" - PaymentsListRequestExpandTrackingCategoriesContact PaymentsListRequestExpand = "tracking_categories,contact" - PaymentsListRequestExpandTrackingCategoriesContactAccount PaymentsListRequestExpand = "tracking_categories,contact,account" - PaymentsListRequestExpandTrackingCategoriesContactAccountAccountingPeriod PaymentsListRequestExpand = "tracking_categories,contact,account,accounting_period" - PaymentsListRequestExpandTrackingCategoriesContactAccountCompany PaymentsListRequestExpand = "tracking_categories,contact,account,company" - PaymentsListRequestExpandTrackingCategoriesContactAccountCompanyAccountingPeriod PaymentsListRequestExpand = "tracking_categories,contact,account,company,accounting_period" - PaymentsListRequestExpandTrackingCategoriesContactAccountingPeriod PaymentsListRequestExpand = "tracking_categories,contact,accounting_period" - PaymentsListRequestExpandTrackingCategoriesContactCompany PaymentsListRequestExpand = "tracking_categories,contact,company" - PaymentsListRequestExpandTrackingCategoriesContactCompanyAccountingPeriod PaymentsListRequestExpand = "tracking_categories,contact,company,accounting_period" + PaymentsListRequestExpandItemAccount PaymentsListRequestExpandItem = "account" + PaymentsListRequestExpandItemAccountingPeriod PaymentsListRequestExpandItem = "accounting_period" + PaymentsListRequestExpandItemAppliedToLines PaymentsListRequestExpandItem = "applied_to_lines" + PaymentsListRequestExpandItemCompany PaymentsListRequestExpandItem = "company" + PaymentsListRequestExpandItemContact PaymentsListRequestExpandItem = "contact" + PaymentsListRequestExpandItemPaymentMethod PaymentsListRequestExpandItem = "payment_method" + PaymentsListRequestExpandItemTrackingCategories PaymentsListRequestExpandItem = "tracking_categories" ) -func NewPaymentsListRequestExpandFromString(s string) (PaymentsListRequestExpand, error) { +func NewPaymentsListRequestExpandItemFromString(s string) (PaymentsListRequestExpandItem, error) { switch s { case "account": - return PaymentsListRequestExpandAccount, nil - case "account,accounting_period": - return PaymentsListRequestExpandAccountAccountingPeriod, nil - case "account,company": - return PaymentsListRequestExpandAccountCompany, nil - case "account,company,accounting_period": - return PaymentsListRequestExpandAccountCompanyAccountingPeriod, nil + return PaymentsListRequestExpandItemAccount, nil case "accounting_period": - return PaymentsListRequestExpandAccountingPeriod, nil + return PaymentsListRequestExpandItemAccountingPeriod, nil case "applied_to_lines": - return PaymentsListRequestExpandAppliedToLines, nil - case "applied_to_lines,account": - return PaymentsListRequestExpandAppliedToLinesAccount, nil - case "applied_to_lines,account,accounting_period": - return PaymentsListRequestExpandAppliedToLinesAccountAccountingPeriod, nil - case "applied_to_lines,account,company": - return PaymentsListRequestExpandAppliedToLinesAccountCompany, nil - case "applied_to_lines,account,company,accounting_period": - return PaymentsListRequestExpandAppliedToLinesAccountCompanyAccountingPeriod, nil - case "applied_to_lines,accounting_period": - return PaymentsListRequestExpandAppliedToLinesAccountingPeriod, nil - case "applied_to_lines,company": - return PaymentsListRequestExpandAppliedToLinesCompany, nil - case "applied_to_lines,company,accounting_period": - return PaymentsListRequestExpandAppliedToLinesCompanyAccountingPeriod, nil - case "applied_to_lines,contact": - return PaymentsListRequestExpandAppliedToLinesContact, nil - case "applied_to_lines,contact,account": - return PaymentsListRequestExpandAppliedToLinesContactAccount, nil - case "applied_to_lines,contact,account,accounting_period": - return PaymentsListRequestExpandAppliedToLinesContactAccountAccountingPeriod, nil - case "applied_to_lines,contact,account,company": - return PaymentsListRequestExpandAppliedToLinesContactAccountCompany, nil - case "applied_to_lines,contact,account,company,accounting_period": - return PaymentsListRequestExpandAppliedToLinesContactAccountCompanyAccountingPeriod, nil - case "applied_to_lines,contact,accounting_period": - return PaymentsListRequestExpandAppliedToLinesContactAccountingPeriod, nil - case "applied_to_lines,contact,company": - return PaymentsListRequestExpandAppliedToLinesContactCompany, nil - case "applied_to_lines,contact,company,accounting_period": - return PaymentsListRequestExpandAppliedToLinesContactCompanyAccountingPeriod, nil + return PaymentsListRequestExpandItemAppliedToLines, nil case "company": - return PaymentsListRequestExpandCompany, nil - case "company,accounting_period": - return PaymentsListRequestExpandCompanyAccountingPeriod, nil + return PaymentsListRequestExpandItemCompany, nil case "contact": - return PaymentsListRequestExpandContact, nil - case "contact,account": - return PaymentsListRequestExpandContactAccount, nil - case "contact,account,accounting_period": - return PaymentsListRequestExpandContactAccountAccountingPeriod, nil - case "contact,account,company": - return PaymentsListRequestExpandContactAccountCompany, nil - case "contact,account,company,accounting_period": - return PaymentsListRequestExpandContactAccountCompanyAccountingPeriod, nil - case "contact,accounting_period": - return PaymentsListRequestExpandContactAccountingPeriod, nil - case "contact,company": - return PaymentsListRequestExpandContactCompany, nil - case "contact,company,accounting_period": - return PaymentsListRequestExpandContactCompanyAccountingPeriod, nil + return PaymentsListRequestExpandItemContact, nil + case "payment_method": + return PaymentsListRequestExpandItemPaymentMethod, nil case "tracking_categories": - return PaymentsListRequestExpandTrackingCategories, nil - case "tracking_categories,account": - return PaymentsListRequestExpandTrackingCategoriesAccount, nil - case "tracking_categories,account,accounting_period": - return PaymentsListRequestExpandTrackingCategoriesAccountAccountingPeriod, nil - case "tracking_categories,account,company": - return PaymentsListRequestExpandTrackingCategoriesAccountCompany, nil - case "tracking_categories,account,company,accounting_period": - return PaymentsListRequestExpandTrackingCategoriesAccountCompanyAccountingPeriod, nil - case "tracking_categories,accounting_period": - return PaymentsListRequestExpandTrackingCategoriesAccountingPeriod, nil - case "tracking_categories,applied_to_lines": - return PaymentsListRequestExpandTrackingCategoriesAppliedToLines, nil - case "tracking_categories,applied_to_lines,account": - return PaymentsListRequestExpandTrackingCategoriesAppliedToLinesAccount, nil - case "tracking_categories,applied_to_lines,account,accounting_period": - return PaymentsListRequestExpandTrackingCategoriesAppliedToLinesAccountAccountingPeriod, nil - case "tracking_categories,applied_to_lines,account,company": - return PaymentsListRequestExpandTrackingCategoriesAppliedToLinesAccountCompany, nil - case "tracking_categories,applied_to_lines,account,company,accounting_period": - return PaymentsListRequestExpandTrackingCategoriesAppliedToLinesAccountCompanyAccountingPeriod, nil - case "tracking_categories,applied_to_lines,accounting_period": - return PaymentsListRequestExpandTrackingCategoriesAppliedToLinesAccountingPeriod, nil - case "tracking_categories,applied_to_lines,company": - return PaymentsListRequestExpandTrackingCategoriesAppliedToLinesCompany, nil - case "tracking_categories,applied_to_lines,company,accounting_period": - return PaymentsListRequestExpandTrackingCategoriesAppliedToLinesCompanyAccountingPeriod, nil - case "tracking_categories,applied_to_lines,contact": - return PaymentsListRequestExpandTrackingCategoriesAppliedToLinesContact, nil - case "tracking_categories,applied_to_lines,contact,account": - return PaymentsListRequestExpandTrackingCategoriesAppliedToLinesContactAccount, nil - case "tracking_categories,applied_to_lines,contact,account,accounting_period": - return PaymentsListRequestExpandTrackingCategoriesAppliedToLinesContactAccountAccountingPeriod, nil - case "tracking_categories,applied_to_lines,contact,account,company": - return PaymentsListRequestExpandTrackingCategoriesAppliedToLinesContactAccountCompany, nil - case "tracking_categories,applied_to_lines,contact,account,company,accounting_period": - return PaymentsListRequestExpandTrackingCategoriesAppliedToLinesContactAccountCompanyAccountingPeriod, nil - case "tracking_categories,applied_to_lines,contact,accounting_period": - return PaymentsListRequestExpandTrackingCategoriesAppliedToLinesContactAccountingPeriod, nil - case "tracking_categories,applied_to_lines,contact,company": - return PaymentsListRequestExpandTrackingCategoriesAppliedToLinesContactCompany, nil - case "tracking_categories,applied_to_lines,contact,company,accounting_period": - return PaymentsListRequestExpandTrackingCategoriesAppliedToLinesContactCompanyAccountingPeriod, nil - case "tracking_categories,company": - return PaymentsListRequestExpandTrackingCategoriesCompany, nil - case "tracking_categories,company,accounting_period": - return PaymentsListRequestExpandTrackingCategoriesCompanyAccountingPeriod, nil - case "tracking_categories,contact": - return PaymentsListRequestExpandTrackingCategoriesContact, nil - case "tracking_categories,contact,account": - return PaymentsListRequestExpandTrackingCategoriesContactAccount, nil - case "tracking_categories,contact,account,accounting_period": - return PaymentsListRequestExpandTrackingCategoriesContactAccountAccountingPeriod, nil - case "tracking_categories,contact,account,company": - return PaymentsListRequestExpandTrackingCategoriesContactAccountCompany, nil - case "tracking_categories,contact,account,company,accounting_period": - return PaymentsListRequestExpandTrackingCategoriesContactAccountCompanyAccountingPeriod, nil - case "tracking_categories,contact,accounting_period": - return PaymentsListRequestExpandTrackingCategoriesContactAccountingPeriod, nil - case "tracking_categories,contact,company": - return PaymentsListRequestExpandTrackingCategoriesContactCompany, nil - case "tracking_categories,contact,company,accounting_period": - return PaymentsListRequestExpandTrackingCategoriesContactCompanyAccountingPeriod, nil - } - var t PaymentsListRequestExpand + return PaymentsListRequestExpandItemTrackingCategories, nil + } + var t PaymentsListRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (p PaymentsListRequestExpand) Ptr() *PaymentsListRequestExpand { +func (p PaymentsListRequestExpandItem) Ptr() *PaymentsListRequestExpandItem { return &p } -type PaymentsRetrieveRequestExpand string +type PaymentsRetrieveRequestExpandItem string const ( - PaymentsRetrieveRequestExpandAccount PaymentsRetrieveRequestExpand = "account" - PaymentsRetrieveRequestExpandAccountAccountingPeriod PaymentsRetrieveRequestExpand = "account,accounting_period" - PaymentsRetrieveRequestExpandAccountCompany PaymentsRetrieveRequestExpand = "account,company" - PaymentsRetrieveRequestExpandAccountCompanyAccountingPeriod PaymentsRetrieveRequestExpand = "account,company,accounting_period" - PaymentsRetrieveRequestExpandAccountingPeriod PaymentsRetrieveRequestExpand = "accounting_period" - PaymentsRetrieveRequestExpandAppliedToLines PaymentsRetrieveRequestExpand = "applied_to_lines" - PaymentsRetrieveRequestExpandAppliedToLinesAccount PaymentsRetrieveRequestExpand = "applied_to_lines,account" - PaymentsRetrieveRequestExpandAppliedToLinesAccountAccountingPeriod PaymentsRetrieveRequestExpand = "applied_to_lines,account,accounting_period" - PaymentsRetrieveRequestExpandAppliedToLinesAccountCompany PaymentsRetrieveRequestExpand = "applied_to_lines,account,company" - PaymentsRetrieveRequestExpandAppliedToLinesAccountCompanyAccountingPeriod PaymentsRetrieveRequestExpand = "applied_to_lines,account,company,accounting_period" - PaymentsRetrieveRequestExpandAppliedToLinesAccountingPeriod PaymentsRetrieveRequestExpand = "applied_to_lines,accounting_period" - PaymentsRetrieveRequestExpandAppliedToLinesCompany PaymentsRetrieveRequestExpand = "applied_to_lines,company" - PaymentsRetrieveRequestExpandAppliedToLinesCompanyAccountingPeriod PaymentsRetrieveRequestExpand = "applied_to_lines,company,accounting_period" - PaymentsRetrieveRequestExpandAppliedToLinesContact PaymentsRetrieveRequestExpand = "applied_to_lines,contact" - PaymentsRetrieveRequestExpandAppliedToLinesContactAccount PaymentsRetrieveRequestExpand = "applied_to_lines,contact,account" - PaymentsRetrieveRequestExpandAppliedToLinesContactAccountAccountingPeriod PaymentsRetrieveRequestExpand = "applied_to_lines,contact,account,accounting_period" - PaymentsRetrieveRequestExpandAppliedToLinesContactAccountCompany PaymentsRetrieveRequestExpand = "applied_to_lines,contact,account,company" - PaymentsRetrieveRequestExpandAppliedToLinesContactAccountCompanyAccountingPeriod PaymentsRetrieveRequestExpand = "applied_to_lines,contact,account,company,accounting_period" - PaymentsRetrieveRequestExpandAppliedToLinesContactAccountingPeriod PaymentsRetrieveRequestExpand = "applied_to_lines,contact,accounting_period" - PaymentsRetrieveRequestExpandAppliedToLinesContactCompany PaymentsRetrieveRequestExpand = "applied_to_lines,contact,company" - PaymentsRetrieveRequestExpandAppliedToLinesContactCompanyAccountingPeriod PaymentsRetrieveRequestExpand = "applied_to_lines,contact,company,accounting_period" - PaymentsRetrieveRequestExpandCompany PaymentsRetrieveRequestExpand = "company" - PaymentsRetrieveRequestExpandCompanyAccountingPeriod PaymentsRetrieveRequestExpand = "company,accounting_period" - PaymentsRetrieveRequestExpandContact PaymentsRetrieveRequestExpand = "contact" - PaymentsRetrieveRequestExpandContactAccount PaymentsRetrieveRequestExpand = "contact,account" - PaymentsRetrieveRequestExpandContactAccountAccountingPeriod PaymentsRetrieveRequestExpand = "contact,account,accounting_period" - PaymentsRetrieveRequestExpandContactAccountCompany PaymentsRetrieveRequestExpand = "contact,account,company" - PaymentsRetrieveRequestExpandContactAccountCompanyAccountingPeriod PaymentsRetrieveRequestExpand = "contact,account,company,accounting_period" - PaymentsRetrieveRequestExpandContactAccountingPeriod PaymentsRetrieveRequestExpand = "contact,accounting_period" - PaymentsRetrieveRequestExpandContactCompany PaymentsRetrieveRequestExpand = "contact,company" - PaymentsRetrieveRequestExpandContactCompanyAccountingPeriod PaymentsRetrieveRequestExpand = "contact,company,accounting_period" - PaymentsRetrieveRequestExpandTrackingCategories PaymentsRetrieveRequestExpand = "tracking_categories" - PaymentsRetrieveRequestExpandTrackingCategoriesAccount PaymentsRetrieveRequestExpand = "tracking_categories,account" - PaymentsRetrieveRequestExpandTrackingCategoriesAccountAccountingPeriod PaymentsRetrieveRequestExpand = "tracking_categories,account,accounting_period" - PaymentsRetrieveRequestExpandTrackingCategoriesAccountCompany PaymentsRetrieveRequestExpand = "tracking_categories,account,company" - PaymentsRetrieveRequestExpandTrackingCategoriesAccountCompanyAccountingPeriod PaymentsRetrieveRequestExpand = "tracking_categories,account,company,accounting_period" - PaymentsRetrieveRequestExpandTrackingCategoriesAccountingPeriod PaymentsRetrieveRequestExpand = "tracking_categories,accounting_period" - PaymentsRetrieveRequestExpandTrackingCategoriesAppliedToLines PaymentsRetrieveRequestExpand = "tracking_categories,applied_to_lines" - PaymentsRetrieveRequestExpandTrackingCategoriesAppliedToLinesAccount PaymentsRetrieveRequestExpand = "tracking_categories,applied_to_lines,account" - PaymentsRetrieveRequestExpandTrackingCategoriesAppliedToLinesAccountAccountingPeriod PaymentsRetrieveRequestExpand = "tracking_categories,applied_to_lines,account,accounting_period" - PaymentsRetrieveRequestExpandTrackingCategoriesAppliedToLinesAccountCompany PaymentsRetrieveRequestExpand = "tracking_categories,applied_to_lines,account,company" - PaymentsRetrieveRequestExpandTrackingCategoriesAppliedToLinesAccountCompanyAccountingPeriod PaymentsRetrieveRequestExpand = "tracking_categories,applied_to_lines,account,company,accounting_period" - PaymentsRetrieveRequestExpandTrackingCategoriesAppliedToLinesAccountingPeriod PaymentsRetrieveRequestExpand = "tracking_categories,applied_to_lines,accounting_period" - PaymentsRetrieveRequestExpandTrackingCategoriesAppliedToLinesCompany PaymentsRetrieveRequestExpand = "tracking_categories,applied_to_lines,company" - PaymentsRetrieveRequestExpandTrackingCategoriesAppliedToLinesCompanyAccountingPeriod PaymentsRetrieveRequestExpand = "tracking_categories,applied_to_lines,company,accounting_period" - PaymentsRetrieveRequestExpandTrackingCategoriesAppliedToLinesContact PaymentsRetrieveRequestExpand = "tracking_categories,applied_to_lines,contact" - PaymentsRetrieveRequestExpandTrackingCategoriesAppliedToLinesContactAccount PaymentsRetrieveRequestExpand = "tracking_categories,applied_to_lines,contact,account" - PaymentsRetrieveRequestExpandTrackingCategoriesAppliedToLinesContactAccountAccountingPeriod PaymentsRetrieveRequestExpand = "tracking_categories,applied_to_lines,contact,account,accounting_period" - PaymentsRetrieveRequestExpandTrackingCategoriesAppliedToLinesContactAccountCompany PaymentsRetrieveRequestExpand = "tracking_categories,applied_to_lines,contact,account,company" - PaymentsRetrieveRequestExpandTrackingCategoriesAppliedToLinesContactAccountCompanyAccountingPeriod PaymentsRetrieveRequestExpand = "tracking_categories,applied_to_lines,contact,account,company,accounting_period" - PaymentsRetrieveRequestExpandTrackingCategoriesAppliedToLinesContactAccountingPeriod PaymentsRetrieveRequestExpand = "tracking_categories,applied_to_lines,contact,accounting_period" - PaymentsRetrieveRequestExpandTrackingCategoriesAppliedToLinesContactCompany PaymentsRetrieveRequestExpand = "tracking_categories,applied_to_lines,contact,company" - PaymentsRetrieveRequestExpandTrackingCategoriesAppliedToLinesContactCompanyAccountingPeriod PaymentsRetrieveRequestExpand = "tracking_categories,applied_to_lines,contact,company,accounting_period" - PaymentsRetrieveRequestExpandTrackingCategoriesCompany PaymentsRetrieveRequestExpand = "tracking_categories,company" - PaymentsRetrieveRequestExpandTrackingCategoriesCompanyAccountingPeriod PaymentsRetrieveRequestExpand = "tracking_categories,company,accounting_period" - PaymentsRetrieveRequestExpandTrackingCategoriesContact PaymentsRetrieveRequestExpand = "tracking_categories,contact" - PaymentsRetrieveRequestExpandTrackingCategoriesContactAccount PaymentsRetrieveRequestExpand = "tracking_categories,contact,account" - PaymentsRetrieveRequestExpandTrackingCategoriesContactAccountAccountingPeriod PaymentsRetrieveRequestExpand = "tracking_categories,contact,account,accounting_period" - PaymentsRetrieveRequestExpandTrackingCategoriesContactAccountCompany PaymentsRetrieveRequestExpand = "tracking_categories,contact,account,company" - PaymentsRetrieveRequestExpandTrackingCategoriesContactAccountCompanyAccountingPeriod PaymentsRetrieveRequestExpand = "tracking_categories,contact,account,company,accounting_period" - PaymentsRetrieveRequestExpandTrackingCategoriesContactAccountingPeriod PaymentsRetrieveRequestExpand = "tracking_categories,contact,accounting_period" - PaymentsRetrieveRequestExpandTrackingCategoriesContactCompany PaymentsRetrieveRequestExpand = "tracking_categories,contact,company" - PaymentsRetrieveRequestExpandTrackingCategoriesContactCompanyAccountingPeriod PaymentsRetrieveRequestExpand = "tracking_categories,contact,company,accounting_period" + PaymentsRetrieveRequestExpandItemAccount PaymentsRetrieveRequestExpandItem = "account" + PaymentsRetrieveRequestExpandItemAccountingPeriod PaymentsRetrieveRequestExpandItem = "accounting_period" + PaymentsRetrieveRequestExpandItemAppliedToLines PaymentsRetrieveRequestExpandItem = "applied_to_lines" + PaymentsRetrieveRequestExpandItemCompany PaymentsRetrieveRequestExpandItem = "company" + PaymentsRetrieveRequestExpandItemContact PaymentsRetrieveRequestExpandItem = "contact" + PaymentsRetrieveRequestExpandItemPaymentMethod PaymentsRetrieveRequestExpandItem = "payment_method" + PaymentsRetrieveRequestExpandItemTrackingCategories PaymentsRetrieveRequestExpandItem = "tracking_categories" ) -func NewPaymentsRetrieveRequestExpandFromString(s string) (PaymentsRetrieveRequestExpand, error) { +func NewPaymentsRetrieveRequestExpandItemFromString(s string) (PaymentsRetrieveRequestExpandItem, error) { switch s { case "account": - return PaymentsRetrieveRequestExpandAccount, nil - case "account,accounting_period": - return PaymentsRetrieveRequestExpandAccountAccountingPeriod, nil - case "account,company": - return PaymentsRetrieveRequestExpandAccountCompany, nil - case "account,company,accounting_period": - return PaymentsRetrieveRequestExpandAccountCompanyAccountingPeriod, nil + return PaymentsRetrieveRequestExpandItemAccount, nil case "accounting_period": - return PaymentsRetrieveRequestExpandAccountingPeriod, nil + return PaymentsRetrieveRequestExpandItemAccountingPeriod, nil case "applied_to_lines": - return PaymentsRetrieveRequestExpandAppliedToLines, nil - case "applied_to_lines,account": - return PaymentsRetrieveRequestExpandAppliedToLinesAccount, nil - case "applied_to_lines,account,accounting_period": - return PaymentsRetrieveRequestExpandAppliedToLinesAccountAccountingPeriod, nil - case "applied_to_lines,account,company": - return PaymentsRetrieveRequestExpandAppliedToLinesAccountCompany, nil - case "applied_to_lines,account,company,accounting_period": - return PaymentsRetrieveRequestExpandAppliedToLinesAccountCompanyAccountingPeriod, nil - case "applied_to_lines,accounting_period": - return PaymentsRetrieveRequestExpandAppliedToLinesAccountingPeriod, nil - case "applied_to_lines,company": - return PaymentsRetrieveRequestExpandAppliedToLinesCompany, nil - case "applied_to_lines,company,accounting_period": - return PaymentsRetrieveRequestExpandAppliedToLinesCompanyAccountingPeriod, nil - case "applied_to_lines,contact": - return PaymentsRetrieveRequestExpandAppliedToLinesContact, nil - case "applied_to_lines,contact,account": - return PaymentsRetrieveRequestExpandAppliedToLinesContactAccount, nil - case "applied_to_lines,contact,account,accounting_period": - return PaymentsRetrieveRequestExpandAppliedToLinesContactAccountAccountingPeriod, nil - case "applied_to_lines,contact,account,company": - return PaymentsRetrieveRequestExpandAppliedToLinesContactAccountCompany, nil - case "applied_to_lines,contact,account,company,accounting_period": - return PaymentsRetrieveRequestExpandAppliedToLinesContactAccountCompanyAccountingPeriod, nil - case "applied_to_lines,contact,accounting_period": - return PaymentsRetrieveRequestExpandAppliedToLinesContactAccountingPeriod, nil - case "applied_to_lines,contact,company": - return PaymentsRetrieveRequestExpandAppliedToLinesContactCompany, nil - case "applied_to_lines,contact,company,accounting_period": - return PaymentsRetrieveRequestExpandAppliedToLinesContactCompanyAccountingPeriod, nil + return PaymentsRetrieveRequestExpandItemAppliedToLines, nil case "company": - return PaymentsRetrieveRequestExpandCompany, nil - case "company,accounting_period": - return PaymentsRetrieveRequestExpandCompanyAccountingPeriod, nil + return PaymentsRetrieveRequestExpandItemCompany, nil case "contact": - return PaymentsRetrieveRequestExpandContact, nil - case "contact,account": - return PaymentsRetrieveRequestExpandContactAccount, nil - case "contact,account,accounting_period": - return PaymentsRetrieveRequestExpandContactAccountAccountingPeriod, nil - case "contact,account,company": - return PaymentsRetrieveRequestExpandContactAccountCompany, nil - case "contact,account,company,accounting_period": - return PaymentsRetrieveRequestExpandContactAccountCompanyAccountingPeriod, nil - case "contact,accounting_period": - return PaymentsRetrieveRequestExpandContactAccountingPeriod, nil - case "contact,company": - return PaymentsRetrieveRequestExpandContactCompany, nil - case "contact,company,accounting_period": - return PaymentsRetrieveRequestExpandContactCompanyAccountingPeriod, nil + return PaymentsRetrieveRequestExpandItemContact, nil + case "payment_method": + return PaymentsRetrieveRequestExpandItemPaymentMethod, nil case "tracking_categories": - return PaymentsRetrieveRequestExpandTrackingCategories, nil - case "tracking_categories,account": - return PaymentsRetrieveRequestExpandTrackingCategoriesAccount, nil - case "tracking_categories,account,accounting_period": - return PaymentsRetrieveRequestExpandTrackingCategoriesAccountAccountingPeriod, nil - case "tracking_categories,account,company": - return PaymentsRetrieveRequestExpandTrackingCategoriesAccountCompany, nil - case "tracking_categories,account,company,accounting_period": - return PaymentsRetrieveRequestExpandTrackingCategoriesAccountCompanyAccountingPeriod, nil - case "tracking_categories,accounting_period": - return PaymentsRetrieveRequestExpandTrackingCategoriesAccountingPeriod, nil - case "tracking_categories,applied_to_lines": - return PaymentsRetrieveRequestExpandTrackingCategoriesAppliedToLines, nil - case "tracking_categories,applied_to_lines,account": - return PaymentsRetrieveRequestExpandTrackingCategoriesAppliedToLinesAccount, nil - case "tracking_categories,applied_to_lines,account,accounting_period": - return PaymentsRetrieveRequestExpandTrackingCategoriesAppliedToLinesAccountAccountingPeriod, nil - case "tracking_categories,applied_to_lines,account,company": - return PaymentsRetrieveRequestExpandTrackingCategoriesAppliedToLinesAccountCompany, nil - case "tracking_categories,applied_to_lines,account,company,accounting_period": - return PaymentsRetrieveRequestExpandTrackingCategoriesAppliedToLinesAccountCompanyAccountingPeriod, nil - case "tracking_categories,applied_to_lines,accounting_period": - return PaymentsRetrieveRequestExpandTrackingCategoriesAppliedToLinesAccountingPeriod, nil - case "tracking_categories,applied_to_lines,company": - return PaymentsRetrieveRequestExpandTrackingCategoriesAppliedToLinesCompany, nil - case "tracking_categories,applied_to_lines,company,accounting_period": - return PaymentsRetrieveRequestExpandTrackingCategoriesAppliedToLinesCompanyAccountingPeriod, nil - case "tracking_categories,applied_to_lines,contact": - return PaymentsRetrieveRequestExpandTrackingCategoriesAppliedToLinesContact, nil - case "tracking_categories,applied_to_lines,contact,account": - return PaymentsRetrieveRequestExpandTrackingCategoriesAppliedToLinesContactAccount, nil - case "tracking_categories,applied_to_lines,contact,account,accounting_period": - return PaymentsRetrieveRequestExpandTrackingCategoriesAppliedToLinesContactAccountAccountingPeriod, nil - case "tracking_categories,applied_to_lines,contact,account,company": - return PaymentsRetrieveRequestExpandTrackingCategoriesAppliedToLinesContactAccountCompany, nil - case "tracking_categories,applied_to_lines,contact,account,company,accounting_period": - return PaymentsRetrieveRequestExpandTrackingCategoriesAppliedToLinesContactAccountCompanyAccountingPeriod, nil - case "tracking_categories,applied_to_lines,contact,accounting_period": - return PaymentsRetrieveRequestExpandTrackingCategoriesAppliedToLinesContactAccountingPeriod, nil - case "tracking_categories,applied_to_lines,contact,company": - return PaymentsRetrieveRequestExpandTrackingCategoriesAppliedToLinesContactCompany, nil - case "tracking_categories,applied_to_lines,contact,company,accounting_period": - return PaymentsRetrieveRequestExpandTrackingCategoriesAppliedToLinesContactCompanyAccountingPeriod, nil - case "tracking_categories,company": - return PaymentsRetrieveRequestExpandTrackingCategoriesCompany, nil - case "tracking_categories,company,accounting_period": - return PaymentsRetrieveRequestExpandTrackingCategoriesCompanyAccountingPeriod, nil - case "tracking_categories,contact": - return PaymentsRetrieveRequestExpandTrackingCategoriesContact, nil - case "tracking_categories,contact,account": - return PaymentsRetrieveRequestExpandTrackingCategoriesContactAccount, nil - case "tracking_categories,contact,account,accounting_period": - return PaymentsRetrieveRequestExpandTrackingCategoriesContactAccountAccountingPeriod, nil - case "tracking_categories,contact,account,company": - return PaymentsRetrieveRequestExpandTrackingCategoriesContactAccountCompany, nil - case "tracking_categories,contact,account,company,accounting_period": - return PaymentsRetrieveRequestExpandTrackingCategoriesContactAccountCompanyAccountingPeriod, nil - case "tracking_categories,contact,accounting_period": - return PaymentsRetrieveRequestExpandTrackingCategoriesContactAccountingPeriod, nil - case "tracking_categories,contact,company": - return PaymentsRetrieveRequestExpandTrackingCategoriesContactCompany, nil - case "tracking_categories,contact,company,accounting_period": - return PaymentsRetrieveRequestExpandTrackingCategoriesContactCompanyAccountingPeriod, nil - } - var t PaymentsRetrieveRequestExpand + return PaymentsRetrieveRequestExpandItemTrackingCategories, nil + } + var t PaymentsRetrieveRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (p PaymentsRetrieveRequestExpand) Ptr() *PaymentsRetrieveRequestExpand { +func (p PaymentsRetrieveRequestExpandItem) Ptr() *PaymentsRetrieveRequestExpandItem { return &p } + +type PaginatedPaymentList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Payment `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedPaymentList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedPaymentList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedPaymentList) GetResults() []*Payment { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedPaymentList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedPaymentList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedPaymentList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedPaymentList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedPaymentList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +// # 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. +type PatchedPaymentRequest struct { + // The payment's transaction date. + TransactionDate *time.Time `json:"transaction_date,omitempty" url:"transaction_date,omitempty"` + // The supplier, or customer involved in the payment. + Contact *PatchedPaymentRequestContact `json:"contact,omitempty" url:"contact,omitempty"` + // The supplier’s or customer’s account in which the payment is made. + Account *PatchedPaymentRequestAccount `json:"account,omitempty" url:"account,omitempty"` + // The method which this payment was made by. + PaymentMethod *PatchedPaymentRequestPaymentMethod `json:"payment_method,omitempty" url:"payment_method,omitempty"` + // The payment's currency. + // + // * `XUA` - ADB Unit of Account + // * `AFN` - Afghan Afghani + // * `AFA` - Afghan Afghani (1927–2002) + // * `ALL` - Albanian Lek + // * `ALK` - Albanian Lek (1946–1965) + // * `DZD` - Algerian Dinar + // * `ADP` - Andorran Peseta + // * `AOA` - Angolan Kwanza + // * `AOK` - Angolan Kwanza (1977–1991) + // * `AON` - Angolan New Kwanza (1990–2000) + // * `AOR` - Angolan Readjusted Kwanza (1995–1999) + // * `ARA` - Argentine Austral + // * `ARS` - Argentine Peso + // * `ARM` - Argentine Peso (1881–1970) + // * `ARP` - Argentine Peso (1983–1985) + // * `ARL` - Argentine Peso Ley (1970–1983) + // * `AMD` - Armenian Dram + // * `AWG` - Aruban Florin + // * `AUD` - Australian Dollar + // * `ATS` - Austrian Schilling + // * `AZN` - Azerbaijani Manat + // * `AZM` - Azerbaijani Manat (1993–2006) + // * `BSD` - Bahamian Dollar + // * `BHD` - Bahraini Dinar + // * `BDT` - Bangladeshi Taka + // * `BBD` - Barbadian Dollar + // * `BYN` - Belarusian Ruble + // * `BYB` - Belarusian Ruble (1994–1999) + // * `BYR` - Belarusian Ruble (2000–2016) + // * `BEF` - Belgian Franc + // * `BEC` - Belgian Franc (convertible) + // * `BEL` - Belgian Franc (financial) + // * `BZD` - Belize Dollar + // * `BMD` - Bermudan Dollar + // * `BTN` - Bhutanese Ngultrum + // * `BOB` - Bolivian Boliviano + // * `BOL` - Bolivian Boliviano (1863–1963) + // * `BOV` - Bolivian Mvdol + // * `BOP` - Bolivian Peso + // * `BAM` - Bosnia-Herzegovina Convertible Mark + // * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + // * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + // * `BWP` - Botswanan Pula + // * `BRC` - Brazilian Cruzado (1986–1989) + // * `BRZ` - Brazilian Cruzeiro (1942–1967) + // * `BRE` - Brazilian Cruzeiro (1990–1993) + // * `BRR` - Brazilian Cruzeiro (1993–1994) + // * `BRN` - Brazilian New Cruzado (1989–1990) + // * `BRB` - Brazilian New Cruzeiro (1967–1986) + // * `BRL` - Brazilian Real + // * `GBP` - British Pound + // * `BND` - Brunei Dollar + // * `BGL` - Bulgarian Hard Lev + // * `BGN` - Bulgarian Lev + // * `BGO` - Bulgarian Lev (1879–1952) + // * `BGM` - Bulgarian Socialist Lev + // * `BUK` - Burmese Kyat + // * `BIF` - Burundian Franc + // * `XPF` - CFP Franc + // * `KHR` - Cambodian Riel + // * `CAD` - Canadian Dollar + // * `CVE` - Cape Verdean Escudo + // * `KYD` - Cayman Islands Dollar + // * `XAF` - Central African CFA Franc + // * `CLE` - Chilean Escudo + // * `CLP` - Chilean Peso + // * `CLF` - Chilean Unit of Account (UF) + // * `CNX` - Chinese People’s Bank Dollar + // * `CNY` - Chinese Yuan + // * `CNH` - Chinese Yuan (offshore) + // * `COP` - Colombian Peso + // * `COU` - Colombian Real Value Unit + // * `KMF` - Comorian Franc + // * `CDF` - Congolese Franc + // * `CRC` - Costa Rican Colón + // * `HRD` - Croatian Dinar + // * `HRK` - Croatian Kuna + // * `CUC` - Cuban Convertible Peso + // * `CUP` - Cuban Peso + // * `CYP` - Cypriot Pound + // * `CZK` - Czech Koruna + // * `CSK` - Czechoslovak Hard Koruna + // * `DKK` - Danish Krone + // * `DJF` - Djiboutian Franc + // * `DOP` - Dominican Peso + // * `NLG` - Dutch Guilder + // * `XCD` - East Caribbean Dollar + // * `DDM` - East German Mark + // * `ECS` - Ecuadorian Sucre + // * `ECV` - Ecuadorian Unit of Constant Value + // * `EGP` - Egyptian Pound + // * `GQE` - Equatorial Guinean Ekwele + // * `ERN` - Eritrean Nakfa + // * `EEK` - Estonian Kroon + // * `ETB` - Ethiopian Birr + // * `EUR` - Euro + // * `XBA` - European Composite Unit + // * `XEU` - European Currency Unit + // * `XBB` - European Monetary Unit + // * `XBC` - European Unit of Account (XBC) + // * `XBD` - European Unit of Account (XBD) + // * `FKP` - Falkland Islands Pound + // * `FJD` - Fijian Dollar + // * `FIM` - Finnish Markka + // * `FRF` - French Franc + // * `XFO` - French Gold Franc + // * `XFU` - French UIC-Franc + // * `GMD` - Gambian Dalasi + // * `GEK` - Georgian Kupon Larit + // * `GEL` - Georgian Lari + // * `DEM` - German Mark + // * `GHS` - Ghanaian Cedi + // * `GHC` - Ghanaian Cedi (1979–2007) + // * `GIP` - Gibraltar Pound + // * `XAU` - Gold + // * `GRD` - Greek Drachma + // * `GTQ` - Guatemalan Quetzal + // * `GWP` - Guinea-Bissau Peso + // * `GNF` - Guinean Franc + // * `GNS` - Guinean Syli + // * `GYD` - Guyanaese Dollar + // * `HTG` - Haitian Gourde + // * `HNL` - Honduran Lempira + // * `HKD` - Hong Kong Dollar + // * `HUF` - Hungarian Forint + // * `IMP` - IMP + // * `ISK` - Icelandic Króna + // * `ISJ` - Icelandic Króna (1918–1981) + // * `INR` - Indian Rupee + // * `IDR` - Indonesian Rupiah + // * `IRR` - Iranian Rial + // * `IQD` - Iraqi Dinar + // * `IEP` - Irish Pound + // * `ILS` - Israeli New Shekel + // * `ILP` - Israeli Pound + // * `ILR` - Israeli Shekel (1980–1985) + // * `ITL` - Italian Lira + // * `JMD` - Jamaican Dollar + // * `JPY` - Japanese Yen + // * `JOD` - Jordanian Dinar + // * `KZT` - Kazakhstani Tenge + // * `KES` - Kenyan Shilling + // * `KWD` - Kuwaiti Dinar + // * `KGS` - Kyrgystani Som + // * `LAK` - Laotian Kip + // * `LVL` - Latvian Lats + // * `LVR` - Latvian Ruble + // * `LBP` - Lebanese Pound + // * `LSL` - Lesotho Loti + // * `LRD` - Liberian Dollar + // * `LYD` - Libyan Dinar + // * `LTL` - Lithuanian Litas + // * `LTT` - Lithuanian Talonas + // * `LUL` - Luxembourg Financial Franc + // * `LUC` - Luxembourgian Convertible Franc + // * `LUF` - Luxembourgian Franc + // * `MOP` - Macanese Pataca + // * `MKD` - Macedonian Denar + // * `MKN` - Macedonian Denar (1992–1993) + // * `MGA` - Malagasy Ariary + // * `MGF` - Malagasy Franc + // * `MWK` - Malawian Kwacha + // * `MYR` - Malaysian Ringgit + // * `MVR` - Maldivian Rufiyaa + // * `MVP` - Maldivian Rupee (1947–1981) + // * `MLF` - Malian Franc + // * `MTL` - Maltese Lira + // * `MTP` - Maltese Pound + // * `MRU` - Mauritanian Ouguiya + // * `MRO` - Mauritanian Ouguiya (1973–2017) + // * `MUR` - Mauritian Rupee + // * `MXV` - Mexican Investment Unit + // * `MXN` - Mexican Peso + // * `MXP` - Mexican Silver Peso (1861–1992) + // * `MDC` - Moldovan Cupon + // * `MDL` - Moldovan Leu + // * `MCF` - Monegasque Franc + // * `MNT` - Mongolian Tugrik + // * `MAD` - Moroccan Dirham + // * `MAF` - Moroccan Franc + // * `MZE` - Mozambican Escudo + // * `MZN` - Mozambican Metical + // * `MZM` - Mozambican Metical (1980–2006) + // * `MMK` - Myanmar Kyat + // * `NAD` - Namibian Dollar + // * `NPR` - Nepalese Rupee + // * `ANG` - Netherlands Antillean Guilder + // * `TWD` - New Taiwan Dollar + // * `NZD` - New Zealand Dollar + // * `NIO` - Nicaraguan Córdoba + // * `NIC` - Nicaraguan Córdoba (1988–1991) + // * `NGN` - Nigerian Naira + // * `KPW` - North Korean Won + // * `NOK` - Norwegian Krone + // * `OMR` - Omani Rial + // * `PKR` - Pakistani Rupee + // * `XPD` - Palladium + // * `PAB` - Panamanian Balboa + // * `PGK` - Papua New Guinean Kina + // * `PYG` - Paraguayan Guarani + // * `PEI` - Peruvian Inti + // * `PEN` - Peruvian Sol + // * `PES` - Peruvian Sol (1863–1965) + // * `PHP` - Philippine Peso + // * `XPT` - Platinum + // * `PLN` - Polish Zloty + // * `PLZ` - Polish Zloty (1950–1995) + // * `PTE` - Portuguese Escudo + // * `GWE` - Portuguese Guinea Escudo + // * `QAR` - Qatari Rial + // * `XRE` - RINET Funds + // * `RHD` - Rhodesian Dollar + // * `RON` - Romanian Leu + // * `ROL` - Romanian Leu (1952–2006) + // * `RUB` - Russian Ruble + // * `RUR` - Russian Ruble (1991–1998) + // * `RWF` - Rwandan Franc + // * `SVC` - Salvadoran Colón + // * `WST` - Samoan Tala + // * `SAR` - Saudi Riyal + // * `RSD` - Serbian Dinar + // * `CSD` - Serbian Dinar (2002–2006) + // * `SCR` - Seychellois Rupee + // * `SLL` - Sierra Leonean Leone + // * `XAG` - Silver + // * `SGD` - Singapore Dollar + // * `SKK` - Slovak Koruna + // * `SIT` - Slovenian Tolar + // * `SBD` - Solomon Islands Dollar + // * `SOS` - Somali Shilling + // * `ZAR` - South African Rand + // * `ZAL` - South African Rand (financial) + // * `KRH` - South Korean Hwan (1953–1962) + // * `KRW` - South Korean Won + // * `KRO` - South Korean Won (1945–1953) + // * `SSP` - South Sudanese Pound + // * `SUR` - Soviet Rouble + // * `ESP` - Spanish Peseta + // * `ESA` - Spanish Peseta (A account) + // * `ESB` - Spanish Peseta (convertible account) + // * `XDR` - Special Drawing Rights + // * `LKR` - Sri Lankan Rupee + // * `SHP` - St. Helena Pound + // * `XSU` - Sucre + // * `SDD` - Sudanese Dinar (1992–2007) + // * `SDG` - Sudanese Pound + // * `SDP` - Sudanese Pound (1957–1998) + // * `SRD` - Surinamese Dollar + // * `SRG` - Surinamese Guilder + // * `SZL` - Swazi Lilangeni + // * `SEK` - Swedish Krona + // * `CHF` - Swiss Franc + // * `SYP` - Syrian Pound + // * `STN` - São Tomé & Príncipe Dobra + // * `STD` - São Tomé & Príncipe Dobra (1977–2017) + // * `TVD` - TVD + // * `TJR` - Tajikistani Ruble + // * `TJS` - Tajikistani Somoni + // * `TZS` - Tanzanian Shilling + // * `XTS` - Testing Currency Code + // * `THB` - Thai Baht + // * `XXX` - The codes assigned for transactions where no currency is involved + // * `TPE` - Timorese Escudo + // * `TOP` - Tongan Paʻanga + // * `TTD` - Trinidad & Tobago Dollar + // * `TND` - Tunisian Dinar + // * `TRY` - Turkish Lira + // * `TRL` - Turkish Lira (1922–2005) + // * `TMT` - Turkmenistani Manat + // * `TMM` - Turkmenistani Manat (1993–2009) + // * `USD` - US Dollar + // * `USN` - US Dollar (Next day) + // * `USS` - US Dollar (Same day) + // * `UGX` - Ugandan Shilling + // * `UGS` - Ugandan Shilling (1966–1987) + // * `UAH` - Ukrainian Hryvnia + // * `UAK` - Ukrainian Karbovanets + // * `AED` - United Arab Emirates Dirham + // * `UYW` - Uruguayan Nominal Wage Index Unit + // * `UYU` - Uruguayan Peso + // * `UYP` - Uruguayan Peso (1975–1993) + // * `UYI` - Uruguayan Peso (Indexed Units) + // * `UZS` - Uzbekistani Som + // * `VUV` - Vanuatu Vatu + // * `VES` - Venezuelan Bolívar + // * `VEB` - Venezuelan Bolívar (1871–2008) + // * `VEF` - Venezuelan Bolívar (2008–2018) + // * `VND` - Vietnamese Dong + // * `VNN` - Vietnamese Dong (1978–1985) + // * `CHE` - WIR Euro + // * `CHW` - WIR Franc + // * `XOF` - West African CFA Franc + // * `YDD` - Yemeni Dinar + // * `YER` - Yemeni Rial + // * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + // * `YUD` - Yugoslavian Hard Dinar (1966–1990) + // * `YUM` - Yugoslavian New Dinar (1994–2002) + // * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + // * `ZWN` - ZWN + // * `ZRN` - Zairean New Zaire (1993–1998) + // * `ZRZ` - Zairean Zaire (1971–1993) + // * `ZMW` - Zambian Kwacha + // * `ZMK` - Zambian Kwacha (1968–2012) + // * `ZWD` - Zimbabwean Dollar (1980–2008) + // * `ZWR` - Zimbabwean Dollar (2008) + // * `ZWL` - Zimbabwean Dollar (2009) + Currency *PatchedPaymentRequestCurrency `json:"currency,omitempty" url:"currency,omitempty"` + // The payment's exchange rate. + ExchangeRate *string `json:"exchange_rate,omitempty" url:"exchange_rate,omitempty"` + // The company the payment belongs to. + Company *PatchedPaymentRequestCompany `json:"company,omitempty" url:"company,omitempty"` + // The total amount of money being paid to the supplier, or customer, after taxes. + TotalAmount *float64 `json:"total_amount,omitempty" url:"total_amount,omitempty"` + // The type of the invoice. + // + // * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE + // * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE + Type *PatchedPaymentRequestType `json:"type,omitempty" url:"type,omitempty"` + TrackingCategories []*PatchedPaymentRequestTrackingCategoriesItem `json:"tracking_categories,omitempty" url:"tracking_categories,omitempty"` + // The accounting period that the Payment was generated in. + AccountingPeriod *PatchedPaymentRequestAccountingPeriod `json:"accounting_period,omitempty" url:"accounting_period,omitempty"` + // A list of “Payment Applied to Lines” objects. + AppliedToLines []*PatchedPaymentRequestAppliedToLinesItem `json:"applied_to_lines,omitempty" url:"applied_to_lines,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + RemoteFields []*RemoteFieldRequest `json:"remote_fields,omitempty" url:"remote_fields,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PatchedPaymentRequest) GetTransactionDate() *time.Time { + if p == nil { + return nil + } + return p.TransactionDate +} + +func (p *PatchedPaymentRequest) GetContact() *PatchedPaymentRequestContact { + if p == nil { + return nil + } + return p.Contact +} + +func (p *PatchedPaymentRequest) GetAccount() *PatchedPaymentRequestAccount { + if p == nil { + return nil + } + return p.Account +} + +func (p *PatchedPaymentRequest) GetPaymentMethod() *PatchedPaymentRequestPaymentMethod { + if p == nil { + return nil + } + return p.PaymentMethod +} + +func (p *PatchedPaymentRequest) GetCurrency() *PatchedPaymentRequestCurrency { + if p == nil { + return nil + } + return p.Currency +} + +func (p *PatchedPaymentRequest) GetExchangeRate() *string { + if p == nil { + return nil + } + return p.ExchangeRate +} + +func (p *PatchedPaymentRequest) GetCompany() *PatchedPaymentRequestCompany { + if p == nil { + return nil + } + return p.Company +} + +func (p *PatchedPaymentRequest) GetTotalAmount() *float64 { + if p == nil { + return nil + } + return p.TotalAmount +} + +func (p *PatchedPaymentRequest) GetType() *PatchedPaymentRequestType { + if p == nil { + return nil + } + return p.Type +} + +func (p *PatchedPaymentRequest) GetTrackingCategories() []*PatchedPaymentRequestTrackingCategoriesItem { + if p == nil { + return nil + } + return p.TrackingCategories +} + +func (p *PatchedPaymentRequest) GetAccountingPeriod() *PatchedPaymentRequestAccountingPeriod { + if p == nil { + return nil + } + return p.AccountingPeriod +} + +func (p *PatchedPaymentRequest) GetAppliedToLines() []*PatchedPaymentRequestAppliedToLinesItem { + if p == nil { + return nil + } + return p.AppliedToLines +} + +func (p *PatchedPaymentRequest) GetIntegrationParams() map[string]interface{} { + if p == nil { + return nil + } + return p.IntegrationParams +} + +func (p *PatchedPaymentRequest) GetLinkedAccountParams() map[string]interface{} { + if p == nil { + return nil + } + return p.LinkedAccountParams +} + +func (p *PatchedPaymentRequest) GetRemoteFields() []*RemoteFieldRequest { + if p == nil { + return nil + } + return p.RemoteFields +} + +func (p *PatchedPaymentRequest) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PatchedPaymentRequest) UnmarshalJSON(data []byte) error { + type embed PatchedPaymentRequest + var unmarshaler = struct { + embed + TransactionDate *internal.DateTime `json:"transaction_date,omitempty"` + }{ + embed: embed(*p), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *p = PatchedPaymentRequest(unmarshaler.embed) + p.TransactionDate = unmarshaler.TransactionDate.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PatchedPaymentRequest) MarshalJSON() ([]byte, error) { + type embed PatchedPaymentRequest + var marshaler = struct { + embed + TransactionDate *internal.DateTime `json:"transaction_date,omitempty"` + }{ + embed: embed(*p), + TransactionDate: internal.NewOptionalDateTime(p.TransactionDate), + } + return json.Marshal(marshaler) +} + +func (p *PatchedPaymentRequest) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +// The supplier’s or customer’s account in which the payment is made. +type PatchedPaymentRequestAccount struct { + String string + Account *Account + + typ string +} + +func (p *PatchedPaymentRequestAccount) GetString() string { + if p == nil { + return "" + } + return p.String +} + +func (p *PatchedPaymentRequestAccount) GetAccount() *Account { + if p == nil { + return nil + } + return p.Account +} + +func (p *PatchedPaymentRequestAccount) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + p.typ = "String" + p.String = valueString + return nil + } + valueAccount := new(Account) + if err := json.Unmarshal(data, &valueAccount); err == nil { + p.typ = "Account" + p.Account = valueAccount + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, p) +} + +func (p PatchedPaymentRequestAccount) MarshalJSON() ([]byte, error) { + if p.typ == "String" || p.String != "" { + return json.Marshal(p.String) + } + if p.typ == "Account" || p.Account != nil { + return json.Marshal(p.Account) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) +} + +type PatchedPaymentRequestAccountVisitor interface { + VisitString(string) error + VisitAccount(*Account) error +} + +func (p *PatchedPaymentRequestAccount) Accept(visitor PatchedPaymentRequestAccountVisitor) error { + if p.typ == "String" || p.String != "" { + return visitor.VisitString(p.String) + } + if p.typ == "Account" || p.Account != nil { + return visitor.VisitAccount(p.Account) + } + return fmt.Errorf("type %T does not include a non-empty union type", p) +} + +// The accounting period that the Payment was generated in. +type PatchedPaymentRequestAccountingPeriod struct { + String string + AccountingPeriod *AccountingPeriod + + typ string +} + +func (p *PatchedPaymentRequestAccountingPeriod) GetString() string { + if p == nil { + return "" + } + return p.String +} + +func (p *PatchedPaymentRequestAccountingPeriod) GetAccountingPeriod() *AccountingPeriod { + if p == nil { + return nil + } + return p.AccountingPeriod +} + +func (p *PatchedPaymentRequestAccountingPeriod) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + p.typ = "String" + p.String = valueString + return nil + } + valueAccountingPeriod := new(AccountingPeriod) + if err := json.Unmarshal(data, &valueAccountingPeriod); err == nil { + p.typ = "AccountingPeriod" + p.AccountingPeriod = valueAccountingPeriod + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, p) +} + +func (p PatchedPaymentRequestAccountingPeriod) MarshalJSON() ([]byte, error) { + if p.typ == "String" || p.String != "" { + return json.Marshal(p.String) + } + if p.typ == "AccountingPeriod" || p.AccountingPeriod != nil { + return json.Marshal(p.AccountingPeriod) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) +} + +type PatchedPaymentRequestAccountingPeriodVisitor interface { + VisitString(string) error + VisitAccountingPeriod(*AccountingPeriod) error +} + +func (p *PatchedPaymentRequestAccountingPeriod) Accept(visitor PatchedPaymentRequestAccountingPeriodVisitor) error { + if p.typ == "String" || p.String != "" { + return visitor.VisitString(p.String) + } + if p.typ == "AccountingPeriod" || p.AccountingPeriod != nil { + return visitor.VisitAccountingPeriod(p.AccountingPeriod) + } + return fmt.Errorf("type %T does not include a non-empty union type", p) +} + +type PatchedPaymentRequestAppliedToLinesItem struct { + String string + PaymentLineItemRequest *PaymentLineItemRequest + + typ string +} + +func (p *PatchedPaymentRequestAppliedToLinesItem) GetString() string { + if p == nil { + return "" + } + return p.String +} + +func (p *PatchedPaymentRequestAppliedToLinesItem) GetPaymentLineItemRequest() *PaymentLineItemRequest { + if p == nil { + return nil + } + return p.PaymentLineItemRequest +} + +func (p *PatchedPaymentRequestAppliedToLinesItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + p.typ = "String" + p.String = valueString + return nil + } + valuePaymentLineItemRequest := new(PaymentLineItemRequest) + if err := json.Unmarshal(data, &valuePaymentLineItemRequest); err == nil { + p.typ = "PaymentLineItemRequest" + p.PaymentLineItemRequest = valuePaymentLineItemRequest + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, p) +} + +func (p PatchedPaymentRequestAppliedToLinesItem) MarshalJSON() ([]byte, error) { + if p.typ == "String" || p.String != "" { + return json.Marshal(p.String) + } + if p.typ == "PaymentLineItemRequest" || p.PaymentLineItemRequest != nil { + return json.Marshal(p.PaymentLineItemRequest) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) +} + +type PatchedPaymentRequestAppliedToLinesItemVisitor interface { + VisitString(string) error + VisitPaymentLineItemRequest(*PaymentLineItemRequest) error +} + +func (p *PatchedPaymentRequestAppliedToLinesItem) Accept(visitor PatchedPaymentRequestAppliedToLinesItemVisitor) error { + if p.typ == "String" || p.String != "" { + return visitor.VisitString(p.String) + } + if p.typ == "PaymentLineItemRequest" || p.PaymentLineItemRequest != nil { + return visitor.VisitPaymentLineItemRequest(p.PaymentLineItemRequest) + } + return fmt.Errorf("type %T does not include a non-empty union type", p) +} + +// The company the payment belongs to. +type PatchedPaymentRequestCompany struct { + String string + CompanyInfo *CompanyInfo + + typ string +} + +func (p *PatchedPaymentRequestCompany) GetString() string { + if p == nil { + return "" + } + return p.String +} + +func (p *PatchedPaymentRequestCompany) GetCompanyInfo() *CompanyInfo { + if p == nil { + return nil + } + return p.CompanyInfo +} + +func (p *PatchedPaymentRequestCompany) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + p.typ = "String" + p.String = valueString + return nil + } + valueCompanyInfo := new(CompanyInfo) + if err := json.Unmarshal(data, &valueCompanyInfo); err == nil { + p.typ = "CompanyInfo" + p.CompanyInfo = valueCompanyInfo + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, p) +} + +func (p PatchedPaymentRequestCompany) MarshalJSON() ([]byte, error) { + if p.typ == "String" || p.String != "" { + return json.Marshal(p.String) + } + if p.typ == "CompanyInfo" || p.CompanyInfo != nil { + return json.Marshal(p.CompanyInfo) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) +} + +type PatchedPaymentRequestCompanyVisitor interface { + VisitString(string) error + VisitCompanyInfo(*CompanyInfo) error +} + +func (p *PatchedPaymentRequestCompany) Accept(visitor PatchedPaymentRequestCompanyVisitor) error { + if p.typ == "String" || p.String != "" { + return visitor.VisitString(p.String) + } + if p.typ == "CompanyInfo" || p.CompanyInfo != nil { + return visitor.VisitCompanyInfo(p.CompanyInfo) + } + return fmt.Errorf("type %T does not include a non-empty union type", p) +} + +// The supplier, or customer involved in the payment. +type PatchedPaymentRequestContact struct { + String string + Contact *Contact + + typ string +} + +func (p *PatchedPaymentRequestContact) GetString() string { + if p == nil { + return "" + } + return p.String +} + +func (p *PatchedPaymentRequestContact) GetContact() *Contact { + if p == nil { + return nil + } + return p.Contact +} + +func (p *PatchedPaymentRequestContact) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + p.typ = "String" + p.String = valueString + return nil + } + valueContact := new(Contact) + if err := json.Unmarshal(data, &valueContact); err == nil { + p.typ = "Contact" + p.Contact = valueContact + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, p) +} + +func (p PatchedPaymentRequestContact) MarshalJSON() ([]byte, error) { + if p.typ == "String" || p.String != "" { + return json.Marshal(p.String) + } + if p.typ == "Contact" || p.Contact != nil { + return json.Marshal(p.Contact) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) +} + +type PatchedPaymentRequestContactVisitor interface { + VisitString(string) error + VisitContact(*Contact) error +} + +func (p *PatchedPaymentRequestContact) Accept(visitor PatchedPaymentRequestContactVisitor) error { + if p.typ == "String" || p.String != "" { + return visitor.VisitString(p.String) + } + if p.typ == "Contact" || p.Contact != nil { + return visitor.VisitContact(p.Contact) + } + return fmt.Errorf("type %T does not include a non-empty union type", p) +} + +// The payment's currency. +// +// * `XUA` - ADB Unit of Account +// * `AFN` - Afghan Afghani +// * `AFA` - Afghan Afghani (1927–2002) +// * `ALL` - Albanian Lek +// * `ALK` - Albanian Lek (1946–1965) +// * `DZD` - Algerian Dinar +// * `ADP` - Andorran Peseta +// * `AOA` - Angolan Kwanza +// * `AOK` - Angolan Kwanza (1977–1991) +// * `AON` - Angolan New Kwanza (1990–2000) +// * `AOR` - Angolan Readjusted Kwanza (1995–1999) +// * `ARA` - Argentine Austral +// * `ARS` - Argentine Peso +// * `ARM` - Argentine Peso (1881–1970) +// * `ARP` - Argentine Peso (1983–1985) +// * `ARL` - Argentine Peso Ley (1970–1983) +// * `AMD` - Armenian Dram +// * `AWG` - Aruban Florin +// * `AUD` - Australian Dollar +// * `ATS` - Austrian Schilling +// * `AZN` - Azerbaijani Manat +// * `AZM` - Azerbaijani Manat (1993–2006) +// * `BSD` - Bahamian Dollar +// * `BHD` - Bahraini Dinar +// * `BDT` - Bangladeshi Taka +// * `BBD` - Barbadian Dollar +// * `BYN` - Belarusian Ruble +// * `BYB` - Belarusian Ruble (1994–1999) +// * `BYR` - Belarusian Ruble (2000–2016) +// * `BEF` - Belgian Franc +// * `BEC` - Belgian Franc (convertible) +// * `BEL` - Belgian Franc (financial) +// * `BZD` - Belize Dollar +// * `BMD` - Bermudan Dollar +// * `BTN` - Bhutanese Ngultrum +// * `BOB` - Bolivian Boliviano +// * `BOL` - Bolivian Boliviano (1863–1963) +// * `BOV` - Bolivian Mvdol +// * `BOP` - Bolivian Peso +// * `BAM` - Bosnia-Herzegovina Convertible Mark +// * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) +// * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) +// * `BWP` - Botswanan Pula +// * `BRC` - Brazilian Cruzado (1986–1989) +// * `BRZ` - Brazilian Cruzeiro (1942–1967) +// * `BRE` - Brazilian Cruzeiro (1990–1993) +// * `BRR` - Brazilian Cruzeiro (1993–1994) +// * `BRN` - Brazilian New Cruzado (1989–1990) +// * `BRB` - Brazilian New Cruzeiro (1967–1986) +// * `BRL` - Brazilian Real +// * `GBP` - British Pound +// * `BND` - Brunei Dollar +// * `BGL` - Bulgarian Hard Lev +// * `BGN` - Bulgarian Lev +// * `BGO` - Bulgarian Lev (1879–1952) +// * `BGM` - Bulgarian Socialist Lev +// * `BUK` - Burmese Kyat +// * `BIF` - Burundian Franc +// * `XPF` - CFP Franc +// * `KHR` - Cambodian Riel +// * `CAD` - Canadian Dollar +// * `CVE` - Cape Verdean Escudo +// * `KYD` - Cayman Islands Dollar +// * `XAF` - Central African CFA Franc +// * `CLE` - Chilean Escudo +// * `CLP` - Chilean Peso +// * `CLF` - Chilean Unit of Account (UF) +// * `CNX` - Chinese People’s Bank Dollar +// * `CNY` - Chinese Yuan +// * `CNH` - Chinese Yuan (offshore) +// * `COP` - Colombian Peso +// * `COU` - Colombian Real Value Unit +// * `KMF` - Comorian Franc +// * `CDF` - Congolese Franc +// * `CRC` - Costa Rican Colón +// * `HRD` - Croatian Dinar +// * `HRK` - Croatian Kuna +// * `CUC` - Cuban Convertible Peso +// * `CUP` - Cuban Peso +// * `CYP` - Cypriot Pound +// * `CZK` - Czech Koruna +// * `CSK` - Czechoslovak Hard Koruna +// * `DKK` - Danish Krone +// * `DJF` - Djiboutian Franc +// * `DOP` - Dominican Peso +// * `NLG` - Dutch Guilder +// * `XCD` - East Caribbean Dollar +// * `DDM` - East German Mark +// * `ECS` - Ecuadorian Sucre +// * `ECV` - Ecuadorian Unit of Constant Value +// * `EGP` - Egyptian Pound +// * `GQE` - Equatorial Guinean Ekwele +// * `ERN` - Eritrean Nakfa +// * `EEK` - Estonian Kroon +// * `ETB` - Ethiopian Birr +// * `EUR` - Euro +// * `XBA` - European Composite Unit +// * `XEU` - European Currency Unit +// * `XBB` - European Monetary Unit +// * `XBC` - European Unit of Account (XBC) +// * `XBD` - European Unit of Account (XBD) +// * `FKP` - Falkland Islands Pound +// * `FJD` - Fijian Dollar +// * `FIM` - Finnish Markka +// * `FRF` - French Franc +// * `XFO` - French Gold Franc +// * `XFU` - French UIC-Franc +// * `GMD` - Gambian Dalasi +// * `GEK` - Georgian Kupon Larit +// * `GEL` - Georgian Lari +// * `DEM` - German Mark +// * `GHS` - Ghanaian Cedi +// * `GHC` - Ghanaian Cedi (1979–2007) +// * `GIP` - Gibraltar Pound +// * `XAU` - Gold +// * `GRD` - Greek Drachma +// * `GTQ` - Guatemalan Quetzal +// * `GWP` - Guinea-Bissau Peso +// * `GNF` - Guinean Franc +// * `GNS` - Guinean Syli +// * `GYD` - Guyanaese Dollar +// * `HTG` - Haitian Gourde +// * `HNL` - Honduran Lempira +// * `HKD` - Hong Kong Dollar +// * `HUF` - Hungarian Forint +// * `IMP` - IMP +// * `ISK` - Icelandic Króna +// * `ISJ` - Icelandic Króna (1918–1981) +// * `INR` - Indian Rupee +// * `IDR` - Indonesian Rupiah +// * `IRR` - Iranian Rial +// * `IQD` - Iraqi Dinar +// * `IEP` - Irish Pound +// * `ILS` - Israeli New Shekel +// * `ILP` - Israeli Pound +// * `ILR` - Israeli Shekel (1980–1985) +// * `ITL` - Italian Lira +// * `JMD` - Jamaican Dollar +// * `JPY` - Japanese Yen +// * `JOD` - Jordanian Dinar +// * `KZT` - Kazakhstani Tenge +// * `KES` - Kenyan Shilling +// * `KWD` - Kuwaiti Dinar +// * `KGS` - Kyrgystani Som +// * `LAK` - Laotian Kip +// * `LVL` - Latvian Lats +// * `LVR` - Latvian Ruble +// * `LBP` - Lebanese Pound +// * `LSL` - Lesotho Loti +// * `LRD` - Liberian Dollar +// * `LYD` - Libyan Dinar +// * `LTL` - Lithuanian Litas +// * `LTT` - Lithuanian Talonas +// * `LUL` - Luxembourg Financial Franc +// * `LUC` - Luxembourgian Convertible Franc +// * `LUF` - Luxembourgian Franc +// * `MOP` - Macanese Pataca +// * `MKD` - Macedonian Denar +// * `MKN` - Macedonian Denar (1992–1993) +// * `MGA` - Malagasy Ariary +// * `MGF` - Malagasy Franc +// * `MWK` - Malawian Kwacha +// * `MYR` - Malaysian Ringgit +// * `MVR` - Maldivian Rufiyaa +// * `MVP` - Maldivian Rupee (1947–1981) +// * `MLF` - Malian Franc +// * `MTL` - Maltese Lira +// * `MTP` - Maltese Pound +// * `MRU` - Mauritanian Ouguiya +// * `MRO` - Mauritanian Ouguiya (1973–2017) +// * `MUR` - Mauritian Rupee +// * `MXV` - Mexican Investment Unit +// * `MXN` - Mexican Peso +// * `MXP` - Mexican Silver Peso (1861–1992) +// * `MDC` - Moldovan Cupon +// * `MDL` - Moldovan Leu +// * `MCF` - Monegasque Franc +// * `MNT` - Mongolian Tugrik +// * `MAD` - Moroccan Dirham +// * `MAF` - Moroccan Franc +// * `MZE` - Mozambican Escudo +// * `MZN` - Mozambican Metical +// * `MZM` - Mozambican Metical (1980–2006) +// * `MMK` - Myanmar Kyat +// * `NAD` - Namibian Dollar +// * `NPR` - Nepalese Rupee +// * `ANG` - Netherlands Antillean Guilder +// * `TWD` - New Taiwan Dollar +// * `NZD` - New Zealand Dollar +// * `NIO` - Nicaraguan Córdoba +// * `NIC` - Nicaraguan Córdoba (1988–1991) +// * `NGN` - Nigerian Naira +// * `KPW` - North Korean Won +// * `NOK` - Norwegian Krone +// * `OMR` - Omani Rial +// * `PKR` - Pakistani Rupee +// * `XPD` - Palladium +// * `PAB` - Panamanian Balboa +// * `PGK` - Papua New Guinean Kina +// * `PYG` - Paraguayan Guarani +// * `PEI` - Peruvian Inti +// * `PEN` - Peruvian Sol +// * `PES` - Peruvian Sol (1863–1965) +// * `PHP` - Philippine Peso +// * `XPT` - Platinum +// * `PLN` - Polish Zloty +// * `PLZ` - Polish Zloty (1950–1995) +// * `PTE` - Portuguese Escudo +// * `GWE` - Portuguese Guinea Escudo +// * `QAR` - Qatari Rial +// * `XRE` - RINET Funds +// * `RHD` - Rhodesian Dollar +// * `RON` - Romanian Leu +// * `ROL` - Romanian Leu (1952–2006) +// * `RUB` - Russian Ruble +// * `RUR` - Russian Ruble (1991–1998) +// * `RWF` - Rwandan Franc +// * `SVC` - Salvadoran Colón +// * `WST` - Samoan Tala +// * `SAR` - Saudi Riyal +// * `RSD` - Serbian Dinar +// * `CSD` - Serbian Dinar (2002–2006) +// * `SCR` - Seychellois Rupee +// * `SLL` - Sierra Leonean Leone +// * `XAG` - Silver +// * `SGD` - Singapore Dollar +// * `SKK` - Slovak Koruna +// * `SIT` - Slovenian Tolar +// * `SBD` - Solomon Islands Dollar +// * `SOS` - Somali Shilling +// * `ZAR` - South African Rand +// * `ZAL` - South African Rand (financial) +// * `KRH` - South Korean Hwan (1953–1962) +// * `KRW` - South Korean Won +// * `KRO` - South Korean Won (1945–1953) +// * `SSP` - South Sudanese Pound +// * `SUR` - Soviet Rouble +// * `ESP` - Spanish Peseta +// * `ESA` - Spanish Peseta (A account) +// * `ESB` - Spanish Peseta (convertible account) +// * `XDR` - Special Drawing Rights +// * `LKR` - Sri Lankan Rupee +// * `SHP` - St. Helena Pound +// * `XSU` - Sucre +// * `SDD` - Sudanese Dinar (1992–2007) +// * `SDG` - Sudanese Pound +// * `SDP` - Sudanese Pound (1957–1998) +// * `SRD` - Surinamese Dollar +// * `SRG` - Surinamese Guilder +// * `SZL` - Swazi Lilangeni +// * `SEK` - Swedish Krona +// * `CHF` - Swiss Franc +// * `SYP` - Syrian Pound +// * `STN` - São Tomé & Príncipe Dobra +// * `STD` - São Tomé & Príncipe Dobra (1977–2017) +// * `TVD` - TVD +// * `TJR` - Tajikistani Ruble +// * `TJS` - Tajikistani Somoni +// * `TZS` - Tanzanian Shilling +// * `XTS` - Testing Currency Code +// * `THB` - Thai Baht +// * `XXX` - The codes assigned for transactions where no currency is involved +// * `TPE` - Timorese Escudo +// * `TOP` - Tongan Paʻanga +// * `TTD` - Trinidad & Tobago Dollar +// * `TND` - Tunisian Dinar +// * `TRY` - Turkish Lira +// * `TRL` - Turkish Lira (1922–2005) +// * `TMT` - Turkmenistani Manat +// * `TMM` - Turkmenistani Manat (1993–2009) +// * `USD` - US Dollar +// * `USN` - US Dollar (Next day) +// * `USS` - US Dollar (Same day) +// * `UGX` - Ugandan Shilling +// * `UGS` - Ugandan Shilling (1966–1987) +// * `UAH` - Ukrainian Hryvnia +// * `UAK` - Ukrainian Karbovanets +// * `AED` - United Arab Emirates Dirham +// * `UYW` - Uruguayan Nominal Wage Index Unit +// * `UYU` - Uruguayan Peso +// * `UYP` - Uruguayan Peso (1975–1993) +// * `UYI` - Uruguayan Peso (Indexed Units) +// * `UZS` - Uzbekistani Som +// * `VUV` - Vanuatu Vatu +// * `VES` - Venezuelan Bolívar +// * `VEB` - Venezuelan Bolívar (1871–2008) +// * `VEF` - Venezuelan Bolívar (2008–2018) +// * `VND` - Vietnamese Dong +// * `VNN` - Vietnamese Dong (1978–1985) +// * `CHE` - WIR Euro +// * `CHW` - WIR Franc +// * `XOF` - West African CFA Franc +// * `YDD` - Yemeni Dinar +// * `YER` - Yemeni Rial +// * `YUN` - Yugoslavian Convertible Dinar (1990–1992) +// * `YUD` - Yugoslavian Hard Dinar (1966–1990) +// * `YUM` - Yugoslavian New Dinar (1994–2002) +// * `YUR` - Yugoslavian Reformed Dinar (1992–1993) +// * `ZWN` - ZWN +// * `ZRN` - Zairean New Zaire (1993–1998) +// * `ZRZ` - Zairean Zaire (1971–1993) +// * `ZMW` - Zambian Kwacha +// * `ZMK` - Zambian Kwacha (1968–2012) +// * `ZWD` - Zimbabwean Dollar (1980–2008) +// * `ZWR` - Zimbabwean Dollar (2008) +// * `ZWL` - Zimbabwean Dollar (2009) +type PatchedPaymentRequestCurrency struct { + TransactionCurrencyEnum TransactionCurrencyEnum + String string + + typ string +} + +func (p *PatchedPaymentRequestCurrency) GetTransactionCurrencyEnum() TransactionCurrencyEnum { + if p == nil { + return "" + } + return p.TransactionCurrencyEnum +} + +func (p *PatchedPaymentRequestCurrency) GetString() string { + if p == nil { + return "" + } + return p.String +} + +func (p *PatchedPaymentRequestCurrency) UnmarshalJSON(data []byte) error { + var valueTransactionCurrencyEnum TransactionCurrencyEnum + if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { + p.typ = "TransactionCurrencyEnum" + p.TransactionCurrencyEnum = valueTransactionCurrencyEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + p.typ = "String" + p.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, p) +} + +func (p PatchedPaymentRequestCurrency) MarshalJSON() ([]byte, error) { + if p.typ == "TransactionCurrencyEnum" || p.TransactionCurrencyEnum != "" { + return json.Marshal(p.TransactionCurrencyEnum) + } + if p.typ == "String" || p.String != "" { + return json.Marshal(p.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) +} + +type PatchedPaymentRequestCurrencyVisitor interface { + VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error + VisitString(string) error +} + +func (p *PatchedPaymentRequestCurrency) Accept(visitor PatchedPaymentRequestCurrencyVisitor) error { + if p.typ == "TransactionCurrencyEnum" || p.TransactionCurrencyEnum != "" { + return visitor.VisitTransactionCurrencyEnum(p.TransactionCurrencyEnum) + } + if p.typ == "String" || p.String != "" { + return visitor.VisitString(p.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", p) +} + +// The method which this payment was made by. +type PatchedPaymentRequestPaymentMethod struct { + String string + PaymentMethod *PaymentMethod + + typ string +} + +func (p *PatchedPaymentRequestPaymentMethod) GetString() string { + if p == nil { + return "" + } + return p.String +} + +func (p *PatchedPaymentRequestPaymentMethod) GetPaymentMethod() *PaymentMethod { + if p == nil { + return nil + } + return p.PaymentMethod +} + +func (p *PatchedPaymentRequestPaymentMethod) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + p.typ = "String" + p.String = valueString + return nil + } + valuePaymentMethod := new(PaymentMethod) + if err := json.Unmarshal(data, &valuePaymentMethod); err == nil { + p.typ = "PaymentMethod" + p.PaymentMethod = valuePaymentMethod + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, p) +} + +func (p PatchedPaymentRequestPaymentMethod) MarshalJSON() ([]byte, error) { + if p.typ == "String" || p.String != "" { + return json.Marshal(p.String) + } + if p.typ == "PaymentMethod" || p.PaymentMethod != nil { + return json.Marshal(p.PaymentMethod) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) +} + +type PatchedPaymentRequestPaymentMethodVisitor interface { + VisitString(string) error + VisitPaymentMethod(*PaymentMethod) error +} + +func (p *PatchedPaymentRequestPaymentMethod) Accept(visitor PatchedPaymentRequestPaymentMethodVisitor) error { + if p.typ == "String" || p.String != "" { + return visitor.VisitString(p.String) + } + if p.typ == "PaymentMethod" || p.PaymentMethod != nil { + return visitor.VisitPaymentMethod(p.PaymentMethod) + } + return fmt.Errorf("type %T does not include a non-empty union type", p) +} + +type PatchedPaymentRequestTrackingCategoriesItem struct { + String string + TrackingCategory *TrackingCategory + + typ string +} + +func (p *PatchedPaymentRequestTrackingCategoriesItem) GetString() string { + if p == nil { + return "" + } + return p.String +} + +func (p *PatchedPaymentRequestTrackingCategoriesItem) GetTrackingCategory() *TrackingCategory { + if p == nil { + return nil + } + return p.TrackingCategory +} + +func (p *PatchedPaymentRequestTrackingCategoriesItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + p.typ = "String" + p.String = valueString + return nil + } + valueTrackingCategory := new(TrackingCategory) + if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { + p.typ = "TrackingCategory" + p.TrackingCategory = valueTrackingCategory + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, p) +} + +func (p PatchedPaymentRequestTrackingCategoriesItem) MarshalJSON() ([]byte, error) { + if p.typ == "String" || p.String != "" { + return json.Marshal(p.String) + } + if p.typ == "TrackingCategory" || p.TrackingCategory != nil { + return json.Marshal(p.TrackingCategory) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) +} + +type PatchedPaymentRequestTrackingCategoriesItemVisitor interface { + VisitString(string) error + VisitTrackingCategory(*TrackingCategory) error +} + +func (p *PatchedPaymentRequestTrackingCategoriesItem) Accept(visitor PatchedPaymentRequestTrackingCategoriesItemVisitor) error { + if p.typ == "String" || p.String != "" { + return visitor.VisitString(p.String) + } + if p.typ == "TrackingCategory" || p.TrackingCategory != nil { + return visitor.VisitTrackingCategory(p.TrackingCategory) + } + return fmt.Errorf("type %T does not include a non-empty union type", p) +} + +// The type of the invoice. +// +// * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE +// * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE +type PatchedPaymentRequestType struct { + PaymentTypeEnum PaymentTypeEnum + String string + + typ string +} + +func (p *PatchedPaymentRequestType) GetPaymentTypeEnum() PaymentTypeEnum { + if p == nil { + return "" + } + return p.PaymentTypeEnum +} + +func (p *PatchedPaymentRequestType) GetString() string { + if p == nil { + return "" + } + return p.String +} + +func (p *PatchedPaymentRequestType) UnmarshalJSON(data []byte) error { + var valuePaymentTypeEnum PaymentTypeEnum + if err := json.Unmarshal(data, &valuePaymentTypeEnum); err == nil { + p.typ = "PaymentTypeEnum" + p.PaymentTypeEnum = valuePaymentTypeEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + p.typ = "String" + p.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, p) +} + +func (p PatchedPaymentRequestType) MarshalJSON() ([]byte, error) { + if p.typ == "PaymentTypeEnum" || p.PaymentTypeEnum != "" { + return json.Marshal(p.PaymentTypeEnum) + } + if p.typ == "String" || p.String != "" { + return json.Marshal(p.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) +} + +type PatchedPaymentRequestTypeVisitor interface { + VisitPaymentTypeEnum(PaymentTypeEnum) error + VisitString(string) error +} + +func (p *PatchedPaymentRequestType) Accept(visitor PatchedPaymentRequestTypeVisitor) error { + if p.typ == "PaymentTypeEnum" || p.PaymentTypeEnum != "" { + return visitor.VisitPaymentTypeEnum(p.PaymentTypeEnum) + } + if p.typ == "String" || p.String != "" { + return visitor.VisitString(p.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", p) +} + +// # The PaymentLineItem Object +// ### Description +// The `PaymentLineItem` object is an applied-to-line on a `Payment` that can either be a `Invoice`, `CreditNote`, or `JournalEntry`. +// +// ### Usage Example +// `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`. +type PaymentLineItemRequest struct { + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The amount being applied to the transaction. + AppliedAmount *string `json:"applied_amount,omitempty" url:"applied_amount,omitempty"` + // The date the payment portion is applied. + AppliedDate *time.Time `json:"applied_date,omitempty" url:"applied_date,omitempty"` + // The Merge ID of the transaction the payment portion is being applied to. + RelatedObjectId *string `json:"related_object_id,omitempty" url:"related_object_id,omitempty"` + // The type of transaction the payment portion is being applied to. Possible values include: INVOICE, JOURNAL_ENTRY, or CREDIT_NOTE. + RelatedObjectType *string `json:"related_object_type,omitempty" url:"related_object_type,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + RemoteFields []*RemoteFieldRequest `json:"remote_fields,omitempty" url:"remote_fields,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaymentLineItemRequest) GetRemoteId() *string { + if p == nil { + return nil + } + return p.RemoteId +} + +func (p *PaymentLineItemRequest) GetAppliedAmount() *string { + if p == nil { + return nil + } + return p.AppliedAmount +} + +func (p *PaymentLineItemRequest) GetAppliedDate() *time.Time { + if p == nil { + return nil + } + return p.AppliedDate +} + +func (p *PaymentLineItemRequest) GetRelatedObjectId() *string { + if p == nil { + return nil + } + return p.RelatedObjectId +} + +func (p *PaymentLineItemRequest) GetRelatedObjectType() *string { + if p == nil { + return nil + } + return p.RelatedObjectType +} + +func (p *PaymentLineItemRequest) GetIntegrationParams() map[string]interface{} { + if p == nil { + return nil + } + return p.IntegrationParams +} + +func (p *PaymentLineItemRequest) GetLinkedAccountParams() map[string]interface{} { + if p == nil { + return nil + } + return p.LinkedAccountParams +} + +func (p *PaymentLineItemRequest) GetRemoteFields() []*RemoteFieldRequest { + if p == nil { + return nil + } + return p.RemoteFields +} + +func (p *PaymentLineItemRequest) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaymentLineItemRequest) UnmarshalJSON(data []byte) error { + type embed PaymentLineItemRequest + var unmarshaler = struct { + embed + AppliedDate *internal.DateTime `json:"applied_date,omitempty"` + }{ + embed: embed(*p), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *p = PaymentLineItemRequest(unmarshaler.embed) + p.AppliedDate = unmarshaler.AppliedDate.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaymentLineItemRequest) MarshalJSON() ([]byte, error) { + type embed PaymentLineItemRequest + var marshaler = struct { + embed + AppliedDate *internal.DateTime `json:"applied_date,omitempty"` + }{ + embed: embed(*p), + AppliedDate: internal.NewOptionalDateTime(p.AppliedDate), + } + return json.Marshal(marshaler) +} + +func (p *PaymentLineItemRequest) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +// # 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. +type PaymentRequest struct { + // The payment's transaction date. + TransactionDate *time.Time `json:"transaction_date,omitempty" url:"transaction_date,omitempty"` + // The supplier, or customer involved in the payment. + Contact *PaymentRequestContact `json:"contact,omitempty" url:"contact,omitempty"` + // The supplier’s or customer’s account in which the payment is made. + Account *PaymentRequestAccount `json:"account,omitempty" url:"account,omitempty"` + // The method which this payment was made by. + PaymentMethod *PaymentRequestPaymentMethod `json:"payment_method,omitempty" url:"payment_method,omitempty"` + // The payment's currency. + // + // * `XUA` - ADB Unit of Account + // * `AFN` - Afghan Afghani + // * `AFA` - Afghan Afghani (1927–2002) + // * `ALL` - Albanian Lek + // * `ALK` - Albanian Lek (1946–1965) + // * `DZD` - Algerian Dinar + // * `ADP` - Andorran Peseta + // * `AOA` - Angolan Kwanza + // * `AOK` - Angolan Kwanza (1977–1991) + // * `AON` - Angolan New Kwanza (1990–2000) + // * `AOR` - Angolan Readjusted Kwanza (1995–1999) + // * `ARA` - Argentine Austral + // * `ARS` - Argentine Peso + // * `ARM` - Argentine Peso (1881–1970) + // * `ARP` - Argentine Peso (1983–1985) + // * `ARL` - Argentine Peso Ley (1970–1983) + // * `AMD` - Armenian Dram + // * `AWG` - Aruban Florin + // * `AUD` - Australian Dollar + // * `ATS` - Austrian Schilling + // * `AZN` - Azerbaijani Manat + // * `AZM` - Azerbaijani Manat (1993–2006) + // * `BSD` - Bahamian Dollar + // * `BHD` - Bahraini Dinar + // * `BDT` - Bangladeshi Taka + // * `BBD` - Barbadian Dollar + // * `BYN` - Belarusian Ruble + // * `BYB` - Belarusian Ruble (1994–1999) + // * `BYR` - Belarusian Ruble (2000–2016) + // * `BEF` - Belgian Franc + // * `BEC` - Belgian Franc (convertible) + // * `BEL` - Belgian Franc (financial) + // * `BZD` - Belize Dollar + // * `BMD` - Bermudan Dollar + // * `BTN` - Bhutanese Ngultrum + // * `BOB` - Bolivian Boliviano + // * `BOL` - Bolivian Boliviano (1863–1963) + // * `BOV` - Bolivian Mvdol + // * `BOP` - Bolivian Peso + // * `BAM` - Bosnia-Herzegovina Convertible Mark + // * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + // * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + // * `BWP` - Botswanan Pula + // * `BRC` - Brazilian Cruzado (1986–1989) + // * `BRZ` - Brazilian Cruzeiro (1942–1967) + // * `BRE` - Brazilian Cruzeiro (1990–1993) + // * `BRR` - Brazilian Cruzeiro (1993–1994) + // * `BRN` - Brazilian New Cruzado (1989–1990) + // * `BRB` - Brazilian New Cruzeiro (1967–1986) + // * `BRL` - Brazilian Real + // * `GBP` - British Pound + // * `BND` - Brunei Dollar + // * `BGL` - Bulgarian Hard Lev + // * `BGN` - Bulgarian Lev + // * `BGO` - Bulgarian Lev (1879–1952) + // * `BGM` - Bulgarian Socialist Lev + // * `BUK` - Burmese Kyat + // * `BIF` - Burundian Franc + // * `XPF` - CFP Franc + // * `KHR` - Cambodian Riel + // * `CAD` - Canadian Dollar + // * `CVE` - Cape Verdean Escudo + // * `KYD` - Cayman Islands Dollar + // * `XAF` - Central African CFA Franc + // * `CLE` - Chilean Escudo + // * `CLP` - Chilean Peso + // * `CLF` - Chilean Unit of Account (UF) + // * `CNX` - Chinese People’s Bank Dollar + // * `CNY` - Chinese Yuan + // * `CNH` - Chinese Yuan (offshore) + // * `COP` - Colombian Peso + // * `COU` - Colombian Real Value Unit + // * `KMF` - Comorian Franc + // * `CDF` - Congolese Franc + // * `CRC` - Costa Rican Colón + // * `HRD` - Croatian Dinar + // * `HRK` - Croatian Kuna + // * `CUC` - Cuban Convertible Peso + // * `CUP` - Cuban Peso + // * `CYP` - Cypriot Pound + // * `CZK` - Czech Koruna + // * `CSK` - Czechoslovak Hard Koruna + // * `DKK` - Danish Krone + // * `DJF` - Djiboutian Franc + // * `DOP` - Dominican Peso + // * `NLG` - Dutch Guilder + // * `XCD` - East Caribbean Dollar + // * `DDM` - East German Mark + // * `ECS` - Ecuadorian Sucre + // * `ECV` - Ecuadorian Unit of Constant Value + // * `EGP` - Egyptian Pound + // * `GQE` - Equatorial Guinean Ekwele + // * `ERN` - Eritrean Nakfa + // * `EEK` - Estonian Kroon + // * `ETB` - Ethiopian Birr + // * `EUR` - Euro + // * `XBA` - European Composite Unit + // * `XEU` - European Currency Unit + // * `XBB` - European Monetary Unit + // * `XBC` - European Unit of Account (XBC) + // * `XBD` - European Unit of Account (XBD) + // * `FKP` - Falkland Islands Pound + // * `FJD` - Fijian Dollar + // * `FIM` - Finnish Markka + // * `FRF` - French Franc + // * `XFO` - French Gold Franc + // * `XFU` - French UIC-Franc + // * `GMD` - Gambian Dalasi + // * `GEK` - Georgian Kupon Larit + // * `GEL` - Georgian Lari + // * `DEM` - German Mark + // * `GHS` - Ghanaian Cedi + // * `GHC` - Ghanaian Cedi (1979–2007) + // * `GIP` - Gibraltar Pound + // * `XAU` - Gold + // * `GRD` - Greek Drachma + // * `GTQ` - Guatemalan Quetzal + // * `GWP` - Guinea-Bissau Peso + // * `GNF` - Guinean Franc + // * `GNS` - Guinean Syli + // * `GYD` - Guyanaese Dollar + // * `HTG` - Haitian Gourde + // * `HNL` - Honduran Lempira + // * `HKD` - Hong Kong Dollar + // * `HUF` - Hungarian Forint + // * `IMP` - IMP + // * `ISK` - Icelandic Króna + // * `ISJ` - Icelandic Króna (1918–1981) + // * `INR` - Indian Rupee + // * `IDR` - Indonesian Rupiah + // * `IRR` - Iranian Rial + // * `IQD` - Iraqi Dinar + // * `IEP` - Irish Pound + // * `ILS` - Israeli New Shekel + // * `ILP` - Israeli Pound + // * `ILR` - Israeli Shekel (1980–1985) + // * `ITL` - Italian Lira + // * `JMD` - Jamaican Dollar + // * `JPY` - Japanese Yen + // * `JOD` - Jordanian Dinar + // * `KZT` - Kazakhstani Tenge + // * `KES` - Kenyan Shilling + // * `KWD` - Kuwaiti Dinar + // * `KGS` - Kyrgystani Som + // * `LAK` - Laotian Kip + // * `LVL` - Latvian Lats + // * `LVR` - Latvian Ruble + // * `LBP` - Lebanese Pound + // * `LSL` - Lesotho Loti + // * `LRD` - Liberian Dollar + // * `LYD` - Libyan Dinar + // * `LTL` - Lithuanian Litas + // * `LTT` - Lithuanian Talonas + // * `LUL` - Luxembourg Financial Franc + // * `LUC` - Luxembourgian Convertible Franc + // * `LUF` - Luxembourgian Franc + // * `MOP` - Macanese Pataca + // * `MKD` - Macedonian Denar + // * `MKN` - Macedonian Denar (1992–1993) + // * `MGA` - Malagasy Ariary + // * `MGF` - Malagasy Franc + // * `MWK` - Malawian Kwacha + // * `MYR` - Malaysian Ringgit + // * `MVR` - Maldivian Rufiyaa + // * `MVP` - Maldivian Rupee (1947–1981) + // * `MLF` - Malian Franc + // * `MTL` - Maltese Lira + // * `MTP` - Maltese Pound + // * `MRU` - Mauritanian Ouguiya + // * `MRO` - Mauritanian Ouguiya (1973–2017) + // * `MUR` - Mauritian Rupee + // * `MXV` - Mexican Investment Unit + // * `MXN` - Mexican Peso + // * `MXP` - Mexican Silver Peso (1861–1992) + // * `MDC` - Moldovan Cupon + // * `MDL` - Moldovan Leu + // * `MCF` - Monegasque Franc + // * `MNT` - Mongolian Tugrik + // * `MAD` - Moroccan Dirham + // * `MAF` - Moroccan Franc + // * `MZE` - Mozambican Escudo + // * `MZN` - Mozambican Metical + // * `MZM` - Mozambican Metical (1980–2006) + // * `MMK` - Myanmar Kyat + // * `NAD` - Namibian Dollar + // * `NPR` - Nepalese Rupee + // * `ANG` - Netherlands Antillean Guilder + // * `TWD` - New Taiwan Dollar + // * `NZD` - New Zealand Dollar + // * `NIO` - Nicaraguan Córdoba + // * `NIC` - Nicaraguan Córdoba (1988–1991) + // * `NGN` - Nigerian Naira + // * `KPW` - North Korean Won + // * `NOK` - Norwegian Krone + // * `OMR` - Omani Rial + // * `PKR` - Pakistani Rupee + // * `XPD` - Palladium + // * `PAB` - Panamanian Balboa + // * `PGK` - Papua New Guinean Kina + // * `PYG` - Paraguayan Guarani + // * `PEI` - Peruvian Inti + // * `PEN` - Peruvian Sol + // * `PES` - Peruvian Sol (1863–1965) + // * `PHP` - Philippine Peso + // * `XPT` - Platinum + // * `PLN` - Polish Zloty + // * `PLZ` - Polish Zloty (1950–1995) + // * `PTE` - Portuguese Escudo + // * `GWE` - Portuguese Guinea Escudo + // * `QAR` - Qatari Rial + // * `XRE` - RINET Funds + // * `RHD` - Rhodesian Dollar + // * `RON` - Romanian Leu + // * `ROL` - Romanian Leu (1952–2006) + // * `RUB` - Russian Ruble + // * `RUR` - Russian Ruble (1991–1998) + // * `RWF` - Rwandan Franc + // * `SVC` - Salvadoran Colón + // * `WST` - Samoan Tala + // * `SAR` - Saudi Riyal + // * `RSD` - Serbian Dinar + // * `CSD` - Serbian Dinar (2002–2006) + // * `SCR` - Seychellois Rupee + // * `SLL` - Sierra Leonean Leone + // * `XAG` - Silver + // * `SGD` - Singapore Dollar + // * `SKK` - Slovak Koruna + // * `SIT` - Slovenian Tolar + // * `SBD` - Solomon Islands Dollar + // * `SOS` - Somali Shilling + // * `ZAR` - South African Rand + // * `ZAL` - South African Rand (financial) + // * `KRH` - South Korean Hwan (1953–1962) + // * `KRW` - South Korean Won + // * `KRO` - South Korean Won (1945–1953) + // * `SSP` - South Sudanese Pound + // * `SUR` - Soviet Rouble + // * `ESP` - Spanish Peseta + // * `ESA` - Spanish Peseta (A account) + // * `ESB` - Spanish Peseta (convertible account) + // * `XDR` - Special Drawing Rights + // * `LKR` - Sri Lankan Rupee + // * `SHP` - St. Helena Pound + // * `XSU` - Sucre + // * `SDD` - Sudanese Dinar (1992–2007) + // * `SDG` - Sudanese Pound + // * `SDP` - Sudanese Pound (1957–1998) + // * `SRD` - Surinamese Dollar + // * `SRG` - Surinamese Guilder + // * `SZL` - Swazi Lilangeni + // * `SEK` - Swedish Krona + // * `CHF` - Swiss Franc + // * `SYP` - Syrian Pound + // * `STN` - São Tomé & Príncipe Dobra + // * `STD` - São Tomé & Príncipe Dobra (1977–2017) + // * `TVD` - TVD + // * `TJR` - Tajikistani Ruble + // * `TJS` - Tajikistani Somoni + // * `TZS` - Tanzanian Shilling + // * `XTS` - Testing Currency Code + // * `THB` - Thai Baht + // * `XXX` - The codes assigned for transactions where no currency is involved + // * `TPE` - Timorese Escudo + // * `TOP` - Tongan Paʻanga + // * `TTD` - Trinidad & Tobago Dollar + // * `TND` - Tunisian Dinar + // * `TRY` - Turkish Lira + // * `TRL` - Turkish Lira (1922–2005) + // * `TMT` - Turkmenistani Manat + // * `TMM` - Turkmenistani Manat (1993–2009) + // * `USD` - US Dollar + // * `USN` - US Dollar (Next day) + // * `USS` - US Dollar (Same day) + // * `UGX` - Ugandan Shilling + // * `UGS` - Ugandan Shilling (1966–1987) + // * `UAH` - Ukrainian Hryvnia + // * `UAK` - Ukrainian Karbovanets + // * `AED` - United Arab Emirates Dirham + // * `UYW` - Uruguayan Nominal Wage Index Unit + // * `UYU` - Uruguayan Peso + // * `UYP` - Uruguayan Peso (1975–1993) + // * `UYI` - Uruguayan Peso (Indexed Units) + // * `UZS` - Uzbekistani Som + // * `VUV` - Vanuatu Vatu + // * `VES` - Venezuelan Bolívar + // * `VEB` - Venezuelan Bolívar (1871–2008) + // * `VEF` - Venezuelan Bolívar (2008–2018) + // * `VND` - Vietnamese Dong + // * `VNN` - Vietnamese Dong (1978–1985) + // * `CHE` - WIR Euro + // * `CHW` - WIR Franc + // * `XOF` - West African CFA Franc + // * `YDD` - Yemeni Dinar + // * `YER` - Yemeni Rial + // * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + // * `YUD` - Yugoslavian Hard Dinar (1966–1990) + // * `YUM` - Yugoslavian New Dinar (1994–2002) + // * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + // * `ZWN` - ZWN + // * `ZRN` - Zairean New Zaire (1993–1998) + // * `ZRZ` - Zairean Zaire (1971–1993) + // * `ZMW` - Zambian Kwacha + // * `ZMK` - Zambian Kwacha (1968–2012) + // * `ZWD` - Zimbabwean Dollar (1980–2008) + // * `ZWR` - Zimbabwean Dollar (2008) + // * `ZWL` - Zimbabwean Dollar (2009) + Currency *PaymentRequestCurrency `json:"currency,omitempty" url:"currency,omitempty"` + // The payment's exchange rate. + ExchangeRate *string `json:"exchange_rate,omitempty" url:"exchange_rate,omitempty"` + // The company the payment belongs to. + Company *PaymentRequestCompany `json:"company,omitempty" url:"company,omitempty"` + // The total amount of money being paid to the supplier, or customer, after taxes. + TotalAmount *float64 `json:"total_amount,omitempty" url:"total_amount,omitempty"` + // The type of the invoice. + // + // * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE + // * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE + Type *PaymentRequestType `json:"type,omitempty" url:"type,omitempty"` + TrackingCategories []*PaymentRequestTrackingCategoriesItem `json:"tracking_categories,omitempty" url:"tracking_categories,omitempty"` + // The accounting period that the Payment was generated in. + AccountingPeriod *PaymentRequestAccountingPeriod `json:"accounting_period,omitempty" url:"accounting_period,omitempty"` + // A list of “Payment Applied to Lines” objects. + AppliedToLines []*PaymentRequestAppliedToLinesItem `json:"applied_to_lines,omitempty" url:"applied_to_lines,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + RemoteFields []*RemoteFieldRequest `json:"remote_fields,omitempty" url:"remote_fields,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaymentRequest) GetTransactionDate() *time.Time { + if p == nil { + return nil + } + return p.TransactionDate +} + +func (p *PaymentRequest) GetContact() *PaymentRequestContact { + if p == nil { + return nil + } + return p.Contact +} + +func (p *PaymentRequest) GetAccount() *PaymentRequestAccount { + if p == nil { + return nil + } + return p.Account +} + +func (p *PaymentRequest) GetPaymentMethod() *PaymentRequestPaymentMethod { + if p == nil { + return nil + } + return p.PaymentMethod +} + +func (p *PaymentRequest) GetCurrency() *PaymentRequestCurrency { + if p == nil { + return nil + } + return p.Currency +} + +func (p *PaymentRequest) GetExchangeRate() *string { + if p == nil { + return nil + } + return p.ExchangeRate +} + +func (p *PaymentRequest) GetCompany() *PaymentRequestCompany { + if p == nil { + return nil + } + return p.Company +} + +func (p *PaymentRequest) GetTotalAmount() *float64 { + if p == nil { + return nil + } + return p.TotalAmount +} + +func (p *PaymentRequest) GetType() *PaymentRequestType { + if p == nil { + return nil + } + return p.Type +} + +func (p *PaymentRequest) GetTrackingCategories() []*PaymentRequestTrackingCategoriesItem { + if p == nil { + return nil + } + return p.TrackingCategories +} + +func (p *PaymentRequest) GetAccountingPeriod() *PaymentRequestAccountingPeriod { + if p == nil { + return nil + } + return p.AccountingPeriod +} + +func (p *PaymentRequest) GetAppliedToLines() []*PaymentRequestAppliedToLinesItem { + if p == nil { + return nil + } + return p.AppliedToLines +} + +func (p *PaymentRequest) GetIntegrationParams() map[string]interface{} { + if p == nil { + return nil + } + return p.IntegrationParams +} + +func (p *PaymentRequest) GetLinkedAccountParams() map[string]interface{} { + if p == nil { + return nil + } + return p.LinkedAccountParams +} + +func (p *PaymentRequest) GetRemoteFields() []*RemoteFieldRequest { + if p == nil { + return nil + } + return p.RemoteFields +} + +func (p *PaymentRequest) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaymentRequest) UnmarshalJSON(data []byte) error { + type embed PaymentRequest + var unmarshaler = struct { + embed + TransactionDate *internal.DateTime `json:"transaction_date,omitempty"` + }{ + embed: embed(*p), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *p = PaymentRequest(unmarshaler.embed) + p.TransactionDate = unmarshaler.TransactionDate.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaymentRequest) MarshalJSON() ([]byte, error) { + type embed PaymentRequest + var marshaler = struct { + embed + TransactionDate *internal.DateTime `json:"transaction_date,omitempty"` + }{ + embed: embed(*p), + TransactionDate: internal.NewOptionalDateTime(p.TransactionDate), + } + return json.Marshal(marshaler) +} + +func (p *PaymentRequest) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +// The supplier’s or customer’s account in which the payment is made. +type PaymentRequestAccount struct { + String string + Account *Account + + typ string +} + +func (p *PaymentRequestAccount) GetString() string { + if p == nil { + return "" + } + return p.String +} + +func (p *PaymentRequestAccount) GetAccount() *Account { + if p == nil { + return nil + } + return p.Account +} + +func (p *PaymentRequestAccount) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + p.typ = "String" + p.String = valueString + return nil + } + valueAccount := new(Account) + if err := json.Unmarshal(data, &valueAccount); err == nil { + p.typ = "Account" + p.Account = valueAccount + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, p) +} + +func (p PaymentRequestAccount) MarshalJSON() ([]byte, error) { + if p.typ == "String" || p.String != "" { + return json.Marshal(p.String) + } + if p.typ == "Account" || p.Account != nil { + return json.Marshal(p.Account) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) +} + +type PaymentRequestAccountVisitor interface { + VisitString(string) error + VisitAccount(*Account) error +} + +func (p *PaymentRequestAccount) Accept(visitor PaymentRequestAccountVisitor) error { + if p.typ == "String" || p.String != "" { + return visitor.VisitString(p.String) + } + if p.typ == "Account" || p.Account != nil { + return visitor.VisitAccount(p.Account) + } + return fmt.Errorf("type %T does not include a non-empty union type", p) +} + +// The accounting period that the Payment was generated in. +type PaymentRequestAccountingPeriod struct { + String string + AccountingPeriod *AccountingPeriod + + typ string +} + +func (p *PaymentRequestAccountingPeriod) GetString() string { + if p == nil { + return "" + } + return p.String +} + +func (p *PaymentRequestAccountingPeriod) GetAccountingPeriod() *AccountingPeriod { + if p == nil { + return nil + } + return p.AccountingPeriod +} + +func (p *PaymentRequestAccountingPeriod) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + p.typ = "String" + p.String = valueString + return nil + } + valueAccountingPeriod := new(AccountingPeriod) + if err := json.Unmarshal(data, &valueAccountingPeriod); err == nil { + p.typ = "AccountingPeriod" + p.AccountingPeriod = valueAccountingPeriod + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, p) +} + +func (p PaymentRequestAccountingPeriod) MarshalJSON() ([]byte, error) { + if p.typ == "String" || p.String != "" { + return json.Marshal(p.String) + } + if p.typ == "AccountingPeriod" || p.AccountingPeriod != nil { + return json.Marshal(p.AccountingPeriod) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) +} + +type PaymentRequestAccountingPeriodVisitor interface { + VisitString(string) error + VisitAccountingPeriod(*AccountingPeriod) error +} + +func (p *PaymentRequestAccountingPeriod) Accept(visitor PaymentRequestAccountingPeriodVisitor) error { + if p.typ == "String" || p.String != "" { + return visitor.VisitString(p.String) + } + if p.typ == "AccountingPeriod" || p.AccountingPeriod != nil { + return visitor.VisitAccountingPeriod(p.AccountingPeriod) + } + return fmt.Errorf("type %T does not include a non-empty union type", p) +} + +type PaymentRequestAppliedToLinesItem struct { + String string + PaymentLineItemRequest *PaymentLineItemRequest + + typ string +} + +func (p *PaymentRequestAppliedToLinesItem) GetString() string { + if p == nil { + return "" + } + return p.String +} + +func (p *PaymentRequestAppliedToLinesItem) GetPaymentLineItemRequest() *PaymentLineItemRequest { + if p == nil { + return nil + } + return p.PaymentLineItemRequest +} + +func (p *PaymentRequestAppliedToLinesItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + p.typ = "String" + p.String = valueString + return nil + } + valuePaymentLineItemRequest := new(PaymentLineItemRequest) + if err := json.Unmarshal(data, &valuePaymentLineItemRequest); err == nil { + p.typ = "PaymentLineItemRequest" + p.PaymentLineItemRequest = valuePaymentLineItemRequest + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, p) +} + +func (p PaymentRequestAppliedToLinesItem) MarshalJSON() ([]byte, error) { + if p.typ == "String" || p.String != "" { + return json.Marshal(p.String) + } + if p.typ == "PaymentLineItemRequest" || p.PaymentLineItemRequest != nil { + return json.Marshal(p.PaymentLineItemRequest) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) +} + +type PaymentRequestAppliedToLinesItemVisitor interface { + VisitString(string) error + VisitPaymentLineItemRequest(*PaymentLineItemRequest) error +} + +func (p *PaymentRequestAppliedToLinesItem) Accept(visitor PaymentRequestAppliedToLinesItemVisitor) error { + if p.typ == "String" || p.String != "" { + return visitor.VisitString(p.String) + } + if p.typ == "PaymentLineItemRequest" || p.PaymentLineItemRequest != nil { + return visitor.VisitPaymentLineItemRequest(p.PaymentLineItemRequest) + } + return fmt.Errorf("type %T does not include a non-empty union type", p) +} + +// The company the payment belongs to. +type PaymentRequestCompany struct { + String string + CompanyInfo *CompanyInfo + + typ string +} + +func (p *PaymentRequestCompany) GetString() string { + if p == nil { + return "" + } + return p.String +} + +func (p *PaymentRequestCompany) GetCompanyInfo() *CompanyInfo { + if p == nil { + return nil + } + return p.CompanyInfo +} + +func (p *PaymentRequestCompany) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + p.typ = "String" + p.String = valueString + return nil + } + valueCompanyInfo := new(CompanyInfo) + if err := json.Unmarshal(data, &valueCompanyInfo); err == nil { + p.typ = "CompanyInfo" + p.CompanyInfo = valueCompanyInfo + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, p) +} + +func (p PaymentRequestCompany) MarshalJSON() ([]byte, error) { + if p.typ == "String" || p.String != "" { + return json.Marshal(p.String) + } + if p.typ == "CompanyInfo" || p.CompanyInfo != nil { + return json.Marshal(p.CompanyInfo) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) +} + +type PaymentRequestCompanyVisitor interface { + VisitString(string) error + VisitCompanyInfo(*CompanyInfo) error +} + +func (p *PaymentRequestCompany) Accept(visitor PaymentRequestCompanyVisitor) error { + if p.typ == "String" || p.String != "" { + return visitor.VisitString(p.String) + } + if p.typ == "CompanyInfo" || p.CompanyInfo != nil { + return visitor.VisitCompanyInfo(p.CompanyInfo) + } + return fmt.Errorf("type %T does not include a non-empty union type", p) +} + +// The supplier, or customer involved in the payment. +type PaymentRequestContact struct { + String string + Contact *Contact + + typ string +} + +func (p *PaymentRequestContact) GetString() string { + if p == nil { + return "" + } + return p.String +} + +func (p *PaymentRequestContact) GetContact() *Contact { + if p == nil { + return nil + } + return p.Contact +} + +func (p *PaymentRequestContact) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + p.typ = "String" + p.String = valueString + return nil + } + valueContact := new(Contact) + if err := json.Unmarshal(data, &valueContact); err == nil { + p.typ = "Contact" + p.Contact = valueContact + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, p) +} + +func (p PaymentRequestContact) MarshalJSON() ([]byte, error) { + if p.typ == "String" || p.String != "" { + return json.Marshal(p.String) + } + if p.typ == "Contact" || p.Contact != nil { + return json.Marshal(p.Contact) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) +} + +type PaymentRequestContactVisitor interface { + VisitString(string) error + VisitContact(*Contact) error +} + +func (p *PaymentRequestContact) Accept(visitor PaymentRequestContactVisitor) error { + if p.typ == "String" || p.String != "" { + return visitor.VisitString(p.String) + } + if p.typ == "Contact" || p.Contact != nil { + return visitor.VisitContact(p.Contact) + } + return fmt.Errorf("type %T does not include a non-empty union type", p) +} + +// The payment's currency. +// +// * `XUA` - ADB Unit of Account +// * `AFN` - Afghan Afghani +// * `AFA` - Afghan Afghani (1927–2002) +// * `ALL` - Albanian Lek +// * `ALK` - Albanian Lek (1946–1965) +// * `DZD` - Algerian Dinar +// * `ADP` - Andorran Peseta +// * `AOA` - Angolan Kwanza +// * `AOK` - Angolan Kwanza (1977–1991) +// * `AON` - Angolan New Kwanza (1990–2000) +// * `AOR` - Angolan Readjusted Kwanza (1995–1999) +// * `ARA` - Argentine Austral +// * `ARS` - Argentine Peso +// * `ARM` - Argentine Peso (1881–1970) +// * `ARP` - Argentine Peso (1983–1985) +// * `ARL` - Argentine Peso Ley (1970–1983) +// * `AMD` - Armenian Dram +// * `AWG` - Aruban Florin +// * `AUD` - Australian Dollar +// * `ATS` - Austrian Schilling +// * `AZN` - Azerbaijani Manat +// * `AZM` - Azerbaijani Manat (1993–2006) +// * `BSD` - Bahamian Dollar +// * `BHD` - Bahraini Dinar +// * `BDT` - Bangladeshi Taka +// * `BBD` - Barbadian Dollar +// * `BYN` - Belarusian Ruble +// * `BYB` - Belarusian Ruble (1994–1999) +// * `BYR` - Belarusian Ruble (2000–2016) +// * `BEF` - Belgian Franc +// * `BEC` - Belgian Franc (convertible) +// * `BEL` - Belgian Franc (financial) +// * `BZD` - Belize Dollar +// * `BMD` - Bermudan Dollar +// * `BTN` - Bhutanese Ngultrum +// * `BOB` - Bolivian Boliviano +// * `BOL` - Bolivian Boliviano (1863–1963) +// * `BOV` - Bolivian Mvdol +// * `BOP` - Bolivian Peso +// * `BAM` - Bosnia-Herzegovina Convertible Mark +// * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) +// * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) +// * `BWP` - Botswanan Pula +// * `BRC` - Brazilian Cruzado (1986–1989) +// * `BRZ` - Brazilian Cruzeiro (1942–1967) +// * `BRE` - Brazilian Cruzeiro (1990–1993) +// * `BRR` - Brazilian Cruzeiro (1993–1994) +// * `BRN` - Brazilian New Cruzado (1989–1990) +// * `BRB` - Brazilian New Cruzeiro (1967–1986) +// * `BRL` - Brazilian Real +// * `GBP` - British Pound +// * `BND` - Brunei Dollar +// * `BGL` - Bulgarian Hard Lev +// * `BGN` - Bulgarian Lev +// * `BGO` - Bulgarian Lev (1879–1952) +// * `BGM` - Bulgarian Socialist Lev +// * `BUK` - Burmese Kyat +// * `BIF` - Burundian Franc +// * `XPF` - CFP Franc +// * `KHR` - Cambodian Riel +// * `CAD` - Canadian Dollar +// * `CVE` - Cape Verdean Escudo +// * `KYD` - Cayman Islands Dollar +// * `XAF` - Central African CFA Franc +// * `CLE` - Chilean Escudo +// * `CLP` - Chilean Peso +// * `CLF` - Chilean Unit of Account (UF) +// * `CNX` - Chinese People’s Bank Dollar +// * `CNY` - Chinese Yuan +// * `CNH` - Chinese Yuan (offshore) +// * `COP` - Colombian Peso +// * `COU` - Colombian Real Value Unit +// * `KMF` - Comorian Franc +// * `CDF` - Congolese Franc +// * `CRC` - Costa Rican Colón +// * `HRD` - Croatian Dinar +// * `HRK` - Croatian Kuna +// * `CUC` - Cuban Convertible Peso +// * `CUP` - Cuban Peso +// * `CYP` - Cypriot Pound +// * `CZK` - Czech Koruna +// * `CSK` - Czechoslovak Hard Koruna +// * `DKK` - Danish Krone +// * `DJF` - Djiboutian Franc +// * `DOP` - Dominican Peso +// * `NLG` - Dutch Guilder +// * `XCD` - East Caribbean Dollar +// * `DDM` - East German Mark +// * `ECS` - Ecuadorian Sucre +// * `ECV` - Ecuadorian Unit of Constant Value +// * `EGP` - Egyptian Pound +// * `GQE` - Equatorial Guinean Ekwele +// * `ERN` - Eritrean Nakfa +// * `EEK` - Estonian Kroon +// * `ETB` - Ethiopian Birr +// * `EUR` - Euro +// * `XBA` - European Composite Unit +// * `XEU` - European Currency Unit +// * `XBB` - European Monetary Unit +// * `XBC` - European Unit of Account (XBC) +// * `XBD` - European Unit of Account (XBD) +// * `FKP` - Falkland Islands Pound +// * `FJD` - Fijian Dollar +// * `FIM` - Finnish Markka +// * `FRF` - French Franc +// * `XFO` - French Gold Franc +// * `XFU` - French UIC-Franc +// * `GMD` - Gambian Dalasi +// * `GEK` - Georgian Kupon Larit +// * `GEL` - Georgian Lari +// * `DEM` - German Mark +// * `GHS` - Ghanaian Cedi +// * `GHC` - Ghanaian Cedi (1979–2007) +// * `GIP` - Gibraltar Pound +// * `XAU` - Gold +// * `GRD` - Greek Drachma +// * `GTQ` - Guatemalan Quetzal +// * `GWP` - Guinea-Bissau Peso +// * `GNF` - Guinean Franc +// * `GNS` - Guinean Syli +// * `GYD` - Guyanaese Dollar +// * `HTG` - Haitian Gourde +// * `HNL` - Honduran Lempira +// * `HKD` - Hong Kong Dollar +// * `HUF` - Hungarian Forint +// * `IMP` - IMP +// * `ISK` - Icelandic Króna +// * `ISJ` - Icelandic Króna (1918–1981) +// * `INR` - Indian Rupee +// * `IDR` - Indonesian Rupiah +// * `IRR` - Iranian Rial +// * `IQD` - Iraqi Dinar +// * `IEP` - Irish Pound +// * `ILS` - Israeli New Shekel +// * `ILP` - Israeli Pound +// * `ILR` - Israeli Shekel (1980–1985) +// * `ITL` - Italian Lira +// * `JMD` - Jamaican Dollar +// * `JPY` - Japanese Yen +// * `JOD` - Jordanian Dinar +// * `KZT` - Kazakhstani Tenge +// * `KES` - Kenyan Shilling +// * `KWD` - Kuwaiti Dinar +// * `KGS` - Kyrgystani Som +// * `LAK` - Laotian Kip +// * `LVL` - Latvian Lats +// * `LVR` - Latvian Ruble +// * `LBP` - Lebanese Pound +// * `LSL` - Lesotho Loti +// * `LRD` - Liberian Dollar +// * `LYD` - Libyan Dinar +// * `LTL` - Lithuanian Litas +// * `LTT` - Lithuanian Talonas +// * `LUL` - Luxembourg Financial Franc +// * `LUC` - Luxembourgian Convertible Franc +// * `LUF` - Luxembourgian Franc +// * `MOP` - Macanese Pataca +// * `MKD` - Macedonian Denar +// * `MKN` - Macedonian Denar (1992–1993) +// * `MGA` - Malagasy Ariary +// * `MGF` - Malagasy Franc +// * `MWK` - Malawian Kwacha +// * `MYR` - Malaysian Ringgit +// * `MVR` - Maldivian Rufiyaa +// * `MVP` - Maldivian Rupee (1947–1981) +// * `MLF` - Malian Franc +// * `MTL` - Maltese Lira +// * `MTP` - Maltese Pound +// * `MRU` - Mauritanian Ouguiya +// * `MRO` - Mauritanian Ouguiya (1973–2017) +// * `MUR` - Mauritian Rupee +// * `MXV` - Mexican Investment Unit +// * `MXN` - Mexican Peso +// * `MXP` - Mexican Silver Peso (1861–1992) +// * `MDC` - Moldovan Cupon +// * `MDL` - Moldovan Leu +// * `MCF` - Monegasque Franc +// * `MNT` - Mongolian Tugrik +// * `MAD` - Moroccan Dirham +// * `MAF` - Moroccan Franc +// * `MZE` - Mozambican Escudo +// * `MZN` - Mozambican Metical +// * `MZM` - Mozambican Metical (1980–2006) +// * `MMK` - Myanmar Kyat +// * `NAD` - Namibian Dollar +// * `NPR` - Nepalese Rupee +// * `ANG` - Netherlands Antillean Guilder +// * `TWD` - New Taiwan Dollar +// * `NZD` - New Zealand Dollar +// * `NIO` - Nicaraguan Córdoba +// * `NIC` - Nicaraguan Córdoba (1988–1991) +// * `NGN` - Nigerian Naira +// * `KPW` - North Korean Won +// * `NOK` - Norwegian Krone +// * `OMR` - Omani Rial +// * `PKR` - Pakistani Rupee +// * `XPD` - Palladium +// * `PAB` - Panamanian Balboa +// * `PGK` - Papua New Guinean Kina +// * `PYG` - Paraguayan Guarani +// * `PEI` - Peruvian Inti +// * `PEN` - Peruvian Sol +// * `PES` - Peruvian Sol (1863–1965) +// * `PHP` - Philippine Peso +// * `XPT` - Platinum +// * `PLN` - Polish Zloty +// * `PLZ` - Polish Zloty (1950–1995) +// * `PTE` - Portuguese Escudo +// * `GWE` - Portuguese Guinea Escudo +// * `QAR` - Qatari Rial +// * `XRE` - RINET Funds +// * `RHD` - Rhodesian Dollar +// * `RON` - Romanian Leu +// * `ROL` - Romanian Leu (1952–2006) +// * `RUB` - Russian Ruble +// * `RUR` - Russian Ruble (1991–1998) +// * `RWF` - Rwandan Franc +// * `SVC` - Salvadoran Colón +// * `WST` - Samoan Tala +// * `SAR` - Saudi Riyal +// * `RSD` - Serbian Dinar +// * `CSD` - Serbian Dinar (2002–2006) +// * `SCR` - Seychellois Rupee +// * `SLL` - Sierra Leonean Leone +// * `XAG` - Silver +// * `SGD` - Singapore Dollar +// * `SKK` - Slovak Koruna +// * `SIT` - Slovenian Tolar +// * `SBD` - Solomon Islands Dollar +// * `SOS` - Somali Shilling +// * `ZAR` - South African Rand +// * `ZAL` - South African Rand (financial) +// * `KRH` - South Korean Hwan (1953–1962) +// * `KRW` - South Korean Won +// * `KRO` - South Korean Won (1945–1953) +// * `SSP` - South Sudanese Pound +// * `SUR` - Soviet Rouble +// * `ESP` - Spanish Peseta +// * `ESA` - Spanish Peseta (A account) +// * `ESB` - Spanish Peseta (convertible account) +// * `XDR` - Special Drawing Rights +// * `LKR` - Sri Lankan Rupee +// * `SHP` - St. Helena Pound +// * `XSU` - Sucre +// * `SDD` - Sudanese Dinar (1992–2007) +// * `SDG` - Sudanese Pound +// * `SDP` - Sudanese Pound (1957–1998) +// * `SRD` - Surinamese Dollar +// * `SRG` - Surinamese Guilder +// * `SZL` - Swazi Lilangeni +// * `SEK` - Swedish Krona +// * `CHF` - Swiss Franc +// * `SYP` - Syrian Pound +// * `STN` - São Tomé & Príncipe Dobra +// * `STD` - São Tomé & Príncipe Dobra (1977–2017) +// * `TVD` - TVD +// * `TJR` - Tajikistani Ruble +// * `TJS` - Tajikistani Somoni +// * `TZS` - Tanzanian Shilling +// * `XTS` - Testing Currency Code +// * `THB` - Thai Baht +// * `XXX` - The codes assigned for transactions where no currency is involved +// * `TPE` - Timorese Escudo +// * `TOP` - Tongan Paʻanga +// * `TTD` - Trinidad & Tobago Dollar +// * `TND` - Tunisian Dinar +// * `TRY` - Turkish Lira +// * `TRL` - Turkish Lira (1922–2005) +// * `TMT` - Turkmenistani Manat +// * `TMM` - Turkmenistani Manat (1993–2009) +// * `USD` - US Dollar +// * `USN` - US Dollar (Next day) +// * `USS` - US Dollar (Same day) +// * `UGX` - Ugandan Shilling +// * `UGS` - Ugandan Shilling (1966–1987) +// * `UAH` - Ukrainian Hryvnia +// * `UAK` - Ukrainian Karbovanets +// * `AED` - United Arab Emirates Dirham +// * `UYW` - Uruguayan Nominal Wage Index Unit +// * `UYU` - Uruguayan Peso +// * `UYP` - Uruguayan Peso (1975–1993) +// * `UYI` - Uruguayan Peso (Indexed Units) +// * `UZS` - Uzbekistani Som +// * `VUV` - Vanuatu Vatu +// * `VES` - Venezuelan Bolívar +// * `VEB` - Venezuelan Bolívar (1871–2008) +// * `VEF` - Venezuelan Bolívar (2008–2018) +// * `VND` - Vietnamese Dong +// * `VNN` - Vietnamese Dong (1978–1985) +// * `CHE` - WIR Euro +// * `CHW` - WIR Franc +// * `XOF` - West African CFA Franc +// * `YDD` - Yemeni Dinar +// * `YER` - Yemeni Rial +// * `YUN` - Yugoslavian Convertible Dinar (1990–1992) +// * `YUD` - Yugoslavian Hard Dinar (1966–1990) +// * `YUM` - Yugoslavian New Dinar (1994–2002) +// * `YUR` - Yugoslavian Reformed Dinar (1992–1993) +// * `ZWN` - ZWN +// * `ZRN` - Zairean New Zaire (1993–1998) +// * `ZRZ` - Zairean Zaire (1971–1993) +// * `ZMW` - Zambian Kwacha +// * `ZMK` - Zambian Kwacha (1968–2012) +// * `ZWD` - Zimbabwean Dollar (1980–2008) +// * `ZWR` - Zimbabwean Dollar (2008) +// * `ZWL` - Zimbabwean Dollar (2009) +type PaymentRequestCurrency struct { + TransactionCurrencyEnum TransactionCurrencyEnum + String string + + typ string +} + +func (p *PaymentRequestCurrency) GetTransactionCurrencyEnum() TransactionCurrencyEnum { + if p == nil { + return "" + } + return p.TransactionCurrencyEnum +} + +func (p *PaymentRequestCurrency) GetString() string { + if p == nil { + return "" + } + return p.String +} + +func (p *PaymentRequestCurrency) UnmarshalJSON(data []byte) error { + var valueTransactionCurrencyEnum TransactionCurrencyEnum + if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { + p.typ = "TransactionCurrencyEnum" + p.TransactionCurrencyEnum = valueTransactionCurrencyEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + p.typ = "String" + p.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, p) +} + +func (p PaymentRequestCurrency) MarshalJSON() ([]byte, error) { + if p.typ == "TransactionCurrencyEnum" || p.TransactionCurrencyEnum != "" { + return json.Marshal(p.TransactionCurrencyEnum) + } + if p.typ == "String" || p.String != "" { + return json.Marshal(p.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) +} + +type PaymentRequestCurrencyVisitor interface { + VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error + VisitString(string) error +} + +func (p *PaymentRequestCurrency) Accept(visitor PaymentRequestCurrencyVisitor) error { + if p.typ == "TransactionCurrencyEnum" || p.TransactionCurrencyEnum != "" { + return visitor.VisitTransactionCurrencyEnum(p.TransactionCurrencyEnum) + } + if p.typ == "String" || p.String != "" { + return visitor.VisitString(p.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", p) +} + +// The method which this payment was made by. +type PaymentRequestPaymentMethod struct { + String string + PaymentMethod *PaymentMethod + + typ string +} + +func (p *PaymentRequestPaymentMethod) GetString() string { + if p == nil { + return "" + } + return p.String +} + +func (p *PaymentRequestPaymentMethod) GetPaymentMethod() *PaymentMethod { + if p == nil { + return nil + } + return p.PaymentMethod +} + +func (p *PaymentRequestPaymentMethod) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + p.typ = "String" + p.String = valueString + return nil + } + valuePaymentMethod := new(PaymentMethod) + if err := json.Unmarshal(data, &valuePaymentMethod); err == nil { + p.typ = "PaymentMethod" + p.PaymentMethod = valuePaymentMethod + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, p) +} + +func (p PaymentRequestPaymentMethod) MarshalJSON() ([]byte, error) { + if p.typ == "String" || p.String != "" { + return json.Marshal(p.String) + } + if p.typ == "PaymentMethod" || p.PaymentMethod != nil { + return json.Marshal(p.PaymentMethod) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) +} + +type PaymentRequestPaymentMethodVisitor interface { + VisitString(string) error + VisitPaymentMethod(*PaymentMethod) error +} + +func (p *PaymentRequestPaymentMethod) Accept(visitor PaymentRequestPaymentMethodVisitor) error { + if p.typ == "String" || p.String != "" { + return visitor.VisitString(p.String) + } + if p.typ == "PaymentMethod" || p.PaymentMethod != nil { + return visitor.VisitPaymentMethod(p.PaymentMethod) + } + return fmt.Errorf("type %T does not include a non-empty union type", p) +} + +type PaymentRequestTrackingCategoriesItem struct { + String string + TrackingCategory *TrackingCategory + + typ string +} + +func (p *PaymentRequestTrackingCategoriesItem) GetString() string { + if p == nil { + return "" + } + return p.String +} + +func (p *PaymentRequestTrackingCategoriesItem) GetTrackingCategory() *TrackingCategory { + if p == nil { + return nil + } + return p.TrackingCategory +} + +func (p *PaymentRequestTrackingCategoriesItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + p.typ = "String" + p.String = valueString + return nil + } + valueTrackingCategory := new(TrackingCategory) + if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { + p.typ = "TrackingCategory" + p.TrackingCategory = valueTrackingCategory + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, p) +} + +func (p PaymentRequestTrackingCategoriesItem) MarshalJSON() ([]byte, error) { + if p.typ == "String" || p.String != "" { + return json.Marshal(p.String) + } + if p.typ == "TrackingCategory" || p.TrackingCategory != nil { + return json.Marshal(p.TrackingCategory) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) +} + +type PaymentRequestTrackingCategoriesItemVisitor interface { + VisitString(string) error + VisitTrackingCategory(*TrackingCategory) error +} + +func (p *PaymentRequestTrackingCategoriesItem) Accept(visitor PaymentRequestTrackingCategoriesItemVisitor) error { + if p.typ == "String" || p.String != "" { + return visitor.VisitString(p.String) + } + if p.typ == "TrackingCategory" || p.TrackingCategory != nil { + return visitor.VisitTrackingCategory(p.TrackingCategory) + } + return fmt.Errorf("type %T does not include a non-empty union type", p) +} + +// The type of the invoice. +// +// * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE +// * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE +type PaymentRequestType struct { + PaymentTypeEnum PaymentTypeEnum + String string + + typ string +} + +func (p *PaymentRequestType) GetPaymentTypeEnum() PaymentTypeEnum { + if p == nil { + return "" + } + return p.PaymentTypeEnum +} + +func (p *PaymentRequestType) GetString() string { + if p == nil { + return "" + } + return p.String +} + +func (p *PaymentRequestType) UnmarshalJSON(data []byte) error { + var valuePaymentTypeEnum PaymentTypeEnum + if err := json.Unmarshal(data, &valuePaymentTypeEnum); err == nil { + p.typ = "PaymentTypeEnum" + p.PaymentTypeEnum = valuePaymentTypeEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + p.typ = "String" + p.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, p) +} + +func (p PaymentRequestType) MarshalJSON() ([]byte, error) { + if p.typ == "PaymentTypeEnum" || p.PaymentTypeEnum != "" { + return json.Marshal(p.PaymentTypeEnum) + } + if p.typ == "String" || p.String != "" { + return json.Marshal(p.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) +} + +type PaymentRequestTypeVisitor interface { + VisitPaymentTypeEnum(PaymentTypeEnum) error + VisitString(string) error +} + +func (p *PaymentRequestType) Accept(visitor PaymentRequestTypeVisitor) error { + if p.typ == "PaymentTypeEnum" || p.PaymentTypeEnum != "" { + return visitor.VisitPaymentTypeEnum(p.PaymentTypeEnum) + } + if p.typ == "String" || p.String != "" { + return visitor.VisitString(p.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", p) +} + +type PaymentResponse struct { + Model *Payment `json:"model" url:"model"` + Warnings []*WarningValidationProblem `json:"warnings" url:"warnings"` + Errors []*ErrorValidationProblem `json:"errors" url:"errors"` + Logs []*DebugModeLog `json:"logs,omitempty" url:"logs,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaymentResponse) GetModel() *Payment { + if p == nil { + return nil + } + return p.Model +} + +func (p *PaymentResponse) GetWarnings() []*WarningValidationProblem { + if p == nil { + return nil + } + return p.Warnings +} + +func (p *PaymentResponse) GetErrors() []*ErrorValidationProblem { + if p == nil { + return nil + } + return p.Errors +} + +func (p *PaymentResponse) GetLogs() []*DebugModeLog { + if p == nil { + return nil + } + return p.Logs +} + +func (p *PaymentResponse) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaymentResponse) UnmarshalJSON(data []byte) error { + type unmarshaler PaymentResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaymentResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaymentResponse) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} diff --git a/accounting/payments/client.go b/accounting/payments/client.go index c65a611..93319d1 100644 --- a/accounting/payments/client.go +++ b/accounting/payments/client.go @@ -1,142 +1,135 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package payments import ( context "context" fmt "fmt" - accounting "github.com/merge-api/merge-go-client/accounting" - core "github.com/merge-api/merge-go-client/core" + accounting "github.com/merge-api/merge-go-client/v2/accounting" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `Payment` objects. -func (c *Client) List(ctx context.Context, request *accounting.PaymentsListRequest) (*accounting.PaginatedPaymentList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/payments" - - queryParams := make(url.Values) - if request.AccountId != nil { - queryParams.Add("account_id", fmt.Sprintf("%v", *request.AccountId)) - } - if request.CompanyId != nil { - queryParams.Add("company_id", fmt.Sprintf("%v", *request.CompanyId)) - } - if request.ContactId != nil { - queryParams.Add("contact_id", fmt.Sprintf("%v", *request.ContactId)) - } - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeRemoteFields != nil { - queryParams.Add("include_remote_fields", fmt.Sprintf("%v", *request.IncludeRemoteFields)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if request.TransactionDateAfter != nil { - queryParams.Add("transaction_date_after", fmt.Sprintf("%v", request.TransactionDateAfter.Format(time.RFC3339))) - } - if request.TransactionDateBefore != nil { - queryParams.Add("transaction_date_before", fmt.Sprintf("%v", request.TransactionDateBefore.Format(time.RFC3339))) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *accounting.PaginatedPaymentList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *accounting.PaymentsListRequest, + opts ...option.RequestOption, +) (*core.Page[*accounting.Payment], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/payments" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *accounting.PaginatedPaymentList) *internal.PageResponse[*string, *accounting.Payment] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *accounting.Payment]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Creates a `Payment` object with the given values. -func (c *Client) Create(ctx context.Context, request *accounting.PaymentEndpointRequest) (*accounting.PaymentResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/payments" - - queryParams := make(url.Values) - if request.IsDebugMode != nil { - queryParams.Add("is_debug_mode", fmt.Sprintf("%v", *request.IsDebugMode)) - } - if request.RunAsync != nil { - queryParams.Add("run_async", fmt.Sprintf("%v", *request.RunAsync)) +func (c *Client) Create( + ctx context.Context, + request *accounting.PaymentEndpointRequest, + opts ...option.RequestOption, +) (*accounting.PaymentResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/payments" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *accounting.PaymentResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -145,35 +138,46 @@ func (c *Client) Create(ctx context.Context, request *accounting.PaymentEndpoint } // Returns a `Payment` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *accounting.PaymentsRetrieveRequest) (*accounting.Payment, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"accounting/v1/payments/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeRemoteFields != nil { - queryParams.Add("include_remote_fields", fmt.Sprintf("%v", *request.IncludeRemoteFields)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *accounting.PaymentsRetrieveRequest, + opts ...option.RequestOption, +) (*accounting.Payment, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/accounting/v1/payments/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *accounting.Payment if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -182,33 +186,48 @@ func (c *Client) Retrieve(ctx context.Context, id string, request *accounting.Pa } // Updates a `Payment` object with the given `id`. -func (c *Client) PartialUpdate(ctx context.Context, id string, request *accounting.PatchedPaymentEndpointRequest) (*accounting.PaymentResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"accounting/v1/payments/%v", id) - - queryParams := make(url.Values) - if request.IsDebugMode != nil { - queryParams.Add("is_debug_mode", fmt.Sprintf("%v", *request.IsDebugMode)) - } - if request.RunAsync != nil { - queryParams.Add("run_async", fmt.Sprintf("%v", *request.RunAsync)) +func (c *Client) PartialUpdate( + ctx context.Context, + id string, + request *accounting.PatchedPaymentEndpointRequest, + opts ...option.RequestOption, +) (*accounting.PaymentResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/accounting/v1/payments/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *accounting.PaymentResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPatch, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPatch, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -217,67 +236,97 @@ func (c *Client) PartialUpdate(ctx context.Context, id string, request *accounti } // Returns a list of `RemoteFieldClass` objects. -func (c *Client) LineItemsRemoteFieldClassesList(ctx context.Context, request *accounting.PaymentsLineItemsRemoteFieldClassesListRequest) (*accounting.PaginatedRemoteFieldClassList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/payments/line-items/remote-field-classes" - - queryParams := make(url.Values) - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.IsCommonModelField != nil { - queryParams.Add("is_common_model_field", fmt.Sprintf("%v", *request.IsCommonModelField)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *accounting.PaginatedRemoteFieldClassList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) LineItemsRemoteFieldClassesList( + ctx context.Context, + request *accounting.PaymentsLineItemsRemoteFieldClassesListRequest, + opts ...option.RequestOption, +) (*core.Page[*accounting.RemoteFieldClass], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/payments/line-items/remote-field-classes" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *accounting.PaginatedRemoteFieldClassList) *internal.PageResponse[*string, *accounting.RemoteFieldClass] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *accounting.RemoteFieldClass]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Returns metadata for `Payment` PATCHs. -func (c *Client) MetaPatchRetrieve(ctx context.Context, id string) (*accounting.MetaResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"accounting/v1/payments/meta/patch/%v", id) +func (c *Client) MetaPatchRetrieve( + ctx context.Context, + id string, + opts ...option.RequestOption, +) (*accounting.MetaResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/accounting/v1/payments/meta/patch/%v", + id, + ) + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *accounting.MetaResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -286,21 +335,34 @@ func (c *Client) MetaPatchRetrieve(ctx context.Context, id string) (*accounting. } // Returns metadata for `Payment` POSTs. -func (c *Client) MetaPostRetrieve(ctx context.Context) (*accounting.MetaResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/payments/meta/post" +func (c *Client) MetaPostRetrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*accounting.MetaResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/payments/meta/post" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *accounting.MetaResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -309,47 +371,60 @@ func (c *Client) MetaPostRetrieve(ctx context.Context) (*accounting.MetaResponse } // Returns a list of `RemoteFieldClass` objects. -func (c *Client) RemoteFieldClassesList(ctx context.Context, request *accounting.PaymentsRemoteFieldClassesListRequest) (*accounting.PaginatedRemoteFieldClassList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/payments/remote-field-classes" - - queryParams := make(url.Values) - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.IsCommonModelField != nil { - queryParams.Add("is_common_model_field", fmt.Sprintf("%v", *request.IsCommonModelField)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *accounting.PaginatedRemoteFieldClassList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) RemoteFieldClassesList( + ctx context.Context, + request *accounting.PaymentsRemoteFieldClassesListRequest, + opts ...option.RequestOption, +) (*core.Page[*accounting.RemoteFieldClass], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/payments/remote-field-classes" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *accounting.PaginatedRemoteFieldClassList) *internal.PageResponse[*string, *accounting.RemoteFieldClass] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *accounting.RemoteFieldClass]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } diff --git a/accounting/paymentterms/client.go b/accounting/paymentterms/client.go new file mode 100644 index 0000000..de2079c --- /dev/null +++ b/accounting/paymentterms/client.go @@ -0,0 +1,140 @@ +// Code generated by Fern. DO NOT EDIT. + +package paymentterms + +import ( + context "context" + fmt "fmt" + accounting "github.com/merge-api/merge-go-client/v2/accounting" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" + http "net/http" +) + +type Client struct { + baseURL string + caller *internal.Caller + header http.Header +} + +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) + return &Client{ + baseURL: options.BaseURL, + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), + } +} + +// Returns a list of `PaymentTerm` objects. +func (c *Client) List( + ctx context.Context, + request *accounting.PaymentTermsListRequest, + opts ...option.RequestOption, +) (*core.Page[*accounting.PaymentTerm], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/payment-terms" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err + } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *accounting.PaginatedPaymentTermList) *internal.PageResponse[*string, *accounting.PaymentTerm] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *accounting.PaymentTerm]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) +} + +// Returns a `PaymentTerm` object with the given `id`. +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *accounting.PaymentTermsRetrieveRequest, + opts ...option.RequestOption, +) (*accounting.PaymentTerm, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/accounting/v1/payment-terms/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err + } + if len(queryParams) > 0 { + endpointURL += "?" + queryParams.Encode() + } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + var response *accounting.PaymentTerm + if err := c.caller.Call( + ctx, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, + }, + ); err != nil { + return nil, err + } + return response, nil +} diff --git a/accounting/phone_numbers.go b/accounting/phone_numbers.go index 07a00d1..2c9fdd7 100644 --- a/accounting/phone_numbers.go +++ b/accounting/phone_numbers.go @@ -1,8 +1,10 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package accounting type PhoneNumbersRetrieveRequest struct { // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` } diff --git a/accounting/phonenumbers/client.go b/accounting/phonenumbers/client.go index ed38324..c07c702 100644 --- a/accounting/phonenumbers/client.go +++ b/accounting/phonenumbers/client.go @@ -1,58 +1,77 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package phonenumbers import ( context "context" - fmt "fmt" - accounting "github.com/merge-api/merge-go-client/accounting" - core "github.com/merge-api/merge-go-client/core" + accounting "github.com/merge-api/merge-go-client/v2/accounting" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns an `AccountingPhoneNumber` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *accounting.PhoneNumbersRetrieveRequest) (*accounting.AccountingPhoneNumber, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"accounting/v1/phone-numbers/%v", id) - - queryParams := make(url.Values) - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *accounting.PhoneNumbersRetrieveRequest, + opts ...option.RequestOption, +) (*accounting.AccountingPhoneNumber, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/accounting/v1/phone-numbers/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *accounting.AccountingPhoneNumber if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/accounting/projects.go b/accounting/projects.go new file mode 100644 index 0000000..84b26a7 --- /dev/null +++ b/accounting/projects.go @@ -0,0 +1,139 @@ +// Code generated by Fern. DO NOT EDIT. + +package accounting + +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" +) + +type ProjectsListRequest struct { + // The pagination cursor value. + Cursor *string `json:"-" url:"cursor,omitempty"` + // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + Expand []*ProjectsListRequestExpandItem `json:"-" url:"expand,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` + // Whether to include the original data Merge fetched from the third-party to produce these models. + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` + // Number of results to return per page. + PageSize *int `json:"-" url:"page_size,omitempty"` +} + +type ProjectsRetrieveRequest struct { + // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + Expand []*ProjectsRetrieveRequestExpandItem `json:"-" url:"expand,omitempty"` + // Whether to include the original data Merge fetched from the third-party to produce these models. + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` +} + +type ProjectsListRequestExpandItem string + +const ( + ProjectsListRequestExpandItemCompany ProjectsListRequestExpandItem = "company" + ProjectsListRequestExpandItemContact ProjectsListRequestExpandItem = "contact" +) + +func NewProjectsListRequestExpandItemFromString(s string) (ProjectsListRequestExpandItem, error) { + switch s { + case "company": + return ProjectsListRequestExpandItemCompany, nil + case "contact": + return ProjectsListRequestExpandItemContact, nil + } + var t ProjectsListRequestExpandItem + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (p ProjectsListRequestExpandItem) Ptr() *ProjectsListRequestExpandItem { + return &p +} + +type ProjectsRetrieveRequestExpandItem string + +const ( + ProjectsRetrieveRequestExpandItemCompany ProjectsRetrieveRequestExpandItem = "company" + ProjectsRetrieveRequestExpandItemContact ProjectsRetrieveRequestExpandItem = "contact" +) + +func NewProjectsRetrieveRequestExpandItemFromString(s string) (ProjectsRetrieveRequestExpandItem, error) { + switch s { + case "company": + return ProjectsRetrieveRequestExpandItemCompany, nil + case "contact": + return ProjectsRetrieveRequestExpandItemContact, nil + } + var t ProjectsRetrieveRequestExpandItem + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (p ProjectsRetrieveRequestExpandItem) Ptr() *ProjectsRetrieveRequestExpandItem { + return &p +} + +type PaginatedProjectList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Project `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedProjectList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedProjectList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedProjectList) GetResults() []*Project { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedProjectList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedProjectList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedProjectList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedProjectList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedProjectList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} diff --git a/accounting/projects/client.go b/accounting/projects/client.go new file mode 100644 index 0000000..c98da2b --- /dev/null +++ b/accounting/projects/client.go @@ -0,0 +1,124 @@ +// Code generated by Fern. DO NOT EDIT. + +package projects + +import ( + context "context" + accounting "github.com/merge-api/merge-go-client/v2/accounting" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" + http "net/http" +) + +type Client struct { + baseURL string + caller *internal.Caller + header http.Header +} + +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) + return &Client{ + baseURL: options.BaseURL, + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), + } +} + +// Returns a list of `Project` objects. +func (c *Client) List( + ctx context.Context, + request *accounting.ProjectsListRequest, + opts ...option.RequestOption, +) (*accounting.PaginatedProjectList, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/projects" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err + } + if len(queryParams) > 0 { + endpointURL += "?" + queryParams.Encode() + } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + var response *accounting.PaginatedProjectList + if err := c.caller.Call( + ctx, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, + }, + ); err != nil { + return nil, err + } + return response, nil +} + +// Returns a `Project` object with the given `id`. +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *accounting.ProjectsRetrieveRequest, + opts ...option.RequestOption, +) (*accounting.Project, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/accounting/v1/projects/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err + } + if len(queryParams) > 0 { + endpointURL += "?" + queryParams.Encode() + } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + var response *accounting.Project + if err := c.caller.Call( + ctx, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, + }, + ); err != nil { + return nil, err + } + return response, nil +} diff --git a/accounting/purchase_orders.go b/accounting/purchase_orders.go index 5da7ab0..27b0f8f 100644 --- a/accounting/purchase_orders.go +++ b/accounting/purchase_orders.go @@ -1,506 +1,2531 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package accounting import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type PurchaseOrderEndpointRequest struct { // Whether to include debug fields (such as log file links) in the response. - IsDebugMode *bool `json:"-"` + IsDebugMode *bool `json:"-" url:"is_debug_mode,omitempty"` // Whether or not third-party updates should be run asynchronously. - RunAsync *bool `json:"-"` - Model *PurchaseOrderRequest `json:"model,omitempty"` + RunAsync *bool `json:"-" url:"run_async,omitempty"` + Model *PurchaseOrderRequest `json:"model,omitempty" url:"-"` } type PurchaseOrdersLineItemsRemoteFieldClassesListRequest struct { // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, will only return remote field classes with this is_common_model_field value - IsCommonModelField *bool `json:"-"` + IsCommonModelField *bool `json:"-" url:"is_common_model_field,omitempty"` + // If provided, will only return remote fields classes with this is_custom value + IsCustom *bool `json:"-" url:"is_custom,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` } type PurchaseOrdersListRequest struct { // If provided, will only return purchase orders for this company. - CompanyId *string `json:"-"` + CompanyId *string `json:"-" url:"company_id,omitempty"` // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *PurchaseOrdersListRequestExpand `json:"-"` + Expand []*PurchaseOrdersListRequestExpandItem `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - IncludeRemoteFields *bool `json:"-"` + IncludeRemoteFields *bool `json:"-" url:"include_remote_fields,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, will only return objects created after this datetime. - IssueDateAfter *time.Time `json:"-"` + IssueDateAfter *time.Time `json:"-" url:"issue_date_after,omitempty"` // If provided, will only return objects created before this datetime. - IssueDateBefore *time.Time `json:"-"` + IssueDateBefore *time.Time `json:"-" url:"issue_date_before,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // Deprecated. Use show_enum_origins. - RemoteFields *string `json:"-"` + RemoteFields *string `json:"-" url:"remote_fields,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` // 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) - ShowEnumOrigins *string `json:"-"` + ShowEnumOrigins *string `json:"-" url:"show_enum_origins,omitempty"` } type PurchaseOrdersRemoteFieldClassesListRequest struct { // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, will only return remote field classes with this is_common_model_field value - IsCommonModelField *bool `json:"-"` + IsCommonModelField *bool `json:"-" url:"is_common_model_field,omitempty"` + // If provided, will only return remote fields classes with this is_custom value + IsCustom *bool `json:"-" url:"is_custom,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` } type PurchaseOrdersRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *PurchaseOrdersRetrieveRequestExpand `json:"-"` + Expand []*PurchaseOrdersRetrieveRequestExpandItem `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - IncludeRemoteFields *bool `json:"-"` + IncludeRemoteFields *bool `json:"-" url:"include_remote_fields,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // Deprecated. Use show_enum_origins. - RemoteFields *string `json:"-"` + RemoteFields *string `json:"-" url:"remote_fields,omitempty"` // 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) - ShowEnumOrigins *string `json:"-"` + ShowEnumOrigins *string `json:"-" url:"show_enum_origins,omitempty"` } -type PurchaseOrdersListRequestExpand string +type PurchaseOrdersListRequestExpandItem string const ( - PurchaseOrdersListRequestExpandAccountingPeriod PurchaseOrdersListRequestExpand = "accounting_period" - PurchaseOrdersListRequestExpandCompany PurchaseOrdersListRequestExpand = "company" - PurchaseOrdersListRequestExpandCompanyAccountingPeriod PurchaseOrdersListRequestExpand = "company,accounting_period" - PurchaseOrdersListRequestExpandDeliveryAddress PurchaseOrdersListRequestExpand = "delivery_address" - PurchaseOrdersListRequestExpandDeliveryAddressAccountingPeriod PurchaseOrdersListRequestExpand = "delivery_address,accounting_period" - PurchaseOrdersListRequestExpandDeliveryAddressCompany PurchaseOrdersListRequestExpand = "delivery_address,company" - PurchaseOrdersListRequestExpandDeliveryAddressCompanyAccountingPeriod PurchaseOrdersListRequestExpand = "delivery_address,company,accounting_period" - PurchaseOrdersListRequestExpandDeliveryAddressVendor PurchaseOrdersListRequestExpand = "delivery_address,vendor" - PurchaseOrdersListRequestExpandDeliveryAddressVendorAccountingPeriod PurchaseOrdersListRequestExpand = "delivery_address,vendor,accounting_period" - PurchaseOrdersListRequestExpandDeliveryAddressVendorCompany PurchaseOrdersListRequestExpand = "delivery_address,vendor,company" - PurchaseOrdersListRequestExpandDeliveryAddressVendorCompanyAccountingPeriod PurchaseOrdersListRequestExpand = "delivery_address,vendor,company,accounting_period" - PurchaseOrdersListRequestExpandLineItems PurchaseOrdersListRequestExpand = "line_items" - PurchaseOrdersListRequestExpandLineItemsAccountingPeriod PurchaseOrdersListRequestExpand = "line_items,accounting_period" - PurchaseOrdersListRequestExpandLineItemsCompany PurchaseOrdersListRequestExpand = "line_items,company" - PurchaseOrdersListRequestExpandLineItemsCompanyAccountingPeriod PurchaseOrdersListRequestExpand = "line_items,company,accounting_period" - PurchaseOrdersListRequestExpandLineItemsDeliveryAddress PurchaseOrdersListRequestExpand = "line_items,delivery_address" - PurchaseOrdersListRequestExpandLineItemsDeliveryAddressAccountingPeriod PurchaseOrdersListRequestExpand = "line_items,delivery_address,accounting_period" - PurchaseOrdersListRequestExpandLineItemsDeliveryAddressCompany PurchaseOrdersListRequestExpand = "line_items,delivery_address,company" - PurchaseOrdersListRequestExpandLineItemsDeliveryAddressCompanyAccountingPeriod PurchaseOrdersListRequestExpand = "line_items,delivery_address,company,accounting_period" - PurchaseOrdersListRequestExpandLineItemsDeliveryAddressVendor PurchaseOrdersListRequestExpand = "line_items,delivery_address,vendor" - PurchaseOrdersListRequestExpandLineItemsDeliveryAddressVendorAccountingPeriod PurchaseOrdersListRequestExpand = "line_items,delivery_address,vendor,accounting_period" - PurchaseOrdersListRequestExpandLineItemsDeliveryAddressVendorCompany PurchaseOrdersListRequestExpand = "line_items,delivery_address,vendor,company" - PurchaseOrdersListRequestExpandLineItemsDeliveryAddressVendorCompanyAccountingPeriod PurchaseOrdersListRequestExpand = "line_items,delivery_address,vendor,company,accounting_period" - PurchaseOrdersListRequestExpandLineItemsTrackingCategories PurchaseOrdersListRequestExpand = "line_items,tracking_categories" - PurchaseOrdersListRequestExpandLineItemsTrackingCategoriesAccountingPeriod PurchaseOrdersListRequestExpand = "line_items,tracking_categories,accounting_period" - PurchaseOrdersListRequestExpandLineItemsTrackingCategoriesCompany PurchaseOrdersListRequestExpand = "line_items,tracking_categories,company" - PurchaseOrdersListRequestExpandLineItemsTrackingCategoriesCompanyAccountingPeriod PurchaseOrdersListRequestExpand = "line_items,tracking_categories,company,accounting_period" - PurchaseOrdersListRequestExpandLineItemsTrackingCategoriesDeliveryAddress PurchaseOrdersListRequestExpand = "line_items,tracking_categories,delivery_address" - PurchaseOrdersListRequestExpandLineItemsTrackingCategoriesDeliveryAddressAccountingPeriod PurchaseOrdersListRequestExpand = "line_items,tracking_categories,delivery_address,accounting_period" - PurchaseOrdersListRequestExpandLineItemsTrackingCategoriesDeliveryAddressCompany PurchaseOrdersListRequestExpand = "line_items,tracking_categories,delivery_address,company" - PurchaseOrdersListRequestExpandLineItemsTrackingCategoriesDeliveryAddressCompanyAccountingPeriod PurchaseOrdersListRequestExpand = "line_items,tracking_categories,delivery_address,company,accounting_period" - PurchaseOrdersListRequestExpandLineItemsTrackingCategoriesDeliveryAddressVendor PurchaseOrdersListRequestExpand = "line_items,tracking_categories,delivery_address,vendor" - PurchaseOrdersListRequestExpandLineItemsTrackingCategoriesDeliveryAddressVendorAccountingPeriod PurchaseOrdersListRequestExpand = "line_items,tracking_categories,delivery_address,vendor,accounting_period" - PurchaseOrdersListRequestExpandLineItemsTrackingCategoriesDeliveryAddressVendorCompany PurchaseOrdersListRequestExpand = "line_items,tracking_categories,delivery_address,vendor,company" - PurchaseOrdersListRequestExpandLineItemsTrackingCategoriesDeliveryAddressVendorCompanyAccountingPeriod PurchaseOrdersListRequestExpand = "line_items,tracking_categories,delivery_address,vendor,company,accounting_period" - PurchaseOrdersListRequestExpandLineItemsTrackingCategoriesVendor PurchaseOrdersListRequestExpand = "line_items,tracking_categories,vendor" - PurchaseOrdersListRequestExpandLineItemsTrackingCategoriesVendorAccountingPeriod PurchaseOrdersListRequestExpand = "line_items,tracking_categories,vendor,accounting_period" - PurchaseOrdersListRequestExpandLineItemsTrackingCategoriesVendorCompany PurchaseOrdersListRequestExpand = "line_items,tracking_categories,vendor,company" - PurchaseOrdersListRequestExpandLineItemsTrackingCategoriesVendorCompanyAccountingPeriod PurchaseOrdersListRequestExpand = "line_items,tracking_categories,vendor,company,accounting_period" - PurchaseOrdersListRequestExpandLineItemsVendor PurchaseOrdersListRequestExpand = "line_items,vendor" - PurchaseOrdersListRequestExpandLineItemsVendorAccountingPeriod PurchaseOrdersListRequestExpand = "line_items,vendor,accounting_period" - PurchaseOrdersListRequestExpandLineItemsVendorCompany PurchaseOrdersListRequestExpand = "line_items,vendor,company" - PurchaseOrdersListRequestExpandLineItemsVendorCompanyAccountingPeriod PurchaseOrdersListRequestExpand = "line_items,vendor,company,accounting_period" - PurchaseOrdersListRequestExpandTrackingCategories PurchaseOrdersListRequestExpand = "tracking_categories" - PurchaseOrdersListRequestExpandTrackingCategoriesAccountingPeriod PurchaseOrdersListRequestExpand = "tracking_categories,accounting_period" - PurchaseOrdersListRequestExpandTrackingCategoriesCompany PurchaseOrdersListRequestExpand = "tracking_categories,company" - PurchaseOrdersListRequestExpandTrackingCategoriesCompanyAccountingPeriod PurchaseOrdersListRequestExpand = "tracking_categories,company,accounting_period" - PurchaseOrdersListRequestExpandTrackingCategoriesDeliveryAddress PurchaseOrdersListRequestExpand = "tracking_categories,delivery_address" - PurchaseOrdersListRequestExpandTrackingCategoriesDeliveryAddressAccountingPeriod PurchaseOrdersListRequestExpand = "tracking_categories,delivery_address,accounting_period" - PurchaseOrdersListRequestExpandTrackingCategoriesDeliveryAddressCompany PurchaseOrdersListRequestExpand = "tracking_categories,delivery_address,company" - PurchaseOrdersListRequestExpandTrackingCategoriesDeliveryAddressCompanyAccountingPeriod PurchaseOrdersListRequestExpand = "tracking_categories,delivery_address,company,accounting_period" - PurchaseOrdersListRequestExpandTrackingCategoriesDeliveryAddressVendor PurchaseOrdersListRequestExpand = "tracking_categories,delivery_address,vendor" - PurchaseOrdersListRequestExpandTrackingCategoriesDeliveryAddressVendorAccountingPeriod PurchaseOrdersListRequestExpand = "tracking_categories,delivery_address,vendor,accounting_period" - PurchaseOrdersListRequestExpandTrackingCategoriesDeliveryAddressVendorCompany PurchaseOrdersListRequestExpand = "tracking_categories,delivery_address,vendor,company" - PurchaseOrdersListRequestExpandTrackingCategoriesDeliveryAddressVendorCompanyAccountingPeriod PurchaseOrdersListRequestExpand = "tracking_categories,delivery_address,vendor,company,accounting_period" - PurchaseOrdersListRequestExpandTrackingCategoriesVendor PurchaseOrdersListRequestExpand = "tracking_categories,vendor" - PurchaseOrdersListRequestExpandTrackingCategoriesVendorAccountingPeriod PurchaseOrdersListRequestExpand = "tracking_categories,vendor,accounting_period" - PurchaseOrdersListRequestExpandTrackingCategoriesVendorCompany PurchaseOrdersListRequestExpand = "tracking_categories,vendor,company" - PurchaseOrdersListRequestExpandTrackingCategoriesVendorCompanyAccountingPeriod PurchaseOrdersListRequestExpand = "tracking_categories,vendor,company,accounting_period" - PurchaseOrdersListRequestExpandVendor PurchaseOrdersListRequestExpand = "vendor" - PurchaseOrdersListRequestExpandVendorAccountingPeriod PurchaseOrdersListRequestExpand = "vendor,accounting_period" - PurchaseOrdersListRequestExpandVendorCompany PurchaseOrdersListRequestExpand = "vendor,company" - PurchaseOrdersListRequestExpandVendorCompanyAccountingPeriod PurchaseOrdersListRequestExpand = "vendor,company,accounting_period" + PurchaseOrdersListRequestExpandItemAccountingPeriod PurchaseOrdersListRequestExpandItem = "accounting_period" + PurchaseOrdersListRequestExpandItemCompany PurchaseOrdersListRequestExpandItem = "company" + PurchaseOrdersListRequestExpandItemDeliveryAddress PurchaseOrdersListRequestExpandItem = "delivery_address" + PurchaseOrdersListRequestExpandItemLineItems PurchaseOrdersListRequestExpandItem = "line_items" + PurchaseOrdersListRequestExpandItemPaymentTerm PurchaseOrdersListRequestExpandItem = "payment_term" + PurchaseOrdersListRequestExpandItemTrackingCategories PurchaseOrdersListRequestExpandItem = "tracking_categories" + PurchaseOrdersListRequestExpandItemVendor PurchaseOrdersListRequestExpandItem = "vendor" ) -func NewPurchaseOrdersListRequestExpandFromString(s string) (PurchaseOrdersListRequestExpand, error) { +func NewPurchaseOrdersListRequestExpandItemFromString(s string) (PurchaseOrdersListRequestExpandItem, error) { switch s { case "accounting_period": - return PurchaseOrdersListRequestExpandAccountingPeriod, nil + return PurchaseOrdersListRequestExpandItemAccountingPeriod, nil case "company": - return PurchaseOrdersListRequestExpandCompany, nil - case "company,accounting_period": - return PurchaseOrdersListRequestExpandCompanyAccountingPeriod, nil + return PurchaseOrdersListRequestExpandItemCompany, nil case "delivery_address": - return PurchaseOrdersListRequestExpandDeliveryAddress, nil - case "delivery_address,accounting_period": - return PurchaseOrdersListRequestExpandDeliveryAddressAccountingPeriod, nil - case "delivery_address,company": - return PurchaseOrdersListRequestExpandDeliveryAddressCompany, nil - case "delivery_address,company,accounting_period": - return PurchaseOrdersListRequestExpandDeliveryAddressCompanyAccountingPeriod, nil - case "delivery_address,vendor": - return PurchaseOrdersListRequestExpandDeliveryAddressVendor, nil - case "delivery_address,vendor,accounting_period": - return PurchaseOrdersListRequestExpandDeliveryAddressVendorAccountingPeriod, nil - case "delivery_address,vendor,company": - return PurchaseOrdersListRequestExpandDeliveryAddressVendorCompany, nil - case "delivery_address,vendor,company,accounting_period": - return PurchaseOrdersListRequestExpandDeliveryAddressVendorCompanyAccountingPeriod, nil + return PurchaseOrdersListRequestExpandItemDeliveryAddress, nil case "line_items": - return PurchaseOrdersListRequestExpandLineItems, nil - case "line_items,accounting_period": - return PurchaseOrdersListRequestExpandLineItemsAccountingPeriod, nil - case "line_items,company": - return PurchaseOrdersListRequestExpandLineItemsCompany, nil - case "line_items,company,accounting_period": - return PurchaseOrdersListRequestExpandLineItemsCompanyAccountingPeriod, nil - case "line_items,delivery_address": - return PurchaseOrdersListRequestExpandLineItemsDeliveryAddress, nil - case "line_items,delivery_address,accounting_period": - return PurchaseOrdersListRequestExpandLineItemsDeliveryAddressAccountingPeriod, nil - case "line_items,delivery_address,company": - return PurchaseOrdersListRequestExpandLineItemsDeliveryAddressCompany, nil - case "line_items,delivery_address,company,accounting_period": - return PurchaseOrdersListRequestExpandLineItemsDeliveryAddressCompanyAccountingPeriod, nil - case "line_items,delivery_address,vendor": - return PurchaseOrdersListRequestExpandLineItemsDeliveryAddressVendor, nil - case "line_items,delivery_address,vendor,accounting_period": - return PurchaseOrdersListRequestExpandLineItemsDeliveryAddressVendorAccountingPeriod, nil - case "line_items,delivery_address,vendor,company": - return PurchaseOrdersListRequestExpandLineItemsDeliveryAddressVendorCompany, nil - case "line_items,delivery_address,vendor,company,accounting_period": - return PurchaseOrdersListRequestExpandLineItemsDeliveryAddressVendorCompanyAccountingPeriod, nil - case "line_items,tracking_categories": - return PurchaseOrdersListRequestExpandLineItemsTrackingCategories, nil - case "line_items,tracking_categories,accounting_period": - return PurchaseOrdersListRequestExpandLineItemsTrackingCategoriesAccountingPeriod, nil - case "line_items,tracking_categories,company": - return PurchaseOrdersListRequestExpandLineItemsTrackingCategoriesCompany, nil - case "line_items,tracking_categories,company,accounting_period": - return PurchaseOrdersListRequestExpandLineItemsTrackingCategoriesCompanyAccountingPeriod, nil - case "line_items,tracking_categories,delivery_address": - return PurchaseOrdersListRequestExpandLineItemsTrackingCategoriesDeliveryAddress, nil - case "line_items,tracking_categories,delivery_address,accounting_period": - return PurchaseOrdersListRequestExpandLineItemsTrackingCategoriesDeliveryAddressAccountingPeriod, nil - case "line_items,tracking_categories,delivery_address,company": - return PurchaseOrdersListRequestExpandLineItemsTrackingCategoriesDeliveryAddressCompany, nil - case "line_items,tracking_categories,delivery_address,company,accounting_period": - return PurchaseOrdersListRequestExpandLineItemsTrackingCategoriesDeliveryAddressCompanyAccountingPeriod, nil - case "line_items,tracking_categories,delivery_address,vendor": - return PurchaseOrdersListRequestExpandLineItemsTrackingCategoriesDeliveryAddressVendor, nil - case "line_items,tracking_categories,delivery_address,vendor,accounting_period": - return PurchaseOrdersListRequestExpandLineItemsTrackingCategoriesDeliveryAddressVendorAccountingPeriod, nil - case "line_items,tracking_categories,delivery_address,vendor,company": - return PurchaseOrdersListRequestExpandLineItemsTrackingCategoriesDeliveryAddressVendorCompany, nil - case "line_items,tracking_categories,delivery_address,vendor,company,accounting_period": - return PurchaseOrdersListRequestExpandLineItemsTrackingCategoriesDeliveryAddressVendorCompanyAccountingPeriod, nil - case "line_items,tracking_categories,vendor": - return PurchaseOrdersListRequestExpandLineItemsTrackingCategoriesVendor, nil - case "line_items,tracking_categories,vendor,accounting_period": - return PurchaseOrdersListRequestExpandLineItemsTrackingCategoriesVendorAccountingPeriod, nil - case "line_items,tracking_categories,vendor,company": - return PurchaseOrdersListRequestExpandLineItemsTrackingCategoriesVendorCompany, nil - case "line_items,tracking_categories,vendor,company,accounting_period": - return PurchaseOrdersListRequestExpandLineItemsTrackingCategoriesVendorCompanyAccountingPeriod, nil - case "line_items,vendor": - return PurchaseOrdersListRequestExpandLineItemsVendor, nil - case "line_items,vendor,accounting_period": - return PurchaseOrdersListRequestExpandLineItemsVendorAccountingPeriod, nil - case "line_items,vendor,company": - return PurchaseOrdersListRequestExpandLineItemsVendorCompany, nil - case "line_items,vendor,company,accounting_period": - return PurchaseOrdersListRequestExpandLineItemsVendorCompanyAccountingPeriod, nil + return PurchaseOrdersListRequestExpandItemLineItems, nil + case "payment_term": + return PurchaseOrdersListRequestExpandItemPaymentTerm, nil case "tracking_categories": - return PurchaseOrdersListRequestExpandTrackingCategories, nil - case "tracking_categories,accounting_period": - return PurchaseOrdersListRequestExpandTrackingCategoriesAccountingPeriod, nil - case "tracking_categories,company": - return PurchaseOrdersListRequestExpandTrackingCategoriesCompany, nil - case "tracking_categories,company,accounting_period": - return PurchaseOrdersListRequestExpandTrackingCategoriesCompanyAccountingPeriod, nil - case "tracking_categories,delivery_address": - return PurchaseOrdersListRequestExpandTrackingCategoriesDeliveryAddress, nil - case "tracking_categories,delivery_address,accounting_period": - return PurchaseOrdersListRequestExpandTrackingCategoriesDeliveryAddressAccountingPeriod, nil - case "tracking_categories,delivery_address,company": - return PurchaseOrdersListRequestExpandTrackingCategoriesDeliveryAddressCompany, nil - case "tracking_categories,delivery_address,company,accounting_period": - return PurchaseOrdersListRequestExpandTrackingCategoriesDeliveryAddressCompanyAccountingPeriod, nil - case "tracking_categories,delivery_address,vendor": - return PurchaseOrdersListRequestExpandTrackingCategoriesDeliveryAddressVendor, nil - case "tracking_categories,delivery_address,vendor,accounting_period": - return PurchaseOrdersListRequestExpandTrackingCategoriesDeliveryAddressVendorAccountingPeriod, nil - case "tracking_categories,delivery_address,vendor,company": - return PurchaseOrdersListRequestExpandTrackingCategoriesDeliveryAddressVendorCompany, nil - case "tracking_categories,delivery_address,vendor,company,accounting_period": - return PurchaseOrdersListRequestExpandTrackingCategoriesDeliveryAddressVendorCompanyAccountingPeriod, nil - case "tracking_categories,vendor": - return PurchaseOrdersListRequestExpandTrackingCategoriesVendor, nil - case "tracking_categories,vendor,accounting_period": - return PurchaseOrdersListRequestExpandTrackingCategoriesVendorAccountingPeriod, nil - case "tracking_categories,vendor,company": - return PurchaseOrdersListRequestExpandTrackingCategoriesVendorCompany, nil - case "tracking_categories,vendor,company,accounting_period": - return PurchaseOrdersListRequestExpandTrackingCategoriesVendorCompanyAccountingPeriod, nil + return PurchaseOrdersListRequestExpandItemTrackingCategories, nil case "vendor": - return PurchaseOrdersListRequestExpandVendor, nil - case "vendor,accounting_period": - return PurchaseOrdersListRequestExpandVendorAccountingPeriod, nil - case "vendor,company": - return PurchaseOrdersListRequestExpandVendorCompany, nil - case "vendor,company,accounting_period": - return PurchaseOrdersListRequestExpandVendorCompanyAccountingPeriod, nil - } - var t PurchaseOrdersListRequestExpand + return PurchaseOrdersListRequestExpandItemVendor, nil + } + var t PurchaseOrdersListRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (p PurchaseOrdersListRequestExpand) Ptr() *PurchaseOrdersListRequestExpand { +func (p PurchaseOrdersListRequestExpandItem) Ptr() *PurchaseOrdersListRequestExpandItem { return &p } -type PurchaseOrdersRetrieveRequestExpand string +type PurchaseOrdersRetrieveRequestExpandItem string const ( - PurchaseOrdersRetrieveRequestExpandAccountingPeriod PurchaseOrdersRetrieveRequestExpand = "accounting_period" - PurchaseOrdersRetrieveRequestExpandCompany PurchaseOrdersRetrieveRequestExpand = "company" - PurchaseOrdersRetrieveRequestExpandCompanyAccountingPeriod PurchaseOrdersRetrieveRequestExpand = "company,accounting_period" - PurchaseOrdersRetrieveRequestExpandDeliveryAddress PurchaseOrdersRetrieveRequestExpand = "delivery_address" - PurchaseOrdersRetrieveRequestExpandDeliveryAddressAccountingPeriod PurchaseOrdersRetrieveRequestExpand = "delivery_address,accounting_period" - PurchaseOrdersRetrieveRequestExpandDeliveryAddressCompany PurchaseOrdersRetrieveRequestExpand = "delivery_address,company" - PurchaseOrdersRetrieveRequestExpandDeliveryAddressCompanyAccountingPeriod PurchaseOrdersRetrieveRequestExpand = "delivery_address,company,accounting_period" - PurchaseOrdersRetrieveRequestExpandDeliveryAddressVendor PurchaseOrdersRetrieveRequestExpand = "delivery_address,vendor" - PurchaseOrdersRetrieveRequestExpandDeliveryAddressVendorAccountingPeriod PurchaseOrdersRetrieveRequestExpand = "delivery_address,vendor,accounting_period" - PurchaseOrdersRetrieveRequestExpandDeliveryAddressVendorCompany PurchaseOrdersRetrieveRequestExpand = "delivery_address,vendor,company" - PurchaseOrdersRetrieveRequestExpandDeliveryAddressVendorCompanyAccountingPeriod PurchaseOrdersRetrieveRequestExpand = "delivery_address,vendor,company,accounting_period" - PurchaseOrdersRetrieveRequestExpandLineItems PurchaseOrdersRetrieveRequestExpand = "line_items" - PurchaseOrdersRetrieveRequestExpandLineItemsAccountingPeriod PurchaseOrdersRetrieveRequestExpand = "line_items,accounting_period" - PurchaseOrdersRetrieveRequestExpandLineItemsCompany PurchaseOrdersRetrieveRequestExpand = "line_items,company" - PurchaseOrdersRetrieveRequestExpandLineItemsCompanyAccountingPeriod PurchaseOrdersRetrieveRequestExpand = "line_items,company,accounting_period" - PurchaseOrdersRetrieveRequestExpandLineItemsDeliveryAddress PurchaseOrdersRetrieveRequestExpand = "line_items,delivery_address" - PurchaseOrdersRetrieveRequestExpandLineItemsDeliveryAddressAccountingPeriod PurchaseOrdersRetrieveRequestExpand = "line_items,delivery_address,accounting_period" - PurchaseOrdersRetrieveRequestExpandLineItemsDeliveryAddressCompany PurchaseOrdersRetrieveRequestExpand = "line_items,delivery_address,company" - PurchaseOrdersRetrieveRequestExpandLineItemsDeliveryAddressCompanyAccountingPeriod PurchaseOrdersRetrieveRequestExpand = "line_items,delivery_address,company,accounting_period" - PurchaseOrdersRetrieveRequestExpandLineItemsDeliveryAddressVendor PurchaseOrdersRetrieveRequestExpand = "line_items,delivery_address,vendor" - PurchaseOrdersRetrieveRequestExpandLineItemsDeliveryAddressVendorAccountingPeriod PurchaseOrdersRetrieveRequestExpand = "line_items,delivery_address,vendor,accounting_period" - PurchaseOrdersRetrieveRequestExpandLineItemsDeliveryAddressVendorCompany PurchaseOrdersRetrieveRequestExpand = "line_items,delivery_address,vendor,company" - PurchaseOrdersRetrieveRequestExpandLineItemsDeliveryAddressVendorCompanyAccountingPeriod PurchaseOrdersRetrieveRequestExpand = "line_items,delivery_address,vendor,company,accounting_period" - PurchaseOrdersRetrieveRequestExpandLineItemsTrackingCategories PurchaseOrdersRetrieveRequestExpand = "line_items,tracking_categories" - PurchaseOrdersRetrieveRequestExpandLineItemsTrackingCategoriesAccountingPeriod PurchaseOrdersRetrieveRequestExpand = "line_items,tracking_categories,accounting_period" - PurchaseOrdersRetrieveRequestExpandLineItemsTrackingCategoriesCompany PurchaseOrdersRetrieveRequestExpand = "line_items,tracking_categories,company" - PurchaseOrdersRetrieveRequestExpandLineItemsTrackingCategoriesCompanyAccountingPeriod PurchaseOrdersRetrieveRequestExpand = "line_items,tracking_categories,company,accounting_period" - PurchaseOrdersRetrieveRequestExpandLineItemsTrackingCategoriesDeliveryAddress PurchaseOrdersRetrieveRequestExpand = "line_items,tracking_categories,delivery_address" - PurchaseOrdersRetrieveRequestExpandLineItemsTrackingCategoriesDeliveryAddressAccountingPeriod PurchaseOrdersRetrieveRequestExpand = "line_items,tracking_categories,delivery_address,accounting_period" - PurchaseOrdersRetrieveRequestExpandLineItemsTrackingCategoriesDeliveryAddressCompany PurchaseOrdersRetrieveRequestExpand = "line_items,tracking_categories,delivery_address,company" - PurchaseOrdersRetrieveRequestExpandLineItemsTrackingCategoriesDeliveryAddressCompanyAccountingPeriod PurchaseOrdersRetrieveRequestExpand = "line_items,tracking_categories,delivery_address,company,accounting_period" - PurchaseOrdersRetrieveRequestExpandLineItemsTrackingCategoriesDeliveryAddressVendor PurchaseOrdersRetrieveRequestExpand = "line_items,tracking_categories,delivery_address,vendor" - PurchaseOrdersRetrieveRequestExpandLineItemsTrackingCategoriesDeliveryAddressVendorAccountingPeriod PurchaseOrdersRetrieveRequestExpand = "line_items,tracking_categories,delivery_address,vendor,accounting_period" - PurchaseOrdersRetrieveRequestExpandLineItemsTrackingCategoriesDeliveryAddressVendorCompany PurchaseOrdersRetrieveRequestExpand = "line_items,tracking_categories,delivery_address,vendor,company" - PurchaseOrdersRetrieveRequestExpandLineItemsTrackingCategoriesDeliveryAddressVendorCompanyAccountingPeriod PurchaseOrdersRetrieveRequestExpand = "line_items,tracking_categories,delivery_address,vendor,company,accounting_period" - PurchaseOrdersRetrieveRequestExpandLineItemsTrackingCategoriesVendor PurchaseOrdersRetrieveRequestExpand = "line_items,tracking_categories,vendor" - PurchaseOrdersRetrieveRequestExpandLineItemsTrackingCategoriesVendorAccountingPeriod PurchaseOrdersRetrieveRequestExpand = "line_items,tracking_categories,vendor,accounting_period" - PurchaseOrdersRetrieveRequestExpandLineItemsTrackingCategoriesVendorCompany PurchaseOrdersRetrieveRequestExpand = "line_items,tracking_categories,vendor,company" - PurchaseOrdersRetrieveRequestExpandLineItemsTrackingCategoriesVendorCompanyAccountingPeriod PurchaseOrdersRetrieveRequestExpand = "line_items,tracking_categories,vendor,company,accounting_period" - PurchaseOrdersRetrieveRequestExpandLineItemsVendor PurchaseOrdersRetrieveRequestExpand = "line_items,vendor" - PurchaseOrdersRetrieveRequestExpandLineItemsVendorAccountingPeriod PurchaseOrdersRetrieveRequestExpand = "line_items,vendor,accounting_period" - PurchaseOrdersRetrieveRequestExpandLineItemsVendorCompany PurchaseOrdersRetrieveRequestExpand = "line_items,vendor,company" - PurchaseOrdersRetrieveRequestExpandLineItemsVendorCompanyAccountingPeriod PurchaseOrdersRetrieveRequestExpand = "line_items,vendor,company,accounting_period" - PurchaseOrdersRetrieveRequestExpandTrackingCategories PurchaseOrdersRetrieveRequestExpand = "tracking_categories" - PurchaseOrdersRetrieveRequestExpandTrackingCategoriesAccountingPeriod PurchaseOrdersRetrieveRequestExpand = "tracking_categories,accounting_period" - PurchaseOrdersRetrieveRequestExpandTrackingCategoriesCompany PurchaseOrdersRetrieveRequestExpand = "tracking_categories,company" - PurchaseOrdersRetrieveRequestExpandTrackingCategoriesCompanyAccountingPeriod PurchaseOrdersRetrieveRequestExpand = "tracking_categories,company,accounting_period" - PurchaseOrdersRetrieveRequestExpandTrackingCategoriesDeliveryAddress PurchaseOrdersRetrieveRequestExpand = "tracking_categories,delivery_address" - PurchaseOrdersRetrieveRequestExpandTrackingCategoriesDeliveryAddressAccountingPeriod PurchaseOrdersRetrieveRequestExpand = "tracking_categories,delivery_address,accounting_period" - PurchaseOrdersRetrieveRequestExpandTrackingCategoriesDeliveryAddressCompany PurchaseOrdersRetrieveRequestExpand = "tracking_categories,delivery_address,company" - PurchaseOrdersRetrieveRequestExpandTrackingCategoriesDeliveryAddressCompanyAccountingPeriod PurchaseOrdersRetrieveRequestExpand = "tracking_categories,delivery_address,company,accounting_period" - PurchaseOrdersRetrieveRequestExpandTrackingCategoriesDeliveryAddressVendor PurchaseOrdersRetrieveRequestExpand = "tracking_categories,delivery_address,vendor" - PurchaseOrdersRetrieveRequestExpandTrackingCategoriesDeliveryAddressVendorAccountingPeriod PurchaseOrdersRetrieveRequestExpand = "tracking_categories,delivery_address,vendor,accounting_period" - PurchaseOrdersRetrieveRequestExpandTrackingCategoriesDeliveryAddressVendorCompany PurchaseOrdersRetrieveRequestExpand = "tracking_categories,delivery_address,vendor,company" - PurchaseOrdersRetrieveRequestExpandTrackingCategoriesDeliveryAddressVendorCompanyAccountingPeriod PurchaseOrdersRetrieveRequestExpand = "tracking_categories,delivery_address,vendor,company,accounting_period" - PurchaseOrdersRetrieveRequestExpandTrackingCategoriesVendor PurchaseOrdersRetrieveRequestExpand = "tracking_categories,vendor" - PurchaseOrdersRetrieveRequestExpandTrackingCategoriesVendorAccountingPeriod PurchaseOrdersRetrieveRequestExpand = "tracking_categories,vendor,accounting_period" - PurchaseOrdersRetrieveRequestExpandTrackingCategoriesVendorCompany PurchaseOrdersRetrieveRequestExpand = "tracking_categories,vendor,company" - PurchaseOrdersRetrieveRequestExpandTrackingCategoriesVendorCompanyAccountingPeriod PurchaseOrdersRetrieveRequestExpand = "tracking_categories,vendor,company,accounting_period" - PurchaseOrdersRetrieveRequestExpandVendor PurchaseOrdersRetrieveRequestExpand = "vendor" - PurchaseOrdersRetrieveRequestExpandVendorAccountingPeriod PurchaseOrdersRetrieveRequestExpand = "vendor,accounting_period" - PurchaseOrdersRetrieveRequestExpandVendorCompany PurchaseOrdersRetrieveRequestExpand = "vendor,company" - PurchaseOrdersRetrieveRequestExpandVendorCompanyAccountingPeriod PurchaseOrdersRetrieveRequestExpand = "vendor,company,accounting_period" + PurchaseOrdersRetrieveRequestExpandItemAccountingPeriod PurchaseOrdersRetrieveRequestExpandItem = "accounting_period" + PurchaseOrdersRetrieveRequestExpandItemCompany PurchaseOrdersRetrieveRequestExpandItem = "company" + PurchaseOrdersRetrieveRequestExpandItemDeliveryAddress PurchaseOrdersRetrieveRequestExpandItem = "delivery_address" + PurchaseOrdersRetrieveRequestExpandItemLineItems PurchaseOrdersRetrieveRequestExpandItem = "line_items" + PurchaseOrdersRetrieveRequestExpandItemPaymentTerm PurchaseOrdersRetrieveRequestExpandItem = "payment_term" + PurchaseOrdersRetrieveRequestExpandItemTrackingCategories PurchaseOrdersRetrieveRequestExpandItem = "tracking_categories" + PurchaseOrdersRetrieveRequestExpandItemVendor PurchaseOrdersRetrieveRequestExpandItem = "vendor" ) -func NewPurchaseOrdersRetrieveRequestExpandFromString(s string) (PurchaseOrdersRetrieveRequestExpand, error) { +func NewPurchaseOrdersRetrieveRequestExpandItemFromString(s string) (PurchaseOrdersRetrieveRequestExpandItem, error) { switch s { case "accounting_period": - return PurchaseOrdersRetrieveRequestExpandAccountingPeriod, nil + return PurchaseOrdersRetrieveRequestExpandItemAccountingPeriod, nil case "company": - return PurchaseOrdersRetrieveRequestExpandCompany, nil - case "company,accounting_period": - return PurchaseOrdersRetrieveRequestExpandCompanyAccountingPeriod, nil + return PurchaseOrdersRetrieveRequestExpandItemCompany, nil case "delivery_address": - return PurchaseOrdersRetrieveRequestExpandDeliveryAddress, nil - case "delivery_address,accounting_period": - return PurchaseOrdersRetrieveRequestExpandDeliveryAddressAccountingPeriod, nil - case "delivery_address,company": - return PurchaseOrdersRetrieveRequestExpandDeliveryAddressCompany, nil - case "delivery_address,company,accounting_period": - return PurchaseOrdersRetrieveRequestExpandDeliveryAddressCompanyAccountingPeriod, nil - case "delivery_address,vendor": - return PurchaseOrdersRetrieveRequestExpandDeliveryAddressVendor, nil - case "delivery_address,vendor,accounting_period": - return PurchaseOrdersRetrieveRequestExpandDeliveryAddressVendorAccountingPeriod, nil - case "delivery_address,vendor,company": - return PurchaseOrdersRetrieveRequestExpandDeliveryAddressVendorCompany, nil - case "delivery_address,vendor,company,accounting_period": - return PurchaseOrdersRetrieveRequestExpandDeliveryAddressVendorCompanyAccountingPeriod, nil + return PurchaseOrdersRetrieveRequestExpandItemDeliveryAddress, nil case "line_items": - return PurchaseOrdersRetrieveRequestExpandLineItems, nil - case "line_items,accounting_period": - return PurchaseOrdersRetrieveRequestExpandLineItemsAccountingPeriod, nil - case "line_items,company": - return PurchaseOrdersRetrieveRequestExpandLineItemsCompany, nil - case "line_items,company,accounting_period": - return PurchaseOrdersRetrieveRequestExpandLineItemsCompanyAccountingPeriod, nil - case "line_items,delivery_address": - return PurchaseOrdersRetrieveRequestExpandLineItemsDeliveryAddress, nil - case "line_items,delivery_address,accounting_period": - return PurchaseOrdersRetrieveRequestExpandLineItemsDeliveryAddressAccountingPeriod, nil - case "line_items,delivery_address,company": - return PurchaseOrdersRetrieveRequestExpandLineItemsDeliveryAddressCompany, nil - case "line_items,delivery_address,company,accounting_period": - return PurchaseOrdersRetrieveRequestExpandLineItemsDeliveryAddressCompanyAccountingPeriod, nil - case "line_items,delivery_address,vendor": - return PurchaseOrdersRetrieveRequestExpandLineItemsDeliveryAddressVendor, nil - case "line_items,delivery_address,vendor,accounting_period": - return PurchaseOrdersRetrieveRequestExpandLineItemsDeliveryAddressVendorAccountingPeriod, nil - case "line_items,delivery_address,vendor,company": - return PurchaseOrdersRetrieveRequestExpandLineItemsDeliveryAddressVendorCompany, nil - case "line_items,delivery_address,vendor,company,accounting_period": - return PurchaseOrdersRetrieveRequestExpandLineItemsDeliveryAddressVendorCompanyAccountingPeriod, nil - case "line_items,tracking_categories": - return PurchaseOrdersRetrieveRequestExpandLineItemsTrackingCategories, nil - case "line_items,tracking_categories,accounting_period": - return PurchaseOrdersRetrieveRequestExpandLineItemsTrackingCategoriesAccountingPeriod, nil - case "line_items,tracking_categories,company": - return PurchaseOrdersRetrieveRequestExpandLineItemsTrackingCategoriesCompany, nil - case "line_items,tracking_categories,company,accounting_period": - return PurchaseOrdersRetrieveRequestExpandLineItemsTrackingCategoriesCompanyAccountingPeriod, nil - case "line_items,tracking_categories,delivery_address": - return PurchaseOrdersRetrieveRequestExpandLineItemsTrackingCategoriesDeliveryAddress, nil - case "line_items,tracking_categories,delivery_address,accounting_period": - return PurchaseOrdersRetrieveRequestExpandLineItemsTrackingCategoriesDeliveryAddressAccountingPeriod, nil - case "line_items,tracking_categories,delivery_address,company": - return PurchaseOrdersRetrieveRequestExpandLineItemsTrackingCategoriesDeliveryAddressCompany, nil - case "line_items,tracking_categories,delivery_address,company,accounting_period": - return PurchaseOrdersRetrieveRequestExpandLineItemsTrackingCategoriesDeliveryAddressCompanyAccountingPeriod, nil - case "line_items,tracking_categories,delivery_address,vendor": - return PurchaseOrdersRetrieveRequestExpandLineItemsTrackingCategoriesDeliveryAddressVendor, nil - case "line_items,tracking_categories,delivery_address,vendor,accounting_period": - return PurchaseOrdersRetrieveRequestExpandLineItemsTrackingCategoriesDeliveryAddressVendorAccountingPeriod, nil - case "line_items,tracking_categories,delivery_address,vendor,company": - return PurchaseOrdersRetrieveRequestExpandLineItemsTrackingCategoriesDeliveryAddressVendorCompany, nil - case "line_items,tracking_categories,delivery_address,vendor,company,accounting_period": - return PurchaseOrdersRetrieveRequestExpandLineItemsTrackingCategoriesDeliveryAddressVendorCompanyAccountingPeriod, nil - case "line_items,tracking_categories,vendor": - return PurchaseOrdersRetrieveRequestExpandLineItemsTrackingCategoriesVendor, nil - case "line_items,tracking_categories,vendor,accounting_period": - return PurchaseOrdersRetrieveRequestExpandLineItemsTrackingCategoriesVendorAccountingPeriod, nil - case "line_items,tracking_categories,vendor,company": - return PurchaseOrdersRetrieveRequestExpandLineItemsTrackingCategoriesVendorCompany, nil - case "line_items,tracking_categories,vendor,company,accounting_period": - return PurchaseOrdersRetrieveRequestExpandLineItemsTrackingCategoriesVendorCompanyAccountingPeriod, nil - case "line_items,vendor": - return PurchaseOrdersRetrieveRequestExpandLineItemsVendor, nil - case "line_items,vendor,accounting_period": - return PurchaseOrdersRetrieveRequestExpandLineItemsVendorAccountingPeriod, nil - case "line_items,vendor,company": - return PurchaseOrdersRetrieveRequestExpandLineItemsVendorCompany, nil - case "line_items,vendor,company,accounting_period": - return PurchaseOrdersRetrieveRequestExpandLineItemsVendorCompanyAccountingPeriod, nil + return PurchaseOrdersRetrieveRequestExpandItemLineItems, nil + case "payment_term": + return PurchaseOrdersRetrieveRequestExpandItemPaymentTerm, nil case "tracking_categories": - return PurchaseOrdersRetrieveRequestExpandTrackingCategories, nil - case "tracking_categories,accounting_period": - return PurchaseOrdersRetrieveRequestExpandTrackingCategoriesAccountingPeriod, nil - case "tracking_categories,company": - return PurchaseOrdersRetrieveRequestExpandTrackingCategoriesCompany, nil - case "tracking_categories,company,accounting_period": - return PurchaseOrdersRetrieveRequestExpandTrackingCategoriesCompanyAccountingPeriod, nil - case "tracking_categories,delivery_address": - return PurchaseOrdersRetrieveRequestExpandTrackingCategoriesDeliveryAddress, nil - case "tracking_categories,delivery_address,accounting_period": - return PurchaseOrdersRetrieveRequestExpandTrackingCategoriesDeliveryAddressAccountingPeriod, nil - case "tracking_categories,delivery_address,company": - return PurchaseOrdersRetrieveRequestExpandTrackingCategoriesDeliveryAddressCompany, nil - case "tracking_categories,delivery_address,company,accounting_period": - return PurchaseOrdersRetrieveRequestExpandTrackingCategoriesDeliveryAddressCompanyAccountingPeriod, nil - case "tracking_categories,delivery_address,vendor": - return PurchaseOrdersRetrieveRequestExpandTrackingCategoriesDeliveryAddressVendor, nil - case "tracking_categories,delivery_address,vendor,accounting_period": - return PurchaseOrdersRetrieveRequestExpandTrackingCategoriesDeliveryAddressVendorAccountingPeriod, nil - case "tracking_categories,delivery_address,vendor,company": - return PurchaseOrdersRetrieveRequestExpandTrackingCategoriesDeliveryAddressVendorCompany, nil - case "tracking_categories,delivery_address,vendor,company,accounting_period": - return PurchaseOrdersRetrieveRequestExpandTrackingCategoriesDeliveryAddressVendorCompanyAccountingPeriod, nil - case "tracking_categories,vendor": - return PurchaseOrdersRetrieveRequestExpandTrackingCategoriesVendor, nil - case "tracking_categories,vendor,accounting_period": - return PurchaseOrdersRetrieveRequestExpandTrackingCategoriesVendorAccountingPeriod, nil - case "tracking_categories,vendor,company": - return PurchaseOrdersRetrieveRequestExpandTrackingCategoriesVendorCompany, nil - case "tracking_categories,vendor,company,accounting_period": - return PurchaseOrdersRetrieveRequestExpandTrackingCategoriesVendorCompanyAccountingPeriod, nil + return PurchaseOrdersRetrieveRequestExpandItemTrackingCategories, nil case "vendor": - return PurchaseOrdersRetrieveRequestExpandVendor, nil - case "vendor,accounting_period": - return PurchaseOrdersRetrieveRequestExpandVendorAccountingPeriod, nil - case "vendor,company": - return PurchaseOrdersRetrieveRequestExpandVendorCompany, nil - case "vendor,company,accounting_period": - return PurchaseOrdersRetrieveRequestExpandVendorCompanyAccountingPeriod, nil - } - var t PurchaseOrdersRetrieveRequestExpand + return PurchaseOrdersRetrieveRequestExpandItemVendor, nil + } + var t PurchaseOrdersRetrieveRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (p PurchaseOrdersRetrieveRequestExpand) Ptr() *PurchaseOrdersRetrieveRequestExpand { +func (p PurchaseOrdersRetrieveRequestExpandItem) Ptr() *PurchaseOrdersRetrieveRequestExpandItem { return &p } + +type PaginatedPurchaseOrderList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*PurchaseOrder `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedPurchaseOrderList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedPurchaseOrderList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedPurchaseOrderList) GetResults() []*PurchaseOrder { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedPurchaseOrderList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedPurchaseOrderList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedPurchaseOrderList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedPurchaseOrderList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedPurchaseOrderList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +// # The PurchaseOrderLineItem Object +// ### Description +// The `PurchaseOrderLineItem` object is used to represent a purchase order's line item. +// +// ### Usage Example +// Fetch from the `GET PurchaseOrder` endpoint and view a company's purchase orders. +type PurchaseOrderLineItemRequest struct { + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // A description of the good being purchased. + Description *string `json:"description,omitempty" url:"description,omitempty"` + // The line item's unit price. + UnitPrice *float64 `json:"unit_price,omitempty" url:"unit_price,omitempty"` + // The line item's quantity. + Quantity *float64 `json:"quantity,omitempty" url:"quantity,omitempty"` + Item *PurchaseOrderLineItemRequestItem `json:"item,omitempty" url:"item,omitempty"` + // The purchase order line item's account. + Account *string `json:"account,omitempty" url:"account,omitempty"` + // The purchase order line item's associated tracking category. + TrackingCategory *string `json:"tracking_category,omitempty" url:"tracking_category,omitempty"` + // The purchase order line item's associated tracking categories. + TrackingCategories []*string `json:"tracking_categories,omitempty" url:"tracking_categories,omitempty"` + // The purchase order line item's tax amount. + TaxAmount *string `json:"tax_amount,omitempty" url:"tax_amount,omitempty"` + // The purchase order line item's total amount. + TotalLineAmount *string `json:"total_line_amount,omitempty" url:"total_line_amount,omitempty"` + // The purchase order line item's currency. + // + // * `XUA` - ADB Unit of Account + // * `AFN` - Afghan Afghani + // * `AFA` - Afghan Afghani (1927–2002) + // * `ALL` - Albanian Lek + // * `ALK` - Albanian Lek (1946–1965) + // * `DZD` - Algerian Dinar + // * `ADP` - Andorran Peseta + // * `AOA` - Angolan Kwanza + // * `AOK` - Angolan Kwanza (1977–1991) + // * `AON` - Angolan New Kwanza (1990–2000) + // * `AOR` - Angolan Readjusted Kwanza (1995–1999) + // * `ARA` - Argentine Austral + // * `ARS` - Argentine Peso + // * `ARM` - Argentine Peso (1881–1970) + // * `ARP` - Argentine Peso (1983–1985) + // * `ARL` - Argentine Peso Ley (1970–1983) + // * `AMD` - Armenian Dram + // * `AWG` - Aruban Florin + // * `AUD` - Australian Dollar + // * `ATS` - Austrian Schilling + // * `AZN` - Azerbaijani Manat + // * `AZM` - Azerbaijani Manat (1993–2006) + // * `BSD` - Bahamian Dollar + // * `BHD` - Bahraini Dinar + // * `BDT` - Bangladeshi Taka + // * `BBD` - Barbadian Dollar + // * `BYN` - Belarusian Ruble + // * `BYB` - Belarusian Ruble (1994–1999) + // * `BYR` - Belarusian Ruble (2000–2016) + // * `BEF` - Belgian Franc + // * `BEC` - Belgian Franc (convertible) + // * `BEL` - Belgian Franc (financial) + // * `BZD` - Belize Dollar + // * `BMD` - Bermudan Dollar + // * `BTN` - Bhutanese Ngultrum + // * `BOB` - Bolivian Boliviano + // * `BOL` - Bolivian Boliviano (1863–1963) + // * `BOV` - Bolivian Mvdol + // * `BOP` - Bolivian Peso + // * `BAM` - Bosnia-Herzegovina Convertible Mark + // * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + // * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + // * `BWP` - Botswanan Pula + // * `BRC` - Brazilian Cruzado (1986–1989) + // * `BRZ` - Brazilian Cruzeiro (1942–1967) + // * `BRE` - Brazilian Cruzeiro (1990–1993) + // * `BRR` - Brazilian Cruzeiro (1993–1994) + // * `BRN` - Brazilian New Cruzado (1989–1990) + // * `BRB` - Brazilian New Cruzeiro (1967–1986) + // * `BRL` - Brazilian Real + // * `GBP` - British Pound + // * `BND` - Brunei Dollar + // * `BGL` - Bulgarian Hard Lev + // * `BGN` - Bulgarian Lev + // * `BGO` - Bulgarian Lev (1879–1952) + // * `BGM` - Bulgarian Socialist Lev + // * `BUK` - Burmese Kyat + // * `BIF` - Burundian Franc + // * `XPF` - CFP Franc + // * `KHR` - Cambodian Riel + // * `CAD` - Canadian Dollar + // * `CVE` - Cape Verdean Escudo + // * `KYD` - Cayman Islands Dollar + // * `XAF` - Central African CFA Franc + // * `CLE` - Chilean Escudo + // * `CLP` - Chilean Peso + // * `CLF` - Chilean Unit of Account (UF) + // * `CNX` - Chinese People’s Bank Dollar + // * `CNY` - Chinese Yuan + // * `CNH` - Chinese Yuan (offshore) + // * `COP` - Colombian Peso + // * `COU` - Colombian Real Value Unit + // * `KMF` - Comorian Franc + // * `CDF` - Congolese Franc + // * `CRC` - Costa Rican Colón + // * `HRD` - Croatian Dinar + // * `HRK` - Croatian Kuna + // * `CUC` - Cuban Convertible Peso + // * `CUP` - Cuban Peso + // * `CYP` - Cypriot Pound + // * `CZK` - Czech Koruna + // * `CSK` - Czechoslovak Hard Koruna + // * `DKK` - Danish Krone + // * `DJF` - Djiboutian Franc + // * `DOP` - Dominican Peso + // * `NLG` - Dutch Guilder + // * `XCD` - East Caribbean Dollar + // * `DDM` - East German Mark + // * `ECS` - Ecuadorian Sucre + // * `ECV` - Ecuadorian Unit of Constant Value + // * `EGP` - Egyptian Pound + // * `GQE` - Equatorial Guinean Ekwele + // * `ERN` - Eritrean Nakfa + // * `EEK` - Estonian Kroon + // * `ETB` - Ethiopian Birr + // * `EUR` - Euro + // * `XBA` - European Composite Unit + // * `XEU` - European Currency Unit + // * `XBB` - European Monetary Unit + // * `XBC` - European Unit of Account (XBC) + // * `XBD` - European Unit of Account (XBD) + // * `FKP` - Falkland Islands Pound + // * `FJD` - Fijian Dollar + // * `FIM` - Finnish Markka + // * `FRF` - French Franc + // * `XFO` - French Gold Franc + // * `XFU` - French UIC-Franc + // * `GMD` - Gambian Dalasi + // * `GEK` - Georgian Kupon Larit + // * `GEL` - Georgian Lari + // * `DEM` - German Mark + // * `GHS` - Ghanaian Cedi + // * `GHC` - Ghanaian Cedi (1979–2007) + // * `GIP` - Gibraltar Pound + // * `XAU` - Gold + // * `GRD` - Greek Drachma + // * `GTQ` - Guatemalan Quetzal + // * `GWP` - Guinea-Bissau Peso + // * `GNF` - Guinean Franc + // * `GNS` - Guinean Syli + // * `GYD` - Guyanaese Dollar + // * `HTG` - Haitian Gourde + // * `HNL` - Honduran Lempira + // * `HKD` - Hong Kong Dollar + // * `HUF` - Hungarian Forint + // * `IMP` - IMP + // * `ISK` - Icelandic Króna + // * `ISJ` - Icelandic Króna (1918–1981) + // * `INR` - Indian Rupee + // * `IDR` - Indonesian Rupiah + // * `IRR` - Iranian Rial + // * `IQD` - Iraqi Dinar + // * `IEP` - Irish Pound + // * `ILS` - Israeli New Shekel + // * `ILP` - Israeli Pound + // * `ILR` - Israeli Shekel (1980–1985) + // * `ITL` - Italian Lira + // * `JMD` - Jamaican Dollar + // * `JPY` - Japanese Yen + // * `JOD` - Jordanian Dinar + // * `KZT` - Kazakhstani Tenge + // * `KES` - Kenyan Shilling + // * `KWD` - Kuwaiti Dinar + // * `KGS` - Kyrgystani Som + // * `LAK` - Laotian Kip + // * `LVL` - Latvian Lats + // * `LVR` - Latvian Ruble + // * `LBP` - Lebanese Pound + // * `LSL` - Lesotho Loti + // * `LRD` - Liberian Dollar + // * `LYD` - Libyan Dinar + // * `LTL` - Lithuanian Litas + // * `LTT` - Lithuanian Talonas + // * `LUL` - Luxembourg Financial Franc + // * `LUC` - Luxembourgian Convertible Franc + // * `LUF` - Luxembourgian Franc + // * `MOP` - Macanese Pataca + // * `MKD` - Macedonian Denar + // * `MKN` - Macedonian Denar (1992–1993) + // * `MGA` - Malagasy Ariary + // * `MGF` - Malagasy Franc + // * `MWK` - Malawian Kwacha + // * `MYR` - Malaysian Ringgit + // * `MVR` - Maldivian Rufiyaa + // * `MVP` - Maldivian Rupee (1947–1981) + // * `MLF` - Malian Franc + // * `MTL` - Maltese Lira + // * `MTP` - Maltese Pound + // * `MRU` - Mauritanian Ouguiya + // * `MRO` - Mauritanian Ouguiya (1973–2017) + // * `MUR` - Mauritian Rupee + // * `MXV` - Mexican Investment Unit + // * `MXN` - Mexican Peso + // * `MXP` - Mexican Silver Peso (1861–1992) + // * `MDC` - Moldovan Cupon + // * `MDL` - Moldovan Leu + // * `MCF` - Monegasque Franc + // * `MNT` - Mongolian Tugrik + // * `MAD` - Moroccan Dirham + // * `MAF` - Moroccan Franc + // * `MZE` - Mozambican Escudo + // * `MZN` - Mozambican Metical + // * `MZM` - Mozambican Metical (1980–2006) + // * `MMK` - Myanmar Kyat + // * `NAD` - Namibian Dollar + // * `NPR` - Nepalese Rupee + // * `ANG` - Netherlands Antillean Guilder + // * `TWD` - New Taiwan Dollar + // * `NZD` - New Zealand Dollar + // * `NIO` - Nicaraguan Córdoba + // * `NIC` - Nicaraguan Córdoba (1988–1991) + // * `NGN` - Nigerian Naira + // * `KPW` - North Korean Won + // * `NOK` - Norwegian Krone + // * `OMR` - Omani Rial + // * `PKR` - Pakistani Rupee + // * `XPD` - Palladium + // * `PAB` - Panamanian Balboa + // * `PGK` - Papua New Guinean Kina + // * `PYG` - Paraguayan Guarani + // * `PEI` - Peruvian Inti + // * `PEN` - Peruvian Sol + // * `PES` - Peruvian Sol (1863–1965) + // * `PHP` - Philippine Peso + // * `XPT` - Platinum + // * `PLN` - Polish Zloty + // * `PLZ` - Polish Zloty (1950–1995) + // * `PTE` - Portuguese Escudo + // * `GWE` - Portuguese Guinea Escudo + // * `QAR` - Qatari Rial + // * `XRE` - RINET Funds + // * `RHD` - Rhodesian Dollar + // * `RON` - Romanian Leu + // * `ROL` - Romanian Leu (1952–2006) + // * `RUB` - Russian Ruble + // * `RUR` - Russian Ruble (1991–1998) + // * `RWF` - Rwandan Franc + // * `SVC` - Salvadoran Colón + // * `WST` - Samoan Tala + // * `SAR` - Saudi Riyal + // * `RSD` - Serbian Dinar + // * `CSD` - Serbian Dinar (2002–2006) + // * `SCR` - Seychellois Rupee + // * `SLL` - Sierra Leonean Leone + // * `XAG` - Silver + // * `SGD` - Singapore Dollar + // * `SKK` - Slovak Koruna + // * `SIT` - Slovenian Tolar + // * `SBD` - Solomon Islands Dollar + // * `SOS` - Somali Shilling + // * `ZAR` - South African Rand + // * `ZAL` - South African Rand (financial) + // * `KRH` - South Korean Hwan (1953–1962) + // * `KRW` - South Korean Won + // * `KRO` - South Korean Won (1945–1953) + // * `SSP` - South Sudanese Pound + // * `SUR` - Soviet Rouble + // * `ESP` - Spanish Peseta + // * `ESA` - Spanish Peseta (A account) + // * `ESB` - Spanish Peseta (convertible account) + // * `XDR` - Special Drawing Rights + // * `LKR` - Sri Lankan Rupee + // * `SHP` - St. Helena Pound + // * `XSU` - Sucre + // * `SDD` - Sudanese Dinar (1992–2007) + // * `SDG` - Sudanese Pound + // * `SDP` - Sudanese Pound (1957–1998) + // * `SRD` - Surinamese Dollar + // * `SRG` - Surinamese Guilder + // * `SZL` - Swazi Lilangeni + // * `SEK` - Swedish Krona + // * `CHF` - Swiss Franc + // * `SYP` - Syrian Pound + // * `STN` - São Tomé & Príncipe Dobra + // * `STD` - São Tomé & Príncipe Dobra (1977–2017) + // * `TVD` - TVD + // * `TJR` - Tajikistani Ruble + // * `TJS` - Tajikistani Somoni + // * `TZS` - Tanzanian Shilling + // * `XTS` - Testing Currency Code + // * `THB` - Thai Baht + // * `XXX` - The codes assigned for transactions where no currency is involved + // * `TPE` - Timorese Escudo + // * `TOP` - Tongan Paʻanga + // * `TTD` - Trinidad & Tobago Dollar + // * `TND` - Tunisian Dinar + // * `TRY` - Turkish Lira + // * `TRL` - Turkish Lira (1922–2005) + // * `TMT` - Turkmenistani Manat + // * `TMM` - Turkmenistani Manat (1993–2009) + // * `USD` - US Dollar + // * `USN` - US Dollar (Next day) + // * `USS` - US Dollar (Same day) + // * `UGX` - Ugandan Shilling + // * `UGS` - Ugandan Shilling (1966–1987) + // * `UAH` - Ukrainian Hryvnia + // * `UAK` - Ukrainian Karbovanets + // * `AED` - United Arab Emirates Dirham + // * `UYW` - Uruguayan Nominal Wage Index Unit + // * `UYU` - Uruguayan Peso + // * `UYP` - Uruguayan Peso (1975–1993) + // * `UYI` - Uruguayan Peso (Indexed Units) + // * `UZS` - Uzbekistani Som + // * `VUV` - Vanuatu Vatu + // * `VES` - Venezuelan Bolívar + // * `VEB` - Venezuelan Bolívar (1871–2008) + // * `VEF` - Venezuelan Bolívar (2008–2018) + // * `VND` - Vietnamese Dong + // * `VNN` - Vietnamese Dong (1978–1985) + // * `CHE` - WIR Euro + // * `CHW` - WIR Franc + // * `XOF` - West African CFA Franc + // * `YDD` - Yemeni Dinar + // * `YER` - Yemeni Rial + // * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + // * `YUD` - Yugoslavian Hard Dinar (1966–1990) + // * `YUM` - Yugoslavian New Dinar (1994–2002) + // * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + // * `ZWN` - ZWN + // * `ZRN` - Zairean New Zaire (1993–1998) + // * `ZRZ` - Zairean Zaire (1971–1993) + // * `ZMW` - Zambian Kwacha + // * `ZMK` - Zambian Kwacha (1968–2012) + // * `ZWD` - Zimbabwean Dollar (1980–2008) + // * `ZWR` - Zimbabwean Dollar (2008) + // * `ZWL` - Zimbabwean Dollar (2009) + Currency *PurchaseOrderLineItemRequestCurrency `json:"currency,omitempty" url:"currency,omitempty"` + // The tax rate that applies to this line item. + TaxRate *string `json:"tax_rate,omitempty" url:"tax_rate,omitempty"` + // The purchase order line item's exchange rate. + ExchangeRate *string `json:"exchange_rate,omitempty" url:"exchange_rate,omitempty"` + // The company the purchase order line item belongs to. + Company *string `json:"company,omitempty" url:"company,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + RemoteFields []*RemoteFieldRequest `json:"remote_fields,omitempty" url:"remote_fields,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PurchaseOrderLineItemRequest) GetRemoteId() *string { + if p == nil { + return nil + } + return p.RemoteId +} + +func (p *PurchaseOrderLineItemRequest) GetDescription() *string { + if p == nil { + return nil + } + return p.Description +} + +func (p *PurchaseOrderLineItemRequest) GetUnitPrice() *float64 { + if p == nil { + return nil + } + return p.UnitPrice +} + +func (p *PurchaseOrderLineItemRequest) GetQuantity() *float64 { + if p == nil { + return nil + } + return p.Quantity +} + +func (p *PurchaseOrderLineItemRequest) GetItem() *PurchaseOrderLineItemRequestItem { + if p == nil { + return nil + } + return p.Item +} + +func (p *PurchaseOrderLineItemRequest) GetAccount() *string { + if p == nil { + return nil + } + return p.Account +} + +func (p *PurchaseOrderLineItemRequest) GetTrackingCategory() *string { + if p == nil { + return nil + } + return p.TrackingCategory +} + +func (p *PurchaseOrderLineItemRequest) GetTrackingCategories() []*string { + if p == nil { + return nil + } + return p.TrackingCategories +} + +func (p *PurchaseOrderLineItemRequest) GetTaxAmount() *string { + if p == nil { + return nil + } + return p.TaxAmount +} + +func (p *PurchaseOrderLineItemRequest) GetTotalLineAmount() *string { + if p == nil { + return nil + } + return p.TotalLineAmount +} + +func (p *PurchaseOrderLineItemRequest) GetCurrency() *PurchaseOrderLineItemRequestCurrency { + if p == nil { + return nil + } + return p.Currency +} + +func (p *PurchaseOrderLineItemRequest) GetTaxRate() *string { + if p == nil { + return nil + } + return p.TaxRate +} + +func (p *PurchaseOrderLineItemRequest) GetExchangeRate() *string { + if p == nil { + return nil + } + return p.ExchangeRate +} + +func (p *PurchaseOrderLineItemRequest) GetCompany() *string { + if p == nil { + return nil + } + return p.Company +} + +func (p *PurchaseOrderLineItemRequest) GetIntegrationParams() map[string]interface{} { + if p == nil { + return nil + } + return p.IntegrationParams +} + +func (p *PurchaseOrderLineItemRequest) GetLinkedAccountParams() map[string]interface{} { + if p == nil { + return nil + } + return p.LinkedAccountParams +} + +func (p *PurchaseOrderLineItemRequest) GetRemoteFields() []*RemoteFieldRequest { + if p == nil { + return nil + } + return p.RemoteFields +} + +func (p *PurchaseOrderLineItemRequest) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PurchaseOrderLineItemRequest) UnmarshalJSON(data []byte) error { + type unmarshaler PurchaseOrderLineItemRequest + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PurchaseOrderLineItemRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PurchaseOrderLineItemRequest) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +// The purchase order line item's currency. +// +// * `XUA` - ADB Unit of Account +// * `AFN` - Afghan Afghani +// * `AFA` - Afghan Afghani (1927–2002) +// * `ALL` - Albanian Lek +// * `ALK` - Albanian Lek (1946–1965) +// * `DZD` - Algerian Dinar +// * `ADP` - Andorran Peseta +// * `AOA` - Angolan Kwanza +// * `AOK` - Angolan Kwanza (1977–1991) +// * `AON` - Angolan New Kwanza (1990–2000) +// * `AOR` - Angolan Readjusted Kwanza (1995–1999) +// * `ARA` - Argentine Austral +// * `ARS` - Argentine Peso +// * `ARM` - Argentine Peso (1881–1970) +// * `ARP` - Argentine Peso (1983–1985) +// * `ARL` - Argentine Peso Ley (1970–1983) +// * `AMD` - Armenian Dram +// * `AWG` - Aruban Florin +// * `AUD` - Australian Dollar +// * `ATS` - Austrian Schilling +// * `AZN` - Azerbaijani Manat +// * `AZM` - Azerbaijani Manat (1993–2006) +// * `BSD` - Bahamian Dollar +// * `BHD` - Bahraini Dinar +// * `BDT` - Bangladeshi Taka +// * `BBD` - Barbadian Dollar +// * `BYN` - Belarusian Ruble +// * `BYB` - Belarusian Ruble (1994–1999) +// * `BYR` - Belarusian Ruble (2000–2016) +// * `BEF` - Belgian Franc +// * `BEC` - Belgian Franc (convertible) +// * `BEL` - Belgian Franc (financial) +// * `BZD` - Belize Dollar +// * `BMD` - Bermudan Dollar +// * `BTN` - Bhutanese Ngultrum +// * `BOB` - Bolivian Boliviano +// * `BOL` - Bolivian Boliviano (1863–1963) +// * `BOV` - Bolivian Mvdol +// * `BOP` - Bolivian Peso +// * `BAM` - Bosnia-Herzegovina Convertible Mark +// * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) +// * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) +// * `BWP` - Botswanan Pula +// * `BRC` - Brazilian Cruzado (1986–1989) +// * `BRZ` - Brazilian Cruzeiro (1942–1967) +// * `BRE` - Brazilian Cruzeiro (1990–1993) +// * `BRR` - Brazilian Cruzeiro (1993–1994) +// * `BRN` - Brazilian New Cruzado (1989–1990) +// * `BRB` - Brazilian New Cruzeiro (1967–1986) +// * `BRL` - Brazilian Real +// * `GBP` - British Pound +// * `BND` - Brunei Dollar +// * `BGL` - Bulgarian Hard Lev +// * `BGN` - Bulgarian Lev +// * `BGO` - Bulgarian Lev (1879–1952) +// * `BGM` - Bulgarian Socialist Lev +// * `BUK` - Burmese Kyat +// * `BIF` - Burundian Franc +// * `XPF` - CFP Franc +// * `KHR` - Cambodian Riel +// * `CAD` - Canadian Dollar +// * `CVE` - Cape Verdean Escudo +// * `KYD` - Cayman Islands Dollar +// * `XAF` - Central African CFA Franc +// * `CLE` - Chilean Escudo +// * `CLP` - Chilean Peso +// * `CLF` - Chilean Unit of Account (UF) +// * `CNX` - Chinese People’s Bank Dollar +// * `CNY` - Chinese Yuan +// * `CNH` - Chinese Yuan (offshore) +// * `COP` - Colombian Peso +// * `COU` - Colombian Real Value Unit +// * `KMF` - Comorian Franc +// * `CDF` - Congolese Franc +// * `CRC` - Costa Rican Colón +// * `HRD` - Croatian Dinar +// * `HRK` - Croatian Kuna +// * `CUC` - Cuban Convertible Peso +// * `CUP` - Cuban Peso +// * `CYP` - Cypriot Pound +// * `CZK` - Czech Koruna +// * `CSK` - Czechoslovak Hard Koruna +// * `DKK` - Danish Krone +// * `DJF` - Djiboutian Franc +// * `DOP` - Dominican Peso +// * `NLG` - Dutch Guilder +// * `XCD` - East Caribbean Dollar +// * `DDM` - East German Mark +// * `ECS` - Ecuadorian Sucre +// * `ECV` - Ecuadorian Unit of Constant Value +// * `EGP` - Egyptian Pound +// * `GQE` - Equatorial Guinean Ekwele +// * `ERN` - Eritrean Nakfa +// * `EEK` - Estonian Kroon +// * `ETB` - Ethiopian Birr +// * `EUR` - Euro +// * `XBA` - European Composite Unit +// * `XEU` - European Currency Unit +// * `XBB` - European Monetary Unit +// * `XBC` - European Unit of Account (XBC) +// * `XBD` - European Unit of Account (XBD) +// * `FKP` - Falkland Islands Pound +// * `FJD` - Fijian Dollar +// * `FIM` - Finnish Markka +// * `FRF` - French Franc +// * `XFO` - French Gold Franc +// * `XFU` - French UIC-Franc +// * `GMD` - Gambian Dalasi +// * `GEK` - Georgian Kupon Larit +// * `GEL` - Georgian Lari +// * `DEM` - German Mark +// * `GHS` - Ghanaian Cedi +// * `GHC` - Ghanaian Cedi (1979–2007) +// * `GIP` - Gibraltar Pound +// * `XAU` - Gold +// * `GRD` - Greek Drachma +// * `GTQ` - Guatemalan Quetzal +// * `GWP` - Guinea-Bissau Peso +// * `GNF` - Guinean Franc +// * `GNS` - Guinean Syli +// * `GYD` - Guyanaese Dollar +// * `HTG` - Haitian Gourde +// * `HNL` - Honduran Lempira +// * `HKD` - Hong Kong Dollar +// * `HUF` - Hungarian Forint +// * `IMP` - IMP +// * `ISK` - Icelandic Króna +// * `ISJ` - Icelandic Króna (1918–1981) +// * `INR` - Indian Rupee +// * `IDR` - Indonesian Rupiah +// * `IRR` - Iranian Rial +// * `IQD` - Iraqi Dinar +// * `IEP` - Irish Pound +// * `ILS` - Israeli New Shekel +// * `ILP` - Israeli Pound +// * `ILR` - Israeli Shekel (1980–1985) +// * `ITL` - Italian Lira +// * `JMD` - Jamaican Dollar +// * `JPY` - Japanese Yen +// * `JOD` - Jordanian Dinar +// * `KZT` - Kazakhstani Tenge +// * `KES` - Kenyan Shilling +// * `KWD` - Kuwaiti Dinar +// * `KGS` - Kyrgystani Som +// * `LAK` - Laotian Kip +// * `LVL` - Latvian Lats +// * `LVR` - Latvian Ruble +// * `LBP` - Lebanese Pound +// * `LSL` - Lesotho Loti +// * `LRD` - Liberian Dollar +// * `LYD` - Libyan Dinar +// * `LTL` - Lithuanian Litas +// * `LTT` - Lithuanian Talonas +// * `LUL` - Luxembourg Financial Franc +// * `LUC` - Luxembourgian Convertible Franc +// * `LUF` - Luxembourgian Franc +// * `MOP` - Macanese Pataca +// * `MKD` - Macedonian Denar +// * `MKN` - Macedonian Denar (1992–1993) +// * `MGA` - Malagasy Ariary +// * `MGF` - Malagasy Franc +// * `MWK` - Malawian Kwacha +// * `MYR` - Malaysian Ringgit +// * `MVR` - Maldivian Rufiyaa +// * `MVP` - Maldivian Rupee (1947–1981) +// * `MLF` - Malian Franc +// * `MTL` - Maltese Lira +// * `MTP` - Maltese Pound +// * `MRU` - Mauritanian Ouguiya +// * `MRO` - Mauritanian Ouguiya (1973–2017) +// * `MUR` - Mauritian Rupee +// * `MXV` - Mexican Investment Unit +// * `MXN` - Mexican Peso +// * `MXP` - Mexican Silver Peso (1861–1992) +// * `MDC` - Moldovan Cupon +// * `MDL` - Moldovan Leu +// * `MCF` - Monegasque Franc +// * `MNT` - Mongolian Tugrik +// * `MAD` - Moroccan Dirham +// * `MAF` - Moroccan Franc +// * `MZE` - Mozambican Escudo +// * `MZN` - Mozambican Metical +// * `MZM` - Mozambican Metical (1980–2006) +// * `MMK` - Myanmar Kyat +// * `NAD` - Namibian Dollar +// * `NPR` - Nepalese Rupee +// * `ANG` - Netherlands Antillean Guilder +// * `TWD` - New Taiwan Dollar +// * `NZD` - New Zealand Dollar +// * `NIO` - Nicaraguan Córdoba +// * `NIC` - Nicaraguan Córdoba (1988–1991) +// * `NGN` - Nigerian Naira +// * `KPW` - North Korean Won +// * `NOK` - Norwegian Krone +// * `OMR` - Omani Rial +// * `PKR` - Pakistani Rupee +// * `XPD` - Palladium +// * `PAB` - Panamanian Balboa +// * `PGK` - Papua New Guinean Kina +// * `PYG` - Paraguayan Guarani +// * `PEI` - Peruvian Inti +// * `PEN` - Peruvian Sol +// * `PES` - Peruvian Sol (1863–1965) +// * `PHP` - Philippine Peso +// * `XPT` - Platinum +// * `PLN` - Polish Zloty +// * `PLZ` - Polish Zloty (1950–1995) +// * `PTE` - Portuguese Escudo +// * `GWE` - Portuguese Guinea Escudo +// * `QAR` - Qatari Rial +// * `XRE` - RINET Funds +// * `RHD` - Rhodesian Dollar +// * `RON` - Romanian Leu +// * `ROL` - Romanian Leu (1952–2006) +// * `RUB` - Russian Ruble +// * `RUR` - Russian Ruble (1991–1998) +// * `RWF` - Rwandan Franc +// * `SVC` - Salvadoran Colón +// * `WST` - Samoan Tala +// * `SAR` - Saudi Riyal +// * `RSD` - Serbian Dinar +// * `CSD` - Serbian Dinar (2002–2006) +// * `SCR` - Seychellois Rupee +// * `SLL` - Sierra Leonean Leone +// * `XAG` - Silver +// * `SGD` - Singapore Dollar +// * `SKK` - Slovak Koruna +// * `SIT` - Slovenian Tolar +// * `SBD` - Solomon Islands Dollar +// * `SOS` - Somali Shilling +// * `ZAR` - South African Rand +// * `ZAL` - South African Rand (financial) +// * `KRH` - South Korean Hwan (1953–1962) +// * `KRW` - South Korean Won +// * `KRO` - South Korean Won (1945–1953) +// * `SSP` - South Sudanese Pound +// * `SUR` - Soviet Rouble +// * `ESP` - Spanish Peseta +// * `ESA` - Spanish Peseta (A account) +// * `ESB` - Spanish Peseta (convertible account) +// * `XDR` - Special Drawing Rights +// * `LKR` - Sri Lankan Rupee +// * `SHP` - St. Helena Pound +// * `XSU` - Sucre +// * `SDD` - Sudanese Dinar (1992–2007) +// * `SDG` - Sudanese Pound +// * `SDP` - Sudanese Pound (1957–1998) +// * `SRD` - Surinamese Dollar +// * `SRG` - Surinamese Guilder +// * `SZL` - Swazi Lilangeni +// * `SEK` - Swedish Krona +// * `CHF` - Swiss Franc +// * `SYP` - Syrian Pound +// * `STN` - São Tomé & Príncipe Dobra +// * `STD` - São Tomé & Príncipe Dobra (1977–2017) +// * `TVD` - TVD +// * `TJR` - Tajikistani Ruble +// * `TJS` - Tajikistani Somoni +// * `TZS` - Tanzanian Shilling +// * `XTS` - Testing Currency Code +// * `THB` - Thai Baht +// * `XXX` - The codes assigned for transactions where no currency is involved +// * `TPE` - Timorese Escudo +// * `TOP` - Tongan Paʻanga +// * `TTD` - Trinidad & Tobago Dollar +// * `TND` - Tunisian Dinar +// * `TRY` - Turkish Lira +// * `TRL` - Turkish Lira (1922–2005) +// * `TMT` - Turkmenistani Manat +// * `TMM` - Turkmenistani Manat (1993–2009) +// * `USD` - US Dollar +// * `USN` - US Dollar (Next day) +// * `USS` - US Dollar (Same day) +// * `UGX` - Ugandan Shilling +// * `UGS` - Ugandan Shilling (1966–1987) +// * `UAH` - Ukrainian Hryvnia +// * `UAK` - Ukrainian Karbovanets +// * `AED` - United Arab Emirates Dirham +// * `UYW` - Uruguayan Nominal Wage Index Unit +// * `UYU` - Uruguayan Peso +// * `UYP` - Uruguayan Peso (1975–1993) +// * `UYI` - Uruguayan Peso (Indexed Units) +// * `UZS` - Uzbekistani Som +// * `VUV` - Vanuatu Vatu +// * `VES` - Venezuelan Bolívar +// * `VEB` - Venezuelan Bolívar (1871–2008) +// * `VEF` - Venezuelan Bolívar (2008–2018) +// * `VND` - Vietnamese Dong +// * `VNN` - Vietnamese Dong (1978–1985) +// * `CHE` - WIR Euro +// * `CHW` - WIR Franc +// * `XOF` - West African CFA Franc +// * `YDD` - Yemeni Dinar +// * `YER` - Yemeni Rial +// * `YUN` - Yugoslavian Convertible Dinar (1990–1992) +// * `YUD` - Yugoslavian Hard Dinar (1966–1990) +// * `YUM` - Yugoslavian New Dinar (1994–2002) +// * `YUR` - Yugoslavian Reformed Dinar (1992–1993) +// * `ZWN` - ZWN +// * `ZRN` - Zairean New Zaire (1993–1998) +// * `ZRZ` - Zairean Zaire (1971–1993) +// * `ZMW` - Zambian Kwacha +// * `ZMK` - Zambian Kwacha (1968–2012) +// * `ZWD` - Zimbabwean Dollar (1980–2008) +// * `ZWR` - Zimbabwean Dollar (2008) +// * `ZWL` - Zimbabwean Dollar (2009) +type PurchaseOrderLineItemRequestCurrency struct { + TransactionCurrencyEnum TransactionCurrencyEnum + String string + + typ string +} + +func (p *PurchaseOrderLineItemRequestCurrency) GetTransactionCurrencyEnum() TransactionCurrencyEnum { + if p == nil { + return "" + } + return p.TransactionCurrencyEnum +} + +func (p *PurchaseOrderLineItemRequestCurrency) GetString() string { + if p == nil { + return "" + } + return p.String +} + +func (p *PurchaseOrderLineItemRequestCurrency) UnmarshalJSON(data []byte) error { + var valueTransactionCurrencyEnum TransactionCurrencyEnum + if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { + p.typ = "TransactionCurrencyEnum" + p.TransactionCurrencyEnum = valueTransactionCurrencyEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + p.typ = "String" + p.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, p) +} + +func (p PurchaseOrderLineItemRequestCurrency) MarshalJSON() ([]byte, error) { + if p.typ == "TransactionCurrencyEnum" || p.TransactionCurrencyEnum != "" { + return json.Marshal(p.TransactionCurrencyEnum) + } + if p.typ == "String" || p.String != "" { + return json.Marshal(p.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) +} + +type PurchaseOrderLineItemRequestCurrencyVisitor interface { + VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error + VisitString(string) error +} + +func (p *PurchaseOrderLineItemRequestCurrency) Accept(visitor PurchaseOrderLineItemRequestCurrencyVisitor) error { + if p.typ == "TransactionCurrencyEnum" || p.TransactionCurrencyEnum != "" { + return visitor.VisitTransactionCurrencyEnum(p.TransactionCurrencyEnum) + } + if p.typ == "String" || p.String != "" { + return visitor.VisitString(p.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", p) +} + +type PurchaseOrderLineItemRequestItem struct { + String string + Item *Item + + typ string +} + +func (p *PurchaseOrderLineItemRequestItem) GetString() string { + if p == nil { + return "" + } + return p.String +} + +func (p *PurchaseOrderLineItemRequestItem) GetItem() *Item { + if p == nil { + return nil + } + return p.Item +} + +func (p *PurchaseOrderLineItemRequestItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + p.typ = "String" + p.String = valueString + return nil + } + valueItem := new(Item) + if err := json.Unmarshal(data, &valueItem); err == nil { + p.typ = "Item" + p.Item = valueItem + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, p) +} + +func (p PurchaseOrderLineItemRequestItem) MarshalJSON() ([]byte, error) { + if p.typ == "String" || p.String != "" { + return json.Marshal(p.String) + } + if p.typ == "Item" || p.Item != nil { + return json.Marshal(p.Item) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) +} + +type PurchaseOrderLineItemRequestItemVisitor interface { + VisitString(string) error + VisitItem(*Item) error +} + +func (p *PurchaseOrderLineItemRequestItem) Accept(visitor PurchaseOrderLineItemRequestItemVisitor) error { + if p.typ == "String" || p.String != "" { + return visitor.VisitString(p.String) + } + if p.typ == "Item" || p.Item != nil { + return visitor.VisitItem(p.Item) + } + return fmt.Errorf("type %T does not include a non-empty union type", p) +} + +// # The PurchaseOrder Object +// ### Description +// The `PurchaseOrder` object is a record of request for a product or service between a buyer and seller. +// +// ### Usage Example +// Fetch from the `LIST PurchaseOrders` endpoint and view a company's purchase orders. +type PurchaseOrderRequest struct { + // The purchase order's status. + // + // * `DRAFT` - DRAFT + // * `SUBMITTED` - SUBMITTED + // * `AUTHORIZED` - AUTHORIZED + // * `BILLED` - BILLED + // * `DELETED` - DELETED + Status *PurchaseOrderRequestStatus `json:"status,omitempty" url:"status,omitempty"` + // The purchase order's issue date. + IssueDate *time.Time `json:"issue_date,omitempty" url:"issue_date,omitempty"` + // The purchase order's delivery date. + DeliveryDate *time.Time `json:"delivery_date,omitempty" url:"delivery_date,omitempty"` + // The purchase order's delivery address. + DeliveryAddress *PurchaseOrderRequestDeliveryAddress `json:"delivery_address,omitempty" url:"delivery_address,omitempty"` + // The contact making the purchase order. + Customer *string `json:"customer,omitempty" url:"customer,omitempty"` + // The party fulfilling the purchase order. + Vendor *PurchaseOrderRequestVendor `json:"vendor,omitempty" url:"vendor,omitempty"` + // A memo attached to the purchase order. + Memo *string `json:"memo,omitempty" url:"memo,omitempty"` + // The company the purchase order belongs to. + Company *PurchaseOrderRequestCompany `json:"company,omitempty" url:"company,omitempty"` + // The purchase order's total amount. + TotalAmount *float64 `json:"total_amount,omitempty" url:"total_amount,omitempty"` + // The payment term that applies to this transaction. + PaymentTerm *PurchaseOrderRequestPaymentTerm `json:"payment_term,omitempty" url:"payment_term,omitempty"` + // The purchase order's currency. + // + // * `XUA` - ADB Unit of Account + // * `AFN` - Afghan Afghani + // * `AFA` - Afghan Afghani (1927–2002) + // * `ALL` - Albanian Lek + // * `ALK` - Albanian Lek (1946–1965) + // * `DZD` - Algerian Dinar + // * `ADP` - Andorran Peseta + // * `AOA` - Angolan Kwanza + // * `AOK` - Angolan Kwanza (1977–1991) + // * `AON` - Angolan New Kwanza (1990–2000) + // * `AOR` - Angolan Readjusted Kwanza (1995–1999) + // * `ARA` - Argentine Austral + // * `ARS` - Argentine Peso + // * `ARM` - Argentine Peso (1881–1970) + // * `ARP` - Argentine Peso (1983–1985) + // * `ARL` - Argentine Peso Ley (1970–1983) + // * `AMD` - Armenian Dram + // * `AWG` - Aruban Florin + // * `AUD` - Australian Dollar + // * `ATS` - Austrian Schilling + // * `AZN` - Azerbaijani Manat + // * `AZM` - Azerbaijani Manat (1993–2006) + // * `BSD` - Bahamian Dollar + // * `BHD` - Bahraini Dinar + // * `BDT` - Bangladeshi Taka + // * `BBD` - Barbadian Dollar + // * `BYN` - Belarusian Ruble + // * `BYB` - Belarusian Ruble (1994–1999) + // * `BYR` - Belarusian Ruble (2000–2016) + // * `BEF` - Belgian Franc + // * `BEC` - Belgian Franc (convertible) + // * `BEL` - Belgian Franc (financial) + // * `BZD` - Belize Dollar + // * `BMD` - Bermudan Dollar + // * `BTN` - Bhutanese Ngultrum + // * `BOB` - Bolivian Boliviano + // * `BOL` - Bolivian Boliviano (1863–1963) + // * `BOV` - Bolivian Mvdol + // * `BOP` - Bolivian Peso + // * `BAM` - Bosnia-Herzegovina Convertible Mark + // * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + // * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + // * `BWP` - Botswanan Pula + // * `BRC` - Brazilian Cruzado (1986–1989) + // * `BRZ` - Brazilian Cruzeiro (1942–1967) + // * `BRE` - Brazilian Cruzeiro (1990–1993) + // * `BRR` - Brazilian Cruzeiro (1993–1994) + // * `BRN` - Brazilian New Cruzado (1989–1990) + // * `BRB` - Brazilian New Cruzeiro (1967–1986) + // * `BRL` - Brazilian Real + // * `GBP` - British Pound + // * `BND` - Brunei Dollar + // * `BGL` - Bulgarian Hard Lev + // * `BGN` - Bulgarian Lev + // * `BGO` - Bulgarian Lev (1879–1952) + // * `BGM` - Bulgarian Socialist Lev + // * `BUK` - Burmese Kyat + // * `BIF` - Burundian Franc + // * `XPF` - CFP Franc + // * `KHR` - Cambodian Riel + // * `CAD` - Canadian Dollar + // * `CVE` - Cape Verdean Escudo + // * `KYD` - Cayman Islands Dollar + // * `XAF` - Central African CFA Franc + // * `CLE` - Chilean Escudo + // * `CLP` - Chilean Peso + // * `CLF` - Chilean Unit of Account (UF) + // * `CNX` - Chinese People’s Bank Dollar + // * `CNY` - Chinese Yuan + // * `CNH` - Chinese Yuan (offshore) + // * `COP` - Colombian Peso + // * `COU` - Colombian Real Value Unit + // * `KMF` - Comorian Franc + // * `CDF` - Congolese Franc + // * `CRC` - Costa Rican Colón + // * `HRD` - Croatian Dinar + // * `HRK` - Croatian Kuna + // * `CUC` - Cuban Convertible Peso + // * `CUP` - Cuban Peso + // * `CYP` - Cypriot Pound + // * `CZK` - Czech Koruna + // * `CSK` - Czechoslovak Hard Koruna + // * `DKK` - Danish Krone + // * `DJF` - Djiboutian Franc + // * `DOP` - Dominican Peso + // * `NLG` - Dutch Guilder + // * `XCD` - East Caribbean Dollar + // * `DDM` - East German Mark + // * `ECS` - Ecuadorian Sucre + // * `ECV` - Ecuadorian Unit of Constant Value + // * `EGP` - Egyptian Pound + // * `GQE` - Equatorial Guinean Ekwele + // * `ERN` - Eritrean Nakfa + // * `EEK` - Estonian Kroon + // * `ETB` - Ethiopian Birr + // * `EUR` - Euro + // * `XBA` - European Composite Unit + // * `XEU` - European Currency Unit + // * `XBB` - European Monetary Unit + // * `XBC` - European Unit of Account (XBC) + // * `XBD` - European Unit of Account (XBD) + // * `FKP` - Falkland Islands Pound + // * `FJD` - Fijian Dollar + // * `FIM` - Finnish Markka + // * `FRF` - French Franc + // * `XFO` - French Gold Franc + // * `XFU` - French UIC-Franc + // * `GMD` - Gambian Dalasi + // * `GEK` - Georgian Kupon Larit + // * `GEL` - Georgian Lari + // * `DEM` - German Mark + // * `GHS` - Ghanaian Cedi + // * `GHC` - Ghanaian Cedi (1979–2007) + // * `GIP` - Gibraltar Pound + // * `XAU` - Gold + // * `GRD` - Greek Drachma + // * `GTQ` - Guatemalan Quetzal + // * `GWP` - Guinea-Bissau Peso + // * `GNF` - Guinean Franc + // * `GNS` - Guinean Syli + // * `GYD` - Guyanaese Dollar + // * `HTG` - Haitian Gourde + // * `HNL` - Honduran Lempira + // * `HKD` - Hong Kong Dollar + // * `HUF` - Hungarian Forint + // * `IMP` - IMP + // * `ISK` - Icelandic Króna + // * `ISJ` - Icelandic Króna (1918–1981) + // * `INR` - Indian Rupee + // * `IDR` - Indonesian Rupiah + // * `IRR` - Iranian Rial + // * `IQD` - Iraqi Dinar + // * `IEP` - Irish Pound + // * `ILS` - Israeli New Shekel + // * `ILP` - Israeli Pound + // * `ILR` - Israeli Shekel (1980–1985) + // * `ITL` - Italian Lira + // * `JMD` - Jamaican Dollar + // * `JPY` - Japanese Yen + // * `JOD` - Jordanian Dinar + // * `KZT` - Kazakhstani Tenge + // * `KES` - Kenyan Shilling + // * `KWD` - Kuwaiti Dinar + // * `KGS` - Kyrgystani Som + // * `LAK` - Laotian Kip + // * `LVL` - Latvian Lats + // * `LVR` - Latvian Ruble + // * `LBP` - Lebanese Pound + // * `LSL` - Lesotho Loti + // * `LRD` - Liberian Dollar + // * `LYD` - Libyan Dinar + // * `LTL` - Lithuanian Litas + // * `LTT` - Lithuanian Talonas + // * `LUL` - Luxembourg Financial Franc + // * `LUC` - Luxembourgian Convertible Franc + // * `LUF` - Luxembourgian Franc + // * `MOP` - Macanese Pataca + // * `MKD` - Macedonian Denar + // * `MKN` - Macedonian Denar (1992–1993) + // * `MGA` - Malagasy Ariary + // * `MGF` - Malagasy Franc + // * `MWK` - Malawian Kwacha + // * `MYR` - Malaysian Ringgit + // * `MVR` - Maldivian Rufiyaa + // * `MVP` - Maldivian Rupee (1947–1981) + // * `MLF` - Malian Franc + // * `MTL` - Maltese Lira + // * `MTP` - Maltese Pound + // * `MRU` - Mauritanian Ouguiya + // * `MRO` - Mauritanian Ouguiya (1973–2017) + // * `MUR` - Mauritian Rupee + // * `MXV` - Mexican Investment Unit + // * `MXN` - Mexican Peso + // * `MXP` - Mexican Silver Peso (1861–1992) + // * `MDC` - Moldovan Cupon + // * `MDL` - Moldovan Leu + // * `MCF` - Monegasque Franc + // * `MNT` - Mongolian Tugrik + // * `MAD` - Moroccan Dirham + // * `MAF` - Moroccan Franc + // * `MZE` - Mozambican Escudo + // * `MZN` - Mozambican Metical + // * `MZM` - Mozambican Metical (1980–2006) + // * `MMK` - Myanmar Kyat + // * `NAD` - Namibian Dollar + // * `NPR` - Nepalese Rupee + // * `ANG` - Netherlands Antillean Guilder + // * `TWD` - New Taiwan Dollar + // * `NZD` - New Zealand Dollar + // * `NIO` - Nicaraguan Córdoba + // * `NIC` - Nicaraguan Córdoba (1988–1991) + // * `NGN` - Nigerian Naira + // * `KPW` - North Korean Won + // * `NOK` - Norwegian Krone + // * `OMR` - Omani Rial + // * `PKR` - Pakistani Rupee + // * `XPD` - Palladium + // * `PAB` - Panamanian Balboa + // * `PGK` - Papua New Guinean Kina + // * `PYG` - Paraguayan Guarani + // * `PEI` - Peruvian Inti + // * `PEN` - Peruvian Sol + // * `PES` - Peruvian Sol (1863–1965) + // * `PHP` - Philippine Peso + // * `XPT` - Platinum + // * `PLN` - Polish Zloty + // * `PLZ` - Polish Zloty (1950–1995) + // * `PTE` - Portuguese Escudo + // * `GWE` - Portuguese Guinea Escudo + // * `QAR` - Qatari Rial + // * `XRE` - RINET Funds + // * `RHD` - Rhodesian Dollar + // * `RON` - Romanian Leu + // * `ROL` - Romanian Leu (1952–2006) + // * `RUB` - Russian Ruble + // * `RUR` - Russian Ruble (1991–1998) + // * `RWF` - Rwandan Franc + // * `SVC` - Salvadoran Colón + // * `WST` - Samoan Tala + // * `SAR` - Saudi Riyal + // * `RSD` - Serbian Dinar + // * `CSD` - Serbian Dinar (2002–2006) + // * `SCR` - Seychellois Rupee + // * `SLL` - Sierra Leonean Leone + // * `XAG` - Silver + // * `SGD` - Singapore Dollar + // * `SKK` - Slovak Koruna + // * `SIT` - Slovenian Tolar + // * `SBD` - Solomon Islands Dollar + // * `SOS` - Somali Shilling + // * `ZAR` - South African Rand + // * `ZAL` - South African Rand (financial) + // * `KRH` - South Korean Hwan (1953–1962) + // * `KRW` - South Korean Won + // * `KRO` - South Korean Won (1945–1953) + // * `SSP` - South Sudanese Pound + // * `SUR` - Soviet Rouble + // * `ESP` - Spanish Peseta + // * `ESA` - Spanish Peseta (A account) + // * `ESB` - Spanish Peseta (convertible account) + // * `XDR` - Special Drawing Rights + // * `LKR` - Sri Lankan Rupee + // * `SHP` - St. Helena Pound + // * `XSU` - Sucre + // * `SDD` - Sudanese Dinar (1992–2007) + // * `SDG` - Sudanese Pound + // * `SDP` - Sudanese Pound (1957–1998) + // * `SRD` - Surinamese Dollar + // * `SRG` - Surinamese Guilder + // * `SZL` - Swazi Lilangeni + // * `SEK` - Swedish Krona + // * `CHF` - Swiss Franc + // * `SYP` - Syrian Pound + // * `STN` - São Tomé & Príncipe Dobra + // * `STD` - São Tomé & Príncipe Dobra (1977–2017) + // * `TVD` - TVD + // * `TJR` - Tajikistani Ruble + // * `TJS` - Tajikistani Somoni + // * `TZS` - Tanzanian Shilling + // * `XTS` - Testing Currency Code + // * `THB` - Thai Baht + // * `XXX` - The codes assigned for transactions where no currency is involved + // * `TPE` - Timorese Escudo + // * `TOP` - Tongan Paʻanga + // * `TTD` - Trinidad & Tobago Dollar + // * `TND` - Tunisian Dinar + // * `TRY` - Turkish Lira + // * `TRL` - Turkish Lira (1922–2005) + // * `TMT` - Turkmenistani Manat + // * `TMM` - Turkmenistani Manat (1993–2009) + // * `USD` - US Dollar + // * `USN` - US Dollar (Next day) + // * `USS` - US Dollar (Same day) + // * `UGX` - Ugandan Shilling + // * `UGS` - Ugandan Shilling (1966–1987) + // * `UAH` - Ukrainian Hryvnia + // * `UAK` - Ukrainian Karbovanets + // * `AED` - United Arab Emirates Dirham + // * `UYW` - Uruguayan Nominal Wage Index Unit + // * `UYU` - Uruguayan Peso + // * `UYP` - Uruguayan Peso (1975–1993) + // * `UYI` - Uruguayan Peso (Indexed Units) + // * `UZS` - Uzbekistani Som + // * `VUV` - Vanuatu Vatu + // * `VES` - Venezuelan Bolívar + // * `VEB` - Venezuelan Bolívar (1871–2008) + // * `VEF` - Venezuelan Bolívar (2008–2018) + // * `VND` - Vietnamese Dong + // * `VNN` - Vietnamese Dong (1978–1985) + // * `CHE` - WIR Euro + // * `CHW` - WIR Franc + // * `XOF` - West African CFA Franc + // * `YDD` - Yemeni Dinar + // * `YER` - Yemeni Rial + // * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + // * `YUD` - Yugoslavian Hard Dinar (1966–1990) + // * `YUM` - Yugoslavian New Dinar (1994–2002) + // * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + // * `ZWN` - ZWN + // * `ZRN` - Zairean New Zaire (1993–1998) + // * `ZRZ` - Zairean Zaire (1971–1993) + // * `ZMW` - Zambian Kwacha + // * `ZMK` - Zambian Kwacha (1968–2012) + // * `ZWD` - Zimbabwean Dollar (1980–2008) + // * `ZWR` - Zimbabwean Dollar (2008) + // * `ZWL` - Zimbabwean Dollar (2009) + Currency *PurchaseOrderRequestCurrency `json:"currency,omitempty" url:"currency,omitempty"` + // If the transaction is inclusive or exclusive of tax. `True` if inclusive, `False` if exclusive. + InclusiveOfTax *bool `json:"inclusive_of_tax,omitempty" url:"inclusive_of_tax,omitempty"` + // The purchase order's exchange rate. + ExchangeRate *string `json:"exchange_rate,omitempty" url:"exchange_rate,omitempty"` + TrackingCategories []*PurchaseOrderRequestTrackingCategoriesItem `json:"tracking_categories,omitempty" url:"tracking_categories,omitempty"` + LineItems []*PurchaseOrderLineItemRequest `json:"line_items,omitempty" url:"line_items,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + RemoteFields []*RemoteFieldRequest `json:"remote_fields,omitempty" url:"remote_fields,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PurchaseOrderRequest) GetStatus() *PurchaseOrderRequestStatus { + if p == nil { + return nil + } + return p.Status +} + +func (p *PurchaseOrderRequest) GetIssueDate() *time.Time { + if p == nil { + return nil + } + return p.IssueDate +} + +func (p *PurchaseOrderRequest) GetDeliveryDate() *time.Time { + if p == nil { + return nil + } + return p.DeliveryDate +} + +func (p *PurchaseOrderRequest) GetDeliveryAddress() *PurchaseOrderRequestDeliveryAddress { + if p == nil { + return nil + } + return p.DeliveryAddress +} + +func (p *PurchaseOrderRequest) GetCustomer() *string { + if p == nil { + return nil + } + return p.Customer +} + +func (p *PurchaseOrderRequest) GetVendor() *PurchaseOrderRequestVendor { + if p == nil { + return nil + } + return p.Vendor +} + +func (p *PurchaseOrderRequest) GetMemo() *string { + if p == nil { + return nil + } + return p.Memo +} + +func (p *PurchaseOrderRequest) GetCompany() *PurchaseOrderRequestCompany { + if p == nil { + return nil + } + return p.Company +} + +func (p *PurchaseOrderRequest) GetTotalAmount() *float64 { + if p == nil { + return nil + } + return p.TotalAmount +} + +func (p *PurchaseOrderRequest) GetPaymentTerm() *PurchaseOrderRequestPaymentTerm { + if p == nil { + return nil + } + return p.PaymentTerm +} + +func (p *PurchaseOrderRequest) GetCurrency() *PurchaseOrderRequestCurrency { + if p == nil { + return nil + } + return p.Currency +} + +func (p *PurchaseOrderRequest) GetInclusiveOfTax() *bool { + if p == nil { + return nil + } + return p.InclusiveOfTax +} + +func (p *PurchaseOrderRequest) GetExchangeRate() *string { + if p == nil { + return nil + } + return p.ExchangeRate +} + +func (p *PurchaseOrderRequest) GetTrackingCategories() []*PurchaseOrderRequestTrackingCategoriesItem { + if p == nil { + return nil + } + return p.TrackingCategories +} + +func (p *PurchaseOrderRequest) GetLineItems() []*PurchaseOrderLineItemRequest { + if p == nil { + return nil + } + return p.LineItems +} + +func (p *PurchaseOrderRequest) GetIntegrationParams() map[string]interface{} { + if p == nil { + return nil + } + return p.IntegrationParams +} + +func (p *PurchaseOrderRequest) GetLinkedAccountParams() map[string]interface{} { + if p == nil { + return nil + } + return p.LinkedAccountParams +} + +func (p *PurchaseOrderRequest) GetRemoteFields() []*RemoteFieldRequest { + if p == nil { + return nil + } + return p.RemoteFields +} + +func (p *PurchaseOrderRequest) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PurchaseOrderRequest) UnmarshalJSON(data []byte) error { + type embed PurchaseOrderRequest + var unmarshaler = struct { + embed + IssueDate *internal.DateTime `json:"issue_date,omitempty"` + DeliveryDate *internal.DateTime `json:"delivery_date,omitempty"` + }{ + embed: embed(*p), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *p = PurchaseOrderRequest(unmarshaler.embed) + p.IssueDate = unmarshaler.IssueDate.TimePtr() + p.DeliveryDate = unmarshaler.DeliveryDate.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PurchaseOrderRequest) MarshalJSON() ([]byte, error) { + type embed PurchaseOrderRequest + var marshaler = struct { + embed + IssueDate *internal.DateTime `json:"issue_date,omitempty"` + DeliveryDate *internal.DateTime `json:"delivery_date,omitempty"` + }{ + embed: embed(*p), + IssueDate: internal.NewOptionalDateTime(p.IssueDate), + DeliveryDate: internal.NewOptionalDateTime(p.DeliveryDate), + } + return json.Marshal(marshaler) +} + +func (p *PurchaseOrderRequest) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +// The company the purchase order belongs to. +type PurchaseOrderRequestCompany struct { + String string + CompanyInfo *CompanyInfo + + typ string +} + +func (p *PurchaseOrderRequestCompany) GetString() string { + if p == nil { + return "" + } + return p.String +} + +func (p *PurchaseOrderRequestCompany) GetCompanyInfo() *CompanyInfo { + if p == nil { + return nil + } + return p.CompanyInfo +} + +func (p *PurchaseOrderRequestCompany) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + p.typ = "String" + p.String = valueString + return nil + } + valueCompanyInfo := new(CompanyInfo) + if err := json.Unmarshal(data, &valueCompanyInfo); err == nil { + p.typ = "CompanyInfo" + p.CompanyInfo = valueCompanyInfo + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, p) +} + +func (p PurchaseOrderRequestCompany) MarshalJSON() ([]byte, error) { + if p.typ == "String" || p.String != "" { + return json.Marshal(p.String) + } + if p.typ == "CompanyInfo" || p.CompanyInfo != nil { + return json.Marshal(p.CompanyInfo) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) +} + +type PurchaseOrderRequestCompanyVisitor interface { + VisitString(string) error + VisitCompanyInfo(*CompanyInfo) error +} + +func (p *PurchaseOrderRequestCompany) Accept(visitor PurchaseOrderRequestCompanyVisitor) error { + if p.typ == "String" || p.String != "" { + return visitor.VisitString(p.String) + } + if p.typ == "CompanyInfo" || p.CompanyInfo != nil { + return visitor.VisitCompanyInfo(p.CompanyInfo) + } + return fmt.Errorf("type %T does not include a non-empty union type", p) +} + +// The purchase order's currency. +// +// * `XUA` - ADB Unit of Account +// * `AFN` - Afghan Afghani +// * `AFA` - Afghan Afghani (1927–2002) +// * `ALL` - Albanian Lek +// * `ALK` - Albanian Lek (1946–1965) +// * `DZD` - Algerian Dinar +// * `ADP` - Andorran Peseta +// * `AOA` - Angolan Kwanza +// * `AOK` - Angolan Kwanza (1977–1991) +// * `AON` - Angolan New Kwanza (1990–2000) +// * `AOR` - Angolan Readjusted Kwanza (1995–1999) +// * `ARA` - Argentine Austral +// * `ARS` - Argentine Peso +// * `ARM` - Argentine Peso (1881–1970) +// * `ARP` - Argentine Peso (1983–1985) +// * `ARL` - Argentine Peso Ley (1970–1983) +// * `AMD` - Armenian Dram +// * `AWG` - Aruban Florin +// * `AUD` - Australian Dollar +// * `ATS` - Austrian Schilling +// * `AZN` - Azerbaijani Manat +// * `AZM` - Azerbaijani Manat (1993–2006) +// * `BSD` - Bahamian Dollar +// * `BHD` - Bahraini Dinar +// * `BDT` - Bangladeshi Taka +// * `BBD` - Barbadian Dollar +// * `BYN` - Belarusian Ruble +// * `BYB` - Belarusian Ruble (1994–1999) +// * `BYR` - Belarusian Ruble (2000–2016) +// * `BEF` - Belgian Franc +// * `BEC` - Belgian Franc (convertible) +// * `BEL` - Belgian Franc (financial) +// * `BZD` - Belize Dollar +// * `BMD` - Bermudan Dollar +// * `BTN` - Bhutanese Ngultrum +// * `BOB` - Bolivian Boliviano +// * `BOL` - Bolivian Boliviano (1863–1963) +// * `BOV` - Bolivian Mvdol +// * `BOP` - Bolivian Peso +// * `BAM` - Bosnia-Herzegovina Convertible Mark +// * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) +// * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) +// * `BWP` - Botswanan Pula +// * `BRC` - Brazilian Cruzado (1986–1989) +// * `BRZ` - Brazilian Cruzeiro (1942–1967) +// * `BRE` - Brazilian Cruzeiro (1990–1993) +// * `BRR` - Brazilian Cruzeiro (1993–1994) +// * `BRN` - Brazilian New Cruzado (1989–1990) +// * `BRB` - Brazilian New Cruzeiro (1967–1986) +// * `BRL` - Brazilian Real +// * `GBP` - British Pound +// * `BND` - Brunei Dollar +// * `BGL` - Bulgarian Hard Lev +// * `BGN` - Bulgarian Lev +// * `BGO` - Bulgarian Lev (1879–1952) +// * `BGM` - Bulgarian Socialist Lev +// * `BUK` - Burmese Kyat +// * `BIF` - Burundian Franc +// * `XPF` - CFP Franc +// * `KHR` - Cambodian Riel +// * `CAD` - Canadian Dollar +// * `CVE` - Cape Verdean Escudo +// * `KYD` - Cayman Islands Dollar +// * `XAF` - Central African CFA Franc +// * `CLE` - Chilean Escudo +// * `CLP` - Chilean Peso +// * `CLF` - Chilean Unit of Account (UF) +// * `CNX` - Chinese People’s Bank Dollar +// * `CNY` - Chinese Yuan +// * `CNH` - Chinese Yuan (offshore) +// * `COP` - Colombian Peso +// * `COU` - Colombian Real Value Unit +// * `KMF` - Comorian Franc +// * `CDF` - Congolese Franc +// * `CRC` - Costa Rican Colón +// * `HRD` - Croatian Dinar +// * `HRK` - Croatian Kuna +// * `CUC` - Cuban Convertible Peso +// * `CUP` - Cuban Peso +// * `CYP` - Cypriot Pound +// * `CZK` - Czech Koruna +// * `CSK` - Czechoslovak Hard Koruna +// * `DKK` - Danish Krone +// * `DJF` - Djiboutian Franc +// * `DOP` - Dominican Peso +// * `NLG` - Dutch Guilder +// * `XCD` - East Caribbean Dollar +// * `DDM` - East German Mark +// * `ECS` - Ecuadorian Sucre +// * `ECV` - Ecuadorian Unit of Constant Value +// * `EGP` - Egyptian Pound +// * `GQE` - Equatorial Guinean Ekwele +// * `ERN` - Eritrean Nakfa +// * `EEK` - Estonian Kroon +// * `ETB` - Ethiopian Birr +// * `EUR` - Euro +// * `XBA` - European Composite Unit +// * `XEU` - European Currency Unit +// * `XBB` - European Monetary Unit +// * `XBC` - European Unit of Account (XBC) +// * `XBD` - European Unit of Account (XBD) +// * `FKP` - Falkland Islands Pound +// * `FJD` - Fijian Dollar +// * `FIM` - Finnish Markka +// * `FRF` - French Franc +// * `XFO` - French Gold Franc +// * `XFU` - French UIC-Franc +// * `GMD` - Gambian Dalasi +// * `GEK` - Georgian Kupon Larit +// * `GEL` - Georgian Lari +// * `DEM` - German Mark +// * `GHS` - Ghanaian Cedi +// * `GHC` - Ghanaian Cedi (1979–2007) +// * `GIP` - Gibraltar Pound +// * `XAU` - Gold +// * `GRD` - Greek Drachma +// * `GTQ` - Guatemalan Quetzal +// * `GWP` - Guinea-Bissau Peso +// * `GNF` - Guinean Franc +// * `GNS` - Guinean Syli +// * `GYD` - Guyanaese Dollar +// * `HTG` - Haitian Gourde +// * `HNL` - Honduran Lempira +// * `HKD` - Hong Kong Dollar +// * `HUF` - Hungarian Forint +// * `IMP` - IMP +// * `ISK` - Icelandic Króna +// * `ISJ` - Icelandic Króna (1918–1981) +// * `INR` - Indian Rupee +// * `IDR` - Indonesian Rupiah +// * `IRR` - Iranian Rial +// * `IQD` - Iraqi Dinar +// * `IEP` - Irish Pound +// * `ILS` - Israeli New Shekel +// * `ILP` - Israeli Pound +// * `ILR` - Israeli Shekel (1980–1985) +// * `ITL` - Italian Lira +// * `JMD` - Jamaican Dollar +// * `JPY` - Japanese Yen +// * `JOD` - Jordanian Dinar +// * `KZT` - Kazakhstani Tenge +// * `KES` - Kenyan Shilling +// * `KWD` - Kuwaiti Dinar +// * `KGS` - Kyrgystani Som +// * `LAK` - Laotian Kip +// * `LVL` - Latvian Lats +// * `LVR` - Latvian Ruble +// * `LBP` - Lebanese Pound +// * `LSL` - Lesotho Loti +// * `LRD` - Liberian Dollar +// * `LYD` - Libyan Dinar +// * `LTL` - Lithuanian Litas +// * `LTT` - Lithuanian Talonas +// * `LUL` - Luxembourg Financial Franc +// * `LUC` - Luxembourgian Convertible Franc +// * `LUF` - Luxembourgian Franc +// * `MOP` - Macanese Pataca +// * `MKD` - Macedonian Denar +// * `MKN` - Macedonian Denar (1992–1993) +// * `MGA` - Malagasy Ariary +// * `MGF` - Malagasy Franc +// * `MWK` - Malawian Kwacha +// * `MYR` - Malaysian Ringgit +// * `MVR` - Maldivian Rufiyaa +// * `MVP` - Maldivian Rupee (1947–1981) +// * `MLF` - Malian Franc +// * `MTL` - Maltese Lira +// * `MTP` - Maltese Pound +// * `MRU` - Mauritanian Ouguiya +// * `MRO` - Mauritanian Ouguiya (1973–2017) +// * `MUR` - Mauritian Rupee +// * `MXV` - Mexican Investment Unit +// * `MXN` - Mexican Peso +// * `MXP` - Mexican Silver Peso (1861–1992) +// * `MDC` - Moldovan Cupon +// * `MDL` - Moldovan Leu +// * `MCF` - Monegasque Franc +// * `MNT` - Mongolian Tugrik +// * `MAD` - Moroccan Dirham +// * `MAF` - Moroccan Franc +// * `MZE` - Mozambican Escudo +// * `MZN` - Mozambican Metical +// * `MZM` - Mozambican Metical (1980–2006) +// * `MMK` - Myanmar Kyat +// * `NAD` - Namibian Dollar +// * `NPR` - Nepalese Rupee +// * `ANG` - Netherlands Antillean Guilder +// * `TWD` - New Taiwan Dollar +// * `NZD` - New Zealand Dollar +// * `NIO` - Nicaraguan Córdoba +// * `NIC` - Nicaraguan Córdoba (1988–1991) +// * `NGN` - Nigerian Naira +// * `KPW` - North Korean Won +// * `NOK` - Norwegian Krone +// * `OMR` - Omani Rial +// * `PKR` - Pakistani Rupee +// * `XPD` - Palladium +// * `PAB` - Panamanian Balboa +// * `PGK` - Papua New Guinean Kina +// * `PYG` - Paraguayan Guarani +// * `PEI` - Peruvian Inti +// * `PEN` - Peruvian Sol +// * `PES` - Peruvian Sol (1863–1965) +// * `PHP` - Philippine Peso +// * `XPT` - Platinum +// * `PLN` - Polish Zloty +// * `PLZ` - Polish Zloty (1950–1995) +// * `PTE` - Portuguese Escudo +// * `GWE` - Portuguese Guinea Escudo +// * `QAR` - Qatari Rial +// * `XRE` - RINET Funds +// * `RHD` - Rhodesian Dollar +// * `RON` - Romanian Leu +// * `ROL` - Romanian Leu (1952–2006) +// * `RUB` - Russian Ruble +// * `RUR` - Russian Ruble (1991–1998) +// * `RWF` - Rwandan Franc +// * `SVC` - Salvadoran Colón +// * `WST` - Samoan Tala +// * `SAR` - Saudi Riyal +// * `RSD` - Serbian Dinar +// * `CSD` - Serbian Dinar (2002–2006) +// * `SCR` - Seychellois Rupee +// * `SLL` - Sierra Leonean Leone +// * `XAG` - Silver +// * `SGD` - Singapore Dollar +// * `SKK` - Slovak Koruna +// * `SIT` - Slovenian Tolar +// * `SBD` - Solomon Islands Dollar +// * `SOS` - Somali Shilling +// * `ZAR` - South African Rand +// * `ZAL` - South African Rand (financial) +// * `KRH` - South Korean Hwan (1953–1962) +// * `KRW` - South Korean Won +// * `KRO` - South Korean Won (1945–1953) +// * `SSP` - South Sudanese Pound +// * `SUR` - Soviet Rouble +// * `ESP` - Spanish Peseta +// * `ESA` - Spanish Peseta (A account) +// * `ESB` - Spanish Peseta (convertible account) +// * `XDR` - Special Drawing Rights +// * `LKR` - Sri Lankan Rupee +// * `SHP` - St. Helena Pound +// * `XSU` - Sucre +// * `SDD` - Sudanese Dinar (1992–2007) +// * `SDG` - Sudanese Pound +// * `SDP` - Sudanese Pound (1957–1998) +// * `SRD` - Surinamese Dollar +// * `SRG` - Surinamese Guilder +// * `SZL` - Swazi Lilangeni +// * `SEK` - Swedish Krona +// * `CHF` - Swiss Franc +// * `SYP` - Syrian Pound +// * `STN` - São Tomé & Príncipe Dobra +// * `STD` - São Tomé & Príncipe Dobra (1977–2017) +// * `TVD` - TVD +// * `TJR` - Tajikistani Ruble +// * `TJS` - Tajikistani Somoni +// * `TZS` - Tanzanian Shilling +// * `XTS` - Testing Currency Code +// * `THB` - Thai Baht +// * `XXX` - The codes assigned for transactions where no currency is involved +// * `TPE` - Timorese Escudo +// * `TOP` - Tongan Paʻanga +// * `TTD` - Trinidad & Tobago Dollar +// * `TND` - Tunisian Dinar +// * `TRY` - Turkish Lira +// * `TRL` - Turkish Lira (1922–2005) +// * `TMT` - Turkmenistani Manat +// * `TMM` - Turkmenistani Manat (1993–2009) +// * `USD` - US Dollar +// * `USN` - US Dollar (Next day) +// * `USS` - US Dollar (Same day) +// * `UGX` - Ugandan Shilling +// * `UGS` - Ugandan Shilling (1966–1987) +// * `UAH` - Ukrainian Hryvnia +// * `UAK` - Ukrainian Karbovanets +// * `AED` - United Arab Emirates Dirham +// * `UYW` - Uruguayan Nominal Wage Index Unit +// * `UYU` - Uruguayan Peso +// * `UYP` - Uruguayan Peso (1975–1993) +// * `UYI` - Uruguayan Peso (Indexed Units) +// * `UZS` - Uzbekistani Som +// * `VUV` - Vanuatu Vatu +// * `VES` - Venezuelan Bolívar +// * `VEB` - Venezuelan Bolívar (1871–2008) +// * `VEF` - Venezuelan Bolívar (2008–2018) +// * `VND` - Vietnamese Dong +// * `VNN` - Vietnamese Dong (1978–1985) +// * `CHE` - WIR Euro +// * `CHW` - WIR Franc +// * `XOF` - West African CFA Franc +// * `YDD` - Yemeni Dinar +// * `YER` - Yemeni Rial +// * `YUN` - Yugoslavian Convertible Dinar (1990–1992) +// * `YUD` - Yugoslavian Hard Dinar (1966–1990) +// * `YUM` - Yugoslavian New Dinar (1994–2002) +// * `YUR` - Yugoslavian Reformed Dinar (1992–1993) +// * `ZWN` - ZWN +// * `ZRN` - Zairean New Zaire (1993–1998) +// * `ZRZ` - Zairean Zaire (1971–1993) +// * `ZMW` - Zambian Kwacha +// * `ZMK` - Zambian Kwacha (1968–2012) +// * `ZWD` - Zimbabwean Dollar (1980–2008) +// * `ZWR` - Zimbabwean Dollar (2008) +// * `ZWL` - Zimbabwean Dollar (2009) +type PurchaseOrderRequestCurrency struct { + TransactionCurrencyEnum TransactionCurrencyEnum + String string + + typ string +} + +func (p *PurchaseOrderRequestCurrency) GetTransactionCurrencyEnum() TransactionCurrencyEnum { + if p == nil { + return "" + } + return p.TransactionCurrencyEnum +} + +func (p *PurchaseOrderRequestCurrency) GetString() string { + if p == nil { + return "" + } + return p.String +} + +func (p *PurchaseOrderRequestCurrency) UnmarshalJSON(data []byte) error { + var valueTransactionCurrencyEnum TransactionCurrencyEnum + if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { + p.typ = "TransactionCurrencyEnum" + p.TransactionCurrencyEnum = valueTransactionCurrencyEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + p.typ = "String" + p.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, p) +} + +func (p PurchaseOrderRequestCurrency) MarshalJSON() ([]byte, error) { + if p.typ == "TransactionCurrencyEnum" || p.TransactionCurrencyEnum != "" { + return json.Marshal(p.TransactionCurrencyEnum) + } + if p.typ == "String" || p.String != "" { + return json.Marshal(p.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) +} + +type PurchaseOrderRequestCurrencyVisitor interface { + VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error + VisitString(string) error +} + +func (p *PurchaseOrderRequestCurrency) Accept(visitor PurchaseOrderRequestCurrencyVisitor) error { + if p.typ == "TransactionCurrencyEnum" || p.TransactionCurrencyEnum != "" { + return visitor.VisitTransactionCurrencyEnum(p.TransactionCurrencyEnum) + } + if p.typ == "String" || p.String != "" { + return visitor.VisitString(p.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", p) +} + +// The purchase order's delivery address. +type PurchaseOrderRequestDeliveryAddress struct { + String string + Address *Address + + typ string +} + +func (p *PurchaseOrderRequestDeliveryAddress) GetString() string { + if p == nil { + return "" + } + return p.String +} + +func (p *PurchaseOrderRequestDeliveryAddress) GetAddress() *Address { + if p == nil { + return nil + } + return p.Address +} + +func (p *PurchaseOrderRequestDeliveryAddress) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + p.typ = "String" + p.String = valueString + return nil + } + valueAddress := new(Address) + if err := json.Unmarshal(data, &valueAddress); err == nil { + p.typ = "Address" + p.Address = valueAddress + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, p) +} + +func (p PurchaseOrderRequestDeliveryAddress) MarshalJSON() ([]byte, error) { + if p.typ == "String" || p.String != "" { + return json.Marshal(p.String) + } + if p.typ == "Address" || p.Address != nil { + return json.Marshal(p.Address) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) +} + +type PurchaseOrderRequestDeliveryAddressVisitor interface { + VisitString(string) error + VisitAddress(*Address) error +} + +func (p *PurchaseOrderRequestDeliveryAddress) Accept(visitor PurchaseOrderRequestDeliveryAddressVisitor) error { + if p.typ == "String" || p.String != "" { + return visitor.VisitString(p.String) + } + if p.typ == "Address" || p.Address != nil { + return visitor.VisitAddress(p.Address) + } + return fmt.Errorf("type %T does not include a non-empty union type", p) +} + +// The payment term that applies to this transaction. +type PurchaseOrderRequestPaymentTerm struct { + String string + PaymentTerm *PaymentTerm + + typ string +} + +func (p *PurchaseOrderRequestPaymentTerm) GetString() string { + if p == nil { + return "" + } + return p.String +} + +func (p *PurchaseOrderRequestPaymentTerm) GetPaymentTerm() *PaymentTerm { + if p == nil { + return nil + } + return p.PaymentTerm +} + +func (p *PurchaseOrderRequestPaymentTerm) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + p.typ = "String" + p.String = valueString + return nil + } + valuePaymentTerm := new(PaymentTerm) + if err := json.Unmarshal(data, &valuePaymentTerm); err == nil { + p.typ = "PaymentTerm" + p.PaymentTerm = valuePaymentTerm + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, p) +} + +func (p PurchaseOrderRequestPaymentTerm) MarshalJSON() ([]byte, error) { + if p.typ == "String" || p.String != "" { + return json.Marshal(p.String) + } + if p.typ == "PaymentTerm" || p.PaymentTerm != nil { + return json.Marshal(p.PaymentTerm) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) +} + +type PurchaseOrderRequestPaymentTermVisitor interface { + VisitString(string) error + VisitPaymentTerm(*PaymentTerm) error +} + +func (p *PurchaseOrderRequestPaymentTerm) Accept(visitor PurchaseOrderRequestPaymentTermVisitor) error { + if p.typ == "String" || p.String != "" { + return visitor.VisitString(p.String) + } + if p.typ == "PaymentTerm" || p.PaymentTerm != nil { + return visitor.VisitPaymentTerm(p.PaymentTerm) + } + return fmt.Errorf("type %T does not include a non-empty union type", p) +} + +// The purchase order's status. +// +// * `DRAFT` - DRAFT +// * `SUBMITTED` - SUBMITTED +// * `AUTHORIZED` - AUTHORIZED +// * `BILLED` - BILLED +// * `DELETED` - DELETED +type PurchaseOrderRequestStatus struct { + PurchaseOrderStatusEnum PurchaseOrderStatusEnum + String string + + typ string +} + +func (p *PurchaseOrderRequestStatus) GetPurchaseOrderStatusEnum() PurchaseOrderStatusEnum { + if p == nil { + return "" + } + return p.PurchaseOrderStatusEnum +} + +func (p *PurchaseOrderRequestStatus) GetString() string { + if p == nil { + return "" + } + return p.String +} + +func (p *PurchaseOrderRequestStatus) UnmarshalJSON(data []byte) error { + var valuePurchaseOrderStatusEnum PurchaseOrderStatusEnum + if err := json.Unmarshal(data, &valuePurchaseOrderStatusEnum); err == nil { + p.typ = "PurchaseOrderStatusEnum" + p.PurchaseOrderStatusEnum = valuePurchaseOrderStatusEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + p.typ = "String" + p.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, p) +} + +func (p PurchaseOrderRequestStatus) MarshalJSON() ([]byte, error) { + if p.typ == "PurchaseOrderStatusEnum" || p.PurchaseOrderStatusEnum != "" { + return json.Marshal(p.PurchaseOrderStatusEnum) + } + if p.typ == "String" || p.String != "" { + return json.Marshal(p.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) +} + +type PurchaseOrderRequestStatusVisitor interface { + VisitPurchaseOrderStatusEnum(PurchaseOrderStatusEnum) error + VisitString(string) error +} + +func (p *PurchaseOrderRequestStatus) Accept(visitor PurchaseOrderRequestStatusVisitor) error { + if p.typ == "PurchaseOrderStatusEnum" || p.PurchaseOrderStatusEnum != "" { + return visitor.VisitPurchaseOrderStatusEnum(p.PurchaseOrderStatusEnum) + } + if p.typ == "String" || p.String != "" { + return visitor.VisitString(p.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", p) +} + +type PurchaseOrderRequestTrackingCategoriesItem struct { + String string + TrackingCategory *TrackingCategory + + typ string +} + +func (p *PurchaseOrderRequestTrackingCategoriesItem) GetString() string { + if p == nil { + return "" + } + return p.String +} + +func (p *PurchaseOrderRequestTrackingCategoriesItem) GetTrackingCategory() *TrackingCategory { + if p == nil { + return nil + } + return p.TrackingCategory +} + +func (p *PurchaseOrderRequestTrackingCategoriesItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + p.typ = "String" + p.String = valueString + return nil + } + valueTrackingCategory := new(TrackingCategory) + if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { + p.typ = "TrackingCategory" + p.TrackingCategory = valueTrackingCategory + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, p) +} + +func (p PurchaseOrderRequestTrackingCategoriesItem) MarshalJSON() ([]byte, error) { + if p.typ == "String" || p.String != "" { + return json.Marshal(p.String) + } + if p.typ == "TrackingCategory" || p.TrackingCategory != nil { + return json.Marshal(p.TrackingCategory) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) +} + +type PurchaseOrderRequestTrackingCategoriesItemVisitor interface { + VisitString(string) error + VisitTrackingCategory(*TrackingCategory) error +} + +func (p *PurchaseOrderRequestTrackingCategoriesItem) Accept(visitor PurchaseOrderRequestTrackingCategoriesItemVisitor) error { + if p.typ == "String" || p.String != "" { + return visitor.VisitString(p.String) + } + if p.typ == "TrackingCategory" || p.TrackingCategory != nil { + return visitor.VisitTrackingCategory(p.TrackingCategory) + } + return fmt.Errorf("type %T does not include a non-empty union type", p) +} + +// The party fulfilling the purchase order. +type PurchaseOrderRequestVendor struct { + String string + Contact *Contact + + typ string +} + +func (p *PurchaseOrderRequestVendor) GetString() string { + if p == nil { + return "" + } + return p.String +} + +func (p *PurchaseOrderRequestVendor) GetContact() *Contact { + if p == nil { + return nil + } + return p.Contact +} + +func (p *PurchaseOrderRequestVendor) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + p.typ = "String" + p.String = valueString + return nil + } + valueContact := new(Contact) + if err := json.Unmarshal(data, &valueContact); err == nil { + p.typ = "Contact" + p.Contact = valueContact + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, p) +} + +func (p PurchaseOrderRequestVendor) MarshalJSON() ([]byte, error) { + if p.typ == "String" || p.String != "" { + return json.Marshal(p.String) + } + if p.typ == "Contact" || p.Contact != nil { + return json.Marshal(p.Contact) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) +} + +type PurchaseOrderRequestVendorVisitor interface { + VisitString(string) error + VisitContact(*Contact) error +} + +func (p *PurchaseOrderRequestVendor) Accept(visitor PurchaseOrderRequestVendorVisitor) error { + if p.typ == "String" || p.String != "" { + return visitor.VisitString(p.String) + } + if p.typ == "Contact" || p.Contact != nil { + return visitor.VisitContact(p.Contact) + } + return fmt.Errorf("type %T does not include a non-empty union type", p) +} + +type PurchaseOrderResponse struct { + Model *PurchaseOrder `json:"model" url:"model"` + Warnings []*WarningValidationProblem `json:"warnings" url:"warnings"` + Errors []*ErrorValidationProblem `json:"errors" url:"errors"` + Logs []*DebugModeLog `json:"logs,omitempty" url:"logs,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PurchaseOrderResponse) GetModel() *PurchaseOrder { + if p == nil { + return nil + } + return p.Model +} + +func (p *PurchaseOrderResponse) GetWarnings() []*WarningValidationProblem { + if p == nil { + return nil + } + return p.Warnings +} + +func (p *PurchaseOrderResponse) GetErrors() []*ErrorValidationProblem { + if p == nil { + return nil + } + return p.Errors +} + +func (p *PurchaseOrderResponse) GetLogs() []*DebugModeLog { + if p == nil { + return nil + } + return p.Logs +} + +func (p *PurchaseOrderResponse) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PurchaseOrderResponse) UnmarshalJSON(data []byte) error { + type unmarshaler PurchaseOrderResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PurchaseOrderResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PurchaseOrderResponse) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} diff --git a/accounting/purchaseorders/client.go b/accounting/purchaseorders/client.go index abf94e9..6b9c701 100644 --- a/accounting/purchaseorders/client.go +++ b/accounting/purchaseorders/client.go @@ -1,142 +1,135 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package purchaseorders import ( context "context" fmt "fmt" - accounting "github.com/merge-api/merge-go-client/accounting" - core "github.com/merge-api/merge-go-client/core" + accounting "github.com/merge-api/merge-go-client/v2/accounting" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `PurchaseOrder` objects. -func (c *Client) List(ctx context.Context, request *accounting.PurchaseOrdersListRequest) (*accounting.PaginatedPurchaseOrderList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/purchase-orders" - - queryParams := make(url.Values) - if request.CompanyId != nil { - queryParams.Add("company_id", fmt.Sprintf("%v", *request.CompanyId)) - } - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeRemoteFields != nil { - queryParams.Add("include_remote_fields", fmt.Sprintf("%v", *request.IncludeRemoteFields)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.IssueDateAfter != nil { - queryParams.Add("issue_date_after", fmt.Sprintf("%v", request.IssueDateAfter.Format(time.RFC3339))) - } - if request.IssueDateBefore != nil { - queryParams.Add("issue_date_before", fmt.Sprintf("%v", request.IssueDateBefore.Format(time.RFC3339))) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteFields != nil { - queryParams.Add("remote_fields", fmt.Sprintf("%v", request.RemoteFields)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if request.ShowEnumOrigins != nil { - queryParams.Add("show_enum_origins", fmt.Sprintf("%v", request.ShowEnumOrigins)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *accounting.PaginatedPurchaseOrderList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *accounting.PurchaseOrdersListRequest, + opts ...option.RequestOption, +) (*core.Page[*accounting.PurchaseOrder], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/purchase-orders" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *accounting.PaginatedPurchaseOrderList) *internal.PageResponse[*string, *accounting.PurchaseOrder] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *accounting.PurchaseOrder]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Creates a `PurchaseOrder` object with the given values. -func (c *Client) Create(ctx context.Context, request *accounting.PurchaseOrderEndpointRequest) (*accounting.PurchaseOrderResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/purchase-orders" - - queryParams := make(url.Values) - if request.IsDebugMode != nil { - queryParams.Add("is_debug_mode", fmt.Sprintf("%v", *request.IsDebugMode)) - } - if request.RunAsync != nil { - queryParams.Add("run_async", fmt.Sprintf("%v", *request.RunAsync)) +func (c *Client) Create( + ctx context.Context, + request *accounting.PurchaseOrderEndpointRequest, + opts ...option.RequestOption, +) (*accounting.PurchaseOrderResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/purchase-orders" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *accounting.PurchaseOrderResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -145,41 +138,46 @@ func (c *Client) Create(ctx context.Context, request *accounting.PurchaseOrderEn } // Returns a `PurchaseOrder` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *accounting.PurchaseOrdersRetrieveRequest) (*accounting.PurchaseOrder, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"accounting/v1/purchase-orders/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeRemoteFields != nil { - queryParams.Add("include_remote_fields", fmt.Sprintf("%v", *request.IncludeRemoteFields)) - } - if request.RemoteFields != nil { - queryParams.Add("remote_fields", fmt.Sprintf("%v", request.RemoteFields)) - } - if request.ShowEnumOrigins != nil { - queryParams.Add("show_enum_origins", fmt.Sprintf("%v", request.ShowEnumOrigins)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *accounting.PurchaseOrdersRetrieveRequest, + opts ...option.RequestOption, +) (*accounting.PurchaseOrder, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/accounting/v1/purchase-orders/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *accounting.PurchaseOrder if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -188,67 +186,93 @@ func (c *Client) Retrieve(ctx context.Context, id string, request *accounting.Pu } // Returns a list of `RemoteFieldClass` objects. -func (c *Client) LineItemsRemoteFieldClassesList(ctx context.Context, request *accounting.PurchaseOrdersLineItemsRemoteFieldClassesListRequest) (*accounting.PaginatedRemoteFieldClassList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/purchase-orders/line-items/remote-field-classes" - - queryParams := make(url.Values) - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.IsCommonModelField != nil { - queryParams.Add("is_common_model_field", fmt.Sprintf("%v", *request.IsCommonModelField)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *accounting.PaginatedRemoteFieldClassList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) LineItemsRemoteFieldClassesList( + ctx context.Context, + request *accounting.PurchaseOrdersLineItemsRemoteFieldClassesListRequest, + opts ...option.RequestOption, +) (*core.Page[*accounting.RemoteFieldClass], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/purchase-orders/line-items/remote-field-classes" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *accounting.PaginatedRemoteFieldClassList) *internal.PageResponse[*string, *accounting.RemoteFieldClass] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *accounting.RemoteFieldClass]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Returns metadata for `PurchaseOrder` POSTs. -func (c *Client) MetaPostRetrieve(ctx context.Context) (*accounting.MetaResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/purchase-orders/meta/post" +func (c *Client) MetaPostRetrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*accounting.MetaResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/purchase-orders/meta/post" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *accounting.MetaResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -257,47 +281,60 @@ func (c *Client) MetaPostRetrieve(ctx context.Context) (*accounting.MetaResponse } // Returns a list of `RemoteFieldClass` objects. -func (c *Client) RemoteFieldClassesList(ctx context.Context, request *accounting.PurchaseOrdersRemoteFieldClassesListRequest) (*accounting.PaginatedRemoteFieldClassList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/purchase-orders/remote-field-classes" - - queryParams := make(url.Values) - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.IsCommonModelField != nil { - queryParams.Add("is_common_model_field", fmt.Sprintf("%v", *request.IsCommonModelField)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *accounting.PaginatedRemoteFieldClassList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) RemoteFieldClassesList( + ctx context.Context, + request *accounting.PurchaseOrdersRemoteFieldClassesListRequest, + opts ...option.RequestOption, +) (*core.Page[*accounting.RemoteFieldClass], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/purchase-orders/remote-field-classes" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *accounting.PaginatedRemoteFieldClassList) *internal.PageResponse[*string, *accounting.RemoteFieldClass] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *accounting.RemoteFieldClass]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } diff --git a/accounting/regenerate_key.go b/accounting/regenerate_key.go index 8aaf8e4..3bc9edb 100644 --- a/accounting/regenerate_key.go +++ b/accounting/regenerate_key.go @@ -1,8 +1,8 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package accounting type RemoteKeyForRegenerationRequest struct { // The name of the remote key - Name string `json:"name"` + Name string `json:"name" url:"-"` } diff --git a/accounting/regeneratekey/client.go b/accounting/regeneratekey/client.go index 965cee4..600aba2 100644 --- a/accounting/regeneratekey/client.go +++ b/accounting/regeneratekey/client.go @@ -1,49 +1,68 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package regeneratekey import ( context "context" - accounting "github.com/merge-api/merge-go-client/accounting" - core "github.com/merge-api/merge-go-client/core" + accounting "github.com/merge-api/merge-go-client/v2/accounting" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Exchange remote keys. -func (c *Client) Create(ctx context.Context, request *accounting.RemoteKeyForRegenerationRequest) (*accounting.RemoteKey, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/regenerate-key" +func (c *Client) Create( + ctx context.Context, + request *accounting.RemoteKeyForRegenerationRequest, + opts ...option.RequestOption, +) (*accounting.RemoteKey, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/regenerate-key" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *accounting.RemoteKey if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err diff --git a/accounting/scopes.go b/accounting/scopes.go index f26c3a0..65ddb53 100644 --- a/accounting/scopes.go +++ b/accounting/scopes.go @@ -1,8 +1,223 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package accounting +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" +) + type LinkedAccountCommonModelScopeDeserializerRequest struct { // The common models you want to update the scopes for - CommonModels []*IndividualCommonModelScopeDeserializerRequest `json:"common_models,omitempty"` + CommonModels []*IndividualCommonModelScopeDeserializerRequest `json:"common_models,omitempty" url:"-"` +} + +type CommonModelScopeApi struct { + // The common models you want to update the scopes for + CommonModels []*IndividualCommonModelScopeDeserializer `json:"common_models" url:"common_models"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (c *CommonModelScopeApi) GetCommonModels() []*IndividualCommonModelScopeDeserializer { + if c == nil { + return nil + } + return c.CommonModels +} + +func (c *CommonModelScopeApi) GetExtraProperties() map[string]interface{} { + return c.extraProperties +} + +func (c *CommonModelScopeApi) UnmarshalJSON(data []byte) error { + type unmarshaler CommonModelScopeApi + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *c = CommonModelScopeApi(value) + extraProperties, err := internal.ExtractExtraProperties(data, *c) + if err != nil { + return err + } + c.extraProperties = extraProperties + c.rawJSON = json.RawMessage(data) + return nil +} + +func (c *CommonModelScopeApi) String() string { + if len(c.rawJSON) > 0 { + if value, err := internal.StringifyJSON(c.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(c); err == nil { + return value + } + return fmt.Sprintf("%#v", c) +} + +type FieldPermissionDeserializer struct { + EnabledFields []interface{} `json:"enabled_fields,omitempty" url:"enabled_fields,omitempty"` + DisabledFields []interface{} `json:"disabled_fields,omitempty" url:"disabled_fields,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (f *FieldPermissionDeserializer) GetEnabledFields() []interface{} { + if f == nil { + return nil + } + return f.EnabledFields +} + +func (f *FieldPermissionDeserializer) GetDisabledFields() []interface{} { + if f == nil { + return nil + } + return f.DisabledFields +} + +func (f *FieldPermissionDeserializer) GetExtraProperties() map[string]interface{} { + return f.extraProperties +} + +func (f *FieldPermissionDeserializer) UnmarshalJSON(data []byte) error { + type unmarshaler FieldPermissionDeserializer + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *f = FieldPermissionDeserializer(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { + return err + } + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) + return nil +} + +func (f *FieldPermissionDeserializer) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(f); err == nil { + return value + } + return fmt.Sprintf("%#v", f) +} + +type IndividualCommonModelScopeDeserializer struct { + ModelName string `json:"model_name" url:"model_name"` + ModelPermissions map[string]*ModelPermissionDeserializer `json:"model_permissions,omitempty" url:"model_permissions,omitempty"` + FieldPermissions *FieldPermissionDeserializer `json:"field_permissions,omitempty" url:"field_permissions,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (i *IndividualCommonModelScopeDeserializer) GetModelName() string { + if i == nil { + return "" + } + return i.ModelName +} + +func (i *IndividualCommonModelScopeDeserializer) GetModelPermissions() map[string]*ModelPermissionDeserializer { + if i == nil { + return nil + } + return i.ModelPermissions +} + +func (i *IndividualCommonModelScopeDeserializer) GetFieldPermissions() *FieldPermissionDeserializer { + if i == nil { + return nil + } + return i.FieldPermissions +} + +func (i *IndividualCommonModelScopeDeserializer) GetExtraProperties() map[string]interface{} { + return i.extraProperties +} + +func (i *IndividualCommonModelScopeDeserializer) UnmarshalJSON(data []byte) error { + type unmarshaler IndividualCommonModelScopeDeserializer + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *i = IndividualCommonModelScopeDeserializer(value) + extraProperties, err := internal.ExtractExtraProperties(data, *i) + if err != nil { + return err + } + i.extraProperties = extraProperties + i.rawJSON = json.RawMessage(data) + return nil +} + +func (i *IndividualCommonModelScopeDeserializer) String() string { + if len(i.rawJSON) > 0 { + if value, err := internal.StringifyJSON(i.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(i); err == nil { + return value + } + return fmt.Sprintf("%#v", i) +} + +type ModelPermissionDeserializer struct { + IsEnabled *bool `json:"is_enabled,omitempty" url:"is_enabled,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (m *ModelPermissionDeserializer) GetIsEnabled() *bool { + if m == nil { + return nil + } + return m.IsEnabled +} + +func (m *ModelPermissionDeserializer) GetExtraProperties() map[string]interface{} { + return m.extraProperties +} + +func (m *ModelPermissionDeserializer) UnmarshalJSON(data []byte) error { + type unmarshaler ModelPermissionDeserializer + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *m = ModelPermissionDeserializer(value) + extraProperties, err := internal.ExtractExtraProperties(data, *m) + if err != nil { + return err + } + m.extraProperties = extraProperties + m.rawJSON = json.RawMessage(data) + return nil +} + +func (m *ModelPermissionDeserializer) String() string { + if len(m.rawJSON) > 0 { + if value, err := internal.StringifyJSON(m.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(m); err == nil { + return value + } + return fmt.Sprintf("%#v", m) } diff --git a/accounting/scopes/client.go b/accounting/scopes/client.go index a85e0ba..e315c32 100644 --- a/accounting/scopes/client.go +++ b/accounting/scopes/client.go @@ -1,48 +1,65 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package scopes import ( context "context" - accounting "github.com/merge-api/merge-go-client/accounting" - core "github.com/merge-api/merge-go-client/core" + accounting "github.com/merge-api/merge-go-client/v2/accounting" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // 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/5950052-common-model-and-field-scopes). -func (c *Client) DefaultScopesRetrieve(ctx context.Context) (*accounting.CommonModelScopeApi, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/default-scopes" +func (c *Client) DefaultScopesRetrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*accounting.CommonModelScopeApi, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/default-scopes" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *accounting.CommonModelScopeApi if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -51,21 +68,34 @@ func (c *Client) DefaultScopesRetrieve(ctx context.Context) (*accounting.CommonM } // Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). -func (c *Client) LinkedAccountScopesRetrieve(ctx context.Context) (*accounting.CommonModelScopeApi, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/linked-account-scopes" +func (c *Client) LinkedAccountScopesRetrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*accounting.CommonModelScopeApi, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/linked-account-scopes" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *accounting.CommonModelScopeApi if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -74,22 +104,37 @@ func (c *Client) LinkedAccountScopesRetrieve(ctx context.Context) (*accounting.C } // 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/5950052-common-model-and-field-scopes) -func (c *Client) LinkedAccountScopesCreate(ctx context.Context, request *accounting.LinkedAccountCommonModelScopeDeserializerRequest) (*accounting.CommonModelScopeApi, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/linked-account-scopes" +func (c *Client) LinkedAccountScopesCreate( + ctx context.Context, + request *accounting.LinkedAccountCommonModelScopeDeserializerRequest, + opts ...option.RequestOption, +) (*accounting.CommonModelScopeApi, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/linked-account-scopes" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *accounting.CommonModelScopeApi if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err diff --git a/accounting/sync_status.go b/accounting/sync_status.go index ac8efb5..4063082 100644 --- a/accounting/sync_status.go +++ b/accounting/sync_status.go @@ -1,10 +1,78 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package accounting +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" +) + type SyncStatusListRequest struct { // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` +} + +type PaginatedSyncStatusList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*SyncStatus `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedSyncStatusList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedSyncStatusList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedSyncStatusList) GetResults() []*SyncStatus { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedSyncStatusList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedSyncStatusList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedSyncStatusList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedSyncStatusList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedSyncStatusList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) } diff --git a/accounting/syncstatus/client.go b/accounting/syncstatus/client.go index e185254..d26b213 100644 --- a/accounting/syncstatus/client.go +++ b/accounting/syncstatus/client.go @@ -1,64 +1,92 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package syncstatus import ( context "context" fmt "fmt" - accounting "github.com/merge-api/merge-go-client/accounting" - core "github.com/merge-api/merge-go-client/core" + accounting "github.com/merge-api/merge-go-client/v2/accounting" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } -// Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). -func (c *Client) List(ctx context.Context, request *accounting.SyncStatusListRequest) (*accounting.PaginatedSyncStatusList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL +// Get sync status for the current sync and the most recently finished sync. `last_sync_start` represents the most recent time any sync began. `last_sync_finished` represents the most recent time any sync completed. These timestamps may correspond to different sync instances which may result in a sync start time being later than a separate sync completed time. To ensure you are retrieving the latest available data reference the `last_sync_finished` timestamp where `last_sync_result` is `DONE`. Possible values for `status` and `last_sync_result` are `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). +func (c *Client) List( + ctx context.Context, + request *accounting.SyncStatusListRequest, + opts ...option.RequestOption, +) (*core.Page[*accounting.SyncStatus], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/sync-status" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } - endpointURL := baseURL + "/" + "accounting/v1/sync-status" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) - queryParams := make(url.Values) - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *accounting.PaginatedSyncStatusList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { - return nil, err + readPageResponse := func(response *accounting.PaginatedSyncStatusList) *internal.PageResponse[*string, *accounting.SyncStatus] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *accounting.SyncStatus]{ + Next: next, + Results: results, + Done: next == zeroValue, + } } - return response, nil + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } diff --git a/accounting/tax_rates.go b/accounting/tax_rates.go index 335b9e6..28677f2 100644 --- a/accounting/tax_rates.go +++ b/accounting/tax_rates.go @@ -1,41 +1,110 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package accounting import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type TaxRatesListRequest struct { // If provided, will only return tax rates for this company. - CompanyId *string `json:"-"` + CompanyId *string `json:"-" url:"company_id,omitempty"` // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *string `json:"-"` + Expand []*string `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` + // If provided, will only return TaxRates with this name. + Name *string `json:"-" url:"name,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` } type TaxRatesRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *string `json:"-"` + Expand []*string `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` +} + +type PaginatedTaxRateList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*TaxRate `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedTaxRateList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedTaxRateList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedTaxRateList) GetResults() []*TaxRate { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedTaxRateList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedTaxRateList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedTaxRateList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedTaxRateList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedTaxRateList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) } diff --git a/accounting/taxrates/client.go b/accounting/taxrates/client.go index fe2a3f5..bf4de5d 100644 --- a/accounting/taxrates/client.go +++ b/accounting/taxrates/client.go @@ -1,126 +1,137 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package taxrates import ( context "context" fmt "fmt" - accounting "github.com/merge-api/merge-go-client/accounting" - core "github.com/merge-api/merge-go-client/core" + accounting "github.com/merge-api/merge-go-client/v2/accounting" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `TaxRate` objects. -func (c *Client) List(ctx context.Context, request *accounting.TaxRatesListRequest) (*accounting.PaginatedTaxRateList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/tax-rates" - - queryParams := make(url.Values) - if request.CompanyId != nil { - queryParams.Add("company_id", fmt.Sprintf("%v", *request.CompanyId)) - } - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *accounting.PaginatedTaxRateList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *accounting.TaxRatesListRequest, + opts ...option.RequestOption, +) (*core.Page[*accounting.TaxRate], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/tax-rates" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *accounting.PaginatedTaxRateList) *internal.PageResponse[*string, *accounting.TaxRate] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *accounting.TaxRate]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Returns a `TaxRate` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *accounting.TaxRatesRetrieveRequest) (*accounting.TaxRate, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"accounting/v1/tax-rates/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *accounting.TaxRatesRetrieveRequest, + opts ...option.RequestOption, +) (*accounting.TaxRate, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/accounting/v1/tax-rates/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *accounting.TaxRate if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/accounting/tracking_categories.go b/accounting/tracking_categories.go index bc26f1e..c72f876 100644 --- a/accounting/tracking_categories.go +++ b/accounting/tracking_categories.go @@ -1,49 +1,122 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package accounting import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type TrackingCategoriesListRequest struct { + // If provided, will only return tracking categories with this type. + CategoryType *string `json:"-" url:"category_type,omitempty"` // If provided, will only return tracking categories for this company. - CompanyId *string `json:"-"` + CompanyId *string `json:"-" url:"company_id,omitempty"` // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *string `json:"-"` + Expand []*string `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` + // If provided, will only return tracking categories with this name. + Name *string `json:"-" url:"name,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // Deprecated. Use show_enum_origins. - RemoteFields *string `json:"-"` + RemoteFields *string `json:"-" url:"remote_fields,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` // 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) - ShowEnumOrigins *string `json:"-"` + ShowEnumOrigins *string `json:"-" url:"show_enum_origins,omitempty"` + // If provided, will only return tracking categories with this status. + Status *string `json:"-" url:"status,omitempty"` } type TrackingCategoriesRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *string `json:"-"` + Expand []*string `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // Deprecated. Use show_enum_origins. - RemoteFields *string `json:"-"` + RemoteFields *string `json:"-" url:"remote_fields,omitempty"` // 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) - ShowEnumOrigins *string `json:"-"` + ShowEnumOrigins *string `json:"-" url:"show_enum_origins,omitempty"` +} + +type PaginatedTrackingCategoryList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*TrackingCategory `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedTrackingCategoryList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedTrackingCategoryList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedTrackingCategoryList) GetResults() []*TrackingCategory { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedTrackingCategoryList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedTrackingCategoryList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedTrackingCategoryList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedTrackingCategoryList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedTrackingCategoryList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) } diff --git a/accounting/trackingcategories/client.go b/accounting/trackingcategories/client.go index c7bd929..7b24c58 100644 --- a/accounting/trackingcategories/client.go +++ b/accounting/trackingcategories/client.go @@ -1,138 +1,137 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package trackingcategories import ( context "context" fmt "fmt" - accounting "github.com/merge-api/merge-go-client/accounting" - core "github.com/merge-api/merge-go-client/core" + accounting "github.com/merge-api/merge-go-client/v2/accounting" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `TrackingCategory` objects. -func (c *Client) List(ctx context.Context, request *accounting.TrackingCategoriesListRequest) (*accounting.PaginatedTrackingCategoryList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/tracking-categories" - - queryParams := make(url.Values) - if request.CompanyId != nil { - queryParams.Add("company_id", fmt.Sprintf("%v", *request.CompanyId)) - } - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteFields != nil { - queryParams.Add("remote_fields", fmt.Sprintf("%v", request.RemoteFields)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if request.ShowEnumOrigins != nil { - queryParams.Add("show_enum_origins", fmt.Sprintf("%v", request.ShowEnumOrigins)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *accounting.PaginatedTrackingCategoryList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *accounting.TrackingCategoriesListRequest, + opts ...option.RequestOption, +) (*core.Page[*accounting.TrackingCategory], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/tracking-categories" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *accounting.PaginatedTrackingCategoryList) *internal.PageResponse[*string, *accounting.TrackingCategory] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *accounting.TrackingCategory]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Returns a `TrackingCategory` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *accounting.TrackingCategoriesRetrieveRequest) (*accounting.TrackingCategory, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"accounting/v1/tracking-categories/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.RemoteFields != nil { - queryParams.Add("remote_fields", fmt.Sprintf("%v", request.RemoteFields)) - } - if request.ShowEnumOrigins != nil { - queryParams.Add("show_enum_origins", fmt.Sprintf("%v", request.ShowEnumOrigins)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *accounting.TrackingCategoriesRetrieveRequest, + opts ...option.RequestOption, +) (*accounting.TrackingCategory, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/accounting/v1/tracking-categories/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *accounting.TrackingCategory if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/accounting/transactions.go b/accounting/transactions.go index 82c2b10..8ccd073 100644 --- a/accounting/transactions.go +++ b/accounting/transactions.go @@ -1,264 +1,2310 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package accounting import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type TransactionsListRequest struct { // If provided, will only return accounting transactions for this company. - CompanyId *string `json:"-"` + CompanyId *string `json:"-" url:"company_id,omitempty"` // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *TransactionsListRequestExpand `json:"-"` + Expand []*TransactionsListRequestExpandItem `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` // If provided, will only return objects created after this datetime. - TransactionDateAfter *time.Time `json:"-"` + TransactionDateAfter *time.Time `json:"-" url:"transaction_date_after,omitempty"` // If provided, will only return objects created before this datetime. - TransactionDateBefore *time.Time `json:"-"` + TransactionDateBefore *time.Time `json:"-" url:"transaction_date_before,omitempty"` } type TransactionsRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *TransactionsRetrieveRequestExpand `json:"-"` + Expand []*TransactionsRetrieveRequestExpandItem `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` } -type TransactionsListRequestExpand string +type TransactionsListRequestExpandItem string const ( - TransactionsListRequestExpandAccount TransactionsListRequestExpand = "account" - TransactionsListRequestExpandAccountAccountingPeriod TransactionsListRequestExpand = "account,accounting_period" - TransactionsListRequestExpandAccountingPeriod TransactionsListRequestExpand = "accounting_period" - TransactionsListRequestExpandContact TransactionsListRequestExpand = "contact" - TransactionsListRequestExpandContactAccount TransactionsListRequestExpand = "contact,account" - TransactionsListRequestExpandContactAccountAccountingPeriod TransactionsListRequestExpand = "contact,account,accounting_period" - TransactionsListRequestExpandContactAccountingPeriod TransactionsListRequestExpand = "contact,accounting_period" - TransactionsListRequestExpandLineItems TransactionsListRequestExpand = "line_items" - TransactionsListRequestExpandLineItemsAccount TransactionsListRequestExpand = "line_items,account" - TransactionsListRequestExpandLineItemsAccountAccountingPeriod TransactionsListRequestExpand = "line_items,account,accounting_period" - TransactionsListRequestExpandLineItemsAccountingPeriod TransactionsListRequestExpand = "line_items,accounting_period" - TransactionsListRequestExpandLineItemsContact TransactionsListRequestExpand = "line_items,contact" - TransactionsListRequestExpandLineItemsContactAccount TransactionsListRequestExpand = "line_items,contact,account" - TransactionsListRequestExpandLineItemsContactAccountAccountingPeriod TransactionsListRequestExpand = "line_items,contact,account,accounting_period" - TransactionsListRequestExpandLineItemsContactAccountingPeriod TransactionsListRequestExpand = "line_items,contact,accounting_period" - TransactionsListRequestExpandLineItemsTrackingCategories TransactionsListRequestExpand = "line_items,tracking_categories" - TransactionsListRequestExpandLineItemsTrackingCategoriesAccount TransactionsListRequestExpand = "line_items,tracking_categories,account" - TransactionsListRequestExpandLineItemsTrackingCategoriesAccountAccountingPeriod TransactionsListRequestExpand = "line_items,tracking_categories,account,accounting_period" - TransactionsListRequestExpandLineItemsTrackingCategoriesAccountingPeriod TransactionsListRequestExpand = "line_items,tracking_categories,accounting_period" - TransactionsListRequestExpandLineItemsTrackingCategoriesContact TransactionsListRequestExpand = "line_items,tracking_categories,contact" - TransactionsListRequestExpandLineItemsTrackingCategoriesContactAccount TransactionsListRequestExpand = "line_items,tracking_categories,contact,account" - TransactionsListRequestExpandLineItemsTrackingCategoriesContactAccountAccountingPeriod TransactionsListRequestExpand = "line_items,tracking_categories,contact,account,accounting_period" - TransactionsListRequestExpandLineItemsTrackingCategoriesContactAccountingPeriod TransactionsListRequestExpand = "line_items,tracking_categories,contact,accounting_period" - TransactionsListRequestExpandTrackingCategories TransactionsListRequestExpand = "tracking_categories" - TransactionsListRequestExpandTrackingCategoriesAccount TransactionsListRequestExpand = "tracking_categories,account" - TransactionsListRequestExpandTrackingCategoriesAccountAccountingPeriod TransactionsListRequestExpand = "tracking_categories,account,accounting_period" - TransactionsListRequestExpandTrackingCategoriesAccountingPeriod TransactionsListRequestExpand = "tracking_categories,accounting_period" - TransactionsListRequestExpandTrackingCategoriesContact TransactionsListRequestExpand = "tracking_categories,contact" - TransactionsListRequestExpandTrackingCategoriesContactAccount TransactionsListRequestExpand = "tracking_categories,contact,account" - TransactionsListRequestExpandTrackingCategoriesContactAccountAccountingPeriod TransactionsListRequestExpand = "tracking_categories,contact,account,accounting_period" - TransactionsListRequestExpandTrackingCategoriesContactAccountingPeriod TransactionsListRequestExpand = "tracking_categories,contact,accounting_period" + TransactionsListRequestExpandItemAccount TransactionsListRequestExpandItem = "account" + TransactionsListRequestExpandItemAccountingPeriod TransactionsListRequestExpandItem = "accounting_period" + TransactionsListRequestExpandItemContact TransactionsListRequestExpandItem = "contact" + TransactionsListRequestExpandItemLineItems TransactionsListRequestExpandItem = "line_items" + TransactionsListRequestExpandItemTrackingCategories TransactionsListRequestExpandItem = "tracking_categories" ) -func NewTransactionsListRequestExpandFromString(s string) (TransactionsListRequestExpand, error) { +func NewTransactionsListRequestExpandItemFromString(s string) (TransactionsListRequestExpandItem, error) { switch s { case "account": - return TransactionsListRequestExpandAccount, nil - case "account,accounting_period": - return TransactionsListRequestExpandAccountAccountingPeriod, nil + return TransactionsListRequestExpandItemAccount, nil case "accounting_period": - return TransactionsListRequestExpandAccountingPeriod, nil + return TransactionsListRequestExpandItemAccountingPeriod, nil case "contact": - return TransactionsListRequestExpandContact, nil - case "contact,account": - return TransactionsListRequestExpandContactAccount, nil - case "contact,account,accounting_period": - return TransactionsListRequestExpandContactAccountAccountingPeriod, nil - case "contact,accounting_period": - return TransactionsListRequestExpandContactAccountingPeriod, nil + return TransactionsListRequestExpandItemContact, nil case "line_items": - return TransactionsListRequestExpandLineItems, nil - case "line_items,account": - return TransactionsListRequestExpandLineItemsAccount, nil - case "line_items,account,accounting_period": - return TransactionsListRequestExpandLineItemsAccountAccountingPeriod, nil - case "line_items,accounting_period": - return TransactionsListRequestExpandLineItemsAccountingPeriod, nil - case "line_items,contact": - return TransactionsListRequestExpandLineItemsContact, nil - case "line_items,contact,account": - return TransactionsListRequestExpandLineItemsContactAccount, nil - case "line_items,contact,account,accounting_period": - return TransactionsListRequestExpandLineItemsContactAccountAccountingPeriod, nil - case "line_items,contact,accounting_period": - return TransactionsListRequestExpandLineItemsContactAccountingPeriod, nil - case "line_items,tracking_categories": - return TransactionsListRequestExpandLineItemsTrackingCategories, nil - case "line_items,tracking_categories,account": - return TransactionsListRequestExpandLineItemsTrackingCategoriesAccount, nil - case "line_items,tracking_categories,account,accounting_period": - return TransactionsListRequestExpandLineItemsTrackingCategoriesAccountAccountingPeriod, nil - case "line_items,tracking_categories,accounting_period": - return TransactionsListRequestExpandLineItemsTrackingCategoriesAccountingPeriod, nil - case "line_items,tracking_categories,contact": - return TransactionsListRequestExpandLineItemsTrackingCategoriesContact, nil - case "line_items,tracking_categories,contact,account": - return TransactionsListRequestExpandLineItemsTrackingCategoriesContactAccount, nil - case "line_items,tracking_categories,contact,account,accounting_period": - return TransactionsListRequestExpandLineItemsTrackingCategoriesContactAccountAccountingPeriod, nil - case "line_items,tracking_categories,contact,accounting_period": - return TransactionsListRequestExpandLineItemsTrackingCategoriesContactAccountingPeriod, nil + return TransactionsListRequestExpandItemLineItems, nil case "tracking_categories": - return TransactionsListRequestExpandTrackingCategories, nil - case "tracking_categories,account": - return TransactionsListRequestExpandTrackingCategoriesAccount, nil - case "tracking_categories,account,accounting_period": - return TransactionsListRequestExpandTrackingCategoriesAccountAccountingPeriod, nil - case "tracking_categories,accounting_period": - return TransactionsListRequestExpandTrackingCategoriesAccountingPeriod, nil - case "tracking_categories,contact": - return TransactionsListRequestExpandTrackingCategoriesContact, nil - case "tracking_categories,contact,account": - return TransactionsListRequestExpandTrackingCategoriesContactAccount, nil - case "tracking_categories,contact,account,accounting_period": - return TransactionsListRequestExpandTrackingCategoriesContactAccountAccountingPeriod, nil - case "tracking_categories,contact,accounting_period": - return TransactionsListRequestExpandTrackingCategoriesContactAccountingPeriod, nil - } - var t TransactionsListRequestExpand + return TransactionsListRequestExpandItemTrackingCategories, nil + } + var t TransactionsListRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (t TransactionsListRequestExpand) Ptr() *TransactionsListRequestExpand { +func (t TransactionsListRequestExpandItem) Ptr() *TransactionsListRequestExpandItem { return &t } -type TransactionsRetrieveRequestExpand string +type TransactionsRetrieveRequestExpandItem string const ( - TransactionsRetrieveRequestExpandAccount TransactionsRetrieveRequestExpand = "account" - TransactionsRetrieveRequestExpandAccountAccountingPeriod TransactionsRetrieveRequestExpand = "account,accounting_period" - TransactionsRetrieveRequestExpandAccountingPeriod TransactionsRetrieveRequestExpand = "accounting_period" - TransactionsRetrieveRequestExpandContact TransactionsRetrieveRequestExpand = "contact" - TransactionsRetrieveRequestExpandContactAccount TransactionsRetrieveRequestExpand = "contact,account" - TransactionsRetrieveRequestExpandContactAccountAccountingPeriod TransactionsRetrieveRequestExpand = "contact,account,accounting_period" - TransactionsRetrieveRequestExpandContactAccountingPeriod TransactionsRetrieveRequestExpand = "contact,accounting_period" - TransactionsRetrieveRequestExpandLineItems TransactionsRetrieveRequestExpand = "line_items" - TransactionsRetrieveRequestExpandLineItemsAccount TransactionsRetrieveRequestExpand = "line_items,account" - TransactionsRetrieveRequestExpandLineItemsAccountAccountingPeriod TransactionsRetrieveRequestExpand = "line_items,account,accounting_period" - TransactionsRetrieveRequestExpandLineItemsAccountingPeriod TransactionsRetrieveRequestExpand = "line_items,accounting_period" - TransactionsRetrieveRequestExpandLineItemsContact TransactionsRetrieveRequestExpand = "line_items,contact" - TransactionsRetrieveRequestExpandLineItemsContactAccount TransactionsRetrieveRequestExpand = "line_items,contact,account" - TransactionsRetrieveRequestExpandLineItemsContactAccountAccountingPeriod TransactionsRetrieveRequestExpand = "line_items,contact,account,accounting_period" - TransactionsRetrieveRequestExpandLineItemsContactAccountingPeriod TransactionsRetrieveRequestExpand = "line_items,contact,accounting_period" - TransactionsRetrieveRequestExpandLineItemsTrackingCategories TransactionsRetrieveRequestExpand = "line_items,tracking_categories" - TransactionsRetrieveRequestExpandLineItemsTrackingCategoriesAccount TransactionsRetrieveRequestExpand = "line_items,tracking_categories,account" - TransactionsRetrieveRequestExpandLineItemsTrackingCategoriesAccountAccountingPeriod TransactionsRetrieveRequestExpand = "line_items,tracking_categories,account,accounting_period" - TransactionsRetrieveRequestExpandLineItemsTrackingCategoriesAccountingPeriod TransactionsRetrieveRequestExpand = "line_items,tracking_categories,accounting_period" - TransactionsRetrieveRequestExpandLineItemsTrackingCategoriesContact TransactionsRetrieveRequestExpand = "line_items,tracking_categories,contact" - TransactionsRetrieveRequestExpandLineItemsTrackingCategoriesContactAccount TransactionsRetrieveRequestExpand = "line_items,tracking_categories,contact,account" - TransactionsRetrieveRequestExpandLineItemsTrackingCategoriesContactAccountAccountingPeriod TransactionsRetrieveRequestExpand = "line_items,tracking_categories,contact,account,accounting_period" - TransactionsRetrieveRequestExpandLineItemsTrackingCategoriesContactAccountingPeriod TransactionsRetrieveRequestExpand = "line_items,tracking_categories,contact,accounting_period" - TransactionsRetrieveRequestExpandTrackingCategories TransactionsRetrieveRequestExpand = "tracking_categories" - TransactionsRetrieveRequestExpandTrackingCategoriesAccount TransactionsRetrieveRequestExpand = "tracking_categories,account" - TransactionsRetrieveRequestExpandTrackingCategoriesAccountAccountingPeriod TransactionsRetrieveRequestExpand = "tracking_categories,account,accounting_period" - TransactionsRetrieveRequestExpandTrackingCategoriesAccountingPeriod TransactionsRetrieveRequestExpand = "tracking_categories,accounting_period" - TransactionsRetrieveRequestExpandTrackingCategoriesContact TransactionsRetrieveRequestExpand = "tracking_categories,contact" - TransactionsRetrieveRequestExpandTrackingCategoriesContactAccount TransactionsRetrieveRequestExpand = "tracking_categories,contact,account" - TransactionsRetrieveRequestExpandTrackingCategoriesContactAccountAccountingPeriod TransactionsRetrieveRequestExpand = "tracking_categories,contact,account,accounting_period" - TransactionsRetrieveRequestExpandTrackingCategoriesContactAccountingPeriod TransactionsRetrieveRequestExpand = "tracking_categories,contact,accounting_period" + TransactionsRetrieveRequestExpandItemAccount TransactionsRetrieveRequestExpandItem = "account" + TransactionsRetrieveRequestExpandItemAccountingPeriod TransactionsRetrieveRequestExpandItem = "accounting_period" + TransactionsRetrieveRequestExpandItemContact TransactionsRetrieveRequestExpandItem = "contact" + TransactionsRetrieveRequestExpandItemLineItems TransactionsRetrieveRequestExpandItem = "line_items" + TransactionsRetrieveRequestExpandItemTrackingCategories TransactionsRetrieveRequestExpandItem = "tracking_categories" ) -func NewTransactionsRetrieveRequestExpandFromString(s string) (TransactionsRetrieveRequestExpand, error) { +func NewTransactionsRetrieveRequestExpandItemFromString(s string) (TransactionsRetrieveRequestExpandItem, error) { switch s { case "account": - return TransactionsRetrieveRequestExpandAccount, nil - case "account,accounting_period": - return TransactionsRetrieveRequestExpandAccountAccountingPeriod, nil + return TransactionsRetrieveRequestExpandItemAccount, nil case "accounting_period": - return TransactionsRetrieveRequestExpandAccountingPeriod, nil + return TransactionsRetrieveRequestExpandItemAccountingPeriod, nil case "contact": - return TransactionsRetrieveRequestExpandContact, nil - case "contact,account": - return TransactionsRetrieveRequestExpandContactAccount, nil - case "contact,account,accounting_period": - return TransactionsRetrieveRequestExpandContactAccountAccountingPeriod, nil - case "contact,accounting_period": - return TransactionsRetrieveRequestExpandContactAccountingPeriod, nil + return TransactionsRetrieveRequestExpandItemContact, nil case "line_items": - return TransactionsRetrieveRequestExpandLineItems, nil - case "line_items,account": - return TransactionsRetrieveRequestExpandLineItemsAccount, nil - case "line_items,account,accounting_period": - return TransactionsRetrieveRequestExpandLineItemsAccountAccountingPeriod, nil - case "line_items,accounting_period": - return TransactionsRetrieveRequestExpandLineItemsAccountingPeriod, nil - case "line_items,contact": - return TransactionsRetrieveRequestExpandLineItemsContact, nil - case "line_items,contact,account": - return TransactionsRetrieveRequestExpandLineItemsContactAccount, nil - case "line_items,contact,account,accounting_period": - return TransactionsRetrieveRequestExpandLineItemsContactAccountAccountingPeriod, nil - case "line_items,contact,accounting_period": - return TransactionsRetrieveRequestExpandLineItemsContactAccountingPeriod, nil - case "line_items,tracking_categories": - return TransactionsRetrieveRequestExpandLineItemsTrackingCategories, nil - case "line_items,tracking_categories,account": - return TransactionsRetrieveRequestExpandLineItemsTrackingCategoriesAccount, nil - case "line_items,tracking_categories,account,accounting_period": - return TransactionsRetrieveRequestExpandLineItemsTrackingCategoriesAccountAccountingPeriod, nil - case "line_items,tracking_categories,accounting_period": - return TransactionsRetrieveRequestExpandLineItemsTrackingCategoriesAccountingPeriod, nil - case "line_items,tracking_categories,contact": - return TransactionsRetrieveRequestExpandLineItemsTrackingCategoriesContact, nil - case "line_items,tracking_categories,contact,account": - return TransactionsRetrieveRequestExpandLineItemsTrackingCategoriesContactAccount, nil - case "line_items,tracking_categories,contact,account,accounting_period": - return TransactionsRetrieveRequestExpandLineItemsTrackingCategoriesContactAccountAccountingPeriod, nil - case "line_items,tracking_categories,contact,accounting_period": - return TransactionsRetrieveRequestExpandLineItemsTrackingCategoriesContactAccountingPeriod, nil + return TransactionsRetrieveRequestExpandItemLineItems, nil case "tracking_categories": - return TransactionsRetrieveRequestExpandTrackingCategories, nil - case "tracking_categories,account": - return TransactionsRetrieveRequestExpandTrackingCategoriesAccount, nil - case "tracking_categories,account,accounting_period": - return TransactionsRetrieveRequestExpandTrackingCategoriesAccountAccountingPeriod, nil - case "tracking_categories,accounting_period": - return TransactionsRetrieveRequestExpandTrackingCategoriesAccountingPeriod, nil - case "tracking_categories,contact": - return TransactionsRetrieveRequestExpandTrackingCategoriesContact, nil - case "tracking_categories,contact,account": - return TransactionsRetrieveRequestExpandTrackingCategoriesContactAccount, nil - case "tracking_categories,contact,account,accounting_period": - return TransactionsRetrieveRequestExpandTrackingCategoriesContactAccountAccountingPeriod, nil - case "tracking_categories,contact,accounting_period": - return TransactionsRetrieveRequestExpandTrackingCategoriesContactAccountingPeriod, nil - } - var t TransactionsRetrieveRequestExpand + return TransactionsRetrieveRequestExpandItemTrackingCategories, nil + } + var t TransactionsRetrieveRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (t TransactionsRetrieveRequestExpand) Ptr() *TransactionsRetrieveRequestExpand { +func (t TransactionsRetrieveRequestExpandItem) Ptr() *TransactionsRetrieveRequestExpandItem { return &t } + +type PaginatedTransactionList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Transaction `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedTransactionList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedTransactionList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedTransactionList) GetResults() []*Transaction { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedTransactionList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedTransactionList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedTransactionList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedTransactionList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedTransactionList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +// # The Transaction Object +// ### Description +// The `Transaction` common model includes records of all types of transactions that do not appear in other common models. The type of transaction can be identified through the type field. More specifically, it will contain all types of transactions outside of: +// * __Credit Notes__ +// * __Expenses__ +// * __Invoices__ +// * __Journal Entries__ +// * __Payments__ +// * __Purchase Orders__ +// * __Vendor Credits__ +// +// ### Usage Example +// Fetch from the `GET Transaction` endpoint and view a company's transactions. +type Transaction struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The type of transaction, which can by any transaction object not already included in Merge’s common model. + TransactionType *string `json:"transaction_type,omitempty" url:"transaction_type,omitempty"` + // The transaction's number used for identifying purposes. + Number *string `json:"number,omitempty" url:"number,omitempty"` + // The date upon which the transaction occurred. + TransactionDate *time.Time `json:"transaction_date,omitempty" url:"transaction_date,omitempty"` + // The transaction's account. + Account *TransactionAccount `json:"account,omitempty" url:"account,omitempty"` + // The contact to whom the transaction relates to. + Contact *TransactionContact `json:"contact,omitempty" url:"contact,omitempty"` + // If the transaction is inclusive or exclusive of tax. `True` if inclusive, `False` if exclusive. + InclusiveOfTax *bool `json:"inclusive_of_tax,omitempty" url:"inclusive_of_tax,omitempty"` + // The total amount being paid after taxes. + TotalAmount *string `json:"total_amount,omitempty" url:"total_amount,omitempty"` + // The transaction's currency. + // + // * `XUA` - ADB Unit of Account + // * `AFN` - Afghan Afghani + // * `AFA` - Afghan Afghani (1927–2002) + // * `ALL` - Albanian Lek + // * `ALK` - Albanian Lek (1946–1965) + // * `DZD` - Algerian Dinar + // * `ADP` - Andorran Peseta + // * `AOA` - Angolan Kwanza + // * `AOK` - Angolan Kwanza (1977–1991) + // * `AON` - Angolan New Kwanza (1990–2000) + // * `AOR` - Angolan Readjusted Kwanza (1995–1999) + // * `ARA` - Argentine Austral + // * `ARS` - Argentine Peso + // * `ARM` - Argentine Peso (1881–1970) + // * `ARP` - Argentine Peso (1983–1985) + // * `ARL` - Argentine Peso Ley (1970–1983) + // * `AMD` - Armenian Dram + // * `AWG` - Aruban Florin + // * `AUD` - Australian Dollar + // * `ATS` - Austrian Schilling + // * `AZN` - Azerbaijani Manat + // * `AZM` - Azerbaijani Manat (1993–2006) + // * `BSD` - Bahamian Dollar + // * `BHD` - Bahraini Dinar + // * `BDT` - Bangladeshi Taka + // * `BBD` - Barbadian Dollar + // * `BYN` - Belarusian Ruble + // * `BYB` - Belarusian Ruble (1994–1999) + // * `BYR` - Belarusian Ruble (2000–2016) + // * `BEF` - Belgian Franc + // * `BEC` - Belgian Franc (convertible) + // * `BEL` - Belgian Franc (financial) + // * `BZD` - Belize Dollar + // * `BMD` - Bermudan Dollar + // * `BTN` - Bhutanese Ngultrum + // * `BOB` - Bolivian Boliviano + // * `BOL` - Bolivian Boliviano (1863–1963) + // * `BOV` - Bolivian Mvdol + // * `BOP` - Bolivian Peso + // * `BAM` - Bosnia-Herzegovina Convertible Mark + // * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + // * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + // * `BWP` - Botswanan Pula + // * `BRC` - Brazilian Cruzado (1986–1989) + // * `BRZ` - Brazilian Cruzeiro (1942–1967) + // * `BRE` - Brazilian Cruzeiro (1990–1993) + // * `BRR` - Brazilian Cruzeiro (1993–1994) + // * `BRN` - Brazilian New Cruzado (1989–1990) + // * `BRB` - Brazilian New Cruzeiro (1967–1986) + // * `BRL` - Brazilian Real + // * `GBP` - British Pound + // * `BND` - Brunei Dollar + // * `BGL` - Bulgarian Hard Lev + // * `BGN` - Bulgarian Lev + // * `BGO` - Bulgarian Lev (1879–1952) + // * `BGM` - Bulgarian Socialist Lev + // * `BUK` - Burmese Kyat + // * `BIF` - Burundian Franc + // * `XPF` - CFP Franc + // * `KHR` - Cambodian Riel + // * `CAD` - Canadian Dollar + // * `CVE` - Cape Verdean Escudo + // * `KYD` - Cayman Islands Dollar + // * `XAF` - Central African CFA Franc + // * `CLE` - Chilean Escudo + // * `CLP` - Chilean Peso + // * `CLF` - Chilean Unit of Account (UF) + // * `CNX` - Chinese People’s Bank Dollar + // * `CNY` - Chinese Yuan + // * `CNH` - Chinese Yuan (offshore) + // * `COP` - Colombian Peso + // * `COU` - Colombian Real Value Unit + // * `KMF` - Comorian Franc + // * `CDF` - Congolese Franc + // * `CRC` - Costa Rican Colón + // * `HRD` - Croatian Dinar + // * `HRK` - Croatian Kuna + // * `CUC` - Cuban Convertible Peso + // * `CUP` - Cuban Peso + // * `CYP` - Cypriot Pound + // * `CZK` - Czech Koruna + // * `CSK` - Czechoslovak Hard Koruna + // * `DKK` - Danish Krone + // * `DJF` - Djiboutian Franc + // * `DOP` - Dominican Peso + // * `NLG` - Dutch Guilder + // * `XCD` - East Caribbean Dollar + // * `DDM` - East German Mark + // * `ECS` - Ecuadorian Sucre + // * `ECV` - Ecuadorian Unit of Constant Value + // * `EGP` - Egyptian Pound + // * `GQE` - Equatorial Guinean Ekwele + // * `ERN` - Eritrean Nakfa + // * `EEK` - Estonian Kroon + // * `ETB` - Ethiopian Birr + // * `EUR` - Euro + // * `XBA` - European Composite Unit + // * `XEU` - European Currency Unit + // * `XBB` - European Monetary Unit + // * `XBC` - European Unit of Account (XBC) + // * `XBD` - European Unit of Account (XBD) + // * `FKP` - Falkland Islands Pound + // * `FJD` - Fijian Dollar + // * `FIM` - Finnish Markka + // * `FRF` - French Franc + // * `XFO` - French Gold Franc + // * `XFU` - French UIC-Franc + // * `GMD` - Gambian Dalasi + // * `GEK` - Georgian Kupon Larit + // * `GEL` - Georgian Lari + // * `DEM` - German Mark + // * `GHS` - Ghanaian Cedi + // * `GHC` - Ghanaian Cedi (1979–2007) + // * `GIP` - Gibraltar Pound + // * `XAU` - Gold + // * `GRD` - Greek Drachma + // * `GTQ` - Guatemalan Quetzal + // * `GWP` - Guinea-Bissau Peso + // * `GNF` - Guinean Franc + // * `GNS` - Guinean Syli + // * `GYD` - Guyanaese Dollar + // * `HTG` - Haitian Gourde + // * `HNL` - Honduran Lempira + // * `HKD` - Hong Kong Dollar + // * `HUF` - Hungarian Forint + // * `IMP` - IMP + // * `ISK` - Icelandic Króna + // * `ISJ` - Icelandic Króna (1918–1981) + // * `INR` - Indian Rupee + // * `IDR` - Indonesian Rupiah + // * `IRR` - Iranian Rial + // * `IQD` - Iraqi Dinar + // * `IEP` - Irish Pound + // * `ILS` - Israeli New Shekel + // * `ILP` - Israeli Pound + // * `ILR` - Israeli Shekel (1980–1985) + // * `ITL` - Italian Lira + // * `JMD` - Jamaican Dollar + // * `JPY` - Japanese Yen + // * `JOD` - Jordanian Dinar + // * `KZT` - Kazakhstani Tenge + // * `KES` - Kenyan Shilling + // * `KWD` - Kuwaiti Dinar + // * `KGS` - Kyrgystani Som + // * `LAK` - Laotian Kip + // * `LVL` - Latvian Lats + // * `LVR` - Latvian Ruble + // * `LBP` - Lebanese Pound + // * `LSL` - Lesotho Loti + // * `LRD` - Liberian Dollar + // * `LYD` - Libyan Dinar + // * `LTL` - Lithuanian Litas + // * `LTT` - Lithuanian Talonas + // * `LUL` - Luxembourg Financial Franc + // * `LUC` - Luxembourgian Convertible Franc + // * `LUF` - Luxembourgian Franc + // * `MOP` - Macanese Pataca + // * `MKD` - Macedonian Denar + // * `MKN` - Macedonian Denar (1992–1993) + // * `MGA` - Malagasy Ariary + // * `MGF` - Malagasy Franc + // * `MWK` - Malawian Kwacha + // * `MYR` - Malaysian Ringgit + // * `MVR` - Maldivian Rufiyaa + // * `MVP` - Maldivian Rupee (1947–1981) + // * `MLF` - Malian Franc + // * `MTL` - Maltese Lira + // * `MTP` - Maltese Pound + // * `MRU` - Mauritanian Ouguiya + // * `MRO` - Mauritanian Ouguiya (1973–2017) + // * `MUR` - Mauritian Rupee + // * `MXV` - Mexican Investment Unit + // * `MXN` - Mexican Peso + // * `MXP` - Mexican Silver Peso (1861–1992) + // * `MDC` - Moldovan Cupon + // * `MDL` - Moldovan Leu + // * `MCF` - Monegasque Franc + // * `MNT` - Mongolian Tugrik + // * `MAD` - Moroccan Dirham + // * `MAF` - Moroccan Franc + // * `MZE` - Mozambican Escudo + // * `MZN` - Mozambican Metical + // * `MZM` - Mozambican Metical (1980–2006) + // * `MMK` - Myanmar Kyat + // * `NAD` - Namibian Dollar + // * `NPR` - Nepalese Rupee + // * `ANG` - Netherlands Antillean Guilder + // * `TWD` - New Taiwan Dollar + // * `NZD` - New Zealand Dollar + // * `NIO` - Nicaraguan Córdoba + // * `NIC` - Nicaraguan Córdoba (1988–1991) + // * `NGN` - Nigerian Naira + // * `KPW` - North Korean Won + // * `NOK` - Norwegian Krone + // * `OMR` - Omani Rial + // * `PKR` - Pakistani Rupee + // * `XPD` - Palladium + // * `PAB` - Panamanian Balboa + // * `PGK` - Papua New Guinean Kina + // * `PYG` - Paraguayan Guarani + // * `PEI` - Peruvian Inti + // * `PEN` - Peruvian Sol + // * `PES` - Peruvian Sol (1863–1965) + // * `PHP` - Philippine Peso + // * `XPT` - Platinum + // * `PLN` - Polish Zloty + // * `PLZ` - Polish Zloty (1950–1995) + // * `PTE` - Portuguese Escudo + // * `GWE` - Portuguese Guinea Escudo + // * `QAR` - Qatari Rial + // * `XRE` - RINET Funds + // * `RHD` - Rhodesian Dollar + // * `RON` - Romanian Leu + // * `ROL` - Romanian Leu (1952–2006) + // * `RUB` - Russian Ruble + // * `RUR` - Russian Ruble (1991–1998) + // * `RWF` - Rwandan Franc + // * `SVC` - Salvadoran Colón + // * `WST` - Samoan Tala + // * `SAR` - Saudi Riyal + // * `RSD` - Serbian Dinar + // * `CSD` - Serbian Dinar (2002–2006) + // * `SCR` - Seychellois Rupee + // * `SLL` - Sierra Leonean Leone + // * `XAG` - Silver + // * `SGD` - Singapore Dollar + // * `SKK` - Slovak Koruna + // * `SIT` - Slovenian Tolar + // * `SBD` - Solomon Islands Dollar + // * `SOS` - Somali Shilling + // * `ZAR` - South African Rand + // * `ZAL` - South African Rand (financial) + // * `KRH` - South Korean Hwan (1953–1962) + // * `KRW` - South Korean Won + // * `KRO` - South Korean Won (1945–1953) + // * `SSP` - South Sudanese Pound + // * `SUR` - Soviet Rouble + // * `ESP` - Spanish Peseta + // * `ESA` - Spanish Peseta (A account) + // * `ESB` - Spanish Peseta (convertible account) + // * `XDR` - Special Drawing Rights + // * `LKR` - Sri Lankan Rupee + // * `SHP` - St. Helena Pound + // * `XSU` - Sucre + // * `SDD` - Sudanese Dinar (1992–2007) + // * `SDG` - Sudanese Pound + // * `SDP` - Sudanese Pound (1957–1998) + // * `SRD` - Surinamese Dollar + // * `SRG` - Surinamese Guilder + // * `SZL` - Swazi Lilangeni + // * `SEK` - Swedish Krona + // * `CHF` - Swiss Franc + // * `SYP` - Syrian Pound + // * `STN` - São Tomé & Príncipe Dobra + // * `STD` - São Tomé & Príncipe Dobra (1977–2017) + // * `TVD` - TVD + // * `TJR` - Tajikistani Ruble + // * `TJS` - Tajikistani Somoni + // * `TZS` - Tanzanian Shilling + // * `XTS` - Testing Currency Code + // * `THB` - Thai Baht + // * `XXX` - The codes assigned for transactions where no currency is involved + // * `TPE` - Timorese Escudo + // * `TOP` - Tongan Paʻanga + // * `TTD` - Trinidad & Tobago Dollar + // * `TND` - Tunisian Dinar + // * `TRY` - Turkish Lira + // * `TRL` - Turkish Lira (1922–2005) + // * `TMT` - Turkmenistani Manat + // * `TMM` - Turkmenistani Manat (1993–2009) + // * `USD` - US Dollar + // * `USN` - US Dollar (Next day) + // * `USS` - US Dollar (Same day) + // * `UGX` - Ugandan Shilling + // * `UGS` - Ugandan Shilling (1966–1987) + // * `UAH` - Ukrainian Hryvnia + // * `UAK` - Ukrainian Karbovanets + // * `AED` - United Arab Emirates Dirham + // * `UYW` - Uruguayan Nominal Wage Index Unit + // * `UYU` - Uruguayan Peso + // * `UYP` - Uruguayan Peso (1975–1993) + // * `UYI` - Uruguayan Peso (Indexed Units) + // * `UZS` - Uzbekistani Som + // * `VUV` - Vanuatu Vatu + // * `VES` - Venezuelan Bolívar + // * `VEB` - Venezuelan Bolívar (1871–2008) + // * `VEF` - Venezuelan Bolívar (2008–2018) + // * `VND` - Vietnamese Dong + // * `VNN` - Vietnamese Dong (1978–1985) + // * `CHE` - WIR Euro + // * `CHW` - WIR Franc + // * `XOF` - West African CFA Franc + // * `YDD` - Yemeni Dinar + // * `YER` - Yemeni Rial + // * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + // * `YUD` - Yugoslavian Hard Dinar (1966–1990) + // * `YUM` - Yugoslavian New Dinar (1994–2002) + // * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + // * `ZWN` - ZWN + // * `ZRN` - Zairean New Zaire (1993–1998) + // * `ZRZ` - Zairean Zaire (1971–1993) + // * `ZMW` - Zambian Kwacha + // * `ZMK` - Zambian Kwacha (1968–2012) + // * `ZWD` - Zimbabwean Dollar (1980–2008) + // * `ZWR` - Zimbabwean Dollar (2008) + // * `ZWL` - Zimbabwean Dollar (2009) + Currency *TransactionCurrency `json:"currency,omitempty" url:"currency,omitempty"` + // The transaction's exchange rate. + ExchangeRate *string `json:"exchange_rate,omitempty" url:"exchange_rate,omitempty"` + // The company the transaction belongs to. + Company *string `json:"company,omitempty" url:"company,omitempty"` + TrackingCategories []*TransactionTrackingCategoriesItem `json:"tracking_categories,omitempty" url:"tracking_categories,omitempty"` + LineItems []*TransactionLineItem `json:"line_items,omitempty" url:"line_items,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + // The accounting period that the Transaction was generated in. + AccountingPeriod *TransactionAccountingPeriod `json:"accounting_period,omitempty" url:"accounting_period,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (t *Transaction) GetId() *string { + if t == nil { + return nil + } + return t.Id +} + +func (t *Transaction) GetRemoteId() *string { + if t == nil { + return nil + } + return t.RemoteId +} + +func (t *Transaction) GetCreatedAt() *time.Time { + if t == nil { + return nil + } + return t.CreatedAt +} + +func (t *Transaction) GetModifiedAt() *time.Time { + if t == nil { + return nil + } + return t.ModifiedAt +} + +func (t *Transaction) GetTransactionType() *string { + if t == nil { + return nil + } + return t.TransactionType +} + +func (t *Transaction) GetNumber() *string { + if t == nil { + return nil + } + return t.Number +} + +func (t *Transaction) GetTransactionDate() *time.Time { + if t == nil { + return nil + } + return t.TransactionDate +} + +func (t *Transaction) GetAccount() *TransactionAccount { + if t == nil { + return nil + } + return t.Account +} + +func (t *Transaction) GetContact() *TransactionContact { + if t == nil { + return nil + } + return t.Contact +} + +func (t *Transaction) GetInclusiveOfTax() *bool { + if t == nil { + return nil + } + return t.InclusiveOfTax +} + +func (t *Transaction) GetTotalAmount() *string { + if t == nil { + return nil + } + return t.TotalAmount +} + +func (t *Transaction) GetCurrency() *TransactionCurrency { + if t == nil { + return nil + } + return t.Currency +} + +func (t *Transaction) GetExchangeRate() *string { + if t == nil { + return nil + } + return t.ExchangeRate +} + +func (t *Transaction) GetCompany() *string { + if t == nil { + return nil + } + return t.Company +} + +func (t *Transaction) GetTrackingCategories() []*TransactionTrackingCategoriesItem { + if t == nil { + return nil + } + return t.TrackingCategories +} + +func (t *Transaction) GetLineItems() []*TransactionLineItem { + if t == nil { + return nil + } + return t.LineItems +} + +func (t *Transaction) GetRemoteWasDeleted() *bool { + if t == nil { + return nil + } + return t.RemoteWasDeleted +} + +func (t *Transaction) GetAccountingPeriod() *TransactionAccountingPeriod { + if t == nil { + return nil + } + return t.AccountingPeriod +} + +func (t *Transaction) GetFieldMappings() map[string]interface{} { + if t == nil { + return nil + } + return t.FieldMappings +} + +func (t *Transaction) GetRemoteData() []*RemoteData { + if t == nil { + return nil + } + return t.RemoteData +} + +func (t *Transaction) GetExtraProperties() map[string]interface{} { + return t.extraProperties +} + +func (t *Transaction) UnmarshalJSON(data []byte) error { + type embed Transaction + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + TransactionDate *internal.DateTime `json:"transaction_date,omitempty"` + }{ + embed: embed(*t), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *t = Transaction(unmarshaler.embed) + t.CreatedAt = unmarshaler.CreatedAt.TimePtr() + t.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + t.TransactionDate = unmarshaler.TransactionDate.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *t) + if err != nil { + return err + } + t.extraProperties = extraProperties + t.rawJSON = json.RawMessage(data) + return nil +} + +func (t *Transaction) MarshalJSON() ([]byte, error) { + type embed Transaction + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + TransactionDate *internal.DateTime `json:"transaction_date,omitempty"` + }{ + embed: embed(*t), + CreatedAt: internal.NewOptionalDateTime(t.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(t.ModifiedAt), + TransactionDate: internal.NewOptionalDateTime(t.TransactionDate), + } + return json.Marshal(marshaler) +} + +func (t *Transaction) String() string { + if len(t.rawJSON) > 0 { + if value, err := internal.StringifyJSON(t.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(t); err == nil { + return value + } + return fmt.Sprintf("%#v", t) +} + +// The transaction's account. +type TransactionAccount struct { + String string + Account *Account + + typ string +} + +func (t *TransactionAccount) GetString() string { + if t == nil { + return "" + } + return t.String +} + +func (t *TransactionAccount) GetAccount() *Account { + if t == nil { + return nil + } + return t.Account +} + +func (t *TransactionAccount) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + t.typ = "String" + t.String = valueString + return nil + } + valueAccount := new(Account) + if err := json.Unmarshal(data, &valueAccount); err == nil { + t.typ = "Account" + t.Account = valueAccount + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, t) +} + +func (t TransactionAccount) MarshalJSON() ([]byte, error) { + if t.typ == "String" || t.String != "" { + return json.Marshal(t.String) + } + if t.typ == "Account" || t.Account != nil { + return json.Marshal(t.Account) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) +} + +type TransactionAccountVisitor interface { + VisitString(string) error + VisitAccount(*Account) error +} + +func (t *TransactionAccount) Accept(visitor TransactionAccountVisitor) error { + if t.typ == "String" || t.String != "" { + return visitor.VisitString(t.String) + } + if t.typ == "Account" || t.Account != nil { + return visitor.VisitAccount(t.Account) + } + return fmt.Errorf("type %T does not include a non-empty union type", t) +} + +// The accounting period that the Transaction was generated in. +type TransactionAccountingPeriod struct { + String string + AccountingPeriod *AccountingPeriod + + typ string +} + +func (t *TransactionAccountingPeriod) GetString() string { + if t == nil { + return "" + } + return t.String +} + +func (t *TransactionAccountingPeriod) GetAccountingPeriod() *AccountingPeriod { + if t == nil { + return nil + } + return t.AccountingPeriod +} + +func (t *TransactionAccountingPeriod) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + t.typ = "String" + t.String = valueString + return nil + } + valueAccountingPeriod := new(AccountingPeriod) + if err := json.Unmarshal(data, &valueAccountingPeriod); err == nil { + t.typ = "AccountingPeriod" + t.AccountingPeriod = valueAccountingPeriod + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, t) +} + +func (t TransactionAccountingPeriod) MarshalJSON() ([]byte, error) { + if t.typ == "String" || t.String != "" { + return json.Marshal(t.String) + } + if t.typ == "AccountingPeriod" || t.AccountingPeriod != nil { + return json.Marshal(t.AccountingPeriod) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) +} + +type TransactionAccountingPeriodVisitor interface { + VisitString(string) error + VisitAccountingPeriod(*AccountingPeriod) error +} + +func (t *TransactionAccountingPeriod) Accept(visitor TransactionAccountingPeriodVisitor) error { + if t.typ == "String" || t.String != "" { + return visitor.VisitString(t.String) + } + if t.typ == "AccountingPeriod" || t.AccountingPeriod != nil { + return visitor.VisitAccountingPeriod(t.AccountingPeriod) + } + return fmt.Errorf("type %T does not include a non-empty union type", t) +} + +// The contact to whom the transaction relates to. +type TransactionContact struct { + String string + Contact *Contact + + typ string +} + +func (t *TransactionContact) GetString() string { + if t == nil { + return "" + } + return t.String +} + +func (t *TransactionContact) GetContact() *Contact { + if t == nil { + return nil + } + return t.Contact +} + +func (t *TransactionContact) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + t.typ = "String" + t.String = valueString + return nil + } + valueContact := new(Contact) + if err := json.Unmarshal(data, &valueContact); err == nil { + t.typ = "Contact" + t.Contact = valueContact + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, t) +} + +func (t TransactionContact) MarshalJSON() ([]byte, error) { + if t.typ == "String" || t.String != "" { + return json.Marshal(t.String) + } + if t.typ == "Contact" || t.Contact != nil { + return json.Marshal(t.Contact) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) +} + +type TransactionContactVisitor interface { + VisitString(string) error + VisitContact(*Contact) error +} + +func (t *TransactionContact) Accept(visitor TransactionContactVisitor) error { + if t.typ == "String" || t.String != "" { + return visitor.VisitString(t.String) + } + if t.typ == "Contact" || t.Contact != nil { + return visitor.VisitContact(t.Contact) + } + return fmt.Errorf("type %T does not include a non-empty union type", t) +} + +// The transaction's currency. +// +// * `XUA` - ADB Unit of Account +// * `AFN` - Afghan Afghani +// * `AFA` - Afghan Afghani (1927–2002) +// * `ALL` - Albanian Lek +// * `ALK` - Albanian Lek (1946–1965) +// * `DZD` - Algerian Dinar +// * `ADP` - Andorran Peseta +// * `AOA` - Angolan Kwanza +// * `AOK` - Angolan Kwanza (1977–1991) +// * `AON` - Angolan New Kwanza (1990–2000) +// * `AOR` - Angolan Readjusted Kwanza (1995–1999) +// * `ARA` - Argentine Austral +// * `ARS` - Argentine Peso +// * `ARM` - Argentine Peso (1881–1970) +// * `ARP` - Argentine Peso (1983–1985) +// * `ARL` - Argentine Peso Ley (1970–1983) +// * `AMD` - Armenian Dram +// * `AWG` - Aruban Florin +// * `AUD` - Australian Dollar +// * `ATS` - Austrian Schilling +// * `AZN` - Azerbaijani Manat +// * `AZM` - Azerbaijani Manat (1993–2006) +// * `BSD` - Bahamian Dollar +// * `BHD` - Bahraini Dinar +// * `BDT` - Bangladeshi Taka +// * `BBD` - Barbadian Dollar +// * `BYN` - Belarusian Ruble +// * `BYB` - Belarusian Ruble (1994–1999) +// * `BYR` - Belarusian Ruble (2000–2016) +// * `BEF` - Belgian Franc +// * `BEC` - Belgian Franc (convertible) +// * `BEL` - Belgian Franc (financial) +// * `BZD` - Belize Dollar +// * `BMD` - Bermudan Dollar +// * `BTN` - Bhutanese Ngultrum +// * `BOB` - Bolivian Boliviano +// * `BOL` - Bolivian Boliviano (1863–1963) +// * `BOV` - Bolivian Mvdol +// * `BOP` - Bolivian Peso +// * `BAM` - Bosnia-Herzegovina Convertible Mark +// * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) +// * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) +// * `BWP` - Botswanan Pula +// * `BRC` - Brazilian Cruzado (1986–1989) +// * `BRZ` - Brazilian Cruzeiro (1942–1967) +// * `BRE` - Brazilian Cruzeiro (1990–1993) +// * `BRR` - Brazilian Cruzeiro (1993–1994) +// * `BRN` - Brazilian New Cruzado (1989–1990) +// * `BRB` - Brazilian New Cruzeiro (1967–1986) +// * `BRL` - Brazilian Real +// * `GBP` - British Pound +// * `BND` - Brunei Dollar +// * `BGL` - Bulgarian Hard Lev +// * `BGN` - Bulgarian Lev +// * `BGO` - Bulgarian Lev (1879–1952) +// * `BGM` - Bulgarian Socialist Lev +// * `BUK` - Burmese Kyat +// * `BIF` - Burundian Franc +// * `XPF` - CFP Franc +// * `KHR` - Cambodian Riel +// * `CAD` - Canadian Dollar +// * `CVE` - Cape Verdean Escudo +// * `KYD` - Cayman Islands Dollar +// * `XAF` - Central African CFA Franc +// * `CLE` - Chilean Escudo +// * `CLP` - Chilean Peso +// * `CLF` - Chilean Unit of Account (UF) +// * `CNX` - Chinese People’s Bank Dollar +// * `CNY` - Chinese Yuan +// * `CNH` - Chinese Yuan (offshore) +// * `COP` - Colombian Peso +// * `COU` - Colombian Real Value Unit +// * `KMF` - Comorian Franc +// * `CDF` - Congolese Franc +// * `CRC` - Costa Rican Colón +// * `HRD` - Croatian Dinar +// * `HRK` - Croatian Kuna +// * `CUC` - Cuban Convertible Peso +// * `CUP` - Cuban Peso +// * `CYP` - Cypriot Pound +// * `CZK` - Czech Koruna +// * `CSK` - Czechoslovak Hard Koruna +// * `DKK` - Danish Krone +// * `DJF` - Djiboutian Franc +// * `DOP` - Dominican Peso +// * `NLG` - Dutch Guilder +// * `XCD` - East Caribbean Dollar +// * `DDM` - East German Mark +// * `ECS` - Ecuadorian Sucre +// * `ECV` - Ecuadorian Unit of Constant Value +// * `EGP` - Egyptian Pound +// * `GQE` - Equatorial Guinean Ekwele +// * `ERN` - Eritrean Nakfa +// * `EEK` - Estonian Kroon +// * `ETB` - Ethiopian Birr +// * `EUR` - Euro +// * `XBA` - European Composite Unit +// * `XEU` - European Currency Unit +// * `XBB` - European Monetary Unit +// * `XBC` - European Unit of Account (XBC) +// * `XBD` - European Unit of Account (XBD) +// * `FKP` - Falkland Islands Pound +// * `FJD` - Fijian Dollar +// * `FIM` - Finnish Markka +// * `FRF` - French Franc +// * `XFO` - French Gold Franc +// * `XFU` - French UIC-Franc +// * `GMD` - Gambian Dalasi +// * `GEK` - Georgian Kupon Larit +// * `GEL` - Georgian Lari +// * `DEM` - German Mark +// * `GHS` - Ghanaian Cedi +// * `GHC` - Ghanaian Cedi (1979–2007) +// * `GIP` - Gibraltar Pound +// * `XAU` - Gold +// * `GRD` - Greek Drachma +// * `GTQ` - Guatemalan Quetzal +// * `GWP` - Guinea-Bissau Peso +// * `GNF` - Guinean Franc +// * `GNS` - Guinean Syli +// * `GYD` - Guyanaese Dollar +// * `HTG` - Haitian Gourde +// * `HNL` - Honduran Lempira +// * `HKD` - Hong Kong Dollar +// * `HUF` - Hungarian Forint +// * `IMP` - IMP +// * `ISK` - Icelandic Króna +// * `ISJ` - Icelandic Króna (1918–1981) +// * `INR` - Indian Rupee +// * `IDR` - Indonesian Rupiah +// * `IRR` - Iranian Rial +// * `IQD` - Iraqi Dinar +// * `IEP` - Irish Pound +// * `ILS` - Israeli New Shekel +// * `ILP` - Israeli Pound +// * `ILR` - Israeli Shekel (1980–1985) +// * `ITL` - Italian Lira +// * `JMD` - Jamaican Dollar +// * `JPY` - Japanese Yen +// * `JOD` - Jordanian Dinar +// * `KZT` - Kazakhstani Tenge +// * `KES` - Kenyan Shilling +// * `KWD` - Kuwaiti Dinar +// * `KGS` - Kyrgystani Som +// * `LAK` - Laotian Kip +// * `LVL` - Latvian Lats +// * `LVR` - Latvian Ruble +// * `LBP` - Lebanese Pound +// * `LSL` - Lesotho Loti +// * `LRD` - Liberian Dollar +// * `LYD` - Libyan Dinar +// * `LTL` - Lithuanian Litas +// * `LTT` - Lithuanian Talonas +// * `LUL` - Luxembourg Financial Franc +// * `LUC` - Luxembourgian Convertible Franc +// * `LUF` - Luxembourgian Franc +// * `MOP` - Macanese Pataca +// * `MKD` - Macedonian Denar +// * `MKN` - Macedonian Denar (1992–1993) +// * `MGA` - Malagasy Ariary +// * `MGF` - Malagasy Franc +// * `MWK` - Malawian Kwacha +// * `MYR` - Malaysian Ringgit +// * `MVR` - Maldivian Rufiyaa +// * `MVP` - Maldivian Rupee (1947–1981) +// * `MLF` - Malian Franc +// * `MTL` - Maltese Lira +// * `MTP` - Maltese Pound +// * `MRU` - Mauritanian Ouguiya +// * `MRO` - Mauritanian Ouguiya (1973–2017) +// * `MUR` - Mauritian Rupee +// * `MXV` - Mexican Investment Unit +// * `MXN` - Mexican Peso +// * `MXP` - Mexican Silver Peso (1861–1992) +// * `MDC` - Moldovan Cupon +// * `MDL` - Moldovan Leu +// * `MCF` - Monegasque Franc +// * `MNT` - Mongolian Tugrik +// * `MAD` - Moroccan Dirham +// * `MAF` - Moroccan Franc +// * `MZE` - Mozambican Escudo +// * `MZN` - Mozambican Metical +// * `MZM` - Mozambican Metical (1980–2006) +// * `MMK` - Myanmar Kyat +// * `NAD` - Namibian Dollar +// * `NPR` - Nepalese Rupee +// * `ANG` - Netherlands Antillean Guilder +// * `TWD` - New Taiwan Dollar +// * `NZD` - New Zealand Dollar +// * `NIO` - Nicaraguan Córdoba +// * `NIC` - Nicaraguan Córdoba (1988–1991) +// * `NGN` - Nigerian Naira +// * `KPW` - North Korean Won +// * `NOK` - Norwegian Krone +// * `OMR` - Omani Rial +// * `PKR` - Pakistani Rupee +// * `XPD` - Palladium +// * `PAB` - Panamanian Balboa +// * `PGK` - Papua New Guinean Kina +// * `PYG` - Paraguayan Guarani +// * `PEI` - Peruvian Inti +// * `PEN` - Peruvian Sol +// * `PES` - Peruvian Sol (1863–1965) +// * `PHP` - Philippine Peso +// * `XPT` - Platinum +// * `PLN` - Polish Zloty +// * `PLZ` - Polish Zloty (1950–1995) +// * `PTE` - Portuguese Escudo +// * `GWE` - Portuguese Guinea Escudo +// * `QAR` - Qatari Rial +// * `XRE` - RINET Funds +// * `RHD` - Rhodesian Dollar +// * `RON` - Romanian Leu +// * `ROL` - Romanian Leu (1952–2006) +// * `RUB` - Russian Ruble +// * `RUR` - Russian Ruble (1991–1998) +// * `RWF` - Rwandan Franc +// * `SVC` - Salvadoran Colón +// * `WST` - Samoan Tala +// * `SAR` - Saudi Riyal +// * `RSD` - Serbian Dinar +// * `CSD` - Serbian Dinar (2002–2006) +// * `SCR` - Seychellois Rupee +// * `SLL` - Sierra Leonean Leone +// * `XAG` - Silver +// * `SGD` - Singapore Dollar +// * `SKK` - Slovak Koruna +// * `SIT` - Slovenian Tolar +// * `SBD` - Solomon Islands Dollar +// * `SOS` - Somali Shilling +// * `ZAR` - South African Rand +// * `ZAL` - South African Rand (financial) +// * `KRH` - South Korean Hwan (1953–1962) +// * `KRW` - South Korean Won +// * `KRO` - South Korean Won (1945–1953) +// * `SSP` - South Sudanese Pound +// * `SUR` - Soviet Rouble +// * `ESP` - Spanish Peseta +// * `ESA` - Spanish Peseta (A account) +// * `ESB` - Spanish Peseta (convertible account) +// * `XDR` - Special Drawing Rights +// * `LKR` - Sri Lankan Rupee +// * `SHP` - St. Helena Pound +// * `XSU` - Sucre +// * `SDD` - Sudanese Dinar (1992–2007) +// * `SDG` - Sudanese Pound +// * `SDP` - Sudanese Pound (1957–1998) +// * `SRD` - Surinamese Dollar +// * `SRG` - Surinamese Guilder +// * `SZL` - Swazi Lilangeni +// * `SEK` - Swedish Krona +// * `CHF` - Swiss Franc +// * `SYP` - Syrian Pound +// * `STN` - São Tomé & Príncipe Dobra +// * `STD` - São Tomé & Príncipe Dobra (1977–2017) +// * `TVD` - TVD +// * `TJR` - Tajikistani Ruble +// * `TJS` - Tajikistani Somoni +// * `TZS` - Tanzanian Shilling +// * `XTS` - Testing Currency Code +// * `THB` - Thai Baht +// * `XXX` - The codes assigned for transactions where no currency is involved +// * `TPE` - Timorese Escudo +// * `TOP` - Tongan Paʻanga +// * `TTD` - Trinidad & Tobago Dollar +// * `TND` - Tunisian Dinar +// * `TRY` - Turkish Lira +// * `TRL` - Turkish Lira (1922–2005) +// * `TMT` - Turkmenistani Manat +// * `TMM` - Turkmenistani Manat (1993–2009) +// * `USD` - US Dollar +// * `USN` - US Dollar (Next day) +// * `USS` - US Dollar (Same day) +// * `UGX` - Ugandan Shilling +// * `UGS` - Ugandan Shilling (1966–1987) +// * `UAH` - Ukrainian Hryvnia +// * `UAK` - Ukrainian Karbovanets +// * `AED` - United Arab Emirates Dirham +// * `UYW` - Uruguayan Nominal Wage Index Unit +// * `UYU` - Uruguayan Peso +// * `UYP` - Uruguayan Peso (1975–1993) +// * `UYI` - Uruguayan Peso (Indexed Units) +// * `UZS` - Uzbekistani Som +// * `VUV` - Vanuatu Vatu +// * `VES` - Venezuelan Bolívar +// * `VEB` - Venezuelan Bolívar (1871–2008) +// * `VEF` - Venezuelan Bolívar (2008–2018) +// * `VND` - Vietnamese Dong +// * `VNN` - Vietnamese Dong (1978–1985) +// * `CHE` - WIR Euro +// * `CHW` - WIR Franc +// * `XOF` - West African CFA Franc +// * `YDD` - Yemeni Dinar +// * `YER` - Yemeni Rial +// * `YUN` - Yugoslavian Convertible Dinar (1990–1992) +// * `YUD` - Yugoslavian Hard Dinar (1966–1990) +// * `YUM` - Yugoslavian New Dinar (1994–2002) +// * `YUR` - Yugoslavian Reformed Dinar (1992–1993) +// * `ZWN` - ZWN +// * `ZRN` - Zairean New Zaire (1993–1998) +// * `ZRZ` - Zairean Zaire (1971–1993) +// * `ZMW` - Zambian Kwacha +// * `ZMK` - Zambian Kwacha (1968–2012) +// * `ZWD` - Zimbabwean Dollar (1980–2008) +// * `ZWR` - Zimbabwean Dollar (2008) +// * `ZWL` - Zimbabwean Dollar (2009) +type TransactionCurrency struct { + TransactionCurrencyEnum TransactionCurrencyEnum + String string + + typ string +} + +func (t *TransactionCurrency) GetTransactionCurrencyEnum() TransactionCurrencyEnum { + if t == nil { + return "" + } + return t.TransactionCurrencyEnum +} + +func (t *TransactionCurrency) GetString() string { + if t == nil { + return "" + } + return t.String +} + +func (t *TransactionCurrency) UnmarshalJSON(data []byte) error { + var valueTransactionCurrencyEnum TransactionCurrencyEnum + if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { + t.typ = "TransactionCurrencyEnum" + t.TransactionCurrencyEnum = valueTransactionCurrencyEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + t.typ = "String" + t.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, t) +} + +func (t TransactionCurrency) MarshalJSON() ([]byte, error) { + if t.typ == "TransactionCurrencyEnum" || t.TransactionCurrencyEnum != "" { + return json.Marshal(t.TransactionCurrencyEnum) + } + if t.typ == "String" || t.String != "" { + return json.Marshal(t.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) +} + +type TransactionCurrencyVisitor interface { + VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error + VisitString(string) error +} + +func (t *TransactionCurrency) Accept(visitor TransactionCurrencyVisitor) error { + if t.typ == "TransactionCurrencyEnum" || t.TransactionCurrencyEnum != "" { + return visitor.VisitTransactionCurrencyEnum(t.TransactionCurrencyEnum) + } + if t.typ == "String" || t.String != "" { + return visitor.VisitString(t.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", t) +} + +// # The TransactionLineItem Object +// ### Description +// The `TransactionLineItem` object is used to represent a transaction's line items. +// +// ### Usage Example +// Fetch from the `GET TransactionLineItem` endpoint and view the transaction's line items. +type TransactionLineItem struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // An internal note used by the business to clarify purpose of the transaction. + Memo *string `json:"memo,omitempty" url:"memo,omitempty"` + // The line item's unit price. + UnitPrice *string `json:"unit_price,omitempty" url:"unit_price,omitempty"` + // The line item's quantity. + Quantity *string `json:"quantity,omitempty" url:"quantity,omitempty"` + Item *TransactionLineItemItem `json:"item,omitempty" url:"item,omitempty"` + // The line item's account. + Account *string `json:"account,omitempty" url:"account,omitempty"` + // The line's associated tracking category. + TrackingCategory *string `json:"tracking_category,omitempty" url:"tracking_category,omitempty"` + // The transaction line item's associated tracking categories. + TrackingCategories []*string `json:"tracking_categories,omitempty" url:"tracking_categories,omitempty"` + // The line item's total. + TotalLineAmount *string `json:"total_line_amount,omitempty" url:"total_line_amount,omitempty"` + // The tax rate that applies to this line item. + TaxRate *string `json:"tax_rate,omitempty" url:"tax_rate,omitempty"` + // The line item's currency. + // + // * `XUA` - ADB Unit of Account + // * `AFN` - Afghan Afghani + // * `AFA` - Afghan Afghani (1927–2002) + // * `ALL` - Albanian Lek + // * `ALK` - Albanian Lek (1946–1965) + // * `DZD` - Algerian Dinar + // * `ADP` - Andorran Peseta + // * `AOA` - Angolan Kwanza + // * `AOK` - Angolan Kwanza (1977–1991) + // * `AON` - Angolan New Kwanza (1990–2000) + // * `AOR` - Angolan Readjusted Kwanza (1995–1999) + // * `ARA` - Argentine Austral + // * `ARS` - Argentine Peso + // * `ARM` - Argentine Peso (1881–1970) + // * `ARP` - Argentine Peso (1983–1985) + // * `ARL` - Argentine Peso Ley (1970–1983) + // * `AMD` - Armenian Dram + // * `AWG` - Aruban Florin + // * `AUD` - Australian Dollar + // * `ATS` - Austrian Schilling + // * `AZN` - Azerbaijani Manat + // * `AZM` - Azerbaijani Manat (1993–2006) + // * `BSD` - Bahamian Dollar + // * `BHD` - Bahraini Dinar + // * `BDT` - Bangladeshi Taka + // * `BBD` - Barbadian Dollar + // * `BYN` - Belarusian Ruble + // * `BYB` - Belarusian Ruble (1994–1999) + // * `BYR` - Belarusian Ruble (2000–2016) + // * `BEF` - Belgian Franc + // * `BEC` - Belgian Franc (convertible) + // * `BEL` - Belgian Franc (financial) + // * `BZD` - Belize Dollar + // * `BMD` - Bermudan Dollar + // * `BTN` - Bhutanese Ngultrum + // * `BOB` - Bolivian Boliviano + // * `BOL` - Bolivian Boliviano (1863–1963) + // * `BOV` - Bolivian Mvdol + // * `BOP` - Bolivian Peso + // * `BAM` - Bosnia-Herzegovina Convertible Mark + // * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + // * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + // * `BWP` - Botswanan Pula + // * `BRC` - Brazilian Cruzado (1986–1989) + // * `BRZ` - Brazilian Cruzeiro (1942–1967) + // * `BRE` - Brazilian Cruzeiro (1990–1993) + // * `BRR` - Brazilian Cruzeiro (1993–1994) + // * `BRN` - Brazilian New Cruzado (1989–1990) + // * `BRB` - Brazilian New Cruzeiro (1967–1986) + // * `BRL` - Brazilian Real + // * `GBP` - British Pound + // * `BND` - Brunei Dollar + // * `BGL` - Bulgarian Hard Lev + // * `BGN` - Bulgarian Lev + // * `BGO` - Bulgarian Lev (1879–1952) + // * `BGM` - Bulgarian Socialist Lev + // * `BUK` - Burmese Kyat + // * `BIF` - Burundian Franc + // * `XPF` - CFP Franc + // * `KHR` - Cambodian Riel + // * `CAD` - Canadian Dollar + // * `CVE` - Cape Verdean Escudo + // * `KYD` - Cayman Islands Dollar + // * `XAF` - Central African CFA Franc + // * `CLE` - Chilean Escudo + // * `CLP` - Chilean Peso + // * `CLF` - Chilean Unit of Account (UF) + // * `CNX` - Chinese People’s Bank Dollar + // * `CNY` - Chinese Yuan + // * `CNH` - Chinese Yuan (offshore) + // * `COP` - Colombian Peso + // * `COU` - Colombian Real Value Unit + // * `KMF` - Comorian Franc + // * `CDF` - Congolese Franc + // * `CRC` - Costa Rican Colón + // * `HRD` - Croatian Dinar + // * `HRK` - Croatian Kuna + // * `CUC` - Cuban Convertible Peso + // * `CUP` - Cuban Peso + // * `CYP` - Cypriot Pound + // * `CZK` - Czech Koruna + // * `CSK` - Czechoslovak Hard Koruna + // * `DKK` - Danish Krone + // * `DJF` - Djiboutian Franc + // * `DOP` - Dominican Peso + // * `NLG` - Dutch Guilder + // * `XCD` - East Caribbean Dollar + // * `DDM` - East German Mark + // * `ECS` - Ecuadorian Sucre + // * `ECV` - Ecuadorian Unit of Constant Value + // * `EGP` - Egyptian Pound + // * `GQE` - Equatorial Guinean Ekwele + // * `ERN` - Eritrean Nakfa + // * `EEK` - Estonian Kroon + // * `ETB` - Ethiopian Birr + // * `EUR` - Euro + // * `XBA` - European Composite Unit + // * `XEU` - European Currency Unit + // * `XBB` - European Monetary Unit + // * `XBC` - European Unit of Account (XBC) + // * `XBD` - European Unit of Account (XBD) + // * `FKP` - Falkland Islands Pound + // * `FJD` - Fijian Dollar + // * `FIM` - Finnish Markka + // * `FRF` - French Franc + // * `XFO` - French Gold Franc + // * `XFU` - French UIC-Franc + // * `GMD` - Gambian Dalasi + // * `GEK` - Georgian Kupon Larit + // * `GEL` - Georgian Lari + // * `DEM` - German Mark + // * `GHS` - Ghanaian Cedi + // * `GHC` - Ghanaian Cedi (1979–2007) + // * `GIP` - Gibraltar Pound + // * `XAU` - Gold + // * `GRD` - Greek Drachma + // * `GTQ` - Guatemalan Quetzal + // * `GWP` - Guinea-Bissau Peso + // * `GNF` - Guinean Franc + // * `GNS` - Guinean Syli + // * `GYD` - Guyanaese Dollar + // * `HTG` - Haitian Gourde + // * `HNL` - Honduran Lempira + // * `HKD` - Hong Kong Dollar + // * `HUF` - Hungarian Forint + // * `IMP` - IMP + // * `ISK` - Icelandic Króna + // * `ISJ` - Icelandic Króna (1918–1981) + // * `INR` - Indian Rupee + // * `IDR` - Indonesian Rupiah + // * `IRR` - Iranian Rial + // * `IQD` - Iraqi Dinar + // * `IEP` - Irish Pound + // * `ILS` - Israeli New Shekel + // * `ILP` - Israeli Pound + // * `ILR` - Israeli Shekel (1980–1985) + // * `ITL` - Italian Lira + // * `JMD` - Jamaican Dollar + // * `JPY` - Japanese Yen + // * `JOD` - Jordanian Dinar + // * `KZT` - Kazakhstani Tenge + // * `KES` - Kenyan Shilling + // * `KWD` - Kuwaiti Dinar + // * `KGS` - Kyrgystani Som + // * `LAK` - Laotian Kip + // * `LVL` - Latvian Lats + // * `LVR` - Latvian Ruble + // * `LBP` - Lebanese Pound + // * `LSL` - Lesotho Loti + // * `LRD` - Liberian Dollar + // * `LYD` - Libyan Dinar + // * `LTL` - Lithuanian Litas + // * `LTT` - Lithuanian Talonas + // * `LUL` - Luxembourg Financial Franc + // * `LUC` - Luxembourgian Convertible Franc + // * `LUF` - Luxembourgian Franc + // * `MOP` - Macanese Pataca + // * `MKD` - Macedonian Denar + // * `MKN` - Macedonian Denar (1992–1993) + // * `MGA` - Malagasy Ariary + // * `MGF` - Malagasy Franc + // * `MWK` - Malawian Kwacha + // * `MYR` - Malaysian Ringgit + // * `MVR` - Maldivian Rufiyaa + // * `MVP` - Maldivian Rupee (1947–1981) + // * `MLF` - Malian Franc + // * `MTL` - Maltese Lira + // * `MTP` - Maltese Pound + // * `MRU` - Mauritanian Ouguiya + // * `MRO` - Mauritanian Ouguiya (1973–2017) + // * `MUR` - Mauritian Rupee + // * `MXV` - Mexican Investment Unit + // * `MXN` - Mexican Peso + // * `MXP` - Mexican Silver Peso (1861–1992) + // * `MDC` - Moldovan Cupon + // * `MDL` - Moldovan Leu + // * `MCF` - Monegasque Franc + // * `MNT` - Mongolian Tugrik + // * `MAD` - Moroccan Dirham + // * `MAF` - Moroccan Franc + // * `MZE` - Mozambican Escudo + // * `MZN` - Mozambican Metical + // * `MZM` - Mozambican Metical (1980–2006) + // * `MMK` - Myanmar Kyat + // * `NAD` - Namibian Dollar + // * `NPR` - Nepalese Rupee + // * `ANG` - Netherlands Antillean Guilder + // * `TWD` - New Taiwan Dollar + // * `NZD` - New Zealand Dollar + // * `NIO` - Nicaraguan Córdoba + // * `NIC` - Nicaraguan Córdoba (1988–1991) + // * `NGN` - Nigerian Naira + // * `KPW` - North Korean Won + // * `NOK` - Norwegian Krone + // * `OMR` - Omani Rial + // * `PKR` - Pakistani Rupee + // * `XPD` - Palladium + // * `PAB` - Panamanian Balboa + // * `PGK` - Papua New Guinean Kina + // * `PYG` - Paraguayan Guarani + // * `PEI` - Peruvian Inti + // * `PEN` - Peruvian Sol + // * `PES` - Peruvian Sol (1863–1965) + // * `PHP` - Philippine Peso + // * `XPT` - Platinum + // * `PLN` - Polish Zloty + // * `PLZ` - Polish Zloty (1950–1995) + // * `PTE` - Portuguese Escudo + // * `GWE` - Portuguese Guinea Escudo + // * `QAR` - Qatari Rial + // * `XRE` - RINET Funds + // * `RHD` - Rhodesian Dollar + // * `RON` - Romanian Leu + // * `ROL` - Romanian Leu (1952–2006) + // * `RUB` - Russian Ruble + // * `RUR` - Russian Ruble (1991–1998) + // * `RWF` - Rwandan Franc + // * `SVC` - Salvadoran Colón + // * `WST` - Samoan Tala + // * `SAR` - Saudi Riyal + // * `RSD` - Serbian Dinar + // * `CSD` - Serbian Dinar (2002–2006) + // * `SCR` - Seychellois Rupee + // * `SLL` - Sierra Leonean Leone + // * `XAG` - Silver + // * `SGD` - Singapore Dollar + // * `SKK` - Slovak Koruna + // * `SIT` - Slovenian Tolar + // * `SBD` - Solomon Islands Dollar + // * `SOS` - Somali Shilling + // * `ZAR` - South African Rand + // * `ZAL` - South African Rand (financial) + // * `KRH` - South Korean Hwan (1953–1962) + // * `KRW` - South Korean Won + // * `KRO` - South Korean Won (1945–1953) + // * `SSP` - South Sudanese Pound + // * `SUR` - Soviet Rouble + // * `ESP` - Spanish Peseta + // * `ESA` - Spanish Peseta (A account) + // * `ESB` - Spanish Peseta (convertible account) + // * `XDR` - Special Drawing Rights + // * `LKR` - Sri Lankan Rupee + // * `SHP` - St. Helena Pound + // * `XSU` - Sucre + // * `SDD` - Sudanese Dinar (1992–2007) + // * `SDG` - Sudanese Pound + // * `SDP` - Sudanese Pound (1957–1998) + // * `SRD` - Surinamese Dollar + // * `SRG` - Surinamese Guilder + // * `SZL` - Swazi Lilangeni + // * `SEK` - Swedish Krona + // * `CHF` - Swiss Franc + // * `SYP` - Syrian Pound + // * `STN` - São Tomé & Príncipe Dobra + // * `STD` - São Tomé & Príncipe Dobra (1977–2017) + // * `TVD` - TVD + // * `TJR` - Tajikistani Ruble + // * `TJS` - Tajikistani Somoni + // * `TZS` - Tanzanian Shilling + // * `XTS` - Testing Currency Code + // * `THB` - Thai Baht + // * `XXX` - The codes assigned for transactions where no currency is involved + // * `TPE` - Timorese Escudo + // * `TOP` - Tongan Paʻanga + // * `TTD` - Trinidad & Tobago Dollar + // * `TND` - Tunisian Dinar + // * `TRY` - Turkish Lira + // * `TRL` - Turkish Lira (1922–2005) + // * `TMT` - Turkmenistani Manat + // * `TMM` - Turkmenistani Manat (1993–2009) + // * `USD` - US Dollar + // * `USN` - US Dollar (Next day) + // * `USS` - US Dollar (Same day) + // * `UGX` - Ugandan Shilling + // * `UGS` - Ugandan Shilling (1966–1987) + // * `UAH` - Ukrainian Hryvnia + // * `UAK` - Ukrainian Karbovanets + // * `AED` - United Arab Emirates Dirham + // * `UYW` - Uruguayan Nominal Wage Index Unit + // * `UYU` - Uruguayan Peso + // * `UYP` - Uruguayan Peso (1975–1993) + // * `UYI` - Uruguayan Peso (Indexed Units) + // * `UZS` - Uzbekistani Som + // * `VUV` - Vanuatu Vatu + // * `VES` - Venezuelan Bolívar + // * `VEB` - Venezuelan Bolívar (1871–2008) + // * `VEF` - Venezuelan Bolívar (2008–2018) + // * `VND` - Vietnamese Dong + // * `VNN` - Vietnamese Dong (1978–1985) + // * `CHE` - WIR Euro + // * `CHW` - WIR Franc + // * `XOF` - West African CFA Franc + // * `YDD` - Yemeni Dinar + // * `YER` - Yemeni Rial + // * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + // * `YUD` - Yugoslavian Hard Dinar (1966–1990) + // * `YUM` - Yugoslavian New Dinar (1994–2002) + // * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + // * `ZWN` - ZWN + // * `ZRN` - Zairean New Zaire (1993–1998) + // * `ZRZ` - Zairean Zaire (1971–1993) + // * `ZMW` - Zambian Kwacha + // * `ZMK` - Zambian Kwacha (1968–2012) + // * `ZWD` - Zimbabwean Dollar (1980–2008) + // * `ZWR` - Zimbabwean Dollar (2008) + // * `ZWL` - Zimbabwean Dollar (2009) + Currency *TransactionLineItemCurrency `json:"currency,omitempty" url:"currency,omitempty"` + // The line item's exchange rate. + ExchangeRate *string `json:"exchange_rate,omitempty" url:"exchange_rate,omitempty"` + // The company the line belongs to. + Company *string `json:"company,omitempty" url:"company,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (t *TransactionLineItem) GetId() *string { + if t == nil { + return nil + } + return t.Id +} + +func (t *TransactionLineItem) GetRemoteId() *string { + if t == nil { + return nil + } + return t.RemoteId +} + +func (t *TransactionLineItem) GetCreatedAt() *time.Time { + if t == nil { + return nil + } + return t.CreatedAt +} + +func (t *TransactionLineItem) GetModifiedAt() *time.Time { + if t == nil { + return nil + } + return t.ModifiedAt +} + +func (t *TransactionLineItem) GetMemo() *string { + if t == nil { + return nil + } + return t.Memo +} + +func (t *TransactionLineItem) GetUnitPrice() *string { + if t == nil { + return nil + } + return t.UnitPrice +} + +func (t *TransactionLineItem) GetQuantity() *string { + if t == nil { + return nil + } + return t.Quantity +} + +func (t *TransactionLineItem) GetItem() *TransactionLineItemItem { + if t == nil { + return nil + } + return t.Item +} + +func (t *TransactionLineItem) GetAccount() *string { + if t == nil { + return nil + } + return t.Account +} + +func (t *TransactionLineItem) GetTrackingCategory() *string { + if t == nil { + return nil + } + return t.TrackingCategory +} + +func (t *TransactionLineItem) GetTrackingCategories() []*string { + if t == nil { + return nil + } + return t.TrackingCategories +} + +func (t *TransactionLineItem) GetTotalLineAmount() *string { + if t == nil { + return nil + } + return t.TotalLineAmount +} + +func (t *TransactionLineItem) GetTaxRate() *string { + if t == nil { + return nil + } + return t.TaxRate +} + +func (t *TransactionLineItem) GetCurrency() *TransactionLineItemCurrency { + if t == nil { + return nil + } + return t.Currency +} + +func (t *TransactionLineItem) GetExchangeRate() *string { + if t == nil { + return nil + } + return t.ExchangeRate +} + +func (t *TransactionLineItem) GetCompany() *string { + if t == nil { + return nil + } + return t.Company +} + +func (t *TransactionLineItem) GetRemoteWasDeleted() *bool { + if t == nil { + return nil + } + return t.RemoteWasDeleted +} + +func (t *TransactionLineItem) GetExtraProperties() map[string]interface{} { + return t.extraProperties +} + +func (t *TransactionLineItem) UnmarshalJSON(data []byte) error { + type embed TransactionLineItem + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*t), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *t = TransactionLineItem(unmarshaler.embed) + t.CreatedAt = unmarshaler.CreatedAt.TimePtr() + t.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *t) + if err != nil { + return err + } + t.extraProperties = extraProperties + t.rawJSON = json.RawMessage(data) + return nil +} + +func (t *TransactionLineItem) MarshalJSON() ([]byte, error) { + type embed TransactionLineItem + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*t), + CreatedAt: internal.NewOptionalDateTime(t.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(t.ModifiedAt), + } + return json.Marshal(marshaler) +} + +func (t *TransactionLineItem) String() string { + if len(t.rawJSON) > 0 { + if value, err := internal.StringifyJSON(t.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(t); err == nil { + return value + } + return fmt.Sprintf("%#v", t) +} + +// The line item's currency. +// +// * `XUA` - ADB Unit of Account +// * `AFN` - Afghan Afghani +// * `AFA` - Afghan Afghani (1927–2002) +// * `ALL` - Albanian Lek +// * `ALK` - Albanian Lek (1946–1965) +// * `DZD` - Algerian Dinar +// * `ADP` - Andorran Peseta +// * `AOA` - Angolan Kwanza +// * `AOK` - Angolan Kwanza (1977–1991) +// * `AON` - Angolan New Kwanza (1990–2000) +// * `AOR` - Angolan Readjusted Kwanza (1995–1999) +// * `ARA` - Argentine Austral +// * `ARS` - Argentine Peso +// * `ARM` - Argentine Peso (1881–1970) +// * `ARP` - Argentine Peso (1983–1985) +// * `ARL` - Argentine Peso Ley (1970–1983) +// * `AMD` - Armenian Dram +// * `AWG` - Aruban Florin +// * `AUD` - Australian Dollar +// * `ATS` - Austrian Schilling +// * `AZN` - Azerbaijani Manat +// * `AZM` - Azerbaijani Manat (1993–2006) +// * `BSD` - Bahamian Dollar +// * `BHD` - Bahraini Dinar +// * `BDT` - Bangladeshi Taka +// * `BBD` - Barbadian Dollar +// * `BYN` - Belarusian Ruble +// * `BYB` - Belarusian Ruble (1994–1999) +// * `BYR` - Belarusian Ruble (2000–2016) +// * `BEF` - Belgian Franc +// * `BEC` - Belgian Franc (convertible) +// * `BEL` - Belgian Franc (financial) +// * `BZD` - Belize Dollar +// * `BMD` - Bermudan Dollar +// * `BTN` - Bhutanese Ngultrum +// * `BOB` - Bolivian Boliviano +// * `BOL` - Bolivian Boliviano (1863–1963) +// * `BOV` - Bolivian Mvdol +// * `BOP` - Bolivian Peso +// * `BAM` - Bosnia-Herzegovina Convertible Mark +// * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) +// * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) +// * `BWP` - Botswanan Pula +// * `BRC` - Brazilian Cruzado (1986–1989) +// * `BRZ` - Brazilian Cruzeiro (1942–1967) +// * `BRE` - Brazilian Cruzeiro (1990–1993) +// * `BRR` - Brazilian Cruzeiro (1993–1994) +// * `BRN` - Brazilian New Cruzado (1989–1990) +// * `BRB` - Brazilian New Cruzeiro (1967–1986) +// * `BRL` - Brazilian Real +// * `GBP` - British Pound +// * `BND` - Brunei Dollar +// * `BGL` - Bulgarian Hard Lev +// * `BGN` - Bulgarian Lev +// * `BGO` - Bulgarian Lev (1879–1952) +// * `BGM` - Bulgarian Socialist Lev +// * `BUK` - Burmese Kyat +// * `BIF` - Burundian Franc +// * `XPF` - CFP Franc +// * `KHR` - Cambodian Riel +// * `CAD` - Canadian Dollar +// * `CVE` - Cape Verdean Escudo +// * `KYD` - Cayman Islands Dollar +// * `XAF` - Central African CFA Franc +// * `CLE` - Chilean Escudo +// * `CLP` - Chilean Peso +// * `CLF` - Chilean Unit of Account (UF) +// * `CNX` - Chinese People’s Bank Dollar +// * `CNY` - Chinese Yuan +// * `CNH` - Chinese Yuan (offshore) +// * `COP` - Colombian Peso +// * `COU` - Colombian Real Value Unit +// * `KMF` - Comorian Franc +// * `CDF` - Congolese Franc +// * `CRC` - Costa Rican Colón +// * `HRD` - Croatian Dinar +// * `HRK` - Croatian Kuna +// * `CUC` - Cuban Convertible Peso +// * `CUP` - Cuban Peso +// * `CYP` - Cypriot Pound +// * `CZK` - Czech Koruna +// * `CSK` - Czechoslovak Hard Koruna +// * `DKK` - Danish Krone +// * `DJF` - Djiboutian Franc +// * `DOP` - Dominican Peso +// * `NLG` - Dutch Guilder +// * `XCD` - East Caribbean Dollar +// * `DDM` - East German Mark +// * `ECS` - Ecuadorian Sucre +// * `ECV` - Ecuadorian Unit of Constant Value +// * `EGP` - Egyptian Pound +// * `GQE` - Equatorial Guinean Ekwele +// * `ERN` - Eritrean Nakfa +// * `EEK` - Estonian Kroon +// * `ETB` - Ethiopian Birr +// * `EUR` - Euro +// * `XBA` - European Composite Unit +// * `XEU` - European Currency Unit +// * `XBB` - European Monetary Unit +// * `XBC` - European Unit of Account (XBC) +// * `XBD` - European Unit of Account (XBD) +// * `FKP` - Falkland Islands Pound +// * `FJD` - Fijian Dollar +// * `FIM` - Finnish Markka +// * `FRF` - French Franc +// * `XFO` - French Gold Franc +// * `XFU` - French UIC-Franc +// * `GMD` - Gambian Dalasi +// * `GEK` - Georgian Kupon Larit +// * `GEL` - Georgian Lari +// * `DEM` - German Mark +// * `GHS` - Ghanaian Cedi +// * `GHC` - Ghanaian Cedi (1979–2007) +// * `GIP` - Gibraltar Pound +// * `XAU` - Gold +// * `GRD` - Greek Drachma +// * `GTQ` - Guatemalan Quetzal +// * `GWP` - Guinea-Bissau Peso +// * `GNF` - Guinean Franc +// * `GNS` - Guinean Syli +// * `GYD` - Guyanaese Dollar +// * `HTG` - Haitian Gourde +// * `HNL` - Honduran Lempira +// * `HKD` - Hong Kong Dollar +// * `HUF` - Hungarian Forint +// * `IMP` - IMP +// * `ISK` - Icelandic Króna +// * `ISJ` - Icelandic Króna (1918–1981) +// * `INR` - Indian Rupee +// * `IDR` - Indonesian Rupiah +// * `IRR` - Iranian Rial +// * `IQD` - Iraqi Dinar +// * `IEP` - Irish Pound +// * `ILS` - Israeli New Shekel +// * `ILP` - Israeli Pound +// * `ILR` - Israeli Shekel (1980–1985) +// * `ITL` - Italian Lira +// * `JMD` - Jamaican Dollar +// * `JPY` - Japanese Yen +// * `JOD` - Jordanian Dinar +// * `KZT` - Kazakhstani Tenge +// * `KES` - Kenyan Shilling +// * `KWD` - Kuwaiti Dinar +// * `KGS` - Kyrgystani Som +// * `LAK` - Laotian Kip +// * `LVL` - Latvian Lats +// * `LVR` - Latvian Ruble +// * `LBP` - Lebanese Pound +// * `LSL` - Lesotho Loti +// * `LRD` - Liberian Dollar +// * `LYD` - Libyan Dinar +// * `LTL` - Lithuanian Litas +// * `LTT` - Lithuanian Talonas +// * `LUL` - Luxembourg Financial Franc +// * `LUC` - Luxembourgian Convertible Franc +// * `LUF` - Luxembourgian Franc +// * `MOP` - Macanese Pataca +// * `MKD` - Macedonian Denar +// * `MKN` - Macedonian Denar (1992–1993) +// * `MGA` - Malagasy Ariary +// * `MGF` - Malagasy Franc +// * `MWK` - Malawian Kwacha +// * `MYR` - Malaysian Ringgit +// * `MVR` - Maldivian Rufiyaa +// * `MVP` - Maldivian Rupee (1947–1981) +// * `MLF` - Malian Franc +// * `MTL` - Maltese Lira +// * `MTP` - Maltese Pound +// * `MRU` - Mauritanian Ouguiya +// * `MRO` - Mauritanian Ouguiya (1973–2017) +// * `MUR` - Mauritian Rupee +// * `MXV` - Mexican Investment Unit +// * `MXN` - Mexican Peso +// * `MXP` - Mexican Silver Peso (1861–1992) +// * `MDC` - Moldovan Cupon +// * `MDL` - Moldovan Leu +// * `MCF` - Monegasque Franc +// * `MNT` - Mongolian Tugrik +// * `MAD` - Moroccan Dirham +// * `MAF` - Moroccan Franc +// * `MZE` - Mozambican Escudo +// * `MZN` - Mozambican Metical +// * `MZM` - Mozambican Metical (1980–2006) +// * `MMK` - Myanmar Kyat +// * `NAD` - Namibian Dollar +// * `NPR` - Nepalese Rupee +// * `ANG` - Netherlands Antillean Guilder +// * `TWD` - New Taiwan Dollar +// * `NZD` - New Zealand Dollar +// * `NIO` - Nicaraguan Córdoba +// * `NIC` - Nicaraguan Córdoba (1988–1991) +// * `NGN` - Nigerian Naira +// * `KPW` - North Korean Won +// * `NOK` - Norwegian Krone +// * `OMR` - Omani Rial +// * `PKR` - Pakistani Rupee +// * `XPD` - Palladium +// * `PAB` - Panamanian Balboa +// * `PGK` - Papua New Guinean Kina +// * `PYG` - Paraguayan Guarani +// * `PEI` - Peruvian Inti +// * `PEN` - Peruvian Sol +// * `PES` - Peruvian Sol (1863–1965) +// * `PHP` - Philippine Peso +// * `XPT` - Platinum +// * `PLN` - Polish Zloty +// * `PLZ` - Polish Zloty (1950–1995) +// * `PTE` - Portuguese Escudo +// * `GWE` - Portuguese Guinea Escudo +// * `QAR` - Qatari Rial +// * `XRE` - RINET Funds +// * `RHD` - Rhodesian Dollar +// * `RON` - Romanian Leu +// * `ROL` - Romanian Leu (1952–2006) +// * `RUB` - Russian Ruble +// * `RUR` - Russian Ruble (1991–1998) +// * `RWF` - Rwandan Franc +// * `SVC` - Salvadoran Colón +// * `WST` - Samoan Tala +// * `SAR` - Saudi Riyal +// * `RSD` - Serbian Dinar +// * `CSD` - Serbian Dinar (2002–2006) +// * `SCR` - Seychellois Rupee +// * `SLL` - Sierra Leonean Leone +// * `XAG` - Silver +// * `SGD` - Singapore Dollar +// * `SKK` - Slovak Koruna +// * `SIT` - Slovenian Tolar +// * `SBD` - Solomon Islands Dollar +// * `SOS` - Somali Shilling +// * `ZAR` - South African Rand +// * `ZAL` - South African Rand (financial) +// * `KRH` - South Korean Hwan (1953–1962) +// * `KRW` - South Korean Won +// * `KRO` - South Korean Won (1945–1953) +// * `SSP` - South Sudanese Pound +// * `SUR` - Soviet Rouble +// * `ESP` - Spanish Peseta +// * `ESA` - Spanish Peseta (A account) +// * `ESB` - Spanish Peseta (convertible account) +// * `XDR` - Special Drawing Rights +// * `LKR` - Sri Lankan Rupee +// * `SHP` - St. Helena Pound +// * `XSU` - Sucre +// * `SDD` - Sudanese Dinar (1992–2007) +// * `SDG` - Sudanese Pound +// * `SDP` - Sudanese Pound (1957–1998) +// * `SRD` - Surinamese Dollar +// * `SRG` - Surinamese Guilder +// * `SZL` - Swazi Lilangeni +// * `SEK` - Swedish Krona +// * `CHF` - Swiss Franc +// * `SYP` - Syrian Pound +// * `STN` - São Tomé & Príncipe Dobra +// * `STD` - São Tomé & Príncipe Dobra (1977–2017) +// * `TVD` - TVD +// * `TJR` - Tajikistani Ruble +// * `TJS` - Tajikistani Somoni +// * `TZS` - Tanzanian Shilling +// * `XTS` - Testing Currency Code +// * `THB` - Thai Baht +// * `XXX` - The codes assigned for transactions where no currency is involved +// * `TPE` - Timorese Escudo +// * `TOP` - Tongan Paʻanga +// * `TTD` - Trinidad & Tobago Dollar +// * `TND` - Tunisian Dinar +// * `TRY` - Turkish Lira +// * `TRL` - Turkish Lira (1922–2005) +// * `TMT` - Turkmenistani Manat +// * `TMM` - Turkmenistani Manat (1993–2009) +// * `USD` - US Dollar +// * `USN` - US Dollar (Next day) +// * `USS` - US Dollar (Same day) +// * `UGX` - Ugandan Shilling +// * `UGS` - Ugandan Shilling (1966–1987) +// * `UAH` - Ukrainian Hryvnia +// * `UAK` - Ukrainian Karbovanets +// * `AED` - United Arab Emirates Dirham +// * `UYW` - Uruguayan Nominal Wage Index Unit +// * `UYU` - Uruguayan Peso +// * `UYP` - Uruguayan Peso (1975–1993) +// * `UYI` - Uruguayan Peso (Indexed Units) +// * `UZS` - Uzbekistani Som +// * `VUV` - Vanuatu Vatu +// * `VES` - Venezuelan Bolívar +// * `VEB` - Venezuelan Bolívar (1871–2008) +// * `VEF` - Venezuelan Bolívar (2008–2018) +// * `VND` - Vietnamese Dong +// * `VNN` - Vietnamese Dong (1978–1985) +// * `CHE` - WIR Euro +// * `CHW` - WIR Franc +// * `XOF` - West African CFA Franc +// * `YDD` - Yemeni Dinar +// * `YER` - Yemeni Rial +// * `YUN` - Yugoslavian Convertible Dinar (1990–1992) +// * `YUD` - Yugoslavian Hard Dinar (1966–1990) +// * `YUM` - Yugoslavian New Dinar (1994–2002) +// * `YUR` - Yugoslavian Reformed Dinar (1992–1993) +// * `ZWN` - ZWN +// * `ZRN` - Zairean New Zaire (1993–1998) +// * `ZRZ` - Zairean Zaire (1971–1993) +// * `ZMW` - Zambian Kwacha +// * `ZMK` - Zambian Kwacha (1968–2012) +// * `ZWD` - Zimbabwean Dollar (1980–2008) +// * `ZWR` - Zimbabwean Dollar (2008) +// * `ZWL` - Zimbabwean Dollar (2009) +type TransactionLineItemCurrency struct { + TransactionCurrencyEnum TransactionCurrencyEnum + String string + + typ string +} + +func (t *TransactionLineItemCurrency) GetTransactionCurrencyEnum() TransactionCurrencyEnum { + if t == nil { + return "" + } + return t.TransactionCurrencyEnum +} + +func (t *TransactionLineItemCurrency) GetString() string { + if t == nil { + return "" + } + return t.String +} + +func (t *TransactionLineItemCurrency) UnmarshalJSON(data []byte) error { + var valueTransactionCurrencyEnum TransactionCurrencyEnum + if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { + t.typ = "TransactionCurrencyEnum" + t.TransactionCurrencyEnum = valueTransactionCurrencyEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + t.typ = "String" + t.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, t) +} + +func (t TransactionLineItemCurrency) MarshalJSON() ([]byte, error) { + if t.typ == "TransactionCurrencyEnum" || t.TransactionCurrencyEnum != "" { + return json.Marshal(t.TransactionCurrencyEnum) + } + if t.typ == "String" || t.String != "" { + return json.Marshal(t.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) +} + +type TransactionLineItemCurrencyVisitor interface { + VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error + VisitString(string) error +} + +func (t *TransactionLineItemCurrency) Accept(visitor TransactionLineItemCurrencyVisitor) error { + if t.typ == "TransactionCurrencyEnum" || t.TransactionCurrencyEnum != "" { + return visitor.VisitTransactionCurrencyEnum(t.TransactionCurrencyEnum) + } + if t.typ == "String" || t.String != "" { + return visitor.VisitString(t.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", t) +} + +type TransactionLineItemItem struct { + String string + Item *Item + + typ string +} + +func (t *TransactionLineItemItem) GetString() string { + if t == nil { + return "" + } + return t.String +} + +func (t *TransactionLineItemItem) GetItem() *Item { + if t == nil { + return nil + } + return t.Item +} + +func (t *TransactionLineItemItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + t.typ = "String" + t.String = valueString + return nil + } + valueItem := new(Item) + if err := json.Unmarshal(data, &valueItem); err == nil { + t.typ = "Item" + t.Item = valueItem + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, t) +} + +func (t TransactionLineItemItem) MarshalJSON() ([]byte, error) { + if t.typ == "String" || t.String != "" { + return json.Marshal(t.String) + } + if t.typ == "Item" || t.Item != nil { + return json.Marshal(t.Item) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) +} + +type TransactionLineItemItemVisitor interface { + VisitString(string) error + VisitItem(*Item) error +} + +func (t *TransactionLineItemItem) Accept(visitor TransactionLineItemItemVisitor) error { + if t.typ == "String" || t.String != "" { + return visitor.VisitString(t.String) + } + if t.typ == "Item" || t.Item != nil { + return visitor.VisitItem(t.Item) + } + return fmt.Errorf("type %T does not include a non-empty union type", t) +} + +type TransactionTrackingCategoriesItem struct { + String string + TrackingCategory *TrackingCategory + + typ string +} + +func (t *TransactionTrackingCategoriesItem) GetString() string { + if t == nil { + return "" + } + return t.String +} + +func (t *TransactionTrackingCategoriesItem) GetTrackingCategory() *TrackingCategory { + if t == nil { + return nil + } + return t.TrackingCategory +} + +func (t *TransactionTrackingCategoriesItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + t.typ = "String" + t.String = valueString + return nil + } + valueTrackingCategory := new(TrackingCategory) + if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { + t.typ = "TrackingCategory" + t.TrackingCategory = valueTrackingCategory + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, t) +} + +func (t TransactionTrackingCategoriesItem) MarshalJSON() ([]byte, error) { + if t.typ == "String" || t.String != "" { + return json.Marshal(t.String) + } + if t.typ == "TrackingCategory" || t.TrackingCategory != nil { + return json.Marshal(t.TrackingCategory) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) +} + +type TransactionTrackingCategoriesItemVisitor interface { + VisitString(string) error + VisitTrackingCategory(*TrackingCategory) error +} + +func (t *TransactionTrackingCategoriesItem) Accept(visitor TransactionTrackingCategoriesItemVisitor) error { + if t.typ == "String" || t.String != "" { + return visitor.VisitString(t.String) + } + if t.typ == "TrackingCategory" || t.TrackingCategory != nil { + return visitor.VisitTrackingCategory(t.TrackingCategory) + } + return fmt.Errorf("type %T does not include a non-empty union type", t) +} diff --git a/accounting/transactions/client.go b/accounting/transactions/client.go index fc0f672..202a647 100644 --- a/accounting/transactions/client.go +++ b/accounting/transactions/client.go @@ -1,132 +1,137 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package transactions import ( context "context" fmt "fmt" - accounting "github.com/merge-api/merge-go-client/accounting" - core "github.com/merge-api/merge-go-client/core" + accounting "github.com/merge-api/merge-go-client/v2/accounting" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `Transaction` objects. -func (c *Client) List(ctx context.Context, request *accounting.TransactionsListRequest) (*accounting.PaginatedTransactionList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/transactions" - - queryParams := make(url.Values) - if request.CompanyId != nil { - queryParams.Add("company_id", fmt.Sprintf("%v", *request.CompanyId)) - } - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if request.TransactionDateAfter != nil { - queryParams.Add("transaction_date_after", fmt.Sprintf("%v", request.TransactionDateAfter.Format(time.RFC3339))) - } - if request.TransactionDateBefore != nil { - queryParams.Add("transaction_date_before", fmt.Sprintf("%v", request.TransactionDateBefore.Format(time.RFC3339))) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *accounting.PaginatedTransactionList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *accounting.TransactionsListRequest, + opts ...option.RequestOption, +) (*core.Page[*accounting.Transaction], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/transactions" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *accounting.PaginatedTransactionList) *internal.PageResponse[*string, *accounting.Transaction] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *accounting.Transaction]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Returns a `Transaction` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *accounting.TransactionsRetrieveRequest) (*accounting.Transaction, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"accounting/v1/transactions/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *accounting.TransactionsRetrieveRequest, + opts ...option.RequestOption, +) (*accounting.Transaction, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/accounting/v1/transactions/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *accounting.Transaction if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/accounting/types.go b/accounting/types.go index 96c2767..77f24e5 100644 --- a/accounting/types.go +++ b/accounting/types.go @@ -1,418 +1,572 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package accounting import ( json "encoding/json" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) // # The Account Object -// // ### Description -// // An `Account` represents a category in a company’s ledger in which a financial transaction is recorded against. The aggregation of each `Account` object is often referred to as the **Chart of Accounts**. // // An `Account` can be classified into one of the following categories, determined through the `classification` field: -// -// - **Asset:** Accounts Receivable and Bank Accounts -// - **Liability:** Accounts Payable and Credit Card Accounts -// - **Equity:** Treasury Accounts and Retained Earnings -// - **Revenue:** Income and Other Income -// - **Expense:** Cost of Goods Sold and Office Expenses +// * __Asset:__ Accounts Receivable and Bank Accounts +// * __Liability:__ Accounts Payable and Credit Card Accounts +// * __Equity:__ Treasury Accounts and Retained Earnings +// * __Revenue:__ Income and Other Income +// * __Expense:__ Cost of Goods Sold and Office Expenses // // ### Usage Example -// // Fetch from the `LIST Accounts` endpoint and view a company's accounts. type Account struct { - Id *string `json:"id,omitempty"` + Id *string `json:"id,omitempty" url:"id,omitempty"` // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` // The account's name. - Name *string `json:"name,omitempty"` + Name *string `json:"name,omitempty" url:"name,omitempty"` // The account's description. - Description *string `json:"description,omitempty"` + Description *string `json:"description,omitempty" url:"description,omitempty"` // The account's broadest grouping. // - // - `ASSET` - ASSET - // - `EQUITY` - EQUITY - // - `EXPENSE` - EXPENSE - // - `LIABILITY` - LIABILITY - // - `REVENUE` - REVENUE - Classification *AccountClassification `json:"classification,omitempty"` + // * `ASSET` - ASSET + // * `EQUITY` - EQUITY + // * `EXPENSE` - EXPENSE + // * `LIABILITY` - LIABILITY + // * `REVENUE` - REVENUE + Classification *AccountClassification `json:"classification,omitempty" url:"classification,omitempty"` // The account's type is a narrower and more specific grouping within the account's classification. - Type *string `json:"type,omitempty"` + Type *string `json:"type,omitempty" url:"type,omitempty"` // Normalized account type- which is a narrower and more specific grouping within the account's classification. // - // - `BANK` - BANK - // - `CREDIT_CARD` - CREDIT_CARD - // - `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE - // - `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE - // - `FIXED_ASSET` - FIXED_ASSET - // - `OTHER_ASSET` - OTHER_ASSET - // - `OTHER_CURRENT_ASSET` - OTHER_CURRENT_ASSET - // - `OTHER_EXPENSE` - OTHER_EXPENSE - // - `OTHER_INCOME` - OTHER_INCOME - // - `COST_OF_GOODS_SOLD` - COST_OF_GOODS_SOLD - // - `OTHER_CURRENT_LIABILITY` - OTHER_CURRENT_LIABILITY - // - `LONG_TERM_LIABILITY` - LONG_TERM_LIABILITY - // - `NON_POSTING` - NON_POSTING - AccountType *AccountAccountType `json:"account_type,omitempty"` + // * `BANK` - BANK + // * `CREDIT_CARD` - CREDIT_CARD + // * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE + // * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE + // * `FIXED_ASSET` - FIXED_ASSET + // * `OTHER_ASSET` - OTHER_ASSET + // * `OTHER_CURRENT_ASSET` - OTHER_CURRENT_ASSET + // * `OTHER_EXPENSE` - OTHER_EXPENSE + // * `OTHER_INCOME` - OTHER_INCOME + // * `COST_OF_GOODS_SOLD` - COST_OF_GOODS_SOLD + // * `OTHER_CURRENT_LIABILITY` - OTHER_CURRENT_LIABILITY + // * `LONG_TERM_LIABILITY` - LONG_TERM_LIABILITY + // * `NON_POSTING` - NON_POSTING + AccountType *AccountAccountType `json:"account_type,omitempty" url:"account_type,omitempty"` // The account's status. // - // - `ACTIVE` - ACTIVE - // - `PENDING` - PENDING - // - `INACTIVE` - INACTIVE - Status *AccountStatus `json:"status,omitempty"` + // * `ACTIVE` - ACTIVE + // * `PENDING` - PENDING + // * `INACTIVE` - INACTIVE + Status *AccountStatus `json:"status,omitempty" url:"status,omitempty"` // The account's current balance. - CurrentBalance *float64 `json:"current_balance,omitempty"` + CurrentBalance *float64 `json:"current_balance,omitempty" url:"current_balance,omitempty"` // The account's currency. // - // - `XUA` - ADB Unit of Account - // - `AFN` - Afghan Afghani - // - `AFA` - Afghan Afghani (1927–2002) - // - `ALL` - Albanian Lek - // - `ALK` - Albanian Lek (1946–1965) - // - `DZD` - Algerian Dinar - // - `ADP` - Andorran Peseta - // - `AOA` - Angolan Kwanza - // - `AOK` - Angolan Kwanza (1977–1991) - // - `AON` - Angolan New Kwanza (1990–2000) - // - `AOR` - Angolan Readjusted Kwanza (1995–1999) - // - `ARA` - Argentine Austral - // - `ARS` - Argentine Peso - // - `ARM` - Argentine Peso (1881–1970) - // - `ARP` - Argentine Peso (1983–1985) - // - `ARL` - Argentine Peso Ley (1970–1983) - // - `AMD` - Armenian Dram - // - `AWG` - Aruban Florin - // - `AUD` - Australian Dollar - // - `ATS` - Austrian Schilling - // - `AZN` - Azerbaijani Manat - // - `AZM` - Azerbaijani Manat (1993–2006) - // - `BSD` - Bahamian Dollar - // - `BHD` - Bahraini Dinar - // - `BDT` - Bangladeshi Taka - // - `BBD` - Barbadian Dollar - // - `BYN` - Belarusian Ruble - // - `BYB` - Belarusian Ruble (1994–1999) - // - `BYR` - Belarusian Ruble (2000–2016) - // - `BEF` - Belgian Franc - // - `BEC` - Belgian Franc (convertible) - // - `BEL` - Belgian Franc (financial) - // - `BZD` - Belize Dollar - // - `BMD` - Bermudan Dollar - // - `BTN` - Bhutanese Ngultrum - // - `BOB` - Bolivian Boliviano - // - `BOL` - Bolivian Boliviano (1863–1963) - // - `BOV` - Bolivian Mvdol - // - `BOP` - Bolivian Peso - // - `BAM` - Bosnia-Herzegovina Convertible Mark - // - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - // - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - // - `BWP` - Botswanan Pula - // - `BRC` - Brazilian Cruzado (1986–1989) - // - `BRZ` - Brazilian Cruzeiro (1942–1967) - // - `BRE` - Brazilian Cruzeiro (1990–1993) - // - `BRR` - Brazilian Cruzeiro (1993–1994) - // - `BRN` - Brazilian New Cruzado (1989–1990) - // - `BRB` - Brazilian New Cruzeiro (1967–1986) - // - `BRL` - Brazilian Real - // - `GBP` - British Pound - // - `BND` - Brunei Dollar - // - `BGL` - Bulgarian Hard Lev - // - `BGN` - Bulgarian Lev - // - `BGO` - Bulgarian Lev (1879–1952) - // - `BGM` - Bulgarian Socialist Lev - // - `BUK` - Burmese Kyat - // - `BIF` - Burundian Franc - // - `XPF` - CFP Franc - // - `KHR` - Cambodian Riel - // - `CAD` - Canadian Dollar - // - `CVE` - Cape Verdean Escudo - // - `KYD` - Cayman Islands Dollar - // - `XAF` - Central African CFA Franc - // - `CLE` - Chilean Escudo - // - `CLP` - Chilean Peso - // - `CLF` - Chilean Unit of Account (UF) - // - `CNX` - Chinese People’s Bank Dollar - // - `CNY` - Chinese Yuan - // - `CNH` - Chinese Yuan (offshore) - // - `COP` - Colombian Peso - // - `COU` - Colombian Real Value Unit - // - `KMF` - Comorian Franc - // - `CDF` - Congolese Franc - // - `CRC` - Costa Rican Colón - // - `HRD` - Croatian Dinar - // - `HRK` - Croatian Kuna - // - `CUC` - Cuban Convertible Peso - // - `CUP` - Cuban Peso - // - `CYP` - Cypriot Pound - // - `CZK` - Czech Koruna - // - `CSK` - Czechoslovak Hard Koruna - // - `DKK` - Danish Krone - // - `DJF` - Djiboutian Franc - // - `DOP` - Dominican Peso - // - `NLG` - Dutch Guilder - // - `XCD` - East Caribbean Dollar - // - `DDM` - East German Mark - // - `ECS` - Ecuadorian Sucre - // - `ECV` - Ecuadorian Unit of Constant Value - // - `EGP` - Egyptian Pound - // - `GQE` - Equatorial Guinean Ekwele - // - `ERN` - Eritrean Nakfa - // - `EEK` - Estonian Kroon - // - `ETB` - Ethiopian Birr - // - `EUR` - Euro - // - `XBA` - European Composite Unit - // - `XEU` - European Currency Unit - // - `XBB` - European Monetary Unit - // - `XBC` - European Unit of Account (XBC) - // - `XBD` - European Unit of Account (XBD) - // - `FKP` - Falkland Islands Pound - // - `FJD` - Fijian Dollar - // - `FIM` - Finnish Markka - // - `FRF` - French Franc - // - `XFO` - French Gold Franc - // - `XFU` - French UIC-Franc - // - `GMD` - Gambian Dalasi - // - `GEK` - Georgian Kupon Larit - // - `GEL` - Georgian Lari - // - `DEM` - German Mark - // - `GHS` - Ghanaian Cedi - // - `GHC` - Ghanaian Cedi (1979–2007) - // - `GIP` - Gibraltar Pound - // - `XAU` - Gold - // - `GRD` - Greek Drachma - // - `GTQ` - Guatemalan Quetzal - // - `GWP` - Guinea-Bissau Peso - // - `GNF` - Guinean Franc - // - `GNS` - Guinean Syli - // - `GYD` - Guyanaese Dollar - // - `HTG` - Haitian Gourde - // - `HNL` - Honduran Lempira - // - `HKD` - Hong Kong Dollar - // - `HUF` - Hungarian Forint - // - `IMP` - IMP - // - `ISK` - Icelandic Króna - // - `ISJ` - Icelandic Króna (1918–1981) - // - `INR` - Indian Rupee - // - `IDR` - Indonesian Rupiah - // - `IRR` - Iranian Rial - // - `IQD` - Iraqi Dinar - // - `IEP` - Irish Pound - // - `ILS` - Israeli New Shekel - // - `ILP` - Israeli Pound - // - `ILR` - Israeli Shekel (1980–1985) - // - `ITL` - Italian Lira - // - `JMD` - Jamaican Dollar - // - `JPY` - Japanese Yen - // - `JOD` - Jordanian Dinar - // - `KZT` - Kazakhstani Tenge - // - `KES` - Kenyan Shilling - // - `KWD` - Kuwaiti Dinar - // - `KGS` - Kyrgystani Som - // - `LAK` - Laotian Kip - // - `LVL` - Latvian Lats - // - `LVR` - Latvian Ruble - // - `LBP` - Lebanese Pound - // - `LSL` - Lesotho Loti - // - `LRD` - Liberian Dollar - // - `LYD` - Libyan Dinar - // - `LTL` - Lithuanian Litas - // - `LTT` - Lithuanian Talonas - // - `LUL` - Luxembourg Financial Franc - // - `LUC` - Luxembourgian Convertible Franc - // - `LUF` - Luxembourgian Franc - // - `MOP` - Macanese Pataca - // - `MKD` - Macedonian Denar - // - `MKN` - Macedonian Denar (1992–1993) - // - `MGA` - Malagasy Ariary - // - `MGF` - Malagasy Franc - // - `MWK` - Malawian Kwacha - // - `MYR` - Malaysian Ringgit - // - `MVR` - Maldivian Rufiyaa - // - `MVP` - Maldivian Rupee (1947–1981) - // - `MLF` - Malian Franc - // - `MTL` - Maltese Lira - // - `MTP` - Maltese Pound - // - `MRU` - Mauritanian Ouguiya - // - `MRO` - Mauritanian Ouguiya (1973–2017) - // - `MUR` - Mauritian Rupee - // - `MXV` - Mexican Investment Unit - // - `MXN` - Mexican Peso - // - `MXP` - Mexican Silver Peso (1861–1992) - // - `MDC` - Moldovan Cupon - // - `MDL` - Moldovan Leu - // - `MCF` - Monegasque Franc - // - `MNT` - Mongolian Tugrik - // - `MAD` - Moroccan Dirham - // - `MAF` - Moroccan Franc - // - `MZE` - Mozambican Escudo - // - `MZN` - Mozambican Metical - // - `MZM` - Mozambican Metical (1980–2006) - // - `MMK` - Myanmar Kyat - // - `NAD` - Namibian Dollar - // - `NPR` - Nepalese Rupee - // - `ANG` - Netherlands Antillean Guilder - // - `TWD` - New Taiwan Dollar - // - `NZD` - New Zealand Dollar - // - `NIO` - Nicaraguan Córdoba - // - `NIC` - Nicaraguan Córdoba (1988–1991) - // - `NGN` - Nigerian Naira - // - `KPW` - North Korean Won - // - `NOK` - Norwegian Krone - // - `OMR` - Omani Rial - // - `PKR` - Pakistani Rupee - // - `XPD` - Palladium - // - `PAB` - Panamanian Balboa - // - `PGK` - Papua New Guinean Kina - // - `PYG` - Paraguayan Guarani - // - `PEI` - Peruvian Inti - // - `PEN` - Peruvian Sol - // - `PES` - Peruvian Sol (1863–1965) - // - `PHP` - Philippine Peso - // - `XPT` - Platinum - // - `PLN` - Polish Zloty - // - `PLZ` - Polish Zloty (1950–1995) - // - `PTE` - Portuguese Escudo - // - `GWE` - Portuguese Guinea Escudo - // - `QAR` - Qatari Rial - // - `XRE` - RINET Funds - // - `RHD` - Rhodesian Dollar - // - `RON` - Romanian Leu - // - `ROL` - Romanian Leu (1952–2006) - // - `RUB` - Russian Ruble - // - `RUR` - Russian Ruble (1991–1998) - // - `RWF` - Rwandan Franc - // - `SVC` - Salvadoran Colón - // - `WST` - Samoan Tala - // - `SAR` - Saudi Riyal - // - `RSD` - Serbian Dinar - // - `CSD` - Serbian Dinar (2002–2006) - // - `SCR` - Seychellois Rupee - // - `SLL` - Sierra Leonean Leone - // - `XAG` - Silver - // - `SGD` - Singapore Dollar - // - `SKK` - Slovak Koruna - // - `SIT` - Slovenian Tolar - // - `SBD` - Solomon Islands Dollar - // - `SOS` - Somali Shilling - // - `ZAR` - South African Rand - // - `ZAL` - South African Rand (financial) - // - `KRH` - South Korean Hwan (1953–1962) - // - `KRW` - South Korean Won - // - `KRO` - South Korean Won (1945–1953) - // - `SSP` - South Sudanese Pound - // - `SUR` - Soviet Rouble - // - `ESP` - Spanish Peseta - // - `ESA` - Spanish Peseta (A account) - // - `ESB` - Spanish Peseta (convertible account) - // - `XDR` - Special Drawing Rights - // - `LKR` - Sri Lankan Rupee - // - `SHP` - St. Helena Pound - // - `XSU` - Sucre - // - `SDD` - Sudanese Dinar (1992–2007) - // - `SDG` - Sudanese Pound - // - `SDP` - Sudanese Pound (1957–1998) - // - `SRD` - Surinamese Dollar - // - `SRG` - Surinamese Guilder - // - `SZL` - Swazi Lilangeni - // - `SEK` - Swedish Krona - // - `CHF` - Swiss Franc - // - `SYP` - Syrian Pound - // - `STN` - São Tomé & Príncipe Dobra - // - `STD` - São Tomé & Príncipe Dobra (1977–2017) - // - `TVD` - TVD - // - `TJR` - Tajikistani Ruble - // - `TJS` - Tajikistani Somoni - // - `TZS` - Tanzanian Shilling - // - `XTS` - Testing Currency Code - // - `THB` - Thai Baht - // - `XXX` - The codes assigned for transactions where no currency is involved - // - `TPE` - Timorese Escudo - // - `TOP` - Tongan Paʻanga - // - `TTD` - Trinidad & Tobago Dollar - // - `TND` - Tunisian Dinar - // - `TRY` - Turkish Lira - // - `TRL` - Turkish Lira (1922–2005) - // - `TMT` - Turkmenistani Manat - // - `TMM` - Turkmenistani Manat (1993–2009) - // - `USD` - US Dollar - // - `USN` - US Dollar (Next day) - // - `USS` - US Dollar (Same day) - // - `UGX` - Ugandan Shilling - // - `UGS` - Ugandan Shilling (1966–1987) - // - `UAH` - Ukrainian Hryvnia - // - `UAK` - Ukrainian Karbovanets - // - `AED` - United Arab Emirates Dirham - // - `UYW` - Uruguayan Nominal Wage Index Unit - // - `UYU` - Uruguayan Peso - // - `UYP` - Uruguayan Peso (1975–1993) - // - `UYI` - Uruguayan Peso (Indexed Units) - // - `UZS` - Uzbekistani Som - // - `VUV` - Vanuatu Vatu - // - `VES` - Venezuelan Bolívar - // - `VEB` - Venezuelan Bolívar (1871–2008) - // - `VEF` - Venezuelan Bolívar (2008–2018) - // - `VND` - Vietnamese Dong - // - `VNN` - Vietnamese Dong (1978–1985) - // - `CHE` - WIR Euro - // - `CHW` - WIR Franc - // - `XOF` - West African CFA Franc - // - `YDD` - Yemeni Dinar - // - `YER` - Yemeni Rial - // - `YUN` - Yugoslavian Convertible Dinar (1990–1992) - // - `YUD` - Yugoslavian Hard Dinar (1966–1990) - // - `YUM` - Yugoslavian New Dinar (1994–2002) - // - `YUR` - Yugoslavian Reformed Dinar (1992–1993) - // - `ZWN` - ZWN - // - `ZRN` - Zairean New Zaire (1993–1998) - // - `ZRZ` - Zairean Zaire (1971–1993) - // - `ZMW` - Zambian Kwacha - // - `ZMK` - Zambian Kwacha (1968–2012) - // - `ZWD` - Zimbabwean Dollar (1980–2008) - // - `ZWR` - Zimbabwean Dollar (2008) - // - `ZWL` - Zimbabwean Dollar (2009) - Currency *AccountCurrency `json:"currency,omitempty"` + // * `XUA` - ADB Unit of Account + // * `AFN` - Afghan Afghani + // * `AFA` - Afghan Afghani (1927–2002) + // * `ALL` - Albanian Lek + // * `ALK` - Albanian Lek (1946–1965) + // * `DZD` - Algerian Dinar + // * `ADP` - Andorran Peseta + // * `AOA` - Angolan Kwanza + // * `AOK` - Angolan Kwanza (1977–1991) + // * `AON` - Angolan New Kwanza (1990–2000) + // * `AOR` - Angolan Readjusted Kwanza (1995–1999) + // * `ARA` - Argentine Austral + // * `ARS` - Argentine Peso + // * `ARM` - Argentine Peso (1881–1970) + // * `ARP` - Argentine Peso (1983–1985) + // * `ARL` - Argentine Peso Ley (1970–1983) + // * `AMD` - Armenian Dram + // * `AWG` - Aruban Florin + // * `AUD` - Australian Dollar + // * `ATS` - Austrian Schilling + // * `AZN` - Azerbaijani Manat + // * `AZM` - Azerbaijani Manat (1993–2006) + // * `BSD` - Bahamian Dollar + // * `BHD` - Bahraini Dinar + // * `BDT` - Bangladeshi Taka + // * `BBD` - Barbadian Dollar + // * `BYN` - Belarusian Ruble + // * `BYB` - Belarusian Ruble (1994–1999) + // * `BYR` - Belarusian Ruble (2000–2016) + // * `BEF` - Belgian Franc + // * `BEC` - Belgian Franc (convertible) + // * `BEL` - Belgian Franc (financial) + // * `BZD` - Belize Dollar + // * `BMD` - Bermudan Dollar + // * `BTN` - Bhutanese Ngultrum + // * `BOB` - Bolivian Boliviano + // * `BOL` - Bolivian Boliviano (1863–1963) + // * `BOV` - Bolivian Mvdol + // * `BOP` - Bolivian Peso + // * `BAM` - Bosnia-Herzegovina Convertible Mark + // * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + // * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + // * `BWP` - Botswanan Pula + // * `BRC` - Brazilian Cruzado (1986–1989) + // * `BRZ` - Brazilian Cruzeiro (1942–1967) + // * `BRE` - Brazilian Cruzeiro (1990–1993) + // * `BRR` - Brazilian Cruzeiro (1993–1994) + // * `BRN` - Brazilian New Cruzado (1989–1990) + // * `BRB` - Brazilian New Cruzeiro (1967–1986) + // * `BRL` - Brazilian Real + // * `GBP` - British Pound + // * `BND` - Brunei Dollar + // * `BGL` - Bulgarian Hard Lev + // * `BGN` - Bulgarian Lev + // * `BGO` - Bulgarian Lev (1879–1952) + // * `BGM` - Bulgarian Socialist Lev + // * `BUK` - Burmese Kyat + // * `BIF` - Burundian Franc + // * `XPF` - CFP Franc + // * `KHR` - Cambodian Riel + // * `CAD` - Canadian Dollar + // * `CVE` - Cape Verdean Escudo + // * `KYD` - Cayman Islands Dollar + // * `XAF` - Central African CFA Franc + // * `CLE` - Chilean Escudo + // * `CLP` - Chilean Peso + // * `CLF` - Chilean Unit of Account (UF) + // * `CNX` - Chinese People’s Bank Dollar + // * `CNY` - Chinese Yuan + // * `CNH` - Chinese Yuan (offshore) + // * `COP` - Colombian Peso + // * `COU` - Colombian Real Value Unit + // * `KMF` - Comorian Franc + // * `CDF` - Congolese Franc + // * `CRC` - Costa Rican Colón + // * `HRD` - Croatian Dinar + // * `HRK` - Croatian Kuna + // * `CUC` - Cuban Convertible Peso + // * `CUP` - Cuban Peso + // * `CYP` - Cypriot Pound + // * `CZK` - Czech Koruna + // * `CSK` - Czechoslovak Hard Koruna + // * `DKK` - Danish Krone + // * `DJF` - Djiboutian Franc + // * `DOP` - Dominican Peso + // * `NLG` - Dutch Guilder + // * `XCD` - East Caribbean Dollar + // * `DDM` - East German Mark + // * `ECS` - Ecuadorian Sucre + // * `ECV` - Ecuadorian Unit of Constant Value + // * `EGP` - Egyptian Pound + // * `GQE` - Equatorial Guinean Ekwele + // * `ERN` - Eritrean Nakfa + // * `EEK` - Estonian Kroon + // * `ETB` - Ethiopian Birr + // * `EUR` - Euro + // * `XBA` - European Composite Unit + // * `XEU` - European Currency Unit + // * `XBB` - European Monetary Unit + // * `XBC` - European Unit of Account (XBC) + // * `XBD` - European Unit of Account (XBD) + // * `FKP` - Falkland Islands Pound + // * `FJD` - Fijian Dollar + // * `FIM` - Finnish Markka + // * `FRF` - French Franc + // * `XFO` - French Gold Franc + // * `XFU` - French UIC-Franc + // * `GMD` - Gambian Dalasi + // * `GEK` - Georgian Kupon Larit + // * `GEL` - Georgian Lari + // * `DEM` - German Mark + // * `GHS` - Ghanaian Cedi + // * `GHC` - Ghanaian Cedi (1979–2007) + // * `GIP` - Gibraltar Pound + // * `XAU` - Gold + // * `GRD` - Greek Drachma + // * `GTQ` - Guatemalan Quetzal + // * `GWP` - Guinea-Bissau Peso + // * `GNF` - Guinean Franc + // * `GNS` - Guinean Syli + // * `GYD` - Guyanaese Dollar + // * `HTG` - Haitian Gourde + // * `HNL` - Honduran Lempira + // * `HKD` - Hong Kong Dollar + // * `HUF` - Hungarian Forint + // * `IMP` - IMP + // * `ISK` - Icelandic Króna + // * `ISJ` - Icelandic Króna (1918–1981) + // * `INR` - Indian Rupee + // * `IDR` - Indonesian Rupiah + // * `IRR` - Iranian Rial + // * `IQD` - Iraqi Dinar + // * `IEP` - Irish Pound + // * `ILS` - Israeli New Shekel + // * `ILP` - Israeli Pound + // * `ILR` - Israeli Shekel (1980–1985) + // * `ITL` - Italian Lira + // * `JMD` - Jamaican Dollar + // * `JPY` - Japanese Yen + // * `JOD` - Jordanian Dinar + // * `KZT` - Kazakhstani Tenge + // * `KES` - Kenyan Shilling + // * `KWD` - Kuwaiti Dinar + // * `KGS` - Kyrgystani Som + // * `LAK` - Laotian Kip + // * `LVL` - Latvian Lats + // * `LVR` - Latvian Ruble + // * `LBP` - Lebanese Pound + // * `LSL` - Lesotho Loti + // * `LRD` - Liberian Dollar + // * `LYD` - Libyan Dinar + // * `LTL` - Lithuanian Litas + // * `LTT` - Lithuanian Talonas + // * `LUL` - Luxembourg Financial Franc + // * `LUC` - Luxembourgian Convertible Franc + // * `LUF` - Luxembourgian Franc + // * `MOP` - Macanese Pataca + // * `MKD` - Macedonian Denar + // * `MKN` - Macedonian Denar (1992–1993) + // * `MGA` - Malagasy Ariary + // * `MGF` - Malagasy Franc + // * `MWK` - Malawian Kwacha + // * `MYR` - Malaysian Ringgit + // * `MVR` - Maldivian Rufiyaa + // * `MVP` - Maldivian Rupee (1947–1981) + // * `MLF` - Malian Franc + // * `MTL` - Maltese Lira + // * `MTP` - Maltese Pound + // * `MRU` - Mauritanian Ouguiya + // * `MRO` - Mauritanian Ouguiya (1973–2017) + // * `MUR` - Mauritian Rupee + // * `MXV` - Mexican Investment Unit + // * `MXN` - Mexican Peso + // * `MXP` - Mexican Silver Peso (1861–1992) + // * `MDC` - Moldovan Cupon + // * `MDL` - Moldovan Leu + // * `MCF` - Monegasque Franc + // * `MNT` - Mongolian Tugrik + // * `MAD` - Moroccan Dirham + // * `MAF` - Moroccan Franc + // * `MZE` - Mozambican Escudo + // * `MZN` - Mozambican Metical + // * `MZM` - Mozambican Metical (1980–2006) + // * `MMK` - Myanmar Kyat + // * `NAD` - Namibian Dollar + // * `NPR` - Nepalese Rupee + // * `ANG` - Netherlands Antillean Guilder + // * `TWD` - New Taiwan Dollar + // * `NZD` - New Zealand Dollar + // * `NIO` - Nicaraguan Córdoba + // * `NIC` - Nicaraguan Córdoba (1988–1991) + // * `NGN` - Nigerian Naira + // * `KPW` - North Korean Won + // * `NOK` - Norwegian Krone + // * `OMR` - Omani Rial + // * `PKR` - Pakistani Rupee + // * `XPD` - Palladium + // * `PAB` - Panamanian Balboa + // * `PGK` - Papua New Guinean Kina + // * `PYG` - Paraguayan Guarani + // * `PEI` - Peruvian Inti + // * `PEN` - Peruvian Sol + // * `PES` - Peruvian Sol (1863–1965) + // * `PHP` - Philippine Peso + // * `XPT` - Platinum + // * `PLN` - Polish Zloty + // * `PLZ` - Polish Zloty (1950–1995) + // * `PTE` - Portuguese Escudo + // * `GWE` - Portuguese Guinea Escudo + // * `QAR` - Qatari Rial + // * `XRE` - RINET Funds + // * `RHD` - Rhodesian Dollar + // * `RON` - Romanian Leu + // * `ROL` - Romanian Leu (1952–2006) + // * `RUB` - Russian Ruble + // * `RUR` - Russian Ruble (1991–1998) + // * `RWF` - Rwandan Franc + // * `SVC` - Salvadoran Colón + // * `WST` - Samoan Tala + // * `SAR` - Saudi Riyal + // * `RSD` - Serbian Dinar + // * `CSD` - Serbian Dinar (2002–2006) + // * `SCR` - Seychellois Rupee + // * `SLL` - Sierra Leonean Leone + // * `XAG` - Silver + // * `SGD` - Singapore Dollar + // * `SKK` - Slovak Koruna + // * `SIT` - Slovenian Tolar + // * `SBD` - Solomon Islands Dollar + // * `SOS` - Somali Shilling + // * `ZAR` - South African Rand + // * `ZAL` - South African Rand (financial) + // * `KRH` - South Korean Hwan (1953–1962) + // * `KRW` - South Korean Won + // * `KRO` - South Korean Won (1945–1953) + // * `SSP` - South Sudanese Pound + // * `SUR` - Soviet Rouble + // * `ESP` - Spanish Peseta + // * `ESA` - Spanish Peseta (A account) + // * `ESB` - Spanish Peseta (convertible account) + // * `XDR` - Special Drawing Rights + // * `LKR` - Sri Lankan Rupee + // * `SHP` - St. Helena Pound + // * `XSU` - Sucre + // * `SDD` - Sudanese Dinar (1992–2007) + // * `SDG` - Sudanese Pound + // * `SDP` - Sudanese Pound (1957–1998) + // * `SRD` - Surinamese Dollar + // * `SRG` - Surinamese Guilder + // * `SZL` - Swazi Lilangeni + // * `SEK` - Swedish Krona + // * `CHF` - Swiss Franc + // * `SYP` - Syrian Pound + // * `STN` - São Tomé & Príncipe Dobra + // * `STD` - São Tomé & Príncipe Dobra (1977–2017) + // * `TVD` - TVD + // * `TJR` - Tajikistani Ruble + // * `TJS` - Tajikistani Somoni + // * `TZS` - Tanzanian Shilling + // * `XTS` - Testing Currency Code + // * `THB` - Thai Baht + // * `XXX` - The codes assigned for transactions where no currency is involved + // * `TPE` - Timorese Escudo + // * `TOP` - Tongan Paʻanga + // * `TTD` - Trinidad & Tobago Dollar + // * `TND` - Tunisian Dinar + // * `TRY` - Turkish Lira + // * `TRL` - Turkish Lira (1922–2005) + // * `TMT` - Turkmenistani Manat + // * `TMM` - Turkmenistani Manat (1993–2009) + // * `USD` - US Dollar + // * `USN` - US Dollar (Next day) + // * `USS` - US Dollar (Same day) + // * `UGX` - Ugandan Shilling + // * `UGS` - Ugandan Shilling (1966–1987) + // * `UAH` - Ukrainian Hryvnia + // * `UAK` - Ukrainian Karbovanets + // * `AED` - United Arab Emirates Dirham + // * `UYW` - Uruguayan Nominal Wage Index Unit + // * `UYU` - Uruguayan Peso + // * `UYP` - Uruguayan Peso (1975–1993) + // * `UYI` - Uruguayan Peso (Indexed Units) + // * `UZS` - Uzbekistani Som + // * `VUV` - Vanuatu Vatu + // * `VES` - Venezuelan Bolívar + // * `VEB` - Venezuelan Bolívar (1871–2008) + // * `VEF` - Venezuelan Bolívar (2008–2018) + // * `VND` - Vietnamese Dong + // * `VNN` - Vietnamese Dong (1978–1985) + // * `CHE` - WIR Euro + // * `CHW` - WIR Franc + // * `XOF` - West African CFA Franc + // * `YDD` - Yemeni Dinar + // * `YER` - Yemeni Rial + // * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + // * `YUD` - Yugoslavian Hard Dinar (1966–1990) + // * `YUM` - Yugoslavian New Dinar (1994–2002) + // * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + // * `ZWN` - ZWN + // * `ZRN` - Zairean New Zaire (1993–1998) + // * `ZRZ` - Zairean Zaire (1971–1993) + // * `ZMW` - Zambian Kwacha + // * `ZMK` - Zambian Kwacha (1968–2012) + // * `ZWD` - Zimbabwean Dollar (1980–2008) + // * `ZWR` - Zimbabwean Dollar (2008) + // * `ZWL` - Zimbabwean Dollar (2009) + Currency *AccountCurrency `json:"currency,omitempty" url:"currency,omitempty"` // The account's number. - AccountNumber *string `json:"account_number,omitempty"` + AccountNumber *string `json:"account_number,omitempty" url:"account_number,omitempty"` // ID of the parent account. - ParentAccount *string `json:"parent_account,omitempty"` + ParentAccount *string `json:"parent_account,omitempty" url:"parent_account,omitempty"` // The company the account belongs to. - Company *string `json:"company,omitempty"` + Company *string `json:"company,omitempty" url:"company,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *Account) GetId() *string { + if a == nil { + return nil + } + return a.Id +} + +func (a *Account) GetRemoteId() *string { + if a == nil { + return nil + } + return a.RemoteId +} + +func (a *Account) GetCreatedAt() *time.Time { + if a == nil { + return nil + } + return a.CreatedAt +} + +func (a *Account) GetModifiedAt() *time.Time { + if a == nil { + return nil + } + return a.ModifiedAt +} + +func (a *Account) GetName() *string { + if a == nil { + return nil + } + return a.Name +} + +func (a *Account) GetDescription() *string { + if a == nil { + return nil + } + return a.Description +} + +func (a *Account) GetClassification() *AccountClassification { + if a == nil { + return nil + } + return a.Classification +} + +func (a *Account) GetType() *string { + if a == nil { + return nil + } + return a.Type +} + +func (a *Account) GetAccountType() *AccountAccountType { + if a == nil { + return nil + } + return a.AccountType +} + +func (a *Account) GetStatus() *AccountStatus { + if a == nil { + return nil + } + return a.Status +} + +func (a *Account) GetCurrentBalance() *float64 { + if a == nil { + return nil + } + return a.CurrentBalance +} + +func (a *Account) GetCurrency() *AccountCurrency { + if a == nil { + return nil + } + return a.Currency +} + +func (a *Account) GetAccountNumber() *string { + if a == nil { + return nil + } + return a.AccountNumber +} + +func (a *Account) GetParentAccount() *string { + if a == nil { + return nil + } + return a.ParentAccount +} + +func (a *Account) GetCompany() *string { + if a == nil { + return nil + } + return a.Company +} + +func (a *Account) GetRemoteWasDeleted() *bool { + if a == nil { + return nil + } + return a.RemoteWasDeleted +} + +func (a *Account) GetFieldMappings() map[string]interface{} { + if a == nil { + return nil + } + return a.FieldMappings +} + +func (a *Account) GetRemoteData() []*RemoteData { + if a == nil { + return nil + } + return a.RemoteData +} - _rawJSON json.RawMessage +func (a *Account) GetExtraProperties() map[string]interface{} { + return a.extraProperties } func (a *Account) UnmarshalJSON(data []byte) error { - type unmarshaler Account - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { + type embed Account + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*a), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { return err } - *a = Account(value) - a._rawJSON = json.RawMessage(data) + *a = Account(unmarshaler.embed) + a.CreatedAt = unmarshaler.CreatedAt.TimePtr() + a.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) return nil } +func (a *Account) MarshalJSON() ([]byte, error) { + type embed Account + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*a), + CreatedAt: internal.NewOptionalDateTime(a.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(a.ModifiedAt), + } + return json.Marshal(marshaler) +} + func (a *Account) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(a); err == nil { + if value, err := internal.StringifyJSON(a); err == nil { return value } return fmt.Sprintf("%#v", a) @@ -420,43 +574,50 @@ func (a *Account) String() string { // Normalized account type- which is a narrower and more specific grouping within the account's classification. // -// - `BANK` - BANK -// - `CREDIT_CARD` - CREDIT_CARD -// - `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE -// - `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE -// - `FIXED_ASSET` - FIXED_ASSET -// - `OTHER_ASSET` - OTHER_ASSET -// - `OTHER_CURRENT_ASSET` - OTHER_CURRENT_ASSET -// - `OTHER_EXPENSE` - OTHER_EXPENSE -// - `OTHER_INCOME` - OTHER_INCOME -// - `COST_OF_GOODS_SOLD` - COST_OF_GOODS_SOLD -// - `OTHER_CURRENT_LIABILITY` - OTHER_CURRENT_LIABILITY -// - `LONG_TERM_LIABILITY` - LONG_TERM_LIABILITY -// - `NON_POSTING` - NON_POSTING +// * `BANK` - BANK +// * `CREDIT_CARD` - CREDIT_CARD +// * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE +// * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE +// * `FIXED_ASSET` - FIXED_ASSET +// * `OTHER_ASSET` - OTHER_ASSET +// * `OTHER_CURRENT_ASSET` - OTHER_CURRENT_ASSET +// * `OTHER_EXPENSE` - OTHER_EXPENSE +// * `OTHER_INCOME` - OTHER_INCOME +// * `COST_OF_GOODS_SOLD` - COST_OF_GOODS_SOLD +// * `OTHER_CURRENT_LIABILITY` - OTHER_CURRENT_LIABILITY +// * `LONG_TERM_LIABILITY` - LONG_TERM_LIABILITY +// * `NON_POSTING` - NON_POSTING type AccountAccountType struct { - typeName string AccountAccountTypeEnum AccountAccountTypeEnum String string + + typ string } -func NewAccountAccountTypeFromAccountAccountTypeEnum(value AccountAccountTypeEnum) *AccountAccountType { - return &AccountAccountType{typeName: "accountAccountTypeEnum", AccountAccountTypeEnum: value} +func (a *AccountAccountType) GetAccountAccountTypeEnum() AccountAccountTypeEnum { + if a == nil { + return "" + } + return a.AccountAccountTypeEnum } -func NewAccountAccountTypeFromString(value string) *AccountAccountType { - return &AccountAccountType{typeName: "string", String: value} +func (a *AccountAccountType) GetString() string { + if a == nil { + return "" + } + return a.String } func (a *AccountAccountType) UnmarshalJSON(data []byte) error { var valueAccountAccountTypeEnum AccountAccountTypeEnum if err := json.Unmarshal(data, &valueAccountAccountTypeEnum); err == nil { - a.typeName = "accountAccountTypeEnum" + a.typ = "AccountAccountTypeEnum" a.AccountAccountTypeEnum = valueAccountAccountTypeEnum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" + a.typ = "String" a.String = valueString return nil } @@ -464,14 +625,13 @@ func (a *AccountAccountType) UnmarshalJSON(data []byte) error { } func (a AccountAccountType) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "accountAccountTypeEnum": + if a.typ == "AccountAccountTypeEnum" || a.AccountAccountTypeEnum != "" { return json.Marshal(a.AccountAccountTypeEnum) - case "string": + } + if a.typ == "String" || a.String != "" { return json.Marshal(a.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) } type AccountAccountTypeVisitor interface { @@ -480,29 +640,28 @@ type AccountAccountTypeVisitor interface { } func (a *AccountAccountType) Accept(visitor AccountAccountTypeVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "accountAccountTypeEnum": + if a.typ == "AccountAccountTypeEnum" || a.AccountAccountTypeEnum != "" { return visitor.VisitAccountAccountTypeEnum(a.AccountAccountTypeEnum) - case "string": + } + if a.typ == "String" || a.String != "" { return visitor.VisitString(a.String) } -} - -// - `BANK` - BANK -// - `CREDIT_CARD` - CREDIT_CARD -// - `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE -// - `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE -// - `FIXED_ASSET` - FIXED_ASSET -// - `OTHER_ASSET` - OTHER_ASSET -// - `OTHER_CURRENT_ASSET` - OTHER_CURRENT_ASSET -// - `OTHER_EXPENSE` - OTHER_EXPENSE -// - `OTHER_INCOME` - OTHER_INCOME -// - `COST_OF_GOODS_SOLD` - COST_OF_GOODS_SOLD -// - `OTHER_CURRENT_LIABILITY` - OTHER_CURRENT_LIABILITY -// - `LONG_TERM_LIABILITY` - LONG_TERM_LIABILITY -// - `NON_POSTING` - NON_POSTING + return fmt.Errorf("type %T does not include a non-empty union type", a) +} + +// * `BANK` - BANK +// * `CREDIT_CARD` - CREDIT_CARD +// * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE +// * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE +// * `FIXED_ASSET` - FIXED_ASSET +// * `OTHER_ASSET` - OTHER_ASSET +// * `OTHER_CURRENT_ASSET` - OTHER_CURRENT_ASSET +// * `OTHER_EXPENSE` - OTHER_EXPENSE +// * `OTHER_INCOME` - OTHER_INCOME +// * `COST_OF_GOODS_SOLD` - COST_OF_GOODS_SOLD +// * `OTHER_CURRENT_LIABILITY` - OTHER_CURRENT_LIABILITY +// * `LONG_TERM_LIABILITY` - LONG_TERM_LIABILITY +// * `NON_POSTING` - NON_POSTING type AccountAccountTypeEnum string const ( @@ -560,35 +719,42 @@ func (a AccountAccountTypeEnum) Ptr() *AccountAccountTypeEnum { // The account's broadest grouping. // -// - `ASSET` - ASSET -// - `EQUITY` - EQUITY -// - `EXPENSE` - EXPENSE -// - `LIABILITY` - LIABILITY -// - `REVENUE` - REVENUE +// * `ASSET` - ASSET +// * `EQUITY` - EQUITY +// * `EXPENSE` - EXPENSE +// * `LIABILITY` - LIABILITY +// * `REVENUE` - REVENUE type AccountClassification struct { - typeName string ClassificationEnum ClassificationEnum String string + + typ string } -func NewAccountClassificationFromClassificationEnum(value ClassificationEnum) *AccountClassification { - return &AccountClassification{typeName: "classificationEnum", ClassificationEnum: value} +func (a *AccountClassification) GetClassificationEnum() ClassificationEnum { + if a == nil { + return "" + } + return a.ClassificationEnum } -func NewAccountClassificationFromString(value string) *AccountClassification { - return &AccountClassification{typeName: "string", String: value} +func (a *AccountClassification) GetString() string { + if a == nil { + return "" + } + return a.String } func (a *AccountClassification) UnmarshalJSON(data []byte) error { var valueClassificationEnum ClassificationEnum if err := json.Unmarshal(data, &valueClassificationEnum); err == nil { - a.typeName = "classificationEnum" + a.typ = "ClassificationEnum" a.ClassificationEnum = valueClassificationEnum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" + a.typ = "String" a.String = valueString return nil } @@ -596,14 +762,13 @@ func (a *AccountClassification) UnmarshalJSON(data []byte) error { } func (a AccountClassification) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "classificationEnum": + if a.typ == "ClassificationEnum" || a.ClassificationEnum != "" { return json.Marshal(a.ClassificationEnum) - case "string": + } + if a.typ == "String" || a.String != "" { return json.Marshal(a.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) } type AccountClassificationVisitor interface { @@ -612,348 +777,354 @@ type AccountClassificationVisitor interface { } func (a *AccountClassification) Accept(visitor AccountClassificationVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "classificationEnum": + if a.typ == "ClassificationEnum" || a.ClassificationEnum != "" { return visitor.VisitClassificationEnum(a.ClassificationEnum) - case "string": + } + if a.typ == "String" || a.String != "" { return visitor.VisitString(a.String) } + return fmt.Errorf("type %T does not include a non-empty union type", a) } // The account's currency. // -// - `XUA` - ADB Unit of Account -// - `AFN` - Afghan Afghani -// - `AFA` - Afghan Afghani (1927–2002) -// - `ALL` - Albanian Lek -// - `ALK` - Albanian Lek (1946–1965) -// - `DZD` - Algerian Dinar -// - `ADP` - Andorran Peseta -// - `AOA` - Angolan Kwanza -// - `AOK` - Angolan Kwanza (1977–1991) -// - `AON` - Angolan New Kwanza (1990–2000) -// - `AOR` - Angolan Readjusted Kwanza (1995–1999) -// - `ARA` - Argentine Austral -// - `ARS` - Argentine Peso -// - `ARM` - Argentine Peso (1881–1970) -// - `ARP` - Argentine Peso (1983–1985) -// - `ARL` - Argentine Peso Ley (1970–1983) -// - `AMD` - Armenian Dram -// - `AWG` - Aruban Florin -// - `AUD` - Australian Dollar -// - `ATS` - Austrian Schilling -// - `AZN` - Azerbaijani Manat -// - `AZM` - Azerbaijani Manat (1993–2006) -// - `BSD` - Bahamian Dollar -// - `BHD` - Bahraini Dinar -// - `BDT` - Bangladeshi Taka -// - `BBD` - Barbadian Dollar -// - `BYN` - Belarusian Ruble -// - `BYB` - Belarusian Ruble (1994–1999) -// - `BYR` - Belarusian Ruble (2000–2016) -// - `BEF` - Belgian Franc -// - `BEC` - Belgian Franc (convertible) -// - `BEL` - Belgian Franc (financial) -// - `BZD` - Belize Dollar -// - `BMD` - Bermudan Dollar -// - `BTN` - Bhutanese Ngultrum -// - `BOB` - Bolivian Boliviano -// - `BOL` - Bolivian Boliviano (1863–1963) -// - `BOV` - Bolivian Mvdol -// - `BOP` - Bolivian Peso -// - `BAM` - Bosnia-Herzegovina Convertible Mark -// - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) -// - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) -// - `BWP` - Botswanan Pula -// - `BRC` - Brazilian Cruzado (1986–1989) -// - `BRZ` - Brazilian Cruzeiro (1942–1967) -// - `BRE` - Brazilian Cruzeiro (1990–1993) -// - `BRR` - Brazilian Cruzeiro (1993–1994) -// - `BRN` - Brazilian New Cruzado (1989–1990) -// - `BRB` - Brazilian New Cruzeiro (1967–1986) -// - `BRL` - Brazilian Real -// - `GBP` - British Pound -// - `BND` - Brunei Dollar -// - `BGL` - Bulgarian Hard Lev -// - `BGN` - Bulgarian Lev -// - `BGO` - Bulgarian Lev (1879–1952) -// - `BGM` - Bulgarian Socialist Lev -// - `BUK` - Burmese Kyat -// - `BIF` - Burundian Franc -// - `XPF` - CFP Franc -// - `KHR` - Cambodian Riel -// - `CAD` - Canadian Dollar -// - `CVE` - Cape Verdean Escudo -// - `KYD` - Cayman Islands Dollar -// - `XAF` - Central African CFA Franc -// - `CLE` - Chilean Escudo -// - `CLP` - Chilean Peso -// - `CLF` - Chilean Unit of Account (UF) -// - `CNX` - Chinese People’s Bank Dollar -// - `CNY` - Chinese Yuan -// - `CNH` - Chinese Yuan (offshore) -// - `COP` - Colombian Peso -// - `COU` - Colombian Real Value Unit -// - `KMF` - Comorian Franc -// - `CDF` - Congolese Franc -// - `CRC` - Costa Rican Colón -// - `HRD` - Croatian Dinar -// - `HRK` - Croatian Kuna -// - `CUC` - Cuban Convertible Peso -// - `CUP` - Cuban Peso -// - `CYP` - Cypriot Pound -// - `CZK` - Czech Koruna -// - `CSK` - Czechoslovak Hard Koruna -// - `DKK` - Danish Krone -// - `DJF` - Djiboutian Franc -// - `DOP` - Dominican Peso -// - `NLG` - Dutch Guilder -// - `XCD` - East Caribbean Dollar -// - `DDM` - East German Mark -// - `ECS` - Ecuadorian Sucre -// - `ECV` - Ecuadorian Unit of Constant Value -// - `EGP` - Egyptian Pound -// - `GQE` - Equatorial Guinean Ekwele -// - `ERN` - Eritrean Nakfa -// - `EEK` - Estonian Kroon -// - `ETB` - Ethiopian Birr -// - `EUR` - Euro -// - `XBA` - European Composite Unit -// - `XEU` - European Currency Unit -// - `XBB` - European Monetary Unit -// - `XBC` - European Unit of Account (XBC) -// - `XBD` - European Unit of Account (XBD) -// - `FKP` - Falkland Islands Pound -// - `FJD` - Fijian Dollar -// - `FIM` - Finnish Markka -// - `FRF` - French Franc -// - `XFO` - French Gold Franc -// - `XFU` - French UIC-Franc -// - `GMD` - Gambian Dalasi -// - `GEK` - Georgian Kupon Larit -// - `GEL` - Georgian Lari -// - `DEM` - German Mark -// - `GHS` - Ghanaian Cedi -// - `GHC` - Ghanaian Cedi (1979–2007) -// - `GIP` - Gibraltar Pound -// - `XAU` - Gold -// - `GRD` - Greek Drachma -// - `GTQ` - Guatemalan Quetzal -// - `GWP` - Guinea-Bissau Peso -// - `GNF` - Guinean Franc -// - `GNS` - Guinean Syli -// - `GYD` - Guyanaese Dollar -// - `HTG` - Haitian Gourde -// - `HNL` - Honduran Lempira -// - `HKD` - Hong Kong Dollar -// - `HUF` - Hungarian Forint -// - `IMP` - IMP -// - `ISK` - Icelandic Króna -// - `ISJ` - Icelandic Króna (1918–1981) -// - `INR` - Indian Rupee -// - `IDR` - Indonesian Rupiah -// - `IRR` - Iranian Rial -// - `IQD` - Iraqi Dinar -// - `IEP` - Irish Pound -// - `ILS` - Israeli New Shekel -// - `ILP` - Israeli Pound -// - `ILR` - Israeli Shekel (1980–1985) -// - `ITL` - Italian Lira -// - `JMD` - Jamaican Dollar -// - `JPY` - Japanese Yen -// - `JOD` - Jordanian Dinar -// - `KZT` - Kazakhstani Tenge -// - `KES` - Kenyan Shilling -// - `KWD` - Kuwaiti Dinar -// - `KGS` - Kyrgystani Som -// - `LAK` - Laotian Kip -// - `LVL` - Latvian Lats -// - `LVR` - Latvian Ruble -// - `LBP` - Lebanese Pound -// - `LSL` - Lesotho Loti -// - `LRD` - Liberian Dollar -// - `LYD` - Libyan Dinar -// - `LTL` - Lithuanian Litas -// - `LTT` - Lithuanian Talonas -// - `LUL` - Luxembourg Financial Franc -// - `LUC` - Luxembourgian Convertible Franc -// - `LUF` - Luxembourgian Franc -// - `MOP` - Macanese Pataca -// - `MKD` - Macedonian Denar -// - `MKN` - Macedonian Denar (1992–1993) -// - `MGA` - Malagasy Ariary -// - `MGF` - Malagasy Franc -// - `MWK` - Malawian Kwacha -// - `MYR` - Malaysian Ringgit -// - `MVR` - Maldivian Rufiyaa -// - `MVP` - Maldivian Rupee (1947–1981) -// - `MLF` - Malian Franc -// - `MTL` - Maltese Lira -// - `MTP` - Maltese Pound -// - `MRU` - Mauritanian Ouguiya -// - `MRO` - Mauritanian Ouguiya (1973–2017) -// - `MUR` - Mauritian Rupee -// - `MXV` - Mexican Investment Unit -// - `MXN` - Mexican Peso -// - `MXP` - Mexican Silver Peso (1861–1992) -// - `MDC` - Moldovan Cupon -// - `MDL` - Moldovan Leu -// - `MCF` - Monegasque Franc -// - `MNT` - Mongolian Tugrik -// - `MAD` - Moroccan Dirham -// - `MAF` - Moroccan Franc -// - `MZE` - Mozambican Escudo -// - `MZN` - Mozambican Metical -// - `MZM` - Mozambican Metical (1980–2006) -// - `MMK` - Myanmar Kyat -// - `NAD` - Namibian Dollar -// - `NPR` - Nepalese Rupee -// - `ANG` - Netherlands Antillean Guilder -// - `TWD` - New Taiwan Dollar -// - `NZD` - New Zealand Dollar -// - `NIO` - Nicaraguan Córdoba -// - `NIC` - Nicaraguan Córdoba (1988–1991) -// - `NGN` - Nigerian Naira -// - `KPW` - North Korean Won -// - `NOK` - Norwegian Krone -// - `OMR` - Omani Rial -// - `PKR` - Pakistani Rupee -// - `XPD` - Palladium -// - `PAB` - Panamanian Balboa -// - `PGK` - Papua New Guinean Kina -// - `PYG` - Paraguayan Guarani -// - `PEI` - Peruvian Inti -// - `PEN` - Peruvian Sol -// - `PES` - Peruvian Sol (1863–1965) -// - `PHP` - Philippine Peso -// - `XPT` - Platinum -// - `PLN` - Polish Zloty -// - `PLZ` - Polish Zloty (1950–1995) -// - `PTE` - Portuguese Escudo -// - `GWE` - Portuguese Guinea Escudo -// - `QAR` - Qatari Rial -// - `XRE` - RINET Funds -// - `RHD` - Rhodesian Dollar -// - `RON` - Romanian Leu -// - `ROL` - Romanian Leu (1952–2006) -// - `RUB` - Russian Ruble -// - `RUR` - Russian Ruble (1991–1998) -// - `RWF` - Rwandan Franc -// - `SVC` - Salvadoran Colón -// - `WST` - Samoan Tala -// - `SAR` - Saudi Riyal -// - `RSD` - Serbian Dinar -// - `CSD` - Serbian Dinar (2002–2006) -// - `SCR` - Seychellois Rupee -// - `SLL` - Sierra Leonean Leone -// - `XAG` - Silver -// - `SGD` - Singapore Dollar -// - `SKK` - Slovak Koruna -// - `SIT` - Slovenian Tolar -// - `SBD` - Solomon Islands Dollar -// - `SOS` - Somali Shilling -// - `ZAR` - South African Rand -// - `ZAL` - South African Rand (financial) -// - `KRH` - South Korean Hwan (1953–1962) -// - `KRW` - South Korean Won -// - `KRO` - South Korean Won (1945–1953) -// - `SSP` - South Sudanese Pound -// - `SUR` - Soviet Rouble -// - `ESP` - Spanish Peseta -// - `ESA` - Spanish Peseta (A account) -// - `ESB` - Spanish Peseta (convertible account) -// - `XDR` - Special Drawing Rights -// - `LKR` - Sri Lankan Rupee -// - `SHP` - St. Helena Pound -// - `XSU` - Sucre -// - `SDD` - Sudanese Dinar (1992–2007) -// - `SDG` - Sudanese Pound -// - `SDP` - Sudanese Pound (1957–1998) -// - `SRD` - Surinamese Dollar -// - `SRG` - Surinamese Guilder -// - `SZL` - Swazi Lilangeni -// - `SEK` - Swedish Krona -// - `CHF` - Swiss Franc -// - `SYP` - Syrian Pound -// - `STN` - São Tomé & Príncipe Dobra -// - `STD` - São Tomé & Príncipe Dobra (1977–2017) -// - `TVD` - TVD -// - `TJR` - Tajikistani Ruble -// - `TJS` - Tajikistani Somoni -// - `TZS` - Tanzanian Shilling -// - `XTS` - Testing Currency Code -// - `THB` - Thai Baht -// - `XXX` - The codes assigned for transactions where no currency is involved -// - `TPE` - Timorese Escudo -// - `TOP` - Tongan Paʻanga -// - `TTD` - Trinidad & Tobago Dollar -// - `TND` - Tunisian Dinar -// - `TRY` - Turkish Lira -// - `TRL` - Turkish Lira (1922–2005) -// - `TMT` - Turkmenistani Manat -// - `TMM` - Turkmenistani Manat (1993–2009) -// - `USD` - US Dollar -// - `USN` - US Dollar (Next day) -// - `USS` - US Dollar (Same day) -// - `UGX` - Ugandan Shilling -// - `UGS` - Ugandan Shilling (1966–1987) -// - `UAH` - Ukrainian Hryvnia -// - `UAK` - Ukrainian Karbovanets -// - `AED` - United Arab Emirates Dirham -// - `UYW` - Uruguayan Nominal Wage Index Unit -// - `UYU` - Uruguayan Peso -// - `UYP` - Uruguayan Peso (1975–1993) -// - `UYI` - Uruguayan Peso (Indexed Units) -// - `UZS` - Uzbekistani Som -// - `VUV` - Vanuatu Vatu -// - `VES` - Venezuelan Bolívar -// - `VEB` - Venezuelan Bolívar (1871–2008) -// - `VEF` - Venezuelan Bolívar (2008–2018) -// - `VND` - Vietnamese Dong -// - `VNN` - Vietnamese Dong (1978–1985) -// - `CHE` - WIR Euro -// - `CHW` - WIR Franc -// - `XOF` - West African CFA Franc -// - `YDD` - Yemeni Dinar -// - `YER` - Yemeni Rial -// - `YUN` - Yugoslavian Convertible Dinar (1990–1992) -// - `YUD` - Yugoslavian Hard Dinar (1966–1990) -// - `YUM` - Yugoslavian New Dinar (1994–2002) -// - `YUR` - Yugoslavian Reformed Dinar (1992–1993) -// - `ZWN` - ZWN -// - `ZRN` - Zairean New Zaire (1993–1998) -// - `ZRZ` - Zairean Zaire (1971–1993) -// - `ZMW` - Zambian Kwacha -// - `ZMK` - Zambian Kwacha (1968–2012) -// - `ZWD` - Zimbabwean Dollar (1980–2008) -// - `ZWR` - Zimbabwean Dollar (2008) -// - `ZWL` - Zimbabwean Dollar (2009) +// * `XUA` - ADB Unit of Account +// * `AFN` - Afghan Afghani +// * `AFA` - Afghan Afghani (1927–2002) +// * `ALL` - Albanian Lek +// * `ALK` - Albanian Lek (1946–1965) +// * `DZD` - Algerian Dinar +// * `ADP` - Andorran Peseta +// * `AOA` - Angolan Kwanza +// * `AOK` - Angolan Kwanza (1977–1991) +// * `AON` - Angolan New Kwanza (1990–2000) +// * `AOR` - Angolan Readjusted Kwanza (1995–1999) +// * `ARA` - Argentine Austral +// * `ARS` - Argentine Peso +// * `ARM` - Argentine Peso (1881–1970) +// * `ARP` - Argentine Peso (1983–1985) +// * `ARL` - Argentine Peso Ley (1970–1983) +// * `AMD` - Armenian Dram +// * `AWG` - Aruban Florin +// * `AUD` - Australian Dollar +// * `ATS` - Austrian Schilling +// * `AZN` - Azerbaijani Manat +// * `AZM` - Azerbaijani Manat (1993–2006) +// * `BSD` - Bahamian Dollar +// * `BHD` - Bahraini Dinar +// * `BDT` - Bangladeshi Taka +// * `BBD` - Barbadian Dollar +// * `BYN` - Belarusian Ruble +// * `BYB` - Belarusian Ruble (1994–1999) +// * `BYR` - Belarusian Ruble (2000–2016) +// * `BEF` - Belgian Franc +// * `BEC` - Belgian Franc (convertible) +// * `BEL` - Belgian Franc (financial) +// * `BZD` - Belize Dollar +// * `BMD` - Bermudan Dollar +// * `BTN` - Bhutanese Ngultrum +// * `BOB` - Bolivian Boliviano +// * `BOL` - Bolivian Boliviano (1863–1963) +// * `BOV` - Bolivian Mvdol +// * `BOP` - Bolivian Peso +// * `BAM` - Bosnia-Herzegovina Convertible Mark +// * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) +// * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) +// * `BWP` - Botswanan Pula +// * `BRC` - Brazilian Cruzado (1986–1989) +// * `BRZ` - Brazilian Cruzeiro (1942–1967) +// * `BRE` - Brazilian Cruzeiro (1990–1993) +// * `BRR` - Brazilian Cruzeiro (1993–1994) +// * `BRN` - Brazilian New Cruzado (1989–1990) +// * `BRB` - Brazilian New Cruzeiro (1967–1986) +// * `BRL` - Brazilian Real +// * `GBP` - British Pound +// * `BND` - Brunei Dollar +// * `BGL` - Bulgarian Hard Lev +// * `BGN` - Bulgarian Lev +// * `BGO` - Bulgarian Lev (1879–1952) +// * `BGM` - Bulgarian Socialist Lev +// * `BUK` - Burmese Kyat +// * `BIF` - Burundian Franc +// * `XPF` - CFP Franc +// * `KHR` - Cambodian Riel +// * `CAD` - Canadian Dollar +// * `CVE` - Cape Verdean Escudo +// * `KYD` - Cayman Islands Dollar +// * `XAF` - Central African CFA Franc +// * `CLE` - Chilean Escudo +// * `CLP` - Chilean Peso +// * `CLF` - Chilean Unit of Account (UF) +// * `CNX` - Chinese People’s Bank Dollar +// * `CNY` - Chinese Yuan +// * `CNH` - Chinese Yuan (offshore) +// * `COP` - Colombian Peso +// * `COU` - Colombian Real Value Unit +// * `KMF` - Comorian Franc +// * `CDF` - Congolese Franc +// * `CRC` - Costa Rican Colón +// * `HRD` - Croatian Dinar +// * `HRK` - Croatian Kuna +// * `CUC` - Cuban Convertible Peso +// * `CUP` - Cuban Peso +// * `CYP` - Cypriot Pound +// * `CZK` - Czech Koruna +// * `CSK` - Czechoslovak Hard Koruna +// * `DKK` - Danish Krone +// * `DJF` - Djiboutian Franc +// * `DOP` - Dominican Peso +// * `NLG` - Dutch Guilder +// * `XCD` - East Caribbean Dollar +// * `DDM` - East German Mark +// * `ECS` - Ecuadorian Sucre +// * `ECV` - Ecuadorian Unit of Constant Value +// * `EGP` - Egyptian Pound +// * `GQE` - Equatorial Guinean Ekwele +// * `ERN` - Eritrean Nakfa +// * `EEK` - Estonian Kroon +// * `ETB` - Ethiopian Birr +// * `EUR` - Euro +// * `XBA` - European Composite Unit +// * `XEU` - European Currency Unit +// * `XBB` - European Monetary Unit +// * `XBC` - European Unit of Account (XBC) +// * `XBD` - European Unit of Account (XBD) +// * `FKP` - Falkland Islands Pound +// * `FJD` - Fijian Dollar +// * `FIM` - Finnish Markka +// * `FRF` - French Franc +// * `XFO` - French Gold Franc +// * `XFU` - French UIC-Franc +// * `GMD` - Gambian Dalasi +// * `GEK` - Georgian Kupon Larit +// * `GEL` - Georgian Lari +// * `DEM` - German Mark +// * `GHS` - Ghanaian Cedi +// * `GHC` - Ghanaian Cedi (1979–2007) +// * `GIP` - Gibraltar Pound +// * `XAU` - Gold +// * `GRD` - Greek Drachma +// * `GTQ` - Guatemalan Quetzal +// * `GWP` - Guinea-Bissau Peso +// * `GNF` - Guinean Franc +// * `GNS` - Guinean Syli +// * `GYD` - Guyanaese Dollar +// * `HTG` - Haitian Gourde +// * `HNL` - Honduran Lempira +// * `HKD` - Hong Kong Dollar +// * `HUF` - Hungarian Forint +// * `IMP` - IMP +// * `ISK` - Icelandic Króna +// * `ISJ` - Icelandic Króna (1918–1981) +// * `INR` - Indian Rupee +// * `IDR` - Indonesian Rupiah +// * `IRR` - Iranian Rial +// * `IQD` - Iraqi Dinar +// * `IEP` - Irish Pound +// * `ILS` - Israeli New Shekel +// * `ILP` - Israeli Pound +// * `ILR` - Israeli Shekel (1980–1985) +// * `ITL` - Italian Lira +// * `JMD` - Jamaican Dollar +// * `JPY` - Japanese Yen +// * `JOD` - Jordanian Dinar +// * `KZT` - Kazakhstani Tenge +// * `KES` - Kenyan Shilling +// * `KWD` - Kuwaiti Dinar +// * `KGS` - Kyrgystani Som +// * `LAK` - Laotian Kip +// * `LVL` - Latvian Lats +// * `LVR` - Latvian Ruble +// * `LBP` - Lebanese Pound +// * `LSL` - Lesotho Loti +// * `LRD` - Liberian Dollar +// * `LYD` - Libyan Dinar +// * `LTL` - Lithuanian Litas +// * `LTT` - Lithuanian Talonas +// * `LUL` - Luxembourg Financial Franc +// * `LUC` - Luxembourgian Convertible Franc +// * `LUF` - Luxembourgian Franc +// * `MOP` - Macanese Pataca +// * `MKD` - Macedonian Denar +// * `MKN` - Macedonian Denar (1992–1993) +// * `MGA` - Malagasy Ariary +// * `MGF` - Malagasy Franc +// * `MWK` - Malawian Kwacha +// * `MYR` - Malaysian Ringgit +// * `MVR` - Maldivian Rufiyaa +// * `MVP` - Maldivian Rupee (1947–1981) +// * `MLF` - Malian Franc +// * `MTL` - Maltese Lira +// * `MTP` - Maltese Pound +// * `MRU` - Mauritanian Ouguiya +// * `MRO` - Mauritanian Ouguiya (1973–2017) +// * `MUR` - Mauritian Rupee +// * `MXV` - Mexican Investment Unit +// * `MXN` - Mexican Peso +// * `MXP` - Mexican Silver Peso (1861–1992) +// * `MDC` - Moldovan Cupon +// * `MDL` - Moldovan Leu +// * `MCF` - Monegasque Franc +// * `MNT` - Mongolian Tugrik +// * `MAD` - Moroccan Dirham +// * `MAF` - Moroccan Franc +// * `MZE` - Mozambican Escudo +// * `MZN` - Mozambican Metical +// * `MZM` - Mozambican Metical (1980–2006) +// * `MMK` - Myanmar Kyat +// * `NAD` - Namibian Dollar +// * `NPR` - Nepalese Rupee +// * `ANG` - Netherlands Antillean Guilder +// * `TWD` - New Taiwan Dollar +// * `NZD` - New Zealand Dollar +// * `NIO` - Nicaraguan Córdoba +// * `NIC` - Nicaraguan Córdoba (1988–1991) +// * `NGN` - Nigerian Naira +// * `KPW` - North Korean Won +// * `NOK` - Norwegian Krone +// * `OMR` - Omani Rial +// * `PKR` - Pakistani Rupee +// * `XPD` - Palladium +// * `PAB` - Panamanian Balboa +// * `PGK` - Papua New Guinean Kina +// * `PYG` - Paraguayan Guarani +// * `PEI` - Peruvian Inti +// * `PEN` - Peruvian Sol +// * `PES` - Peruvian Sol (1863–1965) +// * `PHP` - Philippine Peso +// * `XPT` - Platinum +// * `PLN` - Polish Zloty +// * `PLZ` - Polish Zloty (1950–1995) +// * `PTE` - Portuguese Escudo +// * `GWE` - Portuguese Guinea Escudo +// * `QAR` - Qatari Rial +// * `XRE` - RINET Funds +// * `RHD` - Rhodesian Dollar +// * `RON` - Romanian Leu +// * `ROL` - Romanian Leu (1952–2006) +// * `RUB` - Russian Ruble +// * `RUR` - Russian Ruble (1991–1998) +// * `RWF` - Rwandan Franc +// * `SVC` - Salvadoran Colón +// * `WST` - Samoan Tala +// * `SAR` - Saudi Riyal +// * `RSD` - Serbian Dinar +// * `CSD` - Serbian Dinar (2002–2006) +// * `SCR` - Seychellois Rupee +// * `SLL` - Sierra Leonean Leone +// * `XAG` - Silver +// * `SGD` - Singapore Dollar +// * `SKK` - Slovak Koruna +// * `SIT` - Slovenian Tolar +// * `SBD` - Solomon Islands Dollar +// * `SOS` - Somali Shilling +// * `ZAR` - South African Rand +// * `ZAL` - South African Rand (financial) +// * `KRH` - South Korean Hwan (1953–1962) +// * `KRW` - South Korean Won +// * `KRO` - South Korean Won (1945–1953) +// * `SSP` - South Sudanese Pound +// * `SUR` - Soviet Rouble +// * `ESP` - Spanish Peseta +// * `ESA` - Spanish Peseta (A account) +// * `ESB` - Spanish Peseta (convertible account) +// * `XDR` - Special Drawing Rights +// * `LKR` - Sri Lankan Rupee +// * `SHP` - St. Helena Pound +// * `XSU` - Sucre +// * `SDD` - Sudanese Dinar (1992–2007) +// * `SDG` - Sudanese Pound +// * `SDP` - Sudanese Pound (1957–1998) +// * `SRD` - Surinamese Dollar +// * `SRG` - Surinamese Guilder +// * `SZL` - Swazi Lilangeni +// * `SEK` - Swedish Krona +// * `CHF` - Swiss Franc +// * `SYP` - Syrian Pound +// * `STN` - São Tomé & Príncipe Dobra +// * `STD` - São Tomé & Príncipe Dobra (1977–2017) +// * `TVD` - TVD +// * `TJR` - Tajikistani Ruble +// * `TJS` - Tajikistani Somoni +// * `TZS` - Tanzanian Shilling +// * `XTS` - Testing Currency Code +// * `THB` - Thai Baht +// * `XXX` - The codes assigned for transactions where no currency is involved +// * `TPE` - Timorese Escudo +// * `TOP` - Tongan Paʻanga +// * `TTD` - Trinidad & Tobago Dollar +// * `TND` - Tunisian Dinar +// * `TRY` - Turkish Lira +// * `TRL` - Turkish Lira (1922–2005) +// * `TMT` - Turkmenistani Manat +// * `TMM` - Turkmenistani Manat (1993–2009) +// * `USD` - US Dollar +// * `USN` - US Dollar (Next day) +// * `USS` - US Dollar (Same day) +// * `UGX` - Ugandan Shilling +// * `UGS` - Ugandan Shilling (1966–1987) +// * `UAH` - Ukrainian Hryvnia +// * `UAK` - Ukrainian Karbovanets +// * `AED` - United Arab Emirates Dirham +// * `UYW` - Uruguayan Nominal Wage Index Unit +// * `UYU` - Uruguayan Peso +// * `UYP` - Uruguayan Peso (1975–1993) +// * `UYI` - Uruguayan Peso (Indexed Units) +// * `UZS` - Uzbekistani Som +// * `VUV` - Vanuatu Vatu +// * `VES` - Venezuelan Bolívar +// * `VEB` - Venezuelan Bolívar (1871–2008) +// * `VEF` - Venezuelan Bolívar (2008–2018) +// * `VND` - Vietnamese Dong +// * `VNN` - Vietnamese Dong (1978–1985) +// * `CHE` - WIR Euro +// * `CHW` - WIR Franc +// * `XOF` - West African CFA Franc +// * `YDD` - Yemeni Dinar +// * `YER` - Yemeni Rial +// * `YUN` - Yugoslavian Convertible Dinar (1990–1992) +// * `YUD` - Yugoslavian Hard Dinar (1966–1990) +// * `YUM` - Yugoslavian New Dinar (1994–2002) +// * `YUR` - Yugoslavian Reformed Dinar (1992–1993) +// * `ZWN` - ZWN +// * `ZRN` - Zairean New Zaire (1993–1998) +// * `ZRZ` - Zairean Zaire (1971–1993) +// * `ZMW` - Zambian Kwacha +// * `ZMK` - Zambian Kwacha (1968–2012) +// * `ZWD` - Zimbabwean Dollar (1980–2008) +// * `ZWR` - Zimbabwean Dollar (2008) +// * `ZWL` - Zimbabwean Dollar (2009) type AccountCurrency struct { - typeName string TransactionCurrencyEnum TransactionCurrencyEnum String string + + typ string } -func NewAccountCurrencyFromTransactionCurrencyEnum(value TransactionCurrencyEnum) *AccountCurrency { - return &AccountCurrency{typeName: "transactionCurrencyEnum", TransactionCurrencyEnum: value} +func (a *AccountCurrency) GetTransactionCurrencyEnum() TransactionCurrencyEnum { + if a == nil { + return "" + } + return a.TransactionCurrencyEnum } -func NewAccountCurrencyFromString(value string) *AccountCurrency { - return &AccountCurrency{typeName: "string", String: value} +func (a *AccountCurrency) GetString() string { + if a == nil { + return "" + } + return a.String } func (a *AccountCurrency) UnmarshalJSON(data []byte) error { var valueTransactionCurrencyEnum TransactionCurrencyEnum if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { - a.typeName = "transactionCurrencyEnum" + a.typ = "TransactionCurrencyEnum" a.TransactionCurrencyEnum = valueTransactionCurrencyEnum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" + a.typ = "String" a.String = valueString return nil } @@ -961,14 +1132,13 @@ func (a *AccountCurrency) UnmarshalJSON(data []byte) error { } func (a AccountCurrency) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "transactionCurrencyEnum": + if a.typ == "TransactionCurrencyEnum" || a.TransactionCurrencyEnum != "" { return json.Marshal(a.TransactionCurrencyEnum) - case "string": + } + if a.typ == "String" || a.String != "" { return json.Marshal(a.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) } type AccountCurrencyVisitor interface { @@ -977,200 +1147,112 @@ type AccountCurrencyVisitor interface { } func (a *AccountCurrency) Accept(visitor AccountCurrencyVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "transactionCurrencyEnum": + if a.typ == "TransactionCurrencyEnum" || a.TransactionCurrencyEnum != "" { return visitor.VisitTransactionCurrencyEnum(a.TransactionCurrencyEnum) - case "string": + } + if a.typ == "String" || a.String != "" { return visitor.VisitString(a.String) } + return fmt.Errorf("type %T does not include a non-empty union type", a) } -type AccountDetails struct { - Id *string `json:"id,omitempty"` - Integration *string `json:"integration,omitempty"` - IntegrationSlug *string `json:"integration_slug,omitempty"` - Category *CategoryEnum `json:"category,omitempty"` - EndUserOriginId *string `json:"end_user_origin_id,omitempty"` - EndUserOrganizationName *string `json:"end_user_organization_name,omitempty"` - EndUserEmailAddress *string `json:"end_user_email_address,omitempty"` - Status *string `json:"status,omitempty"` - WebhookListenerUrl *string `json:"webhook_listener_url,omitempty"` - // 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. - IsDuplicate *bool `json:"is_duplicate,omitempty"` - AccountType *string `json:"account_type,omitempty"` - // The time at which account completes the linking flow. - CompletedAt *time.Time `json:"completed_at,omitempty"` +type AccountIntegration struct { + // Company name. + Name string `json:"name" url:"name"` + // Optional. This shortened name appears in places with limited space, usually in conjunction with the platform's logo (e.g., Merge Link menu).

Example: Workforce Now (in lieu of ADP Workforce Now), SuccessFactors (in lieu of SAP SuccessFactors) + AbbreviatedName *string `json:"abbreviated_name,omitempty" url:"abbreviated_name,omitempty"` + // Category or categories this integration belongs to. Multiple categories should be comma separated, i.e. [ats, hris]. + Categories []CategoriesEnum `json:"categories,omitempty" url:"categories,omitempty"` + // Company logo in rectangular shape. + Image *string `json:"image,omitempty" url:"image,omitempty"` + // Company logo in square shape. + SquareImage *string `json:"square_image,omitempty" url:"square_image,omitempty"` + // The color of this integration used for buttons and text throughout the app and landing pages. Choose a darker, saturated color. + Color *string `json:"color,omitempty" url:"color,omitempty"` + Slug *string `json:"slug,omitempty" url:"slug,omitempty"` + // Mapping of API endpoints to documentation urls for support. Example: {'GET': [['/common-model-scopes', 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], 'POST': []} + ApiEndpointsToDocumentationUrls map[string]interface{} `json:"api_endpoints_to_documentation_urls,omitempty" url:"api_endpoints_to_documentation_urls,omitempty"` + // Setup guide URL for third party webhook creation. Exposed in Merge Docs. + WebhookSetupGuideUrl *string `json:"webhook_setup_guide_url,omitempty" url:"webhook_setup_guide_url,omitempty"` + // Category or categories this integration is in beta status for. + CategoryBetaStatus map[string]interface{} `json:"category_beta_status,omitempty" url:"category_beta_status,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (a *AccountDetails) UnmarshalJSON(data []byte) error { - type unmarshaler AccountDetails - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (a *AccountIntegration) GetName() string { + if a == nil { + return "" } - *a = AccountDetails(value) - a._rawJSON = json.RawMessage(data) - return nil + return a.Name } -func (a *AccountDetails) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(a); err == nil { - return value +func (a *AccountIntegration) GetAbbreviatedName() *string { + if a == nil { + return nil } - return fmt.Sprintf("%#v", a) + return a.AbbreviatedName } -// # The LinkedAccount Object -// -// ### Description -// -// The `LinkedAccount` object is used to represent an end user's link with a specific integration. -// -// ### Usage Example -// -// View a list of your organization's `LinkedAccount` objects. -type AccountDetailsAndActions struct { - Id string `json:"id"` - Category *CategoryEnum `json:"category,omitempty"` - Status AccountDetailsAndActionsStatusEnum `json:"status,omitempty"` - StatusDetail *string `json:"status_detail,omitempty"` - EndUserOriginId *string `json:"end_user_origin_id,omitempty"` - EndUserOrganizationName string `json:"end_user_organization_name"` - EndUserEmailAddress string `json:"end_user_email_address"` - // The tenant or domain the customer has provided access to. - Subdomain *string `json:"subdomain,omitempty"` - WebhookListenerUrl string `json:"webhook_listener_url"` - // 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. - IsDuplicate *bool `json:"is_duplicate,omitempty"` - Integration *AccountDetailsAndActionsIntegration `json:"integration,omitempty"` - AccountType string `json:"account_type"` - CompletedAt time.Time `json:"completed_at"` - - _rawJSON json.RawMessage -} - -func (a *AccountDetailsAndActions) UnmarshalJSON(data []byte) error { - type unmarshaler AccountDetailsAndActions - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (a *AccountIntegration) GetCategories() []CategoriesEnum { + if a == nil { + return nil } - *a = AccountDetailsAndActions(value) - a._rawJSON = json.RawMessage(data) - return nil + return a.Categories } -func (a *AccountDetailsAndActions) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(a); err == nil { - return value +func (a *AccountIntegration) GetImage() *string { + if a == nil { + return nil } - return fmt.Sprintf("%#v", a) + return a.Image } -type AccountDetailsAndActionsIntegration struct { - Name string `json:"name"` - Categories []CategoriesEnum `json:"categories,omitempty"` - Image *string `json:"image,omitempty"` - SquareImage *string `json:"square_image,omitempty"` - Color string `json:"color"` - Slug string `json:"slug"` - PassthroughAvailable bool `json:"passthrough_available"` - AvailableModelOperations []*ModelOperation `json:"available_model_operations,omitempty"` - - _rawJSON json.RawMessage +func (a *AccountIntegration) GetSquareImage() *string { + if a == nil { + return nil + } + return a.SquareImage } -func (a *AccountDetailsAndActionsIntegration) UnmarshalJSON(data []byte) error { - type unmarshaler AccountDetailsAndActionsIntegration - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (a *AccountIntegration) GetColor() *string { + if a == nil { + return nil } - *a = AccountDetailsAndActionsIntegration(value) - a._rawJSON = json.RawMessage(data) - return nil + return a.Color } -func (a *AccountDetailsAndActionsIntegration) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(a); err == nil { - return value +func (a *AccountIntegration) GetSlug() *string { + if a == nil { + return nil } - return fmt.Sprintf("%#v", a) + return a.Slug } -// - `COMPLETE` - COMPLETE -// - `INCOMPLETE` - INCOMPLETE -// - `RELINK_NEEDED` - RELINK_NEEDED -// - `IDLE` - IDLE -type AccountDetailsAndActionsStatusEnum string - -const ( - AccountDetailsAndActionsStatusEnumComplete AccountDetailsAndActionsStatusEnum = "COMPLETE" - AccountDetailsAndActionsStatusEnumIncomplete AccountDetailsAndActionsStatusEnum = "INCOMPLETE" - AccountDetailsAndActionsStatusEnumRelinkNeeded AccountDetailsAndActionsStatusEnum = "RELINK_NEEDED" - AccountDetailsAndActionsStatusEnumIdle AccountDetailsAndActionsStatusEnum = "IDLE" -) - -func NewAccountDetailsAndActionsStatusEnumFromString(s string) (AccountDetailsAndActionsStatusEnum, error) { - switch s { - case "COMPLETE": - return AccountDetailsAndActionsStatusEnumComplete, nil - case "INCOMPLETE": - return AccountDetailsAndActionsStatusEnumIncomplete, nil - case "RELINK_NEEDED": - return AccountDetailsAndActionsStatusEnumRelinkNeeded, nil - case "IDLE": - return AccountDetailsAndActionsStatusEnumIdle, nil - } - var t AccountDetailsAndActionsStatusEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) +func (a *AccountIntegration) GetApiEndpointsToDocumentationUrls() map[string]interface{} { + if a == nil { + return nil + } + return a.ApiEndpointsToDocumentationUrls } -func (a AccountDetailsAndActionsStatusEnum) Ptr() *AccountDetailsAndActionsStatusEnum { - return &a +func (a *AccountIntegration) GetWebhookSetupGuideUrl() *string { + if a == nil { + return nil + } + return a.WebhookSetupGuideUrl } -type AccountIntegration struct { - // Company name. - Name string `json:"name"` - // Optional. This shortened name appears in places with limited space, usually in conjunction with the platform's logo (e.g., Merge Link menu).

Example: Workforce Now (in lieu of ADP Workforce Now), SuccessFactors (in lieu of SAP SuccessFactors) - AbbreviatedName *string `json:"abbreviated_name,omitempty"` - // Category or categories this integration belongs to. Multiple categories should be comma separated, i.e. [ats, hris]. - Categories []CategoriesEnum `json:"categories,omitempty"` - // Company logo in rectangular shape. - Image *string `json:"image,omitempty"` - // Company logo in square shape. - SquareImage *string `json:"square_image,omitempty"` - // The color of this integration used for buttons and text throughout the app and landing pages. Choose a darker, saturated color. - Color *string `json:"color,omitempty"` - Slug *string `json:"slug,omitempty"` - // Mapping of API endpoints to documentation urls for support. Example: {'GET': [['/common-model-scopes', 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], 'POST': []} - ApiEndpointsToDocumentationUrls map[string]interface{} `json:"api_endpoints_to_documentation_urls,omitempty"` - // Setup guide URL for third party webhook creation. Exposed in Merge Docs. - WebhookSetupGuideUrl *string `json:"webhook_setup_guide_url,omitempty"` - // Category or categories this integration is in beta status for. - CategoryBetaStatus map[string]interface{} `json:"category_beta_status,omitempty"` +func (a *AccountIntegration) GetCategoryBetaStatus() map[string]interface{} { + if a == nil { + return nil + } + return a.CategoryBetaStatus +} - _rawJSON json.RawMessage +func (a *AccountIntegration) GetExtraProperties() map[string]interface{} { + return a.extraProperties } func (a *AccountIntegration) UnmarshalJSON(data []byte) error { @@ -1180,1770 +1262,1538 @@ func (a *AccountIntegration) UnmarshalJSON(data []byte) error { return err } *a = AccountIntegration(value) - a._rawJSON = json.RawMessage(data) + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) return nil } func (a *AccountIntegration) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(a); err == nil { + if value, err := internal.StringifyJSON(a); err == nil { return value } return fmt.Sprintf("%#v", a) } -// # The Account Object -// -// ### Description -// -// An `Account` represents a category in a company’s ledger in which a financial transaction is recorded against. The aggregation of each `Account` object is often referred to as the **Chart of Accounts**. -// -// An `Account` can be classified into one of the following categories, determined through the `classification` field: -// -// - **Asset:** Accounts Receivable and Bank Accounts -// - **Liability:** Accounts Payable and Credit Card Accounts -// - **Equity:** Treasury Accounts and Retained Earnings -// - **Revenue:** Income and Other Income -// - **Expense:** Cost of Goods Sold and Office Expenses -// -// ### Usage Example +// The account's status. // -// Fetch from the `LIST Accounts` endpoint and view a company's accounts. -type AccountRequest struct { - // The account's name. - Name *string `json:"name,omitempty"` - // The account's description. - Description *string `json:"description,omitempty"` - // The account's broadest grouping. - // - // - `ASSET` - ASSET - // - `EQUITY` - EQUITY - // - `EXPENSE` - EXPENSE - // - `LIABILITY` - LIABILITY - // - `REVENUE` - REVENUE - Classification *AccountRequestClassification `json:"classification,omitempty"` - // The account's type is a narrower and more specific grouping within the account's classification. - Type *string `json:"type,omitempty"` - // Normalized account type- which is a narrower and more specific grouping within the account's classification. - // - // - `BANK` - BANK - // - `CREDIT_CARD` - CREDIT_CARD - // - `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE - // - `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE - // - `FIXED_ASSET` - FIXED_ASSET - // - `OTHER_ASSET` - OTHER_ASSET - // - `OTHER_CURRENT_ASSET` - OTHER_CURRENT_ASSET - // - `OTHER_EXPENSE` - OTHER_EXPENSE - // - `OTHER_INCOME` - OTHER_INCOME - // - `COST_OF_GOODS_SOLD` - COST_OF_GOODS_SOLD - // - `OTHER_CURRENT_LIABILITY` - OTHER_CURRENT_LIABILITY - // - `LONG_TERM_LIABILITY` - LONG_TERM_LIABILITY - // - `NON_POSTING` - NON_POSTING - AccountType *AccountRequestAccountType `json:"account_type,omitempty"` - // The account's status. - // - // - `ACTIVE` - ACTIVE - // - `PENDING` - PENDING - // - `INACTIVE` - INACTIVE - Status *AccountRequestStatus `json:"status,omitempty"` - // The account's current balance. - CurrentBalance *float64 `json:"current_balance,omitempty"` - // The account's currency. - // - // - `XUA` - ADB Unit of Account - // - `AFN` - Afghan Afghani - // - `AFA` - Afghan Afghani (1927–2002) - // - `ALL` - Albanian Lek - // - `ALK` - Albanian Lek (1946–1965) - // - `DZD` - Algerian Dinar - // - `ADP` - Andorran Peseta - // - `AOA` - Angolan Kwanza - // - `AOK` - Angolan Kwanza (1977–1991) - // - `AON` - Angolan New Kwanza (1990–2000) - // - `AOR` - Angolan Readjusted Kwanza (1995–1999) - // - `ARA` - Argentine Austral - // - `ARS` - Argentine Peso - // - `ARM` - Argentine Peso (1881–1970) - // - `ARP` - Argentine Peso (1983–1985) - // - `ARL` - Argentine Peso Ley (1970–1983) - // - `AMD` - Armenian Dram - // - `AWG` - Aruban Florin - // - `AUD` - Australian Dollar - // - `ATS` - Austrian Schilling - // - `AZN` - Azerbaijani Manat - // - `AZM` - Azerbaijani Manat (1993–2006) - // - `BSD` - Bahamian Dollar - // - `BHD` - Bahraini Dinar - // - `BDT` - Bangladeshi Taka - // - `BBD` - Barbadian Dollar - // - `BYN` - Belarusian Ruble - // - `BYB` - Belarusian Ruble (1994–1999) - // - `BYR` - Belarusian Ruble (2000–2016) - // - `BEF` - Belgian Franc - // - `BEC` - Belgian Franc (convertible) - // - `BEL` - Belgian Franc (financial) - // - `BZD` - Belize Dollar - // - `BMD` - Bermudan Dollar - // - `BTN` - Bhutanese Ngultrum - // - `BOB` - Bolivian Boliviano - // - `BOL` - Bolivian Boliviano (1863–1963) - // - `BOV` - Bolivian Mvdol - // - `BOP` - Bolivian Peso - // - `BAM` - Bosnia-Herzegovina Convertible Mark - // - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - // - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - // - `BWP` - Botswanan Pula - // - `BRC` - Brazilian Cruzado (1986–1989) - // - `BRZ` - Brazilian Cruzeiro (1942–1967) - // - `BRE` - Brazilian Cruzeiro (1990–1993) - // - `BRR` - Brazilian Cruzeiro (1993–1994) - // - `BRN` - Brazilian New Cruzado (1989–1990) - // - `BRB` - Brazilian New Cruzeiro (1967–1986) - // - `BRL` - Brazilian Real - // - `GBP` - British Pound - // - `BND` - Brunei Dollar - // - `BGL` - Bulgarian Hard Lev - // - `BGN` - Bulgarian Lev - // - `BGO` - Bulgarian Lev (1879–1952) - // - `BGM` - Bulgarian Socialist Lev - // - `BUK` - Burmese Kyat - // - `BIF` - Burundian Franc - // - `XPF` - CFP Franc - // - `KHR` - Cambodian Riel - // - `CAD` - Canadian Dollar - // - `CVE` - Cape Verdean Escudo - // - `KYD` - Cayman Islands Dollar - // - `XAF` - Central African CFA Franc - // - `CLE` - Chilean Escudo - // - `CLP` - Chilean Peso - // - `CLF` - Chilean Unit of Account (UF) - // - `CNX` - Chinese People’s Bank Dollar - // - `CNY` - Chinese Yuan - // - `CNH` - Chinese Yuan (offshore) - // - `COP` - Colombian Peso - // - `COU` - Colombian Real Value Unit - // - `KMF` - Comorian Franc - // - `CDF` - Congolese Franc - // - `CRC` - Costa Rican Colón - // - `HRD` - Croatian Dinar - // - `HRK` - Croatian Kuna - // - `CUC` - Cuban Convertible Peso - // - `CUP` - Cuban Peso - // - `CYP` - Cypriot Pound - // - `CZK` - Czech Koruna - // - `CSK` - Czechoslovak Hard Koruna - // - `DKK` - Danish Krone - // - `DJF` - Djiboutian Franc - // - `DOP` - Dominican Peso - // - `NLG` - Dutch Guilder - // - `XCD` - East Caribbean Dollar - // - `DDM` - East German Mark - // - `ECS` - Ecuadorian Sucre - // - `ECV` - Ecuadorian Unit of Constant Value - // - `EGP` - Egyptian Pound - // - `GQE` - Equatorial Guinean Ekwele - // - `ERN` - Eritrean Nakfa - // - `EEK` - Estonian Kroon - // - `ETB` - Ethiopian Birr - // - `EUR` - Euro - // - `XBA` - European Composite Unit - // - `XEU` - European Currency Unit - // - `XBB` - European Monetary Unit - // - `XBC` - European Unit of Account (XBC) - // - `XBD` - European Unit of Account (XBD) - // - `FKP` - Falkland Islands Pound - // - `FJD` - Fijian Dollar - // - `FIM` - Finnish Markka - // - `FRF` - French Franc - // - `XFO` - French Gold Franc - // - `XFU` - French UIC-Franc - // - `GMD` - Gambian Dalasi - // - `GEK` - Georgian Kupon Larit - // - `GEL` - Georgian Lari - // - `DEM` - German Mark - // - `GHS` - Ghanaian Cedi - // - `GHC` - Ghanaian Cedi (1979–2007) - // - `GIP` - Gibraltar Pound - // - `XAU` - Gold - // - `GRD` - Greek Drachma - // - `GTQ` - Guatemalan Quetzal - // - `GWP` - Guinea-Bissau Peso - // - `GNF` - Guinean Franc - // - `GNS` - Guinean Syli - // - `GYD` - Guyanaese Dollar - // - `HTG` - Haitian Gourde - // - `HNL` - Honduran Lempira - // - `HKD` - Hong Kong Dollar - // - `HUF` - Hungarian Forint - // - `IMP` - IMP - // - `ISK` - Icelandic Króna - // - `ISJ` - Icelandic Króna (1918–1981) - // - `INR` - Indian Rupee - // - `IDR` - Indonesian Rupiah - // - `IRR` - Iranian Rial - // - `IQD` - Iraqi Dinar - // - `IEP` - Irish Pound - // - `ILS` - Israeli New Shekel - // - `ILP` - Israeli Pound - // - `ILR` - Israeli Shekel (1980–1985) - // - `ITL` - Italian Lira - // - `JMD` - Jamaican Dollar - // - `JPY` - Japanese Yen - // - `JOD` - Jordanian Dinar - // - `KZT` - Kazakhstani Tenge - // - `KES` - Kenyan Shilling - // - `KWD` - Kuwaiti Dinar - // - `KGS` - Kyrgystani Som - // - `LAK` - Laotian Kip - // - `LVL` - Latvian Lats - // - `LVR` - Latvian Ruble - // - `LBP` - Lebanese Pound - // - `LSL` - Lesotho Loti - // - `LRD` - Liberian Dollar - // - `LYD` - Libyan Dinar - // - `LTL` - Lithuanian Litas - // - `LTT` - Lithuanian Talonas - // - `LUL` - Luxembourg Financial Franc - // - `LUC` - Luxembourgian Convertible Franc - // - `LUF` - Luxembourgian Franc - // - `MOP` - Macanese Pataca - // - `MKD` - Macedonian Denar - // - `MKN` - Macedonian Denar (1992–1993) - // - `MGA` - Malagasy Ariary - // - `MGF` - Malagasy Franc - // - `MWK` - Malawian Kwacha - // - `MYR` - Malaysian Ringgit - // - `MVR` - Maldivian Rufiyaa - // - `MVP` - Maldivian Rupee (1947–1981) - // - `MLF` - Malian Franc - // - `MTL` - Maltese Lira - // - `MTP` - Maltese Pound - // - `MRU` - Mauritanian Ouguiya - // - `MRO` - Mauritanian Ouguiya (1973–2017) - // - `MUR` - Mauritian Rupee - // - `MXV` - Mexican Investment Unit - // - `MXN` - Mexican Peso - // - `MXP` - Mexican Silver Peso (1861–1992) - // - `MDC` - Moldovan Cupon - // - `MDL` - Moldovan Leu - // - `MCF` - Monegasque Franc - // - `MNT` - Mongolian Tugrik - // - `MAD` - Moroccan Dirham - // - `MAF` - Moroccan Franc - // - `MZE` - Mozambican Escudo - // - `MZN` - Mozambican Metical - // - `MZM` - Mozambican Metical (1980–2006) - // - `MMK` - Myanmar Kyat - // - `NAD` - Namibian Dollar - // - `NPR` - Nepalese Rupee - // - `ANG` - Netherlands Antillean Guilder - // - `TWD` - New Taiwan Dollar - // - `NZD` - New Zealand Dollar - // - `NIO` - Nicaraguan Córdoba - // - `NIC` - Nicaraguan Córdoba (1988–1991) - // - `NGN` - Nigerian Naira - // - `KPW` - North Korean Won - // - `NOK` - Norwegian Krone - // - `OMR` - Omani Rial - // - `PKR` - Pakistani Rupee - // - `XPD` - Palladium - // - `PAB` - Panamanian Balboa - // - `PGK` - Papua New Guinean Kina - // - `PYG` - Paraguayan Guarani - // - `PEI` - Peruvian Inti - // - `PEN` - Peruvian Sol - // - `PES` - Peruvian Sol (1863–1965) - // - `PHP` - Philippine Peso - // - `XPT` - Platinum - // - `PLN` - Polish Zloty - // - `PLZ` - Polish Zloty (1950–1995) - // - `PTE` - Portuguese Escudo - // - `GWE` - Portuguese Guinea Escudo - // - `QAR` - Qatari Rial - // - `XRE` - RINET Funds - // - `RHD` - Rhodesian Dollar - // - `RON` - Romanian Leu - // - `ROL` - Romanian Leu (1952–2006) - // - `RUB` - Russian Ruble - // - `RUR` - Russian Ruble (1991–1998) - // - `RWF` - Rwandan Franc - // - `SVC` - Salvadoran Colón - // - `WST` - Samoan Tala - // - `SAR` - Saudi Riyal - // - `RSD` - Serbian Dinar - // - `CSD` - Serbian Dinar (2002–2006) - // - `SCR` - Seychellois Rupee - // - `SLL` - Sierra Leonean Leone - // - `XAG` - Silver - // - `SGD` - Singapore Dollar - // - `SKK` - Slovak Koruna - // - `SIT` - Slovenian Tolar - // - `SBD` - Solomon Islands Dollar - // - `SOS` - Somali Shilling - // - `ZAR` - South African Rand - // - `ZAL` - South African Rand (financial) - // - `KRH` - South Korean Hwan (1953–1962) - // - `KRW` - South Korean Won - // - `KRO` - South Korean Won (1945–1953) - // - `SSP` - South Sudanese Pound - // - `SUR` - Soviet Rouble - // - `ESP` - Spanish Peseta - // - `ESA` - Spanish Peseta (A account) - // - `ESB` - Spanish Peseta (convertible account) - // - `XDR` - Special Drawing Rights - // - `LKR` - Sri Lankan Rupee - // - `SHP` - St. Helena Pound - // - `XSU` - Sucre - // - `SDD` - Sudanese Dinar (1992–2007) - // - `SDG` - Sudanese Pound - // - `SDP` - Sudanese Pound (1957–1998) - // - `SRD` - Surinamese Dollar - // - `SRG` - Surinamese Guilder - // - `SZL` - Swazi Lilangeni - // - `SEK` - Swedish Krona - // - `CHF` - Swiss Franc - // - `SYP` - Syrian Pound - // - `STN` - São Tomé & Príncipe Dobra - // - `STD` - São Tomé & Príncipe Dobra (1977–2017) - // - `TVD` - TVD - // - `TJR` - Tajikistani Ruble - // - `TJS` - Tajikistani Somoni - // - `TZS` - Tanzanian Shilling - // - `XTS` - Testing Currency Code - // - `THB` - Thai Baht - // - `XXX` - The codes assigned for transactions where no currency is involved - // - `TPE` - Timorese Escudo - // - `TOP` - Tongan Paʻanga - // - `TTD` - Trinidad & Tobago Dollar - // - `TND` - Tunisian Dinar - // - `TRY` - Turkish Lira - // - `TRL` - Turkish Lira (1922–2005) - // - `TMT` - Turkmenistani Manat - // - `TMM` - Turkmenistani Manat (1993–2009) - // - `USD` - US Dollar - // - `USN` - US Dollar (Next day) - // - `USS` - US Dollar (Same day) - // - `UGX` - Ugandan Shilling - // - `UGS` - Ugandan Shilling (1966–1987) - // - `UAH` - Ukrainian Hryvnia - // - `UAK` - Ukrainian Karbovanets - // - `AED` - United Arab Emirates Dirham - // - `UYW` - Uruguayan Nominal Wage Index Unit - // - `UYU` - Uruguayan Peso - // - `UYP` - Uruguayan Peso (1975–1993) - // - `UYI` - Uruguayan Peso (Indexed Units) - // - `UZS` - Uzbekistani Som - // - `VUV` - Vanuatu Vatu - // - `VES` - Venezuelan Bolívar - // - `VEB` - Venezuelan Bolívar (1871–2008) - // - `VEF` - Venezuelan Bolívar (2008–2018) - // - `VND` - Vietnamese Dong - // - `VNN` - Vietnamese Dong (1978–1985) - // - `CHE` - WIR Euro - // - `CHW` - WIR Franc - // - `XOF` - West African CFA Franc - // - `YDD` - Yemeni Dinar - // - `YER` - Yemeni Rial - // - `YUN` - Yugoslavian Convertible Dinar (1990–1992) - // - `YUD` - Yugoslavian Hard Dinar (1966–1990) - // - `YUM` - Yugoslavian New Dinar (1994–2002) - // - `YUR` - Yugoslavian Reformed Dinar (1992–1993) - // - `ZWN` - ZWN - // - `ZRN` - Zairean New Zaire (1993–1998) - // - `ZRZ` - Zairean Zaire (1971–1993) - // - `ZMW` - Zambian Kwacha - // - `ZMK` - Zambian Kwacha (1968–2012) - // - `ZWD` - Zimbabwean Dollar (1980–2008) - // - `ZWR` - Zimbabwean Dollar (2008) - // - `ZWL` - Zimbabwean Dollar (2009) - Currency *AccountRequestCurrency `json:"currency,omitempty"` - // The account's number. - AccountNumber *string `json:"account_number,omitempty"` - // ID of the parent account. - ParentAccount *string `json:"parent_account,omitempty"` - // The company the account belongs to. - Company *string `json:"company,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` +// * `ACTIVE` - ACTIVE +// * `PENDING` - PENDING +// * `INACTIVE` - INACTIVE +type AccountStatus struct { + AccountStatusEnum AccountStatusEnum + String string - _rawJSON json.RawMessage + typ string } -func (a *AccountRequest) UnmarshalJSON(data []byte) error { - type unmarshaler AccountRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (a *AccountStatus) GetAccountStatusEnum() AccountStatusEnum { + if a == nil { + return "" } - *a = AccountRequest(value) - a._rawJSON = json.RawMessage(data) - return nil + return a.AccountStatusEnum } -func (a *AccountRequest) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(a); err == nil { - return value +func (a *AccountStatus) GetString() string { + if a == nil { + return "" } - return fmt.Sprintf("%#v", a) + return a.String } -// Normalized account type- which is a narrower and more specific grouping within the account's classification. -// -// - `BANK` - BANK -// - `CREDIT_CARD` - CREDIT_CARD -// - `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE -// - `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE -// - `FIXED_ASSET` - FIXED_ASSET -// - `OTHER_ASSET` - OTHER_ASSET -// - `OTHER_CURRENT_ASSET` - OTHER_CURRENT_ASSET -// - `OTHER_EXPENSE` - OTHER_EXPENSE -// - `OTHER_INCOME` - OTHER_INCOME -// - `COST_OF_GOODS_SOLD` - COST_OF_GOODS_SOLD -// - `OTHER_CURRENT_LIABILITY` - OTHER_CURRENT_LIABILITY -// - `LONG_TERM_LIABILITY` - LONG_TERM_LIABILITY -// - `NON_POSTING` - NON_POSTING -type AccountRequestAccountType struct { - typeName string - AccountAccountTypeEnum AccountAccountTypeEnum - String string -} - -func NewAccountRequestAccountTypeFromAccountAccountTypeEnum(value AccountAccountTypeEnum) *AccountRequestAccountType { - return &AccountRequestAccountType{typeName: "accountAccountTypeEnum", AccountAccountTypeEnum: value} -} - -func NewAccountRequestAccountTypeFromString(value string) *AccountRequestAccountType { - return &AccountRequestAccountType{typeName: "string", String: value} -} - -func (a *AccountRequestAccountType) UnmarshalJSON(data []byte) error { - var valueAccountAccountTypeEnum AccountAccountTypeEnum - if err := json.Unmarshal(data, &valueAccountAccountTypeEnum); err == nil { - a.typeName = "accountAccountTypeEnum" - a.AccountAccountTypeEnum = valueAccountAccountTypeEnum +func (a *AccountStatus) UnmarshalJSON(data []byte) error { + var valueAccountStatusEnum AccountStatusEnum + if err := json.Unmarshal(data, &valueAccountStatusEnum); err == nil { + a.typ = "AccountStatusEnum" + a.AccountStatusEnum = valueAccountStatusEnum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" + a.typ = "String" a.String = valueString return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, a) } -func (a AccountRequestAccountType) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "accountAccountTypeEnum": - return json.Marshal(a.AccountAccountTypeEnum) - case "string": +func (a AccountStatus) MarshalJSON() ([]byte, error) { + if a.typ == "AccountStatusEnum" || a.AccountStatusEnum != "" { + return json.Marshal(a.AccountStatusEnum) + } + if a.typ == "String" || a.String != "" { return json.Marshal(a.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) } -type AccountRequestAccountTypeVisitor interface { - VisitAccountAccountTypeEnum(AccountAccountTypeEnum) error +type AccountStatusVisitor interface { + VisitAccountStatusEnum(AccountStatusEnum) error VisitString(string) error } -func (a *AccountRequestAccountType) Accept(visitor AccountRequestAccountTypeVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "accountAccountTypeEnum": - return visitor.VisitAccountAccountTypeEnum(a.AccountAccountTypeEnum) - case "string": +func (a *AccountStatus) Accept(visitor AccountStatusVisitor) error { + if a.typ == "AccountStatusEnum" || a.AccountStatusEnum != "" { + return visitor.VisitAccountStatusEnum(a.AccountStatusEnum) + } + if a.typ == "String" || a.String != "" { return visitor.VisitString(a.String) } + return fmt.Errorf("type %T does not include a non-empty union type", a) } -// The account's broadest grouping. -// -// - `ASSET` - ASSET -// - `EQUITY` - EQUITY -// - `EXPENSE` - EXPENSE -// - `LIABILITY` - LIABILITY -// - `REVENUE` - REVENUE -type AccountRequestClassification struct { - typeName string - ClassificationEnum ClassificationEnum - String string +// * `ACTIVE` - ACTIVE +// * `PENDING` - PENDING +// * `INACTIVE` - INACTIVE +type AccountStatusEnum string + +const ( + AccountStatusEnumActive AccountStatusEnum = "ACTIVE" + AccountStatusEnumPending AccountStatusEnum = "PENDING" + AccountStatusEnumInactive AccountStatusEnum = "INACTIVE" +) + +func NewAccountStatusEnumFromString(s string) (AccountStatusEnum, error) { + switch s { + case "ACTIVE": + return AccountStatusEnumActive, nil + case "PENDING": + return AccountStatusEnumPending, nil + case "INACTIVE": + return AccountStatusEnumInactive, nil + } + var t AccountStatusEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -func NewAccountRequestClassificationFromClassificationEnum(value ClassificationEnum) *AccountRequestClassification { - return &AccountRequestClassification{typeName: "classificationEnum", ClassificationEnum: value} +func (a AccountStatusEnum) Ptr() *AccountStatusEnum { + return &a } -func NewAccountRequestClassificationFromString(value string) *AccountRequestClassification { - return &AccountRequestClassification{typeName: "string", String: value} +// # The AccountingPeriod Object +// ### Description +// The `AccountingPeriod` object is used to define a period of time in which events occurred. +// +// ### Usage Example +// Common models like `Invoice` and `Transaction` will have `AccountingPeriod` objects which will denote when they occurred. +type AccountingPeriod struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // Name of the accounting period. + Name *string `json:"name,omitempty" url:"name,omitempty"` + Status *AccountingPeriodStatus `json:"status,omitempty" url:"status,omitempty"` + // Beginning date of the period + StartDate *time.Time `json:"start_date,omitempty" url:"start_date,omitempty"` + // End date of the period + EndDate *time.Time `json:"end_date,omitempty" url:"end_date,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (a *AccountRequestClassification) UnmarshalJSON(data []byte) error { - var valueClassificationEnum ClassificationEnum - if err := json.Unmarshal(data, &valueClassificationEnum); err == nil { - a.typeName = "classificationEnum" - a.ClassificationEnum = valueClassificationEnum +func (a *AccountingPeriod) GetId() *string { + if a == nil { return nil } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" - a.String = valueString + return a.Id +} + +func (a *AccountingPeriod) GetRemoteId() *string { + if a == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, a) + return a.RemoteId } -func (a AccountRequestClassification) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "classificationEnum": - return json.Marshal(a.ClassificationEnum) - case "string": - return json.Marshal(a.String) +func (a *AccountingPeriod) GetCreatedAt() *time.Time { + if a == nil { + return nil } + return a.CreatedAt } -type AccountRequestClassificationVisitor interface { - VisitClassificationEnum(ClassificationEnum) error - VisitString(string) error +func (a *AccountingPeriod) GetModifiedAt() *time.Time { + if a == nil { + return nil + } + return a.ModifiedAt } -func (a *AccountRequestClassification) Accept(visitor AccountRequestClassificationVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "classificationEnum": - return visitor.VisitClassificationEnum(a.ClassificationEnum) - case "string": - return visitor.VisitString(a.String) +func (a *AccountingPeriod) GetName() *string { + if a == nil { + return nil } + return a.Name } -// The account's currency. -// -// - `XUA` - ADB Unit of Account -// - `AFN` - Afghan Afghani -// - `AFA` - Afghan Afghani (1927–2002) -// - `ALL` - Albanian Lek -// - `ALK` - Albanian Lek (1946–1965) -// - `DZD` - Algerian Dinar -// - `ADP` - Andorran Peseta -// - `AOA` - Angolan Kwanza -// - `AOK` - Angolan Kwanza (1977–1991) -// - `AON` - Angolan New Kwanza (1990–2000) -// - `AOR` - Angolan Readjusted Kwanza (1995–1999) -// - `ARA` - Argentine Austral -// - `ARS` - Argentine Peso -// - `ARM` - Argentine Peso (1881–1970) -// - `ARP` - Argentine Peso (1983–1985) -// - `ARL` - Argentine Peso Ley (1970–1983) -// - `AMD` - Armenian Dram -// - `AWG` - Aruban Florin -// - `AUD` - Australian Dollar -// - `ATS` - Austrian Schilling -// - `AZN` - Azerbaijani Manat -// - `AZM` - Azerbaijani Manat (1993–2006) -// - `BSD` - Bahamian Dollar -// - `BHD` - Bahraini Dinar -// - `BDT` - Bangladeshi Taka -// - `BBD` - Barbadian Dollar -// - `BYN` - Belarusian Ruble -// - `BYB` - Belarusian Ruble (1994–1999) -// - `BYR` - Belarusian Ruble (2000–2016) -// - `BEF` - Belgian Franc -// - `BEC` - Belgian Franc (convertible) -// - `BEL` - Belgian Franc (financial) -// - `BZD` - Belize Dollar -// - `BMD` - Bermudan Dollar -// - `BTN` - Bhutanese Ngultrum -// - `BOB` - Bolivian Boliviano -// - `BOL` - Bolivian Boliviano (1863–1963) -// - `BOV` - Bolivian Mvdol -// - `BOP` - Bolivian Peso -// - `BAM` - Bosnia-Herzegovina Convertible Mark -// - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) -// - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) -// - `BWP` - Botswanan Pula -// - `BRC` - Brazilian Cruzado (1986–1989) -// - `BRZ` - Brazilian Cruzeiro (1942–1967) -// - `BRE` - Brazilian Cruzeiro (1990–1993) -// - `BRR` - Brazilian Cruzeiro (1993–1994) -// - `BRN` - Brazilian New Cruzado (1989–1990) -// - `BRB` - Brazilian New Cruzeiro (1967–1986) -// - `BRL` - Brazilian Real -// - `GBP` - British Pound -// - `BND` - Brunei Dollar -// - `BGL` - Bulgarian Hard Lev -// - `BGN` - Bulgarian Lev -// - `BGO` - Bulgarian Lev (1879–1952) -// - `BGM` - Bulgarian Socialist Lev -// - `BUK` - Burmese Kyat -// - `BIF` - Burundian Franc -// - `XPF` - CFP Franc -// - `KHR` - Cambodian Riel -// - `CAD` - Canadian Dollar -// - `CVE` - Cape Verdean Escudo -// - `KYD` - Cayman Islands Dollar -// - `XAF` - Central African CFA Franc -// - `CLE` - Chilean Escudo -// - `CLP` - Chilean Peso -// - `CLF` - Chilean Unit of Account (UF) -// - `CNX` - Chinese People’s Bank Dollar -// - `CNY` - Chinese Yuan -// - `CNH` - Chinese Yuan (offshore) -// - `COP` - Colombian Peso -// - `COU` - Colombian Real Value Unit -// - `KMF` - Comorian Franc -// - `CDF` - Congolese Franc -// - `CRC` - Costa Rican Colón -// - `HRD` - Croatian Dinar -// - `HRK` - Croatian Kuna -// - `CUC` - Cuban Convertible Peso -// - `CUP` - Cuban Peso -// - `CYP` - Cypriot Pound -// - `CZK` - Czech Koruna -// - `CSK` - Czechoslovak Hard Koruna -// - `DKK` - Danish Krone -// - `DJF` - Djiboutian Franc -// - `DOP` - Dominican Peso -// - `NLG` - Dutch Guilder -// - `XCD` - East Caribbean Dollar -// - `DDM` - East German Mark -// - `ECS` - Ecuadorian Sucre -// - `ECV` - Ecuadorian Unit of Constant Value -// - `EGP` - Egyptian Pound -// - `GQE` - Equatorial Guinean Ekwele -// - `ERN` - Eritrean Nakfa -// - `EEK` - Estonian Kroon -// - `ETB` - Ethiopian Birr -// - `EUR` - Euro -// - `XBA` - European Composite Unit -// - `XEU` - European Currency Unit -// - `XBB` - European Monetary Unit -// - `XBC` - European Unit of Account (XBC) -// - `XBD` - European Unit of Account (XBD) -// - `FKP` - Falkland Islands Pound -// - `FJD` - Fijian Dollar -// - `FIM` - Finnish Markka -// - `FRF` - French Franc -// - `XFO` - French Gold Franc -// - `XFU` - French UIC-Franc -// - `GMD` - Gambian Dalasi -// - `GEK` - Georgian Kupon Larit -// - `GEL` - Georgian Lari -// - `DEM` - German Mark -// - `GHS` - Ghanaian Cedi -// - `GHC` - Ghanaian Cedi (1979–2007) -// - `GIP` - Gibraltar Pound -// - `XAU` - Gold -// - `GRD` - Greek Drachma -// - `GTQ` - Guatemalan Quetzal -// - `GWP` - Guinea-Bissau Peso -// - `GNF` - Guinean Franc -// - `GNS` - Guinean Syli -// - `GYD` - Guyanaese Dollar -// - `HTG` - Haitian Gourde -// - `HNL` - Honduran Lempira -// - `HKD` - Hong Kong Dollar -// - `HUF` - Hungarian Forint -// - `IMP` - IMP -// - `ISK` - Icelandic Króna -// - `ISJ` - Icelandic Króna (1918–1981) -// - `INR` - Indian Rupee -// - `IDR` - Indonesian Rupiah -// - `IRR` - Iranian Rial -// - `IQD` - Iraqi Dinar -// - `IEP` - Irish Pound -// - `ILS` - Israeli New Shekel -// - `ILP` - Israeli Pound -// - `ILR` - Israeli Shekel (1980–1985) -// - `ITL` - Italian Lira -// - `JMD` - Jamaican Dollar -// - `JPY` - Japanese Yen -// - `JOD` - Jordanian Dinar -// - `KZT` - Kazakhstani Tenge -// - `KES` - Kenyan Shilling -// - `KWD` - Kuwaiti Dinar -// - `KGS` - Kyrgystani Som -// - `LAK` - Laotian Kip -// - `LVL` - Latvian Lats -// - `LVR` - Latvian Ruble -// - `LBP` - Lebanese Pound -// - `LSL` - Lesotho Loti -// - `LRD` - Liberian Dollar -// - `LYD` - Libyan Dinar -// - `LTL` - Lithuanian Litas -// - `LTT` - Lithuanian Talonas -// - `LUL` - Luxembourg Financial Franc -// - `LUC` - Luxembourgian Convertible Franc -// - `LUF` - Luxembourgian Franc -// - `MOP` - Macanese Pataca -// - `MKD` - Macedonian Denar -// - `MKN` - Macedonian Denar (1992–1993) -// - `MGA` - Malagasy Ariary -// - `MGF` - Malagasy Franc -// - `MWK` - Malawian Kwacha -// - `MYR` - Malaysian Ringgit -// - `MVR` - Maldivian Rufiyaa -// - `MVP` - Maldivian Rupee (1947–1981) -// - `MLF` - Malian Franc -// - `MTL` - Maltese Lira -// - `MTP` - Maltese Pound -// - `MRU` - Mauritanian Ouguiya -// - `MRO` - Mauritanian Ouguiya (1973–2017) -// - `MUR` - Mauritian Rupee -// - `MXV` - Mexican Investment Unit -// - `MXN` - Mexican Peso -// - `MXP` - Mexican Silver Peso (1861–1992) -// - `MDC` - Moldovan Cupon -// - `MDL` - Moldovan Leu -// - `MCF` - Monegasque Franc -// - `MNT` - Mongolian Tugrik -// - `MAD` - Moroccan Dirham -// - `MAF` - Moroccan Franc -// - `MZE` - Mozambican Escudo -// - `MZN` - Mozambican Metical -// - `MZM` - Mozambican Metical (1980–2006) -// - `MMK` - Myanmar Kyat -// - `NAD` - Namibian Dollar -// - `NPR` - Nepalese Rupee -// - `ANG` - Netherlands Antillean Guilder -// - `TWD` - New Taiwan Dollar -// - `NZD` - New Zealand Dollar -// - `NIO` - Nicaraguan Córdoba -// - `NIC` - Nicaraguan Córdoba (1988–1991) -// - `NGN` - Nigerian Naira -// - `KPW` - North Korean Won -// - `NOK` - Norwegian Krone -// - `OMR` - Omani Rial -// - `PKR` - Pakistani Rupee -// - `XPD` - Palladium -// - `PAB` - Panamanian Balboa -// - `PGK` - Papua New Guinean Kina -// - `PYG` - Paraguayan Guarani -// - `PEI` - Peruvian Inti -// - `PEN` - Peruvian Sol -// - `PES` - Peruvian Sol (1863–1965) -// - `PHP` - Philippine Peso -// - `XPT` - Platinum -// - `PLN` - Polish Zloty -// - `PLZ` - Polish Zloty (1950–1995) -// - `PTE` - Portuguese Escudo -// - `GWE` - Portuguese Guinea Escudo -// - `QAR` - Qatari Rial -// - `XRE` - RINET Funds -// - `RHD` - Rhodesian Dollar -// - `RON` - Romanian Leu -// - `ROL` - Romanian Leu (1952–2006) -// - `RUB` - Russian Ruble -// - `RUR` - Russian Ruble (1991–1998) -// - `RWF` - Rwandan Franc -// - `SVC` - Salvadoran Colón -// - `WST` - Samoan Tala -// - `SAR` - Saudi Riyal -// - `RSD` - Serbian Dinar -// - `CSD` - Serbian Dinar (2002–2006) -// - `SCR` - Seychellois Rupee -// - `SLL` - Sierra Leonean Leone -// - `XAG` - Silver -// - `SGD` - Singapore Dollar -// - `SKK` - Slovak Koruna -// - `SIT` - Slovenian Tolar -// - `SBD` - Solomon Islands Dollar -// - `SOS` - Somali Shilling -// - `ZAR` - South African Rand -// - `ZAL` - South African Rand (financial) -// - `KRH` - South Korean Hwan (1953–1962) -// - `KRW` - South Korean Won -// - `KRO` - South Korean Won (1945–1953) -// - `SSP` - South Sudanese Pound -// - `SUR` - Soviet Rouble -// - `ESP` - Spanish Peseta -// - `ESA` - Spanish Peseta (A account) -// - `ESB` - Spanish Peseta (convertible account) -// - `XDR` - Special Drawing Rights -// - `LKR` - Sri Lankan Rupee -// - `SHP` - St. Helena Pound -// - `XSU` - Sucre -// - `SDD` - Sudanese Dinar (1992–2007) -// - `SDG` - Sudanese Pound -// - `SDP` - Sudanese Pound (1957–1998) -// - `SRD` - Surinamese Dollar -// - `SRG` - Surinamese Guilder -// - `SZL` - Swazi Lilangeni -// - `SEK` - Swedish Krona -// - `CHF` - Swiss Franc -// - `SYP` - Syrian Pound -// - `STN` - São Tomé & Príncipe Dobra -// - `STD` - São Tomé & Príncipe Dobra (1977–2017) -// - `TVD` - TVD -// - `TJR` - Tajikistani Ruble -// - `TJS` - Tajikistani Somoni -// - `TZS` - Tanzanian Shilling -// - `XTS` - Testing Currency Code -// - `THB` - Thai Baht -// - `XXX` - The codes assigned for transactions where no currency is involved -// - `TPE` - Timorese Escudo -// - `TOP` - Tongan Paʻanga -// - `TTD` - Trinidad & Tobago Dollar -// - `TND` - Tunisian Dinar -// - `TRY` - Turkish Lira -// - `TRL` - Turkish Lira (1922–2005) -// - `TMT` - Turkmenistani Manat -// - `TMM` - Turkmenistani Manat (1993–2009) -// - `USD` - US Dollar -// - `USN` - US Dollar (Next day) -// - `USS` - US Dollar (Same day) -// - `UGX` - Ugandan Shilling -// - `UGS` - Ugandan Shilling (1966–1987) -// - `UAH` - Ukrainian Hryvnia -// - `UAK` - Ukrainian Karbovanets -// - `AED` - United Arab Emirates Dirham -// - `UYW` - Uruguayan Nominal Wage Index Unit -// - `UYU` - Uruguayan Peso -// - `UYP` - Uruguayan Peso (1975–1993) -// - `UYI` - Uruguayan Peso (Indexed Units) -// - `UZS` - Uzbekistani Som -// - `VUV` - Vanuatu Vatu -// - `VES` - Venezuelan Bolívar -// - `VEB` - Venezuelan Bolívar (1871–2008) -// - `VEF` - Venezuelan Bolívar (2008–2018) -// - `VND` - Vietnamese Dong -// - `VNN` - Vietnamese Dong (1978–1985) -// - `CHE` - WIR Euro -// - `CHW` - WIR Franc -// - `XOF` - West African CFA Franc -// - `YDD` - Yemeni Dinar -// - `YER` - Yemeni Rial -// - `YUN` - Yugoslavian Convertible Dinar (1990–1992) -// - `YUD` - Yugoslavian Hard Dinar (1966–1990) -// - `YUM` - Yugoslavian New Dinar (1994–2002) -// - `YUR` - Yugoslavian Reformed Dinar (1992–1993) -// - `ZWN` - ZWN -// - `ZRN` - Zairean New Zaire (1993–1998) -// - `ZRZ` - Zairean Zaire (1971–1993) -// - `ZMW` - Zambian Kwacha -// - `ZMK` - Zambian Kwacha (1968–2012) -// - `ZWD` - Zimbabwean Dollar (1980–2008) -// - `ZWR` - Zimbabwean Dollar (2008) -// - `ZWL` - Zimbabwean Dollar (2009) -type AccountRequestCurrency struct { - typeName string - TransactionCurrencyEnum TransactionCurrencyEnum - String string +func (a *AccountingPeriod) GetStatus() *AccountingPeriodStatus { + if a == nil { + return nil + } + return a.Status } -func NewAccountRequestCurrencyFromTransactionCurrencyEnum(value TransactionCurrencyEnum) *AccountRequestCurrency { - return &AccountRequestCurrency{typeName: "transactionCurrencyEnum", TransactionCurrencyEnum: value} +func (a *AccountingPeriod) GetStartDate() *time.Time { + if a == nil { + return nil + } + return a.StartDate } -func NewAccountRequestCurrencyFromString(value string) *AccountRequestCurrency { - return &AccountRequestCurrency{typeName: "string", String: value} +func (a *AccountingPeriod) GetEndDate() *time.Time { + if a == nil { + return nil + } + return a.EndDate } -func (a *AccountRequestCurrency) UnmarshalJSON(data []byte) error { - var valueTransactionCurrencyEnum TransactionCurrencyEnum - if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { - a.typeName = "transactionCurrencyEnum" - a.TransactionCurrencyEnum = valueTransactionCurrencyEnum +func (a *AccountingPeriod) GetFieldMappings() map[string]interface{} { + if a == nil { return nil } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" - a.String = valueString + return a.FieldMappings +} + +func (a *AccountingPeriod) GetRemoteData() []*RemoteData { + if a == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, a) + return a.RemoteData } -func (a AccountRequestCurrency) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "transactionCurrencyEnum": - return json.Marshal(a.TransactionCurrencyEnum) - case "string": - return json.Marshal(a.String) +func (a *AccountingPeriod) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AccountingPeriod) UnmarshalJSON(data []byte) error { + type embed AccountingPeriod + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + StartDate *internal.DateTime `json:"start_date,omitempty"` + EndDate *internal.DateTime `json:"end_date,omitempty"` + }{ + embed: embed(*a), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err } + *a = AccountingPeriod(unmarshaler.embed) + a.CreatedAt = unmarshaler.CreatedAt.TimePtr() + a.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + a.StartDate = unmarshaler.StartDate.TimePtr() + a.EndDate = unmarshaler.EndDate.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil } -type AccountRequestCurrencyVisitor interface { - VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error - VisitString(string) error +func (a *AccountingPeriod) MarshalJSON() ([]byte, error) { + type embed AccountingPeriod + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + StartDate *internal.DateTime `json:"start_date,omitempty"` + EndDate *internal.DateTime `json:"end_date,omitempty"` + }{ + embed: embed(*a), + CreatedAt: internal.NewOptionalDateTime(a.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(a.ModifiedAt), + StartDate: internal.NewOptionalDateTime(a.StartDate), + EndDate: internal.NewOptionalDateTime(a.EndDate), + } + return json.Marshal(marshaler) } -func (a *AccountRequestCurrency) Accept(visitor AccountRequestCurrencyVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "transactionCurrencyEnum": - return visitor.VisitTransactionCurrencyEnum(a.TransactionCurrencyEnum) - case "string": - return visitor.VisitString(a.String) +func (a *AccountingPeriod) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) } -// The account's status. -// -// - `ACTIVE` - ACTIVE -// - `PENDING` - PENDING -// - `INACTIVE` - INACTIVE -type AccountRequestStatus struct { - typeName string - AccountStatusEnum AccountStatusEnum - String string +type AccountingPeriodStatus struct { + Status895Enum Status895Enum + String string + + typ string } -func NewAccountRequestStatusFromAccountStatusEnum(value AccountStatusEnum) *AccountRequestStatus { - return &AccountRequestStatus{typeName: "accountStatusEnum", AccountStatusEnum: value} +func (a *AccountingPeriodStatus) GetStatus895Enum() Status895Enum { + if a == nil { + return "" + } + return a.Status895Enum } -func NewAccountRequestStatusFromString(value string) *AccountRequestStatus { - return &AccountRequestStatus{typeName: "string", String: value} +func (a *AccountingPeriodStatus) GetString() string { + if a == nil { + return "" + } + return a.String } -func (a *AccountRequestStatus) UnmarshalJSON(data []byte) error { - var valueAccountStatusEnum AccountStatusEnum - if err := json.Unmarshal(data, &valueAccountStatusEnum); err == nil { - a.typeName = "accountStatusEnum" - a.AccountStatusEnum = valueAccountStatusEnum +func (a *AccountingPeriodStatus) UnmarshalJSON(data []byte) error { + var valueStatus895Enum Status895Enum + if err := json.Unmarshal(data, &valueStatus895Enum); err == nil { + a.typ = "Status895Enum" + a.Status895Enum = valueStatus895Enum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" + a.typ = "String" a.String = valueString return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, a) } -func (a AccountRequestStatus) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "accountStatusEnum": - return json.Marshal(a.AccountStatusEnum) - case "string": +func (a AccountingPeriodStatus) MarshalJSON() ([]byte, error) { + if a.typ == "Status895Enum" || a.Status895Enum != "" { + return json.Marshal(a.Status895Enum) + } + if a.typ == "String" || a.String != "" { return json.Marshal(a.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) } -type AccountRequestStatusVisitor interface { - VisitAccountStatusEnum(AccountStatusEnum) error +type AccountingPeriodStatusVisitor interface { + VisitStatus895Enum(Status895Enum) error VisitString(string) error } -func (a *AccountRequestStatus) Accept(visitor AccountRequestStatusVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "accountStatusEnum": - return visitor.VisitAccountStatusEnum(a.AccountStatusEnum) - case "string": +func (a *AccountingPeriodStatus) Accept(visitor AccountingPeriodStatusVisitor) error { + if a.typ == "Status895Enum" || a.Status895Enum != "" { + return visitor.VisitStatus895Enum(a.Status895Enum) + } + if a.typ == "String" || a.String != "" { return visitor.VisitString(a.String) } + return fmt.Errorf("type %T does not include a non-empty union type", a) } -type AccountResponse struct { - Model *Account `json:"model,omitempty"` - Warnings []*WarningValidationProblem `json:"warnings,omitempty"` - Errors []*ErrorValidationProblem `json:"errors,omitempty"` - Logs []*DebugModeLog `json:"logs,omitempty"` +// # The AccountingPhoneNumber Object +// ### Description +// The `AccountingPhoneNumber` object is used to represent a contact's or company's phone number. +// +// ### Usage Example +// Fetch from the `GET CompanyInfo` endpoint and view the company's phone numbers. +type AccountingPhoneNumber struct { + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The phone number. + Number *string `json:"number,omitempty" url:"number,omitempty"` + // The phone number's type. + Type *string `json:"type,omitempty" url:"type,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (a *AccountResponse) UnmarshalJSON(data []byte) error { - type unmarshaler AccountResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { +func (a *AccountingPhoneNumber) GetCreatedAt() *time.Time { + if a == nil { + return nil + } + return a.CreatedAt +} + +func (a *AccountingPhoneNumber) GetModifiedAt() *time.Time { + if a == nil { + return nil + } + return a.ModifiedAt +} + +func (a *AccountingPhoneNumber) GetNumber() *string { + if a == nil { + return nil + } + return a.Number +} + +func (a *AccountingPhoneNumber) GetType() *string { + if a == nil { + return nil + } + return a.Type +} + +func (a *AccountingPhoneNumber) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AccountingPhoneNumber) UnmarshalJSON(data []byte) error { + type embed AccountingPhoneNumber + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*a), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *a = AccountingPhoneNumber(unmarshaler.embed) + a.CreatedAt = unmarshaler.CreatedAt.TimePtr() + a.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { return err } - *a = AccountResponse(value) - a._rawJSON = json.RawMessage(data) + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) return nil } -func (a *AccountResponse) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { +func (a *AccountingPhoneNumber) MarshalJSON() ([]byte, error) { + type embed AccountingPhoneNumber + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*a), + CreatedAt: internal.NewOptionalDateTime(a.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(a.ModifiedAt), + } + return json.Marshal(marshaler) +} + +func (a *AccountingPhoneNumber) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(a); err == nil { + if value, err := internal.StringifyJSON(a); err == nil { return value } return fmt.Sprintf("%#v", a) } -// The account's status. +// # The Address Object +// ### Description +// The `Address` object is used to represent a contact's or company's address. // -// - `ACTIVE` - ACTIVE -// - `PENDING` - PENDING -// - `INACTIVE` - INACTIVE -type AccountStatus struct { - typeName string - AccountStatusEnum AccountStatusEnum - String string -} +// ### Usage Example +// Fetch from the `GET CompanyInfo` endpoint and view the company's addresses. +type Address struct { + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The address type. + // + // * `BILLING` - BILLING + // * `SHIPPING` - SHIPPING + Type *AddressType `json:"type,omitempty" url:"type,omitempty"` + // Line 1 of the address's street. + Street1 *string `json:"street_1,omitempty" url:"street_1,omitempty"` + // Line 2 of the address's street. + Street2 *string `json:"street_2,omitempty" url:"street_2,omitempty"` + // The address's city. + City *string `json:"city,omitempty" url:"city,omitempty"` + State interface{} `json:"state,omitempty" url:"state,omitempty"` + // The address's state or region. + CountrySubdivision *string `json:"country_subdivision,omitempty" url:"country_subdivision,omitempty"` + // The address's country. + // + // * `AF` - Afghanistan + // * `AX` - Åland Islands + // * `AL` - Albania + // * `DZ` - Algeria + // * `AS` - American Samoa + // * `AD` - Andorra + // * `AO` - Angola + // * `AI` - Anguilla + // * `AQ` - Antarctica + // * `AG` - Antigua and Barbuda + // * `AR` - Argentina + // * `AM` - Armenia + // * `AW` - Aruba + // * `AU` - Australia + // * `AT` - Austria + // * `AZ` - Azerbaijan + // * `BS` - Bahamas + // * `BH` - Bahrain + // * `BD` - Bangladesh + // * `BB` - Barbados + // * `BY` - Belarus + // * `BE` - Belgium + // * `BZ` - Belize + // * `BJ` - Benin + // * `BM` - Bermuda + // * `BT` - Bhutan + // * `BO` - Bolivia + // * `BQ` - Bonaire, Sint Eustatius and Saba + // * `BA` - Bosnia and Herzegovina + // * `BW` - Botswana + // * `BV` - Bouvet Island + // * `BR` - Brazil + // * `IO` - British Indian Ocean Territory + // * `BN` - Brunei + // * `BG` - Bulgaria + // * `BF` - Burkina Faso + // * `BI` - Burundi + // * `CV` - Cabo Verde + // * `KH` - Cambodia + // * `CM` - Cameroon + // * `CA` - Canada + // * `KY` - Cayman Islands + // * `CF` - Central African Republic + // * `TD` - Chad + // * `CL` - Chile + // * `CN` - China + // * `CX` - Christmas Island + // * `CC` - Cocos (Keeling) Islands + // * `CO` - Colombia + // * `KM` - Comoros + // * `CG` - Congo + // * `CD` - Congo (the Democratic Republic of the) + // * `CK` - Cook Islands + // * `CR` - Costa Rica + // * `CI` - Côte d'Ivoire + // * `HR` - Croatia + // * `CU` - Cuba + // * `CW` - Curaçao + // * `CY` - Cyprus + // * `CZ` - Czechia + // * `DK` - Denmark + // * `DJ` - Djibouti + // * `DM` - Dominica + // * `DO` - Dominican Republic + // * `EC` - Ecuador + // * `EG` - Egypt + // * `SV` - El Salvador + // * `GQ` - Equatorial Guinea + // * `ER` - Eritrea + // * `EE` - Estonia + // * `SZ` - Eswatini + // * `ET` - Ethiopia + // * `FK` - Falkland Islands (Malvinas) + // * `FO` - Faroe Islands + // * `FJ` - Fiji + // * `FI` - Finland + // * `FR` - France + // * `GF` - French Guiana + // * `PF` - French Polynesia + // * `TF` - French Southern Territories + // * `GA` - Gabon + // * `GM` - Gambia + // * `GE` - Georgia + // * `DE` - Germany + // * `GH` - Ghana + // * `GI` - Gibraltar + // * `GR` - Greece + // * `GL` - Greenland + // * `GD` - Grenada + // * `GP` - Guadeloupe + // * `GU` - Guam + // * `GT` - Guatemala + // * `GG` - Guernsey + // * `GN` - Guinea + // * `GW` - Guinea-Bissau + // * `GY` - Guyana + // * `HT` - Haiti + // * `HM` - Heard Island and McDonald Islands + // * `VA` - Holy See + // * `HN` - Honduras + // * `HK` - Hong Kong + // * `HU` - Hungary + // * `IS` - Iceland + // * `IN` - India + // * `ID` - Indonesia + // * `IR` - Iran + // * `IQ` - Iraq + // * `IE` - Ireland + // * `IM` - Isle of Man + // * `IL` - Israel + // * `IT` - Italy + // * `JM` - Jamaica + // * `JP` - Japan + // * `JE` - Jersey + // * `JO` - Jordan + // * `KZ` - Kazakhstan + // * `KE` - Kenya + // * `KI` - Kiribati + // * `KW` - Kuwait + // * `KG` - Kyrgyzstan + // * `LA` - Laos + // * `LV` - Latvia + // * `LB` - Lebanon + // * `LS` - Lesotho + // * `LR` - Liberia + // * `LY` - Libya + // * `LI` - Liechtenstein + // * `LT` - Lithuania + // * `LU` - Luxembourg + // * `MO` - Macao + // * `MG` - Madagascar + // * `MW` - Malawi + // * `MY` - Malaysia + // * `MV` - Maldives + // * `ML` - Mali + // * `MT` - Malta + // * `MH` - Marshall Islands + // * `MQ` - Martinique + // * `MR` - Mauritania + // * `MU` - Mauritius + // * `YT` - Mayotte + // * `MX` - Mexico + // * `FM` - Micronesia (Federated States of) + // * `MD` - Moldova + // * `MC` - Monaco + // * `MN` - Mongolia + // * `ME` - Montenegro + // * `MS` - Montserrat + // * `MA` - Morocco + // * `MZ` - Mozambique + // * `MM` - Myanmar + // * `NA` - Namibia + // * `NR` - Nauru + // * `NP` - Nepal + // * `NL` - Netherlands + // * `NC` - New Caledonia + // * `NZ` - New Zealand + // * `NI` - Nicaragua + // * `NE` - Niger + // * `NG` - Nigeria + // * `NU` - Niue + // * `NF` - Norfolk Island + // * `KP` - North Korea + // * `MK` - North Macedonia + // * `MP` - Northern Mariana Islands + // * `NO` - Norway + // * `OM` - Oman + // * `PK` - Pakistan + // * `PW` - Palau + // * `PS` - Palestine, State of + // * `PA` - Panama + // * `PG` - Papua New Guinea + // * `PY` - Paraguay + // * `PE` - Peru + // * `PH` - Philippines + // * `PN` - Pitcairn + // * `PL` - Poland + // * `PT` - Portugal + // * `PR` - Puerto Rico + // * `QA` - Qatar + // * `RE` - Réunion + // * `RO` - Romania + // * `RU` - Russia + // * `RW` - Rwanda + // * `BL` - Saint Barthélemy + // * `SH` - Saint Helena, Ascension and Tristan da Cunha + // * `KN` - Saint Kitts and Nevis + // * `LC` - Saint Lucia + // * `MF` - Saint Martin (French part) + // * `PM` - Saint Pierre and Miquelon + // * `VC` - Saint Vincent and the Grenadines + // * `WS` - Samoa + // * `SM` - San Marino + // * `ST` - Sao Tome and Principe + // * `SA` - Saudi Arabia + // * `SN` - Senegal + // * `RS` - Serbia + // * `SC` - Seychelles + // * `SL` - Sierra Leone + // * `SG` - Singapore + // * `SX` - Sint Maarten (Dutch part) + // * `SK` - Slovakia + // * `SI` - Slovenia + // * `SB` - Solomon Islands + // * `SO` - Somalia + // * `ZA` - South Africa + // * `GS` - South Georgia and the South Sandwich Islands + // * `KR` - South Korea + // * `SS` - South Sudan + // * `ES` - Spain + // * `LK` - Sri Lanka + // * `SD` - Sudan + // * `SR` - Suriname + // * `SJ` - Svalbard and Jan Mayen + // * `SE` - Sweden + // * `CH` - Switzerland + // * `SY` - Syria + // * `TW` - Taiwan + // * `TJ` - Tajikistan + // * `TZ` - Tanzania + // * `TH` - Thailand + // * `TL` - Timor-Leste + // * `TG` - Togo + // * `TK` - Tokelau + // * `TO` - Tonga + // * `TT` - Trinidad and Tobago + // * `TN` - Tunisia + // * `TR` - Turkey + // * `TM` - Turkmenistan + // * `TC` - Turks and Caicos Islands + // * `TV` - Tuvalu + // * `UG` - Uganda + // * `UA` - Ukraine + // * `AE` - United Arab Emirates + // * `GB` - United Kingdom + // * `UM` - United States Minor Outlying Islands + // * `US` - United States of America + // * `UY` - Uruguay + // * `UZ` - Uzbekistan + // * `VU` - Vanuatu + // * `VE` - Venezuela + // * `VN` - Vietnam + // * `VG` - Virgin Islands (British) + // * `VI` - Virgin Islands (U.S.) + // * `WF` - Wallis and Futuna + // * `EH` - Western Sahara + // * `YE` - Yemen + // * `ZM` - Zambia + // * `ZW` - Zimbabwe + Country *AddressCountry `json:"country,omitempty" url:"country,omitempty"` + // The address's zip code. + ZipCode *string `json:"zip_code,omitempty" url:"zip_code,omitempty"` -func NewAccountStatusFromAccountStatusEnum(value AccountStatusEnum) *AccountStatus { - return &AccountStatus{typeName: "accountStatusEnum", AccountStatusEnum: value} + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func NewAccountStatusFromString(value string) *AccountStatus { - return &AccountStatus{typeName: "string", String: value} +func (a *Address) GetCreatedAt() *time.Time { + if a == nil { + return nil + } + return a.CreatedAt } -func (a *AccountStatus) UnmarshalJSON(data []byte) error { - var valueAccountStatusEnum AccountStatusEnum - if err := json.Unmarshal(data, &valueAccountStatusEnum); err == nil { - a.typeName = "accountStatusEnum" - a.AccountStatusEnum = valueAccountStatusEnum +func (a *Address) GetModifiedAt() *time.Time { + if a == nil { return nil } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" - a.String = valueString + return a.ModifiedAt +} + +func (a *Address) GetType() *AddressType { + if a == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, a) + return a.Type } -func (a AccountStatus) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "accountStatusEnum": - return json.Marshal(a.AccountStatusEnum) - case "string": - return json.Marshal(a.String) +func (a *Address) GetStreet1() *string { + if a == nil { + return nil } + return a.Street1 } -type AccountStatusVisitor interface { - VisitAccountStatusEnum(AccountStatusEnum) error - VisitString(string) error +func (a *Address) GetStreet2() *string { + if a == nil { + return nil + } + return a.Street2 } -func (a *AccountStatus) Accept(visitor AccountStatusVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "accountStatusEnum": - return visitor.VisitAccountStatusEnum(a.AccountStatusEnum) - case "string": - return visitor.VisitString(a.String) +func (a *Address) GetCity() *string { + if a == nil { + return nil } + return a.City } -// - `ACTIVE` - ACTIVE -// - `PENDING` - PENDING -// - `INACTIVE` - INACTIVE -type AccountStatusEnum string - -const ( - AccountStatusEnumActive AccountStatusEnum = "ACTIVE" - AccountStatusEnumPending AccountStatusEnum = "PENDING" - AccountStatusEnumInactive AccountStatusEnum = "INACTIVE" -) +func (a *Address) GetState() interface{} { + if a == nil { + return nil + } + return a.State +} -func NewAccountStatusEnumFromString(s string) (AccountStatusEnum, error) { - switch s { - case "ACTIVE": - return AccountStatusEnumActive, nil - case "PENDING": - return AccountStatusEnumPending, nil - case "INACTIVE": - return AccountStatusEnumInactive, nil +func (a *Address) GetCountrySubdivision() *string { + if a == nil { + return nil } - var t AccountStatusEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) + return a.CountrySubdivision } -func (a AccountStatusEnum) Ptr() *AccountStatusEnum { - return &a +func (a *Address) GetCountry() *AddressCountry { + if a == nil { + return nil + } + return a.Country } -type AccountToken struct { - AccountToken string `json:"account_token"` - Integration *AccountIntegration `json:"integration,omitempty"` +func (a *Address) GetZipCode() *string { + if a == nil { + return nil + } + return a.ZipCode +} - _rawJSON json.RawMessage +func (a *Address) GetExtraProperties() map[string]interface{} { + return a.extraProperties } -func (a *AccountToken) UnmarshalJSON(data []byte) error { - type unmarshaler AccountToken - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { +func (a *Address) UnmarshalJSON(data []byte) error { + type embed Address + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*a), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *a = Address(unmarshaler.embed) + a.CreatedAt = unmarshaler.CreatedAt.TimePtr() + a.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { return err } - *a = AccountToken(value) - a._rawJSON = json.RawMessage(data) + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) return nil } -func (a *AccountToken) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { +func (a *Address) MarshalJSON() ([]byte, error) { + type embed Address + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*a), + CreatedAt: internal.NewOptionalDateTime(a.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(a.ModifiedAt), + } + return json.Marshal(marshaler) +} + +func (a *Address) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(a); err == nil { + if value, err := internal.StringifyJSON(a); err == nil { return value } return fmt.Sprintf("%#v", a) } -// # The Accounting Attachment Object -// -// ### Description +// The address's country. // -// The `AccountingAttachment` object is used to represent a company's attachments. -// -// ### Usage Example -// -// Fetch from the `LIST AccountingAttachments` endpoint and view a company's attachments. -type AccountingAttachment struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The attachment's name. - FileName *string `json:"file_name,omitempty"` - // The attachment's url. - FileUrl *string `json:"file_url,omitempty"` - // The company the accounting attachment belongs to. - Company *string `json:"company,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` +// * `AF` - Afghanistan +// * `AX` - Åland Islands +// * `AL` - Albania +// * `DZ` - Algeria +// * `AS` - American Samoa +// * `AD` - Andorra +// * `AO` - Angola +// * `AI` - Anguilla +// * `AQ` - Antarctica +// * `AG` - Antigua and Barbuda +// * `AR` - Argentina +// * `AM` - Armenia +// * `AW` - Aruba +// * `AU` - Australia +// * `AT` - Austria +// * `AZ` - Azerbaijan +// * `BS` - Bahamas +// * `BH` - Bahrain +// * `BD` - Bangladesh +// * `BB` - Barbados +// * `BY` - Belarus +// * `BE` - Belgium +// * `BZ` - Belize +// * `BJ` - Benin +// * `BM` - Bermuda +// * `BT` - Bhutan +// * `BO` - Bolivia +// * `BQ` - Bonaire, Sint Eustatius and Saba +// * `BA` - Bosnia and Herzegovina +// * `BW` - Botswana +// * `BV` - Bouvet Island +// * `BR` - Brazil +// * `IO` - British Indian Ocean Territory +// * `BN` - Brunei +// * `BG` - Bulgaria +// * `BF` - Burkina Faso +// * `BI` - Burundi +// * `CV` - Cabo Verde +// * `KH` - Cambodia +// * `CM` - Cameroon +// * `CA` - Canada +// * `KY` - Cayman Islands +// * `CF` - Central African Republic +// * `TD` - Chad +// * `CL` - Chile +// * `CN` - China +// * `CX` - Christmas Island +// * `CC` - Cocos (Keeling) Islands +// * `CO` - Colombia +// * `KM` - Comoros +// * `CG` - Congo +// * `CD` - Congo (the Democratic Republic of the) +// * `CK` - Cook Islands +// * `CR` - Costa Rica +// * `CI` - Côte d'Ivoire +// * `HR` - Croatia +// * `CU` - Cuba +// * `CW` - Curaçao +// * `CY` - Cyprus +// * `CZ` - Czechia +// * `DK` - Denmark +// * `DJ` - Djibouti +// * `DM` - Dominica +// * `DO` - Dominican Republic +// * `EC` - Ecuador +// * `EG` - Egypt +// * `SV` - El Salvador +// * `GQ` - Equatorial Guinea +// * `ER` - Eritrea +// * `EE` - Estonia +// * `SZ` - Eswatini +// * `ET` - Ethiopia +// * `FK` - Falkland Islands (Malvinas) +// * `FO` - Faroe Islands +// * `FJ` - Fiji +// * `FI` - Finland +// * `FR` - France +// * `GF` - French Guiana +// * `PF` - French Polynesia +// * `TF` - French Southern Territories +// * `GA` - Gabon +// * `GM` - Gambia +// * `GE` - Georgia +// * `DE` - Germany +// * `GH` - Ghana +// * `GI` - Gibraltar +// * `GR` - Greece +// * `GL` - Greenland +// * `GD` - Grenada +// * `GP` - Guadeloupe +// * `GU` - Guam +// * `GT` - Guatemala +// * `GG` - Guernsey +// * `GN` - Guinea +// * `GW` - Guinea-Bissau +// * `GY` - Guyana +// * `HT` - Haiti +// * `HM` - Heard Island and McDonald Islands +// * `VA` - Holy See +// * `HN` - Honduras +// * `HK` - Hong Kong +// * `HU` - Hungary +// * `IS` - Iceland +// * `IN` - India +// * `ID` - Indonesia +// * `IR` - Iran +// * `IQ` - Iraq +// * `IE` - Ireland +// * `IM` - Isle of Man +// * `IL` - Israel +// * `IT` - Italy +// * `JM` - Jamaica +// * `JP` - Japan +// * `JE` - Jersey +// * `JO` - Jordan +// * `KZ` - Kazakhstan +// * `KE` - Kenya +// * `KI` - Kiribati +// * `KW` - Kuwait +// * `KG` - Kyrgyzstan +// * `LA` - Laos +// * `LV` - Latvia +// * `LB` - Lebanon +// * `LS` - Lesotho +// * `LR` - Liberia +// * `LY` - Libya +// * `LI` - Liechtenstein +// * `LT` - Lithuania +// * `LU` - Luxembourg +// * `MO` - Macao +// * `MG` - Madagascar +// * `MW` - Malawi +// * `MY` - Malaysia +// * `MV` - Maldives +// * `ML` - Mali +// * `MT` - Malta +// * `MH` - Marshall Islands +// * `MQ` - Martinique +// * `MR` - Mauritania +// * `MU` - Mauritius +// * `YT` - Mayotte +// * `MX` - Mexico +// * `FM` - Micronesia (Federated States of) +// * `MD` - Moldova +// * `MC` - Monaco +// * `MN` - Mongolia +// * `ME` - Montenegro +// * `MS` - Montserrat +// * `MA` - Morocco +// * `MZ` - Mozambique +// * `MM` - Myanmar +// * `NA` - Namibia +// * `NR` - Nauru +// * `NP` - Nepal +// * `NL` - Netherlands +// * `NC` - New Caledonia +// * `NZ` - New Zealand +// * `NI` - Nicaragua +// * `NE` - Niger +// * `NG` - Nigeria +// * `NU` - Niue +// * `NF` - Norfolk Island +// * `KP` - North Korea +// * `MK` - North Macedonia +// * `MP` - Northern Mariana Islands +// * `NO` - Norway +// * `OM` - Oman +// * `PK` - Pakistan +// * `PW` - Palau +// * `PS` - Palestine, State of +// * `PA` - Panama +// * `PG` - Papua New Guinea +// * `PY` - Paraguay +// * `PE` - Peru +// * `PH` - Philippines +// * `PN` - Pitcairn +// * `PL` - Poland +// * `PT` - Portugal +// * `PR` - Puerto Rico +// * `QA` - Qatar +// * `RE` - Réunion +// * `RO` - Romania +// * `RU` - Russia +// * `RW` - Rwanda +// * `BL` - Saint Barthélemy +// * `SH` - Saint Helena, Ascension and Tristan da Cunha +// * `KN` - Saint Kitts and Nevis +// * `LC` - Saint Lucia +// * `MF` - Saint Martin (French part) +// * `PM` - Saint Pierre and Miquelon +// * `VC` - Saint Vincent and the Grenadines +// * `WS` - Samoa +// * `SM` - San Marino +// * `ST` - Sao Tome and Principe +// * `SA` - Saudi Arabia +// * `SN` - Senegal +// * `RS` - Serbia +// * `SC` - Seychelles +// * `SL` - Sierra Leone +// * `SG` - Singapore +// * `SX` - Sint Maarten (Dutch part) +// * `SK` - Slovakia +// * `SI` - Slovenia +// * `SB` - Solomon Islands +// * `SO` - Somalia +// * `ZA` - South Africa +// * `GS` - South Georgia and the South Sandwich Islands +// * `KR` - South Korea +// * `SS` - South Sudan +// * `ES` - Spain +// * `LK` - Sri Lanka +// * `SD` - Sudan +// * `SR` - Suriname +// * `SJ` - Svalbard and Jan Mayen +// * `SE` - Sweden +// * `CH` - Switzerland +// * `SY` - Syria +// * `TW` - Taiwan +// * `TJ` - Tajikistan +// * `TZ` - Tanzania +// * `TH` - Thailand +// * `TL` - Timor-Leste +// * `TG` - Togo +// * `TK` - Tokelau +// * `TO` - Tonga +// * `TT` - Trinidad and Tobago +// * `TN` - Tunisia +// * `TR` - Turkey +// * `TM` - Turkmenistan +// * `TC` - Turks and Caicos Islands +// * `TV` - Tuvalu +// * `UG` - Uganda +// * `UA` - Ukraine +// * `AE` - United Arab Emirates +// * `GB` - United Kingdom +// * `UM` - United States Minor Outlying Islands +// * `US` - United States of America +// * `UY` - Uruguay +// * `UZ` - Uzbekistan +// * `VU` - Vanuatu +// * `VE` - Venezuela +// * `VN` - Vietnam +// * `VG` - Virgin Islands (British) +// * `VI` - Virgin Islands (U.S.) +// * `WF` - Wallis and Futuna +// * `EH` - Western Sahara +// * `YE` - Yemen +// * `ZM` - Zambia +// * `ZW` - Zimbabwe +type AddressCountry struct { + CountryEnum CountryEnum + String string - _rawJSON json.RawMessage + typ string } -func (a *AccountingAttachment) UnmarshalJSON(data []byte) error { - type unmarshaler AccountingAttachment - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (a *AddressCountry) GetCountryEnum() CountryEnum { + if a == nil { + return "" } - *a = AccountingAttachment(value) - a._rawJSON = json.RawMessage(data) - return nil + return a.CountryEnum } -func (a *AccountingAttachment) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } +func (a *AddressCountry) GetString() string { + if a == nil { + return "" } - if value, err := core.StringifyJSON(a); err == nil { - return value - } - return fmt.Sprintf("%#v", a) + return a.String } -// # The Accounting Attachment Object -// -// ### Description -// -// The `AccountingAttachment` object is used to represent a company's attachments. -// -// ### Usage Example -// -// Fetch from the `LIST AccountingAttachments` endpoint and view a company's attachments. -type AccountingAttachmentRequest struct { - // The attachment's name. - FileName *string `json:"file_name,omitempty"` - // The attachment's url. - FileUrl *string `json:"file_url,omitempty"` - // The company the accounting attachment belongs to. - Company *string `json:"company,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` - - _rawJSON json.RawMessage -} - -func (a *AccountingAttachmentRequest) UnmarshalJSON(data []byte) error { - type unmarshaler AccountingAttachmentRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (a *AddressCountry) UnmarshalJSON(data []byte) error { + var valueCountryEnum CountryEnum + if err := json.Unmarshal(data, &valueCountryEnum); err == nil { + a.typ = "CountryEnum" + a.CountryEnum = valueCountryEnum + return nil } - *a = AccountingAttachmentRequest(value) - a._rawJSON = json.RawMessage(data) - return nil + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + a.typ = "String" + a.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, a) } -func (a *AccountingAttachmentRequest) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } +func (a AddressCountry) MarshalJSON() ([]byte, error) { + if a.typ == "CountryEnum" || a.CountryEnum != "" { + return json.Marshal(a.CountryEnum) } - if value, err := core.StringifyJSON(a); err == nil { - return value + if a.typ == "String" || a.String != "" { + return json.Marshal(a.String) } - return fmt.Sprintf("%#v", a) -} - -type AccountingAttachmentResponse struct { - Model *AccountingAttachment `json:"model,omitempty"` - Warnings []*WarningValidationProblem `json:"warnings,omitempty"` - Errors []*ErrorValidationProblem `json:"errors,omitempty"` - Logs []*DebugModeLog `json:"logs,omitempty"` - - _rawJSON json.RawMessage + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) } -func (a *AccountingAttachmentResponse) UnmarshalJSON(data []byte) error { - type unmarshaler AccountingAttachmentResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *a = AccountingAttachmentResponse(value) - a._rawJSON = json.RawMessage(data) - return nil +type AddressCountryVisitor interface { + VisitCountryEnum(CountryEnum) error + VisitString(string) error } -func (a *AccountingAttachmentResponse) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } +func (a *AddressCountry) Accept(visitor AddressCountryVisitor) error { + if a.typ == "CountryEnum" || a.CountryEnum != "" { + return visitor.VisitCountryEnum(a.CountryEnum) } - if value, err := core.StringifyJSON(a); err == nil { - return value + if a.typ == "String" || a.String != "" { + return visitor.VisitString(a.String) } - return fmt.Sprintf("%#v", a) + return fmt.Errorf("type %T does not include a non-empty union type", a) } -// # The AccountingPeriod Object -// +// # The Address Object // ### Description -// -// The `AccountingPeriod` object is used to define a period of time in which events occurred. +// The `Address` object is used to represent a contact's or company's address. // // ### Usage Example -// -// Common models like `Invoice` and `Transaction` will have `AccountingPeriod` objects which will denote when they occurred. -type AccountingPeriod struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // Name of the accounting period. - Name *string `json:"name,omitempty"` - Status *AccountingPeriodStatus `json:"status,omitempty"` - // Beginning date of the period - StartDate *time.Time `json:"start_date,omitempty"` - // End date of the period - EndDate *time.Time `json:"end_date,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` +// Fetch from the `GET CompanyInfo` endpoint and view the company's addresses. +type AddressRequest struct { + // The address type. + // + // * `BILLING` - BILLING + // * `SHIPPING` - SHIPPING + Type *AddressRequestType `json:"type,omitempty" url:"type,omitempty"` + // Line 1 of the address's street. + Street1 *string `json:"street_1,omitempty" url:"street_1,omitempty"` + // Line 2 of the address's street. + Street2 *string `json:"street_2,omitempty" url:"street_2,omitempty"` + // The address's city. + City *string `json:"city,omitempty" url:"city,omitempty"` + // The address's state or region. + CountrySubdivision *string `json:"country_subdivision,omitempty" url:"country_subdivision,omitempty"` + // The address's country. + // + // * `AF` - Afghanistan + // * `AX` - Åland Islands + // * `AL` - Albania + // * `DZ` - Algeria + // * `AS` - American Samoa + // * `AD` - Andorra + // * `AO` - Angola + // * `AI` - Anguilla + // * `AQ` - Antarctica + // * `AG` - Antigua and Barbuda + // * `AR` - Argentina + // * `AM` - Armenia + // * `AW` - Aruba + // * `AU` - Australia + // * `AT` - Austria + // * `AZ` - Azerbaijan + // * `BS` - Bahamas + // * `BH` - Bahrain + // * `BD` - Bangladesh + // * `BB` - Barbados + // * `BY` - Belarus + // * `BE` - Belgium + // * `BZ` - Belize + // * `BJ` - Benin + // * `BM` - Bermuda + // * `BT` - Bhutan + // * `BO` - Bolivia + // * `BQ` - Bonaire, Sint Eustatius and Saba + // * `BA` - Bosnia and Herzegovina + // * `BW` - Botswana + // * `BV` - Bouvet Island + // * `BR` - Brazil + // * `IO` - British Indian Ocean Territory + // * `BN` - Brunei + // * `BG` - Bulgaria + // * `BF` - Burkina Faso + // * `BI` - Burundi + // * `CV` - Cabo Verde + // * `KH` - Cambodia + // * `CM` - Cameroon + // * `CA` - Canada + // * `KY` - Cayman Islands + // * `CF` - Central African Republic + // * `TD` - Chad + // * `CL` - Chile + // * `CN` - China + // * `CX` - Christmas Island + // * `CC` - Cocos (Keeling) Islands + // * `CO` - Colombia + // * `KM` - Comoros + // * `CG` - Congo + // * `CD` - Congo (the Democratic Republic of the) + // * `CK` - Cook Islands + // * `CR` - Costa Rica + // * `CI` - Côte d'Ivoire + // * `HR` - Croatia + // * `CU` - Cuba + // * `CW` - Curaçao + // * `CY` - Cyprus + // * `CZ` - Czechia + // * `DK` - Denmark + // * `DJ` - Djibouti + // * `DM` - Dominica + // * `DO` - Dominican Republic + // * `EC` - Ecuador + // * `EG` - Egypt + // * `SV` - El Salvador + // * `GQ` - Equatorial Guinea + // * `ER` - Eritrea + // * `EE` - Estonia + // * `SZ` - Eswatini + // * `ET` - Ethiopia + // * `FK` - Falkland Islands (Malvinas) + // * `FO` - Faroe Islands + // * `FJ` - Fiji + // * `FI` - Finland + // * `FR` - France + // * `GF` - French Guiana + // * `PF` - French Polynesia + // * `TF` - French Southern Territories + // * `GA` - Gabon + // * `GM` - Gambia + // * `GE` - Georgia + // * `DE` - Germany + // * `GH` - Ghana + // * `GI` - Gibraltar + // * `GR` - Greece + // * `GL` - Greenland + // * `GD` - Grenada + // * `GP` - Guadeloupe + // * `GU` - Guam + // * `GT` - Guatemala + // * `GG` - Guernsey + // * `GN` - Guinea + // * `GW` - Guinea-Bissau + // * `GY` - Guyana + // * `HT` - Haiti + // * `HM` - Heard Island and McDonald Islands + // * `VA` - Holy See + // * `HN` - Honduras + // * `HK` - Hong Kong + // * `HU` - Hungary + // * `IS` - Iceland + // * `IN` - India + // * `ID` - Indonesia + // * `IR` - Iran + // * `IQ` - Iraq + // * `IE` - Ireland + // * `IM` - Isle of Man + // * `IL` - Israel + // * `IT` - Italy + // * `JM` - Jamaica + // * `JP` - Japan + // * `JE` - Jersey + // * `JO` - Jordan + // * `KZ` - Kazakhstan + // * `KE` - Kenya + // * `KI` - Kiribati + // * `KW` - Kuwait + // * `KG` - Kyrgyzstan + // * `LA` - Laos + // * `LV` - Latvia + // * `LB` - Lebanon + // * `LS` - Lesotho + // * `LR` - Liberia + // * `LY` - Libya + // * `LI` - Liechtenstein + // * `LT` - Lithuania + // * `LU` - Luxembourg + // * `MO` - Macao + // * `MG` - Madagascar + // * `MW` - Malawi + // * `MY` - Malaysia + // * `MV` - Maldives + // * `ML` - Mali + // * `MT` - Malta + // * `MH` - Marshall Islands + // * `MQ` - Martinique + // * `MR` - Mauritania + // * `MU` - Mauritius + // * `YT` - Mayotte + // * `MX` - Mexico + // * `FM` - Micronesia (Federated States of) + // * `MD` - Moldova + // * `MC` - Monaco + // * `MN` - Mongolia + // * `ME` - Montenegro + // * `MS` - Montserrat + // * `MA` - Morocco + // * `MZ` - Mozambique + // * `MM` - Myanmar + // * `NA` - Namibia + // * `NR` - Nauru + // * `NP` - Nepal + // * `NL` - Netherlands + // * `NC` - New Caledonia + // * `NZ` - New Zealand + // * `NI` - Nicaragua + // * `NE` - Niger + // * `NG` - Nigeria + // * `NU` - Niue + // * `NF` - Norfolk Island + // * `KP` - North Korea + // * `MK` - North Macedonia + // * `MP` - Northern Mariana Islands + // * `NO` - Norway + // * `OM` - Oman + // * `PK` - Pakistan + // * `PW` - Palau + // * `PS` - Palestine, State of + // * `PA` - Panama + // * `PG` - Papua New Guinea + // * `PY` - Paraguay + // * `PE` - Peru + // * `PH` - Philippines + // * `PN` - Pitcairn + // * `PL` - Poland + // * `PT` - Portugal + // * `PR` - Puerto Rico + // * `QA` - Qatar + // * `RE` - Réunion + // * `RO` - Romania + // * `RU` - Russia + // * `RW` - Rwanda + // * `BL` - Saint Barthélemy + // * `SH` - Saint Helena, Ascension and Tristan da Cunha + // * `KN` - Saint Kitts and Nevis + // * `LC` - Saint Lucia + // * `MF` - Saint Martin (French part) + // * `PM` - Saint Pierre and Miquelon + // * `VC` - Saint Vincent and the Grenadines + // * `WS` - Samoa + // * `SM` - San Marino + // * `ST` - Sao Tome and Principe + // * `SA` - Saudi Arabia + // * `SN` - Senegal + // * `RS` - Serbia + // * `SC` - Seychelles + // * `SL` - Sierra Leone + // * `SG` - Singapore + // * `SX` - Sint Maarten (Dutch part) + // * `SK` - Slovakia + // * `SI` - Slovenia + // * `SB` - Solomon Islands + // * `SO` - Somalia + // * `ZA` - South Africa + // * `GS` - South Georgia and the South Sandwich Islands + // * `KR` - South Korea + // * `SS` - South Sudan + // * `ES` - Spain + // * `LK` - Sri Lanka + // * `SD` - Sudan + // * `SR` - Suriname + // * `SJ` - Svalbard and Jan Mayen + // * `SE` - Sweden + // * `CH` - Switzerland + // * `SY` - Syria + // * `TW` - Taiwan + // * `TJ` - Tajikistan + // * `TZ` - Tanzania + // * `TH` - Thailand + // * `TL` - Timor-Leste + // * `TG` - Togo + // * `TK` - Tokelau + // * `TO` - Tonga + // * `TT` - Trinidad and Tobago + // * `TN` - Tunisia + // * `TR` - Turkey + // * `TM` - Turkmenistan + // * `TC` - Turks and Caicos Islands + // * `TV` - Tuvalu + // * `UG` - Uganda + // * `UA` - Ukraine + // * `AE` - United Arab Emirates + // * `GB` - United Kingdom + // * `UM` - United States Minor Outlying Islands + // * `US` - United States of America + // * `UY` - Uruguay + // * `UZ` - Uzbekistan + // * `VU` - Vanuatu + // * `VE` - Venezuela + // * `VN` - Vietnam + // * `VG` - Virgin Islands (British) + // * `VI` - Virgin Islands (U.S.) + // * `WF` - Wallis and Futuna + // * `EH` - Western Sahara + // * `YE` - Yemen + // * `ZM` - Zambia + // * `ZW` - Zimbabwe + Country *AddressRequestCountry `json:"country,omitempty" url:"country,omitempty"` + // The address's zip code. + ZipCode *string `json:"zip_code,omitempty" url:"zip_code,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (a *AccountingPeriod) UnmarshalJSON(data []byte) error { - type unmarshaler AccountingPeriod - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (a *AddressRequest) GetType() *AddressRequestType { + if a == nil { + return nil } - *a = AccountingPeriod(value) - a._rawJSON = json.RawMessage(data) - return nil + return a.Type } -func (a *AccountingPeriod) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(a); err == nil { - return value +func (a *AddressRequest) GetStreet1() *string { + if a == nil { + return nil } - return fmt.Sprintf("%#v", a) -} - -type AccountingPeriodStatus struct { - typeName string - Status895Enum Status895Enum - String string -} - -func NewAccountingPeriodStatusFromStatus895Enum(value Status895Enum) *AccountingPeriodStatus { - return &AccountingPeriodStatus{typeName: "status895Enum", Status895Enum: value} -} - -func NewAccountingPeriodStatusFromString(value string) *AccountingPeriodStatus { - return &AccountingPeriodStatus{typeName: "string", String: value} + return a.Street1 } -func (a *AccountingPeriodStatus) UnmarshalJSON(data []byte) error { - var valueStatus895Enum Status895Enum - if err := json.Unmarshal(data, &valueStatus895Enum); err == nil { - a.typeName = "status895Enum" - a.Status895Enum = valueStatus895Enum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" - a.String = valueString +func (a *AddressRequest) GetStreet2() *string { + if a == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, a) + return a.Street2 } -func (a AccountingPeriodStatus) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "status895Enum": - return json.Marshal(a.Status895Enum) - case "string": - return json.Marshal(a.String) +func (a *AddressRequest) GetCity() *string { + if a == nil { + return nil } + return a.City } -type AccountingPeriodStatusVisitor interface { - VisitStatus895Enum(Status895Enum) error - VisitString(string) error -} - -func (a *AccountingPeriodStatus) Accept(visitor AccountingPeriodStatusVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "status895Enum": - return visitor.VisitStatus895Enum(a.Status895Enum) - case "string": - return visitor.VisitString(a.String) +func (a *AddressRequest) GetCountrySubdivision() *string { + if a == nil { + return nil } + return a.CountrySubdivision } -// # The AccountingPhoneNumber Object -// -// ### Description -// -// The `AccountingPhoneNumber` object is used to represent a contact's or company's phone number. -// -// ### Usage Example -// -// Fetch from the `GET CompanyInfo` endpoint and view the company's phone numbers. -type AccountingPhoneNumber struct { - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The phone number. - Number *string `json:"number,omitempty"` - // The phone number's type. - Type *string `json:"type,omitempty"` - - _rawJSON json.RawMessage -} - -func (a *AccountingPhoneNumber) UnmarshalJSON(data []byte) error { - type unmarshaler AccountingPhoneNumber - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (a *AddressRequest) GetCountry() *AddressRequestCountry { + if a == nil { + return nil } - *a = AccountingPhoneNumber(value) - a._rawJSON = json.RawMessage(data) - return nil + return a.Country } -func (a *AccountingPhoneNumber) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(a); err == nil { - return value +func (a *AddressRequest) GetZipCode() *string { + if a == nil { + return nil } - return fmt.Sprintf("%#v", a) -} - -// # The AccountingPhoneNumber Object -// -// ### Description -// -// The `AccountingPhoneNumber` object is used to represent a contact's or company's phone number. -// -// ### Usage Example -// -// Fetch from the `GET CompanyInfo` endpoint and view the company's phone numbers. -type AccountingPhoneNumberRequest struct { - // The phone number. - Number *string `json:"number,omitempty"` - // The phone number's type. - Type *string `json:"type,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` - - _rawJSON json.RawMessage + return a.ZipCode } -func (a *AccountingPhoneNumberRequest) UnmarshalJSON(data []byte) error { - type unmarshaler AccountingPhoneNumberRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (a *AddressRequest) GetIntegrationParams() map[string]interface{} { + if a == nil { + return nil } - *a = AccountingPhoneNumberRequest(value) - a._rawJSON = json.RawMessage(data) - return nil + return a.IntegrationParams } -func (a *AccountingPhoneNumberRequest) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(a); err == nil { - return value +func (a *AddressRequest) GetLinkedAccountParams() map[string]interface{} { + if a == nil { + return nil } - return fmt.Sprintf("%#v", a) + return a.LinkedAccountParams } -// # The Address Object -// -// ### Description -// -// The `Address` object is used to represent a contact's or company's address. -// -// ### Usage Example -// -// Fetch from the `GET CompanyInfo` endpoint and view the company's addresses. -type Address struct { - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The address type. - // - // - `BILLING` - BILLING - // - `SHIPPING` - SHIPPING - Type *AddressType `json:"type,omitempty"` - // Line 1 of the address's street. - Street1 *string `json:"street_1,omitempty"` - // Line 2 of the address's street. - Street2 *string `json:"street_2,omitempty"` - // The address's city. - City *string `json:"city,omitempty"` - State interface{} `json:"state,omitempty"` - // The address's state or region. - CountrySubdivision *string `json:"country_subdivision,omitempty"` - // The address's country. - // - // - `AF` - Afghanistan - // - `AX` - Åland Islands - // - `AL` - Albania - // - `DZ` - Algeria - // - `AS` - American Samoa - // - `AD` - Andorra - // - `AO` - Angola - // - `AI` - Anguilla - // - `AQ` - Antarctica - // - `AG` - Antigua and Barbuda - // - `AR` - Argentina - // - `AM` - Armenia - // - `AW` - Aruba - // - `AU` - Australia - // - `AT` - Austria - // - `AZ` - Azerbaijan - // - `BS` - Bahamas - // - `BH` - Bahrain - // - `BD` - Bangladesh - // - `BB` - Barbados - // - `BY` - Belarus - // - `BE` - Belgium - // - `BZ` - Belize - // - `BJ` - Benin - // - `BM` - Bermuda - // - `BT` - Bhutan - // - `BO` - Bolivia - // - `BQ` - Bonaire, Sint Eustatius and Saba - // - `BA` - Bosnia and Herzegovina - // - `BW` - Botswana - // - `BV` - Bouvet Island - // - `BR` - Brazil - // - `IO` - British Indian Ocean Territory - // - `BN` - Brunei - // - `BG` - Bulgaria - // - `BF` - Burkina Faso - // - `BI` - Burundi - // - `CV` - Cabo Verde - // - `KH` - Cambodia - // - `CM` - Cameroon - // - `CA` - Canada - // - `KY` - Cayman Islands - // - `CF` - Central African Republic - // - `TD` - Chad - // - `CL` - Chile - // - `CN` - China - // - `CX` - Christmas Island - // - `CC` - Cocos (Keeling) Islands - // - `CO` - Colombia - // - `KM` - Comoros - // - `CG` - Congo - // - `CD` - Congo (the Democratic Republic of the) - // - `CK` - Cook Islands - // - `CR` - Costa Rica - // - `CI` - Côte d'Ivoire - // - `HR` - Croatia - // - `CU` - Cuba - // - `CW` - Curaçao - // - `CY` - Cyprus - // - `CZ` - Czechia - // - `DK` - Denmark - // - `DJ` - Djibouti - // - `DM` - Dominica - // - `DO` - Dominican Republic - // - `EC` - Ecuador - // - `EG` - Egypt - // - `SV` - El Salvador - // - `GQ` - Equatorial Guinea - // - `ER` - Eritrea - // - `EE` - Estonia - // - `SZ` - Eswatini - // - `ET` - Ethiopia - // - `FK` - Falkland Islands (Malvinas) - // - `FO` - Faroe Islands - // - `FJ` - Fiji - // - `FI` - Finland - // - `FR` - France - // - `GF` - French Guiana - // - `PF` - French Polynesia - // - `TF` - French Southern Territories - // - `GA` - Gabon - // - `GM` - Gambia - // - `GE` - Georgia - // - `DE` - Germany - // - `GH` - Ghana - // - `GI` - Gibraltar - // - `GR` - Greece - // - `GL` - Greenland - // - `GD` - Grenada - // - `GP` - Guadeloupe - // - `GU` - Guam - // - `GT` - Guatemala - // - `GG` - Guernsey - // - `GN` - Guinea - // - `GW` - Guinea-Bissau - // - `GY` - Guyana - // - `HT` - Haiti - // - `HM` - Heard Island and McDonald Islands - // - `VA` - Holy See - // - `HN` - Honduras - // - `HK` - Hong Kong - // - `HU` - Hungary - // - `IS` - Iceland - // - `IN` - India - // - `ID` - Indonesia - // - `IR` - Iran - // - `IQ` - Iraq - // - `IE` - Ireland - // - `IM` - Isle of Man - // - `IL` - Israel - // - `IT` - Italy - // - `JM` - Jamaica - // - `JP` - Japan - // - `JE` - Jersey - // - `JO` - Jordan - // - `KZ` - Kazakhstan - // - `KE` - Kenya - // - `KI` - Kiribati - // - `KW` - Kuwait - // - `KG` - Kyrgyzstan - // - `LA` - Laos - // - `LV` - Latvia - // - `LB` - Lebanon - // - `LS` - Lesotho - // - `LR` - Liberia - // - `LY` - Libya - // - `LI` - Liechtenstein - // - `LT` - Lithuania - // - `LU` - Luxembourg - // - `MO` - Macao - // - `MG` - Madagascar - // - `MW` - Malawi - // - `MY` - Malaysia - // - `MV` - Maldives - // - `ML` - Mali - // - `MT` - Malta - // - `MH` - Marshall Islands - // - `MQ` - Martinique - // - `MR` - Mauritania - // - `MU` - Mauritius - // - `YT` - Mayotte - // - `MX` - Mexico - // - `FM` - Micronesia (Federated States of) - // - `MD` - Moldova - // - `MC` - Monaco - // - `MN` - Mongolia - // - `ME` - Montenegro - // - `MS` - Montserrat - // - `MA` - Morocco - // - `MZ` - Mozambique - // - `MM` - Myanmar - // - `NA` - Namibia - // - `NR` - Nauru - // - `NP` - Nepal - // - `NL` - Netherlands - // - `NC` - New Caledonia - // - `NZ` - New Zealand - // - `NI` - Nicaragua - // - `NE` - Niger - // - `NG` - Nigeria - // - `NU` - Niue - // - `NF` - Norfolk Island - // - `KP` - North Korea - // - `MK` - North Macedonia - // - `MP` - Northern Mariana Islands - // - `NO` - Norway - // - `OM` - Oman - // - `PK` - Pakistan - // - `PW` - Palau - // - `PS` - Palestine, State of - // - `PA` - Panama - // - `PG` - Papua New Guinea - // - `PY` - Paraguay - // - `PE` - Peru - // - `PH` - Philippines - // - `PN` - Pitcairn - // - `PL` - Poland - // - `PT` - Portugal - // - `PR` - Puerto Rico - // - `QA` - Qatar - // - `RE` - Réunion - // - `RO` - Romania - // - `RU` - Russia - // - `RW` - Rwanda - // - `BL` - Saint Barthélemy - // - `SH` - Saint Helena, Ascension and Tristan da Cunha - // - `KN` - Saint Kitts and Nevis - // - `LC` - Saint Lucia - // - `MF` - Saint Martin (French part) - // - `PM` - Saint Pierre and Miquelon - // - `VC` - Saint Vincent and the Grenadines - // - `WS` - Samoa - // - `SM` - San Marino - // - `ST` - Sao Tome and Principe - // - `SA` - Saudi Arabia - // - `SN` - Senegal - // - `RS` - Serbia - // - `SC` - Seychelles - // - `SL` - Sierra Leone - // - `SG` - Singapore - // - `SX` - Sint Maarten (Dutch part) - // - `SK` - Slovakia - // - `SI` - Slovenia - // - `SB` - Solomon Islands - // - `SO` - Somalia - // - `ZA` - South Africa - // - `GS` - South Georgia and the South Sandwich Islands - // - `KR` - South Korea - // - `SS` - South Sudan - // - `ES` - Spain - // - `LK` - Sri Lanka - // - `SD` - Sudan - // - `SR` - Suriname - // - `SJ` - Svalbard and Jan Mayen - // - `SE` - Sweden - // - `CH` - Switzerland - // - `SY` - Syria - // - `TW` - Taiwan - // - `TJ` - Tajikistan - // - `TZ` - Tanzania - // - `TH` - Thailand - // - `TL` - Timor-Leste - // - `TG` - Togo - // - `TK` - Tokelau - // - `TO` - Tonga - // - `TT` - Trinidad and Tobago - // - `TN` - Tunisia - // - `TR` - Turkey - // - `TM` - Turkmenistan - // - `TC` - Turks and Caicos Islands - // - `TV` - Tuvalu - // - `UG` - Uganda - // - `UA` - Ukraine - // - `AE` - United Arab Emirates - // - `GB` - United Kingdom - // - `UM` - United States Minor Outlying Islands - // - `US` - United States of America - // - `UY` - Uruguay - // - `UZ` - Uzbekistan - // - `VU` - Vanuatu - // - `VE` - Venezuela - // - `VN` - Vietnam - // - `VG` - Virgin Islands (British) - // - `VI` - Virgin Islands (U.S.) - // - `WF` - Wallis and Futuna - // - `EH` - Western Sahara - // - `YE` - Yemen - // - `ZM` - Zambia - // - `ZW` - Zimbabwe - Country *AddressCountry `json:"country,omitempty"` - // The address's zip code. - ZipCode *string `json:"zip_code,omitempty"` - - _rawJSON json.RawMessage +func (a *AddressRequest) GetExtraProperties() map[string]interface{} { + return a.extraProperties } -func (a *Address) UnmarshalJSON(data []byte) error { - type unmarshaler Address +func (a *AddressRequest) UnmarshalJSON(data []byte) error { + type unmarshaler AddressRequest var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *a = Address(value) - a._rawJSON = json.RawMessage(data) + *a = AddressRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) return nil } -func (a *Address) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { +func (a *AddressRequest) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(a); err == nil { + if value, err := internal.StringifyJSON(a); err == nil { return value } return fmt.Sprintf("%#v", a) @@ -2951,954 +2801,352 @@ func (a *Address) String() string { // The address's country. // -// - `AF` - Afghanistan -// - `AX` - Åland Islands -// - `AL` - Albania -// - `DZ` - Algeria -// - `AS` - American Samoa -// - `AD` - Andorra -// - `AO` - Angola -// - `AI` - Anguilla -// - `AQ` - Antarctica -// - `AG` - Antigua and Barbuda -// - `AR` - Argentina -// - `AM` - Armenia -// - `AW` - Aruba -// - `AU` - Australia -// - `AT` - Austria -// - `AZ` - Azerbaijan -// - `BS` - Bahamas -// - `BH` - Bahrain -// - `BD` - Bangladesh -// - `BB` - Barbados -// - `BY` - Belarus -// - `BE` - Belgium -// - `BZ` - Belize -// - `BJ` - Benin -// - `BM` - Bermuda -// - `BT` - Bhutan -// - `BO` - Bolivia -// - `BQ` - Bonaire, Sint Eustatius and Saba -// - `BA` - Bosnia and Herzegovina -// - `BW` - Botswana -// - `BV` - Bouvet Island -// - `BR` - Brazil -// - `IO` - British Indian Ocean Territory -// - `BN` - Brunei -// - `BG` - Bulgaria -// - `BF` - Burkina Faso -// - `BI` - Burundi -// - `CV` - Cabo Verde -// - `KH` - Cambodia -// - `CM` - Cameroon -// - `CA` - Canada -// - `KY` - Cayman Islands -// - `CF` - Central African Republic -// - `TD` - Chad -// - `CL` - Chile -// - `CN` - China -// - `CX` - Christmas Island -// - `CC` - Cocos (Keeling) Islands -// - `CO` - Colombia -// - `KM` - Comoros -// - `CG` - Congo -// - `CD` - Congo (the Democratic Republic of the) -// - `CK` - Cook Islands -// - `CR` - Costa Rica -// - `CI` - Côte d'Ivoire -// - `HR` - Croatia -// - `CU` - Cuba -// - `CW` - Curaçao -// - `CY` - Cyprus -// - `CZ` - Czechia -// - `DK` - Denmark -// - `DJ` - Djibouti -// - `DM` - Dominica -// - `DO` - Dominican Republic -// - `EC` - Ecuador -// - `EG` - Egypt -// - `SV` - El Salvador -// - `GQ` - Equatorial Guinea -// - `ER` - Eritrea -// - `EE` - Estonia -// - `SZ` - Eswatini -// - `ET` - Ethiopia -// - `FK` - Falkland Islands (Malvinas) -// - `FO` - Faroe Islands -// - `FJ` - Fiji -// - `FI` - Finland -// - `FR` - France -// - `GF` - French Guiana -// - `PF` - French Polynesia -// - `TF` - French Southern Territories -// - `GA` - Gabon -// - `GM` - Gambia -// - `GE` - Georgia -// - `DE` - Germany -// - `GH` - Ghana -// - `GI` - Gibraltar -// - `GR` - Greece -// - `GL` - Greenland -// - `GD` - Grenada -// - `GP` - Guadeloupe -// - `GU` - Guam -// - `GT` - Guatemala -// - `GG` - Guernsey -// - `GN` - Guinea -// - `GW` - Guinea-Bissau -// - `GY` - Guyana -// - `HT` - Haiti -// - `HM` - Heard Island and McDonald Islands -// - `VA` - Holy See -// - `HN` - Honduras -// - `HK` - Hong Kong -// - `HU` - Hungary -// - `IS` - Iceland -// - `IN` - India -// - `ID` - Indonesia -// - `IR` - Iran -// - `IQ` - Iraq -// - `IE` - Ireland -// - `IM` - Isle of Man -// - `IL` - Israel -// - `IT` - Italy -// - `JM` - Jamaica -// - `JP` - Japan -// - `JE` - Jersey -// - `JO` - Jordan -// - `KZ` - Kazakhstan -// - `KE` - Kenya -// - `KI` - Kiribati -// - `KW` - Kuwait -// - `KG` - Kyrgyzstan -// - `LA` - Laos -// - `LV` - Latvia -// - `LB` - Lebanon -// - `LS` - Lesotho -// - `LR` - Liberia -// - `LY` - Libya -// - `LI` - Liechtenstein -// - `LT` - Lithuania -// - `LU` - Luxembourg -// - `MO` - Macao -// - `MG` - Madagascar -// - `MW` - Malawi -// - `MY` - Malaysia -// - `MV` - Maldives -// - `ML` - Mali -// - `MT` - Malta -// - `MH` - Marshall Islands -// - `MQ` - Martinique -// - `MR` - Mauritania -// - `MU` - Mauritius -// - `YT` - Mayotte -// - `MX` - Mexico -// - `FM` - Micronesia (Federated States of) -// - `MD` - Moldova -// - `MC` - Monaco -// - `MN` - Mongolia -// - `ME` - Montenegro -// - `MS` - Montserrat -// - `MA` - Morocco -// - `MZ` - Mozambique -// - `MM` - Myanmar -// - `NA` - Namibia -// - `NR` - Nauru -// - `NP` - Nepal -// - `NL` - Netherlands -// - `NC` - New Caledonia -// - `NZ` - New Zealand -// - `NI` - Nicaragua -// - `NE` - Niger -// - `NG` - Nigeria -// - `NU` - Niue -// - `NF` - Norfolk Island -// - `KP` - North Korea -// - `MK` - North Macedonia -// - `MP` - Northern Mariana Islands -// - `NO` - Norway -// - `OM` - Oman -// - `PK` - Pakistan -// - `PW` - Palau -// - `PS` - Palestine, State of -// - `PA` - Panama -// - `PG` - Papua New Guinea -// - `PY` - Paraguay -// - `PE` - Peru -// - `PH` - Philippines -// - `PN` - Pitcairn -// - `PL` - Poland -// - `PT` - Portugal -// - `PR` - Puerto Rico -// - `QA` - Qatar -// - `RE` - Réunion -// - `RO` - Romania -// - `RU` - Russia -// - `RW` - Rwanda -// - `BL` - Saint Barthélemy -// - `SH` - Saint Helena, Ascension and Tristan da Cunha -// - `KN` - Saint Kitts and Nevis -// - `LC` - Saint Lucia -// - `MF` - Saint Martin (French part) -// - `PM` - Saint Pierre and Miquelon -// - `VC` - Saint Vincent and the Grenadines -// - `WS` - Samoa -// - `SM` - San Marino -// - `ST` - Sao Tome and Principe -// - `SA` - Saudi Arabia -// - `SN` - Senegal -// - `RS` - Serbia -// - `SC` - Seychelles -// - `SL` - Sierra Leone -// - `SG` - Singapore -// - `SX` - Sint Maarten (Dutch part) -// - `SK` - Slovakia -// - `SI` - Slovenia -// - `SB` - Solomon Islands -// - `SO` - Somalia -// - `ZA` - South Africa -// - `GS` - South Georgia and the South Sandwich Islands -// - `KR` - South Korea -// - `SS` - South Sudan -// - `ES` - Spain -// - `LK` - Sri Lanka -// - `SD` - Sudan -// - `SR` - Suriname -// - `SJ` - Svalbard and Jan Mayen -// - `SE` - Sweden -// - `CH` - Switzerland -// - `SY` - Syria -// - `TW` - Taiwan -// - `TJ` - Tajikistan -// - `TZ` - Tanzania -// - `TH` - Thailand -// - `TL` - Timor-Leste -// - `TG` - Togo -// - `TK` - Tokelau -// - `TO` - Tonga -// - `TT` - Trinidad and Tobago -// - `TN` - Tunisia -// - `TR` - Turkey -// - `TM` - Turkmenistan -// - `TC` - Turks and Caicos Islands -// - `TV` - Tuvalu -// - `UG` - Uganda -// - `UA` - Ukraine -// - `AE` - United Arab Emirates -// - `GB` - United Kingdom -// - `UM` - United States Minor Outlying Islands -// - `US` - United States of America -// - `UY` - Uruguay -// - `UZ` - Uzbekistan -// - `VU` - Vanuatu -// - `VE` - Venezuela -// - `VN` - Vietnam -// - `VG` - Virgin Islands (British) -// - `VI` - Virgin Islands (U.S.) -// - `WF` - Wallis and Futuna -// - `EH` - Western Sahara -// - `YE` - Yemen -// - `ZM` - Zambia -// - `ZW` - Zimbabwe -type AddressCountry struct { - typeName string +// * `AF` - Afghanistan +// * `AX` - Åland Islands +// * `AL` - Albania +// * `DZ` - Algeria +// * `AS` - American Samoa +// * `AD` - Andorra +// * `AO` - Angola +// * `AI` - Anguilla +// * `AQ` - Antarctica +// * `AG` - Antigua and Barbuda +// * `AR` - Argentina +// * `AM` - Armenia +// * `AW` - Aruba +// * `AU` - Australia +// * `AT` - Austria +// * `AZ` - Azerbaijan +// * `BS` - Bahamas +// * `BH` - Bahrain +// * `BD` - Bangladesh +// * `BB` - Barbados +// * `BY` - Belarus +// * `BE` - Belgium +// * `BZ` - Belize +// * `BJ` - Benin +// * `BM` - Bermuda +// * `BT` - Bhutan +// * `BO` - Bolivia +// * `BQ` - Bonaire, Sint Eustatius and Saba +// * `BA` - Bosnia and Herzegovina +// * `BW` - Botswana +// * `BV` - Bouvet Island +// * `BR` - Brazil +// * `IO` - British Indian Ocean Territory +// * `BN` - Brunei +// * `BG` - Bulgaria +// * `BF` - Burkina Faso +// * `BI` - Burundi +// * `CV` - Cabo Verde +// * `KH` - Cambodia +// * `CM` - Cameroon +// * `CA` - Canada +// * `KY` - Cayman Islands +// * `CF` - Central African Republic +// * `TD` - Chad +// * `CL` - Chile +// * `CN` - China +// * `CX` - Christmas Island +// * `CC` - Cocos (Keeling) Islands +// * `CO` - Colombia +// * `KM` - Comoros +// * `CG` - Congo +// * `CD` - Congo (the Democratic Republic of the) +// * `CK` - Cook Islands +// * `CR` - Costa Rica +// * `CI` - Côte d'Ivoire +// * `HR` - Croatia +// * `CU` - Cuba +// * `CW` - Curaçao +// * `CY` - Cyprus +// * `CZ` - Czechia +// * `DK` - Denmark +// * `DJ` - Djibouti +// * `DM` - Dominica +// * `DO` - Dominican Republic +// * `EC` - Ecuador +// * `EG` - Egypt +// * `SV` - El Salvador +// * `GQ` - Equatorial Guinea +// * `ER` - Eritrea +// * `EE` - Estonia +// * `SZ` - Eswatini +// * `ET` - Ethiopia +// * `FK` - Falkland Islands (Malvinas) +// * `FO` - Faroe Islands +// * `FJ` - Fiji +// * `FI` - Finland +// * `FR` - France +// * `GF` - French Guiana +// * `PF` - French Polynesia +// * `TF` - French Southern Territories +// * `GA` - Gabon +// * `GM` - Gambia +// * `GE` - Georgia +// * `DE` - Germany +// * `GH` - Ghana +// * `GI` - Gibraltar +// * `GR` - Greece +// * `GL` - Greenland +// * `GD` - Grenada +// * `GP` - Guadeloupe +// * `GU` - Guam +// * `GT` - Guatemala +// * `GG` - Guernsey +// * `GN` - Guinea +// * `GW` - Guinea-Bissau +// * `GY` - Guyana +// * `HT` - Haiti +// * `HM` - Heard Island and McDonald Islands +// * `VA` - Holy See +// * `HN` - Honduras +// * `HK` - Hong Kong +// * `HU` - Hungary +// * `IS` - Iceland +// * `IN` - India +// * `ID` - Indonesia +// * `IR` - Iran +// * `IQ` - Iraq +// * `IE` - Ireland +// * `IM` - Isle of Man +// * `IL` - Israel +// * `IT` - Italy +// * `JM` - Jamaica +// * `JP` - Japan +// * `JE` - Jersey +// * `JO` - Jordan +// * `KZ` - Kazakhstan +// * `KE` - Kenya +// * `KI` - Kiribati +// * `KW` - Kuwait +// * `KG` - Kyrgyzstan +// * `LA` - Laos +// * `LV` - Latvia +// * `LB` - Lebanon +// * `LS` - Lesotho +// * `LR` - Liberia +// * `LY` - Libya +// * `LI` - Liechtenstein +// * `LT` - Lithuania +// * `LU` - Luxembourg +// * `MO` - Macao +// * `MG` - Madagascar +// * `MW` - Malawi +// * `MY` - Malaysia +// * `MV` - Maldives +// * `ML` - Mali +// * `MT` - Malta +// * `MH` - Marshall Islands +// * `MQ` - Martinique +// * `MR` - Mauritania +// * `MU` - Mauritius +// * `YT` - Mayotte +// * `MX` - Mexico +// * `FM` - Micronesia (Federated States of) +// * `MD` - Moldova +// * `MC` - Monaco +// * `MN` - Mongolia +// * `ME` - Montenegro +// * `MS` - Montserrat +// * `MA` - Morocco +// * `MZ` - Mozambique +// * `MM` - Myanmar +// * `NA` - Namibia +// * `NR` - Nauru +// * `NP` - Nepal +// * `NL` - Netherlands +// * `NC` - New Caledonia +// * `NZ` - New Zealand +// * `NI` - Nicaragua +// * `NE` - Niger +// * `NG` - Nigeria +// * `NU` - Niue +// * `NF` - Norfolk Island +// * `KP` - North Korea +// * `MK` - North Macedonia +// * `MP` - Northern Mariana Islands +// * `NO` - Norway +// * `OM` - Oman +// * `PK` - Pakistan +// * `PW` - Palau +// * `PS` - Palestine, State of +// * `PA` - Panama +// * `PG` - Papua New Guinea +// * `PY` - Paraguay +// * `PE` - Peru +// * `PH` - Philippines +// * `PN` - Pitcairn +// * `PL` - Poland +// * `PT` - Portugal +// * `PR` - Puerto Rico +// * `QA` - Qatar +// * `RE` - Réunion +// * `RO` - Romania +// * `RU` - Russia +// * `RW` - Rwanda +// * `BL` - Saint Barthélemy +// * `SH` - Saint Helena, Ascension and Tristan da Cunha +// * `KN` - Saint Kitts and Nevis +// * `LC` - Saint Lucia +// * `MF` - Saint Martin (French part) +// * `PM` - Saint Pierre and Miquelon +// * `VC` - Saint Vincent and the Grenadines +// * `WS` - Samoa +// * `SM` - San Marino +// * `ST` - Sao Tome and Principe +// * `SA` - Saudi Arabia +// * `SN` - Senegal +// * `RS` - Serbia +// * `SC` - Seychelles +// * `SL` - Sierra Leone +// * `SG` - Singapore +// * `SX` - Sint Maarten (Dutch part) +// * `SK` - Slovakia +// * `SI` - Slovenia +// * `SB` - Solomon Islands +// * `SO` - Somalia +// * `ZA` - South Africa +// * `GS` - South Georgia and the South Sandwich Islands +// * `KR` - South Korea +// * `SS` - South Sudan +// * `ES` - Spain +// * `LK` - Sri Lanka +// * `SD` - Sudan +// * `SR` - Suriname +// * `SJ` - Svalbard and Jan Mayen +// * `SE` - Sweden +// * `CH` - Switzerland +// * `SY` - Syria +// * `TW` - Taiwan +// * `TJ` - Tajikistan +// * `TZ` - Tanzania +// * `TH` - Thailand +// * `TL` - Timor-Leste +// * `TG` - Togo +// * `TK` - Tokelau +// * `TO` - Tonga +// * `TT` - Trinidad and Tobago +// * `TN` - Tunisia +// * `TR` - Turkey +// * `TM` - Turkmenistan +// * `TC` - Turks and Caicos Islands +// * `TV` - Tuvalu +// * `UG` - Uganda +// * `UA` - Ukraine +// * `AE` - United Arab Emirates +// * `GB` - United Kingdom +// * `UM` - United States Minor Outlying Islands +// * `US` - United States of America +// * `UY` - Uruguay +// * `UZ` - Uzbekistan +// * `VU` - Vanuatu +// * `VE` - Venezuela +// * `VN` - Vietnam +// * `VG` - Virgin Islands (British) +// * `VI` - Virgin Islands (U.S.) +// * `WF` - Wallis and Futuna +// * `EH` - Western Sahara +// * `YE` - Yemen +// * `ZM` - Zambia +// * `ZW` - Zimbabwe +type AddressRequestCountry struct { CountryEnum CountryEnum String string + + typ string } -func NewAddressCountryFromCountryEnum(value CountryEnum) *AddressCountry { - return &AddressCountry{typeName: "countryEnum", CountryEnum: value} +func (a *AddressRequestCountry) GetCountryEnum() CountryEnum { + if a == nil { + return "" + } + return a.CountryEnum } -func NewAddressCountryFromString(value string) *AddressCountry { - return &AddressCountry{typeName: "string", String: value} +func (a *AddressRequestCountry) GetString() string { + if a == nil { + return "" + } + return a.String } -func (a *AddressCountry) UnmarshalJSON(data []byte) error { +func (a *AddressRequestCountry) UnmarshalJSON(data []byte) error { var valueCountryEnum CountryEnum if err := json.Unmarshal(data, &valueCountryEnum); err == nil { - a.typeName = "countryEnum" + a.typ = "CountryEnum" a.CountryEnum = valueCountryEnum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" + a.typ = "String" a.String = valueString return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, a) } -func (a AddressCountry) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "countryEnum": +func (a AddressRequestCountry) MarshalJSON() ([]byte, error) { + if a.typ == "CountryEnum" || a.CountryEnum != "" { return json.Marshal(a.CountryEnum) - case "string": + } + if a.typ == "String" || a.String != "" { return json.Marshal(a.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) } -type AddressCountryVisitor interface { +type AddressRequestCountryVisitor interface { VisitCountryEnum(CountryEnum) error VisitString(string) error } -func (a *AddressCountry) Accept(visitor AddressCountryVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "countryEnum": +func (a *AddressRequestCountry) Accept(visitor AddressRequestCountryVisitor) error { + if a.typ == "CountryEnum" || a.CountryEnum != "" { return visitor.VisitCountryEnum(a.CountryEnum) - case "string": + } + if a.typ == "String" || a.String != "" { return visitor.VisitString(a.String) } + return fmt.Errorf("type %T does not include a non-empty union type", a) } -// # The Address Object -// -// ### Description -// -// The `Address` object is used to represent a contact's or company's address. -// -// ### Usage Example +// The address type. // -// Fetch from the `GET CompanyInfo` endpoint and view the company's addresses. -type AddressRequest struct { - // The address type. - // - // - `BILLING` - BILLING - // - `SHIPPING` - SHIPPING - Type *AddressRequestType `json:"type,omitempty"` - // Line 1 of the address's street. - Street1 *string `json:"street_1,omitempty"` - // Line 2 of the address's street. - Street2 *string `json:"street_2,omitempty"` - // The address's city. - City *string `json:"city,omitempty"` - // The address's state or region. - CountrySubdivision *string `json:"country_subdivision,omitempty"` - // The address's country. - // - // - `AF` - Afghanistan - // - `AX` - Åland Islands - // - `AL` - Albania - // - `DZ` - Algeria - // - `AS` - American Samoa - // - `AD` - Andorra - // - `AO` - Angola - // - `AI` - Anguilla - // - `AQ` - Antarctica - // - `AG` - Antigua and Barbuda - // - `AR` - Argentina - // - `AM` - Armenia - // - `AW` - Aruba - // - `AU` - Australia - // - `AT` - Austria - // - `AZ` - Azerbaijan - // - `BS` - Bahamas - // - `BH` - Bahrain - // - `BD` - Bangladesh - // - `BB` - Barbados - // - `BY` - Belarus - // - `BE` - Belgium - // - `BZ` - Belize - // - `BJ` - Benin - // - `BM` - Bermuda - // - `BT` - Bhutan - // - `BO` - Bolivia - // - `BQ` - Bonaire, Sint Eustatius and Saba - // - `BA` - Bosnia and Herzegovina - // - `BW` - Botswana - // - `BV` - Bouvet Island - // - `BR` - Brazil - // - `IO` - British Indian Ocean Territory - // - `BN` - Brunei - // - `BG` - Bulgaria - // - `BF` - Burkina Faso - // - `BI` - Burundi - // - `CV` - Cabo Verde - // - `KH` - Cambodia - // - `CM` - Cameroon - // - `CA` - Canada - // - `KY` - Cayman Islands - // - `CF` - Central African Republic - // - `TD` - Chad - // - `CL` - Chile - // - `CN` - China - // - `CX` - Christmas Island - // - `CC` - Cocos (Keeling) Islands - // - `CO` - Colombia - // - `KM` - Comoros - // - `CG` - Congo - // - `CD` - Congo (the Democratic Republic of the) - // - `CK` - Cook Islands - // - `CR` - Costa Rica - // - `CI` - Côte d'Ivoire - // - `HR` - Croatia - // - `CU` - Cuba - // - `CW` - Curaçao - // - `CY` - Cyprus - // - `CZ` - Czechia - // - `DK` - Denmark - // - `DJ` - Djibouti - // - `DM` - Dominica - // - `DO` - Dominican Republic - // - `EC` - Ecuador - // - `EG` - Egypt - // - `SV` - El Salvador - // - `GQ` - Equatorial Guinea - // - `ER` - Eritrea - // - `EE` - Estonia - // - `SZ` - Eswatini - // - `ET` - Ethiopia - // - `FK` - Falkland Islands (Malvinas) - // - `FO` - Faroe Islands - // - `FJ` - Fiji - // - `FI` - Finland - // - `FR` - France - // - `GF` - French Guiana - // - `PF` - French Polynesia - // - `TF` - French Southern Territories - // - `GA` - Gabon - // - `GM` - Gambia - // - `GE` - Georgia - // - `DE` - Germany - // - `GH` - Ghana - // - `GI` - Gibraltar - // - `GR` - Greece - // - `GL` - Greenland - // - `GD` - Grenada - // - `GP` - Guadeloupe - // - `GU` - Guam - // - `GT` - Guatemala - // - `GG` - Guernsey - // - `GN` - Guinea - // - `GW` - Guinea-Bissau - // - `GY` - Guyana - // - `HT` - Haiti - // - `HM` - Heard Island and McDonald Islands - // - `VA` - Holy See - // - `HN` - Honduras - // - `HK` - Hong Kong - // - `HU` - Hungary - // - `IS` - Iceland - // - `IN` - India - // - `ID` - Indonesia - // - `IR` - Iran - // - `IQ` - Iraq - // - `IE` - Ireland - // - `IM` - Isle of Man - // - `IL` - Israel - // - `IT` - Italy - // - `JM` - Jamaica - // - `JP` - Japan - // - `JE` - Jersey - // - `JO` - Jordan - // - `KZ` - Kazakhstan - // - `KE` - Kenya - // - `KI` - Kiribati - // - `KW` - Kuwait - // - `KG` - Kyrgyzstan - // - `LA` - Laos - // - `LV` - Latvia - // - `LB` - Lebanon - // - `LS` - Lesotho - // - `LR` - Liberia - // - `LY` - Libya - // - `LI` - Liechtenstein - // - `LT` - Lithuania - // - `LU` - Luxembourg - // - `MO` - Macao - // - `MG` - Madagascar - // - `MW` - Malawi - // - `MY` - Malaysia - // - `MV` - Maldives - // - `ML` - Mali - // - `MT` - Malta - // - `MH` - Marshall Islands - // - `MQ` - Martinique - // - `MR` - Mauritania - // - `MU` - Mauritius - // - `YT` - Mayotte - // - `MX` - Mexico - // - `FM` - Micronesia (Federated States of) - // - `MD` - Moldova - // - `MC` - Monaco - // - `MN` - Mongolia - // - `ME` - Montenegro - // - `MS` - Montserrat - // - `MA` - Morocco - // - `MZ` - Mozambique - // - `MM` - Myanmar - // - `NA` - Namibia - // - `NR` - Nauru - // - `NP` - Nepal - // - `NL` - Netherlands - // - `NC` - New Caledonia - // - `NZ` - New Zealand - // - `NI` - Nicaragua - // - `NE` - Niger - // - `NG` - Nigeria - // - `NU` - Niue - // - `NF` - Norfolk Island - // - `KP` - North Korea - // - `MK` - North Macedonia - // - `MP` - Northern Mariana Islands - // - `NO` - Norway - // - `OM` - Oman - // - `PK` - Pakistan - // - `PW` - Palau - // - `PS` - Palestine, State of - // - `PA` - Panama - // - `PG` - Papua New Guinea - // - `PY` - Paraguay - // - `PE` - Peru - // - `PH` - Philippines - // - `PN` - Pitcairn - // - `PL` - Poland - // - `PT` - Portugal - // - `PR` - Puerto Rico - // - `QA` - Qatar - // - `RE` - Réunion - // - `RO` - Romania - // - `RU` - Russia - // - `RW` - Rwanda - // - `BL` - Saint Barthélemy - // - `SH` - Saint Helena, Ascension and Tristan da Cunha - // - `KN` - Saint Kitts and Nevis - // - `LC` - Saint Lucia - // - `MF` - Saint Martin (French part) - // - `PM` - Saint Pierre and Miquelon - // - `VC` - Saint Vincent and the Grenadines - // - `WS` - Samoa - // - `SM` - San Marino - // - `ST` - Sao Tome and Principe - // - `SA` - Saudi Arabia - // - `SN` - Senegal - // - `RS` - Serbia - // - `SC` - Seychelles - // - `SL` - Sierra Leone - // - `SG` - Singapore - // - `SX` - Sint Maarten (Dutch part) - // - `SK` - Slovakia - // - `SI` - Slovenia - // - `SB` - Solomon Islands - // - `SO` - Somalia - // - `ZA` - South Africa - // - `GS` - South Georgia and the South Sandwich Islands - // - `KR` - South Korea - // - `SS` - South Sudan - // - `ES` - Spain - // - `LK` - Sri Lanka - // - `SD` - Sudan - // - `SR` - Suriname - // - `SJ` - Svalbard and Jan Mayen - // - `SE` - Sweden - // - `CH` - Switzerland - // - `SY` - Syria - // - `TW` - Taiwan - // - `TJ` - Tajikistan - // - `TZ` - Tanzania - // - `TH` - Thailand - // - `TL` - Timor-Leste - // - `TG` - Togo - // - `TK` - Tokelau - // - `TO` - Tonga - // - `TT` - Trinidad and Tobago - // - `TN` - Tunisia - // - `TR` - Turkey - // - `TM` - Turkmenistan - // - `TC` - Turks and Caicos Islands - // - `TV` - Tuvalu - // - `UG` - Uganda - // - `UA` - Ukraine - // - `AE` - United Arab Emirates - // - `GB` - United Kingdom - // - `UM` - United States Minor Outlying Islands - // - `US` - United States of America - // - `UY` - Uruguay - // - `UZ` - Uzbekistan - // - `VU` - Vanuatu - // - `VE` - Venezuela - // - `VN` - Vietnam - // - `VG` - Virgin Islands (British) - // - `VI` - Virgin Islands (U.S.) - // - `WF` - Wallis and Futuna - // - `EH` - Western Sahara - // - `YE` - Yemen - // - `ZM` - Zambia - // - `ZW` - Zimbabwe - Country *AddressRequestCountry `json:"country,omitempty"` - // The address's zip code. - ZipCode *string `json:"zip_code,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` - - _rawJSON json.RawMessage -} - -func (a *AddressRequest) UnmarshalJSON(data []byte) error { - type unmarshaler AddressRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *a = AddressRequest(value) - a._rawJSON = json.RawMessage(data) - return nil -} - -func (a *AddressRequest) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(a); err == nil { - return value - } - return fmt.Sprintf("%#v", a) -} - -// The address's country. -// -// - `AF` - Afghanistan -// - `AX` - Åland Islands -// - `AL` - Albania -// - `DZ` - Algeria -// - `AS` - American Samoa -// - `AD` - Andorra -// - `AO` - Angola -// - `AI` - Anguilla -// - `AQ` - Antarctica -// - `AG` - Antigua and Barbuda -// - `AR` - Argentina -// - `AM` - Armenia -// - `AW` - Aruba -// - `AU` - Australia -// - `AT` - Austria -// - `AZ` - Azerbaijan -// - `BS` - Bahamas -// - `BH` - Bahrain -// - `BD` - Bangladesh -// - `BB` - Barbados -// - `BY` - Belarus -// - `BE` - Belgium -// - `BZ` - Belize -// - `BJ` - Benin -// - `BM` - Bermuda -// - `BT` - Bhutan -// - `BO` - Bolivia -// - `BQ` - Bonaire, Sint Eustatius and Saba -// - `BA` - Bosnia and Herzegovina -// - `BW` - Botswana -// - `BV` - Bouvet Island -// - `BR` - Brazil -// - `IO` - British Indian Ocean Territory -// - `BN` - Brunei -// - `BG` - Bulgaria -// - `BF` - Burkina Faso -// - `BI` - Burundi -// - `CV` - Cabo Verde -// - `KH` - Cambodia -// - `CM` - Cameroon -// - `CA` - Canada -// - `KY` - Cayman Islands -// - `CF` - Central African Republic -// - `TD` - Chad -// - `CL` - Chile -// - `CN` - China -// - `CX` - Christmas Island -// - `CC` - Cocos (Keeling) Islands -// - `CO` - Colombia -// - `KM` - Comoros -// - `CG` - Congo -// - `CD` - Congo (the Democratic Republic of the) -// - `CK` - Cook Islands -// - `CR` - Costa Rica -// - `CI` - Côte d'Ivoire -// - `HR` - Croatia -// - `CU` - Cuba -// - `CW` - Curaçao -// - `CY` - Cyprus -// - `CZ` - Czechia -// - `DK` - Denmark -// - `DJ` - Djibouti -// - `DM` - Dominica -// - `DO` - Dominican Republic -// - `EC` - Ecuador -// - `EG` - Egypt -// - `SV` - El Salvador -// - `GQ` - Equatorial Guinea -// - `ER` - Eritrea -// - `EE` - Estonia -// - `SZ` - Eswatini -// - `ET` - Ethiopia -// - `FK` - Falkland Islands (Malvinas) -// - `FO` - Faroe Islands -// - `FJ` - Fiji -// - `FI` - Finland -// - `FR` - France -// - `GF` - French Guiana -// - `PF` - French Polynesia -// - `TF` - French Southern Territories -// - `GA` - Gabon -// - `GM` - Gambia -// - `GE` - Georgia -// - `DE` - Germany -// - `GH` - Ghana -// - `GI` - Gibraltar -// - `GR` - Greece -// - `GL` - Greenland -// - `GD` - Grenada -// - `GP` - Guadeloupe -// - `GU` - Guam -// - `GT` - Guatemala -// - `GG` - Guernsey -// - `GN` - Guinea -// - `GW` - Guinea-Bissau -// - `GY` - Guyana -// - `HT` - Haiti -// - `HM` - Heard Island and McDonald Islands -// - `VA` - Holy See -// - `HN` - Honduras -// - `HK` - Hong Kong -// - `HU` - Hungary -// - `IS` - Iceland -// - `IN` - India -// - `ID` - Indonesia -// - `IR` - Iran -// - `IQ` - Iraq -// - `IE` - Ireland -// - `IM` - Isle of Man -// - `IL` - Israel -// - `IT` - Italy -// - `JM` - Jamaica -// - `JP` - Japan -// - `JE` - Jersey -// - `JO` - Jordan -// - `KZ` - Kazakhstan -// - `KE` - Kenya -// - `KI` - Kiribati -// - `KW` - Kuwait -// - `KG` - Kyrgyzstan -// - `LA` - Laos -// - `LV` - Latvia -// - `LB` - Lebanon -// - `LS` - Lesotho -// - `LR` - Liberia -// - `LY` - Libya -// - `LI` - Liechtenstein -// - `LT` - Lithuania -// - `LU` - Luxembourg -// - `MO` - Macao -// - `MG` - Madagascar -// - `MW` - Malawi -// - `MY` - Malaysia -// - `MV` - Maldives -// - `ML` - Mali -// - `MT` - Malta -// - `MH` - Marshall Islands -// - `MQ` - Martinique -// - `MR` - Mauritania -// - `MU` - Mauritius -// - `YT` - Mayotte -// - `MX` - Mexico -// - `FM` - Micronesia (Federated States of) -// - `MD` - Moldova -// - `MC` - Monaco -// - `MN` - Mongolia -// - `ME` - Montenegro -// - `MS` - Montserrat -// - `MA` - Morocco -// - `MZ` - Mozambique -// - `MM` - Myanmar -// - `NA` - Namibia -// - `NR` - Nauru -// - `NP` - Nepal -// - `NL` - Netherlands -// - `NC` - New Caledonia -// - `NZ` - New Zealand -// - `NI` - Nicaragua -// - `NE` - Niger -// - `NG` - Nigeria -// - `NU` - Niue -// - `NF` - Norfolk Island -// - `KP` - North Korea -// - `MK` - North Macedonia -// - `MP` - Northern Mariana Islands -// - `NO` - Norway -// - `OM` - Oman -// - `PK` - Pakistan -// - `PW` - Palau -// - `PS` - Palestine, State of -// - `PA` - Panama -// - `PG` - Papua New Guinea -// - `PY` - Paraguay -// - `PE` - Peru -// - `PH` - Philippines -// - `PN` - Pitcairn -// - `PL` - Poland -// - `PT` - Portugal -// - `PR` - Puerto Rico -// - `QA` - Qatar -// - `RE` - Réunion -// - `RO` - Romania -// - `RU` - Russia -// - `RW` - Rwanda -// - `BL` - Saint Barthélemy -// - `SH` - Saint Helena, Ascension and Tristan da Cunha -// - `KN` - Saint Kitts and Nevis -// - `LC` - Saint Lucia -// - `MF` - Saint Martin (French part) -// - `PM` - Saint Pierre and Miquelon -// - `VC` - Saint Vincent and the Grenadines -// - `WS` - Samoa -// - `SM` - San Marino -// - `ST` - Sao Tome and Principe -// - `SA` - Saudi Arabia -// - `SN` - Senegal -// - `RS` - Serbia -// - `SC` - Seychelles -// - `SL` - Sierra Leone -// - `SG` - Singapore -// - `SX` - Sint Maarten (Dutch part) -// - `SK` - Slovakia -// - `SI` - Slovenia -// - `SB` - Solomon Islands -// - `SO` - Somalia -// - `ZA` - South Africa -// - `GS` - South Georgia and the South Sandwich Islands -// - `KR` - South Korea -// - `SS` - South Sudan -// - `ES` - Spain -// - `LK` - Sri Lanka -// - `SD` - Sudan -// - `SR` - Suriname -// - `SJ` - Svalbard and Jan Mayen -// - `SE` - Sweden -// - `CH` - Switzerland -// - `SY` - Syria -// - `TW` - Taiwan -// - `TJ` - Tajikistan -// - `TZ` - Tanzania -// - `TH` - Thailand -// - `TL` - Timor-Leste -// - `TG` - Togo -// - `TK` - Tokelau -// - `TO` - Tonga -// - `TT` - Trinidad and Tobago -// - `TN` - Tunisia -// - `TR` - Turkey -// - `TM` - Turkmenistan -// - `TC` - Turks and Caicos Islands -// - `TV` - Tuvalu -// - `UG` - Uganda -// - `UA` - Ukraine -// - `AE` - United Arab Emirates -// - `GB` - United Kingdom -// - `UM` - United States Minor Outlying Islands -// - `US` - United States of America -// - `UY` - Uruguay -// - `UZ` - Uzbekistan -// - `VU` - Vanuatu -// - `VE` - Venezuela -// - `VN` - Vietnam -// - `VG` - Virgin Islands (British) -// - `VI` - Virgin Islands (U.S.) -// - `WF` - Wallis and Futuna -// - `EH` - Western Sahara -// - `YE` - Yemen -// - `ZM` - Zambia -// - `ZW` - Zimbabwe -type AddressRequestCountry struct { - typeName string - CountryEnum CountryEnum - String string -} - -func NewAddressRequestCountryFromCountryEnum(value CountryEnum) *AddressRequestCountry { - return &AddressRequestCountry{typeName: "countryEnum", CountryEnum: value} -} - -func NewAddressRequestCountryFromString(value string) *AddressRequestCountry { - return &AddressRequestCountry{typeName: "string", String: value} -} - -func (a *AddressRequestCountry) UnmarshalJSON(data []byte) error { - var valueCountryEnum CountryEnum - if err := json.Unmarshal(data, &valueCountryEnum); err == nil { - a.typeName = "countryEnum" - a.CountryEnum = valueCountryEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" - a.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, a) -} - -func (a AddressRequestCountry) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "countryEnum": - return json.Marshal(a.CountryEnum) - case "string": - return json.Marshal(a.String) - } -} - -type AddressRequestCountryVisitor interface { - VisitCountryEnum(CountryEnum) error - VisitString(string) error -} - -func (a *AddressRequestCountry) Accept(visitor AddressRequestCountryVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "countryEnum": - return visitor.VisitCountryEnum(a.CountryEnum) - case "string": - return visitor.VisitString(a.String) - } -} - -// The address type. -// -// - `BILLING` - BILLING -// - `SHIPPING` - SHIPPING +// * `BILLING` - BILLING +// * `SHIPPING` - SHIPPING type AddressRequestType struct { - typeName string AddressTypeEnum AddressTypeEnum String string + + typ string } -func NewAddressRequestTypeFromAddressTypeEnum(value AddressTypeEnum) *AddressRequestType { - return &AddressRequestType{typeName: "addressTypeEnum", AddressTypeEnum: value} +func (a *AddressRequestType) GetAddressTypeEnum() AddressTypeEnum { + if a == nil { + return "" + } + return a.AddressTypeEnum } -func NewAddressRequestTypeFromString(value string) *AddressRequestType { - return &AddressRequestType{typeName: "string", String: value} +func (a *AddressRequestType) GetString() string { + if a == nil { + return "" + } + return a.String } func (a *AddressRequestType) UnmarshalJSON(data []byte) error { var valueAddressTypeEnum AddressTypeEnum if err := json.Unmarshal(data, &valueAddressTypeEnum); err == nil { - a.typeName = "addressTypeEnum" + a.typ = "AddressTypeEnum" a.AddressTypeEnum = valueAddressTypeEnum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" + a.typ = "String" a.String = valueString return nil } @@ -3906,14 +3154,13 @@ func (a *AddressRequestType) UnmarshalJSON(data []byte) error { } func (a AddressRequestType) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "addressTypeEnum": + if a.typ == "AddressTypeEnum" || a.AddressTypeEnum != "" { return json.Marshal(a.AddressTypeEnum) - case "string": + } + if a.typ == "String" || a.String != "" { return json.Marshal(a.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) } type AddressRequestTypeVisitor interface { @@ -3922,44 +3169,50 @@ type AddressRequestTypeVisitor interface { } func (a *AddressRequestType) Accept(visitor AddressRequestTypeVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "addressTypeEnum": + if a.typ == "AddressTypeEnum" || a.AddressTypeEnum != "" { return visitor.VisitAddressTypeEnum(a.AddressTypeEnum) - case "string": + } + if a.typ == "String" || a.String != "" { return visitor.VisitString(a.String) } + return fmt.Errorf("type %T does not include a non-empty union type", a) } // The address type. // -// - `BILLING` - BILLING -// - `SHIPPING` - SHIPPING +// * `BILLING` - BILLING +// * `SHIPPING` - SHIPPING type AddressType struct { - typeName string AddressTypeEnum AddressTypeEnum String string + + typ string } -func NewAddressTypeFromAddressTypeEnum(value AddressTypeEnum) *AddressType { - return &AddressType{typeName: "addressTypeEnum", AddressTypeEnum: value} +func (a *AddressType) GetAddressTypeEnum() AddressTypeEnum { + if a == nil { + return "" + } + return a.AddressTypeEnum } -func NewAddressTypeFromString(value string) *AddressType { - return &AddressType{typeName: "string", String: value} +func (a *AddressType) GetString() string { + if a == nil { + return "" + } + return a.String } func (a *AddressType) UnmarshalJSON(data []byte) error { var valueAddressTypeEnum AddressTypeEnum if err := json.Unmarshal(data, &valueAddressTypeEnum); err == nil { - a.typeName = "addressTypeEnum" + a.typ = "AddressTypeEnum" a.AddressTypeEnum = valueAddressTypeEnum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" + a.typ = "String" a.String = valueString return nil } @@ -3967,14 +3220,13 @@ func (a *AddressType) UnmarshalJSON(data []byte) error { } func (a AddressType) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "addressTypeEnum": + if a.typ == "AddressTypeEnum" || a.AddressTypeEnum != "" { return json.Marshal(a.AddressTypeEnum) - case "string": + } + if a.typ == "String" || a.String != "" { return json.Marshal(a.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) } type AddressTypeVisitor interface { @@ -3983,18 +3235,17 @@ type AddressTypeVisitor interface { } func (a *AddressType) Accept(visitor AddressTypeVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "addressTypeEnum": + if a.typ == "AddressTypeEnum" || a.AddressTypeEnum != "" { return visitor.VisitAddressTypeEnum(a.AddressTypeEnum) - case "string": + } + if a.typ == "String" || a.String != "" { return visitor.VisitString(a.String) } + return fmt.Errorf("type %T does not include a non-empty union type", a) } -// - `BILLING` - BILLING -// - `SHIPPING` - SHIPPING +// * `BILLING` - BILLING +// * `SHIPPING` - SHIPPING type AddressTypeEnum string const ( @@ -4017,30412 +3268,11235 @@ func (a AddressTypeEnum) Ptr() *AddressTypeEnum { return &a } -type AdvancedMetadata struct { - Id string `json:"id"` - DisplayName *string `json:"display_name,omitempty"` - Description *string `json:"description,omitempty"` - IsRequired *bool `json:"is_required,omitempty"` - IsCustom *bool `json:"is_custom,omitempty"` - FieldChoices []interface{} `json:"field_choices,omitempty"` +// # The BankFeedAccount Object +// ### Description +// The `BankFeedAccount` object represents a bank feed account, detailing various attributes including account identifiers, names, currency, and balance information. This object is central to managing and tracking bank feed accounts within the system. +// +// ### Usage Example +// Fetch from the `GET BankFeedAccount` endpoint to view details of a bank feed account. +type BankFeedAccount struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The unique identifier of the source account from our customer’s platform. + SourceAccountId *string `json:"source_account_id,omitempty" url:"source_account_id,omitempty"` + // The unique identifier of the target account from the third party software. + TargetAccountId *string `json:"target_account_id,omitempty" url:"target_account_id,omitempty"` + // The name of the source account as stored in our customer’s platform. + SourceAccountName *string `json:"source_account_name,omitempty" url:"source_account_name,omitempty"` + // The human-readable account number of the source account as stored in our customer’s platform. + SourceAccountNumber *string `json:"source_account_number,omitempty" url:"source_account_number,omitempty"` + // The name of the target account from the third party software. + TargetAccountName *string `json:"target_account_name,omitempty" url:"target_account_name,omitempty"` + // The currency code of the bank feed. + // + // * `XUA` - ADB Unit of Account + // * `AFN` - Afghan Afghani + // * `AFA` - Afghan Afghani (1927–2002) + // * `ALL` - Albanian Lek + // * `ALK` - Albanian Lek (1946–1965) + // * `DZD` - Algerian Dinar + // * `ADP` - Andorran Peseta + // * `AOA` - Angolan Kwanza + // * `AOK` - Angolan Kwanza (1977–1991) + // * `AON` - Angolan New Kwanza (1990–2000) + // * `AOR` - Angolan Readjusted Kwanza (1995–1999) + // * `ARA` - Argentine Austral + // * `ARS` - Argentine Peso + // * `ARM` - Argentine Peso (1881–1970) + // * `ARP` - Argentine Peso (1983–1985) + // * `ARL` - Argentine Peso Ley (1970–1983) + // * `AMD` - Armenian Dram + // * `AWG` - Aruban Florin + // * `AUD` - Australian Dollar + // * `ATS` - Austrian Schilling + // * `AZN` - Azerbaijani Manat + // * `AZM` - Azerbaijani Manat (1993–2006) + // * `BSD` - Bahamian Dollar + // * `BHD` - Bahraini Dinar + // * `BDT` - Bangladeshi Taka + // * `BBD` - Barbadian Dollar + // * `BYN` - Belarusian Ruble + // * `BYB` - Belarusian Ruble (1994–1999) + // * `BYR` - Belarusian Ruble (2000–2016) + // * `BEF` - Belgian Franc + // * `BEC` - Belgian Franc (convertible) + // * `BEL` - Belgian Franc (financial) + // * `BZD` - Belize Dollar + // * `BMD` - Bermudan Dollar + // * `BTN` - Bhutanese Ngultrum + // * `BOB` - Bolivian Boliviano + // * `BOL` - Bolivian Boliviano (1863–1963) + // * `BOV` - Bolivian Mvdol + // * `BOP` - Bolivian Peso + // * `BAM` - Bosnia-Herzegovina Convertible Mark + // * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + // * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + // * `BWP` - Botswanan Pula + // * `BRC` - Brazilian Cruzado (1986–1989) + // * `BRZ` - Brazilian Cruzeiro (1942–1967) + // * `BRE` - Brazilian Cruzeiro (1990–1993) + // * `BRR` - Brazilian Cruzeiro (1993–1994) + // * `BRN` - Brazilian New Cruzado (1989–1990) + // * `BRB` - Brazilian New Cruzeiro (1967–1986) + // * `BRL` - Brazilian Real + // * `GBP` - British Pound + // * `BND` - Brunei Dollar + // * `BGL` - Bulgarian Hard Lev + // * `BGN` - Bulgarian Lev + // * `BGO` - Bulgarian Lev (1879–1952) + // * `BGM` - Bulgarian Socialist Lev + // * `BUK` - Burmese Kyat + // * `BIF` - Burundian Franc + // * `XPF` - CFP Franc + // * `KHR` - Cambodian Riel + // * `CAD` - Canadian Dollar + // * `CVE` - Cape Verdean Escudo + // * `KYD` - Cayman Islands Dollar + // * `XAF` - Central African CFA Franc + // * `CLE` - Chilean Escudo + // * `CLP` - Chilean Peso + // * `CLF` - Chilean Unit of Account (UF) + // * `CNX` - Chinese People’s Bank Dollar + // * `CNY` - Chinese Yuan + // * `CNH` - Chinese Yuan (offshore) + // * `COP` - Colombian Peso + // * `COU` - Colombian Real Value Unit + // * `KMF` - Comorian Franc + // * `CDF` - Congolese Franc + // * `CRC` - Costa Rican Colón + // * `HRD` - Croatian Dinar + // * `HRK` - Croatian Kuna + // * `CUC` - Cuban Convertible Peso + // * `CUP` - Cuban Peso + // * `CYP` - Cypriot Pound + // * `CZK` - Czech Koruna + // * `CSK` - Czechoslovak Hard Koruna + // * `DKK` - Danish Krone + // * `DJF` - Djiboutian Franc + // * `DOP` - Dominican Peso + // * `NLG` - Dutch Guilder + // * `XCD` - East Caribbean Dollar + // * `DDM` - East German Mark + // * `ECS` - Ecuadorian Sucre + // * `ECV` - Ecuadorian Unit of Constant Value + // * `EGP` - Egyptian Pound + // * `GQE` - Equatorial Guinean Ekwele + // * `ERN` - Eritrean Nakfa + // * `EEK` - Estonian Kroon + // * `ETB` - Ethiopian Birr + // * `EUR` - Euro + // * `XBA` - European Composite Unit + // * `XEU` - European Currency Unit + // * `XBB` - European Monetary Unit + // * `XBC` - European Unit of Account (XBC) + // * `XBD` - European Unit of Account (XBD) + // * `FKP` - Falkland Islands Pound + // * `FJD` - Fijian Dollar + // * `FIM` - Finnish Markka + // * `FRF` - French Franc + // * `XFO` - French Gold Franc + // * `XFU` - French UIC-Franc + // * `GMD` - Gambian Dalasi + // * `GEK` - Georgian Kupon Larit + // * `GEL` - Georgian Lari + // * `DEM` - German Mark + // * `GHS` - Ghanaian Cedi + // * `GHC` - Ghanaian Cedi (1979–2007) + // * `GIP` - Gibraltar Pound + // * `XAU` - Gold + // * `GRD` - Greek Drachma + // * `GTQ` - Guatemalan Quetzal + // * `GWP` - Guinea-Bissau Peso + // * `GNF` - Guinean Franc + // * `GNS` - Guinean Syli + // * `GYD` - Guyanaese Dollar + // * `HTG` - Haitian Gourde + // * `HNL` - Honduran Lempira + // * `HKD` - Hong Kong Dollar + // * `HUF` - Hungarian Forint + // * `IMP` - IMP + // * `ISK` - Icelandic Króna + // * `ISJ` - Icelandic Króna (1918–1981) + // * `INR` - Indian Rupee + // * `IDR` - Indonesian Rupiah + // * `IRR` - Iranian Rial + // * `IQD` - Iraqi Dinar + // * `IEP` - Irish Pound + // * `ILS` - Israeli New Shekel + // * `ILP` - Israeli Pound + // * `ILR` - Israeli Shekel (1980–1985) + // * `ITL` - Italian Lira + // * `JMD` - Jamaican Dollar + // * `JPY` - Japanese Yen + // * `JOD` - Jordanian Dinar + // * `KZT` - Kazakhstani Tenge + // * `KES` - Kenyan Shilling + // * `KWD` - Kuwaiti Dinar + // * `KGS` - Kyrgystani Som + // * `LAK` - Laotian Kip + // * `LVL` - Latvian Lats + // * `LVR` - Latvian Ruble + // * `LBP` - Lebanese Pound + // * `LSL` - Lesotho Loti + // * `LRD` - Liberian Dollar + // * `LYD` - Libyan Dinar + // * `LTL` - Lithuanian Litas + // * `LTT` - Lithuanian Talonas + // * `LUL` - Luxembourg Financial Franc + // * `LUC` - Luxembourgian Convertible Franc + // * `LUF` - Luxembourgian Franc + // * `MOP` - Macanese Pataca + // * `MKD` - Macedonian Denar + // * `MKN` - Macedonian Denar (1992–1993) + // * `MGA` - Malagasy Ariary + // * `MGF` - Malagasy Franc + // * `MWK` - Malawian Kwacha + // * `MYR` - Malaysian Ringgit + // * `MVR` - Maldivian Rufiyaa + // * `MVP` - Maldivian Rupee (1947–1981) + // * `MLF` - Malian Franc + // * `MTL` - Maltese Lira + // * `MTP` - Maltese Pound + // * `MRU` - Mauritanian Ouguiya + // * `MRO` - Mauritanian Ouguiya (1973–2017) + // * `MUR` - Mauritian Rupee + // * `MXV` - Mexican Investment Unit + // * `MXN` - Mexican Peso + // * `MXP` - Mexican Silver Peso (1861–1992) + // * `MDC` - Moldovan Cupon + // * `MDL` - Moldovan Leu + // * `MCF` - Monegasque Franc + // * `MNT` - Mongolian Tugrik + // * `MAD` - Moroccan Dirham + // * `MAF` - Moroccan Franc + // * `MZE` - Mozambican Escudo + // * `MZN` - Mozambican Metical + // * `MZM` - Mozambican Metical (1980–2006) + // * `MMK` - Myanmar Kyat + // * `NAD` - Namibian Dollar + // * `NPR` - Nepalese Rupee + // * `ANG` - Netherlands Antillean Guilder + // * `TWD` - New Taiwan Dollar + // * `NZD` - New Zealand Dollar + // * `NIO` - Nicaraguan Córdoba + // * `NIC` - Nicaraguan Córdoba (1988–1991) + // * `NGN` - Nigerian Naira + // * `KPW` - North Korean Won + // * `NOK` - Norwegian Krone + // * `OMR` - Omani Rial + // * `PKR` - Pakistani Rupee + // * `XPD` - Palladium + // * `PAB` - Panamanian Balboa + // * `PGK` - Papua New Guinean Kina + // * `PYG` - Paraguayan Guarani + // * `PEI` - Peruvian Inti + // * `PEN` - Peruvian Sol + // * `PES` - Peruvian Sol (1863–1965) + // * `PHP` - Philippine Peso + // * `XPT` - Platinum + // * `PLN` - Polish Zloty + // * `PLZ` - Polish Zloty (1950–1995) + // * `PTE` - Portuguese Escudo + // * `GWE` - Portuguese Guinea Escudo + // * `QAR` - Qatari Rial + // * `XRE` - RINET Funds + // * `RHD` - Rhodesian Dollar + // * `RON` - Romanian Leu + // * `ROL` - Romanian Leu (1952–2006) + // * `RUB` - Russian Ruble + // * `RUR` - Russian Ruble (1991–1998) + // * `RWF` - Rwandan Franc + // * `SVC` - Salvadoran Colón + // * `WST` - Samoan Tala + // * `SAR` - Saudi Riyal + // * `RSD` - Serbian Dinar + // * `CSD` - Serbian Dinar (2002–2006) + // * `SCR` - Seychellois Rupee + // * `SLL` - Sierra Leonean Leone + // * `XAG` - Silver + // * `SGD` - Singapore Dollar + // * `SKK` - Slovak Koruna + // * `SIT` - Slovenian Tolar + // * `SBD` - Solomon Islands Dollar + // * `SOS` - Somali Shilling + // * `ZAR` - South African Rand + // * `ZAL` - South African Rand (financial) + // * `KRH` - South Korean Hwan (1953–1962) + // * `KRW` - South Korean Won + // * `KRO` - South Korean Won (1945–1953) + // * `SSP` - South Sudanese Pound + // * `SUR` - Soviet Rouble + // * `ESP` - Spanish Peseta + // * `ESA` - Spanish Peseta (A account) + // * `ESB` - Spanish Peseta (convertible account) + // * `XDR` - Special Drawing Rights + // * `LKR` - Sri Lankan Rupee + // * `SHP` - St. Helena Pound + // * `XSU` - Sucre + // * `SDD` - Sudanese Dinar (1992–2007) + // * `SDG` - Sudanese Pound + // * `SDP` - Sudanese Pound (1957–1998) + // * `SRD` - Surinamese Dollar + // * `SRG` - Surinamese Guilder + // * `SZL` - Swazi Lilangeni + // * `SEK` - Swedish Krona + // * `CHF` - Swiss Franc + // * `SYP` - Syrian Pound + // * `STN` - São Tomé & Príncipe Dobra + // * `STD` - São Tomé & Príncipe Dobra (1977–2017) + // * `TVD` - TVD + // * `TJR` - Tajikistani Ruble + // * `TJS` - Tajikistani Somoni + // * `TZS` - Tanzanian Shilling + // * `XTS` - Testing Currency Code + // * `THB` - Thai Baht + // * `XXX` - The codes assigned for transactions where no currency is involved + // * `TPE` - Timorese Escudo + // * `TOP` - Tongan Paʻanga + // * `TTD` - Trinidad & Tobago Dollar + // * `TND` - Tunisian Dinar + // * `TRY` - Turkish Lira + // * `TRL` - Turkish Lira (1922–2005) + // * `TMT` - Turkmenistani Manat + // * `TMM` - Turkmenistani Manat (1993–2009) + // * `USD` - US Dollar + // * `USN` - US Dollar (Next day) + // * `USS` - US Dollar (Same day) + // * `UGX` - Ugandan Shilling + // * `UGS` - Ugandan Shilling (1966–1987) + // * `UAH` - Ukrainian Hryvnia + // * `UAK` - Ukrainian Karbovanets + // * `AED` - United Arab Emirates Dirham + // * `UYW` - Uruguayan Nominal Wage Index Unit + // * `UYU` - Uruguayan Peso + // * `UYP` - Uruguayan Peso (1975–1993) + // * `UYI` - Uruguayan Peso (Indexed Units) + // * `UZS` - Uzbekistani Som + // * `VUV` - Vanuatu Vatu + // * `VES` - Venezuelan Bolívar + // * `VEB` - Venezuelan Bolívar (1871–2008) + // * `VEF` - Venezuelan Bolívar (2008–2018) + // * `VND` - Vietnamese Dong + // * `VNN` - Vietnamese Dong (1978–1985) + // * `CHE` - WIR Euro + // * `CHW` - WIR Franc + // * `XOF` - West African CFA Franc + // * `YDD` - Yemeni Dinar + // * `YER` - Yemeni Rial + // * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + // * `YUD` - Yugoslavian Hard Dinar (1966–1990) + // * `YUM` - Yugoslavian New Dinar (1994–2002) + // * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + // * `ZWN` - ZWN + // * `ZRN` - Zairean New Zaire (1993–1998) + // * `ZRZ` - Zairean Zaire (1971–1993) + // * `ZMW` - Zambian Kwacha + // * `ZMK` - Zambian Kwacha (1968–2012) + // * `ZWD` - Zimbabwean Dollar (1980–2008) + // * `ZWR` - Zimbabwean Dollar (2008) + // * `ZWL` - Zimbabwean Dollar (2009) + Currency *BankFeedAccountCurrency `json:"currency,omitempty" url:"currency,omitempty"` + // The status of the bank feed. + // + // * `ACTIVE` - ACTIVE + // * `INACTIVE` - INACTIVE + FeedStatus *BankFeedAccountFeedStatus `json:"feed_status,omitempty" url:"feed_status,omitempty"` + // The start date of the bank feed’s transactions. + FeedStartDate *time.Time `json:"feed_start_date,omitempty" url:"feed_start_date,omitempty"` + // The current balance of funds in the source account. + SourceAccountBalance *float64 `json:"source_account_balance,omitempty" url:"source_account_balance,omitempty"` + // The type of the account. + // + // * `BANK` - BANK + // * `CREDIT_CARD` - CREDIT_CARD + AccountType *BankFeedAccountAccountType `json:"account_type,omitempty" url:"account_type,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []map[string]interface{} `json:"remote_data,omitempty" url:"remote_data,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (a *AdvancedMetadata) UnmarshalJSON(data []byte) error { - type unmarshaler AdvancedMetadata - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (b *BankFeedAccount) GetId() *string { + if b == nil { + return nil } - *a = AdvancedMetadata(value) - a._rawJSON = json.RawMessage(data) - return nil + return b.Id } -func (a *AdvancedMetadata) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(a); err == nil { - return value +func (b *BankFeedAccount) GetRemoteId() *string { + if b == nil { + return nil } - return fmt.Sprintf("%#v", a) + return b.RemoteId } -type AsyncPassthroughReciept struct { - AsyncPassthroughReceiptId string `json:"async_passthrough_receipt_id"` - - _rawJSON json.RawMessage -} - -func (a *AsyncPassthroughReciept) UnmarshalJSON(data []byte) error { - type unmarshaler AsyncPassthroughReciept - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (b *BankFeedAccount) GetCreatedAt() *time.Time { + if b == nil { + return nil } - *a = AsyncPassthroughReciept(value) - a._rawJSON = json.RawMessage(data) - return nil + return b.CreatedAt } -func (a *AsyncPassthroughReciept) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(a); err == nil { - return value +func (b *BankFeedAccount) GetModifiedAt() *time.Time { + if b == nil { + return nil } - return fmt.Sprintf("%#v", a) -} - -type AsyncPostTask struct { - Status *AsyncPostTaskStatus `json:"status,omitempty"` - Result *AsyncPostTaskResult `json:"result,omitempty"` - - _rawJSON json.RawMessage + return b.ModifiedAt } -func (a *AsyncPostTask) UnmarshalJSON(data []byte) error { - type unmarshaler AsyncPostTask - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (b *BankFeedAccount) GetSourceAccountId() *string { + if b == nil { + return nil } - *a = AsyncPostTask(value) - a._rawJSON = json.RawMessage(data) - return nil + return b.SourceAccountId } -func (a *AsyncPostTask) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(a); err == nil { - return value +func (b *BankFeedAccount) GetTargetAccountId() *string { + if b == nil { + return nil } - return fmt.Sprintf("%#v", a) + return b.TargetAccountId } -type AsyncPostTaskResult struct { - StatusCode *int `json:"status_code,omitempty"` - Response map[string]interface{} `json:"response,omitempty"` - - _rawJSON json.RawMessage -} - -func (a *AsyncPostTaskResult) UnmarshalJSON(data []byte) error { - type unmarshaler AsyncPostTaskResult - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (b *BankFeedAccount) GetSourceAccountName() *string { + if b == nil { + return nil } - *a = AsyncPostTaskResult(value) - a._rawJSON = json.RawMessage(data) - return nil + return b.SourceAccountName } -func (a *AsyncPostTaskResult) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(a); err == nil { - return value +func (b *BankFeedAccount) GetSourceAccountNumber() *string { + if b == nil { + return nil } - return fmt.Sprintf("%#v", a) + return b.SourceAccountNumber } -type AsyncPostTaskStatus struct { - typeName string - AsyncPostTaskStatusEnum AsyncPostTaskStatusEnum - String string +func (b *BankFeedAccount) GetTargetAccountName() *string { + if b == nil { + return nil + } + return b.TargetAccountName } -func NewAsyncPostTaskStatusFromAsyncPostTaskStatusEnum(value AsyncPostTaskStatusEnum) *AsyncPostTaskStatus { - return &AsyncPostTaskStatus{typeName: "asyncPostTaskStatusEnum", AsyncPostTaskStatusEnum: value} +func (b *BankFeedAccount) GetCurrency() *BankFeedAccountCurrency { + if b == nil { + return nil + } + return b.Currency } -func NewAsyncPostTaskStatusFromString(value string) *AsyncPostTaskStatus { - return &AsyncPostTaskStatus{typeName: "string", String: value} +func (b *BankFeedAccount) GetFeedStatus() *BankFeedAccountFeedStatus { + if b == nil { + return nil + } + return b.FeedStatus } -func (a *AsyncPostTaskStatus) UnmarshalJSON(data []byte) error { - var valueAsyncPostTaskStatusEnum AsyncPostTaskStatusEnum - if err := json.Unmarshal(data, &valueAsyncPostTaskStatusEnum); err == nil { - a.typeName = "asyncPostTaskStatusEnum" - a.AsyncPostTaskStatusEnum = valueAsyncPostTaskStatusEnum +func (b *BankFeedAccount) GetFeedStartDate() *time.Time { + if b == nil { return nil } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" - a.String = valueString + return b.FeedStartDate +} + +func (b *BankFeedAccount) GetSourceAccountBalance() *float64 { + if b == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, a) + return b.SourceAccountBalance } -func (a AsyncPostTaskStatus) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "asyncPostTaskStatusEnum": - return json.Marshal(a.AsyncPostTaskStatusEnum) - case "string": - return json.Marshal(a.String) +func (b *BankFeedAccount) GetAccountType() *BankFeedAccountAccountType { + if b == nil { + return nil } + return b.AccountType } -type AsyncPostTaskStatusVisitor interface { - VisitAsyncPostTaskStatusEnum(AsyncPostTaskStatusEnum) error - VisitString(string) error +func (b *BankFeedAccount) GetRemoteWasDeleted() *bool { + if b == nil { + return nil + } + return b.RemoteWasDeleted } -func (a *AsyncPostTaskStatus) Accept(visitor AsyncPostTaskStatusVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "asyncPostTaskStatusEnum": - return visitor.VisitAsyncPostTaskStatusEnum(a.AsyncPostTaskStatusEnum) - case "string": - return visitor.VisitString(a.String) +func (b *BankFeedAccount) GetFieldMappings() map[string]interface{} { + if b == nil { + return nil } + return b.FieldMappings } -// - `QUEUED` - QUEUED -// - `IN_PROGRESS` - IN_PROGRESS -// - `COMPLETED` - COMPLETED -// - `FAILURE` - FAILURE -type AsyncPostTaskStatusEnum string - -const ( - AsyncPostTaskStatusEnumQueued AsyncPostTaskStatusEnum = "QUEUED" - AsyncPostTaskStatusEnumInProgress AsyncPostTaskStatusEnum = "IN_PROGRESS" - AsyncPostTaskStatusEnumCompleted AsyncPostTaskStatusEnum = "COMPLETED" - AsyncPostTaskStatusEnumFailure AsyncPostTaskStatusEnum = "FAILURE" -) - -func NewAsyncPostTaskStatusEnumFromString(s string) (AsyncPostTaskStatusEnum, error) { - switch s { - case "QUEUED": - return AsyncPostTaskStatusEnumQueued, nil - case "IN_PROGRESS": - return AsyncPostTaskStatusEnumInProgress, nil - case "COMPLETED": - return AsyncPostTaskStatusEnumCompleted, nil - case "FAILURE": - return AsyncPostTaskStatusEnumFailure, nil - } - var t AsyncPostTaskStatusEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) +func (b *BankFeedAccount) GetRemoteData() []map[string]interface{} { + if b == nil { + return nil + } + return b.RemoteData } -func (a AsyncPostTaskStatusEnum) Ptr() *AsyncPostTaskStatusEnum { - return &a +func (b *BankFeedAccount) GetExtraProperties() map[string]interface{} { + return b.extraProperties } -type AuditLogEvent struct { - Id *string `json:"id,omitempty"` - // The User's full name at the time of this Event occurring. - UserName *string `json:"user_name,omitempty"` - // The User's email at the time of this Event occurring. - UserEmail *string `json:"user_email,omitempty"` - // Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. - // - // - `ADMIN` - ADMIN - // - `DEVELOPER` - DEVELOPER - // - `MEMBER` - MEMBER - // - `API` - API - // - `SYSTEM` - SYSTEM - // - `MERGE_TEAM` - MERGE_TEAM - Role *AuditLogEventRole `json:"role,omitempty"` - IpAddress string `json:"ip_address"` - // Designates the type of event that occurred. - // - // - `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY - // - `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY - // - `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY - // - `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY - // - `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY - // - `INVITED_USER` - INVITED_USER - // - `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED - // - `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED - // - `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT - // - `CREATED_DESTINATION` - CREATED_DESTINATION - // - `DELETED_DESTINATION` - DELETED_DESTINATION - // - `CHANGED_DESTINATION` - CHANGED_DESTINATION - // - `CHANGED_SCOPES` - CHANGED_SCOPES - // - `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION - // - `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS - // - `ENABLED_INTEGRATION` - ENABLED_INTEGRATION - // - `DISABLED_INTEGRATION` - DISABLED_INTEGRATION - // - `ENABLED_CATEGORY` - ENABLED_CATEGORY - // - `DISABLED_CATEGORY` - DISABLED_CATEGORY - // - `CHANGED_PASSWORD` - CHANGED_PASSWORD - // - `RESET_PASSWORD` - RESET_PASSWORD - // - `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - // - `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - // - `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - // - `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - // - `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING - // - `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING - // - `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING - // - `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 - // - `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - // - `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - // - `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - // - `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC - // - `MUTED_ISSUE` - MUTED_ISSUE - // - `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK - // - `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK - // - `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK - // - `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED - // - `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED - EventType *AuditLogEventEventType `json:"event_type,omitempty"` - EventDescription string `json:"event_description"` - CreatedAt *time.Time `json:"created_at,omitempty"` - - _rawJSON json.RawMessage -} - -func (a *AuditLogEvent) UnmarshalJSON(data []byte) error { - type unmarshaler AuditLogEvent - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { +func (b *BankFeedAccount) UnmarshalJSON(data []byte) error { + type embed BankFeedAccount + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + FeedStartDate *internal.DateTime `json:"feed_start_date,omitempty"` + }{ + embed: embed(*b), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *b = BankFeedAccount(unmarshaler.embed) + b.CreatedAt = unmarshaler.CreatedAt.TimePtr() + b.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + b.FeedStartDate = unmarshaler.FeedStartDate.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *b) + if err != nil { return err } - *a = AuditLogEvent(value) - a._rawJSON = json.RawMessage(data) + b.extraProperties = extraProperties + b.rawJSON = json.RawMessage(data) return nil } -func (a *AuditLogEvent) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { +func (b *BankFeedAccount) MarshalJSON() ([]byte, error) { + type embed BankFeedAccount + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + FeedStartDate *internal.DateTime `json:"feed_start_date,omitempty"` + }{ + embed: embed(*b), + CreatedAt: internal.NewOptionalDateTime(b.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(b.ModifiedAt), + FeedStartDate: internal.NewOptionalDateTime(b.FeedStartDate), + } + return json.Marshal(marshaler) +} + +func (b *BankFeedAccount) String() string { + if len(b.rawJSON) > 0 { + if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(a); err == nil { + if value, err := internal.StringifyJSON(b); err == nil { return value } - return fmt.Sprintf("%#v", a) + return fmt.Sprintf("%#v", b) } -// Designates the type of event that occurred. +// The type of the account. // -// - `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY -// - `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY -// - `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY -// - `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY -// - `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY -// - `INVITED_USER` - INVITED_USER -// - `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED -// - `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED -// - `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT -// - `CREATED_DESTINATION` - CREATED_DESTINATION -// - `DELETED_DESTINATION` - DELETED_DESTINATION -// - `CHANGED_DESTINATION` - CHANGED_DESTINATION -// - `CHANGED_SCOPES` - CHANGED_SCOPES -// - `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION -// - `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS -// - `ENABLED_INTEGRATION` - ENABLED_INTEGRATION -// - `DISABLED_INTEGRATION` - DISABLED_INTEGRATION -// - `ENABLED_CATEGORY` - ENABLED_CATEGORY -// - `DISABLED_CATEGORY` - DISABLED_CATEGORY -// - `CHANGED_PASSWORD` - CHANGED_PASSWORD -// - `RESET_PASSWORD` - RESET_PASSWORD -// - `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION -// - `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT -// - `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION -// - `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT -// - `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING -// - `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING -// - `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING -// - `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 -// - `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE -// - `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE -// - `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE -// - `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC -// - `MUTED_ISSUE` - MUTED_ISSUE -// - `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK -// - `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK -// - `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK -// - `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED -// - `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED -type AuditLogEventEventType struct { - typeName string - EventTypeEnum EventTypeEnum - String string +// * `BANK` - BANK +// * `CREDIT_CARD` - CREDIT_CARD +type BankFeedAccountAccountType struct { + BankFeedAccountAccountTypeEnum BankFeedAccountAccountTypeEnum + String string + + typ string } -func NewAuditLogEventEventTypeFromEventTypeEnum(value EventTypeEnum) *AuditLogEventEventType { - return &AuditLogEventEventType{typeName: "eventTypeEnum", EventTypeEnum: value} +func (b *BankFeedAccountAccountType) GetBankFeedAccountAccountTypeEnum() BankFeedAccountAccountTypeEnum { + if b == nil { + return "" + } + return b.BankFeedAccountAccountTypeEnum } -func NewAuditLogEventEventTypeFromString(value string) *AuditLogEventEventType { - return &AuditLogEventEventType{typeName: "string", String: value} +func (b *BankFeedAccountAccountType) GetString() string { + if b == nil { + return "" + } + return b.String } -func (a *AuditLogEventEventType) UnmarshalJSON(data []byte) error { - var valueEventTypeEnum EventTypeEnum - if err := json.Unmarshal(data, &valueEventTypeEnum); err == nil { - a.typeName = "eventTypeEnum" - a.EventTypeEnum = valueEventTypeEnum +func (b *BankFeedAccountAccountType) UnmarshalJSON(data []byte) error { + var valueBankFeedAccountAccountTypeEnum BankFeedAccountAccountTypeEnum + if err := json.Unmarshal(data, &valueBankFeedAccountAccountTypeEnum); err == nil { + b.typ = "BankFeedAccountAccountTypeEnum" + b.BankFeedAccountAccountTypeEnum = valueBankFeedAccountAccountTypeEnum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" - a.String = valueString + b.typ = "String" + b.String = valueString return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, a) + return fmt.Errorf("%s cannot be deserialized as a %T", data, b) } -func (a AuditLogEventEventType) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "eventTypeEnum": - return json.Marshal(a.EventTypeEnum) - case "string": - return json.Marshal(a.String) +func (b BankFeedAccountAccountType) MarshalJSON() ([]byte, error) { + if b.typ == "BankFeedAccountAccountTypeEnum" || b.BankFeedAccountAccountTypeEnum != "" { + return json.Marshal(b.BankFeedAccountAccountTypeEnum) + } + if b.typ == "String" || b.String != "" { + return json.Marshal(b.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", b) } -type AuditLogEventEventTypeVisitor interface { - VisitEventTypeEnum(EventTypeEnum) error +type BankFeedAccountAccountTypeVisitor interface { + VisitBankFeedAccountAccountTypeEnum(BankFeedAccountAccountTypeEnum) error VisitString(string) error } -func (a *AuditLogEventEventType) Accept(visitor AuditLogEventEventTypeVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "eventTypeEnum": - return visitor.VisitEventTypeEnum(a.EventTypeEnum) - case "string": - return visitor.VisitString(a.String) +func (b *BankFeedAccountAccountType) Accept(visitor BankFeedAccountAccountTypeVisitor) error { + if b.typ == "BankFeedAccountAccountTypeEnum" || b.BankFeedAccountAccountTypeEnum != "" { + return visitor.VisitBankFeedAccountAccountTypeEnum(b.BankFeedAccountAccountTypeEnum) + } + if b.typ == "String" || b.String != "" { + return visitor.VisitString(b.String) } + return fmt.Errorf("type %T does not include a non-empty union type", b) } -// Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. -// -// - `ADMIN` - ADMIN -// - `DEVELOPER` - DEVELOPER -// - `MEMBER` - MEMBER -// - `API` - API -// - `SYSTEM` - SYSTEM -// - `MERGE_TEAM` - MERGE_TEAM -type AuditLogEventRole struct { - typeName string - RoleEnum RoleEnum - String string -} +// * `BANK` - BANK +// * `CREDIT_CARD` - CREDIT_CARD +type BankFeedAccountAccountTypeEnum string -func NewAuditLogEventRoleFromRoleEnum(value RoleEnum) *AuditLogEventRole { - return &AuditLogEventRole{typeName: "roleEnum", RoleEnum: value} +const ( + BankFeedAccountAccountTypeEnumBank BankFeedAccountAccountTypeEnum = "BANK" + BankFeedAccountAccountTypeEnumCreditCard BankFeedAccountAccountTypeEnum = "CREDIT_CARD" +) + +func NewBankFeedAccountAccountTypeEnumFromString(s string) (BankFeedAccountAccountTypeEnum, error) { + switch s { + case "BANK": + return BankFeedAccountAccountTypeEnumBank, nil + case "CREDIT_CARD": + return BankFeedAccountAccountTypeEnumCreditCard, nil + } + var t BankFeedAccountAccountTypeEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -func NewAuditLogEventRoleFromString(value string) *AuditLogEventRole { - return &AuditLogEventRole{typeName: "string", String: value} +func (b BankFeedAccountAccountTypeEnum) Ptr() *BankFeedAccountAccountTypeEnum { + return &b } -func (a *AuditLogEventRole) UnmarshalJSON(data []byte) error { - var valueRoleEnum RoleEnum - if err := json.Unmarshal(data, &valueRoleEnum); err == nil { - a.typeName = "roleEnum" - a.RoleEnum = valueRoleEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" - a.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, a) -} - -func (a AuditLogEventRole) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "roleEnum": - return json.Marshal(a.RoleEnum) - case "string": - return json.Marshal(a.String) - } -} - -type AuditLogEventRoleVisitor interface { - VisitRoleEnum(RoleEnum) error - VisitString(string) error -} - -func (a *AuditLogEventRole) Accept(visitor AuditLogEventRoleVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "roleEnum": - return visitor.VisitRoleEnum(a.RoleEnum) - case "string": - return visitor.VisitString(a.String) - } -} - -// # The AvailableActions Object -// -// ### Description -// -// The `Activity` object is used to see all available model/operation combinations for an integration. -// -// ### Usage Example -// -// Fetch all the actions available for the `Zenefits` integration. -type AvailableActions struct { - Integration *AccountIntegration `json:"integration,omitempty"` - PassthroughAvailable bool `json:"passthrough_available"` - AvailableModelOperations []*ModelOperation `json:"available_model_operations,omitempty"` - - _rawJSON json.RawMessage -} - -func (a *AvailableActions) UnmarshalJSON(data []byte) error { - type unmarshaler AvailableActions - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *a = AvailableActions(value) - a._rawJSON = json.RawMessage(data) - return nil -} - -func (a *AvailableActions) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(a); err == nil { - return value - } - return fmt.Sprintf("%#v", a) -} - -// # The BalanceSheet Object -// -// ### Description -// -// The `BalanceSheet` object shows a company’s assets, liabilities, and equity. Assets should be equal to liability and equity combined. This shows the company’s financial health at a specific point in time. -// -// ### Usage Example +// The currency code of the bank feed. // -// Fetch from the `LIST BalanceSheets` endpoint and view a company's balance sheets. -type BalanceSheet struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The balance sheet's name. - Name *string `json:"name,omitempty"` - // The balance sheet's currency. - // - // - `XUA` - ADB Unit of Account - // - `AFN` - Afghan Afghani - // - `AFA` - Afghan Afghani (1927–2002) - // - `ALL` - Albanian Lek - // - `ALK` - Albanian Lek (1946–1965) - // - `DZD` - Algerian Dinar - // - `ADP` - Andorran Peseta - // - `AOA` - Angolan Kwanza - // - `AOK` - Angolan Kwanza (1977–1991) - // - `AON` - Angolan New Kwanza (1990–2000) - // - `AOR` - Angolan Readjusted Kwanza (1995–1999) - // - `ARA` - Argentine Austral - // - `ARS` - Argentine Peso - // - `ARM` - Argentine Peso (1881–1970) - // - `ARP` - Argentine Peso (1983–1985) - // - `ARL` - Argentine Peso Ley (1970–1983) - // - `AMD` - Armenian Dram - // - `AWG` - Aruban Florin - // - `AUD` - Australian Dollar - // - `ATS` - Austrian Schilling - // - `AZN` - Azerbaijani Manat - // - `AZM` - Azerbaijani Manat (1993–2006) - // - `BSD` - Bahamian Dollar - // - `BHD` - Bahraini Dinar - // - `BDT` - Bangladeshi Taka - // - `BBD` - Barbadian Dollar - // - `BYN` - Belarusian Ruble - // - `BYB` - Belarusian Ruble (1994–1999) - // - `BYR` - Belarusian Ruble (2000–2016) - // - `BEF` - Belgian Franc - // - `BEC` - Belgian Franc (convertible) - // - `BEL` - Belgian Franc (financial) - // - `BZD` - Belize Dollar - // - `BMD` - Bermudan Dollar - // - `BTN` - Bhutanese Ngultrum - // - `BOB` - Bolivian Boliviano - // - `BOL` - Bolivian Boliviano (1863–1963) - // - `BOV` - Bolivian Mvdol - // - `BOP` - Bolivian Peso - // - `BAM` - Bosnia-Herzegovina Convertible Mark - // - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - // - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - // - `BWP` - Botswanan Pula - // - `BRC` - Brazilian Cruzado (1986–1989) - // - `BRZ` - Brazilian Cruzeiro (1942–1967) - // - `BRE` - Brazilian Cruzeiro (1990–1993) - // - `BRR` - Brazilian Cruzeiro (1993–1994) - // - `BRN` - Brazilian New Cruzado (1989–1990) - // - `BRB` - Brazilian New Cruzeiro (1967–1986) - // - `BRL` - Brazilian Real - // - `GBP` - British Pound - // - `BND` - Brunei Dollar - // - `BGL` - Bulgarian Hard Lev - // - `BGN` - Bulgarian Lev - // - `BGO` - Bulgarian Lev (1879–1952) - // - `BGM` - Bulgarian Socialist Lev - // - `BUK` - Burmese Kyat - // - `BIF` - Burundian Franc - // - `XPF` - CFP Franc - // - `KHR` - Cambodian Riel - // - `CAD` - Canadian Dollar - // - `CVE` - Cape Verdean Escudo - // - `KYD` - Cayman Islands Dollar - // - `XAF` - Central African CFA Franc - // - `CLE` - Chilean Escudo - // - `CLP` - Chilean Peso - // - `CLF` - Chilean Unit of Account (UF) - // - `CNX` - Chinese People’s Bank Dollar - // - `CNY` - Chinese Yuan - // - `CNH` - Chinese Yuan (offshore) - // - `COP` - Colombian Peso - // - `COU` - Colombian Real Value Unit - // - `KMF` - Comorian Franc - // - `CDF` - Congolese Franc - // - `CRC` - Costa Rican Colón - // - `HRD` - Croatian Dinar - // - `HRK` - Croatian Kuna - // - `CUC` - Cuban Convertible Peso - // - `CUP` - Cuban Peso - // - `CYP` - Cypriot Pound - // - `CZK` - Czech Koruna - // - `CSK` - Czechoslovak Hard Koruna - // - `DKK` - Danish Krone - // - `DJF` - Djiboutian Franc - // - `DOP` - Dominican Peso - // - `NLG` - Dutch Guilder - // - `XCD` - East Caribbean Dollar - // - `DDM` - East German Mark - // - `ECS` - Ecuadorian Sucre - // - `ECV` - Ecuadorian Unit of Constant Value - // - `EGP` - Egyptian Pound - // - `GQE` - Equatorial Guinean Ekwele - // - `ERN` - Eritrean Nakfa - // - `EEK` - Estonian Kroon - // - `ETB` - Ethiopian Birr - // - `EUR` - Euro - // - `XBA` - European Composite Unit - // - `XEU` - European Currency Unit - // - `XBB` - European Monetary Unit - // - `XBC` - European Unit of Account (XBC) - // - `XBD` - European Unit of Account (XBD) - // - `FKP` - Falkland Islands Pound - // - `FJD` - Fijian Dollar - // - `FIM` - Finnish Markka - // - `FRF` - French Franc - // - `XFO` - French Gold Franc - // - `XFU` - French UIC-Franc - // - `GMD` - Gambian Dalasi - // - `GEK` - Georgian Kupon Larit - // - `GEL` - Georgian Lari - // - `DEM` - German Mark - // - `GHS` - Ghanaian Cedi - // - `GHC` - Ghanaian Cedi (1979–2007) - // - `GIP` - Gibraltar Pound - // - `XAU` - Gold - // - `GRD` - Greek Drachma - // - `GTQ` - Guatemalan Quetzal - // - `GWP` - Guinea-Bissau Peso - // - `GNF` - Guinean Franc - // - `GNS` - Guinean Syli - // - `GYD` - Guyanaese Dollar - // - `HTG` - Haitian Gourde - // - `HNL` - Honduran Lempira - // - `HKD` - Hong Kong Dollar - // - `HUF` - Hungarian Forint - // - `IMP` - IMP - // - `ISK` - Icelandic Króna - // - `ISJ` - Icelandic Króna (1918–1981) - // - `INR` - Indian Rupee - // - `IDR` - Indonesian Rupiah - // - `IRR` - Iranian Rial - // - `IQD` - Iraqi Dinar - // - `IEP` - Irish Pound - // - `ILS` - Israeli New Shekel - // - `ILP` - Israeli Pound - // - `ILR` - Israeli Shekel (1980–1985) - // - `ITL` - Italian Lira - // - `JMD` - Jamaican Dollar - // - `JPY` - Japanese Yen - // - `JOD` - Jordanian Dinar - // - `KZT` - Kazakhstani Tenge - // - `KES` - Kenyan Shilling - // - `KWD` - Kuwaiti Dinar - // - `KGS` - Kyrgystani Som - // - `LAK` - Laotian Kip - // - `LVL` - Latvian Lats - // - `LVR` - Latvian Ruble - // - `LBP` - Lebanese Pound - // - `LSL` - Lesotho Loti - // - `LRD` - Liberian Dollar - // - `LYD` - Libyan Dinar - // - `LTL` - Lithuanian Litas - // - `LTT` - Lithuanian Talonas - // - `LUL` - Luxembourg Financial Franc - // - `LUC` - Luxembourgian Convertible Franc - // - `LUF` - Luxembourgian Franc - // - `MOP` - Macanese Pataca - // - `MKD` - Macedonian Denar - // - `MKN` - Macedonian Denar (1992–1993) - // - `MGA` - Malagasy Ariary - // - `MGF` - Malagasy Franc - // - `MWK` - Malawian Kwacha - // - `MYR` - Malaysian Ringgit - // - `MVR` - Maldivian Rufiyaa - // - `MVP` - Maldivian Rupee (1947–1981) - // - `MLF` - Malian Franc - // - `MTL` - Maltese Lira - // - `MTP` - Maltese Pound - // - `MRU` - Mauritanian Ouguiya - // - `MRO` - Mauritanian Ouguiya (1973–2017) - // - `MUR` - Mauritian Rupee - // - `MXV` - Mexican Investment Unit - // - `MXN` - Mexican Peso - // - `MXP` - Mexican Silver Peso (1861–1992) - // - `MDC` - Moldovan Cupon - // - `MDL` - Moldovan Leu - // - `MCF` - Monegasque Franc - // - `MNT` - Mongolian Tugrik - // - `MAD` - Moroccan Dirham - // - `MAF` - Moroccan Franc - // - `MZE` - Mozambican Escudo - // - `MZN` - Mozambican Metical - // - `MZM` - Mozambican Metical (1980–2006) - // - `MMK` - Myanmar Kyat - // - `NAD` - Namibian Dollar - // - `NPR` - Nepalese Rupee - // - `ANG` - Netherlands Antillean Guilder - // - `TWD` - New Taiwan Dollar - // - `NZD` - New Zealand Dollar - // - `NIO` - Nicaraguan Córdoba - // - `NIC` - Nicaraguan Córdoba (1988–1991) - // - `NGN` - Nigerian Naira - // - `KPW` - North Korean Won - // - `NOK` - Norwegian Krone - // - `OMR` - Omani Rial - // - `PKR` - Pakistani Rupee - // - `XPD` - Palladium - // - `PAB` - Panamanian Balboa - // - `PGK` - Papua New Guinean Kina - // - `PYG` - Paraguayan Guarani - // - `PEI` - Peruvian Inti - // - `PEN` - Peruvian Sol - // - `PES` - Peruvian Sol (1863–1965) - // - `PHP` - Philippine Peso - // - `XPT` - Platinum - // - `PLN` - Polish Zloty - // - `PLZ` - Polish Zloty (1950–1995) - // - `PTE` - Portuguese Escudo - // - `GWE` - Portuguese Guinea Escudo - // - `QAR` - Qatari Rial - // - `XRE` - RINET Funds - // - `RHD` - Rhodesian Dollar - // - `RON` - Romanian Leu - // - `ROL` - Romanian Leu (1952–2006) - // - `RUB` - Russian Ruble - // - `RUR` - Russian Ruble (1991–1998) - // - `RWF` - Rwandan Franc - // - `SVC` - Salvadoran Colón - // - `WST` - Samoan Tala - // - `SAR` - Saudi Riyal - // - `RSD` - Serbian Dinar - // - `CSD` - Serbian Dinar (2002–2006) - // - `SCR` - Seychellois Rupee - // - `SLL` - Sierra Leonean Leone - // - `XAG` - Silver - // - `SGD` - Singapore Dollar - // - `SKK` - Slovak Koruna - // - `SIT` - Slovenian Tolar - // - `SBD` - Solomon Islands Dollar - // - `SOS` - Somali Shilling - // - `ZAR` - South African Rand - // - `ZAL` - South African Rand (financial) - // - `KRH` - South Korean Hwan (1953–1962) - // - `KRW` - South Korean Won - // - `KRO` - South Korean Won (1945–1953) - // - `SSP` - South Sudanese Pound - // - `SUR` - Soviet Rouble - // - `ESP` - Spanish Peseta - // - `ESA` - Spanish Peseta (A account) - // - `ESB` - Spanish Peseta (convertible account) - // - `XDR` - Special Drawing Rights - // - `LKR` - Sri Lankan Rupee - // - `SHP` - St. Helena Pound - // - `XSU` - Sucre - // - `SDD` - Sudanese Dinar (1992–2007) - // - `SDG` - Sudanese Pound - // - `SDP` - Sudanese Pound (1957–1998) - // - `SRD` - Surinamese Dollar - // - `SRG` - Surinamese Guilder - // - `SZL` - Swazi Lilangeni - // - `SEK` - Swedish Krona - // - `CHF` - Swiss Franc - // - `SYP` - Syrian Pound - // - `STN` - São Tomé & Príncipe Dobra - // - `STD` - São Tomé & Príncipe Dobra (1977–2017) - // - `TVD` - TVD - // - `TJR` - Tajikistani Ruble - // - `TJS` - Tajikistani Somoni - // - `TZS` - Tanzanian Shilling - // - `XTS` - Testing Currency Code - // - `THB` - Thai Baht - // - `XXX` - The codes assigned for transactions where no currency is involved - // - `TPE` - Timorese Escudo - // - `TOP` - Tongan Paʻanga - // - `TTD` - Trinidad & Tobago Dollar - // - `TND` - Tunisian Dinar - // - `TRY` - Turkish Lira - // - `TRL` - Turkish Lira (1922–2005) - // - `TMT` - Turkmenistani Manat - // - `TMM` - Turkmenistani Manat (1993–2009) - // - `USD` - US Dollar - // - `USN` - US Dollar (Next day) - // - `USS` - US Dollar (Same day) - // - `UGX` - Ugandan Shilling - // - `UGS` - Ugandan Shilling (1966–1987) - // - `UAH` - Ukrainian Hryvnia - // - `UAK` - Ukrainian Karbovanets - // - `AED` - United Arab Emirates Dirham - // - `UYW` - Uruguayan Nominal Wage Index Unit - // - `UYU` - Uruguayan Peso - // - `UYP` - Uruguayan Peso (1975–1993) - // - `UYI` - Uruguayan Peso (Indexed Units) - // - `UZS` - Uzbekistani Som - // - `VUV` - Vanuatu Vatu - // - `VES` - Venezuelan Bolívar - // - `VEB` - Venezuelan Bolívar (1871–2008) - // - `VEF` - Venezuelan Bolívar (2008–2018) - // - `VND` - Vietnamese Dong - // - `VNN` - Vietnamese Dong (1978–1985) - // - `CHE` - WIR Euro - // - `CHW` - WIR Franc - // - `XOF` - West African CFA Franc - // - `YDD` - Yemeni Dinar - // - `YER` - Yemeni Rial - // - `YUN` - Yugoslavian Convertible Dinar (1990–1992) - // - `YUD` - Yugoslavian Hard Dinar (1966–1990) - // - `YUM` - Yugoslavian New Dinar (1994–2002) - // - `YUR` - Yugoslavian Reformed Dinar (1992–1993) - // - `ZWN` - ZWN - // - `ZRN` - Zairean New Zaire (1993–1998) - // - `ZRZ` - Zairean Zaire (1971–1993) - // - `ZMW` - Zambian Kwacha - // - `ZMK` - Zambian Kwacha (1968–2012) - // - `ZWD` - Zimbabwean Dollar (1980–2008) - // - `ZWR` - Zimbabwean Dollar (2008) - // - `ZWL` - Zimbabwean Dollar (2009) - Currency *BalanceSheetCurrency `json:"currency,omitempty"` - // `Company` object for the given `BalanceSheet` object. - Company *BalanceSheetCompany `json:"company,omitempty"` - // The balance sheet's date. The balance sheet data will reflect the company's financial position this point in time. - Date *time.Time `json:"date,omitempty"` - // The balance sheet's net assets. - NetAssets *float64 `json:"net_assets,omitempty"` - Assets []*ReportItem `json:"assets,omitempty"` - Liabilities []*ReportItem `json:"liabilities,omitempty"` - Equity []*ReportItem `json:"equity,omitempty"` - // The time that balance sheet was generated by the accounting system. - RemoteGeneratedAt *time.Time `json:"remote_generated_at,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` - - _rawJSON json.RawMessage -} - -func (b *BalanceSheet) UnmarshalJSON(data []byte) error { - type unmarshaler BalanceSheet - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *b = BalanceSheet(value) - b._rawJSON = json.RawMessage(data) - return nil -} - -func (b *BalanceSheet) String() string { - if len(b._rawJSON) > 0 { - if value, err := core.StringifyJSON(b._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(b); err == nil { - return value - } - return fmt.Sprintf("%#v", b) -} - -// `Company` object for the given `BalanceSheet` object. -type BalanceSheetCompany struct { - typeName string - String string - CompanyInfo *CompanyInfo -} - -func NewBalanceSheetCompanyFromString(value string) *BalanceSheetCompany { - return &BalanceSheetCompany{typeName: "string", String: value} -} - -func NewBalanceSheetCompanyFromCompanyInfo(value *CompanyInfo) *BalanceSheetCompany { - return &BalanceSheetCompany{typeName: "companyInfo", CompanyInfo: value} -} +// * `XUA` - ADB Unit of Account +// * `AFN` - Afghan Afghani +// * `AFA` - Afghan Afghani (1927–2002) +// * `ALL` - Albanian Lek +// * `ALK` - Albanian Lek (1946–1965) +// * `DZD` - Algerian Dinar +// * `ADP` - Andorran Peseta +// * `AOA` - Angolan Kwanza +// * `AOK` - Angolan Kwanza (1977–1991) +// * `AON` - Angolan New Kwanza (1990–2000) +// * `AOR` - Angolan Readjusted Kwanza (1995–1999) +// * `ARA` - Argentine Austral +// * `ARS` - Argentine Peso +// * `ARM` - Argentine Peso (1881–1970) +// * `ARP` - Argentine Peso (1983–1985) +// * `ARL` - Argentine Peso Ley (1970–1983) +// * `AMD` - Armenian Dram +// * `AWG` - Aruban Florin +// * `AUD` - Australian Dollar +// * `ATS` - Austrian Schilling +// * `AZN` - Azerbaijani Manat +// * `AZM` - Azerbaijani Manat (1993–2006) +// * `BSD` - Bahamian Dollar +// * `BHD` - Bahraini Dinar +// * `BDT` - Bangladeshi Taka +// * `BBD` - Barbadian Dollar +// * `BYN` - Belarusian Ruble +// * `BYB` - Belarusian Ruble (1994–1999) +// * `BYR` - Belarusian Ruble (2000–2016) +// * `BEF` - Belgian Franc +// * `BEC` - Belgian Franc (convertible) +// * `BEL` - Belgian Franc (financial) +// * `BZD` - Belize Dollar +// * `BMD` - Bermudan Dollar +// * `BTN` - Bhutanese Ngultrum +// * `BOB` - Bolivian Boliviano +// * `BOL` - Bolivian Boliviano (1863–1963) +// * `BOV` - Bolivian Mvdol +// * `BOP` - Bolivian Peso +// * `BAM` - Bosnia-Herzegovina Convertible Mark +// * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) +// * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) +// * `BWP` - Botswanan Pula +// * `BRC` - Brazilian Cruzado (1986–1989) +// * `BRZ` - Brazilian Cruzeiro (1942–1967) +// * `BRE` - Brazilian Cruzeiro (1990–1993) +// * `BRR` - Brazilian Cruzeiro (1993–1994) +// * `BRN` - Brazilian New Cruzado (1989–1990) +// * `BRB` - Brazilian New Cruzeiro (1967–1986) +// * `BRL` - Brazilian Real +// * `GBP` - British Pound +// * `BND` - Brunei Dollar +// * `BGL` - Bulgarian Hard Lev +// * `BGN` - Bulgarian Lev +// * `BGO` - Bulgarian Lev (1879–1952) +// * `BGM` - Bulgarian Socialist Lev +// * `BUK` - Burmese Kyat +// * `BIF` - Burundian Franc +// * `XPF` - CFP Franc +// * `KHR` - Cambodian Riel +// * `CAD` - Canadian Dollar +// * `CVE` - Cape Verdean Escudo +// * `KYD` - Cayman Islands Dollar +// * `XAF` - Central African CFA Franc +// * `CLE` - Chilean Escudo +// * `CLP` - Chilean Peso +// * `CLF` - Chilean Unit of Account (UF) +// * `CNX` - Chinese People’s Bank Dollar +// * `CNY` - Chinese Yuan +// * `CNH` - Chinese Yuan (offshore) +// * `COP` - Colombian Peso +// * `COU` - Colombian Real Value Unit +// * `KMF` - Comorian Franc +// * `CDF` - Congolese Franc +// * `CRC` - Costa Rican Colón +// * `HRD` - Croatian Dinar +// * `HRK` - Croatian Kuna +// * `CUC` - Cuban Convertible Peso +// * `CUP` - Cuban Peso +// * `CYP` - Cypriot Pound +// * `CZK` - Czech Koruna +// * `CSK` - Czechoslovak Hard Koruna +// * `DKK` - Danish Krone +// * `DJF` - Djiboutian Franc +// * `DOP` - Dominican Peso +// * `NLG` - Dutch Guilder +// * `XCD` - East Caribbean Dollar +// * `DDM` - East German Mark +// * `ECS` - Ecuadorian Sucre +// * `ECV` - Ecuadorian Unit of Constant Value +// * `EGP` - Egyptian Pound +// * `GQE` - Equatorial Guinean Ekwele +// * `ERN` - Eritrean Nakfa +// * `EEK` - Estonian Kroon +// * `ETB` - Ethiopian Birr +// * `EUR` - Euro +// * `XBA` - European Composite Unit +// * `XEU` - European Currency Unit +// * `XBB` - European Monetary Unit +// * `XBC` - European Unit of Account (XBC) +// * `XBD` - European Unit of Account (XBD) +// * `FKP` - Falkland Islands Pound +// * `FJD` - Fijian Dollar +// * `FIM` - Finnish Markka +// * `FRF` - French Franc +// * `XFO` - French Gold Franc +// * `XFU` - French UIC-Franc +// * `GMD` - Gambian Dalasi +// * `GEK` - Georgian Kupon Larit +// * `GEL` - Georgian Lari +// * `DEM` - German Mark +// * `GHS` - Ghanaian Cedi +// * `GHC` - Ghanaian Cedi (1979–2007) +// * `GIP` - Gibraltar Pound +// * `XAU` - Gold +// * `GRD` - Greek Drachma +// * `GTQ` - Guatemalan Quetzal +// * `GWP` - Guinea-Bissau Peso +// * `GNF` - Guinean Franc +// * `GNS` - Guinean Syli +// * `GYD` - Guyanaese Dollar +// * `HTG` - Haitian Gourde +// * `HNL` - Honduran Lempira +// * `HKD` - Hong Kong Dollar +// * `HUF` - Hungarian Forint +// * `IMP` - IMP +// * `ISK` - Icelandic Króna +// * `ISJ` - Icelandic Króna (1918–1981) +// * `INR` - Indian Rupee +// * `IDR` - Indonesian Rupiah +// * `IRR` - Iranian Rial +// * `IQD` - Iraqi Dinar +// * `IEP` - Irish Pound +// * `ILS` - Israeli New Shekel +// * `ILP` - Israeli Pound +// * `ILR` - Israeli Shekel (1980–1985) +// * `ITL` - Italian Lira +// * `JMD` - Jamaican Dollar +// * `JPY` - Japanese Yen +// * `JOD` - Jordanian Dinar +// * `KZT` - Kazakhstani Tenge +// * `KES` - Kenyan Shilling +// * `KWD` - Kuwaiti Dinar +// * `KGS` - Kyrgystani Som +// * `LAK` - Laotian Kip +// * `LVL` - Latvian Lats +// * `LVR` - Latvian Ruble +// * `LBP` - Lebanese Pound +// * `LSL` - Lesotho Loti +// * `LRD` - Liberian Dollar +// * `LYD` - Libyan Dinar +// * `LTL` - Lithuanian Litas +// * `LTT` - Lithuanian Talonas +// * `LUL` - Luxembourg Financial Franc +// * `LUC` - Luxembourgian Convertible Franc +// * `LUF` - Luxembourgian Franc +// * `MOP` - Macanese Pataca +// * `MKD` - Macedonian Denar +// * `MKN` - Macedonian Denar (1992–1993) +// * `MGA` - Malagasy Ariary +// * `MGF` - Malagasy Franc +// * `MWK` - Malawian Kwacha +// * `MYR` - Malaysian Ringgit +// * `MVR` - Maldivian Rufiyaa +// * `MVP` - Maldivian Rupee (1947–1981) +// * `MLF` - Malian Franc +// * `MTL` - Maltese Lira +// * `MTP` - Maltese Pound +// * `MRU` - Mauritanian Ouguiya +// * `MRO` - Mauritanian Ouguiya (1973–2017) +// * `MUR` - Mauritian Rupee +// * `MXV` - Mexican Investment Unit +// * `MXN` - Mexican Peso +// * `MXP` - Mexican Silver Peso (1861–1992) +// * `MDC` - Moldovan Cupon +// * `MDL` - Moldovan Leu +// * `MCF` - Monegasque Franc +// * `MNT` - Mongolian Tugrik +// * `MAD` - Moroccan Dirham +// * `MAF` - Moroccan Franc +// * `MZE` - Mozambican Escudo +// * `MZN` - Mozambican Metical +// * `MZM` - Mozambican Metical (1980–2006) +// * `MMK` - Myanmar Kyat +// * `NAD` - Namibian Dollar +// * `NPR` - Nepalese Rupee +// * `ANG` - Netherlands Antillean Guilder +// * `TWD` - New Taiwan Dollar +// * `NZD` - New Zealand Dollar +// * `NIO` - Nicaraguan Córdoba +// * `NIC` - Nicaraguan Córdoba (1988–1991) +// * `NGN` - Nigerian Naira +// * `KPW` - North Korean Won +// * `NOK` - Norwegian Krone +// * `OMR` - Omani Rial +// * `PKR` - Pakistani Rupee +// * `XPD` - Palladium +// * `PAB` - Panamanian Balboa +// * `PGK` - Papua New Guinean Kina +// * `PYG` - Paraguayan Guarani +// * `PEI` - Peruvian Inti +// * `PEN` - Peruvian Sol +// * `PES` - Peruvian Sol (1863–1965) +// * `PHP` - Philippine Peso +// * `XPT` - Platinum +// * `PLN` - Polish Zloty +// * `PLZ` - Polish Zloty (1950–1995) +// * `PTE` - Portuguese Escudo +// * `GWE` - Portuguese Guinea Escudo +// * `QAR` - Qatari Rial +// * `XRE` - RINET Funds +// * `RHD` - Rhodesian Dollar +// * `RON` - Romanian Leu +// * `ROL` - Romanian Leu (1952–2006) +// * `RUB` - Russian Ruble +// * `RUR` - Russian Ruble (1991–1998) +// * `RWF` - Rwandan Franc +// * `SVC` - Salvadoran Colón +// * `WST` - Samoan Tala +// * `SAR` - Saudi Riyal +// * `RSD` - Serbian Dinar +// * `CSD` - Serbian Dinar (2002–2006) +// * `SCR` - Seychellois Rupee +// * `SLL` - Sierra Leonean Leone +// * `XAG` - Silver +// * `SGD` - Singapore Dollar +// * `SKK` - Slovak Koruna +// * `SIT` - Slovenian Tolar +// * `SBD` - Solomon Islands Dollar +// * `SOS` - Somali Shilling +// * `ZAR` - South African Rand +// * `ZAL` - South African Rand (financial) +// * `KRH` - South Korean Hwan (1953–1962) +// * `KRW` - South Korean Won +// * `KRO` - South Korean Won (1945–1953) +// * `SSP` - South Sudanese Pound +// * `SUR` - Soviet Rouble +// * `ESP` - Spanish Peseta +// * `ESA` - Spanish Peseta (A account) +// * `ESB` - Spanish Peseta (convertible account) +// * `XDR` - Special Drawing Rights +// * `LKR` - Sri Lankan Rupee +// * `SHP` - St. Helena Pound +// * `XSU` - Sucre +// * `SDD` - Sudanese Dinar (1992–2007) +// * `SDG` - Sudanese Pound +// * `SDP` - Sudanese Pound (1957–1998) +// * `SRD` - Surinamese Dollar +// * `SRG` - Surinamese Guilder +// * `SZL` - Swazi Lilangeni +// * `SEK` - Swedish Krona +// * `CHF` - Swiss Franc +// * `SYP` - Syrian Pound +// * `STN` - São Tomé & Príncipe Dobra +// * `STD` - São Tomé & Príncipe Dobra (1977–2017) +// * `TVD` - TVD +// * `TJR` - Tajikistani Ruble +// * `TJS` - Tajikistani Somoni +// * `TZS` - Tanzanian Shilling +// * `XTS` - Testing Currency Code +// * `THB` - Thai Baht +// * `XXX` - The codes assigned for transactions where no currency is involved +// * `TPE` - Timorese Escudo +// * `TOP` - Tongan Paʻanga +// * `TTD` - Trinidad & Tobago Dollar +// * `TND` - Tunisian Dinar +// * `TRY` - Turkish Lira +// * `TRL` - Turkish Lira (1922–2005) +// * `TMT` - Turkmenistani Manat +// * `TMM` - Turkmenistani Manat (1993–2009) +// * `USD` - US Dollar +// * `USN` - US Dollar (Next day) +// * `USS` - US Dollar (Same day) +// * `UGX` - Ugandan Shilling +// * `UGS` - Ugandan Shilling (1966–1987) +// * `UAH` - Ukrainian Hryvnia +// * `UAK` - Ukrainian Karbovanets +// * `AED` - United Arab Emirates Dirham +// * `UYW` - Uruguayan Nominal Wage Index Unit +// * `UYU` - Uruguayan Peso +// * `UYP` - Uruguayan Peso (1975–1993) +// * `UYI` - Uruguayan Peso (Indexed Units) +// * `UZS` - Uzbekistani Som +// * `VUV` - Vanuatu Vatu +// * `VES` - Venezuelan Bolívar +// * `VEB` - Venezuelan Bolívar (1871–2008) +// * `VEF` - Venezuelan Bolívar (2008–2018) +// * `VND` - Vietnamese Dong +// * `VNN` - Vietnamese Dong (1978–1985) +// * `CHE` - WIR Euro +// * `CHW` - WIR Franc +// * `XOF` - West African CFA Franc +// * `YDD` - Yemeni Dinar +// * `YER` - Yemeni Rial +// * `YUN` - Yugoslavian Convertible Dinar (1990–1992) +// * `YUD` - Yugoslavian Hard Dinar (1966–1990) +// * `YUM` - Yugoslavian New Dinar (1994–2002) +// * `YUR` - Yugoslavian Reformed Dinar (1992–1993) +// * `ZWN` - ZWN +// * `ZRN` - Zairean New Zaire (1993–1998) +// * `ZRZ` - Zairean Zaire (1971–1993) +// * `ZMW` - Zambian Kwacha +// * `ZMK` - Zambian Kwacha (1968–2012) +// * `ZWD` - Zimbabwean Dollar (1980–2008) +// * `ZWR` - Zimbabwean Dollar (2008) +// * `ZWL` - Zimbabwean Dollar (2009) +type BankFeedAccountCurrency struct { + TransactionCurrencyEnum TransactionCurrencyEnum + String string -func (b *BalanceSheetCompany) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - b.typeName = "string" - b.String = valueString - return nil - } - valueCompanyInfo := new(CompanyInfo) - if err := json.Unmarshal(data, &valueCompanyInfo); err == nil { - b.typeName = "companyInfo" - b.CompanyInfo = valueCompanyInfo - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, b) + typ string } -func (b BalanceSheetCompany) MarshalJSON() ([]byte, error) { - switch b.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", b.typeName, b) - case "string": - return json.Marshal(b.String) - case "companyInfo": - return json.Marshal(b.CompanyInfo) +func (b *BankFeedAccountCurrency) GetTransactionCurrencyEnum() TransactionCurrencyEnum { + if b == nil { + return "" } + return b.TransactionCurrencyEnum } -type BalanceSheetCompanyVisitor interface { - VisitString(string) error - VisitCompanyInfo(*CompanyInfo) error -} - -func (b *BalanceSheetCompany) Accept(visitor BalanceSheetCompanyVisitor) error { - switch b.typeName { - default: - return fmt.Errorf("invalid type %s in %T", b.typeName, b) - case "string": - return visitor.VisitString(b.String) - case "companyInfo": - return visitor.VisitCompanyInfo(b.CompanyInfo) +func (b *BankFeedAccountCurrency) GetString() string { + if b == nil { + return "" } + return b.String } -// The balance sheet's currency. -// -// - `XUA` - ADB Unit of Account -// - `AFN` - Afghan Afghani -// - `AFA` - Afghan Afghani (1927–2002) -// - `ALL` - Albanian Lek -// - `ALK` - Albanian Lek (1946–1965) -// - `DZD` - Algerian Dinar -// - `ADP` - Andorran Peseta -// - `AOA` - Angolan Kwanza -// - `AOK` - Angolan Kwanza (1977–1991) -// - `AON` - Angolan New Kwanza (1990–2000) -// - `AOR` - Angolan Readjusted Kwanza (1995–1999) -// - `ARA` - Argentine Austral -// - `ARS` - Argentine Peso -// - `ARM` - Argentine Peso (1881–1970) -// - `ARP` - Argentine Peso (1983–1985) -// - `ARL` - Argentine Peso Ley (1970–1983) -// - `AMD` - Armenian Dram -// - `AWG` - Aruban Florin -// - `AUD` - Australian Dollar -// - `ATS` - Austrian Schilling -// - `AZN` - Azerbaijani Manat -// - `AZM` - Azerbaijani Manat (1993–2006) -// - `BSD` - Bahamian Dollar -// - `BHD` - Bahraini Dinar -// - `BDT` - Bangladeshi Taka -// - `BBD` - Barbadian Dollar -// - `BYN` - Belarusian Ruble -// - `BYB` - Belarusian Ruble (1994–1999) -// - `BYR` - Belarusian Ruble (2000–2016) -// - `BEF` - Belgian Franc -// - `BEC` - Belgian Franc (convertible) -// - `BEL` - Belgian Franc (financial) -// - `BZD` - Belize Dollar -// - `BMD` - Bermudan Dollar -// - `BTN` - Bhutanese Ngultrum -// - `BOB` - Bolivian Boliviano -// - `BOL` - Bolivian Boliviano (1863–1963) -// - `BOV` - Bolivian Mvdol -// - `BOP` - Bolivian Peso -// - `BAM` - Bosnia-Herzegovina Convertible Mark -// - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) -// - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) -// - `BWP` - Botswanan Pula -// - `BRC` - Brazilian Cruzado (1986–1989) -// - `BRZ` - Brazilian Cruzeiro (1942–1967) -// - `BRE` - Brazilian Cruzeiro (1990–1993) -// - `BRR` - Brazilian Cruzeiro (1993–1994) -// - `BRN` - Brazilian New Cruzado (1989–1990) -// - `BRB` - Brazilian New Cruzeiro (1967–1986) -// - `BRL` - Brazilian Real -// - `GBP` - British Pound -// - `BND` - Brunei Dollar -// - `BGL` - Bulgarian Hard Lev -// - `BGN` - Bulgarian Lev -// - `BGO` - Bulgarian Lev (1879–1952) -// - `BGM` - Bulgarian Socialist Lev -// - `BUK` - Burmese Kyat -// - `BIF` - Burundian Franc -// - `XPF` - CFP Franc -// - `KHR` - Cambodian Riel -// - `CAD` - Canadian Dollar -// - `CVE` - Cape Verdean Escudo -// - `KYD` - Cayman Islands Dollar -// - `XAF` - Central African CFA Franc -// - `CLE` - Chilean Escudo -// - `CLP` - Chilean Peso -// - `CLF` - Chilean Unit of Account (UF) -// - `CNX` - Chinese People’s Bank Dollar -// - `CNY` - Chinese Yuan -// - `CNH` - Chinese Yuan (offshore) -// - `COP` - Colombian Peso -// - `COU` - Colombian Real Value Unit -// - `KMF` - Comorian Franc -// - `CDF` - Congolese Franc -// - `CRC` - Costa Rican Colón -// - `HRD` - Croatian Dinar -// - `HRK` - Croatian Kuna -// - `CUC` - Cuban Convertible Peso -// - `CUP` - Cuban Peso -// - `CYP` - Cypriot Pound -// - `CZK` - Czech Koruna -// - `CSK` - Czechoslovak Hard Koruna -// - `DKK` - Danish Krone -// - `DJF` - Djiboutian Franc -// - `DOP` - Dominican Peso -// - `NLG` - Dutch Guilder -// - `XCD` - East Caribbean Dollar -// - `DDM` - East German Mark -// - `ECS` - Ecuadorian Sucre -// - `ECV` - Ecuadorian Unit of Constant Value -// - `EGP` - Egyptian Pound -// - `GQE` - Equatorial Guinean Ekwele -// - `ERN` - Eritrean Nakfa -// - `EEK` - Estonian Kroon -// - `ETB` - Ethiopian Birr -// - `EUR` - Euro -// - `XBA` - European Composite Unit -// - `XEU` - European Currency Unit -// - `XBB` - European Monetary Unit -// - `XBC` - European Unit of Account (XBC) -// - `XBD` - European Unit of Account (XBD) -// - `FKP` - Falkland Islands Pound -// - `FJD` - Fijian Dollar -// - `FIM` - Finnish Markka -// - `FRF` - French Franc -// - `XFO` - French Gold Franc -// - `XFU` - French UIC-Franc -// - `GMD` - Gambian Dalasi -// - `GEK` - Georgian Kupon Larit -// - `GEL` - Georgian Lari -// - `DEM` - German Mark -// - `GHS` - Ghanaian Cedi -// - `GHC` - Ghanaian Cedi (1979–2007) -// - `GIP` - Gibraltar Pound -// - `XAU` - Gold -// - `GRD` - Greek Drachma -// - `GTQ` - Guatemalan Quetzal -// - `GWP` - Guinea-Bissau Peso -// - `GNF` - Guinean Franc -// - `GNS` - Guinean Syli -// - `GYD` - Guyanaese Dollar -// - `HTG` - Haitian Gourde -// - `HNL` - Honduran Lempira -// - `HKD` - Hong Kong Dollar -// - `HUF` - Hungarian Forint -// - `IMP` - IMP -// - `ISK` - Icelandic Króna -// - `ISJ` - Icelandic Króna (1918–1981) -// - `INR` - Indian Rupee -// - `IDR` - Indonesian Rupiah -// - `IRR` - Iranian Rial -// - `IQD` - Iraqi Dinar -// - `IEP` - Irish Pound -// - `ILS` - Israeli New Shekel -// - `ILP` - Israeli Pound -// - `ILR` - Israeli Shekel (1980–1985) -// - `ITL` - Italian Lira -// - `JMD` - Jamaican Dollar -// - `JPY` - Japanese Yen -// - `JOD` - Jordanian Dinar -// - `KZT` - Kazakhstani Tenge -// - `KES` - Kenyan Shilling -// - `KWD` - Kuwaiti Dinar -// - `KGS` - Kyrgystani Som -// - `LAK` - Laotian Kip -// - `LVL` - Latvian Lats -// - `LVR` - Latvian Ruble -// - `LBP` - Lebanese Pound -// - `LSL` - Lesotho Loti -// - `LRD` - Liberian Dollar -// - `LYD` - Libyan Dinar -// - `LTL` - Lithuanian Litas -// - `LTT` - Lithuanian Talonas -// - `LUL` - Luxembourg Financial Franc -// - `LUC` - Luxembourgian Convertible Franc -// - `LUF` - Luxembourgian Franc -// - `MOP` - Macanese Pataca -// - `MKD` - Macedonian Denar -// - `MKN` - Macedonian Denar (1992–1993) -// - `MGA` - Malagasy Ariary -// - `MGF` - Malagasy Franc -// - `MWK` - Malawian Kwacha -// - `MYR` - Malaysian Ringgit -// - `MVR` - Maldivian Rufiyaa -// - `MVP` - Maldivian Rupee (1947–1981) -// - `MLF` - Malian Franc -// - `MTL` - Maltese Lira -// - `MTP` - Maltese Pound -// - `MRU` - Mauritanian Ouguiya -// - `MRO` - Mauritanian Ouguiya (1973–2017) -// - `MUR` - Mauritian Rupee -// - `MXV` - Mexican Investment Unit -// - `MXN` - Mexican Peso -// - `MXP` - Mexican Silver Peso (1861–1992) -// - `MDC` - Moldovan Cupon -// - `MDL` - Moldovan Leu -// - `MCF` - Monegasque Franc -// - `MNT` - Mongolian Tugrik -// - `MAD` - Moroccan Dirham -// - `MAF` - Moroccan Franc -// - `MZE` - Mozambican Escudo -// - `MZN` - Mozambican Metical -// - `MZM` - Mozambican Metical (1980–2006) -// - `MMK` - Myanmar Kyat -// - `NAD` - Namibian Dollar -// - `NPR` - Nepalese Rupee -// - `ANG` - Netherlands Antillean Guilder -// - `TWD` - New Taiwan Dollar -// - `NZD` - New Zealand Dollar -// - `NIO` - Nicaraguan Córdoba -// - `NIC` - Nicaraguan Córdoba (1988–1991) -// - `NGN` - Nigerian Naira -// - `KPW` - North Korean Won -// - `NOK` - Norwegian Krone -// - `OMR` - Omani Rial -// - `PKR` - Pakistani Rupee -// - `XPD` - Palladium -// - `PAB` - Panamanian Balboa -// - `PGK` - Papua New Guinean Kina -// - `PYG` - Paraguayan Guarani -// - `PEI` - Peruvian Inti -// - `PEN` - Peruvian Sol -// - `PES` - Peruvian Sol (1863–1965) -// - `PHP` - Philippine Peso -// - `XPT` - Platinum -// - `PLN` - Polish Zloty -// - `PLZ` - Polish Zloty (1950–1995) -// - `PTE` - Portuguese Escudo -// - `GWE` - Portuguese Guinea Escudo -// - `QAR` - Qatari Rial -// - `XRE` - RINET Funds -// - `RHD` - Rhodesian Dollar -// - `RON` - Romanian Leu -// - `ROL` - Romanian Leu (1952–2006) -// - `RUB` - Russian Ruble -// - `RUR` - Russian Ruble (1991–1998) -// - `RWF` - Rwandan Franc -// - `SVC` - Salvadoran Colón -// - `WST` - Samoan Tala -// - `SAR` - Saudi Riyal -// - `RSD` - Serbian Dinar -// - `CSD` - Serbian Dinar (2002–2006) -// - `SCR` - Seychellois Rupee -// - `SLL` - Sierra Leonean Leone -// - `XAG` - Silver -// - `SGD` - Singapore Dollar -// - `SKK` - Slovak Koruna -// - `SIT` - Slovenian Tolar -// - `SBD` - Solomon Islands Dollar -// - `SOS` - Somali Shilling -// - `ZAR` - South African Rand -// - `ZAL` - South African Rand (financial) -// - `KRH` - South Korean Hwan (1953–1962) -// - `KRW` - South Korean Won -// - `KRO` - South Korean Won (1945–1953) -// - `SSP` - South Sudanese Pound -// - `SUR` - Soviet Rouble -// - `ESP` - Spanish Peseta -// - `ESA` - Spanish Peseta (A account) -// - `ESB` - Spanish Peseta (convertible account) -// - `XDR` - Special Drawing Rights -// - `LKR` - Sri Lankan Rupee -// - `SHP` - St. Helena Pound -// - `XSU` - Sucre -// - `SDD` - Sudanese Dinar (1992–2007) -// - `SDG` - Sudanese Pound -// - `SDP` - Sudanese Pound (1957–1998) -// - `SRD` - Surinamese Dollar -// - `SRG` - Surinamese Guilder -// - `SZL` - Swazi Lilangeni -// - `SEK` - Swedish Krona -// - `CHF` - Swiss Franc -// - `SYP` - Syrian Pound -// - `STN` - São Tomé & Príncipe Dobra -// - `STD` - São Tomé & Príncipe Dobra (1977–2017) -// - `TVD` - TVD -// - `TJR` - Tajikistani Ruble -// - `TJS` - Tajikistani Somoni -// - `TZS` - Tanzanian Shilling -// - `XTS` - Testing Currency Code -// - `THB` - Thai Baht -// - `XXX` - The codes assigned for transactions where no currency is involved -// - `TPE` - Timorese Escudo -// - `TOP` - Tongan Paʻanga -// - `TTD` - Trinidad & Tobago Dollar -// - `TND` - Tunisian Dinar -// - `TRY` - Turkish Lira -// - `TRL` - Turkish Lira (1922–2005) -// - `TMT` - Turkmenistani Manat -// - `TMM` - Turkmenistani Manat (1993–2009) -// - `USD` - US Dollar -// - `USN` - US Dollar (Next day) -// - `USS` - US Dollar (Same day) -// - `UGX` - Ugandan Shilling -// - `UGS` - Ugandan Shilling (1966–1987) -// - `UAH` - Ukrainian Hryvnia -// - `UAK` - Ukrainian Karbovanets -// - `AED` - United Arab Emirates Dirham -// - `UYW` - Uruguayan Nominal Wage Index Unit -// - `UYU` - Uruguayan Peso -// - `UYP` - Uruguayan Peso (1975–1993) -// - `UYI` - Uruguayan Peso (Indexed Units) -// - `UZS` - Uzbekistani Som -// - `VUV` - Vanuatu Vatu -// - `VES` - Venezuelan Bolívar -// - `VEB` - Venezuelan Bolívar (1871–2008) -// - `VEF` - Venezuelan Bolívar (2008–2018) -// - `VND` - Vietnamese Dong -// - `VNN` - Vietnamese Dong (1978–1985) -// - `CHE` - WIR Euro -// - `CHW` - WIR Franc -// - `XOF` - West African CFA Franc -// - `YDD` - Yemeni Dinar -// - `YER` - Yemeni Rial -// - `YUN` - Yugoslavian Convertible Dinar (1990–1992) -// - `YUD` - Yugoslavian Hard Dinar (1966–1990) -// - `YUM` - Yugoslavian New Dinar (1994–2002) -// - `YUR` - Yugoslavian Reformed Dinar (1992–1993) -// - `ZWN` - ZWN -// - `ZRN` - Zairean New Zaire (1993–1998) -// - `ZRZ` - Zairean Zaire (1971–1993) -// - `ZMW` - Zambian Kwacha -// - `ZMK` - Zambian Kwacha (1968–2012) -// - `ZWD` - Zimbabwean Dollar (1980–2008) -// - `ZWR` - Zimbabwean Dollar (2008) -// - `ZWL` - Zimbabwean Dollar (2009) -type BalanceSheetCurrency struct { - typeName string - TransactionCurrencyEnum TransactionCurrencyEnum - String string -} - -func NewBalanceSheetCurrencyFromTransactionCurrencyEnum(value TransactionCurrencyEnum) *BalanceSheetCurrency { - return &BalanceSheetCurrency{typeName: "transactionCurrencyEnum", TransactionCurrencyEnum: value} -} - -func NewBalanceSheetCurrencyFromString(value string) *BalanceSheetCurrency { - return &BalanceSheetCurrency{typeName: "string", String: value} -} - -func (b *BalanceSheetCurrency) UnmarshalJSON(data []byte) error { +func (b *BankFeedAccountCurrency) UnmarshalJSON(data []byte) error { var valueTransactionCurrencyEnum TransactionCurrencyEnum if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { - b.typeName = "transactionCurrencyEnum" + b.typ = "TransactionCurrencyEnum" b.TransactionCurrencyEnum = valueTransactionCurrencyEnum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - b.typeName = "string" + b.typ = "String" b.String = valueString return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, b) } -func (b BalanceSheetCurrency) MarshalJSON() ([]byte, error) { - switch b.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", b.typeName, b) - case "transactionCurrencyEnum": +func (b BankFeedAccountCurrency) MarshalJSON() ([]byte, error) { + if b.typ == "TransactionCurrencyEnum" || b.TransactionCurrencyEnum != "" { return json.Marshal(b.TransactionCurrencyEnum) - case "string": + } + if b.typ == "String" || b.String != "" { return json.Marshal(b.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", b) } -type BalanceSheetCurrencyVisitor interface { +type BankFeedAccountCurrencyVisitor interface { VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error VisitString(string) error } -func (b *BalanceSheetCurrency) Accept(visitor BalanceSheetCurrencyVisitor) error { - switch b.typeName { - default: - return fmt.Errorf("invalid type %s in %T", b.typeName, b) - case "transactionCurrencyEnum": +func (b *BankFeedAccountCurrency) Accept(visitor BankFeedAccountCurrencyVisitor) error { + if b.typ == "TransactionCurrencyEnum" || b.TransactionCurrencyEnum != "" { return visitor.VisitTransactionCurrencyEnum(b.TransactionCurrencyEnum) - case "string": + } + if b.typ == "String" || b.String != "" { return visitor.VisitString(b.String) } + return fmt.Errorf("type %T does not include a non-empty union type", b) } -// # The BankFeedAccount Object -// -// ### Description -// -// The `BankFeedAccount` object represents a bank feed account, detailing various attributes including account identifiers, names, currency, and balance information. This object is central to managing and tracking bank feed accounts within the system. -// -// ### Usage Example +// The status of the bank feed. // -// Fetch from the `GET BankFeedAccount` endpoint to view details of a bank feed account. -type BankFeedAccount struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The unique identifier of the source account from our customer’s platform. - SourceAccountId *string `json:"source_account_id,omitempty"` - // The unique identifier of the target account from the third party software. - TargetAccountId *string `json:"target_account_id,omitempty"` - // The name of the source account as stored in our customer’s platform. - SourceAccountName *string `json:"source_account_name,omitempty"` - // The human-readable account number of the source account as stored in our customer’s platform. - SourceAccountNumber *string `json:"source_account_number,omitempty"` - // The name of the target account from the third party software. - TargetAccountName *string `json:"target_account_name,omitempty"` - // The currency code of the bank feed. - // - // - `XUA` - ADB Unit of Account - // - `AFN` - Afghan Afghani - // - `AFA` - Afghan Afghani (1927–2002) - // - `ALL` - Albanian Lek - // - `ALK` - Albanian Lek (1946–1965) - // - `DZD` - Algerian Dinar - // - `ADP` - Andorran Peseta - // - `AOA` - Angolan Kwanza - // - `AOK` - Angolan Kwanza (1977–1991) - // - `AON` - Angolan New Kwanza (1990–2000) - // - `AOR` - Angolan Readjusted Kwanza (1995–1999) - // - `ARA` - Argentine Austral - // - `ARS` - Argentine Peso - // - `ARM` - Argentine Peso (1881–1970) - // - `ARP` - Argentine Peso (1983–1985) - // - `ARL` - Argentine Peso Ley (1970–1983) - // - `AMD` - Armenian Dram - // - `AWG` - Aruban Florin - // - `AUD` - Australian Dollar - // - `ATS` - Austrian Schilling - // - `AZN` - Azerbaijani Manat - // - `AZM` - Azerbaijani Manat (1993–2006) - // - `BSD` - Bahamian Dollar - // - `BHD` - Bahraini Dinar - // - `BDT` - Bangladeshi Taka - // - `BBD` - Barbadian Dollar - // - `BYN` - Belarusian Ruble - // - `BYB` - Belarusian Ruble (1994–1999) - // - `BYR` - Belarusian Ruble (2000–2016) - // - `BEF` - Belgian Franc - // - `BEC` - Belgian Franc (convertible) - // - `BEL` - Belgian Franc (financial) - // - `BZD` - Belize Dollar - // - `BMD` - Bermudan Dollar - // - `BTN` - Bhutanese Ngultrum - // - `BOB` - Bolivian Boliviano - // - `BOL` - Bolivian Boliviano (1863–1963) - // - `BOV` - Bolivian Mvdol - // - `BOP` - Bolivian Peso - // - `BAM` - Bosnia-Herzegovina Convertible Mark - // - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - // - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - // - `BWP` - Botswanan Pula - // - `BRC` - Brazilian Cruzado (1986–1989) - // - `BRZ` - Brazilian Cruzeiro (1942–1967) - // - `BRE` - Brazilian Cruzeiro (1990–1993) - // - `BRR` - Brazilian Cruzeiro (1993–1994) - // - `BRN` - Brazilian New Cruzado (1989–1990) - // - `BRB` - Brazilian New Cruzeiro (1967–1986) - // - `BRL` - Brazilian Real - // - `GBP` - British Pound - // - `BND` - Brunei Dollar - // - `BGL` - Bulgarian Hard Lev - // - `BGN` - Bulgarian Lev - // - `BGO` - Bulgarian Lev (1879–1952) - // - `BGM` - Bulgarian Socialist Lev - // - `BUK` - Burmese Kyat - // - `BIF` - Burundian Franc - // - `XPF` - CFP Franc - // - `KHR` - Cambodian Riel - // - `CAD` - Canadian Dollar - // - `CVE` - Cape Verdean Escudo - // - `KYD` - Cayman Islands Dollar - // - `XAF` - Central African CFA Franc - // - `CLE` - Chilean Escudo - // - `CLP` - Chilean Peso - // - `CLF` - Chilean Unit of Account (UF) - // - `CNX` - Chinese People’s Bank Dollar - // - `CNY` - Chinese Yuan - // - `CNH` - Chinese Yuan (offshore) - // - `COP` - Colombian Peso - // - `COU` - Colombian Real Value Unit - // - `KMF` - Comorian Franc - // - `CDF` - Congolese Franc - // - `CRC` - Costa Rican Colón - // - `HRD` - Croatian Dinar - // - `HRK` - Croatian Kuna - // - `CUC` - Cuban Convertible Peso - // - `CUP` - Cuban Peso - // - `CYP` - Cypriot Pound - // - `CZK` - Czech Koruna - // - `CSK` - Czechoslovak Hard Koruna - // - `DKK` - Danish Krone - // - `DJF` - Djiboutian Franc - // - `DOP` - Dominican Peso - // - `NLG` - Dutch Guilder - // - `XCD` - East Caribbean Dollar - // - `DDM` - East German Mark - // - `ECS` - Ecuadorian Sucre - // - `ECV` - Ecuadorian Unit of Constant Value - // - `EGP` - Egyptian Pound - // - `GQE` - Equatorial Guinean Ekwele - // - `ERN` - Eritrean Nakfa - // - `EEK` - Estonian Kroon - // - `ETB` - Ethiopian Birr - // - `EUR` - Euro - // - `XBA` - European Composite Unit - // - `XEU` - European Currency Unit - // - `XBB` - European Monetary Unit - // - `XBC` - European Unit of Account (XBC) - // - `XBD` - European Unit of Account (XBD) - // - `FKP` - Falkland Islands Pound - // - `FJD` - Fijian Dollar - // - `FIM` - Finnish Markka - // - `FRF` - French Franc - // - `XFO` - French Gold Franc - // - `XFU` - French UIC-Franc - // - `GMD` - Gambian Dalasi - // - `GEK` - Georgian Kupon Larit - // - `GEL` - Georgian Lari - // - `DEM` - German Mark - // - `GHS` - Ghanaian Cedi - // - `GHC` - Ghanaian Cedi (1979–2007) - // - `GIP` - Gibraltar Pound - // - `XAU` - Gold - // - `GRD` - Greek Drachma - // - `GTQ` - Guatemalan Quetzal - // - `GWP` - Guinea-Bissau Peso - // - `GNF` - Guinean Franc - // - `GNS` - Guinean Syli - // - `GYD` - Guyanaese Dollar - // - `HTG` - Haitian Gourde - // - `HNL` - Honduran Lempira - // - `HKD` - Hong Kong Dollar - // - `HUF` - Hungarian Forint - // - `IMP` - IMP - // - `ISK` - Icelandic Króna - // - `ISJ` - Icelandic Króna (1918–1981) - // - `INR` - Indian Rupee - // - `IDR` - Indonesian Rupiah - // - `IRR` - Iranian Rial - // - `IQD` - Iraqi Dinar - // - `IEP` - Irish Pound - // - `ILS` - Israeli New Shekel - // - `ILP` - Israeli Pound - // - `ILR` - Israeli Shekel (1980–1985) - // - `ITL` - Italian Lira - // - `JMD` - Jamaican Dollar - // - `JPY` - Japanese Yen - // - `JOD` - Jordanian Dinar - // - `KZT` - Kazakhstani Tenge - // - `KES` - Kenyan Shilling - // - `KWD` - Kuwaiti Dinar - // - `KGS` - Kyrgystani Som - // - `LAK` - Laotian Kip - // - `LVL` - Latvian Lats - // - `LVR` - Latvian Ruble - // - `LBP` - Lebanese Pound - // - `LSL` - Lesotho Loti - // - `LRD` - Liberian Dollar - // - `LYD` - Libyan Dinar - // - `LTL` - Lithuanian Litas - // - `LTT` - Lithuanian Talonas - // - `LUL` - Luxembourg Financial Franc - // - `LUC` - Luxembourgian Convertible Franc - // - `LUF` - Luxembourgian Franc - // - `MOP` - Macanese Pataca - // - `MKD` - Macedonian Denar - // - `MKN` - Macedonian Denar (1992–1993) - // - `MGA` - Malagasy Ariary - // - `MGF` - Malagasy Franc - // - `MWK` - Malawian Kwacha - // - `MYR` - Malaysian Ringgit - // - `MVR` - Maldivian Rufiyaa - // - `MVP` - Maldivian Rupee (1947–1981) - // - `MLF` - Malian Franc - // - `MTL` - Maltese Lira - // - `MTP` - Maltese Pound - // - `MRU` - Mauritanian Ouguiya - // - `MRO` - Mauritanian Ouguiya (1973–2017) - // - `MUR` - Mauritian Rupee - // - `MXV` - Mexican Investment Unit - // - `MXN` - Mexican Peso - // - `MXP` - Mexican Silver Peso (1861–1992) - // - `MDC` - Moldovan Cupon - // - `MDL` - Moldovan Leu - // - `MCF` - Monegasque Franc - // - `MNT` - Mongolian Tugrik - // - `MAD` - Moroccan Dirham - // - `MAF` - Moroccan Franc - // - `MZE` - Mozambican Escudo - // - `MZN` - Mozambican Metical - // - `MZM` - Mozambican Metical (1980–2006) - // - `MMK` - Myanmar Kyat - // - `NAD` - Namibian Dollar - // - `NPR` - Nepalese Rupee - // - `ANG` - Netherlands Antillean Guilder - // - `TWD` - New Taiwan Dollar - // - `NZD` - New Zealand Dollar - // - `NIO` - Nicaraguan Córdoba - // - `NIC` - Nicaraguan Córdoba (1988–1991) - // - `NGN` - Nigerian Naira - // - `KPW` - North Korean Won - // - `NOK` - Norwegian Krone - // - `OMR` - Omani Rial - // - `PKR` - Pakistani Rupee - // - `XPD` - Palladium - // - `PAB` - Panamanian Balboa - // - `PGK` - Papua New Guinean Kina - // - `PYG` - Paraguayan Guarani - // - `PEI` - Peruvian Inti - // - `PEN` - Peruvian Sol - // - `PES` - Peruvian Sol (1863–1965) - // - `PHP` - Philippine Peso - // - `XPT` - Platinum - // - `PLN` - Polish Zloty - // - `PLZ` - Polish Zloty (1950–1995) - // - `PTE` - Portuguese Escudo - // - `GWE` - Portuguese Guinea Escudo - // - `QAR` - Qatari Rial - // - `XRE` - RINET Funds - // - `RHD` - Rhodesian Dollar - // - `RON` - Romanian Leu - // - `ROL` - Romanian Leu (1952–2006) - // - `RUB` - Russian Ruble - // - `RUR` - Russian Ruble (1991–1998) - // - `RWF` - Rwandan Franc - // - `SVC` - Salvadoran Colón - // - `WST` - Samoan Tala - // - `SAR` - Saudi Riyal - // - `RSD` - Serbian Dinar - // - `CSD` - Serbian Dinar (2002–2006) - // - `SCR` - Seychellois Rupee - // - `SLL` - Sierra Leonean Leone - // - `XAG` - Silver - // - `SGD` - Singapore Dollar - // - `SKK` - Slovak Koruna - // - `SIT` - Slovenian Tolar - // - `SBD` - Solomon Islands Dollar - // - `SOS` - Somali Shilling - // - `ZAR` - South African Rand - // - `ZAL` - South African Rand (financial) - // - `KRH` - South Korean Hwan (1953–1962) - // - `KRW` - South Korean Won - // - `KRO` - South Korean Won (1945–1953) - // - `SSP` - South Sudanese Pound - // - `SUR` - Soviet Rouble - // - `ESP` - Spanish Peseta - // - `ESA` - Spanish Peseta (A account) - // - `ESB` - Spanish Peseta (convertible account) - // - `XDR` - Special Drawing Rights - // - `LKR` - Sri Lankan Rupee - // - `SHP` - St. Helena Pound - // - `XSU` - Sucre - // - `SDD` - Sudanese Dinar (1992–2007) - // - `SDG` - Sudanese Pound - // - `SDP` - Sudanese Pound (1957–1998) - // - `SRD` - Surinamese Dollar - // - `SRG` - Surinamese Guilder - // - `SZL` - Swazi Lilangeni - // - `SEK` - Swedish Krona - // - `CHF` - Swiss Franc - // - `SYP` - Syrian Pound - // - `STN` - São Tomé & Príncipe Dobra - // - `STD` - São Tomé & Príncipe Dobra (1977–2017) - // - `TVD` - TVD - // - `TJR` - Tajikistani Ruble - // - `TJS` - Tajikistani Somoni - // - `TZS` - Tanzanian Shilling - // - `XTS` - Testing Currency Code - // - `THB` - Thai Baht - // - `XXX` - The codes assigned for transactions where no currency is involved - // - `TPE` - Timorese Escudo - // - `TOP` - Tongan Paʻanga - // - `TTD` - Trinidad & Tobago Dollar - // - `TND` - Tunisian Dinar - // - `TRY` - Turkish Lira - // - `TRL` - Turkish Lira (1922–2005) - // - `TMT` - Turkmenistani Manat - // - `TMM` - Turkmenistani Manat (1993–2009) - // - `USD` - US Dollar - // - `USN` - US Dollar (Next day) - // - `USS` - US Dollar (Same day) - // - `UGX` - Ugandan Shilling - // - `UGS` - Ugandan Shilling (1966–1987) - // - `UAH` - Ukrainian Hryvnia - // - `UAK` - Ukrainian Karbovanets - // - `AED` - United Arab Emirates Dirham - // - `UYW` - Uruguayan Nominal Wage Index Unit - // - `UYU` - Uruguayan Peso - // - `UYP` - Uruguayan Peso (1975–1993) - // - `UYI` - Uruguayan Peso (Indexed Units) - // - `UZS` - Uzbekistani Som - // - `VUV` - Vanuatu Vatu - // - `VES` - Venezuelan Bolívar - // - `VEB` - Venezuelan Bolívar (1871–2008) - // - `VEF` - Venezuelan Bolívar (2008–2018) - // - `VND` - Vietnamese Dong - // - `VNN` - Vietnamese Dong (1978–1985) - // - `CHE` - WIR Euro - // - `CHW` - WIR Franc - // - `XOF` - West African CFA Franc - // - `YDD` - Yemeni Dinar - // - `YER` - Yemeni Rial - // - `YUN` - Yugoslavian Convertible Dinar (1990–1992) - // - `YUD` - Yugoslavian Hard Dinar (1966–1990) - // - `YUM` - Yugoslavian New Dinar (1994–2002) - // - `YUR` - Yugoslavian Reformed Dinar (1992–1993) - // - `ZWN` - ZWN - // - `ZRN` - Zairean New Zaire (1993–1998) - // - `ZRZ` - Zairean Zaire (1971–1993) - // - `ZMW` - Zambian Kwacha - // - `ZMK` - Zambian Kwacha (1968–2012) - // - `ZWD` - Zimbabwean Dollar (1980–2008) - // - `ZWR` - Zimbabwean Dollar (2008) - // - `ZWL` - Zimbabwean Dollar (2009) - Currency *BankFeedAccountCurrency `json:"currency,omitempty"` - // The status of the bank feed. - // - // - `ACTIVE` - ACTIVE - // - `INACTIVE` - INACTIVE - FeedStatus *BankFeedAccountFeedStatus `json:"feed_status,omitempty"` - // The start date of the bank feed’s transactions. - FeedStartDate *time.Time `json:"feed_start_date,omitempty"` - // The current balance of funds in the source account. - SourceAccountBalance *float64 `json:"source_account_balance,omitempty"` - // The type of the account. - // - // - `BANK` - BANK - // - `CREDIT_CARD` - CREDIT_CARD - AccountType *BankFeedAccountAccountType `json:"account_type,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []map[string]interface{} `json:"remote_data,omitempty"` +// * `ACTIVE` - ACTIVE +// * `INACTIVE` - INACTIVE +type BankFeedAccountFeedStatus struct { + FeedStatusEnum FeedStatusEnum + String string - _rawJSON json.RawMessage + typ string } -func (b *BankFeedAccount) UnmarshalJSON(data []byte) error { - type unmarshaler BankFeedAccount - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (b *BankFeedAccountFeedStatus) GetFeedStatusEnum() FeedStatusEnum { + if b == nil { + return "" } - *b = BankFeedAccount(value) - b._rawJSON = json.RawMessage(data) - return nil + return b.FeedStatusEnum } -func (b *BankFeedAccount) String() string { - if len(b._rawJSON) > 0 { - if value, err := core.StringifyJSON(b._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(b); err == nil { - return value +func (b *BankFeedAccountFeedStatus) GetString() string { + if b == nil { + return "" } - return fmt.Sprintf("%#v", b) -} - -// The type of the account. -// -// - `BANK` - BANK -// - `CREDIT_CARD` - CREDIT_CARD -type BankFeedAccountAccountType struct { - typeName string - BankFeedAccountAccountTypeEnum BankFeedAccountAccountTypeEnum - String string -} - -func NewBankFeedAccountAccountTypeFromBankFeedAccountAccountTypeEnum(value BankFeedAccountAccountTypeEnum) *BankFeedAccountAccountType { - return &BankFeedAccountAccountType{typeName: "bankFeedAccountAccountTypeEnum", BankFeedAccountAccountTypeEnum: value} -} - -func NewBankFeedAccountAccountTypeFromString(value string) *BankFeedAccountAccountType { - return &BankFeedAccountAccountType{typeName: "string", String: value} + return b.String } -func (b *BankFeedAccountAccountType) UnmarshalJSON(data []byte) error { - var valueBankFeedAccountAccountTypeEnum BankFeedAccountAccountTypeEnum - if err := json.Unmarshal(data, &valueBankFeedAccountAccountTypeEnum); err == nil { - b.typeName = "bankFeedAccountAccountTypeEnum" - b.BankFeedAccountAccountTypeEnum = valueBankFeedAccountAccountTypeEnum +func (b *BankFeedAccountFeedStatus) UnmarshalJSON(data []byte) error { + var valueFeedStatusEnum FeedStatusEnum + if err := json.Unmarshal(data, &valueFeedStatusEnum); err == nil { + b.typ = "FeedStatusEnum" + b.FeedStatusEnum = valueFeedStatusEnum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - b.typeName = "string" + b.typ = "String" b.String = valueString return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, b) } -func (b BankFeedAccountAccountType) MarshalJSON() ([]byte, error) { - switch b.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", b.typeName, b) - case "bankFeedAccountAccountTypeEnum": - return json.Marshal(b.BankFeedAccountAccountTypeEnum) - case "string": +func (b BankFeedAccountFeedStatus) MarshalJSON() ([]byte, error) { + if b.typ == "FeedStatusEnum" || b.FeedStatusEnum != "" { + return json.Marshal(b.FeedStatusEnum) + } + if b.typ == "String" || b.String != "" { return json.Marshal(b.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", b) } -type BankFeedAccountAccountTypeVisitor interface { - VisitBankFeedAccountAccountTypeEnum(BankFeedAccountAccountTypeEnum) error +type BankFeedAccountFeedStatusVisitor interface { + VisitFeedStatusEnum(FeedStatusEnum) error VisitString(string) error } -func (b *BankFeedAccountAccountType) Accept(visitor BankFeedAccountAccountTypeVisitor) error { - switch b.typeName { - default: - return fmt.Errorf("invalid type %s in %T", b.typeName, b) - case "bankFeedAccountAccountTypeEnum": - return visitor.VisitBankFeedAccountAccountTypeEnum(b.BankFeedAccountAccountTypeEnum) - case "string": +func (b *BankFeedAccountFeedStatus) Accept(visitor BankFeedAccountFeedStatusVisitor) error { + if b.typ == "FeedStatusEnum" || b.FeedStatusEnum != "" { + return visitor.VisitFeedStatusEnum(b.FeedStatusEnum) + } + if b.typ == "String" || b.String != "" { return visitor.VisitString(b.String) } + return fmt.Errorf("type %T does not include a non-empty union type", b) } -// - `BANK` - BANK -// - `CREDIT_CARD` - CREDIT_CARD -type BankFeedAccountAccountTypeEnum string +// * `hris` - hris +// * `ats` - ats +// * `accounting` - accounting +// * `ticketing` - ticketing +// * `crm` - crm +// * `mktg` - mktg +// * `filestorage` - filestorage +type CategoriesEnum string const ( - BankFeedAccountAccountTypeEnumBank BankFeedAccountAccountTypeEnum = "BANK" - BankFeedAccountAccountTypeEnumCreditCard BankFeedAccountAccountTypeEnum = "CREDIT_CARD" + CategoriesEnumHris CategoriesEnum = "hris" + CategoriesEnumAts CategoriesEnum = "ats" + CategoriesEnumAccounting CategoriesEnum = "accounting" + CategoriesEnumTicketing CategoriesEnum = "ticketing" + CategoriesEnumCrm CategoriesEnum = "crm" + CategoriesEnumMktg CategoriesEnum = "mktg" + CategoriesEnumFilestorage CategoriesEnum = "filestorage" ) -func NewBankFeedAccountAccountTypeEnumFromString(s string) (BankFeedAccountAccountTypeEnum, error) { +func NewCategoriesEnumFromString(s string) (CategoriesEnum, error) { switch s { - case "BANK": - return BankFeedAccountAccountTypeEnumBank, nil - case "CREDIT_CARD": - return BankFeedAccountAccountTypeEnumCreditCard, nil + case "hris": + return CategoriesEnumHris, nil + case "ats": + return CategoriesEnumAts, nil + case "accounting": + return CategoriesEnumAccounting, nil + case "ticketing": + return CategoriesEnumTicketing, nil + case "crm": + return CategoriesEnumCrm, nil + case "mktg": + return CategoriesEnumMktg, nil + case "filestorage": + return CategoriesEnumFilestorage, nil } - var t BankFeedAccountAccountTypeEnum + var t CategoriesEnum return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (b BankFeedAccountAccountTypeEnum) Ptr() *BankFeedAccountAccountTypeEnum { - return &b -} - -// The currency code of the bank feed. -// -// - `XUA` - ADB Unit of Account -// - `AFN` - Afghan Afghani -// - `AFA` - Afghan Afghani (1927–2002) -// - `ALL` - Albanian Lek -// - `ALK` - Albanian Lek (1946–1965) -// - `DZD` - Algerian Dinar -// - `ADP` - Andorran Peseta -// - `AOA` - Angolan Kwanza -// - `AOK` - Angolan Kwanza (1977–1991) -// - `AON` - Angolan New Kwanza (1990–2000) -// - `AOR` - Angolan Readjusted Kwanza (1995–1999) -// - `ARA` - Argentine Austral -// - `ARS` - Argentine Peso -// - `ARM` - Argentine Peso (1881–1970) -// - `ARP` - Argentine Peso (1983–1985) -// - `ARL` - Argentine Peso Ley (1970–1983) -// - `AMD` - Armenian Dram -// - `AWG` - Aruban Florin -// - `AUD` - Australian Dollar -// - `ATS` - Austrian Schilling -// - `AZN` - Azerbaijani Manat -// - `AZM` - Azerbaijani Manat (1993–2006) -// - `BSD` - Bahamian Dollar -// - `BHD` - Bahraini Dinar -// - `BDT` - Bangladeshi Taka -// - `BBD` - Barbadian Dollar -// - `BYN` - Belarusian Ruble -// - `BYB` - Belarusian Ruble (1994–1999) -// - `BYR` - Belarusian Ruble (2000–2016) -// - `BEF` - Belgian Franc -// - `BEC` - Belgian Franc (convertible) -// - `BEL` - Belgian Franc (financial) -// - `BZD` - Belize Dollar -// - `BMD` - Bermudan Dollar -// - `BTN` - Bhutanese Ngultrum -// - `BOB` - Bolivian Boliviano -// - `BOL` - Bolivian Boliviano (1863–1963) -// - `BOV` - Bolivian Mvdol -// - `BOP` - Bolivian Peso -// - `BAM` - Bosnia-Herzegovina Convertible Mark -// - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) -// - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) -// - `BWP` - Botswanan Pula -// - `BRC` - Brazilian Cruzado (1986–1989) -// - `BRZ` - Brazilian Cruzeiro (1942–1967) -// - `BRE` - Brazilian Cruzeiro (1990–1993) -// - `BRR` - Brazilian Cruzeiro (1993–1994) -// - `BRN` - Brazilian New Cruzado (1989–1990) -// - `BRB` - Brazilian New Cruzeiro (1967–1986) -// - `BRL` - Brazilian Real -// - `GBP` - British Pound -// - `BND` - Brunei Dollar -// - `BGL` - Bulgarian Hard Lev -// - `BGN` - Bulgarian Lev -// - `BGO` - Bulgarian Lev (1879–1952) -// - `BGM` - Bulgarian Socialist Lev -// - `BUK` - Burmese Kyat -// - `BIF` - Burundian Franc -// - `XPF` - CFP Franc -// - `KHR` - Cambodian Riel -// - `CAD` - Canadian Dollar -// - `CVE` - Cape Verdean Escudo -// - `KYD` - Cayman Islands Dollar -// - `XAF` - Central African CFA Franc -// - `CLE` - Chilean Escudo -// - `CLP` - Chilean Peso -// - `CLF` - Chilean Unit of Account (UF) -// - `CNX` - Chinese People’s Bank Dollar -// - `CNY` - Chinese Yuan -// - `CNH` - Chinese Yuan (offshore) -// - `COP` - Colombian Peso -// - `COU` - Colombian Real Value Unit -// - `KMF` - Comorian Franc -// - `CDF` - Congolese Franc -// - `CRC` - Costa Rican Colón -// - `HRD` - Croatian Dinar -// - `HRK` - Croatian Kuna -// - `CUC` - Cuban Convertible Peso -// - `CUP` - Cuban Peso -// - `CYP` - Cypriot Pound -// - `CZK` - Czech Koruna -// - `CSK` - Czechoslovak Hard Koruna -// - `DKK` - Danish Krone -// - `DJF` - Djiboutian Franc -// - `DOP` - Dominican Peso -// - `NLG` - Dutch Guilder -// - `XCD` - East Caribbean Dollar -// - `DDM` - East German Mark -// - `ECS` - Ecuadorian Sucre -// - `ECV` - Ecuadorian Unit of Constant Value -// - `EGP` - Egyptian Pound -// - `GQE` - Equatorial Guinean Ekwele -// - `ERN` - Eritrean Nakfa -// - `EEK` - Estonian Kroon -// - `ETB` - Ethiopian Birr -// - `EUR` - Euro -// - `XBA` - European Composite Unit -// - `XEU` - European Currency Unit -// - `XBB` - European Monetary Unit -// - `XBC` - European Unit of Account (XBC) -// - `XBD` - European Unit of Account (XBD) -// - `FKP` - Falkland Islands Pound -// - `FJD` - Fijian Dollar -// - `FIM` - Finnish Markka -// - `FRF` - French Franc -// - `XFO` - French Gold Franc -// - `XFU` - French UIC-Franc -// - `GMD` - Gambian Dalasi -// - `GEK` - Georgian Kupon Larit -// - `GEL` - Georgian Lari -// - `DEM` - German Mark -// - `GHS` - Ghanaian Cedi -// - `GHC` - Ghanaian Cedi (1979–2007) -// - `GIP` - Gibraltar Pound -// - `XAU` - Gold -// - `GRD` - Greek Drachma -// - `GTQ` - Guatemalan Quetzal -// - `GWP` - Guinea-Bissau Peso -// - `GNF` - Guinean Franc -// - `GNS` - Guinean Syli -// - `GYD` - Guyanaese Dollar -// - `HTG` - Haitian Gourde -// - `HNL` - Honduran Lempira -// - `HKD` - Hong Kong Dollar -// - `HUF` - Hungarian Forint -// - `IMP` - IMP -// - `ISK` - Icelandic Króna -// - `ISJ` - Icelandic Króna (1918–1981) -// - `INR` - Indian Rupee -// - `IDR` - Indonesian Rupiah -// - `IRR` - Iranian Rial -// - `IQD` - Iraqi Dinar -// - `IEP` - Irish Pound -// - `ILS` - Israeli New Shekel -// - `ILP` - Israeli Pound -// - `ILR` - Israeli Shekel (1980–1985) -// - `ITL` - Italian Lira -// - `JMD` - Jamaican Dollar -// - `JPY` - Japanese Yen -// - `JOD` - Jordanian Dinar -// - `KZT` - Kazakhstani Tenge -// - `KES` - Kenyan Shilling -// - `KWD` - Kuwaiti Dinar -// - `KGS` - Kyrgystani Som -// - `LAK` - Laotian Kip -// - `LVL` - Latvian Lats -// - `LVR` - Latvian Ruble -// - `LBP` - Lebanese Pound -// - `LSL` - Lesotho Loti -// - `LRD` - Liberian Dollar -// - `LYD` - Libyan Dinar -// - `LTL` - Lithuanian Litas -// - `LTT` - Lithuanian Talonas -// - `LUL` - Luxembourg Financial Franc -// - `LUC` - Luxembourgian Convertible Franc -// - `LUF` - Luxembourgian Franc -// - `MOP` - Macanese Pataca -// - `MKD` - Macedonian Denar -// - `MKN` - Macedonian Denar (1992–1993) -// - `MGA` - Malagasy Ariary -// - `MGF` - Malagasy Franc -// - `MWK` - Malawian Kwacha -// - `MYR` - Malaysian Ringgit -// - `MVR` - Maldivian Rufiyaa -// - `MVP` - Maldivian Rupee (1947–1981) -// - `MLF` - Malian Franc -// - `MTL` - Maltese Lira -// - `MTP` - Maltese Pound -// - `MRU` - Mauritanian Ouguiya -// - `MRO` - Mauritanian Ouguiya (1973–2017) -// - `MUR` - Mauritian Rupee -// - `MXV` - Mexican Investment Unit -// - `MXN` - Mexican Peso -// - `MXP` - Mexican Silver Peso (1861–1992) -// - `MDC` - Moldovan Cupon -// - `MDL` - Moldovan Leu -// - `MCF` - Monegasque Franc -// - `MNT` - Mongolian Tugrik -// - `MAD` - Moroccan Dirham -// - `MAF` - Moroccan Franc -// - `MZE` - Mozambican Escudo -// - `MZN` - Mozambican Metical -// - `MZM` - Mozambican Metical (1980–2006) -// - `MMK` - Myanmar Kyat -// - `NAD` - Namibian Dollar -// - `NPR` - Nepalese Rupee -// - `ANG` - Netherlands Antillean Guilder -// - `TWD` - New Taiwan Dollar -// - `NZD` - New Zealand Dollar -// - `NIO` - Nicaraguan Córdoba -// - `NIC` - Nicaraguan Córdoba (1988–1991) -// - `NGN` - Nigerian Naira -// - `KPW` - North Korean Won -// - `NOK` - Norwegian Krone -// - `OMR` - Omani Rial -// - `PKR` - Pakistani Rupee -// - `XPD` - Palladium -// - `PAB` - Panamanian Balboa -// - `PGK` - Papua New Guinean Kina -// - `PYG` - Paraguayan Guarani -// - `PEI` - Peruvian Inti -// - `PEN` - Peruvian Sol -// - `PES` - Peruvian Sol (1863–1965) -// - `PHP` - Philippine Peso -// - `XPT` - Platinum -// - `PLN` - Polish Zloty -// - `PLZ` - Polish Zloty (1950–1995) -// - `PTE` - Portuguese Escudo -// - `GWE` - Portuguese Guinea Escudo -// - `QAR` - Qatari Rial -// - `XRE` - RINET Funds -// - `RHD` - Rhodesian Dollar -// - `RON` - Romanian Leu -// - `ROL` - Romanian Leu (1952–2006) -// - `RUB` - Russian Ruble -// - `RUR` - Russian Ruble (1991–1998) -// - `RWF` - Rwandan Franc -// - `SVC` - Salvadoran Colón -// - `WST` - Samoan Tala -// - `SAR` - Saudi Riyal -// - `RSD` - Serbian Dinar -// - `CSD` - Serbian Dinar (2002–2006) -// - `SCR` - Seychellois Rupee -// - `SLL` - Sierra Leonean Leone -// - `XAG` - Silver -// - `SGD` - Singapore Dollar -// - `SKK` - Slovak Koruna -// - `SIT` - Slovenian Tolar -// - `SBD` - Solomon Islands Dollar -// - `SOS` - Somali Shilling -// - `ZAR` - South African Rand -// - `ZAL` - South African Rand (financial) -// - `KRH` - South Korean Hwan (1953–1962) -// - `KRW` - South Korean Won -// - `KRO` - South Korean Won (1945–1953) -// - `SSP` - South Sudanese Pound -// - `SUR` - Soviet Rouble -// - `ESP` - Spanish Peseta -// - `ESA` - Spanish Peseta (A account) -// - `ESB` - Spanish Peseta (convertible account) -// - `XDR` - Special Drawing Rights -// - `LKR` - Sri Lankan Rupee -// - `SHP` - St. Helena Pound -// - `XSU` - Sucre -// - `SDD` - Sudanese Dinar (1992–2007) -// - `SDG` - Sudanese Pound -// - `SDP` - Sudanese Pound (1957–1998) -// - `SRD` - Surinamese Dollar -// - `SRG` - Surinamese Guilder -// - `SZL` - Swazi Lilangeni -// - `SEK` - Swedish Krona -// - `CHF` - Swiss Franc -// - `SYP` - Syrian Pound -// - `STN` - São Tomé & Príncipe Dobra -// - `STD` - São Tomé & Príncipe Dobra (1977–2017) -// - `TVD` - TVD -// - `TJR` - Tajikistani Ruble -// - `TJS` - Tajikistani Somoni -// - `TZS` - Tanzanian Shilling -// - `XTS` - Testing Currency Code -// - `THB` - Thai Baht -// - `XXX` - The codes assigned for transactions where no currency is involved -// - `TPE` - Timorese Escudo -// - `TOP` - Tongan Paʻanga -// - `TTD` - Trinidad & Tobago Dollar -// - `TND` - Tunisian Dinar -// - `TRY` - Turkish Lira -// - `TRL` - Turkish Lira (1922–2005) -// - `TMT` - Turkmenistani Manat -// - `TMM` - Turkmenistani Manat (1993–2009) -// - `USD` - US Dollar -// - `USN` - US Dollar (Next day) -// - `USS` - US Dollar (Same day) -// - `UGX` - Ugandan Shilling -// - `UGS` - Ugandan Shilling (1966–1987) -// - `UAH` - Ukrainian Hryvnia -// - `UAK` - Ukrainian Karbovanets -// - `AED` - United Arab Emirates Dirham -// - `UYW` - Uruguayan Nominal Wage Index Unit -// - `UYU` - Uruguayan Peso -// - `UYP` - Uruguayan Peso (1975–1993) -// - `UYI` - Uruguayan Peso (Indexed Units) -// - `UZS` - Uzbekistani Som -// - `VUV` - Vanuatu Vatu -// - `VES` - Venezuelan Bolívar -// - `VEB` - Venezuelan Bolívar (1871–2008) -// - `VEF` - Venezuelan Bolívar (2008–2018) -// - `VND` - Vietnamese Dong -// - `VNN` - Vietnamese Dong (1978–1985) -// - `CHE` - WIR Euro -// - `CHW` - WIR Franc -// - `XOF` - West African CFA Franc -// - `YDD` - Yemeni Dinar -// - `YER` - Yemeni Rial -// - `YUN` - Yugoslavian Convertible Dinar (1990–1992) -// - `YUD` - Yugoslavian Hard Dinar (1966–1990) -// - `YUM` - Yugoslavian New Dinar (1994–2002) -// - `YUR` - Yugoslavian Reformed Dinar (1992–1993) -// - `ZWN` - ZWN -// - `ZRN` - Zairean New Zaire (1993–1998) -// - `ZRZ` - Zairean Zaire (1971–1993) -// - `ZMW` - Zambian Kwacha -// - `ZMK` - Zambian Kwacha (1968–2012) -// - `ZWD` - Zimbabwean Dollar (1980–2008) -// - `ZWR` - Zimbabwean Dollar (2008) -// - `ZWL` - Zimbabwean Dollar (2009) -type BankFeedAccountCurrency struct { - typeName string - TransactionCurrencyEnum TransactionCurrencyEnum - String string +func (c CategoriesEnum) Ptr() *CategoriesEnum { + return &c } -func NewBankFeedAccountCurrencyFromTransactionCurrencyEnum(value TransactionCurrencyEnum) *BankFeedAccountCurrency { - return &BankFeedAccountCurrency{typeName: "transactionCurrencyEnum", TransactionCurrencyEnum: value} -} +// * `hris` - hris +// * `ats` - ats +// * `accounting` - accounting +// * `ticketing` - ticketing +// * `crm` - crm +// * `mktg` - mktg +// * `filestorage` - filestorage +type CategoryEnum string -func NewBankFeedAccountCurrencyFromString(value string) *BankFeedAccountCurrency { - return &BankFeedAccountCurrency{typeName: "string", String: value} -} +const ( + CategoryEnumHris CategoryEnum = "hris" + CategoryEnumAts CategoryEnum = "ats" + CategoryEnumAccounting CategoryEnum = "accounting" + CategoryEnumTicketing CategoryEnum = "ticketing" + CategoryEnumCrm CategoryEnum = "crm" + CategoryEnumMktg CategoryEnum = "mktg" + CategoryEnumFilestorage CategoryEnum = "filestorage" +) -func (b *BankFeedAccountCurrency) UnmarshalJSON(data []byte) error { - var valueTransactionCurrencyEnum TransactionCurrencyEnum - if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { - b.typeName = "transactionCurrencyEnum" - b.TransactionCurrencyEnum = valueTransactionCurrencyEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - b.typeName = "string" - b.String = valueString - return nil +func NewCategoryEnumFromString(s string) (CategoryEnum, error) { + switch s { + case "hris": + return CategoryEnumHris, nil + case "ats": + return CategoryEnumAts, nil + case "accounting": + return CategoryEnumAccounting, nil + case "ticketing": + return CategoryEnumTicketing, nil + case "crm": + return CategoryEnumCrm, nil + case "mktg": + return CategoryEnumMktg, nil + case "filestorage": + return CategoryEnumFilestorage, nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, b) + var t CategoryEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (b BankFeedAccountCurrency) MarshalJSON() ([]byte, error) { - switch b.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", b.typeName, b) - case "transactionCurrencyEnum": - return json.Marshal(b.TransactionCurrencyEnum) - case "string": - return json.Marshal(b.String) - } +func (c CategoryEnum) Ptr() *CategoryEnum { + return &c } -type BankFeedAccountCurrencyVisitor interface { - VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error - VisitString(string) error -} +// * `CLASS` - CLASS +// * `DEPARTMENT` - DEPARTMENT +type CategoryTypeEnum string -func (b *BankFeedAccountCurrency) Accept(visitor BankFeedAccountCurrencyVisitor) error { - switch b.typeName { - default: - return fmt.Errorf("invalid type %s in %T", b.typeName, b) - case "transactionCurrencyEnum": - return visitor.VisitTransactionCurrencyEnum(b.TransactionCurrencyEnum) - case "string": - return visitor.VisitString(b.String) - } -} +const ( + CategoryTypeEnumClass CategoryTypeEnum = "CLASS" + CategoryTypeEnumDepartment CategoryTypeEnum = "DEPARTMENT" +) -// The status of the bank feed. -// -// - `ACTIVE` - ACTIVE -// - `INACTIVE` - INACTIVE -type BankFeedAccountFeedStatus struct { - typeName string - FeedStatusEnum FeedStatusEnum - String string +func NewCategoryTypeEnumFromString(s string) (CategoryTypeEnum, error) { + switch s { + case "CLASS": + return CategoryTypeEnumClass, nil + case "DEPARTMENT": + return CategoryTypeEnumDepartment, nil + } + var t CategoryTypeEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -func NewBankFeedAccountFeedStatusFromFeedStatusEnum(value FeedStatusEnum) *BankFeedAccountFeedStatus { - return &BankFeedAccountFeedStatus{typeName: "feedStatusEnum", FeedStatusEnum: value} +func (c CategoryTypeEnum) Ptr() *CategoryTypeEnum { + return &c } -func NewBankFeedAccountFeedStatusFromString(value string) *BankFeedAccountFeedStatus { - return &BankFeedAccountFeedStatus{typeName: "string", String: value} -} +// * `ASSET` - ASSET +// * `EQUITY` - EQUITY +// * `EXPENSE` - EXPENSE +// * `LIABILITY` - LIABILITY +// * `REVENUE` - REVENUE +type ClassificationEnum string -func (b *BankFeedAccountFeedStatus) UnmarshalJSON(data []byte) error { - var valueFeedStatusEnum FeedStatusEnum - if err := json.Unmarshal(data, &valueFeedStatusEnum); err == nil { - b.typeName = "feedStatusEnum" - b.FeedStatusEnum = valueFeedStatusEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - b.typeName = "string" - b.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, b) -} +const ( + ClassificationEnumAsset ClassificationEnum = "ASSET" + ClassificationEnumEquity ClassificationEnum = "EQUITY" + ClassificationEnumExpense ClassificationEnum = "EXPENSE" + ClassificationEnumLiability ClassificationEnum = "LIABILITY" + ClassificationEnumRevenue ClassificationEnum = "REVENUE" +) -func (b BankFeedAccountFeedStatus) MarshalJSON() ([]byte, error) { - switch b.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", b.typeName, b) - case "feedStatusEnum": - return json.Marshal(b.FeedStatusEnum) - case "string": - return json.Marshal(b.String) +func NewClassificationEnumFromString(s string) (ClassificationEnum, error) { + switch s { + case "ASSET": + return ClassificationEnumAsset, nil + case "EQUITY": + return ClassificationEnumEquity, nil + case "EXPENSE": + return ClassificationEnumExpense, nil + case "LIABILITY": + return ClassificationEnumLiability, nil + case "REVENUE": + return ClassificationEnumRevenue, nil } + var t ClassificationEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -type BankFeedAccountFeedStatusVisitor interface { - VisitFeedStatusEnum(FeedStatusEnum) error - VisitString(string) error -} - -func (b *BankFeedAccountFeedStatus) Accept(visitor BankFeedAccountFeedStatusVisitor) error { - switch b.typeName { - default: - return fmt.Errorf("invalid type %s in %T", b.typeName, b) - case "feedStatusEnum": - return visitor.VisitFeedStatusEnum(b.FeedStatusEnum) - case "string": - return visitor.VisitString(b.String) - } +func (c ClassificationEnum) Ptr() *ClassificationEnum { + return &c } -// # The BankFeedAccount Object -// +// # The CompanyInfo Object // ### Description -// -// The `BankFeedAccount` object represents a bank feed account, detailing various attributes including account identifiers, names, currency, and balance information. This object is central to managing and tracking bank feed accounts within the system. +// The `CompanyInfo` object contains information about the company of the linked account. If the company has multiple entities (also known as subsidiaries), each entity may show up as a single `CompanyInfo` record. // // ### Usage Example -// -// Fetch from the `GET BankFeedAccount` endpoint to view details of a bank feed account. -type BankFeedAccountRequest struct { - // The unique identifier of the source account from our customer’s platform. - SourceAccountId *string `json:"source_account_id,omitempty"` - // The unique identifier of the target account from the third party software. - TargetAccountId *string `json:"target_account_id,omitempty"` - // The name of the source account as stored in our customer’s platform. - SourceAccountName *string `json:"source_account_name,omitempty"` - // The human-readable account number of the source account as stored in our customer’s platform. - SourceAccountNumber *string `json:"source_account_number,omitempty"` - // The name of the target account from the third party software. - TargetAccountName *string `json:"target_account_name,omitempty"` - // The currency code of the bank feed. - // - // - `XUA` - ADB Unit of Account - // - `AFN` - Afghan Afghani - // - `AFA` - Afghan Afghani (1927–2002) - // - `ALL` - Albanian Lek - // - `ALK` - Albanian Lek (1946–1965) - // - `DZD` - Algerian Dinar - // - `ADP` - Andorran Peseta - // - `AOA` - Angolan Kwanza - // - `AOK` - Angolan Kwanza (1977–1991) - // - `AON` - Angolan New Kwanza (1990–2000) - // - `AOR` - Angolan Readjusted Kwanza (1995–1999) - // - `ARA` - Argentine Austral - // - `ARS` - Argentine Peso - // - `ARM` - Argentine Peso (1881–1970) - // - `ARP` - Argentine Peso (1983–1985) - // - `ARL` - Argentine Peso Ley (1970–1983) - // - `AMD` - Armenian Dram - // - `AWG` - Aruban Florin - // - `AUD` - Australian Dollar - // - `ATS` - Austrian Schilling - // - `AZN` - Azerbaijani Manat - // - `AZM` - Azerbaijani Manat (1993–2006) - // - `BSD` - Bahamian Dollar - // - `BHD` - Bahraini Dinar - // - `BDT` - Bangladeshi Taka - // - `BBD` - Barbadian Dollar - // - `BYN` - Belarusian Ruble - // - `BYB` - Belarusian Ruble (1994–1999) - // - `BYR` - Belarusian Ruble (2000–2016) - // - `BEF` - Belgian Franc - // - `BEC` - Belgian Franc (convertible) - // - `BEL` - Belgian Franc (financial) - // - `BZD` - Belize Dollar - // - `BMD` - Bermudan Dollar - // - `BTN` - Bhutanese Ngultrum - // - `BOB` - Bolivian Boliviano - // - `BOL` - Bolivian Boliviano (1863–1963) - // - `BOV` - Bolivian Mvdol - // - `BOP` - Bolivian Peso - // - `BAM` - Bosnia-Herzegovina Convertible Mark - // - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - // - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - // - `BWP` - Botswanan Pula - // - `BRC` - Brazilian Cruzado (1986–1989) - // - `BRZ` - Brazilian Cruzeiro (1942–1967) - // - `BRE` - Brazilian Cruzeiro (1990–1993) - // - `BRR` - Brazilian Cruzeiro (1993–1994) - // - `BRN` - Brazilian New Cruzado (1989–1990) - // - `BRB` - Brazilian New Cruzeiro (1967–1986) - // - `BRL` - Brazilian Real - // - `GBP` - British Pound - // - `BND` - Brunei Dollar - // - `BGL` - Bulgarian Hard Lev - // - `BGN` - Bulgarian Lev - // - `BGO` - Bulgarian Lev (1879–1952) - // - `BGM` - Bulgarian Socialist Lev - // - `BUK` - Burmese Kyat - // - `BIF` - Burundian Franc - // - `XPF` - CFP Franc - // - `KHR` - Cambodian Riel - // - `CAD` - Canadian Dollar - // - `CVE` - Cape Verdean Escudo - // - `KYD` - Cayman Islands Dollar - // - `XAF` - Central African CFA Franc - // - `CLE` - Chilean Escudo - // - `CLP` - Chilean Peso - // - `CLF` - Chilean Unit of Account (UF) - // - `CNX` - Chinese People’s Bank Dollar - // - `CNY` - Chinese Yuan - // - `CNH` - Chinese Yuan (offshore) - // - `COP` - Colombian Peso - // - `COU` - Colombian Real Value Unit - // - `KMF` - Comorian Franc - // - `CDF` - Congolese Franc - // - `CRC` - Costa Rican Colón - // - `HRD` - Croatian Dinar - // - `HRK` - Croatian Kuna - // - `CUC` - Cuban Convertible Peso - // - `CUP` - Cuban Peso - // - `CYP` - Cypriot Pound - // - `CZK` - Czech Koruna - // - `CSK` - Czechoslovak Hard Koruna - // - `DKK` - Danish Krone - // - `DJF` - Djiboutian Franc - // - `DOP` - Dominican Peso - // - `NLG` - Dutch Guilder - // - `XCD` - East Caribbean Dollar - // - `DDM` - East German Mark - // - `ECS` - Ecuadorian Sucre - // - `ECV` - Ecuadorian Unit of Constant Value - // - `EGP` - Egyptian Pound - // - `GQE` - Equatorial Guinean Ekwele - // - `ERN` - Eritrean Nakfa - // - `EEK` - Estonian Kroon - // - `ETB` - Ethiopian Birr - // - `EUR` - Euro - // - `XBA` - European Composite Unit - // - `XEU` - European Currency Unit - // - `XBB` - European Monetary Unit - // - `XBC` - European Unit of Account (XBC) - // - `XBD` - European Unit of Account (XBD) - // - `FKP` - Falkland Islands Pound - // - `FJD` - Fijian Dollar - // - `FIM` - Finnish Markka - // - `FRF` - French Franc - // - `XFO` - French Gold Franc - // - `XFU` - French UIC-Franc - // - `GMD` - Gambian Dalasi - // - `GEK` - Georgian Kupon Larit - // - `GEL` - Georgian Lari - // - `DEM` - German Mark - // - `GHS` - Ghanaian Cedi - // - `GHC` - Ghanaian Cedi (1979–2007) - // - `GIP` - Gibraltar Pound - // - `XAU` - Gold - // - `GRD` - Greek Drachma - // - `GTQ` - Guatemalan Quetzal - // - `GWP` - Guinea-Bissau Peso - // - `GNF` - Guinean Franc - // - `GNS` - Guinean Syli - // - `GYD` - Guyanaese Dollar - // - `HTG` - Haitian Gourde - // - `HNL` - Honduran Lempira - // - `HKD` - Hong Kong Dollar - // - `HUF` - Hungarian Forint - // - `IMP` - IMP - // - `ISK` - Icelandic Króna - // - `ISJ` - Icelandic Króna (1918–1981) - // - `INR` - Indian Rupee - // - `IDR` - Indonesian Rupiah - // - `IRR` - Iranian Rial - // - `IQD` - Iraqi Dinar - // - `IEP` - Irish Pound - // - `ILS` - Israeli New Shekel - // - `ILP` - Israeli Pound - // - `ILR` - Israeli Shekel (1980–1985) - // - `ITL` - Italian Lira - // - `JMD` - Jamaican Dollar - // - `JPY` - Japanese Yen - // - `JOD` - Jordanian Dinar - // - `KZT` - Kazakhstani Tenge - // - `KES` - Kenyan Shilling - // - `KWD` - Kuwaiti Dinar - // - `KGS` - Kyrgystani Som - // - `LAK` - Laotian Kip - // - `LVL` - Latvian Lats - // - `LVR` - Latvian Ruble - // - `LBP` - Lebanese Pound - // - `LSL` - Lesotho Loti - // - `LRD` - Liberian Dollar - // - `LYD` - Libyan Dinar - // - `LTL` - Lithuanian Litas - // - `LTT` - Lithuanian Talonas - // - `LUL` - Luxembourg Financial Franc - // - `LUC` - Luxembourgian Convertible Franc - // - `LUF` - Luxembourgian Franc - // - `MOP` - Macanese Pataca - // - `MKD` - Macedonian Denar - // - `MKN` - Macedonian Denar (1992–1993) - // - `MGA` - Malagasy Ariary - // - `MGF` - Malagasy Franc - // - `MWK` - Malawian Kwacha - // - `MYR` - Malaysian Ringgit - // - `MVR` - Maldivian Rufiyaa - // - `MVP` - Maldivian Rupee (1947–1981) - // - `MLF` - Malian Franc - // - `MTL` - Maltese Lira - // - `MTP` - Maltese Pound - // - `MRU` - Mauritanian Ouguiya - // - `MRO` - Mauritanian Ouguiya (1973–2017) - // - `MUR` - Mauritian Rupee - // - `MXV` - Mexican Investment Unit - // - `MXN` - Mexican Peso - // - `MXP` - Mexican Silver Peso (1861–1992) - // - `MDC` - Moldovan Cupon - // - `MDL` - Moldovan Leu - // - `MCF` - Monegasque Franc - // - `MNT` - Mongolian Tugrik - // - `MAD` - Moroccan Dirham - // - `MAF` - Moroccan Franc - // - `MZE` - Mozambican Escudo - // - `MZN` - Mozambican Metical - // - `MZM` - Mozambican Metical (1980–2006) - // - `MMK` - Myanmar Kyat - // - `NAD` - Namibian Dollar - // - `NPR` - Nepalese Rupee - // - `ANG` - Netherlands Antillean Guilder - // - `TWD` - New Taiwan Dollar - // - `NZD` - New Zealand Dollar - // - `NIO` - Nicaraguan Córdoba - // - `NIC` - Nicaraguan Córdoba (1988–1991) - // - `NGN` - Nigerian Naira - // - `KPW` - North Korean Won - // - `NOK` - Norwegian Krone - // - `OMR` - Omani Rial - // - `PKR` - Pakistani Rupee - // - `XPD` - Palladium - // - `PAB` - Panamanian Balboa - // - `PGK` - Papua New Guinean Kina - // - `PYG` - Paraguayan Guarani - // - `PEI` - Peruvian Inti - // - `PEN` - Peruvian Sol - // - `PES` - Peruvian Sol (1863–1965) - // - `PHP` - Philippine Peso - // - `XPT` - Platinum - // - `PLN` - Polish Zloty - // - `PLZ` - Polish Zloty (1950–1995) - // - `PTE` - Portuguese Escudo - // - `GWE` - Portuguese Guinea Escudo - // - `QAR` - Qatari Rial - // - `XRE` - RINET Funds - // - `RHD` - Rhodesian Dollar - // - `RON` - Romanian Leu - // - `ROL` - Romanian Leu (1952–2006) - // - `RUB` - Russian Ruble - // - `RUR` - Russian Ruble (1991–1998) - // - `RWF` - Rwandan Franc - // - `SVC` - Salvadoran Colón - // - `WST` - Samoan Tala - // - `SAR` - Saudi Riyal - // - `RSD` - Serbian Dinar - // - `CSD` - Serbian Dinar (2002–2006) - // - `SCR` - Seychellois Rupee - // - `SLL` - Sierra Leonean Leone - // - `XAG` - Silver - // - `SGD` - Singapore Dollar - // - `SKK` - Slovak Koruna - // - `SIT` - Slovenian Tolar - // - `SBD` - Solomon Islands Dollar - // - `SOS` - Somali Shilling - // - `ZAR` - South African Rand - // - `ZAL` - South African Rand (financial) - // - `KRH` - South Korean Hwan (1953–1962) - // - `KRW` - South Korean Won - // - `KRO` - South Korean Won (1945–1953) - // - `SSP` - South Sudanese Pound - // - `SUR` - Soviet Rouble - // - `ESP` - Spanish Peseta - // - `ESA` - Spanish Peseta (A account) - // - `ESB` - Spanish Peseta (convertible account) - // - `XDR` - Special Drawing Rights - // - `LKR` - Sri Lankan Rupee - // - `SHP` - St. Helena Pound - // - `XSU` - Sucre - // - `SDD` - Sudanese Dinar (1992–2007) - // - `SDG` - Sudanese Pound - // - `SDP` - Sudanese Pound (1957–1998) - // - `SRD` - Surinamese Dollar - // - `SRG` - Surinamese Guilder - // - `SZL` - Swazi Lilangeni - // - `SEK` - Swedish Krona - // - `CHF` - Swiss Franc - // - `SYP` - Syrian Pound - // - `STN` - São Tomé & Príncipe Dobra - // - `STD` - São Tomé & Príncipe Dobra (1977–2017) - // - `TVD` - TVD - // - `TJR` - Tajikistani Ruble - // - `TJS` - Tajikistani Somoni - // - `TZS` - Tanzanian Shilling - // - `XTS` - Testing Currency Code - // - `THB` - Thai Baht - // - `XXX` - The codes assigned for transactions where no currency is involved - // - `TPE` - Timorese Escudo - // - `TOP` - Tongan Paʻanga - // - `TTD` - Trinidad & Tobago Dollar - // - `TND` - Tunisian Dinar - // - `TRY` - Turkish Lira - // - `TRL` - Turkish Lira (1922–2005) - // - `TMT` - Turkmenistani Manat - // - `TMM` - Turkmenistani Manat (1993–2009) - // - `USD` - US Dollar - // - `USN` - US Dollar (Next day) - // - `USS` - US Dollar (Same day) - // - `UGX` - Ugandan Shilling - // - `UGS` - Ugandan Shilling (1966–1987) - // - `UAH` - Ukrainian Hryvnia - // - `UAK` - Ukrainian Karbovanets - // - `AED` - United Arab Emirates Dirham - // - `UYW` - Uruguayan Nominal Wage Index Unit - // - `UYU` - Uruguayan Peso - // - `UYP` - Uruguayan Peso (1975–1993) - // - `UYI` - Uruguayan Peso (Indexed Units) - // - `UZS` - Uzbekistani Som - // - `VUV` - Vanuatu Vatu - // - `VES` - Venezuelan Bolívar - // - `VEB` - Venezuelan Bolívar (1871–2008) - // - `VEF` - Venezuelan Bolívar (2008–2018) - // - `VND` - Vietnamese Dong - // - `VNN` - Vietnamese Dong (1978–1985) - // - `CHE` - WIR Euro - // - `CHW` - WIR Franc - // - `XOF` - West African CFA Franc - // - `YDD` - Yemeni Dinar - // - `YER` - Yemeni Rial - // - `YUN` - Yugoslavian Convertible Dinar (1990–1992) - // - `YUD` - Yugoslavian Hard Dinar (1966–1990) - // - `YUM` - Yugoslavian New Dinar (1994–2002) - // - `YUR` - Yugoslavian Reformed Dinar (1992–1993) - // - `ZWN` - ZWN - // - `ZRN` - Zairean New Zaire (1993–1998) - // - `ZRZ` - Zairean Zaire (1971–1993) - // - `ZMW` - Zambian Kwacha - // - `ZMK` - Zambian Kwacha (1968–2012) - // - `ZWD` - Zimbabwean Dollar (1980–2008) - // - `ZWR` - Zimbabwean Dollar (2008) - // - `ZWL` - Zimbabwean Dollar (2009) - Currency *BankFeedAccountRequestCurrency `json:"currency,omitempty"` - // The status of the bank feed. - // - // - `ACTIVE` - ACTIVE - // - `INACTIVE` - INACTIVE - FeedStatus *BankFeedAccountRequestFeedStatus `json:"feed_status,omitempty"` - // The start date of the bank feed’s transactions. - FeedStartDate *time.Time `json:"feed_start_date,omitempty"` - // The current balance of funds in the source account. - SourceAccountBalance *float64 `json:"source_account_balance,omitempty"` - // The type of the account. - // - // - `BANK` - BANK - // - `CREDIT_CARD` - CREDIT_CARD - AccountType *BankFeedAccountRequestAccountType `json:"account_type,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` +// Fetch from the `GET CompanyInfo` endpoint and view a company's information. +type CompanyInfo struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The company's name. + Name *string `json:"name,omitempty" url:"name,omitempty"` + // The company's legal name. + LegalName *string `json:"legal_name,omitempty" url:"legal_name,omitempty"` + // The company's tax number. + TaxNumber *string `json:"tax_number,omitempty" url:"tax_number,omitempty"` + // The company's fiscal year end month. + FiscalYearEndMonth *int `json:"fiscal_year_end_month,omitempty" url:"fiscal_year_end_month,omitempty"` + // The company's fiscal year end day. + FiscalYearEndDay *int `json:"fiscal_year_end_day,omitempty" url:"fiscal_year_end_day,omitempty"` + Currency interface{} `json:"currency,omitempty" url:"currency,omitempty"` + // When the third party's company was created. + RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty" url:"remote_created_at,omitempty"` + // The company's urls. + Urls []*string `json:"urls,omitempty" url:"urls,omitempty"` + Addresses []*Address `json:"addresses,omitempty" url:"addresses,omitempty"` + PhoneNumbers []*AccountingPhoneNumber `json:"phone_numbers,omitempty" url:"phone_numbers,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (b *BankFeedAccountRequest) UnmarshalJSON(data []byte) error { - type unmarshaler BankFeedAccountRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (c *CompanyInfo) GetId() *string { + if c == nil { + return nil } - *b = BankFeedAccountRequest(value) - b._rawJSON = json.RawMessage(data) - return nil + return c.Id } -func (b *BankFeedAccountRequest) String() string { - if len(b._rawJSON) > 0 { - if value, err := core.StringifyJSON(b._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(b); err == nil { - return value +func (c *CompanyInfo) GetRemoteId() *string { + if c == nil { + return nil } - return fmt.Sprintf("%#v", b) -} - -// The type of the account. -// -// - `BANK` - BANK -// - `CREDIT_CARD` - CREDIT_CARD -type BankFeedAccountRequestAccountType struct { - typeName string - BankFeedAccountAccountTypeEnum BankFeedAccountAccountTypeEnum - String string -} - -func NewBankFeedAccountRequestAccountTypeFromBankFeedAccountAccountTypeEnum(value BankFeedAccountAccountTypeEnum) *BankFeedAccountRequestAccountType { - return &BankFeedAccountRequestAccountType{typeName: "bankFeedAccountAccountTypeEnum", BankFeedAccountAccountTypeEnum: value} -} - -func NewBankFeedAccountRequestAccountTypeFromString(value string) *BankFeedAccountRequestAccountType { - return &BankFeedAccountRequestAccountType{typeName: "string", String: value} + return c.RemoteId } -func (b *BankFeedAccountRequestAccountType) UnmarshalJSON(data []byte) error { - var valueBankFeedAccountAccountTypeEnum BankFeedAccountAccountTypeEnum - if err := json.Unmarshal(data, &valueBankFeedAccountAccountTypeEnum); err == nil { - b.typeName = "bankFeedAccountAccountTypeEnum" - b.BankFeedAccountAccountTypeEnum = valueBankFeedAccountAccountTypeEnum +func (c *CompanyInfo) GetCreatedAt() *time.Time { + if c == nil { return nil } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - b.typeName = "string" - b.String = valueString + return c.CreatedAt +} + +func (c *CompanyInfo) GetModifiedAt() *time.Time { + if c == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, b) + return c.ModifiedAt } -func (b BankFeedAccountRequestAccountType) MarshalJSON() ([]byte, error) { - switch b.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", b.typeName, b) - case "bankFeedAccountAccountTypeEnum": - return json.Marshal(b.BankFeedAccountAccountTypeEnum) - case "string": - return json.Marshal(b.String) +func (c *CompanyInfo) GetName() *string { + if c == nil { + return nil } + return c.Name } -type BankFeedAccountRequestAccountTypeVisitor interface { - VisitBankFeedAccountAccountTypeEnum(BankFeedAccountAccountTypeEnum) error - VisitString(string) error +func (c *CompanyInfo) GetLegalName() *string { + if c == nil { + return nil + } + return c.LegalName } -func (b *BankFeedAccountRequestAccountType) Accept(visitor BankFeedAccountRequestAccountTypeVisitor) error { - switch b.typeName { - default: - return fmt.Errorf("invalid type %s in %T", b.typeName, b) - case "bankFeedAccountAccountTypeEnum": - return visitor.VisitBankFeedAccountAccountTypeEnum(b.BankFeedAccountAccountTypeEnum) - case "string": - return visitor.VisitString(b.String) +func (c *CompanyInfo) GetTaxNumber() *string { + if c == nil { + return nil } + return c.TaxNumber } -// The currency code of the bank feed. -// -// - `XUA` - ADB Unit of Account -// - `AFN` - Afghan Afghani -// - `AFA` - Afghan Afghani (1927–2002) -// - `ALL` - Albanian Lek -// - `ALK` - Albanian Lek (1946–1965) -// - `DZD` - Algerian Dinar -// - `ADP` - Andorran Peseta -// - `AOA` - Angolan Kwanza -// - `AOK` - Angolan Kwanza (1977–1991) -// - `AON` - Angolan New Kwanza (1990–2000) -// - `AOR` - Angolan Readjusted Kwanza (1995–1999) -// - `ARA` - Argentine Austral -// - `ARS` - Argentine Peso -// - `ARM` - Argentine Peso (1881–1970) -// - `ARP` - Argentine Peso (1983–1985) -// - `ARL` - Argentine Peso Ley (1970–1983) -// - `AMD` - Armenian Dram -// - `AWG` - Aruban Florin -// - `AUD` - Australian Dollar -// - `ATS` - Austrian Schilling -// - `AZN` - Azerbaijani Manat -// - `AZM` - Azerbaijani Manat (1993–2006) -// - `BSD` - Bahamian Dollar -// - `BHD` - Bahraini Dinar -// - `BDT` - Bangladeshi Taka -// - `BBD` - Barbadian Dollar -// - `BYN` - Belarusian Ruble -// - `BYB` - Belarusian Ruble (1994–1999) -// - `BYR` - Belarusian Ruble (2000–2016) -// - `BEF` - Belgian Franc -// - `BEC` - Belgian Franc (convertible) -// - `BEL` - Belgian Franc (financial) -// - `BZD` - Belize Dollar -// - `BMD` - Bermudan Dollar -// - `BTN` - Bhutanese Ngultrum -// - `BOB` - Bolivian Boliviano -// - `BOL` - Bolivian Boliviano (1863–1963) -// - `BOV` - Bolivian Mvdol -// - `BOP` - Bolivian Peso -// - `BAM` - Bosnia-Herzegovina Convertible Mark -// - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) -// - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) -// - `BWP` - Botswanan Pula -// - `BRC` - Brazilian Cruzado (1986–1989) -// - `BRZ` - Brazilian Cruzeiro (1942–1967) -// - `BRE` - Brazilian Cruzeiro (1990–1993) -// - `BRR` - Brazilian Cruzeiro (1993–1994) -// - `BRN` - Brazilian New Cruzado (1989–1990) -// - `BRB` - Brazilian New Cruzeiro (1967–1986) -// - `BRL` - Brazilian Real -// - `GBP` - British Pound -// - `BND` - Brunei Dollar -// - `BGL` - Bulgarian Hard Lev -// - `BGN` - Bulgarian Lev -// - `BGO` - Bulgarian Lev (1879–1952) -// - `BGM` - Bulgarian Socialist Lev -// - `BUK` - Burmese Kyat -// - `BIF` - Burundian Franc -// - `XPF` - CFP Franc -// - `KHR` - Cambodian Riel -// - `CAD` - Canadian Dollar -// - `CVE` - Cape Verdean Escudo -// - `KYD` - Cayman Islands Dollar -// - `XAF` - Central African CFA Franc -// - `CLE` - Chilean Escudo -// - `CLP` - Chilean Peso -// - `CLF` - Chilean Unit of Account (UF) -// - `CNX` - Chinese People’s Bank Dollar -// - `CNY` - Chinese Yuan -// - `CNH` - Chinese Yuan (offshore) -// - `COP` - Colombian Peso -// - `COU` - Colombian Real Value Unit -// - `KMF` - Comorian Franc -// - `CDF` - Congolese Franc -// - `CRC` - Costa Rican Colón -// - `HRD` - Croatian Dinar -// - `HRK` - Croatian Kuna -// - `CUC` - Cuban Convertible Peso -// - `CUP` - Cuban Peso -// - `CYP` - Cypriot Pound -// - `CZK` - Czech Koruna -// - `CSK` - Czechoslovak Hard Koruna -// - `DKK` - Danish Krone -// - `DJF` - Djiboutian Franc -// - `DOP` - Dominican Peso -// - `NLG` - Dutch Guilder -// - `XCD` - East Caribbean Dollar -// - `DDM` - East German Mark -// - `ECS` - Ecuadorian Sucre -// - `ECV` - Ecuadorian Unit of Constant Value -// - `EGP` - Egyptian Pound -// - `GQE` - Equatorial Guinean Ekwele -// - `ERN` - Eritrean Nakfa -// - `EEK` - Estonian Kroon -// - `ETB` - Ethiopian Birr -// - `EUR` - Euro -// - `XBA` - European Composite Unit -// - `XEU` - European Currency Unit -// - `XBB` - European Monetary Unit -// - `XBC` - European Unit of Account (XBC) -// - `XBD` - European Unit of Account (XBD) -// - `FKP` - Falkland Islands Pound -// - `FJD` - Fijian Dollar -// - `FIM` - Finnish Markka -// - `FRF` - French Franc -// - `XFO` - French Gold Franc -// - `XFU` - French UIC-Franc -// - `GMD` - Gambian Dalasi -// - `GEK` - Georgian Kupon Larit -// - `GEL` - Georgian Lari -// - `DEM` - German Mark -// - `GHS` - Ghanaian Cedi -// - `GHC` - Ghanaian Cedi (1979–2007) -// - `GIP` - Gibraltar Pound -// - `XAU` - Gold -// - `GRD` - Greek Drachma -// - `GTQ` - Guatemalan Quetzal -// - `GWP` - Guinea-Bissau Peso -// - `GNF` - Guinean Franc -// - `GNS` - Guinean Syli -// - `GYD` - Guyanaese Dollar -// - `HTG` - Haitian Gourde -// - `HNL` - Honduran Lempira -// - `HKD` - Hong Kong Dollar -// - `HUF` - Hungarian Forint -// - `IMP` - IMP -// - `ISK` - Icelandic Króna -// - `ISJ` - Icelandic Króna (1918–1981) -// - `INR` - Indian Rupee -// - `IDR` - Indonesian Rupiah -// - `IRR` - Iranian Rial -// - `IQD` - Iraqi Dinar -// - `IEP` - Irish Pound -// - `ILS` - Israeli New Shekel -// - `ILP` - Israeli Pound -// - `ILR` - Israeli Shekel (1980–1985) -// - `ITL` - Italian Lira -// - `JMD` - Jamaican Dollar -// - `JPY` - Japanese Yen -// - `JOD` - Jordanian Dinar -// - `KZT` - Kazakhstani Tenge -// - `KES` - Kenyan Shilling -// - `KWD` - Kuwaiti Dinar -// - `KGS` - Kyrgystani Som -// - `LAK` - Laotian Kip -// - `LVL` - Latvian Lats -// - `LVR` - Latvian Ruble -// - `LBP` - Lebanese Pound -// - `LSL` - Lesotho Loti -// - `LRD` - Liberian Dollar -// - `LYD` - Libyan Dinar -// - `LTL` - Lithuanian Litas -// - `LTT` - Lithuanian Talonas -// - `LUL` - Luxembourg Financial Franc -// - `LUC` - Luxembourgian Convertible Franc -// - `LUF` - Luxembourgian Franc -// - `MOP` - Macanese Pataca -// - `MKD` - Macedonian Denar -// - `MKN` - Macedonian Denar (1992–1993) -// - `MGA` - Malagasy Ariary -// - `MGF` - Malagasy Franc -// - `MWK` - Malawian Kwacha -// - `MYR` - Malaysian Ringgit -// - `MVR` - Maldivian Rufiyaa -// - `MVP` - Maldivian Rupee (1947–1981) -// - `MLF` - Malian Franc -// - `MTL` - Maltese Lira -// - `MTP` - Maltese Pound -// - `MRU` - Mauritanian Ouguiya -// - `MRO` - Mauritanian Ouguiya (1973–2017) -// - `MUR` - Mauritian Rupee -// - `MXV` - Mexican Investment Unit -// - `MXN` - Mexican Peso -// - `MXP` - Mexican Silver Peso (1861–1992) -// - `MDC` - Moldovan Cupon -// - `MDL` - Moldovan Leu -// - `MCF` - Monegasque Franc -// - `MNT` - Mongolian Tugrik -// - `MAD` - Moroccan Dirham -// - `MAF` - Moroccan Franc -// - `MZE` - Mozambican Escudo -// - `MZN` - Mozambican Metical -// - `MZM` - Mozambican Metical (1980–2006) -// - `MMK` - Myanmar Kyat -// - `NAD` - Namibian Dollar -// - `NPR` - Nepalese Rupee -// - `ANG` - Netherlands Antillean Guilder -// - `TWD` - New Taiwan Dollar -// - `NZD` - New Zealand Dollar -// - `NIO` - Nicaraguan Córdoba -// - `NIC` - Nicaraguan Córdoba (1988–1991) -// - `NGN` - Nigerian Naira -// - `KPW` - North Korean Won -// - `NOK` - Norwegian Krone -// - `OMR` - Omani Rial -// - `PKR` - Pakistani Rupee -// - `XPD` - Palladium -// - `PAB` - Panamanian Balboa -// - `PGK` - Papua New Guinean Kina -// - `PYG` - Paraguayan Guarani -// - `PEI` - Peruvian Inti -// - `PEN` - Peruvian Sol -// - `PES` - Peruvian Sol (1863–1965) -// - `PHP` - Philippine Peso -// - `XPT` - Platinum -// - `PLN` - Polish Zloty -// - `PLZ` - Polish Zloty (1950–1995) -// - `PTE` - Portuguese Escudo -// - `GWE` - Portuguese Guinea Escudo -// - `QAR` - Qatari Rial -// - `XRE` - RINET Funds -// - `RHD` - Rhodesian Dollar -// - `RON` - Romanian Leu -// - `ROL` - Romanian Leu (1952–2006) -// - `RUB` - Russian Ruble -// - `RUR` - Russian Ruble (1991–1998) -// - `RWF` - Rwandan Franc -// - `SVC` - Salvadoran Colón -// - `WST` - Samoan Tala -// - `SAR` - Saudi Riyal -// - `RSD` - Serbian Dinar -// - `CSD` - Serbian Dinar (2002–2006) -// - `SCR` - Seychellois Rupee -// - `SLL` - Sierra Leonean Leone -// - `XAG` - Silver -// - `SGD` - Singapore Dollar -// - `SKK` - Slovak Koruna -// - `SIT` - Slovenian Tolar -// - `SBD` - Solomon Islands Dollar -// - `SOS` - Somali Shilling -// - `ZAR` - South African Rand -// - `ZAL` - South African Rand (financial) -// - `KRH` - South Korean Hwan (1953–1962) -// - `KRW` - South Korean Won -// - `KRO` - South Korean Won (1945–1953) -// - `SSP` - South Sudanese Pound -// - `SUR` - Soviet Rouble -// - `ESP` - Spanish Peseta -// - `ESA` - Spanish Peseta (A account) -// - `ESB` - Spanish Peseta (convertible account) -// - `XDR` - Special Drawing Rights -// - `LKR` - Sri Lankan Rupee -// - `SHP` - St. Helena Pound -// - `XSU` - Sucre -// - `SDD` - Sudanese Dinar (1992–2007) -// - `SDG` - Sudanese Pound -// - `SDP` - Sudanese Pound (1957–1998) -// - `SRD` - Surinamese Dollar -// - `SRG` - Surinamese Guilder -// - `SZL` - Swazi Lilangeni -// - `SEK` - Swedish Krona -// - `CHF` - Swiss Franc -// - `SYP` - Syrian Pound -// - `STN` - São Tomé & Príncipe Dobra -// - `STD` - São Tomé & Príncipe Dobra (1977–2017) -// - `TVD` - TVD -// - `TJR` - Tajikistani Ruble -// - `TJS` - Tajikistani Somoni -// - `TZS` - Tanzanian Shilling -// - `XTS` - Testing Currency Code -// - `THB` - Thai Baht -// - `XXX` - The codes assigned for transactions where no currency is involved -// - `TPE` - Timorese Escudo -// - `TOP` - Tongan Paʻanga -// - `TTD` - Trinidad & Tobago Dollar -// - `TND` - Tunisian Dinar -// - `TRY` - Turkish Lira -// - `TRL` - Turkish Lira (1922–2005) -// - `TMT` - Turkmenistani Manat -// - `TMM` - Turkmenistani Manat (1993–2009) -// - `USD` - US Dollar -// - `USN` - US Dollar (Next day) -// - `USS` - US Dollar (Same day) -// - `UGX` - Ugandan Shilling -// - `UGS` - Ugandan Shilling (1966–1987) -// - `UAH` - Ukrainian Hryvnia -// - `UAK` - Ukrainian Karbovanets -// - `AED` - United Arab Emirates Dirham -// - `UYW` - Uruguayan Nominal Wage Index Unit -// - `UYU` - Uruguayan Peso -// - `UYP` - Uruguayan Peso (1975–1993) -// - `UYI` - Uruguayan Peso (Indexed Units) -// - `UZS` - Uzbekistani Som -// - `VUV` - Vanuatu Vatu -// - `VES` - Venezuelan Bolívar -// - `VEB` - Venezuelan Bolívar (1871–2008) -// - `VEF` - Venezuelan Bolívar (2008–2018) -// - `VND` - Vietnamese Dong -// - `VNN` - Vietnamese Dong (1978–1985) -// - `CHE` - WIR Euro -// - `CHW` - WIR Franc -// - `XOF` - West African CFA Franc -// - `YDD` - Yemeni Dinar -// - `YER` - Yemeni Rial -// - `YUN` - Yugoslavian Convertible Dinar (1990–1992) -// - `YUD` - Yugoslavian Hard Dinar (1966–1990) -// - `YUM` - Yugoslavian New Dinar (1994–2002) -// - `YUR` - Yugoslavian Reformed Dinar (1992–1993) -// - `ZWN` - ZWN -// - `ZRN` - Zairean New Zaire (1993–1998) -// - `ZRZ` - Zairean Zaire (1971–1993) -// - `ZMW` - Zambian Kwacha -// - `ZMK` - Zambian Kwacha (1968–2012) -// - `ZWD` - Zimbabwean Dollar (1980–2008) -// - `ZWR` - Zimbabwean Dollar (2008) -// - `ZWL` - Zimbabwean Dollar (2009) -type BankFeedAccountRequestCurrency struct { - typeName string - TransactionCurrencyEnum TransactionCurrencyEnum - String string +func (c *CompanyInfo) GetFiscalYearEndMonth() *int { + if c == nil { + return nil + } + return c.FiscalYearEndMonth } -func NewBankFeedAccountRequestCurrencyFromTransactionCurrencyEnum(value TransactionCurrencyEnum) *BankFeedAccountRequestCurrency { - return &BankFeedAccountRequestCurrency{typeName: "transactionCurrencyEnum", TransactionCurrencyEnum: value} +func (c *CompanyInfo) GetFiscalYearEndDay() *int { + if c == nil { + return nil + } + return c.FiscalYearEndDay } -func NewBankFeedAccountRequestCurrencyFromString(value string) *BankFeedAccountRequestCurrency { - return &BankFeedAccountRequestCurrency{typeName: "string", String: value} +func (c *CompanyInfo) GetCurrency() interface{} { + if c == nil { + return nil + } + return c.Currency } -func (b *BankFeedAccountRequestCurrency) UnmarshalJSON(data []byte) error { - var valueTransactionCurrencyEnum TransactionCurrencyEnum - if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { - b.typeName = "transactionCurrencyEnum" - b.TransactionCurrencyEnum = valueTransactionCurrencyEnum +func (c *CompanyInfo) GetRemoteCreatedAt() *time.Time { + if c == nil { return nil } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - b.typeName = "string" - b.String = valueString + return c.RemoteCreatedAt +} + +func (c *CompanyInfo) GetUrls() []*string { + if c == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, b) + return c.Urls } -func (b BankFeedAccountRequestCurrency) MarshalJSON() ([]byte, error) { - switch b.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", b.typeName, b) - case "transactionCurrencyEnum": - return json.Marshal(b.TransactionCurrencyEnum) - case "string": - return json.Marshal(b.String) +func (c *CompanyInfo) GetAddresses() []*Address { + if c == nil { + return nil } + return c.Addresses } -type BankFeedAccountRequestCurrencyVisitor interface { - VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error - VisitString(string) error +func (c *CompanyInfo) GetPhoneNumbers() []*AccountingPhoneNumber { + if c == nil { + return nil + } + return c.PhoneNumbers } -func (b *BankFeedAccountRequestCurrency) Accept(visitor BankFeedAccountRequestCurrencyVisitor) error { - switch b.typeName { - default: - return fmt.Errorf("invalid type %s in %T", b.typeName, b) - case "transactionCurrencyEnum": - return visitor.VisitTransactionCurrencyEnum(b.TransactionCurrencyEnum) - case "string": - return visitor.VisitString(b.String) +func (c *CompanyInfo) GetRemoteWasDeleted() *bool { + if c == nil { + return nil } + return c.RemoteWasDeleted } -// The status of the bank feed. -// -// - `ACTIVE` - ACTIVE -// - `INACTIVE` - INACTIVE -type BankFeedAccountRequestFeedStatus struct { - typeName string - FeedStatusEnum FeedStatusEnum - String string +func (c *CompanyInfo) GetFieldMappings() map[string]interface{} { + if c == nil { + return nil + } + return c.FieldMappings } -func NewBankFeedAccountRequestFeedStatusFromFeedStatusEnum(value FeedStatusEnum) *BankFeedAccountRequestFeedStatus { - return &BankFeedAccountRequestFeedStatus{typeName: "feedStatusEnum", FeedStatusEnum: value} +func (c *CompanyInfo) GetRemoteData() []*RemoteData { + if c == nil { + return nil + } + return c.RemoteData } -func NewBankFeedAccountRequestFeedStatusFromString(value string) *BankFeedAccountRequestFeedStatus { - return &BankFeedAccountRequestFeedStatus{typeName: "string", String: value} +func (c *CompanyInfo) GetExtraProperties() map[string]interface{} { + return c.extraProperties } -func (b *BankFeedAccountRequestFeedStatus) UnmarshalJSON(data []byte) error { - var valueFeedStatusEnum FeedStatusEnum - if err := json.Unmarshal(data, &valueFeedStatusEnum); err == nil { - b.typeName = "feedStatusEnum" - b.FeedStatusEnum = valueFeedStatusEnum - return nil +func (c *CompanyInfo) UnmarshalJSON(data []byte) error { + type embed CompanyInfo + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + }{ + embed: embed(*c), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - b.typeName = "string" - b.String = valueString - return nil + *c = CompanyInfo(unmarshaler.embed) + c.CreatedAt = unmarshaler.CreatedAt.TimePtr() + c.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + c.RemoteCreatedAt = unmarshaler.RemoteCreatedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *c) + if err != nil { + return err } - return fmt.Errorf("%s cannot be deserialized as a %T", data, b) + c.extraProperties = extraProperties + c.rawJSON = json.RawMessage(data) + return nil } -func (b BankFeedAccountRequestFeedStatus) MarshalJSON() ([]byte, error) { - switch b.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", b.typeName, b) - case "feedStatusEnum": - return json.Marshal(b.FeedStatusEnum) - case "string": - return json.Marshal(b.String) +func (c *CompanyInfo) MarshalJSON() ([]byte, error) { + type embed CompanyInfo + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + }{ + embed: embed(*c), + CreatedAt: internal.NewOptionalDateTime(c.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(c.ModifiedAt), + RemoteCreatedAt: internal.NewOptionalDateTime(c.RemoteCreatedAt), } + return json.Marshal(marshaler) } -type BankFeedAccountRequestFeedStatusVisitor interface { - VisitFeedStatusEnum(FeedStatusEnum) error - VisitString(string) error +func (c *CompanyInfo) String() string { + if len(c.rawJSON) > 0 { + if value, err := internal.StringifyJSON(c.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(c); err == nil { + return value + } + return fmt.Sprintf("%#v", c) } -func (b *BankFeedAccountRequestFeedStatus) Accept(visitor BankFeedAccountRequestFeedStatusVisitor) error { - switch b.typeName { - default: - return fmt.Errorf("invalid type %s in %T", b.typeName, b) - case "feedStatusEnum": - return visitor.VisitFeedStatusEnum(b.FeedStatusEnum) - case "string": - return visitor.VisitString(b.String) - } -} - -type BankFeedAccountResponse struct { - Model *BankFeedAccount `json:"model,omitempty"` - Warnings []*WarningValidationProblem `json:"warnings,omitempty"` - Errors []*ErrorValidationProblem `json:"errors,omitempty"` - Logs []*DebugModeLog `json:"logs,omitempty"` +// * `SALES` - SALES +// * `PURCHASE` - PURCHASE +type ComponentTypeEnum string - _rawJSON json.RawMessage -} +const ( + ComponentTypeEnumSales ComponentTypeEnum = "SALES" + ComponentTypeEnumPurchase ComponentTypeEnum = "PURCHASE" +) -func (b *BankFeedAccountResponse) UnmarshalJSON(data []byte) error { - type unmarshaler BankFeedAccountResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func NewComponentTypeEnumFromString(s string) (ComponentTypeEnum, error) { + switch s { + case "SALES": + return ComponentTypeEnumSales, nil + case "PURCHASE": + return ComponentTypeEnumPurchase, nil } - *b = BankFeedAccountResponse(value) - b._rawJSON = json.RawMessage(data) - return nil + var t ComponentTypeEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (b *BankFeedAccountResponse) String() string { - if len(b._rawJSON) > 0 { - if value, err := core.StringifyJSON(b._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(b); err == nil { - return value - } - return fmt.Sprintf("%#v", b) +func (c ComponentTypeEnum) Ptr() *ComponentTypeEnum { + return &c } -// # The BankFeedTransaction Object -// +// # The Contact Object // ### Description -// -// The `BankFeedTransaction` object is used to represent transactions linked to a bank feed account. This includes details about the transaction such as the date, amount, description, and type. +// A `Contact` is an individual or business entity to which products and services are sold to or purchased from. The `Contact` model contains both Customers, in which products and services are sold to, and Vendors (or Suppliers), in which products and services are purchased from. +// * A `Contact` is a Vendor/Supplier if the `is_supplier` property is true. +// * A `Contact` is a customer if the `is_customer` property is true. // // ### Usage Example -// -// Fetch from the `GET BankFeedTransaction` endpoint to view details of a transaction associated with a bank feed account. -type BankFeedTransaction struct { - Id *string `json:"id,omitempty"` +// Fetch from the `LIST Contacts` endpoint and view a company's contacts. +type Contact struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The bank feed account associated with the transaction. - BankFeedAccount *BankFeedTransactionBankFeedAccount `json:"bank_feed_account,omitempty"` - // The date that the transaction occurred. - TransactionDate *time.Time `json:"transaction_date,omitempty"` - // The date the transaction was posted to the bank account. - PostedDate *time.Time `json:"posted_date,omitempty"` - // The amount of the transaction. - Amount *float64 `json:"amount,omitempty"` - // The description of the transaction. - Description *string `json:"description,omitempty"` - // The underlying type of the transaction. - TransactionType *string `json:"transaction_type,omitempty"` - // The person or merchant who initiated the transaction, or alternatively, to whom the transaction was paid. - Payee *string `json:"payee,omitempty"` - // If the transaction is of type debit or credit. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The contact's name. + Name *string `json:"name,omitempty" url:"name,omitempty"` + // Whether the contact is a supplier. + IsSupplier *bool `json:"is_supplier,omitempty" url:"is_supplier,omitempty"` + // Whether the contact is a customer. + IsCustomer *bool `json:"is_customer,omitempty" url:"is_customer,omitempty"` + // The contact's email address. + EmailAddress *string `json:"email_address,omitempty" url:"email_address,omitempty"` + // The contact's tax number. + TaxNumber *string `json:"tax_number,omitempty" url:"tax_number,omitempty"` + // The contact's status // - // - `CREDIT` - CREDIT - // - `DEBIT` - DEBIT - CreditOrDebit *BankFeedTransactionCreditOrDebit `json:"credit_or_debit,omitempty"` - // The customer’s identifier for the transaction. - SourceTransactionId *string `json:"source_transaction_id,omitempty"` + // * `ACTIVE` - ACTIVE + // * `ARCHIVED` - ARCHIVED + Status *ContactStatus `json:"status,omitempty" url:"status,omitempty"` + // The currency the contact's transactions are in. + Currency *string `json:"currency,omitempty" url:"currency,omitempty"` + // When the third party's contact was updated. + RemoteUpdatedAt *time.Time `json:"remote_updated_at,omitempty" url:"remote_updated_at,omitempty"` + // The company the contact belongs to. + Company *string `json:"company,omitempty" url:"company,omitempty"` + // `Address` object IDs for the given `Contacts` object. + Addresses []*ContactAddressesItem `json:"addresses,omitempty" url:"addresses,omitempty"` + // `AccountingPhoneNumber` object for the given `Contacts` object. + PhoneNumbers []*AccountingPhoneNumber `json:"phone_numbers,omitempty" url:"phone_numbers,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - // Whether or not this transaction has been processed by the external system. For example, NetSuite writes this field as True when the SuiteApp has processed the transaction. - IsProcessed *bool `json:"is_processed,omitempty"` + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + RemoteFields []*RemoteField `json:"remote_fields,omitempty" url:"remote_fields,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (b *BankFeedTransaction) UnmarshalJSON(data []byte) error { - type unmarshaler BankFeedTransaction - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (c *Contact) GetId() *string { + if c == nil { + return nil } - *b = BankFeedTransaction(value) - b._rawJSON = json.RawMessage(data) - return nil + return c.Id } -func (b *BankFeedTransaction) String() string { - if len(b._rawJSON) > 0 { - if value, err := core.StringifyJSON(b._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(b); err == nil { - return value +func (c *Contact) GetRemoteId() *string { + if c == nil { + return nil } - return fmt.Sprintf("%#v", b) -} - -// The bank feed account associated with the transaction. -type BankFeedTransactionBankFeedAccount struct { - typeName string - String string - BankFeedAccount *BankFeedAccount + return c.RemoteId } -func NewBankFeedTransactionBankFeedAccountFromString(value string) *BankFeedTransactionBankFeedAccount { - return &BankFeedTransactionBankFeedAccount{typeName: "string", String: value} -} - -func NewBankFeedTransactionBankFeedAccountFromBankFeedAccount(value *BankFeedAccount) *BankFeedTransactionBankFeedAccount { - return &BankFeedTransactionBankFeedAccount{typeName: "bankFeedAccount", BankFeedAccount: value} -} - -func (b *BankFeedTransactionBankFeedAccount) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - b.typeName = "string" - b.String = valueString - return nil - } - valueBankFeedAccount := new(BankFeedAccount) - if err := json.Unmarshal(data, &valueBankFeedAccount); err == nil { - b.typeName = "bankFeedAccount" - b.BankFeedAccount = valueBankFeedAccount +func (c *Contact) GetCreatedAt() *time.Time { + if c == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, b) + return c.CreatedAt } -func (b BankFeedTransactionBankFeedAccount) MarshalJSON() ([]byte, error) { - switch b.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", b.typeName, b) - case "string": - return json.Marshal(b.String) - case "bankFeedAccount": - return json.Marshal(b.BankFeedAccount) +func (c *Contact) GetModifiedAt() *time.Time { + if c == nil { + return nil } + return c.ModifiedAt } -type BankFeedTransactionBankFeedAccountVisitor interface { - VisitString(string) error - VisitBankFeedAccount(*BankFeedAccount) error -} - -func (b *BankFeedTransactionBankFeedAccount) Accept(visitor BankFeedTransactionBankFeedAccountVisitor) error { - switch b.typeName { - default: - return fmt.Errorf("invalid type %s in %T", b.typeName, b) - case "string": - return visitor.VisitString(b.String) - case "bankFeedAccount": - return visitor.VisitBankFeedAccount(b.BankFeedAccount) +func (c *Contact) GetName() *string { + if c == nil { + return nil } + return c.Name } -// If the transaction is of type debit or credit. -// -// - `CREDIT` - CREDIT -// - `DEBIT` - DEBIT -type BankFeedTransactionCreditOrDebit struct { - typeName string - CreditOrDebitEnum CreditOrDebitEnum - String string -} - -func NewBankFeedTransactionCreditOrDebitFromCreditOrDebitEnum(value CreditOrDebitEnum) *BankFeedTransactionCreditOrDebit { - return &BankFeedTransactionCreditOrDebit{typeName: "creditOrDebitEnum", CreditOrDebitEnum: value} -} - -func NewBankFeedTransactionCreditOrDebitFromString(value string) *BankFeedTransactionCreditOrDebit { - return &BankFeedTransactionCreditOrDebit{typeName: "string", String: value} -} - -func (b *BankFeedTransactionCreditOrDebit) UnmarshalJSON(data []byte) error { - var valueCreditOrDebitEnum CreditOrDebitEnum - if err := json.Unmarshal(data, &valueCreditOrDebitEnum); err == nil { - b.typeName = "creditOrDebitEnum" - b.CreditOrDebitEnum = valueCreditOrDebitEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - b.typeName = "string" - b.String = valueString +func (c *Contact) GetIsSupplier() *bool { + if c == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, b) + return c.IsSupplier } -func (b BankFeedTransactionCreditOrDebit) MarshalJSON() ([]byte, error) { - switch b.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", b.typeName, b) - case "creditOrDebitEnum": - return json.Marshal(b.CreditOrDebitEnum) - case "string": - return json.Marshal(b.String) +func (c *Contact) GetIsCustomer() *bool { + if c == nil { + return nil } + return c.IsCustomer } -type BankFeedTransactionCreditOrDebitVisitor interface { - VisitCreditOrDebitEnum(CreditOrDebitEnum) error - VisitString(string) error -} - -func (b *BankFeedTransactionCreditOrDebit) Accept(visitor BankFeedTransactionCreditOrDebitVisitor) error { - switch b.typeName { - default: - return fmt.Errorf("invalid type %s in %T", b.typeName, b) - case "creditOrDebitEnum": - return visitor.VisitCreditOrDebitEnum(b.CreditOrDebitEnum) - case "string": - return visitor.VisitString(b.String) +func (c *Contact) GetEmailAddress() *string { + if c == nil { + return nil } + return c.EmailAddress } -// # The BankFeedTransaction Object -// -// ### Description -// -// The `BankFeedTransaction` object is used to represent transactions linked to a bank feed account. This includes details about the transaction such as the date, amount, description, and type. -// -// ### Usage Example -// -// Fetch from the `GET BankFeedTransaction` endpoint to view details of a transaction associated with a bank feed account. -type BankFeedTransactionRequestRequest struct { - // The bank feed account associated with the transaction. - BankFeedAccount *BankFeedTransactionRequestRequestBankFeedAccount `json:"bank_feed_account,omitempty"` - // The date that the transaction occurred. - TransactionDate *time.Time `json:"transaction_date,omitempty"` - // The date the transaction was posted to the bank account. - PostedDate *time.Time `json:"posted_date,omitempty"` - // The amount of the transaction. - Amount *float64 `json:"amount,omitempty"` - // The description of the transaction. - Description *string `json:"description,omitempty"` - // The underlying type of the transaction. - TransactionType *string `json:"transaction_type,omitempty"` - // The person or merchant who initiated the transaction, or alternatively, to whom the transaction was paid. - Payee *string `json:"payee,omitempty"` - // If the transaction is of type debit or credit. - // - // - `CREDIT` - CREDIT - // - `DEBIT` - DEBIT - CreditOrDebit *BankFeedTransactionRequestRequestCreditOrDebit `json:"credit_or_debit,omitempty"` - // The customer’s identifier for the transaction. - SourceTransactionId *string `json:"source_transaction_id,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` - - _rawJSON json.RawMessage -} - -func (b *BankFeedTransactionRequestRequest) UnmarshalJSON(data []byte) error { - type unmarshaler BankFeedTransactionRequestRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (c *Contact) GetTaxNumber() *string { + if c == nil { + return nil } - *b = BankFeedTransactionRequestRequest(value) - b._rawJSON = json.RawMessage(data) - return nil + return c.TaxNumber } -func (b *BankFeedTransactionRequestRequest) String() string { - if len(b._rawJSON) > 0 { - if value, err := core.StringifyJSON(b._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(b); err == nil { - return value +func (c *Contact) GetStatus() *ContactStatus { + if c == nil { + return nil } - return fmt.Sprintf("%#v", b) -} - -// The bank feed account associated with the transaction. -type BankFeedTransactionRequestRequestBankFeedAccount struct { - typeName string - String string - BankFeedAccount *BankFeedAccount -} - -func NewBankFeedTransactionRequestRequestBankFeedAccountFromString(value string) *BankFeedTransactionRequestRequestBankFeedAccount { - return &BankFeedTransactionRequestRequestBankFeedAccount{typeName: "string", String: value} + return c.Status } -func NewBankFeedTransactionRequestRequestBankFeedAccountFromBankFeedAccount(value *BankFeedAccount) *BankFeedTransactionRequestRequestBankFeedAccount { - return &BankFeedTransactionRequestRequestBankFeedAccount{typeName: "bankFeedAccount", BankFeedAccount: value} -} - -func (b *BankFeedTransactionRequestRequestBankFeedAccount) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - b.typeName = "string" - b.String = valueString - return nil - } - valueBankFeedAccount := new(BankFeedAccount) - if err := json.Unmarshal(data, &valueBankFeedAccount); err == nil { - b.typeName = "bankFeedAccount" - b.BankFeedAccount = valueBankFeedAccount +func (c *Contact) GetCurrency() *string { + if c == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, b) + return c.Currency } -func (b BankFeedTransactionRequestRequestBankFeedAccount) MarshalJSON() ([]byte, error) { - switch b.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", b.typeName, b) - case "string": - return json.Marshal(b.String) - case "bankFeedAccount": - return json.Marshal(b.BankFeedAccount) +func (c *Contact) GetRemoteUpdatedAt() *time.Time { + if c == nil { + return nil } + return c.RemoteUpdatedAt } -type BankFeedTransactionRequestRequestBankFeedAccountVisitor interface { - VisitString(string) error - VisitBankFeedAccount(*BankFeedAccount) error -} - -func (b *BankFeedTransactionRequestRequestBankFeedAccount) Accept(visitor BankFeedTransactionRequestRequestBankFeedAccountVisitor) error { - switch b.typeName { - default: - return fmt.Errorf("invalid type %s in %T", b.typeName, b) - case "string": - return visitor.VisitString(b.String) - case "bankFeedAccount": - return visitor.VisitBankFeedAccount(b.BankFeedAccount) +func (c *Contact) GetCompany() *string { + if c == nil { + return nil } + return c.Company } -// If the transaction is of type debit or credit. -// -// - `CREDIT` - CREDIT -// - `DEBIT` - DEBIT -type BankFeedTransactionRequestRequestCreditOrDebit struct { - typeName string - CreditOrDebitEnum CreditOrDebitEnum - String string -} - -func NewBankFeedTransactionRequestRequestCreditOrDebitFromCreditOrDebitEnum(value CreditOrDebitEnum) *BankFeedTransactionRequestRequestCreditOrDebit { - return &BankFeedTransactionRequestRequestCreditOrDebit{typeName: "creditOrDebitEnum", CreditOrDebitEnum: value} -} - -func NewBankFeedTransactionRequestRequestCreditOrDebitFromString(value string) *BankFeedTransactionRequestRequestCreditOrDebit { - return &BankFeedTransactionRequestRequestCreditOrDebit{typeName: "string", String: value} +func (c *Contact) GetAddresses() []*ContactAddressesItem { + if c == nil { + return nil + } + return c.Addresses } -func (b *BankFeedTransactionRequestRequestCreditOrDebit) UnmarshalJSON(data []byte) error { - var valueCreditOrDebitEnum CreditOrDebitEnum - if err := json.Unmarshal(data, &valueCreditOrDebitEnum); err == nil { - b.typeName = "creditOrDebitEnum" - b.CreditOrDebitEnum = valueCreditOrDebitEnum +func (c *Contact) GetPhoneNumbers() []*AccountingPhoneNumber { + if c == nil { return nil } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - b.typeName = "string" - b.String = valueString + return c.PhoneNumbers +} + +func (c *Contact) GetRemoteWasDeleted() *bool { + if c == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, b) + return c.RemoteWasDeleted } -func (b BankFeedTransactionRequestRequestCreditOrDebit) MarshalJSON() ([]byte, error) { - switch b.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", b.typeName, b) - case "creditOrDebitEnum": - return json.Marshal(b.CreditOrDebitEnum) - case "string": - return json.Marshal(b.String) +func (c *Contact) GetFieldMappings() map[string]interface{} { + if c == nil { + return nil } + return c.FieldMappings } -type BankFeedTransactionRequestRequestCreditOrDebitVisitor interface { - VisitCreditOrDebitEnum(CreditOrDebitEnum) error - VisitString(string) error +func (c *Contact) GetRemoteData() []*RemoteData { + if c == nil { + return nil + } + return c.RemoteData } -func (b *BankFeedTransactionRequestRequestCreditOrDebit) Accept(visitor BankFeedTransactionRequestRequestCreditOrDebitVisitor) error { - switch b.typeName { - default: - return fmt.Errorf("invalid type %s in %T", b.typeName, b) - case "creditOrDebitEnum": - return visitor.VisitCreditOrDebitEnum(b.CreditOrDebitEnum) - case "string": - return visitor.VisitString(b.String) +func (c *Contact) GetRemoteFields() []*RemoteField { + if c == nil { + return nil } + return c.RemoteFields } -type BankFeedTransactionResponse struct { - Model *BankFeedTransaction `json:"model,omitempty"` - Warnings []*WarningValidationProblem `json:"warnings,omitempty"` - Errors []*ErrorValidationProblem `json:"errors,omitempty"` - Logs []*DebugModeLog `json:"logs,omitempty"` - - _rawJSON json.RawMessage +func (c *Contact) GetExtraProperties() map[string]interface{} { + return c.extraProperties } -func (b *BankFeedTransactionResponse) UnmarshalJSON(data []byte) error { - type unmarshaler BankFeedTransactionResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { +func (c *Contact) UnmarshalJSON(data []byte) error { + type embed Contact + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + RemoteUpdatedAt *internal.DateTime `json:"remote_updated_at,omitempty"` + }{ + embed: embed(*c), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { return err } - *b = BankFeedTransactionResponse(value) - b._rawJSON = json.RawMessage(data) - return nil -} - -func (b *BankFeedTransactionResponse) String() string { - if len(b._rawJSON) > 0 { - if value, err := core.StringifyJSON(b._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(b); err == nil { - return value + *c = Contact(unmarshaler.embed) + c.CreatedAt = unmarshaler.CreatedAt.TimePtr() + c.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + c.RemoteUpdatedAt = unmarshaler.RemoteUpdatedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *c) + if err != nil { + return err } - return fmt.Sprintf("%#v", b) -} - -// # The CashFlowStatement Object -// -// ### Description -// -// The `CashFlowStatement` object shows operating activities, investing activities, and financing activities over a period of time (month, quarter, or year). -// -// ### Usage Example -// -// Fetch from the `LIST CashFlowStatements` endpoint and view a company's cash flow statements. -type CashFlowStatement struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The cash flow statement's name. - Name *string `json:"name,omitempty"` - // The cash flow statement's currency. - // - // - `XUA` - ADB Unit of Account - // - `AFN` - Afghan Afghani - // - `AFA` - Afghan Afghani (1927–2002) - // - `ALL` - Albanian Lek - // - `ALK` - Albanian Lek (1946–1965) - // - `DZD` - Algerian Dinar - // - `ADP` - Andorran Peseta - // - `AOA` - Angolan Kwanza - // - `AOK` - Angolan Kwanza (1977–1991) - // - `AON` - Angolan New Kwanza (1990–2000) - // - `AOR` - Angolan Readjusted Kwanza (1995–1999) - // - `ARA` - Argentine Austral - // - `ARS` - Argentine Peso - // - `ARM` - Argentine Peso (1881–1970) - // - `ARP` - Argentine Peso (1983–1985) - // - `ARL` - Argentine Peso Ley (1970–1983) - // - `AMD` - Armenian Dram - // - `AWG` - Aruban Florin - // - `AUD` - Australian Dollar - // - `ATS` - Austrian Schilling - // - `AZN` - Azerbaijani Manat - // - `AZM` - Azerbaijani Manat (1993–2006) - // - `BSD` - Bahamian Dollar - // - `BHD` - Bahraini Dinar - // - `BDT` - Bangladeshi Taka - // - `BBD` - Barbadian Dollar - // - `BYN` - Belarusian Ruble - // - `BYB` - Belarusian Ruble (1994–1999) - // - `BYR` - Belarusian Ruble (2000–2016) - // - `BEF` - Belgian Franc - // - `BEC` - Belgian Franc (convertible) - // - `BEL` - Belgian Franc (financial) - // - `BZD` - Belize Dollar - // - `BMD` - Bermudan Dollar - // - `BTN` - Bhutanese Ngultrum - // - `BOB` - Bolivian Boliviano - // - `BOL` - Bolivian Boliviano (1863–1963) - // - `BOV` - Bolivian Mvdol - // - `BOP` - Bolivian Peso - // - `BAM` - Bosnia-Herzegovina Convertible Mark - // - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - // - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - // - `BWP` - Botswanan Pula - // - `BRC` - Brazilian Cruzado (1986–1989) - // - `BRZ` - Brazilian Cruzeiro (1942–1967) - // - `BRE` - Brazilian Cruzeiro (1990–1993) - // - `BRR` - Brazilian Cruzeiro (1993–1994) - // - `BRN` - Brazilian New Cruzado (1989–1990) - // - `BRB` - Brazilian New Cruzeiro (1967–1986) - // - `BRL` - Brazilian Real - // - `GBP` - British Pound - // - `BND` - Brunei Dollar - // - `BGL` - Bulgarian Hard Lev - // - `BGN` - Bulgarian Lev - // - `BGO` - Bulgarian Lev (1879–1952) - // - `BGM` - Bulgarian Socialist Lev - // - `BUK` - Burmese Kyat - // - `BIF` - Burundian Franc - // - `XPF` - CFP Franc - // - `KHR` - Cambodian Riel - // - `CAD` - Canadian Dollar - // - `CVE` - Cape Verdean Escudo - // - `KYD` - Cayman Islands Dollar - // - `XAF` - Central African CFA Franc - // - `CLE` - Chilean Escudo - // - `CLP` - Chilean Peso - // - `CLF` - Chilean Unit of Account (UF) - // - `CNX` - Chinese People’s Bank Dollar - // - `CNY` - Chinese Yuan - // - `CNH` - Chinese Yuan (offshore) - // - `COP` - Colombian Peso - // - `COU` - Colombian Real Value Unit - // - `KMF` - Comorian Franc - // - `CDF` - Congolese Franc - // - `CRC` - Costa Rican Colón - // - `HRD` - Croatian Dinar - // - `HRK` - Croatian Kuna - // - `CUC` - Cuban Convertible Peso - // - `CUP` - Cuban Peso - // - `CYP` - Cypriot Pound - // - `CZK` - Czech Koruna - // - `CSK` - Czechoslovak Hard Koruna - // - `DKK` - Danish Krone - // - `DJF` - Djiboutian Franc - // - `DOP` - Dominican Peso - // - `NLG` - Dutch Guilder - // - `XCD` - East Caribbean Dollar - // - `DDM` - East German Mark - // - `ECS` - Ecuadorian Sucre - // - `ECV` - Ecuadorian Unit of Constant Value - // - `EGP` - Egyptian Pound - // - `GQE` - Equatorial Guinean Ekwele - // - `ERN` - Eritrean Nakfa - // - `EEK` - Estonian Kroon - // - `ETB` - Ethiopian Birr - // - `EUR` - Euro - // - `XBA` - European Composite Unit - // - `XEU` - European Currency Unit - // - `XBB` - European Monetary Unit - // - `XBC` - European Unit of Account (XBC) - // - `XBD` - European Unit of Account (XBD) - // - `FKP` - Falkland Islands Pound - // - `FJD` - Fijian Dollar - // - `FIM` - Finnish Markka - // - `FRF` - French Franc - // - `XFO` - French Gold Franc - // - `XFU` - French UIC-Franc - // - `GMD` - Gambian Dalasi - // - `GEK` - Georgian Kupon Larit - // - `GEL` - Georgian Lari - // - `DEM` - German Mark - // - `GHS` - Ghanaian Cedi - // - `GHC` - Ghanaian Cedi (1979–2007) - // - `GIP` - Gibraltar Pound - // - `XAU` - Gold - // - `GRD` - Greek Drachma - // - `GTQ` - Guatemalan Quetzal - // - `GWP` - Guinea-Bissau Peso - // - `GNF` - Guinean Franc - // - `GNS` - Guinean Syli - // - `GYD` - Guyanaese Dollar - // - `HTG` - Haitian Gourde - // - `HNL` - Honduran Lempira - // - `HKD` - Hong Kong Dollar - // - `HUF` - Hungarian Forint - // - `IMP` - IMP - // - `ISK` - Icelandic Króna - // - `ISJ` - Icelandic Króna (1918–1981) - // - `INR` - Indian Rupee - // - `IDR` - Indonesian Rupiah - // - `IRR` - Iranian Rial - // - `IQD` - Iraqi Dinar - // - `IEP` - Irish Pound - // - `ILS` - Israeli New Shekel - // - `ILP` - Israeli Pound - // - `ILR` - Israeli Shekel (1980–1985) - // - `ITL` - Italian Lira - // - `JMD` - Jamaican Dollar - // - `JPY` - Japanese Yen - // - `JOD` - Jordanian Dinar - // - `KZT` - Kazakhstani Tenge - // - `KES` - Kenyan Shilling - // - `KWD` - Kuwaiti Dinar - // - `KGS` - Kyrgystani Som - // - `LAK` - Laotian Kip - // - `LVL` - Latvian Lats - // - `LVR` - Latvian Ruble - // - `LBP` - Lebanese Pound - // - `LSL` - Lesotho Loti - // - `LRD` - Liberian Dollar - // - `LYD` - Libyan Dinar - // - `LTL` - Lithuanian Litas - // - `LTT` - Lithuanian Talonas - // - `LUL` - Luxembourg Financial Franc - // - `LUC` - Luxembourgian Convertible Franc - // - `LUF` - Luxembourgian Franc - // - `MOP` - Macanese Pataca - // - `MKD` - Macedonian Denar - // - `MKN` - Macedonian Denar (1992–1993) - // - `MGA` - Malagasy Ariary - // - `MGF` - Malagasy Franc - // - `MWK` - Malawian Kwacha - // - `MYR` - Malaysian Ringgit - // - `MVR` - Maldivian Rufiyaa - // - `MVP` - Maldivian Rupee (1947–1981) - // - `MLF` - Malian Franc - // - `MTL` - Maltese Lira - // - `MTP` - Maltese Pound - // - `MRU` - Mauritanian Ouguiya - // - `MRO` - Mauritanian Ouguiya (1973–2017) - // - `MUR` - Mauritian Rupee - // - `MXV` - Mexican Investment Unit - // - `MXN` - Mexican Peso - // - `MXP` - Mexican Silver Peso (1861–1992) - // - `MDC` - Moldovan Cupon - // - `MDL` - Moldovan Leu - // - `MCF` - Monegasque Franc - // - `MNT` - Mongolian Tugrik - // - `MAD` - Moroccan Dirham - // - `MAF` - Moroccan Franc - // - `MZE` - Mozambican Escudo - // - `MZN` - Mozambican Metical - // - `MZM` - Mozambican Metical (1980–2006) - // - `MMK` - Myanmar Kyat - // - `NAD` - Namibian Dollar - // - `NPR` - Nepalese Rupee - // - `ANG` - Netherlands Antillean Guilder - // - `TWD` - New Taiwan Dollar - // - `NZD` - New Zealand Dollar - // - `NIO` - Nicaraguan Córdoba - // - `NIC` - Nicaraguan Córdoba (1988–1991) - // - `NGN` - Nigerian Naira - // - `KPW` - North Korean Won - // - `NOK` - Norwegian Krone - // - `OMR` - Omani Rial - // - `PKR` - Pakistani Rupee - // - `XPD` - Palladium - // - `PAB` - Panamanian Balboa - // - `PGK` - Papua New Guinean Kina - // - `PYG` - Paraguayan Guarani - // - `PEI` - Peruvian Inti - // - `PEN` - Peruvian Sol - // - `PES` - Peruvian Sol (1863–1965) - // - `PHP` - Philippine Peso - // - `XPT` - Platinum - // - `PLN` - Polish Zloty - // - `PLZ` - Polish Zloty (1950–1995) - // - `PTE` - Portuguese Escudo - // - `GWE` - Portuguese Guinea Escudo - // - `QAR` - Qatari Rial - // - `XRE` - RINET Funds - // - `RHD` - Rhodesian Dollar - // - `RON` - Romanian Leu - // - `ROL` - Romanian Leu (1952–2006) - // - `RUB` - Russian Ruble - // - `RUR` - Russian Ruble (1991–1998) - // - `RWF` - Rwandan Franc - // - `SVC` - Salvadoran Colón - // - `WST` - Samoan Tala - // - `SAR` - Saudi Riyal - // - `RSD` - Serbian Dinar - // - `CSD` - Serbian Dinar (2002–2006) - // - `SCR` - Seychellois Rupee - // - `SLL` - Sierra Leonean Leone - // - `XAG` - Silver - // - `SGD` - Singapore Dollar - // - `SKK` - Slovak Koruna - // - `SIT` - Slovenian Tolar - // - `SBD` - Solomon Islands Dollar - // - `SOS` - Somali Shilling - // - `ZAR` - South African Rand - // - `ZAL` - South African Rand (financial) - // - `KRH` - South Korean Hwan (1953–1962) - // - `KRW` - South Korean Won - // - `KRO` - South Korean Won (1945–1953) - // - `SSP` - South Sudanese Pound - // - `SUR` - Soviet Rouble - // - `ESP` - Spanish Peseta - // - `ESA` - Spanish Peseta (A account) - // - `ESB` - Spanish Peseta (convertible account) - // - `XDR` - Special Drawing Rights - // - `LKR` - Sri Lankan Rupee - // - `SHP` - St. Helena Pound - // - `XSU` - Sucre - // - `SDD` - Sudanese Dinar (1992–2007) - // - `SDG` - Sudanese Pound - // - `SDP` - Sudanese Pound (1957–1998) - // - `SRD` - Surinamese Dollar - // - `SRG` - Surinamese Guilder - // - `SZL` - Swazi Lilangeni - // - `SEK` - Swedish Krona - // - `CHF` - Swiss Franc - // - `SYP` - Syrian Pound - // - `STN` - São Tomé & Príncipe Dobra - // - `STD` - São Tomé & Príncipe Dobra (1977–2017) - // - `TVD` - TVD - // - `TJR` - Tajikistani Ruble - // - `TJS` - Tajikistani Somoni - // - `TZS` - Tanzanian Shilling - // - `XTS` - Testing Currency Code - // - `THB` - Thai Baht - // - `XXX` - The codes assigned for transactions where no currency is involved - // - `TPE` - Timorese Escudo - // - `TOP` - Tongan Paʻanga - // - `TTD` - Trinidad & Tobago Dollar - // - `TND` - Tunisian Dinar - // - `TRY` - Turkish Lira - // - `TRL` - Turkish Lira (1922–2005) - // - `TMT` - Turkmenistani Manat - // - `TMM` - Turkmenistani Manat (1993–2009) - // - `USD` - US Dollar - // - `USN` - US Dollar (Next day) - // - `USS` - US Dollar (Same day) - // - `UGX` - Ugandan Shilling - // - `UGS` - Ugandan Shilling (1966–1987) - // - `UAH` - Ukrainian Hryvnia - // - `UAK` - Ukrainian Karbovanets - // - `AED` - United Arab Emirates Dirham - // - `UYW` - Uruguayan Nominal Wage Index Unit - // - `UYU` - Uruguayan Peso - // - `UYP` - Uruguayan Peso (1975–1993) - // - `UYI` - Uruguayan Peso (Indexed Units) - // - `UZS` - Uzbekistani Som - // - `VUV` - Vanuatu Vatu - // - `VES` - Venezuelan Bolívar - // - `VEB` - Venezuelan Bolívar (1871–2008) - // - `VEF` - Venezuelan Bolívar (2008–2018) - // - `VND` - Vietnamese Dong - // - `VNN` - Vietnamese Dong (1978–1985) - // - `CHE` - WIR Euro - // - `CHW` - WIR Franc - // - `XOF` - West African CFA Franc - // - `YDD` - Yemeni Dinar - // - `YER` - Yemeni Rial - // - `YUN` - Yugoslavian Convertible Dinar (1990–1992) - // - `YUD` - Yugoslavian Hard Dinar (1966–1990) - // - `YUM` - Yugoslavian New Dinar (1994–2002) - // - `YUR` - Yugoslavian Reformed Dinar (1992–1993) - // - `ZWN` - ZWN - // - `ZRN` - Zairean New Zaire (1993–1998) - // - `ZRZ` - Zairean Zaire (1971–1993) - // - `ZMW` - Zambian Kwacha - // - `ZMK` - Zambian Kwacha (1968–2012) - // - `ZWD` - Zimbabwean Dollar (1980–2008) - // - `ZWR` - Zimbabwean Dollar (2008) - // - `ZWL` - Zimbabwean Dollar (2009) - Currency *CashFlowStatementCurrency `json:"currency,omitempty"` - // The company the cash flow statement belongs to. - Company *CashFlowStatementCompany `json:"company,omitempty"` - // The cash flow statement's start period. - StartPeriod *time.Time `json:"start_period,omitempty"` - // The cash flow statement's end period. - EndPeriod *time.Time `json:"end_period,omitempty"` - // Cash and cash equivalents at the beginning of the cash flow statement's period. - CashAtBeginningOfPeriod *float64 `json:"cash_at_beginning_of_period,omitempty"` - // Cash and cash equivalents at the beginning of the cash flow statement's period. - CashAtEndOfPeriod *float64 `json:"cash_at_end_of_period,omitempty"` - OperatingActivities []*ReportItem `json:"operating_activities,omitempty"` - InvestingActivities []*ReportItem `json:"investing_activities,omitempty"` - FinancingActivities []*ReportItem `json:"financing_activities,omitempty"` - // The time that cash flow statement was generated by the accounting system. - RemoteGeneratedAt *time.Time `json:"remote_generated_at,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` - - _rawJSON json.RawMessage + c.extraProperties = extraProperties + c.rawJSON = json.RawMessage(data) + return nil } -func (c *CashFlowStatement) UnmarshalJSON(data []byte) error { - type unmarshaler CashFlowStatement - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (c *Contact) MarshalJSON() ([]byte, error) { + type embed Contact + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + RemoteUpdatedAt *internal.DateTime `json:"remote_updated_at,omitempty"` + }{ + embed: embed(*c), + CreatedAt: internal.NewOptionalDateTime(c.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(c.ModifiedAt), + RemoteUpdatedAt: internal.NewOptionalDateTime(c.RemoteUpdatedAt), } - *c = CashFlowStatement(value) - c._rawJSON = json.RawMessage(data) - return nil + return json.Marshal(marshaler) } -func (c *CashFlowStatement) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { +func (c *Contact) String() string { + if len(c.rawJSON) > 0 { + if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(c); err == nil { + if value, err := internal.StringifyJSON(c); err == nil { return value } return fmt.Sprintf("%#v", c) } -// The company the cash flow statement belongs to. -type CashFlowStatementCompany struct { - typeName string - String string - CompanyInfo *CompanyInfo +type ContactAddressesItem struct { + String string + Address *Address + + typ string } -func NewCashFlowStatementCompanyFromString(value string) *CashFlowStatementCompany { - return &CashFlowStatementCompany{typeName: "string", String: value} +func (c *ContactAddressesItem) GetString() string { + if c == nil { + return "" + } + return c.String } -func NewCashFlowStatementCompanyFromCompanyInfo(value *CompanyInfo) *CashFlowStatementCompany { - return &CashFlowStatementCompany{typeName: "companyInfo", CompanyInfo: value} +func (c *ContactAddressesItem) GetAddress() *Address { + if c == nil { + return nil + } + return c.Address } -func (c *CashFlowStatementCompany) UnmarshalJSON(data []byte) error { +func (c *ContactAddressesItem) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - c.typeName = "string" + c.typ = "String" c.String = valueString return nil } - valueCompanyInfo := new(CompanyInfo) - if err := json.Unmarshal(data, &valueCompanyInfo); err == nil { - c.typeName = "companyInfo" - c.CompanyInfo = valueCompanyInfo + valueAddress := new(Address) + if err := json.Unmarshal(data, &valueAddress); err == nil { + c.typ = "Address" + c.Address = valueAddress return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, c) } -func (c CashFlowStatementCompany) MarshalJSON() ([]byte, error) { - switch c.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": +func (c ContactAddressesItem) MarshalJSON() ([]byte, error) { + if c.typ == "String" || c.String != "" { return json.Marshal(c.String) - case "companyInfo": - return json.Marshal(c.CompanyInfo) } + if c.typ == "Address" || c.Address != nil { + return json.Marshal(c.Address) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", c) } -type CashFlowStatementCompanyVisitor interface { +type ContactAddressesItemVisitor interface { VisitString(string) error - VisitCompanyInfo(*CompanyInfo) error + VisitAddress(*Address) error } -func (c *CashFlowStatementCompany) Accept(visitor CashFlowStatementCompanyVisitor) error { - switch c.typeName { - default: - return fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": +func (c *ContactAddressesItem) Accept(visitor ContactAddressesItemVisitor) error { + if c.typ == "String" || c.String != "" { return visitor.VisitString(c.String) - case "companyInfo": - return visitor.VisitCompanyInfo(c.CompanyInfo) } + if c.typ == "Address" || c.Address != nil { + return visitor.VisitAddress(c.Address) + } + return fmt.Errorf("type %T does not include a non-empty union type", c) } -// The cash flow statement's currency. +// The contact's status // -// - `XUA` - ADB Unit of Account -// - `AFN` - Afghan Afghani -// - `AFA` - Afghan Afghani (1927–2002) -// - `ALL` - Albanian Lek -// - `ALK` - Albanian Lek (1946–1965) -// - `DZD` - Algerian Dinar -// - `ADP` - Andorran Peseta -// - `AOA` - Angolan Kwanza -// - `AOK` - Angolan Kwanza (1977–1991) -// - `AON` - Angolan New Kwanza (1990–2000) -// - `AOR` - Angolan Readjusted Kwanza (1995–1999) -// - `ARA` - Argentine Austral -// - `ARS` - Argentine Peso -// - `ARM` - Argentine Peso (1881–1970) -// - `ARP` - Argentine Peso (1983–1985) -// - `ARL` - Argentine Peso Ley (1970–1983) -// - `AMD` - Armenian Dram -// - `AWG` - Aruban Florin -// - `AUD` - Australian Dollar -// - `ATS` - Austrian Schilling -// - `AZN` - Azerbaijani Manat -// - `AZM` - Azerbaijani Manat (1993–2006) -// - `BSD` - Bahamian Dollar -// - `BHD` - Bahraini Dinar -// - `BDT` - Bangladeshi Taka -// - `BBD` - Barbadian Dollar -// - `BYN` - Belarusian Ruble -// - `BYB` - Belarusian Ruble (1994–1999) -// - `BYR` - Belarusian Ruble (2000–2016) -// - `BEF` - Belgian Franc -// - `BEC` - Belgian Franc (convertible) -// - `BEL` - Belgian Franc (financial) -// - `BZD` - Belize Dollar -// - `BMD` - Bermudan Dollar -// - `BTN` - Bhutanese Ngultrum -// - `BOB` - Bolivian Boliviano -// - `BOL` - Bolivian Boliviano (1863–1963) -// - `BOV` - Bolivian Mvdol -// - `BOP` - Bolivian Peso -// - `BAM` - Bosnia-Herzegovina Convertible Mark -// - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) -// - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) -// - `BWP` - Botswanan Pula -// - `BRC` - Brazilian Cruzado (1986–1989) -// - `BRZ` - Brazilian Cruzeiro (1942–1967) -// - `BRE` - Brazilian Cruzeiro (1990–1993) -// - `BRR` - Brazilian Cruzeiro (1993–1994) -// - `BRN` - Brazilian New Cruzado (1989–1990) -// - `BRB` - Brazilian New Cruzeiro (1967–1986) -// - `BRL` - Brazilian Real -// - `GBP` - British Pound -// - `BND` - Brunei Dollar -// - `BGL` - Bulgarian Hard Lev -// - `BGN` - Bulgarian Lev -// - `BGO` - Bulgarian Lev (1879–1952) -// - `BGM` - Bulgarian Socialist Lev -// - `BUK` - Burmese Kyat -// - `BIF` - Burundian Franc -// - `XPF` - CFP Franc -// - `KHR` - Cambodian Riel -// - `CAD` - Canadian Dollar -// - `CVE` - Cape Verdean Escudo -// - `KYD` - Cayman Islands Dollar -// - `XAF` - Central African CFA Franc -// - `CLE` - Chilean Escudo -// - `CLP` - Chilean Peso -// - `CLF` - Chilean Unit of Account (UF) -// - `CNX` - Chinese People’s Bank Dollar -// - `CNY` - Chinese Yuan -// - `CNH` - Chinese Yuan (offshore) -// - `COP` - Colombian Peso -// - `COU` - Colombian Real Value Unit -// - `KMF` - Comorian Franc -// - `CDF` - Congolese Franc -// - `CRC` - Costa Rican Colón -// - `HRD` - Croatian Dinar -// - `HRK` - Croatian Kuna -// - `CUC` - Cuban Convertible Peso -// - `CUP` - Cuban Peso -// - `CYP` - Cypriot Pound -// - `CZK` - Czech Koruna -// - `CSK` - Czechoslovak Hard Koruna -// - `DKK` - Danish Krone -// - `DJF` - Djiboutian Franc -// - `DOP` - Dominican Peso -// - `NLG` - Dutch Guilder -// - `XCD` - East Caribbean Dollar -// - `DDM` - East German Mark -// - `ECS` - Ecuadorian Sucre -// - `ECV` - Ecuadorian Unit of Constant Value -// - `EGP` - Egyptian Pound -// - `GQE` - Equatorial Guinean Ekwele -// - `ERN` - Eritrean Nakfa -// - `EEK` - Estonian Kroon -// - `ETB` - Ethiopian Birr -// - `EUR` - Euro -// - `XBA` - European Composite Unit -// - `XEU` - European Currency Unit -// - `XBB` - European Monetary Unit -// - `XBC` - European Unit of Account (XBC) -// - `XBD` - European Unit of Account (XBD) -// - `FKP` - Falkland Islands Pound -// - `FJD` - Fijian Dollar -// - `FIM` - Finnish Markka -// - `FRF` - French Franc -// - `XFO` - French Gold Franc -// - `XFU` - French UIC-Franc -// - `GMD` - Gambian Dalasi -// - `GEK` - Georgian Kupon Larit -// - `GEL` - Georgian Lari -// - `DEM` - German Mark -// - `GHS` - Ghanaian Cedi -// - `GHC` - Ghanaian Cedi (1979–2007) -// - `GIP` - Gibraltar Pound -// - `XAU` - Gold -// - `GRD` - Greek Drachma -// - `GTQ` - Guatemalan Quetzal -// - `GWP` - Guinea-Bissau Peso -// - `GNF` - Guinean Franc -// - `GNS` - Guinean Syli -// - `GYD` - Guyanaese Dollar -// - `HTG` - Haitian Gourde -// - `HNL` - Honduran Lempira -// - `HKD` - Hong Kong Dollar -// - `HUF` - Hungarian Forint -// - `IMP` - IMP -// - `ISK` - Icelandic Króna -// - `ISJ` - Icelandic Króna (1918–1981) -// - `INR` - Indian Rupee -// - `IDR` - Indonesian Rupiah -// - `IRR` - Iranian Rial -// - `IQD` - Iraqi Dinar -// - `IEP` - Irish Pound -// - `ILS` - Israeli New Shekel -// - `ILP` - Israeli Pound -// - `ILR` - Israeli Shekel (1980–1985) -// - `ITL` - Italian Lira -// - `JMD` - Jamaican Dollar -// - `JPY` - Japanese Yen -// - `JOD` - Jordanian Dinar -// - `KZT` - Kazakhstani Tenge -// - `KES` - Kenyan Shilling -// - `KWD` - Kuwaiti Dinar -// - `KGS` - Kyrgystani Som -// - `LAK` - Laotian Kip -// - `LVL` - Latvian Lats -// - `LVR` - Latvian Ruble -// - `LBP` - Lebanese Pound -// - `LSL` - Lesotho Loti -// - `LRD` - Liberian Dollar -// - `LYD` - Libyan Dinar -// - `LTL` - Lithuanian Litas -// - `LTT` - Lithuanian Talonas -// - `LUL` - Luxembourg Financial Franc -// - `LUC` - Luxembourgian Convertible Franc -// - `LUF` - Luxembourgian Franc -// - `MOP` - Macanese Pataca -// - `MKD` - Macedonian Denar -// - `MKN` - Macedonian Denar (1992–1993) -// - `MGA` - Malagasy Ariary -// - `MGF` - Malagasy Franc -// - `MWK` - Malawian Kwacha -// - `MYR` - Malaysian Ringgit -// - `MVR` - Maldivian Rufiyaa -// - `MVP` - Maldivian Rupee (1947–1981) -// - `MLF` - Malian Franc -// - `MTL` - Maltese Lira -// - `MTP` - Maltese Pound -// - `MRU` - Mauritanian Ouguiya -// - `MRO` - Mauritanian Ouguiya (1973–2017) -// - `MUR` - Mauritian Rupee -// - `MXV` - Mexican Investment Unit -// - `MXN` - Mexican Peso -// - `MXP` - Mexican Silver Peso (1861–1992) -// - `MDC` - Moldovan Cupon -// - `MDL` - Moldovan Leu -// - `MCF` - Monegasque Franc -// - `MNT` - Mongolian Tugrik -// - `MAD` - Moroccan Dirham -// - `MAF` - Moroccan Franc -// - `MZE` - Mozambican Escudo -// - `MZN` - Mozambican Metical -// - `MZM` - Mozambican Metical (1980–2006) -// - `MMK` - Myanmar Kyat -// - `NAD` - Namibian Dollar -// - `NPR` - Nepalese Rupee -// - `ANG` - Netherlands Antillean Guilder -// - `TWD` - New Taiwan Dollar -// - `NZD` - New Zealand Dollar -// - `NIO` - Nicaraguan Córdoba -// - `NIC` - Nicaraguan Córdoba (1988–1991) -// - `NGN` - Nigerian Naira -// - `KPW` - North Korean Won -// - `NOK` - Norwegian Krone -// - `OMR` - Omani Rial -// - `PKR` - Pakistani Rupee -// - `XPD` - Palladium -// - `PAB` - Panamanian Balboa -// - `PGK` - Papua New Guinean Kina -// - `PYG` - Paraguayan Guarani -// - `PEI` - Peruvian Inti -// - `PEN` - Peruvian Sol -// - `PES` - Peruvian Sol (1863–1965) -// - `PHP` - Philippine Peso -// - `XPT` - Platinum -// - `PLN` - Polish Zloty -// - `PLZ` - Polish Zloty (1950–1995) -// - `PTE` - Portuguese Escudo -// - `GWE` - Portuguese Guinea Escudo -// - `QAR` - Qatari Rial -// - `XRE` - RINET Funds -// - `RHD` - Rhodesian Dollar -// - `RON` - Romanian Leu -// - `ROL` - Romanian Leu (1952–2006) -// - `RUB` - Russian Ruble -// - `RUR` - Russian Ruble (1991–1998) -// - `RWF` - Rwandan Franc -// - `SVC` - Salvadoran Colón -// - `WST` - Samoan Tala -// - `SAR` - Saudi Riyal -// - `RSD` - Serbian Dinar -// - `CSD` - Serbian Dinar (2002–2006) -// - `SCR` - Seychellois Rupee -// - `SLL` - Sierra Leonean Leone -// - `XAG` - Silver -// - `SGD` - Singapore Dollar -// - `SKK` - Slovak Koruna -// - `SIT` - Slovenian Tolar -// - `SBD` - Solomon Islands Dollar -// - `SOS` - Somali Shilling -// - `ZAR` - South African Rand -// - `ZAL` - South African Rand (financial) -// - `KRH` - South Korean Hwan (1953–1962) -// - `KRW` - South Korean Won -// - `KRO` - South Korean Won (1945–1953) -// - `SSP` - South Sudanese Pound -// - `SUR` - Soviet Rouble -// - `ESP` - Spanish Peseta -// - `ESA` - Spanish Peseta (A account) -// - `ESB` - Spanish Peseta (convertible account) -// - `XDR` - Special Drawing Rights -// - `LKR` - Sri Lankan Rupee -// - `SHP` - St. Helena Pound -// - `XSU` - Sucre -// - `SDD` - Sudanese Dinar (1992–2007) -// - `SDG` - Sudanese Pound -// - `SDP` - Sudanese Pound (1957–1998) -// - `SRD` - Surinamese Dollar -// - `SRG` - Surinamese Guilder -// - `SZL` - Swazi Lilangeni -// - `SEK` - Swedish Krona -// - `CHF` - Swiss Franc -// - `SYP` - Syrian Pound -// - `STN` - São Tomé & Príncipe Dobra -// - `STD` - São Tomé & Príncipe Dobra (1977–2017) -// - `TVD` - TVD -// - `TJR` - Tajikistani Ruble -// - `TJS` - Tajikistani Somoni -// - `TZS` - Tanzanian Shilling -// - `XTS` - Testing Currency Code -// - `THB` - Thai Baht -// - `XXX` - The codes assigned for transactions where no currency is involved -// - `TPE` - Timorese Escudo -// - `TOP` - Tongan Paʻanga -// - `TTD` - Trinidad & Tobago Dollar -// - `TND` - Tunisian Dinar -// - `TRY` - Turkish Lira -// - `TRL` - Turkish Lira (1922–2005) -// - `TMT` - Turkmenistani Manat -// - `TMM` - Turkmenistani Manat (1993–2009) -// - `USD` - US Dollar -// - `USN` - US Dollar (Next day) -// - `USS` - US Dollar (Same day) -// - `UGX` - Ugandan Shilling -// - `UGS` - Ugandan Shilling (1966–1987) -// - `UAH` - Ukrainian Hryvnia -// - `UAK` - Ukrainian Karbovanets -// - `AED` - United Arab Emirates Dirham -// - `UYW` - Uruguayan Nominal Wage Index Unit -// - `UYU` - Uruguayan Peso -// - `UYP` - Uruguayan Peso (1975–1993) -// - `UYI` - Uruguayan Peso (Indexed Units) -// - `UZS` - Uzbekistani Som -// - `VUV` - Vanuatu Vatu -// - `VES` - Venezuelan Bolívar -// - `VEB` - Venezuelan Bolívar (1871–2008) -// - `VEF` - Venezuelan Bolívar (2008–2018) -// - `VND` - Vietnamese Dong -// - `VNN` - Vietnamese Dong (1978–1985) -// - `CHE` - WIR Euro -// - `CHW` - WIR Franc -// - `XOF` - West African CFA Franc -// - `YDD` - Yemeni Dinar -// - `YER` - Yemeni Rial -// - `YUN` - Yugoslavian Convertible Dinar (1990–1992) -// - `YUD` - Yugoslavian Hard Dinar (1966–1990) -// - `YUM` - Yugoslavian New Dinar (1994–2002) -// - `YUR` - Yugoslavian Reformed Dinar (1992–1993) -// - `ZWN` - ZWN -// - `ZRN` - Zairean New Zaire (1993–1998) -// - `ZRZ` - Zairean Zaire (1971–1993) -// - `ZMW` - Zambian Kwacha -// - `ZMK` - Zambian Kwacha (1968–2012) -// - `ZWD` - Zimbabwean Dollar (1980–2008) -// - `ZWR` - Zimbabwean Dollar (2008) -// - `ZWL` - Zimbabwean Dollar (2009) -type CashFlowStatementCurrency struct { - typeName string - TransactionCurrencyEnum TransactionCurrencyEnum - String string +// * `ACTIVE` - ACTIVE +// * `ARCHIVED` - ARCHIVED +type ContactStatus struct { + Status7D1Enum Status7D1Enum + String string + + typ string } -func NewCashFlowStatementCurrencyFromTransactionCurrencyEnum(value TransactionCurrencyEnum) *CashFlowStatementCurrency { - return &CashFlowStatementCurrency{typeName: "transactionCurrencyEnum", TransactionCurrencyEnum: value} +func (c *ContactStatus) GetStatus7D1Enum() Status7D1Enum { + if c == nil { + return "" + } + return c.Status7D1Enum } -func NewCashFlowStatementCurrencyFromString(value string) *CashFlowStatementCurrency { - return &CashFlowStatementCurrency{typeName: "string", String: value} +func (c *ContactStatus) GetString() string { + if c == nil { + return "" + } + return c.String } -func (c *CashFlowStatementCurrency) UnmarshalJSON(data []byte) error { - var valueTransactionCurrencyEnum TransactionCurrencyEnum - if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { - c.typeName = "transactionCurrencyEnum" - c.TransactionCurrencyEnum = valueTransactionCurrencyEnum +func (c *ContactStatus) UnmarshalJSON(data []byte) error { + var valueStatus7D1Enum Status7D1Enum + if err := json.Unmarshal(data, &valueStatus7D1Enum); err == nil { + c.typ = "Status7D1Enum" + c.Status7D1Enum = valueStatus7D1Enum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - c.typeName = "string" + c.typ = "String" c.String = valueString return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, c) } -func (c CashFlowStatementCurrency) MarshalJSON() ([]byte, error) { - switch c.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "transactionCurrencyEnum": - return json.Marshal(c.TransactionCurrencyEnum) - case "string": +func (c ContactStatus) MarshalJSON() ([]byte, error) { + if c.typ == "Status7D1Enum" || c.Status7D1Enum != "" { + return json.Marshal(c.Status7D1Enum) + } + if c.typ == "String" || c.String != "" { return json.Marshal(c.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", c) } -type CashFlowStatementCurrencyVisitor interface { - VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error +type ContactStatusVisitor interface { + VisitStatus7D1Enum(Status7D1Enum) error VisitString(string) error } -func (c *CashFlowStatementCurrency) Accept(visitor CashFlowStatementCurrencyVisitor) error { - switch c.typeName { - default: - return fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "transactionCurrencyEnum": - return visitor.VisitTransactionCurrencyEnum(c.TransactionCurrencyEnum) - case "string": - return visitor.VisitString(c.String) - } -} - -// - `hris` - hris -// - `ats` - ats -// - `accounting` - accounting -// - `ticketing` - ticketing -// - `crm` - crm -// - `mktg` - mktg -// - `filestorage` - filestorage -type CategoriesEnum string - -const ( - CategoriesEnumHris CategoriesEnum = "hris" - CategoriesEnumAts CategoriesEnum = "ats" - CategoriesEnumAccounting CategoriesEnum = "accounting" - CategoriesEnumTicketing CategoriesEnum = "ticketing" - CategoriesEnumCrm CategoriesEnum = "crm" - CategoriesEnumMktg CategoriesEnum = "mktg" - CategoriesEnumFilestorage CategoriesEnum = "filestorage" -) - -func NewCategoriesEnumFromString(s string) (CategoriesEnum, error) { - switch s { - case "hris": - return CategoriesEnumHris, nil - case "ats": - return CategoriesEnumAts, nil - case "accounting": - return CategoriesEnumAccounting, nil - case "ticketing": - return CategoriesEnumTicketing, nil - case "crm": - return CategoriesEnumCrm, nil - case "mktg": - return CategoriesEnumMktg, nil - case "filestorage": - return CategoriesEnumFilestorage, nil - } - var t CategoriesEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (c CategoriesEnum) Ptr() *CategoriesEnum { - return &c -} - -// - `hris` - hris -// - `ats` - ats -// - `accounting` - accounting -// - `ticketing` - ticketing -// - `crm` - crm -// - `mktg` - mktg -// - `filestorage` - filestorage -type CategoryEnum string - -const ( - CategoryEnumHris CategoryEnum = "hris" - CategoryEnumAts CategoryEnum = "ats" - CategoryEnumAccounting CategoryEnum = "accounting" - CategoryEnumTicketing CategoryEnum = "ticketing" - CategoryEnumCrm CategoryEnum = "crm" - CategoryEnumMktg CategoryEnum = "mktg" - CategoryEnumFilestorage CategoryEnum = "filestorage" -) - -func NewCategoryEnumFromString(s string) (CategoryEnum, error) { - switch s { - case "hris": - return CategoryEnumHris, nil - case "ats": - return CategoryEnumAts, nil - case "accounting": - return CategoryEnumAccounting, nil - case "ticketing": - return CategoryEnumTicketing, nil - case "crm": - return CategoryEnumCrm, nil - case "mktg": - return CategoryEnumMktg, nil - case "filestorage": - return CategoryEnumFilestorage, nil - } - var t CategoryEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (c CategoryEnum) Ptr() *CategoryEnum { - return &c -} - -// - `CLASS` - CLASS -// - `DEPARTMENT` - DEPARTMENT -type CategoryTypeEnum string - -const ( - CategoryTypeEnumClass CategoryTypeEnum = "CLASS" - CategoryTypeEnumDepartment CategoryTypeEnum = "DEPARTMENT" -) - -func NewCategoryTypeEnumFromString(s string) (CategoryTypeEnum, error) { - switch s { - case "CLASS": - return CategoryTypeEnumClass, nil - case "DEPARTMENT": - return CategoryTypeEnumDepartment, nil - } - var t CategoryTypeEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (c CategoryTypeEnum) Ptr() *CategoryTypeEnum { - return &c -} - -// - `ASSET` - ASSET -// - `EQUITY` - EQUITY -// - `EXPENSE` - EXPENSE -// - `LIABILITY` - LIABILITY -// - `REVENUE` - REVENUE -type ClassificationEnum string - -const ( - ClassificationEnumAsset ClassificationEnum = "ASSET" - ClassificationEnumEquity ClassificationEnum = "EQUITY" - ClassificationEnumExpense ClassificationEnum = "EXPENSE" - ClassificationEnumLiability ClassificationEnum = "LIABILITY" - ClassificationEnumRevenue ClassificationEnum = "REVENUE" -) - -func NewClassificationEnumFromString(s string) (ClassificationEnum, error) { - switch s { - case "ASSET": - return ClassificationEnumAsset, nil - case "EQUITY": - return ClassificationEnumEquity, nil - case "EXPENSE": - return ClassificationEnumExpense, nil - case "LIABILITY": - return ClassificationEnumLiability, nil - case "REVENUE": - return ClassificationEnumRevenue, nil - } - var t ClassificationEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (c ClassificationEnum) Ptr() *ClassificationEnum { - return &c -} - -type CommonModelScopeApi struct { - // The common models you want to update the scopes for - CommonModels []*IndividualCommonModelScopeDeserializer `json:"common_models,omitempty"` - - _rawJSON json.RawMessage -} - -func (c *CommonModelScopeApi) UnmarshalJSON(data []byte) error { - type unmarshaler CommonModelScopeApi - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *c = CommonModelScopeApi(value) - c._rawJSON = json.RawMessage(data) - return nil -} - -func (c *CommonModelScopeApi) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(c); err == nil { - return value - } - return fmt.Sprintf("%#v", c) -} - -type CommonModelScopesBodyRequest struct { - ModelId string `json:"model_id"` - EnabledActions []EnabledActionsEnum `json:"enabled_actions,omitempty"` - DisabledFields []string `json:"disabled_fields,omitempty"` - - _rawJSON json.RawMessage -} - -func (c *CommonModelScopesBodyRequest) UnmarshalJSON(data []byte) error { - type unmarshaler CommonModelScopesBodyRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *c = CommonModelScopesBodyRequest(value) - c._rawJSON = json.RawMessage(data) - return nil -} - -func (c *CommonModelScopesBodyRequest) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(c); err == nil { - return value - } - return fmt.Sprintf("%#v", c) -} - -// # The CompanyInfo Object -// -// ### Description -// -// The `CompanyInfo` object contains information about the company of the linked account. If the company has multiple entities (also known as subsidiaries), each entity may show up as a single `CompanyInfo` record. -// -// ### Usage Example -// -// Fetch from the `GET CompanyInfo` endpoint and view a company's information. -type CompanyInfo struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The company's name. - Name *string `json:"name,omitempty"` - // The company's legal name. - LegalName *string `json:"legal_name,omitempty"` - // The company's tax number. - TaxNumber *string `json:"tax_number,omitempty"` - // The company's fiscal year end month. - FiscalYearEndMonth *int `json:"fiscal_year_end_month,omitempty"` - // The company's fiscal year end day. - FiscalYearEndDay *int `json:"fiscal_year_end_day,omitempty"` - // The currency set in the company's accounting platform. - // - // - `XUA` - ADB Unit of Account - // - `AFN` - Afghan Afghani - // - `AFA` - Afghan Afghani (1927–2002) - // - `ALL` - Albanian Lek - // - `ALK` - Albanian Lek (1946–1965) - // - `DZD` - Algerian Dinar - // - `ADP` - Andorran Peseta - // - `AOA` - Angolan Kwanza - // - `AOK` - Angolan Kwanza (1977–1991) - // - `AON` - Angolan New Kwanza (1990–2000) - // - `AOR` - Angolan Readjusted Kwanza (1995–1999) - // - `ARA` - Argentine Austral - // - `ARS` - Argentine Peso - // - `ARM` - Argentine Peso (1881–1970) - // - `ARP` - Argentine Peso (1983–1985) - // - `ARL` - Argentine Peso Ley (1970–1983) - // - `AMD` - Armenian Dram - // - `AWG` - Aruban Florin - // - `AUD` - Australian Dollar - // - `ATS` - Austrian Schilling - // - `AZN` - Azerbaijani Manat - // - `AZM` - Azerbaijani Manat (1993–2006) - // - `BSD` - Bahamian Dollar - // - `BHD` - Bahraini Dinar - // - `BDT` - Bangladeshi Taka - // - `BBD` - Barbadian Dollar - // - `BYN` - Belarusian Ruble - // - `BYB` - Belarusian Ruble (1994–1999) - // - `BYR` - Belarusian Ruble (2000–2016) - // - `BEF` - Belgian Franc - // - `BEC` - Belgian Franc (convertible) - // - `BEL` - Belgian Franc (financial) - // - `BZD` - Belize Dollar - // - `BMD` - Bermudan Dollar - // - `BTN` - Bhutanese Ngultrum - // - `BOB` - Bolivian Boliviano - // - `BOL` - Bolivian Boliviano (1863–1963) - // - `BOV` - Bolivian Mvdol - // - `BOP` - Bolivian Peso - // - `BAM` - Bosnia-Herzegovina Convertible Mark - // - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - // - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - // - `BWP` - Botswanan Pula - // - `BRC` - Brazilian Cruzado (1986–1989) - // - `BRZ` - Brazilian Cruzeiro (1942–1967) - // - `BRE` - Brazilian Cruzeiro (1990–1993) - // - `BRR` - Brazilian Cruzeiro (1993–1994) - // - `BRN` - Brazilian New Cruzado (1989–1990) - // - `BRB` - Brazilian New Cruzeiro (1967–1986) - // - `BRL` - Brazilian Real - // - `GBP` - British Pound - // - `BND` - Brunei Dollar - // - `BGL` - Bulgarian Hard Lev - // - `BGN` - Bulgarian Lev - // - `BGO` - Bulgarian Lev (1879–1952) - // - `BGM` - Bulgarian Socialist Lev - // - `BUK` - Burmese Kyat - // - `BIF` - Burundian Franc - // - `XPF` - CFP Franc - // - `KHR` - Cambodian Riel - // - `CAD` - Canadian Dollar - // - `CVE` - Cape Verdean Escudo - // - `KYD` - Cayman Islands Dollar - // - `XAF` - Central African CFA Franc - // - `CLE` - Chilean Escudo - // - `CLP` - Chilean Peso - // - `CLF` - Chilean Unit of Account (UF) - // - `CNX` - Chinese People’s Bank Dollar - // - `CNY` - Chinese Yuan - // - `CNH` - Chinese Yuan (offshore) - // - `COP` - Colombian Peso - // - `COU` - Colombian Real Value Unit - // - `KMF` - Comorian Franc - // - `CDF` - Congolese Franc - // - `CRC` - Costa Rican Colón - // - `HRD` - Croatian Dinar - // - `HRK` - Croatian Kuna - // - `CUC` - Cuban Convertible Peso - // - `CUP` - Cuban Peso - // - `CYP` - Cypriot Pound - // - `CZK` - Czech Koruna - // - `CSK` - Czechoslovak Hard Koruna - // - `DKK` - Danish Krone - // - `DJF` - Djiboutian Franc - // - `DOP` - Dominican Peso - // - `NLG` - Dutch Guilder - // - `XCD` - East Caribbean Dollar - // - `DDM` - East German Mark - // - `ECS` - Ecuadorian Sucre - // - `ECV` - Ecuadorian Unit of Constant Value - // - `EGP` - Egyptian Pound - // - `GQE` - Equatorial Guinean Ekwele - // - `ERN` - Eritrean Nakfa - // - `EEK` - Estonian Kroon - // - `ETB` - Ethiopian Birr - // - `EUR` - Euro - // - `XBA` - European Composite Unit - // - `XEU` - European Currency Unit - // - `XBB` - European Monetary Unit - // - `XBC` - European Unit of Account (XBC) - // - `XBD` - European Unit of Account (XBD) - // - `FKP` - Falkland Islands Pound - // - `FJD` - Fijian Dollar - // - `FIM` - Finnish Markka - // - `FRF` - French Franc - // - `XFO` - French Gold Franc - // - `XFU` - French UIC-Franc - // - `GMD` - Gambian Dalasi - // - `GEK` - Georgian Kupon Larit - // - `GEL` - Georgian Lari - // - `DEM` - German Mark - // - `GHS` - Ghanaian Cedi - // - `GHC` - Ghanaian Cedi (1979–2007) - // - `GIP` - Gibraltar Pound - // - `XAU` - Gold - // - `GRD` - Greek Drachma - // - `GTQ` - Guatemalan Quetzal - // - `GWP` - Guinea-Bissau Peso - // - `GNF` - Guinean Franc - // - `GNS` - Guinean Syli - // - `GYD` - Guyanaese Dollar - // - `HTG` - Haitian Gourde - // - `HNL` - Honduran Lempira - // - `HKD` - Hong Kong Dollar - // - `HUF` - Hungarian Forint - // - `IMP` - IMP - // - `ISK` - Icelandic Króna - // - `ISJ` - Icelandic Króna (1918–1981) - // - `INR` - Indian Rupee - // - `IDR` - Indonesian Rupiah - // - `IRR` - Iranian Rial - // - `IQD` - Iraqi Dinar - // - `IEP` - Irish Pound - // - `ILS` - Israeli New Shekel - // - `ILP` - Israeli Pound - // - `ILR` - Israeli Shekel (1980–1985) - // - `ITL` - Italian Lira - // - `JMD` - Jamaican Dollar - // - `JPY` - Japanese Yen - // - `JOD` - Jordanian Dinar - // - `KZT` - Kazakhstani Tenge - // - `KES` - Kenyan Shilling - // - `KWD` - Kuwaiti Dinar - // - `KGS` - Kyrgystani Som - // - `LAK` - Laotian Kip - // - `LVL` - Latvian Lats - // - `LVR` - Latvian Ruble - // - `LBP` - Lebanese Pound - // - `LSL` - Lesotho Loti - // - `LRD` - Liberian Dollar - // - `LYD` - Libyan Dinar - // - `LTL` - Lithuanian Litas - // - `LTT` - Lithuanian Talonas - // - `LUL` - Luxembourg Financial Franc - // - `LUC` - Luxembourgian Convertible Franc - // - `LUF` - Luxembourgian Franc - // - `MOP` - Macanese Pataca - // - `MKD` - Macedonian Denar - // - `MKN` - Macedonian Denar (1992–1993) - // - `MGA` - Malagasy Ariary - // - `MGF` - Malagasy Franc - // - `MWK` - Malawian Kwacha - // - `MYR` - Malaysian Ringgit - // - `MVR` - Maldivian Rufiyaa - // - `MVP` - Maldivian Rupee (1947–1981) - // - `MLF` - Malian Franc - // - `MTL` - Maltese Lira - // - `MTP` - Maltese Pound - // - `MRU` - Mauritanian Ouguiya - // - `MRO` - Mauritanian Ouguiya (1973–2017) - // - `MUR` - Mauritian Rupee - // - `MXV` - Mexican Investment Unit - // - `MXN` - Mexican Peso - // - `MXP` - Mexican Silver Peso (1861–1992) - // - `MDC` - Moldovan Cupon - // - `MDL` - Moldovan Leu - // - `MCF` - Monegasque Franc - // - `MNT` - Mongolian Tugrik - // - `MAD` - Moroccan Dirham - // - `MAF` - Moroccan Franc - // - `MZE` - Mozambican Escudo - // - `MZN` - Mozambican Metical - // - `MZM` - Mozambican Metical (1980–2006) - // - `MMK` - Myanmar Kyat - // - `NAD` - Namibian Dollar - // - `NPR` - Nepalese Rupee - // - `ANG` - Netherlands Antillean Guilder - // - `TWD` - New Taiwan Dollar - // - `NZD` - New Zealand Dollar - // - `NIO` - Nicaraguan Córdoba - // - `NIC` - Nicaraguan Córdoba (1988–1991) - // - `NGN` - Nigerian Naira - // - `KPW` - North Korean Won - // - `NOK` - Norwegian Krone - // - `OMR` - Omani Rial - // - `PKR` - Pakistani Rupee - // - `XPD` - Palladium - // - `PAB` - Panamanian Balboa - // - `PGK` - Papua New Guinean Kina - // - `PYG` - Paraguayan Guarani - // - `PEI` - Peruvian Inti - // - `PEN` - Peruvian Sol - // - `PES` - Peruvian Sol (1863–1965) - // - `PHP` - Philippine Peso - // - `XPT` - Platinum - // - `PLN` - Polish Zloty - // - `PLZ` - Polish Zloty (1950–1995) - // - `PTE` - Portuguese Escudo - // - `GWE` - Portuguese Guinea Escudo - // - `QAR` - Qatari Rial - // - `XRE` - RINET Funds - // - `RHD` - Rhodesian Dollar - // - `RON` - Romanian Leu - // - `ROL` - Romanian Leu (1952–2006) - // - `RUB` - Russian Ruble - // - `RUR` - Russian Ruble (1991–1998) - // - `RWF` - Rwandan Franc - // - `SVC` - Salvadoran Colón - // - `WST` - Samoan Tala - // - `SAR` - Saudi Riyal - // - `RSD` - Serbian Dinar - // - `CSD` - Serbian Dinar (2002–2006) - // - `SCR` - Seychellois Rupee - // - `SLL` - Sierra Leonean Leone - // - `XAG` - Silver - // - `SGD` - Singapore Dollar - // - `SKK` - Slovak Koruna - // - `SIT` - Slovenian Tolar - // - `SBD` - Solomon Islands Dollar - // - `SOS` - Somali Shilling - // - `ZAR` - South African Rand - // - `ZAL` - South African Rand (financial) - // - `KRH` - South Korean Hwan (1953–1962) - // - `KRW` - South Korean Won - // - `KRO` - South Korean Won (1945–1953) - // - `SSP` - South Sudanese Pound - // - `SUR` - Soviet Rouble - // - `ESP` - Spanish Peseta - // - `ESA` - Spanish Peseta (A account) - // - `ESB` - Spanish Peseta (convertible account) - // - `XDR` - Special Drawing Rights - // - `LKR` - Sri Lankan Rupee - // - `SHP` - St. Helena Pound - // - `XSU` - Sucre - // - `SDD` - Sudanese Dinar (1992–2007) - // - `SDG` - Sudanese Pound - // - `SDP` - Sudanese Pound (1957–1998) - // - `SRD` - Surinamese Dollar - // - `SRG` - Surinamese Guilder - // - `SZL` - Swazi Lilangeni - // - `SEK` - Swedish Krona - // - `CHF` - Swiss Franc - // - `SYP` - Syrian Pound - // - `STN` - São Tomé & Príncipe Dobra - // - `STD` - São Tomé & Príncipe Dobra (1977–2017) - // - `TVD` - TVD - // - `TJR` - Tajikistani Ruble - // - `TJS` - Tajikistani Somoni - // - `TZS` - Tanzanian Shilling - // - `XTS` - Testing Currency Code - // - `THB` - Thai Baht - // - `XXX` - The codes assigned for transactions where no currency is involved - // - `TPE` - Timorese Escudo - // - `TOP` - Tongan Paʻanga - // - `TTD` - Trinidad & Tobago Dollar - // - `TND` - Tunisian Dinar - // - `TRY` - Turkish Lira - // - `TRL` - Turkish Lira (1922–2005) - // - `TMT` - Turkmenistani Manat - // - `TMM` - Turkmenistani Manat (1993–2009) - // - `USD` - US Dollar - // - `USN` - US Dollar (Next day) - // - `USS` - US Dollar (Same day) - // - `UGX` - Ugandan Shilling - // - `UGS` - Ugandan Shilling (1966–1987) - // - `UAH` - Ukrainian Hryvnia - // - `UAK` - Ukrainian Karbovanets - // - `AED` - United Arab Emirates Dirham - // - `UYW` - Uruguayan Nominal Wage Index Unit - // - `UYU` - Uruguayan Peso - // - `UYP` - Uruguayan Peso (1975–1993) - // - `UYI` - Uruguayan Peso (Indexed Units) - // - `UZS` - Uzbekistani Som - // - `VUV` - Vanuatu Vatu - // - `VES` - Venezuelan Bolívar - // - `VEB` - Venezuelan Bolívar (1871–2008) - // - `VEF` - Venezuelan Bolívar (2008–2018) - // - `VND` - Vietnamese Dong - // - `VNN` - Vietnamese Dong (1978–1985) - // - `CHE` - WIR Euro - // - `CHW` - WIR Franc - // - `XOF` - West African CFA Franc - // - `YDD` - Yemeni Dinar - // - `YER` - Yemeni Rial - // - `YUN` - Yugoslavian Convertible Dinar (1990–1992) - // - `YUD` - Yugoslavian Hard Dinar (1966–1990) - // - `YUM` - Yugoslavian New Dinar (1994–2002) - // - `YUR` - Yugoslavian Reformed Dinar (1992–1993) - // - `ZWN` - ZWN - // - `ZRN` - Zairean New Zaire (1993–1998) - // - `ZRZ` - Zairean Zaire (1971–1993) - // - `ZMW` - Zambian Kwacha - // - `ZMK` - Zambian Kwacha (1968–2012) - // - `ZWD` - Zimbabwean Dollar (1980–2008) - // - `ZWR` - Zimbabwean Dollar (2008) - // - `ZWL` - Zimbabwean Dollar (2009) - Currency *CompanyInfoCurrency `json:"currency,omitempty"` - // When the third party's company was created. - RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty"` - // The company's urls. - Urls []*string `json:"urls,omitempty"` - Addresses []*Address `json:"addresses,omitempty"` - PhoneNumbers []*AccountingPhoneNumber `json:"phone_numbers,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` - - _rawJSON json.RawMessage -} - -func (c *CompanyInfo) UnmarshalJSON(data []byte) error { - type unmarshaler CompanyInfo - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *c = CompanyInfo(value) - c._rawJSON = json.RawMessage(data) - return nil -} - -func (c *CompanyInfo) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(c); err == nil { - return value - } - return fmt.Sprintf("%#v", c) -} - -// The currency set in the company's accounting platform. -// -// - `XUA` - ADB Unit of Account -// - `AFN` - Afghan Afghani -// - `AFA` - Afghan Afghani (1927–2002) -// - `ALL` - Albanian Lek -// - `ALK` - Albanian Lek (1946–1965) -// - `DZD` - Algerian Dinar -// - `ADP` - Andorran Peseta -// - `AOA` - Angolan Kwanza -// - `AOK` - Angolan Kwanza (1977–1991) -// - `AON` - Angolan New Kwanza (1990–2000) -// - `AOR` - Angolan Readjusted Kwanza (1995–1999) -// - `ARA` - Argentine Austral -// - `ARS` - Argentine Peso -// - `ARM` - Argentine Peso (1881–1970) -// - `ARP` - Argentine Peso (1983–1985) -// - `ARL` - Argentine Peso Ley (1970–1983) -// - `AMD` - Armenian Dram -// - `AWG` - Aruban Florin -// - `AUD` - Australian Dollar -// - `ATS` - Austrian Schilling -// - `AZN` - Azerbaijani Manat -// - `AZM` - Azerbaijani Manat (1993–2006) -// - `BSD` - Bahamian Dollar -// - `BHD` - Bahraini Dinar -// - `BDT` - Bangladeshi Taka -// - `BBD` - Barbadian Dollar -// - `BYN` - Belarusian Ruble -// - `BYB` - Belarusian Ruble (1994–1999) -// - `BYR` - Belarusian Ruble (2000–2016) -// - `BEF` - Belgian Franc -// - `BEC` - Belgian Franc (convertible) -// - `BEL` - Belgian Franc (financial) -// - `BZD` - Belize Dollar -// - `BMD` - Bermudan Dollar -// - `BTN` - Bhutanese Ngultrum -// - `BOB` - Bolivian Boliviano -// - `BOL` - Bolivian Boliviano (1863–1963) -// - `BOV` - Bolivian Mvdol -// - `BOP` - Bolivian Peso -// - `BAM` - Bosnia-Herzegovina Convertible Mark -// - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) -// - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) -// - `BWP` - Botswanan Pula -// - `BRC` - Brazilian Cruzado (1986–1989) -// - `BRZ` - Brazilian Cruzeiro (1942–1967) -// - `BRE` - Brazilian Cruzeiro (1990–1993) -// - `BRR` - Brazilian Cruzeiro (1993–1994) -// - `BRN` - Brazilian New Cruzado (1989–1990) -// - `BRB` - Brazilian New Cruzeiro (1967–1986) -// - `BRL` - Brazilian Real -// - `GBP` - British Pound -// - `BND` - Brunei Dollar -// - `BGL` - Bulgarian Hard Lev -// - `BGN` - Bulgarian Lev -// - `BGO` - Bulgarian Lev (1879–1952) -// - `BGM` - Bulgarian Socialist Lev -// - `BUK` - Burmese Kyat -// - `BIF` - Burundian Franc -// - `XPF` - CFP Franc -// - `KHR` - Cambodian Riel -// - `CAD` - Canadian Dollar -// - `CVE` - Cape Verdean Escudo -// - `KYD` - Cayman Islands Dollar -// - `XAF` - Central African CFA Franc -// - `CLE` - Chilean Escudo -// - `CLP` - Chilean Peso -// - `CLF` - Chilean Unit of Account (UF) -// - `CNX` - Chinese People’s Bank Dollar -// - `CNY` - Chinese Yuan -// - `CNH` - Chinese Yuan (offshore) -// - `COP` - Colombian Peso -// - `COU` - Colombian Real Value Unit -// - `KMF` - Comorian Franc -// - `CDF` - Congolese Franc -// - `CRC` - Costa Rican Colón -// - `HRD` - Croatian Dinar -// - `HRK` - Croatian Kuna -// - `CUC` - Cuban Convertible Peso -// - `CUP` - Cuban Peso -// - `CYP` - Cypriot Pound -// - `CZK` - Czech Koruna -// - `CSK` - Czechoslovak Hard Koruna -// - `DKK` - Danish Krone -// - `DJF` - Djiboutian Franc -// - `DOP` - Dominican Peso -// - `NLG` - Dutch Guilder -// - `XCD` - East Caribbean Dollar -// - `DDM` - East German Mark -// - `ECS` - Ecuadorian Sucre -// - `ECV` - Ecuadorian Unit of Constant Value -// - `EGP` - Egyptian Pound -// - `GQE` - Equatorial Guinean Ekwele -// - `ERN` - Eritrean Nakfa -// - `EEK` - Estonian Kroon -// - `ETB` - Ethiopian Birr -// - `EUR` - Euro -// - `XBA` - European Composite Unit -// - `XEU` - European Currency Unit -// - `XBB` - European Monetary Unit -// - `XBC` - European Unit of Account (XBC) -// - `XBD` - European Unit of Account (XBD) -// - `FKP` - Falkland Islands Pound -// - `FJD` - Fijian Dollar -// - `FIM` - Finnish Markka -// - `FRF` - French Franc -// - `XFO` - French Gold Franc -// - `XFU` - French UIC-Franc -// - `GMD` - Gambian Dalasi -// - `GEK` - Georgian Kupon Larit -// - `GEL` - Georgian Lari -// - `DEM` - German Mark -// - `GHS` - Ghanaian Cedi -// - `GHC` - Ghanaian Cedi (1979–2007) -// - `GIP` - Gibraltar Pound -// - `XAU` - Gold -// - `GRD` - Greek Drachma -// - `GTQ` - Guatemalan Quetzal -// - `GWP` - Guinea-Bissau Peso -// - `GNF` - Guinean Franc -// - `GNS` - Guinean Syli -// - `GYD` - Guyanaese Dollar -// - `HTG` - Haitian Gourde -// - `HNL` - Honduran Lempira -// - `HKD` - Hong Kong Dollar -// - `HUF` - Hungarian Forint -// - `IMP` - IMP -// - `ISK` - Icelandic Króna -// - `ISJ` - Icelandic Króna (1918–1981) -// - `INR` - Indian Rupee -// - `IDR` - Indonesian Rupiah -// - `IRR` - Iranian Rial -// - `IQD` - Iraqi Dinar -// - `IEP` - Irish Pound -// - `ILS` - Israeli New Shekel -// - `ILP` - Israeli Pound -// - `ILR` - Israeli Shekel (1980–1985) -// - `ITL` - Italian Lira -// - `JMD` - Jamaican Dollar -// - `JPY` - Japanese Yen -// - `JOD` - Jordanian Dinar -// - `KZT` - Kazakhstani Tenge -// - `KES` - Kenyan Shilling -// - `KWD` - Kuwaiti Dinar -// - `KGS` - Kyrgystani Som -// - `LAK` - Laotian Kip -// - `LVL` - Latvian Lats -// - `LVR` - Latvian Ruble -// - `LBP` - Lebanese Pound -// - `LSL` - Lesotho Loti -// - `LRD` - Liberian Dollar -// - `LYD` - Libyan Dinar -// - `LTL` - Lithuanian Litas -// - `LTT` - Lithuanian Talonas -// - `LUL` - Luxembourg Financial Franc -// - `LUC` - Luxembourgian Convertible Franc -// - `LUF` - Luxembourgian Franc -// - `MOP` - Macanese Pataca -// - `MKD` - Macedonian Denar -// - `MKN` - Macedonian Denar (1992–1993) -// - `MGA` - Malagasy Ariary -// - `MGF` - Malagasy Franc -// - `MWK` - Malawian Kwacha -// - `MYR` - Malaysian Ringgit -// - `MVR` - Maldivian Rufiyaa -// - `MVP` - Maldivian Rupee (1947–1981) -// - `MLF` - Malian Franc -// - `MTL` - Maltese Lira -// - `MTP` - Maltese Pound -// - `MRU` - Mauritanian Ouguiya -// - `MRO` - Mauritanian Ouguiya (1973–2017) -// - `MUR` - Mauritian Rupee -// - `MXV` - Mexican Investment Unit -// - `MXN` - Mexican Peso -// - `MXP` - Mexican Silver Peso (1861–1992) -// - `MDC` - Moldovan Cupon -// - `MDL` - Moldovan Leu -// - `MCF` - Monegasque Franc -// - `MNT` - Mongolian Tugrik -// - `MAD` - Moroccan Dirham -// - `MAF` - Moroccan Franc -// - `MZE` - Mozambican Escudo -// - `MZN` - Mozambican Metical -// - `MZM` - Mozambican Metical (1980–2006) -// - `MMK` - Myanmar Kyat -// - `NAD` - Namibian Dollar -// - `NPR` - Nepalese Rupee -// - `ANG` - Netherlands Antillean Guilder -// - `TWD` - New Taiwan Dollar -// - `NZD` - New Zealand Dollar -// - `NIO` - Nicaraguan Córdoba -// - `NIC` - Nicaraguan Córdoba (1988–1991) -// - `NGN` - Nigerian Naira -// - `KPW` - North Korean Won -// - `NOK` - Norwegian Krone -// - `OMR` - Omani Rial -// - `PKR` - Pakistani Rupee -// - `XPD` - Palladium -// - `PAB` - Panamanian Balboa -// - `PGK` - Papua New Guinean Kina -// - `PYG` - Paraguayan Guarani -// - `PEI` - Peruvian Inti -// - `PEN` - Peruvian Sol -// - `PES` - Peruvian Sol (1863–1965) -// - `PHP` - Philippine Peso -// - `XPT` - Platinum -// - `PLN` - Polish Zloty -// - `PLZ` - Polish Zloty (1950–1995) -// - `PTE` - Portuguese Escudo -// - `GWE` - Portuguese Guinea Escudo -// - `QAR` - Qatari Rial -// - `XRE` - RINET Funds -// - `RHD` - Rhodesian Dollar -// - `RON` - Romanian Leu -// - `ROL` - Romanian Leu (1952–2006) -// - `RUB` - Russian Ruble -// - `RUR` - Russian Ruble (1991–1998) -// - `RWF` - Rwandan Franc -// - `SVC` - Salvadoran Colón -// - `WST` - Samoan Tala -// - `SAR` - Saudi Riyal -// - `RSD` - Serbian Dinar -// - `CSD` - Serbian Dinar (2002–2006) -// - `SCR` - Seychellois Rupee -// - `SLL` - Sierra Leonean Leone -// - `XAG` - Silver -// - `SGD` - Singapore Dollar -// - `SKK` - Slovak Koruna -// - `SIT` - Slovenian Tolar -// - `SBD` - Solomon Islands Dollar -// - `SOS` - Somali Shilling -// - `ZAR` - South African Rand -// - `ZAL` - South African Rand (financial) -// - `KRH` - South Korean Hwan (1953–1962) -// - `KRW` - South Korean Won -// - `KRO` - South Korean Won (1945–1953) -// - `SSP` - South Sudanese Pound -// - `SUR` - Soviet Rouble -// - `ESP` - Spanish Peseta -// - `ESA` - Spanish Peseta (A account) -// - `ESB` - Spanish Peseta (convertible account) -// - `XDR` - Special Drawing Rights -// - `LKR` - Sri Lankan Rupee -// - `SHP` - St. Helena Pound -// - `XSU` - Sucre -// - `SDD` - Sudanese Dinar (1992–2007) -// - `SDG` - Sudanese Pound -// - `SDP` - Sudanese Pound (1957–1998) -// - `SRD` - Surinamese Dollar -// - `SRG` - Surinamese Guilder -// - `SZL` - Swazi Lilangeni -// - `SEK` - Swedish Krona -// - `CHF` - Swiss Franc -// - `SYP` - Syrian Pound -// - `STN` - São Tomé & Príncipe Dobra -// - `STD` - São Tomé & Príncipe Dobra (1977–2017) -// - `TVD` - TVD -// - `TJR` - Tajikistani Ruble -// - `TJS` - Tajikistani Somoni -// - `TZS` - Tanzanian Shilling -// - `XTS` - Testing Currency Code -// - `THB` - Thai Baht -// - `XXX` - The codes assigned for transactions where no currency is involved -// - `TPE` - Timorese Escudo -// - `TOP` - Tongan Paʻanga -// - `TTD` - Trinidad & Tobago Dollar -// - `TND` - Tunisian Dinar -// - `TRY` - Turkish Lira -// - `TRL` - Turkish Lira (1922–2005) -// - `TMT` - Turkmenistani Manat -// - `TMM` - Turkmenistani Manat (1993–2009) -// - `USD` - US Dollar -// - `USN` - US Dollar (Next day) -// - `USS` - US Dollar (Same day) -// - `UGX` - Ugandan Shilling -// - `UGS` - Ugandan Shilling (1966–1987) -// - `UAH` - Ukrainian Hryvnia -// - `UAK` - Ukrainian Karbovanets -// - `AED` - United Arab Emirates Dirham -// - `UYW` - Uruguayan Nominal Wage Index Unit -// - `UYU` - Uruguayan Peso -// - `UYP` - Uruguayan Peso (1975–1993) -// - `UYI` - Uruguayan Peso (Indexed Units) -// - `UZS` - Uzbekistani Som -// - `VUV` - Vanuatu Vatu -// - `VES` - Venezuelan Bolívar -// - `VEB` - Venezuelan Bolívar (1871–2008) -// - `VEF` - Venezuelan Bolívar (2008–2018) -// - `VND` - Vietnamese Dong -// - `VNN` - Vietnamese Dong (1978–1985) -// - `CHE` - WIR Euro -// - `CHW` - WIR Franc -// - `XOF` - West African CFA Franc -// - `YDD` - Yemeni Dinar -// - `YER` - Yemeni Rial -// - `YUN` - Yugoslavian Convertible Dinar (1990–1992) -// - `YUD` - Yugoslavian Hard Dinar (1966–1990) -// - `YUM` - Yugoslavian New Dinar (1994–2002) -// - `YUR` - Yugoslavian Reformed Dinar (1992–1993) -// - `ZWN` - ZWN -// - `ZRN` - Zairean New Zaire (1993–1998) -// - `ZRZ` - Zairean Zaire (1971–1993) -// - `ZMW` - Zambian Kwacha -// - `ZMK` - Zambian Kwacha (1968–2012) -// - `ZWD` - Zimbabwean Dollar (1980–2008) -// - `ZWR` - Zimbabwean Dollar (2008) -// - `ZWL` - Zimbabwean Dollar (2009) -type CompanyInfoCurrency struct { - typeName string - TransactionCurrencyEnum TransactionCurrencyEnum - String string -} - -func NewCompanyInfoCurrencyFromTransactionCurrencyEnum(value TransactionCurrencyEnum) *CompanyInfoCurrency { - return &CompanyInfoCurrency{typeName: "transactionCurrencyEnum", TransactionCurrencyEnum: value} -} - -func NewCompanyInfoCurrencyFromString(value string) *CompanyInfoCurrency { - return &CompanyInfoCurrency{typeName: "string", String: value} -} - -func (c *CompanyInfoCurrency) UnmarshalJSON(data []byte) error { - var valueTransactionCurrencyEnum TransactionCurrencyEnum - if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { - c.typeName = "transactionCurrencyEnum" - c.TransactionCurrencyEnum = valueTransactionCurrencyEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - c.typeName = "string" - c.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, c) -} - -func (c CompanyInfoCurrency) MarshalJSON() ([]byte, error) { - switch c.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "transactionCurrencyEnum": - return json.Marshal(c.TransactionCurrencyEnum) - case "string": - return json.Marshal(c.String) +func (c *ContactStatus) Accept(visitor ContactStatusVisitor) error { + if c.typ == "Status7D1Enum" || c.Status7D1Enum != "" { + return visitor.VisitStatus7D1Enum(c.Status7D1Enum) } -} - -type CompanyInfoCurrencyVisitor interface { - VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error - VisitString(string) error -} - -func (c *CompanyInfoCurrency) Accept(visitor CompanyInfoCurrencyVisitor) error { - switch c.typeName { - default: - return fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "transactionCurrencyEnum": - return visitor.VisitTransactionCurrencyEnum(c.TransactionCurrencyEnum) - case "string": + if c.typ == "String" || c.String != "" { return visitor.VisitString(c.String) } -} - -// - `SALES` - SALES -// - `PURCHASE` - PURCHASE -type ComponentTypeEnum string + return fmt.Errorf("type %T does not include a non-empty union type", c) +} + +// * `AF` - Afghanistan +// * `AX` - Åland Islands +// * `AL` - Albania +// * `DZ` - Algeria +// * `AS` - American Samoa +// * `AD` - Andorra +// * `AO` - Angola +// * `AI` - Anguilla +// * `AQ` - Antarctica +// * `AG` - Antigua and Barbuda +// * `AR` - Argentina +// * `AM` - Armenia +// * `AW` - Aruba +// * `AU` - Australia +// * `AT` - Austria +// * `AZ` - Azerbaijan +// * `BS` - Bahamas +// * `BH` - Bahrain +// * `BD` - Bangladesh +// * `BB` - Barbados +// * `BY` - Belarus +// * `BE` - Belgium +// * `BZ` - Belize +// * `BJ` - Benin +// * `BM` - Bermuda +// * `BT` - Bhutan +// * `BO` - Bolivia +// * `BQ` - Bonaire, Sint Eustatius and Saba +// * `BA` - Bosnia and Herzegovina +// * `BW` - Botswana +// * `BV` - Bouvet Island +// * `BR` - Brazil +// * `IO` - British Indian Ocean Territory +// * `BN` - Brunei +// * `BG` - Bulgaria +// * `BF` - Burkina Faso +// * `BI` - Burundi +// * `CV` - Cabo Verde +// * `KH` - Cambodia +// * `CM` - Cameroon +// * `CA` - Canada +// * `KY` - Cayman Islands +// * `CF` - Central African Republic +// * `TD` - Chad +// * `CL` - Chile +// * `CN` - China +// * `CX` - Christmas Island +// * `CC` - Cocos (Keeling) Islands +// * `CO` - Colombia +// * `KM` - Comoros +// * `CG` - Congo +// * `CD` - Congo (the Democratic Republic of the) +// * `CK` - Cook Islands +// * `CR` - Costa Rica +// * `CI` - Côte d'Ivoire +// * `HR` - Croatia +// * `CU` - Cuba +// * `CW` - Curaçao +// * `CY` - Cyprus +// * `CZ` - Czechia +// * `DK` - Denmark +// * `DJ` - Djibouti +// * `DM` - Dominica +// * `DO` - Dominican Republic +// * `EC` - Ecuador +// * `EG` - Egypt +// * `SV` - El Salvador +// * `GQ` - Equatorial Guinea +// * `ER` - Eritrea +// * `EE` - Estonia +// * `SZ` - Eswatini +// * `ET` - Ethiopia +// * `FK` - Falkland Islands (Malvinas) +// * `FO` - Faroe Islands +// * `FJ` - Fiji +// * `FI` - Finland +// * `FR` - France +// * `GF` - French Guiana +// * `PF` - French Polynesia +// * `TF` - French Southern Territories +// * `GA` - Gabon +// * `GM` - Gambia +// * `GE` - Georgia +// * `DE` - Germany +// * `GH` - Ghana +// * `GI` - Gibraltar +// * `GR` - Greece +// * `GL` - Greenland +// * `GD` - Grenada +// * `GP` - Guadeloupe +// * `GU` - Guam +// * `GT` - Guatemala +// * `GG` - Guernsey +// * `GN` - Guinea +// * `GW` - Guinea-Bissau +// * `GY` - Guyana +// * `HT` - Haiti +// * `HM` - Heard Island and McDonald Islands +// * `VA` - Holy See +// * `HN` - Honduras +// * `HK` - Hong Kong +// * `HU` - Hungary +// * `IS` - Iceland +// * `IN` - India +// * `ID` - Indonesia +// * `IR` - Iran +// * `IQ` - Iraq +// * `IE` - Ireland +// * `IM` - Isle of Man +// * `IL` - Israel +// * `IT` - Italy +// * `JM` - Jamaica +// * `JP` - Japan +// * `JE` - Jersey +// * `JO` - Jordan +// * `KZ` - Kazakhstan +// * `KE` - Kenya +// * `KI` - Kiribati +// * `KW` - Kuwait +// * `KG` - Kyrgyzstan +// * `LA` - Laos +// * `LV` - Latvia +// * `LB` - Lebanon +// * `LS` - Lesotho +// * `LR` - Liberia +// * `LY` - Libya +// * `LI` - Liechtenstein +// * `LT` - Lithuania +// * `LU` - Luxembourg +// * `MO` - Macao +// * `MG` - Madagascar +// * `MW` - Malawi +// * `MY` - Malaysia +// * `MV` - Maldives +// * `ML` - Mali +// * `MT` - Malta +// * `MH` - Marshall Islands +// * `MQ` - Martinique +// * `MR` - Mauritania +// * `MU` - Mauritius +// * `YT` - Mayotte +// * `MX` - Mexico +// * `FM` - Micronesia (Federated States of) +// * `MD` - Moldova +// * `MC` - Monaco +// * `MN` - Mongolia +// * `ME` - Montenegro +// * `MS` - Montserrat +// * `MA` - Morocco +// * `MZ` - Mozambique +// * `MM` - Myanmar +// * `NA` - Namibia +// * `NR` - Nauru +// * `NP` - Nepal +// * `NL` - Netherlands +// * `NC` - New Caledonia +// * `NZ` - New Zealand +// * `NI` - Nicaragua +// * `NE` - Niger +// * `NG` - Nigeria +// * `NU` - Niue +// * `NF` - Norfolk Island +// * `KP` - North Korea +// * `MK` - North Macedonia +// * `MP` - Northern Mariana Islands +// * `NO` - Norway +// * `OM` - Oman +// * `PK` - Pakistan +// * `PW` - Palau +// * `PS` - Palestine, State of +// * `PA` - Panama +// * `PG` - Papua New Guinea +// * `PY` - Paraguay +// * `PE` - Peru +// * `PH` - Philippines +// * `PN` - Pitcairn +// * `PL` - Poland +// * `PT` - Portugal +// * `PR` - Puerto Rico +// * `QA` - Qatar +// * `RE` - Réunion +// * `RO` - Romania +// * `RU` - Russia +// * `RW` - Rwanda +// * `BL` - Saint Barthélemy +// * `SH` - Saint Helena, Ascension and Tristan da Cunha +// * `KN` - Saint Kitts and Nevis +// * `LC` - Saint Lucia +// * `MF` - Saint Martin (French part) +// * `PM` - Saint Pierre and Miquelon +// * `VC` - Saint Vincent and the Grenadines +// * `WS` - Samoa +// * `SM` - San Marino +// * `ST` - Sao Tome and Principe +// * `SA` - Saudi Arabia +// * `SN` - Senegal +// * `RS` - Serbia +// * `SC` - Seychelles +// * `SL` - Sierra Leone +// * `SG` - Singapore +// * `SX` - Sint Maarten (Dutch part) +// * `SK` - Slovakia +// * `SI` - Slovenia +// * `SB` - Solomon Islands +// * `SO` - Somalia +// * `ZA` - South Africa +// * `GS` - South Georgia and the South Sandwich Islands +// * `KR` - South Korea +// * `SS` - South Sudan +// * `ES` - Spain +// * `LK` - Sri Lanka +// * `SD` - Sudan +// * `SR` - Suriname +// * `SJ` - Svalbard and Jan Mayen +// * `SE` - Sweden +// * `CH` - Switzerland +// * `SY` - Syria +// * `TW` - Taiwan +// * `TJ` - Tajikistan +// * `TZ` - Tanzania +// * `TH` - Thailand +// * `TL` - Timor-Leste +// * `TG` - Togo +// * `TK` - Tokelau +// * `TO` - Tonga +// * `TT` - Trinidad and Tobago +// * `TN` - Tunisia +// * `TR` - Turkey +// * `TM` - Turkmenistan +// * `TC` - Turks and Caicos Islands +// * `TV` - Tuvalu +// * `UG` - Uganda +// * `UA` - Ukraine +// * `AE` - United Arab Emirates +// * `GB` - United Kingdom +// * `UM` - United States Minor Outlying Islands +// * `US` - United States of America +// * `UY` - Uruguay +// * `UZ` - Uzbekistan +// * `VU` - Vanuatu +// * `VE` - Venezuela +// * `VN` - Vietnam +// * `VG` - Virgin Islands (British) +// * `VI` - Virgin Islands (U.S.) +// * `WF` - Wallis and Futuna +// * `EH` - Western Sahara +// * `YE` - Yemen +// * `ZM` - Zambia +// * `ZW` - Zimbabwe +type CountryEnum string const ( - ComponentTypeEnumSales ComponentTypeEnum = "SALES" - ComponentTypeEnumPurchase ComponentTypeEnum = "PURCHASE" -) - -func NewComponentTypeEnumFromString(s string) (ComponentTypeEnum, error) { - switch s { - case "SALES": - return ComponentTypeEnumSales, nil - case "PURCHASE": - return ComponentTypeEnumPurchase, nil - } - var t ComponentTypeEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (c ComponentTypeEnum) Ptr() *ComponentTypeEnum { - return &c -} - -// # The Contact Object -// -// ### Description -// -// A `Contact` is an individual or business entity to which products and services are sold to or purchased from. The `Contact` model contains both Customers, in which products and services are sold to, and Vendors (or Suppliers), in which products and services are purchased from. -// -// - A `Contact` is a Vendor/Supplier if the `is_supplier` property is true. -// - A `Contact` is a customer if the `is_customer` property is true. -// -// ### Usage Example -// -// Fetch from the `LIST Contacts` endpoint and view a company's contacts. -type Contact struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The contact's name. - Name *string `json:"name,omitempty"` - // Whether the contact is a supplier. - IsSupplier *bool `json:"is_supplier,omitempty"` - // Whether the contact is a customer. - IsCustomer *bool `json:"is_customer,omitempty"` - // The contact's email address. - EmailAddress *string `json:"email_address,omitempty"` - // The contact's tax number. - TaxNumber *string `json:"tax_number,omitempty"` - // The contact's status - // - // - `ACTIVE` - ACTIVE - // - `ARCHIVED` - ARCHIVED - Status *ContactStatus `json:"status,omitempty"` - // The currency the contact's transactions are in. - Currency *string `json:"currency,omitempty"` - // When the third party's contact was updated. - RemoteUpdatedAt *time.Time `json:"remote_updated_at,omitempty"` - // The company the contact belongs to. - Company *string `json:"company,omitempty"` - // `Address` object IDs for the given `Contacts` object. - Addresses []*ContactAddressesItem `json:"addresses,omitempty"` - // `AccountingPhoneNumber` object for the given `Contacts` object. - PhoneNumbers []*AccountingPhoneNumber `json:"phone_numbers,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` - RemoteFields []*RemoteField `json:"remote_fields,omitempty"` - - _rawJSON json.RawMessage -} - -func (c *Contact) UnmarshalJSON(data []byte) error { - type unmarshaler Contact - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *c = Contact(value) - c._rawJSON = json.RawMessage(data) - return nil -} - -func (c *Contact) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(c); err == nil { - return value - } - return fmt.Sprintf("%#v", c) -} - -type ContactAddressesItem struct { - typeName string - String string - Address *Address -} - -func NewContactAddressesItemFromString(value string) *ContactAddressesItem { - return &ContactAddressesItem{typeName: "string", String: value} -} - -func NewContactAddressesItemFromAddress(value *Address) *ContactAddressesItem { - return &ContactAddressesItem{typeName: "address", Address: value} -} - -func (c *ContactAddressesItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - c.typeName = "string" - c.String = valueString - return nil - } - valueAddress := new(Address) - if err := json.Unmarshal(data, &valueAddress); err == nil { - c.typeName = "address" - c.Address = valueAddress - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, c) -} - -func (c ContactAddressesItem) MarshalJSON() ([]byte, error) { - switch c.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return json.Marshal(c.String) - case "address": - return json.Marshal(c.Address) - } -} - -type ContactAddressesItemVisitor interface { - VisitString(string) error - VisitAddress(*Address) error -} - -func (c *ContactAddressesItem) Accept(visitor ContactAddressesItemVisitor) error { - switch c.typeName { - default: - return fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return visitor.VisitString(c.String) - case "address": - return visitor.VisitAddress(c.Address) - } -} - -// # The Contact Object -// -// ### Description -// -// A `Contact` is an individual or business entity to which products and services are sold to or purchased from. The `Contact` model contains both Customers, in which products and services are sold to, and Vendors (or Suppliers), in which products and services are purchased from. -// -// - A `Contact` is a Vendor/Supplier if the `is_supplier` property is true. -// - A `Contact` is a customer if the `is_customer` property is true. -// -// ### Usage Example -// -// Fetch from the `LIST Contacts` endpoint and view a company's contacts. -type ContactRequest struct { - // The contact's name. - Name *string `json:"name,omitempty"` - // Whether the contact is a supplier. - IsSupplier *bool `json:"is_supplier,omitempty"` - // Whether the contact is a customer. - IsCustomer *bool `json:"is_customer,omitempty"` - // The contact's email address. - EmailAddress *string `json:"email_address,omitempty"` - // The contact's tax number. - TaxNumber *string `json:"tax_number,omitempty"` - // The contact's status - // - // - `ACTIVE` - ACTIVE - // - `ARCHIVED` - ARCHIVED - Status *ContactRequestStatus `json:"status,omitempty"` - // The currency the contact's transactions are in. - Currency *string `json:"currency,omitempty"` - // The company the contact belongs to. - Company *string `json:"company,omitempty"` - // `Address` object IDs for the given `Contacts` object. - Addresses []*ContactRequestAddressesItem `json:"addresses,omitempty"` - // `AccountingPhoneNumber` object for the given `Contacts` object. - PhoneNumbers []*AccountingPhoneNumberRequest `json:"phone_numbers,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` - RemoteFields []*RemoteFieldRequest `json:"remote_fields,omitempty"` - - _rawJSON json.RawMessage -} - -func (c *ContactRequest) UnmarshalJSON(data []byte) error { - type unmarshaler ContactRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *c = ContactRequest(value) - c._rawJSON = json.RawMessage(data) - return nil -} - -func (c *ContactRequest) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(c); err == nil { - return value - } - return fmt.Sprintf("%#v", c) -} - -type ContactRequestAddressesItem struct { - typeName string - String string - Address *Address -} - -func NewContactRequestAddressesItemFromString(value string) *ContactRequestAddressesItem { - return &ContactRequestAddressesItem{typeName: "string", String: value} -} - -func NewContactRequestAddressesItemFromAddress(value *Address) *ContactRequestAddressesItem { - return &ContactRequestAddressesItem{typeName: "address", Address: value} -} - -func (c *ContactRequestAddressesItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - c.typeName = "string" - c.String = valueString - return nil - } - valueAddress := new(Address) - if err := json.Unmarshal(data, &valueAddress); err == nil { - c.typeName = "address" - c.Address = valueAddress - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, c) -} - -func (c ContactRequestAddressesItem) MarshalJSON() ([]byte, error) { - switch c.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return json.Marshal(c.String) - case "address": - return json.Marshal(c.Address) - } -} - -type ContactRequestAddressesItemVisitor interface { - VisitString(string) error - VisitAddress(*Address) error -} - -func (c *ContactRequestAddressesItem) Accept(visitor ContactRequestAddressesItemVisitor) error { - switch c.typeName { - default: - return fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return visitor.VisitString(c.String) - case "address": - return visitor.VisitAddress(c.Address) - } -} - -// The contact's status -// -// - `ACTIVE` - ACTIVE -// - `ARCHIVED` - ARCHIVED -type ContactRequestStatus struct { - typeName string - Status7D1Enum Status7D1Enum - String string -} - -func NewContactRequestStatusFromStatus7D1Enum(value Status7D1Enum) *ContactRequestStatus { - return &ContactRequestStatus{typeName: "status7D1Enum", Status7D1Enum: value} -} - -func NewContactRequestStatusFromString(value string) *ContactRequestStatus { - return &ContactRequestStatus{typeName: "string", String: value} -} - -func (c *ContactRequestStatus) UnmarshalJSON(data []byte) error { - var valueStatus7D1Enum Status7D1Enum - if err := json.Unmarshal(data, &valueStatus7D1Enum); err == nil { - c.typeName = "status7D1Enum" - c.Status7D1Enum = valueStatus7D1Enum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - c.typeName = "string" - c.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, c) -} - -func (c ContactRequestStatus) MarshalJSON() ([]byte, error) { - switch c.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "status7D1Enum": - return json.Marshal(c.Status7D1Enum) - case "string": - return json.Marshal(c.String) - } -} - -type ContactRequestStatusVisitor interface { - VisitStatus7D1Enum(Status7D1Enum) error - VisitString(string) error -} - -func (c *ContactRequestStatus) Accept(visitor ContactRequestStatusVisitor) error { - switch c.typeName { - default: - return fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "status7D1Enum": - return visitor.VisitStatus7D1Enum(c.Status7D1Enum) - case "string": - return visitor.VisitString(c.String) - } -} - -type ContactResponse struct { - Model *Contact `json:"model,omitempty"` - Warnings []*WarningValidationProblem `json:"warnings,omitempty"` - Errors []*ErrorValidationProblem `json:"errors,omitempty"` - Logs []*DebugModeLog `json:"logs,omitempty"` - - _rawJSON json.RawMessage -} - -func (c *ContactResponse) UnmarshalJSON(data []byte) error { - type unmarshaler ContactResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *c = ContactResponse(value) - c._rawJSON = json.RawMessage(data) - return nil -} - -func (c *ContactResponse) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(c); err == nil { - return value - } - return fmt.Sprintf("%#v", c) -} - -// The contact's status -// -// - `ACTIVE` - ACTIVE -// - `ARCHIVED` - ARCHIVED -type ContactStatus struct { - typeName string - Status7D1Enum Status7D1Enum - String string -} - -func NewContactStatusFromStatus7D1Enum(value Status7D1Enum) *ContactStatus { - return &ContactStatus{typeName: "status7D1Enum", Status7D1Enum: value} -} - -func NewContactStatusFromString(value string) *ContactStatus { - return &ContactStatus{typeName: "string", String: value} -} - -func (c *ContactStatus) UnmarshalJSON(data []byte) error { - var valueStatus7D1Enum Status7D1Enum - if err := json.Unmarshal(data, &valueStatus7D1Enum); err == nil { - c.typeName = "status7D1Enum" - c.Status7D1Enum = valueStatus7D1Enum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - c.typeName = "string" - c.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, c) -} - -func (c ContactStatus) MarshalJSON() ([]byte, error) { - switch c.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "status7D1Enum": - return json.Marshal(c.Status7D1Enum) - case "string": - return json.Marshal(c.String) - } -} - -type ContactStatusVisitor interface { - VisitStatus7D1Enum(Status7D1Enum) error - VisitString(string) error -} - -func (c *ContactStatus) Accept(visitor ContactStatusVisitor) error { - switch c.typeName { - default: - return fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "status7D1Enum": - return visitor.VisitStatus7D1Enum(c.Status7D1Enum) - case "string": - return visitor.VisitString(c.String) - } -} - -// - `AF` - Afghanistan -// - `AX` - Åland Islands -// - `AL` - Albania -// - `DZ` - Algeria -// - `AS` - American Samoa -// - `AD` - Andorra -// - `AO` - Angola -// - `AI` - Anguilla -// - `AQ` - Antarctica -// - `AG` - Antigua and Barbuda -// - `AR` - Argentina -// - `AM` - Armenia -// - `AW` - Aruba -// - `AU` - Australia -// - `AT` - Austria -// - `AZ` - Azerbaijan -// - `BS` - Bahamas -// - `BH` - Bahrain -// - `BD` - Bangladesh -// - `BB` - Barbados -// - `BY` - Belarus -// - `BE` - Belgium -// - `BZ` - Belize -// - `BJ` - Benin -// - `BM` - Bermuda -// - `BT` - Bhutan -// - `BO` - Bolivia -// - `BQ` - Bonaire, Sint Eustatius and Saba -// - `BA` - Bosnia and Herzegovina -// - `BW` - Botswana -// - `BV` - Bouvet Island -// - `BR` - Brazil -// - `IO` - British Indian Ocean Territory -// - `BN` - Brunei -// - `BG` - Bulgaria -// - `BF` - Burkina Faso -// - `BI` - Burundi -// - `CV` - Cabo Verde -// - `KH` - Cambodia -// - `CM` - Cameroon -// - `CA` - Canada -// - `KY` - Cayman Islands -// - `CF` - Central African Republic -// - `TD` - Chad -// - `CL` - Chile -// - `CN` - China -// - `CX` - Christmas Island -// - `CC` - Cocos (Keeling) Islands -// - `CO` - Colombia -// - `KM` - Comoros -// - `CG` - Congo -// - `CD` - Congo (the Democratic Republic of the) -// - `CK` - Cook Islands -// - `CR` - Costa Rica -// - `CI` - Côte d'Ivoire -// - `HR` - Croatia -// - `CU` - Cuba -// - `CW` - Curaçao -// - `CY` - Cyprus -// - `CZ` - Czechia -// - `DK` - Denmark -// - `DJ` - Djibouti -// - `DM` - Dominica -// - `DO` - Dominican Republic -// - `EC` - Ecuador -// - `EG` - Egypt -// - `SV` - El Salvador -// - `GQ` - Equatorial Guinea -// - `ER` - Eritrea -// - `EE` - Estonia -// - `SZ` - Eswatini -// - `ET` - Ethiopia -// - `FK` - Falkland Islands (Malvinas) -// - `FO` - Faroe Islands -// - `FJ` - Fiji -// - `FI` - Finland -// - `FR` - France -// - `GF` - French Guiana -// - `PF` - French Polynesia -// - `TF` - French Southern Territories -// - `GA` - Gabon -// - `GM` - Gambia -// - `GE` - Georgia -// - `DE` - Germany -// - `GH` - Ghana -// - `GI` - Gibraltar -// - `GR` - Greece -// - `GL` - Greenland -// - `GD` - Grenada -// - `GP` - Guadeloupe -// - `GU` - Guam -// - `GT` - Guatemala -// - `GG` - Guernsey -// - `GN` - Guinea -// - `GW` - Guinea-Bissau -// - `GY` - Guyana -// - `HT` - Haiti -// - `HM` - Heard Island and McDonald Islands -// - `VA` - Holy See -// - `HN` - Honduras -// - `HK` - Hong Kong -// - `HU` - Hungary -// - `IS` - Iceland -// - `IN` - India -// - `ID` - Indonesia -// - `IR` - Iran -// - `IQ` - Iraq -// - `IE` - Ireland -// - `IM` - Isle of Man -// - `IL` - Israel -// - `IT` - Italy -// - `JM` - Jamaica -// - `JP` - Japan -// - `JE` - Jersey -// - `JO` - Jordan -// - `KZ` - Kazakhstan -// - `KE` - Kenya -// - `KI` - Kiribati -// - `KW` - Kuwait -// - `KG` - Kyrgyzstan -// - `LA` - Laos -// - `LV` - Latvia -// - `LB` - Lebanon -// - `LS` - Lesotho -// - `LR` - Liberia -// - `LY` - Libya -// - `LI` - Liechtenstein -// - `LT` - Lithuania -// - `LU` - Luxembourg -// - `MO` - Macao -// - `MG` - Madagascar -// - `MW` - Malawi -// - `MY` - Malaysia -// - `MV` - Maldives -// - `ML` - Mali -// - `MT` - Malta -// - `MH` - Marshall Islands -// - `MQ` - Martinique -// - `MR` - Mauritania -// - `MU` - Mauritius -// - `YT` - Mayotte -// - `MX` - Mexico -// - `FM` - Micronesia (Federated States of) -// - `MD` - Moldova -// - `MC` - Monaco -// - `MN` - Mongolia -// - `ME` - Montenegro -// - `MS` - Montserrat -// - `MA` - Morocco -// - `MZ` - Mozambique -// - `MM` - Myanmar -// - `NA` - Namibia -// - `NR` - Nauru -// - `NP` - Nepal -// - `NL` - Netherlands -// - `NC` - New Caledonia -// - `NZ` - New Zealand -// - `NI` - Nicaragua -// - `NE` - Niger -// - `NG` - Nigeria -// - `NU` - Niue -// - `NF` - Norfolk Island -// - `KP` - North Korea -// - `MK` - North Macedonia -// - `MP` - Northern Mariana Islands -// - `NO` - Norway -// - `OM` - Oman -// - `PK` - Pakistan -// - `PW` - Palau -// - `PS` - Palestine, State of -// - `PA` - Panama -// - `PG` - Papua New Guinea -// - `PY` - Paraguay -// - `PE` - Peru -// - `PH` - Philippines -// - `PN` - Pitcairn -// - `PL` - Poland -// - `PT` - Portugal -// - `PR` - Puerto Rico -// - `QA` - Qatar -// - `RE` - Réunion -// - `RO` - Romania -// - `RU` - Russia -// - `RW` - Rwanda -// - `BL` - Saint Barthélemy -// - `SH` - Saint Helena, Ascension and Tristan da Cunha -// - `KN` - Saint Kitts and Nevis -// - `LC` - Saint Lucia -// - `MF` - Saint Martin (French part) -// - `PM` - Saint Pierre and Miquelon -// - `VC` - Saint Vincent and the Grenadines -// - `WS` - Samoa -// - `SM` - San Marino -// - `ST` - Sao Tome and Principe -// - `SA` - Saudi Arabia -// - `SN` - Senegal -// - `RS` - Serbia -// - `SC` - Seychelles -// - `SL` - Sierra Leone -// - `SG` - Singapore -// - `SX` - Sint Maarten (Dutch part) -// - `SK` - Slovakia -// - `SI` - Slovenia -// - `SB` - Solomon Islands -// - `SO` - Somalia -// - `ZA` - South Africa -// - `GS` - South Georgia and the South Sandwich Islands -// - `KR` - South Korea -// - `SS` - South Sudan -// - `ES` - Spain -// - `LK` - Sri Lanka -// - `SD` - Sudan -// - `SR` - Suriname -// - `SJ` - Svalbard and Jan Mayen -// - `SE` - Sweden -// - `CH` - Switzerland -// - `SY` - Syria -// - `TW` - Taiwan -// - `TJ` - Tajikistan -// - `TZ` - Tanzania -// - `TH` - Thailand -// - `TL` - Timor-Leste -// - `TG` - Togo -// - `TK` - Tokelau -// - `TO` - Tonga -// - `TT` - Trinidad and Tobago -// - `TN` - Tunisia -// - `TR` - Turkey -// - `TM` - Turkmenistan -// - `TC` - Turks and Caicos Islands -// - `TV` - Tuvalu -// - `UG` - Uganda -// - `UA` - Ukraine -// - `AE` - United Arab Emirates -// - `GB` - United Kingdom -// - `UM` - United States Minor Outlying Islands -// - `US` - United States of America -// - `UY` - Uruguay -// - `UZ` - Uzbekistan -// - `VU` - Vanuatu -// - `VE` - Venezuela -// - `VN` - Vietnam -// - `VG` - Virgin Islands (British) -// - `VI` - Virgin Islands (U.S.) -// - `WF` - Wallis and Futuna -// - `EH` - Western Sahara -// - `YE` - Yemen -// - `ZM` - Zambia -// - `ZW` - Zimbabwe -type CountryEnum string - -const ( - CountryEnumAf CountryEnum = "AF" - CountryEnumAx CountryEnum = "AX" - CountryEnumAl CountryEnum = "AL" - CountryEnumDz CountryEnum = "DZ" - CountryEnumAs CountryEnum = "AS" - CountryEnumAd CountryEnum = "AD" - CountryEnumAo CountryEnum = "AO" - CountryEnumAi CountryEnum = "AI" - CountryEnumAq CountryEnum = "AQ" - CountryEnumAg CountryEnum = "AG" - CountryEnumAr CountryEnum = "AR" - CountryEnumAm CountryEnum = "AM" - CountryEnumAw CountryEnum = "AW" - CountryEnumAu CountryEnum = "AU" - CountryEnumAt CountryEnum = "AT" - CountryEnumAz CountryEnum = "AZ" - CountryEnumBs CountryEnum = "BS" - CountryEnumBh CountryEnum = "BH" - CountryEnumBd CountryEnum = "BD" - CountryEnumBb CountryEnum = "BB" - CountryEnumBy CountryEnum = "BY" - CountryEnumBe CountryEnum = "BE" - CountryEnumBz CountryEnum = "BZ" - CountryEnumBj CountryEnum = "BJ" - CountryEnumBm CountryEnum = "BM" - CountryEnumBt CountryEnum = "BT" - CountryEnumBo CountryEnum = "BO" - CountryEnumBq CountryEnum = "BQ" - CountryEnumBa CountryEnum = "BA" - CountryEnumBw CountryEnum = "BW" - CountryEnumBv CountryEnum = "BV" - CountryEnumBr CountryEnum = "BR" - CountryEnumIo CountryEnum = "IO" - CountryEnumBn CountryEnum = "BN" - CountryEnumBg CountryEnum = "BG" - CountryEnumBf CountryEnum = "BF" - CountryEnumBi CountryEnum = "BI" - CountryEnumCv CountryEnum = "CV" - CountryEnumKh CountryEnum = "KH" - CountryEnumCm CountryEnum = "CM" - CountryEnumCa CountryEnum = "CA" - CountryEnumKy CountryEnum = "KY" - CountryEnumCf CountryEnum = "CF" - CountryEnumTd CountryEnum = "TD" - CountryEnumCl CountryEnum = "CL" - CountryEnumCn CountryEnum = "CN" - CountryEnumCx CountryEnum = "CX" - CountryEnumCc CountryEnum = "CC" - CountryEnumCo CountryEnum = "CO" - CountryEnumKm CountryEnum = "KM" - CountryEnumCg CountryEnum = "CG" - CountryEnumCd CountryEnum = "CD" - CountryEnumCk CountryEnum = "CK" - CountryEnumCr CountryEnum = "CR" - CountryEnumCi CountryEnum = "CI" - CountryEnumHr CountryEnum = "HR" - CountryEnumCu CountryEnum = "CU" - CountryEnumCw CountryEnum = "CW" - CountryEnumCy CountryEnum = "CY" - CountryEnumCz CountryEnum = "CZ" - CountryEnumDk CountryEnum = "DK" - CountryEnumDj CountryEnum = "DJ" - CountryEnumDm CountryEnum = "DM" - CountryEnumDo CountryEnum = "DO" - CountryEnumEc CountryEnum = "EC" - CountryEnumEg CountryEnum = "EG" - CountryEnumSv CountryEnum = "SV" - CountryEnumGq CountryEnum = "GQ" - CountryEnumEr CountryEnum = "ER" - CountryEnumEe CountryEnum = "EE" - CountryEnumSz CountryEnum = "SZ" - CountryEnumEt CountryEnum = "ET" - CountryEnumFk CountryEnum = "FK" - CountryEnumFo CountryEnum = "FO" - CountryEnumFj CountryEnum = "FJ" - CountryEnumFi CountryEnum = "FI" - CountryEnumFr CountryEnum = "FR" - CountryEnumGf CountryEnum = "GF" - CountryEnumPf CountryEnum = "PF" - CountryEnumTf CountryEnum = "TF" - CountryEnumGa CountryEnum = "GA" - CountryEnumGm CountryEnum = "GM" - CountryEnumGe CountryEnum = "GE" - CountryEnumDe CountryEnum = "DE" - CountryEnumGh CountryEnum = "GH" - CountryEnumGi CountryEnum = "GI" - CountryEnumGr CountryEnum = "GR" - CountryEnumGl CountryEnum = "GL" - CountryEnumGd CountryEnum = "GD" - CountryEnumGp CountryEnum = "GP" - CountryEnumGu CountryEnum = "GU" - CountryEnumGt CountryEnum = "GT" - CountryEnumGg CountryEnum = "GG" - CountryEnumGn CountryEnum = "GN" - CountryEnumGw CountryEnum = "GW" - CountryEnumGy CountryEnum = "GY" - CountryEnumHt CountryEnum = "HT" - CountryEnumHm CountryEnum = "HM" - CountryEnumVa CountryEnum = "VA" - CountryEnumHn CountryEnum = "HN" - CountryEnumHk CountryEnum = "HK" - CountryEnumHu CountryEnum = "HU" - CountryEnumIs CountryEnum = "IS" - CountryEnumIn CountryEnum = "IN" - CountryEnumId CountryEnum = "ID" - CountryEnumIr CountryEnum = "IR" - CountryEnumIq CountryEnum = "IQ" - CountryEnumIe CountryEnum = "IE" - CountryEnumIm CountryEnum = "IM" - CountryEnumIl CountryEnum = "IL" - CountryEnumIt CountryEnum = "IT" - CountryEnumJm CountryEnum = "JM" - CountryEnumJp CountryEnum = "JP" - CountryEnumJe CountryEnum = "JE" - CountryEnumJo CountryEnum = "JO" - CountryEnumKz CountryEnum = "KZ" - CountryEnumKe CountryEnum = "KE" - CountryEnumKi CountryEnum = "KI" - CountryEnumKw CountryEnum = "KW" - CountryEnumKg CountryEnum = "KG" - CountryEnumLa CountryEnum = "LA" - CountryEnumLv CountryEnum = "LV" - CountryEnumLb CountryEnum = "LB" - CountryEnumLs CountryEnum = "LS" - CountryEnumLr CountryEnum = "LR" - CountryEnumLy CountryEnum = "LY" - CountryEnumLi CountryEnum = "LI" - CountryEnumLt CountryEnum = "LT" - CountryEnumLu CountryEnum = "LU" - CountryEnumMo CountryEnum = "MO" - CountryEnumMg CountryEnum = "MG" - CountryEnumMw CountryEnum = "MW" - CountryEnumMy CountryEnum = "MY" - CountryEnumMv CountryEnum = "MV" - CountryEnumMl CountryEnum = "ML" - CountryEnumMt CountryEnum = "MT" - CountryEnumMh CountryEnum = "MH" - CountryEnumMq CountryEnum = "MQ" - CountryEnumMr CountryEnum = "MR" - CountryEnumMu CountryEnum = "MU" - CountryEnumYt CountryEnum = "YT" - CountryEnumMx CountryEnum = "MX" - CountryEnumFm CountryEnum = "FM" - CountryEnumMd CountryEnum = "MD" - CountryEnumMc CountryEnum = "MC" - CountryEnumMn CountryEnum = "MN" - CountryEnumMe CountryEnum = "ME" - CountryEnumMs CountryEnum = "MS" - CountryEnumMa CountryEnum = "MA" - CountryEnumMz CountryEnum = "MZ" - CountryEnumMm CountryEnum = "MM" - CountryEnumNa CountryEnum = "NA" - CountryEnumNr CountryEnum = "NR" - CountryEnumNp CountryEnum = "NP" - CountryEnumNl CountryEnum = "NL" - CountryEnumNc CountryEnum = "NC" - CountryEnumNz CountryEnum = "NZ" - CountryEnumNi CountryEnum = "NI" - CountryEnumNe CountryEnum = "NE" - CountryEnumNg CountryEnum = "NG" - CountryEnumNu CountryEnum = "NU" - CountryEnumNf CountryEnum = "NF" - CountryEnumKp CountryEnum = "KP" - CountryEnumMk CountryEnum = "MK" - CountryEnumMp CountryEnum = "MP" - CountryEnumNo CountryEnum = "NO" - CountryEnumOm CountryEnum = "OM" - CountryEnumPk CountryEnum = "PK" - CountryEnumPw CountryEnum = "PW" - CountryEnumPs CountryEnum = "PS" - CountryEnumPa CountryEnum = "PA" - CountryEnumPg CountryEnum = "PG" - CountryEnumPy CountryEnum = "PY" - CountryEnumPe CountryEnum = "PE" - CountryEnumPh CountryEnum = "PH" - CountryEnumPn CountryEnum = "PN" - CountryEnumPl CountryEnum = "PL" - CountryEnumPt CountryEnum = "PT" - CountryEnumPr CountryEnum = "PR" - CountryEnumQa CountryEnum = "QA" - CountryEnumRe CountryEnum = "RE" - CountryEnumRo CountryEnum = "RO" - CountryEnumRu CountryEnum = "RU" - CountryEnumRw CountryEnum = "RW" - CountryEnumBl CountryEnum = "BL" - CountryEnumSh CountryEnum = "SH" - CountryEnumKn CountryEnum = "KN" - CountryEnumLc CountryEnum = "LC" - CountryEnumMf CountryEnum = "MF" - CountryEnumPm CountryEnum = "PM" - CountryEnumVc CountryEnum = "VC" - CountryEnumWs CountryEnum = "WS" - CountryEnumSm CountryEnum = "SM" - CountryEnumSt CountryEnum = "ST" - CountryEnumSa CountryEnum = "SA" - CountryEnumSn CountryEnum = "SN" - CountryEnumRs CountryEnum = "RS" - CountryEnumSc CountryEnum = "SC" - CountryEnumSl CountryEnum = "SL" - CountryEnumSg CountryEnum = "SG" - CountryEnumSx CountryEnum = "SX" - CountryEnumSk CountryEnum = "SK" - CountryEnumSi CountryEnum = "SI" - CountryEnumSb CountryEnum = "SB" - CountryEnumSo CountryEnum = "SO" - CountryEnumZa CountryEnum = "ZA" - CountryEnumGs CountryEnum = "GS" - CountryEnumKr CountryEnum = "KR" - CountryEnumSs CountryEnum = "SS" - CountryEnumEs CountryEnum = "ES" - CountryEnumLk CountryEnum = "LK" - CountryEnumSd CountryEnum = "SD" - CountryEnumSr CountryEnum = "SR" - CountryEnumSj CountryEnum = "SJ" - CountryEnumSe CountryEnum = "SE" - CountryEnumCh CountryEnum = "CH" - CountryEnumSy CountryEnum = "SY" - CountryEnumTw CountryEnum = "TW" - CountryEnumTj CountryEnum = "TJ" - CountryEnumTz CountryEnum = "TZ" - CountryEnumTh CountryEnum = "TH" - CountryEnumTl CountryEnum = "TL" - CountryEnumTg CountryEnum = "TG" - CountryEnumTk CountryEnum = "TK" - CountryEnumTo CountryEnum = "TO" - CountryEnumTt CountryEnum = "TT" - CountryEnumTn CountryEnum = "TN" - CountryEnumTr CountryEnum = "TR" - CountryEnumTm CountryEnum = "TM" - CountryEnumTc CountryEnum = "TC" - CountryEnumTv CountryEnum = "TV" - CountryEnumUg CountryEnum = "UG" - CountryEnumUa CountryEnum = "UA" - CountryEnumAe CountryEnum = "AE" - CountryEnumGb CountryEnum = "GB" - CountryEnumUm CountryEnum = "UM" - CountryEnumUs CountryEnum = "US" - CountryEnumUy CountryEnum = "UY" - CountryEnumUz CountryEnum = "UZ" - CountryEnumVu CountryEnum = "VU" - CountryEnumVe CountryEnum = "VE" - CountryEnumVn CountryEnum = "VN" - CountryEnumVg CountryEnum = "VG" - CountryEnumVi CountryEnum = "VI" - CountryEnumWf CountryEnum = "WF" - CountryEnumEh CountryEnum = "EH" - CountryEnumYe CountryEnum = "YE" - CountryEnumZm CountryEnum = "ZM" - CountryEnumZw CountryEnum = "ZW" -) - -func NewCountryEnumFromString(s string) (CountryEnum, error) { - switch s { - case "AF": - return CountryEnumAf, nil - case "AX": - return CountryEnumAx, nil - case "AL": - return CountryEnumAl, nil - case "DZ": - return CountryEnumDz, nil - case "AS": - return CountryEnumAs, nil - case "AD": - return CountryEnumAd, nil - case "AO": - return CountryEnumAo, nil - case "AI": - return CountryEnumAi, nil - case "AQ": - return CountryEnumAq, nil - case "AG": - return CountryEnumAg, nil - case "AR": - return CountryEnumAr, nil - case "AM": - return CountryEnumAm, nil - case "AW": - return CountryEnumAw, nil - case "AU": - return CountryEnumAu, nil - case "AT": - return CountryEnumAt, nil - case "AZ": - return CountryEnumAz, nil - case "BS": - return CountryEnumBs, nil - case "BH": - return CountryEnumBh, nil - case "BD": - return CountryEnumBd, nil - case "BB": - return CountryEnumBb, nil - case "BY": - return CountryEnumBy, nil - case "BE": - return CountryEnumBe, nil - case "BZ": - return CountryEnumBz, nil - case "BJ": - return CountryEnumBj, nil - case "BM": - return CountryEnumBm, nil - case "BT": - return CountryEnumBt, nil - case "BO": - return CountryEnumBo, nil - case "BQ": - return CountryEnumBq, nil - case "BA": - return CountryEnumBa, nil - case "BW": - return CountryEnumBw, nil - case "BV": - return CountryEnumBv, nil - case "BR": - return CountryEnumBr, nil - case "IO": - return CountryEnumIo, nil - case "BN": - return CountryEnumBn, nil - case "BG": - return CountryEnumBg, nil - case "BF": - return CountryEnumBf, nil - case "BI": - return CountryEnumBi, nil - case "CV": - return CountryEnumCv, nil - case "KH": - return CountryEnumKh, nil - case "CM": - return CountryEnumCm, nil - case "CA": - return CountryEnumCa, nil - case "KY": - return CountryEnumKy, nil - case "CF": - return CountryEnumCf, nil - case "TD": - return CountryEnumTd, nil - case "CL": - return CountryEnumCl, nil - case "CN": - return CountryEnumCn, nil - case "CX": - return CountryEnumCx, nil - case "CC": - return CountryEnumCc, nil - case "CO": - return CountryEnumCo, nil - case "KM": - return CountryEnumKm, nil - case "CG": - return CountryEnumCg, nil - case "CD": - return CountryEnumCd, nil - case "CK": - return CountryEnumCk, nil - case "CR": - return CountryEnumCr, nil - case "CI": - return CountryEnumCi, nil - case "HR": - return CountryEnumHr, nil - case "CU": - return CountryEnumCu, nil - case "CW": - return CountryEnumCw, nil - case "CY": - return CountryEnumCy, nil - case "CZ": - return CountryEnumCz, nil - case "DK": - return CountryEnumDk, nil - case "DJ": - return CountryEnumDj, nil - case "DM": - return CountryEnumDm, nil - case "DO": - return CountryEnumDo, nil - case "EC": - return CountryEnumEc, nil - case "EG": - return CountryEnumEg, nil - case "SV": - return CountryEnumSv, nil - case "GQ": - return CountryEnumGq, nil - case "ER": - return CountryEnumEr, nil - case "EE": - return CountryEnumEe, nil - case "SZ": - return CountryEnumSz, nil - case "ET": - return CountryEnumEt, nil - case "FK": - return CountryEnumFk, nil - case "FO": - return CountryEnumFo, nil - case "FJ": - return CountryEnumFj, nil - case "FI": - return CountryEnumFi, nil - case "FR": - return CountryEnumFr, nil - case "GF": - return CountryEnumGf, nil - case "PF": - return CountryEnumPf, nil - case "TF": - return CountryEnumTf, nil - case "GA": - return CountryEnumGa, nil - case "GM": - return CountryEnumGm, nil - case "GE": - return CountryEnumGe, nil - case "DE": - return CountryEnumDe, nil - case "GH": - return CountryEnumGh, nil - case "GI": - return CountryEnumGi, nil - case "GR": - return CountryEnumGr, nil - case "GL": - return CountryEnumGl, nil - case "GD": - return CountryEnumGd, nil - case "GP": - return CountryEnumGp, nil - case "GU": - return CountryEnumGu, nil - case "GT": - return CountryEnumGt, nil - case "GG": - return CountryEnumGg, nil - case "GN": - return CountryEnumGn, nil - case "GW": - return CountryEnumGw, nil - case "GY": - return CountryEnumGy, nil - case "HT": - return CountryEnumHt, nil - case "HM": - return CountryEnumHm, nil - case "VA": - return CountryEnumVa, nil - case "HN": - return CountryEnumHn, nil - case "HK": - return CountryEnumHk, nil - case "HU": - return CountryEnumHu, nil - case "IS": - return CountryEnumIs, nil - case "IN": - return CountryEnumIn, nil - case "ID": - return CountryEnumId, nil - case "IR": - return CountryEnumIr, nil - case "IQ": - return CountryEnumIq, nil - case "IE": - return CountryEnumIe, nil - case "IM": - return CountryEnumIm, nil - case "IL": - return CountryEnumIl, nil - case "IT": - return CountryEnumIt, nil - case "JM": - return CountryEnumJm, nil - case "JP": - return CountryEnumJp, nil - case "JE": - return CountryEnumJe, nil - case "JO": - return CountryEnumJo, nil - case "KZ": - return CountryEnumKz, nil - case "KE": - return CountryEnumKe, nil - case "KI": - return CountryEnumKi, nil - case "KW": - return CountryEnumKw, nil - case "KG": - return CountryEnumKg, nil - case "LA": - return CountryEnumLa, nil - case "LV": - return CountryEnumLv, nil - case "LB": - return CountryEnumLb, nil - case "LS": - return CountryEnumLs, nil - case "LR": - return CountryEnumLr, nil - case "LY": - return CountryEnumLy, nil - case "LI": - return CountryEnumLi, nil - case "LT": - return CountryEnumLt, nil - case "LU": - return CountryEnumLu, nil - case "MO": - return CountryEnumMo, nil - case "MG": - return CountryEnumMg, nil - case "MW": - return CountryEnumMw, nil - case "MY": - return CountryEnumMy, nil - case "MV": - return CountryEnumMv, nil - case "ML": - return CountryEnumMl, nil - case "MT": - return CountryEnumMt, nil - case "MH": - return CountryEnumMh, nil - case "MQ": - return CountryEnumMq, nil - case "MR": - return CountryEnumMr, nil - case "MU": - return CountryEnumMu, nil - case "YT": - return CountryEnumYt, nil - case "MX": - return CountryEnumMx, nil - case "FM": - return CountryEnumFm, nil - case "MD": - return CountryEnumMd, nil - case "MC": - return CountryEnumMc, nil - case "MN": - return CountryEnumMn, nil - case "ME": - return CountryEnumMe, nil - case "MS": - return CountryEnumMs, nil - case "MA": - return CountryEnumMa, nil - case "MZ": - return CountryEnumMz, nil - case "MM": - return CountryEnumMm, nil - case "NA": - return CountryEnumNa, nil - case "NR": - return CountryEnumNr, nil - case "NP": - return CountryEnumNp, nil - case "NL": - return CountryEnumNl, nil - case "NC": - return CountryEnumNc, nil - case "NZ": - return CountryEnumNz, nil - case "NI": - return CountryEnumNi, nil - case "NE": - return CountryEnumNe, nil - case "NG": - return CountryEnumNg, nil - case "NU": - return CountryEnumNu, nil - case "NF": - return CountryEnumNf, nil - case "KP": - return CountryEnumKp, nil - case "MK": - return CountryEnumMk, nil - case "MP": - return CountryEnumMp, nil - case "NO": - return CountryEnumNo, nil - case "OM": - return CountryEnumOm, nil - case "PK": - return CountryEnumPk, nil - case "PW": - return CountryEnumPw, nil - case "PS": - return CountryEnumPs, nil - case "PA": - return CountryEnumPa, nil - case "PG": - return CountryEnumPg, nil - case "PY": - return CountryEnumPy, nil - case "PE": - return CountryEnumPe, nil - case "PH": - return CountryEnumPh, nil - case "PN": - return CountryEnumPn, nil - case "PL": - return CountryEnumPl, nil - case "PT": - return CountryEnumPt, nil - case "PR": - return CountryEnumPr, nil - case "QA": - return CountryEnumQa, nil - case "RE": - return CountryEnumRe, nil - case "RO": - return CountryEnumRo, nil - case "RU": - return CountryEnumRu, nil - case "RW": - return CountryEnumRw, nil - case "BL": - return CountryEnumBl, nil - case "SH": - return CountryEnumSh, nil - case "KN": - return CountryEnumKn, nil - case "LC": - return CountryEnumLc, nil - case "MF": - return CountryEnumMf, nil - case "PM": - return CountryEnumPm, nil - case "VC": - return CountryEnumVc, nil - case "WS": - return CountryEnumWs, nil - case "SM": - return CountryEnumSm, nil - case "ST": - return CountryEnumSt, nil - case "SA": - return CountryEnumSa, nil - case "SN": - return CountryEnumSn, nil - case "RS": - return CountryEnumRs, nil - case "SC": - return CountryEnumSc, nil - case "SL": - return CountryEnumSl, nil - case "SG": - return CountryEnumSg, nil - case "SX": - return CountryEnumSx, nil - case "SK": - return CountryEnumSk, nil - case "SI": - return CountryEnumSi, nil - case "SB": - return CountryEnumSb, nil - case "SO": - return CountryEnumSo, nil - case "ZA": - return CountryEnumZa, nil - case "GS": - return CountryEnumGs, nil - case "KR": - return CountryEnumKr, nil - case "SS": - return CountryEnumSs, nil - case "ES": - return CountryEnumEs, nil - case "LK": - return CountryEnumLk, nil - case "SD": - return CountryEnumSd, nil - case "SR": - return CountryEnumSr, nil - case "SJ": - return CountryEnumSj, nil - case "SE": - return CountryEnumSe, nil - case "CH": - return CountryEnumCh, nil - case "SY": - return CountryEnumSy, nil - case "TW": - return CountryEnumTw, nil - case "TJ": - return CountryEnumTj, nil - case "TZ": - return CountryEnumTz, nil - case "TH": - return CountryEnumTh, nil - case "TL": - return CountryEnumTl, nil - case "TG": - return CountryEnumTg, nil - case "TK": - return CountryEnumTk, nil - case "TO": - return CountryEnumTo, nil - case "TT": - return CountryEnumTt, nil - case "TN": - return CountryEnumTn, nil - case "TR": - return CountryEnumTr, nil - case "TM": - return CountryEnumTm, nil - case "TC": - return CountryEnumTc, nil - case "TV": - return CountryEnumTv, nil - case "UG": - return CountryEnumUg, nil - case "UA": - return CountryEnumUa, nil - case "AE": - return CountryEnumAe, nil - case "GB": - return CountryEnumGb, nil - case "UM": - return CountryEnumUm, nil - case "US": - return CountryEnumUs, nil - case "UY": - return CountryEnumUy, nil - case "UZ": - return CountryEnumUz, nil - case "VU": - return CountryEnumVu, nil - case "VE": - return CountryEnumVe, nil - case "VN": - return CountryEnumVn, nil - case "VG": - return CountryEnumVg, nil - case "VI": - return CountryEnumVi, nil - case "WF": - return CountryEnumWf, nil - case "EH": - return CountryEnumEh, nil - case "YE": - return CountryEnumYe, nil - case "ZM": - return CountryEnumZm, nil - case "ZW": - return CountryEnumZw, nil - } - var t CountryEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (c CountryEnum) Ptr() *CountryEnum { - return &c -} - -// # The CreditNote Object -// -// ### Description -// -// A `CreditNote` is transaction issued to a customer, indicating a reduction or cancellation of the amount owed by the customer. It is most generally used as an adjustment note used to rectify errors, returns, or overpayments related to a sales transaction. A `CreditNote` can be applied to _Accounts Receivable_ Invoices to decrease the overall amount of the Invoice. -// -// ### Usage Example -// -// Fetch from the `LIST CreditNotes` endpoint and view a company's credit notes. -type CreditNote struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The credit note's transaction date. - TransactionDate *time.Time `json:"transaction_date,omitempty"` - // The credit note's status. - // - // - `SUBMITTED` - SUBMITTED - // - `AUTHORIZED` - AUTHORIZED - // - `PAID` - PAID - Status *CreditNoteStatus `json:"status,omitempty"` - // The credit note's number. - Number *string `json:"number,omitempty"` - // The credit note's contact. - Contact *CreditNoteContact `json:"contact,omitempty"` - // The company the credit note belongs to. - Company *CreditNoteCompany `json:"company,omitempty"` - // The credit note's exchange rate. - ExchangeRate *string `json:"exchange_rate,omitempty"` - // The credit note's total amount. - TotalAmount *float64 `json:"total_amount,omitempty"` - // The amount of value remaining in the credit note that the customer can use. - RemainingCredit *float64 `json:"remaining_credit,omitempty"` - // If the transaction is inclusive or exclusive of tax. `True` if inclusive, `False` if exclusive. - InclusiveOfTax *bool `json:"inclusive_of_tax,omitempty"` - LineItems []*CreditNoteLineItem `json:"line_items,omitempty"` - TrackingCategories []*CreditNoteTrackingCategoriesItem `json:"tracking_categories,omitempty"` - // The credit note's currency. - // - // - `XUA` - ADB Unit of Account - // - `AFN` - Afghan Afghani - // - `AFA` - Afghan Afghani (1927–2002) - // - `ALL` - Albanian Lek - // - `ALK` - Albanian Lek (1946–1965) - // - `DZD` - Algerian Dinar - // - `ADP` - Andorran Peseta - // - `AOA` - Angolan Kwanza - // - `AOK` - Angolan Kwanza (1977–1991) - // - `AON` - Angolan New Kwanza (1990–2000) - // - `AOR` - Angolan Readjusted Kwanza (1995–1999) - // - `ARA` - Argentine Austral - // - `ARS` - Argentine Peso - // - `ARM` - Argentine Peso (1881–1970) - // - `ARP` - Argentine Peso (1983–1985) - // - `ARL` - Argentine Peso Ley (1970–1983) - // - `AMD` - Armenian Dram - // - `AWG` - Aruban Florin - // - `AUD` - Australian Dollar - // - `ATS` - Austrian Schilling - // - `AZN` - Azerbaijani Manat - // - `AZM` - Azerbaijani Manat (1993–2006) - // - `BSD` - Bahamian Dollar - // - `BHD` - Bahraini Dinar - // - `BDT` - Bangladeshi Taka - // - `BBD` - Barbadian Dollar - // - `BYN` - Belarusian Ruble - // - `BYB` - Belarusian Ruble (1994–1999) - // - `BYR` - Belarusian Ruble (2000–2016) - // - `BEF` - Belgian Franc - // - `BEC` - Belgian Franc (convertible) - // - `BEL` - Belgian Franc (financial) - // - `BZD` - Belize Dollar - // - `BMD` - Bermudan Dollar - // - `BTN` - Bhutanese Ngultrum - // - `BOB` - Bolivian Boliviano - // - `BOL` - Bolivian Boliviano (1863–1963) - // - `BOV` - Bolivian Mvdol - // - `BOP` - Bolivian Peso - // - `BAM` - Bosnia-Herzegovina Convertible Mark - // - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - // - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - // - `BWP` - Botswanan Pula - // - `BRC` - Brazilian Cruzado (1986–1989) - // - `BRZ` - Brazilian Cruzeiro (1942–1967) - // - `BRE` - Brazilian Cruzeiro (1990–1993) - // - `BRR` - Brazilian Cruzeiro (1993–1994) - // - `BRN` - Brazilian New Cruzado (1989–1990) - // - `BRB` - Brazilian New Cruzeiro (1967–1986) - // - `BRL` - Brazilian Real - // - `GBP` - British Pound - // - `BND` - Brunei Dollar - // - `BGL` - Bulgarian Hard Lev - // - `BGN` - Bulgarian Lev - // - `BGO` - Bulgarian Lev (1879–1952) - // - `BGM` - Bulgarian Socialist Lev - // - `BUK` - Burmese Kyat - // - `BIF` - Burundian Franc - // - `XPF` - CFP Franc - // - `KHR` - Cambodian Riel - // - `CAD` - Canadian Dollar - // - `CVE` - Cape Verdean Escudo - // - `KYD` - Cayman Islands Dollar - // - `XAF` - Central African CFA Franc - // - `CLE` - Chilean Escudo - // - `CLP` - Chilean Peso - // - `CLF` - Chilean Unit of Account (UF) - // - `CNX` - Chinese People’s Bank Dollar - // - `CNY` - Chinese Yuan - // - `CNH` - Chinese Yuan (offshore) - // - `COP` - Colombian Peso - // - `COU` - Colombian Real Value Unit - // - `KMF` - Comorian Franc - // - `CDF` - Congolese Franc - // - `CRC` - Costa Rican Colón - // - `HRD` - Croatian Dinar - // - `HRK` - Croatian Kuna - // - `CUC` - Cuban Convertible Peso - // - `CUP` - Cuban Peso - // - `CYP` - Cypriot Pound - // - `CZK` - Czech Koruna - // - `CSK` - Czechoslovak Hard Koruna - // - `DKK` - Danish Krone - // - `DJF` - Djiboutian Franc - // - `DOP` - Dominican Peso - // - `NLG` - Dutch Guilder - // - `XCD` - East Caribbean Dollar - // - `DDM` - East German Mark - // - `ECS` - Ecuadorian Sucre - // - `ECV` - Ecuadorian Unit of Constant Value - // - `EGP` - Egyptian Pound - // - `GQE` - Equatorial Guinean Ekwele - // - `ERN` - Eritrean Nakfa - // - `EEK` - Estonian Kroon - // - `ETB` - Ethiopian Birr - // - `EUR` - Euro - // - `XBA` - European Composite Unit - // - `XEU` - European Currency Unit - // - `XBB` - European Monetary Unit - // - `XBC` - European Unit of Account (XBC) - // - `XBD` - European Unit of Account (XBD) - // - `FKP` - Falkland Islands Pound - // - `FJD` - Fijian Dollar - // - `FIM` - Finnish Markka - // - `FRF` - French Franc - // - `XFO` - French Gold Franc - // - `XFU` - French UIC-Franc - // - `GMD` - Gambian Dalasi - // - `GEK` - Georgian Kupon Larit - // - `GEL` - Georgian Lari - // - `DEM` - German Mark - // - `GHS` - Ghanaian Cedi - // - `GHC` - Ghanaian Cedi (1979–2007) - // - `GIP` - Gibraltar Pound - // - `XAU` - Gold - // - `GRD` - Greek Drachma - // - `GTQ` - Guatemalan Quetzal - // - `GWP` - Guinea-Bissau Peso - // - `GNF` - Guinean Franc - // - `GNS` - Guinean Syli - // - `GYD` - Guyanaese Dollar - // - `HTG` - Haitian Gourde - // - `HNL` - Honduran Lempira - // - `HKD` - Hong Kong Dollar - // - `HUF` - Hungarian Forint - // - `IMP` - IMP - // - `ISK` - Icelandic Króna - // - `ISJ` - Icelandic Króna (1918–1981) - // - `INR` - Indian Rupee - // - `IDR` - Indonesian Rupiah - // - `IRR` - Iranian Rial - // - `IQD` - Iraqi Dinar - // - `IEP` - Irish Pound - // - `ILS` - Israeli New Shekel - // - `ILP` - Israeli Pound - // - `ILR` - Israeli Shekel (1980–1985) - // - `ITL` - Italian Lira - // - `JMD` - Jamaican Dollar - // - `JPY` - Japanese Yen - // - `JOD` - Jordanian Dinar - // - `KZT` - Kazakhstani Tenge - // - `KES` - Kenyan Shilling - // - `KWD` - Kuwaiti Dinar - // - `KGS` - Kyrgystani Som - // - `LAK` - Laotian Kip - // - `LVL` - Latvian Lats - // - `LVR` - Latvian Ruble - // - `LBP` - Lebanese Pound - // - `LSL` - Lesotho Loti - // - `LRD` - Liberian Dollar - // - `LYD` - Libyan Dinar - // - `LTL` - Lithuanian Litas - // - `LTT` - Lithuanian Talonas - // - `LUL` - Luxembourg Financial Franc - // - `LUC` - Luxembourgian Convertible Franc - // - `LUF` - Luxembourgian Franc - // - `MOP` - Macanese Pataca - // - `MKD` - Macedonian Denar - // - `MKN` - Macedonian Denar (1992–1993) - // - `MGA` - Malagasy Ariary - // - `MGF` - Malagasy Franc - // - `MWK` - Malawian Kwacha - // - `MYR` - Malaysian Ringgit - // - `MVR` - Maldivian Rufiyaa - // - `MVP` - Maldivian Rupee (1947–1981) - // - `MLF` - Malian Franc - // - `MTL` - Maltese Lira - // - `MTP` - Maltese Pound - // - `MRU` - Mauritanian Ouguiya - // - `MRO` - Mauritanian Ouguiya (1973–2017) - // - `MUR` - Mauritian Rupee - // - `MXV` - Mexican Investment Unit - // - `MXN` - Mexican Peso - // - `MXP` - Mexican Silver Peso (1861–1992) - // - `MDC` - Moldovan Cupon - // - `MDL` - Moldovan Leu - // - `MCF` - Monegasque Franc - // - `MNT` - Mongolian Tugrik - // - `MAD` - Moroccan Dirham - // - `MAF` - Moroccan Franc - // - `MZE` - Mozambican Escudo - // - `MZN` - Mozambican Metical - // - `MZM` - Mozambican Metical (1980–2006) - // - `MMK` - Myanmar Kyat - // - `NAD` - Namibian Dollar - // - `NPR` - Nepalese Rupee - // - `ANG` - Netherlands Antillean Guilder - // - `TWD` - New Taiwan Dollar - // - `NZD` - New Zealand Dollar - // - `NIO` - Nicaraguan Córdoba - // - `NIC` - Nicaraguan Córdoba (1988–1991) - // - `NGN` - Nigerian Naira - // - `KPW` - North Korean Won - // - `NOK` - Norwegian Krone - // - `OMR` - Omani Rial - // - `PKR` - Pakistani Rupee - // - `XPD` - Palladium - // - `PAB` - Panamanian Balboa - // - `PGK` - Papua New Guinean Kina - // - `PYG` - Paraguayan Guarani - // - `PEI` - Peruvian Inti - // - `PEN` - Peruvian Sol - // - `PES` - Peruvian Sol (1863–1965) - // - `PHP` - Philippine Peso - // - `XPT` - Platinum - // - `PLN` - Polish Zloty - // - `PLZ` - Polish Zloty (1950–1995) - // - `PTE` - Portuguese Escudo - // - `GWE` - Portuguese Guinea Escudo - // - `QAR` - Qatari Rial - // - `XRE` - RINET Funds - // - `RHD` - Rhodesian Dollar - // - `RON` - Romanian Leu - // - `ROL` - Romanian Leu (1952–2006) - // - `RUB` - Russian Ruble - // - `RUR` - Russian Ruble (1991–1998) - // - `RWF` - Rwandan Franc - // - `SVC` - Salvadoran Colón - // - `WST` - Samoan Tala - // - `SAR` - Saudi Riyal - // - `RSD` - Serbian Dinar - // - `CSD` - Serbian Dinar (2002–2006) - // - `SCR` - Seychellois Rupee - // - `SLL` - Sierra Leonean Leone - // - `XAG` - Silver - // - `SGD` - Singapore Dollar - // - `SKK` - Slovak Koruna - // - `SIT` - Slovenian Tolar - // - `SBD` - Solomon Islands Dollar - // - `SOS` - Somali Shilling - // - `ZAR` - South African Rand - // - `ZAL` - South African Rand (financial) - // - `KRH` - South Korean Hwan (1953–1962) - // - `KRW` - South Korean Won - // - `KRO` - South Korean Won (1945–1953) - // - `SSP` - South Sudanese Pound - // - `SUR` - Soviet Rouble - // - `ESP` - Spanish Peseta - // - `ESA` - Spanish Peseta (A account) - // - `ESB` - Spanish Peseta (convertible account) - // - `XDR` - Special Drawing Rights - // - `LKR` - Sri Lankan Rupee - // - `SHP` - St. Helena Pound - // - `XSU` - Sucre - // - `SDD` - Sudanese Dinar (1992–2007) - // - `SDG` - Sudanese Pound - // - `SDP` - Sudanese Pound (1957–1998) - // - `SRD` - Surinamese Dollar - // - `SRG` - Surinamese Guilder - // - `SZL` - Swazi Lilangeni - // - `SEK` - Swedish Krona - // - `CHF` - Swiss Franc - // - `SYP` - Syrian Pound - // - `STN` - São Tomé & Príncipe Dobra - // - `STD` - São Tomé & Príncipe Dobra (1977–2017) - // - `TVD` - TVD - // - `TJR` - Tajikistani Ruble - // - `TJS` - Tajikistani Somoni - // - `TZS` - Tanzanian Shilling - // - `XTS` - Testing Currency Code - // - `THB` - Thai Baht - // - `XXX` - The codes assigned for transactions where no currency is involved - // - `TPE` - Timorese Escudo - // - `TOP` - Tongan Paʻanga - // - `TTD` - Trinidad & Tobago Dollar - // - `TND` - Tunisian Dinar - // - `TRY` - Turkish Lira - // - `TRL` - Turkish Lira (1922–2005) - // - `TMT` - Turkmenistani Manat - // - `TMM` - Turkmenistani Manat (1993–2009) - // - `USD` - US Dollar - // - `USN` - US Dollar (Next day) - // - `USS` - US Dollar (Same day) - // - `UGX` - Ugandan Shilling - // - `UGS` - Ugandan Shilling (1966–1987) - // - `UAH` - Ukrainian Hryvnia - // - `UAK` - Ukrainian Karbovanets - // - `AED` - United Arab Emirates Dirham - // - `UYW` - Uruguayan Nominal Wage Index Unit - // - `UYU` - Uruguayan Peso - // - `UYP` - Uruguayan Peso (1975–1993) - // - `UYI` - Uruguayan Peso (Indexed Units) - // - `UZS` - Uzbekistani Som - // - `VUV` - Vanuatu Vatu - // - `VES` - Venezuelan Bolívar - // - `VEB` - Venezuelan Bolívar (1871–2008) - // - `VEF` - Venezuelan Bolívar (2008–2018) - // - `VND` - Vietnamese Dong - // - `VNN` - Vietnamese Dong (1978–1985) - // - `CHE` - WIR Euro - // - `CHW` - WIR Franc - // - `XOF` - West African CFA Franc - // - `YDD` - Yemeni Dinar - // - `YER` - Yemeni Rial - // - `YUN` - Yugoslavian Convertible Dinar (1990–1992) - // - `YUD` - Yugoslavian Hard Dinar (1966–1990) - // - `YUM` - Yugoslavian New Dinar (1994–2002) - // - `YUR` - Yugoslavian Reformed Dinar (1992–1993) - // - `ZWN` - ZWN - // - `ZRN` - Zairean New Zaire (1993–1998) - // - `ZRZ` - Zairean Zaire (1971–1993) - // - `ZMW` - Zambian Kwacha - // - `ZMK` - Zambian Kwacha (1968–2012) - // - `ZWD` - Zimbabwean Dollar (1980–2008) - // - `ZWR` - Zimbabwean Dollar (2008) - // - `ZWL` - Zimbabwean Dollar (2009) - Currency *CreditNoteCurrency `json:"currency,omitempty"` - // When the third party's credit note was created. - RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty"` - // When the third party's credit note was updated. - RemoteUpdatedAt *time.Time `json:"remote_updated_at,omitempty"` - // Array of `Payment` object IDs - Payments []*CreditNotePaymentsItem `json:"payments,omitempty"` - // A list of the Payment Applied to Lines common models related to a given Invoice, Credit Note, or Journal Entry. - AppliedPayments []*CreditNoteAppliedPaymentsItem `json:"applied_payments,omitempty"` - // The accounting period that the CreditNote was generated in. - AccountingPeriod *CreditNoteAccountingPeriod `json:"accounting_period,omitempty"` - // A list of the CreditNote Applied to Lines common models related to a given Credit Note - AppliedToLines []*CreditNoteApplyLineForCreditNote `json:"applied_to_lines,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` - - _rawJSON json.RawMessage -} - -func (c *CreditNote) UnmarshalJSON(data []byte) error { - type unmarshaler CreditNote - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *c = CreditNote(value) - c._rawJSON = json.RawMessage(data) - return nil -} - -func (c *CreditNote) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(c); err == nil { - return value - } - return fmt.Sprintf("%#v", c) -} - -// The accounting period that the CreditNote was generated in. -type CreditNoteAccountingPeriod struct { - typeName string - String string - AccountingPeriod *AccountingPeriod -} - -func NewCreditNoteAccountingPeriodFromString(value string) *CreditNoteAccountingPeriod { - return &CreditNoteAccountingPeriod{typeName: "string", String: value} -} - -func NewCreditNoteAccountingPeriodFromAccountingPeriod(value *AccountingPeriod) *CreditNoteAccountingPeriod { - return &CreditNoteAccountingPeriod{typeName: "accountingPeriod", AccountingPeriod: value} -} - -func (c *CreditNoteAccountingPeriod) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - c.typeName = "string" - c.String = valueString - return nil - } - valueAccountingPeriod := new(AccountingPeriod) - if err := json.Unmarshal(data, &valueAccountingPeriod); err == nil { - c.typeName = "accountingPeriod" - c.AccountingPeriod = valueAccountingPeriod - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, c) -} - -func (c CreditNoteAccountingPeriod) MarshalJSON() ([]byte, error) { - switch c.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return json.Marshal(c.String) - case "accountingPeriod": - return json.Marshal(c.AccountingPeriod) - } -} - -type CreditNoteAccountingPeriodVisitor interface { - VisitString(string) error - VisitAccountingPeriod(*AccountingPeriod) error -} - -func (c *CreditNoteAccountingPeriod) Accept(visitor CreditNoteAccountingPeriodVisitor) error { - switch c.typeName { - default: - return fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return visitor.VisitString(c.String) - case "accountingPeriod": - return visitor.VisitAccountingPeriod(c.AccountingPeriod) - } -} - -type CreditNoteAppliedPaymentsItem struct { - typeName string - String string - PaymentLineItem *PaymentLineItem -} - -func NewCreditNoteAppliedPaymentsItemFromString(value string) *CreditNoteAppliedPaymentsItem { - return &CreditNoteAppliedPaymentsItem{typeName: "string", String: value} -} - -func NewCreditNoteAppliedPaymentsItemFromPaymentLineItem(value *PaymentLineItem) *CreditNoteAppliedPaymentsItem { - return &CreditNoteAppliedPaymentsItem{typeName: "paymentLineItem", PaymentLineItem: value} -} - -func (c *CreditNoteAppliedPaymentsItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - c.typeName = "string" - c.String = valueString - return nil - } - valuePaymentLineItem := new(PaymentLineItem) - if err := json.Unmarshal(data, &valuePaymentLineItem); err == nil { - c.typeName = "paymentLineItem" - c.PaymentLineItem = valuePaymentLineItem - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, c) -} - -func (c CreditNoteAppliedPaymentsItem) MarshalJSON() ([]byte, error) { - switch c.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return json.Marshal(c.String) - case "paymentLineItem": - return json.Marshal(c.PaymentLineItem) - } -} - -type CreditNoteAppliedPaymentsItemVisitor interface { - VisitString(string) error - VisitPaymentLineItem(*PaymentLineItem) error -} - -func (c *CreditNoteAppliedPaymentsItem) Accept(visitor CreditNoteAppliedPaymentsItemVisitor) error { - switch c.typeName { - default: - return fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return visitor.VisitString(c.String) - case "paymentLineItem": - return visitor.VisitPaymentLineItem(c.PaymentLineItem) - } -} - -// # The CreditNoteApplyLine Object -// -// ### Description -// -// The `CreditNoteApplyLine` is attached to the CreditNote model. -// -// ### Usage Example -// -// Fetch from the `GET CreditNote` endpoint and view the invoice's applied to lines. -type CreditNoteApplyLineForCreditNote struct { - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - Invoice *CreditNoteApplyLineForCreditNoteInvoice `json:"invoice,omitempty"` - // Date that the credit note is applied to the invoice. - AppliedDate *time.Time `json:"applied_date,omitempty"` - // The amount of the Credit Note applied to the invoice. - AppliedAmount *string `json:"applied_amount,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - - _rawJSON json.RawMessage -} - -func (c *CreditNoteApplyLineForCreditNote) UnmarshalJSON(data []byte) error { - type unmarshaler CreditNoteApplyLineForCreditNote - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *c = CreditNoteApplyLineForCreditNote(value) - c._rawJSON = json.RawMessage(data) - return nil -} - -func (c *CreditNoteApplyLineForCreditNote) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(c); err == nil { - return value - } - return fmt.Sprintf("%#v", c) -} - -type CreditNoteApplyLineForCreditNoteInvoice struct { - typeName string - String string - Invoice *Invoice -} - -func NewCreditNoteApplyLineForCreditNoteInvoiceFromString(value string) *CreditNoteApplyLineForCreditNoteInvoice { - return &CreditNoteApplyLineForCreditNoteInvoice{typeName: "string", String: value} -} - -func NewCreditNoteApplyLineForCreditNoteInvoiceFromInvoice(value *Invoice) *CreditNoteApplyLineForCreditNoteInvoice { - return &CreditNoteApplyLineForCreditNoteInvoice{typeName: "invoice", Invoice: value} -} - -func (c *CreditNoteApplyLineForCreditNoteInvoice) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - c.typeName = "string" - c.String = valueString - return nil - } - valueInvoice := new(Invoice) - if err := json.Unmarshal(data, &valueInvoice); err == nil { - c.typeName = "invoice" - c.Invoice = valueInvoice - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, c) -} - -func (c CreditNoteApplyLineForCreditNoteInvoice) MarshalJSON() ([]byte, error) { - switch c.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return json.Marshal(c.String) - case "invoice": - return json.Marshal(c.Invoice) - } -} - -type CreditNoteApplyLineForCreditNoteInvoiceVisitor interface { - VisitString(string) error - VisitInvoice(*Invoice) error -} - -func (c *CreditNoteApplyLineForCreditNoteInvoice) Accept(visitor CreditNoteApplyLineForCreditNoteInvoiceVisitor) error { - switch c.typeName { - default: - return fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return visitor.VisitString(c.String) - case "invoice": - return visitor.VisitInvoice(c.Invoice) - } -} - -// # The CreditNoteApplyLine Object -// -// ### Description -// -// The `CreditNoteApplyLine` is attached to the CreditNote model. -// -// ### Usage Example -// -// Fetch from the `GET CreditNote` endpoint and view the invoice's applied to lines. -type CreditNoteApplyLineForCreditNoteRequest struct { - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - Invoice *CreditNoteApplyLineForCreditNoteRequestInvoice `json:"invoice,omitempty"` - // Date that the credit note is applied to the invoice. - AppliedDate *time.Time `json:"applied_date,omitempty"` - // The amount of the Credit Note applied to the invoice. - AppliedAmount *string `json:"applied_amount,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` - - _rawJSON json.RawMessage -} - -func (c *CreditNoteApplyLineForCreditNoteRequest) UnmarshalJSON(data []byte) error { - type unmarshaler CreditNoteApplyLineForCreditNoteRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *c = CreditNoteApplyLineForCreditNoteRequest(value) - c._rawJSON = json.RawMessage(data) - return nil -} - -func (c *CreditNoteApplyLineForCreditNoteRequest) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(c); err == nil { - return value - } - return fmt.Sprintf("%#v", c) -} - -type CreditNoteApplyLineForCreditNoteRequestInvoice struct { - typeName string - String string - Invoice *Invoice -} - -func NewCreditNoteApplyLineForCreditNoteRequestInvoiceFromString(value string) *CreditNoteApplyLineForCreditNoteRequestInvoice { - return &CreditNoteApplyLineForCreditNoteRequestInvoice{typeName: "string", String: value} -} - -func NewCreditNoteApplyLineForCreditNoteRequestInvoiceFromInvoice(value *Invoice) *CreditNoteApplyLineForCreditNoteRequestInvoice { - return &CreditNoteApplyLineForCreditNoteRequestInvoice{typeName: "invoice", Invoice: value} -} - -func (c *CreditNoteApplyLineForCreditNoteRequestInvoice) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - c.typeName = "string" - c.String = valueString - return nil - } - valueInvoice := new(Invoice) - if err := json.Unmarshal(data, &valueInvoice); err == nil { - c.typeName = "invoice" - c.Invoice = valueInvoice - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, c) -} - -func (c CreditNoteApplyLineForCreditNoteRequestInvoice) MarshalJSON() ([]byte, error) { - switch c.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return json.Marshal(c.String) - case "invoice": - return json.Marshal(c.Invoice) - } -} - -type CreditNoteApplyLineForCreditNoteRequestInvoiceVisitor interface { - VisitString(string) error - VisitInvoice(*Invoice) error -} - -func (c *CreditNoteApplyLineForCreditNoteRequestInvoice) Accept(visitor CreditNoteApplyLineForCreditNoteRequestInvoiceVisitor) error { - switch c.typeName { - default: - return fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return visitor.VisitString(c.String) - case "invoice": - return visitor.VisitInvoice(c.Invoice) - } -} - -// # The CreditNoteApplyLine Object -// -// ### Description -// -// The `CreditNoteApplyLine` is attached to the CreditNote model. -// -// ### Usage Example -// -// Fetch from the `GET CreditNote` endpoint and view the invoice's applied to lines. -type CreditNoteApplyLineForInvoice struct { - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - CreditNote *CreditNoteApplyLineForInvoiceCreditNote `json:"credit_note,omitempty"` - // Date that the credit note is applied to the invoice. - AppliedDate *time.Time `json:"applied_date,omitempty"` - // The amount of the Credit Note applied to the invoice. - AppliedAmount *string `json:"applied_amount,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - - _rawJSON json.RawMessage -} - -func (c *CreditNoteApplyLineForInvoice) UnmarshalJSON(data []byte) error { - type unmarshaler CreditNoteApplyLineForInvoice - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *c = CreditNoteApplyLineForInvoice(value) - c._rawJSON = json.RawMessage(data) - return nil -} - -func (c *CreditNoteApplyLineForInvoice) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(c); err == nil { - return value - } - return fmt.Sprintf("%#v", c) -} - -type CreditNoteApplyLineForInvoiceCreditNote struct { - typeName string - String string - CreditNote *CreditNote -} - -func NewCreditNoteApplyLineForInvoiceCreditNoteFromString(value string) *CreditNoteApplyLineForInvoiceCreditNote { - return &CreditNoteApplyLineForInvoiceCreditNote{typeName: "string", String: value} -} - -func NewCreditNoteApplyLineForInvoiceCreditNoteFromCreditNote(value *CreditNote) *CreditNoteApplyLineForInvoiceCreditNote { - return &CreditNoteApplyLineForInvoiceCreditNote{typeName: "creditNote", CreditNote: value} -} - -func (c *CreditNoteApplyLineForInvoiceCreditNote) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - c.typeName = "string" - c.String = valueString - return nil - } - valueCreditNote := new(CreditNote) - if err := json.Unmarshal(data, &valueCreditNote); err == nil { - c.typeName = "creditNote" - c.CreditNote = valueCreditNote - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, c) -} - -func (c CreditNoteApplyLineForInvoiceCreditNote) MarshalJSON() ([]byte, error) { - switch c.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return json.Marshal(c.String) - case "creditNote": - return json.Marshal(c.CreditNote) - } -} - -type CreditNoteApplyLineForInvoiceCreditNoteVisitor interface { - VisitString(string) error - VisitCreditNote(*CreditNote) error -} - -func (c *CreditNoteApplyLineForInvoiceCreditNote) Accept(visitor CreditNoteApplyLineForInvoiceCreditNoteVisitor) error { - switch c.typeName { - default: - return fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return visitor.VisitString(c.String) - case "creditNote": - return visitor.VisitCreditNote(c.CreditNote) - } -} - -// The company the credit note belongs to. -type CreditNoteCompany struct { - typeName string - String string - CompanyInfo *CompanyInfo -} - -func NewCreditNoteCompanyFromString(value string) *CreditNoteCompany { - return &CreditNoteCompany{typeName: "string", String: value} -} - -func NewCreditNoteCompanyFromCompanyInfo(value *CompanyInfo) *CreditNoteCompany { - return &CreditNoteCompany{typeName: "companyInfo", CompanyInfo: value} -} - -func (c *CreditNoteCompany) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - c.typeName = "string" - c.String = valueString - return nil - } - valueCompanyInfo := new(CompanyInfo) - if err := json.Unmarshal(data, &valueCompanyInfo); err == nil { - c.typeName = "companyInfo" - c.CompanyInfo = valueCompanyInfo - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, c) -} - -func (c CreditNoteCompany) MarshalJSON() ([]byte, error) { - switch c.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return json.Marshal(c.String) - case "companyInfo": - return json.Marshal(c.CompanyInfo) - } -} - -type CreditNoteCompanyVisitor interface { - VisitString(string) error - VisitCompanyInfo(*CompanyInfo) error -} - -func (c *CreditNoteCompany) Accept(visitor CreditNoteCompanyVisitor) error { - switch c.typeName { - default: - return fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return visitor.VisitString(c.String) - case "companyInfo": - return visitor.VisitCompanyInfo(c.CompanyInfo) - } -} - -// The credit note's contact. -type CreditNoteContact struct { - typeName string - String string - Contact *Contact -} - -func NewCreditNoteContactFromString(value string) *CreditNoteContact { - return &CreditNoteContact{typeName: "string", String: value} -} - -func NewCreditNoteContactFromContact(value *Contact) *CreditNoteContact { - return &CreditNoteContact{typeName: "contact", Contact: value} -} - -func (c *CreditNoteContact) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - c.typeName = "string" - c.String = valueString - return nil - } - valueContact := new(Contact) - if err := json.Unmarshal(data, &valueContact); err == nil { - c.typeName = "contact" - c.Contact = valueContact - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, c) -} - -func (c CreditNoteContact) MarshalJSON() ([]byte, error) { - switch c.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return json.Marshal(c.String) - case "contact": - return json.Marshal(c.Contact) - } -} - -type CreditNoteContactVisitor interface { - VisitString(string) error - VisitContact(*Contact) error -} - -func (c *CreditNoteContact) Accept(visitor CreditNoteContactVisitor) error { - switch c.typeName { - default: - return fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return visitor.VisitString(c.String) - case "contact": - return visitor.VisitContact(c.Contact) - } -} - -// The credit note's currency. -// -// - `XUA` - ADB Unit of Account -// - `AFN` - Afghan Afghani -// - `AFA` - Afghan Afghani (1927–2002) -// - `ALL` - Albanian Lek -// - `ALK` - Albanian Lek (1946–1965) -// - `DZD` - Algerian Dinar -// - `ADP` - Andorran Peseta -// - `AOA` - Angolan Kwanza -// - `AOK` - Angolan Kwanza (1977–1991) -// - `AON` - Angolan New Kwanza (1990–2000) -// - `AOR` - Angolan Readjusted Kwanza (1995–1999) -// - `ARA` - Argentine Austral -// - `ARS` - Argentine Peso -// - `ARM` - Argentine Peso (1881–1970) -// - `ARP` - Argentine Peso (1983–1985) -// - `ARL` - Argentine Peso Ley (1970–1983) -// - `AMD` - Armenian Dram -// - `AWG` - Aruban Florin -// - `AUD` - Australian Dollar -// - `ATS` - Austrian Schilling -// - `AZN` - Azerbaijani Manat -// - `AZM` - Azerbaijani Manat (1993–2006) -// - `BSD` - Bahamian Dollar -// - `BHD` - Bahraini Dinar -// - `BDT` - Bangladeshi Taka -// - `BBD` - Barbadian Dollar -// - `BYN` - Belarusian Ruble -// - `BYB` - Belarusian Ruble (1994–1999) -// - `BYR` - Belarusian Ruble (2000–2016) -// - `BEF` - Belgian Franc -// - `BEC` - Belgian Franc (convertible) -// - `BEL` - Belgian Franc (financial) -// - `BZD` - Belize Dollar -// - `BMD` - Bermudan Dollar -// - `BTN` - Bhutanese Ngultrum -// - `BOB` - Bolivian Boliviano -// - `BOL` - Bolivian Boliviano (1863–1963) -// - `BOV` - Bolivian Mvdol -// - `BOP` - Bolivian Peso -// - `BAM` - Bosnia-Herzegovina Convertible Mark -// - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) -// - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) -// - `BWP` - Botswanan Pula -// - `BRC` - Brazilian Cruzado (1986–1989) -// - `BRZ` - Brazilian Cruzeiro (1942–1967) -// - `BRE` - Brazilian Cruzeiro (1990–1993) -// - `BRR` - Brazilian Cruzeiro (1993–1994) -// - `BRN` - Brazilian New Cruzado (1989–1990) -// - `BRB` - Brazilian New Cruzeiro (1967–1986) -// - `BRL` - Brazilian Real -// - `GBP` - British Pound -// - `BND` - Brunei Dollar -// - `BGL` - Bulgarian Hard Lev -// - `BGN` - Bulgarian Lev -// - `BGO` - Bulgarian Lev (1879–1952) -// - `BGM` - Bulgarian Socialist Lev -// - `BUK` - Burmese Kyat -// - `BIF` - Burundian Franc -// - `XPF` - CFP Franc -// - `KHR` - Cambodian Riel -// - `CAD` - Canadian Dollar -// - `CVE` - Cape Verdean Escudo -// - `KYD` - Cayman Islands Dollar -// - `XAF` - Central African CFA Franc -// - `CLE` - Chilean Escudo -// - `CLP` - Chilean Peso -// - `CLF` - Chilean Unit of Account (UF) -// - `CNX` - Chinese People’s Bank Dollar -// - `CNY` - Chinese Yuan -// - `CNH` - Chinese Yuan (offshore) -// - `COP` - Colombian Peso -// - `COU` - Colombian Real Value Unit -// - `KMF` - Comorian Franc -// - `CDF` - Congolese Franc -// - `CRC` - Costa Rican Colón -// - `HRD` - Croatian Dinar -// - `HRK` - Croatian Kuna -// - `CUC` - Cuban Convertible Peso -// - `CUP` - Cuban Peso -// - `CYP` - Cypriot Pound -// - `CZK` - Czech Koruna -// - `CSK` - Czechoslovak Hard Koruna -// - `DKK` - Danish Krone -// - `DJF` - Djiboutian Franc -// - `DOP` - Dominican Peso -// - `NLG` - Dutch Guilder -// - `XCD` - East Caribbean Dollar -// - `DDM` - East German Mark -// - `ECS` - Ecuadorian Sucre -// - `ECV` - Ecuadorian Unit of Constant Value -// - `EGP` - Egyptian Pound -// - `GQE` - Equatorial Guinean Ekwele -// - `ERN` - Eritrean Nakfa -// - `EEK` - Estonian Kroon -// - `ETB` - Ethiopian Birr -// - `EUR` - Euro -// - `XBA` - European Composite Unit -// - `XEU` - European Currency Unit -// - `XBB` - European Monetary Unit -// - `XBC` - European Unit of Account (XBC) -// - `XBD` - European Unit of Account (XBD) -// - `FKP` - Falkland Islands Pound -// - `FJD` - Fijian Dollar -// - `FIM` - Finnish Markka -// - `FRF` - French Franc -// - `XFO` - French Gold Franc -// - `XFU` - French UIC-Franc -// - `GMD` - Gambian Dalasi -// - `GEK` - Georgian Kupon Larit -// - `GEL` - Georgian Lari -// - `DEM` - German Mark -// - `GHS` - Ghanaian Cedi -// - `GHC` - Ghanaian Cedi (1979–2007) -// - `GIP` - Gibraltar Pound -// - `XAU` - Gold -// - `GRD` - Greek Drachma -// - `GTQ` - Guatemalan Quetzal -// - `GWP` - Guinea-Bissau Peso -// - `GNF` - Guinean Franc -// - `GNS` - Guinean Syli -// - `GYD` - Guyanaese Dollar -// - `HTG` - Haitian Gourde -// - `HNL` - Honduran Lempira -// - `HKD` - Hong Kong Dollar -// - `HUF` - Hungarian Forint -// - `IMP` - IMP -// - `ISK` - Icelandic Króna -// - `ISJ` - Icelandic Króna (1918–1981) -// - `INR` - Indian Rupee -// - `IDR` - Indonesian Rupiah -// - `IRR` - Iranian Rial -// - `IQD` - Iraqi Dinar -// - `IEP` - Irish Pound -// - `ILS` - Israeli New Shekel -// - `ILP` - Israeli Pound -// - `ILR` - Israeli Shekel (1980–1985) -// - `ITL` - Italian Lira -// - `JMD` - Jamaican Dollar -// - `JPY` - Japanese Yen -// - `JOD` - Jordanian Dinar -// - `KZT` - Kazakhstani Tenge -// - `KES` - Kenyan Shilling -// - `KWD` - Kuwaiti Dinar -// - `KGS` - Kyrgystani Som -// - `LAK` - Laotian Kip -// - `LVL` - Latvian Lats -// - `LVR` - Latvian Ruble -// - `LBP` - Lebanese Pound -// - `LSL` - Lesotho Loti -// - `LRD` - Liberian Dollar -// - `LYD` - Libyan Dinar -// - `LTL` - Lithuanian Litas -// - `LTT` - Lithuanian Talonas -// - `LUL` - Luxembourg Financial Franc -// - `LUC` - Luxembourgian Convertible Franc -// - `LUF` - Luxembourgian Franc -// - `MOP` - Macanese Pataca -// - `MKD` - Macedonian Denar -// - `MKN` - Macedonian Denar (1992–1993) -// - `MGA` - Malagasy Ariary -// - `MGF` - Malagasy Franc -// - `MWK` - Malawian Kwacha -// - `MYR` - Malaysian Ringgit -// - `MVR` - Maldivian Rufiyaa -// - `MVP` - Maldivian Rupee (1947–1981) -// - `MLF` - Malian Franc -// - `MTL` - Maltese Lira -// - `MTP` - Maltese Pound -// - `MRU` - Mauritanian Ouguiya -// - `MRO` - Mauritanian Ouguiya (1973–2017) -// - `MUR` - Mauritian Rupee -// - `MXV` - Mexican Investment Unit -// - `MXN` - Mexican Peso -// - `MXP` - Mexican Silver Peso (1861–1992) -// - `MDC` - Moldovan Cupon -// - `MDL` - Moldovan Leu -// - `MCF` - Monegasque Franc -// - `MNT` - Mongolian Tugrik -// - `MAD` - Moroccan Dirham -// - `MAF` - Moroccan Franc -// - `MZE` - Mozambican Escudo -// - `MZN` - Mozambican Metical -// - `MZM` - Mozambican Metical (1980–2006) -// - `MMK` - Myanmar Kyat -// - `NAD` - Namibian Dollar -// - `NPR` - Nepalese Rupee -// - `ANG` - Netherlands Antillean Guilder -// - `TWD` - New Taiwan Dollar -// - `NZD` - New Zealand Dollar -// - `NIO` - Nicaraguan Córdoba -// - `NIC` - Nicaraguan Córdoba (1988–1991) -// - `NGN` - Nigerian Naira -// - `KPW` - North Korean Won -// - `NOK` - Norwegian Krone -// - `OMR` - Omani Rial -// - `PKR` - Pakistani Rupee -// - `XPD` - Palladium -// - `PAB` - Panamanian Balboa -// - `PGK` - Papua New Guinean Kina -// - `PYG` - Paraguayan Guarani -// - `PEI` - Peruvian Inti -// - `PEN` - Peruvian Sol -// - `PES` - Peruvian Sol (1863–1965) -// - `PHP` - Philippine Peso -// - `XPT` - Platinum -// - `PLN` - Polish Zloty -// - `PLZ` - Polish Zloty (1950–1995) -// - `PTE` - Portuguese Escudo -// - `GWE` - Portuguese Guinea Escudo -// - `QAR` - Qatari Rial -// - `XRE` - RINET Funds -// - `RHD` - Rhodesian Dollar -// - `RON` - Romanian Leu -// - `ROL` - Romanian Leu (1952–2006) -// - `RUB` - Russian Ruble -// - `RUR` - Russian Ruble (1991–1998) -// - `RWF` - Rwandan Franc -// - `SVC` - Salvadoran Colón -// - `WST` - Samoan Tala -// - `SAR` - Saudi Riyal -// - `RSD` - Serbian Dinar -// - `CSD` - Serbian Dinar (2002–2006) -// - `SCR` - Seychellois Rupee -// - `SLL` - Sierra Leonean Leone -// - `XAG` - Silver -// - `SGD` - Singapore Dollar -// - `SKK` - Slovak Koruna -// - `SIT` - Slovenian Tolar -// - `SBD` - Solomon Islands Dollar -// - `SOS` - Somali Shilling -// - `ZAR` - South African Rand -// - `ZAL` - South African Rand (financial) -// - `KRH` - South Korean Hwan (1953–1962) -// - `KRW` - South Korean Won -// - `KRO` - South Korean Won (1945–1953) -// - `SSP` - South Sudanese Pound -// - `SUR` - Soviet Rouble -// - `ESP` - Spanish Peseta -// - `ESA` - Spanish Peseta (A account) -// - `ESB` - Spanish Peseta (convertible account) -// - `XDR` - Special Drawing Rights -// - `LKR` - Sri Lankan Rupee -// - `SHP` - St. Helena Pound -// - `XSU` - Sucre -// - `SDD` - Sudanese Dinar (1992–2007) -// - `SDG` - Sudanese Pound -// - `SDP` - Sudanese Pound (1957–1998) -// - `SRD` - Surinamese Dollar -// - `SRG` - Surinamese Guilder -// - `SZL` - Swazi Lilangeni -// - `SEK` - Swedish Krona -// - `CHF` - Swiss Franc -// - `SYP` - Syrian Pound -// - `STN` - São Tomé & Príncipe Dobra -// - `STD` - São Tomé & Príncipe Dobra (1977–2017) -// - `TVD` - TVD -// - `TJR` - Tajikistani Ruble -// - `TJS` - Tajikistani Somoni -// - `TZS` - Tanzanian Shilling -// - `XTS` - Testing Currency Code -// - `THB` - Thai Baht -// - `XXX` - The codes assigned for transactions where no currency is involved -// - `TPE` - Timorese Escudo -// - `TOP` - Tongan Paʻanga -// - `TTD` - Trinidad & Tobago Dollar -// - `TND` - Tunisian Dinar -// - `TRY` - Turkish Lira -// - `TRL` - Turkish Lira (1922–2005) -// - `TMT` - Turkmenistani Manat -// - `TMM` - Turkmenistani Manat (1993–2009) -// - `USD` - US Dollar -// - `USN` - US Dollar (Next day) -// - `USS` - US Dollar (Same day) -// - `UGX` - Ugandan Shilling -// - `UGS` - Ugandan Shilling (1966–1987) -// - `UAH` - Ukrainian Hryvnia -// - `UAK` - Ukrainian Karbovanets -// - `AED` - United Arab Emirates Dirham -// - `UYW` - Uruguayan Nominal Wage Index Unit -// - `UYU` - Uruguayan Peso -// - `UYP` - Uruguayan Peso (1975–1993) -// - `UYI` - Uruguayan Peso (Indexed Units) -// - `UZS` - Uzbekistani Som -// - `VUV` - Vanuatu Vatu -// - `VES` - Venezuelan Bolívar -// - `VEB` - Venezuelan Bolívar (1871–2008) -// - `VEF` - Venezuelan Bolívar (2008–2018) -// - `VND` - Vietnamese Dong -// - `VNN` - Vietnamese Dong (1978–1985) -// - `CHE` - WIR Euro -// - `CHW` - WIR Franc -// - `XOF` - West African CFA Franc -// - `YDD` - Yemeni Dinar -// - `YER` - Yemeni Rial -// - `YUN` - Yugoslavian Convertible Dinar (1990–1992) -// - `YUD` - Yugoslavian Hard Dinar (1966–1990) -// - `YUM` - Yugoslavian New Dinar (1994–2002) -// - `YUR` - Yugoslavian Reformed Dinar (1992–1993) -// - `ZWN` - ZWN -// - `ZRN` - Zairean New Zaire (1993–1998) -// - `ZRZ` - Zairean Zaire (1971–1993) -// - `ZMW` - Zambian Kwacha -// - `ZMK` - Zambian Kwacha (1968–2012) -// - `ZWD` - Zimbabwean Dollar (1980–2008) -// - `ZWR` - Zimbabwean Dollar (2008) -// - `ZWL` - Zimbabwean Dollar (2009) -type CreditNoteCurrency struct { - typeName string - TransactionCurrencyEnum TransactionCurrencyEnum - String string -} - -func NewCreditNoteCurrencyFromTransactionCurrencyEnum(value TransactionCurrencyEnum) *CreditNoteCurrency { - return &CreditNoteCurrency{typeName: "transactionCurrencyEnum", TransactionCurrencyEnum: value} -} - -func NewCreditNoteCurrencyFromString(value string) *CreditNoteCurrency { - return &CreditNoteCurrency{typeName: "string", String: value} -} - -func (c *CreditNoteCurrency) UnmarshalJSON(data []byte) error { - var valueTransactionCurrencyEnum TransactionCurrencyEnum - if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { - c.typeName = "transactionCurrencyEnum" - c.TransactionCurrencyEnum = valueTransactionCurrencyEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - c.typeName = "string" - c.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, c) -} - -func (c CreditNoteCurrency) MarshalJSON() ([]byte, error) { - switch c.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "transactionCurrencyEnum": - return json.Marshal(c.TransactionCurrencyEnum) - case "string": - return json.Marshal(c.String) - } -} - -type CreditNoteCurrencyVisitor interface { - VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error - VisitString(string) error -} - -func (c *CreditNoteCurrency) Accept(visitor CreditNoteCurrencyVisitor) error { - switch c.typeName { - default: - return fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "transactionCurrencyEnum": - return visitor.VisitTransactionCurrencyEnum(c.TransactionCurrencyEnum) - case "string": - return visitor.VisitString(c.String) - } -} - -// # The CreditNoteLineItem Object -// -// ### Description -// -// The `CreditNoteLineItem` object is used to represent a credit note's line items. -// -// ### Usage Example -// -// Fetch from the `GET CreditNote` endpoint and view the credit note's line items. -type CreditNoteLineItem struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - Item *CreditNoteLineItemItem `json:"item,omitempty"` - // The credit note line item's name. - Name *string `json:"name,omitempty"` - // The description of the item that is owed. - Description *string `json:"description,omitempty"` - // The credit note line item's quantity. - Quantity *string `json:"quantity,omitempty"` - // The credit note line item's memo. - Memo *string `json:"memo,omitempty"` - // The credit note line item's unit price. - UnitPrice *string `json:"unit_price,omitempty"` - // The tax rate that applies to this line item. - TaxRate *string `json:"tax_rate,omitempty"` - // The credit note line item's total. - TotalLineAmount *string `json:"total_line_amount,omitempty"` - // The credit note line item's associated tracking category. - TrackingCategory *string `json:"tracking_category,omitempty"` - // The credit note line item's associated tracking categories. - TrackingCategories []*string `json:"tracking_categories,omitempty"` - // The credit note line item's account. - Account *string `json:"account,omitempty"` - // The company the credit note belongs to. - Company *CreditNoteLineItemCompany `json:"company,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - - _rawJSON json.RawMessage -} - -func (c *CreditNoteLineItem) UnmarshalJSON(data []byte) error { - type unmarshaler CreditNoteLineItem - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *c = CreditNoteLineItem(value) - c._rawJSON = json.RawMessage(data) - return nil -} - -func (c *CreditNoteLineItem) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(c); err == nil { - return value - } - return fmt.Sprintf("%#v", c) -} - -// The company the credit note belongs to. -type CreditNoteLineItemCompany struct { - typeName string - String string - CompanyInfo *CompanyInfo -} - -func NewCreditNoteLineItemCompanyFromString(value string) *CreditNoteLineItemCompany { - return &CreditNoteLineItemCompany{typeName: "string", String: value} -} - -func NewCreditNoteLineItemCompanyFromCompanyInfo(value *CompanyInfo) *CreditNoteLineItemCompany { - return &CreditNoteLineItemCompany{typeName: "companyInfo", CompanyInfo: value} -} - -func (c *CreditNoteLineItemCompany) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - c.typeName = "string" - c.String = valueString - return nil - } - valueCompanyInfo := new(CompanyInfo) - if err := json.Unmarshal(data, &valueCompanyInfo); err == nil { - c.typeName = "companyInfo" - c.CompanyInfo = valueCompanyInfo - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, c) -} - -func (c CreditNoteLineItemCompany) MarshalJSON() ([]byte, error) { - switch c.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return json.Marshal(c.String) - case "companyInfo": - return json.Marshal(c.CompanyInfo) - } -} - -type CreditNoteLineItemCompanyVisitor interface { - VisitString(string) error - VisitCompanyInfo(*CompanyInfo) error -} - -func (c *CreditNoteLineItemCompany) Accept(visitor CreditNoteLineItemCompanyVisitor) error { - switch c.typeName { - default: - return fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return visitor.VisitString(c.String) - case "companyInfo": - return visitor.VisitCompanyInfo(c.CompanyInfo) - } -} - -type CreditNoteLineItemItem struct { - typeName string - String string - Item *Item -} - -func NewCreditNoteLineItemItemFromString(value string) *CreditNoteLineItemItem { - return &CreditNoteLineItemItem{typeName: "string", String: value} -} - -func NewCreditNoteLineItemItemFromItem(value *Item) *CreditNoteLineItemItem { - return &CreditNoteLineItemItem{typeName: "item", Item: value} -} - -func (c *CreditNoteLineItemItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - c.typeName = "string" - c.String = valueString - return nil - } - valueItem := new(Item) - if err := json.Unmarshal(data, &valueItem); err == nil { - c.typeName = "item" - c.Item = valueItem - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, c) -} - -func (c CreditNoteLineItemItem) MarshalJSON() ([]byte, error) { - switch c.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return json.Marshal(c.String) - case "item": - return json.Marshal(c.Item) - } -} - -type CreditNoteLineItemItemVisitor interface { - VisitString(string) error - VisitItem(*Item) error -} - -func (c *CreditNoteLineItemItem) Accept(visitor CreditNoteLineItemItemVisitor) error { - switch c.typeName { - default: - return fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return visitor.VisitString(c.String) - case "item": - return visitor.VisitItem(c.Item) - } -} - -// # The CreditNoteLineItem Object -// -// ### Description -// -// The `CreditNoteLineItem` object is used to represent a credit note's line items. -// -// ### Usage Example -// -// Fetch from the `GET CreditNote` endpoint and view the credit note's line items. -type CreditNoteLineItemRequest struct { - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - Item *CreditNoteLineItemRequestItem `json:"item,omitempty"` - // The credit note line item's name. - Name *string `json:"name,omitempty"` - // The description of the item that is owed. - Description *string `json:"description,omitempty"` - // The credit note line item's quantity. - Quantity *string `json:"quantity,omitempty"` - // The credit note line item's memo. - Memo *string `json:"memo,omitempty"` - // The credit note line item's unit price. - UnitPrice *string `json:"unit_price,omitempty"` - // The tax rate that applies to this line item. - TaxRate *string `json:"tax_rate,omitempty"` - // The credit note line item's total. - TotalLineAmount *string `json:"total_line_amount,omitempty"` - // The credit note line item's associated tracking category. - TrackingCategory *string `json:"tracking_category,omitempty"` - // The credit note line item's associated tracking categories. - TrackingCategories []*string `json:"tracking_categories,omitempty"` - // The credit note line item's account. - Account *string `json:"account,omitempty"` - // The company the credit note belongs to. - Company *CreditNoteLineItemRequestCompany `json:"company,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` - - _rawJSON json.RawMessage -} - -func (c *CreditNoteLineItemRequest) UnmarshalJSON(data []byte) error { - type unmarshaler CreditNoteLineItemRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *c = CreditNoteLineItemRequest(value) - c._rawJSON = json.RawMessage(data) - return nil -} - -func (c *CreditNoteLineItemRequest) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(c); err == nil { - return value - } - return fmt.Sprintf("%#v", c) -} - -// The company the credit note belongs to. -type CreditNoteLineItemRequestCompany struct { - typeName string - String string - CompanyInfo *CompanyInfo -} - -func NewCreditNoteLineItemRequestCompanyFromString(value string) *CreditNoteLineItemRequestCompany { - return &CreditNoteLineItemRequestCompany{typeName: "string", String: value} -} - -func NewCreditNoteLineItemRequestCompanyFromCompanyInfo(value *CompanyInfo) *CreditNoteLineItemRequestCompany { - return &CreditNoteLineItemRequestCompany{typeName: "companyInfo", CompanyInfo: value} -} - -func (c *CreditNoteLineItemRequestCompany) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - c.typeName = "string" - c.String = valueString - return nil - } - valueCompanyInfo := new(CompanyInfo) - if err := json.Unmarshal(data, &valueCompanyInfo); err == nil { - c.typeName = "companyInfo" - c.CompanyInfo = valueCompanyInfo - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, c) -} - -func (c CreditNoteLineItemRequestCompany) MarshalJSON() ([]byte, error) { - switch c.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return json.Marshal(c.String) - case "companyInfo": - return json.Marshal(c.CompanyInfo) - } -} - -type CreditNoteLineItemRequestCompanyVisitor interface { - VisitString(string) error - VisitCompanyInfo(*CompanyInfo) error -} - -func (c *CreditNoteLineItemRequestCompany) Accept(visitor CreditNoteLineItemRequestCompanyVisitor) error { - switch c.typeName { - default: - return fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return visitor.VisitString(c.String) - case "companyInfo": - return visitor.VisitCompanyInfo(c.CompanyInfo) - } -} - -type CreditNoteLineItemRequestItem struct { - typeName string - String string - Item *Item -} - -func NewCreditNoteLineItemRequestItemFromString(value string) *CreditNoteLineItemRequestItem { - return &CreditNoteLineItemRequestItem{typeName: "string", String: value} -} - -func NewCreditNoteLineItemRequestItemFromItem(value *Item) *CreditNoteLineItemRequestItem { - return &CreditNoteLineItemRequestItem{typeName: "item", Item: value} -} - -func (c *CreditNoteLineItemRequestItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - c.typeName = "string" - c.String = valueString - return nil - } - valueItem := new(Item) - if err := json.Unmarshal(data, &valueItem); err == nil { - c.typeName = "item" - c.Item = valueItem - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, c) -} - -func (c CreditNoteLineItemRequestItem) MarshalJSON() ([]byte, error) { - switch c.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return json.Marshal(c.String) - case "item": - return json.Marshal(c.Item) - } -} - -type CreditNoteLineItemRequestItemVisitor interface { - VisitString(string) error - VisitItem(*Item) error -} - -func (c *CreditNoteLineItemRequestItem) Accept(visitor CreditNoteLineItemRequestItemVisitor) error { - switch c.typeName { - default: - return fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return visitor.VisitString(c.String) - case "item": - return visitor.VisitItem(c.Item) - } -} - -type CreditNotePaymentsItem struct { - typeName string - String string - Payment *Payment -} - -func NewCreditNotePaymentsItemFromString(value string) *CreditNotePaymentsItem { - return &CreditNotePaymentsItem{typeName: "string", String: value} -} - -func NewCreditNotePaymentsItemFromPayment(value *Payment) *CreditNotePaymentsItem { - return &CreditNotePaymentsItem{typeName: "payment", Payment: value} -} - -func (c *CreditNotePaymentsItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - c.typeName = "string" - c.String = valueString - return nil - } - valuePayment := new(Payment) - if err := json.Unmarshal(data, &valuePayment); err == nil { - c.typeName = "payment" - c.Payment = valuePayment - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, c) -} - -func (c CreditNotePaymentsItem) MarshalJSON() ([]byte, error) { - switch c.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return json.Marshal(c.String) - case "payment": - return json.Marshal(c.Payment) - } -} - -type CreditNotePaymentsItemVisitor interface { - VisitString(string) error - VisitPayment(*Payment) error -} - -func (c *CreditNotePaymentsItem) Accept(visitor CreditNotePaymentsItemVisitor) error { - switch c.typeName { - default: - return fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return visitor.VisitString(c.String) - case "payment": - return visitor.VisitPayment(c.Payment) - } -} - -// # The CreditNote Object -// -// ### Description -// -// A `CreditNote` is transaction issued to a customer, indicating a reduction or cancellation of the amount owed by the customer. It is most generally used as an adjustment note used to rectify errors, returns, or overpayments related to a sales transaction. A `CreditNote` can be applied to _Accounts Receivable_ Invoices to decrease the overall amount of the Invoice. -// -// ### Usage Example -// -// Fetch from the `LIST CreditNotes` endpoint and view a company's credit notes. -type CreditNoteRequest struct { - // The credit note's transaction date. - TransactionDate *time.Time `json:"transaction_date,omitempty"` - // The credit note's status. - // - // - `SUBMITTED` - SUBMITTED - // - `AUTHORIZED` - AUTHORIZED - // - `PAID` - PAID - Status *CreditNoteRequestStatus `json:"status,omitempty"` - // The credit note's number. - Number *string `json:"number,omitempty"` - // The credit note's contact. - Contact *CreditNoteRequestContact `json:"contact,omitempty"` - // The company the credit note belongs to. - Company *CreditNoteRequestCompany `json:"company,omitempty"` - // The credit note's exchange rate. - ExchangeRate *string `json:"exchange_rate,omitempty"` - // The credit note's total amount. - TotalAmount *float64 `json:"total_amount,omitempty"` - // The amount of value remaining in the credit note that the customer can use. - RemainingCredit *float64 `json:"remaining_credit,omitempty"` - // If the transaction is inclusive or exclusive of tax. `True` if inclusive, `False` if exclusive. - InclusiveOfTax *bool `json:"inclusive_of_tax,omitempty"` - LineItems []*CreditNoteRequestLineItemsItem `json:"line_items,omitempty"` - TrackingCategories []*CreditNoteRequestTrackingCategoriesItem `json:"tracking_categories,omitempty"` - // The credit note's currency. - // - // - `XUA` - ADB Unit of Account - // - `AFN` - Afghan Afghani - // - `AFA` - Afghan Afghani (1927–2002) - // - `ALL` - Albanian Lek - // - `ALK` - Albanian Lek (1946–1965) - // - `DZD` - Algerian Dinar - // - `ADP` - Andorran Peseta - // - `AOA` - Angolan Kwanza - // - `AOK` - Angolan Kwanza (1977–1991) - // - `AON` - Angolan New Kwanza (1990–2000) - // - `AOR` - Angolan Readjusted Kwanza (1995–1999) - // - `ARA` - Argentine Austral - // - `ARS` - Argentine Peso - // - `ARM` - Argentine Peso (1881–1970) - // - `ARP` - Argentine Peso (1983–1985) - // - `ARL` - Argentine Peso Ley (1970–1983) - // - `AMD` - Armenian Dram - // - `AWG` - Aruban Florin - // - `AUD` - Australian Dollar - // - `ATS` - Austrian Schilling - // - `AZN` - Azerbaijani Manat - // - `AZM` - Azerbaijani Manat (1993–2006) - // - `BSD` - Bahamian Dollar - // - `BHD` - Bahraini Dinar - // - `BDT` - Bangladeshi Taka - // - `BBD` - Barbadian Dollar - // - `BYN` - Belarusian Ruble - // - `BYB` - Belarusian Ruble (1994–1999) - // - `BYR` - Belarusian Ruble (2000–2016) - // - `BEF` - Belgian Franc - // - `BEC` - Belgian Franc (convertible) - // - `BEL` - Belgian Franc (financial) - // - `BZD` - Belize Dollar - // - `BMD` - Bermudan Dollar - // - `BTN` - Bhutanese Ngultrum - // - `BOB` - Bolivian Boliviano - // - `BOL` - Bolivian Boliviano (1863–1963) - // - `BOV` - Bolivian Mvdol - // - `BOP` - Bolivian Peso - // - `BAM` - Bosnia-Herzegovina Convertible Mark - // - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - // - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - // - `BWP` - Botswanan Pula - // - `BRC` - Brazilian Cruzado (1986–1989) - // - `BRZ` - Brazilian Cruzeiro (1942–1967) - // - `BRE` - Brazilian Cruzeiro (1990–1993) - // - `BRR` - Brazilian Cruzeiro (1993–1994) - // - `BRN` - Brazilian New Cruzado (1989–1990) - // - `BRB` - Brazilian New Cruzeiro (1967–1986) - // - `BRL` - Brazilian Real - // - `GBP` - British Pound - // - `BND` - Brunei Dollar - // - `BGL` - Bulgarian Hard Lev - // - `BGN` - Bulgarian Lev - // - `BGO` - Bulgarian Lev (1879–1952) - // - `BGM` - Bulgarian Socialist Lev - // - `BUK` - Burmese Kyat - // - `BIF` - Burundian Franc - // - `XPF` - CFP Franc - // - `KHR` - Cambodian Riel - // - `CAD` - Canadian Dollar - // - `CVE` - Cape Verdean Escudo - // - `KYD` - Cayman Islands Dollar - // - `XAF` - Central African CFA Franc - // - `CLE` - Chilean Escudo - // - `CLP` - Chilean Peso - // - `CLF` - Chilean Unit of Account (UF) - // - `CNX` - Chinese People’s Bank Dollar - // - `CNY` - Chinese Yuan - // - `CNH` - Chinese Yuan (offshore) - // - `COP` - Colombian Peso - // - `COU` - Colombian Real Value Unit - // - `KMF` - Comorian Franc - // - `CDF` - Congolese Franc - // - `CRC` - Costa Rican Colón - // - `HRD` - Croatian Dinar - // - `HRK` - Croatian Kuna - // - `CUC` - Cuban Convertible Peso - // - `CUP` - Cuban Peso - // - `CYP` - Cypriot Pound - // - `CZK` - Czech Koruna - // - `CSK` - Czechoslovak Hard Koruna - // - `DKK` - Danish Krone - // - `DJF` - Djiboutian Franc - // - `DOP` - Dominican Peso - // - `NLG` - Dutch Guilder - // - `XCD` - East Caribbean Dollar - // - `DDM` - East German Mark - // - `ECS` - Ecuadorian Sucre - // - `ECV` - Ecuadorian Unit of Constant Value - // - `EGP` - Egyptian Pound - // - `GQE` - Equatorial Guinean Ekwele - // - `ERN` - Eritrean Nakfa - // - `EEK` - Estonian Kroon - // - `ETB` - Ethiopian Birr - // - `EUR` - Euro - // - `XBA` - European Composite Unit - // - `XEU` - European Currency Unit - // - `XBB` - European Monetary Unit - // - `XBC` - European Unit of Account (XBC) - // - `XBD` - European Unit of Account (XBD) - // - `FKP` - Falkland Islands Pound - // - `FJD` - Fijian Dollar - // - `FIM` - Finnish Markka - // - `FRF` - French Franc - // - `XFO` - French Gold Franc - // - `XFU` - French UIC-Franc - // - `GMD` - Gambian Dalasi - // - `GEK` - Georgian Kupon Larit - // - `GEL` - Georgian Lari - // - `DEM` - German Mark - // - `GHS` - Ghanaian Cedi - // - `GHC` - Ghanaian Cedi (1979–2007) - // - `GIP` - Gibraltar Pound - // - `XAU` - Gold - // - `GRD` - Greek Drachma - // - `GTQ` - Guatemalan Quetzal - // - `GWP` - Guinea-Bissau Peso - // - `GNF` - Guinean Franc - // - `GNS` - Guinean Syli - // - `GYD` - Guyanaese Dollar - // - `HTG` - Haitian Gourde - // - `HNL` - Honduran Lempira - // - `HKD` - Hong Kong Dollar - // - `HUF` - Hungarian Forint - // - `IMP` - IMP - // - `ISK` - Icelandic Króna - // - `ISJ` - Icelandic Króna (1918–1981) - // - `INR` - Indian Rupee - // - `IDR` - Indonesian Rupiah - // - `IRR` - Iranian Rial - // - `IQD` - Iraqi Dinar - // - `IEP` - Irish Pound - // - `ILS` - Israeli New Shekel - // - `ILP` - Israeli Pound - // - `ILR` - Israeli Shekel (1980–1985) - // - `ITL` - Italian Lira - // - `JMD` - Jamaican Dollar - // - `JPY` - Japanese Yen - // - `JOD` - Jordanian Dinar - // - `KZT` - Kazakhstani Tenge - // - `KES` - Kenyan Shilling - // - `KWD` - Kuwaiti Dinar - // - `KGS` - Kyrgystani Som - // - `LAK` - Laotian Kip - // - `LVL` - Latvian Lats - // - `LVR` - Latvian Ruble - // - `LBP` - Lebanese Pound - // - `LSL` - Lesotho Loti - // - `LRD` - Liberian Dollar - // - `LYD` - Libyan Dinar - // - `LTL` - Lithuanian Litas - // - `LTT` - Lithuanian Talonas - // - `LUL` - Luxembourg Financial Franc - // - `LUC` - Luxembourgian Convertible Franc - // - `LUF` - Luxembourgian Franc - // - `MOP` - Macanese Pataca - // - `MKD` - Macedonian Denar - // - `MKN` - Macedonian Denar (1992–1993) - // - `MGA` - Malagasy Ariary - // - `MGF` - Malagasy Franc - // - `MWK` - Malawian Kwacha - // - `MYR` - Malaysian Ringgit - // - `MVR` - Maldivian Rufiyaa - // - `MVP` - Maldivian Rupee (1947–1981) - // - `MLF` - Malian Franc - // - `MTL` - Maltese Lira - // - `MTP` - Maltese Pound - // - `MRU` - Mauritanian Ouguiya - // - `MRO` - Mauritanian Ouguiya (1973–2017) - // - `MUR` - Mauritian Rupee - // - `MXV` - Mexican Investment Unit - // - `MXN` - Mexican Peso - // - `MXP` - Mexican Silver Peso (1861–1992) - // - `MDC` - Moldovan Cupon - // - `MDL` - Moldovan Leu - // - `MCF` - Monegasque Franc - // - `MNT` - Mongolian Tugrik - // - `MAD` - Moroccan Dirham - // - `MAF` - Moroccan Franc - // - `MZE` - Mozambican Escudo - // - `MZN` - Mozambican Metical - // - `MZM` - Mozambican Metical (1980–2006) - // - `MMK` - Myanmar Kyat - // - `NAD` - Namibian Dollar - // - `NPR` - Nepalese Rupee - // - `ANG` - Netherlands Antillean Guilder - // - `TWD` - New Taiwan Dollar - // - `NZD` - New Zealand Dollar - // - `NIO` - Nicaraguan Córdoba - // - `NIC` - Nicaraguan Córdoba (1988–1991) - // - `NGN` - Nigerian Naira - // - `KPW` - North Korean Won - // - `NOK` - Norwegian Krone - // - `OMR` - Omani Rial - // - `PKR` - Pakistani Rupee - // - `XPD` - Palladium - // - `PAB` - Panamanian Balboa - // - `PGK` - Papua New Guinean Kina - // - `PYG` - Paraguayan Guarani - // - `PEI` - Peruvian Inti - // - `PEN` - Peruvian Sol - // - `PES` - Peruvian Sol (1863–1965) - // - `PHP` - Philippine Peso - // - `XPT` - Platinum - // - `PLN` - Polish Zloty - // - `PLZ` - Polish Zloty (1950–1995) - // - `PTE` - Portuguese Escudo - // - `GWE` - Portuguese Guinea Escudo - // - `QAR` - Qatari Rial - // - `XRE` - RINET Funds - // - `RHD` - Rhodesian Dollar - // - `RON` - Romanian Leu - // - `ROL` - Romanian Leu (1952–2006) - // - `RUB` - Russian Ruble - // - `RUR` - Russian Ruble (1991–1998) - // - `RWF` - Rwandan Franc - // - `SVC` - Salvadoran Colón - // - `WST` - Samoan Tala - // - `SAR` - Saudi Riyal - // - `RSD` - Serbian Dinar - // - `CSD` - Serbian Dinar (2002–2006) - // - `SCR` - Seychellois Rupee - // - `SLL` - Sierra Leonean Leone - // - `XAG` - Silver - // - `SGD` - Singapore Dollar - // - `SKK` - Slovak Koruna - // - `SIT` - Slovenian Tolar - // - `SBD` - Solomon Islands Dollar - // - `SOS` - Somali Shilling - // - `ZAR` - South African Rand - // - `ZAL` - South African Rand (financial) - // - `KRH` - South Korean Hwan (1953–1962) - // - `KRW` - South Korean Won - // - `KRO` - South Korean Won (1945–1953) - // - `SSP` - South Sudanese Pound - // - `SUR` - Soviet Rouble - // - `ESP` - Spanish Peseta - // - `ESA` - Spanish Peseta (A account) - // - `ESB` - Spanish Peseta (convertible account) - // - `XDR` - Special Drawing Rights - // - `LKR` - Sri Lankan Rupee - // - `SHP` - St. Helena Pound - // - `XSU` - Sucre - // - `SDD` - Sudanese Dinar (1992–2007) - // - `SDG` - Sudanese Pound - // - `SDP` - Sudanese Pound (1957–1998) - // - `SRD` - Surinamese Dollar - // - `SRG` - Surinamese Guilder - // - `SZL` - Swazi Lilangeni - // - `SEK` - Swedish Krona - // - `CHF` - Swiss Franc - // - `SYP` - Syrian Pound - // - `STN` - São Tomé & Príncipe Dobra - // - `STD` - São Tomé & Príncipe Dobra (1977–2017) - // - `TVD` - TVD - // - `TJR` - Tajikistani Ruble - // - `TJS` - Tajikistani Somoni - // - `TZS` - Tanzanian Shilling - // - `XTS` - Testing Currency Code - // - `THB` - Thai Baht - // - `XXX` - The codes assigned for transactions where no currency is involved - // - `TPE` - Timorese Escudo - // - `TOP` - Tongan Paʻanga - // - `TTD` - Trinidad & Tobago Dollar - // - `TND` - Tunisian Dinar - // - `TRY` - Turkish Lira - // - `TRL` - Turkish Lira (1922–2005) - // - `TMT` - Turkmenistani Manat - // - `TMM` - Turkmenistani Manat (1993–2009) - // - `USD` - US Dollar - // - `USN` - US Dollar (Next day) - // - `USS` - US Dollar (Same day) - // - `UGX` - Ugandan Shilling - // - `UGS` - Ugandan Shilling (1966–1987) - // - `UAH` - Ukrainian Hryvnia - // - `UAK` - Ukrainian Karbovanets - // - `AED` - United Arab Emirates Dirham - // - `UYW` - Uruguayan Nominal Wage Index Unit - // - `UYU` - Uruguayan Peso - // - `UYP` - Uruguayan Peso (1975–1993) - // - `UYI` - Uruguayan Peso (Indexed Units) - // - `UZS` - Uzbekistani Som - // - `VUV` - Vanuatu Vatu - // - `VES` - Venezuelan Bolívar - // - `VEB` - Venezuelan Bolívar (1871–2008) - // - `VEF` - Venezuelan Bolívar (2008–2018) - // - `VND` - Vietnamese Dong - // - `VNN` - Vietnamese Dong (1978–1985) - // - `CHE` - WIR Euro - // - `CHW` - WIR Franc - // - `XOF` - West African CFA Franc - // - `YDD` - Yemeni Dinar - // - `YER` - Yemeni Rial - // - `YUN` - Yugoslavian Convertible Dinar (1990–1992) - // - `YUD` - Yugoslavian Hard Dinar (1966–1990) - // - `YUM` - Yugoslavian New Dinar (1994–2002) - // - `YUR` - Yugoslavian Reformed Dinar (1992–1993) - // - `ZWN` - ZWN - // - `ZRN` - Zairean New Zaire (1993–1998) - // - `ZRZ` - Zairean Zaire (1971–1993) - // - `ZMW` - Zambian Kwacha - // - `ZMK` - Zambian Kwacha (1968–2012) - // - `ZWD` - Zimbabwean Dollar (1980–2008) - // - `ZWR` - Zimbabwean Dollar (2008) - // - `ZWL` - Zimbabwean Dollar (2009) - Currency *CreditNoteRequestCurrency `json:"currency,omitempty"` - // Array of `Payment` object IDs - Payments []*CreditNoteRequestPaymentsItem `json:"payments,omitempty"` - // A list of the Payment Applied to Lines common models related to a given Invoice, Credit Note, or Journal Entry. - AppliedPayments []*CreditNoteRequestAppliedPaymentsItem `json:"applied_payments,omitempty"` - // The accounting period that the CreditNote was generated in. - AccountingPeriod *CreditNoteRequestAccountingPeriod `json:"accounting_period,omitempty"` - // A list of the CreditNote Applied to Lines common models related to a given Credit Note - AppliedToLines []*CreditNoteApplyLineForCreditNoteRequest `json:"applied_to_lines,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` - - _rawJSON json.RawMessage -} - -func (c *CreditNoteRequest) UnmarshalJSON(data []byte) error { - type unmarshaler CreditNoteRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *c = CreditNoteRequest(value) - c._rawJSON = json.RawMessage(data) - return nil -} - -func (c *CreditNoteRequest) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(c); err == nil { - return value - } - return fmt.Sprintf("%#v", c) -} - -// The accounting period that the CreditNote was generated in. -type CreditNoteRequestAccountingPeriod struct { - typeName string - String string - AccountingPeriod *AccountingPeriod -} - -func NewCreditNoteRequestAccountingPeriodFromString(value string) *CreditNoteRequestAccountingPeriod { - return &CreditNoteRequestAccountingPeriod{typeName: "string", String: value} -} - -func NewCreditNoteRequestAccountingPeriodFromAccountingPeriod(value *AccountingPeriod) *CreditNoteRequestAccountingPeriod { - return &CreditNoteRequestAccountingPeriod{typeName: "accountingPeriod", AccountingPeriod: value} -} - -func (c *CreditNoteRequestAccountingPeriod) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - c.typeName = "string" - c.String = valueString - return nil - } - valueAccountingPeriod := new(AccountingPeriod) - if err := json.Unmarshal(data, &valueAccountingPeriod); err == nil { - c.typeName = "accountingPeriod" - c.AccountingPeriod = valueAccountingPeriod - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, c) -} - -func (c CreditNoteRequestAccountingPeriod) MarshalJSON() ([]byte, error) { - switch c.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return json.Marshal(c.String) - case "accountingPeriod": - return json.Marshal(c.AccountingPeriod) - } -} - -type CreditNoteRequestAccountingPeriodVisitor interface { - VisitString(string) error - VisitAccountingPeriod(*AccountingPeriod) error -} - -func (c *CreditNoteRequestAccountingPeriod) Accept(visitor CreditNoteRequestAccountingPeriodVisitor) error { - switch c.typeName { - default: - return fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return visitor.VisitString(c.String) - case "accountingPeriod": - return visitor.VisitAccountingPeriod(c.AccountingPeriod) - } -} - -type CreditNoteRequestAppliedPaymentsItem struct { - typeName string - String string - PaymentLineItem *PaymentLineItem -} - -func NewCreditNoteRequestAppliedPaymentsItemFromString(value string) *CreditNoteRequestAppliedPaymentsItem { - return &CreditNoteRequestAppliedPaymentsItem{typeName: "string", String: value} -} - -func NewCreditNoteRequestAppliedPaymentsItemFromPaymentLineItem(value *PaymentLineItem) *CreditNoteRequestAppliedPaymentsItem { - return &CreditNoteRequestAppliedPaymentsItem{typeName: "paymentLineItem", PaymentLineItem: value} -} - -func (c *CreditNoteRequestAppliedPaymentsItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - c.typeName = "string" - c.String = valueString - return nil - } - valuePaymentLineItem := new(PaymentLineItem) - if err := json.Unmarshal(data, &valuePaymentLineItem); err == nil { - c.typeName = "paymentLineItem" - c.PaymentLineItem = valuePaymentLineItem - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, c) -} - -func (c CreditNoteRequestAppliedPaymentsItem) MarshalJSON() ([]byte, error) { - switch c.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return json.Marshal(c.String) - case "paymentLineItem": - return json.Marshal(c.PaymentLineItem) - } -} - -type CreditNoteRequestAppliedPaymentsItemVisitor interface { - VisitString(string) error - VisitPaymentLineItem(*PaymentLineItem) error -} - -func (c *CreditNoteRequestAppliedPaymentsItem) Accept(visitor CreditNoteRequestAppliedPaymentsItemVisitor) error { - switch c.typeName { - default: - return fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return visitor.VisitString(c.String) - case "paymentLineItem": - return visitor.VisitPaymentLineItem(c.PaymentLineItem) - } -} - -// The company the credit note belongs to. -type CreditNoteRequestCompany struct { - typeName string - String string - CompanyInfo *CompanyInfo -} - -func NewCreditNoteRequestCompanyFromString(value string) *CreditNoteRequestCompany { - return &CreditNoteRequestCompany{typeName: "string", String: value} -} - -func NewCreditNoteRequestCompanyFromCompanyInfo(value *CompanyInfo) *CreditNoteRequestCompany { - return &CreditNoteRequestCompany{typeName: "companyInfo", CompanyInfo: value} -} - -func (c *CreditNoteRequestCompany) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - c.typeName = "string" - c.String = valueString - return nil - } - valueCompanyInfo := new(CompanyInfo) - if err := json.Unmarshal(data, &valueCompanyInfo); err == nil { - c.typeName = "companyInfo" - c.CompanyInfo = valueCompanyInfo - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, c) -} - -func (c CreditNoteRequestCompany) MarshalJSON() ([]byte, error) { - switch c.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return json.Marshal(c.String) - case "companyInfo": - return json.Marshal(c.CompanyInfo) - } -} - -type CreditNoteRequestCompanyVisitor interface { - VisitString(string) error - VisitCompanyInfo(*CompanyInfo) error -} - -func (c *CreditNoteRequestCompany) Accept(visitor CreditNoteRequestCompanyVisitor) error { - switch c.typeName { - default: - return fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return visitor.VisitString(c.String) - case "companyInfo": - return visitor.VisitCompanyInfo(c.CompanyInfo) - } -} - -// The credit note's contact. -type CreditNoteRequestContact struct { - typeName string - String string - Contact *Contact -} - -func NewCreditNoteRequestContactFromString(value string) *CreditNoteRequestContact { - return &CreditNoteRequestContact{typeName: "string", String: value} -} - -func NewCreditNoteRequestContactFromContact(value *Contact) *CreditNoteRequestContact { - return &CreditNoteRequestContact{typeName: "contact", Contact: value} -} - -func (c *CreditNoteRequestContact) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - c.typeName = "string" - c.String = valueString - return nil - } - valueContact := new(Contact) - if err := json.Unmarshal(data, &valueContact); err == nil { - c.typeName = "contact" - c.Contact = valueContact - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, c) -} - -func (c CreditNoteRequestContact) MarshalJSON() ([]byte, error) { - switch c.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return json.Marshal(c.String) - case "contact": - return json.Marshal(c.Contact) - } -} - -type CreditNoteRequestContactVisitor interface { - VisitString(string) error - VisitContact(*Contact) error -} - -func (c *CreditNoteRequestContact) Accept(visitor CreditNoteRequestContactVisitor) error { - switch c.typeName { - default: - return fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return visitor.VisitString(c.String) - case "contact": - return visitor.VisitContact(c.Contact) - } -} - -// The credit note's currency. -// -// - `XUA` - ADB Unit of Account -// - `AFN` - Afghan Afghani -// - `AFA` - Afghan Afghani (1927–2002) -// - `ALL` - Albanian Lek -// - `ALK` - Albanian Lek (1946–1965) -// - `DZD` - Algerian Dinar -// - `ADP` - Andorran Peseta -// - `AOA` - Angolan Kwanza -// - `AOK` - Angolan Kwanza (1977–1991) -// - `AON` - Angolan New Kwanza (1990–2000) -// - `AOR` - Angolan Readjusted Kwanza (1995–1999) -// - `ARA` - Argentine Austral -// - `ARS` - Argentine Peso -// - `ARM` - Argentine Peso (1881–1970) -// - `ARP` - Argentine Peso (1983–1985) -// - `ARL` - Argentine Peso Ley (1970–1983) -// - `AMD` - Armenian Dram -// - `AWG` - Aruban Florin -// - `AUD` - Australian Dollar -// - `ATS` - Austrian Schilling -// - `AZN` - Azerbaijani Manat -// - `AZM` - Azerbaijani Manat (1993–2006) -// - `BSD` - Bahamian Dollar -// - `BHD` - Bahraini Dinar -// - `BDT` - Bangladeshi Taka -// - `BBD` - Barbadian Dollar -// - `BYN` - Belarusian Ruble -// - `BYB` - Belarusian Ruble (1994–1999) -// - `BYR` - Belarusian Ruble (2000–2016) -// - `BEF` - Belgian Franc -// - `BEC` - Belgian Franc (convertible) -// - `BEL` - Belgian Franc (financial) -// - `BZD` - Belize Dollar -// - `BMD` - Bermudan Dollar -// - `BTN` - Bhutanese Ngultrum -// - `BOB` - Bolivian Boliviano -// - `BOL` - Bolivian Boliviano (1863–1963) -// - `BOV` - Bolivian Mvdol -// - `BOP` - Bolivian Peso -// - `BAM` - Bosnia-Herzegovina Convertible Mark -// - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) -// - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) -// - `BWP` - Botswanan Pula -// - `BRC` - Brazilian Cruzado (1986–1989) -// - `BRZ` - Brazilian Cruzeiro (1942–1967) -// - `BRE` - Brazilian Cruzeiro (1990–1993) -// - `BRR` - Brazilian Cruzeiro (1993–1994) -// - `BRN` - Brazilian New Cruzado (1989–1990) -// - `BRB` - Brazilian New Cruzeiro (1967–1986) -// - `BRL` - Brazilian Real -// - `GBP` - British Pound -// - `BND` - Brunei Dollar -// - `BGL` - Bulgarian Hard Lev -// - `BGN` - Bulgarian Lev -// - `BGO` - Bulgarian Lev (1879–1952) -// - `BGM` - Bulgarian Socialist Lev -// - `BUK` - Burmese Kyat -// - `BIF` - Burundian Franc -// - `XPF` - CFP Franc -// - `KHR` - Cambodian Riel -// - `CAD` - Canadian Dollar -// - `CVE` - Cape Verdean Escudo -// - `KYD` - Cayman Islands Dollar -// - `XAF` - Central African CFA Franc -// - `CLE` - Chilean Escudo -// - `CLP` - Chilean Peso -// - `CLF` - Chilean Unit of Account (UF) -// - `CNX` - Chinese People’s Bank Dollar -// - `CNY` - Chinese Yuan -// - `CNH` - Chinese Yuan (offshore) -// - `COP` - Colombian Peso -// - `COU` - Colombian Real Value Unit -// - `KMF` - Comorian Franc -// - `CDF` - Congolese Franc -// - `CRC` - Costa Rican Colón -// - `HRD` - Croatian Dinar -// - `HRK` - Croatian Kuna -// - `CUC` - Cuban Convertible Peso -// - `CUP` - Cuban Peso -// - `CYP` - Cypriot Pound -// - `CZK` - Czech Koruna -// - `CSK` - Czechoslovak Hard Koruna -// - `DKK` - Danish Krone -// - `DJF` - Djiboutian Franc -// - `DOP` - Dominican Peso -// - `NLG` - Dutch Guilder -// - `XCD` - East Caribbean Dollar -// - `DDM` - East German Mark -// - `ECS` - Ecuadorian Sucre -// - `ECV` - Ecuadorian Unit of Constant Value -// - `EGP` - Egyptian Pound -// - `GQE` - Equatorial Guinean Ekwele -// - `ERN` - Eritrean Nakfa -// - `EEK` - Estonian Kroon -// - `ETB` - Ethiopian Birr -// - `EUR` - Euro -// - `XBA` - European Composite Unit -// - `XEU` - European Currency Unit -// - `XBB` - European Monetary Unit -// - `XBC` - European Unit of Account (XBC) -// - `XBD` - European Unit of Account (XBD) -// - `FKP` - Falkland Islands Pound -// - `FJD` - Fijian Dollar -// - `FIM` - Finnish Markka -// - `FRF` - French Franc -// - `XFO` - French Gold Franc -// - `XFU` - French UIC-Franc -// - `GMD` - Gambian Dalasi -// - `GEK` - Georgian Kupon Larit -// - `GEL` - Georgian Lari -// - `DEM` - German Mark -// - `GHS` - Ghanaian Cedi -// - `GHC` - Ghanaian Cedi (1979–2007) -// - `GIP` - Gibraltar Pound -// - `XAU` - Gold -// - `GRD` - Greek Drachma -// - `GTQ` - Guatemalan Quetzal -// - `GWP` - Guinea-Bissau Peso -// - `GNF` - Guinean Franc -// - `GNS` - Guinean Syli -// - `GYD` - Guyanaese Dollar -// - `HTG` - Haitian Gourde -// - `HNL` - Honduran Lempira -// - `HKD` - Hong Kong Dollar -// - `HUF` - Hungarian Forint -// - `IMP` - IMP -// - `ISK` - Icelandic Króna -// - `ISJ` - Icelandic Króna (1918–1981) -// - `INR` - Indian Rupee -// - `IDR` - Indonesian Rupiah -// - `IRR` - Iranian Rial -// - `IQD` - Iraqi Dinar -// - `IEP` - Irish Pound -// - `ILS` - Israeli New Shekel -// - `ILP` - Israeli Pound -// - `ILR` - Israeli Shekel (1980–1985) -// - `ITL` - Italian Lira -// - `JMD` - Jamaican Dollar -// - `JPY` - Japanese Yen -// - `JOD` - Jordanian Dinar -// - `KZT` - Kazakhstani Tenge -// - `KES` - Kenyan Shilling -// - `KWD` - Kuwaiti Dinar -// - `KGS` - Kyrgystani Som -// - `LAK` - Laotian Kip -// - `LVL` - Latvian Lats -// - `LVR` - Latvian Ruble -// - `LBP` - Lebanese Pound -// - `LSL` - Lesotho Loti -// - `LRD` - Liberian Dollar -// - `LYD` - Libyan Dinar -// - `LTL` - Lithuanian Litas -// - `LTT` - Lithuanian Talonas -// - `LUL` - Luxembourg Financial Franc -// - `LUC` - Luxembourgian Convertible Franc -// - `LUF` - Luxembourgian Franc -// - `MOP` - Macanese Pataca -// - `MKD` - Macedonian Denar -// - `MKN` - Macedonian Denar (1992–1993) -// - `MGA` - Malagasy Ariary -// - `MGF` - Malagasy Franc -// - `MWK` - Malawian Kwacha -// - `MYR` - Malaysian Ringgit -// - `MVR` - Maldivian Rufiyaa -// - `MVP` - Maldivian Rupee (1947–1981) -// - `MLF` - Malian Franc -// - `MTL` - Maltese Lira -// - `MTP` - Maltese Pound -// - `MRU` - Mauritanian Ouguiya -// - `MRO` - Mauritanian Ouguiya (1973–2017) -// - `MUR` - Mauritian Rupee -// - `MXV` - Mexican Investment Unit -// - `MXN` - Mexican Peso -// - `MXP` - Mexican Silver Peso (1861–1992) -// - `MDC` - Moldovan Cupon -// - `MDL` - Moldovan Leu -// - `MCF` - Monegasque Franc -// - `MNT` - Mongolian Tugrik -// - `MAD` - Moroccan Dirham -// - `MAF` - Moroccan Franc -// - `MZE` - Mozambican Escudo -// - `MZN` - Mozambican Metical -// - `MZM` - Mozambican Metical (1980–2006) -// - `MMK` - Myanmar Kyat -// - `NAD` - Namibian Dollar -// - `NPR` - Nepalese Rupee -// - `ANG` - Netherlands Antillean Guilder -// - `TWD` - New Taiwan Dollar -// - `NZD` - New Zealand Dollar -// - `NIO` - Nicaraguan Córdoba -// - `NIC` - Nicaraguan Córdoba (1988–1991) -// - `NGN` - Nigerian Naira -// - `KPW` - North Korean Won -// - `NOK` - Norwegian Krone -// - `OMR` - Omani Rial -// - `PKR` - Pakistani Rupee -// - `XPD` - Palladium -// - `PAB` - Panamanian Balboa -// - `PGK` - Papua New Guinean Kina -// - `PYG` - Paraguayan Guarani -// - `PEI` - Peruvian Inti -// - `PEN` - Peruvian Sol -// - `PES` - Peruvian Sol (1863–1965) -// - `PHP` - Philippine Peso -// - `XPT` - Platinum -// - `PLN` - Polish Zloty -// - `PLZ` - Polish Zloty (1950–1995) -// - `PTE` - Portuguese Escudo -// - `GWE` - Portuguese Guinea Escudo -// - `QAR` - Qatari Rial -// - `XRE` - RINET Funds -// - `RHD` - Rhodesian Dollar -// - `RON` - Romanian Leu -// - `ROL` - Romanian Leu (1952–2006) -// - `RUB` - Russian Ruble -// - `RUR` - Russian Ruble (1991–1998) -// - `RWF` - Rwandan Franc -// - `SVC` - Salvadoran Colón -// - `WST` - Samoan Tala -// - `SAR` - Saudi Riyal -// - `RSD` - Serbian Dinar -// - `CSD` - Serbian Dinar (2002–2006) -// - `SCR` - Seychellois Rupee -// - `SLL` - Sierra Leonean Leone -// - `XAG` - Silver -// - `SGD` - Singapore Dollar -// - `SKK` - Slovak Koruna -// - `SIT` - Slovenian Tolar -// - `SBD` - Solomon Islands Dollar -// - `SOS` - Somali Shilling -// - `ZAR` - South African Rand -// - `ZAL` - South African Rand (financial) -// - `KRH` - South Korean Hwan (1953–1962) -// - `KRW` - South Korean Won -// - `KRO` - South Korean Won (1945–1953) -// - `SSP` - South Sudanese Pound -// - `SUR` - Soviet Rouble -// - `ESP` - Spanish Peseta -// - `ESA` - Spanish Peseta (A account) -// - `ESB` - Spanish Peseta (convertible account) -// - `XDR` - Special Drawing Rights -// - `LKR` - Sri Lankan Rupee -// - `SHP` - St. Helena Pound -// - `XSU` - Sucre -// - `SDD` - Sudanese Dinar (1992–2007) -// - `SDG` - Sudanese Pound -// - `SDP` - Sudanese Pound (1957–1998) -// - `SRD` - Surinamese Dollar -// - `SRG` - Surinamese Guilder -// - `SZL` - Swazi Lilangeni -// - `SEK` - Swedish Krona -// - `CHF` - Swiss Franc -// - `SYP` - Syrian Pound -// - `STN` - São Tomé & Príncipe Dobra -// - `STD` - São Tomé & Príncipe Dobra (1977–2017) -// - `TVD` - TVD -// - `TJR` - Tajikistani Ruble -// - `TJS` - Tajikistani Somoni -// - `TZS` - Tanzanian Shilling -// - `XTS` - Testing Currency Code -// - `THB` - Thai Baht -// - `XXX` - The codes assigned for transactions where no currency is involved -// - `TPE` - Timorese Escudo -// - `TOP` - Tongan Paʻanga -// - `TTD` - Trinidad & Tobago Dollar -// - `TND` - Tunisian Dinar -// - `TRY` - Turkish Lira -// - `TRL` - Turkish Lira (1922–2005) -// - `TMT` - Turkmenistani Manat -// - `TMM` - Turkmenistani Manat (1993–2009) -// - `USD` - US Dollar -// - `USN` - US Dollar (Next day) -// - `USS` - US Dollar (Same day) -// - `UGX` - Ugandan Shilling -// - `UGS` - Ugandan Shilling (1966–1987) -// - `UAH` - Ukrainian Hryvnia -// - `UAK` - Ukrainian Karbovanets -// - `AED` - United Arab Emirates Dirham -// - `UYW` - Uruguayan Nominal Wage Index Unit -// - `UYU` - Uruguayan Peso -// - `UYP` - Uruguayan Peso (1975–1993) -// - `UYI` - Uruguayan Peso (Indexed Units) -// - `UZS` - Uzbekistani Som -// - `VUV` - Vanuatu Vatu -// - `VES` - Venezuelan Bolívar -// - `VEB` - Venezuelan Bolívar (1871–2008) -// - `VEF` - Venezuelan Bolívar (2008–2018) -// - `VND` - Vietnamese Dong -// - `VNN` - Vietnamese Dong (1978–1985) -// - `CHE` - WIR Euro -// - `CHW` - WIR Franc -// - `XOF` - West African CFA Franc -// - `YDD` - Yemeni Dinar -// - `YER` - Yemeni Rial -// - `YUN` - Yugoslavian Convertible Dinar (1990–1992) -// - `YUD` - Yugoslavian Hard Dinar (1966–1990) -// - `YUM` - Yugoslavian New Dinar (1994–2002) -// - `YUR` - Yugoslavian Reformed Dinar (1992–1993) -// - `ZWN` - ZWN -// - `ZRN` - Zairean New Zaire (1993–1998) -// - `ZRZ` - Zairean Zaire (1971–1993) -// - `ZMW` - Zambian Kwacha -// - `ZMK` - Zambian Kwacha (1968–2012) -// - `ZWD` - Zimbabwean Dollar (1980–2008) -// - `ZWR` - Zimbabwean Dollar (2008) -// - `ZWL` - Zimbabwean Dollar (2009) -type CreditNoteRequestCurrency struct { - typeName string - TransactionCurrencyEnum TransactionCurrencyEnum - String string -} - -func NewCreditNoteRequestCurrencyFromTransactionCurrencyEnum(value TransactionCurrencyEnum) *CreditNoteRequestCurrency { - return &CreditNoteRequestCurrency{typeName: "transactionCurrencyEnum", TransactionCurrencyEnum: value} -} - -func NewCreditNoteRequestCurrencyFromString(value string) *CreditNoteRequestCurrency { - return &CreditNoteRequestCurrency{typeName: "string", String: value} -} - -func (c *CreditNoteRequestCurrency) UnmarshalJSON(data []byte) error { - var valueTransactionCurrencyEnum TransactionCurrencyEnum - if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { - c.typeName = "transactionCurrencyEnum" - c.TransactionCurrencyEnum = valueTransactionCurrencyEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - c.typeName = "string" - c.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, c) -} - -func (c CreditNoteRequestCurrency) MarshalJSON() ([]byte, error) { - switch c.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "transactionCurrencyEnum": - return json.Marshal(c.TransactionCurrencyEnum) - case "string": - return json.Marshal(c.String) - } -} - -type CreditNoteRequestCurrencyVisitor interface { - VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error - VisitString(string) error -} - -func (c *CreditNoteRequestCurrency) Accept(visitor CreditNoteRequestCurrencyVisitor) error { - switch c.typeName { - default: - return fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "transactionCurrencyEnum": - return visitor.VisitTransactionCurrencyEnum(c.TransactionCurrencyEnum) - case "string": - return visitor.VisitString(c.String) - } -} - -type CreditNoteRequestLineItemsItem struct { - typeName string - String string - CreditNoteLineItemRequest *CreditNoteLineItemRequest -} - -func NewCreditNoteRequestLineItemsItemFromString(value string) *CreditNoteRequestLineItemsItem { - return &CreditNoteRequestLineItemsItem{typeName: "string", String: value} -} - -func NewCreditNoteRequestLineItemsItemFromCreditNoteLineItemRequest(value *CreditNoteLineItemRequest) *CreditNoteRequestLineItemsItem { - return &CreditNoteRequestLineItemsItem{typeName: "creditNoteLineItemRequest", CreditNoteLineItemRequest: value} -} - -func (c *CreditNoteRequestLineItemsItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - c.typeName = "string" - c.String = valueString - return nil - } - valueCreditNoteLineItemRequest := new(CreditNoteLineItemRequest) - if err := json.Unmarshal(data, &valueCreditNoteLineItemRequest); err == nil { - c.typeName = "creditNoteLineItemRequest" - c.CreditNoteLineItemRequest = valueCreditNoteLineItemRequest - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, c) -} - -func (c CreditNoteRequestLineItemsItem) MarshalJSON() ([]byte, error) { - switch c.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return json.Marshal(c.String) - case "creditNoteLineItemRequest": - return json.Marshal(c.CreditNoteLineItemRequest) - } -} - -type CreditNoteRequestLineItemsItemVisitor interface { - VisitString(string) error - VisitCreditNoteLineItemRequest(*CreditNoteLineItemRequest) error -} - -func (c *CreditNoteRequestLineItemsItem) Accept(visitor CreditNoteRequestLineItemsItemVisitor) error { - switch c.typeName { - default: - return fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return visitor.VisitString(c.String) - case "creditNoteLineItemRequest": - return visitor.VisitCreditNoteLineItemRequest(c.CreditNoteLineItemRequest) - } -} - -type CreditNoteRequestPaymentsItem struct { - typeName string - String string - Payment *Payment -} - -func NewCreditNoteRequestPaymentsItemFromString(value string) *CreditNoteRequestPaymentsItem { - return &CreditNoteRequestPaymentsItem{typeName: "string", String: value} -} - -func NewCreditNoteRequestPaymentsItemFromPayment(value *Payment) *CreditNoteRequestPaymentsItem { - return &CreditNoteRequestPaymentsItem{typeName: "payment", Payment: value} -} - -func (c *CreditNoteRequestPaymentsItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - c.typeName = "string" - c.String = valueString - return nil - } - valuePayment := new(Payment) - if err := json.Unmarshal(data, &valuePayment); err == nil { - c.typeName = "payment" - c.Payment = valuePayment - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, c) -} - -func (c CreditNoteRequestPaymentsItem) MarshalJSON() ([]byte, error) { - switch c.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return json.Marshal(c.String) - case "payment": - return json.Marshal(c.Payment) - } -} - -type CreditNoteRequestPaymentsItemVisitor interface { - VisitString(string) error - VisitPayment(*Payment) error -} - -func (c *CreditNoteRequestPaymentsItem) Accept(visitor CreditNoteRequestPaymentsItemVisitor) error { - switch c.typeName { - default: - return fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return visitor.VisitString(c.String) - case "payment": - return visitor.VisitPayment(c.Payment) - } -} - -// The credit note's status. -// -// - `SUBMITTED` - SUBMITTED -// - `AUTHORIZED` - AUTHORIZED -// - `PAID` - PAID -type CreditNoteRequestStatus struct { - typeName string - CreditNoteStatusEnum CreditNoteStatusEnum - String string -} - -func NewCreditNoteRequestStatusFromCreditNoteStatusEnum(value CreditNoteStatusEnum) *CreditNoteRequestStatus { - return &CreditNoteRequestStatus{typeName: "creditNoteStatusEnum", CreditNoteStatusEnum: value} -} - -func NewCreditNoteRequestStatusFromString(value string) *CreditNoteRequestStatus { - return &CreditNoteRequestStatus{typeName: "string", String: value} -} - -func (c *CreditNoteRequestStatus) UnmarshalJSON(data []byte) error { - var valueCreditNoteStatusEnum CreditNoteStatusEnum - if err := json.Unmarshal(data, &valueCreditNoteStatusEnum); err == nil { - c.typeName = "creditNoteStatusEnum" - c.CreditNoteStatusEnum = valueCreditNoteStatusEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - c.typeName = "string" - c.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, c) -} - -func (c CreditNoteRequestStatus) MarshalJSON() ([]byte, error) { - switch c.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "creditNoteStatusEnum": - return json.Marshal(c.CreditNoteStatusEnum) - case "string": - return json.Marshal(c.String) - } -} - -type CreditNoteRequestStatusVisitor interface { - VisitCreditNoteStatusEnum(CreditNoteStatusEnum) error - VisitString(string) error -} - -func (c *CreditNoteRequestStatus) Accept(visitor CreditNoteRequestStatusVisitor) error { - switch c.typeName { - default: - return fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "creditNoteStatusEnum": - return visitor.VisitCreditNoteStatusEnum(c.CreditNoteStatusEnum) - case "string": - return visitor.VisitString(c.String) - } -} - -type CreditNoteRequestTrackingCategoriesItem struct { - typeName string - String string - TrackingCategory *TrackingCategory -} - -func NewCreditNoteRequestTrackingCategoriesItemFromString(value string) *CreditNoteRequestTrackingCategoriesItem { - return &CreditNoteRequestTrackingCategoriesItem{typeName: "string", String: value} -} - -func NewCreditNoteRequestTrackingCategoriesItemFromTrackingCategory(value *TrackingCategory) *CreditNoteRequestTrackingCategoriesItem { - return &CreditNoteRequestTrackingCategoriesItem{typeName: "trackingCategory", TrackingCategory: value} -} - -func (c *CreditNoteRequestTrackingCategoriesItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - c.typeName = "string" - c.String = valueString - return nil - } - valueTrackingCategory := new(TrackingCategory) - if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { - c.typeName = "trackingCategory" - c.TrackingCategory = valueTrackingCategory - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, c) -} - -func (c CreditNoteRequestTrackingCategoriesItem) MarshalJSON() ([]byte, error) { - switch c.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return json.Marshal(c.String) - case "trackingCategory": - return json.Marshal(c.TrackingCategory) - } -} - -type CreditNoteRequestTrackingCategoriesItemVisitor interface { - VisitString(string) error - VisitTrackingCategory(*TrackingCategory) error -} - -func (c *CreditNoteRequestTrackingCategoriesItem) Accept(visitor CreditNoteRequestTrackingCategoriesItemVisitor) error { - switch c.typeName { - default: - return fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return visitor.VisitString(c.String) - case "trackingCategory": - return visitor.VisitTrackingCategory(c.TrackingCategory) - } -} - -type CreditNoteResponse struct { - Model *CreditNote `json:"model,omitempty"` - Warnings []*WarningValidationProblem `json:"warnings,omitempty"` - Errors []*ErrorValidationProblem `json:"errors,omitempty"` - Logs []*DebugModeLog `json:"logs,omitempty"` - - _rawJSON json.RawMessage -} - -func (c *CreditNoteResponse) UnmarshalJSON(data []byte) error { - type unmarshaler CreditNoteResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *c = CreditNoteResponse(value) - c._rawJSON = json.RawMessage(data) - return nil -} - -func (c *CreditNoteResponse) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(c); err == nil { - return value - } - return fmt.Sprintf("%#v", c) -} - -// The credit note's status. -// -// - `SUBMITTED` - SUBMITTED -// - `AUTHORIZED` - AUTHORIZED -// - `PAID` - PAID -type CreditNoteStatus struct { - typeName string - CreditNoteStatusEnum CreditNoteStatusEnum - String string -} - -func NewCreditNoteStatusFromCreditNoteStatusEnum(value CreditNoteStatusEnum) *CreditNoteStatus { - return &CreditNoteStatus{typeName: "creditNoteStatusEnum", CreditNoteStatusEnum: value} -} - -func NewCreditNoteStatusFromString(value string) *CreditNoteStatus { - return &CreditNoteStatus{typeName: "string", String: value} -} - -func (c *CreditNoteStatus) UnmarshalJSON(data []byte) error { - var valueCreditNoteStatusEnum CreditNoteStatusEnum - if err := json.Unmarshal(data, &valueCreditNoteStatusEnum); err == nil { - c.typeName = "creditNoteStatusEnum" - c.CreditNoteStatusEnum = valueCreditNoteStatusEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - c.typeName = "string" - c.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, c) -} - -func (c CreditNoteStatus) MarshalJSON() ([]byte, error) { - switch c.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "creditNoteStatusEnum": - return json.Marshal(c.CreditNoteStatusEnum) - case "string": - return json.Marshal(c.String) - } -} - -type CreditNoteStatusVisitor interface { - VisitCreditNoteStatusEnum(CreditNoteStatusEnum) error - VisitString(string) error -} - -func (c *CreditNoteStatus) Accept(visitor CreditNoteStatusVisitor) error { - switch c.typeName { - default: - return fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "creditNoteStatusEnum": - return visitor.VisitCreditNoteStatusEnum(c.CreditNoteStatusEnum) - case "string": - return visitor.VisitString(c.String) - } -} - -// - `SUBMITTED` - SUBMITTED -// - `AUTHORIZED` - AUTHORIZED -// - `PAID` - PAID -type CreditNoteStatusEnum string - -const ( - CreditNoteStatusEnumSubmitted CreditNoteStatusEnum = "SUBMITTED" - CreditNoteStatusEnumAuthorized CreditNoteStatusEnum = "AUTHORIZED" - CreditNoteStatusEnumPaid CreditNoteStatusEnum = "PAID" -) - -func NewCreditNoteStatusEnumFromString(s string) (CreditNoteStatusEnum, error) { - switch s { - case "SUBMITTED": - return CreditNoteStatusEnumSubmitted, nil - case "AUTHORIZED": - return CreditNoteStatusEnumAuthorized, nil - case "PAID": - return CreditNoteStatusEnumPaid, nil - } - var t CreditNoteStatusEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (c CreditNoteStatusEnum) Ptr() *CreditNoteStatusEnum { - return &c -} - -type CreditNoteTrackingCategoriesItem struct { - typeName string - String string - TrackingCategory *TrackingCategory -} - -func NewCreditNoteTrackingCategoriesItemFromString(value string) *CreditNoteTrackingCategoriesItem { - return &CreditNoteTrackingCategoriesItem{typeName: "string", String: value} -} - -func NewCreditNoteTrackingCategoriesItemFromTrackingCategory(value *TrackingCategory) *CreditNoteTrackingCategoriesItem { - return &CreditNoteTrackingCategoriesItem{typeName: "trackingCategory", TrackingCategory: value} -} - -func (c *CreditNoteTrackingCategoriesItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - c.typeName = "string" - c.String = valueString - return nil - } - valueTrackingCategory := new(TrackingCategory) - if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { - c.typeName = "trackingCategory" - c.TrackingCategory = valueTrackingCategory - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, c) -} - -func (c CreditNoteTrackingCategoriesItem) MarshalJSON() ([]byte, error) { - switch c.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return json.Marshal(c.String) - case "trackingCategory": - return json.Marshal(c.TrackingCategory) - } -} - -type CreditNoteTrackingCategoriesItemVisitor interface { - VisitString(string) error - VisitTrackingCategory(*TrackingCategory) error -} - -func (c *CreditNoteTrackingCategoriesItem) Accept(visitor CreditNoteTrackingCategoriesItemVisitor) error { - switch c.typeName { - default: - return fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return visitor.VisitString(c.String) - case "trackingCategory": - return visitor.VisitTrackingCategory(c.TrackingCategory) - } -} - -// - `CREDIT` - CREDIT -// - `DEBIT` - DEBIT -type CreditOrDebitEnum string - -const ( - CreditOrDebitEnumCredit CreditOrDebitEnum = "CREDIT" - CreditOrDebitEnumDebit CreditOrDebitEnum = "DEBIT" -) - -func NewCreditOrDebitEnumFromString(s string) (CreditOrDebitEnum, error) { - switch s { - case "CREDIT": - return CreditOrDebitEnumCredit, nil - case "DEBIT": - return CreditOrDebitEnumDebit, nil - } - var t CreditOrDebitEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (c CreditOrDebitEnum) Ptr() *CreditOrDebitEnum { - return &c -} - -// # The DataPassthrough Object -// -// ### Description -// -// The `DataPassthrough` object is used to send information to an otherwise-unsupported third-party endpoint. -// -// ### Usage Example -// -// Create a `DataPassthrough` to get team hierarchies from your Rippling integration. -type DataPassthroughRequest struct { - Method MethodEnum `json:"method,omitempty"` - // The path of the request in the third party's platform. - Path string `json:"path"` - // An optional override of the third party's base url for the request. - BaseUrlOverride *string `json:"base_url_override,omitempty"` - // The data with the request. You must include a `request_format` parameter matching the data's format - Data *string `json:"data,omitempty"` - // Pass an array of `MultipartFormField` objects in here instead of using the `data` param if `request_format` is set to `MULTIPART`. - MultipartFormData []*MultipartFormFieldRequest `json:"multipart_form_data,omitempty"` - // The headers to use for the request (Merge will handle the account's authorization headers). `Content-Type` header is required for passthrough. Choose content type corresponding to expected format of receiving server. - Headers map[string]interface{} `json:"headers,omitempty"` - RequestFormat *RequestFormatEnum `json:"request_format,omitempty"` - // Optional. If true, the response will always be an object of the form `{"type": T, "value": ...}` where `T` will be one of `string, boolean, number, null, array, object`. - NormalizeResponse *bool `json:"normalize_response,omitempty"` - - _rawJSON json.RawMessage -} - -func (d *DataPassthroughRequest) UnmarshalJSON(data []byte) error { - type unmarshaler DataPassthroughRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *d = DataPassthroughRequest(value) - d._rawJSON = json.RawMessage(data) - return nil -} - -func (d *DataPassthroughRequest) String() string { - if len(d._rawJSON) > 0 { - if value, err := core.StringifyJSON(d._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(d); err == nil { - return value - } - return fmt.Sprintf("%#v", d) -} - -type DebugModeLog struct { - LogId string `json:"log_id"` - DashboardView string `json:"dashboard_view"` - LogSummary *DebugModelLogSummary `json:"log_summary,omitempty"` - - _rawJSON json.RawMessage -} - -func (d *DebugModeLog) UnmarshalJSON(data []byte) error { - type unmarshaler DebugModeLog - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *d = DebugModeLog(value) - d._rawJSON = json.RawMessage(data) - return nil -} - -func (d *DebugModeLog) String() string { - if len(d._rawJSON) > 0 { - if value, err := core.StringifyJSON(d._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(d); err == nil { - return value - } - return fmt.Sprintf("%#v", d) -} - -type DebugModelLogSummary struct { - Url string `json:"url"` - Method string `json:"method"` - StatusCode int `json:"status_code"` - - _rawJSON json.RawMessage -} - -func (d *DebugModelLogSummary) UnmarshalJSON(data []byte) error { - type unmarshaler DebugModelLogSummary - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *d = DebugModelLogSummary(value) - d._rawJSON = json.RawMessage(data) - return nil -} - -func (d *DebugModelLogSummary) String() string { - if len(d._rawJSON) > 0 { - if value, err := core.StringifyJSON(d._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(d); err == nil { - return value - } - return fmt.Sprintf("%#v", d) -} - -// # The Employee Object -// -// ### Description -// -// An `Employee` is an individual who works for the company of the linked account. The `Employee` model contains both contractors and full time employees. -// -// - An `Employee` is a contractor if `is_contractor` property is `True` -// - An `Employee` is a full time employee if `is_contractor` property is `False` -// -// ### Usage Example -// -// Fetch from the `LIST Employees` endpoint and view a company's employees. -type Employee struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The employee's first name. - FirstName *string `json:"first_name,omitempty"` - // The employee's last name. - LastName *string `json:"last_name,omitempty"` - // `True` if the employee is a contractor, `False` if not. - IsContractor *bool `json:"is_contractor,omitempty"` - // The employee's internal identification number. - EmployeeNumber *string `json:"employee_number,omitempty"` - // The employee's email address. - EmailAddress *string `json:"email_address,omitempty"` - // The subsidiary that the employee belongs to. - Company *EmployeeCompany `json:"company,omitempty"` - // The employee's status in the accounting system. - // - // - `ACTIVE` - ACTIVE - // - `INACTIVE` - INACTIVE - Status *EmployeeStatus `json:"status,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` - - _rawJSON json.RawMessage -} - -func (e *Employee) UnmarshalJSON(data []byte) error { - type unmarshaler Employee - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *e = Employee(value) - e._rawJSON = json.RawMessage(data) - return nil -} - -func (e *Employee) String() string { - if len(e._rawJSON) > 0 { - if value, err := core.StringifyJSON(e._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(e); err == nil { - return value - } - return fmt.Sprintf("%#v", e) -} - -// The subsidiary that the employee belongs to. -type EmployeeCompany struct { - typeName string - String string - Unknown interface{} -} - -func NewEmployeeCompanyFromString(value string) *EmployeeCompany { - return &EmployeeCompany{typeName: "string", String: value} -} - -func NewEmployeeCompanyFromUnknown(value interface{}) *EmployeeCompany { - return &EmployeeCompany{typeName: "unknown", Unknown: value} -} - -func (e *EmployeeCompany) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString - return nil - } - var valueUnknown interface{} - if err := json.Unmarshal(data, &valueUnknown); err == nil { - e.typeName = "unknown" - e.Unknown = valueUnknown - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) -} - -func (e EmployeeCompany) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return json.Marshal(e.String) - case "unknown": - return json.Marshal(e.Unknown) - } -} - -type EmployeeCompanyVisitor interface { - VisitString(string) error - VisitUnknown(interface{}) error -} - -func (e *EmployeeCompany) Accept(visitor EmployeeCompanyVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return visitor.VisitString(e.String) - case "unknown": - return visitor.VisitUnknown(e.Unknown) - } -} - -// The employee's status in the accounting system. -// -// - `ACTIVE` - ACTIVE -// - `INACTIVE` - INACTIVE -type EmployeeStatus struct { - typeName string - Status895Enum Status895Enum - String string -} - -func NewEmployeeStatusFromStatus895Enum(value Status895Enum) *EmployeeStatus { - return &EmployeeStatus{typeName: "status895Enum", Status895Enum: value} -} - -func NewEmployeeStatusFromString(value string) *EmployeeStatus { - return &EmployeeStatus{typeName: "string", String: value} -} - -func (e *EmployeeStatus) UnmarshalJSON(data []byte) error { - var valueStatus895Enum Status895Enum - if err := json.Unmarshal(data, &valueStatus895Enum); err == nil { - e.typeName = "status895Enum" - e.Status895Enum = valueStatus895Enum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) -} - -func (e EmployeeStatus) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "status895Enum": - return json.Marshal(e.Status895Enum) - case "string": - return json.Marshal(e.String) - } -} - -type EmployeeStatusVisitor interface { - VisitStatus895Enum(Status895Enum) error - VisitString(string) error -} - -func (e *EmployeeStatus) Accept(visitor EmployeeStatusVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "status895Enum": - return visitor.VisitStatus895Enum(e.Status895Enum) - case "string": - return visitor.VisitString(e.String) - } -} - -// - `READ` - READ -// - `WRITE` - WRITE -type EnabledActionsEnum string - -const ( - EnabledActionsEnumRead EnabledActionsEnum = "READ" - EnabledActionsEnumWrite EnabledActionsEnum = "WRITE" -) - -func NewEnabledActionsEnumFromString(s string) (EnabledActionsEnum, error) { - switch s { - case "READ": - return EnabledActionsEnumRead, nil - case "WRITE": - return EnabledActionsEnumWrite, nil - } - var t EnabledActionsEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (e EnabledActionsEnum) Ptr() *EnabledActionsEnum { - return &e -} - -// - `RAW` - RAW -// - `BASE64` - BASE64 -// - `GZIP_BASE64` - GZIP_BASE64 -type EncodingEnum string - -const ( - EncodingEnumRaw EncodingEnum = "RAW" - EncodingEnumBase64 EncodingEnum = "BASE64" - EncodingEnumGzipBase64 EncodingEnum = "GZIP_BASE64" -) - -func NewEncodingEnumFromString(s string) (EncodingEnum, error) { - switch s { - case "RAW": - return EncodingEnumRaw, nil - case "BASE64": - return EncodingEnumBase64, nil - case "GZIP_BASE64": - return EncodingEnumGzipBase64, nil - } - var t EncodingEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (e EncodingEnum) Ptr() *EncodingEnum { - return &e -} - -type ErrorValidationProblem struct { - Source *ValidationProblemSource `json:"source,omitempty"` - Title string `json:"title"` - Detail string `json:"detail"` - ProblemType string `json:"problem_type"` - - _rawJSON json.RawMessage -} - -func (e *ErrorValidationProblem) UnmarshalJSON(data []byte) error { - type unmarshaler ErrorValidationProblem - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *e = ErrorValidationProblem(value) - e._rawJSON = json.RawMessage(data) - return nil -} - -func (e *ErrorValidationProblem) String() string { - if len(e._rawJSON) > 0 { - if value, err := core.StringifyJSON(e._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(e); err == nil { - return value - } - return fmt.Sprintf("%#v", e) -} - -// - `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY -// - `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY -// - `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY -// - `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY -// - `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY -// - `INVITED_USER` - INVITED_USER -// - `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED -// - `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED -// - `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT -// - `CREATED_DESTINATION` - CREATED_DESTINATION -// - `DELETED_DESTINATION` - DELETED_DESTINATION -// - `CHANGED_DESTINATION` - CHANGED_DESTINATION -// - `CHANGED_SCOPES` - CHANGED_SCOPES -// - `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION -// - `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS -// - `ENABLED_INTEGRATION` - ENABLED_INTEGRATION -// - `DISABLED_INTEGRATION` - DISABLED_INTEGRATION -// - `ENABLED_CATEGORY` - ENABLED_CATEGORY -// - `DISABLED_CATEGORY` - DISABLED_CATEGORY -// - `CHANGED_PASSWORD` - CHANGED_PASSWORD -// - `RESET_PASSWORD` - RESET_PASSWORD -// - `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION -// - `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT -// - `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION -// - `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT -// - `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING -// - `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING -// - `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING -// - `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 -// - `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE -// - `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE -// - `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE -// - `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC -// - `MUTED_ISSUE` - MUTED_ISSUE -// - `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK -// - `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK -// - `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK -// - `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED -// - `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED -type EventTypeEnum string - -const ( - EventTypeEnumCreatedRemoteProductionApiKey EventTypeEnum = "CREATED_REMOTE_PRODUCTION_API_KEY" - EventTypeEnumDeletedRemoteProductionApiKey EventTypeEnum = "DELETED_REMOTE_PRODUCTION_API_KEY" - EventTypeEnumCreatedTestApiKey EventTypeEnum = "CREATED_TEST_API_KEY" - EventTypeEnumDeletedTestApiKey EventTypeEnum = "DELETED_TEST_API_KEY" - EventTypeEnumRegeneratedProductionApiKey EventTypeEnum = "REGENERATED_PRODUCTION_API_KEY" - EventTypeEnumInvitedUser EventTypeEnum = "INVITED_USER" - EventTypeEnumTwoFactorAuthEnabled EventTypeEnum = "TWO_FACTOR_AUTH_ENABLED" - EventTypeEnumTwoFactorAuthDisabled EventTypeEnum = "TWO_FACTOR_AUTH_DISABLED" - EventTypeEnumDeletedLinkedAccount EventTypeEnum = "DELETED_LINKED_ACCOUNT" - EventTypeEnumCreatedDestination EventTypeEnum = "CREATED_DESTINATION" - EventTypeEnumDeletedDestination EventTypeEnum = "DELETED_DESTINATION" - EventTypeEnumChangedDestination EventTypeEnum = "CHANGED_DESTINATION" - EventTypeEnumChangedScopes EventTypeEnum = "CHANGED_SCOPES" - EventTypeEnumChangedPersonalInformation EventTypeEnum = "CHANGED_PERSONAL_INFORMATION" - EventTypeEnumChangedOrganizationSettings EventTypeEnum = "CHANGED_ORGANIZATION_SETTINGS" - EventTypeEnumEnabledIntegration EventTypeEnum = "ENABLED_INTEGRATION" - EventTypeEnumDisabledIntegration EventTypeEnum = "DISABLED_INTEGRATION" - EventTypeEnumEnabledCategory EventTypeEnum = "ENABLED_CATEGORY" - EventTypeEnumDisabledCategory EventTypeEnum = "DISABLED_CATEGORY" - EventTypeEnumChangedPassword EventTypeEnum = "CHANGED_PASSWORD" - EventTypeEnumResetPassword EventTypeEnum = "RESET_PASSWORD" - EventTypeEnumEnabledRedactUnmappedDataForOrganization EventTypeEnum = "ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION" - EventTypeEnumEnabledRedactUnmappedDataForLinkedAccount EventTypeEnum = "ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT" - EventTypeEnumDisabledRedactUnmappedDataForOrganization EventTypeEnum = "DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION" - EventTypeEnumDisabledRedactUnmappedDataForLinkedAccount EventTypeEnum = "DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT" - EventTypeEnumCreatedIntegrationWideFieldMapping EventTypeEnum = "CREATED_INTEGRATION_WIDE_FIELD_MAPPING" - EventTypeEnumCreatedLinkedAccountFieldMapping EventTypeEnum = "CREATED_LINKED_ACCOUNT_FIELD_MAPPING" - EventTypeEnumChangedIntegrationWideFieldMapping EventTypeEnum = "CHANGED_INTEGRATION_WIDE_FIELD_MAPPING" - EventTypeEnumChangedLinkedAccountFieldMapping EventTypeEnum = "CHANGED_LINKED_ACCOUNT_FIELD_MAPPING" - EventTypeEnumDeletedIntegrationWideFieldMapping EventTypeEnum = "DELETED_INTEGRATION_WIDE_FIELD_MAPPING" - EventTypeEnumDeletedLinkedAccountFieldMapping EventTypeEnum = "DELETED_LINKED_ACCOUNT_FIELD_MAPPING" - EventTypeEnumCreatedLinkedAccountCommonModelOverride EventTypeEnum = "CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE" - EventTypeEnumChangedLinkedAccountCommonModelOverride EventTypeEnum = "CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE" - EventTypeEnumDeletedLinkedAccountCommonModelOverride EventTypeEnum = "DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE" - EventTypeEnumForcedLinkedAccountResync EventTypeEnum = "FORCED_LINKED_ACCOUNT_RESYNC" - EventTypeEnumMutedIssue EventTypeEnum = "MUTED_ISSUE" - EventTypeEnumGeneratedMagicLink EventTypeEnum = "GENERATED_MAGIC_LINK" - EventTypeEnumEnabledMergeWebhook EventTypeEnum = "ENABLED_MERGE_WEBHOOK" - EventTypeEnumDisabledMergeWebhook EventTypeEnum = "DISABLED_MERGE_WEBHOOK" - EventTypeEnumMergeWebhookTargetChanged EventTypeEnum = "MERGE_WEBHOOK_TARGET_CHANGED" - EventTypeEnumEndUserCredentialsAccessed EventTypeEnum = "END_USER_CREDENTIALS_ACCESSED" -) - -func NewEventTypeEnumFromString(s string) (EventTypeEnum, error) { - switch s { - case "CREATED_REMOTE_PRODUCTION_API_KEY": - return EventTypeEnumCreatedRemoteProductionApiKey, nil - case "DELETED_REMOTE_PRODUCTION_API_KEY": - return EventTypeEnumDeletedRemoteProductionApiKey, nil - case "CREATED_TEST_API_KEY": - return EventTypeEnumCreatedTestApiKey, nil - case "DELETED_TEST_API_KEY": - return EventTypeEnumDeletedTestApiKey, nil - case "REGENERATED_PRODUCTION_API_KEY": - return EventTypeEnumRegeneratedProductionApiKey, nil - case "INVITED_USER": - return EventTypeEnumInvitedUser, nil - case "TWO_FACTOR_AUTH_ENABLED": - return EventTypeEnumTwoFactorAuthEnabled, nil - case "TWO_FACTOR_AUTH_DISABLED": - return EventTypeEnumTwoFactorAuthDisabled, nil - case "DELETED_LINKED_ACCOUNT": - return EventTypeEnumDeletedLinkedAccount, nil - case "CREATED_DESTINATION": - return EventTypeEnumCreatedDestination, nil - case "DELETED_DESTINATION": - return EventTypeEnumDeletedDestination, nil - case "CHANGED_DESTINATION": - return EventTypeEnumChangedDestination, nil - case "CHANGED_SCOPES": - return EventTypeEnumChangedScopes, nil - case "CHANGED_PERSONAL_INFORMATION": - return EventTypeEnumChangedPersonalInformation, nil - case "CHANGED_ORGANIZATION_SETTINGS": - return EventTypeEnumChangedOrganizationSettings, nil - case "ENABLED_INTEGRATION": - return EventTypeEnumEnabledIntegration, nil - case "DISABLED_INTEGRATION": - return EventTypeEnumDisabledIntegration, nil - case "ENABLED_CATEGORY": - return EventTypeEnumEnabledCategory, nil - case "DISABLED_CATEGORY": - return EventTypeEnumDisabledCategory, nil - case "CHANGED_PASSWORD": - return EventTypeEnumChangedPassword, nil - case "RESET_PASSWORD": - return EventTypeEnumResetPassword, nil - case "ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION": - return EventTypeEnumEnabledRedactUnmappedDataForOrganization, nil - case "ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT": - return EventTypeEnumEnabledRedactUnmappedDataForLinkedAccount, nil - case "DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION": - return EventTypeEnumDisabledRedactUnmappedDataForOrganization, nil - case "DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT": - return EventTypeEnumDisabledRedactUnmappedDataForLinkedAccount, nil - case "CREATED_INTEGRATION_WIDE_FIELD_MAPPING": - return EventTypeEnumCreatedIntegrationWideFieldMapping, nil - case "CREATED_LINKED_ACCOUNT_FIELD_MAPPING": - return EventTypeEnumCreatedLinkedAccountFieldMapping, nil - case "CHANGED_INTEGRATION_WIDE_FIELD_MAPPING": - return EventTypeEnumChangedIntegrationWideFieldMapping, nil - case "CHANGED_LINKED_ACCOUNT_FIELD_MAPPING": - return EventTypeEnumChangedLinkedAccountFieldMapping, nil - case "DELETED_INTEGRATION_WIDE_FIELD_MAPPING": - return EventTypeEnumDeletedIntegrationWideFieldMapping, nil - case "DELETED_LINKED_ACCOUNT_FIELD_MAPPING": - return EventTypeEnumDeletedLinkedAccountFieldMapping, nil - case "CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE": - return EventTypeEnumCreatedLinkedAccountCommonModelOverride, nil - case "CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE": - return EventTypeEnumChangedLinkedAccountCommonModelOverride, nil - case "DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE": - return EventTypeEnumDeletedLinkedAccountCommonModelOverride, nil - case "FORCED_LINKED_ACCOUNT_RESYNC": - return EventTypeEnumForcedLinkedAccountResync, nil - case "MUTED_ISSUE": - return EventTypeEnumMutedIssue, nil - case "GENERATED_MAGIC_LINK": - return EventTypeEnumGeneratedMagicLink, nil - case "ENABLED_MERGE_WEBHOOK": - return EventTypeEnumEnabledMergeWebhook, nil - case "DISABLED_MERGE_WEBHOOK": - return EventTypeEnumDisabledMergeWebhook, nil - case "MERGE_WEBHOOK_TARGET_CHANGED": - return EventTypeEnumMergeWebhookTargetChanged, nil - case "END_USER_CREDENTIALS_ACCESSED": - return EventTypeEnumEndUserCredentialsAccessed, nil - } - var t EventTypeEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (e EventTypeEnum) Ptr() *EventTypeEnum { - return &e -} - -// # The Expense Object -// -// ### Description -// -// The `Expense` object is used to represent a direct purchase by a business, typically made with a check, credit card, or cash. Each `Expense` object is dedicated to a grouping of expenses, with each expense recorded in the lines object. -// -// The `Expense` object is used also used to represent refunds to direct purchases. Refunds can be distinguished from purchases by the amount sign of the records. Expense objects with a negative amount are purchases and `Expense` objects with a positive amount are refunds to those purchases. -// -// ### Usage Example -// -// Fetch from the `GET Expense` endpoint and view a company's expense. -type Expense struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // When the transaction occurred. - TransactionDate *time.Time `json:"transaction_date,omitempty"` - // When the expense was created. - RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty"` - // The expense's payment account. - Account *ExpenseAccount `json:"account,omitempty"` - // The expense's contact. - Contact *ExpenseContact `json:"contact,omitempty"` - // The expense's total amount. - TotalAmount *float64 `json:"total_amount,omitempty"` - // The expense's total amount before tax. - SubTotal *float64 `json:"sub_total,omitempty"` - // The expense's total tax amount. - TotalTaxAmount *float64 `json:"total_tax_amount,omitempty"` - // The expense's currency. - // - // - `XUA` - ADB Unit of Account - // - `AFN` - Afghan Afghani - // - `AFA` - Afghan Afghani (1927–2002) - // - `ALL` - Albanian Lek - // - `ALK` - Albanian Lek (1946–1965) - // - `DZD` - Algerian Dinar - // - `ADP` - Andorran Peseta - // - `AOA` - Angolan Kwanza - // - `AOK` - Angolan Kwanza (1977–1991) - // - `AON` - Angolan New Kwanza (1990–2000) - // - `AOR` - Angolan Readjusted Kwanza (1995–1999) - // - `ARA` - Argentine Austral - // - `ARS` - Argentine Peso - // - `ARM` - Argentine Peso (1881–1970) - // - `ARP` - Argentine Peso (1983–1985) - // - `ARL` - Argentine Peso Ley (1970–1983) - // - `AMD` - Armenian Dram - // - `AWG` - Aruban Florin - // - `AUD` - Australian Dollar - // - `ATS` - Austrian Schilling - // - `AZN` - Azerbaijani Manat - // - `AZM` - Azerbaijani Manat (1993–2006) - // - `BSD` - Bahamian Dollar - // - `BHD` - Bahraini Dinar - // - `BDT` - Bangladeshi Taka - // - `BBD` - Barbadian Dollar - // - `BYN` - Belarusian Ruble - // - `BYB` - Belarusian Ruble (1994–1999) - // - `BYR` - Belarusian Ruble (2000–2016) - // - `BEF` - Belgian Franc - // - `BEC` - Belgian Franc (convertible) - // - `BEL` - Belgian Franc (financial) - // - `BZD` - Belize Dollar - // - `BMD` - Bermudan Dollar - // - `BTN` - Bhutanese Ngultrum - // - `BOB` - Bolivian Boliviano - // - `BOL` - Bolivian Boliviano (1863–1963) - // - `BOV` - Bolivian Mvdol - // - `BOP` - Bolivian Peso - // - `BAM` - Bosnia-Herzegovina Convertible Mark - // - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - // - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - // - `BWP` - Botswanan Pula - // - `BRC` - Brazilian Cruzado (1986–1989) - // - `BRZ` - Brazilian Cruzeiro (1942–1967) - // - `BRE` - Brazilian Cruzeiro (1990–1993) - // - `BRR` - Brazilian Cruzeiro (1993–1994) - // - `BRN` - Brazilian New Cruzado (1989–1990) - // - `BRB` - Brazilian New Cruzeiro (1967–1986) - // - `BRL` - Brazilian Real - // - `GBP` - British Pound - // - `BND` - Brunei Dollar - // - `BGL` - Bulgarian Hard Lev - // - `BGN` - Bulgarian Lev - // - `BGO` - Bulgarian Lev (1879–1952) - // - `BGM` - Bulgarian Socialist Lev - // - `BUK` - Burmese Kyat - // - `BIF` - Burundian Franc - // - `XPF` - CFP Franc - // - `KHR` - Cambodian Riel - // - `CAD` - Canadian Dollar - // - `CVE` - Cape Verdean Escudo - // - `KYD` - Cayman Islands Dollar - // - `XAF` - Central African CFA Franc - // - `CLE` - Chilean Escudo - // - `CLP` - Chilean Peso - // - `CLF` - Chilean Unit of Account (UF) - // - `CNX` - Chinese People’s Bank Dollar - // - `CNY` - Chinese Yuan - // - `CNH` - Chinese Yuan (offshore) - // - `COP` - Colombian Peso - // - `COU` - Colombian Real Value Unit - // - `KMF` - Comorian Franc - // - `CDF` - Congolese Franc - // - `CRC` - Costa Rican Colón - // - `HRD` - Croatian Dinar - // - `HRK` - Croatian Kuna - // - `CUC` - Cuban Convertible Peso - // - `CUP` - Cuban Peso - // - `CYP` - Cypriot Pound - // - `CZK` - Czech Koruna - // - `CSK` - Czechoslovak Hard Koruna - // - `DKK` - Danish Krone - // - `DJF` - Djiboutian Franc - // - `DOP` - Dominican Peso - // - `NLG` - Dutch Guilder - // - `XCD` - East Caribbean Dollar - // - `DDM` - East German Mark - // - `ECS` - Ecuadorian Sucre - // - `ECV` - Ecuadorian Unit of Constant Value - // - `EGP` - Egyptian Pound - // - `GQE` - Equatorial Guinean Ekwele - // - `ERN` - Eritrean Nakfa - // - `EEK` - Estonian Kroon - // - `ETB` - Ethiopian Birr - // - `EUR` - Euro - // - `XBA` - European Composite Unit - // - `XEU` - European Currency Unit - // - `XBB` - European Monetary Unit - // - `XBC` - European Unit of Account (XBC) - // - `XBD` - European Unit of Account (XBD) - // - `FKP` - Falkland Islands Pound - // - `FJD` - Fijian Dollar - // - `FIM` - Finnish Markka - // - `FRF` - French Franc - // - `XFO` - French Gold Franc - // - `XFU` - French UIC-Franc - // - `GMD` - Gambian Dalasi - // - `GEK` - Georgian Kupon Larit - // - `GEL` - Georgian Lari - // - `DEM` - German Mark - // - `GHS` - Ghanaian Cedi - // - `GHC` - Ghanaian Cedi (1979–2007) - // - `GIP` - Gibraltar Pound - // - `XAU` - Gold - // - `GRD` - Greek Drachma - // - `GTQ` - Guatemalan Quetzal - // - `GWP` - Guinea-Bissau Peso - // - `GNF` - Guinean Franc - // - `GNS` - Guinean Syli - // - `GYD` - Guyanaese Dollar - // - `HTG` - Haitian Gourde - // - `HNL` - Honduran Lempira - // - `HKD` - Hong Kong Dollar - // - `HUF` - Hungarian Forint - // - `IMP` - IMP - // - `ISK` - Icelandic Króna - // - `ISJ` - Icelandic Króna (1918–1981) - // - `INR` - Indian Rupee - // - `IDR` - Indonesian Rupiah - // - `IRR` - Iranian Rial - // - `IQD` - Iraqi Dinar - // - `IEP` - Irish Pound - // - `ILS` - Israeli New Shekel - // - `ILP` - Israeli Pound - // - `ILR` - Israeli Shekel (1980–1985) - // - `ITL` - Italian Lira - // - `JMD` - Jamaican Dollar - // - `JPY` - Japanese Yen - // - `JOD` - Jordanian Dinar - // - `KZT` - Kazakhstani Tenge - // - `KES` - Kenyan Shilling - // - `KWD` - Kuwaiti Dinar - // - `KGS` - Kyrgystani Som - // - `LAK` - Laotian Kip - // - `LVL` - Latvian Lats - // - `LVR` - Latvian Ruble - // - `LBP` - Lebanese Pound - // - `LSL` - Lesotho Loti - // - `LRD` - Liberian Dollar - // - `LYD` - Libyan Dinar - // - `LTL` - Lithuanian Litas - // - `LTT` - Lithuanian Talonas - // - `LUL` - Luxembourg Financial Franc - // - `LUC` - Luxembourgian Convertible Franc - // - `LUF` - Luxembourgian Franc - // - `MOP` - Macanese Pataca - // - `MKD` - Macedonian Denar - // - `MKN` - Macedonian Denar (1992–1993) - // - `MGA` - Malagasy Ariary - // - `MGF` - Malagasy Franc - // - `MWK` - Malawian Kwacha - // - `MYR` - Malaysian Ringgit - // - `MVR` - Maldivian Rufiyaa - // - `MVP` - Maldivian Rupee (1947–1981) - // - `MLF` - Malian Franc - // - `MTL` - Maltese Lira - // - `MTP` - Maltese Pound - // - `MRU` - Mauritanian Ouguiya - // - `MRO` - Mauritanian Ouguiya (1973–2017) - // - `MUR` - Mauritian Rupee - // - `MXV` - Mexican Investment Unit - // - `MXN` - Mexican Peso - // - `MXP` - Mexican Silver Peso (1861–1992) - // - `MDC` - Moldovan Cupon - // - `MDL` - Moldovan Leu - // - `MCF` - Monegasque Franc - // - `MNT` - Mongolian Tugrik - // - `MAD` - Moroccan Dirham - // - `MAF` - Moroccan Franc - // - `MZE` - Mozambican Escudo - // - `MZN` - Mozambican Metical - // - `MZM` - Mozambican Metical (1980–2006) - // - `MMK` - Myanmar Kyat - // - `NAD` - Namibian Dollar - // - `NPR` - Nepalese Rupee - // - `ANG` - Netherlands Antillean Guilder - // - `TWD` - New Taiwan Dollar - // - `NZD` - New Zealand Dollar - // - `NIO` - Nicaraguan Córdoba - // - `NIC` - Nicaraguan Córdoba (1988–1991) - // - `NGN` - Nigerian Naira - // - `KPW` - North Korean Won - // - `NOK` - Norwegian Krone - // - `OMR` - Omani Rial - // - `PKR` - Pakistani Rupee - // - `XPD` - Palladium - // - `PAB` - Panamanian Balboa - // - `PGK` - Papua New Guinean Kina - // - `PYG` - Paraguayan Guarani - // - `PEI` - Peruvian Inti - // - `PEN` - Peruvian Sol - // - `PES` - Peruvian Sol (1863–1965) - // - `PHP` - Philippine Peso - // - `XPT` - Platinum - // - `PLN` - Polish Zloty - // - `PLZ` - Polish Zloty (1950–1995) - // - `PTE` - Portuguese Escudo - // - `GWE` - Portuguese Guinea Escudo - // - `QAR` - Qatari Rial - // - `XRE` - RINET Funds - // - `RHD` - Rhodesian Dollar - // - `RON` - Romanian Leu - // - `ROL` - Romanian Leu (1952–2006) - // - `RUB` - Russian Ruble - // - `RUR` - Russian Ruble (1991–1998) - // - `RWF` - Rwandan Franc - // - `SVC` - Salvadoran Colón - // - `WST` - Samoan Tala - // - `SAR` - Saudi Riyal - // - `RSD` - Serbian Dinar - // - `CSD` - Serbian Dinar (2002–2006) - // - `SCR` - Seychellois Rupee - // - `SLL` - Sierra Leonean Leone - // - `XAG` - Silver - // - `SGD` - Singapore Dollar - // - `SKK` - Slovak Koruna - // - `SIT` - Slovenian Tolar - // - `SBD` - Solomon Islands Dollar - // - `SOS` - Somali Shilling - // - `ZAR` - South African Rand - // - `ZAL` - South African Rand (financial) - // - `KRH` - South Korean Hwan (1953–1962) - // - `KRW` - South Korean Won - // - `KRO` - South Korean Won (1945–1953) - // - `SSP` - South Sudanese Pound - // - `SUR` - Soviet Rouble - // - `ESP` - Spanish Peseta - // - `ESA` - Spanish Peseta (A account) - // - `ESB` - Spanish Peseta (convertible account) - // - `XDR` - Special Drawing Rights - // - `LKR` - Sri Lankan Rupee - // - `SHP` - St. Helena Pound - // - `XSU` - Sucre - // - `SDD` - Sudanese Dinar (1992–2007) - // - `SDG` - Sudanese Pound - // - `SDP` - Sudanese Pound (1957–1998) - // - `SRD` - Surinamese Dollar - // - `SRG` - Surinamese Guilder - // - `SZL` - Swazi Lilangeni - // - `SEK` - Swedish Krona - // - `CHF` - Swiss Franc - // - `SYP` - Syrian Pound - // - `STN` - São Tomé & Príncipe Dobra - // - `STD` - São Tomé & Príncipe Dobra (1977–2017) - // - `TVD` - TVD - // - `TJR` - Tajikistani Ruble - // - `TJS` - Tajikistani Somoni - // - `TZS` - Tanzanian Shilling - // - `XTS` - Testing Currency Code - // - `THB` - Thai Baht - // - `XXX` - The codes assigned for transactions where no currency is involved - // - `TPE` - Timorese Escudo - // - `TOP` - Tongan Paʻanga - // - `TTD` - Trinidad & Tobago Dollar - // - `TND` - Tunisian Dinar - // - `TRY` - Turkish Lira - // - `TRL` - Turkish Lira (1922–2005) - // - `TMT` - Turkmenistani Manat - // - `TMM` - Turkmenistani Manat (1993–2009) - // - `USD` - US Dollar - // - `USN` - US Dollar (Next day) - // - `USS` - US Dollar (Same day) - // - `UGX` - Ugandan Shilling - // - `UGS` - Ugandan Shilling (1966–1987) - // - `UAH` - Ukrainian Hryvnia - // - `UAK` - Ukrainian Karbovanets - // - `AED` - United Arab Emirates Dirham - // - `UYW` - Uruguayan Nominal Wage Index Unit - // - `UYU` - Uruguayan Peso - // - `UYP` - Uruguayan Peso (1975–1993) - // - `UYI` - Uruguayan Peso (Indexed Units) - // - `UZS` - Uzbekistani Som - // - `VUV` - Vanuatu Vatu - // - `VES` - Venezuelan Bolívar - // - `VEB` - Venezuelan Bolívar (1871–2008) - // - `VEF` - Venezuelan Bolívar (2008–2018) - // - `VND` - Vietnamese Dong - // - `VNN` - Vietnamese Dong (1978–1985) - // - `CHE` - WIR Euro - // - `CHW` - WIR Franc - // - `XOF` - West African CFA Franc - // - `YDD` - Yemeni Dinar - // - `YER` - Yemeni Rial - // - `YUN` - Yugoslavian Convertible Dinar (1990–1992) - // - `YUD` - Yugoslavian Hard Dinar (1966–1990) - // - `YUM` - Yugoslavian New Dinar (1994–2002) - // - `YUR` - Yugoslavian Reformed Dinar (1992–1993) - // - `ZWN` - ZWN - // - `ZRN` - Zairean New Zaire (1993–1998) - // - `ZRZ` - Zairean Zaire (1971–1993) - // - `ZMW` - Zambian Kwacha - // - `ZMK` - Zambian Kwacha (1968–2012) - // - `ZWD` - Zimbabwean Dollar (1980–2008) - // - `ZWR` - Zimbabwean Dollar (2008) - // - `ZWL` - Zimbabwean Dollar (2009) - Currency *ExpenseCurrency `json:"currency,omitempty"` - // The expense's exchange rate. - ExchangeRate *string `json:"exchange_rate,omitempty"` - // If the transaction is inclusive or exclusive of tax. `True` if inclusive, `False` if exclusive. - InclusiveOfTax *bool `json:"inclusive_of_tax,omitempty"` - // The company the expense belongs to. - Company *ExpenseCompany `json:"company,omitempty"` - // The employee this overall transaction relates to. - Employee *ExpenseEmployee `json:"employee,omitempty"` - // The expense's private note. - Memo *string `json:"memo,omitempty"` - Lines []*ExpenseLine `json:"lines,omitempty"` - TrackingCategories []*ExpenseTrackingCategoriesItem `json:"tracking_categories,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - // The accounting period that the Expense was generated in. - AccountingPeriod *ExpenseAccountingPeriod `json:"accounting_period,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` - RemoteFields []*RemoteField `json:"remote_fields,omitempty"` - - _rawJSON json.RawMessage -} - -func (e *Expense) UnmarshalJSON(data []byte) error { - type unmarshaler Expense - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *e = Expense(value) - e._rawJSON = json.RawMessage(data) - return nil -} - -func (e *Expense) String() string { - if len(e._rawJSON) > 0 { - if value, err := core.StringifyJSON(e._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(e); err == nil { - return value - } - return fmt.Sprintf("%#v", e) -} - -// The expense's payment account. -type ExpenseAccount struct { - typeName string - String string - Account *Account -} - -func NewExpenseAccountFromString(value string) *ExpenseAccount { - return &ExpenseAccount{typeName: "string", String: value} -} - -func NewExpenseAccountFromAccount(value *Account) *ExpenseAccount { - return &ExpenseAccount{typeName: "account", Account: value} -} - -func (e *ExpenseAccount) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString - return nil - } - valueAccount := new(Account) - if err := json.Unmarshal(data, &valueAccount); err == nil { - e.typeName = "account" - e.Account = valueAccount - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) -} - -func (e ExpenseAccount) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return json.Marshal(e.String) - case "account": - return json.Marshal(e.Account) - } -} - -type ExpenseAccountVisitor interface { - VisitString(string) error - VisitAccount(*Account) error -} - -func (e *ExpenseAccount) Accept(visitor ExpenseAccountVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return visitor.VisitString(e.String) - case "account": - return visitor.VisitAccount(e.Account) - } -} - -// The accounting period that the Expense was generated in. -type ExpenseAccountingPeriod struct { - typeName string - String string - AccountingPeriod *AccountingPeriod -} - -func NewExpenseAccountingPeriodFromString(value string) *ExpenseAccountingPeriod { - return &ExpenseAccountingPeriod{typeName: "string", String: value} -} - -func NewExpenseAccountingPeriodFromAccountingPeriod(value *AccountingPeriod) *ExpenseAccountingPeriod { - return &ExpenseAccountingPeriod{typeName: "accountingPeriod", AccountingPeriod: value} -} - -func (e *ExpenseAccountingPeriod) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString - return nil - } - valueAccountingPeriod := new(AccountingPeriod) - if err := json.Unmarshal(data, &valueAccountingPeriod); err == nil { - e.typeName = "accountingPeriod" - e.AccountingPeriod = valueAccountingPeriod - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) -} - -func (e ExpenseAccountingPeriod) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return json.Marshal(e.String) - case "accountingPeriod": - return json.Marshal(e.AccountingPeriod) - } -} - -type ExpenseAccountingPeriodVisitor interface { - VisitString(string) error - VisitAccountingPeriod(*AccountingPeriod) error -} - -func (e *ExpenseAccountingPeriod) Accept(visitor ExpenseAccountingPeriodVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return visitor.VisitString(e.String) - case "accountingPeriod": - return visitor.VisitAccountingPeriod(e.AccountingPeriod) - } -} - -// The company the expense belongs to. -type ExpenseCompany struct { - typeName string - String string - CompanyInfo *CompanyInfo -} - -func NewExpenseCompanyFromString(value string) *ExpenseCompany { - return &ExpenseCompany{typeName: "string", String: value} -} - -func NewExpenseCompanyFromCompanyInfo(value *CompanyInfo) *ExpenseCompany { - return &ExpenseCompany{typeName: "companyInfo", CompanyInfo: value} -} - -func (e *ExpenseCompany) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString - return nil - } - valueCompanyInfo := new(CompanyInfo) - if err := json.Unmarshal(data, &valueCompanyInfo); err == nil { - e.typeName = "companyInfo" - e.CompanyInfo = valueCompanyInfo - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) -} - -func (e ExpenseCompany) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return json.Marshal(e.String) - case "companyInfo": - return json.Marshal(e.CompanyInfo) - } -} - -type ExpenseCompanyVisitor interface { - VisitString(string) error - VisitCompanyInfo(*CompanyInfo) error -} - -func (e *ExpenseCompany) Accept(visitor ExpenseCompanyVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return visitor.VisitString(e.String) - case "companyInfo": - return visitor.VisitCompanyInfo(e.CompanyInfo) - } -} - -// The expense's contact. -type ExpenseContact struct { - typeName string - String string - Contact *Contact -} - -func NewExpenseContactFromString(value string) *ExpenseContact { - return &ExpenseContact{typeName: "string", String: value} -} - -func NewExpenseContactFromContact(value *Contact) *ExpenseContact { - return &ExpenseContact{typeName: "contact", Contact: value} -} - -func (e *ExpenseContact) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString - return nil - } - valueContact := new(Contact) - if err := json.Unmarshal(data, &valueContact); err == nil { - e.typeName = "contact" - e.Contact = valueContact - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) -} - -func (e ExpenseContact) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return json.Marshal(e.String) - case "contact": - return json.Marshal(e.Contact) - } -} - -type ExpenseContactVisitor interface { - VisitString(string) error - VisitContact(*Contact) error -} - -func (e *ExpenseContact) Accept(visitor ExpenseContactVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return visitor.VisitString(e.String) - case "contact": - return visitor.VisitContact(e.Contact) - } -} - -// The expense's currency. -// -// - `XUA` - ADB Unit of Account -// - `AFN` - Afghan Afghani -// - `AFA` - Afghan Afghani (1927–2002) -// - `ALL` - Albanian Lek -// - `ALK` - Albanian Lek (1946–1965) -// - `DZD` - Algerian Dinar -// - `ADP` - Andorran Peseta -// - `AOA` - Angolan Kwanza -// - `AOK` - Angolan Kwanza (1977–1991) -// - `AON` - Angolan New Kwanza (1990–2000) -// - `AOR` - Angolan Readjusted Kwanza (1995–1999) -// - `ARA` - Argentine Austral -// - `ARS` - Argentine Peso -// - `ARM` - Argentine Peso (1881–1970) -// - `ARP` - Argentine Peso (1983–1985) -// - `ARL` - Argentine Peso Ley (1970–1983) -// - `AMD` - Armenian Dram -// - `AWG` - Aruban Florin -// - `AUD` - Australian Dollar -// - `ATS` - Austrian Schilling -// - `AZN` - Azerbaijani Manat -// - `AZM` - Azerbaijani Manat (1993–2006) -// - `BSD` - Bahamian Dollar -// - `BHD` - Bahraini Dinar -// - `BDT` - Bangladeshi Taka -// - `BBD` - Barbadian Dollar -// - `BYN` - Belarusian Ruble -// - `BYB` - Belarusian Ruble (1994–1999) -// - `BYR` - Belarusian Ruble (2000–2016) -// - `BEF` - Belgian Franc -// - `BEC` - Belgian Franc (convertible) -// - `BEL` - Belgian Franc (financial) -// - `BZD` - Belize Dollar -// - `BMD` - Bermudan Dollar -// - `BTN` - Bhutanese Ngultrum -// - `BOB` - Bolivian Boliviano -// - `BOL` - Bolivian Boliviano (1863–1963) -// - `BOV` - Bolivian Mvdol -// - `BOP` - Bolivian Peso -// - `BAM` - Bosnia-Herzegovina Convertible Mark -// - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) -// - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) -// - `BWP` - Botswanan Pula -// - `BRC` - Brazilian Cruzado (1986–1989) -// - `BRZ` - Brazilian Cruzeiro (1942–1967) -// - `BRE` - Brazilian Cruzeiro (1990–1993) -// - `BRR` - Brazilian Cruzeiro (1993–1994) -// - `BRN` - Brazilian New Cruzado (1989–1990) -// - `BRB` - Brazilian New Cruzeiro (1967–1986) -// - `BRL` - Brazilian Real -// - `GBP` - British Pound -// - `BND` - Brunei Dollar -// - `BGL` - Bulgarian Hard Lev -// - `BGN` - Bulgarian Lev -// - `BGO` - Bulgarian Lev (1879–1952) -// - `BGM` - Bulgarian Socialist Lev -// - `BUK` - Burmese Kyat -// - `BIF` - Burundian Franc -// - `XPF` - CFP Franc -// - `KHR` - Cambodian Riel -// - `CAD` - Canadian Dollar -// - `CVE` - Cape Verdean Escudo -// - `KYD` - Cayman Islands Dollar -// - `XAF` - Central African CFA Franc -// - `CLE` - Chilean Escudo -// - `CLP` - Chilean Peso -// - `CLF` - Chilean Unit of Account (UF) -// - `CNX` - Chinese People’s Bank Dollar -// - `CNY` - Chinese Yuan -// - `CNH` - Chinese Yuan (offshore) -// - `COP` - Colombian Peso -// - `COU` - Colombian Real Value Unit -// - `KMF` - Comorian Franc -// - `CDF` - Congolese Franc -// - `CRC` - Costa Rican Colón -// - `HRD` - Croatian Dinar -// - `HRK` - Croatian Kuna -// - `CUC` - Cuban Convertible Peso -// - `CUP` - Cuban Peso -// - `CYP` - Cypriot Pound -// - `CZK` - Czech Koruna -// - `CSK` - Czechoslovak Hard Koruna -// - `DKK` - Danish Krone -// - `DJF` - Djiboutian Franc -// - `DOP` - Dominican Peso -// - `NLG` - Dutch Guilder -// - `XCD` - East Caribbean Dollar -// - `DDM` - East German Mark -// - `ECS` - Ecuadorian Sucre -// - `ECV` - Ecuadorian Unit of Constant Value -// - `EGP` - Egyptian Pound -// - `GQE` - Equatorial Guinean Ekwele -// - `ERN` - Eritrean Nakfa -// - `EEK` - Estonian Kroon -// - `ETB` - Ethiopian Birr -// - `EUR` - Euro -// - `XBA` - European Composite Unit -// - `XEU` - European Currency Unit -// - `XBB` - European Monetary Unit -// - `XBC` - European Unit of Account (XBC) -// - `XBD` - European Unit of Account (XBD) -// - `FKP` - Falkland Islands Pound -// - `FJD` - Fijian Dollar -// - `FIM` - Finnish Markka -// - `FRF` - French Franc -// - `XFO` - French Gold Franc -// - `XFU` - French UIC-Franc -// - `GMD` - Gambian Dalasi -// - `GEK` - Georgian Kupon Larit -// - `GEL` - Georgian Lari -// - `DEM` - German Mark -// - `GHS` - Ghanaian Cedi -// - `GHC` - Ghanaian Cedi (1979–2007) -// - `GIP` - Gibraltar Pound -// - `XAU` - Gold -// - `GRD` - Greek Drachma -// - `GTQ` - Guatemalan Quetzal -// - `GWP` - Guinea-Bissau Peso -// - `GNF` - Guinean Franc -// - `GNS` - Guinean Syli -// - `GYD` - Guyanaese Dollar -// - `HTG` - Haitian Gourde -// - `HNL` - Honduran Lempira -// - `HKD` - Hong Kong Dollar -// - `HUF` - Hungarian Forint -// - `IMP` - IMP -// - `ISK` - Icelandic Króna -// - `ISJ` - Icelandic Króna (1918–1981) -// - `INR` - Indian Rupee -// - `IDR` - Indonesian Rupiah -// - `IRR` - Iranian Rial -// - `IQD` - Iraqi Dinar -// - `IEP` - Irish Pound -// - `ILS` - Israeli New Shekel -// - `ILP` - Israeli Pound -// - `ILR` - Israeli Shekel (1980–1985) -// - `ITL` - Italian Lira -// - `JMD` - Jamaican Dollar -// - `JPY` - Japanese Yen -// - `JOD` - Jordanian Dinar -// - `KZT` - Kazakhstani Tenge -// - `KES` - Kenyan Shilling -// - `KWD` - Kuwaiti Dinar -// - `KGS` - Kyrgystani Som -// - `LAK` - Laotian Kip -// - `LVL` - Latvian Lats -// - `LVR` - Latvian Ruble -// - `LBP` - Lebanese Pound -// - `LSL` - Lesotho Loti -// - `LRD` - Liberian Dollar -// - `LYD` - Libyan Dinar -// - `LTL` - Lithuanian Litas -// - `LTT` - Lithuanian Talonas -// - `LUL` - Luxembourg Financial Franc -// - `LUC` - Luxembourgian Convertible Franc -// - `LUF` - Luxembourgian Franc -// - `MOP` - Macanese Pataca -// - `MKD` - Macedonian Denar -// - `MKN` - Macedonian Denar (1992–1993) -// - `MGA` - Malagasy Ariary -// - `MGF` - Malagasy Franc -// - `MWK` - Malawian Kwacha -// - `MYR` - Malaysian Ringgit -// - `MVR` - Maldivian Rufiyaa -// - `MVP` - Maldivian Rupee (1947–1981) -// - `MLF` - Malian Franc -// - `MTL` - Maltese Lira -// - `MTP` - Maltese Pound -// - `MRU` - Mauritanian Ouguiya -// - `MRO` - Mauritanian Ouguiya (1973–2017) -// - `MUR` - Mauritian Rupee -// - `MXV` - Mexican Investment Unit -// - `MXN` - Mexican Peso -// - `MXP` - Mexican Silver Peso (1861–1992) -// - `MDC` - Moldovan Cupon -// - `MDL` - Moldovan Leu -// - `MCF` - Monegasque Franc -// - `MNT` - Mongolian Tugrik -// - `MAD` - Moroccan Dirham -// - `MAF` - Moroccan Franc -// - `MZE` - Mozambican Escudo -// - `MZN` - Mozambican Metical -// - `MZM` - Mozambican Metical (1980–2006) -// - `MMK` - Myanmar Kyat -// - `NAD` - Namibian Dollar -// - `NPR` - Nepalese Rupee -// - `ANG` - Netherlands Antillean Guilder -// - `TWD` - New Taiwan Dollar -// - `NZD` - New Zealand Dollar -// - `NIO` - Nicaraguan Córdoba -// - `NIC` - Nicaraguan Córdoba (1988–1991) -// - `NGN` - Nigerian Naira -// - `KPW` - North Korean Won -// - `NOK` - Norwegian Krone -// - `OMR` - Omani Rial -// - `PKR` - Pakistani Rupee -// - `XPD` - Palladium -// - `PAB` - Panamanian Balboa -// - `PGK` - Papua New Guinean Kina -// - `PYG` - Paraguayan Guarani -// - `PEI` - Peruvian Inti -// - `PEN` - Peruvian Sol -// - `PES` - Peruvian Sol (1863–1965) -// - `PHP` - Philippine Peso -// - `XPT` - Platinum -// - `PLN` - Polish Zloty -// - `PLZ` - Polish Zloty (1950–1995) -// - `PTE` - Portuguese Escudo -// - `GWE` - Portuguese Guinea Escudo -// - `QAR` - Qatari Rial -// - `XRE` - RINET Funds -// - `RHD` - Rhodesian Dollar -// - `RON` - Romanian Leu -// - `ROL` - Romanian Leu (1952–2006) -// - `RUB` - Russian Ruble -// - `RUR` - Russian Ruble (1991–1998) -// - `RWF` - Rwandan Franc -// - `SVC` - Salvadoran Colón -// - `WST` - Samoan Tala -// - `SAR` - Saudi Riyal -// - `RSD` - Serbian Dinar -// - `CSD` - Serbian Dinar (2002–2006) -// - `SCR` - Seychellois Rupee -// - `SLL` - Sierra Leonean Leone -// - `XAG` - Silver -// - `SGD` - Singapore Dollar -// - `SKK` - Slovak Koruna -// - `SIT` - Slovenian Tolar -// - `SBD` - Solomon Islands Dollar -// - `SOS` - Somali Shilling -// - `ZAR` - South African Rand -// - `ZAL` - South African Rand (financial) -// - `KRH` - South Korean Hwan (1953–1962) -// - `KRW` - South Korean Won -// - `KRO` - South Korean Won (1945–1953) -// - `SSP` - South Sudanese Pound -// - `SUR` - Soviet Rouble -// - `ESP` - Spanish Peseta -// - `ESA` - Spanish Peseta (A account) -// - `ESB` - Spanish Peseta (convertible account) -// - `XDR` - Special Drawing Rights -// - `LKR` - Sri Lankan Rupee -// - `SHP` - St. Helena Pound -// - `XSU` - Sucre -// - `SDD` - Sudanese Dinar (1992–2007) -// - `SDG` - Sudanese Pound -// - `SDP` - Sudanese Pound (1957–1998) -// - `SRD` - Surinamese Dollar -// - `SRG` - Surinamese Guilder -// - `SZL` - Swazi Lilangeni -// - `SEK` - Swedish Krona -// - `CHF` - Swiss Franc -// - `SYP` - Syrian Pound -// - `STN` - São Tomé & Príncipe Dobra -// - `STD` - São Tomé & Príncipe Dobra (1977–2017) -// - `TVD` - TVD -// - `TJR` - Tajikistani Ruble -// - `TJS` - Tajikistani Somoni -// - `TZS` - Tanzanian Shilling -// - `XTS` - Testing Currency Code -// - `THB` - Thai Baht -// - `XXX` - The codes assigned for transactions where no currency is involved -// - `TPE` - Timorese Escudo -// - `TOP` - Tongan Paʻanga -// - `TTD` - Trinidad & Tobago Dollar -// - `TND` - Tunisian Dinar -// - `TRY` - Turkish Lira -// - `TRL` - Turkish Lira (1922–2005) -// - `TMT` - Turkmenistani Manat -// - `TMM` - Turkmenistani Manat (1993–2009) -// - `USD` - US Dollar -// - `USN` - US Dollar (Next day) -// - `USS` - US Dollar (Same day) -// - `UGX` - Ugandan Shilling -// - `UGS` - Ugandan Shilling (1966–1987) -// - `UAH` - Ukrainian Hryvnia -// - `UAK` - Ukrainian Karbovanets -// - `AED` - United Arab Emirates Dirham -// - `UYW` - Uruguayan Nominal Wage Index Unit -// - `UYU` - Uruguayan Peso -// - `UYP` - Uruguayan Peso (1975–1993) -// - `UYI` - Uruguayan Peso (Indexed Units) -// - `UZS` - Uzbekistani Som -// - `VUV` - Vanuatu Vatu -// - `VES` - Venezuelan Bolívar -// - `VEB` - Venezuelan Bolívar (1871–2008) -// - `VEF` - Venezuelan Bolívar (2008–2018) -// - `VND` - Vietnamese Dong -// - `VNN` - Vietnamese Dong (1978–1985) -// - `CHE` - WIR Euro -// - `CHW` - WIR Franc -// - `XOF` - West African CFA Franc -// - `YDD` - Yemeni Dinar -// - `YER` - Yemeni Rial -// - `YUN` - Yugoslavian Convertible Dinar (1990–1992) -// - `YUD` - Yugoslavian Hard Dinar (1966–1990) -// - `YUM` - Yugoslavian New Dinar (1994–2002) -// - `YUR` - Yugoslavian Reformed Dinar (1992–1993) -// - `ZWN` - ZWN -// - `ZRN` - Zairean New Zaire (1993–1998) -// - `ZRZ` - Zairean Zaire (1971–1993) -// - `ZMW` - Zambian Kwacha -// - `ZMK` - Zambian Kwacha (1968–2012) -// - `ZWD` - Zimbabwean Dollar (1980–2008) -// - `ZWR` - Zimbabwean Dollar (2008) -// - `ZWL` - Zimbabwean Dollar (2009) -type ExpenseCurrency struct { - typeName string - TransactionCurrencyEnum TransactionCurrencyEnum - String string -} - -func NewExpenseCurrencyFromTransactionCurrencyEnum(value TransactionCurrencyEnum) *ExpenseCurrency { - return &ExpenseCurrency{typeName: "transactionCurrencyEnum", TransactionCurrencyEnum: value} -} - -func NewExpenseCurrencyFromString(value string) *ExpenseCurrency { - return &ExpenseCurrency{typeName: "string", String: value} -} - -func (e *ExpenseCurrency) UnmarshalJSON(data []byte) error { - var valueTransactionCurrencyEnum TransactionCurrencyEnum - if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { - e.typeName = "transactionCurrencyEnum" - e.TransactionCurrencyEnum = valueTransactionCurrencyEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) -} - -func (e ExpenseCurrency) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "transactionCurrencyEnum": - return json.Marshal(e.TransactionCurrencyEnum) - case "string": - return json.Marshal(e.String) - } -} - -type ExpenseCurrencyVisitor interface { - VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error - VisitString(string) error -} - -func (e *ExpenseCurrency) Accept(visitor ExpenseCurrencyVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "transactionCurrencyEnum": - return visitor.VisitTransactionCurrencyEnum(e.TransactionCurrencyEnum) - case "string": - return visitor.VisitString(e.String) - } -} - -// The employee this overall transaction relates to. -type ExpenseEmployee struct { - typeName string - String string - Employee *Employee -} - -func NewExpenseEmployeeFromString(value string) *ExpenseEmployee { - return &ExpenseEmployee{typeName: "string", String: value} -} - -func NewExpenseEmployeeFromEmployee(value *Employee) *ExpenseEmployee { - return &ExpenseEmployee{typeName: "employee", Employee: value} -} - -func (e *ExpenseEmployee) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString - return nil - } - valueEmployee := new(Employee) - if err := json.Unmarshal(data, &valueEmployee); err == nil { - e.typeName = "employee" - e.Employee = valueEmployee - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) -} - -func (e ExpenseEmployee) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return json.Marshal(e.String) - case "employee": - return json.Marshal(e.Employee) - } -} - -type ExpenseEmployeeVisitor interface { - VisitString(string) error - VisitEmployee(*Employee) error -} - -func (e *ExpenseEmployee) Accept(visitor ExpenseEmployeeVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return visitor.VisitString(e.String) - case "employee": - return visitor.VisitEmployee(e.Employee) - } -} - -// # The ExpenseLine Object -// -// ### Description -// -// The `ExpenseLine` object is used to represent an expense's line items. -// -// ### Usage Example -// -// Fetch from the `GET Expense` endpoint and view the expense's line items. -type ExpenseLine struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The line's item. - Item *ExpenseLineItem `json:"item,omitempty"` - // The line's net amount. - NetAmount *float64 `json:"net_amount,omitempty"` - TrackingCategory *ExpenseLineTrackingCategory `json:"tracking_category,omitempty"` - // The expense line item's associated tracking categories. - TrackingCategories []*ExpenseLineTrackingCategoriesItem `json:"tracking_categories,omitempty"` - // The company the expense belongs to. - Company *string `json:"company,omitempty"` - // The employee this overall transaction relates to. - Employee *ExpenseLineEmployee `json:"employee,omitempty"` - // The expense line item's currency. - // - // - `XUA` - ADB Unit of Account - // - `AFN` - Afghan Afghani - // - `AFA` - Afghan Afghani (1927–2002) - // - `ALL` - Albanian Lek - // - `ALK` - Albanian Lek (1946–1965) - // - `DZD` - Algerian Dinar - // - `ADP` - Andorran Peseta - // - `AOA` - Angolan Kwanza - // - `AOK` - Angolan Kwanza (1977–1991) - // - `AON` - Angolan New Kwanza (1990–2000) - // - `AOR` - Angolan Readjusted Kwanza (1995–1999) - // - `ARA` - Argentine Austral - // - `ARS` - Argentine Peso - // - `ARM` - Argentine Peso (1881–1970) - // - `ARP` - Argentine Peso (1983–1985) - // - `ARL` - Argentine Peso Ley (1970–1983) - // - `AMD` - Armenian Dram - // - `AWG` - Aruban Florin - // - `AUD` - Australian Dollar - // - `ATS` - Austrian Schilling - // - `AZN` - Azerbaijani Manat - // - `AZM` - Azerbaijani Manat (1993–2006) - // - `BSD` - Bahamian Dollar - // - `BHD` - Bahraini Dinar - // - `BDT` - Bangladeshi Taka - // - `BBD` - Barbadian Dollar - // - `BYN` - Belarusian Ruble - // - `BYB` - Belarusian Ruble (1994–1999) - // - `BYR` - Belarusian Ruble (2000–2016) - // - `BEF` - Belgian Franc - // - `BEC` - Belgian Franc (convertible) - // - `BEL` - Belgian Franc (financial) - // - `BZD` - Belize Dollar - // - `BMD` - Bermudan Dollar - // - `BTN` - Bhutanese Ngultrum - // - `BOB` - Bolivian Boliviano - // - `BOL` - Bolivian Boliviano (1863–1963) - // - `BOV` - Bolivian Mvdol - // - `BOP` - Bolivian Peso - // - `BAM` - Bosnia-Herzegovina Convertible Mark - // - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - // - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - // - `BWP` - Botswanan Pula - // - `BRC` - Brazilian Cruzado (1986–1989) - // - `BRZ` - Brazilian Cruzeiro (1942–1967) - // - `BRE` - Brazilian Cruzeiro (1990–1993) - // - `BRR` - Brazilian Cruzeiro (1993–1994) - // - `BRN` - Brazilian New Cruzado (1989–1990) - // - `BRB` - Brazilian New Cruzeiro (1967–1986) - // - `BRL` - Brazilian Real - // - `GBP` - British Pound - // - `BND` - Brunei Dollar - // - `BGL` - Bulgarian Hard Lev - // - `BGN` - Bulgarian Lev - // - `BGO` - Bulgarian Lev (1879–1952) - // - `BGM` - Bulgarian Socialist Lev - // - `BUK` - Burmese Kyat - // - `BIF` - Burundian Franc - // - `XPF` - CFP Franc - // - `KHR` - Cambodian Riel - // - `CAD` - Canadian Dollar - // - `CVE` - Cape Verdean Escudo - // - `KYD` - Cayman Islands Dollar - // - `XAF` - Central African CFA Franc - // - `CLE` - Chilean Escudo - // - `CLP` - Chilean Peso - // - `CLF` - Chilean Unit of Account (UF) - // - `CNX` - Chinese People’s Bank Dollar - // - `CNY` - Chinese Yuan - // - `CNH` - Chinese Yuan (offshore) - // - `COP` - Colombian Peso - // - `COU` - Colombian Real Value Unit - // - `KMF` - Comorian Franc - // - `CDF` - Congolese Franc - // - `CRC` - Costa Rican Colón - // - `HRD` - Croatian Dinar - // - `HRK` - Croatian Kuna - // - `CUC` - Cuban Convertible Peso - // - `CUP` - Cuban Peso - // - `CYP` - Cypriot Pound - // - `CZK` - Czech Koruna - // - `CSK` - Czechoslovak Hard Koruna - // - `DKK` - Danish Krone - // - `DJF` - Djiboutian Franc - // - `DOP` - Dominican Peso - // - `NLG` - Dutch Guilder - // - `XCD` - East Caribbean Dollar - // - `DDM` - East German Mark - // - `ECS` - Ecuadorian Sucre - // - `ECV` - Ecuadorian Unit of Constant Value - // - `EGP` - Egyptian Pound - // - `GQE` - Equatorial Guinean Ekwele - // - `ERN` - Eritrean Nakfa - // - `EEK` - Estonian Kroon - // - `ETB` - Ethiopian Birr - // - `EUR` - Euro - // - `XBA` - European Composite Unit - // - `XEU` - European Currency Unit - // - `XBB` - European Monetary Unit - // - `XBC` - European Unit of Account (XBC) - // - `XBD` - European Unit of Account (XBD) - // - `FKP` - Falkland Islands Pound - // - `FJD` - Fijian Dollar - // - `FIM` - Finnish Markka - // - `FRF` - French Franc - // - `XFO` - French Gold Franc - // - `XFU` - French UIC-Franc - // - `GMD` - Gambian Dalasi - // - `GEK` - Georgian Kupon Larit - // - `GEL` - Georgian Lari - // - `DEM` - German Mark - // - `GHS` - Ghanaian Cedi - // - `GHC` - Ghanaian Cedi (1979–2007) - // - `GIP` - Gibraltar Pound - // - `XAU` - Gold - // - `GRD` - Greek Drachma - // - `GTQ` - Guatemalan Quetzal - // - `GWP` - Guinea-Bissau Peso - // - `GNF` - Guinean Franc - // - `GNS` - Guinean Syli - // - `GYD` - Guyanaese Dollar - // - `HTG` - Haitian Gourde - // - `HNL` - Honduran Lempira - // - `HKD` - Hong Kong Dollar - // - `HUF` - Hungarian Forint - // - `IMP` - IMP - // - `ISK` - Icelandic Króna - // - `ISJ` - Icelandic Króna (1918–1981) - // - `INR` - Indian Rupee - // - `IDR` - Indonesian Rupiah - // - `IRR` - Iranian Rial - // - `IQD` - Iraqi Dinar - // - `IEP` - Irish Pound - // - `ILS` - Israeli New Shekel - // - `ILP` - Israeli Pound - // - `ILR` - Israeli Shekel (1980–1985) - // - `ITL` - Italian Lira - // - `JMD` - Jamaican Dollar - // - `JPY` - Japanese Yen - // - `JOD` - Jordanian Dinar - // - `KZT` - Kazakhstani Tenge - // - `KES` - Kenyan Shilling - // - `KWD` - Kuwaiti Dinar - // - `KGS` - Kyrgystani Som - // - `LAK` - Laotian Kip - // - `LVL` - Latvian Lats - // - `LVR` - Latvian Ruble - // - `LBP` - Lebanese Pound - // - `LSL` - Lesotho Loti - // - `LRD` - Liberian Dollar - // - `LYD` - Libyan Dinar - // - `LTL` - Lithuanian Litas - // - `LTT` - Lithuanian Talonas - // - `LUL` - Luxembourg Financial Franc - // - `LUC` - Luxembourgian Convertible Franc - // - `LUF` - Luxembourgian Franc - // - `MOP` - Macanese Pataca - // - `MKD` - Macedonian Denar - // - `MKN` - Macedonian Denar (1992–1993) - // - `MGA` - Malagasy Ariary - // - `MGF` - Malagasy Franc - // - `MWK` - Malawian Kwacha - // - `MYR` - Malaysian Ringgit - // - `MVR` - Maldivian Rufiyaa - // - `MVP` - Maldivian Rupee (1947–1981) - // - `MLF` - Malian Franc - // - `MTL` - Maltese Lira - // - `MTP` - Maltese Pound - // - `MRU` - Mauritanian Ouguiya - // - `MRO` - Mauritanian Ouguiya (1973–2017) - // - `MUR` - Mauritian Rupee - // - `MXV` - Mexican Investment Unit - // - `MXN` - Mexican Peso - // - `MXP` - Mexican Silver Peso (1861–1992) - // - `MDC` - Moldovan Cupon - // - `MDL` - Moldovan Leu - // - `MCF` - Monegasque Franc - // - `MNT` - Mongolian Tugrik - // - `MAD` - Moroccan Dirham - // - `MAF` - Moroccan Franc - // - `MZE` - Mozambican Escudo - // - `MZN` - Mozambican Metical - // - `MZM` - Mozambican Metical (1980–2006) - // - `MMK` - Myanmar Kyat - // - `NAD` - Namibian Dollar - // - `NPR` - Nepalese Rupee - // - `ANG` - Netherlands Antillean Guilder - // - `TWD` - New Taiwan Dollar - // - `NZD` - New Zealand Dollar - // - `NIO` - Nicaraguan Córdoba - // - `NIC` - Nicaraguan Córdoba (1988–1991) - // - `NGN` - Nigerian Naira - // - `KPW` - North Korean Won - // - `NOK` - Norwegian Krone - // - `OMR` - Omani Rial - // - `PKR` - Pakistani Rupee - // - `XPD` - Palladium - // - `PAB` - Panamanian Balboa - // - `PGK` - Papua New Guinean Kina - // - `PYG` - Paraguayan Guarani - // - `PEI` - Peruvian Inti - // - `PEN` - Peruvian Sol - // - `PES` - Peruvian Sol (1863–1965) - // - `PHP` - Philippine Peso - // - `XPT` - Platinum - // - `PLN` - Polish Zloty - // - `PLZ` - Polish Zloty (1950–1995) - // - `PTE` - Portuguese Escudo - // - `GWE` - Portuguese Guinea Escudo - // - `QAR` - Qatari Rial - // - `XRE` - RINET Funds - // - `RHD` - Rhodesian Dollar - // - `RON` - Romanian Leu - // - `ROL` - Romanian Leu (1952–2006) - // - `RUB` - Russian Ruble - // - `RUR` - Russian Ruble (1991–1998) - // - `RWF` - Rwandan Franc - // - `SVC` - Salvadoran Colón - // - `WST` - Samoan Tala - // - `SAR` - Saudi Riyal - // - `RSD` - Serbian Dinar - // - `CSD` - Serbian Dinar (2002–2006) - // - `SCR` - Seychellois Rupee - // - `SLL` - Sierra Leonean Leone - // - `XAG` - Silver - // - `SGD` - Singapore Dollar - // - `SKK` - Slovak Koruna - // - `SIT` - Slovenian Tolar - // - `SBD` - Solomon Islands Dollar - // - `SOS` - Somali Shilling - // - `ZAR` - South African Rand - // - `ZAL` - South African Rand (financial) - // - `KRH` - South Korean Hwan (1953–1962) - // - `KRW` - South Korean Won - // - `KRO` - South Korean Won (1945–1953) - // - `SSP` - South Sudanese Pound - // - `SUR` - Soviet Rouble - // - `ESP` - Spanish Peseta - // - `ESA` - Spanish Peseta (A account) - // - `ESB` - Spanish Peseta (convertible account) - // - `XDR` - Special Drawing Rights - // - `LKR` - Sri Lankan Rupee - // - `SHP` - St. Helena Pound - // - `XSU` - Sucre - // - `SDD` - Sudanese Dinar (1992–2007) - // - `SDG` - Sudanese Pound - // - `SDP` - Sudanese Pound (1957–1998) - // - `SRD` - Surinamese Dollar - // - `SRG` - Surinamese Guilder - // - `SZL` - Swazi Lilangeni - // - `SEK` - Swedish Krona - // - `CHF` - Swiss Franc - // - `SYP` - Syrian Pound - // - `STN` - São Tomé & Príncipe Dobra - // - `STD` - São Tomé & Príncipe Dobra (1977–2017) - // - `TVD` - TVD - // - `TJR` - Tajikistani Ruble - // - `TJS` - Tajikistani Somoni - // - `TZS` - Tanzanian Shilling - // - `XTS` - Testing Currency Code - // - `THB` - Thai Baht - // - `XXX` - The codes assigned for transactions where no currency is involved - // - `TPE` - Timorese Escudo - // - `TOP` - Tongan Paʻanga - // - `TTD` - Trinidad & Tobago Dollar - // - `TND` - Tunisian Dinar - // - `TRY` - Turkish Lira - // - `TRL` - Turkish Lira (1922–2005) - // - `TMT` - Turkmenistani Manat - // - `TMM` - Turkmenistani Manat (1993–2009) - // - `USD` - US Dollar - // - `USN` - US Dollar (Next day) - // - `USS` - US Dollar (Same day) - // - `UGX` - Ugandan Shilling - // - `UGS` - Ugandan Shilling (1966–1987) - // - `UAH` - Ukrainian Hryvnia - // - `UAK` - Ukrainian Karbovanets - // - `AED` - United Arab Emirates Dirham - // - `UYW` - Uruguayan Nominal Wage Index Unit - // - `UYU` - Uruguayan Peso - // - `UYP` - Uruguayan Peso (1975–1993) - // - `UYI` - Uruguayan Peso (Indexed Units) - // - `UZS` - Uzbekistani Som - // - `VUV` - Vanuatu Vatu - // - `VES` - Venezuelan Bolívar - // - `VEB` - Venezuelan Bolívar (1871–2008) - // - `VEF` - Venezuelan Bolívar (2008–2018) - // - `VND` - Vietnamese Dong - // - `VNN` - Vietnamese Dong (1978–1985) - // - `CHE` - WIR Euro - // - `CHW` - WIR Franc - // - `XOF` - West African CFA Franc - // - `YDD` - Yemeni Dinar - // - `YER` - Yemeni Rial - // - `YUN` - Yugoslavian Convertible Dinar (1990–1992) - // - `YUD` - Yugoslavian Hard Dinar (1966–1990) - // - `YUM` - Yugoslavian New Dinar (1994–2002) - // - `YUR` - Yugoslavian Reformed Dinar (1992–1993) - // - `ZWN` - ZWN - // - `ZRN` - Zairean New Zaire (1993–1998) - // - `ZRZ` - Zairean Zaire (1971–1993) - // - `ZMW` - Zambian Kwacha - // - `ZMK` - Zambian Kwacha (1968–2012) - // - `ZWD` - Zimbabwean Dollar (1980–2008) - // - `ZWR` - Zimbabwean Dollar (2008) - // - `ZWL` - Zimbabwean Dollar (2009) - Currency *ExpenseLineCurrency `json:"currency,omitempty"` - // The expense's payment account. - Account *ExpenseLineAccount `json:"account,omitempty"` - // The expense's contact. - Contact *ExpenseLineContact `json:"contact,omitempty"` - // The description of the item that was purchased by the company. - Description *string `json:"description,omitempty"` - // The expense line item's exchange rate. - ExchangeRate *string `json:"exchange_rate,omitempty"` - // The tax rate that applies to this line item. - TaxRate *string `json:"tax_rate,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - - _rawJSON json.RawMessage -} - -func (e *ExpenseLine) UnmarshalJSON(data []byte) error { - type unmarshaler ExpenseLine - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *e = ExpenseLine(value) - e._rawJSON = json.RawMessage(data) - return nil -} - -func (e *ExpenseLine) String() string { - if len(e._rawJSON) > 0 { - if value, err := core.StringifyJSON(e._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(e); err == nil { - return value - } - return fmt.Sprintf("%#v", e) -} - -// The expense's payment account. -type ExpenseLineAccount struct { - typeName string - String string - Account *Account -} - -func NewExpenseLineAccountFromString(value string) *ExpenseLineAccount { - return &ExpenseLineAccount{typeName: "string", String: value} -} - -func NewExpenseLineAccountFromAccount(value *Account) *ExpenseLineAccount { - return &ExpenseLineAccount{typeName: "account", Account: value} -} - -func (e *ExpenseLineAccount) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString - return nil - } - valueAccount := new(Account) - if err := json.Unmarshal(data, &valueAccount); err == nil { - e.typeName = "account" - e.Account = valueAccount - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) -} - -func (e ExpenseLineAccount) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return json.Marshal(e.String) - case "account": - return json.Marshal(e.Account) - } -} - -type ExpenseLineAccountVisitor interface { - VisitString(string) error - VisitAccount(*Account) error -} - -func (e *ExpenseLineAccount) Accept(visitor ExpenseLineAccountVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return visitor.VisitString(e.String) - case "account": - return visitor.VisitAccount(e.Account) - } -} - -// The expense's contact. -type ExpenseLineContact struct { - typeName string - String string - Contact *Contact -} - -func NewExpenseLineContactFromString(value string) *ExpenseLineContact { - return &ExpenseLineContact{typeName: "string", String: value} -} - -func NewExpenseLineContactFromContact(value *Contact) *ExpenseLineContact { - return &ExpenseLineContact{typeName: "contact", Contact: value} -} - -func (e *ExpenseLineContact) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString - return nil - } - valueContact := new(Contact) - if err := json.Unmarshal(data, &valueContact); err == nil { - e.typeName = "contact" - e.Contact = valueContact - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) -} - -func (e ExpenseLineContact) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return json.Marshal(e.String) - case "contact": - return json.Marshal(e.Contact) - } -} - -type ExpenseLineContactVisitor interface { - VisitString(string) error - VisitContact(*Contact) error -} - -func (e *ExpenseLineContact) Accept(visitor ExpenseLineContactVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return visitor.VisitString(e.String) - case "contact": - return visitor.VisitContact(e.Contact) - } -} - -// The expense line item's currency. -// -// - `XUA` - ADB Unit of Account -// - `AFN` - Afghan Afghani -// - `AFA` - Afghan Afghani (1927–2002) -// - `ALL` - Albanian Lek -// - `ALK` - Albanian Lek (1946–1965) -// - `DZD` - Algerian Dinar -// - `ADP` - Andorran Peseta -// - `AOA` - Angolan Kwanza -// - `AOK` - Angolan Kwanza (1977–1991) -// - `AON` - Angolan New Kwanza (1990–2000) -// - `AOR` - Angolan Readjusted Kwanza (1995–1999) -// - `ARA` - Argentine Austral -// - `ARS` - Argentine Peso -// - `ARM` - Argentine Peso (1881–1970) -// - `ARP` - Argentine Peso (1983–1985) -// - `ARL` - Argentine Peso Ley (1970–1983) -// - `AMD` - Armenian Dram -// - `AWG` - Aruban Florin -// - `AUD` - Australian Dollar -// - `ATS` - Austrian Schilling -// - `AZN` - Azerbaijani Manat -// - `AZM` - Azerbaijani Manat (1993–2006) -// - `BSD` - Bahamian Dollar -// - `BHD` - Bahraini Dinar -// - `BDT` - Bangladeshi Taka -// - `BBD` - Barbadian Dollar -// - `BYN` - Belarusian Ruble -// - `BYB` - Belarusian Ruble (1994–1999) -// - `BYR` - Belarusian Ruble (2000–2016) -// - `BEF` - Belgian Franc -// - `BEC` - Belgian Franc (convertible) -// - `BEL` - Belgian Franc (financial) -// - `BZD` - Belize Dollar -// - `BMD` - Bermudan Dollar -// - `BTN` - Bhutanese Ngultrum -// - `BOB` - Bolivian Boliviano -// - `BOL` - Bolivian Boliviano (1863–1963) -// - `BOV` - Bolivian Mvdol -// - `BOP` - Bolivian Peso -// - `BAM` - Bosnia-Herzegovina Convertible Mark -// - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) -// - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) -// - `BWP` - Botswanan Pula -// - `BRC` - Brazilian Cruzado (1986–1989) -// - `BRZ` - Brazilian Cruzeiro (1942–1967) -// - `BRE` - Brazilian Cruzeiro (1990–1993) -// - `BRR` - Brazilian Cruzeiro (1993–1994) -// - `BRN` - Brazilian New Cruzado (1989–1990) -// - `BRB` - Brazilian New Cruzeiro (1967–1986) -// - `BRL` - Brazilian Real -// - `GBP` - British Pound -// - `BND` - Brunei Dollar -// - `BGL` - Bulgarian Hard Lev -// - `BGN` - Bulgarian Lev -// - `BGO` - Bulgarian Lev (1879–1952) -// - `BGM` - Bulgarian Socialist Lev -// - `BUK` - Burmese Kyat -// - `BIF` - Burundian Franc -// - `XPF` - CFP Franc -// - `KHR` - Cambodian Riel -// - `CAD` - Canadian Dollar -// - `CVE` - Cape Verdean Escudo -// - `KYD` - Cayman Islands Dollar -// - `XAF` - Central African CFA Franc -// - `CLE` - Chilean Escudo -// - `CLP` - Chilean Peso -// - `CLF` - Chilean Unit of Account (UF) -// - `CNX` - Chinese People’s Bank Dollar -// - `CNY` - Chinese Yuan -// - `CNH` - Chinese Yuan (offshore) -// - `COP` - Colombian Peso -// - `COU` - Colombian Real Value Unit -// - `KMF` - Comorian Franc -// - `CDF` - Congolese Franc -// - `CRC` - Costa Rican Colón -// - `HRD` - Croatian Dinar -// - `HRK` - Croatian Kuna -// - `CUC` - Cuban Convertible Peso -// - `CUP` - Cuban Peso -// - `CYP` - Cypriot Pound -// - `CZK` - Czech Koruna -// - `CSK` - Czechoslovak Hard Koruna -// - `DKK` - Danish Krone -// - `DJF` - Djiboutian Franc -// - `DOP` - Dominican Peso -// - `NLG` - Dutch Guilder -// - `XCD` - East Caribbean Dollar -// - `DDM` - East German Mark -// - `ECS` - Ecuadorian Sucre -// - `ECV` - Ecuadorian Unit of Constant Value -// - `EGP` - Egyptian Pound -// - `GQE` - Equatorial Guinean Ekwele -// - `ERN` - Eritrean Nakfa -// - `EEK` - Estonian Kroon -// - `ETB` - Ethiopian Birr -// - `EUR` - Euro -// - `XBA` - European Composite Unit -// - `XEU` - European Currency Unit -// - `XBB` - European Monetary Unit -// - `XBC` - European Unit of Account (XBC) -// - `XBD` - European Unit of Account (XBD) -// - `FKP` - Falkland Islands Pound -// - `FJD` - Fijian Dollar -// - `FIM` - Finnish Markka -// - `FRF` - French Franc -// - `XFO` - French Gold Franc -// - `XFU` - French UIC-Franc -// - `GMD` - Gambian Dalasi -// - `GEK` - Georgian Kupon Larit -// - `GEL` - Georgian Lari -// - `DEM` - German Mark -// - `GHS` - Ghanaian Cedi -// - `GHC` - Ghanaian Cedi (1979–2007) -// - `GIP` - Gibraltar Pound -// - `XAU` - Gold -// - `GRD` - Greek Drachma -// - `GTQ` - Guatemalan Quetzal -// - `GWP` - Guinea-Bissau Peso -// - `GNF` - Guinean Franc -// - `GNS` - Guinean Syli -// - `GYD` - Guyanaese Dollar -// - `HTG` - Haitian Gourde -// - `HNL` - Honduran Lempira -// - `HKD` - Hong Kong Dollar -// - `HUF` - Hungarian Forint -// - `IMP` - IMP -// - `ISK` - Icelandic Króna -// - `ISJ` - Icelandic Króna (1918–1981) -// - `INR` - Indian Rupee -// - `IDR` - Indonesian Rupiah -// - `IRR` - Iranian Rial -// - `IQD` - Iraqi Dinar -// - `IEP` - Irish Pound -// - `ILS` - Israeli New Shekel -// - `ILP` - Israeli Pound -// - `ILR` - Israeli Shekel (1980–1985) -// - `ITL` - Italian Lira -// - `JMD` - Jamaican Dollar -// - `JPY` - Japanese Yen -// - `JOD` - Jordanian Dinar -// - `KZT` - Kazakhstani Tenge -// - `KES` - Kenyan Shilling -// - `KWD` - Kuwaiti Dinar -// - `KGS` - Kyrgystani Som -// - `LAK` - Laotian Kip -// - `LVL` - Latvian Lats -// - `LVR` - Latvian Ruble -// - `LBP` - Lebanese Pound -// - `LSL` - Lesotho Loti -// - `LRD` - Liberian Dollar -// - `LYD` - Libyan Dinar -// - `LTL` - Lithuanian Litas -// - `LTT` - Lithuanian Talonas -// - `LUL` - Luxembourg Financial Franc -// - `LUC` - Luxembourgian Convertible Franc -// - `LUF` - Luxembourgian Franc -// - `MOP` - Macanese Pataca -// - `MKD` - Macedonian Denar -// - `MKN` - Macedonian Denar (1992–1993) -// - `MGA` - Malagasy Ariary -// - `MGF` - Malagasy Franc -// - `MWK` - Malawian Kwacha -// - `MYR` - Malaysian Ringgit -// - `MVR` - Maldivian Rufiyaa -// - `MVP` - Maldivian Rupee (1947–1981) -// - `MLF` - Malian Franc -// - `MTL` - Maltese Lira -// - `MTP` - Maltese Pound -// - `MRU` - Mauritanian Ouguiya -// - `MRO` - Mauritanian Ouguiya (1973–2017) -// - `MUR` - Mauritian Rupee -// - `MXV` - Mexican Investment Unit -// - `MXN` - Mexican Peso -// - `MXP` - Mexican Silver Peso (1861–1992) -// - `MDC` - Moldovan Cupon -// - `MDL` - Moldovan Leu -// - `MCF` - Monegasque Franc -// - `MNT` - Mongolian Tugrik -// - `MAD` - Moroccan Dirham -// - `MAF` - Moroccan Franc -// - `MZE` - Mozambican Escudo -// - `MZN` - Mozambican Metical -// - `MZM` - Mozambican Metical (1980–2006) -// - `MMK` - Myanmar Kyat -// - `NAD` - Namibian Dollar -// - `NPR` - Nepalese Rupee -// - `ANG` - Netherlands Antillean Guilder -// - `TWD` - New Taiwan Dollar -// - `NZD` - New Zealand Dollar -// - `NIO` - Nicaraguan Córdoba -// - `NIC` - Nicaraguan Córdoba (1988–1991) -// - `NGN` - Nigerian Naira -// - `KPW` - North Korean Won -// - `NOK` - Norwegian Krone -// - `OMR` - Omani Rial -// - `PKR` - Pakistani Rupee -// - `XPD` - Palladium -// - `PAB` - Panamanian Balboa -// - `PGK` - Papua New Guinean Kina -// - `PYG` - Paraguayan Guarani -// - `PEI` - Peruvian Inti -// - `PEN` - Peruvian Sol -// - `PES` - Peruvian Sol (1863–1965) -// - `PHP` - Philippine Peso -// - `XPT` - Platinum -// - `PLN` - Polish Zloty -// - `PLZ` - Polish Zloty (1950–1995) -// - `PTE` - Portuguese Escudo -// - `GWE` - Portuguese Guinea Escudo -// - `QAR` - Qatari Rial -// - `XRE` - RINET Funds -// - `RHD` - Rhodesian Dollar -// - `RON` - Romanian Leu -// - `ROL` - Romanian Leu (1952–2006) -// - `RUB` - Russian Ruble -// - `RUR` - Russian Ruble (1991–1998) -// - `RWF` - Rwandan Franc -// - `SVC` - Salvadoran Colón -// - `WST` - Samoan Tala -// - `SAR` - Saudi Riyal -// - `RSD` - Serbian Dinar -// - `CSD` - Serbian Dinar (2002–2006) -// - `SCR` - Seychellois Rupee -// - `SLL` - Sierra Leonean Leone -// - `XAG` - Silver -// - `SGD` - Singapore Dollar -// - `SKK` - Slovak Koruna -// - `SIT` - Slovenian Tolar -// - `SBD` - Solomon Islands Dollar -// - `SOS` - Somali Shilling -// - `ZAR` - South African Rand -// - `ZAL` - South African Rand (financial) -// - `KRH` - South Korean Hwan (1953–1962) -// - `KRW` - South Korean Won -// - `KRO` - South Korean Won (1945–1953) -// - `SSP` - South Sudanese Pound -// - `SUR` - Soviet Rouble -// - `ESP` - Spanish Peseta -// - `ESA` - Spanish Peseta (A account) -// - `ESB` - Spanish Peseta (convertible account) -// - `XDR` - Special Drawing Rights -// - `LKR` - Sri Lankan Rupee -// - `SHP` - St. Helena Pound -// - `XSU` - Sucre -// - `SDD` - Sudanese Dinar (1992–2007) -// - `SDG` - Sudanese Pound -// - `SDP` - Sudanese Pound (1957–1998) -// - `SRD` - Surinamese Dollar -// - `SRG` - Surinamese Guilder -// - `SZL` - Swazi Lilangeni -// - `SEK` - Swedish Krona -// - `CHF` - Swiss Franc -// - `SYP` - Syrian Pound -// - `STN` - São Tomé & Príncipe Dobra -// - `STD` - São Tomé & Príncipe Dobra (1977–2017) -// - `TVD` - TVD -// - `TJR` - Tajikistani Ruble -// - `TJS` - Tajikistani Somoni -// - `TZS` - Tanzanian Shilling -// - `XTS` - Testing Currency Code -// - `THB` - Thai Baht -// - `XXX` - The codes assigned for transactions where no currency is involved -// - `TPE` - Timorese Escudo -// - `TOP` - Tongan Paʻanga -// - `TTD` - Trinidad & Tobago Dollar -// - `TND` - Tunisian Dinar -// - `TRY` - Turkish Lira -// - `TRL` - Turkish Lira (1922–2005) -// - `TMT` - Turkmenistani Manat -// - `TMM` - Turkmenistani Manat (1993–2009) -// - `USD` - US Dollar -// - `USN` - US Dollar (Next day) -// - `USS` - US Dollar (Same day) -// - `UGX` - Ugandan Shilling -// - `UGS` - Ugandan Shilling (1966–1987) -// - `UAH` - Ukrainian Hryvnia -// - `UAK` - Ukrainian Karbovanets -// - `AED` - United Arab Emirates Dirham -// - `UYW` - Uruguayan Nominal Wage Index Unit -// - `UYU` - Uruguayan Peso -// - `UYP` - Uruguayan Peso (1975–1993) -// - `UYI` - Uruguayan Peso (Indexed Units) -// - `UZS` - Uzbekistani Som -// - `VUV` - Vanuatu Vatu -// - `VES` - Venezuelan Bolívar -// - `VEB` - Venezuelan Bolívar (1871–2008) -// - `VEF` - Venezuelan Bolívar (2008–2018) -// - `VND` - Vietnamese Dong -// - `VNN` - Vietnamese Dong (1978–1985) -// - `CHE` - WIR Euro -// - `CHW` - WIR Franc -// - `XOF` - West African CFA Franc -// - `YDD` - Yemeni Dinar -// - `YER` - Yemeni Rial -// - `YUN` - Yugoslavian Convertible Dinar (1990–1992) -// - `YUD` - Yugoslavian Hard Dinar (1966–1990) -// - `YUM` - Yugoslavian New Dinar (1994–2002) -// - `YUR` - Yugoslavian Reformed Dinar (1992–1993) -// - `ZWN` - ZWN -// - `ZRN` - Zairean New Zaire (1993–1998) -// - `ZRZ` - Zairean Zaire (1971–1993) -// - `ZMW` - Zambian Kwacha -// - `ZMK` - Zambian Kwacha (1968–2012) -// - `ZWD` - Zimbabwean Dollar (1980–2008) -// - `ZWR` - Zimbabwean Dollar (2008) -// - `ZWL` - Zimbabwean Dollar (2009) -type ExpenseLineCurrency struct { - typeName string - TransactionCurrencyEnum TransactionCurrencyEnum - String string -} - -func NewExpenseLineCurrencyFromTransactionCurrencyEnum(value TransactionCurrencyEnum) *ExpenseLineCurrency { - return &ExpenseLineCurrency{typeName: "transactionCurrencyEnum", TransactionCurrencyEnum: value} -} - -func NewExpenseLineCurrencyFromString(value string) *ExpenseLineCurrency { - return &ExpenseLineCurrency{typeName: "string", String: value} -} - -func (e *ExpenseLineCurrency) UnmarshalJSON(data []byte) error { - var valueTransactionCurrencyEnum TransactionCurrencyEnum - if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { - e.typeName = "transactionCurrencyEnum" - e.TransactionCurrencyEnum = valueTransactionCurrencyEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) -} - -func (e ExpenseLineCurrency) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "transactionCurrencyEnum": - return json.Marshal(e.TransactionCurrencyEnum) - case "string": - return json.Marshal(e.String) - } -} - -type ExpenseLineCurrencyVisitor interface { - VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error - VisitString(string) error -} - -func (e *ExpenseLineCurrency) Accept(visitor ExpenseLineCurrencyVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "transactionCurrencyEnum": - return visitor.VisitTransactionCurrencyEnum(e.TransactionCurrencyEnum) - case "string": - return visitor.VisitString(e.String) - } -} - -// The employee this overall transaction relates to. -type ExpenseLineEmployee struct { - typeName string - String string - Employee *Employee -} - -func NewExpenseLineEmployeeFromString(value string) *ExpenseLineEmployee { - return &ExpenseLineEmployee{typeName: "string", String: value} -} - -func NewExpenseLineEmployeeFromEmployee(value *Employee) *ExpenseLineEmployee { - return &ExpenseLineEmployee{typeName: "employee", Employee: value} -} - -func (e *ExpenseLineEmployee) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString - return nil - } - valueEmployee := new(Employee) - if err := json.Unmarshal(data, &valueEmployee); err == nil { - e.typeName = "employee" - e.Employee = valueEmployee - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) -} - -func (e ExpenseLineEmployee) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return json.Marshal(e.String) - case "employee": - return json.Marshal(e.Employee) - } -} - -type ExpenseLineEmployeeVisitor interface { - VisitString(string) error - VisitEmployee(*Employee) error -} - -func (e *ExpenseLineEmployee) Accept(visitor ExpenseLineEmployeeVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return visitor.VisitString(e.String) - case "employee": - return visitor.VisitEmployee(e.Employee) - } -} - -// The line's item. -type ExpenseLineItem struct { - typeName string - String string - Item *Item -} - -func NewExpenseLineItemFromString(value string) *ExpenseLineItem { - return &ExpenseLineItem{typeName: "string", String: value} -} - -func NewExpenseLineItemFromItem(value *Item) *ExpenseLineItem { - return &ExpenseLineItem{typeName: "item", Item: value} -} - -func (e *ExpenseLineItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString - return nil - } - valueItem := new(Item) - if err := json.Unmarshal(data, &valueItem); err == nil { - e.typeName = "item" - e.Item = valueItem - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) -} - -func (e ExpenseLineItem) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return json.Marshal(e.String) - case "item": - return json.Marshal(e.Item) - } -} - -type ExpenseLineItemVisitor interface { - VisitString(string) error - VisitItem(*Item) error -} - -func (e *ExpenseLineItem) Accept(visitor ExpenseLineItemVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return visitor.VisitString(e.String) - case "item": - return visitor.VisitItem(e.Item) - } -} - -// # The ExpenseLine Object -// -// ### Description -// -// The `ExpenseLine` object is used to represent an expense's line items. -// -// ### Usage Example -// -// Fetch from the `GET Expense` endpoint and view the expense's line items. -type ExpenseLineRequest struct { - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The line's item. - Item *ExpenseLineRequestItem `json:"item,omitempty"` - // The line's net amount. - NetAmount *float64 `json:"net_amount,omitempty"` - TrackingCategory *ExpenseLineRequestTrackingCategory `json:"tracking_category,omitempty"` - // The expense line item's associated tracking categories. - TrackingCategories []*ExpenseLineRequestTrackingCategoriesItem `json:"tracking_categories,omitempty"` - // The company the expense belongs to. - Company *string `json:"company,omitempty"` - // The employee this overall transaction relates to. - Employee *ExpenseLineRequestEmployee `json:"employee,omitempty"` - // The expense line item's currency. - // - // - `XUA` - ADB Unit of Account - // - `AFN` - Afghan Afghani - // - `AFA` - Afghan Afghani (1927–2002) - // - `ALL` - Albanian Lek - // - `ALK` - Albanian Lek (1946–1965) - // - `DZD` - Algerian Dinar - // - `ADP` - Andorran Peseta - // - `AOA` - Angolan Kwanza - // - `AOK` - Angolan Kwanza (1977–1991) - // - `AON` - Angolan New Kwanza (1990–2000) - // - `AOR` - Angolan Readjusted Kwanza (1995–1999) - // - `ARA` - Argentine Austral - // - `ARS` - Argentine Peso - // - `ARM` - Argentine Peso (1881–1970) - // - `ARP` - Argentine Peso (1983–1985) - // - `ARL` - Argentine Peso Ley (1970–1983) - // - `AMD` - Armenian Dram - // - `AWG` - Aruban Florin - // - `AUD` - Australian Dollar - // - `ATS` - Austrian Schilling - // - `AZN` - Azerbaijani Manat - // - `AZM` - Azerbaijani Manat (1993–2006) - // - `BSD` - Bahamian Dollar - // - `BHD` - Bahraini Dinar - // - `BDT` - Bangladeshi Taka - // - `BBD` - Barbadian Dollar - // - `BYN` - Belarusian Ruble - // - `BYB` - Belarusian Ruble (1994–1999) - // - `BYR` - Belarusian Ruble (2000–2016) - // - `BEF` - Belgian Franc - // - `BEC` - Belgian Franc (convertible) - // - `BEL` - Belgian Franc (financial) - // - `BZD` - Belize Dollar - // - `BMD` - Bermudan Dollar - // - `BTN` - Bhutanese Ngultrum - // - `BOB` - Bolivian Boliviano - // - `BOL` - Bolivian Boliviano (1863–1963) - // - `BOV` - Bolivian Mvdol - // - `BOP` - Bolivian Peso - // - `BAM` - Bosnia-Herzegovina Convertible Mark - // - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - // - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - // - `BWP` - Botswanan Pula - // - `BRC` - Brazilian Cruzado (1986–1989) - // - `BRZ` - Brazilian Cruzeiro (1942–1967) - // - `BRE` - Brazilian Cruzeiro (1990–1993) - // - `BRR` - Brazilian Cruzeiro (1993–1994) - // - `BRN` - Brazilian New Cruzado (1989–1990) - // - `BRB` - Brazilian New Cruzeiro (1967–1986) - // - `BRL` - Brazilian Real - // - `GBP` - British Pound - // - `BND` - Brunei Dollar - // - `BGL` - Bulgarian Hard Lev - // - `BGN` - Bulgarian Lev - // - `BGO` - Bulgarian Lev (1879–1952) - // - `BGM` - Bulgarian Socialist Lev - // - `BUK` - Burmese Kyat - // - `BIF` - Burundian Franc - // - `XPF` - CFP Franc - // - `KHR` - Cambodian Riel - // - `CAD` - Canadian Dollar - // - `CVE` - Cape Verdean Escudo - // - `KYD` - Cayman Islands Dollar - // - `XAF` - Central African CFA Franc - // - `CLE` - Chilean Escudo - // - `CLP` - Chilean Peso - // - `CLF` - Chilean Unit of Account (UF) - // - `CNX` - Chinese People’s Bank Dollar - // - `CNY` - Chinese Yuan - // - `CNH` - Chinese Yuan (offshore) - // - `COP` - Colombian Peso - // - `COU` - Colombian Real Value Unit - // - `KMF` - Comorian Franc - // - `CDF` - Congolese Franc - // - `CRC` - Costa Rican Colón - // - `HRD` - Croatian Dinar - // - `HRK` - Croatian Kuna - // - `CUC` - Cuban Convertible Peso - // - `CUP` - Cuban Peso - // - `CYP` - Cypriot Pound - // - `CZK` - Czech Koruna - // - `CSK` - Czechoslovak Hard Koruna - // - `DKK` - Danish Krone - // - `DJF` - Djiboutian Franc - // - `DOP` - Dominican Peso - // - `NLG` - Dutch Guilder - // - `XCD` - East Caribbean Dollar - // - `DDM` - East German Mark - // - `ECS` - Ecuadorian Sucre - // - `ECV` - Ecuadorian Unit of Constant Value - // - `EGP` - Egyptian Pound - // - `GQE` - Equatorial Guinean Ekwele - // - `ERN` - Eritrean Nakfa - // - `EEK` - Estonian Kroon - // - `ETB` - Ethiopian Birr - // - `EUR` - Euro - // - `XBA` - European Composite Unit - // - `XEU` - European Currency Unit - // - `XBB` - European Monetary Unit - // - `XBC` - European Unit of Account (XBC) - // - `XBD` - European Unit of Account (XBD) - // - `FKP` - Falkland Islands Pound - // - `FJD` - Fijian Dollar - // - `FIM` - Finnish Markka - // - `FRF` - French Franc - // - `XFO` - French Gold Franc - // - `XFU` - French UIC-Franc - // - `GMD` - Gambian Dalasi - // - `GEK` - Georgian Kupon Larit - // - `GEL` - Georgian Lari - // - `DEM` - German Mark - // - `GHS` - Ghanaian Cedi - // - `GHC` - Ghanaian Cedi (1979–2007) - // - `GIP` - Gibraltar Pound - // - `XAU` - Gold - // - `GRD` - Greek Drachma - // - `GTQ` - Guatemalan Quetzal - // - `GWP` - Guinea-Bissau Peso - // - `GNF` - Guinean Franc - // - `GNS` - Guinean Syli - // - `GYD` - Guyanaese Dollar - // - `HTG` - Haitian Gourde - // - `HNL` - Honduran Lempira - // - `HKD` - Hong Kong Dollar - // - `HUF` - Hungarian Forint - // - `IMP` - IMP - // - `ISK` - Icelandic Króna - // - `ISJ` - Icelandic Króna (1918–1981) - // - `INR` - Indian Rupee - // - `IDR` - Indonesian Rupiah - // - `IRR` - Iranian Rial - // - `IQD` - Iraqi Dinar - // - `IEP` - Irish Pound - // - `ILS` - Israeli New Shekel - // - `ILP` - Israeli Pound - // - `ILR` - Israeli Shekel (1980–1985) - // - `ITL` - Italian Lira - // - `JMD` - Jamaican Dollar - // - `JPY` - Japanese Yen - // - `JOD` - Jordanian Dinar - // - `KZT` - Kazakhstani Tenge - // - `KES` - Kenyan Shilling - // - `KWD` - Kuwaiti Dinar - // - `KGS` - Kyrgystani Som - // - `LAK` - Laotian Kip - // - `LVL` - Latvian Lats - // - `LVR` - Latvian Ruble - // - `LBP` - Lebanese Pound - // - `LSL` - Lesotho Loti - // - `LRD` - Liberian Dollar - // - `LYD` - Libyan Dinar - // - `LTL` - Lithuanian Litas - // - `LTT` - Lithuanian Talonas - // - `LUL` - Luxembourg Financial Franc - // - `LUC` - Luxembourgian Convertible Franc - // - `LUF` - Luxembourgian Franc - // - `MOP` - Macanese Pataca - // - `MKD` - Macedonian Denar - // - `MKN` - Macedonian Denar (1992–1993) - // - `MGA` - Malagasy Ariary - // - `MGF` - Malagasy Franc - // - `MWK` - Malawian Kwacha - // - `MYR` - Malaysian Ringgit - // - `MVR` - Maldivian Rufiyaa - // - `MVP` - Maldivian Rupee (1947–1981) - // - `MLF` - Malian Franc - // - `MTL` - Maltese Lira - // - `MTP` - Maltese Pound - // - `MRU` - Mauritanian Ouguiya - // - `MRO` - Mauritanian Ouguiya (1973–2017) - // - `MUR` - Mauritian Rupee - // - `MXV` - Mexican Investment Unit - // - `MXN` - Mexican Peso - // - `MXP` - Mexican Silver Peso (1861–1992) - // - `MDC` - Moldovan Cupon - // - `MDL` - Moldovan Leu - // - `MCF` - Monegasque Franc - // - `MNT` - Mongolian Tugrik - // - `MAD` - Moroccan Dirham - // - `MAF` - Moroccan Franc - // - `MZE` - Mozambican Escudo - // - `MZN` - Mozambican Metical - // - `MZM` - Mozambican Metical (1980–2006) - // - `MMK` - Myanmar Kyat - // - `NAD` - Namibian Dollar - // - `NPR` - Nepalese Rupee - // - `ANG` - Netherlands Antillean Guilder - // - `TWD` - New Taiwan Dollar - // - `NZD` - New Zealand Dollar - // - `NIO` - Nicaraguan Córdoba - // - `NIC` - Nicaraguan Córdoba (1988–1991) - // - `NGN` - Nigerian Naira - // - `KPW` - North Korean Won - // - `NOK` - Norwegian Krone - // - `OMR` - Omani Rial - // - `PKR` - Pakistani Rupee - // - `XPD` - Palladium - // - `PAB` - Panamanian Balboa - // - `PGK` - Papua New Guinean Kina - // - `PYG` - Paraguayan Guarani - // - `PEI` - Peruvian Inti - // - `PEN` - Peruvian Sol - // - `PES` - Peruvian Sol (1863–1965) - // - `PHP` - Philippine Peso - // - `XPT` - Platinum - // - `PLN` - Polish Zloty - // - `PLZ` - Polish Zloty (1950–1995) - // - `PTE` - Portuguese Escudo - // - `GWE` - Portuguese Guinea Escudo - // - `QAR` - Qatari Rial - // - `XRE` - RINET Funds - // - `RHD` - Rhodesian Dollar - // - `RON` - Romanian Leu - // - `ROL` - Romanian Leu (1952–2006) - // - `RUB` - Russian Ruble - // - `RUR` - Russian Ruble (1991–1998) - // - `RWF` - Rwandan Franc - // - `SVC` - Salvadoran Colón - // - `WST` - Samoan Tala - // - `SAR` - Saudi Riyal - // - `RSD` - Serbian Dinar - // - `CSD` - Serbian Dinar (2002–2006) - // - `SCR` - Seychellois Rupee - // - `SLL` - Sierra Leonean Leone - // - `XAG` - Silver - // - `SGD` - Singapore Dollar - // - `SKK` - Slovak Koruna - // - `SIT` - Slovenian Tolar - // - `SBD` - Solomon Islands Dollar - // - `SOS` - Somali Shilling - // - `ZAR` - South African Rand - // - `ZAL` - South African Rand (financial) - // - `KRH` - South Korean Hwan (1953–1962) - // - `KRW` - South Korean Won - // - `KRO` - South Korean Won (1945–1953) - // - `SSP` - South Sudanese Pound - // - `SUR` - Soviet Rouble - // - `ESP` - Spanish Peseta - // - `ESA` - Spanish Peseta (A account) - // - `ESB` - Spanish Peseta (convertible account) - // - `XDR` - Special Drawing Rights - // - `LKR` - Sri Lankan Rupee - // - `SHP` - St. Helena Pound - // - `XSU` - Sucre - // - `SDD` - Sudanese Dinar (1992–2007) - // - `SDG` - Sudanese Pound - // - `SDP` - Sudanese Pound (1957–1998) - // - `SRD` - Surinamese Dollar - // - `SRG` - Surinamese Guilder - // - `SZL` - Swazi Lilangeni - // - `SEK` - Swedish Krona - // - `CHF` - Swiss Franc - // - `SYP` - Syrian Pound - // - `STN` - São Tomé & Príncipe Dobra - // - `STD` - São Tomé & Príncipe Dobra (1977–2017) - // - `TVD` - TVD - // - `TJR` - Tajikistani Ruble - // - `TJS` - Tajikistani Somoni - // - `TZS` - Tanzanian Shilling - // - `XTS` - Testing Currency Code - // - `THB` - Thai Baht - // - `XXX` - The codes assigned for transactions where no currency is involved - // - `TPE` - Timorese Escudo - // - `TOP` - Tongan Paʻanga - // - `TTD` - Trinidad & Tobago Dollar - // - `TND` - Tunisian Dinar - // - `TRY` - Turkish Lira - // - `TRL` - Turkish Lira (1922–2005) - // - `TMT` - Turkmenistani Manat - // - `TMM` - Turkmenistani Manat (1993–2009) - // - `USD` - US Dollar - // - `USN` - US Dollar (Next day) - // - `USS` - US Dollar (Same day) - // - `UGX` - Ugandan Shilling - // - `UGS` - Ugandan Shilling (1966–1987) - // - `UAH` - Ukrainian Hryvnia - // - `UAK` - Ukrainian Karbovanets - // - `AED` - United Arab Emirates Dirham - // - `UYW` - Uruguayan Nominal Wage Index Unit - // - `UYU` - Uruguayan Peso - // - `UYP` - Uruguayan Peso (1975–1993) - // - `UYI` - Uruguayan Peso (Indexed Units) - // - `UZS` - Uzbekistani Som - // - `VUV` - Vanuatu Vatu - // - `VES` - Venezuelan Bolívar - // - `VEB` - Venezuelan Bolívar (1871–2008) - // - `VEF` - Venezuelan Bolívar (2008–2018) - // - `VND` - Vietnamese Dong - // - `VNN` - Vietnamese Dong (1978–1985) - // - `CHE` - WIR Euro - // - `CHW` - WIR Franc - // - `XOF` - West African CFA Franc - // - `YDD` - Yemeni Dinar - // - `YER` - Yemeni Rial - // - `YUN` - Yugoslavian Convertible Dinar (1990–1992) - // - `YUD` - Yugoslavian Hard Dinar (1966–1990) - // - `YUM` - Yugoslavian New Dinar (1994–2002) - // - `YUR` - Yugoslavian Reformed Dinar (1992–1993) - // - `ZWN` - ZWN - // - `ZRN` - Zairean New Zaire (1993–1998) - // - `ZRZ` - Zairean Zaire (1971–1993) - // - `ZMW` - Zambian Kwacha - // - `ZMK` - Zambian Kwacha (1968–2012) - // - `ZWD` - Zimbabwean Dollar (1980–2008) - // - `ZWR` - Zimbabwean Dollar (2008) - // - `ZWL` - Zimbabwean Dollar (2009) - Currency *ExpenseLineRequestCurrency `json:"currency,omitempty"` - // The expense's payment account. - Account *ExpenseLineRequestAccount `json:"account,omitempty"` - // The expense's contact. - Contact *ExpenseLineRequestContact `json:"contact,omitempty"` - // The description of the item that was purchased by the company. - Description *string `json:"description,omitempty"` - // The expense line item's exchange rate. - ExchangeRate *string `json:"exchange_rate,omitempty"` - // The tax rate that applies to this line item. - TaxRate *string `json:"tax_rate,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` - RemoteFields []*RemoteFieldRequest `json:"remote_fields,omitempty"` - - _rawJSON json.RawMessage -} - -func (e *ExpenseLineRequest) UnmarshalJSON(data []byte) error { - type unmarshaler ExpenseLineRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *e = ExpenseLineRequest(value) - e._rawJSON = json.RawMessage(data) - return nil -} - -func (e *ExpenseLineRequest) String() string { - if len(e._rawJSON) > 0 { - if value, err := core.StringifyJSON(e._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(e); err == nil { - return value - } - return fmt.Sprintf("%#v", e) -} - -// The expense's payment account. -type ExpenseLineRequestAccount struct { - typeName string - String string - Account *Account -} - -func NewExpenseLineRequestAccountFromString(value string) *ExpenseLineRequestAccount { - return &ExpenseLineRequestAccount{typeName: "string", String: value} -} - -func NewExpenseLineRequestAccountFromAccount(value *Account) *ExpenseLineRequestAccount { - return &ExpenseLineRequestAccount{typeName: "account", Account: value} -} - -func (e *ExpenseLineRequestAccount) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString - return nil - } - valueAccount := new(Account) - if err := json.Unmarshal(data, &valueAccount); err == nil { - e.typeName = "account" - e.Account = valueAccount - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) -} - -func (e ExpenseLineRequestAccount) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return json.Marshal(e.String) - case "account": - return json.Marshal(e.Account) - } -} - -type ExpenseLineRequestAccountVisitor interface { - VisitString(string) error - VisitAccount(*Account) error -} - -func (e *ExpenseLineRequestAccount) Accept(visitor ExpenseLineRequestAccountVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return visitor.VisitString(e.String) - case "account": - return visitor.VisitAccount(e.Account) - } -} - -// The expense's contact. -type ExpenseLineRequestContact struct { - typeName string - String string - Contact *Contact -} - -func NewExpenseLineRequestContactFromString(value string) *ExpenseLineRequestContact { - return &ExpenseLineRequestContact{typeName: "string", String: value} -} - -func NewExpenseLineRequestContactFromContact(value *Contact) *ExpenseLineRequestContact { - return &ExpenseLineRequestContact{typeName: "contact", Contact: value} -} - -func (e *ExpenseLineRequestContact) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString - return nil - } - valueContact := new(Contact) - if err := json.Unmarshal(data, &valueContact); err == nil { - e.typeName = "contact" - e.Contact = valueContact - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) -} - -func (e ExpenseLineRequestContact) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return json.Marshal(e.String) - case "contact": - return json.Marshal(e.Contact) - } -} - -type ExpenseLineRequestContactVisitor interface { - VisitString(string) error - VisitContact(*Contact) error -} - -func (e *ExpenseLineRequestContact) Accept(visitor ExpenseLineRequestContactVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return visitor.VisitString(e.String) - case "contact": - return visitor.VisitContact(e.Contact) - } -} - -// The expense line item's currency. -// -// - `XUA` - ADB Unit of Account -// - `AFN` - Afghan Afghani -// - `AFA` - Afghan Afghani (1927–2002) -// - `ALL` - Albanian Lek -// - `ALK` - Albanian Lek (1946–1965) -// - `DZD` - Algerian Dinar -// - `ADP` - Andorran Peseta -// - `AOA` - Angolan Kwanza -// - `AOK` - Angolan Kwanza (1977–1991) -// - `AON` - Angolan New Kwanza (1990–2000) -// - `AOR` - Angolan Readjusted Kwanza (1995–1999) -// - `ARA` - Argentine Austral -// - `ARS` - Argentine Peso -// - `ARM` - Argentine Peso (1881–1970) -// - `ARP` - Argentine Peso (1983–1985) -// - `ARL` - Argentine Peso Ley (1970–1983) -// - `AMD` - Armenian Dram -// - `AWG` - Aruban Florin -// - `AUD` - Australian Dollar -// - `ATS` - Austrian Schilling -// - `AZN` - Azerbaijani Manat -// - `AZM` - Azerbaijani Manat (1993–2006) -// - `BSD` - Bahamian Dollar -// - `BHD` - Bahraini Dinar -// - `BDT` - Bangladeshi Taka -// - `BBD` - Barbadian Dollar -// - `BYN` - Belarusian Ruble -// - `BYB` - Belarusian Ruble (1994–1999) -// - `BYR` - Belarusian Ruble (2000–2016) -// - `BEF` - Belgian Franc -// - `BEC` - Belgian Franc (convertible) -// - `BEL` - Belgian Franc (financial) -// - `BZD` - Belize Dollar -// - `BMD` - Bermudan Dollar -// - `BTN` - Bhutanese Ngultrum -// - `BOB` - Bolivian Boliviano -// - `BOL` - Bolivian Boliviano (1863–1963) -// - `BOV` - Bolivian Mvdol -// - `BOP` - Bolivian Peso -// - `BAM` - Bosnia-Herzegovina Convertible Mark -// - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) -// - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) -// - `BWP` - Botswanan Pula -// - `BRC` - Brazilian Cruzado (1986–1989) -// - `BRZ` - Brazilian Cruzeiro (1942–1967) -// - `BRE` - Brazilian Cruzeiro (1990–1993) -// - `BRR` - Brazilian Cruzeiro (1993–1994) -// - `BRN` - Brazilian New Cruzado (1989–1990) -// - `BRB` - Brazilian New Cruzeiro (1967–1986) -// - `BRL` - Brazilian Real -// - `GBP` - British Pound -// - `BND` - Brunei Dollar -// - `BGL` - Bulgarian Hard Lev -// - `BGN` - Bulgarian Lev -// - `BGO` - Bulgarian Lev (1879–1952) -// - `BGM` - Bulgarian Socialist Lev -// - `BUK` - Burmese Kyat -// - `BIF` - Burundian Franc -// - `XPF` - CFP Franc -// - `KHR` - Cambodian Riel -// - `CAD` - Canadian Dollar -// - `CVE` - Cape Verdean Escudo -// - `KYD` - Cayman Islands Dollar -// - `XAF` - Central African CFA Franc -// - `CLE` - Chilean Escudo -// - `CLP` - Chilean Peso -// - `CLF` - Chilean Unit of Account (UF) -// - `CNX` - Chinese People’s Bank Dollar -// - `CNY` - Chinese Yuan -// - `CNH` - Chinese Yuan (offshore) -// - `COP` - Colombian Peso -// - `COU` - Colombian Real Value Unit -// - `KMF` - Comorian Franc -// - `CDF` - Congolese Franc -// - `CRC` - Costa Rican Colón -// - `HRD` - Croatian Dinar -// - `HRK` - Croatian Kuna -// - `CUC` - Cuban Convertible Peso -// - `CUP` - Cuban Peso -// - `CYP` - Cypriot Pound -// - `CZK` - Czech Koruna -// - `CSK` - Czechoslovak Hard Koruna -// - `DKK` - Danish Krone -// - `DJF` - Djiboutian Franc -// - `DOP` - Dominican Peso -// - `NLG` - Dutch Guilder -// - `XCD` - East Caribbean Dollar -// - `DDM` - East German Mark -// - `ECS` - Ecuadorian Sucre -// - `ECV` - Ecuadorian Unit of Constant Value -// - `EGP` - Egyptian Pound -// - `GQE` - Equatorial Guinean Ekwele -// - `ERN` - Eritrean Nakfa -// - `EEK` - Estonian Kroon -// - `ETB` - Ethiopian Birr -// - `EUR` - Euro -// - `XBA` - European Composite Unit -// - `XEU` - European Currency Unit -// - `XBB` - European Monetary Unit -// - `XBC` - European Unit of Account (XBC) -// - `XBD` - European Unit of Account (XBD) -// - `FKP` - Falkland Islands Pound -// - `FJD` - Fijian Dollar -// - `FIM` - Finnish Markka -// - `FRF` - French Franc -// - `XFO` - French Gold Franc -// - `XFU` - French UIC-Franc -// - `GMD` - Gambian Dalasi -// - `GEK` - Georgian Kupon Larit -// - `GEL` - Georgian Lari -// - `DEM` - German Mark -// - `GHS` - Ghanaian Cedi -// - `GHC` - Ghanaian Cedi (1979–2007) -// - `GIP` - Gibraltar Pound -// - `XAU` - Gold -// - `GRD` - Greek Drachma -// - `GTQ` - Guatemalan Quetzal -// - `GWP` - Guinea-Bissau Peso -// - `GNF` - Guinean Franc -// - `GNS` - Guinean Syli -// - `GYD` - Guyanaese Dollar -// - `HTG` - Haitian Gourde -// - `HNL` - Honduran Lempira -// - `HKD` - Hong Kong Dollar -// - `HUF` - Hungarian Forint -// - `IMP` - IMP -// - `ISK` - Icelandic Króna -// - `ISJ` - Icelandic Króna (1918–1981) -// - `INR` - Indian Rupee -// - `IDR` - Indonesian Rupiah -// - `IRR` - Iranian Rial -// - `IQD` - Iraqi Dinar -// - `IEP` - Irish Pound -// - `ILS` - Israeli New Shekel -// - `ILP` - Israeli Pound -// - `ILR` - Israeli Shekel (1980–1985) -// - `ITL` - Italian Lira -// - `JMD` - Jamaican Dollar -// - `JPY` - Japanese Yen -// - `JOD` - Jordanian Dinar -// - `KZT` - Kazakhstani Tenge -// - `KES` - Kenyan Shilling -// - `KWD` - Kuwaiti Dinar -// - `KGS` - Kyrgystani Som -// - `LAK` - Laotian Kip -// - `LVL` - Latvian Lats -// - `LVR` - Latvian Ruble -// - `LBP` - Lebanese Pound -// - `LSL` - Lesotho Loti -// - `LRD` - Liberian Dollar -// - `LYD` - Libyan Dinar -// - `LTL` - Lithuanian Litas -// - `LTT` - Lithuanian Talonas -// - `LUL` - Luxembourg Financial Franc -// - `LUC` - Luxembourgian Convertible Franc -// - `LUF` - Luxembourgian Franc -// - `MOP` - Macanese Pataca -// - `MKD` - Macedonian Denar -// - `MKN` - Macedonian Denar (1992–1993) -// - `MGA` - Malagasy Ariary -// - `MGF` - Malagasy Franc -// - `MWK` - Malawian Kwacha -// - `MYR` - Malaysian Ringgit -// - `MVR` - Maldivian Rufiyaa -// - `MVP` - Maldivian Rupee (1947–1981) -// - `MLF` - Malian Franc -// - `MTL` - Maltese Lira -// - `MTP` - Maltese Pound -// - `MRU` - Mauritanian Ouguiya -// - `MRO` - Mauritanian Ouguiya (1973–2017) -// - `MUR` - Mauritian Rupee -// - `MXV` - Mexican Investment Unit -// - `MXN` - Mexican Peso -// - `MXP` - Mexican Silver Peso (1861–1992) -// - `MDC` - Moldovan Cupon -// - `MDL` - Moldovan Leu -// - `MCF` - Monegasque Franc -// - `MNT` - Mongolian Tugrik -// - `MAD` - Moroccan Dirham -// - `MAF` - Moroccan Franc -// - `MZE` - Mozambican Escudo -// - `MZN` - Mozambican Metical -// - `MZM` - Mozambican Metical (1980–2006) -// - `MMK` - Myanmar Kyat -// - `NAD` - Namibian Dollar -// - `NPR` - Nepalese Rupee -// - `ANG` - Netherlands Antillean Guilder -// - `TWD` - New Taiwan Dollar -// - `NZD` - New Zealand Dollar -// - `NIO` - Nicaraguan Córdoba -// - `NIC` - Nicaraguan Córdoba (1988–1991) -// - `NGN` - Nigerian Naira -// - `KPW` - North Korean Won -// - `NOK` - Norwegian Krone -// - `OMR` - Omani Rial -// - `PKR` - Pakistani Rupee -// - `XPD` - Palladium -// - `PAB` - Panamanian Balboa -// - `PGK` - Papua New Guinean Kina -// - `PYG` - Paraguayan Guarani -// - `PEI` - Peruvian Inti -// - `PEN` - Peruvian Sol -// - `PES` - Peruvian Sol (1863–1965) -// - `PHP` - Philippine Peso -// - `XPT` - Platinum -// - `PLN` - Polish Zloty -// - `PLZ` - Polish Zloty (1950–1995) -// - `PTE` - Portuguese Escudo -// - `GWE` - Portuguese Guinea Escudo -// - `QAR` - Qatari Rial -// - `XRE` - RINET Funds -// - `RHD` - Rhodesian Dollar -// - `RON` - Romanian Leu -// - `ROL` - Romanian Leu (1952–2006) -// - `RUB` - Russian Ruble -// - `RUR` - Russian Ruble (1991–1998) -// - `RWF` - Rwandan Franc -// - `SVC` - Salvadoran Colón -// - `WST` - Samoan Tala -// - `SAR` - Saudi Riyal -// - `RSD` - Serbian Dinar -// - `CSD` - Serbian Dinar (2002–2006) -// - `SCR` - Seychellois Rupee -// - `SLL` - Sierra Leonean Leone -// - `XAG` - Silver -// - `SGD` - Singapore Dollar -// - `SKK` - Slovak Koruna -// - `SIT` - Slovenian Tolar -// - `SBD` - Solomon Islands Dollar -// - `SOS` - Somali Shilling -// - `ZAR` - South African Rand -// - `ZAL` - South African Rand (financial) -// - `KRH` - South Korean Hwan (1953–1962) -// - `KRW` - South Korean Won -// - `KRO` - South Korean Won (1945–1953) -// - `SSP` - South Sudanese Pound -// - `SUR` - Soviet Rouble -// - `ESP` - Spanish Peseta -// - `ESA` - Spanish Peseta (A account) -// - `ESB` - Spanish Peseta (convertible account) -// - `XDR` - Special Drawing Rights -// - `LKR` - Sri Lankan Rupee -// - `SHP` - St. Helena Pound -// - `XSU` - Sucre -// - `SDD` - Sudanese Dinar (1992–2007) -// - `SDG` - Sudanese Pound -// - `SDP` - Sudanese Pound (1957–1998) -// - `SRD` - Surinamese Dollar -// - `SRG` - Surinamese Guilder -// - `SZL` - Swazi Lilangeni -// - `SEK` - Swedish Krona -// - `CHF` - Swiss Franc -// - `SYP` - Syrian Pound -// - `STN` - São Tomé & Príncipe Dobra -// - `STD` - São Tomé & Príncipe Dobra (1977–2017) -// - `TVD` - TVD -// - `TJR` - Tajikistani Ruble -// - `TJS` - Tajikistani Somoni -// - `TZS` - Tanzanian Shilling -// - `XTS` - Testing Currency Code -// - `THB` - Thai Baht -// - `XXX` - The codes assigned for transactions where no currency is involved -// - `TPE` - Timorese Escudo -// - `TOP` - Tongan Paʻanga -// - `TTD` - Trinidad & Tobago Dollar -// - `TND` - Tunisian Dinar -// - `TRY` - Turkish Lira -// - `TRL` - Turkish Lira (1922–2005) -// - `TMT` - Turkmenistani Manat -// - `TMM` - Turkmenistani Manat (1993–2009) -// - `USD` - US Dollar -// - `USN` - US Dollar (Next day) -// - `USS` - US Dollar (Same day) -// - `UGX` - Ugandan Shilling -// - `UGS` - Ugandan Shilling (1966–1987) -// - `UAH` - Ukrainian Hryvnia -// - `UAK` - Ukrainian Karbovanets -// - `AED` - United Arab Emirates Dirham -// - `UYW` - Uruguayan Nominal Wage Index Unit -// - `UYU` - Uruguayan Peso -// - `UYP` - Uruguayan Peso (1975–1993) -// - `UYI` - Uruguayan Peso (Indexed Units) -// - `UZS` - Uzbekistani Som -// - `VUV` - Vanuatu Vatu -// - `VES` - Venezuelan Bolívar -// - `VEB` - Venezuelan Bolívar (1871–2008) -// - `VEF` - Venezuelan Bolívar (2008–2018) -// - `VND` - Vietnamese Dong -// - `VNN` - Vietnamese Dong (1978–1985) -// - `CHE` - WIR Euro -// - `CHW` - WIR Franc -// - `XOF` - West African CFA Franc -// - `YDD` - Yemeni Dinar -// - `YER` - Yemeni Rial -// - `YUN` - Yugoslavian Convertible Dinar (1990–1992) -// - `YUD` - Yugoslavian Hard Dinar (1966–1990) -// - `YUM` - Yugoslavian New Dinar (1994–2002) -// - `YUR` - Yugoslavian Reformed Dinar (1992–1993) -// - `ZWN` - ZWN -// - `ZRN` - Zairean New Zaire (1993–1998) -// - `ZRZ` - Zairean Zaire (1971–1993) -// - `ZMW` - Zambian Kwacha -// - `ZMK` - Zambian Kwacha (1968–2012) -// - `ZWD` - Zimbabwean Dollar (1980–2008) -// - `ZWR` - Zimbabwean Dollar (2008) -// - `ZWL` - Zimbabwean Dollar (2009) -type ExpenseLineRequestCurrency struct { - typeName string - TransactionCurrencyEnum TransactionCurrencyEnum - String string -} - -func NewExpenseLineRequestCurrencyFromTransactionCurrencyEnum(value TransactionCurrencyEnum) *ExpenseLineRequestCurrency { - return &ExpenseLineRequestCurrency{typeName: "transactionCurrencyEnum", TransactionCurrencyEnum: value} -} - -func NewExpenseLineRequestCurrencyFromString(value string) *ExpenseLineRequestCurrency { - return &ExpenseLineRequestCurrency{typeName: "string", String: value} -} - -func (e *ExpenseLineRequestCurrency) UnmarshalJSON(data []byte) error { - var valueTransactionCurrencyEnum TransactionCurrencyEnum - if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { - e.typeName = "transactionCurrencyEnum" - e.TransactionCurrencyEnum = valueTransactionCurrencyEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) -} - -func (e ExpenseLineRequestCurrency) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "transactionCurrencyEnum": - return json.Marshal(e.TransactionCurrencyEnum) - case "string": - return json.Marshal(e.String) - } -} - -type ExpenseLineRequestCurrencyVisitor interface { - VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error - VisitString(string) error -} - -func (e *ExpenseLineRequestCurrency) Accept(visitor ExpenseLineRequestCurrencyVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "transactionCurrencyEnum": - return visitor.VisitTransactionCurrencyEnum(e.TransactionCurrencyEnum) - case "string": - return visitor.VisitString(e.String) - } -} - -// The employee this overall transaction relates to. -type ExpenseLineRequestEmployee struct { - typeName string - String string - Employee *Employee -} - -func NewExpenseLineRequestEmployeeFromString(value string) *ExpenseLineRequestEmployee { - return &ExpenseLineRequestEmployee{typeName: "string", String: value} -} - -func NewExpenseLineRequestEmployeeFromEmployee(value *Employee) *ExpenseLineRequestEmployee { - return &ExpenseLineRequestEmployee{typeName: "employee", Employee: value} -} - -func (e *ExpenseLineRequestEmployee) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString - return nil - } - valueEmployee := new(Employee) - if err := json.Unmarshal(data, &valueEmployee); err == nil { - e.typeName = "employee" - e.Employee = valueEmployee - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) -} - -func (e ExpenseLineRequestEmployee) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return json.Marshal(e.String) - case "employee": - return json.Marshal(e.Employee) - } -} - -type ExpenseLineRequestEmployeeVisitor interface { - VisitString(string) error - VisitEmployee(*Employee) error -} - -func (e *ExpenseLineRequestEmployee) Accept(visitor ExpenseLineRequestEmployeeVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return visitor.VisitString(e.String) - case "employee": - return visitor.VisitEmployee(e.Employee) - } -} - -// The line's item. -type ExpenseLineRequestItem struct { - typeName string - String string - Item *Item -} - -func NewExpenseLineRequestItemFromString(value string) *ExpenseLineRequestItem { - return &ExpenseLineRequestItem{typeName: "string", String: value} -} - -func NewExpenseLineRequestItemFromItem(value *Item) *ExpenseLineRequestItem { - return &ExpenseLineRequestItem{typeName: "item", Item: value} -} - -func (e *ExpenseLineRequestItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString - return nil - } - valueItem := new(Item) - if err := json.Unmarshal(data, &valueItem); err == nil { - e.typeName = "item" - e.Item = valueItem - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) -} - -func (e ExpenseLineRequestItem) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return json.Marshal(e.String) - case "item": - return json.Marshal(e.Item) - } -} - -type ExpenseLineRequestItemVisitor interface { - VisitString(string) error - VisitItem(*Item) error -} - -func (e *ExpenseLineRequestItem) Accept(visitor ExpenseLineRequestItemVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return visitor.VisitString(e.String) - case "item": - return visitor.VisitItem(e.Item) - } -} - -type ExpenseLineRequestTrackingCategoriesItem struct { - typeName string - String string - TrackingCategory *TrackingCategory -} - -func NewExpenseLineRequestTrackingCategoriesItemFromString(value string) *ExpenseLineRequestTrackingCategoriesItem { - return &ExpenseLineRequestTrackingCategoriesItem{typeName: "string", String: value} -} - -func NewExpenseLineRequestTrackingCategoriesItemFromTrackingCategory(value *TrackingCategory) *ExpenseLineRequestTrackingCategoriesItem { - return &ExpenseLineRequestTrackingCategoriesItem{typeName: "trackingCategory", TrackingCategory: value} -} - -func (e *ExpenseLineRequestTrackingCategoriesItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString - return nil - } - valueTrackingCategory := new(TrackingCategory) - if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { - e.typeName = "trackingCategory" - e.TrackingCategory = valueTrackingCategory - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) -} - -func (e ExpenseLineRequestTrackingCategoriesItem) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return json.Marshal(e.String) - case "trackingCategory": - return json.Marshal(e.TrackingCategory) - } -} - -type ExpenseLineRequestTrackingCategoriesItemVisitor interface { - VisitString(string) error - VisitTrackingCategory(*TrackingCategory) error -} - -func (e *ExpenseLineRequestTrackingCategoriesItem) Accept(visitor ExpenseLineRequestTrackingCategoriesItemVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return visitor.VisitString(e.String) - case "trackingCategory": - return visitor.VisitTrackingCategory(e.TrackingCategory) - } -} - -type ExpenseLineRequestTrackingCategory struct { - typeName string - String string - TrackingCategory *TrackingCategory -} - -func NewExpenseLineRequestTrackingCategoryFromString(value string) *ExpenseLineRequestTrackingCategory { - return &ExpenseLineRequestTrackingCategory{typeName: "string", String: value} -} - -func NewExpenseLineRequestTrackingCategoryFromTrackingCategory(value *TrackingCategory) *ExpenseLineRequestTrackingCategory { - return &ExpenseLineRequestTrackingCategory{typeName: "trackingCategory", TrackingCategory: value} -} - -func (e *ExpenseLineRequestTrackingCategory) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString - return nil - } - valueTrackingCategory := new(TrackingCategory) - if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { - e.typeName = "trackingCategory" - e.TrackingCategory = valueTrackingCategory - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) -} - -func (e ExpenseLineRequestTrackingCategory) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return json.Marshal(e.String) - case "trackingCategory": - return json.Marshal(e.TrackingCategory) - } -} - -type ExpenseLineRequestTrackingCategoryVisitor interface { - VisitString(string) error - VisitTrackingCategory(*TrackingCategory) error -} - -func (e *ExpenseLineRequestTrackingCategory) Accept(visitor ExpenseLineRequestTrackingCategoryVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return visitor.VisitString(e.String) - case "trackingCategory": - return visitor.VisitTrackingCategory(e.TrackingCategory) - } -} - -type ExpenseLineTrackingCategoriesItem struct { - typeName string - String string - TrackingCategory *TrackingCategory -} - -func NewExpenseLineTrackingCategoriesItemFromString(value string) *ExpenseLineTrackingCategoriesItem { - return &ExpenseLineTrackingCategoriesItem{typeName: "string", String: value} -} - -func NewExpenseLineTrackingCategoriesItemFromTrackingCategory(value *TrackingCategory) *ExpenseLineTrackingCategoriesItem { - return &ExpenseLineTrackingCategoriesItem{typeName: "trackingCategory", TrackingCategory: value} -} - -func (e *ExpenseLineTrackingCategoriesItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString - return nil - } - valueTrackingCategory := new(TrackingCategory) - if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { - e.typeName = "trackingCategory" - e.TrackingCategory = valueTrackingCategory - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) -} - -func (e ExpenseLineTrackingCategoriesItem) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return json.Marshal(e.String) - case "trackingCategory": - return json.Marshal(e.TrackingCategory) - } -} - -type ExpenseLineTrackingCategoriesItemVisitor interface { - VisitString(string) error - VisitTrackingCategory(*TrackingCategory) error -} - -func (e *ExpenseLineTrackingCategoriesItem) Accept(visitor ExpenseLineTrackingCategoriesItemVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return visitor.VisitString(e.String) - case "trackingCategory": - return visitor.VisitTrackingCategory(e.TrackingCategory) - } -} - -type ExpenseLineTrackingCategory struct { - typeName string - String string - TrackingCategory *TrackingCategory -} - -func NewExpenseLineTrackingCategoryFromString(value string) *ExpenseLineTrackingCategory { - return &ExpenseLineTrackingCategory{typeName: "string", String: value} -} - -func NewExpenseLineTrackingCategoryFromTrackingCategory(value *TrackingCategory) *ExpenseLineTrackingCategory { - return &ExpenseLineTrackingCategory{typeName: "trackingCategory", TrackingCategory: value} -} - -func (e *ExpenseLineTrackingCategory) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString - return nil - } - valueTrackingCategory := new(TrackingCategory) - if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { - e.typeName = "trackingCategory" - e.TrackingCategory = valueTrackingCategory - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) -} - -func (e ExpenseLineTrackingCategory) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return json.Marshal(e.String) - case "trackingCategory": - return json.Marshal(e.TrackingCategory) - } -} - -type ExpenseLineTrackingCategoryVisitor interface { - VisitString(string) error - VisitTrackingCategory(*TrackingCategory) error -} - -func (e *ExpenseLineTrackingCategory) Accept(visitor ExpenseLineTrackingCategoryVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return visitor.VisitString(e.String) - case "trackingCategory": - return visitor.VisitTrackingCategory(e.TrackingCategory) - } -} - -// # The Expense Object -// -// ### Description -// -// The `Expense` object is used to represent a direct purchase by a business, typically made with a check, credit card, or cash. Each `Expense` object is dedicated to a grouping of expenses, with each expense recorded in the lines object. -// -// The `Expense` object is used also used to represent refunds to direct purchases. Refunds can be distinguished from purchases by the amount sign of the records. Expense objects with a negative amount are purchases and `Expense` objects with a positive amount are refunds to those purchases. -// -// ### Usage Example -// -// Fetch from the `GET Expense` endpoint and view a company's expense. -type ExpenseRequest struct { - // When the transaction occurred. - TransactionDate *time.Time `json:"transaction_date,omitempty"` - // The expense's payment account. - Account *ExpenseRequestAccount `json:"account,omitempty"` - // The expense's contact. - Contact *ExpenseRequestContact `json:"contact,omitempty"` - // The expense's total amount. - TotalAmount *float64 `json:"total_amount,omitempty"` - // The expense's total amount before tax. - SubTotal *float64 `json:"sub_total,omitempty"` - // The expense's total tax amount. - TotalTaxAmount *float64 `json:"total_tax_amount,omitempty"` - // The expense's currency. - // - // - `XUA` - ADB Unit of Account - // - `AFN` - Afghan Afghani - // - `AFA` - Afghan Afghani (1927–2002) - // - `ALL` - Albanian Lek - // - `ALK` - Albanian Lek (1946–1965) - // - `DZD` - Algerian Dinar - // - `ADP` - Andorran Peseta - // - `AOA` - Angolan Kwanza - // - `AOK` - Angolan Kwanza (1977–1991) - // - `AON` - Angolan New Kwanza (1990–2000) - // - `AOR` - Angolan Readjusted Kwanza (1995–1999) - // - `ARA` - Argentine Austral - // - `ARS` - Argentine Peso - // - `ARM` - Argentine Peso (1881–1970) - // - `ARP` - Argentine Peso (1983–1985) - // - `ARL` - Argentine Peso Ley (1970–1983) - // - `AMD` - Armenian Dram - // - `AWG` - Aruban Florin - // - `AUD` - Australian Dollar - // - `ATS` - Austrian Schilling - // - `AZN` - Azerbaijani Manat - // - `AZM` - Azerbaijani Manat (1993–2006) - // - `BSD` - Bahamian Dollar - // - `BHD` - Bahraini Dinar - // - `BDT` - Bangladeshi Taka - // - `BBD` - Barbadian Dollar - // - `BYN` - Belarusian Ruble - // - `BYB` - Belarusian Ruble (1994–1999) - // - `BYR` - Belarusian Ruble (2000–2016) - // - `BEF` - Belgian Franc - // - `BEC` - Belgian Franc (convertible) - // - `BEL` - Belgian Franc (financial) - // - `BZD` - Belize Dollar - // - `BMD` - Bermudan Dollar - // - `BTN` - Bhutanese Ngultrum - // - `BOB` - Bolivian Boliviano - // - `BOL` - Bolivian Boliviano (1863–1963) - // - `BOV` - Bolivian Mvdol - // - `BOP` - Bolivian Peso - // - `BAM` - Bosnia-Herzegovina Convertible Mark - // - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - // - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - // - `BWP` - Botswanan Pula - // - `BRC` - Brazilian Cruzado (1986–1989) - // - `BRZ` - Brazilian Cruzeiro (1942–1967) - // - `BRE` - Brazilian Cruzeiro (1990–1993) - // - `BRR` - Brazilian Cruzeiro (1993–1994) - // - `BRN` - Brazilian New Cruzado (1989–1990) - // - `BRB` - Brazilian New Cruzeiro (1967–1986) - // - `BRL` - Brazilian Real - // - `GBP` - British Pound - // - `BND` - Brunei Dollar - // - `BGL` - Bulgarian Hard Lev - // - `BGN` - Bulgarian Lev - // - `BGO` - Bulgarian Lev (1879–1952) - // - `BGM` - Bulgarian Socialist Lev - // - `BUK` - Burmese Kyat - // - `BIF` - Burundian Franc - // - `XPF` - CFP Franc - // - `KHR` - Cambodian Riel - // - `CAD` - Canadian Dollar - // - `CVE` - Cape Verdean Escudo - // - `KYD` - Cayman Islands Dollar - // - `XAF` - Central African CFA Franc - // - `CLE` - Chilean Escudo - // - `CLP` - Chilean Peso - // - `CLF` - Chilean Unit of Account (UF) - // - `CNX` - Chinese People’s Bank Dollar - // - `CNY` - Chinese Yuan - // - `CNH` - Chinese Yuan (offshore) - // - `COP` - Colombian Peso - // - `COU` - Colombian Real Value Unit - // - `KMF` - Comorian Franc - // - `CDF` - Congolese Franc - // - `CRC` - Costa Rican Colón - // - `HRD` - Croatian Dinar - // - `HRK` - Croatian Kuna - // - `CUC` - Cuban Convertible Peso - // - `CUP` - Cuban Peso - // - `CYP` - Cypriot Pound - // - `CZK` - Czech Koruna - // - `CSK` - Czechoslovak Hard Koruna - // - `DKK` - Danish Krone - // - `DJF` - Djiboutian Franc - // - `DOP` - Dominican Peso - // - `NLG` - Dutch Guilder - // - `XCD` - East Caribbean Dollar - // - `DDM` - East German Mark - // - `ECS` - Ecuadorian Sucre - // - `ECV` - Ecuadorian Unit of Constant Value - // - `EGP` - Egyptian Pound - // - `GQE` - Equatorial Guinean Ekwele - // - `ERN` - Eritrean Nakfa - // - `EEK` - Estonian Kroon - // - `ETB` - Ethiopian Birr - // - `EUR` - Euro - // - `XBA` - European Composite Unit - // - `XEU` - European Currency Unit - // - `XBB` - European Monetary Unit - // - `XBC` - European Unit of Account (XBC) - // - `XBD` - European Unit of Account (XBD) - // - `FKP` - Falkland Islands Pound - // - `FJD` - Fijian Dollar - // - `FIM` - Finnish Markka - // - `FRF` - French Franc - // - `XFO` - French Gold Franc - // - `XFU` - French UIC-Franc - // - `GMD` - Gambian Dalasi - // - `GEK` - Georgian Kupon Larit - // - `GEL` - Georgian Lari - // - `DEM` - German Mark - // - `GHS` - Ghanaian Cedi - // - `GHC` - Ghanaian Cedi (1979–2007) - // - `GIP` - Gibraltar Pound - // - `XAU` - Gold - // - `GRD` - Greek Drachma - // - `GTQ` - Guatemalan Quetzal - // - `GWP` - Guinea-Bissau Peso - // - `GNF` - Guinean Franc - // - `GNS` - Guinean Syli - // - `GYD` - Guyanaese Dollar - // - `HTG` - Haitian Gourde - // - `HNL` - Honduran Lempira - // - `HKD` - Hong Kong Dollar - // - `HUF` - Hungarian Forint - // - `IMP` - IMP - // - `ISK` - Icelandic Króna - // - `ISJ` - Icelandic Króna (1918–1981) - // - `INR` - Indian Rupee - // - `IDR` - Indonesian Rupiah - // - `IRR` - Iranian Rial - // - `IQD` - Iraqi Dinar - // - `IEP` - Irish Pound - // - `ILS` - Israeli New Shekel - // - `ILP` - Israeli Pound - // - `ILR` - Israeli Shekel (1980–1985) - // - `ITL` - Italian Lira - // - `JMD` - Jamaican Dollar - // - `JPY` - Japanese Yen - // - `JOD` - Jordanian Dinar - // - `KZT` - Kazakhstani Tenge - // - `KES` - Kenyan Shilling - // - `KWD` - Kuwaiti Dinar - // - `KGS` - Kyrgystani Som - // - `LAK` - Laotian Kip - // - `LVL` - Latvian Lats - // - `LVR` - Latvian Ruble - // - `LBP` - Lebanese Pound - // - `LSL` - Lesotho Loti - // - `LRD` - Liberian Dollar - // - `LYD` - Libyan Dinar - // - `LTL` - Lithuanian Litas - // - `LTT` - Lithuanian Talonas - // - `LUL` - Luxembourg Financial Franc - // - `LUC` - Luxembourgian Convertible Franc - // - `LUF` - Luxembourgian Franc - // - `MOP` - Macanese Pataca - // - `MKD` - Macedonian Denar - // - `MKN` - Macedonian Denar (1992–1993) - // - `MGA` - Malagasy Ariary - // - `MGF` - Malagasy Franc - // - `MWK` - Malawian Kwacha - // - `MYR` - Malaysian Ringgit - // - `MVR` - Maldivian Rufiyaa - // - `MVP` - Maldivian Rupee (1947–1981) - // - `MLF` - Malian Franc - // - `MTL` - Maltese Lira - // - `MTP` - Maltese Pound - // - `MRU` - Mauritanian Ouguiya - // - `MRO` - Mauritanian Ouguiya (1973–2017) - // - `MUR` - Mauritian Rupee - // - `MXV` - Mexican Investment Unit - // - `MXN` - Mexican Peso - // - `MXP` - Mexican Silver Peso (1861–1992) - // - `MDC` - Moldovan Cupon - // - `MDL` - Moldovan Leu - // - `MCF` - Monegasque Franc - // - `MNT` - Mongolian Tugrik - // - `MAD` - Moroccan Dirham - // - `MAF` - Moroccan Franc - // - `MZE` - Mozambican Escudo - // - `MZN` - Mozambican Metical - // - `MZM` - Mozambican Metical (1980–2006) - // - `MMK` - Myanmar Kyat - // - `NAD` - Namibian Dollar - // - `NPR` - Nepalese Rupee - // - `ANG` - Netherlands Antillean Guilder - // - `TWD` - New Taiwan Dollar - // - `NZD` - New Zealand Dollar - // - `NIO` - Nicaraguan Córdoba - // - `NIC` - Nicaraguan Córdoba (1988–1991) - // - `NGN` - Nigerian Naira - // - `KPW` - North Korean Won - // - `NOK` - Norwegian Krone - // - `OMR` - Omani Rial - // - `PKR` - Pakistani Rupee - // - `XPD` - Palladium - // - `PAB` - Panamanian Balboa - // - `PGK` - Papua New Guinean Kina - // - `PYG` - Paraguayan Guarani - // - `PEI` - Peruvian Inti - // - `PEN` - Peruvian Sol - // - `PES` - Peruvian Sol (1863–1965) - // - `PHP` - Philippine Peso - // - `XPT` - Platinum - // - `PLN` - Polish Zloty - // - `PLZ` - Polish Zloty (1950–1995) - // - `PTE` - Portuguese Escudo - // - `GWE` - Portuguese Guinea Escudo - // - `QAR` - Qatari Rial - // - `XRE` - RINET Funds - // - `RHD` - Rhodesian Dollar - // - `RON` - Romanian Leu - // - `ROL` - Romanian Leu (1952–2006) - // - `RUB` - Russian Ruble - // - `RUR` - Russian Ruble (1991–1998) - // - `RWF` - Rwandan Franc - // - `SVC` - Salvadoran Colón - // - `WST` - Samoan Tala - // - `SAR` - Saudi Riyal - // - `RSD` - Serbian Dinar - // - `CSD` - Serbian Dinar (2002–2006) - // - `SCR` - Seychellois Rupee - // - `SLL` - Sierra Leonean Leone - // - `XAG` - Silver - // - `SGD` - Singapore Dollar - // - `SKK` - Slovak Koruna - // - `SIT` - Slovenian Tolar - // - `SBD` - Solomon Islands Dollar - // - `SOS` - Somali Shilling - // - `ZAR` - South African Rand - // - `ZAL` - South African Rand (financial) - // - `KRH` - South Korean Hwan (1953–1962) - // - `KRW` - South Korean Won - // - `KRO` - South Korean Won (1945–1953) - // - `SSP` - South Sudanese Pound - // - `SUR` - Soviet Rouble - // - `ESP` - Spanish Peseta - // - `ESA` - Spanish Peseta (A account) - // - `ESB` - Spanish Peseta (convertible account) - // - `XDR` - Special Drawing Rights - // - `LKR` - Sri Lankan Rupee - // - `SHP` - St. Helena Pound - // - `XSU` - Sucre - // - `SDD` - Sudanese Dinar (1992–2007) - // - `SDG` - Sudanese Pound - // - `SDP` - Sudanese Pound (1957–1998) - // - `SRD` - Surinamese Dollar - // - `SRG` - Surinamese Guilder - // - `SZL` - Swazi Lilangeni - // - `SEK` - Swedish Krona - // - `CHF` - Swiss Franc - // - `SYP` - Syrian Pound - // - `STN` - São Tomé & Príncipe Dobra - // - `STD` - São Tomé & Príncipe Dobra (1977–2017) - // - `TVD` - TVD - // - `TJR` - Tajikistani Ruble - // - `TJS` - Tajikistani Somoni - // - `TZS` - Tanzanian Shilling - // - `XTS` - Testing Currency Code - // - `THB` - Thai Baht - // - `XXX` - The codes assigned for transactions where no currency is involved - // - `TPE` - Timorese Escudo - // - `TOP` - Tongan Paʻanga - // - `TTD` - Trinidad & Tobago Dollar - // - `TND` - Tunisian Dinar - // - `TRY` - Turkish Lira - // - `TRL` - Turkish Lira (1922–2005) - // - `TMT` - Turkmenistani Manat - // - `TMM` - Turkmenistani Manat (1993–2009) - // - `USD` - US Dollar - // - `USN` - US Dollar (Next day) - // - `USS` - US Dollar (Same day) - // - `UGX` - Ugandan Shilling - // - `UGS` - Ugandan Shilling (1966–1987) - // - `UAH` - Ukrainian Hryvnia - // - `UAK` - Ukrainian Karbovanets - // - `AED` - United Arab Emirates Dirham - // - `UYW` - Uruguayan Nominal Wage Index Unit - // - `UYU` - Uruguayan Peso - // - `UYP` - Uruguayan Peso (1975–1993) - // - `UYI` - Uruguayan Peso (Indexed Units) - // - `UZS` - Uzbekistani Som - // - `VUV` - Vanuatu Vatu - // - `VES` - Venezuelan Bolívar - // - `VEB` - Venezuelan Bolívar (1871–2008) - // - `VEF` - Venezuelan Bolívar (2008–2018) - // - `VND` - Vietnamese Dong - // - `VNN` - Vietnamese Dong (1978–1985) - // - `CHE` - WIR Euro - // - `CHW` - WIR Franc - // - `XOF` - West African CFA Franc - // - `YDD` - Yemeni Dinar - // - `YER` - Yemeni Rial - // - `YUN` - Yugoslavian Convertible Dinar (1990–1992) - // - `YUD` - Yugoslavian Hard Dinar (1966–1990) - // - `YUM` - Yugoslavian New Dinar (1994–2002) - // - `YUR` - Yugoslavian Reformed Dinar (1992–1993) - // - `ZWN` - ZWN - // - `ZRN` - Zairean New Zaire (1993–1998) - // - `ZRZ` - Zairean Zaire (1971–1993) - // - `ZMW` - Zambian Kwacha - // - `ZMK` - Zambian Kwacha (1968–2012) - // - `ZWD` - Zimbabwean Dollar (1980–2008) - // - `ZWR` - Zimbabwean Dollar (2008) - // - `ZWL` - Zimbabwean Dollar (2009) - Currency *ExpenseRequestCurrency `json:"currency,omitempty"` - // The expense's exchange rate. - ExchangeRate *string `json:"exchange_rate,omitempty"` - // If the transaction is inclusive or exclusive of tax. `True` if inclusive, `False` if exclusive. - InclusiveOfTax *bool `json:"inclusive_of_tax,omitempty"` - // The company the expense belongs to. - Company *ExpenseRequestCompany `json:"company,omitempty"` - // The employee this overall transaction relates to. - Employee *ExpenseRequestEmployee `json:"employee,omitempty"` - // The expense's private note. - Memo *string `json:"memo,omitempty"` - Lines []*ExpenseLineRequest `json:"lines,omitempty"` - TrackingCategories []*ExpenseRequestTrackingCategoriesItem `json:"tracking_categories,omitempty"` - // The accounting period that the Expense was generated in. - AccountingPeriod *ExpenseRequestAccountingPeriod `json:"accounting_period,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` - RemoteFields []*RemoteFieldRequest `json:"remote_fields,omitempty"` - - _rawJSON json.RawMessage -} - -func (e *ExpenseRequest) UnmarshalJSON(data []byte) error { - type unmarshaler ExpenseRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *e = ExpenseRequest(value) - e._rawJSON = json.RawMessage(data) - return nil -} - -func (e *ExpenseRequest) String() string { - if len(e._rawJSON) > 0 { - if value, err := core.StringifyJSON(e._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(e); err == nil { - return value - } - return fmt.Sprintf("%#v", e) -} - -// The expense's payment account. -type ExpenseRequestAccount struct { - typeName string - String string - Account *Account -} - -func NewExpenseRequestAccountFromString(value string) *ExpenseRequestAccount { - return &ExpenseRequestAccount{typeName: "string", String: value} -} - -func NewExpenseRequestAccountFromAccount(value *Account) *ExpenseRequestAccount { - return &ExpenseRequestAccount{typeName: "account", Account: value} -} - -func (e *ExpenseRequestAccount) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString - return nil - } - valueAccount := new(Account) - if err := json.Unmarshal(data, &valueAccount); err == nil { - e.typeName = "account" - e.Account = valueAccount - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) -} - -func (e ExpenseRequestAccount) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return json.Marshal(e.String) - case "account": - return json.Marshal(e.Account) - } -} - -type ExpenseRequestAccountVisitor interface { - VisitString(string) error - VisitAccount(*Account) error -} - -func (e *ExpenseRequestAccount) Accept(visitor ExpenseRequestAccountVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return visitor.VisitString(e.String) - case "account": - return visitor.VisitAccount(e.Account) - } -} - -// The accounting period that the Expense was generated in. -type ExpenseRequestAccountingPeriod struct { - typeName string - String string - AccountingPeriod *AccountingPeriod -} - -func NewExpenseRequestAccountingPeriodFromString(value string) *ExpenseRequestAccountingPeriod { - return &ExpenseRequestAccountingPeriod{typeName: "string", String: value} -} - -func NewExpenseRequestAccountingPeriodFromAccountingPeriod(value *AccountingPeriod) *ExpenseRequestAccountingPeriod { - return &ExpenseRequestAccountingPeriod{typeName: "accountingPeriod", AccountingPeriod: value} -} - -func (e *ExpenseRequestAccountingPeriod) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString - return nil - } - valueAccountingPeriod := new(AccountingPeriod) - if err := json.Unmarshal(data, &valueAccountingPeriod); err == nil { - e.typeName = "accountingPeriod" - e.AccountingPeriod = valueAccountingPeriod - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) -} - -func (e ExpenseRequestAccountingPeriod) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return json.Marshal(e.String) - case "accountingPeriod": - return json.Marshal(e.AccountingPeriod) - } -} - -type ExpenseRequestAccountingPeriodVisitor interface { - VisitString(string) error - VisitAccountingPeriod(*AccountingPeriod) error -} - -func (e *ExpenseRequestAccountingPeriod) Accept(visitor ExpenseRequestAccountingPeriodVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return visitor.VisitString(e.String) - case "accountingPeriod": - return visitor.VisitAccountingPeriod(e.AccountingPeriod) - } -} - -// The company the expense belongs to. -type ExpenseRequestCompany struct { - typeName string - String string - CompanyInfo *CompanyInfo -} - -func NewExpenseRequestCompanyFromString(value string) *ExpenseRequestCompany { - return &ExpenseRequestCompany{typeName: "string", String: value} -} - -func NewExpenseRequestCompanyFromCompanyInfo(value *CompanyInfo) *ExpenseRequestCompany { - return &ExpenseRequestCompany{typeName: "companyInfo", CompanyInfo: value} -} - -func (e *ExpenseRequestCompany) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString - return nil - } - valueCompanyInfo := new(CompanyInfo) - if err := json.Unmarshal(data, &valueCompanyInfo); err == nil { - e.typeName = "companyInfo" - e.CompanyInfo = valueCompanyInfo - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) -} - -func (e ExpenseRequestCompany) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return json.Marshal(e.String) - case "companyInfo": - return json.Marshal(e.CompanyInfo) - } -} - -type ExpenseRequestCompanyVisitor interface { - VisitString(string) error - VisitCompanyInfo(*CompanyInfo) error -} - -func (e *ExpenseRequestCompany) Accept(visitor ExpenseRequestCompanyVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return visitor.VisitString(e.String) - case "companyInfo": - return visitor.VisitCompanyInfo(e.CompanyInfo) - } -} - -// The expense's contact. -type ExpenseRequestContact struct { - typeName string - String string - Contact *Contact -} - -func NewExpenseRequestContactFromString(value string) *ExpenseRequestContact { - return &ExpenseRequestContact{typeName: "string", String: value} -} - -func NewExpenseRequestContactFromContact(value *Contact) *ExpenseRequestContact { - return &ExpenseRequestContact{typeName: "contact", Contact: value} -} - -func (e *ExpenseRequestContact) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString - return nil - } - valueContact := new(Contact) - if err := json.Unmarshal(data, &valueContact); err == nil { - e.typeName = "contact" - e.Contact = valueContact - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) -} - -func (e ExpenseRequestContact) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return json.Marshal(e.String) - case "contact": - return json.Marshal(e.Contact) - } -} - -type ExpenseRequestContactVisitor interface { - VisitString(string) error - VisitContact(*Contact) error -} - -func (e *ExpenseRequestContact) Accept(visitor ExpenseRequestContactVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return visitor.VisitString(e.String) - case "contact": - return visitor.VisitContact(e.Contact) - } -} - -// The expense's currency. -// -// - `XUA` - ADB Unit of Account -// - `AFN` - Afghan Afghani -// - `AFA` - Afghan Afghani (1927–2002) -// - `ALL` - Albanian Lek -// - `ALK` - Albanian Lek (1946–1965) -// - `DZD` - Algerian Dinar -// - `ADP` - Andorran Peseta -// - `AOA` - Angolan Kwanza -// - `AOK` - Angolan Kwanza (1977–1991) -// - `AON` - Angolan New Kwanza (1990–2000) -// - `AOR` - Angolan Readjusted Kwanza (1995–1999) -// - `ARA` - Argentine Austral -// - `ARS` - Argentine Peso -// - `ARM` - Argentine Peso (1881–1970) -// - `ARP` - Argentine Peso (1983–1985) -// - `ARL` - Argentine Peso Ley (1970–1983) -// - `AMD` - Armenian Dram -// - `AWG` - Aruban Florin -// - `AUD` - Australian Dollar -// - `ATS` - Austrian Schilling -// - `AZN` - Azerbaijani Manat -// - `AZM` - Azerbaijani Manat (1993–2006) -// - `BSD` - Bahamian Dollar -// - `BHD` - Bahraini Dinar -// - `BDT` - Bangladeshi Taka -// - `BBD` - Barbadian Dollar -// - `BYN` - Belarusian Ruble -// - `BYB` - Belarusian Ruble (1994–1999) -// - `BYR` - Belarusian Ruble (2000–2016) -// - `BEF` - Belgian Franc -// - `BEC` - Belgian Franc (convertible) -// - `BEL` - Belgian Franc (financial) -// - `BZD` - Belize Dollar -// - `BMD` - Bermudan Dollar -// - `BTN` - Bhutanese Ngultrum -// - `BOB` - Bolivian Boliviano -// - `BOL` - Bolivian Boliviano (1863–1963) -// - `BOV` - Bolivian Mvdol -// - `BOP` - Bolivian Peso -// - `BAM` - Bosnia-Herzegovina Convertible Mark -// - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) -// - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) -// - `BWP` - Botswanan Pula -// - `BRC` - Brazilian Cruzado (1986–1989) -// - `BRZ` - Brazilian Cruzeiro (1942–1967) -// - `BRE` - Brazilian Cruzeiro (1990–1993) -// - `BRR` - Brazilian Cruzeiro (1993–1994) -// - `BRN` - Brazilian New Cruzado (1989–1990) -// - `BRB` - Brazilian New Cruzeiro (1967–1986) -// - `BRL` - Brazilian Real -// - `GBP` - British Pound -// - `BND` - Brunei Dollar -// - `BGL` - Bulgarian Hard Lev -// - `BGN` - Bulgarian Lev -// - `BGO` - Bulgarian Lev (1879–1952) -// - `BGM` - Bulgarian Socialist Lev -// - `BUK` - Burmese Kyat -// - `BIF` - Burundian Franc -// - `XPF` - CFP Franc -// - `KHR` - Cambodian Riel -// - `CAD` - Canadian Dollar -// - `CVE` - Cape Verdean Escudo -// - `KYD` - Cayman Islands Dollar -// - `XAF` - Central African CFA Franc -// - `CLE` - Chilean Escudo -// - `CLP` - Chilean Peso -// - `CLF` - Chilean Unit of Account (UF) -// - `CNX` - Chinese People’s Bank Dollar -// - `CNY` - Chinese Yuan -// - `CNH` - Chinese Yuan (offshore) -// - `COP` - Colombian Peso -// - `COU` - Colombian Real Value Unit -// - `KMF` - Comorian Franc -// - `CDF` - Congolese Franc -// - `CRC` - Costa Rican Colón -// - `HRD` - Croatian Dinar -// - `HRK` - Croatian Kuna -// - `CUC` - Cuban Convertible Peso -// - `CUP` - Cuban Peso -// - `CYP` - Cypriot Pound -// - `CZK` - Czech Koruna -// - `CSK` - Czechoslovak Hard Koruna -// - `DKK` - Danish Krone -// - `DJF` - Djiboutian Franc -// - `DOP` - Dominican Peso -// - `NLG` - Dutch Guilder -// - `XCD` - East Caribbean Dollar -// - `DDM` - East German Mark -// - `ECS` - Ecuadorian Sucre -// - `ECV` - Ecuadorian Unit of Constant Value -// - `EGP` - Egyptian Pound -// - `GQE` - Equatorial Guinean Ekwele -// - `ERN` - Eritrean Nakfa -// - `EEK` - Estonian Kroon -// - `ETB` - Ethiopian Birr -// - `EUR` - Euro -// - `XBA` - European Composite Unit -// - `XEU` - European Currency Unit -// - `XBB` - European Monetary Unit -// - `XBC` - European Unit of Account (XBC) -// - `XBD` - European Unit of Account (XBD) -// - `FKP` - Falkland Islands Pound -// - `FJD` - Fijian Dollar -// - `FIM` - Finnish Markka -// - `FRF` - French Franc -// - `XFO` - French Gold Franc -// - `XFU` - French UIC-Franc -// - `GMD` - Gambian Dalasi -// - `GEK` - Georgian Kupon Larit -// - `GEL` - Georgian Lari -// - `DEM` - German Mark -// - `GHS` - Ghanaian Cedi -// - `GHC` - Ghanaian Cedi (1979–2007) -// - `GIP` - Gibraltar Pound -// - `XAU` - Gold -// - `GRD` - Greek Drachma -// - `GTQ` - Guatemalan Quetzal -// - `GWP` - Guinea-Bissau Peso -// - `GNF` - Guinean Franc -// - `GNS` - Guinean Syli -// - `GYD` - Guyanaese Dollar -// - `HTG` - Haitian Gourde -// - `HNL` - Honduran Lempira -// - `HKD` - Hong Kong Dollar -// - `HUF` - Hungarian Forint -// - `IMP` - IMP -// - `ISK` - Icelandic Króna -// - `ISJ` - Icelandic Króna (1918–1981) -// - `INR` - Indian Rupee -// - `IDR` - Indonesian Rupiah -// - `IRR` - Iranian Rial -// - `IQD` - Iraqi Dinar -// - `IEP` - Irish Pound -// - `ILS` - Israeli New Shekel -// - `ILP` - Israeli Pound -// - `ILR` - Israeli Shekel (1980–1985) -// - `ITL` - Italian Lira -// - `JMD` - Jamaican Dollar -// - `JPY` - Japanese Yen -// - `JOD` - Jordanian Dinar -// - `KZT` - Kazakhstani Tenge -// - `KES` - Kenyan Shilling -// - `KWD` - Kuwaiti Dinar -// - `KGS` - Kyrgystani Som -// - `LAK` - Laotian Kip -// - `LVL` - Latvian Lats -// - `LVR` - Latvian Ruble -// - `LBP` - Lebanese Pound -// - `LSL` - Lesotho Loti -// - `LRD` - Liberian Dollar -// - `LYD` - Libyan Dinar -// - `LTL` - Lithuanian Litas -// - `LTT` - Lithuanian Talonas -// - `LUL` - Luxembourg Financial Franc -// - `LUC` - Luxembourgian Convertible Franc -// - `LUF` - Luxembourgian Franc -// - `MOP` - Macanese Pataca -// - `MKD` - Macedonian Denar -// - `MKN` - Macedonian Denar (1992–1993) -// - `MGA` - Malagasy Ariary -// - `MGF` - Malagasy Franc -// - `MWK` - Malawian Kwacha -// - `MYR` - Malaysian Ringgit -// - `MVR` - Maldivian Rufiyaa -// - `MVP` - Maldivian Rupee (1947–1981) -// - `MLF` - Malian Franc -// - `MTL` - Maltese Lira -// - `MTP` - Maltese Pound -// - `MRU` - Mauritanian Ouguiya -// - `MRO` - Mauritanian Ouguiya (1973–2017) -// - `MUR` - Mauritian Rupee -// - `MXV` - Mexican Investment Unit -// - `MXN` - Mexican Peso -// - `MXP` - Mexican Silver Peso (1861–1992) -// - `MDC` - Moldovan Cupon -// - `MDL` - Moldovan Leu -// - `MCF` - Monegasque Franc -// - `MNT` - Mongolian Tugrik -// - `MAD` - Moroccan Dirham -// - `MAF` - Moroccan Franc -// - `MZE` - Mozambican Escudo -// - `MZN` - Mozambican Metical -// - `MZM` - Mozambican Metical (1980–2006) -// - `MMK` - Myanmar Kyat -// - `NAD` - Namibian Dollar -// - `NPR` - Nepalese Rupee -// - `ANG` - Netherlands Antillean Guilder -// - `TWD` - New Taiwan Dollar -// - `NZD` - New Zealand Dollar -// - `NIO` - Nicaraguan Córdoba -// - `NIC` - Nicaraguan Córdoba (1988–1991) -// - `NGN` - Nigerian Naira -// - `KPW` - North Korean Won -// - `NOK` - Norwegian Krone -// - `OMR` - Omani Rial -// - `PKR` - Pakistani Rupee -// - `XPD` - Palladium -// - `PAB` - Panamanian Balboa -// - `PGK` - Papua New Guinean Kina -// - `PYG` - Paraguayan Guarani -// - `PEI` - Peruvian Inti -// - `PEN` - Peruvian Sol -// - `PES` - Peruvian Sol (1863–1965) -// - `PHP` - Philippine Peso -// - `XPT` - Platinum -// - `PLN` - Polish Zloty -// - `PLZ` - Polish Zloty (1950–1995) -// - `PTE` - Portuguese Escudo -// - `GWE` - Portuguese Guinea Escudo -// - `QAR` - Qatari Rial -// - `XRE` - RINET Funds -// - `RHD` - Rhodesian Dollar -// - `RON` - Romanian Leu -// - `ROL` - Romanian Leu (1952–2006) -// - `RUB` - Russian Ruble -// - `RUR` - Russian Ruble (1991–1998) -// - `RWF` - Rwandan Franc -// - `SVC` - Salvadoran Colón -// - `WST` - Samoan Tala -// - `SAR` - Saudi Riyal -// - `RSD` - Serbian Dinar -// - `CSD` - Serbian Dinar (2002–2006) -// - `SCR` - Seychellois Rupee -// - `SLL` - Sierra Leonean Leone -// - `XAG` - Silver -// - `SGD` - Singapore Dollar -// - `SKK` - Slovak Koruna -// - `SIT` - Slovenian Tolar -// - `SBD` - Solomon Islands Dollar -// - `SOS` - Somali Shilling -// - `ZAR` - South African Rand -// - `ZAL` - South African Rand (financial) -// - `KRH` - South Korean Hwan (1953–1962) -// - `KRW` - South Korean Won -// - `KRO` - South Korean Won (1945–1953) -// - `SSP` - South Sudanese Pound -// - `SUR` - Soviet Rouble -// - `ESP` - Spanish Peseta -// - `ESA` - Spanish Peseta (A account) -// - `ESB` - Spanish Peseta (convertible account) -// - `XDR` - Special Drawing Rights -// - `LKR` - Sri Lankan Rupee -// - `SHP` - St. Helena Pound -// - `XSU` - Sucre -// - `SDD` - Sudanese Dinar (1992–2007) -// - `SDG` - Sudanese Pound -// - `SDP` - Sudanese Pound (1957–1998) -// - `SRD` - Surinamese Dollar -// - `SRG` - Surinamese Guilder -// - `SZL` - Swazi Lilangeni -// - `SEK` - Swedish Krona -// - `CHF` - Swiss Franc -// - `SYP` - Syrian Pound -// - `STN` - São Tomé & Príncipe Dobra -// - `STD` - São Tomé & Príncipe Dobra (1977–2017) -// - `TVD` - TVD -// - `TJR` - Tajikistani Ruble -// - `TJS` - Tajikistani Somoni -// - `TZS` - Tanzanian Shilling -// - `XTS` - Testing Currency Code -// - `THB` - Thai Baht -// - `XXX` - The codes assigned for transactions where no currency is involved -// - `TPE` - Timorese Escudo -// - `TOP` - Tongan Paʻanga -// - `TTD` - Trinidad & Tobago Dollar -// - `TND` - Tunisian Dinar -// - `TRY` - Turkish Lira -// - `TRL` - Turkish Lira (1922–2005) -// - `TMT` - Turkmenistani Manat -// - `TMM` - Turkmenistani Manat (1993–2009) -// - `USD` - US Dollar -// - `USN` - US Dollar (Next day) -// - `USS` - US Dollar (Same day) -// - `UGX` - Ugandan Shilling -// - `UGS` - Ugandan Shilling (1966–1987) -// - `UAH` - Ukrainian Hryvnia -// - `UAK` - Ukrainian Karbovanets -// - `AED` - United Arab Emirates Dirham -// - `UYW` - Uruguayan Nominal Wage Index Unit -// - `UYU` - Uruguayan Peso -// - `UYP` - Uruguayan Peso (1975–1993) -// - `UYI` - Uruguayan Peso (Indexed Units) -// - `UZS` - Uzbekistani Som -// - `VUV` - Vanuatu Vatu -// - `VES` - Venezuelan Bolívar -// - `VEB` - Venezuelan Bolívar (1871–2008) -// - `VEF` - Venezuelan Bolívar (2008–2018) -// - `VND` - Vietnamese Dong -// - `VNN` - Vietnamese Dong (1978–1985) -// - `CHE` - WIR Euro -// - `CHW` - WIR Franc -// - `XOF` - West African CFA Franc -// - `YDD` - Yemeni Dinar -// - `YER` - Yemeni Rial -// - `YUN` - Yugoslavian Convertible Dinar (1990–1992) -// - `YUD` - Yugoslavian Hard Dinar (1966–1990) -// - `YUM` - Yugoslavian New Dinar (1994–2002) -// - `YUR` - Yugoslavian Reformed Dinar (1992–1993) -// - `ZWN` - ZWN -// - `ZRN` - Zairean New Zaire (1993–1998) -// - `ZRZ` - Zairean Zaire (1971–1993) -// - `ZMW` - Zambian Kwacha -// - `ZMK` - Zambian Kwacha (1968–2012) -// - `ZWD` - Zimbabwean Dollar (1980–2008) -// - `ZWR` - Zimbabwean Dollar (2008) -// - `ZWL` - Zimbabwean Dollar (2009) -type ExpenseRequestCurrency struct { - typeName string - TransactionCurrencyEnum TransactionCurrencyEnum - String string -} - -func NewExpenseRequestCurrencyFromTransactionCurrencyEnum(value TransactionCurrencyEnum) *ExpenseRequestCurrency { - return &ExpenseRequestCurrency{typeName: "transactionCurrencyEnum", TransactionCurrencyEnum: value} -} - -func NewExpenseRequestCurrencyFromString(value string) *ExpenseRequestCurrency { - return &ExpenseRequestCurrency{typeName: "string", String: value} -} - -func (e *ExpenseRequestCurrency) UnmarshalJSON(data []byte) error { - var valueTransactionCurrencyEnum TransactionCurrencyEnum - if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { - e.typeName = "transactionCurrencyEnum" - e.TransactionCurrencyEnum = valueTransactionCurrencyEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) -} - -func (e ExpenseRequestCurrency) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "transactionCurrencyEnum": - return json.Marshal(e.TransactionCurrencyEnum) - case "string": - return json.Marshal(e.String) - } -} - -type ExpenseRequestCurrencyVisitor interface { - VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error - VisitString(string) error -} - -func (e *ExpenseRequestCurrency) Accept(visitor ExpenseRequestCurrencyVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "transactionCurrencyEnum": - return visitor.VisitTransactionCurrencyEnum(e.TransactionCurrencyEnum) - case "string": - return visitor.VisitString(e.String) - } -} - -// The employee this overall transaction relates to. -type ExpenseRequestEmployee struct { - typeName string - String string - Employee *Employee -} - -func NewExpenseRequestEmployeeFromString(value string) *ExpenseRequestEmployee { - return &ExpenseRequestEmployee{typeName: "string", String: value} -} - -func NewExpenseRequestEmployeeFromEmployee(value *Employee) *ExpenseRequestEmployee { - return &ExpenseRequestEmployee{typeName: "employee", Employee: value} -} - -func (e *ExpenseRequestEmployee) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString - return nil - } - valueEmployee := new(Employee) - if err := json.Unmarshal(data, &valueEmployee); err == nil { - e.typeName = "employee" - e.Employee = valueEmployee - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) -} - -func (e ExpenseRequestEmployee) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return json.Marshal(e.String) - case "employee": - return json.Marshal(e.Employee) - } -} - -type ExpenseRequestEmployeeVisitor interface { - VisitString(string) error - VisitEmployee(*Employee) error -} - -func (e *ExpenseRequestEmployee) Accept(visitor ExpenseRequestEmployeeVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return visitor.VisitString(e.String) - case "employee": - return visitor.VisitEmployee(e.Employee) - } -} - -type ExpenseRequestTrackingCategoriesItem struct { - typeName string - String string - TrackingCategory *TrackingCategory -} - -func NewExpenseRequestTrackingCategoriesItemFromString(value string) *ExpenseRequestTrackingCategoriesItem { - return &ExpenseRequestTrackingCategoriesItem{typeName: "string", String: value} -} - -func NewExpenseRequestTrackingCategoriesItemFromTrackingCategory(value *TrackingCategory) *ExpenseRequestTrackingCategoriesItem { - return &ExpenseRequestTrackingCategoriesItem{typeName: "trackingCategory", TrackingCategory: value} -} - -func (e *ExpenseRequestTrackingCategoriesItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString - return nil - } - valueTrackingCategory := new(TrackingCategory) - if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { - e.typeName = "trackingCategory" - e.TrackingCategory = valueTrackingCategory - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) -} - -func (e ExpenseRequestTrackingCategoriesItem) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return json.Marshal(e.String) - case "trackingCategory": - return json.Marshal(e.TrackingCategory) - } -} - -type ExpenseRequestTrackingCategoriesItemVisitor interface { - VisitString(string) error - VisitTrackingCategory(*TrackingCategory) error -} - -func (e *ExpenseRequestTrackingCategoriesItem) Accept(visitor ExpenseRequestTrackingCategoriesItemVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return visitor.VisitString(e.String) - case "trackingCategory": - return visitor.VisitTrackingCategory(e.TrackingCategory) - } -} - -type ExpenseResponse struct { - Model *Expense `json:"model,omitempty"` - Warnings []*WarningValidationProblem `json:"warnings,omitempty"` - Errors []*ErrorValidationProblem `json:"errors,omitempty"` - Logs []*DebugModeLog `json:"logs,omitempty"` - - _rawJSON json.RawMessage -} - -func (e *ExpenseResponse) UnmarshalJSON(data []byte) error { - type unmarshaler ExpenseResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *e = ExpenseResponse(value) - e._rawJSON = json.RawMessage(data) - return nil -} - -func (e *ExpenseResponse) String() string { - if len(e._rawJSON) > 0 { - if value, err := core.StringifyJSON(e._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(e); err == nil { - return value - } - return fmt.Sprintf("%#v", e) -} - -type ExpenseTrackingCategoriesItem struct { - typeName string - String string - TrackingCategory *TrackingCategory -} - -func NewExpenseTrackingCategoriesItemFromString(value string) *ExpenseTrackingCategoriesItem { - return &ExpenseTrackingCategoriesItem{typeName: "string", String: value} -} - -func NewExpenseTrackingCategoriesItemFromTrackingCategory(value *TrackingCategory) *ExpenseTrackingCategoriesItem { - return &ExpenseTrackingCategoriesItem{typeName: "trackingCategory", TrackingCategory: value} -} - -func (e *ExpenseTrackingCategoriesItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString - return nil - } - valueTrackingCategory := new(TrackingCategory) - if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { - e.typeName = "trackingCategory" - e.TrackingCategory = valueTrackingCategory - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) -} - -func (e ExpenseTrackingCategoriesItem) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return json.Marshal(e.String) - case "trackingCategory": - return json.Marshal(e.TrackingCategory) - } -} - -type ExpenseTrackingCategoriesItemVisitor interface { - VisitString(string) error - VisitTrackingCategory(*TrackingCategory) error -} - -func (e *ExpenseTrackingCategoriesItem) Accept(visitor ExpenseTrackingCategoriesItemVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return visitor.VisitString(e.String) - case "trackingCategory": - return visitor.VisitTrackingCategory(e.TrackingCategory) - } -} - -type ExternalTargetFieldApi struct { - Name *string `json:"name,omitempty"` - Description *string `json:"description,omitempty"` - IsMapped *string `json:"is_mapped,omitempty"` - - _rawJSON json.RawMessage -} - -func (e *ExternalTargetFieldApi) UnmarshalJSON(data []byte) error { - type unmarshaler ExternalTargetFieldApi - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *e = ExternalTargetFieldApi(value) - e._rawJSON = json.RawMessage(data) - return nil -} - -func (e *ExternalTargetFieldApi) String() string { - if len(e._rawJSON) > 0 { - if value, err := core.StringifyJSON(e._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(e); err == nil { - return value - } - return fmt.Sprintf("%#v", e) -} - -type ExternalTargetFieldApiResponse struct { - Account []*ExternalTargetFieldApi `json:"Account,omitempty"` - AccountingAttachment []*ExternalTargetFieldApi `json:"AccountingAttachment,omitempty"` - BalanceSheet []*ExternalTargetFieldApi `json:"BalanceSheet,omitempty"` - CashFlowStatement []*ExternalTargetFieldApi `json:"CashFlowStatement,omitempty"` - CompanyInfo []*ExternalTargetFieldApi `json:"CompanyInfo,omitempty"` - Contact []*ExternalTargetFieldApi `json:"Contact,omitempty"` - IncomeStatement []*ExternalTargetFieldApi `json:"IncomeStatement,omitempty"` - CreditNote []*ExternalTargetFieldApi `json:"CreditNote,omitempty"` - Item []*ExternalTargetFieldApi `json:"Item,omitempty"` - PurchaseOrder []*ExternalTargetFieldApi `json:"PurchaseOrder,omitempty"` - TrackingCategory []*ExternalTargetFieldApi `json:"TrackingCategory,omitempty"` - JournalEntry []*ExternalTargetFieldApi `json:"JournalEntry,omitempty"` - TaxRate []*ExternalTargetFieldApi `json:"TaxRate,omitempty"` - Invoice []*ExternalTargetFieldApi `json:"Invoice,omitempty"` - Payment []*ExternalTargetFieldApi `json:"Payment,omitempty"` - Expense []*ExternalTargetFieldApi `json:"Expense,omitempty"` - VendorCredit []*ExternalTargetFieldApi `json:"VendorCredit,omitempty"` - Transaction []*ExternalTargetFieldApi `json:"Transaction,omitempty"` - AccountingPeriod []*ExternalTargetFieldApi `json:"AccountingPeriod,omitempty"` - GeneralLedgerTransaction []*ExternalTargetFieldApi `json:"GeneralLedgerTransaction,omitempty"` - BankFeedAccount []*ExternalTargetFieldApi `json:"BankFeedAccount,omitempty"` - Employee []*ExternalTargetFieldApi `json:"Employee,omitempty"` - - _rawJSON json.RawMessage -} - -func (e *ExternalTargetFieldApiResponse) UnmarshalJSON(data []byte) error { - type unmarshaler ExternalTargetFieldApiResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *e = ExternalTargetFieldApiResponse(value) - e._rawJSON = json.RawMessage(data) - return nil -} - -func (e *ExternalTargetFieldApiResponse) String() string { - if len(e._rawJSON) > 0 { - if value, err := core.StringifyJSON(e._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(e); err == nil { - return value - } - return fmt.Sprintf("%#v", e) -} - -// - `ACTIVE` - ACTIVE -// - `INACTIVE` - INACTIVE -type FeedStatusEnum string - -const ( - FeedStatusEnumActive FeedStatusEnum = "ACTIVE" - FeedStatusEnumInactive FeedStatusEnum = "INACTIVE" -) - -func NewFeedStatusEnumFromString(s string) (FeedStatusEnum, error) { - switch s { - case "ACTIVE": - return FeedStatusEnumActive, nil - case "INACTIVE": - return FeedStatusEnumInactive, nil - } - var t FeedStatusEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (f FeedStatusEnum) Ptr() *FeedStatusEnum { - return &f -} - -// - `string` - string -// - `number` - number -// - `date` - date -// - `datetime` - datetime -// - `bool` - bool -// - `list` - list -type FieldFormatEnum string - -const ( - FieldFormatEnumString FieldFormatEnum = "string" - FieldFormatEnumNumber FieldFormatEnum = "number" - FieldFormatEnumDate FieldFormatEnum = "date" - FieldFormatEnumDatetime FieldFormatEnum = "datetime" - FieldFormatEnumBool FieldFormatEnum = "bool" - FieldFormatEnumList FieldFormatEnum = "list" -) - -func NewFieldFormatEnumFromString(s string) (FieldFormatEnum, error) { - switch s { - case "string": - return FieldFormatEnumString, nil - case "number": - return FieldFormatEnumNumber, nil - case "date": - return FieldFormatEnumDate, nil - case "datetime": - return FieldFormatEnumDatetime, nil - case "bool": - return FieldFormatEnumBool, nil - case "list": - return FieldFormatEnumList, nil - } - var t FieldFormatEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (f FieldFormatEnum) Ptr() *FieldFormatEnum { - return &f -} - -type FieldMappingApiInstance struct { - Id *string `json:"id,omitempty"` - IsIntegrationWide *bool `json:"is_integration_wide,omitempty"` - TargetField *FieldMappingApiInstanceTargetField `json:"target_field,omitempty"` - RemoteField *FieldMappingApiInstanceRemoteField `json:"remote_field,omitempty"` - - _rawJSON json.RawMessage -} - -func (f *FieldMappingApiInstance) UnmarshalJSON(data []byte) error { - type unmarshaler FieldMappingApiInstance - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *f = FieldMappingApiInstance(value) - f._rawJSON = json.RawMessage(data) - return nil -} - -func (f *FieldMappingApiInstance) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(f); err == nil { - return value - } - return fmt.Sprintf("%#v", f) -} - -type FieldMappingApiInstanceRemoteField struct { - RemoteKeyName *string `json:"remote_key_name,omitempty"` - Schema map[string]interface{} `json:"schema,omitempty"` - RemoteEndpointInfo *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo `json:"remote_endpoint_info,omitempty"` - - _rawJSON json.RawMessage -} - -func (f *FieldMappingApiInstanceRemoteField) UnmarshalJSON(data []byte) error { - type unmarshaler FieldMappingApiInstanceRemoteField - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *f = FieldMappingApiInstanceRemoteField(value) - f._rawJSON = json.RawMessage(data) - return nil -} - -func (f *FieldMappingApiInstanceRemoteField) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(f); err == nil { - return value - } - return fmt.Sprintf("%#v", f) -} - -type FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo struct { - Method *string `json:"method,omitempty"` - UrlPath *string `json:"url_path,omitempty"` - FieldTraversalPath []string `json:"field_traversal_path,omitempty"` - - _rawJSON json.RawMessage -} - -func (f *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo) UnmarshalJSON(data []byte) error { - type unmarshaler FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *f = FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo(value) - f._rawJSON = json.RawMessage(data) - return nil -} - -func (f *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(f); err == nil { - return value - } - return fmt.Sprintf("%#v", f) -} - -type FieldMappingApiInstanceResponse struct { - Account []*FieldMappingApiInstance `json:"Account,omitempty"` - AccountingAttachment []*FieldMappingApiInstance `json:"AccountingAttachment,omitempty"` - BalanceSheet []*FieldMappingApiInstance `json:"BalanceSheet,omitempty"` - CashFlowStatement []*FieldMappingApiInstance `json:"CashFlowStatement,omitempty"` - CompanyInfo []*FieldMappingApiInstance `json:"CompanyInfo,omitempty"` - Contact []*FieldMappingApiInstance `json:"Contact,omitempty"` - IncomeStatement []*FieldMappingApiInstance `json:"IncomeStatement,omitempty"` - CreditNote []*FieldMappingApiInstance `json:"CreditNote,omitempty"` - Item []*FieldMappingApiInstance `json:"Item,omitempty"` - PurchaseOrder []*FieldMappingApiInstance `json:"PurchaseOrder,omitempty"` - TrackingCategory []*FieldMappingApiInstance `json:"TrackingCategory,omitempty"` - JournalEntry []*FieldMappingApiInstance `json:"JournalEntry,omitempty"` - TaxRate []*FieldMappingApiInstance `json:"TaxRate,omitempty"` - Invoice []*FieldMappingApiInstance `json:"Invoice,omitempty"` - Payment []*FieldMappingApiInstance `json:"Payment,omitempty"` - Expense []*FieldMappingApiInstance `json:"Expense,omitempty"` - VendorCredit []*FieldMappingApiInstance `json:"VendorCredit,omitempty"` - Transaction []*FieldMappingApiInstance `json:"Transaction,omitempty"` - AccountingPeriod []*FieldMappingApiInstance `json:"AccountingPeriod,omitempty"` - GeneralLedgerTransaction []*FieldMappingApiInstance `json:"GeneralLedgerTransaction,omitempty"` - BankFeedAccount []*FieldMappingApiInstance `json:"BankFeedAccount,omitempty"` - Employee []*FieldMappingApiInstance `json:"Employee,omitempty"` - - _rawJSON json.RawMessage -} - -func (f *FieldMappingApiInstanceResponse) UnmarshalJSON(data []byte) error { - type unmarshaler FieldMappingApiInstanceResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *f = FieldMappingApiInstanceResponse(value) - f._rawJSON = json.RawMessage(data) - return nil -} - -func (f *FieldMappingApiInstanceResponse) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(f); err == nil { - return value - } - return fmt.Sprintf("%#v", f) -} - -type FieldMappingApiInstanceTargetField struct { - Name string `json:"name"` - Description string `json:"description"` - IsOrganizationWide bool `json:"is_organization_wide"` - - _rawJSON json.RawMessage -} - -func (f *FieldMappingApiInstanceTargetField) UnmarshalJSON(data []byte) error { - type unmarshaler FieldMappingApiInstanceTargetField - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *f = FieldMappingApiInstanceTargetField(value) - f._rawJSON = json.RawMessage(data) - return nil -} - -func (f *FieldMappingApiInstanceTargetField) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(f); err == nil { - return value - } - return fmt.Sprintf("%#v", f) -} - -type FieldMappingInstanceResponse struct { - Model *FieldMappingApiInstance `json:"model,omitempty"` - Warnings []*WarningValidationProblem `json:"warnings,omitempty"` - Errors []*ErrorValidationProblem `json:"errors,omitempty"` - Logs []*DebugModeLog `json:"logs,omitempty"` - - _rawJSON json.RawMessage -} - -func (f *FieldMappingInstanceResponse) UnmarshalJSON(data []byte) error { - type unmarshaler FieldMappingInstanceResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *f = FieldMappingInstanceResponse(value) - f._rawJSON = json.RawMessage(data) - return nil -} - -func (f *FieldMappingInstanceResponse) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(f); err == nil { - return value - } - return fmt.Sprintf("%#v", f) -} - -type FieldPermissionDeserializer struct { - EnabledFields []interface{} `json:"enabled_fields,omitempty"` - DisabledFields []interface{} `json:"disabled_fields,omitempty"` - - _rawJSON json.RawMessage -} - -func (f *FieldPermissionDeserializer) UnmarshalJSON(data []byte) error { - type unmarshaler FieldPermissionDeserializer - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *f = FieldPermissionDeserializer(value) - f._rawJSON = json.RawMessage(data) - return nil -} - -func (f *FieldPermissionDeserializer) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(f); err == nil { - return value - } - return fmt.Sprintf("%#v", f) -} - -type FieldPermissionDeserializerRequest struct { - EnabledFields []interface{} `json:"enabled_fields,omitempty"` - DisabledFields []interface{} `json:"disabled_fields,omitempty"` - - _rawJSON json.RawMessage -} - -func (f *FieldPermissionDeserializerRequest) UnmarshalJSON(data []byte) error { - type unmarshaler FieldPermissionDeserializerRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *f = FieldPermissionDeserializerRequest(value) - f._rawJSON = json.RawMessage(data) - return nil -} - -func (f *FieldPermissionDeserializerRequest) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(f); err == nil { - return value - } - return fmt.Sprintf("%#v", f) -} - -// - `string` - string -// - `number` - number -// - `date` - date -// - `datetime` - datetime -// - `bool` - bool -// - `list` - list -type FieldTypeEnum string - -const ( - FieldTypeEnumString FieldTypeEnum = "string" - FieldTypeEnumNumber FieldTypeEnum = "number" - FieldTypeEnumDate FieldTypeEnum = "date" - FieldTypeEnumDatetime FieldTypeEnum = "datetime" - FieldTypeEnumBool FieldTypeEnum = "bool" - FieldTypeEnumList FieldTypeEnum = "list" -) - -func NewFieldTypeEnumFromString(s string) (FieldTypeEnum, error) { - switch s { - case "string": - return FieldTypeEnumString, nil - case "number": - return FieldTypeEnumNumber, nil - case "date": - return FieldTypeEnumDate, nil - case "datetime": - return FieldTypeEnumDatetime, nil - case "bool": - return FieldTypeEnumBool, nil - case "list": - return FieldTypeEnumList, nil - } - var t FieldTypeEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (f FieldTypeEnum) Ptr() *FieldTypeEnum { - return &f -} - -// # The GeneralLedgerTransaction Object -// -// ### Description -// -// A General Ledger Entry is a record of a financial transaction that is posted to the general ledger, the central repository of a company’s financial data. -// -// The `GeneralLedgerTransaction` object is a singular endpoint to pull all transactions posted to a company’s general ledger. The transaction that generated the `GeneralLedgerTransaction` can be found by referencing the `underlying_transaction_type` and `underlying_transaction_remote_id` fields. -// -// The lines of a `GeneralLedgerTransaction` object will always have equal amounts of debits and credits. -// -// ### Usage Example -// -// Fetch from the `GET GeneralLedgerTransaction` endpoint and view a general ledger transaction. -type GeneralLedgerTransaction struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The third party remote ID of the underlying transaction. - UnderlyingTransactionRemoteId *string `json:"underlying_transaction_remote_id,omitempty"` - // The type of the underlying transaction. - // - // - `INVOICE` - INVOICE - // - `EXPENSE` - EXPENSE - // - `TRANSACTION` - TRANSACTION - // - `JOURNAL_ENTRY` - JOURNAL_ENTRY - // - `PAYMENT` - PAYMENT - // - `VENDOR_CREDIT` - VENDOR_CREDIT - // - `CREDIT_NOTE` - CREDIT_NOTE - UnderlyingTransactionType *GeneralLedgerTransactionUnderlyingTransactionType `json:"underlying_transaction_type,omitempty"` - // The accounting period that the GeneralLedgerTransaction was generated in. - AccountingPeriod *GeneralLedgerTransactionAccountingPeriod `json:"accounting_period,omitempty"` - // The company the GeneralLedgerTransaction belongs to. - Company *GeneralLedgerTransactionCompany `json:"company,omitempty"` - // When the third party's GeneralLedgerTransaction entry was updated. - RemoteUpdatedAt *time.Time `json:"remote_updated_at,omitempty"` - // When the third party's GeneralLedgerTransaction entry was created. - RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty"` - TrackingCategories []*GeneralLedgerTransactionTrackingCategoriesItem `json:"tracking_categories,omitempty"` - // The date that the transaction was posted to the general ledger. - PostingDate *time.Time `json:"posting_date,omitempty"` - // A list of “General Ledger Transaction Applied to Lines” objects. - GeneralLedgerTransactionLines []*GeneralLedgerTransactionGeneralLedgerTransactionLinesItem `json:"general_ledger_transaction_lines,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` - - _rawJSON json.RawMessage -} - -func (g *GeneralLedgerTransaction) UnmarshalJSON(data []byte) error { - type unmarshaler GeneralLedgerTransaction - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *g = GeneralLedgerTransaction(value) - g._rawJSON = json.RawMessage(data) - return nil -} - -func (g *GeneralLedgerTransaction) String() string { - if len(g._rawJSON) > 0 { - if value, err := core.StringifyJSON(g._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(g); err == nil { - return value - } - return fmt.Sprintf("%#v", g) -} - -// The accounting period that the GeneralLedgerTransaction was generated in. -type GeneralLedgerTransactionAccountingPeriod struct { - typeName string - String string - AccountingPeriod *AccountingPeriod -} - -func NewGeneralLedgerTransactionAccountingPeriodFromString(value string) *GeneralLedgerTransactionAccountingPeriod { - return &GeneralLedgerTransactionAccountingPeriod{typeName: "string", String: value} -} - -func NewGeneralLedgerTransactionAccountingPeriodFromAccountingPeriod(value *AccountingPeriod) *GeneralLedgerTransactionAccountingPeriod { - return &GeneralLedgerTransactionAccountingPeriod{typeName: "accountingPeriod", AccountingPeriod: value} -} - -func (g *GeneralLedgerTransactionAccountingPeriod) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - g.typeName = "string" - g.String = valueString - return nil - } - valueAccountingPeriod := new(AccountingPeriod) - if err := json.Unmarshal(data, &valueAccountingPeriod); err == nil { - g.typeName = "accountingPeriod" - g.AccountingPeriod = valueAccountingPeriod - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, g) -} - -func (g GeneralLedgerTransactionAccountingPeriod) MarshalJSON() ([]byte, error) { - switch g.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", g.typeName, g) - case "string": - return json.Marshal(g.String) - case "accountingPeriod": - return json.Marshal(g.AccountingPeriod) - } -} - -type GeneralLedgerTransactionAccountingPeriodVisitor interface { - VisitString(string) error - VisitAccountingPeriod(*AccountingPeriod) error -} - -func (g *GeneralLedgerTransactionAccountingPeriod) Accept(visitor GeneralLedgerTransactionAccountingPeriodVisitor) error { - switch g.typeName { - default: - return fmt.Errorf("invalid type %s in %T", g.typeName, g) - case "string": - return visitor.VisitString(g.String) - case "accountingPeriod": - return visitor.VisitAccountingPeriod(g.AccountingPeriod) - } -} - -// The company the GeneralLedgerTransaction belongs to. -type GeneralLedgerTransactionCompany struct { - typeName string - String string - CompanyInfo *CompanyInfo -} - -func NewGeneralLedgerTransactionCompanyFromString(value string) *GeneralLedgerTransactionCompany { - return &GeneralLedgerTransactionCompany{typeName: "string", String: value} -} - -func NewGeneralLedgerTransactionCompanyFromCompanyInfo(value *CompanyInfo) *GeneralLedgerTransactionCompany { - return &GeneralLedgerTransactionCompany{typeName: "companyInfo", CompanyInfo: value} -} - -func (g *GeneralLedgerTransactionCompany) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - g.typeName = "string" - g.String = valueString - return nil - } - valueCompanyInfo := new(CompanyInfo) - if err := json.Unmarshal(data, &valueCompanyInfo); err == nil { - g.typeName = "companyInfo" - g.CompanyInfo = valueCompanyInfo - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, g) -} - -func (g GeneralLedgerTransactionCompany) MarshalJSON() ([]byte, error) { - switch g.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", g.typeName, g) - case "string": - return json.Marshal(g.String) - case "companyInfo": - return json.Marshal(g.CompanyInfo) - } -} - -type GeneralLedgerTransactionCompanyVisitor interface { - VisitString(string) error - VisitCompanyInfo(*CompanyInfo) error -} - -func (g *GeneralLedgerTransactionCompany) Accept(visitor GeneralLedgerTransactionCompanyVisitor) error { - switch g.typeName { - default: - return fmt.Errorf("invalid type %s in %T", g.typeName, g) - case "string": - return visitor.VisitString(g.String) - case "companyInfo": - return visitor.VisitCompanyInfo(g.CompanyInfo) - } -} - -type GeneralLedgerTransactionGeneralLedgerTransactionLinesItem struct { - typeName string - String string - GeneralLedgerTransactionLine *GeneralLedgerTransactionLine -} - -func NewGeneralLedgerTransactionGeneralLedgerTransactionLinesItemFromString(value string) *GeneralLedgerTransactionGeneralLedgerTransactionLinesItem { - return &GeneralLedgerTransactionGeneralLedgerTransactionLinesItem{typeName: "string", String: value} -} - -func NewGeneralLedgerTransactionGeneralLedgerTransactionLinesItemFromGeneralLedgerTransactionLine(value *GeneralLedgerTransactionLine) *GeneralLedgerTransactionGeneralLedgerTransactionLinesItem { - return &GeneralLedgerTransactionGeneralLedgerTransactionLinesItem{typeName: "generalLedgerTransactionLine", GeneralLedgerTransactionLine: value} -} - -func (g *GeneralLedgerTransactionGeneralLedgerTransactionLinesItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - g.typeName = "string" - g.String = valueString - return nil - } - valueGeneralLedgerTransactionLine := new(GeneralLedgerTransactionLine) - if err := json.Unmarshal(data, &valueGeneralLedgerTransactionLine); err == nil { - g.typeName = "generalLedgerTransactionLine" - g.GeneralLedgerTransactionLine = valueGeneralLedgerTransactionLine - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, g) -} - -func (g GeneralLedgerTransactionGeneralLedgerTransactionLinesItem) MarshalJSON() ([]byte, error) { - switch g.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", g.typeName, g) - case "string": - return json.Marshal(g.String) - case "generalLedgerTransactionLine": - return json.Marshal(g.GeneralLedgerTransactionLine) - } -} - -type GeneralLedgerTransactionGeneralLedgerTransactionLinesItemVisitor interface { - VisitString(string) error - VisitGeneralLedgerTransactionLine(*GeneralLedgerTransactionLine) error -} - -func (g *GeneralLedgerTransactionGeneralLedgerTransactionLinesItem) Accept(visitor GeneralLedgerTransactionGeneralLedgerTransactionLinesItemVisitor) error { - switch g.typeName { - default: - return fmt.Errorf("invalid type %s in %T", g.typeName, g) - case "string": - return visitor.VisitString(g.String) - case "generalLedgerTransactionLine": - return visitor.VisitGeneralLedgerTransactionLine(g.GeneralLedgerTransactionLine) - } -} - -// # The GeneralLedgerTransactionLineSerializer Object -// -// ### Description -// -// The `GeneralLedgerTransactionLineSerializer` object represents general ledger transaction line item. -// -// ### Usage Example Fetch from the `GET GeneralLedgerTransactionLineSerializer` endpoint and view an -// -// `GeneralLedgerTransaction` line item. -type GeneralLedgerTransactionLine struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - Account *GeneralLedgerTransactionLineAccount `json:"account,omitempty"` - // The company the GeneralLedgerTransaction belongs to. - Company *GeneralLedgerTransactionLineCompany `json:"company,omitempty"` - Employee *GeneralLedgerTransactionLineEmployee `json:"employee,omitempty"` - Contact *GeneralLedgerTransactionLineContact `json:"contact,omitempty"` - // The base currency of the transaction - // - // - `XUA` - ADB Unit of Account - // - `AFN` - Afghan Afghani - // - `AFA` - Afghan Afghani (1927–2002) - // - `ALL` - Albanian Lek - // - `ALK` - Albanian Lek (1946–1965) - // - `DZD` - Algerian Dinar - // - `ADP` - Andorran Peseta - // - `AOA` - Angolan Kwanza - // - `AOK` - Angolan Kwanza (1977–1991) - // - `AON` - Angolan New Kwanza (1990–2000) - // - `AOR` - Angolan Readjusted Kwanza (1995–1999) - // - `ARA` - Argentine Austral - // - `ARS` - Argentine Peso - // - `ARM` - Argentine Peso (1881–1970) - // - `ARP` - Argentine Peso (1983–1985) - // - `ARL` - Argentine Peso Ley (1970–1983) - // - `AMD` - Armenian Dram - // - `AWG` - Aruban Florin - // - `AUD` - Australian Dollar - // - `ATS` - Austrian Schilling - // - `AZN` - Azerbaijani Manat - // - `AZM` - Azerbaijani Manat (1993–2006) - // - `BSD` - Bahamian Dollar - // - `BHD` - Bahraini Dinar - // - `BDT` - Bangladeshi Taka - // - `BBD` - Barbadian Dollar - // - `BYN` - Belarusian Ruble - // - `BYB` - Belarusian Ruble (1994–1999) - // - `BYR` - Belarusian Ruble (2000–2016) - // - `BEF` - Belgian Franc - // - `BEC` - Belgian Franc (convertible) - // - `BEL` - Belgian Franc (financial) - // - `BZD` - Belize Dollar - // - `BMD` - Bermudan Dollar - // - `BTN` - Bhutanese Ngultrum - // - `BOB` - Bolivian Boliviano - // - `BOL` - Bolivian Boliviano (1863–1963) - // - `BOV` - Bolivian Mvdol - // - `BOP` - Bolivian Peso - // - `BAM` - Bosnia-Herzegovina Convertible Mark - // - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - // - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - // - `BWP` - Botswanan Pula - // - `BRC` - Brazilian Cruzado (1986–1989) - // - `BRZ` - Brazilian Cruzeiro (1942–1967) - // - `BRE` - Brazilian Cruzeiro (1990–1993) - // - `BRR` - Brazilian Cruzeiro (1993–1994) - // - `BRN` - Brazilian New Cruzado (1989–1990) - // - `BRB` - Brazilian New Cruzeiro (1967–1986) - // - `BRL` - Brazilian Real - // - `GBP` - British Pound - // - `BND` - Brunei Dollar - // - `BGL` - Bulgarian Hard Lev - // - `BGN` - Bulgarian Lev - // - `BGO` - Bulgarian Lev (1879–1952) - // - `BGM` - Bulgarian Socialist Lev - // - `BUK` - Burmese Kyat - // - `BIF` - Burundian Franc - // - `XPF` - CFP Franc - // - `KHR` - Cambodian Riel - // - `CAD` - Canadian Dollar - // - `CVE` - Cape Verdean Escudo - // - `KYD` - Cayman Islands Dollar - // - `XAF` - Central African CFA Franc - // - `CLE` - Chilean Escudo - // - `CLP` - Chilean Peso - // - `CLF` - Chilean Unit of Account (UF) - // - `CNX` - Chinese People’s Bank Dollar - // - `CNY` - Chinese Yuan - // - `CNH` - Chinese Yuan (offshore) - // - `COP` - Colombian Peso - // - `COU` - Colombian Real Value Unit - // - `KMF` - Comorian Franc - // - `CDF` - Congolese Franc - // - `CRC` - Costa Rican Colón - // - `HRD` - Croatian Dinar - // - `HRK` - Croatian Kuna - // - `CUC` - Cuban Convertible Peso - // - `CUP` - Cuban Peso - // - `CYP` - Cypriot Pound - // - `CZK` - Czech Koruna - // - `CSK` - Czechoslovak Hard Koruna - // - `DKK` - Danish Krone - // - `DJF` - Djiboutian Franc - // - `DOP` - Dominican Peso - // - `NLG` - Dutch Guilder - // - `XCD` - East Caribbean Dollar - // - `DDM` - East German Mark - // - `ECS` - Ecuadorian Sucre - // - `ECV` - Ecuadorian Unit of Constant Value - // - `EGP` - Egyptian Pound - // - `GQE` - Equatorial Guinean Ekwele - // - `ERN` - Eritrean Nakfa - // - `EEK` - Estonian Kroon - // - `ETB` - Ethiopian Birr - // - `EUR` - Euro - // - `XBA` - European Composite Unit - // - `XEU` - European Currency Unit - // - `XBB` - European Monetary Unit - // - `XBC` - European Unit of Account (XBC) - // - `XBD` - European Unit of Account (XBD) - // - `FKP` - Falkland Islands Pound - // - `FJD` - Fijian Dollar - // - `FIM` - Finnish Markka - // - `FRF` - French Franc - // - `XFO` - French Gold Franc - // - `XFU` - French UIC-Franc - // - `GMD` - Gambian Dalasi - // - `GEK` - Georgian Kupon Larit - // - `GEL` - Georgian Lari - // - `DEM` - German Mark - // - `GHS` - Ghanaian Cedi - // - `GHC` - Ghanaian Cedi (1979–2007) - // - `GIP` - Gibraltar Pound - // - `XAU` - Gold - // - `GRD` - Greek Drachma - // - `GTQ` - Guatemalan Quetzal - // - `GWP` - Guinea-Bissau Peso - // - `GNF` - Guinean Franc - // - `GNS` - Guinean Syli - // - `GYD` - Guyanaese Dollar - // - `HTG` - Haitian Gourde - // - `HNL` - Honduran Lempira - // - `HKD` - Hong Kong Dollar - // - `HUF` - Hungarian Forint - // - `IMP` - IMP - // - `ISK` - Icelandic Króna - // - `ISJ` - Icelandic Króna (1918–1981) - // - `INR` - Indian Rupee - // - `IDR` - Indonesian Rupiah - // - `IRR` - Iranian Rial - // - `IQD` - Iraqi Dinar - // - `IEP` - Irish Pound - // - `ILS` - Israeli New Shekel - // - `ILP` - Israeli Pound - // - `ILR` - Israeli Shekel (1980–1985) - // - `ITL` - Italian Lira - // - `JMD` - Jamaican Dollar - // - `JPY` - Japanese Yen - // - `JOD` - Jordanian Dinar - // - `KZT` - Kazakhstani Tenge - // - `KES` - Kenyan Shilling - // - `KWD` - Kuwaiti Dinar - // - `KGS` - Kyrgystani Som - // - `LAK` - Laotian Kip - // - `LVL` - Latvian Lats - // - `LVR` - Latvian Ruble - // - `LBP` - Lebanese Pound - // - `LSL` - Lesotho Loti - // - `LRD` - Liberian Dollar - // - `LYD` - Libyan Dinar - // - `LTL` - Lithuanian Litas - // - `LTT` - Lithuanian Talonas - // - `LUL` - Luxembourg Financial Franc - // - `LUC` - Luxembourgian Convertible Franc - // - `LUF` - Luxembourgian Franc - // - `MOP` - Macanese Pataca - // - `MKD` - Macedonian Denar - // - `MKN` - Macedonian Denar (1992–1993) - // - `MGA` - Malagasy Ariary - // - `MGF` - Malagasy Franc - // - `MWK` - Malawian Kwacha - // - `MYR` - Malaysian Ringgit - // - `MVR` - Maldivian Rufiyaa - // - `MVP` - Maldivian Rupee (1947–1981) - // - `MLF` - Malian Franc - // - `MTL` - Maltese Lira - // - `MTP` - Maltese Pound - // - `MRU` - Mauritanian Ouguiya - // - `MRO` - Mauritanian Ouguiya (1973–2017) - // - `MUR` - Mauritian Rupee - // - `MXV` - Mexican Investment Unit - // - `MXN` - Mexican Peso - // - `MXP` - Mexican Silver Peso (1861–1992) - // - `MDC` - Moldovan Cupon - // - `MDL` - Moldovan Leu - // - `MCF` - Monegasque Franc - // - `MNT` - Mongolian Tugrik - // - `MAD` - Moroccan Dirham - // - `MAF` - Moroccan Franc - // - `MZE` - Mozambican Escudo - // - `MZN` - Mozambican Metical - // - `MZM` - Mozambican Metical (1980–2006) - // - `MMK` - Myanmar Kyat - // - `NAD` - Namibian Dollar - // - `NPR` - Nepalese Rupee - // - `ANG` - Netherlands Antillean Guilder - // - `TWD` - New Taiwan Dollar - // - `NZD` - New Zealand Dollar - // - `NIO` - Nicaraguan Córdoba - // - `NIC` - Nicaraguan Córdoba (1988–1991) - // - `NGN` - Nigerian Naira - // - `KPW` - North Korean Won - // - `NOK` - Norwegian Krone - // - `OMR` - Omani Rial - // - `PKR` - Pakistani Rupee - // - `XPD` - Palladium - // - `PAB` - Panamanian Balboa - // - `PGK` - Papua New Guinean Kina - // - `PYG` - Paraguayan Guarani - // - `PEI` - Peruvian Inti - // - `PEN` - Peruvian Sol - // - `PES` - Peruvian Sol (1863–1965) - // - `PHP` - Philippine Peso - // - `XPT` - Platinum - // - `PLN` - Polish Zloty - // - `PLZ` - Polish Zloty (1950–1995) - // - `PTE` - Portuguese Escudo - // - `GWE` - Portuguese Guinea Escudo - // - `QAR` - Qatari Rial - // - `XRE` - RINET Funds - // - `RHD` - Rhodesian Dollar - // - `RON` - Romanian Leu - // - `ROL` - Romanian Leu (1952–2006) - // - `RUB` - Russian Ruble - // - `RUR` - Russian Ruble (1991–1998) - // - `RWF` - Rwandan Franc - // - `SVC` - Salvadoran Colón - // - `WST` - Samoan Tala - // - `SAR` - Saudi Riyal - // - `RSD` - Serbian Dinar - // - `CSD` - Serbian Dinar (2002–2006) - // - `SCR` - Seychellois Rupee - // - `SLL` - Sierra Leonean Leone - // - `XAG` - Silver - // - `SGD` - Singapore Dollar - // - `SKK` - Slovak Koruna - // - `SIT` - Slovenian Tolar - // - `SBD` - Solomon Islands Dollar - // - `SOS` - Somali Shilling - // - `ZAR` - South African Rand - // - `ZAL` - South African Rand (financial) - // - `KRH` - South Korean Hwan (1953–1962) - // - `KRW` - South Korean Won - // - `KRO` - South Korean Won (1945–1953) - // - `SSP` - South Sudanese Pound - // - `SUR` - Soviet Rouble - // - `ESP` - Spanish Peseta - // - `ESA` - Spanish Peseta (A account) - // - `ESB` - Spanish Peseta (convertible account) - // - `XDR` - Special Drawing Rights - // - `LKR` - Sri Lankan Rupee - // - `SHP` - St. Helena Pound - // - `XSU` - Sucre - // - `SDD` - Sudanese Dinar (1992–2007) - // - `SDG` - Sudanese Pound - // - `SDP` - Sudanese Pound (1957–1998) - // - `SRD` - Surinamese Dollar - // - `SRG` - Surinamese Guilder - // - `SZL` - Swazi Lilangeni - // - `SEK` - Swedish Krona - // - `CHF` - Swiss Franc - // - `SYP` - Syrian Pound - // - `STN` - São Tomé & Príncipe Dobra - // - `STD` - São Tomé & Príncipe Dobra (1977–2017) - // - `TVD` - TVD - // - `TJR` - Tajikistani Ruble - // - `TJS` - Tajikistani Somoni - // - `TZS` - Tanzanian Shilling - // - `XTS` - Testing Currency Code - // - `THB` - Thai Baht - // - `XXX` - The codes assigned for transactions where no currency is involved - // - `TPE` - Timorese Escudo - // - `TOP` - Tongan Paʻanga - // - `TTD` - Trinidad & Tobago Dollar - // - `TND` - Tunisian Dinar - // - `TRY` - Turkish Lira - // - `TRL` - Turkish Lira (1922–2005) - // - `TMT` - Turkmenistani Manat - // - `TMM` - Turkmenistani Manat (1993–2009) - // - `USD` - US Dollar - // - `USN` - US Dollar (Next day) - // - `USS` - US Dollar (Same day) - // - `UGX` - Ugandan Shilling - // - `UGS` - Ugandan Shilling (1966–1987) - // - `UAH` - Ukrainian Hryvnia - // - `UAK` - Ukrainian Karbovanets - // - `AED` - United Arab Emirates Dirham - // - `UYW` - Uruguayan Nominal Wage Index Unit - // - `UYU` - Uruguayan Peso - // - `UYP` - Uruguayan Peso (1975–1993) - // - `UYI` - Uruguayan Peso (Indexed Units) - // - `UZS` - Uzbekistani Som - // - `VUV` - Vanuatu Vatu - // - `VES` - Venezuelan Bolívar - // - `VEB` - Venezuelan Bolívar (1871–2008) - // - `VEF` - Venezuelan Bolívar (2008–2018) - // - `VND` - Vietnamese Dong - // - `VNN` - Vietnamese Dong (1978–1985) - // - `CHE` - WIR Euro - // - `CHW` - WIR Franc - // - `XOF` - West African CFA Franc - // - `YDD` - Yemeni Dinar - // - `YER` - Yemeni Rial - // - `YUN` - Yugoslavian Convertible Dinar (1990–1992) - // - `YUD` - Yugoslavian Hard Dinar (1966–1990) - // - `YUM` - Yugoslavian New Dinar (1994–2002) - // - `YUR` - Yugoslavian Reformed Dinar (1992–1993) - // - `ZWN` - ZWN - // - `ZRN` - Zairean New Zaire (1993–1998) - // - `ZRZ` - Zairean Zaire (1971–1993) - // - `ZMW` - Zambian Kwacha - // - `ZMK` - Zambian Kwacha (1968–2012) - // - `ZWD` - Zimbabwean Dollar (1980–2008) - // - `ZWR` - Zimbabwean Dollar (2008) - // - `ZWL` - Zimbabwean Dollar (2009) - BaseCurrency *GeneralLedgerTransactionLineBaseCurrency `json:"base_currency,omitempty"` - // The transaction currency that the transaction is made in. - // - // - `XUA` - ADB Unit of Account - // - `AFN` - Afghan Afghani - // - `AFA` - Afghan Afghani (1927–2002) - // - `ALL` - Albanian Lek - // - `ALK` - Albanian Lek (1946–1965) - // - `DZD` - Algerian Dinar - // - `ADP` - Andorran Peseta - // - `AOA` - Angolan Kwanza - // - `AOK` - Angolan Kwanza (1977–1991) - // - `AON` - Angolan New Kwanza (1990–2000) - // - `AOR` - Angolan Readjusted Kwanza (1995–1999) - // - `ARA` - Argentine Austral - // - `ARS` - Argentine Peso - // - `ARM` - Argentine Peso (1881–1970) - // - `ARP` - Argentine Peso (1983–1985) - // - `ARL` - Argentine Peso Ley (1970–1983) - // - `AMD` - Armenian Dram - // - `AWG` - Aruban Florin - // - `AUD` - Australian Dollar - // - `ATS` - Austrian Schilling - // - `AZN` - Azerbaijani Manat - // - `AZM` - Azerbaijani Manat (1993–2006) - // - `BSD` - Bahamian Dollar - // - `BHD` - Bahraini Dinar - // - `BDT` - Bangladeshi Taka - // - `BBD` - Barbadian Dollar - // - `BYN` - Belarusian Ruble - // - `BYB` - Belarusian Ruble (1994–1999) - // - `BYR` - Belarusian Ruble (2000–2016) - // - `BEF` - Belgian Franc - // - `BEC` - Belgian Franc (convertible) - // - `BEL` - Belgian Franc (financial) - // - `BZD` - Belize Dollar - // - `BMD` - Bermudan Dollar - // - `BTN` - Bhutanese Ngultrum - // - `BOB` - Bolivian Boliviano - // - `BOL` - Bolivian Boliviano (1863–1963) - // - `BOV` - Bolivian Mvdol - // - `BOP` - Bolivian Peso - // - `BAM` - Bosnia-Herzegovina Convertible Mark - // - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - // - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - // - `BWP` - Botswanan Pula - // - `BRC` - Brazilian Cruzado (1986–1989) - // - `BRZ` - Brazilian Cruzeiro (1942–1967) - // - `BRE` - Brazilian Cruzeiro (1990–1993) - // - `BRR` - Brazilian Cruzeiro (1993–1994) - // - `BRN` - Brazilian New Cruzado (1989–1990) - // - `BRB` - Brazilian New Cruzeiro (1967–1986) - // - `BRL` - Brazilian Real - // - `GBP` - British Pound - // - `BND` - Brunei Dollar - // - `BGL` - Bulgarian Hard Lev - // - `BGN` - Bulgarian Lev - // - `BGO` - Bulgarian Lev (1879–1952) - // - `BGM` - Bulgarian Socialist Lev - // - `BUK` - Burmese Kyat - // - `BIF` - Burundian Franc - // - `XPF` - CFP Franc - // - `KHR` - Cambodian Riel - // - `CAD` - Canadian Dollar - // - `CVE` - Cape Verdean Escudo - // - `KYD` - Cayman Islands Dollar - // - `XAF` - Central African CFA Franc - // - `CLE` - Chilean Escudo - // - `CLP` - Chilean Peso - // - `CLF` - Chilean Unit of Account (UF) - // - `CNX` - Chinese People’s Bank Dollar - // - `CNY` - Chinese Yuan - // - `CNH` - Chinese Yuan (offshore) - // - `COP` - Colombian Peso - // - `COU` - Colombian Real Value Unit - // - `KMF` - Comorian Franc - // - `CDF` - Congolese Franc - // - `CRC` - Costa Rican Colón - // - `HRD` - Croatian Dinar - // - `HRK` - Croatian Kuna - // - `CUC` - Cuban Convertible Peso - // - `CUP` - Cuban Peso - // - `CYP` - Cypriot Pound - // - `CZK` - Czech Koruna - // - `CSK` - Czechoslovak Hard Koruna - // - `DKK` - Danish Krone - // - `DJF` - Djiboutian Franc - // - `DOP` - Dominican Peso - // - `NLG` - Dutch Guilder - // - `XCD` - East Caribbean Dollar - // - `DDM` - East German Mark - // - `ECS` - Ecuadorian Sucre - // - `ECV` - Ecuadorian Unit of Constant Value - // - `EGP` - Egyptian Pound - // - `GQE` - Equatorial Guinean Ekwele - // - `ERN` - Eritrean Nakfa - // - `EEK` - Estonian Kroon - // - `ETB` - Ethiopian Birr - // - `EUR` - Euro - // - `XBA` - European Composite Unit - // - `XEU` - European Currency Unit - // - `XBB` - European Monetary Unit - // - `XBC` - European Unit of Account (XBC) - // - `XBD` - European Unit of Account (XBD) - // - `FKP` - Falkland Islands Pound - // - `FJD` - Fijian Dollar - // - `FIM` - Finnish Markka - // - `FRF` - French Franc - // - `XFO` - French Gold Franc - // - `XFU` - French UIC-Franc - // - `GMD` - Gambian Dalasi - // - `GEK` - Georgian Kupon Larit - // - `GEL` - Georgian Lari - // - `DEM` - German Mark - // - `GHS` - Ghanaian Cedi - // - `GHC` - Ghanaian Cedi (1979–2007) - // - `GIP` - Gibraltar Pound - // - `XAU` - Gold - // - `GRD` - Greek Drachma - // - `GTQ` - Guatemalan Quetzal - // - `GWP` - Guinea-Bissau Peso - // - `GNF` - Guinean Franc - // - `GNS` - Guinean Syli - // - `GYD` - Guyanaese Dollar - // - `HTG` - Haitian Gourde - // - `HNL` - Honduran Lempira - // - `HKD` - Hong Kong Dollar - // - `HUF` - Hungarian Forint - // - `IMP` - IMP - // - `ISK` - Icelandic Króna - // - `ISJ` - Icelandic Króna (1918–1981) - // - `INR` - Indian Rupee - // - `IDR` - Indonesian Rupiah - // - `IRR` - Iranian Rial - // - `IQD` - Iraqi Dinar - // - `IEP` - Irish Pound - // - `ILS` - Israeli New Shekel - // - `ILP` - Israeli Pound - // - `ILR` - Israeli Shekel (1980–1985) - // - `ITL` - Italian Lira - // - `JMD` - Jamaican Dollar - // - `JPY` - Japanese Yen - // - `JOD` - Jordanian Dinar - // - `KZT` - Kazakhstani Tenge - // - `KES` - Kenyan Shilling - // - `KWD` - Kuwaiti Dinar - // - `KGS` - Kyrgystani Som - // - `LAK` - Laotian Kip - // - `LVL` - Latvian Lats - // - `LVR` - Latvian Ruble - // - `LBP` - Lebanese Pound - // - `LSL` - Lesotho Loti - // - `LRD` - Liberian Dollar - // - `LYD` - Libyan Dinar - // - `LTL` - Lithuanian Litas - // - `LTT` - Lithuanian Talonas - // - `LUL` - Luxembourg Financial Franc - // - `LUC` - Luxembourgian Convertible Franc - // - `LUF` - Luxembourgian Franc - // - `MOP` - Macanese Pataca - // - `MKD` - Macedonian Denar - // - `MKN` - Macedonian Denar (1992–1993) - // - `MGA` - Malagasy Ariary - // - `MGF` - Malagasy Franc - // - `MWK` - Malawian Kwacha - // - `MYR` - Malaysian Ringgit - // - `MVR` - Maldivian Rufiyaa - // - `MVP` - Maldivian Rupee (1947–1981) - // - `MLF` - Malian Franc - // - `MTL` - Maltese Lira - // - `MTP` - Maltese Pound - // - `MRU` - Mauritanian Ouguiya - // - `MRO` - Mauritanian Ouguiya (1973–2017) - // - `MUR` - Mauritian Rupee - // - `MXV` - Mexican Investment Unit - // - `MXN` - Mexican Peso - // - `MXP` - Mexican Silver Peso (1861–1992) - // - `MDC` - Moldovan Cupon - // - `MDL` - Moldovan Leu - // - `MCF` - Monegasque Franc - // - `MNT` - Mongolian Tugrik - // - `MAD` - Moroccan Dirham - // - `MAF` - Moroccan Franc - // - `MZE` - Mozambican Escudo - // - `MZN` - Mozambican Metical - // - `MZM` - Mozambican Metical (1980–2006) - // - `MMK` - Myanmar Kyat - // - `NAD` - Namibian Dollar - // - `NPR` - Nepalese Rupee - // - `ANG` - Netherlands Antillean Guilder - // - `TWD` - New Taiwan Dollar - // - `NZD` - New Zealand Dollar - // - `NIO` - Nicaraguan Córdoba - // - `NIC` - Nicaraguan Córdoba (1988–1991) - // - `NGN` - Nigerian Naira - // - `KPW` - North Korean Won - // - `NOK` - Norwegian Krone - // - `OMR` - Omani Rial - // - `PKR` - Pakistani Rupee - // - `XPD` - Palladium - // - `PAB` - Panamanian Balboa - // - `PGK` - Papua New Guinean Kina - // - `PYG` - Paraguayan Guarani - // - `PEI` - Peruvian Inti - // - `PEN` - Peruvian Sol - // - `PES` - Peruvian Sol (1863–1965) - // - `PHP` - Philippine Peso - // - `XPT` - Platinum - // - `PLN` - Polish Zloty - // - `PLZ` - Polish Zloty (1950–1995) - // - `PTE` - Portuguese Escudo - // - `GWE` - Portuguese Guinea Escudo - // - `QAR` - Qatari Rial - // - `XRE` - RINET Funds - // - `RHD` - Rhodesian Dollar - // - `RON` - Romanian Leu - // - `ROL` - Romanian Leu (1952–2006) - // - `RUB` - Russian Ruble - // - `RUR` - Russian Ruble (1991–1998) - // - `RWF` - Rwandan Franc - // - `SVC` - Salvadoran Colón - // - `WST` - Samoan Tala - // - `SAR` - Saudi Riyal - // - `RSD` - Serbian Dinar - // - `CSD` - Serbian Dinar (2002–2006) - // - `SCR` - Seychellois Rupee - // - `SLL` - Sierra Leonean Leone - // - `XAG` - Silver - // - `SGD` - Singapore Dollar - // - `SKK` - Slovak Koruna - // - `SIT` - Slovenian Tolar - // - `SBD` - Solomon Islands Dollar - // - `SOS` - Somali Shilling - // - `ZAR` - South African Rand - // - `ZAL` - South African Rand (financial) - // - `KRH` - South Korean Hwan (1953–1962) - // - `KRW` - South Korean Won - // - `KRO` - South Korean Won (1945–1953) - // - `SSP` - South Sudanese Pound - // - `SUR` - Soviet Rouble - // - `ESP` - Spanish Peseta - // - `ESA` - Spanish Peseta (A account) - // - `ESB` - Spanish Peseta (convertible account) - // - `XDR` - Special Drawing Rights - // - `LKR` - Sri Lankan Rupee - // - `SHP` - St. Helena Pound - // - `XSU` - Sucre - // - `SDD` - Sudanese Dinar (1992–2007) - // - `SDG` - Sudanese Pound - // - `SDP` - Sudanese Pound (1957–1998) - // - `SRD` - Surinamese Dollar - // - `SRG` - Surinamese Guilder - // - `SZL` - Swazi Lilangeni - // - `SEK` - Swedish Krona - // - `CHF` - Swiss Franc - // - `SYP` - Syrian Pound - // - `STN` - São Tomé & Príncipe Dobra - // - `STD` - São Tomé & Príncipe Dobra (1977–2017) - // - `TVD` - TVD - // - `TJR` - Tajikistani Ruble - // - `TJS` - Tajikistani Somoni - // - `TZS` - Tanzanian Shilling - // - `XTS` - Testing Currency Code - // - `THB` - Thai Baht - // - `XXX` - The codes assigned for transactions where no currency is involved - // - `TPE` - Timorese Escudo - // - `TOP` - Tongan Paʻanga - // - `TTD` - Trinidad & Tobago Dollar - // - `TND` - Tunisian Dinar - // - `TRY` - Turkish Lira - // - `TRL` - Turkish Lira (1922–2005) - // - `TMT` - Turkmenistani Manat - // - `TMM` - Turkmenistani Manat (1993–2009) - // - `USD` - US Dollar - // - `USN` - US Dollar (Next day) - // - `USS` - US Dollar (Same day) - // - `UGX` - Ugandan Shilling - // - `UGS` - Ugandan Shilling (1966–1987) - // - `UAH` - Ukrainian Hryvnia - // - `UAK` - Ukrainian Karbovanets - // - `AED` - United Arab Emirates Dirham - // - `UYW` - Uruguayan Nominal Wage Index Unit - // - `UYU` - Uruguayan Peso - // - `UYP` - Uruguayan Peso (1975–1993) - // - `UYI` - Uruguayan Peso (Indexed Units) - // - `UZS` - Uzbekistani Som - // - `VUV` - Vanuatu Vatu - // - `VES` - Venezuelan Bolívar - // - `VEB` - Venezuelan Bolívar (1871–2008) - // - `VEF` - Venezuelan Bolívar (2008–2018) - // - `VND` - Vietnamese Dong - // - `VNN` - Vietnamese Dong (1978–1985) - // - `CHE` - WIR Euro - // - `CHW` - WIR Franc - // - `XOF` - West African CFA Franc - // - `YDD` - Yemeni Dinar - // - `YER` - Yemeni Rial - // - `YUN` - Yugoslavian Convertible Dinar (1990–1992) - // - `YUD` - Yugoslavian Hard Dinar (1966–1990) - // - `YUM` - Yugoslavian New Dinar (1994–2002) - // - `YUR` - Yugoslavian Reformed Dinar (1992–1993) - // - `ZWN` - ZWN - // - `ZRN` - Zairean New Zaire (1993–1998) - // - `ZRZ` - Zairean Zaire (1971–1993) - // - `ZMW` - Zambian Kwacha - // - `ZMK` - Zambian Kwacha (1968–2012) - // - `ZWD` - Zimbabwean Dollar (1980–2008) - // - `ZWR` - Zimbabwean Dollar (2008) - // - `ZWL` - Zimbabwean Dollar (2009) - TransactionCurrency *GeneralLedgerTransactionLineTransactionCurrency `json:"transaction_currency,omitempty"` - // The exchange rate between the base currency and the transaction currency. - ExchangeRate *string `json:"exchange_rate,omitempty"` - // A description of the line item. - Description *string `json:"description,omitempty"` - TrackingCategories []*GeneralLedgerTransactionLineTrackingCategoriesItem `json:"tracking_categories,omitempty"` - DebitAmount string `json:"debit_amount"` - CreditAmount string `json:"credit_amount"` - Item *GeneralLedgerTransactionLineItem `json:"item,omitempty"` - ForeignDebitAmount string `json:"foreign_debit_amount"` - ForeignCreditAmount string `json:"foreign_credit_amount"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - - _rawJSON json.RawMessage -} - -func (g *GeneralLedgerTransactionLine) UnmarshalJSON(data []byte) error { - type unmarshaler GeneralLedgerTransactionLine - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *g = GeneralLedgerTransactionLine(value) - g._rawJSON = json.RawMessage(data) - return nil -} - -func (g *GeneralLedgerTransactionLine) String() string { - if len(g._rawJSON) > 0 { - if value, err := core.StringifyJSON(g._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(g); err == nil { - return value - } - return fmt.Sprintf("%#v", g) -} - -type GeneralLedgerTransactionLineAccount struct { - typeName string - String string - Account *Account -} - -func NewGeneralLedgerTransactionLineAccountFromString(value string) *GeneralLedgerTransactionLineAccount { - return &GeneralLedgerTransactionLineAccount{typeName: "string", String: value} -} - -func NewGeneralLedgerTransactionLineAccountFromAccount(value *Account) *GeneralLedgerTransactionLineAccount { - return &GeneralLedgerTransactionLineAccount{typeName: "account", Account: value} -} - -func (g *GeneralLedgerTransactionLineAccount) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - g.typeName = "string" - g.String = valueString - return nil - } - valueAccount := new(Account) - if err := json.Unmarshal(data, &valueAccount); err == nil { - g.typeName = "account" - g.Account = valueAccount - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, g) -} - -func (g GeneralLedgerTransactionLineAccount) MarshalJSON() ([]byte, error) { - switch g.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", g.typeName, g) - case "string": - return json.Marshal(g.String) - case "account": - return json.Marshal(g.Account) - } -} - -type GeneralLedgerTransactionLineAccountVisitor interface { - VisitString(string) error - VisitAccount(*Account) error -} - -func (g *GeneralLedgerTransactionLineAccount) Accept(visitor GeneralLedgerTransactionLineAccountVisitor) error { - switch g.typeName { - default: - return fmt.Errorf("invalid type %s in %T", g.typeName, g) - case "string": - return visitor.VisitString(g.String) - case "account": - return visitor.VisitAccount(g.Account) - } -} - -// The base currency of the transaction -// -// - `XUA` - ADB Unit of Account -// - `AFN` - Afghan Afghani -// - `AFA` - Afghan Afghani (1927–2002) -// - `ALL` - Albanian Lek -// - `ALK` - Albanian Lek (1946–1965) -// - `DZD` - Algerian Dinar -// - `ADP` - Andorran Peseta -// - `AOA` - Angolan Kwanza -// - `AOK` - Angolan Kwanza (1977–1991) -// - `AON` - Angolan New Kwanza (1990–2000) -// - `AOR` - Angolan Readjusted Kwanza (1995–1999) -// - `ARA` - Argentine Austral -// - `ARS` - Argentine Peso -// - `ARM` - Argentine Peso (1881–1970) -// - `ARP` - Argentine Peso (1983–1985) -// - `ARL` - Argentine Peso Ley (1970–1983) -// - `AMD` - Armenian Dram -// - `AWG` - Aruban Florin -// - `AUD` - Australian Dollar -// - `ATS` - Austrian Schilling -// - `AZN` - Azerbaijani Manat -// - `AZM` - Azerbaijani Manat (1993–2006) -// - `BSD` - Bahamian Dollar -// - `BHD` - Bahraini Dinar -// - `BDT` - Bangladeshi Taka -// - `BBD` - Barbadian Dollar -// - `BYN` - Belarusian Ruble -// - `BYB` - Belarusian Ruble (1994–1999) -// - `BYR` - Belarusian Ruble (2000–2016) -// - `BEF` - Belgian Franc -// - `BEC` - Belgian Franc (convertible) -// - `BEL` - Belgian Franc (financial) -// - `BZD` - Belize Dollar -// - `BMD` - Bermudan Dollar -// - `BTN` - Bhutanese Ngultrum -// - `BOB` - Bolivian Boliviano -// - `BOL` - Bolivian Boliviano (1863–1963) -// - `BOV` - Bolivian Mvdol -// - `BOP` - Bolivian Peso -// - `BAM` - Bosnia-Herzegovina Convertible Mark -// - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) -// - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) -// - `BWP` - Botswanan Pula -// - `BRC` - Brazilian Cruzado (1986–1989) -// - `BRZ` - Brazilian Cruzeiro (1942–1967) -// - `BRE` - Brazilian Cruzeiro (1990–1993) -// - `BRR` - Brazilian Cruzeiro (1993–1994) -// - `BRN` - Brazilian New Cruzado (1989–1990) -// - `BRB` - Brazilian New Cruzeiro (1967–1986) -// - `BRL` - Brazilian Real -// - `GBP` - British Pound -// - `BND` - Brunei Dollar -// - `BGL` - Bulgarian Hard Lev -// - `BGN` - Bulgarian Lev -// - `BGO` - Bulgarian Lev (1879–1952) -// - `BGM` - Bulgarian Socialist Lev -// - `BUK` - Burmese Kyat -// - `BIF` - Burundian Franc -// - `XPF` - CFP Franc -// - `KHR` - Cambodian Riel -// - `CAD` - Canadian Dollar -// - `CVE` - Cape Verdean Escudo -// - `KYD` - Cayman Islands Dollar -// - `XAF` - Central African CFA Franc -// - `CLE` - Chilean Escudo -// - `CLP` - Chilean Peso -// - `CLF` - Chilean Unit of Account (UF) -// - `CNX` - Chinese People’s Bank Dollar -// - `CNY` - Chinese Yuan -// - `CNH` - Chinese Yuan (offshore) -// - `COP` - Colombian Peso -// - `COU` - Colombian Real Value Unit -// - `KMF` - Comorian Franc -// - `CDF` - Congolese Franc -// - `CRC` - Costa Rican Colón -// - `HRD` - Croatian Dinar -// - `HRK` - Croatian Kuna -// - `CUC` - Cuban Convertible Peso -// - `CUP` - Cuban Peso -// - `CYP` - Cypriot Pound -// - `CZK` - Czech Koruna -// - `CSK` - Czechoslovak Hard Koruna -// - `DKK` - Danish Krone -// - `DJF` - Djiboutian Franc -// - `DOP` - Dominican Peso -// - `NLG` - Dutch Guilder -// - `XCD` - East Caribbean Dollar -// - `DDM` - East German Mark -// - `ECS` - Ecuadorian Sucre -// - `ECV` - Ecuadorian Unit of Constant Value -// - `EGP` - Egyptian Pound -// - `GQE` - Equatorial Guinean Ekwele -// - `ERN` - Eritrean Nakfa -// - `EEK` - Estonian Kroon -// - `ETB` - Ethiopian Birr -// - `EUR` - Euro -// - `XBA` - European Composite Unit -// - `XEU` - European Currency Unit -// - `XBB` - European Monetary Unit -// - `XBC` - European Unit of Account (XBC) -// - `XBD` - European Unit of Account (XBD) -// - `FKP` - Falkland Islands Pound -// - `FJD` - Fijian Dollar -// - `FIM` - Finnish Markka -// - `FRF` - French Franc -// - `XFO` - French Gold Franc -// - `XFU` - French UIC-Franc -// - `GMD` - Gambian Dalasi -// - `GEK` - Georgian Kupon Larit -// - `GEL` - Georgian Lari -// - `DEM` - German Mark -// - `GHS` - Ghanaian Cedi -// - `GHC` - Ghanaian Cedi (1979–2007) -// - `GIP` - Gibraltar Pound -// - `XAU` - Gold -// - `GRD` - Greek Drachma -// - `GTQ` - Guatemalan Quetzal -// - `GWP` - Guinea-Bissau Peso -// - `GNF` - Guinean Franc -// - `GNS` - Guinean Syli -// - `GYD` - Guyanaese Dollar -// - `HTG` - Haitian Gourde -// - `HNL` - Honduran Lempira -// - `HKD` - Hong Kong Dollar -// - `HUF` - Hungarian Forint -// - `IMP` - IMP -// - `ISK` - Icelandic Króna -// - `ISJ` - Icelandic Króna (1918–1981) -// - `INR` - Indian Rupee -// - `IDR` - Indonesian Rupiah -// - `IRR` - Iranian Rial -// - `IQD` - Iraqi Dinar -// - `IEP` - Irish Pound -// - `ILS` - Israeli New Shekel -// - `ILP` - Israeli Pound -// - `ILR` - Israeli Shekel (1980–1985) -// - `ITL` - Italian Lira -// - `JMD` - Jamaican Dollar -// - `JPY` - Japanese Yen -// - `JOD` - Jordanian Dinar -// - `KZT` - Kazakhstani Tenge -// - `KES` - Kenyan Shilling -// - `KWD` - Kuwaiti Dinar -// - `KGS` - Kyrgystani Som -// - `LAK` - Laotian Kip -// - `LVL` - Latvian Lats -// - `LVR` - Latvian Ruble -// - `LBP` - Lebanese Pound -// - `LSL` - Lesotho Loti -// - `LRD` - Liberian Dollar -// - `LYD` - Libyan Dinar -// - `LTL` - Lithuanian Litas -// - `LTT` - Lithuanian Talonas -// - `LUL` - Luxembourg Financial Franc -// - `LUC` - Luxembourgian Convertible Franc -// - `LUF` - Luxembourgian Franc -// - `MOP` - Macanese Pataca -// - `MKD` - Macedonian Denar -// - `MKN` - Macedonian Denar (1992–1993) -// - `MGA` - Malagasy Ariary -// - `MGF` - Malagasy Franc -// - `MWK` - Malawian Kwacha -// - `MYR` - Malaysian Ringgit -// - `MVR` - Maldivian Rufiyaa -// - `MVP` - Maldivian Rupee (1947–1981) -// - `MLF` - Malian Franc -// - `MTL` - Maltese Lira -// - `MTP` - Maltese Pound -// - `MRU` - Mauritanian Ouguiya -// - `MRO` - Mauritanian Ouguiya (1973–2017) -// - `MUR` - Mauritian Rupee -// - `MXV` - Mexican Investment Unit -// - `MXN` - Mexican Peso -// - `MXP` - Mexican Silver Peso (1861–1992) -// - `MDC` - Moldovan Cupon -// - `MDL` - Moldovan Leu -// - `MCF` - Monegasque Franc -// - `MNT` - Mongolian Tugrik -// - `MAD` - Moroccan Dirham -// - `MAF` - Moroccan Franc -// - `MZE` - Mozambican Escudo -// - `MZN` - Mozambican Metical -// - `MZM` - Mozambican Metical (1980–2006) -// - `MMK` - Myanmar Kyat -// - `NAD` - Namibian Dollar -// - `NPR` - Nepalese Rupee -// - `ANG` - Netherlands Antillean Guilder -// - `TWD` - New Taiwan Dollar -// - `NZD` - New Zealand Dollar -// - `NIO` - Nicaraguan Córdoba -// - `NIC` - Nicaraguan Córdoba (1988–1991) -// - `NGN` - Nigerian Naira -// - `KPW` - North Korean Won -// - `NOK` - Norwegian Krone -// - `OMR` - Omani Rial -// - `PKR` - Pakistani Rupee -// - `XPD` - Palladium -// - `PAB` - Panamanian Balboa -// - `PGK` - Papua New Guinean Kina -// - `PYG` - Paraguayan Guarani -// - `PEI` - Peruvian Inti -// - `PEN` - Peruvian Sol -// - `PES` - Peruvian Sol (1863–1965) -// - `PHP` - Philippine Peso -// - `XPT` - Platinum -// - `PLN` - Polish Zloty -// - `PLZ` - Polish Zloty (1950–1995) -// - `PTE` - Portuguese Escudo -// - `GWE` - Portuguese Guinea Escudo -// - `QAR` - Qatari Rial -// - `XRE` - RINET Funds -// - `RHD` - Rhodesian Dollar -// - `RON` - Romanian Leu -// - `ROL` - Romanian Leu (1952–2006) -// - `RUB` - Russian Ruble -// - `RUR` - Russian Ruble (1991–1998) -// - `RWF` - Rwandan Franc -// - `SVC` - Salvadoran Colón -// - `WST` - Samoan Tala -// - `SAR` - Saudi Riyal -// - `RSD` - Serbian Dinar -// - `CSD` - Serbian Dinar (2002–2006) -// - `SCR` - Seychellois Rupee -// - `SLL` - Sierra Leonean Leone -// - `XAG` - Silver -// - `SGD` - Singapore Dollar -// - `SKK` - Slovak Koruna -// - `SIT` - Slovenian Tolar -// - `SBD` - Solomon Islands Dollar -// - `SOS` - Somali Shilling -// - `ZAR` - South African Rand -// - `ZAL` - South African Rand (financial) -// - `KRH` - South Korean Hwan (1953–1962) -// - `KRW` - South Korean Won -// - `KRO` - South Korean Won (1945–1953) -// - `SSP` - South Sudanese Pound -// - `SUR` - Soviet Rouble -// - `ESP` - Spanish Peseta -// - `ESA` - Spanish Peseta (A account) -// - `ESB` - Spanish Peseta (convertible account) -// - `XDR` - Special Drawing Rights -// - `LKR` - Sri Lankan Rupee -// - `SHP` - St. Helena Pound -// - `XSU` - Sucre -// - `SDD` - Sudanese Dinar (1992–2007) -// - `SDG` - Sudanese Pound -// - `SDP` - Sudanese Pound (1957–1998) -// - `SRD` - Surinamese Dollar -// - `SRG` - Surinamese Guilder -// - `SZL` - Swazi Lilangeni -// - `SEK` - Swedish Krona -// - `CHF` - Swiss Franc -// - `SYP` - Syrian Pound -// - `STN` - São Tomé & Príncipe Dobra -// - `STD` - São Tomé & Príncipe Dobra (1977–2017) -// - `TVD` - TVD -// - `TJR` - Tajikistani Ruble -// - `TJS` - Tajikistani Somoni -// - `TZS` - Tanzanian Shilling -// - `XTS` - Testing Currency Code -// - `THB` - Thai Baht -// - `XXX` - The codes assigned for transactions where no currency is involved -// - `TPE` - Timorese Escudo -// - `TOP` - Tongan Paʻanga -// - `TTD` - Trinidad & Tobago Dollar -// - `TND` - Tunisian Dinar -// - `TRY` - Turkish Lira -// - `TRL` - Turkish Lira (1922–2005) -// - `TMT` - Turkmenistani Manat -// - `TMM` - Turkmenistani Manat (1993–2009) -// - `USD` - US Dollar -// - `USN` - US Dollar (Next day) -// - `USS` - US Dollar (Same day) -// - `UGX` - Ugandan Shilling -// - `UGS` - Ugandan Shilling (1966–1987) -// - `UAH` - Ukrainian Hryvnia -// - `UAK` - Ukrainian Karbovanets -// - `AED` - United Arab Emirates Dirham -// - `UYW` - Uruguayan Nominal Wage Index Unit -// - `UYU` - Uruguayan Peso -// - `UYP` - Uruguayan Peso (1975–1993) -// - `UYI` - Uruguayan Peso (Indexed Units) -// - `UZS` - Uzbekistani Som -// - `VUV` - Vanuatu Vatu -// - `VES` - Venezuelan Bolívar -// - `VEB` - Venezuelan Bolívar (1871–2008) -// - `VEF` - Venezuelan Bolívar (2008–2018) -// - `VND` - Vietnamese Dong -// - `VNN` - Vietnamese Dong (1978–1985) -// - `CHE` - WIR Euro -// - `CHW` - WIR Franc -// - `XOF` - West African CFA Franc -// - `YDD` - Yemeni Dinar -// - `YER` - Yemeni Rial -// - `YUN` - Yugoslavian Convertible Dinar (1990–1992) -// - `YUD` - Yugoslavian Hard Dinar (1966–1990) -// - `YUM` - Yugoslavian New Dinar (1994–2002) -// - `YUR` - Yugoslavian Reformed Dinar (1992–1993) -// - `ZWN` - ZWN -// - `ZRN` - Zairean New Zaire (1993–1998) -// - `ZRZ` - Zairean Zaire (1971–1993) -// - `ZMW` - Zambian Kwacha -// - `ZMK` - Zambian Kwacha (1968–2012) -// - `ZWD` - Zimbabwean Dollar (1980–2008) -// - `ZWR` - Zimbabwean Dollar (2008) -// - `ZWL` - Zimbabwean Dollar (2009) -type GeneralLedgerTransactionLineBaseCurrency struct { - typeName string - TransactionCurrencyEnum TransactionCurrencyEnum - String string -} - -func NewGeneralLedgerTransactionLineBaseCurrencyFromTransactionCurrencyEnum(value TransactionCurrencyEnum) *GeneralLedgerTransactionLineBaseCurrency { - return &GeneralLedgerTransactionLineBaseCurrency{typeName: "transactionCurrencyEnum", TransactionCurrencyEnum: value} -} - -func NewGeneralLedgerTransactionLineBaseCurrencyFromString(value string) *GeneralLedgerTransactionLineBaseCurrency { - return &GeneralLedgerTransactionLineBaseCurrency{typeName: "string", String: value} -} - -func (g *GeneralLedgerTransactionLineBaseCurrency) UnmarshalJSON(data []byte) error { - var valueTransactionCurrencyEnum TransactionCurrencyEnum - if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { - g.typeName = "transactionCurrencyEnum" - g.TransactionCurrencyEnum = valueTransactionCurrencyEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - g.typeName = "string" - g.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, g) -} - -func (g GeneralLedgerTransactionLineBaseCurrency) MarshalJSON() ([]byte, error) { - switch g.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", g.typeName, g) - case "transactionCurrencyEnum": - return json.Marshal(g.TransactionCurrencyEnum) - case "string": - return json.Marshal(g.String) - } -} - -type GeneralLedgerTransactionLineBaseCurrencyVisitor interface { - VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error - VisitString(string) error -} - -func (g *GeneralLedgerTransactionLineBaseCurrency) Accept(visitor GeneralLedgerTransactionLineBaseCurrencyVisitor) error { - switch g.typeName { - default: - return fmt.Errorf("invalid type %s in %T", g.typeName, g) - case "transactionCurrencyEnum": - return visitor.VisitTransactionCurrencyEnum(g.TransactionCurrencyEnum) - case "string": - return visitor.VisitString(g.String) - } -} - -// The company the GeneralLedgerTransaction belongs to. -type GeneralLedgerTransactionLineCompany struct { - typeName string - String string - CompanyInfo *CompanyInfo -} - -func NewGeneralLedgerTransactionLineCompanyFromString(value string) *GeneralLedgerTransactionLineCompany { - return &GeneralLedgerTransactionLineCompany{typeName: "string", String: value} -} - -func NewGeneralLedgerTransactionLineCompanyFromCompanyInfo(value *CompanyInfo) *GeneralLedgerTransactionLineCompany { - return &GeneralLedgerTransactionLineCompany{typeName: "companyInfo", CompanyInfo: value} -} - -func (g *GeneralLedgerTransactionLineCompany) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - g.typeName = "string" - g.String = valueString - return nil - } - valueCompanyInfo := new(CompanyInfo) - if err := json.Unmarshal(data, &valueCompanyInfo); err == nil { - g.typeName = "companyInfo" - g.CompanyInfo = valueCompanyInfo - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, g) -} - -func (g GeneralLedgerTransactionLineCompany) MarshalJSON() ([]byte, error) { - switch g.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", g.typeName, g) - case "string": - return json.Marshal(g.String) - case "companyInfo": - return json.Marshal(g.CompanyInfo) - } -} - -type GeneralLedgerTransactionLineCompanyVisitor interface { - VisitString(string) error - VisitCompanyInfo(*CompanyInfo) error -} - -func (g *GeneralLedgerTransactionLineCompany) Accept(visitor GeneralLedgerTransactionLineCompanyVisitor) error { - switch g.typeName { - default: - return fmt.Errorf("invalid type %s in %T", g.typeName, g) - case "string": - return visitor.VisitString(g.String) - case "companyInfo": - return visitor.VisitCompanyInfo(g.CompanyInfo) - } -} - -type GeneralLedgerTransactionLineContact struct { - typeName string - String string - Contact *Contact -} - -func NewGeneralLedgerTransactionLineContactFromString(value string) *GeneralLedgerTransactionLineContact { - return &GeneralLedgerTransactionLineContact{typeName: "string", String: value} -} - -func NewGeneralLedgerTransactionLineContactFromContact(value *Contact) *GeneralLedgerTransactionLineContact { - return &GeneralLedgerTransactionLineContact{typeName: "contact", Contact: value} -} - -func (g *GeneralLedgerTransactionLineContact) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - g.typeName = "string" - g.String = valueString - return nil - } - valueContact := new(Contact) - if err := json.Unmarshal(data, &valueContact); err == nil { - g.typeName = "contact" - g.Contact = valueContact - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, g) -} - -func (g GeneralLedgerTransactionLineContact) MarshalJSON() ([]byte, error) { - switch g.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", g.typeName, g) - case "string": - return json.Marshal(g.String) - case "contact": - return json.Marshal(g.Contact) - } -} - -type GeneralLedgerTransactionLineContactVisitor interface { - VisitString(string) error - VisitContact(*Contact) error -} - -func (g *GeneralLedgerTransactionLineContact) Accept(visitor GeneralLedgerTransactionLineContactVisitor) error { - switch g.typeName { - default: - return fmt.Errorf("invalid type %s in %T", g.typeName, g) - case "string": - return visitor.VisitString(g.String) - case "contact": - return visitor.VisitContact(g.Contact) - } -} - -type GeneralLedgerTransactionLineEmployee struct { - typeName string - String string - Employee *Employee -} - -func NewGeneralLedgerTransactionLineEmployeeFromString(value string) *GeneralLedgerTransactionLineEmployee { - return &GeneralLedgerTransactionLineEmployee{typeName: "string", String: value} -} - -func NewGeneralLedgerTransactionLineEmployeeFromEmployee(value *Employee) *GeneralLedgerTransactionLineEmployee { - return &GeneralLedgerTransactionLineEmployee{typeName: "employee", Employee: value} -} - -func (g *GeneralLedgerTransactionLineEmployee) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - g.typeName = "string" - g.String = valueString - return nil - } - valueEmployee := new(Employee) - if err := json.Unmarshal(data, &valueEmployee); err == nil { - g.typeName = "employee" - g.Employee = valueEmployee - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, g) -} - -func (g GeneralLedgerTransactionLineEmployee) MarshalJSON() ([]byte, error) { - switch g.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", g.typeName, g) - case "string": - return json.Marshal(g.String) - case "employee": - return json.Marshal(g.Employee) - } -} - -type GeneralLedgerTransactionLineEmployeeVisitor interface { - VisitString(string) error - VisitEmployee(*Employee) error -} - -func (g *GeneralLedgerTransactionLineEmployee) Accept(visitor GeneralLedgerTransactionLineEmployeeVisitor) error { - switch g.typeName { - default: - return fmt.Errorf("invalid type %s in %T", g.typeName, g) - case "string": - return visitor.VisitString(g.String) - case "employee": - return visitor.VisitEmployee(g.Employee) - } -} - -type GeneralLedgerTransactionLineItem struct { - typeName string - String string - Item *Item -} - -func NewGeneralLedgerTransactionLineItemFromString(value string) *GeneralLedgerTransactionLineItem { - return &GeneralLedgerTransactionLineItem{typeName: "string", String: value} -} - -func NewGeneralLedgerTransactionLineItemFromItem(value *Item) *GeneralLedgerTransactionLineItem { - return &GeneralLedgerTransactionLineItem{typeName: "item", Item: value} -} - -func (g *GeneralLedgerTransactionLineItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - g.typeName = "string" - g.String = valueString - return nil - } - valueItem := new(Item) - if err := json.Unmarshal(data, &valueItem); err == nil { - g.typeName = "item" - g.Item = valueItem - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, g) -} - -func (g GeneralLedgerTransactionLineItem) MarshalJSON() ([]byte, error) { - switch g.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", g.typeName, g) - case "string": - return json.Marshal(g.String) - case "item": - return json.Marshal(g.Item) - } -} - -type GeneralLedgerTransactionLineItemVisitor interface { - VisitString(string) error - VisitItem(*Item) error -} - -func (g *GeneralLedgerTransactionLineItem) Accept(visitor GeneralLedgerTransactionLineItemVisitor) error { - switch g.typeName { - default: - return fmt.Errorf("invalid type %s in %T", g.typeName, g) - case "string": - return visitor.VisitString(g.String) - case "item": - return visitor.VisitItem(g.Item) - } -} - -type GeneralLedgerTransactionLineTrackingCategoriesItem struct { - typeName string - String string - TrackingCategory *TrackingCategory -} - -func NewGeneralLedgerTransactionLineTrackingCategoriesItemFromString(value string) *GeneralLedgerTransactionLineTrackingCategoriesItem { - return &GeneralLedgerTransactionLineTrackingCategoriesItem{typeName: "string", String: value} -} - -func NewGeneralLedgerTransactionLineTrackingCategoriesItemFromTrackingCategory(value *TrackingCategory) *GeneralLedgerTransactionLineTrackingCategoriesItem { - return &GeneralLedgerTransactionLineTrackingCategoriesItem{typeName: "trackingCategory", TrackingCategory: value} -} - -func (g *GeneralLedgerTransactionLineTrackingCategoriesItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - g.typeName = "string" - g.String = valueString - return nil - } - valueTrackingCategory := new(TrackingCategory) - if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { - g.typeName = "trackingCategory" - g.TrackingCategory = valueTrackingCategory - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, g) -} - -func (g GeneralLedgerTransactionLineTrackingCategoriesItem) MarshalJSON() ([]byte, error) { - switch g.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", g.typeName, g) - case "string": - return json.Marshal(g.String) - case "trackingCategory": - return json.Marshal(g.TrackingCategory) - } -} - -type GeneralLedgerTransactionLineTrackingCategoriesItemVisitor interface { - VisitString(string) error - VisitTrackingCategory(*TrackingCategory) error -} - -func (g *GeneralLedgerTransactionLineTrackingCategoriesItem) Accept(visitor GeneralLedgerTransactionLineTrackingCategoriesItemVisitor) error { - switch g.typeName { - default: - return fmt.Errorf("invalid type %s in %T", g.typeName, g) - case "string": - return visitor.VisitString(g.String) - case "trackingCategory": - return visitor.VisitTrackingCategory(g.TrackingCategory) - } -} - -// The transaction currency that the transaction is made in. -// -// - `XUA` - ADB Unit of Account -// - `AFN` - Afghan Afghani -// - `AFA` - Afghan Afghani (1927–2002) -// - `ALL` - Albanian Lek -// - `ALK` - Albanian Lek (1946–1965) -// - `DZD` - Algerian Dinar -// - `ADP` - Andorran Peseta -// - `AOA` - Angolan Kwanza -// - `AOK` - Angolan Kwanza (1977–1991) -// - `AON` - Angolan New Kwanza (1990–2000) -// - `AOR` - Angolan Readjusted Kwanza (1995–1999) -// - `ARA` - Argentine Austral -// - `ARS` - Argentine Peso -// - `ARM` - Argentine Peso (1881–1970) -// - `ARP` - Argentine Peso (1983–1985) -// - `ARL` - Argentine Peso Ley (1970–1983) -// - `AMD` - Armenian Dram -// - `AWG` - Aruban Florin -// - `AUD` - Australian Dollar -// - `ATS` - Austrian Schilling -// - `AZN` - Azerbaijani Manat -// - `AZM` - Azerbaijani Manat (1993–2006) -// - `BSD` - Bahamian Dollar -// - `BHD` - Bahraini Dinar -// - `BDT` - Bangladeshi Taka -// - `BBD` - Barbadian Dollar -// - `BYN` - Belarusian Ruble -// - `BYB` - Belarusian Ruble (1994–1999) -// - `BYR` - Belarusian Ruble (2000–2016) -// - `BEF` - Belgian Franc -// - `BEC` - Belgian Franc (convertible) -// - `BEL` - Belgian Franc (financial) -// - `BZD` - Belize Dollar -// - `BMD` - Bermudan Dollar -// - `BTN` - Bhutanese Ngultrum -// - `BOB` - Bolivian Boliviano -// - `BOL` - Bolivian Boliviano (1863–1963) -// - `BOV` - Bolivian Mvdol -// - `BOP` - Bolivian Peso -// - `BAM` - Bosnia-Herzegovina Convertible Mark -// - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) -// - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) -// - `BWP` - Botswanan Pula -// - `BRC` - Brazilian Cruzado (1986–1989) -// - `BRZ` - Brazilian Cruzeiro (1942–1967) -// - `BRE` - Brazilian Cruzeiro (1990–1993) -// - `BRR` - Brazilian Cruzeiro (1993–1994) -// - `BRN` - Brazilian New Cruzado (1989–1990) -// - `BRB` - Brazilian New Cruzeiro (1967–1986) -// - `BRL` - Brazilian Real -// - `GBP` - British Pound -// - `BND` - Brunei Dollar -// - `BGL` - Bulgarian Hard Lev -// - `BGN` - Bulgarian Lev -// - `BGO` - Bulgarian Lev (1879–1952) -// - `BGM` - Bulgarian Socialist Lev -// - `BUK` - Burmese Kyat -// - `BIF` - Burundian Franc -// - `XPF` - CFP Franc -// - `KHR` - Cambodian Riel -// - `CAD` - Canadian Dollar -// - `CVE` - Cape Verdean Escudo -// - `KYD` - Cayman Islands Dollar -// - `XAF` - Central African CFA Franc -// - `CLE` - Chilean Escudo -// - `CLP` - Chilean Peso -// - `CLF` - Chilean Unit of Account (UF) -// - `CNX` - Chinese People’s Bank Dollar -// - `CNY` - Chinese Yuan -// - `CNH` - Chinese Yuan (offshore) -// - `COP` - Colombian Peso -// - `COU` - Colombian Real Value Unit -// - `KMF` - Comorian Franc -// - `CDF` - Congolese Franc -// - `CRC` - Costa Rican Colón -// - `HRD` - Croatian Dinar -// - `HRK` - Croatian Kuna -// - `CUC` - Cuban Convertible Peso -// - `CUP` - Cuban Peso -// - `CYP` - Cypriot Pound -// - `CZK` - Czech Koruna -// - `CSK` - Czechoslovak Hard Koruna -// - `DKK` - Danish Krone -// - `DJF` - Djiboutian Franc -// - `DOP` - Dominican Peso -// - `NLG` - Dutch Guilder -// - `XCD` - East Caribbean Dollar -// - `DDM` - East German Mark -// - `ECS` - Ecuadorian Sucre -// - `ECV` - Ecuadorian Unit of Constant Value -// - `EGP` - Egyptian Pound -// - `GQE` - Equatorial Guinean Ekwele -// - `ERN` - Eritrean Nakfa -// - `EEK` - Estonian Kroon -// - `ETB` - Ethiopian Birr -// - `EUR` - Euro -// - `XBA` - European Composite Unit -// - `XEU` - European Currency Unit -// - `XBB` - European Monetary Unit -// - `XBC` - European Unit of Account (XBC) -// - `XBD` - European Unit of Account (XBD) -// - `FKP` - Falkland Islands Pound -// - `FJD` - Fijian Dollar -// - `FIM` - Finnish Markka -// - `FRF` - French Franc -// - `XFO` - French Gold Franc -// - `XFU` - French UIC-Franc -// - `GMD` - Gambian Dalasi -// - `GEK` - Georgian Kupon Larit -// - `GEL` - Georgian Lari -// - `DEM` - German Mark -// - `GHS` - Ghanaian Cedi -// - `GHC` - Ghanaian Cedi (1979–2007) -// - `GIP` - Gibraltar Pound -// - `XAU` - Gold -// - `GRD` - Greek Drachma -// - `GTQ` - Guatemalan Quetzal -// - `GWP` - Guinea-Bissau Peso -// - `GNF` - Guinean Franc -// - `GNS` - Guinean Syli -// - `GYD` - Guyanaese Dollar -// - `HTG` - Haitian Gourde -// - `HNL` - Honduran Lempira -// - `HKD` - Hong Kong Dollar -// - `HUF` - Hungarian Forint -// - `IMP` - IMP -// - `ISK` - Icelandic Króna -// - `ISJ` - Icelandic Króna (1918–1981) -// - `INR` - Indian Rupee -// - `IDR` - Indonesian Rupiah -// - `IRR` - Iranian Rial -// - `IQD` - Iraqi Dinar -// - `IEP` - Irish Pound -// - `ILS` - Israeli New Shekel -// - `ILP` - Israeli Pound -// - `ILR` - Israeli Shekel (1980–1985) -// - `ITL` - Italian Lira -// - `JMD` - Jamaican Dollar -// - `JPY` - Japanese Yen -// - `JOD` - Jordanian Dinar -// - `KZT` - Kazakhstani Tenge -// - `KES` - Kenyan Shilling -// - `KWD` - Kuwaiti Dinar -// - `KGS` - Kyrgystani Som -// - `LAK` - Laotian Kip -// - `LVL` - Latvian Lats -// - `LVR` - Latvian Ruble -// - `LBP` - Lebanese Pound -// - `LSL` - Lesotho Loti -// - `LRD` - Liberian Dollar -// - `LYD` - Libyan Dinar -// - `LTL` - Lithuanian Litas -// - `LTT` - Lithuanian Talonas -// - `LUL` - Luxembourg Financial Franc -// - `LUC` - Luxembourgian Convertible Franc -// - `LUF` - Luxembourgian Franc -// - `MOP` - Macanese Pataca -// - `MKD` - Macedonian Denar -// - `MKN` - Macedonian Denar (1992–1993) -// - `MGA` - Malagasy Ariary -// - `MGF` - Malagasy Franc -// - `MWK` - Malawian Kwacha -// - `MYR` - Malaysian Ringgit -// - `MVR` - Maldivian Rufiyaa -// - `MVP` - Maldivian Rupee (1947–1981) -// - `MLF` - Malian Franc -// - `MTL` - Maltese Lira -// - `MTP` - Maltese Pound -// - `MRU` - Mauritanian Ouguiya -// - `MRO` - Mauritanian Ouguiya (1973–2017) -// - `MUR` - Mauritian Rupee -// - `MXV` - Mexican Investment Unit -// - `MXN` - Mexican Peso -// - `MXP` - Mexican Silver Peso (1861–1992) -// - `MDC` - Moldovan Cupon -// - `MDL` - Moldovan Leu -// - `MCF` - Monegasque Franc -// - `MNT` - Mongolian Tugrik -// - `MAD` - Moroccan Dirham -// - `MAF` - Moroccan Franc -// - `MZE` - Mozambican Escudo -// - `MZN` - Mozambican Metical -// - `MZM` - Mozambican Metical (1980–2006) -// - `MMK` - Myanmar Kyat -// - `NAD` - Namibian Dollar -// - `NPR` - Nepalese Rupee -// - `ANG` - Netherlands Antillean Guilder -// - `TWD` - New Taiwan Dollar -// - `NZD` - New Zealand Dollar -// - `NIO` - Nicaraguan Córdoba -// - `NIC` - Nicaraguan Córdoba (1988–1991) -// - `NGN` - Nigerian Naira -// - `KPW` - North Korean Won -// - `NOK` - Norwegian Krone -// - `OMR` - Omani Rial -// - `PKR` - Pakistani Rupee -// - `XPD` - Palladium -// - `PAB` - Panamanian Balboa -// - `PGK` - Papua New Guinean Kina -// - `PYG` - Paraguayan Guarani -// - `PEI` - Peruvian Inti -// - `PEN` - Peruvian Sol -// - `PES` - Peruvian Sol (1863–1965) -// - `PHP` - Philippine Peso -// - `XPT` - Platinum -// - `PLN` - Polish Zloty -// - `PLZ` - Polish Zloty (1950–1995) -// - `PTE` - Portuguese Escudo -// - `GWE` - Portuguese Guinea Escudo -// - `QAR` - Qatari Rial -// - `XRE` - RINET Funds -// - `RHD` - Rhodesian Dollar -// - `RON` - Romanian Leu -// - `ROL` - Romanian Leu (1952–2006) -// - `RUB` - Russian Ruble -// - `RUR` - Russian Ruble (1991–1998) -// - `RWF` - Rwandan Franc -// - `SVC` - Salvadoran Colón -// - `WST` - Samoan Tala -// - `SAR` - Saudi Riyal -// - `RSD` - Serbian Dinar -// - `CSD` - Serbian Dinar (2002–2006) -// - `SCR` - Seychellois Rupee -// - `SLL` - Sierra Leonean Leone -// - `XAG` - Silver -// - `SGD` - Singapore Dollar -// - `SKK` - Slovak Koruna -// - `SIT` - Slovenian Tolar -// - `SBD` - Solomon Islands Dollar -// - `SOS` - Somali Shilling -// - `ZAR` - South African Rand -// - `ZAL` - South African Rand (financial) -// - `KRH` - South Korean Hwan (1953–1962) -// - `KRW` - South Korean Won -// - `KRO` - South Korean Won (1945–1953) -// - `SSP` - South Sudanese Pound -// - `SUR` - Soviet Rouble -// - `ESP` - Spanish Peseta -// - `ESA` - Spanish Peseta (A account) -// - `ESB` - Spanish Peseta (convertible account) -// - `XDR` - Special Drawing Rights -// - `LKR` - Sri Lankan Rupee -// - `SHP` - St. Helena Pound -// - `XSU` - Sucre -// - `SDD` - Sudanese Dinar (1992–2007) -// - `SDG` - Sudanese Pound -// - `SDP` - Sudanese Pound (1957–1998) -// - `SRD` - Surinamese Dollar -// - `SRG` - Surinamese Guilder -// - `SZL` - Swazi Lilangeni -// - `SEK` - Swedish Krona -// - `CHF` - Swiss Franc -// - `SYP` - Syrian Pound -// - `STN` - São Tomé & Príncipe Dobra -// - `STD` - São Tomé & Príncipe Dobra (1977–2017) -// - `TVD` - TVD -// - `TJR` - Tajikistani Ruble -// - `TJS` - Tajikistani Somoni -// - `TZS` - Tanzanian Shilling -// - `XTS` - Testing Currency Code -// - `THB` - Thai Baht -// - `XXX` - The codes assigned for transactions where no currency is involved -// - `TPE` - Timorese Escudo -// - `TOP` - Tongan Paʻanga -// - `TTD` - Trinidad & Tobago Dollar -// - `TND` - Tunisian Dinar -// - `TRY` - Turkish Lira -// - `TRL` - Turkish Lira (1922–2005) -// - `TMT` - Turkmenistani Manat -// - `TMM` - Turkmenistani Manat (1993–2009) -// - `USD` - US Dollar -// - `USN` - US Dollar (Next day) -// - `USS` - US Dollar (Same day) -// - `UGX` - Ugandan Shilling -// - `UGS` - Ugandan Shilling (1966–1987) -// - `UAH` - Ukrainian Hryvnia -// - `UAK` - Ukrainian Karbovanets -// - `AED` - United Arab Emirates Dirham -// - `UYW` - Uruguayan Nominal Wage Index Unit -// - `UYU` - Uruguayan Peso -// - `UYP` - Uruguayan Peso (1975–1993) -// - `UYI` - Uruguayan Peso (Indexed Units) -// - `UZS` - Uzbekistani Som -// - `VUV` - Vanuatu Vatu -// - `VES` - Venezuelan Bolívar -// - `VEB` - Venezuelan Bolívar (1871–2008) -// - `VEF` - Venezuelan Bolívar (2008–2018) -// - `VND` - Vietnamese Dong -// - `VNN` - Vietnamese Dong (1978–1985) -// - `CHE` - WIR Euro -// - `CHW` - WIR Franc -// - `XOF` - West African CFA Franc -// - `YDD` - Yemeni Dinar -// - `YER` - Yemeni Rial -// - `YUN` - Yugoslavian Convertible Dinar (1990–1992) -// - `YUD` - Yugoslavian Hard Dinar (1966–1990) -// - `YUM` - Yugoslavian New Dinar (1994–2002) -// - `YUR` - Yugoslavian Reformed Dinar (1992–1993) -// - `ZWN` - ZWN -// - `ZRN` - Zairean New Zaire (1993–1998) -// - `ZRZ` - Zairean Zaire (1971–1993) -// - `ZMW` - Zambian Kwacha -// - `ZMK` - Zambian Kwacha (1968–2012) -// - `ZWD` - Zimbabwean Dollar (1980–2008) -// - `ZWR` - Zimbabwean Dollar (2008) -// - `ZWL` - Zimbabwean Dollar (2009) -type GeneralLedgerTransactionLineTransactionCurrency struct { - typeName string - TransactionCurrencyEnum TransactionCurrencyEnum - String string -} - -func NewGeneralLedgerTransactionLineTransactionCurrencyFromTransactionCurrencyEnum(value TransactionCurrencyEnum) *GeneralLedgerTransactionLineTransactionCurrency { - return &GeneralLedgerTransactionLineTransactionCurrency{typeName: "transactionCurrencyEnum", TransactionCurrencyEnum: value} -} - -func NewGeneralLedgerTransactionLineTransactionCurrencyFromString(value string) *GeneralLedgerTransactionLineTransactionCurrency { - return &GeneralLedgerTransactionLineTransactionCurrency{typeName: "string", String: value} -} - -func (g *GeneralLedgerTransactionLineTransactionCurrency) UnmarshalJSON(data []byte) error { - var valueTransactionCurrencyEnum TransactionCurrencyEnum - if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { - g.typeName = "transactionCurrencyEnum" - g.TransactionCurrencyEnum = valueTransactionCurrencyEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - g.typeName = "string" - g.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, g) -} - -func (g GeneralLedgerTransactionLineTransactionCurrency) MarshalJSON() ([]byte, error) { - switch g.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", g.typeName, g) - case "transactionCurrencyEnum": - return json.Marshal(g.TransactionCurrencyEnum) - case "string": - return json.Marshal(g.String) - } -} - -type GeneralLedgerTransactionLineTransactionCurrencyVisitor interface { - VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error - VisitString(string) error -} - -func (g *GeneralLedgerTransactionLineTransactionCurrency) Accept(visitor GeneralLedgerTransactionLineTransactionCurrencyVisitor) error { - switch g.typeName { - default: - return fmt.Errorf("invalid type %s in %T", g.typeName, g) - case "transactionCurrencyEnum": - return visitor.VisitTransactionCurrencyEnum(g.TransactionCurrencyEnum) - case "string": - return visitor.VisitString(g.String) - } -} - -type GeneralLedgerTransactionTrackingCategoriesItem struct { - typeName string - String string - TrackingCategory *TrackingCategory -} - -func NewGeneralLedgerTransactionTrackingCategoriesItemFromString(value string) *GeneralLedgerTransactionTrackingCategoriesItem { - return &GeneralLedgerTransactionTrackingCategoriesItem{typeName: "string", String: value} -} - -func NewGeneralLedgerTransactionTrackingCategoriesItemFromTrackingCategory(value *TrackingCategory) *GeneralLedgerTransactionTrackingCategoriesItem { - return &GeneralLedgerTransactionTrackingCategoriesItem{typeName: "trackingCategory", TrackingCategory: value} -} - -func (g *GeneralLedgerTransactionTrackingCategoriesItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - g.typeName = "string" - g.String = valueString - return nil - } - valueTrackingCategory := new(TrackingCategory) - if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { - g.typeName = "trackingCategory" - g.TrackingCategory = valueTrackingCategory - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, g) -} - -func (g GeneralLedgerTransactionTrackingCategoriesItem) MarshalJSON() ([]byte, error) { - switch g.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", g.typeName, g) - case "string": - return json.Marshal(g.String) - case "trackingCategory": - return json.Marshal(g.TrackingCategory) - } -} - -type GeneralLedgerTransactionTrackingCategoriesItemVisitor interface { - VisitString(string) error - VisitTrackingCategory(*TrackingCategory) error -} - -func (g *GeneralLedgerTransactionTrackingCategoriesItem) Accept(visitor GeneralLedgerTransactionTrackingCategoriesItemVisitor) error { - switch g.typeName { - default: - return fmt.Errorf("invalid type %s in %T", g.typeName, g) - case "string": - return visitor.VisitString(g.String) - case "trackingCategory": - return visitor.VisitTrackingCategory(g.TrackingCategory) - } -} - -// The type of the underlying transaction. -// -// - `INVOICE` - INVOICE -// - `EXPENSE` - EXPENSE -// - `TRANSACTION` - TRANSACTION -// - `JOURNAL_ENTRY` - JOURNAL_ENTRY -// - `PAYMENT` - PAYMENT -// - `VENDOR_CREDIT` - VENDOR_CREDIT -// - `CREDIT_NOTE` - CREDIT_NOTE -type GeneralLedgerTransactionUnderlyingTransactionType struct { - typeName string - UnderlyingTransactionTypeEnum UnderlyingTransactionTypeEnum - String string -} - -func NewGeneralLedgerTransactionUnderlyingTransactionTypeFromUnderlyingTransactionTypeEnum(value UnderlyingTransactionTypeEnum) *GeneralLedgerTransactionUnderlyingTransactionType { - return &GeneralLedgerTransactionUnderlyingTransactionType{typeName: "underlyingTransactionTypeEnum", UnderlyingTransactionTypeEnum: value} -} - -func NewGeneralLedgerTransactionUnderlyingTransactionTypeFromString(value string) *GeneralLedgerTransactionUnderlyingTransactionType { - return &GeneralLedgerTransactionUnderlyingTransactionType{typeName: "string", String: value} -} - -func (g *GeneralLedgerTransactionUnderlyingTransactionType) UnmarshalJSON(data []byte) error { - var valueUnderlyingTransactionTypeEnum UnderlyingTransactionTypeEnum - if err := json.Unmarshal(data, &valueUnderlyingTransactionTypeEnum); err == nil { - g.typeName = "underlyingTransactionTypeEnum" - g.UnderlyingTransactionTypeEnum = valueUnderlyingTransactionTypeEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - g.typeName = "string" - g.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, g) -} - -func (g GeneralLedgerTransactionUnderlyingTransactionType) MarshalJSON() ([]byte, error) { - switch g.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", g.typeName, g) - case "underlyingTransactionTypeEnum": - return json.Marshal(g.UnderlyingTransactionTypeEnum) - case "string": - return json.Marshal(g.String) - } -} - -type GeneralLedgerTransactionUnderlyingTransactionTypeVisitor interface { - VisitUnderlyingTransactionTypeEnum(UnderlyingTransactionTypeEnum) error - VisitString(string) error -} - -func (g *GeneralLedgerTransactionUnderlyingTransactionType) Accept(visitor GeneralLedgerTransactionUnderlyingTransactionTypeVisitor) error { - switch g.typeName { - default: - return fmt.Errorf("invalid type %s in %T", g.typeName, g) - case "underlyingTransactionTypeEnum": - return visitor.VisitUnderlyingTransactionTypeEnum(g.UnderlyingTransactionTypeEnum) - case "string": - return visitor.VisitString(g.String) - } -} - -// # The IncomeStatement Object -// -// ### Description -// -// The `IncomeStatement` object is used to represent a company’s income, the cost of sales, operating expenses, and other non-operating expenses. The object also includes other important values like gross profit, gross operating profit, and net income. This represents a period of time (month, quarter, or year). -// -// ### Usage Example -// -// Fetch from the `GET IncomeStatement` endpoint and view a company's income statement for a given period. -type IncomeStatement struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The income statement's name. - Name *string `json:"name,omitempty"` - // The income statement's currency. - // - // - `XUA` - ADB Unit of Account - // - `AFN` - Afghan Afghani - // - `AFA` - Afghan Afghani (1927–2002) - // - `ALL` - Albanian Lek - // - `ALK` - Albanian Lek (1946–1965) - // - `DZD` - Algerian Dinar - // - `ADP` - Andorran Peseta - // - `AOA` - Angolan Kwanza - // - `AOK` - Angolan Kwanza (1977–1991) - // - `AON` - Angolan New Kwanza (1990–2000) - // - `AOR` - Angolan Readjusted Kwanza (1995–1999) - // - `ARA` - Argentine Austral - // - `ARS` - Argentine Peso - // - `ARM` - Argentine Peso (1881–1970) - // - `ARP` - Argentine Peso (1983–1985) - // - `ARL` - Argentine Peso Ley (1970–1983) - // - `AMD` - Armenian Dram - // - `AWG` - Aruban Florin - // - `AUD` - Australian Dollar - // - `ATS` - Austrian Schilling - // - `AZN` - Azerbaijani Manat - // - `AZM` - Azerbaijani Manat (1993–2006) - // - `BSD` - Bahamian Dollar - // - `BHD` - Bahraini Dinar - // - `BDT` - Bangladeshi Taka - // - `BBD` - Barbadian Dollar - // - `BYN` - Belarusian Ruble - // - `BYB` - Belarusian Ruble (1994–1999) - // - `BYR` - Belarusian Ruble (2000–2016) - // - `BEF` - Belgian Franc - // - `BEC` - Belgian Franc (convertible) - // - `BEL` - Belgian Franc (financial) - // - `BZD` - Belize Dollar - // - `BMD` - Bermudan Dollar - // - `BTN` - Bhutanese Ngultrum - // - `BOB` - Bolivian Boliviano - // - `BOL` - Bolivian Boliviano (1863–1963) - // - `BOV` - Bolivian Mvdol - // - `BOP` - Bolivian Peso - // - `BAM` - Bosnia-Herzegovina Convertible Mark - // - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - // - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - // - `BWP` - Botswanan Pula - // - `BRC` - Brazilian Cruzado (1986–1989) - // - `BRZ` - Brazilian Cruzeiro (1942–1967) - // - `BRE` - Brazilian Cruzeiro (1990–1993) - // - `BRR` - Brazilian Cruzeiro (1993–1994) - // - `BRN` - Brazilian New Cruzado (1989–1990) - // - `BRB` - Brazilian New Cruzeiro (1967–1986) - // - `BRL` - Brazilian Real - // - `GBP` - British Pound - // - `BND` - Brunei Dollar - // - `BGL` - Bulgarian Hard Lev - // - `BGN` - Bulgarian Lev - // - `BGO` - Bulgarian Lev (1879–1952) - // - `BGM` - Bulgarian Socialist Lev - // - `BUK` - Burmese Kyat - // - `BIF` - Burundian Franc - // - `XPF` - CFP Franc - // - `KHR` - Cambodian Riel - // - `CAD` - Canadian Dollar - // - `CVE` - Cape Verdean Escudo - // - `KYD` - Cayman Islands Dollar - // - `XAF` - Central African CFA Franc - // - `CLE` - Chilean Escudo - // - `CLP` - Chilean Peso - // - `CLF` - Chilean Unit of Account (UF) - // - `CNX` - Chinese People’s Bank Dollar - // - `CNY` - Chinese Yuan - // - `CNH` - Chinese Yuan (offshore) - // - `COP` - Colombian Peso - // - `COU` - Colombian Real Value Unit - // - `KMF` - Comorian Franc - // - `CDF` - Congolese Franc - // - `CRC` - Costa Rican Colón - // - `HRD` - Croatian Dinar - // - `HRK` - Croatian Kuna - // - `CUC` - Cuban Convertible Peso - // - `CUP` - Cuban Peso - // - `CYP` - Cypriot Pound - // - `CZK` - Czech Koruna - // - `CSK` - Czechoslovak Hard Koruna - // - `DKK` - Danish Krone - // - `DJF` - Djiboutian Franc - // - `DOP` - Dominican Peso - // - `NLG` - Dutch Guilder - // - `XCD` - East Caribbean Dollar - // - `DDM` - East German Mark - // - `ECS` - Ecuadorian Sucre - // - `ECV` - Ecuadorian Unit of Constant Value - // - `EGP` - Egyptian Pound - // - `GQE` - Equatorial Guinean Ekwele - // - `ERN` - Eritrean Nakfa - // - `EEK` - Estonian Kroon - // - `ETB` - Ethiopian Birr - // - `EUR` - Euro - // - `XBA` - European Composite Unit - // - `XEU` - European Currency Unit - // - `XBB` - European Monetary Unit - // - `XBC` - European Unit of Account (XBC) - // - `XBD` - European Unit of Account (XBD) - // - `FKP` - Falkland Islands Pound - // - `FJD` - Fijian Dollar - // - `FIM` - Finnish Markka - // - `FRF` - French Franc - // - `XFO` - French Gold Franc - // - `XFU` - French UIC-Franc - // - `GMD` - Gambian Dalasi - // - `GEK` - Georgian Kupon Larit - // - `GEL` - Georgian Lari - // - `DEM` - German Mark - // - `GHS` - Ghanaian Cedi - // - `GHC` - Ghanaian Cedi (1979–2007) - // - `GIP` - Gibraltar Pound - // - `XAU` - Gold - // - `GRD` - Greek Drachma - // - `GTQ` - Guatemalan Quetzal - // - `GWP` - Guinea-Bissau Peso - // - `GNF` - Guinean Franc - // - `GNS` - Guinean Syli - // - `GYD` - Guyanaese Dollar - // - `HTG` - Haitian Gourde - // - `HNL` - Honduran Lempira - // - `HKD` - Hong Kong Dollar - // - `HUF` - Hungarian Forint - // - `IMP` - IMP - // - `ISK` - Icelandic Króna - // - `ISJ` - Icelandic Króna (1918–1981) - // - `INR` - Indian Rupee - // - `IDR` - Indonesian Rupiah - // - `IRR` - Iranian Rial - // - `IQD` - Iraqi Dinar - // - `IEP` - Irish Pound - // - `ILS` - Israeli New Shekel - // - `ILP` - Israeli Pound - // - `ILR` - Israeli Shekel (1980–1985) - // - `ITL` - Italian Lira - // - `JMD` - Jamaican Dollar - // - `JPY` - Japanese Yen - // - `JOD` - Jordanian Dinar - // - `KZT` - Kazakhstani Tenge - // - `KES` - Kenyan Shilling - // - `KWD` - Kuwaiti Dinar - // - `KGS` - Kyrgystani Som - // - `LAK` - Laotian Kip - // - `LVL` - Latvian Lats - // - `LVR` - Latvian Ruble - // - `LBP` - Lebanese Pound - // - `LSL` - Lesotho Loti - // - `LRD` - Liberian Dollar - // - `LYD` - Libyan Dinar - // - `LTL` - Lithuanian Litas - // - `LTT` - Lithuanian Talonas - // - `LUL` - Luxembourg Financial Franc - // - `LUC` - Luxembourgian Convertible Franc - // - `LUF` - Luxembourgian Franc - // - `MOP` - Macanese Pataca - // - `MKD` - Macedonian Denar - // - `MKN` - Macedonian Denar (1992–1993) - // - `MGA` - Malagasy Ariary - // - `MGF` - Malagasy Franc - // - `MWK` - Malawian Kwacha - // - `MYR` - Malaysian Ringgit - // - `MVR` - Maldivian Rufiyaa - // - `MVP` - Maldivian Rupee (1947–1981) - // - `MLF` - Malian Franc - // - `MTL` - Maltese Lira - // - `MTP` - Maltese Pound - // - `MRU` - Mauritanian Ouguiya - // - `MRO` - Mauritanian Ouguiya (1973–2017) - // - `MUR` - Mauritian Rupee - // - `MXV` - Mexican Investment Unit - // - `MXN` - Mexican Peso - // - `MXP` - Mexican Silver Peso (1861–1992) - // - `MDC` - Moldovan Cupon - // - `MDL` - Moldovan Leu - // - `MCF` - Monegasque Franc - // - `MNT` - Mongolian Tugrik - // - `MAD` - Moroccan Dirham - // - `MAF` - Moroccan Franc - // - `MZE` - Mozambican Escudo - // - `MZN` - Mozambican Metical - // - `MZM` - Mozambican Metical (1980–2006) - // - `MMK` - Myanmar Kyat - // - `NAD` - Namibian Dollar - // - `NPR` - Nepalese Rupee - // - `ANG` - Netherlands Antillean Guilder - // - `TWD` - New Taiwan Dollar - // - `NZD` - New Zealand Dollar - // - `NIO` - Nicaraguan Córdoba - // - `NIC` - Nicaraguan Córdoba (1988–1991) - // - `NGN` - Nigerian Naira - // - `KPW` - North Korean Won - // - `NOK` - Norwegian Krone - // - `OMR` - Omani Rial - // - `PKR` - Pakistani Rupee - // - `XPD` - Palladium - // - `PAB` - Panamanian Balboa - // - `PGK` - Papua New Guinean Kina - // - `PYG` - Paraguayan Guarani - // - `PEI` - Peruvian Inti - // - `PEN` - Peruvian Sol - // - `PES` - Peruvian Sol (1863–1965) - // - `PHP` - Philippine Peso - // - `XPT` - Platinum - // - `PLN` - Polish Zloty - // - `PLZ` - Polish Zloty (1950–1995) - // - `PTE` - Portuguese Escudo - // - `GWE` - Portuguese Guinea Escudo - // - `QAR` - Qatari Rial - // - `XRE` - RINET Funds - // - `RHD` - Rhodesian Dollar - // - `RON` - Romanian Leu - // - `ROL` - Romanian Leu (1952–2006) - // - `RUB` - Russian Ruble - // - `RUR` - Russian Ruble (1991–1998) - // - `RWF` - Rwandan Franc - // - `SVC` - Salvadoran Colón - // - `WST` - Samoan Tala - // - `SAR` - Saudi Riyal - // - `RSD` - Serbian Dinar - // - `CSD` - Serbian Dinar (2002–2006) - // - `SCR` - Seychellois Rupee - // - `SLL` - Sierra Leonean Leone - // - `XAG` - Silver - // - `SGD` - Singapore Dollar - // - `SKK` - Slovak Koruna - // - `SIT` - Slovenian Tolar - // - `SBD` - Solomon Islands Dollar - // - `SOS` - Somali Shilling - // - `ZAR` - South African Rand - // - `ZAL` - South African Rand (financial) - // - `KRH` - South Korean Hwan (1953–1962) - // - `KRW` - South Korean Won - // - `KRO` - South Korean Won (1945–1953) - // - `SSP` - South Sudanese Pound - // - `SUR` - Soviet Rouble - // - `ESP` - Spanish Peseta - // - `ESA` - Spanish Peseta (A account) - // - `ESB` - Spanish Peseta (convertible account) - // - `XDR` - Special Drawing Rights - // - `LKR` - Sri Lankan Rupee - // - `SHP` - St. Helena Pound - // - `XSU` - Sucre - // - `SDD` - Sudanese Dinar (1992–2007) - // - `SDG` - Sudanese Pound - // - `SDP` - Sudanese Pound (1957–1998) - // - `SRD` - Surinamese Dollar - // - `SRG` - Surinamese Guilder - // - `SZL` - Swazi Lilangeni - // - `SEK` - Swedish Krona - // - `CHF` - Swiss Franc - // - `SYP` - Syrian Pound - // - `STN` - São Tomé & Príncipe Dobra - // - `STD` - São Tomé & Príncipe Dobra (1977–2017) - // - `TVD` - TVD - // - `TJR` - Tajikistani Ruble - // - `TJS` - Tajikistani Somoni - // - `TZS` - Tanzanian Shilling - // - `XTS` - Testing Currency Code - // - `THB` - Thai Baht - // - `XXX` - The codes assigned for transactions where no currency is involved - // - `TPE` - Timorese Escudo - // - `TOP` - Tongan Paʻanga - // - `TTD` - Trinidad & Tobago Dollar - // - `TND` - Tunisian Dinar - // - `TRY` - Turkish Lira - // - `TRL` - Turkish Lira (1922–2005) - // - `TMT` - Turkmenistani Manat - // - `TMM` - Turkmenistani Manat (1993–2009) - // - `USD` - US Dollar - // - `USN` - US Dollar (Next day) - // - `USS` - US Dollar (Same day) - // - `UGX` - Ugandan Shilling - // - `UGS` - Ugandan Shilling (1966–1987) - // - `UAH` - Ukrainian Hryvnia - // - `UAK` - Ukrainian Karbovanets - // - `AED` - United Arab Emirates Dirham - // - `UYW` - Uruguayan Nominal Wage Index Unit - // - `UYU` - Uruguayan Peso - // - `UYP` - Uruguayan Peso (1975–1993) - // - `UYI` - Uruguayan Peso (Indexed Units) - // - `UZS` - Uzbekistani Som - // - `VUV` - Vanuatu Vatu - // - `VES` - Venezuelan Bolívar - // - `VEB` - Venezuelan Bolívar (1871–2008) - // - `VEF` - Venezuelan Bolívar (2008–2018) - // - `VND` - Vietnamese Dong - // - `VNN` - Vietnamese Dong (1978–1985) - // - `CHE` - WIR Euro - // - `CHW` - WIR Franc - // - `XOF` - West African CFA Franc - // - `YDD` - Yemeni Dinar - // - `YER` - Yemeni Rial - // - `YUN` - Yugoslavian Convertible Dinar (1990–1992) - // - `YUD` - Yugoslavian Hard Dinar (1966–1990) - // - `YUM` - Yugoslavian New Dinar (1994–2002) - // - `YUR` - Yugoslavian Reformed Dinar (1992–1993) - // - `ZWN` - ZWN - // - `ZRN` - Zairean New Zaire (1993–1998) - // - `ZRZ` - Zairean Zaire (1971–1993) - // - `ZMW` - Zambian Kwacha - // - `ZMK` - Zambian Kwacha (1968–2012) - // - `ZWD` - Zimbabwean Dollar (1980–2008) - // - `ZWR` - Zimbabwean Dollar (2008) - // - `ZWL` - Zimbabwean Dollar (2009) - Currency *IncomeStatementCurrency `json:"currency,omitempty"` - // The company the income statement belongs to. - Company *IncomeStatementCompany `json:"company,omitempty"` - // The income statement's start period. - StartPeriod *time.Time `json:"start_period,omitempty"` - // The income statement's end period. - EndPeriod *time.Time `json:"end_period,omitempty"` - Income []*ReportItem `json:"income,omitempty"` - CostOfSales []*ReportItem `json:"cost_of_sales,omitempty"` - // The revenue minus the cost of sale. - GrossProfit *float64 `json:"gross_profit,omitempty"` - OperatingExpenses []*ReportItem `json:"operating_expenses,omitempty"` - // The revenue minus the operating expenses. - NetOperatingIncome *float64 `json:"net_operating_income,omitempty"` - NonOperatingExpenses []*ReportItem `json:"non_operating_expenses,omitempty"` - // The gross profit minus the total expenses. - NetIncome *float64 `json:"net_income,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` - - _rawJSON json.RawMessage -} - -func (i *IncomeStatement) UnmarshalJSON(data []byte) error { - type unmarshaler IncomeStatement - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *i = IncomeStatement(value) - i._rawJSON = json.RawMessage(data) - return nil -} - -func (i *IncomeStatement) String() string { - if len(i._rawJSON) > 0 { - if value, err := core.StringifyJSON(i._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(i); err == nil { - return value - } - return fmt.Sprintf("%#v", i) -} - -// The company the income statement belongs to. -type IncomeStatementCompany struct { - typeName string - String string - CompanyInfo *CompanyInfo -} - -func NewIncomeStatementCompanyFromString(value string) *IncomeStatementCompany { - return &IncomeStatementCompany{typeName: "string", String: value} -} - -func NewIncomeStatementCompanyFromCompanyInfo(value *CompanyInfo) *IncomeStatementCompany { - return &IncomeStatementCompany{typeName: "companyInfo", CompanyInfo: value} -} - -func (i *IncomeStatementCompany) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - i.typeName = "string" - i.String = valueString - return nil - } - valueCompanyInfo := new(CompanyInfo) - if err := json.Unmarshal(data, &valueCompanyInfo); err == nil { - i.typeName = "companyInfo" - i.CompanyInfo = valueCompanyInfo - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, i) -} - -func (i IncomeStatementCompany) MarshalJSON() ([]byte, error) { - switch i.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return json.Marshal(i.String) - case "companyInfo": - return json.Marshal(i.CompanyInfo) - } -} - -type IncomeStatementCompanyVisitor interface { - VisitString(string) error - VisitCompanyInfo(*CompanyInfo) error -} - -func (i *IncomeStatementCompany) Accept(visitor IncomeStatementCompanyVisitor) error { - switch i.typeName { - default: - return fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return visitor.VisitString(i.String) - case "companyInfo": - return visitor.VisitCompanyInfo(i.CompanyInfo) - } -} - -// The income statement's currency. -// -// - `XUA` - ADB Unit of Account -// - `AFN` - Afghan Afghani -// - `AFA` - Afghan Afghani (1927–2002) -// - `ALL` - Albanian Lek -// - `ALK` - Albanian Lek (1946–1965) -// - `DZD` - Algerian Dinar -// - `ADP` - Andorran Peseta -// - `AOA` - Angolan Kwanza -// - `AOK` - Angolan Kwanza (1977–1991) -// - `AON` - Angolan New Kwanza (1990–2000) -// - `AOR` - Angolan Readjusted Kwanza (1995–1999) -// - `ARA` - Argentine Austral -// - `ARS` - Argentine Peso -// - `ARM` - Argentine Peso (1881–1970) -// - `ARP` - Argentine Peso (1983–1985) -// - `ARL` - Argentine Peso Ley (1970–1983) -// - `AMD` - Armenian Dram -// - `AWG` - Aruban Florin -// - `AUD` - Australian Dollar -// - `ATS` - Austrian Schilling -// - `AZN` - Azerbaijani Manat -// - `AZM` - Azerbaijani Manat (1993–2006) -// - `BSD` - Bahamian Dollar -// - `BHD` - Bahraini Dinar -// - `BDT` - Bangladeshi Taka -// - `BBD` - Barbadian Dollar -// - `BYN` - Belarusian Ruble -// - `BYB` - Belarusian Ruble (1994–1999) -// - `BYR` - Belarusian Ruble (2000–2016) -// - `BEF` - Belgian Franc -// - `BEC` - Belgian Franc (convertible) -// - `BEL` - Belgian Franc (financial) -// - `BZD` - Belize Dollar -// - `BMD` - Bermudan Dollar -// - `BTN` - Bhutanese Ngultrum -// - `BOB` - Bolivian Boliviano -// - `BOL` - Bolivian Boliviano (1863–1963) -// - `BOV` - Bolivian Mvdol -// - `BOP` - Bolivian Peso -// - `BAM` - Bosnia-Herzegovina Convertible Mark -// - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) -// - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) -// - `BWP` - Botswanan Pula -// - `BRC` - Brazilian Cruzado (1986–1989) -// - `BRZ` - Brazilian Cruzeiro (1942–1967) -// - `BRE` - Brazilian Cruzeiro (1990–1993) -// - `BRR` - Brazilian Cruzeiro (1993–1994) -// - `BRN` - Brazilian New Cruzado (1989–1990) -// - `BRB` - Brazilian New Cruzeiro (1967–1986) -// - `BRL` - Brazilian Real -// - `GBP` - British Pound -// - `BND` - Brunei Dollar -// - `BGL` - Bulgarian Hard Lev -// - `BGN` - Bulgarian Lev -// - `BGO` - Bulgarian Lev (1879–1952) -// - `BGM` - Bulgarian Socialist Lev -// - `BUK` - Burmese Kyat -// - `BIF` - Burundian Franc -// - `XPF` - CFP Franc -// - `KHR` - Cambodian Riel -// - `CAD` - Canadian Dollar -// - `CVE` - Cape Verdean Escudo -// - `KYD` - Cayman Islands Dollar -// - `XAF` - Central African CFA Franc -// - `CLE` - Chilean Escudo -// - `CLP` - Chilean Peso -// - `CLF` - Chilean Unit of Account (UF) -// - `CNX` - Chinese People’s Bank Dollar -// - `CNY` - Chinese Yuan -// - `CNH` - Chinese Yuan (offshore) -// - `COP` - Colombian Peso -// - `COU` - Colombian Real Value Unit -// - `KMF` - Comorian Franc -// - `CDF` - Congolese Franc -// - `CRC` - Costa Rican Colón -// - `HRD` - Croatian Dinar -// - `HRK` - Croatian Kuna -// - `CUC` - Cuban Convertible Peso -// - `CUP` - Cuban Peso -// - `CYP` - Cypriot Pound -// - `CZK` - Czech Koruna -// - `CSK` - Czechoslovak Hard Koruna -// - `DKK` - Danish Krone -// - `DJF` - Djiboutian Franc -// - `DOP` - Dominican Peso -// - `NLG` - Dutch Guilder -// - `XCD` - East Caribbean Dollar -// - `DDM` - East German Mark -// - `ECS` - Ecuadorian Sucre -// - `ECV` - Ecuadorian Unit of Constant Value -// - `EGP` - Egyptian Pound -// - `GQE` - Equatorial Guinean Ekwele -// - `ERN` - Eritrean Nakfa -// - `EEK` - Estonian Kroon -// - `ETB` - Ethiopian Birr -// - `EUR` - Euro -// - `XBA` - European Composite Unit -// - `XEU` - European Currency Unit -// - `XBB` - European Monetary Unit -// - `XBC` - European Unit of Account (XBC) -// - `XBD` - European Unit of Account (XBD) -// - `FKP` - Falkland Islands Pound -// - `FJD` - Fijian Dollar -// - `FIM` - Finnish Markka -// - `FRF` - French Franc -// - `XFO` - French Gold Franc -// - `XFU` - French UIC-Franc -// - `GMD` - Gambian Dalasi -// - `GEK` - Georgian Kupon Larit -// - `GEL` - Georgian Lari -// - `DEM` - German Mark -// - `GHS` - Ghanaian Cedi -// - `GHC` - Ghanaian Cedi (1979–2007) -// - `GIP` - Gibraltar Pound -// - `XAU` - Gold -// - `GRD` - Greek Drachma -// - `GTQ` - Guatemalan Quetzal -// - `GWP` - Guinea-Bissau Peso -// - `GNF` - Guinean Franc -// - `GNS` - Guinean Syli -// - `GYD` - Guyanaese Dollar -// - `HTG` - Haitian Gourde -// - `HNL` - Honduran Lempira -// - `HKD` - Hong Kong Dollar -// - `HUF` - Hungarian Forint -// - `IMP` - IMP -// - `ISK` - Icelandic Króna -// - `ISJ` - Icelandic Króna (1918–1981) -// - `INR` - Indian Rupee -// - `IDR` - Indonesian Rupiah -// - `IRR` - Iranian Rial -// - `IQD` - Iraqi Dinar -// - `IEP` - Irish Pound -// - `ILS` - Israeli New Shekel -// - `ILP` - Israeli Pound -// - `ILR` - Israeli Shekel (1980–1985) -// - `ITL` - Italian Lira -// - `JMD` - Jamaican Dollar -// - `JPY` - Japanese Yen -// - `JOD` - Jordanian Dinar -// - `KZT` - Kazakhstani Tenge -// - `KES` - Kenyan Shilling -// - `KWD` - Kuwaiti Dinar -// - `KGS` - Kyrgystani Som -// - `LAK` - Laotian Kip -// - `LVL` - Latvian Lats -// - `LVR` - Latvian Ruble -// - `LBP` - Lebanese Pound -// - `LSL` - Lesotho Loti -// - `LRD` - Liberian Dollar -// - `LYD` - Libyan Dinar -// - `LTL` - Lithuanian Litas -// - `LTT` - Lithuanian Talonas -// - `LUL` - Luxembourg Financial Franc -// - `LUC` - Luxembourgian Convertible Franc -// - `LUF` - Luxembourgian Franc -// - `MOP` - Macanese Pataca -// - `MKD` - Macedonian Denar -// - `MKN` - Macedonian Denar (1992–1993) -// - `MGA` - Malagasy Ariary -// - `MGF` - Malagasy Franc -// - `MWK` - Malawian Kwacha -// - `MYR` - Malaysian Ringgit -// - `MVR` - Maldivian Rufiyaa -// - `MVP` - Maldivian Rupee (1947–1981) -// - `MLF` - Malian Franc -// - `MTL` - Maltese Lira -// - `MTP` - Maltese Pound -// - `MRU` - Mauritanian Ouguiya -// - `MRO` - Mauritanian Ouguiya (1973–2017) -// - `MUR` - Mauritian Rupee -// - `MXV` - Mexican Investment Unit -// - `MXN` - Mexican Peso -// - `MXP` - Mexican Silver Peso (1861–1992) -// - `MDC` - Moldovan Cupon -// - `MDL` - Moldovan Leu -// - `MCF` - Monegasque Franc -// - `MNT` - Mongolian Tugrik -// - `MAD` - Moroccan Dirham -// - `MAF` - Moroccan Franc -// - `MZE` - Mozambican Escudo -// - `MZN` - Mozambican Metical -// - `MZM` - Mozambican Metical (1980–2006) -// - `MMK` - Myanmar Kyat -// - `NAD` - Namibian Dollar -// - `NPR` - Nepalese Rupee -// - `ANG` - Netherlands Antillean Guilder -// - `TWD` - New Taiwan Dollar -// - `NZD` - New Zealand Dollar -// - `NIO` - Nicaraguan Córdoba -// - `NIC` - Nicaraguan Córdoba (1988–1991) -// - `NGN` - Nigerian Naira -// - `KPW` - North Korean Won -// - `NOK` - Norwegian Krone -// - `OMR` - Omani Rial -// - `PKR` - Pakistani Rupee -// - `XPD` - Palladium -// - `PAB` - Panamanian Balboa -// - `PGK` - Papua New Guinean Kina -// - `PYG` - Paraguayan Guarani -// - `PEI` - Peruvian Inti -// - `PEN` - Peruvian Sol -// - `PES` - Peruvian Sol (1863–1965) -// - `PHP` - Philippine Peso -// - `XPT` - Platinum -// - `PLN` - Polish Zloty -// - `PLZ` - Polish Zloty (1950–1995) -// - `PTE` - Portuguese Escudo -// - `GWE` - Portuguese Guinea Escudo -// - `QAR` - Qatari Rial -// - `XRE` - RINET Funds -// - `RHD` - Rhodesian Dollar -// - `RON` - Romanian Leu -// - `ROL` - Romanian Leu (1952–2006) -// - `RUB` - Russian Ruble -// - `RUR` - Russian Ruble (1991–1998) -// - `RWF` - Rwandan Franc -// - `SVC` - Salvadoran Colón -// - `WST` - Samoan Tala -// - `SAR` - Saudi Riyal -// - `RSD` - Serbian Dinar -// - `CSD` - Serbian Dinar (2002–2006) -// - `SCR` - Seychellois Rupee -// - `SLL` - Sierra Leonean Leone -// - `XAG` - Silver -// - `SGD` - Singapore Dollar -// - `SKK` - Slovak Koruna -// - `SIT` - Slovenian Tolar -// - `SBD` - Solomon Islands Dollar -// - `SOS` - Somali Shilling -// - `ZAR` - South African Rand -// - `ZAL` - South African Rand (financial) -// - `KRH` - South Korean Hwan (1953–1962) -// - `KRW` - South Korean Won -// - `KRO` - South Korean Won (1945–1953) -// - `SSP` - South Sudanese Pound -// - `SUR` - Soviet Rouble -// - `ESP` - Spanish Peseta -// - `ESA` - Spanish Peseta (A account) -// - `ESB` - Spanish Peseta (convertible account) -// - `XDR` - Special Drawing Rights -// - `LKR` - Sri Lankan Rupee -// - `SHP` - St. Helena Pound -// - `XSU` - Sucre -// - `SDD` - Sudanese Dinar (1992–2007) -// - `SDG` - Sudanese Pound -// - `SDP` - Sudanese Pound (1957–1998) -// - `SRD` - Surinamese Dollar -// - `SRG` - Surinamese Guilder -// - `SZL` - Swazi Lilangeni -// - `SEK` - Swedish Krona -// - `CHF` - Swiss Franc -// - `SYP` - Syrian Pound -// - `STN` - São Tomé & Príncipe Dobra -// - `STD` - São Tomé & Príncipe Dobra (1977–2017) -// - `TVD` - TVD -// - `TJR` - Tajikistani Ruble -// - `TJS` - Tajikistani Somoni -// - `TZS` - Tanzanian Shilling -// - `XTS` - Testing Currency Code -// - `THB` - Thai Baht -// - `XXX` - The codes assigned for transactions where no currency is involved -// - `TPE` - Timorese Escudo -// - `TOP` - Tongan Paʻanga -// - `TTD` - Trinidad & Tobago Dollar -// - `TND` - Tunisian Dinar -// - `TRY` - Turkish Lira -// - `TRL` - Turkish Lira (1922–2005) -// - `TMT` - Turkmenistani Manat -// - `TMM` - Turkmenistani Manat (1993–2009) -// - `USD` - US Dollar -// - `USN` - US Dollar (Next day) -// - `USS` - US Dollar (Same day) -// - `UGX` - Ugandan Shilling -// - `UGS` - Ugandan Shilling (1966–1987) -// - `UAH` - Ukrainian Hryvnia -// - `UAK` - Ukrainian Karbovanets -// - `AED` - United Arab Emirates Dirham -// - `UYW` - Uruguayan Nominal Wage Index Unit -// - `UYU` - Uruguayan Peso -// - `UYP` - Uruguayan Peso (1975–1993) -// - `UYI` - Uruguayan Peso (Indexed Units) -// - `UZS` - Uzbekistani Som -// - `VUV` - Vanuatu Vatu -// - `VES` - Venezuelan Bolívar -// - `VEB` - Venezuelan Bolívar (1871–2008) -// - `VEF` - Venezuelan Bolívar (2008–2018) -// - `VND` - Vietnamese Dong -// - `VNN` - Vietnamese Dong (1978–1985) -// - `CHE` - WIR Euro -// - `CHW` - WIR Franc -// - `XOF` - West African CFA Franc -// - `YDD` - Yemeni Dinar -// - `YER` - Yemeni Rial -// - `YUN` - Yugoslavian Convertible Dinar (1990–1992) -// - `YUD` - Yugoslavian Hard Dinar (1966–1990) -// - `YUM` - Yugoslavian New Dinar (1994–2002) -// - `YUR` - Yugoslavian Reformed Dinar (1992–1993) -// - `ZWN` - ZWN -// - `ZRN` - Zairean New Zaire (1993–1998) -// - `ZRZ` - Zairean Zaire (1971–1993) -// - `ZMW` - Zambian Kwacha -// - `ZMK` - Zambian Kwacha (1968–2012) -// - `ZWD` - Zimbabwean Dollar (1980–2008) -// - `ZWR` - Zimbabwean Dollar (2008) -// - `ZWL` - Zimbabwean Dollar (2009) -type IncomeStatementCurrency struct { - typeName string - TransactionCurrencyEnum TransactionCurrencyEnum - String string -} - -func NewIncomeStatementCurrencyFromTransactionCurrencyEnum(value TransactionCurrencyEnum) *IncomeStatementCurrency { - return &IncomeStatementCurrency{typeName: "transactionCurrencyEnum", TransactionCurrencyEnum: value} -} - -func NewIncomeStatementCurrencyFromString(value string) *IncomeStatementCurrency { - return &IncomeStatementCurrency{typeName: "string", String: value} -} - -func (i *IncomeStatementCurrency) UnmarshalJSON(data []byte) error { - var valueTransactionCurrencyEnum TransactionCurrencyEnum - if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { - i.typeName = "transactionCurrencyEnum" - i.TransactionCurrencyEnum = valueTransactionCurrencyEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - i.typeName = "string" - i.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, i) -} - -func (i IncomeStatementCurrency) MarshalJSON() ([]byte, error) { - switch i.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "transactionCurrencyEnum": - return json.Marshal(i.TransactionCurrencyEnum) - case "string": - return json.Marshal(i.String) - } -} - -type IncomeStatementCurrencyVisitor interface { - VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error - VisitString(string) error -} - -func (i *IncomeStatementCurrency) Accept(visitor IncomeStatementCurrencyVisitor) error { - switch i.typeName { - default: - return fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "transactionCurrencyEnum": - return visitor.VisitTransactionCurrencyEnum(i.TransactionCurrencyEnum) - case "string": - return visitor.VisitString(i.String) - } -} - -type IndividualCommonModelScopeDeserializer struct { - ModelName string `json:"model_name"` - ModelPermissions map[string]*ModelPermissionDeserializer `json:"model_permissions,omitempty"` - FieldPermissions *FieldPermissionDeserializer `json:"field_permissions,omitempty"` - - _rawJSON json.RawMessage -} - -func (i *IndividualCommonModelScopeDeserializer) UnmarshalJSON(data []byte) error { - type unmarshaler IndividualCommonModelScopeDeserializer - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *i = IndividualCommonModelScopeDeserializer(value) - i._rawJSON = json.RawMessage(data) - return nil -} - -func (i *IndividualCommonModelScopeDeserializer) String() string { - if len(i._rawJSON) > 0 { - if value, err := core.StringifyJSON(i._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(i); err == nil { - return value - } - return fmt.Sprintf("%#v", i) -} - -type IndividualCommonModelScopeDeserializerRequest struct { - ModelName string `json:"model_name"` - ModelPermissions map[string]*ModelPermissionDeserializerRequest `json:"model_permissions,omitempty"` - FieldPermissions *FieldPermissionDeserializerRequest `json:"field_permissions,omitempty"` - - _rawJSON json.RawMessage -} - -func (i *IndividualCommonModelScopeDeserializerRequest) UnmarshalJSON(data []byte) error { - type unmarshaler IndividualCommonModelScopeDeserializerRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *i = IndividualCommonModelScopeDeserializerRequest(value) - i._rawJSON = json.RawMessage(data) - return nil -} - -func (i *IndividualCommonModelScopeDeserializerRequest) String() string { - if len(i._rawJSON) > 0 { - if value, err := core.StringifyJSON(i._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(i); err == nil { - return value - } - return fmt.Sprintf("%#v", i) -} - -// # The Invoice Object -// -// ### Description -// -// The `Invoice` object represents an itemized record of goods and/or services sold to a customer or bought from a vendor. -// -// Represents a Bill when the `Invoice` type is `ACCOUNTS_PAYABLE`. References an Invoice when the `Invoice` type is `ACCOUNTS_RECEIVABLE`. -// -// ### Usage Example -// -// Fetch from the `LIST Invoices` endpoint and view a company's invoices. -type Invoice struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // 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. - // - // - `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE - // - `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE - Type *InvoiceType `json:"type,omitempty"` - // The invoice's contact. - Contact *InvoiceContact `json:"contact,omitempty"` - // The invoice's number. - Number *string `json:"number,omitempty"` - // The invoice's issue date. - IssueDate *time.Time `json:"issue_date,omitempty"` - // The invoice's due date. - DueDate *time.Time `json:"due_date,omitempty"` - // The invoice's paid date. - PaidOnDate *time.Time `json:"paid_on_date,omitempty"` - // The invoice's private note. - Memo *string `json:"memo,omitempty"` - // The company the invoice belongs to. - Company *InvoiceCompany `json:"company,omitempty"` - // The employee this overall transaction relates to. - Employee *InvoiceEmployee `json:"employee,omitempty"` - // The invoice's currency. - // - // - `XUA` - ADB Unit of Account - // - `AFN` - Afghan Afghani - // - `AFA` - Afghan Afghani (1927–2002) - // - `ALL` - Albanian Lek - // - `ALK` - Albanian Lek (1946–1965) - // - `DZD` - Algerian Dinar - // - `ADP` - Andorran Peseta - // - `AOA` - Angolan Kwanza - // - `AOK` - Angolan Kwanza (1977–1991) - // - `AON` - Angolan New Kwanza (1990–2000) - // - `AOR` - Angolan Readjusted Kwanza (1995–1999) - // - `ARA` - Argentine Austral - // - `ARS` - Argentine Peso - // - `ARM` - Argentine Peso (1881–1970) - // - `ARP` - Argentine Peso (1983–1985) - // - `ARL` - Argentine Peso Ley (1970–1983) - // - `AMD` - Armenian Dram - // - `AWG` - Aruban Florin - // - `AUD` - Australian Dollar - // - `ATS` - Austrian Schilling - // - `AZN` - Azerbaijani Manat - // - `AZM` - Azerbaijani Manat (1993–2006) - // - `BSD` - Bahamian Dollar - // - `BHD` - Bahraini Dinar - // - `BDT` - Bangladeshi Taka - // - `BBD` - Barbadian Dollar - // - `BYN` - Belarusian Ruble - // - `BYB` - Belarusian Ruble (1994–1999) - // - `BYR` - Belarusian Ruble (2000–2016) - // - `BEF` - Belgian Franc - // - `BEC` - Belgian Franc (convertible) - // - `BEL` - Belgian Franc (financial) - // - `BZD` - Belize Dollar - // - `BMD` - Bermudan Dollar - // - `BTN` - Bhutanese Ngultrum - // - `BOB` - Bolivian Boliviano - // - `BOL` - Bolivian Boliviano (1863–1963) - // - `BOV` - Bolivian Mvdol - // - `BOP` - Bolivian Peso - // - `BAM` - Bosnia-Herzegovina Convertible Mark - // - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - // - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - // - `BWP` - Botswanan Pula - // - `BRC` - Brazilian Cruzado (1986–1989) - // - `BRZ` - Brazilian Cruzeiro (1942–1967) - // - `BRE` - Brazilian Cruzeiro (1990–1993) - // - `BRR` - Brazilian Cruzeiro (1993–1994) - // - `BRN` - Brazilian New Cruzado (1989–1990) - // - `BRB` - Brazilian New Cruzeiro (1967–1986) - // - `BRL` - Brazilian Real - // - `GBP` - British Pound - // - `BND` - Brunei Dollar - // - `BGL` - Bulgarian Hard Lev - // - `BGN` - Bulgarian Lev - // - `BGO` - Bulgarian Lev (1879–1952) - // - `BGM` - Bulgarian Socialist Lev - // - `BUK` - Burmese Kyat - // - `BIF` - Burundian Franc - // - `XPF` - CFP Franc - // - `KHR` - Cambodian Riel - // - `CAD` - Canadian Dollar - // - `CVE` - Cape Verdean Escudo - // - `KYD` - Cayman Islands Dollar - // - `XAF` - Central African CFA Franc - // - `CLE` - Chilean Escudo - // - `CLP` - Chilean Peso - // - `CLF` - Chilean Unit of Account (UF) - // - `CNX` - Chinese People’s Bank Dollar - // - `CNY` - Chinese Yuan - // - `CNH` - Chinese Yuan (offshore) - // - `COP` - Colombian Peso - // - `COU` - Colombian Real Value Unit - // - `KMF` - Comorian Franc - // - `CDF` - Congolese Franc - // - `CRC` - Costa Rican Colón - // - `HRD` - Croatian Dinar - // - `HRK` - Croatian Kuna - // - `CUC` - Cuban Convertible Peso - // - `CUP` - Cuban Peso - // - `CYP` - Cypriot Pound - // - `CZK` - Czech Koruna - // - `CSK` - Czechoslovak Hard Koruna - // - `DKK` - Danish Krone - // - `DJF` - Djiboutian Franc - // - `DOP` - Dominican Peso - // - `NLG` - Dutch Guilder - // - `XCD` - East Caribbean Dollar - // - `DDM` - East German Mark - // - `ECS` - Ecuadorian Sucre - // - `ECV` - Ecuadorian Unit of Constant Value - // - `EGP` - Egyptian Pound - // - `GQE` - Equatorial Guinean Ekwele - // - `ERN` - Eritrean Nakfa - // - `EEK` - Estonian Kroon - // - `ETB` - Ethiopian Birr - // - `EUR` - Euro - // - `XBA` - European Composite Unit - // - `XEU` - European Currency Unit - // - `XBB` - European Monetary Unit - // - `XBC` - European Unit of Account (XBC) - // - `XBD` - European Unit of Account (XBD) - // - `FKP` - Falkland Islands Pound - // - `FJD` - Fijian Dollar - // - `FIM` - Finnish Markka - // - `FRF` - French Franc - // - `XFO` - French Gold Franc - // - `XFU` - French UIC-Franc - // - `GMD` - Gambian Dalasi - // - `GEK` - Georgian Kupon Larit - // - `GEL` - Georgian Lari - // - `DEM` - German Mark - // - `GHS` - Ghanaian Cedi - // - `GHC` - Ghanaian Cedi (1979–2007) - // - `GIP` - Gibraltar Pound - // - `XAU` - Gold - // - `GRD` - Greek Drachma - // - `GTQ` - Guatemalan Quetzal - // - `GWP` - Guinea-Bissau Peso - // - `GNF` - Guinean Franc - // - `GNS` - Guinean Syli - // - `GYD` - Guyanaese Dollar - // - `HTG` - Haitian Gourde - // - `HNL` - Honduran Lempira - // - `HKD` - Hong Kong Dollar - // - `HUF` - Hungarian Forint - // - `IMP` - IMP - // - `ISK` - Icelandic Króna - // - `ISJ` - Icelandic Króna (1918–1981) - // - `INR` - Indian Rupee - // - `IDR` - Indonesian Rupiah - // - `IRR` - Iranian Rial - // - `IQD` - Iraqi Dinar - // - `IEP` - Irish Pound - // - `ILS` - Israeli New Shekel - // - `ILP` - Israeli Pound - // - `ILR` - Israeli Shekel (1980–1985) - // - `ITL` - Italian Lira - // - `JMD` - Jamaican Dollar - // - `JPY` - Japanese Yen - // - `JOD` - Jordanian Dinar - // - `KZT` - Kazakhstani Tenge - // - `KES` - Kenyan Shilling - // - `KWD` - Kuwaiti Dinar - // - `KGS` - Kyrgystani Som - // - `LAK` - Laotian Kip - // - `LVL` - Latvian Lats - // - `LVR` - Latvian Ruble - // - `LBP` - Lebanese Pound - // - `LSL` - Lesotho Loti - // - `LRD` - Liberian Dollar - // - `LYD` - Libyan Dinar - // - `LTL` - Lithuanian Litas - // - `LTT` - Lithuanian Talonas - // - `LUL` - Luxembourg Financial Franc - // - `LUC` - Luxembourgian Convertible Franc - // - `LUF` - Luxembourgian Franc - // - `MOP` - Macanese Pataca - // - `MKD` - Macedonian Denar - // - `MKN` - Macedonian Denar (1992–1993) - // - `MGA` - Malagasy Ariary - // - `MGF` - Malagasy Franc - // - `MWK` - Malawian Kwacha - // - `MYR` - Malaysian Ringgit - // - `MVR` - Maldivian Rufiyaa - // - `MVP` - Maldivian Rupee (1947–1981) - // - `MLF` - Malian Franc - // - `MTL` - Maltese Lira - // - `MTP` - Maltese Pound - // - `MRU` - Mauritanian Ouguiya - // - `MRO` - Mauritanian Ouguiya (1973–2017) - // - `MUR` - Mauritian Rupee - // - `MXV` - Mexican Investment Unit - // - `MXN` - Mexican Peso - // - `MXP` - Mexican Silver Peso (1861–1992) - // - `MDC` - Moldovan Cupon - // - `MDL` - Moldovan Leu - // - `MCF` - Monegasque Franc - // - `MNT` - Mongolian Tugrik - // - `MAD` - Moroccan Dirham - // - `MAF` - Moroccan Franc - // - `MZE` - Mozambican Escudo - // - `MZN` - Mozambican Metical - // - `MZM` - Mozambican Metical (1980–2006) - // - `MMK` - Myanmar Kyat - // - `NAD` - Namibian Dollar - // - `NPR` - Nepalese Rupee - // - `ANG` - Netherlands Antillean Guilder - // - `TWD` - New Taiwan Dollar - // - `NZD` - New Zealand Dollar - // - `NIO` - Nicaraguan Córdoba - // - `NIC` - Nicaraguan Córdoba (1988–1991) - // - `NGN` - Nigerian Naira - // - `KPW` - North Korean Won - // - `NOK` - Norwegian Krone - // - `OMR` - Omani Rial - // - `PKR` - Pakistani Rupee - // - `XPD` - Palladium - // - `PAB` - Panamanian Balboa - // - `PGK` - Papua New Guinean Kina - // - `PYG` - Paraguayan Guarani - // - `PEI` - Peruvian Inti - // - `PEN` - Peruvian Sol - // - `PES` - Peruvian Sol (1863–1965) - // - `PHP` - Philippine Peso - // - `XPT` - Platinum - // - `PLN` - Polish Zloty - // - `PLZ` - Polish Zloty (1950–1995) - // - `PTE` - Portuguese Escudo - // - `GWE` - Portuguese Guinea Escudo - // - `QAR` - Qatari Rial - // - `XRE` - RINET Funds - // - `RHD` - Rhodesian Dollar - // - `RON` - Romanian Leu - // - `ROL` - Romanian Leu (1952–2006) - // - `RUB` - Russian Ruble - // - `RUR` - Russian Ruble (1991–1998) - // - `RWF` - Rwandan Franc - // - `SVC` - Salvadoran Colón - // - `WST` - Samoan Tala - // - `SAR` - Saudi Riyal - // - `RSD` - Serbian Dinar - // - `CSD` - Serbian Dinar (2002–2006) - // - `SCR` - Seychellois Rupee - // - `SLL` - Sierra Leonean Leone - // - `XAG` - Silver - // - `SGD` - Singapore Dollar - // - `SKK` - Slovak Koruna - // - `SIT` - Slovenian Tolar - // - `SBD` - Solomon Islands Dollar - // - `SOS` - Somali Shilling - // - `ZAR` - South African Rand - // - `ZAL` - South African Rand (financial) - // - `KRH` - South Korean Hwan (1953–1962) - // - `KRW` - South Korean Won - // - `KRO` - South Korean Won (1945–1953) - // - `SSP` - South Sudanese Pound - // - `SUR` - Soviet Rouble - // - `ESP` - Spanish Peseta - // - `ESA` - Spanish Peseta (A account) - // - `ESB` - Spanish Peseta (convertible account) - // - `XDR` - Special Drawing Rights - // - `LKR` - Sri Lankan Rupee - // - `SHP` - St. Helena Pound - // - `XSU` - Sucre - // - `SDD` - Sudanese Dinar (1992–2007) - // - `SDG` - Sudanese Pound - // - `SDP` - Sudanese Pound (1957–1998) - // - `SRD` - Surinamese Dollar - // - `SRG` - Surinamese Guilder - // - `SZL` - Swazi Lilangeni - // - `SEK` - Swedish Krona - // - `CHF` - Swiss Franc - // - `SYP` - Syrian Pound - // - `STN` - São Tomé & Príncipe Dobra - // - `STD` - São Tomé & Príncipe Dobra (1977–2017) - // - `TVD` - TVD - // - `TJR` - Tajikistani Ruble - // - `TJS` - Tajikistani Somoni - // - `TZS` - Tanzanian Shilling - // - `XTS` - Testing Currency Code - // - `THB` - Thai Baht - // - `XXX` - The codes assigned for transactions where no currency is involved - // - `TPE` - Timorese Escudo - // - `TOP` - Tongan Paʻanga - // - `TTD` - Trinidad & Tobago Dollar - // - `TND` - Tunisian Dinar - // - `TRY` - Turkish Lira - // - `TRL` - Turkish Lira (1922–2005) - // - `TMT` - Turkmenistani Manat - // - `TMM` - Turkmenistani Manat (1993–2009) - // - `USD` - US Dollar - // - `USN` - US Dollar (Next day) - // - `USS` - US Dollar (Same day) - // - `UGX` - Ugandan Shilling - // - `UGS` - Ugandan Shilling (1966–1987) - // - `UAH` - Ukrainian Hryvnia - // - `UAK` - Ukrainian Karbovanets - // - `AED` - United Arab Emirates Dirham - // - `UYW` - Uruguayan Nominal Wage Index Unit - // - `UYU` - Uruguayan Peso - // - `UYP` - Uruguayan Peso (1975–1993) - // - `UYI` - Uruguayan Peso (Indexed Units) - // - `UZS` - Uzbekistani Som - // - `VUV` - Vanuatu Vatu - // - `VES` - Venezuelan Bolívar - // - `VEB` - Venezuelan Bolívar (1871–2008) - // - `VEF` - Venezuelan Bolívar (2008–2018) - // - `VND` - Vietnamese Dong - // - `VNN` - Vietnamese Dong (1978–1985) - // - `CHE` - WIR Euro - // - `CHW` - WIR Franc - // - `XOF` - West African CFA Franc - // - `YDD` - Yemeni Dinar - // - `YER` - Yemeni Rial - // - `YUN` - Yugoslavian Convertible Dinar (1990–1992) - // - `YUD` - Yugoslavian Hard Dinar (1966–1990) - // - `YUM` - Yugoslavian New Dinar (1994–2002) - // - `YUR` - Yugoslavian Reformed Dinar (1992–1993) - // - `ZWN` - ZWN - // - `ZRN` - Zairean New Zaire (1993–1998) - // - `ZRZ` - Zairean Zaire (1971–1993) - // - `ZMW` - Zambian Kwacha - // - `ZMK` - Zambian Kwacha (1968–2012) - // - `ZWD` - Zimbabwean Dollar (1980–2008) - // - `ZWR` - Zimbabwean Dollar (2008) - // - `ZWL` - Zimbabwean Dollar (2009) - Currency *InvoiceCurrency `json:"currency,omitempty"` - // The invoice's exchange rate. - ExchangeRate *string `json:"exchange_rate,omitempty"` - // The total discounts applied to the total cost. - TotalDiscount *float64 `json:"total_discount,omitempty"` - // The total amount being paid before taxes. - SubTotal *float64 `json:"sub_total,omitempty"` - // The status of the invoice. - // - // - `PAID` - PAID - // - `DRAFT` - DRAFT - // - `SUBMITTED` - SUBMITTED - // - `PARTIALLY_PAID` - PARTIALLY_PAID - // - `OPEN` - OPEN - // - `VOID` - VOID - Status *InvoiceStatus `json:"status,omitempty"` - // The total amount being paid in taxes. - TotalTaxAmount *float64 `json:"total_tax_amount,omitempty"` - // The invoice's total amount. - TotalAmount *float64 `json:"total_amount,omitempty"` - // The invoice's remaining balance. - Balance *float64 `json:"balance,omitempty"` - // When the third party's invoice entry was updated. - RemoteUpdatedAt *time.Time `json:"remote_updated_at,omitempty"` - TrackingCategories []*InvoiceTrackingCategoriesItem `json:"tracking_categories,omitempty"` - // The accounting period that the Invoice was generated in. - AccountingPeriod *InvoiceAccountingPeriod `json:"accounting_period,omitempty"` - PurchaseOrders []*InvoicePurchaseOrdersItem `json:"purchase_orders,omitempty"` - // Array of `Payment` object IDs. - Payments []*InvoicePaymentsItem `json:"payments,omitempty"` - // A list of the Payment Applied to Lines common models related to a given Invoice, Credit Note, or Journal Entry. - AppliedPayments []*InvoiceAppliedPaymentsItem `json:"applied_payments,omitempty"` - LineItems []*InvoiceLineItem `json:"line_items,omitempty"` - // `CreditNoteApplyLines` applied to the Invoice. - AppliedCreditNotes []*InvoiceAppliedCreditNotesItem `json:"applied_credit_notes,omitempty"` - // `VendorCreditApplyLines` applied to the Invoice. - AppliedVendorCredits []*InvoiceAppliedVendorCreditsItem `json:"applied_vendor_credits,omitempty"` - // If the transaction is inclusive or exclusive of tax. `True` if inclusive, `False` if exclusive. - InclusiveOfTax *bool `json:"inclusive_of_tax,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` - RemoteFields []*RemoteField `json:"remote_fields,omitempty"` - - _rawJSON json.RawMessage -} - -func (i *Invoice) UnmarshalJSON(data []byte) error { - type unmarshaler Invoice - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *i = Invoice(value) - i._rawJSON = json.RawMessage(data) - return nil -} - -func (i *Invoice) String() string { - if len(i._rawJSON) > 0 { - if value, err := core.StringifyJSON(i._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(i); err == nil { - return value - } - return fmt.Sprintf("%#v", i) -} - -// The accounting period that the Invoice was generated in. -type InvoiceAccountingPeriod struct { - typeName string - String string - AccountingPeriod *AccountingPeriod -} - -func NewInvoiceAccountingPeriodFromString(value string) *InvoiceAccountingPeriod { - return &InvoiceAccountingPeriod{typeName: "string", String: value} -} - -func NewInvoiceAccountingPeriodFromAccountingPeriod(value *AccountingPeriod) *InvoiceAccountingPeriod { - return &InvoiceAccountingPeriod{typeName: "accountingPeriod", AccountingPeriod: value} -} - -func (i *InvoiceAccountingPeriod) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - i.typeName = "string" - i.String = valueString - return nil - } - valueAccountingPeriod := new(AccountingPeriod) - if err := json.Unmarshal(data, &valueAccountingPeriod); err == nil { - i.typeName = "accountingPeriod" - i.AccountingPeriod = valueAccountingPeriod - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, i) -} - -func (i InvoiceAccountingPeriod) MarshalJSON() ([]byte, error) { - switch i.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return json.Marshal(i.String) - case "accountingPeriod": - return json.Marshal(i.AccountingPeriod) - } -} - -type InvoiceAccountingPeriodVisitor interface { - VisitString(string) error - VisitAccountingPeriod(*AccountingPeriod) error -} + CountryEnumAf CountryEnum = "AF" + CountryEnumAx CountryEnum = "AX" + CountryEnumAl CountryEnum = "AL" + CountryEnumDz CountryEnum = "DZ" + CountryEnumAs CountryEnum = "AS" + CountryEnumAd CountryEnum = "AD" + CountryEnumAo CountryEnum = "AO" + CountryEnumAi CountryEnum = "AI" + CountryEnumAq CountryEnum = "AQ" + CountryEnumAg CountryEnum = "AG" + CountryEnumAr CountryEnum = "AR" + CountryEnumAm CountryEnum = "AM" + CountryEnumAw CountryEnum = "AW" + CountryEnumAu CountryEnum = "AU" + CountryEnumAt CountryEnum = "AT" + CountryEnumAz CountryEnum = "AZ" + CountryEnumBs CountryEnum = "BS" + CountryEnumBh CountryEnum = "BH" + CountryEnumBd CountryEnum = "BD" + CountryEnumBb CountryEnum = "BB" + CountryEnumBy CountryEnum = "BY" + CountryEnumBe CountryEnum = "BE" + CountryEnumBz CountryEnum = "BZ" + CountryEnumBj CountryEnum = "BJ" + CountryEnumBm CountryEnum = "BM" + CountryEnumBt CountryEnum = "BT" + CountryEnumBo CountryEnum = "BO" + CountryEnumBq CountryEnum = "BQ" + CountryEnumBa CountryEnum = "BA" + CountryEnumBw CountryEnum = "BW" + CountryEnumBv CountryEnum = "BV" + CountryEnumBr CountryEnum = "BR" + CountryEnumIo CountryEnum = "IO" + CountryEnumBn CountryEnum = "BN" + CountryEnumBg CountryEnum = "BG" + CountryEnumBf CountryEnum = "BF" + CountryEnumBi CountryEnum = "BI" + CountryEnumCv CountryEnum = "CV" + CountryEnumKh CountryEnum = "KH" + CountryEnumCm CountryEnum = "CM" + CountryEnumCa CountryEnum = "CA" + CountryEnumKy CountryEnum = "KY" + CountryEnumCf CountryEnum = "CF" + CountryEnumTd CountryEnum = "TD" + CountryEnumCl CountryEnum = "CL" + CountryEnumCn CountryEnum = "CN" + CountryEnumCx CountryEnum = "CX" + CountryEnumCc CountryEnum = "CC" + CountryEnumCo CountryEnum = "CO" + CountryEnumKm CountryEnum = "KM" + CountryEnumCg CountryEnum = "CG" + CountryEnumCd CountryEnum = "CD" + CountryEnumCk CountryEnum = "CK" + CountryEnumCr CountryEnum = "CR" + CountryEnumCi CountryEnum = "CI" + CountryEnumHr CountryEnum = "HR" + CountryEnumCu CountryEnum = "CU" + CountryEnumCw CountryEnum = "CW" + CountryEnumCy CountryEnum = "CY" + CountryEnumCz CountryEnum = "CZ" + CountryEnumDk CountryEnum = "DK" + CountryEnumDj CountryEnum = "DJ" + CountryEnumDm CountryEnum = "DM" + CountryEnumDo CountryEnum = "DO" + CountryEnumEc CountryEnum = "EC" + CountryEnumEg CountryEnum = "EG" + CountryEnumSv CountryEnum = "SV" + CountryEnumGq CountryEnum = "GQ" + CountryEnumEr CountryEnum = "ER" + CountryEnumEe CountryEnum = "EE" + CountryEnumSz CountryEnum = "SZ" + CountryEnumEt CountryEnum = "ET" + CountryEnumFk CountryEnum = "FK" + CountryEnumFo CountryEnum = "FO" + CountryEnumFj CountryEnum = "FJ" + CountryEnumFi CountryEnum = "FI" + CountryEnumFr CountryEnum = "FR" + CountryEnumGf CountryEnum = "GF" + CountryEnumPf CountryEnum = "PF" + CountryEnumTf CountryEnum = "TF" + CountryEnumGa CountryEnum = "GA" + CountryEnumGm CountryEnum = "GM" + CountryEnumGe CountryEnum = "GE" + CountryEnumDe CountryEnum = "DE" + CountryEnumGh CountryEnum = "GH" + CountryEnumGi CountryEnum = "GI" + CountryEnumGr CountryEnum = "GR" + CountryEnumGl CountryEnum = "GL" + CountryEnumGd CountryEnum = "GD" + CountryEnumGp CountryEnum = "GP" + CountryEnumGu CountryEnum = "GU" + CountryEnumGt CountryEnum = "GT" + CountryEnumGg CountryEnum = "GG" + CountryEnumGn CountryEnum = "GN" + CountryEnumGw CountryEnum = "GW" + CountryEnumGy CountryEnum = "GY" + CountryEnumHt CountryEnum = "HT" + CountryEnumHm CountryEnum = "HM" + CountryEnumVa CountryEnum = "VA" + CountryEnumHn CountryEnum = "HN" + CountryEnumHk CountryEnum = "HK" + CountryEnumHu CountryEnum = "HU" + CountryEnumIs CountryEnum = "IS" + CountryEnumIn CountryEnum = "IN" + CountryEnumId CountryEnum = "ID" + CountryEnumIr CountryEnum = "IR" + CountryEnumIq CountryEnum = "IQ" + CountryEnumIe CountryEnum = "IE" + CountryEnumIm CountryEnum = "IM" + CountryEnumIl CountryEnum = "IL" + CountryEnumIt CountryEnum = "IT" + CountryEnumJm CountryEnum = "JM" + CountryEnumJp CountryEnum = "JP" + CountryEnumJe CountryEnum = "JE" + CountryEnumJo CountryEnum = "JO" + CountryEnumKz CountryEnum = "KZ" + CountryEnumKe CountryEnum = "KE" + CountryEnumKi CountryEnum = "KI" + CountryEnumKw CountryEnum = "KW" + CountryEnumKg CountryEnum = "KG" + CountryEnumLa CountryEnum = "LA" + CountryEnumLv CountryEnum = "LV" + CountryEnumLb CountryEnum = "LB" + CountryEnumLs CountryEnum = "LS" + CountryEnumLr CountryEnum = "LR" + CountryEnumLy CountryEnum = "LY" + CountryEnumLi CountryEnum = "LI" + CountryEnumLt CountryEnum = "LT" + CountryEnumLu CountryEnum = "LU" + CountryEnumMo CountryEnum = "MO" + CountryEnumMg CountryEnum = "MG" + CountryEnumMw CountryEnum = "MW" + CountryEnumMy CountryEnum = "MY" + CountryEnumMv CountryEnum = "MV" + CountryEnumMl CountryEnum = "ML" + CountryEnumMt CountryEnum = "MT" + CountryEnumMh CountryEnum = "MH" + CountryEnumMq CountryEnum = "MQ" + CountryEnumMr CountryEnum = "MR" + CountryEnumMu CountryEnum = "MU" + CountryEnumYt CountryEnum = "YT" + CountryEnumMx CountryEnum = "MX" + CountryEnumFm CountryEnum = "FM" + CountryEnumMd CountryEnum = "MD" + CountryEnumMc CountryEnum = "MC" + CountryEnumMn CountryEnum = "MN" + CountryEnumMe CountryEnum = "ME" + CountryEnumMs CountryEnum = "MS" + CountryEnumMa CountryEnum = "MA" + CountryEnumMz CountryEnum = "MZ" + CountryEnumMm CountryEnum = "MM" + CountryEnumNa CountryEnum = "NA" + CountryEnumNr CountryEnum = "NR" + CountryEnumNp CountryEnum = "NP" + CountryEnumNl CountryEnum = "NL" + CountryEnumNc CountryEnum = "NC" + CountryEnumNz CountryEnum = "NZ" + CountryEnumNi CountryEnum = "NI" + CountryEnumNe CountryEnum = "NE" + CountryEnumNg CountryEnum = "NG" + CountryEnumNu CountryEnum = "NU" + CountryEnumNf CountryEnum = "NF" + CountryEnumKp CountryEnum = "KP" + CountryEnumMk CountryEnum = "MK" + CountryEnumMp CountryEnum = "MP" + CountryEnumNo CountryEnum = "NO" + CountryEnumOm CountryEnum = "OM" + CountryEnumPk CountryEnum = "PK" + CountryEnumPw CountryEnum = "PW" + CountryEnumPs CountryEnum = "PS" + CountryEnumPa CountryEnum = "PA" + CountryEnumPg CountryEnum = "PG" + CountryEnumPy CountryEnum = "PY" + CountryEnumPe CountryEnum = "PE" + CountryEnumPh CountryEnum = "PH" + CountryEnumPn CountryEnum = "PN" + CountryEnumPl CountryEnum = "PL" + CountryEnumPt CountryEnum = "PT" + CountryEnumPr CountryEnum = "PR" + CountryEnumQa CountryEnum = "QA" + CountryEnumRe CountryEnum = "RE" + CountryEnumRo CountryEnum = "RO" + CountryEnumRu CountryEnum = "RU" + CountryEnumRw CountryEnum = "RW" + CountryEnumBl CountryEnum = "BL" + CountryEnumSh CountryEnum = "SH" + CountryEnumKn CountryEnum = "KN" + CountryEnumLc CountryEnum = "LC" + CountryEnumMf CountryEnum = "MF" + CountryEnumPm CountryEnum = "PM" + CountryEnumVc CountryEnum = "VC" + CountryEnumWs CountryEnum = "WS" + CountryEnumSm CountryEnum = "SM" + CountryEnumSt CountryEnum = "ST" + CountryEnumSa CountryEnum = "SA" + CountryEnumSn CountryEnum = "SN" + CountryEnumRs CountryEnum = "RS" + CountryEnumSc CountryEnum = "SC" + CountryEnumSl CountryEnum = "SL" + CountryEnumSg CountryEnum = "SG" + CountryEnumSx CountryEnum = "SX" + CountryEnumSk CountryEnum = "SK" + CountryEnumSi CountryEnum = "SI" + CountryEnumSb CountryEnum = "SB" + CountryEnumSo CountryEnum = "SO" + CountryEnumZa CountryEnum = "ZA" + CountryEnumGs CountryEnum = "GS" + CountryEnumKr CountryEnum = "KR" + CountryEnumSs CountryEnum = "SS" + CountryEnumEs CountryEnum = "ES" + CountryEnumLk CountryEnum = "LK" + CountryEnumSd CountryEnum = "SD" + CountryEnumSr CountryEnum = "SR" + CountryEnumSj CountryEnum = "SJ" + CountryEnumSe CountryEnum = "SE" + CountryEnumCh CountryEnum = "CH" + CountryEnumSy CountryEnum = "SY" + CountryEnumTw CountryEnum = "TW" + CountryEnumTj CountryEnum = "TJ" + CountryEnumTz CountryEnum = "TZ" + CountryEnumTh CountryEnum = "TH" + CountryEnumTl CountryEnum = "TL" + CountryEnumTg CountryEnum = "TG" + CountryEnumTk CountryEnum = "TK" + CountryEnumTo CountryEnum = "TO" + CountryEnumTt CountryEnum = "TT" + CountryEnumTn CountryEnum = "TN" + CountryEnumTr CountryEnum = "TR" + CountryEnumTm CountryEnum = "TM" + CountryEnumTc CountryEnum = "TC" + CountryEnumTv CountryEnum = "TV" + CountryEnumUg CountryEnum = "UG" + CountryEnumUa CountryEnum = "UA" + CountryEnumAe CountryEnum = "AE" + CountryEnumGb CountryEnum = "GB" + CountryEnumUm CountryEnum = "UM" + CountryEnumUs CountryEnum = "US" + CountryEnumUy CountryEnum = "UY" + CountryEnumUz CountryEnum = "UZ" + CountryEnumVu CountryEnum = "VU" + CountryEnumVe CountryEnum = "VE" + CountryEnumVn CountryEnum = "VN" + CountryEnumVg CountryEnum = "VG" + CountryEnumVi CountryEnum = "VI" + CountryEnumWf CountryEnum = "WF" + CountryEnumEh CountryEnum = "EH" + CountryEnumYe CountryEnum = "YE" + CountryEnumZm CountryEnum = "ZM" + CountryEnumZw CountryEnum = "ZW" +) -func (i *InvoiceAccountingPeriod) Accept(visitor InvoiceAccountingPeriodVisitor) error { - switch i.typeName { - default: - return fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return visitor.VisitString(i.String) - case "accountingPeriod": - return visitor.VisitAccountingPeriod(i.AccountingPeriod) +func NewCountryEnumFromString(s string) (CountryEnum, error) { + switch s { + case "AF": + return CountryEnumAf, nil + case "AX": + return CountryEnumAx, nil + case "AL": + return CountryEnumAl, nil + case "DZ": + return CountryEnumDz, nil + case "AS": + return CountryEnumAs, nil + case "AD": + return CountryEnumAd, nil + case "AO": + return CountryEnumAo, nil + case "AI": + return CountryEnumAi, nil + case "AQ": + return CountryEnumAq, nil + case "AG": + return CountryEnumAg, nil + case "AR": + return CountryEnumAr, nil + case "AM": + return CountryEnumAm, nil + case "AW": + return CountryEnumAw, nil + case "AU": + return CountryEnumAu, nil + case "AT": + return CountryEnumAt, nil + case "AZ": + return CountryEnumAz, nil + case "BS": + return CountryEnumBs, nil + case "BH": + return CountryEnumBh, nil + case "BD": + return CountryEnumBd, nil + case "BB": + return CountryEnumBb, nil + case "BY": + return CountryEnumBy, nil + case "BE": + return CountryEnumBe, nil + case "BZ": + return CountryEnumBz, nil + case "BJ": + return CountryEnumBj, nil + case "BM": + return CountryEnumBm, nil + case "BT": + return CountryEnumBt, nil + case "BO": + return CountryEnumBo, nil + case "BQ": + return CountryEnumBq, nil + case "BA": + return CountryEnumBa, nil + case "BW": + return CountryEnumBw, nil + case "BV": + return CountryEnumBv, nil + case "BR": + return CountryEnumBr, nil + case "IO": + return CountryEnumIo, nil + case "BN": + return CountryEnumBn, nil + case "BG": + return CountryEnumBg, nil + case "BF": + return CountryEnumBf, nil + case "BI": + return CountryEnumBi, nil + case "CV": + return CountryEnumCv, nil + case "KH": + return CountryEnumKh, nil + case "CM": + return CountryEnumCm, nil + case "CA": + return CountryEnumCa, nil + case "KY": + return CountryEnumKy, nil + case "CF": + return CountryEnumCf, nil + case "TD": + return CountryEnumTd, nil + case "CL": + return CountryEnumCl, nil + case "CN": + return CountryEnumCn, nil + case "CX": + return CountryEnumCx, nil + case "CC": + return CountryEnumCc, nil + case "CO": + return CountryEnumCo, nil + case "KM": + return CountryEnumKm, nil + case "CG": + return CountryEnumCg, nil + case "CD": + return CountryEnumCd, nil + case "CK": + return CountryEnumCk, nil + case "CR": + return CountryEnumCr, nil + case "CI": + return CountryEnumCi, nil + case "HR": + return CountryEnumHr, nil + case "CU": + return CountryEnumCu, nil + case "CW": + return CountryEnumCw, nil + case "CY": + return CountryEnumCy, nil + case "CZ": + return CountryEnumCz, nil + case "DK": + return CountryEnumDk, nil + case "DJ": + return CountryEnumDj, nil + case "DM": + return CountryEnumDm, nil + case "DO": + return CountryEnumDo, nil + case "EC": + return CountryEnumEc, nil + case "EG": + return CountryEnumEg, nil + case "SV": + return CountryEnumSv, nil + case "GQ": + return CountryEnumGq, nil + case "ER": + return CountryEnumEr, nil + case "EE": + return CountryEnumEe, nil + case "SZ": + return CountryEnumSz, nil + case "ET": + return CountryEnumEt, nil + case "FK": + return CountryEnumFk, nil + case "FO": + return CountryEnumFo, nil + case "FJ": + return CountryEnumFj, nil + case "FI": + return CountryEnumFi, nil + case "FR": + return CountryEnumFr, nil + case "GF": + return CountryEnumGf, nil + case "PF": + return CountryEnumPf, nil + case "TF": + return CountryEnumTf, nil + case "GA": + return CountryEnumGa, nil + case "GM": + return CountryEnumGm, nil + case "GE": + return CountryEnumGe, nil + case "DE": + return CountryEnumDe, nil + case "GH": + return CountryEnumGh, nil + case "GI": + return CountryEnumGi, nil + case "GR": + return CountryEnumGr, nil + case "GL": + return CountryEnumGl, nil + case "GD": + return CountryEnumGd, nil + case "GP": + return CountryEnumGp, nil + case "GU": + return CountryEnumGu, nil + case "GT": + return CountryEnumGt, nil + case "GG": + return CountryEnumGg, nil + case "GN": + return CountryEnumGn, nil + case "GW": + return CountryEnumGw, nil + case "GY": + return CountryEnumGy, nil + case "HT": + return CountryEnumHt, nil + case "HM": + return CountryEnumHm, nil + case "VA": + return CountryEnumVa, nil + case "HN": + return CountryEnumHn, nil + case "HK": + return CountryEnumHk, nil + case "HU": + return CountryEnumHu, nil + case "IS": + return CountryEnumIs, nil + case "IN": + return CountryEnumIn, nil + case "ID": + return CountryEnumId, nil + case "IR": + return CountryEnumIr, nil + case "IQ": + return CountryEnumIq, nil + case "IE": + return CountryEnumIe, nil + case "IM": + return CountryEnumIm, nil + case "IL": + return CountryEnumIl, nil + case "IT": + return CountryEnumIt, nil + case "JM": + return CountryEnumJm, nil + case "JP": + return CountryEnumJp, nil + case "JE": + return CountryEnumJe, nil + case "JO": + return CountryEnumJo, nil + case "KZ": + return CountryEnumKz, nil + case "KE": + return CountryEnumKe, nil + case "KI": + return CountryEnumKi, nil + case "KW": + return CountryEnumKw, nil + case "KG": + return CountryEnumKg, nil + case "LA": + return CountryEnumLa, nil + case "LV": + return CountryEnumLv, nil + case "LB": + return CountryEnumLb, nil + case "LS": + return CountryEnumLs, nil + case "LR": + return CountryEnumLr, nil + case "LY": + return CountryEnumLy, nil + case "LI": + return CountryEnumLi, nil + case "LT": + return CountryEnumLt, nil + case "LU": + return CountryEnumLu, nil + case "MO": + return CountryEnumMo, nil + case "MG": + return CountryEnumMg, nil + case "MW": + return CountryEnumMw, nil + case "MY": + return CountryEnumMy, nil + case "MV": + return CountryEnumMv, nil + case "ML": + return CountryEnumMl, nil + case "MT": + return CountryEnumMt, nil + case "MH": + return CountryEnumMh, nil + case "MQ": + return CountryEnumMq, nil + case "MR": + return CountryEnumMr, nil + case "MU": + return CountryEnumMu, nil + case "YT": + return CountryEnumYt, nil + case "MX": + return CountryEnumMx, nil + case "FM": + return CountryEnumFm, nil + case "MD": + return CountryEnumMd, nil + case "MC": + return CountryEnumMc, nil + case "MN": + return CountryEnumMn, nil + case "ME": + return CountryEnumMe, nil + case "MS": + return CountryEnumMs, nil + case "MA": + return CountryEnumMa, nil + case "MZ": + return CountryEnumMz, nil + case "MM": + return CountryEnumMm, nil + case "NA": + return CountryEnumNa, nil + case "NR": + return CountryEnumNr, nil + case "NP": + return CountryEnumNp, nil + case "NL": + return CountryEnumNl, nil + case "NC": + return CountryEnumNc, nil + case "NZ": + return CountryEnumNz, nil + case "NI": + return CountryEnumNi, nil + case "NE": + return CountryEnumNe, nil + case "NG": + return CountryEnumNg, nil + case "NU": + return CountryEnumNu, nil + case "NF": + return CountryEnumNf, nil + case "KP": + return CountryEnumKp, nil + case "MK": + return CountryEnumMk, nil + case "MP": + return CountryEnumMp, nil + case "NO": + return CountryEnumNo, nil + case "OM": + return CountryEnumOm, nil + case "PK": + return CountryEnumPk, nil + case "PW": + return CountryEnumPw, nil + case "PS": + return CountryEnumPs, nil + case "PA": + return CountryEnumPa, nil + case "PG": + return CountryEnumPg, nil + case "PY": + return CountryEnumPy, nil + case "PE": + return CountryEnumPe, nil + case "PH": + return CountryEnumPh, nil + case "PN": + return CountryEnumPn, nil + case "PL": + return CountryEnumPl, nil + case "PT": + return CountryEnumPt, nil + case "PR": + return CountryEnumPr, nil + case "QA": + return CountryEnumQa, nil + case "RE": + return CountryEnumRe, nil + case "RO": + return CountryEnumRo, nil + case "RU": + return CountryEnumRu, nil + case "RW": + return CountryEnumRw, nil + case "BL": + return CountryEnumBl, nil + case "SH": + return CountryEnumSh, nil + case "KN": + return CountryEnumKn, nil + case "LC": + return CountryEnumLc, nil + case "MF": + return CountryEnumMf, nil + case "PM": + return CountryEnumPm, nil + case "VC": + return CountryEnumVc, nil + case "WS": + return CountryEnumWs, nil + case "SM": + return CountryEnumSm, nil + case "ST": + return CountryEnumSt, nil + case "SA": + return CountryEnumSa, nil + case "SN": + return CountryEnumSn, nil + case "RS": + return CountryEnumRs, nil + case "SC": + return CountryEnumSc, nil + case "SL": + return CountryEnumSl, nil + case "SG": + return CountryEnumSg, nil + case "SX": + return CountryEnumSx, nil + case "SK": + return CountryEnumSk, nil + case "SI": + return CountryEnumSi, nil + case "SB": + return CountryEnumSb, nil + case "SO": + return CountryEnumSo, nil + case "ZA": + return CountryEnumZa, nil + case "GS": + return CountryEnumGs, nil + case "KR": + return CountryEnumKr, nil + case "SS": + return CountryEnumSs, nil + case "ES": + return CountryEnumEs, nil + case "LK": + return CountryEnumLk, nil + case "SD": + return CountryEnumSd, nil + case "SR": + return CountryEnumSr, nil + case "SJ": + return CountryEnumSj, nil + case "SE": + return CountryEnumSe, nil + case "CH": + return CountryEnumCh, nil + case "SY": + return CountryEnumSy, nil + case "TW": + return CountryEnumTw, nil + case "TJ": + return CountryEnumTj, nil + case "TZ": + return CountryEnumTz, nil + case "TH": + return CountryEnumTh, nil + case "TL": + return CountryEnumTl, nil + case "TG": + return CountryEnumTg, nil + case "TK": + return CountryEnumTk, nil + case "TO": + return CountryEnumTo, nil + case "TT": + return CountryEnumTt, nil + case "TN": + return CountryEnumTn, nil + case "TR": + return CountryEnumTr, nil + case "TM": + return CountryEnumTm, nil + case "TC": + return CountryEnumTc, nil + case "TV": + return CountryEnumTv, nil + case "UG": + return CountryEnumUg, nil + case "UA": + return CountryEnumUa, nil + case "AE": + return CountryEnumAe, nil + case "GB": + return CountryEnumGb, nil + case "UM": + return CountryEnumUm, nil + case "US": + return CountryEnumUs, nil + case "UY": + return CountryEnumUy, nil + case "UZ": + return CountryEnumUz, nil + case "VU": + return CountryEnumVu, nil + case "VE": + return CountryEnumVe, nil + case "VN": + return CountryEnumVn, nil + case "VG": + return CountryEnumVg, nil + case "VI": + return CountryEnumVi, nil + case "WF": + return CountryEnumWf, nil + case "EH": + return CountryEnumEh, nil + case "YE": + return CountryEnumYe, nil + case "ZM": + return CountryEnumZm, nil + case "ZW": + return CountryEnumZw, nil } + var t CountryEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -type InvoiceAppliedCreditNotesItem struct { - typeName string - String string - CreditNoteApplyLineForInvoice *CreditNoteApplyLineForInvoice +func (c CountryEnum) Ptr() *CountryEnum { + return &c } -func NewInvoiceAppliedCreditNotesItemFromString(value string) *InvoiceAppliedCreditNotesItem { - return &InvoiceAppliedCreditNotesItem{typeName: "string", String: value} -} +// # The CreditNote Object +// ### Description +// A `CreditNote` is transaction issued to a customer, indicating a reduction or cancellation of the amount owed by the customer. It is most generally used as an adjustment note used to rectify errors, returns, or overpayments related to a sales transaction. A `CreditNote` can be applied to *Accounts Receivable* Invoices to decrease the overall amount of the Invoice. +// +// ### Usage Example +// Fetch from the `LIST CreditNotes` endpoint and view a company's credit notes. +type CreditNote struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The credit note's transaction date. + TransactionDate *time.Time `json:"transaction_date,omitempty" url:"transaction_date,omitempty"` + // The credit note's status. + // + // * `SUBMITTED` - SUBMITTED + // * `AUTHORIZED` - AUTHORIZED + // * `PAID` - PAID + Status *CreditNoteStatus `json:"status,omitempty" url:"status,omitempty"` + // The credit note's number. + Number *string `json:"number,omitempty" url:"number,omitempty"` + // The credit note's contact. + Contact *CreditNoteContact `json:"contact,omitempty" url:"contact,omitempty"` + // The company the credit note belongs to. + Company *CreditNoteCompany `json:"company,omitempty" url:"company,omitempty"` + // The credit note's exchange rate. + ExchangeRate *string `json:"exchange_rate,omitempty" url:"exchange_rate,omitempty"` + // The credit note's total amount. + TotalAmount *float64 `json:"total_amount,omitempty" url:"total_amount,omitempty"` + // The amount of value remaining in the credit note that the customer can use. + RemainingCredit *float64 `json:"remaining_credit,omitempty" url:"remaining_credit,omitempty"` + // If the transaction is inclusive or exclusive of tax. `True` if inclusive, `False` if exclusive. + InclusiveOfTax *bool `json:"inclusive_of_tax,omitempty" url:"inclusive_of_tax,omitempty"` + LineItems []*CreditNoteLineItem `json:"line_items,omitempty" url:"line_items,omitempty"` + TrackingCategories []*CreditNoteTrackingCategoriesItem `json:"tracking_categories,omitempty" url:"tracking_categories,omitempty"` + // The credit note's currency. + // + // * `XUA` - ADB Unit of Account + // * `AFN` - Afghan Afghani + // * `AFA` - Afghan Afghani (1927–2002) + // * `ALL` - Albanian Lek + // * `ALK` - Albanian Lek (1946–1965) + // * `DZD` - Algerian Dinar + // * `ADP` - Andorran Peseta + // * `AOA` - Angolan Kwanza + // * `AOK` - Angolan Kwanza (1977–1991) + // * `AON` - Angolan New Kwanza (1990–2000) + // * `AOR` - Angolan Readjusted Kwanza (1995–1999) + // * `ARA` - Argentine Austral + // * `ARS` - Argentine Peso + // * `ARM` - Argentine Peso (1881–1970) + // * `ARP` - Argentine Peso (1983–1985) + // * `ARL` - Argentine Peso Ley (1970–1983) + // * `AMD` - Armenian Dram + // * `AWG` - Aruban Florin + // * `AUD` - Australian Dollar + // * `ATS` - Austrian Schilling + // * `AZN` - Azerbaijani Manat + // * `AZM` - Azerbaijani Manat (1993–2006) + // * `BSD` - Bahamian Dollar + // * `BHD` - Bahraini Dinar + // * `BDT` - Bangladeshi Taka + // * `BBD` - Barbadian Dollar + // * `BYN` - Belarusian Ruble + // * `BYB` - Belarusian Ruble (1994–1999) + // * `BYR` - Belarusian Ruble (2000–2016) + // * `BEF` - Belgian Franc + // * `BEC` - Belgian Franc (convertible) + // * `BEL` - Belgian Franc (financial) + // * `BZD` - Belize Dollar + // * `BMD` - Bermudan Dollar + // * `BTN` - Bhutanese Ngultrum + // * `BOB` - Bolivian Boliviano + // * `BOL` - Bolivian Boliviano (1863–1963) + // * `BOV` - Bolivian Mvdol + // * `BOP` - Bolivian Peso + // * `BAM` - Bosnia-Herzegovina Convertible Mark + // * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + // * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + // * `BWP` - Botswanan Pula + // * `BRC` - Brazilian Cruzado (1986–1989) + // * `BRZ` - Brazilian Cruzeiro (1942–1967) + // * `BRE` - Brazilian Cruzeiro (1990–1993) + // * `BRR` - Brazilian Cruzeiro (1993–1994) + // * `BRN` - Brazilian New Cruzado (1989–1990) + // * `BRB` - Brazilian New Cruzeiro (1967–1986) + // * `BRL` - Brazilian Real + // * `GBP` - British Pound + // * `BND` - Brunei Dollar + // * `BGL` - Bulgarian Hard Lev + // * `BGN` - Bulgarian Lev + // * `BGO` - Bulgarian Lev (1879–1952) + // * `BGM` - Bulgarian Socialist Lev + // * `BUK` - Burmese Kyat + // * `BIF` - Burundian Franc + // * `XPF` - CFP Franc + // * `KHR` - Cambodian Riel + // * `CAD` - Canadian Dollar + // * `CVE` - Cape Verdean Escudo + // * `KYD` - Cayman Islands Dollar + // * `XAF` - Central African CFA Franc + // * `CLE` - Chilean Escudo + // * `CLP` - Chilean Peso + // * `CLF` - Chilean Unit of Account (UF) + // * `CNX` - Chinese People’s Bank Dollar + // * `CNY` - Chinese Yuan + // * `CNH` - Chinese Yuan (offshore) + // * `COP` - Colombian Peso + // * `COU` - Colombian Real Value Unit + // * `KMF` - Comorian Franc + // * `CDF` - Congolese Franc + // * `CRC` - Costa Rican Colón + // * `HRD` - Croatian Dinar + // * `HRK` - Croatian Kuna + // * `CUC` - Cuban Convertible Peso + // * `CUP` - Cuban Peso + // * `CYP` - Cypriot Pound + // * `CZK` - Czech Koruna + // * `CSK` - Czechoslovak Hard Koruna + // * `DKK` - Danish Krone + // * `DJF` - Djiboutian Franc + // * `DOP` - Dominican Peso + // * `NLG` - Dutch Guilder + // * `XCD` - East Caribbean Dollar + // * `DDM` - East German Mark + // * `ECS` - Ecuadorian Sucre + // * `ECV` - Ecuadorian Unit of Constant Value + // * `EGP` - Egyptian Pound + // * `GQE` - Equatorial Guinean Ekwele + // * `ERN` - Eritrean Nakfa + // * `EEK` - Estonian Kroon + // * `ETB` - Ethiopian Birr + // * `EUR` - Euro + // * `XBA` - European Composite Unit + // * `XEU` - European Currency Unit + // * `XBB` - European Monetary Unit + // * `XBC` - European Unit of Account (XBC) + // * `XBD` - European Unit of Account (XBD) + // * `FKP` - Falkland Islands Pound + // * `FJD` - Fijian Dollar + // * `FIM` - Finnish Markka + // * `FRF` - French Franc + // * `XFO` - French Gold Franc + // * `XFU` - French UIC-Franc + // * `GMD` - Gambian Dalasi + // * `GEK` - Georgian Kupon Larit + // * `GEL` - Georgian Lari + // * `DEM` - German Mark + // * `GHS` - Ghanaian Cedi + // * `GHC` - Ghanaian Cedi (1979–2007) + // * `GIP` - Gibraltar Pound + // * `XAU` - Gold + // * `GRD` - Greek Drachma + // * `GTQ` - Guatemalan Quetzal + // * `GWP` - Guinea-Bissau Peso + // * `GNF` - Guinean Franc + // * `GNS` - Guinean Syli + // * `GYD` - Guyanaese Dollar + // * `HTG` - Haitian Gourde + // * `HNL` - Honduran Lempira + // * `HKD` - Hong Kong Dollar + // * `HUF` - Hungarian Forint + // * `IMP` - IMP + // * `ISK` - Icelandic Króna + // * `ISJ` - Icelandic Króna (1918–1981) + // * `INR` - Indian Rupee + // * `IDR` - Indonesian Rupiah + // * `IRR` - Iranian Rial + // * `IQD` - Iraqi Dinar + // * `IEP` - Irish Pound + // * `ILS` - Israeli New Shekel + // * `ILP` - Israeli Pound + // * `ILR` - Israeli Shekel (1980–1985) + // * `ITL` - Italian Lira + // * `JMD` - Jamaican Dollar + // * `JPY` - Japanese Yen + // * `JOD` - Jordanian Dinar + // * `KZT` - Kazakhstani Tenge + // * `KES` - Kenyan Shilling + // * `KWD` - Kuwaiti Dinar + // * `KGS` - Kyrgystani Som + // * `LAK` - Laotian Kip + // * `LVL` - Latvian Lats + // * `LVR` - Latvian Ruble + // * `LBP` - Lebanese Pound + // * `LSL` - Lesotho Loti + // * `LRD` - Liberian Dollar + // * `LYD` - Libyan Dinar + // * `LTL` - Lithuanian Litas + // * `LTT` - Lithuanian Talonas + // * `LUL` - Luxembourg Financial Franc + // * `LUC` - Luxembourgian Convertible Franc + // * `LUF` - Luxembourgian Franc + // * `MOP` - Macanese Pataca + // * `MKD` - Macedonian Denar + // * `MKN` - Macedonian Denar (1992–1993) + // * `MGA` - Malagasy Ariary + // * `MGF` - Malagasy Franc + // * `MWK` - Malawian Kwacha + // * `MYR` - Malaysian Ringgit + // * `MVR` - Maldivian Rufiyaa + // * `MVP` - Maldivian Rupee (1947–1981) + // * `MLF` - Malian Franc + // * `MTL` - Maltese Lira + // * `MTP` - Maltese Pound + // * `MRU` - Mauritanian Ouguiya + // * `MRO` - Mauritanian Ouguiya (1973–2017) + // * `MUR` - Mauritian Rupee + // * `MXV` - Mexican Investment Unit + // * `MXN` - Mexican Peso + // * `MXP` - Mexican Silver Peso (1861–1992) + // * `MDC` - Moldovan Cupon + // * `MDL` - Moldovan Leu + // * `MCF` - Monegasque Franc + // * `MNT` - Mongolian Tugrik + // * `MAD` - Moroccan Dirham + // * `MAF` - Moroccan Franc + // * `MZE` - Mozambican Escudo + // * `MZN` - Mozambican Metical + // * `MZM` - Mozambican Metical (1980–2006) + // * `MMK` - Myanmar Kyat + // * `NAD` - Namibian Dollar + // * `NPR` - Nepalese Rupee + // * `ANG` - Netherlands Antillean Guilder + // * `TWD` - New Taiwan Dollar + // * `NZD` - New Zealand Dollar + // * `NIO` - Nicaraguan Córdoba + // * `NIC` - Nicaraguan Córdoba (1988–1991) + // * `NGN` - Nigerian Naira + // * `KPW` - North Korean Won + // * `NOK` - Norwegian Krone + // * `OMR` - Omani Rial + // * `PKR` - Pakistani Rupee + // * `XPD` - Palladium + // * `PAB` - Panamanian Balboa + // * `PGK` - Papua New Guinean Kina + // * `PYG` - Paraguayan Guarani + // * `PEI` - Peruvian Inti + // * `PEN` - Peruvian Sol + // * `PES` - Peruvian Sol (1863–1965) + // * `PHP` - Philippine Peso + // * `XPT` - Platinum + // * `PLN` - Polish Zloty + // * `PLZ` - Polish Zloty (1950–1995) + // * `PTE` - Portuguese Escudo + // * `GWE` - Portuguese Guinea Escudo + // * `QAR` - Qatari Rial + // * `XRE` - RINET Funds + // * `RHD` - Rhodesian Dollar + // * `RON` - Romanian Leu + // * `ROL` - Romanian Leu (1952–2006) + // * `RUB` - Russian Ruble + // * `RUR` - Russian Ruble (1991–1998) + // * `RWF` - Rwandan Franc + // * `SVC` - Salvadoran Colón + // * `WST` - Samoan Tala + // * `SAR` - Saudi Riyal + // * `RSD` - Serbian Dinar + // * `CSD` - Serbian Dinar (2002–2006) + // * `SCR` - Seychellois Rupee + // * `SLL` - Sierra Leonean Leone + // * `XAG` - Silver + // * `SGD` - Singapore Dollar + // * `SKK` - Slovak Koruna + // * `SIT` - Slovenian Tolar + // * `SBD` - Solomon Islands Dollar + // * `SOS` - Somali Shilling + // * `ZAR` - South African Rand + // * `ZAL` - South African Rand (financial) + // * `KRH` - South Korean Hwan (1953–1962) + // * `KRW` - South Korean Won + // * `KRO` - South Korean Won (1945–1953) + // * `SSP` - South Sudanese Pound + // * `SUR` - Soviet Rouble + // * `ESP` - Spanish Peseta + // * `ESA` - Spanish Peseta (A account) + // * `ESB` - Spanish Peseta (convertible account) + // * `XDR` - Special Drawing Rights + // * `LKR` - Sri Lankan Rupee + // * `SHP` - St. Helena Pound + // * `XSU` - Sucre + // * `SDD` - Sudanese Dinar (1992–2007) + // * `SDG` - Sudanese Pound + // * `SDP` - Sudanese Pound (1957–1998) + // * `SRD` - Surinamese Dollar + // * `SRG` - Surinamese Guilder + // * `SZL` - Swazi Lilangeni + // * `SEK` - Swedish Krona + // * `CHF` - Swiss Franc + // * `SYP` - Syrian Pound + // * `STN` - São Tomé & Príncipe Dobra + // * `STD` - São Tomé & Príncipe Dobra (1977–2017) + // * `TVD` - TVD + // * `TJR` - Tajikistani Ruble + // * `TJS` - Tajikistani Somoni + // * `TZS` - Tanzanian Shilling + // * `XTS` - Testing Currency Code + // * `THB` - Thai Baht + // * `XXX` - The codes assigned for transactions where no currency is involved + // * `TPE` - Timorese Escudo + // * `TOP` - Tongan Paʻanga + // * `TTD` - Trinidad & Tobago Dollar + // * `TND` - Tunisian Dinar + // * `TRY` - Turkish Lira + // * `TRL` - Turkish Lira (1922–2005) + // * `TMT` - Turkmenistani Manat + // * `TMM` - Turkmenistani Manat (1993–2009) + // * `USD` - US Dollar + // * `USN` - US Dollar (Next day) + // * `USS` - US Dollar (Same day) + // * `UGX` - Ugandan Shilling + // * `UGS` - Ugandan Shilling (1966–1987) + // * `UAH` - Ukrainian Hryvnia + // * `UAK` - Ukrainian Karbovanets + // * `AED` - United Arab Emirates Dirham + // * `UYW` - Uruguayan Nominal Wage Index Unit + // * `UYU` - Uruguayan Peso + // * `UYP` - Uruguayan Peso (1975–1993) + // * `UYI` - Uruguayan Peso (Indexed Units) + // * `UZS` - Uzbekistani Som + // * `VUV` - Vanuatu Vatu + // * `VES` - Venezuelan Bolívar + // * `VEB` - Venezuelan Bolívar (1871–2008) + // * `VEF` - Venezuelan Bolívar (2008–2018) + // * `VND` - Vietnamese Dong + // * `VNN` - Vietnamese Dong (1978–1985) + // * `CHE` - WIR Euro + // * `CHW` - WIR Franc + // * `XOF` - West African CFA Franc + // * `YDD` - Yemeni Dinar + // * `YER` - Yemeni Rial + // * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + // * `YUD` - Yugoslavian Hard Dinar (1966–1990) + // * `YUM` - Yugoslavian New Dinar (1994–2002) + // * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + // * `ZWN` - ZWN + // * `ZRN` - Zairean New Zaire (1993–1998) + // * `ZRZ` - Zairean Zaire (1971–1993) + // * `ZMW` - Zambian Kwacha + // * `ZMK` - Zambian Kwacha (1968–2012) + // * `ZWD` - Zimbabwean Dollar (1980–2008) + // * `ZWR` - Zimbabwean Dollar (2008) + // * `ZWL` - Zimbabwean Dollar (2009) + Currency *CreditNoteCurrency `json:"currency,omitempty" url:"currency,omitempty"` + // When the third party's credit note was created. + RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty" url:"remote_created_at,omitempty"` + // When the third party's credit note was updated. + RemoteUpdatedAt *time.Time `json:"remote_updated_at,omitempty" url:"remote_updated_at,omitempty"` + // Array of `Payment` object IDs + Payments []*CreditNotePaymentsItem `json:"payments,omitempty" url:"payments,omitempty"` + // A list of the Payment Applied to Lines common models related to a given Invoice, Credit Note, or Journal Entry. + AppliedPayments []*CreditNoteAppliedPaymentsItem `json:"applied_payments,omitempty" url:"applied_payments,omitempty"` + // The accounting period that the CreditNote was generated in. + AccountingPeriod *CreditNoteAccountingPeriod `json:"accounting_period,omitempty" url:"accounting_period,omitempty"` + // A list of the CreditNote Applied to Lines common models related to a given Credit Note + AppliedToLines []*CreditNoteApplyLineForCreditNote `json:"applied_to_lines,omitempty" url:"applied_to_lines,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` -func NewInvoiceAppliedCreditNotesItemFromCreditNoteApplyLineForInvoice(value *CreditNoteApplyLineForInvoice) *InvoiceAppliedCreditNotesItem { - return &InvoiceAppliedCreditNotesItem{typeName: "creditNoteApplyLineForInvoice", CreditNoteApplyLineForInvoice: value} + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (i *InvoiceAppliedCreditNotesItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - i.typeName = "string" - i.String = valueString - return nil - } - valueCreditNoteApplyLineForInvoice := new(CreditNoteApplyLineForInvoice) - if err := json.Unmarshal(data, &valueCreditNoteApplyLineForInvoice); err == nil { - i.typeName = "creditNoteApplyLineForInvoice" - i.CreditNoteApplyLineForInvoice = valueCreditNoteApplyLineForInvoice +func (c *CreditNote) GetId() *string { + if c == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, i) + return c.Id } -func (i InvoiceAppliedCreditNotesItem) MarshalJSON() ([]byte, error) { - switch i.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return json.Marshal(i.String) - case "creditNoteApplyLineForInvoice": - return json.Marshal(i.CreditNoteApplyLineForInvoice) +func (c *CreditNote) GetRemoteId() *string { + if c == nil { + return nil } + return c.RemoteId } -type InvoiceAppliedCreditNotesItemVisitor interface { - VisitString(string) error - VisitCreditNoteApplyLineForInvoice(*CreditNoteApplyLineForInvoice) error -} - -func (i *InvoiceAppliedCreditNotesItem) Accept(visitor InvoiceAppliedCreditNotesItemVisitor) error { - switch i.typeName { - default: - return fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return visitor.VisitString(i.String) - case "creditNoteApplyLineForInvoice": - return visitor.VisitCreditNoteApplyLineForInvoice(i.CreditNoteApplyLineForInvoice) +func (c *CreditNote) GetCreatedAt() *time.Time { + if c == nil { + return nil } + return c.CreatedAt } -type InvoiceAppliedPaymentsItem struct { - typeName string - String string - PaymentLineItem *PaymentLineItem -} - -func NewInvoiceAppliedPaymentsItemFromString(value string) *InvoiceAppliedPaymentsItem { - return &InvoiceAppliedPaymentsItem{typeName: "string", String: value} -} - -func NewInvoiceAppliedPaymentsItemFromPaymentLineItem(value *PaymentLineItem) *InvoiceAppliedPaymentsItem { - return &InvoiceAppliedPaymentsItem{typeName: "paymentLineItem", PaymentLineItem: value} -} - -func (i *InvoiceAppliedPaymentsItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - i.typeName = "string" - i.String = valueString - return nil - } - valuePaymentLineItem := new(PaymentLineItem) - if err := json.Unmarshal(data, &valuePaymentLineItem); err == nil { - i.typeName = "paymentLineItem" - i.PaymentLineItem = valuePaymentLineItem +func (c *CreditNote) GetModifiedAt() *time.Time { + if c == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, i) + return c.ModifiedAt } -func (i InvoiceAppliedPaymentsItem) MarshalJSON() ([]byte, error) { - switch i.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return json.Marshal(i.String) - case "paymentLineItem": - return json.Marshal(i.PaymentLineItem) +func (c *CreditNote) GetTransactionDate() *time.Time { + if c == nil { + return nil } + return c.TransactionDate } -type InvoiceAppliedPaymentsItemVisitor interface { - VisitString(string) error - VisitPaymentLineItem(*PaymentLineItem) error -} - -func (i *InvoiceAppliedPaymentsItem) Accept(visitor InvoiceAppliedPaymentsItemVisitor) error { - switch i.typeName { - default: - return fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return visitor.VisitString(i.String) - case "paymentLineItem": - return visitor.VisitPaymentLineItem(i.PaymentLineItem) +func (c *CreditNote) GetStatus() *CreditNoteStatus { + if c == nil { + return nil } + return c.Status } -type InvoiceAppliedVendorCreditsItem struct { - typeName string - String string - VendorCreditApplyLineForInvoice *VendorCreditApplyLineForInvoice -} - -func NewInvoiceAppliedVendorCreditsItemFromString(value string) *InvoiceAppliedVendorCreditsItem { - return &InvoiceAppliedVendorCreditsItem{typeName: "string", String: value} -} - -func NewInvoiceAppliedVendorCreditsItemFromVendorCreditApplyLineForInvoice(value *VendorCreditApplyLineForInvoice) *InvoiceAppliedVendorCreditsItem { - return &InvoiceAppliedVendorCreditsItem{typeName: "vendorCreditApplyLineForInvoice", VendorCreditApplyLineForInvoice: value} -} - -func (i *InvoiceAppliedVendorCreditsItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - i.typeName = "string" - i.String = valueString - return nil - } - valueVendorCreditApplyLineForInvoice := new(VendorCreditApplyLineForInvoice) - if err := json.Unmarshal(data, &valueVendorCreditApplyLineForInvoice); err == nil { - i.typeName = "vendorCreditApplyLineForInvoice" - i.VendorCreditApplyLineForInvoice = valueVendorCreditApplyLineForInvoice +func (c *CreditNote) GetNumber() *string { + if c == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, i) + return c.Number } -func (i InvoiceAppliedVendorCreditsItem) MarshalJSON() ([]byte, error) { - switch i.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return json.Marshal(i.String) - case "vendorCreditApplyLineForInvoice": - return json.Marshal(i.VendorCreditApplyLineForInvoice) +func (c *CreditNote) GetContact() *CreditNoteContact { + if c == nil { + return nil } + return c.Contact } -type InvoiceAppliedVendorCreditsItemVisitor interface { - VisitString(string) error - VisitVendorCreditApplyLineForInvoice(*VendorCreditApplyLineForInvoice) error -} - -func (i *InvoiceAppliedVendorCreditsItem) Accept(visitor InvoiceAppliedVendorCreditsItemVisitor) error { - switch i.typeName { - default: - return fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return visitor.VisitString(i.String) - case "vendorCreditApplyLineForInvoice": - return visitor.VisitVendorCreditApplyLineForInvoice(i.VendorCreditApplyLineForInvoice) +func (c *CreditNote) GetCompany() *CreditNoteCompany { + if c == nil { + return nil } + return c.Company } -// The company the invoice belongs to. -type InvoiceCompany struct { - typeName string - String string - CompanyInfo *CompanyInfo -} - -func NewInvoiceCompanyFromString(value string) *InvoiceCompany { - return &InvoiceCompany{typeName: "string", String: value} -} - -func NewInvoiceCompanyFromCompanyInfo(value *CompanyInfo) *InvoiceCompany { - return &InvoiceCompany{typeName: "companyInfo", CompanyInfo: value} -} - -func (i *InvoiceCompany) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - i.typeName = "string" - i.String = valueString - return nil - } - valueCompanyInfo := new(CompanyInfo) - if err := json.Unmarshal(data, &valueCompanyInfo); err == nil { - i.typeName = "companyInfo" - i.CompanyInfo = valueCompanyInfo +func (c *CreditNote) GetExchangeRate() *string { + if c == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, i) + return c.ExchangeRate } -func (i InvoiceCompany) MarshalJSON() ([]byte, error) { - switch i.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return json.Marshal(i.String) - case "companyInfo": - return json.Marshal(i.CompanyInfo) +func (c *CreditNote) GetTotalAmount() *float64 { + if c == nil { + return nil } + return c.TotalAmount } -type InvoiceCompanyVisitor interface { - VisitString(string) error - VisitCompanyInfo(*CompanyInfo) error -} - -func (i *InvoiceCompany) Accept(visitor InvoiceCompanyVisitor) error { - switch i.typeName { - default: - return fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return visitor.VisitString(i.String) - case "companyInfo": - return visitor.VisitCompanyInfo(i.CompanyInfo) +func (c *CreditNote) GetRemainingCredit() *float64 { + if c == nil { + return nil } + return c.RemainingCredit } -// The invoice's contact. -type InvoiceContact struct { - typeName string - String string - Contact *Contact -} - -func NewInvoiceContactFromString(value string) *InvoiceContact { - return &InvoiceContact{typeName: "string", String: value} -} - -func NewInvoiceContactFromContact(value *Contact) *InvoiceContact { - return &InvoiceContact{typeName: "contact", Contact: value} -} - -func (i *InvoiceContact) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - i.typeName = "string" - i.String = valueString - return nil - } - valueContact := new(Contact) - if err := json.Unmarshal(data, &valueContact); err == nil { - i.typeName = "contact" - i.Contact = valueContact +func (c *CreditNote) GetInclusiveOfTax() *bool { + if c == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, i) + return c.InclusiveOfTax } -func (i InvoiceContact) MarshalJSON() ([]byte, error) { - switch i.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return json.Marshal(i.String) - case "contact": - return json.Marshal(i.Contact) +func (c *CreditNote) GetLineItems() []*CreditNoteLineItem { + if c == nil { + return nil } + return c.LineItems } -type InvoiceContactVisitor interface { - VisitString(string) error - VisitContact(*Contact) error -} - -func (i *InvoiceContact) Accept(visitor InvoiceContactVisitor) error { - switch i.typeName { - default: - return fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return visitor.VisitString(i.String) - case "contact": - return visitor.VisitContact(i.Contact) +func (c *CreditNote) GetTrackingCategories() []*CreditNoteTrackingCategoriesItem { + if c == nil { + return nil } + return c.TrackingCategories } -// The invoice's currency. -// -// - `XUA` - ADB Unit of Account -// - `AFN` - Afghan Afghani -// - `AFA` - Afghan Afghani (1927–2002) -// - `ALL` - Albanian Lek -// - `ALK` - Albanian Lek (1946–1965) -// - `DZD` - Algerian Dinar -// - `ADP` - Andorran Peseta -// - `AOA` - Angolan Kwanza -// - `AOK` - Angolan Kwanza (1977–1991) -// - `AON` - Angolan New Kwanza (1990–2000) -// - `AOR` - Angolan Readjusted Kwanza (1995–1999) -// - `ARA` - Argentine Austral -// - `ARS` - Argentine Peso -// - `ARM` - Argentine Peso (1881–1970) -// - `ARP` - Argentine Peso (1983–1985) -// - `ARL` - Argentine Peso Ley (1970–1983) -// - `AMD` - Armenian Dram -// - `AWG` - Aruban Florin -// - `AUD` - Australian Dollar -// - `ATS` - Austrian Schilling -// - `AZN` - Azerbaijani Manat -// - `AZM` - Azerbaijani Manat (1993–2006) -// - `BSD` - Bahamian Dollar -// - `BHD` - Bahraini Dinar -// - `BDT` - Bangladeshi Taka -// - `BBD` - Barbadian Dollar -// - `BYN` - Belarusian Ruble -// - `BYB` - Belarusian Ruble (1994–1999) -// - `BYR` - Belarusian Ruble (2000–2016) -// - `BEF` - Belgian Franc -// - `BEC` - Belgian Franc (convertible) -// - `BEL` - Belgian Franc (financial) -// - `BZD` - Belize Dollar -// - `BMD` - Bermudan Dollar -// - `BTN` - Bhutanese Ngultrum -// - `BOB` - Bolivian Boliviano -// - `BOL` - Bolivian Boliviano (1863–1963) -// - `BOV` - Bolivian Mvdol -// - `BOP` - Bolivian Peso -// - `BAM` - Bosnia-Herzegovina Convertible Mark -// - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) -// - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) -// - `BWP` - Botswanan Pula -// - `BRC` - Brazilian Cruzado (1986–1989) -// - `BRZ` - Brazilian Cruzeiro (1942–1967) -// - `BRE` - Brazilian Cruzeiro (1990–1993) -// - `BRR` - Brazilian Cruzeiro (1993–1994) -// - `BRN` - Brazilian New Cruzado (1989–1990) -// - `BRB` - Brazilian New Cruzeiro (1967–1986) -// - `BRL` - Brazilian Real -// - `GBP` - British Pound -// - `BND` - Brunei Dollar -// - `BGL` - Bulgarian Hard Lev -// - `BGN` - Bulgarian Lev -// - `BGO` - Bulgarian Lev (1879–1952) -// - `BGM` - Bulgarian Socialist Lev -// - `BUK` - Burmese Kyat -// - `BIF` - Burundian Franc -// - `XPF` - CFP Franc -// - `KHR` - Cambodian Riel -// - `CAD` - Canadian Dollar -// - `CVE` - Cape Verdean Escudo -// - `KYD` - Cayman Islands Dollar -// - `XAF` - Central African CFA Franc -// - `CLE` - Chilean Escudo -// - `CLP` - Chilean Peso -// - `CLF` - Chilean Unit of Account (UF) -// - `CNX` - Chinese People’s Bank Dollar -// - `CNY` - Chinese Yuan -// - `CNH` - Chinese Yuan (offshore) -// - `COP` - Colombian Peso -// - `COU` - Colombian Real Value Unit -// - `KMF` - Comorian Franc -// - `CDF` - Congolese Franc -// - `CRC` - Costa Rican Colón -// - `HRD` - Croatian Dinar -// - `HRK` - Croatian Kuna -// - `CUC` - Cuban Convertible Peso -// - `CUP` - Cuban Peso -// - `CYP` - Cypriot Pound -// - `CZK` - Czech Koruna -// - `CSK` - Czechoslovak Hard Koruna -// - `DKK` - Danish Krone -// - `DJF` - Djiboutian Franc -// - `DOP` - Dominican Peso -// - `NLG` - Dutch Guilder -// - `XCD` - East Caribbean Dollar -// - `DDM` - East German Mark -// - `ECS` - Ecuadorian Sucre -// - `ECV` - Ecuadorian Unit of Constant Value -// - `EGP` - Egyptian Pound -// - `GQE` - Equatorial Guinean Ekwele -// - `ERN` - Eritrean Nakfa -// - `EEK` - Estonian Kroon -// - `ETB` - Ethiopian Birr -// - `EUR` - Euro -// - `XBA` - European Composite Unit -// - `XEU` - European Currency Unit -// - `XBB` - European Monetary Unit -// - `XBC` - European Unit of Account (XBC) -// - `XBD` - European Unit of Account (XBD) -// - `FKP` - Falkland Islands Pound -// - `FJD` - Fijian Dollar -// - `FIM` - Finnish Markka -// - `FRF` - French Franc -// - `XFO` - French Gold Franc -// - `XFU` - French UIC-Franc -// - `GMD` - Gambian Dalasi -// - `GEK` - Georgian Kupon Larit -// - `GEL` - Georgian Lari -// - `DEM` - German Mark -// - `GHS` - Ghanaian Cedi -// - `GHC` - Ghanaian Cedi (1979–2007) -// - `GIP` - Gibraltar Pound -// - `XAU` - Gold -// - `GRD` - Greek Drachma -// - `GTQ` - Guatemalan Quetzal -// - `GWP` - Guinea-Bissau Peso -// - `GNF` - Guinean Franc -// - `GNS` - Guinean Syli -// - `GYD` - Guyanaese Dollar -// - `HTG` - Haitian Gourde -// - `HNL` - Honduran Lempira -// - `HKD` - Hong Kong Dollar -// - `HUF` - Hungarian Forint -// - `IMP` - IMP -// - `ISK` - Icelandic Króna -// - `ISJ` - Icelandic Króna (1918–1981) -// - `INR` - Indian Rupee -// - `IDR` - Indonesian Rupiah -// - `IRR` - Iranian Rial -// - `IQD` - Iraqi Dinar -// - `IEP` - Irish Pound -// - `ILS` - Israeli New Shekel -// - `ILP` - Israeli Pound -// - `ILR` - Israeli Shekel (1980–1985) -// - `ITL` - Italian Lira -// - `JMD` - Jamaican Dollar -// - `JPY` - Japanese Yen -// - `JOD` - Jordanian Dinar -// - `KZT` - Kazakhstani Tenge -// - `KES` - Kenyan Shilling -// - `KWD` - Kuwaiti Dinar -// - `KGS` - Kyrgystani Som -// - `LAK` - Laotian Kip -// - `LVL` - Latvian Lats -// - `LVR` - Latvian Ruble -// - `LBP` - Lebanese Pound -// - `LSL` - Lesotho Loti -// - `LRD` - Liberian Dollar -// - `LYD` - Libyan Dinar -// - `LTL` - Lithuanian Litas -// - `LTT` - Lithuanian Talonas -// - `LUL` - Luxembourg Financial Franc -// - `LUC` - Luxembourgian Convertible Franc -// - `LUF` - Luxembourgian Franc -// - `MOP` - Macanese Pataca -// - `MKD` - Macedonian Denar -// - `MKN` - Macedonian Denar (1992–1993) -// - `MGA` - Malagasy Ariary -// - `MGF` - Malagasy Franc -// - `MWK` - Malawian Kwacha -// - `MYR` - Malaysian Ringgit -// - `MVR` - Maldivian Rufiyaa -// - `MVP` - Maldivian Rupee (1947–1981) -// - `MLF` - Malian Franc -// - `MTL` - Maltese Lira -// - `MTP` - Maltese Pound -// - `MRU` - Mauritanian Ouguiya -// - `MRO` - Mauritanian Ouguiya (1973–2017) -// - `MUR` - Mauritian Rupee -// - `MXV` - Mexican Investment Unit -// - `MXN` - Mexican Peso -// - `MXP` - Mexican Silver Peso (1861–1992) -// - `MDC` - Moldovan Cupon -// - `MDL` - Moldovan Leu -// - `MCF` - Monegasque Franc -// - `MNT` - Mongolian Tugrik -// - `MAD` - Moroccan Dirham -// - `MAF` - Moroccan Franc -// - `MZE` - Mozambican Escudo -// - `MZN` - Mozambican Metical -// - `MZM` - Mozambican Metical (1980–2006) -// - `MMK` - Myanmar Kyat -// - `NAD` - Namibian Dollar -// - `NPR` - Nepalese Rupee -// - `ANG` - Netherlands Antillean Guilder -// - `TWD` - New Taiwan Dollar -// - `NZD` - New Zealand Dollar -// - `NIO` - Nicaraguan Córdoba -// - `NIC` - Nicaraguan Córdoba (1988–1991) -// - `NGN` - Nigerian Naira -// - `KPW` - North Korean Won -// - `NOK` - Norwegian Krone -// - `OMR` - Omani Rial -// - `PKR` - Pakistani Rupee -// - `XPD` - Palladium -// - `PAB` - Panamanian Balboa -// - `PGK` - Papua New Guinean Kina -// - `PYG` - Paraguayan Guarani -// - `PEI` - Peruvian Inti -// - `PEN` - Peruvian Sol -// - `PES` - Peruvian Sol (1863–1965) -// - `PHP` - Philippine Peso -// - `XPT` - Platinum -// - `PLN` - Polish Zloty -// - `PLZ` - Polish Zloty (1950–1995) -// - `PTE` - Portuguese Escudo -// - `GWE` - Portuguese Guinea Escudo -// - `QAR` - Qatari Rial -// - `XRE` - RINET Funds -// - `RHD` - Rhodesian Dollar -// - `RON` - Romanian Leu -// - `ROL` - Romanian Leu (1952–2006) -// - `RUB` - Russian Ruble -// - `RUR` - Russian Ruble (1991–1998) -// - `RWF` - Rwandan Franc -// - `SVC` - Salvadoran Colón -// - `WST` - Samoan Tala -// - `SAR` - Saudi Riyal -// - `RSD` - Serbian Dinar -// - `CSD` - Serbian Dinar (2002–2006) -// - `SCR` - Seychellois Rupee -// - `SLL` - Sierra Leonean Leone -// - `XAG` - Silver -// - `SGD` - Singapore Dollar -// - `SKK` - Slovak Koruna -// - `SIT` - Slovenian Tolar -// - `SBD` - Solomon Islands Dollar -// - `SOS` - Somali Shilling -// - `ZAR` - South African Rand -// - `ZAL` - South African Rand (financial) -// - `KRH` - South Korean Hwan (1953–1962) -// - `KRW` - South Korean Won -// - `KRO` - South Korean Won (1945–1953) -// - `SSP` - South Sudanese Pound -// - `SUR` - Soviet Rouble -// - `ESP` - Spanish Peseta -// - `ESA` - Spanish Peseta (A account) -// - `ESB` - Spanish Peseta (convertible account) -// - `XDR` - Special Drawing Rights -// - `LKR` - Sri Lankan Rupee -// - `SHP` - St. Helena Pound -// - `XSU` - Sucre -// - `SDD` - Sudanese Dinar (1992–2007) -// - `SDG` - Sudanese Pound -// - `SDP` - Sudanese Pound (1957–1998) -// - `SRD` - Surinamese Dollar -// - `SRG` - Surinamese Guilder -// - `SZL` - Swazi Lilangeni -// - `SEK` - Swedish Krona -// - `CHF` - Swiss Franc -// - `SYP` - Syrian Pound -// - `STN` - São Tomé & Príncipe Dobra -// - `STD` - São Tomé & Príncipe Dobra (1977–2017) -// - `TVD` - TVD -// - `TJR` - Tajikistani Ruble -// - `TJS` - Tajikistani Somoni -// - `TZS` - Tanzanian Shilling -// - `XTS` - Testing Currency Code -// - `THB` - Thai Baht -// - `XXX` - The codes assigned for transactions where no currency is involved -// - `TPE` - Timorese Escudo -// - `TOP` - Tongan Paʻanga -// - `TTD` - Trinidad & Tobago Dollar -// - `TND` - Tunisian Dinar -// - `TRY` - Turkish Lira -// - `TRL` - Turkish Lira (1922–2005) -// - `TMT` - Turkmenistani Manat -// - `TMM` - Turkmenistani Manat (1993–2009) -// - `USD` - US Dollar -// - `USN` - US Dollar (Next day) -// - `USS` - US Dollar (Same day) -// - `UGX` - Ugandan Shilling -// - `UGS` - Ugandan Shilling (1966–1987) -// - `UAH` - Ukrainian Hryvnia -// - `UAK` - Ukrainian Karbovanets -// - `AED` - United Arab Emirates Dirham -// - `UYW` - Uruguayan Nominal Wage Index Unit -// - `UYU` - Uruguayan Peso -// - `UYP` - Uruguayan Peso (1975–1993) -// - `UYI` - Uruguayan Peso (Indexed Units) -// - `UZS` - Uzbekistani Som -// - `VUV` - Vanuatu Vatu -// - `VES` - Venezuelan Bolívar -// - `VEB` - Venezuelan Bolívar (1871–2008) -// - `VEF` - Venezuelan Bolívar (2008–2018) -// - `VND` - Vietnamese Dong -// - `VNN` - Vietnamese Dong (1978–1985) -// - `CHE` - WIR Euro -// - `CHW` - WIR Franc -// - `XOF` - West African CFA Franc -// - `YDD` - Yemeni Dinar -// - `YER` - Yemeni Rial -// - `YUN` - Yugoslavian Convertible Dinar (1990–1992) -// - `YUD` - Yugoslavian Hard Dinar (1966–1990) -// - `YUM` - Yugoslavian New Dinar (1994–2002) -// - `YUR` - Yugoslavian Reformed Dinar (1992–1993) -// - `ZWN` - ZWN -// - `ZRN` - Zairean New Zaire (1993–1998) -// - `ZRZ` - Zairean Zaire (1971–1993) -// - `ZMW` - Zambian Kwacha -// - `ZMK` - Zambian Kwacha (1968–2012) -// - `ZWD` - Zimbabwean Dollar (1980–2008) -// - `ZWR` - Zimbabwean Dollar (2008) -// - `ZWL` - Zimbabwean Dollar (2009) -type InvoiceCurrency struct { - typeName string - TransactionCurrencyEnum TransactionCurrencyEnum - String string -} - -func NewInvoiceCurrencyFromTransactionCurrencyEnum(value TransactionCurrencyEnum) *InvoiceCurrency { - return &InvoiceCurrency{typeName: "transactionCurrencyEnum", TransactionCurrencyEnum: value} -} - -func NewInvoiceCurrencyFromString(value string) *InvoiceCurrency { - return &InvoiceCurrency{typeName: "string", String: value} -} - -func (i *InvoiceCurrency) UnmarshalJSON(data []byte) error { - var valueTransactionCurrencyEnum TransactionCurrencyEnum - if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { - i.typeName = "transactionCurrencyEnum" - i.TransactionCurrencyEnum = valueTransactionCurrencyEnum +func (c *CreditNote) GetCurrency() *CreditNoteCurrency { + if c == nil { return nil } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - i.typeName = "string" - i.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, i) + return c.Currency } -func (i InvoiceCurrency) MarshalJSON() ([]byte, error) { - switch i.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "transactionCurrencyEnum": - return json.Marshal(i.TransactionCurrencyEnum) - case "string": - return json.Marshal(i.String) +func (c *CreditNote) GetRemoteCreatedAt() *time.Time { + if c == nil { + return nil } + return c.RemoteCreatedAt } -type InvoiceCurrencyVisitor interface { - VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error - VisitString(string) error -} - -func (i *InvoiceCurrency) Accept(visitor InvoiceCurrencyVisitor) error { - switch i.typeName { - default: - return fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "transactionCurrencyEnum": - return visitor.VisitTransactionCurrencyEnum(i.TransactionCurrencyEnum) - case "string": - return visitor.VisitString(i.String) +func (c *CreditNote) GetRemoteUpdatedAt() *time.Time { + if c == nil { + return nil } + return c.RemoteUpdatedAt } -// The employee this overall transaction relates to. -type InvoiceEmployee struct { - typeName string - String string - Employee *Employee -} - -func NewInvoiceEmployeeFromString(value string) *InvoiceEmployee { - return &InvoiceEmployee{typeName: "string", String: value} -} - -func NewInvoiceEmployeeFromEmployee(value *Employee) *InvoiceEmployee { - return &InvoiceEmployee{typeName: "employee", Employee: value} +func (c *CreditNote) GetPayments() []*CreditNotePaymentsItem { + if c == nil { + return nil + } + return c.Payments } -func (i *InvoiceEmployee) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - i.typeName = "string" - i.String = valueString +func (c *CreditNote) GetAppliedPayments() []*CreditNoteAppliedPaymentsItem { + if c == nil { return nil } - valueEmployee := new(Employee) - if err := json.Unmarshal(data, &valueEmployee); err == nil { - i.typeName = "employee" - i.Employee = valueEmployee + return c.AppliedPayments +} + +func (c *CreditNote) GetAccountingPeriod() *CreditNoteAccountingPeriod { + if c == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, i) + return c.AccountingPeriod } -func (i InvoiceEmployee) MarshalJSON() ([]byte, error) { - switch i.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return json.Marshal(i.String) - case "employee": - return json.Marshal(i.Employee) +func (c *CreditNote) GetAppliedToLines() []*CreditNoteApplyLineForCreditNote { + if c == nil { + return nil } + return c.AppliedToLines } -type InvoiceEmployeeVisitor interface { - VisitString(string) error - VisitEmployee(*Employee) error +func (c *CreditNote) GetRemoteWasDeleted() *bool { + if c == nil { + return nil + } + return c.RemoteWasDeleted } -func (i *InvoiceEmployee) Accept(visitor InvoiceEmployeeVisitor) error { - switch i.typeName { - default: - return fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return visitor.VisitString(i.String) - case "employee": - return visitor.VisitEmployee(i.Employee) +func (c *CreditNote) GetFieldMappings() map[string]interface{} { + if c == nil { + return nil } + return c.FieldMappings } -// # The InvoiceLineItem Object -// -// ### Description -// -// The `InvoiceLineItem` object represents an itemized record of goods and/or services sold to a customer. -// -// ### Usage Example -// -// Fetch from the `GET Invoice` endpoint and view the invoice's line items. -type InvoiceLineItem struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The line item's description. - Description *string `json:"description,omitempty"` - // The line item's unit price. - UnitPrice *float64 `json:"unit_price,omitempty"` - // The line item's quantity. - Quantity *float64 `json:"quantity,omitempty"` - // The line item's total amount. - TotalAmount *float64 `json:"total_amount,omitempty"` - // The employee this overall transaction relates to. - Employee *InvoiceLineItemEmployee `json:"employee,omitempty"` - // The line item's currency. - // - // - `XUA` - ADB Unit of Account - // - `AFN` - Afghan Afghani - // - `AFA` - Afghan Afghani (1927–2002) - // - `ALL` - Albanian Lek - // - `ALK` - Albanian Lek (1946–1965) - // - `DZD` - Algerian Dinar - // - `ADP` - Andorran Peseta - // - `AOA` - Angolan Kwanza - // - `AOK` - Angolan Kwanza (1977–1991) - // - `AON` - Angolan New Kwanza (1990–2000) - // - `AOR` - Angolan Readjusted Kwanza (1995–1999) - // - `ARA` - Argentine Austral - // - `ARS` - Argentine Peso - // - `ARM` - Argentine Peso (1881–1970) - // - `ARP` - Argentine Peso (1983–1985) - // - `ARL` - Argentine Peso Ley (1970–1983) - // - `AMD` - Armenian Dram - // - `AWG` - Aruban Florin - // - `AUD` - Australian Dollar - // - `ATS` - Austrian Schilling - // - `AZN` - Azerbaijani Manat - // - `AZM` - Azerbaijani Manat (1993–2006) - // - `BSD` - Bahamian Dollar - // - `BHD` - Bahraini Dinar - // - `BDT` - Bangladeshi Taka - // - `BBD` - Barbadian Dollar - // - `BYN` - Belarusian Ruble - // - `BYB` - Belarusian Ruble (1994–1999) - // - `BYR` - Belarusian Ruble (2000–2016) - // - `BEF` - Belgian Franc - // - `BEC` - Belgian Franc (convertible) - // - `BEL` - Belgian Franc (financial) - // - `BZD` - Belize Dollar - // - `BMD` - Bermudan Dollar - // - `BTN` - Bhutanese Ngultrum - // - `BOB` - Bolivian Boliviano - // - `BOL` - Bolivian Boliviano (1863–1963) - // - `BOV` - Bolivian Mvdol - // - `BOP` - Bolivian Peso - // - `BAM` - Bosnia-Herzegovina Convertible Mark - // - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - // - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - // - `BWP` - Botswanan Pula - // - `BRC` - Brazilian Cruzado (1986–1989) - // - `BRZ` - Brazilian Cruzeiro (1942–1967) - // - `BRE` - Brazilian Cruzeiro (1990–1993) - // - `BRR` - Brazilian Cruzeiro (1993–1994) - // - `BRN` - Brazilian New Cruzado (1989–1990) - // - `BRB` - Brazilian New Cruzeiro (1967–1986) - // - `BRL` - Brazilian Real - // - `GBP` - British Pound - // - `BND` - Brunei Dollar - // - `BGL` - Bulgarian Hard Lev - // - `BGN` - Bulgarian Lev - // - `BGO` - Bulgarian Lev (1879–1952) - // - `BGM` - Bulgarian Socialist Lev - // - `BUK` - Burmese Kyat - // - `BIF` - Burundian Franc - // - `XPF` - CFP Franc - // - `KHR` - Cambodian Riel - // - `CAD` - Canadian Dollar - // - `CVE` - Cape Verdean Escudo - // - `KYD` - Cayman Islands Dollar - // - `XAF` - Central African CFA Franc - // - `CLE` - Chilean Escudo - // - `CLP` - Chilean Peso - // - `CLF` - Chilean Unit of Account (UF) - // - `CNX` - Chinese People’s Bank Dollar - // - `CNY` - Chinese Yuan - // - `CNH` - Chinese Yuan (offshore) - // - `COP` - Colombian Peso - // - `COU` - Colombian Real Value Unit - // - `KMF` - Comorian Franc - // - `CDF` - Congolese Franc - // - `CRC` - Costa Rican Colón - // - `HRD` - Croatian Dinar - // - `HRK` - Croatian Kuna - // - `CUC` - Cuban Convertible Peso - // - `CUP` - Cuban Peso - // - `CYP` - Cypriot Pound - // - `CZK` - Czech Koruna - // - `CSK` - Czechoslovak Hard Koruna - // - `DKK` - Danish Krone - // - `DJF` - Djiboutian Franc - // - `DOP` - Dominican Peso - // - `NLG` - Dutch Guilder - // - `XCD` - East Caribbean Dollar - // - `DDM` - East German Mark - // - `ECS` - Ecuadorian Sucre - // - `ECV` - Ecuadorian Unit of Constant Value - // - `EGP` - Egyptian Pound - // - `GQE` - Equatorial Guinean Ekwele - // - `ERN` - Eritrean Nakfa - // - `EEK` - Estonian Kroon - // - `ETB` - Ethiopian Birr - // - `EUR` - Euro - // - `XBA` - European Composite Unit - // - `XEU` - European Currency Unit - // - `XBB` - European Monetary Unit - // - `XBC` - European Unit of Account (XBC) - // - `XBD` - European Unit of Account (XBD) - // - `FKP` - Falkland Islands Pound - // - `FJD` - Fijian Dollar - // - `FIM` - Finnish Markka - // - `FRF` - French Franc - // - `XFO` - French Gold Franc - // - `XFU` - French UIC-Franc - // - `GMD` - Gambian Dalasi - // - `GEK` - Georgian Kupon Larit - // - `GEL` - Georgian Lari - // - `DEM` - German Mark - // - `GHS` - Ghanaian Cedi - // - `GHC` - Ghanaian Cedi (1979–2007) - // - `GIP` - Gibraltar Pound - // - `XAU` - Gold - // - `GRD` - Greek Drachma - // - `GTQ` - Guatemalan Quetzal - // - `GWP` - Guinea-Bissau Peso - // - `GNF` - Guinean Franc - // - `GNS` - Guinean Syli - // - `GYD` - Guyanaese Dollar - // - `HTG` - Haitian Gourde - // - `HNL` - Honduran Lempira - // - `HKD` - Hong Kong Dollar - // - `HUF` - Hungarian Forint - // - `IMP` - IMP - // - `ISK` - Icelandic Króna - // - `ISJ` - Icelandic Króna (1918–1981) - // - `INR` - Indian Rupee - // - `IDR` - Indonesian Rupiah - // - `IRR` - Iranian Rial - // - `IQD` - Iraqi Dinar - // - `IEP` - Irish Pound - // - `ILS` - Israeli New Shekel - // - `ILP` - Israeli Pound - // - `ILR` - Israeli Shekel (1980–1985) - // - `ITL` - Italian Lira - // - `JMD` - Jamaican Dollar - // - `JPY` - Japanese Yen - // - `JOD` - Jordanian Dinar - // - `KZT` - Kazakhstani Tenge - // - `KES` - Kenyan Shilling - // - `KWD` - Kuwaiti Dinar - // - `KGS` - Kyrgystani Som - // - `LAK` - Laotian Kip - // - `LVL` - Latvian Lats - // - `LVR` - Latvian Ruble - // - `LBP` - Lebanese Pound - // - `LSL` - Lesotho Loti - // - `LRD` - Liberian Dollar - // - `LYD` - Libyan Dinar - // - `LTL` - Lithuanian Litas - // - `LTT` - Lithuanian Talonas - // - `LUL` - Luxembourg Financial Franc - // - `LUC` - Luxembourgian Convertible Franc - // - `LUF` - Luxembourgian Franc - // - `MOP` - Macanese Pataca - // - `MKD` - Macedonian Denar - // - `MKN` - Macedonian Denar (1992–1993) - // - `MGA` - Malagasy Ariary - // - `MGF` - Malagasy Franc - // - `MWK` - Malawian Kwacha - // - `MYR` - Malaysian Ringgit - // - `MVR` - Maldivian Rufiyaa - // - `MVP` - Maldivian Rupee (1947–1981) - // - `MLF` - Malian Franc - // - `MTL` - Maltese Lira - // - `MTP` - Maltese Pound - // - `MRU` - Mauritanian Ouguiya - // - `MRO` - Mauritanian Ouguiya (1973–2017) - // - `MUR` - Mauritian Rupee - // - `MXV` - Mexican Investment Unit - // - `MXN` - Mexican Peso - // - `MXP` - Mexican Silver Peso (1861–1992) - // - `MDC` - Moldovan Cupon - // - `MDL` - Moldovan Leu - // - `MCF` - Monegasque Franc - // - `MNT` - Mongolian Tugrik - // - `MAD` - Moroccan Dirham - // - `MAF` - Moroccan Franc - // - `MZE` - Mozambican Escudo - // - `MZN` - Mozambican Metical - // - `MZM` - Mozambican Metical (1980–2006) - // - `MMK` - Myanmar Kyat - // - `NAD` - Namibian Dollar - // - `NPR` - Nepalese Rupee - // - `ANG` - Netherlands Antillean Guilder - // - `TWD` - New Taiwan Dollar - // - `NZD` - New Zealand Dollar - // - `NIO` - Nicaraguan Córdoba - // - `NIC` - Nicaraguan Córdoba (1988–1991) - // - `NGN` - Nigerian Naira - // - `KPW` - North Korean Won - // - `NOK` - Norwegian Krone - // - `OMR` - Omani Rial - // - `PKR` - Pakistani Rupee - // - `XPD` - Palladium - // - `PAB` - Panamanian Balboa - // - `PGK` - Papua New Guinean Kina - // - `PYG` - Paraguayan Guarani - // - `PEI` - Peruvian Inti - // - `PEN` - Peruvian Sol - // - `PES` - Peruvian Sol (1863–1965) - // - `PHP` - Philippine Peso - // - `XPT` - Platinum - // - `PLN` - Polish Zloty - // - `PLZ` - Polish Zloty (1950–1995) - // - `PTE` - Portuguese Escudo - // - `GWE` - Portuguese Guinea Escudo - // - `QAR` - Qatari Rial - // - `XRE` - RINET Funds - // - `RHD` - Rhodesian Dollar - // - `RON` - Romanian Leu - // - `ROL` - Romanian Leu (1952–2006) - // - `RUB` - Russian Ruble - // - `RUR` - Russian Ruble (1991–1998) - // - `RWF` - Rwandan Franc - // - `SVC` - Salvadoran Colón - // - `WST` - Samoan Tala - // - `SAR` - Saudi Riyal - // - `RSD` - Serbian Dinar - // - `CSD` - Serbian Dinar (2002–2006) - // - `SCR` - Seychellois Rupee - // - `SLL` - Sierra Leonean Leone - // - `XAG` - Silver - // - `SGD` - Singapore Dollar - // - `SKK` - Slovak Koruna - // - `SIT` - Slovenian Tolar - // - `SBD` - Solomon Islands Dollar - // - `SOS` - Somali Shilling - // - `ZAR` - South African Rand - // - `ZAL` - South African Rand (financial) - // - `KRH` - South Korean Hwan (1953–1962) - // - `KRW` - South Korean Won - // - `KRO` - South Korean Won (1945–1953) - // - `SSP` - South Sudanese Pound - // - `SUR` - Soviet Rouble - // - `ESP` - Spanish Peseta - // - `ESA` - Spanish Peseta (A account) - // - `ESB` - Spanish Peseta (convertible account) - // - `XDR` - Special Drawing Rights - // - `LKR` - Sri Lankan Rupee - // - `SHP` - St. Helena Pound - // - `XSU` - Sucre - // - `SDD` - Sudanese Dinar (1992–2007) - // - `SDG` - Sudanese Pound - // - `SDP` - Sudanese Pound (1957–1998) - // - `SRD` - Surinamese Dollar - // - `SRG` - Surinamese Guilder - // - `SZL` - Swazi Lilangeni - // - `SEK` - Swedish Krona - // - `CHF` - Swiss Franc - // - `SYP` - Syrian Pound - // - `STN` - São Tomé & Príncipe Dobra - // - `STD` - São Tomé & Príncipe Dobra (1977–2017) - // - `TVD` - TVD - // - `TJR` - Tajikistani Ruble - // - `TJS` - Tajikistani Somoni - // - `TZS` - Tanzanian Shilling - // - `XTS` - Testing Currency Code - // - `THB` - Thai Baht - // - `XXX` - The codes assigned for transactions where no currency is involved - // - `TPE` - Timorese Escudo - // - `TOP` - Tongan Paʻanga - // - `TTD` - Trinidad & Tobago Dollar - // - `TND` - Tunisian Dinar - // - `TRY` - Turkish Lira - // - `TRL` - Turkish Lira (1922–2005) - // - `TMT` - Turkmenistani Manat - // - `TMM` - Turkmenistani Manat (1993–2009) - // - `USD` - US Dollar - // - `USN` - US Dollar (Next day) - // - `USS` - US Dollar (Same day) - // - `UGX` - Ugandan Shilling - // - `UGS` - Ugandan Shilling (1966–1987) - // - `UAH` - Ukrainian Hryvnia - // - `UAK` - Ukrainian Karbovanets - // - `AED` - United Arab Emirates Dirham - // - `UYW` - Uruguayan Nominal Wage Index Unit - // - `UYU` - Uruguayan Peso - // - `UYP` - Uruguayan Peso (1975–1993) - // - `UYI` - Uruguayan Peso (Indexed Units) - // - `UZS` - Uzbekistani Som - // - `VUV` - Vanuatu Vatu - // - `VES` - Venezuelan Bolívar - // - `VEB` - Venezuelan Bolívar (1871–2008) - // - `VEF` - Venezuelan Bolívar (2008–2018) - // - `VND` - Vietnamese Dong - // - `VNN` - Vietnamese Dong (1978–1985) - // - `CHE` - WIR Euro - // - `CHW` - WIR Franc - // - `XOF` - West African CFA Franc - // - `YDD` - Yemeni Dinar - // - `YER` - Yemeni Rial - // - `YUN` - Yugoslavian Convertible Dinar (1990–1992) - // - `YUD` - Yugoslavian Hard Dinar (1966–1990) - // - `YUM` - Yugoslavian New Dinar (1994–2002) - // - `YUR` - Yugoslavian Reformed Dinar (1992–1993) - // - `ZWN` - ZWN - // - `ZRN` - Zairean New Zaire (1993–1998) - // - `ZRZ` - Zairean Zaire (1971–1993) - // - `ZMW` - Zambian Kwacha - // - `ZMK` - Zambian Kwacha (1968–2012) - // - `ZWD` - Zimbabwean Dollar (1980–2008) - // - `ZWR` - Zimbabwean Dollar (2008) - // - `ZWL` - Zimbabwean Dollar (2009) - Currency *InvoiceLineItemCurrency `json:"currency,omitempty"` - // The line item's exchange rate. - ExchangeRate *string `json:"exchange_rate,omitempty"` - Item *InvoiceLineItemItem `json:"item,omitempty"` - Account *InvoiceLineItemAccount `json:"account,omitempty"` - // The tax rate that applies to this line item. - TaxRate *string `json:"tax_rate,omitempty"` - TrackingCategory *InvoiceLineItemTrackingCategory `json:"tracking_category,omitempty"` - // The invoice line item's associated tracking categories. - TrackingCategories []*InvoiceLineItemTrackingCategoriesItem `json:"tracking_categories,omitempty"` - // The company the invoice belongs to. - Company *string `json:"company,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteFields []*RemoteField `json:"remote_fields,omitempty"` +func (c *CreditNote) GetRemoteData() []*RemoteData { + if c == nil { + return nil + } + return c.RemoteData +} - _rawJSON json.RawMessage +func (c *CreditNote) GetExtraProperties() map[string]interface{} { + return c.extraProperties } -func (i *InvoiceLineItem) UnmarshalJSON(data []byte) error { - type unmarshaler InvoiceLineItem - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { +func (c *CreditNote) UnmarshalJSON(data []byte) error { + type embed CreditNote + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + TransactionDate *internal.DateTime `json:"transaction_date,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + RemoteUpdatedAt *internal.DateTime `json:"remote_updated_at,omitempty"` + }{ + embed: embed(*c), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { return err } - *i = InvoiceLineItem(value) - i._rawJSON = json.RawMessage(data) + *c = CreditNote(unmarshaler.embed) + c.CreatedAt = unmarshaler.CreatedAt.TimePtr() + c.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + c.TransactionDate = unmarshaler.TransactionDate.TimePtr() + c.RemoteCreatedAt = unmarshaler.RemoteCreatedAt.TimePtr() + c.RemoteUpdatedAt = unmarshaler.RemoteUpdatedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *c) + if err != nil { + return err + } + c.extraProperties = extraProperties + c.rawJSON = json.RawMessage(data) return nil } -func (i *InvoiceLineItem) String() string { - if len(i._rawJSON) > 0 { - if value, err := core.StringifyJSON(i._rawJSON); err == nil { +func (c *CreditNote) MarshalJSON() ([]byte, error) { + type embed CreditNote + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + TransactionDate *internal.DateTime `json:"transaction_date,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + RemoteUpdatedAt *internal.DateTime `json:"remote_updated_at,omitempty"` + }{ + embed: embed(*c), + CreatedAt: internal.NewOptionalDateTime(c.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(c.ModifiedAt), + TransactionDate: internal.NewOptionalDateTime(c.TransactionDate), + RemoteCreatedAt: internal.NewOptionalDateTime(c.RemoteCreatedAt), + RemoteUpdatedAt: internal.NewOptionalDateTime(c.RemoteUpdatedAt), + } + return json.Marshal(marshaler) +} + +func (c *CreditNote) String() string { + if len(c.rawJSON) > 0 { + if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(i); err == nil { + if value, err := internal.StringifyJSON(c); err == nil { return value } - return fmt.Sprintf("%#v", i) + return fmt.Sprintf("%#v", c) } -type InvoiceLineItemAccount struct { - typeName string - String string - Account *Account +// The accounting period that the CreditNote was generated in. +type CreditNoteAccountingPeriod struct { + String string + AccountingPeriod *AccountingPeriod + + typ string } -func NewInvoiceLineItemAccountFromString(value string) *InvoiceLineItemAccount { - return &InvoiceLineItemAccount{typeName: "string", String: value} +func (c *CreditNoteAccountingPeriod) GetString() string { + if c == nil { + return "" + } + return c.String } -func NewInvoiceLineItemAccountFromAccount(value *Account) *InvoiceLineItemAccount { - return &InvoiceLineItemAccount{typeName: "account", Account: value} +func (c *CreditNoteAccountingPeriod) GetAccountingPeriod() *AccountingPeriod { + if c == nil { + return nil + } + return c.AccountingPeriod } -func (i *InvoiceLineItemAccount) UnmarshalJSON(data []byte) error { +func (c *CreditNoteAccountingPeriod) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - i.typeName = "string" - i.String = valueString + c.typ = "String" + c.String = valueString return nil } - valueAccount := new(Account) - if err := json.Unmarshal(data, &valueAccount); err == nil { - i.typeName = "account" - i.Account = valueAccount + valueAccountingPeriod := new(AccountingPeriod) + if err := json.Unmarshal(data, &valueAccountingPeriod); err == nil { + c.typ = "AccountingPeriod" + c.AccountingPeriod = valueAccountingPeriod return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, i) + return fmt.Errorf("%s cannot be deserialized as a %T", data, c) } -func (i InvoiceLineItemAccount) MarshalJSON() ([]byte, error) { - switch i.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return json.Marshal(i.String) - case "account": - return json.Marshal(i.Account) +func (c CreditNoteAccountingPeriod) MarshalJSON() ([]byte, error) { + if c.typ == "String" || c.String != "" { + return json.Marshal(c.String) + } + if c.typ == "AccountingPeriod" || c.AccountingPeriod != nil { + return json.Marshal(c.AccountingPeriod) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", c) } -type InvoiceLineItemAccountVisitor interface { +type CreditNoteAccountingPeriodVisitor interface { VisitString(string) error - VisitAccount(*Account) error + VisitAccountingPeriod(*AccountingPeriod) error } -func (i *InvoiceLineItemAccount) Accept(visitor InvoiceLineItemAccountVisitor) error { - switch i.typeName { - default: - return fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return visitor.VisitString(i.String) - case "account": - return visitor.VisitAccount(i.Account) +func (c *CreditNoteAccountingPeriod) Accept(visitor CreditNoteAccountingPeriodVisitor) error { + if c.typ == "String" || c.String != "" { + return visitor.VisitString(c.String) + } + if c.typ == "AccountingPeriod" || c.AccountingPeriod != nil { + return visitor.VisitAccountingPeriod(c.AccountingPeriod) } + return fmt.Errorf("type %T does not include a non-empty union type", c) } -// The line item's currency. -// -// - `XUA` - ADB Unit of Account -// - `AFN` - Afghan Afghani -// - `AFA` - Afghan Afghani (1927–2002) -// - `ALL` - Albanian Lek -// - `ALK` - Albanian Lek (1946–1965) -// - `DZD` - Algerian Dinar -// - `ADP` - Andorran Peseta -// - `AOA` - Angolan Kwanza -// - `AOK` - Angolan Kwanza (1977–1991) -// - `AON` - Angolan New Kwanza (1990–2000) -// - `AOR` - Angolan Readjusted Kwanza (1995–1999) -// - `ARA` - Argentine Austral -// - `ARS` - Argentine Peso -// - `ARM` - Argentine Peso (1881–1970) -// - `ARP` - Argentine Peso (1983–1985) -// - `ARL` - Argentine Peso Ley (1970–1983) -// - `AMD` - Armenian Dram -// - `AWG` - Aruban Florin -// - `AUD` - Australian Dollar -// - `ATS` - Austrian Schilling -// - `AZN` - Azerbaijani Manat -// - `AZM` - Azerbaijani Manat (1993–2006) -// - `BSD` - Bahamian Dollar -// - `BHD` - Bahraini Dinar -// - `BDT` - Bangladeshi Taka -// - `BBD` - Barbadian Dollar -// - `BYN` - Belarusian Ruble -// - `BYB` - Belarusian Ruble (1994–1999) -// - `BYR` - Belarusian Ruble (2000–2016) -// - `BEF` - Belgian Franc -// - `BEC` - Belgian Franc (convertible) -// - `BEL` - Belgian Franc (financial) -// - `BZD` - Belize Dollar -// - `BMD` - Bermudan Dollar -// - `BTN` - Bhutanese Ngultrum -// - `BOB` - Bolivian Boliviano -// - `BOL` - Bolivian Boliviano (1863–1963) -// - `BOV` - Bolivian Mvdol -// - `BOP` - Bolivian Peso -// - `BAM` - Bosnia-Herzegovina Convertible Mark -// - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) -// - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) -// - `BWP` - Botswanan Pula -// - `BRC` - Brazilian Cruzado (1986–1989) -// - `BRZ` - Brazilian Cruzeiro (1942–1967) -// - `BRE` - Brazilian Cruzeiro (1990–1993) -// - `BRR` - Brazilian Cruzeiro (1993–1994) -// - `BRN` - Brazilian New Cruzado (1989–1990) -// - `BRB` - Brazilian New Cruzeiro (1967–1986) -// - `BRL` - Brazilian Real -// - `GBP` - British Pound -// - `BND` - Brunei Dollar -// - `BGL` - Bulgarian Hard Lev -// - `BGN` - Bulgarian Lev -// - `BGO` - Bulgarian Lev (1879–1952) -// - `BGM` - Bulgarian Socialist Lev -// - `BUK` - Burmese Kyat -// - `BIF` - Burundian Franc -// - `XPF` - CFP Franc -// - `KHR` - Cambodian Riel -// - `CAD` - Canadian Dollar -// - `CVE` - Cape Verdean Escudo -// - `KYD` - Cayman Islands Dollar -// - `XAF` - Central African CFA Franc -// - `CLE` - Chilean Escudo -// - `CLP` - Chilean Peso -// - `CLF` - Chilean Unit of Account (UF) -// - `CNX` - Chinese People’s Bank Dollar -// - `CNY` - Chinese Yuan -// - `CNH` - Chinese Yuan (offshore) -// - `COP` - Colombian Peso -// - `COU` - Colombian Real Value Unit -// - `KMF` - Comorian Franc -// - `CDF` - Congolese Franc -// - `CRC` - Costa Rican Colón -// - `HRD` - Croatian Dinar -// - `HRK` - Croatian Kuna -// - `CUC` - Cuban Convertible Peso -// - `CUP` - Cuban Peso -// - `CYP` - Cypriot Pound -// - `CZK` - Czech Koruna -// - `CSK` - Czechoslovak Hard Koruna -// - `DKK` - Danish Krone -// - `DJF` - Djiboutian Franc -// - `DOP` - Dominican Peso -// - `NLG` - Dutch Guilder -// - `XCD` - East Caribbean Dollar -// - `DDM` - East German Mark -// - `ECS` - Ecuadorian Sucre -// - `ECV` - Ecuadorian Unit of Constant Value -// - `EGP` - Egyptian Pound -// - `GQE` - Equatorial Guinean Ekwele -// - `ERN` - Eritrean Nakfa -// - `EEK` - Estonian Kroon -// - `ETB` - Ethiopian Birr -// - `EUR` - Euro -// - `XBA` - European Composite Unit -// - `XEU` - European Currency Unit -// - `XBB` - European Monetary Unit -// - `XBC` - European Unit of Account (XBC) -// - `XBD` - European Unit of Account (XBD) -// - `FKP` - Falkland Islands Pound -// - `FJD` - Fijian Dollar -// - `FIM` - Finnish Markka -// - `FRF` - French Franc -// - `XFO` - French Gold Franc -// - `XFU` - French UIC-Franc -// - `GMD` - Gambian Dalasi -// - `GEK` - Georgian Kupon Larit -// - `GEL` - Georgian Lari -// - `DEM` - German Mark -// - `GHS` - Ghanaian Cedi -// - `GHC` - Ghanaian Cedi (1979–2007) -// - `GIP` - Gibraltar Pound -// - `XAU` - Gold -// - `GRD` - Greek Drachma -// - `GTQ` - Guatemalan Quetzal -// - `GWP` - Guinea-Bissau Peso -// - `GNF` - Guinean Franc -// - `GNS` - Guinean Syli -// - `GYD` - Guyanaese Dollar -// - `HTG` - Haitian Gourde -// - `HNL` - Honduran Lempira -// - `HKD` - Hong Kong Dollar -// - `HUF` - Hungarian Forint -// - `IMP` - IMP -// - `ISK` - Icelandic Króna -// - `ISJ` - Icelandic Króna (1918–1981) -// - `INR` - Indian Rupee -// - `IDR` - Indonesian Rupiah -// - `IRR` - Iranian Rial -// - `IQD` - Iraqi Dinar -// - `IEP` - Irish Pound -// - `ILS` - Israeli New Shekel -// - `ILP` - Israeli Pound -// - `ILR` - Israeli Shekel (1980–1985) -// - `ITL` - Italian Lira -// - `JMD` - Jamaican Dollar -// - `JPY` - Japanese Yen -// - `JOD` - Jordanian Dinar -// - `KZT` - Kazakhstani Tenge -// - `KES` - Kenyan Shilling -// - `KWD` - Kuwaiti Dinar -// - `KGS` - Kyrgystani Som -// - `LAK` - Laotian Kip -// - `LVL` - Latvian Lats -// - `LVR` - Latvian Ruble -// - `LBP` - Lebanese Pound -// - `LSL` - Lesotho Loti -// - `LRD` - Liberian Dollar -// - `LYD` - Libyan Dinar -// - `LTL` - Lithuanian Litas -// - `LTT` - Lithuanian Talonas -// - `LUL` - Luxembourg Financial Franc -// - `LUC` - Luxembourgian Convertible Franc -// - `LUF` - Luxembourgian Franc -// - `MOP` - Macanese Pataca -// - `MKD` - Macedonian Denar -// - `MKN` - Macedonian Denar (1992–1993) -// - `MGA` - Malagasy Ariary -// - `MGF` - Malagasy Franc -// - `MWK` - Malawian Kwacha -// - `MYR` - Malaysian Ringgit -// - `MVR` - Maldivian Rufiyaa -// - `MVP` - Maldivian Rupee (1947–1981) -// - `MLF` - Malian Franc -// - `MTL` - Maltese Lira -// - `MTP` - Maltese Pound -// - `MRU` - Mauritanian Ouguiya -// - `MRO` - Mauritanian Ouguiya (1973–2017) -// - `MUR` - Mauritian Rupee -// - `MXV` - Mexican Investment Unit -// - `MXN` - Mexican Peso -// - `MXP` - Mexican Silver Peso (1861–1992) -// - `MDC` - Moldovan Cupon -// - `MDL` - Moldovan Leu -// - `MCF` - Monegasque Franc -// - `MNT` - Mongolian Tugrik -// - `MAD` - Moroccan Dirham -// - `MAF` - Moroccan Franc -// - `MZE` - Mozambican Escudo -// - `MZN` - Mozambican Metical -// - `MZM` - Mozambican Metical (1980–2006) -// - `MMK` - Myanmar Kyat -// - `NAD` - Namibian Dollar -// - `NPR` - Nepalese Rupee -// - `ANG` - Netherlands Antillean Guilder -// - `TWD` - New Taiwan Dollar -// - `NZD` - New Zealand Dollar -// - `NIO` - Nicaraguan Córdoba -// - `NIC` - Nicaraguan Córdoba (1988–1991) -// - `NGN` - Nigerian Naira -// - `KPW` - North Korean Won -// - `NOK` - Norwegian Krone -// - `OMR` - Omani Rial -// - `PKR` - Pakistani Rupee -// - `XPD` - Palladium -// - `PAB` - Panamanian Balboa -// - `PGK` - Papua New Guinean Kina -// - `PYG` - Paraguayan Guarani -// - `PEI` - Peruvian Inti -// - `PEN` - Peruvian Sol -// - `PES` - Peruvian Sol (1863–1965) -// - `PHP` - Philippine Peso -// - `XPT` - Platinum -// - `PLN` - Polish Zloty -// - `PLZ` - Polish Zloty (1950–1995) -// - `PTE` - Portuguese Escudo -// - `GWE` - Portuguese Guinea Escudo -// - `QAR` - Qatari Rial -// - `XRE` - RINET Funds -// - `RHD` - Rhodesian Dollar -// - `RON` - Romanian Leu -// - `ROL` - Romanian Leu (1952–2006) -// - `RUB` - Russian Ruble -// - `RUR` - Russian Ruble (1991–1998) -// - `RWF` - Rwandan Franc -// - `SVC` - Salvadoran Colón -// - `WST` - Samoan Tala -// - `SAR` - Saudi Riyal -// - `RSD` - Serbian Dinar -// - `CSD` - Serbian Dinar (2002–2006) -// - `SCR` - Seychellois Rupee -// - `SLL` - Sierra Leonean Leone -// - `XAG` - Silver -// - `SGD` - Singapore Dollar -// - `SKK` - Slovak Koruna -// - `SIT` - Slovenian Tolar -// - `SBD` - Solomon Islands Dollar -// - `SOS` - Somali Shilling -// - `ZAR` - South African Rand -// - `ZAL` - South African Rand (financial) -// - `KRH` - South Korean Hwan (1953–1962) -// - `KRW` - South Korean Won -// - `KRO` - South Korean Won (1945–1953) -// - `SSP` - South Sudanese Pound -// - `SUR` - Soviet Rouble -// - `ESP` - Spanish Peseta -// - `ESA` - Spanish Peseta (A account) -// - `ESB` - Spanish Peseta (convertible account) -// - `XDR` - Special Drawing Rights -// - `LKR` - Sri Lankan Rupee -// - `SHP` - St. Helena Pound -// - `XSU` - Sucre -// - `SDD` - Sudanese Dinar (1992–2007) -// - `SDG` - Sudanese Pound -// - `SDP` - Sudanese Pound (1957–1998) -// - `SRD` - Surinamese Dollar -// - `SRG` - Surinamese Guilder -// - `SZL` - Swazi Lilangeni -// - `SEK` - Swedish Krona -// - `CHF` - Swiss Franc -// - `SYP` - Syrian Pound -// - `STN` - São Tomé & Príncipe Dobra -// - `STD` - São Tomé & Príncipe Dobra (1977–2017) -// - `TVD` - TVD -// - `TJR` - Tajikistani Ruble -// - `TJS` - Tajikistani Somoni -// - `TZS` - Tanzanian Shilling -// - `XTS` - Testing Currency Code -// - `THB` - Thai Baht -// - `XXX` - The codes assigned for transactions where no currency is involved -// - `TPE` - Timorese Escudo -// - `TOP` - Tongan Paʻanga -// - `TTD` - Trinidad & Tobago Dollar -// - `TND` - Tunisian Dinar -// - `TRY` - Turkish Lira -// - `TRL` - Turkish Lira (1922–2005) -// - `TMT` - Turkmenistani Manat -// - `TMM` - Turkmenistani Manat (1993–2009) -// - `USD` - US Dollar -// - `USN` - US Dollar (Next day) -// - `USS` - US Dollar (Same day) -// - `UGX` - Ugandan Shilling -// - `UGS` - Ugandan Shilling (1966–1987) -// - `UAH` - Ukrainian Hryvnia -// - `UAK` - Ukrainian Karbovanets -// - `AED` - United Arab Emirates Dirham -// - `UYW` - Uruguayan Nominal Wage Index Unit -// - `UYU` - Uruguayan Peso -// - `UYP` - Uruguayan Peso (1975–1993) -// - `UYI` - Uruguayan Peso (Indexed Units) -// - `UZS` - Uzbekistani Som -// - `VUV` - Vanuatu Vatu -// - `VES` - Venezuelan Bolívar -// - `VEB` - Venezuelan Bolívar (1871–2008) -// - `VEF` - Venezuelan Bolívar (2008–2018) -// - `VND` - Vietnamese Dong -// - `VNN` - Vietnamese Dong (1978–1985) -// - `CHE` - WIR Euro -// - `CHW` - WIR Franc -// - `XOF` - West African CFA Franc -// - `YDD` - Yemeni Dinar -// - `YER` - Yemeni Rial -// - `YUN` - Yugoslavian Convertible Dinar (1990–1992) -// - `YUD` - Yugoslavian Hard Dinar (1966–1990) -// - `YUM` - Yugoslavian New Dinar (1994–2002) -// - `YUR` - Yugoslavian Reformed Dinar (1992–1993) -// - `ZWN` - ZWN -// - `ZRN` - Zairean New Zaire (1993–1998) -// - `ZRZ` - Zairean Zaire (1971–1993) -// - `ZMW` - Zambian Kwacha -// - `ZMK` - Zambian Kwacha (1968–2012) -// - `ZWD` - Zimbabwean Dollar (1980–2008) -// - `ZWR` - Zimbabwean Dollar (2008) -// - `ZWL` - Zimbabwean Dollar (2009) -type InvoiceLineItemCurrency struct { - typeName string - TransactionCurrencyEnum TransactionCurrencyEnum - String string -} +type CreditNoteAppliedPaymentsItem struct { + String string + PaymentLineItem *PaymentLineItem -func NewInvoiceLineItemCurrencyFromTransactionCurrencyEnum(value TransactionCurrencyEnum) *InvoiceLineItemCurrency { - return &InvoiceLineItemCurrency{typeName: "transactionCurrencyEnum", TransactionCurrencyEnum: value} + typ string } -func NewInvoiceLineItemCurrencyFromString(value string) *InvoiceLineItemCurrency { - return &InvoiceLineItemCurrency{typeName: "string", String: value} +func (c *CreditNoteAppliedPaymentsItem) GetString() string { + if c == nil { + return "" + } + return c.String } -func (i *InvoiceLineItemCurrency) UnmarshalJSON(data []byte) error { - var valueTransactionCurrencyEnum TransactionCurrencyEnum - if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { - i.typeName = "transactionCurrencyEnum" - i.TransactionCurrencyEnum = valueTransactionCurrencyEnum +func (c *CreditNoteAppliedPaymentsItem) GetPaymentLineItem() *PaymentLineItem { + if c == nil { return nil } + return c.PaymentLineItem +} + +func (c *CreditNoteAppliedPaymentsItem) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - i.typeName = "string" - i.String = valueString + c.typ = "String" + c.String = valueString return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, i) + valuePaymentLineItem := new(PaymentLineItem) + if err := json.Unmarshal(data, &valuePaymentLineItem); err == nil { + c.typ = "PaymentLineItem" + c.PaymentLineItem = valuePaymentLineItem + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, c) } -func (i InvoiceLineItemCurrency) MarshalJSON() ([]byte, error) { - switch i.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "transactionCurrencyEnum": - return json.Marshal(i.TransactionCurrencyEnum) - case "string": - return json.Marshal(i.String) +func (c CreditNoteAppliedPaymentsItem) MarshalJSON() ([]byte, error) { + if c.typ == "String" || c.String != "" { + return json.Marshal(c.String) + } + if c.typ == "PaymentLineItem" || c.PaymentLineItem != nil { + return json.Marshal(c.PaymentLineItem) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", c) } -type InvoiceLineItemCurrencyVisitor interface { - VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error +type CreditNoteAppliedPaymentsItemVisitor interface { VisitString(string) error + VisitPaymentLineItem(*PaymentLineItem) error } -func (i *InvoiceLineItemCurrency) Accept(visitor InvoiceLineItemCurrencyVisitor) error { - switch i.typeName { - default: - return fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "transactionCurrencyEnum": - return visitor.VisitTransactionCurrencyEnum(i.TransactionCurrencyEnum) - case "string": - return visitor.VisitString(i.String) +func (c *CreditNoteAppliedPaymentsItem) Accept(visitor CreditNoteAppliedPaymentsItemVisitor) error { + if c.typ == "String" || c.String != "" { + return visitor.VisitString(c.String) + } + if c.typ == "PaymentLineItem" || c.PaymentLineItem != nil { + return visitor.VisitPaymentLineItem(c.PaymentLineItem) } + return fmt.Errorf("type %T does not include a non-empty union type", c) } -// The employee this overall transaction relates to. -type InvoiceLineItemEmployee struct { - typeName string - String string - Employee *Employee +// # The CreditNoteApplyLine Object +// ### Description +// The `CreditNoteApplyLine` is attached to the CreditNote model. +// +// ### Usage Example +// Fetch from the `GET CreditNote` endpoint and view the invoice's applied to lines. +type CreditNoteApplyLineForCreditNote struct { + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + Invoice *CreditNoteApplyLineForCreditNoteInvoice `json:"invoice,omitempty" url:"invoice,omitempty"` + // Date that the credit note is applied to the invoice. + AppliedDate *time.Time `json:"applied_date,omitempty" url:"applied_date,omitempty"` + // The amount of the Credit Note applied to the invoice. + AppliedAmount *string `json:"applied_amount,omitempty" url:"applied_amount,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func NewInvoiceLineItemEmployeeFromString(value string) *InvoiceLineItemEmployee { - return &InvoiceLineItemEmployee{typeName: "string", String: value} +func (c *CreditNoteApplyLineForCreditNote) GetRemoteId() *string { + if c == nil { + return nil + } + return c.RemoteId } -func NewInvoiceLineItemEmployeeFromEmployee(value *Employee) *InvoiceLineItemEmployee { - return &InvoiceLineItemEmployee{typeName: "employee", Employee: value} +func (c *CreditNoteApplyLineForCreditNote) GetCreatedAt() *time.Time { + if c == nil { + return nil + } + return c.CreatedAt } -func (i *InvoiceLineItemEmployee) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - i.typeName = "string" - i.String = valueString +func (c *CreditNoteApplyLineForCreditNote) GetModifiedAt() *time.Time { + if c == nil { return nil } - valueEmployee := new(Employee) - if err := json.Unmarshal(data, &valueEmployee); err == nil { - i.typeName = "employee" - i.Employee = valueEmployee + return c.ModifiedAt +} + +func (c *CreditNoteApplyLineForCreditNote) GetInvoice() *CreditNoteApplyLineForCreditNoteInvoice { + if c == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, i) + return c.Invoice } -func (i InvoiceLineItemEmployee) MarshalJSON() ([]byte, error) { - switch i.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return json.Marshal(i.String) - case "employee": - return json.Marshal(i.Employee) +func (c *CreditNoteApplyLineForCreditNote) GetAppliedDate() *time.Time { + if c == nil { + return nil } + return c.AppliedDate } -type InvoiceLineItemEmployeeVisitor interface { - VisitString(string) error - VisitEmployee(*Employee) error +func (c *CreditNoteApplyLineForCreditNote) GetAppliedAmount() *string { + if c == nil { + return nil + } + return c.AppliedAmount } -func (i *InvoiceLineItemEmployee) Accept(visitor InvoiceLineItemEmployeeVisitor) error { - switch i.typeName { - default: - return fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return visitor.VisitString(i.String) - case "employee": - return visitor.VisitEmployee(i.Employee) +func (c *CreditNoteApplyLineForCreditNote) GetRemoteWasDeleted() *bool { + if c == nil { + return nil } + return c.RemoteWasDeleted } -type InvoiceLineItemItem struct { - typeName string - String string - Item *Item +func (c *CreditNoteApplyLineForCreditNote) GetExtraProperties() map[string]interface{} { + return c.extraProperties } -func NewInvoiceLineItemItemFromString(value string) *InvoiceLineItemItem { - return &InvoiceLineItemItem{typeName: "string", String: value} +func (c *CreditNoteApplyLineForCreditNote) UnmarshalJSON(data []byte) error { + type embed CreditNoteApplyLineForCreditNote + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + AppliedDate *internal.DateTime `json:"applied_date,omitempty"` + }{ + embed: embed(*c), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *c = CreditNoteApplyLineForCreditNote(unmarshaler.embed) + c.CreatedAt = unmarshaler.CreatedAt.TimePtr() + c.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + c.AppliedDate = unmarshaler.AppliedDate.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *c) + if err != nil { + return err + } + c.extraProperties = extraProperties + c.rawJSON = json.RawMessage(data) + return nil } -func NewInvoiceLineItemItemFromItem(value *Item) *InvoiceLineItemItem { - return &InvoiceLineItemItem{typeName: "item", Item: value} +func (c *CreditNoteApplyLineForCreditNote) MarshalJSON() ([]byte, error) { + type embed CreditNoteApplyLineForCreditNote + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + AppliedDate *internal.DateTime `json:"applied_date,omitempty"` + }{ + embed: embed(*c), + CreatedAt: internal.NewOptionalDateTime(c.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(c.ModifiedAt), + AppliedDate: internal.NewOptionalDateTime(c.AppliedDate), + } + return json.Marshal(marshaler) } -func (i *InvoiceLineItemItem) UnmarshalJSON(data []byte) error { +func (c *CreditNoteApplyLineForCreditNote) String() string { + if len(c.rawJSON) > 0 { + if value, err := internal.StringifyJSON(c.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(c); err == nil { + return value + } + return fmt.Sprintf("%#v", c) +} + +type CreditNoteApplyLineForCreditNoteInvoice struct { + String string + Invoice *Invoice + + typ string +} + +func (c *CreditNoteApplyLineForCreditNoteInvoice) GetString() string { + if c == nil { + return "" + } + return c.String +} + +func (c *CreditNoteApplyLineForCreditNoteInvoice) GetInvoice() *Invoice { + if c == nil { + return nil + } + return c.Invoice +} + +func (c *CreditNoteApplyLineForCreditNoteInvoice) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - i.typeName = "string" - i.String = valueString + c.typ = "String" + c.String = valueString return nil } - valueItem := new(Item) - if err := json.Unmarshal(data, &valueItem); err == nil { - i.typeName = "item" - i.Item = valueItem + valueInvoice := new(Invoice) + if err := json.Unmarshal(data, &valueInvoice); err == nil { + c.typ = "Invoice" + c.Invoice = valueInvoice return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, i) + return fmt.Errorf("%s cannot be deserialized as a %T", data, c) } -func (i InvoiceLineItemItem) MarshalJSON() ([]byte, error) { - switch i.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return json.Marshal(i.String) - case "item": - return json.Marshal(i.Item) +func (c CreditNoteApplyLineForCreditNoteInvoice) MarshalJSON() ([]byte, error) { + if c.typ == "String" || c.String != "" { + return json.Marshal(c.String) + } + if c.typ == "Invoice" || c.Invoice != nil { + return json.Marshal(c.Invoice) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", c) } -type InvoiceLineItemItemVisitor interface { +type CreditNoteApplyLineForCreditNoteInvoiceVisitor interface { VisitString(string) error - VisitItem(*Item) error + VisitInvoice(*Invoice) error } -func (i *InvoiceLineItemItem) Accept(visitor InvoiceLineItemItemVisitor) error { - switch i.typeName { - default: - return fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return visitor.VisitString(i.String) - case "item": - return visitor.VisitItem(i.Item) +func (c *CreditNoteApplyLineForCreditNoteInvoice) Accept(visitor CreditNoteApplyLineForCreditNoteInvoiceVisitor) error { + if c.typ == "String" || c.String != "" { + return visitor.VisitString(c.String) + } + if c.typ == "Invoice" || c.Invoice != nil { + return visitor.VisitInvoice(c.Invoice) } + return fmt.Errorf("type %T does not include a non-empty union type", c) } -// # The InvoiceLineItem Object -// +// # The CreditNoteApplyLine Object // ### Description -// -// The `InvoiceLineItem` object represents an itemized record of goods and/or services sold to a customer. +// The `CreditNoteApplyLine` is attached to the CreditNote model. // // ### Usage Example -// -// Fetch from the `GET Invoice` endpoint and view the invoice's line items. -type InvoiceLineItemRequest struct { +// Fetch from the `GET CreditNote` endpoint and view the invoice's applied to lines. +type CreditNoteApplyLineForInvoice struct { // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The line item's description. - Description *string `json:"description,omitempty"` - // The line item's unit price. - UnitPrice *float64 `json:"unit_price,omitempty"` - // The line item's quantity. - Quantity *float64 `json:"quantity,omitempty"` - // The line item's total amount. - TotalAmount *float64 `json:"total_amount,omitempty"` - // The employee this overall transaction relates to. - Employee *InvoiceLineItemRequestEmployee `json:"employee,omitempty"` - // The line item's currency. - // - // - `XUA` - ADB Unit of Account - // - `AFN` - Afghan Afghani - // - `AFA` - Afghan Afghani (1927–2002) - // - `ALL` - Albanian Lek - // - `ALK` - Albanian Lek (1946–1965) - // - `DZD` - Algerian Dinar - // - `ADP` - Andorran Peseta - // - `AOA` - Angolan Kwanza - // - `AOK` - Angolan Kwanza (1977–1991) - // - `AON` - Angolan New Kwanza (1990–2000) - // - `AOR` - Angolan Readjusted Kwanza (1995–1999) - // - `ARA` - Argentine Austral - // - `ARS` - Argentine Peso - // - `ARM` - Argentine Peso (1881–1970) - // - `ARP` - Argentine Peso (1983–1985) - // - `ARL` - Argentine Peso Ley (1970–1983) - // - `AMD` - Armenian Dram - // - `AWG` - Aruban Florin - // - `AUD` - Australian Dollar - // - `ATS` - Austrian Schilling - // - `AZN` - Azerbaijani Manat - // - `AZM` - Azerbaijani Manat (1993–2006) - // - `BSD` - Bahamian Dollar - // - `BHD` - Bahraini Dinar - // - `BDT` - Bangladeshi Taka - // - `BBD` - Barbadian Dollar - // - `BYN` - Belarusian Ruble - // - `BYB` - Belarusian Ruble (1994–1999) - // - `BYR` - Belarusian Ruble (2000–2016) - // - `BEF` - Belgian Franc - // - `BEC` - Belgian Franc (convertible) - // - `BEL` - Belgian Franc (financial) - // - `BZD` - Belize Dollar - // - `BMD` - Bermudan Dollar - // - `BTN` - Bhutanese Ngultrum - // - `BOB` - Bolivian Boliviano - // - `BOL` - Bolivian Boliviano (1863–1963) - // - `BOV` - Bolivian Mvdol - // - `BOP` - Bolivian Peso - // - `BAM` - Bosnia-Herzegovina Convertible Mark - // - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - // - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - // - `BWP` - Botswanan Pula - // - `BRC` - Brazilian Cruzado (1986–1989) - // - `BRZ` - Brazilian Cruzeiro (1942–1967) - // - `BRE` - Brazilian Cruzeiro (1990–1993) - // - `BRR` - Brazilian Cruzeiro (1993–1994) - // - `BRN` - Brazilian New Cruzado (1989–1990) - // - `BRB` - Brazilian New Cruzeiro (1967–1986) - // - `BRL` - Brazilian Real - // - `GBP` - British Pound - // - `BND` - Brunei Dollar - // - `BGL` - Bulgarian Hard Lev - // - `BGN` - Bulgarian Lev - // - `BGO` - Bulgarian Lev (1879–1952) - // - `BGM` - Bulgarian Socialist Lev - // - `BUK` - Burmese Kyat - // - `BIF` - Burundian Franc - // - `XPF` - CFP Franc - // - `KHR` - Cambodian Riel - // - `CAD` - Canadian Dollar - // - `CVE` - Cape Verdean Escudo - // - `KYD` - Cayman Islands Dollar - // - `XAF` - Central African CFA Franc - // - `CLE` - Chilean Escudo - // - `CLP` - Chilean Peso - // - `CLF` - Chilean Unit of Account (UF) - // - `CNX` - Chinese People’s Bank Dollar - // - `CNY` - Chinese Yuan - // - `CNH` - Chinese Yuan (offshore) - // - `COP` - Colombian Peso - // - `COU` - Colombian Real Value Unit - // - `KMF` - Comorian Franc - // - `CDF` - Congolese Franc - // - `CRC` - Costa Rican Colón - // - `HRD` - Croatian Dinar - // - `HRK` - Croatian Kuna - // - `CUC` - Cuban Convertible Peso - // - `CUP` - Cuban Peso - // - `CYP` - Cypriot Pound - // - `CZK` - Czech Koruna - // - `CSK` - Czechoslovak Hard Koruna - // - `DKK` - Danish Krone - // - `DJF` - Djiboutian Franc - // - `DOP` - Dominican Peso - // - `NLG` - Dutch Guilder - // - `XCD` - East Caribbean Dollar - // - `DDM` - East German Mark - // - `ECS` - Ecuadorian Sucre - // - `ECV` - Ecuadorian Unit of Constant Value - // - `EGP` - Egyptian Pound - // - `GQE` - Equatorial Guinean Ekwele - // - `ERN` - Eritrean Nakfa - // - `EEK` - Estonian Kroon - // - `ETB` - Ethiopian Birr - // - `EUR` - Euro - // - `XBA` - European Composite Unit - // - `XEU` - European Currency Unit - // - `XBB` - European Monetary Unit - // - `XBC` - European Unit of Account (XBC) - // - `XBD` - European Unit of Account (XBD) - // - `FKP` - Falkland Islands Pound - // - `FJD` - Fijian Dollar - // - `FIM` - Finnish Markka - // - `FRF` - French Franc - // - `XFO` - French Gold Franc - // - `XFU` - French UIC-Franc - // - `GMD` - Gambian Dalasi - // - `GEK` - Georgian Kupon Larit - // - `GEL` - Georgian Lari - // - `DEM` - German Mark - // - `GHS` - Ghanaian Cedi - // - `GHC` - Ghanaian Cedi (1979–2007) - // - `GIP` - Gibraltar Pound - // - `XAU` - Gold - // - `GRD` - Greek Drachma - // - `GTQ` - Guatemalan Quetzal - // - `GWP` - Guinea-Bissau Peso - // - `GNF` - Guinean Franc - // - `GNS` - Guinean Syli - // - `GYD` - Guyanaese Dollar - // - `HTG` - Haitian Gourde - // - `HNL` - Honduran Lempira - // - `HKD` - Hong Kong Dollar - // - `HUF` - Hungarian Forint - // - `IMP` - IMP - // - `ISK` - Icelandic Króna - // - `ISJ` - Icelandic Króna (1918–1981) - // - `INR` - Indian Rupee - // - `IDR` - Indonesian Rupiah - // - `IRR` - Iranian Rial - // - `IQD` - Iraqi Dinar - // - `IEP` - Irish Pound - // - `ILS` - Israeli New Shekel - // - `ILP` - Israeli Pound - // - `ILR` - Israeli Shekel (1980–1985) - // - `ITL` - Italian Lira - // - `JMD` - Jamaican Dollar - // - `JPY` - Japanese Yen - // - `JOD` - Jordanian Dinar - // - `KZT` - Kazakhstani Tenge - // - `KES` - Kenyan Shilling - // - `KWD` - Kuwaiti Dinar - // - `KGS` - Kyrgystani Som - // - `LAK` - Laotian Kip - // - `LVL` - Latvian Lats - // - `LVR` - Latvian Ruble - // - `LBP` - Lebanese Pound - // - `LSL` - Lesotho Loti - // - `LRD` - Liberian Dollar - // - `LYD` - Libyan Dinar - // - `LTL` - Lithuanian Litas - // - `LTT` - Lithuanian Talonas - // - `LUL` - Luxembourg Financial Franc - // - `LUC` - Luxembourgian Convertible Franc - // - `LUF` - Luxembourgian Franc - // - `MOP` - Macanese Pataca - // - `MKD` - Macedonian Denar - // - `MKN` - Macedonian Denar (1992–1993) - // - `MGA` - Malagasy Ariary - // - `MGF` - Malagasy Franc - // - `MWK` - Malawian Kwacha - // - `MYR` - Malaysian Ringgit - // - `MVR` - Maldivian Rufiyaa - // - `MVP` - Maldivian Rupee (1947–1981) - // - `MLF` - Malian Franc - // - `MTL` - Maltese Lira - // - `MTP` - Maltese Pound - // - `MRU` - Mauritanian Ouguiya - // - `MRO` - Mauritanian Ouguiya (1973–2017) - // - `MUR` - Mauritian Rupee - // - `MXV` - Mexican Investment Unit - // - `MXN` - Mexican Peso - // - `MXP` - Mexican Silver Peso (1861–1992) - // - `MDC` - Moldovan Cupon - // - `MDL` - Moldovan Leu - // - `MCF` - Monegasque Franc - // - `MNT` - Mongolian Tugrik - // - `MAD` - Moroccan Dirham - // - `MAF` - Moroccan Franc - // - `MZE` - Mozambican Escudo - // - `MZN` - Mozambican Metical - // - `MZM` - Mozambican Metical (1980–2006) - // - `MMK` - Myanmar Kyat - // - `NAD` - Namibian Dollar - // - `NPR` - Nepalese Rupee - // - `ANG` - Netherlands Antillean Guilder - // - `TWD` - New Taiwan Dollar - // - `NZD` - New Zealand Dollar - // - `NIO` - Nicaraguan Córdoba - // - `NIC` - Nicaraguan Córdoba (1988–1991) - // - `NGN` - Nigerian Naira - // - `KPW` - North Korean Won - // - `NOK` - Norwegian Krone - // - `OMR` - Omani Rial - // - `PKR` - Pakistani Rupee - // - `XPD` - Palladium - // - `PAB` - Panamanian Balboa - // - `PGK` - Papua New Guinean Kina - // - `PYG` - Paraguayan Guarani - // - `PEI` - Peruvian Inti - // - `PEN` - Peruvian Sol - // - `PES` - Peruvian Sol (1863–1965) - // - `PHP` - Philippine Peso - // - `XPT` - Platinum - // - `PLN` - Polish Zloty - // - `PLZ` - Polish Zloty (1950–1995) - // - `PTE` - Portuguese Escudo - // - `GWE` - Portuguese Guinea Escudo - // - `QAR` - Qatari Rial - // - `XRE` - RINET Funds - // - `RHD` - Rhodesian Dollar - // - `RON` - Romanian Leu - // - `ROL` - Romanian Leu (1952–2006) - // - `RUB` - Russian Ruble - // - `RUR` - Russian Ruble (1991–1998) - // - `RWF` - Rwandan Franc - // - `SVC` - Salvadoran Colón - // - `WST` - Samoan Tala - // - `SAR` - Saudi Riyal - // - `RSD` - Serbian Dinar - // - `CSD` - Serbian Dinar (2002–2006) - // - `SCR` - Seychellois Rupee - // - `SLL` - Sierra Leonean Leone - // - `XAG` - Silver - // - `SGD` - Singapore Dollar - // - `SKK` - Slovak Koruna - // - `SIT` - Slovenian Tolar - // - `SBD` - Solomon Islands Dollar - // - `SOS` - Somali Shilling - // - `ZAR` - South African Rand - // - `ZAL` - South African Rand (financial) - // - `KRH` - South Korean Hwan (1953–1962) - // - `KRW` - South Korean Won - // - `KRO` - South Korean Won (1945–1953) - // - `SSP` - South Sudanese Pound - // - `SUR` - Soviet Rouble - // - `ESP` - Spanish Peseta - // - `ESA` - Spanish Peseta (A account) - // - `ESB` - Spanish Peseta (convertible account) - // - `XDR` - Special Drawing Rights - // - `LKR` - Sri Lankan Rupee - // - `SHP` - St. Helena Pound - // - `XSU` - Sucre - // - `SDD` - Sudanese Dinar (1992–2007) - // - `SDG` - Sudanese Pound - // - `SDP` - Sudanese Pound (1957–1998) - // - `SRD` - Surinamese Dollar - // - `SRG` - Surinamese Guilder - // - `SZL` - Swazi Lilangeni - // - `SEK` - Swedish Krona - // - `CHF` - Swiss Franc - // - `SYP` - Syrian Pound - // - `STN` - São Tomé & Príncipe Dobra - // - `STD` - São Tomé & Príncipe Dobra (1977–2017) - // - `TVD` - TVD - // - `TJR` - Tajikistani Ruble - // - `TJS` - Tajikistani Somoni - // - `TZS` - Tanzanian Shilling - // - `XTS` - Testing Currency Code - // - `THB` - Thai Baht - // - `XXX` - The codes assigned for transactions where no currency is involved - // - `TPE` - Timorese Escudo - // - `TOP` - Tongan Paʻanga - // - `TTD` - Trinidad & Tobago Dollar - // - `TND` - Tunisian Dinar - // - `TRY` - Turkish Lira - // - `TRL` - Turkish Lira (1922–2005) - // - `TMT` - Turkmenistani Manat - // - `TMM` - Turkmenistani Manat (1993–2009) - // - `USD` - US Dollar - // - `USN` - US Dollar (Next day) - // - `USS` - US Dollar (Same day) - // - `UGX` - Ugandan Shilling - // - `UGS` - Ugandan Shilling (1966–1987) - // - `UAH` - Ukrainian Hryvnia - // - `UAK` - Ukrainian Karbovanets - // - `AED` - United Arab Emirates Dirham - // - `UYW` - Uruguayan Nominal Wage Index Unit - // - `UYU` - Uruguayan Peso - // - `UYP` - Uruguayan Peso (1975–1993) - // - `UYI` - Uruguayan Peso (Indexed Units) - // - `UZS` - Uzbekistani Som - // - `VUV` - Vanuatu Vatu - // - `VES` - Venezuelan Bolívar - // - `VEB` - Venezuelan Bolívar (1871–2008) - // - `VEF` - Venezuelan Bolívar (2008–2018) - // - `VND` - Vietnamese Dong - // - `VNN` - Vietnamese Dong (1978–1985) - // - `CHE` - WIR Euro - // - `CHW` - WIR Franc - // - `XOF` - West African CFA Franc - // - `YDD` - Yemeni Dinar - // - `YER` - Yemeni Rial - // - `YUN` - Yugoslavian Convertible Dinar (1990–1992) - // - `YUD` - Yugoslavian Hard Dinar (1966–1990) - // - `YUM` - Yugoslavian New Dinar (1994–2002) - // - `YUR` - Yugoslavian Reformed Dinar (1992–1993) - // - `ZWN` - ZWN - // - `ZRN` - Zairean New Zaire (1993–1998) - // - `ZRZ` - Zairean Zaire (1971–1993) - // - `ZMW` - Zambian Kwacha - // - `ZMK` - Zambian Kwacha (1968–2012) - // - `ZWD` - Zimbabwean Dollar (1980–2008) - // - `ZWR` - Zimbabwean Dollar (2008) - // - `ZWL` - Zimbabwean Dollar (2009) - Currency *InvoiceLineItemRequestCurrency `json:"currency,omitempty"` - // The line item's exchange rate. - ExchangeRate *string `json:"exchange_rate,omitempty"` - Item *InvoiceLineItemRequestItem `json:"item,omitempty"` - Account *InvoiceLineItemRequestAccount `json:"account,omitempty"` - // The tax rate that applies to this line item. - TaxRate *string `json:"tax_rate,omitempty"` - TrackingCategory *InvoiceLineItemRequestTrackingCategory `json:"tracking_category,omitempty"` - // The invoice line item's associated tracking categories. - TrackingCategories []*InvoiceLineItemRequestTrackingCategoriesItem `json:"tracking_categories,omitempty"` - // The company the invoice belongs to. - Company *string `json:"company,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` - RemoteFields []*RemoteFieldRequest `json:"remote_fields,omitempty"` + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + CreditNote *CreditNoteApplyLineForInvoiceCreditNote `json:"credit_note,omitempty" url:"credit_note,omitempty"` + // Date that the credit note is applied to the invoice. + AppliedDate *time.Time `json:"applied_date,omitempty" url:"applied_date,omitempty"` + // The amount of the Credit Note applied to the invoice. + AppliedAmount *string `json:"applied_amount,omitempty" url:"applied_amount,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (i *InvoiceLineItemRequest) UnmarshalJSON(data []byte) error { - type unmarshaler InvoiceLineItemRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (c *CreditNoteApplyLineForInvoice) GetRemoteId() *string { + if c == nil { + return nil } - *i = InvoiceLineItemRequest(value) - i._rawJSON = json.RawMessage(data) - return nil + return c.RemoteId } -func (i *InvoiceLineItemRequest) String() string { - if len(i._rawJSON) > 0 { - if value, err := core.StringifyJSON(i._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(i); err == nil { - return value +func (c *CreditNoteApplyLineForInvoice) GetCreatedAt() *time.Time { + if c == nil { + return nil } - return fmt.Sprintf("%#v", i) + return c.CreatedAt } -type InvoiceLineItemRequestAccount struct { - typeName string - String string - Account *Account +func (c *CreditNoteApplyLineForInvoice) GetModifiedAt() *time.Time { + if c == nil { + return nil + } + return c.ModifiedAt } -func NewInvoiceLineItemRequestAccountFromString(value string) *InvoiceLineItemRequestAccount { - return &InvoiceLineItemRequestAccount{typeName: "string", String: value} +func (c *CreditNoteApplyLineForInvoice) GetCreditNote() *CreditNoteApplyLineForInvoiceCreditNote { + if c == nil { + return nil + } + return c.CreditNote } -func NewInvoiceLineItemRequestAccountFromAccount(value *Account) *InvoiceLineItemRequestAccount { - return &InvoiceLineItemRequestAccount{typeName: "account", Account: value} +func (c *CreditNoteApplyLineForInvoice) GetAppliedDate() *time.Time { + if c == nil { + return nil + } + return c.AppliedDate } -func (i *InvoiceLineItemRequestAccount) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - i.typeName = "string" - i.String = valueString +func (c *CreditNoteApplyLineForInvoice) GetAppliedAmount() *string { + if c == nil { return nil } - valueAccount := new(Account) - if err := json.Unmarshal(data, &valueAccount); err == nil { - i.typeName = "account" - i.Account = valueAccount + return c.AppliedAmount +} + +func (c *CreditNoteApplyLineForInvoice) GetRemoteWasDeleted() *bool { + if c == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, i) + return c.RemoteWasDeleted } -func (i InvoiceLineItemRequestAccount) MarshalJSON() ([]byte, error) { - switch i.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return json.Marshal(i.String) - case "account": - return json.Marshal(i.Account) - } +func (c *CreditNoteApplyLineForInvoice) GetExtraProperties() map[string]interface{} { + return c.extraProperties } -type InvoiceLineItemRequestAccountVisitor interface { - VisitString(string) error - VisitAccount(*Account) error +func (c *CreditNoteApplyLineForInvoice) UnmarshalJSON(data []byte) error { + type embed CreditNoteApplyLineForInvoice + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + AppliedDate *internal.DateTime `json:"applied_date,omitempty"` + }{ + embed: embed(*c), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *c = CreditNoteApplyLineForInvoice(unmarshaler.embed) + c.CreatedAt = unmarshaler.CreatedAt.TimePtr() + c.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + c.AppliedDate = unmarshaler.AppliedDate.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *c) + if err != nil { + return err + } + c.extraProperties = extraProperties + c.rawJSON = json.RawMessage(data) + return nil } -func (i *InvoiceLineItemRequestAccount) Accept(visitor InvoiceLineItemRequestAccountVisitor) error { - switch i.typeName { - default: - return fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return visitor.VisitString(i.String) - case "account": - return visitor.VisitAccount(i.Account) +func (c *CreditNoteApplyLineForInvoice) MarshalJSON() ([]byte, error) { + type embed CreditNoteApplyLineForInvoice + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + AppliedDate *internal.DateTime `json:"applied_date,omitempty"` + }{ + embed: embed(*c), + CreatedAt: internal.NewOptionalDateTime(c.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(c.ModifiedAt), + AppliedDate: internal.NewOptionalDateTime(c.AppliedDate), } + return json.Marshal(marshaler) } -// The line item's currency. -// -// - `XUA` - ADB Unit of Account -// - `AFN` - Afghan Afghani -// - `AFA` - Afghan Afghani (1927–2002) -// - `ALL` - Albanian Lek -// - `ALK` - Albanian Lek (1946–1965) -// - `DZD` - Algerian Dinar -// - `ADP` - Andorran Peseta -// - `AOA` - Angolan Kwanza -// - `AOK` - Angolan Kwanza (1977–1991) -// - `AON` - Angolan New Kwanza (1990–2000) -// - `AOR` - Angolan Readjusted Kwanza (1995–1999) -// - `ARA` - Argentine Austral -// - `ARS` - Argentine Peso -// - `ARM` - Argentine Peso (1881–1970) -// - `ARP` - Argentine Peso (1983–1985) -// - `ARL` - Argentine Peso Ley (1970–1983) -// - `AMD` - Armenian Dram -// - `AWG` - Aruban Florin -// - `AUD` - Australian Dollar -// - `ATS` - Austrian Schilling -// - `AZN` - Azerbaijani Manat -// - `AZM` - Azerbaijani Manat (1993–2006) -// - `BSD` - Bahamian Dollar -// - `BHD` - Bahraini Dinar -// - `BDT` - Bangladeshi Taka -// - `BBD` - Barbadian Dollar -// - `BYN` - Belarusian Ruble -// - `BYB` - Belarusian Ruble (1994–1999) -// - `BYR` - Belarusian Ruble (2000–2016) -// - `BEF` - Belgian Franc -// - `BEC` - Belgian Franc (convertible) -// - `BEL` - Belgian Franc (financial) -// - `BZD` - Belize Dollar -// - `BMD` - Bermudan Dollar -// - `BTN` - Bhutanese Ngultrum -// - `BOB` - Bolivian Boliviano -// - `BOL` - Bolivian Boliviano (1863–1963) -// - `BOV` - Bolivian Mvdol -// - `BOP` - Bolivian Peso -// - `BAM` - Bosnia-Herzegovina Convertible Mark -// - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) -// - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) -// - `BWP` - Botswanan Pula -// - `BRC` - Brazilian Cruzado (1986–1989) -// - `BRZ` - Brazilian Cruzeiro (1942–1967) -// - `BRE` - Brazilian Cruzeiro (1990–1993) -// - `BRR` - Brazilian Cruzeiro (1993–1994) -// - `BRN` - Brazilian New Cruzado (1989–1990) -// - `BRB` - Brazilian New Cruzeiro (1967–1986) -// - `BRL` - Brazilian Real -// - `GBP` - British Pound -// - `BND` - Brunei Dollar -// - `BGL` - Bulgarian Hard Lev -// - `BGN` - Bulgarian Lev -// - `BGO` - Bulgarian Lev (1879–1952) -// - `BGM` - Bulgarian Socialist Lev -// - `BUK` - Burmese Kyat -// - `BIF` - Burundian Franc -// - `XPF` - CFP Franc -// - `KHR` - Cambodian Riel -// - `CAD` - Canadian Dollar -// - `CVE` - Cape Verdean Escudo -// - `KYD` - Cayman Islands Dollar -// - `XAF` - Central African CFA Franc -// - `CLE` - Chilean Escudo -// - `CLP` - Chilean Peso -// - `CLF` - Chilean Unit of Account (UF) -// - `CNX` - Chinese People’s Bank Dollar -// - `CNY` - Chinese Yuan -// - `CNH` - Chinese Yuan (offshore) -// - `COP` - Colombian Peso -// - `COU` - Colombian Real Value Unit -// - `KMF` - Comorian Franc -// - `CDF` - Congolese Franc -// - `CRC` - Costa Rican Colón -// - `HRD` - Croatian Dinar -// - `HRK` - Croatian Kuna -// - `CUC` - Cuban Convertible Peso -// - `CUP` - Cuban Peso -// - `CYP` - Cypriot Pound -// - `CZK` - Czech Koruna -// - `CSK` - Czechoslovak Hard Koruna -// - `DKK` - Danish Krone -// - `DJF` - Djiboutian Franc -// - `DOP` - Dominican Peso -// - `NLG` - Dutch Guilder -// - `XCD` - East Caribbean Dollar -// - `DDM` - East German Mark -// - `ECS` - Ecuadorian Sucre -// - `ECV` - Ecuadorian Unit of Constant Value -// - `EGP` - Egyptian Pound -// - `GQE` - Equatorial Guinean Ekwele -// - `ERN` - Eritrean Nakfa -// - `EEK` - Estonian Kroon -// - `ETB` - Ethiopian Birr -// - `EUR` - Euro -// - `XBA` - European Composite Unit -// - `XEU` - European Currency Unit -// - `XBB` - European Monetary Unit -// - `XBC` - European Unit of Account (XBC) -// - `XBD` - European Unit of Account (XBD) -// - `FKP` - Falkland Islands Pound -// - `FJD` - Fijian Dollar -// - `FIM` - Finnish Markka -// - `FRF` - French Franc -// - `XFO` - French Gold Franc -// - `XFU` - French UIC-Franc -// - `GMD` - Gambian Dalasi -// - `GEK` - Georgian Kupon Larit -// - `GEL` - Georgian Lari -// - `DEM` - German Mark -// - `GHS` - Ghanaian Cedi -// - `GHC` - Ghanaian Cedi (1979–2007) -// - `GIP` - Gibraltar Pound -// - `XAU` - Gold -// - `GRD` - Greek Drachma -// - `GTQ` - Guatemalan Quetzal -// - `GWP` - Guinea-Bissau Peso -// - `GNF` - Guinean Franc -// - `GNS` - Guinean Syli -// - `GYD` - Guyanaese Dollar -// - `HTG` - Haitian Gourde -// - `HNL` - Honduran Lempira -// - `HKD` - Hong Kong Dollar -// - `HUF` - Hungarian Forint -// - `IMP` - IMP -// - `ISK` - Icelandic Króna -// - `ISJ` - Icelandic Króna (1918–1981) -// - `INR` - Indian Rupee -// - `IDR` - Indonesian Rupiah -// - `IRR` - Iranian Rial -// - `IQD` - Iraqi Dinar -// - `IEP` - Irish Pound -// - `ILS` - Israeli New Shekel -// - `ILP` - Israeli Pound -// - `ILR` - Israeli Shekel (1980–1985) -// - `ITL` - Italian Lira -// - `JMD` - Jamaican Dollar -// - `JPY` - Japanese Yen -// - `JOD` - Jordanian Dinar -// - `KZT` - Kazakhstani Tenge -// - `KES` - Kenyan Shilling -// - `KWD` - Kuwaiti Dinar -// - `KGS` - Kyrgystani Som -// - `LAK` - Laotian Kip -// - `LVL` - Latvian Lats -// - `LVR` - Latvian Ruble -// - `LBP` - Lebanese Pound -// - `LSL` - Lesotho Loti -// - `LRD` - Liberian Dollar -// - `LYD` - Libyan Dinar -// - `LTL` - Lithuanian Litas -// - `LTT` - Lithuanian Talonas -// - `LUL` - Luxembourg Financial Franc -// - `LUC` - Luxembourgian Convertible Franc -// - `LUF` - Luxembourgian Franc -// - `MOP` - Macanese Pataca -// - `MKD` - Macedonian Denar -// - `MKN` - Macedonian Denar (1992–1993) -// - `MGA` - Malagasy Ariary -// - `MGF` - Malagasy Franc -// - `MWK` - Malawian Kwacha -// - `MYR` - Malaysian Ringgit -// - `MVR` - Maldivian Rufiyaa -// - `MVP` - Maldivian Rupee (1947–1981) -// - `MLF` - Malian Franc -// - `MTL` - Maltese Lira -// - `MTP` - Maltese Pound -// - `MRU` - Mauritanian Ouguiya -// - `MRO` - Mauritanian Ouguiya (1973–2017) -// - `MUR` - Mauritian Rupee -// - `MXV` - Mexican Investment Unit -// - `MXN` - Mexican Peso -// - `MXP` - Mexican Silver Peso (1861–1992) -// - `MDC` - Moldovan Cupon -// - `MDL` - Moldovan Leu -// - `MCF` - Monegasque Franc -// - `MNT` - Mongolian Tugrik -// - `MAD` - Moroccan Dirham -// - `MAF` - Moroccan Franc -// - `MZE` - Mozambican Escudo -// - `MZN` - Mozambican Metical -// - `MZM` - Mozambican Metical (1980–2006) -// - `MMK` - Myanmar Kyat -// - `NAD` - Namibian Dollar -// - `NPR` - Nepalese Rupee -// - `ANG` - Netherlands Antillean Guilder -// - `TWD` - New Taiwan Dollar -// - `NZD` - New Zealand Dollar -// - `NIO` - Nicaraguan Córdoba -// - `NIC` - Nicaraguan Córdoba (1988–1991) -// - `NGN` - Nigerian Naira -// - `KPW` - North Korean Won -// - `NOK` - Norwegian Krone -// - `OMR` - Omani Rial -// - `PKR` - Pakistani Rupee -// - `XPD` - Palladium -// - `PAB` - Panamanian Balboa -// - `PGK` - Papua New Guinean Kina -// - `PYG` - Paraguayan Guarani -// - `PEI` - Peruvian Inti -// - `PEN` - Peruvian Sol -// - `PES` - Peruvian Sol (1863–1965) -// - `PHP` - Philippine Peso -// - `XPT` - Platinum -// - `PLN` - Polish Zloty -// - `PLZ` - Polish Zloty (1950–1995) -// - `PTE` - Portuguese Escudo -// - `GWE` - Portuguese Guinea Escudo -// - `QAR` - Qatari Rial -// - `XRE` - RINET Funds -// - `RHD` - Rhodesian Dollar -// - `RON` - Romanian Leu -// - `ROL` - Romanian Leu (1952–2006) -// - `RUB` - Russian Ruble -// - `RUR` - Russian Ruble (1991–1998) -// - `RWF` - Rwandan Franc -// - `SVC` - Salvadoran Colón -// - `WST` - Samoan Tala -// - `SAR` - Saudi Riyal -// - `RSD` - Serbian Dinar -// - `CSD` - Serbian Dinar (2002–2006) -// - `SCR` - Seychellois Rupee -// - `SLL` - Sierra Leonean Leone -// - `XAG` - Silver -// - `SGD` - Singapore Dollar -// - `SKK` - Slovak Koruna -// - `SIT` - Slovenian Tolar -// - `SBD` - Solomon Islands Dollar -// - `SOS` - Somali Shilling -// - `ZAR` - South African Rand -// - `ZAL` - South African Rand (financial) -// - `KRH` - South Korean Hwan (1953–1962) -// - `KRW` - South Korean Won -// - `KRO` - South Korean Won (1945–1953) -// - `SSP` - South Sudanese Pound -// - `SUR` - Soviet Rouble -// - `ESP` - Spanish Peseta -// - `ESA` - Spanish Peseta (A account) -// - `ESB` - Spanish Peseta (convertible account) -// - `XDR` - Special Drawing Rights -// - `LKR` - Sri Lankan Rupee -// - `SHP` - St. Helena Pound -// - `XSU` - Sucre -// - `SDD` - Sudanese Dinar (1992–2007) -// - `SDG` - Sudanese Pound -// - `SDP` - Sudanese Pound (1957–1998) -// - `SRD` - Surinamese Dollar -// - `SRG` - Surinamese Guilder -// - `SZL` - Swazi Lilangeni -// - `SEK` - Swedish Krona -// - `CHF` - Swiss Franc -// - `SYP` - Syrian Pound -// - `STN` - São Tomé & Príncipe Dobra -// - `STD` - São Tomé & Príncipe Dobra (1977–2017) -// - `TVD` - TVD -// - `TJR` - Tajikistani Ruble -// - `TJS` - Tajikistani Somoni -// - `TZS` - Tanzanian Shilling -// - `XTS` - Testing Currency Code -// - `THB` - Thai Baht -// - `XXX` - The codes assigned for transactions where no currency is involved -// - `TPE` - Timorese Escudo -// - `TOP` - Tongan Paʻanga -// - `TTD` - Trinidad & Tobago Dollar -// - `TND` - Tunisian Dinar -// - `TRY` - Turkish Lira -// - `TRL` - Turkish Lira (1922–2005) -// - `TMT` - Turkmenistani Manat -// - `TMM` - Turkmenistani Manat (1993–2009) -// - `USD` - US Dollar -// - `USN` - US Dollar (Next day) -// - `USS` - US Dollar (Same day) -// - `UGX` - Ugandan Shilling -// - `UGS` - Ugandan Shilling (1966–1987) -// - `UAH` - Ukrainian Hryvnia -// - `UAK` - Ukrainian Karbovanets -// - `AED` - United Arab Emirates Dirham -// - `UYW` - Uruguayan Nominal Wage Index Unit -// - `UYU` - Uruguayan Peso -// - `UYP` - Uruguayan Peso (1975–1993) -// - `UYI` - Uruguayan Peso (Indexed Units) -// - `UZS` - Uzbekistani Som -// - `VUV` - Vanuatu Vatu -// - `VES` - Venezuelan Bolívar -// - `VEB` - Venezuelan Bolívar (1871–2008) -// - `VEF` - Venezuelan Bolívar (2008–2018) -// - `VND` - Vietnamese Dong -// - `VNN` - Vietnamese Dong (1978–1985) -// - `CHE` - WIR Euro -// - `CHW` - WIR Franc -// - `XOF` - West African CFA Franc -// - `YDD` - Yemeni Dinar -// - `YER` - Yemeni Rial -// - `YUN` - Yugoslavian Convertible Dinar (1990–1992) -// - `YUD` - Yugoslavian Hard Dinar (1966–1990) -// - `YUM` - Yugoslavian New Dinar (1994–2002) -// - `YUR` - Yugoslavian Reformed Dinar (1992–1993) -// - `ZWN` - ZWN -// - `ZRN` - Zairean New Zaire (1993–1998) -// - `ZRZ` - Zairean Zaire (1971–1993) -// - `ZMW` - Zambian Kwacha -// - `ZMK` - Zambian Kwacha (1968–2012) -// - `ZWD` - Zimbabwean Dollar (1980–2008) -// - `ZWR` - Zimbabwean Dollar (2008) -// - `ZWL` - Zimbabwean Dollar (2009) -type InvoiceLineItemRequestCurrency struct { - typeName string - TransactionCurrencyEnum TransactionCurrencyEnum - String string +func (c *CreditNoteApplyLineForInvoice) String() string { + if len(c.rawJSON) > 0 { + if value, err := internal.StringifyJSON(c.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(c); err == nil { + return value + } + return fmt.Sprintf("%#v", c) } -func NewInvoiceLineItemRequestCurrencyFromTransactionCurrencyEnum(value TransactionCurrencyEnum) *InvoiceLineItemRequestCurrency { - return &InvoiceLineItemRequestCurrency{typeName: "transactionCurrencyEnum", TransactionCurrencyEnum: value} +type CreditNoteApplyLineForInvoiceCreditNote struct { + String string + CreditNote *CreditNote + + typ string } -func NewInvoiceLineItemRequestCurrencyFromString(value string) *InvoiceLineItemRequestCurrency { - return &InvoiceLineItemRequestCurrency{typeName: "string", String: value} +func (c *CreditNoteApplyLineForInvoiceCreditNote) GetString() string { + if c == nil { + return "" + } + return c.String } -func (i *InvoiceLineItemRequestCurrency) UnmarshalJSON(data []byte) error { - var valueTransactionCurrencyEnum TransactionCurrencyEnum - if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { - i.typeName = "transactionCurrencyEnum" - i.TransactionCurrencyEnum = valueTransactionCurrencyEnum +func (c *CreditNoteApplyLineForInvoiceCreditNote) GetCreditNote() *CreditNote { + if c == nil { return nil } + return c.CreditNote +} + +func (c *CreditNoteApplyLineForInvoiceCreditNote) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - i.typeName = "string" - i.String = valueString + c.typ = "String" + c.String = valueString return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, i) + valueCreditNote := new(CreditNote) + if err := json.Unmarshal(data, &valueCreditNote); err == nil { + c.typ = "CreditNote" + c.CreditNote = valueCreditNote + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, c) } -func (i InvoiceLineItemRequestCurrency) MarshalJSON() ([]byte, error) { - switch i.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "transactionCurrencyEnum": - return json.Marshal(i.TransactionCurrencyEnum) - case "string": - return json.Marshal(i.String) +func (c CreditNoteApplyLineForInvoiceCreditNote) MarshalJSON() ([]byte, error) { + if c.typ == "String" || c.String != "" { + return json.Marshal(c.String) + } + if c.typ == "CreditNote" || c.CreditNote != nil { + return json.Marshal(c.CreditNote) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", c) } -type InvoiceLineItemRequestCurrencyVisitor interface { - VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error +type CreditNoteApplyLineForInvoiceCreditNoteVisitor interface { VisitString(string) error + VisitCreditNote(*CreditNote) error } -func (i *InvoiceLineItemRequestCurrency) Accept(visitor InvoiceLineItemRequestCurrencyVisitor) error { - switch i.typeName { - default: - return fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "transactionCurrencyEnum": - return visitor.VisitTransactionCurrencyEnum(i.TransactionCurrencyEnum) - case "string": - return visitor.VisitString(i.String) +func (c *CreditNoteApplyLineForInvoiceCreditNote) Accept(visitor CreditNoteApplyLineForInvoiceCreditNoteVisitor) error { + if c.typ == "String" || c.String != "" { + return visitor.VisitString(c.String) + } + if c.typ == "CreditNote" || c.CreditNote != nil { + return visitor.VisitCreditNote(c.CreditNote) } + return fmt.Errorf("type %T does not include a non-empty union type", c) } -// The employee this overall transaction relates to. -type InvoiceLineItemRequestEmployee struct { - typeName string - String string - Employee *Employee +// The company the credit note belongs to. +type CreditNoteCompany struct { + String string + CompanyInfo *CompanyInfo + + typ string } -func NewInvoiceLineItemRequestEmployeeFromString(value string) *InvoiceLineItemRequestEmployee { - return &InvoiceLineItemRequestEmployee{typeName: "string", String: value} +func (c *CreditNoteCompany) GetString() string { + if c == nil { + return "" + } + return c.String } -func NewInvoiceLineItemRequestEmployeeFromEmployee(value *Employee) *InvoiceLineItemRequestEmployee { - return &InvoiceLineItemRequestEmployee{typeName: "employee", Employee: value} +func (c *CreditNoteCompany) GetCompanyInfo() *CompanyInfo { + if c == nil { + return nil + } + return c.CompanyInfo } -func (i *InvoiceLineItemRequestEmployee) UnmarshalJSON(data []byte) error { +func (c *CreditNoteCompany) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - i.typeName = "string" - i.String = valueString + c.typ = "String" + c.String = valueString return nil } - valueEmployee := new(Employee) - if err := json.Unmarshal(data, &valueEmployee); err == nil { - i.typeName = "employee" - i.Employee = valueEmployee + valueCompanyInfo := new(CompanyInfo) + if err := json.Unmarshal(data, &valueCompanyInfo); err == nil { + c.typ = "CompanyInfo" + c.CompanyInfo = valueCompanyInfo return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, i) + return fmt.Errorf("%s cannot be deserialized as a %T", data, c) } -func (i InvoiceLineItemRequestEmployee) MarshalJSON() ([]byte, error) { - switch i.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return json.Marshal(i.String) - case "employee": - return json.Marshal(i.Employee) +func (c CreditNoteCompany) MarshalJSON() ([]byte, error) { + if c.typ == "String" || c.String != "" { + return json.Marshal(c.String) } + if c.typ == "CompanyInfo" || c.CompanyInfo != nil { + return json.Marshal(c.CompanyInfo) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", c) } -type InvoiceLineItemRequestEmployeeVisitor interface { +type CreditNoteCompanyVisitor interface { VisitString(string) error - VisitEmployee(*Employee) error + VisitCompanyInfo(*CompanyInfo) error } -func (i *InvoiceLineItemRequestEmployee) Accept(visitor InvoiceLineItemRequestEmployeeVisitor) error { - switch i.typeName { - default: - return fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return visitor.VisitString(i.String) - case "employee": - return visitor.VisitEmployee(i.Employee) +func (c *CreditNoteCompany) Accept(visitor CreditNoteCompanyVisitor) error { + if c.typ == "String" || c.String != "" { + return visitor.VisitString(c.String) + } + if c.typ == "CompanyInfo" || c.CompanyInfo != nil { + return visitor.VisitCompanyInfo(c.CompanyInfo) } + return fmt.Errorf("type %T does not include a non-empty union type", c) } -type InvoiceLineItemRequestItem struct { - typeName string - String string - Item *Item +// The credit note's contact. +type CreditNoteContact struct { + String string + Contact *Contact + + typ string } -func NewInvoiceLineItemRequestItemFromString(value string) *InvoiceLineItemRequestItem { - return &InvoiceLineItemRequestItem{typeName: "string", String: value} +func (c *CreditNoteContact) GetString() string { + if c == nil { + return "" + } + return c.String } -func NewInvoiceLineItemRequestItemFromItem(value *Item) *InvoiceLineItemRequestItem { - return &InvoiceLineItemRequestItem{typeName: "item", Item: value} +func (c *CreditNoteContact) GetContact() *Contact { + if c == nil { + return nil + } + return c.Contact } -func (i *InvoiceLineItemRequestItem) UnmarshalJSON(data []byte) error { +func (c *CreditNoteContact) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - i.typeName = "string" - i.String = valueString + c.typ = "String" + c.String = valueString return nil } - valueItem := new(Item) - if err := json.Unmarshal(data, &valueItem); err == nil { - i.typeName = "item" - i.Item = valueItem + valueContact := new(Contact) + if err := json.Unmarshal(data, &valueContact); err == nil { + c.typ = "Contact" + c.Contact = valueContact return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, i) + return fmt.Errorf("%s cannot be deserialized as a %T", data, c) } -func (i InvoiceLineItemRequestItem) MarshalJSON() ([]byte, error) { - switch i.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return json.Marshal(i.String) - case "item": - return json.Marshal(i.Item) +func (c CreditNoteContact) MarshalJSON() ([]byte, error) { + if c.typ == "String" || c.String != "" { + return json.Marshal(c.String) + } + if c.typ == "Contact" || c.Contact != nil { + return json.Marshal(c.Contact) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", c) } -type InvoiceLineItemRequestItemVisitor interface { +type CreditNoteContactVisitor interface { VisitString(string) error - VisitItem(*Item) error + VisitContact(*Contact) error } -func (i *InvoiceLineItemRequestItem) Accept(visitor InvoiceLineItemRequestItemVisitor) error { - switch i.typeName { - default: - return fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return visitor.VisitString(i.String) - case "item": - return visitor.VisitItem(i.Item) +func (c *CreditNoteContact) Accept(visitor CreditNoteContactVisitor) error { + if c.typ == "String" || c.String != "" { + return visitor.VisitString(c.String) + } + if c.typ == "Contact" || c.Contact != nil { + return visitor.VisitContact(c.Contact) } + return fmt.Errorf("type %T does not include a non-empty union type", c) } -type InvoiceLineItemRequestTrackingCategoriesItem struct { - typeName string - String string - TrackingCategory *TrackingCategory +// The credit note's currency. +// +// * `XUA` - ADB Unit of Account +// * `AFN` - Afghan Afghani +// * `AFA` - Afghan Afghani (1927–2002) +// * `ALL` - Albanian Lek +// * `ALK` - Albanian Lek (1946–1965) +// * `DZD` - Algerian Dinar +// * `ADP` - Andorran Peseta +// * `AOA` - Angolan Kwanza +// * `AOK` - Angolan Kwanza (1977–1991) +// * `AON` - Angolan New Kwanza (1990–2000) +// * `AOR` - Angolan Readjusted Kwanza (1995–1999) +// * `ARA` - Argentine Austral +// * `ARS` - Argentine Peso +// * `ARM` - Argentine Peso (1881–1970) +// * `ARP` - Argentine Peso (1983–1985) +// * `ARL` - Argentine Peso Ley (1970–1983) +// * `AMD` - Armenian Dram +// * `AWG` - Aruban Florin +// * `AUD` - Australian Dollar +// * `ATS` - Austrian Schilling +// * `AZN` - Azerbaijani Manat +// * `AZM` - Azerbaijani Manat (1993–2006) +// * `BSD` - Bahamian Dollar +// * `BHD` - Bahraini Dinar +// * `BDT` - Bangladeshi Taka +// * `BBD` - Barbadian Dollar +// * `BYN` - Belarusian Ruble +// * `BYB` - Belarusian Ruble (1994–1999) +// * `BYR` - Belarusian Ruble (2000–2016) +// * `BEF` - Belgian Franc +// * `BEC` - Belgian Franc (convertible) +// * `BEL` - Belgian Franc (financial) +// * `BZD` - Belize Dollar +// * `BMD` - Bermudan Dollar +// * `BTN` - Bhutanese Ngultrum +// * `BOB` - Bolivian Boliviano +// * `BOL` - Bolivian Boliviano (1863–1963) +// * `BOV` - Bolivian Mvdol +// * `BOP` - Bolivian Peso +// * `BAM` - Bosnia-Herzegovina Convertible Mark +// * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) +// * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) +// * `BWP` - Botswanan Pula +// * `BRC` - Brazilian Cruzado (1986–1989) +// * `BRZ` - Brazilian Cruzeiro (1942–1967) +// * `BRE` - Brazilian Cruzeiro (1990–1993) +// * `BRR` - Brazilian Cruzeiro (1993–1994) +// * `BRN` - Brazilian New Cruzado (1989–1990) +// * `BRB` - Brazilian New Cruzeiro (1967–1986) +// * `BRL` - Brazilian Real +// * `GBP` - British Pound +// * `BND` - Brunei Dollar +// * `BGL` - Bulgarian Hard Lev +// * `BGN` - Bulgarian Lev +// * `BGO` - Bulgarian Lev (1879–1952) +// * `BGM` - Bulgarian Socialist Lev +// * `BUK` - Burmese Kyat +// * `BIF` - Burundian Franc +// * `XPF` - CFP Franc +// * `KHR` - Cambodian Riel +// * `CAD` - Canadian Dollar +// * `CVE` - Cape Verdean Escudo +// * `KYD` - Cayman Islands Dollar +// * `XAF` - Central African CFA Franc +// * `CLE` - Chilean Escudo +// * `CLP` - Chilean Peso +// * `CLF` - Chilean Unit of Account (UF) +// * `CNX` - Chinese People’s Bank Dollar +// * `CNY` - Chinese Yuan +// * `CNH` - Chinese Yuan (offshore) +// * `COP` - Colombian Peso +// * `COU` - Colombian Real Value Unit +// * `KMF` - Comorian Franc +// * `CDF` - Congolese Franc +// * `CRC` - Costa Rican Colón +// * `HRD` - Croatian Dinar +// * `HRK` - Croatian Kuna +// * `CUC` - Cuban Convertible Peso +// * `CUP` - Cuban Peso +// * `CYP` - Cypriot Pound +// * `CZK` - Czech Koruna +// * `CSK` - Czechoslovak Hard Koruna +// * `DKK` - Danish Krone +// * `DJF` - Djiboutian Franc +// * `DOP` - Dominican Peso +// * `NLG` - Dutch Guilder +// * `XCD` - East Caribbean Dollar +// * `DDM` - East German Mark +// * `ECS` - Ecuadorian Sucre +// * `ECV` - Ecuadorian Unit of Constant Value +// * `EGP` - Egyptian Pound +// * `GQE` - Equatorial Guinean Ekwele +// * `ERN` - Eritrean Nakfa +// * `EEK` - Estonian Kroon +// * `ETB` - Ethiopian Birr +// * `EUR` - Euro +// * `XBA` - European Composite Unit +// * `XEU` - European Currency Unit +// * `XBB` - European Monetary Unit +// * `XBC` - European Unit of Account (XBC) +// * `XBD` - European Unit of Account (XBD) +// * `FKP` - Falkland Islands Pound +// * `FJD` - Fijian Dollar +// * `FIM` - Finnish Markka +// * `FRF` - French Franc +// * `XFO` - French Gold Franc +// * `XFU` - French UIC-Franc +// * `GMD` - Gambian Dalasi +// * `GEK` - Georgian Kupon Larit +// * `GEL` - Georgian Lari +// * `DEM` - German Mark +// * `GHS` - Ghanaian Cedi +// * `GHC` - Ghanaian Cedi (1979–2007) +// * `GIP` - Gibraltar Pound +// * `XAU` - Gold +// * `GRD` - Greek Drachma +// * `GTQ` - Guatemalan Quetzal +// * `GWP` - Guinea-Bissau Peso +// * `GNF` - Guinean Franc +// * `GNS` - Guinean Syli +// * `GYD` - Guyanaese Dollar +// * `HTG` - Haitian Gourde +// * `HNL` - Honduran Lempira +// * `HKD` - Hong Kong Dollar +// * `HUF` - Hungarian Forint +// * `IMP` - IMP +// * `ISK` - Icelandic Króna +// * `ISJ` - Icelandic Króna (1918–1981) +// * `INR` - Indian Rupee +// * `IDR` - Indonesian Rupiah +// * `IRR` - Iranian Rial +// * `IQD` - Iraqi Dinar +// * `IEP` - Irish Pound +// * `ILS` - Israeli New Shekel +// * `ILP` - Israeli Pound +// * `ILR` - Israeli Shekel (1980–1985) +// * `ITL` - Italian Lira +// * `JMD` - Jamaican Dollar +// * `JPY` - Japanese Yen +// * `JOD` - Jordanian Dinar +// * `KZT` - Kazakhstani Tenge +// * `KES` - Kenyan Shilling +// * `KWD` - Kuwaiti Dinar +// * `KGS` - Kyrgystani Som +// * `LAK` - Laotian Kip +// * `LVL` - Latvian Lats +// * `LVR` - Latvian Ruble +// * `LBP` - Lebanese Pound +// * `LSL` - Lesotho Loti +// * `LRD` - Liberian Dollar +// * `LYD` - Libyan Dinar +// * `LTL` - Lithuanian Litas +// * `LTT` - Lithuanian Talonas +// * `LUL` - Luxembourg Financial Franc +// * `LUC` - Luxembourgian Convertible Franc +// * `LUF` - Luxembourgian Franc +// * `MOP` - Macanese Pataca +// * `MKD` - Macedonian Denar +// * `MKN` - Macedonian Denar (1992–1993) +// * `MGA` - Malagasy Ariary +// * `MGF` - Malagasy Franc +// * `MWK` - Malawian Kwacha +// * `MYR` - Malaysian Ringgit +// * `MVR` - Maldivian Rufiyaa +// * `MVP` - Maldivian Rupee (1947–1981) +// * `MLF` - Malian Franc +// * `MTL` - Maltese Lira +// * `MTP` - Maltese Pound +// * `MRU` - Mauritanian Ouguiya +// * `MRO` - Mauritanian Ouguiya (1973–2017) +// * `MUR` - Mauritian Rupee +// * `MXV` - Mexican Investment Unit +// * `MXN` - Mexican Peso +// * `MXP` - Mexican Silver Peso (1861–1992) +// * `MDC` - Moldovan Cupon +// * `MDL` - Moldovan Leu +// * `MCF` - Monegasque Franc +// * `MNT` - Mongolian Tugrik +// * `MAD` - Moroccan Dirham +// * `MAF` - Moroccan Franc +// * `MZE` - Mozambican Escudo +// * `MZN` - Mozambican Metical +// * `MZM` - Mozambican Metical (1980–2006) +// * `MMK` - Myanmar Kyat +// * `NAD` - Namibian Dollar +// * `NPR` - Nepalese Rupee +// * `ANG` - Netherlands Antillean Guilder +// * `TWD` - New Taiwan Dollar +// * `NZD` - New Zealand Dollar +// * `NIO` - Nicaraguan Córdoba +// * `NIC` - Nicaraguan Córdoba (1988–1991) +// * `NGN` - Nigerian Naira +// * `KPW` - North Korean Won +// * `NOK` - Norwegian Krone +// * `OMR` - Omani Rial +// * `PKR` - Pakistani Rupee +// * `XPD` - Palladium +// * `PAB` - Panamanian Balboa +// * `PGK` - Papua New Guinean Kina +// * `PYG` - Paraguayan Guarani +// * `PEI` - Peruvian Inti +// * `PEN` - Peruvian Sol +// * `PES` - Peruvian Sol (1863–1965) +// * `PHP` - Philippine Peso +// * `XPT` - Platinum +// * `PLN` - Polish Zloty +// * `PLZ` - Polish Zloty (1950–1995) +// * `PTE` - Portuguese Escudo +// * `GWE` - Portuguese Guinea Escudo +// * `QAR` - Qatari Rial +// * `XRE` - RINET Funds +// * `RHD` - Rhodesian Dollar +// * `RON` - Romanian Leu +// * `ROL` - Romanian Leu (1952–2006) +// * `RUB` - Russian Ruble +// * `RUR` - Russian Ruble (1991–1998) +// * `RWF` - Rwandan Franc +// * `SVC` - Salvadoran Colón +// * `WST` - Samoan Tala +// * `SAR` - Saudi Riyal +// * `RSD` - Serbian Dinar +// * `CSD` - Serbian Dinar (2002–2006) +// * `SCR` - Seychellois Rupee +// * `SLL` - Sierra Leonean Leone +// * `XAG` - Silver +// * `SGD` - Singapore Dollar +// * `SKK` - Slovak Koruna +// * `SIT` - Slovenian Tolar +// * `SBD` - Solomon Islands Dollar +// * `SOS` - Somali Shilling +// * `ZAR` - South African Rand +// * `ZAL` - South African Rand (financial) +// * `KRH` - South Korean Hwan (1953–1962) +// * `KRW` - South Korean Won +// * `KRO` - South Korean Won (1945–1953) +// * `SSP` - South Sudanese Pound +// * `SUR` - Soviet Rouble +// * `ESP` - Spanish Peseta +// * `ESA` - Spanish Peseta (A account) +// * `ESB` - Spanish Peseta (convertible account) +// * `XDR` - Special Drawing Rights +// * `LKR` - Sri Lankan Rupee +// * `SHP` - St. Helena Pound +// * `XSU` - Sucre +// * `SDD` - Sudanese Dinar (1992–2007) +// * `SDG` - Sudanese Pound +// * `SDP` - Sudanese Pound (1957–1998) +// * `SRD` - Surinamese Dollar +// * `SRG` - Surinamese Guilder +// * `SZL` - Swazi Lilangeni +// * `SEK` - Swedish Krona +// * `CHF` - Swiss Franc +// * `SYP` - Syrian Pound +// * `STN` - São Tomé & Príncipe Dobra +// * `STD` - São Tomé & Príncipe Dobra (1977–2017) +// * `TVD` - TVD +// * `TJR` - Tajikistani Ruble +// * `TJS` - Tajikistani Somoni +// * `TZS` - Tanzanian Shilling +// * `XTS` - Testing Currency Code +// * `THB` - Thai Baht +// * `XXX` - The codes assigned for transactions where no currency is involved +// * `TPE` - Timorese Escudo +// * `TOP` - Tongan Paʻanga +// * `TTD` - Trinidad & Tobago Dollar +// * `TND` - Tunisian Dinar +// * `TRY` - Turkish Lira +// * `TRL` - Turkish Lira (1922–2005) +// * `TMT` - Turkmenistani Manat +// * `TMM` - Turkmenistani Manat (1993–2009) +// * `USD` - US Dollar +// * `USN` - US Dollar (Next day) +// * `USS` - US Dollar (Same day) +// * `UGX` - Ugandan Shilling +// * `UGS` - Ugandan Shilling (1966–1987) +// * `UAH` - Ukrainian Hryvnia +// * `UAK` - Ukrainian Karbovanets +// * `AED` - United Arab Emirates Dirham +// * `UYW` - Uruguayan Nominal Wage Index Unit +// * `UYU` - Uruguayan Peso +// * `UYP` - Uruguayan Peso (1975–1993) +// * `UYI` - Uruguayan Peso (Indexed Units) +// * `UZS` - Uzbekistani Som +// * `VUV` - Vanuatu Vatu +// * `VES` - Venezuelan Bolívar +// * `VEB` - Venezuelan Bolívar (1871–2008) +// * `VEF` - Venezuelan Bolívar (2008–2018) +// * `VND` - Vietnamese Dong +// * `VNN` - Vietnamese Dong (1978–1985) +// * `CHE` - WIR Euro +// * `CHW` - WIR Franc +// * `XOF` - West African CFA Franc +// * `YDD` - Yemeni Dinar +// * `YER` - Yemeni Rial +// * `YUN` - Yugoslavian Convertible Dinar (1990–1992) +// * `YUD` - Yugoslavian Hard Dinar (1966–1990) +// * `YUM` - Yugoslavian New Dinar (1994–2002) +// * `YUR` - Yugoslavian Reformed Dinar (1992–1993) +// * `ZWN` - ZWN +// * `ZRN` - Zairean New Zaire (1993–1998) +// * `ZRZ` - Zairean Zaire (1971–1993) +// * `ZMW` - Zambian Kwacha +// * `ZMK` - Zambian Kwacha (1968–2012) +// * `ZWD` - Zimbabwean Dollar (1980–2008) +// * `ZWR` - Zimbabwean Dollar (2008) +// * `ZWL` - Zimbabwean Dollar (2009) +type CreditNoteCurrency struct { + TransactionCurrencyEnum TransactionCurrencyEnum + String string + + typ string } -func NewInvoiceLineItemRequestTrackingCategoriesItemFromString(value string) *InvoiceLineItemRequestTrackingCategoriesItem { - return &InvoiceLineItemRequestTrackingCategoriesItem{typeName: "string", String: value} +func (c *CreditNoteCurrency) GetTransactionCurrencyEnum() TransactionCurrencyEnum { + if c == nil { + return "" + } + return c.TransactionCurrencyEnum } -func NewInvoiceLineItemRequestTrackingCategoriesItemFromTrackingCategory(value *TrackingCategory) *InvoiceLineItemRequestTrackingCategoriesItem { - return &InvoiceLineItemRequestTrackingCategoriesItem{typeName: "trackingCategory", TrackingCategory: value} +func (c *CreditNoteCurrency) GetString() string { + if c == nil { + return "" + } + return c.String } -func (i *InvoiceLineItemRequestTrackingCategoriesItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - i.typeName = "string" - i.String = valueString +func (c *CreditNoteCurrency) UnmarshalJSON(data []byte) error { + var valueTransactionCurrencyEnum TransactionCurrencyEnum + if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { + c.typ = "TransactionCurrencyEnum" + c.TransactionCurrencyEnum = valueTransactionCurrencyEnum return nil } - valueTrackingCategory := new(TrackingCategory) - if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { - i.typeName = "trackingCategory" - i.TrackingCategory = valueTrackingCategory + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + c.typ = "String" + c.String = valueString return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, i) + return fmt.Errorf("%s cannot be deserialized as a %T", data, c) } -func (i InvoiceLineItemRequestTrackingCategoriesItem) MarshalJSON() ([]byte, error) { - switch i.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return json.Marshal(i.String) - case "trackingCategory": - return json.Marshal(i.TrackingCategory) +func (c CreditNoteCurrency) MarshalJSON() ([]byte, error) { + if c.typ == "TransactionCurrencyEnum" || c.TransactionCurrencyEnum != "" { + return json.Marshal(c.TransactionCurrencyEnum) + } + if c.typ == "String" || c.String != "" { + return json.Marshal(c.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", c) } -type InvoiceLineItemRequestTrackingCategoriesItemVisitor interface { +type CreditNoteCurrencyVisitor interface { + VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error VisitString(string) error - VisitTrackingCategory(*TrackingCategory) error } -func (i *InvoiceLineItemRequestTrackingCategoriesItem) Accept(visitor InvoiceLineItemRequestTrackingCategoriesItemVisitor) error { - switch i.typeName { - default: - return fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return visitor.VisitString(i.String) - case "trackingCategory": - return visitor.VisitTrackingCategory(i.TrackingCategory) +func (c *CreditNoteCurrency) Accept(visitor CreditNoteCurrencyVisitor) error { + if c.typ == "TransactionCurrencyEnum" || c.TransactionCurrencyEnum != "" { + return visitor.VisitTransactionCurrencyEnum(c.TransactionCurrencyEnum) } + if c.typ == "String" || c.String != "" { + return visitor.VisitString(c.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", c) } -type InvoiceLineItemRequestTrackingCategory struct { - typeName string - String string - TrackingCategory *TrackingCategory -} - -func NewInvoiceLineItemRequestTrackingCategoryFromString(value string) *InvoiceLineItemRequestTrackingCategory { - return &InvoiceLineItemRequestTrackingCategory{typeName: "string", String: value} -} +// # The CreditNoteLineItem Object +// ### Description +// The `CreditNoteLineItem` object is used to represent a credit note's line items. +// +// ### Usage Example +// Fetch from the `GET CreditNote` endpoint and view the credit note's line items. +type CreditNoteLineItem struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + Item *CreditNoteLineItemItem `json:"item,omitempty" url:"item,omitempty"` + // The credit note line item's name. + Name *string `json:"name,omitempty" url:"name,omitempty"` + // The description of the item that is owed. + Description *string `json:"description,omitempty" url:"description,omitempty"` + // The credit note line item's quantity. + Quantity *string `json:"quantity,omitempty" url:"quantity,omitempty"` + // The credit note line item's memo. + Memo *string `json:"memo,omitempty" url:"memo,omitempty"` + // The credit note line item's unit price. + UnitPrice *string `json:"unit_price,omitempty" url:"unit_price,omitempty"` + // The tax rate that applies to this line item. + TaxRate *string `json:"tax_rate,omitempty" url:"tax_rate,omitempty"` + // The credit note line item's total. + TotalLineAmount *string `json:"total_line_amount,omitempty" url:"total_line_amount,omitempty"` + // The credit note line item's associated tracking category. + TrackingCategory *string `json:"tracking_category,omitempty" url:"tracking_category,omitempty"` + // The credit note line item's associated tracking categories. + TrackingCategories []*string `json:"tracking_categories,omitempty" url:"tracking_categories,omitempty"` + // The credit note line item's account. + Account *string `json:"account,omitempty" url:"account,omitempty"` + // The company the credit note belongs to. + Company *CreditNoteLineItemCompany `json:"company,omitempty" url:"company,omitempty"` + // The credit note's contact. + Contact *CreditNoteLineItemContact `json:"contact,omitempty" url:"contact,omitempty"` + Project *CreditNoteLineItemProject `json:"project,omitempty" url:"project,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` -func NewInvoiceLineItemRequestTrackingCategoryFromTrackingCategory(value *TrackingCategory) *InvoiceLineItemRequestTrackingCategory { - return &InvoiceLineItemRequestTrackingCategory{typeName: "trackingCategory", TrackingCategory: value} + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (i *InvoiceLineItemRequestTrackingCategory) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - i.typeName = "string" - i.String = valueString - return nil - } - valueTrackingCategory := new(TrackingCategory) - if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { - i.typeName = "trackingCategory" - i.TrackingCategory = valueTrackingCategory +func (c *CreditNoteLineItem) GetId() *string { + if c == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, i) + return c.Id } -func (i InvoiceLineItemRequestTrackingCategory) MarshalJSON() ([]byte, error) { - switch i.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return json.Marshal(i.String) - case "trackingCategory": - return json.Marshal(i.TrackingCategory) +func (c *CreditNoteLineItem) GetRemoteId() *string { + if c == nil { + return nil } + return c.RemoteId } -type InvoiceLineItemRequestTrackingCategoryVisitor interface { - VisitString(string) error - VisitTrackingCategory(*TrackingCategory) error -} - -func (i *InvoiceLineItemRequestTrackingCategory) Accept(visitor InvoiceLineItemRequestTrackingCategoryVisitor) error { - switch i.typeName { - default: - return fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return visitor.VisitString(i.String) - case "trackingCategory": - return visitor.VisitTrackingCategory(i.TrackingCategory) +func (c *CreditNoteLineItem) GetCreatedAt() *time.Time { + if c == nil { + return nil } + return c.CreatedAt } -type InvoiceLineItemTrackingCategoriesItem struct { - typeName string - String string - TrackingCategory *TrackingCategory -} - -func NewInvoiceLineItemTrackingCategoriesItemFromString(value string) *InvoiceLineItemTrackingCategoriesItem { - return &InvoiceLineItemTrackingCategoriesItem{typeName: "string", String: value} -} - -func NewInvoiceLineItemTrackingCategoriesItemFromTrackingCategory(value *TrackingCategory) *InvoiceLineItemTrackingCategoriesItem { - return &InvoiceLineItemTrackingCategoriesItem{typeName: "trackingCategory", TrackingCategory: value} +func (c *CreditNoteLineItem) GetModifiedAt() *time.Time { + if c == nil { + return nil + } + return c.ModifiedAt } -func (i *InvoiceLineItemTrackingCategoriesItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - i.typeName = "string" - i.String = valueString +func (c *CreditNoteLineItem) GetItem() *CreditNoteLineItemItem { + if c == nil { return nil } - valueTrackingCategory := new(TrackingCategory) - if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { - i.typeName = "trackingCategory" - i.TrackingCategory = valueTrackingCategory + return c.Item +} + +func (c *CreditNoteLineItem) GetName() *string { + if c == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, i) + return c.Name } -func (i InvoiceLineItemTrackingCategoriesItem) MarshalJSON() ([]byte, error) { - switch i.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return json.Marshal(i.String) - case "trackingCategory": - return json.Marshal(i.TrackingCategory) +func (c *CreditNoteLineItem) GetDescription() *string { + if c == nil { + return nil } + return c.Description } -type InvoiceLineItemTrackingCategoriesItemVisitor interface { - VisitString(string) error - VisitTrackingCategory(*TrackingCategory) error +func (c *CreditNoteLineItem) GetQuantity() *string { + if c == nil { + return nil + } + return c.Quantity } -func (i *InvoiceLineItemTrackingCategoriesItem) Accept(visitor InvoiceLineItemTrackingCategoriesItemVisitor) error { - switch i.typeName { - default: - return fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return visitor.VisitString(i.String) - case "trackingCategory": - return visitor.VisitTrackingCategory(i.TrackingCategory) +func (c *CreditNoteLineItem) GetMemo() *string { + if c == nil { + return nil } + return c.Memo } -type InvoiceLineItemTrackingCategory struct { - typeName string - String string - TrackingCategory *TrackingCategory +func (c *CreditNoteLineItem) GetUnitPrice() *string { + if c == nil { + return nil + } + return c.UnitPrice } -func NewInvoiceLineItemTrackingCategoryFromString(value string) *InvoiceLineItemTrackingCategory { - return &InvoiceLineItemTrackingCategory{typeName: "string", String: value} +func (c *CreditNoteLineItem) GetTaxRate() *string { + if c == nil { + return nil + } + return c.TaxRate } -func NewInvoiceLineItemTrackingCategoryFromTrackingCategory(value *TrackingCategory) *InvoiceLineItemTrackingCategory { - return &InvoiceLineItemTrackingCategory{typeName: "trackingCategory", TrackingCategory: value} +func (c *CreditNoteLineItem) GetTotalLineAmount() *string { + if c == nil { + return nil + } + return c.TotalLineAmount } -func (i *InvoiceLineItemTrackingCategory) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - i.typeName = "string" - i.String = valueString +func (c *CreditNoteLineItem) GetTrackingCategory() *string { + if c == nil { return nil } - valueTrackingCategory := new(TrackingCategory) - if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { - i.typeName = "trackingCategory" - i.TrackingCategory = valueTrackingCategory + return c.TrackingCategory +} + +func (c *CreditNoteLineItem) GetTrackingCategories() []*string { + if c == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, i) + return c.TrackingCategories } -func (i InvoiceLineItemTrackingCategory) MarshalJSON() ([]byte, error) { - switch i.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return json.Marshal(i.String) - case "trackingCategory": - return json.Marshal(i.TrackingCategory) +func (c *CreditNoteLineItem) GetAccount() *string { + if c == nil { + return nil } + return c.Account } -type InvoiceLineItemTrackingCategoryVisitor interface { - VisitString(string) error - VisitTrackingCategory(*TrackingCategory) error +func (c *CreditNoteLineItem) GetCompany() *CreditNoteLineItemCompany { + if c == nil { + return nil + } + return c.Company } -func (i *InvoiceLineItemTrackingCategory) Accept(visitor InvoiceLineItemTrackingCategoryVisitor) error { - switch i.typeName { - default: - return fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return visitor.VisitString(i.String) - case "trackingCategory": - return visitor.VisitTrackingCategory(i.TrackingCategory) +func (c *CreditNoteLineItem) GetContact() *CreditNoteLineItemContact { + if c == nil { + return nil } + return c.Contact } -type InvoicePaymentsItem struct { - typeName string - String string - Payment *Payment +func (c *CreditNoteLineItem) GetProject() *CreditNoteLineItemProject { + if c == nil { + return nil + } + return c.Project } -func NewInvoicePaymentsItemFromString(value string) *InvoicePaymentsItem { - return &InvoicePaymentsItem{typeName: "string", String: value} +func (c *CreditNoteLineItem) GetRemoteWasDeleted() *bool { + if c == nil { + return nil + } + return c.RemoteWasDeleted } -func NewInvoicePaymentsItemFromPayment(value *Payment) *InvoicePaymentsItem { - return &InvoicePaymentsItem{typeName: "payment", Payment: value} +func (c *CreditNoteLineItem) GetExtraProperties() map[string]interface{} { + return c.extraProperties } -func (i *InvoicePaymentsItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - i.typeName = "string" - i.String = valueString - return nil +func (c *CreditNoteLineItem) UnmarshalJSON(data []byte) error { + type embed CreditNoteLineItem + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*c), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err } - valuePayment := new(Payment) - if err := json.Unmarshal(data, &valuePayment); err == nil { - i.typeName = "payment" - i.Payment = valuePayment - return nil + *c = CreditNoteLineItem(unmarshaler.embed) + c.CreatedAt = unmarshaler.CreatedAt.TimePtr() + c.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *c) + if err != nil { + return err } - return fmt.Errorf("%s cannot be deserialized as a %T", data, i) + c.extraProperties = extraProperties + c.rawJSON = json.RawMessage(data) + return nil } -func (i InvoicePaymentsItem) MarshalJSON() ([]byte, error) { - switch i.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return json.Marshal(i.String) - case "payment": - return json.Marshal(i.Payment) +func (c *CreditNoteLineItem) MarshalJSON() ([]byte, error) { + type embed CreditNoteLineItem + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*c), + CreatedAt: internal.NewOptionalDateTime(c.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(c.ModifiedAt), } + return json.Marshal(marshaler) } -type InvoicePaymentsItemVisitor interface { - VisitString(string) error - VisitPayment(*Payment) error -} - -func (i *InvoicePaymentsItem) Accept(visitor InvoicePaymentsItemVisitor) error { - switch i.typeName { - default: - return fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return visitor.VisitString(i.String) - case "payment": - return visitor.VisitPayment(i.Payment) +func (c *CreditNoteLineItem) String() string { + if len(c.rawJSON) > 0 { + if value, err := internal.StringifyJSON(c.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(c); err == nil { + return value } + return fmt.Sprintf("%#v", c) } -type InvoicePurchaseOrdersItem struct { - typeName string - String string - PurchaseOrder *PurchaseOrder +// The company the credit note belongs to. +type CreditNoteLineItemCompany struct { + String string + CompanyInfo *CompanyInfo + + typ string } -func NewInvoicePurchaseOrdersItemFromString(value string) *InvoicePurchaseOrdersItem { - return &InvoicePurchaseOrdersItem{typeName: "string", String: value} +func (c *CreditNoteLineItemCompany) GetString() string { + if c == nil { + return "" + } + return c.String } -func NewInvoicePurchaseOrdersItemFromPurchaseOrder(value *PurchaseOrder) *InvoicePurchaseOrdersItem { - return &InvoicePurchaseOrdersItem{typeName: "purchaseOrder", PurchaseOrder: value} +func (c *CreditNoteLineItemCompany) GetCompanyInfo() *CompanyInfo { + if c == nil { + return nil + } + return c.CompanyInfo } -func (i *InvoicePurchaseOrdersItem) UnmarshalJSON(data []byte) error { +func (c *CreditNoteLineItemCompany) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - i.typeName = "string" - i.String = valueString + c.typ = "String" + c.String = valueString return nil } - valuePurchaseOrder := new(PurchaseOrder) - if err := json.Unmarshal(data, &valuePurchaseOrder); err == nil { - i.typeName = "purchaseOrder" - i.PurchaseOrder = valuePurchaseOrder + valueCompanyInfo := new(CompanyInfo) + if err := json.Unmarshal(data, &valueCompanyInfo); err == nil { + c.typ = "CompanyInfo" + c.CompanyInfo = valueCompanyInfo return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, i) + return fmt.Errorf("%s cannot be deserialized as a %T", data, c) } -func (i InvoicePurchaseOrdersItem) MarshalJSON() ([]byte, error) { - switch i.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return json.Marshal(i.String) - case "purchaseOrder": - return json.Marshal(i.PurchaseOrder) +func (c CreditNoteLineItemCompany) MarshalJSON() ([]byte, error) { + if c.typ == "String" || c.String != "" { + return json.Marshal(c.String) + } + if c.typ == "CompanyInfo" || c.CompanyInfo != nil { + return json.Marshal(c.CompanyInfo) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", c) } -type InvoicePurchaseOrdersItemVisitor interface { +type CreditNoteLineItemCompanyVisitor interface { VisitString(string) error - VisitPurchaseOrder(*PurchaseOrder) error + VisitCompanyInfo(*CompanyInfo) error } -func (i *InvoicePurchaseOrdersItem) Accept(visitor InvoicePurchaseOrdersItemVisitor) error { - switch i.typeName { - default: - return fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return visitor.VisitString(i.String) - case "purchaseOrder": - return visitor.VisitPurchaseOrder(i.PurchaseOrder) +func (c *CreditNoteLineItemCompany) Accept(visitor CreditNoteLineItemCompanyVisitor) error { + if c.typ == "String" || c.String != "" { + return visitor.VisitString(c.String) + } + if c.typ == "CompanyInfo" || c.CompanyInfo != nil { + return visitor.VisitCompanyInfo(c.CompanyInfo) } + return fmt.Errorf("type %T does not include a non-empty union type", c) } -// # The Invoice Object -// -// ### Description -// -// The `Invoice` object represents an itemized record of goods and/or services sold to a customer or bought from a vendor. -// -// Represents a Bill when the `Invoice` type is `ACCOUNTS_PAYABLE`. References an Invoice when the `Invoice` type is `ACCOUNTS_RECEIVABLE`. -// -// ### Usage Example -// -// Fetch from the `LIST Invoices` endpoint and view a company's invoices. -type InvoiceRequest struct { - // 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. - // - // - `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE - // - `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE - Type *InvoiceRequestType `json:"type,omitempty"` - // The invoice's contact. - Contact *InvoiceRequestContact `json:"contact,omitempty"` - // The invoice's number. - Number *string `json:"number,omitempty"` - // The invoice's issue date. - IssueDate *time.Time `json:"issue_date,omitempty"` - // The invoice's due date. - DueDate *time.Time `json:"due_date,omitempty"` - // The invoice's paid date. - PaidOnDate *time.Time `json:"paid_on_date,omitempty"` - // The employee this overall transaction relates to. - Employee *InvoiceRequestEmployee `json:"employee,omitempty"` - // The invoice's private note. - Memo *string `json:"memo,omitempty"` - // The status of the invoice. - // - // - `PAID` - PAID - // - `DRAFT` - DRAFT - // - `SUBMITTED` - SUBMITTED - // - `PARTIALLY_PAID` - PARTIALLY_PAID - // - `OPEN` - OPEN - // - `VOID` - VOID - Status *InvoiceRequestStatus `json:"status,omitempty"` - // The company the invoice belongs to. - Company *InvoiceRequestCompany `json:"company,omitempty"` - // The invoice's currency. - // - // - `XUA` - ADB Unit of Account - // - `AFN` - Afghan Afghani - // - `AFA` - Afghan Afghani (1927–2002) - // - `ALL` - Albanian Lek - // - `ALK` - Albanian Lek (1946–1965) - // - `DZD` - Algerian Dinar - // - `ADP` - Andorran Peseta - // - `AOA` - Angolan Kwanza - // - `AOK` - Angolan Kwanza (1977–1991) - // - `AON` - Angolan New Kwanza (1990–2000) - // - `AOR` - Angolan Readjusted Kwanza (1995–1999) - // - `ARA` - Argentine Austral - // - `ARS` - Argentine Peso - // - `ARM` - Argentine Peso (1881–1970) - // - `ARP` - Argentine Peso (1983–1985) - // - `ARL` - Argentine Peso Ley (1970–1983) - // - `AMD` - Armenian Dram - // - `AWG` - Aruban Florin - // - `AUD` - Australian Dollar - // - `ATS` - Austrian Schilling - // - `AZN` - Azerbaijani Manat - // - `AZM` - Azerbaijani Manat (1993–2006) - // - `BSD` - Bahamian Dollar - // - `BHD` - Bahraini Dinar - // - `BDT` - Bangladeshi Taka - // - `BBD` - Barbadian Dollar - // - `BYN` - Belarusian Ruble - // - `BYB` - Belarusian Ruble (1994–1999) - // - `BYR` - Belarusian Ruble (2000–2016) - // - `BEF` - Belgian Franc - // - `BEC` - Belgian Franc (convertible) - // - `BEL` - Belgian Franc (financial) - // - `BZD` - Belize Dollar - // - `BMD` - Bermudan Dollar - // - `BTN` - Bhutanese Ngultrum - // - `BOB` - Bolivian Boliviano - // - `BOL` - Bolivian Boliviano (1863–1963) - // - `BOV` - Bolivian Mvdol - // - `BOP` - Bolivian Peso - // - `BAM` - Bosnia-Herzegovina Convertible Mark - // - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - // - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - // - `BWP` - Botswanan Pula - // - `BRC` - Brazilian Cruzado (1986–1989) - // - `BRZ` - Brazilian Cruzeiro (1942–1967) - // - `BRE` - Brazilian Cruzeiro (1990–1993) - // - `BRR` - Brazilian Cruzeiro (1993–1994) - // - `BRN` - Brazilian New Cruzado (1989–1990) - // - `BRB` - Brazilian New Cruzeiro (1967–1986) - // - `BRL` - Brazilian Real - // - `GBP` - British Pound - // - `BND` - Brunei Dollar - // - `BGL` - Bulgarian Hard Lev - // - `BGN` - Bulgarian Lev - // - `BGO` - Bulgarian Lev (1879–1952) - // - `BGM` - Bulgarian Socialist Lev - // - `BUK` - Burmese Kyat - // - `BIF` - Burundian Franc - // - `XPF` - CFP Franc - // - `KHR` - Cambodian Riel - // - `CAD` - Canadian Dollar - // - `CVE` - Cape Verdean Escudo - // - `KYD` - Cayman Islands Dollar - // - `XAF` - Central African CFA Franc - // - `CLE` - Chilean Escudo - // - `CLP` - Chilean Peso - // - `CLF` - Chilean Unit of Account (UF) - // - `CNX` - Chinese People’s Bank Dollar - // - `CNY` - Chinese Yuan - // - `CNH` - Chinese Yuan (offshore) - // - `COP` - Colombian Peso - // - `COU` - Colombian Real Value Unit - // - `KMF` - Comorian Franc - // - `CDF` - Congolese Franc - // - `CRC` - Costa Rican Colón - // - `HRD` - Croatian Dinar - // - `HRK` - Croatian Kuna - // - `CUC` - Cuban Convertible Peso - // - `CUP` - Cuban Peso - // - `CYP` - Cypriot Pound - // - `CZK` - Czech Koruna - // - `CSK` - Czechoslovak Hard Koruna - // - `DKK` - Danish Krone - // - `DJF` - Djiboutian Franc - // - `DOP` - Dominican Peso - // - `NLG` - Dutch Guilder - // - `XCD` - East Caribbean Dollar - // - `DDM` - East German Mark - // - `ECS` - Ecuadorian Sucre - // - `ECV` - Ecuadorian Unit of Constant Value - // - `EGP` - Egyptian Pound - // - `GQE` - Equatorial Guinean Ekwele - // - `ERN` - Eritrean Nakfa - // - `EEK` - Estonian Kroon - // - `ETB` - Ethiopian Birr - // - `EUR` - Euro - // - `XBA` - European Composite Unit - // - `XEU` - European Currency Unit - // - `XBB` - European Monetary Unit - // - `XBC` - European Unit of Account (XBC) - // - `XBD` - European Unit of Account (XBD) - // - `FKP` - Falkland Islands Pound - // - `FJD` - Fijian Dollar - // - `FIM` - Finnish Markka - // - `FRF` - French Franc - // - `XFO` - French Gold Franc - // - `XFU` - French UIC-Franc - // - `GMD` - Gambian Dalasi - // - `GEK` - Georgian Kupon Larit - // - `GEL` - Georgian Lari - // - `DEM` - German Mark - // - `GHS` - Ghanaian Cedi - // - `GHC` - Ghanaian Cedi (1979–2007) - // - `GIP` - Gibraltar Pound - // - `XAU` - Gold - // - `GRD` - Greek Drachma - // - `GTQ` - Guatemalan Quetzal - // - `GWP` - Guinea-Bissau Peso - // - `GNF` - Guinean Franc - // - `GNS` - Guinean Syli - // - `GYD` - Guyanaese Dollar - // - `HTG` - Haitian Gourde - // - `HNL` - Honduran Lempira - // - `HKD` - Hong Kong Dollar - // - `HUF` - Hungarian Forint - // - `IMP` - IMP - // - `ISK` - Icelandic Króna - // - `ISJ` - Icelandic Króna (1918–1981) - // - `INR` - Indian Rupee - // - `IDR` - Indonesian Rupiah - // - `IRR` - Iranian Rial - // - `IQD` - Iraqi Dinar - // - `IEP` - Irish Pound - // - `ILS` - Israeli New Shekel - // - `ILP` - Israeli Pound - // - `ILR` - Israeli Shekel (1980–1985) - // - `ITL` - Italian Lira - // - `JMD` - Jamaican Dollar - // - `JPY` - Japanese Yen - // - `JOD` - Jordanian Dinar - // - `KZT` - Kazakhstani Tenge - // - `KES` - Kenyan Shilling - // - `KWD` - Kuwaiti Dinar - // - `KGS` - Kyrgystani Som - // - `LAK` - Laotian Kip - // - `LVL` - Latvian Lats - // - `LVR` - Latvian Ruble - // - `LBP` - Lebanese Pound - // - `LSL` - Lesotho Loti - // - `LRD` - Liberian Dollar - // - `LYD` - Libyan Dinar - // - `LTL` - Lithuanian Litas - // - `LTT` - Lithuanian Talonas - // - `LUL` - Luxembourg Financial Franc - // - `LUC` - Luxembourgian Convertible Franc - // - `LUF` - Luxembourgian Franc - // - `MOP` - Macanese Pataca - // - `MKD` - Macedonian Denar - // - `MKN` - Macedonian Denar (1992–1993) - // - `MGA` - Malagasy Ariary - // - `MGF` - Malagasy Franc - // - `MWK` - Malawian Kwacha - // - `MYR` - Malaysian Ringgit - // - `MVR` - Maldivian Rufiyaa - // - `MVP` - Maldivian Rupee (1947–1981) - // - `MLF` - Malian Franc - // - `MTL` - Maltese Lira - // - `MTP` - Maltese Pound - // - `MRU` - Mauritanian Ouguiya - // - `MRO` - Mauritanian Ouguiya (1973–2017) - // - `MUR` - Mauritian Rupee - // - `MXV` - Mexican Investment Unit - // - `MXN` - Mexican Peso - // - `MXP` - Mexican Silver Peso (1861–1992) - // - `MDC` - Moldovan Cupon - // - `MDL` - Moldovan Leu - // - `MCF` - Monegasque Franc - // - `MNT` - Mongolian Tugrik - // - `MAD` - Moroccan Dirham - // - `MAF` - Moroccan Franc - // - `MZE` - Mozambican Escudo - // - `MZN` - Mozambican Metical - // - `MZM` - Mozambican Metical (1980–2006) - // - `MMK` - Myanmar Kyat - // - `NAD` - Namibian Dollar - // - `NPR` - Nepalese Rupee - // - `ANG` - Netherlands Antillean Guilder - // - `TWD` - New Taiwan Dollar - // - `NZD` - New Zealand Dollar - // - `NIO` - Nicaraguan Córdoba - // - `NIC` - Nicaraguan Córdoba (1988–1991) - // - `NGN` - Nigerian Naira - // - `KPW` - North Korean Won - // - `NOK` - Norwegian Krone - // - `OMR` - Omani Rial - // - `PKR` - Pakistani Rupee - // - `XPD` - Palladium - // - `PAB` - Panamanian Balboa - // - `PGK` - Papua New Guinean Kina - // - `PYG` - Paraguayan Guarani - // - `PEI` - Peruvian Inti - // - `PEN` - Peruvian Sol - // - `PES` - Peruvian Sol (1863–1965) - // - `PHP` - Philippine Peso - // - `XPT` - Platinum - // - `PLN` - Polish Zloty - // - `PLZ` - Polish Zloty (1950–1995) - // - `PTE` - Portuguese Escudo - // - `GWE` - Portuguese Guinea Escudo - // - `QAR` - Qatari Rial - // - `XRE` - RINET Funds - // - `RHD` - Rhodesian Dollar - // - `RON` - Romanian Leu - // - `ROL` - Romanian Leu (1952–2006) - // - `RUB` - Russian Ruble - // - `RUR` - Russian Ruble (1991–1998) - // - `RWF` - Rwandan Franc - // - `SVC` - Salvadoran Colón - // - `WST` - Samoan Tala - // - `SAR` - Saudi Riyal - // - `RSD` - Serbian Dinar - // - `CSD` - Serbian Dinar (2002–2006) - // - `SCR` - Seychellois Rupee - // - `SLL` - Sierra Leonean Leone - // - `XAG` - Silver - // - `SGD` - Singapore Dollar - // - `SKK` - Slovak Koruna - // - `SIT` - Slovenian Tolar - // - `SBD` - Solomon Islands Dollar - // - `SOS` - Somali Shilling - // - `ZAR` - South African Rand - // - `ZAL` - South African Rand (financial) - // - `KRH` - South Korean Hwan (1953–1962) - // - `KRW` - South Korean Won - // - `KRO` - South Korean Won (1945–1953) - // - `SSP` - South Sudanese Pound - // - `SUR` - Soviet Rouble - // - `ESP` - Spanish Peseta - // - `ESA` - Spanish Peseta (A account) - // - `ESB` - Spanish Peseta (convertible account) - // - `XDR` - Special Drawing Rights - // - `LKR` - Sri Lankan Rupee - // - `SHP` - St. Helena Pound - // - `XSU` - Sucre - // - `SDD` - Sudanese Dinar (1992–2007) - // - `SDG` - Sudanese Pound - // - `SDP` - Sudanese Pound (1957–1998) - // - `SRD` - Surinamese Dollar - // - `SRG` - Surinamese Guilder - // - `SZL` - Swazi Lilangeni - // - `SEK` - Swedish Krona - // - `CHF` - Swiss Franc - // - `SYP` - Syrian Pound - // - `STN` - São Tomé & Príncipe Dobra - // - `STD` - São Tomé & Príncipe Dobra (1977–2017) - // - `TVD` - TVD - // - `TJR` - Tajikistani Ruble - // - `TJS` - Tajikistani Somoni - // - `TZS` - Tanzanian Shilling - // - `XTS` - Testing Currency Code - // - `THB` - Thai Baht - // - `XXX` - The codes assigned for transactions where no currency is involved - // - `TPE` - Timorese Escudo - // - `TOP` - Tongan Paʻanga - // - `TTD` - Trinidad & Tobago Dollar - // - `TND` - Tunisian Dinar - // - `TRY` - Turkish Lira - // - `TRL` - Turkish Lira (1922–2005) - // - `TMT` - Turkmenistani Manat - // - `TMM` - Turkmenistani Manat (1993–2009) - // - `USD` - US Dollar - // - `USN` - US Dollar (Next day) - // - `USS` - US Dollar (Same day) - // - `UGX` - Ugandan Shilling - // - `UGS` - Ugandan Shilling (1966–1987) - // - `UAH` - Ukrainian Hryvnia - // - `UAK` - Ukrainian Karbovanets - // - `AED` - United Arab Emirates Dirham - // - `UYW` - Uruguayan Nominal Wage Index Unit - // - `UYU` - Uruguayan Peso - // - `UYP` - Uruguayan Peso (1975–1993) - // - `UYI` - Uruguayan Peso (Indexed Units) - // - `UZS` - Uzbekistani Som - // - `VUV` - Vanuatu Vatu - // - `VES` - Venezuelan Bolívar - // - `VEB` - Venezuelan Bolívar (1871–2008) - // - `VEF` - Venezuelan Bolívar (2008–2018) - // - `VND` - Vietnamese Dong - // - `VNN` - Vietnamese Dong (1978–1985) - // - `CHE` - WIR Euro - // - `CHW` - WIR Franc - // - `XOF` - West African CFA Franc - // - `YDD` - Yemeni Dinar - // - `YER` - Yemeni Rial - // - `YUN` - Yugoslavian Convertible Dinar (1990–1992) - // - `YUD` - Yugoslavian Hard Dinar (1966–1990) - // - `YUM` - Yugoslavian New Dinar (1994–2002) - // - `YUR` - Yugoslavian Reformed Dinar (1992–1993) - // - `ZWN` - ZWN - // - `ZRN` - Zairean New Zaire (1993–1998) - // - `ZRZ` - Zairean Zaire (1971–1993) - // - `ZMW` - Zambian Kwacha - // - `ZMK` - Zambian Kwacha (1968–2012) - // - `ZWD` - Zimbabwean Dollar (1980–2008) - // - `ZWR` - Zimbabwean Dollar (2008) - // - `ZWL` - Zimbabwean Dollar (2009) - Currency *InvoiceRequestCurrency `json:"currency,omitempty"` - // The invoice's exchange rate. - ExchangeRate *string `json:"exchange_rate,omitempty"` - // The total discounts applied to the total cost. - TotalDiscount *float64 `json:"total_discount,omitempty"` - // The total amount being paid before taxes. - SubTotal *float64 `json:"sub_total,omitempty"` - // The total amount being paid in taxes. - TotalTaxAmount *float64 `json:"total_tax_amount,omitempty"` - // If the transaction is inclusive or exclusive of tax. `True` if inclusive, `False` if exclusive. - InclusiveOfTax *bool `json:"inclusive_of_tax,omitempty"` - // The invoice's total amount. - TotalAmount *float64 `json:"total_amount,omitempty"` - // The invoice's remaining balance. - Balance *float64 `json:"balance,omitempty"` - // Array of `Payment` object IDs. - Payments []*InvoiceRequestPaymentsItem `json:"payments,omitempty"` - TrackingCategories []*InvoiceRequestTrackingCategoriesItem `json:"tracking_categories,omitempty"` - LineItems []*InvoiceLineItemRequest `json:"line_items,omitempty"` - PurchaseOrders []*InvoiceRequestPurchaseOrdersItem `json:"purchase_orders,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` - RemoteFields []*RemoteFieldRequest `json:"remote_fields,omitempty"` +// The credit note's contact. +type CreditNoteLineItemContact struct { + String string + Contact *Contact - _rawJSON json.RawMessage + typ string } -func (i *InvoiceRequest) UnmarshalJSON(data []byte) error { - type unmarshaler InvoiceRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (c *CreditNoteLineItemContact) GetString() string { + if c == nil { + return "" } - *i = InvoiceRequest(value) - i._rawJSON = json.RawMessage(data) - return nil + return c.String } -func (i *InvoiceRequest) String() string { - if len(i._rawJSON) > 0 { - if value, err := core.StringifyJSON(i._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(i); err == nil { - return value +func (c *CreditNoteLineItemContact) GetContact() *Contact { + if c == nil { + return nil } - return fmt.Sprintf("%#v", i) -} - -// The company the invoice belongs to. -type InvoiceRequestCompany struct { - typeName string - String string - CompanyInfo *CompanyInfo -} - -func NewInvoiceRequestCompanyFromString(value string) *InvoiceRequestCompany { - return &InvoiceRequestCompany{typeName: "string", String: value} -} - -func NewInvoiceRequestCompanyFromCompanyInfo(value *CompanyInfo) *InvoiceRequestCompany { - return &InvoiceRequestCompany{typeName: "companyInfo", CompanyInfo: value} + return c.Contact } -func (i *InvoiceRequestCompany) UnmarshalJSON(data []byte) error { +func (c *CreditNoteLineItemContact) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - i.typeName = "string" - i.String = valueString + c.typ = "String" + c.String = valueString return nil } - valueCompanyInfo := new(CompanyInfo) - if err := json.Unmarshal(data, &valueCompanyInfo); err == nil { - i.typeName = "companyInfo" - i.CompanyInfo = valueCompanyInfo + valueContact := new(Contact) + if err := json.Unmarshal(data, &valueContact); err == nil { + c.typ = "Contact" + c.Contact = valueContact return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, i) + return fmt.Errorf("%s cannot be deserialized as a %T", data, c) } -func (i InvoiceRequestCompany) MarshalJSON() ([]byte, error) { - switch i.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return json.Marshal(i.String) - case "companyInfo": - return json.Marshal(i.CompanyInfo) +func (c CreditNoteLineItemContact) MarshalJSON() ([]byte, error) { + if c.typ == "String" || c.String != "" { + return json.Marshal(c.String) + } + if c.typ == "Contact" || c.Contact != nil { + return json.Marshal(c.Contact) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", c) } -type InvoiceRequestCompanyVisitor interface { +type CreditNoteLineItemContactVisitor interface { VisitString(string) error - VisitCompanyInfo(*CompanyInfo) error + VisitContact(*Contact) error } -func (i *InvoiceRequestCompany) Accept(visitor InvoiceRequestCompanyVisitor) error { - switch i.typeName { - default: - return fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return visitor.VisitString(i.String) - case "companyInfo": - return visitor.VisitCompanyInfo(i.CompanyInfo) +func (c *CreditNoteLineItemContact) Accept(visitor CreditNoteLineItemContactVisitor) error { + if c.typ == "String" || c.String != "" { + return visitor.VisitString(c.String) + } + if c.typ == "Contact" || c.Contact != nil { + return visitor.VisitContact(c.Contact) } + return fmt.Errorf("type %T does not include a non-empty union type", c) } -// The invoice's contact. -type InvoiceRequestContact struct { - typeName string - String string - Contact *Contact +type CreditNoteLineItemItem struct { + String string + Item *Item + + typ string } -func NewInvoiceRequestContactFromString(value string) *InvoiceRequestContact { - return &InvoiceRequestContact{typeName: "string", String: value} +func (c *CreditNoteLineItemItem) GetString() string { + if c == nil { + return "" + } + return c.String } -func NewInvoiceRequestContactFromContact(value *Contact) *InvoiceRequestContact { - return &InvoiceRequestContact{typeName: "contact", Contact: value} +func (c *CreditNoteLineItemItem) GetItem() *Item { + if c == nil { + return nil + } + return c.Item } -func (i *InvoiceRequestContact) UnmarshalJSON(data []byte) error { +func (c *CreditNoteLineItemItem) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - i.typeName = "string" - i.String = valueString + c.typ = "String" + c.String = valueString return nil } - valueContact := new(Contact) - if err := json.Unmarshal(data, &valueContact); err == nil { - i.typeName = "contact" - i.Contact = valueContact + valueItem := new(Item) + if err := json.Unmarshal(data, &valueItem); err == nil { + c.typ = "Item" + c.Item = valueItem return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, i) + return fmt.Errorf("%s cannot be deserialized as a %T", data, c) } -func (i InvoiceRequestContact) MarshalJSON() ([]byte, error) { - switch i.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return json.Marshal(i.String) - case "contact": - return json.Marshal(i.Contact) +func (c CreditNoteLineItemItem) MarshalJSON() ([]byte, error) { + if c.typ == "String" || c.String != "" { + return json.Marshal(c.String) } + if c.typ == "Item" || c.Item != nil { + return json.Marshal(c.Item) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", c) } -type InvoiceRequestContactVisitor interface { +type CreditNoteLineItemItemVisitor interface { VisitString(string) error - VisitContact(*Contact) error + VisitItem(*Item) error } -func (i *InvoiceRequestContact) Accept(visitor InvoiceRequestContactVisitor) error { - switch i.typeName { - default: - return fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return visitor.VisitString(i.String) - case "contact": - return visitor.VisitContact(i.Contact) +func (c *CreditNoteLineItemItem) Accept(visitor CreditNoteLineItemItemVisitor) error { + if c.typ == "String" || c.String != "" { + return visitor.VisitString(c.String) + } + if c.typ == "Item" || c.Item != nil { + return visitor.VisitItem(c.Item) } + return fmt.Errorf("type %T does not include a non-empty union type", c) } -// The invoice's currency. -// -// - `XUA` - ADB Unit of Account -// - `AFN` - Afghan Afghani -// - `AFA` - Afghan Afghani (1927–2002) -// - `ALL` - Albanian Lek -// - `ALK` - Albanian Lek (1946–1965) -// - `DZD` - Algerian Dinar -// - `ADP` - Andorran Peseta -// - `AOA` - Angolan Kwanza -// - `AOK` - Angolan Kwanza (1977–1991) -// - `AON` - Angolan New Kwanza (1990–2000) -// - `AOR` - Angolan Readjusted Kwanza (1995–1999) -// - `ARA` - Argentine Austral -// - `ARS` - Argentine Peso -// - `ARM` - Argentine Peso (1881–1970) -// - `ARP` - Argentine Peso (1983–1985) -// - `ARL` - Argentine Peso Ley (1970–1983) -// - `AMD` - Armenian Dram -// - `AWG` - Aruban Florin -// - `AUD` - Australian Dollar -// - `ATS` - Austrian Schilling -// - `AZN` - Azerbaijani Manat -// - `AZM` - Azerbaijani Manat (1993–2006) -// - `BSD` - Bahamian Dollar -// - `BHD` - Bahraini Dinar -// - `BDT` - Bangladeshi Taka -// - `BBD` - Barbadian Dollar -// - `BYN` - Belarusian Ruble -// - `BYB` - Belarusian Ruble (1994–1999) -// - `BYR` - Belarusian Ruble (2000–2016) -// - `BEF` - Belgian Franc -// - `BEC` - Belgian Franc (convertible) -// - `BEL` - Belgian Franc (financial) -// - `BZD` - Belize Dollar -// - `BMD` - Bermudan Dollar -// - `BTN` - Bhutanese Ngultrum -// - `BOB` - Bolivian Boliviano -// - `BOL` - Bolivian Boliviano (1863–1963) -// - `BOV` - Bolivian Mvdol -// - `BOP` - Bolivian Peso -// - `BAM` - Bosnia-Herzegovina Convertible Mark -// - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) -// - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) -// - `BWP` - Botswanan Pula -// - `BRC` - Brazilian Cruzado (1986–1989) -// - `BRZ` - Brazilian Cruzeiro (1942–1967) -// - `BRE` - Brazilian Cruzeiro (1990–1993) -// - `BRR` - Brazilian Cruzeiro (1993–1994) -// - `BRN` - Brazilian New Cruzado (1989–1990) -// - `BRB` - Brazilian New Cruzeiro (1967–1986) -// - `BRL` - Brazilian Real -// - `GBP` - British Pound -// - `BND` - Brunei Dollar -// - `BGL` - Bulgarian Hard Lev -// - `BGN` - Bulgarian Lev -// - `BGO` - Bulgarian Lev (1879–1952) -// - `BGM` - Bulgarian Socialist Lev -// - `BUK` - Burmese Kyat -// - `BIF` - Burundian Franc -// - `XPF` - CFP Franc -// - `KHR` - Cambodian Riel -// - `CAD` - Canadian Dollar -// - `CVE` - Cape Verdean Escudo -// - `KYD` - Cayman Islands Dollar -// - `XAF` - Central African CFA Franc -// - `CLE` - Chilean Escudo -// - `CLP` - Chilean Peso -// - `CLF` - Chilean Unit of Account (UF) -// - `CNX` - Chinese People’s Bank Dollar -// - `CNY` - Chinese Yuan -// - `CNH` - Chinese Yuan (offshore) -// - `COP` - Colombian Peso -// - `COU` - Colombian Real Value Unit -// - `KMF` - Comorian Franc -// - `CDF` - Congolese Franc -// - `CRC` - Costa Rican Colón -// - `HRD` - Croatian Dinar -// - `HRK` - Croatian Kuna -// - `CUC` - Cuban Convertible Peso -// - `CUP` - Cuban Peso -// - `CYP` - Cypriot Pound -// - `CZK` - Czech Koruna -// - `CSK` - Czechoslovak Hard Koruna -// - `DKK` - Danish Krone -// - `DJF` - Djiboutian Franc -// - `DOP` - Dominican Peso -// - `NLG` - Dutch Guilder -// - `XCD` - East Caribbean Dollar -// - `DDM` - East German Mark -// - `ECS` - Ecuadorian Sucre -// - `ECV` - Ecuadorian Unit of Constant Value -// - `EGP` - Egyptian Pound -// - `GQE` - Equatorial Guinean Ekwele -// - `ERN` - Eritrean Nakfa -// - `EEK` - Estonian Kroon -// - `ETB` - Ethiopian Birr -// - `EUR` - Euro -// - `XBA` - European Composite Unit -// - `XEU` - European Currency Unit -// - `XBB` - European Monetary Unit -// - `XBC` - European Unit of Account (XBC) -// - `XBD` - European Unit of Account (XBD) -// - `FKP` - Falkland Islands Pound -// - `FJD` - Fijian Dollar -// - `FIM` - Finnish Markka -// - `FRF` - French Franc -// - `XFO` - French Gold Franc -// - `XFU` - French UIC-Franc -// - `GMD` - Gambian Dalasi -// - `GEK` - Georgian Kupon Larit -// - `GEL` - Georgian Lari -// - `DEM` - German Mark -// - `GHS` - Ghanaian Cedi -// - `GHC` - Ghanaian Cedi (1979–2007) -// - `GIP` - Gibraltar Pound -// - `XAU` - Gold -// - `GRD` - Greek Drachma -// - `GTQ` - Guatemalan Quetzal -// - `GWP` - Guinea-Bissau Peso -// - `GNF` - Guinean Franc -// - `GNS` - Guinean Syli -// - `GYD` - Guyanaese Dollar -// - `HTG` - Haitian Gourde -// - `HNL` - Honduran Lempira -// - `HKD` - Hong Kong Dollar -// - `HUF` - Hungarian Forint -// - `IMP` - IMP -// - `ISK` - Icelandic Króna -// - `ISJ` - Icelandic Króna (1918–1981) -// - `INR` - Indian Rupee -// - `IDR` - Indonesian Rupiah -// - `IRR` - Iranian Rial -// - `IQD` - Iraqi Dinar -// - `IEP` - Irish Pound -// - `ILS` - Israeli New Shekel -// - `ILP` - Israeli Pound -// - `ILR` - Israeli Shekel (1980–1985) -// - `ITL` - Italian Lira -// - `JMD` - Jamaican Dollar -// - `JPY` - Japanese Yen -// - `JOD` - Jordanian Dinar -// - `KZT` - Kazakhstani Tenge -// - `KES` - Kenyan Shilling -// - `KWD` - Kuwaiti Dinar -// - `KGS` - Kyrgystani Som -// - `LAK` - Laotian Kip -// - `LVL` - Latvian Lats -// - `LVR` - Latvian Ruble -// - `LBP` - Lebanese Pound -// - `LSL` - Lesotho Loti -// - `LRD` - Liberian Dollar -// - `LYD` - Libyan Dinar -// - `LTL` - Lithuanian Litas -// - `LTT` - Lithuanian Talonas -// - `LUL` - Luxembourg Financial Franc -// - `LUC` - Luxembourgian Convertible Franc -// - `LUF` - Luxembourgian Franc -// - `MOP` - Macanese Pataca -// - `MKD` - Macedonian Denar -// - `MKN` - Macedonian Denar (1992–1993) -// - `MGA` - Malagasy Ariary -// - `MGF` - Malagasy Franc -// - `MWK` - Malawian Kwacha -// - `MYR` - Malaysian Ringgit -// - `MVR` - Maldivian Rufiyaa -// - `MVP` - Maldivian Rupee (1947–1981) -// - `MLF` - Malian Franc -// - `MTL` - Maltese Lira -// - `MTP` - Maltese Pound -// - `MRU` - Mauritanian Ouguiya -// - `MRO` - Mauritanian Ouguiya (1973–2017) -// - `MUR` - Mauritian Rupee -// - `MXV` - Mexican Investment Unit -// - `MXN` - Mexican Peso -// - `MXP` - Mexican Silver Peso (1861–1992) -// - `MDC` - Moldovan Cupon -// - `MDL` - Moldovan Leu -// - `MCF` - Monegasque Franc -// - `MNT` - Mongolian Tugrik -// - `MAD` - Moroccan Dirham -// - `MAF` - Moroccan Franc -// - `MZE` - Mozambican Escudo -// - `MZN` - Mozambican Metical -// - `MZM` - Mozambican Metical (1980–2006) -// - `MMK` - Myanmar Kyat -// - `NAD` - Namibian Dollar -// - `NPR` - Nepalese Rupee -// - `ANG` - Netherlands Antillean Guilder -// - `TWD` - New Taiwan Dollar -// - `NZD` - New Zealand Dollar -// - `NIO` - Nicaraguan Córdoba -// - `NIC` - Nicaraguan Córdoba (1988–1991) -// - `NGN` - Nigerian Naira -// - `KPW` - North Korean Won -// - `NOK` - Norwegian Krone -// - `OMR` - Omani Rial -// - `PKR` - Pakistani Rupee -// - `XPD` - Palladium -// - `PAB` - Panamanian Balboa -// - `PGK` - Papua New Guinean Kina -// - `PYG` - Paraguayan Guarani -// - `PEI` - Peruvian Inti -// - `PEN` - Peruvian Sol -// - `PES` - Peruvian Sol (1863–1965) -// - `PHP` - Philippine Peso -// - `XPT` - Platinum -// - `PLN` - Polish Zloty -// - `PLZ` - Polish Zloty (1950–1995) -// - `PTE` - Portuguese Escudo -// - `GWE` - Portuguese Guinea Escudo -// - `QAR` - Qatari Rial -// - `XRE` - RINET Funds -// - `RHD` - Rhodesian Dollar -// - `RON` - Romanian Leu -// - `ROL` - Romanian Leu (1952–2006) -// - `RUB` - Russian Ruble -// - `RUR` - Russian Ruble (1991–1998) -// - `RWF` - Rwandan Franc -// - `SVC` - Salvadoran Colón -// - `WST` - Samoan Tala -// - `SAR` - Saudi Riyal -// - `RSD` - Serbian Dinar -// - `CSD` - Serbian Dinar (2002–2006) -// - `SCR` - Seychellois Rupee -// - `SLL` - Sierra Leonean Leone -// - `XAG` - Silver -// - `SGD` - Singapore Dollar -// - `SKK` - Slovak Koruna -// - `SIT` - Slovenian Tolar -// - `SBD` - Solomon Islands Dollar -// - `SOS` - Somali Shilling -// - `ZAR` - South African Rand -// - `ZAL` - South African Rand (financial) -// - `KRH` - South Korean Hwan (1953–1962) -// - `KRW` - South Korean Won -// - `KRO` - South Korean Won (1945–1953) -// - `SSP` - South Sudanese Pound -// - `SUR` - Soviet Rouble -// - `ESP` - Spanish Peseta -// - `ESA` - Spanish Peseta (A account) -// - `ESB` - Spanish Peseta (convertible account) -// - `XDR` - Special Drawing Rights -// - `LKR` - Sri Lankan Rupee -// - `SHP` - St. Helena Pound -// - `XSU` - Sucre -// - `SDD` - Sudanese Dinar (1992–2007) -// - `SDG` - Sudanese Pound -// - `SDP` - Sudanese Pound (1957–1998) -// - `SRD` - Surinamese Dollar -// - `SRG` - Surinamese Guilder -// - `SZL` - Swazi Lilangeni -// - `SEK` - Swedish Krona -// - `CHF` - Swiss Franc -// - `SYP` - Syrian Pound -// - `STN` - São Tomé & Príncipe Dobra -// - `STD` - São Tomé & Príncipe Dobra (1977–2017) -// - `TVD` - TVD -// - `TJR` - Tajikistani Ruble -// - `TJS` - Tajikistani Somoni -// - `TZS` - Tanzanian Shilling -// - `XTS` - Testing Currency Code -// - `THB` - Thai Baht -// - `XXX` - The codes assigned for transactions where no currency is involved -// - `TPE` - Timorese Escudo -// - `TOP` - Tongan Paʻanga -// - `TTD` - Trinidad & Tobago Dollar -// - `TND` - Tunisian Dinar -// - `TRY` - Turkish Lira -// - `TRL` - Turkish Lira (1922–2005) -// - `TMT` - Turkmenistani Manat -// - `TMM` - Turkmenistani Manat (1993–2009) -// - `USD` - US Dollar -// - `USN` - US Dollar (Next day) -// - `USS` - US Dollar (Same day) -// - `UGX` - Ugandan Shilling -// - `UGS` - Ugandan Shilling (1966–1987) -// - `UAH` - Ukrainian Hryvnia -// - `UAK` - Ukrainian Karbovanets -// - `AED` - United Arab Emirates Dirham -// - `UYW` - Uruguayan Nominal Wage Index Unit -// - `UYU` - Uruguayan Peso -// - `UYP` - Uruguayan Peso (1975–1993) -// - `UYI` - Uruguayan Peso (Indexed Units) -// - `UZS` - Uzbekistani Som -// - `VUV` - Vanuatu Vatu -// - `VES` - Venezuelan Bolívar -// - `VEB` - Venezuelan Bolívar (1871–2008) -// - `VEF` - Venezuelan Bolívar (2008–2018) -// - `VND` - Vietnamese Dong -// - `VNN` - Vietnamese Dong (1978–1985) -// - `CHE` - WIR Euro -// - `CHW` - WIR Franc -// - `XOF` - West African CFA Franc -// - `YDD` - Yemeni Dinar -// - `YER` - Yemeni Rial -// - `YUN` - Yugoslavian Convertible Dinar (1990–1992) -// - `YUD` - Yugoslavian Hard Dinar (1966–1990) -// - `YUM` - Yugoslavian New Dinar (1994–2002) -// - `YUR` - Yugoslavian Reformed Dinar (1992–1993) -// - `ZWN` - ZWN -// - `ZRN` - Zairean New Zaire (1993–1998) -// - `ZRZ` - Zairean Zaire (1971–1993) -// - `ZMW` - Zambian Kwacha -// - `ZMK` - Zambian Kwacha (1968–2012) -// - `ZWD` - Zimbabwean Dollar (1980–2008) -// - `ZWR` - Zimbabwean Dollar (2008) -// - `ZWL` - Zimbabwean Dollar (2009) -type InvoiceRequestCurrency struct { - typeName string - TransactionCurrencyEnum TransactionCurrencyEnum - String string -} +type CreditNoteLineItemProject struct { + String string + Project *Project -func NewInvoiceRequestCurrencyFromTransactionCurrencyEnum(value TransactionCurrencyEnum) *InvoiceRequestCurrency { - return &InvoiceRequestCurrency{typeName: "transactionCurrencyEnum", TransactionCurrencyEnum: value} + typ string } -func NewInvoiceRequestCurrencyFromString(value string) *InvoiceRequestCurrency { - return &InvoiceRequestCurrency{typeName: "string", String: value} +func (c *CreditNoteLineItemProject) GetString() string { + if c == nil { + return "" + } + return c.String } -func (i *InvoiceRequestCurrency) UnmarshalJSON(data []byte) error { - var valueTransactionCurrencyEnum TransactionCurrencyEnum - if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { - i.typeName = "transactionCurrencyEnum" - i.TransactionCurrencyEnum = valueTransactionCurrencyEnum +func (c *CreditNoteLineItemProject) GetProject() *Project { + if c == nil { return nil } + return c.Project +} + +func (c *CreditNoteLineItemProject) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - i.typeName = "string" - i.String = valueString + c.typ = "String" + c.String = valueString return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, i) + valueProject := new(Project) + if err := json.Unmarshal(data, &valueProject); err == nil { + c.typ = "Project" + c.Project = valueProject + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, c) } -func (i InvoiceRequestCurrency) MarshalJSON() ([]byte, error) { - switch i.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "transactionCurrencyEnum": - return json.Marshal(i.TransactionCurrencyEnum) - case "string": - return json.Marshal(i.String) +func (c CreditNoteLineItemProject) MarshalJSON() ([]byte, error) { + if c.typ == "String" || c.String != "" { + return json.Marshal(c.String) + } + if c.typ == "Project" || c.Project != nil { + return json.Marshal(c.Project) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", c) } -type InvoiceRequestCurrencyVisitor interface { - VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error +type CreditNoteLineItemProjectVisitor interface { VisitString(string) error + VisitProject(*Project) error } -func (i *InvoiceRequestCurrency) Accept(visitor InvoiceRequestCurrencyVisitor) error { - switch i.typeName { - default: - return fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "transactionCurrencyEnum": - return visitor.VisitTransactionCurrencyEnum(i.TransactionCurrencyEnum) - case "string": - return visitor.VisitString(i.String) +func (c *CreditNoteLineItemProject) Accept(visitor CreditNoteLineItemProjectVisitor) error { + if c.typ == "String" || c.String != "" { + return visitor.VisitString(c.String) + } + if c.typ == "Project" || c.Project != nil { + return visitor.VisitProject(c.Project) } + return fmt.Errorf("type %T does not include a non-empty union type", c) } -// The employee this overall transaction relates to. -type InvoiceRequestEmployee struct { - typeName string - String string - Employee *Employee +type CreditNotePaymentsItem struct { + String string + Payment *Payment + + typ string } -func NewInvoiceRequestEmployeeFromString(value string) *InvoiceRequestEmployee { - return &InvoiceRequestEmployee{typeName: "string", String: value} +func (c *CreditNotePaymentsItem) GetString() string { + if c == nil { + return "" + } + return c.String } -func NewInvoiceRequestEmployeeFromEmployee(value *Employee) *InvoiceRequestEmployee { - return &InvoiceRequestEmployee{typeName: "employee", Employee: value} +func (c *CreditNotePaymentsItem) GetPayment() *Payment { + if c == nil { + return nil + } + return c.Payment } -func (i *InvoiceRequestEmployee) UnmarshalJSON(data []byte) error { +func (c *CreditNotePaymentsItem) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - i.typeName = "string" - i.String = valueString + c.typ = "String" + c.String = valueString return nil } - valueEmployee := new(Employee) - if err := json.Unmarshal(data, &valueEmployee); err == nil { - i.typeName = "employee" - i.Employee = valueEmployee + valuePayment := new(Payment) + if err := json.Unmarshal(data, &valuePayment); err == nil { + c.typ = "Payment" + c.Payment = valuePayment return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, i) + return fmt.Errorf("%s cannot be deserialized as a %T", data, c) } -func (i InvoiceRequestEmployee) MarshalJSON() ([]byte, error) { - switch i.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return json.Marshal(i.String) - case "employee": - return json.Marshal(i.Employee) +func (c CreditNotePaymentsItem) MarshalJSON() ([]byte, error) { + if c.typ == "String" || c.String != "" { + return json.Marshal(c.String) } + if c.typ == "Payment" || c.Payment != nil { + return json.Marshal(c.Payment) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", c) } -type InvoiceRequestEmployeeVisitor interface { +type CreditNotePaymentsItemVisitor interface { VisitString(string) error - VisitEmployee(*Employee) error + VisitPayment(*Payment) error } -func (i *InvoiceRequestEmployee) Accept(visitor InvoiceRequestEmployeeVisitor) error { - switch i.typeName { - default: - return fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return visitor.VisitString(i.String) - case "employee": - return visitor.VisitEmployee(i.Employee) +func (c *CreditNotePaymentsItem) Accept(visitor CreditNotePaymentsItemVisitor) error { + if c.typ == "String" || c.String != "" { + return visitor.VisitString(c.String) + } + if c.typ == "Payment" || c.Payment != nil { + return visitor.VisitPayment(c.Payment) } + return fmt.Errorf("type %T does not include a non-empty union type", c) } -type InvoiceRequestPaymentsItem struct { - typeName string - String string - Payment *Payment +// The credit note's status. +// +// * `SUBMITTED` - SUBMITTED +// * `AUTHORIZED` - AUTHORIZED +// * `PAID` - PAID +type CreditNoteStatus struct { + CreditNoteStatusEnum CreditNoteStatusEnum + String string + + typ string } -func NewInvoiceRequestPaymentsItemFromString(value string) *InvoiceRequestPaymentsItem { - return &InvoiceRequestPaymentsItem{typeName: "string", String: value} +func (c *CreditNoteStatus) GetCreditNoteStatusEnum() CreditNoteStatusEnum { + if c == nil { + return "" + } + return c.CreditNoteStatusEnum } -func NewInvoiceRequestPaymentsItemFromPayment(value *Payment) *InvoiceRequestPaymentsItem { - return &InvoiceRequestPaymentsItem{typeName: "payment", Payment: value} +func (c *CreditNoteStatus) GetString() string { + if c == nil { + return "" + } + return c.String } -func (i *InvoiceRequestPaymentsItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - i.typeName = "string" - i.String = valueString +func (c *CreditNoteStatus) UnmarshalJSON(data []byte) error { + var valueCreditNoteStatusEnum CreditNoteStatusEnum + if err := json.Unmarshal(data, &valueCreditNoteStatusEnum); err == nil { + c.typ = "CreditNoteStatusEnum" + c.CreditNoteStatusEnum = valueCreditNoteStatusEnum return nil } - valuePayment := new(Payment) - if err := json.Unmarshal(data, &valuePayment); err == nil { - i.typeName = "payment" - i.Payment = valuePayment + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + c.typ = "String" + c.String = valueString return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, i) + return fmt.Errorf("%s cannot be deserialized as a %T", data, c) } -func (i InvoiceRequestPaymentsItem) MarshalJSON() ([]byte, error) { - switch i.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return json.Marshal(i.String) - case "payment": - return json.Marshal(i.Payment) +func (c CreditNoteStatus) MarshalJSON() ([]byte, error) { + if c.typ == "CreditNoteStatusEnum" || c.CreditNoteStatusEnum != "" { + return json.Marshal(c.CreditNoteStatusEnum) + } + if c.typ == "String" || c.String != "" { + return json.Marshal(c.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", c) } -type InvoiceRequestPaymentsItemVisitor interface { +type CreditNoteStatusVisitor interface { + VisitCreditNoteStatusEnum(CreditNoteStatusEnum) error VisitString(string) error - VisitPayment(*Payment) error } -func (i *InvoiceRequestPaymentsItem) Accept(visitor InvoiceRequestPaymentsItemVisitor) error { - switch i.typeName { - default: - return fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return visitor.VisitString(i.String) - case "payment": - return visitor.VisitPayment(i.Payment) +func (c *CreditNoteStatus) Accept(visitor CreditNoteStatusVisitor) error { + if c.typ == "CreditNoteStatusEnum" || c.CreditNoteStatusEnum != "" { + return visitor.VisitCreditNoteStatusEnum(c.CreditNoteStatusEnum) + } + if c.typ == "String" || c.String != "" { + return visitor.VisitString(c.String) } + return fmt.Errorf("type %T does not include a non-empty union type", c) } -type InvoiceRequestPurchaseOrdersItem struct { - typeName string - String string - PurchaseOrder *PurchaseOrder +// * `SUBMITTED` - SUBMITTED +// * `AUTHORIZED` - AUTHORIZED +// * `PAID` - PAID +type CreditNoteStatusEnum string + +const ( + CreditNoteStatusEnumSubmitted CreditNoteStatusEnum = "SUBMITTED" + CreditNoteStatusEnumAuthorized CreditNoteStatusEnum = "AUTHORIZED" + CreditNoteStatusEnumPaid CreditNoteStatusEnum = "PAID" +) + +func NewCreditNoteStatusEnumFromString(s string) (CreditNoteStatusEnum, error) { + switch s { + case "SUBMITTED": + return CreditNoteStatusEnumSubmitted, nil + case "AUTHORIZED": + return CreditNoteStatusEnumAuthorized, nil + case "PAID": + return CreditNoteStatusEnumPaid, nil + } + var t CreditNoteStatusEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (c CreditNoteStatusEnum) Ptr() *CreditNoteStatusEnum { + return &c +} + +type CreditNoteTrackingCategoriesItem struct { + String string + TrackingCategory *TrackingCategory + + typ string } -func NewInvoiceRequestPurchaseOrdersItemFromString(value string) *InvoiceRequestPurchaseOrdersItem { - return &InvoiceRequestPurchaseOrdersItem{typeName: "string", String: value} +func (c *CreditNoteTrackingCategoriesItem) GetString() string { + if c == nil { + return "" + } + return c.String } -func NewInvoiceRequestPurchaseOrdersItemFromPurchaseOrder(value *PurchaseOrder) *InvoiceRequestPurchaseOrdersItem { - return &InvoiceRequestPurchaseOrdersItem{typeName: "purchaseOrder", PurchaseOrder: value} +func (c *CreditNoteTrackingCategoriesItem) GetTrackingCategory() *TrackingCategory { + if c == nil { + return nil + } + return c.TrackingCategory } -func (i *InvoiceRequestPurchaseOrdersItem) UnmarshalJSON(data []byte) error { +func (c *CreditNoteTrackingCategoriesItem) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - i.typeName = "string" - i.String = valueString + c.typ = "String" + c.String = valueString return nil } - valuePurchaseOrder := new(PurchaseOrder) - if err := json.Unmarshal(data, &valuePurchaseOrder); err == nil { - i.typeName = "purchaseOrder" - i.PurchaseOrder = valuePurchaseOrder + valueTrackingCategory := new(TrackingCategory) + if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { + c.typ = "TrackingCategory" + c.TrackingCategory = valueTrackingCategory return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, i) + return fmt.Errorf("%s cannot be deserialized as a %T", data, c) } -func (i InvoiceRequestPurchaseOrdersItem) MarshalJSON() ([]byte, error) { - switch i.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return json.Marshal(i.String) - case "purchaseOrder": - return json.Marshal(i.PurchaseOrder) +func (c CreditNoteTrackingCategoriesItem) MarshalJSON() ([]byte, error) { + if c.typ == "String" || c.String != "" { + return json.Marshal(c.String) + } + if c.typ == "TrackingCategory" || c.TrackingCategory != nil { + return json.Marshal(c.TrackingCategory) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", c) } -type InvoiceRequestPurchaseOrdersItemVisitor interface { +type CreditNoteTrackingCategoriesItemVisitor interface { VisitString(string) error - VisitPurchaseOrder(*PurchaseOrder) error + VisitTrackingCategory(*TrackingCategory) error } -func (i *InvoiceRequestPurchaseOrdersItem) Accept(visitor InvoiceRequestPurchaseOrdersItemVisitor) error { - switch i.typeName { - default: - return fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return visitor.VisitString(i.String) - case "purchaseOrder": - return visitor.VisitPurchaseOrder(i.PurchaseOrder) +func (c *CreditNoteTrackingCategoriesItem) Accept(visitor CreditNoteTrackingCategoriesItemVisitor) error { + if c.typ == "String" || c.String != "" { + return visitor.VisitString(c.String) + } + if c.typ == "TrackingCategory" || c.TrackingCategory != nil { + return visitor.VisitTrackingCategory(c.TrackingCategory) } + return fmt.Errorf("type %T does not include a non-empty union type", c) } -// The status of the invoice. +// # The DataPassthrough Object +// ### Description +// The `DataPassthrough` object is used to send information to an otherwise-unsupported third-party endpoint. // -// - `PAID` - PAID -// - `DRAFT` - DRAFT -// - `SUBMITTED` - SUBMITTED -// - `PARTIALLY_PAID` - PARTIALLY_PAID -// - `OPEN` - OPEN -// - `VOID` - VOID -type InvoiceRequestStatus struct { - typeName string - InvoiceStatusEnum InvoiceStatusEnum - String string -} +// ### Usage Example +// Create a `DataPassthrough` to get team hierarchies from your Rippling integration. +type DataPassthroughRequest struct { + Method MethodEnum `json:"method" url:"method"` + // The path of the request in the third party's platform. + Path string `json:"path" url:"path"` + // An optional override of the third party's base url for the request. + BaseUrlOverride *string `json:"base_url_override,omitempty" url:"base_url_override,omitempty"` + // The data with the request. You must include a `request_format` parameter matching the data's format + Data *string `json:"data,omitempty" url:"data,omitempty"` + // Pass an array of `MultipartFormField` objects in here instead of using the `data` param if `request_format` is set to `MULTIPART`. + MultipartFormData []*MultipartFormFieldRequest `json:"multipart_form_data,omitempty" url:"multipart_form_data,omitempty"` + // The headers to use for the request (Merge will handle the account's authorization headers). `Content-Type` header is required for passthrough. Choose content type corresponding to expected format of receiving server. + Headers map[string]interface{} `json:"headers,omitempty" url:"headers,omitempty"` + RequestFormat *RequestFormatEnum `json:"request_format,omitempty" url:"request_format,omitempty"` + // Optional. If true, the response will always be an object of the form `{"type": T, "value": ...}` where `T` will be one of `string, boolean, number, null, array, object`. + NormalizeResponse *bool `json:"normalize_response,omitempty" url:"normalize_response,omitempty"` -func NewInvoiceRequestStatusFromInvoiceStatusEnum(value InvoiceStatusEnum) *InvoiceRequestStatus { - return &InvoiceRequestStatus{typeName: "invoiceStatusEnum", InvoiceStatusEnum: value} + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func NewInvoiceRequestStatusFromString(value string) *InvoiceRequestStatus { - return &InvoiceRequestStatus{typeName: "string", String: value} +func (d *DataPassthroughRequest) GetMethod() MethodEnum { + if d == nil { + return "" + } + return d.Method } -func (i *InvoiceRequestStatus) UnmarshalJSON(data []byte) error { - var valueInvoiceStatusEnum InvoiceStatusEnum - if err := json.Unmarshal(data, &valueInvoiceStatusEnum); err == nil { - i.typeName = "invoiceStatusEnum" - i.InvoiceStatusEnum = valueInvoiceStatusEnum - return nil +func (d *DataPassthroughRequest) GetPath() string { + if d == nil { + return "" } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - i.typeName = "string" - i.String = valueString + return d.Path +} + +func (d *DataPassthroughRequest) GetBaseUrlOverride() *string { + if d == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, i) + return d.BaseUrlOverride } -func (i InvoiceRequestStatus) MarshalJSON() ([]byte, error) { - switch i.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "invoiceStatusEnum": - return json.Marshal(i.InvoiceStatusEnum) - case "string": - return json.Marshal(i.String) +func (d *DataPassthroughRequest) GetData() *string { + if d == nil { + return nil } + return d.Data } -type InvoiceRequestStatusVisitor interface { - VisitInvoiceStatusEnum(InvoiceStatusEnum) error - VisitString(string) error +func (d *DataPassthroughRequest) GetMultipartFormData() []*MultipartFormFieldRequest { + if d == nil { + return nil + } + return d.MultipartFormData } -func (i *InvoiceRequestStatus) Accept(visitor InvoiceRequestStatusVisitor) error { - switch i.typeName { - default: - return fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "invoiceStatusEnum": - return visitor.VisitInvoiceStatusEnum(i.InvoiceStatusEnum) - case "string": - return visitor.VisitString(i.String) +func (d *DataPassthroughRequest) GetHeaders() map[string]interface{} { + if d == nil { + return nil } + return d.Headers } -type InvoiceRequestTrackingCategoriesItem struct { - typeName string - String string - TrackingCategory *TrackingCategory +func (d *DataPassthroughRequest) GetRequestFormat() *RequestFormatEnum { + if d == nil { + return nil + } + return d.RequestFormat } -func NewInvoiceRequestTrackingCategoriesItemFromString(value string) *InvoiceRequestTrackingCategoriesItem { - return &InvoiceRequestTrackingCategoriesItem{typeName: "string", String: value} +func (d *DataPassthroughRequest) GetNormalizeResponse() *bool { + if d == nil { + return nil + } + return d.NormalizeResponse } -func NewInvoiceRequestTrackingCategoriesItemFromTrackingCategory(value *TrackingCategory) *InvoiceRequestTrackingCategoriesItem { - return &InvoiceRequestTrackingCategoriesItem{typeName: "trackingCategory", TrackingCategory: value} +func (d *DataPassthroughRequest) GetExtraProperties() map[string]interface{} { + return d.extraProperties } -func (i *InvoiceRequestTrackingCategoriesItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - i.typeName = "string" - i.String = valueString - return nil +func (d *DataPassthroughRequest) UnmarshalJSON(data []byte) error { + type unmarshaler DataPassthroughRequest + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err } - valueTrackingCategory := new(TrackingCategory) - if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { - i.typeName = "trackingCategory" - i.TrackingCategory = valueTrackingCategory - return nil + *d = DataPassthroughRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *d) + if err != nil { + return err } - return fmt.Errorf("%s cannot be deserialized as a %T", data, i) + d.extraProperties = extraProperties + d.rawJSON = json.RawMessage(data) + return nil } -func (i InvoiceRequestTrackingCategoriesItem) MarshalJSON() ([]byte, error) { - switch i.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return json.Marshal(i.String) - case "trackingCategory": - return json.Marshal(i.TrackingCategory) +func (d *DataPassthroughRequest) String() string { + if len(d.rawJSON) > 0 { + if value, err := internal.StringifyJSON(d.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(d); err == nil { + return value } + return fmt.Sprintf("%#v", d) } -type InvoiceRequestTrackingCategoriesItemVisitor interface { - VisitString(string) error - VisitTrackingCategory(*TrackingCategory) error +type DebugModeLog struct { + LogId string `json:"log_id" url:"log_id"` + DashboardView string `json:"dashboard_view" url:"dashboard_view"` + LogSummary *DebugModelLogSummary `json:"log_summary" url:"log_summary"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (i *InvoiceRequestTrackingCategoriesItem) Accept(visitor InvoiceRequestTrackingCategoriesItemVisitor) error { - switch i.typeName { - default: - return fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return visitor.VisitString(i.String) - case "trackingCategory": - return visitor.VisitTrackingCategory(i.TrackingCategory) +func (d *DebugModeLog) GetLogId() string { + if d == nil { + return "" } + return d.LogId } -// 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. -// -// - `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE -// - `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE -type InvoiceRequestType struct { - typeName string - InvoiceTypeEnum InvoiceTypeEnum - String string +func (d *DebugModeLog) GetDashboardView() string { + if d == nil { + return "" + } + return d.DashboardView } -func NewInvoiceRequestTypeFromInvoiceTypeEnum(value InvoiceTypeEnum) *InvoiceRequestType { - return &InvoiceRequestType{typeName: "invoiceTypeEnum", InvoiceTypeEnum: value} +func (d *DebugModeLog) GetLogSummary() *DebugModelLogSummary { + if d == nil { + return nil + } + return d.LogSummary } -func NewInvoiceRequestTypeFromString(value string) *InvoiceRequestType { - return &InvoiceRequestType{typeName: "string", String: value} +func (d *DebugModeLog) GetExtraProperties() map[string]interface{} { + return d.extraProperties } -func (i *InvoiceRequestType) UnmarshalJSON(data []byte) error { - var valueInvoiceTypeEnum InvoiceTypeEnum - if err := json.Unmarshal(data, &valueInvoiceTypeEnum); err == nil { - i.typeName = "invoiceTypeEnum" - i.InvoiceTypeEnum = valueInvoiceTypeEnum - return nil +func (d *DebugModeLog) UnmarshalJSON(data []byte) error { + type unmarshaler DebugModeLog + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - i.typeName = "string" - i.String = valueString - return nil + *d = DebugModeLog(value) + extraProperties, err := internal.ExtractExtraProperties(data, *d) + if err != nil { + return err } - return fmt.Errorf("%s cannot be deserialized as a %T", data, i) + d.extraProperties = extraProperties + d.rawJSON = json.RawMessage(data) + return nil } -func (i InvoiceRequestType) MarshalJSON() ([]byte, error) { - switch i.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "invoiceTypeEnum": - return json.Marshal(i.InvoiceTypeEnum) - case "string": - return json.Marshal(i.String) +func (d *DebugModeLog) String() string { + if len(d.rawJSON) > 0 { + if value, err := internal.StringifyJSON(d.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(d); err == nil { + return value } + return fmt.Sprintf("%#v", d) } -type InvoiceRequestTypeVisitor interface { - VisitInvoiceTypeEnum(InvoiceTypeEnum) error - VisitString(string) error +type DebugModelLogSummary struct { + Url string `json:"url" url:"url"` + Method string `json:"method" url:"method"` + StatusCode int `json:"status_code" url:"status_code"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (i *InvoiceRequestType) Accept(visitor InvoiceRequestTypeVisitor) error { - switch i.typeName { - default: - return fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "invoiceTypeEnum": - return visitor.VisitInvoiceTypeEnum(i.InvoiceTypeEnum) - case "string": - return visitor.VisitString(i.String) +func (d *DebugModelLogSummary) GetUrl() string { + if d == nil { + return "" + } + return d.Url +} + +func (d *DebugModelLogSummary) GetMethod() string { + if d == nil { + return "" } + return d.Method } -type InvoiceResponse struct { - Model *Invoice `json:"model,omitempty"` - Warnings []*WarningValidationProblem `json:"warnings,omitempty"` - Errors []*ErrorValidationProblem `json:"errors,omitempty"` - Logs []*DebugModeLog `json:"logs,omitempty"` +func (d *DebugModelLogSummary) GetStatusCode() int { + if d == nil { + return 0 + } + return d.StatusCode +} - _rawJSON json.RawMessage +func (d *DebugModelLogSummary) GetExtraProperties() map[string]interface{} { + return d.extraProperties } -func (i *InvoiceResponse) UnmarshalJSON(data []byte) error { - type unmarshaler InvoiceResponse +func (d *DebugModelLogSummary) UnmarshalJSON(data []byte) error { + type unmarshaler DebugModelLogSummary var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *i = InvoiceResponse(value) - i._rawJSON = json.RawMessage(data) + *d = DebugModelLogSummary(value) + extraProperties, err := internal.ExtractExtraProperties(data, *d) + if err != nil { + return err + } + d.extraProperties = extraProperties + d.rawJSON = json.RawMessage(data) return nil } -func (i *InvoiceResponse) String() string { - if len(i._rawJSON) > 0 { - if value, err := core.StringifyJSON(i._rawJSON); err == nil { +func (d *DebugModelLogSummary) String() string { + if len(d.rawJSON) > 0 { + if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(i); err == nil { + if value, err := internal.StringifyJSON(d); err == nil { return value } - return fmt.Sprintf("%#v", i) + return fmt.Sprintf("%#v", d) } -// The status of the invoice. +// # The Employee Object +// ### Description +// An `Employee` is an individual who works for the company of the linked account. The `Employee` model contains both contractors and full time employees. +// * An `Employee` is a contractor if `is_contractor` property is `True` +// * An `Employee` is a full time employee if `is_contractor` property is `False` // -// - `PAID` - PAID -// - `DRAFT` - DRAFT -// - `SUBMITTED` - SUBMITTED -// - `PARTIALLY_PAID` - PARTIALLY_PAID -// - `OPEN` - OPEN -// - `VOID` - VOID -type InvoiceStatus struct { - typeName string - InvoiceStatusEnum InvoiceStatusEnum - String string -} - -func NewInvoiceStatusFromInvoiceStatusEnum(value InvoiceStatusEnum) *InvoiceStatus { - return &InvoiceStatus{typeName: "invoiceStatusEnum", InvoiceStatusEnum: value} -} +// ### Usage Example +// Fetch from the `LIST Employees` endpoint and view a company's employees. +type Employee struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The employee's first name. + FirstName *string `json:"first_name,omitempty" url:"first_name,omitempty"` + // The employee's last name. + LastName *string `json:"last_name,omitempty" url:"last_name,omitempty"` + // `True` if the employee is a contractor, `False` if not. + IsContractor *bool `json:"is_contractor,omitempty" url:"is_contractor,omitempty"` + // The employee's internal identification number. + EmployeeNumber *string `json:"employee_number,omitempty" url:"employee_number,omitempty"` + // The employee's email address. + EmailAddress *string `json:"email_address,omitempty" url:"email_address,omitempty"` + // The subsidiary that the employee belongs to. + Company *EmployeeCompany `json:"company,omitempty" url:"company,omitempty"` + // The employee's status in the accounting system. + // + // * `ACTIVE` - ACTIVE + // * `INACTIVE` - INACTIVE + Status *EmployeeStatus `json:"status" url:"status"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` -func NewInvoiceStatusFromString(value string) *InvoiceStatus { - return &InvoiceStatus{typeName: "string", String: value} + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (i *InvoiceStatus) UnmarshalJSON(data []byte) error { - var valueInvoiceStatusEnum InvoiceStatusEnum - if err := json.Unmarshal(data, &valueInvoiceStatusEnum); err == nil { - i.typeName = "invoiceStatusEnum" - i.InvoiceStatusEnum = valueInvoiceStatusEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - i.typeName = "string" - i.String = valueString +func (e *Employee) GetId() *string { + if e == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, i) + return e.Id } -func (i InvoiceStatus) MarshalJSON() ([]byte, error) { - switch i.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "invoiceStatusEnum": - return json.Marshal(i.InvoiceStatusEnum) - case "string": - return json.Marshal(i.String) +func (e *Employee) GetRemoteId() *string { + if e == nil { + return nil } + return e.RemoteId } -type InvoiceStatusVisitor interface { - VisitInvoiceStatusEnum(InvoiceStatusEnum) error - VisitString(string) error +func (e *Employee) GetCreatedAt() *time.Time { + if e == nil { + return nil + } + return e.CreatedAt } -func (i *InvoiceStatus) Accept(visitor InvoiceStatusVisitor) error { - switch i.typeName { - default: - return fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "invoiceStatusEnum": - return visitor.VisitInvoiceStatusEnum(i.InvoiceStatusEnum) - case "string": - return visitor.VisitString(i.String) +func (e *Employee) GetModifiedAt() *time.Time { + if e == nil { + return nil } + return e.ModifiedAt } -// - `PAID` - PAID -// - `DRAFT` - DRAFT -// - `SUBMITTED` - SUBMITTED -// - `PARTIALLY_PAID` - PARTIALLY_PAID -// - `OPEN` - OPEN -// - `VOID` - VOID -type InvoiceStatusEnum string - -const ( - InvoiceStatusEnumPaid InvoiceStatusEnum = "PAID" - InvoiceStatusEnumDraft InvoiceStatusEnum = "DRAFT" - InvoiceStatusEnumSubmitted InvoiceStatusEnum = "SUBMITTED" - InvoiceStatusEnumPartiallyPaid InvoiceStatusEnum = "PARTIALLY_PAID" - InvoiceStatusEnumOpen InvoiceStatusEnum = "OPEN" - InvoiceStatusEnumVoid InvoiceStatusEnum = "VOID" -) - -func NewInvoiceStatusEnumFromString(s string) (InvoiceStatusEnum, error) { - switch s { - case "PAID": - return InvoiceStatusEnumPaid, nil - case "DRAFT": - return InvoiceStatusEnumDraft, nil - case "SUBMITTED": - return InvoiceStatusEnumSubmitted, nil - case "PARTIALLY_PAID": - return InvoiceStatusEnumPartiallyPaid, nil - case "OPEN": - return InvoiceStatusEnumOpen, nil - case "VOID": - return InvoiceStatusEnumVoid, nil +func (e *Employee) GetFirstName() *string { + if e == nil { + return nil } - var t InvoiceStatusEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) + return e.FirstName } -func (i InvoiceStatusEnum) Ptr() *InvoiceStatusEnum { - return &i +func (e *Employee) GetLastName() *string { + if e == nil { + return nil + } + return e.LastName } -type InvoiceTrackingCategoriesItem struct { - typeName string - String string - TrackingCategory *TrackingCategory +func (e *Employee) GetIsContractor() *bool { + if e == nil { + return nil + } + return e.IsContractor } -func NewInvoiceTrackingCategoriesItemFromString(value string) *InvoiceTrackingCategoriesItem { - return &InvoiceTrackingCategoriesItem{typeName: "string", String: value} +func (e *Employee) GetEmployeeNumber() *string { + if e == nil { + return nil + } + return e.EmployeeNumber } -func NewInvoiceTrackingCategoriesItemFromTrackingCategory(value *TrackingCategory) *InvoiceTrackingCategoriesItem { - return &InvoiceTrackingCategoriesItem{typeName: "trackingCategory", TrackingCategory: value} +func (e *Employee) GetEmailAddress() *string { + if e == nil { + return nil + } + return e.EmailAddress } -func (i *InvoiceTrackingCategoriesItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - i.typeName = "string" - i.String = valueString +func (e *Employee) GetCompany() *EmployeeCompany { + if e == nil { return nil } - valueTrackingCategory := new(TrackingCategory) - if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { - i.typeName = "trackingCategory" - i.TrackingCategory = valueTrackingCategory + return e.Company +} + +func (e *Employee) GetStatus() *EmployeeStatus { + if e == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, i) + return e.Status } -func (i InvoiceTrackingCategoriesItem) MarshalJSON() ([]byte, error) { - switch i.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return json.Marshal(i.String) - case "trackingCategory": - return json.Marshal(i.TrackingCategory) +func (e *Employee) GetRemoteWasDeleted() *bool { + if e == nil { + return nil } + return e.RemoteWasDeleted } -type InvoiceTrackingCategoriesItemVisitor interface { - VisitString(string) error - VisitTrackingCategory(*TrackingCategory) error +func (e *Employee) GetFieldMappings() map[string]interface{} { + if e == nil { + return nil + } + return e.FieldMappings } -func (i *InvoiceTrackingCategoriesItem) Accept(visitor InvoiceTrackingCategoriesItemVisitor) error { - switch i.typeName { - default: - return fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return visitor.VisitString(i.String) - case "trackingCategory": - return visitor.VisitTrackingCategory(i.TrackingCategory) +func (e *Employee) GetRemoteData() []*RemoteData { + if e == nil { + return nil } + return e.RemoteData } -// 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. -// -// - `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE -// - `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE -type InvoiceType struct { - typeName string - InvoiceTypeEnum InvoiceTypeEnum - String string +func (e *Employee) GetExtraProperties() map[string]interface{} { + return e.extraProperties } -func NewInvoiceTypeFromInvoiceTypeEnum(value InvoiceTypeEnum) *InvoiceType { - return &InvoiceType{typeName: "invoiceTypeEnum", InvoiceTypeEnum: value} +func (e *Employee) UnmarshalJSON(data []byte) error { + type embed Employee + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*e), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *e = Employee(unmarshaler.embed) + e.CreatedAt = unmarshaler.CreatedAt.TimePtr() + e.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *e) + if err != nil { + return err + } + e.extraProperties = extraProperties + e.rawJSON = json.RawMessage(data) + return nil } -func NewInvoiceTypeFromString(value string) *InvoiceType { - return &InvoiceType{typeName: "string", String: value} +func (e *Employee) MarshalJSON() ([]byte, error) { + type embed Employee + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*e), + CreatedAt: internal.NewOptionalDateTime(e.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(e.ModifiedAt), + } + return json.Marshal(marshaler) } -func (i *InvoiceType) UnmarshalJSON(data []byte) error { - var valueInvoiceTypeEnum InvoiceTypeEnum - if err := json.Unmarshal(data, &valueInvoiceTypeEnum); err == nil { - i.typeName = "invoiceTypeEnum" - i.InvoiceTypeEnum = valueInvoiceTypeEnum - return nil +func (e *Employee) String() string { + if len(e.rawJSON) > 0 { + if value, err := internal.StringifyJSON(e.rawJSON); err == nil { + return value + } } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - i.typeName = "string" - i.String = valueString - return nil + if value, err := internal.StringifyJSON(e); err == nil { + return value } - return fmt.Errorf("%s cannot be deserialized as a %T", data, i) + return fmt.Sprintf("%#v", e) } -func (i InvoiceType) MarshalJSON() ([]byte, error) { - switch i.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "invoiceTypeEnum": - return json.Marshal(i.InvoiceTypeEnum) - case "string": - return json.Marshal(i.String) - } -} +// The subsidiary that the employee belongs to. +type EmployeeCompany struct { + String string + CompanyInfo *CompanyInfo -type InvoiceTypeVisitor interface { - VisitInvoiceTypeEnum(InvoiceTypeEnum) error - VisitString(string) error + typ string } -func (i *InvoiceType) Accept(visitor InvoiceTypeVisitor) error { - switch i.typeName { - default: - return fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "invoiceTypeEnum": - return visitor.VisitInvoiceTypeEnum(i.InvoiceTypeEnum) - case "string": - return visitor.VisitString(i.String) +func (e *EmployeeCompany) GetString() string { + if e == nil { + return "" } + return e.String } -// - `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE -// - `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE -type InvoiceTypeEnum string - -const ( - InvoiceTypeEnumAccountsReceivable InvoiceTypeEnum = "ACCOUNTS_RECEIVABLE" - InvoiceTypeEnumAccountsPayable InvoiceTypeEnum = "ACCOUNTS_PAYABLE" -) - -func NewInvoiceTypeEnumFromString(s string) (InvoiceTypeEnum, error) { - switch s { - case "ACCOUNTS_RECEIVABLE": - return InvoiceTypeEnumAccountsReceivable, nil - case "ACCOUNTS_PAYABLE": - return InvoiceTypeEnumAccountsPayable, nil +func (e *EmployeeCompany) GetCompanyInfo() *CompanyInfo { + if e == nil { + return nil } - var t InvoiceTypeEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) + return e.CompanyInfo } -func (i InvoiceTypeEnum) Ptr() *InvoiceTypeEnum { - return &i +func (e *EmployeeCompany) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + valueCompanyInfo := new(CompanyInfo) + if err := json.Unmarshal(data, &valueCompanyInfo); err == nil { + e.typ = "CompanyInfo" + e.CompanyInfo = valueCompanyInfo + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) } -type Issue struct { - Id *string `json:"id,omitempty"` - // Status of the issue. Options: ('ONGOING', 'RESOLVED') - // - // - `ONGOING` - ONGOING - // - `RESOLVED` - RESOLVED - Status *IssueStatus `json:"status,omitempty"` - ErrorDescription string `json:"error_description"` - EndUser map[string]interface{} `json:"end_user,omitempty"` - FirstIncidentTime *time.Time `json:"first_incident_time,omitempty"` - LastIncidentTime *time.Time `json:"last_incident_time,omitempty"` - IsMuted *bool `json:"is_muted,omitempty"` - ErrorDetails []string `json:"error_details,omitempty"` - - _rawJSON json.RawMessage +func (e EmployeeCompany) MarshalJSON() ([]byte, error) { + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + if e.typ == "CompanyInfo" || e.CompanyInfo != nil { + return json.Marshal(e.CompanyInfo) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) } -func (i *Issue) UnmarshalJSON(data []byte) error { - type unmarshaler Issue - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *i = Issue(value) - i._rawJSON = json.RawMessage(data) - return nil +type EmployeeCompanyVisitor interface { + VisitString(string) error + VisitCompanyInfo(*CompanyInfo) error } -func (i *Issue) String() string { - if len(i._rawJSON) > 0 { - if value, err := core.StringifyJSON(i._rawJSON); err == nil { - return value - } +func (e *EmployeeCompany) Accept(visitor EmployeeCompanyVisitor) error { + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) } - if value, err := core.StringifyJSON(i); err == nil { - return value + if e.typ == "CompanyInfo" || e.CompanyInfo != nil { + return visitor.VisitCompanyInfo(e.CompanyInfo) } - return fmt.Sprintf("%#v", i) + return fmt.Errorf("type %T does not include a non-empty union type", e) } -// Status of the issue. Options: ('ONGOING', 'RESOLVED') +// The employee's status in the accounting system. // -// - `ONGOING` - ONGOING -// - `RESOLVED` - RESOLVED -type IssueStatus struct { - typeName string - IssueStatusEnum IssueStatusEnum - String string +// * `ACTIVE` - ACTIVE +// * `INACTIVE` - INACTIVE +type EmployeeStatus struct { + Status895Enum Status895Enum + String string + + typ string } -func NewIssueStatusFromIssueStatusEnum(value IssueStatusEnum) *IssueStatus { - return &IssueStatus{typeName: "issueStatusEnum", IssueStatusEnum: value} +func (e *EmployeeStatus) GetStatus895Enum() Status895Enum { + if e == nil { + return "" + } + return e.Status895Enum } -func NewIssueStatusFromString(value string) *IssueStatus { - return &IssueStatus{typeName: "string", String: value} +func (e *EmployeeStatus) GetString() string { + if e == nil { + return "" + } + return e.String } -func (i *IssueStatus) UnmarshalJSON(data []byte) error { - var valueIssueStatusEnum IssueStatusEnum - if err := json.Unmarshal(data, &valueIssueStatusEnum); err == nil { - i.typeName = "issueStatusEnum" - i.IssueStatusEnum = valueIssueStatusEnum +func (e *EmployeeStatus) UnmarshalJSON(data []byte) error { + var valueStatus895Enum Status895Enum + if err := json.Unmarshal(data, &valueStatus895Enum); err == nil { + e.typ = "Status895Enum" + e.Status895Enum = valueStatus895Enum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - i.typeName = "string" - i.String = valueString + e.typ = "String" + e.String = valueString return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, i) + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) } -func (i IssueStatus) MarshalJSON() ([]byte, error) { - switch i.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "issueStatusEnum": - return json.Marshal(i.IssueStatusEnum) - case "string": - return json.Marshal(i.String) +func (e EmployeeStatus) MarshalJSON() ([]byte, error) { + if e.typ == "Status895Enum" || e.Status895Enum != "" { + return json.Marshal(e.Status895Enum) + } + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) } -type IssueStatusVisitor interface { - VisitIssueStatusEnum(IssueStatusEnum) error +type EmployeeStatusVisitor interface { + VisitStatus895Enum(Status895Enum) error VisitString(string) error } -func (i *IssueStatus) Accept(visitor IssueStatusVisitor) error { - switch i.typeName { - default: - return fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "issueStatusEnum": - return visitor.VisitIssueStatusEnum(i.IssueStatusEnum) - case "string": - return visitor.VisitString(i.String) +func (e *EmployeeStatus) Accept(visitor EmployeeStatusVisitor) error { + if e.typ == "Status895Enum" || e.Status895Enum != "" { + return visitor.VisitStatus895Enum(e.Status895Enum) + } + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) } + return fmt.Errorf("type %T does not include a non-empty union type", e) } -// - `ONGOING` - ONGOING -// - `RESOLVED` - RESOLVED -type IssueStatusEnum string +// * `RAW` - RAW +// * `BASE64` - BASE64 +// * `GZIP_BASE64` - GZIP_BASE64 +type EncodingEnum string const ( - IssueStatusEnumOngoing IssueStatusEnum = "ONGOING" - IssueStatusEnumResolved IssueStatusEnum = "RESOLVED" + EncodingEnumRaw EncodingEnum = "RAW" + EncodingEnumBase64 EncodingEnum = "BASE64" + EncodingEnumGzipBase64 EncodingEnum = "GZIP_BASE64" ) -func NewIssueStatusEnumFromString(s string) (IssueStatusEnum, error) { +func NewEncodingEnumFromString(s string) (EncodingEnum, error) { switch s { - case "ONGOING": - return IssueStatusEnumOngoing, nil - case "RESOLVED": - return IssueStatusEnumResolved, nil + case "RAW": + return EncodingEnumRaw, nil + case "BASE64": + return EncodingEnumBase64, nil + case "GZIP_BASE64": + return EncodingEnumGzipBase64, nil } - var t IssueStatusEnum + var t EncodingEnum return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (i IssueStatusEnum) Ptr() *IssueStatusEnum { - return &i +func (e EncodingEnum) Ptr() *EncodingEnum { + return &e } -// # The Item Object -// -// ### Description -// -// The `Item` object refers to the goods involved in a transaction. -// -// ### Usage Example -// -// Fetch from the `LIST Items` endpoint and view a company's items. -type Item struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The item's name. - Name *string `json:"name,omitempty"` - // The item's status. - // - // - `ACTIVE` - ACTIVE - // - `ARCHIVED` - ARCHIVED - Status *ItemStatus `json:"status,omitempty"` - // The item's unit price. - UnitPrice *float64 `json:"unit_price,omitempty"` - // The price at which the item is purchased from a vendor. - PurchasePrice *float64 `json:"purchase_price,omitempty"` - // References the default account used to record a purchase of the item. - PurchaseAccount *ItemPurchaseAccount `json:"purchase_account,omitempty"` - // References the default account used to record a sale. - SalesAccount *ItemSalesAccount `json:"sales_account,omitempty"` - // The company the item belongs to. - Company *ItemCompany `json:"company,omitempty"` - // The default purchase tax rate for this item. - PurchaseTaxRate *ItemPurchaseTaxRate `json:"purchase_tax_rate,omitempty"` - // The default sales tax rate for this item. - SalesTaxRate *ItemSalesTaxRate `json:"sales_tax_rate,omitempty"` - // When the third party's item note was updated. - RemoteUpdatedAt *time.Time `json:"remote_updated_at,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` +type ErrorValidationProblem struct { + Source *ValidationProblemSource `json:"source,omitempty" url:"source,omitempty"` + Title string `json:"title" url:"title"` + Detail string `json:"detail" url:"detail"` + ProblemType string `json:"problem_type" url:"problem_type"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (i *Item) UnmarshalJSON(data []byte) error { - type unmarshaler Item - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (e *ErrorValidationProblem) GetSource() *ValidationProblemSource { + if e == nil { + return nil } - *i = Item(value) - i._rawJSON = json.RawMessage(data) - return nil + return e.Source } -func (i *Item) String() string { - if len(i._rawJSON) > 0 { - if value, err := core.StringifyJSON(i._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(i); err == nil { - return value +func (e *ErrorValidationProblem) GetTitle() string { + if e == nil { + return "" } - return fmt.Sprintf("%#v", i) + return e.Title } -// The company the item belongs to. -type ItemCompany struct { - typeName string - String string - CompanyInfo *CompanyInfo +func (e *ErrorValidationProblem) GetDetail() string { + if e == nil { + return "" + } + return e.Detail } -func NewItemCompanyFromString(value string) *ItemCompany { - return &ItemCompany{typeName: "string", String: value} +func (e *ErrorValidationProblem) GetProblemType() string { + if e == nil { + return "" + } + return e.ProblemType } -func NewItemCompanyFromCompanyInfo(value *CompanyInfo) *ItemCompany { - return &ItemCompany{typeName: "companyInfo", CompanyInfo: value} +func (e *ErrorValidationProblem) GetExtraProperties() map[string]interface{} { + return e.extraProperties } -func (i *ItemCompany) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - i.typeName = "string" - i.String = valueString - return nil +func (e *ErrorValidationProblem) UnmarshalJSON(data []byte) error { + type unmarshaler ErrorValidationProblem + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err } - valueCompanyInfo := new(CompanyInfo) - if err := json.Unmarshal(data, &valueCompanyInfo); err == nil { - i.typeName = "companyInfo" - i.CompanyInfo = valueCompanyInfo - return nil + *e = ErrorValidationProblem(value) + extraProperties, err := internal.ExtractExtraProperties(data, *e) + if err != nil { + return err } - return fmt.Errorf("%s cannot be deserialized as a %T", data, i) + e.extraProperties = extraProperties + e.rawJSON = json.RawMessage(data) + return nil } -func (i ItemCompany) MarshalJSON() ([]byte, error) { - switch i.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return json.Marshal(i.String) - case "companyInfo": - return json.Marshal(i.CompanyInfo) +func (e *ErrorValidationProblem) String() string { + if len(e.rawJSON) > 0 { + if value, err := internal.StringifyJSON(e.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(e); err == nil { + return value } + return fmt.Sprintf("%#v", e) } -type ItemCompanyVisitor interface { - VisitString(string) error - VisitCompanyInfo(*CompanyInfo) error -} +// * `ACTIVE` - ACTIVE +// * `INACTIVE` - INACTIVE +type FeedStatusEnum string -func (i *ItemCompany) Accept(visitor ItemCompanyVisitor) error { - switch i.typeName { - default: - return fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return visitor.VisitString(i.String) - case "companyInfo": - return visitor.VisitCompanyInfo(i.CompanyInfo) +const ( + FeedStatusEnumActive FeedStatusEnum = "ACTIVE" + FeedStatusEnumInactive FeedStatusEnum = "INACTIVE" +) + +func NewFeedStatusEnumFromString(s string) (FeedStatusEnum, error) { + switch s { + case "ACTIVE": + return FeedStatusEnumActive, nil + case "INACTIVE": + return FeedStatusEnumInactive, nil } + var t FeedStatusEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -// - `string` - uuid -// - `number` - url -// - `date` - email -// - `datetime` - phone -// - `bool` - currency -// - `list` - decimal -type ItemFormatEnum string +func (f FeedStatusEnum) Ptr() *FeedStatusEnum { + return &f +} + +// * `string` - string +// * `number` - number +// * `date` - date +// * `datetime` - datetime +// * `bool` - bool +// * `list` - list +type FieldFormatEnum string const ( - ItemFormatEnumString ItemFormatEnum = "string" - ItemFormatEnumNumber ItemFormatEnum = "number" - ItemFormatEnumDate ItemFormatEnum = "date" - ItemFormatEnumDatetime ItemFormatEnum = "datetime" - ItemFormatEnumBool ItemFormatEnum = "bool" - ItemFormatEnumList ItemFormatEnum = "list" + FieldFormatEnumString FieldFormatEnum = "string" + FieldFormatEnumNumber FieldFormatEnum = "number" + FieldFormatEnumDate FieldFormatEnum = "date" + FieldFormatEnumDatetime FieldFormatEnum = "datetime" + FieldFormatEnumBool FieldFormatEnum = "bool" + FieldFormatEnumList FieldFormatEnum = "list" ) -func NewItemFormatEnumFromString(s string) (ItemFormatEnum, error) { +func NewFieldFormatEnumFromString(s string) (FieldFormatEnum, error) { switch s { case "string": - return ItemFormatEnumString, nil + return FieldFormatEnumString, nil case "number": - return ItemFormatEnumNumber, nil + return FieldFormatEnumNumber, nil case "date": - return ItemFormatEnumDate, nil + return FieldFormatEnumDate, nil case "datetime": - return ItemFormatEnumDatetime, nil + return FieldFormatEnumDatetime, nil case "bool": - return ItemFormatEnumBool, nil + return FieldFormatEnumBool, nil case "list": - return ItemFormatEnumList, nil + return FieldFormatEnumList, nil } - var t ItemFormatEnum + var t FieldFormatEnum return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (i ItemFormatEnum) Ptr() *ItemFormatEnum { - return &i -} - -// References the default account used to record a purchase of the item. -type ItemPurchaseAccount struct { - typeName string - String string - Account *Account +func (f FieldFormatEnum) Ptr() *FieldFormatEnum { + return &f } -func NewItemPurchaseAccountFromString(value string) *ItemPurchaseAccount { - return &ItemPurchaseAccount{typeName: "string", String: value} -} +type FieldPermissionDeserializerRequest struct { + EnabledFields []interface{} `json:"enabled_fields,omitempty" url:"enabled_fields,omitempty"` + DisabledFields []interface{} `json:"disabled_fields,omitempty" url:"disabled_fields,omitempty"` -func NewItemPurchaseAccountFromAccount(value *Account) *ItemPurchaseAccount { - return &ItemPurchaseAccount{typeName: "account", Account: value} + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (i *ItemPurchaseAccount) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - i.typeName = "string" - i.String = valueString +func (f *FieldPermissionDeserializerRequest) GetEnabledFields() []interface{} { + if f == nil { return nil } - valueAccount := new(Account) - if err := json.Unmarshal(data, &valueAccount); err == nil { - i.typeName = "account" - i.Account = valueAccount + return f.EnabledFields +} + +func (f *FieldPermissionDeserializerRequest) GetDisabledFields() []interface{} { + if f == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, i) + return f.DisabledFields } -func (i ItemPurchaseAccount) MarshalJSON() ([]byte, error) { - switch i.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return json.Marshal(i.String) - case "account": - return json.Marshal(i.Account) - } +func (f *FieldPermissionDeserializerRequest) GetExtraProperties() map[string]interface{} { + return f.extraProperties } -type ItemPurchaseAccountVisitor interface { - VisitString(string) error - VisitAccount(*Account) error +func (f *FieldPermissionDeserializerRequest) UnmarshalJSON(data []byte) error { + type unmarshaler FieldPermissionDeserializerRequest + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *f = FieldPermissionDeserializerRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { + return err + } + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) + return nil } -func (i *ItemPurchaseAccount) Accept(visitor ItemPurchaseAccountVisitor) error { - switch i.typeName { - default: - return fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return visitor.VisitString(i.String) - case "account": - return visitor.VisitAccount(i.Account) +func (f *FieldPermissionDeserializerRequest) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { + return value + } } + if value, err := internal.StringifyJSON(f); err == nil { + return value + } + return fmt.Sprintf("%#v", f) } -// The default purchase tax rate for this item. -type ItemPurchaseTaxRate struct { - typeName string - String string - TaxRate *TaxRate +// * `string` - string +// * `number` - number +// * `date` - date +// * `datetime` - datetime +// * `bool` - bool +// * `list` - list +type FieldTypeEnum string + +const ( + FieldTypeEnumString FieldTypeEnum = "string" + FieldTypeEnumNumber FieldTypeEnum = "number" + FieldTypeEnumDate FieldTypeEnum = "date" + FieldTypeEnumDatetime FieldTypeEnum = "datetime" + FieldTypeEnumBool FieldTypeEnum = "bool" + FieldTypeEnumList FieldTypeEnum = "list" +) + +func NewFieldTypeEnumFromString(s string) (FieldTypeEnum, error) { + switch s { + case "string": + return FieldTypeEnumString, nil + case "number": + return FieldTypeEnumNumber, nil + case "date": + return FieldTypeEnumDate, nil + case "datetime": + return FieldTypeEnumDatetime, nil + case "bool": + return FieldTypeEnumBool, nil + case "list": + return FieldTypeEnumList, nil + } + var t FieldTypeEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -func NewItemPurchaseTaxRateFromString(value string) *ItemPurchaseTaxRate { - return &ItemPurchaseTaxRate{typeName: "string", String: value} +func (f FieldTypeEnum) Ptr() *FieldTypeEnum { + return &f } -func NewItemPurchaseTaxRateFromTaxRate(value *TaxRate) *ItemPurchaseTaxRate { - return &ItemPurchaseTaxRate{typeName: "taxRate", TaxRate: value} +type IndividualCommonModelScopeDeserializerRequest struct { + ModelName string `json:"model_name" url:"model_name"` + ModelPermissions map[string]*ModelPermissionDeserializerRequest `json:"model_permissions,omitempty" url:"model_permissions,omitempty"` + FieldPermissions *FieldPermissionDeserializerRequest `json:"field_permissions,omitempty" url:"field_permissions,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (i *ItemPurchaseTaxRate) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - i.typeName = "string" - i.String = valueString - return nil +func (i *IndividualCommonModelScopeDeserializerRequest) GetModelName() string { + if i == nil { + return "" } - valueTaxRate := new(TaxRate) - if err := json.Unmarshal(data, &valueTaxRate); err == nil { - i.typeName = "taxRate" - i.TaxRate = valueTaxRate + return i.ModelName +} + +func (i *IndividualCommonModelScopeDeserializerRequest) GetModelPermissions() map[string]*ModelPermissionDeserializerRequest { + if i == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, i) + return i.ModelPermissions } -func (i ItemPurchaseTaxRate) MarshalJSON() ([]byte, error) { - switch i.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return json.Marshal(i.String) - case "taxRate": - return json.Marshal(i.TaxRate) +func (i *IndividualCommonModelScopeDeserializerRequest) GetFieldPermissions() *FieldPermissionDeserializerRequest { + if i == nil { + return nil } + return i.FieldPermissions } -type ItemPurchaseTaxRateVisitor interface { - VisitString(string) error - VisitTaxRate(*TaxRate) error +func (i *IndividualCommonModelScopeDeserializerRequest) GetExtraProperties() map[string]interface{} { + return i.extraProperties } -func (i *ItemPurchaseTaxRate) Accept(visitor ItemPurchaseTaxRateVisitor) error { - switch i.typeName { - default: - return fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return visitor.VisitString(i.String) - case "taxRate": - return visitor.VisitTaxRate(i.TaxRate) +func (i *IndividualCommonModelScopeDeserializerRequest) UnmarshalJSON(data []byte) error { + type unmarshaler IndividualCommonModelScopeDeserializerRequest + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *i = IndividualCommonModelScopeDeserializerRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *i) + if err != nil { + return err } + i.extraProperties = extraProperties + i.rawJSON = json.RawMessage(data) + return nil } -// References the default account used to record a sale. -type ItemSalesAccount struct { - typeName string - String string - Account *Account +func (i *IndividualCommonModelScopeDeserializerRequest) String() string { + if len(i.rawJSON) > 0 { + if value, err := internal.StringifyJSON(i.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(i); err == nil { + return value + } + return fmt.Sprintf("%#v", i) } -func NewItemSalesAccountFromString(value string) *ItemSalesAccount { - return &ItemSalesAccount{typeName: "string", String: value} -} +// # The Invoice Object +// ### Description +// The `Invoice` object represents an itemized record of goods and/or services sold to a customer or bought from a vendor. +// +// Represents a Bill when the `Invoice` type is `ACCOUNTS_PAYABLE`. References an Invoice when the `Invoice` type is `ACCOUNTS_RECEIVABLE`. +// +// ### Usage Example +// Fetch from the `LIST Invoices` endpoint and view a company's invoices. +type Invoice struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // 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. + // + // * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE + // * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE + Type *InvoiceTypeEnum `json:"type,omitempty" url:"type,omitempty"` + // The invoice's contact. + Contact *InvoiceContact `json:"contact,omitempty" url:"contact,omitempty"` + // The invoice's number. + Number *string `json:"number,omitempty" url:"number,omitempty"` + // The invoice's issue date. + IssueDate *time.Time `json:"issue_date,omitempty" url:"issue_date,omitempty"` + // The invoice's due date. + DueDate *time.Time `json:"due_date,omitempty" url:"due_date,omitempty"` + // The invoice's paid date. + PaidOnDate *time.Time `json:"paid_on_date,omitempty" url:"paid_on_date,omitempty"` + // The invoice's private note. + Memo *string `json:"memo,omitempty" url:"memo,omitempty"` + // The company the invoice belongs to. + Company *InvoiceCompany `json:"company,omitempty" url:"company,omitempty"` + // The employee this overall transaction relates to. + Employee *InvoiceEmployee `json:"employee,omitempty" url:"employee,omitempty"` + // The invoice's currency. + // + // * `XUA` - ADB Unit of Account + // * `AFN` - Afghan Afghani + // * `AFA` - Afghan Afghani (1927–2002) + // * `ALL` - Albanian Lek + // * `ALK` - Albanian Lek (1946–1965) + // * `DZD` - Algerian Dinar + // * `ADP` - Andorran Peseta + // * `AOA` - Angolan Kwanza + // * `AOK` - Angolan Kwanza (1977–1991) + // * `AON` - Angolan New Kwanza (1990–2000) + // * `AOR` - Angolan Readjusted Kwanza (1995–1999) + // * `ARA` - Argentine Austral + // * `ARS` - Argentine Peso + // * `ARM` - Argentine Peso (1881–1970) + // * `ARP` - Argentine Peso (1983–1985) + // * `ARL` - Argentine Peso Ley (1970–1983) + // * `AMD` - Armenian Dram + // * `AWG` - Aruban Florin + // * `AUD` - Australian Dollar + // * `ATS` - Austrian Schilling + // * `AZN` - Azerbaijani Manat + // * `AZM` - Azerbaijani Manat (1993–2006) + // * `BSD` - Bahamian Dollar + // * `BHD` - Bahraini Dinar + // * `BDT` - Bangladeshi Taka + // * `BBD` - Barbadian Dollar + // * `BYN` - Belarusian Ruble + // * `BYB` - Belarusian Ruble (1994–1999) + // * `BYR` - Belarusian Ruble (2000–2016) + // * `BEF` - Belgian Franc + // * `BEC` - Belgian Franc (convertible) + // * `BEL` - Belgian Franc (financial) + // * `BZD` - Belize Dollar + // * `BMD` - Bermudan Dollar + // * `BTN` - Bhutanese Ngultrum + // * `BOB` - Bolivian Boliviano + // * `BOL` - Bolivian Boliviano (1863–1963) + // * `BOV` - Bolivian Mvdol + // * `BOP` - Bolivian Peso + // * `BAM` - Bosnia-Herzegovina Convertible Mark + // * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + // * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + // * `BWP` - Botswanan Pula + // * `BRC` - Brazilian Cruzado (1986–1989) + // * `BRZ` - Brazilian Cruzeiro (1942–1967) + // * `BRE` - Brazilian Cruzeiro (1990–1993) + // * `BRR` - Brazilian Cruzeiro (1993–1994) + // * `BRN` - Brazilian New Cruzado (1989–1990) + // * `BRB` - Brazilian New Cruzeiro (1967–1986) + // * `BRL` - Brazilian Real + // * `GBP` - British Pound + // * `BND` - Brunei Dollar + // * `BGL` - Bulgarian Hard Lev + // * `BGN` - Bulgarian Lev + // * `BGO` - Bulgarian Lev (1879–1952) + // * `BGM` - Bulgarian Socialist Lev + // * `BUK` - Burmese Kyat + // * `BIF` - Burundian Franc + // * `XPF` - CFP Franc + // * `KHR` - Cambodian Riel + // * `CAD` - Canadian Dollar + // * `CVE` - Cape Verdean Escudo + // * `KYD` - Cayman Islands Dollar + // * `XAF` - Central African CFA Franc + // * `CLE` - Chilean Escudo + // * `CLP` - Chilean Peso + // * `CLF` - Chilean Unit of Account (UF) + // * `CNX` - Chinese People’s Bank Dollar + // * `CNY` - Chinese Yuan + // * `CNH` - Chinese Yuan (offshore) + // * `COP` - Colombian Peso + // * `COU` - Colombian Real Value Unit + // * `KMF` - Comorian Franc + // * `CDF` - Congolese Franc + // * `CRC` - Costa Rican Colón + // * `HRD` - Croatian Dinar + // * `HRK` - Croatian Kuna + // * `CUC` - Cuban Convertible Peso + // * `CUP` - Cuban Peso + // * `CYP` - Cypriot Pound + // * `CZK` - Czech Koruna + // * `CSK` - Czechoslovak Hard Koruna + // * `DKK` - Danish Krone + // * `DJF` - Djiboutian Franc + // * `DOP` - Dominican Peso + // * `NLG` - Dutch Guilder + // * `XCD` - East Caribbean Dollar + // * `DDM` - East German Mark + // * `ECS` - Ecuadorian Sucre + // * `ECV` - Ecuadorian Unit of Constant Value + // * `EGP` - Egyptian Pound + // * `GQE` - Equatorial Guinean Ekwele + // * `ERN` - Eritrean Nakfa + // * `EEK` - Estonian Kroon + // * `ETB` - Ethiopian Birr + // * `EUR` - Euro + // * `XBA` - European Composite Unit + // * `XEU` - European Currency Unit + // * `XBB` - European Monetary Unit + // * `XBC` - European Unit of Account (XBC) + // * `XBD` - European Unit of Account (XBD) + // * `FKP` - Falkland Islands Pound + // * `FJD` - Fijian Dollar + // * `FIM` - Finnish Markka + // * `FRF` - French Franc + // * `XFO` - French Gold Franc + // * `XFU` - French UIC-Franc + // * `GMD` - Gambian Dalasi + // * `GEK` - Georgian Kupon Larit + // * `GEL` - Georgian Lari + // * `DEM` - German Mark + // * `GHS` - Ghanaian Cedi + // * `GHC` - Ghanaian Cedi (1979–2007) + // * `GIP` - Gibraltar Pound + // * `XAU` - Gold + // * `GRD` - Greek Drachma + // * `GTQ` - Guatemalan Quetzal + // * `GWP` - Guinea-Bissau Peso + // * `GNF` - Guinean Franc + // * `GNS` - Guinean Syli + // * `GYD` - Guyanaese Dollar + // * `HTG` - Haitian Gourde + // * `HNL` - Honduran Lempira + // * `HKD` - Hong Kong Dollar + // * `HUF` - Hungarian Forint + // * `IMP` - IMP + // * `ISK` - Icelandic Króna + // * `ISJ` - Icelandic Króna (1918–1981) + // * `INR` - Indian Rupee + // * `IDR` - Indonesian Rupiah + // * `IRR` - Iranian Rial + // * `IQD` - Iraqi Dinar + // * `IEP` - Irish Pound + // * `ILS` - Israeli New Shekel + // * `ILP` - Israeli Pound + // * `ILR` - Israeli Shekel (1980–1985) + // * `ITL` - Italian Lira + // * `JMD` - Jamaican Dollar + // * `JPY` - Japanese Yen + // * `JOD` - Jordanian Dinar + // * `KZT` - Kazakhstani Tenge + // * `KES` - Kenyan Shilling + // * `KWD` - Kuwaiti Dinar + // * `KGS` - Kyrgystani Som + // * `LAK` - Laotian Kip + // * `LVL` - Latvian Lats + // * `LVR` - Latvian Ruble + // * `LBP` - Lebanese Pound + // * `LSL` - Lesotho Loti + // * `LRD` - Liberian Dollar + // * `LYD` - Libyan Dinar + // * `LTL` - Lithuanian Litas + // * `LTT` - Lithuanian Talonas + // * `LUL` - Luxembourg Financial Franc + // * `LUC` - Luxembourgian Convertible Franc + // * `LUF` - Luxembourgian Franc + // * `MOP` - Macanese Pataca + // * `MKD` - Macedonian Denar + // * `MKN` - Macedonian Denar (1992–1993) + // * `MGA` - Malagasy Ariary + // * `MGF` - Malagasy Franc + // * `MWK` - Malawian Kwacha + // * `MYR` - Malaysian Ringgit + // * `MVR` - Maldivian Rufiyaa + // * `MVP` - Maldivian Rupee (1947–1981) + // * `MLF` - Malian Franc + // * `MTL` - Maltese Lira + // * `MTP` - Maltese Pound + // * `MRU` - Mauritanian Ouguiya + // * `MRO` - Mauritanian Ouguiya (1973–2017) + // * `MUR` - Mauritian Rupee + // * `MXV` - Mexican Investment Unit + // * `MXN` - Mexican Peso + // * `MXP` - Mexican Silver Peso (1861–1992) + // * `MDC` - Moldovan Cupon + // * `MDL` - Moldovan Leu + // * `MCF` - Monegasque Franc + // * `MNT` - Mongolian Tugrik + // * `MAD` - Moroccan Dirham + // * `MAF` - Moroccan Franc + // * `MZE` - Mozambican Escudo + // * `MZN` - Mozambican Metical + // * `MZM` - Mozambican Metical (1980–2006) + // * `MMK` - Myanmar Kyat + // * `NAD` - Namibian Dollar + // * `NPR` - Nepalese Rupee + // * `ANG` - Netherlands Antillean Guilder + // * `TWD` - New Taiwan Dollar + // * `NZD` - New Zealand Dollar + // * `NIO` - Nicaraguan Córdoba + // * `NIC` - Nicaraguan Córdoba (1988–1991) + // * `NGN` - Nigerian Naira + // * `KPW` - North Korean Won + // * `NOK` - Norwegian Krone + // * `OMR` - Omani Rial + // * `PKR` - Pakistani Rupee + // * `XPD` - Palladium + // * `PAB` - Panamanian Balboa + // * `PGK` - Papua New Guinean Kina + // * `PYG` - Paraguayan Guarani + // * `PEI` - Peruvian Inti + // * `PEN` - Peruvian Sol + // * `PES` - Peruvian Sol (1863–1965) + // * `PHP` - Philippine Peso + // * `XPT` - Platinum + // * `PLN` - Polish Zloty + // * `PLZ` - Polish Zloty (1950–1995) + // * `PTE` - Portuguese Escudo + // * `GWE` - Portuguese Guinea Escudo + // * `QAR` - Qatari Rial + // * `XRE` - RINET Funds + // * `RHD` - Rhodesian Dollar + // * `RON` - Romanian Leu + // * `ROL` - Romanian Leu (1952–2006) + // * `RUB` - Russian Ruble + // * `RUR` - Russian Ruble (1991–1998) + // * `RWF` - Rwandan Franc + // * `SVC` - Salvadoran Colón + // * `WST` - Samoan Tala + // * `SAR` - Saudi Riyal + // * `RSD` - Serbian Dinar + // * `CSD` - Serbian Dinar (2002–2006) + // * `SCR` - Seychellois Rupee + // * `SLL` - Sierra Leonean Leone + // * `XAG` - Silver + // * `SGD` - Singapore Dollar + // * `SKK` - Slovak Koruna + // * `SIT` - Slovenian Tolar + // * `SBD` - Solomon Islands Dollar + // * `SOS` - Somali Shilling + // * `ZAR` - South African Rand + // * `ZAL` - South African Rand (financial) + // * `KRH` - South Korean Hwan (1953–1962) + // * `KRW` - South Korean Won + // * `KRO` - South Korean Won (1945–1953) + // * `SSP` - South Sudanese Pound + // * `SUR` - Soviet Rouble + // * `ESP` - Spanish Peseta + // * `ESA` - Spanish Peseta (A account) + // * `ESB` - Spanish Peseta (convertible account) + // * `XDR` - Special Drawing Rights + // * `LKR` - Sri Lankan Rupee + // * `SHP` - St. Helena Pound + // * `XSU` - Sucre + // * `SDD` - Sudanese Dinar (1992–2007) + // * `SDG` - Sudanese Pound + // * `SDP` - Sudanese Pound (1957–1998) + // * `SRD` - Surinamese Dollar + // * `SRG` - Surinamese Guilder + // * `SZL` - Swazi Lilangeni + // * `SEK` - Swedish Krona + // * `CHF` - Swiss Franc + // * `SYP` - Syrian Pound + // * `STN` - São Tomé & Príncipe Dobra + // * `STD` - São Tomé & Príncipe Dobra (1977–2017) + // * `TVD` - TVD + // * `TJR` - Tajikistani Ruble + // * `TJS` - Tajikistani Somoni + // * `TZS` - Tanzanian Shilling + // * `XTS` - Testing Currency Code + // * `THB` - Thai Baht + // * `XXX` - The codes assigned for transactions where no currency is involved + // * `TPE` - Timorese Escudo + // * `TOP` - Tongan Paʻanga + // * `TTD` - Trinidad & Tobago Dollar + // * `TND` - Tunisian Dinar + // * `TRY` - Turkish Lira + // * `TRL` - Turkish Lira (1922–2005) + // * `TMT` - Turkmenistani Manat + // * `TMM` - Turkmenistani Manat (1993–2009) + // * `USD` - US Dollar + // * `USN` - US Dollar (Next day) + // * `USS` - US Dollar (Same day) + // * `UGX` - Ugandan Shilling + // * `UGS` - Ugandan Shilling (1966–1987) + // * `UAH` - Ukrainian Hryvnia + // * `UAK` - Ukrainian Karbovanets + // * `AED` - United Arab Emirates Dirham + // * `UYW` - Uruguayan Nominal Wage Index Unit + // * `UYU` - Uruguayan Peso + // * `UYP` - Uruguayan Peso (1975–1993) + // * `UYI` - Uruguayan Peso (Indexed Units) + // * `UZS` - Uzbekistani Som + // * `VUV` - Vanuatu Vatu + // * `VES` - Venezuelan Bolívar + // * `VEB` - Venezuelan Bolívar (1871–2008) + // * `VEF` - Venezuelan Bolívar (2008–2018) + // * `VND` - Vietnamese Dong + // * `VNN` - Vietnamese Dong (1978–1985) + // * `CHE` - WIR Euro + // * `CHW` - WIR Franc + // * `XOF` - West African CFA Franc + // * `YDD` - Yemeni Dinar + // * `YER` - Yemeni Rial + // * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + // * `YUD` - Yugoslavian Hard Dinar (1966–1990) + // * `YUM` - Yugoslavian New Dinar (1994–2002) + // * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + // * `ZWN` - ZWN + // * `ZRN` - Zairean New Zaire (1993–1998) + // * `ZRZ` - Zairean Zaire (1971–1993) + // * `ZMW` - Zambian Kwacha + // * `ZMK` - Zambian Kwacha (1968–2012) + // * `ZWD` - Zimbabwean Dollar (1980–2008) + // * `ZWR` - Zimbabwean Dollar (2008) + // * `ZWL` - Zimbabwean Dollar (2009) + Currency *InvoiceCurrency `json:"currency,omitempty" url:"currency,omitempty"` + // The invoice's exchange rate. + ExchangeRate *string `json:"exchange_rate,omitempty" url:"exchange_rate,omitempty"` + // The payment term that applies to this transaction. + PaymentTerm *InvoicePaymentTerm `json:"payment_term,omitempty" url:"payment_term,omitempty"` + // The total discounts applied to the total cost. + TotalDiscount *float64 `json:"total_discount,omitempty" url:"total_discount,omitempty"` + // The total amount being paid before taxes. + SubTotal *float64 `json:"sub_total,omitempty" url:"sub_total,omitempty"` + // The status of the invoice. + // + // * `PAID` - PAID + // * `DRAFT` - DRAFT + // * `SUBMITTED` - SUBMITTED + // * `PARTIALLY_PAID` - PARTIALLY_PAID + // * `OPEN` - OPEN + // * `VOID` - VOID + Status *InvoiceStatus `json:"status,omitempty" url:"status,omitempty"` + // The total amount being paid in taxes. + TotalTaxAmount *float64 `json:"total_tax_amount,omitempty" url:"total_tax_amount,omitempty"` + // The invoice's total amount. + TotalAmount *float64 `json:"total_amount,omitempty" url:"total_amount,omitempty"` + // The invoice's remaining balance. + Balance *float64 `json:"balance,omitempty" url:"balance,omitempty"` + // When the third party's invoice entry was updated. + RemoteUpdatedAt *time.Time `json:"remote_updated_at,omitempty" url:"remote_updated_at,omitempty"` + TrackingCategories []*InvoiceTrackingCategoriesItem `json:"tracking_categories,omitempty" url:"tracking_categories,omitempty"` + // The accounting period that the Invoice was generated in. + AccountingPeriod *InvoiceAccountingPeriod `json:"accounting_period,omitempty" url:"accounting_period,omitempty"` + PurchaseOrders []*InvoicePurchaseOrdersItem `json:"purchase_orders,omitempty" url:"purchase_orders,omitempty"` + // Array of `Payment` object IDs. + Payments []*InvoicePaymentsItem `json:"payments,omitempty" url:"payments,omitempty"` + // A list of the Payment Applied to Lines common models related to a given Invoice, Credit Note, or Journal Entry. + AppliedPayments []*InvoiceAppliedPaymentsItem `json:"applied_payments,omitempty" url:"applied_payments,omitempty"` + LineItems []*InvoiceLineItem `json:"line_items,omitempty" url:"line_items,omitempty"` + // `CreditNoteApplyLines` applied to the Invoice. + AppliedCreditNotes []*InvoiceAppliedCreditNotesItem `json:"applied_credit_notes,omitempty" url:"applied_credit_notes,omitempty"` + // `VendorCreditApplyLines` applied to the Invoice. + AppliedVendorCredits []*InvoiceAppliedVendorCreditsItem `json:"applied_vendor_credits,omitempty" url:"applied_vendor_credits,omitempty"` + // If the transaction is inclusive or exclusive of tax. `True` if inclusive, `False` if exclusive. + InclusiveOfTax *bool `json:"inclusive_of_tax,omitempty" url:"inclusive_of_tax,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + RemoteFields []*RemoteField `json:"remote_fields,omitempty" url:"remote_fields,omitempty"` -func NewItemSalesAccountFromAccount(value *Account) *ItemSalesAccount { - return &ItemSalesAccount{typeName: "account", Account: value} + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (i *ItemSalesAccount) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - i.typeName = "string" - i.String = valueString - return nil - } - valueAccount := new(Account) - if err := json.Unmarshal(data, &valueAccount); err == nil { - i.typeName = "account" - i.Account = valueAccount +func (i *Invoice) GetId() *string { + if i == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, i) + return i.Id } -func (i ItemSalesAccount) MarshalJSON() ([]byte, error) { - switch i.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return json.Marshal(i.String) - case "account": - return json.Marshal(i.Account) +func (i *Invoice) GetRemoteId() *string { + if i == nil { + return nil } + return i.RemoteId } -type ItemSalesAccountVisitor interface { - VisitString(string) error - VisitAccount(*Account) error +func (i *Invoice) GetCreatedAt() *time.Time { + if i == nil { + return nil + } + return i.CreatedAt } -func (i *ItemSalesAccount) Accept(visitor ItemSalesAccountVisitor) error { - switch i.typeName { - default: - return fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return visitor.VisitString(i.String) - case "account": - return visitor.VisitAccount(i.Account) +func (i *Invoice) GetModifiedAt() *time.Time { + if i == nil { + return nil } + return i.ModifiedAt } -// The default sales tax rate for this item. -type ItemSalesTaxRate struct { - typeName string - String string - TaxRate *TaxRate +func (i *Invoice) GetType() *InvoiceTypeEnum { + if i == nil { + return nil + } + return i.Type } -func NewItemSalesTaxRateFromString(value string) *ItemSalesTaxRate { - return &ItemSalesTaxRate{typeName: "string", String: value} +func (i *Invoice) GetContact() *InvoiceContact { + if i == nil { + return nil + } + return i.Contact } -func NewItemSalesTaxRateFromTaxRate(value *TaxRate) *ItemSalesTaxRate { - return &ItemSalesTaxRate{typeName: "taxRate", TaxRate: value} +func (i *Invoice) GetNumber() *string { + if i == nil { + return nil + } + return i.Number } -func (i *ItemSalesTaxRate) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - i.typeName = "string" - i.String = valueString +func (i *Invoice) GetIssueDate() *time.Time { + if i == nil { return nil } - valueTaxRate := new(TaxRate) - if err := json.Unmarshal(data, &valueTaxRate); err == nil { - i.typeName = "taxRate" - i.TaxRate = valueTaxRate + return i.IssueDate +} + +func (i *Invoice) GetDueDate() *time.Time { + if i == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, i) + return i.DueDate } -func (i ItemSalesTaxRate) MarshalJSON() ([]byte, error) { - switch i.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return json.Marshal(i.String) - case "taxRate": - return json.Marshal(i.TaxRate) +func (i *Invoice) GetPaidOnDate() *time.Time { + if i == nil { + return nil } + return i.PaidOnDate } -type ItemSalesTaxRateVisitor interface { - VisitString(string) error - VisitTaxRate(*TaxRate) error +func (i *Invoice) GetMemo() *string { + if i == nil { + return nil + } + return i.Memo } -func (i *ItemSalesTaxRate) Accept(visitor ItemSalesTaxRateVisitor) error { - switch i.typeName { - default: - return fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "string": - return visitor.VisitString(i.String) - case "taxRate": - return visitor.VisitTaxRate(i.TaxRate) +func (i *Invoice) GetCompany() *InvoiceCompany { + if i == nil { + return nil } + return i.Company } -type ItemSchema struct { - ItemType *ItemTypeEnum `json:"item_type,omitempty"` - ItemFormat *ItemFormatEnum `json:"item_format,omitempty"` - ItemChoices []string `json:"item_choices,omitempty"` - - _rawJSON json.RawMessage +func (i *Invoice) GetEmployee() *InvoiceEmployee { + if i == nil { + return nil + } + return i.Employee } -func (i *ItemSchema) UnmarshalJSON(data []byte) error { - type unmarshaler ItemSchema - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (i *Invoice) GetCurrency() *InvoiceCurrency { + if i == nil { + return nil } - *i = ItemSchema(value) - i._rawJSON = json.RawMessage(data) - return nil + return i.Currency } -func (i *ItemSchema) String() string { - if len(i._rawJSON) > 0 { - if value, err := core.StringifyJSON(i._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(i); err == nil { - return value +func (i *Invoice) GetExchangeRate() *string { + if i == nil { + return nil } - return fmt.Sprintf("%#v", i) + return i.ExchangeRate } -// The item's status. -// -// - `ACTIVE` - ACTIVE -// - `ARCHIVED` - ARCHIVED -type ItemStatus struct { - typeName string - Status7D1Enum Status7D1Enum - String string +func (i *Invoice) GetPaymentTerm() *InvoicePaymentTerm { + if i == nil { + return nil + } + return i.PaymentTerm } -func NewItemStatusFromStatus7D1Enum(value Status7D1Enum) *ItemStatus { - return &ItemStatus{typeName: "status7D1Enum", Status7D1Enum: value} +func (i *Invoice) GetTotalDiscount() *float64 { + if i == nil { + return nil + } + return i.TotalDiscount } -func NewItemStatusFromString(value string) *ItemStatus { - return &ItemStatus{typeName: "string", String: value} +func (i *Invoice) GetSubTotal() *float64 { + if i == nil { + return nil + } + return i.SubTotal } -func (i *ItemStatus) UnmarshalJSON(data []byte) error { - var valueStatus7D1Enum Status7D1Enum - if err := json.Unmarshal(data, &valueStatus7D1Enum); err == nil { - i.typeName = "status7D1Enum" - i.Status7D1Enum = valueStatus7D1Enum +func (i *Invoice) GetStatus() *InvoiceStatus { + if i == nil { return nil } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - i.typeName = "string" - i.String = valueString + return i.Status +} + +func (i *Invoice) GetTotalTaxAmount() *float64 { + if i == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, i) + return i.TotalTaxAmount } -func (i ItemStatus) MarshalJSON() ([]byte, error) { - switch i.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "status7D1Enum": - return json.Marshal(i.Status7D1Enum) - case "string": - return json.Marshal(i.String) +func (i *Invoice) GetTotalAmount() *float64 { + if i == nil { + return nil } + return i.TotalAmount } -type ItemStatusVisitor interface { - VisitStatus7D1Enum(Status7D1Enum) error - VisitString(string) error +func (i *Invoice) GetBalance() *float64 { + if i == nil { + return nil + } + return i.Balance } -func (i *ItemStatus) Accept(visitor ItemStatusVisitor) error { - switch i.typeName { - default: - return fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "status7D1Enum": - return visitor.VisitStatus7D1Enum(i.Status7D1Enum) - case "string": - return visitor.VisitString(i.String) +func (i *Invoice) GetRemoteUpdatedAt() *time.Time { + if i == nil { + return nil } + return i.RemoteUpdatedAt } -// - `string` - string -// - `number` - number -// - `date` - date -// - `datetime` - datetime -// - `bool` - bool -// - `list` - list -type ItemTypeEnum string - -const ( - ItemTypeEnumString ItemTypeEnum = "string" - ItemTypeEnumNumber ItemTypeEnum = "number" - ItemTypeEnumDate ItemTypeEnum = "date" - ItemTypeEnumDatetime ItemTypeEnum = "datetime" - ItemTypeEnumBool ItemTypeEnum = "bool" - ItemTypeEnumList ItemTypeEnum = "list" -) - -func NewItemTypeEnumFromString(s string) (ItemTypeEnum, error) { - switch s { - case "string": - return ItemTypeEnumString, nil - case "number": - return ItemTypeEnumNumber, nil - case "date": - return ItemTypeEnumDate, nil - case "datetime": - return ItemTypeEnumDatetime, nil - case "bool": - return ItemTypeEnumBool, nil - case "list": - return ItemTypeEnumList, nil +func (i *Invoice) GetTrackingCategories() []*InvoiceTrackingCategoriesItem { + if i == nil { + return nil } - var t ItemTypeEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) + return i.TrackingCategories } -func (i ItemTypeEnum) Ptr() *ItemTypeEnum { - return &i +func (i *Invoice) GetAccountingPeriod() *InvoiceAccountingPeriod { + if i == nil { + return nil + } + return i.AccountingPeriod } -// # The JournalEntry Object -// -// ### Description -// -// A `JournalEntry` is a record of a transaction or event that is entered into a company's accounting system. -// -// The `JournalEntry` common model contains records that are automatically created as a result of a certain type of transaction, like an Invoice, and records that are manually created against a company’s ledger. -// -// The lines of a given `JournalEntry` object should always sum to 0. A positive `net_amount` means the line represents a debit and a negative net_amount represents a credit. -// -// ### Usage Example -// -// Fetch from the `GET JournalEntry` endpoint and view a company's journey entry. -type JournalEntry struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The journal entry's transaction date. - TransactionDate *time.Time `json:"transaction_date,omitempty"` - // Array of `Payment` object IDs. - Payments []*JournalEntryPaymentsItem `json:"payments,omitempty"` - // A list of the Payment Applied to Lines common models related to a given Invoice, Credit Note, or Journal Entry. - AppliedPayments []*JournalEntryAppliedPaymentsItem `json:"applied_payments,omitempty"` - // The journal entry's private note. - Memo *string `json:"memo,omitempty"` - // The journal's currency. - // - // - `XUA` - ADB Unit of Account - // - `AFN` - Afghan Afghani - // - `AFA` - Afghan Afghani (1927–2002) - // - `ALL` - Albanian Lek - // - `ALK` - Albanian Lek (1946–1965) - // - `DZD` - Algerian Dinar - // - `ADP` - Andorran Peseta - // - `AOA` - Angolan Kwanza - // - `AOK` - Angolan Kwanza (1977–1991) - // - `AON` - Angolan New Kwanza (1990–2000) - // - `AOR` - Angolan Readjusted Kwanza (1995–1999) - // - `ARA` - Argentine Austral - // - `ARS` - Argentine Peso - // - `ARM` - Argentine Peso (1881–1970) - // - `ARP` - Argentine Peso (1983–1985) - // - `ARL` - Argentine Peso Ley (1970–1983) - // - `AMD` - Armenian Dram - // - `AWG` - Aruban Florin - // - `AUD` - Australian Dollar - // - `ATS` - Austrian Schilling - // - `AZN` - Azerbaijani Manat - // - `AZM` - Azerbaijani Manat (1993–2006) - // - `BSD` - Bahamian Dollar - // - `BHD` - Bahraini Dinar - // - `BDT` - Bangladeshi Taka - // - `BBD` - Barbadian Dollar - // - `BYN` - Belarusian Ruble - // - `BYB` - Belarusian Ruble (1994–1999) - // - `BYR` - Belarusian Ruble (2000–2016) - // - `BEF` - Belgian Franc - // - `BEC` - Belgian Franc (convertible) - // - `BEL` - Belgian Franc (financial) - // - `BZD` - Belize Dollar - // - `BMD` - Bermudan Dollar - // - `BTN` - Bhutanese Ngultrum - // - `BOB` - Bolivian Boliviano - // - `BOL` - Bolivian Boliviano (1863–1963) - // - `BOV` - Bolivian Mvdol - // - `BOP` - Bolivian Peso - // - `BAM` - Bosnia-Herzegovina Convertible Mark - // - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - // - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - // - `BWP` - Botswanan Pula - // - `BRC` - Brazilian Cruzado (1986–1989) - // - `BRZ` - Brazilian Cruzeiro (1942–1967) - // - `BRE` - Brazilian Cruzeiro (1990–1993) - // - `BRR` - Brazilian Cruzeiro (1993–1994) - // - `BRN` - Brazilian New Cruzado (1989–1990) - // - `BRB` - Brazilian New Cruzeiro (1967–1986) - // - `BRL` - Brazilian Real - // - `GBP` - British Pound - // - `BND` - Brunei Dollar - // - `BGL` - Bulgarian Hard Lev - // - `BGN` - Bulgarian Lev - // - `BGO` - Bulgarian Lev (1879–1952) - // - `BGM` - Bulgarian Socialist Lev - // - `BUK` - Burmese Kyat - // - `BIF` - Burundian Franc - // - `XPF` - CFP Franc - // - `KHR` - Cambodian Riel - // - `CAD` - Canadian Dollar - // - `CVE` - Cape Verdean Escudo - // - `KYD` - Cayman Islands Dollar - // - `XAF` - Central African CFA Franc - // - `CLE` - Chilean Escudo - // - `CLP` - Chilean Peso - // - `CLF` - Chilean Unit of Account (UF) - // - `CNX` - Chinese People’s Bank Dollar - // - `CNY` - Chinese Yuan - // - `CNH` - Chinese Yuan (offshore) - // - `COP` - Colombian Peso - // - `COU` - Colombian Real Value Unit - // - `KMF` - Comorian Franc - // - `CDF` - Congolese Franc - // - `CRC` - Costa Rican Colón - // - `HRD` - Croatian Dinar - // - `HRK` - Croatian Kuna - // - `CUC` - Cuban Convertible Peso - // - `CUP` - Cuban Peso - // - `CYP` - Cypriot Pound - // - `CZK` - Czech Koruna - // - `CSK` - Czechoslovak Hard Koruna - // - `DKK` - Danish Krone - // - `DJF` - Djiboutian Franc - // - `DOP` - Dominican Peso - // - `NLG` - Dutch Guilder - // - `XCD` - East Caribbean Dollar - // - `DDM` - East German Mark - // - `ECS` - Ecuadorian Sucre - // - `ECV` - Ecuadorian Unit of Constant Value - // - `EGP` - Egyptian Pound - // - `GQE` - Equatorial Guinean Ekwele - // - `ERN` - Eritrean Nakfa - // - `EEK` - Estonian Kroon - // - `ETB` - Ethiopian Birr - // - `EUR` - Euro - // - `XBA` - European Composite Unit - // - `XEU` - European Currency Unit - // - `XBB` - European Monetary Unit - // - `XBC` - European Unit of Account (XBC) - // - `XBD` - European Unit of Account (XBD) - // - `FKP` - Falkland Islands Pound - // - `FJD` - Fijian Dollar - // - `FIM` - Finnish Markka - // - `FRF` - French Franc - // - `XFO` - French Gold Franc - // - `XFU` - French UIC-Franc - // - `GMD` - Gambian Dalasi - // - `GEK` - Georgian Kupon Larit - // - `GEL` - Georgian Lari - // - `DEM` - German Mark - // - `GHS` - Ghanaian Cedi - // - `GHC` - Ghanaian Cedi (1979–2007) - // - `GIP` - Gibraltar Pound - // - `XAU` - Gold - // - `GRD` - Greek Drachma - // - `GTQ` - Guatemalan Quetzal - // - `GWP` - Guinea-Bissau Peso - // - `GNF` - Guinean Franc - // - `GNS` - Guinean Syli - // - `GYD` - Guyanaese Dollar - // - `HTG` - Haitian Gourde - // - `HNL` - Honduran Lempira - // - `HKD` - Hong Kong Dollar - // - `HUF` - Hungarian Forint - // - `IMP` - IMP - // - `ISK` - Icelandic Króna - // - `ISJ` - Icelandic Króna (1918–1981) - // - `INR` - Indian Rupee - // - `IDR` - Indonesian Rupiah - // - `IRR` - Iranian Rial - // - `IQD` - Iraqi Dinar - // - `IEP` - Irish Pound - // - `ILS` - Israeli New Shekel - // - `ILP` - Israeli Pound - // - `ILR` - Israeli Shekel (1980–1985) - // - `ITL` - Italian Lira - // - `JMD` - Jamaican Dollar - // - `JPY` - Japanese Yen - // - `JOD` - Jordanian Dinar - // - `KZT` - Kazakhstani Tenge - // - `KES` - Kenyan Shilling - // - `KWD` - Kuwaiti Dinar - // - `KGS` - Kyrgystani Som - // - `LAK` - Laotian Kip - // - `LVL` - Latvian Lats - // - `LVR` - Latvian Ruble - // - `LBP` - Lebanese Pound - // - `LSL` - Lesotho Loti - // - `LRD` - Liberian Dollar - // - `LYD` - Libyan Dinar - // - `LTL` - Lithuanian Litas - // - `LTT` - Lithuanian Talonas - // - `LUL` - Luxembourg Financial Franc - // - `LUC` - Luxembourgian Convertible Franc - // - `LUF` - Luxembourgian Franc - // - `MOP` - Macanese Pataca - // - `MKD` - Macedonian Denar - // - `MKN` - Macedonian Denar (1992–1993) - // - `MGA` - Malagasy Ariary - // - `MGF` - Malagasy Franc - // - `MWK` - Malawian Kwacha - // - `MYR` - Malaysian Ringgit - // - `MVR` - Maldivian Rufiyaa - // - `MVP` - Maldivian Rupee (1947–1981) - // - `MLF` - Malian Franc - // - `MTL` - Maltese Lira - // - `MTP` - Maltese Pound - // - `MRU` - Mauritanian Ouguiya - // - `MRO` - Mauritanian Ouguiya (1973–2017) - // - `MUR` - Mauritian Rupee - // - `MXV` - Mexican Investment Unit - // - `MXN` - Mexican Peso - // - `MXP` - Mexican Silver Peso (1861–1992) - // - `MDC` - Moldovan Cupon - // - `MDL` - Moldovan Leu - // - `MCF` - Monegasque Franc - // - `MNT` - Mongolian Tugrik - // - `MAD` - Moroccan Dirham - // - `MAF` - Moroccan Franc - // - `MZE` - Mozambican Escudo - // - `MZN` - Mozambican Metical - // - `MZM` - Mozambican Metical (1980–2006) - // - `MMK` - Myanmar Kyat - // - `NAD` - Namibian Dollar - // - `NPR` - Nepalese Rupee - // - `ANG` - Netherlands Antillean Guilder - // - `TWD` - New Taiwan Dollar - // - `NZD` - New Zealand Dollar - // - `NIO` - Nicaraguan Córdoba - // - `NIC` - Nicaraguan Córdoba (1988–1991) - // - `NGN` - Nigerian Naira - // - `KPW` - North Korean Won - // - `NOK` - Norwegian Krone - // - `OMR` - Omani Rial - // - `PKR` - Pakistani Rupee - // - `XPD` - Palladium - // - `PAB` - Panamanian Balboa - // - `PGK` - Papua New Guinean Kina - // - `PYG` - Paraguayan Guarani - // - `PEI` - Peruvian Inti - // - `PEN` - Peruvian Sol - // - `PES` - Peruvian Sol (1863–1965) - // - `PHP` - Philippine Peso - // - `XPT` - Platinum - // - `PLN` - Polish Zloty - // - `PLZ` - Polish Zloty (1950–1995) - // - `PTE` - Portuguese Escudo - // - `GWE` - Portuguese Guinea Escudo - // - `QAR` - Qatari Rial - // - `XRE` - RINET Funds - // - `RHD` - Rhodesian Dollar - // - `RON` - Romanian Leu - // - `ROL` - Romanian Leu (1952–2006) - // - `RUB` - Russian Ruble - // - `RUR` - Russian Ruble (1991–1998) - // - `RWF` - Rwandan Franc - // - `SVC` - Salvadoran Colón - // - `WST` - Samoan Tala - // - `SAR` - Saudi Riyal - // - `RSD` - Serbian Dinar - // - `CSD` - Serbian Dinar (2002–2006) - // - `SCR` - Seychellois Rupee - // - `SLL` - Sierra Leonean Leone - // - `XAG` - Silver - // - `SGD` - Singapore Dollar - // - `SKK` - Slovak Koruna - // - `SIT` - Slovenian Tolar - // - `SBD` - Solomon Islands Dollar - // - `SOS` - Somali Shilling - // - `ZAR` - South African Rand - // - `ZAL` - South African Rand (financial) - // - `KRH` - South Korean Hwan (1953–1962) - // - `KRW` - South Korean Won - // - `KRO` - South Korean Won (1945–1953) - // - `SSP` - South Sudanese Pound - // - `SUR` - Soviet Rouble - // - `ESP` - Spanish Peseta - // - `ESA` - Spanish Peseta (A account) - // - `ESB` - Spanish Peseta (convertible account) - // - `XDR` - Special Drawing Rights - // - `LKR` - Sri Lankan Rupee - // - `SHP` - St. Helena Pound - // - `XSU` - Sucre - // - `SDD` - Sudanese Dinar (1992–2007) - // - `SDG` - Sudanese Pound - // - `SDP` - Sudanese Pound (1957–1998) - // - `SRD` - Surinamese Dollar - // - `SRG` - Surinamese Guilder - // - `SZL` - Swazi Lilangeni - // - `SEK` - Swedish Krona - // - `CHF` - Swiss Franc - // - `SYP` - Syrian Pound - // - `STN` - São Tomé & Príncipe Dobra - // - `STD` - São Tomé & Príncipe Dobra (1977–2017) - // - `TVD` - TVD - // - `TJR` - Tajikistani Ruble - // - `TJS` - Tajikistani Somoni - // - `TZS` - Tanzanian Shilling - // - `XTS` - Testing Currency Code - // - `THB` - Thai Baht - // - `XXX` - The codes assigned for transactions where no currency is involved - // - `TPE` - Timorese Escudo - // - `TOP` - Tongan Paʻanga - // - `TTD` - Trinidad & Tobago Dollar - // - `TND` - Tunisian Dinar - // - `TRY` - Turkish Lira - // - `TRL` - Turkish Lira (1922–2005) - // - `TMT` - Turkmenistani Manat - // - `TMM` - Turkmenistani Manat (1993–2009) - // - `USD` - US Dollar - // - `USN` - US Dollar (Next day) - // - `USS` - US Dollar (Same day) - // - `UGX` - Ugandan Shilling - // - `UGS` - Ugandan Shilling (1966–1987) - // - `UAH` - Ukrainian Hryvnia - // - `UAK` - Ukrainian Karbovanets - // - `AED` - United Arab Emirates Dirham - // - `UYW` - Uruguayan Nominal Wage Index Unit - // - `UYU` - Uruguayan Peso - // - `UYP` - Uruguayan Peso (1975–1993) - // - `UYI` - Uruguayan Peso (Indexed Units) - // - `UZS` - Uzbekistani Som - // - `VUV` - Vanuatu Vatu - // - `VES` - Venezuelan Bolívar - // - `VEB` - Venezuelan Bolívar (1871–2008) - // - `VEF` - Venezuelan Bolívar (2008–2018) - // - `VND` - Vietnamese Dong - // - `VNN` - Vietnamese Dong (1978–1985) - // - `CHE` - WIR Euro - // - `CHW` - WIR Franc - // - `XOF` - West African CFA Franc - // - `YDD` - Yemeni Dinar - // - `YER` - Yemeni Rial - // - `YUN` - Yugoslavian Convertible Dinar (1990–1992) - // - `YUD` - Yugoslavian Hard Dinar (1966–1990) - // - `YUM` - Yugoslavian New Dinar (1994–2002) - // - `YUR` - Yugoslavian Reformed Dinar (1992–1993) - // - `ZWN` - ZWN - // - `ZRN` - Zairean New Zaire (1993–1998) - // - `ZRZ` - Zairean Zaire (1971–1993) - // - `ZMW` - Zambian Kwacha - // - `ZMK` - Zambian Kwacha (1968–2012) - // - `ZWD` - Zimbabwean Dollar (1980–2008) - // - `ZWR` - Zimbabwean Dollar (2008) - // - `ZWL` - Zimbabwean Dollar (2009) - Currency *JournalEntryCurrency `json:"currency,omitempty"` - // The journal entry's exchange rate. - ExchangeRate *string `json:"exchange_rate,omitempty"` - // The company the journal entry belongs to. - Company *JournalEntryCompany `json:"company,omitempty"` - // If the transaction is inclusive or exclusive of tax. `True` if inclusive, `False` if exclusive. - InclusiveOfTax *bool `json:"inclusive_of_tax,omitempty"` - Lines []*JournalLine `json:"lines,omitempty"` - // Reference number for identifying journal entries. - JournalNumber *string `json:"journal_number,omitempty"` - TrackingCategories []*JournalEntryTrackingCategoriesItem `json:"tracking_categories,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - // The journal's posting status. - // - // - `UNPOSTED` - UNPOSTED - // - `POSTED` - POSTED - PostingStatus *JournalEntryPostingStatus `json:"posting_status,omitempty"` - // The accounting period that the JournalEntry was generated in. - AccountingPeriod *JournalEntryAccountingPeriod `json:"accounting_period,omitempty"` - // When the third party's journal entry was created. - RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty"` - // When the third party's journal entry was updated. - RemoteUpdatedAt *time.Time `json:"remote_updated_at,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` - RemoteFields []*RemoteField `json:"remote_fields,omitempty"` - - _rawJSON json.RawMessage -} - -func (j *JournalEntry) UnmarshalJSON(data []byte) error { - type unmarshaler JournalEntry - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (i *Invoice) GetPurchaseOrders() []*InvoicePurchaseOrdersItem { + if i == nil { + return nil } - *j = JournalEntry(value) - j._rawJSON = json.RawMessage(data) - return nil + return i.PurchaseOrders } -func (j *JournalEntry) String() string { - if len(j._rawJSON) > 0 { - if value, err := core.StringifyJSON(j._rawJSON); err == nil { - return value - } +func (i *Invoice) GetPayments() []*InvoicePaymentsItem { + if i == nil { + return nil } - if value, err := core.StringifyJSON(j); err == nil { - return value + return i.Payments +} + +func (i *Invoice) GetAppliedPayments() []*InvoiceAppliedPaymentsItem { + if i == nil { + return nil } - return fmt.Sprintf("%#v", j) + return i.AppliedPayments } -// The accounting period that the JournalEntry was generated in. -type JournalEntryAccountingPeriod struct { - typeName string - String string - AccountingPeriod *AccountingPeriod +func (i *Invoice) GetLineItems() []*InvoiceLineItem { + if i == nil { + return nil + } + return i.LineItems } -func NewJournalEntryAccountingPeriodFromString(value string) *JournalEntryAccountingPeriod { - return &JournalEntryAccountingPeriod{typeName: "string", String: value} +func (i *Invoice) GetAppliedCreditNotes() []*InvoiceAppliedCreditNotesItem { + if i == nil { + return nil + } + return i.AppliedCreditNotes } -func NewJournalEntryAccountingPeriodFromAccountingPeriod(value *AccountingPeriod) *JournalEntryAccountingPeriod { - return &JournalEntryAccountingPeriod{typeName: "accountingPeriod", AccountingPeriod: value} +func (i *Invoice) GetAppliedVendorCredits() []*InvoiceAppliedVendorCreditsItem { + if i == nil { + return nil + } + return i.AppliedVendorCredits } -func (j *JournalEntryAccountingPeriod) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - j.typeName = "string" - j.String = valueString +func (i *Invoice) GetInclusiveOfTax() *bool { + if i == nil { return nil } - valueAccountingPeriod := new(AccountingPeriod) - if err := json.Unmarshal(data, &valueAccountingPeriod); err == nil { - j.typeName = "accountingPeriod" - j.AccountingPeriod = valueAccountingPeriod + return i.InclusiveOfTax +} + +func (i *Invoice) GetRemoteWasDeleted() *bool { + if i == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, j) + return i.RemoteWasDeleted } -func (j JournalEntryAccountingPeriod) MarshalJSON() ([]byte, error) { - switch j.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "string": - return json.Marshal(j.String) - case "accountingPeriod": - return json.Marshal(j.AccountingPeriod) +func (i *Invoice) GetFieldMappings() map[string]interface{} { + if i == nil { + return nil } + return i.FieldMappings } -type JournalEntryAccountingPeriodVisitor interface { - VisitString(string) error - VisitAccountingPeriod(*AccountingPeriod) error +func (i *Invoice) GetRemoteData() []*RemoteData { + if i == nil { + return nil + } + return i.RemoteData } -func (j *JournalEntryAccountingPeriod) Accept(visitor JournalEntryAccountingPeriodVisitor) error { - switch j.typeName { - default: - return fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "string": - return visitor.VisitString(j.String) - case "accountingPeriod": - return visitor.VisitAccountingPeriod(j.AccountingPeriod) +func (i *Invoice) GetRemoteFields() []*RemoteField { + if i == nil { + return nil } + return i.RemoteFields } -type JournalEntryAppliedPaymentsItem struct { - typeName string - String string - PaymentLineItem *PaymentLineItem +func (i *Invoice) GetExtraProperties() map[string]interface{} { + return i.extraProperties } -func NewJournalEntryAppliedPaymentsItemFromString(value string) *JournalEntryAppliedPaymentsItem { - return &JournalEntryAppliedPaymentsItem{typeName: "string", String: value} +func (i *Invoice) UnmarshalJSON(data []byte) error { + type embed Invoice + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + IssueDate *internal.DateTime `json:"issue_date,omitempty"` + DueDate *internal.DateTime `json:"due_date,omitempty"` + PaidOnDate *internal.DateTime `json:"paid_on_date,omitempty"` + RemoteUpdatedAt *internal.DateTime `json:"remote_updated_at,omitempty"` + }{ + embed: embed(*i), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *i = Invoice(unmarshaler.embed) + i.CreatedAt = unmarshaler.CreatedAt.TimePtr() + i.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + i.IssueDate = unmarshaler.IssueDate.TimePtr() + i.DueDate = unmarshaler.DueDate.TimePtr() + i.PaidOnDate = unmarshaler.PaidOnDate.TimePtr() + i.RemoteUpdatedAt = unmarshaler.RemoteUpdatedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *i) + if err != nil { + return err + } + i.extraProperties = extraProperties + i.rawJSON = json.RawMessage(data) + return nil +} + +func (i *Invoice) MarshalJSON() ([]byte, error) { + type embed Invoice + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + IssueDate *internal.DateTime `json:"issue_date,omitempty"` + DueDate *internal.DateTime `json:"due_date,omitempty"` + PaidOnDate *internal.DateTime `json:"paid_on_date,omitempty"` + RemoteUpdatedAt *internal.DateTime `json:"remote_updated_at,omitempty"` + }{ + embed: embed(*i), + CreatedAt: internal.NewOptionalDateTime(i.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(i.ModifiedAt), + IssueDate: internal.NewOptionalDateTime(i.IssueDate), + DueDate: internal.NewOptionalDateTime(i.DueDate), + PaidOnDate: internal.NewOptionalDateTime(i.PaidOnDate), + RemoteUpdatedAt: internal.NewOptionalDateTime(i.RemoteUpdatedAt), + } + return json.Marshal(marshaler) +} + +func (i *Invoice) String() string { + if len(i.rawJSON) > 0 { + if value, err := internal.StringifyJSON(i.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(i); err == nil { + return value + } + return fmt.Sprintf("%#v", i) +} + +// The accounting period that the Invoice was generated in. +type InvoiceAccountingPeriod struct { + String string + AccountingPeriod *AccountingPeriod + + typ string } -func NewJournalEntryAppliedPaymentsItemFromPaymentLineItem(value *PaymentLineItem) *JournalEntryAppliedPaymentsItem { - return &JournalEntryAppliedPaymentsItem{typeName: "paymentLineItem", PaymentLineItem: value} +func (i *InvoiceAccountingPeriod) GetString() string { + if i == nil { + return "" + } + return i.String +} + +func (i *InvoiceAccountingPeriod) GetAccountingPeriod() *AccountingPeriod { + if i == nil { + return nil + } + return i.AccountingPeriod } -func (j *JournalEntryAppliedPaymentsItem) UnmarshalJSON(data []byte) error { +func (i *InvoiceAccountingPeriod) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - j.typeName = "string" - j.String = valueString + i.typ = "String" + i.String = valueString return nil } - valuePaymentLineItem := new(PaymentLineItem) - if err := json.Unmarshal(data, &valuePaymentLineItem); err == nil { - j.typeName = "paymentLineItem" - j.PaymentLineItem = valuePaymentLineItem + valueAccountingPeriod := new(AccountingPeriod) + if err := json.Unmarshal(data, &valueAccountingPeriod); err == nil { + i.typ = "AccountingPeriod" + i.AccountingPeriod = valueAccountingPeriod return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, j) + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) } -func (j JournalEntryAppliedPaymentsItem) MarshalJSON() ([]byte, error) { - switch j.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "string": - return json.Marshal(j.String) - case "paymentLineItem": - return json.Marshal(j.PaymentLineItem) +func (i InvoiceAccountingPeriod) MarshalJSON() ([]byte, error) { + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) } + if i.typ == "AccountingPeriod" || i.AccountingPeriod != nil { + return json.Marshal(i.AccountingPeriod) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) } -type JournalEntryAppliedPaymentsItemVisitor interface { +type InvoiceAccountingPeriodVisitor interface { VisitString(string) error - VisitPaymentLineItem(*PaymentLineItem) error + VisitAccountingPeriod(*AccountingPeriod) error } -func (j *JournalEntryAppliedPaymentsItem) Accept(visitor JournalEntryAppliedPaymentsItemVisitor) error { - switch j.typeName { - default: - return fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "string": - return visitor.VisitString(j.String) - case "paymentLineItem": - return visitor.VisitPaymentLineItem(j.PaymentLineItem) +func (i *InvoiceAccountingPeriod) Accept(visitor InvoiceAccountingPeriodVisitor) error { + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) } + if i.typ == "AccountingPeriod" || i.AccountingPeriod != nil { + return visitor.VisitAccountingPeriod(i.AccountingPeriod) + } + return fmt.Errorf("type %T does not include a non-empty union type", i) } -// The company the journal entry belongs to. -type JournalEntryCompany struct { - typeName string - String string - CompanyInfo *CompanyInfo +type InvoiceAppliedCreditNotesItem struct { + String string + CreditNoteApplyLineForInvoice *CreditNoteApplyLineForInvoice + + typ string } -func NewJournalEntryCompanyFromString(value string) *JournalEntryCompany { - return &JournalEntryCompany{typeName: "string", String: value} +func (i *InvoiceAppliedCreditNotesItem) GetString() string { + if i == nil { + return "" + } + return i.String } -func NewJournalEntryCompanyFromCompanyInfo(value *CompanyInfo) *JournalEntryCompany { - return &JournalEntryCompany{typeName: "companyInfo", CompanyInfo: value} +func (i *InvoiceAppliedCreditNotesItem) GetCreditNoteApplyLineForInvoice() *CreditNoteApplyLineForInvoice { + if i == nil { + return nil + } + return i.CreditNoteApplyLineForInvoice } -func (j *JournalEntryCompany) UnmarshalJSON(data []byte) error { +func (i *InvoiceAppliedCreditNotesItem) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - j.typeName = "string" - j.String = valueString + i.typ = "String" + i.String = valueString return nil } - valueCompanyInfo := new(CompanyInfo) - if err := json.Unmarshal(data, &valueCompanyInfo); err == nil { - j.typeName = "companyInfo" - j.CompanyInfo = valueCompanyInfo + valueCreditNoteApplyLineForInvoice := new(CreditNoteApplyLineForInvoice) + if err := json.Unmarshal(data, &valueCreditNoteApplyLineForInvoice); err == nil { + i.typ = "CreditNoteApplyLineForInvoice" + i.CreditNoteApplyLineForInvoice = valueCreditNoteApplyLineForInvoice return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, j) + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) } -func (j JournalEntryCompany) MarshalJSON() ([]byte, error) { - switch j.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "string": - return json.Marshal(j.String) - case "companyInfo": - return json.Marshal(j.CompanyInfo) +func (i InvoiceAppliedCreditNotesItem) MarshalJSON() ([]byte, error) { + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) + } + if i.typ == "CreditNoteApplyLineForInvoice" || i.CreditNoteApplyLineForInvoice != nil { + return json.Marshal(i.CreditNoteApplyLineForInvoice) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) } -type JournalEntryCompanyVisitor interface { +type InvoiceAppliedCreditNotesItemVisitor interface { VisitString(string) error - VisitCompanyInfo(*CompanyInfo) error + VisitCreditNoteApplyLineForInvoice(*CreditNoteApplyLineForInvoice) error } -func (j *JournalEntryCompany) Accept(visitor JournalEntryCompanyVisitor) error { - switch j.typeName { - default: - return fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "string": - return visitor.VisitString(j.String) - case "companyInfo": - return visitor.VisitCompanyInfo(j.CompanyInfo) +func (i *InvoiceAppliedCreditNotesItem) Accept(visitor InvoiceAppliedCreditNotesItemVisitor) error { + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) + } + if i.typ == "CreditNoteApplyLineForInvoice" || i.CreditNoteApplyLineForInvoice != nil { + return visitor.VisitCreditNoteApplyLineForInvoice(i.CreditNoteApplyLineForInvoice) } + return fmt.Errorf("type %T does not include a non-empty union type", i) } -// The journal's currency. -// -// - `XUA` - ADB Unit of Account -// - `AFN` - Afghan Afghani -// - `AFA` - Afghan Afghani (1927–2002) -// - `ALL` - Albanian Lek -// - `ALK` - Albanian Lek (1946–1965) -// - `DZD` - Algerian Dinar -// - `ADP` - Andorran Peseta -// - `AOA` - Angolan Kwanza -// - `AOK` - Angolan Kwanza (1977–1991) -// - `AON` - Angolan New Kwanza (1990–2000) -// - `AOR` - Angolan Readjusted Kwanza (1995–1999) -// - `ARA` - Argentine Austral -// - `ARS` - Argentine Peso -// - `ARM` - Argentine Peso (1881–1970) -// - `ARP` - Argentine Peso (1983–1985) -// - `ARL` - Argentine Peso Ley (1970–1983) -// - `AMD` - Armenian Dram -// - `AWG` - Aruban Florin -// - `AUD` - Australian Dollar -// - `ATS` - Austrian Schilling -// - `AZN` - Azerbaijani Manat -// - `AZM` - Azerbaijani Manat (1993–2006) -// - `BSD` - Bahamian Dollar -// - `BHD` - Bahraini Dinar -// - `BDT` - Bangladeshi Taka -// - `BBD` - Barbadian Dollar -// - `BYN` - Belarusian Ruble -// - `BYB` - Belarusian Ruble (1994–1999) -// - `BYR` - Belarusian Ruble (2000–2016) -// - `BEF` - Belgian Franc -// - `BEC` - Belgian Franc (convertible) -// - `BEL` - Belgian Franc (financial) -// - `BZD` - Belize Dollar -// - `BMD` - Bermudan Dollar -// - `BTN` - Bhutanese Ngultrum -// - `BOB` - Bolivian Boliviano -// - `BOL` - Bolivian Boliviano (1863–1963) -// - `BOV` - Bolivian Mvdol -// - `BOP` - Bolivian Peso -// - `BAM` - Bosnia-Herzegovina Convertible Mark -// - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) -// - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) -// - `BWP` - Botswanan Pula -// - `BRC` - Brazilian Cruzado (1986–1989) -// - `BRZ` - Brazilian Cruzeiro (1942–1967) -// - `BRE` - Brazilian Cruzeiro (1990–1993) -// - `BRR` - Brazilian Cruzeiro (1993–1994) -// - `BRN` - Brazilian New Cruzado (1989–1990) -// - `BRB` - Brazilian New Cruzeiro (1967–1986) -// - `BRL` - Brazilian Real -// - `GBP` - British Pound -// - `BND` - Brunei Dollar -// - `BGL` - Bulgarian Hard Lev -// - `BGN` - Bulgarian Lev -// - `BGO` - Bulgarian Lev (1879–1952) -// - `BGM` - Bulgarian Socialist Lev -// - `BUK` - Burmese Kyat -// - `BIF` - Burundian Franc -// - `XPF` - CFP Franc -// - `KHR` - Cambodian Riel -// - `CAD` - Canadian Dollar -// - `CVE` - Cape Verdean Escudo -// - `KYD` - Cayman Islands Dollar -// - `XAF` - Central African CFA Franc -// - `CLE` - Chilean Escudo -// - `CLP` - Chilean Peso -// - `CLF` - Chilean Unit of Account (UF) -// - `CNX` - Chinese People’s Bank Dollar -// - `CNY` - Chinese Yuan -// - `CNH` - Chinese Yuan (offshore) -// - `COP` - Colombian Peso -// - `COU` - Colombian Real Value Unit -// - `KMF` - Comorian Franc -// - `CDF` - Congolese Franc -// - `CRC` - Costa Rican Colón -// - `HRD` - Croatian Dinar -// - `HRK` - Croatian Kuna -// - `CUC` - Cuban Convertible Peso -// - `CUP` - Cuban Peso -// - `CYP` - Cypriot Pound -// - `CZK` - Czech Koruna -// - `CSK` - Czechoslovak Hard Koruna -// - `DKK` - Danish Krone -// - `DJF` - Djiboutian Franc -// - `DOP` - Dominican Peso -// - `NLG` - Dutch Guilder -// - `XCD` - East Caribbean Dollar -// - `DDM` - East German Mark -// - `ECS` - Ecuadorian Sucre -// - `ECV` - Ecuadorian Unit of Constant Value -// - `EGP` - Egyptian Pound -// - `GQE` - Equatorial Guinean Ekwele -// - `ERN` - Eritrean Nakfa -// - `EEK` - Estonian Kroon -// - `ETB` - Ethiopian Birr -// - `EUR` - Euro -// - `XBA` - European Composite Unit -// - `XEU` - European Currency Unit -// - `XBB` - European Monetary Unit -// - `XBC` - European Unit of Account (XBC) -// - `XBD` - European Unit of Account (XBD) -// - `FKP` - Falkland Islands Pound -// - `FJD` - Fijian Dollar -// - `FIM` - Finnish Markka -// - `FRF` - French Franc -// - `XFO` - French Gold Franc -// - `XFU` - French UIC-Franc -// - `GMD` - Gambian Dalasi -// - `GEK` - Georgian Kupon Larit -// - `GEL` - Georgian Lari -// - `DEM` - German Mark -// - `GHS` - Ghanaian Cedi -// - `GHC` - Ghanaian Cedi (1979–2007) -// - `GIP` - Gibraltar Pound -// - `XAU` - Gold -// - `GRD` - Greek Drachma -// - `GTQ` - Guatemalan Quetzal -// - `GWP` - Guinea-Bissau Peso -// - `GNF` - Guinean Franc -// - `GNS` - Guinean Syli -// - `GYD` - Guyanaese Dollar -// - `HTG` - Haitian Gourde -// - `HNL` - Honduran Lempira -// - `HKD` - Hong Kong Dollar -// - `HUF` - Hungarian Forint -// - `IMP` - IMP -// - `ISK` - Icelandic Króna -// - `ISJ` - Icelandic Króna (1918–1981) -// - `INR` - Indian Rupee -// - `IDR` - Indonesian Rupiah -// - `IRR` - Iranian Rial -// - `IQD` - Iraqi Dinar -// - `IEP` - Irish Pound -// - `ILS` - Israeli New Shekel -// - `ILP` - Israeli Pound -// - `ILR` - Israeli Shekel (1980–1985) -// - `ITL` - Italian Lira -// - `JMD` - Jamaican Dollar -// - `JPY` - Japanese Yen -// - `JOD` - Jordanian Dinar -// - `KZT` - Kazakhstani Tenge -// - `KES` - Kenyan Shilling -// - `KWD` - Kuwaiti Dinar -// - `KGS` - Kyrgystani Som -// - `LAK` - Laotian Kip -// - `LVL` - Latvian Lats -// - `LVR` - Latvian Ruble -// - `LBP` - Lebanese Pound -// - `LSL` - Lesotho Loti -// - `LRD` - Liberian Dollar -// - `LYD` - Libyan Dinar -// - `LTL` - Lithuanian Litas -// - `LTT` - Lithuanian Talonas -// - `LUL` - Luxembourg Financial Franc -// - `LUC` - Luxembourgian Convertible Franc -// - `LUF` - Luxembourgian Franc -// - `MOP` - Macanese Pataca -// - `MKD` - Macedonian Denar -// - `MKN` - Macedonian Denar (1992–1993) -// - `MGA` - Malagasy Ariary -// - `MGF` - Malagasy Franc -// - `MWK` - Malawian Kwacha -// - `MYR` - Malaysian Ringgit -// - `MVR` - Maldivian Rufiyaa -// - `MVP` - Maldivian Rupee (1947–1981) -// - `MLF` - Malian Franc -// - `MTL` - Maltese Lira -// - `MTP` - Maltese Pound -// - `MRU` - Mauritanian Ouguiya -// - `MRO` - Mauritanian Ouguiya (1973–2017) -// - `MUR` - Mauritian Rupee -// - `MXV` - Mexican Investment Unit -// - `MXN` - Mexican Peso -// - `MXP` - Mexican Silver Peso (1861–1992) -// - `MDC` - Moldovan Cupon -// - `MDL` - Moldovan Leu -// - `MCF` - Monegasque Franc -// - `MNT` - Mongolian Tugrik -// - `MAD` - Moroccan Dirham -// - `MAF` - Moroccan Franc -// - `MZE` - Mozambican Escudo -// - `MZN` - Mozambican Metical -// - `MZM` - Mozambican Metical (1980–2006) -// - `MMK` - Myanmar Kyat -// - `NAD` - Namibian Dollar -// - `NPR` - Nepalese Rupee -// - `ANG` - Netherlands Antillean Guilder -// - `TWD` - New Taiwan Dollar -// - `NZD` - New Zealand Dollar -// - `NIO` - Nicaraguan Córdoba -// - `NIC` - Nicaraguan Córdoba (1988–1991) -// - `NGN` - Nigerian Naira -// - `KPW` - North Korean Won -// - `NOK` - Norwegian Krone -// - `OMR` - Omani Rial -// - `PKR` - Pakistani Rupee -// - `XPD` - Palladium -// - `PAB` - Panamanian Balboa -// - `PGK` - Papua New Guinean Kina -// - `PYG` - Paraguayan Guarani -// - `PEI` - Peruvian Inti -// - `PEN` - Peruvian Sol -// - `PES` - Peruvian Sol (1863–1965) -// - `PHP` - Philippine Peso -// - `XPT` - Platinum -// - `PLN` - Polish Zloty -// - `PLZ` - Polish Zloty (1950–1995) -// - `PTE` - Portuguese Escudo -// - `GWE` - Portuguese Guinea Escudo -// - `QAR` - Qatari Rial -// - `XRE` - RINET Funds -// - `RHD` - Rhodesian Dollar -// - `RON` - Romanian Leu -// - `ROL` - Romanian Leu (1952–2006) -// - `RUB` - Russian Ruble -// - `RUR` - Russian Ruble (1991–1998) -// - `RWF` - Rwandan Franc -// - `SVC` - Salvadoran Colón -// - `WST` - Samoan Tala -// - `SAR` - Saudi Riyal -// - `RSD` - Serbian Dinar -// - `CSD` - Serbian Dinar (2002–2006) -// - `SCR` - Seychellois Rupee -// - `SLL` - Sierra Leonean Leone -// - `XAG` - Silver -// - `SGD` - Singapore Dollar -// - `SKK` - Slovak Koruna -// - `SIT` - Slovenian Tolar -// - `SBD` - Solomon Islands Dollar -// - `SOS` - Somali Shilling -// - `ZAR` - South African Rand -// - `ZAL` - South African Rand (financial) -// - `KRH` - South Korean Hwan (1953–1962) -// - `KRW` - South Korean Won -// - `KRO` - South Korean Won (1945–1953) -// - `SSP` - South Sudanese Pound -// - `SUR` - Soviet Rouble -// - `ESP` - Spanish Peseta -// - `ESA` - Spanish Peseta (A account) -// - `ESB` - Spanish Peseta (convertible account) -// - `XDR` - Special Drawing Rights -// - `LKR` - Sri Lankan Rupee -// - `SHP` - St. Helena Pound -// - `XSU` - Sucre -// - `SDD` - Sudanese Dinar (1992–2007) -// - `SDG` - Sudanese Pound -// - `SDP` - Sudanese Pound (1957–1998) -// - `SRD` - Surinamese Dollar -// - `SRG` - Surinamese Guilder -// - `SZL` - Swazi Lilangeni -// - `SEK` - Swedish Krona -// - `CHF` - Swiss Franc -// - `SYP` - Syrian Pound -// - `STN` - São Tomé & Príncipe Dobra -// - `STD` - São Tomé & Príncipe Dobra (1977–2017) -// - `TVD` - TVD -// - `TJR` - Tajikistani Ruble -// - `TJS` - Tajikistani Somoni -// - `TZS` - Tanzanian Shilling -// - `XTS` - Testing Currency Code -// - `THB` - Thai Baht -// - `XXX` - The codes assigned for transactions where no currency is involved -// - `TPE` - Timorese Escudo -// - `TOP` - Tongan Paʻanga -// - `TTD` - Trinidad & Tobago Dollar -// - `TND` - Tunisian Dinar -// - `TRY` - Turkish Lira -// - `TRL` - Turkish Lira (1922–2005) -// - `TMT` - Turkmenistani Manat -// - `TMM` - Turkmenistani Manat (1993–2009) -// - `USD` - US Dollar -// - `USN` - US Dollar (Next day) -// - `USS` - US Dollar (Same day) -// - `UGX` - Ugandan Shilling -// - `UGS` - Ugandan Shilling (1966–1987) -// - `UAH` - Ukrainian Hryvnia -// - `UAK` - Ukrainian Karbovanets -// - `AED` - United Arab Emirates Dirham -// - `UYW` - Uruguayan Nominal Wage Index Unit -// - `UYU` - Uruguayan Peso -// - `UYP` - Uruguayan Peso (1975–1993) -// - `UYI` - Uruguayan Peso (Indexed Units) -// - `UZS` - Uzbekistani Som -// - `VUV` - Vanuatu Vatu -// - `VES` - Venezuelan Bolívar -// - `VEB` - Venezuelan Bolívar (1871–2008) -// - `VEF` - Venezuelan Bolívar (2008–2018) -// - `VND` - Vietnamese Dong -// - `VNN` - Vietnamese Dong (1978–1985) -// - `CHE` - WIR Euro -// - `CHW` - WIR Franc -// - `XOF` - West African CFA Franc -// - `YDD` - Yemeni Dinar -// - `YER` - Yemeni Rial -// - `YUN` - Yugoslavian Convertible Dinar (1990–1992) -// - `YUD` - Yugoslavian Hard Dinar (1966–1990) -// - `YUM` - Yugoslavian New Dinar (1994–2002) -// - `YUR` - Yugoslavian Reformed Dinar (1992–1993) -// - `ZWN` - ZWN -// - `ZRN` - Zairean New Zaire (1993–1998) -// - `ZRZ` - Zairean Zaire (1971–1993) -// - `ZMW` - Zambian Kwacha -// - `ZMK` - Zambian Kwacha (1968–2012) -// - `ZWD` - Zimbabwean Dollar (1980–2008) -// - `ZWR` - Zimbabwean Dollar (2008) -// - `ZWL` - Zimbabwean Dollar (2009) -type JournalEntryCurrency struct { - typeName string - TransactionCurrencyEnum TransactionCurrencyEnum - String string -} +type InvoiceAppliedPaymentsItem struct { + String string + PaymentLineItem *PaymentLineItem -func NewJournalEntryCurrencyFromTransactionCurrencyEnum(value TransactionCurrencyEnum) *JournalEntryCurrency { - return &JournalEntryCurrency{typeName: "transactionCurrencyEnum", TransactionCurrencyEnum: value} + typ string } -func NewJournalEntryCurrencyFromString(value string) *JournalEntryCurrency { - return &JournalEntryCurrency{typeName: "string", String: value} +func (i *InvoiceAppliedPaymentsItem) GetString() string { + if i == nil { + return "" + } + return i.String } -func (j *JournalEntryCurrency) UnmarshalJSON(data []byte) error { - var valueTransactionCurrencyEnum TransactionCurrencyEnum - if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { - j.typeName = "transactionCurrencyEnum" - j.TransactionCurrencyEnum = valueTransactionCurrencyEnum +func (i *InvoiceAppliedPaymentsItem) GetPaymentLineItem() *PaymentLineItem { + if i == nil { return nil } + return i.PaymentLineItem +} + +func (i *InvoiceAppliedPaymentsItem) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - j.typeName = "string" - j.String = valueString + i.typ = "String" + i.String = valueString + return nil + } + valuePaymentLineItem := new(PaymentLineItem) + if err := json.Unmarshal(data, &valuePaymentLineItem); err == nil { + i.typ = "PaymentLineItem" + i.PaymentLineItem = valuePaymentLineItem return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, j) + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) } -func (j JournalEntryCurrency) MarshalJSON() ([]byte, error) { - switch j.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "transactionCurrencyEnum": - return json.Marshal(j.TransactionCurrencyEnum) - case "string": - return json.Marshal(j.String) +func (i InvoiceAppliedPaymentsItem) MarshalJSON() ([]byte, error) { + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) + } + if i.typ == "PaymentLineItem" || i.PaymentLineItem != nil { + return json.Marshal(i.PaymentLineItem) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) } -type JournalEntryCurrencyVisitor interface { - VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error +type InvoiceAppliedPaymentsItemVisitor interface { VisitString(string) error + VisitPaymentLineItem(*PaymentLineItem) error } -func (j *JournalEntryCurrency) Accept(visitor JournalEntryCurrencyVisitor) error { - switch j.typeName { - default: - return fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "transactionCurrencyEnum": - return visitor.VisitTransactionCurrencyEnum(j.TransactionCurrencyEnum) - case "string": - return visitor.VisitString(j.String) +func (i *InvoiceAppliedPaymentsItem) Accept(visitor InvoiceAppliedPaymentsItemVisitor) error { + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) + } + if i.typ == "PaymentLineItem" || i.PaymentLineItem != nil { + return visitor.VisitPaymentLineItem(i.PaymentLineItem) } + return fmt.Errorf("type %T does not include a non-empty union type", i) } -type JournalEntryPaymentsItem struct { - typeName string - String string - Payment *Payment +type InvoiceAppliedVendorCreditsItem struct { + String string + VendorCreditApplyLineForInvoice *VendorCreditApplyLineForInvoice + + typ string } -func NewJournalEntryPaymentsItemFromString(value string) *JournalEntryPaymentsItem { - return &JournalEntryPaymentsItem{typeName: "string", String: value} +func (i *InvoiceAppliedVendorCreditsItem) GetString() string { + if i == nil { + return "" + } + return i.String } -func NewJournalEntryPaymentsItemFromPayment(value *Payment) *JournalEntryPaymentsItem { - return &JournalEntryPaymentsItem{typeName: "payment", Payment: value} +func (i *InvoiceAppliedVendorCreditsItem) GetVendorCreditApplyLineForInvoice() *VendorCreditApplyLineForInvoice { + if i == nil { + return nil + } + return i.VendorCreditApplyLineForInvoice } -func (j *JournalEntryPaymentsItem) UnmarshalJSON(data []byte) error { +func (i *InvoiceAppliedVendorCreditsItem) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - j.typeName = "string" - j.String = valueString + i.typ = "String" + i.String = valueString return nil } - valuePayment := new(Payment) - if err := json.Unmarshal(data, &valuePayment); err == nil { - j.typeName = "payment" - j.Payment = valuePayment + valueVendorCreditApplyLineForInvoice := new(VendorCreditApplyLineForInvoice) + if err := json.Unmarshal(data, &valueVendorCreditApplyLineForInvoice); err == nil { + i.typ = "VendorCreditApplyLineForInvoice" + i.VendorCreditApplyLineForInvoice = valueVendorCreditApplyLineForInvoice return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, j) + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) } -func (j JournalEntryPaymentsItem) MarshalJSON() ([]byte, error) { - switch j.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "string": - return json.Marshal(j.String) - case "payment": - return json.Marshal(j.Payment) +func (i InvoiceAppliedVendorCreditsItem) MarshalJSON() ([]byte, error) { + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) } + if i.typ == "VendorCreditApplyLineForInvoice" || i.VendorCreditApplyLineForInvoice != nil { + return json.Marshal(i.VendorCreditApplyLineForInvoice) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) } -type JournalEntryPaymentsItemVisitor interface { +type InvoiceAppliedVendorCreditsItemVisitor interface { VisitString(string) error - VisitPayment(*Payment) error + VisitVendorCreditApplyLineForInvoice(*VendorCreditApplyLineForInvoice) error } -func (j *JournalEntryPaymentsItem) Accept(visitor JournalEntryPaymentsItemVisitor) error { - switch j.typeName { - default: - return fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "string": - return visitor.VisitString(j.String) - case "payment": - return visitor.VisitPayment(j.Payment) +func (i *InvoiceAppliedVendorCreditsItem) Accept(visitor InvoiceAppliedVendorCreditsItemVisitor) error { + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) } + if i.typ == "VendorCreditApplyLineForInvoice" || i.VendorCreditApplyLineForInvoice != nil { + return visitor.VisitVendorCreditApplyLineForInvoice(i.VendorCreditApplyLineForInvoice) + } + return fmt.Errorf("type %T does not include a non-empty union type", i) } -// The journal's posting status. -// -// - `UNPOSTED` - UNPOSTED -// - `POSTED` - POSTED -type JournalEntryPostingStatus struct { - typeName string - PostingStatusEnum PostingStatusEnum - String string -} +// The company the invoice belongs to. +type InvoiceCompany struct { + String string + CompanyInfo *CompanyInfo -func NewJournalEntryPostingStatusFromPostingStatusEnum(value PostingStatusEnum) *JournalEntryPostingStatus { - return &JournalEntryPostingStatus{typeName: "postingStatusEnum", PostingStatusEnum: value} + typ string } -func NewJournalEntryPostingStatusFromString(value string) *JournalEntryPostingStatus { - return &JournalEntryPostingStatus{typeName: "string", String: value} +func (i *InvoiceCompany) GetString() string { + if i == nil { + return "" + } + return i.String } -func (j *JournalEntryPostingStatus) UnmarshalJSON(data []byte) error { - var valuePostingStatusEnum PostingStatusEnum - if err := json.Unmarshal(data, &valuePostingStatusEnum); err == nil { - j.typeName = "postingStatusEnum" - j.PostingStatusEnum = valuePostingStatusEnum +func (i *InvoiceCompany) GetCompanyInfo() *CompanyInfo { + if i == nil { return nil } + return i.CompanyInfo +} + +func (i *InvoiceCompany) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - j.typeName = "string" - j.String = valueString + i.typ = "String" + i.String = valueString + return nil + } + valueCompanyInfo := new(CompanyInfo) + if err := json.Unmarshal(data, &valueCompanyInfo); err == nil { + i.typ = "CompanyInfo" + i.CompanyInfo = valueCompanyInfo return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, j) + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) } -func (j JournalEntryPostingStatus) MarshalJSON() ([]byte, error) { - switch j.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "postingStatusEnum": - return json.Marshal(j.PostingStatusEnum) - case "string": - return json.Marshal(j.String) +func (i InvoiceCompany) MarshalJSON() ([]byte, error) { + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) + } + if i.typ == "CompanyInfo" || i.CompanyInfo != nil { + return json.Marshal(i.CompanyInfo) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) } -type JournalEntryPostingStatusVisitor interface { - VisitPostingStatusEnum(PostingStatusEnum) error +type InvoiceCompanyVisitor interface { VisitString(string) error + VisitCompanyInfo(*CompanyInfo) error } -func (j *JournalEntryPostingStatus) Accept(visitor JournalEntryPostingStatusVisitor) error { - switch j.typeName { - default: - return fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "postingStatusEnum": - return visitor.VisitPostingStatusEnum(j.PostingStatusEnum) - case "string": - return visitor.VisitString(j.String) +func (i *InvoiceCompany) Accept(visitor InvoiceCompanyVisitor) error { + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) + } + if i.typ == "CompanyInfo" || i.CompanyInfo != nil { + return visitor.VisitCompanyInfo(i.CompanyInfo) } + return fmt.Errorf("type %T does not include a non-empty union type", i) } -// # The JournalEntry Object -// -// ### Description -// -// The `JournalEntry` object is used to get a record of all manually created entries made in a company’s general ledger. The journal line items for each journal entry should sum to zero. -// -// ### Usage Example -// -// Fetch from the `GET JournalEntry` endpoint and view a company's journey entry. -type JournalEntryRequest struct { - // The journal entry's transaction date. - TransactionDate *time.Time `json:"transaction_date,omitempty"` - // Array of `Payment` object IDs. - Payments []*JournalEntryRequestPaymentsItem `json:"payments,omitempty"` - // The journal entry's private note. - Memo *string `json:"memo,omitempty"` - // The journal's currency. - // - // - `XUA` - ADB Unit of Account - // - `AFN` - Afghan Afghani - // - `AFA` - Afghan Afghani (1927–2002) - // - `ALL` - Albanian Lek - // - `ALK` - Albanian Lek (1946–1965) - // - `DZD` - Algerian Dinar - // - `ADP` - Andorran Peseta - // - `AOA` - Angolan Kwanza - // - `AOK` - Angolan Kwanza (1977–1991) - // - `AON` - Angolan New Kwanza (1990–2000) - // - `AOR` - Angolan Readjusted Kwanza (1995–1999) - // - `ARA` - Argentine Austral - // - `ARS` - Argentine Peso - // - `ARM` - Argentine Peso (1881–1970) - // - `ARP` - Argentine Peso (1983–1985) - // - `ARL` - Argentine Peso Ley (1970–1983) - // - `AMD` - Armenian Dram - // - `AWG` - Aruban Florin - // - `AUD` - Australian Dollar - // - `ATS` - Austrian Schilling - // - `AZN` - Azerbaijani Manat - // - `AZM` - Azerbaijani Manat (1993–2006) - // - `BSD` - Bahamian Dollar - // - `BHD` - Bahraini Dinar - // - `BDT` - Bangladeshi Taka - // - `BBD` - Barbadian Dollar - // - `BYN` - Belarusian Ruble - // - `BYB` - Belarusian Ruble (1994–1999) - // - `BYR` - Belarusian Ruble (2000–2016) - // - `BEF` - Belgian Franc - // - `BEC` - Belgian Franc (convertible) - // - `BEL` - Belgian Franc (financial) - // - `BZD` - Belize Dollar - // - `BMD` - Bermudan Dollar - // - `BTN` - Bhutanese Ngultrum - // - `BOB` - Bolivian Boliviano - // - `BOL` - Bolivian Boliviano (1863–1963) - // - `BOV` - Bolivian Mvdol - // - `BOP` - Bolivian Peso - // - `BAM` - Bosnia-Herzegovina Convertible Mark - // - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - // - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - // - `BWP` - Botswanan Pula - // - `BRC` - Brazilian Cruzado (1986–1989) - // - `BRZ` - Brazilian Cruzeiro (1942–1967) - // - `BRE` - Brazilian Cruzeiro (1990–1993) - // - `BRR` - Brazilian Cruzeiro (1993–1994) - // - `BRN` - Brazilian New Cruzado (1989–1990) - // - `BRB` - Brazilian New Cruzeiro (1967–1986) - // - `BRL` - Brazilian Real - // - `GBP` - British Pound - // - `BND` - Brunei Dollar - // - `BGL` - Bulgarian Hard Lev - // - `BGN` - Bulgarian Lev - // - `BGO` - Bulgarian Lev (1879–1952) - // - `BGM` - Bulgarian Socialist Lev - // - `BUK` - Burmese Kyat - // - `BIF` - Burundian Franc - // - `XPF` - CFP Franc - // - `KHR` - Cambodian Riel - // - `CAD` - Canadian Dollar - // - `CVE` - Cape Verdean Escudo - // - `KYD` - Cayman Islands Dollar - // - `XAF` - Central African CFA Franc - // - `CLE` - Chilean Escudo - // - `CLP` - Chilean Peso - // - `CLF` - Chilean Unit of Account (UF) - // - `CNX` - Chinese People’s Bank Dollar - // - `CNY` - Chinese Yuan - // - `CNH` - Chinese Yuan (offshore) - // - `COP` - Colombian Peso - // - `COU` - Colombian Real Value Unit - // - `KMF` - Comorian Franc - // - `CDF` - Congolese Franc - // - `CRC` - Costa Rican Colón - // - `HRD` - Croatian Dinar - // - `HRK` - Croatian Kuna - // - `CUC` - Cuban Convertible Peso - // - `CUP` - Cuban Peso - // - `CYP` - Cypriot Pound - // - `CZK` - Czech Koruna - // - `CSK` - Czechoslovak Hard Koruna - // - `DKK` - Danish Krone - // - `DJF` - Djiboutian Franc - // - `DOP` - Dominican Peso - // - `NLG` - Dutch Guilder - // - `XCD` - East Caribbean Dollar - // - `DDM` - East German Mark - // - `ECS` - Ecuadorian Sucre - // - `ECV` - Ecuadorian Unit of Constant Value - // - `EGP` - Egyptian Pound - // - `GQE` - Equatorial Guinean Ekwele - // - `ERN` - Eritrean Nakfa - // - `EEK` - Estonian Kroon - // - `ETB` - Ethiopian Birr - // - `EUR` - Euro - // - `XBA` - European Composite Unit - // - `XEU` - European Currency Unit - // - `XBB` - European Monetary Unit - // - `XBC` - European Unit of Account (XBC) - // - `XBD` - European Unit of Account (XBD) - // - `FKP` - Falkland Islands Pound - // - `FJD` - Fijian Dollar - // - `FIM` - Finnish Markka - // - `FRF` - French Franc - // - `XFO` - French Gold Franc - // - `XFU` - French UIC-Franc - // - `GMD` - Gambian Dalasi - // - `GEK` - Georgian Kupon Larit - // - `GEL` - Georgian Lari - // - `DEM` - German Mark - // - `GHS` - Ghanaian Cedi - // - `GHC` - Ghanaian Cedi (1979–2007) - // - `GIP` - Gibraltar Pound - // - `XAU` - Gold - // - `GRD` - Greek Drachma - // - `GTQ` - Guatemalan Quetzal - // - `GWP` - Guinea-Bissau Peso - // - `GNF` - Guinean Franc - // - `GNS` - Guinean Syli - // - `GYD` - Guyanaese Dollar - // - `HTG` - Haitian Gourde - // - `HNL` - Honduran Lempira - // - `HKD` - Hong Kong Dollar - // - `HUF` - Hungarian Forint - // - `IMP` - IMP - // - `ISK` - Icelandic Króna - // - `ISJ` - Icelandic Króna (1918–1981) - // - `INR` - Indian Rupee - // - `IDR` - Indonesian Rupiah - // - `IRR` - Iranian Rial - // - `IQD` - Iraqi Dinar - // - `IEP` - Irish Pound - // - `ILS` - Israeli New Shekel - // - `ILP` - Israeli Pound - // - `ILR` - Israeli Shekel (1980–1985) - // - `ITL` - Italian Lira - // - `JMD` - Jamaican Dollar - // - `JPY` - Japanese Yen - // - `JOD` - Jordanian Dinar - // - `KZT` - Kazakhstani Tenge - // - `KES` - Kenyan Shilling - // - `KWD` - Kuwaiti Dinar - // - `KGS` - Kyrgystani Som - // - `LAK` - Laotian Kip - // - `LVL` - Latvian Lats - // - `LVR` - Latvian Ruble - // - `LBP` - Lebanese Pound - // - `LSL` - Lesotho Loti - // - `LRD` - Liberian Dollar - // - `LYD` - Libyan Dinar - // - `LTL` - Lithuanian Litas - // - `LTT` - Lithuanian Talonas - // - `LUL` - Luxembourg Financial Franc - // - `LUC` - Luxembourgian Convertible Franc - // - `LUF` - Luxembourgian Franc - // - `MOP` - Macanese Pataca - // - `MKD` - Macedonian Denar - // - `MKN` - Macedonian Denar (1992–1993) - // - `MGA` - Malagasy Ariary - // - `MGF` - Malagasy Franc - // - `MWK` - Malawian Kwacha - // - `MYR` - Malaysian Ringgit - // - `MVR` - Maldivian Rufiyaa - // - `MVP` - Maldivian Rupee (1947–1981) - // - `MLF` - Malian Franc - // - `MTL` - Maltese Lira - // - `MTP` - Maltese Pound - // - `MRU` - Mauritanian Ouguiya - // - `MRO` - Mauritanian Ouguiya (1973–2017) - // - `MUR` - Mauritian Rupee - // - `MXV` - Mexican Investment Unit - // - `MXN` - Mexican Peso - // - `MXP` - Mexican Silver Peso (1861–1992) - // - `MDC` - Moldovan Cupon - // - `MDL` - Moldovan Leu - // - `MCF` - Monegasque Franc - // - `MNT` - Mongolian Tugrik - // - `MAD` - Moroccan Dirham - // - `MAF` - Moroccan Franc - // - `MZE` - Mozambican Escudo - // - `MZN` - Mozambican Metical - // - `MZM` - Mozambican Metical (1980–2006) - // - `MMK` - Myanmar Kyat - // - `NAD` - Namibian Dollar - // - `NPR` - Nepalese Rupee - // - `ANG` - Netherlands Antillean Guilder - // - `TWD` - New Taiwan Dollar - // - `NZD` - New Zealand Dollar - // - `NIO` - Nicaraguan Córdoba - // - `NIC` - Nicaraguan Córdoba (1988–1991) - // - `NGN` - Nigerian Naira - // - `KPW` - North Korean Won - // - `NOK` - Norwegian Krone - // - `OMR` - Omani Rial - // - `PKR` - Pakistani Rupee - // - `XPD` - Palladium - // - `PAB` - Panamanian Balboa - // - `PGK` - Papua New Guinean Kina - // - `PYG` - Paraguayan Guarani - // - `PEI` - Peruvian Inti - // - `PEN` - Peruvian Sol - // - `PES` - Peruvian Sol (1863–1965) - // - `PHP` - Philippine Peso - // - `XPT` - Platinum - // - `PLN` - Polish Zloty - // - `PLZ` - Polish Zloty (1950–1995) - // - `PTE` - Portuguese Escudo - // - `GWE` - Portuguese Guinea Escudo - // - `QAR` - Qatari Rial - // - `XRE` - RINET Funds - // - `RHD` - Rhodesian Dollar - // - `RON` - Romanian Leu - // - `ROL` - Romanian Leu (1952–2006) - // - `RUB` - Russian Ruble - // - `RUR` - Russian Ruble (1991–1998) - // - `RWF` - Rwandan Franc - // - `SVC` - Salvadoran Colón - // - `WST` - Samoan Tala - // - `SAR` - Saudi Riyal - // - `RSD` - Serbian Dinar - // - `CSD` - Serbian Dinar (2002–2006) - // - `SCR` - Seychellois Rupee - // - `SLL` - Sierra Leonean Leone - // - `XAG` - Silver - // - `SGD` - Singapore Dollar - // - `SKK` - Slovak Koruna - // - `SIT` - Slovenian Tolar - // - `SBD` - Solomon Islands Dollar - // - `SOS` - Somali Shilling - // - `ZAR` - South African Rand - // - `ZAL` - South African Rand (financial) - // - `KRH` - South Korean Hwan (1953–1962) - // - `KRW` - South Korean Won - // - `KRO` - South Korean Won (1945–1953) - // - `SSP` - South Sudanese Pound - // - `SUR` - Soviet Rouble - // - `ESP` - Spanish Peseta - // - `ESA` - Spanish Peseta (A account) - // - `ESB` - Spanish Peseta (convertible account) - // - `XDR` - Special Drawing Rights - // - `LKR` - Sri Lankan Rupee - // - `SHP` - St. Helena Pound - // - `XSU` - Sucre - // - `SDD` - Sudanese Dinar (1992–2007) - // - `SDG` - Sudanese Pound - // - `SDP` - Sudanese Pound (1957–1998) - // - `SRD` - Surinamese Dollar - // - `SRG` - Surinamese Guilder - // - `SZL` - Swazi Lilangeni - // - `SEK` - Swedish Krona - // - `CHF` - Swiss Franc - // - `SYP` - Syrian Pound - // - `STN` - São Tomé & Príncipe Dobra - // - `STD` - São Tomé & Príncipe Dobra (1977–2017) - // - `TVD` - TVD - // - `TJR` - Tajikistani Ruble - // - `TJS` - Tajikistani Somoni - // - `TZS` - Tanzanian Shilling - // - `XTS` - Testing Currency Code - // - `THB` - Thai Baht - // - `XXX` - The codes assigned for transactions where no currency is involved - // - `TPE` - Timorese Escudo - // - `TOP` - Tongan Paʻanga - // - `TTD` - Trinidad & Tobago Dollar - // - `TND` - Tunisian Dinar - // - `TRY` - Turkish Lira - // - `TRL` - Turkish Lira (1922–2005) - // - `TMT` - Turkmenistani Manat - // - `TMM` - Turkmenistani Manat (1993–2009) - // - `USD` - US Dollar - // - `USN` - US Dollar (Next day) - // - `USS` - US Dollar (Same day) - // - `UGX` - Ugandan Shilling - // - `UGS` - Ugandan Shilling (1966–1987) - // - `UAH` - Ukrainian Hryvnia - // - `UAK` - Ukrainian Karbovanets - // - `AED` - United Arab Emirates Dirham - // - `UYW` - Uruguayan Nominal Wage Index Unit - // - `UYU` - Uruguayan Peso - // - `UYP` - Uruguayan Peso (1975–1993) - // - `UYI` - Uruguayan Peso (Indexed Units) - // - `UZS` - Uzbekistani Som - // - `VUV` - Vanuatu Vatu - // - `VES` - Venezuelan Bolívar - // - `VEB` - Venezuelan Bolívar (1871–2008) - // - `VEF` - Venezuelan Bolívar (2008–2018) - // - `VND` - Vietnamese Dong - // - `VNN` - Vietnamese Dong (1978–1985) - // - `CHE` - WIR Euro - // - `CHW` - WIR Franc - // - `XOF` - West African CFA Franc - // - `YDD` - Yemeni Dinar - // - `YER` - Yemeni Rial - // - `YUN` - Yugoslavian Convertible Dinar (1990–1992) - // - `YUD` - Yugoslavian Hard Dinar (1966–1990) - // - `YUM` - Yugoslavian New Dinar (1994–2002) - // - `YUR` - Yugoslavian Reformed Dinar (1992–1993) - // - `ZWN` - ZWN - // - `ZRN` - Zairean New Zaire (1993–1998) - // - `ZRZ` - Zairean Zaire (1971–1993) - // - `ZMW` - Zambian Kwacha - // - `ZMK` - Zambian Kwacha (1968–2012) - // - `ZWD` - Zimbabwean Dollar (1980–2008) - // - `ZWR` - Zimbabwean Dollar (2008) - // - `ZWL` - Zimbabwean Dollar (2009) - Currency *JournalEntryRequestCurrency `json:"currency,omitempty"` - // The journal entry's exchange rate. - ExchangeRate *string `json:"exchange_rate,omitempty"` - // The company the journal entry belongs to. - Company *JournalEntryRequestCompany `json:"company,omitempty"` - TrackingCategories []*JournalEntryRequestTrackingCategoriesItem `json:"tracking_categories,omitempty"` - // If the transaction is inclusive or exclusive of tax. `True` if inclusive, `False` if exclusive. - InclusiveOfTax *bool `json:"inclusive_of_tax,omitempty"` - Lines []*JournalLineRequest `json:"lines,omitempty"` - // Reference number for identifying journal entries. - JournalNumber *string `json:"journal_number,omitempty"` - // The journal's posting status. - // - // - `UNPOSTED` - UNPOSTED - // - `POSTED` - POSTED - PostingStatus *JournalEntryRequestPostingStatus `json:"posting_status,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` - RemoteFields []*RemoteFieldRequest `json:"remote_fields,omitempty"` +// The invoice's contact. +type InvoiceContact struct { + String string + Contact *Contact - _rawJSON json.RawMessage + typ string } -func (j *JournalEntryRequest) UnmarshalJSON(data []byte) error { - type unmarshaler JournalEntryRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (i *InvoiceContact) GetString() string { + if i == nil { + return "" } - *j = JournalEntryRequest(value) - j._rawJSON = json.RawMessage(data) - return nil + return i.String } -func (j *JournalEntryRequest) String() string { - if len(j._rawJSON) > 0 { - if value, err := core.StringifyJSON(j._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(j); err == nil { - return value +func (i *InvoiceContact) GetContact() *Contact { + if i == nil { + return nil } - return fmt.Sprintf("%#v", j) -} - -// The company the journal entry belongs to. -type JournalEntryRequestCompany struct { - typeName string - String string - CompanyInfo *CompanyInfo -} - -func NewJournalEntryRequestCompanyFromString(value string) *JournalEntryRequestCompany { - return &JournalEntryRequestCompany{typeName: "string", String: value} -} - -func NewJournalEntryRequestCompanyFromCompanyInfo(value *CompanyInfo) *JournalEntryRequestCompany { - return &JournalEntryRequestCompany{typeName: "companyInfo", CompanyInfo: value} + return i.Contact } -func (j *JournalEntryRequestCompany) UnmarshalJSON(data []byte) error { +func (i *InvoiceContact) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - j.typeName = "string" - j.String = valueString + i.typ = "String" + i.String = valueString return nil } - valueCompanyInfo := new(CompanyInfo) - if err := json.Unmarshal(data, &valueCompanyInfo); err == nil { - j.typeName = "companyInfo" - j.CompanyInfo = valueCompanyInfo + valueContact := new(Contact) + if err := json.Unmarshal(data, &valueContact); err == nil { + i.typ = "Contact" + i.Contact = valueContact return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, j) + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) } -func (j JournalEntryRequestCompany) MarshalJSON() ([]byte, error) { - switch j.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "string": - return json.Marshal(j.String) - case "companyInfo": - return json.Marshal(j.CompanyInfo) +func (i InvoiceContact) MarshalJSON() ([]byte, error) { + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) } + if i.typ == "Contact" || i.Contact != nil { + return json.Marshal(i.Contact) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) } -type JournalEntryRequestCompanyVisitor interface { +type InvoiceContactVisitor interface { VisitString(string) error - VisitCompanyInfo(*CompanyInfo) error + VisitContact(*Contact) error } -func (j *JournalEntryRequestCompany) Accept(visitor JournalEntryRequestCompanyVisitor) error { - switch j.typeName { - default: - return fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "string": - return visitor.VisitString(j.String) - case "companyInfo": - return visitor.VisitCompanyInfo(j.CompanyInfo) +func (i *InvoiceContact) Accept(visitor InvoiceContactVisitor) error { + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) } + if i.typ == "Contact" || i.Contact != nil { + return visitor.VisitContact(i.Contact) + } + return fmt.Errorf("type %T does not include a non-empty union type", i) } -// The journal's currency. +// The invoice's currency. // -// - `XUA` - ADB Unit of Account -// - `AFN` - Afghan Afghani -// - `AFA` - Afghan Afghani (1927–2002) -// - `ALL` - Albanian Lek -// - `ALK` - Albanian Lek (1946–1965) -// - `DZD` - Algerian Dinar -// - `ADP` - Andorran Peseta -// - `AOA` - Angolan Kwanza -// - `AOK` - Angolan Kwanza (1977–1991) -// - `AON` - Angolan New Kwanza (1990–2000) -// - `AOR` - Angolan Readjusted Kwanza (1995–1999) -// - `ARA` - Argentine Austral -// - `ARS` - Argentine Peso -// - `ARM` - Argentine Peso (1881–1970) -// - `ARP` - Argentine Peso (1983–1985) -// - `ARL` - Argentine Peso Ley (1970–1983) -// - `AMD` - Armenian Dram -// - `AWG` - Aruban Florin -// - `AUD` - Australian Dollar -// - `ATS` - Austrian Schilling -// - `AZN` - Azerbaijani Manat -// - `AZM` - Azerbaijani Manat (1993–2006) -// - `BSD` - Bahamian Dollar -// - `BHD` - Bahraini Dinar -// - `BDT` - Bangladeshi Taka -// - `BBD` - Barbadian Dollar -// - `BYN` - Belarusian Ruble -// - `BYB` - Belarusian Ruble (1994–1999) -// - `BYR` - Belarusian Ruble (2000–2016) -// - `BEF` - Belgian Franc -// - `BEC` - Belgian Franc (convertible) -// - `BEL` - Belgian Franc (financial) -// - `BZD` - Belize Dollar -// - `BMD` - Bermudan Dollar -// - `BTN` - Bhutanese Ngultrum -// - `BOB` - Bolivian Boliviano -// - `BOL` - Bolivian Boliviano (1863–1963) -// - `BOV` - Bolivian Mvdol -// - `BOP` - Bolivian Peso -// - `BAM` - Bosnia-Herzegovina Convertible Mark -// - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) -// - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) -// - `BWP` - Botswanan Pula -// - `BRC` - Brazilian Cruzado (1986–1989) -// - `BRZ` - Brazilian Cruzeiro (1942–1967) -// - `BRE` - Brazilian Cruzeiro (1990–1993) -// - `BRR` - Brazilian Cruzeiro (1993–1994) -// - `BRN` - Brazilian New Cruzado (1989–1990) -// - `BRB` - Brazilian New Cruzeiro (1967–1986) -// - `BRL` - Brazilian Real -// - `GBP` - British Pound -// - `BND` - Brunei Dollar -// - `BGL` - Bulgarian Hard Lev -// - `BGN` - Bulgarian Lev -// - `BGO` - Bulgarian Lev (1879–1952) -// - `BGM` - Bulgarian Socialist Lev -// - `BUK` - Burmese Kyat -// - `BIF` - Burundian Franc -// - `XPF` - CFP Franc -// - `KHR` - Cambodian Riel -// - `CAD` - Canadian Dollar -// - `CVE` - Cape Verdean Escudo -// - `KYD` - Cayman Islands Dollar -// - `XAF` - Central African CFA Franc -// - `CLE` - Chilean Escudo -// - `CLP` - Chilean Peso -// - `CLF` - Chilean Unit of Account (UF) -// - `CNX` - Chinese People’s Bank Dollar -// - `CNY` - Chinese Yuan -// - `CNH` - Chinese Yuan (offshore) -// - `COP` - Colombian Peso -// - `COU` - Colombian Real Value Unit -// - `KMF` - Comorian Franc -// - `CDF` - Congolese Franc -// - `CRC` - Costa Rican Colón -// - `HRD` - Croatian Dinar -// - `HRK` - Croatian Kuna -// - `CUC` - Cuban Convertible Peso -// - `CUP` - Cuban Peso -// - `CYP` - Cypriot Pound -// - `CZK` - Czech Koruna -// - `CSK` - Czechoslovak Hard Koruna -// - `DKK` - Danish Krone -// - `DJF` - Djiboutian Franc -// - `DOP` - Dominican Peso -// - `NLG` - Dutch Guilder -// - `XCD` - East Caribbean Dollar -// - `DDM` - East German Mark -// - `ECS` - Ecuadorian Sucre -// - `ECV` - Ecuadorian Unit of Constant Value -// - `EGP` - Egyptian Pound -// - `GQE` - Equatorial Guinean Ekwele -// - `ERN` - Eritrean Nakfa -// - `EEK` - Estonian Kroon -// - `ETB` - Ethiopian Birr -// - `EUR` - Euro -// - `XBA` - European Composite Unit -// - `XEU` - European Currency Unit -// - `XBB` - European Monetary Unit -// - `XBC` - European Unit of Account (XBC) -// - `XBD` - European Unit of Account (XBD) -// - `FKP` - Falkland Islands Pound -// - `FJD` - Fijian Dollar -// - `FIM` - Finnish Markka -// - `FRF` - French Franc -// - `XFO` - French Gold Franc -// - `XFU` - French UIC-Franc -// - `GMD` - Gambian Dalasi -// - `GEK` - Georgian Kupon Larit -// - `GEL` - Georgian Lari -// - `DEM` - German Mark -// - `GHS` - Ghanaian Cedi -// - `GHC` - Ghanaian Cedi (1979–2007) -// - `GIP` - Gibraltar Pound -// - `XAU` - Gold -// - `GRD` - Greek Drachma -// - `GTQ` - Guatemalan Quetzal -// - `GWP` - Guinea-Bissau Peso -// - `GNF` - Guinean Franc -// - `GNS` - Guinean Syli -// - `GYD` - Guyanaese Dollar -// - `HTG` - Haitian Gourde -// - `HNL` - Honduran Lempira -// - `HKD` - Hong Kong Dollar -// - `HUF` - Hungarian Forint -// - `IMP` - IMP -// - `ISK` - Icelandic Króna -// - `ISJ` - Icelandic Króna (1918–1981) -// - `INR` - Indian Rupee -// - `IDR` - Indonesian Rupiah -// - `IRR` - Iranian Rial -// - `IQD` - Iraqi Dinar -// - `IEP` - Irish Pound -// - `ILS` - Israeli New Shekel -// - `ILP` - Israeli Pound -// - `ILR` - Israeli Shekel (1980–1985) -// - `ITL` - Italian Lira -// - `JMD` - Jamaican Dollar -// - `JPY` - Japanese Yen -// - `JOD` - Jordanian Dinar -// - `KZT` - Kazakhstani Tenge -// - `KES` - Kenyan Shilling -// - `KWD` - Kuwaiti Dinar -// - `KGS` - Kyrgystani Som -// - `LAK` - Laotian Kip -// - `LVL` - Latvian Lats -// - `LVR` - Latvian Ruble -// - `LBP` - Lebanese Pound -// - `LSL` - Lesotho Loti -// - `LRD` - Liberian Dollar -// - `LYD` - Libyan Dinar -// - `LTL` - Lithuanian Litas -// - `LTT` - Lithuanian Talonas -// - `LUL` - Luxembourg Financial Franc -// - `LUC` - Luxembourgian Convertible Franc -// - `LUF` - Luxembourgian Franc -// - `MOP` - Macanese Pataca -// - `MKD` - Macedonian Denar -// - `MKN` - Macedonian Denar (1992–1993) -// - `MGA` - Malagasy Ariary -// - `MGF` - Malagasy Franc -// - `MWK` - Malawian Kwacha -// - `MYR` - Malaysian Ringgit -// - `MVR` - Maldivian Rufiyaa -// - `MVP` - Maldivian Rupee (1947–1981) -// - `MLF` - Malian Franc -// - `MTL` - Maltese Lira -// - `MTP` - Maltese Pound -// - `MRU` - Mauritanian Ouguiya -// - `MRO` - Mauritanian Ouguiya (1973–2017) -// - `MUR` - Mauritian Rupee -// - `MXV` - Mexican Investment Unit -// - `MXN` - Mexican Peso -// - `MXP` - Mexican Silver Peso (1861–1992) -// - `MDC` - Moldovan Cupon -// - `MDL` - Moldovan Leu -// - `MCF` - Monegasque Franc -// - `MNT` - Mongolian Tugrik -// - `MAD` - Moroccan Dirham -// - `MAF` - Moroccan Franc -// - `MZE` - Mozambican Escudo -// - `MZN` - Mozambican Metical -// - `MZM` - Mozambican Metical (1980–2006) -// - `MMK` - Myanmar Kyat -// - `NAD` - Namibian Dollar -// - `NPR` - Nepalese Rupee -// - `ANG` - Netherlands Antillean Guilder -// - `TWD` - New Taiwan Dollar -// - `NZD` - New Zealand Dollar -// - `NIO` - Nicaraguan Córdoba -// - `NIC` - Nicaraguan Córdoba (1988–1991) -// - `NGN` - Nigerian Naira -// - `KPW` - North Korean Won -// - `NOK` - Norwegian Krone -// - `OMR` - Omani Rial -// - `PKR` - Pakistani Rupee -// - `XPD` - Palladium -// - `PAB` - Panamanian Balboa -// - `PGK` - Papua New Guinean Kina -// - `PYG` - Paraguayan Guarani -// - `PEI` - Peruvian Inti -// - `PEN` - Peruvian Sol -// - `PES` - Peruvian Sol (1863–1965) -// - `PHP` - Philippine Peso -// - `XPT` - Platinum -// - `PLN` - Polish Zloty -// - `PLZ` - Polish Zloty (1950–1995) -// - `PTE` - Portuguese Escudo -// - `GWE` - Portuguese Guinea Escudo -// - `QAR` - Qatari Rial -// - `XRE` - RINET Funds -// - `RHD` - Rhodesian Dollar -// - `RON` - Romanian Leu -// - `ROL` - Romanian Leu (1952–2006) -// - `RUB` - Russian Ruble -// - `RUR` - Russian Ruble (1991–1998) -// - `RWF` - Rwandan Franc -// - `SVC` - Salvadoran Colón -// - `WST` - Samoan Tala -// - `SAR` - Saudi Riyal -// - `RSD` - Serbian Dinar -// - `CSD` - Serbian Dinar (2002–2006) -// - `SCR` - Seychellois Rupee -// - `SLL` - Sierra Leonean Leone -// - `XAG` - Silver -// - `SGD` - Singapore Dollar -// - `SKK` - Slovak Koruna -// - `SIT` - Slovenian Tolar -// - `SBD` - Solomon Islands Dollar -// - `SOS` - Somali Shilling -// - `ZAR` - South African Rand -// - `ZAL` - South African Rand (financial) -// - `KRH` - South Korean Hwan (1953–1962) -// - `KRW` - South Korean Won -// - `KRO` - South Korean Won (1945–1953) -// - `SSP` - South Sudanese Pound -// - `SUR` - Soviet Rouble -// - `ESP` - Spanish Peseta -// - `ESA` - Spanish Peseta (A account) -// - `ESB` - Spanish Peseta (convertible account) -// - `XDR` - Special Drawing Rights -// - `LKR` - Sri Lankan Rupee -// - `SHP` - St. Helena Pound -// - `XSU` - Sucre -// - `SDD` - Sudanese Dinar (1992–2007) -// - `SDG` - Sudanese Pound -// - `SDP` - Sudanese Pound (1957–1998) -// - `SRD` - Surinamese Dollar -// - `SRG` - Surinamese Guilder -// - `SZL` - Swazi Lilangeni -// - `SEK` - Swedish Krona -// - `CHF` - Swiss Franc -// - `SYP` - Syrian Pound -// - `STN` - São Tomé & Príncipe Dobra -// - `STD` - São Tomé & Príncipe Dobra (1977–2017) -// - `TVD` - TVD -// - `TJR` - Tajikistani Ruble -// - `TJS` - Tajikistani Somoni -// - `TZS` - Tanzanian Shilling -// - `XTS` - Testing Currency Code -// - `THB` - Thai Baht -// - `XXX` - The codes assigned for transactions where no currency is involved -// - `TPE` - Timorese Escudo -// - `TOP` - Tongan Paʻanga -// - `TTD` - Trinidad & Tobago Dollar -// - `TND` - Tunisian Dinar -// - `TRY` - Turkish Lira -// - `TRL` - Turkish Lira (1922–2005) -// - `TMT` - Turkmenistani Manat -// - `TMM` - Turkmenistani Manat (1993–2009) -// - `USD` - US Dollar -// - `USN` - US Dollar (Next day) -// - `USS` - US Dollar (Same day) -// - `UGX` - Ugandan Shilling -// - `UGS` - Ugandan Shilling (1966–1987) -// - `UAH` - Ukrainian Hryvnia -// - `UAK` - Ukrainian Karbovanets -// - `AED` - United Arab Emirates Dirham -// - `UYW` - Uruguayan Nominal Wage Index Unit -// - `UYU` - Uruguayan Peso -// - `UYP` - Uruguayan Peso (1975–1993) -// - `UYI` - Uruguayan Peso (Indexed Units) -// - `UZS` - Uzbekistani Som -// - `VUV` - Vanuatu Vatu -// - `VES` - Venezuelan Bolívar -// - `VEB` - Venezuelan Bolívar (1871–2008) -// - `VEF` - Venezuelan Bolívar (2008–2018) -// - `VND` - Vietnamese Dong -// - `VNN` - Vietnamese Dong (1978–1985) -// - `CHE` - WIR Euro -// - `CHW` - WIR Franc -// - `XOF` - West African CFA Franc -// - `YDD` - Yemeni Dinar -// - `YER` - Yemeni Rial -// - `YUN` - Yugoslavian Convertible Dinar (1990–1992) -// - `YUD` - Yugoslavian Hard Dinar (1966–1990) -// - `YUM` - Yugoslavian New Dinar (1994–2002) -// - `YUR` - Yugoslavian Reformed Dinar (1992–1993) -// - `ZWN` - ZWN -// - `ZRN` - Zairean New Zaire (1993–1998) -// - `ZRZ` - Zairean Zaire (1971–1993) -// - `ZMW` - Zambian Kwacha -// - `ZMK` - Zambian Kwacha (1968–2012) -// - `ZWD` - Zimbabwean Dollar (1980–2008) -// - `ZWR` - Zimbabwean Dollar (2008) -// - `ZWL` - Zimbabwean Dollar (2009) -type JournalEntryRequestCurrency struct { - typeName string +// * `XUA` - ADB Unit of Account +// * `AFN` - Afghan Afghani +// * `AFA` - Afghan Afghani (1927–2002) +// * `ALL` - Albanian Lek +// * `ALK` - Albanian Lek (1946–1965) +// * `DZD` - Algerian Dinar +// * `ADP` - Andorran Peseta +// * `AOA` - Angolan Kwanza +// * `AOK` - Angolan Kwanza (1977–1991) +// * `AON` - Angolan New Kwanza (1990–2000) +// * `AOR` - Angolan Readjusted Kwanza (1995–1999) +// * `ARA` - Argentine Austral +// * `ARS` - Argentine Peso +// * `ARM` - Argentine Peso (1881–1970) +// * `ARP` - Argentine Peso (1983–1985) +// * `ARL` - Argentine Peso Ley (1970–1983) +// * `AMD` - Armenian Dram +// * `AWG` - Aruban Florin +// * `AUD` - Australian Dollar +// * `ATS` - Austrian Schilling +// * `AZN` - Azerbaijani Manat +// * `AZM` - Azerbaijani Manat (1993–2006) +// * `BSD` - Bahamian Dollar +// * `BHD` - Bahraini Dinar +// * `BDT` - Bangladeshi Taka +// * `BBD` - Barbadian Dollar +// * `BYN` - Belarusian Ruble +// * `BYB` - Belarusian Ruble (1994–1999) +// * `BYR` - Belarusian Ruble (2000–2016) +// * `BEF` - Belgian Franc +// * `BEC` - Belgian Franc (convertible) +// * `BEL` - Belgian Franc (financial) +// * `BZD` - Belize Dollar +// * `BMD` - Bermudan Dollar +// * `BTN` - Bhutanese Ngultrum +// * `BOB` - Bolivian Boliviano +// * `BOL` - Bolivian Boliviano (1863–1963) +// * `BOV` - Bolivian Mvdol +// * `BOP` - Bolivian Peso +// * `BAM` - Bosnia-Herzegovina Convertible Mark +// * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) +// * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) +// * `BWP` - Botswanan Pula +// * `BRC` - Brazilian Cruzado (1986–1989) +// * `BRZ` - Brazilian Cruzeiro (1942–1967) +// * `BRE` - Brazilian Cruzeiro (1990–1993) +// * `BRR` - Brazilian Cruzeiro (1993–1994) +// * `BRN` - Brazilian New Cruzado (1989–1990) +// * `BRB` - Brazilian New Cruzeiro (1967–1986) +// * `BRL` - Brazilian Real +// * `GBP` - British Pound +// * `BND` - Brunei Dollar +// * `BGL` - Bulgarian Hard Lev +// * `BGN` - Bulgarian Lev +// * `BGO` - Bulgarian Lev (1879–1952) +// * `BGM` - Bulgarian Socialist Lev +// * `BUK` - Burmese Kyat +// * `BIF` - Burundian Franc +// * `XPF` - CFP Franc +// * `KHR` - Cambodian Riel +// * `CAD` - Canadian Dollar +// * `CVE` - Cape Verdean Escudo +// * `KYD` - Cayman Islands Dollar +// * `XAF` - Central African CFA Franc +// * `CLE` - Chilean Escudo +// * `CLP` - Chilean Peso +// * `CLF` - Chilean Unit of Account (UF) +// * `CNX` - Chinese People’s Bank Dollar +// * `CNY` - Chinese Yuan +// * `CNH` - Chinese Yuan (offshore) +// * `COP` - Colombian Peso +// * `COU` - Colombian Real Value Unit +// * `KMF` - Comorian Franc +// * `CDF` - Congolese Franc +// * `CRC` - Costa Rican Colón +// * `HRD` - Croatian Dinar +// * `HRK` - Croatian Kuna +// * `CUC` - Cuban Convertible Peso +// * `CUP` - Cuban Peso +// * `CYP` - Cypriot Pound +// * `CZK` - Czech Koruna +// * `CSK` - Czechoslovak Hard Koruna +// * `DKK` - Danish Krone +// * `DJF` - Djiboutian Franc +// * `DOP` - Dominican Peso +// * `NLG` - Dutch Guilder +// * `XCD` - East Caribbean Dollar +// * `DDM` - East German Mark +// * `ECS` - Ecuadorian Sucre +// * `ECV` - Ecuadorian Unit of Constant Value +// * `EGP` - Egyptian Pound +// * `GQE` - Equatorial Guinean Ekwele +// * `ERN` - Eritrean Nakfa +// * `EEK` - Estonian Kroon +// * `ETB` - Ethiopian Birr +// * `EUR` - Euro +// * `XBA` - European Composite Unit +// * `XEU` - European Currency Unit +// * `XBB` - European Monetary Unit +// * `XBC` - European Unit of Account (XBC) +// * `XBD` - European Unit of Account (XBD) +// * `FKP` - Falkland Islands Pound +// * `FJD` - Fijian Dollar +// * `FIM` - Finnish Markka +// * `FRF` - French Franc +// * `XFO` - French Gold Franc +// * `XFU` - French UIC-Franc +// * `GMD` - Gambian Dalasi +// * `GEK` - Georgian Kupon Larit +// * `GEL` - Georgian Lari +// * `DEM` - German Mark +// * `GHS` - Ghanaian Cedi +// * `GHC` - Ghanaian Cedi (1979–2007) +// * `GIP` - Gibraltar Pound +// * `XAU` - Gold +// * `GRD` - Greek Drachma +// * `GTQ` - Guatemalan Quetzal +// * `GWP` - Guinea-Bissau Peso +// * `GNF` - Guinean Franc +// * `GNS` - Guinean Syli +// * `GYD` - Guyanaese Dollar +// * `HTG` - Haitian Gourde +// * `HNL` - Honduran Lempira +// * `HKD` - Hong Kong Dollar +// * `HUF` - Hungarian Forint +// * `IMP` - IMP +// * `ISK` - Icelandic Króna +// * `ISJ` - Icelandic Króna (1918–1981) +// * `INR` - Indian Rupee +// * `IDR` - Indonesian Rupiah +// * `IRR` - Iranian Rial +// * `IQD` - Iraqi Dinar +// * `IEP` - Irish Pound +// * `ILS` - Israeli New Shekel +// * `ILP` - Israeli Pound +// * `ILR` - Israeli Shekel (1980–1985) +// * `ITL` - Italian Lira +// * `JMD` - Jamaican Dollar +// * `JPY` - Japanese Yen +// * `JOD` - Jordanian Dinar +// * `KZT` - Kazakhstani Tenge +// * `KES` - Kenyan Shilling +// * `KWD` - Kuwaiti Dinar +// * `KGS` - Kyrgystani Som +// * `LAK` - Laotian Kip +// * `LVL` - Latvian Lats +// * `LVR` - Latvian Ruble +// * `LBP` - Lebanese Pound +// * `LSL` - Lesotho Loti +// * `LRD` - Liberian Dollar +// * `LYD` - Libyan Dinar +// * `LTL` - Lithuanian Litas +// * `LTT` - Lithuanian Talonas +// * `LUL` - Luxembourg Financial Franc +// * `LUC` - Luxembourgian Convertible Franc +// * `LUF` - Luxembourgian Franc +// * `MOP` - Macanese Pataca +// * `MKD` - Macedonian Denar +// * `MKN` - Macedonian Denar (1992–1993) +// * `MGA` - Malagasy Ariary +// * `MGF` - Malagasy Franc +// * `MWK` - Malawian Kwacha +// * `MYR` - Malaysian Ringgit +// * `MVR` - Maldivian Rufiyaa +// * `MVP` - Maldivian Rupee (1947–1981) +// * `MLF` - Malian Franc +// * `MTL` - Maltese Lira +// * `MTP` - Maltese Pound +// * `MRU` - Mauritanian Ouguiya +// * `MRO` - Mauritanian Ouguiya (1973–2017) +// * `MUR` - Mauritian Rupee +// * `MXV` - Mexican Investment Unit +// * `MXN` - Mexican Peso +// * `MXP` - Mexican Silver Peso (1861–1992) +// * `MDC` - Moldovan Cupon +// * `MDL` - Moldovan Leu +// * `MCF` - Monegasque Franc +// * `MNT` - Mongolian Tugrik +// * `MAD` - Moroccan Dirham +// * `MAF` - Moroccan Franc +// * `MZE` - Mozambican Escudo +// * `MZN` - Mozambican Metical +// * `MZM` - Mozambican Metical (1980–2006) +// * `MMK` - Myanmar Kyat +// * `NAD` - Namibian Dollar +// * `NPR` - Nepalese Rupee +// * `ANG` - Netherlands Antillean Guilder +// * `TWD` - New Taiwan Dollar +// * `NZD` - New Zealand Dollar +// * `NIO` - Nicaraguan Córdoba +// * `NIC` - Nicaraguan Córdoba (1988–1991) +// * `NGN` - Nigerian Naira +// * `KPW` - North Korean Won +// * `NOK` - Norwegian Krone +// * `OMR` - Omani Rial +// * `PKR` - Pakistani Rupee +// * `XPD` - Palladium +// * `PAB` - Panamanian Balboa +// * `PGK` - Papua New Guinean Kina +// * `PYG` - Paraguayan Guarani +// * `PEI` - Peruvian Inti +// * `PEN` - Peruvian Sol +// * `PES` - Peruvian Sol (1863–1965) +// * `PHP` - Philippine Peso +// * `XPT` - Platinum +// * `PLN` - Polish Zloty +// * `PLZ` - Polish Zloty (1950–1995) +// * `PTE` - Portuguese Escudo +// * `GWE` - Portuguese Guinea Escudo +// * `QAR` - Qatari Rial +// * `XRE` - RINET Funds +// * `RHD` - Rhodesian Dollar +// * `RON` - Romanian Leu +// * `ROL` - Romanian Leu (1952–2006) +// * `RUB` - Russian Ruble +// * `RUR` - Russian Ruble (1991–1998) +// * `RWF` - Rwandan Franc +// * `SVC` - Salvadoran Colón +// * `WST` - Samoan Tala +// * `SAR` - Saudi Riyal +// * `RSD` - Serbian Dinar +// * `CSD` - Serbian Dinar (2002–2006) +// * `SCR` - Seychellois Rupee +// * `SLL` - Sierra Leonean Leone +// * `XAG` - Silver +// * `SGD` - Singapore Dollar +// * `SKK` - Slovak Koruna +// * `SIT` - Slovenian Tolar +// * `SBD` - Solomon Islands Dollar +// * `SOS` - Somali Shilling +// * `ZAR` - South African Rand +// * `ZAL` - South African Rand (financial) +// * `KRH` - South Korean Hwan (1953–1962) +// * `KRW` - South Korean Won +// * `KRO` - South Korean Won (1945–1953) +// * `SSP` - South Sudanese Pound +// * `SUR` - Soviet Rouble +// * `ESP` - Spanish Peseta +// * `ESA` - Spanish Peseta (A account) +// * `ESB` - Spanish Peseta (convertible account) +// * `XDR` - Special Drawing Rights +// * `LKR` - Sri Lankan Rupee +// * `SHP` - St. Helena Pound +// * `XSU` - Sucre +// * `SDD` - Sudanese Dinar (1992–2007) +// * `SDG` - Sudanese Pound +// * `SDP` - Sudanese Pound (1957–1998) +// * `SRD` - Surinamese Dollar +// * `SRG` - Surinamese Guilder +// * `SZL` - Swazi Lilangeni +// * `SEK` - Swedish Krona +// * `CHF` - Swiss Franc +// * `SYP` - Syrian Pound +// * `STN` - São Tomé & Príncipe Dobra +// * `STD` - São Tomé & Príncipe Dobra (1977–2017) +// * `TVD` - TVD +// * `TJR` - Tajikistani Ruble +// * `TJS` - Tajikistani Somoni +// * `TZS` - Tanzanian Shilling +// * `XTS` - Testing Currency Code +// * `THB` - Thai Baht +// * `XXX` - The codes assigned for transactions where no currency is involved +// * `TPE` - Timorese Escudo +// * `TOP` - Tongan Paʻanga +// * `TTD` - Trinidad & Tobago Dollar +// * `TND` - Tunisian Dinar +// * `TRY` - Turkish Lira +// * `TRL` - Turkish Lira (1922–2005) +// * `TMT` - Turkmenistani Manat +// * `TMM` - Turkmenistani Manat (1993–2009) +// * `USD` - US Dollar +// * `USN` - US Dollar (Next day) +// * `USS` - US Dollar (Same day) +// * `UGX` - Ugandan Shilling +// * `UGS` - Ugandan Shilling (1966–1987) +// * `UAH` - Ukrainian Hryvnia +// * `UAK` - Ukrainian Karbovanets +// * `AED` - United Arab Emirates Dirham +// * `UYW` - Uruguayan Nominal Wage Index Unit +// * `UYU` - Uruguayan Peso +// * `UYP` - Uruguayan Peso (1975–1993) +// * `UYI` - Uruguayan Peso (Indexed Units) +// * `UZS` - Uzbekistani Som +// * `VUV` - Vanuatu Vatu +// * `VES` - Venezuelan Bolívar +// * `VEB` - Venezuelan Bolívar (1871–2008) +// * `VEF` - Venezuelan Bolívar (2008–2018) +// * `VND` - Vietnamese Dong +// * `VNN` - Vietnamese Dong (1978–1985) +// * `CHE` - WIR Euro +// * `CHW` - WIR Franc +// * `XOF` - West African CFA Franc +// * `YDD` - Yemeni Dinar +// * `YER` - Yemeni Rial +// * `YUN` - Yugoslavian Convertible Dinar (1990–1992) +// * `YUD` - Yugoslavian Hard Dinar (1966–1990) +// * `YUM` - Yugoslavian New Dinar (1994–2002) +// * `YUR` - Yugoslavian Reformed Dinar (1992–1993) +// * `ZWN` - ZWN +// * `ZRN` - Zairean New Zaire (1993–1998) +// * `ZRZ` - Zairean Zaire (1971–1993) +// * `ZMW` - Zambian Kwacha +// * `ZMK` - Zambian Kwacha (1968–2012) +// * `ZWD` - Zimbabwean Dollar (1980–2008) +// * `ZWR` - Zimbabwean Dollar (2008) +// * `ZWL` - Zimbabwean Dollar (2009) +type InvoiceCurrency struct { TransactionCurrencyEnum TransactionCurrencyEnum String string + + typ string } -func NewJournalEntryRequestCurrencyFromTransactionCurrencyEnum(value TransactionCurrencyEnum) *JournalEntryRequestCurrency { - return &JournalEntryRequestCurrency{typeName: "transactionCurrencyEnum", TransactionCurrencyEnum: value} +func (i *InvoiceCurrency) GetTransactionCurrencyEnum() TransactionCurrencyEnum { + if i == nil { + return "" + } + return i.TransactionCurrencyEnum } -func NewJournalEntryRequestCurrencyFromString(value string) *JournalEntryRequestCurrency { - return &JournalEntryRequestCurrency{typeName: "string", String: value} +func (i *InvoiceCurrency) GetString() string { + if i == nil { + return "" + } + return i.String } -func (j *JournalEntryRequestCurrency) UnmarshalJSON(data []byte) error { +func (i *InvoiceCurrency) UnmarshalJSON(data []byte) error { var valueTransactionCurrencyEnum TransactionCurrencyEnum if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { - j.typeName = "transactionCurrencyEnum" - j.TransactionCurrencyEnum = valueTransactionCurrencyEnum + i.typ = "TransactionCurrencyEnum" + i.TransactionCurrencyEnum = valueTransactionCurrencyEnum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - j.typeName = "string" - j.String = valueString + i.typ = "String" + i.String = valueString return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, j) + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) } -func (j JournalEntryRequestCurrency) MarshalJSON() ([]byte, error) { - switch j.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "transactionCurrencyEnum": - return json.Marshal(j.TransactionCurrencyEnum) - case "string": - return json.Marshal(j.String) +func (i InvoiceCurrency) MarshalJSON() ([]byte, error) { + if i.typ == "TransactionCurrencyEnum" || i.TransactionCurrencyEnum != "" { + return json.Marshal(i.TransactionCurrencyEnum) + } + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) } -type JournalEntryRequestCurrencyVisitor interface { +type InvoiceCurrencyVisitor interface { VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error VisitString(string) error } -func (j *JournalEntryRequestCurrency) Accept(visitor JournalEntryRequestCurrencyVisitor) error { - switch j.typeName { - default: - return fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "transactionCurrencyEnum": - return visitor.VisitTransactionCurrencyEnum(j.TransactionCurrencyEnum) - case "string": - return visitor.VisitString(j.String) +func (i *InvoiceCurrency) Accept(visitor InvoiceCurrencyVisitor) error { + if i.typ == "TransactionCurrencyEnum" || i.TransactionCurrencyEnum != "" { + return visitor.VisitTransactionCurrencyEnum(i.TransactionCurrencyEnum) } + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", i) } -type JournalEntryRequestPaymentsItem struct { - typeName string +// The employee this overall transaction relates to. +type InvoiceEmployee struct { String string - Payment *Payment + Employee *Employee + + typ string } -func NewJournalEntryRequestPaymentsItemFromString(value string) *JournalEntryRequestPaymentsItem { - return &JournalEntryRequestPaymentsItem{typeName: "string", String: value} +func (i *InvoiceEmployee) GetString() string { + if i == nil { + return "" + } + return i.String } -func NewJournalEntryRequestPaymentsItemFromPayment(value *Payment) *JournalEntryRequestPaymentsItem { - return &JournalEntryRequestPaymentsItem{typeName: "payment", Payment: value} +func (i *InvoiceEmployee) GetEmployee() *Employee { + if i == nil { + return nil + } + return i.Employee } -func (j *JournalEntryRequestPaymentsItem) UnmarshalJSON(data []byte) error { +func (i *InvoiceEmployee) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - j.typeName = "string" - j.String = valueString + i.typ = "String" + i.String = valueString return nil } - valuePayment := new(Payment) - if err := json.Unmarshal(data, &valuePayment); err == nil { - j.typeName = "payment" - j.Payment = valuePayment + valueEmployee := new(Employee) + if err := json.Unmarshal(data, &valueEmployee); err == nil { + i.typ = "Employee" + i.Employee = valueEmployee return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, j) + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) } -func (j JournalEntryRequestPaymentsItem) MarshalJSON() ([]byte, error) { - switch j.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "string": - return json.Marshal(j.String) - case "payment": - return json.Marshal(j.Payment) +func (i InvoiceEmployee) MarshalJSON() ([]byte, error) { + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) } + if i.typ == "Employee" || i.Employee != nil { + return json.Marshal(i.Employee) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) } -type JournalEntryRequestPaymentsItemVisitor interface { +type InvoiceEmployeeVisitor interface { VisitString(string) error - VisitPayment(*Payment) error + VisitEmployee(*Employee) error } -func (j *JournalEntryRequestPaymentsItem) Accept(visitor JournalEntryRequestPaymentsItemVisitor) error { - switch j.typeName { - default: - return fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "string": - return visitor.VisitString(j.String) - case "payment": - return visitor.VisitPayment(j.Payment) +func (i *InvoiceEmployee) Accept(visitor InvoiceEmployeeVisitor) error { + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) } + if i.typ == "Employee" || i.Employee != nil { + return visitor.VisitEmployee(i.Employee) + } + return fmt.Errorf("type %T does not include a non-empty union type", i) } -// The journal's posting status. +// # The InvoiceLineItem Object +// ### Description +// The `InvoiceLineItem` object represents an itemized record of goods and/or services sold to a customer. // -// - `UNPOSTED` - UNPOSTED -// - `POSTED` - POSTED -type JournalEntryRequestPostingStatus struct { - typeName string - PostingStatusEnum PostingStatusEnum - String string +// ### Usage Example +// Fetch from the `GET Invoice` endpoint and view the invoice's line items. +type InvoiceLineItem struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The line item's description. + Description *string `json:"description,omitempty" url:"description,omitempty"` + // The line item's unit price. + UnitPrice *float64 `json:"unit_price,omitempty" url:"unit_price,omitempty"` + // The line item's quantity. + Quantity *float64 `json:"quantity,omitempty" url:"quantity,omitempty"` + // The line item's total amount. + TotalAmount *float64 `json:"total_amount,omitempty" url:"total_amount,omitempty"` + // The employee this overall transaction relates to. + Employee *InvoiceLineItemEmployee `json:"employee,omitempty" url:"employee,omitempty"` + Project *InvoiceLineItemProject `json:"project,omitempty" url:"project,omitempty"` + // The invoice's contact. + Contact *InvoiceLineItemContact `json:"contact,omitempty" url:"contact,omitempty"` + // The line item's currency. + // + // * `XUA` - ADB Unit of Account + // * `AFN` - Afghan Afghani + // * `AFA` - Afghan Afghani (1927–2002) + // * `ALL` - Albanian Lek + // * `ALK` - Albanian Lek (1946–1965) + // * `DZD` - Algerian Dinar + // * `ADP` - Andorran Peseta + // * `AOA` - Angolan Kwanza + // * `AOK` - Angolan Kwanza (1977–1991) + // * `AON` - Angolan New Kwanza (1990–2000) + // * `AOR` - Angolan Readjusted Kwanza (1995–1999) + // * `ARA` - Argentine Austral + // * `ARS` - Argentine Peso + // * `ARM` - Argentine Peso (1881–1970) + // * `ARP` - Argentine Peso (1983–1985) + // * `ARL` - Argentine Peso Ley (1970–1983) + // * `AMD` - Armenian Dram + // * `AWG` - Aruban Florin + // * `AUD` - Australian Dollar + // * `ATS` - Austrian Schilling + // * `AZN` - Azerbaijani Manat + // * `AZM` - Azerbaijani Manat (1993–2006) + // * `BSD` - Bahamian Dollar + // * `BHD` - Bahraini Dinar + // * `BDT` - Bangladeshi Taka + // * `BBD` - Barbadian Dollar + // * `BYN` - Belarusian Ruble + // * `BYB` - Belarusian Ruble (1994–1999) + // * `BYR` - Belarusian Ruble (2000–2016) + // * `BEF` - Belgian Franc + // * `BEC` - Belgian Franc (convertible) + // * `BEL` - Belgian Franc (financial) + // * `BZD` - Belize Dollar + // * `BMD` - Bermudan Dollar + // * `BTN` - Bhutanese Ngultrum + // * `BOB` - Bolivian Boliviano + // * `BOL` - Bolivian Boliviano (1863–1963) + // * `BOV` - Bolivian Mvdol + // * `BOP` - Bolivian Peso + // * `BAM` - Bosnia-Herzegovina Convertible Mark + // * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + // * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + // * `BWP` - Botswanan Pula + // * `BRC` - Brazilian Cruzado (1986–1989) + // * `BRZ` - Brazilian Cruzeiro (1942–1967) + // * `BRE` - Brazilian Cruzeiro (1990–1993) + // * `BRR` - Brazilian Cruzeiro (1993–1994) + // * `BRN` - Brazilian New Cruzado (1989–1990) + // * `BRB` - Brazilian New Cruzeiro (1967–1986) + // * `BRL` - Brazilian Real + // * `GBP` - British Pound + // * `BND` - Brunei Dollar + // * `BGL` - Bulgarian Hard Lev + // * `BGN` - Bulgarian Lev + // * `BGO` - Bulgarian Lev (1879–1952) + // * `BGM` - Bulgarian Socialist Lev + // * `BUK` - Burmese Kyat + // * `BIF` - Burundian Franc + // * `XPF` - CFP Franc + // * `KHR` - Cambodian Riel + // * `CAD` - Canadian Dollar + // * `CVE` - Cape Verdean Escudo + // * `KYD` - Cayman Islands Dollar + // * `XAF` - Central African CFA Franc + // * `CLE` - Chilean Escudo + // * `CLP` - Chilean Peso + // * `CLF` - Chilean Unit of Account (UF) + // * `CNX` - Chinese People’s Bank Dollar + // * `CNY` - Chinese Yuan + // * `CNH` - Chinese Yuan (offshore) + // * `COP` - Colombian Peso + // * `COU` - Colombian Real Value Unit + // * `KMF` - Comorian Franc + // * `CDF` - Congolese Franc + // * `CRC` - Costa Rican Colón + // * `HRD` - Croatian Dinar + // * `HRK` - Croatian Kuna + // * `CUC` - Cuban Convertible Peso + // * `CUP` - Cuban Peso + // * `CYP` - Cypriot Pound + // * `CZK` - Czech Koruna + // * `CSK` - Czechoslovak Hard Koruna + // * `DKK` - Danish Krone + // * `DJF` - Djiboutian Franc + // * `DOP` - Dominican Peso + // * `NLG` - Dutch Guilder + // * `XCD` - East Caribbean Dollar + // * `DDM` - East German Mark + // * `ECS` - Ecuadorian Sucre + // * `ECV` - Ecuadorian Unit of Constant Value + // * `EGP` - Egyptian Pound + // * `GQE` - Equatorial Guinean Ekwele + // * `ERN` - Eritrean Nakfa + // * `EEK` - Estonian Kroon + // * `ETB` - Ethiopian Birr + // * `EUR` - Euro + // * `XBA` - European Composite Unit + // * `XEU` - European Currency Unit + // * `XBB` - European Monetary Unit + // * `XBC` - European Unit of Account (XBC) + // * `XBD` - European Unit of Account (XBD) + // * `FKP` - Falkland Islands Pound + // * `FJD` - Fijian Dollar + // * `FIM` - Finnish Markka + // * `FRF` - French Franc + // * `XFO` - French Gold Franc + // * `XFU` - French UIC-Franc + // * `GMD` - Gambian Dalasi + // * `GEK` - Georgian Kupon Larit + // * `GEL` - Georgian Lari + // * `DEM` - German Mark + // * `GHS` - Ghanaian Cedi + // * `GHC` - Ghanaian Cedi (1979–2007) + // * `GIP` - Gibraltar Pound + // * `XAU` - Gold + // * `GRD` - Greek Drachma + // * `GTQ` - Guatemalan Quetzal + // * `GWP` - Guinea-Bissau Peso + // * `GNF` - Guinean Franc + // * `GNS` - Guinean Syli + // * `GYD` - Guyanaese Dollar + // * `HTG` - Haitian Gourde + // * `HNL` - Honduran Lempira + // * `HKD` - Hong Kong Dollar + // * `HUF` - Hungarian Forint + // * `IMP` - IMP + // * `ISK` - Icelandic Króna + // * `ISJ` - Icelandic Króna (1918–1981) + // * `INR` - Indian Rupee + // * `IDR` - Indonesian Rupiah + // * `IRR` - Iranian Rial + // * `IQD` - Iraqi Dinar + // * `IEP` - Irish Pound + // * `ILS` - Israeli New Shekel + // * `ILP` - Israeli Pound + // * `ILR` - Israeli Shekel (1980–1985) + // * `ITL` - Italian Lira + // * `JMD` - Jamaican Dollar + // * `JPY` - Japanese Yen + // * `JOD` - Jordanian Dinar + // * `KZT` - Kazakhstani Tenge + // * `KES` - Kenyan Shilling + // * `KWD` - Kuwaiti Dinar + // * `KGS` - Kyrgystani Som + // * `LAK` - Laotian Kip + // * `LVL` - Latvian Lats + // * `LVR` - Latvian Ruble + // * `LBP` - Lebanese Pound + // * `LSL` - Lesotho Loti + // * `LRD` - Liberian Dollar + // * `LYD` - Libyan Dinar + // * `LTL` - Lithuanian Litas + // * `LTT` - Lithuanian Talonas + // * `LUL` - Luxembourg Financial Franc + // * `LUC` - Luxembourgian Convertible Franc + // * `LUF` - Luxembourgian Franc + // * `MOP` - Macanese Pataca + // * `MKD` - Macedonian Denar + // * `MKN` - Macedonian Denar (1992–1993) + // * `MGA` - Malagasy Ariary + // * `MGF` - Malagasy Franc + // * `MWK` - Malawian Kwacha + // * `MYR` - Malaysian Ringgit + // * `MVR` - Maldivian Rufiyaa + // * `MVP` - Maldivian Rupee (1947–1981) + // * `MLF` - Malian Franc + // * `MTL` - Maltese Lira + // * `MTP` - Maltese Pound + // * `MRU` - Mauritanian Ouguiya + // * `MRO` - Mauritanian Ouguiya (1973–2017) + // * `MUR` - Mauritian Rupee + // * `MXV` - Mexican Investment Unit + // * `MXN` - Mexican Peso + // * `MXP` - Mexican Silver Peso (1861–1992) + // * `MDC` - Moldovan Cupon + // * `MDL` - Moldovan Leu + // * `MCF` - Monegasque Franc + // * `MNT` - Mongolian Tugrik + // * `MAD` - Moroccan Dirham + // * `MAF` - Moroccan Franc + // * `MZE` - Mozambican Escudo + // * `MZN` - Mozambican Metical + // * `MZM` - Mozambican Metical (1980–2006) + // * `MMK` - Myanmar Kyat + // * `NAD` - Namibian Dollar + // * `NPR` - Nepalese Rupee + // * `ANG` - Netherlands Antillean Guilder + // * `TWD` - New Taiwan Dollar + // * `NZD` - New Zealand Dollar + // * `NIO` - Nicaraguan Córdoba + // * `NIC` - Nicaraguan Córdoba (1988–1991) + // * `NGN` - Nigerian Naira + // * `KPW` - North Korean Won + // * `NOK` - Norwegian Krone + // * `OMR` - Omani Rial + // * `PKR` - Pakistani Rupee + // * `XPD` - Palladium + // * `PAB` - Panamanian Balboa + // * `PGK` - Papua New Guinean Kina + // * `PYG` - Paraguayan Guarani + // * `PEI` - Peruvian Inti + // * `PEN` - Peruvian Sol + // * `PES` - Peruvian Sol (1863–1965) + // * `PHP` - Philippine Peso + // * `XPT` - Platinum + // * `PLN` - Polish Zloty + // * `PLZ` - Polish Zloty (1950–1995) + // * `PTE` - Portuguese Escudo + // * `GWE` - Portuguese Guinea Escudo + // * `QAR` - Qatari Rial + // * `XRE` - RINET Funds + // * `RHD` - Rhodesian Dollar + // * `RON` - Romanian Leu + // * `ROL` - Romanian Leu (1952–2006) + // * `RUB` - Russian Ruble + // * `RUR` - Russian Ruble (1991–1998) + // * `RWF` - Rwandan Franc + // * `SVC` - Salvadoran Colón + // * `WST` - Samoan Tala + // * `SAR` - Saudi Riyal + // * `RSD` - Serbian Dinar + // * `CSD` - Serbian Dinar (2002–2006) + // * `SCR` - Seychellois Rupee + // * `SLL` - Sierra Leonean Leone + // * `XAG` - Silver + // * `SGD` - Singapore Dollar + // * `SKK` - Slovak Koruna + // * `SIT` - Slovenian Tolar + // * `SBD` - Solomon Islands Dollar + // * `SOS` - Somali Shilling + // * `ZAR` - South African Rand + // * `ZAL` - South African Rand (financial) + // * `KRH` - South Korean Hwan (1953–1962) + // * `KRW` - South Korean Won + // * `KRO` - South Korean Won (1945–1953) + // * `SSP` - South Sudanese Pound + // * `SUR` - Soviet Rouble + // * `ESP` - Spanish Peseta + // * `ESA` - Spanish Peseta (A account) + // * `ESB` - Spanish Peseta (convertible account) + // * `XDR` - Special Drawing Rights + // * `LKR` - Sri Lankan Rupee + // * `SHP` - St. Helena Pound + // * `XSU` - Sucre + // * `SDD` - Sudanese Dinar (1992–2007) + // * `SDG` - Sudanese Pound + // * `SDP` - Sudanese Pound (1957–1998) + // * `SRD` - Surinamese Dollar + // * `SRG` - Surinamese Guilder + // * `SZL` - Swazi Lilangeni + // * `SEK` - Swedish Krona + // * `CHF` - Swiss Franc + // * `SYP` - Syrian Pound + // * `STN` - São Tomé & Príncipe Dobra + // * `STD` - São Tomé & Príncipe Dobra (1977–2017) + // * `TVD` - TVD + // * `TJR` - Tajikistani Ruble + // * `TJS` - Tajikistani Somoni + // * `TZS` - Tanzanian Shilling + // * `XTS` - Testing Currency Code + // * `THB` - Thai Baht + // * `XXX` - The codes assigned for transactions where no currency is involved + // * `TPE` - Timorese Escudo + // * `TOP` - Tongan Paʻanga + // * `TTD` - Trinidad & Tobago Dollar + // * `TND` - Tunisian Dinar + // * `TRY` - Turkish Lira + // * `TRL` - Turkish Lira (1922–2005) + // * `TMT` - Turkmenistani Manat + // * `TMM` - Turkmenistani Manat (1993–2009) + // * `USD` - US Dollar + // * `USN` - US Dollar (Next day) + // * `USS` - US Dollar (Same day) + // * `UGX` - Ugandan Shilling + // * `UGS` - Ugandan Shilling (1966–1987) + // * `UAH` - Ukrainian Hryvnia + // * `UAK` - Ukrainian Karbovanets + // * `AED` - United Arab Emirates Dirham + // * `UYW` - Uruguayan Nominal Wage Index Unit + // * `UYU` - Uruguayan Peso + // * `UYP` - Uruguayan Peso (1975–1993) + // * `UYI` - Uruguayan Peso (Indexed Units) + // * `UZS` - Uzbekistani Som + // * `VUV` - Vanuatu Vatu + // * `VES` - Venezuelan Bolívar + // * `VEB` - Venezuelan Bolívar (1871–2008) + // * `VEF` - Venezuelan Bolívar (2008–2018) + // * `VND` - Vietnamese Dong + // * `VNN` - Vietnamese Dong (1978–1985) + // * `CHE` - WIR Euro + // * `CHW` - WIR Franc + // * `XOF` - West African CFA Franc + // * `YDD` - Yemeni Dinar + // * `YER` - Yemeni Rial + // * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + // * `YUD` - Yugoslavian Hard Dinar (1966–1990) + // * `YUM` - Yugoslavian New Dinar (1994–2002) + // * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + // * `ZWN` - ZWN + // * `ZRN` - Zairean New Zaire (1993–1998) + // * `ZRZ` - Zairean Zaire (1971–1993) + // * `ZMW` - Zambian Kwacha + // * `ZMK` - Zambian Kwacha (1968–2012) + // * `ZWD` - Zimbabwean Dollar (1980–2008) + // * `ZWR` - Zimbabwean Dollar (2008) + // * `ZWL` - Zimbabwean Dollar (2009) + Currency *InvoiceLineItemCurrency `json:"currency,omitempty" url:"currency,omitempty"` + // The line item's exchange rate. + ExchangeRate *string `json:"exchange_rate,omitempty" url:"exchange_rate,omitempty"` + Item *InvoiceLineItemItem `json:"item,omitempty" url:"item,omitempty"` + Account *InvoiceLineItemAccount `json:"account,omitempty" url:"account,omitempty"` + // The tax rate that applies to this line item. + TaxRate *string `json:"tax_rate,omitempty" url:"tax_rate,omitempty"` + TrackingCategory *InvoiceLineItemTrackingCategory `json:"tracking_category,omitempty" url:"tracking_category,omitempty"` + // The invoice line item's associated tracking categories. + TrackingCategories []*InvoiceLineItemTrackingCategoriesItem `json:"tracking_categories,omitempty" url:"tracking_categories,omitempty"` + // The company the invoice belongs to. + Company *string `json:"company,omitempty" url:"company,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteFields []*RemoteField `json:"remote_fields,omitempty" url:"remote_fields,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func NewJournalEntryRequestPostingStatusFromPostingStatusEnum(value PostingStatusEnum) *JournalEntryRequestPostingStatus { - return &JournalEntryRequestPostingStatus{typeName: "postingStatusEnum", PostingStatusEnum: value} +func (i *InvoiceLineItem) GetId() *string { + if i == nil { + return nil + } + return i.Id } -func NewJournalEntryRequestPostingStatusFromString(value string) *JournalEntryRequestPostingStatus { - return &JournalEntryRequestPostingStatus{typeName: "string", String: value} +func (i *InvoiceLineItem) GetRemoteId() *string { + if i == nil { + return nil + } + return i.RemoteId } -func (j *JournalEntryRequestPostingStatus) UnmarshalJSON(data []byte) error { - var valuePostingStatusEnum PostingStatusEnum - if err := json.Unmarshal(data, &valuePostingStatusEnum); err == nil { - j.typeName = "postingStatusEnum" - j.PostingStatusEnum = valuePostingStatusEnum +func (i *InvoiceLineItem) GetCreatedAt() *time.Time { + if i == nil { return nil } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - j.typeName = "string" - j.String = valueString + return i.CreatedAt +} + +func (i *InvoiceLineItem) GetModifiedAt() *time.Time { + if i == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, j) + return i.ModifiedAt } -func (j JournalEntryRequestPostingStatus) MarshalJSON() ([]byte, error) { - switch j.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "postingStatusEnum": - return json.Marshal(j.PostingStatusEnum) - case "string": - return json.Marshal(j.String) +func (i *InvoiceLineItem) GetDescription() *string { + if i == nil { + return nil } + return i.Description } -type JournalEntryRequestPostingStatusVisitor interface { - VisitPostingStatusEnum(PostingStatusEnum) error - VisitString(string) error +func (i *InvoiceLineItem) GetUnitPrice() *float64 { + if i == nil { + return nil + } + return i.UnitPrice } -func (j *JournalEntryRequestPostingStatus) Accept(visitor JournalEntryRequestPostingStatusVisitor) error { - switch j.typeName { - default: - return fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "postingStatusEnum": - return visitor.VisitPostingStatusEnum(j.PostingStatusEnum) - case "string": - return visitor.VisitString(j.String) +func (i *InvoiceLineItem) GetQuantity() *float64 { + if i == nil { + return nil } + return i.Quantity } -type JournalEntryRequestTrackingCategoriesItem struct { - typeName string - String string - TrackingCategory *TrackingCategory +func (i *InvoiceLineItem) GetTotalAmount() *float64 { + if i == nil { + return nil + } + return i.TotalAmount } -func NewJournalEntryRequestTrackingCategoriesItemFromString(value string) *JournalEntryRequestTrackingCategoriesItem { - return &JournalEntryRequestTrackingCategoriesItem{typeName: "string", String: value} +func (i *InvoiceLineItem) GetEmployee() *InvoiceLineItemEmployee { + if i == nil { + return nil + } + return i.Employee } -func NewJournalEntryRequestTrackingCategoriesItemFromTrackingCategory(value *TrackingCategory) *JournalEntryRequestTrackingCategoriesItem { - return &JournalEntryRequestTrackingCategoriesItem{typeName: "trackingCategory", TrackingCategory: value} +func (i *InvoiceLineItem) GetProject() *InvoiceLineItemProject { + if i == nil { + return nil + } + return i.Project } -func (j *JournalEntryRequestTrackingCategoriesItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - j.typeName = "string" - j.String = valueString +func (i *InvoiceLineItem) GetContact() *InvoiceLineItemContact { + if i == nil { return nil } - valueTrackingCategory := new(TrackingCategory) - if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { - j.typeName = "trackingCategory" - j.TrackingCategory = valueTrackingCategory + return i.Contact +} + +func (i *InvoiceLineItem) GetCurrency() *InvoiceLineItemCurrency { + if i == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, j) + return i.Currency } -func (j JournalEntryRequestTrackingCategoriesItem) MarshalJSON() ([]byte, error) { - switch j.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "string": - return json.Marshal(j.String) - case "trackingCategory": - return json.Marshal(j.TrackingCategory) +func (i *InvoiceLineItem) GetExchangeRate() *string { + if i == nil { + return nil } + return i.ExchangeRate } -type JournalEntryRequestTrackingCategoriesItemVisitor interface { - VisitString(string) error - VisitTrackingCategory(*TrackingCategory) error +func (i *InvoiceLineItem) GetItem() *InvoiceLineItemItem { + if i == nil { + return nil + } + return i.Item } -func (j *JournalEntryRequestTrackingCategoriesItem) Accept(visitor JournalEntryRequestTrackingCategoriesItemVisitor) error { - switch j.typeName { - default: - return fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "string": - return visitor.VisitString(j.String) - case "trackingCategory": - return visitor.VisitTrackingCategory(j.TrackingCategory) +func (i *InvoiceLineItem) GetAccount() *InvoiceLineItemAccount { + if i == nil { + return nil + } + return i.Account +} + +func (i *InvoiceLineItem) GetTaxRate() *string { + if i == nil { + return nil + } + return i.TaxRate +} + +func (i *InvoiceLineItem) GetTrackingCategory() *InvoiceLineItemTrackingCategory { + if i == nil { + return nil + } + return i.TrackingCategory +} + +func (i *InvoiceLineItem) GetTrackingCategories() []*InvoiceLineItemTrackingCategoriesItem { + if i == nil { + return nil } + return i.TrackingCategories } -type JournalEntryResponse struct { - Model *JournalEntry `json:"model,omitempty"` - Warnings []*WarningValidationProblem `json:"warnings,omitempty"` - Errors []*ErrorValidationProblem `json:"errors,omitempty"` - Logs []*DebugModeLog `json:"logs,omitempty"` +func (i *InvoiceLineItem) GetCompany() *string { + if i == nil { + return nil + } + return i.Company +} - _rawJSON json.RawMessage +func (i *InvoiceLineItem) GetRemoteWasDeleted() *bool { + if i == nil { + return nil + } + return i.RemoteWasDeleted } -func (j *JournalEntryResponse) UnmarshalJSON(data []byte) error { - type unmarshaler JournalEntryResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { +func (i *InvoiceLineItem) GetFieldMappings() map[string]interface{} { + if i == nil { + return nil + } + return i.FieldMappings +} + +func (i *InvoiceLineItem) GetRemoteFields() []*RemoteField { + if i == nil { + return nil + } + return i.RemoteFields +} + +func (i *InvoiceLineItem) GetExtraProperties() map[string]interface{} { + return i.extraProperties +} + +func (i *InvoiceLineItem) UnmarshalJSON(data []byte) error { + type embed InvoiceLineItem + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*i), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *i = InvoiceLineItem(unmarshaler.embed) + i.CreatedAt = unmarshaler.CreatedAt.TimePtr() + i.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *i) + if err != nil { return err } - *j = JournalEntryResponse(value) - j._rawJSON = json.RawMessage(data) + i.extraProperties = extraProperties + i.rawJSON = json.RawMessage(data) return nil } -func (j *JournalEntryResponse) String() string { - if len(j._rawJSON) > 0 { - if value, err := core.StringifyJSON(j._rawJSON); err == nil { +func (i *InvoiceLineItem) MarshalJSON() ([]byte, error) { + type embed InvoiceLineItem + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*i), + CreatedAt: internal.NewOptionalDateTime(i.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(i.ModifiedAt), + } + return json.Marshal(marshaler) +} + +func (i *InvoiceLineItem) String() string { + if len(i.rawJSON) > 0 { + if value, err := internal.StringifyJSON(i.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(j); err == nil { + if value, err := internal.StringifyJSON(i); err == nil { return value } - return fmt.Sprintf("%#v", j) + return fmt.Sprintf("%#v", i) } -type JournalEntryTrackingCategoriesItem struct { - typeName string - String string - TrackingCategory *TrackingCategory +type InvoiceLineItemAccount struct { + String string + Account *Account + + typ string } -func NewJournalEntryTrackingCategoriesItemFromString(value string) *JournalEntryTrackingCategoriesItem { - return &JournalEntryTrackingCategoriesItem{typeName: "string", String: value} +func (i *InvoiceLineItemAccount) GetString() string { + if i == nil { + return "" + } + return i.String } -func NewJournalEntryTrackingCategoriesItemFromTrackingCategory(value *TrackingCategory) *JournalEntryTrackingCategoriesItem { - return &JournalEntryTrackingCategoriesItem{typeName: "trackingCategory", TrackingCategory: value} +func (i *InvoiceLineItemAccount) GetAccount() *Account { + if i == nil { + return nil + } + return i.Account } -func (j *JournalEntryTrackingCategoriesItem) UnmarshalJSON(data []byte) error { +func (i *InvoiceLineItemAccount) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - j.typeName = "string" - j.String = valueString + i.typ = "String" + i.String = valueString return nil } - valueTrackingCategory := new(TrackingCategory) - if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { - j.typeName = "trackingCategory" - j.TrackingCategory = valueTrackingCategory + valueAccount := new(Account) + if err := json.Unmarshal(data, &valueAccount); err == nil { + i.typ = "Account" + i.Account = valueAccount return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, j) + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) } -func (j JournalEntryTrackingCategoriesItem) MarshalJSON() ([]byte, error) { - switch j.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "string": - return json.Marshal(j.String) - case "trackingCategory": - return json.Marshal(j.TrackingCategory) +func (i InvoiceLineItemAccount) MarshalJSON() ([]byte, error) { + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) + } + if i.typ == "Account" || i.Account != nil { + return json.Marshal(i.Account) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) } -type JournalEntryTrackingCategoriesItemVisitor interface { +type InvoiceLineItemAccountVisitor interface { VisitString(string) error - VisitTrackingCategory(*TrackingCategory) error + VisitAccount(*Account) error } -func (j *JournalEntryTrackingCategoriesItem) Accept(visitor JournalEntryTrackingCategoriesItemVisitor) error { - switch j.typeName { - default: - return fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "string": - return visitor.VisitString(j.String) - case "trackingCategory": - return visitor.VisitTrackingCategory(j.TrackingCategory) +func (i *InvoiceLineItemAccount) Accept(visitor InvoiceLineItemAccountVisitor) error { + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) + } + if i.typ == "Account" || i.Account != nil { + return visitor.VisitAccount(i.Account) } + return fmt.Errorf("type %T does not include a non-empty union type", i) } -// # The JournalLine Object -// -// ### Description -// -// The `JournalLine` object is used to represent a journal entry's line items. -// -// ### Usage Example -// -// Fetch from the `GET JournalEntry` endpoint and view the journal entry's line items. -type JournalLine struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - Account *JournalLineAccount `json:"account,omitempty"` - // The value of the line item including taxes and other fees. - NetAmount *float64 `json:"net_amount,omitempty"` - TrackingCategory *JournalLineTrackingCategory `json:"tracking_category,omitempty"` - // The journal line item's associated tracking categories. - TrackingCategories []*JournalLineTrackingCategoriesItem `json:"tracking_categories,omitempty"` - // The journal line item's currency. - // - // - `XUA` - ADB Unit of Account - // - `AFN` - Afghan Afghani - // - `AFA` - Afghan Afghani (1927–2002) - // - `ALL` - Albanian Lek - // - `ALK` - Albanian Lek (1946–1965) - // - `DZD` - Algerian Dinar - // - `ADP` - Andorran Peseta - // - `AOA` - Angolan Kwanza - // - `AOK` - Angolan Kwanza (1977–1991) - // - `AON` - Angolan New Kwanza (1990–2000) - // - `AOR` - Angolan Readjusted Kwanza (1995–1999) - // - `ARA` - Argentine Austral - // - `ARS` - Argentine Peso - // - `ARM` - Argentine Peso (1881–1970) - // - `ARP` - Argentine Peso (1983–1985) - // - `ARL` - Argentine Peso Ley (1970–1983) - // - `AMD` - Armenian Dram - // - `AWG` - Aruban Florin - // - `AUD` - Australian Dollar - // - `ATS` - Austrian Schilling - // - `AZN` - Azerbaijani Manat - // - `AZM` - Azerbaijani Manat (1993–2006) - // - `BSD` - Bahamian Dollar - // - `BHD` - Bahraini Dinar - // - `BDT` - Bangladeshi Taka - // - `BBD` - Barbadian Dollar - // - `BYN` - Belarusian Ruble - // - `BYB` - Belarusian Ruble (1994–1999) - // - `BYR` - Belarusian Ruble (2000–2016) - // - `BEF` - Belgian Franc - // - `BEC` - Belgian Franc (convertible) - // - `BEL` - Belgian Franc (financial) - // - `BZD` - Belize Dollar - // - `BMD` - Bermudan Dollar - // - `BTN` - Bhutanese Ngultrum - // - `BOB` - Bolivian Boliviano - // - `BOL` - Bolivian Boliviano (1863–1963) - // - `BOV` - Bolivian Mvdol - // - `BOP` - Bolivian Peso - // - `BAM` - Bosnia-Herzegovina Convertible Mark - // - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - // - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - // - `BWP` - Botswanan Pula - // - `BRC` - Brazilian Cruzado (1986–1989) - // - `BRZ` - Brazilian Cruzeiro (1942–1967) - // - `BRE` - Brazilian Cruzeiro (1990–1993) - // - `BRR` - Brazilian Cruzeiro (1993–1994) - // - `BRN` - Brazilian New Cruzado (1989–1990) - // - `BRB` - Brazilian New Cruzeiro (1967–1986) - // - `BRL` - Brazilian Real - // - `GBP` - British Pound - // - `BND` - Brunei Dollar - // - `BGL` - Bulgarian Hard Lev - // - `BGN` - Bulgarian Lev - // - `BGO` - Bulgarian Lev (1879–1952) - // - `BGM` - Bulgarian Socialist Lev - // - `BUK` - Burmese Kyat - // - `BIF` - Burundian Franc - // - `XPF` - CFP Franc - // - `KHR` - Cambodian Riel - // - `CAD` - Canadian Dollar - // - `CVE` - Cape Verdean Escudo - // - `KYD` - Cayman Islands Dollar - // - `XAF` - Central African CFA Franc - // - `CLE` - Chilean Escudo - // - `CLP` - Chilean Peso - // - `CLF` - Chilean Unit of Account (UF) - // - `CNX` - Chinese People’s Bank Dollar - // - `CNY` - Chinese Yuan - // - `CNH` - Chinese Yuan (offshore) - // - `COP` - Colombian Peso - // - `COU` - Colombian Real Value Unit - // - `KMF` - Comorian Franc - // - `CDF` - Congolese Franc - // - `CRC` - Costa Rican Colón - // - `HRD` - Croatian Dinar - // - `HRK` - Croatian Kuna - // - `CUC` - Cuban Convertible Peso - // - `CUP` - Cuban Peso - // - `CYP` - Cypriot Pound - // - `CZK` - Czech Koruna - // - `CSK` - Czechoslovak Hard Koruna - // - `DKK` - Danish Krone - // - `DJF` - Djiboutian Franc - // - `DOP` - Dominican Peso - // - `NLG` - Dutch Guilder - // - `XCD` - East Caribbean Dollar - // - `DDM` - East German Mark - // - `ECS` - Ecuadorian Sucre - // - `ECV` - Ecuadorian Unit of Constant Value - // - `EGP` - Egyptian Pound - // - `GQE` - Equatorial Guinean Ekwele - // - `ERN` - Eritrean Nakfa - // - `EEK` - Estonian Kroon - // - `ETB` - Ethiopian Birr - // - `EUR` - Euro - // - `XBA` - European Composite Unit - // - `XEU` - European Currency Unit - // - `XBB` - European Monetary Unit - // - `XBC` - European Unit of Account (XBC) - // - `XBD` - European Unit of Account (XBD) - // - `FKP` - Falkland Islands Pound - // - `FJD` - Fijian Dollar - // - `FIM` - Finnish Markka - // - `FRF` - French Franc - // - `XFO` - French Gold Franc - // - `XFU` - French UIC-Franc - // - `GMD` - Gambian Dalasi - // - `GEK` - Georgian Kupon Larit - // - `GEL` - Georgian Lari - // - `DEM` - German Mark - // - `GHS` - Ghanaian Cedi - // - `GHC` - Ghanaian Cedi (1979–2007) - // - `GIP` - Gibraltar Pound - // - `XAU` - Gold - // - `GRD` - Greek Drachma - // - `GTQ` - Guatemalan Quetzal - // - `GWP` - Guinea-Bissau Peso - // - `GNF` - Guinean Franc - // - `GNS` - Guinean Syli - // - `GYD` - Guyanaese Dollar - // - `HTG` - Haitian Gourde - // - `HNL` - Honduran Lempira - // - `HKD` - Hong Kong Dollar - // - `HUF` - Hungarian Forint - // - `IMP` - IMP - // - `ISK` - Icelandic Króna - // - `ISJ` - Icelandic Króna (1918–1981) - // - `INR` - Indian Rupee - // - `IDR` - Indonesian Rupiah - // - `IRR` - Iranian Rial - // - `IQD` - Iraqi Dinar - // - `IEP` - Irish Pound - // - `ILS` - Israeli New Shekel - // - `ILP` - Israeli Pound - // - `ILR` - Israeli Shekel (1980–1985) - // - `ITL` - Italian Lira - // - `JMD` - Jamaican Dollar - // - `JPY` - Japanese Yen - // - `JOD` - Jordanian Dinar - // - `KZT` - Kazakhstani Tenge - // - `KES` - Kenyan Shilling - // - `KWD` - Kuwaiti Dinar - // - `KGS` - Kyrgystani Som - // - `LAK` - Laotian Kip - // - `LVL` - Latvian Lats - // - `LVR` - Latvian Ruble - // - `LBP` - Lebanese Pound - // - `LSL` - Lesotho Loti - // - `LRD` - Liberian Dollar - // - `LYD` - Libyan Dinar - // - `LTL` - Lithuanian Litas - // - `LTT` - Lithuanian Talonas - // - `LUL` - Luxembourg Financial Franc - // - `LUC` - Luxembourgian Convertible Franc - // - `LUF` - Luxembourgian Franc - // - `MOP` - Macanese Pataca - // - `MKD` - Macedonian Denar - // - `MKN` - Macedonian Denar (1992–1993) - // - `MGA` - Malagasy Ariary - // - `MGF` - Malagasy Franc - // - `MWK` - Malawian Kwacha - // - `MYR` - Malaysian Ringgit - // - `MVR` - Maldivian Rufiyaa - // - `MVP` - Maldivian Rupee (1947–1981) - // - `MLF` - Malian Franc - // - `MTL` - Maltese Lira - // - `MTP` - Maltese Pound - // - `MRU` - Mauritanian Ouguiya - // - `MRO` - Mauritanian Ouguiya (1973–2017) - // - `MUR` - Mauritian Rupee - // - `MXV` - Mexican Investment Unit - // - `MXN` - Mexican Peso - // - `MXP` - Mexican Silver Peso (1861–1992) - // - `MDC` - Moldovan Cupon - // - `MDL` - Moldovan Leu - // - `MCF` - Monegasque Franc - // - `MNT` - Mongolian Tugrik - // - `MAD` - Moroccan Dirham - // - `MAF` - Moroccan Franc - // - `MZE` - Mozambican Escudo - // - `MZN` - Mozambican Metical - // - `MZM` - Mozambican Metical (1980–2006) - // - `MMK` - Myanmar Kyat - // - `NAD` - Namibian Dollar - // - `NPR` - Nepalese Rupee - // - `ANG` - Netherlands Antillean Guilder - // - `TWD` - New Taiwan Dollar - // - `NZD` - New Zealand Dollar - // - `NIO` - Nicaraguan Córdoba - // - `NIC` - Nicaraguan Córdoba (1988–1991) - // - `NGN` - Nigerian Naira - // - `KPW` - North Korean Won - // - `NOK` - Norwegian Krone - // - `OMR` - Omani Rial - // - `PKR` - Pakistani Rupee - // - `XPD` - Palladium - // - `PAB` - Panamanian Balboa - // - `PGK` - Papua New Guinean Kina - // - `PYG` - Paraguayan Guarani - // - `PEI` - Peruvian Inti - // - `PEN` - Peruvian Sol - // - `PES` - Peruvian Sol (1863–1965) - // - `PHP` - Philippine Peso - // - `XPT` - Platinum - // - `PLN` - Polish Zloty - // - `PLZ` - Polish Zloty (1950–1995) - // - `PTE` - Portuguese Escudo - // - `GWE` - Portuguese Guinea Escudo - // - `QAR` - Qatari Rial - // - `XRE` - RINET Funds - // - `RHD` - Rhodesian Dollar - // - `RON` - Romanian Leu - // - `ROL` - Romanian Leu (1952–2006) - // - `RUB` - Russian Ruble - // - `RUR` - Russian Ruble (1991–1998) - // - `RWF` - Rwandan Franc - // - `SVC` - Salvadoran Colón - // - `WST` - Samoan Tala - // - `SAR` - Saudi Riyal - // - `RSD` - Serbian Dinar - // - `CSD` - Serbian Dinar (2002–2006) - // - `SCR` - Seychellois Rupee - // - `SLL` - Sierra Leonean Leone - // - `XAG` - Silver - // - `SGD` - Singapore Dollar - // - `SKK` - Slovak Koruna - // - `SIT` - Slovenian Tolar - // - `SBD` - Solomon Islands Dollar - // - `SOS` - Somali Shilling - // - `ZAR` - South African Rand - // - `ZAL` - South African Rand (financial) - // - `KRH` - South Korean Hwan (1953–1962) - // - `KRW` - South Korean Won - // - `KRO` - South Korean Won (1945–1953) - // - `SSP` - South Sudanese Pound - // - `SUR` - Soviet Rouble - // - `ESP` - Spanish Peseta - // - `ESA` - Spanish Peseta (A account) - // - `ESB` - Spanish Peseta (convertible account) - // - `XDR` - Special Drawing Rights - // - `LKR` - Sri Lankan Rupee - // - `SHP` - St. Helena Pound - // - `XSU` - Sucre - // - `SDD` - Sudanese Dinar (1992–2007) - // - `SDG` - Sudanese Pound - // - `SDP` - Sudanese Pound (1957–1998) - // - `SRD` - Surinamese Dollar - // - `SRG` - Surinamese Guilder - // - `SZL` - Swazi Lilangeni - // - `SEK` - Swedish Krona - // - `CHF` - Swiss Franc - // - `SYP` - Syrian Pound - // - `STN` - São Tomé & Príncipe Dobra - // - `STD` - São Tomé & Príncipe Dobra (1977–2017) - // - `TVD` - TVD - // - `TJR` - Tajikistani Ruble - // - `TJS` - Tajikistani Somoni - // - `TZS` - Tanzanian Shilling - // - `XTS` - Testing Currency Code - // - `THB` - Thai Baht - // - `XXX` - The codes assigned for transactions where no currency is involved - // - `TPE` - Timorese Escudo - // - `TOP` - Tongan Paʻanga - // - `TTD` - Trinidad & Tobago Dollar - // - `TND` - Tunisian Dinar - // - `TRY` - Turkish Lira - // - `TRL` - Turkish Lira (1922–2005) - // - `TMT` - Turkmenistani Manat - // - `TMM` - Turkmenistani Manat (1993–2009) - // - `USD` - US Dollar - // - `USN` - US Dollar (Next day) - // - `USS` - US Dollar (Same day) - // - `UGX` - Ugandan Shilling - // - `UGS` - Ugandan Shilling (1966–1987) - // - `UAH` - Ukrainian Hryvnia - // - `UAK` - Ukrainian Karbovanets - // - `AED` - United Arab Emirates Dirham - // - `UYW` - Uruguayan Nominal Wage Index Unit - // - `UYU` - Uruguayan Peso - // - `UYP` - Uruguayan Peso (1975–1993) - // - `UYI` - Uruguayan Peso (Indexed Units) - // - `UZS` - Uzbekistani Som - // - `VUV` - Vanuatu Vatu - // - `VES` - Venezuelan Bolívar - // - `VEB` - Venezuelan Bolívar (1871–2008) - // - `VEF` - Venezuelan Bolívar (2008–2018) - // - `VND` - Vietnamese Dong - // - `VNN` - Vietnamese Dong (1978–1985) - // - `CHE` - WIR Euro - // - `CHW` - WIR Franc - // - `XOF` - West African CFA Franc - // - `YDD` - Yemeni Dinar - // - `YER` - Yemeni Rial - // - `YUN` - Yugoslavian Convertible Dinar (1990–1992) - // - `YUD` - Yugoslavian Hard Dinar (1966–1990) - // - `YUM` - Yugoslavian New Dinar (1994–2002) - // - `YUR` - Yugoslavian Reformed Dinar (1992–1993) - // - `ZWN` - ZWN - // - `ZRN` - Zairean New Zaire (1993–1998) - // - `ZRZ` - Zairean Zaire (1971–1993) - // - `ZMW` - Zambian Kwacha - // - `ZMK` - Zambian Kwacha (1968–2012) - // - `ZWD` - Zimbabwean Dollar (1980–2008) - // - `ZWR` - Zimbabwean Dollar (2008) - // - `ZWL` - Zimbabwean Dollar (2009) - Currency *JournalLineCurrency `json:"currency,omitempty"` - // The company the journal entry belongs to. - Company *string `json:"company,omitempty"` - Employee *string `json:"employee,omitempty"` - Contact *string `json:"contact,omitempty"` - // The tax rate that applies to this line item. - TaxRate *string `json:"tax_rate,omitempty"` - // The line's description. - Description *string `json:"description,omitempty"` - // The journal line item's exchange rate. - ExchangeRate *string `json:"exchange_rate,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - RemoteFields []*RemoteField `json:"remote_fields,omitempty"` +// The invoice's contact. +type InvoiceLineItemContact struct { + String string + Contact *Contact - _rawJSON json.RawMessage + typ string } -func (j *JournalLine) UnmarshalJSON(data []byte) error { - type unmarshaler JournalLine - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (i *InvoiceLineItemContact) GetString() string { + if i == nil { + return "" } - *j = JournalLine(value) - j._rawJSON = json.RawMessage(data) - return nil + return i.String } -func (j *JournalLine) String() string { - if len(j._rawJSON) > 0 { - if value, err := core.StringifyJSON(j._rawJSON); err == nil { - return value - } +func (i *InvoiceLineItemContact) GetContact() *Contact { + if i == nil { + return nil } - if value, err := core.StringifyJSON(j); err == nil { - return value + return i.Contact +} + +func (i *InvoiceLineItemContact) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + i.typ = "String" + i.String = valueString + return nil } - return fmt.Sprintf("%#v", j) + valueContact := new(Contact) + if err := json.Unmarshal(data, &valueContact); err == nil { + i.typ = "Contact" + i.Contact = valueContact + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) } -type JournalLineAccount struct { - typeName string - String string - Account *Account +func (i InvoiceLineItemContact) MarshalJSON() ([]byte, error) { + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) + } + if i.typ == "Contact" || i.Contact != nil { + return json.Marshal(i.Contact) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) } -func NewJournalLineAccountFromString(value string) *JournalLineAccount { - return &JournalLineAccount{typeName: "string", String: value} +type InvoiceLineItemContactVisitor interface { + VisitString(string) error + VisitContact(*Contact) error } -func NewJournalLineAccountFromAccount(value *Account) *JournalLineAccount { - return &JournalLineAccount{typeName: "account", Account: value} +func (i *InvoiceLineItemContact) Accept(visitor InvoiceLineItemContactVisitor) error { + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) + } + if i.typ == "Contact" || i.Contact != nil { + return visitor.VisitContact(i.Contact) + } + return fmt.Errorf("type %T does not include a non-empty union type", i) } -func (j *JournalLineAccount) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - j.typeName = "string" - j.String = valueString +// The line item's currency. +// +// * `XUA` - ADB Unit of Account +// * `AFN` - Afghan Afghani +// * `AFA` - Afghan Afghani (1927–2002) +// * `ALL` - Albanian Lek +// * `ALK` - Albanian Lek (1946–1965) +// * `DZD` - Algerian Dinar +// * `ADP` - Andorran Peseta +// * `AOA` - Angolan Kwanza +// * `AOK` - Angolan Kwanza (1977–1991) +// * `AON` - Angolan New Kwanza (1990–2000) +// * `AOR` - Angolan Readjusted Kwanza (1995–1999) +// * `ARA` - Argentine Austral +// * `ARS` - Argentine Peso +// * `ARM` - Argentine Peso (1881–1970) +// * `ARP` - Argentine Peso (1983–1985) +// * `ARL` - Argentine Peso Ley (1970–1983) +// * `AMD` - Armenian Dram +// * `AWG` - Aruban Florin +// * `AUD` - Australian Dollar +// * `ATS` - Austrian Schilling +// * `AZN` - Azerbaijani Manat +// * `AZM` - Azerbaijani Manat (1993–2006) +// * `BSD` - Bahamian Dollar +// * `BHD` - Bahraini Dinar +// * `BDT` - Bangladeshi Taka +// * `BBD` - Barbadian Dollar +// * `BYN` - Belarusian Ruble +// * `BYB` - Belarusian Ruble (1994–1999) +// * `BYR` - Belarusian Ruble (2000–2016) +// * `BEF` - Belgian Franc +// * `BEC` - Belgian Franc (convertible) +// * `BEL` - Belgian Franc (financial) +// * `BZD` - Belize Dollar +// * `BMD` - Bermudan Dollar +// * `BTN` - Bhutanese Ngultrum +// * `BOB` - Bolivian Boliviano +// * `BOL` - Bolivian Boliviano (1863–1963) +// * `BOV` - Bolivian Mvdol +// * `BOP` - Bolivian Peso +// * `BAM` - Bosnia-Herzegovina Convertible Mark +// * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) +// * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) +// * `BWP` - Botswanan Pula +// * `BRC` - Brazilian Cruzado (1986–1989) +// * `BRZ` - Brazilian Cruzeiro (1942–1967) +// * `BRE` - Brazilian Cruzeiro (1990–1993) +// * `BRR` - Brazilian Cruzeiro (1993–1994) +// * `BRN` - Brazilian New Cruzado (1989–1990) +// * `BRB` - Brazilian New Cruzeiro (1967–1986) +// * `BRL` - Brazilian Real +// * `GBP` - British Pound +// * `BND` - Brunei Dollar +// * `BGL` - Bulgarian Hard Lev +// * `BGN` - Bulgarian Lev +// * `BGO` - Bulgarian Lev (1879–1952) +// * `BGM` - Bulgarian Socialist Lev +// * `BUK` - Burmese Kyat +// * `BIF` - Burundian Franc +// * `XPF` - CFP Franc +// * `KHR` - Cambodian Riel +// * `CAD` - Canadian Dollar +// * `CVE` - Cape Verdean Escudo +// * `KYD` - Cayman Islands Dollar +// * `XAF` - Central African CFA Franc +// * `CLE` - Chilean Escudo +// * `CLP` - Chilean Peso +// * `CLF` - Chilean Unit of Account (UF) +// * `CNX` - Chinese People’s Bank Dollar +// * `CNY` - Chinese Yuan +// * `CNH` - Chinese Yuan (offshore) +// * `COP` - Colombian Peso +// * `COU` - Colombian Real Value Unit +// * `KMF` - Comorian Franc +// * `CDF` - Congolese Franc +// * `CRC` - Costa Rican Colón +// * `HRD` - Croatian Dinar +// * `HRK` - Croatian Kuna +// * `CUC` - Cuban Convertible Peso +// * `CUP` - Cuban Peso +// * `CYP` - Cypriot Pound +// * `CZK` - Czech Koruna +// * `CSK` - Czechoslovak Hard Koruna +// * `DKK` - Danish Krone +// * `DJF` - Djiboutian Franc +// * `DOP` - Dominican Peso +// * `NLG` - Dutch Guilder +// * `XCD` - East Caribbean Dollar +// * `DDM` - East German Mark +// * `ECS` - Ecuadorian Sucre +// * `ECV` - Ecuadorian Unit of Constant Value +// * `EGP` - Egyptian Pound +// * `GQE` - Equatorial Guinean Ekwele +// * `ERN` - Eritrean Nakfa +// * `EEK` - Estonian Kroon +// * `ETB` - Ethiopian Birr +// * `EUR` - Euro +// * `XBA` - European Composite Unit +// * `XEU` - European Currency Unit +// * `XBB` - European Monetary Unit +// * `XBC` - European Unit of Account (XBC) +// * `XBD` - European Unit of Account (XBD) +// * `FKP` - Falkland Islands Pound +// * `FJD` - Fijian Dollar +// * `FIM` - Finnish Markka +// * `FRF` - French Franc +// * `XFO` - French Gold Franc +// * `XFU` - French UIC-Franc +// * `GMD` - Gambian Dalasi +// * `GEK` - Georgian Kupon Larit +// * `GEL` - Georgian Lari +// * `DEM` - German Mark +// * `GHS` - Ghanaian Cedi +// * `GHC` - Ghanaian Cedi (1979–2007) +// * `GIP` - Gibraltar Pound +// * `XAU` - Gold +// * `GRD` - Greek Drachma +// * `GTQ` - Guatemalan Quetzal +// * `GWP` - Guinea-Bissau Peso +// * `GNF` - Guinean Franc +// * `GNS` - Guinean Syli +// * `GYD` - Guyanaese Dollar +// * `HTG` - Haitian Gourde +// * `HNL` - Honduran Lempira +// * `HKD` - Hong Kong Dollar +// * `HUF` - Hungarian Forint +// * `IMP` - IMP +// * `ISK` - Icelandic Króna +// * `ISJ` - Icelandic Króna (1918–1981) +// * `INR` - Indian Rupee +// * `IDR` - Indonesian Rupiah +// * `IRR` - Iranian Rial +// * `IQD` - Iraqi Dinar +// * `IEP` - Irish Pound +// * `ILS` - Israeli New Shekel +// * `ILP` - Israeli Pound +// * `ILR` - Israeli Shekel (1980–1985) +// * `ITL` - Italian Lira +// * `JMD` - Jamaican Dollar +// * `JPY` - Japanese Yen +// * `JOD` - Jordanian Dinar +// * `KZT` - Kazakhstani Tenge +// * `KES` - Kenyan Shilling +// * `KWD` - Kuwaiti Dinar +// * `KGS` - Kyrgystani Som +// * `LAK` - Laotian Kip +// * `LVL` - Latvian Lats +// * `LVR` - Latvian Ruble +// * `LBP` - Lebanese Pound +// * `LSL` - Lesotho Loti +// * `LRD` - Liberian Dollar +// * `LYD` - Libyan Dinar +// * `LTL` - Lithuanian Litas +// * `LTT` - Lithuanian Talonas +// * `LUL` - Luxembourg Financial Franc +// * `LUC` - Luxembourgian Convertible Franc +// * `LUF` - Luxembourgian Franc +// * `MOP` - Macanese Pataca +// * `MKD` - Macedonian Denar +// * `MKN` - Macedonian Denar (1992–1993) +// * `MGA` - Malagasy Ariary +// * `MGF` - Malagasy Franc +// * `MWK` - Malawian Kwacha +// * `MYR` - Malaysian Ringgit +// * `MVR` - Maldivian Rufiyaa +// * `MVP` - Maldivian Rupee (1947–1981) +// * `MLF` - Malian Franc +// * `MTL` - Maltese Lira +// * `MTP` - Maltese Pound +// * `MRU` - Mauritanian Ouguiya +// * `MRO` - Mauritanian Ouguiya (1973–2017) +// * `MUR` - Mauritian Rupee +// * `MXV` - Mexican Investment Unit +// * `MXN` - Mexican Peso +// * `MXP` - Mexican Silver Peso (1861–1992) +// * `MDC` - Moldovan Cupon +// * `MDL` - Moldovan Leu +// * `MCF` - Monegasque Franc +// * `MNT` - Mongolian Tugrik +// * `MAD` - Moroccan Dirham +// * `MAF` - Moroccan Franc +// * `MZE` - Mozambican Escudo +// * `MZN` - Mozambican Metical +// * `MZM` - Mozambican Metical (1980–2006) +// * `MMK` - Myanmar Kyat +// * `NAD` - Namibian Dollar +// * `NPR` - Nepalese Rupee +// * `ANG` - Netherlands Antillean Guilder +// * `TWD` - New Taiwan Dollar +// * `NZD` - New Zealand Dollar +// * `NIO` - Nicaraguan Córdoba +// * `NIC` - Nicaraguan Córdoba (1988–1991) +// * `NGN` - Nigerian Naira +// * `KPW` - North Korean Won +// * `NOK` - Norwegian Krone +// * `OMR` - Omani Rial +// * `PKR` - Pakistani Rupee +// * `XPD` - Palladium +// * `PAB` - Panamanian Balboa +// * `PGK` - Papua New Guinean Kina +// * `PYG` - Paraguayan Guarani +// * `PEI` - Peruvian Inti +// * `PEN` - Peruvian Sol +// * `PES` - Peruvian Sol (1863–1965) +// * `PHP` - Philippine Peso +// * `XPT` - Platinum +// * `PLN` - Polish Zloty +// * `PLZ` - Polish Zloty (1950–1995) +// * `PTE` - Portuguese Escudo +// * `GWE` - Portuguese Guinea Escudo +// * `QAR` - Qatari Rial +// * `XRE` - RINET Funds +// * `RHD` - Rhodesian Dollar +// * `RON` - Romanian Leu +// * `ROL` - Romanian Leu (1952–2006) +// * `RUB` - Russian Ruble +// * `RUR` - Russian Ruble (1991–1998) +// * `RWF` - Rwandan Franc +// * `SVC` - Salvadoran Colón +// * `WST` - Samoan Tala +// * `SAR` - Saudi Riyal +// * `RSD` - Serbian Dinar +// * `CSD` - Serbian Dinar (2002–2006) +// * `SCR` - Seychellois Rupee +// * `SLL` - Sierra Leonean Leone +// * `XAG` - Silver +// * `SGD` - Singapore Dollar +// * `SKK` - Slovak Koruna +// * `SIT` - Slovenian Tolar +// * `SBD` - Solomon Islands Dollar +// * `SOS` - Somali Shilling +// * `ZAR` - South African Rand +// * `ZAL` - South African Rand (financial) +// * `KRH` - South Korean Hwan (1953–1962) +// * `KRW` - South Korean Won +// * `KRO` - South Korean Won (1945–1953) +// * `SSP` - South Sudanese Pound +// * `SUR` - Soviet Rouble +// * `ESP` - Spanish Peseta +// * `ESA` - Spanish Peseta (A account) +// * `ESB` - Spanish Peseta (convertible account) +// * `XDR` - Special Drawing Rights +// * `LKR` - Sri Lankan Rupee +// * `SHP` - St. Helena Pound +// * `XSU` - Sucre +// * `SDD` - Sudanese Dinar (1992–2007) +// * `SDG` - Sudanese Pound +// * `SDP` - Sudanese Pound (1957–1998) +// * `SRD` - Surinamese Dollar +// * `SRG` - Surinamese Guilder +// * `SZL` - Swazi Lilangeni +// * `SEK` - Swedish Krona +// * `CHF` - Swiss Franc +// * `SYP` - Syrian Pound +// * `STN` - São Tomé & Príncipe Dobra +// * `STD` - São Tomé & Príncipe Dobra (1977–2017) +// * `TVD` - TVD +// * `TJR` - Tajikistani Ruble +// * `TJS` - Tajikistani Somoni +// * `TZS` - Tanzanian Shilling +// * `XTS` - Testing Currency Code +// * `THB` - Thai Baht +// * `XXX` - The codes assigned for transactions where no currency is involved +// * `TPE` - Timorese Escudo +// * `TOP` - Tongan Paʻanga +// * `TTD` - Trinidad & Tobago Dollar +// * `TND` - Tunisian Dinar +// * `TRY` - Turkish Lira +// * `TRL` - Turkish Lira (1922–2005) +// * `TMT` - Turkmenistani Manat +// * `TMM` - Turkmenistani Manat (1993–2009) +// * `USD` - US Dollar +// * `USN` - US Dollar (Next day) +// * `USS` - US Dollar (Same day) +// * `UGX` - Ugandan Shilling +// * `UGS` - Ugandan Shilling (1966–1987) +// * `UAH` - Ukrainian Hryvnia +// * `UAK` - Ukrainian Karbovanets +// * `AED` - United Arab Emirates Dirham +// * `UYW` - Uruguayan Nominal Wage Index Unit +// * `UYU` - Uruguayan Peso +// * `UYP` - Uruguayan Peso (1975–1993) +// * `UYI` - Uruguayan Peso (Indexed Units) +// * `UZS` - Uzbekistani Som +// * `VUV` - Vanuatu Vatu +// * `VES` - Venezuelan Bolívar +// * `VEB` - Venezuelan Bolívar (1871–2008) +// * `VEF` - Venezuelan Bolívar (2008–2018) +// * `VND` - Vietnamese Dong +// * `VNN` - Vietnamese Dong (1978–1985) +// * `CHE` - WIR Euro +// * `CHW` - WIR Franc +// * `XOF` - West African CFA Franc +// * `YDD` - Yemeni Dinar +// * `YER` - Yemeni Rial +// * `YUN` - Yugoslavian Convertible Dinar (1990–1992) +// * `YUD` - Yugoslavian Hard Dinar (1966–1990) +// * `YUM` - Yugoslavian New Dinar (1994–2002) +// * `YUR` - Yugoslavian Reformed Dinar (1992–1993) +// * `ZWN` - ZWN +// * `ZRN` - Zairean New Zaire (1993–1998) +// * `ZRZ` - Zairean Zaire (1971–1993) +// * `ZMW` - Zambian Kwacha +// * `ZMK` - Zambian Kwacha (1968–2012) +// * `ZWD` - Zimbabwean Dollar (1980–2008) +// * `ZWR` - Zimbabwean Dollar (2008) +// * `ZWL` - Zimbabwean Dollar (2009) +type InvoiceLineItemCurrency struct { + TransactionCurrencyEnum TransactionCurrencyEnum + String string + + typ string +} + +func (i *InvoiceLineItemCurrency) GetTransactionCurrencyEnum() TransactionCurrencyEnum { + if i == nil { + return "" + } + return i.TransactionCurrencyEnum +} + +func (i *InvoiceLineItemCurrency) GetString() string { + if i == nil { + return "" + } + return i.String +} + +func (i *InvoiceLineItemCurrency) UnmarshalJSON(data []byte) error { + var valueTransactionCurrencyEnum TransactionCurrencyEnum + if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { + i.typ = "TransactionCurrencyEnum" + i.TransactionCurrencyEnum = valueTransactionCurrencyEnum return nil } - valueAccount := new(Account) - if err := json.Unmarshal(data, &valueAccount); err == nil { - j.typeName = "account" - j.Account = valueAccount + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + i.typ = "String" + i.String = valueString return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, j) + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) } -func (j JournalLineAccount) MarshalJSON() ([]byte, error) { - switch j.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "string": - return json.Marshal(j.String) - case "account": - return json.Marshal(j.Account) +func (i InvoiceLineItemCurrency) MarshalJSON() ([]byte, error) { + if i.typ == "TransactionCurrencyEnum" || i.TransactionCurrencyEnum != "" { + return json.Marshal(i.TransactionCurrencyEnum) + } + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) } -type JournalLineAccountVisitor interface { +type InvoiceLineItemCurrencyVisitor interface { + VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error VisitString(string) error - VisitAccount(*Account) error } -func (j *JournalLineAccount) Accept(visitor JournalLineAccountVisitor) error { - switch j.typeName { - default: - return fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "string": - return visitor.VisitString(j.String) - case "account": - return visitor.VisitAccount(j.Account) +func (i *InvoiceLineItemCurrency) Accept(visitor InvoiceLineItemCurrencyVisitor) error { + if i.typ == "TransactionCurrencyEnum" || i.TransactionCurrencyEnum != "" { + return visitor.VisitTransactionCurrencyEnum(i.TransactionCurrencyEnum) + } + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) } + return fmt.Errorf("type %T does not include a non-empty union type", i) } -// The journal line item's currency. -// -// - `XUA` - ADB Unit of Account -// - `AFN` - Afghan Afghani -// - `AFA` - Afghan Afghani (1927–2002) -// - `ALL` - Albanian Lek -// - `ALK` - Albanian Lek (1946–1965) -// - `DZD` - Algerian Dinar -// - `ADP` - Andorran Peseta -// - `AOA` - Angolan Kwanza -// - `AOK` - Angolan Kwanza (1977–1991) -// - `AON` - Angolan New Kwanza (1990–2000) -// - `AOR` - Angolan Readjusted Kwanza (1995–1999) -// - `ARA` - Argentine Austral -// - `ARS` - Argentine Peso -// - `ARM` - Argentine Peso (1881–1970) -// - `ARP` - Argentine Peso (1983–1985) -// - `ARL` - Argentine Peso Ley (1970–1983) -// - `AMD` - Armenian Dram -// - `AWG` - Aruban Florin -// - `AUD` - Australian Dollar -// - `ATS` - Austrian Schilling -// - `AZN` - Azerbaijani Manat -// - `AZM` - Azerbaijani Manat (1993–2006) -// - `BSD` - Bahamian Dollar -// - `BHD` - Bahraini Dinar -// - `BDT` - Bangladeshi Taka -// - `BBD` - Barbadian Dollar -// - `BYN` - Belarusian Ruble -// - `BYB` - Belarusian Ruble (1994–1999) -// - `BYR` - Belarusian Ruble (2000–2016) -// - `BEF` - Belgian Franc -// - `BEC` - Belgian Franc (convertible) -// - `BEL` - Belgian Franc (financial) -// - `BZD` - Belize Dollar -// - `BMD` - Bermudan Dollar -// - `BTN` - Bhutanese Ngultrum -// - `BOB` - Bolivian Boliviano -// - `BOL` - Bolivian Boliviano (1863–1963) -// - `BOV` - Bolivian Mvdol -// - `BOP` - Bolivian Peso -// - `BAM` - Bosnia-Herzegovina Convertible Mark -// - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) -// - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) -// - `BWP` - Botswanan Pula -// - `BRC` - Brazilian Cruzado (1986–1989) -// - `BRZ` - Brazilian Cruzeiro (1942–1967) -// - `BRE` - Brazilian Cruzeiro (1990–1993) -// - `BRR` - Brazilian Cruzeiro (1993–1994) -// - `BRN` - Brazilian New Cruzado (1989–1990) -// - `BRB` - Brazilian New Cruzeiro (1967–1986) -// - `BRL` - Brazilian Real -// - `GBP` - British Pound -// - `BND` - Brunei Dollar -// - `BGL` - Bulgarian Hard Lev -// - `BGN` - Bulgarian Lev -// - `BGO` - Bulgarian Lev (1879–1952) -// - `BGM` - Bulgarian Socialist Lev -// - `BUK` - Burmese Kyat -// - `BIF` - Burundian Franc -// - `XPF` - CFP Franc -// - `KHR` - Cambodian Riel -// - `CAD` - Canadian Dollar -// - `CVE` - Cape Verdean Escudo -// - `KYD` - Cayman Islands Dollar -// - `XAF` - Central African CFA Franc -// - `CLE` - Chilean Escudo -// - `CLP` - Chilean Peso -// - `CLF` - Chilean Unit of Account (UF) -// - `CNX` - Chinese People’s Bank Dollar -// - `CNY` - Chinese Yuan -// - `CNH` - Chinese Yuan (offshore) -// - `COP` - Colombian Peso -// - `COU` - Colombian Real Value Unit -// - `KMF` - Comorian Franc -// - `CDF` - Congolese Franc -// - `CRC` - Costa Rican Colón -// - `HRD` - Croatian Dinar -// - `HRK` - Croatian Kuna -// - `CUC` - Cuban Convertible Peso -// - `CUP` - Cuban Peso -// - `CYP` - Cypriot Pound -// - `CZK` - Czech Koruna -// - `CSK` - Czechoslovak Hard Koruna -// - `DKK` - Danish Krone -// - `DJF` - Djiboutian Franc -// - `DOP` - Dominican Peso -// - `NLG` - Dutch Guilder -// - `XCD` - East Caribbean Dollar -// - `DDM` - East German Mark -// - `ECS` - Ecuadorian Sucre -// - `ECV` - Ecuadorian Unit of Constant Value -// - `EGP` - Egyptian Pound -// - `GQE` - Equatorial Guinean Ekwele -// - `ERN` - Eritrean Nakfa -// - `EEK` - Estonian Kroon -// - `ETB` - Ethiopian Birr -// - `EUR` - Euro -// - `XBA` - European Composite Unit -// - `XEU` - European Currency Unit -// - `XBB` - European Monetary Unit -// - `XBC` - European Unit of Account (XBC) -// - `XBD` - European Unit of Account (XBD) -// - `FKP` - Falkland Islands Pound -// - `FJD` - Fijian Dollar -// - `FIM` - Finnish Markka -// - `FRF` - French Franc -// - `XFO` - French Gold Franc -// - `XFU` - French UIC-Franc -// - `GMD` - Gambian Dalasi -// - `GEK` - Georgian Kupon Larit -// - `GEL` - Georgian Lari -// - `DEM` - German Mark -// - `GHS` - Ghanaian Cedi -// - `GHC` - Ghanaian Cedi (1979–2007) -// - `GIP` - Gibraltar Pound -// - `XAU` - Gold -// - `GRD` - Greek Drachma -// - `GTQ` - Guatemalan Quetzal -// - `GWP` - Guinea-Bissau Peso -// - `GNF` - Guinean Franc -// - `GNS` - Guinean Syli -// - `GYD` - Guyanaese Dollar -// - `HTG` - Haitian Gourde -// - `HNL` - Honduran Lempira -// - `HKD` - Hong Kong Dollar -// - `HUF` - Hungarian Forint -// - `IMP` - IMP -// - `ISK` - Icelandic Króna -// - `ISJ` - Icelandic Króna (1918–1981) -// - `INR` - Indian Rupee -// - `IDR` - Indonesian Rupiah -// - `IRR` - Iranian Rial -// - `IQD` - Iraqi Dinar -// - `IEP` - Irish Pound -// - `ILS` - Israeli New Shekel -// - `ILP` - Israeli Pound -// - `ILR` - Israeli Shekel (1980–1985) -// - `ITL` - Italian Lira -// - `JMD` - Jamaican Dollar -// - `JPY` - Japanese Yen -// - `JOD` - Jordanian Dinar -// - `KZT` - Kazakhstani Tenge -// - `KES` - Kenyan Shilling -// - `KWD` - Kuwaiti Dinar -// - `KGS` - Kyrgystani Som -// - `LAK` - Laotian Kip -// - `LVL` - Latvian Lats -// - `LVR` - Latvian Ruble -// - `LBP` - Lebanese Pound -// - `LSL` - Lesotho Loti -// - `LRD` - Liberian Dollar -// - `LYD` - Libyan Dinar -// - `LTL` - Lithuanian Litas -// - `LTT` - Lithuanian Talonas -// - `LUL` - Luxembourg Financial Franc -// - `LUC` - Luxembourgian Convertible Franc -// - `LUF` - Luxembourgian Franc -// - `MOP` - Macanese Pataca -// - `MKD` - Macedonian Denar -// - `MKN` - Macedonian Denar (1992–1993) -// - `MGA` - Malagasy Ariary -// - `MGF` - Malagasy Franc -// - `MWK` - Malawian Kwacha -// - `MYR` - Malaysian Ringgit -// - `MVR` - Maldivian Rufiyaa -// - `MVP` - Maldivian Rupee (1947–1981) -// - `MLF` - Malian Franc -// - `MTL` - Maltese Lira -// - `MTP` - Maltese Pound -// - `MRU` - Mauritanian Ouguiya -// - `MRO` - Mauritanian Ouguiya (1973–2017) -// - `MUR` - Mauritian Rupee -// - `MXV` - Mexican Investment Unit -// - `MXN` - Mexican Peso -// - `MXP` - Mexican Silver Peso (1861–1992) -// - `MDC` - Moldovan Cupon -// - `MDL` - Moldovan Leu -// - `MCF` - Monegasque Franc -// - `MNT` - Mongolian Tugrik -// - `MAD` - Moroccan Dirham -// - `MAF` - Moroccan Franc -// - `MZE` - Mozambican Escudo -// - `MZN` - Mozambican Metical -// - `MZM` - Mozambican Metical (1980–2006) -// - `MMK` - Myanmar Kyat -// - `NAD` - Namibian Dollar -// - `NPR` - Nepalese Rupee -// - `ANG` - Netherlands Antillean Guilder -// - `TWD` - New Taiwan Dollar -// - `NZD` - New Zealand Dollar -// - `NIO` - Nicaraguan Córdoba -// - `NIC` - Nicaraguan Córdoba (1988–1991) -// - `NGN` - Nigerian Naira -// - `KPW` - North Korean Won -// - `NOK` - Norwegian Krone -// - `OMR` - Omani Rial -// - `PKR` - Pakistani Rupee -// - `XPD` - Palladium -// - `PAB` - Panamanian Balboa -// - `PGK` - Papua New Guinean Kina -// - `PYG` - Paraguayan Guarani -// - `PEI` - Peruvian Inti -// - `PEN` - Peruvian Sol -// - `PES` - Peruvian Sol (1863–1965) -// - `PHP` - Philippine Peso -// - `XPT` - Platinum -// - `PLN` - Polish Zloty -// - `PLZ` - Polish Zloty (1950–1995) -// - `PTE` - Portuguese Escudo -// - `GWE` - Portuguese Guinea Escudo -// - `QAR` - Qatari Rial -// - `XRE` - RINET Funds -// - `RHD` - Rhodesian Dollar -// - `RON` - Romanian Leu -// - `ROL` - Romanian Leu (1952–2006) -// - `RUB` - Russian Ruble -// - `RUR` - Russian Ruble (1991–1998) -// - `RWF` - Rwandan Franc -// - `SVC` - Salvadoran Colón -// - `WST` - Samoan Tala -// - `SAR` - Saudi Riyal -// - `RSD` - Serbian Dinar -// - `CSD` - Serbian Dinar (2002–2006) -// - `SCR` - Seychellois Rupee -// - `SLL` - Sierra Leonean Leone -// - `XAG` - Silver -// - `SGD` - Singapore Dollar -// - `SKK` - Slovak Koruna -// - `SIT` - Slovenian Tolar -// - `SBD` - Solomon Islands Dollar -// - `SOS` - Somali Shilling -// - `ZAR` - South African Rand -// - `ZAL` - South African Rand (financial) -// - `KRH` - South Korean Hwan (1953–1962) -// - `KRW` - South Korean Won -// - `KRO` - South Korean Won (1945–1953) -// - `SSP` - South Sudanese Pound -// - `SUR` - Soviet Rouble -// - `ESP` - Spanish Peseta -// - `ESA` - Spanish Peseta (A account) -// - `ESB` - Spanish Peseta (convertible account) -// - `XDR` - Special Drawing Rights -// - `LKR` - Sri Lankan Rupee -// - `SHP` - St. Helena Pound -// - `XSU` - Sucre -// - `SDD` - Sudanese Dinar (1992–2007) -// - `SDG` - Sudanese Pound -// - `SDP` - Sudanese Pound (1957–1998) -// - `SRD` - Surinamese Dollar -// - `SRG` - Surinamese Guilder -// - `SZL` - Swazi Lilangeni -// - `SEK` - Swedish Krona -// - `CHF` - Swiss Franc -// - `SYP` - Syrian Pound -// - `STN` - São Tomé & Príncipe Dobra -// - `STD` - São Tomé & Príncipe Dobra (1977–2017) -// - `TVD` - TVD -// - `TJR` - Tajikistani Ruble -// - `TJS` - Tajikistani Somoni -// - `TZS` - Tanzanian Shilling -// - `XTS` - Testing Currency Code -// - `THB` - Thai Baht -// - `XXX` - The codes assigned for transactions where no currency is involved -// - `TPE` - Timorese Escudo -// - `TOP` - Tongan Paʻanga -// - `TTD` - Trinidad & Tobago Dollar -// - `TND` - Tunisian Dinar -// - `TRY` - Turkish Lira -// - `TRL` - Turkish Lira (1922–2005) -// - `TMT` - Turkmenistani Manat -// - `TMM` - Turkmenistani Manat (1993–2009) -// - `USD` - US Dollar -// - `USN` - US Dollar (Next day) -// - `USS` - US Dollar (Same day) -// - `UGX` - Ugandan Shilling -// - `UGS` - Ugandan Shilling (1966–1987) -// - `UAH` - Ukrainian Hryvnia -// - `UAK` - Ukrainian Karbovanets -// - `AED` - United Arab Emirates Dirham -// - `UYW` - Uruguayan Nominal Wage Index Unit -// - `UYU` - Uruguayan Peso -// - `UYP` - Uruguayan Peso (1975–1993) -// - `UYI` - Uruguayan Peso (Indexed Units) -// - `UZS` - Uzbekistani Som -// - `VUV` - Vanuatu Vatu -// - `VES` - Venezuelan Bolívar -// - `VEB` - Venezuelan Bolívar (1871–2008) -// - `VEF` - Venezuelan Bolívar (2008–2018) -// - `VND` - Vietnamese Dong -// - `VNN` - Vietnamese Dong (1978–1985) -// - `CHE` - WIR Euro -// - `CHW` - WIR Franc -// - `XOF` - West African CFA Franc -// - `YDD` - Yemeni Dinar -// - `YER` - Yemeni Rial -// - `YUN` - Yugoslavian Convertible Dinar (1990–1992) -// - `YUD` - Yugoslavian Hard Dinar (1966–1990) -// - `YUM` - Yugoslavian New Dinar (1994–2002) -// - `YUR` - Yugoslavian Reformed Dinar (1992–1993) -// - `ZWN` - ZWN -// - `ZRN` - Zairean New Zaire (1993–1998) -// - `ZRZ` - Zairean Zaire (1971–1993) -// - `ZMW` - Zambian Kwacha -// - `ZMK` - Zambian Kwacha (1968–2012) -// - `ZWD` - Zimbabwean Dollar (1980–2008) -// - `ZWR` - Zimbabwean Dollar (2008) -// - `ZWL` - Zimbabwean Dollar (2009) -type JournalLineCurrency struct { - typeName string - TransactionCurrencyEnum TransactionCurrencyEnum - String string -} +// The employee this overall transaction relates to. +type InvoiceLineItemEmployee struct { + String string + Employee *Employee -func NewJournalLineCurrencyFromTransactionCurrencyEnum(value TransactionCurrencyEnum) *JournalLineCurrency { - return &JournalLineCurrency{typeName: "transactionCurrencyEnum", TransactionCurrencyEnum: value} + typ string } -func NewJournalLineCurrencyFromString(value string) *JournalLineCurrency { - return &JournalLineCurrency{typeName: "string", String: value} +func (i *InvoiceLineItemEmployee) GetString() string { + if i == nil { + return "" + } + return i.String } -func (j *JournalLineCurrency) UnmarshalJSON(data []byte) error { - var valueTransactionCurrencyEnum TransactionCurrencyEnum - if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { - j.typeName = "transactionCurrencyEnum" - j.TransactionCurrencyEnum = valueTransactionCurrencyEnum +func (i *InvoiceLineItemEmployee) GetEmployee() *Employee { + if i == nil { return nil } + return i.Employee +} + +func (i *InvoiceLineItemEmployee) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - j.typeName = "string" - j.String = valueString + i.typ = "String" + i.String = valueString + return nil + } + valueEmployee := new(Employee) + if err := json.Unmarshal(data, &valueEmployee); err == nil { + i.typ = "Employee" + i.Employee = valueEmployee return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, j) + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) } -func (j JournalLineCurrency) MarshalJSON() ([]byte, error) { - switch j.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "transactionCurrencyEnum": - return json.Marshal(j.TransactionCurrencyEnum) - case "string": - return json.Marshal(j.String) +func (i InvoiceLineItemEmployee) MarshalJSON() ([]byte, error) { + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) } + if i.typ == "Employee" || i.Employee != nil { + return json.Marshal(i.Employee) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) } -type JournalLineCurrencyVisitor interface { - VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error +type InvoiceLineItemEmployeeVisitor interface { VisitString(string) error + VisitEmployee(*Employee) error } -func (j *JournalLineCurrency) Accept(visitor JournalLineCurrencyVisitor) error { - switch j.typeName { - default: - return fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "transactionCurrencyEnum": - return visitor.VisitTransactionCurrencyEnum(j.TransactionCurrencyEnum) - case "string": - return visitor.VisitString(j.String) +func (i *InvoiceLineItemEmployee) Accept(visitor InvoiceLineItemEmployeeVisitor) error { + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) } + if i.typ == "Employee" || i.Employee != nil { + return visitor.VisitEmployee(i.Employee) + } + return fmt.Errorf("type %T does not include a non-empty union type", i) } -// # The JournalLine Object -// -// ### Description -// -// The `JournalLine` object is used to represent a journal entry's line items. -// -// ### Usage Example -// -// Fetch from the `GET JournalEntry` endpoint and view the journal entry's line items. -type JournalLineRequest struct { - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - Account *JournalLineRequestAccount `json:"account,omitempty"` - // The value of the line item including taxes and other fees. - NetAmount *float64 `json:"net_amount,omitempty"` - TrackingCategory *JournalLineRequestTrackingCategory `json:"tracking_category,omitempty"` - // The journal line item's associated tracking categories. - TrackingCategories []*JournalLineRequestTrackingCategoriesItem `json:"tracking_categories,omitempty"` - // The journal line item's currency. - // - // - `XUA` - ADB Unit of Account - // - `AFN` - Afghan Afghani - // - `AFA` - Afghan Afghani (1927–2002) - // - `ALL` - Albanian Lek - // - `ALK` - Albanian Lek (1946–1965) - // - `DZD` - Algerian Dinar - // - `ADP` - Andorran Peseta - // - `AOA` - Angolan Kwanza - // - `AOK` - Angolan Kwanza (1977–1991) - // - `AON` - Angolan New Kwanza (1990–2000) - // - `AOR` - Angolan Readjusted Kwanza (1995–1999) - // - `ARA` - Argentine Austral - // - `ARS` - Argentine Peso - // - `ARM` - Argentine Peso (1881–1970) - // - `ARP` - Argentine Peso (1983–1985) - // - `ARL` - Argentine Peso Ley (1970–1983) - // - `AMD` - Armenian Dram - // - `AWG` - Aruban Florin - // - `AUD` - Australian Dollar - // - `ATS` - Austrian Schilling - // - `AZN` - Azerbaijani Manat - // - `AZM` - Azerbaijani Manat (1993–2006) - // - `BSD` - Bahamian Dollar - // - `BHD` - Bahraini Dinar - // - `BDT` - Bangladeshi Taka - // - `BBD` - Barbadian Dollar - // - `BYN` - Belarusian Ruble - // - `BYB` - Belarusian Ruble (1994–1999) - // - `BYR` - Belarusian Ruble (2000–2016) - // - `BEF` - Belgian Franc - // - `BEC` - Belgian Franc (convertible) - // - `BEL` - Belgian Franc (financial) - // - `BZD` - Belize Dollar - // - `BMD` - Bermudan Dollar - // - `BTN` - Bhutanese Ngultrum - // - `BOB` - Bolivian Boliviano - // - `BOL` - Bolivian Boliviano (1863–1963) - // - `BOV` - Bolivian Mvdol - // - `BOP` - Bolivian Peso - // - `BAM` - Bosnia-Herzegovina Convertible Mark - // - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - // - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - // - `BWP` - Botswanan Pula - // - `BRC` - Brazilian Cruzado (1986–1989) - // - `BRZ` - Brazilian Cruzeiro (1942–1967) - // - `BRE` - Brazilian Cruzeiro (1990–1993) - // - `BRR` - Brazilian Cruzeiro (1993–1994) - // - `BRN` - Brazilian New Cruzado (1989–1990) - // - `BRB` - Brazilian New Cruzeiro (1967–1986) - // - `BRL` - Brazilian Real - // - `GBP` - British Pound - // - `BND` - Brunei Dollar - // - `BGL` - Bulgarian Hard Lev - // - `BGN` - Bulgarian Lev - // - `BGO` - Bulgarian Lev (1879–1952) - // - `BGM` - Bulgarian Socialist Lev - // - `BUK` - Burmese Kyat - // - `BIF` - Burundian Franc - // - `XPF` - CFP Franc - // - `KHR` - Cambodian Riel - // - `CAD` - Canadian Dollar - // - `CVE` - Cape Verdean Escudo - // - `KYD` - Cayman Islands Dollar - // - `XAF` - Central African CFA Franc - // - `CLE` - Chilean Escudo - // - `CLP` - Chilean Peso - // - `CLF` - Chilean Unit of Account (UF) - // - `CNX` - Chinese People’s Bank Dollar - // - `CNY` - Chinese Yuan - // - `CNH` - Chinese Yuan (offshore) - // - `COP` - Colombian Peso - // - `COU` - Colombian Real Value Unit - // - `KMF` - Comorian Franc - // - `CDF` - Congolese Franc - // - `CRC` - Costa Rican Colón - // - `HRD` - Croatian Dinar - // - `HRK` - Croatian Kuna - // - `CUC` - Cuban Convertible Peso - // - `CUP` - Cuban Peso - // - `CYP` - Cypriot Pound - // - `CZK` - Czech Koruna - // - `CSK` - Czechoslovak Hard Koruna - // - `DKK` - Danish Krone - // - `DJF` - Djiboutian Franc - // - `DOP` - Dominican Peso - // - `NLG` - Dutch Guilder - // - `XCD` - East Caribbean Dollar - // - `DDM` - East German Mark - // - `ECS` - Ecuadorian Sucre - // - `ECV` - Ecuadorian Unit of Constant Value - // - `EGP` - Egyptian Pound - // - `GQE` - Equatorial Guinean Ekwele - // - `ERN` - Eritrean Nakfa - // - `EEK` - Estonian Kroon - // - `ETB` - Ethiopian Birr - // - `EUR` - Euro - // - `XBA` - European Composite Unit - // - `XEU` - European Currency Unit - // - `XBB` - European Monetary Unit - // - `XBC` - European Unit of Account (XBC) - // - `XBD` - European Unit of Account (XBD) - // - `FKP` - Falkland Islands Pound - // - `FJD` - Fijian Dollar - // - `FIM` - Finnish Markka - // - `FRF` - French Franc - // - `XFO` - French Gold Franc - // - `XFU` - French UIC-Franc - // - `GMD` - Gambian Dalasi - // - `GEK` - Georgian Kupon Larit - // - `GEL` - Georgian Lari - // - `DEM` - German Mark - // - `GHS` - Ghanaian Cedi - // - `GHC` - Ghanaian Cedi (1979–2007) - // - `GIP` - Gibraltar Pound - // - `XAU` - Gold - // - `GRD` - Greek Drachma - // - `GTQ` - Guatemalan Quetzal - // - `GWP` - Guinea-Bissau Peso - // - `GNF` - Guinean Franc - // - `GNS` - Guinean Syli - // - `GYD` - Guyanaese Dollar - // - `HTG` - Haitian Gourde - // - `HNL` - Honduran Lempira - // - `HKD` - Hong Kong Dollar - // - `HUF` - Hungarian Forint - // - `IMP` - IMP - // - `ISK` - Icelandic Króna - // - `ISJ` - Icelandic Króna (1918–1981) - // - `INR` - Indian Rupee - // - `IDR` - Indonesian Rupiah - // - `IRR` - Iranian Rial - // - `IQD` - Iraqi Dinar - // - `IEP` - Irish Pound - // - `ILS` - Israeli New Shekel - // - `ILP` - Israeli Pound - // - `ILR` - Israeli Shekel (1980–1985) - // - `ITL` - Italian Lira - // - `JMD` - Jamaican Dollar - // - `JPY` - Japanese Yen - // - `JOD` - Jordanian Dinar - // - `KZT` - Kazakhstani Tenge - // - `KES` - Kenyan Shilling - // - `KWD` - Kuwaiti Dinar - // - `KGS` - Kyrgystani Som - // - `LAK` - Laotian Kip - // - `LVL` - Latvian Lats - // - `LVR` - Latvian Ruble - // - `LBP` - Lebanese Pound - // - `LSL` - Lesotho Loti - // - `LRD` - Liberian Dollar - // - `LYD` - Libyan Dinar - // - `LTL` - Lithuanian Litas - // - `LTT` - Lithuanian Talonas - // - `LUL` - Luxembourg Financial Franc - // - `LUC` - Luxembourgian Convertible Franc - // - `LUF` - Luxembourgian Franc - // - `MOP` - Macanese Pataca - // - `MKD` - Macedonian Denar - // - `MKN` - Macedonian Denar (1992–1993) - // - `MGA` - Malagasy Ariary - // - `MGF` - Malagasy Franc - // - `MWK` - Malawian Kwacha - // - `MYR` - Malaysian Ringgit - // - `MVR` - Maldivian Rufiyaa - // - `MVP` - Maldivian Rupee (1947–1981) - // - `MLF` - Malian Franc - // - `MTL` - Maltese Lira - // - `MTP` - Maltese Pound - // - `MRU` - Mauritanian Ouguiya - // - `MRO` - Mauritanian Ouguiya (1973–2017) - // - `MUR` - Mauritian Rupee - // - `MXV` - Mexican Investment Unit - // - `MXN` - Mexican Peso - // - `MXP` - Mexican Silver Peso (1861–1992) - // - `MDC` - Moldovan Cupon - // - `MDL` - Moldovan Leu - // - `MCF` - Monegasque Franc - // - `MNT` - Mongolian Tugrik - // - `MAD` - Moroccan Dirham - // - `MAF` - Moroccan Franc - // - `MZE` - Mozambican Escudo - // - `MZN` - Mozambican Metical - // - `MZM` - Mozambican Metical (1980–2006) - // - `MMK` - Myanmar Kyat - // - `NAD` - Namibian Dollar - // - `NPR` - Nepalese Rupee - // - `ANG` - Netherlands Antillean Guilder - // - `TWD` - New Taiwan Dollar - // - `NZD` - New Zealand Dollar - // - `NIO` - Nicaraguan Córdoba - // - `NIC` - Nicaraguan Córdoba (1988–1991) - // - `NGN` - Nigerian Naira - // - `KPW` - North Korean Won - // - `NOK` - Norwegian Krone - // - `OMR` - Omani Rial - // - `PKR` - Pakistani Rupee - // - `XPD` - Palladium - // - `PAB` - Panamanian Balboa - // - `PGK` - Papua New Guinean Kina - // - `PYG` - Paraguayan Guarani - // - `PEI` - Peruvian Inti - // - `PEN` - Peruvian Sol - // - `PES` - Peruvian Sol (1863–1965) - // - `PHP` - Philippine Peso - // - `XPT` - Platinum - // - `PLN` - Polish Zloty - // - `PLZ` - Polish Zloty (1950–1995) - // - `PTE` - Portuguese Escudo - // - `GWE` - Portuguese Guinea Escudo - // - `QAR` - Qatari Rial - // - `XRE` - RINET Funds - // - `RHD` - Rhodesian Dollar - // - `RON` - Romanian Leu - // - `ROL` - Romanian Leu (1952–2006) - // - `RUB` - Russian Ruble - // - `RUR` - Russian Ruble (1991–1998) - // - `RWF` - Rwandan Franc - // - `SVC` - Salvadoran Colón - // - `WST` - Samoan Tala - // - `SAR` - Saudi Riyal - // - `RSD` - Serbian Dinar - // - `CSD` - Serbian Dinar (2002–2006) - // - `SCR` - Seychellois Rupee - // - `SLL` - Sierra Leonean Leone - // - `XAG` - Silver - // - `SGD` - Singapore Dollar - // - `SKK` - Slovak Koruna - // - `SIT` - Slovenian Tolar - // - `SBD` - Solomon Islands Dollar - // - `SOS` - Somali Shilling - // - `ZAR` - South African Rand - // - `ZAL` - South African Rand (financial) - // - `KRH` - South Korean Hwan (1953–1962) - // - `KRW` - South Korean Won - // - `KRO` - South Korean Won (1945–1953) - // - `SSP` - South Sudanese Pound - // - `SUR` - Soviet Rouble - // - `ESP` - Spanish Peseta - // - `ESA` - Spanish Peseta (A account) - // - `ESB` - Spanish Peseta (convertible account) - // - `XDR` - Special Drawing Rights - // - `LKR` - Sri Lankan Rupee - // - `SHP` - St. Helena Pound - // - `XSU` - Sucre - // - `SDD` - Sudanese Dinar (1992–2007) - // - `SDG` - Sudanese Pound - // - `SDP` - Sudanese Pound (1957–1998) - // - `SRD` - Surinamese Dollar - // - `SRG` - Surinamese Guilder - // - `SZL` - Swazi Lilangeni - // - `SEK` - Swedish Krona - // - `CHF` - Swiss Franc - // - `SYP` - Syrian Pound - // - `STN` - São Tomé & Príncipe Dobra - // - `STD` - São Tomé & Príncipe Dobra (1977–2017) - // - `TVD` - TVD - // - `TJR` - Tajikistani Ruble - // - `TJS` - Tajikistani Somoni - // - `TZS` - Tanzanian Shilling - // - `XTS` - Testing Currency Code - // - `THB` - Thai Baht - // - `XXX` - The codes assigned for transactions where no currency is involved - // - `TPE` - Timorese Escudo - // - `TOP` - Tongan Paʻanga - // - `TTD` - Trinidad & Tobago Dollar - // - `TND` - Tunisian Dinar - // - `TRY` - Turkish Lira - // - `TRL` - Turkish Lira (1922–2005) - // - `TMT` - Turkmenistani Manat - // - `TMM` - Turkmenistani Manat (1993–2009) - // - `USD` - US Dollar - // - `USN` - US Dollar (Next day) - // - `USS` - US Dollar (Same day) - // - `UGX` - Ugandan Shilling - // - `UGS` - Ugandan Shilling (1966–1987) - // - `UAH` - Ukrainian Hryvnia - // - `UAK` - Ukrainian Karbovanets - // - `AED` - United Arab Emirates Dirham - // - `UYW` - Uruguayan Nominal Wage Index Unit - // - `UYU` - Uruguayan Peso - // - `UYP` - Uruguayan Peso (1975–1993) - // - `UYI` - Uruguayan Peso (Indexed Units) - // - `UZS` - Uzbekistani Som - // - `VUV` - Vanuatu Vatu - // - `VES` - Venezuelan Bolívar - // - `VEB` - Venezuelan Bolívar (1871–2008) - // - `VEF` - Venezuelan Bolívar (2008–2018) - // - `VND` - Vietnamese Dong - // - `VNN` - Vietnamese Dong (1978–1985) - // - `CHE` - WIR Euro - // - `CHW` - WIR Franc - // - `XOF` - West African CFA Franc - // - `YDD` - Yemeni Dinar - // - `YER` - Yemeni Rial - // - `YUN` - Yugoslavian Convertible Dinar (1990–1992) - // - `YUD` - Yugoslavian Hard Dinar (1966–1990) - // - `YUM` - Yugoslavian New Dinar (1994–2002) - // - `YUR` - Yugoslavian Reformed Dinar (1992–1993) - // - `ZWN` - ZWN - // - `ZRN` - Zairean New Zaire (1993–1998) - // - `ZRZ` - Zairean Zaire (1971–1993) - // - `ZMW` - Zambian Kwacha - // - `ZMK` - Zambian Kwacha (1968–2012) - // - `ZWD` - Zimbabwean Dollar (1980–2008) - // - `ZWR` - Zimbabwean Dollar (2008) - // - `ZWL` - Zimbabwean Dollar (2009) - Currency *JournalLineRequestCurrency `json:"currency,omitempty"` - // The company the journal entry belongs to. - Company *string `json:"company,omitempty"` - Employee *string `json:"employee,omitempty"` - Contact *string `json:"contact,omitempty"` - // The tax rate that applies to this line item. - TaxRate *string `json:"tax_rate,omitempty"` - // The line's description. - Description *string `json:"description,omitempty"` - // The journal line item's exchange rate. - ExchangeRate *string `json:"exchange_rate,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` - RemoteFields []*RemoteFieldRequest `json:"remote_fields,omitempty"` +type InvoiceLineItemItem struct { + String string + Item *Item - _rawJSON json.RawMessage + typ string } -func (j *JournalLineRequest) UnmarshalJSON(data []byte) error { - type unmarshaler JournalLineRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (i *InvoiceLineItemItem) GetString() string { + if i == nil { + return "" } - *j = JournalLineRequest(value) - j._rawJSON = json.RawMessage(data) - return nil + return i.String } -func (j *JournalLineRequest) String() string { - if len(j._rawJSON) > 0 { - if value, err := core.StringifyJSON(j._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(j); err == nil { - return value +func (i *InvoiceLineItemItem) GetItem() *Item { + if i == nil { + return nil } - return fmt.Sprintf("%#v", j) -} - -type JournalLineRequestAccount struct { - typeName string - String string - Account *Account -} - -func NewJournalLineRequestAccountFromString(value string) *JournalLineRequestAccount { - return &JournalLineRequestAccount{typeName: "string", String: value} -} - -func NewJournalLineRequestAccountFromAccount(value *Account) *JournalLineRequestAccount { - return &JournalLineRequestAccount{typeName: "account", Account: value} + return i.Item } -func (j *JournalLineRequestAccount) UnmarshalJSON(data []byte) error { +func (i *InvoiceLineItemItem) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - j.typeName = "string" - j.String = valueString + i.typ = "String" + i.String = valueString return nil } - valueAccount := new(Account) - if err := json.Unmarshal(data, &valueAccount); err == nil { - j.typeName = "account" - j.Account = valueAccount + valueItem := new(Item) + if err := json.Unmarshal(data, &valueItem); err == nil { + i.typ = "Item" + i.Item = valueItem return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, j) + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) } -func (j JournalLineRequestAccount) MarshalJSON() ([]byte, error) { - switch j.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "string": - return json.Marshal(j.String) - case "account": - return json.Marshal(j.Account) +func (i InvoiceLineItemItem) MarshalJSON() ([]byte, error) { + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) } + if i.typ == "Item" || i.Item != nil { + return json.Marshal(i.Item) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) } -type JournalLineRequestAccountVisitor interface { +type InvoiceLineItemItemVisitor interface { VisitString(string) error - VisitAccount(*Account) error + VisitItem(*Item) error } -func (j *JournalLineRequestAccount) Accept(visitor JournalLineRequestAccountVisitor) error { - switch j.typeName { - default: - return fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "string": - return visitor.VisitString(j.String) - case "account": - return visitor.VisitAccount(j.Account) +func (i *InvoiceLineItemItem) Accept(visitor InvoiceLineItemItemVisitor) error { + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) } + if i.typ == "Item" || i.Item != nil { + return visitor.VisitItem(i.Item) + } + return fmt.Errorf("type %T does not include a non-empty union type", i) } -// The journal line item's currency. -// -// - `XUA` - ADB Unit of Account -// - `AFN` - Afghan Afghani -// - `AFA` - Afghan Afghani (1927–2002) -// - `ALL` - Albanian Lek -// - `ALK` - Albanian Lek (1946–1965) -// - `DZD` - Algerian Dinar -// - `ADP` - Andorran Peseta -// - `AOA` - Angolan Kwanza -// - `AOK` - Angolan Kwanza (1977–1991) -// - `AON` - Angolan New Kwanza (1990–2000) -// - `AOR` - Angolan Readjusted Kwanza (1995–1999) -// - `ARA` - Argentine Austral -// - `ARS` - Argentine Peso -// - `ARM` - Argentine Peso (1881–1970) -// - `ARP` - Argentine Peso (1983–1985) -// - `ARL` - Argentine Peso Ley (1970–1983) -// - `AMD` - Armenian Dram -// - `AWG` - Aruban Florin -// - `AUD` - Australian Dollar -// - `ATS` - Austrian Schilling -// - `AZN` - Azerbaijani Manat -// - `AZM` - Azerbaijani Manat (1993–2006) -// - `BSD` - Bahamian Dollar -// - `BHD` - Bahraini Dinar -// - `BDT` - Bangladeshi Taka -// - `BBD` - Barbadian Dollar -// - `BYN` - Belarusian Ruble -// - `BYB` - Belarusian Ruble (1994–1999) -// - `BYR` - Belarusian Ruble (2000–2016) -// - `BEF` - Belgian Franc -// - `BEC` - Belgian Franc (convertible) -// - `BEL` - Belgian Franc (financial) -// - `BZD` - Belize Dollar -// - `BMD` - Bermudan Dollar -// - `BTN` - Bhutanese Ngultrum -// - `BOB` - Bolivian Boliviano -// - `BOL` - Bolivian Boliviano (1863–1963) -// - `BOV` - Bolivian Mvdol -// - `BOP` - Bolivian Peso -// - `BAM` - Bosnia-Herzegovina Convertible Mark -// - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) -// - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) -// - `BWP` - Botswanan Pula -// - `BRC` - Brazilian Cruzado (1986–1989) -// - `BRZ` - Brazilian Cruzeiro (1942–1967) -// - `BRE` - Brazilian Cruzeiro (1990–1993) -// - `BRR` - Brazilian Cruzeiro (1993–1994) -// - `BRN` - Brazilian New Cruzado (1989–1990) -// - `BRB` - Brazilian New Cruzeiro (1967–1986) -// - `BRL` - Brazilian Real -// - `GBP` - British Pound -// - `BND` - Brunei Dollar -// - `BGL` - Bulgarian Hard Lev -// - `BGN` - Bulgarian Lev -// - `BGO` - Bulgarian Lev (1879–1952) -// - `BGM` - Bulgarian Socialist Lev -// - `BUK` - Burmese Kyat -// - `BIF` - Burundian Franc -// - `XPF` - CFP Franc -// - `KHR` - Cambodian Riel -// - `CAD` - Canadian Dollar -// - `CVE` - Cape Verdean Escudo -// - `KYD` - Cayman Islands Dollar -// - `XAF` - Central African CFA Franc -// - `CLE` - Chilean Escudo -// - `CLP` - Chilean Peso -// - `CLF` - Chilean Unit of Account (UF) -// - `CNX` - Chinese People’s Bank Dollar -// - `CNY` - Chinese Yuan -// - `CNH` - Chinese Yuan (offshore) -// - `COP` - Colombian Peso -// - `COU` - Colombian Real Value Unit -// - `KMF` - Comorian Franc -// - `CDF` - Congolese Franc -// - `CRC` - Costa Rican Colón -// - `HRD` - Croatian Dinar -// - `HRK` - Croatian Kuna -// - `CUC` - Cuban Convertible Peso -// - `CUP` - Cuban Peso -// - `CYP` - Cypriot Pound -// - `CZK` - Czech Koruna -// - `CSK` - Czechoslovak Hard Koruna -// - `DKK` - Danish Krone -// - `DJF` - Djiboutian Franc -// - `DOP` - Dominican Peso -// - `NLG` - Dutch Guilder -// - `XCD` - East Caribbean Dollar -// - `DDM` - East German Mark -// - `ECS` - Ecuadorian Sucre -// - `ECV` - Ecuadorian Unit of Constant Value -// - `EGP` - Egyptian Pound -// - `GQE` - Equatorial Guinean Ekwele -// - `ERN` - Eritrean Nakfa -// - `EEK` - Estonian Kroon -// - `ETB` - Ethiopian Birr -// - `EUR` - Euro -// - `XBA` - European Composite Unit -// - `XEU` - European Currency Unit -// - `XBB` - European Monetary Unit -// - `XBC` - European Unit of Account (XBC) -// - `XBD` - European Unit of Account (XBD) -// - `FKP` - Falkland Islands Pound -// - `FJD` - Fijian Dollar -// - `FIM` - Finnish Markka -// - `FRF` - French Franc -// - `XFO` - French Gold Franc -// - `XFU` - French UIC-Franc -// - `GMD` - Gambian Dalasi -// - `GEK` - Georgian Kupon Larit -// - `GEL` - Georgian Lari -// - `DEM` - German Mark -// - `GHS` - Ghanaian Cedi -// - `GHC` - Ghanaian Cedi (1979–2007) -// - `GIP` - Gibraltar Pound -// - `XAU` - Gold -// - `GRD` - Greek Drachma -// - `GTQ` - Guatemalan Quetzal -// - `GWP` - Guinea-Bissau Peso -// - `GNF` - Guinean Franc -// - `GNS` - Guinean Syli -// - `GYD` - Guyanaese Dollar -// - `HTG` - Haitian Gourde -// - `HNL` - Honduran Lempira -// - `HKD` - Hong Kong Dollar -// - `HUF` - Hungarian Forint -// - `IMP` - IMP -// - `ISK` - Icelandic Króna -// - `ISJ` - Icelandic Króna (1918–1981) -// - `INR` - Indian Rupee -// - `IDR` - Indonesian Rupiah -// - `IRR` - Iranian Rial -// - `IQD` - Iraqi Dinar -// - `IEP` - Irish Pound -// - `ILS` - Israeli New Shekel -// - `ILP` - Israeli Pound -// - `ILR` - Israeli Shekel (1980–1985) -// - `ITL` - Italian Lira -// - `JMD` - Jamaican Dollar -// - `JPY` - Japanese Yen -// - `JOD` - Jordanian Dinar -// - `KZT` - Kazakhstani Tenge -// - `KES` - Kenyan Shilling -// - `KWD` - Kuwaiti Dinar -// - `KGS` - Kyrgystani Som -// - `LAK` - Laotian Kip -// - `LVL` - Latvian Lats -// - `LVR` - Latvian Ruble -// - `LBP` - Lebanese Pound -// - `LSL` - Lesotho Loti -// - `LRD` - Liberian Dollar -// - `LYD` - Libyan Dinar -// - `LTL` - Lithuanian Litas -// - `LTT` - Lithuanian Talonas -// - `LUL` - Luxembourg Financial Franc -// - `LUC` - Luxembourgian Convertible Franc -// - `LUF` - Luxembourgian Franc -// - `MOP` - Macanese Pataca -// - `MKD` - Macedonian Denar -// - `MKN` - Macedonian Denar (1992–1993) -// - `MGA` - Malagasy Ariary -// - `MGF` - Malagasy Franc -// - `MWK` - Malawian Kwacha -// - `MYR` - Malaysian Ringgit -// - `MVR` - Maldivian Rufiyaa -// - `MVP` - Maldivian Rupee (1947–1981) -// - `MLF` - Malian Franc -// - `MTL` - Maltese Lira -// - `MTP` - Maltese Pound -// - `MRU` - Mauritanian Ouguiya -// - `MRO` - Mauritanian Ouguiya (1973–2017) -// - `MUR` - Mauritian Rupee -// - `MXV` - Mexican Investment Unit -// - `MXN` - Mexican Peso -// - `MXP` - Mexican Silver Peso (1861–1992) -// - `MDC` - Moldovan Cupon -// - `MDL` - Moldovan Leu -// - `MCF` - Monegasque Franc -// - `MNT` - Mongolian Tugrik -// - `MAD` - Moroccan Dirham -// - `MAF` - Moroccan Franc -// - `MZE` - Mozambican Escudo -// - `MZN` - Mozambican Metical -// - `MZM` - Mozambican Metical (1980–2006) -// - `MMK` - Myanmar Kyat -// - `NAD` - Namibian Dollar -// - `NPR` - Nepalese Rupee -// - `ANG` - Netherlands Antillean Guilder -// - `TWD` - New Taiwan Dollar -// - `NZD` - New Zealand Dollar -// - `NIO` - Nicaraguan Córdoba -// - `NIC` - Nicaraguan Córdoba (1988–1991) -// - `NGN` - Nigerian Naira -// - `KPW` - North Korean Won -// - `NOK` - Norwegian Krone -// - `OMR` - Omani Rial -// - `PKR` - Pakistani Rupee -// - `XPD` - Palladium -// - `PAB` - Panamanian Balboa -// - `PGK` - Papua New Guinean Kina -// - `PYG` - Paraguayan Guarani -// - `PEI` - Peruvian Inti -// - `PEN` - Peruvian Sol -// - `PES` - Peruvian Sol (1863–1965) -// - `PHP` - Philippine Peso -// - `XPT` - Platinum -// - `PLN` - Polish Zloty -// - `PLZ` - Polish Zloty (1950–1995) -// - `PTE` - Portuguese Escudo -// - `GWE` - Portuguese Guinea Escudo -// - `QAR` - Qatari Rial -// - `XRE` - RINET Funds -// - `RHD` - Rhodesian Dollar -// - `RON` - Romanian Leu -// - `ROL` - Romanian Leu (1952–2006) -// - `RUB` - Russian Ruble -// - `RUR` - Russian Ruble (1991–1998) -// - `RWF` - Rwandan Franc -// - `SVC` - Salvadoran Colón -// - `WST` - Samoan Tala -// - `SAR` - Saudi Riyal -// - `RSD` - Serbian Dinar -// - `CSD` - Serbian Dinar (2002–2006) -// - `SCR` - Seychellois Rupee -// - `SLL` - Sierra Leonean Leone -// - `XAG` - Silver -// - `SGD` - Singapore Dollar -// - `SKK` - Slovak Koruna -// - `SIT` - Slovenian Tolar -// - `SBD` - Solomon Islands Dollar -// - `SOS` - Somali Shilling -// - `ZAR` - South African Rand -// - `ZAL` - South African Rand (financial) -// - `KRH` - South Korean Hwan (1953–1962) -// - `KRW` - South Korean Won -// - `KRO` - South Korean Won (1945–1953) -// - `SSP` - South Sudanese Pound -// - `SUR` - Soviet Rouble -// - `ESP` - Spanish Peseta -// - `ESA` - Spanish Peseta (A account) -// - `ESB` - Spanish Peseta (convertible account) -// - `XDR` - Special Drawing Rights -// - `LKR` - Sri Lankan Rupee -// - `SHP` - St. Helena Pound -// - `XSU` - Sucre -// - `SDD` - Sudanese Dinar (1992–2007) -// - `SDG` - Sudanese Pound -// - `SDP` - Sudanese Pound (1957–1998) -// - `SRD` - Surinamese Dollar -// - `SRG` - Surinamese Guilder -// - `SZL` - Swazi Lilangeni -// - `SEK` - Swedish Krona -// - `CHF` - Swiss Franc -// - `SYP` - Syrian Pound -// - `STN` - São Tomé & Príncipe Dobra -// - `STD` - São Tomé & Príncipe Dobra (1977–2017) -// - `TVD` - TVD -// - `TJR` - Tajikistani Ruble -// - `TJS` - Tajikistani Somoni -// - `TZS` - Tanzanian Shilling -// - `XTS` - Testing Currency Code -// - `THB` - Thai Baht -// - `XXX` - The codes assigned for transactions where no currency is involved -// - `TPE` - Timorese Escudo -// - `TOP` - Tongan Paʻanga -// - `TTD` - Trinidad & Tobago Dollar -// - `TND` - Tunisian Dinar -// - `TRY` - Turkish Lira -// - `TRL` - Turkish Lira (1922–2005) -// - `TMT` - Turkmenistani Manat -// - `TMM` - Turkmenistani Manat (1993–2009) -// - `USD` - US Dollar -// - `USN` - US Dollar (Next day) -// - `USS` - US Dollar (Same day) -// - `UGX` - Ugandan Shilling -// - `UGS` - Ugandan Shilling (1966–1987) -// - `UAH` - Ukrainian Hryvnia -// - `UAK` - Ukrainian Karbovanets -// - `AED` - United Arab Emirates Dirham -// - `UYW` - Uruguayan Nominal Wage Index Unit -// - `UYU` - Uruguayan Peso -// - `UYP` - Uruguayan Peso (1975–1993) -// - `UYI` - Uruguayan Peso (Indexed Units) -// - `UZS` - Uzbekistani Som -// - `VUV` - Vanuatu Vatu -// - `VES` - Venezuelan Bolívar -// - `VEB` - Venezuelan Bolívar (1871–2008) -// - `VEF` - Venezuelan Bolívar (2008–2018) -// - `VND` - Vietnamese Dong -// - `VNN` - Vietnamese Dong (1978–1985) -// - `CHE` - WIR Euro -// - `CHW` - WIR Franc -// - `XOF` - West African CFA Franc -// - `YDD` - Yemeni Dinar -// - `YER` - Yemeni Rial -// - `YUN` - Yugoslavian Convertible Dinar (1990–1992) -// - `YUD` - Yugoslavian Hard Dinar (1966–1990) -// - `YUM` - Yugoslavian New Dinar (1994–2002) -// - `YUR` - Yugoslavian Reformed Dinar (1992–1993) -// - `ZWN` - ZWN -// - `ZRN` - Zairean New Zaire (1993–1998) -// - `ZRZ` - Zairean Zaire (1971–1993) -// - `ZMW` - Zambian Kwacha -// - `ZMK` - Zambian Kwacha (1968–2012) -// - `ZWD` - Zimbabwean Dollar (1980–2008) -// - `ZWR` - Zimbabwean Dollar (2008) -// - `ZWL` - Zimbabwean Dollar (2009) -type JournalLineRequestCurrency struct { - typeName string - TransactionCurrencyEnum TransactionCurrencyEnum - String string -} +type InvoiceLineItemProject struct { + String string + Project *Project -func NewJournalLineRequestCurrencyFromTransactionCurrencyEnum(value TransactionCurrencyEnum) *JournalLineRequestCurrency { - return &JournalLineRequestCurrency{typeName: "transactionCurrencyEnum", TransactionCurrencyEnum: value} + typ string } -func NewJournalLineRequestCurrencyFromString(value string) *JournalLineRequestCurrency { - return &JournalLineRequestCurrency{typeName: "string", String: value} +func (i *InvoiceLineItemProject) GetString() string { + if i == nil { + return "" + } + return i.String } -func (j *JournalLineRequestCurrency) UnmarshalJSON(data []byte) error { - var valueTransactionCurrencyEnum TransactionCurrencyEnum - if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { - j.typeName = "transactionCurrencyEnum" - j.TransactionCurrencyEnum = valueTransactionCurrencyEnum +func (i *InvoiceLineItemProject) GetProject() *Project { + if i == nil { return nil } + return i.Project +} + +func (i *InvoiceLineItemProject) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - j.typeName = "string" - j.String = valueString + i.typ = "String" + i.String = valueString return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, j) + valueProject := new(Project) + if err := json.Unmarshal(data, &valueProject); err == nil { + i.typ = "Project" + i.Project = valueProject + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) } -func (j JournalLineRequestCurrency) MarshalJSON() ([]byte, error) { - switch j.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "transactionCurrencyEnum": - return json.Marshal(j.TransactionCurrencyEnum) - case "string": - return json.Marshal(j.String) +func (i InvoiceLineItemProject) MarshalJSON() ([]byte, error) { + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) + } + if i.typ == "Project" || i.Project != nil { + return json.Marshal(i.Project) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) } -type JournalLineRequestCurrencyVisitor interface { - VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error +type InvoiceLineItemProjectVisitor interface { VisitString(string) error + VisitProject(*Project) error } -func (j *JournalLineRequestCurrency) Accept(visitor JournalLineRequestCurrencyVisitor) error { - switch j.typeName { - default: - return fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "transactionCurrencyEnum": - return visitor.VisitTransactionCurrencyEnum(j.TransactionCurrencyEnum) - case "string": - return visitor.VisitString(j.String) +func (i *InvoiceLineItemProject) Accept(visitor InvoiceLineItemProjectVisitor) error { + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) + } + if i.typ == "Project" || i.Project != nil { + return visitor.VisitProject(i.Project) } + return fmt.Errorf("type %T does not include a non-empty union type", i) } -type JournalLineRequestTrackingCategoriesItem struct { - typeName string +type InvoiceLineItemTrackingCategoriesItem struct { String string TrackingCategory *TrackingCategory + + typ string } -func NewJournalLineRequestTrackingCategoriesItemFromString(value string) *JournalLineRequestTrackingCategoriesItem { - return &JournalLineRequestTrackingCategoriesItem{typeName: "string", String: value} +func (i *InvoiceLineItemTrackingCategoriesItem) GetString() string { + if i == nil { + return "" + } + return i.String } -func NewJournalLineRequestTrackingCategoriesItemFromTrackingCategory(value *TrackingCategory) *JournalLineRequestTrackingCategoriesItem { - return &JournalLineRequestTrackingCategoriesItem{typeName: "trackingCategory", TrackingCategory: value} +func (i *InvoiceLineItemTrackingCategoriesItem) GetTrackingCategory() *TrackingCategory { + if i == nil { + return nil + } + return i.TrackingCategory } -func (j *JournalLineRequestTrackingCategoriesItem) UnmarshalJSON(data []byte) error { +func (i *InvoiceLineItemTrackingCategoriesItem) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - j.typeName = "string" - j.String = valueString + i.typ = "String" + i.String = valueString return nil } valueTrackingCategory := new(TrackingCategory) if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { - j.typeName = "trackingCategory" - j.TrackingCategory = valueTrackingCategory + i.typ = "TrackingCategory" + i.TrackingCategory = valueTrackingCategory return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, j) + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) } -func (j JournalLineRequestTrackingCategoriesItem) MarshalJSON() ([]byte, error) { - switch j.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "string": - return json.Marshal(j.String) - case "trackingCategory": - return json.Marshal(j.TrackingCategory) +func (i InvoiceLineItemTrackingCategoriesItem) MarshalJSON() ([]byte, error) { + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) + } + if i.typ == "TrackingCategory" || i.TrackingCategory != nil { + return json.Marshal(i.TrackingCategory) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) } -type JournalLineRequestTrackingCategoriesItemVisitor interface { +type InvoiceLineItemTrackingCategoriesItemVisitor interface { VisitString(string) error VisitTrackingCategory(*TrackingCategory) error } -func (j *JournalLineRequestTrackingCategoriesItem) Accept(visitor JournalLineRequestTrackingCategoriesItemVisitor) error { - switch j.typeName { - default: - return fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "string": - return visitor.VisitString(j.String) - case "trackingCategory": - return visitor.VisitTrackingCategory(j.TrackingCategory) +func (i *InvoiceLineItemTrackingCategoriesItem) Accept(visitor InvoiceLineItemTrackingCategoriesItemVisitor) error { + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) } + if i.typ == "TrackingCategory" || i.TrackingCategory != nil { + return visitor.VisitTrackingCategory(i.TrackingCategory) + } + return fmt.Errorf("type %T does not include a non-empty union type", i) } -type JournalLineRequestTrackingCategory struct { - typeName string +type InvoiceLineItemTrackingCategory struct { String string TrackingCategory *TrackingCategory + + typ string } -func NewJournalLineRequestTrackingCategoryFromString(value string) *JournalLineRequestTrackingCategory { - return &JournalLineRequestTrackingCategory{typeName: "string", String: value} +func (i *InvoiceLineItemTrackingCategory) GetString() string { + if i == nil { + return "" + } + return i.String } -func NewJournalLineRequestTrackingCategoryFromTrackingCategory(value *TrackingCategory) *JournalLineRequestTrackingCategory { - return &JournalLineRequestTrackingCategory{typeName: "trackingCategory", TrackingCategory: value} +func (i *InvoiceLineItemTrackingCategory) GetTrackingCategory() *TrackingCategory { + if i == nil { + return nil + } + return i.TrackingCategory } -func (j *JournalLineRequestTrackingCategory) UnmarshalJSON(data []byte) error { +func (i *InvoiceLineItemTrackingCategory) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - j.typeName = "string" - j.String = valueString + i.typ = "String" + i.String = valueString return nil } valueTrackingCategory := new(TrackingCategory) if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { - j.typeName = "trackingCategory" - j.TrackingCategory = valueTrackingCategory + i.typ = "TrackingCategory" + i.TrackingCategory = valueTrackingCategory return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, j) + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) } -func (j JournalLineRequestTrackingCategory) MarshalJSON() ([]byte, error) { - switch j.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "string": - return json.Marshal(j.String) - case "trackingCategory": - return json.Marshal(j.TrackingCategory) +func (i InvoiceLineItemTrackingCategory) MarshalJSON() ([]byte, error) { + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) + } + if i.typ == "TrackingCategory" || i.TrackingCategory != nil { + return json.Marshal(i.TrackingCategory) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) } -type JournalLineRequestTrackingCategoryVisitor interface { +type InvoiceLineItemTrackingCategoryVisitor interface { VisitString(string) error VisitTrackingCategory(*TrackingCategory) error } -func (j *JournalLineRequestTrackingCategory) Accept(visitor JournalLineRequestTrackingCategoryVisitor) error { - switch j.typeName { - default: - return fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "string": - return visitor.VisitString(j.String) - case "trackingCategory": - return visitor.VisitTrackingCategory(j.TrackingCategory) +func (i *InvoiceLineItemTrackingCategory) Accept(visitor InvoiceLineItemTrackingCategoryVisitor) error { + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) } + if i.typ == "TrackingCategory" || i.TrackingCategory != nil { + return visitor.VisitTrackingCategory(i.TrackingCategory) + } + return fmt.Errorf("type %T does not include a non-empty union type", i) } -type JournalLineTrackingCategoriesItem struct { - typeName string - String string - TrackingCategory *TrackingCategory +// The payment term that applies to this transaction. +type InvoicePaymentTerm struct { + String string + PaymentTerm *PaymentTerm + + typ string } -func NewJournalLineTrackingCategoriesItemFromString(value string) *JournalLineTrackingCategoriesItem { - return &JournalLineTrackingCategoriesItem{typeName: "string", String: value} +func (i *InvoicePaymentTerm) GetString() string { + if i == nil { + return "" + } + return i.String } -func NewJournalLineTrackingCategoriesItemFromTrackingCategory(value *TrackingCategory) *JournalLineTrackingCategoriesItem { - return &JournalLineTrackingCategoriesItem{typeName: "trackingCategory", TrackingCategory: value} +func (i *InvoicePaymentTerm) GetPaymentTerm() *PaymentTerm { + if i == nil { + return nil + } + return i.PaymentTerm } -func (j *JournalLineTrackingCategoriesItem) UnmarshalJSON(data []byte) error { +func (i *InvoicePaymentTerm) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - j.typeName = "string" - j.String = valueString + i.typ = "String" + i.String = valueString return nil } - valueTrackingCategory := new(TrackingCategory) - if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { - j.typeName = "trackingCategory" - j.TrackingCategory = valueTrackingCategory + valuePaymentTerm := new(PaymentTerm) + if err := json.Unmarshal(data, &valuePaymentTerm); err == nil { + i.typ = "PaymentTerm" + i.PaymentTerm = valuePaymentTerm return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, j) + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) } -func (j JournalLineTrackingCategoriesItem) MarshalJSON() ([]byte, error) { - switch j.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "string": - return json.Marshal(j.String) - case "trackingCategory": - return json.Marshal(j.TrackingCategory) +func (i InvoicePaymentTerm) MarshalJSON() ([]byte, error) { + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) + } + if i.typ == "PaymentTerm" || i.PaymentTerm != nil { + return json.Marshal(i.PaymentTerm) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) } -type JournalLineTrackingCategoriesItemVisitor interface { +type InvoicePaymentTermVisitor interface { VisitString(string) error - VisitTrackingCategory(*TrackingCategory) error + VisitPaymentTerm(*PaymentTerm) error } -func (j *JournalLineTrackingCategoriesItem) Accept(visitor JournalLineTrackingCategoriesItemVisitor) error { - switch j.typeName { - default: - return fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "string": - return visitor.VisitString(j.String) - case "trackingCategory": - return visitor.VisitTrackingCategory(j.TrackingCategory) +func (i *InvoicePaymentTerm) Accept(visitor InvoicePaymentTermVisitor) error { + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) + } + if i.typ == "PaymentTerm" || i.PaymentTerm != nil { + return visitor.VisitPaymentTerm(i.PaymentTerm) } + return fmt.Errorf("type %T does not include a non-empty union type", i) } -type JournalLineTrackingCategory struct { - typeName string - String string - TrackingCategory *TrackingCategory +type InvoicePaymentsItem struct { + String string + Payment *Payment + + typ string } -func NewJournalLineTrackingCategoryFromString(value string) *JournalLineTrackingCategory { - return &JournalLineTrackingCategory{typeName: "string", String: value} +func (i *InvoicePaymentsItem) GetString() string { + if i == nil { + return "" + } + return i.String } -func NewJournalLineTrackingCategoryFromTrackingCategory(value *TrackingCategory) *JournalLineTrackingCategory { - return &JournalLineTrackingCategory{typeName: "trackingCategory", TrackingCategory: value} +func (i *InvoicePaymentsItem) GetPayment() *Payment { + if i == nil { + return nil + } + return i.Payment } -func (j *JournalLineTrackingCategory) UnmarshalJSON(data []byte) error { +func (i *InvoicePaymentsItem) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - j.typeName = "string" - j.String = valueString + i.typ = "String" + i.String = valueString return nil } - valueTrackingCategory := new(TrackingCategory) - if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { - j.typeName = "trackingCategory" - j.TrackingCategory = valueTrackingCategory + valuePayment := new(Payment) + if err := json.Unmarshal(data, &valuePayment); err == nil { + i.typ = "Payment" + i.Payment = valuePayment return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, j) + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) } -func (j JournalLineTrackingCategory) MarshalJSON() ([]byte, error) { - switch j.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "string": - return json.Marshal(j.String) - case "trackingCategory": - return json.Marshal(j.TrackingCategory) +func (i InvoicePaymentsItem) MarshalJSON() ([]byte, error) { + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) + } + if i.typ == "Payment" || i.Payment != nil { + return json.Marshal(i.Payment) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) } -type JournalLineTrackingCategoryVisitor interface { +type InvoicePaymentsItemVisitor interface { VisitString(string) error - VisitTrackingCategory(*TrackingCategory) error + VisitPayment(*Payment) error } -func (j *JournalLineTrackingCategory) Accept(visitor JournalLineTrackingCategoryVisitor) error { - switch j.typeName { - default: - return fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "string": - return visitor.VisitString(j.String) - case "trackingCategory": - return visitor.VisitTrackingCategory(j.TrackingCategory) +func (i *InvoicePaymentsItem) Accept(visitor InvoicePaymentsItemVisitor) error { + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) + } + if i.typ == "Payment" || i.Payment != nil { + return visitor.VisitPayment(i.Payment) } + return fmt.Errorf("type %T does not include a non-empty union type", i) } -// - `en` - en -// - `de` - de -type LanguageEnum string +type InvoicePurchaseOrdersItem struct { + String string + PurchaseOrder *PurchaseOrder -const ( - LanguageEnumEn LanguageEnum = "en" - LanguageEnumDe LanguageEnum = "de" -) + typ string +} -func NewLanguageEnumFromString(s string) (LanguageEnum, error) { - switch s { - case "en": - return LanguageEnumEn, nil - case "de": - return LanguageEnumDe, nil +func (i *InvoicePurchaseOrdersItem) GetString() string { + if i == nil { + return "" } - var t LanguageEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) + return i.String } -func (l LanguageEnum) Ptr() *LanguageEnum { - return &l +func (i *InvoicePurchaseOrdersItem) GetPurchaseOrder() *PurchaseOrder { + if i == nil { + return nil + } + return i.PurchaseOrder } -type LinkToken struct { - LinkToken string `json:"link_token"` - IntegrationName *string `json:"integration_name,omitempty"` - MagicLinkUrl *string `json:"magic_link_url,omitempty"` - - _rawJSON json.RawMessage +func (i *InvoicePurchaseOrdersItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + i.typ = "String" + i.String = valueString + return nil + } + valuePurchaseOrder := new(PurchaseOrder) + if err := json.Unmarshal(data, &valuePurchaseOrder); err == nil { + i.typ = "PurchaseOrder" + i.PurchaseOrder = valuePurchaseOrder + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) } -func (l *LinkToken) UnmarshalJSON(data []byte) error { - type unmarshaler LinkToken - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (i InvoicePurchaseOrdersItem) MarshalJSON() ([]byte, error) { + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) } - *l = LinkToken(value) - l._rawJSON = json.RawMessage(data) - return nil + if i.typ == "PurchaseOrder" || i.PurchaseOrder != nil { + return json.Marshal(i.PurchaseOrder) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) } -func (l *LinkToken) String() string { - if len(l._rawJSON) > 0 { - if value, err := core.StringifyJSON(l._rawJSON); err == nil { - return value - } +type InvoicePurchaseOrdersItemVisitor interface { + VisitString(string) error + VisitPurchaseOrder(*PurchaseOrder) error +} + +func (i *InvoicePurchaseOrdersItem) Accept(visitor InvoicePurchaseOrdersItemVisitor) error { + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) } - if value, err := core.StringifyJSON(l); err == nil { - return value + if i.typ == "PurchaseOrder" || i.PurchaseOrder != nil { + return visitor.VisitPurchaseOrder(i.PurchaseOrder) } - return fmt.Sprintf("%#v", l) + return fmt.Errorf("type %T does not include a non-empty union type", i) } -type LinkedAccountStatus struct { - LinkedAccountStatus string `json:"linked_account_status"` - CanMakeRequest bool `json:"can_make_request"` +// The status of the invoice. +// +// * `PAID` - PAID +// * `DRAFT` - DRAFT +// * `SUBMITTED` - SUBMITTED +// * `PARTIALLY_PAID` - PARTIALLY_PAID +// * `OPEN` - OPEN +// * `VOID` - VOID +type InvoiceStatus struct { + InvoiceStatusEnum InvoiceStatusEnum + String string - _rawJSON json.RawMessage + typ string } -func (l *LinkedAccountStatus) UnmarshalJSON(data []byte) error { - type unmarshaler LinkedAccountStatus - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (i *InvoiceStatus) GetInvoiceStatusEnum() InvoiceStatusEnum { + if i == nil { + return "" + } + return i.InvoiceStatusEnum +} + +func (i *InvoiceStatus) GetString() string { + if i == nil { + return "" + } + return i.String +} + +func (i *InvoiceStatus) UnmarshalJSON(data []byte) error { + var valueInvoiceStatusEnum InvoiceStatusEnum + if err := json.Unmarshal(data, &valueInvoiceStatusEnum); err == nil { + i.typ = "InvoiceStatusEnum" + i.InvoiceStatusEnum = valueInvoiceStatusEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + i.typ = "String" + i.String = valueString + return nil } - *l = LinkedAccountStatus(value) - l._rawJSON = json.RawMessage(data) - return nil + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) } -func (l *LinkedAccountStatus) String() string { - if len(l._rawJSON) > 0 { - if value, err := core.StringifyJSON(l._rawJSON); err == nil { - return value - } +func (i InvoiceStatus) MarshalJSON() ([]byte, error) { + if i.typ == "InvoiceStatusEnum" || i.InvoiceStatusEnum != "" { + return json.Marshal(i.InvoiceStatusEnum) } - if value, err := core.StringifyJSON(l); err == nil { - return value + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) } - return fmt.Sprintf("%#v", l) -} - -type MetaResponse struct { - RequestSchema map[string]interface{} `json:"request_schema,omitempty"` - RemoteFieldClasses map[string]interface{} `json:"remote_field_classes,omitempty"` - Status *LinkedAccountStatus `json:"status,omitempty"` - HasConditionalParams bool `json:"has_conditional_params"` - HasRequiredLinkedAccountParams bool `json:"has_required_linked_account_params"` - - _rawJSON json.RawMessage + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) } -func (m *MetaResponse) UnmarshalJSON(data []byte) error { - type unmarshaler MetaResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *m = MetaResponse(value) - m._rawJSON = json.RawMessage(data) - return nil +type InvoiceStatusVisitor interface { + VisitInvoiceStatusEnum(InvoiceStatusEnum) error + VisitString(string) error } -func (m *MetaResponse) String() string { - if len(m._rawJSON) > 0 { - if value, err := core.StringifyJSON(m._rawJSON); err == nil { - return value - } +func (i *InvoiceStatus) Accept(visitor InvoiceStatusVisitor) error { + if i.typ == "InvoiceStatusEnum" || i.InvoiceStatusEnum != "" { + return visitor.VisitInvoiceStatusEnum(i.InvoiceStatusEnum) } - if value, err := core.StringifyJSON(m); err == nil { - return value + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) } - return fmt.Sprintf("%#v", m) + return fmt.Errorf("type %T does not include a non-empty union type", i) } -// - `GET` - GET -// - `OPTIONS` - OPTIONS -// - `HEAD` - HEAD -// - `POST` - POST -// - `PUT` - PUT -// - `PATCH` - PATCH -// - `DELETE` - DELETE -type MethodEnum string +// * `PAID` - PAID +// * `DRAFT` - DRAFT +// * `SUBMITTED` - SUBMITTED +// * `PARTIALLY_PAID` - PARTIALLY_PAID +// * `OPEN` - OPEN +// * `VOID` - VOID +type InvoiceStatusEnum string const ( - MethodEnumGet MethodEnum = "GET" - MethodEnumOptions MethodEnum = "OPTIONS" - MethodEnumHead MethodEnum = "HEAD" - MethodEnumPost MethodEnum = "POST" - MethodEnumPut MethodEnum = "PUT" - MethodEnumPatch MethodEnum = "PATCH" - MethodEnumDelete MethodEnum = "DELETE" + InvoiceStatusEnumPaid InvoiceStatusEnum = "PAID" + InvoiceStatusEnumDraft InvoiceStatusEnum = "DRAFT" + InvoiceStatusEnumSubmitted InvoiceStatusEnum = "SUBMITTED" + InvoiceStatusEnumPartiallyPaid InvoiceStatusEnum = "PARTIALLY_PAID" + InvoiceStatusEnumOpen InvoiceStatusEnum = "OPEN" + InvoiceStatusEnumVoid InvoiceStatusEnum = "VOID" ) -func NewMethodEnumFromString(s string) (MethodEnum, error) { +func NewInvoiceStatusEnumFromString(s string) (InvoiceStatusEnum, error) { switch s { - case "GET": - return MethodEnumGet, nil - case "OPTIONS": - return MethodEnumOptions, nil - case "HEAD": - return MethodEnumHead, nil - case "POST": - return MethodEnumPost, nil - case "PUT": - return MethodEnumPut, nil - case "PATCH": - return MethodEnumPatch, nil - case "DELETE": - return MethodEnumDelete, nil + case "PAID": + return InvoiceStatusEnumPaid, nil + case "DRAFT": + return InvoiceStatusEnumDraft, nil + case "SUBMITTED": + return InvoiceStatusEnumSubmitted, nil + case "PARTIALLY_PAID": + return InvoiceStatusEnumPartiallyPaid, nil + case "OPEN": + return InvoiceStatusEnumOpen, nil + case "VOID": + return InvoiceStatusEnumVoid, nil } - var t MethodEnum + var t InvoiceStatusEnum return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (m MethodEnum) Ptr() *MethodEnum { - return &m +func (i InvoiceStatusEnum) Ptr() *InvoiceStatusEnum { + return &i } -// # The ModelOperation Object -// -// ### Description -// -// The `ModelOperation` object is used to represent the operations that are currently supported for a given model. -// -// ### Usage Example -// -// View what operations are supported for the `Candidate` endpoint. -type ModelOperation struct { - ModelName string `json:"model_name"` - AvailableOperations []string `json:"available_operations,omitempty"` - RequiredPostParameters []string `json:"required_post_parameters,omitempty"` - SupportedFields []string `json:"supported_fields,omitempty"` +type InvoiceTrackingCategoriesItem struct { + String string + TrackingCategory *TrackingCategory - _rawJSON json.RawMessage + typ string } -func (m *ModelOperation) UnmarshalJSON(data []byte) error { - type unmarshaler ModelOperation - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (i *InvoiceTrackingCategoriesItem) GetString() string { + if i == nil { + return "" } - *m = ModelOperation(value) - m._rawJSON = json.RawMessage(data) - return nil + return i.String } -func (m *ModelOperation) String() string { - if len(m._rawJSON) > 0 { - if value, err := core.StringifyJSON(m._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(m); err == nil { - return value +func (i *InvoiceTrackingCategoriesItem) GetTrackingCategory() *TrackingCategory { + if i == nil { + return nil } - return fmt.Sprintf("%#v", m) + return i.TrackingCategory } -type ModelPermissionDeserializer struct { - IsEnabled *bool `json:"is_enabled,omitempty"` - - _rawJSON json.RawMessage +func (i *InvoiceTrackingCategoriesItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + i.typ = "String" + i.String = valueString + return nil + } + valueTrackingCategory := new(TrackingCategory) + if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { + i.typ = "TrackingCategory" + i.TrackingCategory = valueTrackingCategory + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) } -func (m *ModelPermissionDeserializer) UnmarshalJSON(data []byte) error { - type unmarshaler ModelPermissionDeserializer - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (i InvoiceTrackingCategoriesItem) MarshalJSON() ([]byte, error) { + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) } - *m = ModelPermissionDeserializer(value) - m._rawJSON = json.RawMessage(data) - return nil + if i.typ == "TrackingCategory" || i.TrackingCategory != nil { + return json.Marshal(i.TrackingCategory) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) } -func (m *ModelPermissionDeserializer) String() string { - if len(m._rawJSON) > 0 { - if value, err := core.StringifyJSON(m._rawJSON); err == nil { - return value - } +type InvoiceTrackingCategoriesItemVisitor interface { + VisitString(string) error + VisitTrackingCategory(*TrackingCategory) error +} + +func (i *InvoiceTrackingCategoriesItem) Accept(visitor InvoiceTrackingCategoriesItemVisitor) error { + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) } - if value, err := core.StringifyJSON(m); err == nil { - return value + if i.typ == "TrackingCategory" || i.TrackingCategory != nil { + return visitor.VisitTrackingCategory(i.TrackingCategory) } - return fmt.Sprintf("%#v", m) + return fmt.Errorf("type %T does not include a non-empty union type", i) } -type ModelPermissionDeserializerRequest struct { - IsEnabled *bool `json:"is_enabled,omitempty"` +// * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE +// * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE +type InvoiceTypeEnum string - _rawJSON json.RawMessage -} +const ( + InvoiceTypeEnumAccountsReceivable InvoiceTypeEnum = "ACCOUNTS_RECEIVABLE" + InvoiceTypeEnumAccountsPayable InvoiceTypeEnum = "ACCOUNTS_PAYABLE" +) -func (m *ModelPermissionDeserializerRequest) UnmarshalJSON(data []byte) error { - type unmarshaler ModelPermissionDeserializerRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func NewInvoiceTypeEnumFromString(s string) (InvoiceTypeEnum, error) { + switch s { + case "ACCOUNTS_RECEIVABLE": + return InvoiceTypeEnumAccountsReceivable, nil + case "ACCOUNTS_PAYABLE": + return InvoiceTypeEnumAccountsPayable, nil } - *m = ModelPermissionDeserializerRequest(value) - m._rawJSON = json.RawMessage(data) - return nil + var t InvoiceTypeEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (m *ModelPermissionDeserializerRequest) String() string { - if len(m._rawJSON) > 0 { - if value, err := core.StringifyJSON(m._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(m); err == nil { - return value - } - return fmt.Sprintf("%#v", m) +func (i InvoiceTypeEnum) Ptr() *InvoiceTypeEnum { + return &i } -// # The MultipartFormField Object -// +// # The Item Object // ### Description -// -// The `MultipartFormField` object is used to represent fields in an HTTP request using `multipart/form-data`. +// The `Item` object refers to the goods involved in a transaction. // // ### Usage Example -// -// Create a `MultipartFormField` to define a multipart form entry. -type MultipartFormFieldRequest struct { - // The name of the form field - Name string `json:"name"` - // The data for the form field. - Data string `json:"data"` - // The encoding of the value of `data`. Defaults to `RAW` if not defined. +// Fetch from the `LIST Items` endpoint and view a company's items. +type Item struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The item's name. + Name *string `json:"name,omitempty" url:"name,omitempty"` + // The item's status. // - // - `RAW` - RAW - // - `BASE64` - BASE64 - // - `GZIP_BASE64` - GZIP_BASE64 - Encoding *MultipartFormFieldRequestEncoding `json:"encoding,omitempty"` - // The file name of the form field, if the field is for a file. - FileName *string `json:"file_name,omitempty"` - // The MIME type of the file, if the field is for a file. - ContentType *string `json:"content_type,omitempty"` + // * `ACTIVE` - ACTIVE + // * `ARCHIVED` - ARCHIVED + Status *ItemStatus `json:"status,omitempty" url:"status,omitempty"` + // The item's type. + // + // * `INVENTORY` - INVENTORY + // * `NON_INVENTORY` - NON_INVENTORY + // * `SERVICE` - SERVICE + // * `UNKNOWN` - UNKNOWN + Type *ItemType `json:"type,omitempty" url:"type,omitempty"` + // The item's unit price. + UnitPrice *float64 `json:"unit_price,omitempty" url:"unit_price,omitempty"` + // The price at which the item is purchased from a vendor. + PurchasePrice *float64 `json:"purchase_price,omitempty" url:"purchase_price,omitempty"` + // References the default account used to record a purchase of the item. + PurchaseAccount *ItemPurchaseAccount `json:"purchase_account,omitempty" url:"purchase_account,omitempty"` + // References the default account used to record a sale. + SalesAccount *ItemSalesAccount `json:"sales_account,omitempty" url:"sales_account,omitempty"` + // The company the item belongs to. + Company *ItemCompany `json:"company,omitempty" url:"company,omitempty"` + // The default purchase tax rate for this item. + PurchaseTaxRate *ItemPurchaseTaxRate `json:"purchase_tax_rate,omitempty" url:"purchase_tax_rate,omitempty"` + // The default sales tax rate for this item. + SalesTaxRate *ItemSalesTaxRate `json:"sales_tax_rate,omitempty" url:"sales_tax_rate,omitempty"` + // When the third party's item note was updated. + RemoteUpdatedAt *time.Time `json:"remote_updated_at,omitempty" url:"remote_updated_at,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (m *MultipartFormFieldRequest) UnmarshalJSON(data []byte) error { - type unmarshaler MultipartFormFieldRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (i *Item) GetId() *string { + if i == nil { + return nil } - *m = MultipartFormFieldRequest(value) - m._rawJSON = json.RawMessage(data) - return nil + return i.Id } -func (m *MultipartFormFieldRequest) String() string { - if len(m._rawJSON) > 0 { - if value, err := core.StringifyJSON(m._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(m); err == nil { - return value +func (i *Item) GetRemoteId() *string { + if i == nil { + return nil } - return fmt.Sprintf("%#v", m) -} - -// The encoding of the value of `data`. Defaults to `RAW` if not defined. -// -// - `RAW` - RAW -// - `BASE64` - BASE64 -// - `GZIP_BASE64` - GZIP_BASE64 -type MultipartFormFieldRequestEncoding struct { - typeName string - EncodingEnum EncodingEnum - String string -} - -func NewMultipartFormFieldRequestEncodingFromEncodingEnum(value EncodingEnum) *MultipartFormFieldRequestEncoding { - return &MultipartFormFieldRequestEncoding{typeName: "encodingEnum", EncodingEnum: value} -} - -func NewMultipartFormFieldRequestEncodingFromString(value string) *MultipartFormFieldRequestEncoding { - return &MultipartFormFieldRequestEncoding{typeName: "string", String: value} + return i.RemoteId } -func (m *MultipartFormFieldRequestEncoding) UnmarshalJSON(data []byte) error { - var valueEncodingEnum EncodingEnum - if err := json.Unmarshal(data, &valueEncodingEnum); err == nil { - m.typeName = "encodingEnum" - m.EncodingEnum = valueEncodingEnum +func (i *Item) GetCreatedAt() *time.Time { + if i == nil { return nil } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - m.typeName = "string" - m.String = valueString + return i.CreatedAt +} + +func (i *Item) GetModifiedAt() *time.Time { + if i == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, m) + return i.ModifiedAt } -func (m MultipartFormFieldRequestEncoding) MarshalJSON() ([]byte, error) { - switch m.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", m.typeName, m) - case "encodingEnum": - return json.Marshal(m.EncodingEnum) - case "string": - return json.Marshal(m.String) +func (i *Item) GetName() *string { + if i == nil { + return nil } + return i.Name } -type MultipartFormFieldRequestEncodingVisitor interface { - VisitEncodingEnum(EncodingEnum) error - VisitString(string) error +func (i *Item) GetStatus() *ItemStatus { + if i == nil { + return nil + } + return i.Status } -func (m *MultipartFormFieldRequestEncoding) Accept(visitor MultipartFormFieldRequestEncodingVisitor) error { - switch m.typeName { - default: - return fmt.Errorf("invalid type %s in %T", m.typeName, m) - case "encodingEnum": - return visitor.VisitEncodingEnum(m.EncodingEnum) - case "string": - return visitor.VisitString(m.String) +func (i *Item) GetType() *ItemType { + if i == nil { + return nil } + return i.Type } -type PaginatedAccountDetailsAndActionsList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*AccountDetailsAndActions `json:"results,omitempty"` - - _rawJSON json.RawMessage +func (i *Item) GetUnitPrice() *float64 { + if i == nil { + return nil + } + return i.UnitPrice } -func (p *PaginatedAccountDetailsAndActionsList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedAccountDetailsAndActionsList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (i *Item) GetPurchasePrice() *float64 { + if i == nil { + return nil } - *p = PaginatedAccountDetailsAndActionsList(value) - p._rawJSON = json.RawMessage(data) - return nil + return i.PurchasePrice } -func (p *PaginatedAccountDetailsAndActionsList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value +func (i *Item) GetPurchaseAccount() *ItemPurchaseAccount { + if i == nil { + return nil } - return fmt.Sprintf("%#v", p) + return i.PurchaseAccount } -type PaginatedAccountList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Account `json:"results,omitempty"` - - _rawJSON json.RawMessage +func (i *Item) GetSalesAccount() *ItemSalesAccount { + if i == nil { + return nil + } + return i.SalesAccount } -func (p *PaginatedAccountList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedAccountList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (i *Item) GetCompany() *ItemCompany { + if i == nil { + return nil } - *p = PaginatedAccountList(value) - p._rawJSON = json.RawMessage(data) - return nil + return i.Company } -func (p *PaginatedAccountList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value +func (i *Item) GetPurchaseTaxRate() *ItemPurchaseTaxRate { + if i == nil { + return nil } - return fmt.Sprintf("%#v", p) + return i.PurchaseTaxRate } -type PaginatedAccountingAttachmentList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*AccountingAttachment `json:"results,omitempty"` - - _rawJSON json.RawMessage +func (i *Item) GetSalesTaxRate() *ItemSalesTaxRate { + if i == nil { + return nil + } + return i.SalesTaxRate } -func (p *PaginatedAccountingAttachmentList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedAccountingAttachmentList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (i *Item) GetRemoteUpdatedAt() *time.Time { + if i == nil { + return nil } - *p = PaginatedAccountingAttachmentList(value) - p._rawJSON = json.RawMessage(data) - return nil + return i.RemoteUpdatedAt } -func (p *PaginatedAccountingAttachmentList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } +func (i *Item) GetRemoteWasDeleted() *bool { + if i == nil { + return nil } - if value, err := core.StringifyJSON(p); err == nil { - return value + return i.RemoteWasDeleted +} + +func (i *Item) GetFieldMappings() map[string]interface{} { + if i == nil { + return nil } - return fmt.Sprintf("%#v", p) + return i.FieldMappings } -type PaginatedAccountingPeriodList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*AccountingPeriod `json:"results,omitempty"` +func (i *Item) GetRemoteData() []*RemoteData { + if i == nil { + return nil + } + return i.RemoteData +} - _rawJSON json.RawMessage +func (i *Item) GetExtraProperties() map[string]interface{} { + return i.extraProperties } -func (p *PaginatedAccountingPeriodList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedAccountingPeriodList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { +func (i *Item) UnmarshalJSON(data []byte) error { + type embed Item + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + RemoteUpdatedAt *internal.DateTime `json:"remote_updated_at,omitempty"` + }{ + embed: embed(*i), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { return err } - *p = PaginatedAccountingPeriodList(value) - p._rawJSON = json.RawMessage(data) + *i = Item(unmarshaler.embed) + i.CreatedAt = unmarshaler.CreatedAt.TimePtr() + i.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + i.RemoteUpdatedAt = unmarshaler.RemoteUpdatedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *i) + if err != nil { + return err + } + i.extraProperties = extraProperties + i.rawJSON = json.RawMessage(data) return nil } -func (p *PaginatedAccountingPeriodList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { +func (i *Item) MarshalJSON() ([]byte, error) { + type embed Item + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + RemoteUpdatedAt *internal.DateTime `json:"remote_updated_at,omitempty"` + }{ + embed: embed(*i), + CreatedAt: internal.NewOptionalDateTime(i.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(i.ModifiedAt), + RemoteUpdatedAt: internal.NewOptionalDateTime(i.RemoteUpdatedAt), + } + return json.Marshal(marshaler) +} + +func (i *Item) String() string { + if len(i.rawJSON) > 0 { + if value, err := internal.StringifyJSON(i.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(p); err == nil { + if value, err := internal.StringifyJSON(i); err == nil { return value } - return fmt.Sprintf("%#v", p) + return fmt.Sprintf("%#v", i) } -type PaginatedAuditLogEventList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*AuditLogEvent `json:"results,omitempty"` +// The company the item belongs to. +type ItemCompany struct { + String string + CompanyInfo *CompanyInfo - _rawJSON json.RawMessage + typ string } -func (p *PaginatedAuditLogEventList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedAuditLogEventList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (i *ItemCompany) GetString() string { + if i == nil { + return "" } - *p = PaginatedAuditLogEventList(value) - p._rawJSON = json.RawMessage(data) - return nil + return i.String } -func (p *PaginatedAuditLogEventList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value +func (i *ItemCompany) GetCompanyInfo() *CompanyInfo { + if i == nil { + return nil } - return fmt.Sprintf("%#v", p) + return i.CompanyInfo } -type PaginatedBalanceSheetList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*BalanceSheet `json:"results,omitempty"` - - _rawJSON json.RawMessage +func (i *ItemCompany) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + i.typ = "String" + i.String = valueString + return nil + } + valueCompanyInfo := new(CompanyInfo) + if err := json.Unmarshal(data, &valueCompanyInfo); err == nil { + i.typ = "CompanyInfo" + i.CompanyInfo = valueCompanyInfo + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) } -func (p *PaginatedBalanceSheetList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedBalanceSheetList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (i ItemCompany) MarshalJSON() ([]byte, error) { + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) } - *p = PaginatedBalanceSheetList(value) - p._rawJSON = json.RawMessage(data) - return nil + if i.typ == "CompanyInfo" || i.CompanyInfo != nil { + return json.Marshal(i.CompanyInfo) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) } -func (p *PaginatedBalanceSheetList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } +type ItemCompanyVisitor interface { + VisitString(string) error + VisitCompanyInfo(*CompanyInfo) error +} + +func (i *ItemCompany) Accept(visitor ItemCompanyVisitor) error { + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) } - if value, err := core.StringifyJSON(p); err == nil { - return value + if i.typ == "CompanyInfo" || i.CompanyInfo != nil { + return visitor.VisitCompanyInfo(i.CompanyInfo) } - return fmt.Sprintf("%#v", p) + return fmt.Errorf("type %T does not include a non-empty union type", i) } -type PaginatedBankFeedAccountList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*BankFeedAccount `json:"results,omitempty"` +// * `string` - uuid +// * `number` - url +// * `date` - email +// * `datetime` - phone +// * `bool` - currency +// * `list` - decimal +type ItemFormatEnum string - _rawJSON json.RawMessage -} +const ( + ItemFormatEnumString ItemFormatEnum = "string" + ItemFormatEnumNumber ItemFormatEnum = "number" + ItemFormatEnumDate ItemFormatEnum = "date" + ItemFormatEnumDatetime ItemFormatEnum = "datetime" + ItemFormatEnumBool ItemFormatEnum = "bool" + ItemFormatEnumList ItemFormatEnum = "list" +) -func (p *PaginatedBankFeedAccountList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedBankFeedAccountList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func NewItemFormatEnumFromString(s string) (ItemFormatEnum, error) { + switch s { + case "string": + return ItemFormatEnumString, nil + case "number": + return ItemFormatEnumNumber, nil + case "date": + return ItemFormatEnumDate, nil + case "datetime": + return ItemFormatEnumDatetime, nil + case "bool": + return ItemFormatEnumBool, nil + case "list": + return ItemFormatEnumList, nil } - *p = PaginatedBankFeedAccountList(value) - p._rawJSON = json.RawMessage(data) - return nil + var t ItemFormatEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (p *PaginatedBankFeedAccountList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) +func (i ItemFormatEnum) Ptr() *ItemFormatEnum { + return &i } -type PaginatedBankFeedTransactionList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*BankFeedTransaction `json:"results,omitempty"` +// References the default account used to record a purchase of the item. +type ItemPurchaseAccount struct { + String string + Account *Account - _rawJSON json.RawMessage + typ string } -func (p *PaginatedBankFeedTransactionList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedBankFeedTransactionList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (i *ItemPurchaseAccount) GetString() string { + if i == nil { + return "" } - *p = PaginatedBankFeedTransactionList(value) - p._rawJSON = json.RawMessage(data) - return nil + return i.String } -func (p *PaginatedBankFeedTransactionList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value +func (i *ItemPurchaseAccount) GetAccount() *Account { + if i == nil { + return nil } - return fmt.Sprintf("%#v", p) + return i.Account } -type PaginatedCashFlowStatementList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*CashFlowStatement `json:"results,omitempty"` - - _rawJSON json.RawMessage +func (i *ItemPurchaseAccount) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + i.typ = "String" + i.String = valueString + return nil + } + valueAccount := new(Account) + if err := json.Unmarshal(data, &valueAccount); err == nil { + i.typ = "Account" + i.Account = valueAccount + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) } -func (p *PaginatedCashFlowStatementList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedCashFlowStatementList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (i ItemPurchaseAccount) MarshalJSON() ([]byte, error) { + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) } - *p = PaginatedCashFlowStatementList(value) - p._rawJSON = json.RawMessage(data) - return nil + if i.typ == "Account" || i.Account != nil { + return json.Marshal(i.Account) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) } -func (p *PaginatedCashFlowStatementList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } +type ItemPurchaseAccountVisitor interface { + VisitString(string) error + VisitAccount(*Account) error +} + +func (i *ItemPurchaseAccount) Accept(visitor ItemPurchaseAccountVisitor) error { + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) } - if value, err := core.StringifyJSON(p); err == nil { - return value + if i.typ == "Account" || i.Account != nil { + return visitor.VisitAccount(i.Account) } - return fmt.Sprintf("%#v", p) + return fmt.Errorf("type %T does not include a non-empty union type", i) } -type PaginatedCompanyInfoList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*CompanyInfo `json:"results,omitempty"` +// The default purchase tax rate for this item. +type ItemPurchaseTaxRate struct { + String string + TaxRate *TaxRate - _rawJSON json.RawMessage + typ string } -func (p *PaginatedCompanyInfoList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedCompanyInfoList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (i *ItemPurchaseTaxRate) GetString() string { + if i == nil { + return "" } - *p = PaginatedCompanyInfoList(value) - p._rawJSON = json.RawMessage(data) - return nil + return i.String } -func (p *PaginatedCompanyInfoList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value +func (i *ItemPurchaseTaxRate) GetTaxRate() *TaxRate { + if i == nil { + return nil } - return fmt.Sprintf("%#v", p) + return i.TaxRate } -type PaginatedContactList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Contact `json:"results,omitempty"` - - _rawJSON json.RawMessage +func (i *ItemPurchaseTaxRate) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + i.typ = "String" + i.String = valueString + return nil + } + valueTaxRate := new(TaxRate) + if err := json.Unmarshal(data, &valueTaxRate); err == nil { + i.typ = "TaxRate" + i.TaxRate = valueTaxRate + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) } -func (p *PaginatedContactList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedContactList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (i ItemPurchaseTaxRate) MarshalJSON() ([]byte, error) { + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) } - *p = PaginatedContactList(value) - p._rawJSON = json.RawMessage(data) - return nil + if i.typ == "TaxRate" || i.TaxRate != nil { + return json.Marshal(i.TaxRate) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) } -func (p *PaginatedContactList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } +type ItemPurchaseTaxRateVisitor interface { + VisitString(string) error + VisitTaxRate(*TaxRate) error +} + +func (i *ItemPurchaseTaxRate) Accept(visitor ItemPurchaseTaxRateVisitor) error { + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) } - if value, err := core.StringifyJSON(p); err == nil { - return value + if i.typ == "TaxRate" || i.TaxRate != nil { + return visitor.VisitTaxRate(i.TaxRate) } - return fmt.Sprintf("%#v", p) + return fmt.Errorf("type %T does not include a non-empty union type", i) } -type PaginatedCreditNoteList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*CreditNote `json:"results,omitempty"` +// References the default account used to record a sale. +type ItemSalesAccount struct { + String string + Account *Account - _rawJSON json.RawMessage + typ string } -func (p *PaginatedCreditNoteList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedCreditNoteList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (i *ItemSalesAccount) GetString() string { + if i == nil { + return "" } - *p = PaginatedCreditNoteList(value) - p._rawJSON = json.RawMessage(data) - return nil + return i.String } -func (p *PaginatedCreditNoteList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value +func (i *ItemSalesAccount) GetAccount() *Account { + if i == nil { + return nil } - return fmt.Sprintf("%#v", p) + return i.Account } -type PaginatedEmployeeList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Employee `json:"results,omitempty"` - - _rawJSON json.RawMessage +func (i *ItemSalesAccount) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + i.typ = "String" + i.String = valueString + return nil + } + valueAccount := new(Account) + if err := json.Unmarshal(data, &valueAccount); err == nil { + i.typ = "Account" + i.Account = valueAccount + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) } -func (p *PaginatedEmployeeList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedEmployeeList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (i ItemSalesAccount) MarshalJSON() ([]byte, error) { + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) } - *p = PaginatedEmployeeList(value) - p._rawJSON = json.RawMessage(data) - return nil + if i.typ == "Account" || i.Account != nil { + return json.Marshal(i.Account) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) +} + +type ItemSalesAccountVisitor interface { + VisitString(string) error + VisitAccount(*Account) error } -func (p *PaginatedEmployeeList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } +func (i *ItemSalesAccount) Accept(visitor ItemSalesAccountVisitor) error { + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) } - if value, err := core.StringifyJSON(p); err == nil { - return value + if i.typ == "Account" || i.Account != nil { + return visitor.VisitAccount(i.Account) } - return fmt.Sprintf("%#v", p) + return fmt.Errorf("type %T does not include a non-empty union type", i) } -type PaginatedExpenseList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Expense `json:"results,omitempty"` +// The default sales tax rate for this item. +type ItemSalesTaxRate struct { + String string + TaxRate *TaxRate - _rawJSON json.RawMessage + typ string } -func (p *PaginatedExpenseList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedExpenseList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (i *ItemSalesTaxRate) GetString() string { + if i == nil { + return "" } - *p = PaginatedExpenseList(value) - p._rawJSON = json.RawMessage(data) - return nil + return i.String } -func (p *PaginatedExpenseList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value +func (i *ItemSalesTaxRate) GetTaxRate() *TaxRate { + if i == nil { + return nil } - return fmt.Sprintf("%#v", p) + return i.TaxRate } -type PaginatedGeneralLedgerTransactionList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*GeneralLedgerTransaction `json:"results,omitempty"` - - _rawJSON json.RawMessage -} - -func (p *PaginatedGeneralLedgerTransactionList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedGeneralLedgerTransactionList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (i *ItemSalesTaxRate) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + i.typ = "String" + i.String = valueString + return nil } - *p = PaginatedGeneralLedgerTransactionList(value) - p._rawJSON = json.RawMessage(data) - return nil + valueTaxRate := new(TaxRate) + if err := json.Unmarshal(data, &valueTaxRate); err == nil { + i.typ = "TaxRate" + i.TaxRate = valueTaxRate + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) } -func (p *PaginatedGeneralLedgerTransactionList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } +func (i ItemSalesTaxRate) MarshalJSON() ([]byte, error) { + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) } - if value, err := core.StringifyJSON(p); err == nil { - return value + if i.typ == "TaxRate" || i.TaxRate != nil { + return json.Marshal(i.TaxRate) } - return fmt.Sprintf("%#v", p) -} - -type PaginatedIncomeStatementList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*IncomeStatement `json:"results,omitempty"` - - _rawJSON json.RawMessage + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) } -func (p *PaginatedIncomeStatementList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedIncomeStatementList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *p = PaginatedIncomeStatementList(value) - p._rawJSON = json.RawMessage(data) - return nil +type ItemSalesTaxRateVisitor interface { + VisitString(string) error + VisitTaxRate(*TaxRate) error } -func (p *PaginatedIncomeStatementList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } +func (i *ItemSalesTaxRate) Accept(visitor ItemSalesTaxRateVisitor) error { + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) } - if value, err := core.StringifyJSON(p); err == nil { - return value + if i.typ == "TaxRate" || i.TaxRate != nil { + return visitor.VisitTaxRate(i.TaxRate) } - return fmt.Sprintf("%#v", p) + return fmt.Errorf("type %T does not include a non-empty union type", i) } -type PaginatedInvoiceList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Invoice `json:"results,omitempty"` +type ItemSchema struct { + ItemType *ItemTypeEnum `json:"item_type,omitempty" url:"item_type,omitempty"` + ItemFormat *ItemFormatEnum `json:"item_format,omitempty" url:"item_format,omitempty"` + ItemChoices []string `json:"item_choices,omitempty" url:"item_choices,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (p *PaginatedInvoiceList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedInvoiceList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (i *ItemSchema) GetItemType() *ItemTypeEnum { + if i == nil { + return nil } - *p = PaginatedInvoiceList(value) - p._rawJSON = json.RawMessage(data) - return nil + return i.ItemType } -func (p *PaginatedInvoiceList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value +func (i *ItemSchema) GetItemFormat() *ItemFormatEnum { + if i == nil { + return nil } - return fmt.Sprintf("%#v", p) + return i.ItemFormat } -type PaginatedIssueList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Issue `json:"results,omitempty"` +func (i *ItemSchema) GetItemChoices() []string { + if i == nil { + return nil + } + return i.ItemChoices +} - _rawJSON json.RawMessage +func (i *ItemSchema) GetExtraProperties() map[string]interface{} { + return i.extraProperties } -func (p *PaginatedIssueList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedIssueList +func (i *ItemSchema) UnmarshalJSON(data []byte) error { + type unmarshaler ItemSchema var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *p = PaginatedIssueList(value) - p._rawJSON = json.RawMessage(data) + *i = ItemSchema(value) + extraProperties, err := internal.ExtractExtraProperties(data, *i) + if err != nil { + return err + } + i.extraProperties = extraProperties + i.rawJSON = json.RawMessage(data) return nil } -func (p *PaginatedIssueList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { +func (i *ItemSchema) String() string { + if len(i.rawJSON) > 0 { + if value, err := internal.StringifyJSON(i.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(p); err == nil { + if value, err := internal.StringifyJSON(i); err == nil { return value } - return fmt.Sprintf("%#v", p) + return fmt.Sprintf("%#v", i) } -type PaginatedItemList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Item `json:"results,omitempty"` +// The item's status. +// +// * `ACTIVE` - ACTIVE +// * `ARCHIVED` - ARCHIVED +type ItemStatus struct { + Status7D1Enum Status7D1Enum + String string - _rawJSON json.RawMessage + typ string } -func (p *PaginatedItemList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedItemList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (i *ItemStatus) GetStatus7D1Enum() Status7D1Enum { + if i == nil { + return "" } - *p = PaginatedItemList(value) - p._rawJSON = json.RawMessage(data) - return nil + return i.Status7D1Enum } -func (p *PaginatedItemList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value +func (i *ItemStatus) GetString() string { + if i == nil { + return "" } - return fmt.Sprintf("%#v", p) + return i.String } -type PaginatedJournalEntryList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*JournalEntry `json:"results,omitempty"` - - _rawJSON json.RawMessage +func (i *ItemStatus) UnmarshalJSON(data []byte) error { + var valueStatus7D1Enum Status7D1Enum + if err := json.Unmarshal(data, &valueStatus7D1Enum); err == nil { + i.typ = "Status7D1Enum" + i.Status7D1Enum = valueStatus7D1Enum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + i.typ = "String" + i.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) } -func (p *PaginatedJournalEntryList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedJournalEntryList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (i ItemStatus) MarshalJSON() ([]byte, error) { + if i.typ == "Status7D1Enum" || i.Status7D1Enum != "" { + return json.Marshal(i.Status7D1Enum) } - *p = PaginatedJournalEntryList(value) - p._rawJSON = json.RawMessage(data) - return nil + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) } -func (p *PaginatedJournalEntryList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } +type ItemStatusVisitor interface { + VisitStatus7D1Enum(Status7D1Enum) error + VisitString(string) error +} + +func (i *ItemStatus) Accept(visitor ItemStatusVisitor) error { + if i.typ == "Status7D1Enum" || i.Status7D1Enum != "" { + return visitor.VisitStatus7D1Enum(i.Status7D1Enum) } - if value, err := core.StringifyJSON(p); err == nil { - return value + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) } - return fmt.Sprintf("%#v", p) + return fmt.Errorf("type %T does not include a non-empty union type", i) } -type PaginatedPaymentList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Payment `json:"results,omitempty"` +// The item's type. +// +// * `INVENTORY` - INVENTORY +// * `NON_INVENTORY` - NON_INVENTORY +// * `SERVICE` - SERVICE +// * `UNKNOWN` - UNKNOWN +type ItemType struct { + Type2BbEnum Type2BbEnum + String string - _rawJSON json.RawMessage + typ string } -func (p *PaginatedPaymentList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedPaymentList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (i *ItemType) GetType2BbEnum() Type2BbEnum { + if i == nil { + return "" } - *p = PaginatedPaymentList(value) - p._rawJSON = json.RawMessage(data) - return nil + return i.Type2BbEnum } -func (p *PaginatedPaymentList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value +func (i *ItemType) GetString() string { + if i == nil { + return "" } - return fmt.Sprintf("%#v", p) + return i.String } -type PaginatedPurchaseOrderList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*PurchaseOrder `json:"results,omitempty"` - - _rawJSON json.RawMessage +func (i *ItemType) UnmarshalJSON(data []byte) error { + var valueType2BbEnum Type2BbEnum + if err := json.Unmarshal(data, &valueType2BbEnum); err == nil { + i.typ = "Type2BbEnum" + i.Type2BbEnum = valueType2BbEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + i.typ = "String" + i.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) } -func (p *PaginatedPurchaseOrderList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedPurchaseOrderList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (i ItemType) MarshalJSON() ([]byte, error) { + if i.typ == "Type2BbEnum" || i.Type2BbEnum != "" { + return json.Marshal(i.Type2BbEnum) } - *p = PaginatedPurchaseOrderList(value) - p._rawJSON = json.RawMessage(data) - return nil + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) } -func (p *PaginatedPurchaseOrderList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } +type ItemTypeVisitor interface { + VisitType2BbEnum(Type2BbEnum) error + VisitString(string) error +} + +func (i *ItemType) Accept(visitor ItemTypeVisitor) error { + if i.typ == "Type2BbEnum" || i.Type2BbEnum != "" { + return visitor.VisitType2BbEnum(i.Type2BbEnum) } - if value, err := core.StringifyJSON(p); err == nil { - return value + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) } - return fmt.Sprintf("%#v", p) + return fmt.Errorf("type %T does not include a non-empty union type", i) } -type PaginatedRemoteFieldClassList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*RemoteFieldClass `json:"results,omitempty"` +// * `string` - string +// * `number` - number +// * `date` - date +// * `datetime` - datetime +// * `bool` - bool +// * `list` - list +type ItemTypeEnum string - _rawJSON json.RawMessage -} +const ( + ItemTypeEnumString ItemTypeEnum = "string" + ItemTypeEnumNumber ItemTypeEnum = "number" + ItemTypeEnumDate ItemTypeEnum = "date" + ItemTypeEnumDatetime ItemTypeEnum = "datetime" + ItemTypeEnumBool ItemTypeEnum = "bool" + ItemTypeEnumList ItemTypeEnum = "list" +) -func (p *PaginatedRemoteFieldClassList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedRemoteFieldClassList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func NewItemTypeEnumFromString(s string) (ItemTypeEnum, error) { + switch s { + case "string": + return ItemTypeEnumString, nil + case "number": + return ItemTypeEnumNumber, nil + case "date": + return ItemTypeEnumDate, nil + case "datetime": + return ItemTypeEnumDatetime, nil + case "bool": + return ItemTypeEnumBool, nil + case "list": + return ItemTypeEnumList, nil } - *p = PaginatedRemoteFieldClassList(value) - p._rawJSON = json.RawMessage(data) - return nil + var t ItemTypeEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (p *PaginatedRemoteFieldClassList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) +func (i ItemTypeEnum) Ptr() *ItemTypeEnum { + return &i } -type PaginatedSyncStatusList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*SyncStatus `json:"results,omitempty"` +// * `SYNCING` - SYNCING +// * `DONE` - DONE +// * `FAILED` - FAILED +// * `DISABLED` - DISABLED +// * `PAUSED` - PAUSED +// * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED +type LastSyncResultEnum string - _rawJSON json.RawMessage -} +const ( + LastSyncResultEnumSyncing LastSyncResultEnum = "SYNCING" + LastSyncResultEnumDone LastSyncResultEnum = "DONE" + LastSyncResultEnumFailed LastSyncResultEnum = "FAILED" + LastSyncResultEnumDisabled LastSyncResultEnum = "DISABLED" + LastSyncResultEnumPaused LastSyncResultEnum = "PAUSED" + LastSyncResultEnumPartiallySynced LastSyncResultEnum = "PARTIALLY_SYNCED" +) -func (p *PaginatedSyncStatusList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedSyncStatusList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func NewLastSyncResultEnumFromString(s string) (LastSyncResultEnum, error) { + switch s { + case "SYNCING": + return LastSyncResultEnumSyncing, nil + case "DONE": + return LastSyncResultEnumDone, nil + case "FAILED": + return LastSyncResultEnumFailed, nil + case "DISABLED": + return LastSyncResultEnumDisabled, nil + case "PAUSED": + return LastSyncResultEnumPaused, nil + case "PARTIALLY_SYNCED": + return LastSyncResultEnumPartiallySynced, nil } - *p = PaginatedSyncStatusList(value) - p._rawJSON = json.RawMessage(data) - return nil + var t LastSyncResultEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (p *PaginatedSyncStatusList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) +func (l LastSyncResultEnum) Ptr() *LastSyncResultEnum { + return &l } -type PaginatedTaxRateList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*TaxRate `json:"results,omitempty"` +type LinkedAccountStatus struct { + LinkedAccountStatus string `json:"linked_account_status" url:"linked_account_status"` + CanMakeRequest bool `json:"can_make_request" url:"can_make_request"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (p *PaginatedTaxRateList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedTaxRateList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (l *LinkedAccountStatus) GetLinkedAccountStatus() string { + if l == nil { + return "" } - *p = PaginatedTaxRateList(value) - p._rawJSON = json.RawMessage(data) - return nil + return l.LinkedAccountStatus } -func (p *PaginatedTaxRateList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value +func (l *LinkedAccountStatus) GetCanMakeRequest() bool { + if l == nil { + return false } - return fmt.Sprintf("%#v", p) + return l.CanMakeRequest } -type PaginatedTrackingCategoryList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*TrackingCategory `json:"results,omitempty"` - - _rawJSON json.RawMessage +func (l *LinkedAccountStatus) GetExtraProperties() map[string]interface{} { + return l.extraProperties } -func (p *PaginatedTrackingCategoryList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedTrackingCategoryList +func (l *LinkedAccountStatus) UnmarshalJSON(data []byte) error { + type unmarshaler LinkedAccountStatus var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *p = PaginatedTrackingCategoryList(value) - p._rawJSON = json.RawMessage(data) + *l = LinkedAccountStatus(value) + extraProperties, err := internal.ExtractExtraProperties(data, *l) + if err != nil { + return err + } + l.extraProperties = extraProperties + l.rawJSON = json.RawMessage(data) return nil } -func (p *PaginatedTrackingCategoryList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { +func (l *LinkedAccountStatus) String() string { + if len(l.rawJSON) > 0 { + if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(p); err == nil { + if value, err := internal.StringifyJSON(l); err == nil { return value } - return fmt.Sprintf("%#v", p) + return fmt.Sprintf("%#v", l) } -type PaginatedTransactionList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Transaction `json:"results,omitempty"` +type MetaResponse struct { + RequestSchema map[string]interface{} `json:"request_schema" url:"request_schema"` + RemoteFieldClasses map[string]interface{} `json:"remote_field_classes,omitempty" url:"remote_field_classes,omitempty"` + Status *LinkedAccountStatus `json:"status,omitempty" url:"status,omitempty"` + HasConditionalParams bool `json:"has_conditional_params" url:"has_conditional_params"` + HasRequiredLinkedAccountParams bool `json:"has_required_linked_account_params" url:"has_required_linked_account_params"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (p *PaginatedTransactionList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedTransactionList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (m *MetaResponse) GetRequestSchema() map[string]interface{} { + if m == nil { + return nil } - *p = PaginatedTransactionList(value) - p._rawJSON = json.RawMessage(data) - return nil + return m.RequestSchema } -func (p *PaginatedTransactionList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value +func (m *MetaResponse) GetRemoteFieldClasses() map[string]interface{} { + if m == nil { + return nil } - return fmt.Sprintf("%#v", p) + return m.RemoteFieldClasses } -type PaginatedVendorCreditList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*VendorCredit `json:"results,omitempty"` - - _rawJSON json.RawMessage +func (m *MetaResponse) GetStatus() *LinkedAccountStatus { + if m == nil { + return nil + } + return m.Status } -func (p *PaginatedVendorCreditList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedVendorCreditList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (m *MetaResponse) GetHasConditionalParams() bool { + if m == nil { + return false } - *p = PaginatedVendorCreditList(value) - p._rawJSON = json.RawMessage(data) - return nil + return m.HasConditionalParams } -func (p *PaginatedVendorCreditList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } +func (m *MetaResponse) GetHasRequiredLinkedAccountParams() bool { + if m == nil { + return false } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) + return m.HasRequiredLinkedAccountParams } -// # 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. -type PatchedPaymentRequest struct { - // The payment's transaction date. - TransactionDate *time.Time `json:"transaction_date,omitempty"` - // The supplier, or customer involved in the payment. - Contact *PatchedPaymentRequestContact `json:"contact,omitempty"` - // The supplier’s or customer’s account in which the payment is made. - Account *PatchedPaymentRequestAccount `json:"account,omitempty"` - // The payment's currency. - // - // - `XUA` - ADB Unit of Account - // - `AFN` - Afghan Afghani - // - `AFA` - Afghan Afghani (1927–2002) - // - `ALL` - Albanian Lek - // - `ALK` - Albanian Lek (1946–1965) - // - `DZD` - Algerian Dinar - // - `ADP` - Andorran Peseta - // - `AOA` - Angolan Kwanza - // - `AOK` - Angolan Kwanza (1977–1991) - // - `AON` - Angolan New Kwanza (1990–2000) - // - `AOR` - Angolan Readjusted Kwanza (1995–1999) - // - `ARA` - Argentine Austral - // - `ARS` - Argentine Peso - // - `ARM` - Argentine Peso (1881–1970) - // - `ARP` - Argentine Peso (1983–1985) - // - `ARL` - Argentine Peso Ley (1970–1983) - // - `AMD` - Armenian Dram - // - `AWG` - Aruban Florin - // - `AUD` - Australian Dollar - // - `ATS` - Austrian Schilling - // - `AZN` - Azerbaijani Manat - // - `AZM` - Azerbaijani Manat (1993–2006) - // - `BSD` - Bahamian Dollar - // - `BHD` - Bahraini Dinar - // - `BDT` - Bangladeshi Taka - // - `BBD` - Barbadian Dollar - // - `BYN` - Belarusian Ruble - // - `BYB` - Belarusian Ruble (1994–1999) - // - `BYR` - Belarusian Ruble (2000–2016) - // - `BEF` - Belgian Franc - // - `BEC` - Belgian Franc (convertible) - // - `BEL` - Belgian Franc (financial) - // - `BZD` - Belize Dollar - // - `BMD` - Bermudan Dollar - // - `BTN` - Bhutanese Ngultrum - // - `BOB` - Bolivian Boliviano - // - `BOL` - Bolivian Boliviano (1863–1963) - // - `BOV` - Bolivian Mvdol - // - `BOP` - Bolivian Peso - // - `BAM` - Bosnia-Herzegovina Convertible Mark - // - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - // - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - // - `BWP` - Botswanan Pula - // - `BRC` - Brazilian Cruzado (1986–1989) - // - `BRZ` - Brazilian Cruzeiro (1942–1967) - // - `BRE` - Brazilian Cruzeiro (1990–1993) - // - `BRR` - Brazilian Cruzeiro (1993–1994) - // - `BRN` - Brazilian New Cruzado (1989–1990) - // - `BRB` - Brazilian New Cruzeiro (1967–1986) - // - `BRL` - Brazilian Real - // - `GBP` - British Pound - // - `BND` - Brunei Dollar - // - `BGL` - Bulgarian Hard Lev - // - `BGN` - Bulgarian Lev - // - `BGO` - Bulgarian Lev (1879–1952) - // - `BGM` - Bulgarian Socialist Lev - // - `BUK` - Burmese Kyat - // - `BIF` - Burundian Franc - // - `XPF` - CFP Franc - // - `KHR` - Cambodian Riel - // - `CAD` - Canadian Dollar - // - `CVE` - Cape Verdean Escudo - // - `KYD` - Cayman Islands Dollar - // - `XAF` - Central African CFA Franc - // - `CLE` - Chilean Escudo - // - `CLP` - Chilean Peso - // - `CLF` - Chilean Unit of Account (UF) - // - `CNX` - Chinese People’s Bank Dollar - // - `CNY` - Chinese Yuan - // - `CNH` - Chinese Yuan (offshore) - // - `COP` - Colombian Peso - // - `COU` - Colombian Real Value Unit - // - `KMF` - Comorian Franc - // - `CDF` - Congolese Franc - // - `CRC` - Costa Rican Colón - // - `HRD` - Croatian Dinar - // - `HRK` - Croatian Kuna - // - `CUC` - Cuban Convertible Peso - // - `CUP` - Cuban Peso - // - `CYP` - Cypriot Pound - // - `CZK` - Czech Koruna - // - `CSK` - Czechoslovak Hard Koruna - // - `DKK` - Danish Krone - // - `DJF` - Djiboutian Franc - // - `DOP` - Dominican Peso - // - `NLG` - Dutch Guilder - // - `XCD` - East Caribbean Dollar - // - `DDM` - East German Mark - // - `ECS` - Ecuadorian Sucre - // - `ECV` - Ecuadorian Unit of Constant Value - // - `EGP` - Egyptian Pound - // - `GQE` - Equatorial Guinean Ekwele - // - `ERN` - Eritrean Nakfa - // - `EEK` - Estonian Kroon - // - `ETB` - Ethiopian Birr - // - `EUR` - Euro - // - `XBA` - European Composite Unit - // - `XEU` - European Currency Unit - // - `XBB` - European Monetary Unit - // - `XBC` - European Unit of Account (XBC) - // - `XBD` - European Unit of Account (XBD) - // - `FKP` - Falkland Islands Pound - // - `FJD` - Fijian Dollar - // - `FIM` - Finnish Markka - // - `FRF` - French Franc - // - `XFO` - French Gold Franc - // - `XFU` - French UIC-Franc - // - `GMD` - Gambian Dalasi - // - `GEK` - Georgian Kupon Larit - // - `GEL` - Georgian Lari - // - `DEM` - German Mark - // - `GHS` - Ghanaian Cedi - // - `GHC` - Ghanaian Cedi (1979–2007) - // - `GIP` - Gibraltar Pound - // - `XAU` - Gold - // - `GRD` - Greek Drachma - // - `GTQ` - Guatemalan Quetzal - // - `GWP` - Guinea-Bissau Peso - // - `GNF` - Guinean Franc - // - `GNS` - Guinean Syli - // - `GYD` - Guyanaese Dollar - // - `HTG` - Haitian Gourde - // - `HNL` - Honduran Lempira - // - `HKD` - Hong Kong Dollar - // - `HUF` - Hungarian Forint - // - `IMP` - IMP - // - `ISK` - Icelandic Króna - // - `ISJ` - Icelandic Króna (1918–1981) - // - `INR` - Indian Rupee - // - `IDR` - Indonesian Rupiah - // - `IRR` - Iranian Rial - // - `IQD` - Iraqi Dinar - // - `IEP` - Irish Pound - // - `ILS` - Israeli New Shekel - // - `ILP` - Israeli Pound - // - `ILR` - Israeli Shekel (1980–1985) - // - `ITL` - Italian Lira - // - `JMD` - Jamaican Dollar - // - `JPY` - Japanese Yen - // - `JOD` - Jordanian Dinar - // - `KZT` - Kazakhstani Tenge - // - `KES` - Kenyan Shilling - // - `KWD` - Kuwaiti Dinar - // - `KGS` - Kyrgystani Som - // - `LAK` - Laotian Kip - // - `LVL` - Latvian Lats - // - `LVR` - Latvian Ruble - // - `LBP` - Lebanese Pound - // - `LSL` - Lesotho Loti - // - `LRD` - Liberian Dollar - // - `LYD` - Libyan Dinar - // - `LTL` - Lithuanian Litas - // - `LTT` - Lithuanian Talonas - // - `LUL` - Luxembourg Financial Franc - // - `LUC` - Luxembourgian Convertible Franc - // - `LUF` - Luxembourgian Franc - // - `MOP` - Macanese Pataca - // - `MKD` - Macedonian Denar - // - `MKN` - Macedonian Denar (1992–1993) - // - `MGA` - Malagasy Ariary - // - `MGF` - Malagasy Franc - // - `MWK` - Malawian Kwacha - // - `MYR` - Malaysian Ringgit - // - `MVR` - Maldivian Rufiyaa - // - `MVP` - Maldivian Rupee (1947–1981) - // - `MLF` - Malian Franc - // - `MTL` - Maltese Lira - // - `MTP` - Maltese Pound - // - `MRU` - Mauritanian Ouguiya - // - `MRO` - Mauritanian Ouguiya (1973–2017) - // - `MUR` - Mauritian Rupee - // - `MXV` - Mexican Investment Unit - // - `MXN` - Mexican Peso - // - `MXP` - Mexican Silver Peso (1861–1992) - // - `MDC` - Moldovan Cupon - // - `MDL` - Moldovan Leu - // - `MCF` - Monegasque Franc - // - `MNT` - Mongolian Tugrik - // - `MAD` - Moroccan Dirham - // - `MAF` - Moroccan Franc - // - `MZE` - Mozambican Escudo - // - `MZN` - Mozambican Metical - // - `MZM` - Mozambican Metical (1980–2006) - // - `MMK` - Myanmar Kyat - // - `NAD` - Namibian Dollar - // - `NPR` - Nepalese Rupee - // - `ANG` - Netherlands Antillean Guilder - // - `TWD` - New Taiwan Dollar - // - `NZD` - New Zealand Dollar - // - `NIO` - Nicaraguan Córdoba - // - `NIC` - Nicaraguan Córdoba (1988–1991) - // - `NGN` - Nigerian Naira - // - `KPW` - North Korean Won - // - `NOK` - Norwegian Krone - // - `OMR` - Omani Rial - // - `PKR` - Pakistani Rupee - // - `XPD` - Palladium - // - `PAB` - Panamanian Balboa - // - `PGK` - Papua New Guinean Kina - // - `PYG` - Paraguayan Guarani - // - `PEI` - Peruvian Inti - // - `PEN` - Peruvian Sol - // - `PES` - Peruvian Sol (1863–1965) - // - `PHP` - Philippine Peso - // - `XPT` - Platinum - // - `PLN` - Polish Zloty - // - `PLZ` - Polish Zloty (1950–1995) - // - `PTE` - Portuguese Escudo - // - `GWE` - Portuguese Guinea Escudo - // - `QAR` - Qatari Rial - // - `XRE` - RINET Funds - // - `RHD` - Rhodesian Dollar - // - `RON` - Romanian Leu - // - `ROL` - Romanian Leu (1952–2006) - // - `RUB` - Russian Ruble - // - `RUR` - Russian Ruble (1991–1998) - // - `RWF` - Rwandan Franc - // - `SVC` - Salvadoran Colón - // - `WST` - Samoan Tala - // - `SAR` - Saudi Riyal - // - `RSD` - Serbian Dinar - // - `CSD` - Serbian Dinar (2002–2006) - // - `SCR` - Seychellois Rupee - // - `SLL` - Sierra Leonean Leone - // - `XAG` - Silver - // - `SGD` - Singapore Dollar - // - `SKK` - Slovak Koruna - // - `SIT` - Slovenian Tolar - // - `SBD` - Solomon Islands Dollar - // - `SOS` - Somali Shilling - // - `ZAR` - South African Rand - // - `ZAL` - South African Rand (financial) - // - `KRH` - South Korean Hwan (1953–1962) - // - `KRW` - South Korean Won - // - `KRO` - South Korean Won (1945–1953) - // - `SSP` - South Sudanese Pound - // - `SUR` - Soviet Rouble - // - `ESP` - Spanish Peseta - // - `ESA` - Spanish Peseta (A account) - // - `ESB` - Spanish Peseta (convertible account) - // - `XDR` - Special Drawing Rights - // - `LKR` - Sri Lankan Rupee - // - `SHP` - St. Helena Pound - // - `XSU` - Sucre - // - `SDD` - Sudanese Dinar (1992–2007) - // - `SDG` - Sudanese Pound - // - `SDP` - Sudanese Pound (1957–1998) - // - `SRD` - Surinamese Dollar - // - `SRG` - Surinamese Guilder - // - `SZL` - Swazi Lilangeni - // - `SEK` - Swedish Krona - // - `CHF` - Swiss Franc - // - `SYP` - Syrian Pound - // - `STN` - São Tomé & Príncipe Dobra - // - `STD` - São Tomé & Príncipe Dobra (1977–2017) - // - `TVD` - TVD - // - `TJR` - Tajikistani Ruble - // - `TJS` - Tajikistani Somoni - // - `TZS` - Tanzanian Shilling - // - `XTS` - Testing Currency Code - // - `THB` - Thai Baht - // - `XXX` - The codes assigned for transactions where no currency is involved - // - `TPE` - Timorese Escudo - // - `TOP` - Tongan Paʻanga - // - `TTD` - Trinidad & Tobago Dollar - // - `TND` - Tunisian Dinar - // - `TRY` - Turkish Lira - // - `TRL` - Turkish Lira (1922–2005) - // - `TMT` - Turkmenistani Manat - // - `TMM` - Turkmenistani Manat (1993–2009) - // - `USD` - US Dollar - // - `USN` - US Dollar (Next day) - // - `USS` - US Dollar (Same day) - // - `UGX` - Ugandan Shilling - // - `UGS` - Ugandan Shilling (1966–1987) - // - `UAH` - Ukrainian Hryvnia - // - `UAK` - Ukrainian Karbovanets - // - `AED` - United Arab Emirates Dirham - // - `UYW` - Uruguayan Nominal Wage Index Unit - // - `UYU` - Uruguayan Peso - // - `UYP` - Uruguayan Peso (1975–1993) - // - `UYI` - Uruguayan Peso (Indexed Units) - // - `UZS` - Uzbekistani Som - // - `VUV` - Vanuatu Vatu - // - `VES` - Venezuelan Bolívar - // - `VEB` - Venezuelan Bolívar (1871–2008) - // - `VEF` - Venezuelan Bolívar (2008–2018) - // - `VND` - Vietnamese Dong - // - `VNN` - Vietnamese Dong (1978–1985) - // - `CHE` - WIR Euro - // - `CHW` - WIR Franc - // - `XOF` - West African CFA Franc - // - `YDD` - Yemeni Dinar - // - `YER` - Yemeni Rial - // - `YUN` - Yugoslavian Convertible Dinar (1990–1992) - // - `YUD` - Yugoslavian Hard Dinar (1966–1990) - // - `YUM` - Yugoslavian New Dinar (1994–2002) - // - `YUR` - Yugoslavian Reformed Dinar (1992–1993) - // - `ZWN` - ZWN - // - `ZRN` - Zairean New Zaire (1993–1998) - // - `ZRZ` - Zairean Zaire (1971–1993) - // - `ZMW` - Zambian Kwacha - // - `ZMK` - Zambian Kwacha (1968–2012) - // - `ZWD` - Zimbabwean Dollar (1980–2008) - // - `ZWR` - Zimbabwean Dollar (2008) - // - `ZWL` - Zimbabwean Dollar (2009) - Currency *PatchedPaymentRequestCurrency `json:"currency,omitempty"` - // The payment's exchange rate. - ExchangeRate *string `json:"exchange_rate,omitempty"` - // The company the payment belongs to. - Company *PatchedPaymentRequestCompany `json:"company,omitempty"` - // The total amount of money being paid to the supplier, or customer, after taxes. - TotalAmount *float64 `json:"total_amount,omitempty"` - // The type of the invoice. - // - // - `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE - // - `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE - Type *PatchedPaymentRequestType `json:"type,omitempty"` - TrackingCategories []*PatchedPaymentRequestTrackingCategoriesItem `json:"tracking_categories,omitempty"` - // The accounting period that the Payment was generated in. - AccountingPeriod *PatchedPaymentRequestAccountingPeriod `json:"accounting_period,omitempty"` - // A list of “Payment Applied to Lines” objects. - AppliedToLines []*PatchedPaymentRequestAppliedToLinesItem `json:"applied_to_lines,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` - RemoteFields []*RemoteFieldRequest `json:"remote_fields,omitempty"` - - _rawJSON json.RawMessage +func (m *MetaResponse) GetExtraProperties() map[string]interface{} { + return m.extraProperties } -func (p *PatchedPaymentRequest) UnmarshalJSON(data []byte) error { - type unmarshaler PatchedPaymentRequest +func (m *MetaResponse) UnmarshalJSON(data []byte) error { + type unmarshaler MetaResponse var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *p = PatchedPaymentRequest(value) - p._rawJSON = json.RawMessage(data) + *m = MetaResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *m) + if err != nil { + return err + } + m.extraProperties = extraProperties + m.rawJSON = json.RawMessage(data) return nil } -func (p *PatchedPaymentRequest) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { +func (m *MetaResponse) String() string { + if len(m.rawJSON) > 0 { + if value, err := internal.StringifyJSON(m.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(p); err == nil { + if value, err := internal.StringifyJSON(m); err == nil { return value } - return fmt.Sprintf("%#v", p) -} - -// The supplier’s or customer’s account in which the payment is made. -type PatchedPaymentRequestAccount struct { - typeName string - String string - Account *Account + return fmt.Sprintf("%#v", m) } -func NewPatchedPaymentRequestAccountFromString(value string) *PatchedPaymentRequestAccount { - return &PatchedPaymentRequestAccount{typeName: "string", String: value} -} +// * `GET` - GET +// * `OPTIONS` - OPTIONS +// * `HEAD` - HEAD +// * `POST` - POST +// * `PUT` - PUT +// * `PATCH` - PATCH +// * `DELETE` - DELETE +type MethodEnum string -func NewPatchedPaymentRequestAccountFromAccount(value *Account) *PatchedPaymentRequestAccount { - return &PatchedPaymentRequestAccount{typeName: "account", Account: value} -} +const ( + MethodEnumGet MethodEnum = "GET" + MethodEnumOptions MethodEnum = "OPTIONS" + MethodEnumHead MethodEnum = "HEAD" + MethodEnumPost MethodEnum = "POST" + MethodEnumPut MethodEnum = "PUT" + MethodEnumPatch MethodEnum = "PATCH" + MethodEnumDelete MethodEnum = "DELETE" +) -func (p *PatchedPaymentRequestAccount) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" - p.String = valueString - return nil - } - valueAccount := new(Account) - if err := json.Unmarshal(data, &valueAccount); err == nil { - p.typeName = "account" - p.Account = valueAccount - return nil +func NewMethodEnumFromString(s string) (MethodEnum, error) { + switch s { + case "GET": + return MethodEnumGet, nil + case "OPTIONS": + return MethodEnumOptions, nil + case "HEAD": + return MethodEnumHead, nil + case "POST": + return MethodEnumPost, nil + case "PUT": + return MethodEnumPut, nil + case "PATCH": + return MethodEnumPatch, nil + case "DELETE": + return MethodEnumDelete, nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, p) + var t MethodEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (p PatchedPaymentRequestAccount) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": - return json.Marshal(p.String) - case "account": - return json.Marshal(p.Account) - } +func (m MethodEnum) Ptr() *MethodEnum { + return &m } -type PatchedPaymentRequestAccountVisitor interface { - VisitString(string) error - VisitAccount(*Account) error -} +// * `CREDIT_CARD` - CREDIT_CARD +// * `DEBIT_CARD` - DEBIT_CARD +// * `ACH` - ACH +// * `CASH` - CASH +// * `CHECK` - CHECK +type MethodTypeEnum string -func (p *PatchedPaymentRequestAccount) Accept(visitor PatchedPaymentRequestAccountVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": - return visitor.VisitString(p.String) - case "account": - return visitor.VisitAccount(p.Account) - } +const ( + MethodTypeEnumCreditCard MethodTypeEnum = "CREDIT_CARD" + MethodTypeEnumDebitCard MethodTypeEnum = "DEBIT_CARD" + MethodTypeEnumAch MethodTypeEnum = "ACH" + MethodTypeEnumCash MethodTypeEnum = "CASH" + MethodTypeEnumCheck MethodTypeEnum = "CHECK" +) + +func NewMethodTypeEnumFromString(s string) (MethodTypeEnum, error) { + switch s { + case "CREDIT_CARD": + return MethodTypeEnumCreditCard, nil + case "DEBIT_CARD": + return MethodTypeEnumDebitCard, nil + case "ACH": + return MethodTypeEnumAch, nil + case "CASH": + return MethodTypeEnumCash, nil + case "CHECK": + return MethodTypeEnumCheck, nil + } + var t MethodTypeEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -// The accounting period that the Payment was generated in. -type PatchedPaymentRequestAccountingPeriod struct { - typeName string - String string - AccountingPeriod *AccountingPeriod +func (m MethodTypeEnum) Ptr() *MethodTypeEnum { + return &m } -func NewPatchedPaymentRequestAccountingPeriodFromString(value string) *PatchedPaymentRequestAccountingPeriod { - return &PatchedPaymentRequestAccountingPeriod{typeName: "string", String: value} +// # The ModelOperation Object +// ### Description +// The `ModelOperation` object is used to represent the operations that are currently supported for a given model. +// +// ### Usage Example +// View what operations are supported for the `Candidate` endpoint. +type ModelOperation struct { + ModelName string `json:"model_name" url:"model_name"` + AvailableOperations []string `json:"available_operations" url:"available_operations"` + RequiredPostParameters []string `json:"required_post_parameters" url:"required_post_parameters"` + SupportedFields []string `json:"supported_fields" url:"supported_fields"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func NewPatchedPaymentRequestAccountingPeriodFromAccountingPeriod(value *AccountingPeriod) *PatchedPaymentRequestAccountingPeriod { - return &PatchedPaymentRequestAccountingPeriod{typeName: "accountingPeriod", AccountingPeriod: value} +func (m *ModelOperation) GetModelName() string { + if m == nil { + return "" + } + return m.ModelName } -func (p *PatchedPaymentRequestAccountingPeriod) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" - p.String = valueString +func (m *ModelOperation) GetAvailableOperations() []string { + if m == nil { return nil } - valueAccountingPeriod := new(AccountingPeriod) - if err := json.Unmarshal(data, &valueAccountingPeriod); err == nil { - p.typeName = "accountingPeriod" - p.AccountingPeriod = valueAccountingPeriod + return m.AvailableOperations +} + +func (m *ModelOperation) GetRequiredPostParameters() []string { + if m == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, p) + return m.RequiredPostParameters } -func (p PatchedPaymentRequestAccountingPeriod) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": - return json.Marshal(p.String) - case "accountingPeriod": - return json.Marshal(p.AccountingPeriod) +func (m *ModelOperation) GetSupportedFields() []string { + if m == nil { + return nil } + return m.SupportedFields } -type PatchedPaymentRequestAccountingPeriodVisitor interface { - VisitString(string) error - VisitAccountingPeriod(*AccountingPeriod) error +func (m *ModelOperation) GetExtraProperties() map[string]interface{} { + return m.extraProperties } -func (p *PatchedPaymentRequestAccountingPeriod) Accept(visitor PatchedPaymentRequestAccountingPeriodVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": - return visitor.VisitString(p.String) - case "accountingPeriod": - return visitor.VisitAccountingPeriod(p.AccountingPeriod) +func (m *ModelOperation) UnmarshalJSON(data []byte) error { + type unmarshaler ModelOperation + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err } + *m = ModelOperation(value) + extraProperties, err := internal.ExtractExtraProperties(data, *m) + if err != nil { + return err + } + m.extraProperties = extraProperties + m.rawJSON = json.RawMessage(data) + return nil } -type PatchedPaymentRequestAppliedToLinesItem struct { - typeName string - String string - PaymentLineItemRequest *PaymentLineItemRequest +func (m *ModelOperation) String() string { + if len(m.rawJSON) > 0 { + if value, err := internal.StringifyJSON(m.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(m); err == nil { + return value + } + return fmt.Sprintf("%#v", m) } -func NewPatchedPaymentRequestAppliedToLinesItemFromString(value string) *PatchedPaymentRequestAppliedToLinesItem { - return &PatchedPaymentRequestAppliedToLinesItem{typeName: "string", String: value} -} +type ModelPermissionDeserializerRequest struct { + IsEnabled *bool `json:"is_enabled,omitempty" url:"is_enabled,omitempty"` -func NewPatchedPaymentRequestAppliedToLinesItemFromPaymentLineItemRequest(value *PaymentLineItemRequest) *PatchedPaymentRequestAppliedToLinesItem { - return &PatchedPaymentRequestAppliedToLinesItem{typeName: "paymentLineItemRequest", PaymentLineItemRequest: value} + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (p *PatchedPaymentRequestAppliedToLinesItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" - p.String = valueString - return nil - } - valuePaymentLineItemRequest := new(PaymentLineItemRequest) - if err := json.Unmarshal(data, &valuePaymentLineItemRequest); err == nil { - p.typeName = "paymentLineItemRequest" - p.PaymentLineItemRequest = valuePaymentLineItemRequest +func (m *ModelPermissionDeserializerRequest) GetIsEnabled() *bool { + if m == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, p) + return m.IsEnabled } -func (p PatchedPaymentRequestAppliedToLinesItem) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": - return json.Marshal(p.String) - case "paymentLineItemRequest": - return json.Marshal(p.PaymentLineItemRequest) - } +func (m *ModelPermissionDeserializerRequest) GetExtraProperties() map[string]interface{} { + return m.extraProperties } -type PatchedPaymentRequestAppliedToLinesItemVisitor interface { - VisitString(string) error - VisitPaymentLineItemRequest(*PaymentLineItemRequest) error +func (m *ModelPermissionDeserializerRequest) UnmarshalJSON(data []byte) error { + type unmarshaler ModelPermissionDeserializerRequest + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *m = ModelPermissionDeserializerRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *m) + if err != nil { + return err + } + m.extraProperties = extraProperties + m.rawJSON = json.RawMessage(data) + return nil } -func (p *PatchedPaymentRequestAppliedToLinesItem) Accept(visitor PatchedPaymentRequestAppliedToLinesItemVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": - return visitor.VisitString(p.String) - case "paymentLineItemRequest": - return visitor.VisitPaymentLineItemRequest(p.PaymentLineItemRequest) +func (m *ModelPermissionDeserializerRequest) String() string { + if len(m.rawJSON) > 0 { + if value, err := internal.StringifyJSON(m.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(m); err == nil { + return value } + return fmt.Sprintf("%#v", m) } -// The company the payment belongs to. -type PatchedPaymentRequestCompany struct { - typeName string - String string - CompanyInfo *CompanyInfo +// # The MultipartFormField Object +// ### Description +// The `MultipartFormField` object is used to represent fields in an HTTP request using `multipart/form-data`. +// +// ### Usage Example +// Create a `MultipartFormField` to define a multipart form entry. +type MultipartFormFieldRequest struct { + // The name of the form field + Name string `json:"name" url:"name"` + // The data for the form field. + Data string `json:"data" url:"data"` + // The encoding of the value of `data`. Defaults to `RAW` if not defined. + // + // * `RAW` - RAW + // * `BASE64` - BASE64 + // * `GZIP_BASE64` - GZIP_BASE64 + Encoding *EncodingEnum `json:"encoding,omitempty" url:"encoding,omitempty"` + // The file name of the form field, if the field is for a file. + FileName *string `json:"file_name,omitempty" url:"file_name,omitempty"` + // The MIME type of the file, if the field is for a file. + ContentType *string `json:"content_type,omitempty" url:"content_type,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func NewPatchedPaymentRequestCompanyFromString(value string) *PatchedPaymentRequestCompany { - return &PatchedPaymentRequestCompany{typeName: "string", String: value} +func (m *MultipartFormFieldRequest) GetName() string { + if m == nil { + return "" + } + return m.Name } -func NewPatchedPaymentRequestCompanyFromCompanyInfo(value *CompanyInfo) *PatchedPaymentRequestCompany { - return &PatchedPaymentRequestCompany{typeName: "companyInfo", CompanyInfo: value} +func (m *MultipartFormFieldRequest) GetData() string { + if m == nil { + return "" + } + return m.Data } -func (p *PatchedPaymentRequestCompany) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" - p.String = valueString +func (m *MultipartFormFieldRequest) GetEncoding() *EncodingEnum { + if m == nil { return nil } - valueCompanyInfo := new(CompanyInfo) - if err := json.Unmarshal(data, &valueCompanyInfo); err == nil { - p.typeName = "companyInfo" - p.CompanyInfo = valueCompanyInfo + return m.Encoding +} + +func (m *MultipartFormFieldRequest) GetFileName() *string { + if m == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, p) + return m.FileName } -func (p PatchedPaymentRequestCompany) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": - return json.Marshal(p.String) - case "companyInfo": - return json.Marshal(p.CompanyInfo) +func (m *MultipartFormFieldRequest) GetContentType() *string { + if m == nil { + return nil } + return m.ContentType } -type PatchedPaymentRequestCompanyVisitor interface { - VisitString(string) error - VisitCompanyInfo(*CompanyInfo) error +func (m *MultipartFormFieldRequest) GetExtraProperties() map[string]interface{} { + return m.extraProperties } -func (p *PatchedPaymentRequestCompany) Accept(visitor PatchedPaymentRequestCompanyVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": - return visitor.VisitString(p.String) - case "companyInfo": - return visitor.VisitCompanyInfo(p.CompanyInfo) +func (m *MultipartFormFieldRequest) UnmarshalJSON(data []byte) error { + type unmarshaler MultipartFormFieldRequest + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err } + *m = MultipartFormFieldRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *m) + if err != nil { + return err + } + m.extraProperties = extraProperties + m.rawJSON = json.RawMessage(data) + return nil } -// The supplier, or customer involved in the payment. -type PatchedPaymentRequestContact struct { - typeName string - String string - Contact *Contact +func (m *MultipartFormFieldRequest) String() string { + if len(m.rawJSON) > 0 { + if value, err := internal.StringifyJSON(m.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(m); err == nil { + return value + } + return fmt.Sprintf("%#v", m) } -func NewPatchedPaymentRequestContactFromString(value string) *PatchedPaymentRequestContact { - return &PatchedPaymentRequestContact{typeName: "string", String: value} -} +type PaginatedRemoteFieldClassList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*RemoteFieldClass `json:"results,omitempty" url:"results,omitempty"` -func NewPatchedPaymentRequestContactFromContact(value *Contact) *PatchedPaymentRequestContact { - return &PatchedPaymentRequestContact{typeName: "contact", Contact: value} + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (p *PatchedPaymentRequestContact) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" - p.String = valueString +func (p *PaginatedRemoteFieldClassList) GetNext() *string { + if p == nil { return nil } - valueContact := new(Contact) - if err := json.Unmarshal(data, &valueContact); err == nil { - p.typeName = "contact" - p.Contact = valueContact + return p.Next +} + +func (p *PaginatedRemoteFieldClassList) GetPrevious() *string { + if p == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, p) + return p.Previous } -func (p PatchedPaymentRequestContact) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": - return json.Marshal(p.String) - case "contact": - return json.Marshal(p.Contact) +func (p *PaginatedRemoteFieldClassList) GetResults() []*RemoteFieldClass { + if p == nil { + return nil } + return p.Results } -type PatchedPaymentRequestContactVisitor interface { - VisitString(string) error - VisitContact(*Contact) error +func (p *PaginatedRemoteFieldClassList) GetExtraProperties() map[string]interface{} { + return p.extraProperties } -func (p *PatchedPaymentRequestContact) Accept(visitor PatchedPaymentRequestContactVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": - return visitor.VisitString(p.String) - case "contact": - return visitor.VisitContact(p.Contact) +func (p *PaginatedRemoteFieldClassList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedRemoteFieldClassList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedRemoteFieldClassList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil } -// The payment's currency. -// -// - `XUA` - ADB Unit of Account -// - `AFN` - Afghan Afghani -// - `AFA` - Afghan Afghani (1927–2002) -// - `ALL` - Albanian Lek -// - `ALK` - Albanian Lek (1946–1965) -// - `DZD` - Algerian Dinar -// - `ADP` - Andorran Peseta -// - `AOA` - Angolan Kwanza -// - `AOK` - Angolan Kwanza (1977–1991) -// - `AON` - Angolan New Kwanza (1990–2000) -// - `AOR` - Angolan Readjusted Kwanza (1995–1999) -// - `ARA` - Argentine Austral -// - `ARS` - Argentine Peso -// - `ARM` - Argentine Peso (1881–1970) -// - `ARP` - Argentine Peso (1983–1985) -// - `ARL` - Argentine Peso Ley (1970–1983) -// - `AMD` - Armenian Dram -// - `AWG` - Aruban Florin -// - `AUD` - Australian Dollar -// - `ATS` - Austrian Schilling -// - `AZN` - Azerbaijani Manat -// - `AZM` - Azerbaijani Manat (1993–2006) -// - `BSD` - Bahamian Dollar -// - `BHD` - Bahraini Dinar -// - `BDT` - Bangladeshi Taka -// - `BBD` - Barbadian Dollar -// - `BYN` - Belarusian Ruble -// - `BYB` - Belarusian Ruble (1994–1999) -// - `BYR` - Belarusian Ruble (2000–2016) -// - `BEF` - Belgian Franc -// - `BEC` - Belgian Franc (convertible) -// - `BEL` - Belgian Franc (financial) -// - `BZD` - Belize Dollar -// - `BMD` - Bermudan Dollar -// - `BTN` - Bhutanese Ngultrum -// - `BOB` - Bolivian Boliviano -// - `BOL` - Bolivian Boliviano (1863–1963) -// - `BOV` - Bolivian Mvdol -// - `BOP` - Bolivian Peso -// - `BAM` - Bosnia-Herzegovina Convertible Mark -// - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) -// - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) -// - `BWP` - Botswanan Pula -// - `BRC` - Brazilian Cruzado (1986–1989) -// - `BRZ` - Brazilian Cruzeiro (1942–1967) -// - `BRE` - Brazilian Cruzeiro (1990–1993) -// - `BRR` - Brazilian Cruzeiro (1993–1994) -// - `BRN` - Brazilian New Cruzado (1989–1990) -// - `BRB` - Brazilian New Cruzeiro (1967–1986) -// - `BRL` - Brazilian Real -// - `GBP` - British Pound -// - `BND` - Brunei Dollar -// - `BGL` - Bulgarian Hard Lev -// - `BGN` - Bulgarian Lev -// - `BGO` - Bulgarian Lev (1879–1952) -// - `BGM` - Bulgarian Socialist Lev -// - `BUK` - Burmese Kyat -// - `BIF` - Burundian Franc -// - `XPF` - CFP Franc -// - `KHR` - Cambodian Riel -// - `CAD` - Canadian Dollar -// - `CVE` - Cape Verdean Escudo -// - `KYD` - Cayman Islands Dollar -// - `XAF` - Central African CFA Franc -// - `CLE` - Chilean Escudo -// - `CLP` - Chilean Peso -// - `CLF` - Chilean Unit of Account (UF) -// - `CNX` - Chinese People’s Bank Dollar -// - `CNY` - Chinese Yuan -// - `CNH` - Chinese Yuan (offshore) -// - `COP` - Colombian Peso -// - `COU` - Colombian Real Value Unit -// - `KMF` - Comorian Franc -// - `CDF` - Congolese Franc -// - `CRC` - Costa Rican Colón -// - `HRD` - Croatian Dinar -// - `HRK` - Croatian Kuna -// - `CUC` - Cuban Convertible Peso -// - `CUP` - Cuban Peso -// - `CYP` - Cypriot Pound -// - `CZK` - Czech Koruna -// - `CSK` - Czechoslovak Hard Koruna -// - `DKK` - Danish Krone -// - `DJF` - Djiboutian Franc -// - `DOP` - Dominican Peso -// - `NLG` - Dutch Guilder -// - `XCD` - East Caribbean Dollar -// - `DDM` - East German Mark -// - `ECS` - Ecuadorian Sucre -// - `ECV` - Ecuadorian Unit of Constant Value -// - `EGP` - Egyptian Pound -// - `GQE` - Equatorial Guinean Ekwele -// - `ERN` - Eritrean Nakfa -// - `EEK` - Estonian Kroon -// - `ETB` - Ethiopian Birr -// - `EUR` - Euro -// - `XBA` - European Composite Unit -// - `XEU` - European Currency Unit -// - `XBB` - European Monetary Unit -// - `XBC` - European Unit of Account (XBC) -// - `XBD` - European Unit of Account (XBD) -// - `FKP` - Falkland Islands Pound -// - `FJD` - Fijian Dollar -// - `FIM` - Finnish Markka -// - `FRF` - French Franc -// - `XFO` - French Gold Franc -// - `XFU` - French UIC-Franc -// - `GMD` - Gambian Dalasi -// - `GEK` - Georgian Kupon Larit -// - `GEL` - Georgian Lari -// - `DEM` - German Mark -// - `GHS` - Ghanaian Cedi -// - `GHC` - Ghanaian Cedi (1979–2007) -// - `GIP` - Gibraltar Pound -// - `XAU` - Gold -// - `GRD` - Greek Drachma -// - `GTQ` - Guatemalan Quetzal -// - `GWP` - Guinea-Bissau Peso -// - `GNF` - Guinean Franc -// - `GNS` - Guinean Syli -// - `GYD` - Guyanaese Dollar -// - `HTG` - Haitian Gourde -// - `HNL` - Honduran Lempira -// - `HKD` - Hong Kong Dollar -// - `HUF` - Hungarian Forint -// - `IMP` - IMP -// - `ISK` - Icelandic Króna -// - `ISJ` - Icelandic Króna (1918–1981) -// - `INR` - Indian Rupee -// - `IDR` - Indonesian Rupiah -// - `IRR` - Iranian Rial -// - `IQD` - Iraqi Dinar -// - `IEP` - Irish Pound -// - `ILS` - Israeli New Shekel -// - `ILP` - Israeli Pound -// - `ILR` - Israeli Shekel (1980–1985) -// - `ITL` - Italian Lira -// - `JMD` - Jamaican Dollar -// - `JPY` - Japanese Yen -// - `JOD` - Jordanian Dinar -// - `KZT` - Kazakhstani Tenge -// - `KES` - Kenyan Shilling -// - `KWD` - Kuwaiti Dinar -// - `KGS` - Kyrgystani Som -// - `LAK` - Laotian Kip -// - `LVL` - Latvian Lats -// - `LVR` - Latvian Ruble -// - `LBP` - Lebanese Pound -// - `LSL` - Lesotho Loti -// - `LRD` - Liberian Dollar -// - `LYD` - Libyan Dinar -// - `LTL` - Lithuanian Litas -// - `LTT` - Lithuanian Talonas -// - `LUL` - Luxembourg Financial Franc -// - `LUC` - Luxembourgian Convertible Franc -// - `LUF` - Luxembourgian Franc -// - `MOP` - Macanese Pataca -// - `MKD` - Macedonian Denar -// - `MKN` - Macedonian Denar (1992–1993) -// - `MGA` - Malagasy Ariary -// - `MGF` - Malagasy Franc -// - `MWK` - Malawian Kwacha -// - `MYR` - Malaysian Ringgit -// - `MVR` - Maldivian Rufiyaa -// - `MVP` - Maldivian Rupee (1947–1981) -// - `MLF` - Malian Franc -// - `MTL` - Maltese Lira -// - `MTP` - Maltese Pound -// - `MRU` - Mauritanian Ouguiya -// - `MRO` - Mauritanian Ouguiya (1973–2017) -// - `MUR` - Mauritian Rupee -// - `MXV` - Mexican Investment Unit -// - `MXN` - Mexican Peso -// - `MXP` - Mexican Silver Peso (1861–1992) -// - `MDC` - Moldovan Cupon -// - `MDL` - Moldovan Leu -// - `MCF` - Monegasque Franc -// - `MNT` - Mongolian Tugrik -// - `MAD` - Moroccan Dirham -// - `MAF` - Moroccan Franc -// - `MZE` - Mozambican Escudo -// - `MZN` - Mozambican Metical -// - `MZM` - Mozambican Metical (1980–2006) -// - `MMK` - Myanmar Kyat -// - `NAD` - Namibian Dollar -// - `NPR` - Nepalese Rupee -// - `ANG` - Netherlands Antillean Guilder -// - `TWD` - New Taiwan Dollar -// - `NZD` - New Zealand Dollar -// - `NIO` - Nicaraguan Córdoba -// - `NIC` - Nicaraguan Córdoba (1988–1991) -// - `NGN` - Nigerian Naira -// - `KPW` - North Korean Won -// - `NOK` - Norwegian Krone -// - `OMR` - Omani Rial -// - `PKR` - Pakistani Rupee -// - `XPD` - Palladium -// - `PAB` - Panamanian Balboa -// - `PGK` - Papua New Guinean Kina -// - `PYG` - Paraguayan Guarani -// - `PEI` - Peruvian Inti -// - `PEN` - Peruvian Sol -// - `PES` - Peruvian Sol (1863–1965) -// - `PHP` - Philippine Peso -// - `XPT` - Platinum -// - `PLN` - Polish Zloty -// - `PLZ` - Polish Zloty (1950–1995) -// - `PTE` - Portuguese Escudo -// - `GWE` - Portuguese Guinea Escudo -// - `QAR` - Qatari Rial -// - `XRE` - RINET Funds -// - `RHD` - Rhodesian Dollar -// - `RON` - Romanian Leu -// - `ROL` - Romanian Leu (1952–2006) -// - `RUB` - Russian Ruble -// - `RUR` - Russian Ruble (1991–1998) -// - `RWF` - Rwandan Franc -// - `SVC` - Salvadoran Colón -// - `WST` - Samoan Tala -// - `SAR` - Saudi Riyal -// - `RSD` - Serbian Dinar -// - `CSD` - Serbian Dinar (2002–2006) -// - `SCR` - Seychellois Rupee -// - `SLL` - Sierra Leonean Leone -// - `XAG` - Silver -// - `SGD` - Singapore Dollar -// - `SKK` - Slovak Koruna -// - `SIT` - Slovenian Tolar -// - `SBD` - Solomon Islands Dollar -// - `SOS` - Somali Shilling -// - `ZAR` - South African Rand -// - `ZAL` - South African Rand (financial) -// - `KRH` - South Korean Hwan (1953–1962) -// - `KRW` - South Korean Won -// - `KRO` - South Korean Won (1945–1953) -// - `SSP` - South Sudanese Pound -// - `SUR` - Soviet Rouble -// - `ESP` - Spanish Peseta -// - `ESA` - Spanish Peseta (A account) -// - `ESB` - Spanish Peseta (convertible account) -// - `XDR` - Special Drawing Rights -// - `LKR` - Sri Lankan Rupee -// - `SHP` - St. Helena Pound -// - `XSU` - Sucre -// - `SDD` - Sudanese Dinar (1992–2007) -// - `SDG` - Sudanese Pound -// - `SDP` - Sudanese Pound (1957–1998) -// - `SRD` - Surinamese Dollar -// - `SRG` - Surinamese Guilder -// - `SZL` - Swazi Lilangeni -// - `SEK` - Swedish Krona -// - `CHF` - Swiss Franc -// - `SYP` - Syrian Pound -// - `STN` - São Tomé & Príncipe Dobra -// - `STD` - São Tomé & Príncipe Dobra (1977–2017) -// - `TVD` - TVD -// - `TJR` - Tajikistani Ruble -// - `TJS` - Tajikistani Somoni -// - `TZS` - Tanzanian Shilling -// - `XTS` - Testing Currency Code -// - `THB` - Thai Baht -// - `XXX` - The codes assigned for transactions where no currency is involved -// - `TPE` - Timorese Escudo -// - `TOP` - Tongan Paʻanga -// - `TTD` - Trinidad & Tobago Dollar -// - `TND` - Tunisian Dinar -// - `TRY` - Turkish Lira -// - `TRL` - Turkish Lira (1922–2005) -// - `TMT` - Turkmenistani Manat -// - `TMM` - Turkmenistani Manat (1993–2009) -// - `USD` - US Dollar -// - `USN` - US Dollar (Next day) -// - `USS` - US Dollar (Same day) -// - `UGX` - Ugandan Shilling -// - `UGS` - Ugandan Shilling (1966–1987) -// - `UAH` - Ukrainian Hryvnia -// - `UAK` - Ukrainian Karbovanets -// - `AED` - United Arab Emirates Dirham -// - `UYW` - Uruguayan Nominal Wage Index Unit -// - `UYU` - Uruguayan Peso -// - `UYP` - Uruguayan Peso (1975–1993) -// - `UYI` - Uruguayan Peso (Indexed Units) -// - `UZS` - Uzbekistani Som -// - `VUV` - Vanuatu Vatu -// - `VES` - Venezuelan Bolívar -// - `VEB` - Venezuelan Bolívar (1871–2008) -// - `VEF` - Venezuelan Bolívar (2008–2018) -// - `VND` - Vietnamese Dong -// - `VNN` - Vietnamese Dong (1978–1985) -// - `CHE` - WIR Euro -// - `CHW` - WIR Franc -// - `XOF` - West African CFA Franc -// - `YDD` - Yemeni Dinar -// - `YER` - Yemeni Rial -// - `YUN` - Yugoslavian Convertible Dinar (1990–1992) -// - `YUD` - Yugoslavian Hard Dinar (1966–1990) -// - `YUM` - Yugoslavian New Dinar (1994–2002) -// - `YUR` - Yugoslavian Reformed Dinar (1992–1993) -// - `ZWN` - ZWN -// - `ZRN` - Zairean New Zaire (1993–1998) -// - `ZRZ` - Zairean Zaire (1971–1993) -// - `ZMW` - Zambian Kwacha -// - `ZMK` - Zambian Kwacha (1968–2012) -// - `ZWD` - Zimbabwean Dollar (1980–2008) -// - `ZWR` - Zimbabwean Dollar (2008) -// - `ZWL` - Zimbabwean Dollar (2009) -type PatchedPaymentRequestCurrency struct { - typeName string - TransactionCurrencyEnum TransactionCurrencyEnum - String string +func (p *PaginatedRemoteFieldClassList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) } -func NewPatchedPaymentRequestCurrencyFromTransactionCurrencyEnum(value TransactionCurrencyEnum) *PatchedPaymentRequestCurrency { - return &PatchedPaymentRequestCurrency{typeName: "transactionCurrencyEnum", TransactionCurrencyEnum: value} -} +// # 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. +type Payment struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The payment's transaction date. + TransactionDate *time.Time `json:"transaction_date,omitempty" url:"transaction_date,omitempty"` + // The supplier, or customer involved in the payment. + Contact *PaymentContact `json:"contact,omitempty" url:"contact,omitempty"` + // The supplier’s or customer’s account in which the payment is made. + Account *PaymentAccount `json:"account,omitempty" url:"account,omitempty"` + // The method which this payment was made by. + PaymentMethod *PaymentPaymentMethod `json:"payment_method,omitempty" url:"payment_method,omitempty"` + // The payment's currency. + // + // * `XUA` - ADB Unit of Account + // * `AFN` - Afghan Afghani + // * `AFA` - Afghan Afghani (1927–2002) + // * `ALL` - Albanian Lek + // * `ALK` - Albanian Lek (1946–1965) + // * `DZD` - Algerian Dinar + // * `ADP` - Andorran Peseta + // * `AOA` - Angolan Kwanza + // * `AOK` - Angolan Kwanza (1977–1991) + // * `AON` - Angolan New Kwanza (1990–2000) + // * `AOR` - Angolan Readjusted Kwanza (1995–1999) + // * `ARA` - Argentine Austral + // * `ARS` - Argentine Peso + // * `ARM` - Argentine Peso (1881–1970) + // * `ARP` - Argentine Peso (1983–1985) + // * `ARL` - Argentine Peso Ley (1970–1983) + // * `AMD` - Armenian Dram + // * `AWG` - Aruban Florin + // * `AUD` - Australian Dollar + // * `ATS` - Austrian Schilling + // * `AZN` - Azerbaijani Manat + // * `AZM` - Azerbaijani Manat (1993–2006) + // * `BSD` - Bahamian Dollar + // * `BHD` - Bahraini Dinar + // * `BDT` - Bangladeshi Taka + // * `BBD` - Barbadian Dollar + // * `BYN` - Belarusian Ruble + // * `BYB` - Belarusian Ruble (1994–1999) + // * `BYR` - Belarusian Ruble (2000–2016) + // * `BEF` - Belgian Franc + // * `BEC` - Belgian Franc (convertible) + // * `BEL` - Belgian Franc (financial) + // * `BZD` - Belize Dollar + // * `BMD` - Bermudan Dollar + // * `BTN` - Bhutanese Ngultrum + // * `BOB` - Bolivian Boliviano + // * `BOL` - Bolivian Boliviano (1863–1963) + // * `BOV` - Bolivian Mvdol + // * `BOP` - Bolivian Peso + // * `BAM` - Bosnia-Herzegovina Convertible Mark + // * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + // * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + // * `BWP` - Botswanan Pula + // * `BRC` - Brazilian Cruzado (1986–1989) + // * `BRZ` - Brazilian Cruzeiro (1942–1967) + // * `BRE` - Brazilian Cruzeiro (1990–1993) + // * `BRR` - Brazilian Cruzeiro (1993–1994) + // * `BRN` - Brazilian New Cruzado (1989–1990) + // * `BRB` - Brazilian New Cruzeiro (1967–1986) + // * `BRL` - Brazilian Real + // * `GBP` - British Pound + // * `BND` - Brunei Dollar + // * `BGL` - Bulgarian Hard Lev + // * `BGN` - Bulgarian Lev + // * `BGO` - Bulgarian Lev (1879–1952) + // * `BGM` - Bulgarian Socialist Lev + // * `BUK` - Burmese Kyat + // * `BIF` - Burundian Franc + // * `XPF` - CFP Franc + // * `KHR` - Cambodian Riel + // * `CAD` - Canadian Dollar + // * `CVE` - Cape Verdean Escudo + // * `KYD` - Cayman Islands Dollar + // * `XAF` - Central African CFA Franc + // * `CLE` - Chilean Escudo + // * `CLP` - Chilean Peso + // * `CLF` - Chilean Unit of Account (UF) + // * `CNX` - Chinese People’s Bank Dollar + // * `CNY` - Chinese Yuan + // * `CNH` - Chinese Yuan (offshore) + // * `COP` - Colombian Peso + // * `COU` - Colombian Real Value Unit + // * `KMF` - Comorian Franc + // * `CDF` - Congolese Franc + // * `CRC` - Costa Rican Colón + // * `HRD` - Croatian Dinar + // * `HRK` - Croatian Kuna + // * `CUC` - Cuban Convertible Peso + // * `CUP` - Cuban Peso + // * `CYP` - Cypriot Pound + // * `CZK` - Czech Koruna + // * `CSK` - Czechoslovak Hard Koruna + // * `DKK` - Danish Krone + // * `DJF` - Djiboutian Franc + // * `DOP` - Dominican Peso + // * `NLG` - Dutch Guilder + // * `XCD` - East Caribbean Dollar + // * `DDM` - East German Mark + // * `ECS` - Ecuadorian Sucre + // * `ECV` - Ecuadorian Unit of Constant Value + // * `EGP` - Egyptian Pound + // * `GQE` - Equatorial Guinean Ekwele + // * `ERN` - Eritrean Nakfa + // * `EEK` - Estonian Kroon + // * `ETB` - Ethiopian Birr + // * `EUR` - Euro + // * `XBA` - European Composite Unit + // * `XEU` - European Currency Unit + // * `XBB` - European Monetary Unit + // * `XBC` - European Unit of Account (XBC) + // * `XBD` - European Unit of Account (XBD) + // * `FKP` - Falkland Islands Pound + // * `FJD` - Fijian Dollar + // * `FIM` - Finnish Markka + // * `FRF` - French Franc + // * `XFO` - French Gold Franc + // * `XFU` - French UIC-Franc + // * `GMD` - Gambian Dalasi + // * `GEK` - Georgian Kupon Larit + // * `GEL` - Georgian Lari + // * `DEM` - German Mark + // * `GHS` - Ghanaian Cedi + // * `GHC` - Ghanaian Cedi (1979–2007) + // * `GIP` - Gibraltar Pound + // * `XAU` - Gold + // * `GRD` - Greek Drachma + // * `GTQ` - Guatemalan Quetzal + // * `GWP` - Guinea-Bissau Peso + // * `GNF` - Guinean Franc + // * `GNS` - Guinean Syli + // * `GYD` - Guyanaese Dollar + // * `HTG` - Haitian Gourde + // * `HNL` - Honduran Lempira + // * `HKD` - Hong Kong Dollar + // * `HUF` - Hungarian Forint + // * `IMP` - IMP + // * `ISK` - Icelandic Króna + // * `ISJ` - Icelandic Króna (1918–1981) + // * `INR` - Indian Rupee + // * `IDR` - Indonesian Rupiah + // * `IRR` - Iranian Rial + // * `IQD` - Iraqi Dinar + // * `IEP` - Irish Pound + // * `ILS` - Israeli New Shekel + // * `ILP` - Israeli Pound + // * `ILR` - Israeli Shekel (1980–1985) + // * `ITL` - Italian Lira + // * `JMD` - Jamaican Dollar + // * `JPY` - Japanese Yen + // * `JOD` - Jordanian Dinar + // * `KZT` - Kazakhstani Tenge + // * `KES` - Kenyan Shilling + // * `KWD` - Kuwaiti Dinar + // * `KGS` - Kyrgystani Som + // * `LAK` - Laotian Kip + // * `LVL` - Latvian Lats + // * `LVR` - Latvian Ruble + // * `LBP` - Lebanese Pound + // * `LSL` - Lesotho Loti + // * `LRD` - Liberian Dollar + // * `LYD` - Libyan Dinar + // * `LTL` - Lithuanian Litas + // * `LTT` - Lithuanian Talonas + // * `LUL` - Luxembourg Financial Franc + // * `LUC` - Luxembourgian Convertible Franc + // * `LUF` - Luxembourgian Franc + // * `MOP` - Macanese Pataca + // * `MKD` - Macedonian Denar + // * `MKN` - Macedonian Denar (1992–1993) + // * `MGA` - Malagasy Ariary + // * `MGF` - Malagasy Franc + // * `MWK` - Malawian Kwacha + // * `MYR` - Malaysian Ringgit + // * `MVR` - Maldivian Rufiyaa + // * `MVP` - Maldivian Rupee (1947–1981) + // * `MLF` - Malian Franc + // * `MTL` - Maltese Lira + // * `MTP` - Maltese Pound + // * `MRU` - Mauritanian Ouguiya + // * `MRO` - Mauritanian Ouguiya (1973–2017) + // * `MUR` - Mauritian Rupee + // * `MXV` - Mexican Investment Unit + // * `MXN` - Mexican Peso + // * `MXP` - Mexican Silver Peso (1861–1992) + // * `MDC` - Moldovan Cupon + // * `MDL` - Moldovan Leu + // * `MCF` - Monegasque Franc + // * `MNT` - Mongolian Tugrik + // * `MAD` - Moroccan Dirham + // * `MAF` - Moroccan Franc + // * `MZE` - Mozambican Escudo + // * `MZN` - Mozambican Metical + // * `MZM` - Mozambican Metical (1980–2006) + // * `MMK` - Myanmar Kyat + // * `NAD` - Namibian Dollar + // * `NPR` - Nepalese Rupee + // * `ANG` - Netherlands Antillean Guilder + // * `TWD` - New Taiwan Dollar + // * `NZD` - New Zealand Dollar + // * `NIO` - Nicaraguan Córdoba + // * `NIC` - Nicaraguan Córdoba (1988–1991) + // * `NGN` - Nigerian Naira + // * `KPW` - North Korean Won + // * `NOK` - Norwegian Krone + // * `OMR` - Omani Rial + // * `PKR` - Pakistani Rupee + // * `XPD` - Palladium + // * `PAB` - Panamanian Balboa + // * `PGK` - Papua New Guinean Kina + // * `PYG` - Paraguayan Guarani + // * `PEI` - Peruvian Inti + // * `PEN` - Peruvian Sol + // * `PES` - Peruvian Sol (1863–1965) + // * `PHP` - Philippine Peso + // * `XPT` - Platinum + // * `PLN` - Polish Zloty + // * `PLZ` - Polish Zloty (1950–1995) + // * `PTE` - Portuguese Escudo + // * `GWE` - Portuguese Guinea Escudo + // * `QAR` - Qatari Rial + // * `XRE` - RINET Funds + // * `RHD` - Rhodesian Dollar + // * `RON` - Romanian Leu + // * `ROL` - Romanian Leu (1952–2006) + // * `RUB` - Russian Ruble + // * `RUR` - Russian Ruble (1991–1998) + // * `RWF` - Rwandan Franc + // * `SVC` - Salvadoran Colón + // * `WST` - Samoan Tala + // * `SAR` - Saudi Riyal + // * `RSD` - Serbian Dinar + // * `CSD` - Serbian Dinar (2002–2006) + // * `SCR` - Seychellois Rupee + // * `SLL` - Sierra Leonean Leone + // * `XAG` - Silver + // * `SGD` - Singapore Dollar + // * `SKK` - Slovak Koruna + // * `SIT` - Slovenian Tolar + // * `SBD` - Solomon Islands Dollar + // * `SOS` - Somali Shilling + // * `ZAR` - South African Rand + // * `ZAL` - South African Rand (financial) + // * `KRH` - South Korean Hwan (1953–1962) + // * `KRW` - South Korean Won + // * `KRO` - South Korean Won (1945–1953) + // * `SSP` - South Sudanese Pound + // * `SUR` - Soviet Rouble + // * `ESP` - Spanish Peseta + // * `ESA` - Spanish Peseta (A account) + // * `ESB` - Spanish Peseta (convertible account) + // * `XDR` - Special Drawing Rights + // * `LKR` - Sri Lankan Rupee + // * `SHP` - St. Helena Pound + // * `XSU` - Sucre + // * `SDD` - Sudanese Dinar (1992–2007) + // * `SDG` - Sudanese Pound + // * `SDP` - Sudanese Pound (1957–1998) + // * `SRD` - Surinamese Dollar + // * `SRG` - Surinamese Guilder + // * `SZL` - Swazi Lilangeni + // * `SEK` - Swedish Krona + // * `CHF` - Swiss Franc + // * `SYP` - Syrian Pound + // * `STN` - São Tomé & Príncipe Dobra + // * `STD` - São Tomé & Príncipe Dobra (1977–2017) + // * `TVD` - TVD + // * `TJR` - Tajikistani Ruble + // * `TJS` - Tajikistani Somoni + // * `TZS` - Tanzanian Shilling + // * `XTS` - Testing Currency Code + // * `THB` - Thai Baht + // * `XXX` - The codes assigned for transactions where no currency is involved + // * `TPE` - Timorese Escudo + // * `TOP` - Tongan Paʻanga + // * `TTD` - Trinidad & Tobago Dollar + // * `TND` - Tunisian Dinar + // * `TRY` - Turkish Lira + // * `TRL` - Turkish Lira (1922–2005) + // * `TMT` - Turkmenistani Manat + // * `TMM` - Turkmenistani Manat (1993–2009) + // * `USD` - US Dollar + // * `USN` - US Dollar (Next day) + // * `USS` - US Dollar (Same day) + // * `UGX` - Ugandan Shilling + // * `UGS` - Ugandan Shilling (1966–1987) + // * `UAH` - Ukrainian Hryvnia + // * `UAK` - Ukrainian Karbovanets + // * `AED` - United Arab Emirates Dirham + // * `UYW` - Uruguayan Nominal Wage Index Unit + // * `UYU` - Uruguayan Peso + // * `UYP` - Uruguayan Peso (1975–1993) + // * `UYI` - Uruguayan Peso (Indexed Units) + // * `UZS` - Uzbekistani Som + // * `VUV` - Vanuatu Vatu + // * `VES` - Venezuelan Bolívar + // * `VEB` - Venezuelan Bolívar (1871–2008) + // * `VEF` - Venezuelan Bolívar (2008–2018) + // * `VND` - Vietnamese Dong + // * `VNN` - Vietnamese Dong (1978–1985) + // * `CHE` - WIR Euro + // * `CHW` - WIR Franc + // * `XOF` - West African CFA Franc + // * `YDD` - Yemeni Dinar + // * `YER` - Yemeni Rial + // * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + // * `YUD` - Yugoslavian Hard Dinar (1966–1990) + // * `YUM` - Yugoslavian New Dinar (1994–2002) + // * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + // * `ZWN` - ZWN + // * `ZRN` - Zairean New Zaire (1993–1998) + // * `ZRZ` - Zairean Zaire (1971–1993) + // * `ZMW` - Zambian Kwacha + // * `ZMK` - Zambian Kwacha (1968–2012) + // * `ZWD` - Zimbabwean Dollar (1980–2008) + // * `ZWR` - Zimbabwean Dollar (2008) + // * `ZWL` - Zimbabwean Dollar (2009) + Currency *PaymentCurrency `json:"currency,omitempty" url:"currency,omitempty"` + // The payment's exchange rate. + ExchangeRate *string `json:"exchange_rate,omitempty" url:"exchange_rate,omitempty"` + // The company the payment belongs to. + Company *PaymentCompany `json:"company,omitempty" url:"company,omitempty"` + // The total amount of money being paid to the supplier, or customer, after taxes. + TotalAmount *float64 `json:"total_amount,omitempty" url:"total_amount,omitempty"` + // The type of the invoice. + // + // * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE + // * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE + Type *PaymentType `json:"type,omitempty" url:"type,omitempty"` + TrackingCategories []*PaymentTrackingCategoriesItem `json:"tracking_categories,omitempty" url:"tracking_categories,omitempty"` + // The accounting period that the Payment was generated in. + AccountingPeriod *PaymentAccountingPeriod `json:"accounting_period,omitempty" url:"accounting_period,omitempty"` + // A list of “Payment Applied to Lines” objects. + AppliedToLines []*PaymentAppliedToLinesItem `json:"applied_to_lines,omitempty" url:"applied_to_lines,omitempty"` + // When the third party's payment entry was updated. + RemoteUpdatedAt *time.Time `json:"remote_updated_at,omitempty" url:"remote_updated_at,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + RemoteFields []*RemoteField `json:"remote_fields,omitempty" url:"remote_fields,omitempty"` -func NewPatchedPaymentRequestCurrencyFromString(value string) *PatchedPaymentRequestCurrency { - return &PatchedPaymentRequestCurrency{typeName: "string", String: value} + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (p *PatchedPaymentRequestCurrency) UnmarshalJSON(data []byte) error { - var valueTransactionCurrencyEnum TransactionCurrencyEnum - if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { - p.typeName = "transactionCurrencyEnum" - p.TransactionCurrencyEnum = valueTransactionCurrencyEnum +func (p *Payment) GetId() *string { + if p == nil { return nil } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" - p.String = valueString + return p.Id +} + +func (p *Payment) GetRemoteId() *string { + if p == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, p) + return p.RemoteId } -func (p PatchedPaymentRequestCurrency) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "transactionCurrencyEnum": - return json.Marshal(p.TransactionCurrencyEnum) - case "string": - return json.Marshal(p.String) +func (p *Payment) GetCreatedAt() *time.Time { + if p == nil { + return nil } + return p.CreatedAt } -type PatchedPaymentRequestCurrencyVisitor interface { - VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error - VisitString(string) error +func (p *Payment) GetModifiedAt() *time.Time { + if p == nil { + return nil + } + return p.ModifiedAt } -func (p *PatchedPaymentRequestCurrency) Accept(visitor PatchedPaymentRequestCurrencyVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "transactionCurrencyEnum": - return visitor.VisitTransactionCurrencyEnum(p.TransactionCurrencyEnum) - case "string": - return visitor.VisitString(p.String) +func (p *Payment) GetTransactionDate() *time.Time { + if p == nil { + return nil } + return p.TransactionDate } -type PatchedPaymentRequestTrackingCategoriesItem struct { - typeName string - String string - TrackingCategory *TrackingCategory +func (p *Payment) GetContact() *PaymentContact { + if p == nil { + return nil + } + return p.Contact } -func NewPatchedPaymentRequestTrackingCategoriesItemFromString(value string) *PatchedPaymentRequestTrackingCategoriesItem { - return &PatchedPaymentRequestTrackingCategoriesItem{typeName: "string", String: value} +func (p *Payment) GetAccount() *PaymentAccount { + if p == nil { + return nil + } + return p.Account } -func NewPatchedPaymentRequestTrackingCategoriesItemFromTrackingCategory(value *TrackingCategory) *PatchedPaymentRequestTrackingCategoriesItem { - return &PatchedPaymentRequestTrackingCategoriesItem{typeName: "trackingCategory", TrackingCategory: value} +func (p *Payment) GetPaymentMethod() *PaymentPaymentMethod { + if p == nil { + return nil + } + return p.PaymentMethod } -func (p *PatchedPaymentRequestTrackingCategoriesItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" - p.String = valueString +func (p *Payment) GetCurrency() *PaymentCurrency { + if p == nil { return nil } - valueTrackingCategory := new(TrackingCategory) - if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { - p.typeName = "trackingCategory" - p.TrackingCategory = valueTrackingCategory + return p.Currency +} + +func (p *Payment) GetExchangeRate() *string { + if p == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, p) + return p.ExchangeRate } -func (p PatchedPaymentRequestTrackingCategoriesItem) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": - return json.Marshal(p.String) - case "trackingCategory": - return json.Marshal(p.TrackingCategory) +func (p *Payment) GetCompany() *PaymentCompany { + if p == nil { + return nil } + return p.Company } -type PatchedPaymentRequestTrackingCategoriesItemVisitor interface { - VisitString(string) error - VisitTrackingCategory(*TrackingCategory) error +func (p *Payment) GetTotalAmount() *float64 { + if p == nil { + return nil + } + return p.TotalAmount } -func (p *PatchedPaymentRequestTrackingCategoriesItem) Accept(visitor PatchedPaymentRequestTrackingCategoriesItemVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": - return visitor.VisitString(p.String) - case "trackingCategory": - return visitor.VisitTrackingCategory(p.TrackingCategory) +func (p *Payment) GetType() *PaymentType { + if p == nil { + return nil } + return p.Type } -// The type of the invoice. -// -// - `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE -// - `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE -type PatchedPaymentRequestType struct { - typeName string - PaymentTypeEnum PaymentTypeEnum - String string +func (p *Payment) GetTrackingCategories() []*PaymentTrackingCategoriesItem { + if p == nil { + return nil + } + return p.TrackingCategories } -func NewPatchedPaymentRequestTypeFromPaymentTypeEnum(value PaymentTypeEnum) *PatchedPaymentRequestType { - return &PatchedPaymentRequestType{typeName: "paymentTypeEnum", PaymentTypeEnum: value} +func (p *Payment) GetAccountingPeriod() *PaymentAccountingPeriod { + if p == nil { + return nil + } + return p.AccountingPeriod } -func NewPatchedPaymentRequestTypeFromString(value string) *PatchedPaymentRequestType { - return &PatchedPaymentRequestType{typeName: "string", String: value} +func (p *Payment) GetAppliedToLines() []*PaymentAppliedToLinesItem { + if p == nil { + return nil + } + return p.AppliedToLines } -func (p *PatchedPaymentRequestType) UnmarshalJSON(data []byte) error { - var valuePaymentTypeEnum PaymentTypeEnum - if err := json.Unmarshal(data, &valuePaymentTypeEnum); err == nil { - p.typeName = "paymentTypeEnum" - p.PaymentTypeEnum = valuePaymentTypeEnum +func (p *Payment) GetRemoteUpdatedAt() *time.Time { + if p == nil { return nil } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" - p.String = valueString + return p.RemoteUpdatedAt +} + +func (p *Payment) GetRemoteWasDeleted() *bool { + if p == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, p) + return p.RemoteWasDeleted } -func (p PatchedPaymentRequestType) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "paymentTypeEnum": - return json.Marshal(p.PaymentTypeEnum) - case "string": - return json.Marshal(p.String) +func (p *Payment) GetFieldMappings() map[string]interface{} { + if p == nil { + return nil } + return p.FieldMappings } -type PatchedPaymentRequestTypeVisitor interface { - VisitPaymentTypeEnum(PaymentTypeEnum) error - VisitString(string) error +func (p *Payment) GetRemoteData() []*RemoteData { + if p == nil { + return nil + } + return p.RemoteData } -func (p *PatchedPaymentRequestType) Accept(visitor PatchedPaymentRequestTypeVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "paymentTypeEnum": - return visitor.VisitPaymentTypeEnum(p.PaymentTypeEnum) - case "string": - return visitor.VisitString(p.String) +func (p *Payment) GetRemoteFields() []*RemoteField { + if p == nil { + return nil } + return p.RemoteFields } -// # 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. -type Payment struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The payment's transaction date. - TransactionDate *time.Time `json:"transaction_date,omitempty"` - // The supplier, or customer involved in the payment. - Contact *PaymentContact `json:"contact,omitempty"` - // The supplier’s or customer’s account in which the payment is made. - Account *PaymentAccount `json:"account,omitempty"` - // The payment's currency. - // - // - `XUA` - ADB Unit of Account - // - `AFN` - Afghan Afghani - // - `AFA` - Afghan Afghani (1927–2002) - // - `ALL` - Albanian Lek - // - `ALK` - Albanian Lek (1946–1965) - // - `DZD` - Algerian Dinar - // - `ADP` - Andorran Peseta - // - `AOA` - Angolan Kwanza - // - `AOK` - Angolan Kwanza (1977–1991) - // - `AON` - Angolan New Kwanza (1990–2000) - // - `AOR` - Angolan Readjusted Kwanza (1995–1999) - // - `ARA` - Argentine Austral - // - `ARS` - Argentine Peso - // - `ARM` - Argentine Peso (1881–1970) - // - `ARP` - Argentine Peso (1983–1985) - // - `ARL` - Argentine Peso Ley (1970–1983) - // - `AMD` - Armenian Dram - // - `AWG` - Aruban Florin - // - `AUD` - Australian Dollar - // - `ATS` - Austrian Schilling - // - `AZN` - Azerbaijani Manat - // - `AZM` - Azerbaijani Manat (1993–2006) - // - `BSD` - Bahamian Dollar - // - `BHD` - Bahraini Dinar - // - `BDT` - Bangladeshi Taka - // - `BBD` - Barbadian Dollar - // - `BYN` - Belarusian Ruble - // - `BYB` - Belarusian Ruble (1994–1999) - // - `BYR` - Belarusian Ruble (2000–2016) - // - `BEF` - Belgian Franc - // - `BEC` - Belgian Franc (convertible) - // - `BEL` - Belgian Franc (financial) - // - `BZD` - Belize Dollar - // - `BMD` - Bermudan Dollar - // - `BTN` - Bhutanese Ngultrum - // - `BOB` - Bolivian Boliviano - // - `BOL` - Bolivian Boliviano (1863–1963) - // - `BOV` - Bolivian Mvdol - // - `BOP` - Bolivian Peso - // - `BAM` - Bosnia-Herzegovina Convertible Mark - // - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - // - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - // - `BWP` - Botswanan Pula - // - `BRC` - Brazilian Cruzado (1986–1989) - // - `BRZ` - Brazilian Cruzeiro (1942–1967) - // - `BRE` - Brazilian Cruzeiro (1990–1993) - // - `BRR` - Brazilian Cruzeiro (1993–1994) - // - `BRN` - Brazilian New Cruzado (1989–1990) - // - `BRB` - Brazilian New Cruzeiro (1967–1986) - // - `BRL` - Brazilian Real - // - `GBP` - British Pound - // - `BND` - Brunei Dollar - // - `BGL` - Bulgarian Hard Lev - // - `BGN` - Bulgarian Lev - // - `BGO` - Bulgarian Lev (1879–1952) - // - `BGM` - Bulgarian Socialist Lev - // - `BUK` - Burmese Kyat - // - `BIF` - Burundian Franc - // - `XPF` - CFP Franc - // - `KHR` - Cambodian Riel - // - `CAD` - Canadian Dollar - // - `CVE` - Cape Verdean Escudo - // - `KYD` - Cayman Islands Dollar - // - `XAF` - Central African CFA Franc - // - `CLE` - Chilean Escudo - // - `CLP` - Chilean Peso - // - `CLF` - Chilean Unit of Account (UF) - // - `CNX` - Chinese People’s Bank Dollar - // - `CNY` - Chinese Yuan - // - `CNH` - Chinese Yuan (offshore) - // - `COP` - Colombian Peso - // - `COU` - Colombian Real Value Unit - // - `KMF` - Comorian Franc - // - `CDF` - Congolese Franc - // - `CRC` - Costa Rican Colón - // - `HRD` - Croatian Dinar - // - `HRK` - Croatian Kuna - // - `CUC` - Cuban Convertible Peso - // - `CUP` - Cuban Peso - // - `CYP` - Cypriot Pound - // - `CZK` - Czech Koruna - // - `CSK` - Czechoslovak Hard Koruna - // - `DKK` - Danish Krone - // - `DJF` - Djiboutian Franc - // - `DOP` - Dominican Peso - // - `NLG` - Dutch Guilder - // - `XCD` - East Caribbean Dollar - // - `DDM` - East German Mark - // - `ECS` - Ecuadorian Sucre - // - `ECV` - Ecuadorian Unit of Constant Value - // - `EGP` - Egyptian Pound - // - `GQE` - Equatorial Guinean Ekwele - // - `ERN` - Eritrean Nakfa - // - `EEK` - Estonian Kroon - // - `ETB` - Ethiopian Birr - // - `EUR` - Euro - // - `XBA` - European Composite Unit - // - `XEU` - European Currency Unit - // - `XBB` - European Monetary Unit - // - `XBC` - European Unit of Account (XBC) - // - `XBD` - European Unit of Account (XBD) - // - `FKP` - Falkland Islands Pound - // - `FJD` - Fijian Dollar - // - `FIM` - Finnish Markka - // - `FRF` - French Franc - // - `XFO` - French Gold Franc - // - `XFU` - French UIC-Franc - // - `GMD` - Gambian Dalasi - // - `GEK` - Georgian Kupon Larit - // - `GEL` - Georgian Lari - // - `DEM` - German Mark - // - `GHS` - Ghanaian Cedi - // - `GHC` - Ghanaian Cedi (1979–2007) - // - `GIP` - Gibraltar Pound - // - `XAU` - Gold - // - `GRD` - Greek Drachma - // - `GTQ` - Guatemalan Quetzal - // - `GWP` - Guinea-Bissau Peso - // - `GNF` - Guinean Franc - // - `GNS` - Guinean Syli - // - `GYD` - Guyanaese Dollar - // - `HTG` - Haitian Gourde - // - `HNL` - Honduran Lempira - // - `HKD` - Hong Kong Dollar - // - `HUF` - Hungarian Forint - // - `IMP` - IMP - // - `ISK` - Icelandic Króna - // - `ISJ` - Icelandic Króna (1918–1981) - // - `INR` - Indian Rupee - // - `IDR` - Indonesian Rupiah - // - `IRR` - Iranian Rial - // - `IQD` - Iraqi Dinar - // - `IEP` - Irish Pound - // - `ILS` - Israeli New Shekel - // - `ILP` - Israeli Pound - // - `ILR` - Israeli Shekel (1980–1985) - // - `ITL` - Italian Lira - // - `JMD` - Jamaican Dollar - // - `JPY` - Japanese Yen - // - `JOD` - Jordanian Dinar - // - `KZT` - Kazakhstani Tenge - // - `KES` - Kenyan Shilling - // - `KWD` - Kuwaiti Dinar - // - `KGS` - Kyrgystani Som - // - `LAK` - Laotian Kip - // - `LVL` - Latvian Lats - // - `LVR` - Latvian Ruble - // - `LBP` - Lebanese Pound - // - `LSL` - Lesotho Loti - // - `LRD` - Liberian Dollar - // - `LYD` - Libyan Dinar - // - `LTL` - Lithuanian Litas - // - `LTT` - Lithuanian Talonas - // - `LUL` - Luxembourg Financial Franc - // - `LUC` - Luxembourgian Convertible Franc - // - `LUF` - Luxembourgian Franc - // - `MOP` - Macanese Pataca - // - `MKD` - Macedonian Denar - // - `MKN` - Macedonian Denar (1992–1993) - // - `MGA` - Malagasy Ariary - // - `MGF` - Malagasy Franc - // - `MWK` - Malawian Kwacha - // - `MYR` - Malaysian Ringgit - // - `MVR` - Maldivian Rufiyaa - // - `MVP` - Maldivian Rupee (1947–1981) - // - `MLF` - Malian Franc - // - `MTL` - Maltese Lira - // - `MTP` - Maltese Pound - // - `MRU` - Mauritanian Ouguiya - // - `MRO` - Mauritanian Ouguiya (1973–2017) - // - `MUR` - Mauritian Rupee - // - `MXV` - Mexican Investment Unit - // - `MXN` - Mexican Peso - // - `MXP` - Mexican Silver Peso (1861–1992) - // - `MDC` - Moldovan Cupon - // - `MDL` - Moldovan Leu - // - `MCF` - Monegasque Franc - // - `MNT` - Mongolian Tugrik - // - `MAD` - Moroccan Dirham - // - `MAF` - Moroccan Franc - // - `MZE` - Mozambican Escudo - // - `MZN` - Mozambican Metical - // - `MZM` - Mozambican Metical (1980–2006) - // - `MMK` - Myanmar Kyat - // - `NAD` - Namibian Dollar - // - `NPR` - Nepalese Rupee - // - `ANG` - Netherlands Antillean Guilder - // - `TWD` - New Taiwan Dollar - // - `NZD` - New Zealand Dollar - // - `NIO` - Nicaraguan Córdoba - // - `NIC` - Nicaraguan Córdoba (1988–1991) - // - `NGN` - Nigerian Naira - // - `KPW` - North Korean Won - // - `NOK` - Norwegian Krone - // - `OMR` - Omani Rial - // - `PKR` - Pakistani Rupee - // - `XPD` - Palladium - // - `PAB` - Panamanian Balboa - // - `PGK` - Papua New Guinean Kina - // - `PYG` - Paraguayan Guarani - // - `PEI` - Peruvian Inti - // - `PEN` - Peruvian Sol - // - `PES` - Peruvian Sol (1863–1965) - // - `PHP` - Philippine Peso - // - `XPT` - Platinum - // - `PLN` - Polish Zloty - // - `PLZ` - Polish Zloty (1950–1995) - // - `PTE` - Portuguese Escudo - // - `GWE` - Portuguese Guinea Escudo - // - `QAR` - Qatari Rial - // - `XRE` - RINET Funds - // - `RHD` - Rhodesian Dollar - // - `RON` - Romanian Leu - // - `ROL` - Romanian Leu (1952–2006) - // - `RUB` - Russian Ruble - // - `RUR` - Russian Ruble (1991–1998) - // - `RWF` - Rwandan Franc - // - `SVC` - Salvadoran Colón - // - `WST` - Samoan Tala - // - `SAR` - Saudi Riyal - // - `RSD` - Serbian Dinar - // - `CSD` - Serbian Dinar (2002–2006) - // - `SCR` - Seychellois Rupee - // - `SLL` - Sierra Leonean Leone - // - `XAG` - Silver - // - `SGD` - Singapore Dollar - // - `SKK` - Slovak Koruna - // - `SIT` - Slovenian Tolar - // - `SBD` - Solomon Islands Dollar - // - `SOS` - Somali Shilling - // - `ZAR` - South African Rand - // - `ZAL` - South African Rand (financial) - // - `KRH` - South Korean Hwan (1953–1962) - // - `KRW` - South Korean Won - // - `KRO` - South Korean Won (1945–1953) - // - `SSP` - South Sudanese Pound - // - `SUR` - Soviet Rouble - // - `ESP` - Spanish Peseta - // - `ESA` - Spanish Peseta (A account) - // - `ESB` - Spanish Peseta (convertible account) - // - `XDR` - Special Drawing Rights - // - `LKR` - Sri Lankan Rupee - // - `SHP` - St. Helena Pound - // - `XSU` - Sucre - // - `SDD` - Sudanese Dinar (1992–2007) - // - `SDG` - Sudanese Pound - // - `SDP` - Sudanese Pound (1957–1998) - // - `SRD` - Surinamese Dollar - // - `SRG` - Surinamese Guilder - // - `SZL` - Swazi Lilangeni - // - `SEK` - Swedish Krona - // - `CHF` - Swiss Franc - // - `SYP` - Syrian Pound - // - `STN` - São Tomé & Príncipe Dobra - // - `STD` - São Tomé & Príncipe Dobra (1977–2017) - // - `TVD` - TVD - // - `TJR` - Tajikistani Ruble - // - `TJS` - Tajikistani Somoni - // - `TZS` - Tanzanian Shilling - // - `XTS` - Testing Currency Code - // - `THB` - Thai Baht - // - `XXX` - The codes assigned for transactions where no currency is involved - // - `TPE` - Timorese Escudo - // - `TOP` - Tongan Paʻanga - // - `TTD` - Trinidad & Tobago Dollar - // - `TND` - Tunisian Dinar - // - `TRY` - Turkish Lira - // - `TRL` - Turkish Lira (1922–2005) - // - `TMT` - Turkmenistani Manat - // - `TMM` - Turkmenistani Manat (1993–2009) - // - `USD` - US Dollar - // - `USN` - US Dollar (Next day) - // - `USS` - US Dollar (Same day) - // - `UGX` - Ugandan Shilling - // - `UGS` - Ugandan Shilling (1966–1987) - // - `UAH` - Ukrainian Hryvnia - // - `UAK` - Ukrainian Karbovanets - // - `AED` - United Arab Emirates Dirham - // - `UYW` - Uruguayan Nominal Wage Index Unit - // - `UYU` - Uruguayan Peso - // - `UYP` - Uruguayan Peso (1975–1993) - // - `UYI` - Uruguayan Peso (Indexed Units) - // - `UZS` - Uzbekistani Som - // - `VUV` - Vanuatu Vatu - // - `VES` - Venezuelan Bolívar - // - `VEB` - Venezuelan Bolívar (1871–2008) - // - `VEF` - Venezuelan Bolívar (2008–2018) - // - `VND` - Vietnamese Dong - // - `VNN` - Vietnamese Dong (1978–1985) - // - `CHE` - WIR Euro - // - `CHW` - WIR Franc - // - `XOF` - West African CFA Franc - // - `YDD` - Yemeni Dinar - // - `YER` - Yemeni Rial - // - `YUN` - Yugoslavian Convertible Dinar (1990–1992) - // - `YUD` - Yugoslavian Hard Dinar (1966–1990) - // - `YUM` - Yugoslavian New Dinar (1994–2002) - // - `YUR` - Yugoslavian Reformed Dinar (1992–1993) - // - `ZWN` - ZWN - // - `ZRN` - Zairean New Zaire (1993–1998) - // - `ZRZ` - Zairean Zaire (1971–1993) - // - `ZMW` - Zambian Kwacha - // - `ZMK` - Zambian Kwacha (1968–2012) - // - `ZWD` - Zimbabwean Dollar (1980–2008) - // - `ZWR` - Zimbabwean Dollar (2008) - // - `ZWL` - Zimbabwean Dollar (2009) - Currency *PaymentCurrency `json:"currency,omitempty"` - // The payment's exchange rate. - ExchangeRate *string `json:"exchange_rate,omitempty"` - // The company the payment belongs to. - Company *PaymentCompany `json:"company,omitempty"` - // The total amount of money being paid to the supplier, or customer, after taxes. - TotalAmount *float64 `json:"total_amount,omitempty"` - // The type of the invoice. - // - // - `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE - // - `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE - Type *PaymentType `json:"type,omitempty"` - TrackingCategories []*PaymentTrackingCategoriesItem `json:"tracking_categories,omitempty"` - // The accounting period that the Payment was generated in. - AccountingPeriod *PaymentAccountingPeriod `json:"accounting_period,omitempty"` - // A list of “Payment Applied to Lines” objects. - AppliedToLines []*PaymentAppliedToLinesItem `json:"applied_to_lines,omitempty"` - // When the third party's payment entry was updated. - RemoteUpdatedAt *time.Time `json:"remote_updated_at,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` - RemoteFields []*RemoteField `json:"remote_fields,omitempty"` - - _rawJSON json.RawMessage +func (p *Payment) GetExtraProperties() map[string]interface{} { + return p.extraProperties } func (p *Payment) UnmarshalJSON(data []byte) error { - type unmarshaler Payment - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { + type embed Payment + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + TransactionDate *internal.DateTime `json:"transaction_date,omitempty"` + RemoteUpdatedAt *internal.DateTime `json:"remote_updated_at,omitempty"` + }{ + embed: embed(*p), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *p = Payment(unmarshaler.embed) + p.CreatedAt = unmarshaler.CreatedAt.TimePtr() + p.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + p.TransactionDate = unmarshaler.TransactionDate.TimePtr() + p.RemoteUpdatedAt = unmarshaler.RemoteUpdatedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { return err } - *p = Payment(value) - p._rawJSON = json.RawMessage(data) + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) return nil } +func (p *Payment) MarshalJSON() ([]byte, error) { + type embed Payment + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + TransactionDate *internal.DateTime `json:"transaction_date,omitempty"` + RemoteUpdatedAt *internal.DateTime `json:"remote_updated_at,omitempty"` + }{ + embed: embed(*p), + CreatedAt: internal.NewOptionalDateTime(p.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(p.ModifiedAt), + TransactionDate: internal.NewOptionalDateTime(p.TransactionDate), + RemoteUpdatedAt: internal.NewOptionalDateTime(p.RemoteUpdatedAt), + } + return json.Marshal(marshaler) +} + func (p *Payment) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(p); err == nil { + if value, err := internal.StringifyJSON(p); err == nil { return value } return fmt.Sprintf("%#v", p) @@ -34430,29 +14504,36 @@ func (p *Payment) String() string { // The supplier’s or customer’s account in which the payment is made. type PaymentAccount struct { - typeName string - String string - Account *Account + String string + Account *Account + + typ string } -func NewPaymentAccountFromString(value string) *PaymentAccount { - return &PaymentAccount{typeName: "string", String: value} +func (p *PaymentAccount) GetString() string { + if p == nil { + return "" + } + return p.String } -func NewPaymentAccountFromAccount(value *Account) *PaymentAccount { - return &PaymentAccount{typeName: "account", Account: value} +func (p *PaymentAccount) GetAccount() *Account { + if p == nil { + return nil + } + return p.Account } func (p *PaymentAccount) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" + p.typ = "String" p.String = valueString return nil } valueAccount := new(Account) if err := json.Unmarshal(data, &valueAccount); err == nil { - p.typeName = "account" + p.typ = "Account" p.Account = valueAccount return nil } @@ -34460,14 +14541,13 @@ func (p *PaymentAccount) UnmarshalJSON(data []byte) error { } func (p PaymentAccount) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": + if p.typ == "String" || p.String != "" { return json.Marshal(p.String) - case "account": + } + if p.typ == "Account" || p.Account != nil { return json.Marshal(p.Account) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) } type PaymentAccountVisitor interface { @@ -34476,41 +14556,47 @@ type PaymentAccountVisitor interface { } func (p *PaymentAccount) Accept(visitor PaymentAccountVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": + if p.typ == "String" || p.String != "" { return visitor.VisitString(p.String) - case "account": + } + if p.typ == "Account" || p.Account != nil { return visitor.VisitAccount(p.Account) } + return fmt.Errorf("type %T does not include a non-empty union type", p) } // The accounting period that the Payment was generated in. type PaymentAccountingPeriod struct { - typeName string String string AccountingPeriod *AccountingPeriod + + typ string } -func NewPaymentAccountingPeriodFromString(value string) *PaymentAccountingPeriod { - return &PaymentAccountingPeriod{typeName: "string", String: value} +func (p *PaymentAccountingPeriod) GetString() string { + if p == nil { + return "" + } + return p.String } -func NewPaymentAccountingPeriodFromAccountingPeriod(value *AccountingPeriod) *PaymentAccountingPeriod { - return &PaymentAccountingPeriod{typeName: "accountingPeriod", AccountingPeriod: value} +func (p *PaymentAccountingPeriod) GetAccountingPeriod() *AccountingPeriod { + if p == nil { + return nil + } + return p.AccountingPeriod } func (p *PaymentAccountingPeriod) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" + p.typ = "String" p.String = valueString return nil } valueAccountingPeriod := new(AccountingPeriod) if err := json.Unmarshal(data, &valueAccountingPeriod); err == nil { - p.typeName = "accountingPeriod" + p.typ = "AccountingPeriod" p.AccountingPeriod = valueAccountingPeriod return nil } @@ -34518,14 +14604,13 @@ func (p *PaymentAccountingPeriod) UnmarshalJSON(data []byte) error { } func (p PaymentAccountingPeriod) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": + if p.typ == "String" || p.String != "" { return json.Marshal(p.String) - case "accountingPeriod": + } + if p.typ == "AccountingPeriod" || p.AccountingPeriod != nil { return json.Marshal(p.AccountingPeriod) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) } type PaymentAccountingPeriodVisitor interface { @@ -34534,40 +14619,46 @@ type PaymentAccountingPeriodVisitor interface { } func (p *PaymentAccountingPeriod) Accept(visitor PaymentAccountingPeriodVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": + if p.typ == "String" || p.String != "" { return visitor.VisitString(p.String) - case "accountingPeriod": + } + if p.typ == "AccountingPeriod" || p.AccountingPeriod != nil { return visitor.VisitAccountingPeriod(p.AccountingPeriod) } + return fmt.Errorf("type %T does not include a non-empty union type", p) } type PaymentAppliedToLinesItem struct { - typeName string String string PaymentLineItem *PaymentLineItem + + typ string } -func NewPaymentAppliedToLinesItemFromString(value string) *PaymentAppliedToLinesItem { - return &PaymentAppliedToLinesItem{typeName: "string", String: value} +func (p *PaymentAppliedToLinesItem) GetString() string { + if p == nil { + return "" + } + return p.String } -func NewPaymentAppliedToLinesItemFromPaymentLineItem(value *PaymentLineItem) *PaymentAppliedToLinesItem { - return &PaymentAppliedToLinesItem{typeName: "paymentLineItem", PaymentLineItem: value} +func (p *PaymentAppliedToLinesItem) GetPaymentLineItem() *PaymentLineItem { + if p == nil { + return nil + } + return p.PaymentLineItem } func (p *PaymentAppliedToLinesItem) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" + p.typ = "String" p.String = valueString return nil } valuePaymentLineItem := new(PaymentLineItem) if err := json.Unmarshal(data, &valuePaymentLineItem); err == nil { - p.typeName = "paymentLineItem" + p.typ = "PaymentLineItem" p.PaymentLineItem = valuePaymentLineItem return nil } @@ -34575,14 +14666,13 @@ func (p *PaymentAppliedToLinesItem) UnmarshalJSON(data []byte) error { } func (p PaymentAppliedToLinesItem) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": + if p.typ == "String" || p.String != "" { return json.Marshal(p.String) - case "paymentLineItem": + } + if p.typ == "PaymentLineItem" || p.PaymentLineItem != nil { return json.Marshal(p.PaymentLineItem) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) } type PaymentAppliedToLinesItemVisitor interface { @@ -34591,41 +14681,47 @@ type PaymentAppliedToLinesItemVisitor interface { } func (p *PaymentAppliedToLinesItem) Accept(visitor PaymentAppliedToLinesItemVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": + if p.typ == "String" || p.String != "" { return visitor.VisitString(p.String) - case "paymentLineItem": + } + if p.typ == "PaymentLineItem" || p.PaymentLineItem != nil { return visitor.VisitPaymentLineItem(p.PaymentLineItem) } + return fmt.Errorf("type %T does not include a non-empty union type", p) } // The company the payment belongs to. type PaymentCompany struct { - typeName string String string CompanyInfo *CompanyInfo + + typ string } -func NewPaymentCompanyFromString(value string) *PaymentCompany { - return &PaymentCompany{typeName: "string", String: value} +func (p *PaymentCompany) GetString() string { + if p == nil { + return "" + } + return p.String } -func NewPaymentCompanyFromCompanyInfo(value *CompanyInfo) *PaymentCompany { - return &PaymentCompany{typeName: "companyInfo", CompanyInfo: value} +func (p *PaymentCompany) GetCompanyInfo() *CompanyInfo { + if p == nil { + return nil + } + return p.CompanyInfo } func (p *PaymentCompany) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" + p.typ = "String" p.String = valueString return nil } valueCompanyInfo := new(CompanyInfo) if err := json.Unmarshal(data, &valueCompanyInfo); err == nil { - p.typeName = "companyInfo" + p.typ = "CompanyInfo" p.CompanyInfo = valueCompanyInfo return nil } @@ -34633,14 +14729,13 @@ func (p *PaymentCompany) UnmarshalJSON(data []byte) error { } func (p PaymentCompany) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": + if p.typ == "String" || p.String != "" { return json.Marshal(p.String) - case "companyInfo": + } + if p.typ == "CompanyInfo" || p.CompanyInfo != nil { return json.Marshal(p.CompanyInfo) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) } type PaymentCompanyVisitor interface { @@ -34649,41 +14744,47 @@ type PaymentCompanyVisitor interface { } func (p *PaymentCompany) Accept(visitor PaymentCompanyVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": + if p.typ == "String" || p.String != "" { return visitor.VisitString(p.String) - case "companyInfo": + } + if p.typ == "CompanyInfo" || p.CompanyInfo != nil { return visitor.VisitCompanyInfo(p.CompanyInfo) } + return fmt.Errorf("type %T does not include a non-empty union type", p) } // The supplier, or customer involved in the payment. type PaymentContact struct { - typeName string - String string - Contact *Contact + String string + Contact *Contact + + typ string } -func NewPaymentContactFromString(value string) *PaymentContact { - return &PaymentContact{typeName: "string", String: value} +func (p *PaymentContact) GetString() string { + if p == nil { + return "" + } + return p.String } -func NewPaymentContactFromContact(value *Contact) *PaymentContact { - return &PaymentContact{typeName: "contact", Contact: value} +func (p *PaymentContact) GetContact() *Contact { + if p == nil { + return nil + } + return p.Contact } func (p *PaymentContact) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" + p.typ = "String" p.String = valueString return nil } valueContact := new(Contact) if err := json.Unmarshal(data, &valueContact); err == nil { - p.typeName = "contact" + p.typ = "Contact" p.Contact = valueContact return nil } @@ -34691,14 +14792,13 @@ func (p *PaymentContact) UnmarshalJSON(data []byte) error { } func (p PaymentContact) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": + if p.typ == "String" || p.String != "" { return json.Marshal(p.String) - case "contact": + } + if p.typ == "Contact" || p.Contact != nil { return json.Marshal(p.Contact) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) } type PaymentContactVisitor interface { @@ -34707,348 +14807,354 @@ type PaymentContactVisitor interface { } func (p *PaymentContact) Accept(visitor PaymentContactVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": + if p.typ == "String" || p.String != "" { return visitor.VisitString(p.String) - case "contact": + } + if p.typ == "Contact" || p.Contact != nil { return visitor.VisitContact(p.Contact) } + return fmt.Errorf("type %T does not include a non-empty union type", p) } // The payment's currency. // -// - `XUA` - ADB Unit of Account -// - `AFN` - Afghan Afghani -// - `AFA` - Afghan Afghani (1927–2002) -// - `ALL` - Albanian Lek -// - `ALK` - Albanian Lek (1946–1965) -// - `DZD` - Algerian Dinar -// - `ADP` - Andorran Peseta -// - `AOA` - Angolan Kwanza -// - `AOK` - Angolan Kwanza (1977–1991) -// - `AON` - Angolan New Kwanza (1990–2000) -// - `AOR` - Angolan Readjusted Kwanza (1995–1999) -// - `ARA` - Argentine Austral -// - `ARS` - Argentine Peso -// - `ARM` - Argentine Peso (1881–1970) -// - `ARP` - Argentine Peso (1983–1985) -// - `ARL` - Argentine Peso Ley (1970–1983) -// - `AMD` - Armenian Dram -// - `AWG` - Aruban Florin -// - `AUD` - Australian Dollar -// - `ATS` - Austrian Schilling -// - `AZN` - Azerbaijani Manat -// - `AZM` - Azerbaijani Manat (1993–2006) -// - `BSD` - Bahamian Dollar -// - `BHD` - Bahraini Dinar -// - `BDT` - Bangladeshi Taka -// - `BBD` - Barbadian Dollar -// - `BYN` - Belarusian Ruble -// - `BYB` - Belarusian Ruble (1994–1999) -// - `BYR` - Belarusian Ruble (2000–2016) -// - `BEF` - Belgian Franc -// - `BEC` - Belgian Franc (convertible) -// - `BEL` - Belgian Franc (financial) -// - `BZD` - Belize Dollar -// - `BMD` - Bermudan Dollar -// - `BTN` - Bhutanese Ngultrum -// - `BOB` - Bolivian Boliviano -// - `BOL` - Bolivian Boliviano (1863–1963) -// - `BOV` - Bolivian Mvdol -// - `BOP` - Bolivian Peso -// - `BAM` - Bosnia-Herzegovina Convertible Mark -// - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) -// - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) -// - `BWP` - Botswanan Pula -// - `BRC` - Brazilian Cruzado (1986–1989) -// - `BRZ` - Brazilian Cruzeiro (1942–1967) -// - `BRE` - Brazilian Cruzeiro (1990–1993) -// - `BRR` - Brazilian Cruzeiro (1993–1994) -// - `BRN` - Brazilian New Cruzado (1989–1990) -// - `BRB` - Brazilian New Cruzeiro (1967–1986) -// - `BRL` - Brazilian Real -// - `GBP` - British Pound -// - `BND` - Brunei Dollar -// - `BGL` - Bulgarian Hard Lev -// - `BGN` - Bulgarian Lev -// - `BGO` - Bulgarian Lev (1879–1952) -// - `BGM` - Bulgarian Socialist Lev -// - `BUK` - Burmese Kyat -// - `BIF` - Burundian Franc -// - `XPF` - CFP Franc -// - `KHR` - Cambodian Riel -// - `CAD` - Canadian Dollar -// - `CVE` - Cape Verdean Escudo -// - `KYD` - Cayman Islands Dollar -// - `XAF` - Central African CFA Franc -// - `CLE` - Chilean Escudo -// - `CLP` - Chilean Peso -// - `CLF` - Chilean Unit of Account (UF) -// - `CNX` - Chinese People’s Bank Dollar -// - `CNY` - Chinese Yuan -// - `CNH` - Chinese Yuan (offshore) -// - `COP` - Colombian Peso -// - `COU` - Colombian Real Value Unit -// - `KMF` - Comorian Franc -// - `CDF` - Congolese Franc -// - `CRC` - Costa Rican Colón -// - `HRD` - Croatian Dinar -// - `HRK` - Croatian Kuna -// - `CUC` - Cuban Convertible Peso -// - `CUP` - Cuban Peso -// - `CYP` - Cypriot Pound -// - `CZK` - Czech Koruna -// - `CSK` - Czechoslovak Hard Koruna -// - `DKK` - Danish Krone -// - `DJF` - Djiboutian Franc -// - `DOP` - Dominican Peso -// - `NLG` - Dutch Guilder -// - `XCD` - East Caribbean Dollar -// - `DDM` - East German Mark -// - `ECS` - Ecuadorian Sucre -// - `ECV` - Ecuadorian Unit of Constant Value -// - `EGP` - Egyptian Pound -// - `GQE` - Equatorial Guinean Ekwele -// - `ERN` - Eritrean Nakfa -// - `EEK` - Estonian Kroon -// - `ETB` - Ethiopian Birr -// - `EUR` - Euro -// - `XBA` - European Composite Unit -// - `XEU` - European Currency Unit -// - `XBB` - European Monetary Unit -// - `XBC` - European Unit of Account (XBC) -// - `XBD` - European Unit of Account (XBD) -// - `FKP` - Falkland Islands Pound -// - `FJD` - Fijian Dollar -// - `FIM` - Finnish Markka -// - `FRF` - French Franc -// - `XFO` - French Gold Franc -// - `XFU` - French UIC-Franc -// - `GMD` - Gambian Dalasi -// - `GEK` - Georgian Kupon Larit -// - `GEL` - Georgian Lari -// - `DEM` - German Mark -// - `GHS` - Ghanaian Cedi -// - `GHC` - Ghanaian Cedi (1979–2007) -// - `GIP` - Gibraltar Pound -// - `XAU` - Gold -// - `GRD` - Greek Drachma -// - `GTQ` - Guatemalan Quetzal -// - `GWP` - Guinea-Bissau Peso -// - `GNF` - Guinean Franc -// - `GNS` - Guinean Syli -// - `GYD` - Guyanaese Dollar -// - `HTG` - Haitian Gourde -// - `HNL` - Honduran Lempira -// - `HKD` - Hong Kong Dollar -// - `HUF` - Hungarian Forint -// - `IMP` - IMP -// - `ISK` - Icelandic Króna -// - `ISJ` - Icelandic Króna (1918–1981) -// - `INR` - Indian Rupee -// - `IDR` - Indonesian Rupiah -// - `IRR` - Iranian Rial -// - `IQD` - Iraqi Dinar -// - `IEP` - Irish Pound -// - `ILS` - Israeli New Shekel -// - `ILP` - Israeli Pound -// - `ILR` - Israeli Shekel (1980–1985) -// - `ITL` - Italian Lira -// - `JMD` - Jamaican Dollar -// - `JPY` - Japanese Yen -// - `JOD` - Jordanian Dinar -// - `KZT` - Kazakhstani Tenge -// - `KES` - Kenyan Shilling -// - `KWD` - Kuwaiti Dinar -// - `KGS` - Kyrgystani Som -// - `LAK` - Laotian Kip -// - `LVL` - Latvian Lats -// - `LVR` - Latvian Ruble -// - `LBP` - Lebanese Pound -// - `LSL` - Lesotho Loti -// - `LRD` - Liberian Dollar -// - `LYD` - Libyan Dinar -// - `LTL` - Lithuanian Litas -// - `LTT` - Lithuanian Talonas -// - `LUL` - Luxembourg Financial Franc -// - `LUC` - Luxembourgian Convertible Franc -// - `LUF` - Luxembourgian Franc -// - `MOP` - Macanese Pataca -// - `MKD` - Macedonian Denar -// - `MKN` - Macedonian Denar (1992–1993) -// - `MGA` - Malagasy Ariary -// - `MGF` - Malagasy Franc -// - `MWK` - Malawian Kwacha -// - `MYR` - Malaysian Ringgit -// - `MVR` - Maldivian Rufiyaa -// - `MVP` - Maldivian Rupee (1947–1981) -// - `MLF` - Malian Franc -// - `MTL` - Maltese Lira -// - `MTP` - Maltese Pound -// - `MRU` - Mauritanian Ouguiya -// - `MRO` - Mauritanian Ouguiya (1973–2017) -// - `MUR` - Mauritian Rupee -// - `MXV` - Mexican Investment Unit -// - `MXN` - Mexican Peso -// - `MXP` - Mexican Silver Peso (1861–1992) -// - `MDC` - Moldovan Cupon -// - `MDL` - Moldovan Leu -// - `MCF` - Monegasque Franc -// - `MNT` - Mongolian Tugrik -// - `MAD` - Moroccan Dirham -// - `MAF` - Moroccan Franc -// - `MZE` - Mozambican Escudo -// - `MZN` - Mozambican Metical -// - `MZM` - Mozambican Metical (1980–2006) -// - `MMK` - Myanmar Kyat -// - `NAD` - Namibian Dollar -// - `NPR` - Nepalese Rupee -// - `ANG` - Netherlands Antillean Guilder -// - `TWD` - New Taiwan Dollar -// - `NZD` - New Zealand Dollar -// - `NIO` - Nicaraguan Córdoba -// - `NIC` - Nicaraguan Córdoba (1988–1991) -// - `NGN` - Nigerian Naira -// - `KPW` - North Korean Won -// - `NOK` - Norwegian Krone -// - `OMR` - Omani Rial -// - `PKR` - Pakistani Rupee -// - `XPD` - Palladium -// - `PAB` - Panamanian Balboa -// - `PGK` - Papua New Guinean Kina -// - `PYG` - Paraguayan Guarani -// - `PEI` - Peruvian Inti -// - `PEN` - Peruvian Sol -// - `PES` - Peruvian Sol (1863–1965) -// - `PHP` - Philippine Peso -// - `XPT` - Platinum -// - `PLN` - Polish Zloty -// - `PLZ` - Polish Zloty (1950–1995) -// - `PTE` - Portuguese Escudo -// - `GWE` - Portuguese Guinea Escudo -// - `QAR` - Qatari Rial -// - `XRE` - RINET Funds -// - `RHD` - Rhodesian Dollar -// - `RON` - Romanian Leu -// - `ROL` - Romanian Leu (1952–2006) -// - `RUB` - Russian Ruble -// - `RUR` - Russian Ruble (1991–1998) -// - `RWF` - Rwandan Franc -// - `SVC` - Salvadoran Colón -// - `WST` - Samoan Tala -// - `SAR` - Saudi Riyal -// - `RSD` - Serbian Dinar -// - `CSD` - Serbian Dinar (2002–2006) -// - `SCR` - Seychellois Rupee -// - `SLL` - Sierra Leonean Leone -// - `XAG` - Silver -// - `SGD` - Singapore Dollar -// - `SKK` - Slovak Koruna -// - `SIT` - Slovenian Tolar -// - `SBD` - Solomon Islands Dollar -// - `SOS` - Somali Shilling -// - `ZAR` - South African Rand -// - `ZAL` - South African Rand (financial) -// - `KRH` - South Korean Hwan (1953–1962) -// - `KRW` - South Korean Won -// - `KRO` - South Korean Won (1945–1953) -// - `SSP` - South Sudanese Pound -// - `SUR` - Soviet Rouble -// - `ESP` - Spanish Peseta -// - `ESA` - Spanish Peseta (A account) -// - `ESB` - Spanish Peseta (convertible account) -// - `XDR` - Special Drawing Rights -// - `LKR` - Sri Lankan Rupee -// - `SHP` - St. Helena Pound -// - `XSU` - Sucre -// - `SDD` - Sudanese Dinar (1992–2007) -// - `SDG` - Sudanese Pound -// - `SDP` - Sudanese Pound (1957–1998) -// - `SRD` - Surinamese Dollar -// - `SRG` - Surinamese Guilder -// - `SZL` - Swazi Lilangeni -// - `SEK` - Swedish Krona -// - `CHF` - Swiss Franc -// - `SYP` - Syrian Pound -// - `STN` - São Tomé & Príncipe Dobra -// - `STD` - São Tomé & Príncipe Dobra (1977–2017) -// - `TVD` - TVD -// - `TJR` - Tajikistani Ruble -// - `TJS` - Tajikistani Somoni -// - `TZS` - Tanzanian Shilling -// - `XTS` - Testing Currency Code -// - `THB` - Thai Baht -// - `XXX` - The codes assigned for transactions where no currency is involved -// - `TPE` - Timorese Escudo -// - `TOP` - Tongan Paʻanga -// - `TTD` - Trinidad & Tobago Dollar -// - `TND` - Tunisian Dinar -// - `TRY` - Turkish Lira -// - `TRL` - Turkish Lira (1922–2005) -// - `TMT` - Turkmenistani Manat -// - `TMM` - Turkmenistani Manat (1993–2009) -// - `USD` - US Dollar -// - `USN` - US Dollar (Next day) -// - `USS` - US Dollar (Same day) -// - `UGX` - Ugandan Shilling -// - `UGS` - Ugandan Shilling (1966–1987) -// - `UAH` - Ukrainian Hryvnia -// - `UAK` - Ukrainian Karbovanets -// - `AED` - United Arab Emirates Dirham -// - `UYW` - Uruguayan Nominal Wage Index Unit -// - `UYU` - Uruguayan Peso -// - `UYP` - Uruguayan Peso (1975–1993) -// - `UYI` - Uruguayan Peso (Indexed Units) -// - `UZS` - Uzbekistani Som -// - `VUV` - Vanuatu Vatu -// - `VES` - Venezuelan Bolívar -// - `VEB` - Venezuelan Bolívar (1871–2008) -// - `VEF` - Venezuelan Bolívar (2008–2018) -// - `VND` - Vietnamese Dong -// - `VNN` - Vietnamese Dong (1978–1985) -// - `CHE` - WIR Euro -// - `CHW` - WIR Franc -// - `XOF` - West African CFA Franc -// - `YDD` - Yemeni Dinar -// - `YER` - Yemeni Rial -// - `YUN` - Yugoslavian Convertible Dinar (1990–1992) -// - `YUD` - Yugoslavian Hard Dinar (1966–1990) -// - `YUM` - Yugoslavian New Dinar (1994–2002) -// - `YUR` - Yugoslavian Reformed Dinar (1992–1993) -// - `ZWN` - ZWN -// - `ZRN` - Zairean New Zaire (1993–1998) -// - `ZRZ` - Zairean Zaire (1971–1993) -// - `ZMW` - Zambian Kwacha -// - `ZMK` - Zambian Kwacha (1968–2012) -// - `ZWD` - Zimbabwean Dollar (1980–2008) -// - `ZWR` - Zimbabwean Dollar (2008) -// - `ZWL` - Zimbabwean Dollar (2009) +// * `XUA` - ADB Unit of Account +// * `AFN` - Afghan Afghani +// * `AFA` - Afghan Afghani (1927–2002) +// * `ALL` - Albanian Lek +// * `ALK` - Albanian Lek (1946–1965) +// * `DZD` - Algerian Dinar +// * `ADP` - Andorran Peseta +// * `AOA` - Angolan Kwanza +// * `AOK` - Angolan Kwanza (1977–1991) +// * `AON` - Angolan New Kwanza (1990–2000) +// * `AOR` - Angolan Readjusted Kwanza (1995–1999) +// * `ARA` - Argentine Austral +// * `ARS` - Argentine Peso +// * `ARM` - Argentine Peso (1881–1970) +// * `ARP` - Argentine Peso (1983–1985) +// * `ARL` - Argentine Peso Ley (1970–1983) +// * `AMD` - Armenian Dram +// * `AWG` - Aruban Florin +// * `AUD` - Australian Dollar +// * `ATS` - Austrian Schilling +// * `AZN` - Azerbaijani Manat +// * `AZM` - Azerbaijani Manat (1993–2006) +// * `BSD` - Bahamian Dollar +// * `BHD` - Bahraini Dinar +// * `BDT` - Bangladeshi Taka +// * `BBD` - Barbadian Dollar +// * `BYN` - Belarusian Ruble +// * `BYB` - Belarusian Ruble (1994–1999) +// * `BYR` - Belarusian Ruble (2000–2016) +// * `BEF` - Belgian Franc +// * `BEC` - Belgian Franc (convertible) +// * `BEL` - Belgian Franc (financial) +// * `BZD` - Belize Dollar +// * `BMD` - Bermudan Dollar +// * `BTN` - Bhutanese Ngultrum +// * `BOB` - Bolivian Boliviano +// * `BOL` - Bolivian Boliviano (1863–1963) +// * `BOV` - Bolivian Mvdol +// * `BOP` - Bolivian Peso +// * `BAM` - Bosnia-Herzegovina Convertible Mark +// * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) +// * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) +// * `BWP` - Botswanan Pula +// * `BRC` - Brazilian Cruzado (1986–1989) +// * `BRZ` - Brazilian Cruzeiro (1942–1967) +// * `BRE` - Brazilian Cruzeiro (1990–1993) +// * `BRR` - Brazilian Cruzeiro (1993–1994) +// * `BRN` - Brazilian New Cruzado (1989–1990) +// * `BRB` - Brazilian New Cruzeiro (1967–1986) +// * `BRL` - Brazilian Real +// * `GBP` - British Pound +// * `BND` - Brunei Dollar +// * `BGL` - Bulgarian Hard Lev +// * `BGN` - Bulgarian Lev +// * `BGO` - Bulgarian Lev (1879–1952) +// * `BGM` - Bulgarian Socialist Lev +// * `BUK` - Burmese Kyat +// * `BIF` - Burundian Franc +// * `XPF` - CFP Franc +// * `KHR` - Cambodian Riel +// * `CAD` - Canadian Dollar +// * `CVE` - Cape Verdean Escudo +// * `KYD` - Cayman Islands Dollar +// * `XAF` - Central African CFA Franc +// * `CLE` - Chilean Escudo +// * `CLP` - Chilean Peso +// * `CLF` - Chilean Unit of Account (UF) +// * `CNX` - Chinese People’s Bank Dollar +// * `CNY` - Chinese Yuan +// * `CNH` - Chinese Yuan (offshore) +// * `COP` - Colombian Peso +// * `COU` - Colombian Real Value Unit +// * `KMF` - Comorian Franc +// * `CDF` - Congolese Franc +// * `CRC` - Costa Rican Colón +// * `HRD` - Croatian Dinar +// * `HRK` - Croatian Kuna +// * `CUC` - Cuban Convertible Peso +// * `CUP` - Cuban Peso +// * `CYP` - Cypriot Pound +// * `CZK` - Czech Koruna +// * `CSK` - Czechoslovak Hard Koruna +// * `DKK` - Danish Krone +// * `DJF` - Djiboutian Franc +// * `DOP` - Dominican Peso +// * `NLG` - Dutch Guilder +// * `XCD` - East Caribbean Dollar +// * `DDM` - East German Mark +// * `ECS` - Ecuadorian Sucre +// * `ECV` - Ecuadorian Unit of Constant Value +// * `EGP` - Egyptian Pound +// * `GQE` - Equatorial Guinean Ekwele +// * `ERN` - Eritrean Nakfa +// * `EEK` - Estonian Kroon +// * `ETB` - Ethiopian Birr +// * `EUR` - Euro +// * `XBA` - European Composite Unit +// * `XEU` - European Currency Unit +// * `XBB` - European Monetary Unit +// * `XBC` - European Unit of Account (XBC) +// * `XBD` - European Unit of Account (XBD) +// * `FKP` - Falkland Islands Pound +// * `FJD` - Fijian Dollar +// * `FIM` - Finnish Markka +// * `FRF` - French Franc +// * `XFO` - French Gold Franc +// * `XFU` - French UIC-Franc +// * `GMD` - Gambian Dalasi +// * `GEK` - Georgian Kupon Larit +// * `GEL` - Georgian Lari +// * `DEM` - German Mark +// * `GHS` - Ghanaian Cedi +// * `GHC` - Ghanaian Cedi (1979–2007) +// * `GIP` - Gibraltar Pound +// * `XAU` - Gold +// * `GRD` - Greek Drachma +// * `GTQ` - Guatemalan Quetzal +// * `GWP` - Guinea-Bissau Peso +// * `GNF` - Guinean Franc +// * `GNS` - Guinean Syli +// * `GYD` - Guyanaese Dollar +// * `HTG` - Haitian Gourde +// * `HNL` - Honduran Lempira +// * `HKD` - Hong Kong Dollar +// * `HUF` - Hungarian Forint +// * `IMP` - IMP +// * `ISK` - Icelandic Króna +// * `ISJ` - Icelandic Króna (1918–1981) +// * `INR` - Indian Rupee +// * `IDR` - Indonesian Rupiah +// * `IRR` - Iranian Rial +// * `IQD` - Iraqi Dinar +// * `IEP` - Irish Pound +// * `ILS` - Israeli New Shekel +// * `ILP` - Israeli Pound +// * `ILR` - Israeli Shekel (1980–1985) +// * `ITL` - Italian Lira +// * `JMD` - Jamaican Dollar +// * `JPY` - Japanese Yen +// * `JOD` - Jordanian Dinar +// * `KZT` - Kazakhstani Tenge +// * `KES` - Kenyan Shilling +// * `KWD` - Kuwaiti Dinar +// * `KGS` - Kyrgystani Som +// * `LAK` - Laotian Kip +// * `LVL` - Latvian Lats +// * `LVR` - Latvian Ruble +// * `LBP` - Lebanese Pound +// * `LSL` - Lesotho Loti +// * `LRD` - Liberian Dollar +// * `LYD` - Libyan Dinar +// * `LTL` - Lithuanian Litas +// * `LTT` - Lithuanian Talonas +// * `LUL` - Luxembourg Financial Franc +// * `LUC` - Luxembourgian Convertible Franc +// * `LUF` - Luxembourgian Franc +// * `MOP` - Macanese Pataca +// * `MKD` - Macedonian Denar +// * `MKN` - Macedonian Denar (1992–1993) +// * `MGA` - Malagasy Ariary +// * `MGF` - Malagasy Franc +// * `MWK` - Malawian Kwacha +// * `MYR` - Malaysian Ringgit +// * `MVR` - Maldivian Rufiyaa +// * `MVP` - Maldivian Rupee (1947–1981) +// * `MLF` - Malian Franc +// * `MTL` - Maltese Lira +// * `MTP` - Maltese Pound +// * `MRU` - Mauritanian Ouguiya +// * `MRO` - Mauritanian Ouguiya (1973–2017) +// * `MUR` - Mauritian Rupee +// * `MXV` - Mexican Investment Unit +// * `MXN` - Mexican Peso +// * `MXP` - Mexican Silver Peso (1861–1992) +// * `MDC` - Moldovan Cupon +// * `MDL` - Moldovan Leu +// * `MCF` - Monegasque Franc +// * `MNT` - Mongolian Tugrik +// * `MAD` - Moroccan Dirham +// * `MAF` - Moroccan Franc +// * `MZE` - Mozambican Escudo +// * `MZN` - Mozambican Metical +// * `MZM` - Mozambican Metical (1980–2006) +// * `MMK` - Myanmar Kyat +// * `NAD` - Namibian Dollar +// * `NPR` - Nepalese Rupee +// * `ANG` - Netherlands Antillean Guilder +// * `TWD` - New Taiwan Dollar +// * `NZD` - New Zealand Dollar +// * `NIO` - Nicaraguan Córdoba +// * `NIC` - Nicaraguan Córdoba (1988–1991) +// * `NGN` - Nigerian Naira +// * `KPW` - North Korean Won +// * `NOK` - Norwegian Krone +// * `OMR` - Omani Rial +// * `PKR` - Pakistani Rupee +// * `XPD` - Palladium +// * `PAB` - Panamanian Balboa +// * `PGK` - Papua New Guinean Kina +// * `PYG` - Paraguayan Guarani +// * `PEI` - Peruvian Inti +// * `PEN` - Peruvian Sol +// * `PES` - Peruvian Sol (1863–1965) +// * `PHP` - Philippine Peso +// * `XPT` - Platinum +// * `PLN` - Polish Zloty +// * `PLZ` - Polish Zloty (1950–1995) +// * `PTE` - Portuguese Escudo +// * `GWE` - Portuguese Guinea Escudo +// * `QAR` - Qatari Rial +// * `XRE` - RINET Funds +// * `RHD` - Rhodesian Dollar +// * `RON` - Romanian Leu +// * `ROL` - Romanian Leu (1952–2006) +// * `RUB` - Russian Ruble +// * `RUR` - Russian Ruble (1991–1998) +// * `RWF` - Rwandan Franc +// * `SVC` - Salvadoran Colón +// * `WST` - Samoan Tala +// * `SAR` - Saudi Riyal +// * `RSD` - Serbian Dinar +// * `CSD` - Serbian Dinar (2002–2006) +// * `SCR` - Seychellois Rupee +// * `SLL` - Sierra Leonean Leone +// * `XAG` - Silver +// * `SGD` - Singapore Dollar +// * `SKK` - Slovak Koruna +// * `SIT` - Slovenian Tolar +// * `SBD` - Solomon Islands Dollar +// * `SOS` - Somali Shilling +// * `ZAR` - South African Rand +// * `ZAL` - South African Rand (financial) +// * `KRH` - South Korean Hwan (1953–1962) +// * `KRW` - South Korean Won +// * `KRO` - South Korean Won (1945–1953) +// * `SSP` - South Sudanese Pound +// * `SUR` - Soviet Rouble +// * `ESP` - Spanish Peseta +// * `ESA` - Spanish Peseta (A account) +// * `ESB` - Spanish Peseta (convertible account) +// * `XDR` - Special Drawing Rights +// * `LKR` - Sri Lankan Rupee +// * `SHP` - St. Helena Pound +// * `XSU` - Sucre +// * `SDD` - Sudanese Dinar (1992–2007) +// * `SDG` - Sudanese Pound +// * `SDP` - Sudanese Pound (1957–1998) +// * `SRD` - Surinamese Dollar +// * `SRG` - Surinamese Guilder +// * `SZL` - Swazi Lilangeni +// * `SEK` - Swedish Krona +// * `CHF` - Swiss Franc +// * `SYP` - Syrian Pound +// * `STN` - São Tomé & Príncipe Dobra +// * `STD` - São Tomé & Príncipe Dobra (1977–2017) +// * `TVD` - TVD +// * `TJR` - Tajikistani Ruble +// * `TJS` - Tajikistani Somoni +// * `TZS` - Tanzanian Shilling +// * `XTS` - Testing Currency Code +// * `THB` - Thai Baht +// * `XXX` - The codes assigned for transactions where no currency is involved +// * `TPE` - Timorese Escudo +// * `TOP` - Tongan Paʻanga +// * `TTD` - Trinidad & Tobago Dollar +// * `TND` - Tunisian Dinar +// * `TRY` - Turkish Lira +// * `TRL` - Turkish Lira (1922–2005) +// * `TMT` - Turkmenistani Manat +// * `TMM` - Turkmenistani Manat (1993–2009) +// * `USD` - US Dollar +// * `USN` - US Dollar (Next day) +// * `USS` - US Dollar (Same day) +// * `UGX` - Ugandan Shilling +// * `UGS` - Ugandan Shilling (1966–1987) +// * `UAH` - Ukrainian Hryvnia +// * `UAK` - Ukrainian Karbovanets +// * `AED` - United Arab Emirates Dirham +// * `UYW` - Uruguayan Nominal Wage Index Unit +// * `UYU` - Uruguayan Peso +// * `UYP` - Uruguayan Peso (1975–1993) +// * `UYI` - Uruguayan Peso (Indexed Units) +// * `UZS` - Uzbekistani Som +// * `VUV` - Vanuatu Vatu +// * `VES` - Venezuelan Bolívar +// * `VEB` - Venezuelan Bolívar (1871–2008) +// * `VEF` - Venezuelan Bolívar (2008–2018) +// * `VND` - Vietnamese Dong +// * `VNN` - Vietnamese Dong (1978–1985) +// * `CHE` - WIR Euro +// * `CHW` - WIR Franc +// * `XOF` - West African CFA Franc +// * `YDD` - Yemeni Dinar +// * `YER` - Yemeni Rial +// * `YUN` - Yugoslavian Convertible Dinar (1990–1992) +// * `YUD` - Yugoslavian Hard Dinar (1966–1990) +// * `YUM` - Yugoslavian New Dinar (1994–2002) +// * `YUR` - Yugoslavian Reformed Dinar (1992–1993) +// * `ZWN` - ZWN +// * `ZRN` - Zairean New Zaire (1993–1998) +// * `ZRZ` - Zairean Zaire (1971–1993) +// * `ZMW` - Zambian Kwacha +// * `ZMK` - Zambian Kwacha (1968–2012) +// * `ZWD` - Zimbabwean Dollar (1980–2008) +// * `ZWR` - Zimbabwean Dollar (2008) +// * `ZWL` - Zimbabwean Dollar (2009) type PaymentCurrency struct { - typeName string TransactionCurrencyEnum TransactionCurrencyEnum String string + + typ string } -func NewPaymentCurrencyFromTransactionCurrencyEnum(value TransactionCurrencyEnum) *PaymentCurrency { - return &PaymentCurrency{typeName: "transactionCurrencyEnum", TransactionCurrencyEnum: value} +func (p *PaymentCurrency) GetTransactionCurrencyEnum() TransactionCurrencyEnum { + if p == nil { + return "" + } + return p.TransactionCurrencyEnum } -func NewPaymentCurrencyFromString(value string) *PaymentCurrency { - return &PaymentCurrency{typeName: "string", String: value} +func (p *PaymentCurrency) GetString() string { + if p == nil { + return "" + } + return p.String } func (p *PaymentCurrency) UnmarshalJSON(data []byte) error { var valueTransactionCurrencyEnum TransactionCurrencyEnum if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { - p.typeName = "transactionCurrencyEnum" + p.typ = "TransactionCurrencyEnum" p.TransactionCurrencyEnum = valueTransactionCurrencyEnum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" + p.typ = "String" p.String = valueString return nil } @@ -35056,1333 +15162,736 @@ func (p *PaymentCurrency) UnmarshalJSON(data []byte) error { } func (p PaymentCurrency) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "transactionCurrencyEnum": + if p.typ == "TransactionCurrencyEnum" || p.TransactionCurrencyEnum != "" { return json.Marshal(p.TransactionCurrencyEnum) - case "string": + } + if p.typ == "String" || p.String != "" { return json.Marshal(p.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) } type PaymentCurrencyVisitor interface { VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error VisitString(string) error } - -func (p *PaymentCurrency) Accept(visitor PaymentCurrencyVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "transactionCurrencyEnum": - return visitor.VisitTransactionCurrencyEnum(p.TransactionCurrencyEnum) - case "string": - return visitor.VisitString(p.String) - } -} - -// # The PaymentLineItem Object -// -// ### Description -// -// The `PaymentLineItem` object is an applied-to-line on a `Payment` that can either be a `Invoice`, `CreditNote`, or `JournalEntry`. -// -// ### Usage Example -// -// `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`. -type PaymentLineItem struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The amount being applied to the transaction. - AppliedAmount *string `json:"applied_amount,omitempty"` - // The date the payment portion is applied. - AppliedDate *time.Time `json:"applied_date,omitempty"` - // The Merge ID of the transaction the payment portion is being applied to. - RelatedObjectId *string `json:"related_object_id,omitempty"` - // The type of transaction the payment portion is being applied to. Possible values include: INVOICE, JOURNAL_ENTRY, or CREDIT_NOTE. - RelatedObjectType *string `json:"related_object_type,omitempty"` - - _rawJSON json.RawMessage -} - -func (p *PaymentLineItem) UnmarshalJSON(data []byte) error { - type unmarshaler PaymentLineItem - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *p = PaymentLineItem(value) - p._rawJSON = json.RawMessage(data) - return nil -} - -func (p *PaymentLineItem) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } + +func (p *PaymentCurrency) Accept(visitor PaymentCurrencyVisitor) error { + if p.typ == "TransactionCurrencyEnum" || p.TransactionCurrencyEnum != "" { + return visitor.VisitTransactionCurrencyEnum(p.TransactionCurrencyEnum) } - if value, err := core.StringifyJSON(p); err == nil { - return value + if p.typ == "String" || p.String != "" { + return visitor.VisitString(p.String) } - return fmt.Sprintf("%#v", p) + return fmt.Errorf("type %T does not include a non-empty union type", p) } // # The PaymentLineItem Object -// // ### Description -// // The `PaymentLineItem` object is an applied-to-line on a `Payment` that can either be a `Invoice`, `CreditNote`, or `JournalEntry`. // // ### Usage Example -// // `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`. -type PaymentLineItemRequest struct { +type PaymentLineItem struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` // The amount being applied to the transaction. - AppliedAmount *string `json:"applied_amount,omitempty"` + AppliedAmount *string `json:"applied_amount,omitempty" url:"applied_amount,omitempty"` // The date the payment portion is applied. - AppliedDate *time.Time `json:"applied_date,omitempty"` + AppliedDate *time.Time `json:"applied_date,omitempty" url:"applied_date,omitempty"` // The Merge ID of the transaction the payment portion is being applied to. - RelatedObjectId *string `json:"related_object_id,omitempty"` + RelatedObjectId *string `json:"related_object_id,omitempty" url:"related_object_id,omitempty"` // The type of transaction the payment portion is being applied to. Possible values include: INVOICE, JOURNAL_ENTRY, or CREDIT_NOTE. - RelatedObjectType *string `json:"related_object_type,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` - RemoteFields []*RemoteFieldRequest `json:"remote_fields,omitempty"` + RelatedObjectType *string `json:"related_object_type,omitempty" url:"related_object_type,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (p *PaymentLineItemRequest) UnmarshalJSON(data []byte) error { - type unmarshaler PaymentLineItemRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (p *PaymentLineItem) GetId() *string { + if p == nil { + return nil } - *p = PaymentLineItemRequest(value) - p._rawJSON = json.RawMessage(data) - return nil + return p.Id } -func (p *PaymentLineItemRequest) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value +func (p *PaymentLineItem) GetRemoteId() *string { + if p == nil { + return nil } - return fmt.Sprintf("%#v", p) -} - -// # 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. -type PaymentRequest struct { - // The payment's transaction date. - TransactionDate *time.Time `json:"transaction_date,omitempty"` - // The supplier, or customer involved in the payment. - Contact *PaymentRequestContact `json:"contact,omitempty"` - // The supplier’s or customer’s account in which the payment is made. - Account *PaymentRequestAccount `json:"account,omitempty"` - // The payment's currency. - // - // - `XUA` - ADB Unit of Account - // - `AFN` - Afghan Afghani - // - `AFA` - Afghan Afghani (1927–2002) - // - `ALL` - Albanian Lek - // - `ALK` - Albanian Lek (1946–1965) - // - `DZD` - Algerian Dinar - // - `ADP` - Andorran Peseta - // - `AOA` - Angolan Kwanza - // - `AOK` - Angolan Kwanza (1977–1991) - // - `AON` - Angolan New Kwanza (1990–2000) - // - `AOR` - Angolan Readjusted Kwanza (1995–1999) - // - `ARA` - Argentine Austral - // - `ARS` - Argentine Peso - // - `ARM` - Argentine Peso (1881–1970) - // - `ARP` - Argentine Peso (1983–1985) - // - `ARL` - Argentine Peso Ley (1970–1983) - // - `AMD` - Armenian Dram - // - `AWG` - Aruban Florin - // - `AUD` - Australian Dollar - // - `ATS` - Austrian Schilling - // - `AZN` - Azerbaijani Manat - // - `AZM` - Azerbaijani Manat (1993–2006) - // - `BSD` - Bahamian Dollar - // - `BHD` - Bahraini Dinar - // - `BDT` - Bangladeshi Taka - // - `BBD` - Barbadian Dollar - // - `BYN` - Belarusian Ruble - // - `BYB` - Belarusian Ruble (1994–1999) - // - `BYR` - Belarusian Ruble (2000–2016) - // - `BEF` - Belgian Franc - // - `BEC` - Belgian Franc (convertible) - // - `BEL` - Belgian Franc (financial) - // - `BZD` - Belize Dollar - // - `BMD` - Bermudan Dollar - // - `BTN` - Bhutanese Ngultrum - // - `BOB` - Bolivian Boliviano - // - `BOL` - Bolivian Boliviano (1863–1963) - // - `BOV` - Bolivian Mvdol - // - `BOP` - Bolivian Peso - // - `BAM` - Bosnia-Herzegovina Convertible Mark - // - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - // - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - // - `BWP` - Botswanan Pula - // - `BRC` - Brazilian Cruzado (1986–1989) - // - `BRZ` - Brazilian Cruzeiro (1942–1967) - // - `BRE` - Brazilian Cruzeiro (1990–1993) - // - `BRR` - Brazilian Cruzeiro (1993–1994) - // - `BRN` - Brazilian New Cruzado (1989–1990) - // - `BRB` - Brazilian New Cruzeiro (1967–1986) - // - `BRL` - Brazilian Real - // - `GBP` - British Pound - // - `BND` - Brunei Dollar - // - `BGL` - Bulgarian Hard Lev - // - `BGN` - Bulgarian Lev - // - `BGO` - Bulgarian Lev (1879–1952) - // - `BGM` - Bulgarian Socialist Lev - // - `BUK` - Burmese Kyat - // - `BIF` - Burundian Franc - // - `XPF` - CFP Franc - // - `KHR` - Cambodian Riel - // - `CAD` - Canadian Dollar - // - `CVE` - Cape Verdean Escudo - // - `KYD` - Cayman Islands Dollar - // - `XAF` - Central African CFA Franc - // - `CLE` - Chilean Escudo - // - `CLP` - Chilean Peso - // - `CLF` - Chilean Unit of Account (UF) - // - `CNX` - Chinese People’s Bank Dollar - // - `CNY` - Chinese Yuan - // - `CNH` - Chinese Yuan (offshore) - // - `COP` - Colombian Peso - // - `COU` - Colombian Real Value Unit - // - `KMF` - Comorian Franc - // - `CDF` - Congolese Franc - // - `CRC` - Costa Rican Colón - // - `HRD` - Croatian Dinar - // - `HRK` - Croatian Kuna - // - `CUC` - Cuban Convertible Peso - // - `CUP` - Cuban Peso - // - `CYP` - Cypriot Pound - // - `CZK` - Czech Koruna - // - `CSK` - Czechoslovak Hard Koruna - // - `DKK` - Danish Krone - // - `DJF` - Djiboutian Franc - // - `DOP` - Dominican Peso - // - `NLG` - Dutch Guilder - // - `XCD` - East Caribbean Dollar - // - `DDM` - East German Mark - // - `ECS` - Ecuadorian Sucre - // - `ECV` - Ecuadorian Unit of Constant Value - // - `EGP` - Egyptian Pound - // - `GQE` - Equatorial Guinean Ekwele - // - `ERN` - Eritrean Nakfa - // - `EEK` - Estonian Kroon - // - `ETB` - Ethiopian Birr - // - `EUR` - Euro - // - `XBA` - European Composite Unit - // - `XEU` - European Currency Unit - // - `XBB` - European Monetary Unit - // - `XBC` - European Unit of Account (XBC) - // - `XBD` - European Unit of Account (XBD) - // - `FKP` - Falkland Islands Pound - // - `FJD` - Fijian Dollar - // - `FIM` - Finnish Markka - // - `FRF` - French Franc - // - `XFO` - French Gold Franc - // - `XFU` - French UIC-Franc - // - `GMD` - Gambian Dalasi - // - `GEK` - Georgian Kupon Larit - // - `GEL` - Georgian Lari - // - `DEM` - German Mark - // - `GHS` - Ghanaian Cedi - // - `GHC` - Ghanaian Cedi (1979–2007) - // - `GIP` - Gibraltar Pound - // - `XAU` - Gold - // - `GRD` - Greek Drachma - // - `GTQ` - Guatemalan Quetzal - // - `GWP` - Guinea-Bissau Peso - // - `GNF` - Guinean Franc - // - `GNS` - Guinean Syli - // - `GYD` - Guyanaese Dollar - // - `HTG` - Haitian Gourde - // - `HNL` - Honduran Lempira - // - `HKD` - Hong Kong Dollar - // - `HUF` - Hungarian Forint - // - `IMP` - IMP - // - `ISK` - Icelandic Króna - // - `ISJ` - Icelandic Króna (1918–1981) - // - `INR` - Indian Rupee - // - `IDR` - Indonesian Rupiah - // - `IRR` - Iranian Rial - // - `IQD` - Iraqi Dinar - // - `IEP` - Irish Pound - // - `ILS` - Israeli New Shekel - // - `ILP` - Israeli Pound - // - `ILR` - Israeli Shekel (1980–1985) - // - `ITL` - Italian Lira - // - `JMD` - Jamaican Dollar - // - `JPY` - Japanese Yen - // - `JOD` - Jordanian Dinar - // - `KZT` - Kazakhstani Tenge - // - `KES` - Kenyan Shilling - // - `KWD` - Kuwaiti Dinar - // - `KGS` - Kyrgystani Som - // - `LAK` - Laotian Kip - // - `LVL` - Latvian Lats - // - `LVR` - Latvian Ruble - // - `LBP` - Lebanese Pound - // - `LSL` - Lesotho Loti - // - `LRD` - Liberian Dollar - // - `LYD` - Libyan Dinar - // - `LTL` - Lithuanian Litas - // - `LTT` - Lithuanian Talonas - // - `LUL` - Luxembourg Financial Franc - // - `LUC` - Luxembourgian Convertible Franc - // - `LUF` - Luxembourgian Franc - // - `MOP` - Macanese Pataca - // - `MKD` - Macedonian Denar - // - `MKN` - Macedonian Denar (1992–1993) - // - `MGA` - Malagasy Ariary - // - `MGF` - Malagasy Franc - // - `MWK` - Malawian Kwacha - // - `MYR` - Malaysian Ringgit - // - `MVR` - Maldivian Rufiyaa - // - `MVP` - Maldivian Rupee (1947–1981) - // - `MLF` - Malian Franc - // - `MTL` - Maltese Lira - // - `MTP` - Maltese Pound - // - `MRU` - Mauritanian Ouguiya - // - `MRO` - Mauritanian Ouguiya (1973–2017) - // - `MUR` - Mauritian Rupee - // - `MXV` - Mexican Investment Unit - // - `MXN` - Mexican Peso - // - `MXP` - Mexican Silver Peso (1861–1992) - // - `MDC` - Moldovan Cupon - // - `MDL` - Moldovan Leu - // - `MCF` - Monegasque Franc - // - `MNT` - Mongolian Tugrik - // - `MAD` - Moroccan Dirham - // - `MAF` - Moroccan Franc - // - `MZE` - Mozambican Escudo - // - `MZN` - Mozambican Metical - // - `MZM` - Mozambican Metical (1980–2006) - // - `MMK` - Myanmar Kyat - // - `NAD` - Namibian Dollar - // - `NPR` - Nepalese Rupee - // - `ANG` - Netherlands Antillean Guilder - // - `TWD` - New Taiwan Dollar - // - `NZD` - New Zealand Dollar - // - `NIO` - Nicaraguan Córdoba - // - `NIC` - Nicaraguan Córdoba (1988–1991) - // - `NGN` - Nigerian Naira - // - `KPW` - North Korean Won - // - `NOK` - Norwegian Krone - // - `OMR` - Omani Rial - // - `PKR` - Pakistani Rupee - // - `XPD` - Palladium - // - `PAB` - Panamanian Balboa - // - `PGK` - Papua New Guinean Kina - // - `PYG` - Paraguayan Guarani - // - `PEI` - Peruvian Inti - // - `PEN` - Peruvian Sol - // - `PES` - Peruvian Sol (1863–1965) - // - `PHP` - Philippine Peso - // - `XPT` - Platinum - // - `PLN` - Polish Zloty - // - `PLZ` - Polish Zloty (1950–1995) - // - `PTE` - Portuguese Escudo - // - `GWE` - Portuguese Guinea Escudo - // - `QAR` - Qatari Rial - // - `XRE` - RINET Funds - // - `RHD` - Rhodesian Dollar - // - `RON` - Romanian Leu - // - `ROL` - Romanian Leu (1952–2006) - // - `RUB` - Russian Ruble - // - `RUR` - Russian Ruble (1991–1998) - // - `RWF` - Rwandan Franc - // - `SVC` - Salvadoran Colón - // - `WST` - Samoan Tala - // - `SAR` - Saudi Riyal - // - `RSD` - Serbian Dinar - // - `CSD` - Serbian Dinar (2002–2006) - // - `SCR` - Seychellois Rupee - // - `SLL` - Sierra Leonean Leone - // - `XAG` - Silver - // - `SGD` - Singapore Dollar - // - `SKK` - Slovak Koruna - // - `SIT` - Slovenian Tolar - // - `SBD` - Solomon Islands Dollar - // - `SOS` - Somali Shilling - // - `ZAR` - South African Rand - // - `ZAL` - South African Rand (financial) - // - `KRH` - South Korean Hwan (1953–1962) - // - `KRW` - South Korean Won - // - `KRO` - South Korean Won (1945–1953) - // - `SSP` - South Sudanese Pound - // - `SUR` - Soviet Rouble - // - `ESP` - Spanish Peseta - // - `ESA` - Spanish Peseta (A account) - // - `ESB` - Spanish Peseta (convertible account) - // - `XDR` - Special Drawing Rights - // - `LKR` - Sri Lankan Rupee - // - `SHP` - St. Helena Pound - // - `XSU` - Sucre - // - `SDD` - Sudanese Dinar (1992–2007) - // - `SDG` - Sudanese Pound - // - `SDP` - Sudanese Pound (1957–1998) - // - `SRD` - Surinamese Dollar - // - `SRG` - Surinamese Guilder - // - `SZL` - Swazi Lilangeni - // - `SEK` - Swedish Krona - // - `CHF` - Swiss Franc - // - `SYP` - Syrian Pound - // - `STN` - São Tomé & Príncipe Dobra - // - `STD` - São Tomé & Príncipe Dobra (1977–2017) - // - `TVD` - TVD - // - `TJR` - Tajikistani Ruble - // - `TJS` - Tajikistani Somoni - // - `TZS` - Tanzanian Shilling - // - `XTS` - Testing Currency Code - // - `THB` - Thai Baht - // - `XXX` - The codes assigned for transactions where no currency is involved - // - `TPE` - Timorese Escudo - // - `TOP` - Tongan Paʻanga - // - `TTD` - Trinidad & Tobago Dollar - // - `TND` - Tunisian Dinar - // - `TRY` - Turkish Lira - // - `TRL` - Turkish Lira (1922–2005) - // - `TMT` - Turkmenistani Manat - // - `TMM` - Turkmenistani Manat (1993–2009) - // - `USD` - US Dollar - // - `USN` - US Dollar (Next day) - // - `USS` - US Dollar (Same day) - // - `UGX` - Ugandan Shilling - // - `UGS` - Ugandan Shilling (1966–1987) - // - `UAH` - Ukrainian Hryvnia - // - `UAK` - Ukrainian Karbovanets - // - `AED` - United Arab Emirates Dirham - // - `UYW` - Uruguayan Nominal Wage Index Unit - // - `UYU` - Uruguayan Peso - // - `UYP` - Uruguayan Peso (1975–1993) - // - `UYI` - Uruguayan Peso (Indexed Units) - // - `UZS` - Uzbekistani Som - // - `VUV` - Vanuatu Vatu - // - `VES` - Venezuelan Bolívar - // - `VEB` - Venezuelan Bolívar (1871–2008) - // - `VEF` - Venezuelan Bolívar (2008–2018) - // - `VND` - Vietnamese Dong - // - `VNN` - Vietnamese Dong (1978–1985) - // - `CHE` - WIR Euro - // - `CHW` - WIR Franc - // - `XOF` - West African CFA Franc - // - `YDD` - Yemeni Dinar - // - `YER` - Yemeni Rial - // - `YUN` - Yugoslavian Convertible Dinar (1990–1992) - // - `YUD` - Yugoslavian Hard Dinar (1966–1990) - // - `YUM` - Yugoslavian New Dinar (1994–2002) - // - `YUR` - Yugoslavian Reformed Dinar (1992–1993) - // - `ZWN` - ZWN - // - `ZRN` - Zairean New Zaire (1993–1998) - // - `ZRZ` - Zairean Zaire (1971–1993) - // - `ZMW` - Zambian Kwacha - // - `ZMK` - Zambian Kwacha (1968–2012) - // - `ZWD` - Zimbabwean Dollar (1980–2008) - // - `ZWR` - Zimbabwean Dollar (2008) - // - `ZWL` - Zimbabwean Dollar (2009) - Currency *PaymentRequestCurrency `json:"currency,omitempty"` - // The payment's exchange rate. - ExchangeRate *string `json:"exchange_rate,omitempty"` - // The company the payment belongs to. - Company *PaymentRequestCompany `json:"company,omitempty"` - // The total amount of money being paid to the supplier, or customer, after taxes. - TotalAmount *float64 `json:"total_amount,omitempty"` - // The type of the invoice. - // - // - `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE - // - `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE - Type *PaymentRequestType `json:"type,omitempty"` - TrackingCategories []*PaymentRequestTrackingCategoriesItem `json:"tracking_categories,omitempty"` - // The accounting period that the Payment was generated in. - AccountingPeriod *PaymentRequestAccountingPeriod `json:"accounting_period,omitempty"` - // A list of “Payment Applied to Lines” objects. - AppliedToLines []*PaymentRequestAppliedToLinesItem `json:"applied_to_lines,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` - RemoteFields []*RemoteFieldRequest `json:"remote_fields,omitempty"` - - _rawJSON json.RawMessage + return p.RemoteId } -func (p *PaymentRequest) UnmarshalJSON(data []byte) error { - type unmarshaler PaymentRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (p *PaymentLineItem) GetCreatedAt() *time.Time { + if p == nil { + return nil } - *p = PaymentRequest(value) - p._rawJSON = json.RawMessage(data) - return nil + return p.CreatedAt } -func (p *PaymentRequest) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value +func (p *PaymentLineItem) GetModifiedAt() *time.Time { + if p == nil { + return nil } - return fmt.Sprintf("%#v", p) -} - -// The supplier’s or customer’s account in which the payment is made. -type PaymentRequestAccount struct { - typeName string - String string - Account *Account -} - -func NewPaymentRequestAccountFromString(value string) *PaymentRequestAccount { - return &PaymentRequestAccount{typeName: "string", String: value} + return p.ModifiedAt } -func NewPaymentRequestAccountFromAccount(value *Account) *PaymentRequestAccount { - return &PaymentRequestAccount{typeName: "account", Account: value} +func (p *PaymentLineItem) GetAppliedAmount() *string { + if p == nil { + return nil + } + return p.AppliedAmount } -func (p *PaymentRequestAccount) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" - p.String = valueString +func (p *PaymentLineItem) GetAppliedDate() *time.Time { + if p == nil { return nil } - valueAccount := new(Account) - if err := json.Unmarshal(data, &valueAccount); err == nil { - p.typeName = "account" - p.Account = valueAccount + return p.AppliedDate +} + +func (p *PaymentLineItem) GetRelatedObjectId() *string { + if p == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, p) + return p.RelatedObjectId } -func (p PaymentRequestAccount) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": - return json.Marshal(p.String) - case "account": - return json.Marshal(p.Account) +func (p *PaymentLineItem) GetRelatedObjectType() *string { + if p == nil { + return nil } + return p.RelatedObjectType } -type PaymentRequestAccountVisitor interface { - VisitString(string) error - VisitAccount(*Account) error +func (p *PaymentLineItem) GetExtraProperties() map[string]interface{} { + return p.extraProperties } -func (p *PaymentRequestAccount) Accept(visitor PaymentRequestAccountVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": - return visitor.VisitString(p.String) - case "account": - return visitor.VisitAccount(p.Account) +func (p *PaymentLineItem) UnmarshalJSON(data []byte) error { + type embed PaymentLineItem + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + AppliedDate *internal.DateTime `json:"applied_date,omitempty"` + }{ + embed: embed(*p), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *p = PaymentLineItem(unmarshaler.embed) + p.CreatedAt = unmarshaler.CreatedAt.TimePtr() + p.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + p.AppliedDate = unmarshaler.AppliedDate.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil } -// The accounting period that the Payment was generated in. -type PaymentRequestAccountingPeriod struct { - typeName string - String string - AccountingPeriod *AccountingPeriod +func (p *PaymentLineItem) MarshalJSON() ([]byte, error) { + type embed PaymentLineItem + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + AppliedDate *internal.DateTime `json:"applied_date,omitempty"` + }{ + embed: embed(*p), + CreatedAt: internal.NewOptionalDateTime(p.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(p.ModifiedAt), + AppliedDate: internal.NewOptionalDateTime(p.AppliedDate), + } + return json.Marshal(marshaler) } -func NewPaymentRequestAccountingPeriodFromString(value string) *PaymentRequestAccountingPeriod { - return &PaymentRequestAccountingPeriod{typeName: "string", String: value} +func (p *PaymentLineItem) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) } -func NewPaymentRequestAccountingPeriodFromAccountingPeriod(value *AccountingPeriod) *PaymentRequestAccountingPeriod { - return &PaymentRequestAccountingPeriod{typeName: "accountingPeriod", AccountingPeriod: value} +// # The PaymentMethod Object +// ### Description +// The `PaymentMethod` object defines how a payment against an invoice is made. +// +// ### Usage Example +// Fetch from the `GET PaymentMethod` endpoint and view payment method information. +type PaymentMethod struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The type of the payment method. + // + // * `CREDIT_CARD` - CREDIT_CARD + // * `DEBIT_CARD` - DEBIT_CARD + // * `ACH` - ACH + // * `CASH` - CASH + // * `CHECK` - CHECK + MethodType *PaymentMethodMethodType `json:"method_type" url:"method_type"` + // The payment method’s name + Name string `json:"name" url:"name"` + // `True` if the payment method is active, `False` if not. + IsActive *bool `json:"is_active,omitempty" url:"is_active,omitempty"` + // When the third party's payment method was updated. + RemoteUpdatedAt *time.Time `json:"remote_updated_at,omitempty" url:"remote_updated_at,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (p *PaymentRequestAccountingPeriod) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" - p.String = valueString +func (p *PaymentMethod) GetId() *string { + if p == nil { return nil } - valueAccountingPeriod := new(AccountingPeriod) - if err := json.Unmarshal(data, &valueAccountingPeriod); err == nil { - p.typeName = "accountingPeriod" - p.AccountingPeriod = valueAccountingPeriod + return p.Id +} + +func (p *PaymentMethod) GetRemoteId() *string { + if p == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, p) + return p.RemoteId } -func (p PaymentRequestAccountingPeriod) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": - return json.Marshal(p.String) - case "accountingPeriod": - return json.Marshal(p.AccountingPeriod) +func (p *PaymentMethod) GetCreatedAt() *time.Time { + if p == nil { + return nil } + return p.CreatedAt } -type PaymentRequestAccountingPeriodVisitor interface { - VisitString(string) error - VisitAccountingPeriod(*AccountingPeriod) error +func (p *PaymentMethod) GetModifiedAt() *time.Time { + if p == nil { + return nil + } + return p.ModifiedAt } -func (p *PaymentRequestAccountingPeriod) Accept(visitor PaymentRequestAccountingPeriodVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": - return visitor.VisitString(p.String) - case "accountingPeriod": - return visitor.VisitAccountingPeriod(p.AccountingPeriod) +func (p *PaymentMethod) GetMethodType() *PaymentMethodMethodType { + if p == nil { + return nil } + return p.MethodType } -type PaymentRequestAppliedToLinesItem struct { - typeName string - String string - PaymentLineItemRequest *PaymentLineItemRequest +func (p *PaymentMethod) GetName() string { + if p == nil { + return "" + } + return p.Name } -func NewPaymentRequestAppliedToLinesItemFromString(value string) *PaymentRequestAppliedToLinesItem { - return &PaymentRequestAppliedToLinesItem{typeName: "string", String: value} +func (p *PaymentMethod) GetIsActive() *bool { + if p == nil { + return nil + } + return p.IsActive } -func NewPaymentRequestAppliedToLinesItemFromPaymentLineItemRequest(value *PaymentLineItemRequest) *PaymentRequestAppliedToLinesItem { - return &PaymentRequestAppliedToLinesItem{typeName: "paymentLineItemRequest", PaymentLineItemRequest: value} +func (p *PaymentMethod) GetRemoteUpdatedAt() *time.Time { + if p == nil { + return nil + } + return p.RemoteUpdatedAt } -func (p *PaymentRequestAppliedToLinesItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" - p.String = valueString +func (p *PaymentMethod) GetFieldMappings() map[string]interface{} { + if p == nil { return nil } - valuePaymentLineItemRequest := new(PaymentLineItemRequest) - if err := json.Unmarshal(data, &valuePaymentLineItemRequest); err == nil { - p.typeName = "paymentLineItemRequest" - p.PaymentLineItemRequest = valuePaymentLineItemRequest + return p.FieldMappings +} + +func (p *PaymentMethod) GetRemoteData() []*RemoteData { + if p == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, p) + return p.RemoteData } -func (p PaymentRequestAppliedToLinesItem) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": - return json.Marshal(p.String) - case "paymentLineItemRequest": - return json.Marshal(p.PaymentLineItemRequest) +func (p *PaymentMethod) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaymentMethod) UnmarshalJSON(data []byte) error { + type embed PaymentMethod + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + RemoteUpdatedAt *internal.DateTime `json:"remote_updated_at,omitempty"` + }{ + embed: embed(*p), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *p = PaymentMethod(unmarshaler.embed) + p.CreatedAt = unmarshaler.CreatedAt.TimePtr() + p.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + p.RemoteUpdatedAt = unmarshaler.RemoteUpdatedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil } -type PaymentRequestAppliedToLinesItemVisitor interface { - VisitString(string) error - VisitPaymentLineItemRequest(*PaymentLineItemRequest) error +func (p *PaymentMethod) MarshalJSON() ([]byte, error) { + type embed PaymentMethod + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + RemoteUpdatedAt *internal.DateTime `json:"remote_updated_at,omitempty"` + }{ + embed: embed(*p), + CreatedAt: internal.NewOptionalDateTime(p.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(p.ModifiedAt), + RemoteUpdatedAt: internal.NewOptionalDateTime(p.RemoteUpdatedAt), + } + return json.Marshal(marshaler) } -func (p *PaymentRequestAppliedToLinesItem) Accept(visitor PaymentRequestAppliedToLinesItemVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": - return visitor.VisitString(p.String) - case "paymentLineItemRequest": - return visitor.VisitPaymentLineItemRequest(p.PaymentLineItemRequest) +func (p *PaymentMethod) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) } -// The company the payment belongs to. -type PaymentRequestCompany struct { - typeName string - String string - CompanyInfo *CompanyInfo +// The type of the payment method. +// +// * `CREDIT_CARD` - CREDIT_CARD +// * `DEBIT_CARD` - DEBIT_CARD +// * `ACH` - ACH +// * `CASH` - CASH +// * `CHECK` - CHECK +type PaymentMethodMethodType struct { + MethodTypeEnum MethodTypeEnum + String string + + typ string } -func NewPaymentRequestCompanyFromString(value string) *PaymentRequestCompany { - return &PaymentRequestCompany{typeName: "string", String: value} +func (p *PaymentMethodMethodType) GetMethodTypeEnum() MethodTypeEnum { + if p == nil { + return "" + } + return p.MethodTypeEnum } -func NewPaymentRequestCompanyFromCompanyInfo(value *CompanyInfo) *PaymentRequestCompany { - return &PaymentRequestCompany{typeName: "companyInfo", CompanyInfo: value} +func (p *PaymentMethodMethodType) GetString() string { + if p == nil { + return "" + } + return p.String } -func (p *PaymentRequestCompany) UnmarshalJSON(data []byte) error { +func (p *PaymentMethodMethodType) UnmarshalJSON(data []byte) error { + var valueMethodTypeEnum MethodTypeEnum + if err := json.Unmarshal(data, &valueMethodTypeEnum); err == nil { + p.typ = "MethodTypeEnum" + p.MethodTypeEnum = valueMethodTypeEnum + return nil + } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" + p.typ = "String" p.String = valueString return nil } - valueCompanyInfo := new(CompanyInfo) - if err := json.Unmarshal(data, &valueCompanyInfo); err == nil { - p.typeName = "companyInfo" - p.CompanyInfo = valueCompanyInfo - return nil - } return fmt.Errorf("%s cannot be deserialized as a %T", data, p) } -func (p PaymentRequestCompany) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": +func (p PaymentMethodMethodType) MarshalJSON() ([]byte, error) { + if p.typ == "MethodTypeEnum" || p.MethodTypeEnum != "" { + return json.Marshal(p.MethodTypeEnum) + } + if p.typ == "String" || p.String != "" { return json.Marshal(p.String) - case "companyInfo": - return json.Marshal(p.CompanyInfo) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) } -type PaymentRequestCompanyVisitor interface { +type PaymentMethodMethodTypeVisitor interface { + VisitMethodTypeEnum(MethodTypeEnum) error VisitString(string) error - VisitCompanyInfo(*CompanyInfo) error } -func (p *PaymentRequestCompany) Accept(visitor PaymentRequestCompanyVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": +func (p *PaymentMethodMethodType) Accept(visitor PaymentMethodMethodTypeVisitor) error { + if p.typ == "MethodTypeEnum" || p.MethodTypeEnum != "" { + return visitor.VisitMethodTypeEnum(p.MethodTypeEnum) + } + if p.typ == "String" || p.String != "" { return visitor.VisitString(p.String) - case "companyInfo": - return visitor.VisitCompanyInfo(p.CompanyInfo) } + return fmt.Errorf("type %T does not include a non-empty union type", p) } -// The supplier, or customer involved in the payment. -type PaymentRequestContact struct { - typeName string - String string - Contact *Contact +// The method which this payment was made by. +type PaymentPaymentMethod struct { + String string + PaymentMethod *PaymentMethod + + typ string } -func NewPaymentRequestContactFromString(value string) *PaymentRequestContact { - return &PaymentRequestContact{typeName: "string", String: value} +func (p *PaymentPaymentMethod) GetString() string { + if p == nil { + return "" + } + return p.String } -func NewPaymentRequestContactFromContact(value *Contact) *PaymentRequestContact { - return &PaymentRequestContact{typeName: "contact", Contact: value} +func (p *PaymentPaymentMethod) GetPaymentMethod() *PaymentMethod { + if p == nil { + return nil + } + return p.PaymentMethod } -func (p *PaymentRequestContact) UnmarshalJSON(data []byte) error { +func (p *PaymentPaymentMethod) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" + p.typ = "String" p.String = valueString return nil } - valueContact := new(Contact) - if err := json.Unmarshal(data, &valueContact); err == nil { - p.typeName = "contact" - p.Contact = valueContact + valuePaymentMethod := new(PaymentMethod) + if err := json.Unmarshal(data, &valuePaymentMethod); err == nil { + p.typ = "PaymentMethod" + p.PaymentMethod = valuePaymentMethod return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, p) } -func (p PaymentRequestContact) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": +func (p PaymentPaymentMethod) MarshalJSON() ([]byte, error) { + if p.typ == "String" || p.String != "" { return json.Marshal(p.String) - case "contact": - return json.Marshal(p.Contact) } + if p.typ == "PaymentMethod" || p.PaymentMethod != nil { + return json.Marshal(p.PaymentMethod) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) } -type PaymentRequestContactVisitor interface { +type PaymentPaymentMethodVisitor interface { VisitString(string) error - VisitContact(*Contact) error + VisitPaymentMethod(*PaymentMethod) error } -func (p *PaymentRequestContact) Accept(visitor PaymentRequestContactVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": +func (p *PaymentPaymentMethod) Accept(visitor PaymentPaymentMethodVisitor) error { + if p.typ == "String" || p.String != "" { return visitor.VisitString(p.String) - case "contact": - return visitor.VisitContact(p.Contact) } + if p.typ == "PaymentMethod" || p.PaymentMethod != nil { + return visitor.VisitPaymentMethod(p.PaymentMethod) + } + return fmt.Errorf("type %T does not include a non-empty union type", p) } -// The payment's currency. +// # The PaymentTerm Object +// ### Description +// The `PaymentTerm` object is the agreed-upon conditions between a buyer and a seller that define the timing, +// amount, and conditions under which payment for goods or services must be made. // -// - `XUA` - ADB Unit of Account -// - `AFN` - Afghan Afghani -// - `AFA` - Afghan Afghani (1927–2002) -// - `ALL` - Albanian Lek -// - `ALK` - Albanian Lek (1946–1965) -// - `DZD` - Algerian Dinar -// - `ADP` - Andorran Peseta -// - `AOA` - Angolan Kwanza -// - `AOK` - Angolan Kwanza (1977–1991) -// - `AON` - Angolan New Kwanza (1990–2000) -// - `AOR` - Angolan Readjusted Kwanza (1995–1999) -// - `ARA` - Argentine Austral -// - `ARS` - Argentine Peso -// - `ARM` - Argentine Peso (1881–1970) -// - `ARP` - Argentine Peso (1983–1985) -// - `ARL` - Argentine Peso Ley (1970–1983) -// - `AMD` - Armenian Dram -// - `AWG` - Aruban Florin -// - `AUD` - Australian Dollar -// - `ATS` - Austrian Schilling -// - `AZN` - Azerbaijani Manat -// - `AZM` - Azerbaijani Manat (1993–2006) -// - `BSD` - Bahamian Dollar -// - `BHD` - Bahraini Dinar -// - `BDT` - Bangladeshi Taka -// - `BBD` - Barbadian Dollar -// - `BYN` - Belarusian Ruble -// - `BYB` - Belarusian Ruble (1994–1999) -// - `BYR` - Belarusian Ruble (2000–2016) -// - `BEF` - Belgian Franc -// - `BEC` - Belgian Franc (convertible) -// - `BEL` - Belgian Franc (financial) -// - `BZD` - Belize Dollar -// - `BMD` - Bermudan Dollar -// - `BTN` - Bhutanese Ngultrum -// - `BOB` - Bolivian Boliviano -// - `BOL` - Bolivian Boliviano (1863–1963) -// - `BOV` - Bolivian Mvdol -// - `BOP` - Bolivian Peso -// - `BAM` - Bosnia-Herzegovina Convertible Mark -// - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) -// - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) -// - `BWP` - Botswanan Pula -// - `BRC` - Brazilian Cruzado (1986–1989) -// - `BRZ` - Brazilian Cruzeiro (1942–1967) -// - `BRE` - Brazilian Cruzeiro (1990–1993) -// - `BRR` - Brazilian Cruzeiro (1993–1994) -// - `BRN` - Brazilian New Cruzado (1989–1990) -// - `BRB` - Brazilian New Cruzeiro (1967–1986) -// - `BRL` - Brazilian Real -// - `GBP` - British Pound -// - `BND` - Brunei Dollar -// - `BGL` - Bulgarian Hard Lev -// - `BGN` - Bulgarian Lev -// - `BGO` - Bulgarian Lev (1879–1952) -// - `BGM` - Bulgarian Socialist Lev -// - `BUK` - Burmese Kyat -// - `BIF` - Burundian Franc -// - `XPF` - CFP Franc -// - `KHR` - Cambodian Riel -// - `CAD` - Canadian Dollar -// - `CVE` - Cape Verdean Escudo -// - `KYD` - Cayman Islands Dollar -// - `XAF` - Central African CFA Franc -// - `CLE` - Chilean Escudo -// - `CLP` - Chilean Peso -// - `CLF` - Chilean Unit of Account (UF) -// - `CNX` - Chinese People’s Bank Dollar -// - `CNY` - Chinese Yuan -// - `CNH` - Chinese Yuan (offshore) -// - `COP` - Colombian Peso -// - `COU` - Colombian Real Value Unit -// - `KMF` - Comorian Franc -// - `CDF` - Congolese Franc -// - `CRC` - Costa Rican Colón -// - `HRD` - Croatian Dinar -// - `HRK` - Croatian Kuna -// - `CUC` - Cuban Convertible Peso -// - `CUP` - Cuban Peso -// - `CYP` - Cypriot Pound -// - `CZK` - Czech Koruna -// - `CSK` - Czechoslovak Hard Koruna -// - `DKK` - Danish Krone -// - `DJF` - Djiboutian Franc -// - `DOP` - Dominican Peso -// - `NLG` - Dutch Guilder -// - `XCD` - East Caribbean Dollar -// - `DDM` - East German Mark -// - `ECS` - Ecuadorian Sucre -// - `ECV` - Ecuadorian Unit of Constant Value -// - `EGP` - Egyptian Pound -// - `GQE` - Equatorial Guinean Ekwele -// - `ERN` - Eritrean Nakfa -// - `EEK` - Estonian Kroon -// - `ETB` - Ethiopian Birr -// - `EUR` - Euro -// - `XBA` - European Composite Unit -// - `XEU` - European Currency Unit -// - `XBB` - European Monetary Unit -// - `XBC` - European Unit of Account (XBC) -// - `XBD` - European Unit of Account (XBD) -// - `FKP` - Falkland Islands Pound -// - `FJD` - Fijian Dollar -// - `FIM` - Finnish Markka -// - `FRF` - French Franc -// - `XFO` - French Gold Franc -// - `XFU` - French UIC-Franc -// - `GMD` - Gambian Dalasi -// - `GEK` - Georgian Kupon Larit -// - `GEL` - Georgian Lari -// - `DEM` - German Mark -// - `GHS` - Ghanaian Cedi -// - `GHC` - Ghanaian Cedi (1979–2007) -// - `GIP` - Gibraltar Pound -// - `XAU` - Gold -// - `GRD` - Greek Drachma -// - `GTQ` - Guatemalan Quetzal -// - `GWP` - Guinea-Bissau Peso -// - `GNF` - Guinean Franc -// - `GNS` - Guinean Syli -// - `GYD` - Guyanaese Dollar -// - `HTG` - Haitian Gourde -// - `HNL` - Honduran Lempira -// - `HKD` - Hong Kong Dollar -// - `HUF` - Hungarian Forint -// - `IMP` - IMP -// - `ISK` - Icelandic Króna -// - `ISJ` - Icelandic Króna (1918–1981) -// - `INR` - Indian Rupee -// - `IDR` - Indonesian Rupiah -// - `IRR` - Iranian Rial -// - `IQD` - Iraqi Dinar -// - `IEP` - Irish Pound -// - `ILS` - Israeli New Shekel -// - `ILP` - Israeli Pound -// - `ILR` - Israeli Shekel (1980–1985) -// - `ITL` - Italian Lira -// - `JMD` - Jamaican Dollar -// - `JPY` - Japanese Yen -// - `JOD` - Jordanian Dinar -// - `KZT` - Kazakhstani Tenge -// - `KES` - Kenyan Shilling -// - `KWD` - Kuwaiti Dinar -// - `KGS` - Kyrgystani Som -// - `LAK` - Laotian Kip -// - `LVL` - Latvian Lats -// - `LVR` - Latvian Ruble -// - `LBP` - Lebanese Pound -// - `LSL` - Lesotho Loti -// - `LRD` - Liberian Dollar -// - `LYD` - Libyan Dinar -// - `LTL` - Lithuanian Litas -// - `LTT` - Lithuanian Talonas -// - `LUL` - Luxembourg Financial Franc -// - `LUC` - Luxembourgian Convertible Franc -// - `LUF` - Luxembourgian Franc -// - `MOP` - Macanese Pataca -// - `MKD` - Macedonian Denar -// - `MKN` - Macedonian Denar (1992–1993) -// - `MGA` - Malagasy Ariary -// - `MGF` - Malagasy Franc -// - `MWK` - Malawian Kwacha -// - `MYR` - Malaysian Ringgit -// - `MVR` - Maldivian Rufiyaa -// - `MVP` - Maldivian Rupee (1947–1981) -// - `MLF` - Malian Franc -// - `MTL` - Maltese Lira -// - `MTP` - Maltese Pound -// - `MRU` - Mauritanian Ouguiya -// - `MRO` - Mauritanian Ouguiya (1973–2017) -// - `MUR` - Mauritian Rupee -// - `MXV` - Mexican Investment Unit -// - `MXN` - Mexican Peso -// - `MXP` - Mexican Silver Peso (1861–1992) -// - `MDC` - Moldovan Cupon -// - `MDL` - Moldovan Leu -// - `MCF` - Monegasque Franc -// - `MNT` - Mongolian Tugrik -// - `MAD` - Moroccan Dirham -// - `MAF` - Moroccan Franc -// - `MZE` - Mozambican Escudo -// - `MZN` - Mozambican Metical -// - `MZM` - Mozambican Metical (1980–2006) -// - `MMK` - Myanmar Kyat -// - `NAD` - Namibian Dollar -// - `NPR` - Nepalese Rupee -// - `ANG` - Netherlands Antillean Guilder -// - `TWD` - New Taiwan Dollar -// - `NZD` - New Zealand Dollar -// - `NIO` - Nicaraguan Córdoba -// - `NIC` - Nicaraguan Córdoba (1988–1991) -// - `NGN` - Nigerian Naira -// - `KPW` - North Korean Won -// - `NOK` - Norwegian Krone -// - `OMR` - Omani Rial -// - `PKR` - Pakistani Rupee -// - `XPD` - Palladium -// - `PAB` - Panamanian Balboa -// - `PGK` - Papua New Guinean Kina -// - `PYG` - Paraguayan Guarani -// - `PEI` - Peruvian Inti -// - `PEN` - Peruvian Sol -// - `PES` - Peruvian Sol (1863–1965) -// - `PHP` - Philippine Peso -// - `XPT` - Platinum -// - `PLN` - Polish Zloty -// - `PLZ` - Polish Zloty (1950–1995) -// - `PTE` - Portuguese Escudo -// - `GWE` - Portuguese Guinea Escudo -// - `QAR` - Qatari Rial -// - `XRE` - RINET Funds -// - `RHD` - Rhodesian Dollar -// - `RON` - Romanian Leu -// - `ROL` - Romanian Leu (1952–2006) -// - `RUB` - Russian Ruble -// - `RUR` - Russian Ruble (1991–1998) -// - `RWF` - Rwandan Franc -// - `SVC` - Salvadoran Colón -// - `WST` - Samoan Tala -// - `SAR` - Saudi Riyal -// - `RSD` - Serbian Dinar -// - `CSD` - Serbian Dinar (2002–2006) -// - `SCR` - Seychellois Rupee -// - `SLL` - Sierra Leonean Leone -// - `XAG` - Silver -// - `SGD` - Singapore Dollar -// - `SKK` - Slovak Koruna -// - `SIT` - Slovenian Tolar -// - `SBD` - Solomon Islands Dollar -// - `SOS` - Somali Shilling -// - `ZAR` - South African Rand -// - `ZAL` - South African Rand (financial) -// - `KRH` - South Korean Hwan (1953–1962) -// - `KRW` - South Korean Won -// - `KRO` - South Korean Won (1945–1953) -// - `SSP` - South Sudanese Pound -// - `SUR` - Soviet Rouble -// - `ESP` - Spanish Peseta -// - `ESA` - Spanish Peseta (A account) -// - `ESB` - Spanish Peseta (convertible account) -// - `XDR` - Special Drawing Rights -// - `LKR` - Sri Lankan Rupee -// - `SHP` - St. Helena Pound -// - `XSU` - Sucre -// - `SDD` - Sudanese Dinar (1992–2007) -// - `SDG` - Sudanese Pound -// - `SDP` - Sudanese Pound (1957–1998) -// - `SRD` - Surinamese Dollar -// - `SRG` - Surinamese Guilder -// - `SZL` - Swazi Lilangeni -// - `SEK` - Swedish Krona -// - `CHF` - Swiss Franc -// - `SYP` - Syrian Pound -// - `STN` - São Tomé & Príncipe Dobra -// - `STD` - São Tomé & Príncipe Dobra (1977–2017) -// - `TVD` - TVD -// - `TJR` - Tajikistani Ruble -// - `TJS` - Tajikistani Somoni -// - `TZS` - Tanzanian Shilling -// - `XTS` - Testing Currency Code -// - `THB` - Thai Baht -// - `XXX` - The codes assigned for transactions where no currency is involved -// - `TPE` - Timorese Escudo -// - `TOP` - Tongan Paʻanga -// - `TTD` - Trinidad & Tobago Dollar -// - `TND` - Tunisian Dinar -// - `TRY` - Turkish Lira -// - `TRL` - Turkish Lira (1922–2005) -// - `TMT` - Turkmenistani Manat -// - `TMM` - Turkmenistani Manat (1993–2009) -// - `USD` - US Dollar -// - `USN` - US Dollar (Next day) -// - `USS` - US Dollar (Same day) -// - `UGX` - Ugandan Shilling -// - `UGS` - Ugandan Shilling (1966–1987) -// - `UAH` - Ukrainian Hryvnia -// - `UAK` - Ukrainian Karbovanets -// - `AED` - United Arab Emirates Dirham -// - `UYW` - Uruguayan Nominal Wage Index Unit -// - `UYU` - Uruguayan Peso -// - `UYP` - Uruguayan Peso (1975–1993) -// - `UYI` - Uruguayan Peso (Indexed Units) -// - `UZS` - Uzbekistani Som -// - `VUV` - Vanuatu Vatu -// - `VES` - Venezuelan Bolívar -// - `VEB` - Venezuelan Bolívar (1871–2008) -// - `VEF` - Venezuelan Bolívar (2008–2018) -// - `VND` - Vietnamese Dong -// - `VNN` - Vietnamese Dong (1978–1985) -// - `CHE` - WIR Euro -// - `CHW` - WIR Franc -// - `XOF` - West African CFA Franc -// - `YDD` - Yemeni Dinar -// - `YER` - Yemeni Rial -// - `YUN` - Yugoslavian Convertible Dinar (1990–1992) -// - `YUD` - Yugoslavian Hard Dinar (1966–1990) -// - `YUM` - Yugoslavian New Dinar (1994–2002) -// - `YUR` - Yugoslavian Reformed Dinar (1992–1993) -// - `ZWN` - ZWN -// - `ZRN` - Zairean New Zaire (1993–1998) -// - `ZRZ` - Zairean Zaire (1971–1993) -// - `ZMW` - Zambian Kwacha -// - `ZMK` - Zambian Kwacha (1968–2012) -// - `ZWD` - Zimbabwean Dollar (1980–2008) -// - `ZWR` - Zimbabwean Dollar (2008) -// - `ZWL` - Zimbabwean Dollar (2009) -type PaymentRequestCurrency struct { - typeName string - TransactionCurrencyEnum TransactionCurrencyEnum - String string +// ### Usage Example +// Fetch from the `GET PaymentTerm` endpoint and view payment term information. +type PaymentTerm struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The name of the payment term. + Name string `json:"name" url:"name"` + // `True` if the payment term is active, `False` if not. + IsActive *bool `json:"is_active,omitempty" url:"is_active,omitempty"` + // The subsidiary that the payment term belongs to. + Company *PaymentTermCompany `json:"company,omitempty" url:"company,omitempty"` + // The number of days after the invoice date that payment is due. + DaysUntilDue *int `json:"days_until_due,omitempty" url:"days_until_due,omitempty"` + // The number of days the invoice must be paid before discounts expire. + DiscountDays *int `json:"discount_days,omitempty" url:"discount_days,omitempty"` + // When the third party's payment term was modified. + RemoteLastModifiedAt *time.Time `json:"remote_last_modified_at,omitempty" url:"remote_last_modified_at,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func NewPaymentRequestCurrencyFromTransactionCurrencyEnum(value TransactionCurrencyEnum) *PaymentRequestCurrency { - return &PaymentRequestCurrency{typeName: "transactionCurrencyEnum", TransactionCurrencyEnum: value} +func (p *PaymentTerm) GetId() *string { + if p == nil { + return nil + } + return p.Id } -func NewPaymentRequestCurrencyFromString(value string) *PaymentRequestCurrency { - return &PaymentRequestCurrency{typeName: "string", String: value} +func (p *PaymentTerm) GetRemoteId() *string { + if p == nil { + return nil + } + return p.RemoteId } -func (p *PaymentRequestCurrency) UnmarshalJSON(data []byte) error { - var valueTransactionCurrencyEnum TransactionCurrencyEnum - if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { - p.typeName = "transactionCurrencyEnum" - p.TransactionCurrencyEnum = valueTransactionCurrencyEnum +func (p *PaymentTerm) GetCreatedAt() *time.Time { + if p == nil { return nil } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" - p.String = valueString + return p.CreatedAt +} + +func (p *PaymentTerm) GetModifiedAt() *time.Time { + if p == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, p) + return p.ModifiedAt } -func (p PaymentRequestCurrency) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "transactionCurrencyEnum": - return json.Marshal(p.TransactionCurrencyEnum) - case "string": - return json.Marshal(p.String) +func (p *PaymentTerm) GetName() string { + if p == nil { + return "" } + return p.Name } -type PaymentRequestCurrencyVisitor interface { - VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error - VisitString(string) error +func (p *PaymentTerm) GetIsActive() *bool { + if p == nil { + return nil + } + return p.IsActive } -func (p *PaymentRequestCurrency) Accept(visitor PaymentRequestCurrencyVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "transactionCurrencyEnum": - return visitor.VisitTransactionCurrencyEnum(p.TransactionCurrencyEnum) - case "string": - return visitor.VisitString(p.String) +func (p *PaymentTerm) GetCompany() *PaymentTermCompany { + if p == nil { + return nil } + return p.Company } -type PaymentRequestTrackingCategoriesItem struct { - typeName string - String string - TrackingCategory *TrackingCategory +func (p *PaymentTerm) GetDaysUntilDue() *int { + if p == nil { + return nil + } + return p.DaysUntilDue } -func NewPaymentRequestTrackingCategoriesItemFromString(value string) *PaymentRequestTrackingCategoriesItem { - return &PaymentRequestTrackingCategoriesItem{typeName: "string", String: value} +func (p *PaymentTerm) GetDiscountDays() *int { + if p == nil { + return nil + } + return p.DiscountDays } -func NewPaymentRequestTrackingCategoriesItemFromTrackingCategory(value *TrackingCategory) *PaymentRequestTrackingCategoriesItem { - return &PaymentRequestTrackingCategoriesItem{typeName: "trackingCategory", TrackingCategory: value} +func (p *PaymentTerm) GetRemoteLastModifiedAt() *time.Time { + if p == nil { + return nil + } + return p.RemoteLastModifiedAt } -func (p *PaymentRequestTrackingCategoriesItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" - p.String = valueString +func (p *PaymentTerm) GetFieldMappings() map[string]interface{} { + if p == nil { return nil } - valueTrackingCategory := new(TrackingCategory) - if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { - p.typeName = "trackingCategory" - p.TrackingCategory = valueTrackingCategory + return p.FieldMappings +} + +func (p *PaymentTerm) GetRemoteData() []*RemoteData { + if p == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, p) + return p.RemoteData } -func (p PaymentRequestTrackingCategoriesItem) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": - return json.Marshal(p.String) - case "trackingCategory": - return json.Marshal(p.TrackingCategory) +func (p *PaymentTerm) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaymentTerm) UnmarshalJSON(data []byte) error { + type embed PaymentTerm + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + RemoteLastModifiedAt *internal.DateTime `json:"remote_last_modified_at,omitempty"` + }{ + embed: embed(*p), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *p = PaymentTerm(unmarshaler.embed) + p.CreatedAt = unmarshaler.CreatedAt.TimePtr() + p.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + p.RemoteLastModifiedAt = unmarshaler.RemoteLastModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil } -type PaymentRequestTrackingCategoriesItemVisitor interface { - VisitString(string) error - VisitTrackingCategory(*TrackingCategory) error +func (p *PaymentTerm) MarshalJSON() ([]byte, error) { + type embed PaymentTerm + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + RemoteLastModifiedAt *internal.DateTime `json:"remote_last_modified_at,omitempty"` + }{ + embed: embed(*p), + CreatedAt: internal.NewOptionalDateTime(p.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(p.ModifiedAt), + RemoteLastModifiedAt: internal.NewOptionalDateTime(p.RemoteLastModifiedAt), + } + return json.Marshal(marshaler) } -func (p *PaymentRequestTrackingCategoriesItem) Accept(visitor PaymentRequestTrackingCategoriesItemVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": - return visitor.VisitString(p.String) - case "trackingCategory": - return visitor.VisitTrackingCategory(p.TrackingCategory) +func (p *PaymentTerm) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value } + return fmt.Sprintf("%#v", p) } -// The type of the invoice. -// -// - `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE -// - `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE -type PaymentRequestType struct { - typeName string - PaymentTypeEnum PaymentTypeEnum - String string -} +// The subsidiary that the payment term belongs to. +type PaymentTermCompany struct { + String string + CompanyInfo *CompanyInfo -func NewPaymentRequestTypeFromPaymentTypeEnum(value PaymentTypeEnum) *PaymentRequestType { - return &PaymentRequestType{typeName: "paymentTypeEnum", PaymentTypeEnum: value} + typ string } -func NewPaymentRequestTypeFromString(value string) *PaymentRequestType { - return &PaymentRequestType{typeName: "string", String: value} +func (p *PaymentTermCompany) GetString() string { + if p == nil { + return "" + } + return p.String } -func (p *PaymentRequestType) UnmarshalJSON(data []byte) error { - var valuePaymentTypeEnum PaymentTypeEnum - if err := json.Unmarshal(data, &valuePaymentTypeEnum); err == nil { - p.typeName = "paymentTypeEnum" - p.PaymentTypeEnum = valuePaymentTypeEnum +func (p *PaymentTermCompany) GetCompanyInfo() *CompanyInfo { + if p == nil { return nil } + return p.CompanyInfo +} + +func (p *PaymentTermCompany) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" + p.typ = "String" p.String = valueString return nil } + valueCompanyInfo := new(CompanyInfo) + if err := json.Unmarshal(data, &valueCompanyInfo); err == nil { + p.typ = "CompanyInfo" + p.CompanyInfo = valueCompanyInfo + return nil + } return fmt.Errorf("%s cannot be deserialized as a %T", data, p) } -func (p PaymentRequestType) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "paymentTypeEnum": - return json.Marshal(p.PaymentTypeEnum) - case "string": +func (p PaymentTermCompany) MarshalJSON() ([]byte, error) { + if p.typ == "String" || p.String != "" { return json.Marshal(p.String) } + if p.typ == "CompanyInfo" || p.CompanyInfo != nil { + return json.Marshal(p.CompanyInfo) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) } -type PaymentRequestTypeVisitor interface { - VisitPaymentTypeEnum(PaymentTypeEnum) error +type PaymentTermCompanyVisitor interface { VisitString(string) error + VisitCompanyInfo(*CompanyInfo) error } -func (p *PaymentRequestType) Accept(visitor PaymentRequestTypeVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "paymentTypeEnum": - return visitor.VisitPaymentTypeEnum(p.PaymentTypeEnum) - case "string": +func (p *PaymentTermCompany) Accept(visitor PaymentTermCompanyVisitor) error { + if p.typ == "String" || p.String != "" { return visitor.VisitString(p.String) } -} - -type PaymentResponse struct { - Model *Payment `json:"model,omitempty"` - Warnings []*WarningValidationProblem `json:"warnings,omitempty"` - Errors []*ErrorValidationProblem `json:"errors,omitempty"` - Logs []*DebugModeLog `json:"logs,omitempty"` - - _rawJSON json.RawMessage -} - -func (p *PaymentResponse) UnmarshalJSON(data []byte) error { - type unmarshaler PaymentResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *p = PaymentResponse(value) - p._rawJSON = json.RawMessage(data) - return nil -} - -func (p *PaymentResponse) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value + if p.typ == "CompanyInfo" || p.CompanyInfo != nil { + return visitor.VisitCompanyInfo(p.CompanyInfo) } - return fmt.Sprintf("%#v", p) + return fmt.Errorf("type %T does not include a non-empty union type", p) } type PaymentTrackingCategoriesItem struct { - typeName string String string TrackingCategory *TrackingCategory + + typ string } -func NewPaymentTrackingCategoriesItemFromString(value string) *PaymentTrackingCategoriesItem { - return &PaymentTrackingCategoriesItem{typeName: "string", String: value} +func (p *PaymentTrackingCategoriesItem) GetString() string { + if p == nil { + return "" + } + return p.String } -func NewPaymentTrackingCategoriesItemFromTrackingCategory(value *TrackingCategory) *PaymentTrackingCategoriesItem { - return &PaymentTrackingCategoriesItem{typeName: "trackingCategory", TrackingCategory: value} +func (p *PaymentTrackingCategoriesItem) GetTrackingCategory() *TrackingCategory { + if p == nil { + return nil + } + return p.TrackingCategory } func (p *PaymentTrackingCategoriesItem) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" + p.typ = "String" p.String = valueString return nil } valueTrackingCategory := new(TrackingCategory) if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { - p.typeName = "trackingCategory" + p.typ = "TrackingCategory" p.TrackingCategory = valueTrackingCategory return nil } @@ -36390,14 +15899,13 @@ func (p *PaymentTrackingCategoriesItem) UnmarshalJSON(data []byte) error { } func (p PaymentTrackingCategoriesItem) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": + if p.typ == "String" || p.String != "" { return json.Marshal(p.String) - case "trackingCategory": + } + if p.typ == "TrackingCategory" || p.TrackingCategory != nil { return json.Marshal(p.TrackingCategory) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) } type PaymentTrackingCategoriesItemVisitor interface { @@ -36406,44 +15914,50 @@ type PaymentTrackingCategoriesItemVisitor interface { } func (p *PaymentTrackingCategoriesItem) Accept(visitor PaymentTrackingCategoriesItemVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": + if p.typ == "String" || p.String != "" { return visitor.VisitString(p.String) - case "trackingCategory": + } + if p.typ == "TrackingCategory" || p.TrackingCategory != nil { return visitor.VisitTrackingCategory(p.TrackingCategory) } + return fmt.Errorf("type %T does not include a non-empty union type", p) } // The type of the invoice. // -// - `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE -// - `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE +// * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE +// * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE type PaymentType struct { - typeName string PaymentTypeEnum PaymentTypeEnum String string + + typ string } -func NewPaymentTypeFromPaymentTypeEnum(value PaymentTypeEnum) *PaymentType { - return &PaymentType{typeName: "paymentTypeEnum", PaymentTypeEnum: value} +func (p *PaymentType) GetPaymentTypeEnum() PaymentTypeEnum { + if p == nil { + return "" + } + return p.PaymentTypeEnum } -func NewPaymentTypeFromString(value string) *PaymentType { - return &PaymentType{typeName: "string", String: value} +func (p *PaymentType) GetString() string { + if p == nil { + return "" + } + return p.String } func (p *PaymentType) UnmarshalJSON(data []byte) error { var valuePaymentTypeEnum PaymentTypeEnum if err := json.Unmarshal(data, &valuePaymentTypeEnum); err == nil { - p.typeName = "paymentTypeEnum" + p.typ = "PaymentTypeEnum" p.PaymentTypeEnum = valuePaymentTypeEnum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" + p.typ = "String" p.String = valueString return nil } @@ -36451,14 +15965,13 @@ func (p *PaymentType) UnmarshalJSON(data []byte) error { } func (p PaymentType) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "paymentTypeEnum": + if p.typ == "PaymentTypeEnum" || p.PaymentTypeEnum != "" { return json.Marshal(p.PaymentTypeEnum) - case "string": + } + if p.typ == "String" || p.String != "" { return json.Marshal(p.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) } type PaymentTypeVisitor interface { @@ -36467,18 +15980,17 @@ type PaymentTypeVisitor interface { } func (p *PaymentType) Accept(visitor PaymentTypeVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "paymentTypeEnum": + if p.typ == "PaymentTypeEnum" || p.PaymentTypeEnum != "" { return visitor.VisitPaymentTypeEnum(p.PaymentTypeEnum) - case "string": + } + if p.typ == "String" || p.String != "" { return visitor.VisitString(p.String) } + return fmt.Errorf("type %T does not include a non-empty union type", p) } -// - `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE -// - `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE +// * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE +// * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE type PaymentTypeEnum string const ( @@ -36501,3666 +16013,2553 @@ func (p PaymentTypeEnum) Ptr() *PaymentTypeEnum { return &p } -// - `UNPOSTED` - UNPOSTED -// - `POSTED` - POSTED -type PostingStatusEnum string - -const ( - PostingStatusEnumUnposted PostingStatusEnum = "UNPOSTED" - PostingStatusEnumPosted PostingStatusEnum = "POSTED" -) - -func NewPostingStatusEnumFromString(s string) (PostingStatusEnum, error) { - switch s { - case "UNPOSTED": - return PostingStatusEnumUnposted, nil - case "POSTED": - return PostingStatusEnumPosted, nil - } - var t PostingStatusEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (p PostingStatusEnum) Ptr() *PostingStatusEnum { - return &p -} - -// # The PurchaseOrder Object -// +// # The Project Object // ### Description -// -// A `PurchaseOrder` represents a request to purchase goods or services from a vendor. It outlines the details of the purchase, such as the items or services requested, quantities, prices, and delivery details. -// -// A `PurchaseOrder` is a crucial component of the procurement process, but does not typically result in any impact on the company’s general ledger. The general ledger is typically only affected when the `PurchaseOrder` is fulfilled as an _Accounts Payable_ `Invoice` object (also known as a Bill). +// The `Project` object is used to track and manage time, costs, resources, and revenue for specific initiatives or work efforts. +// It provides classification on transactions for allocating expenses, revenue, and activities to a specific project for financial reporting. // // ### Usage Example -// -// Fetch from the `LIST PurchaseOrders` endpoint and view a company's purchase orders. -type PurchaseOrder struct { - Id *string `json:"id,omitempty"` +// Fetch from the `GET Project` endpoint and view project information. +type Project struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The purchase order's status. - // - // - `DRAFT` - DRAFT - // - `SUBMITTED` - SUBMITTED - // - `AUTHORIZED` - AUTHORIZED - // - `BILLED` - BILLED - // - `DELETED` - DELETED - Status *PurchaseOrderStatus `json:"status,omitempty"` - // The purchase order's issue date. - IssueDate *time.Time `json:"issue_date,omitempty"` - // The human-readable number of the purchase order. - PurchaseOrderNumber *string `json:"purchase_order_number,omitempty"` - // The purchase order's delivery date. - DeliveryDate *time.Time `json:"delivery_date,omitempty"` - // The purchase order's delivery address. - DeliveryAddress *PurchaseOrderDeliveryAddress `json:"delivery_address,omitempty"` - // The contact making the purchase order. - Customer *string `json:"customer,omitempty"` - // The party fulfilling the purchase order. - Vendor *PurchaseOrderVendor `json:"vendor,omitempty"` - // A memo attached to the purchase order. - Memo *string `json:"memo,omitempty"` - // The company the purchase order belongs to. - Company *PurchaseOrderCompany `json:"company,omitempty"` - // The purchase order's total amount. - TotalAmount *float64 `json:"total_amount,omitempty"` - // The purchase order's currency. - // - // - `XUA` - ADB Unit of Account - // - `AFN` - Afghan Afghani - // - `AFA` - Afghan Afghani (1927–2002) - // - `ALL` - Albanian Lek - // - `ALK` - Albanian Lek (1946–1965) - // - `DZD` - Algerian Dinar - // - `ADP` - Andorran Peseta - // - `AOA` - Angolan Kwanza - // - `AOK` - Angolan Kwanza (1977–1991) - // - `AON` - Angolan New Kwanza (1990–2000) - // - `AOR` - Angolan Readjusted Kwanza (1995–1999) - // - `ARA` - Argentine Austral - // - `ARS` - Argentine Peso - // - `ARM` - Argentine Peso (1881–1970) - // - `ARP` - Argentine Peso (1983–1985) - // - `ARL` - Argentine Peso Ley (1970–1983) - // - `AMD` - Armenian Dram - // - `AWG` - Aruban Florin - // - `AUD` - Australian Dollar - // - `ATS` - Austrian Schilling - // - `AZN` - Azerbaijani Manat - // - `AZM` - Azerbaijani Manat (1993–2006) - // - `BSD` - Bahamian Dollar - // - `BHD` - Bahraini Dinar - // - `BDT` - Bangladeshi Taka - // - `BBD` - Barbadian Dollar - // - `BYN` - Belarusian Ruble - // - `BYB` - Belarusian Ruble (1994–1999) - // - `BYR` - Belarusian Ruble (2000–2016) - // - `BEF` - Belgian Franc - // - `BEC` - Belgian Franc (convertible) - // - `BEL` - Belgian Franc (financial) - // - `BZD` - Belize Dollar - // - `BMD` - Bermudan Dollar - // - `BTN` - Bhutanese Ngultrum - // - `BOB` - Bolivian Boliviano - // - `BOL` - Bolivian Boliviano (1863–1963) - // - `BOV` - Bolivian Mvdol - // - `BOP` - Bolivian Peso - // - `BAM` - Bosnia-Herzegovina Convertible Mark - // - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - // - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - // - `BWP` - Botswanan Pula - // - `BRC` - Brazilian Cruzado (1986–1989) - // - `BRZ` - Brazilian Cruzeiro (1942–1967) - // - `BRE` - Brazilian Cruzeiro (1990–1993) - // - `BRR` - Brazilian Cruzeiro (1993–1994) - // - `BRN` - Brazilian New Cruzado (1989–1990) - // - `BRB` - Brazilian New Cruzeiro (1967–1986) - // - `BRL` - Brazilian Real - // - `GBP` - British Pound - // - `BND` - Brunei Dollar - // - `BGL` - Bulgarian Hard Lev - // - `BGN` - Bulgarian Lev - // - `BGO` - Bulgarian Lev (1879–1952) - // - `BGM` - Bulgarian Socialist Lev - // - `BUK` - Burmese Kyat - // - `BIF` - Burundian Franc - // - `XPF` - CFP Franc - // - `KHR` - Cambodian Riel - // - `CAD` - Canadian Dollar - // - `CVE` - Cape Verdean Escudo - // - `KYD` - Cayman Islands Dollar - // - `XAF` - Central African CFA Franc - // - `CLE` - Chilean Escudo - // - `CLP` - Chilean Peso - // - `CLF` - Chilean Unit of Account (UF) - // - `CNX` - Chinese People’s Bank Dollar - // - `CNY` - Chinese Yuan - // - `CNH` - Chinese Yuan (offshore) - // - `COP` - Colombian Peso - // - `COU` - Colombian Real Value Unit - // - `KMF` - Comorian Franc - // - `CDF` - Congolese Franc - // - `CRC` - Costa Rican Colón - // - `HRD` - Croatian Dinar - // - `HRK` - Croatian Kuna - // - `CUC` - Cuban Convertible Peso - // - `CUP` - Cuban Peso - // - `CYP` - Cypriot Pound - // - `CZK` - Czech Koruna - // - `CSK` - Czechoslovak Hard Koruna - // - `DKK` - Danish Krone - // - `DJF` - Djiboutian Franc - // - `DOP` - Dominican Peso - // - `NLG` - Dutch Guilder - // - `XCD` - East Caribbean Dollar - // - `DDM` - East German Mark - // - `ECS` - Ecuadorian Sucre - // - `ECV` - Ecuadorian Unit of Constant Value - // - `EGP` - Egyptian Pound - // - `GQE` - Equatorial Guinean Ekwele - // - `ERN` - Eritrean Nakfa - // - `EEK` - Estonian Kroon - // - `ETB` - Ethiopian Birr - // - `EUR` - Euro - // - `XBA` - European Composite Unit - // - `XEU` - European Currency Unit - // - `XBB` - European Monetary Unit - // - `XBC` - European Unit of Account (XBC) - // - `XBD` - European Unit of Account (XBD) - // - `FKP` - Falkland Islands Pound - // - `FJD` - Fijian Dollar - // - `FIM` - Finnish Markka - // - `FRF` - French Franc - // - `XFO` - French Gold Franc - // - `XFU` - French UIC-Franc - // - `GMD` - Gambian Dalasi - // - `GEK` - Georgian Kupon Larit - // - `GEL` - Georgian Lari - // - `DEM` - German Mark - // - `GHS` - Ghanaian Cedi - // - `GHC` - Ghanaian Cedi (1979–2007) - // - `GIP` - Gibraltar Pound - // - `XAU` - Gold - // - `GRD` - Greek Drachma - // - `GTQ` - Guatemalan Quetzal - // - `GWP` - Guinea-Bissau Peso - // - `GNF` - Guinean Franc - // - `GNS` - Guinean Syli - // - `GYD` - Guyanaese Dollar - // - `HTG` - Haitian Gourde - // - `HNL` - Honduran Lempira - // - `HKD` - Hong Kong Dollar - // - `HUF` - Hungarian Forint - // - `IMP` - IMP - // - `ISK` - Icelandic Króna - // - `ISJ` - Icelandic Króna (1918–1981) - // - `INR` - Indian Rupee - // - `IDR` - Indonesian Rupiah - // - `IRR` - Iranian Rial - // - `IQD` - Iraqi Dinar - // - `IEP` - Irish Pound - // - `ILS` - Israeli New Shekel - // - `ILP` - Israeli Pound - // - `ILR` - Israeli Shekel (1980–1985) - // - `ITL` - Italian Lira - // - `JMD` - Jamaican Dollar - // - `JPY` - Japanese Yen - // - `JOD` - Jordanian Dinar - // - `KZT` - Kazakhstani Tenge - // - `KES` - Kenyan Shilling - // - `KWD` - Kuwaiti Dinar - // - `KGS` - Kyrgystani Som - // - `LAK` - Laotian Kip - // - `LVL` - Latvian Lats - // - `LVR` - Latvian Ruble - // - `LBP` - Lebanese Pound - // - `LSL` - Lesotho Loti - // - `LRD` - Liberian Dollar - // - `LYD` - Libyan Dinar - // - `LTL` - Lithuanian Litas - // - `LTT` - Lithuanian Talonas - // - `LUL` - Luxembourg Financial Franc - // - `LUC` - Luxembourgian Convertible Franc - // - `LUF` - Luxembourgian Franc - // - `MOP` - Macanese Pataca - // - `MKD` - Macedonian Denar - // - `MKN` - Macedonian Denar (1992–1993) - // - `MGA` - Malagasy Ariary - // - `MGF` - Malagasy Franc - // - `MWK` - Malawian Kwacha - // - `MYR` - Malaysian Ringgit - // - `MVR` - Maldivian Rufiyaa - // - `MVP` - Maldivian Rupee (1947–1981) - // - `MLF` - Malian Franc - // - `MTL` - Maltese Lira - // - `MTP` - Maltese Pound - // - `MRU` - Mauritanian Ouguiya - // - `MRO` - Mauritanian Ouguiya (1973–2017) - // - `MUR` - Mauritian Rupee - // - `MXV` - Mexican Investment Unit - // - `MXN` - Mexican Peso - // - `MXP` - Mexican Silver Peso (1861–1992) - // - `MDC` - Moldovan Cupon - // - `MDL` - Moldovan Leu - // - `MCF` - Monegasque Franc - // - `MNT` - Mongolian Tugrik - // - `MAD` - Moroccan Dirham - // - `MAF` - Moroccan Franc - // - `MZE` - Mozambican Escudo - // - `MZN` - Mozambican Metical - // - `MZM` - Mozambican Metical (1980–2006) - // - `MMK` - Myanmar Kyat - // - `NAD` - Namibian Dollar - // - `NPR` - Nepalese Rupee - // - `ANG` - Netherlands Antillean Guilder - // - `TWD` - New Taiwan Dollar - // - `NZD` - New Zealand Dollar - // - `NIO` - Nicaraguan Córdoba - // - `NIC` - Nicaraguan Córdoba (1988–1991) - // - `NGN` - Nigerian Naira - // - `KPW` - North Korean Won - // - `NOK` - Norwegian Krone - // - `OMR` - Omani Rial - // - `PKR` - Pakistani Rupee - // - `XPD` - Palladium - // - `PAB` - Panamanian Balboa - // - `PGK` - Papua New Guinean Kina - // - `PYG` - Paraguayan Guarani - // - `PEI` - Peruvian Inti - // - `PEN` - Peruvian Sol - // - `PES` - Peruvian Sol (1863–1965) - // - `PHP` - Philippine Peso - // - `XPT` - Platinum - // - `PLN` - Polish Zloty - // - `PLZ` - Polish Zloty (1950–1995) - // - `PTE` - Portuguese Escudo - // - `GWE` - Portuguese Guinea Escudo - // - `QAR` - Qatari Rial - // - `XRE` - RINET Funds - // - `RHD` - Rhodesian Dollar - // - `RON` - Romanian Leu - // - `ROL` - Romanian Leu (1952–2006) - // - `RUB` - Russian Ruble - // - `RUR` - Russian Ruble (1991–1998) - // - `RWF` - Rwandan Franc - // - `SVC` - Salvadoran Colón - // - `WST` - Samoan Tala - // - `SAR` - Saudi Riyal - // - `RSD` - Serbian Dinar - // - `CSD` - Serbian Dinar (2002–2006) - // - `SCR` - Seychellois Rupee - // - `SLL` - Sierra Leonean Leone - // - `XAG` - Silver - // - `SGD` - Singapore Dollar - // - `SKK` - Slovak Koruna - // - `SIT` - Slovenian Tolar - // - `SBD` - Solomon Islands Dollar - // - `SOS` - Somali Shilling - // - `ZAR` - South African Rand - // - `ZAL` - South African Rand (financial) - // - `KRH` - South Korean Hwan (1953–1962) - // - `KRW` - South Korean Won - // - `KRO` - South Korean Won (1945–1953) - // - `SSP` - South Sudanese Pound - // - `SUR` - Soviet Rouble - // - `ESP` - Spanish Peseta - // - `ESA` - Spanish Peseta (A account) - // - `ESB` - Spanish Peseta (convertible account) - // - `XDR` - Special Drawing Rights - // - `LKR` - Sri Lankan Rupee - // - `SHP` - St. Helena Pound - // - `XSU` - Sucre - // - `SDD` - Sudanese Dinar (1992–2007) - // - `SDG` - Sudanese Pound - // - `SDP` - Sudanese Pound (1957–1998) - // - `SRD` - Surinamese Dollar - // - `SRG` - Surinamese Guilder - // - `SZL` - Swazi Lilangeni - // - `SEK` - Swedish Krona - // - `CHF` - Swiss Franc - // - `SYP` - Syrian Pound - // - `STN` - São Tomé & Príncipe Dobra - // - `STD` - São Tomé & Príncipe Dobra (1977–2017) - // - `TVD` - TVD - // - `TJR` - Tajikistani Ruble - // - `TJS` - Tajikistani Somoni - // - `TZS` - Tanzanian Shilling - // - `XTS` - Testing Currency Code - // - `THB` - Thai Baht - // - `XXX` - The codes assigned for transactions where no currency is involved - // - `TPE` - Timorese Escudo - // - `TOP` - Tongan Paʻanga - // - `TTD` - Trinidad & Tobago Dollar - // - `TND` - Tunisian Dinar - // - `TRY` - Turkish Lira - // - `TRL` - Turkish Lira (1922–2005) - // - `TMT` - Turkmenistani Manat - // - `TMM` - Turkmenistani Manat (1993–2009) - // - `USD` - US Dollar - // - `USN` - US Dollar (Next day) - // - `USS` - US Dollar (Same day) - // - `UGX` - Ugandan Shilling - // - `UGS` - Ugandan Shilling (1966–1987) - // - `UAH` - Ukrainian Hryvnia - // - `UAK` - Ukrainian Karbovanets - // - `AED` - United Arab Emirates Dirham - // - `UYW` - Uruguayan Nominal Wage Index Unit - // - `UYU` - Uruguayan Peso - // - `UYP` - Uruguayan Peso (1975–1993) - // - `UYI` - Uruguayan Peso (Indexed Units) - // - `UZS` - Uzbekistani Som - // - `VUV` - Vanuatu Vatu - // - `VES` - Venezuelan Bolívar - // - `VEB` - Venezuelan Bolívar (1871–2008) - // - `VEF` - Venezuelan Bolívar (2008–2018) - // - `VND` - Vietnamese Dong - // - `VNN` - Vietnamese Dong (1978–1985) - // - `CHE` - WIR Euro - // - `CHW` - WIR Franc - // - `XOF` - West African CFA Franc - // - `YDD` - Yemeni Dinar - // - `YER` - Yemeni Rial - // - `YUN` - Yugoslavian Convertible Dinar (1990–1992) - // - `YUD` - Yugoslavian Hard Dinar (1966–1990) - // - `YUM` - Yugoslavian New Dinar (1994–2002) - // - `YUR` - Yugoslavian Reformed Dinar (1992–1993) - // - `ZWN` - ZWN - // - `ZRN` - Zairean New Zaire (1993–1998) - // - `ZRZ` - Zairean Zaire (1971–1993) - // - `ZMW` - Zambian Kwacha - // - `ZMK` - Zambian Kwacha (1968–2012) - // - `ZWD` - Zimbabwean Dollar (1980–2008) - // - `ZWR` - Zimbabwean Dollar (2008) - // - `ZWL` - Zimbabwean Dollar (2009) - Currency *PurchaseOrderCurrency `json:"currency,omitempty"` - // The purchase order's exchange rate. - ExchangeRate *string `json:"exchange_rate,omitempty"` - LineItems []*PurchaseOrderLineItem `json:"line_items,omitempty"` - // If the transaction is inclusive or exclusive of tax. `True` if inclusive, `False` if exclusive. - InclusiveOfTax *bool `json:"inclusive_of_tax,omitempty"` - TrackingCategories []*PurchaseOrderTrackingCategoriesItem `json:"tracking_categories,omitempty"` - // The accounting period that the PurchaseOrder was generated in. - AccountingPeriod *PurchaseOrderAccountingPeriod `json:"accounting_period,omitempty"` - // When the third party's purchase order note was created. - RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty"` - // When the third party's purchase order note was updated. - RemoteUpdatedAt *time.Time `json:"remote_updated_at,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` - RemoteFields []*RemoteField `json:"remote_fields,omitempty"` + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The project’s name + Name string `json:"name" url:"name"` + // `True` if the project is active, `False` if the project is not active. + IsActive *bool `json:"is_active,omitempty" url:"is_active,omitempty"` + // The subsidiary that the project belongs to. + Company *ProjectCompany `json:"company,omitempty" url:"company,omitempty"` + // The supplier, or customer involved in the project. + Contact *ProjectContact `json:"contact,omitempty" url:"contact,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (p *PurchaseOrder) UnmarshalJSON(data []byte) error { - type unmarshaler PurchaseOrder - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (p *Project) GetId() *string { + if p == nil { + return nil } - *p = PurchaseOrder(value) - p._rawJSON = json.RawMessage(data) - return nil + return p.Id } -func (p *PurchaseOrder) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } +func (p *Project) GetRemoteId() *string { + if p == nil { + return nil } - if value, err := core.StringifyJSON(p); err == nil { - return value + return p.RemoteId +} + +func (p *Project) GetCreatedAt() *time.Time { + if p == nil { + return nil } - return fmt.Sprintf("%#v", p) + return p.CreatedAt } -// The accounting period that the PurchaseOrder was generated in. -type PurchaseOrderAccountingPeriod struct { - typeName string - String string - AccountingPeriod *AccountingPeriod +func (p *Project) GetModifiedAt() *time.Time { + if p == nil { + return nil + } + return p.ModifiedAt } -func NewPurchaseOrderAccountingPeriodFromString(value string) *PurchaseOrderAccountingPeriod { - return &PurchaseOrderAccountingPeriod{typeName: "string", String: value} +func (p *Project) GetName() string { + if p == nil { + return "" + } + return p.Name } -func NewPurchaseOrderAccountingPeriodFromAccountingPeriod(value *AccountingPeriod) *PurchaseOrderAccountingPeriod { - return &PurchaseOrderAccountingPeriod{typeName: "accountingPeriod", AccountingPeriod: value} +func (p *Project) GetIsActive() *bool { + if p == nil { + return nil + } + return p.IsActive } -func (p *PurchaseOrderAccountingPeriod) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" - p.String = valueString +func (p *Project) GetCompany() *ProjectCompany { + if p == nil { return nil } - valueAccountingPeriod := new(AccountingPeriod) - if err := json.Unmarshal(data, &valueAccountingPeriod); err == nil { - p.typeName = "accountingPeriod" - p.AccountingPeriod = valueAccountingPeriod + return p.Company +} + +func (p *Project) GetContact() *ProjectContact { + if p == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, p) + return p.Contact } -func (p PurchaseOrderAccountingPeriod) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": - return json.Marshal(p.String) - case "accountingPeriod": - return json.Marshal(p.AccountingPeriod) +func (p *Project) GetFieldMappings() map[string]interface{} { + if p == nil { + return nil } + return p.FieldMappings } -type PurchaseOrderAccountingPeriodVisitor interface { - VisitString(string) error - VisitAccountingPeriod(*AccountingPeriod) error +func (p *Project) GetRemoteData() []*RemoteData { + if p == nil { + return nil + } + return p.RemoteData } -func (p *PurchaseOrderAccountingPeriod) Accept(visitor PurchaseOrderAccountingPeriodVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": - return visitor.VisitString(p.String) - case "accountingPeriod": - return visitor.VisitAccountingPeriod(p.AccountingPeriod) +func (p *Project) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *Project) UnmarshalJSON(data []byte) error { + type embed Project + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*p), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *p = Project(unmarshaler.embed) + p.CreatedAt = unmarshaler.CreatedAt.TimePtr() + p.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil } -// The company the purchase order belongs to. -type PurchaseOrderCompany struct { - typeName string +func (p *Project) MarshalJSON() ([]byte, error) { + type embed Project + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*p), + CreatedAt: internal.NewOptionalDateTime(p.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(p.ModifiedAt), + } + return json.Marshal(marshaler) +} + +func (p *Project) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +// The subsidiary that the project belongs to. +type ProjectCompany struct { String string CompanyInfo *CompanyInfo + + typ string } -func NewPurchaseOrderCompanyFromString(value string) *PurchaseOrderCompany { - return &PurchaseOrderCompany{typeName: "string", String: value} +func (p *ProjectCompany) GetString() string { + if p == nil { + return "" + } + return p.String } -func NewPurchaseOrderCompanyFromCompanyInfo(value *CompanyInfo) *PurchaseOrderCompany { - return &PurchaseOrderCompany{typeName: "companyInfo", CompanyInfo: value} +func (p *ProjectCompany) GetCompanyInfo() *CompanyInfo { + if p == nil { + return nil + } + return p.CompanyInfo } -func (p *PurchaseOrderCompany) UnmarshalJSON(data []byte) error { +func (p *ProjectCompany) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" + p.typ = "String" p.String = valueString return nil } valueCompanyInfo := new(CompanyInfo) if err := json.Unmarshal(data, &valueCompanyInfo); err == nil { - p.typeName = "companyInfo" + p.typ = "CompanyInfo" p.CompanyInfo = valueCompanyInfo return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, p) } -func (p PurchaseOrderCompany) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": +func (p ProjectCompany) MarshalJSON() ([]byte, error) { + if p.typ == "String" || p.String != "" { return json.Marshal(p.String) - case "companyInfo": + } + if p.typ == "CompanyInfo" || p.CompanyInfo != nil { return json.Marshal(p.CompanyInfo) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) } -type PurchaseOrderCompanyVisitor interface { +type ProjectCompanyVisitor interface { VisitString(string) error VisitCompanyInfo(*CompanyInfo) error } -func (p *PurchaseOrderCompany) Accept(visitor PurchaseOrderCompanyVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": +func (p *ProjectCompany) Accept(visitor ProjectCompanyVisitor) error { + if p.typ == "String" || p.String != "" { return visitor.VisitString(p.String) - case "companyInfo": + } + if p.typ == "CompanyInfo" || p.CompanyInfo != nil { return visitor.VisitCompanyInfo(p.CompanyInfo) } + return fmt.Errorf("type %T does not include a non-empty union type", p) } -// The purchase order's currency. -// -// - `XUA` - ADB Unit of Account -// - `AFN` - Afghan Afghani -// - `AFA` - Afghan Afghani (1927–2002) -// - `ALL` - Albanian Lek -// - `ALK` - Albanian Lek (1946–1965) -// - `DZD` - Algerian Dinar -// - `ADP` - Andorran Peseta -// - `AOA` - Angolan Kwanza -// - `AOK` - Angolan Kwanza (1977–1991) -// - `AON` - Angolan New Kwanza (1990–2000) -// - `AOR` - Angolan Readjusted Kwanza (1995–1999) -// - `ARA` - Argentine Austral -// - `ARS` - Argentine Peso -// - `ARM` - Argentine Peso (1881–1970) -// - `ARP` - Argentine Peso (1983–1985) -// - `ARL` - Argentine Peso Ley (1970–1983) -// - `AMD` - Armenian Dram -// - `AWG` - Aruban Florin -// - `AUD` - Australian Dollar -// - `ATS` - Austrian Schilling -// - `AZN` - Azerbaijani Manat -// - `AZM` - Azerbaijani Manat (1993–2006) -// - `BSD` - Bahamian Dollar -// - `BHD` - Bahraini Dinar -// - `BDT` - Bangladeshi Taka -// - `BBD` - Barbadian Dollar -// - `BYN` - Belarusian Ruble -// - `BYB` - Belarusian Ruble (1994–1999) -// - `BYR` - Belarusian Ruble (2000–2016) -// - `BEF` - Belgian Franc -// - `BEC` - Belgian Franc (convertible) -// - `BEL` - Belgian Franc (financial) -// - `BZD` - Belize Dollar -// - `BMD` - Bermudan Dollar -// - `BTN` - Bhutanese Ngultrum -// - `BOB` - Bolivian Boliviano -// - `BOL` - Bolivian Boliviano (1863–1963) -// - `BOV` - Bolivian Mvdol -// - `BOP` - Bolivian Peso -// - `BAM` - Bosnia-Herzegovina Convertible Mark -// - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) -// - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) -// - `BWP` - Botswanan Pula -// - `BRC` - Brazilian Cruzado (1986–1989) -// - `BRZ` - Brazilian Cruzeiro (1942–1967) -// - `BRE` - Brazilian Cruzeiro (1990–1993) -// - `BRR` - Brazilian Cruzeiro (1993–1994) -// - `BRN` - Brazilian New Cruzado (1989–1990) -// - `BRB` - Brazilian New Cruzeiro (1967–1986) -// - `BRL` - Brazilian Real -// - `GBP` - British Pound -// - `BND` - Brunei Dollar -// - `BGL` - Bulgarian Hard Lev -// - `BGN` - Bulgarian Lev -// - `BGO` - Bulgarian Lev (1879–1952) -// - `BGM` - Bulgarian Socialist Lev -// - `BUK` - Burmese Kyat -// - `BIF` - Burundian Franc -// - `XPF` - CFP Franc -// - `KHR` - Cambodian Riel -// - `CAD` - Canadian Dollar -// - `CVE` - Cape Verdean Escudo -// - `KYD` - Cayman Islands Dollar -// - `XAF` - Central African CFA Franc -// - `CLE` - Chilean Escudo -// - `CLP` - Chilean Peso -// - `CLF` - Chilean Unit of Account (UF) -// - `CNX` - Chinese People’s Bank Dollar -// - `CNY` - Chinese Yuan -// - `CNH` - Chinese Yuan (offshore) -// - `COP` - Colombian Peso -// - `COU` - Colombian Real Value Unit -// - `KMF` - Comorian Franc -// - `CDF` - Congolese Franc -// - `CRC` - Costa Rican Colón -// - `HRD` - Croatian Dinar -// - `HRK` - Croatian Kuna -// - `CUC` - Cuban Convertible Peso -// - `CUP` - Cuban Peso -// - `CYP` - Cypriot Pound -// - `CZK` - Czech Koruna -// - `CSK` - Czechoslovak Hard Koruna -// - `DKK` - Danish Krone -// - `DJF` - Djiboutian Franc -// - `DOP` - Dominican Peso -// - `NLG` - Dutch Guilder -// - `XCD` - East Caribbean Dollar -// - `DDM` - East German Mark -// - `ECS` - Ecuadorian Sucre -// - `ECV` - Ecuadorian Unit of Constant Value -// - `EGP` - Egyptian Pound -// - `GQE` - Equatorial Guinean Ekwele -// - `ERN` - Eritrean Nakfa -// - `EEK` - Estonian Kroon -// - `ETB` - Ethiopian Birr -// - `EUR` - Euro -// - `XBA` - European Composite Unit -// - `XEU` - European Currency Unit -// - `XBB` - European Monetary Unit -// - `XBC` - European Unit of Account (XBC) -// - `XBD` - European Unit of Account (XBD) -// - `FKP` - Falkland Islands Pound -// - `FJD` - Fijian Dollar -// - `FIM` - Finnish Markka -// - `FRF` - French Franc -// - `XFO` - French Gold Franc -// - `XFU` - French UIC-Franc -// - `GMD` - Gambian Dalasi -// - `GEK` - Georgian Kupon Larit -// - `GEL` - Georgian Lari -// - `DEM` - German Mark -// - `GHS` - Ghanaian Cedi -// - `GHC` - Ghanaian Cedi (1979–2007) -// - `GIP` - Gibraltar Pound -// - `XAU` - Gold -// - `GRD` - Greek Drachma -// - `GTQ` - Guatemalan Quetzal -// - `GWP` - Guinea-Bissau Peso -// - `GNF` - Guinean Franc -// - `GNS` - Guinean Syli -// - `GYD` - Guyanaese Dollar -// - `HTG` - Haitian Gourde -// - `HNL` - Honduran Lempira -// - `HKD` - Hong Kong Dollar -// - `HUF` - Hungarian Forint -// - `IMP` - IMP -// - `ISK` - Icelandic Króna -// - `ISJ` - Icelandic Króna (1918–1981) -// - `INR` - Indian Rupee -// - `IDR` - Indonesian Rupiah -// - `IRR` - Iranian Rial -// - `IQD` - Iraqi Dinar -// - `IEP` - Irish Pound -// - `ILS` - Israeli New Shekel -// - `ILP` - Israeli Pound -// - `ILR` - Israeli Shekel (1980–1985) -// - `ITL` - Italian Lira -// - `JMD` - Jamaican Dollar -// - `JPY` - Japanese Yen -// - `JOD` - Jordanian Dinar -// - `KZT` - Kazakhstani Tenge -// - `KES` - Kenyan Shilling -// - `KWD` - Kuwaiti Dinar -// - `KGS` - Kyrgystani Som -// - `LAK` - Laotian Kip -// - `LVL` - Latvian Lats -// - `LVR` - Latvian Ruble -// - `LBP` - Lebanese Pound -// - `LSL` - Lesotho Loti -// - `LRD` - Liberian Dollar -// - `LYD` - Libyan Dinar -// - `LTL` - Lithuanian Litas -// - `LTT` - Lithuanian Talonas -// - `LUL` - Luxembourg Financial Franc -// - `LUC` - Luxembourgian Convertible Franc -// - `LUF` - Luxembourgian Franc -// - `MOP` - Macanese Pataca -// - `MKD` - Macedonian Denar -// - `MKN` - Macedonian Denar (1992–1993) -// - `MGA` - Malagasy Ariary -// - `MGF` - Malagasy Franc -// - `MWK` - Malawian Kwacha -// - `MYR` - Malaysian Ringgit -// - `MVR` - Maldivian Rufiyaa -// - `MVP` - Maldivian Rupee (1947–1981) -// - `MLF` - Malian Franc -// - `MTL` - Maltese Lira -// - `MTP` - Maltese Pound -// - `MRU` - Mauritanian Ouguiya -// - `MRO` - Mauritanian Ouguiya (1973–2017) -// - `MUR` - Mauritian Rupee -// - `MXV` - Mexican Investment Unit -// - `MXN` - Mexican Peso -// - `MXP` - Mexican Silver Peso (1861–1992) -// - `MDC` - Moldovan Cupon -// - `MDL` - Moldovan Leu -// - `MCF` - Monegasque Franc -// - `MNT` - Mongolian Tugrik -// - `MAD` - Moroccan Dirham -// - `MAF` - Moroccan Franc -// - `MZE` - Mozambican Escudo -// - `MZN` - Mozambican Metical -// - `MZM` - Mozambican Metical (1980–2006) -// - `MMK` - Myanmar Kyat -// - `NAD` - Namibian Dollar -// - `NPR` - Nepalese Rupee -// - `ANG` - Netherlands Antillean Guilder -// - `TWD` - New Taiwan Dollar -// - `NZD` - New Zealand Dollar -// - `NIO` - Nicaraguan Córdoba -// - `NIC` - Nicaraguan Córdoba (1988–1991) -// - `NGN` - Nigerian Naira -// - `KPW` - North Korean Won -// - `NOK` - Norwegian Krone -// - `OMR` - Omani Rial -// - `PKR` - Pakistani Rupee -// - `XPD` - Palladium -// - `PAB` - Panamanian Balboa -// - `PGK` - Papua New Guinean Kina -// - `PYG` - Paraguayan Guarani -// - `PEI` - Peruvian Inti -// - `PEN` - Peruvian Sol -// - `PES` - Peruvian Sol (1863–1965) -// - `PHP` - Philippine Peso -// - `XPT` - Platinum -// - `PLN` - Polish Zloty -// - `PLZ` - Polish Zloty (1950–1995) -// - `PTE` - Portuguese Escudo -// - `GWE` - Portuguese Guinea Escudo -// - `QAR` - Qatari Rial -// - `XRE` - RINET Funds -// - `RHD` - Rhodesian Dollar -// - `RON` - Romanian Leu -// - `ROL` - Romanian Leu (1952–2006) -// - `RUB` - Russian Ruble -// - `RUR` - Russian Ruble (1991–1998) -// - `RWF` - Rwandan Franc -// - `SVC` - Salvadoran Colón -// - `WST` - Samoan Tala -// - `SAR` - Saudi Riyal -// - `RSD` - Serbian Dinar -// - `CSD` - Serbian Dinar (2002–2006) -// - `SCR` - Seychellois Rupee -// - `SLL` - Sierra Leonean Leone -// - `XAG` - Silver -// - `SGD` - Singapore Dollar -// - `SKK` - Slovak Koruna -// - `SIT` - Slovenian Tolar -// - `SBD` - Solomon Islands Dollar -// - `SOS` - Somali Shilling -// - `ZAR` - South African Rand -// - `ZAL` - South African Rand (financial) -// - `KRH` - South Korean Hwan (1953–1962) -// - `KRW` - South Korean Won -// - `KRO` - South Korean Won (1945–1953) -// - `SSP` - South Sudanese Pound -// - `SUR` - Soviet Rouble -// - `ESP` - Spanish Peseta -// - `ESA` - Spanish Peseta (A account) -// - `ESB` - Spanish Peseta (convertible account) -// - `XDR` - Special Drawing Rights -// - `LKR` - Sri Lankan Rupee -// - `SHP` - St. Helena Pound -// - `XSU` - Sucre -// - `SDD` - Sudanese Dinar (1992–2007) -// - `SDG` - Sudanese Pound -// - `SDP` - Sudanese Pound (1957–1998) -// - `SRD` - Surinamese Dollar -// - `SRG` - Surinamese Guilder -// - `SZL` - Swazi Lilangeni -// - `SEK` - Swedish Krona -// - `CHF` - Swiss Franc -// - `SYP` - Syrian Pound -// - `STN` - São Tomé & Príncipe Dobra -// - `STD` - São Tomé & Príncipe Dobra (1977–2017) -// - `TVD` - TVD -// - `TJR` - Tajikistani Ruble -// - `TJS` - Tajikistani Somoni -// - `TZS` - Tanzanian Shilling -// - `XTS` - Testing Currency Code -// - `THB` - Thai Baht -// - `XXX` - The codes assigned for transactions where no currency is involved -// - `TPE` - Timorese Escudo -// - `TOP` - Tongan Paʻanga -// - `TTD` - Trinidad & Tobago Dollar -// - `TND` - Tunisian Dinar -// - `TRY` - Turkish Lira -// - `TRL` - Turkish Lira (1922–2005) -// - `TMT` - Turkmenistani Manat -// - `TMM` - Turkmenistani Manat (1993–2009) -// - `USD` - US Dollar -// - `USN` - US Dollar (Next day) -// - `USS` - US Dollar (Same day) -// - `UGX` - Ugandan Shilling -// - `UGS` - Ugandan Shilling (1966–1987) -// - `UAH` - Ukrainian Hryvnia -// - `UAK` - Ukrainian Karbovanets -// - `AED` - United Arab Emirates Dirham -// - `UYW` - Uruguayan Nominal Wage Index Unit -// - `UYU` - Uruguayan Peso -// - `UYP` - Uruguayan Peso (1975–1993) -// - `UYI` - Uruguayan Peso (Indexed Units) -// - `UZS` - Uzbekistani Som -// - `VUV` - Vanuatu Vatu -// - `VES` - Venezuelan Bolívar -// - `VEB` - Venezuelan Bolívar (1871–2008) -// - `VEF` - Venezuelan Bolívar (2008–2018) -// - `VND` - Vietnamese Dong -// - `VNN` - Vietnamese Dong (1978–1985) -// - `CHE` - WIR Euro -// - `CHW` - WIR Franc -// - `XOF` - West African CFA Franc -// - `YDD` - Yemeni Dinar -// - `YER` - Yemeni Rial -// - `YUN` - Yugoslavian Convertible Dinar (1990–1992) -// - `YUD` - Yugoslavian Hard Dinar (1966–1990) -// - `YUM` - Yugoslavian New Dinar (1994–2002) -// - `YUR` - Yugoslavian Reformed Dinar (1992–1993) -// - `ZWN` - ZWN -// - `ZRN` - Zairean New Zaire (1993–1998) -// - `ZRZ` - Zairean Zaire (1971–1993) -// - `ZMW` - Zambian Kwacha -// - `ZMK` - Zambian Kwacha (1968–2012) -// - `ZWD` - Zimbabwean Dollar (1980–2008) -// - `ZWR` - Zimbabwean Dollar (2008) -// - `ZWL` - Zimbabwean Dollar (2009) -type PurchaseOrderCurrency struct { - typeName string - TransactionCurrencyEnum TransactionCurrencyEnum - String string -} - -func NewPurchaseOrderCurrencyFromTransactionCurrencyEnum(value TransactionCurrencyEnum) *PurchaseOrderCurrency { - return &PurchaseOrderCurrency{typeName: "transactionCurrencyEnum", TransactionCurrencyEnum: value} -} - -func NewPurchaseOrderCurrencyFromString(value string) *PurchaseOrderCurrency { - return &PurchaseOrderCurrency{typeName: "string", String: value} -} +// The supplier, or customer involved in the project. +type ProjectContact struct { + String string + Contact *Contact -func (p *PurchaseOrderCurrency) UnmarshalJSON(data []byte) error { - var valueTransactionCurrencyEnum TransactionCurrencyEnum - if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { - p.typeName = "transactionCurrencyEnum" - p.TransactionCurrencyEnum = valueTransactionCurrencyEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" - p.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, p) + typ string } -func (p PurchaseOrderCurrency) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "transactionCurrencyEnum": - return json.Marshal(p.TransactionCurrencyEnum) - case "string": - return json.Marshal(p.String) +func (p *ProjectContact) GetString() string { + if p == nil { + return "" } + return p.String } -type PurchaseOrderCurrencyVisitor interface { - VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error - VisitString(string) error -} - -func (p *PurchaseOrderCurrency) Accept(visitor PurchaseOrderCurrencyVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "transactionCurrencyEnum": - return visitor.VisitTransactionCurrencyEnum(p.TransactionCurrencyEnum) - case "string": - return visitor.VisitString(p.String) +func (p *ProjectContact) GetContact() *Contact { + if p == nil { + return nil } + return p.Contact } -// The purchase order's delivery address. -type PurchaseOrderDeliveryAddress struct { - typeName string - String string - Address *Address -} - -func NewPurchaseOrderDeliveryAddressFromString(value string) *PurchaseOrderDeliveryAddress { - return &PurchaseOrderDeliveryAddress{typeName: "string", String: value} -} - -func NewPurchaseOrderDeliveryAddressFromAddress(value *Address) *PurchaseOrderDeliveryAddress { - return &PurchaseOrderDeliveryAddress{typeName: "address", Address: value} -} - -func (p *PurchaseOrderDeliveryAddress) UnmarshalJSON(data []byte) error { +func (p *ProjectContact) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" + p.typ = "String" p.String = valueString return nil } - valueAddress := new(Address) - if err := json.Unmarshal(data, &valueAddress); err == nil { - p.typeName = "address" - p.Address = valueAddress + valueContact := new(Contact) + if err := json.Unmarshal(data, &valueContact); err == nil { + p.typ = "Contact" + p.Contact = valueContact return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, p) } -func (p PurchaseOrderDeliveryAddress) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": +func (p ProjectContact) MarshalJSON() ([]byte, error) { + if p.typ == "String" || p.String != "" { return json.Marshal(p.String) - case "address": - return json.Marshal(p.Address) } + if p.typ == "Contact" || p.Contact != nil { + return json.Marshal(p.Contact) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) } -type PurchaseOrderDeliveryAddressVisitor interface { +type ProjectContactVisitor interface { VisitString(string) error - VisitAddress(*Address) error + VisitContact(*Contact) error } -func (p *PurchaseOrderDeliveryAddress) Accept(visitor PurchaseOrderDeliveryAddressVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": +func (p *ProjectContact) Accept(visitor ProjectContactVisitor) error { + if p.typ == "String" || p.String != "" { return visitor.VisitString(p.String) - case "address": - return visitor.VisitAddress(p.Address) } + if p.typ == "Contact" || p.Contact != nil { + return visitor.VisitContact(p.Contact) + } + return fmt.Errorf("type %T does not include a non-empty union type", p) } -// # The PurchaseOrderLineItem Object -// +// # The PurchaseOrder Object // ### Description +// A `PurchaseOrder` represents a request to purchase goods or services from a vendor. It outlines the details of the purchase, such as the items or services requested, quantities, prices, and delivery details. // -// The `PurchaseOrderLineItem` object is used to represent a purchase order's line item. +// A `PurchaseOrder` is a crucial component of the procurement process, but does not typically result in any impact on the company’s general ledger. The general ledger is typically only affected when the `PurchaseOrder` is fulfilled as an *Accounts Payable* `Invoice` object (also known as a Bill). // // ### Usage Example -// -// Fetch from the `GET PurchaseOrder` endpoint and view a company's purchase orders. -type PurchaseOrderLineItem struct { - Id *string `json:"id,omitempty"` +// Fetch from the `LIST PurchaseOrders` endpoint and view a company's purchase orders. +type PurchaseOrder struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // A description of the good being purchased. - Description *string `json:"description,omitempty"` - // The line item's unit price. - UnitPrice *float64 `json:"unit_price,omitempty"` - // The line item's quantity. - Quantity *float64 `json:"quantity,omitempty"` - Item *PurchaseOrderLineItemItem `json:"item,omitempty"` - // The purchase order line item's account. - Account *string `json:"account,omitempty"` - // The purchase order line item's associated tracking category. - TrackingCategory *string `json:"tracking_category,omitempty"` - // The purchase order line item's associated tracking categories. - TrackingCategories []*string `json:"tracking_categories,omitempty"` - // The purchase order line item's tax amount. - TaxAmount *string `json:"tax_amount,omitempty"` - // The purchase order line item's total amount. - TotalLineAmount *string `json:"total_line_amount,omitempty"` - // The purchase order line item's currency. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The purchase order's status. // - // - `XUA` - ADB Unit of Account - // - `AFN` - Afghan Afghani - // - `AFA` - Afghan Afghani (1927–2002) - // - `ALL` - Albanian Lek - // - `ALK` - Albanian Lek (1946–1965) - // - `DZD` - Algerian Dinar - // - `ADP` - Andorran Peseta - // - `AOA` - Angolan Kwanza - // - `AOK` - Angolan Kwanza (1977–1991) - // - `AON` - Angolan New Kwanza (1990–2000) - // - `AOR` - Angolan Readjusted Kwanza (1995–1999) - // - `ARA` - Argentine Austral - // - `ARS` - Argentine Peso - // - `ARM` - Argentine Peso (1881–1970) - // - `ARP` - Argentine Peso (1983–1985) - // - `ARL` - Argentine Peso Ley (1970–1983) - // - `AMD` - Armenian Dram - // - `AWG` - Aruban Florin - // - `AUD` - Australian Dollar - // - `ATS` - Austrian Schilling - // - `AZN` - Azerbaijani Manat - // - `AZM` - Azerbaijani Manat (1993–2006) - // - `BSD` - Bahamian Dollar - // - `BHD` - Bahraini Dinar - // - `BDT` - Bangladeshi Taka - // - `BBD` - Barbadian Dollar - // - `BYN` - Belarusian Ruble - // - `BYB` - Belarusian Ruble (1994–1999) - // - `BYR` - Belarusian Ruble (2000–2016) - // - `BEF` - Belgian Franc - // - `BEC` - Belgian Franc (convertible) - // - `BEL` - Belgian Franc (financial) - // - `BZD` - Belize Dollar - // - `BMD` - Bermudan Dollar - // - `BTN` - Bhutanese Ngultrum - // - `BOB` - Bolivian Boliviano - // - `BOL` - Bolivian Boliviano (1863–1963) - // - `BOV` - Bolivian Mvdol - // - `BOP` - Bolivian Peso - // - `BAM` - Bosnia-Herzegovina Convertible Mark - // - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - // - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - // - `BWP` - Botswanan Pula - // - `BRC` - Brazilian Cruzado (1986–1989) - // - `BRZ` - Brazilian Cruzeiro (1942–1967) - // - `BRE` - Brazilian Cruzeiro (1990–1993) - // - `BRR` - Brazilian Cruzeiro (1993–1994) - // - `BRN` - Brazilian New Cruzado (1989–1990) - // - `BRB` - Brazilian New Cruzeiro (1967–1986) - // - `BRL` - Brazilian Real - // - `GBP` - British Pound - // - `BND` - Brunei Dollar - // - `BGL` - Bulgarian Hard Lev - // - `BGN` - Bulgarian Lev - // - `BGO` - Bulgarian Lev (1879–1952) - // - `BGM` - Bulgarian Socialist Lev - // - `BUK` - Burmese Kyat - // - `BIF` - Burundian Franc - // - `XPF` - CFP Franc - // - `KHR` - Cambodian Riel - // - `CAD` - Canadian Dollar - // - `CVE` - Cape Verdean Escudo - // - `KYD` - Cayman Islands Dollar - // - `XAF` - Central African CFA Franc - // - `CLE` - Chilean Escudo - // - `CLP` - Chilean Peso - // - `CLF` - Chilean Unit of Account (UF) - // - `CNX` - Chinese People’s Bank Dollar - // - `CNY` - Chinese Yuan - // - `CNH` - Chinese Yuan (offshore) - // - `COP` - Colombian Peso - // - `COU` - Colombian Real Value Unit - // - `KMF` - Comorian Franc - // - `CDF` - Congolese Franc - // - `CRC` - Costa Rican Colón - // - `HRD` - Croatian Dinar - // - `HRK` - Croatian Kuna - // - `CUC` - Cuban Convertible Peso - // - `CUP` - Cuban Peso - // - `CYP` - Cypriot Pound - // - `CZK` - Czech Koruna - // - `CSK` - Czechoslovak Hard Koruna - // - `DKK` - Danish Krone - // - `DJF` - Djiboutian Franc - // - `DOP` - Dominican Peso - // - `NLG` - Dutch Guilder - // - `XCD` - East Caribbean Dollar - // - `DDM` - East German Mark - // - `ECS` - Ecuadorian Sucre - // - `ECV` - Ecuadorian Unit of Constant Value - // - `EGP` - Egyptian Pound - // - `GQE` - Equatorial Guinean Ekwele - // - `ERN` - Eritrean Nakfa - // - `EEK` - Estonian Kroon - // - `ETB` - Ethiopian Birr - // - `EUR` - Euro - // - `XBA` - European Composite Unit - // - `XEU` - European Currency Unit - // - `XBB` - European Monetary Unit - // - `XBC` - European Unit of Account (XBC) - // - `XBD` - European Unit of Account (XBD) - // - `FKP` - Falkland Islands Pound - // - `FJD` - Fijian Dollar - // - `FIM` - Finnish Markka - // - `FRF` - French Franc - // - `XFO` - French Gold Franc - // - `XFU` - French UIC-Franc - // - `GMD` - Gambian Dalasi - // - `GEK` - Georgian Kupon Larit - // - `GEL` - Georgian Lari - // - `DEM` - German Mark - // - `GHS` - Ghanaian Cedi - // - `GHC` - Ghanaian Cedi (1979–2007) - // - `GIP` - Gibraltar Pound - // - `XAU` - Gold - // - `GRD` - Greek Drachma - // - `GTQ` - Guatemalan Quetzal - // - `GWP` - Guinea-Bissau Peso - // - `GNF` - Guinean Franc - // - `GNS` - Guinean Syli - // - `GYD` - Guyanaese Dollar - // - `HTG` - Haitian Gourde - // - `HNL` - Honduran Lempira - // - `HKD` - Hong Kong Dollar - // - `HUF` - Hungarian Forint - // - `IMP` - IMP - // - `ISK` - Icelandic Króna - // - `ISJ` - Icelandic Króna (1918–1981) - // - `INR` - Indian Rupee - // - `IDR` - Indonesian Rupiah - // - `IRR` - Iranian Rial - // - `IQD` - Iraqi Dinar - // - `IEP` - Irish Pound - // - `ILS` - Israeli New Shekel - // - `ILP` - Israeli Pound - // - `ILR` - Israeli Shekel (1980–1985) - // - `ITL` - Italian Lira - // - `JMD` - Jamaican Dollar - // - `JPY` - Japanese Yen - // - `JOD` - Jordanian Dinar - // - `KZT` - Kazakhstani Tenge - // - `KES` - Kenyan Shilling - // - `KWD` - Kuwaiti Dinar - // - `KGS` - Kyrgystani Som - // - `LAK` - Laotian Kip - // - `LVL` - Latvian Lats - // - `LVR` - Latvian Ruble - // - `LBP` - Lebanese Pound - // - `LSL` - Lesotho Loti - // - `LRD` - Liberian Dollar - // - `LYD` - Libyan Dinar - // - `LTL` - Lithuanian Litas - // - `LTT` - Lithuanian Talonas - // - `LUL` - Luxembourg Financial Franc - // - `LUC` - Luxembourgian Convertible Franc - // - `LUF` - Luxembourgian Franc - // - `MOP` - Macanese Pataca - // - `MKD` - Macedonian Denar - // - `MKN` - Macedonian Denar (1992–1993) - // - `MGA` - Malagasy Ariary - // - `MGF` - Malagasy Franc - // - `MWK` - Malawian Kwacha - // - `MYR` - Malaysian Ringgit - // - `MVR` - Maldivian Rufiyaa - // - `MVP` - Maldivian Rupee (1947–1981) - // - `MLF` - Malian Franc - // - `MTL` - Maltese Lira - // - `MTP` - Maltese Pound - // - `MRU` - Mauritanian Ouguiya - // - `MRO` - Mauritanian Ouguiya (1973–2017) - // - `MUR` - Mauritian Rupee - // - `MXV` - Mexican Investment Unit - // - `MXN` - Mexican Peso - // - `MXP` - Mexican Silver Peso (1861–1992) - // - `MDC` - Moldovan Cupon - // - `MDL` - Moldovan Leu - // - `MCF` - Monegasque Franc - // - `MNT` - Mongolian Tugrik - // - `MAD` - Moroccan Dirham - // - `MAF` - Moroccan Franc - // - `MZE` - Mozambican Escudo - // - `MZN` - Mozambican Metical - // - `MZM` - Mozambican Metical (1980–2006) - // - `MMK` - Myanmar Kyat - // - `NAD` - Namibian Dollar - // - `NPR` - Nepalese Rupee - // - `ANG` - Netherlands Antillean Guilder - // - `TWD` - New Taiwan Dollar - // - `NZD` - New Zealand Dollar - // - `NIO` - Nicaraguan Córdoba - // - `NIC` - Nicaraguan Córdoba (1988–1991) - // - `NGN` - Nigerian Naira - // - `KPW` - North Korean Won - // - `NOK` - Norwegian Krone - // - `OMR` - Omani Rial - // - `PKR` - Pakistani Rupee - // - `XPD` - Palladium - // - `PAB` - Panamanian Balboa - // - `PGK` - Papua New Guinean Kina - // - `PYG` - Paraguayan Guarani - // - `PEI` - Peruvian Inti - // - `PEN` - Peruvian Sol - // - `PES` - Peruvian Sol (1863–1965) - // - `PHP` - Philippine Peso - // - `XPT` - Platinum - // - `PLN` - Polish Zloty - // - `PLZ` - Polish Zloty (1950–1995) - // - `PTE` - Portuguese Escudo - // - `GWE` - Portuguese Guinea Escudo - // - `QAR` - Qatari Rial - // - `XRE` - RINET Funds - // - `RHD` - Rhodesian Dollar - // - `RON` - Romanian Leu - // - `ROL` - Romanian Leu (1952–2006) - // - `RUB` - Russian Ruble - // - `RUR` - Russian Ruble (1991–1998) - // - `RWF` - Rwandan Franc - // - `SVC` - Salvadoran Colón - // - `WST` - Samoan Tala - // - `SAR` - Saudi Riyal - // - `RSD` - Serbian Dinar - // - `CSD` - Serbian Dinar (2002–2006) - // - `SCR` - Seychellois Rupee - // - `SLL` - Sierra Leonean Leone - // - `XAG` - Silver - // - `SGD` - Singapore Dollar - // - `SKK` - Slovak Koruna - // - `SIT` - Slovenian Tolar - // - `SBD` - Solomon Islands Dollar - // - `SOS` - Somali Shilling - // - `ZAR` - South African Rand - // - `ZAL` - South African Rand (financial) - // - `KRH` - South Korean Hwan (1953–1962) - // - `KRW` - South Korean Won - // - `KRO` - South Korean Won (1945–1953) - // - `SSP` - South Sudanese Pound - // - `SUR` - Soviet Rouble - // - `ESP` - Spanish Peseta - // - `ESA` - Spanish Peseta (A account) - // - `ESB` - Spanish Peseta (convertible account) - // - `XDR` - Special Drawing Rights - // - `LKR` - Sri Lankan Rupee - // - `SHP` - St. Helena Pound - // - `XSU` - Sucre - // - `SDD` - Sudanese Dinar (1992–2007) - // - `SDG` - Sudanese Pound - // - `SDP` - Sudanese Pound (1957–1998) - // - `SRD` - Surinamese Dollar - // - `SRG` - Surinamese Guilder - // - `SZL` - Swazi Lilangeni - // - `SEK` - Swedish Krona - // - `CHF` - Swiss Franc - // - `SYP` - Syrian Pound - // - `STN` - São Tomé & Príncipe Dobra - // - `STD` - São Tomé & Príncipe Dobra (1977–2017) - // - `TVD` - TVD - // - `TJR` - Tajikistani Ruble - // - `TJS` - Tajikistani Somoni - // - `TZS` - Tanzanian Shilling - // - `XTS` - Testing Currency Code - // - `THB` - Thai Baht - // - `XXX` - The codes assigned for transactions where no currency is involved - // - `TPE` - Timorese Escudo - // - `TOP` - Tongan Paʻanga - // - `TTD` - Trinidad & Tobago Dollar - // - `TND` - Tunisian Dinar - // - `TRY` - Turkish Lira - // - `TRL` - Turkish Lira (1922–2005) - // - `TMT` - Turkmenistani Manat - // - `TMM` - Turkmenistani Manat (1993–2009) - // - `USD` - US Dollar - // - `USN` - US Dollar (Next day) - // - `USS` - US Dollar (Same day) - // - `UGX` - Ugandan Shilling - // - `UGS` - Ugandan Shilling (1966–1987) - // - `UAH` - Ukrainian Hryvnia - // - `UAK` - Ukrainian Karbovanets - // - `AED` - United Arab Emirates Dirham - // - `UYW` - Uruguayan Nominal Wage Index Unit - // - `UYU` - Uruguayan Peso - // - `UYP` - Uruguayan Peso (1975–1993) - // - `UYI` - Uruguayan Peso (Indexed Units) - // - `UZS` - Uzbekistani Som - // - `VUV` - Vanuatu Vatu - // - `VES` - Venezuelan Bolívar - // - `VEB` - Venezuelan Bolívar (1871–2008) - // - `VEF` - Venezuelan Bolívar (2008–2018) - // - `VND` - Vietnamese Dong - // - `VNN` - Vietnamese Dong (1978–1985) - // - `CHE` - WIR Euro - // - `CHW` - WIR Franc - // - `XOF` - West African CFA Franc - // - `YDD` - Yemeni Dinar - // - `YER` - Yemeni Rial - // - `YUN` - Yugoslavian Convertible Dinar (1990–1992) - // - `YUD` - Yugoslavian Hard Dinar (1966–1990) - // - `YUM` - Yugoslavian New Dinar (1994–2002) - // - `YUR` - Yugoslavian Reformed Dinar (1992–1993) - // - `ZWN` - ZWN - // - `ZRN` - Zairean New Zaire (1993–1998) - // - `ZRZ` - Zairean Zaire (1971–1993) - // - `ZMW` - Zambian Kwacha - // - `ZMK` - Zambian Kwacha (1968–2012) - // - `ZWD` - Zimbabwean Dollar (1980–2008) - // - `ZWR` - Zimbabwean Dollar (2008) - // - `ZWL` - Zimbabwean Dollar (2009) - Currency *PurchaseOrderLineItemCurrency `json:"currency,omitempty"` - // The tax rate that applies to this line item. - TaxRate *string `json:"tax_rate,omitempty"` - // The purchase order line item's exchange rate. - ExchangeRate *string `json:"exchange_rate,omitempty"` - // The company the purchase order line item belongs to. - Company *string `json:"company,omitempty"` + // * `DRAFT` - DRAFT + // * `SUBMITTED` - SUBMITTED + // * `AUTHORIZED` - AUTHORIZED + // * `BILLED` - BILLED + // * `DELETED` - DELETED + Status *PurchaseOrderStatus `json:"status,omitempty" url:"status,omitempty"` + // The purchase order's issue date. + IssueDate *time.Time `json:"issue_date,omitempty" url:"issue_date,omitempty"` + // The human-readable number of the purchase order. + PurchaseOrderNumber *string `json:"purchase_order_number,omitempty" url:"purchase_order_number,omitempty"` + // The purchase order's delivery date. + DeliveryDate *time.Time `json:"delivery_date,omitempty" url:"delivery_date,omitempty"` + // The purchase order's delivery address. + DeliveryAddress *PurchaseOrderDeliveryAddress `json:"delivery_address,omitempty" url:"delivery_address,omitempty"` + // The contact making the purchase order. + Customer *string `json:"customer,omitempty" url:"customer,omitempty"` + // The party fulfilling the purchase order. + Vendor *PurchaseOrderVendor `json:"vendor,omitempty" url:"vendor,omitempty"` + // A memo attached to the purchase order. + Memo *string `json:"memo,omitempty" url:"memo,omitempty"` + // The company the purchase order belongs to. + Company *PurchaseOrderCompany `json:"company,omitempty" url:"company,omitempty"` + // The purchase order's total amount. + TotalAmount *float64 `json:"total_amount,omitempty" url:"total_amount,omitempty"` + // The purchase order's currency. + // + // * `XUA` - ADB Unit of Account + // * `AFN` - Afghan Afghani + // * `AFA` - Afghan Afghani (1927–2002) + // * `ALL` - Albanian Lek + // * `ALK` - Albanian Lek (1946–1965) + // * `DZD` - Algerian Dinar + // * `ADP` - Andorran Peseta + // * `AOA` - Angolan Kwanza + // * `AOK` - Angolan Kwanza (1977–1991) + // * `AON` - Angolan New Kwanza (1990–2000) + // * `AOR` - Angolan Readjusted Kwanza (1995–1999) + // * `ARA` - Argentine Austral + // * `ARS` - Argentine Peso + // * `ARM` - Argentine Peso (1881–1970) + // * `ARP` - Argentine Peso (1983–1985) + // * `ARL` - Argentine Peso Ley (1970–1983) + // * `AMD` - Armenian Dram + // * `AWG` - Aruban Florin + // * `AUD` - Australian Dollar + // * `ATS` - Austrian Schilling + // * `AZN` - Azerbaijani Manat + // * `AZM` - Azerbaijani Manat (1993–2006) + // * `BSD` - Bahamian Dollar + // * `BHD` - Bahraini Dinar + // * `BDT` - Bangladeshi Taka + // * `BBD` - Barbadian Dollar + // * `BYN` - Belarusian Ruble + // * `BYB` - Belarusian Ruble (1994–1999) + // * `BYR` - Belarusian Ruble (2000–2016) + // * `BEF` - Belgian Franc + // * `BEC` - Belgian Franc (convertible) + // * `BEL` - Belgian Franc (financial) + // * `BZD` - Belize Dollar + // * `BMD` - Bermudan Dollar + // * `BTN` - Bhutanese Ngultrum + // * `BOB` - Bolivian Boliviano + // * `BOL` - Bolivian Boliviano (1863–1963) + // * `BOV` - Bolivian Mvdol + // * `BOP` - Bolivian Peso + // * `BAM` - Bosnia-Herzegovina Convertible Mark + // * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + // * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + // * `BWP` - Botswanan Pula + // * `BRC` - Brazilian Cruzado (1986–1989) + // * `BRZ` - Brazilian Cruzeiro (1942–1967) + // * `BRE` - Brazilian Cruzeiro (1990–1993) + // * `BRR` - Brazilian Cruzeiro (1993–1994) + // * `BRN` - Brazilian New Cruzado (1989–1990) + // * `BRB` - Brazilian New Cruzeiro (1967–1986) + // * `BRL` - Brazilian Real + // * `GBP` - British Pound + // * `BND` - Brunei Dollar + // * `BGL` - Bulgarian Hard Lev + // * `BGN` - Bulgarian Lev + // * `BGO` - Bulgarian Lev (1879–1952) + // * `BGM` - Bulgarian Socialist Lev + // * `BUK` - Burmese Kyat + // * `BIF` - Burundian Franc + // * `XPF` - CFP Franc + // * `KHR` - Cambodian Riel + // * `CAD` - Canadian Dollar + // * `CVE` - Cape Verdean Escudo + // * `KYD` - Cayman Islands Dollar + // * `XAF` - Central African CFA Franc + // * `CLE` - Chilean Escudo + // * `CLP` - Chilean Peso + // * `CLF` - Chilean Unit of Account (UF) + // * `CNX` - Chinese People’s Bank Dollar + // * `CNY` - Chinese Yuan + // * `CNH` - Chinese Yuan (offshore) + // * `COP` - Colombian Peso + // * `COU` - Colombian Real Value Unit + // * `KMF` - Comorian Franc + // * `CDF` - Congolese Franc + // * `CRC` - Costa Rican Colón + // * `HRD` - Croatian Dinar + // * `HRK` - Croatian Kuna + // * `CUC` - Cuban Convertible Peso + // * `CUP` - Cuban Peso + // * `CYP` - Cypriot Pound + // * `CZK` - Czech Koruna + // * `CSK` - Czechoslovak Hard Koruna + // * `DKK` - Danish Krone + // * `DJF` - Djiboutian Franc + // * `DOP` - Dominican Peso + // * `NLG` - Dutch Guilder + // * `XCD` - East Caribbean Dollar + // * `DDM` - East German Mark + // * `ECS` - Ecuadorian Sucre + // * `ECV` - Ecuadorian Unit of Constant Value + // * `EGP` - Egyptian Pound + // * `GQE` - Equatorial Guinean Ekwele + // * `ERN` - Eritrean Nakfa + // * `EEK` - Estonian Kroon + // * `ETB` - Ethiopian Birr + // * `EUR` - Euro + // * `XBA` - European Composite Unit + // * `XEU` - European Currency Unit + // * `XBB` - European Monetary Unit + // * `XBC` - European Unit of Account (XBC) + // * `XBD` - European Unit of Account (XBD) + // * `FKP` - Falkland Islands Pound + // * `FJD` - Fijian Dollar + // * `FIM` - Finnish Markka + // * `FRF` - French Franc + // * `XFO` - French Gold Franc + // * `XFU` - French UIC-Franc + // * `GMD` - Gambian Dalasi + // * `GEK` - Georgian Kupon Larit + // * `GEL` - Georgian Lari + // * `DEM` - German Mark + // * `GHS` - Ghanaian Cedi + // * `GHC` - Ghanaian Cedi (1979–2007) + // * `GIP` - Gibraltar Pound + // * `XAU` - Gold + // * `GRD` - Greek Drachma + // * `GTQ` - Guatemalan Quetzal + // * `GWP` - Guinea-Bissau Peso + // * `GNF` - Guinean Franc + // * `GNS` - Guinean Syli + // * `GYD` - Guyanaese Dollar + // * `HTG` - Haitian Gourde + // * `HNL` - Honduran Lempira + // * `HKD` - Hong Kong Dollar + // * `HUF` - Hungarian Forint + // * `IMP` - IMP + // * `ISK` - Icelandic Króna + // * `ISJ` - Icelandic Króna (1918–1981) + // * `INR` - Indian Rupee + // * `IDR` - Indonesian Rupiah + // * `IRR` - Iranian Rial + // * `IQD` - Iraqi Dinar + // * `IEP` - Irish Pound + // * `ILS` - Israeli New Shekel + // * `ILP` - Israeli Pound + // * `ILR` - Israeli Shekel (1980–1985) + // * `ITL` - Italian Lira + // * `JMD` - Jamaican Dollar + // * `JPY` - Japanese Yen + // * `JOD` - Jordanian Dinar + // * `KZT` - Kazakhstani Tenge + // * `KES` - Kenyan Shilling + // * `KWD` - Kuwaiti Dinar + // * `KGS` - Kyrgystani Som + // * `LAK` - Laotian Kip + // * `LVL` - Latvian Lats + // * `LVR` - Latvian Ruble + // * `LBP` - Lebanese Pound + // * `LSL` - Lesotho Loti + // * `LRD` - Liberian Dollar + // * `LYD` - Libyan Dinar + // * `LTL` - Lithuanian Litas + // * `LTT` - Lithuanian Talonas + // * `LUL` - Luxembourg Financial Franc + // * `LUC` - Luxembourgian Convertible Franc + // * `LUF` - Luxembourgian Franc + // * `MOP` - Macanese Pataca + // * `MKD` - Macedonian Denar + // * `MKN` - Macedonian Denar (1992–1993) + // * `MGA` - Malagasy Ariary + // * `MGF` - Malagasy Franc + // * `MWK` - Malawian Kwacha + // * `MYR` - Malaysian Ringgit + // * `MVR` - Maldivian Rufiyaa + // * `MVP` - Maldivian Rupee (1947–1981) + // * `MLF` - Malian Franc + // * `MTL` - Maltese Lira + // * `MTP` - Maltese Pound + // * `MRU` - Mauritanian Ouguiya + // * `MRO` - Mauritanian Ouguiya (1973–2017) + // * `MUR` - Mauritian Rupee + // * `MXV` - Mexican Investment Unit + // * `MXN` - Mexican Peso + // * `MXP` - Mexican Silver Peso (1861–1992) + // * `MDC` - Moldovan Cupon + // * `MDL` - Moldovan Leu + // * `MCF` - Monegasque Franc + // * `MNT` - Mongolian Tugrik + // * `MAD` - Moroccan Dirham + // * `MAF` - Moroccan Franc + // * `MZE` - Mozambican Escudo + // * `MZN` - Mozambican Metical + // * `MZM` - Mozambican Metical (1980–2006) + // * `MMK` - Myanmar Kyat + // * `NAD` - Namibian Dollar + // * `NPR` - Nepalese Rupee + // * `ANG` - Netherlands Antillean Guilder + // * `TWD` - New Taiwan Dollar + // * `NZD` - New Zealand Dollar + // * `NIO` - Nicaraguan Córdoba + // * `NIC` - Nicaraguan Córdoba (1988–1991) + // * `NGN` - Nigerian Naira + // * `KPW` - North Korean Won + // * `NOK` - Norwegian Krone + // * `OMR` - Omani Rial + // * `PKR` - Pakistani Rupee + // * `XPD` - Palladium + // * `PAB` - Panamanian Balboa + // * `PGK` - Papua New Guinean Kina + // * `PYG` - Paraguayan Guarani + // * `PEI` - Peruvian Inti + // * `PEN` - Peruvian Sol + // * `PES` - Peruvian Sol (1863–1965) + // * `PHP` - Philippine Peso + // * `XPT` - Platinum + // * `PLN` - Polish Zloty + // * `PLZ` - Polish Zloty (1950–1995) + // * `PTE` - Portuguese Escudo + // * `GWE` - Portuguese Guinea Escudo + // * `QAR` - Qatari Rial + // * `XRE` - RINET Funds + // * `RHD` - Rhodesian Dollar + // * `RON` - Romanian Leu + // * `ROL` - Romanian Leu (1952–2006) + // * `RUB` - Russian Ruble + // * `RUR` - Russian Ruble (1991–1998) + // * `RWF` - Rwandan Franc + // * `SVC` - Salvadoran Colón + // * `WST` - Samoan Tala + // * `SAR` - Saudi Riyal + // * `RSD` - Serbian Dinar + // * `CSD` - Serbian Dinar (2002–2006) + // * `SCR` - Seychellois Rupee + // * `SLL` - Sierra Leonean Leone + // * `XAG` - Silver + // * `SGD` - Singapore Dollar + // * `SKK` - Slovak Koruna + // * `SIT` - Slovenian Tolar + // * `SBD` - Solomon Islands Dollar + // * `SOS` - Somali Shilling + // * `ZAR` - South African Rand + // * `ZAL` - South African Rand (financial) + // * `KRH` - South Korean Hwan (1953–1962) + // * `KRW` - South Korean Won + // * `KRO` - South Korean Won (1945–1953) + // * `SSP` - South Sudanese Pound + // * `SUR` - Soviet Rouble + // * `ESP` - Spanish Peseta + // * `ESA` - Spanish Peseta (A account) + // * `ESB` - Spanish Peseta (convertible account) + // * `XDR` - Special Drawing Rights + // * `LKR` - Sri Lankan Rupee + // * `SHP` - St. Helena Pound + // * `XSU` - Sucre + // * `SDD` - Sudanese Dinar (1992–2007) + // * `SDG` - Sudanese Pound + // * `SDP` - Sudanese Pound (1957–1998) + // * `SRD` - Surinamese Dollar + // * `SRG` - Surinamese Guilder + // * `SZL` - Swazi Lilangeni + // * `SEK` - Swedish Krona + // * `CHF` - Swiss Franc + // * `SYP` - Syrian Pound + // * `STN` - São Tomé & Príncipe Dobra + // * `STD` - São Tomé & Príncipe Dobra (1977–2017) + // * `TVD` - TVD + // * `TJR` - Tajikistani Ruble + // * `TJS` - Tajikistani Somoni + // * `TZS` - Tanzanian Shilling + // * `XTS` - Testing Currency Code + // * `THB` - Thai Baht + // * `XXX` - The codes assigned for transactions where no currency is involved + // * `TPE` - Timorese Escudo + // * `TOP` - Tongan Paʻanga + // * `TTD` - Trinidad & Tobago Dollar + // * `TND` - Tunisian Dinar + // * `TRY` - Turkish Lira + // * `TRL` - Turkish Lira (1922–2005) + // * `TMT` - Turkmenistani Manat + // * `TMM` - Turkmenistani Manat (1993–2009) + // * `USD` - US Dollar + // * `USN` - US Dollar (Next day) + // * `USS` - US Dollar (Same day) + // * `UGX` - Ugandan Shilling + // * `UGS` - Ugandan Shilling (1966–1987) + // * `UAH` - Ukrainian Hryvnia + // * `UAK` - Ukrainian Karbovanets + // * `AED` - United Arab Emirates Dirham + // * `UYW` - Uruguayan Nominal Wage Index Unit + // * `UYU` - Uruguayan Peso + // * `UYP` - Uruguayan Peso (1975–1993) + // * `UYI` - Uruguayan Peso (Indexed Units) + // * `UZS` - Uzbekistani Som + // * `VUV` - Vanuatu Vatu + // * `VES` - Venezuelan Bolívar + // * `VEB` - Venezuelan Bolívar (1871–2008) + // * `VEF` - Venezuelan Bolívar (2008–2018) + // * `VND` - Vietnamese Dong + // * `VNN` - Vietnamese Dong (1978–1985) + // * `CHE` - WIR Euro + // * `CHW` - WIR Franc + // * `XOF` - West African CFA Franc + // * `YDD` - Yemeni Dinar + // * `YER` - Yemeni Rial + // * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + // * `YUD` - Yugoslavian Hard Dinar (1966–1990) + // * `YUM` - Yugoslavian New Dinar (1994–2002) + // * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + // * `ZWN` - ZWN + // * `ZRN` - Zairean New Zaire (1993–1998) + // * `ZRZ` - Zairean Zaire (1971–1993) + // * `ZMW` - Zambian Kwacha + // * `ZMK` - Zambian Kwacha (1968–2012) + // * `ZWD` - Zimbabwean Dollar (1980–2008) + // * `ZWR` - Zimbabwean Dollar (2008) + // * `ZWL` - Zimbabwean Dollar (2009) + Currency *PurchaseOrderCurrency `json:"currency,omitempty" url:"currency,omitempty"` + // The purchase order's exchange rate. + ExchangeRate *string `json:"exchange_rate,omitempty" url:"exchange_rate,omitempty"` + // The payment term that applies to this transaction. + PaymentTerm *PurchaseOrderPaymentTerm `json:"payment_term,omitempty" url:"payment_term,omitempty"` + LineItems []*PurchaseOrderLineItem `json:"line_items,omitempty" url:"line_items,omitempty"` + // If the transaction is inclusive or exclusive of tax. `True` if inclusive, `False` if exclusive. + InclusiveOfTax *bool `json:"inclusive_of_tax,omitempty" url:"inclusive_of_tax,omitempty"` + TrackingCategories []*PurchaseOrderTrackingCategoriesItem `json:"tracking_categories,omitempty" url:"tracking_categories,omitempty"` + // The accounting period that the PurchaseOrder was generated in. + AccountingPeriod *PurchaseOrderAccountingPeriod `json:"accounting_period,omitempty" url:"accounting_period,omitempty"` + // When the third party's purchase order note was created. + RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty" url:"remote_created_at,omitempty"` + // When the third party's purchase order note was updated. + RemoteUpdatedAt *time.Time `json:"remote_updated_at,omitempty" url:"remote_updated_at,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - RemoteFields []*RemoteField `json:"remote_fields,omitempty"` + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + RemoteFields []*RemoteField `json:"remote_fields,omitempty" url:"remote_fields,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (p *PurchaseOrderLineItem) UnmarshalJSON(data []byte) error { - type unmarshaler PurchaseOrderLineItem - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (p *PurchaseOrder) GetId() *string { + if p == nil { + return nil } - *p = PurchaseOrderLineItem(value) - p._rawJSON = json.RawMessage(data) - return nil + return p.Id } -func (p *PurchaseOrderLineItem) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value +func (p *PurchaseOrder) GetRemoteId() *string { + if p == nil { + return nil } - return fmt.Sprintf("%#v", p) + return p.RemoteId } -// The purchase order line item's currency. -// -// - `XUA` - ADB Unit of Account -// - `AFN` - Afghan Afghani -// - `AFA` - Afghan Afghani (1927–2002) -// - `ALL` - Albanian Lek -// - `ALK` - Albanian Lek (1946–1965) -// - `DZD` - Algerian Dinar -// - `ADP` - Andorran Peseta -// - `AOA` - Angolan Kwanza -// - `AOK` - Angolan Kwanza (1977–1991) -// - `AON` - Angolan New Kwanza (1990–2000) -// - `AOR` - Angolan Readjusted Kwanza (1995–1999) -// - `ARA` - Argentine Austral -// - `ARS` - Argentine Peso -// - `ARM` - Argentine Peso (1881–1970) -// - `ARP` - Argentine Peso (1983–1985) -// - `ARL` - Argentine Peso Ley (1970–1983) -// - `AMD` - Armenian Dram -// - `AWG` - Aruban Florin -// - `AUD` - Australian Dollar -// - `ATS` - Austrian Schilling -// - `AZN` - Azerbaijani Manat -// - `AZM` - Azerbaijani Manat (1993–2006) -// - `BSD` - Bahamian Dollar -// - `BHD` - Bahraini Dinar -// - `BDT` - Bangladeshi Taka -// - `BBD` - Barbadian Dollar -// - `BYN` - Belarusian Ruble -// - `BYB` - Belarusian Ruble (1994–1999) -// - `BYR` - Belarusian Ruble (2000–2016) -// - `BEF` - Belgian Franc -// - `BEC` - Belgian Franc (convertible) -// - `BEL` - Belgian Franc (financial) -// - `BZD` - Belize Dollar -// - `BMD` - Bermudan Dollar -// - `BTN` - Bhutanese Ngultrum -// - `BOB` - Bolivian Boliviano -// - `BOL` - Bolivian Boliviano (1863–1963) -// - `BOV` - Bolivian Mvdol -// - `BOP` - Bolivian Peso -// - `BAM` - Bosnia-Herzegovina Convertible Mark -// - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) -// - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) -// - `BWP` - Botswanan Pula -// - `BRC` - Brazilian Cruzado (1986–1989) -// - `BRZ` - Brazilian Cruzeiro (1942–1967) -// - `BRE` - Brazilian Cruzeiro (1990–1993) -// - `BRR` - Brazilian Cruzeiro (1993–1994) -// - `BRN` - Brazilian New Cruzado (1989–1990) -// - `BRB` - Brazilian New Cruzeiro (1967–1986) -// - `BRL` - Brazilian Real -// - `GBP` - British Pound -// - `BND` - Brunei Dollar -// - `BGL` - Bulgarian Hard Lev -// - `BGN` - Bulgarian Lev -// - `BGO` - Bulgarian Lev (1879–1952) -// - `BGM` - Bulgarian Socialist Lev -// - `BUK` - Burmese Kyat -// - `BIF` - Burundian Franc -// - `XPF` - CFP Franc -// - `KHR` - Cambodian Riel -// - `CAD` - Canadian Dollar -// - `CVE` - Cape Verdean Escudo -// - `KYD` - Cayman Islands Dollar -// - `XAF` - Central African CFA Franc -// - `CLE` - Chilean Escudo -// - `CLP` - Chilean Peso -// - `CLF` - Chilean Unit of Account (UF) -// - `CNX` - Chinese People’s Bank Dollar -// - `CNY` - Chinese Yuan -// - `CNH` - Chinese Yuan (offshore) -// - `COP` - Colombian Peso -// - `COU` - Colombian Real Value Unit -// - `KMF` - Comorian Franc -// - `CDF` - Congolese Franc -// - `CRC` - Costa Rican Colón -// - `HRD` - Croatian Dinar -// - `HRK` - Croatian Kuna -// - `CUC` - Cuban Convertible Peso -// - `CUP` - Cuban Peso -// - `CYP` - Cypriot Pound -// - `CZK` - Czech Koruna -// - `CSK` - Czechoslovak Hard Koruna -// - `DKK` - Danish Krone -// - `DJF` - Djiboutian Franc -// - `DOP` - Dominican Peso -// - `NLG` - Dutch Guilder -// - `XCD` - East Caribbean Dollar -// - `DDM` - East German Mark -// - `ECS` - Ecuadorian Sucre -// - `ECV` - Ecuadorian Unit of Constant Value -// - `EGP` - Egyptian Pound -// - `GQE` - Equatorial Guinean Ekwele -// - `ERN` - Eritrean Nakfa -// - `EEK` - Estonian Kroon -// - `ETB` - Ethiopian Birr -// - `EUR` - Euro -// - `XBA` - European Composite Unit -// - `XEU` - European Currency Unit -// - `XBB` - European Monetary Unit -// - `XBC` - European Unit of Account (XBC) -// - `XBD` - European Unit of Account (XBD) -// - `FKP` - Falkland Islands Pound -// - `FJD` - Fijian Dollar -// - `FIM` - Finnish Markka -// - `FRF` - French Franc -// - `XFO` - French Gold Franc -// - `XFU` - French UIC-Franc -// - `GMD` - Gambian Dalasi -// - `GEK` - Georgian Kupon Larit -// - `GEL` - Georgian Lari -// - `DEM` - German Mark -// - `GHS` - Ghanaian Cedi -// - `GHC` - Ghanaian Cedi (1979–2007) -// - `GIP` - Gibraltar Pound -// - `XAU` - Gold -// - `GRD` - Greek Drachma -// - `GTQ` - Guatemalan Quetzal -// - `GWP` - Guinea-Bissau Peso -// - `GNF` - Guinean Franc -// - `GNS` - Guinean Syli -// - `GYD` - Guyanaese Dollar -// - `HTG` - Haitian Gourde -// - `HNL` - Honduran Lempira -// - `HKD` - Hong Kong Dollar -// - `HUF` - Hungarian Forint -// - `IMP` - IMP -// - `ISK` - Icelandic Króna -// - `ISJ` - Icelandic Króna (1918–1981) -// - `INR` - Indian Rupee -// - `IDR` - Indonesian Rupiah -// - `IRR` - Iranian Rial -// - `IQD` - Iraqi Dinar -// - `IEP` - Irish Pound -// - `ILS` - Israeli New Shekel -// - `ILP` - Israeli Pound -// - `ILR` - Israeli Shekel (1980–1985) -// - `ITL` - Italian Lira -// - `JMD` - Jamaican Dollar -// - `JPY` - Japanese Yen -// - `JOD` - Jordanian Dinar -// - `KZT` - Kazakhstani Tenge -// - `KES` - Kenyan Shilling -// - `KWD` - Kuwaiti Dinar -// - `KGS` - Kyrgystani Som -// - `LAK` - Laotian Kip -// - `LVL` - Latvian Lats -// - `LVR` - Latvian Ruble -// - `LBP` - Lebanese Pound -// - `LSL` - Lesotho Loti -// - `LRD` - Liberian Dollar -// - `LYD` - Libyan Dinar -// - `LTL` - Lithuanian Litas -// - `LTT` - Lithuanian Talonas -// - `LUL` - Luxembourg Financial Franc -// - `LUC` - Luxembourgian Convertible Franc -// - `LUF` - Luxembourgian Franc -// - `MOP` - Macanese Pataca -// - `MKD` - Macedonian Denar -// - `MKN` - Macedonian Denar (1992–1993) -// - `MGA` - Malagasy Ariary -// - `MGF` - Malagasy Franc -// - `MWK` - Malawian Kwacha -// - `MYR` - Malaysian Ringgit -// - `MVR` - Maldivian Rufiyaa -// - `MVP` - Maldivian Rupee (1947–1981) -// - `MLF` - Malian Franc -// - `MTL` - Maltese Lira -// - `MTP` - Maltese Pound -// - `MRU` - Mauritanian Ouguiya -// - `MRO` - Mauritanian Ouguiya (1973–2017) -// - `MUR` - Mauritian Rupee -// - `MXV` - Mexican Investment Unit -// - `MXN` - Mexican Peso -// - `MXP` - Mexican Silver Peso (1861–1992) -// - `MDC` - Moldovan Cupon -// - `MDL` - Moldovan Leu -// - `MCF` - Monegasque Franc -// - `MNT` - Mongolian Tugrik -// - `MAD` - Moroccan Dirham -// - `MAF` - Moroccan Franc -// - `MZE` - Mozambican Escudo -// - `MZN` - Mozambican Metical -// - `MZM` - Mozambican Metical (1980–2006) -// - `MMK` - Myanmar Kyat -// - `NAD` - Namibian Dollar -// - `NPR` - Nepalese Rupee -// - `ANG` - Netherlands Antillean Guilder -// - `TWD` - New Taiwan Dollar -// - `NZD` - New Zealand Dollar -// - `NIO` - Nicaraguan Córdoba -// - `NIC` - Nicaraguan Córdoba (1988–1991) -// - `NGN` - Nigerian Naira -// - `KPW` - North Korean Won -// - `NOK` - Norwegian Krone -// - `OMR` - Omani Rial -// - `PKR` - Pakistani Rupee -// - `XPD` - Palladium -// - `PAB` - Panamanian Balboa -// - `PGK` - Papua New Guinean Kina -// - `PYG` - Paraguayan Guarani -// - `PEI` - Peruvian Inti -// - `PEN` - Peruvian Sol -// - `PES` - Peruvian Sol (1863–1965) -// - `PHP` - Philippine Peso -// - `XPT` - Platinum -// - `PLN` - Polish Zloty -// - `PLZ` - Polish Zloty (1950–1995) -// - `PTE` - Portuguese Escudo -// - `GWE` - Portuguese Guinea Escudo -// - `QAR` - Qatari Rial -// - `XRE` - RINET Funds -// - `RHD` - Rhodesian Dollar -// - `RON` - Romanian Leu -// - `ROL` - Romanian Leu (1952–2006) -// - `RUB` - Russian Ruble -// - `RUR` - Russian Ruble (1991–1998) -// - `RWF` - Rwandan Franc -// - `SVC` - Salvadoran Colón -// - `WST` - Samoan Tala -// - `SAR` - Saudi Riyal -// - `RSD` - Serbian Dinar -// - `CSD` - Serbian Dinar (2002–2006) -// - `SCR` - Seychellois Rupee -// - `SLL` - Sierra Leonean Leone -// - `XAG` - Silver -// - `SGD` - Singapore Dollar -// - `SKK` - Slovak Koruna -// - `SIT` - Slovenian Tolar -// - `SBD` - Solomon Islands Dollar -// - `SOS` - Somali Shilling -// - `ZAR` - South African Rand -// - `ZAL` - South African Rand (financial) -// - `KRH` - South Korean Hwan (1953–1962) -// - `KRW` - South Korean Won -// - `KRO` - South Korean Won (1945–1953) -// - `SSP` - South Sudanese Pound -// - `SUR` - Soviet Rouble -// - `ESP` - Spanish Peseta -// - `ESA` - Spanish Peseta (A account) -// - `ESB` - Spanish Peseta (convertible account) -// - `XDR` - Special Drawing Rights -// - `LKR` - Sri Lankan Rupee -// - `SHP` - St. Helena Pound -// - `XSU` - Sucre -// - `SDD` - Sudanese Dinar (1992–2007) -// - `SDG` - Sudanese Pound -// - `SDP` - Sudanese Pound (1957–1998) -// - `SRD` - Surinamese Dollar -// - `SRG` - Surinamese Guilder -// - `SZL` - Swazi Lilangeni -// - `SEK` - Swedish Krona -// - `CHF` - Swiss Franc -// - `SYP` - Syrian Pound -// - `STN` - São Tomé & Príncipe Dobra -// - `STD` - São Tomé & Príncipe Dobra (1977–2017) -// - `TVD` - TVD -// - `TJR` - Tajikistani Ruble -// - `TJS` - Tajikistani Somoni -// - `TZS` - Tanzanian Shilling -// - `XTS` - Testing Currency Code -// - `THB` - Thai Baht -// - `XXX` - The codes assigned for transactions where no currency is involved -// - `TPE` - Timorese Escudo -// - `TOP` - Tongan Paʻanga -// - `TTD` - Trinidad & Tobago Dollar -// - `TND` - Tunisian Dinar -// - `TRY` - Turkish Lira -// - `TRL` - Turkish Lira (1922–2005) -// - `TMT` - Turkmenistani Manat -// - `TMM` - Turkmenistani Manat (1993–2009) -// - `USD` - US Dollar -// - `USN` - US Dollar (Next day) -// - `USS` - US Dollar (Same day) -// - `UGX` - Ugandan Shilling -// - `UGS` - Ugandan Shilling (1966–1987) -// - `UAH` - Ukrainian Hryvnia -// - `UAK` - Ukrainian Karbovanets -// - `AED` - United Arab Emirates Dirham -// - `UYW` - Uruguayan Nominal Wage Index Unit -// - `UYU` - Uruguayan Peso -// - `UYP` - Uruguayan Peso (1975–1993) -// - `UYI` - Uruguayan Peso (Indexed Units) -// - `UZS` - Uzbekistani Som -// - `VUV` - Vanuatu Vatu -// - `VES` - Venezuelan Bolívar -// - `VEB` - Venezuelan Bolívar (1871–2008) -// - `VEF` - Venezuelan Bolívar (2008–2018) -// - `VND` - Vietnamese Dong -// - `VNN` - Vietnamese Dong (1978–1985) -// - `CHE` - WIR Euro -// - `CHW` - WIR Franc -// - `XOF` - West African CFA Franc -// - `YDD` - Yemeni Dinar -// - `YER` - Yemeni Rial -// - `YUN` - Yugoslavian Convertible Dinar (1990–1992) -// - `YUD` - Yugoslavian Hard Dinar (1966–1990) -// - `YUM` - Yugoslavian New Dinar (1994–2002) -// - `YUR` - Yugoslavian Reformed Dinar (1992–1993) -// - `ZWN` - ZWN -// - `ZRN` - Zairean New Zaire (1993–1998) -// - `ZRZ` - Zairean Zaire (1971–1993) -// - `ZMW` - Zambian Kwacha -// - `ZMK` - Zambian Kwacha (1968–2012) -// - `ZWD` - Zimbabwean Dollar (1980–2008) -// - `ZWR` - Zimbabwean Dollar (2008) -// - `ZWL` - Zimbabwean Dollar (2009) -type PurchaseOrderLineItemCurrency struct { - typeName string - TransactionCurrencyEnum TransactionCurrencyEnum - String string +func (p *PurchaseOrder) GetCreatedAt() *time.Time { + if p == nil { + return nil + } + return p.CreatedAt } -func NewPurchaseOrderLineItemCurrencyFromTransactionCurrencyEnum(value TransactionCurrencyEnum) *PurchaseOrderLineItemCurrency { - return &PurchaseOrderLineItemCurrency{typeName: "transactionCurrencyEnum", TransactionCurrencyEnum: value} +func (p *PurchaseOrder) GetModifiedAt() *time.Time { + if p == nil { + return nil + } + return p.ModifiedAt } -func NewPurchaseOrderLineItemCurrencyFromString(value string) *PurchaseOrderLineItemCurrency { - return &PurchaseOrderLineItemCurrency{typeName: "string", String: value} +func (p *PurchaseOrder) GetStatus() *PurchaseOrderStatus { + if p == nil { + return nil + } + return p.Status } -func (p *PurchaseOrderLineItemCurrency) UnmarshalJSON(data []byte) error { - var valueTransactionCurrencyEnum TransactionCurrencyEnum - if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { - p.typeName = "transactionCurrencyEnum" - p.TransactionCurrencyEnum = valueTransactionCurrencyEnum +func (p *PurchaseOrder) GetIssueDate() *time.Time { + if p == nil { return nil } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" - p.String = valueString + return p.IssueDate +} + +func (p *PurchaseOrder) GetPurchaseOrderNumber() *string { + if p == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, p) + return p.PurchaseOrderNumber } -func (p PurchaseOrderLineItemCurrency) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "transactionCurrencyEnum": - return json.Marshal(p.TransactionCurrencyEnum) - case "string": - return json.Marshal(p.String) +func (p *PurchaseOrder) GetDeliveryDate() *time.Time { + if p == nil { + return nil } + return p.DeliveryDate } -type PurchaseOrderLineItemCurrencyVisitor interface { - VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error - VisitString(string) error +func (p *PurchaseOrder) GetDeliveryAddress() *PurchaseOrderDeliveryAddress { + if p == nil { + return nil + } + return p.DeliveryAddress } -func (p *PurchaseOrderLineItemCurrency) Accept(visitor PurchaseOrderLineItemCurrencyVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "transactionCurrencyEnum": - return visitor.VisitTransactionCurrencyEnum(p.TransactionCurrencyEnum) - case "string": - return visitor.VisitString(p.String) +func (p *PurchaseOrder) GetCustomer() *string { + if p == nil { + return nil } + return p.Customer } -type PurchaseOrderLineItemItem struct { - typeName string - String string - Item *Item +func (p *PurchaseOrder) GetVendor() *PurchaseOrderVendor { + if p == nil { + return nil + } + return p.Vendor } -func NewPurchaseOrderLineItemItemFromString(value string) *PurchaseOrderLineItemItem { - return &PurchaseOrderLineItemItem{typeName: "string", String: value} +func (p *PurchaseOrder) GetMemo() *string { + if p == nil { + return nil + } + return p.Memo } -func NewPurchaseOrderLineItemItemFromItem(value *Item) *PurchaseOrderLineItemItem { - return &PurchaseOrderLineItemItem{typeName: "item", Item: value} +func (p *PurchaseOrder) GetCompany() *PurchaseOrderCompany { + if p == nil { + return nil + } + return p.Company } -func (p *PurchaseOrderLineItemItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" - p.String = valueString +func (p *PurchaseOrder) GetTotalAmount() *float64 { + if p == nil { return nil } - valueItem := new(Item) - if err := json.Unmarshal(data, &valueItem); err == nil { - p.typeName = "item" - p.Item = valueItem + return p.TotalAmount +} + +func (p *PurchaseOrder) GetCurrency() *PurchaseOrderCurrency { + if p == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, p) + return p.Currency } -func (p PurchaseOrderLineItemItem) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": - return json.Marshal(p.String) - case "item": - return json.Marshal(p.Item) +func (p *PurchaseOrder) GetExchangeRate() *string { + if p == nil { + return nil } + return p.ExchangeRate } -type PurchaseOrderLineItemItemVisitor interface { - VisitString(string) error - VisitItem(*Item) error +func (p *PurchaseOrder) GetPaymentTerm() *PurchaseOrderPaymentTerm { + if p == nil { + return nil + } + return p.PaymentTerm } -func (p *PurchaseOrderLineItemItem) Accept(visitor PurchaseOrderLineItemItemVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": - return visitor.VisitString(p.String) - case "item": - return visitor.VisitItem(p.Item) +func (p *PurchaseOrder) GetLineItems() []*PurchaseOrderLineItem { + if p == nil { + return nil } + return p.LineItems } -// # The PurchaseOrderLineItem Object -// -// ### Description -// -// The `PurchaseOrderLineItem` object is used to represent a purchase order's line item. -// -// ### Usage Example -// -// Fetch from the `GET PurchaseOrder` endpoint and view a company's purchase orders. -type PurchaseOrderLineItemRequest struct { - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // A description of the good being purchased. - Description *string `json:"description,omitempty"` - // The line item's unit price. - UnitPrice *float64 `json:"unit_price,omitempty"` - // The line item's quantity. - Quantity *float64 `json:"quantity,omitempty"` - Item *PurchaseOrderLineItemRequestItem `json:"item,omitempty"` - // The purchase order line item's account. - Account *string `json:"account,omitempty"` - // The purchase order line item's associated tracking category. - TrackingCategory *string `json:"tracking_category,omitempty"` - // The purchase order line item's associated tracking categories. - TrackingCategories []*string `json:"tracking_categories,omitempty"` - // The purchase order line item's tax amount. - TaxAmount *string `json:"tax_amount,omitempty"` - // The purchase order line item's total amount. - TotalLineAmount *string `json:"total_line_amount,omitempty"` - // The purchase order line item's currency. - // - // - `XUA` - ADB Unit of Account - // - `AFN` - Afghan Afghani - // - `AFA` - Afghan Afghani (1927–2002) - // - `ALL` - Albanian Lek - // - `ALK` - Albanian Lek (1946–1965) - // - `DZD` - Algerian Dinar - // - `ADP` - Andorran Peseta - // - `AOA` - Angolan Kwanza - // - `AOK` - Angolan Kwanza (1977–1991) - // - `AON` - Angolan New Kwanza (1990–2000) - // - `AOR` - Angolan Readjusted Kwanza (1995–1999) - // - `ARA` - Argentine Austral - // - `ARS` - Argentine Peso - // - `ARM` - Argentine Peso (1881–1970) - // - `ARP` - Argentine Peso (1983–1985) - // - `ARL` - Argentine Peso Ley (1970–1983) - // - `AMD` - Armenian Dram - // - `AWG` - Aruban Florin - // - `AUD` - Australian Dollar - // - `ATS` - Austrian Schilling - // - `AZN` - Azerbaijani Manat - // - `AZM` - Azerbaijani Manat (1993–2006) - // - `BSD` - Bahamian Dollar - // - `BHD` - Bahraini Dinar - // - `BDT` - Bangladeshi Taka - // - `BBD` - Barbadian Dollar - // - `BYN` - Belarusian Ruble - // - `BYB` - Belarusian Ruble (1994–1999) - // - `BYR` - Belarusian Ruble (2000–2016) - // - `BEF` - Belgian Franc - // - `BEC` - Belgian Franc (convertible) - // - `BEL` - Belgian Franc (financial) - // - `BZD` - Belize Dollar - // - `BMD` - Bermudan Dollar - // - `BTN` - Bhutanese Ngultrum - // - `BOB` - Bolivian Boliviano - // - `BOL` - Bolivian Boliviano (1863–1963) - // - `BOV` - Bolivian Mvdol - // - `BOP` - Bolivian Peso - // - `BAM` - Bosnia-Herzegovina Convertible Mark - // - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - // - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - // - `BWP` - Botswanan Pula - // - `BRC` - Brazilian Cruzado (1986–1989) - // - `BRZ` - Brazilian Cruzeiro (1942–1967) - // - `BRE` - Brazilian Cruzeiro (1990–1993) - // - `BRR` - Brazilian Cruzeiro (1993–1994) - // - `BRN` - Brazilian New Cruzado (1989–1990) - // - `BRB` - Brazilian New Cruzeiro (1967–1986) - // - `BRL` - Brazilian Real - // - `GBP` - British Pound - // - `BND` - Brunei Dollar - // - `BGL` - Bulgarian Hard Lev - // - `BGN` - Bulgarian Lev - // - `BGO` - Bulgarian Lev (1879–1952) - // - `BGM` - Bulgarian Socialist Lev - // - `BUK` - Burmese Kyat - // - `BIF` - Burundian Franc - // - `XPF` - CFP Franc - // - `KHR` - Cambodian Riel - // - `CAD` - Canadian Dollar - // - `CVE` - Cape Verdean Escudo - // - `KYD` - Cayman Islands Dollar - // - `XAF` - Central African CFA Franc - // - `CLE` - Chilean Escudo - // - `CLP` - Chilean Peso - // - `CLF` - Chilean Unit of Account (UF) - // - `CNX` - Chinese People’s Bank Dollar - // - `CNY` - Chinese Yuan - // - `CNH` - Chinese Yuan (offshore) - // - `COP` - Colombian Peso - // - `COU` - Colombian Real Value Unit - // - `KMF` - Comorian Franc - // - `CDF` - Congolese Franc - // - `CRC` - Costa Rican Colón - // - `HRD` - Croatian Dinar - // - `HRK` - Croatian Kuna - // - `CUC` - Cuban Convertible Peso - // - `CUP` - Cuban Peso - // - `CYP` - Cypriot Pound - // - `CZK` - Czech Koruna - // - `CSK` - Czechoslovak Hard Koruna - // - `DKK` - Danish Krone - // - `DJF` - Djiboutian Franc - // - `DOP` - Dominican Peso - // - `NLG` - Dutch Guilder - // - `XCD` - East Caribbean Dollar - // - `DDM` - East German Mark - // - `ECS` - Ecuadorian Sucre - // - `ECV` - Ecuadorian Unit of Constant Value - // - `EGP` - Egyptian Pound - // - `GQE` - Equatorial Guinean Ekwele - // - `ERN` - Eritrean Nakfa - // - `EEK` - Estonian Kroon - // - `ETB` - Ethiopian Birr - // - `EUR` - Euro - // - `XBA` - European Composite Unit - // - `XEU` - European Currency Unit - // - `XBB` - European Monetary Unit - // - `XBC` - European Unit of Account (XBC) - // - `XBD` - European Unit of Account (XBD) - // - `FKP` - Falkland Islands Pound - // - `FJD` - Fijian Dollar - // - `FIM` - Finnish Markka - // - `FRF` - French Franc - // - `XFO` - French Gold Franc - // - `XFU` - French UIC-Franc - // - `GMD` - Gambian Dalasi - // - `GEK` - Georgian Kupon Larit - // - `GEL` - Georgian Lari - // - `DEM` - German Mark - // - `GHS` - Ghanaian Cedi - // - `GHC` - Ghanaian Cedi (1979–2007) - // - `GIP` - Gibraltar Pound - // - `XAU` - Gold - // - `GRD` - Greek Drachma - // - `GTQ` - Guatemalan Quetzal - // - `GWP` - Guinea-Bissau Peso - // - `GNF` - Guinean Franc - // - `GNS` - Guinean Syli - // - `GYD` - Guyanaese Dollar - // - `HTG` - Haitian Gourde - // - `HNL` - Honduran Lempira - // - `HKD` - Hong Kong Dollar - // - `HUF` - Hungarian Forint - // - `IMP` - IMP - // - `ISK` - Icelandic Króna - // - `ISJ` - Icelandic Króna (1918–1981) - // - `INR` - Indian Rupee - // - `IDR` - Indonesian Rupiah - // - `IRR` - Iranian Rial - // - `IQD` - Iraqi Dinar - // - `IEP` - Irish Pound - // - `ILS` - Israeli New Shekel - // - `ILP` - Israeli Pound - // - `ILR` - Israeli Shekel (1980–1985) - // - `ITL` - Italian Lira - // - `JMD` - Jamaican Dollar - // - `JPY` - Japanese Yen - // - `JOD` - Jordanian Dinar - // - `KZT` - Kazakhstani Tenge - // - `KES` - Kenyan Shilling - // - `KWD` - Kuwaiti Dinar - // - `KGS` - Kyrgystani Som - // - `LAK` - Laotian Kip - // - `LVL` - Latvian Lats - // - `LVR` - Latvian Ruble - // - `LBP` - Lebanese Pound - // - `LSL` - Lesotho Loti - // - `LRD` - Liberian Dollar - // - `LYD` - Libyan Dinar - // - `LTL` - Lithuanian Litas - // - `LTT` - Lithuanian Talonas - // - `LUL` - Luxembourg Financial Franc - // - `LUC` - Luxembourgian Convertible Franc - // - `LUF` - Luxembourgian Franc - // - `MOP` - Macanese Pataca - // - `MKD` - Macedonian Denar - // - `MKN` - Macedonian Denar (1992–1993) - // - `MGA` - Malagasy Ariary - // - `MGF` - Malagasy Franc - // - `MWK` - Malawian Kwacha - // - `MYR` - Malaysian Ringgit - // - `MVR` - Maldivian Rufiyaa - // - `MVP` - Maldivian Rupee (1947–1981) - // - `MLF` - Malian Franc - // - `MTL` - Maltese Lira - // - `MTP` - Maltese Pound - // - `MRU` - Mauritanian Ouguiya - // - `MRO` - Mauritanian Ouguiya (1973–2017) - // - `MUR` - Mauritian Rupee - // - `MXV` - Mexican Investment Unit - // - `MXN` - Mexican Peso - // - `MXP` - Mexican Silver Peso (1861–1992) - // - `MDC` - Moldovan Cupon - // - `MDL` - Moldovan Leu - // - `MCF` - Monegasque Franc - // - `MNT` - Mongolian Tugrik - // - `MAD` - Moroccan Dirham - // - `MAF` - Moroccan Franc - // - `MZE` - Mozambican Escudo - // - `MZN` - Mozambican Metical - // - `MZM` - Mozambican Metical (1980–2006) - // - `MMK` - Myanmar Kyat - // - `NAD` - Namibian Dollar - // - `NPR` - Nepalese Rupee - // - `ANG` - Netherlands Antillean Guilder - // - `TWD` - New Taiwan Dollar - // - `NZD` - New Zealand Dollar - // - `NIO` - Nicaraguan Córdoba - // - `NIC` - Nicaraguan Córdoba (1988–1991) - // - `NGN` - Nigerian Naira - // - `KPW` - North Korean Won - // - `NOK` - Norwegian Krone - // - `OMR` - Omani Rial - // - `PKR` - Pakistani Rupee - // - `XPD` - Palladium - // - `PAB` - Panamanian Balboa - // - `PGK` - Papua New Guinean Kina - // - `PYG` - Paraguayan Guarani - // - `PEI` - Peruvian Inti - // - `PEN` - Peruvian Sol - // - `PES` - Peruvian Sol (1863–1965) - // - `PHP` - Philippine Peso - // - `XPT` - Platinum - // - `PLN` - Polish Zloty - // - `PLZ` - Polish Zloty (1950–1995) - // - `PTE` - Portuguese Escudo - // - `GWE` - Portuguese Guinea Escudo - // - `QAR` - Qatari Rial - // - `XRE` - RINET Funds - // - `RHD` - Rhodesian Dollar - // - `RON` - Romanian Leu - // - `ROL` - Romanian Leu (1952–2006) - // - `RUB` - Russian Ruble - // - `RUR` - Russian Ruble (1991–1998) - // - `RWF` - Rwandan Franc - // - `SVC` - Salvadoran Colón - // - `WST` - Samoan Tala - // - `SAR` - Saudi Riyal - // - `RSD` - Serbian Dinar - // - `CSD` - Serbian Dinar (2002–2006) - // - `SCR` - Seychellois Rupee - // - `SLL` - Sierra Leonean Leone - // - `XAG` - Silver - // - `SGD` - Singapore Dollar - // - `SKK` - Slovak Koruna - // - `SIT` - Slovenian Tolar - // - `SBD` - Solomon Islands Dollar - // - `SOS` - Somali Shilling - // - `ZAR` - South African Rand - // - `ZAL` - South African Rand (financial) - // - `KRH` - South Korean Hwan (1953–1962) - // - `KRW` - South Korean Won - // - `KRO` - South Korean Won (1945–1953) - // - `SSP` - South Sudanese Pound - // - `SUR` - Soviet Rouble - // - `ESP` - Spanish Peseta - // - `ESA` - Spanish Peseta (A account) - // - `ESB` - Spanish Peseta (convertible account) - // - `XDR` - Special Drawing Rights - // - `LKR` - Sri Lankan Rupee - // - `SHP` - St. Helena Pound - // - `XSU` - Sucre - // - `SDD` - Sudanese Dinar (1992–2007) - // - `SDG` - Sudanese Pound - // - `SDP` - Sudanese Pound (1957–1998) - // - `SRD` - Surinamese Dollar - // - `SRG` - Surinamese Guilder - // - `SZL` - Swazi Lilangeni - // - `SEK` - Swedish Krona - // - `CHF` - Swiss Franc - // - `SYP` - Syrian Pound - // - `STN` - São Tomé & Príncipe Dobra - // - `STD` - São Tomé & Príncipe Dobra (1977–2017) - // - `TVD` - TVD - // - `TJR` - Tajikistani Ruble - // - `TJS` - Tajikistani Somoni - // - `TZS` - Tanzanian Shilling - // - `XTS` - Testing Currency Code - // - `THB` - Thai Baht - // - `XXX` - The codes assigned for transactions where no currency is involved - // - `TPE` - Timorese Escudo - // - `TOP` - Tongan Paʻanga - // - `TTD` - Trinidad & Tobago Dollar - // - `TND` - Tunisian Dinar - // - `TRY` - Turkish Lira - // - `TRL` - Turkish Lira (1922–2005) - // - `TMT` - Turkmenistani Manat - // - `TMM` - Turkmenistani Manat (1993–2009) - // - `USD` - US Dollar - // - `USN` - US Dollar (Next day) - // - `USS` - US Dollar (Same day) - // - `UGX` - Ugandan Shilling - // - `UGS` - Ugandan Shilling (1966–1987) - // - `UAH` - Ukrainian Hryvnia - // - `UAK` - Ukrainian Karbovanets - // - `AED` - United Arab Emirates Dirham - // - `UYW` - Uruguayan Nominal Wage Index Unit - // - `UYU` - Uruguayan Peso - // - `UYP` - Uruguayan Peso (1975–1993) - // - `UYI` - Uruguayan Peso (Indexed Units) - // - `UZS` - Uzbekistani Som - // - `VUV` - Vanuatu Vatu - // - `VES` - Venezuelan Bolívar - // - `VEB` - Venezuelan Bolívar (1871–2008) - // - `VEF` - Venezuelan Bolívar (2008–2018) - // - `VND` - Vietnamese Dong - // - `VNN` - Vietnamese Dong (1978–1985) - // - `CHE` - WIR Euro - // - `CHW` - WIR Franc - // - `XOF` - West African CFA Franc - // - `YDD` - Yemeni Dinar - // - `YER` - Yemeni Rial - // - `YUN` - Yugoslavian Convertible Dinar (1990–1992) - // - `YUD` - Yugoslavian Hard Dinar (1966–1990) - // - `YUM` - Yugoslavian New Dinar (1994–2002) - // - `YUR` - Yugoslavian Reformed Dinar (1992–1993) - // - `ZWN` - ZWN - // - `ZRN` - Zairean New Zaire (1993–1998) - // - `ZRZ` - Zairean Zaire (1971–1993) - // - `ZMW` - Zambian Kwacha - // - `ZMK` - Zambian Kwacha (1968–2012) - // - `ZWD` - Zimbabwean Dollar (1980–2008) - // - `ZWR` - Zimbabwean Dollar (2008) - // - `ZWL` - Zimbabwean Dollar (2009) - Currency *PurchaseOrderLineItemRequestCurrency `json:"currency,omitempty"` - // The tax rate that applies to this line item. - TaxRate *string `json:"tax_rate,omitempty"` - // The purchase order line item's exchange rate. - ExchangeRate *string `json:"exchange_rate,omitempty"` - // The company the purchase order line item belongs to. - Company *string `json:"company,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` - RemoteFields []*RemoteFieldRequest `json:"remote_fields,omitempty"` - - _rawJSON json.RawMessage +func (p *PurchaseOrder) GetInclusiveOfTax() *bool { + if p == nil { + return nil + } + return p.InclusiveOfTax } -func (p *PurchaseOrderLineItemRequest) UnmarshalJSON(data []byte) error { - type unmarshaler PurchaseOrderLineItemRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (p *PurchaseOrder) GetTrackingCategories() []*PurchaseOrderTrackingCategoriesItem { + if p == nil { + return nil } - *p = PurchaseOrderLineItemRequest(value) - p._rawJSON = json.RawMessage(data) - return nil + return p.TrackingCategories } -func (p *PurchaseOrderLineItemRequest) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } +func (p *PurchaseOrder) GetAccountingPeriod() *PurchaseOrderAccountingPeriod { + if p == nil { + return nil } - if value, err := core.StringifyJSON(p); err == nil { - return value + return p.AccountingPeriod +} + +func (p *PurchaseOrder) GetRemoteCreatedAt() *time.Time { + if p == nil { + return nil } - return fmt.Sprintf("%#v", p) + return p.RemoteCreatedAt } -// The purchase order line item's currency. -// -// - `XUA` - ADB Unit of Account -// - `AFN` - Afghan Afghani -// - `AFA` - Afghan Afghani (1927–2002) -// - `ALL` - Albanian Lek -// - `ALK` - Albanian Lek (1946–1965) -// - `DZD` - Algerian Dinar -// - `ADP` - Andorran Peseta -// - `AOA` - Angolan Kwanza -// - `AOK` - Angolan Kwanza (1977–1991) -// - `AON` - Angolan New Kwanza (1990–2000) -// - `AOR` - Angolan Readjusted Kwanza (1995–1999) -// - `ARA` - Argentine Austral -// - `ARS` - Argentine Peso -// - `ARM` - Argentine Peso (1881–1970) -// - `ARP` - Argentine Peso (1983–1985) -// - `ARL` - Argentine Peso Ley (1970–1983) -// - `AMD` - Armenian Dram -// - `AWG` - Aruban Florin -// - `AUD` - Australian Dollar -// - `ATS` - Austrian Schilling -// - `AZN` - Azerbaijani Manat -// - `AZM` - Azerbaijani Manat (1993–2006) -// - `BSD` - Bahamian Dollar -// - `BHD` - Bahraini Dinar -// - `BDT` - Bangladeshi Taka -// - `BBD` - Barbadian Dollar -// - `BYN` - Belarusian Ruble -// - `BYB` - Belarusian Ruble (1994–1999) -// - `BYR` - Belarusian Ruble (2000–2016) -// - `BEF` - Belgian Franc -// - `BEC` - Belgian Franc (convertible) -// - `BEL` - Belgian Franc (financial) -// - `BZD` - Belize Dollar -// - `BMD` - Bermudan Dollar -// - `BTN` - Bhutanese Ngultrum -// - `BOB` - Bolivian Boliviano -// - `BOL` - Bolivian Boliviano (1863–1963) -// - `BOV` - Bolivian Mvdol -// - `BOP` - Bolivian Peso -// - `BAM` - Bosnia-Herzegovina Convertible Mark -// - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) -// - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) -// - `BWP` - Botswanan Pula -// - `BRC` - Brazilian Cruzado (1986–1989) -// - `BRZ` - Brazilian Cruzeiro (1942–1967) -// - `BRE` - Brazilian Cruzeiro (1990–1993) -// - `BRR` - Brazilian Cruzeiro (1993–1994) -// - `BRN` - Brazilian New Cruzado (1989–1990) -// - `BRB` - Brazilian New Cruzeiro (1967–1986) -// - `BRL` - Brazilian Real -// - `GBP` - British Pound -// - `BND` - Brunei Dollar -// - `BGL` - Bulgarian Hard Lev -// - `BGN` - Bulgarian Lev -// - `BGO` - Bulgarian Lev (1879–1952) -// - `BGM` - Bulgarian Socialist Lev -// - `BUK` - Burmese Kyat -// - `BIF` - Burundian Franc -// - `XPF` - CFP Franc -// - `KHR` - Cambodian Riel -// - `CAD` - Canadian Dollar -// - `CVE` - Cape Verdean Escudo -// - `KYD` - Cayman Islands Dollar -// - `XAF` - Central African CFA Franc -// - `CLE` - Chilean Escudo -// - `CLP` - Chilean Peso -// - `CLF` - Chilean Unit of Account (UF) -// - `CNX` - Chinese People’s Bank Dollar -// - `CNY` - Chinese Yuan -// - `CNH` - Chinese Yuan (offshore) -// - `COP` - Colombian Peso -// - `COU` - Colombian Real Value Unit -// - `KMF` - Comorian Franc -// - `CDF` - Congolese Franc -// - `CRC` - Costa Rican Colón -// - `HRD` - Croatian Dinar -// - `HRK` - Croatian Kuna -// - `CUC` - Cuban Convertible Peso -// - `CUP` - Cuban Peso -// - `CYP` - Cypriot Pound -// - `CZK` - Czech Koruna -// - `CSK` - Czechoslovak Hard Koruna -// - `DKK` - Danish Krone -// - `DJF` - Djiboutian Franc -// - `DOP` - Dominican Peso -// - `NLG` - Dutch Guilder -// - `XCD` - East Caribbean Dollar -// - `DDM` - East German Mark -// - `ECS` - Ecuadorian Sucre -// - `ECV` - Ecuadorian Unit of Constant Value -// - `EGP` - Egyptian Pound -// - `GQE` - Equatorial Guinean Ekwele -// - `ERN` - Eritrean Nakfa -// - `EEK` - Estonian Kroon -// - `ETB` - Ethiopian Birr -// - `EUR` - Euro -// - `XBA` - European Composite Unit -// - `XEU` - European Currency Unit -// - `XBB` - European Monetary Unit -// - `XBC` - European Unit of Account (XBC) -// - `XBD` - European Unit of Account (XBD) -// - `FKP` - Falkland Islands Pound -// - `FJD` - Fijian Dollar -// - `FIM` - Finnish Markka -// - `FRF` - French Franc -// - `XFO` - French Gold Franc -// - `XFU` - French UIC-Franc -// - `GMD` - Gambian Dalasi -// - `GEK` - Georgian Kupon Larit -// - `GEL` - Georgian Lari -// - `DEM` - German Mark -// - `GHS` - Ghanaian Cedi -// - `GHC` - Ghanaian Cedi (1979–2007) -// - `GIP` - Gibraltar Pound -// - `XAU` - Gold -// - `GRD` - Greek Drachma -// - `GTQ` - Guatemalan Quetzal -// - `GWP` - Guinea-Bissau Peso -// - `GNF` - Guinean Franc -// - `GNS` - Guinean Syli -// - `GYD` - Guyanaese Dollar -// - `HTG` - Haitian Gourde -// - `HNL` - Honduran Lempira -// - `HKD` - Hong Kong Dollar -// - `HUF` - Hungarian Forint -// - `IMP` - IMP -// - `ISK` - Icelandic Króna -// - `ISJ` - Icelandic Króna (1918–1981) -// - `INR` - Indian Rupee -// - `IDR` - Indonesian Rupiah -// - `IRR` - Iranian Rial -// - `IQD` - Iraqi Dinar -// - `IEP` - Irish Pound -// - `ILS` - Israeli New Shekel -// - `ILP` - Israeli Pound -// - `ILR` - Israeli Shekel (1980–1985) -// - `ITL` - Italian Lira -// - `JMD` - Jamaican Dollar -// - `JPY` - Japanese Yen -// - `JOD` - Jordanian Dinar -// - `KZT` - Kazakhstani Tenge -// - `KES` - Kenyan Shilling -// - `KWD` - Kuwaiti Dinar -// - `KGS` - Kyrgystani Som -// - `LAK` - Laotian Kip -// - `LVL` - Latvian Lats -// - `LVR` - Latvian Ruble -// - `LBP` - Lebanese Pound -// - `LSL` - Lesotho Loti -// - `LRD` - Liberian Dollar -// - `LYD` - Libyan Dinar -// - `LTL` - Lithuanian Litas -// - `LTT` - Lithuanian Talonas -// - `LUL` - Luxembourg Financial Franc -// - `LUC` - Luxembourgian Convertible Franc -// - `LUF` - Luxembourgian Franc -// - `MOP` - Macanese Pataca -// - `MKD` - Macedonian Denar -// - `MKN` - Macedonian Denar (1992–1993) -// - `MGA` - Malagasy Ariary -// - `MGF` - Malagasy Franc -// - `MWK` - Malawian Kwacha -// - `MYR` - Malaysian Ringgit -// - `MVR` - Maldivian Rufiyaa -// - `MVP` - Maldivian Rupee (1947–1981) -// - `MLF` - Malian Franc -// - `MTL` - Maltese Lira -// - `MTP` - Maltese Pound -// - `MRU` - Mauritanian Ouguiya -// - `MRO` - Mauritanian Ouguiya (1973–2017) -// - `MUR` - Mauritian Rupee -// - `MXV` - Mexican Investment Unit -// - `MXN` - Mexican Peso -// - `MXP` - Mexican Silver Peso (1861–1992) -// - `MDC` - Moldovan Cupon -// - `MDL` - Moldovan Leu -// - `MCF` - Monegasque Franc -// - `MNT` - Mongolian Tugrik -// - `MAD` - Moroccan Dirham -// - `MAF` - Moroccan Franc -// - `MZE` - Mozambican Escudo -// - `MZN` - Mozambican Metical -// - `MZM` - Mozambican Metical (1980–2006) -// - `MMK` - Myanmar Kyat -// - `NAD` - Namibian Dollar -// - `NPR` - Nepalese Rupee -// - `ANG` - Netherlands Antillean Guilder -// - `TWD` - New Taiwan Dollar -// - `NZD` - New Zealand Dollar -// - `NIO` - Nicaraguan Córdoba -// - `NIC` - Nicaraguan Córdoba (1988–1991) -// - `NGN` - Nigerian Naira -// - `KPW` - North Korean Won -// - `NOK` - Norwegian Krone -// - `OMR` - Omani Rial -// - `PKR` - Pakistani Rupee -// - `XPD` - Palladium -// - `PAB` - Panamanian Balboa -// - `PGK` - Papua New Guinean Kina -// - `PYG` - Paraguayan Guarani -// - `PEI` - Peruvian Inti -// - `PEN` - Peruvian Sol -// - `PES` - Peruvian Sol (1863–1965) -// - `PHP` - Philippine Peso -// - `XPT` - Platinum -// - `PLN` - Polish Zloty -// - `PLZ` - Polish Zloty (1950–1995) -// - `PTE` - Portuguese Escudo -// - `GWE` - Portuguese Guinea Escudo -// - `QAR` - Qatari Rial -// - `XRE` - RINET Funds -// - `RHD` - Rhodesian Dollar -// - `RON` - Romanian Leu -// - `ROL` - Romanian Leu (1952–2006) -// - `RUB` - Russian Ruble -// - `RUR` - Russian Ruble (1991–1998) -// - `RWF` - Rwandan Franc -// - `SVC` - Salvadoran Colón -// - `WST` - Samoan Tala -// - `SAR` - Saudi Riyal -// - `RSD` - Serbian Dinar -// - `CSD` - Serbian Dinar (2002–2006) -// - `SCR` - Seychellois Rupee -// - `SLL` - Sierra Leonean Leone -// - `XAG` - Silver -// - `SGD` - Singapore Dollar -// - `SKK` - Slovak Koruna -// - `SIT` - Slovenian Tolar -// - `SBD` - Solomon Islands Dollar -// - `SOS` - Somali Shilling -// - `ZAR` - South African Rand -// - `ZAL` - South African Rand (financial) -// - `KRH` - South Korean Hwan (1953–1962) -// - `KRW` - South Korean Won -// - `KRO` - South Korean Won (1945–1953) -// - `SSP` - South Sudanese Pound -// - `SUR` - Soviet Rouble -// - `ESP` - Spanish Peseta -// - `ESA` - Spanish Peseta (A account) -// - `ESB` - Spanish Peseta (convertible account) -// - `XDR` - Special Drawing Rights -// - `LKR` - Sri Lankan Rupee -// - `SHP` - St. Helena Pound -// - `XSU` - Sucre -// - `SDD` - Sudanese Dinar (1992–2007) -// - `SDG` - Sudanese Pound -// - `SDP` - Sudanese Pound (1957–1998) -// - `SRD` - Surinamese Dollar -// - `SRG` - Surinamese Guilder -// - `SZL` - Swazi Lilangeni -// - `SEK` - Swedish Krona -// - `CHF` - Swiss Franc -// - `SYP` - Syrian Pound -// - `STN` - São Tomé & Príncipe Dobra -// - `STD` - São Tomé & Príncipe Dobra (1977–2017) -// - `TVD` - TVD -// - `TJR` - Tajikistani Ruble -// - `TJS` - Tajikistani Somoni -// - `TZS` - Tanzanian Shilling -// - `XTS` - Testing Currency Code -// - `THB` - Thai Baht -// - `XXX` - The codes assigned for transactions where no currency is involved -// - `TPE` - Timorese Escudo -// - `TOP` - Tongan Paʻanga -// - `TTD` - Trinidad & Tobago Dollar -// - `TND` - Tunisian Dinar -// - `TRY` - Turkish Lira -// - `TRL` - Turkish Lira (1922–2005) -// - `TMT` - Turkmenistani Manat -// - `TMM` - Turkmenistani Manat (1993–2009) -// - `USD` - US Dollar -// - `USN` - US Dollar (Next day) -// - `USS` - US Dollar (Same day) -// - `UGX` - Ugandan Shilling -// - `UGS` - Ugandan Shilling (1966–1987) -// - `UAH` - Ukrainian Hryvnia -// - `UAK` - Ukrainian Karbovanets -// - `AED` - United Arab Emirates Dirham -// - `UYW` - Uruguayan Nominal Wage Index Unit -// - `UYU` - Uruguayan Peso -// - `UYP` - Uruguayan Peso (1975–1993) -// - `UYI` - Uruguayan Peso (Indexed Units) -// - `UZS` - Uzbekistani Som -// - `VUV` - Vanuatu Vatu -// - `VES` - Venezuelan Bolívar -// - `VEB` - Venezuelan Bolívar (1871–2008) -// - `VEF` - Venezuelan Bolívar (2008–2018) -// - `VND` - Vietnamese Dong -// - `VNN` - Vietnamese Dong (1978–1985) -// - `CHE` - WIR Euro -// - `CHW` - WIR Franc -// - `XOF` - West African CFA Franc -// - `YDD` - Yemeni Dinar -// - `YER` - Yemeni Rial -// - `YUN` - Yugoslavian Convertible Dinar (1990–1992) -// - `YUD` - Yugoslavian Hard Dinar (1966–1990) -// - `YUM` - Yugoslavian New Dinar (1994–2002) -// - `YUR` - Yugoslavian Reformed Dinar (1992–1993) -// - `ZWN` - ZWN -// - `ZRN` - Zairean New Zaire (1993–1998) -// - `ZRZ` - Zairean Zaire (1971–1993) -// - `ZMW` - Zambian Kwacha -// - `ZMK` - Zambian Kwacha (1968–2012) -// - `ZWD` - Zimbabwean Dollar (1980–2008) -// - `ZWR` - Zimbabwean Dollar (2008) -// - `ZWL` - Zimbabwean Dollar (2009) -type PurchaseOrderLineItemRequestCurrency struct { - typeName string - TransactionCurrencyEnum TransactionCurrencyEnum - String string +func (p *PurchaseOrder) GetRemoteUpdatedAt() *time.Time { + if p == nil { + return nil + } + return p.RemoteUpdatedAt } -func NewPurchaseOrderLineItemRequestCurrencyFromTransactionCurrencyEnum(value TransactionCurrencyEnum) *PurchaseOrderLineItemRequestCurrency { - return &PurchaseOrderLineItemRequestCurrency{typeName: "transactionCurrencyEnum", TransactionCurrencyEnum: value} +func (p *PurchaseOrder) GetRemoteWasDeleted() *bool { + if p == nil { + return nil + } + return p.RemoteWasDeleted } -func NewPurchaseOrderLineItemRequestCurrencyFromString(value string) *PurchaseOrderLineItemRequestCurrency { - return &PurchaseOrderLineItemRequestCurrency{typeName: "string", String: value} +func (p *PurchaseOrder) GetFieldMappings() map[string]interface{} { + if p == nil { + return nil + } + return p.FieldMappings } -func (p *PurchaseOrderLineItemRequestCurrency) UnmarshalJSON(data []byte) error { - var valueTransactionCurrencyEnum TransactionCurrencyEnum - if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { - p.typeName = "transactionCurrencyEnum" - p.TransactionCurrencyEnum = valueTransactionCurrencyEnum +func (p *PurchaseOrder) GetRemoteData() []*RemoteData { + if p == nil { return nil } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" - p.String = valueString + return p.RemoteData +} + +func (p *PurchaseOrder) GetRemoteFields() []*RemoteField { + if p == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, p) + return p.RemoteFields } -func (p PurchaseOrderLineItemRequestCurrency) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "transactionCurrencyEnum": - return json.Marshal(p.TransactionCurrencyEnum) - case "string": - return json.Marshal(p.String) +func (p *PurchaseOrder) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PurchaseOrder) UnmarshalJSON(data []byte) error { + type embed PurchaseOrder + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + IssueDate *internal.DateTime `json:"issue_date,omitempty"` + DeliveryDate *internal.DateTime `json:"delivery_date,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + RemoteUpdatedAt *internal.DateTime `json:"remote_updated_at,omitempty"` + }{ + embed: embed(*p), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *p = PurchaseOrder(unmarshaler.embed) + p.CreatedAt = unmarshaler.CreatedAt.TimePtr() + p.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + p.IssueDate = unmarshaler.IssueDate.TimePtr() + p.DeliveryDate = unmarshaler.DeliveryDate.TimePtr() + p.RemoteCreatedAt = unmarshaler.RemoteCreatedAt.TimePtr() + p.RemoteUpdatedAt = unmarshaler.RemoteUpdatedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil } -type PurchaseOrderLineItemRequestCurrencyVisitor interface { - VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error - VisitString(string) error +func (p *PurchaseOrder) MarshalJSON() ([]byte, error) { + type embed PurchaseOrder + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + IssueDate *internal.DateTime `json:"issue_date,omitempty"` + DeliveryDate *internal.DateTime `json:"delivery_date,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + RemoteUpdatedAt *internal.DateTime `json:"remote_updated_at,omitempty"` + }{ + embed: embed(*p), + CreatedAt: internal.NewOptionalDateTime(p.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(p.ModifiedAt), + IssueDate: internal.NewOptionalDateTime(p.IssueDate), + DeliveryDate: internal.NewOptionalDateTime(p.DeliveryDate), + RemoteCreatedAt: internal.NewOptionalDateTime(p.RemoteCreatedAt), + RemoteUpdatedAt: internal.NewOptionalDateTime(p.RemoteUpdatedAt), + } + return json.Marshal(marshaler) } -func (p *PurchaseOrderLineItemRequestCurrency) Accept(visitor PurchaseOrderLineItemRequestCurrencyVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "transactionCurrencyEnum": - return visitor.VisitTransactionCurrencyEnum(p.TransactionCurrencyEnum) - case "string": - return visitor.VisitString(p.String) +func (p *PurchaseOrder) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value } + return fmt.Sprintf("%#v", p) } -type PurchaseOrderLineItemRequestItem struct { - typeName string - String string - Item *Item +// The accounting period that the PurchaseOrder was generated in. +type PurchaseOrderAccountingPeriod struct { + String string + AccountingPeriod *AccountingPeriod + + typ string } -func NewPurchaseOrderLineItemRequestItemFromString(value string) *PurchaseOrderLineItemRequestItem { - return &PurchaseOrderLineItemRequestItem{typeName: "string", String: value} +func (p *PurchaseOrderAccountingPeriod) GetString() string { + if p == nil { + return "" + } + return p.String } -func NewPurchaseOrderLineItemRequestItemFromItem(value *Item) *PurchaseOrderLineItemRequestItem { - return &PurchaseOrderLineItemRequestItem{typeName: "item", Item: value} +func (p *PurchaseOrderAccountingPeriod) GetAccountingPeriod() *AccountingPeriod { + if p == nil { + return nil + } + return p.AccountingPeriod } -func (p *PurchaseOrderLineItemRequestItem) UnmarshalJSON(data []byte) error { +func (p *PurchaseOrderAccountingPeriod) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" + p.typ = "String" p.String = valueString return nil } - valueItem := new(Item) - if err := json.Unmarshal(data, &valueItem); err == nil { - p.typeName = "item" - p.Item = valueItem + valueAccountingPeriod := new(AccountingPeriod) + if err := json.Unmarshal(data, &valueAccountingPeriod); err == nil { + p.typ = "AccountingPeriod" + p.AccountingPeriod = valueAccountingPeriod return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, p) } -func (p PurchaseOrderLineItemRequestItem) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": - return json.Marshal(p.String) - case "item": - return json.Marshal(p.Item) - } -} - -type PurchaseOrderLineItemRequestItemVisitor interface { - VisitString(string) error - VisitItem(*Item) error -} - -func (p *PurchaseOrderLineItemRequestItem) Accept(visitor PurchaseOrderLineItemRequestItemVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": - return visitor.VisitString(p.String) - case "item": - return visitor.VisitItem(p.Item) - } -} - -// # The PurchaseOrder Object -// -// ### Description -// -// The `PurchaseOrder` object is a record of request for a product or service between a buyer and seller. -// -// ### Usage Example -// -// Fetch from the `LIST PurchaseOrders` endpoint and view a company's purchase orders. -type PurchaseOrderRequest struct { - // The purchase order's status. - // - // - `DRAFT` - DRAFT - // - `SUBMITTED` - SUBMITTED - // - `AUTHORIZED` - AUTHORIZED - // - `BILLED` - BILLED - // - `DELETED` - DELETED - Status *PurchaseOrderRequestStatus `json:"status,omitempty"` - // The purchase order's issue date. - IssueDate *time.Time `json:"issue_date,omitempty"` - // The purchase order's delivery date. - DeliveryDate *time.Time `json:"delivery_date,omitempty"` - // The purchase order's delivery address. - DeliveryAddress *PurchaseOrderRequestDeliveryAddress `json:"delivery_address,omitempty"` - // The contact making the purchase order. - Customer *string `json:"customer,omitempty"` - // The party fulfilling the purchase order. - Vendor *PurchaseOrderRequestVendor `json:"vendor,omitempty"` - // A memo attached to the purchase order. - Memo *string `json:"memo,omitempty"` - // The company the purchase order belongs to. - Company *PurchaseOrderRequestCompany `json:"company,omitempty"` - // The purchase order's total amount. - TotalAmount *float64 `json:"total_amount,omitempty"` - // The purchase order's currency. - // - // - `XUA` - ADB Unit of Account - // - `AFN` - Afghan Afghani - // - `AFA` - Afghan Afghani (1927–2002) - // - `ALL` - Albanian Lek - // - `ALK` - Albanian Lek (1946–1965) - // - `DZD` - Algerian Dinar - // - `ADP` - Andorran Peseta - // - `AOA` - Angolan Kwanza - // - `AOK` - Angolan Kwanza (1977–1991) - // - `AON` - Angolan New Kwanza (1990–2000) - // - `AOR` - Angolan Readjusted Kwanza (1995–1999) - // - `ARA` - Argentine Austral - // - `ARS` - Argentine Peso - // - `ARM` - Argentine Peso (1881–1970) - // - `ARP` - Argentine Peso (1983–1985) - // - `ARL` - Argentine Peso Ley (1970–1983) - // - `AMD` - Armenian Dram - // - `AWG` - Aruban Florin - // - `AUD` - Australian Dollar - // - `ATS` - Austrian Schilling - // - `AZN` - Azerbaijani Manat - // - `AZM` - Azerbaijani Manat (1993–2006) - // - `BSD` - Bahamian Dollar - // - `BHD` - Bahraini Dinar - // - `BDT` - Bangladeshi Taka - // - `BBD` - Barbadian Dollar - // - `BYN` - Belarusian Ruble - // - `BYB` - Belarusian Ruble (1994–1999) - // - `BYR` - Belarusian Ruble (2000–2016) - // - `BEF` - Belgian Franc - // - `BEC` - Belgian Franc (convertible) - // - `BEL` - Belgian Franc (financial) - // - `BZD` - Belize Dollar - // - `BMD` - Bermudan Dollar - // - `BTN` - Bhutanese Ngultrum - // - `BOB` - Bolivian Boliviano - // - `BOL` - Bolivian Boliviano (1863–1963) - // - `BOV` - Bolivian Mvdol - // - `BOP` - Bolivian Peso - // - `BAM` - Bosnia-Herzegovina Convertible Mark - // - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - // - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - // - `BWP` - Botswanan Pula - // - `BRC` - Brazilian Cruzado (1986–1989) - // - `BRZ` - Brazilian Cruzeiro (1942–1967) - // - `BRE` - Brazilian Cruzeiro (1990–1993) - // - `BRR` - Brazilian Cruzeiro (1993–1994) - // - `BRN` - Brazilian New Cruzado (1989–1990) - // - `BRB` - Brazilian New Cruzeiro (1967–1986) - // - `BRL` - Brazilian Real - // - `GBP` - British Pound - // - `BND` - Brunei Dollar - // - `BGL` - Bulgarian Hard Lev - // - `BGN` - Bulgarian Lev - // - `BGO` - Bulgarian Lev (1879–1952) - // - `BGM` - Bulgarian Socialist Lev - // - `BUK` - Burmese Kyat - // - `BIF` - Burundian Franc - // - `XPF` - CFP Franc - // - `KHR` - Cambodian Riel - // - `CAD` - Canadian Dollar - // - `CVE` - Cape Verdean Escudo - // - `KYD` - Cayman Islands Dollar - // - `XAF` - Central African CFA Franc - // - `CLE` - Chilean Escudo - // - `CLP` - Chilean Peso - // - `CLF` - Chilean Unit of Account (UF) - // - `CNX` - Chinese People’s Bank Dollar - // - `CNY` - Chinese Yuan - // - `CNH` - Chinese Yuan (offshore) - // - `COP` - Colombian Peso - // - `COU` - Colombian Real Value Unit - // - `KMF` - Comorian Franc - // - `CDF` - Congolese Franc - // - `CRC` - Costa Rican Colón - // - `HRD` - Croatian Dinar - // - `HRK` - Croatian Kuna - // - `CUC` - Cuban Convertible Peso - // - `CUP` - Cuban Peso - // - `CYP` - Cypriot Pound - // - `CZK` - Czech Koruna - // - `CSK` - Czechoslovak Hard Koruna - // - `DKK` - Danish Krone - // - `DJF` - Djiboutian Franc - // - `DOP` - Dominican Peso - // - `NLG` - Dutch Guilder - // - `XCD` - East Caribbean Dollar - // - `DDM` - East German Mark - // - `ECS` - Ecuadorian Sucre - // - `ECV` - Ecuadorian Unit of Constant Value - // - `EGP` - Egyptian Pound - // - `GQE` - Equatorial Guinean Ekwele - // - `ERN` - Eritrean Nakfa - // - `EEK` - Estonian Kroon - // - `ETB` - Ethiopian Birr - // - `EUR` - Euro - // - `XBA` - European Composite Unit - // - `XEU` - European Currency Unit - // - `XBB` - European Monetary Unit - // - `XBC` - European Unit of Account (XBC) - // - `XBD` - European Unit of Account (XBD) - // - `FKP` - Falkland Islands Pound - // - `FJD` - Fijian Dollar - // - `FIM` - Finnish Markka - // - `FRF` - French Franc - // - `XFO` - French Gold Franc - // - `XFU` - French UIC-Franc - // - `GMD` - Gambian Dalasi - // - `GEK` - Georgian Kupon Larit - // - `GEL` - Georgian Lari - // - `DEM` - German Mark - // - `GHS` - Ghanaian Cedi - // - `GHC` - Ghanaian Cedi (1979–2007) - // - `GIP` - Gibraltar Pound - // - `XAU` - Gold - // - `GRD` - Greek Drachma - // - `GTQ` - Guatemalan Quetzal - // - `GWP` - Guinea-Bissau Peso - // - `GNF` - Guinean Franc - // - `GNS` - Guinean Syli - // - `GYD` - Guyanaese Dollar - // - `HTG` - Haitian Gourde - // - `HNL` - Honduran Lempira - // - `HKD` - Hong Kong Dollar - // - `HUF` - Hungarian Forint - // - `IMP` - IMP - // - `ISK` - Icelandic Króna - // - `ISJ` - Icelandic Króna (1918–1981) - // - `INR` - Indian Rupee - // - `IDR` - Indonesian Rupiah - // - `IRR` - Iranian Rial - // - `IQD` - Iraqi Dinar - // - `IEP` - Irish Pound - // - `ILS` - Israeli New Shekel - // - `ILP` - Israeli Pound - // - `ILR` - Israeli Shekel (1980–1985) - // - `ITL` - Italian Lira - // - `JMD` - Jamaican Dollar - // - `JPY` - Japanese Yen - // - `JOD` - Jordanian Dinar - // - `KZT` - Kazakhstani Tenge - // - `KES` - Kenyan Shilling - // - `KWD` - Kuwaiti Dinar - // - `KGS` - Kyrgystani Som - // - `LAK` - Laotian Kip - // - `LVL` - Latvian Lats - // - `LVR` - Latvian Ruble - // - `LBP` - Lebanese Pound - // - `LSL` - Lesotho Loti - // - `LRD` - Liberian Dollar - // - `LYD` - Libyan Dinar - // - `LTL` - Lithuanian Litas - // - `LTT` - Lithuanian Talonas - // - `LUL` - Luxembourg Financial Franc - // - `LUC` - Luxembourgian Convertible Franc - // - `LUF` - Luxembourgian Franc - // - `MOP` - Macanese Pataca - // - `MKD` - Macedonian Denar - // - `MKN` - Macedonian Denar (1992–1993) - // - `MGA` - Malagasy Ariary - // - `MGF` - Malagasy Franc - // - `MWK` - Malawian Kwacha - // - `MYR` - Malaysian Ringgit - // - `MVR` - Maldivian Rufiyaa - // - `MVP` - Maldivian Rupee (1947–1981) - // - `MLF` - Malian Franc - // - `MTL` - Maltese Lira - // - `MTP` - Maltese Pound - // - `MRU` - Mauritanian Ouguiya - // - `MRO` - Mauritanian Ouguiya (1973–2017) - // - `MUR` - Mauritian Rupee - // - `MXV` - Mexican Investment Unit - // - `MXN` - Mexican Peso - // - `MXP` - Mexican Silver Peso (1861–1992) - // - `MDC` - Moldovan Cupon - // - `MDL` - Moldovan Leu - // - `MCF` - Monegasque Franc - // - `MNT` - Mongolian Tugrik - // - `MAD` - Moroccan Dirham - // - `MAF` - Moroccan Franc - // - `MZE` - Mozambican Escudo - // - `MZN` - Mozambican Metical - // - `MZM` - Mozambican Metical (1980–2006) - // - `MMK` - Myanmar Kyat - // - `NAD` - Namibian Dollar - // - `NPR` - Nepalese Rupee - // - `ANG` - Netherlands Antillean Guilder - // - `TWD` - New Taiwan Dollar - // - `NZD` - New Zealand Dollar - // - `NIO` - Nicaraguan Córdoba - // - `NIC` - Nicaraguan Córdoba (1988–1991) - // - `NGN` - Nigerian Naira - // - `KPW` - North Korean Won - // - `NOK` - Norwegian Krone - // - `OMR` - Omani Rial - // - `PKR` - Pakistani Rupee - // - `XPD` - Palladium - // - `PAB` - Panamanian Balboa - // - `PGK` - Papua New Guinean Kina - // - `PYG` - Paraguayan Guarani - // - `PEI` - Peruvian Inti - // - `PEN` - Peruvian Sol - // - `PES` - Peruvian Sol (1863–1965) - // - `PHP` - Philippine Peso - // - `XPT` - Platinum - // - `PLN` - Polish Zloty - // - `PLZ` - Polish Zloty (1950–1995) - // - `PTE` - Portuguese Escudo - // - `GWE` - Portuguese Guinea Escudo - // - `QAR` - Qatari Rial - // - `XRE` - RINET Funds - // - `RHD` - Rhodesian Dollar - // - `RON` - Romanian Leu - // - `ROL` - Romanian Leu (1952–2006) - // - `RUB` - Russian Ruble - // - `RUR` - Russian Ruble (1991–1998) - // - `RWF` - Rwandan Franc - // - `SVC` - Salvadoran Colón - // - `WST` - Samoan Tala - // - `SAR` - Saudi Riyal - // - `RSD` - Serbian Dinar - // - `CSD` - Serbian Dinar (2002–2006) - // - `SCR` - Seychellois Rupee - // - `SLL` - Sierra Leonean Leone - // - `XAG` - Silver - // - `SGD` - Singapore Dollar - // - `SKK` - Slovak Koruna - // - `SIT` - Slovenian Tolar - // - `SBD` - Solomon Islands Dollar - // - `SOS` - Somali Shilling - // - `ZAR` - South African Rand - // - `ZAL` - South African Rand (financial) - // - `KRH` - South Korean Hwan (1953–1962) - // - `KRW` - South Korean Won - // - `KRO` - South Korean Won (1945–1953) - // - `SSP` - South Sudanese Pound - // - `SUR` - Soviet Rouble - // - `ESP` - Spanish Peseta - // - `ESA` - Spanish Peseta (A account) - // - `ESB` - Spanish Peseta (convertible account) - // - `XDR` - Special Drawing Rights - // - `LKR` - Sri Lankan Rupee - // - `SHP` - St. Helena Pound - // - `XSU` - Sucre - // - `SDD` - Sudanese Dinar (1992–2007) - // - `SDG` - Sudanese Pound - // - `SDP` - Sudanese Pound (1957–1998) - // - `SRD` - Surinamese Dollar - // - `SRG` - Surinamese Guilder - // - `SZL` - Swazi Lilangeni - // - `SEK` - Swedish Krona - // - `CHF` - Swiss Franc - // - `SYP` - Syrian Pound - // - `STN` - São Tomé & Príncipe Dobra - // - `STD` - São Tomé & Príncipe Dobra (1977–2017) - // - `TVD` - TVD - // - `TJR` - Tajikistani Ruble - // - `TJS` - Tajikistani Somoni - // - `TZS` - Tanzanian Shilling - // - `XTS` - Testing Currency Code - // - `THB` - Thai Baht - // - `XXX` - The codes assigned for transactions where no currency is involved - // - `TPE` - Timorese Escudo - // - `TOP` - Tongan Paʻanga - // - `TTD` - Trinidad & Tobago Dollar - // - `TND` - Tunisian Dinar - // - `TRY` - Turkish Lira - // - `TRL` - Turkish Lira (1922–2005) - // - `TMT` - Turkmenistani Manat - // - `TMM` - Turkmenistani Manat (1993–2009) - // - `USD` - US Dollar - // - `USN` - US Dollar (Next day) - // - `USS` - US Dollar (Same day) - // - `UGX` - Ugandan Shilling - // - `UGS` - Ugandan Shilling (1966–1987) - // - `UAH` - Ukrainian Hryvnia - // - `UAK` - Ukrainian Karbovanets - // - `AED` - United Arab Emirates Dirham - // - `UYW` - Uruguayan Nominal Wage Index Unit - // - `UYU` - Uruguayan Peso - // - `UYP` - Uruguayan Peso (1975–1993) - // - `UYI` - Uruguayan Peso (Indexed Units) - // - `UZS` - Uzbekistani Som - // - `VUV` - Vanuatu Vatu - // - `VES` - Venezuelan Bolívar - // - `VEB` - Venezuelan Bolívar (1871–2008) - // - `VEF` - Venezuelan Bolívar (2008–2018) - // - `VND` - Vietnamese Dong - // - `VNN` - Vietnamese Dong (1978–1985) - // - `CHE` - WIR Euro - // - `CHW` - WIR Franc - // - `XOF` - West African CFA Franc - // - `YDD` - Yemeni Dinar - // - `YER` - Yemeni Rial - // - `YUN` - Yugoslavian Convertible Dinar (1990–1992) - // - `YUD` - Yugoslavian Hard Dinar (1966–1990) - // - `YUM` - Yugoslavian New Dinar (1994–2002) - // - `YUR` - Yugoslavian Reformed Dinar (1992–1993) - // - `ZWN` - ZWN - // - `ZRN` - Zairean New Zaire (1993–1998) - // - `ZRZ` - Zairean Zaire (1971–1993) - // - `ZMW` - Zambian Kwacha - // - `ZMK` - Zambian Kwacha (1968–2012) - // - `ZWD` - Zimbabwean Dollar (1980–2008) - // - `ZWR` - Zimbabwean Dollar (2008) - // - `ZWL` - Zimbabwean Dollar (2009) - Currency *PurchaseOrderRequestCurrency `json:"currency,omitempty"` - // If the transaction is inclusive or exclusive of tax. `True` if inclusive, `False` if exclusive. - InclusiveOfTax *bool `json:"inclusive_of_tax,omitempty"` - // The purchase order's exchange rate. - ExchangeRate *string `json:"exchange_rate,omitempty"` - TrackingCategories []*PurchaseOrderRequestTrackingCategoriesItem `json:"tracking_categories,omitempty"` - LineItems []*PurchaseOrderLineItemRequest `json:"line_items,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` - RemoteFields []*RemoteFieldRequest `json:"remote_fields,omitempty"` - - _rawJSON json.RawMessage +func (p PurchaseOrderAccountingPeriod) MarshalJSON() ([]byte, error) { + if p.typ == "String" || p.String != "" { + return json.Marshal(p.String) + } + if p.typ == "AccountingPeriod" || p.AccountingPeriod != nil { + return json.Marshal(p.AccountingPeriod) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) } -func (p *PurchaseOrderRequest) UnmarshalJSON(data []byte) error { - type unmarshaler PurchaseOrderRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *p = PurchaseOrderRequest(value) - p._rawJSON = json.RawMessage(data) - return nil +type PurchaseOrderAccountingPeriodVisitor interface { + VisitString(string) error + VisitAccountingPeriod(*AccountingPeriod) error } -func (p *PurchaseOrderRequest) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } +func (p *PurchaseOrderAccountingPeriod) Accept(visitor PurchaseOrderAccountingPeriodVisitor) error { + if p.typ == "String" || p.String != "" { + return visitor.VisitString(p.String) } - if value, err := core.StringifyJSON(p); err == nil { - return value + if p.typ == "AccountingPeriod" || p.AccountingPeriod != nil { + return visitor.VisitAccountingPeriod(p.AccountingPeriod) } - return fmt.Sprintf("%#v", p) + return fmt.Errorf("type %T does not include a non-empty union type", p) } // The company the purchase order belongs to. -type PurchaseOrderRequestCompany struct { - typeName string +type PurchaseOrderCompany struct { String string CompanyInfo *CompanyInfo + + typ string } -func NewPurchaseOrderRequestCompanyFromString(value string) *PurchaseOrderRequestCompany { - return &PurchaseOrderRequestCompany{typeName: "string", String: value} +func (p *PurchaseOrderCompany) GetString() string { + if p == nil { + return "" + } + return p.String } -func NewPurchaseOrderRequestCompanyFromCompanyInfo(value *CompanyInfo) *PurchaseOrderRequestCompany { - return &PurchaseOrderRequestCompany{typeName: "companyInfo", CompanyInfo: value} +func (p *PurchaseOrderCompany) GetCompanyInfo() *CompanyInfo { + if p == nil { + return nil + } + return p.CompanyInfo } -func (p *PurchaseOrderRequestCompany) UnmarshalJSON(data []byte) error { +func (p *PurchaseOrderCompany) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" + p.typ = "String" p.String = valueString return nil } valueCompanyInfo := new(CompanyInfo) if err := json.Unmarshal(data, &valueCompanyInfo); err == nil { - p.typeName = "companyInfo" + p.typ = "CompanyInfo" p.CompanyInfo = valueCompanyInfo return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, p) } -func (p PurchaseOrderRequestCompany) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": +func (p PurchaseOrderCompany) MarshalJSON() ([]byte, error) { + if p.typ == "String" || p.String != "" { return json.Marshal(p.String) - case "companyInfo": + } + if p.typ == "CompanyInfo" || p.CompanyInfo != nil { return json.Marshal(p.CompanyInfo) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) } -type PurchaseOrderRequestCompanyVisitor interface { +type PurchaseOrderCompanyVisitor interface { VisitString(string) error VisitCompanyInfo(*CompanyInfo) error } -func (p *PurchaseOrderRequestCompany) Accept(visitor PurchaseOrderRequestCompanyVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": +func (p *PurchaseOrderCompany) Accept(visitor PurchaseOrderCompanyVisitor) error { + if p.typ == "String" || p.String != "" { return visitor.VisitString(p.String) - case "companyInfo": + } + if p.typ == "CompanyInfo" || p.CompanyInfo != nil { return visitor.VisitCompanyInfo(p.CompanyInfo) } + return fmt.Errorf("type %T does not include a non-empty union type", p) } // The purchase order's currency. // -// - `XUA` - ADB Unit of Account -// - `AFN` - Afghan Afghani -// - `AFA` - Afghan Afghani (1927–2002) -// - `ALL` - Albanian Lek -// - `ALK` - Albanian Lek (1946–1965) -// - `DZD` - Algerian Dinar -// - `ADP` - Andorran Peseta -// - `AOA` - Angolan Kwanza -// - `AOK` - Angolan Kwanza (1977–1991) -// - `AON` - Angolan New Kwanza (1990–2000) -// - `AOR` - Angolan Readjusted Kwanza (1995–1999) -// - `ARA` - Argentine Austral -// - `ARS` - Argentine Peso -// - `ARM` - Argentine Peso (1881–1970) -// - `ARP` - Argentine Peso (1983–1985) -// - `ARL` - Argentine Peso Ley (1970–1983) -// - `AMD` - Armenian Dram -// - `AWG` - Aruban Florin -// - `AUD` - Australian Dollar -// - `ATS` - Austrian Schilling -// - `AZN` - Azerbaijani Manat -// - `AZM` - Azerbaijani Manat (1993–2006) -// - `BSD` - Bahamian Dollar -// - `BHD` - Bahraini Dinar -// - `BDT` - Bangladeshi Taka -// - `BBD` - Barbadian Dollar -// - `BYN` - Belarusian Ruble -// - `BYB` - Belarusian Ruble (1994–1999) -// - `BYR` - Belarusian Ruble (2000–2016) -// - `BEF` - Belgian Franc -// - `BEC` - Belgian Franc (convertible) -// - `BEL` - Belgian Franc (financial) -// - `BZD` - Belize Dollar -// - `BMD` - Bermudan Dollar -// - `BTN` - Bhutanese Ngultrum -// - `BOB` - Bolivian Boliviano -// - `BOL` - Bolivian Boliviano (1863–1963) -// - `BOV` - Bolivian Mvdol -// - `BOP` - Bolivian Peso -// - `BAM` - Bosnia-Herzegovina Convertible Mark -// - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) -// - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) -// - `BWP` - Botswanan Pula -// - `BRC` - Brazilian Cruzado (1986–1989) -// - `BRZ` - Brazilian Cruzeiro (1942–1967) -// - `BRE` - Brazilian Cruzeiro (1990–1993) -// - `BRR` - Brazilian Cruzeiro (1993–1994) -// - `BRN` - Brazilian New Cruzado (1989–1990) -// - `BRB` - Brazilian New Cruzeiro (1967–1986) -// - `BRL` - Brazilian Real -// - `GBP` - British Pound -// - `BND` - Brunei Dollar -// - `BGL` - Bulgarian Hard Lev -// - `BGN` - Bulgarian Lev -// - `BGO` - Bulgarian Lev (1879–1952) -// - `BGM` - Bulgarian Socialist Lev -// - `BUK` - Burmese Kyat -// - `BIF` - Burundian Franc -// - `XPF` - CFP Franc -// - `KHR` - Cambodian Riel -// - `CAD` - Canadian Dollar -// - `CVE` - Cape Verdean Escudo -// - `KYD` - Cayman Islands Dollar -// - `XAF` - Central African CFA Franc -// - `CLE` - Chilean Escudo -// - `CLP` - Chilean Peso -// - `CLF` - Chilean Unit of Account (UF) -// - `CNX` - Chinese People’s Bank Dollar -// - `CNY` - Chinese Yuan -// - `CNH` - Chinese Yuan (offshore) -// - `COP` - Colombian Peso -// - `COU` - Colombian Real Value Unit -// - `KMF` - Comorian Franc -// - `CDF` - Congolese Franc -// - `CRC` - Costa Rican Colón -// - `HRD` - Croatian Dinar -// - `HRK` - Croatian Kuna -// - `CUC` - Cuban Convertible Peso -// - `CUP` - Cuban Peso -// - `CYP` - Cypriot Pound -// - `CZK` - Czech Koruna -// - `CSK` - Czechoslovak Hard Koruna -// - `DKK` - Danish Krone -// - `DJF` - Djiboutian Franc -// - `DOP` - Dominican Peso -// - `NLG` - Dutch Guilder -// - `XCD` - East Caribbean Dollar -// - `DDM` - East German Mark -// - `ECS` - Ecuadorian Sucre -// - `ECV` - Ecuadorian Unit of Constant Value -// - `EGP` - Egyptian Pound -// - `GQE` - Equatorial Guinean Ekwele -// - `ERN` - Eritrean Nakfa -// - `EEK` - Estonian Kroon -// - `ETB` - Ethiopian Birr -// - `EUR` - Euro -// - `XBA` - European Composite Unit -// - `XEU` - European Currency Unit -// - `XBB` - European Monetary Unit -// - `XBC` - European Unit of Account (XBC) -// - `XBD` - European Unit of Account (XBD) -// - `FKP` - Falkland Islands Pound -// - `FJD` - Fijian Dollar -// - `FIM` - Finnish Markka -// - `FRF` - French Franc -// - `XFO` - French Gold Franc -// - `XFU` - French UIC-Franc -// - `GMD` - Gambian Dalasi -// - `GEK` - Georgian Kupon Larit -// - `GEL` - Georgian Lari -// - `DEM` - German Mark -// - `GHS` - Ghanaian Cedi -// - `GHC` - Ghanaian Cedi (1979–2007) -// - `GIP` - Gibraltar Pound -// - `XAU` - Gold -// - `GRD` - Greek Drachma -// - `GTQ` - Guatemalan Quetzal -// - `GWP` - Guinea-Bissau Peso -// - `GNF` - Guinean Franc -// - `GNS` - Guinean Syli -// - `GYD` - Guyanaese Dollar -// - `HTG` - Haitian Gourde -// - `HNL` - Honduran Lempira -// - `HKD` - Hong Kong Dollar -// - `HUF` - Hungarian Forint -// - `IMP` - IMP -// - `ISK` - Icelandic Króna -// - `ISJ` - Icelandic Króna (1918–1981) -// - `INR` - Indian Rupee -// - `IDR` - Indonesian Rupiah -// - `IRR` - Iranian Rial -// - `IQD` - Iraqi Dinar -// - `IEP` - Irish Pound -// - `ILS` - Israeli New Shekel -// - `ILP` - Israeli Pound -// - `ILR` - Israeli Shekel (1980–1985) -// - `ITL` - Italian Lira -// - `JMD` - Jamaican Dollar -// - `JPY` - Japanese Yen -// - `JOD` - Jordanian Dinar -// - `KZT` - Kazakhstani Tenge -// - `KES` - Kenyan Shilling -// - `KWD` - Kuwaiti Dinar -// - `KGS` - Kyrgystani Som -// - `LAK` - Laotian Kip -// - `LVL` - Latvian Lats -// - `LVR` - Latvian Ruble -// - `LBP` - Lebanese Pound -// - `LSL` - Lesotho Loti -// - `LRD` - Liberian Dollar -// - `LYD` - Libyan Dinar -// - `LTL` - Lithuanian Litas -// - `LTT` - Lithuanian Talonas -// - `LUL` - Luxembourg Financial Franc -// - `LUC` - Luxembourgian Convertible Franc -// - `LUF` - Luxembourgian Franc -// - `MOP` - Macanese Pataca -// - `MKD` - Macedonian Denar -// - `MKN` - Macedonian Denar (1992–1993) -// - `MGA` - Malagasy Ariary -// - `MGF` - Malagasy Franc -// - `MWK` - Malawian Kwacha -// - `MYR` - Malaysian Ringgit -// - `MVR` - Maldivian Rufiyaa -// - `MVP` - Maldivian Rupee (1947–1981) -// - `MLF` - Malian Franc -// - `MTL` - Maltese Lira -// - `MTP` - Maltese Pound -// - `MRU` - Mauritanian Ouguiya -// - `MRO` - Mauritanian Ouguiya (1973–2017) -// - `MUR` - Mauritian Rupee -// - `MXV` - Mexican Investment Unit -// - `MXN` - Mexican Peso -// - `MXP` - Mexican Silver Peso (1861–1992) -// - `MDC` - Moldovan Cupon -// - `MDL` - Moldovan Leu -// - `MCF` - Monegasque Franc -// - `MNT` - Mongolian Tugrik -// - `MAD` - Moroccan Dirham -// - `MAF` - Moroccan Franc -// - `MZE` - Mozambican Escudo -// - `MZN` - Mozambican Metical -// - `MZM` - Mozambican Metical (1980–2006) -// - `MMK` - Myanmar Kyat -// - `NAD` - Namibian Dollar -// - `NPR` - Nepalese Rupee -// - `ANG` - Netherlands Antillean Guilder -// - `TWD` - New Taiwan Dollar -// - `NZD` - New Zealand Dollar -// - `NIO` - Nicaraguan Córdoba -// - `NIC` - Nicaraguan Córdoba (1988–1991) -// - `NGN` - Nigerian Naira -// - `KPW` - North Korean Won -// - `NOK` - Norwegian Krone -// - `OMR` - Omani Rial -// - `PKR` - Pakistani Rupee -// - `XPD` - Palladium -// - `PAB` - Panamanian Balboa -// - `PGK` - Papua New Guinean Kina -// - `PYG` - Paraguayan Guarani -// - `PEI` - Peruvian Inti -// - `PEN` - Peruvian Sol -// - `PES` - Peruvian Sol (1863–1965) -// - `PHP` - Philippine Peso -// - `XPT` - Platinum -// - `PLN` - Polish Zloty -// - `PLZ` - Polish Zloty (1950–1995) -// - `PTE` - Portuguese Escudo -// - `GWE` - Portuguese Guinea Escudo -// - `QAR` - Qatari Rial -// - `XRE` - RINET Funds -// - `RHD` - Rhodesian Dollar -// - `RON` - Romanian Leu -// - `ROL` - Romanian Leu (1952–2006) -// - `RUB` - Russian Ruble -// - `RUR` - Russian Ruble (1991–1998) -// - `RWF` - Rwandan Franc -// - `SVC` - Salvadoran Colón -// - `WST` - Samoan Tala -// - `SAR` - Saudi Riyal -// - `RSD` - Serbian Dinar -// - `CSD` - Serbian Dinar (2002–2006) -// - `SCR` - Seychellois Rupee -// - `SLL` - Sierra Leonean Leone -// - `XAG` - Silver -// - `SGD` - Singapore Dollar -// - `SKK` - Slovak Koruna -// - `SIT` - Slovenian Tolar -// - `SBD` - Solomon Islands Dollar -// - `SOS` - Somali Shilling -// - `ZAR` - South African Rand -// - `ZAL` - South African Rand (financial) -// - `KRH` - South Korean Hwan (1953–1962) -// - `KRW` - South Korean Won -// - `KRO` - South Korean Won (1945–1953) -// - `SSP` - South Sudanese Pound -// - `SUR` - Soviet Rouble -// - `ESP` - Spanish Peseta -// - `ESA` - Spanish Peseta (A account) -// - `ESB` - Spanish Peseta (convertible account) -// - `XDR` - Special Drawing Rights -// - `LKR` - Sri Lankan Rupee -// - `SHP` - St. Helena Pound -// - `XSU` - Sucre -// - `SDD` - Sudanese Dinar (1992–2007) -// - `SDG` - Sudanese Pound -// - `SDP` - Sudanese Pound (1957–1998) -// - `SRD` - Surinamese Dollar -// - `SRG` - Surinamese Guilder -// - `SZL` - Swazi Lilangeni -// - `SEK` - Swedish Krona -// - `CHF` - Swiss Franc -// - `SYP` - Syrian Pound -// - `STN` - São Tomé & Príncipe Dobra -// - `STD` - São Tomé & Príncipe Dobra (1977–2017) -// - `TVD` - TVD -// - `TJR` - Tajikistani Ruble -// - `TJS` - Tajikistani Somoni -// - `TZS` - Tanzanian Shilling -// - `XTS` - Testing Currency Code -// - `THB` - Thai Baht -// - `XXX` - The codes assigned for transactions where no currency is involved -// - `TPE` - Timorese Escudo -// - `TOP` - Tongan Paʻanga -// - `TTD` - Trinidad & Tobago Dollar -// - `TND` - Tunisian Dinar -// - `TRY` - Turkish Lira -// - `TRL` - Turkish Lira (1922–2005) -// - `TMT` - Turkmenistani Manat -// - `TMM` - Turkmenistani Manat (1993–2009) -// - `USD` - US Dollar -// - `USN` - US Dollar (Next day) -// - `USS` - US Dollar (Same day) -// - `UGX` - Ugandan Shilling -// - `UGS` - Ugandan Shilling (1966–1987) -// - `UAH` - Ukrainian Hryvnia -// - `UAK` - Ukrainian Karbovanets -// - `AED` - United Arab Emirates Dirham -// - `UYW` - Uruguayan Nominal Wage Index Unit -// - `UYU` - Uruguayan Peso -// - `UYP` - Uruguayan Peso (1975–1993) -// - `UYI` - Uruguayan Peso (Indexed Units) -// - `UZS` - Uzbekistani Som -// - `VUV` - Vanuatu Vatu -// - `VES` - Venezuelan Bolívar -// - `VEB` - Venezuelan Bolívar (1871–2008) -// - `VEF` - Venezuelan Bolívar (2008–2018) -// - `VND` - Vietnamese Dong -// - `VNN` - Vietnamese Dong (1978–1985) -// - `CHE` - WIR Euro -// - `CHW` - WIR Franc -// - `XOF` - West African CFA Franc -// - `YDD` - Yemeni Dinar -// - `YER` - Yemeni Rial -// - `YUN` - Yugoslavian Convertible Dinar (1990–1992) -// - `YUD` - Yugoslavian Hard Dinar (1966–1990) -// - `YUM` - Yugoslavian New Dinar (1994–2002) -// - `YUR` - Yugoslavian Reformed Dinar (1992–1993) -// - `ZWN` - ZWN -// - `ZRN` - Zairean New Zaire (1993–1998) -// - `ZRZ` - Zairean Zaire (1971–1993) -// - `ZMW` - Zambian Kwacha -// - `ZMK` - Zambian Kwacha (1968–2012) -// - `ZWD` - Zimbabwean Dollar (1980–2008) -// - `ZWR` - Zimbabwean Dollar (2008) -// - `ZWL` - Zimbabwean Dollar (2009) -type PurchaseOrderRequestCurrency struct { - typeName string +// * `XUA` - ADB Unit of Account +// * `AFN` - Afghan Afghani +// * `AFA` - Afghan Afghani (1927–2002) +// * `ALL` - Albanian Lek +// * `ALK` - Albanian Lek (1946–1965) +// * `DZD` - Algerian Dinar +// * `ADP` - Andorran Peseta +// * `AOA` - Angolan Kwanza +// * `AOK` - Angolan Kwanza (1977–1991) +// * `AON` - Angolan New Kwanza (1990–2000) +// * `AOR` - Angolan Readjusted Kwanza (1995–1999) +// * `ARA` - Argentine Austral +// * `ARS` - Argentine Peso +// * `ARM` - Argentine Peso (1881–1970) +// * `ARP` - Argentine Peso (1983–1985) +// * `ARL` - Argentine Peso Ley (1970–1983) +// * `AMD` - Armenian Dram +// * `AWG` - Aruban Florin +// * `AUD` - Australian Dollar +// * `ATS` - Austrian Schilling +// * `AZN` - Azerbaijani Manat +// * `AZM` - Azerbaijani Manat (1993–2006) +// * `BSD` - Bahamian Dollar +// * `BHD` - Bahraini Dinar +// * `BDT` - Bangladeshi Taka +// * `BBD` - Barbadian Dollar +// * `BYN` - Belarusian Ruble +// * `BYB` - Belarusian Ruble (1994–1999) +// * `BYR` - Belarusian Ruble (2000–2016) +// * `BEF` - Belgian Franc +// * `BEC` - Belgian Franc (convertible) +// * `BEL` - Belgian Franc (financial) +// * `BZD` - Belize Dollar +// * `BMD` - Bermudan Dollar +// * `BTN` - Bhutanese Ngultrum +// * `BOB` - Bolivian Boliviano +// * `BOL` - Bolivian Boliviano (1863–1963) +// * `BOV` - Bolivian Mvdol +// * `BOP` - Bolivian Peso +// * `BAM` - Bosnia-Herzegovina Convertible Mark +// * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) +// * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) +// * `BWP` - Botswanan Pula +// * `BRC` - Brazilian Cruzado (1986–1989) +// * `BRZ` - Brazilian Cruzeiro (1942–1967) +// * `BRE` - Brazilian Cruzeiro (1990–1993) +// * `BRR` - Brazilian Cruzeiro (1993–1994) +// * `BRN` - Brazilian New Cruzado (1989–1990) +// * `BRB` - Brazilian New Cruzeiro (1967–1986) +// * `BRL` - Brazilian Real +// * `GBP` - British Pound +// * `BND` - Brunei Dollar +// * `BGL` - Bulgarian Hard Lev +// * `BGN` - Bulgarian Lev +// * `BGO` - Bulgarian Lev (1879–1952) +// * `BGM` - Bulgarian Socialist Lev +// * `BUK` - Burmese Kyat +// * `BIF` - Burundian Franc +// * `XPF` - CFP Franc +// * `KHR` - Cambodian Riel +// * `CAD` - Canadian Dollar +// * `CVE` - Cape Verdean Escudo +// * `KYD` - Cayman Islands Dollar +// * `XAF` - Central African CFA Franc +// * `CLE` - Chilean Escudo +// * `CLP` - Chilean Peso +// * `CLF` - Chilean Unit of Account (UF) +// * `CNX` - Chinese People’s Bank Dollar +// * `CNY` - Chinese Yuan +// * `CNH` - Chinese Yuan (offshore) +// * `COP` - Colombian Peso +// * `COU` - Colombian Real Value Unit +// * `KMF` - Comorian Franc +// * `CDF` - Congolese Franc +// * `CRC` - Costa Rican Colón +// * `HRD` - Croatian Dinar +// * `HRK` - Croatian Kuna +// * `CUC` - Cuban Convertible Peso +// * `CUP` - Cuban Peso +// * `CYP` - Cypriot Pound +// * `CZK` - Czech Koruna +// * `CSK` - Czechoslovak Hard Koruna +// * `DKK` - Danish Krone +// * `DJF` - Djiboutian Franc +// * `DOP` - Dominican Peso +// * `NLG` - Dutch Guilder +// * `XCD` - East Caribbean Dollar +// * `DDM` - East German Mark +// * `ECS` - Ecuadorian Sucre +// * `ECV` - Ecuadorian Unit of Constant Value +// * `EGP` - Egyptian Pound +// * `GQE` - Equatorial Guinean Ekwele +// * `ERN` - Eritrean Nakfa +// * `EEK` - Estonian Kroon +// * `ETB` - Ethiopian Birr +// * `EUR` - Euro +// * `XBA` - European Composite Unit +// * `XEU` - European Currency Unit +// * `XBB` - European Monetary Unit +// * `XBC` - European Unit of Account (XBC) +// * `XBD` - European Unit of Account (XBD) +// * `FKP` - Falkland Islands Pound +// * `FJD` - Fijian Dollar +// * `FIM` - Finnish Markka +// * `FRF` - French Franc +// * `XFO` - French Gold Franc +// * `XFU` - French UIC-Franc +// * `GMD` - Gambian Dalasi +// * `GEK` - Georgian Kupon Larit +// * `GEL` - Georgian Lari +// * `DEM` - German Mark +// * `GHS` - Ghanaian Cedi +// * `GHC` - Ghanaian Cedi (1979–2007) +// * `GIP` - Gibraltar Pound +// * `XAU` - Gold +// * `GRD` - Greek Drachma +// * `GTQ` - Guatemalan Quetzal +// * `GWP` - Guinea-Bissau Peso +// * `GNF` - Guinean Franc +// * `GNS` - Guinean Syli +// * `GYD` - Guyanaese Dollar +// * `HTG` - Haitian Gourde +// * `HNL` - Honduran Lempira +// * `HKD` - Hong Kong Dollar +// * `HUF` - Hungarian Forint +// * `IMP` - IMP +// * `ISK` - Icelandic Króna +// * `ISJ` - Icelandic Króna (1918–1981) +// * `INR` - Indian Rupee +// * `IDR` - Indonesian Rupiah +// * `IRR` - Iranian Rial +// * `IQD` - Iraqi Dinar +// * `IEP` - Irish Pound +// * `ILS` - Israeli New Shekel +// * `ILP` - Israeli Pound +// * `ILR` - Israeli Shekel (1980–1985) +// * `ITL` - Italian Lira +// * `JMD` - Jamaican Dollar +// * `JPY` - Japanese Yen +// * `JOD` - Jordanian Dinar +// * `KZT` - Kazakhstani Tenge +// * `KES` - Kenyan Shilling +// * `KWD` - Kuwaiti Dinar +// * `KGS` - Kyrgystani Som +// * `LAK` - Laotian Kip +// * `LVL` - Latvian Lats +// * `LVR` - Latvian Ruble +// * `LBP` - Lebanese Pound +// * `LSL` - Lesotho Loti +// * `LRD` - Liberian Dollar +// * `LYD` - Libyan Dinar +// * `LTL` - Lithuanian Litas +// * `LTT` - Lithuanian Talonas +// * `LUL` - Luxembourg Financial Franc +// * `LUC` - Luxembourgian Convertible Franc +// * `LUF` - Luxembourgian Franc +// * `MOP` - Macanese Pataca +// * `MKD` - Macedonian Denar +// * `MKN` - Macedonian Denar (1992–1993) +// * `MGA` - Malagasy Ariary +// * `MGF` - Malagasy Franc +// * `MWK` - Malawian Kwacha +// * `MYR` - Malaysian Ringgit +// * `MVR` - Maldivian Rufiyaa +// * `MVP` - Maldivian Rupee (1947–1981) +// * `MLF` - Malian Franc +// * `MTL` - Maltese Lira +// * `MTP` - Maltese Pound +// * `MRU` - Mauritanian Ouguiya +// * `MRO` - Mauritanian Ouguiya (1973–2017) +// * `MUR` - Mauritian Rupee +// * `MXV` - Mexican Investment Unit +// * `MXN` - Mexican Peso +// * `MXP` - Mexican Silver Peso (1861–1992) +// * `MDC` - Moldovan Cupon +// * `MDL` - Moldovan Leu +// * `MCF` - Monegasque Franc +// * `MNT` - Mongolian Tugrik +// * `MAD` - Moroccan Dirham +// * `MAF` - Moroccan Franc +// * `MZE` - Mozambican Escudo +// * `MZN` - Mozambican Metical +// * `MZM` - Mozambican Metical (1980–2006) +// * `MMK` - Myanmar Kyat +// * `NAD` - Namibian Dollar +// * `NPR` - Nepalese Rupee +// * `ANG` - Netherlands Antillean Guilder +// * `TWD` - New Taiwan Dollar +// * `NZD` - New Zealand Dollar +// * `NIO` - Nicaraguan Córdoba +// * `NIC` - Nicaraguan Córdoba (1988–1991) +// * `NGN` - Nigerian Naira +// * `KPW` - North Korean Won +// * `NOK` - Norwegian Krone +// * `OMR` - Omani Rial +// * `PKR` - Pakistani Rupee +// * `XPD` - Palladium +// * `PAB` - Panamanian Balboa +// * `PGK` - Papua New Guinean Kina +// * `PYG` - Paraguayan Guarani +// * `PEI` - Peruvian Inti +// * `PEN` - Peruvian Sol +// * `PES` - Peruvian Sol (1863–1965) +// * `PHP` - Philippine Peso +// * `XPT` - Platinum +// * `PLN` - Polish Zloty +// * `PLZ` - Polish Zloty (1950–1995) +// * `PTE` - Portuguese Escudo +// * `GWE` - Portuguese Guinea Escudo +// * `QAR` - Qatari Rial +// * `XRE` - RINET Funds +// * `RHD` - Rhodesian Dollar +// * `RON` - Romanian Leu +// * `ROL` - Romanian Leu (1952–2006) +// * `RUB` - Russian Ruble +// * `RUR` - Russian Ruble (1991–1998) +// * `RWF` - Rwandan Franc +// * `SVC` - Salvadoran Colón +// * `WST` - Samoan Tala +// * `SAR` - Saudi Riyal +// * `RSD` - Serbian Dinar +// * `CSD` - Serbian Dinar (2002–2006) +// * `SCR` - Seychellois Rupee +// * `SLL` - Sierra Leonean Leone +// * `XAG` - Silver +// * `SGD` - Singapore Dollar +// * `SKK` - Slovak Koruna +// * `SIT` - Slovenian Tolar +// * `SBD` - Solomon Islands Dollar +// * `SOS` - Somali Shilling +// * `ZAR` - South African Rand +// * `ZAL` - South African Rand (financial) +// * `KRH` - South Korean Hwan (1953–1962) +// * `KRW` - South Korean Won +// * `KRO` - South Korean Won (1945–1953) +// * `SSP` - South Sudanese Pound +// * `SUR` - Soviet Rouble +// * `ESP` - Spanish Peseta +// * `ESA` - Spanish Peseta (A account) +// * `ESB` - Spanish Peseta (convertible account) +// * `XDR` - Special Drawing Rights +// * `LKR` - Sri Lankan Rupee +// * `SHP` - St. Helena Pound +// * `XSU` - Sucre +// * `SDD` - Sudanese Dinar (1992–2007) +// * `SDG` - Sudanese Pound +// * `SDP` - Sudanese Pound (1957–1998) +// * `SRD` - Surinamese Dollar +// * `SRG` - Surinamese Guilder +// * `SZL` - Swazi Lilangeni +// * `SEK` - Swedish Krona +// * `CHF` - Swiss Franc +// * `SYP` - Syrian Pound +// * `STN` - São Tomé & Príncipe Dobra +// * `STD` - São Tomé & Príncipe Dobra (1977–2017) +// * `TVD` - TVD +// * `TJR` - Tajikistani Ruble +// * `TJS` - Tajikistani Somoni +// * `TZS` - Tanzanian Shilling +// * `XTS` - Testing Currency Code +// * `THB` - Thai Baht +// * `XXX` - The codes assigned for transactions where no currency is involved +// * `TPE` - Timorese Escudo +// * `TOP` - Tongan Paʻanga +// * `TTD` - Trinidad & Tobago Dollar +// * `TND` - Tunisian Dinar +// * `TRY` - Turkish Lira +// * `TRL` - Turkish Lira (1922–2005) +// * `TMT` - Turkmenistani Manat +// * `TMM` - Turkmenistani Manat (1993–2009) +// * `USD` - US Dollar +// * `USN` - US Dollar (Next day) +// * `USS` - US Dollar (Same day) +// * `UGX` - Ugandan Shilling +// * `UGS` - Ugandan Shilling (1966–1987) +// * `UAH` - Ukrainian Hryvnia +// * `UAK` - Ukrainian Karbovanets +// * `AED` - United Arab Emirates Dirham +// * `UYW` - Uruguayan Nominal Wage Index Unit +// * `UYU` - Uruguayan Peso +// * `UYP` - Uruguayan Peso (1975–1993) +// * `UYI` - Uruguayan Peso (Indexed Units) +// * `UZS` - Uzbekistani Som +// * `VUV` - Vanuatu Vatu +// * `VES` - Venezuelan Bolívar +// * `VEB` - Venezuelan Bolívar (1871–2008) +// * `VEF` - Venezuelan Bolívar (2008–2018) +// * `VND` - Vietnamese Dong +// * `VNN` - Vietnamese Dong (1978–1985) +// * `CHE` - WIR Euro +// * `CHW` - WIR Franc +// * `XOF` - West African CFA Franc +// * `YDD` - Yemeni Dinar +// * `YER` - Yemeni Rial +// * `YUN` - Yugoslavian Convertible Dinar (1990–1992) +// * `YUD` - Yugoslavian Hard Dinar (1966–1990) +// * `YUM` - Yugoslavian New Dinar (1994–2002) +// * `YUR` - Yugoslavian Reformed Dinar (1992–1993) +// * `ZWN` - ZWN +// * `ZRN` - Zairean New Zaire (1993–1998) +// * `ZRZ` - Zairean Zaire (1971–1993) +// * `ZMW` - Zambian Kwacha +// * `ZMK` - Zambian Kwacha (1968–2012) +// * `ZWD` - Zimbabwean Dollar (1980–2008) +// * `ZWR` - Zimbabwean Dollar (2008) +// * `ZWL` - Zimbabwean Dollar (2009) +type PurchaseOrderCurrency struct { TransactionCurrencyEnum TransactionCurrencyEnum String string + + typ string } -func NewPurchaseOrderRequestCurrencyFromTransactionCurrencyEnum(value TransactionCurrencyEnum) *PurchaseOrderRequestCurrency { - return &PurchaseOrderRequestCurrency{typeName: "transactionCurrencyEnum", TransactionCurrencyEnum: value} +func (p *PurchaseOrderCurrency) GetTransactionCurrencyEnum() TransactionCurrencyEnum { + if p == nil { + return "" + } + return p.TransactionCurrencyEnum } -func NewPurchaseOrderRequestCurrencyFromString(value string) *PurchaseOrderRequestCurrency { - return &PurchaseOrderRequestCurrency{typeName: "string", String: value} +func (p *PurchaseOrderCurrency) GetString() string { + if p == nil { + return "" + } + return p.String } -func (p *PurchaseOrderRequestCurrency) UnmarshalJSON(data []byte) error { +func (p *PurchaseOrderCurrency) UnmarshalJSON(data []byte) error { var valueTransactionCurrencyEnum TransactionCurrencyEnum if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { - p.typeName = "transactionCurrencyEnum" + p.typ = "TransactionCurrencyEnum" p.TransactionCurrencyEnum = valueTransactionCurrencyEnum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" + p.typ = "String" p.String = valueString return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, p) } -func (p PurchaseOrderRequestCurrency) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "transactionCurrencyEnum": +func (p PurchaseOrderCurrency) MarshalJSON() ([]byte, error) { + if p.typ == "TransactionCurrencyEnum" || p.TransactionCurrencyEnum != "" { return json.Marshal(p.TransactionCurrencyEnum) - case "string": + } + if p.typ == "String" || p.String != "" { return json.Marshal(p.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) } -type PurchaseOrderRequestCurrencyVisitor interface { +type PurchaseOrderCurrencyVisitor interface { VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error VisitString(string) error } -func (p *PurchaseOrderRequestCurrency) Accept(visitor PurchaseOrderRequestCurrencyVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "transactionCurrencyEnum": +func (p *PurchaseOrderCurrency) Accept(visitor PurchaseOrderCurrencyVisitor) error { + if p.typ == "TransactionCurrencyEnum" || p.TransactionCurrencyEnum != "" { return visitor.VisitTransactionCurrencyEnum(p.TransactionCurrencyEnum) - case "string": + } + if p.typ == "String" || p.String != "" { return visitor.VisitString(p.String) } + return fmt.Errorf("type %T does not include a non-empty union type", p) } // The purchase order's delivery address. -type PurchaseOrderRequestDeliveryAddress struct { - typeName string - String string - Address *Address +type PurchaseOrderDeliveryAddress struct { + String string + Address *Address + + typ string } -func NewPurchaseOrderRequestDeliveryAddressFromString(value string) *PurchaseOrderRequestDeliveryAddress { - return &PurchaseOrderRequestDeliveryAddress{typeName: "string", String: value} +func (p *PurchaseOrderDeliveryAddress) GetString() string { + if p == nil { + return "" + } + return p.String } -func NewPurchaseOrderRequestDeliveryAddressFromAddress(value *Address) *PurchaseOrderRequestDeliveryAddress { - return &PurchaseOrderRequestDeliveryAddress{typeName: "address", Address: value} +func (p *PurchaseOrderDeliveryAddress) GetAddress() *Address { + if p == nil { + return nil + } + return p.Address } -func (p *PurchaseOrderRequestDeliveryAddress) UnmarshalJSON(data []byte) error { +func (p *PurchaseOrderDeliveryAddress) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" + p.typ = "String" p.String = valueString return nil } valueAddress := new(Address) if err := json.Unmarshal(data, &valueAddress); err == nil { - p.typeName = "address" + p.typ = "Address" p.Address = valueAddress return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, p) } -func (p PurchaseOrderRequestDeliveryAddress) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": +func (p PurchaseOrderDeliveryAddress) MarshalJSON() ([]byte, error) { + if p.typ == "String" || p.String != "" { return json.Marshal(p.String) - case "address": + } + if p.typ == "Address" || p.Address != nil { return json.Marshal(p.Address) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) } -type PurchaseOrderRequestDeliveryAddressVisitor interface { +type PurchaseOrderDeliveryAddressVisitor interface { VisitString(string) error VisitAddress(*Address) error } -func (p *PurchaseOrderRequestDeliveryAddress) Accept(visitor PurchaseOrderRequestDeliveryAddressVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": +func (p *PurchaseOrderDeliveryAddress) Accept(visitor PurchaseOrderDeliveryAddressVisitor) error { + if p.typ == "String" || p.String != "" { return visitor.VisitString(p.String) - case "address": + } + if p.typ == "Address" || p.Address != nil { return visitor.VisitAddress(p.Address) } + return fmt.Errorf("type %T does not include a non-empty union type", p) } -// The purchase order's status. +// # The PurchaseOrderLineItem Object +// ### Description +// The `PurchaseOrderLineItem` object is used to represent a purchase order's line item. // -// - `DRAFT` - DRAFT -// - `SUBMITTED` - SUBMITTED -// - `AUTHORIZED` - AUTHORIZED -// - `BILLED` - BILLED -// - `DELETED` - DELETED -type PurchaseOrderRequestStatus struct { - typeName string - PurchaseOrderStatusEnum PurchaseOrderStatusEnum - String string +// ### Usage Example +// Fetch from the `GET PurchaseOrder` endpoint and view a company's purchase orders. +type PurchaseOrderLineItem struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // A description of the good being purchased. + Description *string `json:"description,omitempty" url:"description,omitempty"` + // The line item's unit price. + UnitPrice *float64 `json:"unit_price,omitempty" url:"unit_price,omitempty"` + // The line item's quantity. + Quantity *float64 `json:"quantity,omitempty" url:"quantity,omitempty"` + Item *PurchaseOrderLineItemItem `json:"item,omitempty" url:"item,omitempty"` + // The purchase order line item's account. + Account *string `json:"account,omitempty" url:"account,omitempty"` + // The purchase order line item's associated tracking category. + TrackingCategory *string `json:"tracking_category,omitempty" url:"tracking_category,omitempty"` + // The purchase order line item's associated tracking categories. + TrackingCategories []*string `json:"tracking_categories,omitempty" url:"tracking_categories,omitempty"` + // The purchase order line item's tax amount. + TaxAmount *string `json:"tax_amount,omitempty" url:"tax_amount,omitempty"` + // The purchase order line item's total amount. + TotalLineAmount *string `json:"total_line_amount,omitempty" url:"total_line_amount,omitempty"` + // The purchase order line item's currency. + // + // * `XUA` - ADB Unit of Account + // * `AFN` - Afghan Afghani + // * `AFA` - Afghan Afghani (1927–2002) + // * `ALL` - Albanian Lek + // * `ALK` - Albanian Lek (1946–1965) + // * `DZD` - Algerian Dinar + // * `ADP` - Andorran Peseta + // * `AOA` - Angolan Kwanza + // * `AOK` - Angolan Kwanza (1977–1991) + // * `AON` - Angolan New Kwanza (1990–2000) + // * `AOR` - Angolan Readjusted Kwanza (1995–1999) + // * `ARA` - Argentine Austral + // * `ARS` - Argentine Peso + // * `ARM` - Argentine Peso (1881–1970) + // * `ARP` - Argentine Peso (1983–1985) + // * `ARL` - Argentine Peso Ley (1970–1983) + // * `AMD` - Armenian Dram + // * `AWG` - Aruban Florin + // * `AUD` - Australian Dollar + // * `ATS` - Austrian Schilling + // * `AZN` - Azerbaijani Manat + // * `AZM` - Azerbaijani Manat (1993–2006) + // * `BSD` - Bahamian Dollar + // * `BHD` - Bahraini Dinar + // * `BDT` - Bangladeshi Taka + // * `BBD` - Barbadian Dollar + // * `BYN` - Belarusian Ruble + // * `BYB` - Belarusian Ruble (1994–1999) + // * `BYR` - Belarusian Ruble (2000–2016) + // * `BEF` - Belgian Franc + // * `BEC` - Belgian Franc (convertible) + // * `BEL` - Belgian Franc (financial) + // * `BZD` - Belize Dollar + // * `BMD` - Bermudan Dollar + // * `BTN` - Bhutanese Ngultrum + // * `BOB` - Bolivian Boliviano + // * `BOL` - Bolivian Boliviano (1863–1963) + // * `BOV` - Bolivian Mvdol + // * `BOP` - Bolivian Peso + // * `BAM` - Bosnia-Herzegovina Convertible Mark + // * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + // * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + // * `BWP` - Botswanan Pula + // * `BRC` - Brazilian Cruzado (1986–1989) + // * `BRZ` - Brazilian Cruzeiro (1942–1967) + // * `BRE` - Brazilian Cruzeiro (1990–1993) + // * `BRR` - Brazilian Cruzeiro (1993–1994) + // * `BRN` - Brazilian New Cruzado (1989–1990) + // * `BRB` - Brazilian New Cruzeiro (1967–1986) + // * `BRL` - Brazilian Real + // * `GBP` - British Pound + // * `BND` - Brunei Dollar + // * `BGL` - Bulgarian Hard Lev + // * `BGN` - Bulgarian Lev + // * `BGO` - Bulgarian Lev (1879–1952) + // * `BGM` - Bulgarian Socialist Lev + // * `BUK` - Burmese Kyat + // * `BIF` - Burundian Franc + // * `XPF` - CFP Franc + // * `KHR` - Cambodian Riel + // * `CAD` - Canadian Dollar + // * `CVE` - Cape Verdean Escudo + // * `KYD` - Cayman Islands Dollar + // * `XAF` - Central African CFA Franc + // * `CLE` - Chilean Escudo + // * `CLP` - Chilean Peso + // * `CLF` - Chilean Unit of Account (UF) + // * `CNX` - Chinese People’s Bank Dollar + // * `CNY` - Chinese Yuan + // * `CNH` - Chinese Yuan (offshore) + // * `COP` - Colombian Peso + // * `COU` - Colombian Real Value Unit + // * `KMF` - Comorian Franc + // * `CDF` - Congolese Franc + // * `CRC` - Costa Rican Colón + // * `HRD` - Croatian Dinar + // * `HRK` - Croatian Kuna + // * `CUC` - Cuban Convertible Peso + // * `CUP` - Cuban Peso + // * `CYP` - Cypriot Pound + // * `CZK` - Czech Koruna + // * `CSK` - Czechoslovak Hard Koruna + // * `DKK` - Danish Krone + // * `DJF` - Djiboutian Franc + // * `DOP` - Dominican Peso + // * `NLG` - Dutch Guilder + // * `XCD` - East Caribbean Dollar + // * `DDM` - East German Mark + // * `ECS` - Ecuadorian Sucre + // * `ECV` - Ecuadorian Unit of Constant Value + // * `EGP` - Egyptian Pound + // * `GQE` - Equatorial Guinean Ekwele + // * `ERN` - Eritrean Nakfa + // * `EEK` - Estonian Kroon + // * `ETB` - Ethiopian Birr + // * `EUR` - Euro + // * `XBA` - European Composite Unit + // * `XEU` - European Currency Unit + // * `XBB` - European Monetary Unit + // * `XBC` - European Unit of Account (XBC) + // * `XBD` - European Unit of Account (XBD) + // * `FKP` - Falkland Islands Pound + // * `FJD` - Fijian Dollar + // * `FIM` - Finnish Markka + // * `FRF` - French Franc + // * `XFO` - French Gold Franc + // * `XFU` - French UIC-Franc + // * `GMD` - Gambian Dalasi + // * `GEK` - Georgian Kupon Larit + // * `GEL` - Georgian Lari + // * `DEM` - German Mark + // * `GHS` - Ghanaian Cedi + // * `GHC` - Ghanaian Cedi (1979–2007) + // * `GIP` - Gibraltar Pound + // * `XAU` - Gold + // * `GRD` - Greek Drachma + // * `GTQ` - Guatemalan Quetzal + // * `GWP` - Guinea-Bissau Peso + // * `GNF` - Guinean Franc + // * `GNS` - Guinean Syli + // * `GYD` - Guyanaese Dollar + // * `HTG` - Haitian Gourde + // * `HNL` - Honduran Lempira + // * `HKD` - Hong Kong Dollar + // * `HUF` - Hungarian Forint + // * `IMP` - IMP + // * `ISK` - Icelandic Króna + // * `ISJ` - Icelandic Króna (1918–1981) + // * `INR` - Indian Rupee + // * `IDR` - Indonesian Rupiah + // * `IRR` - Iranian Rial + // * `IQD` - Iraqi Dinar + // * `IEP` - Irish Pound + // * `ILS` - Israeli New Shekel + // * `ILP` - Israeli Pound + // * `ILR` - Israeli Shekel (1980–1985) + // * `ITL` - Italian Lira + // * `JMD` - Jamaican Dollar + // * `JPY` - Japanese Yen + // * `JOD` - Jordanian Dinar + // * `KZT` - Kazakhstani Tenge + // * `KES` - Kenyan Shilling + // * `KWD` - Kuwaiti Dinar + // * `KGS` - Kyrgystani Som + // * `LAK` - Laotian Kip + // * `LVL` - Latvian Lats + // * `LVR` - Latvian Ruble + // * `LBP` - Lebanese Pound + // * `LSL` - Lesotho Loti + // * `LRD` - Liberian Dollar + // * `LYD` - Libyan Dinar + // * `LTL` - Lithuanian Litas + // * `LTT` - Lithuanian Talonas + // * `LUL` - Luxembourg Financial Franc + // * `LUC` - Luxembourgian Convertible Franc + // * `LUF` - Luxembourgian Franc + // * `MOP` - Macanese Pataca + // * `MKD` - Macedonian Denar + // * `MKN` - Macedonian Denar (1992–1993) + // * `MGA` - Malagasy Ariary + // * `MGF` - Malagasy Franc + // * `MWK` - Malawian Kwacha + // * `MYR` - Malaysian Ringgit + // * `MVR` - Maldivian Rufiyaa + // * `MVP` - Maldivian Rupee (1947–1981) + // * `MLF` - Malian Franc + // * `MTL` - Maltese Lira + // * `MTP` - Maltese Pound + // * `MRU` - Mauritanian Ouguiya + // * `MRO` - Mauritanian Ouguiya (1973–2017) + // * `MUR` - Mauritian Rupee + // * `MXV` - Mexican Investment Unit + // * `MXN` - Mexican Peso + // * `MXP` - Mexican Silver Peso (1861–1992) + // * `MDC` - Moldovan Cupon + // * `MDL` - Moldovan Leu + // * `MCF` - Monegasque Franc + // * `MNT` - Mongolian Tugrik + // * `MAD` - Moroccan Dirham + // * `MAF` - Moroccan Franc + // * `MZE` - Mozambican Escudo + // * `MZN` - Mozambican Metical + // * `MZM` - Mozambican Metical (1980–2006) + // * `MMK` - Myanmar Kyat + // * `NAD` - Namibian Dollar + // * `NPR` - Nepalese Rupee + // * `ANG` - Netherlands Antillean Guilder + // * `TWD` - New Taiwan Dollar + // * `NZD` - New Zealand Dollar + // * `NIO` - Nicaraguan Córdoba + // * `NIC` - Nicaraguan Córdoba (1988–1991) + // * `NGN` - Nigerian Naira + // * `KPW` - North Korean Won + // * `NOK` - Norwegian Krone + // * `OMR` - Omani Rial + // * `PKR` - Pakistani Rupee + // * `XPD` - Palladium + // * `PAB` - Panamanian Balboa + // * `PGK` - Papua New Guinean Kina + // * `PYG` - Paraguayan Guarani + // * `PEI` - Peruvian Inti + // * `PEN` - Peruvian Sol + // * `PES` - Peruvian Sol (1863–1965) + // * `PHP` - Philippine Peso + // * `XPT` - Platinum + // * `PLN` - Polish Zloty + // * `PLZ` - Polish Zloty (1950–1995) + // * `PTE` - Portuguese Escudo + // * `GWE` - Portuguese Guinea Escudo + // * `QAR` - Qatari Rial + // * `XRE` - RINET Funds + // * `RHD` - Rhodesian Dollar + // * `RON` - Romanian Leu + // * `ROL` - Romanian Leu (1952–2006) + // * `RUB` - Russian Ruble + // * `RUR` - Russian Ruble (1991–1998) + // * `RWF` - Rwandan Franc + // * `SVC` - Salvadoran Colón + // * `WST` - Samoan Tala + // * `SAR` - Saudi Riyal + // * `RSD` - Serbian Dinar + // * `CSD` - Serbian Dinar (2002–2006) + // * `SCR` - Seychellois Rupee + // * `SLL` - Sierra Leonean Leone + // * `XAG` - Silver + // * `SGD` - Singapore Dollar + // * `SKK` - Slovak Koruna + // * `SIT` - Slovenian Tolar + // * `SBD` - Solomon Islands Dollar + // * `SOS` - Somali Shilling + // * `ZAR` - South African Rand + // * `ZAL` - South African Rand (financial) + // * `KRH` - South Korean Hwan (1953–1962) + // * `KRW` - South Korean Won + // * `KRO` - South Korean Won (1945–1953) + // * `SSP` - South Sudanese Pound + // * `SUR` - Soviet Rouble + // * `ESP` - Spanish Peseta + // * `ESA` - Spanish Peseta (A account) + // * `ESB` - Spanish Peseta (convertible account) + // * `XDR` - Special Drawing Rights + // * `LKR` - Sri Lankan Rupee + // * `SHP` - St. Helena Pound + // * `XSU` - Sucre + // * `SDD` - Sudanese Dinar (1992–2007) + // * `SDG` - Sudanese Pound + // * `SDP` - Sudanese Pound (1957–1998) + // * `SRD` - Surinamese Dollar + // * `SRG` - Surinamese Guilder + // * `SZL` - Swazi Lilangeni + // * `SEK` - Swedish Krona + // * `CHF` - Swiss Franc + // * `SYP` - Syrian Pound + // * `STN` - São Tomé & Príncipe Dobra + // * `STD` - São Tomé & Príncipe Dobra (1977–2017) + // * `TVD` - TVD + // * `TJR` - Tajikistani Ruble + // * `TJS` - Tajikistani Somoni + // * `TZS` - Tanzanian Shilling + // * `XTS` - Testing Currency Code + // * `THB` - Thai Baht + // * `XXX` - The codes assigned for transactions where no currency is involved + // * `TPE` - Timorese Escudo + // * `TOP` - Tongan Paʻanga + // * `TTD` - Trinidad & Tobago Dollar + // * `TND` - Tunisian Dinar + // * `TRY` - Turkish Lira + // * `TRL` - Turkish Lira (1922–2005) + // * `TMT` - Turkmenistani Manat + // * `TMM` - Turkmenistani Manat (1993–2009) + // * `USD` - US Dollar + // * `USN` - US Dollar (Next day) + // * `USS` - US Dollar (Same day) + // * `UGX` - Ugandan Shilling + // * `UGS` - Ugandan Shilling (1966–1987) + // * `UAH` - Ukrainian Hryvnia + // * `UAK` - Ukrainian Karbovanets + // * `AED` - United Arab Emirates Dirham + // * `UYW` - Uruguayan Nominal Wage Index Unit + // * `UYU` - Uruguayan Peso + // * `UYP` - Uruguayan Peso (1975–1993) + // * `UYI` - Uruguayan Peso (Indexed Units) + // * `UZS` - Uzbekistani Som + // * `VUV` - Vanuatu Vatu + // * `VES` - Venezuelan Bolívar + // * `VEB` - Venezuelan Bolívar (1871–2008) + // * `VEF` - Venezuelan Bolívar (2008–2018) + // * `VND` - Vietnamese Dong + // * `VNN` - Vietnamese Dong (1978–1985) + // * `CHE` - WIR Euro + // * `CHW` - WIR Franc + // * `XOF` - West African CFA Franc + // * `YDD` - Yemeni Dinar + // * `YER` - Yemeni Rial + // * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + // * `YUD` - Yugoslavian Hard Dinar (1966–1990) + // * `YUM` - Yugoslavian New Dinar (1994–2002) + // * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + // * `ZWN` - ZWN + // * `ZRN` - Zairean New Zaire (1993–1998) + // * `ZRZ` - Zairean Zaire (1971–1993) + // * `ZMW` - Zambian Kwacha + // * `ZMK` - Zambian Kwacha (1968–2012) + // * `ZWD` - Zimbabwean Dollar (1980–2008) + // * `ZWR` - Zimbabwean Dollar (2008) + // * `ZWL` - Zimbabwean Dollar (2009) + Currency *PurchaseOrderLineItemCurrency `json:"currency,omitempty" url:"currency,omitempty"` + // The tax rate that applies to this line item. + TaxRate *string `json:"tax_rate,omitempty" url:"tax_rate,omitempty"` + // The purchase order line item's exchange rate. + ExchangeRate *string `json:"exchange_rate,omitempty" url:"exchange_rate,omitempty"` + // The company the purchase order line item belongs to. + Company *string `json:"company,omitempty" url:"company,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + RemoteFields []*RemoteField `json:"remote_fields,omitempty" url:"remote_fields,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func NewPurchaseOrderRequestStatusFromPurchaseOrderStatusEnum(value PurchaseOrderStatusEnum) *PurchaseOrderRequestStatus { - return &PurchaseOrderRequestStatus{typeName: "purchaseOrderStatusEnum", PurchaseOrderStatusEnum: value} +func (p *PurchaseOrderLineItem) GetId() *string { + if p == nil { + return nil + } + return p.Id } -func NewPurchaseOrderRequestStatusFromString(value string) *PurchaseOrderRequestStatus { - return &PurchaseOrderRequestStatus{typeName: "string", String: value} +func (p *PurchaseOrderLineItem) GetRemoteId() *string { + if p == nil { + return nil + } + return p.RemoteId } -func (p *PurchaseOrderRequestStatus) UnmarshalJSON(data []byte) error { - var valuePurchaseOrderStatusEnum PurchaseOrderStatusEnum - if err := json.Unmarshal(data, &valuePurchaseOrderStatusEnum); err == nil { - p.typeName = "purchaseOrderStatusEnum" - p.PurchaseOrderStatusEnum = valuePurchaseOrderStatusEnum +func (p *PurchaseOrderLineItem) GetCreatedAt() *time.Time { + if p == nil { return nil } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" - p.String = valueString + return p.CreatedAt +} + +func (p *PurchaseOrderLineItem) GetModifiedAt() *time.Time { + if p == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, p) + return p.ModifiedAt } -func (p PurchaseOrderRequestStatus) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "purchaseOrderStatusEnum": - return json.Marshal(p.PurchaseOrderStatusEnum) - case "string": - return json.Marshal(p.String) +func (p *PurchaseOrderLineItem) GetDescription() *string { + if p == nil { + return nil } + return p.Description } -type PurchaseOrderRequestStatusVisitor interface { - VisitPurchaseOrderStatusEnum(PurchaseOrderStatusEnum) error - VisitString(string) error +func (p *PurchaseOrderLineItem) GetUnitPrice() *float64 { + if p == nil { + return nil + } + return p.UnitPrice } -func (p *PurchaseOrderRequestStatus) Accept(visitor PurchaseOrderRequestStatusVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "purchaseOrderStatusEnum": - return visitor.VisitPurchaseOrderStatusEnum(p.PurchaseOrderStatusEnum) - case "string": - return visitor.VisitString(p.String) +func (p *PurchaseOrderLineItem) GetQuantity() *float64 { + if p == nil { + return nil } + return p.Quantity } -type PurchaseOrderRequestTrackingCategoriesItem struct { - typeName string - String string - TrackingCategory *TrackingCategory +func (p *PurchaseOrderLineItem) GetItem() *PurchaseOrderLineItemItem { + if p == nil { + return nil + } + return p.Item +} + +func (p *PurchaseOrderLineItem) GetAccount() *string { + if p == nil { + return nil + } + return p.Account +} + +func (p *PurchaseOrderLineItem) GetTrackingCategory() *string { + if p == nil { + return nil + } + return p.TrackingCategory +} + +func (p *PurchaseOrderLineItem) GetTrackingCategories() []*string { + if p == nil { + return nil + } + return p.TrackingCategories +} + +func (p *PurchaseOrderLineItem) GetTaxAmount() *string { + if p == nil { + return nil + } + return p.TaxAmount +} + +func (p *PurchaseOrderLineItem) GetTotalLineAmount() *string { + if p == nil { + return nil + } + return p.TotalLineAmount +} + +func (p *PurchaseOrderLineItem) GetCurrency() *PurchaseOrderLineItemCurrency { + if p == nil { + return nil + } + return p.Currency +} + +func (p *PurchaseOrderLineItem) GetTaxRate() *string { + if p == nil { + return nil + } + return p.TaxRate +} + +func (p *PurchaseOrderLineItem) GetExchangeRate() *string { + if p == nil { + return nil + } + return p.ExchangeRate +} + +func (p *PurchaseOrderLineItem) GetCompany() *string { + if p == nil { + return nil + } + return p.Company +} + +func (p *PurchaseOrderLineItem) GetRemoteWasDeleted() *bool { + if p == nil { + return nil + } + return p.RemoteWasDeleted +} + +func (p *PurchaseOrderLineItem) GetRemoteFields() []*RemoteField { + if p == nil { + return nil + } + return p.RemoteFields +} + +func (p *PurchaseOrderLineItem) GetExtraProperties() map[string]interface{} { + return p.extraProperties } -func NewPurchaseOrderRequestTrackingCategoriesItemFromString(value string) *PurchaseOrderRequestTrackingCategoriesItem { - return &PurchaseOrderRequestTrackingCategoriesItem{typeName: "string", String: value} +func (p *PurchaseOrderLineItem) UnmarshalJSON(data []byte) error { + type embed PurchaseOrderLineItem + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*p), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *p = PurchaseOrderLineItem(unmarshaler.embed) + p.CreatedAt = unmarshaler.CreatedAt.TimePtr() + p.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PurchaseOrderLineItem) MarshalJSON() ([]byte, error) { + type embed PurchaseOrderLineItem + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*p), + CreatedAt: internal.NewOptionalDateTime(p.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(p.ModifiedAt), + } + return json.Marshal(marshaler) +} + +func (p *PurchaseOrderLineItem) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +// The purchase order line item's currency. +// +// * `XUA` - ADB Unit of Account +// * `AFN` - Afghan Afghani +// * `AFA` - Afghan Afghani (1927–2002) +// * `ALL` - Albanian Lek +// * `ALK` - Albanian Lek (1946–1965) +// * `DZD` - Algerian Dinar +// * `ADP` - Andorran Peseta +// * `AOA` - Angolan Kwanza +// * `AOK` - Angolan Kwanza (1977–1991) +// * `AON` - Angolan New Kwanza (1990–2000) +// * `AOR` - Angolan Readjusted Kwanza (1995–1999) +// * `ARA` - Argentine Austral +// * `ARS` - Argentine Peso +// * `ARM` - Argentine Peso (1881–1970) +// * `ARP` - Argentine Peso (1983–1985) +// * `ARL` - Argentine Peso Ley (1970–1983) +// * `AMD` - Armenian Dram +// * `AWG` - Aruban Florin +// * `AUD` - Australian Dollar +// * `ATS` - Austrian Schilling +// * `AZN` - Azerbaijani Manat +// * `AZM` - Azerbaijani Manat (1993–2006) +// * `BSD` - Bahamian Dollar +// * `BHD` - Bahraini Dinar +// * `BDT` - Bangladeshi Taka +// * `BBD` - Barbadian Dollar +// * `BYN` - Belarusian Ruble +// * `BYB` - Belarusian Ruble (1994–1999) +// * `BYR` - Belarusian Ruble (2000–2016) +// * `BEF` - Belgian Franc +// * `BEC` - Belgian Franc (convertible) +// * `BEL` - Belgian Franc (financial) +// * `BZD` - Belize Dollar +// * `BMD` - Bermudan Dollar +// * `BTN` - Bhutanese Ngultrum +// * `BOB` - Bolivian Boliviano +// * `BOL` - Bolivian Boliviano (1863–1963) +// * `BOV` - Bolivian Mvdol +// * `BOP` - Bolivian Peso +// * `BAM` - Bosnia-Herzegovina Convertible Mark +// * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) +// * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) +// * `BWP` - Botswanan Pula +// * `BRC` - Brazilian Cruzado (1986–1989) +// * `BRZ` - Brazilian Cruzeiro (1942–1967) +// * `BRE` - Brazilian Cruzeiro (1990–1993) +// * `BRR` - Brazilian Cruzeiro (1993–1994) +// * `BRN` - Brazilian New Cruzado (1989–1990) +// * `BRB` - Brazilian New Cruzeiro (1967–1986) +// * `BRL` - Brazilian Real +// * `GBP` - British Pound +// * `BND` - Brunei Dollar +// * `BGL` - Bulgarian Hard Lev +// * `BGN` - Bulgarian Lev +// * `BGO` - Bulgarian Lev (1879–1952) +// * `BGM` - Bulgarian Socialist Lev +// * `BUK` - Burmese Kyat +// * `BIF` - Burundian Franc +// * `XPF` - CFP Franc +// * `KHR` - Cambodian Riel +// * `CAD` - Canadian Dollar +// * `CVE` - Cape Verdean Escudo +// * `KYD` - Cayman Islands Dollar +// * `XAF` - Central African CFA Franc +// * `CLE` - Chilean Escudo +// * `CLP` - Chilean Peso +// * `CLF` - Chilean Unit of Account (UF) +// * `CNX` - Chinese People’s Bank Dollar +// * `CNY` - Chinese Yuan +// * `CNH` - Chinese Yuan (offshore) +// * `COP` - Colombian Peso +// * `COU` - Colombian Real Value Unit +// * `KMF` - Comorian Franc +// * `CDF` - Congolese Franc +// * `CRC` - Costa Rican Colón +// * `HRD` - Croatian Dinar +// * `HRK` - Croatian Kuna +// * `CUC` - Cuban Convertible Peso +// * `CUP` - Cuban Peso +// * `CYP` - Cypriot Pound +// * `CZK` - Czech Koruna +// * `CSK` - Czechoslovak Hard Koruna +// * `DKK` - Danish Krone +// * `DJF` - Djiboutian Franc +// * `DOP` - Dominican Peso +// * `NLG` - Dutch Guilder +// * `XCD` - East Caribbean Dollar +// * `DDM` - East German Mark +// * `ECS` - Ecuadorian Sucre +// * `ECV` - Ecuadorian Unit of Constant Value +// * `EGP` - Egyptian Pound +// * `GQE` - Equatorial Guinean Ekwele +// * `ERN` - Eritrean Nakfa +// * `EEK` - Estonian Kroon +// * `ETB` - Ethiopian Birr +// * `EUR` - Euro +// * `XBA` - European Composite Unit +// * `XEU` - European Currency Unit +// * `XBB` - European Monetary Unit +// * `XBC` - European Unit of Account (XBC) +// * `XBD` - European Unit of Account (XBD) +// * `FKP` - Falkland Islands Pound +// * `FJD` - Fijian Dollar +// * `FIM` - Finnish Markka +// * `FRF` - French Franc +// * `XFO` - French Gold Franc +// * `XFU` - French UIC-Franc +// * `GMD` - Gambian Dalasi +// * `GEK` - Georgian Kupon Larit +// * `GEL` - Georgian Lari +// * `DEM` - German Mark +// * `GHS` - Ghanaian Cedi +// * `GHC` - Ghanaian Cedi (1979–2007) +// * `GIP` - Gibraltar Pound +// * `XAU` - Gold +// * `GRD` - Greek Drachma +// * `GTQ` - Guatemalan Quetzal +// * `GWP` - Guinea-Bissau Peso +// * `GNF` - Guinean Franc +// * `GNS` - Guinean Syli +// * `GYD` - Guyanaese Dollar +// * `HTG` - Haitian Gourde +// * `HNL` - Honduran Lempira +// * `HKD` - Hong Kong Dollar +// * `HUF` - Hungarian Forint +// * `IMP` - IMP +// * `ISK` - Icelandic Króna +// * `ISJ` - Icelandic Króna (1918–1981) +// * `INR` - Indian Rupee +// * `IDR` - Indonesian Rupiah +// * `IRR` - Iranian Rial +// * `IQD` - Iraqi Dinar +// * `IEP` - Irish Pound +// * `ILS` - Israeli New Shekel +// * `ILP` - Israeli Pound +// * `ILR` - Israeli Shekel (1980–1985) +// * `ITL` - Italian Lira +// * `JMD` - Jamaican Dollar +// * `JPY` - Japanese Yen +// * `JOD` - Jordanian Dinar +// * `KZT` - Kazakhstani Tenge +// * `KES` - Kenyan Shilling +// * `KWD` - Kuwaiti Dinar +// * `KGS` - Kyrgystani Som +// * `LAK` - Laotian Kip +// * `LVL` - Latvian Lats +// * `LVR` - Latvian Ruble +// * `LBP` - Lebanese Pound +// * `LSL` - Lesotho Loti +// * `LRD` - Liberian Dollar +// * `LYD` - Libyan Dinar +// * `LTL` - Lithuanian Litas +// * `LTT` - Lithuanian Talonas +// * `LUL` - Luxembourg Financial Franc +// * `LUC` - Luxembourgian Convertible Franc +// * `LUF` - Luxembourgian Franc +// * `MOP` - Macanese Pataca +// * `MKD` - Macedonian Denar +// * `MKN` - Macedonian Denar (1992–1993) +// * `MGA` - Malagasy Ariary +// * `MGF` - Malagasy Franc +// * `MWK` - Malawian Kwacha +// * `MYR` - Malaysian Ringgit +// * `MVR` - Maldivian Rufiyaa +// * `MVP` - Maldivian Rupee (1947–1981) +// * `MLF` - Malian Franc +// * `MTL` - Maltese Lira +// * `MTP` - Maltese Pound +// * `MRU` - Mauritanian Ouguiya +// * `MRO` - Mauritanian Ouguiya (1973–2017) +// * `MUR` - Mauritian Rupee +// * `MXV` - Mexican Investment Unit +// * `MXN` - Mexican Peso +// * `MXP` - Mexican Silver Peso (1861–1992) +// * `MDC` - Moldovan Cupon +// * `MDL` - Moldovan Leu +// * `MCF` - Monegasque Franc +// * `MNT` - Mongolian Tugrik +// * `MAD` - Moroccan Dirham +// * `MAF` - Moroccan Franc +// * `MZE` - Mozambican Escudo +// * `MZN` - Mozambican Metical +// * `MZM` - Mozambican Metical (1980–2006) +// * `MMK` - Myanmar Kyat +// * `NAD` - Namibian Dollar +// * `NPR` - Nepalese Rupee +// * `ANG` - Netherlands Antillean Guilder +// * `TWD` - New Taiwan Dollar +// * `NZD` - New Zealand Dollar +// * `NIO` - Nicaraguan Córdoba +// * `NIC` - Nicaraguan Córdoba (1988–1991) +// * `NGN` - Nigerian Naira +// * `KPW` - North Korean Won +// * `NOK` - Norwegian Krone +// * `OMR` - Omani Rial +// * `PKR` - Pakistani Rupee +// * `XPD` - Palladium +// * `PAB` - Panamanian Balboa +// * `PGK` - Papua New Guinean Kina +// * `PYG` - Paraguayan Guarani +// * `PEI` - Peruvian Inti +// * `PEN` - Peruvian Sol +// * `PES` - Peruvian Sol (1863–1965) +// * `PHP` - Philippine Peso +// * `XPT` - Platinum +// * `PLN` - Polish Zloty +// * `PLZ` - Polish Zloty (1950–1995) +// * `PTE` - Portuguese Escudo +// * `GWE` - Portuguese Guinea Escudo +// * `QAR` - Qatari Rial +// * `XRE` - RINET Funds +// * `RHD` - Rhodesian Dollar +// * `RON` - Romanian Leu +// * `ROL` - Romanian Leu (1952–2006) +// * `RUB` - Russian Ruble +// * `RUR` - Russian Ruble (1991–1998) +// * `RWF` - Rwandan Franc +// * `SVC` - Salvadoran Colón +// * `WST` - Samoan Tala +// * `SAR` - Saudi Riyal +// * `RSD` - Serbian Dinar +// * `CSD` - Serbian Dinar (2002–2006) +// * `SCR` - Seychellois Rupee +// * `SLL` - Sierra Leonean Leone +// * `XAG` - Silver +// * `SGD` - Singapore Dollar +// * `SKK` - Slovak Koruna +// * `SIT` - Slovenian Tolar +// * `SBD` - Solomon Islands Dollar +// * `SOS` - Somali Shilling +// * `ZAR` - South African Rand +// * `ZAL` - South African Rand (financial) +// * `KRH` - South Korean Hwan (1953–1962) +// * `KRW` - South Korean Won +// * `KRO` - South Korean Won (1945–1953) +// * `SSP` - South Sudanese Pound +// * `SUR` - Soviet Rouble +// * `ESP` - Spanish Peseta +// * `ESA` - Spanish Peseta (A account) +// * `ESB` - Spanish Peseta (convertible account) +// * `XDR` - Special Drawing Rights +// * `LKR` - Sri Lankan Rupee +// * `SHP` - St. Helena Pound +// * `XSU` - Sucre +// * `SDD` - Sudanese Dinar (1992–2007) +// * `SDG` - Sudanese Pound +// * `SDP` - Sudanese Pound (1957–1998) +// * `SRD` - Surinamese Dollar +// * `SRG` - Surinamese Guilder +// * `SZL` - Swazi Lilangeni +// * `SEK` - Swedish Krona +// * `CHF` - Swiss Franc +// * `SYP` - Syrian Pound +// * `STN` - São Tomé & Príncipe Dobra +// * `STD` - São Tomé & Príncipe Dobra (1977–2017) +// * `TVD` - TVD +// * `TJR` - Tajikistani Ruble +// * `TJS` - Tajikistani Somoni +// * `TZS` - Tanzanian Shilling +// * `XTS` - Testing Currency Code +// * `THB` - Thai Baht +// * `XXX` - The codes assigned for transactions where no currency is involved +// * `TPE` - Timorese Escudo +// * `TOP` - Tongan Paʻanga +// * `TTD` - Trinidad & Tobago Dollar +// * `TND` - Tunisian Dinar +// * `TRY` - Turkish Lira +// * `TRL` - Turkish Lira (1922–2005) +// * `TMT` - Turkmenistani Manat +// * `TMM` - Turkmenistani Manat (1993–2009) +// * `USD` - US Dollar +// * `USN` - US Dollar (Next day) +// * `USS` - US Dollar (Same day) +// * `UGX` - Ugandan Shilling +// * `UGS` - Ugandan Shilling (1966–1987) +// * `UAH` - Ukrainian Hryvnia +// * `UAK` - Ukrainian Karbovanets +// * `AED` - United Arab Emirates Dirham +// * `UYW` - Uruguayan Nominal Wage Index Unit +// * `UYU` - Uruguayan Peso +// * `UYP` - Uruguayan Peso (1975–1993) +// * `UYI` - Uruguayan Peso (Indexed Units) +// * `UZS` - Uzbekistani Som +// * `VUV` - Vanuatu Vatu +// * `VES` - Venezuelan Bolívar +// * `VEB` - Venezuelan Bolívar (1871–2008) +// * `VEF` - Venezuelan Bolívar (2008–2018) +// * `VND` - Vietnamese Dong +// * `VNN` - Vietnamese Dong (1978–1985) +// * `CHE` - WIR Euro +// * `CHW` - WIR Franc +// * `XOF` - West African CFA Franc +// * `YDD` - Yemeni Dinar +// * `YER` - Yemeni Rial +// * `YUN` - Yugoslavian Convertible Dinar (1990–1992) +// * `YUD` - Yugoslavian Hard Dinar (1966–1990) +// * `YUM` - Yugoslavian New Dinar (1994–2002) +// * `YUR` - Yugoslavian Reformed Dinar (1992–1993) +// * `ZWN` - ZWN +// * `ZRN` - Zairean New Zaire (1993–1998) +// * `ZRZ` - Zairean Zaire (1971–1993) +// * `ZMW` - Zambian Kwacha +// * `ZMK` - Zambian Kwacha (1968–2012) +// * `ZWD` - Zimbabwean Dollar (1980–2008) +// * `ZWR` - Zimbabwean Dollar (2008) +// * `ZWL` - Zimbabwean Dollar (2009) +type PurchaseOrderLineItemCurrency struct { + TransactionCurrencyEnum TransactionCurrencyEnum + String string + + typ string +} + +func (p *PurchaseOrderLineItemCurrency) GetTransactionCurrencyEnum() TransactionCurrencyEnum { + if p == nil { + return "" + } + return p.TransactionCurrencyEnum } -func NewPurchaseOrderRequestTrackingCategoriesItemFromTrackingCategory(value *TrackingCategory) *PurchaseOrderRequestTrackingCategoriesItem { - return &PurchaseOrderRequestTrackingCategoriesItem{typeName: "trackingCategory", TrackingCategory: value} +func (p *PurchaseOrderLineItemCurrency) GetString() string { + if p == nil { + return "" + } + return p.String } -func (p *PurchaseOrderRequestTrackingCategoriesItem) UnmarshalJSON(data []byte) error { +func (p *PurchaseOrderLineItemCurrency) UnmarshalJSON(data []byte) error { + var valueTransactionCurrencyEnum TransactionCurrencyEnum + if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { + p.typ = "TransactionCurrencyEnum" + p.TransactionCurrencyEnum = valueTransactionCurrencyEnum + return nil + } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" + p.typ = "String" p.String = valueString return nil } - valueTrackingCategory := new(TrackingCategory) - if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { - p.typeName = "trackingCategory" - p.TrackingCategory = valueTrackingCategory - return nil - } return fmt.Errorf("%s cannot be deserialized as a %T", data, p) } -func (p PurchaseOrderRequestTrackingCategoriesItem) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": +func (p PurchaseOrderLineItemCurrency) MarshalJSON() ([]byte, error) { + if p.typ == "TransactionCurrencyEnum" || p.TransactionCurrencyEnum != "" { + return json.Marshal(p.TransactionCurrencyEnum) + } + if p.typ == "String" || p.String != "" { return json.Marshal(p.String) - case "trackingCategory": - return json.Marshal(p.TrackingCategory) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) } -type PurchaseOrderRequestTrackingCategoriesItemVisitor interface { +type PurchaseOrderLineItemCurrencyVisitor interface { + VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error VisitString(string) error - VisitTrackingCategory(*TrackingCategory) error } -func (p *PurchaseOrderRequestTrackingCategoriesItem) Accept(visitor PurchaseOrderRequestTrackingCategoriesItemVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": +func (p *PurchaseOrderLineItemCurrency) Accept(visitor PurchaseOrderLineItemCurrencyVisitor) error { + if p.typ == "TransactionCurrencyEnum" || p.TransactionCurrencyEnum != "" { + return visitor.VisitTransactionCurrencyEnum(p.TransactionCurrencyEnum) + } + if p.typ == "String" || p.String != "" { return visitor.VisitString(p.String) - case "trackingCategory": - return visitor.VisitTrackingCategory(p.TrackingCategory) } + return fmt.Errorf("type %T does not include a non-empty union type", p) } -// The party fulfilling the purchase order. -type PurchaseOrderRequestVendor struct { - typeName string - String string - Contact *Contact +type PurchaseOrderLineItemItem struct { + String string + Item *Item + + typ string } -func NewPurchaseOrderRequestVendorFromString(value string) *PurchaseOrderRequestVendor { - return &PurchaseOrderRequestVendor{typeName: "string", String: value} +func (p *PurchaseOrderLineItemItem) GetString() string { + if p == nil { + return "" + } + return p.String } -func NewPurchaseOrderRequestVendorFromContact(value *Contact) *PurchaseOrderRequestVendor { - return &PurchaseOrderRequestVendor{typeName: "contact", Contact: value} +func (p *PurchaseOrderLineItemItem) GetItem() *Item { + if p == nil { + return nil + } + return p.Item } -func (p *PurchaseOrderRequestVendor) UnmarshalJSON(data []byte) error { +func (p *PurchaseOrderLineItemItem) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" + p.typ = "String" p.String = valueString return nil } - valueContact := new(Contact) - if err := json.Unmarshal(data, &valueContact); err == nil { - p.typeName = "contact" - p.Contact = valueContact + valueItem := new(Item) + if err := json.Unmarshal(data, &valueItem); err == nil { + p.typ = "Item" + p.Item = valueItem return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, p) } -func (p PurchaseOrderRequestVendor) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": +func (p PurchaseOrderLineItemItem) MarshalJSON() ([]byte, error) { + if p.typ == "String" || p.String != "" { return json.Marshal(p.String) - case "contact": - return json.Marshal(p.Contact) } + if p.typ == "Item" || p.Item != nil { + return json.Marshal(p.Item) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) } -type PurchaseOrderRequestVendorVisitor interface { +type PurchaseOrderLineItemItemVisitor interface { VisitString(string) error - VisitContact(*Contact) error + VisitItem(*Item) error } -func (p *PurchaseOrderRequestVendor) Accept(visitor PurchaseOrderRequestVendorVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": +func (p *PurchaseOrderLineItemItem) Accept(visitor PurchaseOrderLineItemItemVisitor) error { + if p.typ == "String" || p.String != "" { return visitor.VisitString(p.String) - case "contact": - return visitor.VisitContact(p.Contact) } + if p.typ == "Item" || p.Item != nil { + return visitor.VisitItem(p.Item) + } + return fmt.Errorf("type %T does not include a non-empty union type", p) +} + +// The payment term that applies to this transaction. +type PurchaseOrderPaymentTerm struct { + String string + PaymentTerm *PaymentTerm + + typ string +} + +func (p *PurchaseOrderPaymentTerm) GetString() string { + if p == nil { + return "" + } + return p.String +} + +func (p *PurchaseOrderPaymentTerm) GetPaymentTerm() *PaymentTerm { + if p == nil { + return nil + } + return p.PaymentTerm +} + +func (p *PurchaseOrderPaymentTerm) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + p.typ = "String" + p.String = valueString + return nil + } + valuePaymentTerm := new(PaymentTerm) + if err := json.Unmarshal(data, &valuePaymentTerm); err == nil { + p.typ = "PaymentTerm" + p.PaymentTerm = valuePaymentTerm + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, p) } -type PurchaseOrderResponse struct { - Model *PurchaseOrder `json:"model,omitempty"` - Warnings []*WarningValidationProblem `json:"warnings,omitempty"` - Errors []*ErrorValidationProblem `json:"errors,omitempty"` - Logs []*DebugModeLog `json:"logs,omitempty"` - - _rawJSON json.RawMessage +func (p PurchaseOrderPaymentTerm) MarshalJSON() ([]byte, error) { + if p.typ == "String" || p.String != "" { + return json.Marshal(p.String) + } + if p.typ == "PaymentTerm" || p.PaymentTerm != nil { + return json.Marshal(p.PaymentTerm) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) } -func (p *PurchaseOrderResponse) UnmarshalJSON(data []byte) error { - type unmarshaler PurchaseOrderResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *p = PurchaseOrderResponse(value) - p._rawJSON = json.RawMessage(data) - return nil +type PurchaseOrderPaymentTermVisitor interface { + VisitString(string) error + VisitPaymentTerm(*PaymentTerm) error } -func (p *PurchaseOrderResponse) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } +func (p *PurchaseOrderPaymentTerm) Accept(visitor PurchaseOrderPaymentTermVisitor) error { + if p.typ == "String" || p.String != "" { + return visitor.VisitString(p.String) } - if value, err := core.StringifyJSON(p); err == nil { - return value + if p.typ == "PaymentTerm" || p.PaymentTerm != nil { + return visitor.VisitPaymentTerm(p.PaymentTerm) } - return fmt.Sprintf("%#v", p) + return fmt.Errorf("type %T does not include a non-empty union type", p) } // The purchase order's status. // -// - `DRAFT` - DRAFT -// - `SUBMITTED` - SUBMITTED -// - `AUTHORIZED` - AUTHORIZED -// - `BILLED` - BILLED -// - `DELETED` - DELETED +// * `DRAFT` - DRAFT +// * `SUBMITTED` - SUBMITTED +// * `AUTHORIZED` - AUTHORIZED +// * `BILLED` - BILLED +// * `DELETED` - DELETED type PurchaseOrderStatus struct { - typeName string PurchaseOrderStatusEnum PurchaseOrderStatusEnum String string + + typ string } -func NewPurchaseOrderStatusFromPurchaseOrderStatusEnum(value PurchaseOrderStatusEnum) *PurchaseOrderStatus { - return &PurchaseOrderStatus{typeName: "purchaseOrderStatusEnum", PurchaseOrderStatusEnum: value} +func (p *PurchaseOrderStatus) GetPurchaseOrderStatusEnum() PurchaseOrderStatusEnum { + if p == nil { + return "" + } + return p.PurchaseOrderStatusEnum } -func NewPurchaseOrderStatusFromString(value string) *PurchaseOrderStatus { - return &PurchaseOrderStatus{typeName: "string", String: value} +func (p *PurchaseOrderStatus) GetString() string { + if p == nil { + return "" + } + return p.String } func (p *PurchaseOrderStatus) UnmarshalJSON(data []byte) error { var valuePurchaseOrderStatusEnum PurchaseOrderStatusEnum if err := json.Unmarshal(data, &valuePurchaseOrderStatusEnum); err == nil { - p.typeName = "purchaseOrderStatusEnum" + p.typ = "PurchaseOrderStatusEnum" p.PurchaseOrderStatusEnum = valuePurchaseOrderStatusEnum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" + p.typ = "String" p.String = valueString return nil } @@ -40168,14 +18567,13 @@ func (p *PurchaseOrderStatus) UnmarshalJSON(data []byte) error { } func (p PurchaseOrderStatus) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "purchaseOrderStatusEnum": + if p.typ == "PurchaseOrderStatusEnum" || p.PurchaseOrderStatusEnum != "" { return json.Marshal(p.PurchaseOrderStatusEnum) - case "string": + } + if p.typ == "String" || p.String != "" { return json.Marshal(p.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) } type PurchaseOrderStatusVisitor interface { @@ -40184,21 +18582,20 @@ type PurchaseOrderStatusVisitor interface { } func (p *PurchaseOrderStatus) Accept(visitor PurchaseOrderStatusVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "purchaseOrderStatusEnum": + if p.typ == "PurchaseOrderStatusEnum" || p.PurchaseOrderStatusEnum != "" { return visitor.VisitPurchaseOrderStatusEnum(p.PurchaseOrderStatusEnum) - case "string": + } + if p.typ == "String" || p.String != "" { return visitor.VisitString(p.String) } + return fmt.Errorf("type %T does not include a non-empty union type", p) } -// - `DRAFT` - DRAFT -// - `SUBMITTED` - SUBMITTED -// - `AUTHORIZED` - AUTHORIZED -// - `BILLED` - BILLED -// - `DELETED` - DELETED +// * `DRAFT` - DRAFT +// * `SUBMITTED` - SUBMITTED +// * `AUTHORIZED` - AUTHORIZED +// * `BILLED` - BILLED +// * `DELETED` - DELETED type PurchaseOrderStatusEnum string const ( @@ -40231,29 +18628,36 @@ func (p PurchaseOrderStatusEnum) Ptr() *PurchaseOrderStatusEnum { } type PurchaseOrderTrackingCategoriesItem struct { - typeName string String string TrackingCategory *TrackingCategory + + typ string } -func NewPurchaseOrderTrackingCategoriesItemFromString(value string) *PurchaseOrderTrackingCategoriesItem { - return &PurchaseOrderTrackingCategoriesItem{typeName: "string", String: value} +func (p *PurchaseOrderTrackingCategoriesItem) GetString() string { + if p == nil { + return "" + } + return p.String } -func NewPurchaseOrderTrackingCategoriesItemFromTrackingCategory(value *TrackingCategory) *PurchaseOrderTrackingCategoriesItem { - return &PurchaseOrderTrackingCategoriesItem{typeName: "trackingCategory", TrackingCategory: value} +func (p *PurchaseOrderTrackingCategoriesItem) GetTrackingCategory() *TrackingCategory { + if p == nil { + return nil + } + return p.TrackingCategory } func (p *PurchaseOrderTrackingCategoriesItem) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" + p.typ = "String" p.String = valueString return nil } valueTrackingCategory := new(TrackingCategory) if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { - p.typeName = "trackingCategory" + p.typ = "TrackingCategory" p.TrackingCategory = valueTrackingCategory return nil } @@ -40261,14 +18665,13 @@ func (p *PurchaseOrderTrackingCategoriesItem) UnmarshalJSON(data []byte) error { } func (p PurchaseOrderTrackingCategoriesItem) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": + if p.typ == "String" || p.String != "" { return json.Marshal(p.String) - case "trackingCategory": + } + if p.typ == "TrackingCategory" || p.TrackingCategory != nil { return json.Marshal(p.TrackingCategory) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) } type PurchaseOrderTrackingCategoriesItemVisitor interface { @@ -40277,41 +18680,47 @@ type PurchaseOrderTrackingCategoriesItemVisitor interface { } func (p *PurchaseOrderTrackingCategoriesItem) Accept(visitor PurchaseOrderTrackingCategoriesItemVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": + if p.typ == "String" || p.String != "" { return visitor.VisitString(p.String) - case "trackingCategory": + } + if p.typ == "TrackingCategory" || p.TrackingCategory != nil { return visitor.VisitTrackingCategory(p.TrackingCategory) } + return fmt.Errorf("type %T does not include a non-empty union type", p) } // The party fulfilling the purchase order. type PurchaseOrderVendor struct { - typeName string - String string - Contact *Contact + String string + Contact *Contact + + typ string } -func NewPurchaseOrderVendorFromString(value string) *PurchaseOrderVendor { - return &PurchaseOrderVendor{typeName: "string", String: value} +func (p *PurchaseOrderVendor) GetString() string { + if p == nil { + return "" + } + return p.String } -func NewPurchaseOrderVendorFromContact(value *Contact) *PurchaseOrderVendor { - return &PurchaseOrderVendor{typeName: "contact", Contact: value} +func (p *PurchaseOrderVendor) GetContact() *Contact { + if p == nil { + return nil + } + return p.Contact } func (p *PurchaseOrderVendor) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" + p.typ = "String" p.String = valueString return nil } valueContact := new(Contact) if err := json.Unmarshal(data, &valueContact); err == nil { - p.typeName = "contact" + p.typ = "Contact" p.Contact = valueContact return nil } @@ -40319,14 +18728,13 @@ func (p *PurchaseOrderVendor) UnmarshalJSON(data []byte) error { } func (p PurchaseOrderVendor) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": + if p.typ == "String" || p.String != "" { return json.Marshal(p.String) - case "contact": + } + if p.typ == "Contact" || p.Contact != nil { return json.Marshal(p.Contact) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) } type PurchaseOrderVendorVisitor interface { @@ -40335,31 +18743,46 @@ type PurchaseOrderVendorVisitor interface { } func (p *PurchaseOrderVendor) Accept(visitor PurchaseOrderVendorVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": + if p.typ == "String" || p.String != "" { return visitor.VisitString(p.String) - case "contact": + } + if p.typ == "Contact" || p.Contact != nil { return visitor.VisitContact(p.Contact) } + return fmt.Errorf("type %T does not include a non-empty union type", p) } // # The RemoteData Object -// // ### Description -// // The `RemoteData` object is used to represent the full data pulled from the third-party API for an object. // // ### Usage Example -// // TODO type RemoteData struct { // The third-party API path that is being called. - Path string `json:"path"` - Data interface{} `json:"data,omitempty"` + Path string `json:"path" url:"path"` + Data interface{} `json:"data,omitempty" url:"data,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (r *RemoteData) GetPath() string { + if r == nil { + return "" + } + return r.Path +} + +func (r *RemoteData) GetData() interface{} { + if r == nil { + return nil + } + return r.Data +} + +func (r *RemoteData) GetExtraProperties() map[string]interface{} { + return r.extraProperties } func (r *RemoteData) UnmarshalJSON(data []byte) error { @@ -40369,58 +18792,51 @@ func (r *RemoteData) UnmarshalJSON(data []byte) error { return err } *r = RemoteData(value) - r._rawJSON = json.RawMessage(data) + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { + return err + } + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) return nil } func (r *RemoteData) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(r); err == nil { + if value, err := internal.StringifyJSON(r); err == nil { return value } return fmt.Sprintf("%#v", r) } -type RemoteEndpointInfo struct { - Method string `json:"method"` - UrlPath string `json:"url_path"` - FieldTraversalPath []interface{} `json:"field_traversal_path,omitempty"` +type RemoteField struct { + RemoteFieldClass *RemoteFieldRemoteFieldClass `json:"remote_field_class" url:"remote_field_class"` + Value interface{} `json:"value,omitempty" url:"value,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (r *RemoteEndpointInfo) UnmarshalJSON(data []byte) error { - type unmarshaler RemoteEndpointInfo - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (r *RemoteField) GetRemoteFieldClass() *RemoteFieldRemoteFieldClass { + if r == nil { + return nil } - *r = RemoteEndpointInfo(value) - r._rawJSON = json.RawMessage(data) - return nil + return r.RemoteFieldClass } -func (r *RemoteEndpointInfo) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(r); err == nil { - return value +func (r *RemoteField) GetValue() interface{} { + if r == nil { + return nil } - return fmt.Sprintf("%#v", r) + return r.Value } -type RemoteField struct { - RemoteFieldClass *RemoteFieldRemoteFieldClass `json:"remote_field_class,omitempty"` - Value map[string]interface{} `json:"value,omitempty"` - - _rawJSON json.RawMessage +func (r *RemoteField) GetExtraProperties() map[string]interface{} { + return r.extraProperties } func (r *RemoteField) UnmarshalJSON(data []byte) error { @@ -40430,176 +18846,115 @@ func (r *RemoteField) UnmarshalJSON(data []byte) error { return err } *r = RemoteField(value) - r._rawJSON = json.RawMessage(data) + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { + return err + } + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) return nil } func (r *RemoteField) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(r); err == nil { + if value, err := internal.StringifyJSON(r); err == nil { return value } return fmt.Sprintf("%#v", r) } -type RemoteFieldApi struct { - Schema map[string]interface{} `json:"schema,omitempty"` - RemoteKeyName string `json:"remote_key_name"` - RemoteEndpointInfo *RemoteEndpointInfo `json:"remote_endpoint_info,omitempty"` - ExampleValues []interface{} `json:"example_values,omitempty"` - AdvancedMetadata *AdvancedMetadata `json:"advanced_metadata,omitempty"` - Coverage *RemoteFieldApiCoverage `json:"coverage,omitempty"` +type RemoteFieldClass struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + DisplayName *string `json:"display_name,omitempty" url:"display_name,omitempty"` + RemoteKeyName *string `json:"remote_key_name,omitempty" url:"remote_key_name,omitempty"` + Description *string `json:"description,omitempty" url:"description,omitempty"` + IsCustom *bool `json:"is_custom,omitempty" url:"is_custom,omitempty"` + IsRequired *bool `json:"is_required,omitempty" url:"is_required,omitempty"` + FieldType *FieldTypeEnum `json:"field_type,omitempty" url:"field_type,omitempty"` + FieldFormat *FieldFormatEnum `json:"field_format,omitempty" url:"field_format,omitempty"` + FieldChoices []string `json:"field_choices,omitempty" url:"field_choices,omitempty"` + ItemSchema *ItemSchema `json:"item_schema,omitempty" url:"item_schema,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (r *RemoteFieldApi) UnmarshalJSON(data []byte) error { - type unmarshaler RemoteFieldApi - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (r *RemoteFieldClass) GetId() *string { + if r == nil { + return nil } - *r = RemoteFieldApi(value) - r._rawJSON = json.RawMessage(data) - return nil + return r.Id } -func (r *RemoteFieldApi) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(r); err == nil { - return value +func (r *RemoteFieldClass) GetDisplayName() *string { + if r == nil { + return nil } - return fmt.Sprintf("%#v", r) + return r.DisplayName } -type RemoteFieldApiCoverage struct { - typeName string - Integer int - Double float64 +func (r *RemoteFieldClass) GetRemoteKeyName() *string { + if r == nil { + return nil + } + return r.RemoteKeyName } -func NewRemoteFieldApiCoverageFromInteger(value int) *RemoteFieldApiCoverage { - return &RemoteFieldApiCoverage{typeName: "integer", Integer: value} +func (r *RemoteFieldClass) GetDescription() *string { + if r == nil { + return nil + } + return r.Description } -func NewRemoteFieldApiCoverageFromDouble(value float64) *RemoteFieldApiCoverage { - return &RemoteFieldApiCoverage{typeName: "double", Double: value} +func (r *RemoteFieldClass) GetIsCustom() *bool { + if r == nil { + return nil + } + return r.IsCustom } -func (r *RemoteFieldApiCoverage) UnmarshalJSON(data []byte) error { - var valueInteger int - if err := json.Unmarshal(data, &valueInteger); err == nil { - r.typeName = "integer" - r.Integer = valueInteger +func (r *RemoteFieldClass) GetIsRequired() *bool { + if r == nil { return nil } - var valueDouble float64 - if err := json.Unmarshal(data, &valueDouble); err == nil { - r.typeName = "double" - r.Double = valueDouble + return r.IsRequired +} + +func (r *RemoteFieldClass) GetFieldType() *FieldTypeEnum { + if r == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, r) + return r.FieldType } -func (r RemoteFieldApiCoverage) MarshalJSON() ([]byte, error) { - switch r.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", r.typeName, r) - case "integer": - return json.Marshal(r.Integer) - case "double": - return json.Marshal(r.Double) - } -} - -type RemoteFieldApiCoverageVisitor interface { - VisitInteger(int) error - VisitDouble(float64) error -} - -func (r *RemoteFieldApiCoverage) Accept(visitor RemoteFieldApiCoverageVisitor) error { - switch r.typeName { - default: - return fmt.Errorf("invalid type %s in %T", r.typeName, r) - case "integer": - return visitor.VisitInteger(r.Integer) - case "double": - return visitor.VisitDouble(r.Double) - } -} - -type RemoteFieldApiResponse struct { - Account []*RemoteFieldApi `json:"Account,omitempty"` - AccountingAttachment []*RemoteFieldApi `json:"AccountingAttachment,omitempty"` - BalanceSheet []*RemoteFieldApi `json:"BalanceSheet,omitempty"` - CashFlowStatement []*RemoteFieldApi `json:"CashFlowStatement,omitempty"` - CompanyInfo []*RemoteFieldApi `json:"CompanyInfo,omitempty"` - Contact []*RemoteFieldApi `json:"Contact,omitempty"` - IncomeStatement []*RemoteFieldApi `json:"IncomeStatement,omitempty"` - CreditNote []*RemoteFieldApi `json:"CreditNote,omitempty"` - Item []*RemoteFieldApi `json:"Item,omitempty"` - PurchaseOrder []*RemoteFieldApi `json:"PurchaseOrder,omitempty"` - TrackingCategory []*RemoteFieldApi `json:"TrackingCategory,omitempty"` - JournalEntry []*RemoteFieldApi `json:"JournalEntry,omitempty"` - TaxRate []*RemoteFieldApi `json:"TaxRate,omitempty"` - Invoice []*RemoteFieldApi `json:"Invoice,omitempty"` - Payment []*RemoteFieldApi `json:"Payment,omitempty"` - Expense []*RemoteFieldApi `json:"Expense,omitempty"` - VendorCredit []*RemoteFieldApi `json:"VendorCredit,omitempty"` - Transaction []*RemoteFieldApi `json:"Transaction,omitempty"` - AccountingPeriod []*RemoteFieldApi `json:"AccountingPeriod,omitempty"` - GeneralLedgerTransaction []*RemoteFieldApi `json:"GeneralLedgerTransaction,omitempty"` - BankFeedAccount []*RemoteFieldApi `json:"BankFeedAccount,omitempty"` - Employee []*RemoteFieldApi `json:"Employee,omitempty"` - - _rawJSON json.RawMessage -} - -func (r *RemoteFieldApiResponse) UnmarshalJSON(data []byte) error { - type unmarshaler RemoteFieldApiResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (r *RemoteFieldClass) GetFieldFormat() *FieldFormatEnum { + if r == nil { + return nil } - *r = RemoteFieldApiResponse(value) - r._rawJSON = json.RawMessage(data) - return nil + return r.FieldFormat } -func (r *RemoteFieldApiResponse) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(r); err == nil { - return value +func (r *RemoteFieldClass) GetFieldChoices() []string { + if r == nil { + return nil } - return fmt.Sprintf("%#v", r) + return r.FieldChoices } -type RemoteFieldClass struct { - Id *string `json:"id,omitempty"` - DisplayName *string `json:"display_name,omitempty"` - RemoteKeyName *string `json:"remote_key_name,omitempty"` - Description *string `json:"description,omitempty"` - IsCustom *bool `json:"is_custom,omitempty"` - IsRequired *bool `json:"is_required,omitempty"` - FieldType *FieldTypeEnum `json:"field_type,omitempty"` - FieldFormat *FieldFormatEnum `json:"field_format,omitempty"` - FieldChoices []string `json:"field_choices,omitempty"` - ItemSchema *ItemSchema `json:"item_schema,omitempty"` +func (r *RemoteFieldClass) GetItemSchema() *ItemSchema { + if r == nil { + return nil + } + return r.ItemSchema +} - _rawJSON json.RawMessage +func (r *RemoteFieldClass) GetExtraProperties() map[string]interface{} { + return r.extraProperties } func (r *RemoteFieldClass) UnmarshalJSON(data []byte) error { @@ -40609,46 +18964,58 @@ func (r *RemoteFieldClass) UnmarshalJSON(data []byte) error { return err } *r = RemoteFieldClass(value) - r._rawJSON = json.RawMessage(data) + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { + return err + } + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) return nil } func (r *RemoteFieldClass) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(r); err == nil { + if value, err := internal.StringifyJSON(r); err == nil { return value } return fmt.Sprintf("%#v", r) } type RemoteFieldRemoteFieldClass struct { - typeName string String string RemoteFieldClass *RemoteFieldClass + + typ string } -func NewRemoteFieldRemoteFieldClassFromString(value string) *RemoteFieldRemoteFieldClass { - return &RemoteFieldRemoteFieldClass{typeName: "string", String: value} +func (r *RemoteFieldRemoteFieldClass) GetString() string { + if r == nil { + return "" + } + return r.String } -func NewRemoteFieldRemoteFieldClassFromRemoteFieldClass(value *RemoteFieldClass) *RemoteFieldRemoteFieldClass { - return &RemoteFieldRemoteFieldClass{typeName: "remoteFieldClass", RemoteFieldClass: value} +func (r *RemoteFieldRemoteFieldClass) GetRemoteFieldClass() *RemoteFieldClass { + if r == nil { + return nil + } + return r.RemoteFieldClass } func (r *RemoteFieldRemoteFieldClass) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - r.typeName = "string" + r.typ = "String" r.String = valueString return nil } valueRemoteFieldClass := new(RemoteFieldClass) if err := json.Unmarshal(data, &valueRemoteFieldClass); err == nil { - r.typeName = "remoteFieldClass" + r.typ = "RemoteFieldClass" r.RemoteFieldClass = valueRemoteFieldClass return nil } @@ -40656,14 +19023,13 @@ func (r *RemoteFieldRemoteFieldClass) UnmarshalJSON(data []byte) error { } func (r RemoteFieldRemoteFieldClass) MarshalJSON() ([]byte, error) { - switch r.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", r.typeName, r) - case "string": + if r.typ == "String" || r.String != "" { return json.Marshal(r.String) - case "remoteFieldClass": + } + if r.typ == "RemoteFieldClass" || r.RemoteFieldClass != nil { return json.Marshal(r.RemoteFieldClass) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", r) } type RemoteFieldRemoteFieldClassVisitor interface { @@ -40672,21 +19038,39 @@ type RemoteFieldRemoteFieldClassVisitor interface { } func (r *RemoteFieldRemoteFieldClass) Accept(visitor RemoteFieldRemoteFieldClassVisitor) error { - switch r.typeName { - default: - return fmt.Errorf("invalid type %s in %T", r.typeName, r) - case "string": + if r.typ == "String" || r.String != "" { return visitor.VisitString(r.String) - case "remoteFieldClass": + } + if r.typ == "RemoteFieldClass" || r.RemoteFieldClass != nil { return visitor.VisitRemoteFieldClass(r.RemoteFieldClass) } + return fmt.Errorf("type %T does not include a non-empty union type", r) } type RemoteFieldRequest struct { - RemoteFieldClass *RemoteFieldRequestRemoteFieldClass `json:"remote_field_class,omitempty"` - Value interface{} `json:"value,omitempty"` + RemoteFieldClass *RemoteFieldRequestRemoteFieldClass `json:"remote_field_class" url:"remote_field_class"` + Value interface{} `json:"value,omitempty" url:"value,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (r *RemoteFieldRequest) GetRemoteFieldClass() *RemoteFieldRequestRemoteFieldClass { + if r == nil { + return nil + } + return r.RemoteFieldClass +} + +func (r *RemoteFieldRequest) GetValue() interface{} { + if r == nil { + return nil + } + return r.Value +} - _rawJSON json.RawMessage +func (r *RemoteFieldRequest) GetExtraProperties() map[string]interface{} { + return r.extraProperties } func (r *RemoteFieldRequest) UnmarshalJSON(data []byte) error { @@ -40696,46 +19080,58 @@ func (r *RemoteFieldRequest) UnmarshalJSON(data []byte) error { return err } *r = RemoteFieldRequest(value) - r._rawJSON = json.RawMessage(data) + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { + return err + } + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) return nil } func (r *RemoteFieldRequest) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(r); err == nil { + if value, err := internal.StringifyJSON(r); err == nil { return value } return fmt.Sprintf("%#v", r) } type RemoteFieldRequestRemoteFieldClass struct { - typeName string String string RemoteFieldClass *RemoteFieldClass + + typ string } -func NewRemoteFieldRequestRemoteFieldClassFromString(value string) *RemoteFieldRequestRemoteFieldClass { - return &RemoteFieldRequestRemoteFieldClass{typeName: "string", String: value} +func (r *RemoteFieldRequestRemoteFieldClass) GetString() string { + if r == nil { + return "" + } + return r.String } -func NewRemoteFieldRequestRemoteFieldClassFromRemoteFieldClass(value *RemoteFieldClass) *RemoteFieldRequestRemoteFieldClass { - return &RemoteFieldRequestRemoteFieldClass{typeName: "remoteFieldClass", RemoteFieldClass: value} +func (r *RemoteFieldRequestRemoteFieldClass) GetRemoteFieldClass() *RemoteFieldClass { + if r == nil { + return nil + } + return r.RemoteFieldClass } func (r *RemoteFieldRequestRemoteFieldClass) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - r.typeName = "string" + r.typ = "String" r.String = valueString return nil } valueRemoteFieldClass := new(RemoteFieldClass) if err := json.Unmarshal(data, &valueRemoteFieldClass); err == nil { - r.typeName = "remoteFieldClass" + r.typ = "RemoteFieldClass" r.RemoteFieldClass = valueRemoteFieldClass return nil } @@ -40743,14 +19139,13 @@ func (r *RemoteFieldRequestRemoteFieldClass) UnmarshalJSON(data []byte) error { } func (r RemoteFieldRequestRemoteFieldClass) MarshalJSON() ([]byte, error) { - switch r.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", r.typeName, r) - case "string": + if r.typ == "String" || r.String != "" { return json.Marshal(r.String) - case "remoteFieldClass": + } + if r.typ == "RemoteFieldClass" || r.RemoteFieldClass != nil { return json.Marshal(r.RemoteFieldClass) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", r) } type RemoteFieldRequestRemoteFieldClassVisitor interface { @@ -40759,30 +19154,45 @@ type RemoteFieldRequestRemoteFieldClassVisitor interface { } func (r *RemoteFieldRequestRemoteFieldClass) Accept(visitor RemoteFieldRequestRemoteFieldClassVisitor) error { - switch r.typeName { - default: - return fmt.Errorf("invalid type %s in %T", r.typeName, r) - case "string": + if r.typ == "String" || r.String != "" { return visitor.VisitString(r.String) - case "remoteFieldClass": + } + if r.typ == "RemoteFieldClass" || r.RemoteFieldClass != nil { return visitor.VisitRemoteFieldClass(r.RemoteFieldClass) } + return fmt.Errorf("type %T does not include a non-empty union type", r) } // # The RemoteKey Object -// // ### Description -// // The `RemoteKey` object is used to represent a request for a new remote key. // // ### Usage Example -// // Post a `GenerateRemoteKey` to receive a new `RemoteKey`. type RemoteKey struct { - Name string `json:"name"` - Key string `json:"key"` + Name string `json:"name" url:"name"` + Key string `json:"key" url:"key"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (r *RemoteKey) GetName() string { + if r == nil { + return "" + } + return r.Name +} + +func (r *RemoteKey) GetKey() string { + if r == nil { + return "" + } + return r.Key +} + +func (r *RemoteKey) GetExtraProperties() map[string]interface{} { + return r.extraProperties } func (r *RemoteKey) UnmarshalJSON(data []byte) error { @@ -40792,41 +19202,97 @@ func (r *RemoteKey) UnmarshalJSON(data []byte) error { return err } *r = RemoteKey(value) - r._rawJSON = json.RawMessage(data) + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { + return err + } + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) return nil } func (r *RemoteKey) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(r); err == nil { + if value, err := internal.StringifyJSON(r); err == nil { return value } return fmt.Sprintf("%#v", r) } // # The RemoteResponse Object -// // ### Description -// // The `RemoteResponse` object is used to represent information returned from a third-party endpoint. // // ### Usage Example -// // View the `RemoteResponse` returned from your `DataPassthrough`. type RemoteResponse struct { - Method string `json:"method"` - Path string `json:"path"` - Status int `json:"status"` - Response interface{} `json:"response,omitempty"` - ResponseHeaders map[string]interface{} `json:"response_headers,omitempty"` - ResponseType *ResponseTypeEnum `json:"response_type,omitempty"` - Headers map[string]interface{} `json:"headers,omitempty"` + Method string `json:"method" url:"method"` + Path string `json:"path" url:"path"` + Status int `json:"status" url:"status"` + Response interface{} `json:"response" url:"response"` + ResponseHeaders map[string]interface{} `json:"response_headers,omitempty" url:"response_headers,omitempty"` + ResponseType *ResponseTypeEnum `json:"response_type,omitempty" url:"response_type,omitempty"` + Headers map[string]interface{} `json:"headers,omitempty" url:"headers,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (r *RemoteResponse) GetMethod() string { + if r == nil { + return "" + } + return r.Method +} + +func (r *RemoteResponse) GetPath() string { + if r == nil { + return "" + } + return r.Path +} + +func (r *RemoteResponse) GetStatus() int { + if r == nil { + return 0 + } + return r.Status +} + +func (r *RemoteResponse) GetResponse() interface{} { + if r == nil { + return nil + } + return r.Response +} + +func (r *RemoteResponse) GetResponseHeaders() map[string]interface{} { + if r == nil { + return nil + } + return r.ResponseHeaders +} - _rawJSON json.RawMessage +func (r *RemoteResponse) GetResponseType() *ResponseTypeEnum { + if r == nil { + return nil + } + return r.ResponseType +} + +func (r *RemoteResponse) GetHeaders() map[string]interface{} { + if r == nil { + return nil + } + return r.Headers +} + +func (r *RemoteResponse) GetExtraProperties() map[string]interface{} { + return r.extraProperties } func (r *RemoteResponse) UnmarshalJSON(data []byte) error { @@ -40836,77 +19302,167 @@ func (r *RemoteResponse) UnmarshalJSON(data []byte) error { return err } *r = RemoteResponse(value) - r._rawJSON = json.RawMessage(data) + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { + return err + } + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) return nil } func (r *RemoteResponse) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(r); err == nil { + if value, err := internal.StringifyJSON(r); err == nil { return value } return fmt.Sprintf("%#v", r) } // # The ReportItem Object -// // ### Description -// // The `ReportItem` object is used to represent a report item for a Balance Sheet, Cash Flow Statement or Profit and Loss Report. // // ### Usage Example -// // Fetch from the `GET BalanceSheet` endpoint and view the balance sheet's report items. type ReportItem struct { // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` // The report item's name. - Name *string `json:"name,omitempty"` + Name *string `json:"name,omitempty" url:"name,omitempty"` // The report item's value. - Value *float64 `json:"value,omitempty"` - SubItems []map[string]interface{} `json:"sub_items,omitempty"` + Value *float64 `json:"value,omitempty" url:"value,omitempty"` + SubItems []map[string]interface{} `json:"sub_items,omitempty" url:"sub_items,omitempty"` // The company the report item belongs to. - Company *string `json:"company,omitempty"` + Company *string `json:"company,omitempty" url:"company,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (r *ReportItem) GetRemoteId() *string { + if r == nil { + return nil + } + return r.RemoteId +} + +func (r *ReportItem) GetCreatedAt() *time.Time { + if r == nil { + return nil + } + return r.CreatedAt +} + +func (r *ReportItem) GetModifiedAt() *time.Time { + if r == nil { + return nil + } + return r.ModifiedAt +} + +func (r *ReportItem) GetName() *string { + if r == nil { + return nil + } + return r.Name +} + +func (r *ReportItem) GetValue() *float64 { + if r == nil { + return nil + } + return r.Value +} + +func (r *ReportItem) GetSubItems() []map[string]interface{} { + if r == nil { + return nil + } + return r.SubItems +} + +func (r *ReportItem) GetCompany() *string { + if r == nil { + return nil + } + return r.Company +} + +func (r *ReportItem) GetRemoteWasDeleted() *bool { + if r == nil { + return nil + } + return r.RemoteWasDeleted +} - _rawJSON json.RawMessage +func (r *ReportItem) GetExtraProperties() map[string]interface{} { + return r.extraProperties } func (r *ReportItem) UnmarshalJSON(data []byte) error { - type unmarshaler ReportItem - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { + type embed ReportItem + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*r), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *r = ReportItem(unmarshaler.embed) + r.CreatedAt = unmarshaler.CreatedAt.TimePtr() + r.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { return err } - *r = ReportItem(value) - r._rawJSON = json.RawMessage(data) + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) return nil } +func (r *ReportItem) MarshalJSON() ([]byte, error) { + type embed ReportItem + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*r), + CreatedAt: internal.NewOptionalDateTime(r.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(r.ModifiedAt), + } + return json.Marshal(marshaler) +} + func (r *ReportItem) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(r); err == nil { + if value, err := internal.StringifyJSON(r); err == nil { return value } return fmt.Sprintf("%#v", r) } -// - `JSON` - JSON -// - `XML` - XML -// - `MULTIPART` - MULTIPART +// * `JSON` - JSON +// * `XML` - XML +// * `MULTIPART` - MULTIPART type RequestFormatEnum string const ( @@ -40932,8 +19488,8 @@ func (r RequestFormatEnum) Ptr() *RequestFormatEnum { return &r } -// - `JSON` - JSON -// - `BASE64_GZIP` - BASE64_GZIP +// * `JSON` - JSON +// * `BASE64_GZIP` - BASE64_GZIP type ResponseTypeEnum string const ( @@ -40956,48 +19512,8 @@ func (r ResponseTypeEnum) Ptr() *ResponseTypeEnum { return &r } -// - `ADMIN` - ADMIN -// - `DEVELOPER` - DEVELOPER -// - `MEMBER` - MEMBER -// - `API` - API -// - `SYSTEM` - SYSTEM -// - `MERGE_TEAM` - MERGE_TEAM -type RoleEnum string - -const ( - RoleEnumAdmin RoleEnum = "ADMIN" - RoleEnumDeveloper RoleEnum = "DEVELOPER" - RoleEnumMember RoleEnum = "MEMBER" - RoleEnumApi RoleEnum = "API" - RoleEnumSystem RoleEnum = "SYSTEM" - RoleEnumMergeTeam RoleEnum = "MERGE_TEAM" -) - -func NewRoleEnumFromString(s string) (RoleEnum, error) { - switch s { - case "ADMIN": - return RoleEnumAdmin, nil - case "DEVELOPER": - return RoleEnumDeveloper, nil - case "MEMBER": - return RoleEnumMember, nil - case "API": - return RoleEnumApi, nil - case "SYSTEM": - return RoleEnumSystem, nil - case "MERGE_TEAM": - return RoleEnumMergeTeam, nil - } - var t RoleEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (r RoleEnum) Ptr() *RoleEnum { - return &r -} - -// - `IN_NEXT_SYNC` - IN_NEXT_SYNC -// - `IN_LAST_SYNC` - IN_LAST_SYNC +// * `IN_NEXT_SYNC` - IN_NEXT_SYNC +// * `IN_LAST_SYNC` - IN_LAST_SYNC type SelectiveSyncConfigurationsUsageEnum string const ( @@ -41020,8 +19536,8 @@ func (s SelectiveSyncConfigurationsUsageEnum) Ptr() *SelectiveSyncConfigurations return &s } -// - `ACTIVE` - ACTIVE -// - `ARCHIVED` - ARCHIVED +// * `ACTIVE` - ACTIVE +// * `ARCHIVED` - ARCHIVED type Status7D1Enum string const ( @@ -41044,8 +19560,8 @@ func (s Status7D1Enum) Ptr() *Status7D1Enum { return &s } -// - `ACTIVE` - ACTIVE -// - `INACTIVE` - INACTIVE +// * `ACTIVE` - ACTIVE +// * `INACTIVE` - INACTIVE type Status895Enum string const ( @@ -41060,150 +19576,464 @@ func NewStatus895EnumFromString(s string) (Status895Enum, error) { case "INACTIVE": return Status895EnumInactive, nil } - var t Status895Enum + var t Status895Enum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (s Status895Enum) Ptr() *Status895Enum { + return &s +} + +// * `SYNCING` - SYNCING +// * `DONE` - DONE +// * `FAILED` - FAILED +// * `DISABLED` - DISABLED +// * `PAUSED` - PAUSED +// * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED +type StatusFd5Enum string + +const ( + StatusFd5EnumSyncing StatusFd5Enum = "SYNCING" + StatusFd5EnumDone StatusFd5Enum = "DONE" + StatusFd5EnumFailed StatusFd5Enum = "FAILED" + StatusFd5EnumDisabled StatusFd5Enum = "DISABLED" + StatusFd5EnumPaused StatusFd5Enum = "PAUSED" + StatusFd5EnumPartiallySynced StatusFd5Enum = "PARTIALLY_SYNCED" +) + +func NewStatusFd5EnumFromString(s string) (StatusFd5Enum, error) { + switch s { + case "SYNCING": + return StatusFd5EnumSyncing, nil + case "DONE": + return StatusFd5EnumDone, nil + case "FAILED": + return StatusFd5EnumFailed, nil + case "DISABLED": + return StatusFd5EnumDisabled, nil + case "PAUSED": + return StatusFd5EnumPaused, nil + case "PARTIALLY_SYNCED": + return StatusFd5EnumPartiallySynced, nil + } + var t StatusFd5Enum return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (s Status895Enum) Ptr() *Status895Enum { +func (s StatusFd5Enum) Ptr() *StatusFd5Enum { return &s } // # The SyncStatus Object -// // ### Description -// -// # The `SyncStatus` object is used to represent the syncing state of an account +// The `SyncStatus` object is used to represent the syncing state of an account // // ### Usage Example -// // View the `SyncStatus` for an account to see how recently its models were synced. type SyncStatus struct { - ModelName string `json:"model_name"` - ModelId string `json:"model_id"` - LastSyncStart *time.Time `json:"last_sync_start,omitempty"` - NextSyncStart *time.Time `json:"next_sync_start,omitempty"` - Status SyncStatusStatusEnum `json:"status,omitempty"` - IsInitialSync bool `json:"is_initial_sync"` - SelectiveSyncConfigurationsUsage *SelectiveSyncConfigurationsUsageEnum `json:"selective_sync_configurations_usage,omitempty"` + ModelName string `json:"model_name" url:"model_name"` + ModelId string `json:"model_id" url:"model_id"` + LastSyncStart *time.Time `json:"last_sync_start,omitempty" url:"last_sync_start,omitempty"` + NextSyncStart *time.Time `json:"next_sync_start,omitempty" url:"next_sync_start,omitempty"` + LastSyncResult *SyncStatusLastSyncResult `json:"last_sync_result,omitempty" url:"last_sync_result,omitempty"` + LastSyncFinished *time.Time `json:"last_sync_finished,omitempty" url:"last_sync_finished,omitempty"` + Status *SyncStatusStatus `json:"status" url:"status"` + IsInitialSync bool `json:"is_initial_sync" url:"is_initial_sync"` + SelectiveSyncConfigurationsUsage *SelectiveSyncConfigurationsUsageEnum `json:"selective_sync_configurations_usage,omitempty" url:"selective_sync_configurations_usage,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (s *SyncStatus) GetModelName() string { + if s == nil { + return "" + } + return s.ModelName +} + +func (s *SyncStatus) GetModelId() string { + if s == nil { + return "" + } + return s.ModelId +} + +func (s *SyncStatus) GetLastSyncStart() *time.Time { + if s == nil { + return nil + } + return s.LastSyncStart +} + +func (s *SyncStatus) GetNextSyncStart() *time.Time { + if s == nil { + return nil + } + return s.NextSyncStart +} + +func (s *SyncStatus) GetLastSyncResult() *SyncStatusLastSyncResult { + if s == nil { + return nil + } + return s.LastSyncResult +} + +func (s *SyncStatus) GetLastSyncFinished() *time.Time { + if s == nil { + return nil + } + return s.LastSyncFinished +} + +func (s *SyncStatus) GetStatus() *SyncStatusStatus { + if s == nil { + return nil + } + return s.Status +} + +func (s *SyncStatus) GetIsInitialSync() bool { + if s == nil { + return false + } + return s.IsInitialSync +} + +func (s *SyncStatus) GetSelectiveSyncConfigurationsUsage() *SelectiveSyncConfigurationsUsageEnum { + if s == nil { + return nil + } + return s.SelectiveSyncConfigurationsUsage +} - _rawJSON json.RawMessage +func (s *SyncStatus) GetExtraProperties() map[string]interface{} { + return s.extraProperties } func (s *SyncStatus) UnmarshalJSON(data []byte) error { - type unmarshaler SyncStatus - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { + type embed SyncStatus + var unmarshaler = struct { + embed + LastSyncStart *internal.DateTime `json:"last_sync_start,omitempty"` + NextSyncStart *internal.DateTime `json:"next_sync_start,omitempty"` + LastSyncFinished *internal.DateTime `json:"last_sync_finished,omitempty"` + }{ + embed: embed(*s), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *s = SyncStatus(unmarshaler.embed) + s.LastSyncStart = unmarshaler.LastSyncStart.TimePtr() + s.NextSyncStart = unmarshaler.NextSyncStart.TimePtr() + s.LastSyncFinished = unmarshaler.LastSyncFinished.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *s) + if err != nil { return err } - *s = SyncStatus(value) - s._rawJSON = json.RawMessage(data) + s.extraProperties = extraProperties + s.rawJSON = json.RawMessage(data) return nil } +func (s *SyncStatus) MarshalJSON() ([]byte, error) { + type embed SyncStatus + var marshaler = struct { + embed + LastSyncStart *internal.DateTime `json:"last_sync_start,omitempty"` + NextSyncStart *internal.DateTime `json:"next_sync_start,omitempty"` + LastSyncFinished *internal.DateTime `json:"last_sync_finished,omitempty"` + }{ + embed: embed(*s), + LastSyncStart: internal.NewOptionalDateTime(s.LastSyncStart), + NextSyncStart: internal.NewOptionalDateTime(s.NextSyncStart), + LastSyncFinished: internal.NewOptionalDateTime(s.LastSyncFinished), + } + return json.Marshal(marshaler) +} + func (s *SyncStatus) String() string { - if len(s._rawJSON) > 0 { - if value, err := core.StringifyJSON(s._rawJSON); err == nil { + if len(s.rawJSON) > 0 { + if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(s); err == nil { + if value, err := internal.StringifyJSON(s); err == nil { return value } return fmt.Sprintf("%#v", s) } -// - `SYNCING` - SYNCING -// - `DONE` - DONE -// - `FAILED` - FAILED -// - `DISABLED` - DISABLED -// - `PAUSED` - PAUSED -// - `PARTIALLY_SYNCED` - PARTIALLY_SYNCED -type SyncStatusStatusEnum string +type SyncStatusLastSyncResult struct { + LastSyncResultEnum LastSyncResultEnum + String string -const ( - SyncStatusStatusEnumSyncing SyncStatusStatusEnum = "SYNCING" - SyncStatusStatusEnumDone SyncStatusStatusEnum = "DONE" - SyncStatusStatusEnumFailed SyncStatusStatusEnum = "FAILED" - SyncStatusStatusEnumDisabled SyncStatusStatusEnum = "DISABLED" - SyncStatusStatusEnumPaused SyncStatusStatusEnum = "PAUSED" - SyncStatusStatusEnumPartiallySynced SyncStatusStatusEnum = "PARTIALLY_SYNCED" -) + typ string +} -func NewSyncStatusStatusEnumFromString(s string) (SyncStatusStatusEnum, error) { - switch s { - case "SYNCING": - return SyncStatusStatusEnumSyncing, nil - case "DONE": - return SyncStatusStatusEnumDone, nil - case "FAILED": - return SyncStatusStatusEnumFailed, nil - case "DISABLED": - return SyncStatusStatusEnumDisabled, nil - case "PAUSED": - return SyncStatusStatusEnumPaused, nil - case "PARTIALLY_SYNCED": - return SyncStatusStatusEnumPartiallySynced, nil +func (s *SyncStatusLastSyncResult) GetLastSyncResultEnum() LastSyncResultEnum { + if s == nil { + return "" } - var t SyncStatusStatusEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) + return s.LastSyncResultEnum } -func (s SyncStatusStatusEnum) Ptr() *SyncStatusStatusEnum { - return &s +func (s *SyncStatusLastSyncResult) GetString() string { + if s == nil { + return "" + } + return s.String +} + +func (s *SyncStatusLastSyncResult) UnmarshalJSON(data []byte) error { + var valueLastSyncResultEnum LastSyncResultEnum + if err := json.Unmarshal(data, &valueLastSyncResultEnum); err == nil { + s.typ = "LastSyncResultEnum" + s.LastSyncResultEnum = valueLastSyncResultEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + s.typ = "String" + s.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, s) +} + +func (s SyncStatusLastSyncResult) MarshalJSON() ([]byte, error) { + if s.typ == "LastSyncResultEnum" || s.LastSyncResultEnum != "" { + return json.Marshal(s.LastSyncResultEnum) + } + if s.typ == "String" || s.String != "" { + return json.Marshal(s.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", s) +} + +type SyncStatusLastSyncResultVisitor interface { + VisitLastSyncResultEnum(LastSyncResultEnum) error + VisitString(string) error +} + +func (s *SyncStatusLastSyncResult) Accept(visitor SyncStatusLastSyncResultVisitor) error { + if s.typ == "LastSyncResultEnum" || s.LastSyncResultEnum != "" { + return visitor.VisitLastSyncResultEnum(s.LastSyncResultEnum) + } + if s.typ == "String" || s.String != "" { + return visitor.VisitString(s.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", s) +} + +type SyncStatusStatus struct { + StatusFd5Enum StatusFd5Enum + String string + + typ string +} + +func (s *SyncStatusStatus) GetStatusFd5Enum() StatusFd5Enum { + if s == nil { + return "" + } + return s.StatusFd5Enum +} + +func (s *SyncStatusStatus) GetString() string { + if s == nil { + return "" + } + return s.String +} + +func (s *SyncStatusStatus) UnmarshalJSON(data []byte) error { + var valueStatusFd5Enum StatusFd5Enum + if err := json.Unmarshal(data, &valueStatusFd5Enum); err == nil { + s.typ = "StatusFd5Enum" + s.StatusFd5Enum = valueStatusFd5Enum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + s.typ = "String" + s.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, s) +} + +func (s SyncStatusStatus) MarshalJSON() ([]byte, error) { + if s.typ == "StatusFd5Enum" || s.StatusFd5Enum != "" { + return json.Marshal(s.StatusFd5Enum) + } + if s.typ == "String" || s.String != "" { + return json.Marshal(s.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", s) +} + +type SyncStatusStatusVisitor interface { + VisitStatusFd5Enum(StatusFd5Enum) error + VisitString(string) error +} + +func (s *SyncStatusStatus) Accept(visitor SyncStatusStatusVisitor) error { + if s.typ == "StatusFd5Enum" || s.StatusFd5Enum != "" { + return visitor.VisitStatusFd5Enum(s.StatusFd5Enum) + } + if s.typ == "String" || s.String != "" { + return visitor.VisitString(s.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", s) } // # The TaxRate Object -// // ### Description -// // The `TaxComponent` object is used to represent any sub-taxes that make up the `TaxRate`. // // ### Usage Example -// // Fetch from the `LIST TaxRates` endpoint and view tax components relevant to a tax rate. type TaxComponent struct { - Id *string `json:"id,omitempty"` + Id *string `json:"id,omitempty" url:"id,omitempty"` // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` // The tax rate’s name. - Name *string `json:"name,omitempty"` + Name *string `json:"name,omitempty" url:"name,omitempty"` // The tax component’s rate. - Rate *string `json:"rate,omitempty"` + Rate *string `json:"rate,omitempty" url:"rate,omitempty"` // Returns True if the tax component is compound, False if not. - IsCompound *bool `json:"is_compound,omitempty"` + IsCompound *bool `json:"is_compound,omitempty" url:"is_compound,omitempty"` // Returns PURCHASE if the tax component corresponds to a purchase tax or SALES if the tax component corresponds to a sales tax. // - // - `SALES` - SALES - // - `PURCHASE` - PURCHASE - ComponentType *TaxComponentComponentType `json:"component_type,omitempty"` + // * `SALES` - SALES + // * `PURCHASE` - PURCHASE + ComponentType *TaxComponentComponentType `json:"component_type,omitempty" url:"component_type,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (t *TaxComponent) GetId() *string { + if t == nil { + return nil + } + return t.Id +} + +func (t *TaxComponent) GetRemoteId() *string { + if t == nil { + return nil + } + return t.RemoteId +} + +func (t *TaxComponent) GetCreatedAt() *time.Time { + if t == nil { + return nil + } + return t.CreatedAt +} + +func (t *TaxComponent) GetModifiedAt() *time.Time { + if t == nil { + return nil + } + return t.ModifiedAt +} + +func (t *TaxComponent) GetName() *string { + if t == nil { + return nil + } + return t.Name +} + +func (t *TaxComponent) GetRate() *string { + if t == nil { + return nil + } + return t.Rate +} + +func (t *TaxComponent) GetIsCompound() *bool { + if t == nil { + return nil + } + return t.IsCompound +} + +func (t *TaxComponent) GetComponentType() *TaxComponentComponentType { + if t == nil { + return nil + } + return t.ComponentType +} + +func (t *TaxComponent) GetRemoteWasDeleted() *bool { + if t == nil { + return nil + } + return t.RemoteWasDeleted +} - _rawJSON json.RawMessage +func (t *TaxComponent) GetExtraProperties() map[string]interface{} { + return t.extraProperties } func (t *TaxComponent) UnmarshalJSON(data []byte) error { - type unmarshaler TaxComponent - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { + type embed TaxComponent + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*t), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *t = TaxComponent(unmarshaler.embed) + t.CreatedAt = unmarshaler.CreatedAt.TimePtr() + t.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *t) + if err != nil { return err } - *t = TaxComponent(value) - t._rawJSON = json.RawMessage(data) + t.extraProperties = extraProperties + t.rawJSON = json.RawMessage(data) return nil } +func (t *TaxComponent) MarshalJSON() ([]byte, error) { + type embed TaxComponent + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*t), + CreatedAt: internal.NewOptionalDateTime(t.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(t.ModifiedAt), + } + return json.Marshal(marshaler) +} + func (t *TaxComponent) String() string { - if len(t._rawJSON) > 0 { - if value, err := core.StringifyJSON(t._rawJSON); err == nil { + if len(t.rawJSON) > 0 { + if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(t); err == nil { + if value, err := internal.StringifyJSON(t); err == nil { return value } return fmt.Sprintf("%#v", t) @@ -41211,32 +20041,39 @@ func (t *TaxComponent) String() string { // Returns PURCHASE if the tax component corresponds to a purchase tax or SALES if the tax component corresponds to a sales tax. // -// - `SALES` - SALES -// - `PURCHASE` - PURCHASE +// * `SALES` - SALES +// * `PURCHASE` - PURCHASE type TaxComponentComponentType struct { - typeName string ComponentTypeEnum ComponentTypeEnum String string + + typ string } -func NewTaxComponentComponentTypeFromComponentTypeEnum(value ComponentTypeEnum) *TaxComponentComponentType { - return &TaxComponentComponentType{typeName: "componentTypeEnum", ComponentTypeEnum: value} +func (t *TaxComponentComponentType) GetComponentTypeEnum() ComponentTypeEnum { + if t == nil { + return "" + } + return t.ComponentTypeEnum } -func NewTaxComponentComponentTypeFromString(value string) *TaxComponentComponentType { - return &TaxComponentComponentType{typeName: "string", String: value} +func (t *TaxComponentComponentType) GetString() string { + if t == nil { + return "" + } + return t.String } func (t *TaxComponentComponentType) UnmarshalJSON(data []byte) error { var valueComponentTypeEnum ComponentTypeEnum if err := json.Unmarshal(data, &valueComponentTypeEnum); err == nil { - t.typeName = "componentTypeEnum" + t.typ = "ComponentTypeEnum" t.ComponentTypeEnum = valueComponentTypeEnum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" + t.typ = "String" t.String = valueString return nil } @@ -41244,14 +20081,13 @@ func (t *TaxComponentComponentType) UnmarshalJSON(data []byte) error { } func (t TaxComponentComponentType) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "componentTypeEnum": + if t.typ == "ComponentTypeEnum" || t.ComponentTypeEnum != "" { return json.Marshal(t.ComponentTypeEnum) - case "string": + } + if t.typ == "String" || t.String != "" { return json.Marshal(t.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) } type TaxComponentComponentTypeVisitor interface { @@ -41260,80 +20096,220 @@ type TaxComponentComponentTypeVisitor interface { } func (t *TaxComponentComponentType) Accept(visitor TaxComponentComponentTypeVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "componentTypeEnum": + if t.typ == "ComponentTypeEnum" || t.ComponentTypeEnum != "" { return visitor.VisitComponentTypeEnum(t.ComponentTypeEnum) - case "string": + } + if t.typ == "String" || t.String != "" { return visitor.VisitString(t.String) } + return fmt.Errorf("type %T does not include a non-empty union type", t) } // # The TaxRate Object -// // ### Description -// // The `TaxRate` object is used to represent a tax rate. // // ### Usage Example -// // Fetch from the `LIST TaxRates` endpoint and view tax rates relevant to a company. type TaxRate struct { - Id *string `json:"id,omitempty"` + Id *string `json:"id,omitempty" url:"id,omitempty"` // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` // The subsidiary that the tax rate belongs to (in the case of multi-entity systems). - Company *TaxRateCompany `json:"company,omitempty"` + Company *TaxRateCompany `json:"company,omitempty" url:"company,omitempty"` // The tax code associated with this tax rate or group of tax rates from the third-party platform. - Code *string `json:"code,omitempty"` + Code *string `json:"code,omitempty" url:"code,omitempty"` // The tax rate’s name. - Name *string `json:"name,omitempty"` + Name *string `json:"name,omitempty" url:"name,omitempty"` // The tax rate's description. - Description *string `json:"description,omitempty"` + Description *string `json:"description,omitempty" url:"description,omitempty"` // The tax rate’s status - `ACTIVE` if an active tax rate, `ARCHIVED` if not active. // - // - `ACTIVE` - ACTIVE - // - `ARCHIVED` - ARCHIVED - Status *TaxRateStatus `json:"status,omitempty"` + // * `ACTIVE` - ACTIVE + // * `ARCHIVED` - ARCHIVED + Status *TaxRateStatus `json:"status,omitempty" url:"status,omitempty"` // The country the tax rate is associated with. - Country *string `json:"country,omitempty"` + Country *string `json:"country,omitempty" url:"country,omitempty"` // The tax’s total tax rate - sum of the tax components (not compounded). - TotalTaxRate *float64 `json:"total_tax_rate,omitempty"` + TotalTaxRate *float64 `json:"total_tax_rate,omitempty" url:"total_tax_rate,omitempty"` // The tax rate’s effective tax rate - total amount of tax with compounding. - EffectiveTaxRate *float64 `json:"effective_tax_rate,omitempty"` + EffectiveTaxRate *float64 `json:"effective_tax_rate,omitempty" url:"effective_tax_rate,omitempty"` // The related tax components of the tax rate. - TaxComponents []*TaxRateTaxComponentsItem `json:"tax_components,omitempty"` + TaxComponents []*TaxRateTaxComponentsItem `json:"tax_components,omitempty" url:"tax_components,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (t *TaxRate) GetId() *string { + if t == nil { + return nil + } + return t.Id +} + +func (t *TaxRate) GetRemoteId() *string { + if t == nil { + return nil + } + return t.RemoteId +} + +func (t *TaxRate) GetCreatedAt() *time.Time { + if t == nil { + return nil + } + return t.CreatedAt +} + +func (t *TaxRate) GetModifiedAt() *time.Time { + if t == nil { + return nil + } + return t.ModifiedAt +} + +func (t *TaxRate) GetCompany() *TaxRateCompany { + if t == nil { + return nil + } + return t.Company +} + +func (t *TaxRate) GetCode() *string { + if t == nil { + return nil + } + return t.Code +} + +func (t *TaxRate) GetName() *string { + if t == nil { + return nil + } + return t.Name +} + +func (t *TaxRate) GetDescription() *string { + if t == nil { + return nil + } + return t.Description +} + +func (t *TaxRate) GetStatus() *TaxRateStatus { + if t == nil { + return nil + } + return t.Status +} + +func (t *TaxRate) GetCountry() *string { + if t == nil { + return nil + } + return t.Country +} + +func (t *TaxRate) GetTotalTaxRate() *float64 { + if t == nil { + return nil + } + return t.TotalTaxRate +} + +func (t *TaxRate) GetEffectiveTaxRate() *float64 { + if t == nil { + return nil + } + return t.EffectiveTaxRate +} + +func (t *TaxRate) GetTaxComponents() []*TaxRateTaxComponentsItem { + if t == nil { + return nil + } + return t.TaxComponents +} + +func (t *TaxRate) GetRemoteWasDeleted() *bool { + if t == nil { + return nil + } + return t.RemoteWasDeleted +} + +func (t *TaxRate) GetFieldMappings() map[string]interface{} { + if t == nil { + return nil + } + return t.FieldMappings +} + +func (t *TaxRate) GetRemoteData() []*RemoteData { + if t == nil { + return nil + } + return t.RemoteData +} - _rawJSON json.RawMessage +func (t *TaxRate) GetExtraProperties() map[string]interface{} { + return t.extraProperties } func (t *TaxRate) UnmarshalJSON(data []byte) error { - type unmarshaler TaxRate - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { + type embed TaxRate + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*t), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { return err } - *t = TaxRate(value) - t._rawJSON = json.RawMessage(data) + *t = TaxRate(unmarshaler.embed) + t.CreatedAt = unmarshaler.CreatedAt.TimePtr() + t.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *t) + if err != nil { + return err + } + t.extraProperties = extraProperties + t.rawJSON = json.RawMessage(data) return nil } +func (t *TaxRate) MarshalJSON() ([]byte, error) { + type embed TaxRate + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*t), + CreatedAt: internal.NewOptionalDateTime(t.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(t.ModifiedAt), + } + return json.Marshal(marshaler) +} + func (t *TaxRate) String() string { - if len(t._rawJSON) > 0 { - if value, err := core.StringifyJSON(t._rawJSON); err == nil { + if len(t.rawJSON) > 0 { + if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(t); err == nil { + if value, err := internal.StringifyJSON(t); err == nil { return value } return fmt.Sprintf("%#v", t) @@ -41341,29 +20317,36 @@ func (t *TaxRate) String() string { // The subsidiary that the tax rate belongs to (in the case of multi-entity systems). type TaxRateCompany struct { - typeName string String string CompanyInfo *CompanyInfo + + typ string } -func NewTaxRateCompanyFromString(value string) *TaxRateCompany { - return &TaxRateCompany{typeName: "string", String: value} +func (t *TaxRateCompany) GetString() string { + if t == nil { + return "" + } + return t.String } -func NewTaxRateCompanyFromCompanyInfo(value *CompanyInfo) *TaxRateCompany { - return &TaxRateCompany{typeName: "companyInfo", CompanyInfo: value} +func (t *TaxRateCompany) GetCompanyInfo() *CompanyInfo { + if t == nil { + return nil + } + return t.CompanyInfo } func (t *TaxRateCompany) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" + t.typ = "String" t.String = valueString return nil } valueCompanyInfo := new(CompanyInfo) if err := json.Unmarshal(data, &valueCompanyInfo); err == nil { - t.typeName = "companyInfo" + t.typ = "CompanyInfo" t.CompanyInfo = valueCompanyInfo return nil } @@ -41371,14 +20354,13 @@ func (t *TaxRateCompany) UnmarshalJSON(data []byte) error { } func (t TaxRateCompany) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": + if t.typ == "String" || t.String != "" { return json.Marshal(t.String) - case "companyInfo": + } + if t.typ == "CompanyInfo" || t.CompanyInfo != nil { return json.Marshal(t.CompanyInfo) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) } type TaxRateCompanyVisitor interface { @@ -41387,44 +20369,50 @@ type TaxRateCompanyVisitor interface { } func (t *TaxRateCompany) Accept(visitor TaxRateCompanyVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": + if t.typ == "String" || t.String != "" { return visitor.VisitString(t.String) - case "companyInfo": + } + if t.typ == "CompanyInfo" || t.CompanyInfo != nil { return visitor.VisitCompanyInfo(t.CompanyInfo) } + return fmt.Errorf("type %T does not include a non-empty union type", t) } // The tax rate’s status - `ACTIVE` if an active tax rate, `ARCHIVED` if not active. // -// - `ACTIVE` - ACTIVE -// - `ARCHIVED` - ARCHIVED +// * `ACTIVE` - ACTIVE +// * `ARCHIVED` - ARCHIVED type TaxRateStatus struct { - typeName string Status7D1Enum Status7D1Enum String string + + typ string } -func NewTaxRateStatusFromStatus7D1Enum(value Status7D1Enum) *TaxRateStatus { - return &TaxRateStatus{typeName: "status7D1Enum", Status7D1Enum: value} +func (t *TaxRateStatus) GetStatus7D1Enum() Status7D1Enum { + if t == nil { + return "" + } + return t.Status7D1Enum } -func NewTaxRateStatusFromString(value string) *TaxRateStatus { - return &TaxRateStatus{typeName: "string", String: value} +func (t *TaxRateStatus) GetString() string { + if t == nil { + return "" + } + return t.String } func (t *TaxRateStatus) UnmarshalJSON(data []byte) error { var valueStatus7D1Enum Status7D1Enum if err := json.Unmarshal(data, &valueStatus7D1Enum); err == nil { - t.typeName = "status7D1Enum" + t.typ = "Status7D1Enum" t.Status7D1Enum = valueStatus7D1Enum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" + t.typ = "String" t.String = valueString return nil } @@ -41432,14 +20420,13 @@ func (t *TaxRateStatus) UnmarshalJSON(data []byte) error { } func (t TaxRateStatus) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "status7D1Enum": + if t.typ == "Status7D1Enum" || t.Status7D1Enum != "" { return json.Marshal(t.Status7D1Enum) - case "string": + } + if t.typ == "String" || t.String != "" { return json.Marshal(t.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) } type TaxRateStatusVisitor interface { @@ -41448,40 +20435,46 @@ type TaxRateStatusVisitor interface { } func (t *TaxRateStatus) Accept(visitor TaxRateStatusVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "status7D1Enum": + if t.typ == "Status7D1Enum" || t.Status7D1Enum != "" { return visitor.VisitStatus7D1Enum(t.Status7D1Enum) - case "string": + } + if t.typ == "String" || t.String != "" { return visitor.VisitString(t.String) } + return fmt.Errorf("type %T does not include a non-empty union type", t) } type TaxRateTaxComponentsItem struct { - typeName string String string TaxComponent *TaxComponent + + typ string } -func NewTaxRateTaxComponentsItemFromString(value string) *TaxRateTaxComponentsItem { - return &TaxRateTaxComponentsItem{typeName: "string", String: value} +func (t *TaxRateTaxComponentsItem) GetString() string { + if t == nil { + return "" + } + return t.String } -func NewTaxRateTaxComponentsItemFromTaxComponent(value *TaxComponent) *TaxRateTaxComponentsItem { - return &TaxRateTaxComponentsItem{typeName: "taxComponent", TaxComponent: value} +func (t *TaxRateTaxComponentsItem) GetTaxComponent() *TaxComponent { + if t == nil { + return nil + } + return t.TaxComponent } func (t *TaxRateTaxComponentsItem) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" + t.typ = "String" t.String = valueString return nil } valueTaxComponent := new(TaxComponent) if err := json.Unmarshal(data, &valueTaxComponent); err == nil { - t.typeName = "taxComponent" + t.typ = "TaxComponent" t.TaxComponent = valueTaxComponent return nil } @@ -41489,14 +20482,13 @@ func (t *TaxRateTaxComponentsItem) UnmarshalJSON(data []byte) error { } func (t TaxRateTaxComponentsItem) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": + if t.typ == "String" || t.String != "" { return json.Marshal(t.String) - case "taxComponent": + } + if t.typ == "TaxComponent" || t.TaxComponent != nil { return json.Marshal(t.TaxComponent) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) } type TaxRateTaxComponentsItemVisitor interface { @@ -41505,73 +20497,178 @@ type TaxRateTaxComponentsItemVisitor interface { } func (t *TaxRateTaxComponentsItem) Accept(visitor TaxRateTaxComponentsItemVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": + if t.typ == "String" || t.String != "" { return visitor.VisitString(t.String) - case "taxComponent": + } + if t.typ == "TaxComponent" || t.TaxComponent != nil { return visitor.VisitTaxComponent(t.TaxComponent) } + return fmt.Errorf("type %T does not include a non-empty union type", t) } // # The TrackingCategory Object -// // ### Description -// // A `TrackingCategory` object represents a categorization method used to classify transactions within an accounting platform. They are often used to group records for reporting and analysis purposes. The most common types of `TrackingCategories` are Classes and Departments. // // ### Usage Example -// // Fetch from the `GET TrackingCategory` endpoint and view a company's tracking category. type TrackingCategory struct { - Id *string `json:"id,omitempty"` + Id *string `json:"id,omitempty" url:"id,omitempty"` // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` // The tracking category's name. - Name *string `json:"name,omitempty"` + Name *string `json:"name,omitempty" url:"name,omitempty"` // The tracking category's status. // - // - `ACTIVE` - ACTIVE - // - `ARCHIVED` - ARCHIVED - Status *TrackingCategoryStatus `json:"status,omitempty"` + // * `ACTIVE` - ACTIVE + // * `ARCHIVED` - ARCHIVED + Status *TrackingCategoryStatus `json:"status,omitempty" url:"status,omitempty"` // The tracking category’s type. // - // - `CLASS` - CLASS - // - `DEPARTMENT` - DEPARTMENT - CategoryType *TrackingCategoryCategoryType `json:"category_type,omitempty"` - ParentCategory *string `json:"parent_category,omitempty"` + // * `CLASS` - CLASS + // * `DEPARTMENT` - DEPARTMENT + CategoryType *TrackingCategoryCategoryType `json:"category_type,omitempty" url:"category_type,omitempty"` + ParentCategory *string `json:"parent_category,omitempty" url:"parent_category,omitempty"` // The company the GeneralLedgerTransaction belongs to. - Company *TrackingCategoryCompany `json:"company,omitempty"` + Company *TrackingCategoryCompany `json:"company,omitempty" url:"company,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (t *TrackingCategory) GetId() *string { + if t == nil { + return nil + } + return t.Id +} + +func (t *TrackingCategory) GetRemoteId() *string { + if t == nil { + return nil + } + return t.RemoteId +} + +func (t *TrackingCategory) GetCreatedAt() *time.Time { + if t == nil { + return nil + } + return t.CreatedAt +} + +func (t *TrackingCategory) GetModifiedAt() *time.Time { + if t == nil { + return nil + } + return t.ModifiedAt +} + +func (t *TrackingCategory) GetName() *string { + if t == nil { + return nil + } + return t.Name +} + +func (t *TrackingCategory) GetStatus() *TrackingCategoryStatus { + if t == nil { + return nil + } + return t.Status +} + +func (t *TrackingCategory) GetCategoryType() *TrackingCategoryCategoryType { + if t == nil { + return nil + } + return t.CategoryType +} + +func (t *TrackingCategory) GetParentCategory() *string { + if t == nil { + return nil + } + return t.ParentCategory +} + +func (t *TrackingCategory) GetCompany() *TrackingCategoryCompany { + if t == nil { + return nil + } + return t.Company +} + +func (t *TrackingCategory) GetRemoteWasDeleted() *bool { + if t == nil { + return nil + } + return t.RemoteWasDeleted +} + +func (t *TrackingCategory) GetFieldMappings() map[string]interface{} { + if t == nil { + return nil + } + return t.FieldMappings +} - _rawJSON json.RawMessage +func (t *TrackingCategory) GetExtraProperties() map[string]interface{} { + return t.extraProperties } func (t *TrackingCategory) UnmarshalJSON(data []byte) error { - type unmarshaler TrackingCategory - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { + type embed TrackingCategory + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*t), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *t = TrackingCategory(unmarshaler.embed) + t.CreatedAt = unmarshaler.CreatedAt.TimePtr() + t.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *t) + if err != nil { return err } - *t = TrackingCategory(value) - t._rawJSON = json.RawMessage(data) + t.extraProperties = extraProperties + t.rawJSON = json.RawMessage(data) return nil } +func (t *TrackingCategory) MarshalJSON() ([]byte, error) { + type embed TrackingCategory + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*t), + CreatedAt: internal.NewOptionalDateTime(t.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(t.ModifiedAt), + } + return json.Marshal(marshaler) +} + func (t *TrackingCategory) String() string { - if len(t._rawJSON) > 0 { - if value, err := core.StringifyJSON(t._rawJSON); err == nil { + if len(t.rawJSON) > 0 { + if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(t); err == nil { + if value, err := internal.StringifyJSON(t); err == nil { return value } return fmt.Sprintf("%#v", t) @@ -41579,32 +20676,39 @@ func (t *TrackingCategory) String() string { // The tracking category’s type. // -// - `CLASS` - CLASS -// - `DEPARTMENT` - DEPARTMENT +// * `CLASS` - CLASS +// * `DEPARTMENT` - DEPARTMENT type TrackingCategoryCategoryType struct { - typeName string CategoryTypeEnum CategoryTypeEnum String string + + typ string } -func NewTrackingCategoryCategoryTypeFromCategoryTypeEnum(value CategoryTypeEnum) *TrackingCategoryCategoryType { - return &TrackingCategoryCategoryType{typeName: "categoryTypeEnum", CategoryTypeEnum: value} +func (t *TrackingCategoryCategoryType) GetCategoryTypeEnum() CategoryTypeEnum { + if t == nil { + return "" + } + return t.CategoryTypeEnum } -func NewTrackingCategoryCategoryTypeFromString(value string) *TrackingCategoryCategoryType { - return &TrackingCategoryCategoryType{typeName: "string", String: value} +func (t *TrackingCategoryCategoryType) GetString() string { + if t == nil { + return "" + } + return t.String } func (t *TrackingCategoryCategoryType) UnmarshalJSON(data []byte) error { var valueCategoryTypeEnum CategoryTypeEnum if err := json.Unmarshal(data, &valueCategoryTypeEnum); err == nil { - t.typeName = "categoryTypeEnum" + t.typ = "CategoryTypeEnum" t.CategoryTypeEnum = valueCategoryTypeEnum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" + t.typ = "String" t.String = valueString return nil } @@ -41612,14 +20716,13 @@ func (t *TrackingCategoryCategoryType) UnmarshalJSON(data []byte) error { } func (t TrackingCategoryCategoryType) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "categoryTypeEnum": + if t.typ == "CategoryTypeEnum" || t.CategoryTypeEnum != "" { return json.Marshal(t.CategoryTypeEnum) - case "string": + } + if t.typ == "String" || t.String != "" { return json.Marshal(t.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) } type TrackingCategoryCategoryTypeVisitor interface { @@ -41628,41 +20731,47 @@ type TrackingCategoryCategoryTypeVisitor interface { } func (t *TrackingCategoryCategoryType) Accept(visitor TrackingCategoryCategoryTypeVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "categoryTypeEnum": + if t.typ == "CategoryTypeEnum" || t.CategoryTypeEnum != "" { return visitor.VisitCategoryTypeEnum(t.CategoryTypeEnum) - case "string": + } + if t.typ == "String" || t.String != "" { return visitor.VisitString(t.String) } + return fmt.Errorf("type %T does not include a non-empty union type", t) } // The company the GeneralLedgerTransaction belongs to. type TrackingCategoryCompany struct { - typeName string String string CompanyInfo *CompanyInfo + + typ string } -func NewTrackingCategoryCompanyFromString(value string) *TrackingCategoryCompany { - return &TrackingCategoryCompany{typeName: "string", String: value} +func (t *TrackingCategoryCompany) GetString() string { + if t == nil { + return "" + } + return t.String } -func NewTrackingCategoryCompanyFromCompanyInfo(value *CompanyInfo) *TrackingCategoryCompany { - return &TrackingCategoryCompany{typeName: "companyInfo", CompanyInfo: value} +func (t *TrackingCategoryCompany) GetCompanyInfo() *CompanyInfo { + if t == nil { + return nil + } + return t.CompanyInfo } func (t *TrackingCategoryCompany) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" + t.typ = "String" t.String = valueString return nil } valueCompanyInfo := new(CompanyInfo) if err := json.Unmarshal(data, &valueCompanyInfo); err == nil { - t.typeName = "companyInfo" + t.typ = "CompanyInfo" t.CompanyInfo = valueCompanyInfo return nil } @@ -41670,14 +20779,13 @@ func (t *TrackingCategoryCompany) UnmarshalJSON(data []byte) error { } func (t TrackingCategoryCompany) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": + if t.typ == "String" || t.String != "" { return json.Marshal(t.String) - case "companyInfo": + } + if t.typ == "CompanyInfo" || t.CompanyInfo != nil { return json.Marshal(t.CompanyInfo) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) } type TrackingCategoryCompanyVisitor interface { @@ -41686,44 +20794,50 @@ type TrackingCategoryCompanyVisitor interface { } func (t *TrackingCategoryCompany) Accept(visitor TrackingCategoryCompanyVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": + if t.typ == "String" || t.String != "" { return visitor.VisitString(t.String) - case "companyInfo": + } + if t.typ == "CompanyInfo" || t.CompanyInfo != nil { return visitor.VisitCompanyInfo(t.CompanyInfo) } + return fmt.Errorf("type %T does not include a non-empty union type", t) } // The tracking category's status. // -// - `ACTIVE` - ACTIVE -// - `ARCHIVED` - ARCHIVED +// * `ACTIVE` - ACTIVE +// * `ARCHIVED` - ARCHIVED type TrackingCategoryStatus struct { - typeName string Status7D1Enum Status7D1Enum String string + + typ string } -func NewTrackingCategoryStatusFromStatus7D1Enum(value Status7D1Enum) *TrackingCategoryStatus { - return &TrackingCategoryStatus{typeName: "status7D1Enum", Status7D1Enum: value} +func (t *TrackingCategoryStatus) GetStatus7D1Enum() Status7D1Enum { + if t == nil { + return "" + } + return t.Status7D1Enum } -func NewTrackingCategoryStatusFromString(value string) *TrackingCategoryStatus { - return &TrackingCategoryStatus{typeName: "string", String: value} +func (t *TrackingCategoryStatus) GetString() string { + if t == nil { + return "" + } + return t.String } func (t *TrackingCategoryStatus) UnmarshalJSON(data []byte) error { var valueStatus7D1Enum Status7D1Enum if err := json.Unmarshal(data, &valueStatus7D1Enum); err == nil { - t.typeName = "status7D1Enum" + t.typ = "Status7D1Enum" t.Status7D1Enum = valueStatus7D1Enum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" + t.typ = "String" t.String = valueString return nil } @@ -41731,14 +20845,13 @@ func (t *TrackingCategoryStatus) UnmarshalJSON(data []byte) error { } func (t TrackingCategoryStatus) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "status7D1Enum": + if t.typ == "Status7D1Enum" || t.Status7D1Enum != "" { return json.Marshal(t.Status7D1Enum) - case "string": + } + if t.typ == "String" || t.String != "" { return json.Marshal(t.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) } type TrackingCategoryStatusVisitor interface { @@ -41746,1249 +20859,322 @@ type TrackingCategoryStatusVisitor interface { VisitString(string) error } -func (t *TrackingCategoryStatus) Accept(visitor TrackingCategoryStatusVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "status7D1Enum": - return visitor.VisitStatus7D1Enum(t.Status7D1Enum) - case "string": - return visitor.VisitString(t.String) - } -} - -// # The Transaction Object -// -// ### Description -// -// The `Transaction` common model includes records of all types of transactions that do not appear in other common models. The type of transaction can be identified through the type field. More specifically, it will contain all types of transactions outside of: -// -// - **Credit Notes** -// - **Expenses** -// - **Invoices** -// - **Journal Entries** -// - **Payments** -// - **Purchase Orders** -// - **Vendor Credits** -// -// ### Usage Example -// -// Fetch from the `GET Transaction` endpoint and view a company's transactions. -type Transaction struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The type of transaction, which can by any transaction object not already included in Merge’s common model. - TransactionType *string `json:"transaction_type,omitempty"` - // The transaction's number used for identifying purposes. - Number *string `json:"number,omitempty"` - // The date upon which the transaction occurred. - TransactionDate *time.Time `json:"transaction_date,omitempty"` - // The transaction's account. - Account *TransactionAccount `json:"account,omitempty"` - // The contact to whom the transaction relates to. - Contact *TransactionContact `json:"contact,omitempty"` - // If the transaction is inclusive or exclusive of tax. `True` if inclusive, `False` if exclusive. - InclusiveOfTax *bool `json:"inclusive_of_tax,omitempty"` - // The total amount being paid after taxes. - TotalAmount *string `json:"total_amount,omitempty"` - // The transaction's currency. - // - // - `XUA` - ADB Unit of Account - // - `AFN` - Afghan Afghani - // - `AFA` - Afghan Afghani (1927–2002) - // - `ALL` - Albanian Lek - // - `ALK` - Albanian Lek (1946–1965) - // - `DZD` - Algerian Dinar - // - `ADP` - Andorran Peseta - // - `AOA` - Angolan Kwanza - // - `AOK` - Angolan Kwanza (1977–1991) - // - `AON` - Angolan New Kwanza (1990–2000) - // - `AOR` - Angolan Readjusted Kwanza (1995–1999) - // - `ARA` - Argentine Austral - // - `ARS` - Argentine Peso - // - `ARM` - Argentine Peso (1881–1970) - // - `ARP` - Argentine Peso (1983–1985) - // - `ARL` - Argentine Peso Ley (1970–1983) - // - `AMD` - Armenian Dram - // - `AWG` - Aruban Florin - // - `AUD` - Australian Dollar - // - `ATS` - Austrian Schilling - // - `AZN` - Azerbaijani Manat - // - `AZM` - Azerbaijani Manat (1993–2006) - // - `BSD` - Bahamian Dollar - // - `BHD` - Bahraini Dinar - // - `BDT` - Bangladeshi Taka - // - `BBD` - Barbadian Dollar - // - `BYN` - Belarusian Ruble - // - `BYB` - Belarusian Ruble (1994–1999) - // - `BYR` - Belarusian Ruble (2000–2016) - // - `BEF` - Belgian Franc - // - `BEC` - Belgian Franc (convertible) - // - `BEL` - Belgian Franc (financial) - // - `BZD` - Belize Dollar - // - `BMD` - Bermudan Dollar - // - `BTN` - Bhutanese Ngultrum - // - `BOB` - Bolivian Boliviano - // - `BOL` - Bolivian Boliviano (1863–1963) - // - `BOV` - Bolivian Mvdol - // - `BOP` - Bolivian Peso - // - `BAM` - Bosnia-Herzegovina Convertible Mark - // - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - // - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - // - `BWP` - Botswanan Pula - // - `BRC` - Brazilian Cruzado (1986–1989) - // - `BRZ` - Brazilian Cruzeiro (1942–1967) - // - `BRE` - Brazilian Cruzeiro (1990–1993) - // - `BRR` - Brazilian Cruzeiro (1993–1994) - // - `BRN` - Brazilian New Cruzado (1989–1990) - // - `BRB` - Brazilian New Cruzeiro (1967–1986) - // - `BRL` - Brazilian Real - // - `GBP` - British Pound - // - `BND` - Brunei Dollar - // - `BGL` - Bulgarian Hard Lev - // - `BGN` - Bulgarian Lev - // - `BGO` - Bulgarian Lev (1879–1952) - // - `BGM` - Bulgarian Socialist Lev - // - `BUK` - Burmese Kyat - // - `BIF` - Burundian Franc - // - `XPF` - CFP Franc - // - `KHR` - Cambodian Riel - // - `CAD` - Canadian Dollar - // - `CVE` - Cape Verdean Escudo - // - `KYD` - Cayman Islands Dollar - // - `XAF` - Central African CFA Franc - // - `CLE` - Chilean Escudo - // - `CLP` - Chilean Peso - // - `CLF` - Chilean Unit of Account (UF) - // - `CNX` - Chinese People’s Bank Dollar - // - `CNY` - Chinese Yuan - // - `CNH` - Chinese Yuan (offshore) - // - `COP` - Colombian Peso - // - `COU` - Colombian Real Value Unit - // - `KMF` - Comorian Franc - // - `CDF` - Congolese Franc - // - `CRC` - Costa Rican Colón - // - `HRD` - Croatian Dinar - // - `HRK` - Croatian Kuna - // - `CUC` - Cuban Convertible Peso - // - `CUP` - Cuban Peso - // - `CYP` - Cypriot Pound - // - `CZK` - Czech Koruna - // - `CSK` - Czechoslovak Hard Koruna - // - `DKK` - Danish Krone - // - `DJF` - Djiboutian Franc - // - `DOP` - Dominican Peso - // - `NLG` - Dutch Guilder - // - `XCD` - East Caribbean Dollar - // - `DDM` - East German Mark - // - `ECS` - Ecuadorian Sucre - // - `ECV` - Ecuadorian Unit of Constant Value - // - `EGP` - Egyptian Pound - // - `GQE` - Equatorial Guinean Ekwele - // - `ERN` - Eritrean Nakfa - // - `EEK` - Estonian Kroon - // - `ETB` - Ethiopian Birr - // - `EUR` - Euro - // - `XBA` - European Composite Unit - // - `XEU` - European Currency Unit - // - `XBB` - European Monetary Unit - // - `XBC` - European Unit of Account (XBC) - // - `XBD` - European Unit of Account (XBD) - // - `FKP` - Falkland Islands Pound - // - `FJD` - Fijian Dollar - // - `FIM` - Finnish Markka - // - `FRF` - French Franc - // - `XFO` - French Gold Franc - // - `XFU` - French UIC-Franc - // - `GMD` - Gambian Dalasi - // - `GEK` - Georgian Kupon Larit - // - `GEL` - Georgian Lari - // - `DEM` - German Mark - // - `GHS` - Ghanaian Cedi - // - `GHC` - Ghanaian Cedi (1979–2007) - // - `GIP` - Gibraltar Pound - // - `XAU` - Gold - // - `GRD` - Greek Drachma - // - `GTQ` - Guatemalan Quetzal - // - `GWP` - Guinea-Bissau Peso - // - `GNF` - Guinean Franc - // - `GNS` - Guinean Syli - // - `GYD` - Guyanaese Dollar - // - `HTG` - Haitian Gourde - // - `HNL` - Honduran Lempira - // - `HKD` - Hong Kong Dollar - // - `HUF` - Hungarian Forint - // - `IMP` - IMP - // - `ISK` - Icelandic Króna - // - `ISJ` - Icelandic Króna (1918–1981) - // - `INR` - Indian Rupee - // - `IDR` - Indonesian Rupiah - // - `IRR` - Iranian Rial - // - `IQD` - Iraqi Dinar - // - `IEP` - Irish Pound - // - `ILS` - Israeli New Shekel - // - `ILP` - Israeli Pound - // - `ILR` - Israeli Shekel (1980–1985) - // - `ITL` - Italian Lira - // - `JMD` - Jamaican Dollar - // - `JPY` - Japanese Yen - // - `JOD` - Jordanian Dinar - // - `KZT` - Kazakhstani Tenge - // - `KES` - Kenyan Shilling - // - `KWD` - Kuwaiti Dinar - // - `KGS` - Kyrgystani Som - // - `LAK` - Laotian Kip - // - `LVL` - Latvian Lats - // - `LVR` - Latvian Ruble - // - `LBP` - Lebanese Pound - // - `LSL` - Lesotho Loti - // - `LRD` - Liberian Dollar - // - `LYD` - Libyan Dinar - // - `LTL` - Lithuanian Litas - // - `LTT` - Lithuanian Talonas - // - `LUL` - Luxembourg Financial Franc - // - `LUC` - Luxembourgian Convertible Franc - // - `LUF` - Luxembourgian Franc - // - `MOP` - Macanese Pataca - // - `MKD` - Macedonian Denar - // - `MKN` - Macedonian Denar (1992–1993) - // - `MGA` - Malagasy Ariary - // - `MGF` - Malagasy Franc - // - `MWK` - Malawian Kwacha - // - `MYR` - Malaysian Ringgit - // - `MVR` - Maldivian Rufiyaa - // - `MVP` - Maldivian Rupee (1947–1981) - // - `MLF` - Malian Franc - // - `MTL` - Maltese Lira - // - `MTP` - Maltese Pound - // - `MRU` - Mauritanian Ouguiya - // - `MRO` - Mauritanian Ouguiya (1973–2017) - // - `MUR` - Mauritian Rupee - // - `MXV` - Mexican Investment Unit - // - `MXN` - Mexican Peso - // - `MXP` - Mexican Silver Peso (1861–1992) - // - `MDC` - Moldovan Cupon - // - `MDL` - Moldovan Leu - // - `MCF` - Monegasque Franc - // - `MNT` - Mongolian Tugrik - // - `MAD` - Moroccan Dirham - // - `MAF` - Moroccan Franc - // - `MZE` - Mozambican Escudo - // - `MZN` - Mozambican Metical - // - `MZM` - Mozambican Metical (1980–2006) - // - `MMK` - Myanmar Kyat - // - `NAD` - Namibian Dollar - // - `NPR` - Nepalese Rupee - // - `ANG` - Netherlands Antillean Guilder - // - `TWD` - New Taiwan Dollar - // - `NZD` - New Zealand Dollar - // - `NIO` - Nicaraguan Córdoba - // - `NIC` - Nicaraguan Córdoba (1988–1991) - // - `NGN` - Nigerian Naira - // - `KPW` - North Korean Won - // - `NOK` - Norwegian Krone - // - `OMR` - Omani Rial - // - `PKR` - Pakistani Rupee - // - `XPD` - Palladium - // - `PAB` - Panamanian Balboa - // - `PGK` - Papua New Guinean Kina - // - `PYG` - Paraguayan Guarani - // - `PEI` - Peruvian Inti - // - `PEN` - Peruvian Sol - // - `PES` - Peruvian Sol (1863–1965) - // - `PHP` - Philippine Peso - // - `XPT` - Platinum - // - `PLN` - Polish Zloty - // - `PLZ` - Polish Zloty (1950–1995) - // - `PTE` - Portuguese Escudo - // - `GWE` - Portuguese Guinea Escudo - // - `QAR` - Qatari Rial - // - `XRE` - RINET Funds - // - `RHD` - Rhodesian Dollar - // - `RON` - Romanian Leu - // - `ROL` - Romanian Leu (1952–2006) - // - `RUB` - Russian Ruble - // - `RUR` - Russian Ruble (1991–1998) - // - `RWF` - Rwandan Franc - // - `SVC` - Salvadoran Colón - // - `WST` - Samoan Tala - // - `SAR` - Saudi Riyal - // - `RSD` - Serbian Dinar - // - `CSD` - Serbian Dinar (2002–2006) - // - `SCR` - Seychellois Rupee - // - `SLL` - Sierra Leonean Leone - // - `XAG` - Silver - // - `SGD` - Singapore Dollar - // - `SKK` - Slovak Koruna - // - `SIT` - Slovenian Tolar - // - `SBD` - Solomon Islands Dollar - // - `SOS` - Somali Shilling - // - `ZAR` - South African Rand - // - `ZAL` - South African Rand (financial) - // - `KRH` - South Korean Hwan (1953–1962) - // - `KRW` - South Korean Won - // - `KRO` - South Korean Won (1945–1953) - // - `SSP` - South Sudanese Pound - // - `SUR` - Soviet Rouble - // - `ESP` - Spanish Peseta - // - `ESA` - Spanish Peseta (A account) - // - `ESB` - Spanish Peseta (convertible account) - // - `XDR` - Special Drawing Rights - // - `LKR` - Sri Lankan Rupee - // - `SHP` - St. Helena Pound - // - `XSU` - Sucre - // - `SDD` - Sudanese Dinar (1992–2007) - // - `SDG` - Sudanese Pound - // - `SDP` - Sudanese Pound (1957–1998) - // - `SRD` - Surinamese Dollar - // - `SRG` - Surinamese Guilder - // - `SZL` - Swazi Lilangeni - // - `SEK` - Swedish Krona - // - `CHF` - Swiss Franc - // - `SYP` - Syrian Pound - // - `STN` - São Tomé & Príncipe Dobra - // - `STD` - São Tomé & Príncipe Dobra (1977–2017) - // - `TVD` - TVD - // - `TJR` - Tajikistani Ruble - // - `TJS` - Tajikistani Somoni - // - `TZS` - Tanzanian Shilling - // - `XTS` - Testing Currency Code - // - `THB` - Thai Baht - // - `XXX` - The codes assigned for transactions where no currency is involved - // - `TPE` - Timorese Escudo - // - `TOP` - Tongan Paʻanga - // - `TTD` - Trinidad & Tobago Dollar - // - `TND` - Tunisian Dinar - // - `TRY` - Turkish Lira - // - `TRL` - Turkish Lira (1922–2005) - // - `TMT` - Turkmenistani Manat - // - `TMM` - Turkmenistani Manat (1993–2009) - // - `USD` - US Dollar - // - `USN` - US Dollar (Next day) - // - `USS` - US Dollar (Same day) - // - `UGX` - Ugandan Shilling - // - `UGS` - Ugandan Shilling (1966–1987) - // - `UAH` - Ukrainian Hryvnia - // - `UAK` - Ukrainian Karbovanets - // - `AED` - United Arab Emirates Dirham - // - `UYW` - Uruguayan Nominal Wage Index Unit - // - `UYU` - Uruguayan Peso - // - `UYP` - Uruguayan Peso (1975–1993) - // - `UYI` - Uruguayan Peso (Indexed Units) - // - `UZS` - Uzbekistani Som - // - `VUV` - Vanuatu Vatu - // - `VES` - Venezuelan Bolívar - // - `VEB` - Venezuelan Bolívar (1871–2008) - // - `VEF` - Venezuelan Bolívar (2008–2018) - // - `VND` - Vietnamese Dong - // - `VNN` - Vietnamese Dong (1978–1985) - // - `CHE` - WIR Euro - // - `CHW` - WIR Franc - // - `XOF` - West African CFA Franc - // - `YDD` - Yemeni Dinar - // - `YER` - Yemeni Rial - // - `YUN` - Yugoslavian Convertible Dinar (1990–1992) - // - `YUD` - Yugoslavian Hard Dinar (1966–1990) - // - `YUM` - Yugoslavian New Dinar (1994–2002) - // - `YUR` - Yugoslavian Reformed Dinar (1992–1993) - // - `ZWN` - ZWN - // - `ZRN` - Zairean New Zaire (1993–1998) - // - `ZRZ` - Zairean Zaire (1971–1993) - // - `ZMW` - Zambian Kwacha - // - `ZMK` - Zambian Kwacha (1968–2012) - // - `ZWD` - Zimbabwean Dollar (1980–2008) - // - `ZWR` - Zimbabwean Dollar (2008) - // - `ZWL` - Zimbabwean Dollar (2009) - Currency *TransactionCurrency `json:"currency,omitempty"` - // The transaction's exchange rate. - ExchangeRate *string `json:"exchange_rate,omitempty"` - // The company the transaction belongs to. - Company *string `json:"company,omitempty"` - TrackingCategories []*TransactionTrackingCategoriesItem `json:"tracking_categories,omitempty"` - LineItems []*TransactionLineItem `json:"line_items,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - // The accounting period that the Transaction was generated in. - AccountingPeriod *TransactionAccountingPeriod `json:"accounting_period,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` - - _rawJSON json.RawMessage -} - -func (t *Transaction) UnmarshalJSON(data []byte) error { - type unmarshaler Transaction - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *t = Transaction(value) - t._rawJSON = json.RawMessage(data) - return nil -} - -func (t *Transaction) String() string { - if len(t._rawJSON) > 0 { - if value, err := core.StringifyJSON(t._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(t); err == nil { - return value - } - return fmt.Sprintf("%#v", t) -} - -// The transaction's account. -type TransactionAccount struct { - typeName string - String string - Account *Account -} - -func NewTransactionAccountFromString(value string) *TransactionAccount { - return &TransactionAccount{typeName: "string", String: value} -} - -func NewTransactionAccountFromAccount(value *Account) *TransactionAccount { - return &TransactionAccount{typeName: "account", Account: value} -} - -func (t *TransactionAccount) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" - t.String = valueString - return nil - } - valueAccount := new(Account) - if err := json.Unmarshal(data, &valueAccount); err == nil { - t.typeName = "account" - t.Account = valueAccount - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, t) -} - -func (t TransactionAccount) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return json.Marshal(t.String) - case "account": - return json.Marshal(t.Account) - } -} - -type TransactionAccountVisitor interface { - VisitString(string) error - VisitAccount(*Account) error -} - -func (t *TransactionAccount) Accept(visitor TransactionAccountVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return visitor.VisitString(t.String) - case "account": - return visitor.VisitAccount(t.Account) - } -} - -// The accounting period that the Transaction was generated in. -type TransactionAccountingPeriod struct { - typeName string - String string - AccountingPeriod *AccountingPeriod -} - -func NewTransactionAccountingPeriodFromString(value string) *TransactionAccountingPeriod { - return &TransactionAccountingPeriod{typeName: "string", String: value} -} - -func NewTransactionAccountingPeriodFromAccountingPeriod(value *AccountingPeriod) *TransactionAccountingPeriod { - return &TransactionAccountingPeriod{typeName: "accountingPeriod", AccountingPeriod: value} -} - -func (t *TransactionAccountingPeriod) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" - t.String = valueString - return nil - } - valueAccountingPeriod := new(AccountingPeriod) - if err := json.Unmarshal(data, &valueAccountingPeriod); err == nil { - t.typeName = "accountingPeriod" - t.AccountingPeriod = valueAccountingPeriod - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, t) -} - -func (t TransactionAccountingPeriod) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return json.Marshal(t.String) - case "accountingPeriod": - return json.Marshal(t.AccountingPeriod) - } -} - -type TransactionAccountingPeriodVisitor interface { - VisitString(string) error - VisitAccountingPeriod(*AccountingPeriod) error -} - -func (t *TransactionAccountingPeriod) Accept(visitor TransactionAccountingPeriodVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return visitor.VisitString(t.String) - case "accountingPeriod": - return visitor.VisitAccountingPeriod(t.AccountingPeriod) - } -} - -// The contact to whom the transaction relates to. -type TransactionContact struct { - typeName string - String string - Contact *Contact -} - -func NewTransactionContactFromString(value string) *TransactionContact { - return &TransactionContact{typeName: "string", String: value} -} - -func NewTransactionContactFromContact(value *Contact) *TransactionContact { - return &TransactionContact{typeName: "contact", Contact: value} -} - -func (t *TransactionContact) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" - t.String = valueString - return nil - } - valueContact := new(Contact) - if err := json.Unmarshal(data, &valueContact); err == nil { - t.typeName = "contact" - t.Contact = valueContact - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, t) -} - -func (t TransactionContact) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return json.Marshal(t.String) - case "contact": - return json.Marshal(t.Contact) - } -} - -type TransactionContactVisitor interface { - VisitString(string) error - VisitContact(*Contact) error -} - -func (t *TransactionContact) Accept(visitor TransactionContactVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return visitor.VisitString(t.String) - case "contact": - return visitor.VisitContact(t.Contact) - } -} - -// The transaction's currency. -// -// - `XUA` - ADB Unit of Account -// - `AFN` - Afghan Afghani -// - `AFA` - Afghan Afghani (1927–2002) -// - `ALL` - Albanian Lek -// - `ALK` - Albanian Lek (1946–1965) -// - `DZD` - Algerian Dinar -// - `ADP` - Andorran Peseta -// - `AOA` - Angolan Kwanza -// - `AOK` - Angolan Kwanza (1977–1991) -// - `AON` - Angolan New Kwanza (1990–2000) -// - `AOR` - Angolan Readjusted Kwanza (1995–1999) -// - `ARA` - Argentine Austral -// - `ARS` - Argentine Peso -// - `ARM` - Argentine Peso (1881–1970) -// - `ARP` - Argentine Peso (1983–1985) -// - `ARL` - Argentine Peso Ley (1970–1983) -// - `AMD` - Armenian Dram -// - `AWG` - Aruban Florin -// - `AUD` - Australian Dollar -// - `ATS` - Austrian Schilling -// - `AZN` - Azerbaijani Manat -// - `AZM` - Azerbaijani Manat (1993–2006) -// - `BSD` - Bahamian Dollar -// - `BHD` - Bahraini Dinar -// - `BDT` - Bangladeshi Taka -// - `BBD` - Barbadian Dollar -// - `BYN` - Belarusian Ruble -// - `BYB` - Belarusian Ruble (1994–1999) -// - `BYR` - Belarusian Ruble (2000–2016) -// - `BEF` - Belgian Franc -// - `BEC` - Belgian Franc (convertible) -// - `BEL` - Belgian Franc (financial) -// - `BZD` - Belize Dollar -// - `BMD` - Bermudan Dollar -// - `BTN` - Bhutanese Ngultrum -// - `BOB` - Bolivian Boliviano -// - `BOL` - Bolivian Boliviano (1863–1963) -// - `BOV` - Bolivian Mvdol -// - `BOP` - Bolivian Peso -// - `BAM` - Bosnia-Herzegovina Convertible Mark -// - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) -// - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) -// - `BWP` - Botswanan Pula -// - `BRC` - Brazilian Cruzado (1986–1989) -// - `BRZ` - Brazilian Cruzeiro (1942–1967) -// - `BRE` - Brazilian Cruzeiro (1990–1993) -// - `BRR` - Brazilian Cruzeiro (1993–1994) -// - `BRN` - Brazilian New Cruzado (1989–1990) -// - `BRB` - Brazilian New Cruzeiro (1967–1986) -// - `BRL` - Brazilian Real -// - `GBP` - British Pound -// - `BND` - Brunei Dollar -// - `BGL` - Bulgarian Hard Lev -// - `BGN` - Bulgarian Lev -// - `BGO` - Bulgarian Lev (1879–1952) -// - `BGM` - Bulgarian Socialist Lev -// - `BUK` - Burmese Kyat -// - `BIF` - Burundian Franc -// - `XPF` - CFP Franc -// - `KHR` - Cambodian Riel -// - `CAD` - Canadian Dollar -// - `CVE` - Cape Verdean Escudo -// - `KYD` - Cayman Islands Dollar -// - `XAF` - Central African CFA Franc -// - `CLE` - Chilean Escudo -// - `CLP` - Chilean Peso -// - `CLF` - Chilean Unit of Account (UF) -// - `CNX` - Chinese People’s Bank Dollar -// - `CNY` - Chinese Yuan -// - `CNH` - Chinese Yuan (offshore) -// - `COP` - Colombian Peso -// - `COU` - Colombian Real Value Unit -// - `KMF` - Comorian Franc -// - `CDF` - Congolese Franc -// - `CRC` - Costa Rican Colón -// - `HRD` - Croatian Dinar -// - `HRK` - Croatian Kuna -// - `CUC` - Cuban Convertible Peso -// - `CUP` - Cuban Peso -// - `CYP` - Cypriot Pound -// - `CZK` - Czech Koruna -// - `CSK` - Czechoslovak Hard Koruna -// - `DKK` - Danish Krone -// - `DJF` - Djiboutian Franc -// - `DOP` - Dominican Peso -// - `NLG` - Dutch Guilder -// - `XCD` - East Caribbean Dollar -// - `DDM` - East German Mark -// - `ECS` - Ecuadorian Sucre -// - `ECV` - Ecuadorian Unit of Constant Value -// - `EGP` - Egyptian Pound -// - `GQE` - Equatorial Guinean Ekwele -// - `ERN` - Eritrean Nakfa -// - `EEK` - Estonian Kroon -// - `ETB` - Ethiopian Birr -// - `EUR` - Euro -// - `XBA` - European Composite Unit -// - `XEU` - European Currency Unit -// - `XBB` - European Monetary Unit -// - `XBC` - European Unit of Account (XBC) -// - `XBD` - European Unit of Account (XBD) -// - `FKP` - Falkland Islands Pound -// - `FJD` - Fijian Dollar -// - `FIM` - Finnish Markka -// - `FRF` - French Franc -// - `XFO` - French Gold Franc -// - `XFU` - French UIC-Franc -// - `GMD` - Gambian Dalasi -// - `GEK` - Georgian Kupon Larit -// - `GEL` - Georgian Lari -// - `DEM` - German Mark -// - `GHS` - Ghanaian Cedi -// - `GHC` - Ghanaian Cedi (1979–2007) -// - `GIP` - Gibraltar Pound -// - `XAU` - Gold -// - `GRD` - Greek Drachma -// - `GTQ` - Guatemalan Quetzal -// - `GWP` - Guinea-Bissau Peso -// - `GNF` - Guinean Franc -// - `GNS` - Guinean Syli -// - `GYD` - Guyanaese Dollar -// - `HTG` - Haitian Gourde -// - `HNL` - Honduran Lempira -// - `HKD` - Hong Kong Dollar -// - `HUF` - Hungarian Forint -// - `IMP` - IMP -// - `ISK` - Icelandic Króna -// - `ISJ` - Icelandic Króna (1918–1981) -// - `INR` - Indian Rupee -// - `IDR` - Indonesian Rupiah -// - `IRR` - Iranian Rial -// - `IQD` - Iraqi Dinar -// - `IEP` - Irish Pound -// - `ILS` - Israeli New Shekel -// - `ILP` - Israeli Pound -// - `ILR` - Israeli Shekel (1980–1985) -// - `ITL` - Italian Lira -// - `JMD` - Jamaican Dollar -// - `JPY` - Japanese Yen -// - `JOD` - Jordanian Dinar -// - `KZT` - Kazakhstani Tenge -// - `KES` - Kenyan Shilling -// - `KWD` - Kuwaiti Dinar -// - `KGS` - Kyrgystani Som -// - `LAK` - Laotian Kip -// - `LVL` - Latvian Lats -// - `LVR` - Latvian Ruble -// - `LBP` - Lebanese Pound -// - `LSL` - Lesotho Loti -// - `LRD` - Liberian Dollar -// - `LYD` - Libyan Dinar -// - `LTL` - Lithuanian Litas -// - `LTT` - Lithuanian Talonas -// - `LUL` - Luxembourg Financial Franc -// - `LUC` - Luxembourgian Convertible Franc -// - `LUF` - Luxembourgian Franc -// - `MOP` - Macanese Pataca -// - `MKD` - Macedonian Denar -// - `MKN` - Macedonian Denar (1992–1993) -// - `MGA` - Malagasy Ariary -// - `MGF` - Malagasy Franc -// - `MWK` - Malawian Kwacha -// - `MYR` - Malaysian Ringgit -// - `MVR` - Maldivian Rufiyaa -// - `MVP` - Maldivian Rupee (1947–1981) -// - `MLF` - Malian Franc -// - `MTL` - Maltese Lira -// - `MTP` - Maltese Pound -// - `MRU` - Mauritanian Ouguiya -// - `MRO` - Mauritanian Ouguiya (1973–2017) -// - `MUR` - Mauritian Rupee -// - `MXV` - Mexican Investment Unit -// - `MXN` - Mexican Peso -// - `MXP` - Mexican Silver Peso (1861–1992) -// - `MDC` - Moldovan Cupon -// - `MDL` - Moldovan Leu -// - `MCF` - Monegasque Franc -// - `MNT` - Mongolian Tugrik -// - `MAD` - Moroccan Dirham -// - `MAF` - Moroccan Franc -// - `MZE` - Mozambican Escudo -// - `MZN` - Mozambican Metical -// - `MZM` - Mozambican Metical (1980–2006) -// - `MMK` - Myanmar Kyat -// - `NAD` - Namibian Dollar -// - `NPR` - Nepalese Rupee -// - `ANG` - Netherlands Antillean Guilder -// - `TWD` - New Taiwan Dollar -// - `NZD` - New Zealand Dollar -// - `NIO` - Nicaraguan Córdoba -// - `NIC` - Nicaraguan Córdoba (1988–1991) -// - `NGN` - Nigerian Naira -// - `KPW` - North Korean Won -// - `NOK` - Norwegian Krone -// - `OMR` - Omani Rial -// - `PKR` - Pakistani Rupee -// - `XPD` - Palladium -// - `PAB` - Panamanian Balboa -// - `PGK` - Papua New Guinean Kina -// - `PYG` - Paraguayan Guarani -// - `PEI` - Peruvian Inti -// - `PEN` - Peruvian Sol -// - `PES` - Peruvian Sol (1863–1965) -// - `PHP` - Philippine Peso -// - `XPT` - Platinum -// - `PLN` - Polish Zloty -// - `PLZ` - Polish Zloty (1950–1995) -// - `PTE` - Portuguese Escudo -// - `GWE` - Portuguese Guinea Escudo -// - `QAR` - Qatari Rial -// - `XRE` - RINET Funds -// - `RHD` - Rhodesian Dollar -// - `RON` - Romanian Leu -// - `ROL` - Romanian Leu (1952–2006) -// - `RUB` - Russian Ruble -// - `RUR` - Russian Ruble (1991–1998) -// - `RWF` - Rwandan Franc -// - `SVC` - Salvadoran Colón -// - `WST` - Samoan Tala -// - `SAR` - Saudi Riyal -// - `RSD` - Serbian Dinar -// - `CSD` - Serbian Dinar (2002–2006) -// - `SCR` - Seychellois Rupee -// - `SLL` - Sierra Leonean Leone -// - `XAG` - Silver -// - `SGD` - Singapore Dollar -// - `SKK` - Slovak Koruna -// - `SIT` - Slovenian Tolar -// - `SBD` - Solomon Islands Dollar -// - `SOS` - Somali Shilling -// - `ZAR` - South African Rand -// - `ZAL` - South African Rand (financial) -// - `KRH` - South Korean Hwan (1953–1962) -// - `KRW` - South Korean Won -// - `KRO` - South Korean Won (1945–1953) -// - `SSP` - South Sudanese Pound -// - `SUR` - Soviet Rouble -// - `ESP` - Spanish Peseta -// - `ESA` - Spanish Peseta (A account) -// - `ESB` - Spanish Peseta (convertible account) -// - `XDR` - Special Drawing Rights -// - `LKR` - Sri Lankan Rupee -// - `SHP` - St. Helena Pound -// - `XSU` - Sucre -// - `SDD` - Sudanese Dinar (1992–2007) -// - `SDG` - Sudanese Pound -// - `SDP` - Sudanese Pound (1957–1998) -// - `SRD` - Surinamese Dollar -// - `SRG` - Surinamese Guilder -// - `SZL` - Swazi Lilangeni -// - `SEK` - Swedish Krona -// - `CHF` - Swiss Franc -// - `SYP` - Syrian Pound -// - `STN` - São Tomé & Príncipe Dobra -// - `STD` - São Tomé & Príncipe Dobra (1977–2017) -// - `TVD` - TVD -// - `TJR` - Tajikistani Ruble -// - `TJS` - Tajikistani Somoni -// - `TZS` - Tanzanian Shilling -// - `XTS` - Testing Currency Code -// - `THB` - Thai Baht -// - `XXX` - The codes assigned for transactions where no currency is involved -// - `TPE` - Timorese Escudo -// - `TOP` - Tongan Paʻanga -// - `TTD` - Trinidad & Tobago Dollar -// - `TND` - Tunisian Dinar -// - `TRY` - Turkish Lira -// - `TRL` - Turkish Lira (1922–2005) -// - `TMT` - Turkmenistani Manat -// - `TMM` - Turkmenistani Manat (1993–2009) -// - `USD` - US Dollar -// - `USN` - US Dollar (Next day) -// - `USS` - US Dollar (Same day) -// - `UGX` - Ugandan Shilling -// - `UGS` - Ugandan Shilling (1966–1987) -// - `UAH` - Ukrainian Hryvnia -// - `UAK` - Ukrainian Karbovanets -// - `AED` - United Arab Emirates Dirham -// - `UYW` - Uruguayan Nominal Wage Index Unit -// - `UYU` - Uruguayan Peso -// - `UYP` - Uruguayan Peso (1975–1993) -// - `UYI` - Uruguayan Peso (Indexed Units) -// - `UZS` - Uzbekistani Som -// - `VUV` - Vanuatu Vatu -// - `VES` - Venezuelan Bolívar -// - `VEB` - Venezuelan Bolívar (1871–2008) -// - `VEF` - Venezuelan Bolívar (2008–2018) -// - `VND` - Vietnamese Dong -// - `VNN` - Vietnamese Dong (1978–1985) -// - `CHE` - WIR Euro -// - `CHW` - WIR Franc -// - `XOF` - West African CFA Franc -// - `YDD` - Yemeni Dinar -// - `YER` - Yemeni Rial -// - `YUN` - Yugoslavian Convertible Dinar (1990–1992) -// - `YUD` - Yugoslavian Hard Dinar (1966–1990) -// - `YUM` - Yugoslavian New Dinar (1994–2002) -// - `YUR` - Yugoslavian Reformed Dinar (1992–1993) -// - `ZWN` - ZWN -// - `ZRN` - Zairean New Zaire (1993–1998) -// - `ZRZ` - Zairean Zaire (1971–1993) -// - `ZMW` - Zambian Kwacha -// - `ZMK` - Zambian Kwacha (1968–2012) -// - `ZWD` - Zimbabwean Dollar (1980–2008) -// - `ZWR` - Zimbabwean Dollar (2008) -// - `ZWL` - Zimbabwean Dollar (2009) -type TransactionCurrency struct { - typeName string - TransactionCurrencyEnum TransactionCurrencyEnum - String string -} - -func NewTransactionCurrencyFromTransactionCurrencyEnum(value TransactionCurrencyEnum) *TransactionCurrency { - return &TransactionCurrency{typeName: "transactionCurrencyEnum", TransactionCurrencyEnum: value} -} - -func NewTransactionCurrencyFromString(value string) *TransactionCurrency { - return &TransactionCurrency{typeName: "string", String: value} -} - -func (t *TransactionCurrency) UnmarshalJSON(data []byte) error { - var valueTransactionCurrencyEnum TransactionCurrencyEnum - if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { - t.typeName = "transactionCurrencyEnum" - t.TransactionCurrencyEnum = valueTransactionCurrencyEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" - t.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, t) -} - -func (t TransactionCurrency) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "transactionCurrencyEnum": - return json.Marshal(t.TransactionCurrencyEnum) - case "string": - return json.Marshal(t.String) - } -} - -type TransactionCurrencyVisitor interface { - VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error - VisitString(string) error -} - -func (t *TransactionCurrency) Accept(visitor TransactionCurrencyVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "transactionCurrencyEnum": - return visitor.VisitTransactionCurrencyEnum(t.TransactionCurrencyEnum) - case "string": +func (t *TrackingCategoryStatus) Accept(visitor TrackingCategoryStatusVisitor) error { + if t.typ == "Status7D1Enum" || t.Status7D1Enum != "" { + return visitor.VisitStatus7D1Enum(t.Status7D1Enum) + } + if t.typ == "String" || t.String != "" { return visitor.VisitString(t.String) } -} - -// - `XUA` - ADB Unit of Account -// - `AFN` - Afghan Afghani -// - `AFA` - Afghan Afghani (1927–2002) -// - `ALL` - Albanian Lek -// - `ALK` - Albanian Lek (1946–1965) -// - `DZD` - Algerian Dinar -// - `ADP` - Andorran Peseta -// - `AOA` - Angolan Kwanza -// - `AOK` - Angolan Kwanza (1977–1991) -// - `AON` - Angolan New Kwanza (1990–2000) -// - `AOR` - Angolan Readjusted Kwanza (1995–1999) -// - `ARA` - Argentine Austral -// - `ARS` - Argentine Peso -// - `ARM` - Argentine Peso (1881–1970) -// - `ARP` - Argentine Peso (1983–1985) -// - `ARL` - Argentine Peso Ley (1970–1983) -// - `AMD` - Armenian Dram -// - `AWG` - Aruban Florin -// - `AUD` - Australian Dollar -// - `ATS` - Austrian Schilling -// - `AZN` - Azerbaijani Manat -// - `AZM` - Azerbaijani Manat (1993–2006) -// - `BSD` - Bahamian Dollar -// - `BHD` - Bahraini Dinar -// - `BDT` - Bangladeshi Taka -// - `BBD` - Barbadian Dollar -// - `BYN` - Belarusian Ruble -// - `BYB` - Belarusian Ruble (1994–1999) -// - `BYR` - Belarusian Ruble (2000–2016) -// - `BEF` - Belgian Franc -// - `BEC` - Belgian Franc (convertible) -// - `BEL` - Belgian Franc (financial) -// - `BZD` - Belize Dollar -// - `BMD` - Bermudan Dollar -// - `BTN` - Bhutanese Ngultrum -// - `BOB` - Bolivian Boliviano -// - `BOL` - Bolivian Boliviano (1863–1963) -// - `BOV` - Bolivian Mvdol -// - `BOP` - Bolivian Peso -// - `BAM` - Bosnia-Herzegovina Convertible Mark -// - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) -// - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) -// - `BWP` - Botswanan Pula -// - `BRC` - Brazilian Cruzado (1986–1989) -// - `BRZ` - Brazilian Cruzeiro (1942–1967) -// - `BRE` - Brazilian Cruzeiro (1990–1993) -// - `BRR` - Brazilian Cruzeiro (1993–1994) -// - `BRN` - Brazilian New Cruzado (1989–1990) -// - `BRB` - Brazilian New Cruzeiro (1967–1986) -// - `BRL` - Brazilian Real -// - `GBP` - British Pound -// - `BND` - Brunei Dollar -// - `BGL` - Bulgarian Hard Lev -// - `BGN` - Bulgarian Lev -// - `BGO` - Bulgarian Lev (1879–1952) -// - `BGM` - Bulgarian Socialist Lev -// - `BUK` - Burmese Kyat -// - `BIF` - Burundian Franc -// - `XPF` - CFP Franc -// - `KHR` - Cambodian Riel -// - `CAD` - Canadian Dollar -// - `CVE` - Cape Verdean Escudo -// - `KYD` - Cayman Islands Dollar -// - `XAF` - Central African CFA Franc -// - `CLE` - Chilean Escudo -// - `CLP` - Chilean Peso -// - `CLF` - Chilean Unit of Account (UF) -// - `CNX` - Chinese People’s Bank Dollar -// - `CNY` - Chinese Yuan -// - `CNH` - Chinese Yuan (offshore) -// - `COP` - Colombian Peso -// - `COU` - Colombian Real Value Unit -// - `KMF` - Comorian Franc -// - `CDF` - Congolese Franc -// - `CRC` - Costa Rican Colón -// - `HRD` - Croatian Dinar -// - `HRK` - Croatian Kuna -// - `CUC` - Cuban Convertible Peso -// - `CUP` - Cuban Peso -// - `CYP` - Cypriot Pound -// - `CZK` - Czech Koruna -// - `CSK` - Czechoslovak Hard Koruna -// - `DKK` - Danish Krone -// - `DJF` - Djiboutian Franc -// - `DOP` - Dominican Peso -// - `NLG` - Dutch Guilder -// - `XCD` - East Caribbean Dollar -// - `DDM` - East German Mark -// - `ECS` - Ecuadorian Sucre -// - `ECV` - Ecuadorian Unit of Constant Value -// - `EGP` - Egyptian Pound -// - `GQE` - Equatorial Guinean Ekwele -// - `ERN` - Eritrean Nakfa -// - `EEK` - Estonian Kroon -// - `ETB` - Ethiopian Birr -// - `EUR` - Euro -// - `XBA` - European Composite Unit -// - `XEU` - European Currency Unit -// - `XBB` - European Monetary Unit -// - `XBC` - European Unit of Account (XBC) -// - `XBD` - European Unit of Account (XBD) -// - `FKP` - Falkland Islands Pound -// - `FJD` - Fijian Dollar -// - `FIM` - Finnish Markka -// - `FRF` - French Franc -// - `XFO` - French Gold Franc -// - `XFU` - French UIC-Franc -// - `GMD` - Gambian Dalasi -// - `GEK` - Georgian Kupon Larit -// - `GEL` - Georgian Lari -// - `DEM` - German Mark -// - `GHS` - Ghanaian Cedi -// - `GHC` - Ghanaian Cedi (1979–2007) -// - `GIP` - Gibraltar Pound -// - `XAU` - Gold -// - `GRD` - Greek Drachma -// - `GTQ` - Guatemalan Quetzal -// - `GWP` - Guinea-Bissau Peso -// - `GNF` - Guinean Franc -// - `GNS` - Guinean Syli -// - `GYD` - Guyanaese Dollar -// - `HTG` - Haitian Gourde -// - `HNL` - Honduran Lempira -// - `HKD` - Hong Kong Dollar -// - `HUF` - Hungarian Forint -// - `IMP` - IMP -// - `ISK` - Icelandic Króna -// - `ISJ` - Icelandic Króna (1918–1981) -// - `INR` - Indian Rupee -// - `IDR` - Indonesian Rupiah -// - `IRR` - Iranian Rial -// - `IQD` - Iraqi Dinar -// - `IEP` - Irish Pound -// - `ILS` - Israeli New Shekel -// - `ILP` - Israeli Pound -// - `ILR` - Israeli Shekel (1980–1985) -// - `ITL` - Italian Lira -// - `JMD` - Jamaican Dollar -// - `JPY` - Japanese Yen -// - `JOD` - Jordanian Dinar -// - `KZT` - Kazakhstani Tenge -// - `KES` - Kenyan Shilling -// - `KWD` - Kuwaiti Dinar -// - `KGS` - Kyrgystani Som -// - `LAK` - Laotian Kip -// - `LVL` - Latvian Lats -// - `LVR` - Latvian Ruble -// - `LBP` - Lebanese Pound -// - `LSL` - Lesotho Loti -// - `LRD` - Liberian Dollar -// - `LYD` - Libyan Dinar -// - `LTL` - Lithuanian Litas -// - `LTT` - Lithuanian Talonas -// - `LUL` - Luxembourg Financial Franc -// - `LUC` - Luxembourgian Convertible Franc -// - `LUF` - Luxembourgian Franc -// - `MOP` - Macanese Pataca -// - `MKD` - Macedonian Denar -// - `MKN` - Macedonian Denar (1992–1993) -// - `MGA` - Malagasy Ariary -// - `MGF` - Malagasy Franc -// - `MWK` - Malawian Kwacha -// - `MYR` - Malaysian Ringgit -// - `MVR` - Maldivian Rufiyaa -// - `MVP` - Maldivian Rupee (1947–1981) -// - `MLF` - Malian Franc -// - `MTL` - Maltese Lira -// - `MTP` - Maltese Pound -// - `MRU` - Mauritanian Ouguiya -// - `MRO` - Mauritanian Ouguiya (1973–2017) -// - `MUR` - Mauritian Rupee -// - `MXV` - Mexican Investment Unit -// - `MXN` - Mexican Peso -// - `MXP` - Mexican Silver Peso (1861–1992) -// - `MDC` - Moldovan Cupon -// - `MDL` - Moldovan Leu -// - `MCF` - Monegasque Franc -// - `MNT` - Mongolian Tugrik -// - `MAD` - Moroccan Dirham -// - `MAF` - Moroccan Franc -// - `MZE` - Mozambican Escudo -// - `MZN` - Mozambican Metical -// - `MZM` - Mozambican Metical (1980–2006) -// - `MMK` - Myanmar Kyat -// - `NAD` - Namibian Dollar -// - `NPR` - Nepalese Rupee -// - `ANG` - Netherlands Antillean Guilder -// - `TWD` - New Taiwan Dollar -// - `NZD` - New Zealand Dollar -// - `NIO` - Nicaraguan Córdoba -// - `NIC` - Nicaraguan Córdoba (1988–1991) -// - `NGN` - Nigerian Naira -// - `KPW` - North Korean Won -// - `NOK` - Norwegian Krone -// - `OMR` - Omani Rial -// - `PKR` - Pakistani Rupee -// - `XPD` - Palladium -// - `PAB` - Panamanian Balboa -// - `PGK` - Papua New Guinean Kina -// - `PYG` - Paraguayan Guarani -// - `PEI` - Peruvian Inti -// - `PEN` - Peruvian Sol -// - `PES` - Peruvian Sol (1863–1965) -// - `PHP` - Philippine Peso -// - `XPT` - Platinum -// - `PLN` - Polish Zloty -// - `PLZ` - Polish Zloty (1950–1995) -// - `PTE` - Portuguese Escudo -// - `GWE` - Portuguese Guinea Escudo -// - `QAR` - Qatari Rial -// - `XRE` - RINET Funds -// - `RHD` - Rhodesian Dollar -// - `RON` - Romanian Leu -// - `ROL` - Romanian Leu (1952–2006) -// - `RUB` - Russian Ruble -// - `RUR` - Russian Ruble (1991–1998) -// - `RWF` - Rwandan Franc -// - `SVC` - Salvadoran Colón -// - `WST` - Samoan Tala -// - `SAR` - Saudi Riyal -// - `RSD` - Serbian Dinar -// - `CSD` - Serbian Dinar (2002–2006) -// - `SCR` - Seychellois Rupee -// - `SLL` - Sierra Leonean Leone -// - `XAG` - Silver -// - `SGD` - Singapore Dollar -// - `SKK` - Slovak Koruna -// - `SIT` - Slovenian Tolar -// - `SBD` - Solomon Islands Dollar -// - `SOS` - Somali Shilling -// - `ZAR` - South African Rand -// - `ZAL` - South African Rand (financial) -// - `KRH` - South Korean Hwan (1953–1962) -// - `KRW` - South Korean Won -// - `KRO` - South Korean Won (1945–1953) -// - `SSP` - South Sudanese Pound -// - `SUR` - Soviet Rouble -// - `ESP` - Spanish Peseta -// - `ESA` - Spanish Peseta (A account) -// - `ESB` - Spanish Peseta (convertible account) -// - `XDR` - Special Drawing Rights -// - `LKR` - Sri Lankan Rupee -// - `SHP` - St. Helena Pound -// - `XSU` - Sucre -// - `SDD` - Sudanese Dinar (1992–2007) -// - `SDG` - Sudanese Pound -// - `SDP` - Sudanese Pound (1957–1998) -// - `SRD` - Surinamese Dollar -// - `SRG` - Surinamese Guilder -// - `SZL` - Swazi Lilangeni -// - `SEK` - Swedish Krona -// - `CHF` - Swiss Franc -// - `SYP` - Syrian Pound -// - `STN` - São Tomé & Príncipe Dobra -// - `STD` - São Tomé & Príncipe Dobra (1977–2017) -// - `TVD` - TVD -// - `TJR` - Tajikistani Ruble -// - `TJS` - Tajikistani Somoni -// - `TZS` - Tanzanian Shilling -// - `XTS` - Testing Currency Code -// - `THB` - Thai Baht -// - `XXX` - The codes assigned for transactions where no currency is involved -// - `TPE` - Timorese Escudo -// - `TOP` - Tongan Paʻanga -// - `TTD` - Trinidad & Tobago Dollar -// - `TND` - Tunisian Dinar -// - `TRY` - Turkish Lira -// - `TRL` - Turkish Lira (1922–2005) -// - `TMT` - Turkmenistani Manat -// - `TMM` - Turkmenistani Manat (1993–2009) -// - `USD` - US Dollar -// - `USN` - US Dollar (Next day) -// - `USS` - US Dollar (Same day) -// - `UGX` - Ugandan Shilling -// - `UGS` - Ugandan Shilling (1966–1987) -// - `UAH` - Ukrainian Hryvnia -// - `UAK` - Ukrainian Karbovanets -// - `AED` - United Arab Emirates Dirham -// - `UYW` - Uruguayan Nominal Wage Index Unit -// - `UYU` - Uruguayan Peso -// - `UYP` - Uruguayan Peso (1975–1993) -// - `UYI` - Uruguayan Peso (Indexed Units) -// - `UZS` - Uzbekistani Som -// - `VUV` - Vanuatu Vatu -// - `VES` - Venezuelan Bolívar -// - `VEB` - Venezuelan Bolívar (1871–2008) -// - `VEF` - Venezuelan Bolívar (2008–2018) -// - `VND` - Vietnamese Dong -// - `VNN` - Vietnamese Dong (1978–1985) -// - `CHE` - WIR Euro -// - `CHW` - WIR Franc -// - `XOF` - West African CFA Franc -// - `YDD` - Yemeni Dinar -// - `YER` - Yemeni Rial -// - `YUN` - Yugoslavian Convertible Dinar (1990–1992) -// - `YUD` - Yugoslavian Hard Dinar (1966–1990) -// - `YUM` - Yugoslavian New Dinar (1994–2002) -// - `YUR` - Yugoslavian Reformed Dinar (1992–1993) -// - `ZWN` - ZWN -// - `ZRN` - Zairean New Zaire (1993–1998) -// - `ZRZ` - Zairean Zaire (1971–1993) -// - `ZMW` - Zambian Kwacha -// - `ZMK` - Zambian Kwacha (1968–2012) -// - `ZWD` - Zimbabwean Dollar (1980–2008) -// - `ZWR` - Zimbabwean Dollar (2008) -// - `ZWL` - Zimbabwean Dollar (2009) + return fmt.Errorf("type %T does not include a non-empty union type", t) +} + +// * `XUA` - ADB Unit of Account +// * `AFN` - Afghan Afghani +// * `AFA` - Afghan Afghani (1927–2002) +// * `ALL` - Albanian Lek +// * `ALK` - Albanian Lek (1946–1965) +// * `DZD` - Algerian Dinar +// * `ADP` - Andorran Peseta +// * `AOA` - Angolan Kwanza +// * `AOK` - Angolan Kwanza (1977–1991) +// * `AON` - Angolan New Kwanza (1990–2000) +// * `AOR` - Angolan Readjusted Kwanza (1995–1999) +// * `ARA` - Argentine Austral +// * `ARS` - Argentine Peso +// * `ARM` - Argentine Peso (1881–1970) +// * `ARP` - Argentine Peso (1983–1985) +// * `ARL` - Argentine Peso Ley (1970–1983) +// * `AMD` - Armenian Dram +// * `AWG` - Aruban Florin +// * `AUD` - Australian Dollar +// * `ATS` - Austrian Schilling +// * `AZN` - Azerbaijani Manat +// * `AZM` - Azerbaijani Manat (1993–2006) +// * `BSD` - Bahamian Dollar +// * `BHD` - Bahraini Dinar +// * `BDT` - Bangladeshi Taka +// * `BBD` - Barbadian Dollar +// * `BYN` - Belarusian Ruble +// * `BYB` - Belarusian Ruble (1994–1999) +// * `BYR` - Belarusian Ruble (2000–2016) +// * `BEF` - Belgian Franc +// * `BEC` - Belgian Franc (convertible) +// * `BEL` - Belgian Franc (financial) +// * `BZD` - Belize Dollar +// * `BMD` - Bermudan Dollar +// * `BTN` - Bhutanese Ngultrum +// * `BOB` - Bolivian Boliviano +// * `BOL` - Bolivian Boliviano (1863–1963) +// * `BOV` - Bolivian Mvdol +// * `BOP` - Bolivian Peso +// * `BAM` - Bosnia-Herzegovina Convertible Mark +// * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) +// * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) +// * `BWP` - Botswanan Pula +// * `BRC` - Brazilian Cruzado (1986–1989) +// * `BRZ` - Brazilian Cruzeiro (1942–1967) +// * `BRE` - Brazilian Cruzeiro (1990–1993) +// * `BRR` - Brazilian Cruzeiro (1993–1994) +// * `BRN` - Brazilian New Cruzado (1989–1990) +// * `BRB` - Brazilian New Cruzeiro (1967–1986) +// * `BRL` - Brazilian Real +// * `GBP` - British Pound +// * `BND` - Brunei Dollar +// * `BGL` - Bulgarian Hard Lev +// * `BGN` - Bulgarian Lev +// * `BGO` - Bulgarian Lev (1879–1952) +// * `BGM` - Bulgarian Socialist Lev +// * `BUK` - Burmese Kyat +// * `BIF` - Burundian Franc +// * `XPF` - CFP Franc +// * `KHR` - Cambodian Riel +// * `CAD` - Canadian Dollar +// * `CVE` - Cape Verdean Escudo +// * `KYD` - Cayman Islands Dollar +// * `XAF` - Central African CFA Franc +// * `CLE` - Chilean Escudo +// * `CLP` - Chilean Peso +// * `CLF` - Chilean Unit of Account (UF) +// * `CNX` - Chinese People’s Bank Dollar +// * `CNY` - Chinese Yuan +// * `CNH` - Chinese Yuan (offshore) +// * `COP` - Colombian Peso +// * `COU` - Colombian Real Value Unit +// * `KMF` - Comorian Franc +// * `CDF` - Congolese Franc +// * `CRC` - Costa Rican Colón +// * `HRD` - Croatian Dinar +// * `HRK` - Croatian Kuna +// * `CUC` - Cuban Convertible Peso +// * `CUP` - Cuban Peso +// * `CYP` - Cypriot Pound +// * `CZK` - Czech Koruna +// * `CSK` - Czechoslovak Hard Koruna +// * `DKK` - Danish Krone +// * `DJF` - Djiboutian Franc +// * `DOP` - Dominican Peso +// * `NLG` - Dutch Guilder +// * `XCD` - East Caribbean Dollar +// * `DDM` - East German Mark +// * `ECS` - Ecuadorian Sucre +// * `ECV` - Ecuadorian Unit of Constant Value +// * `EGP` - Egyptian Pound +// * `GQE` - Equatorial Guinean Ekwele +// * `ERN` - Eritrean Nakfa +// * `EEK` - Estonian Kroon +// * `ETB` - Ethiopian Birr +// * `EUR` - Euro +// * `XBA` - European Composite Unit +// * `XEU` - European Currency Unit +// * `XBB` - European Monetary Unit +// * `XBC` - European Unit of Account (XBC) +// * `XBD` - European Unit of Account (XBD) +// * `FKP` - Falkland Islands Pound +// * `FJD` - Fijian Dollar +// * `FIM` - Finnish Markka +// * `FRF` - French Franc +// * `XFO` - French Gold Franc +// * `XFU` - French UIC-Franc +// * `GMD` - Gambian Dalasi +// * `GEK` - Georgian Kupon Larit +// * `GEL` - Georgian Lari +// * `DEM` - German Mark +// * `GHS` - Ghanaian Cedi +// * `GHC` - Ghanaian Cedi (1979–2007) +// * `GIP` - Gibraltar Pound +// * `XAU` - Gold +// * `GRD` - Greek Drachma +// * `GTQ` - Guatemalan Quetzal +// * `GWP` - Guinea-Bissau Peso +// * `GNF` - Guinean Franc +// * `GNS` - Guinean Syli +// * `GYD` - Guyanaese Dollar +// * `HTG` - Haitian Gourde +// * `HNL` - Honduran Lempira +// * `HKD` - Hong Kong Dollar +// * `HUF` - Hungarian Forint +// * `IMP` - IMP +// * `ISK` - Icelandic Króna +// * `ISJ` - Icelandic Króna (1918–1981) +// * `INR` - Indian Rupee +// * `IDR` - Indonesian Rupiah +// * `IRR` - Iranian Rial +// * `IQD` - Iraqi Dinar +// * `IEP` - Irish Pound +// * `ILS` - Israeli New Shekel +// * `ILP` - Israeli Pound +// * `ILR` - Israeli Shekel (1980–1985) +// * `ITL` - Italian Lira +// * `JMD` - Jamaican Dollar +// * `JPY` - Japanese Yen +// * `JOD` - Jordanian Dinar +// * `KZT` - Kazakhstani Tenge +// * `KES` - Kenyan Shilling +// * `KWD` - Kuwaiti Dinar +// * `KGS` - Kyrgystani Som +// * `LAK` - Laotian Kip +// * `LVL` - Latvian Lats +// * `LVR` - Latvian Ruble +// * `LBP` - Lebanese Pound +// * `LSL` - Lesotho Loti +// * `LRD` - Liberian Dollar +// * `LYD` - Libyan Dinar +// * `LTL` - Lithuanian Litas +// * `LTT` - Lithuanian Talonas +// * `LUL` - Luxembourg Financial Franc +// * `LUC` - Luxembourgian Convertible Franc +// * `LUF` - Luxembourgian Franc +// * `MOP` - Macanese Pataca +// * `MKD` - Macedonian Denar +// * `MKN` - Macedonian Denar (1992–1993) +// * `MGA` - Malagasy Ariary +// * `MGF` - Malagasy Franc +// * `MWK` - Malawian Kwacha +// * `MYR` - Malaysian Ringgit +// * `MVR` - Maldivian Rufiyaa +// * `MVP` - Maldivian Rupee (1947–1981) +// * `MLF` - Malian Franc +// * `MTL` - Maltese Lira +// * `MTP` - Maltese Pound +// * `MRU` - Mauritanian Ouguiya +// * `MRO` - Mauritanian Ouguiya (1973–2017) +// * `MUR` - Mauritian Rupee +// * `MXV` - Mexican Investment Unit +// * `MXN` - Mexican Peso +// * `MXP` - Mexican Silver Peso (1861–1992) +// * `MDC` - Moldovan Cupon +// * `MDL` - Moldovan Leu +// * `MCF` - Monegasque Franc +// * `MNT` - Mongolian Tugrik +// * `MAD` - Moroccan Dirham +// * `MAF` - Moroccan Franc +// * `MZE` - Mozambican Escudo +// * `MZN` - Mozambican Metical +// * `MZM` - Mozambican Metical (1980–2006) +// * `MMK` - Myanmar Kyat +// * `NAD` - Namibian Dollar +// * `NPR` - Nepalese Rupee +// * `ANG` - Netherlands Antillean Guilder +// * `TWD` - New Taiwan Dollar +// * `NZD` - New Zealand Dollar +// * `NIO` - Nicaraguan Córdoba +// * `NIC` - Nicaraguan Córdoba (1988–1991) +// * `NGN` - Nigerian Naira +// * `KPW` - North Korean Won +// * `NOK` - Norwegian Krone +// * `OMR` - Omani Rial +// * `PKR` - Pakistani Rupee +// * `XPD` - Palladium +// * `PAB` - Panamanian Balboa +// * `PGK` - Papua New Guinean Kina +// * `PYG` - Paraguayan Guarani +// * `PEI` - Peruvian Inti +// * `PEN` - Peruvian Sol +// * `PES` - Peruvian Sol (1863–1965) +// * `PHP` - Philippine Peso +// * `XPT` - Platinum +// * `PLN` - Polish Zloty +// * `PLZ` - Polish Zloty (1950–1995) +// * `PTE` - Portuguese Escudo +// * `GWE` - Portuguese Guinea Escudo +// * `QAR` - Qatari Rial +// * `XRE` - RINET Funds +// * `RHD` - Rhodesian Dollar +// * `RON` - Romanian Leu +// * `ROL` - Romanian Leu (1952–2006) +// * `RUB` - Russian Ruble +// * `RUR` - Russian Ruble (1991–1998) +// * `RWF` - Rwandan Franc +// * `SVC` - Salvadoran Colón +// * `WST` - Samoan Tala +// * `SAR` - Saudi Riyal +// * `RSD` - Serbian Dinar +// * `CSD` - Serbian Dinar (2002–2006) +// * `SCR` - Seychellois Rupee +// * `SLL` - Sierra Leonean Leone +// * `XAG` - Silver +// * `SGD` - Singapore Dollar +// * `SKK` - Slovak Koruna +// * `SIT` - Slovenian Tolar +// * `SBD` - Solomon Islands Dollar +// * `SOS` - Somali Shilling +// * `ZAR` - South African Rand +// * `ZAL` - South African Rand (financial) +// * `KRH` - South Korean Hwan (1953–1962) +// * `KRW` - South Korean Won +// * `KRO` - South Korean Won (1945–1953) +// * `SSP` - South Sudanese Pound +// * `SUR` - Soviet Rouble +// * `ESP` - Spanish Peseta +// * `ESA` - Spanish Peseta (A account) +// * `ESB` - Spanish Peseta (convertible account) +// * `XDR` - Special Drawing Rights +// * `LKR` - Sri Lankan Rupee +// * `SHP` - St. Helena Pound +// * `XSU` - Sucre +// * `SDD` - Sudanese Dinar (1992–2007) +// * `SDG` - Sudanese Pound +// * `SDP` - Sudanese Pound (1957–1998) +// * `SRD` - Surinamese Dollar +// * `SRG` - Surinamese Guilder +// * `SZL` - Swazi Lilangeni +// * `SEK` - Swedish Krona +// * `CHF` - Swiss Franc +// * `SYP` - Syrian Pound +// * `STN` - São Tomé & Príncipe Dobra +// * `STD` - São Tomé & Príncipe Dobra (1977–2017) +// * `TVD` - TVD +// * `TJR` - Tajikistani Ruble +// * `TJS` - Tajikistani Somoni +// * `TZS` - Tanzanian Shilling +// * `XTS` - Testing Currency Code +// * `THB` - Thai Baht +// * `XXX` - The codes assigned for transactions where no currency is involved +// * `TPE` - Timorese Escudo +// * `TOP` - Tongan Paʻanga +// * `TTD` - Trinidad & Tobago Dollar +// * `TND` - Tunisian Dinar +// * `TRY` - Turkish Lira +// * `TRL` - Turkish Lira (1922–2005) +// * `TMT` - Turkmenistani Manat +// * `TMM` - Turkmenistani Manat (1993–2009) +// * `USD` - US Dollar +// * `USN` - US Dollar (Next day) +// * `USS` - US Dollar (Same day) +// * `UGX` - Ugandan Shilling +// * `UGS` - Ugandan Shilling (1966–1987) +// * `UAH` - Ukrainian Hryvnia +// * `UAK` - Ukrainian Karbovanets +// * `AED` - United Arab Emirates Dirham +// * `UYW` - Uruguayan Nominal Wage Index Unit +// * `UYU` - Uruguayan Peso +// * `UYP` - Uruguayan Peso (1975–1993) +// * `UYI` - Uruguayan Peso (Indexed Units) +// * `UZS` - Uzbekistani Som +// * `VUV` - Vanuatu Vatu +// * `VES` - Venezuelan Bolívar +// * `VEB` - Venezuelan Bolívar (1871–2008) +// * `VEF` - Venezuelan Bolívar (2008–2018) +// * `VND` - Vietnamese Dong +// * `VNN` - Vietnamese Dong (1978–1985) +// * `CHE` - WIR Euro +// * `CHW` - WIR Franc +// * `XOF` - West African CFA Franc +// * `YDD` - Yemeni Dinar +// * `YER` - Yemeni Rial +// * `YUN` - Yugoslavian Convertible Dinar (1990–1992) +// * `YUD` - Yugoslavian Hard Dinar (1966–1990) +// * `YUM` - Yugoslavian New Dinar (1994–2002) +// * `YUR` - Yugoslavian Reformed Dinar (1992–1993) +// * `ZWN` - ZWN +// * `ZRN` - Zairean New Zaire (1993–1998) +// * `ZRZ` - Zairean Zaire (1971–1993) +// * `ZMW` - Zambian Kwacha +// * `ZMK` - Zambian Kwacha (1968–2012) +// * `ZWD` - Zimbabwean Dollar (1980–2008) +// * `ZWR` - Zimbabwean Dollar (2008) +// * `ZWL` - Zimbabwean Dollar (2009) type TransactionCurrencyEnum string const ( @@ -43923,1306 +22109,622 @@ func (t TransactionCurrencyEnum) Ptr() *TransactionCurrencyEnum { return &t } -// # The TransactionLineItem Object -// -// ### Description -// -// The `TransactionLineItem` object is used to represent a transaction's line items. -// -// ### Usage Example -// -// Fetch from the `GET TransactionLineItem` endpoint and view the transaction's line items. -type TransactionLineItem struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // An internal note used by the business to clarify purpose of the transaction. - Memo *string `json:"memo,omitempty"` - // The line item's unit price. - UnitPrice *string `json:"unit_price,omitempty"` - // The line item's quantity. - Quantity *string `json:"quantity,omitempty"` - Item *TransactionLineItemItem `json:"item,omitempty"` - // The line item's account. - Account *string `json:"account,omitempty"` - // The line's associated tracking category. - TrackingCategory *string `json:"tracking_category,omitempty"` - // The transaction line item's associated tracking categories. - TrackingCategories []*string `json:"tracking_categories,omitempty"` - // The line item's total. - TotalLineAmount *string `json:"total_line_amount,omitempty"` - // The tax rate that applies to this line item. - TaxRate *string `json:"tax_rate,omitempty"` - // The line item's currency. - // - // - `XUA` - ADB Unit of Account - // - `AFN` - Afghan Afghani - // - `AFA` - Afghan Afghani (1927–2002) - // - `ALL` - Albanian Lek - // - `ALK` - Albanian Lek (1946–1965) - // - `DZD` - Algerian Dinar - // - `ADP` - Andorran Peseta - // - `AOA` - Angolan Kwanza - // - `AOK` - Angolan Kwanza (1977–1991) - // - `AON` - Angolan New Kwanza (1990–2000) - // - `AOR` - Angolan Readjusted Kwanza (1995–1999) - // - `ARA` - Argentine Austral - // - `ARS` - Argentine Peso - // - `ARM` - Argentine Peso (1881–1970) - // - `ARP` - Argentine Peso (1983–1985) - // - `ARL` - Argentine Peso Ley (1970–1983) - // - `AMD` - Armenian Dram - // - `AWG` - Aruban Florin - // - `AUD` - Australian Dollar - // - `ATS` - Austrian Schilling - // - `AZN` - Azerbaijani Manat - // - `AZM` - Azerbaijani Manat (1993–2006) - // - `BSD` - Bahamian Dollar - // - `BHD` - Bahraini Dinar - // - `BDT` - Bangladeshi Taka - // - `BBD` - Barbadian Dollar - // - `BYN` - Belarusian Ruble - // - `BYB` - Belarusian Ruble (1994–1999) - // - `BYR` - Belarusian Ruble (2000–2016) - // - `BEF` - Belgian Franc - // - `BEC` - Belgian Franc (convertible) - // - `BEL` - Belgian Franc (financial) - // - `BZD` - Belize Dollar - // - `BMD` - Bermudan Dollar - // - `BTN` - Bhutanese Ngultrum - // - `BOB` - Bolivian Boliviano - // - `BOL` - Bolivian Boliviano (1863–1963) - // - `BOV` - Bolivian Mvdol - // - `BOP` - Bolivian Peso - // - `BAM` - Bosnia-Herzegovina Convertible Mark - // - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - // - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - // - `BWP` - Botswanan Pula - // - `BRC` - Brazilian Cruzado (1986–1989) - // - `BRZ` - Brazilian Cruzeiro (1942–1967) - // - `BRE` - Brazilian Cruzeiro (1990–1993) - // - `BRR` - Brazilian Cruzeiro (1993–1994) - // - `BRN` - Brazilian New Cruzado (1989–1990) - // - `BRB` - Brazilian New Cruzeiro (1967–1986) - // - `BRL` - Brazilian Real - // - `GBP` - British Pound - // - `BND` - Brunei Dollar - // - `BGL` - Bulgarian Hard Lev - // - `BGN` - Bulgarian Lev - // - `BGO` - Bulgarian Lev (1879–1952) - // - `BGM` - Bulgarian Socialist Lev - // - `BUK` - Burmese Kyat - // - `BIF` - Burundian Franc - // - `XPF` - CFP Franc - // - `KHR` - Cambodian Riel - // - `CAD` - Canadian Dollar - // - `CVE` - Cape Verdean Escudo - // - `KYD` - Cayman Islands Dollar - // - `XAF` - Central African CFA Franc - // - `CLE` - Chilean Escudo - // - `CLP` - Chilean Peso - // - `CLF` - Chilean Unit of Account (UF) - // - `CNX` - Chinese People’s Bank Dollar - // - `CNY` - Chinese Yuan - // - `CNH` - Chinese Yuan (offshore) - // - `COP` - Colombian Peso - // - `COU` - Colombian Real Value Unit - // - `KMF` - Comorian Franc - // - `CDF` - Congolese Franc - // - `CRC` - Costa Rican Colón - // - `HRD` - Croatian Dinar - // - `HRK` - Croatian Kuna - // - `CUC` - Cuban Convertible Peso - // - `CUP` - Cuban Peso - // - `CYP` - Cypriot Pound - // - `CZK` - Czech Koruna - // - `CSK` - Czechoslovak Hard Koruna - // - `DKK` - Danish Krone - // - `DJF` - Djiboutian Franc - // - `DOP` - Dominican Peso - // - `NLG` - Dutch Guilder - // - `XCD` - East Caribbean Dollar - // - `DDM` - East German Mark - // - `ECS` - Ecuadorian Sucre - // - `ECV` - Ecuadorian Unit of Constant Value - // - `EGP` - Egyptian Pound - // - `GQE` - Equatorial Guinean Ekwele - // - `ERN` - Eritrean Nakfa - // - `EEK` - Estonian Kroon - // - `ETB` - Ethiopian Birr - // - `EUR` - Euro - // - `XBA` - European Composite Unit - // - `XEU` - European Currency Unit - // - `XBB` - European Monetary Unit - // - `XBC` - European Unit of Account (XBC) - // - `XBD` - European Unit of Account (XBD) - // - `FKP` - Falkland Islands Pound - // - `FJD` - Fijian Dollar - // - `FIM` - Finnish Markka - // - `FRF` - French Franc - // - `XFO` - French Gold Franc - // - `XFU` - French UIC-Franc - // - `GMD` - Gambian Dalasi - // - `GEK` - Georgian Kupon Larit - // - `GEL` - Georgian Lari - // - `DEM` - German Mark - // - `GHS` - Ghanaian Cedi - // - `GHC` - Ghanaian Cedi (1979–2007) - // - `GIP` - Gibraltar Pound - // - `XAU` - Gold - // - `GRD` - Greek Drachma - // - `GTQ` - Guatemalan Quetzal - // - `GWP` - Guinea-Bissau Peso - // - `GNF` - Guinean Franc - // - `GNS` - Guinean Syli - // - `GYD` - Guyanaese Dollar - // - `HTG` - Haitian Gourde - // - `HNL` - Honduran Lempira - // - `HKD` - Hong Kong Dollar - // - `HUF` - Hungarian Forint - // - `IMP` - IMP - // - `ISK` - Icelandic Króna - // - `ISJ` - Icelandic Króna (1918–1981) - // - `INR` - Indian Rupee - // - `IDR` - Indonesian Rupiah - // - `IRR` - Iranian Rial - // - `IQD` - Iraqi Dinar - // - `IEP` - Irish Pound - // - `ILS` - Israeli New Shekel - // - `ILP` - Israeli Pound - // - `ILR` - Israeli Shekel (1980–1985) - // - `ITL` - Italian Lira - // - `JMD` - Jamaican Dollar - // - `JPY` - Japanese Yen - // - `JOD` - Jordanian Dinar - // - `KZT` - Kazakhstani Tenge - // - `KES` - Kenyan Shilling - // - `KWD` - Kuwaiti Dinar - // - `KGS` - Kyrgystani Som - // - `LAK` - Laotian Kip - // - `LVL` - Latvian Lats - // - `LVR` - Latvian Ruble - // - `LBP` - Lebanese Pound - // - `LSL` - Lesotho Loti - // - `LRD` - Liberian Dollar - // - `LYD` - Libyan Dinar - // - `LTL` - Lithuanian Litas - // - `LTT` - Lithuanian Talonas - // - `LUL` - Luxembourg Financial Franc - // - `LUC` - Luxembourgian Convertible Franc - // - `LUF` - Luxembourgian Franc - // - `MOP` - Macanese Pataca - // - `MKD` - Macedonian Denar - // - `MKN` - Macedonian Denar (1992–1993) - // - `MGA` - Malagasy Ariary - // - `MGF` - Malagasy Franc - // - `MWK` - Malawian Kwacha - // - `MYR` - Malaysian Ringgit - // - `MVR` - Maldivian Rufiyaa - // - `MVP` - Maldivian Rupee (1947–1981) - // - `MLF` - Malian Franc - // - `MTL` - Maltese Lira - // - `MTP` - Maltese Pound - // - `MRU` - Mauritanian Ouguiya - // - `MRO` - Mauritanian Ouguiya (1973–2017) - // - `MUR` - Mauritian Rupee - // - `MXV` - Mexican Investment Unit - // - `MXN` - Mexican Peso - // - `MXP` - Mexican Silver Peso (1861–1992) - // - `MDC` - Moldovan Cupon - // - `MDL` - Moldovan Leu - // - `MCF` - Monegasque Franc - // - `MNT` - Mongolian Tugrik - // - `MAD` - Moroccan Dirham - // - `MAF` - Moroccan Franc - // - `MZE` - Mozambican Escudo - // - `MZN` - Mozambican Metical - // - `MZM` - Mozambican Metical (1980–2006) - // - `MMK` - Myanmar Kyat - // - `NAD` - Namibian Dollar - // - `NPR` - Nepalese Rupee - // - `ANG` - Netherlands Antillean Guilder - // - `TWD` - New Taiwan Dollar - // - `NZD` - New Zealand Dollar - // - `NIO` - Nicaraguan Córdoba - // - `NIC` - Nicaraguan Córdoba (1988–1991) - // - `NGN` - Nigerian Naira - // - `KPW` - North Korean Won - // - `NOK` - Norwegian Krone - // - `OMR` - Omani Rial - // - `PKR` - Pakistani Rupee - // - `XPD` - Palladium - // - `PAB` - Panamanian Balboa - // - `PGK` - Papua New Guinean Kina - // - `PYG` - Paraguayan Guarani - // - `PEI` - Peruvian Inti - // - `PEN` - Peruvian Sol - // - `PES` - Peruvian Sol (1863–1965) - // - `PHP` - Philippine Peso - // - `XPT` - Platinum - // - `PLN` - Polish Zloty - // - `PLZ` - Polish Zloty (1950–1995) - // - `PTE` - Portuguese Escudo - // - `GWE` - Portuguese Guinea Escudo - // - `QAR` - Qatari Rial - // - `XRE` - RINET Funds - // - `RHD` - Rhodesian Dollar - // - `RON` - Romanian Leu - // - `ROL` - Romanian Leu (1952–2006) - // - `RUB` - Russian Ruble - // - `RUR` - Russian Ruble (1991–1998) - // - `RWF` - Rwandan Franc - // - `SVC` - Salvadoran Colón - // - `WST` - Samoan Tala - // - `SAR` - Saudi Riyal - // - `RSD` - Serbian Dinar - // - `CSD` - Serbian Dinar (2002–2006) - // - `SCR` - Seychellois Rupee - // - `SLL` - Sierra Leonean Leone - // - `XAG` - Silver - // - `SGD` - Singapore Dollar - // - `SKK` - Slovak Koruna - // - `SIT` - Slovenian Tolar - // - `SBD` - Solomon Islands Dollar - // - `SOS` - Somali Shilling - // - `ZAR` - South African Rand - // - `ZAL` - South African Rand (financial) - // - `KRH` - South Korean Hwan (1953–1962) - // - `KRW` - South Korean Won - // - `KRO` - South Korean Won (1945–1953) - // - `SSP` - South Sudanese Pound - // - `SUR` - Soviet Rouble - // - `ESP` - Spanish Peseta - // - `ESA` - Spanish Peseta (A account) - // - `ESB` - Spanish Peseta (convertible account) - // - `XDR` - Special Drawing Rights - // - `LKR` - Sri Lankan Rupee - // - `SHP` - St. Helena Pound - // - `XSU` - Sucre - // - `SDD` - Sudanese Dinar (1992–2007) - // - `SDG` - Sudanese Pound - // - `SDP` - Sudanese Pound (1957–1998) - // - `SRD` - Surinamese Dollar - // - `SRG` - Surinamese Guilder - // - `SZL` - Swazi Lilangeni - // - `SEK` - Swedish Krona - // - `CHF` - Swiss Franc - // - `SYP` - Syrian Pound - // - `STN` - São Tomé & Príncipe Dobra - // - `STD` - São Tomé & Príncipe Dobra (1977–2017) - // - `TVD` - TVD - // - `TJR` - Tajikistani Ruble - // - `TJS` - Tajikistani Somoni - // - `TZS` - Tanzanian Shilling - // - `XTS` - Testing Currency Code - // - `THB` - Thai Baht - // - `XXX` - The codes assigned for transactions where no currency is involved - // - `TPE` - Timorese Escudo - // - `TOP` - Tongan Paʻanga - // - `TTD` - Trinidad & Tobago Dollar - // - `TND` - Tunisian Dinar - // - `TRY` - Turkish Lira - // - `TRL` - Turkish Lira (1922–2005) - // - `TMT` - Turkmenistani Manat - // - `TMM` - Turkmenistani Manat (1993–2009) - // - `USD` - US Dollar - // - `USN` - US Dollar (Next day) - // - `USS` - US Dollar (Same day) - // - `UGX` - Ugandan Shilling - // - `UGS` - Ugandan Shilling (1966–1987) - // - `UAH` - Ukrainian Hryvnia - // - `UAK` - Ukrainian Karbovanets - // - `AED` - United Arab Emirates Dirham - // - `UYW` - Uruguayan Nominal Wage Index Unit - // - `UYU` - Uruguayan Peso - // - `UYP` - Uruguayan Peso (1975–1993) - // - `UYI` - Uruguayan Peso (Indexed Units) - // - `UZS` - Uzbekistani Som - // - `VUV` - Vanuatu Vatu - // - `VES` - Venezuelan Bolívar - // - `VEB` - Venezuelan Bolívar (1871–2008) - // - `VEF` - Venezuelan Bolívar (2008–2018) - // - `VND` - Vietnamese Dong - // - `VNN` - Vietnamese Dong (1978–1985) - // - `CHE` - WIR Euro - // - `CHW` - WIR Franc - // - `XOF` - West African CFA Franc - // - `YDD` - Yemeni Dinar - // - `YER` - Yemeni Rial - // - `YUN` - Yugoslavian Convertible Dinar (1990–1992) - // - `YUD` - Yugoslavian Hard Dinar (1966–1990) - // - `YUM` - Yugoslavian New Dinar (1994–2002) - // - `YUR` - Yugoslavian Reformed Dinar (1992–1993) - // - `ZWN` - ZWN - // - `ZRN` - Zairean New Zaire (1993–1998) - // - `ZRZ` - Zairean Zaire (1971–1993) - // - `ZMW` - Zambian Kwacha - // - `ZMK` - Zambian Kwacha (1968–2012) - // - `ZWD` - Zimbabwean Dollar (1980–2008) - // - `ZWR` - Zimbabwean Dollar (2008) - // - `ZWL` - Zimbabwean Dollar (2009) - Currency *TransactionLineItemCurrency `json:"currency,omitempty"` - // The line item's exchange rate. - ExchangeRate *string `json:"exchange_rate,omitempty"` - // The company the line belongs to. - Company *string `json:"company,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` +// * `INVENTORY` - INVENTORY +// * `NON_INVENTORY` - NON_INVENTORY +// * `SERVICE` - SERVICE +// * `UNKNOWN` - UNKNOWN +type Type2BbEnum string + +const ( + Type2BbEnumInventory Type2BbEnum = "INVENTORY" + Type2BbEnumNonInventory Type2BbEnum = "NON_INVENTORY" + Type2BbEnumService Type2BbEnum = "SERVICE" + Type2BbEnumUnknown Type2BbEnum = "UNKNOWN" +) + +func NewType2BbEnumFromString(s string) (Type2BbEnum, error) { + switch s { + case "INVENTORY": + return Type2BbEnumInventory, nil + case "NON_INVENTORY": + return Type2BbEnumNonInventory, nil + case "SERVICE": + return Type2BbEnumService, nil + case "UNKNOWN": + return Type2BbEnumUnknown, nil + } + var t Type2BbEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (t Type2BbEnum) Ptr() *Type2BbEnum { + return &t +} + +type ValidationProblemSource struct { + Pointer string `json:"pointer" url:"pointer"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (v *ValidationProblemSource) GetPointer() string { + if v == nil { + return "" + } + return v.Pointer +} - _rawJSON json.RawMessage +func (v *ValidationProblemSource) GetExtraProperties() map[string]interface{} { + return v.extraProperties } -func (t *TransactionLineItem) UnmarshalJSON(data []byte) error { - type unmarshaler TransactionLineItem +func (v *ValidationProblemSource) UnmarshalJSON(data []byte) error { + type unmarshaler ValidationProblemSource var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *t = TransactionLineItem(value) - t._rawJSON = json.RawMessage(data) + *v = ValidationProblemSource(value) + extraProperties, err := internal.ExtractExtraProperties(data, *v) + if err != nil { + return err + } + v.extraProperties = extraProperties + v.rawJSON = json.RawMessage(data) return nil } -func (t *TransactionLineItem) String() string { - if len(t._rawJSON) > 0 { - if value, err := core.StringifyJSON(t._rawJSON); err == nil { +func (v *ValidationProblemSource) String() string { + if len(v.rawJSON) > 0 { + if value, err := internal.StringifyJSON(v.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(t); err == nil { + if value, err := internal.StringifyJSON(v); err == nil { return value } - return fmt.Sprintf("%#v", t) + return fmt.Sprintf("%#v", v) } -// The line item's currency. +// # The VendorCredit Object +// ### Description +// A `VendorCredit` is transaction issued by a vendor to the accounting company, indicating a reduction or cancellation of the amount owed to the vendor. It is most generally used as an adjustment note used to rectify errors, returns, or overpayments related to a purchasing transaction. A `VendorCredit` can be applied to `Accounts Payable` Invoices to decrease the overall amount of the `Invoice`. // -// - `XUA` - ADB Unit of Account -// - `AFN` - Afghan Afghani -// - `AFA` - Afghan Afghani (1927–2002) -// - `ALL` - Albanian Lek -// - `ALK` - Albanian Lek (1946–1965) -// - `DZD` - Algerian Dinar -// - `ADP` - Andorran Peseta -// - `AOA` - Angolan Kwanza -// - `AOK` - Angolan Kwanza (1977–1991) -// - `AON` - Angolan New Kwanza (1990–2000) -// - `AOR` - Angolan Readjusted Kwanza (1995–1999) -// - `ARA` - Argentine Austral -// - `ARS` - Argentine Peso -// - `ARM` - Argentine Peso (1881–1970) -// - `ARP` - Argentine Peso (1983–1985) -// - `ARL` - Argentine Peso Ley (1970–1983) -// - `AMD` - Armenian Dram -// - `AWG` - Aruban Florin -// - `AUD` - Australian Dollar -// - `ATS` - Austrian Schilling -// - `AZN` - Azerbaijani Manat -// - `AZM` - Azerbaijani Manat (1993–2006) -// - `BSD` - Bahamian Dollar -// - `BHD` - Bahraini Dinar -// - `BDT` - Bangladeshi Taka -// - `BBD` - Barbadian Dollar -// - `BYN` - Belarusian Ruble -// - `BYB` - Belarusian Ruble (1994–1999) -// - `BYR` - Belarusian Ruble (2000–2016) -// - `BEF` - Belgian Franc -// - `BEC` - Belgian Franc (convertible) -// - `BEL` - Belgian Franc (financial) -// - `BZD` - Belize Dollar -// - `BMD` - Bermudan Dollar -// - `BTN` - Bhutanese Ngultrum -// - `BOB` - Bolivian Boliviano -// - `BOL` - Bolivian Boliviano (1863–1963) -// - `BOV` - Bolivian Mvdol -// - `BOP` - Bolivian Peso -// - `BAM` - Bosnia-Herzegovina Convertible Mark -// - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) -// - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) -// - `BWP` - Botswanan Pula -// - `BRC` - Brazilian Cruzado (1986–1989) -// - `BRZ` - Brazilian Cruzeiro (1942–1967) -// - `BRE` - Brazilian Cruzeiro (1990–1993) -// - `BRR` - Brazilian Cruzeiro (1993–1994) -// - `BRN` - Brazilian New Cruzado (1989–1990) -// - `BRB` - Brazilian New Cruzeiro (1967–1986) -// - `BRL` - Brazilian Real -// - `GBP` - British Pound -// - `BND` - Brunei Dollar -// - `BGL` - Bulgarian Hard Lev -// - `BGN` - Bulgarian Lev -// - `BGO` - Bulgarian Lev (1879–1952) -// - `BGM` - Bulgarian Socialist Lev -// - `BUK` - Burmese Kyat -// - `BIF` - Burundian Franc -// - `XPF` - CFP Franc -// - `KHR` - Cambodian Riel -// - `CAD` - Canadian Dollar -// - `CVE` - Cape Verdean Escudo -// - `KYD` - Cayman Islands Dollar -// - `XAF` - Central African CFA Franc -// - `CLE` - Chilean Escudo -// - `CLP` - Chilean Peso -// - `CLF` - Chilean Unit of Account (UF) -// - `CNX` - Chinese People’s Bank Dollar -// - `CNY` - Chinese Yuan -// - `CNH` - Chinese Yuan (offshore) -// - `COP` - Colombian Peso -// - `COU` - Colombian Real Value Unit -// - `KMF` - Comorian Franc -// - `CDF` - Congolese Franc -// - `CRC` - Costa Rican Colón -// - `HRD` - Croatian Dinar -// - `HRK` - Croatian Kuna -// - `CUC` - Cuban Convertible Peso -// - `CUP` - Cuban Peso -// - `CYP` - Cypriot Pound -// - `CZK` - Czech Koruna -// - `CSK` - Czechoslovak Hard Koruna -// - `DKK` - Danish Krone -// - `DJF` - Djiboutian Franc -// - `DOP` - Dominican Peso -// - `NLG` - Dutch Guilder -// - `XCD` - East Caribbean Dollar -// - `DDM` - East German Mark -// - `ECS` - Ecuadorian Sucre -// - `ECV` - Ecuadorian Unit of Constant Value -// - `EGP` - Egyptian Pound -// - `GQE` - Equatorial Guinean Ekwele -// - `ERN` - Eritrean Nakfa -// - `EEK` - Estonian Kroon -// - `ETB` - Ethiopian Birr -// - `EUR` - Euro -// - `XBA` - European Composite Unit -// - `XEU` - European Currency Unit -// - `XBB` - European Monetary Unit -// - `XBC` - European Unit of Account (XBC) -// - `XBD` - European Unit of Account (XBD) -// - `FKP` - Falkland Islands Pound -// - `FJD` - Fijian Dollar -// - `FIM` - Finnish Markka -// - `FRF` - French Franc -// - `XFO` - French Gold Franc -// - `XFU` - French UIC-Franc -// - `GMD` - Gambian Dalasi -// - `GEK` - Georgian Kupon Larit -// - `GEL` - Georgian Lari -// - `DEM` - German Mark -// - `GHS` - Ghanaian Cedi -// - `GHC` - Ghanaian Cedi (1979–2007) -// - `GIP` - Gibraltar Pound -// - `XAU` - Gold -// - `GRD` - Greek Drachma -// - `GTQ` - Guatemalan Quetzal -// - `GWP` - Guinea-Bissau Peso -// - `GNF` - Guinean Franc -// - `GNS` - Guinean Syli -// - `GYD` - Guyanaese Dollar -// - `HTG` - Haitian Gourde -// - `HNL` - Honduran Lempira -// - `HKD` - Hong Kong Dollar -// - `HUF` - Hungarian Forint -// - `IMP` - IMP -// - `ISK` - Icelandic Króna -// - `ISJ` - Icelandic Króna (1918–1981) -// - `INR` - Indian Rupee -// - `IDR` - Indonesian Rupiah -// - `IRR` - Iranian Rial -// - `IQD` - Iraqi Dinar -// - `IEP` - Irish Pound -// - `ILS` - Israeli New Shekel -// - `ILP` - Israeli Pound -// - `ILR` - Israeli Shekel (1980–1985) -// - `ITL` - Italian Lira -// - `JMD` - Jamaican Dollar -// - `JPY` - Japanese Yen -// - `JOD` - Jordanian Dinar -// - `KZT` - Kazakhstani Tenge -// - `KES` - Kenyan Shilling -// - `KWD` - Kuwaiti Dinar -// - `KGS` - Kyrgystani Som -// - `LAK` - Laotian Kip -// - `LVL` - Latvian Lats -// - `LVR` - Latvian Ruble -// - `LBP` - Lebanese Pound -// - `LSL` - Lesotho Loti -// - `LRD` - Liberian Dollar -// - `LYD` - Libyan Dinar -// - `LTL` - Lithuanian Litas -// - `LTT` - Lithuanian Talonas -// - `LUL` - Luxembourg Financial Franc -// - `LUC` - Luxembourgian Convertible Franc -// - `LUF` - Luxembourgian Franc -// - `MOP` - Macanese Pataca -// - `MKD` - Macedonian Denar -// - `MKN` - Macedonian Denar (1992–1993) -// - `MGA` - Malagasy Ariary -// - `MGF` - Malagasy Franc -// - `MWK` - Malawian Kwacha -// - `MYR` - Malaysian Ringgit -// - `MVR` - Maldivian Rufiyaa -// - `MVP` - Maldivian Rupee (1947–1981) -// - `MLF` - Malian Franc -// - `MTL` - Maltese Lira -// - `MTP` - Maltese Pound -// - `MRU` - Mauritanian Ouguiya -// - `MRO` - Mauritanian Ouguiya (1973–2017) -// - `MUR` - Mauritian Rupee -// - `MXV` - Mexican Investment Unit -// - `MXN` - Mexican Peso -// - `MXP` - Mexican Silver Peso (1861–1992) -// - `MDC` - Moldovan Cupon -// - `MDL` - Moldovan Leu -// - `MCF` - Monegasque Franc -// - `MNT` - Mongolian Tugrik -// - `MAD` - Moroccan Dirham -// - `MAF` - Moroccan Franc -// - `MZE` - Mozambican Escudo -// - `MZN` - Mozambican Metical -// - `MZM` - Mozambican Metical (1980–2006) -// - `MMK` - Myanmar Kyat -// - `NAD` - Namibian Dollar -// - `NPR` - Nepalese Rupee -// - `ANG` - Netherlands Antillean Guilder -// - `TWD` - New Taiwan Dollar -// - `NZD` - New Zealand Dollar -// - `NIO` - Nicaraguan Córdoba -// - `NIC` - Nicaraguan Córdoba (1988–1991) -// - `NGN` - Nigerian Naira -// - `KPW` - North Korean Won -// - `NOK` - Norwegian Krone -// - `OMR` - Omani Rial -// - `PKR` - Pakistani Rupee -// - `XPD` - Palladium -// - `PAB` - Panamanian Balboa -// - `PGK` - Papua New Guinean Kina -// - `PYG` - Paraguayan Guarani -// - `PEI` - Peruvian Inti -// - `PEN` - Peruvian Sol -// - `PES` - Peruvian Sol (1863–1965) -// - `PHP` - Philippine Peso -// - `XPT` - Platinum -// - `PLN` - Polish Zloty -// - `PLZ` - Polish Zloty (1950–1995) -// - `PTE` - Portuguese Escudo -// - `GWE` - Portuguese Guinea Escudo -// - `QAR` - Qatari Rial -// - `XRE` - RINET Funds -// - `RHD` - Rhodesian Dollar -// - `RON` - Romanian Leu -// - `ROL` - Romanian Leu (1952–2006) -// - `RUB` - Russian Ruble -// - `RUR` - Russian Ruble (1991–1998) -// - `RWF` - Rwandan Franc -// - `SVC` - Salvadoran Colón -// - `WST` - Samoan Tala -// - `SAR` - Saudi Riyal -// - `RSD` - Serbian Dinar -// - `CSD` - Serbian Dinar (2002–2006) -// - `SCR` - Seychellois Rupee -// - `SLL` - Sierra Leonean Leone -// - `XAG` - Silver -// - `SGD` - Singapore Dollar -// - `SKK` - Slovak Koruna -// - `SIT` - Slovenian Tolar -// - `SBD` - Solomon Islands Dollar -// - `SOS` - Somali Shilling -// - `ZAR` - South African Rand -// - `ZAL` - South African Rand (financial) -// - `KRH` - South Korean Hwan (1953–1962) -// - `KRW` - South Korean Won -// - `KRO` - South Korean Won (1945–1953) -// - `SSP` - South Sudanese Pound -// - `SUR` - Soviet Rouble -// - `ESP` - Spanish Peseta -// - `ESA` - Spanish Peseta (A account) -// - `ESB` - Spanish Peseta (convertible account) -// - `XDR` - Special Drawing Rights -// - `LKR` - Sri Lankan Rupee -// - `SHP` - St. Helena Pound -// - `XSU` - Sucre -// - `SDD` - Sudanese Dinar (1992–2007) -// - `SDG` - Sudanese Pound -// - `SDP` - Sudanese Pound (1957–1998) -// - `SRD` - Surinamese Dollar -// - `SRG` - Surinamese Guilder -// - `SZL` - Swazi Lilangeni -// - `SEK` - Swedish Krona -// - `CHF` - Swiss Franc -// - `SYP` - Syrian Pound -// - `STN` - São Tomé & Príncipe Dobra -// - `STD` - São Tomé & Príncipe Dobra (1977–2017) -// - `TVD` - TVD -// - `TJR` - Tajikistani Ruble -// - `TJS` - Tajikistani Somoni -// - `TZS` - Tanzanian Shilling -// - `XTS` - Testing Currency Code -// - `THB` - Thai Baht -// - `XXX` - The codes assigned for transactions where no currency is involved -// - `TPE` - Timorese Escudo -// - `TOP` - Tongan Paʻanga -// - `TTD` - Trinidad & Tobago Dollar -// - `TND` - Tunisian Dinar -// - `TRY` - Turkish Lira -// - `TRL` - Turkish Lira (1922–2005) -// - `TMT` - Turkmenistani Manat -// - `TMM` - Turkmenistani Manat (1993–2009) -// - `USD` - US Dollar -// - `USN` - US Dollar (Next day) -// - `USS` - US Dollar (Same day) -// - `UGX` - Ugandan Shilling -// - `UGS` - Ugandan Shilling (1966–1987) -// - `UAH` - Ukrainian Hryvnia -// - `UAK` - Ukrainian Karbovanets -// - `AED` - United Arab Emirates Dirham -// - `UYW` - Uruguayan Nominal Wage Index Unit -// - `UYU` - Uruguayan Peso -// - `UYP` - Uruguayan Peso (1975–1993) -// - `UYI` - Uruguayan Peso (Indexed Units) -// - `UZS` - Uzbekistani Som -// - `VUV` - Vanuatu Vatu -// - `VES` - Venezuelan Bolívar -// - `VEB` - Venezuelan Bolívar (1871–2008) -// - `VEF` - Venezuelan Bolívar (2008–2018) -// - `VND` - Vietnamese Dong -// - `VNN` - Vietnamese Dong (1978–1985) -// - `CHE` - WIR Euro -// - `CHW` - WIR Franc -// - `XOF` - West African CFA Franc -// - `YDD` - Yemeni Dinar -// - `YER` - Yemeni Rial -// - `YUN` - Yugoslavian Convertible Dinar (1990–1992) -// - `YUD` - Yugoslavian Hard Dinar (1966–1990) -// - `YUM` - Yugoslavian New Dinar (1994–2002) -// - `YUR` - Yugoslavian Reformed Dinar (1992–1993) -// - `ZWN` - ZWN -// - `ZRN` - Zairean New Zaire (1993–1998) -// - `ZRZ` - Zairean Zaire (1971–1993) -// - `ZMW` - Zambian Kwacha -// - `ZMK` - Zambian Kwacha (1968–2012) -// - `ZWD` - Zimbabwean Dollar (1980–2008) -// - `ZWR` - Zimbabwean Dollar (2008) -// - `ZWL` - Zimbabwean Dollar (2009) -type TransactionLineItemCurrency struct { - typeName string - TransactionCurrencyEnum TransactionCurrencyEnum - String string -} - -func NewTransactionLineItemCurrencyFromTransactionCurrencyEnum(value TransactionCurrencyEnum) *TransactionLineItemCurrency { - return &TransactionLineItemCurrency{typeName: "transactionCurrencyEnum", TransactionCurrencyEnum: value} -} +// ### Usage Example +// Fetch from the `GET VendorCredit` endpoint and view a company's vendor credits. +type VendorCredit struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The vendor credit's number. + Number *string `json:"number,omitempty" url:"number,omitempty"` + // The vendor credit's transaction date. + TransactionDate *time.Time `json:"transaction_date,omitempty" url:"transaction_date,omitempty"` + // The vendor that owes the gift or refund. + Vendor *VendorCreditVendor `json:"vendor,omitempty" url:"vendor,omitempty"` + // The vendor credit's total amount. + TotalAmount *float64 `json:"total_amount,omitempty" url:"total_amount,omitempty"` + // The vendor credit's currency. + // + // * `XUA` - ADB Unit of Account + // * `AFN` - Afghan Afghani + // * `AFA` - Afghan Afghani (1927–2002) + // * `ALL` - Albanian Lek + // * `ALK` - Albanian Lek (1946–1965) + // * `DZD` - Algerian Dinar + // * `ADP` - Andorran Peseta + // * `AOA` - Angolan Kwanza + // * `AOK` - Angolan Kwanza (1977–1991) + // * `AON` - Angolan New Kwanza (1990–2000) + // * `AOR` - Angolan Readjusted Kwanza (1995–1999) + // * `ARA` - Argentine Austral + // * `ARS` - Argentine Peso + // * `ARM` - Argentine Peso (1881–1970) + // * `ARP` - Argentine Peso (1983–1985) + // * `ARL` - Argentine Peso Ley (1970–1983) + // * `AMD` - Armenian Dram + // * `AWG` - Aruban Florin + // * `AUD` - Australian Dollar + // * `ATS` - Austrian Schilling + // * `AZN` - Azerbaijani Manat + // * `AZM` - Azerbaijani Manat (1993–2006) + // * `BSD` - Bahamian Dollar + // * `BHD` - Bahraini Dinar + // * `BDT` - Bangladeshi Taka + // * `BBD` - Barbadian Dollar + // * `BYN` - Belarusian Ruble + // * `BYB` - Belarusian Ruble (1994–1999) + // * `BYR` - Belarusian Ruble (2000–2016) + // * `BEF` - Belgian Franc + // * `BEC` - Belgian Franc (convertible) + // * `BEL` - Belgian Franc (financial) + // * `BZD` - Belize Dollar + // * `BMD` - Bermudan Dollar + // * `BTN` - Bhutanese Ngultrum + // * `BOB` - Bolivian Boliviano + // * `BOL` - Bolivian Boliviano (1863–1963) + // * `BOV` - Bolivian Mvdol + // * `BOP` - Bolivian Peso + // * `BAM` - Bosnia-Herzegovina Convertible Mark + // * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + // * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + // * `BWP` - Botswanan Pula + // * `BRC` - Brazilian Cruzado (1986–1989) + // * `BRZ` - Brazilian Cruzeiro (1942–1967) + // * `BRE` - Brazilian Cruzeiro (1990–1993) + // * `BRR` - Brazilian Cruzeiro (1993–1994) + // * `BRN` - Brazilian New Cruzado (1989–1990) + // * `BRB` - Brazilian New Cruzeiro (1967–1986) + // * `BRL` - Brazilian Real + // * `GBP` - British Pound + // * `BND` - Brunei Dollar + // * `BGL` - Bulgarian Hard Lev + // * `BGN` - Bulgarian Lev + // * `BGO` - Bulgarian Lev (1879–1952) + // * `BGM` - Bulgarian Socialist Lev + // * `BUK` - Burmese Kyat + // * `BIF` - Burundian Franc + // * `XPF` - CFP Franc + // * `KHR` - Cambodian Riel + // * `CAD` - Canadian Dollar + // * `CVE` - Cape Verdean Escudo + // * `KYD` - Cayman Islands Dollar + // * `XAF` - Central African CFA Franc + // * `CLE` - Chilean Escudo + // * `CLP` - Chilean Peso + // * `CLF` - Chilean Unit of Account (UF) + // * `CNX` - Chinese People’s Bank Dollar + // * `CNY` - Chinese Yuan + // * `CNH` - Chinese Yuan (offshore) + // * `COP` - Colombian Peso + // * `COU` - Colombian Real Value Unit + // * `KMF` - Comorian Franc + // * `CDF` - Congolese Franc + // * `CRC` - Costa Rican Colón + // * `HRD` - Croatian Dinar + // * `HRK` - Croatian Kuna + // * `CUC` - Cuban Convertible Peso + // * `CUP` - Cuban Peso + // * `CYP` - Cypriot Pound + // * `CZK` - Czech Koruna + // * `CSK` - Czechoslovak Hard Koruna + // * `DKK` - Danish Krone + // * `DJF` - Djiboutian Franc + // * `DOP` - Dominican Peso + // * `NLG` - Dutch Guilder + // * `XCD` - East Caribbean Dollar + // * `DDM` - East German Mark + // * `ECS` - Ecuadorian Sucre + // * `ECV` - Ecuadorian Unit of Constant Value + // * `EGP` - Egyptian Pound + // * `GQE` - Equatorial Guinean Ekwele + // * `ERN` - Eritrean Nakfa + // * `EEK` - Estonian Kroon + // * `ETB` - Ethiopian Birr + // * `EUR` - Euro + // * `XBA` - European Composite Unit + // * `XEU` - European Currency Unit + // * `XBB` - European Monetary Unit + // * `XBC` - European Unit of Account (XBC) + // * `XBD` - European Unit of Account (XBD) + // * `FKP` - Falkland Islands Pound + // * `FJD` - Fijian Dollar + // * `FIM` - Finnish Markka + // * `FRF` - French Franc + // * `XFO` - French Gold Franc + // * `XFU` - French UIC-Franc + // * `GMD` - Gambian Dalasi + // * `GEK` - Georgian Kupon Larit + // * `GEL` - Georgian Lari + // * `DEM` - German Mark + // * `GHS` - Ghanaian Cedi + // * `GHC` - Ghanaian Cedi (1979–2007) + // * `GIP` - Gibraltar Pound + // * `XAU` - Gold + // * `GRD` - Greek Drachma + // * `GTQ` - Guatemalan Quetzal + // * `GWP` - Guinea-Bissau Peso + // * `GNF` - Guinean Franc + // * `GNS` - Guinean Syli + // * `GYD` - Guyanaese Dollar + // * `HTG` - Haitian Gourde + // * `HNL` - Honduran Lempira + // * `HKD` - Hong Kong Dollar + // * `HUF` - Hungarian Forint + // * `IMP` - IMP + // * `ISK` - Icelandic Króna + // * `ISJ` - Icelandic Króna (1918–1981) + // * `INR` - Indian Rupee + // * `IDR` - Indonesian Rupiah + // * `IRR` - Iranian Rial + // * `IQD` - Iraqi Dinar + // * `IEP` - Irish Pound + // * `ILS` - Israeli New Shekel + // * `ILP` - Israeli Pound + // * `ILR` - Israeli Shekel (1980–1985) + // * `ITL` - Italian Lira + // * `JMD` - Jamaican Dollar + // * `JPY` - Japanese Yen + // * `JOD` - Jordanian Dinar + // * `KZT` - Kazakhstani Tenge + // * `KES` - Kenyan Shilling + // * `KWD` - Kuwaiti Dinar + // * `KGS` - Kyrgystani Som + // * `LAK` - Laotian Kip + // * `LVL` - Latvian Lats + // * `LVR` - Latvian Ruble + // * `LBP` - Lebanese Pound + // * `LSL` - Lesotho Loti + // * `LRD` - Liberian Dollar + // * `LYD` - Libyan Dinar + // * `LTL` - Lithuanian Litas + // * `LTT` - Lithuanian Talonas + // * `LUL` - Luxembourg Financial Franc + // * `LUC` - Luxembourgian Convertible Franc + // * `LUF` - Luxembourgian Franc + // * `MOP` - Macanese Pataca + // * `MKD` - Macedonian Denar + // * `MKN` - Macedonian Denar (1992–1993) + // * `MGA` - Malagasy Ariary + // * `MGF` - Malagasy Franc + // * `MWK` - Malawian Kwacha + // * `MYR` - Malaysian Ringgit + // * `MVR` - Maldivian Rufiyaa + // * `MVP` - Maldivian Rupee (1947–1981) + // * `MLF` - Malian Franc + // * `MTL` - Maltese Lira + // * `MTP` - Maltese Pound + // * `MRU` - Mauritanian Ouguiya + // * `MRO` - Mauritanian Ouguiya (1973–2017) + // * `MUR` - Mauritian Rupee + // * `MXV` - Mexican Investment Unit + // * `MXN` - Mexican Peso + // * `MXP` - Mexican Silver Peso (1861–1992) + // * `MDC` - Moldovan Cupon + // * `MDL` - Moldovan Leu + // * `MCF` - Monegasque Franc + // * `MNT` - Mongolian Tugrik + // * `MAD` - Moroccan Dirham + // * `MAF` - Moroccan Franc + // * `MZE` - Mozambican Escudo + // * `MZN` - Mozambican Metical + // * `MZM` - Mozambican Metical (1980–2006) + // * `MMK` - Myanmar Kyat + // * `NAD` - Namibian Dollar + // * `NPR` - Nepalese Rupee + // * `ANG` - Netherlands Antillean Guilder + // * `TWD` - New Taiwan Dollar + // * `NZD` - New Zealand Dollar + // * `NIO` - Nicaraguan Córdoba + // * `NIC` - Nicaraguan Córdoba (1988–1991) + // * `NGN` - Nigerian Naira + // * `KPW` - North Korean Won + // * `NOK` - Norwegian Krone + // * `OMR` - Omani Rial + // * `PKR` - Pakistani Rupee + // * `XPD` - Palladium + // * `PAB` - Panamanian Balboa + // * `PGK` - Papua New Guinean Kina + // * `PYG` - Paraguayan Guarani + // * `PEI` - Peruvian Inti + // * `PEN` - Peruvian Sol + // * `PES` - Peruvian Sol (1863–1965) + // * `PHP` - Philippine Peso + // * `XPT` - Platinum + // * `PLN` - Polish Zloty + // * `PLZ` - Polish Zloty (1950–1995) + // * `PTE` - Portuguese Escudo + // * `GWE` - Portuguese Guinea Escudo + // * `QAR` - Qatari Rial + // * `XRE` - RINET Funds + // * `RHD` - Rhodesian Dollar + // * `RON` - Romanian Leu + // * `ROL` - Romanian Leu (1952–2006) + // * `RUB` - Russian Ruble + // * `RUR` - Russian Ruble (1991–1998) + // * `RWF` - Rwandan Franc + // * `SVC` - Salvadoran Colón + // * `WST` - Samoan Tala + // * `SAR` - Saudi Riyal + // * `RSD` - Serbian Dinar + // * `CSD` - Serbian Dinar (2002–2006) + // * `SCR` - Seychellois Rupee + // * `SLL` - Sierra Leonean Leone + // * `XAG` - Silver + // * `SGD` - Singapore Dollar + // * `SKK` - Slovak Koruna + // * `SIT` - Slovenian Tolar + // * `SBD` - Solomon Islands Dollar + // * `SOS` - Somali Shilling + // * `ZAR` - South African Rand + // * `ZAL` - South African Rand (financial) + // * `KRH` - South Korean Hwan (1953–1962) + // * `KRW` - South Korean Won + // * `KRO` - South Korean Won (1945–1953) + // * `SSP` - South Sudanese Pound + // * `SUR` - Soviet Rouble + // * `ESP` - Spanish Peseta + // * `ESA` - Spanish Peseta (A account) + // * `ESB` - Spanish Peseta (convertible account) + // * `XDR` - Special Drawing Rights + // * `LKR` - Sri Lankan Rupee + // * `SHP` - St. Helena Pound + // * `XSU` - Sucre + // * `SDD` - Sudanese Dinar (1992–2007) + // * `SDG` - Sudanese Pound + // * `SDP` - Sudanese Pound (1957–1998) + // * `SRD` - Surinamese Dollar + // * `SRG` - Surinamese Guilder + // * `SZL` - Swazi Lilangeni + // * `SEK` - Swedish Krona + // * `CHF` - Swiss Franc + // * `SYP` - Syrian Pound + // * `STN` - São Tomé & Príncipe Dobra + // * `STD` - São Tomé & Príncipe Dobra (1977–2017) + // * `TVD` - TVD + // * `TJR` - Tajikistani Ruble + // * `TJS` - Tajikistani Somoni + // * `TZS` - Tanzanian Shilling + // * `XTS` - Testing Currency Code + // * `THB` - Thai Baht + // * `XXX` - The codes assigned for transactions where no currency is involved + // * `TPE` - Timorese Escudo + // * `TOP` - Tongan Paʻanga + // * `TTD` - Trinidad & Tobago Dollar + // * `TND` - Tunisian Dinar + // * `TRY` - Turkish Lira + // * `TRL` - Turkish Lira (1922–2005) + // * `TMT` - Turkmenistani Manat + // * `TMM` - Turkmenistani Manat (1993–2009) + // * `USD` - US Dollar + // * `USN` - US Dollar (Next day) + // * `USS` - US Dollar (Same day) + // * `UGX` - Ugandan Shilling + // * `UGS` - Ugandan Shilling (1966–1987) + // * `UAH` - Ukrainian Hryvnia + // * `UAK` - Ukrainian Karbovanets + // * `AED` - United Arab Emirates Dirham + // * `UYW` - Uruguayan Nominal Wage Index Unit + // * `UYU` - Uruguayan Peso + // * `UYP` - Uruguayan Peso (1975–1993) + // * `UYI` - Uruguayan Peso (Indexed Units) + // * `UZS` - Uzbekistani Som + // * `VUV` - Vanuatu Vatu + // * `VES` - Venezuelan Bolívar + // * `VEB` - Venezuelan Bolívar (1871–2008) + // * `VEF` - Venezuelan Bolívar (2008–2018) + // * `VND` - Vietnamese Dong + // * `VNN` - Vietnamese Dong (1978–1985) + // * `CHE` - WIR Euro + // * `CHW` - WIR Franc + // * `XOF` - West African CFA Franc + // * `YDD` - Yemeni Dinar + // * `YER` - Yemeni Rial + // * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + // * `YUD` - Yugoslavian Hard Dinar (1966–1990) + // * `YUM` - Yugoslavian New Dinar (1994–2002) + // * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + // * `ZWN` - ZWN + // * `ZRN` - Zairean New Zaire (1993–1998) + // * `ZRZ` - Zairean Zaire (1971–1993) + // * `ZMW` - Zambian Kwacha + // * `ZMK` - Zambian Kwacha (1968–2012) + // * `ZWD` - Zimbabwean Dollar (1980–2008) + // * `ZWR` - Zimbabwean Dollar (2008) + // * `ZWL` - Zimbabwean Dollar (2009) + Currency *VendorCreditCurrency `json:"currency,omitempty" url:"currency,omitempty"` + // The vendor credit's exchange rate. + ExchangeRate *string `json:"exchange_rate,omitempty" url:"exchange_rate,omitempty"` + // If the transaction is inclusive or exclusive of tax. `True` if inclusive, `False` if exclusive. + InclusiveOfTax *bool `json:"inclusive_of_tax,omitempty" url:"inclusive_of_tax,omitempty"` + // The company the vendor credit belongs to. + Company *VendorCreditCompany `json:"company,omitempty" url:"company,omitempty"` + Lines []*VendorCreditLine `json:"lines,omitempty" url:"lines,omitempty"` + TrackingCategories []*VendorCreditTrackingCategoriesItem `json:"tracking_categories,omitempty" url:"tracking_categories,omitempty"` + // A list of VendorCredit Applied to Lines objects. + AppliedToLines []*VendorCreditApplyLineForVendorCredit `json:"applied_to_lines,omitempty" url:"applied_to_lines,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + // The accounting period that the VendorCredit was generated in. + AccountingPeriod *VendorCreditAccountingPeriod `json:"accounting_period,omitempty" url:"accounting_period,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` -func NewTransactionLineItemCurrencyFromString(value string) *TransactionLineItemCurrency { - return &TransactionLineItemCurrency{typeName: "string", String: value} + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (t *TransactionLineItemCurrency) UnmarshalJSON(data []byte) error { - var valueTransactionCurrencyEnum TransactionCurrencyEnum - if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { - t.typeName = "transactionCurrencyEnum" - t.TransactionCurrencyEnum = valueTransactionCurrencyEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" - t.String = valueString +func (v *VendorCredit) GetId() *string { + if v == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, t) + return v.Id } -func (t TransactionLineItemCurrency) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "transactionCurrencyEnum": - return json.Marshal(t.TransactionCurrencyEnum) - case "string": - return json.Marshal(t.String) +func (v *VendorCredit) GetRemoteId() *string { + if v == nil { + return nil } + return v.RemoteId } -type TransactionLineItemCurrencyVisitor interface { - VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error - VisitString(string) error -} - -func (t *TransactionLineItemCurrency) Accept(visitor TransactionLineItemCurrencyVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "transactionCurrencyEnum": - return visitor.VisitTransactionCurrencyEnum(t.TransactionCurrencyEnum) - case "string": - return visitor.VisitString(t.String) +func (v *VendorCredit) GetCreatedAt() *time.Time { + if v == nil { + return nil } + return v.CreatedAt } -type TransactionLineItemItem struct { - typeName string - String string - Item *Item -} - -func NewTransactionLineItemItemFromString(value string) *TransactionLineItemItem { - return &TransactionLineItemItem{typeName: "string", String: value} -} - -func NewTransactionLineItemItemFromItem(value *Item) *TransactionLineItemItem { - return &TransactionLineItemItem{typeName: "item", Item: value} -} - -func (t *TransactionLineItemItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" - t.String = valueString +func (v *VendorCredit) GetModifiedAt() *time.Time { + if v == nil { return nil } - valueItem := new(Item) - if err := json.Unmarshal(data, &valueItem); err == nil { - t.typeName = "item" - t.Item = valueItem - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, t) + return v.ModifiedAt } -func (t TransactionLineItemItem) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return json.Marshal(t.String) - case "item": - return json.Marshal(t.Item) +func (v *VendorCredit) GetNumber() *string { + if v == nil { + return nil } + return v.Number } -type TransactionLineItemItemVisitor interface { - VisitString(string) error - VisitItem(*Item) error -} - -func (t *TransactionLineItemItem) Accept(visitor TransactionLineItemItemVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return visitor.VisitString(t.String) - case "item": - return visitor.VisitItem(t.Item) +func (v *VendorCredit) GetTransactionDate() *time.Time { + if v == nil { + return nil } + return v.TransactionDate } -type TransactionTrackingCategoriesItem struct { - typeName string - String string - TrackingCategory *TrackingCategory +func (v *VendorCredit) GetVendor() *VendorCreditVendor { + if v == nil { + return nil + } + return v.Vendor } -func NewTransactionTrackingCategoriesItemFromString(value string) *TransactionTrackingCategoriesItem { - return &TransactionTrackingCategoriesItem{typeName: "string", String: value} +func (v *VendorCredit) GetTotalAmount() *float64 { + if v == nil { + return nil + } + return v.TotalAmount } -func NewTransactionTrackingCategoriesItemFromTrackingCategory(value *TrackingCategory) *TransactionTrackingCategoriesItem { - return &TransactionTrackingCategoriesItem{typeName: "trackingCategory", TrackingCategory: value} +func (v *VendorCredit) GetCurrency() *VendorCreditCurrency { + if v == nil { + return nil + } + return v.Currency } -func (t *TransactionTrackingCategoriesItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" - t.String = valueString +func (v *VendorCredit) GetExchangeRate() *string { + if v == nil { return nil } - valueTrackingCategory := new(TrackingCategory) - if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { - t.typeName = "trackingCategory" - t.TrackingCategory = valueTrackingCategory + return v.ExchangeRate +} + +func (v *VendorCredit) GetInclusiveOfTax() *bool { + if v == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, t) + return v.InclusiveOfTax } -func (t TransactionTrackingCategoriesItem) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return json.Marshal(t.String) - case "trackingCategory": - return json.Marshal(t.TrackingCategory) +func (v *VendorCredit) GetCompany() *VendorCreditCompany { + if v == nil { + return nil } + return v.Company } -type TransactionTrackingCategoriesItemVisitor interface { - VisitString(string) error - VisitTrackingCategory(*TrackingCategory) error +func (v *VendorCredit) GetLines() []*VendorCreditLine { + if v == nil { + return nil + } + return v.Lines } -func (t *TransactionTrackingCategoriesItem) Accept(visitor TransactionTrackingCategoriesItemVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return visitor.VisitString(t.String) - case "trackingCategory": - return visitor.VisitTrackingCategory(t.TrackingCategory) +func (v *VendorCredit) GetTrackingCategories() []*VendorCreditTrackingCategoriesItem { + if v == nil { + return nil } + return v.TrackingCategories } -// - `INVOICE` - INVOICE -// - `EXPENSE` - EXPENSE -// - `TRANSACTION` - TRANSACTION -// - `JOURNAL_ENTRY` - JOURNAL_ENTRY -// - `PAYMENT` - PAYMENT -// - `VENDOR_CREDIT` - VENDOR_CREDIT -// - `CREDIT_NOTE` - CREDIT_NOTE -type UnderlyingTransactionTypeEnum string - -const ( - UnderlyingTransactionTypeEnumInvoice UnderlyingTransactionTypeEnum = "INVOICE" - UnderlyingTransactionTypeEnumExpense UnderlyingTransactionTypeEnum = "EXPENSE" - UnderlyingTransactionTypeEnumTransaction UnderlyingTransactionTypeEnum = "TRANSACTION" - UnderlyingTransactionTypeEnumJournalEntry UnderlyingTransactionTypeEnum = "JOURNAL_ENTRY" - UnderlyingTransactionTypeEnumPayment UnderlyingTransactionTypeEnum = "PAYMENT" - UnderlyingTransactionTypeEnumVendorCredit UnderlyingTransactionTypeEnum = "VENDOR_CREDIT" - UnderlyingTransactionTypeEnumCreditNote UnderlyingTransactionTypeEnum = "CREDIT_NOTE" -) - -func NewUnderlyingTransactionTypeEnumFromString(s string) (UnderlyingTransactionTypeEnum, error) { - switch s { - case "INVOICE": - return UnderlyingTransactionTypeEnumInvoice, nil - case "EXPENSE": - return UnderlyingTransactionTypeEnumExpense, nil - case "TRANSACTION": - return UnderlyingTransactionTypeEnumTransaction, nil - case "JOURNAL_ENTRY": - return UnderlyingTransactionTypeEnumJournalEntry, nil - case "PAYMENT": - return UnderlyingTransactionTypeEnumPayment, nil - case "VENDOR_CREDIT": - return UnderlyingTransactionTypeEnumVendorCredit, nil - case "CREDIT_NOTE": - return UnderlyingTransactionTypeEnumCreditNote, nil - } - var t UnderlyingTransactionTypeEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) +func (v *VendorCredit) GetAppliedToLines() []*VendorCreditApplyLineForVendorCredit { + if v == nil { + return nil + } + return v.AppliedToLines } -func (u UnderlyingTransactionTypeEnum) Ptr() *UnderlyingTransactionTypeEnum { - return &u +func (v *VendorCredit) GetRemoteWasDeleted() *bool { + if v == nil { + return nil + } + return v.RemoteWasDeleted } -type ValidationProblemSource struct { - Pointer string `json:"pointer"` - - _rawJSON json.RawMessage +func (v *VendorCredit) GetAccountingPeriod() *VendorCreditAccountingPeriod { + if v == nil { + return nil + } + return v.AccountingPeriod } -func (v *ValidationProblemSource) UnmarshalJSON(data []byte) error { - type unmarshaler ValidationProblemSource - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (v *VendorCredit) GetFieldMappings() map[string]interface{} { + if v == nil { + return nil } - *v = ValidationProblemSource(value) - v._rawJSON = json.RawMessage(data) - return nil + return v.FieldMappings } -func (v *ValidationProblemSource) String() string { - if len(v._rawJSON) > 0 { - if value, err := core.StringifyJSON(v._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(v); err == nil { - return value +func (v *VendorCredit) GetRemoteData() []*RemoteData { + if v == nil { + return nil } - return fmt.Sprintf("%#v", v) + return v.RemoteData } -// # The VendorCredit Object -// -// ### Description -// -// A `VendorCredit` is transaction issued by a vendor to the accounting company, indicating a reduction or cancellation of the amount owed to the vendor. It is most generally used as an adjustment note used to rectify errors, returns, or overpayments related to a purchasing transaction. A `VendorCredit` can be applied to `Accounts Payable` Invoices to decrease the overall amount of the `Invoice`. -// -// ### Usage Example -// -// Fetch from the `GET VendorCredit` endpoint and view a company's vendor credits. -type VendorCredit struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The vendor credit's number. - Number *string `json:"number,omitempty"` - // The vendor credit's transaction date. - TransactionDate *time.Time `json:"transaction_date,omitempty"` - // The vendor that owes the gift or refund. - Vendor *VendorCreditVendor `json:"vendor,omitempty"` - // The vendor credit's total amount. - TotalAmount *float64 `json:"total_amount,omitempty"` - // The vendor credit's currency. - // - // - `XUA` - ADB Unit of Account - // - `AFN` - Afghan Afghani - // - `AFA` - Afghan Afghani (1927–2002) - // - `ALL` - Albanian Lek - // - `ALK` - Albanian Lek (1946–1965) - // - `DZD` - Algerian Dinar - // - `ADP` - Andorran Peseta - // - `AOA` - Angolan Kwanza - // - `AOK` - Angolan Kwanza (1977–1991) - // - `AON` - Angolan New Kwanza (1990–2000) - // - `AOR` - Angolan Readjusted Kwanza (1995–1999) - // - `ARA` - Argentine Austral - // - `ARS` - Argentine Peso - // - `ARM` - Argentine Peso (1881–1970) - // - `ARP` - Argentine Peso (1983–1985) - // - `ARL` - Argentine Peso Ley (1970–1983) - // - `AMD` - Armenian Dram - // - `AWG` - Aruban Florin - // - `AUD` - Australian Dollar - // - `ATS` - Austrian Schilling - // - `AZN` - Azerbaijani Manat - // - `AZM` - Azerbaijani Manat (1993–2006) - // - `BSD` - Bahamian Dollar - // - `BHD` - Bahraini Dinar - // - `BDT` - Bangladeshi Taka - // - `BBD` - Barbadian Dollar - // - `BYN` - Belarusian Ruble - // - `BYB` - Belarusian Ruble (1994–1999) - // - `BYR` - Belarusian Ruble (2000–2016) - // - `BEF` - Belgian Franc - // - `BEC` - Belgian Franc (convertible) - // - `BEL` - Belgian Franc (financial) - // - `BZD` - Belize Dollar - // - `BMD` - Bermudan Dollar - // - `BTN` - Bhutanese Ngultrum - // - `BOB` - Bolivian Boliviano - // - `BOL` - Bolivian Boliviano (1863–1963) - // - `BOV` - Bolivian Mvdol - // - `BOP` - Bolivian Peso - // - `BAM` - Bosnia-Herzegovina Convertible Mark - // - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - // - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - // - `BWP` - Botswanan Pula - // - `BRC` - Brazilian Cruzado (1986–1989) - // - `BRZ` - Brazilian Cruzeiro (1942–1967) - // - `BRE` - Brazilian Cruzeiro (1990–1993) - // - `BRR` - Brazilian Cruzeiro (1993–1994) - // - `BRN` - Brazilian New Cruzado (1989–1990) - // - `BRB` - Brazilian New Cruzeiro (1967–1986) - // - `BRL` - Brazilian Real - // - `GBP` - British Pound - // - `BND` - Brunei Dollar - // - `BGL` - Bulgarian Hard Lev - // - `BGN` - Bulgarian Lev - // - `BGO` - Bulgarian Lev (1879–1952) - // - `BGM` - Bulgarian Socialist Lev - // - `BUK` - Burmese Kyat - // - `BIF` - Burundian Franc - // - `XPF` - CFP Franc - // - `KHR` - Cambodian Riel - // - `CAD` - Canadian Dollar - // - `CVE` - Cape Verdean Escudo - // - `KYD` - Cayman Islands Dollar - // - `XAF` - Central African CFA Franc - // - `CLE` - Chilean Escudo - // - `CLP` - Chilean Peso - // - `CLF` - Chilean Unit of Account (UF) - // - `CNX` - Chinese People’s Bank Dollar - // - `CNY` - Chinese Yuan - // - `CNH` - Chinese Yuan (offshore) - // - `COP` - Colombian Peso - // - `COU` - Colombian Real Value Unit - // - `KMF` - Comorian Franc - // - `CDF` - Congolese Franc - // - `CRC` - Costa Rican Colón - // - `HRD` - Croatian Dinar - // - `HRK` - Croatian Kuna - // - `CUC` - Cuban Convertible Peso - // - `CUP` - Cuban Peso - // - `CYP` - Cypriot Pound - // - `CZK` - Czech Koruna - // - `CSK` - Czechoslovak Hard Koruna - // - `DKK` - Danish Krone - // - `DJF` - Djiboutian Franc - // - `DOP` - Dominican Peso - // - `NLG` - Dutch Guilder - // - `XCD` - East Caribbean Dollar - // - `DDM` - East German Mark - // - `ECS` - Ecuadorian Sucre - // - `ECV` - Ecuadorian Unit of Constant Value - // - `EGP` - Egyptian Pound - // - `GQE` - Equatorial Guinean Ekwele - // - `ERN` - Eritrean Nakfa - // - `EEK` - Estonian Kroon - // - `ETB` - Ethiopian Birr - // - `EUR` - Euro - // - `XBA` - European Composite Unit - // - `XEU` - European Currency Unit - // - `XBB` - European Monetary Unit - // - `XBC` - European Unit of Account (XBC) - // - `XBD` - European Unit of Account (XBD) - // - `FKP` - Falkland Islands Pound - // - `FJD` - Fijian Dollar - // - `FIM` - Finnish Markka - // - `FRF` - French Franc - // - `XFO` - French Gold Franc - // - `XFU` - French UIC-Franc - // - `GMD` - Gambian Dalasi - // - `GEK` - Georgian Kupon Larit - // - `GEL` - Georgian Lari - // - `DEM` - German Mark - // - `GHS` - Ghanaian Cedi - // - `GHC` - Ghanaian Cedi (1979–2007) - // - `GIP` - Gibraltar Pound - // - `XAU` - Gold - // - `GRD` - Greek Drachma - // - `GTQ` - Guatemalan Quetzal - // - `GWP` - Guinea-Bissau Peso - // - `GNF` - Guinean Franc - // - `GNS` - Guinean Syli - // - `GYD` - Guyanaese Dollar - // - `HTG` - Haitian Gourde - // - `HNL` - Honduran Lempira - // - `HKD` - Hong Kong Dollar - // - `HUF` - Hungarian Forint - // - `IMP` - IMP - // - `ISK` - Icelandic Króna - // - `ISJ` - Icelandic Króna (1918–1981) - // - `INR` - Indian Rupee - // - `IDR` - Indonesian Rupiah - // - `IRR` - Iranian Rial - // - `IQD` - Iraqi Dinar - // - `IEP` - Irish Pound - // - `ILS` - Israeli New Shekel - // - `ILP` - Israeli Pound - // - `ILR` - Israeli Shekel (1980–1985) - // - `ITL` - Italian Lira - // - `JMD` - Jamaican Dollar - // - `JPY` - Japanese Yen - // - `JOD` - Jordanian Dinar - // - `KZT` - Kazakhstani Tenge - // - `KES` - Kenyan Shilling - // - `KWD` - Kuwaiti Dinar - // - `KGS` - Kyrgystani Som - // - `LAK` - Laotian Kip - // - `LVL` - Latvian Lats - // - `LVR` - Latvian Ruble - // - `LBP` - Lebanese Pound - // - `LSL` - Lesotho Loti - // - `LRD` - Liberian Dollar - // - `LYD` - Libyan Dinar - // - `LTL` - Lithuanian Litas - // - `LTT` - Lithuanian Talonas - // - `LUL` - Luxembourg Financial Franc - // - `LUC` - Luxembourgian Convertible Franc - // - `LUF` - Luxembourgian Franc - // - `MOP` - Macanese Pataca - // - `MKD` - Macedonian Denar - // - `MKN` - Macedonian Denar (1992–1993) - // - `MGA` - Malagasy Ariary - // - `MGF` - Malagasy Franc - // - `MWK` - Malawian Kwacha - // - `MYR` - Malaysian Ringgit - // - `MVR` - Maldivian Rufiyaa - // - `MVP` - Maldivian Rupee (1947–1981) - // - `MLF` - Malian Franc - // - `MTL` - Maltese Lira - // - `MTP` - Maltese Pound - // - `MRU` - Mauritanian Ouguiya - // - `MRO` - Mauritanian Ouguiya (1973–2017) - // - `MUR` - Mauritian Rupee - // - `MXV` - Mexican Investment Unit - // - `MXN` - Mexican Peso - // - `MXP` - Mexican Silver Peso (1861–1992) - // - `MDC` - Moldovan Cupon - // - `MDL` - Moldovan Leu - // - `MCF` - Monegasque Franc - // - `MNT` - Mongolian Tugrik - // - `MAD` - Moroccan Dirham - // - `MAF` - Moroccan Franc - // - `MZE` - Mozambican Escudo - // - `MZN` - Mozambican Metical - // - `MZM` - Mozambican Metical (1980–2006) - // - `MMK` - Myanmar Kyat - // - `NAD` - Namibian Dollar - // - `NPR` - Nepalese Rupee - // - `ANG` - Netherlands Antillean Guilder - // - `TWD` - New Taiwan Dollar - // - `NZD` - New Zealand Dollar - // - `NIO` - Nicaraguan Córdoba - // - `NIC` - Nicaraguan Córdoba (1988–1991) - // - `NGN` - Nigerian Naira - // - `KPW` - North Korean Won - // - `NOK` - Norwegian Krone - // - `OMR` - Omani Rial - // - `PKR` - Pakistani Rupee - // - `XPD` - Palladium - // - `PAB` - Panamanian Balboa - // - `PGK` - Papua New Guinean Kina - // - `PYG` - Paraguayan Guarani - // - `PEI` - Peruvian Inti - // - `PEN` - Peruvian Sol - // - `PES` - Peruvian Sol (1863–1965) - // - `PHP` - Philippine Peso - // - `XPT` - Platinum - // - `PLN` - Polish Zloty - // - `PLZ` - Polish Zloty (1950–1995) - // - `PTE` - Portuguese Escudo - // - `GWE` - Portuguese Guinea Escudo - // - `QAR` - Qatari Rial - // - `XRE` - RINET Funds - // - `RHD` - Rhodesian Dollar - // - `RON` - Romanian Leu - // - `ROL` - Romanian Leu (1952–2006) - // - `RUB` - Russian Ruble - // - `RUR` - Russian Ruble (1991–1998) - // - `RWF` - Rwandan Franc - // - `SVC` - Salvadoran Colón - // - `WST` - Samoan Tala - // - `SAR` - Saudi Riyal - // - `RSD` - Serbian Dinar - // - `CSD` - Serbian Dinar (2002–2006) - // - `SCR` - Seychellois Rupee - // - `SLL` - Sierra Leonean Leone - // - `XAG` - Silver - // - `SGD` - Singapore Dollar - // - `SKK` - Slovak Koruna - // - `SIT` - Slovenian Tolar - // - `SBD` - Solomon Islands Dollar - // - `SOS` - Somali Shilling - // - `ZAR` - South African Rand - // - `ZAL` - South African Rand (financial) - // - `KRH` - South Korean Hwan (1953–1962) - // - `KRW` - South Korean Won - // - `KRO` - South Korean Won (1945–1953) - // - `SSP` - South Sudanese Pound - // - `SUR` - Soviet Rouble - // - `ESP` - Spanish Peseta - // - `ESA` - Spanish Peseta (A account) - // - `ESB` - Spanish Peseta (convertible account) - // - `XDR` - Special Drawing Rights - // - `LKR` - Sri Lankan Rupee - // - `SHP` - St. Helena Pound - // - `XSU` - Sucre - // - `SDD` - Sudanese Dinar (1992–2007) - // - `SDG` - Sudanese Pound - // - `SDP` - Sudanese Pound (1957–1998) - // - `SRD` - Surinamese Dollar - // - `SRG` - Surinamese Guilder - // - `SZL` - Swazi Lilangeni - // - `SEK` - Swedish Krona - // - `CHF` - Swiss Franc - // - `SYP` - Syrian Pound - // - `STN` - São Tomé & Príncipe Dobra - // - `STD` - São Tomé & Príncipe Dobra (1977–2017) - // - `TVD` - TVD - // - `TJR` - Tajikistani Ruble - // - `TJS` - Tajikistani Somoni - // - `TZS` - Tanzanian Shilling - // - `XTS` - Testing Currency Code - // - `THB` - Thai Baht - // - `XXX` - The codes assigned for transactions where no currency is involved - // - `TPE` - Timorese Escudo - // - `TOP` - Tongan Paʻanga - // - `TTD` - Trinidad & Tobago Dollar - // - `TND` - Tunisian Dinar - // - `TRY` - Turkish Lira - // - `TRL` - Turkish Lira (1922–2005) - // - `TMT` - Turkmenistani Manat - // - `TMM` - Turkmenistani Manat (1993–2009) - // - `USD` - US Dollar - // - `USN` - US Dollar (Next day) - // - `USS` - US Dollar (Same day) - // - `UGX` - Ugandan Shilling - // - `UGS` - Ugandan Shilling (1966–1987) - // - `UAH` - Ukrainian Hryvnia - // - `UAK` - Ukrainian Karbovanets - // - `AED` - United Arab Emirates Dirham - // - `UYW` - Uruguayan Nominal Wage Index Unit - // - `UYU` - Uruguayan Peso - // - `UYP` - Uruguayan Peso (1975–1993) - // - `UYI` - Uruguayan Peso (Indexed Units) - // - `UZS` - Uzbekistani Som - // - `VUV` - Vanuatu Vatu - // - `VES` - Venezuelan Bolívar - // - `VEB` - Venezuelan Bolívar (1871–2008) - // - `VEF` - Venezuelan Bolívar (2008–2018) - // - `VND` - Vietnamese Dong - // - `VNN` - Vietnamese Dong (1978–1985) - // - `CHE` - WIR Euro - // - `CHW` - WIR Franc - // - `XOF` - West African CFA Franc - // - `YDD` - Yemeni Dinar - // - `YER` - Yemeni Rial - // - `YUN` - Yugoslavian Convertible Dinar (1990–1992) - // - `YUD` - Yugoslavian Hard Dinar (1966–1990) - // - `YUM` - Yugoslavian New Dinar (1994–2002) - // - `YUR` - Yugoslavian Reformed Dinar (1992–1993) - // - `ZWN` - ZWN - // - `ZRN` - Zairean New Zaire (1993–1998) - // - `ZRZ` - Zairean Zaire (1971–1993) - // - `ZMW` - Zambian Kwacha - // - `ZMK` - Zambian Kwacha (1968–2012) - // - `ZWD` - Zimbabwean Dollar (1980–2008) - // - `ZWR` - Zimbabwean Dollar (2008) - // - `ZWL` - Zimbabwean Dollar (2009) - Currency *VendorCreditCurrency `json:"currency,omitempty"` - // The vendor credit's exchange rate. - ExchangeRate *string `json:"exchange_rate,omitempty"` - // If the transaction is inclusive or exclusive of tax. `True` if inclusive, `False` if exclusive. - InclusiveOfTax *bool `json:"inclusive_of_tax,omitempty"` - // The company the vendor credit belongs to. - Company *VendorCreditCompany `json:"company,omitempty"` - Lines []*VendorCreditLine `json:"lines,omitempty"` - TrackingCategories []*VendorCreditTrackingCategoriesItem `json:"tracking_categories,omitempty"` - // A list of VendorCredit Applied to Lines objects. - AppliedToLines []*VendorCreditApplyLineForVendorCredit `json:"applied_to_lines,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - // The accounting period that the VendorCredit was generated in. - AccountingPeriod *VendorCreditAccountingPeriod `json:"accounting_period,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` - - _rawJSON json.RawMessage +func (v *VendorCredit) GetExtraProperties() map[string]interface{} { + return v.extraProperties } func (v *VendorCredit) UnmarshalJSON(data []byte) error { - type unmarshaler VendorCredit - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { + type embed VendorCredit + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + TransactionDate *internal.DateTime `json:"transaction_date,omitempty"` + }{ + embed: embed(*v), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *v = VendorCredit(unmarshaler.embed) + v.CreatedAt = unmarshaler.CreatedAt.TimePtr() + v.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + v.TransactionDate = unmarshaler.TransactionDate.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *v) + if err != nil { return err } - *v = VendorCredit(value) - v._rawJSON = json.RawMessage(data) + v.extraProperties = extraProperties + v.rawJSON = json.RawMessage(data) return nil } +func (v *VendorCredit) MarshalJSON() ([]byte, error) { + type embed VendorCredit + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + TransactionDate *internal.DateTime `json:"transaction_date,omitempty"` + }{ + embed: embed(*v), + CreatedAt: internal.NewOptionalDateTime(v.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(v.ModifiedAt), + TransactionDate: internal.NewOptionalDateTime(v.TransactionDate), + } + return json.Marshal(marshaler) +} + func (v *VendorCredit) String() string { - if len(v._rawJSON) > 0 { - if value, err := core.StringifyJSON(v._rawJSON); err == nil { + if len(v.rawJSON) > 0 { + if value, err := internal.StringifyJSON(v.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(v); err == nil { + if value, err := internal.StringifyJSON(v); err == nil { return value } return fmt.Sprintf("%#v", v) @@ -45230,29 +22732,36 @@ func (v *VendorCredit) String() string { // The accounting period that the VendorCredit was generated in. type VendorCreditAccountingPeriod struct { - typeName string String string AccountingPeriod *AccountingPeriod + + typ string } -func NewVendorCreditAccountingPeriodFromString(value string) *VendorCreditAccountingPeriod { - return &VendorCreditAccountingPeriod{typeName: "string", String: value} +func (v *VendorCreditAccountingPeriod) GetString() string { + if v == nil { + return "" + } + return v.String } -func NewVendorCreditAccountingPeriodFromAccountingPeriod(value *AccountingPeriod) *VendorCreditAccountingPeriod { - return &VendorCreditAccountingPeriod{typeName: "accountingPeriod", AccountingPeriod: value} +func (v *VendorCreditAccountingPeriod) GetAccountingPeriod() *AccountingPeriod { + if v == nil { + return nil + } + return v.AccountingPeriod } func (v *VendorCreditAccountingPeriod) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - v.typeName = "string" + v.typ = "String" v.String = valueString return nil } valueAccountingPeriod := new(AccountingPeriod) if err := json.Unmarshal(data, &valueAccountingPeriod); err == nil { - v.typeName = "accountingPeriod" + v.typ = "AccountingPeriod" v.AccountingPeriod = valueAccountingPeriod return nil } @@ -45260,14 +22769,13 @@ func (v *VendorCreditAccountingPeriod) UnmarshalJSON(data []byte) error { } func (v VendorCreditAccountingPeriod) MarshalJSON() ([]byte, error) { - switch v.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", v.typeName, v) - case "string": + if v.typ == "String" || v.String != "" { return json.Marshal(v.String) - case "accountingPeriod": + } + if v.typ == "AccountingPeriod" || v.AccountingPeriod != nil { return json.Marshal(v.AccountingPeriod) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", v) } type VendorCreditAccountingPeriodVisitor interface { @@ -45276,90 +22784,178 @@ type VendorCreditAccountingPeriodVisitor interface { } func (v *VendorCreditAccountingPeriod) Accept(visitor VendorCreditAccountingPeriodVisitor) error { - switch v.typeName { - default: - return fmt.Errorf("invalid type %s in %T", v.typeName, v) - case "string": + if v.typ == "String" || v.String != "" { return visitor.VisitString(v.String) - case "accountingPeriod": + } + if v.typ == "AccountingPeriod" || v.AccountingPeriod != nil { return visitor.VisitAccountingPeriod(v.AccountingPeriod) } + return fmt.Errorf("type %T does not include a non-empty union type", v) } // # The VendorCreditApplyLine Object -// // ### Description -// // The `VendorCreditApplyLine` object is used to represent a applied vendor credit. // // ### Usage Example -// // Fetch from the `GET VendorCredit` endpoint and view the vendor credit's applied to lines. type VendorCreditApplyLineForInvoice struct { // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - VendorCredit *VendorCreditApplyLineForInvoiceVendorCredit `json:"vendor_credit,omitempty"` + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + VendorCredit *VendorCreditApplyLineForInvoiceVendorCredit `json:"vendor_credit,omitempty" url:"vendor_credit,omitempty"` // Date that the vendor credit is applied to the invoice. - AppliedDate *time.Time `json:"applied_date,omitempty"` + AppliedDate *time.Time `json:"applied_date,omitempty" url:"applied_date,omitempty"` // The amount of the VendorCredit applied to the invoice. - AppliedAmount *string `json:"applied_amount,omitempty"` + AppliedAmount *string `json:"applied_amount,omitempty" url:"applied_amount,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (v *VendorCreditApplyLineForInvoice) GetRemoteId() *string { + if v == nil { + return nil + } + return v.RemoteId +} + +func (v *VendorCreditApplyLineForInvoice) GetCreatedAt() *time.Time { + if v == nil { + return nil + } + return v.CreatedAt +} + +func (v *VendorCreditApplyLineForInvoice) GetModifiedAt() *time.Time { + if v == nil { + return nil + } + return v.ModifiedAt +} + +func (v *VendorCreditApplyLineForInvoice) GetVendorCredit() *VendorCreditApplyLineForInvoiceVendorCredit { + if v == nil { + return nil + } + return v.VendorCredit +} + +func (v *VendorCreditApplyLineForInvoice) GetAppliedDate() *time.Time { + if v == nil { + return nil + } + return v.AppliedDate +} + +func (v *VendorCreditApplyLineForInvoice) GetAppliedAmount() *string { + if v == nil { + return nil + } + return v.AppliedAmount +} + +func (v *VendorCreditApplyLineForInvoice) GetRemoteWasDeleted() *bool { + if v == nil { + return nil + } + return v.RemoteWasDeleted +} - _rawJSON json.RawMessage +func (v *VendorCreditApplyLineForInvoice) GetExtraProperties() map[string]interface{} { + return v.extraProperties } func (v *VendorCreditApplyLineForInvoice) UnmarshalJSON(data []byte) error { - type unmarshaler VendorCreditApplyLineForInvoice - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { + type embed VendorCreditApplyLineForInvoice + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + AppliedDate *internal.DateTime `json:"applied_date,omitempty"` + }{ + embed: embed(*v), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *v = VendorCreditApplyLineForInvoice(unmarshaler.embed) + v.CreatedAt = unmarshaler.CreatedAt.TimePtr() + v.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + v.AppliedDate = unmarshaler.AppliedDate.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *v) + if err != nil { return err } - *v = VendorCreditApplyLineForInvoice(value) - v._rawJSON = json.RawMessage(data) + v.extraProperties = extraProperties + v.rawJSON = json.RawMessage(data) return nil } +func (v *VendorCreditApplyLineForInvoice) MarshalJSON() ([]byte, error) { + type embed VendorCreditApplyLineForInvoice + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + AppliedDate *internal.DateTime `json:"applied_date,omitempty"` + }{ + embed: embed(*v), + CreatedAt: internal.NewOptionalDateTime(v.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(v.ModifiedAt), + AppliedDate: internal.NewOptionalDateTime(v.AppliedDate), + } + return json.Marshal(marshaler) +} + func (v *VendorCreditApplyLineForInvoice) String() string { - if len(v._rawJSON) > 0 { - if value, err := core.StringifyJSON(v._rawJSON); err == nil { + if len(v.rawJSON) > 0 { + if value, err := internal.StringifyJSON(v.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(v); err == nil { + if value, err := internal.StringifyJSON(v); err == nil { return value } return fmt.Sprintf("%#v", v) } type VendorCreditApplyLineForInvoiceVendorCredit struct { - typeName string String string VendorCredit *VendorCredit + + typ string } -func NewVendorCreditApplyLineForInvoiceVendorCreditFromString(value string) *VendorCreditApplyLineForInvoiceVendorCredit { - return &VendorCreditApplyLineForInvoiceVendorCredit{typeName: "string", String: value} +func (v *VendorCreditApplyLineForInvoiceVendorCredit) GetString() string { + if v == nil { + return "" + } + return v.String } -func NewVendorCreditApplyLineForInvoiceVendorCreditFromVendorCredit(value *VendorCredit) *VendorCreditApplyLineForInvoiceVendorCredit { - return &VendorCreditApplyLineForInvoiceVendorCredit{typeName: "vendorCredit", VendorCredit: value} +func (v *VendorCreditApplyLineForInvoiceVendorCredit) GetVendorCredit() *VendorCredit { + if v == nil { + return nil + } + return v.VendorCredit } func (v *VendorCreditApplyLineForInvoiceVendorCredit) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - v.typeName = "string" + v.typ = "String" v.String = valueString return nil } valueVendorCredit := new(VendorCredit) if err := json.Unmarshal(data, &valueVendorCredit); err == nil { - v.typeName = "vendorCredit" + v.typ = "VendorCredit" v.VendorCredit = valueVendorCredit return nil } @@ -45367,14 +22963,13 @@ func (v *VendorCreditApplyLineForInvoiceVendorCredit) UnmarshalJSON(data []byte) } func (v VendorCreditApplyLineForInvoiceVendorCredit) MarshalJSON() ([]byte, error) { - switch v.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", v.typeName, v) - case "string": + if v.typ == "String" || v.String != "" { return json.Marshal(v.String) - case "vendorCredit": + } + if v.typ == "VendorCredit" || v.VendorCredit != nil { return json.Marshal(v.VendorCredit) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", v) } type VendorCreditApplyLineForInvoiceVendorCreditVisitor interface { @@ -45383,251 +22978,241 @@ type VendorCreditApplyLineForInvoiceVendorCreditVisitor interface { } func (v *VendorCreditApplyLineForInvoiceVendorCredit) Accept(visitor VendorCreditApplyLineForInvoiceVendorCreditVisitor) error { - switch v.typeName { - default: - return fmt.Errorf("invalid type %s in %T", v.typeName, v) - case "string": + if v.typ == "String" || v.String != "" { return visitor.VisitString(v.String) - case "vendorCredit": + } + if v.typ == "VendorCredit" || v.VendorCredit != nil { return visitor.VisitVendorCredit(v.VendorCredit) } + return fmt.Errorf("type %T does not include a non-empty union type", v) } // # The VendorCreditApplyLine Object -// // ### Description -// // The `VendorCreditApplyLine` object is used to represent a applied vendor credit. // // ### Usage Example -// // Fetch from the `GET VendorCredit` endpoint and view the vendor credit's applied to lines. type VendorCreditApplyLineForVendorCredit struct { // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - Invoice *VendorCreditApplyLineForVendorCreditInvoice `json:"invoice,omitempty"` + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + Invoice *VendorCreditApplyLineForVendorCreditInvoice `json:"invoice,omitempty" url:"invoice,omitempty"` // Date that the vendor credit is applied to the invoice. - AppliedDate *time.Time `json:"applied_date,omitempty"` + AppliedDate *time.Time `json:"applied_date,omitempty" url:"applied_date,omitempty"` // The amount of the VendorCredit applied to the invoice. - AppliedAmount *string `json:"applied_amount,omitempty"` + AppliedAmount *string `json:"applied_amount,omitempty" url:"applied_amount,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (v *VendorCreditApplyLineForVendorCredit) UnmarshalJSON(data []byte) error { - type unmarshaler VendorCreditApplyLineForVendorCredit - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (v *VendorCreditApplyLineForVendorCredit) GetRemoteId() *string { + if v == nil { + return nil } - *v = VendorCreditApplyLineForVendorCredit(value) - v._rawJSON = json.RawMessage(data) - return nil + return v.RemoteId } -func (v *VendorCreditApplyLineForVendorCredit) String() string { - if len(v._rawJSON) > 0 { - if value, err := core.StringifyJSON(v._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(v); err == nil { - return value +func (v *VendorCreditApplyLineForVendorCredit) GetCreatedAt() *time.Time { + if v == nil { + return nil } - return fmt.Sprintf("%#v", v) -} - -type VendorCreditApplyLineForVendorCreditInvoice struct { - typeName string - String string - Invoice *Invoice -} - -func NewVendorCreditApplyLineForVendorCreditInvoiceFromString(value string) *VendorCreditApplyLineForVendorCreditInvoice { - return &VendorCreditApplyLineForVendorCreditInvoice{typeName: "string", String: value} -} - -func NewVendorCreditApplyLineForVendorCreditInvoiceFromInvoice(value *Invoice) *VendorCreditApplyLineForVendorCreditInvoice { - return &VendorCreditApplyLineForVendorCreditInvoice{typeName: "invoice", Invoice: value} + return v.CreatedAt } -func (v *VendorCreditApplyLineForVendorCreditInvoice) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - v.typeName = "string" - v.String = valueString +func (v *VendorCreditApplyLineForVendorCredit) GetModifiedAt() *time.Time { + if v == nil { return nil } - valueInvoice := new(Invoice) - if err := json.Unmarshal(data, &valueInvoice); err == nil { - v.typeName = "invoice" - v.Invoice = valueInvoice + return v.ModifiedAt +} + +func (v *VendorCreditApplyLineForVendorCredit) GetInvoice() *VendorCreditApplyLineForVendorCreditInvoice { + if v == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, v) + return v.Invoice } -func (v VendorCreditApplyLineForVendorCreditInvoice) MarshalJSON() ([]byte, error) { - switch v.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", v.typeName, v) - case "string": - return json.Marshal(v.String) - case "invoice": - return json.Marshal(v.Invoice) +func (v *VendorCreditApplyLineForVendorCredit) GetAppliedDate() *time.Time { + if v == nil { + return nil } + return v.AppliedDate } -type VendorCreditApplyLineForVendorCreditInvoiceVisitor interface { - VisitString(string) error - VisitInvoice(*Invoice) error +func (v *VendorCreditApplyLineForVendorCredit) GetAppliedAmount() *string { + if v == nil { + return nil + } + return v.AppliedAmount } -func (v *VendorCreditApplyLineForVendorCreditInvoice) Accept(visitor VendorCreditApplyLineForVendorCreditInvoiceVisitor) error { - switch v.typeName { - default: - return fmt.Errorf("invalid type %s in %T", v.typeName, v) - case "string": - return visitor.VisitString(v.String) - case "invoice": - return visitor.VisitInvoice(v.Invoice) +func (v *VendorCreditApplyLineForVendorCredit) GetRemoteWasDeleted() *bool { + if v == nil { + return nil } + return v.RemoteWasDeleted } -// # The VendorCreditApplyLine Object -// -// ### Description -// -// The `VendorCreditApplyLine` object is used to represent a applied vendor credit. -// -// ### Usage Example -// -// Fetch from the `GET VendorCredit` endpoint and view the vendor credit's applied to lines. -type VendorCreditApplyLineForVendorCreditRequest struct { - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - Invoice *VendorCreditApplyLineForVendorCreditRequestInvoice `json:"invoice,omitempty"` - // Date that the vendor credit is applied to the invoice. - AppliedDate *time.Time `json:"applied_date,omitempty"` - // The amount of the VendorCredit applied to the invoice. - AppliedAmount *string `json:"applied_amount,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` - - _rawJSON json.RawMessage +func (v *VendorCreditApplyLineForVendorCredit) GetExtraProperties() map[string]interface{} { + return v.extraProperties } -func (v *VendorCreditApplyLineForVendorCreditRequest) UnmarshalJSON(data []byte) error { - type unmarshaler VendorCreditApplyLineForVendorCreditRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { +func (v *VendorCreditApplyLineForVendorCredit) UnmarshalJSON(data []byte) error { + type embed VendorCreditApplyLineForVendorCredit + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + AppliedDate *internal.DateTime `json:"applied_date,omitempty"` + }{ + embed: embed(*v), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *v = VendorCreditApplyLineForVendorCredit(unmarshaler.embed) + v.CreatedAt = unmarshaler.CreatedAt.TimePtr() + v.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + v.AppliedDate = unmarshaler.AppliedDate.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *v) + if err != nil { return err } - *v = VendorCreditApplyLineForVendorCreditRequest(value) - v._rawJSON = json.RawMessage(data) + v.extraProperties = extraProperties + v.rawJSON = json.RawMessage(data) return nil } -func (v *VendorCreditApplyLineForVendorCreditRequest) String() string { - if len(v._rawJSON) > 0 { - if value, err := core.StringifyJSON(v._rawJSON); err == nil { +func (v *VendorCreditApplyLineForVendorCredit) MarshalJSON() ([]byte, error) { + type embed VendorCreditApplyLineForVendorCredit + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + AppliedDate *internal.DateTime `json:"applied_date,omitempty"` + }{ + embed: embed(*v), + CreatedAt: internal.NewOptionalDateTime(v.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(v.ModifiedAt), + AppliedDate: internal.NewOptionalDateTime(v.AppliedDate), + } + return json.Marshal(marshaler) +} + +func (v *VendorCreditApplyLineForVendorCredit) String() string { + if len(v.rawJSON) > 0 { + if value, err := internal.StringifyJSON(v.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(v); err == nil { + if value, err := internal.StringifyJSON(v); err == nil { return value } return fmt.Sprintf("%#v", v) } -type VendorCreditApplyLineForVendorCreditRequestInvoice struct { - typeName string - String string - Invoice *Invoice +type VendorCreditApplyLineForVendorCreditInvoice struct { + String string + Invoice *Invoice + + typ string } -func NewVendorCreditApplyLineForVendorCreditRequestInvoiceFromString(value string) *VendorCreditApplyLineForVendorCreditRequestInvoice { - return &VendorCreditApplyLineForVendorCreditRequestInvoice{typeName: "string", String: value} +func (v *VendorCreditApplyLineForVendorCreditInvoice) GetString() string { + if v == nil { + return "" + } + return v.String } -func NewVendorCreditApplyLineForVendorCreditRequestInvoiceFromInvoice(value *Invoice) *VendorCreditApplyLineForVendorCreditRequestInvoice { - return &VendorCreditApplyLineForVendorCreditRequestInvoice{typeName: "invoice", Invoice: value} +func (v *VendorCreditApplyLineForVendorCreditInvoice) GetInvoice() *Invoice { + if v == nil { + return nil + } + return v.Invoice } -func (v *VendorCreditApplyLineForVendorCreditRequestInvoice) UnmarshalJSON(data []byte) error { +func (v *VendorCreditApplyLineForVendorCreditInvoice) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - v.typeName = "string" + v.typ = "String" v.String = valueString return nil } valueInvoice := new(Invoice) if err := json.Unmarshal(data, &valueInvoice); err == nil { - v.typeName = "invoice" + v.typ = "Invoice" v.Invoice = valueInvoice return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, v) } -func (v VendorCreditApplyLineForVendorCreditRequestInvoice) MarshalJSON() ([]byte, error) { - switch v.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", v.typeName, v) - case "string": +func (v VendorCreditApplyLineForVendorCreditInvoice) MarshalJSON() ([]byte, error) { + if v.typ == "String" || v.String != "" { return json.Marshal(v.String) - case "invoice": + } + if v.typ == "Invoice" || v.Invoice != nil { return json.Marshal(v.Invoice) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", v) } -type VendorCreditApplyLineForVendorCreditRequestInvoiceVisitor interface { +type VendorCreditApplyLineForVendorCreditInvoiceVisitor interface { VisitString(string) error VisitInvoice(*Invoice) error } -func (v *VendorCreditApplyLineForVendorCreditRequestInvoice) Accept(visitor VendorCreditApplyLineForVendorCreditRequestInvoiceVisitor) error { - switch v.typeName { - default: - return fmt.Errorf("invalid type %s in %T", v.typeName, v) - case "string": +func (v *VendorCreditApplyLineForVendorCreditInvoice) Accept(visitor VendorCreditApplyLineForVendorCreditInvoiceVisitor) error { + if v.typ == "String" || v.String != "" { return visitor.VisitString(v.String) - case "invoice": + } + if v.typ == "Invoice" || v.Invoice != nil { return visitor.VisitInvoice(v.Invoice) } + return fmt.Errorf("type %T does not include a non-empty union type", v) } // The company the vendor credit belongs to. type VendorCreditCompany struct { - typeName string String string CompanyInfo *CompanyInfo + + typ string } -func NewVendorCreditCompanyFromString(value string) *VendorCreditCompany { - return &VendorCreditCompany{typeName: "string", String: value} +func (v *VendorCreditCompany) GetString() string { + if v == nil { + return "" + } + return v.String } -func NewVendorCreditCompanyFromCompanyInfo(value *CompanyInfo) *VendorCreditCompany { - return &VendorCreditCompany{typeName: "companyInfo", CompanyInfo: value} +func (v *VendorCreditCompany) GetCompanyInfo() *CompanyInfo { + if v == nil { + return nil + } + return v.CompanyInfo } func (v *VendorCreditCompany) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - v.typeName = "string" + v.typ = "String" v.String = valueString return nil } valueCompanyInfo := new(CompanyInfo) if err := json.Unmarshal(data, &valueCompanyInfo); err == nil { - v.typeName = "companyInfo" + v.typ = "CompanyInfo" v.CompanyInfo = valueCompanyInfo return nil } @@ -45635,14 +23220,13 @@ func (v *VendorCreditCompany) UnmarshalJSON(data []byte) error { } func (v VendorCreditCompany) MarshalJSON() ([]byte, error) { - switch v.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", v.typeName, v) - case "string": + if v.typ == "String" || v.String != "" { return json.Marshal(v.String) - case "companyInfo": + } + if v.typ == "CompanyInfo" || v.CompanyInfo != nil { return json.Marshal(v.CompanyInfo) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", v) } type VendorCreditCompanyVisitor interface { @@ -45651,348 +23235,354 @@ type VendorCreditCompanyVisitor interface { } func (v *VendorCreditCompany) Accept(visitor VendorCreditCompanyVisitor) error { - switch v.typeName { - default: - return fmt.Errorf("invalid type %s in %T", v.typeName, v) - case "string": + if v.typ == "String" || v.String != "" { return visitor.VisitString(v.String) - case "companyInfo": + } + if v.typ == "CompanyInfo" || v.CompanyInfo != nil { return visitor.VisitCompanyInfo(v.CompanyInfo) } + return fmt.Errorf("type %T does not include a non-empty union type", v) } // The vendor credit's currency. // -// - `XUA` - ADB Unit of Account -// - `AFN` - Afghan Afghani -// - `AFA` - Afghan Afghani (1927–2002) -// - `ALL` - Albanian Lek -// - `ALK` - Albanian Lek (1946–1965) -// - `DZD` - Algerian Dinar -// - `ADP` - Andorran Peseta -// - `AOA` - Angolan Kwanza -// - `AOK` - Angolan Kwanza (1977–1991) -// - `AON` - Angolan New Kwanza (1990–2000) -// - `AOR` - Angolan Readjusted Kwanza (1995–1999) -// - `ARA` - Argentine Austral -// - `ARS` - Argentine Peso -// - `ARM` - Argentine Peso (1881–1970) -// - `ARP` - Argentine Peso (1983–1985) -// - `ARL` - Argentine Peso Ley (1970–1983) -// - `AMD` - Armenian Dram -// - `AWG` - Aruban Florin -// - `AUD` - Australian Dollar -// - `ATS` - Austrian Schilling -// - `AZN` - Azerbaijani Manat -// - `AZM` - Azerbaijani Manat (1993–2006) -// - `BSD` - Bahamian Dollar -// - `BHD` - Bahraini Dinar -// - `BDT` - Bangladeshi Taka -// - `BBD` - Barbadian Dollar -// - `BYN` - Belarusian Ruble -// - `BYB` - Belarusian Ruble (1994–1999) -// - `BYR` - Belarusian Ruble (2000–2016) -// - `BEF` - Belgian Franc -// - `BEC` - Belgian Franc (convertible) -// - `BEL` - Belgian Franc (financial) -// - `BZD` - Belize Dollar -// - `BMD` - Bermudan Dollar -// - `BTN` - Bhutanese Ngultrum -// - `BOB` - Bolivian Boliviano -// - `BOL` - Bolivian Boliviano (1863–1963) -// - `BOV` - Bolivian Mvdol -// - `BOP` - Bolivian Peso -// - `BAM` - Bosnia-Herzegovina Convertible Mark -// - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) -// - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) -// - `BWP` - Botswanan Pula -// - `BRC` - Brazilian Cruzado (1986–1989) -// - `BRZ` - Brazilian Cruzeiro (1942–1967) -// - `BRE` - Brazilian Cruzeiro (1990–1993) -// - `BRR` - Brazilian Cruzeiro (1993–1994) -// - `BRN` - Brazilian New Cruzado (1989–1990) -// - `BRB` - Brazilian New Cruzeiro (1967–1986) -// - `BRL` - Brazilian Real -// - `GBP` - British Pound -// - `BND` - Brunei Dollar -// - `BGL` - Bulgarian Hard Lev -// - `BGN` - Bulgarian Lev -// - `BGO` - Bulgarian Lev (1879–1952) -// - `BGM` - Bulgarian Socialist Lev -// - `BUK` - Burmese Kyat -// - `BIF` - Burundian Franc -// - `XPF` - CFP Franc -// - `KHR` - Cambodian Riel -// - `CAD` - Canadian Dollar -// - `CVE` - Cape Verdean Escudo -// - `KYD` - Cayman Islands Dollar -// - `XAF` - Central African CFA Franc -// - `CLE` - Chilean Escudo -// - `CLP` - Chilean Peso -// - `CLF` - Chilean Unit of Account (UF) -// - `CNX` - Chinese People’s Bank Dollar -// - `CNY` - Chinese Yuan -// - `CNH` - Chinese Yuan (offshore) -// - `COP` - Colombian Peso -// - `COU` - Colombian Real Value Unit -// - `KMF` - Comorian Franc -// - `CDF` - Congolese Franc -// - `CRC` - Costa Rican Colón -// - `HRD` - Croatian Dinar -// - `HRK` - Croatian Kuna -// - `CUC` - Cuban Convertible Peso -// - `CUP` - Cuban Peso -// - `CYP` - Cypriot Pound -// - `CZK` - Czech Koruna -// - `CSK` - Czechoslovak Hard Koruna -// - `DKK` - Danish Krone -// - `DJF` - Djiboutian Franc -// - `DOP` - Dominican Peso -// - `NLG` - Dutch Guilder -// - `XCD` - East Caribbean Dollar -// - `DDM` - East German Mark -// - `ECS` - Ecuadorian Sucre -// - `ECV` - Ecuadorian Unit of Constant Value -// - `EGP` - Egyptian Pound -// - `GQE` - Equatorial Guinean Ekwele -// - `ERN` - Eritrean Nakfa -// - `EEK` - Estonian Kroon -// - `ETB` - Ethiopian Birr -// - `EUR` - Euro -// - `XBA` - European Composite Unit -// - `XEU` - European Currency Unit -// - `XBB` - European Monetary Unit -// - `XBC` - European Unit of Account (XBC) -// - `XBD` - European Unit of Account (XBD) -// - `FKP` - Falkland Islands Pound -// - `FJD` - Fijian Dollar -// - `FIM` - Finnish Markka -// - `FRF` - French Franc -// - `XFO` - French Gold Franc -// - `XFU` - French UIC-Franc -// - `GMD` - Gambian Dalasi -// - `GEK` - Georgian Kupon Larit -// - `GEL` - Georgian Lari -// - `DEM` - German Mark -// - `GHS` - Ghanaian Cedi -// - `GHC` - Ghanaian Cedi (1979–2007) -// - `GIP` - Gibraltar Pound -// - `XAU` - Gold -// - `GRD` - Greek Drachma -// - `GTQ` - Guatemalan Quetzal -// - `GWP` - Guinea-Bissau Peso -// - `GNF` - Guinean Franc -// - `GNS` - Guinean Syli -// - `GYD` - Guyanaese Dollar -// - `HTG` - Haitian Gourde -// - `HNL` - Honduran Lempira -// - `HKD` - Hong Kong Dollar -// - `HUF` - Hungarian Forint -// - `IMP` - IMP -// - `ISK` - Icelandic Króna -// - `ISJ` - Icelandic Króna (1918–1981) -// - `INR` - Indian Rupee -// - `IDR` - Indonesian Rupiah -// - `IRR` - Iranian Rial -// - `IQD` - Iraqi Dinar -// - `IEP` - Irish Pound -// - `ILS` - Israeli New Shekel -// - `ILP` - Israeli Pound -// - `ILR` - Israeli Shekel (1980–1985) -// - `ITL` - Italian Lira -// - `JMD` - Jamaican Dollar -// - `JPY` - Japanese Yen -// - `JOD` - Jordanian Dinar -// - `KZT` - Kazakhstani Tenge -// - `KES` - Kenyan Shilling -// - `KWD` - Kuwaiti Dinar -// - `KGS` - Kyrgystani Som -// - `LAK` - Laotian Kip -// - `LVL` - Latvian Lats -// - `LVR` - Latvian Ruble -// - `LBP` - Lebanese Pound -// - `LSL` - Lesotho Loti -// - `LRD` - Liberian Dollar -// - `LYD` - Libyan Dinar -// - `LTL` - Lithuanian Litas -// - `LTT` - Lithuanian Talonas -// - `LUL` - Luxembourg Financial Franc -// - `LUC` - Luxembourgian Convertible Franc -// - `LUF` - Luxembourgian Franc -// - `MOP` - Macanese Pataca -// - `MKD` - Macedonian Denar -// - `MKN` - Macedonian Denar (1992–1993) -// - `MGA` - Malagasy Ariary -// - `MGF` - Malagasy Franc -// - `MWK` - Malawian Kwacha -// - `MYR` - Malaysian Ringgit -// - `MVR` - Maldivian Rufiyaa -// - `MVP` - Maldivian Rupee (1947–1981) -// - `MLF` - Malian Franc -// - `MTL` - Maltese Lira -// - `MTP` - Maltese Pound -// - `MRU` - Mauritanian Ouguiya -// - `MRO` - Mauritanian Ouguiya (1973–2017) -// - `MUR` - Mauritian Rupee -// - `MXV` - Mexican Investment Unit -// - `MXN` - Mexican Peso -// - `MXP` - Mexican Silver Peso (1861–1992) -// - `MDC` - Moldovan Cupon -// - `MDL` - Moldovan Leu -// - `MCF` - Monegasque Franc -// - `MNT` - Mongolian Tugrik -// - `MAD` - Moroccan Dirham -// - `MAF` - Moroccan Franc -// - `MZE` - Mozambican Escudo -// - `MZN` - Mozambican Metical -// - `MZM` - Mozambican Metical (1980–2006) -// - `MMK` - Myanmar Kyat -// - `NAD` - Namibian Dollar -// - `NPR` - Nepalese Rupee -// - `ANG` - Netherlands Antillean Guilder -// - `TWD` - New Taiwan Dollar -// - `NZD` - New Zealand Dollar -// - `NIO` - Nicaraguan Córdoba -// - `NIC` - Nicaraguan Córdoba (1988–1991) -// - `NGN` - Nigerian Naira -// - `KPW` - North Korean Won -// - `NOK` - Norwegian Krone -// - `OMR` - Omani Rial -// - `PKR` - Pakistani Rupee -// - `XPD` - Palladium -// - `PAB` - Panamanian Balboa -// - `PGK` - Papua New Guinean Kina -// - `PYG` - Paraguayan Guarani -// - `PEI` - Peruvian Inti -// - `PEN` - Peruvian Sol -// - `PES` - Peruvian Sol (1863–1965) -// - `PHP` - Philippine Peso -// - `XPT` - Platinum -// - `PLN` - Polish Zloty -// - `PLZ` - Polish Zloty (1950–1995) -// - `PTE` - Portuguese Escudo -// - `GWE` - Portuguese Guinea Escudo -// - `QAR` - Qatari Rial -// - `XRE` - RINET Funds -// - `RHD` - Rhodesian Dollar -// - `RON` - Romanian Leu -// - `ROL` - Romanian Leu (1952–2006) -// - `RUB` - Russian Ruble -// - `RUR` - Russian Ruble (1991–1998) -// - `RWF` - Rwandan Franc -// - `SVC` - Salvadoran Colón -// - `WST` - Samoan Tala -// - `SAR` - Saudi Riyal -// - `RSD` - Serbian Dinar -// - `CSD` - Serbian Dinar (2002–2006) -// - `SCR` - Seychellois Rupee -// - `SLL` - Sierra Leonean Leone -// - `XAG` - Silver -// - `SGD` - Singapore Dollar -// - `SKK` - Slovak Koruna -// - `SIT` - Slovenian Tolar -// - `SBD` - Solomon Islands Dollar -// - `SOS` - Somali Shilling -// - `ZAR` - South African Rand -// - `ZAL` - South African Rand (financial) -// - `KRH` - South Korean Hwan (1953–1962) -// - `KRW` - South Korean Won -// - `KRO` - South Korean Won (1945–1953) -// - `SSP` - South Sudanese Pound -// - `SUR` - Soviet Rouble -// - `ESP` - Spanish Peseta -// - `ESA` - Spanish Peseta (A account) -// - `ESB` - Spanish Peseta (convertible account) -// - `XDR` - Special Drawing Rights -// - `LKR` - Sri Lankan Rupee -// - `SHP` - St. Helena Pound -// - `XSU` - Sucre -// - `SDD` - Sudanese Dinar (1992–2007) -// - `SDG` - Sudanese Pound -// - `SDP` - Sudanese Pound (1957–1998) -// - `SRD` - Surinamese Dollar -// - `SRG` - Surinamese Guilder -// - `SZL` - Swazi Lilangeni -// - `SEK` - Swedish Krona -// - `CHF` - Swiss Franc -// - `SYP` - Syrian Pound -// - `STN` - São Tomé & Príncipe Dobra -// - `STD` - São Tomé & Príncipe Dobra (1977–2017) -// - `TVD` - TVD -// - `TJR` - Tajikistani Ruble -// - `TJS` - Tajikistani Somoni -// - `TZS` - Tanzanian Shilling -// - `XTS` - Testing Currency Code -// - `THB` - Thai Baht -// - `XXX` - The codes assigned for transactions where no currency is involved -// - `TPE` - Timorese Escudo -// - `TOP` - Tongan Paʻanga -// - `TTD` - Trinidad & Tobago Dollar -// - `TND` - Tunisian Dinar -// - `TRY` - Turkish Lira -// - `TRL` - Turkish Lira (1922–2005) -// - `TMT` - Turkmenistani Manat -// - `TMM` - Turkmenistani Manat (1993–2009) -// - `USD` - US Dollar -// - `USN` - US Dollar (Next day) -// - `USS` - US Dollar (Same day) -// - `UGX` - Ugandan Shilling -// - `UGS` - Ugandan Shilling (1966–1987) -// - `UAH` - Ukrainian Hryvnia -// - `UAK` - Ukrainian Karbovanets -// - `AED` - United Arab Emirates Dirham -// - `UYW` - Uruguayan Nominal Wage Index Unit -// - `UYU` - Uruguayan Peso -// - `UYP` - Uruguayan Peso (1975–1993) -// - `UYI` - Uruguayan Peso (Indexed Units) -// - `UZS` - Uzbekistani Som -// - `VUV` - Vanuatu Vatu -// - `VES` - Venezuelan Bolívar -// - `VEB` - Venezuelan Bolívar (1871–2008) -// - `VEF` - Venezuelan Bolívar (2008–2018) -// - `VND` - Vietnamese Dong -// - `VNN` - Vietnamese Dong (1978–1985) -// - `CHE` - WIR Euro -// - `CHW` - WIR Franc -// - `XOF` - West African CFA Franc -// - `YDD` - Yemeni Dinar -// - `YER` - Yemeni Rial -// - `YUN` - Yugoslavian Convertible Dinar (1990–1992) -// - `YUD` - Yugoslavian Hard Dinar (1966–1990) -// - `YUM` - Yugoslavian New Dinar (1994–2002) -// - `YUR` - Yugoslavian Reformed Dinar (1992–1993) -// - `ZWN` - ZWN -// - `ZRN` - Zairean New Zaire (1993–1998) -// - `ZRZ` - Zairean Zaire (1971–1993) -// - `ZMW` - Zambian Kwacha -// - `ZMK` - Zambian Kwacha (1968–2012) -// - `ZWD` - Zimbabwean Dollar (1980–2008) -// - `ZWR` - Zimbabwean Dollar (2008) -// - `ZWL` - Zimbabwean Dollar (2009) +// * `XUA` - ADB Unit of Account +// * `AFN` - Afghan Afghani +// * `AFA` - Afghan Afghani (1927–2002) +// * `ALL` - Albanian Lek +// * `ALK` - Albanian Lek (1946–1965) +// * `DZD` - Algerian Dinar +// * `ADP` - Andorran Peseta +// * `AOA` - Angolan Kwanza +// * `AOK` - Angolan Kwanza (1977–1991) +// * `AON` - Angolan New Kwanza (1990–2000) +// * `AOR` - Angolan Readjusted Kwanza (1995–1999) +// * `ARA` - Argentine Austral +// * `ARS` - Argentine Peso +// * `ARM` - Argentine Peso (1881–1970) +// * `ARP` - Argentine Peso (1983–1985) +// * `ARL` - Argentine Peso Ley (1970–1983) +// * `AMD` - Armenian Dram +// * `AWG` - Aruban Florin +// * `AUD` - Australian Dollar +// * `ATS` - Austrian Schilling +// * `AZN` - Azerbaijani Manat +// * `AZM` - Azerbaijani Manat (1993–2006) +// * `BSD` - Bahamian Dollar +// * `BHD` - Bahraini Dinar +// * `BDT` - Bangladeshi Taka +// * `BBD` - Barbadian Dollar +// * `BYN` - Belarusian Ruble +// * `BYB` - Belarusian Ruble (1994–1999) +// * `BYR` - Belarusian Ruble (2000–2016) +// * `BEF` - Belgian Franc +// * `BEC` - Belgian Franc (convertible) +// * `BEL` - Belgian Franc (financial) +// * `BZD` - Belize Dollar +// * `BMD` - Bermudan Dollar +// * `BTN` - Bhutanese Ngultrum +// * `BOB` - Bolivian Boliviano +// * `BOL` - Bolivian Boliviano (1863–1963) +// * `BOV` - Bolivian Mvdol +// * `BOP` - Bolivian Peso +// * `BAM` - Bosnia-Herzegovina Convertible Mark +// * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) +// * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) +// * `BWP` - Botswanan Pula +// * `BRC` - Brazilian Cruzado (1986–1989) +// * `BRZ` - Brazilian Cruzeiro (1942–1967) +// * `BRE` - Brazilian Cruzeiro (1990–1993) +// * `BRR` - Brazilian Cruzeiro (1993–1994) +// * `BRN` - Brazilian New Cruzado (1989–1990) +// * `BRB` - Brazilian New Cruzeiro (1967–1986) +// * `BRL` - Brazilian Real +// * `GBP` - British Pound +// * `BND` - Brunei Dollar +// * `BGL` - Bulgarian Hard Lev +// * `BGN` - Bulgarian Lev +// * `BGO` - Bulgarian Lev (1879–1952) +// * `BGM` - Bulgarian Socialist Lev +// * `BUK` - Burmese Kyat +// * `BIF` - Burundian Franc +// * `XPF` - CFP Franc +// * `KHR` - Cambodian Riel +// * `CAD` - Canadian Dollar +// * `CVE` - Cape Verdean Escudo +// * `KYD` - Cayman Islands Dollar +// * `XAF` - Central African CFA Franc +// * `CLE` - Chilean Escudo +// * `CLP` - Chilean Peso +// * `CLF` - Chilean Unit of Account (UF) +// * `CNX` - Chinese People’s Bank Dollar +// * `CNY` - Chinese Yuan +// * `CNH` - Chinese Yuan (offshore) +// * `COP` - Colombian Peso +// * `COU` - Colombian Real Value Unit +// * `KMF` - Comorian Franc +// * `CDF` - Congolese Franc +// * `CRC` - Costa Rican Colón +// * `HRD` - Croatian Dinar +// * `HRK` - Croatian Kuna +// * `CUC` - Cuban Convertible Peso +// * `CUP` - Cuban Peso +// * `CYP` - Cypriot Pound +// * `CZK` - Czech Koruna +// * `CSK` - Czechoslovak Hard Koruna +// * `DKK` - Danish Krone +// * `DJF` - Djiboutian Franc +// * `DOP` - Dominican Peso +// * `NLG` - Dutch Guilder +// * `XCD` - East Caribbean Dollar +// * `DDM` - East German Mark +// * `ECS` - Ecuadorian Sucre +// * `ECV` - Ecuadorian Unit of Constant Value +// * `EGP` - Egyptian Pound +// * `GQE` - Equatorial Guinean Ekwele +// * `ERN` - Eritrean Nakfa +// * `EEK` - Estonian Kroon +// * `ETB` - Ethiopian Birr +// * `EUR` - Euro +// * `XBA` - European Composite Unit +// * `XEU` - European Currency Unit +// * `XBB` - European Monetary Unit +// * `XBC` - European Unit of Account (XBC) +// * `XBD` - European Unit of Account (XBD) +// * `FKP` - Falkland Islands Pound +// * `FJD` - Fijian Dollar +// * `FIM` - Finnish Markka +// * `FRF` - French Franc +// * `XFO` - French Gold Franc +// * `XFU` - French UIC-Franc +// * `GMD` - Gambian Dalasi +// * `GEK` - Georgian Kupon Larit +// * `GEL` - Georgian Lari +// * `DEM` - German Mark +// * `GHS` - Ghanaian Cedi +// * `GHC` - Ghanaian Cedi (1979–2007) +// * `GIP` - Gibraltar Pound +// * `XAU` - Gold +// * `GRD` - Greek Drachma +// * `GTQ` - Guatemalan Quetzal +// * `GWP` - Guinea-Bissau Peso +// * `GNF` - Guinean Franc +// * `GNS` - Guinean Syli +// * `GYD` - Guyanaese Dollar +// * `HTG` - Haitian Gourde +// * `HNL` - Honduran Lempira +// * `HKD` - Hong Kong Dollar +// * `HUF` - Hungarian Forint +// * `IMP` - IMP +// * `ISK` - Icelandic Króna +// * `ISJ` - Icelandic Króna (1918–1981) +// * `INR` - Indian Rupee +// * `IDR` - Indonesian Rupiah +// * `IRR` - Iranian Rial +// * `IQD` - Iraqi Dinar +// * `IEP` - Irish Pound +// * `ILS` - Israeli New Shekel +// * `ILP` - Israeli Pound +// * `ILR` - Israeli Shekel (1980–1985) +// * `ITL` - Italian Lira +// * `JMD` - Jamaican Dollar +// * `JPY` - Japanese Yen +// * `JOD` - Jordanian Dinar +// * `KZT` - Kazakhstani Tenge +// * `KES` - Kenyan Shilling +// * `KWD` - Kuwaiti Dinar +// * `KGS` - Kyrgystani Som +// * `LAK` - Laotian Kip +// * `LVL` - Latvian Lats +// * `LVR` - Latvian Ruble +// * `LBP` - Lebanese Pound +// * `LSL` - Lesotho Loti +// * `LRD` - Liberian Dollar +// * `LYD` - Libyan Dinar +// * `LTL` - Lithuanian Litas +// * `LTT` - Lithuanian Talonas +// * `LUL` - Luxembourg Financial Franc +// * `LUC` - Luxembourgian Convertible Franc +// * `LUF` - Luxembourgian Franc +// * `MOP` - Macanese Pataca +// * `MKD` - Macedonian Denar +// * `MKN` - Macedonian Denar (1992–1993) +// * `MGA` - Malagasy Ariary +// * `MGF` - Malagasy Franc +// * `MWK` - Malawian Kwacha +// * `MYR` - Malaysian Ringgit +// * `MVR` - Maldivian Rufiyaa +// * `MVP` - Maldivian Rupee (1947–1981) +// * `MLF` - Malian Franc +// * `MTL` - Maltese Lira +// * `MTP` - Maltese Pound +// * `MRU` - Mauritanian Ouguiya +// * `MRO` - Mauritanian Ouguiya (1973–2017) +// * `MUR` - Mauritian Rupee +// * `MXV` - Mexican Investment Unit +// * `MXN` - Mexican Peso +// * `MXP` - Mexican Silver Peso (1861–1992) +// * `MDC` - Moldovan Cupon +// * `MDL` - Moldovan Leu +// * `MCF` - Monegasque Franc +// * `MNT` - Mongolian Tugrik +// * `MAD` - Moroccan Dirham +// * `MAF` - Moroccan Franc +// * `MZE` - Mozambican Escudo +// * `MZN` - Mozambican Metical +// * `MZM` - Mozambican Metical (1980–2006) +// * `MMK` - Myanmar Kyat +// * `NAD` - Namibian Dollar +// * `NPR` - Nepalese Rupee +// * `ANG` - Netherlands Antillean Guilder +// * `TWD` - New Taiwan Dollar +// * `NZD` - New Zealand Dollar +// * `NIO` - Nicaraguan Córdoba +// * `NIC` - Nicaraguan Córdoba (1988–1991) +// * `NGN` - Nigerian Naira +// * `KPW` - North Korean Won +// * `NOK` - Norwegian Krone +// * `OMR` - Omani Rial +// * `PKR` - Pakistani Rupee +// * `XPD` - Palladium +// * `PAB` - Panamanian Balboa +// * `PGK` - Papua New Guinean Kina +// * `PYG` - Paraguayan Guarani +// * `PEI` - Peruvian Inti +// * `PEN` - Peruvian Sol +// * `PES` - Peruvian Sol (1863–1965) +// * `PHP` - Philippine Peso +// * `XPT` - Platinum +// * `PLN` - Polish Zloty +// * `PLZ` - Polish Zloty (1950–1995) +// * `PTE` - Portuguese Escudo +// * `GWE` - Portuguese Guinea Escudo +// * `QAR` - Qatari Rial +// * `XRE` - RINET Funds +// * `RHD` - Rhodesian Dollar +// * `RON` - Romanian Leu +// * `ROL` - Romanian Leu (1952–2006) +// * `RUB` - Russian Ruble +// * `RUR` - Russian Ruble (1991–1998) +// * `RWF` - Rwandan Franc +// * `SVC` - Salvadoran Colón +// * `WST` - Samoan Tala +// * `SAR` - Saudi Riyal +// * `RSD` - Serbian Dinar +// * `CSD` - Serbian Dinar (2002–2006) +// * `SCR` - Seychellois Rupee +// * `SLL` - Sierra Leonean Leone +// * `XAG` - Silver +// * `SGD` - Singapore Dollar +// * `SKK` - Slovak Koruna +// * `SIT` - Slovenian Tolar +// * `SBD` - Solomon Islands Dollar +// * `SOS` - Somali Shilling +// * `ZAR` - South African Rand +// * `ZAL` - South African Rand (financial) +// * `KRH` - South Korean Hwan (1953–1962) +// * `KRW` - South Korean Won +// * `KRO` - South Korean Won (1945–1953) +// * `SSP` - South Sudanese Pound +// * `SUR` - Soviet Rouble +// * `ESP` - Spanish Peseta +// * `ESA` - Spanish Peseta (A account) +// * `ESB` - Spanish Peseta (convertible account) +// * `XDR` - Special Drawing Rights +// * `LKR` - Sri Lankan Rupee +// * `SHP` - St. Helena Pound +// * `XSU` - Sucre +// * `SDD` - Sudanese Dinar (1992–2007) +// * `SDG` - Sudanese Pound +// * `SDP` - Sudanese Pound (1957–1998) +// * `SRD` - Surinamese Dollar +// * `SRG` - Surinamese Guilder +// * `SZL` - Swazi Lilangeni +// * `SEK` - Swedish Krona +// * `CHF` - Swiss Franc +// * `SYP` - Syrian Pound +// * `STN` - São Tomé & Príncipe Dobra +// * `STD` - São Tomé & Príncipe Dobra (1977–2017) +// * `TVD` - TVD +// * `TJR` - Tajikistani Ruble +// * `TJS` - Tajikistani Somoni +// * `TZS` - Tanzanian Shilling +// * `XTS` - Testing Currency Code +// * `THB` - Thai Baht +// * `XXX` - The codes assigned for transactions where no currency is involved +// * `TPE` - Timorese Escudo +// * `TOP` - Tongan Paʻanga +// * `TTD` - Trinidad & Tobago Dollar +// * `TND` - Tunisian Dinar +// * `TRY` - Turkish Lira +// * `TRL` - Turkish Lira (1922–2005) +// * `TMT` - Turkmenistani Manat +// * `TMM` - Turkmenistani Manat (1993–2009) +// * `USD` - US Dollar +// * `USN` - US Dollar (Next day) +// * `USS` - US Dollar (Same day) +// * `UGX` - Ugandan Shilling +// * `UGS` - Ugandan Shilling (1966–1987) +// * `UAH` - Ukrainian Hryvnia +// * `UAK` - Ukrainian Karbovanets +// * `AED` - United Arab Emirates Dirham +// * `UYW` - Uruguayan Nominal Wage Index Unit +// * `UYU` - Uruguayan Peso +// * `UYP` - Uruguayan Peso (1975–1993) +// * `UYI` - Uruguayan Peso (Indexed Units) +// * `UZS` - Uzbekistani Som +// * `VUV` - Vanuatu Vatu +// * `VES` - Venezuelan Bolívar +// * `VEB` - Venezuelan Bolívar (1871–2008) +// * `VEF` - Venezuelan Bolívar (2008–2018) +// * `VND` - Vietnamese Dong +// * `VNN` - Vietnamese Dong (1978–1985) +// * `CHE` - WIR Euro +// * `CHW` - WIR Franc +// * `XOF` - West African CFA Franc +// * `YDD` - Yemeni Dinar +// * `YER` - Yemeni Rial +// * `YUN` - Yugoslavian Convertible Dinar (1990–1992) +// * `YUD` - Yugoslavian Hard Dinar (1966–1990) +// * `YUM` - Yugoslavian New Dinar (1994–2002) +// * `YUR` - Yugoslavian Reformed Dinar (1992–1993) +// * `ZWN` - ZWN +// * `ZRN` - Zairean New Zaire (1993–1998) +// * `ZRZ` - Zairean Zaire (1971–1993) +// * `ZMW` - Zambian Kwacha +// * `ZMK` - Zambian Kwacha (1968–2012) +// * `ZWD` - Zimbabwean Dollar (1980–2008) +// * `ZWR` - Zimbabwean Dollar (2008) +// * `ZWL` - Zimbabwean Dollar (2009) type VendorCreditCurrency struct { - typeName string TransactionCurrencyEnum TransactionCurrencyEnum String string + + typ string } -func NewVendorCreditCurrencyFromTransactionCurrencyEnum(value TransactionCurrencyEnum) *VendorCreditCurrency { - return &VendorCreditCurrency{typeName: "transactionCurrencyEnum", TransactionCurrencyEnum: value} +func (v *VendorCreditCurrency) GetTransactionCurrencyEnum() TransactionCurrencyEnum { + if v == nil { + return "" + } + return v.TransactionCurrencyEnum } -func NewVendorCreditCurrencyFromString(value string) *VendorCreditCurrency { - return &VendorCreditCurrency{typeName: "string", String: value} +func (v *VendorCreditCurrency) GetString() string { + if v == nil { + return "" + } + return v.String } func (v *VendorCreditCurrency) UnmarshalJSON(data []byte) error { var valueTransactionCurrencyEnum TransactionCurrencyEnum if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { - v.typeName = "transactionCurrencyEnum" + v.typ = "TransactionCurrencyEnum" v.TransactionCurrencyEnum = valueTransactionCurrencyEnum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - v.typeName = "string" + v.typ = "String" v.String = valueString return nil } @@ -46000,14 +23590,13 @@ func (v *VendorCreditCurrency) UnmarshalJSON(data []byte) error { } func (v VendorCreditCurrency) MarshalJSON() ([]byte, error) { - switch v.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", v.typeName, v) - case "transactionCurrencyEnum": + if v.typ == "TransactionCurrencyEnum" || v.TransactionCurrencyEnum != "" { return json.Marshal(v.TransactionCurrencyEnum) - case "string": + } + if v.typ == "String" || v.String != "" { return json.Marshal(v.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", v) } type VendorCreditCurrencyVisitor interface { @@ -46016,1270 +23605,775 @@ type VendorCreditCurrencyVisitor interface { } func (v *VendorCreditCurrency) Accept(visitor VendorCreditCurrencyVisitor) error { - switch v.typeName { - default: - return fmt.Errorf("invalid type %s in %T", v.typeName, v) - case "transactionCurrencyEnum": + if v.typ == "TransactionCurrencyEnum" || v.TransactionCurrencyEnum != "" { return visitor.VisitTransactionCurrencyEnum(v.TransactionCurrencyEnum) - case "string": + } + if v.typ == "String" || v.String != "" { return visitor.VisitString(v.String) } + return fmt.Errorf("type %T does not include a non-empty union type", v) } // # The VendorCreditLine Object -// // ### Description -// // The `VendorCreditLine` object is used to represent a vendor credit's line items. // // ### Usage Example -// // Fetch from the `GET VendorCredit` endpoint and view the vendor credit's line items. type VendorCreditLine struct { - Id *string `json:"id,omitempty"` + Id *string `json:"id,omitempty" url:"id,omitempty"` // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` // The full value of the credit. - NetAmount *float64 `json:"net_amount,omitempty"` + NetAmount *float64 `json:"net_amount,omitempty" url:"net_amount,omitempty"` // The line's associated tracking category. - TrackingCategory *string `json:"tracking_category,omitempty"` + TrackingCategory *string `json:"tracking_category,omitempty" url:"tracking_category,omitempty"` // The vendor credit line item's associated tracking categories. - TrackingCategories []*string `json:"tracking_categories,omitempty"` + TrackingCategories []*string `json:"tracking_categories,omitempty" url:"tracking_categories,omitempty"` // The line's description. - Description *string `json:"description,omitempty"` + Description *string `json:"description,omitempty" url:"description,omitempty"` // The line's account. - Account *VendorCreditLineAccount `json:"account,omitempty"` + Account *VendorCreditLineAccount `json:"account,omitempty" url:"account,omitempty"` // The company the line belongs to. - Company *string `json:"company,omitempty"` + Company *string `json:"company,omitempty" url:"company,omitempty"` + Project *VendorCreditLineProject `json:"project,omitempty" url:"project,omitempty"` + Contact *VendorCreditLineContact `json:"contact,omitempty" url:"contact,omitempty"` // The tax rate that applies to this line item. - TaxRate *string `json:"tax_rate,omitempty"` + TaxRate *string `json:"tax_rate,omitempty" url:"tax_rate,omitempty"` // The vendor credit line item's exchange rate. - ExchangeRate *string `json:"exchange_rate,omitempty"` + ExchangeRate *string `json:"exchange_rate,omitempty" url:"exchange_rate,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (v *VendorCreditLine) UnmarshalJSON(data []byte) error { - type unmarshaler VendorCreditLine - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (v *VendorCreditLine) GetId() *string { + if v == nil { + return nil } - *v = VendorCreditLine(value) - v._rawJSON = json.RawMessage(data) - return nil + return v.Id } -func (v *VendorCreditLine) String() string { - if len(v._rawJSON) > 0 { - if value, err := core.StringifyJSON(v._rawJSON); err == nil { - return value - } +func (v *VendorCreditLine) GetRemoteId() *string { + if v == nil { + return nil } - if value, err := core.StringifyJSON(v); err == nil { - return value + return v.RemoteId +} + +func (v *VendorCreditLine) GetCreatedAt() *time.Time { + if v == nil { + return nil } - return fmt.Sprintf("%#v", v) + return v.CreatedAt } -// The line's account. -type VendorCreditLineAccount struct { - typeName string - String string - Account *Account +func (v *VendorCreditLine) GetModifiedAt() *time.Time { + if v == nil { + return nil + } + return v.ModifiedAt } -func NewVendorCreditLineAccountFromString(value string) *VendorCreditLineAccount { - return &VendorCreditLineAccount{typeName: "string", String: value} +func (v *VendorCreditLine) GetNetAmount() *float64 { + if v == nil { + return nil + } + return v.NetAmount } -func NewVendorCreditLineAccountFromAccount(value *Account) *VendorCreditLineAccount { - return &VendorCreditLineAccount{typeName: "account", Account: value} +func (v *VendorCreditLine) GetTrackingCategory() *string { + if v == nil { + return nil + } + return v.TrackingCategory } -func (v *VendorCreditLineAccount) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - v.typeName = "string" - v.String = valueString +func (v *VendorCreditLine) GetTrackingCategories() []*string { + if v == nil { return nil } - valueAccount := new(Account) - if err := json.Unmarshal(data, &valueAccount); err == nil { - v.typeName = "account" - v.Account = valueAccount + return v.TrackingCategories +} + +func (v *VendorCreditLine) GetDescription() *string { + if v == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, v) + return v.Description } -func (v VendorCreditLineAccount) MarshalJSON() ([]byte, error) { - switch v.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", v.typeName, v) - case "string": - return json.Marshal(v.String) - case "account": - return json.Marshal(v.Account) +func (v *VendorCreditLine) GetAccount() *VendorCreditLineAccount { + if v == nil { + return nil } + return v.Account } -type VendorCreditLineAccountVisitor interface { - VisitString(string) error - VisitAccount(*Account) error +func (v *VendorCreditLine) GetCompany() *string { + if v == nil { + return nil + } + return v.Company } -func (v *VendorCreditLineAccount) Accept(visitor VendorCreditLineAccountVisitor) error { - switch v.typeName { - default: - return fmt.Errorf("invalid type %s in %T", v.typeName, v) - case "string": - return visitor.VisitString(v.String) - case "account": - return visitor.VisitAccount(v.Account) +func (v *VendorCreditLine) GetProject() *VendorCreditLineProject { + if v == nil { + return nil } + return v.Project } -// # The VendorCreditLine Object -// -// ### Description -// -// The `VendorCreditLine` object is used to represent a vendor credit's line items. -// -// ### Usage Example -// -// Fetch from the `GET VendorCredit` endpoint and view the vendor credit's line items. -type VendorCreditLineRequest struct { - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The full value of the credit. - NetAmount *float64 `json:"net_amount,omitempty"` - // The line's associated tracking category. - TrackingCategory *string `json:"tracking_category,omitempty"` - // The vendor credit line item's associated tracking categories. - TrackingCategories []*string `json:"tracking_categories,omitempty"` - // The line's description. - Description *string `json:"description,omitempty"` - // The line's account. - Account *VendorCreditLineRequestAccount `json:"account,omitempty"` - // The company the line belongs to. - Company *string `json:"company,omitempty"` - // The tax rate that applies to this line item. - TaxRate *string `json:"tax_rate,omitempty"` - // The vendor credit line item's exchange rate. - ExchangeRate *string `json:"exchange_rate,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` +func (v *VendorCreditLine) GetContact() *VendorCreditLineContact { + if v == nil { + return nil + } + return v.Contact +} + +func (v *VendorCreditLine) GetTaxRate() *string { + if v == nil { + return nil + } + return v.TaxRate +} - _rawJSON json.RawMessage +func (v *VendorCreditLine) GetExchangeRate() *string { + if v == nil { + return nil + } + return v.ExchangeRate } -func (v *VendorCreditLineRequest) UnmarshalJSON(data []byte) error { - type unmarshaler VendorCreditLineRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { +func (v *VendorCreditLine) GetRemoteWasDeleted() *bool { + if v == nil { + return nil + } + return v.RemoteWasDeleted +} + +func (v *VendorCreditLine) GetExtraProperties() map[string]interface{} { + return v.extraProperties +} + +func (v *VendorCreditLine) UnmarshalJSON(data []byte) error { + type embed VendorCreditLine + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*v), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { return err } - *v = VendorCreditLineRequest(value) - v._rawJSON = json.RawMessage(data) + *v = VendorCreditLine(unmarshaler.embed) + v.CreatedAt = unmarshaler.CreatedAt.TimePtr() + v.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *v) + if err != nil { + return err + } + v.extraProperties = extraProperties + v.rawJSON = json.RawMessage(data) return nil } -func (v *VendorCreditLineRequest) String() string { - if len(v._rawJSON) > 0 { - if value, err := core.StringifyJSON(v._rawJSON); err == nil { +func (v *VendorCreditLine) MarshalJSON() ([]byte, error) { + type embed VendorCreditLine + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*v), + CreatedAt: internal.NewOptionalDateTime(v.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(v.ModifiedAt), + } + return json.Marshal(marshaler) +} + +func (v *VendorCreditLine) String() string { + if len(v.rawJSON) > 0 { + if value, err := internal.StringifyJSON(v.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(v); err == nil { + if value, err := internal.StringifyJSON(v); err == nil { return value } return fmt.Sprintf("%#v", v) } // The line's account. -type VendorCreditLineRequestAccount struct { - typeName string - String string - Account *Account +type VendorCreditLineAccount struct { + String string + Account *Account + + typ string } -func NewVendorCreditLineRequestAccountFromString(value string) *VendorCreditLineRequestAccount { - return &VendorCreditLineRequestAccount{typeName: "string", String: value} +func (v *VendorCreditLineAccount) GetString() string { + if v == nil { + return "" + } + return v.String } -func NewVendorCreditLineRequestAccountFromAccount(value *Account) *VendorCreditLineRequestAccount { - return &VendorCreditLineRequestAccount{typeName: "account", Account: value} +func (v *VendorCreditLineAccount) GetAccount() *Account { + if v == nil { + return nil + } + return v.Account } -func (v *VendorCreditLineRequestAccount) UnmarshalJSON(data []byte) error { +func (v *VendorCreditLineAccount) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - v.typeName = "string" + v.typ = "String" v.String = valueString return nil } valueAccount := new(Account) if err := json.Unmarshal(data, &valueAccount); err == nil { - v.typeName = "account" + v.typ = "Account" v.Account = valueAccount return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, v) } -func (v VendorCreditLineRequestAccount) MarshalJSON() ([]byte, error) { - switch v.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", v.typeName, v) - case "string": +func (v VendorCreditLineAccount) MarshalJSON() ([]byte, error) { + if v.typ == "String" || v.String != "" { return json.Marshal(v.String) - case "account": - return json.Marshal(v.Account) - } -} - -type VendorCreditLineRequestAccountVisitor interface { - VisitString(string) error - VisitAccount(*Account) error -} - -func (v *VendorCreditLineRequestAccount) Accept(visitor VendorCreditLineRequestAccountVisitor) error { - switch v.typeName { - default: - return fmt.Errorf("invalid type %s in %T", v.typeName, v) - case "string": - return visitor.VisitString(v.String) - case "account": - return visitor.VisitAccount(v.Account) } + if v.typ == "Account" || v.Account != nil { + return json.Marshal(v.Account) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", v) } -// # The VendorCredit Object -// -// ### Description -// -// A `VendorCredit` is transaction issued by a vendor to the accounting company, indicating a reduction or cancellation of the amount owed to the vendor. It is most generally used as an adjustment note used to rectify errors, returns, or overpayments related to a purchasing transaction. A `VendorCredit` can be applied to `Accounts Payable` Invoices to decrease the overall amount of the `Invoice`. -// -// ### Usage Example -// -// Fetch from the `GET VendorCredit` endpoint and view a company's vendor credits. -type VendorCreditRequest struct { - // The vendor credit's number. - Number *string `json:"number,omitempty"` - // The vendor credit's transaction date. - TransactionDate *time.Time `json:"transaction_date,omitempty"` - // The vendor that owes the gift or refund. - Vendor *VendorCreditRequestVendor `json:"vendor,omitempty"` - // The vendor credit's total amount. - TotalAmount *float64 `json:"total_amount,omitempty"` - // The vendor credit's currency. - // - // - `XUA` - ADB Unit of Account - // - `AFN` - Afghan Afghani - // - `AFA` - Afghan Afghani (1927–2002) - // - `ALL` - Albanian Lek - // - `ALK` - Albanian Lek (1946–1965) - // - `DZD` - Algerian Dinar - // - `ADP` - Andorran Peseta - // - `AOA` - Angolan Kwanza - // - `AOK` - Angolan Kwanza (1977–1991) - // - `AON` - Angolan New Kwanza (1990–2000) - // - `AOR` - Angolan Readjusted Kwanza (1995–1999) - // - `ARA` - Argentine Austral - // - `ARS` - Argentine Peso - // - `ARM` - Argentine Peso (1881–1970) - // - `ARP` - Argentine Peso (1983–1985) - // - `ARL` - Argentine Peso Ley (1970–1983) - // - `AMD` - Armenian Dram - // - `AWG` - Aruban Florin - // - `AUD` - Australian Dollar - // - `ATS` - Austrian Schilling - // - `AZN` - Azerbaijani Manat - // - `AZM` - Azerbaijani Manat (1993–2006) - // - `BSD` - Bahamian Dollar - // - `BHD` - Bahraini Dinar - // - `BDT` - Bangladeshi Taka - // - `BBD` - Barbadian Dollar - // - `BYN` - Belarusian Ruble - // - `BYB` - Belarusian Ruble (1994–1999) - // - `BYR` - Belarusian Ruble (2000–2016) - // - `BEF` - Belgian Franc - // - `BEC` - Belgian Franc (convertible) - // - `BEL` - Belgian Franc (financial) - // - `BZD` - Belize Dollar - // - `BMD` - Bermudan Dollar - // - `BTN` - Bhutanese Ngultrum - // - `BOB` - Bolivian Boliviano - // - `BOL` - Bolivian Boliviano (1863–1963) - // - `BOV` - Bolivian Mvdol - // - `BOP` - Bolivian Peso - // - `BAM` - Bosnia-Herzegovina Convertible Mark - // - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - // - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - // - `BWP` - Botswanan Pula - // - `BRC` - Brazilian Cruzado (1986–1989) - // - `BRZ` - Brazilian Cruzeiro (1942–1967) - // - `BRE` - Brazilian Cruzeiro (1990–1993) - // - `BRR` - Brazilian Cruzeiro (1993–1994) - // - `BRN` - Brazilian New Cruzado (1989–1990) - // - `BRB` - Brazilian New Cruzeiro (1967–1986) - // - `BRL` - Brazilian Real - // - `GBP` - British Pound - // - `BND` - Brunei Dollar - // - `BGL` - Bulgarian Hard Lev - // - `BGN` - Bulgarian Lev - // - `BGO` - Bulgarian Lev (1879–1952) - // - `BGM` - Bulgarian Socialist Lev - // - `BUK` - Burmese Kyat - // - `BIF` - Burundian Franc - // - `XPF` - CFP Franc - // - `KHR` - Cambodian Riel - // - `CAD` - Canadian Dollar - // - `CVE` - Cape Verdean Escudo - // - `KYD` - Cayman Islands Dollar - // - `XAF` - Central African CFA Franc - // - `CLE` - Chilean Escudo - // - `CLP` - Chilean Peso - // - `CLF` - Chilean Unit of Account (UF) - // - `CNX` - Chinese People’s Bank Dollar - // - `CNY` - Chinese Yuan - // - `CNH` - Chinese Yuan (offshore) - // - `COP` - Colombian Peso - // - `COU` - Colombian Real Value Unit - // - `KMF` - Comorian Franc - // - `CDF` - Congolese Franc - // - `CRC` - Costa Rican Colón - // - `HRD` - Croatian Dinar - // - `HRK` - Croatian Kuna - // - `CUC` - Cuban Convertible Peso - // - `CUP` - Cuban Peso - // - `CYP` - Cypriot Pound - // - `CZK` - Czech Koruna - // - `CSK` - Czechoslovak Hard Koruna - // - `DKK` - Danish Krone - // - `DJF` - Djiboutian Franc - // - `DOP` - Dominican Peso - // - `NLG` - Dutch Guilder - // - `XCD` - East Caribbean Dollar - // - `DDM` - East German Mark - // - `ECS` - Ecuadorian Sucre - // - `ECV` - Ecuadorian Unit of Constant Value - // - `EGP` - Egyptian Pound - // - `GQE` - Equatorial Guinean Ekwele - // - `ERN` - Eritrean Nakfa - // - `EEK` - Estonian Kroon - // - `ETB` - Ethiopian Birr - // - `EUR` - Euro - // - `XBA` - European Composite Unit - // - `XEU` - European Currency Unit - // - `XBB` - European Monetary Unit - // - `XBC` - European Unit of Account (XBC) - // - `XBD` - European Unit of Account (XBD) - // - `FKP` - Falkland Islands Pound - // - `FJD` - Fijian Dollar - // - `FIM` - Finnish Markka - // - `FRF` - French Franc - // - `XFO` - French Gold Franc - // - `XFU` - French UIC-Franc - // - `GMD` - Gambian Dalasi - // - `GEK` - Georgian Kupon Larit - // - `GEL` - Georgian Lari - // - `DEM` - German Mark - // - `GHS` - Ghanaian Cedi - // - `GHC` - Ghanaian Cedi (1979–2007) - // - `GIP` - Gibraltar Pound - // - `XAU` - Gold - // - `GRD` - Greek Drachma - // - `GTQ` - Guatemalan Quetzal - // - `GWP` - Guinea-Bissau Peso - // - `GNF` - Guinean Franc - // - `GNS` - Guinean Syli - // - `GYD` - Guyanaese Dollar - // - `HTG` - Haitian Gourde - // - `HNL` - Honduran Lempira - // - `HKD` - Hong Kong Dollar - // - `HUF` - Hungarian Forint - // - `IMP` - IMP - // - `ISK` - Icelandic Króna - // - `ISJ` - Icelandic Króna (1918–1981) - // - `INR` - Indian Rupee - // - `IDR` - Indonesian Rupiah - // - `IRR` - Iranian Rial - // - `IQD` - Iraqi Dinar - // - `IEP` - Irish Pound - // - `ILS` - Israeli New Shekel - // - `ILP` - Israeli Pound - // - `ILR` - Israeli Shekel (1980–1985) - // - `ITL` - Italian Lira - // - `JMD` - Jamaican Dollar - // - `JPY` - Japanese Yen - // - `JOD` - Jordanian Dinar - // - `KZT` - Kazakhstani Tenge - // - `KES` - Kenyan Shilling - // - `KWD` - Kuwaiti Dinar - // - `KGS` - Kyrgystani Som - // - `LAK` - Laotian Kip - // - `LVL` - Latvian Lats - // - `LVR` - Latvian Ruble - // - `LBP` - Lebanese Pound - // - `LSL` - Lesotho Loti - // - `LRD` - Liberian Dollar - // - `LYD` - Libyan Dinar - // - `LTL` - Lithuanian Litas - // - `LTT` - Lithuanian Talonas - // - `LUL` - Luxembourg Financial Franc - // - `LUC` - Luxembourgian Convertible Franc - // - `LUF` - Luxembourgian Franc - // - `MOP` - Macanese Pataca - // - `MKD` - Macedonian Denar - // - `MKN` - Macedonian Denar (1992–1993) - // - `MGA` - Malagasy Ariary - // - `MGF` - Malagasy Franc - // - `MWK` - Malawian Kwacha - // - `MYR` - Malaysian Ringgit - // - `MVR` - Maldivian Rufiyaa - // - `MVP` - Maldivian Rupee (1947–1981) - // - `MLF` - Malian Franc - // - `MTL` - Maltese Lira - // - `MTP` - Maltese Pound - // - `MRU` - Mauritanian Ouguiya - // - `MRO` - Mauritanian Ouguiya (1973–2017) - // - `MUR` - Mauritian Rupee - // - `MXV` - Mexican Investment Unit - // - `MXN` - Mexican Peso - // - `MXP` - Mexican Silver Peso (1861–1992) - // - `MDC` - Moldovan Cupon - // - `MDL` - Moldovan Leu - // - `MCF` - Monegasque Franc - // - `MNT` - Mongolian Tugrik - // - `MAD` - Moroccan Dirham - // - `MAF` - Moroccan Franc - // - `MZE` - Mozambican Escudo - // - `MZN` - Mozambican Metical - // - `MZM` - Mozambican Metical (1980–2006) - // - `MMK` - Myanmar Kyat - // - `NAD` - Namibian Dollar - // - `NPR` - Nepalese Rupee - // - `ANG` - Netherlands Antillean Guilder - // - `TWD` - New Taiwan Dollar - // - `NZD` - New Zealand Dollar - // - `NIO` - Nicaraguan Córdoba - // - `NIC` - Nicaraguan Córdoba (1988–1991) - // - `NGN` - Nigerian Naira - // - `KPW` - North Korean Won - // - `NOK` - Norwegian Krone - // - `OMR` - Omani Rial - // - `PKR` - Pakistani Rupee - // - `XPD` - Palladium - // - `PAB` - Panamanian Balboa - // - `PGK` - Papua New Guinean Kina - // - `PYG` - Paraguayan Guarani - // - `PEI` - Peruvian Inti - // - `PEN` - Peruvian Sol - // - `PES` - Peruvian Sol (1863–1965) - // - `PHP` - Philippine Peso - // - `XPT` - Platinum - // - `PLN` - Polish Zloty - // - `PLZ` - Polish Zloty (1950–1995) - // - `PTE` - Portuguese Escudo - // - `GWE` - Portuguese Guinea Escudo - // - `QAR` - Qatari Rial - // - `XRE` - RINET Funds - // - `RHD` - Rhodesian Dollar - // - `RON` - Romanian Leu - // - `ROL` - Romanian Leu (1952–2006) - // - `RUB` - Russian Ruble - // - `RUR` - Russian Ruble (1991–1998) - // - `RWF` - Rwandan Franc - // - `SVC` - Salvadoran Colón - // - `WST` - Samoan Tala - // - `SAR` - Saudi Riyal - // - `RSD` - Serbian Dinar - // - `CSD` - Serbian Dinar (2002–2006) - // - `SCR` - Seychellois Rupee - // - `SLL` - Sierra Leonean Leone - // - `XAG` - Silver - // - `SGD` - Singapore Dollar - // - `SKK` - Slovak Koruna - // - `SIT` - Slovenian Tolar - // - `SBD` - Solomon Islands Dollar - // - `SOS` - Somali Shilling - // - `ZAR` - South African Rand - // - `ZAL` - South African Rand (financial) - // - `KRH` - South Korean Hwan (1953–1962) - // - `KRW` - South Korean Won - // - `KRO` - South Korean Won (1945–1953) - // - `SSP` - South Sudanese Pound - // - `SUR` - Soviet Rouble - // - `ESP` - Spanish Peseta - // - `ESA` - Spanish Peseta (A account) - // - `ESB` - Spanish Peseta (convertible account) - // - `XDR` - Special Drawing Rights - // - `LKR` - Sri Lankan Rupee - // - `SHP` - St. Helena Pound - // - `XSU` - Sucre - // - `SDD` - Sudanese Dinar (1992–2007) - // - `SDG` - Sudanese Pound - // - `SDP` - Sudanese Pound (1957–1998) - // - `SRD` - Surinamese Dollar - // - `SRG` - Surinamese Guilder - // - `SZL` - Swazi Lilangeni - // - `SEK` - Swedish Krona - // - `CHF` - Swiss Franc - // - `SYP` - Syrian Pound - // - `STN` - São Tomé & Príncipe Dobra - // - `STD` - São Tomé & Príncipe Dobra (1977–2017) - // - `TVD` - TVD - // - `TJR` - Tajikistani Ruble - // - `TJS` - Tajikistani Somoni - // - `TZS` - Tanzanian Shilling - // - `XTS` - Testing Currency Code - // - `THB` - Thai Baht - // - `XXX` - The codes assigned for transactions where no currency is involved - // - `TPE` - Timorese Escudo - // - `TOP` - Tongan Paʻanga - // - `TTD` - Trinidad & Tobago Dollar - // - `TND` - Tunisian Dinar - // - `TRY` - Turkish Lira - // - `TRL` - Turkish Lira (1922–2005) - // - `TMT` - Turkmenistani Manat - // - `TMM` - Turkmenistani Manat (1993–2009) - // - `USD` - US Dollar - // - `USN` - US Dollar (Next day) - // - `USS` - US Dollar (Same day) - // - `UGX` - Ugandan Shilling - // - `UGS` - Ugandan Shilling (1966–1987) - // - `UAH` - Ukrainian Hryvnia - // - `UAK` - Ukrainian Karbovanets - // - `AED` - United Arab Emirates Dirham - // - `UYW` - Uruguayan Nominal Wage Index Unit - // - `UYU` - Uruguayan Peso - // - `UYP` - Uruguayan Peso (1975–1993) - // - `UYI` - Uruguayan Peso (Indexed Units) - // - `UZS` - Uzbekistani Som - // - `VUV` - Vanuatu Vatu - // - `VES` - Venezuelan Bolívar - // - `VEB` - Venezuelan Bolívar (1871–2008) - // - `VEF` - Venezuelan Bolívar (2008–2018) - // - `VND` - Vietnamese Dong - // - `VNN` - Vietnamese Dong (1978–1985) - // - `CHE` - WIR Euro - // - `CHW` - WIR Franc - // - `XOF` - West African CFA Franc - // - `YDD` - Yemeni Dinar - // - `YER` - Yemeni Rial - // - `YUN` - Yugoslavian Convertible Dinar (1990–1992) - // - `YUD` - Yugoslavian Hard Dinar (1966–1990) - // - `YUM` - Yugoslavian New Dinar (1994–2002) - // - `YUR` - Yugoslavian Reformed Dinar (1992–1993) - // - `ZWN` - ZWN - // - `ZRN` - Zairean New Zaire (1993–1998) - // - `ZRZ` - Zairean Zaire (1971–1993) - // - `ZMW` - Zambian Kwacha - // - `ZMK` - Zambian Kwacha (1968–2012) - // - `ZWD` - Zimbabwean Dollar (1980–2008) - // - `ZWR` - Zimbabwean Dollar (2008) - // - `ZWL` - Zimbabwean Dollar (2009) - Currency *VendorCreditRequestCurrency `json:"currency,omitempty"` - // The vendor credit's exchange rate. - ExchangeRate *string `json:"exchange_rate,omitempty"` - // If the transaction is inclusive or exclusive of tax. `True` if inclusive, `False` if exclusive. - InclusiveOfTax *bool `json:"inclusive_of_tax,omitempty"` - // The company the vendor credit belongs to. - Company *VendorCreditRequestCompany `json:"company,omitempty"` - TrackingCategories []*VendorCreditRequestTrackingCategoriesItem `json:"tracking_categories,omitempty"` - // A list of VendorCredit Applied to Lines objects. - AppliedToLines []*VendorCreditApplyLineForVendorCreditRequest `json:"applied_to_lines,omitempty"` - // The accounting period that the VendorCredit was generated in. - AccountingPeriod *VendorCreditRequestAccountingPeriod `json:"accounting_period,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` - - _rawJSON json.RawMessage -} - -func (v *VendorCreditRequest) UnmarshalJSON(data []byte) error { - type unmarshaler VendorCreditRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *v = VendorCreditRequest(value) - v._rawJSON = json.RawMessage(data) - return nil +type VendorCreditLineAccountVisitor interface { + VisitString(string) error + VisitAccount(*Account) error } -func (v *VendorCreditRequest) String() string { - if len(v._rawJSON) > 0 { - if value, err := core.StringifyJSON(v._rawJSON); err == nil { - return value - } +func (v *VendorCreditLineAccount) Accept(visitor VendorCreditLineAccountVisitor) error { + if v.typ == "String" || v.String != "" { + return visitor.VisitString(v.String) } - if value, err := core.StringifyJSON(v); err == nil { - return value + if v.typ == "Account" || v.Account != nil { + return visitor.VisitAccount(v.Account) } - return fmt.Sprintf("%#v", v) + return fmt.Errorf("type %T does not include a non-empty union type", v) } -// The accounting period that the VendorCredit was generated in. -type VendorCreditRequestAccountingPeriod struct { - typeName string - String string - AccountingPeriod *AccountingPeriod +type VendorCreditLineContact struct { + String string + Contact *Contact + + typ string } -func NewVendorCreditRequestAccountingPeriodFromString(value string) *VendorCreditRequestAccountingPeriod { - return &VendorCreditRequestAccountingPeriod{typeName: "string", String: value} +func (v *VendorCreditLineContact) GetString() string { + if v == nil { + return "" + } + return v.String } -func NewVendorCreditRequestAccountingPeriodFromAccountingPeriod(value *AccountingPeriod) *VendorCreditRequestAccountingPeriod { - return &VendorCreditRequestAccountingPeriod{typeName: "accountingPeriod", AccountingPeriod: value} +func (v *VendorCreditLineContact) GetContact() *Contact { + if v == nil { + return nil + } + return v.Contact } -func (v *VendorCreditRequestAccountingPeriod) UnmarshalJSON(data []byte) error { +func (v *VendorCreditLineContact) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - v.typeName = "string" + v.typ = "String" v.String = valueString return nil } - valueAccountingPeriod := new(AccountingPeriod) - if err := json.Unmarshal(data, &valueAccountingPeriod); err == nil { - v.typeName = "accountingPeriod" - v.AccountingPeriod = valueAccountingPeriod + valueContact := new(Contact) + if err := json.Unmarshal(data, &valueContact); err == nil { + v.typ = "Contact" + v.Contact = valueContact return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, v) } -func (v VendorCreditRequestAccountingPeriod) MarshalJSON() ([]byte, error) { - switch v.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", v.typeName, v) - case "string": +func (v VendorCreditLineContact) MarshalJSON() ([]byte, error) { + if v.typ == "String" || v.String != "" { return json.Marshal(v.String) - case "accountingPeriod": - return json.Marshal(v.AccountingPeriod) } + if v.typ == "Contact" || v.Contact != nil { + return json.Marshal(v.Contact) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", v) } -type VendorCreditRequestAccountingPeriodVisitor interface { +type VendorCreditLineContactVisitor interface { VisitString(string) error - VisitAccountingPeriod(*AccountingPeriod) error + VisitContact(*Contact) error } -func (v *VendorCreditRequestAccountingPeriod) Accept(visitor VendorCreditRequestAccountingPeriodVisitor) error { - switch v.typeName { - default: - return fmt.Errorf("invalid type %s in %T", v.typeName, v) - case "string": +func (v *VendorCreditLineContact) Accept(visitor VendorCreditLineContactVisitor) error { + if v.typ == "String" || v.String != "" { return visitor.VisitString(v.String) - case "accountingPeriod": - return visitor.VisitAccountingPeriod(v.AccountingPeriod) } + if v.typ == "Contact" || v.Contact != nil { + return visitor.VisitContact(v.Contact) + } + return fmt.Errorf("type %T does not include a non-empty union type", v) } -// The company the vendor credit belongs to. -type VendorCreditRequestCompany struct { - typeName string - String string - CompanyInfo *CompanyInfo +type VendorCreditLineProject struct { + String string + Project *Project + + typ string } -func NewVendorCreditRequestCompanyFromString(value string) *VendorCreditRequestCompany { - return &VendorCreditRequestCompany{typeName: "string", String: value} +func (v *VendorCreditLineProject) GetString() string { + if v == nil { + return "" + } + return v.String } -func NewVendorCreditRequestCompanyFromCompanyInfo(value *CompanyInfo) *VendorCreditRequestCompany { - return &VendorCreditRequestCompany{typeName: "companyInfo", CompanyInfo: value} +func (v *VendorCreditLineProject) GetProject() *Project { + if v == nil { + return nil + } + return v.Project } -func (v *VendorCreditRequestCompany) UnmarshalJSON(data []byte) error { +func (v *VendorCreditLineProject) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - v.typeName = "string" + v.typ = "String" v.String = valueString return nil } - valueCompanyInfo := new(CompanyInfo) - if err := json.Unmarshal(data, &valueCompanyInfo); err == nil { - v.typeName = "companyInfo" - v.CompanyInfo = valueCompanyInfo + valueProject := new(Project) + if err := json.Unmarshal(data, &valueProject); err == nil { + v.typ = "Project" + v.Project = valueProject return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, v) } -func (v VendorCreditRequestCompany) MarshalJSON() ([]byte, error) { - switch v.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", v.typeName, v) - case "string": +func (v VendorCreditLineProject) MarshalJSON() ([]byte, error) { + if v.typ == "String" || v.String != "" { return json.Marshal(v.String) - case "companyInfo": - return json.Marshal(v.CompanyInfo) } + if v.typ == "Project" || v.Project != nil { + return json.Marshal(v.Project) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", v) } -type VendorCreditRequestCompanyVisitor interface { +type VendorCreditLineProjectVisitor interface { VisitString(string) error - VisitCompanyInfo(*CompanyInfo) error + VisitProject(*Project) error } -func (v *VendorCreditRequestCompany) Accept(visitor VendorCreditRequestCompanyVisitor) error { - switch v.typeName { - default: - return fmt.Errorf("invalid type %s in %T", v.typeName, v) - case "string": +func (v *VendorCreditLineProject) Accept(visitor VendorCreditLineProjectVisitor) error { + if v.typ == "String" || v.String != "" { return visitor.VisitString(v.String) - case "companyInfo": - return visitor.VisitCompanyInfo(v.CompanyInfo) } + if v.typ == "Project" || v.Project != nil { + return visitor.VisitProject(v.Project) + } + return fmt.Errorf("type %T does not include a non-empty union type", v) } -// The vendor credit's currency. +// # The VendorCreditLine Object +// ### Description +// The `VendorCreditLine` object is used to represent a vendor credit's line items. // -// - `XUA` - ADB Unit of Account -// - `AFN` - Afghan Afghani -// - `AFA` - Afghan Afghani (1927–2002) -// - `ALL` - Albanian Lek -// - `ALK` - Albanian Lek (1946–1965) -// - `DZD` - Algerian Dinar -// - `ADP` - Andorran Peseta -// - `AOA` - Angolan Kwanza -// - `AOK` - Angolan Kwanza (1977–1991) -// - `AON` - Angolan New Kwanza (1990–2000) -// - `AOR` - Angolan Readjusted Kwanza (1995–1999) -// - `ARA` - Argentine Austral -// - `ARS` - Argentine Peso -// - `ARM` - Argentine Peso (1881–1970) -// - `ARP` - Argentine Peso (1983–1985) -// - `ARL` - Argentine Peso Ley (1970–1983) -// - `AMD` - Armenian Dram -// - `AWG` - Aruban Florin -// - `AUD` - Australian Dollar -// - `ATS` - Austrian Schilling -// - `AZN` - Azerbaijani Manat -// - `AZM` - Azerbaijani Manat (1993–2006) -// - `BSD` - Bahamian Dollar -// - `BHD` - Bahraini Dinar -// - `BDT` - Bangladeshi Taka -// - `BBD` - Barbadian Dollar -// - `BYN` - Belarusian Ruble -// - `BYB` - Belarusian Ruble (1994–1999) -// - `BYR` - Belarusian Ruble (2000–2016) -// - `BEF` - Belgian Franc -// - `BEC` - Belgian Franc (convertible) -// - `BEL` - Belgian Franc (financial) -// - `BZD` - Belize Dollar -// - `BMD` - Bermudan Dollar -// - `BTN` - Bhutanese Ngultrum -// - `BOB` - Bolivian Boliviano -// - `BOL` - Bolivian Boliviano (1863–1963) -// - `BOV` - Bolivian Mvdol -// - `BOP` - Bolivian Peso -// - `BAM` - Bosnia-Herzegovina Convertible Mark -// - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) -// - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) -// - `BWP` - Botswanan Pula -// - `BRC` - Brazilian Cruzado (1986–1989) -// - `BRZ` - Brazilian Cruzeiro (1942–1967) -// - `BRE` - Brazilian Cruzeiro (1990–1993) -// - `BRR` - Brazilian Cruzeiro (1993–1994) -// - `BRN` - Brazilian New Cruzado (1989–1990) -// - `BRB` - Brazilian New Cruzeiro (1967–1986) -// - `BRL` - Brazilian Real -// - `GBP` - British Pound -// - `BND` - Brunei Dollar -// - `BGL` - Bulgarian Hard Lev -// - `BGN` - Bulgarian Lev -// - `BGO` - Bulgarian Lev (1879–1952) -// - `BGM` - Bulgarian Socialist Lev -// - `BUK` - Burmese Kyat -// - `BIF` - Burundian Franc -// - `XPF` - CFP Franc -// - `KHR` - Cambodian Riel -// - `CAD` - Canadian Dollar -// - `CVE` - Cape Verdean Escudo -// - `KYD` - Cayman Islands Dollar -// - `XAF` - Central African CFA Franc -// - `CLE` - Chilean Escudo -// - `CLP` - Chilean Peso -// - `CLF` - Chilean Unit of Account (UF) -// - `CNX` - Chinese People’s Bank Dollar -// - `CNY` - Chinese Yuan -// - `CNH` - Chinese Yuan (offshore) -// - `COP` - Colombian Peso -// - `COU` - Colombian Real Value Unit -// - `KMF` - Comorian Franc -// - `CDF` - Congolese Franc -// - `CRC` - Costa Rican Colón -// - `HRD` - Croatian Dinar -// - `HRK` - Croatian Kuna -// - `CUC` - Cuban Convertible Peso -// - `CUP` - Cuban Peso -// - `CYP` - Cypriot Pound -// - `CZK` - Czech Koruna -// - `CSK` - Czechoslovak Hard Koruna -// - `DKK` - Danish Krone -// - `DJF` - Djiboutian Franc -// - `DOP` - Dominican Peso -// - `NLG` - Dutch Guilder -// - `XCD` - East Caribbean Dollar -// - `DDM` - East German Mark -// - `ECS` - Ecuadorian Sucre -// - `ECV` - Ecuadorian Unit of Constant Value -// - `EGP` - Egyptian Pound -// - `GQE` - Equatorial Guinean Ekwele -// - `ERN` - Eritrean Nakfa -// - `EEK` - Estonian Kroon -// - `ETB` - Ethiopian Birr -// - `EUR` - Euro -// - `XBA` - European Composite Unit -// - `XEU` - European Currency Unit -// - `XBB` - European Monetary Unit -// - `XBC` - European Unit of Account (XBC) -// - `XBD` - European Unit of Account (XBD) -// - `FKP` - Falkland Islands Pound -// - `FJD` - Fijian Dollar -// - `FIM` - Finnish Markka -// - `FRF` - French Franc -// - `XFO` - French Gold Franc -// - `XFU` - French UIC-Franc -// - `GMD` - Gambian Dalasi -// - `GEK` - Georgian Kupon Larit -// - `GEL` - Georgian Lari -// - `DEM` - German Mark -// - `GHS` - Ghanaian Cedi -// - `GHC` - Ghanaian Cedi (1979–2007) -// - `GIP` - Gibraltar Pound -// - `XAU` - Gold -// - `GRD` - Greek Drachma -// - `GTQ` - Guatemalan Quetzal -// - `GWP` - Guinea-Bissau Peso -// - `GNF` - Guinean Franc -// - `GNS` - Guinean Syli -// - `GYD` - Guyanaese Dollar -// - `HTG` - Haitian Gourde -// - `HNL` - Honduran Lempira -// - `HKD` - Hong Kong Dollar -// - `HUF` - Hungarian Forint -// - `IMP` - IMP -// - `ISK` - Icelandic Króna -// - `ISJ` - Icelandic Króna (1918–1981) -// - `INR` - Indian Rupee -// - `IDR` - Indonesian Rupiah -// - `IRR` - Iranian Rial -// - `IQD` - Iraqi Dinar -// - `IEP` - Irish Pound -// - `ILS` - Israeli New Shekel -// - `ILP` - Israeli Pound -// - `ILR` - Israeli Shekel (1980–1985) -// - `ITL` - Italian Lira -// - `JMD` - Jamaican Dollar -// - `JPY` - Japanese Yen -// - `JOD` - Jordanian Dinar -// - `KZT` - Kazakhstani Tenge -// - `KES` - Kenyan Shilling -// - `KWD` - Kuwaiti Dinar -// - `KGS` - Kyrgystani Som -// - `LAK` - Laotian Kip -// - `LVL` - Latvian Lats -// - `LVR` - Latvian Ruble -// - `LBP` - Lebanese Pound -// - `LSL` - Lesotho Loti -// - `LRD` - Liberian Dollar -// - `LYD` - Libyan Dinar -// - `LTL` - Lithuanian Litas -// - `LTT` - Lithuanian Talonas -// - `LUL` - Luxembourg Financial Franc -// - `LUC` - Luxembourgian Convertible Franc -// - `LUF` - Luxembourgian Franc -// - `MOP` - Macanese Pataca -// - `MKD` - Macedonian Denar -// - `MKN` - Macedonian Denar (1992–1993) -// - `MGA` - Malagasy Ariary -// - `MGF` - Malagasy Franc -// - `MWK` - Malawian Kwacha -// - `MYR` - Malaysian Ringgit -// - `MVR` - Maldivian Rufiyaa -// - `MVP` - Maldivian Rupee (1947–1981) -// - `MLF` - Malian Franc -// - `MTL` - Maltese Lira -// - `MTP` - Maltese Pound -// - `MRU` - Mauritanian Ouguiya -// - `MRO` - Mauritanian Ouguiya (1973–2017) -// - `MUR` - Mauritian Rupee -// - `MXV` - Mexican Investment Unit -// - `MXN` - Mexican Peso -// - `MXP` - Mexican Silver Peso (1861–1992) -// - `MDC` - Moldovan Cupon -// - `MDL` - Moldovan Leu -// - `MCF` - Monegasque Franc -// - `MNT` - Mongolian Tugrik -// - `MAD` - Moroccan Dirham -// - `MAF` - Moroccan Franc -// - `MZE` - Mozambican Escudo -// - `MZN` - Mozambican Metical -// - `MZM` - Mozambican Metical (1980–2006) -// - `MMK` - Myanmar Kyat -// - `NAD` - Namibian Dollar -// - `NPR` - Nepalese Rupee -// - `ANG` - Netherlands Antillean Guilder -// - `TWD` - New Taiwan Dollar -// - `NZD` - New Zealand Dollar -// - `NIO` - Nicaraguan Córdoba -// - `NIC` - Nicaraguan Córdoba (1988–1991) -// - `NGN` - Nigerian Naira -// - `KPW` - North Korean Won -// - `NOK` - Norwegian Krone -// - `OMR` - Omani Rial -// - `PKR` - Pakistani Rupee -// - `XPD` - Palladium -// - `PAB` - Panamanian Balboa -// - `PGK` - Papua New Guinean Kina -// - `PYG` - Paraguayan Guarani -// - `PEI` - Peruvian Inti -// - `PEN` - Peruvian Sol -// - `PES` - Peruvian Sol (1863–1965) -// - `PHP` - Philippine Peso -// - `XPT` - Platinum -// - `PLN` - Polish Zloty -// - `PLZ` - Polish Zloty (1950–1995) -// - `PTE` - Portuguese Escudo -// - `GWE` - Portuguese Guinea Escudo -// - `QAR` - Qatari Rial -// - `XRE` - RINET Funds -// - `RHD` - Rhodesian Dollar -// - `RON` - Romanian Leu -// - `ROL` - Romanian Leu (1952–2006) -// - `RUB` - Russian Ruble -// - `RUR` - Russian Ruble (1991–1998) -// - `RWF` - Rwandan Franc -// - `SVC` - Salvadoran Colón -// - `WST` - Samoan Tala -// - `SAR` - Saudi Riyal -// - `RSD` - Serbian Dinar -// - `CSD` - Serbian Dinar (2002–2006) -// - `SCR` - Seychellois Rupee -// - `SLL` - Sierra Leonean Leone -// - `XAG` - Silver -// - `SGD` - Singapore Dollar -// - `SKK` - Slovak Koruna -// - `SIT` - Slovenian Tolar -// - `SBD` - Solomon Islands Dollar -// - `SOS` - Somali Shilling -// - `ZAR` - South African Rand -// - `ZAL` - South African Rand (financial) -// - `KRH` - South Korean Hwan (1953–1962) -// - `KRW` - South Korean Won -// - `KRO` - South Korean Won (1945–1953) -// - `SSP` - South Sudanese Pound -// - `SUR` - Soviet Rouble -// - `ESP` - Spanish Peseta -// - `ESA` - Spanish Peseta (A account) -// - `ESB` - Spanish Peseta (convertible account) -// - `XDR` - Special Drawing Rights -// - `LKR` - Sri Lankan Rupee -// - `SHP` - St. Helena Pound -// - `XSU` - Sucre -// - `SDD` - Sudanese Dinar (1992–2007) -// - `SDG` - Sudanese Pound -// - `SDP` - Sudanese Pound (1957–1998) -// - `SRD` - Surinamese Dollar -// - `SRG` - Surinamese Guilder -// - `SZL` - Swazi Lilangeni -// - `SEK` - Swedish Krona -// - `CHF` - Swiss Franc -// - `SYP` - Syrian Pound -// - `STN` - São Tomé & Príncipe Dobra -// - `STD` - São Tomé & Príncipe Dobra (1977–2017) -// - `TVD` - TVD -// - `TJR` - Tajikistani Ruble -// - `TJS` - Tajikistani Somoni -// - `TZS` - Tanzanian Shilling -// - `XTS` - Testing Currency Code -// - `THB` - Thai Baht -// - `XXX` - The codes assigned for transactions where no currency is involved -// - `TPE` - Timorese Escudo -// - `TOP` - Tongan Paʻanga -// - `TTD` - Trinidad & Tobago Dollar -// - `TND` - Tunisian Dinar -// - `TRY` - Turkish Lira -// - `TRL` - Turkish Lira (1922–2005) -// - `TMT` - Turkmenistani Manat -// - `TMM` - Turkmenistani Manat (1993–2009) -// - `USD` - US Dollar -// - `USN` - US Dollar (Next day) -// - `USS` - US Dollar (Same day) -// - `UGX` - Ugandan Shilling -// - `UGS` - Ugandan Shilling (1966–1987) -// - `UAH` - Ukrainian Hryvnia -// - `UAK` - Ukrainian Karbovanets -// - `AED` - United Arab Emirates Dirham -// - `UYW` - Uruguayan Nominal Wage Index Unit -// - `UYU` - Uruguayan Peso -// - `UYP` - Uruguayan Peso (1975–1993) -// - `UYI` - Uruguayan Peso (Indexed Units) -// - `UZS` - Uzbekistani Som -// - `VUV` - Vanuatu Vatu -// - `VES` - Venezuelan Bolívar -// - `VEB` - Venezuelan Bolívar (1871–2008) -// - `VEF` - Venezuelan Bolívar (2008–2018) -// - `VND` - Vietnamese Dong -// - `VNN` - Vietnamese Dong (1978–1985) -// - `CHE` - WIR Euro -// - `CHW` - WIR Franc -// - `XOF` - West African CFA Franc -// - `YDD` - Yemeni Dinar -// - `YER` - Yemeni Rial -// - `YUN` - Yugoslavian Convertible Dinar (1990–1992) -// - `YUD` - Yugoslavian Hard Dinar (1966–1990) -// - `YUM` - Yugoslavian New Dinar (1994–2002) -// - `YUR` - Yugoslavian Reformed Dinar (1992–1993) -// - `ZWN` - ZWN -// - `ZRN` - Zairean New Zaire (1993–1998) -// - `ZRZ` - Zairean Zaire (1971–1993) -// - `ZMW` - Zambian Kwacha -// - `ZMK` - Zambian Kwacha (1968–2012) -// - `ZWD` - Zimbabwean Dollar (1980–2008) -// - `ZWR` - Zimbabwean Dollar (2008) -// - `ZWL` - Zimbabwean Dollar (2009) -type VendorCreditRequestCurrency struct { - typeName string - TransactionCurrencyEnum TransactionCurrencyEnum - String string +// ### Usage Example +// Fetch from the `GET VendorCredit` endpoint and view the vendor credit's line items. +type VendorCreditLineRequest struct { + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The full value of the credit. + NetAmount *float64 `json:"net_amount,omitempty" url:"net_amount,omitempty"` + // The line's associated tracking category. + TrackingCategory *string `json:"tracking_category,omitempty" url:"tracking_category,omitempty"` + // The vendor credit line item's associated tracking categories. + TrackingCategories []*string `json:"tracking_categories,omitempty" url:"tracking_categories,omitempty"` + // The line's description. + Description *string `json:"description,omitempty" url:"description,omitempty"` + // The line's account. + Account *VendorCreditLineRequestAccount `json:"account,omitempty" url:"account,omitempty"` + // The company the line belongs to. + Company *string `json:"company,omitempty" url:"company,omitempty"` + Project *VendorCreditLineRequestProject `json:"project,omitempty" url:"project,omitempty"` + Contact *VendorCreditLineRequestContact `json:"contact,omitempty" url:"contact,omitempty"` + // The tax rate that applies to this line item. + TaxRate *string `json:"tax_rate,omitempty" url:"tax_rate,omitempty"` + // The vendor credit line item's exchange rate. + ExchangeRate *string `json:"exchange_rate,omitempty" url:"exchange_rate,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func NewVendorCreditRequestCurrencyFromTransactionCurrencyEnum(value TransactionCurrencyEnum) *VendorCreditRequestCurrency { - return &VendorCreditRequestCurrency{typeName: "transactionCurrencyEnum", TransactionCurrencyEnum: value} +func (v *VendorCreditLineRequest) GetRemoteId() *string { + if v == nil { + return nil + } + return v.RemoteId } -func NewVendorCreditRequestCurrencyFromString(value string) *VendorCreditRequestCurrency { - return &VendorCreditRequestCurrency{typeName: "string", String: value} +func (v *VendorCreditLineRequest) GetNetAmount() *float64 { + if v == nil { + return nil + } + return v.NetAmount } -func (v *VendorCreditRequestCurrency) UnmarshalJSON(data []byte) error { - var valueTransactionCurrencyEnum TransactionCurrencyEnum - if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { - v.typeName = "transactionCurrencyEnum" - v.TransactionCurrencyEnum = valueTransactionCurrencyEnum +func (v *VendorCreditLineRequest) GetTrackingCategory() *string { + if v == nil { return nil } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - v.typeName = "string" - v.String = valueString + return v.TrackingCategory +} + +func (v *VendorCreditLineRequest) GetTrackingCategories() []*string { + if v == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, v) + return v.TrackingCategories } -func (v VendorCreditRequestCurrency) MarshalJSON() ([]byte, error) { - switch v.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", v.typeName, v) - case "transactionCurrencyEnum": - return json.Marshal(v.TransactionCurrencyEnum) - case "string": - return json.Marshal(v.String) +func (v *VendorCreditLineRequest) GetDescription() *string { + if v == nil { + return nil } + return v.Description } -type VendorCreditRequestCurrencyVisitor interface { - VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error - VisitString(string) error +func (v *VendorCreditLineRequest) GetAccount() *VendorCreditLineRequestAccount { + if v == nil { + return nil + } + return v.Account } -func (v *VendorCreditRequestCurrency) Accept(visitor VendorCreditRequestCurrencyVisitor) error { - switch v.typeName { - default: - return fmt.Errorf("invalid type %s in %T", v.typeName, v) - case "transactionCurrencyEnum": - return visitor.VisitTransactionCurrencyEnum(v.TransactionCurrencyEnum) - case "string": - return visitor.VisitString(v.String) +func (v *VendorCreditLineRequest) GetCompany() *string { + if v == nil { + return nil } + return v.Company } -type VendorCreditRequestTrackingCategoriesItem struct { - typeName string - String string - TrackingCategory *TrackingCategory +func (v *VendorCreditLineRequest) GetProject() *VendorCreditLineRequestProject { + if v == nil { + return nil + } + return v.Project +} + +func (v *VendorCreditLineRequest) GetContact() *VendorCreditLineRequestContact { + if v == nil { + return nil + } + return v.Contact +} + +func (v *VendorCreditLineRequest) GetTaxRate() *string { + if v == nil { + return nil + } + return v.TaxRate +} + +func (v *VendorCreditLineRequest) GetExchangeRate() *string { + if v == nil { + return nil + } + return v.ExchangeRate +} + +func (v *VendorCreditLineRequest) GetIntegrationParams() map[string]interface{} { + if v == nil { + return nil + } + return v.IntegrationParams +} + +func (v *VendorCreditLineRequest) GetLinkedAccountParams() map[string]interface{} { + if v == nil { + return nil + } + return v.LinkedAccountParams +} + +func (v *VendorCreditLineRequest) GetExtraProperties() map[string]interface{} { + return v.extraProperties +} + +func (v *VendorCreditLineRequest) UnmarshalJSON(data []byte) error { + type unmarshaler VendorCreditLineRequest + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *v = VendorCreditLineRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *v) + if err != nil { + return err + } + v.extraProperties = extraProperties + v.rawJSON = json.RawMessage(data) + return nil +} + +func (v *VendorCreditLineRequest) String() string { + if len(v.rawJSON) > 0 { + if value, err := internal.StringifyJSON(v.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(v); err == nil { + return value + } + return fmt.Sprintf("%#v", v) +} + +// The line's account. +type VendorCreditLineRequestAccount struct { + String string + Account *Account + + typ string } -func NewVendorCreditRequestTrackingCategoriesItemFromString(value string) *VendorCreditRequestTrackingCategoriesItem { - return &VendorCreditRequestTrackingCategoriesItem{typeName: "string", String: value} +func (v *VendorCreditLineRequestAccount) GetString() string { + if v == nil { + return "" + } + return v.String } -func NewVendorCreditRequestTrackingCategoriesItemFromTrackingCategory(value *TrackingCategory) *VendorCreditRequestTrackingCategoriesItem { - return &VendorCreditRequestTrackingCategoriesItem{typeName: "trackingCategory", TrackingCategory: value} +func (v *VendorCreditLineRequestAccount) GetAccount() *Account { + if v == nil { + return nil + } + return v.Account } -func (v *VendorCreditRequestTrackingCategoriesItem) UnmarshalJSON(data []byte) error { +func (v *VendorCreditLineRequestAccount) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - v.typeName = "string" + v.typ = "String" v.String = valueString return nil } - valueTrackingCategory := new(TrackingCategory) - if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { - v.typeName = "trackingCategory" - v.TrackingCategory = valueTrackingCategory + valueAccount := new(Account) + if err := json.Unmarshal(data, &valueAccount); err == nil { + v.typ = "Account" + v.Account = valueAccount return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, v) } -func (v VendorCreditRequestTrackingCategoriesItem) MarshalJSON() ([]byte, error) { - switch v.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", v.typeName, v) - case "string": +func (v VendorCreditLineRequestAccount) MarshalJSON() ([]byte, error) { + if v.typ == "String" || v.String != "" { return json.Marshal(v.String) - case "trackingCategory": - return json.Marshal(v.TrackingCategory) } + if v.typ == "Account" || v.Account != nil { + return json.Marshal(v.Account) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", v) } -type VendorCreditRequestTrackingCategoriesItemVisitor interface { +type VendorCreditLineRequestAccountVisitor interface { VisitString(string) error - VisitTrackingCategory(*TrackingCategory) error + VisitAccount(*Account) error } -func (v *VendorCreditRequestTrackingCategoriesItem) Accept(visitor VendorCreditRequestTrackingCategoriesItemVisitor) error { - switch v.typeName { - default: - return fmt.Errorf("invalid type %s in %T", v.typeName, v) - case "string": +func (v *VendorCreditLineRequestAccount) Accept(visitor VendorCreditLineRequestAccountVisitor) error { + if v.typ == "String" || v.String != "" { return visitor.VisitString(v.String) - case "trackingCategory": - return visitor.VisitTrackingCategory(v.TrackingCategory) } + if v.typ == "Account" || v.Account != nil { + return visitor.VisitAccount(v.Account) + } + return fmt.Errorf("type %T does not include a non-empty union type", v) } -// The vendor that owes the gift or refund. -type VendorCreditRequestVendor struct { - typeName string - String string - Contact *Contact +type VendorCreditLineRequestContact struct { + String string + Contact *Contact + + typ string } -func NewVendorCreditRequestVendorFromString(value string) *VendorCreditRequestVendor { - return &VendorCreditRequestVendor{typeName: "string", String: value} +func (v *VendorCreditLineRequestContact) GetString() string { + if v == nil { + return "" + } + return v.String } -func NewVendorCreditRequestVendorFromContact(value *Contact) *VendorCreditRequestVendor { - return &VendorCreditRequestVendor{typeName: "contact", Contact: value} +func (v *VendorCreditLineRequestContact) GetContact() *Contact { + if v == nil { + return nil + } + return v.Contact } -func (v *VendorCreditRequestVendor) UnmarshalJSON(data []byte) error { +func (v *VendorCreditLineRequestContact) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - v.typeName = "string" + v.typ = "String" v.String = valueString return nil } valueContact := new(Contact) if err := json.Unmarshal(data, &valueContact); err == nil { - v.typeName = "contact" + v.typ = "Contact" v.Contact = valueContact return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, v) } -func (v VendorCreditRequestVendor) MarshalJSON() ([]byte, error) { - switch v.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", v.typeName, v) - case "string": +func (v VendorCreditLineRequestContact) MarshalJSON() ([]byte, error) { + if v.typ == "String" || v.String != "" { return json.Marshal(v.String) - case "contact": + } + if v.typ == "Contact" || v.Contact != nil { return json.Marshal(v.Contact) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", v) } -type VendorCreditRequestVendorVisitor interface { +type VendorCreditLineRequestContactVisitor interface { VisitString(string) error VisitContact(*Contact) error } -func (v *VendorCreditRequestVendor) Accept(visitor VendorCreditRequestVendorVisitor) error { - switch v.typeName { - default: - return fmt.Errorf("invalid type %s in %T", v.typeName, v) - case "string": +func (v *VendorCreditLineRequestContact) Accept(visitor VendorCreditLineRequestContactVisitor) error { + if v.typ == "String" || v.String != "" { return visitor.VisitString(v.String) - case "contact": + } + if v.typ == "Contact" || v.Contact != nil { return visitor.VisitContact(v.Contact) } + return fmt.Errorf("type %T does not include a non-empty union type", v) } -type VendorCreditResponse struct { - Model *VendorCredit `json:"model,omitempty"` - Warnings []*WarningValidationProblem `json:"warnings,omitempty"` - Errors []*ErrorValidationProblem `json:"errors,omitempty"` - Logs []*DebugModeLog `json:"logs,omitempty"` +type VendorCreditLineRequestProject struct { + String string + Project *Project - _rawJSON json.RawMessage + typ string } -func (v *VendorCreditResponse) UnmarshalJSON(data []byte) error { - type unmarshaler VendorCreditResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (v *VendorCreditLineRequestProject) GetString() string { + if v == nil { + return "" } - *v = VendorCreditResponse(value) - v._rawJSON = json.RawMessage(data) - return nil + return v.String } -func (v *VendorCreditResponse) String() string { - if len(v._rawJSON) > 0 { - if value, err := core.StringifyJSON(v._rawJSON); err == nil { - return value - } +func (v *VendorCreditLineRequestProject) GetProject() *Project { + if v == nil { + return nil } - if value, err := core.StringifyJSON(v); err == nil { - return value + return v.Project +} + +func (v *VendorCreditLineRequestProject) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + v.typ = "String" + v.String = valueString + return nil } - return fmt.Sprintf("%#v", v) + valueProject := new(Project) + if err := json.Unmarshal(data, &valueProject); err == nil { + v.typ = "Project" + v.Project = valueProject + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, v) +} + +func (v VendorCreditLineRequestProject) MarshalJSON() ([]byte, error) { + if v.typ == "String" || v.String != "" { + return json.Marshal(v.String) + } + if v.typ == "Project" || v.Project != nil { + return json.Marshal(v.Project) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", v) +} + +type VendorCreditLineRequestProjectVisitor interface { + VisitString(string) error + VisitProject(*Project) error +} + +func (v *VendorCreditLineRequestProject) Accept(visitor VendorCreditLineRequestProjectVisitor) error { + if v.typ == "String" || v.String != "" { + return visitor.VisitString(v.String) + } + if v.typ == "Project" || v.Project != nil { + return visitor.VisitProject(v.Project) + } + return fmt.Errorf("type %T does not include a non-empty union type", v) } type VendorCreditTrackingCategoriesItem struct { - typeName string String string TrackingCategory *TrackingCategory + + typ string } -func NewVendorCreditTrackingCategoriesItemFromString(value string) *VendorCreditTrackingCategoriesItem { - return &VendorCreditTrackingCategoriesItem{typeName: "string", String: value} +func (v *VendorCreditTrackingCategoriesItem) GetString() string { + if v == nil { + return "" + } + return v.String } -func NewVendorCreditTrackingCategoriesItemFromTrackingCategory(value *TrackingCategory) *VendorCreditTrackingCategoriesItem { - return &VendorCreditTrackingCategoriesItem{typeName: "trackingCategory", TrackingCategory: value} +func (v *VendorCreditTrackingCategoriesItem) GetTrackingCategory() *TrackingCategory { + if v == nil { + return nil + } + return v.TrackingCategory } func (v *VendorCreditTrackingCategoriesItem) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - v.typeName = "string" + v.typ = "String" v.String = valueString return nil } valueTrackingCategory := new(TrackingCategory) if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { - v.typeName = "trackingCategory" + v.typ = "TrackingCategory" v.TrackingCategory = valueTrackingCategory return nil } @@ -47287,14 +24381,13 @@ func (v *VendorCreditTrackingCategoriesItem) UnmarshalJSON(data []byte) error { } func (v VendorCreditTrackingCategoriesItem) MarshalJSON() ([]byte, error) { - switch v.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", v.typeName, v) - case "string": + if v.typ == "String" || v.String != "" { return json.Marshal(v.String) - case "trackingCategory": + } + if v.typ == "TrackingCategory" || v.TrackingCategory != nil { return json.Marshal(v.TrackingCategory) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", v) } type VendorCreditTrackingCategoriesItemVisitor interface { @@ -47303,41 +24396,47 @@ type VendorCreditTrackingCategoriesItemVisitor interface { } func (v *VendorCreditTrackingCategoriesItem) Accept(visitor VendorCreditTrackingCategoriesItemVisitor) error { - switch v.typeName { - default: - return fmt.Errorf("invalid type %s in %T", v.typeName, v) - case "string": + if v.typ == "String" || v.String != "" { return visitor.VisitString(v.String) - case "trackingCategory": + } + if v.typ == "TrackingCategory" || v.TrackingCategory != nil { return visitor.VisitTrackingCategory(v.TrackingCategory) } + return fmt.Errorf("type %T does not include a non-empty union type", v) } // The vendor that owes the gift or refund. type VendorCreditVendor struct { - typeName string - String string - Contact *Contact + String string + Contact *Contact + + typ string } -func NewVendorCreditVendorFromString(value string) *VendorCreditVendor { - return &VendorCreditVendor{typeName: "string", String: value} +func (v *VendorCreditVendor) GetString() string { + if v == nil { + return "" + } + return v.String } -func NewVendorCreditVendorFromContact(value *Contact) *VendorCreditVendor { - return &VendorCreditVendor{typeName: "contact", Contact: value} +func (v *VendorCreditVendor) GetContact() *Contact { + if v == nil { + return nil + } + return v.Contact } func (v *VendorCreditVendor) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - v.typeName = "string" + v.typ = "String" v.String = valueString return nil } valueContact := new(Contact) if err := json.Unmarshal(data, &valueContact); err == nil { - v.typeName = "contact" + v.typ = "Contact" v.Contact = valueContact return nil } @@ -47345,14 +24444,13 @@ func (v *VendorCreditVendor) UnmarshalJSON(data []byte) error { } func (v VendorCreditVendor) MarshalJSON() ([]byte, error) { - switch v.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", v.typeName, v) - case "string": + if v.typ == "String" || v.String != "" { return json.Marshal(v.String) - case "contact": + } + if v.typ == "Contact" || v.Contact != nil { return json.Marshal(v.Contact) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", v) } type VendorCreditVendorVisitor interface { @@ -47361,74 +24459,80 @@ type VendorCreditVendorVisitor interface { } func (v *VendorCreditVendor) Accept(visitor VendorCreditVendorVisitor) error { - switch v.typeName { - default: - return fmt.Errorf("invalid type %s in %T", v.typeName, v) - case "string": + if v.typ == "String" || v.String != "" { return visitor.VisitString(v.String) - case "contact": + } + if v.typ == "Contact" || v.Contact != nil { return visitor.VisitContact(v.Contact) } + return fmt.Errorf("type %T does not include a non-empty union type", v) } type WarningValidationProblem struct { - Source *ValidationProblemSource `json:"source,omitempty"` - Title string `json:"title"` - Detail string `json:"detail"` - ProblemType string `json:"problem_type"` + Source *ValidationProblemSource `json:"source,omitempty" url:"source,omitempty"` + Title string `json:"title" url:"title"` + Detail string `json:"detail" url:"detail"` + ProblemType string `json:"problem_type" url:"problem_type"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (w *WarningValidationProblem) UnmarshalJSON(data []byte) error { - type unmarshaler WarningValidationProblem - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (w *WarningValidationProblem) GetSource() *ValidationProblemSource { + if w == nil { + return nil } - *w = WarningValidationProblem(value) - w._rawJSON = json.RawMessage(data) - return nil + return w.Source } -func (w *WarningValidationProblem) String() string { - if len(w._rawJSON) > 0 { - if value, err := core.StringifyJSON(w._rawJSON); err == nil { - return value - } +func (w *WarningValidationProblem) GetTitle() string { + if w == nil { + return "" } - if value, err := core.StringifyJSON(w); err == nil { - return value + return w.Title +} + +func (w *WarningValidationProblem) GetDetail() string { + if w == nil { + return "" } - return fmt.Sprintf("%#v", w) + return w.Detail } -type WebhookReceiver struct { - Event string `json:"event"` - IsActive bool `json:"is_active"` - Key *string `json:"key,omitempty"` +func (w *WarningValidationProblem) GetProblemType() string { + if w == nil { + return "" + } + return w.ProblemType +} - _rawJSON json.RawMessage +func (w *WarningValidationProblem) GetExtraProperties() map[string]interface{} { + return w.extraProperties } -func (w *WebhookReceiver) UnmarshalJSON(data []byte) error { - type unmarshaler WebhookReceiver +func (w *WarningValidationProblem) UnmarshalJSON(data []byte) error { + type unmarshaler WarningValidationProblem var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *w = WebhookReceiver(value) - w._rawJSON = json.RawMessage(data) + *w = WarningValidationProblem(value) + extraProperties, err := internal.ExtractExtraProperties(data, *w) + if err != nil { + return err + } + w.extraProperties = extraProperties + w.rawJSON = json.RawMessage(data) return nil } -func (w *WebhookReceiver) String() string { - if len(w._rawJSON) > 0 { - if value, err := core.StringifyJSON(w._rawJSON); err == nil { +func (w *WarningValidationProblem) String() string { + if len(w.rawJSON) > 0 { + if value, err := internal.StringifyJSON(w.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(w); err == nil { + if value, err := internal.StringifyJSON(w); err == nil { return value } return fmt.Sprintf("%#v", w) diff --git a/accounting/vendor_credits.go b/accounting/vendor_credits.go index 61c7ba5..80f4b87 100644 --- a/accounting/vendor_credits.go +++ b/accounting/vendor_credits.go @@ -1,272 +1,1531 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package accounting import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type VendorCreditEndpointRequest struct { // Whether to include debug fields (such as log file links) in the response. - IsDebugMode *bool `json:"-"` + IsDebugMode *bool `json:"-" url:"is_debug_mode,omitempty"` // Whether or not third-party updates should be run asynchronously. - RunAsync *bool `json:"-"` - Model *VendorCreditRequest `json:"model,omitempty"` + RunAsync *bool `json:"-" url:"run_async,omitempty"` + Model *VendorCreditRequest `json:"model,omitempty" url:"-"` } type VendorCreditsListRequest struct { // If provided, will only return vendor credits for this company. - CompanyId *string `json:"-"` + CompanyId *string `json:"-" url:"company_id,omitempty"` // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *VendorCreditsListRequestExpand `json:"-"` + Expand []*VendorCreditsListRequestExpandItem `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` // If provided, will only return objects created after this datetime. - TransactionDateAfter *time.Time `json:"-"` + TransactionDateAfter *time.Time `json:"-" url:"transaction_date_after,omitempty"` // If provided, will only return objects created before this datetime. - TransactionDateBefore *time.Time `json:"-"` + TransactionDateBefore *time.Time `json:"-" url:"transaction_date_before,omitempty"` } type VendorCreditsRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *VendorCreditsRetrieveRequestExpand `json:"-"` + Expand []*VendorCreditsRetrieveRequestExpandItem `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` } -type VendorCreditsListRequestExpand string +type VendorCreditsListRequestExpandItem string const ( - VendorCreditsListRequestExpandAccountingPeriod VendorCreditsListRequestExpand = "accounting_period" - VendorCreditsListRequestExpandCompany VendorCreditsListRequestExpand = "company" - VendorCreditsListRequestExpandCompanyAccountingPeriod VendorCreditsListRequestExpand = "company,accounting_period" - VendorCreditsListRequestExpandLines VendorCreditsListRequestExpand = "lines" - VendorCreditsListRequestExpandLinesAccountingPeriod VendorCreditsListRequestExpand = "lines,accounting_period" - VendorCreditsListRequestExpandLinesCompany VendorCreditsListRequestExpand = "lines,company" - VendorCreditsListRequestExpandLinesCompanyAccountingPeriod VendorCreditsListRequestExpand = "lines,company,accounting_period" - VendorCreditsListRequestExpandLinesTrackingCategories VendorCreditsListRequestExpand = "lines,tracking_categories" - VendorCreditsListRequestExpandLinesTrackingCategoriesAccountingPeriod VendorCreditsListRequestExpand = "lines,tracking_categories,accounting_period" - VendorCreditsListRequestExpandLinesTrackingCategoriesCompany VendorCreditsListRequestExpand = "lines,tracking_categories,company" - VendorCreditsListRequestExpandLinesTrackingCategoriesCompanyAccountingPeriod VendorCreditsListRequestExpand = "lines,tracking_categories,company,accounting_period" - VendorCreditsListRequestExpandLinesTrackingCategoriesVendor VendorCreditsListRequestExpand = "lines,tracking_categories,vendor" - VendorCreditsListRequestExpandLinesTrackingCategoriesVendorAccountingPeriod VendorCreditsListRequestExpand = "lines,tracking_categories,vendor,accounting_period" - VendorCreditsListRequestExpandLinesTrackingCategoriesVendorCompany VendorCreditsListRequestExpand = "lines,tracking_categories,vendor,company" - VendorCreditsListRequestExpandLinesTrackingCategoriesVendorCompanyAccountingPeriod VendorCreditsListRequestExpand = "lines,tracking_categories,vendor,company,accounting_period" - VendorCreditsListRequestExpandLinesVendor VendorCreditsListRequestExpand = "lines,vendor" - VendorCreditsListRequestExpandLinesVendorAccountingPeriod VendorCreditsListRequestExpand = "lines,vendor,accounting_period" - VendorCreditsListRequestExpandLinesVendorCompany VendorCreditsListRequestExpand = "lines,vendor,company" - VendorCreditsListRequestExpandLinesVendorCompanyAccountingPeriod VendorCreditsListRequestExpand = "lines,vendor,company,accounting_period" - VendorCreditsListRequestExpandTrackingCategories VendorCreditsListRequestExpand = "tracking_categories" - VendorCreditsListRequestExpandTrackingCategoriesAccountingPeriod VendorCreditsListRequestExpand = "tracking_categories,accounting_period" - VendorCreditsListRequestExpandTrackingCategoriesCompany VendorCreditsListRequestExpand = "tracking_categories,company" - VendorCreditsListRequestExpandTrackingCategoriesCompanyAccountingPeriod VendorCreditsListRequestExpand = "tracking_categories,company,accounting_period" - VendorCreditsListRequestExpandTrackingCategoriesVendor VendorCreditsListRequestExpand = "tracking_categories,vendor" - VendorCreditsListRequestExpandTrackingCategoriesVendorAccountingPeriod VendorCreditsListRequestExpand = "tracking_categories,vendor,accounting_period" - VendorCreditsListRequestExpandTrackingCategoriesVendorCompany VendorCreditsListRequestExpand = "tracking_categories,vendor,company" - VendorCreditsListRequestExpandTrackingCategoriesVendorCompanyAccountingPeriod VendorCreditsListRequestExpand = "tracking_categories,vendor,company,accounting_period" - VendorCreditsListRequestExpandVendor VendorCreditsListRequestExpand = "vendor" - VendorCreditsListRequestExpandVendorAccountingPeriod VendorCreditsListRequestExpand = "vendor,accounting_period" - VendorCreditsListRequestExpandVendorCompany VendorCreditsListRequestExpand = "vendor,company" - VendorCreditsListRequestExpandVendorCompanyAccountingPeriod VendorCreditsListRequestExpand = "vendor,company,accounting_period" + VendorCreditsListRequestExpandItemAccountingPeriod VendorCreditsListRequestExpandItem = "accounting_period" + VendorCreditsListRequestExpandItemCompany VendorCreditsListRequestExpandItem = "company" + VendorCreditsListRequestExpandItemLines VendorCreditsListRequestExpandItem = "lines" + VendorCreditsListRequestExpandItemTrackingCategories VendorCreditsListRequestExpandItem = "tracking_categories" + VendorCreditsListRequestExpandItemVendor VendorCreditsListRequestExpandItem = "vendor" ) -func NewVendorCreditsListRequestExpandFromString(s string) (VendorCreditsListRequestExpand, error) { +func NewVendorCreditsListRequestExpandItemFromString(s string) (VendorCreditsListRequestExpandItem, error) { switch s { case "accounting_period": - return VendorCreditsListRequestExpandAccountingPeriod, nil + return VendorCreditsListRequestExpandItemAccountingPeriod, nil case "company": - return VendorCreditsListRequestExpandCompany, nil - case "company,accounting_period": - return VendorCreditsListRequestExpandCompanyAccountingPeriod, nil + return VendorCreditsListRequestExpandItemCompany, nil case "lines": - return VendorCreditsListRequestExpandLines, nil - case "lines,accounting_period": - return VendorCreditsListRequestExpandLinesAccountingPeriod, nil - case "lines,company": - return VendorCreditsListRequestExpandLinesCompany, nil - case "lines,company,accounting_period": - return VendorCreditsListRequestExpandLinesCompanyAccountingPeriod, nil - case "lines,tracking_categories": - return VendorCreditsListRequestExpandLinesTrackingCategories, nil - case "lines,tracking_categories,accounting_period": - return VendorCreditsListRequestExpandLinesTrackingCategoriesAccountingPeriod, nil - case "lines,tracking_categories,company": - return VendorCreditsListRequestExpandLinesTrackingCategoriesCompany, nil - case "lines,tracking_categories,company,accounting_period": - return VendorCreditsListRequestExpandLinesTrackingCategoriesCompanyAccountingPeriod, nil - case "lines,tracking_categories,vendor": - return VendorCreditsListRequestExpandLinesTrackingCategoriesVendor, nil - case "lines,tracking_categories,vendor,accounting_period": - return VendorCreditsListRequestExpandLinesTrackingCategoriesVendorAccountingPeriod, nil - case "lines,tracking_categories,vendor,company": - return VendorCreditsListRequestExpandLinesTrackingCategoriesVendorCompany, nil - case "lines,tracking_categories,vendor,company,accounting_period": - return VendorCreditsListRequestExpandLinesTrackingCategoriesVendorCompanyAccountingPeriod, nil - case "lines,vendor": - return VendorCreditsListRequestExpandLinesVendor, nil - case "lines,vendor,accounting_period": - return VendorCreditsListRequestExpandLinesVendorAccountingPeriod, nil - case "lines,vendor,company": - return VendorCreditsListRequestExpandLinesVendorCompany, nil - case "lines,vendor,company,accounting_period": - return VendorCreditsListRequestExpandLinesVendorCompanyAccountingPeriod, nil + return VendorCreditsListRequestExpandItemLines, nil case "tracking_categories": - return VendorCreditsListRequestExpandTrackingCategories, nil - case "tracking_categories,accounting_period": - return VendorCreditsListRequestExpandTrackingCategoriesAccountingPeriod, nil - case "tracking_categories,company": - return VendorCreditsListRequestExpandTrackingCategoriesCompany, nil - case "tracking_categories,company,accounting_period": - return VendorCreditsListRequestExpandTrackingCategoriesCompanyAccountingPeriod, nil - case "tracking_categories,vendor": - return VendorCreditsListRequestExpandTrackingCategoriesVendor, nil - case "tracking_categories,vendor,accounting_period": - return VendorCreditsListRequestExpandTrackingCategoriesVendorAccountingPeriod, nil - case "tracking_categories,vendor,company": - return VendorCreditsListRequestExpandTrackingCategoriesVendorCompany, nil - case "tracking_categories,vendor,company,accounting_period": - return VendorCreditsListRequestExpandTrackingCategoriesVendorCompanyAccountingPeriod, nil + return VendorCreditsListRequestExpandItemTrackingCategories, nil case "vendor": - return VendorCreditsListRequestExpandVendor, nil - case "vendor,accounting_period": - return VendorCreditsListRequestExpandVendorAccountingPeriod, nil - case "vendor,company": - return VendorCreditsListRequestExpandVendorCompany, nil - case "vendor,company,accounting_period": - return VendorCreditsListRequestExpandVendorCompanyAccountingPeriod, nil - } - var t VendorCreditsListRequestExpand + return VendorCreditsListRequestExpandItemVendor, nil + } + var t VendorCreditsListRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (v VendorCreditsListRequestExpand) Ptr() *VendorCreditsListRequestExpand { +func (v VendorCreditsListRequestExpandItem) Ptr() *VendorCreditsListRequestExpandItem { return &v } -type VendorCreditsRetrieveRequestExpand string +type VendorCreditsRetrieveRequestExpandItem string const ( - VendorCreditsRetrieveRequestExpandAccountingPeriod VendorCreditsRetrieveRequestExpand = "accounting_period" - VendorCreditsRetrieveRequestExpandCompany VendorCreditsRetrieveRequestExpand = "company" - VendorCreditsRetrieveRequestExpandCompanyAccountingPeriod VendorCreditsRetrieveRequestExpand = "company,accounting_period" - VendorCreditsRetrieveRequestExpandLines VendorCreditsRetrieveRequestExpand = "lines" - VendorCreditsRetrieveRequestExpandLinesAccountingPeriod VendorCreditsRetrieveRequestExpand = "lines,accounting_period" - VendorCreditsRetrieveRequestExpandLinesCompany VendorCreditsRetrieveRequestExpand = "lines,company" - VendorCreditsRetrieveRequestExpandLinesCompanyAccountingPeriod VendorCreditsRetrieveRequestExpand = "lines,company,accounting_period" - VendorCreditsRetrieveRequestExpandLinesTrackingCategories VendorCreditsRetrieveRequestExpand = "lines,tracking_categories" - VendorCreditsRetrieveRequestExpandLinesTrackingCategoriesAccountingPeriod VendorCreditsRetrieveRequestExpand = "lines,tracking_categories,accounting_period" - VendorCreditsRetrieveRequestExpandLinesTrackingCategoriesCompany VendorCreditsRetrieveRequestExpand = "lines,tracking_categories,company" - VendorCreditsRetrieveRequestExpandLinesTrackingCategoriesCompanyAccountingPeriod VendorCreditsRetrieveRequestExpand = "lines,tracking_categories,company,accounting_period" - VendorCreditsRetrieveRequestExpandLinesTrackingCategoriesVendor VendorCreditsRetrieveRequestExpand = "lines,tracking_categories,vendor" - VendorCreditsRetrieveRequestExpandLinesTrackingCategoriesVendorAccountingPeriod VendorCreditsRetrieveRequestExpand = "lines,tracking_categories,vendor,accounting_period" - VendorCreditsRetrieveRequestExpandLinesTrackingCategoriesVendorCompany VendorCreditsRetrieveRequestExpand = "lines,tracking_categories,vendor,company" - VendorCreditsRetrieveRequestExpandLinesTrackingCategoriesVendorCompanyAccountingPeriod VendorCreditsRetrieveRequestExpand = "lines,tracking_categories,vendor,company,accounting_period" - VendorCreditsRetrieveRequestExpandLinesVendor VendorCreditsRetrieveRequestExpand = "lines,vendor" - VendorCreditsRetrieveRequestExpandLinesVendorAccountingPeriod VendorCreditsRetrieveRequestExpand = "lines,vendor,accounting_period" - VendorCreditsRetrieveRequestExpandLinesVendorCompany VendorCreditsRetrieveRequestExpand = "lines,vendor,company" - VendorCreditsRetrieveRequestExpandLinesVendorCompanyAccountingPeriod VendorCreditsRetrieveRequestExpand = "lines,vendor,company,accounting_period" - VendorCreditsRetrieveRequestExpandTrackingCategories VendorCreditsRetrieveRequestExpand = "tracking_categories" - VendorCreditsRetrieveRequestExpandTrackingCategoriesAccountingPeriod VendorCreditsRetrieveRequestExpand = "tracking_categories,accounting_period" - VendorCreditsRetrieveRequestExpandTrackingCategoriesCompany VendorCreditsRetrieveRequestExpand = "tracking_categories,company" - VendorCreditsRetrieveRequestExpandTrackingCategoriesCompanyAccountingPeriod VendorCreditsRetrieveRequestExpand = "tracking_categories,company,accounting_period" - VendorCreditsRetrieveRequestExpandTrackingCategoriesVendor VendorCreditsRetrieveRequestExpand = "tracking_categories,vendor" - VendorCreditsRetrieveRequestExpandTrackingCategoriesVendorAccountingPeriod VendorCreditsRetrieveRequestExpand = "tracking_categories,vendor,accounting_period" - VendorCreditsRetrieveRequestExpandTrackingCategoriesVendorCompany VendorCreditsRetrieveRequestExpand = "tracking_categories,vendor,company" - VendorCreditsRetrieveRequestExpandTrackingCategoriesVendorCompanyAccountingPeriod VendorCreditsRetrieveRequestExpand = "tracking_categories,vendor,company,accounting_period" - VendorCreditsRetrieveRequestExpandVendor VendorCreditsRetrieveRequestExpand = "vendor" - VendorCreditsRetrieveRequestExpandVendorAccountingPeriod VendorCreditsRetrieveRequestExpand = "vendor,accounting_period" - VendorCreditsRetrieveRequestExpandVendorCompany VendorCreditsRetrieveRequestExpand = "vendor,company" - VendorCreditsRetrieveRequestExpandVendorCompanyAccountingPeriod VendorCreditsRetrieveRequestExpand = "vendor,company,accounting_period" + VendorCreditsRetrieveRequestExpandItemAccountingPeriod VendorCreditsRetrieveRequestExpandItem = "accounting_period" + VendorCreditsRetrieveRequestExpandItemCompany VendorCreditsRetrieveRequestExpandItem = "company" + VendorCreditsRetrieveRequestExpandItemLines VendorCreditsRetrieveRequestExpandItem = "lines" + VendorCreditsRetrieveRequestExpandItemTrackingCategories VendorCreditsRetrieveRequestExpandItem = "tracking_categories" + VendorCreditsRetrieveRequestExpandItemVendor VendorCreditsRetrieveRequestExpandItem = "vendor" ) -func NewVendorCreditsRetrieveRequestExpandFromString(s string) (VendorCreditsRetrieveRequestExpand, error) { +func NewVendorCreditsRetrieveRequestExpandItemFromString(s string) (VendorCreditsRetrieveRequestExpandItem, error) { switch s { case "accounting_period": - return VendorCreditsRetrieveRequestExpandAccountingPeriod, nil + return VendorCreditsRetrieveRequestExpandItemAccountingPeriod, nil case "company": - return VendorCreditsRetrieveRequestExpandCompany, nil - case "company,accounting_period": - return VendorCreditsRetrieveRequestExpandCompanyAccountingPeriod, nil + return VendorCreditsRetrieveRequestExpandItemCompany, nil case "lines": - return VendorCreditsRetrieveRequestExpandLines, nil - case "lines,accounting_period": - return VendorCreditsRetrieveRequestExpandLinesAccountingPeriod, nil - case "lines,company": - return VendorCreditsRetrieveRequestExpandLinesCompany, nil - case "lines,company,accounting_period": - return VendorCreditsRetrieveRequestExpandLinesCompanyAccountingPeriod, nil - case "lines,tracking_categories": - return VendorCreditsRetrieveRequestExpandLinesTrackingCategories, nil - case "lines,tracking_categories,accounting_period": - return VendorCreditsRetrieveRequestExpandLinesTrackingCategoriesAccountingPeriod, nil - case "lines,tracking_categories,company": - return VendorCreditsRetrieveRequestExpandLinesTrackingCategoriesCompany, nil - case "lines,tracking_categories,company,accounting_period": - return VendorCreditsRetrieveRequestExpandLinesTrackingCategoriesCompanyAccountingPeriod, nil - case "lines,tracking_categories,vendor": - return VendorCreditsRetrieveRequestExpandLinesTrackingCategoriesVendor, nil - case "lines,tracking_categories,vendor,accounting_period": - return VendorCreditsRetrieveRequestExpandLinesTrackingCategoriesVendorAccountingPeriod, nil - case "lines,tracking_categories,vendor,company": - return VendorCreditsRetrieveRequestExpandLinesTrackingCategoriesVendorCompany, nil - case "lines,tracking_categories,vendor,company,accounting_period": - return VendorCreditsRetrieveRequestExpandLinesTrackingCategoriesVendorCompanyAccountingPeriod, nil - case "lines,vendor": - return VendorCreditsRetrieveRequestExpandLinesVendor, nil - case "lines,vendor,accounting_period": - return VendorCreditsRetrieveRequestExpandLinesVendorAccountingPeriod, nil - case "lines,vendor,company": - return VendorCreditsRetrieveRequestExpandLinesVendorCompany, nil - case "lines,vendor,company,accounting_period": - return VendorCreditsRetrieveRequestExpandLinesVendorCompanyAccountingPeriod, nil + return VendorCreditsRetrieveRequestExpandItemLines, nil case "tracking_categories": - return VendorCreditsRetrieveRequestExpandTrackingCategories, nil - case "tracking_categories,accounting_period": - return VendorCreditsRetrieveRequestExpandTrackingCategoriesAccountingPeriod, nil - case "tracking_categories,company": - return VendorCreditsRetrieveRequestExpandTrackingCategoriesCompany, nil - case "tracking_categories,company,accounting_period": - return VendorCreditsRetrieveRequestExpandTrackingCategoriesCompanyAccountingPeriod, nil - case "tracking_categories,vendor": - return VendorCreditsRetrieveRequestExpandTrackingCategoriesVendor, nil - case "tracking_categories,vendor,accounting_period": - return VendorCreditsRetrieveRequestExpandTrackingCategoriesVendorAccountingPeriod, nil - case "tracking_categories,vendor,company": - return VendorCreditsRetrieveRequestExpandTrackingCategoriesVendorCompany, nil - case "tracking_categories,vendor,company,accounting_period": - return VendorCreditsRetrieveRequestExpandTrackingCategoriesVendorCompanyAccountingPeriod, nil + return VendorCreditsRetrieveRequestExpandItemTrackingCategories, nil case "vendor": - return VendorCreditsRetrieveRequestExpandVendor, nil - case "vendor,accounting_period": - return VendorCreditsRetrieveRequestExpandVendorAccountingPeriod, nil - case "vendor,company": - return VendorCreditsRetrieveRequestExpandVendorCompany, nil - case "vendor,company,accounting_period": - return VendorCreditsRetrieveRequestExpandVendorCompanyAccountingPeriod, nil - } - var t VendorCreditsRetrieveRequestExpand + return VendorCreditsRetrieveRequestExpandItemVendor, nil + } + var t VendorCreditsRetrieveRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (v VendorCreditsRetrieveRequestExpand) Ptr() *VendorCreditsRetrieveRequestExpand { +func (v VendorCreditsRetrieveRequestExpandItem) Ptr() *VendorCreditsRetrieveRequestExpandItem { return &v } + +type PaginatedVendorCreditList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*VendorCredit `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedVendorCreditList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedVendorCreditList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedVendorCreditList) GetResults() []*VendorCredit { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedVendorCreditList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedVendorCreditList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedVendorCreditList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedVendorCreditList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedVendorCreditList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +// # The VendorCreditApplyLine Object +// ### Description +// The `VendorCreditApplyLine` object is used to represent a applied vendor credit. +// +// ### Usage Example +// Fetch from the `GET VendorCredit` endpoint and view the vendor credit's applied to lines. +type VendorCreditApplyLineForVendorCreditRequest struct { + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + Invoice *VendorCreditApplyLineForVendorCreditRequestInvoice `json:"invoice,omitempty" url:"invoice,omitempty"` + // Date that the vendor credit is applied to the invoice. + AppliedDate *time.Time `json:"applied_date,omitempty" url:"applied_date,omitempty"` + // The amount of the VendorCredit applied to the invoice. + AppliedAmount *string `json:"applied_amount,omitempty" url:"applied_amount,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (v *VendorCreditApplyLineForVendorCreditRequest) GetRemoteId() *string { + if v == nil { + return nil + } + return v.RemoteId +} + +func (v *VendorCreditApplyLineForVendorCreditRequest) GetInvoice() *VendorCreditApplyLineForVendorCreditRequestInvoice { + if v == nil { + return nil + } + return v.Invoice +} + +func (v *VendorCreditApplyLineForVendorCreditRequest) GetAppliedDate() *time.Time { + if v == nil { + return nil + } + return v.AppliedDate +} + +func (v *VendorCreditApplyLineForVendorCreditRequest) GetAppliedAmount() *string { + if v == nil { + return nil + } + return v.AppliedAmount +} + +func (v *VendorCreditApplyLineForVendorCreditRequest) GetIntegrationParams() map[string]interface{} { + if v == nil { + return nil + } + return v.IntegrationParams +} + +func (v *VendorCreditApplyLineForVendorCreditRequest) GetLinkedAccountParams() map[string]interface{} { + if v == nil { + return nil + } + return v.LinkedAccountParams +} + +func (v *VendorCreditApplyLineForVendorCreditRequest) GetExtraProperties() map[string]interface{} { + return v.extraProperties +} + +func (v *VendorCreditApplyLineForVendorCreditRequest) UnmarshalJSON(data []byte) error { + type embed VendorCreditApplyLineForVendorCreditRequest + var unmarshaler = struct { + embed + AppliedDate *internal.DateTime `json:"applied_date,omitempty"` + }{ + embed: embed(*v), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *v = VendorCreditApplyLineForVendorCreditRequest(unmarshaler.embed) + v.AppliedDate = unmarshaler.AppliedDate.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *v) + if err != nil { + return err + } + v.extraProperties = extraProperties + v.rawJSON = json.RawMessage(data) + return nil +} + +func (v *VendorCreditApplyLineForVendorCreditRequest) MarshalJSON() ([]byte, error) { + type embed VendorCreditApplyLineForVendorCreditRequest + var marshaler = struct { + embed + AppliedDate *internal.DateTime `json:"applied_date,omitempty"` + }{ + embed: embed(*v), + AppliedDate: internal.NewOptionalDateTime(v.AppliedDate), + } + return json.Marshal(marshaler) +} + +func (v *VendorCreditApplyLineForVendorCreditRequest) String() string { + if len(v.rawJSON) > 0 { + if value, err := internal.StringifyJSON(v.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(v); err == nil { + return value + } + return fmt.Sprintf("%#v", v) +} + +type VendorCreditApplyLineForVendorCreditRequestInvoice struct { + String string + Invoice *Invoice + + typ string +} + +func (v *VendorCreditApplyLineForVendorCreditRequestInvoice) GetString() string { + if v == nil { + return "" + } + return v.String +} + +func (v *VendorCreditApplyLineForVendorCreditRequestInvoice) GetInvoice() *Invoice { + if v == nil { + return nil + } + return v.Invoice +} + +func (v *VendorCreditApplyLineForVendorCreditRequestInvoice) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + v.typ = "String" + v.String = valueString + return nil + } + valueInvoice := new(Invoice) + if err := json.Unmarshal(data, &valueInvoice); err == nil { + v.typ = "Invoice" + v.Invoice = valueInvoice + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, v) +} + +func (v VendorCreditApplyLineForVendorCreditRequestInvoice) MarshalJSON() ([]byte, error) { + if v.typ == "String" || v.String != "" { + return json.Marshal(v.String) + } + if v.typ == "Invoice" || v.Invoice != nil { + return json.Marshal(v.Invoice) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", v) +} + +type VendorCreditApplyLineForVendorCreditRequestInvoiceVisitor interface { + VisitString(string) error + VisitInvoice(*Invoice) error +} + +func (v *VendorCreditApplyLineForVendorCreditRequestInvoice) Accept(visitor VendorCreditApplyLineForVendorCreditRequestInvoiceVisitor) error { + if v.typ == "String" || v.String != "" { + return visitor.VisitString(v.String) + } + if v.typ == "Invoice" || v.Invoice != nil { + return visitor.VisitInvoice(v.Invoice) + } + return fmt.Errorf("type %T does not include a non-empty union type", v) +} + +// # The VendorCredit Object +// ### Description +// A `VendorCredit` is transaction issued by a vendor to the accounting company, indicating a reduction or cancellation of the amount owed to the vendor. It is most generally used as an adjustment note used to rectify errors, returns, or overpayments related to a purchasing transaction. A `VendorCredit` can be applied to `Accounts Payable` Invoices to decrease the overall amount of the `Invoice`. +// +// ### Usage Example +// Fetch from the `GET VendorCredit` endpoint and view a company's vendor credits. +type VendorCreditRequest struct { + // The vendor credit's number. + Number *string `json:"number,omitempty" url:"number,omitempty"` + // The vendor credit's transaction date. + TransactionDate *time.Time `json:"transaction_date,omitempty" url:"transaction_date,omitempty"` + // The vendor that owes the gift or refund. + Vendor *VendorCreditRequestVendor `json:"vendor,omitempty" url:"vendor,omitempty"` + // The vendor credit's total amount. + TotalAmount *float64 `json:"total_amount,omitempty" url:"total_amount,omitempty"` + // The vendor credit's currency. + // + // * `XUA` - ADB Unit of Account + // * `AFN` - Afghan Afghani + // * `AFA` - Afghan Afghani (1927–2002) + // * `ALL` - Albanian Lek + // * `ALK` - Albanian Lek (1946–1965) + // * `DZD` - Algerian Dinar + // * `ADP` - Andorran Peseta + // * `AOA` - Angolan Kwanza + // * `AOK` - Angolan Kwanza (1977–1991) + // * `AON` - Angolan New Kwanza (1990–2000) + // * `AOR` - Angolan Readjusted Kwanza (1995–1999) + // * `ARA` - Argentine Austral + // * `ARS` - Argentine Peso + // * `ARM` - Argentine Peso (1881–1970) + // * `ARP` - Argentine Peso (1983–1985) + // * `ARL` - Argentine Peso Ley (1970–1983) + // * `AMD` - Armenian Dram + // * `AWG` - Aruban Florin + // * `AUD` - Australian Dollar + // * `ATS` - Austrian Schilling + // * `AZN` - Azerbaijani Manat + // * `AZM` - Azerbaijani Manat (1993–2006) + // * `BSD` - Bahamian Dollar + // * `BHD` - Bahraini Dinar + // * `BDT` - Bangladeshi Taka + // * `BBD` - Barbadian Dollar + // * `BYN` - Belarusian Ruble + // * `BYB` - Belarusian Ruble (1994–1999) + // * `BYR` - Belarusian Ruble (2000–2016) + // * `BEF` - Belgian Franc + // * `BEC` - Belgian Franc (convertible) + // * `BEL` - Belgian Franc (financial) + // * `BZD` - Belize Dollar + // * `BMD` - Bermudan Dollar + // * `BTN` - Bhutanese Ngultrum + // * `BOB` - Bolivian Boliviano + // * `BOL` - Bolivian Boliviano (1863–1963) + // * `BOV` - Bolivian Mvdol + // * `BOP` - Bolivian Peso + // * `BAM` - Bosnia-Herzegovina Convertible Mark + // * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + // * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + // * `BWP` - Botswanan Pula + // * `BRC` - Brazilian Cruzado (1986–1989) + // * `BRZ` - Brazilian Cruzeiro (1942–1967) + // * `BRE` - Brazilian Cruzeiro (1990–1993) + // * `BRR` - Brazilian Cruzeiro (1993–1994) + // * `BRN` - Brazilian New Cruzado (1989–1990) + // * `BRB` - Brazilian New Cruzeiro (1967–1986) + // * `BRL` - Brazilian Real + // * `GBP` - British Pound + // * `BND` - Brunei Dollar + // * `BGL` - Bulgarian Hard Lev + // * `BGN` - Bulgarian Lev + // * `BGO` - Bulgarian Lev (1879–1952) + // * `BGM` - Bulgarian Socialist Lev + // * `BUK` - Burmese Kyat + // * `BIF` - Burundian Franc + // * `XPF` - CFP Franc + // * `KHR` - Cambodian Riel + // * `CAD` - Canadian Dollar + // * `CVE` - Cape Verdean Escudo + // * `KYD` - Cayman Islands Dollar + // * `XAF` - Central African CFA Franc + // * `CLE` - Chilean Escudo + // * `CLP` - Chilean Peso + // * `CLF` - Chilean Unit of Account (UF) + // * `CNX` - Chinese People’s Bank Dollar + // * `CNY` - Chinese Yuan + // * `CNH` - Chinese Yuan (offshore) + // * `COP` - Colombian Peso + // * `COU` - Colombian Real Value Unit + // * `KMF` - Comorian Franc + // * `CDF` - Congolese Franc + // * `CRC` - Costa Rican Colón + // * `HRD` - Croatian Dinar + // * `HRK` - Croatian Kuna + // * `CUC` - Cuban Convertible Peso + // * `CUP` - Cuban Peso + // * `CYP` - Cypriot Pound + // * `CZK` - Czech Koruna + // * `CSK` - Czechoslovak Hard Koruna + // * `DKK` - Danish Krone + // * `DJF` - Djiboutian Franc + // * `DOP` - Dominican Peso + // * `NLG` - Dutch Guilder + // * `XCD` - East Caribbean Dollar + // * `DDM` - East German Mark + // * `ECS` - Ecuadorian Sucre + // * `ECV` - Ecuadorian Unit of Constant Value + // * `EGP` - Egyptian Pound + // * `GQE` - Equatorial Guinean Ekwele + // * `ERN` - Eritrean Nakfa + // * `EEK` - Estonian Kroon + // * `ETB` - Ethiopian Birr + // * `EUR` - Euro + // * `XBA` - European Composite Unit + // * `XEU` - European Currency Unit + // * `XBB` - European Monetary Unit + // * `XBC` - European Unit of Account (XBC) + // * `XBD` - European Unit of Account (XBD) + // * `FKP` - Falkland Islands Pound + // * `FJD` - Fijian Dollar + // * `FIM` - Finnish Markka + // * `FRF` - French Franc + // * `XFO` - French Gold Franc + // * `XFU` - French UIC-Franc + // * `GMD` - Gambian Dalasi + // * `GEK` - Georgian Kupon Larit + // * `GEL` - Georgian Lari + // * `DEM` - German Mark + // * `GHS` - Ghanaian Cedi + // * `GHC` - Ghanaian Cedi (1979–2007) + // * `GIP` - Gibraltar Pound + // * `XAU` - Gold + // * `GRD` - Greek Drachma + // * `GTQ` - Guatemalan Quetzal + // * `GWP` - Guinea-Bissau Peso + // * `GNF` - Guinean Franc + // * `GNS` - Guinean Syli + // * `GYD` - Guyanaese Dollar + // * `HTG` - Haitian Gourde + // * `HNL` - Honduran Lempira + // * `HKD` - Hong Kong Dollar + // * `HUF` - Hungarian Forint + // * `IMP` - IMP + // * `ISK` - Icelandic Króna + // * `ISJ` - Icelandic Króna (1918–1981) + // * `INR` - Indian Rupee + // * `IDR` - Indonesian Rupiah + // * `IRR` - Iranian Rial + // * `IQD` - Iraqi Dinar + // * `IEP` - Irish Pound + // * `ILS` - Israeli New Shekel + // * `ILP` - Israeli Pound + // * `ILR` - Israeli Shekel (1980–1985) + // * `ITL` - Italian Lira + // * `JMD` - Jamaican Dollar + // * `JPY` - Japanese Yen + // * `JOD` - Jordanian Dinar + // * `KZT` - Kazakhstani Tenge + // * `KES` - Kenyan Shilling + // * `KWD` - Kuwaiti Dinar + // * `KGS` - Kyrgystani Som + // * `LAK` - Laotian Kip + // * `LVL` - Latvian Lats + // * `LVR` - Latvian Ruble + // * `LBP` - Lebanese Pound + // * `LSL` - Lesotho Loti + // * `LRD` - Liberian Dollar + // * `LYD` - Libyan Dinar + // * `LTL` - Lithuanian Litas + // * `LTT` - Lithuanian Talonas + // * `LUL` - Luxembourg Financial Franc + // * `LUC` - Luxembourgian Convertible Franc + // * `LUF` - Luxembourgian Franc + // * `MOP` - Macanese Pataca + // * `MKD` - Macedonian Denar + // * `MKN` - Macedonian Denar (1992–1993) + // * `MGA` - Malagasy Ariary + // * `MGF` - Malagasy Franc + // * `MWK` - Malawian Kwacha + // * `MYR` - Malaysian Ringgit + // * `MVR` - Maldivian Rufiyaa + // * `MVP` - Maldivian Rupee (1947–1981) + // * `MLF` - Malian Franc + // * `MTL` - Maltese Lira + // * `MTP` - Maltese Pound + // * `MRU` - Mauritanian Ouguiya + // * `MRO` - Mauritanian Ouguiya (1973–2017) + // * `MUR` - Mauritian Rupee + // * `MXV` - Mexican Investment Unit + // * `MXN` - Mexican Peso + // * `MXP` - Mexican Silver Peso (1861–1992) + // * `MDC` - Moldovan Cupon + // * `MDL` - Moldovan Leu + // * `MCF` - Monegasque Franc + // * `MNT` - Mongolian Tugrik + // * `MAD` - Moroccan Dirham + // * `MAF` - Moroccan Franc + // * `MZE` - Mozambican Escudo + // * `MZN` - Mozambican Metical + // * `MZM` - Mozambican Metical (1980–2006) + // * `MMK` - Myanmar Kyat + // * `NAD` - Namibian Dollar + // * `NPR` - Nepalese Rupee + // * `ANG` - Netherlands Antillean Guilder + // * `TWD` - New Taiwan Dollar + // * `NZD` - New Zealand Dollar + // * `NIO` - Nicaraguan Córdoba + // * `NIC` - Nicaraguan Córdoba (1988–1991) + // * `NGN` - Nigerian Naira + // * `KPW` - North Korean Won + // * `NOK` - Norwegian Krone + // * `OMR` - Omani Rial + // * `PKR` - Pakistani Rupee + // * `XPD` - Palladium + // * `PAB` - Panamanian Balboa + // * `PGK` - Papua New Guinean Kina + // * `PYG` - Paraguayan Guarani + // * `PEI` - Peruvian Inti + // * `PEN` - Peruvian Sol + // * `PES` - Peruvian Sol (1863–1965) + // * `PHP` - Philippine Peso + // * `XPT` - Platinum + // * `PLN` - Polish Zloty + // * `PLZ` - Polish Zloty (1950–1995) + // * `PTE` - Portuguese Escudo + // * `GWE` - Portuguese Guinea Escudo + // * `QAR` - Qatari Rial + // * `XRE` - RINET Funds + // * `RHD` - Rhodesian Dollar + // * `RON` - Romanian Leu + // * `ROL` - Romanian Leu (1952–2006) + // * `RUB` - Russian Ruble + // * `RUR` - Russian Ruble (1991–1998) + // * `RWF` - Rwandan Franc + // * `SVC` - Salvadoran Colón + // * `WST` - Samoan Tala + // * `SAR` - Saudi Riyal + // * `RSD` - Serbian Dinar + // * `CSD` - Serbian Dinar (2002–2006) + // * `SCR` - Seychellois Rupee + // * `SLL` - Sierra Leonean Leone + // * `XAG` - Silver + // * `SGD` - Singapore Dollar + // * `SKK` - Slovak Koruna + // * `SIT` - Slovenian Tolar + // * `SBD` - Solomon Islands Dollar + // * `SOS` - Somali Shilling + // * `ZAR` - South African Rand + // * `ZAL` - South African Rand (financial) + // * `KRH` - South Korean Hwan (1953–1962) + // * `KRW` - South Korean Won + // * `KRO` - South Korean Won (1945–1953) + // * `SSP` - South Sudanese Pound + // * `SUR` - Soviet Rouble + // * `ESP` - Spanish Peseta + // * `ESA` - Spanish Peseta (A account) + // * `ESB` - Spanish Peseta (convertible account) + // * `XDR` - Special Drawing Rights + // * `LKR` - Sri Lankan Rupee + // * `SHP` - St. Helena Pound + // * `XSU` - Sucre + // * `SDD` - Sudanese Dinar (1992–2007) + // * `SDG` - Sudanese Pound + // * `SDP` - Sudanese Pound (1957–1998) + // * `SRD` - Surinamese Dollar + // * `SRG` - Surinamese Guilder + // * `SZL` - Swazi Lilangeni + // * `SEK` - Swedish Krona + // * `CHF` - Swiss Franc + // * `SYP` - Syrian Pound + // * `STN` - São Tomé & Príncipe Dobra + // * `STD` - São Tomé & Príncipe Dobra (1977–2017) + // * `TVD` - TVD + // * `TJR` - Tajikistani Ruble + // * `TJS` - Tajikistani Somoni + // * `TZS` - Tanzanian Shilling + // * `XTS` - Testing Currency Code + // * `THB` - Thai Baht + // * `XXX` - The codes assigned for transactions where no currency is involved + // * `TPE` - Timorese Escudo + // * `TOP` - Tongan Paʻanga + // * `TTD` - Trinidad & Tobago Dollar + // * `TND` - Tunisian Dinar + // * `TRY` - Turkish Lira + // * `TRL` - Turkish Lira (1922–2005) + // * `TMT` - Turkmenistani Manat + // * `TMM` - Turkmenistani Manat (1993–2009) + // * `USD` - US Dollar + // * `USN` - US Dollar (Next day) + // * `USS` - US Dollar (Same day) + // * `UGX` - Ugandan Shilling + // * `UGS` - Ugandan Shilling (1966–1987) + // * `UAH` - Ukrainian Hryvnia + // * `UAK` - Ukrainian Karbovanets + // * `AED` - United Arab Emirates Dirham + // * `UYW` - Uruguayan Nominal Wage Index Unit + // * `UYU` - Uruguayan Peso + // * `UYP` - Uruguayan Peso (1975–1993) + // * `UYI` - Uruguayan Peso (Indexed Units) + // * `UZS` - Uzbekistani Som + // * `VUV` - Vanuatu Vatu + // * `VES` - Venezuelan Bolívar + // * `VEB` - Venezuelan Bolívar (1871–2008) + // * `VEF` - Venezuelan Bolívar (2008–2018) + // * `VND` - Vietnamese Dong + // * `VNN` - Vietnamese Dong (1978–1985) + // * `CHE` - WIR Euro + // * `CHW` - WIR Franc + // * `XOF` - West African CFA Franc + // * `YDD` - Yemeni Dinar + // * `YER` - Yemeni Rial + // * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + // * `YUD` - Yugoslavian Hard Dinar (1966–1990) + // * `YUM` - Yugoslavian New Dinar (1994–2002) + // * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + // * `ZWN` - ZWN + // * `ZRN` - Zairean New Zaire (1993–1998) + // * `ZRZ` - Zairean Zaire (1971–1993) + // * `ZMW` - Zambian Kwacha + // * `ZMK` - Zambian Kwacha (1968–2012) + // * `ZWD` - Zimbabwean Dollar (1980–2008) + // * `ZWR` - Zimbabwean Dollar (2008) + // * `ZWL` - Zimbabwean Dollar (2009) + Currency *VendorCreditRequestCurrency `json:"currency,omitempty" url:"currency,omitempty"` + // The vendor credit's exchange rate. + ExchangeRate *string `json:"exchange_rate,omitempty" url:"exchange_rate,omitempty"` + // If the transaction is inclusive or exclusive of tax. `True` if inclusive, `False` if exclusive. + InclusiveOfTax *bool `json:"inclusive_of_tax,omitempty" url:"inclusive_of_tax,omitempty"` + // The company the vendor credit belongs to. + Company *VendorCreditRequestCompany `json:"company,omitempty" url:"company,omitempty"` + TrackingCategories []*VendorCreditRequestTrackingCategoriesItem `json:"tracking_categories,omitempty" url:"tracking_categories,omitempty"` + // A list of VendorCredit Applied to Lines objects. + AppliedToLines []*VendorCreditApplyLineForVendorCreditRequest `json:"applied_to_lines,omitempty" url:"applied_to_lines,omitempty"` + // The accounting period that the VendorCredit was generated in. + AccountingPeriod *VendorCreditRequestAccountingPeriod `json:"accounting_period,omitempty" url:"accounting_period,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (v *VendorCreditRequest) GetNumber() *string { + if v == nil { + return nil + } + return v.Number +} + +func (v *VendorCreditRequest) GetTransactionDate() *time.Time { + if v == nil { + return nil + } + return v.TransactionDate +} + +func (v *VendorCreditRequest) GetVendor() *VendorCreditRequestVendor { + if v == nil { + return nil + } + return v.Vendor +} + +func (v *VendorCreditRequest) GetTotalAmount() *float64 { + if v == nil { + return nil + } + return v.TotalAmount +} + +func (v *VendorCreditRequest) GetCurrency() *VendorCreditRequestCurrency { + if v == nil { + return nil + } + return v.Currency +} + +func (v *VendorCreditRequest) GetExchangeRate() *string { + if v == nil { + return nil + } + return v.ExchangeRate +} + +func (v *VendorCreditRequest) GetInclusiveOfTax() *bool { + if v == nil { + return nil + } + return v.InclusiveOfTax +} + +func (v *VendorCreditRequest) GetCompany() *VendorCreditRequestCompany { + if v == nil { + return nil + } + return v.Company +} + +func (v *VendorCreditRequest) GetTrackingCategories() []*VendorCreditRequestTrackingCategoriesItem { + if v == nil { + return nil + } + return v.TrackingCategories +} + +func (v *VendorCreditRequest) GetAppliedToLines() []*VendorCreditApplyLineForVendorCreditRequest { + if v == nil { + return nil + } + return v.AppliedToLines +} + +func (v *VendorCreditRequest) GetAccountingPeriod() *VendorCreditRequestAccountingPeriod { + if v == nil { + return nil + } + return v.AccountingPeriod +} + +func (v *VendorCreditRequest) GetIntegrationParams() map[string]interface{} { + if v == nil { + return nil + } + return v.IntegrationParams +} + +func (v *VendorCreditRequest) GetLinkedAccountParams() map[string]interface{} { + if v == nil { + return nil + } + return v.LinkedAccountParams +} + +func (v *VendorCreditRequest) GetExtraProperties() map[string]interface{} { + return v.extraProperties +} + +func (v *VendorCreditRequest) UnmarshalJSON(data []byte) error { + type embed VendorCreditRequest + var unmarshaler = struct { + embed + TransactionDate *internal.DateTime `json:"transaction_date,omitempty"` + }{ + embed: embed(*v), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *v = VendorCreditRequest(unmarshaler.embed) + v.TransactionDate = unmarshaler.TransactionDate.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *v) + if err != nil { + return err + } + v.extraProperties = extraProperties + v.rawJSON = json.RawMessage(data) + return nil +} + +func (v *VendorCreditRequest) MarshalJSON() ([]byte, error) { + type embed VendorCreditRequest + var marshaler = struct { + embed + TransactionDate *internal.DateTime `json:"transaction_date,omitempty"` + }{ + embed: embed(*v), + TransactionDate: internal.NewOptionalDateTime(v.TransactionDate), + } + return json.Marshal(marshaler) +} + +func (v *VendorCreditRequest) String() string { + if len(v.rawJSON) > 0 { + if value, err := internal.StringifyJSON(v.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(v); err == nil { + return value + } + return fmt.Sprintf("%#v", v) +} + +// The accounting period that the VendorCredit was generated in. +type VendorCreditRequestAccountingPeriod struct { + String string + AccountingPeriod *AccountingPeriod + + typ string +} + +func (v *VendorCreditRequestAccountingPeriod) GetString() string { + if v == nil { + return "" + } + return v.String +} + +func (v *VendorCreditRequestAccountingPeriod) GetAccountingPeriod() *AccountingPeriod { + if v == nil { + return nil + } + return v.AccountingPeriod +} + +func (v *VendorCreditRequestAccountingPeriod) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + v.typ = "String" + v.String = valueString + return nil + } + valueAccountingPeriod := new(AccountingPeriod) + if err := json.Unmarshal(data, &valueAccountingPeriod); err == nil { + v.typ = "AccountingPeriod" + v.AccountingPeriod = valueAccountingPeriod + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, v) +} + +func (v VendorCreditRequestAccountingPeriod) MarshalJSON() ([]byte, error) { + if v.typ == "String" || v.String != "" { + return json.Marshal(v.String) + } + if v.typ == "AccountingPeriod" || v.AccountingPeriod != nil { + return json.Marshal(v.AccountingPeriod) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", v) +} + +type VendorCreditRequestAccountingPeriodVisitor interface { + VisitString(string) error + VisitAccountingPeriod(*AccountingPeriod) error +} + +func (v *VendorCreditRequestAccountingPeriod) Accept(visitor VendorCreditRequestAccountingPeriodVisitor) error { + if v.typ == "String" || v.String != "" { + return visitor.VisitString(v.String) + } + if v.typ == "AccountingPeriod" || v.AccountingPeriod != nil { + return visitor.VisitAccountingPeriod(v.AccountingPeriod) + } + return fmt.Errorf("type %T does not include a non-empty union type", v) +} + +// The company the vendor credit belongs to. +type VendorCreditRequestCompany struct { + String string + CompanyInfo *CompanyInfo + + typ string +} + +func (v *VendorCreditRequestCompany) GetString() string { + if v == nil { + return "" + } + return v.String +} + +func (v *VendorCreditRequestCompany) GetCompanyInfo() *CompanyInfo { + if v == nil { + return nil + } + return v.CompanyInfo +} + +func (v *VendorCreditRequestCompany) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + v.typ = "String" + v.String = valueString + return nil + } + valueCompanyInfo := new(CompanyInfo) + if err := json.Unmarshal(data, &valueCompanyInfo); err == nil { + v.typ = "CompanyInfo" + v.CompanyInfo = valueCompanyInfo + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, v) +} + +func (v VendorCreditRequestCompany) MarshalJSON() ([]byte, error) { + if v.typ == "String" || v.String != "" { + return json.Marshal(v.String) + } + if v.typ == "CompanyInfo" || v.CompanyInfo != nil { + return json.Marshal(v.CompanyInfo) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", v) +} + +type VendorCreditRequestCompanyVisitor interface { + VisitString(string) error + VisitCompanyInfo(*CompanyInfo) error +} + +func (v *VendorCreditRequestCompany) Accept(visitor VendorCreditRequestCompanyVisitor) error { + if v.typ == "String" || v.String != "" { + return visitor.VisitString(v.String) + } + if v.typ == "CompanyInfo" || v.CompanyInfo != nil { + return visitor.VisitCompanyInfo(v.CompanyInfo) + } + return fmt.Errorf("type %T does not include a non-empty union type", v) +} + +// The vendor credit's currency. +// +// * `XUA` - ADB Unit of Account +// * `AFN` - Afghan Afghani +// * `AFA` - Afghan Afghani (1927–2002) +// * `ALL` - Albanian Lek +// * `ALK` - Albanian Lek (1946–1965) +// * `DZD` - Algerian Dinar +// * `ADP` - Andorran Peseta +// * `AOA` - Angolan Kwanza +// * `AOK` - Angolan Kwanza (1977–1991) +// * `AON` - Angolan New Kwanza (1990–2000) +// * `AOR` - Angolan Readjusted Kwanza (1995–1999) +// * `ARA` - Argentine Austral +// * `ARS` - Argentine Peso +// * `ARM` - Argentine Peso (1881–1970) +// * `ARP` - Argentine Peso (1983–1985) +// * `ARL` - Argentine Peso Ley (1970–1983) +// * `AMD` - Armenian Dram +// * `AWG` - Aruban Florin +// * `AUD` - Australian Dollar +// * `ATS` - Austrian Schilling +// * `AZN` - Azerbaijani Manat +// * `AZM` - Azerbaijani Manat (1993–2006) +// * `BSD` - Bahamian Dollar +// * `BHD` - Bahraini Dinar +// * `BDT` - Bangladeshi Taka +// * `BBD` - Barbadian Dollar +// * `BYN` - Belarusian Ruble +// * `BYB` - Belarusian Ruble (1994–1999) +// * `BYR` - Belarusian Ruble (2000–2016) +// * `BEF` - Belgian Franc +// * `BEC` - Belgian Franc (convertible) +// * `BEL` - Belgian Franc (financial) +// * `BZD` - Belize Dollar +// * `BMD` - Bermudan Dollar +// * `BTN` - Bhutanese Ngultrum +// * `BOB` - Bolivian Boliviano +// * `BOL` - Bolivian Boliviano (1863–1963) +// * `BOV` - Bolivian Mvdol +// * `BOP` - Bolivian Peso +// * `BAM` - Bosnia-Herzegovina Convertible Mark +// * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) +// * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) +// * `BWP` - Botswanan Pula +// * `BRC` - Brazilian Cruzado (1986–1989) +// * `BRZ` - Brazilian Cruzeiro (1942–1967) +// * `BRE` - Brazilian Cruzeiro (1990–1993) +// * `BRR` - Brazilian Cruzeiro (1993–1994) +// * `BRN` - Brazilian New Cruzado (1989–1990) +// * `BRB` - Brazilian New Cruzeiro (1967–1986) +// * `BRL` - Brazilian Real +// * `GBP` - British Pound +// * `BND` - Brunei Dollar +// * `BGL` - Bulgarian Hard Lev +// * `BGN` - Bulgarian Lev +// * `BGO` - Bulgarian Lev (1879–1952) +// * `BGM` - Bulgarian Socialist Lev +// * `BUK` - Burmese Kyat +// * `BIF` - Burundian Franc +// * `XPF` - CFP Franc +// * `KHR` - Cambodian Riel +// * `CAD` - Canadian Dollar +// * `CVE` - Cape Verdean Escudo +// * `KYD` - Cayman Islands Dollar +// * `XAF` - Central African CFA Franc +// * `CLE` - Chilean Escudo +// * `CLP` - Chilean Peso +// * `CLF` - Chilean Unit of Account (UF) +// * `CNX` - Chinese People’s Bank Dollar +// * `CNY` - Chinese Yuan +// * `CNH` - Chinese Yuan (offshore) +// * `COP` - Colombian Peso +// * `COU` - Colombian Real Value Unit +// * `KMF` - Comorian Franc +// * `CDF` - Congolese Franc +// * `CRC` - Costa Rican Colón +// * `HRD` - Croatian Dinar +// * `HRK` - Croatian Kuna +// * `CUC` - Cuban Convertible Peso +// * `CUP` - Cuban Peso +// * `CYP` - Cypriot Pound +// * `CZK` - Czech Koruna +// * `CSK` - Czechoslovak Hard Koruna +// * `DKK` - Danish Krone +// * `DJF` - Djiboutian Franc +// * `DOP` - Dominican Peso +// * `NLG` - Dutch Guilder +// * `XCD` - East Caribbean Dollar +// * `DDM` - East German Mark +// * `ECS` - Ecuadorian Sucre +// * `ECV` - Ecuadorian Unit of Constant Value +// * `EGP` - Egyptian Pound +// * `GQE` - Equatorial Guinean Ekwele +// * `ERN` - Eritrean Nakfa +// * `EEK` - Estonian Kroon +// * `ETB` - Ethiopian Birr +// * `EUR` - Euro +// * `XBA` - European Composite Unit +// * `XEU` - European Currency Unit +// * `XBB` - European Monetary Unit +// * `XBC` - European Unit of Account (XBC) +// * `XBD` - European Unit of Account (XBD) +// * `FKP` - Falkland Islands Pound +// * `FJD` - Fijian Dollar +// * `FIM` - Finnish Markka +// * `FRF` - French Franc +// * `XFO` - French Gold Franc +// * `XFU` - French UIC-Franc +// * `GMD` - Gambian Dalasi +// * `GEK` - Georgian Kupon Larit +// * `GEL` - Georgian Lari +// * `DEM` - German Mark +// * `GHS` - Ghanaian Cedi +// * `GHC` - Ghanaian Cedi (1979–2007) +// * `GIP` - Gibraltar Pound +// * `XAU` - Gold +// * `GRD` - Greek Drachma +// * `GTQ` - Guatemalan Quetzal +// * `GWP` - Guinea-Bissau Peso +// * `GNF` - Guinean Franc +// * `GNS` - Guinean Syli +// * `GYD` - Guyanaese Dollar +// * `HTG` - Haitian Gourde +// * `HNL` - Honduran Lempira +// * `HKD` - Hong Kong Dollar +// * `HUF` - Hungarian Forint +// * `IMP` - IMP +// * `ISK` - Icelandic Króna +// * `ISJ` - Icelandic Króna (1918–1981) +// * `INR` - Indian Rupee +// * `IDR` - Indonesian Rupiah +// * `IRR` - Iranian Rial +// * `IQD` - Iraqi Dinar +// * `IEP` - Irish Pound +// * `ILS` - Israeli New Shekel +// * `ILP` - Israeli Pound +// * `ILR` - Israeli Shekel (1980–1985) +// * `ITL` - Italian Lira +// * `JMD` - Jamaican Dollar +// * `JPY` - Japanese Yen +// * `JOD` - Jordanian Dinar +// * `KZT` - Kazakhstani Tenge +// * `KES` - Kenyan Shilling +// * `KWD` - Kuwaiti Dinar +// * `KGS` - Kyrgystani Som +// * `LAK` - Laotian Kip +// * `LVL` - Latvian Lats +// * `LVR` - Latvian Ruble +// * `LBP` - Lebanese Pound +// * `LSL` - Lesotho Loti +// * `LRD` - Liberian Dollar +// * `LYD` - Libyan Dinar +// * `LTL` - Lithuanian Litas +// * `LTT` - Lithuanian Talonas +// * `LUL` - Luxembourg Financial Franc +// * `LUC` - Luxembourgian Convertible Franc +// * `LUF` - Luxembourgian Franc +// * `MOP` - Macanese Pataca +// * `MKD` - Macedonian Denar +// * `MKN` - Macedonian Denar (1992–1993) +// * `MGA` - Malagasy Ariary +// * `MGF` - Malagasy Franc +// * `MWK` - Malawian Kwacha +// * `MYR` - Malaysian Ringgit +// * `MVR` - Maldivian Rufiyaa +// * `MVP` - Maldivian Rupee (1947–1981) +// * `MLF` - Malian Franc +// * `MTL` - Maltese Lira +// * `MTP` - Maltese Pound +// * `MRU` - Mauritanian Ouguiya +// * `MRO` - Mauritanian Ouguiya (1973–2017) +// * `MUR` - Mauritian Rupee +// * `MXV` - Mexican Investment Unit +// * `MXN` - Mexican Peso +// * `MXP` - Mexican Silver Peso (1861–1992) +// * `MDC` - Moldovan Cupon +// * `MDL` - Moldovan Leu +// * `MCF` - Monegasque Franc +// * `MNT` - Mongolian Tugrik +// * `MAD` - Moroccan Dirham +// * `MAF` - Moroccan Franc +// * `MZE` - Mozambican Escudo +// * `MZN` - Mozambican Metical +// * `MZM` - Mozambican Metical (1980–2006) +// * `MMK` - Myanmar Kyat +// * `NAD` - Namibian Dollar +// * `NPR` - Nepalese Rupee +// * `ANG` - Netherlands Antillean Guilder +// * `TWD` - New Taiwan Dollar +// * `NZD` - New Zealand Dollar +// * `NIO` - Nicaraguan Córdoba +// * `NIC` - Nicaraguan Córdoba (1988–1991) +// * `NGN` - Nigerian Naira +// * `KPW` - North Korean Won +// * `NOK` - Norwegian Krone +// * `OMR` - Omani Rial +// * `PKR` - Pakistani Rupee +// * `XPD` - Palladium +// * `PAB` - Panamanian Balboa +// * `PGK` - Papua New Guinean Kina +// * `PYG` - Paraguayan Guarani +// * `PEI` - Peruvian Inti +// * `PEN` - Peruvian Sol +// * `PES` - Peruvian Sol (1863–1965) +// * `PHP` - Philippine Peso +// * `XPT` - Platinum +// * `PLN` - Polish Zloty +// * `PLZ` - Polish Zloty (1950–1995) +// * `PTE` - Portuguese Escudo +// * `GWE` - Portuguese Guinea Escudo +// * `QAR` - Qatari Rial +// * `XRE` - RINET Funds +// * `RHD` - Rhodesian Dollar +// * `RON` - Romanian Leu +// * `ROL` - Romanian Leu (1952–2006) +// * `RUB` - Russian Ruble +// * `RUR` - Russian Ruble (1991–1998) +// * `RWF` - Rwandan Franc +// * `SVC` - Salvadoran Colón +// * `WST` - Samoan Tala +// * `SAR` - Saudi Riyal +// * `RSD` - Serbian Dinar +// * `CSD` - Serbian Dinar (2002–2006) +// * `SCR` - Seychellois Rupee +// * `SLL` - Sierra Leonean Leone +// * `XAG` - Silver +// * `SGD` - Singapore Dollar +// * `SKK` - Slovak Koruna +// * `SIT` - Slovenian Tolar +// * `SBD` - Solomon Islands Dollar +// * `SOS` - Somali Shilling +// * `ZAR` - South African Rand +// * `ZAL` - South African Rand (financial) +// * `KRH` - South Korean Hwan (1953–1962) +// * `KRW` - South Korean Won +// * `KRO` - South Korean Won (1945–1953) +// * `SSP` - South Sudanese Pound +// * `SUR` - Soviet Rouble +// * `ESP` - Spanish Peseta +// * `ESA` - Spanish Peseta (A account) +// * `ESB` - Spanish Peseta (convertible account) +// * `XDR` - Special Drawing Rights +// * `LKR` - Sri Lankan Rupee +// * `SHP` - St. Helena Pound +// * `XSU` - Sucre +// * `SDD` - Sudanese Dinar (1992–2007) +// * `SDG` - Sudanese Pound +// * `SDP` - Sudanese Pound (1957–1998) +// * `SRD` - Surinamese Dollar +// * `SRG` - Surinamese Guilder +// * `SZL` - Swazi Lilangeni +// * `SEK` - Swedish Krona +// * `CHF` - Swiss Franc +// * `SYP` - Syrian Pound +// * `STN` - São Tomé & Príncipe Dobra +// * `STD` - São Tomé & Príncipe Dobra (1977–2017) +// * `TVD` - TVD +// * `TJR` - Tajikistani Ruble +// * `TJS` - Tajikistani Somoni +// * `TZS` - Tanzanian Shilling +// * `XTS` - Testing Currency Code +// * `THB` - Thai Baht +// * `XXX` - The codes assigned for transactions where no currency is involved +// * `TPE` - Timorese Escudo +// * `TOP` - Tongan Paʻanga +// * `TTD` - Trinidad & Tobago Dollar +// * `TND` - Tunisian Dinar +// * `TRY` - Turkish Lira +// * `TRL` - Turkish Lira (1922–2005) +// * `TMT` - Turkmenistani Manat +// * `TMM` - Turkmenistani Manat (1993–2009) +// * `USD` - US Dollar +// * `USN` - US Dollar (Next day) +// * `USS` - US Dollar (Same day) +// * `UGX` - Ugandan Shilling +// * `UGS` - Ugandan Shilling (1966–1987) +// * `UAH` - Ukrainian Hryvnia +// * `UAK` - Ukrainian Karbovanets +// * `AED` - United Arab Emirates Dirham +// * `UYW` - Uruguayan Nominal Wage Index Unit +// * `UYU` - Uruguayan Peso +// * `UYP` - Uruguayan Peso (1975–1993) +// * `UYI` - Uruguayan Peso (Indexed Units) +// * `UZS` - Uzbekistani Som +// * `VUV` - Vanuatu Vatu +// * `VES` - Venezuelan Bolívar +// * `VEB` - Venezuelan Bolívar (1871–2008) +// * `VEF` - Venezuelan Bolívar (2008–2018) +// * `VND` - Vietnamese Dong +// * `VNN` - Vietnamese Dong (1978–1985) +// * `CHE` - WIR Euro +// * `CHW` - WIR Franc +// * `XOF` - West African CFA Franc +// * `YDD` - Yemeni Dinar +// * `YER` - Yemeni Rial +// * `YUN` - Yugoslavian Convertible Dinar (1990–1992) +// * `YUD` - Yugoslavian Hard Dinar (1966–1990) +// * `YUM` - Yugoslavian New Dinar (1994–2002) +// * `YUR` - Yugoslavian Reformed Dinar (1992–1993) +// * `ZWN` - ZWN +// * `ZRN` - Zairean New Zaire (1993–1998) +// * `ZRZ` - Zairean Zaire (1971–1993) +// * `ZMW` - Zambian Kwacha +// * `ZMK` - Zambian Kwacha (1968–2012) +// * `ZWD` - Zimbabwean Dollar (1980–2008) +// * `ZWR` - Zimbabwean Dollar (2008) +// * `ZWL` - Zimbabwean Dollar (2009) +type VendorCreditRequestCurrency struct { + TransactionCurrencyEnum TransactionCurrencyEnum + String string + + typ string +} + +func (v *VendorCreditRequestCurrency) GetTransactionCurrencyEnum() TransactionCurrencyEnum { + if v == nil { + return "" + } + return v.TransactionCurrencyEnum +} + +func (v *VendorCreditRequestCurrency) GetString() string { + if v == nil { + return "" + } + return v.String +} + +func (v *VendorCreditRequestCurrency) UnmarshalJSON(data []byte) error { + var valueTransactionCurrencyEnum TransactionCurrencyEnum + if err := json.Unmarshal(data, &valueTransactionCurrencyEnum); err == nil { + v.typ = "TransactionCurrencyEnum" + v.TransactionCurrencyEnum = valueTransactionCurrencyEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + v.typ = "String" + v.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, v) +} + +func (v VendorCreditRequestCurrency) MarshalJSON() ([]byte, error) { + if v.typ == "TransactionCurrencyEnum" || v.TransactionCurrencyEnum != "" { + return json.Marshal(v.TransactionCurrencyEnum) + } + if v.typ == "String" || v.String != "" { + return json.Marshal(v.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", v) +} + +type VendorCreditRequestCurrencyVisitor interface { + VisitTransactionCurrencyEnum(TransactionCurrencyEnum) error + VisitString(string) error +} + +func (v *VendorCreditRequestCurrency) Accept(visitor VendorCreditRequestCurrencyVisitor) error { + if v.typ == "TransactionCurrencyEnum" || v.TransactionCurrencyEnum != "" { + return visitor.VisitTransactionCurrencyEnum(v.TransactionCurrencyEnum) + } + if v.typ == "String" || v.String != "" { + return visitor.VisitString(v.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", v) +} + +type VendorCreditRequestTrackingCategoriesItem struct { + String string + TrackingCategory *TrackingCategory + + typ string +} + +func (v *VendorCreditRequestTrackingCategoriesItem) GetString() string { + if v == nil { + return "" + } + return v.String +} + +func (v *VendorCreditRequestTrackingCategoriesItem) GetTrackingCategory() *TrackingCategory { + if v == nil { + return nil + } + return v.TrackingCategory +} + +func (v *VendorCreditRequestTrackingCategoriesItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + v.typ = "String" + v.String = valueString + return nil + } + valueTrackingCategory := new(TrackingCategory) + if err := json.Unmarshal(data, &valueTrackingCategory); err == nil { + v.typ = "TrackingCategory" + v.TrackingCategory = valueTrackingCategory + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, v) +} + +func (v VendorCreditRequestTrackingCategoriesItem) MarshalJSON() ([]byte, error) { + if v.typ == "String" || v.String != "" { + return json.Marshal(v.String) + } + if v.typ == "TrackingCategory" || v.TrackingCategory != nil { + return json.Marshal(v.TrackingCategory) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", v) +} + +type VendorCreditRequestTrackingCategoriesItemVisitor interface { + VisitString(string) error + VisitTrackingCategory(*TrackingCategory) error +} + +func (v *VendorCreditRequestTrackingCategoriesItem) Accept(visitor VendorCreditRequestTrackingCategoriesItemVisitor) error { + if v.typ == "String" || v.String != "" { + return visitor.VisitString(v.String) + } + if v.typ == "TrackingCategory" || v.TrackingCategory != nil { + return visitor.VisitTrackingCategory(v.TrackingCategory) + } + return fmt.Errorf("type %T does not include a non-empty union type", v) +} + +// The vendor that owes the gift or refund. +type VendorCreditRequestVendor struct { + String string + Contact *Contact + + typ string +} + +func (v *VendorCreditRequestVendor) GetString() string { + if v == nil { + return "" + } + return v.String +} + +func (v *VendorCreditRequestVendor) GetContact() *Contact { + if v == nil { + return nil + } + return v.Contact +} + +func (v *VendorCreditRequestVendor) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + v.typ = "String" + v.String = valueString + return nil + } + valueContact := new(Contact) + if err := json.Unmarshal(data, &valueContact); err == nil { + v.typ = "Contact" + v.Contact = valueContact + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, v) +} + +func (v VendorCreditRequestVendor) MarshalJSON() ([]byte, error) { + if v.typ == "String" || v.String != "" { + return json.Marshal(v.String) + } + if v.typ == "Contact" || v.Contact != nil { + return json.Marshal(v.Contact) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", v) +} + +type VendorCreditRequestVendorVisitor interface { + VisitString(string) error + VisitContact(*Contact) error +} + +func (v *VendorCreditRequestVendor) Accept(visitor VendorCreditRequestVendorVisitor) error { + if v.typ == "String" || v.String != "" { + return visitor.VisitString(v.String) + } + if v.typ == "Contact" || v.Contact != nil { + return visitor.VisitContact(v.Contact) + } + return fmt.Errorf("type %T does not include a non-empty union type", v) +} + +type VendorCreditResponse struct { + Model *VendorCredit `json:"model" url:"model"` + Warnings []*WarningValidationProblem `json:"warnings" url:"warnings"` + Errors []*ErrorValidationProblem `json:"errors" url:"errors"` + Logs []*DebugModeLog `json:"logs,omitempty" url:"logs,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (v *VendorCreditResponse) GetModel() *VendorCredit { + if v == nil { + return nil + } + return v.Model +} + +func (v *VendorCreditResponse) GetWarnings() []*WarningValidationProblem { + if v == nil { + return nil + } + return v.Warnings +} + +func (v *VendorCreditResponse) GetErrors() []*ErrorValidationProblem { + if v == nil { + return nil + } + return v.Errors +} + +func (v *VendorCreditResponse) GetLogs() []*DebugModeLog { + if v == nil { + return nil + } + return v.Logs +} + +func (v *VendorCreditResponse) GetExtraProperties() map[string]interface{} { + return v.extraProperties +} + +func (v *VendorCreditResponse) UnmarshalJSON(data []byte) error { + type unmarshaler VendorCreditResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *v = VendorCreditResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *v) + if err != nil { + return err + } + v.extraProperties = extraProperties + v.rawJSON = json.RawMessage(data) + return nil +} + +func (v *VendorCreditResponse) String() string { + if len(v.rawJSON) > 0 { + if value, err := internal.StringifyJSON(v.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(v); err == nil { + return value + } + return fmt.Sprintf("%#v", v) +} diff --git a/accounting/vendorcredits/client.go b/accounting/vendorcredits/client.go index c57ce7d..b06e485 100644 --- a/accounting/vendorcredits/client.go +++ b/accounting/vendorcredits/client.go @@ -1,133 +1,135 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package vendorcredits import ( context "context" fmt "fmt" - accounting "github.com/merge-api/merge-go-client/accounting" - core "github.com/merge-api/merge-go-client/core" + accounting "github.com/merge-api/merge-go-client/v2/accounting" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `VendorCredit` objects. -func (c *Client) List(ctx context.Context, request *accounting.VendorCreditsListRequest) (*accounting.PaginatedVendorCreditList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/vendor-credits" - - queryParams := make(url.Values) - if request.CompanyId != nil { - queryParams.Add("company_id", fmt.Sprintf("%v", *request.CompanyId)) - } - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if request.TransactionDateAfter != nil { - queryParams.Add("transaction_date_after", fmt.Sprintf("%v", request.TransactionDateAfter.Format(time.RFC3339))) - } - if request.TransactionDateBefore != nil { - queryParams.Add("transaction_date_before", fmt.Sprintf("%v", request.TransactionDateBefore.Format(time.RFC3339))) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *accounting.PaginatedVendorCreditList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *accounting.VendorCreditsListRequest, + opts ...option.RequestOption, +) (*core.Page[*accounting.VendorCredit], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/vendor-credits" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *accounting.PaginatedVendorCreditList) *internal.PageResponse[*string, *accounting.VendorCredit] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *accounting.VendorCredit]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Creates a `VendorCredit` object with the given values. -func (c *Client) Create(ctx context.Context, request *accounting.VendorCreditEndpointRequest) (*accounting.VendorCreditResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/vendor-credits" - - queryParams := make(url.Values) - if request.IsDebugMode != nil { - queryParams.Add("is_debug_mode", fmt.Sprintf("%v", *request.IsDebugMode)) - } - if request.RunAsync != nil { - queryParams.Add("run_async", fmt.Sprintf("%v", *request.RunAsync)) +func (c *Client) Create( + ctx context.Context, + request *accounting.VendorCreditEndpointRequest, + opts ...option.RequestOption, +) (*accounting.VendorCreditResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/vendor-credits" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *accounting.VendorCreditResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -136,32 +138,46 @@ func (c *Client) Create(ctx context.Context, request *accounting.VendorCreditEnd } // Returns a `VendorCredit` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *accounting.VendorCreditsRetrieveRequest) (*accounting.VendorCredit, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"accounting/v1/vendor-credits/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *accounting.VendorCreditsRetrieveRequest, + opts ...option.RequestOption, +) (*accounting.VendorCredit, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/accounting/v1/vendor-credits/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *accounting.VendorCredit if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -170,21 +186,34 @@ func (c *Client) Retrieve(ctx context.Context, id string, request *accounting.Ve } // Returns metadata for `VendorCredit` POSTs. -func (c *Client) MetaPostRetrieve(ctx context.Context) (*accounting.MetaResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/vendor-credits/meta/post" +func (c *Client) MetaPostRetrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*accounting.MetaResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/vendor-credits/meta/post" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *accounting.MetaResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/accounting/webhook_receivers.go b/accounting/webhook_receivers.go index 3cd7854..0c8e352 100644 --- a/accounting/webhook_receivers.go +++ b/accounting/webhook_receivers.go @@ -1,9 +1,77 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package accounting +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" +) + type WebhookReceiverRequest struct { - Event string `json:"event"` - IsActive bool `json:"is_active"` - Key *string `json:"key,omitempty"` + Event string `json:"event" url:"-"` + IsActive bool `json:"is_active" url:"-"` + Key *string `json:"key,omitempty" url:"-"` +} + +type WebhookReceiver struct { + Event string `json:"event" url:"event"` + IsActive bool `json:"is_active" url:"is_active"` + Key *string `json:"key,omitempty" url:"key,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (w *WebhookReceiver) GetEvent() string { + if w == nil { + return "" + } + return w.Event +} + +func (w *WebhookReceiver) GetIsActive() bool { + if w == nil { + return false + } + return w.IsActive +} + +func (w *WebhookReceiver) GetKey() *string { + if w == nil { + return nil + } + return w.Key +} + +func (w *WebhookReceiver) GetExtraProperties() map[string]interface{} { + return w.extraProperties +} + +func (w *WebhookReceiver) UnmarshalJSON(data []byte) error { + type unmarshaler WebhookReceiver + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *w = WebhookReceiver(value) + extraProperties, err := internal.ExtractExtraProperties(data, *w) + if err != nil { + return err + } + w.extraProperties = extraProperties + w.rawJSON = json.RawMessage(data) + return nil +} + +func (w *WebhookReceiver) String() string { + if len(w.rawJSON) > 0 { + if value, err := internal.StringifyJSON(w.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(w); err == nil { + return value + } + return fmt.Sprintf("%#v", w) } diff --git a/accounting/webhookreceivers/client.go b/accounting/webhookreceivers/client.go index 8abe004..2cab927 100644 --- a/accounting/webhookreceivers/client.go +++ b/accounting/webhookreceivers/client.go @@ -1,48 +1,65 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package webhookreceivers import ( context "context" - accounting "github.com/merge-api/merge-go-client/accounting" - core "github.com/merge-api/merge-go-client/core" + accounting "github.com/merge-api/merge-go-client/v2/accounting" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `WebhookReceiver` objects. -func (c *Client) List(ctx context.Context) ([]*accounting.WebhookReceiver, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/webhook-receivers" +func (c *Client) List( + ctx context.Context, + opts ...option.RequestOption, +) ([]*accounting.WebhookReceiver, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/webhook-receivers" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response []*accounting.WebhookReceiver if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -51,22 +68,37 @@ func (c *Client) List(ctx context.Context) ([]*accounting.WebhookReceiver, error } // Creates a `WebhookReceiver` object with the given values. -func (c *Client) Create(ctx context.Context, request *accounting.WebhookReceiverRequest) (*accounting.WebhookReceiver, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "accounting/v1/webhook-receivers" +func (c *Client) Create( + ctx context.Context, + request *accounting.WebhookReceiverRequest, + opts ...option.RequestOption, +) (*accounting.WebhookReceiver, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/accounting/v1/webhook-receivers" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *accounting.WebhookReceiver if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err diff --git a/ats/account_details.go b/ats/account_details.go new file mode 100644 index 0000000..b198be6 --- /dev/null +++ b/ats/account_details.go @@ -0,0 +1,226 @@ +// Code generated by Fern. DO NOT EDIT. + +package ats + +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" + time "time" +) + +type AccountDetails struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + Integration *string `json:"integration,omitempty" url:"integration,omitempty"` + IntegrationSlug *string `json:"integration_slug,omitempty" url:"integration_slug,omitempty"` + Category *AccountDetailsCategory `json:"category,omitempty" url:"category,omitempty"` + EndUserOriginId *string `json:"end_user_origin_id,omitempty" url:"end_user_origin_id,omitempty"` + EndUserOrganizationName *string `json:"end_user_organization_name,omitempty" url:"end_user_organization_name,omitempty"` + EndUserEmailAddress *string `json:"end_user_email_address,omitempty" url:"end_user_email_address,omitempty"` + Status *string `json:"status,omitempty" url:"status,omitempty"` + WebhookListenerUrl *string `json:"webhook_listener_url,omitempty" url:"webhook_listener_url,omitempty"` + // 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. + IsDuplicate *bool `json:"is_duplicate,omitempty" url:"is_duplicate,omitempty"` + AccountType *string `json:"account_type,omitempty" url:"account_type,omitempty"` + // The time at which account completes the linking flow. + CompletedAt *time.Time `json:"completed_at,omitempty" url:"completed_at,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AccountDetails) GetId() *string { + if a == nil { + return nil + } + return a.Id +} + +func (a *AccountDetails) GetIntegration() *string { + if a == nil { + return nil + } + return a.Integration +} + +func (a *AccountDetails) GetIntegrationSlug() *string { + if a == nil { + return nil + } + return a.IntegrationSlug +} + +func (a *AccountDetails) GetCategory() *AccountDetailsCategory { + if a == nil { + return nil + } + return a.Category +} + +func (a *AccountDetails) GetEndUserOriginId() *string { + if a == nil { + return nil + } + return a.EndUserOriginId +} + +func (a *AccountDetails) GetEndUserOrganizationName() *string { + if a == nil { + return nil + } + return a.EndUserOrganizationName +} + +func (a *AccountDetails) GetEndUserEmailAddress() *string { + if a == nil { + return nil + } + return a.EndUserEmailAddress +} + +func (a *AccountDetails) GetStatus() *string { + if a == nil { + return nil + } + return a.Status +} + +func (a *AccountDetails) GetWebhookListenerUrl() *string { + if a == nil { + return nil + } + return a.WebhookListenerUrl +} + +func (a *AccountDetails) GetIsDuplicate() *bool { + if a == nil { + return nil + } + return a.IsDuplicate +} + +func (a *AccountDetails) GetAccountType() *string { + if a == nil { + return nil + } + return a.AccountType +} + +func (a *AccountDetails) GetCompletedAt() *time.Time { + if a == nil { + return nil + } + return a.CompletedAt +} + +func (a *AccountDetails) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AccountDetails) UnmarshalJSON(data []byte) error { + type embed AccountDetails + var unmarshaler = struct { + embed + CompletedAt *internal.DateTime `json:"completed_at,omitempty"` + }{ + embed: embed(*a), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *a = AccountDetails(unmarshaler.embed) + a.CompletedAt = unmarshaler.CompletedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AccountDetails) MarshalJSON() ([]byte, error) { + type embed AccountDetails + var marshaler = struct { + embed + CompletedAt *internal.DateTime `json:"completed_at,omitempty"` + }{ + embed: embed(*a), + CompletedAt: internal.NewOptionalDateTime(a.CompletedAt), + } + return json.Marshal(marshaler) +} + +func (a *AccountDetails) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} + +type AccountDetailsCategory struct { + CategoryEnum CategoryEnum + String string + + typ string +} + +func (a *AccountDetailsCategory) GetCategoryEnum() CategoryEnum { + if a == nil { + return "" + } + return a.CategoryEnum +} + +func (a *AccountDetailsCategory) GetString() string { + if a == nil { + return "" + } + return a.String +} + +func (a *AccountDetailsCategory) UnmarshalJSON(data []byte) error { + var valueCategoryEnum CategoryEnum + if err := json.Unmarshal(data, &valueCategoryEnum); err == nil { + a.typ = "CategoryEnum" + a.CategoryEnum = valueCategoryEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + a.typ = "String" + a.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, a) +} + +func (a AccountDetailsCategory) MarshalJSON() ([]byte, error) { + if a.typ == "CategoryEnum" || a.CategoryEnum != "" { + return json.Marshal(a.CategoryEnum) + } + if a.typ == "String" || a.String != "" { + return json.Marshal(a.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type AccountDetailsCategoryVisitor interface { + VisitCategoryEnum(CategoryEnum) error + VisitString(string) error +} + +func (a *AccountDetailsCategory) Accept(visitor AccountDetailsCategoryVisitor) error { + if a.typ == "CategoryEnum" || a.CategoryEnum != "" { + return visitor.VisitCategoryEnum(a.CategoryEnum) + } + if a.typ == "String" || a.String != "" { + return visitor.VisitString(a.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} diff --git a/ats/account_token.go b/ats/account_token.go new file mode 100644 index 0000000..9610736 --- /dev/null +++ b/ats/account_token.go @@ -0,0 +1,71 @@ +// Code generated by Fern. DO NOT EDIT. + +package ats + +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" +) + +type AccountToken struct { + AccountToken string `json:"account_token" url:"account_token"` + Integration *AccountIntegration `json:"integration" url:"integration"` + Id string `json:"id" url:"id"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AccountToken) GetAccountToken() string { + if a == nil { + return "" + } + return a.AccountToken +} + +func (a *AccountToken) GetIntegration() *AccountIntegration { + if a == nil { + return nil + } + return a.Integration +} + +func (a *AccountToken) GetId() string { + if a == nil { + return "" + } + return a.Id +} + +func (a *AccountToken) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AccountToken) UnmarshalJSON(data []byte) error { + type unmarshaler AccountToken + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *a = AccountToken(value) + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AccountToken) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} diff --git a/ats/accountdetails/client.go b/ats/accountdetails/client.go index 3484848..d5b129b 100644 --- a/ats/accountdetails/client.go +++ b/ats/accountdetails/client.go @@ -1,48 +1,65 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package accountdetails import ( context "context" - ats "github.com/merge-api/merge-go-client/ats" - core "github.com/merge-api/merge-go-client/core" + ats "github.com/merge-api/merge-go-client/v2/ats" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Get details for a linked account. -func (c *Client) Retrieve(ctx context.Context) (*ats.AccountDetails, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ats/v1/account-details" +func (c *Client) Retrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*ats.AccountDetails, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ats/v1/account-details" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ats.AccountDetails if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/ats/accounttoken/client.go b/ats/accounttoken/client.go index c369b14..c59fb9c 100644 --- a/ats/accounttoken/client.go +++ b/ats/accounttoken/client.go @@ -1,49 +1,69 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package accounttoken import ( context "context" - fmt "fmt" - ats "github.com/merge-api/merge-go-client/ats" - core "github.com/merge-api/merge-go-client/core" + ats "github.com/merge-api/merge-go-client/v2/ats" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns the account token for the end user with the provided public token. -func (c *Client) Retrieve(ctx context.Context, publicToken string) (*ats.AccountToken, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"ats/v1/account-token/%v", publicToken) +func (c *Client) Retrieve( + ctx context.Context, + publicToken string, + opts ...option.RequestOption, +) (*ats.AccountToken, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/ats/v1/account-token/%v", + publicToken, + ) + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ats.AccountToken if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/ats/activities.go b/ats/activities.go index d6e61fd..0101433 100644 --- a/ats/activities.go +++ b/ats/activities.go @@ -1,61 +1,65 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package ats import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type ActivityEndpointRequest struct { // Whether to include debug fields (such as log file links) in the response. - IsDebugMode *bool `json:"-"` + IsDebugMode *bool `json:"-" url:"is_debug_mode,omitempty"` // Whether or not third-party updates should be run asynchronously. - RunAsync *bool `json:"-"` - Model *ActivityRequest `json:"model,omitempty"` - RemoteUserId string `json:"remote_user_id"` + RunAsync *bool `json:"-" url:"run_async,omitempty"` + Model *ActivityRequest `json:"model,omitempty" url:"-"` + RemoteUserId string `json:"remote_user_id" url:"-"` } type ActivitiesListRequest struct { // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *string `json:"-"` + Expand []*string `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // Deprecated. Use show_enum_origins. - RemoteFields *ActivitiesListRequestRemoteFields `json:"-"` + RemoteFields *ActivitiesListRequestRemoteFields `json:"-" url:"remote_fields,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` // 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) - ShowEnumOrigins *ActivitiesListRequestShowEnumOrigins `json:"-"` + ShowEnumOrigins *ActivitiesListRequestShowEnumOrigins `json:"-" url:"show_enum_origins,omitempty"` // If provided, will only return activities done by this user. - UserId *string `json:"-"` + UserId *string `json:"-" url:"user_id,omitempty"` } type ActivitiesRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *string `json:"-"` + Expand []*string `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // Deprecated. Use show_enum_origins. - RemoteFields *ActivitiesRetrieveRequestRemoteFields `json:"-"` + RemoteFields *ActivitiesRetrieveRequestRemoteFields `json:"-" url:"remote_fields,omitempty"` // 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) - ShowEnumOrigins *ActivitiesRetrieveRequestShowEnumOrigins `json:"-"` + ShowEnumOrigins *ActivitiesRetrieveRequestShowEnumOrigins `json:"-" url:"show_enum_origins,omitempty"` } type ActivitiesListRequestRemoteFields string @@ -157,3 +161,837 @@ func NewActivitiesRetrieveRequestShowEnumOriginsFromString(s string) (Activities func (a ActivitiesRetrieveRequestShowEnumOrigins) Ptr() *ActivitiesRetrieveRequestShowEnumOrigins { return &a } + +// # The Activity Object +// ### Description +// The `Activity` object is used to represent an activity for a candidate performed by a user. +// ### Usage Example +// Fetch from the `LIST Activities` endpoint and filter by `ID` to show all activities. +type Activity struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The user that performed the action. + User *ActivityUser `json:"user,omitempty" url:"user,omitempty"` + // When the third party's activity was created. + RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty" url:"remote_created_at,omitempty"` + // The activity's type. + // + // * `NOTE` - NOTE + // * `EMAIL` - EMAIL + // * `OTHER` - OTHER + ActivityType *ActivityActivityType `json:"activity_type,omitempty" url:"activity_type,omitempty"` + // The activity's subject. + Subject *string `json:"subject,omitempty" url:"subject,omitempty"` + // The activity's body. + Body *string `json:"body,omitempty" url:"body,omitempty"` + // The activity's visibility. + // + // * `ADMIN_ONLY` - ADMIN_ONLY + // * `PUBLIC` - PUBLIC + // * `PRIVATE` - PRIVATE + Visibility *ActivityVisibility `json:"visibility,omitempty" url:"visibility,omitempty"` + Candidate *string `json:"candidate,omitempty" url:"candidate,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *Activity) GetId() *string { + if a == nil { + return nil + } + return a.Id +} + +func (a *Activity) GetRemoteId() *string { + if a == nil { + return nil + } + return a.RemoteId +} + +func (a *Activity) GetCreatedAt() *time.Time { + if a == nil { + return nil + } + return a.CreatedAt +} + +func (a *Activity) GetModifiedAt() *time.Time { + if a == nil { + return nil + } + return a.ModifiedAt +} + +func (a *Activity) GetUser() *ActivityUser { + if a == nil { + return nil + } + return a.User +} + +func (a *Activity) GetRemoteCreatedAt() *time.Time { + if a == nil { + return nil + } + return a.RemoteCreatedAt +} + +func (a *Activity) GetActivityType() *ActivityActivityType { + if a == nil { + return nil + } + return a.ActivityType +} + +func (a *Activity) GetSubject() *string { + if a == nil { + return nil + } + return a.Subject +} + +func (a *Activity) GetBody() *string { + if a == nil { + return nil + } + return a.Body +} + +func (a *Activity) GetVisibility() *ActivityVisibility { + if a == nil { + return nil + } + return a.Visibility +} + +func (a *Activity) GetCandidate() *string { + if a == nil { + return nil + } + return a.Candidate +} + +func (a *Activity) GetRemoteWasDeleted() *bool { + if a == nil { + return nil + } + return a.RemoteWasDeleted +} + +func (a *Activity) GetFieldMappings() map[string]interface{} { + if a == nil { + return nil + } + return a.FieldMappings +} + +func (a *Activity) GetRemoteData() []*RemoteData { + if a == nil { + return nil + } + return a.RemoteData +} + +func (a *Activity) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *Activity) UnmarshalJSON(data []byte) error { + type embed Activity + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + }{ + embed: embed(*a), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *a = Activity(unmarshaler.embed) + a.CreatedAt = unmarshaler.CreatedAt.TimePtr() + a.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + a.RemoteCreatedAt = unmarshaler.RemoteCreatedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *Activity) MarshalJSON() ([]byte, error) { + type embed Activity + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + }{ + embed: embed(*a), + CreatedAt: internal.NewOptionalDateTime(a.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(a.ModifiedAt), + RemoteCreatedAt: internal.NewOptionalDateTime(a.RemoteCreatedAt), + } + return json.Marshal(marshaler) +} + +func (a *Activity) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} + +// The activity's type. +// +// * `NOTE` - NOTE +// * `EMAIL` - EMAIL +// * `OTHER` - OTHER +type ActivityActivityType struct { + ActivityTypeEnum ActivityTypeEnum + String string + + typ string +} + +func (a *ActivityActivityType) GetActivityTypeEnum() ActivityTypeEnum { + if a == nil { + return "" + } + return a.ActivityTypeEnum +} + +func (a *ActivityActivityType) GetString() string { + if a == nil { + return "" + } + return a.String +} + +func (a *ActivityActivityType) UnmarshalJSON(data []byte) error { + var valueActivityTypeEnum ActivityTypeEnum + if err := json.Unmarshal(data, &valueActivityTypeEnum); err == nil { + a.typ = "ActivityTypeEnum" + a.ActivityTypeEnum = valueActivityTypeEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + a.typ = "String" + a.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, a) +} + +func (a ActivityActivityType) MarshalJSON() ([]byte, error) { + if a.typ == "ActivityTypeEnum" || a.ActivityTypeEnum != "" { + return json.Marshal(a.ActivityTypeEnum) + } + if a.typ == "String" || a.String != "" { + return json.Marshal(a.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type ActivityActivityTypeVisitor interface { + VisitActivityTypeEnum(ActivityTypeEnum) error + VisitString(string) error +} + +func (a *ActivityActivityType) Accept(visitor ActivityActivityTypeVisitor) error { + if a.typ == "ActivityTypeEnum" || a.ActivityTypeEnum != "" { + return visitor.VisitActivityTypeEnum(a.ActivityTypeEnum) + } + if a.typ == "String" || a.String != "" { + return visitor.VisitString(a.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} + +// # The Activity Object +// ### Description +// The `Activity` object is used to represent an activity for a candidate performed by a user. +// ### Usage Example +// Fetch from the `LIST Activities` endpoint and filter by `ID` to show all activities. +type ActivityRequest struct { + // The user that performed the action. + User *ActivityRequestUser `json:"user,omitempty" url:"user,omitempty"` + // The activity's type. + // + // * `NOTE` - NOTE + // * `EMAIL` - EMAIL + // * `OTHER` - OTHER + ActivityType *ActivityTypeEnum `json:"activity_type,omitempty" url:"activity_type,omitempty"` + // The activity's subject. + Subject *string `json:"subject,omitempty" url:"subject,omitempty"` + // The activity's body. + Body *string `json:"body,omitempty" url:"body,omitempty"` + // The activity's visibility. + // + // * `ADMIN_ONLY` - ADMIN_ONLY + // * `PUBLIC` - PUBLIC + // * `PRIVATE` - PRIVATE + Visibility *ActivityRequestVisibility `json:"visibility,omitempty" url:"visibility,omitempty"` + Candidate *string `json:"candidate,omitempty" url:"candidate,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *ActivityRequest) GetUser() *ActivityRequestUser { + if a == nil { + return nil + } + return a.User +} + +func (a *ActivityRequest) GetActivityType() *ActivityTypeEnum { + if a == nil { + return nil + } + return a.ActivityType +} + +func (a *ActivityRequest) GetSubject() *string { + if a == nil { + return nil + } + return a.Subject +} + +func (a *ActivityRequest) GetBody() *string { + if a == nil { + return nil + } + return a.Body +} + +func (a *ActivityRequest) GetVisibility() *ActivityRequestVisibility { + if a == nil { + return nil + } + return a.Visibility +} + +func (a *ActivityRequest) GetCandidate() *string { + if a == nil { + return nil + } + return a.Candidate +} + +func (a *ActivityRequest) GetIntegrationParams() map[string]interface{} { + if a == nil { + return nil + } + return a.IntegrationParams +} + +func (a *ActivityRequest) GetLinkedAccountParams() map[string]interface{} { + if a == nil { + return nil + } + return a.LinkedAccountParams +} + +func (a *ActivityRequest) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *ActivityRequest) UnmarshalJSON(data []byte) error { + type unmarshaler ActivityRequest + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *a = ActivityRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *ActivityRequest) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} + +// The user that performed the action. +type ActivityRequestUser struct { + String string + RemoteUser *RemoteUser + + typ string +} + +func (a *ActivityRequestUser) GetString() string { + if a == nil { + return "" + } + return a.String +} + +func (a *ActivityRequestUser) GetRemoteUser() *RemoteUser { + if a == nil { + return nil + } + return a.RemoteUser +} + +func (a *ActivityRequestUser) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + a.typ = "String" + a.String = valueString + return nil + } + valueRemoteUser := new(RemoteUser) + if err := json.Unmarshal(data, &valueRemoteUser); err == nil { + a.typ = "RemoteUser" + a.RemoteUser = valueRemoteUser + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, a) +} + +func (a ActivityRequestUser) MarshalJSON() ([]byte, error) { + if a.typ == "String" || a.String != "" { + return json.Marshal(a.String) + } + if a.typ == "RemoteUser" || a.RemoteUser != nil { + return json.Marshal(a.RemoteUser) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type ActivityRequestUserVisitor interface { + VisitString(string) error + VisitRemoteUser(*RemoteUser) error +} + +func (a *ActivityRequestUser) Accept(visitor ActivityRequestUserVisitor) error { + if a.typ == "String" || a.String != "" { + return visitor.VisitString(a.String) + } + if a.typ == "RemoteUser" || a.RemoteUser != nil { + return visitor.VisitRemoteUser(a.RemoteUser) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} + +// The activity's visibility. +// +// * `ADMIN_ONLY` - ADMIN_ONLY +// * `PUBLIC` - PUBLIC +// * `PRIVATE` - PRIVATE +type ActivityRequestVisibility struct { + VisibilityEnum VisibilityEnum + String string + + typ string +} + +func (a *ActivityRequestVisibility) GetVisibilityEnum() VisibilityEnum { + if a == nil { + return "" + } + return a.VisibilityEnum +} + +func (a *ActivityRequestVisibility) GetString() string { + if a == nil { + return "" + } + return a.String +} + +func (a *ActivityRequestVisibility) UnmarshalJSON(data []byte) error { + var valueVisibilityEnum VisibilityEnum + if err := json.Unmarshal(data, &valueVisibilityEnum); err == nil { + a.typ = "VisibilityEnum" + a.VisibilityEnum = valueVisibilityEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + a.typ = "String" + a.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, a) +} + +func (a ActivityRequestVisibility) MarshalJSON() ([]byte, error) { + if a.typ == "VisibilityEnum" || a.VisibilityEnum != "" { + return json.Marshal(a.VisibilityEnum) + } + if a.typ == "String" || a.String != "" { + return json.Marshal(a.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type ActivityRequestVisibilityVisitor interface { + VisitVisibilityEnum(VisibilityEnum) error + VisitString(string) error +} + +func (a *ActivityRequestVisibility) Accept(visitor ActivityRequestVisibilityVisitor) error { + if a.typ == "VisibilityEnum" || a.VisibilityEnum != "" { + return visitor.VisitVisibilityEnum(a.VisibilityEnum) + } + if a.typ == "String" || a.String != "" { + return visitor.VisitString(a.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type ActivityResponse struct { + Model *Activity `json:"model" url:"model"` + Warnings []*WarningValidationProblem `json:"warnings" url:"warnings"` + Errors []*ErrorValidationProblem `json:"errors" url:"errors"` + Logs []*DebugModeLog `json:"logs,omitempty" url:"logs,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *ActivityResponse) GetModel() *Activity { + if a == nil { + return nil + } + return a.Model +} + +func (a *ActivityResponse) GetWarnings() []*WarningValidationProblem { + if a == nil { + return nil + } + return a.Warnings +} + +func (a *ActivityResponse) GetErrors() []*ErrorValidationProblem { + if a == nil { + return nil + } + return a.Errors +} + +func (a *ActivityResponse) GetLogs() []*DebugModeLog { + if a == nil { + return nil + } + return a.Logs +} + +func (a *ActivityResponse) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *ActivityResponse) UnmarshalJSON(data []byte) error { + type unmarshaler ActivityResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *a = ActivityResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *ActivityResponse) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} + +// * `NOTE` - NOTE +// * `EMAIL` - EMAIL +// * `OTHER` - OTHER +type ActivityTypeEnum string + +const ( + ActivityTypeEnumNote ActivityTypeEnum = "NOTE" + ActivityTypeEnumEmail ActivityTypeEnum = "EMAIL" + ActivityTypeEnumOther ActivityTypeEnum = "OTHER" +) + +func NewActivityTypeEnumFromString(s string) (ActivityTypeEnum, error) { + switch s { + case "NOTE": + return ActivityTypeEnumNote, nil + case "EMAIL": + return ActivityTypeEnumEmail, nil + case "OTHER": + return ActivityTypeEnumOther, nil + } + var t ActivityTypeEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (a ActivityTypeEnum) Ptr() *ActivityTypeEnum { + return &a +} + +// The user that performed the action. +type ActivityUser struct { + String string + RemoteUser *RemoteUser + + typ string +} + +func (a *ActivityUser) GetString() string { + if a == nil { + return "" + } + return a.String +} + +func (a *ActivityUser) GetRemoteUser() *RemoteUser { + if a == nil { + return nil + } + return a.RemoteUser +} + +func (a *ActivityUser) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + a.typ = "String" + a.String = valueString + return nil + } + valueRemoteUser := new(RemoteUser) + if err := json.Unmarshal(data, &valueRemoteUser); err == nil { + a.typ = "RemoteUser" + a.RemoteUser = valueRemoteUser + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, a) +} + +func (a ActivityUser) MarshalJSON() ([]byte, error) { + if a.typ == "String" || a.String != "" { + return json.Marshal(a.String) + } + if a.typ == "RemoteUser" || a.RemoteUser != nil { + return json.Marshal(a.RemoteUser) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type ActivityUserVisitor interface { + VisitString(string) error + VisitRemoteUser(*RemoteUser) error +} + +func (a *ActivityUser) Accept(visitor ActivityUserVisitor) error { + if a.typ == "String" || a.String != "" { + return visitor.VisitString(a.String) + } + if a.typ == "RemoteUser" || a.RemoteUser != nil { + return visitor.VisitRemoteUser(a.RemoteUser) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} + +// The activity's visibility. +// +// * `ADMIN_ONLY` - ADMIN_ONLY +// * `PUBLIC` - PUBLIC +// * `PRIVATE` - PRIVATE +type ActivityVisibility struct { + VisibilityEnum VisibilityEnum + String string + + typ string +} + +func (a *ActivityVisibility) GetVisibilityEnum() VisibilityEnum { + if a == nil { + return "" + } + return a.VisibilityEnum +} + +func (a *ActivityVisibility) GetString() string { + if a == nil { + return "" + } + return a.String +} + +func (a *ActivityVisibility) UnmarshalJSON(data []byte) error { + var valueVisibilityEnum VisibilityEnum + if err := json.Unmarshal(data, &valueVisibilityEnum); err == nil { + a.typ = "VisibilityEnum" + a.VisibilityEnum = valueVisibilityEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + a.typ = "String" + a.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, a) +} + +func (a ActivityVisibility) MarshalJSON() ([]byte, error) { + if a.typ == "VisibilityEnum" || a.VisibilityEnum != "" { + return json.Marshal(a.VisibilityEnum) + } + if a.typ == "String" || a.String != "" { + return json.Marshal(a.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type ActivityVisibilityVisitor interface { + VisitVisibilityEnum(VisibilityEnum) error + VisitString(string) error +} + +func (a *ActivityVisibility) Accept(visitor ActivityVisibilityVisitor) error { + if a.typ == "VisibilityEnum" || a.VisibilityEnum != "" { + return visitor.VisitVisibilityEnum(a.VisibilityEnum) + } + if a.typ == "String" || a.String != "" { + return visitor.VisitString(a.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type PaginatedActivityList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Activity `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedActivityList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedActivityList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedActivityList) GetResults() []*Activity { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedActivityList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedActivityList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedActivityList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedActivityList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedActivityList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +// * `ADMIN_ONLY` - ADMIN_ONLY +// * `PUBLIC` - PUBLIC +// * `PRIVATE` - PRIVATE +type VisibilityEnum string + +const ( + VisibilityEnumAdminOnly VisibilityEnum = "ADMIN_ONLY" + VisibilityEnumPublic VisibilityEnum = "PUBLIC" + VisibilityEnumPrivate VisibilityEnum = "PRIVATE" +) + +func NewVisibilityEnumFromString(s string) (VisibilityEnum, error) { + switch s { + case "ADMIN_ONLY": + return VisibilityEnumAdminOnly, nil + case "PUBLIC": + return VisibilityEnumPublic, nil + case "PRIVATE": + return VisibilityEnumPrivate, nil + } + var t VisibilityEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (v VisibilityEnum) Ptr() *VisibilityEnum { + return &v +} diff --git a/ats/activities/client.go b/ats/activities/client.go index d2f9f82..647f297 100644 --- a/ats/activities/client.go +++ b/ats/activities/client.go @@ -1,133 +1,135 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package activities import ( context "context" fmt "fmt" - ats "github.com/merge-api/merge-go-client/ats" - core "github.com/merge-api/merge-go-client/core" + ats "github.com/merge-api/merge-go-client/v2/ats" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `Activity` objects. -func (c *Client) List(ctx context.Context, request *ats.ActivitiesListRequest) (*ats.PaginatedActivityList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ats/v1/activities" - - queryParams := make(url.Values) - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteFields != nil { - queryParams.Add("remote_fields", fmt.Sprintf("%v", *request.RemoteFields)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if request.ShowEnumOrigins != nil { - queryParams.Add("show_enum_origins", fmt.Sprintf("%v", *request.ShowEnumOrigins)) - } - if request.UserId != nil { - queryParams.Add("user_id", fmt.Sprintf("%v", *request.UserId)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *ats.PaginatedActivityList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *ats.ActivitiesListRequest, + opts ...option.RequestOption, +) (*core.Page[*ats.Activity], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ats/v1/activities" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *ats.PaginatedActivityList) *internal.PageResponse[*string, *ats.Activity] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *ats.Activity]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Creates an `Activity` object with the given values. -func (c *Client) Create(ctx context.Context, request *ats.ActivityEndpointRequest) (*ats.ActivityResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ats/v1/activities" - - queryParams := make(url.Values) - if request.IsDebugMode != nil { - queryParams.Add("is_debug_mode", fmt.Sprintf("%v", *request.IsDebugMode)) - } - if request.RunAsync != nil { - queryParams.Add("run_async", fmt.Sprintf("%v", *request.RunAsync)) +func (c *Client) Create( + ctx context.Context, + request *ats.ActivityEndpointRequest, + opts ...option.RequestOption, +) (*ats.ActivityResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ats/v1/activities" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *ats.ActivityResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -136,38 +138,46 @@ func (c *Client) Create(ctx context.Context, request *ats.ActivityEndpointReques } // Returns an `Activity` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *ats.ActivitiesRetrieveRequest) (*ats.Activity, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"ats/v1/activities/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.RemoteFields != nil { - queryParams.Add("remote_fields", fmt.Sprintf("%v", *request.RemoteFields)) - } - if request.ShowEnumOrigins != nil { - queryParams.Add("show_enum_origins", fmt.Sprintf("%v", *request.ShowEnumOrigins)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *ats.ActivitiesRetrieveRequest, + opts ...option.RequestOption, +) (*ats.Activity, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/ats/v1/activities/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ats.Activity if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -176,21 +186,34 @@ func (c *Client) Retrieve(ctx context.Context, id string, request *ats.Activitie } // Returns metadata for `Activity` POSTs. -func (c *Client) MetaPostRetrieve(ctx context.Context) (*ats.MetaResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ats/v1/activities/meta/post" +func (c *Client) MetaPostRetrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*ats.MetaResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ats/v1/activities/meta/post" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ats.MetaResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/ats/applications.go b/ats/applications.go index 1eb377d..4bd685e 100644 --- a/ats/applications.go +++ b/ats/applications.go @@ -1,1638 +1,1059 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package ats import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type UpdateApplicationStageRequest struct { // Whether to include debug fields (such as log file links) in the response. - IsDebugMode *bool `json:"-"` + IsDebugMode *bool `json:"-" url:"is_debug_mode,omitempty"` // Whether or not third-party updates should be run asynchronously. - RunAsync *bool `json:"-"` + RunAsync *bool `json:"-" url:"run_async,omitempty"` // The interview stage to move the application to. - JobInterviewStage *string `json:"job_interview_stage,omitempty"` - RemoteUserId *string `json:"remote_user_id,omitempty"` + JobInterviewStage *string `json:"job_interview_stage,omitempty" url:"-"` + RemoteUserId *string `json:"remote_user_id,omitempty" url:"-"` } type ApplicationEndpointRequest struct { // Whether to include debug fields (such as log file links) in the response. - IsDebugMode *bool `json:"-"` + IsDebugMode *bool `json:"-" url:"is_debug_mode,omitempty"` // Whether or not third-party updates should be run asynchronously. - RunAsync *bool `json:"-"` - Model *ApplicationRequest `json:"model,omitempty"` - RemoteUserId string `json:"remote_user_id"` + RunAsync *bool `json:"-" url:"run_async,omitempty"` + Model *ApplicationRequest `json:"model,omitempty" url:"-"` + RemoteUserId string `json:"remote_user_id" url:"-"` } type ApplicationsListRequest struct { // If provided, will only return applications for this candidate. - CandidateId *string `json:"-"` + CandidateId *string `json:"-" url:"candidate_id,omitempty"` // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // If provided, will only return applications credited to this user. - CreditedToId *string `json:"-"` + CreditedToId *string `json:"-" url:"credited_to_id,omitempty"` // If provided, will only return applications at this interview stage. - CurrentStageId *string `json:"-"` + CurrentStageId *string `json:"-" url:"current_stage_id,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *ApplicationsListRequestExpand `json:"-"` + Expand []*ApplicationsListRequestExpandItem `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, will only return applications for this job. - JobId *string `json:"-"` + JobId *string `json:"-" url:"job_id,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // If provided, will only return applications with this reject reason. - RejectReasonId *string `json:"-"` + RejectReasonId *string `json:"-" url:"reject_reason_id,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` // If provided, will only return applications with this source. - Source *string `json:"-"` + Source *string `json:"-" url:"source,omitempty"` } type ApplicationsMetaPostRetrieveRequest struct { // The template ID associated with the nested application in the request. - ApplicationRemoteTemplateId *string `json:"-"` + ApplicationRemoteTemplateId *string `json:"-" url:"application_remote_template_id,omitempty"` } type ApplicationsRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *ApplicationsRetrieveRequestExpand `json:"-"` + Expand []*ApplicationsRetrieveRequestExpandItem `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` } -type ApplicationsListRequestExpand string +type ApplicationsListRequestExpandItem string const ( - ApplicationsListRequestExpandCandidate ApplicationsListRequestExpand = "candidate" - ApplicationsListRequestExpandCandidateCreditedTo ApplicationsListRequestExpand = "candidate,credited_to" - ApplicationsListRequestExpandCandidateCreditedToCurrentStage ApplicationsListRequestExpand = "candidate,credited_to,current_stage" - ApplicationsListRequestExpandCandidateCreditedToCurrentStageRejectReason ApplicationsListRequestExpand = "candidate,credited_to,current_stage,reject_reason" - ApplicationsListRequestExpandCandidateCreditedToRejectReason ApplicationsListRequestExpand = "candidate,credited_to,reject_reason" - ApplicationsListRequestExpandCandidateCurrentStage ApplicationsListRequestExpand = "candidate,current_stage" - ApplicationsListRequestExpandCandidateCurrentStageRejectReason ApplicationsListRequestExpand = "candidate,current_stage,reject_reason" - ApplicationsListRequestExpandCandidateJob ApplicationsListRequestExpand = "candidate,job" - ApplicationsListRequestExpandCandidateJobCreditedTo ApplicationsListRequestExpand = "candidate,job,credited_to" - ApplicationsListRequestExpandCandidateJobCreditedToCurrentStage ApplicationsListRequestExpand = "candidate,job,credited_to,current_stage" - ApplicationsListRequestExpandCandidateJobCreditedToCurrentStageRejectReason ApplicationsListRequestExpand = "candidate,job,credited_to,current_stage,reject_reason" - ApplicationsListRequestExpandCandidateJobCreditedToRejectReason ApplicationsListRequestExpand = "candidate,job,credited_to,reject_reason" - ApplicationsListRequestExpandCandidateJobCurrentStage ApplicationsListRequestExpand = "candidate,job,current_stage" - ApplicationsListRequestExpandCandidateJobCurrentStageRejectReason ApplicationsListRequestExpand = "candidate,job,current_stage,reject_reason" - ApplicationsListRequestExpandCandidateJobRejectReason ApplicationsListRequestExpand = "candidate,job,reject_reason" - ApplicationsListRequestExpandCandidateRejectReason ApplicationsListRequestExpand = "candidate,reject_reason" - ApplicationsListRequestExpandCreditedTo ApplicationsListRequestExpand = "credited_to" - ApplicationsListRequestExpandCreditedToCurrentStage ApplicationsListRequestExpand = "credited_to,current_stage" - ApplicationsListRequestExpandCreditedToCurrentStageRejectReason ApplicationsListRequestExpand = "credited_to,current_stage,reject_reason" - ApplicationsListRequestExpandCreditedToRejectReason ApplicationsListRequestExpand = "credited_to,reject_reason" - ApplicationsListRequestExpandCurrentStage ApplicationsListRequestExpand = "current_stage" - ApplicationsListRequestExpandCurrentStageRejectReason ApplicationsListRequestExpand = "current_stage,reject_reason" - ApplicationsListRequestExpandJob ApplicationsListRequestExpand = "job" - ApplicationsListRequestExpandJobCreditedTo ApplicationsListRequestExpand = "job,credited_to" - ApplicationsListRequestExpandJobCreditedToCurrentStage ApplicationsListRequestExpand = "job,credited_to,current_stage" - ApplicationsListRequestExpandJobCreditedToCurrentStageRejectReason ApplicationsListRequestExpand = "job,credited_to,current_stage,reject_reason" - ApplicationsListRequestExpandJobCreditedToRejectReason ApplicationsListRequestExpand = "job,credited_to,reject_reason" - ApplicationsListRequestExpandJobCurrentStage ApplicationsListRequestExpand = "job,current_stage" - ApplicationsListRequestExpandJobCurrentStageRejectReason ApplicationsListRequestExpand = "job,current_stage,reject_reason" - ApplicationsListRequestExpandJobRejectReason ApplicationsListRequestExpand = "job,reject_reason" - ApplicationsListRequestExpandOffers ApplicationsListRequestExpand = "offers" - ApplicationsListRequestExpandOffersCandidate ApplicationsListRequestExpand = "offers,candidate" - ApplicationsListRequestExpandOffersCandidateCreditedTo ApplicationsListRequestExpand = "offers,candidate,credited_to" - ApplicationsListRequestExpandOffersCandidateCreditedToCurrentStage ApplicationsListRequestExpand = "offers,candidate,credited_to,current_stage" - ApplicationsListRequestExpandOffersCandidateCreditedToCurrentStageRejectReason ApplicationsListRequestExpand = "offers,candidate,credited_to,current_stage,reject_reason" - ApplicationsListRequestExpandOffersCandidateCreditedToRejectReason ApplicationsListRequestExpand = "offers,candidate,credited_to,reject_reason" - ApplicationsListRequestExpandOffersCandidateCurrentStage ApplicationsListRequestExpand = "offers,candidate,current_stage" - ApplicationsListRequestExpandOffersCandidateCurrentStageRejectReason ApplicationsListRequestExpand = "offers,candidate,current_stage,reject_reason" - ApplicationsListRequestExpandOffersCandidateJob ApplicationsListRequestExpand = "offers,candidate,job" - ApplicationsListRequestExpandOffersCandidateJobCreditedTo ApplicationsListRequestExpand = "offers,candidate,job,credited_to" - ApplicationsListRequestExpandOffersCandidateJobCreditedToCurrentStage ApplicationsListRequestExpand = "offers,candidate,job,credited_to,current_stage" - ApplicationsListRequestExpandOffersCandidateJobCreditedToCurrentStageRejectReason ApplicationsListRequestExpand = "offers,candidate,job,credited_to,current_stage,reject_reason" - ApplicationsListRequestExpandOffersCandidateJobCreditedToRejectReason ApplicationsListRequestExpand = "offers,candidate,job,credited_to,reject_reason" - ApplicationsListRequestExpandOffersCandidateJobCurrentStage ApplicationsListRequestExpand = "offers,candidate,job,current_stage" - ApplicationsListRequestExpandOffersCandidateJobCurrentStageRejectReason ApplicationsListRequestExpand = "offers,candidate,job,current_stage,reject_reason" - ApplicationsListRequestExpandOffersCandidateJobRejectReason ApplicationsListRequestExpand = "offers,candidate,job,reject_reason" - ApplicationsListRequestExpandOffersCandidateRejectReason ApplicationsListRequestExpand = "offers,candidate,reject_reason" - ApplicationsListRequestExpandOffersCreditedTo ApplicationsListRequestExpand = "offers,credited_to" - ApplicationsListRequestExpandOffersCreditedToCurrentStage ApplicationsListRequestExpand = "offers,credited_to,current_stage" - ApplicationsListRequestExpandOffersCreditedToCurrentStageRejectReason ApplicationsListRequestExpand = "offers,credited_to,current_stage,reject_reason" - ApplicationsListRequestExpandOffersCreditedToRejectReason ApplicationsListRequestExpand = "offers,credited_to,reject_reason" - ApplicationsListRequestExpandOffersCurrentStage ApplicationsListRequestExpand = "offers,current_stage" - ApplicationsListRequestExpandOffersCurrentStageRejectReason ApplicationsListRequestExpand = "offers,current_stage,reject_reason" - ApplicationsListRequestExpandOffersJob ApplicationsListRequestExpand = "offers,job" - ApplicationsListRequestExpandOffersJobCreditedTo ApplicationsListRequestExpand = "offers,job,credited_to" - ApplicationsListRequestExpandOffersJobCreditedToCurrentStage ApplicationsListRequestExpand = "offers,job,credited_to,current_stage" - ApplicationsListRequestExpandOffersJobCreditedToCurrentStageRejectReason ApplicationsListRequestExpand = "offers,job,credited_to,current_stage,reject_reason" - ApplicationsListRequestExpandOffersJobCreditedToRejectReason ApplicationsListRequestExpand = "offers,job,credited_to,reject_reason" - ApplicationsListRequestExpandOffersJobCurrentStage ApplicationsListRequestExpand = "offers,job,current_stage" - ApplicationsListRequestExpandOffersJobCurrentStageRejectReason ApplicationsListRequestExpand = "offers,job,current_stage,reject_reason" - ApplicationsListRequestExpandOffersJobRejectReason ApplicationsListRequestExpand = "offers,job,reject_reason" - ApplicationsListRequestExpandOffersRejectReason ApplicationsListRequestExpand = "offers,reject_reason" - ApplicationsListRequestExpandOffersScreeningQuestionAnswers ApplicationsListRequestExpand = "offers,screening_question_answers" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersCandidate ApplicationsListRequestExpand = "offers,screening_question_answers,candidate" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersCandidateCreditedTo ApplicationsListRequestExpand = "offers,screening_question_answers,candidate,credited_to" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersCandidateCreditedToCurrentStage ApplicationsListRequestExpand = "offers,screening_question_answers,candidate,credited_to,current_stage" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersCandidateCreditedToCurrentStageRejectReason ApplicationsListRequestExpand = "offers,screening_question_answers,candidate,credited_to,current_stage,reject_reason" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersCandidateCreditedToRejectReason ApplicationsListRequestExpand = "offers,screening_question_answers,candidate,credited_to,reject_reason" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersCandidateCurrentStage ApplicationsListRequestExpand = "offers,screening_question_answers,candidate,current_stage" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersCandidateCurrentStageRejectReason ApplicationsListRequestExpand = "offers,screening_question_answers,candidate,current_stage,reject_reason" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersCandidateJob ApplicationsListRequestExpand = "offers,screening_question_answers,candidate,job" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersCandidateJobCreditedTo ApplicationsListRequestExpand = "offers,screening_question_answers,candidate,job,credited_to" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersCandidateJobCreditedToCurrentStage ApplicationsListRequestExpand = "offers,screening_question_answers,candidate,job,credited_to,current_stage" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersCandidateJobCreditedToCurrentStageRejectReason ApplicationsListRequestExpand = "offers,screening_question_answers,candidate,job,credited_to,current_stage,reject_reason" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersCandidateJobCreditedToRejectReason ApplicationsListRequestExpand = "offers,screening_question_answers,candidate,job,credited_to,reject_reason" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersCandidateJobCurrentStage ApplicationsListRequestExpand = "offers,screening_question_answers,candidate,job,current_stage" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersCandidateJobCurrentStageRejectReason ApplicationsListRequestExpand = "offers,screening_question_answers,candidate,job,current_stage,reject_reason" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersCandidateJobRejectReason ApplicationsListRequestExpand = "offers,screening_question_answers,candidate,job,reject_reason" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersCandidateRejectReason ApplicationsListRequestExpand = "offers,screening_question_answers,candidate,reject_reason" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersCreditedTo ApplicationsListRequestExpand = "offers,screening_question_answers,credited_to" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersCreditedToCurrentStage ApplicationsListRequestExpand = "offers,screening_question_answers,credited_to,current_stage" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersCreditedToCurrentStageRejectReason ApplicationsListRequestExpand = "offers,screening_question_answers,credited_to,current_stage,reject_reason" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersCreditedToRejectReason ApplicationsListRequestExpand = "offers,screening_question_answers,credited_to,reject_reason" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersCurrentStage ApplicationsListRequestExpand = "offers,screening_question_answers,current_stage" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersCurrentStageRejectReason ApplicationsListRequestExpand = "offers,screening_question_answers,current_stage,reject_reason" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersJob ApplicationsListRequestExpand = "offers,screening_question_answers,job" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersJobCreditedTo ApplicationsListRequestExpand = "offers,screening_question_answers,job,credited_to" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersJobCreditedToCurrentStage ApplicationsListRequestExpand = "offers,screening_question_answers,job,credited_to,current_stage" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersJobCreditedToCurrentStageRejectReason ApplicationsListRequestExpand = "offers,screening_question_answers,job,credited_to,current_stage,reject_reason" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersJobCreditedToRejectReason ApplicationsListRequestExpand = "offers,screening_question_answers,job,credited_to,reject_reason" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersJobCurrentStage ApplicationsListRequestExpand = "offers,screening_question_answers,job,current_stage" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersJobCurrentStageRejectReason ApplicationsListRequestExpand = "offers,screening_question_answers,job,current_stage,reject_reason" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersJobRejectReason ApplicationsListRequestExpand = "offers,screening_question_answers,job,reject_reason" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersRejectReason ApplicationsListRequestExpand = "offers,screening_question_answers,reject_reason" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestion ApplicationsListRequestExpand = "offers,screening_question_answers,screening_question_answers.question" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidate ApplicationsListRequestExpand = "offers,screening_question_answers,screening_question_answers.question,candidate" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCreditedTo ApplicationsListRequestExpand = "offers,screening_question_answers,screening_question_answers.question,candidate,credited_to" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCreditedToCurrentStage ApplicationsListRequestExpand = "offers,screening_question_answers,screening_question_answers.question,candidate,credited_to,current_stage" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCreditedToCurrentStageRejectReason ApplicationsListRequestExpand = "offers,screening_question_answers,screening_question_answers.question,candidate,credited_to,current_stage,reject_reason" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCreditedToRejectReason ApplicationsListRequestExpand = "offers,screening_question_answers,screening_question_answers.question,candidate,credited_to,reject_reason" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCurrentStage ApplicationsListRequestExpand = "offers,screening_question_answers,screening_question_answers.question,candidate,current_stage" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCurrentStageRejectReason ApplicationsListRequestExpand = "offers,screening_question_answers,screening_question_answers.question,candidate,current_stage,reject_reason" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJob ApplicationsListRequestExpand = "offers,screening_question_answers,screening_question_answers.question,candidate,job" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCreditedTo ApplicationsListRequestExpand = "offers,screening_question_answers,screening_question_answers.question,candidate,job,credited_to" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCreditedToCurrentStage ApplicationsListRequestExpand = "offers,screening_question_answers,screening_question_answers.question,candidate,job,credited_to,current_stage" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCreditedToCurrentStageRejectReason ApplicationsListRequestExpand = "offers,screening_question_answers,screening_question_answers.question,candidate,job,credited_to,current_stage,reject_reason" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCreditedToRejectReason ApplicationsListRequestExpand = "offers,screening_question_answers,screening_question_answers.question,candidate,job,credited_to,reject_reason" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCurrentStage ApplicationsListRequestExpand = "offers,screening_question_answers,screening_question_answers.question,candidate,job,current_stage" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCurrentStageRejectReason ApplicationsListRequestExpand = "offers,screening_question_answers,screening_question_answers.question,candidate,job,current_stage,reject_reason" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobRejectReason ApplicationsListRequestExpand = "offers,screening_question_answers,screening_question_answers.question,candidate,job,reject_reason" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateRejectReason ApplicationsListRequestExpand = "offers,screening_question_answers,screening_question_answers.question,candidate,reject_reason" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCreditedTo ApplicationsListRequestExpand = "offers,screening_question_answers,screening_question_answers.question,credited_to" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCreditedToCurrentStage ApplicationsListRequestExpand = "offers,screening_question_answers,screening_question_answers.question,credited_to,current_stage" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCreditedToCurrentStageRejectReason ApplicationsListRequestExpand = "offers,screening_question_answers,screening_question_answers.question,credited_to,current_stage,reject_reason" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCreditedToRejectReason ApplicationsListRequestExpand = "offers,screening_question_answers,screening_question_answers.question,credited_to,reject_reason" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCurrentStage ApplicationsListRequestExpand = "offers,screening_question_answers,screening_question_answers.question,current_stage" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCurrentStageRejectReason ApplicationsListRequestExpand = "offers,screening_question_answers,screening_question_answers.question,current_stage,reject_reason" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionJob ApplicationsListRequestExpand = "offers,screening_question_answers,screening_question_answers.question,job" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCreditedTo ApplicationsListRequestExpand = "offers,screening_question_answers,screening_question_answers.question,job,credited_to" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCreditedToCurrentStage ApplicationsListRequestExpand = "offers,screening_question_answers,screening_question_answers.question,job,credited_to,current_stage" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCreditedToCurrentStageRejectReason ApplicationsListRequestExpand = "offers,screening_question_answers,screening_question_answers.question,job,credited_to,current_stage,reject_reason" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCreditedToRejectReason ApplicationsListRequestExpand = "offers,screening_question_answers,screening_question_answers.question,job,credited_to,reject_reason" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCurrentStage ApplicationsListRequestExpand = "offers,screening_question_answers,screening_question_answers.question,job,current_stage" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCurrentStageRejectReason ApplicationsListRequestExpand = "offers,screening_question_answers,screening_question_answers.question,job,current_stage,reject_reason" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobRejectReason ApplicationsListRequestExpand = "offers,screening_question_answers,screening_question_answers.question,job,reject_reason" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionRejectReason ApplicationsListRequestExpand = "offers,screening_question_answers,screening_question_answers.question,reject_reason" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestion ApplicationsListRequestExpand = "offers,screening_question_answers.question" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionCandidate ApplicationsListRequestExpand = "offers,screening_question_answers.question,candidate" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionCandidateCreditedTo ApplicationsListRequestExpand = "offers,screening_question_answers.question,candidate,credited_to" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionCandidateCreditedToCurrentStage ApplicationsListRequestExpand = "offers,screening_question_answers.question,candidate,credited_to,current_stage" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionCandidateCreditedToCurrentStageRejectReason ApplicationsListRequestExpand = "offers,screening_question_answers.question,candidate,credited_to,current_stage,reject_reason" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionCandidateCreditedToRejectReason ApplicationsListRequestExpand = "offers,screening_question_answers.question,candidate,credited_to,reject_reason" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionCandidateCurrentStage ApplicationsListRequestExpand = "offers,screening_question_answers.question,candidate,current_stage" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionCandidateCurrentStageRejectReason ApplicationsListRequestExpand = "offers,screening_question_answers.question,candidate,current_stage,reject_reason" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionCandidateJob ApplicationsListRequestExpand = "offers,screening_question_answers.question,candidate,job" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionCandidateJobCreditedTo ApplicationsListRequestExpand = "offers,screening_question_answers.question,candidate,job,credited_to" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionCandidateJobCreditedToCurrentStage ApplicationsListRequestExpand = "offers,screening_question_answers.question,candidate,job,credited_to,current_stage" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionCandidateJobCreditedToCurrentStageRejectReason ApplicationsListRequestExpand = "offers,screening_question_answers.question,candidate,job,credited_to,current_stage,reject_reason" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionCandidateJobCreditedToRejectReason ApplicationsListRequestExpand = "offers,screening_question_answers.question,candidate,job,credited_to,reject_reason" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionCandidateJobCurrentStage ApplicationsListRequestExpand = "offers,screening_question_answers.question,candidate,job,current_stage" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionCandidateJobCurrentStageRejectReason ApplicationsListRequestExpand = "offers,screening_question_answers.question,candidate,job,current_stage,reject_reason" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionCandidateJobRejectReason ApplicationsListRequestExpand = "offers,screening_question_answers.question,candidate,job,reject_reason" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionCandidateRejectReason ApplicationsListRequestExpand = "offers,screening_question_answers.question,candidate,reject_reason" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionCreditedTo ApplicationsListRequestExpand = "offers,screening_question_answers.question,credited_to" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionCreditedToCurrentStage ApplicationsListRequestExpand = "offers,screening_question_answers.question,credited_to,current_stage" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionCreditedToCurrentStageRejectReason ApplicationsListRequestExpand = "offers,screening_question_answers.question,credited_to,current_stage,reject_reason" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionCreditedToRejectReason ApplicationsListRequestExpand = "offers,screening_question_answers.question,credited_to,reject_reason" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionCurrentStage ApplicationsListRequestExpand = "offers,screening_question_answers.question,current_stage" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionCurrentStageRejectReason ApplicationsListRequestExpand = "offers,screening_question_answers.question,current_stage,reject_reason" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionJob ApplicationsListRequestExpand = "offers,screening_question_answers.question,job" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionJobCreditedTo ApplicationsListRequestExpand = "offers,screening_question_answers.question,job,credited_to" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionJobCreditedToCurrentStage ApplicationsListRequestExpand = "offers,screening_question_answers.question,job,credited_to,current_stage" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionJobCreditedToCurrentStageRejectReason ApplicationsListRequestExpand = "offers,screening_question_answers.question,job,credited_to,current_stage,reject_reason" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionJobCreditedToRejectReason ApplicationsListRequestExpand = "offers,screening_question_answers.question,job,credited_to,reject_reason" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionJobCurrentStage ApplicationsListRequestExpand = "offers,screening_question_answers.question,job,current_stage" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionJobCurrentStageRejectReason ApplicationsListRequestExpand = "offers,screening_question_answers.question,job,current_stage,reject_reason" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionJobRejectReason ApplicationsListRequestExpand = "offers,screening_question_answers.question,job,reject_reason" - ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionRejectReason ApplicationsListRequestExpand = "offers,screening_question_answers.question,reject_reason" - ApplicationsListRequestExpandRejectReason ApplicationsListRequestExpand = "reject_reason" - ApplicationsListRequestExpandScreeningQuestionAnswers ApplicationsListRequestExpand = "screening_question_answers" - ApplicationsListRequestExpandScreeningQuestionAnswersCandidate ApplicationsListRequestExpand = "screening_question_answers,candidate" - ApplicationsListRequestExpandScreeningQuestionAnswersCandidateCreditedTo ApplicationsListRequestExpand = "screening_question_answers,candidate,credited_to" - ApplicationsListRequestExpandScreeningQuestionAnswersCandidateCreditedToCurrentStage ApplicationsListRequestExpand = "screening_question_answers,candidate,credited_to,current_stage" - ApplicationsListRequestExpandScreeningQuestionAnswersCandidateCreditedToCurrentStageRejectReason ApplicationsListRequestExpand = "screening_question_answers,candidate,credited_to,current_stage,reject_reason" - ApplicationsListRequestExpandScreeningQuestionAnswersCandidateCreditedToRejectReason ApplicationsListRequestExpand = "screening_question_answers,candidate,credited_to,reject_reason" - ApplicationsListRequestExpandScreeningQuestionAnswersCandidateCurrentStage ApplicationsListRequestExpand = "screening_question_answers,candidate,current_stage" - ApplicationsListRequestExpandScreeningQuestionAnswersCandidateCurrentStageRejectReason ApplicationsListRequestExpand = "screening_question_answers,candidate,current_stage,reject_reason" - ApplicationsListRequestExpandScreeningQuestionAnswersCandidateJob ApplicationsListRequestExpand = "screening_question_answers,candidate,job" - ApplicationsListRequestExpandScreeningQuestionAnswersCandidateJobCreditedTo ApplicationsListRequestExpand = "screening_question_answers,candidate,job,credited_to" - ApplicationsListRequestExpandScreeningQuestionAnswersCandidateJobCreditedToCurrentStage ApplicationsListRequestExpand = "screening_question_answers,candidate,job,credited_to,current_stage" - ApplicationsListRequestExpandScreeningQuestionAnswersCandidateJobCreditedToCurrentStageRejectReason ApplicationsListRequestExpand = "screening_question_answers,candidate,job,credited_to,current_stage,reject_reason" - ApplicationsListRequestExpandScreeningQuestionAnswersCandidateJobCreditedToRejectReason ApplicationsListRequestExpand = "screening_question_answers,candidate,job,credited_to,reject_reason" - ApplicationsListRequestExpandScreeningQuestionAnswersCandidateJobCurrentStage ApplicationsListRequestExpand = "screening_question_answers,candidate,job,current_stage" - ApplicationsListRequestExpandScreeningQuestionAnswersCandidateJobCurrentStageRejectReason ApplicationsListRequestExpand = "screening_question_answers,candidate,job,current_stage,reject_reason" - ApplicationsListRequestExpandScreeningQuestionAnswersCandidateJobRejectReason ApplicationsListRequestExpand = "screening_question_answers,candidate,job,reject_reason" - ApplicationsListRequestExpandScreeningQuestionAnswersCandidateRejectReason ApplicationsListRequestExpand = "screening_question_answers,candidate,reject_reason" - ApplicationsListRequestExpandScreeningQuestionAnswersCreditedTo ApplicationsListRequestExpand = "screening_question_answers,credited_to" - ApplicationsListRequestExpandScreeningQuestionAnswersCreditedToCurrentStage ApplicationsListRequestExpand = "screening_question_answers,credited_to,current_stage" - ApplicationsListRequestExpandScreeningQuestionAnswersCreditedToCurrentStageRejectReason ApplicationsListRequestExpand = "screening_question_answers,credited_to,current_stage,reject_reason" - ApplicationsListRequestExpandScreeningQuestionAnswersCreditedToRejectReason ApplicationsListRequestExpand = "screening_question_answers,credited_to,reject_reason" - ApplicationsListRequestExpandScreeningQuestionAnswersCurrentStage ApplicationsListRequestExpand = "screening_question_answers,current_stage" - ApplicationsListRequestExpandScreeningQuestionAnswersCurrentStageRejectReason ApplicationsListRequestExpand = "screening_question_answers,current_stage,reject_reason" - ApplicationsListRequestExpandScreeningQuestionAnswersJob ApplicationsListRequestExpand = "screening_question_answers,job" - ApplicationsListRequestExpandScreeningQuestionAnswersJobCreditedTo ApplicationsListRequestExpand = "screening_question_answers,job,credited_to" - ApplicationsListRequestExpandScreeningQuestionAnswersJobCreditedToCurrentStage ApplicationsListRequestExpand = "screening_question_answers,job,credited_to,current_stage" - ApplicationsListRequestExpandScreeningQuestionAnswersJobCreditedToCurrentStageRejectReason ApplicationsListRequestExpand = "screening_question_answers,job,credited_to,current_stage,reject_reason" - ApplicationsListRequestExpandScreeningQuestionAnswersJobCreditedToRejectReason ApplicationsListRequestExpand = "screening_question_answers,job,credited_to,reject_reason" - ApplicationsListRequestExpandScreeningQuestionAnswersJobCurrentStage ApplicationsListRequestExpand = "screening_question_answers,job,current_stage" - ApplicationsListRequestExpandScreeningQuestionAnswersJobCurrentStageRejectReason ApplicationsListRequestExpand = "screening_question_answers,job,current_stage,reject_reason" - ApplicationsListRequestExpandScreeningQuestionAnswersJobRejectReason ApplicationsListRequestExpand = "screening_question_answers,job,reject_reason" - ApplicationsListRequestExpandScreeningQuestionAnswersRejectReason ApplicationsListRequestExpand = "screening_question_answers,reject_reason" - ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestion ApplicationsListRequestExpand = "screening_question_answers,screening_question_answers.question" - ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidate ApplicationsListRequestExpand = "screening_question_answers,screening_question_answers.question,candidate" - ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCreditedTo ApplicationsListRequestExpand = "screening_question_answers,screening_question_answers.question,candidate,credited_to" - ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCreditedToCurrentStage ApplicationsListRequestExpand = "screening_question_answers,screening_question_answers.question,candidate,credited_to,current_stage" - ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCreditedToCurrentStageRejectReason ApplicationsListRequestExpand = "screening_question_answers,screening_question_answers.question,candidate,credited_to,current_stage,reject_reason" - ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCreditedToRejectReason ApplicationsListRequestExpand = "screening_question_answers,screening_question_answers.question,candidate,credited_to,reject_reason" - ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCurrentStage ApplicationsListRequestExpand = "screening_question_answers,screening_question_answers.question,candidate,current_stage" - ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCurrentStageRejectReason ApplicationsListRequestExpand = "screening_question_answers,screening_question_answers.question,candidate,current_stage,reject_reason" - ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJob ApplicationsListRequestExpand = "screening_question_answers,screening_question_answers.question,candidate,job" - ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCreditedTo ApplicationsListRequestExpand = "screening_question_answers,screening_question_answers.question,candidate,job,credited_to" - ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCreditedToCurrentStage ApplicationsListRequestExpand = "screening_question_answers,screening_question_answers.question,candidate,job,credited_to,current_stage" - ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCreditedToCurrentStageRejectReason ApplicationsListRequestExpand = "screening_question_answers,screening_question_answers.question,candidate,job,credited_to,current_stage,reject_reason" - ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCreditedToRejectReason ApplicationsListRequestExpand = "screening_question_answers,screening_question_answers.question,candidate,job,credited_to,reject_reason" - ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCurrentStage ApplicationsListRequestExpand = "screening_question_answers,screening_question_answers.question,candidate,job,current_stage" - ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCurrentStageRejectReason ApplicationsListRequestExpand = "screening_question_answers,screening_question_answers.question,candidate,job,current_stage,reject_reason" - ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobRejectReason ApplicationsListRequestExpand = "screening_question_answers,screening_question_answers.question,candidate,job,reject_reason" - ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateRejectReason ApplicationsListRequestExpand = "screening_question_answers,screening_question_answers.question,candidate,reject_reason" - ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCreditedTo ApplicationsListRequestExpand = "screening_question_answers,screening_question_answers.question,credited_to" - ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCreditedToCurrentStage ApplicationsListRequestExpand = "screening_question_answers,screening_question_answers.question,credited_to,current_stage" - ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCreditedToCurrentStageRejectReason ApplicationsListRequestExpand = "screening_question_answers,screening_question_answers.question,credited_to,current_stage,reject_reason" - ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCreditedToRejectReason ApplicationsListRequestExpand = "screening_question_answers,screening_question_answers.question,credited_to,reject_reason" - ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCurrentStage ApplicationsListRequestExpand = "screening_question_answers,screening_question_answers.question,current_stage" - ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCurrentStageRejectReason ApplicationsListRequestExpand = "screening_question_answers,screening_question_answers.question,current_stage,reject_reason" - ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionJob ApplicationsListRequestExpand = "screening_question_answers,screening_question_answers.question,job" - ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCreditedTo ApplicationsListRequestExpand = "screening_question_answers,screening_question_answers.question,job,credited_to" - ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCreditedToCurrentStage ApplicationsListRequestExpand = "screening_question_answers,screening_question_answers.question,job,credited_to,current_stage" - ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCreditedToCurrentStageRejectReason ApplicationsListRequestExpand = "screening_question_answers,screening_question_answers.question,job,credited_to,current_stage,reject_reason" - ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCreditedToRejectReason ApplicationsListRequestExpand = "screening_question_answers,screening_question_answers.question,job,credited_to,reject_reason" - ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCurrentStage ApplicationsListRequestExpand = "screening_question_answers,screening_question_answers.question,job,current_stage" - ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCurrentStageRejectReason ApplicationsListRequestExpand = "screening_question_answers,screening_question_answers.question,job,current_stage,reject_reason" - ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobRejectReason ApplicationsListRequestExpand = "screening_question_answers,screening_question_answers.question,job,reject_reason" - ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionRejectReason ApplicationsListRequestExpand = "screening_question_answers,screening_question_answers.question,reject_reason" - ApplicationsListRequestExpandScreeningQuestionAnswersQuestion ApplicationsListRequestExpand = "screening_question_answers.question" - ApplicationsListRequestExpandScreeningQuestionAnswersQuestionCandidate ApplicationsListRequestExpand = "screening_question_answers.question,candidate" - ApplicationsListRequestExpandScreeningQuestionAnswersQuestionCandidateCreditedTo ApplicationsListRequestExpand = "screening_question_answers.question,candidate,credited_to" - ApplicationsListRequestExpandScreeningQuestionAnswersQuestionCandidateCreditedToCurrentStage ApplicationsListRequestExpand = "screening_question_answers.question,candidate,credited_to,current_stage" - ApplicationsListRequestExpandScreeningQuestionAnswersQuestionCandidateCreditedToCurrentStageRejectReason ApplicationsListRequestExpand = "screening_question_answers.question,candidate,credited_to,current_stage,reject_reason" - ApplicationsListRequestExpandScreeningQuestionAnswersQuestionCandidateCreditedToRejectReason ApplicationsListRequestExpand = "screening_question_answers.question,candidate,credited_to,reject_reason" - ApplicationsListRequestExpandScreeningQuestionAnswersQuestionCandidateCurrentStage ApplicationsListRequestExpand = "screening_question_answers.question,candidate,current_stage" - ApplicationsListRequestExpandScreeningQuestionAnswersQuestionCandidateCurrentStageRejectReason ApplicationsListRequestExpand = "screening_question_answers.question,candidate,current_stage,reject_reason" - ApplicationsListRequestExpandScreeningQuestionAnswersQuestionCandidateJob ApplicationsListRequestExpand = "screening_question_answers.question,candidate,job" - ApplicationsListRequestExpandScreeningQuestionAnswersQuestionCandidateJobCreditedTo ApplicationsListRequestExpand = "screening_question_answers.question,candidate,job,credited_to" - ApplicationsListRequestExpandScreeningQuestionAnswersQuestionCandidateJobCreditedToCurrentStage ApplicationsListRequestExpand = "screening_question_answers.question,candidate,job,credited_to,current_stage" - ApplicationsListRequestExpandScreeningQuestionAnswersQuestionCandidateJobCreditedToCurrentStageRejectReason ApplicationsListRequestExpand = "screening_question_answers.question,candidate,job,credited_to,current_stage,reject_reason" - ApplicationsListRequestExpandScreeningQuestionAnswersQuestionCandidateJobCreditedToRejectReason ApplicationsListRequestExpand = "screening_question_answers.question,candidate,job,credited_to,reject_reason" - ApplicationsListRequestExpandScreeningQuestionAnswersQuestionCandidateJobCurrentStage ApplicationsListRequestExpand = "screening_question_answers.question,candidate,job,current_stage" - ApplicationsListRequestExpandScreeningQuestionAnswersQuestionCandidateJobCurrentStageRejectReason ApplicationsListRequestExpand = "screening_question_answers.question,candidate,job,current_stage,reject_reason" - ApplicationsListRequestExpandScreeningQuestionAnswersQuestionCandidateJobRejectReason ApplicationsListRequestExpand = "screening_question_answers.question,candidate,job,reject_reason" - ApplicationsListRequestExpandScreeningQuestionAnswersQuestionCandidateRejectReason ApplicationsListRequestExpand = "screening_question_answers.question,candidate,reject_reason" - ApplicationsListRequestExpandScreeningQuestionAnswersQuestionCreditedTo ApplicationsListRequestExpand = "screening_question_answers.question,credited_to" - ApplicationsListRequestExpandScreeningQuestionAnswersQuestionCreditedToCurrentStage ApplicationsListRequestExpand = "screening_question_answers.question,credited_to,current_stage" - ApplicationsListRequestExpandScreeningQuestionAnswersQuestionCreditedToCurrentStageRejectReason ApplicationsListRequestExpand = "screening_question_answers.question,credited_to,current_stage,reject_reason" - ApplicationsListRequestExpandScreeningQuestionAnswersQuestionCreditedToRejectReason ApplicationsListRequestExpand = "screening_question_answers.question,credited_to,reject_reason" - ApplicationsListRequestExpandScreeningQuestionAnswersQuestionCurrentStage ApplicationsListRequestExpand = "screening_question_answers.question,current_stage" - ApplicationsListRequestExpandScreeningQuestionAnswersQuestionCurrentStageRejectReason ApplicationsListRequestExpand = "screening_question_answers.question,current_stage,reject_reason" - ApplicationsListRequestExpandScreeningQuestionAnswersQuestionJob ApplicationsListRequestExpand = "screening_question_answers.question,job" - ApplicationsListRequestExpandScreeningQuestionAnswersQuestionJobCreditedTo ApplicationsListRequestExpand = "screening_question_answers.question,job,credited_to" - ApplicationsListRequestExpandScreeningQuestionAnswersQuestionJobCreditedToCurrentStage ApplicationsListRequestExpand = "screening_question_answers.question,job,credited_to,current_stage" - ApplicationsListRequestExpandScreeningQuestionAnswersQuestionJobCreditedToCurrentStageRejectReason ApplicationsListRequestExpand = "screening_question_answers.question,job,credited_to,current_stage,reject_reason" - ApplicationsListRequestExpandScreeningQuestionAnswersQuestionJobCreditedToRejectReason ApplicationsListRequestExpand = "screening_question_answers.question,job,credited_to,reject_reason" - ApplicationsListRequestExpandScreeningQuestionAnswersQuestionJobCurrentStage ApplicationsListRequestExpand = "screening_question_answers.question,job,current_stage" - ApplicationsListRequestExpandScreeningQuestionAnswersQuestionJobCurrentStageRejectReason ApplicationsListRequestExpand = "screening_question_answers.question,job,current_stage,reject_reason" - ApplicationsListRequestExpandScreeningQuestionAnswersQuestionJobRejectReason ApplicationsListRequestExpand = "screening_question_answers.question,job,reject_reason" - ApplicationsListRequestExpandScreeningQuestionAnswersQuestionRejectReason ApplicationsListRequestExpand = "screening_question_answers.question,reject_reason" + ApplicationsListRequestExpandItemCandidate ApplicationsListRequestExpandItem = "candidate" + ApplicationsListRequestExpandItemCreditedTo ApplicationsListRequestExpandItem = "credited_to" + ApplicationsListRequestExpandItemCurrentStage ApplicationsListRequestExpandItem = "current_stage" + ApplicationsListRequestExpandItemJob ApplicationsListRequestExpandItem = "job" + ApplicationsListRequestExpandItemOffers ApplicationsListRequestExpandItem = "offers" + ApplicationsListRequestExpandItemRejectReason ApplicationsListRequestExpandItem = "reject_reason" + ApplicationsListRequestExpandItemScreeningQuestionAnswers ApplicationsListRequestExpandItem = "screening_question_answers" + ApplicationsListRequestExpandItemScreeningQuestionAnswersQuestion ApplicationsListRequestExpandItem = "screening_question_answers.question" ) -func NewApplicationsListRequestExpandFromString(s string) (ApplicationsListRequestExpand, error) { +func NewApplicationsListRequestExpandItemFromString(s string) (ApplicationsListRequestExpandItem, error) { switch s { case "candidate": - return ApplicationsListRequestExpandCandidate, nil - case "candidate,credited_to": - return ApplicationsListRequestExpandCandidateCreditedTo, nil - case "candidate,credited_to,current_stage": - return ApplicationsListRequestExpandCandidateCreditedToCurrentStage, nil - case "candidate,credited_to,current_stage,reject_reason": - return ApplicationsListRequestExpandCandidateCreditedToCurrentStageRejectReason, nil - case "candidate,credited_to,reject_reason": - return ApplicationsListRequestExpandCandidateCreditedToRejectReason, nil - case "candidate,current_stage": - return ApplicationsListRequestExpandCandidateCurrentStage, nil - case "candidate,current_stage,reject_reason": - return ApplicationsListRequestExpandCandidateCurrentStageRejectReason, nil - case "candidate,job": - return ApplicationsListRequestExpandCandidateJob, nil - case "candidate,job,credited_to": - return ApplicationsListRequestExpandCandidateJobCreditedTo, nil - case "candidate,job,credited_to,current_stage": - return ApplicationsListRequestExpandCandidateJobCreditedToCurrentStage, nil - case "candidate,job,credited_to,current_stage,reject_reason": - return ApplicationsListRequestExpandCandidateJobCreditedToCurrentStageRejectReason, nil - case "candidate,job,credited_to,reject_reason": - return ApplicationsListRequestExpandCandidateJobCreditedToRejectReason, nil - case "candidate,job,current_stage": - return ApplicationsListRequestExpandCandidateJobCurrentStage, nil - case "candidate,job,current_stage,reject_reason": - return ApplicationsListRequestExpandCandidateJobCurrentStageRejectReason, nil - case "candidate,job,reject_reason": - return ApplicationsListRequestExpandCandidateJobRejectReason, nil - case "candidate,reject_reason": - return ApplicationsListRequestExpandCandidateRejectReason, nil + return ApplicationsListRequestExpandItemCandidate, nil case "credited_to": - return ApplicationsListRequestExpandCreditedTo, nil - case "credited_to,current_stage": - return ApplicationsListRequestExpandCreditedToCurrentStage, nil - case "credited_to,current_stage,reject_reason": - return ApplicationsListRequestExpandCreditedToCurrentStageRejectReason, nil - case "credited_to,reject_reason": - return ApplicationsListRequestExpandCreditedToRejectReason, nil + return ApplicationsListRequestExpandItemCreditedTo, nil case "current_stage": - return ApplicationsListRequestExpandCurrentStage, nil - case "current_stage,reject_reason": - return ApplicationsListRequestExpandCurrentStageRejectReason, nil + return ApplicationsListRequestExpandItemCurrentStage, nil case "job": - return ApplicationsListRequestExpandJob, nil - case "job,credited_to": - return ApplicationsListRequestExpandJobCreditedTo, nil - case "job,credited_to,current_stage": - return ApplicationsListRequestExpandJobCreditedToCurrentStage, nil - case "job,credited_to,current_stage,reject_reason": - return ApplicationsListRequestExpandJobCreditedToCurrentStageRejectReason, nil - case "job,credited_to,reject_reason": - return ApplicationsListRequestExpandJobCreditedToRejectReason, nil - case "job,current_stage": - return ApplicationsListRequestExpandJobCurrentStage, nil - case "job,current_stage,reject_reason": - return ApplicationsListRequestExpandJobCurrentStageRejectReason, nil - case "job,reject_reason": - return ApplicationsListRequestExpandJobRejectReason, nil + return ApplicationsListRequestExpandItemJob, nil case "offers": - return ApplicationsListRequestExpandOffers, nil - case "offers,candidate": - return ApplicationsListRequestExpandOffersCandidate, nil - case "offers,candidate,credited_to": - return ApplicationsListRequestExpandOffersCandidateCreditedTo, nil - case "offers,candidate,credited_to,current_stage": - return ApplicationsListRequestExpandOffersCandidateCreditedToCurrentStage, nil - case "offers,candidate,credited_to,current_stage,reject_reason": - return ApplicationsListRequestExpandOffersCandidateCreditedToCurrentStageRejectReason, nil - case "offers,candidate,credited_to,reject_reason": - return ApplicationsListRequestExpandOffersCandidateCreditedToRejectReason, nil - case "offers,candidate,current_stage": - return ApplicationsListRequestExpandOffersCandidateCurrentStage, nil - case "offers,candidate,current_stage,reject_reason": - return ApplicationsListRequestExpandOffersCandidateCurrentStageRejectReason, nil - case "offers,candidate,job": - return ApplicationsListRequestExpandOffersCandidateJob, nil - case "offers,candidate,job,credited_to": - return ApplicationsListRequestExpandOffersCandidateJobCreditedTo, nil - case "offers,candidate,job,credited_to,current_stage": - return ApplicationsListRequestExpandOffersCandidateJobCreditedToCurrentStage, nil - case "offers,candidate,job,credited_to,current_stage,reject_reason": - return ApplicationsListRequestExpandOffersCandidateJobCreditedToCurrentStageRejectReason, nil - case "offers,candidate,job,credited_to,reject_reason": - return ApplicationsListRequestExpandOffersCandidateJobCreditedToRejectReason, nil - case "offers,candidate,job,current_stage": - return ApplicationsListRequestExpandOffersCandidateJobCurrentStage, nil - case "offers,candidate,job,current_stage,reject_reason": - return ApplicationsListRequestExpandOffersCandidateJobCurrentStageRejectReason, nil - case "offers,candidate,job,reject_reason": - return ApplicationsListRequestExpandOffersCandidateJobRejectReason, nil - case "offers,candidate,reject_reason": - return ApplicationsListRequestExpandOffersCandidateRejectReason, nil - case "offers,credited_to": - return ApplicationsListRequestExpandOffersCreditedTo, nil - case "offers,credited_to,current_stage": - return ApplicationsListRequestExpandOffersCreditedToCurrentStage, nil - case "offers,credited_to,current_stage,reject_reason": - return ApplicationsListRequestExpandOffersCreditedToCurrentStageRejectReason, nil - case "offers,credited_to,reject_reason": - return ApplicationsListRequestExpandOffersCreditedToRejectReason, nil - case "offers,current_stage": - return ApplicationsListRequestExpandOffersCurrentStage, nil - case "offers,current_stage,reject_reason": - return ApplicationsListRequestExpandOffersCurrentStageRejectReason, nil - case "offers,job": - return ApplicationsListRequestExpandOffersJob, nil - case "offers,job,credited_to": - return ApplicationsListRequestExpandOffersJobCreditedTo, nil - case "offers,job,credited_to,current_stage": - return ApplicationsListRequestExpandOffersJobCreditedToCurrentStage, nil - case "offers,job,credited_to,current_stage,reject_reason": - return ApplicationsListRequestExpandOffersJobCreditedToCurrentStageRejectReason, nil - case "offers,job,credited_to,reject_reason": - return ApplicationsListRequestExpandOffersJobCreditedToRejectReason, nil - case "offers,job,current_stage": - return ApplicationsListRequestExpandOffersJobCurrentStage, nil - case "offers,job,current_stage,reject_reason": - return ApplicationsListRequestExpandOffersJobCurrentStageRejectReason, nil - case "offers,job,reject_reason": - return ApplicationsListRequestExpandOffersJobRejectReason, nil - case "offers,reject_reason": - return ApplicationsListRequestExpandOffersRejectReason, nil - case "offers,screening_question_answers": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswers, nil - case "offers,screening_question_answers,candidate": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersCandidate, nil - case "offers,screening_question_answers,candidate,credited_to": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersCandidateCreditedTo, nil - case "offers,screening_question_answers,candidate,credited_to,current_stage": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersCandidateCreditedToCurrentStage, nil - case "offers,screening_question_answers,candidate,credited_to,current_stage,reject_reason": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersCandidateCreditedToCurrentStageRejectReason, nil - case "offers,screening_question_answers,candidate,credited_to,reject_reason": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersCandidateCreditedToRejectReason, nil - case "offers,screening_question_answers,candidate,current_stage": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersCandidateCurrentStage, nil - case "offers,screening_question_answers,candidate,current_stage,reject_reason": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersCandidateCurrentStageRejectReason, nil - case "offers,screening_question_answers,candidate,job": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersCandidateJob, nil - case "offers,screening_question_answers,candidate,job,credited_to": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersCandidateJobCreditedTo, nil - case "offers,screening_question_answers,candidate,job,credited_to,current_stage": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersCandidateJobCreditedToCurrentStage, nil - case "offers,screening_question_answers,candidate,job,credited_to,current_stage,reject_reason": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersCandidateJobCreditedToCurrentStageRejectReason, nil - case "offers,screening_question_answers,candidate,job,credited_to,reject_reason": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersCandidateJobCreditedToRejectReason, nil - case "offers,screening_question_answers,candidate,job,current_stage": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersCandidateJobCurrentStage, nil - case "offers,screening_question_answers,candidate,job,current_stage,reject_reason": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersCandidateJobCurrentStageRejectReason, nil - case "offers,screening_question_answers,candidate,job,reject_reason": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersCandidateJobRejectReason, nil - case "offers,screening_question_answers,candidate,reject_reason": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersCandidateRejectReason, nil - case "offers,screening_question_answers,credited_to": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersCreditedTo, nil - case "offers,screening_question_answers,credited_to,current_stage": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersCreditedToCurrentStage, nil - case "offers,screening_question_answers,credited_to,current_stage,reject_reason": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersCreditedToCurrentStageRejectReason, nil - case "offers,screening_question_answers,credited_to,reject_reason": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersCreditedToRejectReason, nil - case "offers,screening_question_answers,current_stage": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersCurrentStage, nil - case "offers,screening_question_answers,current_stage,reject_reason": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersCurrentStageRejectReason, nil - case "offers,screening_question_answers,job": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersJob, nil - case "offers,screening_question_answers,job,credited_to": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersJobCreditedTo, nil - case "offers,screening_question_answers,job,credited_to,current_stage": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersJobCreditedToCurrentStage, nil - case "offers,screening_question_answers,job,credited_to,current_stage,reject_reason": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersJobCreditedToCurrentStageRejectReason, nil - case "offers,screening_question_answers,job,credited_to,reject_reason": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersJobCreditedToRejectReason, nil - case "offers,screening_question_answers,job,current_stage": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersJobCurrentStage, nil - case "offers,screening_question_answers,job,current_stage,reject_reason": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersJobCurrentStageRejectReason, nil - case "offers,screening_question_answers,job,reject_reason": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersJobRejectReason, nil - case "offers,screening_question_answers,reject_reason": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersRejectReason, nil - case "offers,screening_question_answers,screening_question_answers.question": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestion, nil - case "offers,screening_question_answers,screening_question_answers.question,candidate": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidate, nil - case "offers,screening_question_answers,screening_question_answers.question,candidate,credited_to": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCreditedTo, nil - case "offers,screening_question_answers,screening_question_answers.question,candidate,credited_to,current_stage": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCreditedToCurrentStage, nil - case "offers,screening_question_answers,screening_question_answers.question,candidate,credited_to,current_stage,reject_reason": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCreditedToCurrentStageRejectReason, nil - case "offers,screening_question_answers,screening_question_answers.question,candidate,credited_to,reject_reason": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCreditedToRejectReason, nil - case "offers,screening_question_answers,screening_question_answers.question,candidate,current_stage": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCurrentStage, nil - case "offers,screening_question_answers,screening_question_answers.question,candidate,current_stage,reject_reason": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCurrentStageRejectReason, nil - case "offers,screening_question_answers,screening_question_answers.question,candidate,job": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJob, nil - case "offers,screening_question_answers,screening_question_answers.question,candidate,job,credited_to": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCreditedTo, nil - case "offers,screening_question_answers,screening_question_answers.question,candidate,job,credited_to,current_stage": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCreditedToCurrentStage, nil - case "offers,screening_question_answers,screening_question_answers.question,candidate,job,credited_to,current_stage,reject_reason": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCreditedToCurrentStageRejectReason, nil - case "offers,screening_question_answers,screening_question_answers.question,candidate,job,credited_to,reject_reason": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCreditedToRejectReason, nil - case "offers,screening_question_answers,screening_question_answers.question,candidate,job,current_stage": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCurrentStage, nil - case "offers,screening_question_answers,screening_question_answers.question,candidate,job,current_stage,reject_reason": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCurrentStageRejectReason, nil - case "offers,screening_question_answers,screening_question_answers.question,candidate,job,reject_reason": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobRejectReason, nil - case "offers,screening_question_answers,screening_question_answers.question,candidate,reject_reason": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateRejectReason, nil - case "offers,screening_question_answers,screening_question_answers.question,credited_to": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCreditedTo, nil - case "offers,screening_question_answers,screening_question_answers.question,credited_to,current_stage": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCreditedToCurrentStage, nil - case "offers,screening_question_answers,screening_question_answers.question,credited_to,current_stage,reject_reason": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCreditedToCurrentStageRejectReason, nil - case "offers,screening_question_answers,screening_question_answers.question,credited_to,reject_reason": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCreditedToRejectReason, nil - case "offers,screening_question_answers,screening_question_answers.question,current_stage": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCurrentStage, nil - case "offers,screening_question_answers,screening_question_answers.question,current_stage,reject_reason": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCurrentStageRejectReason, nil - case "offers,screening_question_answers,screening_question_answers.question,job": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionJob, nil - case "offers,screening_question_answers,screening_question_answers.question,job,credited_to": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCreditedTo, nil - case "offers,screening_question_answers,screening_question_answers.question,job,credited_to,current_stage": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCreditedToCurrentStage, nil - case "offers,screening_question_answers,screening_question_answers.question,job,credited_to,current_stage,reject_reason": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCreditedToCurrentStageRejectReason, nil - case "offers,screening_question_answers,screening_question_answers.question,job,credited_to,reject_reason": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCreditedToRejectReason, nil - case "offers,screening_question_answers,screening_question_answers.question,job,current_stage": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCurrentStage, nil - case "offers,screening_question_answers,screening_question_answers.question,job,current_stage,reject_reason": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCurrentStageRejectReason, nil - case "offers,screening_question_answers,screening_question_answers.question,job,reject_reason": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobRejectReason, nil - case "offers,screening_question_answers,screening_question_answers.question,reject_reason": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionRejectReason, nil - case "offers,screening_question_answers.question": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestion, nil - case "offers,screening_question_answers.question,candidate": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionCandidate, nil - case "offers,screening_question_answers.question,candidate,credited_to": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionCandidateCreditedTo, nil - case "offers,screening_question_answers.question,candidate,credited_to,current_stage": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionCandidateCreditedToCurrentStage, nil - case "offers,screening_question_answers.question,candidate,credited_to,current_stage,reject_reason": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionCandidateCreditedToCurrentStageRejectReason, nil - case "offers,screening_question_answers.question,candidate,credited_to,reject_reason": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionCandidateCreditedToRejectReason, nil - case "offers,screening_question_answers.question,candidate,current_stage": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionCandidateCurrentStage, nil - case "offers,screening_question_answers.question,candidate,current_stage,reject_reason": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionCandidateCurrentStageRejectReason, nil - case "offers,screening_question_answers.question,candidate,job": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionCandidateJob, nil - case "offers,screening_question_answers.question,candidate,job,credited_to": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionCandidateJobCreditedTo, nil - case "offers,screening_question_answers.question,candidate,job,credited_to,current_stage": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionCandidateJobCreditedToCurrentStage, nil - case "offers,screening_question_answers.question,candidate,job,credited_to,current_stage,reject_reason": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionCandidateJobCreditedToCurrentStageRejectReason, nil - case "offers,screening_question_answers.question,candidate,job,credited_to,reject_reason": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionCandidateJobCreditedToRejectReason, nil - case "offers,screening_question_answers.question,candidate,job,current_stage": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionCandidateJobCurrentStage, nil - case "offers,screening_question_answers.question,candidate,job,current_stage,reject_reason": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionCandidateJobCurrentStageRejectReason, nil - case "offers,screening_question_answers.question,candidate,job,reject_reason": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionCandidateJobRejectReason, nil - case "offers,screening_question_answers.question,candidate,reject_reason": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionCandidateRejectReason, nil - case "offers,screening_question_answers.question,credited_to": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionCreditedTo, nil - case "offers,screening_question_answers.question,credited_to,current_stage": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionCreditedToCurrentStage, nil - case "offers,screening_question_answers.question,credited_to,current_stage,reject_reason": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionCreditedToCurrentStageRejectReason, nil - case "offers,screening_question_answers.question,credited_to,reject_reason": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionCreditedToRejectReason, nil - case "offers,screening_question_answers.question,current_stage": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionCurrentStage, nil - case "offers,screening_question_answers.question,current_stage,reject_reason": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionCurrentStageRejectReason, nil - case "offers,screening_question_answers.question,job": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionJob, nil - case "offers,screening_question_answers.question,job,credited_to": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionJobCreditedTo, nil - case "offers,screening_question_answers.question,job,credited_to,current_stage": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionJobCreditedToCurrentStage, nil - case "offers,screening_question_answers.question,job,credited_to,current_stage,reject_reason": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionJobCreditedToCurrentStageRejectReason, nil - case "offers,screening_question_answers.question,job,credited_to,reject_reason": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionJobCreditedToRejectReason, nil - case "offers,screening_question_answers.question,job,current_stage": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionJobCurrentStage, nil - case "offers,screening_question_answers.question,job,current_stage,reject_reason": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionJobCurrentStageRejectReason, nil - case "offers,screening_question_answers.question,job,reject_reason": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionJobRejectReason, nil - case "offers,screening_question_answers.question,reject_reason": - return ApplicationsListRequestExpandOffersScreeningQuestionAnswersQuestionRejectReason, nil + return ApplicationsListRequestExpandItemOffers, nil case "reject_reason": - return ApplicationsListRequestExpandRejectReason, nil + return ApplicationsListRequestExpandItemRejectReason, nil case "screening_question_answers": - return ApplicationsListRequestExpandScreeningQuestionAnswers, nil - case "screening_question_answers,candidate": - return ApplicationsListRequestExpandScreeningQuestionAnswersCandidate, nil - case "screening_question_answers,candidate,credited_to": - return ApplicationsListRequestExpandScreeningQuestionAnswersCandidateCreditedTo, nil - case "screening_question_answers,candidate,credited_to,current_stage": - return ApplicationsListRequestExpandScreeningQuestionAnswersCandidateCreditedToCurrentStage, nil - case "screening_question_answers,candidate,credited_to,current_stage,reject_reason": - return ApplicationsListRequestExpandScreeningQuestionAnswersCandidateCreditedToCurrentStageRejectReason, nil - case "screening_question_answers,candidate,credited_to,reject_reason": - return ApplicationsListRequestExpandScreeningQuestionAnswersCandidateCreditedToRejectReason, nil - case "screening_question_answers,candidate,current_stage": - return ApplicationsListRequestExpandScreeningQuestionAnswersCandidateCurrentStage, nil - case "screening_question_answers,candidate,current_stage,reject_reason": - return ApplicationsListRequestExpandScreeningQuestionAnswersCandidateCurrentStageRejectReason, nil - case "screening_question_answers,candidate,job": - return ApplicationsListRequestExpandScreeningQuestionAnswersCandidateJob, nil - case "screening_question_answers,candidate,job,credited_to": - return ApplicationsListRequestExpandScreeningQuestionAnswersCandidateJobCreditedTo, nil - case "screening_question_answers,candidate,job,credited_to,current_stage": - return ApplicationsListRequestExpandScreeningQuestionAnswersCandidateJobCreditedToCurrentStage, nil - case "screening_question_answers,candidate,job,credited_to,current_stage,reject_reason": - return ApplicationsListRequestExpandScreeningQuestionAnswersCandidateJobCreditedToCurrentStageRejectReason, nil - case "screening_question_answers,candidate,job,credited_to,reject_reason": - return ApplicationsListRequestExpandScreeningQuestionAnswersCandidateJobCreditedToRejectReason, nil - case "screening_question_answers,candidate,job,current_stage": - return ApplicationsListRequestExpandScreeningQuestionAnswersCandidateJobCurrentStage, nil - case "screening_question_answers,candidate,job,current_stage,reject_reason": - return ApplicationsListRequestExpandScreeningQuestionAnswersCandidateJobCurrentStageRejectReason, nil - case "screening_question_answers,candidate,job,reject_reason": - return ApplicationsListRequestExpandScreeningQuestionAnswersCandidateJobRejectReason, nil - case "screening_question_answers,candidate,reject_reason": - return ApplicationsListRequestExpandScreeningQuestionAnswersCandidateRejectReason, nil - case "screening_question_answers,credited_to": - return ApplicationsListRequestExpandScreeningQuestionAnswersCreditedTo, nil - case "screening_question_answers,credited_to,current_stage": - return ApplicationsListRequestExpandScreeningQuestionAnswersCreditedToCurrentStage, nil - case "screening_question_answers,credited_to,current_stage,reject_reason": - return ApplicationsListRequestExpandScreeningQuestionAnswersCreditedToCurrentStageRejectReason, nil - case "screening_question_answers,credited_to,reject_reason": - return ApplicationsListRequestExpandScreeningQuestionAnswersCreditedToRejectReason, nil - case "screening_question_answers,current_stage": - return ApplicationsListRequestExpandScreeningQuestionAnswersCurrentStage, nil - case "screening_question_answers,current_stage,reject_reason": - return ApplicationsListRequestExpandScreeningQuestionAnswersCurrentStageRejectReason, nil - case "screening_question_answers,job": - return ApplicationsListRequestExpandScreeningQuestionAnswersJob, nil - case "screening_question_answers,job,credited_to": - return ApplicationsListRequestExpandScreeningQuestionAnswersJobCreditedTo, nil - case "screening_question_answers,job,credited_to,current_stage": - return ApplicationsListRequestExpandScreeningQuestionAnswersJobCreditedToCurrentStage, nil - case "screening_question_answers,job,credited_to,current_stage,reject_reason": - return ApplicationsListRequestExpandScreeningQuestionAnswersJobCreditedToCurrentStageRejectReason, nil - case "screening_question_answers,job,credited_to,reject_reason": - return ApplicationsListRequestExpandScreeningQuestionAnswersJobCreditedToRejectReason, nil - case "screening_question_answers,job,current_stage": - return ApplicationsListRequestExpandScreeningQuestionAnswersJobCurrentStage, nil - case "screening_question_answers,job,current_stage,reject_reason": - return ApplicationsListRequestExpandScreeningQuestionAnswersJobCurrentStageRejectReason, nil - case "screening_question_answers,job,reject_reason": - return ApplicationsListRequestExpandScreeningQuestionAnswersJobRejectReason, nil - case "screening_question_answers,reject_reason": - return ApplicationsListRequestExpandScreeningQuestionAnswersRejectReason, nil - case "screening_question_answers,screening_question_answers.question": - return ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestion, nil - case "screening_question_answers,screening_question_answers.question,candidate": - return ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidate, nil - case "screening_question_answers,screening_question_answers.question,candidate,credited_to": - return ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCreditedTo, nil - case "screening_question_answers,screening_question_answers.question,candidate,credited_to,current_stage": - return ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCreditedToCurrentStage, nil - case "screening_question_answers,screening_question_answers.question,candidate,credited_to,current_stage,reject_reason": - return ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCreditedToCurrentStageRejectReason, nil - case "screening_question_answers,screening_question_answers.question,candidate,credited_to,reject_reason": - return ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCreditedToRejectReason, nil - case "screening_question_answers,screening_question_answers.question,candidate,current_stage": - return ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCurrentStage, nil - case "screening_question_answers,screening_question_answers.question,candidate,current_stage,reject_reason": - return ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCurrentStageRejectReason, nil - case "screening_question_answers,screening_question_answers.question,candidate,job": - return ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJob, nil - case "screening_question_answers,screening_question_answers.question,candidate,job,credited_to": - return ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCreditedTo, nil - case "screening_question_answers,screening_question_answers.question,candidate,job,credited_to,current_stage": - return ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCreditedToCurrentStage, nil - case "screening_question_answers,screening_question_answers.question,candidate,job,credited_to,current_stage,reject_reason": - return ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCreditedToCurrentStageRejectReason, nil - case "screening_question_answers,screening_question_answers.question,candidate,job,credited_to,reject_reason": - return ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCreditedToRejectReason, nil - case "screening_question_answers,screening_question_answers.question,candidate,job,current_stage": - return ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCurrentStage, nil - case "screening_question_answers,screening_question_answers.question,candidate,job,current_stage,reject_reason": - return ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCurrentStageRejectReason, nil - case "screening_question_answers,screening_question_answers.question,candidate,job,reject_reason": - return ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobRejectReason, nil - case "screening_question_answers,screening_question_answers.question,candidate,reject_reason": - return ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateRejectReason, nil - case "screening_question_answers,screening_question_answers.question,credited_to": - return ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCreditedTo, nil - case "screening_question_answers,screening_question_answers.question,credited_to,current_stage": - return ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCreditedToCurrentStage, nil - case "screening_question_answers,screening_question_answers.question,credited_to,current_stage,reject_reason": - return ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCreditedToCurrentStageRejectReason, nil - case "screening_question_answers,screening_question_answers.question,credited_to,reject_reason": - return ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCreditedToRejectReason, nil - case "screening_question_answers,screening_question_answers.question,current_stage": - return ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCurrentStage, nil - case "screening_question_answers,screening_question_answers.question,current_stage,reject_reason": - return ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCurrentStageRejectReason, nil - case "screening_question_answers,screening_question_answers.question,job": - return ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionJob, nil - case "screening_question_answers,screening_question_answers.question,job,credited_to": - return ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCreditedTo, nil - case "screening_question_answers,screening_question_answers.question,job,credited_to,current_stage": - return ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCreditedToCurrentStage, nil - case "screening_question_answers,screening_question_answers.question,job,credited_to,current_stage,reject_reason": - return ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCreditedToCurrentStageRejectReason, nil - case "screening_question_answers,screening_question_answers.question,job,credited_to,reject_reason": - return ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCreditedToRejectReason, nil - case "screening_question_answers,screening_question_answers.question,job,current_stage": - return ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCurrentStage, nil - case "screening_question_answers,screening_question_answers.question,job,current_stage,reject_reason": - return ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCurrentStageRejectReason, nil - case "screening_question_answers,screening_question_answers.question,job,reject_reason": - return ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobRejectReason, nil - case "screening_question_answers,screening_question_answers.question,reject_reason": - return ApplicationsListRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionRejectReason, nil + return ApplicationsListRequestExpandItemScreeningQuestionAnswers, nil case "screening_question_answers.question": - return ApplicationsListRequestExpandScreeningQuestionAnswersQuestion, nil - case "screening_question_answers.question,candidate": - return ApplicationsListRequestExpandScreeningQuestionAnswersQuestionCandidate, nil - case "screening_question_answers.question,candidate,credited_to": - return ApplicationsListRequestExpandScreeningQuestionAnswersQuestionCandidateCreditedTo, nil - case "screening_question_answers.question,candidate,credited_to,current_stage": - return ApplicationsListRequestExpandScreeningQuestionAnswersQuestionCandidateCreditedToCurrentStage, nil - case "screening_question_answers.question,candidate,credited_to,current_stage,reject_reason": - return ApplicationsListRequestExpandScreeningQuestionAnswersQuestionCandidateCreditedToCurrentStageRejectReason, nil - case "screening_question_answers.question,candidate,credited_to,reject_reason": - return ApplicationsListRequestExpandScreeningQuestionAnswersQuestionCandidateCreditedToRejectReason, nil - case "screening_question_answers.question,candidate,current_stage": - return ApplicationsListRequestExpandScreeningQuestionAnswersQuestionCandidateCurrentStage, nil - case "screening_question_answers.question,candidate,current_stage,reject_reason": - return ApplicationsListRequestExpandScreeningQuestionAnswersQuestionCandidateCurrentStageRejectReason, nil - case "screening_question_answers.question,candidate,job": - return ApplicationsListRequestExpandScreeningQuestionAnswersQuestionCandidateJob, nil - case "screening_question_answers.question,candidate,job,credited_to": - return ApplicationsListRequestExpandScreeningQuestionAnswersQuestionCandidateJobCreditedTo, nil - case "screening_question_answers.question,candidate,job,credited_to,current_stage": - return ApplicationsListRequestExpandScreeningQuestionAnswersQuestionCandidateJobCreditedToCurrentStage, nil - case "screening_question_answers.question,candidate,job,credited_to,current_stage,reject_reason": - return ApplicationsListRequestExpandScreeningQuestionAnswersQuestionCandidateJobCreditedToCurrentStageRejectReason, nil - case "screening_question_answers.question,candidate,job,credited_to,reject_reason": - return ApplicationsListRequestExpandScreeningQuestionAnswersQuestionCandidateJobCreditedToRejectReason, nil - case "screening_question_answers.question,candidate,job,current_stage": - return ApplicationsListRequestExpandScreeningQuestionAnswersQuestionCandidateJobCurrentStage, nil - case "screening_question_answers.question,candidate,job,current_stage,reject_reason": - return ApplicationsListRequestExpandScreeningQuestionAnswersQuestionCandidateJobCurrentStageRejectReason, nil - case "screening_question_answers.question,candidate,job,reject_reason": - return ApplicationsListRequestExpandScreeningQuestionAnswersQuestionCandidateJobRejectReason, nil - case "screening_question_answers.question,candidate,reject_reason": - return ApplicationsListRequestExpandScreeningQuestionAnswersQuestionCandidateRejectReason, nil - case "screening_question_answers.question,credited_to": - return ApplicationsListRequestExpandScreeningQuestionAnswersQuestionCreditedTo, nil - case "screening_question_answers.question,credited_to,current_stage": - return ApplicationsListRequestExpandScreeningQuestionAnswersQuestionCreditedToCurrentStage, nil - case "screening_question_answers.question,credited_to,current_stage,reject_reason": - return ApplicationsListRequestExpandScreeningQuestionAnswersQuestionCreditedToCurrentStageRejectReason, nil - case "screening_question_answers.question,credited_to,reject_reason": - return ApplicationsListRequestExpandScreeningQuestionAnswersQuestionCreditedToRejectReason, nil - case "screening_question_answers.question,current_stage": - return ApplicationsListRequestExpandScreeningQuestionAnswersQuestionCurrentStage, nil - case "screening_question_answers.question,current_stage,reject_reason": - return ApplicationsListRequestExpandScreeningQuestionAnswersQuestionCurrentStageRejectReason, nil - case "screening_question_answers.question,job": - return ApplicationsListRequestExpandScreeningQuestionAnswersQuestionJob, nil - case "screening_question_answers.question,job,credited_to": - return ApplicationsListRequestExpandScreeningQuestionAnswersQuestionJobCreditedTo, nil - case "screening_question_answers.question,job,credited_to,current_stage": - return ApplicationsListRequestExpandScreeningQuestionAnswersQuestionJobCreditedToCurrentStage, nil - case "screening_question_answers.question,job,credited_to,current_stage,reject_reason": - return ApplicationsListRequestExpandScreeningQuestionAnswersQuestionJobCreditedToCurrentStageRejectReason, nil - case "screening_question_answers.question,job,credited_to,reject_reason": - return ApplicationsListRequestExpandScreeningQuestionAnswersQuestionJobCreditedToRejectReason, nil - case "screening_question_answers.question,job,current_stage": - return ApplicationsListRequestExpandScreeningQuestionAnswersQuestionJobCurrentStage, nil - case "screening_question_answers.question,job,current_stage,reject_reason": - return ApplicationsListRequestExpandScreeningQuestionAnswersQuestionJobCurrentStageRejectReason, nil - case "screening_question_answers.question,job,reject_reason": - return ApplicationsListRequestExpandScreeningQuestionAnswersQuestionJobRejectReason, nil - case "screening_question_answers.question,reject_reason": - return ApplicationsListRequestExpandScreeningQuestionAnswersQuestionRejectReason, nil - } - var t ApplicationsListRequestExpand + return ApplicationsListRequestExpandItemScreeningQuestionAnswersQuestion, nil + } + var t ApplicationsListRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (a ApplicationsListRequestExpand) Ptr() *ApplicationsListRequestExpand { +func (a ApplicationsListRequestExpandItem) Ptr() *ApplicationsListRequestExpandItem { return &a } -type ApplicationsRetrieveRequestExpand string +type ApplicationsRetrieveRequestExpandItem string const ( - ApplicationsRetrieveRequestExpandCandidate ApplicationsRetrieveRequestExpand = "candidate" - ApplicationsRetrieveRequestExpandCandidateCreditedTo ApplicationsRetrieveRequestExpand = "candidate,credited_to" - ApplicationsRetrieveRequestExpandCandidateCreditedToCurrentStage ApplicationsRetrieveRequestExpand = "candidate,credited_to,current_stage" - ApplicationsRetrieveRequestExpandCandidateCreditedToCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "candidate,credited_to,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandCandidateCreditedToRejectReason ApplicationsRetrieveRequestExpand = "candidate,credited_to,reject_reason" - ApplicationsRetrieveRequestExpandCandidateCurrentStage ApplicationsRetrieveRequestExpand = "candidate,current_stage" - ApplicationsRetrieveRequestExpandCandidateCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "candidate,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandCandidateJob ApplicationsRetrieveRequestExpand = "candidate,job" - ApplicationsRetrieveRequestExpandCandidateJobCreditedTo ApplicationsRetrieveRequestExpand = "candidate,job,credited_to" - ApplicationsRetrieveRequestExpandCandidateJobCreditedToCurrentStage ApplicationsRetrieveRequestExpand = "candidate,job,credited_to,current_stage" - ApplicationsRetrieveRequestExpandCandidateJobCreditedToCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "candidate,job,credited_to,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandCandidateJobCreditedToRejectReason ApplicationsRetrieveRequestExpand = "candidate,job,credited_to,reject_reason" - ApplicationsRetrieveRequestExpandCandidateJobCurrentStage ApplicationsRetrieveRequestExpand = "candidate,job,current_stage" - ApplicationsRetrieveRequestExpandCandidateJobCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "candidate,job,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandCandidateJobRejectReason ApplicationsRetrieveRequestExpand = "candidate,job,reject_reason" - ApplicationsRetrieveRequestExpandCandidateRejectReason ApplicationsRetrieveRequestExpand = "candidate,reject_reason" - ApplicationsRetrieveRequestExpandCreditedTo ApplicationsRetrieveRequestExpand = "credited_to" - ApplicationsRetrieveRequestExpandCreditedToCurrentStage ApplicationsRetrieveRequestExpand = "credited_to,current_stage" - ApplicationsRetrieveRequestExpandCreditedToCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "credited_to,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandCreditedToRejectReason ApplicationsRetrieveRequestExpand = "credited_to,reject_reason" - ApplicationsRetrieveRequestExpandCurrentStage ApplicationsRetrieveRequestExpand = "current_stage" - ApplicationsRetrieveRequestExpandCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "current_stage,reject_reason" - ApplicationsRetrieveRequestExpandJob ApplicationsRetrieveRequestExpand = "job" - ApplicationsRetrieveRequestExpandJobCreditedTo ApplicationsRetrieveRequestExpand = "job,credited_to" - ApplicationsRetrieveRequestExpandJobCreditedToCurrentStage ApplicationsRetrieveRequestExpand = "job,credited_to,current_stage" - ApplicationsRetrieveRequestExpandJobCreditedToCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "job,credited_to,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandJobCreditedToRejectReason ApplicationsRetrieveRequestExpand = "job,credited_to,reject_reason" - ApplicationsRetrieveRequestExpandJobCurrentStage ApplicationsRetrieveRequestExpand = "job,current_stage" - ApplicationsRetrieveRequestExpandJobCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "job,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandJobRejectReason ApplicationsRetrieveRequestExpand = "job,reject_reason" - ApplicationsRetrieveRequestExpandOffers ApplicationsRetrieveRequestExpand = "offers" - ApplicationsRetrieveRequestExpandOffersCandidate ApplicationsRetrieveRequestExpand = "offers,candidate" - ApplicationsRetrieveRequestExpandOffersCandidateCreditedTo ApplicationsRetrieveRequestExpand = "offers,candidate,credited_to" - ApplicationsRetrieveRequestExpandOffersCandidateCreditedToCurrentStage ApplicationsRetrieveRequestExpand = "offers,candidate,credited_to,current_stage" - ApplicationsRetrieveRequestExpandOffersCandidateCreditedToCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "offers,candidate,credited_to,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandOffersCandidateCreditedToRejectReason ApplicationsRetrieveRequestExpand = "offers,candidate,credited_to,reject_reason" - ApplicationsRetrieveRequestExpandOffersCandidateCurrentStage ApplicationsRetrieveRequestExpand = "offers,candidate,current_stage" - ApplicationsRetrieveRequestExpandOffersCandidateCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "offers,candidate,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandOffersCandidateJob ApplicationsRetrieveRequestExpand = "offers,candidate,job" - ApplicationsRetrieveRequestExpandOffersCandidateJobCreditedTo ApplicationsRetrieveRequestExpand = "offers,candidate,job,credited_to" - ApplicationsRetrieveRequestExpandOffersCandidateJobCreditedToCurrentStage ApplicationsRetrieveRequestExpand = "offers,candidate,job,credited_to,current_stage" - ApplicationsRetrieveRequestExpandOffersCandidateJobCreditedToCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "offers,candidate,job,credited_to,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandOffersCandidateJobCreditedToRejectReason ApplicationsRetrieveRequestExpand = "offers,candidate,job,credited_to,reject_reason" - ApplicationsRetrieveRequestExpandOffersCandidateJobCurrentStage ApplicationsRetrieveRequestExpand = "offers,candidate,job,current_stage" - ApplicationsRetrieveRequestExpandOffersCandidateJobCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "offers,candidate,job,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandOffersCandidateJobRejectReason ApplicationsRetrieveRequestExpand = "offers,candidate,job,reject_reason" - ApplicationsRetrieveRequestExpandOffersCandidateRejectReason ApplicationsRetrieveRequestExpand = "offers,candidate,reject_reason" - ApplicationsRetrieveRequestExpandOffersCreditedTo ApplicationsRetrieveRequestExpand = "offers,credited_to" - ApplicationsRetrieveRequestExpandOffersCreditedToCurrentStage ApplicationsRetrieveRequestExpand = "offers,credited_to,current_stage" - ApplicationsRetrieveRequestExpandOffersCreditedToCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "offers,credited_to,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandOffersCreditedToRejectReason ApplicationsRetrieveRequestExpand = "offers,credited_to,reject_reason" - ApplicationsRetrieveRequestExpandOffersCurrentStage ApplicationsRetrieveRequestExpand = "offers,current_stage" - ApplicationsRetrieveRequestExpandOffersCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "offers,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandOffersJob ApplicationsRetrieveRequestExpand = "offers,job" - ApplicationsRetrieveRequestExpandOffersJobCreditedTo ApplicationsRetrieveRequestExpand = "offers,job,credited_to" - ApplicationsRetrieveRequestExpandOffersJobCreditedToCurrentStage ApplicationsRetrieveRequestExpand = "offers,job,credited_to,current_stage" - ApplicationsRetrieveRequestExpandOffersJobCreditedToCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "offers,job,credited_to,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandOffersJobCreditedToRejectReason ApplicationsRetrieveRequestExpand = "offers,job,credited_to,reject_reason" - ApplicationsRetrieveRequestExpandOffersJobCurrentStage ApplicationsRetrieveRequestExpand = "offers,job,current_stage" - ApplicationsRetrieveRequestExpandOffersJobCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "offers,job,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandOffersJobRejectReason ApplicationsRetrieveRequestExpand = "offers,job,reject_reason" - ApplicationsRetrieveRequestExpandOffersRejectReason ApplicationsRetrieveRequestExpand = "offers,reject_reason" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswers ApplicationsRetrieveRequestExpand = "offers,screening_question_answers" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersCandidate ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,candidate" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersCandidateCreditedTo ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,candidate,credited_to" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersCandidateCreditedToCurrentStage ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,candidate,credited_to,current_stage" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersCandidateCreditedToCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,candidate,credited_to,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersCandidateCreditedToRejectReason ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,candidate,credited_to,reject_reason" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersCandidateCurrentStage ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,candidate,current_stage" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersCandidateCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,candidate,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersCandidateJob ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,candidate,job" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersCandidateJobCreditedTo ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,candidate,job,credited_to" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersCandidateJobCreditedToCurrentStage ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,candidate,job,credited_to,current_stage" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersCandidateJobCreditedToCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,candidate,job,credited_to,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersCandidateJobCreditedToRejectReason ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,candidate,job,credited_to,reject_reason" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersCandidateJobCurrentStage ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,candidate,job,current_stage" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersCandidateJobCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,candidate,job,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersCandidateJobRejectReason ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,candidate,job,reject_reason" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersCandidateRejectReason ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,candidate,reject_reason" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersCreditedTo ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,credited_to" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersCreditedToCurrentStage ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,credited_to,current_stage" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersCreditedToCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,credited_to,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersCreditedToRejectReason ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,credited_to,reject_reason" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersCurrentStage ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,current_stage" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersJob ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,job" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersJobCreditedTo ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,job,credited_to" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersJobCreditedToCurrentStage ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,job,credited_to,current_stage" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersJobCreditedToCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,job,credited_to,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersJobCreditedToRejectReason ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,job,credited_to,reject_reason" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersJobCurrentStage ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,job,current_stage" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersJobCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,job,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersJobRejectReason ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,job,reject_reason" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersRejectReason ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,reject_reason" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestion ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,screening_question_answers.question" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidate ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,screening_question_answers.question,candidate" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCreditedTo ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,screening_question_answers.question,candidate,credited_to" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCreditedToCurrentStage ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,screening_question_answers.question,candidate,credited_to,current_stage" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCreditedToCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,screening_question_answers.question,candidate,credited_to,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCreditedToRejectReason ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,screening_question_answers.question,candidate,credited_to,reject_reason" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCurrentStage ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,screening_question_answers.question,candidate,current_stage" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,screening_question_answers.question,candidate,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJob ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,screening_question_answers.question,candidate,job" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCreditedTo ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,screening_question_answers.question,candidate,job,credited_to" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCreditedToCurrentStage ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,screening_question_answers.question,candidate,job,credited_to,current_stage" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCreditedToCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,screening_question_answers.question,candidate,job,credited_to,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCreditedToRejectReason ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,screening_question_answers.question,candidate,job,credited_to,reject_reason" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCurrentStage ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,screening_question_answers.question,candidate,job,current_stage" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,screening_question_answers.question,candidate,job,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobRejectReason ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,screening_question_answers.question,candidate,job,reject_reason" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateRejectReason ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,screening_question_answers.question,candidate,reject_reason" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCreditedTo ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,screening_question_answers.question,credited_to" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCreditedToCurrentStage ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,screening_question_answers.question,credited_to,current_stage" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCreditedToCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,screening_question_answers.question,credited_to,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCreditedToRejectReason ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,screening_question_answers.question,credited_to,reject_reason" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCurrentStage ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,screening_question_answers.question,current_stage" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,screening_question_answers.question,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionJob ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,screening_question_answers.question,job" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCreditedTo ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,screening_question_answers.question,job,credited_to" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCreditedToCurrentStage ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,screening_question_answers.question,job,credited_to,current_stage" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCreditedToCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,screening_question_answers.question,job,credited_to,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCreditedToRejectReason ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,screening_question_answers.question,job,credited_to,reject_reason" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCurrentStage ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,screening_question_answers.question,job,current_stage" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,screening_question_answers.question,job,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobRejectReason ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,screening_question_answers.question,job,reject_reason" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionRejectReason ApplicationsRetrieveRequestExpand = "offers,screening_question_answers,screening_question_answers.question,reject_reason" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestion ApplicationsRetrieveRequestExpand = "offers,screening_question_answers.question" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionCandidate ApplicationsRetrieveRequestExpand = "offers,screening_question_answers.question,candidate" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionCandidateCreditedTo ApplicationsRetrieveRequestExpand = "offers,screening_question_answers.question,candidate,credited_to" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionCandidateCreditedToCurrentStage ApplicationsRetrieveRequestExpand = "offers,screening_question_answers.question,candidate,credited_to,current_stage" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionCandidateCreditedToCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "offers,screening_question_answers.question,candidate,credited_to,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionCandidateCreditedToRejectReason ApplicationsRetrieveRequestExpand = "offers,screening_question_answers.question,candidate,credited_to,reject_reason" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionCandidateCurrentStage ApplicationsRetrieveRequestExpand = "offers,screening_question_answers.question,candidate,current_stage" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionCandidateCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "offers,screening_question_answers.question,candidate,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionCandidateJob ApplicationsRetrieveRequestExpand = "offers,screening_question_answers.question,candidate,job" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionCandidateJobCreditedTo ApplicationsRetrieveRequestExpand = "offers,screening_question_answers.question,candidate,job,credited_to" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionCandidateJobCreditedToCurrentStage ApplicationsRetrieveRequestExpand = "offers,screening_question_answers.question,candidate,job,credited_to,current_stage" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionCandidateJobCreditedToCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "offers,screening_question_answers.question,candidate,job,credited_to,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionCandidateJobCreditedToRejectReason ApplicationsRetrieveRequestExpand = "offers,screening_question_answers.question,candidate,job,credited_to,reject_reason" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionCandidateJobCurrentStage ApplicationsRetrieveRequestExpand = "offers,screening_question_answers.question,candidate,job,current_stage" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionCandidateJobCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "offers,screening_question_answers.question,candidate,job,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionCandidateJobRejectReason ApplicationsRetrieveRequestExpand = "offers,screening_question_answers.question,candidate,job,reject_reason" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionCandidateRejectReason ApplicationsRetrieveRequestExpand = "offers,screening_question_answers.question,candidate,reject_reason" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionCreditedTo ApplicationsRetrieveRequestExpand = "offers,screening_question_answers.question,credited_to" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionCreditedToCurrentStage ApplicationsRetrieveRequestExpand = "offers,screening_question_answers.question,credited_to,current_stage" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionCreditedToCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "offers,screening_question_answers.question,credited_to,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionCreditedToRejectReason ApplicationsRetrieveRequestExpand = "offers,screening_question_answers.question,credited_to,reject_reason" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionCurrentStage ApplicationsRetrieveRequestExpand = "offers,screening_question_answers.question,current_stage" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "offers,screening_question_answers.question,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionJob ApplicationsRetrieveRequestExpand = "offers,screening_question_answers.question,job" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionJobCreditedTo ApplicationsRetrieveRequestExpand = "offers,screening_question_answers.question,job,credited_to" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionJobCreditedToCurrentStage ApplicationsRetrieveRequestExpand = "offers,screening_question_answers.question,job,credited_to,current_stage" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionJobCreditedToCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "offers,screening_question_answers.question,job,credited_to,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionJobCreditedToRejectReason ApplicationsRetrieveRequestExpand = "offers,screening_question_answers.question,job,credited_to,reject_reason" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionJobCurrentStage ApplicationsRetrieveRequestExpand = "offers,screening_question_answers.question,job,current_stage" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionJobCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "offers,screening_question_answers.question,job,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionJobRejectReason ApplicationsRetrieveRequestExpand = "offers,screening_question_answers.question,job,reject_reason" - ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionRejectReason ApplicationsRetrieveRequestExpand = "offers,screening_question_answers.question,reject_reason" - ApplicationsRetrieveRequestExpandRejectReason ApplicationsRetrieveRequestExpand = "reject_reason" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswers ApplicationsRetrieveRequestExpand = "screening_question_answers" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersCandidate ApplicationsRetrieveRequestExpand = "screening_question_answers,candidate" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersCandidateCreditedTo ApplicationsRetrieveRequestExpand = "screening_question_answers,candidate,credited_to" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersCandidateCreditedToCurrentStage ApplicationsRetrieveRequestExpand = "screening_question_answers,candidate,credited_to,current_stage" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersCandidateCreditedToCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "screening_question_answers,candidate,credited_to,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersCandidateCreditedToRejectReason ApplicationsRetrieveRequestExpand = "screening_question_answers,candidate,credited_to,reject_reason" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersCandidateCurrentStage ApplicationsRetrieveRequestExpand = "screening_question_answers,candidate,current_stage" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersCandidateCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "screening_question_answers,candidate,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersCandidateJob ApplicationsRetrieveRequestExpand = "screening_question_answers,candidate,job" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersCandidateJobCreditedTo ApplicationsRetrieveRequestExpand = "screening_question_answers,candidate,job,credited_to" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersCandidateJobCreditedToCurrentStage ApplicationsRetrieveRequestExpand = "screening_question_answers,candidate,job,credited_to,current_stage" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersCandidateJobCreditedToCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "screening_question_answers,candidate,job,credited_to,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersCandidateJobCreditedToRejectReason ApplicationsRetrieveRequestExpand = "screening_question_answers,candidate,job,credited_to,reject_reason" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersCandidateJobCurrentStage ApplicationsRetrieveRequestExpand = "screening_question_answers,candidate,job,current_stage" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersCandidateJobCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "screening_question_answers,candidate,job,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersCandidateJobRejectReason ApplicationsRetrieveRequestExpand = "screening_question_answers,candidate,job,reject_reason" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersCandidateRejectReason ApplicationsRetrieveRequestExpand = "screening_question_answers,candidate,reject_reason" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersCreditedTo ApplicationsRetrieveRequestExpand = "screening_question_answers,credited_to" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersCreditedToCurrentStage ApplicationsRetrieveRequestExpand = "screening_question_answers,credited_to,current_stage" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersCreditedToCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "screening_question_answers,credited_to,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersCreditedToRejectReason ApplicationsRetrieveRequestExpand = "screening_question_answers,credited_to,reject_reason" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersCurrentStage ApplicationsRetrieveRequestExpand = "screening_question_answers,current_stage" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "screening_question_answers,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersJob ApplicationsRetrieveRequestExpand = "screening_question_answers,job" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersJobCreditedTo ApplicationsRetrieveRequestExpand = "screening_question_answers,job,credited_to" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersJobCreditedToCurrentStage ApplicationsRetrieveRequestExpand = "screening_question_answers,job,credited_to,current_stage" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersJobCreditedToCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "screening_question_answers,job,credited_to,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersJobCreditedToRejectReason ApplicationsRetrieveRequestExpand = "screening_question_answers,job,credited_to,reject_reason" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersJobCurrentStage ApplicationsRetrieveRequestExpand = "screening_question_answers,job,current_stage" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersJobCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "screening_question_answers,job,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersJobRejectReason ApplicationsRetrieveRequestExpand = "screening_question_answers,job,reject_reason" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersRejectReason ApplicationsRetrieveRequestExpand = "screening_question_answers,reject_reason" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestion ApplicationsRetrieveRequestExpand = "screening_question_answers,screening_question_answers.question" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidate ApplicationsRetrieveRequestExpand = "screening_question_answers,screening_question_answers.question,candidate" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCreditedTo ApplicationsRetrieveRequestExpand = "screening_question_answers,screening_question_answers.question,candidate,credited_to" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCreditedToCurrentStage ApplicationsRetrieveRequestExpand = "screening_question_answers,screening_question_answers.question,candidate,credited_to,current_stage" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCreditedToCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "screening_question_answers,screening_question_answers.question,candidate,credited_to,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCreditedToRejectReason ApplicationsRetrieveRequestExpand = "screening_question_answers,screening_question_answers.question,candidate,credited_to,reject_reason" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCurrentStage ApplicationsRetrieveRequestExpand = "screening_question_answers,screening_question_answers.question,candidate,current_stage" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "screening_question_answers,screening_question_answers.question,candidate,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJob ApplicationsRetrieveRequestExpand = "screening_question_answers,screening_question_answers.question,candidate,job" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCreditedTo ApplicationsRetrieveRequestExpand = "screening_question_answers,screening_question_answers.question,candidate,job,credited_to" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCreditedToCurrentStage ApplicationsRetrieveRequestExpand = "screening_question_answers,screening_question_answers.question,candidate,job,credited_to,current_stage" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCreditedToCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "screening_question_answers,screening_question_answers.question,candidate,job,credited_to,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCreditedToRejectReason ApplicationsRetrieveRequestExpand = "screening_question_answers,screening_question_answers.question,candidate,job,credited_to,reject_reason" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCurrentStage ApplicationsRetrieveRequestExpand = "screening_question_answers,screening_question_answers.question,candidate,job,current_stage" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "screening_question_answers,screening_question_answers.question,candidate,job,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobRejectReason ApplicationsRetrieveRequestExpand = "screening_question_answers,screening_question_answers.question,candidate,job,reject_reason" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateRejectReason ApplicationsRetrieveRequestExpand = "screening_question_answers,screening_question_answers.question,candidate,reject_reason" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCreditedTo ApplicationsRetrieveRequestExpand = "screening_question_answers,screening_question_answers.question,credited_to" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCreditedToCurrentStage ApplicationsRetrieveRequestExpand = "screening_question_answers,screening_question_answers.question,credited_to,current_stage" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCreditedToCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "screening_question_answers,screening_question_answers.question,credited_to,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCreditedToRejectReason ApplicationsRetrieveRequestExpand = "screening_question_answers,screening_question_answers.question,credited_to,reject_reason" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCurrentStage ApplicationsRetrieveRequestExpand = "screening_question_answers,screening_question_answers.question,current_stage" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "screening_question_answers,screening_question_answers.question,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionJob ApplicationsRetrieveRequestExpand = "screening_question_answers,screening_question_answers.question,job" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCreditedTo ApplicationsRetrieveRequestExpand = "screening_question_answers,screening_question_answers.question,job,credited_to" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCreditedToCurrentStage ApplicationsRetrieveRequestExpand = "screening_question_answers,screening_question_answers.question,job,credited_to,current_stage" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCreditedToCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "screening_question_answers,screening_question_answers.question,job,credited_to,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCreditedToRejectReason ApplicationsRetrieveRequestExpand = "screening_question_answers,screening_question_answers.question,job,credited_to,reject_reason" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCurrentStage ApplicationsRetrieveRequestExpand = "screening_question_answers,screening_question_answers.question,job,current_stage" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "screening_question_answers,screening_question_answers.question,job,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobRejectReason ApplicationsRetrieveRequestExpand = "screening_question_answers,screening_question_answers.question,job,reject_reason" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionRejectReason ApplicationsRetrieveRequestExpand = "screening_question_answers,screening_question_answers.question,reject_reason" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestion ApplicationsRetrieveRequestExpand = "screening_question_answers.question" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionCandidate ApplicationsRetrieveRequestExpand = "screening_question_answers.question,candidate" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionCandidateCreditedTo ApplicationsRetrieveRequestExpand = "screening_question_answers.question,candidate,credited_to" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionCandidateCreditedToCurrentStage ApplicationsRetrieveRequestExpand = "screening_question_answers.question,candidate,credited_to,current_stage" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionCandidateCreditedToCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "screening_question_answers.question,candidate,credited_to,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionCandidateCreditedToRejectReason ApplicationsRetrieveRequestExpand = "screening_question_answers.question,candidate,credited_to,reject_reason" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionCandidateCurrentStage ApplicationsRetrieveRequestExpand = "screening_question_answers.question,candidate,current_stage" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionCandidateCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "screening_question_answers.question,candidate,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionCandidateJob ApplicationsRetrieveRequestExpand = "screening_question_answers.question,candidate,job" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionCandidateJobCreditedTo ApplicationsRetrieveRequestExpand = "screening_question_answers.question,candidate,job,credited_to" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionCandidateJobCreditedToCurrentStage ApplicationsRetrieveRequestExpand = "screening_question_answers.question,candidate,job,credited_to,current_stage" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionCandidateJobCreditedToCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "screening_question_answers.question,candidate,job,credited_to,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionCandidateJobCreditedToRejectReason ApplicationsRetrieveRequestExpand = "screening_question_answers.question,candidate,job,credited_to,reject_reason" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionCandidateJobCurrentStage ApplicationsRetrieveRequestExpand = "screening_question_answers.question,candidate,job,current_stage" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionCandidateJobCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "screening_question_answers.question,candidate,job,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionCandidateJobRejectReason ApplicationsRetrieveRequestExpand = "screening_question_answers.question,candidate,job,reject_reason" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionCandidateRejectReason ApplicationsRetrieveRequestExpand = "screening_question_answers.question,candidate,reject_reason" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionCreditedTo ApplicationsRetrieveRequestExpand = "screening_question_answers.question,credited_to" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionCreditedToCurrentStage ApplicationsRetrieveRequestExpand = "screening_question_answers.question,credited_to,current_stage" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionCreditedToCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "screening_question_answers.question,credited_to,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionCreditedToRejectReason ApplicationsRetrieveRequestExpand = "screening_question_answers.question,credited_to,reject_reason" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionCurrentStage ApplicationsRetrieveRequestExpand = "screening_question_answers.question,current_stage" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "screening_question_answers.question,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionJob ApplicationsRetrieveRequestExpand = "screening_question_answers.question,job" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionJobCreditedTo ApplicationsRetrieveRequestExpand = "screening_question_answers.question,job,credited_to" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionJobCreditedToCurrentStage ApplicationsRetrieveRequestExpand = "screening_question_answers.question,job,credited_to,current_stage" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionJobCreditedToCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "screening_question_answers.question,job,credited_to,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionJobCreditedToRejectReason ApplicationsRetrieveRequestExpand = "screening_question_answers.question,job,credited_to,reject_reason" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionJobCurrentStage ApplicationsRetrieveRequestExpand = "screening_question_answers.question,job,current_stage" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionJobCurrentStageRejectReason ApplicationsRetrieveRequestExpand = "screening_question_answers.question,job,current_stage,reject_reason" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionJobRejectReason ApplicationsRetrieveRequestExpand = "screening_question_answers.question,job,reject_reason" - ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionRejectReason ApplicationsRetrieveRequestExpand = "screening_question_answers.question,reject_reason" + ApplicationsRetrieveRequestExpandItemCandidate ApplicationsRetrieveRequestExpandItem = "candidate" + ApplicationsRetrieveRequestExpandItemCreditedTo ApplicationsRetrieveRequestExpandItem = "credited_to" + ApplicationsRetrieveRequestExpandItemCurrentStage ApplicationsRetrieveRequestExpandItem = "current_stage" + ApplicationsRetrieveRequestExpandItemJob ApplicationsRetrieveRequestExpandItem = "job" + ApplicationsRetrieveRequestExpandItemOffers ApplicationsRetrieveRequestExpandItem = "offers" + ApplicationsRetrieveRequestExpandItemRejectReason ApplicationsRetrieveRequestExpandItem = "reject_reason" + ApplicationsRetrieveRequestExpandItemScreeningQuestionAnswers ApplicationsRetrieveRequestExpandItem = "screening_question_answers" + ApplicationsRetrieveRequestExpandItemScreeningQuestionAnswersQuestion ApplicationsRetrieveRequestExpandItem = "screening_question_answers.question" ) -func NewApplicationsRetrieveRequestExpandFromString(s string) (ApplicationsRetrieveRequestExpand, error) { +func NewApplicationsRetrieveRequestExpandItemFromString(s string) (ApplicationsRetrieveRequestExpandItem, error) { switch s { case "candidate": - return ApplicationsRetrieveRequestExpandCandidate, nil - case "candidate,credited_to": - return ApplicationsRetrieveRequestExpandCandidateCreditedTo, nil - case "candidate,credited_to,current_stage": - return ApplicationsRetrieveRequestExpandCandidateCreditedToCurrentStage, nil - case "candidate,credited_to,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandCandidateCreditedToCurrentStageRejectReason, nil - case "candidate,credited_to,reject_reason": - return ApplicationsRetrieveRequestExpandCandidateCreditedToRejectReason, nil - case "candidate,current_stage": - return ApplicationsRetrieveRequestExpandCandidateCurrentStage, nil - case "candidate,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandCandidateCurrentStageRejectReason, nil - case "candidate,job": - return ApplicationsRetrieveRequestExpandCandidateJob, nil - case "candidate,job,credited_to": - return ApplicationsRetrieveRequestExpandCandidateJobCreditedTo, nil - case "candidate,job,credited_to,current_stage": - return ApplicationsRetrieveRequestExpandCandidateJobCreditedToCurrentStage, nil - case "candidate,job,credited_to,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandCandidateJobCreditedToCurrentStageRejectReason, nil - case "candidate,job,credited_to,reject_reason": - return ApplicationsRetrieveRequestExpandCandidateJobCreditedToRejectReason, nil - case "candidate,job,current_stage": - return ApplicationsRetrieveRequestExpandCandidateJobCurrentStage, nil - case "candidate,job,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandCandidateJobCurrentStageRejectReason, nil - case "candidate,job,reject_reason": - return ApplicationsRetrieveRequestExpandCandidateJobRejectReason, nil - case "candidate,reject_reason": - return ApplicationsRetrieveRequestExpandCandidateRejectReason, nil + return ApplicationsRetrieveRequestExpandItemCandidate, nil case "credited_to": - return ApplicationsRetrieveRequestExpandCreditedTo, nil - case "credited_to,current_stage": - return ApplicationsRetrieveRequestExpandCreditedToCurrentStage, nil - case "credited_to,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandCreditedToCurrentStageRejectReason, nil - case "credited_to,reject_reason": - return ApplicationsRetrieveRequestExpandCreditedToRejectReason, nil + return ApplicationsRetrieveRequestExpandItemCreditedTo, nil case "current_stage": - return ApplicationsRetrieveRequestExpandCurrentStage, nil - case "current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandCurrentStageRejectReason, nil + return ApplicationsRetrieveRequestExpandItemCurrentStage, nil case "job": - return ApplicationsRetrieveRequestExpandJob, nil - case "job,credited_to": - return ApplicationsRetrieveRequestExpandJobCreditedTo, nil - case "job,credited_to,current_stage": - return ApplicationsRetrieveRequestExpandJobCreditedToCurrentStage, nil - case "job,credited_to,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandJobCreditedToCurrentStageRejectReason, nil - case "job,credited_to,reject_reason": - return ApplicationsRetrieveRequestExpandJobCreditedToRejectReason, nil - case "job,current_stage": - return ApplicationsRetrieveRequestExpandJobCurrentStage, nil - case "job,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandJobCurrentStageRejectReason, nil - case "job,reject_reason": - return ApplicationsRetrieveRequestExpandJobRejectReason, nil + return ApplicationsRetrieveRequestExpandItemJob, nil case "offers": - return ApplicationsRetrieveRequestExpandOffers, nil - case "offers,candidate": - return ApplicationsRetrieveRequestExpandOffersCandidate, nil - case "offers,candidate,credited_to": - return ApplicationsRetrieveRequestExpandOffersCandidateCreditedTo, nil - case "offers,candidate,credited_to,current_stage": - return ApplicationsRetrieveRequestExpandOffersCandidateCreditedToCurrentStage, nil - case "offers,candidate,credited_to,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandOffersCandidateCreditedToCurrentStageRejectReason, nil - case "offers,candidate,credited_to,reject_reason": - return ApplicationsRetrieveRequestExpandOffersCandidateCreditedToRejectReason, nil - case "offers,candidate,current_stage": - return ApplicationsRetrieveRequestExpandOffersCandidateCurrentStage, nil - case "offers,candidate,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandOffersCandidateCurrentStageRejectReason, nil - case "offers,candidate,job": - return ApplicationsRetrieveRequestExpandOffersCandidateJob, nil - case "offers,candidate,job,credited_to": - return ApplicationsRetrieveRequestExpandOffersCandidateJobCreditedTo, nil - case "offers,candidate,job,credited_to,current_stage": - return ApplicationsRetrieveRequestExpandOffersCandidateJobCreditedToCurrentStage, nil - case "offers,candidate,job,credited_to,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandOffersCandidateJobCreditedToCurrentStageRejectReason, nil - case "offers,candidate,job,credited_to,reject_reason": - return ApplicationsRetrieveRequestExpandOffersCandidateJobCreditedToRejectReason, nil - case "offers,candidate,job,current_stage": - return ApplicationsRetrieveRequestExpandOffersCandidateJobCurrentStage, nil - case "offers,candidate,job,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandOffersCandidateJobCurrentStageRejectReason, nil - case "offers,candidate,job,reject_reason": - return ApplicationsRetrieveRequestExpandOffersCandidateJobRejectReason, nil - case "offers,candidate,reject_reason": - return ApplicationsRetrieveRequestExpandOffersCandidateRejectReason, nil - case "offers,credited_to": - return ApplicationsRetrieveRequestExpandOffersCreditedTo, nil - case "offers,credited_to,current_stage": - return ApplicationsRetrieveRequestExpandOffersCreditedToCurrentStage, nil - case "offers,credited_to,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandOffersCreditedToCurrentStageRejectReason, nil - case "offers,credited_to,reject_reason": - return ApplicationsRetrieveRequestExpandOffersCreditedToRejectReason, nil - case "offers,current_stage": - return ApplicationsRetrieveRequestExpandOffersCurrentStage, nil - case "offers,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandOffersCurrentStageRejectReason, nil - case "offers,job": - return ApplicationsRetrieveRequestExpandOffersJob, nil - case "offers,job,credited_to": - return ApplicationsRetrieveRequestExpandOffersJobCreditedTo, nil - case "offers,job,credited_to,current_stage": - return ApplicationsRetrieveRequestExpandOffersJobCreditedToCurrentStage, nil - case "offers,job,credited_to,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandOffersJobCreditedToCurrentStageRejectReason, nil - case "offers,job,credited_to,reject_reason": - return ApplicationsRetrieveRequestExpandOffersJobCreditedToRejectReason, nil - case "offers,job,current_stage": - return ApplicationsRetrieveRequestExpandOffersJobCurrentStage, nil - case "offers,job,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandOffersJobCurrentStageRejectReason, nil - case "offers,job,reject_reason": - return ApplicationsRetrieveRequestExpandOffersJobRejectReason, nil - case "offers,reject_reason": - return ApplicationsRetrieveRequestExpandOffersRejectReason, nil - case "offers,screening_question_answers": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswers, nil - case "offers,screening_question_answers,candidate": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersCandidate, nil - case "offers,screening_question_answers,candidate,credited_to": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersCandidateCreditedTo, nil - case "offers,screening_question_answers,candidate,credited_to,current_stage": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersCandidateCreditedToCurrentStage, nil - case "offers,screening_question_answers,candidate,credited_to,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersCandidateCreditedToCurrentStageRejectReason, nil - case "offers,screening_question_answers,candidate,credited_to,reject_reason": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersCandidateCreditedToRejectReason, nil - case "offers,screening_question_answers,candidate,current_stage": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersCandidateCurrentStage, nil - case "offers,screening_question_answers,candidate,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersCandidateCurrentStageRejectReason, nil - case "offers,screening_question_answers,candidate,job": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersCandidateJob, nil - case "offers,screening_question_answers,candidate,job,credited_to": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersCandidateJobCreditedTo, nil - case "offers,screening_question_answers,candidate,job,credited_to,current_stage": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersCandidateJobCreditedToCurrentStage, nil - case "offers,screening_question_answers,candidate,job,credited_to,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersCandidateJobCreditedToCurrentStageRejectReason, nil - case "offers,screening_question_answers,candidate,job,credited_to,reject_reason": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersCandidateJobCreditedToRejectReason, nil - case "offers,screening_question_answers,candidate,job,current_stage": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersCandidateJobCurrentStage, nil - case "offers,screening_question_answers,candidate,job,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersCandidateJobCurrentStageRejectReason, nil - case "offers,screening_question_answers,candidate,job,reject_reason": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersCandidateJobRejectReason, nil - case "offers,screening_question_answers,candidate,reject_reason": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersCandidateRejectReason, nil - case "offers,screening_question_answers,credited_to": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersCreditedTo, nil - case "offers,screening_question_answers,credited_to,current_stage": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersCreditedToCurrentStage, nil - case "offers,screening_question_answers,credited_to,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersCreditedToCurrentStageRejectReason, nil - case "offers,screening_question_answers,credited_to,reject_reason": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersCreditedToRejectReason, nil - case "offers,screening_question_answers,current_stage": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersCurrentStage, nil - case "offers,screening_question_answers,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersCurrentStageRejectReason, nil - case "offers,screening_question_answers,job": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersJob, nil - case "offers,screening_question_answers,job,credited_to": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersJobCreditedTo, nil - case "offers,screening_question_answers,job,credited_to,current_stage": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersJobCreditedToCurrentStage, nil - case "offers,screening_question_answers,job,credited_to,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersJobCreditedToCurrentStageRejectReason, nil - case "offers,screening_question_answers,job,credited_to,reject_reason": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersJobCreditedToRejectReason, nil - case "offers,screening_question_answers,job,current_stage": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersJobCurrentStage, nil - case "offers,screening_question_answers,job,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersJobCurrentStageRejectReason, nil - case "offers,screening_question_answers,job,reject_reason": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersJobRejectReason, nil - case "offers,screening_question_answers,reject_reason": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersRejectReason, nil - case "offers,screening_question_answers,screening_question_answers.question": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestion, nil - case "offers,screening_question_answers,screening_question_answers.question,candidate": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidate, nil - case "offers,screening_question_answers,screening_question_answers.question,candidate,credited_to": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCreditedTo, nil - case "offers,screening_question_answers,screening_question_answers.question,candidate,credited_to,current_stage": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCreditedToCurrentStage, nil - case "offers,screening_question_answers,screening_question_answers.question,candidate,credited_to,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCreditedToCurrentStageRejectReason, nil - case "offers,screening_question_answers,screening_question_answers.question,candidate,credited_to,reject_reason": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCreditedToRejectReason, nil - case "offers,screening_question_answers,screening_question_answers.question,candidate,current_stage": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCurrentStage, nil - case "offers,screening_question_answers,screening_question_answers.question,candidate,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCurrentStageRejectReason, nil - case "offers,screening_question_answers,screening_question_answers.question,candidate,job": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJob, nil - case "offers,screening_question_answers,screening_question_answers.question,candidate,job,credited_to": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCreditedTo, nil - case "offers,screening_question_answers,screening_question_answers.question,candidate,job,credited_to,current_stage": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCreditedToCurrentStage, nil - case "offers,screening_question_answers,screening_question_answers.question,candidate,job,credited_to,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCreditedToCurrentStageRejectReason, nil - case "offers,screening_question_answers,screening_question_answers.question,candidate,job,credited_to,reject_reason": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCreditedToRejectReason, nil - case "offers,screening_question_answers,screening_question_answers.question,candidate,job,current_stage": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCurrentStage, nil - case "offers,screening_question_answers,screening_question_answers.question,candidate,job,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCurrentStageRejectReason, nil - case "offers,screening_question_answers,screening_question_answers.question,candidate,job,reject_reason": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobRejectReason, nil - case "offers,screening_question_answers,screening_question_answers.question,candidate,reject_reason": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateRejectReason, nil - case "offers,screening_question_answers,screening_question_answers.question,credited_to": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCreditedTo, nil - case "offers,screening_question_answers,screening_question_answers.question,credited_to,current_stage": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCreditedToCurrentStage, nil - case "offers,screening_question_answers,screening_question_answers.question,credited_to,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCreditedToCurrentStageRejectReason, nil - case "offers,screening_question_answers,screening_question_answers.question,credited_to,reject_reason": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCreditedToRejectReason, nil - case "offers,screening_question_answers,screening_question_answers.question,current_stage": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCurrentStage, nil - case "offers,screening_question_answers,screening_question_answers.question,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionCurrentStageRejectReason, nil - case "offers,screening_question_answers,screening_question_answers.question,job": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionJob, nil - case "offers,screening_question_answers,screening_question_answers.question,job,credited_to": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCreditedTo, nil - case "offers,screening_question_answers,screening_question_answers.question,job,credited_to,current_stage": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCreditedToCurrentStage, nil - case "offers,screening_question_answers,screening_question_answers.question,job,credited_to,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCreditedToCurrentStageRejectReason, nil - case "offers,screening_question_answers,screening_question_answers.question,job,credited_to,reject_reason": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCreditedToRejectReason, nil - case "offers,screening_question_answers,screening_question_answers.question,job,current_stage": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCurrentStage, nil - case "offers,screening_question_answers,screening_question_answers.question,job,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCurrentStageRejectReason, nil - case "offers,screening_question_answers,screening_question_answers.question,job,reject_reason": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobRejectReason, nil - case "offers,screening_question_answers,screening_question_answers.question,reject_reason": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersScreeningQuestionAnswersQuestionRejectReason, nil - case "offers,screening_question_answers.question": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestion, nil - case "offers,screening_question_answers.question,candidate": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionCandidate, nil - case "offers,screening_question_answers.question,candidate,credited_to": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionCandidateCreditedTo, nil - case "offers,screening_question_answers.question,candidate,credited_to,current_stage": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionCandidateCreditedToCurrentStage, nil - case "offers,screening_question_answers.question,candidate,credited_to,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionCandidateCreditedToCurrentStageRejectReason, nil - case "offers,screening_question_answers.question,candidate,credited_to,reject_reason": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionCandidateCreditedToRejectReason, nil - case "offers,screening_question_answers.question,candidate,current_stage": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionCandidateCurrentStage, nil - case "offers,screening_question_answers.question,candidate,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionCandidateCurrentStageRejectReason, nil - case "offers,screening_question_answers.question,candidate,job": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionCandidateJob, nil - case "offers,screening_question_answers.question,candidate,job,credited_to": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionCandidateJobCreditedTo, nil - case "offers,screening_question_answers.question,candidate,job,credited_to,current_stage": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionCandidateJobCreditedToCurrentStage, nil - case "offers,screening_question_answers.question,candidate,job,credited_to,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionCandidateJobCreditedToCurrentStageRejectReason, nil - case "offers,screening_question_answers.question,candidate,job,credited_to,reject_reason": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionCandidateJobCreditedToRejectReason, nil - case "offers,screening_question_answers.question,candidate,job,current_stage": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionCandidateJobCurrentStage, nil - case "offers,screening_question_answers.question,candidate,job,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionCandidateJobCurrentStageRejectReason, nil - case "offers,screening_question_answers.question,candidate,job,reject_reason": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionCandidateJobRejectReason, nil - case "offers,screening_question_answers.question,candidate,reject_reason": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionCandidateRejectReason, nil - case "offers,screening_question_answers.question,credited_to": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionCreditedTo, nil - case "offers,screening_question_answers.question,credited_to,current_stage": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionCreditedToCurrentStage, nil - case "offers,screening_question_answers.question,credited_to,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionCreditedToCurrentStageRejectReason, nil - case "offers,screening_question_answers.question,credited_to,reject_reason": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionCreditedToRejectReason, nil - case "offers,screening_question_answers.question,current_stage": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionCurrentStage, nil - case "offers,screening_question_answers.question,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionCurrentStageRejectReason, nil - case "offers,screening_question_answers.question,job": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionJob, nil - case "offers,screening_question_answers.question,job,credited_to": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionJobCreditedTo, nil - case "offers,screening_question_answers.question,job,credited_to,current_stage": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionJobCreditedToCurrentStage, nil - case "offers,screening_question_answers.question,job,credited_to,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionJobCreditedToCurrentStageRejectReason, nil - case "offers,screening_question_answers.question,job,credited_to,reject_reason": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionJobCreditedToRejectReason, nil - case "offers,screening_question_answers.question,job,current_stage": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionJobCurrentStage, nil - case "offers,screening_question_answers.question,job,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionJobCurrentStageRejectReason, nil - case "offers,screening_question_answers.question,job,reject_reason": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionJobRejectReason, nil - case "offers,screening_question_answers.question,reject_reason": - return ApplicationsRetrieveRequestExpandOffersScreeningQuestionAnswersQuestionRejectReason, nil + return ApplicationsRetrieveRequestExpandItemOffers, nil case "reject_reason": - return ApplicationsRetrieveRequestExpandRejectReason, nil + return ApplicationsRetrieveRequestExpandItemRejectReason, nil case "screening_question_answers": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswers, nil - case "screening_question_answers,candidate": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersCandidate, nil - case "screening_question_answers,candidate,credited_to": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersCandidateCreditedTo, nil - case "screening_question_answers,candidate,credited_to,current_stage": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersCandidateCreditedToCurrentStage, nil - case "screening_question_answers,candidate,credited_to,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersCandidateCreditedToCurrentStageRejectReason, nil - case "screening_question_answers,candidate,credited_to,reject_reason": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersCandidateCreditedToRejectReason, nil - case "screening_question_answers,candidate,current_stage": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersCandidateCurrentStage, nil - case "screening_question_answers,candidate,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersCandidateCurrentStageRejectReason, nil - case "screening_question_answers,candidate,job": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersCandidateJob, nil - case "screening_question_answers,candidate,job,credited_to": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersCandidateJobCreditedTo, nil - case "screening_question_answers,candidate,job,credited_to,current_stage": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersCandidateJobCreditedToCurrentStage, nil - case "screening_question_answers,candidate,job,credited_to,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersCandidateJobCreditedToCurrentStageRejectReason, nil - case "screening_question_answers,candidate,job,credited_to,reject_reason": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersCandidateJobCreditedToRejectReason, nil - case "screening_question_answers,candidate,job,current_stage": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersCandidateJobCurrentStage, nil - case "screening_question_answers,candidate,job,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersCandidateJobCurrentStageRejectReason, nil - case "screening_question_answers,candidate,job,reject_reason": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersCandidateJobRejectReason, nil - case "screening_question_answers,candidate,reject_reason": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersCandidateRejectReason, nil - case "screening_question_answers,credited_to": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersCreditedTo, nil - case "screening_question_answers,credited_to,current_stage": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersCreditedToCurrentStage, nil - case "screening_question_answers,credited_to,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersCreditedToCurrentStageRejectReason, nil - case "screening_question_answers,credited_to,reject_reason": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersCreditedToRejectReason, nil - case "screening_question_answers,current_stage": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersCurrentStage, nil - case "screening_question_answers,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersCurrentStageRejectReason, nil - case "screening_question_answers,job": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersJob, nil - case "screening_question_answers,job,credited_to": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersJobCreditedTo, nil - case "screening_question_answers,job,credited_to,current_stage": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersJobCreditedToCurrentStage, nil - case "screening_question_answers,job,credited_to,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersJobCreditedToCurrentStageRejectReason, nil - case "screening_question_answers,job,credited_to,reject_reason": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersJobCreditedToRejectReason, nil - case "screening_question_answers,job,current_stage": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersJobCurrentStage, nil - case "screening_question_answers,job,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersJobCurrentStageRejectReason, nil - case "screening_question_answers,job,reject_reason": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersJobRejectReason, nil - case "screening_question_answers,reject_reason": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersRejectReason, nil - case "screening_question_answers,screening_question_answers.question": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestion, nil - case "screening_question_answers,screening_question_answers.question,candidate": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidate, nil - case "screening_question_answers,screening_question_answers.question,candidate,credited_to": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCreditedTo, nil - case "screening_question_answers,screening_question_answers.question,candidate,credited_to,current_stage": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCreditedToCurrentStage, nil - case "screening_question_answers,screening_question_answers.question,candidate,credited_to,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCreditedToCurrentStageRejectReason, nil - case "screening_question_answers,screening_question_answers.question,candidate,credited_to,reject_reason": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCreditedToRejectReason, nil - case "screening_question_answers,screening_question_answers.question,candidate,current_stage": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCurrentStage, nil - case "screening_question_answers,screening_question_answers.question,candidate,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateCurrentStageRejectReason, nil - case "screening_question_answers,screening_question_answers.question,candidate,job": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJob, nil - case "screening_question_answers,screening_question_answers.question,candidate,job,credited_to": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCreditedTo, nil - case "screening_question_answers,screening_question_answers.question,candidate,job,credited_to,current_stage": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCreditedToCurrentStage, nil - case "screening_question_answers,screening_question_answers.question,candidate,job,credited_to,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCreditedToCurrentStageRejectReason, nil - case "screening_question_answers,screening_question_answers.question,candidate,job,credited_to,reject_reason": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCreditedToRejectReason, nil - case "screening_question_answers,screening_question_answers.question,candidate,job,current_stage": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCurrentStage, nil - case "screening_question_answers,screening_question_answers.question,candidate,job,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobCurrentStageRejectReason, nil - case "screening_question_answers,screening_question_answers.question,candidate,job,reject_reason": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateJobRejectReason, nil - case "screening_question_answers,screening_question_answers.question,candidate,reject_reason": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCandidateRejectReason, nil - case "screening_question_answers,screening_question_answers.question,credited_to": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCreditedTo, nil - case "screening_question_answers,screening_question_answers.question,credited_to,current_stage": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCreditedToCurrentStage, nil - case "screening_question_answers,screening_question_answers.question,credited_to,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCreditedToCurrentStageRejectReason, nil - case "screening_question_answers,screening_question_answers.question,credited_to,reject_reason": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCreditedToRejectReason, nil - case "screening_question_answers,screening_question_answers.question,current_stage": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCurrentStage, nil - case "screening_question_answers,screening_question_answers.question,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionCurrentStageRejectReason, nil - case "screening_question_answers,screening_question_answers.question,job": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionJob, nil - case "screening_question_answers,screening_question_answers.question,job,credited_to": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCreditedTo, nil - case "screening_question_answers,screening_question_answers.question,job,credited_to,current_stage": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCreditedToCurrentStage, nil - case "screening_question_answers,screening_question_answers.question,job,credited_to,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCreditedToCurrentStageRejectReason, nil - case "screening_question_answers,screening_question_answers.question,job,credited_to,reject_reason": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCreditedToRejectReason, nil - case "screening_question_answers,screening_question_answers.question,job,current_stage": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCurrentStage, nil - case "screening_question_answers,screening_question_answers.question,job,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobCurrentStageRejectReason, nil - case "screening_question_answers,screening_question_answers.question,job,reject_reason": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionJobRejectReason, nil - case "screening_question_answers,screening_question_answers.question,reject_reason": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersScreeningQuestionAnswersQuestionRejectReason, nil + return ApplicationsRetrieveRequestExpandItemScreeningQuestionAnswers, nil case "screening_question_answers.question": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestion, nil - case "screening_question_answers.question,candidate": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionCandidate, nil - case "screening_question_answers.question,candidate,credited_to": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionCandidateCreditedTo, nil - case "screening_question_answers.question,candidate,credited_to,current_stage": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionCandidateCreditedToCurrentStage, nil - case "screening_question_answers.question,candidate,credited_to,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionCandidateCreditedToCurrentStageRejectReason, nil - case "screening_question_answers.question,candidate,credited_to,reject_reason": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionCandidateCreditedToRejectReason, nil - case "screening_question_answers.question,candidate,current_stage": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionCandidateCurrentStage, nil - case "screening_question_answers.question,candidate,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionCandidateCurrentStageRejectReason, nil - case "screening_question_answers.question,candidate,job": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionCandidateJob, nil - case "screening_question_answers.question,candidate,job,credited_to": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionCandidateJobCreditedTo, nil - case "screening_question_answers.question,candidate,job,credited_to,current_stage": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionCandidateJobCreditedToCurrentStage, nil - case "screening_question_answers.question,candidate,job,credited_to,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionCandidateJobCreditedToCurrentStageRejectReason, nil - case "screening_question_answers.question,candidate,job,credited_to,reject_reason": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionCandidateJobCreditedToRejectReason, nil - case "screening_question_answers.question,candidate,job,current_stage": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionCandidateJobCurrentStage, nil - case "screening_question_answers.question,candidate,job,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionCandidateJobCurrentStageRejectReason, nil - case "screening_question_answers.question,candidate,job,reject_reason": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionCandidateJobRejectReason, nil - case "screening_question_answers.question,candidate,reject_reason": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionCandidateRejectReason, nil - case "screening_question_answers.question,credited_to": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionCreditedTo, nil - case "screening_question_answers.question,credited_to,current_stage": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionCreditedToCurrentStage, nil - case "screening_question_answers.question,credited_to,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionCreditedToCurrentStageRejectReason, nil - case "screening_question_answers.question,credited_to,reject_reason": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionCreditedToRejectReason, nil - case "screening_question_answers.question,current_stage": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionCurrentStage, nil - case "screening_question_answers.question,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionCurrentStageRejectReason, nil - case "screening_question_answers.question,job": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionJob, nil - case "screening_question_answers.question,job,credited_to": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionJobCreditedTo, nil - case "screening_question_answers.question,job,credited_to,current_stage": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionJobCreditedToCurrentStage, nil - case "screening_question_answers.question,job,credited_to,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionJobCreditedToCurrentStageRejectReason, nil - case "screening_question_answers.question,job,credited_to,reject_reason": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionJobCreditedToRejectReason, nil - case "screening_question_answers.question,job,current_stage": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionJobCurrentStage, nil - case "screening_question_answers.question,job,current_stage,reject_reason": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionJobCurrentStageRejectReason, nil - case "screening_question_answers.question,job,reject_reason": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionJobRejectReason, nil - case "screening_question_answers.question,reject_reason": - return ApplicationsRetrieveRequestExpandScreeningQuestionAnswersQuestionRejectReason, nil - } - var t ApplicationsRetrieveRequestExpand + return ApplicationsRetrieveRequestExpandItemScreeningQuestionAnswersQuestion, nil + } + var t ApplicationsRetrieveRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (a ApplicationsRetrieveRequestExpand) Ptr() *ApplicationsRetrieveRequestExpand { +func (a ApplicationsRetrieveRequestExpandItem) Ptr() *ApplicationsRetrieveRequestExpandItem { return &a } + +// # The Application Object +// ### Description +// The Application Object is used to represent a candidate's journey through a particular Job's recruiting process. If a Candidate applies for multiple Jobs, there will be a separate Application for each Job if the third-party integration allows it. +// +// ### Usage Example +// Fetch from the `LIST Applications` endpoint and filter by `ID` to show all applications. +type ApplicationRequest struct { + // The candidate applying. + Candidate *ApplicationRequestCandidate `json:"candidate,omitempty" url:"candidate,omitempty"` + // The job being applied for. + Job *ApplicationRequestJob `json:"job,omitempty" url:"job,omitempty"` + // When the application was submitted. + AppliedAt *time.Time `json:"applied_at,omitempty" url:"applied_at,omitempty"` + // When the application was rejected. + RejectedAt *time.Time `json:"rejected_at,omitempty" url:"rejected_at,omitempty"` + Offers []*ApplicationRequestOffersItem `json:"offers,omitempty" url:"offers,omitempty"` + // The application's source. + Source *string `json:"source,omitempty" url:"source,omitempty"` + // The user credited for this application. + CreditedTo *ApplicationRequestCreditedTo `json:"credited_to,omitempty" url:"credited_to,omitempty"` + ScreeningQuestionAnswers []*ApplicationRequestScreeningQuestionAnswersItem `json:"screening_question_answers,omitempty" url:"screening_question_answers,omitempty"` + // The application's current stage. + CurrentStage *ApplicationRequestCurrentStage `json:"current_stage,omitempty" url:"current_stage,omitempty"` + // The application's reason for rejection. + RejectReason *ApplicationRequestRejectReason `json:"reject_reason,omitempty" url:"reject_reason,omitempty"` + RemoteTemplateId *string `json:"remote_template_id,omitempty" url:"remote_template_id,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *ApplicationRequest) GetCandidate() *ApplicationRequestCandidate { + if a == nil { + return nil + } + return a.Candidate +} + +func (a *ApplicationRequest) GetJob() *ApplicationRequestJob { + if a == nil { + return nil + } + return a.Job +} + +func (a *ApplicationRequest) GetAppliedAt() *time.Time { + if a == nil { + return nil + } + return a.AppliedAt +} + +func (a *ApplicationRequest) GetRejectedAt() *time.Time { + if a == nil { + return nil + } + return a.RejectedAt +} + +func (a *ApplicationRequest) GetOffers() []*ApplicationRequestOffersItem { + if a == nil { + return nil + } + return a.Offers +} + +func (a *ApplicationRequest) GetSource() *string { + if a == nil { + return nil + } + return a.Source +} + +func (a *ApplicationRequest) GetCreditedTo() *ApplicationRequestCreditedTo { + if a == nil { + return nil + } + return a.CreditedTo +} + +func (a *ApplicationRequest) GetScreeningQuestionAnswers() []*ApplicationRequestScreeningQuestionAnswersItem { + if a == nil { + return nil + } + return a.ScreeningQuestionAnswers +} + +func (a *ApplicationRequest) GetCurrentStage() *ApplicationRequestCurrentStage { + if a == nil { + return nil + } + return a.CurrentStage +} + +func (a *ApplicationRequest) GetRejectReason() *ApplicationRequestRejectReason { + if a == nil { + return nil + } + return a.RejectReason +} + +func (a *ApplicationRequest) GetRemoteTemplateId() *string { + if a == nil { + return nil + } + return a.RemoteTemplateId +} + +func (a *ApplicationRequest) GetIntegrationParams() map[string]interface{} { + if a == nil { + return nil + } + return a.IntegrationParams +} + +func (a *ApplicationRequest) GetLinkedAccountParams() map[string]interface{} { + if a == nil { + return nil + } + return a.LinkedAccountParams +} + +func (a *ApplicationRequest) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *ApplicationRequest) UnmarshalJSON(data []byte) error { + type embed ApplicationRequest + var unmarshaler = struct { + embed + AppliedAt *internal.DateTime `json:"applied_at,omitempty"` + RejectedAt *internal.DateTime `json:"rejected_at,omitempty"` + }{ + embed: embed(*a), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *a = ApplicationRequest(unmarshaler.embed) + a.AppliedAt = unmarshaler.AppliedAt.TimePtr() + a.RejectedAt = unmarshaler.RejectedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *ApplicationRequest) MarshalJSON() ([]byte, error) { + type embed ApplicationRequest + var marshaler = struct { + embed + AppliedAt *internal.DateTime `json:"applied_at,omitempty"` + RejectedAt *internal.DateTime `json:"rejected_at,omitempty"` + }{ + embed: embed(*a), + AppliedAt: internal.NewOptionalDateTime(a.AppliedAt), + RejectedAt: internal.NewOptionalDateTime(a.RejectedAt), + } + return json.Marshal(marshaler) +} + +func (a *ApplicationRequest) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} + +// The candidate applying. +type ApplicationRequestCandidate struct { + String string + Candidate *Candidate + + typ string +} + +func (a *ApplicationRequestCandidate) GetString() string { + if a == nil { + return "" + } + return a.String +} + +func (a *ApplicationRequestCandidate) GetCandidate() *Candidate { + if a == nil { + return nil + } + return a.Candidate +} + +func (a *ApplicationRequestCandidate) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + a.typ = "String" + a.String = valueString + return nil + } + valueCandidate := new(Candidate) + if err := json.Unmarshal(data, &valueCandidate); err == nil { + a.typ = "Candidate" + a.Candidate = valueCandidate + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, a) +} + +func (a ApplicationRequestCandidate) MarshalJSON() ([]byte, error) { + if a.typ == "String" || a.String != "" { + return json.Marshal(a.String) + } + if a.typ == "Candidate" || a.Candidate != nil { + return json.Marshal(a.Candidate) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type ApplicationRequestCandidateVisitor interface { + VisitString(string) error + VisitCandidate(*Candidate) error +} + +func (a *ApplicationRequestCandidate) Accept(visitor ApplicationRequestCandidateVisitor) error { + if a.typ == "String" || a.String != "" { + return visitor.VisitString(a.String) + } + if a.typ == "Candidate" || a.Candidate != nil { + return visitor.VisitCandidate(a.Candidate) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} + +// The user credited for this application. +type ApplicationRequestCreditedTo struct { + String string + RemoteUser *RemoteUser + + typ string +} + +func (a *ApplicationRequestCreditedTo) GetString() string { + if a == nil { + return "" + } + return a.String +} + +func (a *ApplicationRequestCreditedTo) GetRemoteUser() *RemoteUser { + if a == nil { + return nil + } + return a.RemoteUser +} + +func (a *ApplicationRequestCreditedTo) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + a.typ = "String" + a.String = valueString + return nil + } + valueRemoteUser := new(RemoteUser) + if err := json.Unmarshal(data, &valueRemoteUser); err == nil { + a.typ = "RemoteUser" + a.RemoteUser = valueRemoteUser + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, a) +} + +func (a ApplicationRequestCreditedTo) MarshalJSON() ([]byte, error) { + if a.typ == "String" || a.String != "" { + return json.Marshal(a.String) + } + if a.typ == "RemoteUser" || a.RemoteUser != nil { + return json.Marshal(a.RemoteUser) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type ApplicationRequestCreditedToVisitor interface { + VisitString(string) error + VisitRemoteUser(*RemoteUser) error +} + +func (a *ApplicationRequestCreditedTo) Accept(visitor ApplicationRequestCreditedToVisitor) error { + if a.typ == "String" || a.String != "" { + return visitor.VisitString(a.String) + } + if a.typ == "RemoteUser" || a.RemoteUser != nil { + return visitor.VisitRemoteUser(a.RemoteUser) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} + +// The application's current stage. +type ApplicationRequestCurrentStage struct { + String string + JobInterviewStage *JobInterviewStage + + typ string +} + +func (a *ApplicationRequestCurrentStage) GetString() string { + if a == nil { + return "" + } + return a.String +} + +func (a *ApplicationRequestCurrentStage) GetJobInterviewStage() *JobInterviewStage { + if a == nil { + return nil + } + return a.JobInterviewStage +} + +func (a *ApplicationRequestCurrentStage) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + a.typ = "String" + a.String = valueString + return nil + } + valueJobInterviewStage := new(JobInterviewStage) + if err := json.Unmarshal(data, &valueJobInterviewStage); err == nil { + a.typ = "JobInterviewStage" + a.JobInterviewStage = valueJobInterviewStage + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, a) +} + +func (a ApplicationRequestCurrentStage) MarshalJSON() ([]byte, error) { + if a.typ == "String" || a.String != "" { + return json.Marshal(a.String) + } + if a.typ == "JobInterviewStage" || a.JobInterviewStage != nil { + return json.Marshal(a.JobInterviewStage) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type ApplicationRequestCurrentStageVisitor interface { + VisitString(string) error + VisitJobInterviewStage(*JobInterviewStage) error +} + +func (a *ApplicationRequestCurrentStage) Accept(visitor ApplicationRequestCurrentStageVisitor) error { + if a.typ == "String" || a.String != "" { + return visitor.VisitString(a.String) + } + if a.typ == "JobInterviewStage" || a.JobInterviewStage != nil { + return visitor.VisitJobInterviewStage(a.JobInterviewStage) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} + +// The job being applied for. +type ApplicationRequestJob struct { + String string + Job *Job + + typ string +} + +func (a *ApplicationRequestJob) GetString() string { + if a == nil { + return "" + } + return a.String +} + +func (a *ApplicationRequestJob) GetJob() *Job { + if a == nil { + return nil + } + return a.Job +} + +func (a *ApplicationRequestJob) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + a.typ = "String" + a.String = valueString + return nil + } + valueJob := new(Job) + if err := json.Unmarshal(data, &valueJob); err == nil { + a.typ = "Job" + a.Job = valueJob + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, a) +} + +func (a ApplicationRequestJob) MarshalJSON() ([]byte, error) { + if a.typ == "String" || a.String != "" { + return json.Marshal(a.String) + } + if a.typ == "Job" || a.Job != nil { + return json.Marshal(a.Job) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type ApplicationRequestJobVisitor interface { + VisitString(string) error + VisitJob(*Job) error +} + +func (a *ApplicationRequestJob) Accept(visitor ApplicationRequestJobVisitor) error { + if a.typ == "String" || a.String != "" { + return visitor.VisitString(a.String) + } + if a.typ == "Job" || a.Job != nil { + return visitor.VisitJob(a.Job) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type ApplicationRequestOffersItem struct { + String string + Offer *Offer + + typ string +} + +func (a *ApplicationRequestOffersItem) GetString() string { + if a == nil { + return "" + } + return a.String +} + +func (a *ApplicationRequestOffersItem) GetOffer() *Offer { + if a == nil { + return nil + } + return a.Offer +} + +func (a *ApplicationRequestOffersItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + a.typ = "String" + a.String = valueString + return nil + } + valueOffer := new(Offer) + if err := json.Unmarshal(data, &valueOffer); err == nil { + a.typ = "Offer" + a.Offer = valueOffer + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, a) +} + +func (a ApplicationRequestOffersItem) MarshalJSON() ([]byte, error) { + if a.typ == "String" || a.String != "" { + return json.Marshal(a.String) + } + if a.typ == "Offer" || a.Offer != nil { + return json.Marshal(a.Offer) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type ApplicationRequestOffersItemVisitor interface { + VisitString(string) error + VisitOffer(*Offer) error +} + +func (a *ApplicationRequestOffersItem) Accept(visitor ApplicationRequestOffersItemVisitor) error { + if a.typ == "String" || a.String != "" { + return visitor.VisitString(a.String) + } + if a.typ == "Offer" || a.Offer != nil { + return visitor.VisitOffer(a.Offer) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} + +// The application's reason for rejection. +type ApplicationRequestRejectReason struct { + String string + RejectReason *RejectReason + + typ string +} + +func (a *ApplicationRequestRejectReason) GetString() string { + if a == nil { + return "" + } + return a.String +} + +func (a *ApplicationRequestRejectReason) GetRejectReason() *RejectReason { + if a == nil { + return nil + } + return a.RejectReason +} + +func (a *ApplicationRequestRejectReason) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + a.typ = "String" + a.String = valueString + return nil + } + valueRejectReason := new(RejectReason) + if err := json.Unmarshal(data, &valueRejectReason); err == nil { + a.typ = "RejectReason" + a.RejectReason = valueRejectReason + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, a) +} + +func (a ApplicationRequestRejectReason) MarshalJSON() ([]byte, error) { + if a.typ == "String" || a.String != "" { + return json.Marshal(a.String) + } + if a.typ == "RejectReason" || a.RejectReason != nil { + return json.Marshal(a.RejectReason) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type ApplicationRequestRejectReasonVisitor interface { + VisitString(string) error + VisitRejectReason(*RejectReason) error +} + +func (a *ApplicationRequestRejectReason) Accept(visitor ApplicationRequestRejectReasonVisitor) error { + if a.typ == "String" || a.String != "" { + return visitor.VisitString(a.String) + } + if a.typ == "RejectReason" || a.RejectReason != nil { + return visitor.VisitRejectReason(a.RejectReason) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type ApplicationRequestScreeningQuestionAnswersItem struct { + String string + ScreeningQuestionAnswerRequest *ScreeningQuestionAnswerRequest + + typ string +} + +func (a *ApplicationRequestScreeningQuestionAnswersItem) GetString() string { + if a == nil { + return "" + } + return a.String +} + +func (a *ApplicationRequestScreeningQuestionAnswersItem) GetScreeningQuestionAnswerRequest() *ScreeningQuestionAnswerRequest { + if a == nil { + return nil + } + return a.ScreeningQuestionAnswerRequest +} + +func (a *ApplicationRequestScreeningQuestionAnswersItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + a.typ = "String" + a.String = valueString + return nil + } + valueScreeningQuestionAnswerRequest := new(ScreeningQuestionAnswerRequest) + if err := json.Unmarshal(data, &valueScreeningQuestionAnswerRequest); err == nil { + a.typ = "ScreeningQuestionAnswerRequest" + a.ScreeningQuestionAnswerRequest = valueScreeningQuestionAnswerRequest + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, a) +} + +func (a ApplicationRequestScreeningQuestionAnswersItem) MarshalJSON() ([]byte, error) { + if a.typ == "String" || a.String != "" { + return json.Marshal(a.String) + } + if a.typ == "ScreeningQuestionAnswerRequest" || a.ScreeningQuestionAnswerRequest != nil { + return json.Marshal(a.ScreeningQuestionAnswerRequest) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type ApplicationRequestScreeningQuestionAnswersItemVisitor interface { + VisitString(string) error + VisitScreeningQuestionAnswerRequest(*ScreeningQuestionAnswerRequest) error +} + +func (a *ApplicationRequestScreeningQuestionAnswersItem) Accept(visitor ApplicationRequestScreeningQuestionAnswersItemVisitor) error { + if a.typ == "String" || a.String != "" { + return visitor.VisitString(a.String) + } + if a.typ == "ScreeningQuestionAnswerRequest" || a.ScreeningQuestionAnswerRequest != nil { + return visitor.VisitScreeningQuestionAnswerRequest(a.ScreeningQuestionAnswerRequest) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type ApplicationResponse struct { + Model *Application `json:"model" url:"model"` + Warnings []*WarningValidationProblem `json:"warnings" url:"warnings"` + Errors []*ErrorValidationProblem `json:"errors" url:"errors"` + Logs []*DebugModeLog `json:"logs,omitempty" url:"logs,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *ApplicationResponse) GetModel() *Application { + if a == nil { + return nil + } + return a.Model +} + +func (a *ApplicationResponse) GetWarnings() []*WarningValidationProblem { + if a == nil { + return nil + } + return a.Warnings +} + +func (a *ApplicationResponse) GetErrors() []*ErrorValidationProblem { + if a == nil { + return nil + } + return a.Errors +} + +func (a *ApplicationResponse) GetLogs() []*DebugModeLog { + if a == nil { + return nil + } + return a.Logs +} + +func (a *ApplicationResponse) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *ApplicationResponse) UnmarshalJSON(data []byte) error { + type unmarshaler ApplicationResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *a = ApplicationResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *ApplicationResponse) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} + +type PaginatedApplicationList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Application `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedApplicationList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedApplicationList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedApplicationList) GetResults() []*Application { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedApplicationList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedApplicationList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedApplicationList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedApplicationList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedApplicationList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +// # The ScreeningQuestionAnswer Object +// ### Description +// The `ScreeningQuestionAnswer` object is used to represent candidate responses to a screening question, for a specific application. +// +// ### Usage Example +// TODO +type ScreeningQuestionAnswerRequest struct { + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The screening question associated with the candidate’s answer. To determine the data type of the answer, you can expand on the screening question by adding `screening_question_answers.question` to the `expand` query parameter. + Question *ScreeningQuestionAnswerRequestQuestion `json:"question,omitempty" url:"question,omitempty"` + // The candidate’s response to the screening question. + Answer *string `json:"answer,omitempty" url:"answer,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (s *ScreeningQuestionAnswerRequest) GetRemoteId() *string { + if s == nil { + return nil + } + return s.RemoteId +} + +func (s *ScreeningQuestionAnswerRequest) GetQuestion() *ScreeningQuestionAnswerRequestQuestion { + if s == nil { + return nil + } + return s.Question +} + +func (s *ScreeningQuestionAnswerRequest) GetAnswer() *string { + if s == nil { + return nil + } + return s.Answer +} + +func (s *ScreeningQuestionAnswerRequest) GetIntegrationParams() map[string]interface{} { + if s == nil { + return nil + } + return s.IntegrationParams +} + +func (s *ScreeningQuestionAnswerRequest) GetLinkedAccountParams() map[string]interface{} { + if s == nil { + return nil + } + return s.LinkedAccountParams +} + +func (s *ScreeningQuestionAnswerRequest) GetExtraProperties() map[string]interface{} { + return s.extraProperties +} + +func (s *ScreeningQuestionAnswerRequest) UnmarshalJSON(data []byte) error { + type unmarshaler ScreeningQuestionAnswerRequest + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *s = ScreeningQuestionAnswerRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *s) + if err != nil { + return err + } + s.extraProperties = extraProperties + s.rawJSON = json.RawMessage(data) + return nil +} + +func (s *ScreeningQuestionAnswerRequest) String() string { + if len(s.rawJSON) > 0 { + if value, err := internal.StringifyJSON(s.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(s); err == nil { + return value + } + return fmt.Sprintf("%#v", s) +} + +// The screening question associated with the candidate’s answer. To determine the data type of the answer, you can expand on the screening question by adding `screening_question_answers.question` to the `expand` query parameter. +type ScreeningQuestionAnswerRequestQuestion struct { + String string + ScreeningQuestion *ScreeningQuestion + + typ string +} + +func (s *ScreeningQuestionAnswerRequestQuestion) GetString() string { + if s == nil { + return "" + } + return s.String +} + +func (s *ScreeningQuestionAnswerRequestQuestion) GetScreeningQuestion() *ScreeningQuestion { + if s == nil { + return nil + } + return s.ScreeningQuestion +} + +func (s *ScreeningQuestionAnswerRequestQuestion) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + s.typ = "String" + s.String = valueString + return nil + } + valueScreeningQuestion := new(ScreeningQuestion) + if err := json.Unmarshal(data, &valueScreeningQuestion); err == nil { + s.typ = "ScreeningQuestion" + s.ScreeningQuestion = valueScreeningQuestion + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, s) +} + +func (s ScreeningQuestionAnswerRequestQuestion) MarshalJSON() ([]byte, error) { + if s.typ == "String" || s.String != "" { + return json.Marshal(s.String) + } + if s.typ == "ScreeningQuestion" || s.ScreeningQuestion != nil { + return json.Marshal(s.ScreeningQuestion) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", s) +} + +type ScreeningQuestionAnswerRequestQuestionVisitor interface { + VisitString(string) error + VisitScreeningQuestion(*ScreeningQuestion) error +} + +func (s *ScreeningQuestionAnswerRequestQuestion) Accept(visitor ScreeningQuestionAnswerRequestQuestionVisitor) error { + if s.typ == "String" || s.String != "" { + return visitor.VisitString(s.String) + } + if s.typ == "ScreeningQuestion" || s.ScreeningQuestion != nil { + return visitor.VisitScreeningQuestion(s.ScreeningQuestion) + } + return fmt.Errorf("type %T does not include a non-empty union type", s) +} diff --git a/ats/applications/client.go b/ats/applications/client.go index cda61fe..485c359 100644 --- a/ats/applications/client.go +++ b/ats/applications/client.go @@ -1,145 +1,138 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package applications import ( context "context" fmt "fmt" - ats "github.com/merge-api/merge-go-client/ats" - core "github.com/merge-api/merge-go-client/core" + ats "github.com/merge-api/merge-go-client/v2/ats" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `Application` objects. -func (c *Client) List(ctx context.Context, request *ats.ApplicationsListRequest) (*ats.PaginatedApplicationList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ats/v1/applications" - - queryParams := make(url.Values) - if request.CandidateId != nil { - queryParams.Add("candidate_id", fmt.Sprintf("%v", *request.CandidateId)) - } - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.CreditedToId != nil { - queryParams.Add("credited_to_id", fmt.Sprintf("%v", *request.CreditedToId)) - } - if request.CurrentStageId != nil { - queryParams.Add("current_stage_id", fmt.Sprintf("%v", *request.CurrentStageId)) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.JobId != nil { - queryParams.Add("job_id", fmt.Sprintf("%v", *request.JobId)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RejectReasonId != nil { - queryParams.Add("reject_reason_id", fmt.Sprintf("%v", *request.RejectReasonId)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if request.Source != nil { - queryParams.Add("source", fmt.Sprintf("%v", *request.Source)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *ats.PaginatedApplicationList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *ats.ApplicationsListRequest, + opts ...option.RequestOption, +) (*core.Page[*ats.Application], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ats/v1/applications" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *ats.PaginatedApplicationList) *internal.PageResponse[*string, *ats.Application] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *ats.Application]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Creates an `Application` object with the given values. // For certain integrations, but not all, our API detects duplicate candidates and will associate applications with existing records in the third-party. New candidates are created and automatically linked to the application. // // See our [Help Center article](https://help.merge.dev/en/articles/10012366-updates-to-post-applications-oct-2024) for detailed support per integration. -func (c *Client) Create(ctx context.Context, request *ats.ApplicationEndpointRequest) (*ats.ApplicationResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ats/v1/applications" - - queryParams := make(url.Values) - if request.IsDebugMode != nil { - queryParams.Add("is_debug_mode", fmt.Sprintf("%v", *request.IsDebugMode)) - } - if request.RunAsync != nil { - queryParams.Add("run_async", fmt.Sprintf("%v", *request.RunAsync)) +func (c *Client) Create( + ctx context.Context, + request *ats.ApplicationEndpointRequest, + opts ...option.RequestOption, +) (*ats.ApplicationResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ats/v1/applications" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *ats.ApplicationResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -148,32 +141,46 @@ func (c *Client) Create(ctx context.Context, request *ats.ApplicationEndpointReq } // Returns an `Application` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *ats.ApplicationsRetrieveRequest) (*ats.Application, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"ats/v1/applications/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *ats.ApplicationsRetrieveRequest, + opts ...option.RequestOption, +) (*ats.Application, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/ats/v1/applications/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ats.Application if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -182,33 +189,48 @@ func (c *Client) Retrieve(ctx context.Context, id string, request *ats.Applicati } // Updates the `current_stage` field of an `Application` object -func (c *Client) ChangeStageCreate(ctx context.Context, id string, request *ats.UpdateApplicationStageRequest) (*ats.ApplicationResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"ats/v1/applications/%v/change-stage", id) - - queryParams := make(url.Values) - if request.IsDebugMode != nil { - queryParams.Add("is_debug_mode", fmt.Sprintf("%v", *request.IsDebugMode)) - } - if request.RunAsync != nil { - queryParams.Add("run_async", fmt.Sprintf("%v", *request.RunAsync)) +func (c *Client) ChangeStageCreate( + ctx context.Context, + id string, + request *ats.UpdateApplicationStageRequest, + opts ...option.RequestOption, +) (*ats.ApplicationResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/ats/v1/applications/%v/change-stage", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *ats.ApplicationResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -217,29 +239,42 @@ func (c *Client) ChangeStageCreate(ctx context.Context, id string, request *ats. } // Returns metadata for `Application` POSTs. -func (c *Client) MetaPostRetrieve(ctx context.Context, request *ats.ApplicationsMetaPostRetrieveRequest) (*ats.MetaResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ats/v1/applications/meta/post" - - queryParams := make(url.Values) - if request.ApplicationRemoteTemplateId != nil { - queryParams.Add("application_remote_template_id", fmt.Sprintf("%v", *request.ApplicationRemoteTemplateId)) +func (c *Client) MetaPostRetrieve( + ctx context.Context, + request *ats.ApplicationsMetaPostRetrieveRequest, + opts ...option.RequestOption, +) (*ats.MetaResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ats/v1/applications/meta/post" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ats.MetaResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/ats/async_passthrough.go b/ats/async_passthrough.go index 41fc6dd..2d5b0db 100644 --- a/ats/async_passthrough.go +++ b/ats/async_passthrough.go @@ -1,36 +1,44 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package ats import ( json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" ) type AsyncPassthroughRetrieveResponse struct { - typeName string RemoteResponse *RemoteResponse String string + + typ string } -func NewAsyncPassthroughRetrieveResponseFromRemoteResponse(value *RemoteResponse) *AsyncPassthroughRetrieveResponse { - return &AsyncPassthroughRetrieveResponse{typeName: "remoteResponse", RemoteResponse: value} +func (a *AsyncPassthroughRetrieveResponse) GetRemoteResponse() *RemoteResponse { + if a == nil { + return nil + } + return a.RemoteResponse } -func NewAsyncPassthroughRetrieveResponseFromString(value string) *AsyncPassthroughRetrieveResponse { - return &AsyncPassthroughRetrieveResponse{typeName: "string", String: value} +func (a *AsyncPassthroughRetrieveResponse) GetString() string { + if a == nil { + return "" + } + return a.String } func (a *AsyncPassthroughRetrieveResponse) UnmarshalJSON(data []byte) error { valueRemoteResponse := new(RemoteResponse) if err := json.Unmarshal(data, &valueRemoteResponse); err == nil { - a.typeName = "remoteResponse" + a.typ = "RemoteResponse" a.RemoteResponse = valueRemoteResponse return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" + a.typ = "String" a.String = valueString return nil } @@ -38,14 +46,13 @@ func (a *AsyncPassthroughRetrieveResponse) UnmarshalJSON(data []byte) error { } func (a AsyncPassthroughRetrieveResponse) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "remoteResponse": + if a.typ == "RemoteResponse" || a.RemoteResponse != nil { return json.Marshal(a.RemoteResponse) - case "string": + } + if a.typ == "String" || a.String != "" { return json.Marshal(a.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) } type AsyncPassthroughRetrieveResponseVisitor interface { @@ -54,12 +61,57 @@ type AsyncPassthroughRetrieveResponseVisitor interface { } func (a *AsyncPassthroughRetrieveResponse) Accept(visitor AsyncPassthroughRetrieveResponseVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "remoteResponse": + if a.typ == "RemoteResponse" || a.RemoteResponse != nil { return visitor.VisitRemoteResponse(a.RemoteResponse) - case "string": + } + if a.typ == "String" || a.String != "" { return visitor.VisitString(a.String) } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type AsyncPassthroughReciept struct { + AsyncPassthroughReceiptId string `json:"async_passthrough_receipt_id" url:"async_passthrough_receipt_id"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AsyncPassthroughReciept) GetAsyncPassthroughReceiptId() string { + if a == nil { + return "" + } + return a.AsyncPassthroughReceiptId +} + +func (a *AsyncPassthroughReciept) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AsyncPassthroughReciept) UnmarshalJSON(data []byte) error { + type unmarshaler AsyncPassthroughReciept + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *a = AsyncPassthroughReciept(value) + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AsyncPassthroughReciept) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) } diff --git a/ats/asyncpassthrough/client.go b/ats/asyncpassthrough/client.go index e26c277..f5ff409 100644 --- a/ats/asyncpassthrough/client.go +++ b/ats/asyncpassthrough/client.go @@ -1,50 +1,68 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package asyncpassthrough import ( context "context" - fmt "fmt" - ats "github.com/merge-api/merge-go-client/ats" - core "github.com/merge-api/merge-go-client/core" + ats "github.com/merge-api/merge-go-client/v2/ats" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Asynchronously pull data from an endpoint not currently supported by Merge. -func (c *Client) Create(ctx context.Context, request *ats.DataPassthroughRequest) (*ats.AsyncPassthroughReciept, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ats/v1/async-passthrough" +func (c *Client) Create( + ctx context.Context, + request *ats.DataPassthroughRequest, + opts ...option.RequestOption, +) (*ats.AsyncPassthroughReciept, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ats/v1/async-passthrough" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *ats.AsyncPassthroughReciept if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -53,21 +71,38 @@ func (c *Client) Create(ctx context.Context, request *ats.DataPassthroughRequest } // Retrieves data from earlier async-passthrough POST request -func (c *Client) Retrieve(ctx context.Context, asyncPassthroughReceiptId string) (*ats.AsyncPassthroughRetrieveResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"ats/v1/async-passthrough/%v", asyncPassthroughReceiptId) +func (c *Client) Retrieve( + ctx context.Context, + asyncPassthroughReceiptId string, + opts ...option.RequestOption, +) (*ats.AsyncPassthroughRetrieveResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/ats/v1/async-passthrough/%v", + asyncPassthroughReceiptId, + ) + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ats.AsyncPassthroughRetrieveResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/ats/attachments.go b/ats/attachments.go index 26d5b88..d6677c7 100644 --- a/ats/attachments.go +++ b/ats/attachments.go @@ -1,58 +1,362 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package ats import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type AttachmentEndpointRequest struct { // Whether to include debug fields (such as log file links) in the response. - IsDebugMode *bool `json:"-"` + IsDebugMode *bool `json:"-" url:"is_debug_mode,omitempty"` // Whether or not third-party updates should be run asynchronously. - RunAsync *bool `json:"-"` - Model *AttachmentRequest `json:"model,omitempty"` - RemoteUserId string `json:"remote_user_id"` + RunAsync *bool `json:"-" url:"run_async,omitempty"` + Model *AttachmentRequest `json:"model,omitempty" url:"-"` + RemoteUserId string `json:"remote_user_id" url:"-"` } type AttachmentsListRequest struct { // If provided, will only return attachments for this candidate. - CandidateId *string `json:"-"` + CandidateId *string `json:"-" url:"candidate_id,omitempty"` // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *string `json:"-"` + Expand []*string `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // Deprecated. Use show_enum_origins. - RemoteFields *string `json:"-"` + RemoteFields *string `json:"-" url:"remote_fields,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` // 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) - ShowEnumOrigins *string `json:"-"` + ShowEnumOrigins *string `json:"-" url:"show_enum_origins,omitempty"` } type AttachmentsRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *string `json:"-"` + Expand []*string `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // Deprecated. Use show_enum_origins. - RemoteFields *string `json:"-"` + RemoteFields *string `json:"-" url:"remote_fields,omitempty"` // 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) - ShowEnumOrigins *string `json:"-"` + ShowEnumOrigins *string `json:"-" url:"show_enum_origins,omitempty"` +} + +// # The Attachment Object +// ### Description +// The `Attachment` object is used to represent a file attached to a candidate. +// ### Usage Example +// Fetch from the `LIST Attachments` endpoint and view attachments accessible by a company. +type AttachmentRequest struct { + // The attachment's name. + FileName *string `json:"file_name,omitempty" url:"file_name,omitempty"` + // The attachment's url. + FileUrl *string `json:"file_url,omitempty" url:"file_url,omitempty"` + Candidate *string `json:"candidate,omitempty" url:"candidate,omitempty"` + // The attachment's type. + // + // * `RESUME` - RESUME + // * `COVER_LETTER` - COVER_LETTER + // * `OFFER_LETTER` - OFFER_LETTER + // * `OTHER` - OTHER + AttachmentType *AttachmentRequestAttachmentType `json:"attachment_type,omitempty" url:"attachment_type,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AttachmentRequest) GetFileName() *string { + if a == nil { + return nil + } + return a.FileName +} + +func (a *AttachmentRequest) GetFileUrl() *string { + if a == nil { + return nil + } + return a.FileUrl +} + +func (a *AttachmentRequest) GetCandidate() *string { + if a == nil { + return nil + } + return a.Candidate +} + +func (a *AttachmentRequest) GetAttachmentType() *AttachmentRequestAttachmentType { + if a == nil { + return nil + } + return a.AttachmentType +} + +func (a *AttachmentRequest) GetIntegrationParams() map[string]interface{} { + if a == nil { + return nil + } + return a.IntegrationParams +} + +func (a *AttachmentRequest) GetLinkedAccountParams() map[string]interface{} { + if a == nil { + return nil + } + return a.LinkedAccountParams +} + +func (a *AttachmentRequest) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AttachmentRequest) UnmarshalJSON(data []byte) error { + type unmarshaler AttachmentRequest + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *a = AttachmentRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AttachmentRequest) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} + +// The attachment's type. +// +// * `RESUME` - RESUME +// * `COVER_LETTER` - COVER_LETTER +// * `OFFER_LETTER` - OFFER_LETTER +// * `OTHER` - OTHER +type AttachmentRequestAttachmentType struct { + AttachmentTypeEnum AttachmentTypeEnum + String string + + typ string +} + +func (a *AttachmentRequestAttachmentType) GetAttachmentTypeEnum() AttachmentTypeEnum { + if a == nil { + return "" + } + return a.AttachmentTypeEnum +} + +func (a *AttachmentRequestAttachmentType) GetString() string { + if a == nil { + return "" + } + return a.String +} + +func (a *AttachmentRequestAttachmentType) UnmarshalJSON(data []byte) error { + var valueAttachmentTypeEnum AttachmentTypeEnum + if err := json.Unmarshal(data, &valueAttachmentTypeEnum); err == nil { + a.typ = "AttachmentTypeEnum" + a.AttachmentTypeEnum = valueAttachmentTypeEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + a.typ = "String" + a.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, a) +} + +func (a AttachmentRequestAttachmentType) MarshalJSON() ([]byte, error) { + if a.typ == "AttachmentTypeEnum" || a.AttachmentTypeEnum != "" { + return json.Marshal(a.AttachmentTypeEnum) + } + if a.typ == "String" || a.String != "" { + return json.Marshal(a.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type AttachmentRequestAttachmentTypeVisitor interface { + VisitAttachmentTypeEnum(AttachmentTypeEnum) error + VisitString(string) error +} + +func (a *AttachmentRequestAttachmentType) Accept(visitor AttachmentRequestAttachmentTypeVisitor) error { + if a.typ == "AttachmentTypeEnum" || a.AttachmentTypeEnum != "" { + return visitor.VisitAttachmentTypeEnum(a.AttachmentTypeEnum) + } + if a.typ == "String" || a.String != "" { + return visitor.VisitString(a.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type AttachmentResponse struct { + Model *Attachment `json:"model" url:"model"` + Warnings []*WarningValidationProblem `json:"warnings" url:"warnings"` + Errors []*ErrorValidationProblem `json:"errors" url:"errors"` + Logs []*DebugModeLog `json:"logs,omitempty" url:"logs,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AttachmentResponse) GetModel() *Attachment { + if a == nil { + return nil + } + return a.Model +} + +func (a *AttachmentResponse) GetWarnings() []*WarningValidationProblem { + if a == nil { + return nil + } + return a.Warnings +} + +func (a *AttachmentResponse) GetErrors() []*ErrorValidationProblem { + if a == nil { + return nil + } + return a.Errors +} + +func (a *AttachmentResponse) GetLogs() []*DebugModeLog { + if a == nil { + return nil + } + return a.Logs +} + +func (a *AttachmentResponse) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AttachmentResponse) UnmarshalJSON(data []byte) error { + type unmarshaler AttachmentResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *a = AttachmentResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AttachmentResponse) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} + +type PaginatedAttachmentList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Attachment `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedAttachmentList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedAttachmentList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedAttachmentList) GetResults() []*Attachment { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedAttachmentList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedAttachmentList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedAttachmentList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedAttachmentList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedAttachmentList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) } diff --git a/ats/attachments/client.go b/ats/attachments/client.go index 88d90f8..ea5742a 100644 --- a/ats/attachments/client.go +++ b/ats/attachments/client.go @@ -1,133 +1,135 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package attachments import ( context "context" fmt "fmt" - ats "github.com/merge-api/merge-go-client/ats" - core "github.com/merge-api/merge-go-client/core" + ats "github.com/merge-api/merge-go-client/v2/ats" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `Attachment` objects. -func (c *Client) List(ctx context.Context, request *ats.AttachmentsListRequest) (*ats.PaginatedAttachmentList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ats/v1/attachments" - - queryParams := make(url.Values) - if request.CandidateId != nil { - queryParams.Add("candidate_id", fmt.Sprintf("%v", *request.CandidateId)) - } - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteFields != nil { - queryParams.Add("remote_fields", fmt.Sprintf("%v", request.RemoteFields)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if request.ShowEnumOrigins != nil { - queryParams.Add("show_enum_origins", fmt.Sprintf("%v", request.ShowEnumOrigins)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *ats.PaginatedAttachmentList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *ats.AttachmentsListRequest, + opts ...option.RequestOption, +) (*core.Page[*ats.Attachment], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ats/v1/attachments" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *ats.PaginatedAttachmentList) *internal.PageResponse[*string, *ats.Attachment] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *ats.Attachment]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Creates an `Attachment` object with the given values. -func (c *Client) Create(ctx context.Context, request *ats.AttachmentEndpointRequest) (*ats.AttachmentResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ats/v1/attachments" - - queryParams := make(url.Values) - if request.IsDebugMode != nil { - queryParams.Add("is_debug_mode", fmt.Sprintf("%v", *request.IsDebugMode)) - } - if request.RunAsync != nil { - queryParams.Add("run_async", fmt.Sprintf("%v", *request.RunAsync)) +func (c *Client) Create( + ctx context.Context, + request *ats.AttachmentEndpointRequest, + opts ...option.RequestOption, +) (*ats.AttachmentResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ats/v1/attachments" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *ats.AttachmentResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -136,38 +138,46 @@ func (c *Client) Create(ctx context.Context, request *ats.AttachmentEndpointRequ } // Returns an `Attachment` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *ats.AttachmentsRetrieveRequest) (*ats.Attachment, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"ats/v1/attachments/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.RemoteFields != nil { - queryParams.Add("remote_fields", fmt.Sprintf("%v", request.RemoteFields)) - } - if request.ShowEnumOrigins != nil { - queryParams.Add("show_enum_origins", fmt.Sprintf("%v", request.ShowEnumOrigins)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *ats.AttachmentsRetrieveRequest, + opts ...option.RequestOption, +) (*ats.Attachment, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/ats/v1/attachments/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ats.Attachment if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -176,21 +186,34 @@ func (c *Client) Retrieve(ctx context.Context, id string, request *ats.Attachmen } // Returns metadata for `Attachment` POSTs. -func (c *Client) MetaPostRetrieve(ctx context.Context) (*ats.MetaResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ats/v1/attachments/meta/post" +func (c *Client) MetaPostRetrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*ats.MetaResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ats/v1/attachments/meta/post" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ats.MetaResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/ats/audit_trail.go b/ats/audit_trail.go index 1982445..d9817a3 100644 --- a/ats/audit_trail.go +++ b/ats/audit_trail.go @@ -1,18 +1,667 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package ats +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" + time "time" +) + type AuditTrailListRequest struct { // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // If included, will only include audit trail events that occurred before this time - EndDate *string `json:"-"` - // 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`, `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED` - EventType *string `json:"-"` + EndDate *string `json:"-" url:"end_date,omitempty"` + // 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`, `REGENERATED_WEBHOOK_SIGNATURE`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `DELETED_ALL_COMMON_MODELS_FOR_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`, `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED` + EventType *string `json:"-" url:"event_type,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // If included, will only include audit trail events that occurred after this time - StartDate *string `json:"-"` + StartDate *string `json:"-" url:"start_date,omitempty"` // If provided, this will return events associated with the specified user email. Please note that the email address reflects the user's email at the time of the event, and may not be their current email. - UserEmail *string `json:"-"` + UserEmail *string `json:"-" url:"user_email,omitempty"` +} + +type AuditLogEvent struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The User's full name at the time of this Event occurring. + UserName *string `json:"user_name,omitempty" url:"user_name,omitempty"` + // The User's email at the time of this Event occurring. + UserEmail *string `json:"user_email,omitempty" url:"user_email,omitempty"` + // Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. + // + // * `ADMIN` - ADMIN + // * `DEVELOPER` - DEVELOPER + // * `MEMBER` - MEMBER + // * `API` - API + // * `SYSTEM` - SYSTEM + // * `MERGE_TEAM` - MERGE_TEAM + Role *AuditLogEventRole `json:"role" url:"role"` + IpAddress string `json:"ip_address" url:"ip_address"` + // Designates the type of event that occurred. + // + // * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + // * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + // * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + // * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + // * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + // * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + // * `INVITED_USER` - INVITED_USER + // * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + // * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + // * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + // * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + // * `CREATED_DESTINATION` - CREATED_DESTINATION + // * `DELETED_DESTINATION` - DELETED_DESTINATION + // * `CHANGED_DESTINATION` - CHANGED_DESTINATION + // * `CHANGED_SCOPES` - CHANGED_SCOPES + // * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + // * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + // * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + // * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + // * `ENABLED_CATEGORY` - ENABLED_CATEGORY + // * `DISABLED_CATEGORY` - DISABLED_CATEGORY + // * `CHANGED_PASSWORD` - CHANGED_PASSWORD + // * `RESET_PASSWORD` - RESET_PASSWORD + // * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + // * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + // * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + // * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + // * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING + // * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING + // * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + // * `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 + // * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + // * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + // * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + // * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + // * `MUTED_ISSUE` - MUTED_ISSUE + // * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + // * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + // * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + // * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + // * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + EventType *AuditLogEventEventType `json:"event_type" url:"event_type"` + EventDescription string `json:"event_description" url:"event_description"` + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AuditLogEvent) GetId() *string { + if a == nil { + return nil + } + return a.Id +} + +func (a *AuditLogEvent) GetUserName() *string { + if a == nil { + return nil + } + return a.UserName +} + +func (a *AuditLogEvent) GetUserEmail() *string { + if a == nil { + return nil + } + return a.UserEmail +} + +func (a *AuditLogEvent) GetRole() *AuditLogEventRole { + if a == nil { + return nil + } + return a.Role +} + +func (a *AuditLogEvent) GetIpAddress() string { + if a == nil { + return "" + } + return a.IpAddress +} + +func (a *AuditLogEvent) GetEventType() *AuditLogEventEventType { + if a == nil { + return nil + } + return a.EventType +} + +func (a *AuditLogEvent) GetEventDescription() string { + if a == nil { + return "" + } + return a.EventDescription +} + +func (a *AuditLogEvent) GetCreatedAt() *time.Time { + if a == nil { + return nil + } + return a.CreatedAt +} + +func (a *AuditLogEvent) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AuditLogEvent) UnmarshalJSON(data []byte) error { + type embed AuditLogEvent + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + }{ + embed: embed(*a), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *a = AuditLogEvent(unmarshaler.embed) + a.CreatedAt = unmarshaler.CreatedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AuditLogEvent) MarshalJSON() ([]byte, error) { + type embed AuditLogEvent + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + }{ + embed: embed(*a), + CreatedAt: internal.NewOptionalDateTime(a.CreatedAt), + } + return json.Marshal(marshaler) +} + +func (a *AuditLogEvent) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} + +// Designates the type of event that occurred. +// +// * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY +// * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY +// * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY +// * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY +// * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY +// * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE +// * `INVITED_USER` - INVITED_USER +// * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED +// * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED +// * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT +// * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT +// * `CREATED_DESTINATION` - CREATED_DESTINATION +// * `DELETED_DESTINATION` - DELETED_DESTINATION +// * `CHANGED_DESTINATION` - CHANGED_DESTINATION +// * `CHANGED_SCOPES` - CHANGED_SCOPES +// * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION +// * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS +// * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION +// * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION +// * `ENABLED_CATEGORY` - ENABLED_CATEGORY +// * `DISABLED_CATEGORY` - DISABLED_CATEGORY +// * `CHANGED_PASSWORD` - CHANGED_PASSWORD +// * `RESET_PASSWORD` - RESET_PASSWORD +// * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION +// * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT +// * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION +// * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT +// * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING +// * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING +// * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING +// * `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 +// * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE +// * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE +// * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE +// * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC +// * `MUTED_ISSUE` - MUTED_ISSUE +// * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK +// * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK +// * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK +// * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED +// * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED +type AuditLogEventEventType struct { + EventTypeEnum EventTypeEnum + String string + + typ string +} + +func (a *AuditLogEventEventType) GetEventTypeEnum() EventTypeEnum { + if a == nil { + return "" + } + return a.EventTypeEnum +} + +func (a *AuditLogEventEventType) GetString() string { + if a == nil { + return "" + } + return a.String +} + +func (a *AuditLogEventEventType) UnmarshalJSON(data []byte) error { + var valueEventTypeEnum EventTypeEnum + if err := json.Unmarshal(data, &valueEventTypeEnum); err == nil { + a.typ = "EventTypeEnum" + a.EventTypeEnum = valueEventTypeEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + a.typ = "String" + a.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, a) +} + +func (a AuditLogEventEventType) MarshalJSON() ([]byte, error) { + if a.typ == "EventTypeEnum" || a.EventTypeEnum != "" { + return json.Marshal(a.EventTypeEnum) + } + if a.typ == "String" || a.String != "" { + return json.Marshal(a.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type AuditLogEventEventTypeVisitor interface { + VisitEventTypeEnum(EventTypeEnum) error + VisitString(string) error +} + +func (a *AuditLogEventEventType) Accept(visitor AuditLogEventEventTypeVisitor) error { + if a.typ == "EventTypeEnum" || a.EventTypeEnum != "" { + return visitor.VisitEventTypeEnum(a.EventTypeEnum) + } + if a.typ == "String" || a.String != "" { + return visitor.VisitString(a.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} + +// Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. +// +// * `ADMIN` - ADMIN +// * `DEVELOPER` - DEVELOPER +// * `MEMBER` - MEMBER +// * `API` - API +// * `SYSTEM` - SYSTEM +// * `MERGE_TEAM` - MERGE_TEAM +type AuditLogEventRole struct { + RoleEnum RoleEnum + String string + + typ string +} + +func (a *AuditLogEventRole) GetRoleEnum() RoleEnum { + if a == nil { + return "" + } + return a.RoleEnum +} + +func (a *AuditLogEventRole) GetString() string { + if a == nil { + return "" + } + return a.String +} + +func (a *AuditLogEventRole) UnmarshalJSON(data []byte) error { + var valueRoleEnum RoleEnum + if err := json.Unmarshal(data, &valueRoleEnum); err == nil { + a.typ = "RoleEnum" + a.RoleEnum = valueRoleEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + a.typ = "String" + a.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, a) +} + +func (a AuditLogEventRole) MarshalJSON() ([]byte, error) { + if a.typ == "RoleEnum" || a.RoleEnum != "" { + return json.Marshal(a.RoleEnum) + } + if a.typ == "String" || a.String != "" { + return json.Marshal(a.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type AuditLogEventRoleVisitor interface { + VisitRoleEnum(RoleEnum) error + VisitString(string) error +} + +func (a *AuditLogEventRole) Accept(visitor AuditLogEventRoleVisitor) error { + if a.typ == "RoleEnum" || a.RoleEnum != "" { + return visitor.VisitRoleEnum(a.RoleEnum) + } + if a.typ == "String" || a.String != "" { + return visitor.VisitString(a.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} + +// * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY +// * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY +// * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY +// * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY +// * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY +// * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE +// * `INVITED_USER` - INVITED_USER +// * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED +// * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED +// * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT +// * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT +// * `CREATED_DESTINATION` - CREATED_DESTINATION +// * `DELETED_DESTINATION` - DELETED_DESTINATION +// * `CHANGED_DESTINATION` - CHANGED_DESTINATION +// * `CHANGED_SCOPES` - CHANGED_SCOPES +// * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION +// * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS +// * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION +// * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION +// * `ENABLED_CATEGORY` - ENABLED_CATEGORY +// * `DISABLED_CATEGORY` - DISABLED_CATEGORY +// * `CHANGED_PASSWORD` - CHANGED_PASSWORD +// * `RESET_PASSWORD` - RESET_PASSWORD +// * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION +// * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT +// * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION +// * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT +// * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING +// * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING +// * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING +// * `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 +// * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE +// * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE +// * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE +// * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC +// * `MUTED_ISSUE` - MUTED_ISSUE +// * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK +// * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK +// * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK +// * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED +// * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED +type EventTypeEnum string + +const ( + EventTypeEnumCreatedRemoteProductionApiKey EventTypeEnum = "CREATED_REMOTE_PRODUCTION_API_KEY" + EventTypeEnumDeletedRemoteProductionApiKey EventTypeEnum = "DELETED_REMOTE_PRODUCTION_API_KEY" + EventTypeEnumCreatedTestApiKey EventTypeEnum = "CREATED_TEST_API_KEY" + EventTypeEnumDeletedTestApiKey EventTypeEnum = "DELETED_TEST_API_KEY" + EventTypeEnumRegeneratedProductionApiKey EventTypeEnum = "REGENERATED_PRODUCTION_API_KEY" + EventTypeEnumRegeneratedWebhookSignature EventTypeEnum = "REGENERATED_WEBHOOK_SIGNATURE" + EventTypeEnumInvitedUser EventTypeEnum = "INVITED_USER" + EventTypeEnumTwoFactorAuthEnabled EventTypeEnum = "TWO_FACTOR_AUTH_ENABLED" + EventTypeEnumTwoFactorAuthDisabled EventTypeEnum = "TWO_FACTOR_AUTH_DISABLED" + EventTypeEnumDeletedLinkedAccount EventTypeEnum = "DELETED_LINKED_ACCOUNT" + EventTypeEnumDeletedAllCommonModelsForLinkedAccount EventTypeEnum = "DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT" + EventTypeEnumCreatedDestination EventTypeEnum = "CREATED_DESTINATION" + EventTypeEnumDeletedDestination EventTypeEnum = "DELETED_DESTINATION" + EventTypeEnumChangedDestination EventTypeEnum = "CHANGED_DESTINATION" + EventTypeEnumChangedScopes EventTypeEnum = "CHANGED_SCOPES" + EventTypeEnumChangedPersonalInformation EventTypeEnum = "CHANGED_PERSONAL_INFORMATION" + EventTypeEnumChangedOrganizationSettings EventTypeEnum = "CHANGED_ORGANIZATION_SETTINGS" + EventTypeEnumEnabledIntegration EventTypeEnum = "ENABLED_INTEGRATION" + EventTypeEnumDisabledIntegration EventTypeEnum = "DISABLED_INTEGRATION" + EventTypeEnumEnabledCategory EventTypeEnum = "ENABLED_CATEGORY" + EventTypeEnumDisabledCategory EventTypeEnum = "DISABLED_CATEGORY" + EventTypeEnumChangedPassword EventTypeEnum = "CHANGED_PASSWORD" + EventTypeEnumResetPassword EventTypeEnum = "RESET_PASSWORD" + EventTypeEnumEnabledRedactUnmappedDataForOrganization EventTypeEnum = "ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION" + EventTypeEnumEnabledRedactUnmappedDataForLinkedAccount EventTypeEnum = "ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT" + EventTypeEnumDisabledRedactUnmappedDataForOrganization EventTypeEnum = "DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION" + EventTypeEnumDisabledRedactUnmappedDataForLinkedAccount EventTypeEnum = "DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT" + EventTypeEnumCreatedIntegrationWideFieldMapping EventTypeEnum = "CREATED_INTEGRATION_WIDE_FIELD_MAPPING" + EventTypeEnumCreatedLinkedAccountFieldMapping EventTypeEnum = "CREATED_LINKED_ACCOUNT_FIELD_MAPPING" + EventTypeEnumChangedIntegrationWideFieldMapping EventTypeEnum = "CHANGED_INTEGRATION_WIDE_FIELD_MAPPING" + EventTypeEnumChangedLinkedAccountFieldMapping EventTypeEnum = "CHANGED_LINKED_ACCOUNT_FIELD_MAPPING" + EventTypeEnumDeletedIntegrationWideFieldMapping EventTypeEnum = "DELETED_INTEGRATION_WIDE_FIELD_MAPPING" + EventTypeEnumDeletedLinkedAccountFieldMapping EventTypeEnum = "DELETED_LINKED_ACCOUNT_FIELD_MAPPING" + EventTypeEnumCreatedLinkedAccountCommonModelOverride EventTypeEnum = "CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE" + EventTypeEnumChangedLinkedAccountCommonModelOverride EventTypeEnum = "CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE" + EventTypeEnumDeletedLinkedAccountCommonModelOverride EventTypeEnum = "DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE" + EventTypeEnumForcedLinkedAccountResync EventTypeEnum = "FORCED_LINKED_ACCOUNT_RESYNC" + EventTypeEnumMutedIssue EventTypeEnum = "MUTED_ISSUE" + EventTypeEnumGeneratedMagicLink EventTypeEnum = "GENERATED_MAGIC_LINK" + EventTypeEnumEnabledMergeWebhook EventTypeEnum = "ENABLED_MERGE_WEBHOOK" + EventTypeEnumDisabledMergeWebhook EventTypeEnum = "DISABLED_MERGE_WEBHOOK" + EventTypeEnumMergeWebhookTargetChanged EventTypeEnum = "MERGE_WEBHOOK_TARGET_CHANGED" + EventTypeEnumEndUserCredentialsAccessed EventTypeEnum = "END_USER_CREDENTIALS_ACCESSED" +) + +func NewEventTypeEnumFromString(s string) (EventTypeEnum, error) { + switch s { + case "CREATED_REMOTE_PRODUCTION_API_KEY": + return EventTypeEnumCreatedRemoteProductionApiKey, nil + case "DELETED_REMOTE_PRODUCTION_API_KEY": + return EventTypeEnumDeletedRemoteProductionApiKey, nil + case "CREATED_TEST_API_KEY": + return EventTypeEnumCreatedTestApiKey, nil + case "DELETED_TEST_API_KEY": + return EventTypeEnumDeletedTestApiKey, nil + case "REGENERATED_PRODUCTION_API_KEY": + return EventTypeEnumRegeneratedProductionApiKey, nil + case "REGENERATED_WEBHOOK_SIGNATURE": + return EventTypeEnumRegeneratedWebhookSignature, nil + case "INVITED_USER": + return EventTypeEnumInvitedUser, nil + case "TWO_FACTOR_AUTH_ENABLED": + return EventTypeEnumTwoFactorAuthEnabled, nil + case "TWO_FACTOR_AUTH_DISABLED": + return EventTypeEnumTwoFactorAuthDisabled, nil + case "DELETED_LINKED_ACCOUNT": + return EventTypeEnumDeletedLinkedAccount, nil + case "DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT": + return EventTypeEnumDeletedAllCommonModelsForLinkedAccount, nil + case "CREATED_DESTINATION": + return EventTypeEnumCreatedDestination, nil + case "DELETED_DESTINATION": + return EventTypeEnumDeletedDestination, nil + case "CHANGED_DESTINATION": + return EventTypeEnumChangedDestination, nil + case "CHANGED_SCOPES": + return EventTypeEnumChangedScopes, nil + case "CHANGED_PERSONAL_INFORMATION": + return EventTypeEnumChangedPersonalInformation, nil + case "CHANGED_ORGANIZATION_SETTINGS": + return EventTypeEnumChangedOrganizationSettings, nil + case "ENABLED_INTEGRATION": + return EventTypeEnumEnabledIntegration, nil + case "DISABLED_INTEGRATION": + return EventTypeEnumDisabledIntegration, nil + case "ENABLED_CATEGORY": + return EventTypeEnumEnabledCategory, nil + case "DISABLED_CATEGORY": + return EventTypeEnumDisabledCategory, nil + case "CHANGED_PASSWORD": + return EventTypeEnumChangedPassword, nil + case "RESET_PASSWORD": + return EventTypeEnumResetPassword, nil + case "ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION": + return EventTypeEnumEnabledRedactUnmappedDataForOrganization, nil + case "ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT": + return EventTypeEnumEnabledRedactUnmappedDataForLinkedAccount, nil + case "DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION": + return EventTypeEnumDisabledRedactUnmappedDataForOrganization, nil + case "DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT": + return EventTypeEnumDisabledRedactUnmappedDataForLinkedAccount, nil + case "CREATED_INTEGRATION_WIDE_FIELD_MAPPING": + return EventTypeEnumCreatedIntegrationWideFieldMapping, nil + case "CREATED_LINKED_ACCOUNT_FIELD_MAPPING": + return EventTypeEnumCreatedLinkedAccountFieldMapping, nil + case "CHANGED_INTEGRATION_WIDE_FIELD_MAPPING": + return EventTypeEnumChangedIntegrationWideFieldMapping, nil + case "CHANGED_LINKED_ACCOUNT_FIELD_MAPPING": + return EventTypeEnumChangedLinkedAccountFieldMapping, nil + case "DELETED_INTEGRATION_WIDE_FIELD_MAPPING": + return EventTypeEnumDeletedIntegrationWideFieldMapping, nil + case "DELETED_LINKED_ACCOUNT_FIELD_MAPPING": + return EventTypeEnumDeletedLinkedAccountFieldMapping, nil + case "CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE": + return EventTypeEnumCreatedLinkedAccountCommonModelOverride, nil + case "CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE": + return EventTypeEnumChangedLinkedAccountCommonModelOverride, nil + case "DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE": + return EventTypeEnumDeletedLinkedAccountCommonModelOverride, nil + case "FORCED_LINKED_ACCOUNT_RESYNC": + return EventTypeEnumForcedLinkedAccountResync, nil + case "MUTED_ISSUE": + return EventTypeEnumMutedIssue, nil + case "GENERATED_MAGIC_LINK": + return EventTypeEnumGeneratedMagicLink, nil + case "ENABLED_MERGE_WEBHOOK": + return EventTypeEnumEnabledMergeWebhook, nil + case "DISABLED_MERGE_WEBHOOK": + return EventTypeEnumDisabledMergeWebhook, nil + case "MERGE_WEBHOOK_TARGET_CHANGED": + return EventTypeEnumMergeWebhookTargetChanged, nil + case "END_USER_CREDENTIALS_ACCESSED": + return EventTypeEnumEndUserCredentialsAccessed, nil + } + var t EventTypeEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (e EventTypeEnum) Ptr() *EventTypeEnum { + return &e +} + +type PaginatedAuditLogEventList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*AuditLogEvent `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedAuditLogEventList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedAuditLogEventList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedAuditLogEventList) GetResults() []*AuditLogEvent { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedAuditLogEventList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedAuditLogEventList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedAuditLogEventList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedAuditLogEventList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedAuditLogEventList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +// * `ADMIN` - ADMIN +// * `DEVELOPER` - DEVELOPER +// * `MEMBER` - MEMBER +// * `API` - API +// * `SYSTEM` - SYSTEM +// * `MERGE_TEAM` - MERGE_TEAM +type RoleEnum string + +const ( + RoleEnumAdmin RoleEnum = "ADMIN" + RoleEnumDeveloper RoleEnum = "DEVELOPER" + RoleEnumMember RoleEnum = "MEMBER" + RoleEnumApi RoleEnum = "API" + RoleEnumSystem RoleEnum = "SYSTEM" + RoleEnumMergeTeam RoleEnum = "MERGE_TEAM" +) + +func NewRoleEnumFromString(s string) (RoleEnum, error) { + switch s { + case "ADMIN": + return RoleEnumAdmin, nil + case "DEVELOPER": + return RoleEnumDeveloper, nil + case "MEMBER": + return RoleEnumMember, nil + case "API": + return RoleEnumApi, nil + case "SYSTEM": + return RoleEnumSystem, nil + case "MERGE_TEAM": + return RoleEnumMergeTeam, nil + } + var t RoleEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (r RoleEnum) Ptr() *RoleEnum { + return &r } diff --git a/ats/audittrail/client.go b/ats/audittrail/client.go index ea9b047..047f8e1 100644 --- a/ats/audittrail/client.go +++ b/ats/audittrail/client.go @@ -1,76 +1,92 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package audittrail import ( context "context" fmt "fmt" - ats "github.com/merge-api/merge-go-client/ats" - core "github.com/merge-api/merge-go-client/core" + ats "github.com/merge-api/merge-go-client/v2/ats" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Gets a list of audit trail events. -func (c *Client) List(ctx context.Context, request *ats.AuditTrailListRequest) (*ats.PaginatedAuditLogEventList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL +func (c *Client) List( + ctx context.Context, + request *ats.AuditTrailListRequest, + opts ...option.RequestOption, +) (*core.Page[*ats.AuditLogEvent], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ats/v1/audit-trail" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } - endpointURL := baseURL + "/" + "ats/v1/audit-trail" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) - queryParams := make(url.Values) - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.EndDate != nil { - queryParams.Add("end_date", fmt.Sprintf("%v", *request.EndDate)) - } - if request.EventType != nil { - queryParams.Add("event_type", fmt.Sprintf("%v", *request.EventType)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } } - if request.StartDate != nil { - queryParams.Add("start_date", fmt.Sprintf("%v", *request.StartDate)) - } - if request.UserEmail != nil { - queryParams.Add("user_email", fmt.Sprintf("%v", *request.UserEmail)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *ats.PaginatedAuditLogEventList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { - return nil, err + readPageResponse := func(response *ats.PaginatedAuditLogEventList) *internal.PageResponse[*string, *ats.AuditLogEvent] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *ats.AuditLogEvent]{ + Next: next, + Results: results, + Done: next == zeroValue, + } } - return response, nil + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } diff --git a/ats/available_actions.go b/ats/available_actions.go new file mode 100644 index 0000000..1622d35 --- /dev/null +++ b/ats/available_actions.go @@ -0,0 +1,77 @@ +// Code generated by Fern. DO NOT EDIT. + +package ats + +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" +) + +// # The AvailableActions Object +// ### Description +// The `Activity` object is used to see all available model/operation combinations for an integration. +// +// ### Usage Example +// Fetch all the actions available for the `Zenefits` integration. +type AvailableActions struct { + Integration *AccountIntegration `json:"integration" url:"integration"` + PassthroughAvailable bool `json:"passthrough_available" url:"passthrough_available"` + AvailableModelOperations []*ModelOperation `json:"available_model_operations,omitempty" url:"available_model_operations,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AvailableActions) GetIntegration() *AccountIntegration { + if a == nil { + return nil + } + return a.Integration +} + +func (a *AvailableActions) GetPassthroughAvailable() bool { + if a == nil { + return false + } + return a.PassthroughAvailable +} + +func (a *AvailableActions) GetAvailableModelOperations() []*ModelOperation { + if a == nil { + return nil + } + return a.AvailableModelOperations +} + +func (a *AvailableActions) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AvailableActions) UnmarshalJSON(data []byte) error { + type unmarshaler AvailableActions + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *a = AvailableActions(value) + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AvailableActions) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} diff --git a/ats/availableactions/client.go b/ats/availableactions/client.go index 38e82a0..12468a5 100644 --- a/ats/availableactions/client.go +++ b/ats/availableactions/client.go @@ -1,48 +1,65 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package availableactions import ( context "context" - ats "github.com/merge-api/merge-go-client/ats" - core "github.com/merge-api/merge-go-client/core" + ats "github.com/merge-api/merge-go-client/v2/ats" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of models and actions available for an account. -func (c *Client) Retrieve(ctx context.Context) (*ats.AvailableActions, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ats/v1/available-actions" +func (c *Client) Retrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*ats.AvailableActions, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ats/v1/available-actions" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ats.AvailableActions if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/ats/candidates.go b/ats/candidates.go index d9c3e6a..a14e6f3 100644 --- a/ats/candidates.go +++ b/ats/candidates.go @@ -1,121 +1,1386 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package ats import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type CandidateEndpointRequest struct { // Whether to include debug fields (such as log file links) in the response. - IsDebugMode *bool `json:"-"` + IsDebugMode *bool `json:"-" url:"is_debug_mode,omitempty"` // Whether or not third-party updates should be run asynchronously. - RunAsync *bool `json:"-"` - Model *CandidateRequest `json:"model,omitempty"` - RemoteUserId string `json:"remote_user_id"` -} - -type IgnoreCommonModelRequest struct { - Reason ReasonEnum `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + RunAsync *bool `json:"-" url:"run_async,omitempty"` + Model *CandidateRequest `json:"model,omitempty" url:"-"` + RemoteUserId string `json:"remote_user_id" url:"-"` } type CandidatesListRequest struct { // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // If provided, will only return candidates with these email addresses; multiple addresses can be separated by commas. - EmailAddresses *string `json:"-"` + EmailAddresses *string `json:"-" url:"email_addresses,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *CandidatesListRequestExpand `json:"-"` + Expand []*CandidatesListRequestExpandItem `json:"-" url:"expand,omitempty"` // If provided, will only return candidates with this first name. - FirstName *string `json:"-"` + FirstName *string `json:"-" url:"first_name,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, will only return candidates with this last name. - LastName *string `json:"-"` + LastName *string `json:"-" url:"last_name,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` // If provided, will only return candidates with these tags; multiple tags can be separated by commas. - Tags *string `json:"-"` + Tags *string `json:"-" url:"tags,omitempty"` } type PatchedCandidateEndpointRequest struct { // Whether to include debug fields (such as log file links) in the response. - IsDebugMode *bool `json:"-"` + IsDebugMode *bool `json:"-" url:"is_debug_mode,omitempty"` // Whether or not third-party updates should be run asynchronously. - RunAsync *bool `json:"-"` - Model *PatchedCandidateRequest `json:"model,omitempty"` - RemoteUserId string `json:"remote_user_id"` + RunAsync *bool `json:"-" url:"run_async,omitempty"` + Model *PatchedCandidateRequest `json:"model,omitempty" url:"-"` + RemoteUserId string `json:"remote_user_id" url:"-"` } type CandidatesRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *CandidatesRetrieveRequestExpand `json:"-"` + Expand []*CandidatesRetrieveRequestExpandItem `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` } -type CandidatesListRequestExpand string +type CandidatesListRequestExpandItem string const ( - CandidatesListRequestExpandApplications CandidatesListRequestExpand = "applications" - CandidatesListRequestExpandApplicationsAttachments CandidatesListRequestExpand = "applications,attachments" - CandidatesListRequestExpandAttachments CandidatesListRequestExpand = "attachments" + CandidatesListRequestExpandItemApplications CandidatesListRequestExpandItem = "applications" + CandidatesListRequestExpandItemAttachments CandidatesListRequestExpandItem = "attachments" ) -func NewCandidatesListRequestExpandFromString(s string) (CandidatesListRequestExpand, error) { +func NewCandidatesListRequestExpandItemFromString(s string) (CandidatesListRequestExpandItem, error) { switch s { case "applications": - return CandidatesListRequestExpandApplications, nil - case "applications,attachments": - return CandidatesListRequestExpandApplicationsAttachments, nil + return CandidatesListRequestExpandItemApplications, nil case "attachments": - return CandidatesListRequestExpandAttachments, nil + return CandidatesListRequestExpandItemAttachments, nil } - var t CandidatesListRequestExpand + var t CandidatesListRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (c CandidatesListRequestExpand) Ptr() *CandidatesListRequestExpand { +func (c CandidatesListRequestExpandItem) Ptr() *CandidatesListRequestExpandItem { return &c } -type CandidatesRetrieveRequestExpand string +type CandidatesRetrieveRequestExpandItem string const ( - CandidatesRetrieveRequestExpandApplications CandidatesRetrieveRequestExpand = "applications" - CandidatesRetrieveRequestExpandApplicationsAttachments CandidatesRetrieveRequestExpand = "applications,attachments" - CandidatesRetrieveRequestExpandAttachments CandidatesRetrieveRequestExpand = "attachments" + CandidatesRetrieveRequestExpandItemApplications CandidatesRetrieveRequestExpandItem = "applications" + CandidatesRetrieveRequestExpandItemAttachments CandidatesRetrieveRequestExpandItem = "attachments" ) -func NewCandidatesRetrieveRequestExpandFromString(s string) (CandidatesRetrieveRequestExpand, error) { +func NewCandidatesRetrieveRequestExpandItemFromString(s string) (CandidatesRetrieveRequestExpandItem, error) { switch s { case "applications": - return CandidatesRetrieveRequestExpandApplications, nil - case "applications,attachments": - return CandidatesRetrieveRequestExpandApplicationsAttachments, nil + return CandidatesRetrieveRequestExpandItemApplications, nil case "attachments": - return CandidatesRetrieveRequestExpandAttachments, nil + return CandidatesRetrieveRequestExpandItemAttachments, nil } - var t CandidatesRetrieveRequestExpand + var t CandidatesRetrieveRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (c CandidatesRetrieveRequestExpand) Ptr() *CandidatesRetrieveRequestExpand { +func (c CandidatesRetrieveRequestExpandItem) Ptr() *CandidatesRetrieveRequestExpandItem { return &c } + +// # The Candidate Object +// ### Description +// The `Candidate` object is used to represent profile information about a given Candidate. Because it is specific to a Candidate, this information stays constant across applications. +// ### Usage Example +// Fetch from the `LIST Candidates` endpoint and filter by `ID` to show all candidates. +type CandidateRequest struct { + // The candidate's first name. + FirstName *string `json:"first_name,omitempty" url:"first_name,omitempty"` + // The candidate's last name. + LastName *string `json:"last_name,omitempty" url:"last_name,omitempty"` + // The candidate's current company. + Company *string `json:"company,omitempty" url:"company,omitempty"` + // The candidate's current title. + Title *string `json:"title,omitempty" url:"title,omitempty"` + // When the most recent interaction with the candidate occurred. + LastInteractionAt *time.Time `json:"last_interaction_at,omitempty" url:"last_interaction_at,omitempty"` + // Whether or not the candidate is private. + IsPrivate *bool `json:"is_private,omitempty" url:"is_private,omitempty"` + // Whether or not the candidate can be emailed. + CanEmail *bool `json:"can_email,omitempty" url:"can_email,omitempty"` + // The candidate's locations. + Locations []*string `json:"locations,omitempty" url:"locations,omitempty"` + PhoneNumbers []*PhoneNumberRequest `json:"phone_numbers,omitempty" url:"phone_numbers,omitempty"` + EmailAddresses []*EmailAddressRequest `json:"email_addresses,omitempty" url:"email_addresses,omitempty"` + Urls []*UrlRequest `json:"urls,omitempty" url:"urls,omitempty"` + // Array of `Tag` names as strings. + Tags []*string `json:"tags,omitempty" url:"tags,omitempty"` + // Array of `Application` object IDs. + Applications []*CandidateRequestApplicationsItem `json:"applications,omitempty" url:"applications,omitempty"` + // Array of `Attachment` object IDs. + Attachments []*CandidateRequestAttachmentsItem `json:"attachments,omitempty" url:"attachments,omitempty"` + RemoteTemplateId *string `json:"remote_template_id,omitempty" url:"remote_template_id,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (c *CandidateRequest) GetFirstName() *string { + if c == nil { + return nil + } + return c.FirstName +} + +func (c *CandidateRequest) GetLastName() *string { + if c == nil { + return nil + } + return c.LastName +} + +func (c *CandidateRequest) GetCompany() *string { + if c == nil { + return nil + } + return c.Company +} + +func (c *CandidateRequest) GetTitle() *string { + if c == nil { + return nil + } + return c.Title +} + +func (c *CandidateRequest) GetLastInteractionAt() *time.Time { + if c == nil { + return nil + } + return c.LastInteractionAt +} + +func (c *CandidateRequest) GetIsPrivate() *bool { + if c == nil { + return nil + } + return c.IsPrivate +} + +func (c *CandidateRequest) GetCanEmail() *bool { + if c == nil { + return nil + } + return c.CanEmail +} + +func (c *CandidateRequest) GetLocations() []*string { + if c == nil { + return nil + } + return c.Locations +} + +func (c *CandidateRequest) GetPhoneNumbers() []*PhoneNumberRequest { + if c == nil { + return nil + } + return c.PhoneNumbers +} + +func (c *CandidateRequest) GetEmailAddresses() []*EmailAddressRequest { + if c == nil { + return nil + } + return c.EmailAddresses +} + +func (c *CandidateRequest) GetUrls() []*UrlRequest { + if c == nil { + return nil + } + return c.Urls +} + +func (c *CandidateRequest) GetTags() []*string { + if c == nil { + return nil + } + return c.Tags +} + +func (c *CandidateRequest) GetApplications() []*CandidateRequestApplicationsItem { + if c == nil { + return nil + } + return c.Applications +} + +func (c *CandidateRequest) GetAttachments() []*CandidateRequestAttachmentsItem { + if c == nil { + return nil + } + return c.Attachments +} + +func (c *CandidateRequest) GetRemoteTemplateId() *string { + if c == nil { + return nil + } + return c.RemoteTemplateId +} + +func (c *CandidateRequest) GetIntegrationParams() map[string]interface{} { + if c == nil { + return nil + } + return c.IntegrationParams +} + +func (c *CandidateRequest) GetLinkedAccountParams() map[string]interface{} { + if c == nil { + return nil + } + return c.LinkedAccountParams +} + +func (c *CandidateRequest) GetExtraProperties() map[string]interface{} { + return c.extraProperties +} + +func (c *CandidateRequest) UnmarshalJSON(data []byte) error { + type embed CandidateRequest + var unmarshaler = struct { + embed + LastInteractionAt *internal.DateTime `json:"last_interaction_at,omitempty"` + }{ + embed: embed(*c), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *c = CandidateRequest(unmarshaler.embed) + c.LastInteractionAt = unmarshaler.LastInteractionAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *c) + if err != nil { + return err + } + c.extraProperties = extraProperties + c.rawJSON = json.RawMessage(data) + return nil +} + +func (c *CandidateRequest) MarshalJSON() ([]byte, error) { + type embed CandidateRequest + var marshaler = struct { + embed + LastInteractionAt *internal.DateTime `json:"last_interaction_at,omitempty"` + }{ + embed: embed(*c), + LastInteractionAt: internal.NewOptionalDateTime(c.LastInteractionAt), + } + return json.Marshal(marshaler) +} + +func (c *CandidateRequest) String() string { + if len(c.rawJSON) > 0 { + if value, err := internal.StringifyJSON(c.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(c); err == nil { + return value + } + return fmt.Sprintf("%#v", c) +} + +type CandidateRequestApplicationsItem struct { + String string + Application *Application + + typ string +} + +func (c *CandidateRequestApplicationsItem) GetString() string { + if c == nil { + return "" + } + return c.String +} + +func (c *CandidateRequestApplicationsItem) GetApplication() *Application { + if c == nil { + return nil + } + return c.Application +} + +func (c *CandidateRequestApplicationsItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + c.typ = "String" + c.String = valueString + return nil + } + valueApplication := new(Application) + if err := json.Unmarshal(data, &valueApplication); err == nil { + c.typ = "Application" + c.Application = valueApplication + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, c) +} + +func (c CandidateRequestApplicationsItem) MarshalJSON() ([]byte, error) { + if c.typ == "String" || c.String != "" { + return json.Marshal(c.String) + } + if c.typ == "Application" || c.Application != nil { + return json.Marshal(c.Application) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", c) +} + +type CandidateRequestApplicationsItemVisitor interface { + VisitString(string) error + VisitApplication(*Application) error +} + +func (c *CandidateRequestApplicationsItem) Accept(visitor CandidateRequestApplicationsItemVisitor) error { + if c.typ == "String" || c.String != "" { + return visitor.VisitString(c.String) + } + if c.typ == "Application" || c.Application != nil { + return visitor.VisitApplication(c.Application) + } + return fmt.Errorf("type %T does not include a non-empty union type", c) +} + +type CandidateRequestAttachmentsItem struct { + String string + Attachment *Attachment + + typ string +} + +func (c *CandidateRequestAttachmentsItem) GetString() string { + if c == nil { + return "" + } + return c.String +} + +func (c *CandidateRequestAttachmentsItem) GetAttachment() *Attachment { + if c == nil { + return nil + } + return c.Attachment +} + +func (c *CandidateRequestAttachmentsItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + c.typ = "String" + c.String = valueString + return nil + } + valueAttachment := new(Attachment) + if err := json.Unmarshal(data, &valueAttachment); err == nil { + c.typ = "Attachment" + c.Attachment = valueAttachment + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, c) +} + +func (c CandidateRequestAttachmentsItem) MarshalJSON() ([]byte, error) { + if c.typ == "String" || c.String != "" { + return json.Marshal(c.String) + } + if c.typ == "Attachment" || c.Attachment != nil { + return json.Marshal(c.Attachment) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", c) +} + +type CandidateRequestAttachmentsItemVisitor interface { + VisitString(string) error + VisitAttachment(*Attachment) error +} + +func (c *CandidateRequestAttachmentsItem) Accept(visitor CandidateRequestAttachmentsItemVisitor) error { + if c.typ == "String" || c.String != "" { + return visitor.VisitString(c.String) + } + if c.typ == "Attachment" || c.Attachment != nil { + return visitor.VisitAttachment(c.Attachment) + } + return fmt.Errorf("type %T does not include a non-empty union type", c) +} + +type CandidateResponse struct { + Model *Candidate `json:"model" url:"model"` + Warnings []*WarningValidationProblem `json:"warnings" url:"warnings"` + Errors []*ErrorValidationProblem `json:"errors" url:"errors"` + Logs []*DebugModeLog `json:"logs,omitempty" url:"logs,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (c *CandidateResponse) GetModel() *Candidate { + if c == nil { + return nil + } + return c.Model +} + +func (c *CandidateResponse) GetWarnings() []*WarningValidationProblem { + if c == nil { + return nil + } + return c.Warnings +} + +func (c *CandidateResponse) GetErrors() []*ErrorValidationProblem { + if c == nil { + return nil + } + return c.Errors +} + +func (c *CandidateResponse) GetLogs() []*DebugModeLog { + if c == nil { + return nil + } + return c.Logs +} + +func (c *CandidateResponse) GetExtraProperties() map[string]interface{} { + return c.extraProperties +} + +func (c *CandidateResponse) UnmarshalJSON(data []byte) error { + type unmarshaler CandidateResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *c = CandidateResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *c) + if err != nil { + return err + } + c.extraProperties = extraProperties + c.rawJSON = json.RawMessage(data) + return nil +} + +func (c *CandidateResponse) String() string { + if len(c.rawJSON) > 0 { + if value, err := internal.StringifyJSON(c.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(c); err == nil { + return value + } + return fmt.Sprintf("%#v", c) +} + +// # The EmailAddress Object +// ### Description +// The `EmailAddress` object is used to represent a candidate's email address. +// ### Usage Example +// Fetch from the `GET Candidate` endpoint and view their email addresses. +type EmailAddressRequest struct { + // The email address. + Value *string `json:"value,omitempty" url:"value,omitempty"` + // The type of email address. + // + // * `PERSONAL` - PERSONAL + // * `WORK` - WORK + // * `OTHER` - OTHER + EmailAddressType *EmailAddressRequestEmailAddressType `json:"email_address_type,omitempty" url:"email_address_type,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (e *EmailAddressRequest) GetValue() *string { + if e == nil { + return nil + } + return e.Value +} + +func (e *EmailAddressRequest) GetEmailAddressType() *EmailAddressRequestEmailAddressType { + if e == nil { + return nil + } + return e.EmailAddressType +} + +func (e *EmailAddressRequest) GetIntegrationParams() map[string]interface{} { + if e == nil { + return nil + } + return e.IntegrationParams +} + +func (e *EmailAddressRequest) GetLinkedAccountParams() map[string]interface{} { + if e == nil { + return nil + } + return e.LinkedAccountParams +} + +func (e *EmailAddressRequest) GetExtraProperties() map[string]interface{} { + return e.extraProperties +} + +func (e *EmailAddressRequest) UnmarshalJSON(data []byte) error { + type unmarshaler EmailAddressRequest + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *e = EmailAddressRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *e) + if err != nil { + return err + } + e.extraProperties = extraProperties + e.rawJSON = json.RawMessage(data) + return nil +} + +func (e *EmailAddressRequest) String() string { + if len(e.rawJSON) > 0 { + if value, err := internal.StringifyJSON(e.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(e); err == nil { + return value + } + return fmt.Sprintf("%#v", e) +} + +// The type of email address. +// +// * `PERSONAL` - PERSONAL +// * `WORK` - WORK +// * `OTHER` - OTHER +type EmailAddressRequestEmailAddressType struct { + EmailAddressTypeEnum EmailAddressTypeEnum + String string + + typ string +} + +func (e *EmailAddressRequestEmailAddressType) GetEmailAddressTypeEnum() EmailAddressTypeEnum { + if e == nil { + return "" + } + return e.EmailAddressTypeEnum +} + +func (e *EmailAddressRequestEmailAddressType) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *EmailAddressRequestEmailAddressType) UnmarshalJSON(data []byte) error { + var valueEmailAddressTypeEnum EmailAddressTypeEnum + if err := json.Unmarshal(data, &valueEmailAddressTypeEnum); err == nil { + e.typ = "EmailAddressTypeEnum" + e.EmailAddressTypeEnum = valueEmailAddressTypeEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e EmailAddressRequestEmailAddressType) MarshalJSON() ([]byte, error) { + if e.typ == "EmailAddressTypeEnum" || e.EmailAddressTypeEnum != "" { + return json.Marshal(e.EmailAddressTypeEnum) + } + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type EmailAddressRequestEmailAddressTypeVisitor interface { + VisitEmailAddressTypeEnum(EmailAddressTypeEnum) error + VisitString(string) error +} + +func (e *EmailAddressRequestEmailAddressType) Accept(visitor EmailAddressRequestEmailAddressTypeVisitor) error { + if e.typ == "EmailAddressTypeEnum" || e.EmailAddressTypeEnum != "" { + return visitor.VisitEmailAddressTypeEnum(e.EmailAddressTypeEnum) + } + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type IgnoreCommonModelRequest struct { + Reason *IgnoreCommonModelRequestReason `json:"reason" url:"reason"` + Message *string `json:"message,omitempty" url:"message,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (i *IgnoreCommonModelRequest) GetReason() *IgnoreCommonModelRequestReason { + if i == nil { + return nil + } + return i.Reason +} + +func (i *IgnoreCommonModelRequest) GetMessage() *string { + if i == nil { + return nil + } + return i.Message +} + +func (i *IgnoreCommonModelRequest) GetExtraProperties() map[string]interface{} { + return i.extraProperties +} + +func (i *IgnoreCommonModelRequest) UnmarshalJSON(data []byte) error { + type unmarshaler IgnoreCommonModelRequest + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *i = IgnoreCommonModelRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *i) + if err != nil { + return err + } + i.extraProperties = extraProperties + i.rawJSON = json.RawMessage(data) + return nil +} + +func (i *IgnoreCommonModelRequest) String() string { + if len(i.rawJSON) > 0 { + if value, err := internal.StringifyJSON(i.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(i); err == nil { + return value + } + return fmt.Sprintf("%#v", i) +} + +type IgnoreCommonModelRequestReason struct { + ReasonEnum ReasonEnum + String string + + typ string +} + +func (i *IgnoreCommonModelRequestReason) GetReasonEnum() ReasonEnum { + if i == nil { + return "" + } + return i.ReasonEnum +} + +func (i *IgnoreCommonModelRequestReason) GetString() string { + if i == nil { + return "" + } + return i.String +} + +func (i *IgnoreCommonModelRequestReason) UnmarshalJSON(data []byte) error { + var valueReasonEnum ReasonEnum + if err := json.Unmarshal(data, &valueReasonEnum); err == nil { + i.typ = "ReasonEnum" + i.ReasonEnum = valueReasonEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + i.typ = "String" + i.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) +} + +func (i IgnoreCommonModelRequestReason) MarshalJSON() ([]byte, error) { + if i.typ == "ReasonEnum" || i.ReasonEnum != "" { + return json.Marshal(i.ReasonEnum) + } + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) +} + +type IgnoreCommonModelRequestReasonVisitor interface { + VisitReasonEnum(ReasonEnum) error + VisitString(string) error +} + +func (i *IgnoreCommonModelRequestReason) Accept(visitor IgnoreCommonModelRequestReasonVisitor) error { + if i.typ == "ReasonEnum" || i.ReasonEnum != "" { + return visitor.VisitReasonEnum(i.ReasonEnum) + } + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", i) +} + +type PaginatedCandidateList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Candidate `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedCandidateList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedCandidateList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedCandidateList) GetResults() []*Candidate { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedCandidateList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedCandidateList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedCandidateList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedCandidateList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedCandidateList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +// # The Candidate Object +// ### Description +// The `Candidate` object is used to represent profile information about a given Candidate. Because it is specific to a Candidate, this information stays constant across applications. +// ### Usage Example +// Fetch from the `LIST Candidates` endpoint and filter by `ID` to show all candidates. +type PatchedCandidateRequest struct { + // The candidate's first name. + FirstName *string `json:"first_name,omitempty" url:"first_name,omitempty"` + // The candidate's last name. + LastName *string `json:"last_name,omitempty" url:"last_name,omitempty"` + // The candidate's current company. + Company *string `json:"company,omitempty" url:"company,omitempty"` + // The candidate's current title. + Title *string `json:"title,omitempty" url:"title,omitempty"` + // When the most recent interaction with the candidate occurred. + LastInteractionAt *time.Time `json:"last_interaction_at,omitempty" url:"last_interaction_at,omitempty"` + // Whether or not the candidate is private. + IsPrivate *bool `json:"is_private,omitempty" url:"is_private,omitempty"` + // Whether or not the candidate can be emailed. + CanEmail *bool `json:"can_email,omitempty" url:"can_email,omitempty"` + // The candidate's locations. + Locations []*string `json:"locations,omitempty" url:"locations,omitempty"` + PhoneNumbers []*PhoneNumberRequest `json:"phone_numbers,omitempty" url:"phone_numbers,omitempty"` + EmailAddresses []*EmailAddressRequest `json:"email_addresses,omitempty" url:"email_addresses,omitempty"` + Urls []*UrlRequest `json:"urls,omitempty" url:"urls,omitempty"` + // Array of `Tag` names as strings. + Tags []*string `json:"tags,omitempty" url:"tags,omitempty"` + // Array of `Application` object IDs. + Applications []*string `json:"applications,omitempty" url:"applications,omitempty"` + // Array of `Attachment` object IDs. + Attachments []*string `json:"attachments,omitempty" url:"attachments,omitempty"` + RemoteTemplateId *string `json:"remote_template_id,omitempty" url:"remote_template_id,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PatchedCandidateRequest) GetFirstName() *string { + if p == nil { + return nil + } + return p.FirstName +} + +func (p *PatchedCandidateRequest) GetLastName() *string { + if p == nil { + return nil + } + return p.LastName +} + +func (p *PatchedCandidateRequest) GetCompany() *string { + if p == nil { + return nil + } + return p.Company +} + +func (p *PatchedCandidateRequest) GetTitle() *string { + if p == nil { + return nil + } + return p.Title +} + +func (p *PatchedCandidateRequest) GetLastInteractionAt() *time.Time { + if p == nil { + return nil + } + return p.LastInteractionAt +} + +func (p *PatchedCandidateRequest) GetIsPrivate() *bool { + if p == nil { + return nil + } + return p.IsPrivate +} + +func (p *PatchedCandidateRequest) GetCanEmail() *bool { + if p == nil { + return nil + } + return p.CanEmail +} + +func (p *PatchedCandidateRequest) GetLocations() []*string { + if p == nil { + return nil + } + return p.Locations +} + +func (p *PatchedCandidateRequest) GetPhoneNumbers() []*PhoneNumberRequest { + if p == nil { + return nil + } + return p.PhoneNumbers +} + +func (p *PatchedCandidateRequest) GetEmailAddresses() []*EmailAddressRequest { + if p == nil { + return nil + } + return p.EmailAddresses +} + +func (p *PatchedCandidateRequest) GetUrls() []*UrlRequest { + if p == nil { + return nil + } + return p.Urls +} + +func (p *PatchedCandidateRequest) GetTags() []*string { + if p == nil { + return nil + } + return p.Tags +} + +func (p *PatchedCandidateRequest) GetApplications() []*string { + if p == nil { + return nil + } + return p.Applications +} + +func (p *PatchedCandidateRequest) GetAttachments() []*string { + if p == nil { + return nil + } + return p.Attachments +} + +func (p *PatchedCandidateRequest) GetRemoteTemplateId() *string { + if p == nil { + return nil + } + return p.RemoteTemplateId +} + +func (p *PatchedCandidateRequest) GetIntegrationParams() map[string]interface{} { + if p == nil { + return nil + } + return p.IntegrationParams +} + +func (p *PatchedCandidateRequest) GetLinkedAccountParams() map[string]interface{} { + if p == nil { + return nil + } + return p.LinkedAccountParams +} + +func (p *PatchedCandidateRequest) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PatchedCandidateRequest) UnmarshalJSON(data []byte) error { + type embed PatchedCandidateRequest + var unmarshaler = struct { + embed + LastInteractionAt *internal.DateTime `json:"last_interaction_at,omitempty"` + }{ + embed: embed(*p), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *p = PatchedCandidateRequest(unmarshaler.embed) + p.LastInteractionAt = unmarshaler.LastInteractionAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PatchedCandidateRequest) MarshalJSON() ([]byte, error) { + type embed PatchedCandidateRequest + var marshaler = struct { + embed + LastInteractionAt *internal.DateTime `json:"last_interaction_at,omitempty"` + }{ + embed: embed(*p), + LastInteractionAt: internal.NewOptionalDateTime(p.LastInteractionAt), + } + return json.Marshal(marshaler) +} + +func (p *PatchedCandidateRequest) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +// # The PhoneNumber Object +// ### Description +// The `PhoneNumber` object is used to represent a candidate's phone number. +// ### Usage Example +// Fetch from the `GET Candidate` endpoint and view their phone numbers. +type PhoneNumberRequest struct { + // The phone number. + Value *string `json:"value,omitempty" url:"value,omitempty"` + // The type of phone number. + // + // * `HOME` - HOME + // * `WORK` - WORK + // * `MOBILE` - MOBILE + // * `SKYPE` - SKYPE + // * `OTHER` - OTHER + PhoneNumberType *PhoneNumberRequestPhoneNumberType `json:"phone_number_type,omitempty" url:"phone_number_type,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PhoneNumberRequest) GetValue() *string { + if p == nil { + return nil + } + return p.Value +} + +func (p *PhoneNumberRequest) GetPhoneNumberType() *PhoneNumberRequestPhoneNumberType { + if p == nil { + return nil + } + return p.PhoneNumberType +} + +func (p *PhoneNumberRequest) GetIntegrationParams() map[string]interface{} { + if p == nil { + return nil + } + return p.IntegrationParams +} + +func (p *PhoneNumberRequest) GetLinkedAccountParams() map[string]interface{} { + if p == nil { + return nil + } + return p.LinkedAccountParams +} + +func (p *PhoneNumberRequest) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PhoneNumberRequest) UnmarshalJSON(data []byte) error { + type unmarshaler PhoneNumberRequest + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PhoneNumberRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PhoneNumberRequest) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +// The type of phone number. +// +// * `HOME` - HOME +// * `WORK` - WORK +// * `MOBILE` - MOBILE +// * `SKYPE` - SKYPE +// * `OTHER` - OTHER +type PhoneNumberRequestPhoneNumberType struct { + PhoneNumberTypeEnum PhoneNumberTypeEnum + String string + + typ string +} + +func (p *PhoneNumberRequestPhoneNumberType) GetPhoneNumberTypeEnum() PhoneNumberTypeEnum { + if p == nil { + return "" + } + return p.PhoneNumberTypeEnum +} + +func (p *PhoneNumberRequestPhoneNumberType) GetString() string { + if p == nil { + return "" + } + return p.String +} + +func (p *PhoneNumberRequestPhoneNumberType) UnmarshalJSON(data []byte) error { + var valuePhoneNumberTypeEnum PhoneNumberTypeEnum + if err := json.Unmarshal(data, &valuePhoneNumberTypeEnum); err == nil { + p.typ = "PhoneNumberTypeEnum" + p.PhoneNumberTypeEnum = valuePhoneNumberTypeEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + p.typ = "String" + p.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, p) +} + +func (p PhoneNumberRequestPhoneNumberType) MarshalJSON() ([]byte, error) { + if p.typ == "PhoneNumberTypeEnum" || p.PhoneNumberTypeEnum != "" { + return json.Marshal(p.PhoneNumberTypeEnum) + } + if p.typ == "String" || p.String != "" { + return json.Marshal(p.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) +} + +type PhoneNumberRequestPhoneNumberTypeVisitor interface { + VisitPhoneNumberTypeEnum(PhoneNumberTypeEnum) error + VisitString(string) error +} + +func (p *PhoneNumberRequestPhoneNumberType) Accept(visitor PhoneNumberRequestPhoneNumberTypeVisitor) error { + if p.typ == "PhoneNumberTypeEnum" || p.PhoneNumberTypeEnum != "" { + return visitor.VisitPhoneNumberTypeEnum(p.PhoneNumberTypeEnum) + } + if p.typ == "String" || p.String != "" { + return visitor.VisitString(p.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", p) +} + +// * `GENERAL_CUSTOMER_REQUEST` - GENERAL_CUSTOMER_REQUEST +// * `GDPR` - GDPR +// * `OTHER` - OTHER +type ReasonEnum string + +const ( + ReasonEnumGeneralCustomerRequest ReasonEnum = "GENERAL_CUSTOMER_REQUEST" + ReasonEnumGdpr ReasonEnum = "GDPR" + ReasonEnumOther ReasonEnum = "OTHER" +) + +func NewReasonEnumFromString(s string) (ReasonEnum, error) { + switch s { + case "GENERAL_CUSTOMER_REQUEST": + return ReasonEnumGeneralCustomerRequest, nil + case "GDPR": + return ReasonEnumGdpr, nil + case "OTHER": + return ReasonEnumOther, nil + } + var t ReasonEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (r ReasonEnum) Ptr() *ReasonEnum { + return &r +} + +// # The Url Object +// ### Description +// The `Url` object is used to represent hyperlinks associated with the parent model. +// ### Usage Example +// Fetch from the `GET Candidate` endpoint and view their website urls. +type UrlRequest struct { + // The site's url. + Value *string `json:"value,omitempty" url:"value,omitempty"` + // The type of site. + // + // * `PERSONAL` - PERSONAL + // * `COMPANY` - COMPANY + // * `PORTFOLIO` - PORTFOLIO + // * `BLOG` - BLOG + // * `SOCIAL_MEDIA` - SOCIAL_MEDIA + // * `OTHER` - OTHER + // * `JOB_POSTING` - JOB_POSTING + UrlType *UrlRequestUrlType `json:"url_type,omitempty" url:"url_type,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (u *UrlRequest) GetValue() *string { + if u == nil { + return nil + } + return u.Value +} + +func (u *UrlRequest) GetUrlType() *UrlRequestUrlType { + if u == nil { + return nil + } + return u.UrlType +} + +func (u *UrlRequest) GetIntegrationParams() map[string]interface{} { + if u == nil { + return nil + } + return u.IntegrationParams +} + +func (u *UrlRequest) GetLinkedAccountParams() map[string]interface{} { + if u == nil { + return nil + } + return u.LinkedAccountParams +} + +func (u *UrlRequest) GetExtraProperties() map[string]interface{} { + return u.extraProperties +} + +func (u *UrlRequest) UnmarshalJSON(data []byte) error { + type unmarshaler UrlRequest + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *u = UrlRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *u) + if err != nil { + return err + } + u.extraProperties = extraProperties + u.rawJSON = json.RawMessage(data) + return nil +} + +func (u *UrlRequest) String() string { + if len(u.rawJSON) > 0 { + if value, err := internal.StringifyJSON(u.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(u); err == nil { + return value + } + return fmt.Sprintf("%#v", u) +} + +// The type of site. +// +// * `PERSONAL` - PERSONAL +// * `COMPANY` - COMPANY +// * `PORTFOLIO` - PORTFOLIO +// * `BLOG` - BLOG +// * `SOCIAL_MEDIA` - SOCIAL_MEDIA +// * `OTHER` - OTHER +// * `JOB_POSTING` - JOB_POSTING +type UrlRequestUrlType struct { + UrlTypeEnum UrlTypeEnum + String string + + typ string +} + +func (u *UrlRequestUrlType) GetUrlTypeEnum() UrlTypeEnum { + if u == nil { + return "" + } + return u.UrlTypeEnum +} + +func (u *UrlRequestUrlType) GetString() string { + if u == nil { + return "" + } + return u.String +} + +func (u *UrlRequestUrlType) UnmarshalJSON(data []byte) error { + var valueUrlTypeEnum UrlTypeEnum + if err := json.Unmarshal(data, &valueUrlTypeEnum); err == nil { + u.typ = "UrlTypeEnum" + u.UrlTypeEnum = valueUrlTypeEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + u.typ = "String" + u.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, u) +} + +func (u UrlRequestUrlType) MarshalJSON() ([]byte, error) { + if u.typ == "UrlTypeEnum" || u.UrlTypeEnum != "" { + return json.Marshal(u.UrlTypeEnum) + } + if u.typ == "String" || u.String != "" { + return json.Marshal(u.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", u) +} + +type UrlRequestUrlTypeVisitor interface { + VisitUrlTypeEnum(UrlTypeEnum) error + VisitString(string) error +} + +func (u *UrlRequestUrlType) Accept(visitor UrlRequestUrlTypeVisitor) error { + if u.typ == "UrlTypeEnum" || u.UrlTypeEnum != "" { + return visitor.VisitUrlTypeEnum(u.UrlTypeEnum) + } + if u.typ == "String" || u.String != "" { + return visitor.VisitString(u.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", u) +} diff --git a/ats/candidates/client.go b/ats/candidates/client.go index 89071db..6b1c6cd 100644 --- a/ats/candidates/client.go +++ b/ats/candidates/client.go @@ -1,136 +1,135 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package candidates import ( context "context" fmt "fmt" - ats "github.com/merge-api/merge-go-client/ats" - core "github.com/merge-api/merge-go-client/core" + ats "github.com/merge-api/merge-go-client/v2/ats" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `Candidate` objects. -func (c *Client) List(ctx context.Context, request *ats.CandidatesListRequest) (*ats.PaginatedCandidateList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ats/v1/candidates" - - queryParams := make(url.Values) - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.EmailAddresses != nil { - queryParams.Add("email_addresses", fmt.Sprintf("%v", *request.EmailAddresses)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.FirstName != nil { - queryParams.Add("first_name", fmt.Sprintf("%v", *request.FirstName)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.LastName != nil { - queryParams.Add("last_name", fmt.Sprintf("%v", *request.LastName)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if request.Tags != nil { - queryParams.Add("tags", fmt.Sprintf("%v", *request.Tags)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *ats.PaginatedCandidateList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *ats.CandidatesListRequest, + opts ...option.RequestOption, +) (*core.Page[*ats.Candidate], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ats/v1/candidates" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *ats.PaginatedCandidateList) *internal.PageResponse[*string, *ats.Candidate] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *ats.Candidate]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Creates a `Candidate` object with the given values. -func (c *Client) Create(ctx context.Context, request *ats.CandidateEndpointRequest) (*ats.CandidateResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ats/v1/candidates" - - queryParams := make(url.Values) - if request.IsDebugMode != nil { - queryParams.Add("is_debug_mode", fmt.Sprintf("%v", *request.IsDebugMode)) - } - if request.RunAsync != nil { - queryParams.Add("run_async", fmt.Sprintf("%v", *request.RunAsync)) +func (c *Client) Create( + ctx context.Context, + request *ats.CandidateEndpointRequest, + opts ...option.RequestOption, +) (*ats.CandidateResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ats/v1/candidates" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *ats.CandidateResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -139,32 +138,46 @@ func (c *Client) Create(ctx context.Context, request *ats.CandidateEndpointReque } // Returns a `Candidate` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *ats.CandidatesRetrieveRequest) (*ats.Candidate, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"ats/v1/candidates/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *ats.CandidatesRetrieveRequest, + opts ...option.RequestOption, +) (*ats.Candidate, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/ats/v1/candidates/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ats.Candidate if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -173,33 +186,48 @@ func (c *Client) Retrieve(ctx context.Context, id string, request *ats.Candidate } // Updates a `Candidate` object with the given `id`. -func (c *Client) PartialUpdate(ctx context.Context, id string, request *ats.PatchedCandidateEndpointRequest) (*ats.CandidateResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"ats/v1/candidates/%v", id) - - queryParams := make(url.Values) - if request.IsDebugMode != nil { - queryParams.Add("is_debug_mode", fmt.Sprintf("%v", *request.IsDebugMode)) - } - if request.RunAsync != nil { - queryParams.Add("run_async", fmt.Sprintf("%v", *request.RunAsync)) +func (c *Client) PartialUpdate( + ctx context.Context, + id string, + request *ats.PatchedCandidateEndpointRequest, + opts ...option.RequestOption, +) (*ats.CandidateResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/ats/v1/candidates/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *ats.CandidateResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPatch, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPatch, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -208,20 +236,39 @@ func (c *Client) PartialUpdate(ctx context.Context, id string, request *ats.Patc } // Ignores a specific row based on the `model_id` in the url. These records will have their properties set to null, and will not be updated in future syncs. The "reason" and "message" fields in the request body will be stored for audit purposes. -func (c *Client) IgnoreCreate(ctx context.Context, modelId string, request *ats.IgnoreCommonModelRequest) error { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"ats/v1/candidates/ignore/%v", modelId) +func (c *Client) IgnoreCreate( + ctx context.Context, + modelId string, + request *ats.IgnoreCommonModelRequest, + opts ...option.RequestOption, +) error { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/ats/v1/candidates/ignore/%v", + modelId, + ) + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, }, ); err != nil { return err @@ -230,21 +277,38 @@ func (c *Client) IgnoreCreate(ctx context.Context, modelId string, request *ats. } // Returns metadata for `Candidate` PATCHs. -func (c *Client) MetaPatchRetrieve(ctx context.Context, id string) (*ats.MetaResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"ats/v1/candidates/meta/patch/%v", id) +func (c *Client) MetaPatchRetrieve( + ctx context.Context, + id string, + opts ...option.RequestOption, +) (*ats.MetaResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/ats/v1/candidates/meta/patch/%v", + id, + ) + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ats.MetaResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -253,21 +317,34 @@ func (c *Client) MetaPatchRetrieve(ctx context.Context, id string) (*ats.MetaRes } // Returns metadata for `Candidate` POSTs. -func (c *Client) MetaPostRetrieve(ctx context.Context) (*ats.MetaResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ats/v1/candidates/meta/post" +func (c *Client) MetaPostRetrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*ats.MetaResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ats/v1/candidates/meta/post" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ats.MetaResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/ats/client/client.go b/ats/client/client.go index cb5e47d..6b44413 100644 --- a/ats/client/client.go +++ b/ats/client/client.go @@ -1,48 +1,50 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package client import ( - accountdetails "github.com/merge-api/merge-go-client/ats/accountdetails" - accounttoken "github.com/merge-api/merge-go-client/ats/accounttoken" - activities "github.com/merge-api/merge-go-client/ats/activities" - applications "github.com/merge-api/merge-go-client/ats/applications" - asyncpassthrough "github.com/merge-api/merge-go-client/ats/asyncpassthrough" - attachments "github.com/merge-api/merge-go-client/ats/attachments" - audittrail "github.com/merge-api/merge-go-client/ats/audittrail" - availableactions "github.com/merge-api/merge-go-client/ats/availableactions" - candidates "github.com/merge-api/merge-go-client/ats/candidates" - deleteaccount "github.com/merge-api/merge-go-client/ats/deleteaccount" - departments "github.com/merge-api/merge-go-client/ats/departments" - eeocs "github.com/merge-api/merge-go-client/ats/eeocs" - fieldmapping "github.com/merge-api/merge-go-client/ats/fieldmapping" - forceresync "github.com/merge-api/merge-go-client/ats/forceresync" - generatekey "github.com/merge-api/merge-go-client/ats/generatekey" - interviews "github.com/merge-api/merge-go-client/ats/interviews" - issues "github.com/merge-api/merge-go-client/ats/issues" - jobinterviewstages "github.com/merge-api/merge-go-client/ats/jobinterviewstages" - jobpostings "github.com/merge-api/merge-go-client/ats/jobpostings" - jobs "github.com/merge-api/merge-go-client/ats/jobs" - linkedaccounts "github.com/merge-api/merge-go-client/ats/linkedaccounts" - linktoken "github.com/merge-api/merge-go-client/ats/linktoken" - offers "github.com/merge-api/merge-go-client/ats/offers" - offices "github.com/merge-api/merge-go-client/ats/offices" - passthrough "github.com/merge-api/merge-go-client/ats/passthrough" - regeneratekey "github.com/merge-api/merge-go-client/ats/regeneratekey" - rejectreasons "github.com/merge-api/merge-go-client/ats/rejectreasons" - scopes "github.com/merge-api/merge-go-client/ats/scopes" - scorecards "github.com/merge-api/merge-go-client/ats/scorecards" - syncstatus "github.com/merge-api/merge-go-client/ats/syncstatus" - tags "github.com/merge-api/merge-go-client/ats/tags" - users "github.com/merge-api/merge-go-client/ats/users" - webhookreceivers "github.com/merge-api/merge-go-client/ats/webhookreceivers" - core "github.com/merge-api/merge-go-client/core" + accountdetails "github.com/merge-api/merge-go-client/v2/ats/accountdetails" + accounttoken "github.com/merge-api/merge-go-client/v2/ats/accounttoken" + activities "github.com/merge-api/merge-go-client/v2/ats/activities" + applications "github.com/merge-api/merge-go-client/v2/ats/applications" + asyncpassthrough "github.com/merge-api/merge-go-client/v2/ats/asyncpassthrough" + attachments "github.com/merge-api/merge-go-client/v2/ats/attachments" + audittrail "github.com/merge-api/merge-go-client/v2/ats/audittrail" + availableactions "github.com/merge-api/merge-go-client/v2/ats/availableactions" + candidates "github.com/merge-api/merge-go-client/v2/ats/candidates" + deleteaccount "github.com/merge-api/merge-go-client/v2/ats/deleteaccount" + departments "github.com/merge-api/merge-go-client/v2/ats/departments" + eeocs "github.com/merge-api/merge-go-client/v2/ats/eeocs" + fieldmapping "github.com/merge-api/merge-go-client/v2/ats/fieldmapping" + forceresync "github.com/merge-api/merge-go-client/v2/ats/forceresync" + generatekey "github.com/merge-api/merge-go-client/v2/ats/generatekey" + interviews "github.com/merge-api/merge-go-client/v2/ats/interviews" + issues "github.com/merge-api/merge-go-client/v2/ats/issues" + jobinterviewstages "github.com/merge-api/merge-go-client/v2/ats/jobinterviewstages" + jobpostings "github.com/merge-api/merge-go-client/v2/ats/jobpostings" + jobs "github.com/merge-api/merge-go-client/v2/ats/jobs" + linkedaccounts "github.com/merge-api/merge-go-client/v2/ats/linkedaccounts" + linktoken "github.com/merge-api/merge-go-client/v2/ats/linktoken" + offers "github.com/merge-api/merge-go-client/v2/ats/offers" + offices "github.com/merge-api/merge-go-client/v2/ats/offices" + passthrough "github.com/merge-api/merge-go-client/v2/ats/passthrough" + regeneratekey "github.com/merge-api/merge-go-client/v2/ats/regeneratekey" + rejectreasons "github.com/merge-api/merge-go-client/v2/ats/rejectreasons" + scopes "github.com/merge-api/merge-go-client/v2/ats/scopes" + scorecards "github.com/merge-api/merge-go-client/v2/ats/scorecards" + syncstatus "github.com/merge-api/merge-go-client/v2/ats/syncstatus" + tags "github.com/merge-api/merge-go-client/v2/ats/tags" + users "github.com/merge-api/merge-go-client/v2/ats/users" + webhookreceivers "github.com/merge-api/merge-go-client/v2/ats/webhookreceivers" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header AccountDetails *accountdetails.Client @@ -80,14 +82,16 @@ type Client struct { WebhookReceivers *webhookreceivers.Client } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ - baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), + baseURL: options.BaseURL, + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), header: options.ToHeader(), AccountDetails: accountdetails.NewClient(opts...), AccountToken: accounttoken.NewClient(opts...), diff --git a/ats/deleteaccount/client.go b/ats/deleteaccount/client.go index 42b4669..718d73c 100644 --- a/ats/deleteaccount/client.go +++ b/ats/deleteaccount/client.go @@ -1,45 +1,62 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package deleteaccount import ( context "context" - core "github.com/merge-api/merge-go-client/core" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Delete a linked account. -func (c *Client) Delete(ctx context.Context) error { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ats/v1/delete-account" +func (c *Client) Delete( + ctx context.Context, + opts ...option.RequestOption, +) error { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ats/v1/delete-account" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, }, ); err != nil { return err diff --git a/ats/departments.go b/ats/departments.go index 664b0ea..79c58cb 100644 --- a/ats/departments.go +++ b/ats/departments.go @@ -1,35 +1,102 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package ats import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type DepartmentsListRequest struct { // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` } type DepartmentsRetrieveRequest struct { // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` +} + +type PaginatedDepartmentList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Department `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedDepartmentList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedDepartmentList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedDepartmentList) GetResults() []*Department { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedDepartmentList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedDepartmentList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedDepartmentList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedDepartmentList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedDepartmentList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) } diff --git a/ats/departments/client.go b/ats/departments/client.go index 8a2e1cd..347fe5c 100644 --- a/ats/departments/client.go +++ b/ats/departments/client.go @@ -1,117 +1,137 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package departments import ( context "context" fmt "fmt" - ats "github.com/merge-api/merge-go-client/ats" - core "github.com/merge-api/merge-go-client/core" + ats "github.com/merge-api/merge-go-client/v2/ats" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `Department` objects. -func (c *Client) List(ctx context.Context, request *ats.DepartmentsListRequest) (*ats.PaginatedDepartmentList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ats/v1/departments" - - queryParams := make(url.Values) - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *ats.PaginatedDepartmentList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *ats.DepartmentsListRequest, + opts ...option.RequestOption, +) (*core.Page[*ats.Department], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ats/v1/departments" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *ats.PaginatedDepartmentList) *internal.PageResponse[*string, *ats.Department] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *ats.Department]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Returns a `Department` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *ats.DepartmentsRetrieveRequest) (*ats.Department, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"ats/v1/departments/%v", id) - - queryParams := make(url.Values) - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *ats.DepartmentsRetrieveRequest, + opts ...option.RequestOption, +) (*ats.Department, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/ats/v1/departments/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ats.Department if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/ats/eeocs.go b/ats/eeocs.go index c0bf6b3..4eb6602 100644 --- a/ats/eeocs.go +++ b/ats/eeocs.go @@ -1,52 +1,56 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package ats import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type EeocsListRequest struct { // If provided, will only return EEOC info for this candidate. - CandidateId *string `json:"-"` + CandidateId *string `json:"-" url:"candidate_id,omitempty"` // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *string `json:"-"` + Expand []*string `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // Deprecated. Use show_enum_origins. - RemoteFields *EeocsListRequestRemoteFields `json:"-"` + RemoteFields *EeocsListRequestRemoteFields `json:"-" url:"remote_fields,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` // 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) - ShowEnumOrigins *EeocsListRequestShowEnumOrigins `json:"-"` + ShowEnumOrigins *EeocsListRequestShowEnumOrigins `json:"-" url:"show_enum_origins,omitempty"` } type EeocsRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *string `json:"-"` + Expand []*string `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // Deprecated. Use show_enum_origins. - RemoteFields *EeocsRetrieveRequestRemoteFields `json:"-"` + RemoteFields *EeocsRetrieveRequestRemoteFields `json:"-" url:"remote_fields,omitempty"` // 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) - ShowEnumOrigins *EeocsRetrieveRequestShowEnumOrigins `json:"-"` + ShowEnumOrigins *EeocsRetrieveRequestShowEnumOrigins `json:"-" url:"show_enum_origins,omitempty"` } type EeocsListRequestRemoteFields string @@ -292,3 +296,749 @@ func NewEeocsRetrieveRequestShowEnumOriginsFromString(s string) (EeocsRetrieveRe func (e EeocsRetrieveRequestShowEnumOrigins) Ptr() *EeocsRetrieveRequestShowEnumOrigins { return &e } + +// * `YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY` - YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY +// * `NO_I_DONT_HAVE_A_DISABILITY` - NO_I_DONT_HAVE_A_DISABILITY +// * `I_DONT_WISH_TO_ANSWER` - I_DONT_WISH_TO_ANSWER +type DisabilityStatusEnum string + +const ( + DisabilityStatusEnumYesIHaveADisabilityOrPreviouslyHadADisability DisabilityStatusEnum = "YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY" + DisabilityStatusEnumNoIDontHaveADisability DisabilityStatusEnum = "NO_I_DONT_HAVE_A_DISABILITY" + DisabilityStatusEnumIDontWishToAnswer DisabilityStatusEnum = "I_DONT_WISH_TO_ANSWER" +) + +func NewDisabilityStatusEnumFromString(s string) (DisabilityStatusEnum, error) { + switch s { + case "YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY": + return DisabilityStatusEnumYesIHaveADisabilityOrPreviouslyHadADisability, nil + case "NO_I_DONT_HAVE_A_DISABILITY": + return DisabilityStatusEnumNoIDontHaveADisability, nil + case "I_DONT_WISH_TO_ANSWER": + return DisabilityStatusEnumIDontWishToAnswer, nil + } + var t DisabilityStatusEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (d DisabilityStatusEnum) Ptr() *DisabilityStatusEnum { + return &d +} + +// # The EEOC Object +// ### Description +// The `EEOC` object is used to represent the Equal Employment Opportunity Commission information for a candidate (race, gender, veteran status, disability status). +// ### Usage Example +// Fetch from the `LIST EEOCs` endpoint and filter by `candidate` to show all EEOC information for a candidate. +type Eeoc struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The candidate being represented. + Candidate *EeocCandidate `json:"candidate,omitempty" url:"candidate,omitempty"` + // When the information was submitted. + SubmittedAt *time.Time `json:"submitted_at,omitempty" url:"submitted_at,omitempty"` + // The candidate's race. + // + // * `AMERICAN_INDIAN_OR_ALASKAN_NATIVE` - AMERICAN_INDIAN_OR_ALASKAN_NATIVE + // * `ASIAN` - ASIAN + // * `BLACK_OR_AFRICAN_AMERICAN` - BLACK_OR_AFRICAN_AMERICAN + // * `HISPANIC_OR_LATINO` - HISPANIC_OR_LATINO + // * `WHITE` - WHITE + // * `NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER` - NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER + // * `TWO_OR_MORE_RACES` - TWO_OR_MORE_RACES + // * `DECLINE_TO_SELF_IDENTIFY` - DECLINE_TO_SELF_IDENTIFY + Race *EeocRace `json:"race,omitempty" url:"race,omitempty"` + // The candidate's gender. + // + // * `MALE` - MALE + // * `FEMALE` - FEMALE + // * `NON-BINARY` - NON-BINARY + // * `OTHER` - OTHER + // * `DECLINE_TO_SELF_IDENTIFY` - DECLINE_TO_SELF_IDENTIFY + Gender *EeocGender `json:"gender,omitempty" url:"gender,omitempty"` + // The candidate's veteran status. + // + // * `I_AM_NOT_A_PROTECTED_VETERAN` - I_AM_NOT_A_PROTECTED_VETERAN + // * `I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN` - I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN + // * `I_DONT_WISH_TO_ANSWER` - I_DONT_WISH_TO_ANSWER + VeteranStatus *EeocVeteranStatus `json:"veteran_status,omitempty" url:"veteran_status,omitempty"` + // The candidate's disability status. + // + // * `YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY` - YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY + // * `NO_I_DONT_HAVE_A_DISABILITY` - NO_I_DONT_HAVE_A_DISABILITY + // * `I_DONT_WISH_TO_ANSWER` - I_DONT_WISH_TO_ANSWER + DisabilityStatus *EeocDisabilityStatus `json:"disability_status,omitempty" url:"disability_status,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (e *Eeoc) GetId() *string { + if e == nil { + return nil + } + return e.Id +} + +func (e *Eeoc) GetRemoteId() *string { + if e == nil { + return nil + } + return e.RemoteId +} + +func (e *Eeoc) GetCreatedAt() *time.Time { + if e == nil { + return nil + } + return e.CreatedAt +} + +func (e *Eeoc) GetModifiedAt() *time.Time { + if e == nil { + return nil + } + return e.ModifiedAt +} + +func (e *Eeoc) GetCandidate() *EeocCandidate { + if e == nil { + return nil + } + return e.Candidate +} + +func (e *Eeoc) GetSubmittedAt() *time.Time { + if e == nil { + return nil + } + return e.SubmittedAt +} + +func (e *Eeoc) GetRace() *EeocRace { + if e == nil { + return nil + } + return e.Race +} + +func (e *Eeoc) GetGender() *EeocGender { + if e == nil { + return nil + } + return e.Gender +} + +func (e *Eeoc) GetVeteranStatus() *EeocVeteranStatus { + if e == nil { + return nil + } + return e.VeteranStatus +} + +func (e *Eeoc) GetDisabilityStatus() *EeocDisabilityStatus { + if e == nil { + return nil + } + return e.DisabilityStatus +} + +func (e *Eeoc) GetRemoteWasDeleted() *bool { + if e == nil { + return nil + } + return e.RemoteWasDeleted +} + +func (e *Eeoc) GetFieldMappings() map[string]interface{} { + if e == nil { + return nil + } + return e.FieldMappings +} + +func (e *Eeoc) GetRemoteData() []*RemoteData { + if e == nil { + return nil + } + return e.RemoteData +} + +func (e *Eeoc) GetExtraProperties() map[string]interface{} { + return e.extraProperties +} + +func (e *Eeoc) UnmarshalJSON(data []byte) error { + type embed Eeoc + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + SubmittedAt *internal.DateTime `json:"submitted_at,omitempty"` + }{ + embed: embed(*e), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *e = Eeoc(unmarshaler.embed) + e.CreatedAt = unmarshaler.CreatedAt.TimePtr() + e.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + e.SubmittedAt = unmarshaler.SubmittedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *e) + if err != nil { + return err + } + e.extraProperties = extraProperties + e.rawJSON = json.RawMessage(data) + return nil +} + +func (e *Eeoc) MarshalJSON() ([]byte, error) { + type embed Eeoc + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + SubmittedAt *internal.DateTime `json:"submitted_at,omitempty"` + }{ + embed: embed(*e), + CreatedAt: internal.NewOptionalDateTime(e.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(e.ModifiedAt), + SubmittedAt: internal.NewOptionalDateTime(e.SubmittedAt), + } + return json.Marshal(marshaler) +} + +func (e *Eeoc) String() string { + if len(e.rawJSON) > 0 { + if value, err := internal.StringifyJSON(e.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(e); err == nil { + return value + } + return fmt.Sprintf("%#v", e) +} + +// The candidate being represented. +type EeocCandidate struct { + String string + Candidate *Candidate + + typ string +} + +func (e *EeocCandidate) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *EeocCandidate) GetCandidate() *Candidate { + if e == nil { + return nil + } + return e.Candidate +} + +func (e *EeocCandidate) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + valueCandidate := new(Candidate) + if err := json.Unmarshal(data, &valueCandidate); err == nil { + e.typ = "Candidate" + e.Candidate = valueCandidate + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e EeocCandidate) MarshalJSON() ([]byte, error) { + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + if e.typ == "Candidate" || e.Candidate != nil { + return json.Marshal(e.Candidate) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type EeocCandidateVisitor interface { + VisitString(string) error + VisitCandidate(*Candidate) error +} + +func (e *EeocCandidate) Accept(visitor EeocCandidateVisitor) error { + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + if e.typ == "Candidate" || e.Candidate != nil { + return visitor.VisitCandidate(e.Candidate) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +// The candidate's disability status. +// +// * `YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY` - YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY +// * `NO_I_DONT_HAVE_A_DISABILITY` - NO_I_DONT_HAVE_A_DISABILITY +// * `I_DONT_WISH_TO_ANSWER` - I_DONT_WISH_TO_ANSWER +type EeocDisabilityStatus struct { + DisabilityStatusEnum DisabilityStatusEnum + String string + + typ string +} + +func (e *EeocDisabilityStatus) GetDisabilityStatusEnum() DisabilityStatusEnum { + if e == nil { + return "" + } + return e.DisabilityStatusEnum +} + +func (e *EeocDisabilityStatus) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *EeocDisabilityStatus) UnmarshalJSON(data []byte) error { + var valueDisabilityStatusEnum DisabilityStatusEnum + if err := json.Unmarshal(data, &valueDisabilityStatusEnum); err == nil { + e.typ = "DisabilityStatusEnum" + e.DisabilityStatusEnum = valueDisabilityStatusEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e EeocDisabilityStatus) MarshalJSON() ([]byte, error) { + if e.typ == "DisabilityStatusEnum" || e.DisabilityStatusEnum != "" { + return json.Marshal(e.DisabilityStatusEnum) + } + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type EeocDisabilityStatusVisitor interface { + VisitDisabilityStatusEnum(DisabilityStatusEnum) error + VisitString(string) error +} + +func (e *EeocDisabilityStatus) Accept(visitor EeocDisabilityStatusVisitor) error { + if e.typ == "DisabilityStatusEnum" || e.DisabilityStatusEnum != "" { + return visitor.VisitDisabilityStatusEnum(e.DisabilityStatusEnum) + } + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +// The candidate's gender. +// +// * `MALE` - MALE +// * `FEMALE` - FEMALE +// * `NON-BINARY` - NON-BINARY +// * `OTHER` - OTHER +// * `DECLINE_TO_SELF_IDENTIFY` - DECLINE_TO_SELF_IDENTIFY +type EeocGender struct { + GenderEnum GenderEnum + String string + + typ string +} + +func (e *EeocGender) GetGenderEnum() GenderEnum { + if e == nil { + return "" + } + return e.GenderEnum +} + +func (e *EeocGender) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *EeocGender) UnmarshalJSON(data []byte) error { + var valueGenderEnum GenderEnum + if err := json.Unmarshal(data, &valueGenderEnum); err == nil { + e.typ = "GenderEnum" + e.GenderEnum = valueGenderEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e EeocGender) MarshalJSON() ([]byte, error) { + if e.typ == "GenderEnum" || e.GenderEnum != "" { + return json.Marshal(e.GenderEnum) + } + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type EeocGenderVisitor interface { + VisitGenderEnum(GenderEnum) error + VisitString(string) error +} + +func (e *EeocGender) Accept(visitor EeocGenderVisitor) error { + if e.typ == "GenderEnum" || e.GenderEnum != "" { + return visitor.VisitGenderEnum(e.GenderEnum) + } + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +// The candidate's race. +// +// * `AMERICAN_INDIAN_OR_ALASKAN_NATIVE` - AMERICAN_INDIAN_OR_ALASKAN_NATIVE +// * `ASIAN` - ASIAN +// * `BLACK_OR_AFRICAN_AMERICAN` - BLACK_OR_AFRICAN_AMERICAN +// * `HISPANIC_OR_LATINO` - HISPANIC_OR_LATINO +// * `WHITE` - WHITE +// * `NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER` - NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER +// * `TWO_OR_MORE_RACES` - TWO_OR_MORE_RACES +// * `DECLINE_TO_SELF_IDENTIFY` - DECLINE_TO_SELF_IDENTIFY +type EeocRace struct { + RaceEnum RaceEnum + String string + + typ string +} + +func (e *EeocRace) GetRaceEnum() RaceEnum { + if e == nil { + return "" + } + return e.RaceEnum +} + +func (e *EeocRace) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *EeocRace) UnmarshalJSON(data []byte) error { + var valueRaceEnum RaceEnum + if err := json.Unmarshal(data, &valueRaceEnum); err == nil { + e.typ = "RaceEnum" + e.RaceEnum = valueRaceEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e EeocRace) MarshalJSON() ([]byte, error) { + if e.typ == "RaceEnum" || e.RaceEnum != "" { + return json.Marshal(e.RaceEnum) + } + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type EeocRaceVisitor interface { + VisitRaceEnum(RaceEnum) error + VisitString(string) error +} + +func (e *EeocRace) Accept(visitor EeocRaceVisitor) error { + if e.typ == "RaceEnum" || e.RaceEnum != "" { + return visitor.VisitRaceEnum(e.RaceEnum) + } + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +// The candidate's veteran status. +// +// * `I_AM_NOT_A_PROTECTED_VETERAN` - I_AM_NOT_A_PROTECTED_VETERAN +// * `I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN` - I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN +// * `I_DONT_WISH_TO_ANSWER` - I_DONT_WISH_TO_ANSWER +type EeocVeteranStatus struct { + VeteranStatusEnum VeteranStatusEnum + String string + + typ string +} + +func (e *EeocVeteranStatus) GetVeteranStatusEnum() VeteranStatusEnum { + if e == nil { + return "" + } + return e.VeteranStatusEnum +} + +func (e *EeocVeteranStatus) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *EeocVeteranStatus) UnmarshalJSON(data []byte) error { + var valueVeteranStatusEnum VeteranStatusEnum + if err := json.Unmarshal(data, &valueVeteranStatusEnum); err == nil { + e.typ = "VeteranStatusEnum" + e.VeteranStatusEnum = valueVeteranStatusEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e EeocVeteranStatus) MarshalJSON() ([]byte, error) { + if e.typ == "VeteranStatusEnum" || e.VeteranStatusEnum != "" { + return json.Marshal(e.VeteranStatusEnum) + } + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type EeocVeteranStatusVisitor interface { + VisitVeteranStatusEnum(VeteranStatusEnum) error + VisitString(string) error +} + +func (e *EeocVeteranStatus) Accept(visitor EeocVeteranStatusVisitor) error { + if e.typ == "VeteranStatusEnum" || e.VeteranStatusEnum != "" { + return visitor.VisitVeteranStatusEnum(e.VeteranStatusEnum) + } + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +// * `MALE` - MALE +// * `FEMALE` - FEMALE +// * `NON-BINARY` - NON-BINARY +// * `OTHER` - OTHER +// * `DECLINE_TO_SELF_IDENTIFY` - DECLINE_TO_SELF_IDENTIFY +type GenderEnum string + +const ( + GenderEnumMale GenderEnum = "MALE" + GenderEnumFemale GenderEnum = "FEMALE" + GenderEnumNonBinary GenderEnum = "NON-BINARY" + GenderEnumOther GenderEnum = "OTHER" + GenderEnumDeclineToSelfIdentify GenderEnum = "DECLINE_TO_SELF_IDENTIFY" +) + +func NewGenderEnumFromString(s string) (GenderEnum, error) { + switch s { + case "MALE": + return GenderEnumMale, nil + case "FEMALE": + return GenderEnumFemale, nil + case "NON-BINARY": + return GenderEnumNonBinary, nil + case "OTHER": + return GenderEnumOther, nil + case "DECLINE_TO_SELF_IDENTIFY": + return GenderEnumDeclineToSelfIdentify, nil + } + var t GenderEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (g GenderEnum) Ptr() *GenderEnum { + return &g +} + +type PaginatedEeocList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Eeoc `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedEeocList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedEeocList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedEeocList) GetResults() []*Eeoc { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedEeocList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedEeocList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedEeocList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedEeocList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedEeocList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +// * `AMERICAN_INDIAN_OR_ALASKAN_NATIVE` - AMERICAN_INDIAN_OR_ALASKAN_NATIVE +// * `ASIAN` - ASIAN +// * `BLACK_OR_AFRICAN_AMERICAN` - BLACK_OR_AFRICAN_AMERICAN +// * `HISPANIC_OR_LATINO` - HISPANIC_OR_LATINO +// * `WHITE` - WHITE +// * `NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER` - NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER +// * `TWO_OR_MORE_RACES` - TWO_OR_MORE_RACES +// * `DECLINE_TO_SELF_IDENTIFY` - DECLINE_TO_SELF_IDENTIFY +type RaceEnum string + +const ( + RaceEnumAmericanIndianOrAlaskanNative RaceEnum = "AMERICAN_INDIAN_OR_ALASKAN_NATIVE" + RaceEnumAsian RaceEnum = "ASIAN" + RaceEnumBlackOrAfricanAmerican RaceEnum = "BLACK_OR_AFRICAN_AMERICAN" + RaceEnumHispanicOrLatino RaceEnum = "HISPANIC_OR_LATINO" + RaceEnumWhite RaceEnum = "WHITE" + RaceEnumNativeHawaiianOrOtherPacificIslander RaceEnum = "NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER" + RaceEnumTwoOrMoreRaces RaceEnum = "TWO_OR_MORE_RACES" + RaceEnumDeclineToSelfIdentify RaceEnum = "DECLINE_TO_SELF_IDENTIFY" +) + +func NewRaceEnumFromString(s string) (RaceEnum, error) { + switch s { + case "AMERICAN_INDIAN_OR_ALASKAN_NATIVE": + return RaceEnumAmericanIndianOrAlaskanNative, nil + case "ASIAN": + return RaceEnumAsian, nil + case "BLACK_OR_AFRICAN_AMERICAN": + return RaceEnumBlackOrAfricanAmerican, nil + case "HISPANIC_OR_LATINO": + return RaceEnumHispanicOrLatino, nil + case "WHITE": + return RaceEnumWhite, nil + case "NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER": + return RaceEnumNativeHawaiianOrOtherPacificIslander, nil + case "TWO_OR_MORE_RACES": + return RaceEnumTwoOrMoreRaces, nil + case "DECLINE_TO_SELF_IDENTIFY": + return RaceEnumDeclineToSelfIdentify, nil + } + var t RaceEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (r RaceEnum) Ptr() *RaceEnum { + return &r +} + +// * `I_AM_NOT_A_PROTECTED_VETERAN` - I_AM_NOT_A_PROTECTED_VETERAN +// * `I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN` - I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN +// * `I_DONT_WISH_TO_ANSWER` - I_DONT_WISH_TO_ANSWER +type VeteranStatusEnum string + +const ( + VeteranStatusEnumIAmNotAProtectedVeteran VeteranStatusEnum = "I_AM_NOT_A_PROTECTED_VETERAN" + VeteranStatusEnumIIdentifyAsOneOrMoreOfTheClassificationsOfAProtectedVeteran VeteranStatusEnum = "I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN" + VeteranStatusEnumIDontWishToAnswer VeteranStatusEnum = "I_DONT_WISH_TO_ANSWER" +) + +func NewVeteranStatusEnumFromString(s string) (VeteranStatusEnum, error) { + switch s { + case "I_AM_NOT_A_PROTECTED_VETERAN": + return VeteranStatusEnumIAmNotAProtectedVeteran, nil + case "I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN": + return VeteranStatusEnumIIdentifyAsOneOrMoreOfTheClassificationsOfAProtectedVeteran, nil + case "I_DONT_WISH_TO_ANSWER": + return VeteranStatusEnumIDontWishToAnswer, nil + } + var t VeteranStatusEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (v VeteranStatusEnum) Ptr() *VeteranStatusEnum { + return &v +} diff --git a/ats/eeocs/client.go b/ats/eeocs/client.go index 9ccdaf8..270b1d2 100644 --- a/ats/eeocs/client.go +++ b/ats/eeocs/client.go @@ -1,138 +1,137 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package eeocs import ( context "context" fmt "fmt" - ats "github.com/merge-api/merge-go-client/ats" - core "github.com/merge-api/merge-go-client/core" + ats "github.com/merge-api/merge-go-client/v2/ats" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `EEOC` objects. -func (c *Client) List(ctx context.Context, request *ats.EeocsListRequest) (*ats.PaginatedEeocList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ats/v1/eeocs" - - queryParams := make(url.Values) - if request.CandidateId != nil { - queryParams.Add("candidate_id", fmt.Sprintf("%v", *request.CandidateId)) - } - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteFields != nil { - queryParams.Add("remote_fields", fmt.Sprintf("%v", *request.RemoteFields)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if request.ShowEnumOrigins != nil { - queryParams.Add("show_enum_origins", fmt.Sprintf("%v", *request.ShowEnumOrigins)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *ats.PaginatedEeocList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *ats.EeocsListRequest, + opts ...option.RequestOption, +) (*core.Page[*ats.Eeoc], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ats/v1/eeocs" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *ats.PaginatedEeocList) *internal.PageResponse[*string, *ats.Eeoc] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *ats.Eeoc]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Returns an `EEOC` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *ats.EeocsRetrieveRequest) (*ats.Eeoc, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"ats/v1/eeocs/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.RemoteFields != nil { - queryParams.Add("remote_fields", fmt.Sprintf("%v", *request.RemoteFields)) - } - if request.ShowEnumOrigins != nil { - queryParams.Add("show_enum_origins", fmt.Sprintf("%v", *request.ShowEnumOrigins)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *ats.EeocsRetrieveRequest, + opts ...option.RequestOption, +) (*ats.Eeoc, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/ats/v1/eeocs/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ats.Eeoc if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/ats/field_mapping.go b/ats/field_mapping.go index 31659fa..c67269f 100644 --- a/ats/field_mapping.go +++ b/ats/field_mapping.go @@ -1,41 +1,1229 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package ats +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" +) + type CreateFieldMappingRequest struct { // If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. - ExcludeRemoteFieldMetadata *bool `json:"-"` + ExcludeRemoteFieldMetadata *bool `json:"-" url:"exclude_remote_field_metadata,omitempty"` // The name of the target field you want this remote field to map to. - TargetFieldName string `json:"target_field_name"` + TargetFieldName string `json:"target_field_name" url:"-"` // The description of the target field you want this remote field to map to. - TargetFieldDescription string `json:"target_field_description"` + TargetFieldDescription string `json:"target_field_description" url:"-"` // The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint. - RemoteFieldTraversalPath []interface{} `json:"remote_field_traversal_path,omitempty"` + RemoteFieldTraversalPath []interface{} `json:"remote_field_traversal_path,omitempty" url:"-"` // The method of the remote endpoint where the remote field is coming from. - RemoteMethod string `json:"remote_method"` + RemoteMethod string `json:"remote_method" url:"-"` // The path of the remote endpoint where the remote field is coming from. - RemoteUrlPath string `json:"remote_url_path"` + RemoteUrlPath string `json:"remote_url_path" url:"-"` // The name of the Common Model that the remote field corresponds to in a given category. - CommonModelName string `json:"common_model_name"` + CommonModelName string `json:"common_model_name" url:"-"` } type PatchedEditFieldMappingRequest struct { // The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint. - RemoteFieldTraversalPath []interface{} `json:"remote_field_traversal_path,omitempty"` + RemoteFieldTraversalPath []interface{} `json:"remote_field_traversal_path,omitempty" url:"-"` // The method of the remote endpoint where the remote field is coming from. - RemoteMethod *string `json:"remote_method,omitempty"` + RemoteMethod *string `json:"remote_method,omitempty" url:"-"` // The path of the remote endpoint where the remote field is coming from. - RemoteUrlPath *string `json:"remote_url_path,omitempty"` + RemoteUrlPath *string `json:"remote_url_path,omitempty" url:"-"` } type FieldMappingsRetrieveRequest struct { // If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. - ExcludeRemoteFieldMetadata *bool `json:"-"` + ExcludeRemoteFieldMetadata *bool `json:"-" url:"exclude_remote_field_metadata,omitempty"` } type RemoteFieldsRetrieveRequest struct { // A comma seperated list of Common Model names. If included, will only return Remote Fields for those Common Models. - CommonModels *string `json:"-"` + CommonModels *string `json:"-" url:"common_models,omitempty"` // If true, will include example values, where available, for remote fields in the 3rd party platform. These examples come from active data from your customers. - IncludeExampleValues *string `json:"-"` + IncludeExampleValues *string `json:"-" url:"include_example_values,omitempty"` +} + +type AdvancedMetadata struct { + Id string `json:"id" url:"id"` + DisplayName *string `json:"display_name,omitempty" url:"display_name,omitempty"` + Description *string `json:"description,omitempty" url:"description,omitempty"` + IsRequired *bool `json:"is_required,omitempty" url:"is_required,omitempty"` + IsCustom *bool `json:"is_custom,omitempty" url:"is_custom,omitempty"` + FieldChoices []interface{} `json:"field_choices,omitempty" url:"field_choices,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AdvancedMetadata) GetId() string { + if a == nil { + return "" + } + return a.Id +} + +func (a *AdvancedMetadata) GetDisplayName() *string { + if a == nil { + return nil + } + return a.DisplayName +} + +func (a *AdvancedMetadata) GetDescription() *string { + if a == nil { + return nil + } + return a.Description +} + +func (a *AdvancedMetadata) GetIsRequired() *bool { + if a == nil { + return nil + } + return a.IsRequired +} + +func (a *AdvancedMetadata) GetIsCustom() *bool { + if a == nil { + return nil + } + return a.IsCustom +} + +func (a *AdvancedMetadata) GetFieldChoices() []interface{} { + if a == nil { + return nil + } + return a.FieldChoices +} + +func (a *AdvancedMetadata) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AdvancedMetadata) UnmarshalJSON(data []byte) error { + type unmarshaler AdvancedMetadata + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *a = AdvancedMetadata(value) + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AdvancedMetadata) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} + +type ExternalTargetFieldApi struct { + Name *string `json:"name,omitempty" url:"name,omitempty"` + Description *string `json:"description,omitempty" url:"description,omitempty"` + IsMapped *string `json:"is_mapped,omitempty" url:"is_mapped,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (e *ExternalTargetFieldApi) GetName() *string { + if e == nil { + return nil + } + return e.Name +} + +func (e *ExternalTargetFieldApi) GetDescription() *string { + if e == nil { + return nil + } + return e.Description +} + +func (e *ExternalTargetFieldApi) GetIsMapped() *string { + if e == nil { + return nil + } + return e.IsMapped +} + +func (e *ExternalTargetFieldApi) GetExtraProperties() map[string]interface{} { + return e.extraProperties +} + +func (e *ExternalTargetFieldApi) UnmarshalJSON(data []byte) error { + type unmarshaler ExternalTargetFieldApi + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *e = ExternalTargetFieldApi(value) + extraProperties, err := internal.ExtractExtraProperties(data, *e) + if err != nil { + return err + } + e.extraProperties = extraProperties + e.rawJSON = json.RawMessage(data) + return nil +} + +func (e *ExternalTargetFieldApi) String() string { + if len(e.rawJSON) > 0 { + if value, err := internal.StringifyJSON(e.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(e); err == nil { + return value + } + return fmt.Sprintf("%#v", e) +} + +type ExternalTargetFieldApiResponse struct { + Activity []*ExternalTargetFieldApi `json:"Activity,omitempty" url:"Activity,omitempty"` + Application []*ExternalTargetFieldApi `json:"Application,omitempty" url:"Application,omitempty"` + Attachment []*ExternalTargetFieldApi `json:"Attachment,omitempty" url:"Attachment,omitempty"` + Candidate []*ExternalTargetFieldApi `json:"Candidate,omitempty" url:"Candidate,omitempty"` + Department []*ExternalTargetFieldApi `json:"Department,omitempty" url:"Department,omitempty"` + Eeoc []*ExternalTargetFieldApi `json:"EEOC,omitempty" url:"EEOC,omitempty"` + ScheduledInterview []*ExternalTargetFieldApi `json:"ScheduledInterview,omitempty" url:"ScheduledInterview,omitempty"` + Job []*ExternalTargetFieldApi `json:"Job,omitempty" url:"Job,omitempty"` + JobPosting []*ExternalTargetFieldApi `json:"JobPosting,omitempty" url:"JobPosting,omitempty"` + JobInterviewStage []*ExternalTargetFieldApi `json:"JobInterviewStage,omitempty" url:"JobInterviewStage,omitempty"` + Offer []*ExternalTargetFieldApi `json:"Offer,omitempty" url:"Offer,omitempty"` + Office []*ExternalTargetFieldApi `json:"Office,omitempty" url:"Office,omitempty"` + RejectReason []*ExternalTargetFieldApi `json:"RejectReason,omitempty" url:"RejectReason,omitempty"` + Scorecard []*ExternalTargetFieldApi `json:"Scorecard,omitempty" url:"Scorecard,omitempty"` + Tag []*ExternalTargetFieldApi `json:"Tag,omitempty" url:"Tag,omitempty"` + RemoteUser []*ExternalTargetFieldApi `json:"RemoteUser,omitempty" url:"RemoteUser,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (e *ExternalTargetFieldApiResponse) GetActivity() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.Activity +} + +func (e *ExternalTargetFieldApiResponse) GetApplication() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.Application +} + +func (e *ExternalTargetFieldApiResponse) GetAttachment() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.Attachment +} + +func (e *ExternalTargetFieldApiResponse) GetCandidate() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.Candidate +} + +func (e *ExternalTargetFieldApiResponse) GetDepartment() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.Department +} + +func (e *ExternalTargetFieldApiResponse) GetEeoc() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.Eeoc +} + +func (e *ExternalTargetFieldApiResponse) GetScheduledInterview() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.ScheduledInterview +} + +func (e *ExternalTargetFieldApiResponse) GetJob() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.Job +} + +func (e *ExternalTargetFieldApiResponse) GetJobPosting() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.JobPosting +} + +func (e *ExternalTargetFieldApiResponse) GetJobInterviewStage() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.JobInterviewStage +} + +func (e *ExternalTargetFieldApiResponse) GetOffer() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.Offer +} + +func (e *ExternalTargetFieldApiResponse) GetOffice() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.Office +} + +func (e *ExternalTargetFieldApiResponse) GetRejectReason() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.RejectReason +} + +func (e *ExternalTargetFieldApiResponse) GetScorecard() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.Scorecard +} + +func (e *ExternalTargetFieldApiResponse) GetTag() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.Tag +} + +func (e *ExternalTargetFieldApiResponse) GetRemoteUser() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.RemoteUser +} + +func (e *ExternalTargetFieldApiResponse) GetExtraProperties() map[string]interface{} { + return e.extraProperties +} + +func (e *ExternalTargetFieldApiResponse) UnmarshalJSON(data []byte) error { + type unmarshaler ExternalTargetFieldApiResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *e = ExternalTargetFieldApiResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *e) + if err != nil { + return err + } + e.extraProperties = extraProperties + e.rawJSON = json.RawMessage(data) + return nil +} + +func (e *ExternalTargetFieldApiResponse) String() string { + if len(e.rawJSON) > 0 { + if value, err := internal.StringifyJSON(e.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(e); err == nil { + return value + } + return fmt.Sprintf("%#v", e) +} + +type FieldMappingApiInstance struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + IsIntegrationWide *bool `json:"is_integration_wide,omitempty" url:"is_integration_wide,omitempty"` + TargetField *FieldMappingApiInstanceTargetField `json:"target_field,omitempty" url:"target_field,omitempty"` + RemoteField *FieldMappingApiInstanceRemoteField `json:"remote_field,omitempty" url:"remote_field,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (f *FieldMappingApiInstance) GetId() *string { + if f == nil { + return nil + } + return f.Id +} + +func (f *FieldMappingApiInstance) GetIsIntegrationWide() *bool { + if f == nil { + return nil + } + return f.IsIntegrationWide +} + +func (f *FieldMappingApiInstance) GetTargetField() *FieldMappingApiInstanceTargetField { + if f == nil { + return nil + } + return f.TargetField +} + +func (f *FieldMappingApiInstance) GetRemoteField() *FieldMappingApiInstanceRemoteField { + if f == nil { + return nil + } + return f.RemoteField +} + +func (f *FieldMappingApiInstance) GetExtraProperties() map[string]interface{} { + return f.extraProperties +} + +func (f *FieldMappingApiInstance) UnmarshalJSON(data []byte) error { + type unmarshaler FieldMappingApiInstance + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *f = FieldMappingApiInstance(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { + return err + } + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) + return nil +} + +func (f *FieldMappingApiInstance) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(f); err == nil { + return value + } + return fmt.Sprintf("%#v", f) +} + +type FieldMappingApiInstanceRemoteField struct { + RemoteKeyName *string `json:"remote_key_name,omitempty" url:"remote_key_name,omitempty"` + Schema map[string]interface{} `json:"schema,omitempty" url:"schema,omitempty"` + RemoteEndpointInfo *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo `json:"remote_endpoint_info" url:"remote_endpoint_info"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (f *FieldMappingApiInstanceRemoteField) GetRemoteKeyName() *string { + if f == nil { + return nil + } + return f.RemoteKeyName +} + +func (f *FieldMappingApiInstanceRemoteField) GetSchema() map[string]interface{} { + if f == nil { + return nil + } + return f.Schema +} + +func (f *FieldMappingApiInstanceRemoteField) GetRemoteEndpointInfo() *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo { + if f == nil { + return nil + } + return f.RemoteEndpointInfo +} + +func (f *FieldMappingApiInstanceRemoteField) GetExtraProperties() map[string]interface{} { + return f.extraProperties +} + +func (f *FieldMappingApiInstanceRemoteField) UnmarshalJSON(data []byte) error { + type unmarshaler FieldMappingApiInstanceRemoteField + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *f = FieldMappingApiInstanceRemoteField(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { + return err + } + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) + return nil +} + +func (f *FieldMappingApiInstanceRemoteField) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(f); err == nil { + return value + } + return fmt.Sprintf("%#v", f) +} + +type FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo struct { + Method *string `json:"method,omitempty" url:"method,omitempty"` + UrlPath *string `json:"url_path,omitempty" url:"url_path,omitempty"` + FieldTraversalPath []string `json:"field_traversal_path,omitempty" url:"field_traversal_path,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (f *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo) GetMethod() *string { + if f == nil { + return nil + } + return f.Method +} + +func (f *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo) GetUrlPath() *string { + if f == nil { + return nil + } + return f.UrlPath +} + +func (f *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo) GetFieldTraversalPath() []string { + if f == nil { + return nil + } + return f.FieldTraversalPath +} + +func (f *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo) GetExtraProperties() map[string]interface{} { + return f.extraProperties +} + +func (f *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo) UnmarshalJSON(data []byte) error { + type unmarshaler FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *f = FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { + return err + } + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) + return nil +} + +func (f *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(f); err == nil { + return value + } + return fmt.Sprintf("%#v", f) +} + +type FieldMappingApiInstanceResponse struct { + Activity []*FieldMappingApiInstance `json:"Activity,omitempty" url:"Activity,omitempty"` + Application []*FieldMappingApiInstance `json:"Application,omitempty" url:"Application,omitempty"` + Attachment []*FieldMappingApiInstance `json:"Attachment,omitempty" url:"Attachment,omitempty"` + Candidate []*FieldMappingApiInstance `json:"Candidate,omitempty" url:"Candidate,omitempty"` + Department []*FieldMappingApiInstance `json:"Department,omitempty" url:"Department,omitempty"` + Eeoc []*FieldMappingApiInstance `json:"EEOC,omitempty" url:"EEOC,omitempty"` + ScheduledInterview []*FieldMappingApiInstance `json:"ScheduledInterview,omitempty" url:"ScheduledInterview,omitempty"` + Job []*FieldMappingApiInstance `json:"Job,omitempty" url:"Job,omitempty"` + JobPosting []*FieldMappingApiInstance `json:"JobPosting,omitempty" url:"JobPosting,omitempty"` + JobInterviewStage []*FieldMappingApiInstance `json:"JobInterviewStage,omitempty" url:"JobInterviewStage,omitempty"` + Offer []*FieldMappingApiInstance `json:"Offer,omitempty" url:"Offer,omitempty"` + Office []*FieldMappingApiInstance `json:"Office,omitempty" url:"Office,omitempty"` + RejectReason []*FieldMappingApiInstance `json:"RejectReason,omitempty" url:"RejectReason,omitempty"` + Scorecard []*FieldMappingApiInstance `json:"Scorecard,omitempty" url:"Scorecard,omitempty"` + Tag []*FieldMappingApiInstance `json:"Tag,omitempty" url:"Tag,omitempty"` + RemoteUser []*FieldMappingApiInstance `json:"RemoteUser,omitempty" url:"RemoteUser,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (f *FieldMappingApiInstanceResponse) GetActivity() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Activity +} + +func (f *FieldMappingApiInstanceResponse) GetApplication() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Application +} + +func (f *FieldMappingApiInstanceResponse) GetAttachment() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Attachment +} + +func (f *FieldMappingApiInstanceResponse) GetCandidate() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Candidate +} + +func (f *FieldMappingApiInstanceResponse) GetDepartment() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Department +} + +func (f *FieldMappingApiInstanceResponse) GetEeoc() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Eeoc +} + +func (f *FieldMappingApiInstanceResponse) GetScheduledInterview() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.ScheduledInterview +} + +func (f *FieldMappingApiInstanceResponse) GetJob() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Job +} + +func (f *FieldMappingApiInstanceResponse) GetJobPosting() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.JobPosting +} + +func (f *FieldMappingApiInstanceResponse) GetJobInterviewStage() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.JobInterviewStage +} + +func (f *FieldMappingApiInstanceResponse) GetOffer() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Offer +} + +func (f *FieldMappingApiInstanceResponse) GetOffice() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Office +} + +func (f *FieldMappingApiInstanceResponse) GetRejectReason() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.RejectReason +} + +func (f *FieldMappingApiInstanceResponse) GetScorecard() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Scorecard +} + +func (f *FieldMappingApiInstanceResponse) GetTag() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Tag +} + +func (f *FieldMappingApiInstanceResponse) GetRemoteUser() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.RemoteUser +} + +func (f *FieldMappingApiInstanceResponse) GetExtraProperties() map[string]interface{} { + return f.extraProperties +} + +func (f *FieldMappingApiInstanceResponse) UnmarshalJSON(data []byte) error { + type unmarshaler FieldMappingApiInstanceResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *f = FieldMappingApiInstanceResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { + return err + } + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) + return nil +} + +func (f *FieldMappingApiInstanceResponse) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(f); err == nil { + return value + } + return fmt.Sprintf("%#v", f) +} + +type FieldMappingApiInstanceTargetField struct { + Name string `json:"name" url:"name"` + Description string `json:"description" url:"description"` + IsOrganizationWide bool `json:"is_organization_wide" url:"is_organization_wide"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (f *FieldMappingApiInstanceTargetField) GetName() string { + if f == nil { + return "" + } + return f.Name +} + +func (f *FieldMappingApiInstanceTargetField) GetDescription() string { + if f == nil { + return "" + } + return f.Description +} + +func (f *FieldMappingApiInstanceTargetField) GetIsOrganizationWide() bool { + if f == nil { + return false + } + return f.IsOrganizationWide +} + +func (f *FieldMappingApiInstanceTargetField) GetExtraProperties() map[string]interface{} { + return f.extraProperties +} + +func (f *FieldMappingApiInstanceTargetField) UnmarshalJSON(data []byte) error { + type unmarshaler FieldMappingApiInstanceTargetField + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *f = FieldMappingApiInstanceTargetField(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { + return err + } + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) + return nil +} + +func (f *FieldMappingApiInstanceTargetField) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(f); err == nil { + return value + } + return fmt.Sprintf("%#v", f) +} + +type FieldMappingInstanceResponse struct { + Model *FieldMappingApiInstance `json:"model" url:"model"` + Warnings []*WarningValidationProblem `json:"warnings" url:"warnings"` + Errors []*ErrorValidationProblem `json:"errors" url:"errors"` + Logs []*DebugModeLog `json:"logs,omitempty" url:"logs,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (f *FieldMappingInstanceResponse) GetModel() *FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Model +} + +func (f *FieldMappingInstanceResponse) GetWarnings() []*WarningValidationProblem { + if f == nil { + return nil + } + return f.Warnings +} + +func (f *FieldMappingInstanceResponse) GetErrors() []*ErrorValidationProblem { + if f == nil { + return nil + } + return f.Errors +} + +func (f *FieldMappingInstanceResponse) GetLogs() []*DebugModeLog { + if f == nil { + return nil + } + return f.Logs +} + +func (f *FieldMappingInstanceResponse) GetExtraProperties() map[string]interface{} { + return f.extraProperties +} + +func (f *FieldMappingInstanceResponse) UnmarshalJSON(data []byte) error { + type unmarshaler FieldMappingInstanceResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *f = FieldMappingInstanceResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { + return err + } + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) + return nil +} + +func (f *FieldMappingInstanceResponse) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(f); err == nil { + return value + } + return fmt.Sprintf("%#v", f) +} + +type RemoteEndpointInfo struct { + Method string `json:"method" url:"method"` + UrlPath string `json:"url_path" url:"url_path"` + FieldTraversalPath []interface{} `json:"field_traversal_path" url:"field_traversal_path"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (r *RemoteEndpointInfo) GetMethod() string { + if r == nil { + return "" + } + return r.Method +} + +func (r *RemoteEndpointInfo) GetUrlPath() string { + if r == nil { + return "" + } + return r.UrlPath +} + +func (r *RemoteEndpointInfo) GetFieldTraversalPath() []interface{} { + if r == nil { + return nil + } + return r.FieldTraversalPath +} + +func (r *RemoteEndpointInfo) GetExtraProperties() map[string]interface{} { + return r.extraProperties +} + +func (r *RemoteEndpointInfo) UnmarshalJSON(data []byte) error { + type unmarshaler RemoteEndpointInfo + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *r = RemoteEndpointInfo(value) + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { + return err + } + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) + return nil +} + +func (r *RemoteEndpointInfo) String() string { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(r); err == nil { + return value + } + return fmt.Sprintf("%#v", r) +} + +type RemoteFieldApi struct { + Schema map[string]interface{} `json:"schema" url:"schema"` + RemoteKeyName string `json:"remote_key_name" url:"remote_key_name"` + RemoteEndpointInfo *RemoteEndpointInfo `json:"remote_endpoint_info" url:"remote_endpoint_info"` + ExampleValues []interface{} `json:"example_values,omitempty" url:"example_values,omitempty"` + AdvancedMetadata *AdvancedMetadata `json:"advanced_metadata,omitempty" url:"advanced_metadata,omitempty"` + Coverage *RemoteFieldApiCoverage `json:"coverage,omitempty" url:"coverage,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (r *RemoteFieldApi) GetSchema() map[string]interface{} { + if r == nil { + return nil + } + return r.Schema +} + +func (r *RemoteFieldApi) GetRemoteKeyName() string { + if r == nil { + return "" + } + return r.RemoteKeyName +} + +func (r *RemoteFieldApi) GetRemoteEndpointInfo() *RemoteEndpointInfo { + if r == nil { + return nil + } + return r.RemoteEndpointInfo +} + +func (r *RemoteFieldApi) GetExampleValues() []interface{} { + if r == nil { + return nil + } + return r.ExampleValues +} + +func (r *RemoteFieldApi) GetAdvancedMetadata() *AdvancedMetadata { + if r == nil { + return nil + } + return r.AdvancedMetadata +} + +func (r *RemoteFieldApi) GetCoverage() *RemoteFieldApiCoverage { + if r == nil { + return nil + } + return r.Coverage +} + +func (r *RemoteFieldApi) GetExtraProperties() map[string]interface{} { + return r.extraProperties +} + +func (r *RemoteFieldApi) UnmarshalJSON(data []byte) error { + type unmarshaler RemoteFieldApi + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *r = RemoteFieldApi(value) + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { + return err + } + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) + return nil +} + +func (r *RemoteFieldApi) String() string { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(r); err == nil { + return value + } + return fmt.Sprintf("%#v", r) +} + +type RemoteFieldApiCoverage struct { + Integer int + Double float64 + + typ string +} + +func (r *RemoteFieldApiCoverage) GetInteger() int { + if r == nil { + return 0 + } + return r.Integer +} + +func (r *RemoteFieldApiCoverage) GetDouble() float64 { + if r == nil { + return 0 + } + return r.Double +} + +func (r *RemoteFieldApiCoverage) UnmarshalJSON(data []byte) error { + var valueInteger int + if err := json.Unmarshal(data, &valueInteger); err == nil { + r.typ = "Integer" + r.Integer = valueInteger + return nil + } + var valueDouble float64 + if err := json.Unmarshal(data, &valueDouble); err == nil { + r.typ = "Double" + r.Double = valueDouble + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, r) +} + +func (r RemoteFieldApiCoverage) MarshalJSON() ([]byte, error) { + if r.typ == "Integer" || r.Integer != 0 { + return json.Marshal(r.Integer) + } + if r.typ == "Double" || r.Double != 0 { + return json.Marshal(r.Double) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", r) +} + +type RemoteFieldApiCoverageVisitor interface { + VisitInteger(int) error + VisitDouble(float64) error +} + +func (r *RemoteFieldApiCoverage) Accept(visitor RemoteFieldApiCoverageVisitor) error { + if r.typ == "Integer" || r.Integer != 0 { + return visitor.VisitInteger(r.Integer) + } + if r.typ == "Double" || r.Double != 0 { + return visitor.VisitDouble(r.Double) + } + return fmt.Errorf("type %T does not include a non-empty union type", r) +} + +type RemoteFieldApiResponse struct { + Activity []*RemoteFieldApi `json:"Activity,omitempty" url:"Activity,omitempty"` + Application []*RemoteFieldApi `json:"Application,omitempty" url:"Application,omitempty"` + Attachment []*RemoteFieldApi `json:"Attachment,omitempty" url:"Attachment,omitempty"` + Candidate []*RemoteFieldApi `json:"Candidate,omitempty" url:"Candidate,omitempty"` + Department []*RemoteFieldApi `json:"Department,omitempty" url:"Department,omitempty"` + Eeoc []*RemoteFieldApi `json:"EEOC,omitempty" url:"EEOC,omitempty"` + ScheduledInterview []*RemoteFieldApi `json:"ScheduledInterview,omitempty" url:"ScheduledInterview,omitempty"` + Job []*RemoteFieldApi `json:"Job,omitempty" url:"Job,omitempty"` + JobPosting []*RemoteFieldApi `json:"JobPosting,omitempty" url:"JobPosting,omitempty"` + JobInterviewStage []*RemoteFieldApi `json:"JobInterviewStage,omitempty" url:"JobInterviewStage,omitempty"` + Offer []*RemoteFieldApi `json:"Offer,omitempty" url:"Offer,omitempty"` + Office []*RemoteFieldApi `json:"Office,omitempty" url:"Office,omitempty"` + RejectReason []*RemoteFieldApi `json:"RejectReason,omitempty" url:"RejectReason,omitempty"` + Scorecard []*RemoteFieldApi `json:"Scorecard,omitempty" url:"Scorecard,omitempty"` + Tag []*RemoteFieldApi `json:"Tag,omitempty" url:"Tag,omitempty"` + RemoteUser []*RemoteFieldApi `json:"RemoteUser,omitempty" url:"RemoteUser,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (r *RemoteFieldApiResponse) GetActivity() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.Activity +} + +func (r *RemoteFieldApiResponse) GetApplication() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.Application +} + +func (r *RemoteFieldApiResponse) GetAttachment() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.Attachment +} + +func (r *RemoteFieldApiResponse) GetCandidate() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.Candidate +} + +func (r *RemoteFieldApiResponse) GetDepartment() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.Department +} + +func (r *RemoteFieldApiResponse) GetEeoc() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.Eeoc +} + +func (r *RemoteFieldApiResponse) GetScheduledInterview() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.ScheduledInterview +} + +func (r *RemoteFieldApiResponse) GetJob() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.Job +} + +func (r *RemoteFieldApiResponse) GetJobPosting() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.JobPosting +} + +func (r *RemoteFieldApiResponse) GetJobInterviewStage() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.JobInterviewStage +} + +func (r *RemoteFieldApiResponse) GetOffer() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.Offer +} + +func (r *RemoteFieldApiResponse) GetOffice() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.Office +} + +func (r *RemoteFieldApiResponse) GetRejectReason() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.RejectReason +} + +func (r *RemoteFieldApiResponse) GetScorecard() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.Scorecard +} + +func (r *RemoteFieldApiResponse) GetTag() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.Tag +} + +func (r *RemoteFieldApiResponse) GetRemoteUser() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.RemoteUser +} + +func (r *RemoteFieldApiResponse) GetExtraProperties() map[string]interface{} { + return r.extraProperties +} + +func (r *RemoteFieldApiResponse) UnmarshalJSON(data []byte) error { + type unmarshaler RemoteFieldApiResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *r = RemoteFieldApiResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { + return err + } + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) + return nil +} + +func (r *RemoteFieldApiResponse) String() string { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(r); err == nil { + return value + } + return fmt.Sprintf("%#v", r) } diff --git a/ats/fieldmapping/client.go b/ats/fieldmapping/client.go index a5e403f..a98fcff 100644 --- a/ats/fieldmapping/client.go +++ b/ats/fieldmapping/client.go @@ -1,58 +1,73 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package fieldmapping import ( context "context" - fmt "fmt" - ats "github.com/merge-api/merge-go-client/ats" - core "github.com/merge-api/merge-go-client/core" + ats "github.com/merge-api/merge-go-client/v2/ats" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge fields. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). -func (c *Client) FieldMappingsRetrieve(ctx context.Context, request *ats.FieldMappingsRetrieveRequest) (*ats.FieldMappingApiInstanceResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ats/v1/field-mappings" - - queryParams := make(url.Values) - if request.ExcludeRemoteFieldMetadata != nil { - queryParams.Add("exclude_remote_field_metadata", fmt.Sprintf("%v", *request.ExcludeRemoteFieldMetadata)) +func (c *Client) FieldMappingsRetrieve( + ctx context.Context, + request *ats.FieldMappingsRetrieveRequest, + opts ...option.RequestOption, +) (*ats.FieldMappingApiInstanceResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ats/v1/field-mappings" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ats.FieldMappingApiInstanceResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -61,30 +76,44 @@ func (c *Client) FieldMappingsRetrieve(ctx context.Context, request *ats.FieldMa } // Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. -func (c *Client) FieldMappingsCreate(ctx context.Context, request *ats.CreateFieldMappingRequest) (*ats.FieldMappingInstanceResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ats/v1/field-mappings" - - queryParams := make(url.Values) - if request.ExcludeRemoteFieldMetadata != nil { - queryParams.Add("exclude_remote_field_metadata", fmt.Sprintf("%v", *request.ExcludeRemoteFieldMetadata)) +func (c *Client) FieldMappingsCreate( + ctx context.Context, + request *ats.CreateFieldMappingRequest, + opts ...option.RequestOption, +) (*ats.FieldMappingInstanceResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ats/v1/field-mappings" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *ats.FieldMappingInstanceResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -93,21 +122,38 @@ func (c *Client) FieldMappingsCreate(ctx context.Context, request *ats.CreateFie } // Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. -func (c *Client) FieldMappingsDestroy(ctx context.Context, fieldMappingId string) (*ats.FieldMappingInstanceResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"ats/v1/field-mappings/%v", fieldMappingId) +func (c *Client) FieldMappingsDestroy( + ctx context.Context, + fieldMappingId string, + opts ...option.RequestOption, +) (*ats.FieldMappingInstanceResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/ats/v1/field-mappings/%v", + fieldMappingId, + ) + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ats.FieldMappingInstanceResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodDelete, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodDelete, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -116,22 +162,41 @@ func (c *Client) FieldMappingsDestroy(ctx context.Context, fieldMappingId string } // Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. -func (c *Client) FieldMappingsPartialUpdate(ctx context.Context, fieldMappingId string, request *ats.PatchedEditFieldMappingRequest) (*ats.FieldMappingInstanceResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"ats/v1/field-mappings/%v", fieldMappingId) +func (c *Client) FieldMappingsPartialUpdate( + ctx context.Context, + fieldMappingId string, + request *ats.PatchedEditFieldMappingRequest, + opts ...option.RequestOption, +) (*ats.FieldMappingInstanceResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/ats/v1/field-mappings/%v", + fieldMappingId, + ) + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *ats.FieldMappingInstanceResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPatch, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPatch, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -140,32 +205,42 @@ func (c *Client) FieldMappingsPartialUpdate(ctx context.Context, fieldMappingId } // Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data is enabled. You can use remote fields to override existing Merge fields or map a new Merge field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). -func (c *Client) RemoteFieldsRetrieve(ctx context.Context, request *ats.RemoteFieldsRetrieveRequest) (*ats.RemoteFieldApiResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ats/v1/remote-fields" - - queryParams := make(url.Values) - if request.CommonModels != nil { - queryParams.Add("common_models", fmt.Sprintf("%v", *request.CommonModels)) - } - if request.IncludeExampleValues != nil { - queryParams.Add("include_example_values", fmt.Sprintf("%v", *request.IncludeExampleValues)) +func (c *Client) RemoteFieldsRetrieve( + ctx context.Context, + request *ats.RemoteFieldsRetrieveRequest, + opts ...option.RequestOption, +) (*ats.RemoteFieldApiResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ats/v1/remote-fields" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ats.RemoteFieldApiResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -174,21 +249,34 @@ func (c *Client) RemoteFieldsRetrieve(ctx context.Context, request *ats.RemoteFi } // Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields are additional fields appended to the Merge Common Model for all Linked Accounts in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). -func (c *Client) TargetFieldsRetrieve(ctx context.Context) (*ats.ExternalTargetFieldApiResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ats/v1/target-fields" +func (c *Client) TargetFieldsRetrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*ats.ExternalTargetFieldApiResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ats/v1/target-fields" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ats.ExternalTargetFieldApiResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/ats/forceresync/client.go b/ats/forceresync/client.go index ef0e79d..94b7030 100644 --- a/ats/forceresync/client.go +++ b/ats/forceresync/client.go @@ -1,48 +1,65 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package forceresync import ( context "context" - ats "github.com/merge-api/merge-go-client/ats" - core "github.com/merge-api/merge-go-client/core" + ats "github.com/merge-api/merge-go-client/v2/ats" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } -// Force re-sync of all models. This is available for all organizations via the dashboard. Force re-sync is also available programmatically via API for monthly, quarterly, and highest sync frequency customers on the Professional or Enterprise plans. Doing so will consume a sync credit for the relevant linked account. -func (c *Client) SyncStatusResyncCreate(ctx context.Context) ([]*ats.SyncStatus, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ats/v1/sync-status/resync" +// Force re-sync of all models. This endpoint is available for monthly, quarterly, and highest sync frequency customers on the Professional or Enterprise plans. Doing so will consume a sync credit for the relevant linked account. Force re-syncs can also be triggered manually in the Merge Dashboard and is available for all customers. +func (c *Client) SyncStatusResyncCreate( + ctx context.Context, + opts ...option.RequestOption, +) ([]*ats.SyncStatus, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ats/v1/sync-status/resync" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response []*ats.SyncStatus if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/ats/generate_key.go b/ats/generate_key.go index 8b96c41..f024c4c 100644 --- a/ats/generate_key.go +++ b/ats/generate_key.go @@ -1,8 +1,8 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package ats type GenerateRemoteKeyRequest struct { // The name of the remote key - Name string `json:"name"` + Name string `json:"name" url:"-"` } diff --git a/ats/generatekey/client.go b/ats/generatekey/client.go index 7d0f029..39ff710 100644 --- a/ats/generatekey/client.go +++ b/ats/generatekey/client.go @@ -1,49 +1,68 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package generatekey import ( context "context" - ats "github.com/merge-api/merge-go-client/ats" - core "github.com/merge-api/merge-go-client/core" + ats "github.com/merge-api/merge-go-client/v2/ats" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Create a remote key. -func (c *Client) Create(ctx context.Context, request *ats.GenerateRemoteKeyRequest) (*ats.RemoteKey, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ats/v1/generate-key" +func (c *Client) Create( + ctx context.Context, + request *ats.GenerateRemoteKeyRequest, + opts ...option.RequestOption, +) (*ats.RemoteKey, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ats/v1/generate-key" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *ats.RemoteKey if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err diff --git a/ats/interviews.go b/ats/interviews.go index 2432fed..517c725 100644 --- a/ats/interviews.go +++ b/ats/interviews.go @@ -1,187 +1,732 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package ats import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type ScheduledInterviewEndpointRequest struct { // Whether to include debug fields (such as log file links) in the response. - IsDebugMode *bool `json:"-"` + IsDebugMode *bool `json:"-" url:"is_debug_mode,omitempty"` // Whether or not third-party updates should be run asynchronously. - RunAsync *bool `json:"-"` - Model *ScheduledInterviewRequest `json:"model,omitempty"` - RemoteUserId string `json:"remote_user_id"` + RunAsync *bool `json:"-" url:"run_async,omitempty"` + Model *ScheduledInterviewRequest `json:"model,omitempty" url:"-"` + RemoteUserId string `json:"remote_user_id" url:"-"` } type InterviewsListRequest struct { // If provided, will only return interviews for this application. - ApplicationId *string `json:"-"` + ApplicationId *string `json:"-" url:"application_id,omitempty"` // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *InterviewsListRequestExpand `json:"-"` + Expand []*InterviewsListRequestExpandItem `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, wll only return interviews organized for this job. - JobId *string `json:"-"` + JobId *string `json:"-" url:"job_id,omitempty"` // If provided, will only return interviews at this stage. - JobInterviewStageId *string `json:"-"` + JobInterviewStageId *string `json:"-" url:"job_interview_stage_id,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // If provided, will only return interviews organized by this user. - OrganizerId *string `json:"-"` + OrganizerId *string `json:"-" url:"organizer_id,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // Deprecated. Use show_enum_origins. - RemoteFields *string `json:"-"` + RemoteFields *string `json:"-" url:"remote_fields,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` // 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) - ShowEnumOrigins *string `json:"-"` + ShowEnumOrigins *string `json:"-" url:"show_enum_origins,omitempty"` } type InterviewsRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *InterviewsRetrieveRequestExpand `json:"-"` + Expand []*InterviewsRetrieveRequestExpandItem `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // Deprecated. Use show_enum_origins. - RemoteFields *string `json:"-"` + RemoteFields *string `json:"-" url:"remote_fields,omitempty"` // 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) - ShowEnumOrigins *string `json:"-"` + ShowEnumOrigins *string `json:"-" url:"show_enum_origins,omitempty"` } -type InterviewsListRequestExpand string +type InterviewsListRequestExpandItem string const ( - InterviewsListRequestExpandApplication InterviewsListRequestExpand = "application" - InterviewsListRequestExpandApplicationJobInterviewStage InterviewsListRequestExpand = "application,job_interview_stage" - InterviewsListRequestExpandInterviewers InterviewsListRequestExpand = "interviewers" - InterviewsListRequestExpandInterviewersApplication InterviewsListRequestExpand = "interviewers,application" - InterviewsListRequestExpandInterviewersApplicationJobInterviewStage InterviewsListRequestExpand = "interviewers,application,job_interview_stage" - InterviewsListRequestExpandInterviewersJobInterviewStage InterviewsListRequestExpand = "interviewers,job_interview_stage" - InterviewsListRequestExpandInterviewersOrganizer InterviewsListRequestExpand = "interviewers,organizer" - InterviewsListRequestExpandInterviewersOrganizerApplication InterviewsListRequestExpand = "interviewers,organizer,application" - InterviewsListRequestExpandInterviewersOrganizerApplicationJobInterviewStage InterviewsListRequestExpand = "interviewers,organizer,application,job_interview_stage" - InterviewsListRequestExpandInterviewersOrganizerJobInterviewStage InterviewsListRequestExpand = "interviewers,organizer,job_interview_stage" - InterviewsListRequestExpandJobInterviewStage InterviewsListRequestExpand = "job_interview_stage" - InterviewsListRequestExpandOrganizer InterviewsListRequestExpand = "organizer" - InterviewsListRequestExpandOrganizerApplication InterviewsListRequestExpand = "organizer,application" - InterviewsListRequestExpandOrganizerApplicationJobInterviewStage InterviewsListRequestExpand = "organizer,application,job_interview_stage" - InterviewsListRequestExpandOrganizerJobInterviewStage InterviewsListRequestExpand = "organizer,job_interview_stage" + InterviewsListRequestExpandItemApplication InterviewsListRequestExpandItem = "application" + InterviewsListRequestExpandItemInterviewers InterviewsListRequestExpandItem = "interviewers" + InterviewsListRequestExpandItemJobInterviewStage InterviewsListRequestExpandItem = "job_interview_stage" + InterviewsListRequestExpandItemOrganizer InterviewsListRequestExpandItem = "organizer" ) -func NewInterviewsListRequestExpandFromString(s string) (InterviewsListRequestExpand, error) { +func NewInterviewsListRequestExpandItemFromString(s string) (InterviewsListRequestExpandItem, error) { switch s { case "application": - return InterviewsListRequestExpandApplication, nil - case "application,job_interview_stage": - return InterviewsListRequestExpandApplicationJobInterviewStage, nil + return InterviewsListRequestExpandItemApplication, nil case "interviewers": - return InterviewsListRequestExpandInterviewers, nil - case "interviewers,application": - return InterviewsListRequestExpandInterviewersApplication, nil - case "interviewers,application,job_interview_stage": - return InterviewsListRequestExpandInterviewersApplicationJobInterviewStage, nil - case "interviewers,job_interview_stage": - return InterviewsListRequestExpandInterviewersJobInterviewStage, nil - case "interviewers,organizer": - return InterviewsListRequestExpandInterviewersOrganizer, nil - case "interviewers,organizer,application": - return InterviewsListRequestExpandInterviewersOrganizerApplication, nil - case "interviewers,organizer,application,job_interview_stage": - return InterviewsListRequestExpandInterviewersOrganizerApplicationJobInterviewStage, nil - case "interviewers,organizer,job_interview_stage": - return InterviewsListRequestExpandInterviewersOrganizerJobInterviewStage, nil + return InterviewsListRequestExpandItemInterviewers, nil case "job_interview_stage": - return InterviewsListRequestExpandJobInterviewStage, nil + return InterviewsListRequestExpandItemJobInterviewStage, nil case "organizer": - return InterviewsListRequestExpandOrganizer, nil - case "organizer,application": - return InterviewsListRequestExpandOrganizerApplication, nil - case "organizer,application,job_interview_stage": - return InterviewsListRequestExpandOrganizerApplicationJobInterviewStage, nil - case "organizer,job_interview_stage": - return InterviewsListRequestExpandOrganizerJobInterviewStage, nil - } - var t InterviewsListRequestExpand + return InterviewsListRequestExpandItemOrganizer, nil + } + var t InterviewsListRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (i InterviewsListRequestExpand) Ptr() *InterviewsListRequestExpand { +func (i InterviewsListRequestExpandItem) Ptr() *InterviewsListRequestExpandItem { return &i } -type InterviewsRetrieveRequestExpand string +type InterviewsRetrieveRequestExpandItem string const ( - InterviewsRetrieveRequestExpandApplication InterviewsRetrieveRequestExpand = "application" - InterviewsRetrieveRequestExpandApplicationJobInterviewStage InterviewsRetrieveRequestExpand = "application,job_interview_stage" - InterviewsRetrieveRequestExpandInterviewers InterviewsRetrieveRequestExpand = "interviewers" - InterviewsRetrieveRequestExpandInterviewersApplication InterviewsRetrieveRequestExpand = "interviewers,application" - InterviewsRetrieveRequestExpandInterviewersApplicationJobInterviewStage InterviewsRetrieveRequestExpand = "interviewers,application,job_interview_stage" - InterviewsRetrieveRequestExpandInterviewersJobInterviewStage InterviewsRetrieveRequestExpand = "interviewers,job_interview_stage" - InterviewsRetrieveRequestExpandInterviewersOrganizer InterviewsRetrieveRequestExpand = "interviewers,organizer" - InterviewsRetrieveRequestExpandInterviewersOrganizerApplication InterviewsRetrieveRequestExpand = "interviewers,organizer,application" - InterviewsRetrieveRequestExpandInterviewersOrganizerApplicationJobInterviewStage InterviewsRetrieveRequestExpand = "interviewers,organizer,application,job_interview_stage" - InterviewsRetrieveRequestExpandInterviewersOrganizerJobInterviewStage InterviewsRetrieveRequestExpand = "interviewers,organizer,job_interview_stage" - InterviewsRetrieveRequestExpandJobInterviewStage InterviewsRetrieveRequestExpand = "job_interview_stage" - InterviewsRetrieveRequestExpandOrganizer InterviewsRetrieveRequestExpand = "organizer" - InterviewsRetrieveRequestExpandOrganizerApplication InterviewsRetrieveRequestExpand = "organizer,application" - InterviewsRetrieveRequestExpandOrganizerApplicationJobInterviewStage InterviewsRetrieveRequestExpand = "organizer,application,job_interview_stage" - InterviewsRetrieveRequestExpandOrganizerJobInterviewStage InterviewsRetrieveRequestExpand = "organizer,job_interview_stage" + InterviewsRetrieveRequestExpandItemApplication InterviewsRetrieveRequestExpandItem = "application" + InterviewsRetrieveRequestExpandItemInterviewers InterviewsRetrieveRequestExpandItem = "interviewers" + InterviewsRetrieveRequestExpandItemJobInterviewStage InterviewsRetrieveRequestExpandItem = "job_interview_stage" + InterviewsRetrieveRequestExpandItemOrganizer InterviewsRetrieveRequestExpandItem = "organizer" ) -func NewInterviewsRetrieveRequestExpandFromString(s string) (InterviewsRetrieveRequestExpand, error) { +func NewInterviewsRetrieveRequestExpandItemFromString(s string) (InterviewsRetrieveRequestExpandItem, error) { switch s { case "application": - return InterviewsRetrieveRequestExpandApplication, nil - case "application,job_interview_stage": - return InterviewsRetrieveRequestExpandApplicationJobInterviewStage, nil + return InterviewsRetrieveRequestExpandItemApplication, nil case "interviewers": - return InterviewsRetrieveRequestExpandInterviewers, nil - case "interviewers,application": - return InterviewsRetrieveRequestExpandInterviewersApplication, nil - case "interviewers,application,job_interview_stage": - return InterviewsRetrieveRequestExpandInterviewersApplicationJobInterviewStage, nil - case "interviewers,job_interview_stage": - return InterviewsRetrieveRequestExpandInterviewersJobInterviewStage, nil - case "interviewers,organizer": - return InterviewsRetrieveRequestExpandInterviewersOrganizer, nil - case "interviewers,organizer,application": - return InterviewsRetrieveRequestExpandInterviewersOrganizerApplication, nil - case "interviewers,organizer,application,job_interview_stage": - return InterviewsRetrieveRequestExpandInterviewersOrganizerApplicationJobInterviewStage, nil - case "interviewers,organizer,job_interview_stage": - return InterviewsRetrieveRequestExpandInterviewersOrganizerJobInterviewStage, nil + return InterviewsRetrieveRequestExpandItemInterviewers, nil case "job_interview_stage": - return InterviewsRetrieveRequestExpandJobInterviewStage, nil + return InterviewsRetrieveRequestExpandItemJobInterviewStage, nil case "organizer": - return InterviewsRetrieveRequestExpandOrganizer, nil - case "organizer,application": - return InterviewsRetrieveRequestExpandOrganizerApplication, nil - case "organizer,application,job_interview_stage": - return InterviewsRetrieveRequestExpandOrganizerApplicationJobInterviewStage, nil - case "organizer,job_interview_stage": - return InterviewsRetrieveRequestExpandOrganizerJobInterviewStage, nil - } - var t InterviewsRetrieveRequestExpand + return InterviewsRetrieveRequestExpandItemOrganizer, nil + } + var t InterviewsRetrieveRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (i InterviewsRetrieveRequestExpand) Ptr() *InterviewsRetrieveRequestExpand { +func (i InterviewsRetrieveRequestExpandItem) Ptr() *InterviewsRetrieveRequestExpandItem { return &i } + +type PaginatedScheduledInterviewList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*ScheduledInterview `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedScheduledInterviewList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedScheduledInterviewList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedScheduledInterviewList) GetResults() []*ScheduledInterview { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedScheduledInterviewList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedScheduledInterviewList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedScheduledInterviewList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedScheduledInterviewList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedScheduledInterviewList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +// # The ScheduledInterview Object +// ### Description +// The `ScheduledInterview` object is used to represent a scheduled interview for a given candidate’s application to a job. An `Application` can have multiple `ScheduledInterview`s depending on the particular hiring process. +// ### Usage Example +// Fetch from the `LIST ScheduledInterviews` endpoint and filter by `interviewers` to show all office locations. +type ScheduledInterviewRequest struct { + // The application being interviewed. + Application *ScheduledInterviewRequestApplication `json:"application,omitempty" url:"application,omitempty"` + // The stage of the interview. + JobInterviewStage *ScheduledInterviewRequestJobInterviewStage `json:"job_interview_stage,omitempty" url:"job_interview_stage,omitempty"` + // The user organizing the interview. + Organizer *ScheduledInterviewRequestOrganizer `json:"organizer,omitempty" url:"organizer,omitempty"` + // Array of `RemoteUser` IDs. + Interviewers []*ScheduledInterviewRequestInterviewersItem `json:"interviewers,omitempty" url:"interviewers,omitempty"` + // The interview's location. + Location *string `json:"location,omitempty" url:"location,omitempty"` + // When the interview was started. + StartAt *time.Time `json:"start_at,omitempty" url:"start_at,omitempty"` + // When the interview was ended. + EndAt *time.Time `json:"end_at,omitempty" url:"end_at,omitempty"` + // The interview's status. + // + // * `SCHEDULED` - SCHEDULED + // * `AWAITING_FEEDBACK` - AWAITING_FEEDBACK + // * `COMPLETE` - COMPLETE + Status *ScheduledInterviewRequestStatus `json:"status,omitempty" url:"status,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (s *ScheduledInterviewRequest) GetApplication() *ScheduledInterviewRequestApplication { + if s == nil { + return nil + } + return s.Application +} + +func (s *ScheduledInterviewRequest) GetJobInterviewStage() *ScheduledInterviewRequestJobInterviewStage { + if s == nil { + return nil + } + return s.JobInterviewStage +} + +func (s *ScheduledInterviewRequest) GetOrganizer() *ScheduledInterviewRequestOrganizer { + if s == nil { + return nil + } + return s.Organizer +} + +func (s *ScheduledInterviewRequest) GetInterviewers() []*ScheduledInterviewRequestInterviewersItem { + if s == nil { + return nil + } + return s.Interviewers +} + +func (s *ScheduledInterviewRequest) GetLocation() *string { + if s == nil { + return nil + } + return s.Location +} + +func (s *ScheduledInterviewRequest) GetStartAt() *time.Time { + if s == nil { + return nil + } + return s.StartAt +} + +func (s *ScheduledInterviewRequest) GetEndAt() *time.Time { + if s == nil { + return nil + } + return s.EndAt +} + +func (s *ScheduledInterviewRequest) GetStatus() *ScheduledInterviewRequestStatus { + if s == nil { + return nil + } + return s.Status +} + +func (s *ScheduledInterviewRequest) GetIntegrationParams() map[string]interface{} { + if s == nil { + return nil + } + return s.IntegrationParams +} + +func (s *ScheduledInterviewRequest) GetLinkedAccountParams() map[string]interface{} { + if s == nil { + return nil + } + return s.LinkedAccountParams +} + +func (s *ScheduledInterviewRequest) GetExtraProperties() map[string]interface{} { + return s.extraProperties +} + +func (s *ScheduledInterviewRequest) UnmarshalJSON(data []byte) error { + type embed ScheduledInterviewRequest + var unmarshaler = struct { + embed + StartAt *internal.DateTime `json:"start_at,omitempty"` + EndAt *internal.DateTime `json:"end_at,omitempty"` + }{ + embed: embed(*s), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *s = ScheduledInterviewRequest(unmarshaler.embed) + s.StartAt = unmarshaler.StartAt.TimePtr() + s.EndAt = unmarshaler.EndAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *s) + if err != nil { + return err + } + s.extraProperties = extraProperties + s.rawJSON = json.RawMessage(data) + return nil +} + +func (s *ScheduledInterviewRequest) MarshalJSON() ([]byte, error) { + type embed ScheduledInterviewRequest + var marshaler = struct { + embed + StartAt *internal.DateTime `json:"start_at,omitempty"` + EndAt *internal.DateTime `json:"end_at,omitempty"` + }{ + embed: embed(*s), + StartAt: internal.NewOptionalDateTime(s.StartAt), + EndAt: internal.NewOptionalDateTime(s.EndAt), + } + return json.Marshal(marshaler) +} + +func (s *ScheduledInterviewRequest) String() string { + if len(s.rawJSON) > 0 { + if value, err := internal.StringifyJSON(s.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(s); err == nil { + return value + } + return fmt.Sprintf("%#v", s) +} + +// The application being interviewed. +type ScheduledInterviewRequestApplication struct { + String string + Application *Application + + typ string +} + +func (s *ScheduledInterviewRequestApplication) GetString() string { + if s == nil { + return "" + } + return s.String +} + +func (s *ScheduledInterviewRequestApplication) GetApplication() *Application { + if s == nil { + return nil + } + return s.Application +} + +func (s *ScheduledInterviewRequestApplication) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + s.typ = "String" + s.String = valueString + return nil + } + valueApplication := new(Application) + if err := json.Unmarshal(data, &valueApplication); err == nil { + s.typ = "Application" + s.Application = valueApplication + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, s) +} + +func (s ScheduledInterviewRequestApplication) MarshalJSON() ([]byte, error) { + if s.typ == "String" || s.String != "" { + return json.Marshal(s.String) + } + if s.typ == "Application" || s.Application != nil { + return json.Marshal(s.Application) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", s) +} + +type ScheduledInterviewRequestApplicationVisitor interface { + VisitString(string) error + VisitApplication(*Application) error +} + +func (s *ScheduledInterviewRequestApplication) Accept(visitor ScheduledInterviewRequestApplicationVisitor) error { + if s.typ == "String" || s.String != "" { + return visitor.VisitString(s.String) + } + if s.typ == "Application" || s.Application != nil { + return visitor.VisitApplication(s.Application) + } + return fmt.Errorf("type %T does not include a non-empty union type", s) +} + +type ScheduledInterviewRequestInterviewersItem struct { + String string + RemoteUser *RemoteUser + + typ string +} + +func (s *ScheduledInterviewRequestInterviewersItem) GetString() string { + if s == nil { + return "" + } + return s.String +} + +func (s *ScheduledInterviewRequestInterviewersItem) GetRemoteUser() *RemoteUser { + if s == nil { + return nil + } + return s.RemoteUser +} + +func (s *ScheduledInterviewRequestInterviewersItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + s.typ = "String" + s.String = valueString + return nil + } + valueRemoteUser := new(RemoteUser) + if err := json.Unmarshal(data, &valueRemoteUser); err == nil { + s.typ = "RemoteUser" + s.RemoteUser = valueRemoteUser + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, s) +} + +func (s ScheduledInterviewRequestInterviewersItem) MarshalJSON() ([]byte, error) { + if s.typ == "String" || s.String != "" { + return json.Marshal(s.String) + } + if s.typ == "RemoteUser" || s.RemoteUser != nil { + return json.Marshal(s.RemoteUser) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", s) +} + +type ScheduledInterviewRequestInterviewersItemVisitor interface { + VisitString(string) error + VisitRemoteUser(*RemoteUser) error +} + +func (s *ScheduledInterviewRequestInterviewersItem) Accept(visitor ScheduledInterviewRequestInterviewersItemVisitor) error { + if s.typ == "String" || s.String != "" { + return visitor.VisitString(s.String) + } + if s.typ == "RemoteUser" || s.RemoteUser != nil { + return visitor.VisitRemoteUser(s.RemoteUser) + } + return fmt.Errorf("type %T does not include a non-empty union type", s) +} + +// The stage of the interview. +type ScheduledInterviewRequestJobInterviewStage struct { + String string + JobInterviewStage *JobInterviewStage + + typ string +} + +func (s *ScheduledInterviewRequestJobInterviewStage) GetString() string { + if s == nil { + return "" + } + return s.String +} + +func (s *ScheduledInterviewRequestJobInterviewStage) GetJobInterviewStage() *JobInterviewStage { + if s == nil { + return nil + } + return s.JobInterviewStage +} + +func (s *ScheduledInterviewRequestJobInterviewStage) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + s.typ = "String" + s.String = valueString + return nil + } + valueJobInterviewStage := new(JobInterviewStage) + if err := json.Unmarshal(data, &valueJobInterviewStage); err == nil { + s.typ = "JobInterviewStage" + s.JobInterviewStage = valueJobInterviewStage + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, s) +} + +func (s ScheduledInterviewRequestJobInterviewStage) MarshalJSON() ([]byte, error) { + if s.typ == "String" || s.String != "" { + return json.Marshal(s.String) + } + if s.typ == "JobInterviewStage" || s.JobInterviewStage != nil { + return json.Marshal(s.JobInterviewStage) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", s) +} + +type ScheduledInterviewRequestJobInterviewStageVisitor interface { + VisitString(string) error + VisitJobInterviewStage(*JobInterviewStage) error +} + +func (s *ScheduledInterviewRequestJobInterviewStage) Accept(visitor ScheduledInterviewRequestJobInterviewStageVisitor) error { + if s.typ == "String" || s.String != "" { + return visitor.VisitString(s.String) + } + if s.typ == "JobInterviewStage" || s.JobInterviewStage != nil { + return visitor.VisitJobInterviewStage(s.JobInterviewStage) + } + return fmt.Errorf("type %T does not include a non-empty union type", s) +} + +// The user organizing the interview. +type ScheduledInterviewRequestOrganizer struct { + String string + RemoteUser *RemoteUser + + typ string +} + +func (s *ScheduledInterviewRequestOrganizer) GetString() string { + if s == nil { + return "" + } + return s.String +} + +func (s *ScheduledInterviewRequestOrganizer) GetRemoteUser() *RemoteUser { + if s == nil { + return nil + } + return s.RemoteUser +} + +func (s *ScheduledInterviewRequestOrganizer) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + s.typ = "String" + s.String = valueString + return nil + } + valueRemoteUser := new(RemoteUser) + if err := json.Unmarshal(data, &valueRemoteUser); err == nil { + s.typ = "RemoteUser" + s.RemoteUser = valueRemoteUser + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, s) +} + +func (s ScheduledInterviewRequestOrganizer) MarshalJSON() ([]byte, error) { + if s.typ == "String" || s.String != "" { + return json.Marshal(s.String) + } + if s.typ == "RemoteUser" || s.RemoteUser != nil { + return json.Marshal(s.RemoteUser) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", s) +} + +type ScheduledInterviewRequestOrganizerVisitor interface { + VisitString(string) error + VisitRemoteUser(*RemoteUser) error +} + +func (s *ScheduledInterviewRequestOrganizer) Accept(visitor ScheduledInterviewRequestOrganizerVisitor) error { + if s.typ == "String" || s.String != "" { + return visitor.VisitString(s.String) + } + if s.typ == "RemoteUser" || s.RemoteUser != nil { + return visitor.VisitRemoteUser(s.RemoteUser) + } + return fmt.Errorf("type %T does not include a non-empty union type", s) +} + +// The interview's status. +// +// * `SCHEDULED` - SCHEDULED +// * `AWAITING_FEEDBACK` - AWAITING_FEEDBACK +// * `COMPLETE` - COMPLETE +type ScheduledInterviewRequestStatus struct { + ScheduledInterviewStatusEnum ScheduledInterviewStatusEnum + String string + + typ string +} + +func (s *ScheduledInterviewRequestStatus) GetScheduledInterviewStatusEnum() ScheduledInterviewStatusEnum { + if s == nil { + return "" + } + return s.ScheduledInterviewStatusEnum +} + +func (s *ScheduledInterviewRequestStatus) GetString() string { + if s == nil { + return "" + } + return s.String +} + +func (s *ScheduledInterviewRequestStatus) UnmarshalJSON(data []byte) error { + var valueScheduledInterviewStatusEnum ScheduledInterviewStatusEnum + if err := json.Unmarshal(data, &valueScheduledInterviewStatusEnum); err == nil { + s.typ = "ScheduledInterviewStatusEnum" + s.ScheduledInterviewStatusEnum = valueScheduledInterviewStatusEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + s.typ = "String" + s.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, s) +} + +func (s ScheduledInterviewRequestStatus) MarshalJSON() ([]byte, error) { + if s.typ == "ScheduledInterviewStatusEnum" || s.ScheduledInterviewStatusEnum != "" { + return json.Marshal(s.ScheduledInterviewStatusEnum) + } + if s.typ == "String" || s.String != "" { + return json.Marshal(s.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", s) +} + +type ScheduledInterviewRequestStatusVisitor interface { + VisitScheduledInterviewStatusEnum(ScheduledInterviewStatusEnum) error + VisitString(string) error +} + +func (s *ScheduledInterviewRequestStatus) Accept(visitor ScheduledInterviewRequestStatusVisitor) error { + if s.typ == "ScheduledInterviewStatusEnum" || s.ScheduledInterviewStatusEnum != "" { + return visitor.VisitScheduledInterviewStatusEnum(s.ScheduledInterviewStatusEnum) + } + if s.typ == "String" || s.String != "" { + return visitor.VisitString(s.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", s) +} + +type ScheduledInterviewResponse struct { + Model *ScheduledInterview `json:"model" url:"model"` + Warnings []*WarningValidationProblem `json:"warnings" url:"warnings"` + Errors []*ErrorValidationProblem `json:"errors" url:"errors"` + Logs []*DebugModeLog `json:"logs,omitempty" url:"logs,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (s *ScheduledInterviewResponse) GetModel() *ScheduledInterview { + if s == nil { + return nil + } + return s.Model +} + +func (s *ScheduledInterviewResponse) GetWarnings() []*WarningValidationProblem { + if s == nil { + return nil + } + return s.Warnings +} + +func (s *ScheduledInterviewResponse) GetErrors() []*ErrorValidationProblem { + if s == nil { + return nil + } + return s.Errors +} + +func (s *ScheduledInterviewResponse) GetLogs() []*DebugModeLog { + if s == nil { + return nil + } + return s.Logs +} + +func (s *ScheduledInterviewResponse) GetExtraProperties() map[string]interface{} { + return s.extraProperties +} + +func (s *ScheduledInterviewResponse) UnmarshalJSON(data []byte) error { + type unmarshaler ScheduledInterviewResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *s = ScheduledInterviewResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *s) + if err != nil { + return err + } + s.extraProperties = extraProperties + s.rawJSON = json.RawMessage(data) + return nil +} + +func (s *ScheduledInterviewResponse) String() string { + if len(s.rawJSON) > 0 { + if value, err := internal.StringifyJSON(s.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(s); err == nil { + return value + } + return fmt.Sprintf("%#v", s) +} diff --git a/ats/interviews/client.go b/ats/interviews/client.go index 210930e..f487323 100644 --- a/ats/interviews/client.go +++ b/ats/interviews/client.go @@ -1,142 +1,135 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package interviews import ( context "context" fmt "fmt" - ats "github.com/merge-api/merge-go-client/ats" - core "github.com/merge-api/merge-go-client/core" + ats "github.com/merge-api/merge-go-client/v2/ats" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `ScheduledInterview` objects. -func (c *Client) List(ctx context.Context, request *ats.InterviewsListRequest) (*ats.PaginatedScheduledInterviewList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ats/v1/interviews" - - queryParams := make(url.Values) - if request.ApplicationId != nil { - queryParams.Add("application_id", fmt.Sprintf("%v", *request.ApplicationId)) - } - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.JobId != nil { - queryParams.Add("job_id", fmt.Sprintf("%v", *request.JobId)) - } - if request.JobInterviewStageId != nil { - queryParams.Add("job_interview_stage_id", fmt.Sprintf("%v", *request.JobInterviewStageId)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.OrganizerId != nil { - queryParams.Add("organizer_id", fmt.Sprintf("%v", *request.OrganizerId)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteFields != nil { - queryParams.Add("remote_fields", fmt.Sprintf("%v", request.RemoteFields)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if request.ShowEnumOrigins != nil { - queryParams.Add("show_enum_origins", fmt.Sprintf("%v", request.ShowEnumOrigins)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *ats.PaginatedScheduledInterviewList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *ats.InterviewsListRequest, + opts ...option.RequestOption, +) (*core.Page[*ats.ScheduledInterview], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ats/v1/interviews" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *ats.PaginatedScheduledInterviewList) *internal.PageResponse[*string, *ats.ScheduledInterview] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *ats.ScheduledInterview]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Creates a `ScheduledInterview` object with the given values. -func (c *Client) Create(ctx context.Context, request *ats.ScheduledInterviewEndpointRequest) (*ats.ScheduledInterviewResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ats/v1/interviews" - - queryParams := make(url.Values) - if request.IsDebugMode != nil { - queryParams.Add("is_debug_mode", fmt.Sprintf("%v", *request.IsDebugMode)) - } - if request.RunAsync != nil { - queryParams.Add("run_async", fmt.Sprintf("%v", *request.RunAsync)) +func (c *Client) Create( + ctx context.Context, + request *ats.ScheduledInterviewEndpointRequest, + opts ...option.RequestOption, +) (*ats.ScheduledInterviewResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ats/v1/interviews" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *ats.ScheduledInterviewResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -145,38 +138,46 @@ func (c *Client) Create(ctx context.Context, request *ats.ScheduledInterviewEndp } // Returns a `ScheduledInterview` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *ats.InterviewsRetrieveRequest) (*ats.ScheduledInterview, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"ats/v1/interviews/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.RemoteFields != nil { - queryParams.Add("remote_fields", fmt.Sprintf("%v", request.RemoteFields)) - } - if request.ShowEnumOrigins != nil { - queryParams.Add("show_enum_origins", fmt.Sprintf("%v", request.ShowEnumOrigins)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *ats.InterviewsRetrieveRequest, + opts ...option.RequestOption, +) (*ats.ScheduledInterview, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/ats/v1/interviews/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ats.ScheduledInterview if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -185,21 +186,34 @@ func (c *Client) Retrieve(ctx context.Context, id string, request *ats.Interview } // Returns metadata for `ScheduledInterview` POSTs. -func (c *Client) MetaPostRetrieve(ctx context.Context) (*ats.MetaResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ats/v1/interviews/meta/post" +func (c *Client) MetaPostRetrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*ats.MetaResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ats/v1/interviews/meta/post" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ats.MetaResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/ats/issues.go b/ats/issues.go index 8d84637..0309633 100644 --- a/ats/issues.go +++ b/ats/issues.go @@ -1,41 +1,43 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package ats import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type IssuesListRequest struct { - AccountToken *string `json:"-"` + AccountToken *string `json:"-" url:"account_token,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // If included, will only include issues whose most recent action occurred before this time - EndDate *string `json:"-"` - EndUserOrganizationName *string `json:"-"` + EndDate *string `json:"-" url:"end_date,omitempty"` + EndUserOrganizationName *string `json:"-" url:"end_user_organization_name,omitempty"` // If provided, will only return issues whose first incident time was after this datetime. - FirstIncidentTimeAfter *time.Time `json:"-"` + FirstIncidentTimeAfter *time.Time `json:"-" url:"first_incident_time_after,omitempty"` // If provided, will only return issues whose first incident time was before this datetime. - FirstIncidentTimeBefore *time.Time `json:"-"` + FirstIncidentTimeBefore *time.Time `json:"-" url:"first_incident_time_before,omitempty"` // If true, will include muted issues - IncludeMuted *string `json:"-"` - IntegrationName *string `json:"-"` + IncludeMuted *string `json:"-" url:"include_muted,omitempty"` + IntegrationName *string `json:"-" url:"integration_name,omitempty"` // If provided, will only return issues whose last incident time was after this datetime. - LastIncidentTimeAfter *time.Time `json:"-"` + LastIncidentTimeAfter *time.Time `json:"-" url:"last_incident_time_after,omitempty"` // If provided, will only return issues whose last incident time was before this datetime. - LastIncidentTimeBefore *time.Time `json:"-"` + LastIncidentTimeBefore *time.Time `json:"-" url:"last_incident_time_before,omitempty"` // If provided, will only include issues pertaining to the linked account passed in. - LinkedAccountId *string `json:"-"` + LinkedAccountId *string `json:"-" url:"linked_account_id,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // If included, will only include issues whose most recent action occurred after this time - StartDate *string `json:"-"` + StartDate *string `json:"-" url:"start_date,omitempty"` // Status of the issue. Options: ('ONGOING', 'RESOLVED') // - // - `ONGOING` - ONGOING - // - `RESOLVED` - RESOLVED - Status *IssuesListRequestStatus `json:"-"` + // * `ONGOING` - ONGOING + // * `RESOLVED` - RESOLVED + Status *IssuesListRequestStatus `json:"-" url:"status,omitempty"` } type IssuesListRequestStatus string @@ -59,3 +61,283 @@ func NewIssuesListRequestStatusFromString(s string) (IssuesListRequestStatus, er func (i IssuesListRequestStatus) Ptr() *IssuesListRequestStatus { return &i } + +type Issue struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // Status of the issue. Options: ('ONGOING', 'RESOLVED') + // + // * `ONGOING` - ONGOING + // * `RESOLVED` - RESOLVED + Status *IssueStatus `json:"status,omitempty" url:"status,omitempty"` + ErrorDescription string `json:"error_description" url:"error_description"` + EndUser map[string]interface{} `json:"end_user,omitempty" url:"end_user,omitempty"` + FirstIncidentTime *time.Time `json:"first_incident_time,omitempty" url:"first_incident_time,omitempty"` + LastIncidentTime *time.Time `json:"last_incident_time,omitempty" url:"last_incident_time,omitempty"` + IsMuted *bool `json:"is_muted,omitempty" url:"is_muted,omitempty"` + ErrorDetails []string `json:"error_details,omitempty" url:"error_details,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (i *Issue) GetId() *string { + if i == nil { + return nil + } + return i.Id +} + +func (i *Issue) GetStatus() *IssueStatus { + if i == nil { + return nil + } + return i.Status +} + +func (i *Issue) GetErrorDescription() string { + if i == nil { + return "" + } + return i.ErrorDescription +} + +func (i *Issue) GetEndUser() map[string]interface{} { + if i == nil { + return nil + } + return i.EndUser +} + +func (i *Issue) GetFirstIncidentTime() *time.Time { + if i == nil { + return nil + } + return i.FirstIncidentTime +} + +func (i *Issue) GetLastIncidentTime() *time.Time { + if i == nil { + return nil + } + return i.LastIncidentTime +} + +func (i *Issue) GetIsMuted() *bool { + if i == nil { + return nil + } + return i.IsMuted +} + +func (i *Issue) GetErrorDetails() []string { + if i == nil { + return nil + } + return i.ErrorDetails +} + +func (i *Issue) GetExtraProperties() map[string]interface{} { + return i.extraProperties +} + +func (i *Issue) UnmarshalJSON(data []byte) error { + type embed Issue + var unmarshaler = struct { + embed + FirstIncidentTime *internal.DateTime `json:"first_incident_time,omitempty"` + LastIncidentTime *internal.DateTime `json:"last_incident_time,omitempty"` + }{ + embed: embed(*i), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *i = Issue(unmarshaler.embed) + i.FirstIncidentTime = unmarshaler.FirstIncidentTime.TimePtr() + i.LastIncidentTime = unmarshaler.LastIncidentTime.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *i) + if err != nil { + return err + } + i.extraProperties = extraProperties + i.rawJSON = json.RawMessage(data) + return nil +} + +func (i *Issue) MarshalJSON() ([]byte, error) { + type embed Issue + var marshaler = struct { + embed + FirstIncidentTime *internal.DateTime `json:"first_incident_time,omitempty"` + LastIncidentTime *internal.DateTime `json:"last_incident_time,omitempty"` + }{ + embed: embed(*i), + FirstIncidentTime: internal.NewOptionalDateTime(i.FirstIncidentTime), + LastIncidentTime: internal.NewOptionalDateTime(i.LastIncidentTime), + } + return json.Marshal(marshaler) +} + +func (i *Issue) String() string { + if len(i.rawJSON) > 0 { + if value, err := internal.StringifyJSON(i.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(i); err == nil { + return value + } + return fmt.Sprintf("%#v", i) +} + +// Status of the issue. Options: ('ONGOING', 'RESOLVED') +// +// * `ONGOING` - ONGOING +// * `RESOLVED` - RESOLVED +type IssueStatus struct { + IssueStatusEnum IssueStatusEnum + String string + + typ string +} + +func (i *IssueStatus) GetIssueStatusEnum() IssueStatusEnum { + if i == nil { + return "" + } + return i.IssueStatusEnum +} + +func (i *IssueStatus) GetString() string { + if i == nil { + return "" + } + return i.String +} + +func (i *IssueStatus) UnmarshalJSON(data []byte) error { + var valueIssueStatusEnum IssueStatusEnum + if err := json.Unmarshal(data, &valueIssueStatusEnum); err == nil { + i.typ = "IssueStatusEnum" + i.IssueStatusEnum = valueIssueStatusEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + i.typ = "String" + i.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) +} + +func (i IssueStatus) MarshalJSON() ([]byte, error) { + if i.typ == "IssueStatusEnum" || i.IssueStatusEnum != "" { + return json.Marshal(i.IssueStatusEnum) + } + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) +} + +type IssueStatusVisitor interface { + VisitIssueStatusEnum(IssueStatusEnum) error + VisitString(string) error +} + +func (i *IssueStatus) Accept(visitor IssueStatusVisitor) error { + if i.typ == "IssueStatusEnum" || i.IssueStatusEnum != "" { + return visitor.VisitIssueStatusEnum(i.IssueStatusEnum) + } + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", i) +} + +// * `ONGOING` - ONGOING +// * `RESOLVED` - RESOLVED +type IssueStatusEnum string + +const ( + IssueStatusEnumOngoing IssueStatusEnum = "ONGOING" + IssueStatusEnumResolved IssueStatusEnum = "RESOLVED" +) + +func NewIssueStatusEnumFromString(s string) (IssueStatusEnum, error) { + switch s { + case "ONGOING": + return IssueStatusEnumOngoing, nil + case "RESOLVED": + return IssueStatusEnumResolved, nil + } + var t IssueStatusEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (i IssueStatusEnum) Ptr() *IssueStatusEnum { + return &i +} + +type PaginatedIssueList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Issue `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedIssueList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedIssueList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedIssueList) GetResults() []*Issue { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedIssueList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedIssueList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedIssueList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedIssueList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedIssueList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} diff --git a/ats/issues/client.go b/ats/issues/client.go index 9c99507..83202d7 100644 --- a/ats/issues/client.go +++ b/ats/issues/client.go @@ -1,121 +1,129 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package issues import ( context "context" fmt "fmt" - ats "github.com/merge-api/merge-go-client/ats" - core "github.com/merge-api/merge-go-client/core" + ats "github.com/merge-api/merge-go-client/v2/ats" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Gets all issues for Organization. -func (c *Client) List(ctx context.Context, request *ats.IssuesListRequest) (*ats.PaginatedIssueList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ats/v1/issues" - - queryParams := make(url.Values) - if request.AccountToken != nil { - queryParams.Add("account_token", fmt.Sprintf("%v", *request.AccountToken)) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.EndDate != nil { - queryParams.Add("end_date", fmt.Sprintf("%v", *request.EndDate)) - } - if request.EndUserOrganizationName != nil { - queryParams.Add("end_user_organization_name", fmt.Sprintf("%v", *request.EndUserOrganizationName)) - } - if request.FirstIncidentTimeAfter != nil { - queryParams.Add("first_incident_time_after", fmt.Sprintf("%v", request.FirstIncidentTimeAfter.Format(time.RFC3339))) - } - if request.FirstIncidentTimeBefore != nil { - queryParams.Add("first_incident_time_before", fmt.Sprintf("%v", request.FirstIncidentTimeBefore.Format(time.RFC3339))) - } - if request.IncludeMuted != nil { - queryParams.Add("include_muted", fmt.Sprintf("%v", *request.IncludeMuted)) - } - if request.IntegrationName != nil { - queryParams.Add("integration_name", fmt.Sprintf("%v", *request.IntegrationName)) - } - if request.LastIncidentTimeAfter != nil { - queryParams.Add("last_incident_time_after", fmt.Sprintf("%v", request.LastIncidentTimeAfter.Format(time.RFC3339))) - } - if request.LastIncidentTimeBefore != nil { - queryParams.Add("last_incident_time_before", fmt.Sprintf("%v", request.LastIncidentTimeBefore.Format(time.RFC3339))) - } - if request.LinkedAccountId != nil { - queryParams.Add("linked_account_id", fmt.Sprintf("%v", *request.LinkedAccountId)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.StartDate != nil { - queryParams.Add("start_date", fmt.Sprintf("%v", *request.StartDate)) - } - if request.Status != nil { - queryParams.Add("status", fmt.Sprintf("%v", *request.Status)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *ats.PaginatedIssueList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *ats.IssuesListRequest, + opts ...option.RequestOption, +) (*core.Page[*ats.Issue], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ats/v1/issues" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *ats.PaginatedIssueList) *internal.PageResponse[*string, *ats.Issue] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *ats.Issue]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Get a specific issue. -func (c *Client) Retrieve(ctx context.Context, id string) (*ats.Issue, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"ats/v1/issues/%v", id) +func (c *Client) Retrieve( + ctx context.Context, + id string, + opts ...option.RequestOption, +) (*ats.Issue, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/ats/v1/issues/%v", + id, + ) + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ats.Issue if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/ats/job_interview_stages.go b/ats/job_interview_stages.go index b4d7116..8a38519 100644 --- a/ats/job_interview_stages.go +++ b/ats/job_interview_stages.go @@ -1,41 +1,108 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package ats import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type JobInterviewStagesListRequest struct { // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *string `json:"-"` + Expand []*string `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, will only return interview stages for this job. - JobId *string `json:"-"` + JobId *string `json:"-" url:"job_id,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` } type JobInterviewStagesRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *string `json:"-"` + Expand []*string `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` +} + +type PaginatedJobInterviewStageList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*JobInterviewStage `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedJobInterviewStageList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedJobInterviewStageList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedJobInterviewStageList) GetResults() []*JobInterviewStage { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedJobInterviewStageList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedJobInterviewStageList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedJobInterviewStageList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedJobInterviewStageList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedJobInterviewStageList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) } diff --git a/ats/job_postings.go b/ats/job_postings.go index 587dbfb..b680819 100644 --- a/ats/job_postings.go +++ b/ats/job_postings.go @@ -1,50 +1,54 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package ats import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type JobPostingsListRequest struct { // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *string `json:"-"` + Expand []*string `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` // 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 - Status *JobPostingsListRequestStatus `json:"-"` + // * `PUBLISHED` - PUBLISHED + // * `CLOSED` - CLOSED + // * `DRAFT` - DRAFT + // * `INTERNAL` - INTERNAL + // * `PENDING` - PENDING + Status *JobPostingsListRequestStatus `json:"-" url:"status,omitempty"` } type JobPostingsRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *string `json:"-"` + Expand []*string `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` } type JobPostingsListRequestStatus string @@ -77,3 +81,506 @@ func NewJobPostingsListRequestStatusFromString(s string) (JobPostingsListRequest func (j JobPostingsListRequestStatus) Ptr() *JobPostingsListRequestStatus { return &j } + +// # 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. +type JobPosting struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The job posting’s title. + Title *string `json:"title,omitempty" url:"title,omitempty"` + // The Url object is used to represent hyperlinks for a candidate to apply to a given job. + JobPostingUrls []*JobPostingJobPostingUrlsItem `json:"job_posting_urls,omitempty" url:"job_posting_urls,omitempty"` + // ID of `Job` object for this `JobPosting`. + Job *JobPostingJob `json:"job,omitempty" url:"job,omitempty"` + // The job posting's status. + // + // * `PUBLISHED` - PUBLISHED + // * `CLOSED` - CLOSED + // * `DRAFT` - DRAFT + // * `INTERNAL` - INTERNAL + // * `PENDING` - PENDING + Status *JobPostingStatus `json:"status,omitempty" url:"status,omitempty"` + // The job posting’s content. + Content *string `json:"content,omitempty" url:"content,omitempty"` + // When the third party's job posting was created. + RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty" url:"remote_created_at,omitempty"` + // When the third party's job posting was updated. + RemoteUpdatedAt *time.Time `json:"remote_updated_at,omitempty" url:"remote_updated_at,omitempty"` + // Indicates whether the job posting is internal or external. + IsInternal *bool `json:"is_internal,omitempty" url:"is_internal,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (j *JobPosting) GetId() *string { + if j == nil { + return nil + } + return j.Id +} + +func (j *JobPosting) GetRemoteId() *string { + if j == nil { + return nil + } + return j.RemoteId +} + +func (j *JobPosting) GetCreatedAt() *time.Time { + if j == nil { + return nil + } + return j.CreatedAt +} + +func (j *JobPosting) GetModifiedAt() *time.Time { + if j == nil { + return nil + } + return j.ModifiedAt +} + +func (j *JobPosting) GetTitle() *string { + if j == nil { + return nil + } + return j.Title +} + +func (j *JobPosting) GetJobPostingUrls() []*JobPostingJobPostingUrlsItem { + if j == nil { + return nil + } + return j.JobPostingUrls +} + +func (j *JobPosting) GetJob() *JobPostingJob { + if j == nil { + return nil + } + return j.Job +} + +func (j *JobPosting) GetStatus() *JobPostingStatus { + if j == nil { + return nil + } + return j.Status +} + +func (j *JobPosting) GetContent() *string { + if j == nil { + return nil + } + return j.Content +} + +func (j *JobPosting) GetRemoteCreatedAt() *time.Time { + if j == nil { + return nil + } + return j.RemoteCreatedAt +} + +func (j *JobPosting) GetRemoteUpdatedAt() *time.Time { + if j == nil { + return nil + } + return j.RemoteUpdatedAt +} + +func (j *JobPosting) GetIsInternal() *bool { + if j == nil { + return nil + } + return j.IsInternal +} + +func (j *JobPosting) GetRemoteWasDeleted() *bool { + if j == nil { + return nil + } + return j.RemoteWasDeleted +} + +func (j *JobPosting) GetFieldMappings() map[string]interface{} { + if j == nil { + return nil + } + return j.FieldMappings +} + +func (j *JobPosting) GetRemoteData() []*RemoteData { + if j == nil { + return nil + } + return j.RemoteData +} + +func (j *JobPosting) GetExtraProperties() map[string]interface{} { + return j.extraProperties +} + +func (j *JobPosting) UnmarshalJSON(data []byte) error { + type embed JobPosting + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + RemoteUpdatedAt *internal.DateTime `json:"remote_updated_at,omitempty"` + }{ + embed: embed(*j), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *j = JobPosting(unmarshaler.embed) + j.CreatedAt = unmarshaler.CreatedAt.TimePtr() + j.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + j.RemoteCreatedAt = unmarshaler.RemoteCreatedAt.TimePtr() + j.RemoteUpdatedAt = unmarshaler.RemoteUpdatedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *j) + if err != nil { + return err + } + j.extraProperties = extraProperties + j.rawJSON = json.RawMessage(data) + return nil +} + +func (j *JobPosting) MarshalJSON() ([]byte, error) { + type embed JobPosting + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + RemoteUpdatedAt *internal.DateTime `json:"remote_updated_at,omitempty"` + }{ + embed: embed(*j), + CreatedAt: internal.NewOptionalDateTime(j.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(j.ModifiedAt), + RemoteCreatedAt: internal.NewOptionalDateTime(j.RemoteCreatedAt), + RemoteUpdatedAt: internal.NewOptionalDateTime(j.RemoteUpdatedAt), + } + return json.Marshal(marshaler) +} + +func (j *JobPosting) String() string { + if len(j.rawJSON) > 0 { + if value, err := internal.StringifyJSON(j.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(j); err == nil { + return value + } + return fmt.Sprintf("%#v", j) +} + +// ID of `Job` object for this `JobPosting`. +type JobPostingJob struct { + String string + Job *Job + + typ string +} + +func (j *JobPostingJob) GetString() string { + if j == nil { + return "" + } + return j.String +} + +func (j *JobPostingJob) GetJob() *Job { + if j == nil { + return nil + } + return j.Job +} + +func (j *JobPostingJob) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + j.typ = "String" + j.String = valueString + return nil + } + valueJob := new(Job) + if err := json.Unmarshal(data, &valueJob); err == nil { + j.typ = "Job" + j.Job = valueJob + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, j) +} + +func (j JobPostingJob) MarshalJSON() ([]byte, error) { + if j.typ == "String" || j.String != "" { + return json.Marshal(j.String) + } + if j.typ == "Job" || j.Job != nil { + return json.Marshal(j.Job) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", j) +} + +type JobPostingJobVisitor interface { + VisitString(string) error + VisitJob(*Job) error +} + +func (j *JobPostingJob) Accept(visitor JobPostingJobVisitor) error { + if j.typ == "String" || j.String != "" { + return visitor.VisitString(j.String) + } + if j.typ == "Job" || j.Job != nil { + return visitor.VisitJob(j.Job) + } + return fmt.Errorf("type %T does not include a non-empty union type", j) +} + +type JobPostingJobPostingUrlsItem struct { + String string + Url *Url + + typ string +} + +func (j *JobPostingJobPostingUrlsItem) GetString() string { + if j == nil { + return "" + } + return j.String +} + +func (j *JobPostingJobPostingUrlsItem) GetUrl() *Url { + if j == nil { + return nil + } + return j.Url +} + +func (j *JobPostingJobPostingUrlsItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + j.typ = "String" + j.String = valueString + return nil + } + valueUrl := new(Url) + if err := json.Unmarshal(data, &valueUrl); err == nil { + j.typ = "Url" + j.Url = valueUrl + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, j) +} + +func (j JobPostingJobPostingUrlsItem) MarshalJSON() ([]byte, error) { + if j.typ == "String" || j.String != "" { + return json.Marshal(j.String) + } + if j.typ == "Url" || j.Url != nil { + return json.Marshal(j.Url) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", j) +} + +type JobPostingJobPostingUrlsItemVisitor interface { + VisitString(string) error + VisitUrl(*Url) error +} + +func (j *JobPostingJobPostingUrlsItem) Accept(visitor JobPostingJobPostingUrlsItemVisitor) error { + if j.typ == "String" || j.String != "" { + return visitor.VisitString(j.String) + } + if j.typ == "Url" || j.Url != nil { + return visitor.VisitUrl(j.Url) + } + return fmt.Errorf("type %T does not include a non-empty union type", j) +} + +// The job posting's status. +// +// * `PUBLISHED` - PUBLISHED +// * `CLOSED` - CLOSED +// * `DRAFT` - DRAFT +// * `INTERNAL` - INTERNAL +// * `PENDING` - PENDING +type JobPostingStatus struct { + JobPostingStatusEnum JobPostingStatusEnum + String string + + typ string +} + +func (j *JobPostingStatus) GetJobPostingStatusEnum() JobPostingStatusEnum { + if j == nil { + return "" + } + return j.JobPostingStatusEnum +} + +func (j *JobPostingStatus) GetString() string { + if j == nil { + return "" + } + return j.String +} + +func (j *JobPostingStatus) UnmarshalJSON(data []byte) error { + var valueJobPostingStatusEnum JobPostingStatusEnum + if err := json.Unmarshal(data, &valueJobPostingStatusEnum); err == nil { + j.typ = "JobPostingStatusEnum" + j.JobPostingStatusEnum = valueJobPostingStatusEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + j.typ = "String" + j.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, j) +} + +func (j JobPostingStatus) MarshalJSON() ([]byte, error) { + if j.typ == "JobPostingStatusEnum" || j.JobPostingStatusEnum != "" { + return json.Marshal(j.JobPostingStatusEnum) + } + if j.typ == "String" || j.String != "" { + return json.Marshal(j.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", j) +} + +type JobPostingStatusVisitor interface { + VisitJobPostingStatusEnum(JobPostingStatusEnum) error + VisitString(string) error +} + +func (j *JobPostingStatus) Accept(visitor JobPostingStatusVisitor) error { + if j.typ == "JobPostingStatusEnum" || j.JobPostingStatusEnum != "" { + return visitor.VisitJobPostingStatusEnum(j.JobPostingStatusEnum) + } + if j.typ == "String" || j.String != "" { + return visitor.VisitString(j.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", j) +} + +// * `PUBLISHED` - PUBLISHED +// * `CLOSED` - CLOSED +// * `DRAFT` - DRAFT +// * `INTERNAL` - INTERNAL +// * `PENDING` - PENDING +type JobPostingStatusEnum string + +const ( + JobPostingStatusEnumPublished JobPostingStatusEnum = "PUBLISHED" + JobPostingStatusEnumClosed JobPostingStatusEnum = "CLOSED" + JobPostingStatusEnumDraft JobPostingStatusEnum = "DRAFT" + JobPostingStatusEnumInternal JobPostingStatusEnum = "INTERNAL" + JobPostingStatusEnumPending JobPostingStatusEnum = "PENDING" +) + +func NewJobPostingStatusEnumFromString(s string) (JobPostingStatusEnum, error) { + switch s { + case "PUBLISHED": + return JobPostingStatusEnumPublished, nil + case "CLOSED": + return JobPostingStatusEnumClosed, nil + case "DRAFT": + return JobPostingStatusEnumDraft, nil + case "INTERNAL": + return JobPostingStatusEnumInternal, nil + case "PENDING": + return JobPostingStatusEnumPending, nil + } + var t JobPostingStatusEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (j JobPostingStatusEnum) Ptr() *JobPostingStatusEnum { + return &j +} + +type PaginatedJobPostingList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*JobPosting `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedJobPostingList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedJobPostingList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedJobPostingList) GetResults() []*JobPosting { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedJobPostingList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedJobPostingList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedJobPostingList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedJobPostingList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedJobPostingList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} diff --git a/ats/jobinterviewstages/client.go b/ats/jobinterviewstages/client.go index e629252..d7cda0e 100644 --- a/ats/jobinterviewstages/client.go +++ b/ats/jobinterviewstages/client.go @@ -1,126 +1,137 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package jobinterviewstages import ( context "context" fmt "fmt" - ats "github.com/merge-api/merge-go-client/ats" - core "github.com/merge-api/merge-go-client/core" + ats "github.com/merge-api/merge-go-client/v2/ats" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `JobInterviewStage` objects. -func (c *Client) List(ctx context.Context, request *ats.JobInterviewStagesListRequest) (*ats.PaginatedJobInterviewStageList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ats/v1/job-interview-stages" - - queryParams := make(url.Values) - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.JobId != nil { - queryParams.Add("job_id", fmt.Sprintf("%v", *request.JobId)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *ats.PaginatedJobInterviewStageList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *ats.JobInterviewStagesListRequest, + opts ...option.RequestOption, +) (*core.Page[*ats.JobInterviewStage], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ats/v1/job-interview-stages" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *ats.PaginatedJobInterviewStageList) *internal.PageResponse[*string, *ats.JobInterviewStage] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *ats.JobInterviewStage]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Returns a `JobInterviewStage` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *ats.JobInterviewStagesRetrieveRequest) (*ats.JobInterviewStage, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"ats/v1/job-interview-stages/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *ats.JobInterviewStagesRetrieveRequest, + opts ...option.RequestOption, +) (*ats.JobInterviewStage, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/ats/v1/job-interview-stages/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ats.JobInterviewStage if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/ats/jobpostings/client.go b/ats/jobpostings/client.go index 11dd5d1..960be64 100644 --- a/ats/jobpostings/client.go +++ b/ats/jobpostings/client.go @@ -1,126 +1,137 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package jobpostings import ( context "context" fmt "fmt" - ats "github.com/merge-api/merge-go-client/ats" - core "github.com/merge-api/merge-go-client/core" + ats "github.com/merge-api/merge-go-client/v2/ats" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `JobPosting` objects. -func (c *Client) List(ctx context.Context, request *ats.JobPostingsListRequest) (*ats.PaginatedJobPostingList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ats/v1/job-postings" - - queryParams := make(url.Values) - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if request.Status != nil { - queryParams.Add("status", fmt.Sprintf("%v", *request.Status)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *ats.PaginatedJobPostingList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *ats.JobPostingsListRequest, + opts ...option.RequestOption, +) (*core.Page[*ats.JobPosting], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ats/v1/job-postings" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *ats.PaginatedJobPostingList) *internal.PageResponse[*string, *ats.JobPosting] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *ats.JobPosting]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Returns a `JobPosting` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *ats.JobPostingsRetrieveRequest) (*ats.JobPosting, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"ats/v1/job-postings/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *ats.JobPostingsRetrieveRequest, + opts ...option.RequestOption, +) (*ats.JobPosting, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/ats/v1/job-postings/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ats.JobPosting if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/ats/jobs.go b/ats/jobs.go index 2b47d24..abbf6ff 100644 --- a/ats/jobs.go +++ b/ats/jobs.go @@ -1,185 +1,111 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package ats import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type JobsListRequest struct { // If provided, will only return jobs with this code. - Code *string `json:"-"` + Code *string `json:"-" url:"code,omitempty"` // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *JobsListRequestExpand `json:"-"` + Expand []*JobsListRequestExpandItem `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // If provided, will only return jobs for this office; multiple offices can be separated by commas. - Offices *string `json:"-"` + Offices *string `json:"-" url:"offices,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // Deprecated. Use show_enum_origins. - RemoteFields *string `json:"-"` + RemoteFields *string `json:"-" url:"remote_fields,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` // 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) - ShowEnumOrigins *string `json:"-"` + ShowEnumOrigins *string `json:"-" url:"show_enum_origins,omitempty"` // If provided, will only return jobs with this status. Options: ('OPEN', 'CLOSED', 'DRAFT', 'ARCHIVED', 'PENDING') // - // - `OPEN` - OPEN - // - `CLOSED` - CLOSED - // - `DRAFT` - DRAFT - // - `ARCHIVED` - ARCHIVED - // - `PENDING` - PENDING - Status *JobsListRequestStatus `json:"-"` + // * `OPEN` - OPEN + // * `CLOSED` - CLOSED + // * `DRAFT` - DRAFT + // * `ARCHIVED` - ARCHIVED + // * `PENDING` - PENDING + Status *JobsListRequestStatus `json:"-" url:"status,omitempty"` } type JobsRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *JobsRetrieveRequestExpand `json:"-"` + Expand []*JobsRetrieveRequestExpandItem `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // Deprecated. Use show_enum_origins. - RemoteFields *string `json:"-"` + RemoteFields *string `json:"-" url:"remote_fields,omitempty"` // 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) - ShowEnumOrigins *string `json:"-"` + ShowEnumOrigins *string `json:"-" url:"show_enum_origins,omitempty"` } type JobsScreeningQuestionsListRequest struct { // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *JobsScreeningQuestionsListRequestExpand `json:"-"` + Expand []*JobsScreeningQuestionsListRequestExpandItem `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` } -type JobsListRequestExpand string +type JobsListRequestExpandItem string const ( - JobsListRequestExpandDepartments JobsListRequestExpand = "departments" - JobsListRequestExpandDepartmentsHiringManagers JobsListRequestExpand = "departments,hiring_managers" - JobsListRequestExpandDepartmentsHiringManagersJobPostings JobsListRequestExpand = "departments,hiring_managers,job_postings" - JobsListRequestExpandDepartmentsHiringManagersJobPostingsRecruiters JobsListRequestExpand = "departments,hiring_managers,job_postings,recruiters" - JobsListRequestExpandDepartmentsHiringManagersRecruiters JobsListRequestExpand = "departments,hiring_managers,recruiters" - JobsListRequestExpandDepartmentsJobPostings JobsListRequestExpand = "departments,job_postings" - JobsListRequestExpandDepartmentsJobPostingsRecruiters JobsListRequestExpand = "departments,job_postings,recruiters" - JobsListRequestExpandDepartmentsOffices JobsListRequestExpand = "departments,offices" - JobsListRequestExpandDepartmentsOfficesHiringManagers JobsListRequestExpand = "departments,offices,hiring_managers" - JobsListRequestExpandDepartmentsOfficesHiringManagersJobPostings JobsListRequestExpand = "departments,offices,hiring_managers,job_postings" - JobsListRequestExpandDepartmentsOfficesHiringManagersJobPostingsRecruiters JobsListRequestExpand = "departments,offices,hiring_managers,job_postings,recruiters" - JobsListRequestExpandDepartmentsOfficesHiringManagersRecruiters JobsListRequestExpand = "departments,offices,hiring_managers,recruiters" - JobsListRequestExpandDepartmentsOfficesJobPostings JobsListRequestExpand = "departments,offices,job_postings" - JobsListRequestExpandDepartmentsOfficesJobPostingsRecruiters JobsListRequestExpand = "departments,offices,job_postings,recruiters" - JobsListRequestExpandDepartmentsOfficesRecruiters JobsListRequestExpand = "departments,offices,recruiters" - JobsListRequestExpandDepartmentsRecruiters JobsListRequestExpand = "departments,recruiters" - JobsListRequestExpandHiringManagers JobsListRequestExpand = "hiring_managers" - JobsListRequestExpandHiringManagersJobPostings JobsListRequestExpand = "hiring_managers,job_postings" - JobsListRequestExpandHiringManagersJobPostingsRecruiters JobsListRequestExpand = "hiring_managers,job_postings,recruiters" - JobsListRequestExpandHiringManagersRecruiters JobsListRequestExpand = "hiring_managers,recruiters" - JobsListRequestExpandJobPostings JobsListRequestExpand = "job_postings" - JobsListRequestExpandJobPostingsRecruiters JobsListRequestExpand = "job_postings,recruiters" - JobsListRequestExpandOffices JobsListRequestExpand = "offices" - JobsListRequestExpandOfficesHiringManagers JobsListRequestExpand = "offices,hiring_managers" - JobsListRequestExpandOfficesHiringManagersJobPostings JobsListRequestExpand = "offices,hiring_managers,job_postings" - JobsListRequestExpandOfficesHiringManagersJobPostingsRecruiters JobsListRequestExpand = "offices,hiring_managers,job_postings,recruiters" - JobsListRequestExpandOfficesHiringManagersRecruiters JobsListRequestExpand = "offices,hiring_managers,recruiters" - JobsListRequestExpandOfficesJobPostings JobsListRequestExpand = "offices,job_postings" - JobsListRequestExpandOfficesJobPostingsRecruiters JobsListRequestExpand = "offices,job_postings,recruiters" - JobsListRequestExpandOfficesRecruiters JobsListRequestExpand = "offices,recruiters" - JobsListRequestExpandRecruiters JobsListRequestExpand = "recruiters" + JobsListRequestExpandItemDepartments JobsListRequestExpandItem = "departments" + JobsListRequestExpandItemHiringManagers JobsListRequestExpandItem = "hiring_managers" + JobsListRequestExpandItemJobPostings JobsListRequestExpandItem = "job_postings" + JobsListRequestExpandItemOffices JobsListRequestExpandItem = "offices" + JobsListRequestExpandItemRecruiters JobsListRequestExpandItem = "recruiters" ) -func NewJobsListRequestExpandFromString(s string) (JobsListRequestExpand, error) { +func NewJobsListRequestExpandItemFromString(s string) (JobsListRequestExpandItem, error) { switch s { case "departments": - return JobsListRequestExpandDepartments, nil - case "departments,hiring_managers": - return JobsListRequestExpandDepartmentsHiringManagers, nil - case "departments,hiring_managers,job_postings": - return JobsListRequestExpandDepartmentsHiringManagersJobPostings, nil - case "departments,hiring_managers,job_postings,recruiters": - return JobsListRequestExpandDepartmentsHiringManagersJobPostingsRecruiters, nil - case "departments,hiring_managers,recruiters": - return JobsListRequestExpandDepartmentsHiringManagersRecruiters, nil - case "departments,job_postings": - return JobsListRequestExpandDepartmentsJobPostings, nil - case "departments,job_postings,recruiters": - return JobsListRequestExpandDepartmentsJobPostingsRecruiters, nil - case "departments,offices": - return JobsListRequestExpandDepartmentsOffices, nil - case "departments,offices,hiring_managers": - return JobsListRequestExpandDepartmentsOfficesHiringManagers, nil - case "departments,offices,hiring_managers,job_postings": - return JobsListRequestExpandDepartmentsOfficesHiringManagersJobPostings, nil - case "departments,offices,hiring_managers,job_postings,recruiters": - return JobsListRequestExpandDepartmentsOfficesHiringManagersJobPostingsRecruiters, nil - case "departments,offices,hiring_managers,recruiters": - return JobsListRequestExpandDepartmentsOfficesHiringManagersRecruiters, nil - case "departments,offices,job_postings": - return JobsListRequestExpandDepartmentsOfficesJobPostings, nil - case "departments,offices,job_postings,recruiters": - return JobsListRequestExpandDepartmentsOfficesJobPostingsRecruiters, nil - case "departments,offices,recruiters": - return JobsListRequestExpandDepartmentsOfficesRecruiters, nil - case "departments,recruiters": - return JobsListRequestExpandDepartmentsRecruiters, nil + return JobsListRequestExpandItemDepartments, nil case "hiring_managers": - return JobsListRequestExpandHiringManagers, nil - case "hiring_managers,job_postings": - return JobsListRequestExpandHiringManagersJobPostings, nil - case "hiring_managers,job_postings,recruiters": - return JobsListRequestExpandHiringManagersJobPostingsRecruiters, nil - case "hiring_managers,recruiters": - return JobsListRequestExpandHiringManagersRecruiters, nil + return JobsListRequestExpandItemHiringManagers, nil case "job_postings": - return JobsListRequestExpandJobPostings, nil - case "job_postings,recruiters": - return JobsListRequestExpandJobPostingsRecruiters, nil + return JobsListRequestExpandItemJobPostings, nil case "offices": - return JobsListRequestExpandOffices, nil - case "offices,hiring_managers": - return JobsListRequestExpandOfficesHiringManagers, nil - case "offices,hiring_managers,job_postings": - return JobsListRequestExpandOfficesHiringManagersJobPostings, nil - case "offices,hiring_managers,job_postings,recruiters": - return JobsListRequestExpandOfficesHiringManagersJobPostingsRecruiters, nil - case "offices,hiring_managers,recruiters": - return JobsListRequestExpandOfficesHiringManagersRecruiters, nil - case "offices,job_postings": - return JobsListRequestExpandOfficesJobPostings, nil - case "offices,job_postings,recruiters": - return JobsListRequestExpandOfficesJobPostingsRecruiters, nil - case "offices,recruiters": - return JobsListRequestExpandOfficesRecruiters, nil + return JobsListRequestExpandItemOffices, nil case "recruiters": - return JobsListRequestExpandRecruiters, nil + return JobsListRequestExpandItemRecruiters, nil } - var t JobsListRequestExpand + var t JobsListRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (j JobsListRequestExpand) Ptr() *JobsListRequestExpand { +func (j JobsListRequestExpandItem) Ptr() *JobsListRequestExpandItem { return &j } @@ -214,136 +140,179 @@ func (j JobsListRequestStatus) Ptr() *JobsListRequestStatus { return &j } -type JobsRetrieveRequestExpand string +type JobsRetrieveRequestExpandItem string const ( - JobsRetrieveRequestExpandDepartments JobsRetrieveRequestExpand = "departments" - JobsRetrieveRequestExpandDepartmentsHiringManagers JobsRetrieveRequestExpand = "departments,hiring_managers" - JobsRetrieveRequestExpandDepartmentsHiringManagersJobPostings JobsRetrieveRequestExpand = "departments,hiring_managers,job_postings" - JobsRetrieveRequestExpandDepartmentsHiringManagersJobPostingsRecruiters JobsRetrieveRequestExpand = "departments,hiring_managers,job_postings,recruiters" - JobsRetrieveRequestExpandDepartmentsHiringManagersRecruiters JobsRetrieveRequestExpand = "departments,hiring_managers,recruiters" - JobsRetrieveRequestExpandDepartmentsJobPostings JobsRetrieveRequestExpand = "departments,job_postings" - JobsRetrieveRequestExpandDepartmentsJobPostingsRecruiters JobsRetrieveRequestExpand = "departments,job_postings,recruiters" - JobsRetrieveRequestExpandDepartmentsOffices JobsRetrieveRequestExpand = "departments,offices" - JobsRetrieveRequestExpandDepartmentsOfficesHiringManagers JobsRetrieveRequestExpand = "departments,offices,hiring_managers" - JobsRetrieveRequestExpandDepartmentsOfficesHiringManagersJobPostings JobsRetrieveRequestExpand = "departments,offices,hiring_managers,job_postings" - JobsRetrieveRequestExpandDepartmentsOfficesHiringManagersJobPostingsRecruiters JobsRetrieveRequestExpand = "departments,offices,hiring_managers,job_postings,recruiters" - JobsRetrieveRequestExpandDepartmentsOfficesHiringManagersRecruiters JobsRetrieveRequestExpand = "departments,offices,hiring_managers,recruiters" - JobsRetrieveRequestExpandDepartmentsOfficesJobPostings JobsRetrieveRequestExpand = "departments,offices,job_postings" - JobsRetrieveRequestExpandDepartmentsOfficesJobPostingsRecruiters JobsRetrieveRequestExpand = "departments,offices,job_postings,recruiters" - JobsRetrieveRequestExpandDepartmentsOfficesRecruiters JobsRetrieveRequestExpand = "departments,offices,recruiters" - JobsRetrieveRequestExpandDepartmentsRecruiters JobsRetrieveRequestExpand = "departments,recruiters" - JobsRetrieveRequestExpandHiringManagers JobsRetrieveRequestExpand = "hiring_managers" - JobsRetrieveRequestExpandHiringManagersJobPostings JobsRetrieveRequestExpand = "hiring_managers,job_postings" - JobsRetrieveRequestExpandHiringManagersJobPostingsRecruiters JobsRetrieveRequestExpand = "hiring_managers,job_postings,recruiters" - JobsRetrieveRequestExpandHiringManagersRecruiters JobsRetrieveRequestExpand = "hiring_managers,recruiters" - JobsRetrieveRequestExpandJobPostings JobsRetrieveRequestExpand = "job_postings" - JobsRetrieveRequestExpandJobPostingsRecruiters JobsRetrieveRequestExpand = "job_postings,recruiters" - JobsRetrieveRequestExpandOffices JobsRetrieveRequestExpand = "offices" - JobsRetrieveRequestExpandOfficesHiringManagers JobsRetrieveRequestExpand = "offices,hiring_managers" - JobsRetrieveRequestExpandOfficesHiringManagersJobPostings JobsRetrieveRequestExpand = "offices,hiring_managers,job_postings" - JobsRetrieveRequestExpandOfficesHiringManagersJobPostingsRecruiters JobsRetrieveRequestExpand = "offices,hiring_managers,job_postings,recruiters" - JobsRetrieveRequestExpandOfficesHiringManagersRecruiters JobsRetrieveRequestExpand = "offices,hiring_managers,recruiters" - JobsRetrieveRequestExpandOfficesJobPostings JobsRetrieveRequestExpand = "offices,job_postings" - JobsRetrieveRequestExpandOfficesJobPostingsRecruiters JobsRetrieveRequestExpand = "offices,job_postings,recruiters" - JobsRetrieveRequestExpandOfficesRecruiters JobsRetrieveRequestExpand = "offices,recruiters" - JobsRetrieveRequestExpandRecruiters JobsRetrieveRequestExpand = "recruiters" + JobsRetrieveRequestExpandItemDepartments JobsRetrieveRequestExpandItem = "departments" + JobsRetrieveRequestExpandItemHiringManagers JobsRetrieveRequestExpandItem = "hiring_managers" + JobsRetrieveRequestExpandItemJobPostings JobsRetrieveRequestExpandItem = "job_postings" + JobsRetrieveRequestExpandItemOffices JobsRetrieveRequestExpandItem = "offices" + JobsRetrieveRequestExpandItemRecruiters JobsRetrieveRequestExpandItem = "recruiters" ) -func NewJobsRetrieveRequestExpandFromString(s string) (JobsRetrieveRequestExpand, error) { +func NewJobsRetrieveRequestExpandItemFromString(s string) (JobsRetrieveRequestExpandItem, error) { switch s { case "departments": - return JobsRetrieveRequestExpandDepartments, nil - case "departments,hiring_managers": - return JobsRetrieveRequestExpandDepartmentsHiringManagers, nil - case "departments,hiring_managers,job_postings": - return JobsRetrieveRequestExpandDepartmentsHiringManagersJobPostings, nil - case "departments,hiring_managers,job_postings,recruiters": - return JobsRetrieveRequestExpandDepartmentsHiringManagersJobPostingsRecruiters, nil - case "departments,hiring_managers,recruiters": - return JobsRetrieveRequestExpandDepartmentsHiringManagersRecruiters, nil - case "departments,job_postings": - return JobsRetrieveRequestExpandDepartmentsJobPostings, nil - case "departments,job_postings,recruiters": - return JobsRetrieveRequestExpandDepartmentsJobPostingsRecruiters, nil - case "departments,offices": - return JobsRetrieveRequestExpandDepartmentsOffices, nil - case "departments,offices,hiring_managers": - return JobsRetrieveRequestExpandDepartmentsOfficesHiringManagers, nil - case "departments,offices,hiring_managers,job_postings": - return JobsRetrieveRequestExpandDepartmentsOfficesHiringManagersJobPostings, nil - case "departments,offices,hiring_managers,job_postings,recruiters": - return JobsRetrieveRequestExpandDepartmentsOfficesHiringManagersJobPostingsRecruiters, nil - case "departments,offices,hiring_managers,recruiters": - return JobsRetrieveRequestExpandDepartmentsOfficesHiringManagersRecruiters, nil - case "departments,offices,job_postings": - return JobsRetrieveRequestExpandDepartmentsOfficesJobPostings, nil - case "departments,offices,job_postings,recruiters": - return JobsRetrieveRequestExpandDepartmentsOfficesJobPostingsRecruiters, nil - case "departments,offices,recruiters": - return JobsRetrieveRequestExpandDepartmentsOfficesRecruiters, nil - case "departments,recruiters": - return JobsRetrieveRequestExpandDepartmentsRecruiters, nil + return JobsRetrieveRequestExpandItemDepartments, nil case "hiring_managers": - return JobsRetrieveRequestExpandHiringManagers, nil - case "hiring_managers,job_postings": - return JobsRetrieveRequestExpandHiringManagersJobPostings, nil - case "hiring_managers,job_postings,recruiters": - return JobsRetrieveRequestExpandHiringManagersJobPostingsRecruiters, nil - case "hiring_managers,recruiters": - return JobsRetrieveRequestExpandHiringManagersRecruiters, nil + return JobsRetrieveRequestExpandItemHiringManagers, nil case "job_postings": - return JobsRetrieveRequestExpandJobPostings, nil - case "job_postings,recruiters": - return JobsRetrieveRequestExpandJobPostingsRecruiters, nil + return JobsRetrieveRequestExpandItemJobPostings, nil case "offices": - return JobsRetrieveRequestExpandOffices, nil - case "offices,hiring_managers": - return JobsRetrieveRequestExpandOfficesHiringManagers, nil - case "offices,hiring_managers,job_postings": - return JobsRetrieveRequestExpandOfficesHiringManagersJobPostings, nil - case "offices,hiring_managers,job_postings,recruiters": - return JobsRetrieveRequestExpandOfficesHiringManagersJobPostingsRecruiters, nil - case "offices,hiring_managers,recruiters": - return JobsRetrieveRequestExpandOfficesHiringManagersRecruiters, nil - case "offices,job_postings": - return JobsRetrieveRequestExpandOfficesJobPostings, nil - case "offices,job_postings,recruiters": - return JobsRetrieveRequestExpandOfficesJobPostingsRecruiters, nil - case "offices,recruiters": - return JobsRetrieveRequestExpandOfficesRecruiters, nil + return JobsRetrieveRequestExpandItemOffices, nil case "recruiters": - return JobsRetrieveRequestExpandRecruiters, nil + return JobsRetrieveRequestExpandItemRecruiters, nil } - var t JobsRetrieveRequestExpand + var t JobsRetrieveRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (j JobsRetrieveRequestExpand) Ptr() *JobsRetrieveRequestExpand { +func (j JobsRetrieveRequestExpandItem) Ptr() *JobsRetrieveRequestExpandItem { return &j } -type JobsScreeningQuestionsListRequestExpand string +type JobsScreeningQuestionsListRequestExpandItem string const ( - JobsScreeningQuestionsListRequestExpandJob JobsScreeningQuestionsListRequestExpand = "job" - JobsScreeningQuestionsListRequestExpandOptions JobsScreeningQuestionsListRequestExpand = "options" - JobsScreeningQuestionsListRequestExpandOptionsJob JobsScreeningQuestionsListRequestExpand = "options,job" + JobsScreeningQuestionsListRequestExpandItemJob JobsScreeningQuestionsListRequestExpandItem = "job" + JobsScreeningQuestionsListRequestExpandItemOptions JobsScreeningQuestionsListRequestExpandItem = "options" ) -func NewJobsScreeningQuestionsListRequestExpandFromString(s string) (JobsScreeningQuestionsListRequestExpand, error) { +func NewJobsScreeningQuestionsListRequestExpandItemFromString(s string) (JobsScreeningQuestionsListRequestExpandItem, error) { switch s { case "job": - return JobsScreeningQuestionsListRequestExpandJob, nil + return JobsScreeningQuestionsListRequestExpandItemJob, nil case "options": - return JobsScreeningQuestionsListRequestExpandOptions, nil - case "options,job": - return JobsScreeningQuestionsListRequestExpandOptionsJob, nil + return JobsScreeningQuestionsListRequestExpandItemOptions, nil } - var t JobsScreeningQuestionsListRequestExpand + var t JobsScreeningQuestionsListRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (j JobsScreeningQuestionsListRequestExpand) Ptr() *JobsScreeningQuestionsListRequestExpand { +func (j JobsScreeningQuestionsListRequestExpandItem) Ptr() *JobsScreeningQuestionsListRequestExpandItem { return &j } + +type PaginatedJobList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Job `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedJobList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedJobList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedJobList) GetResults() []*Job { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedJobList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedJobList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedJobList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedJobList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedJobList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +type PaginatedScreeningQuestionList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*ScreeningQuestion `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedScreeningQuestionList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedScreeningQuestionList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedScreeningQuestionList) GetResults() []*ScreeningQuestion { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedScreeningQuestionList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedScreeningQuestionList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedScreeningQuestionList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedScreeningQuestionList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedScreeningQuestionList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} diff --git a/ats/jobs/client.go b/ats/jobs/client.go index 63f75a4..b3457b7 100644 --- a/ats/jobs/client.go +++ b/ats/jobs/client.go @@ -1,144 +1,137 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package jobs import ( context "context" fmt "fmt" - ats "github.com/merge-api/merge-go-client/ats" - core "github.com/merge-api/merge-go-client/core" + ats "github.com/merge-api/merge-go-client/v2/ats" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `Job` objects. -func (c *Client) List(ctx context.Context, request *ats.JobsListRequest) (*ats.PaginatedJobList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ats/v1/jobs" - - queryParams := make(url.Values) - if request.Code != nil { - queryParams.Add("code", fmt.Sprintf("%v", *request.Code)) - } - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.Offices != nil { - queryParams.Add("offices", fmt.Sprintf("%v", *request.Offices)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteFields != nil { - queryParams.Add("remote_fields", fmt.Sprintf("%v", request.RemoteFields)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if request.ShowEnumOrigins != nil { - queryParams.Add("show_enum_origins", fmt.Sprintf("%v", request.ShowEnumOrigins)) - } - if request.Status != nil { - queryParams.Add("status", fmt.Sprintf("%v", *request.Status)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *ats.PaginatedJobList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *ats.JobsListRequest, + opts ...option.RequestOption, +) (*core.Page[*ats.Job], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ats/v1/jobs" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *ats.PaginatedJobList) *internal.PageResponse[*string, *ats.Job] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *ats.Job]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Returns a `Job` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *ats.JobsRetrieveRequest) (*ats.Job, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"ats/v1/jobs/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.RemoteFields != nil { - queryParams.Add("remote_fields", fmt.Sprintf("%v", request.RemoteFields)) - } - if request.ShowEnumOrigins != nil { - queryParams.Add("show_enum_origins", fmt.Sprintf("%v", request.ShowEnumOrigins)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *ats.JobsRetrieveRequest, + opts ...option.RequestOption, +) (*ats.Job, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/ats/v1/jobs/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ats.Job if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -147,47 +140,64 @@ func (c *Client) Retrieve(ctx context.Context, id string, request *ats.JobsRetri } // Returns a list of `ScreeningQuestion` objects. -func (c *Client) ScreeningQuestionsList(ctx context.Context, jobId string, request *ats.JobsScreeningQuestionsListRequest) (*ats.PaginatedScreeningQuestionList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"ats/v1/jobs/%v/screening-questions", jobId) - - queryParams := make(url.Values) - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *ats.PaginatedScreeningQuestionList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) ScreeningQuestionsList( + ctx context.Context, + jobId string, + request *ats.JobsScreeningQuestionsListRequest, + opts ...option.RequestOption, +) (*core.Page[*ats.ScreeningQuestion], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/ats/v1/jobs/%v/screening-questions", + jobId, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *ats.PaginatedScreeningQuestionList) *internal.PageResponse[*string, *ats.ScreeningQuestion] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *ats.ScreeningQuestion]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } diff --git a/ats/link_token.go b/ats/link_token.go index 486591d..6b6e45b 100644 --- a/ats/link_token.go +++ b/ats/link_token.go @@ -1,35 +1,279 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package ats +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" +) + type EndUserDetailsRequest struct { // Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent. - EndUserEmailAddress string `json:"end_user_email_address"` + EndUserEmailAddress string `json:"end_user_email_address" url:"-"` // Your end user's organization. - EndUserOrganizationName string `json:"end_user_organization_name"` + EndUserOrganizationName string `json:"end_user_organization_name" url:"-"` // This unique identifier typically represents the ID for your end user in your product's database. This value must be distinct from other Linked Accounts' unique identifiers. - EndUserOriginId string `json:"end_user_origin_id"` + EndUserOriginId string `json:"end_user_origin_id" url:"-"` // The integration categories to show in Merge Link. - Categories []CategoriesEnum `json:"categories,omitempty"` + Categories []CategoriesEnum `json:"categories,omitempty" url:"-"` // The slug of a specific pre-selected integration for this linking flow token. For examples of slugs, see https://docs.merge.dev/guides/merge-link/single-integration/. - Integration *string `json:"integration,omitempty"` + Integration *string `json:"integration,omitempty" url:"-"` // An integer number of minutes between [30, 720 or 10080 if for a Magic Link URL] for how long this token is valid. Defaults to 30. - LinkExpiryMins *int `json:"link_expiry_mins,omitempty"` + LinkExpiryMins *int `json:"link_expiry_mins,omitempty" url:"-"` // Whether to generate a Magic Link URL. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. - ShouldCreateMagicLinkUrl *bool `json:"should_create_magic_link_url,omitempty"` + ShouldCreateMagicLinkUrl *bool `json:"should_create_magic_link_url,omitempty" url:"-"` // Whether to generate a Magic Link URL on the Admin Needed screen during the linking flow. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. - HideAdminMagicLink *bool `json:"hide_admin_magic_link,omitempty"` + HideAdminMagicLink *bool `json:"hide_admin_magic_link,omitempty" url:"-"` // An array of objects to specify the models and fields that will be disabled for a given Linked Account. Each object uses model_id, enabled_actions, and disabled_fields to specify the model, method, and fields that are scoped for a given Linked Account. - CommonModels []*CommonModelScopesBodyRequest `json:"common_models,omitempty"` + CommonModels []*CommonModelScopesBodyRequest `json:"common_models,omitempty" url:"-"` // 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. - CategoryCommonModelScopes map[string][]*IndividualCommonModelScopeDeserializerRequest `json:"category_common_model_scopes,omitempty"` + CategoryCommonModelScopes map[string][]*IndividualCommonModelScopeDeserializerRequest `json:"category_common_model_scopes,omitempty" url:"-"` // The following subset of IETF language tags can be used to configure localization. // // * `en` - en // * `de` - de - Language *LanguageEnum `json:"language,omitempty"` + Language *EndUserDetailsRequestLanguage `json:"language,omitempty" url:"-"` // The boolean that indicates whether initial, periodic, and force syncs will be disabled. - AreSyncsDisabled *bool `json:"are_syncs_disabled,omitempty"` + AreSyncsDisabled *bool `json:"are_syncs_disabled,omitempty" url:"-"` // A JSON object containing integration-specific configuration options. - IntegrationSpecificConfig map[string]interface{} `json:"integration_specific_config,omitempty"` + IntegrationSpecificConfig map[string]interface{} `json:"integration_specific_config,omitempty" url:"-"` +} + +// The following subset of IETF language tags can be used to configure localization. +// +// * `en` - en +// * `de` - de +type EndUserDetailsRequestLanguage struct { + LanguageEnum LanguageEnum + String string + + typ string +} + +func (e *EndUserDetailsRequestLanguage) GetLanguageEnum() LanguageEnum { + if e == nil { + return "" + } + return e.LanguageEnum +} + +func (e *EndUserDetailsRequestLanguage) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *EndUserDetailsRequestLanguage) UnmarshalJSON(data []byte) error { + var valueLanguageEnum LanguageEnum + if err := json.Unmarshal(data, &valueLanguageEnum); err == nil { + e.typ = "LanguageEnum" + e.LanguageEnum = valueLanguageEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e EndUserDetailsRequestLanguage) MarshalJSON() ([]byte, error) { + if e.typ == "LanguageEnum" || e.LanguageEnum != "" { + return json.Marshal(e.LanguageEnum) + } + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type EndUserDetailsRequestLanguageVisitor interface { + VisitLanguageEnum(LanguageEnum) error + VisitString(string) error +} + +func (e *EndUserDetailsRequestLanguage) Accept(visitor EndUserDetailsRequestLanguageVisitor) error { + if e.typ == "LanguageEnum" || e.LanguageEnum != "" { + return visitor.VisitLanguageEnum(e.LanguageEnum) + } + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type CommonModelScopesBodyRequest struct { + ModelId string `json:"model_id" url:"model_id"` + EnabledActions []EnabledActionsEnum `json:"enabled_actions" url:"enabled_actions"` + DisabledFields []string `json:"disabled_fields" url:"disabled_fields"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (c *CommonModelScopesBodyRequest) GetModelId() string { + if c == nil { + return "" + } + return c.ModelId +} + +func (c *CommonModelScopesBodyRequest) GetEnabledActions() []EnabledActionsEnum { + if c == nil { + return nil + } + return c.EnabledActions +} + +func (c *CommonModelScopesBodyRequest) GetDisabledFields() []string { + if c == nil { + return nil + } + return c.DisabledFields +} + +func (c *CommonModelScopesBodyRequest) GetExtraProperties() map[string]interface{} { + return c.extraProperties +} + +func (c *CommonModelScopesBodyRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CommonModelScopesBodyRequest + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *c = CommonModelScopesBodyRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *c) + if err != nil { + return err + } + c.extraProperties = extraProperties + c.rawJSON = json.RawMessage(data) + return nil +} + +func (c *CommonModelScopesBodyRequest) String() string { + if len(c.rawJSON) > 0 { + if value, err := internal.StringifyJSON(c.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(c); err == nil { + return value + } + return fmt.Sprintf("%#v", c) +} + +// * `READ` - READ +// * `WRITE` - WRITE +type EnabledActionsEnum string + +const ( + EnabledActionsEnumRead EnabledActionsEnum = "READ" + EnabledActionsEnumWrite EnabledActionsEnum = "WRITE" +) + +func NewEnabledActionsEnumFromString(s string) (EnabledActionsEnum, error) { + switch s { + case "READ": + return EnabledActionsEnumRead, nil + case "WRITE": + return EnabledActionsEnumWrite, nil + } + var t EnabledActionsEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (e EnabledActionsEnum) Ptr() *EnabledActionsEnum { + return &e +} + +// * `en` - en +// * `de` - de +type LanguageEnum string + +const ( + LanguageEnumEn LanguageEnum = "en" + LanguageEnumDe LanguageEnum = "de" +) + +func NewLanguageEnumFromString(s string) (LanguageEnum, error) { + switch s { + case "en": + return LanguageEnumEn, nil + case "de": + return LanguageEnumDe, nil + } + var t LanguageEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (l LanguageEnum) Ptr() *LanguageEnum { + return &l +} + +type LinkToken struct { + LinkToken string `json:"link_token" url:"link_token"` + IntegrationName *string `json:"integration_name,omitempty" url:"integration_name,omitempty"` + MagicLinkUrl *string `json:"magic_link_url,omitempty" url:"magic_link_url,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (l *LinkToken) GetLinkToken() string { + if l == nil { + return "" + } + return l.LinkToken +} + +func (l *LinkToken) GetIntegrationName() *string { + if l == nil { + return nil + } + return l.IntegrationName +} + +func (l *LinkToken) GetMagicLinkUrl() *string { + if l == nil { + return nil + } + return l.MagicLinkUrl +} + +func (l *LinkToken) GetExtraProperties() map[string]interface{} { + return l.extraProperties +} + +func (l *LinkToken) UnmarshalJSON(data []byte) error { + type unmarshaler LinkToken + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *l = LinkToken(value) + extraProperties, err := internal.ExtractExtraProperties(data, *l) + if err != nil { + return err + } + l.extraProperties = extraProperties + l.rawJSON = json.RawMessage(data) + return nil +} + +func (l *LinkToken) String() string { + if len(l.rawJSON) > 0 { + if value, err := internal.StringifyJSON(l.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(l); err == nil { + return value + } + return fmt.Sprintf("%#v", l) } diff --git a/ats/linked_accounts.go b/ats/linked_accounts.go index 97c3025..3bcad14 100644 --- a/ats/linked_accounts.go +++ b/ats/linked_accounts.go @@ -1,45 +1,48 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package ats import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" + time "time" ) type LinkedAccountsListRequest struct { // Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing` // - // - `hris` - hris - // - `ats` - ats - // - `accounting` - accounting - // - `ticketing` - ticketing - // - `crm` - crm - // - `mktg` - mktg - // - `filestorage` - filestorage - Category *LinkedAccountsListRequestCategory `json:"-"` + // * `hris` - hris + // * `ats` - ats + // * `accounting` - accounting + // * `ticketing` - ticketing + // * `crm` - crm + // * `mktg` - mktg + // * `filestorage` - filestorage + Category *LinkedAccountsListRequestCategory `json:"-" url:"category,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // If provided, will only return linked accounts associated with the given email address. - EndUserEmailAddress *string `json:"-"` + EndUserEmailAddress *string `json:"-" url:"end_user_email_address,omitempty"` // If provided, will only return linked accounts associated with the given organization name. - EndUserOrganizationName *string `json:"-"` + EndUserOrganizationName *string `json:"-" url:"end_user_organization_name,omitempty"` // If provided, will only return linked accounts associated with the given origin ID. - EndUserOriginId *string `json:"-"` + EndUserOriginId *string `json:"-" url:"end_user_origin_id,omitempty"` // Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once. - EndUserOriginIds *string `json:"-"` - Id *string `json:"-"` + EndUserOriginIds *string `json:"-" url:"end_user_origin_ids,omitempty"` + Id *string `json:"-" url:"id,omitempty"` // Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once. - Ids *string `json:"-"` + Ids *string `json:"-" url:"ids,omitempty"` // If `true`, will include complete production duplicates of the account specified by the `id` query parameter in the response. `id` must be for a complete production linked account. - IncludeDuplicates *bool `json:"-"` + IncludeDuplicates *bool `json:"-" url:"include_duplicates,omitempty"` // If provided, will only return linked accounts associated with the given integration name. - IntegrationName *string `json:"-"` + IntegrationName *string `json:"-" url:"integration_name,omitempty"` // If included, will only include test linked accounts. If not included, will only include non-test linked accounts. - IsTestAccount *string `json:"-"` + IsTestAccount *string `json:"-" url:"is_test_account,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED` - Status *string `json:"-"` + Status *string `json:"-" url:"status,omitempty"` } type LinkedAccountsListRequestCategory string @@ -78,3 +81,491 @@ func NewLinkedAccountsListRequestCategoryFromString(s string) (LinkedAccountsLis func (l LinkedAccountsListRequestCategory) Ptr() *LinkedAccountsListRequestCategory { return &l } + +// # The LinkedAccount Object +// ### Description +// The `LinkedAccount` object is used to represent an end user's link with a specific integration. +// +// ### Usage Example +// View a list of your organization's `LinkedAccount` objects. +type AccountDetailsAndActions struct { + Id string `json:"id" url:"id"` + Category *AccountDetailsAndActionsCategory `json:"category,omitempty" url:"category,omitempty"` + Status *AccountDetailsAndActionsStatus `json:"status" url:"status"` + StatusDetail *string `json:"status_detail,omitempty" url:"status_detail,omitempty"` + EndUserOriginId *string `json:"end_user_origin_id,omitempty" url:"end_user_origin_id,omitempty"` + EndUserOrganizationName string `json:"end_user_organization_name" url:"end_user_organization_name"` + EndUserEmailAddress string `json:"end_user_email_address" url:"end_user_email_address"` + // The tenant or domain the customer has provided access to. + Subdomain *string `json:"subdomain,omitempty" url:"subdomain,omitempty"` + WebhookListenerUrl string `json:"webhook_listener_url" url:"webhook_listener_url"` + // 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. + IsDuplicate *bool `json:"is_duplicate,omitempty" url:"is_duplicate,omitempty"` + Integration *AccountDetailsAndActionsIntegration `json:"integration,omitempty" url:"integration,omitempty"` + AccountType string `json:"account_type" url:"account_type"` + CompletedAt time.Time `json:"completed_at" url:"completed_at"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AccountDetailsAndActions) GetId() string { + if a == nil { + return "" + } + return a.Id +} + +func (a *AccountDetailsAndActions) GetCategory() *AccountDetailsAndActionsCategory { + if a == nil { + return nil + } + return a.Category +} + +func (a *AccountDetailsAndActions) GetStatus() *AccountDetailsAndActionsStatus { + if a == nil { + return nil + } + return a.Status +} + +func (a *AccountDetailsAndActions) GetStatusDetail() *string { + if a == nil { + return nil + } + return a.StatusDetail +} + +func (a *AccountDetailsAndActions) GetEndUserOriginId() *string { + if a == nil { + return nil + } + return a.EndUserOriginId +} + +func (a *AccountDetailsAndActions) GetEndUserOrganizationName() string { + if a == nil { + return "" + } + return a.EndUserOrganizationName +} + +func (a *AccountDetailsAndActions) GetEndUserEmailAddress() string { + if a == nil { + return "" + } + return a.EndUserEmailAddress +} + +func (a *AccountDetailsAndActions) GetSubdomain() *string { + if a == nil { + return nil + } + return a.Subdomain +} + +func (a *AccountDetailsAndActions) GetWebhookListenerUrl() string { + if a == nil { + return "" + } + return a.WebhookListenerUrl +} + +func (a *AccountDetailsAndActions) GetIsDuplicate() *bool { + if a == nil { + return nil + } + return a.IsDuplicate +} + +func (a *AccountDetailsAndActions) GetIntegration() *AccountDetailsAndActionsIntegration { + if a == nil { + return nil + } + return a.Integration +} + +func (a *AccountDetailsAndActions) GetAccountType() string { + if a == nil { + return "" + } + return a.AccountType +} + +func (a *AccountDetailsAndActions) GetCompletedAt() time.Time { + if a == nil { + return time.Time{} + } + return a.CompletedAt +} + +func (a *AccountDetailsAndActions) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AccountDetailsAndActions) UnmarshalJSON(data []byte) error { + type embed AccountDetailsAndActions + var unmarshaler = struct { + embed + CompletedAt *internal.DateTime `json:"completed_at"` + }{ + embed: embed(*a), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *a = AccountDetailsAndActions(unmarshaler.embed) + a.CompletedAt = unmarshaler.CompletedAt.Time() + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AccountDetailsAndActions) MarshalJSON() ([]byte, error) { + type embed AccountDetailsAndActions + var marshaler = struct { + embed + CompletedAt *internal.DateTime `json:"completed_at"` + }{ + embed: embed(*a), + CompletedAt: internal.NewDateTime(a.CompletedAt), + } + return json.Marshal(marshaler) +} + +func (a *AccountDetailsAndActions) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} + +type AccountDetailsAndActionsCategory struct { + CategoryEnum CategoryEnum + String string + + typ string +} + +func (a *AccountDetailsAndActionsCategory) GetCategoryEnum() CategoryEnum { + if a == nil { + return "" + } + return a.CategoryEnum +} + +func (a *AccountDetailsAndActionsCategory) GetString() string { + if a == nil { + return "" + } + return a.String +} + +func (a *AccountDetailsAndActionsCategory) UnmarshalJSON(data []byte) error { + var valueCategoryEnum CategoryEnum + if err := json.Unmarshal(data, &valueCategoryEnum); err == nil { + a.typ = "CategoryEnum" + a.CategoryEnum = valueCategoryEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + a.typ = "String" + a.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, a) +} + +func (a AccountDetailsAndActionsCategory) MarshalJSON() ([]byte, error) { + if a.typ == "CategoryEnum" || a.CategoryEnum != "" { + return json.Marshal(a.CategoryEnum) + } + if a.typ == "String" || a.String != "" { + return json.Marshal(a.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type AccountDetailsAndActionsCategoryVisitor interface { + VisitCategoryEnum(CategoryEnum) error + VisitString(string) error +} + +func (a *AccountDetailsAndActionsCategory) Accept(visitor AccountDetailsAndActionsCategoryVisitor) error { + if a.typ == "CategoryEnum" || a.CategoryEnum != "" { + return visitor.VisitCategoryEnum(a.CategoryEnum) + } + if a.typ == "String" || a.String != "" { + return visitor.VisitString(a.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type AccountDetailsAndActionsIntegration struct { + Name string `json:"name" url:"name"` + Categories []CategoriesEnum `json:"categories" url:"categories"` + Image *string `json:"image,omitempty" url:"image,omitempty"` + SquareImage *string `json:"square_image,omitempty" url:"square_image,omitempty"` + Color string `json:"color" url:"color"` + Slug string `json:"slug" url:"slug"` + PassthroughAvailable bool `json:"passthrough_available" url:"passthrough_available"` + AvailableModelOperations []*ModelOperation `json:"available_model_operations,omitempty" url:"available_model_operations,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AccountDetailsAndActionsIntegration) GetName() string { + if a == nil { + return "" + } + return a.Name +} + +func (a *AccountDetailsAndActionsIntegration) GetCategories() []CategoriesEnum { + if a == nil { + return nil + } + return a.Categories +} + +func (a *AccountDetailsAndActionsIntegration) GetImage() *string { + if a == nil { + return nil + } + return a.Image +} + +func (a *AccountDetailsAndActionsIntegration) GetSquareImage() *string { + if a == nil { + return nil + } + return a.SquareImage +} + +func (a *AccountDetailsAndActionsIntegration) GetColor() string { + if a == nil { + return "" + } + return a.Color +} + +func (a *AccountDetailsAndActionsIntegration) GetSlug() string { + if a == nil { + return "" + } + return a.Slug +} + +func (a *AccountDetailsAndActionsIntegration) GetPassthroughAvailable() bool { + if a == nil { + return false + } + return a.PassthroughAvailable +} + +func (a *AccountDetailsAndActionsIntegration) GetAvailableModelOperations() []*ModelOperation { + if a == nil { + return nil + } + return a.AvailableModelOperations +} + +func (a *AccountDetailsAndActionsIntegration) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AccountDetailsAndActionsIntegration) UnmarshalJSON(data []byte) error { + type unmarshaler AccountDetailsAndActionsIntegration + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *a = AccountDetailsAndActionsIntegration(value) + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AccountDetailsAndActionsIntegration) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} + +type AccountDetailsAndActionsStatus struct { + AccountDetailsAndActionsStatusEnum AccountDetailsAndActionsStatusEnum + String string + + typ string +} + +func (a *AccountDetailsAndActionsStatus) GetAccountDetailsAndActionsStatusEnum() AccountDetailsAndActionsStatusEnum { + if a == nil { + return "" + } + return a.AccountDetailsAndActionsStatusEnum +} + +func (a *AccountDetailsAndActionsStatus) GetString() string { + if a == nil { + return "" + } + return a.String +} + +func (a *AccountDetailsAndActionsStatus) UnmarshalJSON(data []byte) error { + var valueAccountDetailsAndActionsStatusEnum AccountDetailsAndActionsStatusEnum + if err := json.Unmarshal(data, &valueAccountDetailsAndActionsStatusEnum); err == nil { + a.typ = "AccountDetailsAndActionsStatusEnum" + a.AccountDetailsAndActionsStatusEnum = valueAccountDetailsAndActionsStatusEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + a.typ = "String" + a.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, a) +} + +func (a AccountDetailsAndActionsStatus) MarshalJSON() ([]byte, error) { + if a.typ == "AccountDetailsAndActionsStatusEnum" || a.AccountDetailsAndActionsStatusEnum != "" { + return json.Marshal(a.AccountDetailsAndActionsStatusEnum) + } + if a.typ == "String" || a.String != "" { + return json.Marshal(a.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type AccountDetailsAndActionsStatusVisitor interface { + VisitAccountDetailsAndActionsStatusEnum(AccountDetailsAndActionsStatusEnum) error + VisitString(string) error +} + +func (a *AccountDetailsAndActionsStatus) Accept(visitor AccountDetailsAndActionsStatusVisitor) error { + if a.typ == "AccountDetailsAndActionsStatusEnum" || a.AccountDetailsAndActionsStatusEnum != "" { + return visitor.VisitAccountDetailsAndActionsStatusEnum(a.AccountDetailsAndActionsStatusEnum) + } + if a.typ == "String" || a.String != "" { + return visitor.VisitString(a.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} + +// * `COMPLETE` - COMPLETE +// * `INCOMPLETE` - INCOMPLETE +// * `RELINK_NEEDED` - RELINK_NEEDED +// * `IDLE` - IDLE +type AccountDetailsAndActionsStatusEnum string + +const ( + AccountDetailsAndActionsStatusEnumComplete AccountDetailsAndActionsStatusEnum = "COMPLETE" + AccountDetailsAndActionsStatusEnumIncomplete AccountDetailsAndActionsStatusEnum = "INCOMPLETE" + AccountDetailsAndActionsStatusEnumRelinkNeeded AccountDetailsAndActionsStatusEnum = "RELINK_NEEDED" + AccountDetailsAndActionsStatusEnumIdle AccountDetailsAndActionsStatusEnum = "IDLE" +) + +func NewAccountDetailsAndActionsStatusEnumFromString(s string) (AccountDetailsAndActionsStatusEnum, error) { + switch s { + case "COMPLETE": + return AccountDetailsAndActionsStatusEnumComplete, nil + case "INCOMPLETE": + return AccountDetailsAndActionsStatusEnumIncomplete, nil + case "RELINK_NEEDED": + return AccountDetailsAndActionsStatusEnumRelinkNeeded, nil + case "IDLE": + return AccountDetailsAndActionsStatusEnumIdle, nil + } + var t AccountDetailsAndActionsStatusEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (a AccountDetailsAndActionsStatusEnum) Ptr() *AccountDetailsAndActionsStatusEnum { + return &a +} + +type PaginatedAccountDetailsAndActionsList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*AccountDetailsAndActions `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedAccountDetailsAndActionsList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedAccountDetailsAndActionsList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedAccountDetailsAndActionsList) GetResults() []*AccountDetailsAndActions { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedAccountDetailsAndActionsList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedAccountDetailsAndActionsList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedAccountDetailsAndActionsList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedAccountDetailsAndActionsList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedAccountDetailsAndActionsList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} diff --git a/ats/linkedaccounts/client.go b/ats/linkedaccounts/client.go index 4c57fe7..48c46f4 100644 --- a/ats/linkedaccounts/client.go +++ b/ats/linkedaccounts/client.go @@ -1,97 +1,92 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package linkedaccounts import ( context "context" fmt "fmt" - ats "github.com/merge-api/merge-go-client/ats" - core "github.com/merge-api/merge-go-client/core" + ats "github.com/merge-api/merge-go-client/v2/ats" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // List linked accounts for your organization. -func (c *Client) List(ctx context.Context, request *ats.LinkedAccountsListRequest) (*ats.PaginatedAccountDetailsAndActionsList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ats/v1/linked-accounts" - - queryParams := make(url.Values) - if request.Category != nil { - queryParams.Add("category", fmt.Sprintf("%v", *request.Category)) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.EndUserEmailAddress != nil { - queryParams.Add("end_user_email_address", fmt.Sprintf("%v", *request.EndUserEmailAddress)) - } - if request.EndUserOrganizationName != nil { - queryParams.Add("end_user_organization_name", fmt.Sprintf("%v", *request.EndUserOrganizationName)) - } - if request.EndUserOriginId != nil { - queryParams.Add("end_user_origin_id", fmt.Sprintf("%v", *request.EndUserOriginId)) - } - if request.EndUserOriginIds != nil { - queryParams.Add("end_user_origin_ids", fmt.Sprintf("%v", *request.EndUserOriginIds)) - } - if request.Id != nil { - queryParams.Add("id", fmt.Sprintf("%v", *request.Id)) - } - if request.Ids != nil { - queryParams.Add("ids", fmt.Sprintf("%v", *request.Ids)) - } - if request.IncludeDuplicates != nil { - queryParams.Add("include_duplicates", fmt.Sprintf("%v", *request.IncludeDuplicates)) - } - if request.IntegrationName != nil { - queryParams.Add("integration_name", fmt.Sprintf("%v", *request.IntegrationName)) - } - if request.IsTestAccount != nil { - queryParams.Add("is_test_account", fmt.Sprintf("%v", *request.IsTestAccount)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.Status != nil { - queryParams.Add("status", fmt.Sprintf("%v", *request.Status)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *ats.PaginatedAccountDetailsAndActionsList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *ats.LinkedAccountsListRequest, + opts ...option.RequestOption, +) (*core.Page[*ats.AccountDetailsAndActions], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ats/v1/linked-accounts" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *ats.PaginatedAccountDetailsAndActionsList) *internal.PageResponse[*string, *ats.AccountDetailsAndActions] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *ats.AccountDetailsAndActions]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } diff --git a/ats/linktoken/client.go b/ats/linktoken/client.go index 652d207..37f17df 100644 --- a/ats/linktoken/client.go +++ b/ats/linktoken/client.go @@ -1,49 +1,68 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package linktoken import ( context "context" - ats "github.com/merge-api/merge-go-client/ats" - core "github.com/merge-api/merge-go-client/core" + ats "github.com/merge-api/merge-go-client/v2/ats" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Creates a link token to be used when linking a new end user. -func (c *Client) Create(ctx context.Context, request *ats.EndUserDetailsRequest) (*ats.LinkToken, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ats/v1/link-token" +func (c *Client) Create( + ctx context.Context, + request *ats.EndUserDetailsRequest, + opts ...option.RequestOption, +) (*ats.LinkToken, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ats/v1/link-token" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *ats.LinkToken if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err diff --git a/ats/offers.go b/ats/offers.go index 17dd1ba..5677584 100644 --- a/ats/offers.go +++ b/ats/offers.go @@ -1,102 +1,162 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package ats import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type OffersListRequest struct { // If provided, will only return offers for this application. - ApplicationId *string `json:"-"` + ApplicationId *string `json:"-" url:"application_id,omitempty"` // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // If provided, will only return offers created by this user. - CreatorId *string `json:"-"` + CreatorId *string `json:"-" url:"creator_id,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *OffersListRequestExpand `json:"-"` + Expand []*OffersListRequestExpandItem `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // Deprecated. Use show_enum_origins. - RemoteFields *string `json:"-"` + RemoteFields *string `json:"-" url:"remote_fields,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` // 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) - ShowEnumOrigins *string `json:"-"` + ShowEnumOrigins *string `json:"-" url:"show_enum_origins,omitempty"` } type OffersRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *OffersRetrieveRequestExpand `json:"-"` + Expand []*OffersRetrieveRequestExpandItem `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // Deprecated. Use show_enum_origins. - RemoteFields *string `json:"-"` + RemoteFields *string `json:"-" url:"remote_fields,omitempty"` // 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) - ShowEnumOrigins *string `json:"-"` + ShowEnumOrigins *string `json:"-" url:"show_enum_origins,omitempty"` } -type OffersListRequestExpand string +type OffersListRequestExpandItem string const ( - OffersListRequestExpandApplication OffersListRequestExpand = "application" - OffersListRequestExpandApplicationCreator OffersListRequestExpand = "application,creator" - OffersListRequestExpandCreator OffersListRequestExpand = "creator" + OffersListRequestExpandItemApplication OffersListRequestExpandItem = "application" + OffersListRequestExpandItemCreator OffersListRequestExpandItem = "creator" ) -func NewOffersListRequestExpandFromString(s string) (OffersListRequestExpand, error) { +func NewOffersListRequestExpandItemFromString(s string) (OffersListRequestExpandItem, error) { switch s { case "application": - return OffersListRequestExpandApplication, nil - case "application,creator": - return OffersListRequestExpandApplicationCreator, nil + return OffersListRequestExpandItemApplication, nil case "creator": - return OffersListRequestExpandCreator, nil + return OffersListRequestExpandItemCreator, nil } - var t OffersListRequestExpand + var t OffersListRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (o OffersListRequestExpand) Ptr() *OffersListRequestExpand { +func (o OffersListRequestExpandItem) Ptr() *OffersListRequestExpandItem { return &o } -type OffersRetrieveRequestExpand string +type OffersRetrieveRequestExpandItem string const ( - OffersRetrieveRequestExpandApplication OffersRetrieveRequestExpand = "application" - OffersRetrieveRequestExpandApplicationCreator OffersRetrieveRequestExpand = "application,creator" - OffersRetrieveRequestExpandCreator OffersRetrieveRequestExpand = "creator" + OffersRetrieveRequestExpandItemApplication OffersRetrieveRequestExpandItem = "application" + OffersRetrieveRequestExpandItemCreator OffersRetrieveRequestExpandItem = "creator" ) -func NewOffersRetrieveRequestExpandFromString(s string) (OffersRetrieveRequestExpand, error) { +func NewOffersRetrieveRequestExpandItemFromString(s string) (OffersRetrieveRequestExpandItem, error) { switch s { case "application": - return OffersRetrieveRequestExpandApplication, nil - case "application,creator": - return OffersRetrieveRequestExpandApplicationCreator, nil + return OffersRetrieveRequestExpandItemApplication, nil case "creator": - return OffersRetrieveRequestExpandCreator, nil + return OffersRetrieveRequestExpandItemCreator, nil } - var t OffersRetrieveRequestExpand + var t OffersRetrieveRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (o OffersRetrieveRequestExpand) Ptr() *OffersRetrieveRequestExpand { +func (o OffersRetrieveRequestExpandItem) Ptr() *OffersRetrieveRequestExpandItem { return &o } + +type PaginatedOfferList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Offer `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedOfferList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedOfferList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedOfferList) GetResults() []*Offer { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedOfferList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedOfferList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedOfferList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedOfferList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedOfferList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} diff --git a/ats/offers/client.go b/ats/offers/client.go index 63acf27..f14b4ce 100644 --- a/ats/offers/client.go +++ b/ats/offers/client.go @@ -1,141 +1,137 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package offers import ( context "context" fmt "fmt" - ats "github.com/merge-api/merge-go-client/ats" - core "github.com/merge-api/merge-go-client/core" + ats "github.com/merge-api/merge-go-client/v2/ats" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `Offer` objects. -func (c *Client) List(ctx context.Context, request *ats.OffersListRequest) (*ats.PaginatedOfferList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ats/v1/offers" - - queryParams := make(url.Values) - if request.ApplicationId != nil { - queryParams.Add("application_id", fmt.Sprintf("%v", *request.ApplicationId)) - } - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.CreatorId != nil { - queryParams.Add("creator_id", fmt.Sprintf("%v", *request.CreatorId)) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteFields != nil { - queryParams.Add("remote_fields", fmt.Sprintf("%v", request.RemoteFields)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if request.ShowEnumOrigins != nil { - queryParams.Add("show_enum_origins", fmt.Sprintf("%v", request.ShowEnumOrigins)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *ats.PaginatedOfferList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *ats.OffersListRequest, + opts ...option.RequestOption, +) (*core.Page[*ats.Offer], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ats/v1/offers" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *ats.PaginatedOfferList) *internal.PageResponse[*string, *ats.Offer] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *ats.Offer]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Returns an `Offer` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *ats.OffersRetrieveRequest) (*ats.Offer, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"ats/v1/offers/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.RemoteFields != nil { - queryParams.Add("remote_fields", fmt.Sprintf("%v", request.RemoteFields)) - } - if request.ShowEnumOrigins != nil { - queryParams.Add("show_enum_origins", fmt.Sprintf("%v", request.ShowEnumOrigins)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *ats.OffersRetrieveRequest, + opts ...option.RequestOption, +) (*ats.Offer, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/ats/v1/offers/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ats.Offer if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/ats/offices.go b/ats/offices.go index 189e3c0..f76720e 100644 --- a/ats/offices.go +++ b/ats/offices.go @@ -1,35 +1,102 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package ats import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type OfficesListRequest struct { // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` } type OfficesRetrieveRequest struct { // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` +} + +type PaginatedOfficeList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Office `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedOfficeList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedOfficeList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedOfficeList) GetResults() []*Office { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedOfficeList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedOfficeList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedOfficeList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedOfficeList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedOfficeList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) } diff --git a/ats/offices/client.go b/ats/offices/client.go index 5e35e60..3ca414c 100644 --- a/ats/offices/client.go +++ b/ats/offices/client.go @@ -1,117 +1,137 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package offices import ( context "context" fmt "fmt" - ats "github.com/merge-api/merge-go-client/ats" - core "github.com/merge-api/merge-go-client/core" + ats "github.com/merge-api/merge-go-client/v2/ats" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `Office` objects. -func (c *Client) List(ctx context.Context, request *ats.OfficesListRequest) (*ats.PaginatedOfficeList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ats/v1/offices" - - queryParams := make(url.Values) - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *ats.PaginatedOfficeList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *ats.OfficesListRequest, + opts ...option.RequestOption, +) (*core.Page[*ats.Office], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ats/v1/offices" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *ats.PaginatedOfficeList) *internal.PageResponse[*string, *ats.Office] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *ats.Office]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Returns an `Office` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *ats.OfficesRetrieveRequest) (*ats.Office, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"ats/v1/offices/%v", id) - - queryParams := make(url.Values) - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *ats.OfficesRetrieveRequest, + opts ...option.RequestOption, +) (*ats.Office, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/ats/v1/offices/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ats.Office if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/ats/passthrough/client.go b/ats/passthrough/client.go index c0c7c20..f30a0fe 100644 --- a/ats/passthrough/client.go +++ b/ats/passthrough/client.go @@ -1,49 +1,68 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package passthrough import ( context "context" - ats "github.com/merge-api/merge-go-client/ats" - core "github.com/merge-api/merge-go-client/core" + ats "github.com/merge-api/merge-go-client/v2/ats" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Pull data from an endpoint not currently supported by Merge. -func (c *Client) Create(ctx context.Context, request *ats.DataPassthroughRequest) (*ats.RemoteResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ats/v1/passthrough" +func (c *Client) Create( + ctx context.Context, + request *ats.DataPassthroughRequest, + opts ...option.RequestOption, +) (*ats.RemoteResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ats/v1/passthrough" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *ats.RemoteResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err diff --git a/ats/regenerate_key.go b/ats/regenerate_key.go index 32a6d94..ee15ae1 100644 --- a/ats/regenerate_key.go +++ b/ats/regenerate_key.go @@ -1,8 +1,8 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package ats type RemoteKeyForRegenerationRequest struct { // The name of the remote key - Name string `json:"name"` + Name string `json:"name" url:"-"` } diff --git a/ats/regeneratekey/client.go b/ats/regeneratekey/client.go index 194957d..4f6dbbf 100644 --- a/ats/regeneratekey/client.go +++ b/ats/regeneratekey/client.go @@ -1,49 +1,68 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package regeneratekey import ( context "context" - ats "github.com/merge-api/merge-go-client/ats" - core "github.com/merge-api/merge-go-client/core" + ats "github.com/merge-api/merge-go-client/v2/ats" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Exchange remote keys. -func (c *Client) Create(ctx context.Context, request *ats.RemoteKeyForRegenerationRequest) (*ats.RemoteKey, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ats/v1/regenerate-key" +func (c *Client) Create( + ctx context.Context, + request *ats.RemoteKeyForRegenerationRequest, + opts ...option.RequestOption, +) (*ats.RemoteKey, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ats/v1/regenerate-key" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *ats.RemoteKey if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err diff --git a/ats/reject_reasons.go b/ats/reject_reasons.go index 67a2831..e6b790b 100644 --- a/ats/reject_reasons.go +++ b/ats/reject_reasons.go @@ -1,35 +1,102 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package ats import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type RejectReasonsListRequest struct { // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` } type RejectReasonsRetrieveRequest struct { // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` +} + +type PaginatedRejectReasonList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*RejectReason `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedRejectReasonList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedRejectReasonList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedRejectReasonList) GetResults() []*RejectReason { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedRejectReasonList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedRejectReasonList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedRejectReasonList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedRejectReasonList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedRejectReasonList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) } diff --git a/ats/rejectreasons/client.go b/ats/rejectreasons/client.go index 9433b4a..884096a 100644 --- a/ats/rejectreasons/client.go +++ b/ats/rejectreasons/client.go @@ -1,117 +1,137 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package rejectreasons import ( context "context" fmt "fmt" - ats "github.com/merge-api/merge-go-client/ats" - core "github.com/merge-api/merge-go-client/core" + ats "github.com/merge-api/merge-go-client/v2/ats" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `RejectReason` objects. -func (c *Client) List(ctx context.Context, request *ats.RejectReasonsListRequest) (*ats.PaginatedRejectReasonList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ats/v1/reject-reasons" - - queryParams := make(url.Values) - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *ats.PaginatedRejectReasonList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *ats.RejectReasonsListRequest, + opts ...option.RequestOption, +) (*core.Page[*ats.RejectReason], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ats/v1/reject-reasons" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *ats.PaginatedRejectReasonList) *internal.PageResponse[*string, *ats.RejectReason] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *ats.RejectReason]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Returns a `RejectReason` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *ats.RejectReasonsRetrieveRequest) (*ats.RejectReason, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"ats/v1/reject-reasons/%v", id) - - queryParams := make(url.Values) - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *ats.RejectReasonsRetrieveRequest, + opts ...option.RequestOption, +) (*ats.RejectReason, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/ats/v1/reject-reasons/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ats.RejectReason if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/ats/scopes.go b/ats/scopes.go index 1d672a5..5bc15c2 100644 --- a/ats/scopes.go +++ b/ats/scopes.go @@ -1,8 +1,223 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package ats +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" +) + type LinkedAccountCommonModelScopeDeserializerRequest struct { // The common models you want to update the scopes for - CommonModels []*IndividualCommonModelScopeDeserializerRequest `json:"common_models,omitempty"` + CommonModels []*IndividualCommonModelScopeDeserializerRequest `json:"common_models,omitempty" url:"-"` +} + +type CommonModelScopeApi struct { + // The common models you want to update the scopes for + CommonModels []*IndividualCommonModelScopeDeserializer `json:"common_models" url:"common_models"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (c *CommonModelScopeApi) GetCommonModels() []*IndividualCommonModelScopeDeserializer { + if c == nil { + return nil + } + return c.CommonModels +} + +func (c *CommonModelScopeApi) GetExtraProperties() map[string]interface{} { + return c.extraProperties +} + +func (c *CommonModelScopeApi) UnmarshalJSON(data []byte) error { + type unmarshaler CommonModelScopeApi + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *c = CommonModelScopeApi(value) + extraProperties, err := internal.ExtractExtraProperties(data, *c) + if err != nil { + return err + } + c.extraProperties = extraProperties + c.rawJSON = json.RawMessage(data) + return nil +} + +func (c *CommonModelScopeApi) String() string { + if len(c.rawJSON) > 0 { + if value, err := internal.StringifyJSON(c.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(c); err == nil { + return value + } + return fmt.Sprintf("%#v", c) +} + +type FieldPermissionDeserializer struct { + EnabledFields []interface{} `json:"enabled_fields,omitempty" url:"enabled_fields,omitempty"` + DisabledFields []interface{} `json:"disabled_fields,omitempty" url:"disabled_fields,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (f *FieldPermissionDeserializer) GetEnabledFields() []interface{} { + if f == nil { + return nil + } + return f.EnabledFields +} + +func (f *FieldPermissionDeserializer) GetDisabledFields() []interface{} { + if f == nil { + return nil + } + return f.DisabledFields +} + +func (f *FieldPermissionDeserializer) GetExtraProperties() map[string]interface{} { + return f.extraProperties +} + +func (f *FieldPermissionDeserializer) UnmarshalJSON(data []byte) error { + type unmarshaler FieldPermissionDeserializer + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *f = FieldPermissionDeserializer(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { + return err + } + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) + return nil +} + +func (f *FieldPermissionDeserializer) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(f); err == nil { + return value + } + return fmt.Sprintf("%#v", f) +} + +type IndividualCommonModelScopeDeserializer struct { + ModelName string `json:"model_name" url:"model_name"` + ModelPermissions map[string]*ModelPermissionDeserializer `json:"model_permissions,omitempty" url:"model_permissions,omitempty"` + FieldPermissions *FieldPermissionDeserializer `json:"field_permissions,omitempty" url:"field_permissions,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (i *IndividualCommonModelScopeDeserializer) GetModelName() string { + if i == nil { + return "" + } + return i.ModelName +} + +func (i *IndividualCommonModelScopeDeserializer) GetModelPermissions() map[string]*ModelPermissionDeserializer { + if i == nil { + return nil + } + return i.ModelPermissions +} + +func (i *IndividualCommonModelScopeDeserializer) GetFieldPermissions() *FieldPermissionDeserializer { + if i == nil { + return nil + } + return i.FieldPermissions +} + +func (i *IndividualCommonModelScopeDeserializer) GetExtraProperties() map[string]interface{} { + return i.extraProperties +} + +func (i *IndividualCommonModelScopeDeserializer) UnmarshalJSON(data []byte) error { + type unmarshaler IndividualCommonModelScopeDeserializer + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *i = IndividualCommonModelScopeDeserializer(value) + extraProperties, err := internal.ExtractExtraProperties(data, *i) + if err != nil { + return err + } + i.extraProperties = extraProperties + i.rawJSON = json.RawMessage(data) + return nil +} + +func (i *IndividualCommonModelScopeDeserializer) String() string { + if len(i.rawJSON) > 0 { + if value, err := internal.StringifyJSON(i.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(i); err == nil { + return value + } + return fmt.Sprintf("%#v", i) +} + +type ModelPermissionDeserializer struct { + IsEnabled *bool `json:"is_enabled,omitempty" url:"is_enabled,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (m *ModelPermissionDeserializer) GetIsEnabled() *bool { + if m == nil { + return nil + } + return m.IsEnabled +} + +func (m *ModelPermissionDeserializer) GetExtraProperties() map[string]interface{} { + return m.extraProperties +} + +func (m *ModelPermissionDeserializer) UnmarshalJSON(data []byte) error { + type unmarshaler ModelPermissionDeserializer + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *m = ModelPermissionDeserializer(value) + extraProperties, err := internal.ExtractExtraProperties(data, *m) + if err != nil { + return err + } + m.extraProperties = extraProperties + m.rawJSON = json.RawMessage(data) + return nil +} + +func (m *ModelPermissionDeserializer) String() string { + if len(m.rawJSON) > 0 { + if value, err := internal.StringifyJSON(m.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(m); err == nil { + return value + } + return fmt.Sprintf("%#v", m) } diff --git a/ats/scopes/client.go b/ats/scopes/client.go index 4f02047..9c302d5 100644 --- a/ats/scopes/client.go +++ b/ats/scopes/client.go @@ -1,48 +1,65 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package scopes import ( context "context" - ats "github.com/merge-api/merge-go-client/ats" - core "github.com/merge-api/merge-go-client/core" + ats "github.com/merge-api/merge-go-client/v2/ats" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // 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/5950052-common-model-and-field-scopes). -func (c *Client) DefaultScopesRetrieve(ctx context.Context) (*ats.CommonModelScopeApi, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ats/v1/default-scopes" +func (c *Client) DefaultScopesRetrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*ats.CommonModelScopeApi, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ats/v1/default-scopes" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ats.CommonModelScopeApi if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -51,21 +68,34 @@ func (c *Client) DefaultScopesRetrieve(ctx context.Context) (*ats.CommonModelSco } // Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). -func (c *Client) LinkedAccountScopesRetrieve(ctx context.Context) (*ats.CommonModelScopeApi, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ats/v1/linked-account-scopes" +func (c *Client) LinkedAccountScopesRetrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*ats.CommonModelScopeApi, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ats/v1/linked-account-scopes" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ats.CommonModelScopeApi if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -74,22 +104,37 @@ func (c *Client) LinkedAccountScopesRetrieve(ctx context.Context) (*ats.CommonMo } // 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/5950052-common-model-and-field-scopes) -func (c *Client) LinkedAccountScopesCreate(ctx context.Context, request *ats.LinkedAccountCommonModelScopeDeserializerRequest) (*ats.CommonModelScopeApi, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ats/v1/linked-account-scopes" +func (c *Client) LinkedAccountScopesCreate( + ctx context.Context, + request *ats.LinkedAccountCommonModelScopeDeserializerRequest, + opts ...option.RequestOption, +) (*ats.CommonModelScopeApi, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ats/v1/linked-account-scopes" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *ats.CommonModelScopeApi if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err diff --git a/ats/scorecards.go b/ats/scorecards.go index 058436e..0e3b15c 100644 --- a/ats/scorecards.go +++ b/ats/scorecards.go @@ -1,128 +1,657 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package ats import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type ScorecardsListRequest struct { // If provided, will only return scorecards for this application. - ApplicationId *string `json:"-"` + ApplicationId *string `json:"-" url:"application_id,omitempty"` // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *ScorecardsListRequestExpand `json:"-"` + Expand []*ScorecardsListRequestExpandItem `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, will only return scorecards for this interview. - InterviewId *string `json:"-"` + InterviewId *string `json:"-" url:"interview_id,omitempty"` // If provided, will only return scorecards for this interviewer. - InterviewerId *string `json:"-"` + InterviewerId *string `json:"-" url:"interviewer_id,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // Deprecated. Use show_enum_origins. - RemoteFields *string `json:"-"` + RemoteFields *string `json:"-" url:"remote_fields,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` // 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) - ShowEnumOrigins *string `json:"-"` + ShowEnumOrigins *string `json:"-" url:"show_enum_origins,omitempty"` } type ScorecardsRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *ScorecardsRetrieveRequestExpand `json:"-"` + Expand []*ScorecardsRetrieveRequestExpandItem `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // Deprecated. Use show_enum_origins. - RemoteFields *string `json:"-"` + RemoteFields *string `json:"-" url:"remote_fields,omitempty"` // 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) - ShowEnumOrigins *string `json:"-"` + ShowEnumOrigins *string `json:"-" url:"show_enum_origins,omitempty"` } -type ScorecardsListRequestExpand string +type ScorecardsListRequestExpandItem string const ( - ScorecardsListRequestExpandApplication ScorecardsListRequestExpand = "application" - ScorecardsListRequestExpandApplicationInterview ScorecardsListRequestExpand = "application,interview" - ScorecardsListRequestExpandApplicationInterviewInterviewer ScorecardsListRequestExpand = "application,interview,interviewer" - ScorecardsListRequestExpandApplicationInterviewer ScorecardsListRequestExpand = "application,interviewer" - ScorecardsListRequestExpandInterview ScorecardsListRequestExpand = "interview" - ScorecardsListRequestExpandInterviewInterviewer ScorecardsListRequestExpand = "interview,interviewer" - ScorecardsListRequestExpandInterviewer ScorecardsListRequestExpand = "interviewer" + ScorecardsListRequestExpandItemApplication ScorecardsListRequestExpandItem = "application" + ScorecardsListRequestExpandItemInterview ScorecardsListRequestExpandItem = "interview" + ScorecardsListRequestExpandItemInterviewer ScorecardsListRequestExpandItem = "interviewer" ) -func NewScorecardsListRequestExpandFromString(s string) (ScorecardsListRequestExpand, error) { +func NewScorecardsListRequestExpandItemFromString(s string) (ScorecardsListRequestExpandItem, error) { switch s { case "application": - return ScorecardsListRequestExpandApplication, nil - case "application,interview": - return ScorecardsListRequestExpandApplicationInterview, nil - case "application,interview,interviewer": - return ScorecardsListRequestExpandApplicationInterviewInterviewer, nil - case "application,interviewer": - return ScorecardsListRequestExpandApplicationInterviewer, nil + return ScorecardsListRequestExpandItemApplication, nil case "interview": - return ScorecardsListRequestExpandInterview, nil - case "interview,interviewer": - return ScorecardsListRequestExpandInterviewInterviewer, nil + return ScorecardsListRequestExpandItemInterview, nil case "interviewer": - return ScorecardsListRequestExpandInterviewer, nil + return ScorecardsListRequestExpandItemInterviewer, nil } - var t ScorecardsListRequestExpand + var t ScorecardsListRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (s ScorecardsListRequestExpand) Ptr() *ScorecardsListRequestExpand { +func (s ScorecardsListRequestExpandItem) Ptr() *ScorecardsListRequestExpandItem { return &s } -type ScorecardsRetrieveRequestExpand string +type ScorecardsRetrieveRequestExpandItem string const ( - ScorecardsRetrieveRequestExpandApplication ScorecardsRetrieveRequestExpand = "application" - ScorecardsRetrieveRequestExpandApplicationInterview ScorecardsRetrieveRequestExpand = "application,interview" - ScorecardsRetrieveRequestExpandApplicationInterviewInterviewer ScorecardsRetrieveRequestExpand = "application,interview,interviewer" - ScorecardsRetrieveRequestExpandApplicationInterviewer ScorecardsRetrieveRequestExpand = "application,interviewer" - ScorecardsRetrieveRequestExpandInterview ScorecardsRetrieveRequestExpand = "interview" - ScorecardsRetrieveRequestExpandInterviewInterviewer ScorecardsRetrieveRequestExpand = "interview,interviewer" - ScorecardsRetrieveRequestExpandInterviewer ScorecardsRetrieveRequestExpand = "interviewer" + ScorecardsRetrieveRequestExpandItemApplication ScorecardsRetrieveRequestExpandItem = "application" + ScorecardsRetrieveRequestExpandItemInterview ScorecardsRetrieveRequestExpandItem = "interview" + ScorecardsRetrieveRequestExpandItemInterviewer ScorecardsRetrieveRequestExpandItem = "interviewer" ) -func NewScorecardsRetrieveRequestExpandFromString(s string) (ScorecardsRetrieveRequestExpand, error) { +func NewScorecardsRetrieveRequestExpandItemFromString(s string) (ScorecardsRetrieveRequestExpandItem, error) { switch s { case "application": - return ScorecardsRetrieveRequestExpandApplication, nil - case "application,interview": - return ScorecardsRetrieveRequestExpandApplicationInterview, nil - case "application,interview,interviewer": - return ScorecardsRetrieveRequestExpandApplicationInterviewInterviewer, nil - case "application,interviewer": - return ScorecardsRetrieveRequestExpandApplicationInterviewer, nil + return ScorecardsRetrieveRequestExpandItemApplication, nil case "interview": - return ScorecardsRetrieveRequestExpandInterview, nil - case "interview,interviewer": - return ScorecardsRetrieveRequestExpandInterviewInterviewer, nil + return ScorecardsRetrieveRequestExpandItemInterview, nil case "interviewer": - return ScorecardsRetrieveRequestExpandInterviewer, nil + return ScorecardsRetrieveRequestExpandItemInterviewer, nil } - var t ScorecardsRetrieveRequestExpand + var t ScorecardsRetrieveRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (s ScorecardsRetrieveRequestExpand) Ptr() *ScorecardsRetrieveRequestExpand { +func (s ScorecardsRetrieveRequestExpandItem) Ptr() *ScorecardsRetrieveRequestExpandItem { return &s } + +// * `DEFINITELY_NO` - DEFINITELY_NO +// * `NO` - NO +// * `YES` - YES +// * `STRONG_YES` - STRONG_YES +// * `NO_DECISION` - NO_DECISION +type OverallRecommendationEnum string + +const ( + OverallRecommendationEnumDefinitelyNo OverallRecommendationEnum = "DEFINITELY_NO" + OverallRecommendationEnumNo OverallRecommendationEnum = "NO" + OverallRecommendationEnumYes OverallRecommendationEnum = "YES" + OverallRecommendationEnumStrongYes OverallRecommendationEnum = "STRONG_YES" + OverallRecommendationEnumNoDecision OverallRecommendationEnum = "NO_DECISION" +) + +func NewOverallRecommendationEnumFromString(s string) (OverallRecommendationEnum, error) { + switch s { + case "DEFINITELY_NO": + return OverallRecommendationEnumDefinitelyNo, nil + case "NO": + return OverallRecommendationEnumNo, nil + case "YES": + return OverallRecommendationEnumYes, nil + case "STRONG_YES": + return OverallRecommendationEnumStrongYes, nil + case "NO_DECISION": + return OverallRecommendationEnumNoDecision, nil + } + var t OverallRecommendationEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (o OverallRecommendationEnum) Ptr() *OverallRecommendationEnum { + return &o +} + +type PaginatedScorecardList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Scorecard `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedScorecardList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedScorecardList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedScorecardList) GetResults() []*Scorecard { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedScorecardList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedScorecardList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedScorecardList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedScorecardList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedScorecardList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +// # The Scorecard Object +// ### Description +// The `Scorecard` object is used to represent an interviewer's candidate recommendation based on a particular interview. +// ### Usage Example +// Fetch from the `LIST Scorecards` endpoint and filter by `application` to show all scorecard for an applicant. +type Scorecard struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The application being scored. + Application *ScorecardApplication `json:"application,omitempty" url:"application,omitempty"` + // The interview being scored. + Interview *ScorecardInterview `json:"interview,omitempty" url:"interview,omitempty"` + // The interviewer doing the scoring. + Interviewer *ScorecardInterviewer `json:"interviewer,omitempty" url:"interviewer,omitempty"` + // When the third party's scorecard was created. + RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty" url:"remote_created_at,omitempty"` + // When the scorecard was submitted. + SubmittedAt *time.Time `json:"submitted_at,omitempty" url:"submitted_at,omitempty"` + // The inteviewer's recommendation. + // + // * `DEFINITELY_NO` - DEFINITELY_NO + // * `NO` - NO + // * `YES` - YES + // * `STRONG_YES` - STRONG_YES + // * `NO_DECISION` - NO_DECISION + OverallRecommendation *ScorecardOverallRecommendation `json:"overall_recommendation,omitempty" url:"overall_recommendation,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (s *Scorecard) GetId() *string { + if s == nil { + return nil + } + return s.Id +} + +func (s *Scorecard) GetRemoteId() *string { + if s == nil { + return nil + } + return s.RemoteId +} + +func (s *Scorecard) GetCreatedAt() *time.Time { + if s == nil { + return nil + } + return s.CreatedAt +} + +func (s *Scorecard) GetModifiedAt() *time.Time { + if s == nil { + return nil + } + return s.ModifiedAt +} + +func (s *Scorecard) GetApplication() *ScorecardApplication { + if s == nil { + return nil + } + return s.Application +} + +func (s *Scorecard) GetInterview() *ScorecardInterview { + if s == nil { + return nil + } + return s.Interview +} + +func (s *Scorecard) GetInterviewer() *ScorecardInterviewer { + if s == nil { + return nil + } + return s.Interviewer +} + +func (s *Scorecard) GetRemoteCreatedAt() *time.Time { + if s == nil { + return nil + } + return s.RemoteCreatedAt +} + +func (s *Scorecard) GetSubmittedAt() *time.Time { + if s == nil { + return nil + } + return s.SubmittedAt +} + +func (s *Scorecard) GetOverallRecommendation() *ScorecardOverallRecommendation { + if s == nil { + return nil + } + return s.OverallRecommendation +} + +func (s *Scorecard) GetRemoteWasDeleted() *bool { + if s == nil { + return nil + } + return s.RemoteWasDeleted +} + +func (s *Scorecard) GetFieldMappings() map[string]interface{} { + if s == nil { + return nil + } + return s.FieldMappings +} + +func (s *Scorecard) GetRemoteData() []*RemoteData { + if s == nil { + return nil + } + return s.RemoteData +} + +func (s *Scorecard) GetExtraProperties() map[string]interface{} { + return s.extraProperties +} + +func (s *Scorecard) UnmarshalJSON(data []byte) error { + type embed Scorecard + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + SubmittedAt *internal.DateTime `json:"submitted_at,omitempty"` + }{ + embed: embed(*s), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *s = Scorecard(unmarshaler.embed) + s.CreatedAt = unmarshaler.CreatedAt.TimePtr() + s.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + s.RemoteCreatedAt = unmarshaler.RemoteCreatedAt.TimePtr() + s.SubmittedAt = unmarshaler.SubmittedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *s) + if err != nil { + return err + } + s.extraProperties = extraProperties + s.rawJSON = json.RawMessage(data) + return nil +} + +func (s *Scorecard) MarshalJSON() ([]byte, error) { + type embed Scorecard + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + SubmittedAt *internal.DateTime `json:"submitted_at,omitempty"` + }{ + embed: embed(*s), + CreatedAt: internal.NewOptionalDateTime(s.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(s.ModifiedAt), + RemoteCreatedAt: internal.NewOptionalDateTime(s.RemoteCreatedAt), + SubmittedAt: internal.NewOptionalDateTime(s.SubmittedAt), + } + return json.Marshal(marshaler) +} + +func (s *Scorecard) String() string { + if len(s.rawJSON) > 0 { + if value, err := internal.StringifyJSON(s.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(s); err == nil { + return value + } + return fmt.Sprintf("%#v", s) +} + +// The application being scored. +type ScorecardApplication struct { + String string + Application *Application + + typ string +} + +func (s *ScorecardApplication) GetString() string { + if s == nil { + return "" + } + return s.String +} + +func (s *ScorecardApplication) GetApplication() *Application { + if s == nil { + return nil + } + return s.Application +} + +func (s *ScorecardApplication) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + s.typ = "String" + s.String = valueString + return nil + } + valueApplication := new(Application) + if err := json.Unmarshal(data, &valueApplication); err == nil { + s.typ = "Application" + s.Application = valueApplication + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, s) +} + +func (s ScorecardApplication) MarshalJSON() ([]byte, error) { + if s.typ == "String" || s.String != "" { + return json.Marshal(s.String) + } + if s.typ == "Application" || s.Application != nil { + return json.Marshal(s.Application) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", s) +} + +type ScorecardApplicationVisitor interface { + VisitString(string) error + VisitApplication(*Application) error +} + +func (s *ScorecardApplication) Accept(visitor ScorecardApplicationVisitor) error { + if s.typ == "String" || s.String != "" { + return visitor.VisitString(s.String) + } + if s.typ == "Application" || s.Application != nil { + return visitor.VisitApplication(s.Application) + } + return fmt.Errorf("type %T does not include a non-empty union type", s) +} + +// The interview being scored. +type ScorecardInterview struct { + String string + ScheduledInterview *ScheduledInterview + + typ string +} + +func (s *ScorecardInterview) GetString() string { + if s == nil { + return "" + } + return s.String +} + +func (s *ScorecardInterview) GetScheduledInterview() *ScheduledInterview { + if s == nil { + return nil + } + return s.ScheduledInterview +} + +func (s *ScorecardInterview) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + s.typ = "String" + s.String = valueString + return nil + } + valueScheduledInterview := new(ScheduledInterview) + if err := json.Unmarshal(data, &valueScheduledInterview); err == nil { + s.typ = "ScheduledInterview" + s.ScheduledInterview = valueScheduledInterview + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, s) +} + +func (s ScorecardInterview) MarshalJSON() ([]byte, error) { + if s.typ == "String" || s.String != "" { + return json.Marshal(s.String) + } + if s.typ == "ScheduledInterview" || s.ScheduledInterview != nil { + return json.Marshal(s.ScheduledInterview) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", s) +} + +type ScorecardInterviewVisitor interface { + VisitString(string) error + VisitScheduledInterview(*ScheduledInterview) error +} + +func (s *ScorecardInterview) Accept(visitor ScorecardInterviewVisitor) error { + if s.typ == "String" || s.String != "" { + return visitor.VisitString(s.String) + } + if s.typ == "ScheduledInterview" || s.ScheduledInterview != nil { + return visitor.VisitScheduledInterview(s.ScheduledInterview) + } + return fmt.Errorf("type %T does not include a non-empty union type", s) +} + +// The interviewer doing the scoring. +type ScorecardInterviewer struct { + String string + RemoteUser *RemoteUser + + typ string +} + +func (s *ScorecardInterviewer) GetString() string { + if s == nil { + return "" + } + return s.String +} + +func (s *ScorecardInterviewer) GetRemoteUser() *RemoteUser { + if s == nil { + return nil + } + return s.RemoteUser +} + +func (s *ScorecardInterviewer) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + s.typ = "String" + s.String = valueString + return nil + } + valueRemoteUser := new(RemoteUser) + if err := json.Unmarshal(data, &valueRemoteUser); err == nil { + s.typ = "RemoteUser" + s.RemoteUser = valueRemoteUser + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, s) +} + +func (s ScorecardInterviewer) MarshalJSON() ([]byte, error) { + if s.typ == "String" || s.String != "" { + return json.Marshal(s.String) + } + if s.typ == "RemoteUser" || s.RemoteUser != nil { + return json.Marshal(s.RemoteUser) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", s) +} + +type ScorecardInterviewerVisitor interface { + VisitString(string) error + VisitRemoteUser(*RemoteUser) error +} + +func (s *ScorecardInterviewer) Accept(visitor ScorecardInterviewerVisitor) error { + if s.typ == "String" || s.String != "" { + return visitor.VisitString(s.String) + } + if s.typ == "RemoteUser" || s.RemoteUser != nil { + return visitor.VisitRemoteUser(s.RemoteUser) + } + return fmt.Errorf("type %T does not include a non-empty union type", s) +} + +// The inteviewer's recommendation. +// +// * `DEFINITELY_NO` - DEFINITELY_NO +// * `NO` - NO +// * `YES` - YES +// * `STRONG_YES` - STRONG_YES +// * `NO_DECISION` - NO_DECISION +type ScorecardOverallRecommendation struct { + OverallRecommendationEnum OverallRecommendationEnum + String string + + typ string +} + +func (s *ScorecardOverallRecommendation) GetOverallRecommendationEnum() OverallRecommendationEnum { + if s == nil { + return "" + } + return s.OverallRecommendationEnum +} + +func (s *ScorecardOverallRecommendation) GetString() string { + if s == nil { + return "" + } + return s.String +} + +func (s *ScorecardOverallRecommendation) UnmarshalJSON(data []byte) error { + var valueOverallRecommendationEnum OverallRecommendationEnum + if err := json.Unmarshal(data, &valueOverallRecommendationEnum); err == nil { + s.typ = "OverallRecommendationEnum" + s.OverallRecommendationEnum = valueOverallRecommendationEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + s.typ = "String" + s.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, s) +} + +func (s ScorecardOverallRecommendation) MarshalJSON() ([]byte, error) { + if s.typ == "OverallRecommendationEnum" || s.OverallRecommendationEnum != "" { + return json.Marshal(s.OverallRecommendationEnum) + } + if s.typ == "String" || s.String != "" { + return json.Marshal(s.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", s) +} + +type ScorecardOverallRecommendationVisitor interface { + VisitOverallRecommendationEnum(OverallRecommendationEnum) error + VisitString(string) error +} + +func (s *ScorecardOverallRecommendation) Accept(visitor ScorecardOverallRecommendationVisitor) error { + if s.typ == "OverallRecommendationEnum" || s.OverallRecommendationEnum != "" { + return visitor.VisitOverallRecommendationEnum(s.OverallRecommendationEnum) + } + if s.typ == "String" || s.String != "" { + return visitor.VisitString(s.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", s) +} diff --git a/ats/scorecards/client.go b/ats/scorecards/client.go index a2ed605..edfa6cf 100644 --- a/ats/scorecards/client.go +++ b/ats/scorecards/client.go @@ -1,144 +1,137 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package scorecards import ( context "context" fmt "fmt" - ats "github.com/merge-api/merge-go-client/ats" - core "github.com/merge-api/merge-go-client/core" + ats "github.com/merge-api/merge-go-client/v2/ats" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `Scorecard` objects. -func (c *Client) List(ctx context.Context, request *ats.ScorecardsListRequest) (*ats.PaginatedScorecardList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ats/v1/scorecards" - - queryParams := make(url.Values) - if request.ApplicationId != nil { - queryParams.Add("application_id", fmt.Sprintf("%v", *request.ApplicationId)) - } - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.InterviewId != nil { - queryParams.Add("interview_id", fmt.Sprintf("%v", *request.InterviewId)) - } - if request.InterviewerId != nil { - queryParams.Add("interviewer_id", fmt.Sprintf("%v", *request.InterviewerId)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteFields != nil { - queryParams.Add("remote_fields", fmt.Sprintf("%v", request.RemoteFields)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if request.ShowEnumOrigins != nil { - queryParams.Add("show_enum_origins", fmt.Sprintf("%v", request.ShowEnumOrigins)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *ats.PaginatedScorecardList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *ats.ScorecardsListRequest, + opts ...option.RequestOption, +) (*core.Page[*ats.Scorecard], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ats/v1/scorecards" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *ats.PaginatedScorecardList) *internal.PageResponse[*string, *ats.Scorecard] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *ats.Scorecard]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Returns a `Scorecard` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *ats.ScorecardsRetrieveRequest) (*ats.Scorecard, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"ats/v1/scorecards/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.RemoteFields != nil { - queryParams.Add("remote_fields", fmt.Sprintf("%v", request.RemoteFields)) - } - if request.ShowEnumOrigins != nil { - queryParams.Add("show_enum_origins", fmt.Sprintf("%v", request.ShowEnumOrigins)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *ats.ScorecardsRetrieveRequest, + opts ...option.RequestOption, +) (*ats.Scorecard, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/ats/v1/scorecards/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ats.Scorecard if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/ats/sync_status.go b/ats/sync_status.go index ea5449f..db8af4a 100644 --- a/ats/sync_status.go +++ b/ats/sync_status.go @@ -1,10 +1,78 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package ats +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" +) + type SyncStatusListRequest struct { // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` +} + +type PaginatedSyncStatusList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*SyncStatus `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedSyncStatusList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedSyncStatusList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedSyncStatusList) GetResults() []*SyncStatus { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedSyncStatusList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedSyncStatusList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedSyncStatusList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedSyncStatusList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedSyncStatusList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) } diff --git a/ats/syncstatus/client.go b/ats/syncstatus/client.go index f3c5abb..4bc370c 100644 --- a/ats/syncstatus/client.go +++ b/ats/syncstatus/client.go @@ -1,64 +1,92 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package syncstatus import ( context "context" fmt "fmt" - ats "github.com/merge-api/merge-go-client/ats" - core "github.com/merge-api/merge-go-client/core" + ats "github.com/merge-api/merge-go-client/v2/ats" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } -// Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). -func (c *Client) List(ctx context.Context, request *ats.SyncStatusListRequest) (*ats.PaginatedSyncStatusList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL +// Get sync status for the current sync and the most recently finished sync. `last_sync_start` represents the most recent time any sync began. `last_sync_finished` represents the most recent time any sync completed. These timestamps may correspond to different sync instances which may result in a sync start time being later than a separate sync completed time. To ensure you are retrieving the latest available data reference the `last_sync_finished` timestamp where `last_sync_result` is `DONE`. Possible values for `status` and `last_sync_result` are `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). +func (c *Client) List( + ctx context.Context, + request *ats.SyncStatusListRequest, + opts ...option.RequestOption, +) (*core.Page[*ats.SyncStatus], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ats/v1/sync-status" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } - endpointURL := baseURL + "/" + "ats/v1/sync-status" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) - queryParams := make(url.Values) - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *ats.PaginatedSyncStatusList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { - return nil, err + readPageResponse := func(response *ats.PaginatedSyncStatusList) *internal.PageResponse[*string, *ats.SyncStatus] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *ats.SyncStatus]{ + Next: next, + Results: results, + Done: next == zeroValue, + } } - return response, nil + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } diff --git a/ats/tags.go b/ats/tags.go index 32beef0..6ccc90b 100644 --- a/ats/tags.go +++ b/ats/tags.go @@ -1,30 +1,221 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package ats import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type TagsListRequest struct { // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` +} + +type PaginatedTagList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Tag `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedTagList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedTagList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedTagList) GetResults() []*Tag { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedTagList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedTagList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedTagList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedTagList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedTagList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +// # The Tag Object +// ### Description +// The `Tag` object is used to represent a tag for a candidate. +// ### Usage Example +// Fetch from the `LIST Tags` endpoint and view the tags used within a company. +type Tag struct { + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The tag's name. + Name *string `json:"name,omitempty" url:"name,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []map[string]interface{} `json:"remote_data,omitempty" url:"remote_data,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (t *Tag) GetRemoteId() *string { + if t == nil { + return nil + } + return t.RemoteId +} + +func (t *Tag) GetCreatedAt() *time.Time { + if t == nil { + return nil + } + return t.CreatedAt +} + +func (t *Tag) GetModifiedAt() *time.Time { + if t == nil { + return nil + } + return t.ModifiedAt +} + +func (t *Tag) GetName() *string { + if t == nil { + return nil + } + return t.Name +} + +func (t *Tag) GetRemoteWasDeleted() *bool { + if t == nil { + return nil + } + return t.RemoteWasDeleted +} + +func (t *Tag) GetFieldMappings() map[string]interface{} { + if t == nil { + return nil + } + return t.FieldMappings +} + +func (t *Tag) GetRemoteData() []map[string]interface{} { + if t == nil { + return nil + } + return t.RemoteData +} + +func (t *Tag) GetExtraProperties() map[string]interface{} { + return t.extraProperties +} + +func (t *Tag) UnmarshalJSON(data []byte) error { + type embed Tag + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*t), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *t = Tag(unmarshaler.embed) + t.CreatedAt = unmarshaler.CreatedAt.TimePtr() + t.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *t) + if err != nil { + return err + } + t.extraProperties = extraProperties + t.rawJSON = json.RawMessage(data) + return nil +} + +func (t *Tag) MarshalJSON() ([]byte, error) { + type embed Tag + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*t), + CreatedAt: internal.NewOptionalDateTime(t.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(t.ModifiedAt), + } + return json.Marshal(marshaler) +} + +func (t *Tag) String() string { + if len(t.rawJSON) > 0 { + if value, err := internal.StringifyJSON(t.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(t); err == nil { + return value + } + return fmt.Sprintf("%#v", t) } diff --git a/ats/tags/client.go b/ats/tags/client.go index eb34ff2..23623e8 100644 --- a/ats/tags/client.go +++ b/ats/tags/client.go @@ -1,89 +1,92 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package tags import ( context "context" fmt "fmt" - ats "github.com/merge-api/merge-go-client/ats" - core "github.com/merge-api/merge-go-client/core" + ats "github.com/merge-api/merge-go-client/v2/ats" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `Tag` objects. -func (c *Client) List(ctx context.Context, request *ats.TagsListRequest) (*ats.PaginatedTagList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL +func (c *Client) List( + ctx context.Context, + request *ats.TagsListRequest, + opts ...option.RequestOption, +) (*core.Page[*ats.Tag], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ats/v1/tags" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } - endpointURL := baseURL + "/" + "ats/v1/tags" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) - queryParams := make(url.Values) - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *ats.PaginatedTagList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { - return nil, err + readPageResponse := func(response *ats.PaginatedTagList) *internal.PageResponse[*string, *ats.Tag] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *ats.Tag]{ + Next: next, + Results: results, + Done: next == zeroValue, + } } - return response, nil + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } diff --git a/ats/types.go b/ats/types.go index 205d132..254aba0 100644 --- a/ats/types.go +++ b/ats/types.go @@ -1,19 +1,19 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package ats import ( json "encoding/json" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) -// - `SUPER_ADMIN` - SUPER_ADMIN -// - `ADMIN` - ADMIN -// - `TEAM_MEMBER` - TEAM_MEMBER -// - `LIMITED_TEAM_MEMBER` - LIMITED_TEAM_MEMBER -// - `INTERVIEWER` - INTERVIEWER +// * `SUPER_ADMIN` - SUPER_ADMIN +// * `ADMIN` - ADMIN +// * `TEAM_MEMBER` - TEAM_MEMBER +// * `LIMITED_TEAM_MEMBER` - LIMITED_TEAM_MEMBER +// * `INTERVIEWER` - INTERVIEWER type AccessRoleEnum string const ( @@ -45,190 +45,103 @@ func (a AccessRoleEnum) Ptr() *AccessRoleEnum { return &a } -type AccountDetails struct { - Id *string `json:"id,omitempty"` - Integration *string `json:"integration,omitempty"` - IntegrationSlug *string `json:"integration_slug,omitempty"` - Category *CategoryEnum `json:"category,omitempty"` - EndUserOriginId *string `json:"end_user_origin_id,omitempty"` - EndUserOrganizationName *string `json:"end_user_organization_name,omitempty"` - EndUserEmailAddress *string `json:"end_user_email_address,omitempty"` - Status *string `json:"status,omitempty"` - WebhookListenerUrl *string `json:"webhook_listener_url,omitempty"` - // 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. - IsDuplicate *bool `json:"is_duplicate,omitempty"` - AccountType *string `json:"account_type,omitempty"` - // The time at which account completes the linking flow. - CompletedAt *time.Time `json:"completed_at,omitempty"` +type AccountIntegration struct { + // Company name. + Name string `json:"name" url:"name"` + // Optional. This shortened name appears in places with limited space, usually in conjunction with the platform's logo (e.g., Merge Link menu).

Example: Workforce Now (in lieu of ADP Workforce Now), SuccessFactors (in lieu of SAP SuccessFactors) + AbbreviatedName *string `json:"abbreviated_name,omitempty" url:"abbreviated_name,omitempty"` + // Category or categories this integration belongs to. Multiple categories should be comma separated, i.e. [ats, hris]. + Categories []CategoriesEnum `json:"categories,omitempty" url:"categories,omitempty"` + // Company logo in rectangular shape. + Image *string `json:"image,omitempty" url:"image,omitempty"` + // Company logo in square shape. + SquareImage *string `json:"square_image,omitempty" url:"square_image,omitempty"` + // The color of this integration used for buttons and text throughout the app and landing pages. Choose a darker, saturated color. + Color *string `json:"color,omitempty" url:"color,omitempty"` + Slug *string `json:"slug,omitempty" url:"slug,omitempty"` + // Mapping of API endpoints to documentation urls for support. Example: {'GET': [['/common-model-scopes', 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], 'POST': []} + ApiEndpointsToDocumentationUrls map[string]interface{} `json:"api_endpoints_to_documentation_urls,omitempty" url:"api_endpoints_to_documentation_urls,omitempty"` + // Setup guide URL for third party webhook creation. Exposed in Merge Docs. + WebhookSetupGuideUrl *string `json:"webhook_setup_guide_url,omitempty" url:"webhook_setup_guide_url,omitempty"` + // Category or categories this integration is in beta status for. + CategoryBetaStatus map[string]interface{} `json:"category_beta_status,omitempty" url:"category_beta_status,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (a *AccountDetails) UnmarshalJSON(data []byte) error { - type unmarshaler AccountDetails - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (a *AccountIntegration) GetName() string { + if a == nil { + return "" } - *a = AccountDetails(value) - a._rawJSON = json.RawMessage(data) - return nil + return a.Name } -func (a *AccountDetails) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(a); err == nil { - return value +func (a *AccountIntegration) GetAbbreviatedName() *string { + if a == nil { + return nil } - return fmt.Sprintf("%#v", a) + return a.AbbreviatedName } -// # The LinkedAccount Object -// -// ### Description -// -// The `LinkedAccount` object is used to represent an end user's link with a specific integration. -// -// ### Usage Example -// -// View a list of your organization's `LinkedAccount` objects. -type AccountDetailsAndActions struct { - Id string `json:"id"` - Category *CategoryEnum `json:"category,omitempty"` - Status AccountDetailsAndActionsStatusEnum `json:"status,omitempty"` - StatusDetail *string `json:"status_detail,omitempty"` - EndUserOriginId *string `json:"end_user_origin_id,omitempty"` - EndUserOrganizationName string `json:"end_user_organization_name"` - EndUserEmailAddress string `json:"end_user_email_address"` - // The tenant or domain the customer has provided access to. - Subdomain *string `json:"subdomain,omitempty"` - WebhookListenerUrl string `json:"webhook_listener_url"` - // 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. - IsDuplicate *bool `json:"is_duplicate,omitempty"` - Integration *AccountDetailsAndActionsIntegration `json:"integration,omitempty"` - AccountType string `json:"account_type"` - CompletedAt time.Time `json:"completed_at"` - - _rawJSON json.RawMessage -} - -func (a *AccountDetailsAndActions) UnmarshalJSON(data []byte) error { - type unmarshaler AccountDetailsAndActions - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (a *AccountIntegration) GetCategories() []CategoriesEnum { + if a == nil { + return nil } - *a = AccountDetailsAndActions(value) - a._rawJSON = json.RawMessage(data) - return nil + return a.Categories } -func (a *AccountDetailsAndActions) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(a); err == nil { - return value +func (a *AccountIntegration) GetImage() *string { + if a == nil { + return nil } - return fmt.Sprintf("%#v", a) + return a.Image } -type AccountDetailsAndActionsIntegration struct { - Name string `json:"name"` - Categories []CategoriesEnum `json:"categories,omitempty"` - Image *string `json:"image,omitempty"` - SquareImage *string `json:"square_image,omitempty"` - Color string `json:"color"` - Slug string `json:"slug"` - PassthroughAvailable bool `json:"passthrough_available"` - AvailableModelOperations []*ModelOperation `json:"available_model_operations,omitempty"` - - _rawJSON json.RawMessage +func (a *AccountIntegration) GetSquareImage() *string { + if a == nil { + return nil + } + return a.SquareImage } -func (a *AccountDetailsAndActionsIntegration) UnmarshalJSON(data []byte) error { - type unmarshaler AccountDetailsAndActionsIntegration - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (a *AccountIntegration) GetColor() *string { + if a == nil { + return nil } - *a = AccountDetailsAndActionsIntegration(value) - a._rawJSON = json.RawMessage(data) - return nil + return a.Color } -func (a *AccountDetailsAndActionsIntegration) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(a); err == nil { - return value +func (a *AccountIntegration) GetSlug() *string { + if a == nil { + return nil } - return fmt.Sprintf("%#v", a) + return a.Slug } -// - `COMPLETE` - COMPLETE -// - `INCOMPLETE` - INCOMPLETE -// - `RELINK_NEEDED` - RELINK_NEEDED -// - `IDLE` - IDLE -type AccountDetailsAndActionsStatusEnum string - -const ( - AccountDetailsAndActionsStatusEnumComplete AccountDetailsAndActionsStatusEnum = "COMPLETE" - AccountDetailsAndActionsStatusEnumIncomplete AccountDetailsAndActionsStatusEnum = "INCOMPLETE" - AccountDetailsAndActionsStatusEnumRelinkNeeded AccountDetailsAndActionsStatusEnum = "RELINK_NEEDED" - AccountDetailsAndActionsStatusEnumIdle AccountDetailsAndActionsStatusEnum = "IDLE" -) - -func NewAccountDetailsAndActionsStatusEnumFromString(s string) (AccountDetailsAndActionsStatusEnum, error) { - switch s { - case "COMPLETE": - return AccountDetailsAndActionsStatusEnumComplete, nil - case "INCOMPLETE": - return AccountDetailsAndActionsStatusEnumIncomplete, nil - case "RELINK_NEEDED": - return AccountDetailsAndActionsStatusEnumRelinkNeeded, nil - case "IDLE": - return AccountDetailsAndActionsStatusEnumIdle, nil - } - var t AccountDetailsAndActionsStatusEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) +func (a *AccountIntegration) GetApiEndpointsToDocumentationUrls() map[string]interface{} { + if a == nil { + return nil + } + return a.ApiEndpointsToDocumentationUrls } -func (a AccountDetailsAndActionsStatusEnum) Ptr() *AccountDetailsAndActionsStatusEnum { - return &a +func (a *AccountIntegration) GetWebhookSetupGuideUrl() *string { + if a == nil { + return nil + } + return a.WebhookSetupGuideUrl } -type AccountIntegration struct { - // Company name. - Name string `json:"name"` - // Optional. This shortened name appears in places with limited space, usually in conjunction with the platform's logo (e.g., Merge Link menu).

Example: Workforce Now (in lieu of ADP Workforce Now), SuccessFactors (in lieu of SAP SuccessFactors) - AbbreviatedName *string `json:"abbreviated_name,omitempty"` - // Category or categories this integration belongs to. Multiple categories should be comma separated, i.e. [ats, hris]. - Categories []CategoriesEnum `json:"categories,omitempty"` - // Company logo in rectangular shape. - Image *string `json:"image,omitempty"` - // Company logo in square shape. - SquareImage *string `json:"square_image,omitempty"` - // The color of this integration used for buttons and text throughout the app and landing pages. Choose a darker, saturated color. - Color *string `json:"color,omitempty"` - Slug *string `json:"slug,omitempty"` - // Mapping of API endpoints to documentation urls for support. Example: {'GET': [['/common-model-scopes', 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], 'POST': []} - ApiEndpointsToDocumentationUrls map[string]interface{} `json:"api_endpoints_to_documentation_urls,omitempty"` - // Setup guide URL for third party webhook creation. Exposed in Merge Docs. - WebhookSetupGuideUrl *string `json:"webhook_setup_guide_url,omitempty"` - // Category or categories this integration is in beta status for. - CategoryBetaStatus map[string]interface{} `json:"category_beta_status,omitempty"` +func (a *AccountIntegration) GetCategoryBetaStatus() map[string]interface{} { + if a == nil { + return nil + } + return a.CategoryBetaStatus +} - _rawJSON json.RawMessage +func (a *AccountIntegration) GetExtraProperties() map[string]interface{} { + return a.extraProperties } func (a *AccountIntegration) UnmarshalJSON(data []byte) error { @@ -238,9039 +151,6199 @@ func (a *AccountIntegration) UnmarshalJSON(data []byte) error { return err } *a = AccountIntegration(value) - a._rawJSON = json.RawMessage(data) + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) return nil } func (a *AccountIntegration) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(a); err == nil { + if value, err := internal.StringifyJSON(a); err == nil { return value } return fmt.Sprintf("%#v", a) } -type AccountToken struct { - AccountToken string `json:"account_token"` - Integration *AccountIntegration `json:"integration,omitempty"` +// # The Application Object +// ### Description +// The Application Object is used to represent a candidate's journey through a particular Job's recruiting process. If a Candidate applies for multiple Jobs, there will be a separate Application for each Job if the third-party integration allows it. +// +// ### Usage Example +// Fetch from the `LIST Applications` endpoint and filter by `ID` to show all applications. +type Application struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The candidate applying. + Candidate *ApplicationCandidate `json:"candidate,omitempty" url:"candidate,omitempty"` + // The job being applied for. + Job *ApplicationJob `json:"job,omitempty" url:"job,omitempty"` + // When the application was submitted. + AppliedAt *time.Time `json:"applied_at,omitempty" url:"applied_at,omitempty"` + // When the application was rejected. + RejectedAt *time.Time `json:"rejected_at,omitempty" url:"rejected_at,omitempty"` + Offers []*ApplicationOffersItem `json:"offers,omitempty" url:"offers,omitempty"` + // The application's source. + Source *string `json:"source,omitempty" url:"source,omitempty"` + // The user credited for this application. + CreditedTo *ApplicationCreditedTo `json:"credited_to,omitempty" url:"credited_to,omitempty"` + ScreeningQuestionAnswers []*ApplicationScreeningQuestionAnswersItem `json:"screening_question_answers,omitempty" url:"screening_question_answers,omitempty"` + // The application's current stage. + CurrentStage *ApplicationCurrentStage `json:"current_stage,omitempty" url:"current_stage,omitempty"` + // The application's reason for rejection. + RejectReason *ApplicationRejectReason `json:"reject_reason,omitempty" url:"reject_reason,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (a *AccountToken) UnmarshalJSON(data []byte) error { - type unmarshaler AccountToken - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (a *Application) GetId() *string { + if a == nil { + return nil } - *a = AccountToken(value) - a._rawJSON = json.RawMessage(data) - return nil + return a.Id } -func (a *AccountToken) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } +func (a *Application) GetRemoteId() *string { + if a == nil { + return nil } - if value, err := core.StringifyJSON(a); err == nil { - return value + return a.RemoteId +} + +func (a *Application) GetCreatedAt() *time.Time { + if a == nil { + return nil } - return fmt.Sprintf("%#v", a) + return a.CreatedAt } -// # The Activity Object -// -// ### Description -// -// The `Activity` object is used to represent an activity for a candidate performed by a user. -// -// ### Usage Example -// -// Fetch from the `LIST Activities` endpoint and filter by `ID` to show all activities. -type Activity struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The user that performed the action. - User *ActivityUser `json:"user,omitempty"` - // When the third party's activity was created. - RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty"` - // The activity's type. - // - // - `NOTE` - NOTE - // - `EMAIL` - EMAIL - // - `OTHER` - OTHER - ActivityType *ActivityActivityType `json:"activity_type,omitempty"` - // The activity's subject. - Subject *string `json:"subject,omitempty"` - // The activity's body. - Body *string `json:"body,omitempty"` - // The activity's visibility. - // - // - `ADMIN_ONLY` - ADMIN_ONLY - // - `PUBLIC` - PUBLIC - // - `PRIVATE` - PRIVATE - Visibility *ActivityVisibility `json:"visibility,omitempty"` - Candidate *string `json:"candidate,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` +func (a *Application) GetModifiedAt() *time.Time { + if a == nil { + return nil + } + return a.ModifiedAt +} - _rawJSON json.RawMessage +func (a *Application) GetCandidate() *ApplicationCandidate { + if a == nil { + return nil + } + return a.Candidate } -func (a *Activity) UnmarshalJSON(data []byte) error { - type unmarshaler Activity - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (a *Application) GetJob() *ApplicationJob { + if a == nil { + return nil } - *a = Activity(value) - a._rawJSON = json.RawMessage(data) - return nil + return a.Job } -func (a *Activity) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } +func (a *Application) GetAppliedAt() *time.Time { + if a == nil { + return nil } - if value, err := core.StringifyJSON(a); err == nil { - return value + return a.AppliedAt +} + +func (a *Application) GetRejectedAt() *time.Time { + if a == nil { + return nil } - return fmt.Sprintf("%#v", a) + return a.RejectedAt } -// The activity's type. -// -// - `NOTE` - NOTE -// - `EMAIL` - EMAIL -// - `OTHER` - OTHER -type ActivityActivityType struct { - typeName string - ActivityTypeEnum ActivityTypeEnum - String string +func (a *Application) GetOffers() []*ApplicationOffersItem { + if a == nil { + return nil + } + return a.Offers } -func NewActivityActivityTypeFromActivityTypeEnum(value ActivityTypeEnum) *ActivityActivityType { - return &ActivityActivityType{typeName: "activityTypeEnum", ActivityTypeEnum: value} +func (a *Application) GetSource() *string { + if a == nil { + return nil + } + return a.Source } -func NewActivityActivityTypeFromString(value string) *ActivityActivityType { - return &ActivityActivityType{typeName: "string", String: value} +func (a *Application) GetCreditedTo() *ApplicationCreditedTo { + if a == nil { + return nil + } + return a.CreditedTo } -func (a *ActivityActivityType) UnmarshalJSON(data []byte) error { - var valueActivityTypeEnum ActivityTypeEnum - if err := json.Unmarshal(data, &valueActivityTypeEnum); err == nil { - a.typeName = "activityTypeEnum" - a.ActivityTypeEnum = valueActivityTypeEnum +func (a *Application) GetScreeningQuestionAnswers() []*ApplicationScreeningQuestionAnswersItem { + if a == nil { return nil } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" - a.String = valueString + return a.ScreeningQuestionAnswers +} + +func (a *Application) GetCurrentStage() *ApplicationCurrentStage { + if a == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, a) + return a.CurrentStage } -func (a ActivityActivityType) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "activityTypeEnum": - return json.Marshal(a.ActivityTypeEnum) - case "string": - return json.Marshal(a.String) +func (a *Application) GetRejectReason() *ApplicationRejectReason { + if a == nil { + return nil } + return a.RejectReason } -type ActivityActivityTypeVisitor interface { - VisitActivityTypeEnum(ActivityTypeEnum) error - VisitString(string) error +func (a *Application) GetRemoteWasDeleted() *bool { + if a == nil { + return nil + } + return a.RemoteWasDeleted } -func (a *ActivityActivityType) Accept(visitor ActivityActivityTypeVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "activityTypeEnum": - return visitor.VisitActivityTypeEnum(a.ActivityTypeEnum) - case "string": - return visitor.VisitString(a.String) +func (a *Application) GetFieldMappings() map[string]interface{} { + if a == nil { + return nil } + return a.FieldMappings } -// # The Activity Object -// -// ### Description -// -// The `Activity` object is used to represent an activity for a candidate performed by a user. -// -// ### Usage Example -// -// Fetch from the `LIST Activities` endpoint and filter by `ID` to show all activities. -type ActivityRequest struct { - // The user that performed the action. - User *ActivityRequestUser `json:"user,omitempty"` - // The activity's type. - // - // - `NOTE` - NOTE - // - `EMAIL` - EMAIL - // - `OTHER` - OTHER - ActivityType *ActivityRequestActivityType `json:"activity_type,omitempty"` - // The activity's subject. - Subject *string `json:"subject,omitempty"` - // The activity's body. - Body *string `json:"body,omitempty"` - // The activity's visibility. - // - // - `ADMIN_ONLY` - ADMIN_ONLY - // - `PUBLIC` - PUBLIC - // - `PRIVATE` - PRIVATE - Visibility *ActivityRequestVisibility `json:"visibility,omitempty"` - Candidate *string `json:"candidate,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` +func (a *Application) GetRemoteData() []*RemoteData { + if a == nil { + return nil + } + return a.RemoteData +} - _rawJSON json.RawMessage +func (a *Application) GetExtraProperties() map[string]interface{} { + return a.extraProperties } -func (a *ActivityRequest) UnmarshalJSON(data []byte) error { - type unmarshaler ActivityRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { +func (a *Application) UnmarshalJSON(data []byte) error { + type embed Application + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + AppliedAt *internal.DateTime `json:"applied_at,omitempty"` + RejectedAt *internal.DateTime `json:"rejected_at,omitempty"` + }{ + embed: embed(*a), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *a = Application(unmarshaler.embed) + a.CreatedAt = unmarshaler.CreatedAt.TimePtr() + a.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + a.AppliedAt = unmarshaler.AppliedAt.TimePtr() + a.RejectedAt = unmarshaler.RejectedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { return err } - *a = ActivityRequest(value) - a._rawJSON = json.RawMessage(data) + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) return nil } -func (a *ActivityRequest) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { +func (a *Application) MarshalJSON() ([]byte, error) { + type embed Application + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + AppliedAt *internal.DateTime `json:"applied_at,omitempty"` + RejectedAt *internal.DateTime `json:"rejected_at,omitempty"` + }{ + embed: embed(*a), + CreatedAt: internal.NewOptionalDateTime(a.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(a.ModifiedAt), + AppliedAt: internal.NewOptionalDateTime(a.AppliedAt), + RejectedAt: internal.NewOptionalDateTime(a.RejectedAt), + } + return json.Marshal(marshaler) +} + +func (a *Application) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(a); err == nil { + if value, err := internal.StringifyJSON(a); err == nil { return value } return fmt.Sprintf("%#v", a) } -// The activity's type. -// -// - `NOTE` - NOTE -// - `EMAIL` - EMAIL -// - `OTHER` - OTHER -type ActivityRequestActivityType struct { - typeName string - ActivityTypeEnum ActivityTypeEnum - String string -} +// The candidate applying. +type ApplicationCandidate struct { + String string + Candidate *Candidate -func NewActivityRequestActivityTypeFromActivityTypeEnum(value ActivityTypeEnum) *ActivityRequestActivityType { - return &ActivityRequestActivityType{typeName: "activityTypeEnum", ActivityTypeEnum: value} + typ string } -func NewActivityRequestActivityTypeFromString(value string) *ActivityRequestActivityType { - return &ActivityRequestActivityType{typeName: "string", String: value} +func (a *ApplicationCandidate) GetString() string { + if a == nil { + return "" + } + return a.String } -func (a *ActivityRequestActivityType) UnmarshalJSON(data []byte) error { - var valueActivityTypeEnum ActivityTypeEnum - if err := json.Unmarshal(data, &valueActivityTypeEnum); err == nil { - a.typeName = "activityTypeEnum" - a.ActivityTypeEnum = valueActivityTypeEnum +func (a *ApplicationCandidate) GetCandidate() *Candidate { + if a == nil { return nil } + return a.Candidate +} + +func (a *ApplicationCandidate) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" + a.typ = "String" a.String = valueString return nil } + valueCandidate := new(Candidate) + if err := json.Unmarshal(data, &valueCandidate); err == nil { + a.typ = "Candidate" + a.Candidate = valueCandidate + return nil + } return fmt.Errorf("%s cannot be deserialized as a %T", data, a) } -func (a ActivityRequestActivityType) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "activityTypeEnum": - return json.Marshal(a.ActivityTypeEnum) - case "string": +func (a ApplicationCandidate) MarshalJSON() ([]byte, error) { + if a.typ == "String" || a.String != "" { return json.Marshal(a.String) } + if a.typ == "Candidate" || a.Candidate != nil { + return json.Marshal(a.Candidate) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) } -type ActivityRequestActivityTypeVisitor interface { - VisitActivityTypeEnum(ActivityTypeEnum) error +type ApplicationCandidateVisitor interface { VisitString(string) error + VisitCandidate(*Candidate) error } -func (a *ActivityRequestActivityType) Accept(visitor ActivityRequestActivityTypeVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "activityTypeEnum": - return visitor.VisitActivityTypeEnum(a.ActivityTypeEnum) - case "string": +func (a *ApplicationCandidate) Accept(visitor ApplicationCandidateVisitor) error { + if a.typ == "String" || a.String != "" { return visitor.VisitString(a.String) } + if a.typ == "Candidate" || a.Candidate != nil { + return visitor.VisitCandidate(a.Candidate) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) } -// The user that performed the action. -type ActivityRequestUser struct { - typeName string +// The user credited for this application. +type ApplicationCreditedTo struct { String string RemoteUser *RemoteUser + + typ string } -func NewActivityRequestUserFromString(value string) *ActivityRequestUser { - return &ActivityRequestUser{typeName: "string", String: value} +func (a *ApplicationCreditedTo) GetString() string { + if a == nil { + return "" + } + return a.String } -func NewActivityRequestUserFromRemoteUser(value *RemoteUser) *ActivityRequestUser { - return &ActivityRequestUser{typeName: "remoteUser", RemoteUser: value} +func (a *ApplicationCreditedTo) GetRemoteUser() *RemoteUser { + if a == nil { + return nil + } + return a.RemoteUser } -func (a *ActivityRequestUser) UnmarshalJSON(data []byte) error { +func (a *ApplicationCreditedTo) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" + a.typ = "String" a.String = valueString return nil } valueRemoteUser := new(RemoteUser) if err := json.Unmarshal(data, &valueRemoteUser); err == nil { - a.typeName = "remoteUser" + a.typ = "RemoteUser" a.RemoteUser = valueRemoteUser return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, a) } -func (a ActivityRequestUser) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "string": +func (a ApplicationCreditedTo) MarshalJSON() ([]byte, error) { + if a.typ == "String" || a.String != "" { return json.Marshal(a.String) - case "remoteUser": + } + if a.typ == "RemoteUser" || a.RemoteUser != nil { return json.Marshal(a.RemoteUser) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) } -type ActivityRequestUserVisitor interface { +type ApplicationCreditedToVisitor interface { VisitString(string) error VisitRemoteUser(*RemoteUser) error } -func (a *ActivityRequestUser) Accept(visitor ActivityRequestUserVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "string": +func (a *ApplicationCreditedTo) Accept(visitor ApplicationCreditedToVisitor) error { + if a.typ == "String" || a.String != "" { return visitor.VisitString(a.String) - case "remoteUser": + } + if a.typ == "RemoteUser" || a.RemoteUser != nil { return visitor.VisitRemoteUser(a.RemoteUser) } + return fmt.Errorf("type %T does not include a non-empty union type", a) } -// The activity's visibility. -// -// - `ADMIN_ONLY` - ADMIN_ONLY -// - `PUBLIC` - PUBLIC -// - `PRIVATE` - PRIVATE -type ActivityRequestVisibility struct { - typeName string - VisibilityEnum VisibilityEnum - String string -} +// The application's current stage. +type ApplicationCurrentStage struct { + String string + JobInterviewStage *JobInterviewStage -func NewActivityRequestVisibilityFromVisibilityEnum(value VisibilityEnum) *ActivityRequestVisibility { - return &ActivityRequestVisibility{typeName: "visibilityEnum", VisibilityEnum: value} + typ string } -func NewActivityRequestVisibilityFromString(value string) *ActivityRequestVisibility { - return &ActivityRequestVisibility{typeName: "string", String: value} +func (a *ApplicationCurrentStage) GetString() string { + if a == nil { + return "" + } + return a.String } -func (a *ActivityRequestVisibility) UnmarshalJSON(data []byte) error { - var valueVisibilityEnum VisibilityEnum - if err := json.Unmarshal(data, &valueVisibilityEnum); err == nil { - a.typeName = "visibilityEnum" - a.VisibilityEnum = valueVisibilityEnum +func (a *ApplicationCurrentStage) GetJobInterviewStage() *JobInterviewStage { + if a == nil { return nil } + return a.JobInterviewStage +} + +func (a *ApplicationCurrentStage) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" + a.typ = "String" a.String = valueString return nil } + valueJobInterviewStage := new(JobInterviewStage) + if err := json.Unmarshal(data, &valueJobInterviewStage); err == nil { + a.typ = "JobInterviewStage" + a.JobInterviewStage = valueJobInterviewStage + return nil + } return fmt.Errorf("%s cannot be deserialized as a %T", data, a) } -func (a ActivityRequestVisibility) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "visibilityEnum": - return json.Marshal(a.VisibilityEnum) - case "string": +func (a ApplicationCurrentStage) MarshalJSON() ([]byte, error) { + if a.typ == "String" || a.String != "" { return json.Marshal(a.String) } + if a.typ == "JobInterviewStage" || a.JobInterviewStage != nil { + return json.Marshal(a.JobInterviewStage) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) } -type ActivityRequestVisibilityVisitor interface { - VisitVisibilityEnum(VisibilityEnum) error +type ApplicationCurrentStageVisitor interface { VisitString(string) error + VisitJobInterviewStage(*JobInterviewStage) error } -func (a *ActivityRequestVisibility) Accept(visitor ActivityRequestVisibilityVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "visibilityEnum": - return visitor.VisitVisibilityEnum(a.VisibilityEnum) - case "string": +func (a *ApplicationCurrentStage) Accept(visitor ApplicationCurrentStageVisitor) error { + if a.typ == "String" || a.String != "" { return visitor.VisitString(a.String) } + if a.typ == "JobInterviewStage" || a.JobInterviewStage != nil { + return visitor.VisitJobInterviewStage(a.JobInterviewStage) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) } -type ActivityResponse struct { - Model *Activity `json:"model,omitempty"` - Warnings []*WarningValidationProblem `json:"warnings,omitempty"` - Errors []*ErrorValidationProblem `json:"errors,omitempty"` - Logs []*DebugModeLog `json:"logs,omitempty"` +// The job being applied for. +type ApplicationJob struct { + String string + Job *Job - _rawJSON json.RawMessage + typ string } -func (a *ActivityResponse) UnmarshalJSON(data []byte) error { - type unmarshaler ActivityResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (a *ApplicationJob) GetString() string { + if a == nil { + return "" } - *a = ActivityResponse(value) - a._rawJSON = json.RawMessage(data) - return nil + return a.String } -func (a *ActivityResponse) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(a); err == nil { - return value +func (a *ApplicationJob) GetJob() *Job { + if a == nil { + return nil } - return fmt.Sprintf("%#v", a) + return a.Job } -// - `NOTE` - NOTE -// - `EMAIL` - EMAIL -// - `OTHER` - OTHER -type ActivityTypeEnum string - -const ( - ActivityTypeEnumNote ActivityTypeEnum = "NOTE" - ActivityTypeEnumEmail ActivityTypeEnum = "EMAIL" - ActivityTypeEnumOther ActivityTypeEnum = "OTHER" -) - -func NewActivityTypeEnumFromString(s string) (ActivityTypeEnum, error) { - switch s { - case "NOTE": - return ActivityTypeEnumNote, nil - case "EMAIL": - return ActivityTypeEnumEmail, nil - case "OTHER": - return ActivityTypeEnumOther, nil - } - var t ActivityTypeEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (a ActivityTypeEnum) Ptr() *ActivityTypeEnum { - return &a -} - -// The user that performed the action. -type ActivityUser struct { - typeName string - String string - RemoteUser *RemoteUser -} - -func NewActivityUserFromString(value string) *ActivityUser { - return &ActivityUser{typeName: "string", String: value} -} - -func NewActivityUserFromRemoteUser(value *RemoteUser) *ActivityUser { - return &ActivityUser{typeName: "remoteUser", RemoteUser: value} -} - -func (a *ActivityUser) UnmarshalJSON(data []byte) error { +func (a *ApplicationJob) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" + a.typ = "String" a.String = valueString return nil } - valueRemoteUser := new(RemoteUser) - if err := json.Unmarshal(data, &valueRemoteUser); err == nil { - a.typeName = "remoteUser" - a.RemoteUser = valueRemoteUser + valueJob := new(Job) + if err := json.Unmarshal(data, &valueJob); err == nil { + a.typ = "Job" + a.Job = valueJob return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, a) } -func (a ActivityUser) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "string": +func (a ApplicationJob) MarshalJSON() ([]byte, error) { + if a.typ == "String" || a.String != "" { return json.Marshal(a.String) - case "remoteUser": - return json.Marshal(a.RemoteUser) } + if a.typ == "Job" || a.Job != nil { + return json.Marshal(a.Job) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) } -type ActivityUserVisitor interface { +type ApplicationJobVisitor interface { VisitString(string) error - VisitRemoteUser(*RemoteUser) error + VisitJob(*Job) error } -func (a *ActivityUser) Accept(visitor ActivityUserVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "string": +func (a *ApplicationJob) Accept(visitor ApplicationJobVisitor) error { + if a.typ == "String" || a.String != "" { return visitor.VisitString(a.String) - case "remoteUser": - return visitor.VisitRemoteUser(a.RemoteUser) } + if a.typ == "Job" || a.Job != nil { + return visitor.VisitJob(a.Job) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) } -// The activity's visibility. -// -// - `ADMIN_ONLY` - ADMIN_ONLY -// - `PUBLIC` - PUBLIC -// - `PRIVATE` - PRIVATE -type ActivityVisibility struct { - typeName string - VisibilityEnum VisibilityEnum - String string -} +type ApplicationOffersItem struct { + String string + Offer *Offer -func NewActivityVisibilityFromVisibilityEnum(value VisibilityEnum) *ActivityVisibility { - return &ActivityVisibility{typeName: "visibilityEnum", VisibilityEnum: value} + typ string } -func NewActivityVisibilityFromString(value string) *ActivityVisibility { - return &ActivityVisibility{typeName: "string", String: value} +func (a *ApplicationOffersItem) GetString() string { + if a == nil { + return "" + } + return a.String } -func (a *ActivityVisibility) UnmarshalJSON(data []byte) error { - var valueVisibilityEnum VisibilityEnum - if err := json.Unmarshal(data, &valueVisibilityEnum); err == nil { - a.typeName = "visibilityEnum" - a.VisibilityEnum = valueVisibilityEnum +func (a *ApplicationOffersItem) GetOffer() *Offer { + if a == nil { return nil } + return a.Offer +} + +func (a *ApplicationOffersItem) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" + a.typ = "String" a.String = valueString return nil } + valueOffer := new(Offer) + if err := json.Unmarshal(data, &valueOffer); err == nil { + a.typ = "Offer" + a.Offer = valueOffer + return nil + } return fmt.Errorf("%s cannot be deserialized as a %T", data, a) } -func (a ActivityVisibility) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "visibilityEnum": - return json.Marshal(a.VisibilityEnum) - case "string": +func (a ApplicationOffersItem) MarshalJSON() ([]byte, error) { + if a.typ == "String" || a.String != "" { return json.Marshal(a.String) } + if a.typ == "Offer" || a.Offer != nil { + return json.Marshal(a.Offer) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) } -type ActivityVisibilityVisitor interface { - VisitVisibilityEnum(VisibilityEnum) error +type ApplicationOffersItemVisitor interface { VisitString(string) error + VisitOffer(*Offer) error } -func (a *ActivityVisibility) Accept(visitor ActivityVisibilityVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "visibilityEnum": - return visitor.VisitVisibilityEnum(a.VisibilityEnum) - case "string": +func (a *ApplicationOffersItem) Accept(visitor ApplicationOffersItemVisitor) error { + if a.typ == "String" || a.String != "" { return visitor.VisitString(a.String) } -} - -type AdvancedMetadata struct { - Id string `json:"id"` - DisplayName *string `json:"display_name,omitempty"` - Description *string `json:"description,omitempty"` - IsRequired *bool `json:"is_required,omitempty"` - IsCustom *bool `json:"is_custom,omitempty"` - FieldChoices []interface{} `json:"field_choices,omitempty"` - - _rawJSON json.RawMessage -} - -func (a *AdvancedMetadata) UnmarshalJSON(data []byte) error { - type unmarshaler AdvancedMetadata - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *a = AdvancedMetadata(value) - a._rawJSON = json.RawMessage(data) - return nil -} - -func (a *AdvancedMetadata) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(a); err == nil { - return value + if a.typ == "Offer" || a.Offer != nil { + return visitor.VisitOffer(a.Offer) } - return fmt.Sprintf("%#v", a) + return fmt.Errorf("type %T does not include a non-empty union type", a) } -// # The Application Object -// -// ### Description -// -// The Application Object is used to represent a candidate's journey through a particular Job's recruiting process. If a Candidate applies for multiple Jobs, there will be a separate Application for each Job if the third-party integration allows it. -// -// ### Usage Example -// -// Fetch from the `LIST Applications` endpoint and filter by `ID` to show all applications. -type Application struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The candidate applying. - Candidate *ApplicationCandidate `json:"candidate,omitempty"` - // The job being applied for. - Job *ApplicationJob `json:"job,omitempty"` - // When the application was submitted. - AppliedAt *time.Time `json:"applied_at,omitempty"` - // When the application was rejected. - RejectedAt *time.Time `json:"rejected_at,omitempty"` - Offers []*ApplicationOffersItem `json:"offers,omitempty"` - // The application's source. - Source *string `json:"source,omitempty"` - // The user credited for this application. - CreditedTo *ApplicationCreditedTo `json:"credited_to,omitempty"` - ScreeningQuestionAnswers []*ApplicationScreeningQuestionAnswersItem `json:"screening_question_answers,omitempty"` - // The application's current stage. - CurrentStage *ApplicationCurrentStage `json:"current_stage,omitempty"` - // The application's reason for rejection. - RejectReason *ApplicationRejectReason `json:"reject_reason,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` +// The application's reason for rejection. +type ApplicationRejectReason struct { + String string + RejectReason *RejectReason - _rawJSON json.RawMessage + typ string } -func (a *Application) UnmarshalJSON(data []byte) error { - type unmarshaler Application - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (a *ApplicationRejectReason) GetString() string { + if a == nil { + return "" } - *a = Application(value) - a._rawJSON = json.RawMessage(data) - return nil + return a.String } -func (a *Application) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(a); err == nil { - return value +func (a *ApplicationRejectReason) GetRejectReason() *RejectReason { + if a == nil { + return nil } - return fmt.Sprintf("%#v", a) -} - -// The candidate applying. -type ApplicationCandidate struct { - typeName string - String string - Candidate *Candidate -} - -func NewApplicationCandidateFromString(value string) *ApplicationCandidate { - return &ApplicationCandidate{typeName: "string", String: value} -} - -func NewApplicationCandidateFromCandidate(value *Candidate) *ApplicationCandidate { - return &ApplicationCandidate{typeName: "candidate", Candidate: value} + return a.RejectReason } -func (a *ApplicationCandidate) UnmarshalJSON(data []byte) error { +func (a *ApplicationRejectReason) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" + a.typ = "String" a.String = valueString return nil } - valueCandidate := new(Candidate) - if err := json.Unmarshal(data, &valueCandidate); err == nil { - a.typeName = "candidate" - a.Candidate = valueCandidate + valueRejectReason := new(RejectReason) + if err := json.Unmarshal(data, &valueRejectReason); err == nil { + a.typ = "RejectReason" + a.RejectReason = valueRejectReason return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, a) } -func (a ApplicationCandidate) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "string": +func (a ApplicationRejectReason) MarshalJSON() ([]byte, error) { + if a.typ == "String" || a.String != "" { return json.Marshal(a.String) - case "candidate": - return json.Marshal(a.Candidate) } + if a.typ == "RejectReason" || a.RejectReason != nil { + return json.Marshal(a.RejectReason) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) } -type ApplicationCandidateVisitor interface { +type ApplicationRejectReasonVisitor interface { VisitString(string) error - VisitCandidate(*Candidate) error + VisitRejectReason(*RejectReason) error } -func (a *ApplicationCandidate) Accept(visitor ApplicationCandidateVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "string": +func (a *ApplicationRejectReason) Accept(visitor ApplicationRejectReasonVisitor) error { + if a.typ == "String" || a.String != "" { return visitor.VisitString(a.String) - case "candidate": - return visitor.VisitCandidate(a.Candidate) } + if a.typ == "RejectReason" || a.RejectReason != nil { + return visitor.VisitRejectReason(a.RejectReason) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) } -// The user credited for this application. -type ApplicationCreditedTo struct { - typeName string - String string - RemoteUser *RemoteUser +type ApplicationScreeningQuestionAnswersItem struct { + String string + ScreeningQuestionAnswer *ScreeningQuestionAnswer + + typ string } -func NewApplicationCreditedToFromString(value string) *ApplicationCreditedTo { - return &ApplicationCreditedTo{typeName: "string", String: value} +func (a *ApplicationScreeningQuestionAnswersItem) GetString() string { + if a == nil { + return "" + } + return a.String } -func NewApplicationCreditedToFromRemoteUser(value *RemoteUser) *ApplicationCreditedTo { - return &ApplicationCreditedTo{typeName: "remoteUser", RemoteUser: value} +func (a *ApplicationScreeningQuestionAnswersItem) GetScreeningQuestionAnswer() *ScreeningQuestionAnswer { + if a == nil { + return nil + } + return a.ScreeningQuestionAnswer } -func (a *ApplicationCreditedTo) UnmarshalJSON(data []byte) error { +func (a *ApplicationScreeningQuestionAnswersItem) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" + a.typ = "String" a.String = valueString return nil } - valueRemoteUser := new(RemoteUser) - if err := json.Unmarshal(data, &valueRemoteUser); err == nil { - a.typeName = "remoteUser" - a.RemoteUser = valueRemoteUser + valueScreeningQuestionAnswer := new(ScreeningQuestionAnswer) + if err := json.Unmarshal(data, &valueScreeningQuestionAnswer); err == nil { + a.typ = "ScreeningQuestionAnswer" + a.ScreeningQuestionAnswer = valueScreeningQuestionAnswer return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, a) } -func (a ApplicationCreditedTo) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "string": +func (a ApplicationScreeningQuestionAnswersItem) MarshalJSON() ([]byte, error) { + if a.typ == "String" || a.String != "" { return json.Marshal(a.String) - case "remoteUser": - return json.Marshal(a.RemoteUser) } + if a.typ == "ScreeningQuestionAnswer" || a.ScreeningQuestionAnswer != nil { + return json.Marshal(a.ScreeningQuestionAnswer) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) } -type ApplicationCreditedToVisitor interface { +type ApplicationScreeningQuestionAnswersItemVisitor interface { VisitString(string) error - VisitRemoteUser(*RemoteUser) error + VisitScreeningQuestionAnswer(*ScreeningQuestionAnswer) error } -func (a *ApplicationCreditedTo) Accept(visitor ApplicationCreditedToVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "string": +func (a *ApplicationScreeningQuestionAnswersItem) Accept(visitor ApplicationScreeningQuestionAnswersItemVisitor) error { + if a.typ == "String" || a.String != "" { return visitor.VisitString(a.String) - case "remoteUser": - return visitor.VisitRemoteUser(a.RemoteUser) } + if a.typ == "ScreeningQuestionAnswer" || a.ScreeningQuestionAnswer != nil { + return visitor.VisitScreeningQuestionAnswer(a.ScreeningQuestionAnswer) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) } -// The application's current stage. -type ApplicationCurrentStage struct { - typeName string - String string - JobInterviewStage *JobInterviewStage -} - -func NewApplicationCurrentStageFromString(value string) *ApplicationCurrentStage { - return &ApplicationCurrentStage{typeName: "string", String: value} -} +// # The Attachment Object +// ### Description +// The `Attachment` object is used to represent a file attached to a candidate. +// ### Usage Example +// Fetch from the `LIST Attachments` endpoint and view attachments accessible by a company. +type Attachment struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The attachment's name. + FileName *string `json:"file_name,omitempty" url:"file_name,omitempty"` + // The attachment's url. + FileUrl *string `json:"file_url,omitempty" url:"file_url,omitempty"` + Candidate *string `json:"candidate,omitempty" url:"candidate,omitempty"` + // The attachment's type. + // + // * `RESUME` - RESUME + // * `COVER_LETTER` - COVER_LETTER + // * `OFFER_LETTER` - OFFER_LETTER + // * `OTHER` - OTHER + AttachmentType *AttachmentAttachmentType `json:"attachment_type,omitempty" url:"attachment_type,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` -func NewApplicationCurrentStageFromJobInterviewStage(value *JobInterviewStage) *ApplicationCurrentStage { - return &ApplicationCurrentStage{typeName: "jobInterviewStage", JobInterviewStage: value} + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (a *ApplicationCurrentStage) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" - a.String = valueString +func (a *Attachment) GetId() *string { + if a == nil { return nil } - valueJobInterviewStage := new(JobInterviewStage) - if err := json.Unmarshal(data, &valueJobInterviewStage); err == nil { - a.typeName = "jobInterviewStage" - a.JobInterviewStage = valueJobInterviewStage + return a.Id +} + +func (a *Attachment) GetRemoteId() *string { + if a == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, a) + return a.RemoteId } -func (a ApplicationCurrentStage) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "string": - return json.Marshal(a.String) - case "jobInterviewStage": - return json.Marshal(a.JobInterviewStage) +func (a *Attachment) GetCreatedAt() *time.Time { + if a == nil { + return nil } + return a.CreatedAt } -type ApplicationCurrentStageVisitor interface { - VisitString(string) error - VisitJobInterviewStage(*JobInterviewStage) error +func (a *Attachment) GetModifiedAt() *time.Time { + if a == nil { + return nil + } + return a.ModifiedAt } -func (a *ApplicationCurrentStage) Accept(visitor ApplicationCurrentStageVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "string": - return visitor.VisitString(a.String) - case "jobInterviewStage": - return visitor.VisitJobInterviewStage(a.JobInterviewStage) +func (a *Attachment) GetFileName() *string { + if a == nil { + return nil } + return a.FileName } -// The job being applied for. -type ApplicationJob struct { - typeName string - String string - Job *Job +func (a *Attachment) GetFileUrl() *string { + if a == nil { + return nil + } + return a.FileUrl } -func NewApplicationJobFromString(value string) *ApplicationJob { - return &ApplicationJob{typeName: "string", String: value} +func (a *Attachment) GetCandidate() *string { + if a == nil { + return nil + } + return a.Candidate } -func NewApplicationJobFromJob(value *Job) *ApplicationJob { - return &ApplicationJob{typeName: "job", Job: value} +func (a *Attachment) GetAttachmentType() *AttachmentAttachmentType { + if a == nil { + return nil + } + return a.AttachmentType } -func (a *ApplicationJob) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" - a.String = valueString +func (a *Attachment) GetRemoteWasDeleted() *bool { + if a == nil { return nil } - valueJob := new(Job) - if err := json.Unmarshal(data, &valueJob); err == nil { - a.typeName = "job" - a.Job = valueJob + return a.RemoteWasDeleted +} + +func (a *Attachment) GetFieldMappings() map[string]interface{} { + if a == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, a) + return a.FieldMappings } -func (a ApplicationJob) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "string": - return json.Marshal(a.String) - case "job": - return json.Marshal(a.Job) +func (a *Attachment) GetRemoteData() []*RemoteData { + if a == nil { + return nil } + return a.RemoteData } -type ApplicationJobVisitor interface { - VisitString(string) error - VisitJob(*Job) error +func (a *Attachment) GetExtraProperties() map[string]interface{} { + return a.extraProperties } -func (a *ApplicationJob) Accept(visitor ApplicationJobVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "string": - return visitor.VisitString(a.String) - case "job": - return visitor.VisitJob(a.Job) +func (a *Attachment) UnmarshalJSON(data []byte) error { + type embed Attachment + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*a), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *a = Attachment(unmarshaler.embed) + a.CreatedAt = unmarshaler.CreatedAt.TimePtr() + a.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil } -type ApplicationOffersItem struct { - typeName string - String string - Offer *Offer +func (a *Attachment) MarshalJSON() ([]byte, error) { + type embed Attachment + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*a), + CreatedAt: internal.NewOptionalDateTime(a.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(a.ModifiedAt), + } + return json.Marshal(marshaler) } -func NewApplicationOffersItemFromString(value string) *ApplicationOffersItem { - return &ApplicationOffersItem{typeName: "string", String: value} -} - -func NewApplicationOffersItemFromOffer(value *Offer) *ApplicationOffersItem { - return &ApplicationOffersItem{typeName: "offer", Offer: value} -} - -func (a *ApplicationOffersItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" - a.String = valueString - return nil +func (a *Attachment) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } } - valueOffer := new(Offer) - if err := json.Unmarshal(data, &valueOffer); err == nil { - a.typeName = "offer" - a.Offer = valueOffer - return nil + if value, err := internal.StringifyJSON(a); err == nil { + return value } - return fmt.Errorf("%s cannot be deserialized as a %T", data, a) + return fmt.Sprintf("%#v", a) } -func (a ApplicationOffersItem) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "string": - return json.Marshal(a.String) - case "offer": - return json.Marshal(a.Offer) - } -} +// The attachment's type. +// +// * `RESUME` - RESUME +// * `COVER_LETTER` - COVER_LETTER +// * `OFFER_LETTER` - OFFER_LETTER +// * `OTHER` - OTHER +type AttachmentAttachmentType struct { + AttachmentTypeEnum AttachmentTypeEnum + String string -type ApplicationOffersItemVisitor interface { - VisitString(string) error - VisitOffer(*Offer) error + typ string } -func (a *ApplicationOffersItem) Accept(visitor ApplicationOffersItemVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "string": - return visitor.VisitString(a.String) - case "offer": - return visitor.VisitOffer(a.Offer) +func (a *AttachmentAttachmentType) GetAttachmentTypeEnum() AttachmentTypeEnum { + if a == nil { + return "" } + return a.AttachmentTypeEnum } -// The application's reason for rejection. -type ApplicationRejectReason struct { - typeName string - String string - RejectReason *RejectReason -} - -func NewApplicationRejectReasonFromString(value string) *ApplicationRejectReason { - return &ApplicationRejectReason{typeName: "string", String: value} -} - -func NewApplicationRejectReasonFromRejectReason(value *RejectReason) *ApplicationRejectReason { - return &ApplicationRejectReason{typeName: "rejectReason", RejectReason: value} +func (a *AttachmentAttachmentType) GetString() string { + if a == nil { + return "" + } + return a.String } -func (a *ApplicationRejectReason) UnmarshalJSON(data []byte) error { +func (a *AttachmentAttachmentType) UnmarshalJSON(data []byte) error { + var valueAttachmentTypeEnum AttachmentTypeEnum + if err := json.Unmarshal(data, &valueAttachmentTypeEnum); err == nil { + a.typ = "AttachmentTypeEnum" + a.AttachmentTypeEnum = valueAttachmentTypeEnum + return nil + } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" + a.typ = "String" a.String = valueString return nil } - valueRejectReason := new(RejectReason) - if err := json.Unmarshal(data, &valueRejectReason); err == nil { - a.typeName = "rejectReason" - a.RejectReason = valueRejectReason - return nil - } return fmt.Errorf("%s cannot be deserialized as a %T", data, a) } -func (a ApplicationRejectReason) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "string": +func (a AttachmentAttachmentType) MarshalJSON() ([]byte, error) { + if a.typ == "AttachmentTypeEnum" || a.AttachmentTypeEnum != "" { + return json.Marshal(a.AttachmentTypeEnum) + } + if a.typ == "String" || a.String != "" { return json.Marshal(a.String) - case "rejectReason": - return json.Marshal(a.RejectReason) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) } -type ApplicationRejectReasonVisitor interface { +type AttachmentAttachmentTypeVisitor interface { + VisitAttachmentTypeEnum(AttachmentTypeEnum) error VisitString(string) error - VisitRejectReason(*RejectReason) error } -func (a *ApplicationRejectReason) Accept(visitor ApplicationRejectReasonVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "string": +func (a *AttachmentAttachmentType) Accept(visitor AttachmentAttachmentTypeVisitor) error { + if a.typ == "AttachmentTypeEnum" || a.AttachmentTypeEnum != "" { + return visitor.VisitAttachmentTypeEnum(a.AttachmentTypeEnum) + } + if a.typ == "String" || a.String != "" { return visitor.VisitString(a.String) - case "rejectReason": - return visitor.VisitRejectReason(a.RejectReason) } + return fmt.Errorf("type %T does not include a non-empty union type", a) } -// # The Application Object -// +// * `RESUME` - RESUME +// * `COVER_LETTER` - COVER_LETTER +// * `OFFER_LETTER` - OFFER_LETTER +// * `OTHER` - OTHER +type AttachmentTypeEnum string + +const ( + AttachmentTypeEnumResume AttachmentTypeEnum = "RESUME" + AttachmentTypeEnumCoverLetter AttachmentTypeEnum = "COVER_LETTER" + AttachmentTypeEnumOfferLetter AttachmentTypeEnum = "OFFER_LETTER" + AttachmentTypeEnumOther AttachmentTypeEnum = "OTHER" +) + +func NewAttachmentTypeEnumFromString(s string) (AttachmentTypeEnum, error) { + switch s { + case "RESUME": + return AttachmentTypeEnumResume, nil + case "COVER_LETTER": + return AttachmentTypeEnumCoverLetter, nil + case "OFFER_LETTER": + return AttachmentTypeEnumOfferLetter, nil + case "OTHER": + return AttachmentTypeEnumOther, nil + } + var t AttachmentTypeEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (a AttachmentTypeEnum) Ptr() *AttachmentTypeEnum { + return &a +} + +// # The Candidate Object // ### Description -// -// The Application Object is used to represent a candidate's journey through a particular Job's recruiting process. If a Candidate applies for multiple Jobs, there will be a separate Application for each Job if the third-party integration allows it. -// +// The `Candidate` object is used to represent profile information about a given Candidate. Because it is specific to a Candidate, this information stays constant across applications. // ### Usage Example -// -// Fetch from the `LIST Applications` endpoint and filter by `ID` to show all applications. -type ApplicationRequest struct { - // The candidate applying. - Candidate *ApplicationRequestCandidate `json:"candidate,omitempty"` - // The job being applied for. - Job *ApplicationRequestJob `json:"job,omitempty"` - // When the application was submitted. - AppliedAt *time.Time `json:"applied_at,omitempty"` - // When the application was rejected. - RejectedAt *time.Time `json:"rejected_at,omitempty"` - Offers []*ApplicationRequestOffersItem `json:"offers,omitempty"` - // The application's source. - Source *string `json:"source,omitempty"` - // The user credited for this application. - CreditedTo *ApplicationRequestCreditedTo `json:"credited_to,omitempty"` - ScreeningQuestionAnswers []*ApplicationRequestScreeningQuestionAnswersItem `json:"screening_question_answers,omitempty"` - // The application's current stage. - CurrentStage *ApplicationRequestCurrentStage `json:"current_stage,omitempty"` - // The application's reason for rejection. - RejectReason *ApplicationRequestRejectReason `json:"reject_reason,omitempty"` - RemoteTemplateId *string `json:"remote_template_id,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` +// Fetch from the `LIST Candidates` endpoint and filter by `ID` to show all candidates. +type Candidate struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The candidate's first name. + FirstName *string `json:"first_name,omitempty" url:"first_name,omitempty"` + // The candidate's last name. + LastName *string `json:"last_name,omitempty" url:"last_name,omitempty"` + // The candidate's current company. + Company *string `json:"company,omitempty" url:"company,omitempty"` + // The candidate's current title. + Title *string `json:"title,omitempty" url:"title,omitempty"` + // When the third party's candidate was created. + RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty" url:"remote_created_at,omitempty"` + // When the third party's candidate was updated. + RemoteUpdatedAt *time.Time `json:"remote_updated_at,omitempty" url:"remote_updated_at,omitempty"` + // When the most recent interaction with the candidate occurred. + LastInteractionAt *time.Time `json:"last_interaction_at,omitempty" url:"last_interaction_at,omitempty"` + // Whether or not the candidate is private. + IsPrivate *bool `json:"is_private,omitempty" url:"is_private,omitempty"` + // Whether or not the candidate can be emailed. + CanEmail *bool `json:"can_email,omitempty" url:"can_email,omitempty"` + // The candidate's locations. + Locations []*string `json:"locations,omitempty" url:"locations,omitempty"` + PhoneNumbers []*PhoneNumber `json:"phone_numbers,omitempty" url:"phone_numbers,omitempty"` + EmailAddresses []*EmailAddress `json:"email_addresses,omitempty" url:"email_addresses,omitempty"` + Urls []*Url `json:"urls,omitempty" url:"urls,omitempty"` + // Array of `Tag` names as strings. + Tags []*string `json:"tags,omitempty" url:"tags,omitempty"` + // Array of `Application` object IDs. + Applications []*CandidateApplicationsItem `json:"applications,omitempty" url:"applications,omitempty"` + // Array of `Attachment` object IDs. + Attachments []*CandidateAttachmentsItem `json:"attachments,omitempty" url:"attachments,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (a *ApplicationRequest) UnmarshalJSON(data []byte) error { - type unmarshaler ApplicationRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (c *Candidate) GetId() *string { + if c == nil { + return nil } - *a = ApplicationRequest(value) - a._rawJSON = json.RawMessage(data) - return nil + return c.Id } -func (a *ApplicationRequest) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(a); err == nil { - return value +func (c *Candidate) GetRemoteId() *string { + if c == nil { + return nil } - return fmt.Sprintf("%#v", a) + return c.RemoteId } -// The candidate applying. -type ApplicationRequestCandidate struct { - typeName string - String string - Candidate *Candidate +func (c *Candidate) GetCreatedAt() *time.Time { + if c == nil { + return nil + } + return c.CreatedAt } -func NewApplicationRequestCandidateFromString(value string) *ApplicationRequestCandidate { - return &ApplicationRequestCandidate{typeName: "string", String: value} +func (c *Candidate) GetModifiedAt() *time.Time { + if c == nil { + return nil + } + return c.ModifiedAt } -func NewApplicationRequestCandidateFromCandidate(value *Candidate) *ApplicationRequestCandidate { - return &ApplicationRequestCandidate{typeName: "candidate", Candidate: value} +func (c *Candidate) GetFirstName() *string { + if c == nil { + return nil + } + return c.FirstName } -func (a *ApplicationRequestCandidate) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" - a.String = valueString +func (c *Candidate) GetLastName() *string { + if c == nil { return nil } - valueCandidate := new(Candidate) - if err := json.Unmarshal(data, &valueCandidate); err == nil { - a.typeName = "candidate" - a.Candidate = valueCandidate + return c.LastName +} + +func (c *Candidate) GetCompany() *string { + if c == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, a) + return c.Company } -func (a ApplicationRequestCandidate) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "string": - return json.Marshal(a.String) - case "candidate": - return json.Marshal(a.Candidate) +func (c *Candidate) GetTitle() *string { + if c == nil { + return nil } + return c.Title } -type ApplicationRequestCandidateVisitor interface { - VisitString(string) error - VisitCandidate(*Candidate) error +func (c *Candidate) GetRemoteCreatedAt() *time.Time { + if c == nil { + return nil + } + return c.RemoteCreatedAt } -func (a *ApplicationRequestCandidate) Accept(visitor ApplicationRequestCandidateVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "string": - return visitor.VisitString(a.String) - case "candidate": - return visitor.VisitCandidate(a.Candidate) +func (c *Candidate) GetRemoteUpdatedAt() *time.Time { + if c == nil { + return nil } + return c.RemoteUpdatedAt } -// The user credited for this application. -type ApplicationRequestCreditedTo struct { - typeName string - String string - RemoteUser *RemoteUser +func (c *Candidate) GetLastInteractionAt() *time.Time { + if c == nil { + return nil + } + return c.LastInteractionAt } -func NewApplicationRequestCreditedToFromString(value string) *ApplicationRequestCreditedTo { - return &ApplicationRequestCreditedTo{typeName: "string", String: value} +func (c *Candidate) GetIsPrivate() *bool { + if c == nil { + return nil + } + return c.IsPrivate } -func NewApplicationRequestCreditedToFromRemoteUser(value *RemoteUser) *ApplicationRequestCreditedTo { - return &ApplicationRequestCreditedTo{typeName: "remoteUser", RemoteUser: value} +func (c *Candidate) GetCanEmail() *bool { + if c == nil { + return nil + } + return c.CanEmail } -func (a *ApplicationRequestCreditedTo) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" - a.String = valueString +func (c *Candidate) GetLocations() []*string { + if c == nil { return nil } - valueRemoteUser := new(RemoteUser) - if err := json.Unmarshal(data, &valueRemoteUser); err == nil { - a.typeName = "remoteUser" - a.RemoteUser = valueRemoteUser + return c.Locations +} + +func (c *Candidate) GetPhoneNumbers() []*PhoneNumber { + if c == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, a) + return c.PhoneNumbers } -func (a ApplicationRequestCreditedTo) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "string": - return json.Marshal(a.String) - case "remoteUser": - return json.Marshal(a.RemoteUser) +func (c *Candidate) GetEmailAddresses() []*EmailAddress { + if c == nil { + return nil } + return c.EmailAddresses } -type ApplicationRequestCreditedToVisitor interface { - VisitString(string) error - VisitRemoteUser(*RemoteUser) error +func (c *Candidate) GetUrls() []*Url { + if c == nil { + return nil + } + return c.Urls } -func (a *ApplicationRequestCreditedTo) Accept(visitor ApplicationRequestCreditedToVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "string": - return visitor.VisitString(a.String) - case "remoteUser": - return visitor.VisitRemoteUser(a.RemoteUser) +func (c *Candidate) GetTags() []*string { + if c == nil { + return nil } + return c.Tags } -// The application's current stage. -type ApplicationRequestCurrentStage struct { - typeName string - String string - JobInterviewStage *JobInterviewStage +func (c *Candidate) GetApplications() []*CandidateApplicationsItem { + if c == nil { + return nil + } + return c.Applications } -func NewApplicationRequestCurrentStageFromString(value string) *ApplicationRequestCurrentStage { - return &ApplicationRequestCurrentStage{typeName: "string", String: value} +func (c *Candidate) GetAttachments() []*CandidateAttachmentsItem { + if c == nil { + return nil + } + return c.Attachments } -func NewApplicationRequestCurrentStageFromJobInterviewStage(value *JobInterviewStage) *ApplicationRequestCurrentStage { - return &ApplicationRequestCurrentStage{typeName: "jobInterviewStage", JobInterviewStage: value} +func (c *Candidate) GetRemoteWasDeleted() *bool { + if c == nil { + return nil + } + return c.RemoteWasDeleted } -func (a *ApplicationRequestCurrentStage) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" - a.String = valueString +func (c *Candidate) GetFieldMappings() map[string]interface{} { + if c == nil { return nil } - valueJobInterviewStage := new(JobInterviewStage) - if err := json.Unmarshal(data, &valueJobInterviewStage); err == nil { - a.typeName = "jobInterviewStage" - a.JobInterviewStage = valueJobInterviewStage + return c.FieldMappings +} + +func (c *Candidate) GetRemoteData() []*RemoteData { + if c == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, a) + return c.RemoteData } -func (a ApplicationRequestCurrentStage) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "string": - return json.Marshal(a.String) - case "jobInterviewStage": - return json.Marshal(a.JobInterviewStage) +func (c *Candidate) GetExtraProperties() map[string]interface{} { + return c.extraProperties +} + +func (c *Candidate) UnmarshalJSON(data []byte) error { + type embed Candidate + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + RemoteUpdatedAt *internal.DateTime `json:"remote_updated_at,omitempty"` + LastInteractionAt *internal.DateTime `json:"last_interaction_at,omitempty"` + }{ + embed: embed(*c), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err } + *c = Candidate(unmarshaler.embed) + c.CreatedAt = unmarshaler.CreatedAt.TimePtr() + c.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + c.RemoteCreatedAt = unmarshaler.RemoteCreatedAt.TimePtr() + c.RemoteUpdatedAt = unmarshaler.RemoteUpdatedAt.TimePtr() + c.LastInteractionAt = unmarshaler.LastInteractionAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *c) + if err != nil { + return err + } + c.extraProperties = extraProperties + c.rawJSON = json.RawMessage(data) + return nil } -type ApplicationRequestCurrentStageVisitor interface { - VisitString(string) error - VisitJobInterviewStage(*JobInterviewStage) error +func (c *Candidate) MarshalJSON() ([]byte, error) { + type embed Candidate + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + RemoteUpdatedAt *internal.DateTime `json:"remote_updated_at,omitempty"` + LastInteractionAt *internal.DateTime `json:"last_interaction_at,omitempty"` + }{ + embed: embed(*c), + CreatedAt: internal.NewOptionalDateTime(c.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(c.ModifiedAt), + RemoteCreatedAt: internal.NewOptionalDateTime(c.RemoteCreatedAt), + RemoteUpdatedAt: internal.NewOptionalDateTime(c.RemoteUpdatedAt), + LastInteractionAt: internal.NewOptionalDateTime(c.LastInteractionAt), + } + return json.Marshal(marshaler) } -func (a *ApplicationRequestCurrentStage) Accept(visitor ApplicationRequestCurrentStageVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "string": - return visitor.VisitString(a.String) - case "jobInterviewStage": - return visitor.VisitJobInterviewStage(a.JobInterviewStage) +func (c *Candidate) String() string { + if len(c.rawJSON) > 0 { + if value, err := internal.StringifyJSON(c.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(c); err == nil { + return value } + return fmt.Sprintf("%#v", c) } -// The job being applied for. -type ApplicationRequestJob struct { - typeName string - String string - Job *Job +type CandidateApplicationsItem struct { + String string + Application *Application + + typ string } -func NewApplicationRequestJobFromString(value string) *ApplicationRequestJob { - return &ApplicationRequestJob{typeName: "string", String: value} +func (c *CandidateApplicationsItem) GetString() string { + if c == nil { + return "" + } + return c.String } -func NewApplicationRequestJobFromJob(value *Job) *ApplicationRequestJob { - return &ApplicationRequestJob{typeName: "job", Job: value} +func (c *CandidateApplicationsItem) GetApplication() *Application { + if c == nil { + return nil + } + return c.Application } -func (a *ApplicationRequestJob) UnmarshalJSON(data []byte) error { +func (c *CandidateApplicationsItem) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" - a.String = valueString + c.typ = "String" + c.String = valueString return nil } - valueJob := new(Job) - if err := json.Unmarshal(data, &valueJob); err == nil { - a.typeName = "job" - a.Job = valueJob + valueApplication := new(Application) + if err := json.Unmarshal(data, &valueApplication); err == nil { + c.typ = "Application" + c.Application = valueApplication return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, a) + return fmt.Errorf("%s cannot be deserialized as a %T", data, c) } -func (a ApplicationRequestJob) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "string": - return json.Marshal(a.String) - case "job": - return json.Marshal(a.Job) +func (c CandidateApplicationsItem) MarshalJSON() ([]byte, error) { + if c.typ == "String" || c.String != "" { + return json.Marshal(c.String) + } + if c.typ == "Application" || c.Application != nil { + return json.Marshal(c.Application) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", c) } -type ApplicationRequestJobVisitor interface { +type CandidateApplicationsItemVisitor interface { VisitString(string) error - VisitJob(*Job) error + VisitApplication(*Application) error } -func (a *ApplicationRequestJob) Accept(visitor ApplicationRequestJobVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "string": - return visitor.VisitString(a.String) - case "job": - return visitor.VisitJob(a.Job) +func (c *CandidateApplicationsItem) Accept(visitor CandidateApplicationsItemVisitor) error { + if c.typ == "String" || c.String != "" { + return visitor.VisitString(c.String) + } + if c.typ == "Application" || c.Application != nil { + return visitor.VisitApplication(c.Application) } + return fmt.Errorf("type %T does not include a non-empty union type", c) } -type ApplicationRequestOffersItem struct { - typeName string - String string - Offer *Offer +type CandidateAttachmentsItem struct { + String string + Attachment *Attachment + + typ string } -func NewApplicationRequestOffersItemFromString(value string) *ApplicationRequestOffersItem { - return &ApplicationRequestOffersItem{typeName: "string", String: value} +func (c *CandidateAttachmentsItem) GetString() string { + if c == nil { + return "" + } + return c.String } -func NewApplicationRequestOffersItemFromOffer(value *Offer) *ApplicationRequestOffersItem { - return &ApplicationRequestOffersItem{typeName: "offer", Offer: value} +func (c *CandidateAttachmentsItem) GetAttachment() *Attachment { + if c == nil { + return nil + } + return c.Attachment } -func (a *ApplicationRequestOffersItem) UnmarshalJSON(data []byte) error { +func (c *CandidateAttachmentsItem) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" - a.String = valueString + c.typ = "String" + c.String = valueString return nil } - valueOffer := new(Offer) - if err := json.Unmarshal(data, &valueOffer); err == nil { - a.typeName = "offer" - a.Offer = valueOffer + valueAttachment := new(Attachment) + if err := json.Unmarshal(data, &valueAttachment); err == nil { + c.typ = "Attachment" + c.Attachment = valueAttachment return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, a) + return fmt.Errorf("%s cannot be deserialized as a %T", data, c) } -func (a ApplicationRequestOffersItem) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "string": - return json.Marshal(a.String) - case "offer": - return json.Marshal(a.Offer) +func (c CandidateAttachmentsItem) MarshalJSON() ([]byte, error) { + if c.typ == "String" || c.String != "" { + return json.Marshal(c.String) + } + if c.typ == "Attachment" || c.Attachment != nil { + return json.Marshal(c.Attachment) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", c) } -type ApplicationRequestOffersItemVisitor interface { +type CandidateAttachmentsItemVisitor interface { VisitString(string) error - VisitOffer(*Offer) error + VisitAttachment(*Attachment) error } -func (a *ApplicationRequestOffersItem) Accept(visitor ApplicationRequestOffersItemVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "string": - return visitor.VisitString(a.String) - case "offer": - return visitor.VisitOffer(a.Offer) +func (c *CandidateAttachmentsItem) Accept(visitor CandidateAttachmentsItemVisitor) error { + if c.typ == "String" || c.String != "" { + return visitor.VisitString(c.String) + } + if c.typ == "Attachment" || c.Attachment != nil { + return visitor.VisitAttachment(c.Attachment) } + return fmt.Errorf("type %T does not include a non-empty union type", c) } -// The application's reason for rejection. -type ApplicationRequestRejectReason struct { - typeName string - String string - RejectReason *RejectReason -} +// * `hris` - hris +// * `ats` - ats +// * `accounting` - accounting +// * `ticketing` - ticketing +// * `crm` - crm +// * `mktg` - mktg +// * `filestorage` - filestorage +type CategoriesEnum string -func NewApplicationRequestRejectReasonFromString(value string) *ApplicationRequestRejectReason { - return &ApplicationRequestRejectReason{typeName: "string", String: value} -} +const ( + CategoriesEnumHris CategoriesEnum = "hris" + CategoriesEnumAts CategoriesEnum = "ats" + CategoriesEnumAccounting CategoriesEnum = "accounting" + CategoriesEnumTicketing CategoriesEnum = "ticketing" + CategoriesEnumCrm CategoriesEnum = "crm" + CategoriesEnumMktg CategoriesEnum = "mktg" + CategoriesEnumFilestorage CategoriesEnum = "filestorage" +) -func NewApplicationRequestRejectReasonFromRejectReason(value *RejectReason) *ApplicationRequestRejectReason { - return &ApplicationRequestRejectReason{typeName: "rejectReason", RejectReason: value} +func NewCategoriesEnumFromString(s string) (CategoriesEnum, error) { + switch s { + case "hris": + return CategoriesEnumHris, nil + case "ats": + return CategoriesEnumAts, nil + case "accounting": + return CategoriesEnumAccounting, nil + case "ticketing": + return CategoriesEnumTicketing, nil + case "crm": + return CategoriesEnumCrm, nil + case "mktg": + return CategoriesEnumMktg, nil + case "filestorage": + return CategoriesEnumFilestorage, nil + } + var t CategoriesEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (a *ApplicationRequestRejectReason) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" - a.String = valueString - return nil - } - valueRejectReason := new(RejectReason) - if err := json.Unmarshal(data, &valueRejectReason); err == nil { - a.typeName = "rejectReason" - a.RejectReason = valueRejectReason - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, a) +func (c CategoriesEnum) Ptr() *CategoriesEnum { + return &c } -func (a ApplicationRequestRejectReason) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "string": - return json.Marshal(a.String) - case "rejectReason": - return json.Marshal(a.RejectReason) +// * `hris` - hris +// * `ats` - ats +// * `accounting` - accounting +// * `ticketing` - ticketing +// * `crm` - crm +// * `mktg` - mktg +// * `filestorage` - filestorage +type CategoryEnum string + +const ( + CategoryEnumHris CategoryEnum = "hris" + CategoryEnumAts CategoryEnum = "ats" + CategoryEnumAccounting CategoryEnum = "accounting" + CategoryEnumTicketing CategoryEnum = "ticketing" + CategoryEnumCrm CategoryEnum = "crm" + CategoryEnumMktg CategoryEnum = "mktg" + CategoryEnumFilestorage CategoryEnum = "filestorage" +) + +func NewCategoryEnumFromString(s string) (CategoryEnum, error) { + switch s { + case "hris": + return CategoryEnumHris, nil + case "ats": + return CategoryEnumAts, nil + case "accounting": + return CategoryEnumAccounting, nil + case "ticketing": + return CategoryEnumTicketing, nil + case "crm": + return CategoryEnumCrm, nil + case "mktg": + return CategoryEnumMktg, nil + case "filestorage": + return CategoryEnumFilestorage, nil } + var t CategoryEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -type ApplicationRequestRejectReasonVisitor interface { - VisitString(string) error - VisitRejectReason(*RejectReason) error +func (c CategoryEnum) Ptr() *CategoryEnum { + return &c } -func (a *ApplicationRequestRejectReason) Accept(visitor ApplicationRequestRejectReasonVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "string": - return visitor.VisitString(a.String) - case "rejectReason": - return visitor.VisitRejectReason(a.RejectReason) - } -} +// # The DataPassthrough Object +// ### Description +// The `DataPassthrough` object is used to send information to an otherwise-unsupported third-party endpoint. +// +// ### Usage Example +// Create a `DataPassthrough` to get team hierarchies from your Rippling integration. +type DataPassthroughRequest struct { + Method MethodEnum `json:"method" url:"method"` + // The path of the request in the third party's platform. + Path string `json:"path" url:"path"` + // An optional override of the third party's base url for the request. + BaseUrlOverride *string `json:"base_url_override,omitempty" url:"base_url_override,omitempty"` + // The data with the request. You must include a `request_format` parameter matching the data's format + Data *string `json:"data,omitempty" url:"data,omitempty"` + // Pass an array of `MultipartFormField` objects in here instead of using the `data` param if `request_format` is set to `MULTIPART`. + MultipartFormData []*MultipartFormFieldRequest `json:"multipart_form_data,omitempty" url:"multipart_form_data,omitempty"` + // The headers to use for the request (Merge will handle the account's authorization headers). `Content-Type` header is required for passthrough. Choose content type corresponding to expected format of receiving server. + Headers map[string]interface{} `json:"headers,omitempty" url:"headers,omitempty"` + RequestFormat *RequestFormatEnum `json:"request_format,omitempty" url:"request_format,omitempty"` + // Optional. If true, the response will always be an object of the form `{"type": T, "value": ...}` where `T` will be one of `string, boolean, number, null, array, object`. + NormalizeResponse *bool `json:"normalize_response,omitempty" url:"normalize_response,omitempty"` -type ApplicationRequestScreeningQuestionAnswersItem struct { - typeName string - String string - ScreeningQuestionAnswerRequest *ScreeningQuestionAnswerRequest + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func NewApplicationRequestScreeningQuestionAnswersItemFromString(value string) *ApplicationRequestScreeningQuestionAnswersItem { - return &ApplicationRequestScreeningQuestionAnswersItem{typeName: "string", String: value} +func (d *DataPassthroughRequest) GetMethod() MethodEnum { + if d == nil { + return "" + } + return d.Method } -func NewApplicationRequestScreeningQuestionAnswersItemFromScreeningQuestionAnswerRequest(value *ScreeningQuestionAnswerRequest) *ApplicationRequestScreeningQuestionAnswersItem { - return &ApplicationRequestScreeningQuestionAnswersItem{typeName: "screeningQuestionAnswerRequest", ScreeningQuestionAnswerRequest: value} +func (d *DataPassthroughRequest) GetPath() string { + if d == nil { + return "" + } + return d.Path } -func (a *ApplicationRequestScreeningQuestionAnswersItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" - a.String = valueString +func (d *DataPassthroughRequest) GetBaseUrlOverride() *string { + if d == nil { return nil } - valueScreeningQuestionAnswerRequest := new(ScreeningQuestionAnswerRequest) - if err := json.Unmarshal(data, &valueScreeningQuestionAnswerRequest); err == nil { - a.typeName = "screeningQuestionAnswerRequest" - a.ScreeningQuestionAnswerRequest = valueScreeningQuestionAnswerRequest + return d.BaseUrlOverride +} + +func (d *DataPassthroughRequest) GetData() *string { + if d == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, a) + return d.Data } -func (a ApplicationRequestScreeningQuestionAnswersItem) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "string": - return json.Marshal(a.String) - case "screeningQuestionAnswerRequest": - return json.Marshal(a.ScreeningQuestionAnswerRequest) +func (d *DataPassthroughRequest) GetMultipartFormData() []*MultipartFormFieldRequest { + if d == nil { + return nil } + return d.MultipartFormData } -type ApplicationRequestScreeningQuestionAnswersItemVisitor interface { - VisitString(string) error - VisitScreeningQuestionAnswerRequest(*ScreeningQuestionAnswerRequest) error +func (d *DataPassthroughRequest) GetHeaders() map[string]interface{} { + if d == nil { + return nil + } + return d.Headers } -func (a *ApplicationRequestScreeningQuestionAnswersItem) Accept(visitor ApplicationRequestScreeningQuestionAnswersItemVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "string": - return visitor.VisitString(a.String) - case "screeningQuestionAnswerRequest": - return visitor.VisitScreeningQuestionAnswerRequest(a.ScreeningQuestionAnswerRequest) +func (d *DataPassthroughRequest) GetRequestFormat() *RequestFormatEnum { + if d == nil { + return nil } + return d.RequestFormat } -type ApplicationResponse struct { - Model *Application `json:"model,omitempty"` - Warnings []*WarningValidationProblem `json:"warnings,omitempty"` - Errors []*ErrorValidationProblem `json:"errors,omitempty"` - Logs []*DebugModeLog `json:"logs,omitempty"` +func (d *DataPassthroughRequest) GetNormalizeResponse() *bool { + if d == nil { + return nil + } + return d.NormalizeResponse +} - _rawJSON json.RawMessage +func (d *DataPassthroughRequest) GetExtraProperties() map[string]interface{} { + return d.extraProperties } -func (a *ApplicationResponse) UnmarshalJSON(data []byte) error { - type unmarshaler ApplicationResponse +func (d *DataPassthroughRequest) UnmarshalJSON(data []byte) error { + type unmarshaler DataPassthroughRequest var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *a = ApplicationResponse(value) - a._rawJSON = json.RawMessage(data) + *d = DataPassthroughRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *d) + if err != nil { + return err + } + d.extraProperties = extraProperties + d.rawJSON = json.RawMessage(data) return nil } -func (a *ApplicationResponse) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { +func (d *DataPassthroughRequest) String() string { + if len(d.rawJSON) > 0 { + if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(a); err == nil { + if value, err := internal.StringifyJSON(d); err == nil { return value } - return fmt.Sprintf("%#v", a) + return fmt.Sprintf("%#v", d) } -type ApplicationScreeningQuestionAnswersItem struct { - typeName string - String string - ScreeningQuestionAnswer *ScreeningQuestionAnswer +type DebugModeLog struct { + LogId string `json:"log_id" url:"log_id"` + DashboardView string `json:"dashboard_view" url:"dashboard_view"` + LogSummary *DebugModelLogSummary `json:"log_summary" url:"log_summary"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func NewApplicationScreeningQuestionAnswersItemFromString(value string) *ApplicationScreeningQuestionAnswersItem { - return &ApplicationScreeningQuestionAnswersItem{typeName: "string", String: value} +func (d *DebugModeLog) GetLogId() string { + if d == nil { + return "" + } + return d.LogId } -func NewApplicationScreeningQuestionAnswersItemFromScreeningQuestionAnswer(value *ScreeningQuestionAnswer) *ApplicationScreeningQuestionAnswersItem { - return &ApplicationScreeningQuestionAnswersItem{typeName: "screeningQuestionAnswer", ScreeningQuestionAnswer: value} +func (d *DebugModeLog) GetDashboardView() string { + if d == nil { + return "" + } + return d.DashboardView } -func (a *ApplicationScreeningQuestionAnswersItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" - a.String = valueString +func (d *DebugModeLog) GetLogSummary() *DebugModelLogSummary { + if d == nil { return nil } - valueScreeningQuestionAnswer := new(ScreeningQuestionAnswer) - if err := json.Unmarshal(data, &valueScreeningQuestionAnswer); err == nil { - a.typeName = "screeningQuestionAnswer" - a.ScreeningQuestionAnswer = valueScreeningQuestionAnswer - return nil + return d.LogSummary +} + +func (d *DebugModeLog) GetExtraProperties() map[string]interface{} { + return d.extraProperties +} + +func (d *DebugModeLog) UnmarshalJSON(data []byte) error { + type unmarshaler DebugModeLog + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err } - return fmt.Errorf("%s cannot be deserialized as a %T", data, a) + *d = DebugModeLog(value) + extraProperties, err := internal.ExtractExtraProperties(data, *d) + if err != nil { + return err + } + d.extraProperties = extraProperties + d.rawJSON = json.RawMessage(data) + return nil } -func (a ApplicationScreeningQuestionAnswersItem) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "string": - return json.Marshal(a.String) - case "screeningQuestionAnswer": - return json.Marshal(a.ScreeningQuestionAnswer) +func (d *DebugModeLog) String() string { + if len(d.rawJSON) > 0 { + if value, err := internal.StringifyJSON(d.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(d); err == nil { + return value } + return fmt.Sprintf("%#v", d) } -type ApplicationScreeningQuestionAnswersItemVisitor interface { - VisitString(string) error - VisitScreeningQuestionAnswer(*ScreeningQuestionAnswer) error +type DebugModelLogSummary struct { + Url string `json:"url" url:"url"` + Method string `json:"method" url:"method"` + StatusCode int `json:"status_code" url:"status_code"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (a *ApplicationScreeningQuestionAnswersItem) Accept(visitor ApplicationScreeningQuestionAnswersItemVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "string": - return visitor.VisitString(a.String) - case "screeningQuestionAnswer": - return visitor.VisitScreeningQuestionAnswer(a.ScreeningQuestionAnswer) +func (d *DebugModelLogSummary) GetUrl() string { + if d == nil { + return "" + } + return d.Url +} + +func (d *DebugModelLogSummary) GetMethod() string { + if d == nil { + return "" } + return d.Method } -type AsyncPassthroughReciept struct { - AsyncPassthroughReceiptId string `json:"async_passthrough_receipt_id"` +func (d *DebugModelLogSummary) GetStatusCode() int { + if d == nil { + return 0 + } + return d.StatusCode +} - _rawJSON json.RawMessage +func (d *DebugModelLogSummary) GetExtraProperties() map[string]interface{} { + return d.extraProperties } -func (a *AsyncPassthroughReciept) UnmarshalJSON(data []byte) error { - type unmarshaler AsyncPassthroughReciept +func (d *DebugModelLogSummary) UnmarshalJSON(data []byte) error { + type unmarshaler DebugModelLogSummary var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *a = AsyncPassthroughReciept(value) - a._rawJSON = json.RawMessage(data) + *d = DebugModelLogSummary(value) + extraProperties, err := internal.ExtractExtraProperties(data, *d) + if err != nil { + return err + } + d.extraProperties = extraProperties + d.rawJSON = json.RawMessage(data) return nil } -func (a *AsyncPassthroughReciept) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { +func (d *DebugModelLogSummary) String() string { + if len(d.rawJSON) > 0 { + if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(a); err == nil { + if value, err := internal.StringifyJSON(d); err == nil { return value } - return fmt.Sprintf("%#v", a) + return fmt.Sprintf("%#v", d) } -// # The Attachment Object -// +// # The Department Object // ### Description -// -// The `Attachment` object is used to represent a file attached to a candidate. -// +// The `Department` object is used to represent a department within a company. // ### Usage Example -// -// Fetch from the `LIST Attachments` endpoint and view attachments accessible by a company. -type Attachment struct { - Id *string `json:"id,omitempty"` +// Fetch from the `LIST Departments` endpoint and view the departments within a company. +type Department struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The attachment's name. - FileName *string `json:"file_name,omitempty"` - // The attachment's url. - FileUrl *string `json:"file_url,omitempty"` - Candidate *string `json:"candidate,omitempty"` - // The attachment's type. - // - // - `RESUME` - RESUME - // - `COVER_LETTER` - COVER_LETTER - // - `OFFER_LETTER` - OFFER_LETTER - // - `OTHER` - OTHER - AttachmentType *AttachmentAttachmentType `json:"attachment_type,omitempty"` + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The department's name. + Name *string `json:"name,omitempty" url:"name,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (a *Attachment) UnmarshalJSON(data []byte) error { - type unmarshaler Attachment - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (d *Department) GetId() *string { + if d == nil { + return nil } - *a = Attachment(value) - a._rawJSON = json.RawMessage(data) - return nil + return d.Id } -func (a *Attachment) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(a); err == nil { - return value +func (d *Department) GetRemoteId() *string { + if d == nil { + return nil } - return fmt.Sprintf("%#v", a) -} - -// The attachment's type. -// -// - `RESUME` - RESUME -// - `COVER_LETTER` - COVER_LETTER -// - `OFFER_LETTER` - OFFER_LETTER -// - `OTHER` - OTHER -type AttachmentAttachmentType struct { - typeName string - AttachmentTypeEnum AttachmentTypeEnum - String string -} - -func NewAttachmentAttachmentTypeFromAttachmentTypeEnum(value AttachmentTypeEnum) *AttachmentAttachmentType { - return &AttachmentAttachmentType{typeName: "attachmentTypeEnum", AttachmentTypeEnum: value} + return d.RemoteId } -func NewAttachmentAttachmentTypeFromString(value string) *AttachmentAttachmentType { - return &AttachmentAttachmentType{typeName: "string", String: value} +func (d *Department) GetCreatedAt() *time.Time { + if d == nil { + return nil + } + return d.CreatedAt } -func (a *AttachmentAttachmentType) UnmarshalJSON(data []byte) error { - var valueAttachmentTypeEnum AttachmentTypeEnum - if err := json.Unmarshal(data, &valueAttachmentTypeEnum); err == nil { - a.typeName = "attachmentTypeEnum" - a.AttachmentTypeEnum = valueAttachmentTypeEnum +func (d *Department) GetModifiedAt() *time.Time { + if d == nil { return nil } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" - a.String = valueString + return d.ModifiedAt +} + +func (d *Department) GetName() *string { + if d == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, a) + return d.Name } -func (a AttachmentAttachmentType) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "attachmentTypeEnum": - return json.Marshal(a.AttachmentTypeEnum) - case "string": - return json.Marshal(a.String) +func (d *Department) GetRemoteWasDeleted() *bool { + if d == nil { + return nil } + return d.RemoteWasDeleted } -type AttachmentAttachmentTypeVisitor interface { - VisitAttachmentTypeEnum(AttachmentTypeEnum) error - VisitString(string) error +func (d *Department) GetFieldMappings() map[string]interface{} { + if d == nil { + return nil + } + return d.FieldMappings } -func (a *AttachmentAttachmentType) Accept(visitor AttachmentAttachmentTypeVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "attachmentTypeEnum": - return visitor.VisitAttachmentTypeEnum(a.AttachmentTypeEnum) - case "string": - return visitor.VisitString(a.String) +func (d *Department) GetRemoteData() []*RemoteData { + if d == nil { + return nil } + return d.RemoteData } -// # The Attachment Object -// -// ### Description -// -// The `Attachment` object is used to represent a file attached to a candidate. -// -// ### Usage Example -// -// Fetch from the `LIST Attachments` endpoint and view attachments accessible by a company. -type AttachmentRequest struct { - // The attachment's name. - FileName *string `json:"file_name,omitempty"` - // The attachment's url. - FileUrl *string `json:"file_url,omitempty"` - Candidate *string `json:"candidate,omitempty"` - // The attachment's type. - // - // - `RESUME` - RESUME - // - `COVER_LETTER` - COVER_LETTER - // - `OFFER_LETTER` - OFFER_LETTER - // - `OTHER` - OTHER - AttachmentType *AttachmentRequestAttachmentType `json:"attachment_type,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` - - _rawJSON json.RawMessage +func (d *Department) GetExtraProperties() map[string]interface{} { + return d.extraProperties } -func (a *AttachmentRequest) UnmarshalJSON(data []byte) error { - type unmarshaler AttachmentRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { +func (d *Department) UnmarshalJSON(data []byte) error { + type embed Department + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*d), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *d = Department(unmarshaler.embed) + d.CreatedAt = unmarshaler.CreatedAt.TimePtr() + d.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *d) + if err != nil { return err } - *a = AttachmentRequest(value) - a._rawJSON = json.RawMessage(data) + d.extraProperties = extraProperties + d.rawJSON = json.RawMessage(data) return nil } -func (a *AttachmentRequest) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { +func (d *Department) MarshalJSON() ([]byte, error) { + type embed Department + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*d), + CreatedAt: internal.NewOptionalDateTime(d.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(d.ModifiedAt), + } + return json.Marshal(marshaler) +} + +func (d *Department) String() string { + if len(d.rawJSON) > 0 { + if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(a); err == nil { + if value, err := internal.StringifyJSON(d); err == nil { return value } - return fmt.Sprintf("%#v", a) -} - -// The attachment's type. -// -// - `RESUME` - RESUME -// - `COVER_LETTER` - COVER_LETTER -// - `OFFER_LETTER` - OFFER_LETTER -// - `OTHER` - OTHER -type AttachmentRequestAttachmentType struct { - typeName string - AttachmentTypeEnum AttachmentTypeEnum - String string + return fmt.Sprintf("%#v", d) } -func NewAttachmentRequestAttachmentTypeFromAttachmentTypeEnum(value AttachmentTypeEnum) *AttachmentRequestAttachmentType { - return &AttachmentRequestAttachmentType{typeName: "attachmentTypeEnum", AttachmentTypeEnum: value} -} +// # The EmailAddress Object +// ### Description +// The `EmailAddress` object is used to represent a candidate's email address. +// ### Usage Example +// Fetch from the `GET Candidate` endpoint and view their email addresses. +type EmailAddress struct { + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The email address. + Value *string `json:"value,omitempty" url:"value,omitempty"` + // The type of email address. + // + // * `PERSONAL` - PERSONAL + // * `WORK` - WORK + // * `OTHER` - OTHER + EmailAddressType *EmailAddressEmailAddressType `json:"email_address_type,omitempty" url:"email_address_type,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` -func NewAttachmentRequestAttachmentTypeFromString(value string) *AttachmentRequestAttachmentType { - return &AttachmentRequestAttachmentType{typeName: "string", String: value} + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (a *AttachmentRequestAttachmentType) UnmarshalJSON(data []byte) error { - var valueAttachmentTypeEnum AttachmentTypeEnum - if err := json.Unmarshal(data, &valueAttachmentTypeEnum); err == nil { - a.typeName = "attachmentTypeEnum" - a.AttachmentTypeEnum = valueAttachmentTypeEnum +func (e *EmailAddress) GetCreatedAt() *time.Time { + if e == nil { return nil } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" - a.String = valueString + return e.CreatedAt +} + +func (e *EmailAddress) GetModifiedAt() *time.Time { + if e == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, a) + return e.ModifiedAt } -func (a AttachmentRequestAttachmentType) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "attachmentTypeEnum": - return json.Marshal(a.AttachmentTypeEnum) - case "string": - return json.Marshal(a.String) +func (e *EmailAddress) GetValue() *string { + if e == nil { + return nil } + return e.Value } -type AttachmentRequestAttachmentTypeVisitor interface { - VisitAttachmentTypeEnum(AttachmentTypeEnum) error - VisitString(string) error +func (e *EmailAddress) GetEmailAddressType() *EmailAddressEmailAddressType { + if e == nil { + return nil + } + return e.EmailAddressType } -func (a *AttachmentRequestAttachmentType) Accept(visitor AttachmentRequestAttachmentTypeVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "attachmentTypeEnum": - return visitor.VisitAttachmentTypeEnum(a.AttachmentTypeEnum) - case "string": - return visitor.VisitString(a.String) +func (e *EmailAddress) GetRemoteWasDeleted() *bool { + if e == nil { + return nil } + return e.RemoteWasDeleted } -type AttachmentResponse struct { - Model *Attachment `json:"model,omitempty"` - Warnings []*WarningValidationProblem `json:"warnings,omitempty"` - Errors []*ErrorValidationProblem `json:"errors,omitempty"` - Logs []*DebugModeLog `json:"logs,omitempty"` - - _rawJSON json.RawMessage +func (e *EmailAddress) GetExtraProperties() map[string]interface{} { + return e.extraProperties } -func (a *AttachmentResponse) UnmarshalJSON(data []byte) error { - type unmarshaler AttachmentResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { +func (e *EmailAddress) UnmarshalJSON(data []byte) error { + type embed EmailAddress + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*e), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { return err } - *a = AttachmentResponse(value) - a._rawJSON = json.RawMessage(data) - return nil -} - -func (a *AttachmentResponse) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(a); err == nil { - return value - } - return fmt.Sprintf("%#v", a) -} - -// - `RESUME` - RESUME -// - `COVER_LETTER` - COVER_LETTER -// - `OFFER_LETTER` - OFFER_LETTER -// - `OTHER` - OTHER -type AttachmentTypeEnum string - -const ( - AttachmentTypeEnumResume AttachmentTypeEnum = "RESUME" - AttachmentTypeEnumCoverLetter AttachmentTypeEnum = "COVER_LETTER" - AttachmentTypeEnumOfferLetter AttachmentTypeEnum = "OFFER_LETTER" - AttachmentTypeEnumOther AttachmentTypeEnum = "OTHER" -) - -func NewAttachmentTypeEnumFromString(s string) (AttachmentTypeEnum, error) { - switch s { - case "RESUME": - return AttachmentTypeEnumResume, nil - case "COVER_LETTER": - return AttachmentTypeEnumCoverLetter, nil - case "OFFER_LETTER": - return AttachmentTypeEnumOfferLetter, nil - case "OTHER": - return AttachmentTypeEnumOther, nil + *e = EmailAddress(unmarshaler.embed) + e.CreatedAt = unmarshaler.CreatedAt.TimePtr() + e.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *e) + if err != nil { + return err } - var t AttachmentTypeEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (a AttachmentTypeEnum) Ptr() *AttachmentTypeEnum { - return &a + e.extraProperties = extraProperties + e.rawJSON = json.RawMessage(data) + return nil } -type AuditLogEvent struct { - Id *string `json:"id,omitempty"` - // The User's full name at the time of this Event occurring. - UserName *string `json:"user_name,omitempty"` - // The User's email at the time of this Event occurring. - UserEmail *string `json:"user_email,omitempty"` - // Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. - // - // - `ADMIN` - ADMIN - // - `DEVELOPER` - DEVELOPER - // - `MEMBER` - MEMBER - // - `API` - API - // - `SYSTEM` - SYSTEM - // - `MERGE_TEAM` - MERGE_TEAM - Role *AuditLogEventRole `json:"role,omitempty"` - IpAddress string `json:"ip_address"` - // Designates the type of event that occurred. - // - // - `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY - // - `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY - // - `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY - // - `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY - // - `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY - // - `INVITED_USER` - INVITED_USER - // - `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED - // - `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED - // - `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT - // - `CREATED_DESTINATION` - CREATED_DESTINATION - // - `DELETED_DESTINATION` - DELETED_DESTINATION - // - `CHANGED_DESTINATION` - CHANGED_DESTINATION - // - `CHANGED_SCOPES` - CHANGED_SCOPES - // - `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION - // - `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS - // - `ENABLED_INTEGRATION` - ENABLED_INTEGRATION - // - `DISABLED_INTEGRATION` - DISABLED_INTEGRATION - // - `ENABLED_CATEGORY` - ENABLED_CATEGORY - // - `DISABLED_CATEGORY` - DISABLED_CATEGORY - // - `CHANGED_PASSWORD` - CHANGED_PASSWORD - // - `RESET_PASSWORD` - RESET_PASSWORD - // - `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - // - `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - // - `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - // - `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - // - `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING - // - `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING - // - `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING - // - `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 - // - `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - // - `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - // - `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - // - `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC - // - `MUTED_ISSUE` - MUTED_ISSUE - // - `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK - // - `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK - // - `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK - // - `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED - // - `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED - EventType *AuditLogEventEventType `json:"event_type,omitempty"` - EventDescription string `json:"event_description"` - CreatedAt *time.Time `json:"created_at,omitempty"` - - _rawJSON json.RawMessage -} - -func (a *AuditLogEvent) UnmarshalJSON(data []byte) error { - type unmarshaler AuditLogEvent - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (e *EmailAddress) MarshalJSON() ([]byte, error) { + type embed EmailAddress + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*e), + CreatedAt: internal.NewOptionalDateTime(e.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(e.ModifiedAt), } - *a = AuditLogEvent(value) - a._rawJSON = json.RawMessage(data) - return nil + return json.Marshal(marshaler) } -func (a *AuditLogEvent) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { +func (e *EmailAddress) String() string { + if len(e.rawJSON) > 0 { + if value, err := internal.StringifyJSON(e.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(a); err == nil { + if value, err := internal.StringifyJSON(e); err == nil { return value } - return fmt.Sprintf("%#v", a) + return fmt.Sprintf("%#v", e) } -// Designates the type of event that occurred. +// The type of email address. // -// - `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY -// - `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY -// - `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY -// - `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY -// - `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY -// - `INVITED_USER` - INVITED_USER -// - `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED -// - `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED -// - `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT -// - `CREATED_DESTINATION` - CREATED_DESTINATION -// - `DELETED_DESTINATION` - DELETED_DESTINATION -// - `CHANGED_DESTINATION` - CHANGED_DESTINATION -// - `CHANGED_SCOPES` - CHANGED_SCOPES -// - `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION -// - `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS -// - `ENABLED_INTEGRATION` - ENABLED_INTEGRATION -// - `DISABLED_INTEGRATION` - DISABLED_INTEGRATION -// - `ENABLED_CATEGORY` - ENABLED_CATEGORY -// - `DISABLED_CATEGORY` - DISABLED_CATEGORY -// - `CHANGED_PASSWORD` - CHANGED_PASSWORD -// - `RESET_PASSWORD` - RESET_PASSWORD -// - `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION -// - `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT -// - `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION -// - `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT -// - `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING -// - `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING -// - `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING -// - `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 -// - `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE -// - `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE -// - `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE -// - `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC -// - `MUTED_ISSUE` - MUTED_ISSUE -// - `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK -// - `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK -// - `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK -// - `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED -// - `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED -type AuditLogEventEventType struct { - typeName string - EventTypeEnum EventTypeEnum - String string +// * `PERSONAL` - PERSONAL +// * `WORK` - WORK +// * `OTHER` - OTHER +type EmailAddressEmailAddressType struct { + EmailAddressTypeEnum EmailAddressTypeEnum + String string + + typ string } -func NewAuditLogEventEventTypeFromEventTypeEnum(value EventTypeEnum) *AuditLogEventEventType { - return &AuditLogEventEventType{typeName: "eventTypeEnum", EventTypeEnum: value} +func (e *EmailAddressEmailAddressType) GetEmailAddressTypeEnum() EmailAddressTypeEnum { + if e == nil { + return "" + } + return e.EmailAddressTypeEnum } -func NewAuditLogEventEventTypeFromString(value string) *AuditLogEventEventType { - return &AuditLogEventEventType{typeName: "string", String: value} +func (e *EmailAddressEmailAddressType) GetString() string { + if e == nil { + return "" + } + return e.String } -func (a *AuditLogEventEventType) UnmarshalJSON(data []byte) error { - var valueEventTypeEnum EventTypeEnum - if err := json.Unmarshal(data, &valueEventTypeEnum); err == nil { - a.typeName = "eventTypeEnum" - a.EventTypeEnum = valueEventTypeEnum +func (e *EmailAddressEmailAddressType) UnmarshalJSON(data []byte) error { + var valueEmailAddressTypeEnum EmailAddressTypeEnum + if err := json.Unmarshal(data, &valueEmailAddressTypeEnum); err == nil { + e.typ = "EmailAddressTypeEnum" + e.EmailAddressTypeEnum = valueEmailAddressTypeEnum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" - a.String = valueString + e.typ = "String" + e.String = valueString return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, a) + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) } -func (a AuditLogEventEventType) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "eventTypeEnum": - return json.Marshal(a.EventTypeEnum) - case "string": - return json.Marshal(a.String) +func (e EmailAddressEmailAddressType) MarshalJSON() ([]byte, error) { + if e.typ == "EmailAddressTypeEnum" || e.EmailAddressTypeEnum != "" { + return json.Marshal(e.EmailAddressTypeEnum) + } + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) } -type AuditLogEventEventTypeVisitor interface { - VisitEventTypeEnum(EventTypeEnum) error +type EmailAddressEmailAddressTypeVisitor interface { + VisitEmailAddressTypeEnum(EmailAddressTypeEnum) error VisitString(string) error } -func (a *AuditLogEventEventType) Accept(visitor AuditLogEventEventTypeVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "eventTypeEnum": - return visitor.VisitEventTypeEnum(a.EventTypeEnum) - case "string": - return visitor.VisitString(a.String) +func (e *EmailAddressEmailAddressType) Accept(visitor EmailAddressEmailAddressTypeVisitor) error { + if e.typ == "EmailAddressTypeEnum" || e.EmailAddressTypeEnum != "" { + return visitor.VisitEmailAddressTypeEnum(e.EmailAddressTypeEnum) + } + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) } + return fmt.Errorf("type %T does not include a non-empty union type", e) } -// Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. -// -// - `ADMIN` - ADMIN -// - `DEVELOPER` - DEVELOPER -// - `MEMBER` - MEMBER -// - `API` - API -// - `SYSTEM` - SYSTEM -// - `MERGE_TEAM` - MERGE_TEAM -type AuditLogEventRole struct { - typeName string - RoleEnum RoleEnum - String string -} +// * `PERSONAL` - PERSONAL +// * `WORK` - WORK +// * `OTHER` - OTHER +type EmailAddressTypeEnum string + +const ( + EmailAddressTypeEnumPersonal EmailAddressTypeEnum = "PERSONAL" + EmailAddressTypeEnumWork EmailAddressTypeEnum = "WORK" + EmailAddressTypeEnumOther EmailAddressTypeEnum = "OTHER" +) -func NewAuditLogEventRoleFromRoleEnum(value RoleEnum) *AuditLogEventRole { - return &AuditLogEventRole{typeName: "roleEnum", RoleEnum: value} +func NewEmailAddressTypeEnumFromString(s string) (EmailAddressTypeEnum, error) { + switch s { + case "PERSONAL": + return EmailAddressTypeEnumPersonal, nil + case "WORK": + return EmailAddressTypeEnumWork, nil + case "OTHER": + return EmailAddressTypeEnumOther, nil + } + var t EmailAddressTypeEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -func NewAuditLogEventRoleFromString(value string) *AuditLogEventRole { - return &AuditLogEventRole{typeName: "string", String: value} +func (e EmailAddressTypeEnum) Ptr() *EmailAddressTypeEnum { + return &e } -func (a *AuditLogEventRole) UnmarshalJSON(data []byte) error { - var valueRoleEnum RoleEnum - if err := json.Unmarshal(data, &valueRoleEnum); err == nil { - a.typeName = "roleEnum" - a.RoleEnum = valueRoleEnum - return nil +// * `RAW` - RAW +// * `BASE64` - BASE64 +// * `GZIP_BASE64` - GZIP_BASE64 +type EncodingEnum string + +const ( + EncodingEnumRaw EncodingEnum = "RAW" + EncodingEnumBase64 EncodingEnum = "BASE64" + EncodingEnumGzipBase64 EncodingEnum = "GZIP_BASE64" +) + +func NewEncodingEnumFromString(s string) (EncodingEnum, error) { + switch s { + case "RAW": + return EncodingEnumRaw, nil + case "BASE64": + return EncodingEnumBase64, nil + case "GZIP_BASE64": + return EncodingEnumGzipBase64, nil } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" - a.String = valueString + var t EncodingEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (e EncodingEnum) Ptr() *EncodingEnum { + return &e +} + +type ErrorValidationProblem struct { + Source *ValidationProblemSource `json:"source,omitempty" url:"source,omitempty"` + Title string `json:"title" url:"title"` + Detail string `json:"detail" url:"detail"` + ProblemType string `json:"problem_type" url:"problem_type"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (e *ErrorValidationProblem) GetSource() *ValidationProblemSource { + if e == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, a) + return e.Source } -func (a AuditLogEventRole) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "roleEnum": - return json.Marshal(a.RoleEnum) - case "string": - return json.Marshal(a.String) +func (e *ErrorValidationProblem) GetTitle() string { + if e == nil { + return "" } + return e.Title } -type AuditLogEventRoleVisitor interface { - VisitRoleEnum(RoleEnum) error - VisitString(string) error +func (e *ErrorValidationProblem) GetDetail() string { + if e == nil { + return "" + } + return e.Detail } -func (a *AuditLogEventRole) Accept(visitor AuditLogEventRoleVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "roleEnum": - return visitor.VisitRoleEnum(a.RoleEnum) - case "string": - return visitor.VisitString(a.String) +func (e *ErrorValidationProblem) GetProblemType() string { + if e == nil { + return "" } + return e.ProblemType } -// # The AvailableActions Object -// -// ### Description -// -// The `Activity` object is used to see all available model/operation combinations for an integration. -// -// ### Usage Example -// -// Fetch all the actions available for the `Zenefits` integration. -type AvailableActions struct { - Integration *AccountIntegration `json:"integration,omitempty"` - PassthroughAvailable bool `json:"passthrough_available"` - AvailableModelOperations []*ModelOperation `json:"available_model_operations,omitempty"` - - _rawJSON json.RawMessage +func (e *ErrorValidationProblem) GetExtraProperties() map[string]interface{} { + return e.extraProperties } -func (a *AvailableActions) UnmarshalJSON(data []byte) error { - type unmarshaler AvailableActions +func (e *ErrorValidationProblem) UnmarshalJSON(data []byte) error { + type unmarshaler ErrorValidationProblem var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *a = AvailableActions(value) - a._rawJSON = json.RawMessage(data) + *e = ErrorValidationProblem(value) + extraProperties, err := internal.ExtractExtraProperties(data, *e) + if err != nil { + return err + } + e.extraProperties = extraProperties + e.rawJSON = json.RawMessage(data) return nil } -func (a *AvailableActions) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { +func (e *ErrorValidationProblem) String() string { + if len(e.rawJSON) > 0 { + if value, err := internal.StringifyJSON(e.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(a); err == nil { + if value, err := internal.StringifyJSON(e); err == nil { return value } - return fmt.Sprintf("%#v", a) + return fmt.Sprintf("%#v", e) } -// # The Candidate Object -// -// ### Description -// -// The `Candidate` object is used to represent profile information about a given Candidate. Because it is specific to a Candidate, this information stays constant across applications. -// -// ### Usage Example -// -// Fetch from the `LIST Candidates` endpoint and filter by `ID` to show all candidates. -type Candidate struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The candidate's first name. - FirstName *string `json:"first_name,omitempty"` - // The candidate's last name. - LastName *string `json:"last_name,omitempty"` - // The candidate's current company. - Company *string `json:"company,omitempty"` - // The candidate's current title. - Title *string `json:"title,omitempty"` - // When the third party's candidate was created. - RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty"` - // When the third party's candidate was updated. - RemoteUpdatedAt *time.Time `json:"remote_updated_at,omitempty"` - // When the most recent interaction with the candidate occurred. - LastInteractionAt *time.Time `json:"last_interaction_at,omitempty"` - // Whether or not the candidate is private. - IsPrivate *bool `json:"is_private,omitempty"` - // Whether or not the candidate can be emailed. - CanEmail *bool `json:"can_email,omitempty"` - // The candidate's locations. - Locations []*string `json:"locations,omitempty"` - PhoneNumbers []*PhoneNumber `json:"phone_numbers,omitempty"` - EmailAddresses []*EmailAddress `json:"email_addresses,omitempty"` - Urls []*Url `json:"urls,omitempty"` - // Array of `Tag` names as strings. - Tags []*string `json:"tags,omitempty"` - // Array of `Application` object IDs. - Applications []*CandidateApplicationsItem `json:"applications,omitempty"` - // Array of `Attachment` object IDs. - Attachments []*CandidateAttachmentsItem `json:"attachments,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` +type FieldPermissionDeserializerRequest struct { + EnabledFields []interface{} `json:"enabled_fields,omitempty" url:"enabled_fields,omitempty"` + DisabledFields []interface{} `json:"disabled_fields,omitempty" url:"disabled_fields,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (c *Candidate) UnmarshalJSON(data []byte) error { - type unmarshaler Candidate +func (f *FieldPermissionDeserializerRequest) GetEnabledFields() []interface{} { + if f == nil { + return nil + } + return f.EnabledFields +} + +func (f *FieldPermissionDeserializerRequest) GetDisabledFields() []interface{} { + if f == nil { + return nil + } + return f.DisabledFields +} + +func (f *FieldPermissionDeserializerRequest) GetExtraProperties() map[string]interface{} { + return f.extraProperties +} + +func (f *FieldPermissionDeserializerRequest) UnmarshalJSON(data []byte) error { + type unmarshaler FieldPermissionDeserializerRequest var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *c = Candidate(value) - c._rawJSON = json.RawMessage(data) + *f = FieldPermissionDeserializerRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { + return err + } + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) return nil } -func (c *Candidate) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { +func (f *FieldPermissionDeserializerRequest) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(c); err == nil { + if value, err := internal.StringifyJSON(f); err == nil { return value } - return fmt.Sprintf("%#v", c) + return fmt.Sprintf("%#v", f) } -type CandidateApplicationsItem struct { - typeName string - String string - Application *Application -} +type IndividualCommonModelScopeDeserializerRequest struct { + ModelName string `json:"model_name" url:"model_name"` + ModelPermissions map[string]*ModelPermissionDeserializerRequest `json:"model_permissions,omitempty" url:"model_permissions,omitempty"` + FieldPermissions *FieldPermissionDeserializerRequest `json:"field_permissions,omitempty" url:"field_permissions,omitempty"` -func NewCandidateApplicationsItemFromString(value string) *CandidateApplicationsItem { - return &CandidateApplicationsItem{typeName: "string", String: value} + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func NewCandidateApplicationsItemFromApplication(value *Application) *CandidateApplicationsItem { - return &CandidateApplicationsItem{typeName: "application", Application: value} +func (i *IndividualCommonModelScopeDeserializerRequest) GetModelName() string { + if i == nil { + return "" + } + return i.ModelName } -func (c *CandidateApplicationsItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - c.typeName = "string" - c.String = valueString - return nil - } - valueApplication := new(Application) - if err := json.Unmarshal(data, &valueApplication); err == nil { - c.typeName = "application" - c.Application = valueApplication +func (i *IndividualCommonModelScopeDeserializerRequest) GetModelPermissions() map[string]*ModelPermissionDeserializerRequest { + if i == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, c) + return i.ModelPermissions } -func (c CandidateApplicationsItem) MarshalJSON() ([]byte, error) { - switch c.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return json.Marshal(c.String) - case "application": - return json.Marshal(c.Application) +func (i *IndividualCommonModelScopeDeserializerRequest) GetFieldPermissions() *FieldPermissionDeserializerRequest { + if i == nil { + return nil } + return i.FieldPermissions } -type CandidateApplicationsItemVisitor interface { - VisitString(string) error - VisitApplication(*Application) error +func (i *IndividualCommonModelScopeDeserializerRequest) GetExtraProperties() map[string]interface{} { + return i.extraProperties } -func (c *CandidateApplicationsItem) Accept(visitor CandidateApplicationsItemVisitor) error { - switch c.typeName { - default: - return fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return visitor.VisitString(c.String) - case "application": - return visitor.VisitApplication(c.Application) +func (i *IndividualCommonModelScopeDeserializerRequest) UnmarshalJSON(data []byte) error { + type unmarshaler IndividualCommonModelScopeDeserializerRequest + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *i = IndividualCommonModelScopeDeserializerRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *i) + if err != nil { + return err } + i.extraProperties = extraProperties + i.rawJSON = json.RawMessage(data) + return nil } -type CandidateAttachmentsItem struct { - typeName string - String string - Attachment *Attachment +func (i *IndividualCommonModelScopeDeserializerRequest) String() string { + if len(i.rawJSON) > 0 { + if value, err := internal.StringifyJSON(i.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(i); err == nil { + return value + } + return fmt.Sprintf("%#v", i) } -func NewCandidateAttachmentsItemFromString(value string) *CandidateAttachmentsItem { - return &CandidateAttachmentsItem{typeName: "string", String: value} -} +// # The Job Object +// ### Description +// The `Job` object can be used to track any jobs that are currently or will be open/closed for applications. +// ### Usage Example +// Fetch from the `LIST Jobs` endpoint to show all job postings. +type Job struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The job's name. + Name *string `json:"name,omitempty" url:"name,omitempty"` + // The job's description. + Description *string `json:"description,omitempty" url:"description,omitempty"` + // The job's code. Typically an additional identifier used to reference the particular job that is displayed on the ATS. + Code *string `json:"code,omitempty" url:"code,omitempty"` + // The job's status. + // + // * `OPEN` - OPEN + // * `CLOSED` - CLOSED + // * `DRAFT` - DRAFT + // * `ARCHIVED` - ARCHIVED + // * `PENDING` - PENDING + Status *JobStatus `json:"status,omitempty" url:"status,omitempty"` + // The job's type. + // + // * `POSTING` - POSTING + // * `REQUISITION` - REQUISITION + // * `PROFILE` - PROFILE + Type *JobType `json:"type,omitempty" url:"type,omitempty"` + // IDs of `JobPosting` objects that serve as job postings for this `Job`. + JobPostings []*string `json:"job_postings,omitempty" url:"job_postings,omitempty"` + JobPostingUrls []*Url `json:"job_posting_urls,omitempty" url:"job_posting_urls,omitempty"` + // When the third party's job was created. + RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty" url:"remote_created_at,omitempty"` + // When the third party's job was updated. + RemoteUpdatedAt *time.Time `json:"remote_updated_at,omitempty" url:"remote_updated_at,omitempty"` + // Whether the job is confidential. + Confidential *bool `json:"confidential,omitempty" url:"confidential,omitempty"` + // IDs of `Department` objects for this `Job`. + Departments []*JobDepartmentsItem `json:"departments,omitempty" url:"departments,omitempty"` + // IDs of `Office` objects for this `Job`. + Offices []*JobOfficesItem `json:"offices,omitempty" url:"offices,omitempty"` + // IDs of `RemoteUser` objects that serve as hiring managers for this `Job`. + HiringManagers []*JobHiringManagersItem `json:"hiring_managers,omitempty" url:"hiring_managers,omitempty"` + // IDs of `RemoteUser` objects that serve as recruiters for this `Job`. + Recruiters []*JobRecruitersItem `json:"recruiters,omitempty" url:"recruiters,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` -func NewCandidateAttachmentsItemFromAttachment(value *Attachment) *CandidateAttachmentsItem { - return &CandidateAttachmentsItem{typeName: "attachment", Attachment: value} + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (c *CandidateAttachmentsItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - c.typeName = "string" - c.String = valueString - return nil - } - valueAttachment := new(Attachment) - if err := json.Unmarshal(data, &valueAttachment); err == nil { - c.typeName = "attachment" - c.Attachment = valueAttachment +func (j *Job) GetId() *string { + if j == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, c) + return j.Id } -func (c CandidateAttachmentsItem) MarshalJSON() ([]byte, error) { - switch c.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return json.Marshal(c.String) - case "attachment": - return json.Marshal(c.Attachment) +func (j *Job) GetRemoteId() *string { + if j == nil { + return nil } + return j.RemoteId } -type CandidateAttachmentsItemVisitor interface { - VisitString(string) error - VisitAttachment(*Attachment) error -} - -func (c *CandidateAttachmentsItem) Accept(visitor CandidateAttachmentsItemVisitor) error { - switch c.typeName { - default: - return fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return visitor.VisitString(c.String) - case "attachment": - return visitor.VisitAttachment(c.Attachment) +func (j *Job) GetCreatedAt() *time.Time { + if j == nil { + return nil } + return j.CreatedAt } -// # The Candidate Object -// -// ### Description -// -// The `Candidate` object is used to represent profile information about a given Candidate. Because it is specific to a Candidate, this information stays constant across applications. -// -// ### Usage Example -// -// Fetch from the `LIST Candidates` endpoint and filter by `ID` to show all candidates. -type CandidateRequest struct { - // The candidate's first name. - FirstName *string `json:"first_name,omitempty"` - // The candidate's last name. - LastName *string `json:"last_name,omitempty"` - // The candidate's current company. - Company *string `json:"company,omitempty"` - // The candidate's current title. - Title *string `json:"title,omitempty"` - // When the most recent interaction with the candidate occurred. - LastInteractionAt *time.Time `json:"last_interaction_at,omitempty"` - // Whether or not the candidate is private. - IsPrivate *bool `json:"is_private,omitempty"` - // Whether or not the candidate can be emailed. - CanEmail *bool `json:"can_email,omitempty"` - // The candidate's locations. - Locations []*string `json:"locations,omitempty"` - PhoneNumbers []*PhoneNumberRequest `json:"phone_numbers,omitempty"` - EmailAddresses []*EmailAddressRequest `json:"email_addresses,omitempty"` - Urls []*UrlRequest `json:"urls,omitempty"` - // Array of `Tag` names as strings. - Tags []*string `json:"tags,omitempty"` - // Array of `Application` object IDs. - Applications []*CandidateRequestApplicationsItem `json:"applications,omitempty"` - // Array of `Attachment` object IDs. - Attachments []*CandidateRequestAttachmentsItem `json:"attachments,omitempty"` - RemoteTemplateId *string `json:"remote_template_id,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` - - _rawJSON json.RawMessage -} - -func (c *CandidateRequest) UnmarshalJSON(data []byte) error { - type unmarshaler CandidateRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (j *Job) GetModifiedAt() *time.Time { + if j == nil { + return nil } - *c = CandidateRequest(value) - c._rawJSON = json.RawMessage(data) - return nil + return j.ModifiedAt } -func (c *CandidateRequest) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(c); err == nil { - return value +func (j *Job) GetName() *string { + if j == nil { + return nil } - return fmt.Sprintf("%#v", c) + return j.Name } -type CandidateRequestApplicationsItem struct { - typeName string - String string - Application *Application +func (j *Job) GetDescription() *string { + if j == nil { + return nil + } + return j.Description } -func NewCandidateRequestApplicationsItemFromString(value string) *CandidateRequestApplicationsItem { - return &CandidateRequestApplicationsItem{typeName: "string", String: value} +func (j *Job) GetCode() *string { + if j == nil { + return nil + } + return j.Code } -func NewCandidateRequestApplicationsItemFromApplication(value *Application) *CandidateRequestApplicationsItem { - return &CandidateRequestApplicationsItem{typeName: "application", Application: value} +func (j *Job) GetStatus() *JobStatus { + if j == nil { + return nil + } + return j.Status } -func (c *CandidateRequestApplicationsItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - c.typeName = "string" - c.String = valueString +func (j *Job) GetType() *JobType { + if j == nil { return nil } - valueApplication := new(Application) - if err := json.Unmarshal(data, &valueApplication); err == nil { - c.typeName = "application" - c.Application = valueApplication + return j.Type +} + +func (j *Job) GetJobPostings() []*string { + if j == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, c) + return j.JobPostings } -func (c CandidateRequestApplicationsItem) MarshalJSON() ([]byte, error) { - switch c.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return json.Marshal(c.String) - case "application": - return json.Marshal(c.Application) +func (j *Job) GetJobPostingUrls() []*Url { + if j == nil { + return nil } + return j.JobPostingUrls } -type CandidateRequestApplicationsItemVisitor interface { - VisitString(string) error - VisitApplication(*Application) error +func (j *Job) GetRemoteCreatedAt() *time.Time { + if j == nil { + return nil + } + return j.RemoteCreatedAt } -func (c *CandidateRequestApplicationsItem) Accept(visitor CandidateRequestApplicationsItemVisitor) error { - switch c.typeName { - default: - return fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return visitor.VisitString(c.String) - case "application": - return visitor.VisitApplication(c.Application) +func (j *Job) GetRemoteUpdatedAt() *time.Time { + if j == nil { + return nil } + return j.RemoteUpdatedAt } -type CandidateRequestAttachmentsItem struct { - typeName string - String string - Attachment *Attachment +func (j *Job) GetConfidential() *bool { + if j == nil { + return nil + } + return j.Confidential } -func NewCandidateRequestAttachmentsItemFromString(value string) *CandidateRequestAttachmentsItem { - return &CandidateRequestAttachmentsItem{typeName: "string", String: value} +func (j *Job) GetDepartments() []*JobDepartmentsItem { + if j == nil { + return nil + } + return j.Departments } -func NewCandidateRequestAttachmentsItemFromAttachment(value *Attachment) *CandidateRequestAttachmentsItem { - return &CandidateRequestAttachmentsItem{typeName: "attachment", Attachment: value} +func (j *Job) GetOffices() []*JobOfficesItem { + if j == nil { + return nil + } + return j.Offices } -func (c *CandidateRequestAttachmentsItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - c.typeName = "string" - c.String = valueString +func (j *Job) GetHiringManagers() []*JobHiringManagersItem { + if j == nil { return nil } - valueAttachment := new(Attachment) - if err := json.Unmarshal(data, &valueAttachment); err == nil { - c.typeName = "attachment" - c.Attachment = valueAttachment + return j.HiringManagers +} + +func (j *Job) GetRecruiters() []*JobRecruitersItem { + if j == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, c) + return j.Recruiters } -func (c CandidateRequestAttachmentsItem) MarshalJSON() ([]byte, error) { - switch c.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return json.Marshal(c.String) - case "attachment": - return json.Marshal(c.Attachment) +func (j *Job) GetRemoteWasDeleted() *bool { + if j == nil { + return nil } + return j.RemoteWasDeleted } -type CandidateRequestAttachmentsItemVisitor interface { - VisitString(string) error - VisitAttachment(*Attachment) error +func (j *Job) GetFieldMappings() map[string]interface{} { + if j == nil { + return nil + } + return j.FieldMappings } -func (c *CandidateRequestAttachmentsItem) Accept(visitor CandidateRequestAttachmentsItemVisitor) error { - switch c.typeName { - default: - return fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return visitor.VisitString(c.String) - case "attachment": - return visitor.VisitAttachment(c.Attachment) +func (j *Job) GetRemoteData() []*RemoteData { + if j == nil { + return nil } + return j.RemoteData } -type CandidateResponse struct { - Model *Candidate `json:"model,omitempty"` - Warnings []*WarningValidationProblem `json:"warnings,omitempty"` - Errors []*ErrorValidationProblem `json:"errors,omitempty"` - Logs []*DebugModeLog `json:"logs,omitempty"` - - _rawJSON json.RawMessage +func (j *Job) GetExtraProperties() map[string]interface{} { + return j.extraProperties } -func (c *CandidateResponse) UnmarshalJSON(data []byte) error { - type unmarshaler CandidateResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { +func (j *Job) UnmarshalJSON(data []byte) error { + type embed Job + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + RemoteUpdatedAt *internal.DateTime `json:"remote_updated_at,omitempty"` + }{ + embed: embed(*j), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { return err } - *c = CandidateResponse(value) - c._rawJSON = json.RawMessage(data) + *j = Job(unmarshaler.embed) + j.CreatedAt = unmarshaler.CreatedAt.TimePtr() + j.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + j.RemoteCreatedAt = unmarshaler.RemoteCreatedAt.TimePtr() + j.RemoteUpdatedAt = unmarshaler.RemoteUpdatedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *j) + if err != nil { + return err + } + j.extraProperties = extraProperties + j.rawJSON = json.RawMessage(data) return nil } -func (c *CandidateResponse) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { +func (j *Job) MarshalJSON() ([]byte, error) { + type embed Job + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + RemoteUpdatedAt *internal.DateTime `json:"remote_updated_at,omitempty"` + }{ + embed: embed(*j), + CreatedAt: internal.NewOptionalDateTime(j.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(j.ModifiedAt), + RemoteCreatedAt: internal.NewOptionalDateTime(j.RemoteCreatedAt), + RemoteUpdatedAt: internal.NewOptionalDateTime(j.RemoteUpdatedAt), + } + return json.Marshal(marshaler) +} + +func (j *Job) String() string { + if len(j.rawJSON) > 0 { + if value, err := internal.StringifyJSON(j.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(c); err == nil { + if value, err := internal.StringifyJSON(j); err == nil { return value } - return fmt.Sprintf("%#v", c) + return fmt.Sprintf("%#v", j) } -// - `hris` - hris -// - `ats` - ats -// - `accounting` - accounting -// - `ticketing` - ticketing -// - `crm` - crm -// - `mktg` - mktg -// - `filestorage` - filestorage -type CategoriesEnum string +type JobDepartmentsItem struct { + String string + Department *Department -const ( - CategoriesEnumHris CategoriesEnum = "hris" - CategoriesEnumAts CategoriesEnum = "ats" - CategoriesEnumAccounting CategoriesEnum = "accounting" - CategoriesEnumTicketing CategoriesEnum = "ticketing" - CategoriesEnumCrm CategoriesEnum = "crm" - CategoriesEnumMktg CategoriesEnum = "mktg" - CategoriesEnumFilestorage CategoriesEnum = "filestorage" -) - -func NewCategoriesEnumFromString(s string) (CategoriesEnum, error) { - switch s { - case "hris": - return CategoriesEnumHris, nil - case "ats": - return CategoriesEnumAts, nil - case "accounting": - return CategoriesEnumAccounting, nil - case "ticketing": - return CategoriesEnumTicketing, nil - case "crm": - return CategoriesEnumCrm, nil - case "mktg": - return CategoriesEnumMktg, nil - case "filestorage": - return CategoriesEnumFilestorage, nil - } - var t CategoriesEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (c CategoriesEnum) Ptr() *CategoriesEnum { - return &c -} - -// - `hris` - hris -// - `ats` - ats -// - `accounting` - accounting -// - `ticketing` - ticketing -// - `crm` - crm -// - `mktg` - mktg -// - `filestorage` - filestorage -type CategoryEnum string - -const ( - CategoryEnumHris CategoryEnum = "hris" - CategoryEnumAts CategoryEnum = "ats" - CategoryEnumAccounting CategoryEnum = "accounting" - CategoryEnumTicketing CategoryEnum = "ticketing" - CategoryEnumCrm CategoryEnum = "crm" - CategoryEnumMktg CategoryEnum = "mktg" - CategoryEnumFilestorage CategoryEnum = "filestorage" -) - -func NewCategoryEnumFromString(s string) (CategoryEnum, error) { - switch s { - case "hris": - return CategoryEnumHris, nil - case "ats": - return CategoryEnumAts, nil - case "accounting": - return CategoryEnumAccounting, nil - case "ticketing": - return CategoryEnumTicketing, nil - case "crm": - return CategoryEnumCrm, nil - case "mktg": - return CategoryEnumMktg, nil - case "filestorage": - return CategoryEnumFilestorage, nil - } - var t CategoryEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (c CategoryEnum) Ptr() *CategoryEnum { - return &c -} - -type CommonModelScopeApi struct { - // The common models you want to update the scopes for - CommonModels []*IndividualCommonModelScopeDeserializer `json:"common_models,omitempty"` - - _rawJSON json.RawMessage -} - -func (c *CommonModelScopeApi) UnmarshalJSON(data []byte) error { - type unmarshaler CommonModelScopeApi - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *c = CommonModelScopeApi(value) - c._rawJSON = json.RawMessage(data) - return nil -} - -func (c *CommonModelScopeApi) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(c); err == nil { - return value - } - return fmt.Sprintf("%#v", c) -} - -type CommonModelScopesBodyRequest struct { - ModelId string `json:"model_id"` - EnabledActions []EnabledActionsEnum `json:"enabled_actions,omitempty"` - DisabledFields []string `json:"disabled_fields,omitempty"` - - _rawJSON json.RawMessage -} - -func (c *CommonModelScopesBodyRequest) UnmarshalJSON(data []byte) error { - type unmarshaler CommonModelScopesBodyRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *c = CommonModelScopesBodyRequest(value) - c._rawJSON = json.RawMessage(data) - return nil -} - -func (c *CommonModelScopesBodyRequest) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(c); err == nil { - return value - } - return fmt.Sprintf("%#v", c) -} - -// # The DataPassthrough Object -// -// ### Description -// -// The `DataPassthrough` object is used to send information to an otherwise-unsupported third-party endpoint. -// -// ### Usage Example -// -// Create a `DataPassthrough` to get team hierarchies from your Rippling integration. -type DataPassthroughRequest struct { - Method MethodEnum `json:"method,omitempty"` - // The path of the request in the third party's platform. - Path string `json:"path"` - // An optional override of the third party's base url for the request. - BaseUrlOverride *string `json:"base_url_override,omitempty"` - // The data with the request. You must include a `request_format` parameter matching the data's format - Data *string `json:"data,omitempty"` - // Pass an array of `MultipartFormField` objects in here instead of using the `data` param if `request_format` is set to `MULTIPART`. - MultipartFormData []*MultipartFormFieldRequest `json:"multipart_form_data,omitempty"` - // The headers to use for the request (Merge will handle the account's authorization headers). `Content-Type` header is required for passthrough. Choose content type corresponding to expected format of receiving server. - Headers map[string]interface{} `json:"headers,omitempty"` - RequestFormat *RequestFormatEnum `json:"request_format,omitempty"` - // Optional. If true, the response will always be an object of the form `{"type": T, "value": ...}` where `T` will be one of `string, boolean, number, null, array, object`. - NormalizeResponse *bool `json:"normalize_response,omitempty"` - - _rawJSON json.RawMessage -} - -func (d *DataPassthroughRequest) UnmarshalJSON(data []byte) error { - type unmarshaler DataPassthroughRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *d = DataPassthroughRequest(value) - d._rawJSON = json.RawMessage(data) - return nil -} - -func (d *DataPassthroughRequest) String() string { - if len(d._rawJSON) > 0 { - if value, err := core.StringifyJSON(d._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(d); err == nil { - return value - } - return fmt.Sprintf("%#v", d) -} - -type DebugModeLog struct { - LogId string `json:"log_id"` - DashboardView string `json:"dashboard_view"` - LogSummary *DebugModelLogSummary `json:"log_summary,omitempty"` - - _rawJSON json.RawMessage -} - -func (d *DebugModeLog) UnmarshalJSON(data []byte) error { - type unmarshaler DebugModeLog - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *d = DebugModeLog(value) - d._rawJSON = json.RawMessage(data) - return nil -} - -func (d *DebugModeLog) String() string { - if len(d._rawJSON) > 0 { - if value, err := core.StringifyJSON(d._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(d); err == nil { - return value - } - return fmt.Sprintf("%#v", d) -} - -type DebugModelLogSummary struct { - Url string `json:"url"` - Method string `json:"method"` - StatusCode int `json:"status_code"` - - _rawJSON json.RawMessage -} - -func (d *DebugModelLogSummary) UnmarshalJSON(data []byte) error { - type unmarshaler DebugModelLogSummary - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *d = DebugModelLogSummary(value) - d._rawJSON = json.RawMessage(data) - return nil -} - -func (d *DebugModelLogSummary) String() string { - if len(d._rawJSON) > 0 { - if value, err := core.StringifyJSON(d._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(d); err == nil { - return value - } - return fmt.Sprintf("%#v", d) -} - -// # The Department Object -// -// ### Description -// -// The `Department` object is used to represent a department within a company. -// -// ### Usage Example -// -// Fetch from the `LIST Departments` endpoint and view the departments within a company. -type Department struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The department's name. - Name *string `json:"name,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` - - _rawJSON json.RawMessage -} - -func (d *Department) UnmarshalJSON(data []byte) error { - type unmarshaler Department - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *d = Department(value) - d._rawJSON = json.RawMessage(data) - return nil -} - -func (d *Department) String() string { - if len(d._rawJSON) > 0 { - if value, err := core.StringifyJSON(d._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(d); err == nil { - return value - } - return fmt.Sprintf("%#v", d) -} - -// - `YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY` - YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY -// - `NO_I_DONT_HAVE_A_DISABILITY` - NO_I_DONT_HAVE_A_DISABILITY -// - `I_DONT_WISH_TO_ANSWER` - I_DONT_WISH_TO_ANSWER -type DisabilityStatusEnum string - -const ( - DisabilityStatusEnumYesIHaveADisabilityOrPreviouslyHadADisability DisabilityStatusEnum = "YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY" - DisabilityStatusEnumNoIDontHaveADisability DisabilityStatusEnum = "NO_I_DONT_HAVE_A_DISABILITY" - DisabilityStatusEnumIDontWishToAnswer DisabilityStatusEnum = "I_DONT_WISH_TO_ANSWER" -) - -func NewDisabilityStatusEnumFromString(s string) (DisabilityStatusEnum, error) { - switch s { - case "YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY": - return DisabilityStatusEnumYesIHaveADisabilityOrPreviouslyHadADisability, nil - case "NO_I_DONT_HAVE_A_DISABILITY": - return DisabilityStatusEnumNoIDontHaveADisability, nil - case "I_DONT_WISH_TO_ANSWER": - return DisabilityStatusEnumIDontWishToAnswer, nil - } - var t DisabilityStatusEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (d DisabilityStatusEnum) Ptr() *DisabilityStatusEnum { - return &d -} - -// # The EEOC Object -// -// ### Description -// -// The `EEOC` object is used to represent the Equal Employment Opportunity Commission information for a candidate (race, gender, veteran status, disability status). -// -// ### Usage Example -// -// Fetch from the `LIST EEOCs` endpoint and filter by `candidate` to show all EEOC information for a candidate. -type Eeoc struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The candidate being represented. - Candidate *EeocCandidate `json:"candidate,omitempty"` - // When the information was submitted. - SubmittedAt *time.Time `json:"submitted_at,omitempty"` - // The candidate's race. - // - // - `AMERICAN_INDIAN_OR_ALASKAN_NATIVE` - AMERICAN_INDIAN_OR_ALASKAN_NATIVE - // - `ASIAN` - ASIAN - // - `BLACK_OR_AFRICAN_AMERICAN` - BLACK_OR_AFRICAN_AMERICAN - // - `HISPANIC_OR_LATINO` - HISPANIC_OR_LATINO - // - `WHITE` - WHITE - // - `NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER` - NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER - // - `TWO_OR_MORE_RACES` - TWO_OR_MORE_RACES - // - `DECLINE_TO_SELF_IDENTIFY` - DECLINE_TO_SELF_IDENTIFY - Race *EeocRace `json:"race,omitempty"` - // The candidate's gender. - // - // - `MALE` - MALE - // - `FEMALE` - FEMALE - // - `NON-BINARY` - NON-BINARY - // - `OTHER` - OTHER - // - `DECLINE_TO_SELF_IDENTIFY` - DECLINE_TO_SELF_IDENTIFY - Gender *EeocGender `json:"gender,omitempty"` - // The candidate's veteran status. - // - // - `I_AM_NOT_A_PROTECTED_VETERAN` - I_AM_NOT_A_PROTECTED_VETERAN - // - `I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN` - I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN - // - `I_DONT_WISH_TO_ANSWER` - I_DONT_WISH_TO_ANSWER - VeteranStatus *EeocVeteranStatus `json:"veteran_status,omitempty"` - // The candidate's disability status. - // - // - `YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY` - YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY - // - `NO_I_DONT_HAVE_A_DISABILITY` - NO_I_DONT_HAVE_A_DISABILITY - // - `I_DONT_WISH_TO_ANSWER` - I_DONT_WISH_TO_ANSWER - DisabilityStatus *EeocDisabilityStatus `json:"disability_status,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` - - _rawJSON json.RawMessage -} - -func (e *Eeoc) UnmarshalJSON(data []byte) error { - type unmarshaler Eeoc - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *e = Eeoc(value) - e._rawJSON = json.RawMessage(data) - return nil -} - -func (e *Eeoc) String() string { - if len(e._rawJSON) > 0 { - if value, err := core.StringifyJSON(e._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(e); err == nil { - return value - } - return fmt.Sprintf("%#v", e) -} - -// The candidate being represented. -type EeocCandidate struct { - typeName string - String string - Candidate *Candidate -} - -func NewEeocCandidateFromString(value string) *EeocCandidate { - return &EeocCandidate{typeName: "string", String: value} -} - -func NewEeocCandidateFromCandidate(value *Candidate) *EeocCandidate { - return &EeocCandidate{typeName: "candidate", Candidate: value} -} - -func (e *EeocCandidate) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString - return nil - } - valueCandidate := new(Candidate) - if err := json.Unmarshal(data, &valueCandidate); err == nil { - e.typeName = "candidate" - e.Candidate = valueCandidate - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) -} - -func (e EeocCandidate) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return json.Marshal(e.String) - case "candidate": - return json.Marshal(e.Candidate) - } -} - -type EeocCandidateVisitor interface { - VisitString(string) error - VisitCandidate(*Candidate) error -} - -func (e *EeocCandidate) Accept(visitor EeocCandidateVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return visitor.VisitString(e.String) - case "candidate": - return visitor.VisitCandidate(e.Candidate) - } -} - -// The candidate's disability status. -// -// - `YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY` - YES_I_HAVE_A_DISABILITY_OR_PREVIOUSLY_HAD_A_DISABILITY -// - `NO_I_DONT_HAVE_A_DISABILITY` - NO_I_DONT_HAVE_A_DISABILITY -// - `I_DONT_WISH_TO_ANSWER` - I_DONT_WISH_TO_ANSWER -type EeocDisabilityStatus struct { - typeName string - DisabilityStatusEnum DisabilityStatusEnum - String string -} - -func NewEeocDisabilityStatusFromDisabilityStatusEnum(value DisabilityStatusEnum) *EeocDisabilityStatus { - return &EeocDisabilityStatus{typeName: "disabilityStatusEnum", DisabilityStatusEnum: value} -} - -func NewEeocDisabilityStatusFromString(value string) *EeocDisabilityStatus { - return &EeocDisabilityStatus{typeName: "string", String: value} -} - -func (e *EeocDisabilityStatus) UnmarshalJSON(data []byte) error { - var valueDisabilityStatusEnum DisabilityStatusEnum - if err := json.Unmarshal(data, &valueDisabilityStatusEnum); err == nil { - e.typeName = "disabilityStatusEnum" - e.DisabilityStatusEnum = valueDisabilityStatusEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) -} - -func (e EeocDisabilityStatus) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "disabilityStatusEnum": - return json.Marshal(e.DisabilityStatusEnum) - case "string": - return json.Marshal(e.String) - } -} - -type EeocDisabilityStatusVisitor interface { - VisitDisabilityStatusEnum(DisabilityStatusEnum) error - VisitString(string) error -} - -func (e *EeocDisabilityStatus) Accept(visitor EeocDisabilityStatusVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "disabilityStatusEnum": - return visitor.VisitDisabilityStatusEnum(e.DisabilityStatusEnum) - case "string": - return visitor.VisitString(e.String) - } -} - -// The candidate's gender. -// -// - `MALE` - MALE -// - `FEMALE` - FEMALE -// - `NON-BINARY` - NON-BINARY -// - `OTHER` - OTHER -// - `DECLINE_TO_SELF_IDENTIFY` - DECLINE_TO_SELF_IDENTIFY -type EeocGender struct { - typeName string - GenderEnum GenderEnum - String string -} - -func NewEeocGenderFromGenderEnum(value GenderEnum) *EeocGender { - return &EeocGender{typeName: "genderEnum", GenderEnum: value} -} - -func NewEeocGenderFromString(value string) *EeocGender { - return &EeocGender{typeName: "string", String: value} -} - -func (e *EeocGender) UnmarshalJSON(data []byte) error { - var valueGenderEnum GenderEnum - if err := json.Unmarshal(data, &valueGenderEnum); err == nil { - e.typeName = "genderEnum" - e.GenderEnum = valueGenderEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) -} - -func (e EeocGender) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "genderEnum": - return json.Marshal(e.GenderEnum) - case "string": - return json.Marshal(e.String) - } -} - -type EeocGenderVisitor interface { - VisitGenderEnum(GenderEnum) error - VisitString(string) error -} - -func (e *EeocGender) Accept(visitor EeocGenderVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "genderEnum": - return visitor.VisitGenderEnum(e.GenderEnum) - case "string": - return visitor.VisitString(e.String) - } -} - -// The candidate's race. -// -// - `AMERICAN_INDIAN_OR_ALASKAN_NATIVE` - AMERICAN_INDIAN_OR_ALASKAN_NATIVE -// - `ASIAN` - ASIAN -// - `BLACK_OR_AFRICAN_AMERICAN` - BLACK_OR_AFRICAN_AMERICAN -// - `HISPANIC_OR_LATINO` - HISPANIC_OR_LATINO -// - `WHITE` - WHITE -// - `NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER` - NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER -// - `TWO_OR_MORE_RACES` - TWO_OR_MORE_RACES -// - `DECLINE_TO_SELF_IDENTIFY` - DECLINE_TO_SELF_IDENTIFY -type EeocRace struct { - typeName string - RaceEnum RaceEnum - String string -} - -func NewEeocRaceFromRaceEnum(value RaceEnum) *EeocRace { - return &EeocRace{typeName: "raceEnum", RaceEnum: value} -} - -func NewEeocRaceFromString(value string) *EeocRace { - return &EeocRace{typeName: "string", String: value} -} - -func (e *EeocRace) UnmarshalJSON(data []byte) error { - var valueRaceEnum RaceEnum - if err := json.Unmarshal(data, &valueRaceEnum); err == nil { - e.typeName = "raceEnum" - e.RaceEnum = valueRaceEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) -} - -func (e EeocRace) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "raceEnum": - return json.Marshal(e.RaceEnum) - case "string": - return json.Marshal(e.String) - } -} - -type EeocRaceVisitor interface { - VisitRaceEnum(RaceEnum) error - VisitString(string) error -} - -func (e *EeocRace) Accept(visitor EeocRaceVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "raceEnum": - return visitor.VisitRaceEnum(e.RaceEnum) - case "string": - return visitor.VisitString(e.String) - } -} - -// The candidate's veteran status. -// -// - `I_AM_NOT_A_PROTECTED_VETERAN` - I_AM_NOT_A_PROTECTED_VETERAN -// - `I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN` - I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN -// - `I_DONT_WISH_TO_ANSWER` - I_DONT_WISH_TO_ANSWER -type EeocVeteranStatus struct { - typeName string - VeteranStatusEnum VeteranStatusEnum - String string -} - -func NewEeocVeteranStatusFromVeteranStatusEnum(value VeteranStatusEnum) *EeocVeteranStatus { - return &EeocVeteranStatus{typeName: "veteranStatusEnum", VeteranStatusEnum: value} -} - -func NewEeocVeteranStatusFromString(value string) *EeocVeteranStatus { - return &EeocVeteranStatus{typeName: "string", String: value} -} - -func (e *EeocVeteranStatus) UnmarshalJSON(data []byte) error { - var valueVeteranStatusEnum VeteranStatusEnum - if err := json.Unmarshal(data, &valueVeteranStatusEnum); err == nil { - e.typeName = "veteranStatusEnum" - e.VeteranStatusEnum = valueVeteranStatusEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) -} - -func (e EeocVeteranStatus) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "veteranStatusEnum": - return json.Marshal(e.VeteranStatusEnum) - case "string": - return json.Marshal(e.String) - } -} - -type EeocVeteranStatusVisitor interface { - VisitVeteranStatusEnum(VeteranStatusEnum) error - VisitString(string) error -} - -func (e *EeocVeteranStatus) Accept(visitor EeocVeteranStatusVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "veteranStatusEnum": - return visitor.VisitVeteranStatusEnum(e.VeteranStatusEnum) - case "string": - return visitor.VisitString(e.String) - } -} - -// # The EmailAddress Object -// -// ### Description -// -// The `EmailAddress` object is used to represent a candidate's email address. -// -// ### Usage Example -// -// Fetch from the `GET Candidate` endpoint and view their email addresses. -type EmailAddress struct { - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The email address. - Value *string `json:"value,omitempty"` - // The type of email address. - // - // - `PERSONAL` - PERSONAL - // - `WORK` - WORK - // - `OTHER` - OTHER - EmailAddressType *EmailAddressEmailAddressType `json:"email_address_type,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - - _rawJSON json.RawMessage -} - -func (e *EmailAddress) UnmarshalJSON(data []byte) error { - type unmarshaler EmailAddress - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *e = EmailAddress(value) - e._rawJSON = json.RawMessage(data) - return nil -} - -func (e *EmailAddress) String() string { - if len(e._rawJSON) > 0 { - if value, err := core.StringifyJSON(e._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(e); err == nil { - return value - } - return fmt.Sprintf("%#v", e) -} - -// The type of email address. -// -// - `PERSONAL` - PERSONAL -// - `WORK` - WORK -// - `OTHER` - OTHER -type EmailAddressEmailAddressType struct { - typeName string - EmailAddressTypeEnum EmailAddressTypeEnum - String string -} - -func NewEmailAddressEmailAddressTypeFromEmailAddressTypeEnum(value EmailAddressTypeEnum) *EmailAddressEmailAddressType { - return &EmailAddressEmailAddressType{typeName: "emailAddressTypeEnum", EmailAddressTypeEnum: value} -} - -func NewEmailAddressEmailAddressTypeFromString(value string) *EmailAddressEmailAddressType { - return &EmailAddressEmailAddressType{typeName: "string", String: value} -} - -func (e *EmailAddressEmailAddressType) UnmarshalJSON(data []byte) error { - var valueEmailAddressTypeEnum EmailAddressTypeEnum - if err := json.Unmarshal(data, &valueEmailAddressTypeEnum); err == nil { - e.typeName = "emailAddressTypeEnum" - e.EmailAddressTypeEnum = valueEmailAddressTypeEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) -} - -func (e EmailAddressEmailAddressType) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "emailAddressTypeEnum": - return json.Marshal(e.EmailAddressTypeEnum) - case "string": - return json.Marshal(e.String) - } -} - -type EmailAddressEmailAddressTypeVisitor interface { - VisitEmailAddressTypeEnum(EmailAddressTypeEnum) error - VisitString(string) error -} - -func (e *EmailAddressEmailAddressType) Accept(visitor EmailAddressEmailAddressTypeVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "emailAddressTypeEnum": - return visitor.VisitEmailAddressTypeEnum(e.EmailAddressTypeEnum) - case "string": - return visitor.VisitString(e.String) - } -} - -// # The EmailAddress Object -// -// ### Description -// -// The `EmailAddress` object is used to represent a candidate's email address. -// -// ### Usage Example -// -// Fetch from the `GET Candidate` endpoint and view their email addresses. -type EmailAddressRequest struct { - // The email address. - Value *string `json:"value,omitempty"` - // The type of email address. - // - // - `PERSONAL` - PERSONAL - // - `WORK` - WORK - // - `OTHER` - OTHER - EmailAddressType *EmailAddressRequestEmailAddressType `json:"email_address_type,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` - - _rawJSON json.RawMessage -} - -func (e *EmailAddressRequest) UnmarshalJSON(data []byte) error { - type unmarshaler EmailAddressRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *e = EmailAddressRequest(value) - e._rawJSON = json.RawMessage(data) - return nil -} - -func (e *EmailAddressRequest) String() string { - if len(e._rawJSON) > 0 { - if value, err := core.StringifyJSON(e._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(e); err == nil { - return value - } - return fmt.Sprintf("%#v", e) -} - -// The type of email address. -// -// - `PERSONAL` - PERSONAL -// - `WORK` - WORK -// - `OTHER` - OTHER -type EmailAddressRequestEmailAddressType struct { - typeName string - EmailAddressTypeEnum EmailAddressTypeEnum - String string -} - -func NewEmailAddressRequestEmailAddressTypeFromEmailAddressTypeEnum(value EmailAddressTypeEnum) *EmailAddressRequestEmailAddressType { - return &EmailAddressRequestEmailAddressType{typeName: "emailAddressTypeEnum", EmailAddressTypeEnum: value} -} - -func NewEmailAddressRequestEmailAddressTypeFromString(value string) *EmailAddressRequestEmailAddressType { - return &EmailAddressRequestEmailAddressType{typeName: "string", String: value} -} - -func (e *EmailAddressRequestEmailAddressType) UnmarshalJSON(data []byte) error { - var valueEmailAddressTypeEnum EmailAddressTypeEnum - if err := json.Unmarshal(data, &valueEmailAddressTypeEnum); err == nil { - e.typeName = "emailAddressTypeEnum" - e.EmailAddressTypeEnum = valueEmailAddressTypeEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) -} - -func (e EmailAddressRequestEmailAddressType) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "emailAddressTypeEnum": - return json.Marshal(e.EmailAddressTypeEnum) - case "string": - return json.Marshal(e.String) - } -} - -type EmailAddressRequestEmailAddressTypeVisitor interface { - VisitEmailAddressTypeEnum(EmailAddressTypeEnum) error - VisitString(string) error -} - -func (e *EmailAddressRequestEmailAddressType) Accept(visitor EmailAddressRequestEmailAddressTypeVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "emailAddressTypeEnum": - return visitor.VisitEmailAddressTypeEnum(e.EmailAddressTypeEnum) - case "string": - return visitor.VisitString(e.String) - } -} - -// - `PERSONAL` - PERSONAL -// - `WORK` - WORK -// - `OTHER` - OTHER -type EmailAddressTypeEnum string - -const ( - EmailAddressTypeEnumPersonal EmailAddressTypeEnum = "PERSONAL" - EmailAddressTypeEnumWork EmailAddressTypeEnum = "WORK" - EmailAddressTypeEnumOther EmailAddressTypeEnum = "OTHER" -) - -func NewEmailAddressTypeEnumFromString(s string) (EmailAddressTypeEnum, error) { - switch s { - case "PERSONAL": - return EmailAddressTypeEnumPersonal, nil - case "WORK": - return EmailAddressTypeEnumWork, nil - case "OTHER": - return EmailAddressTypeEnumOther, nil - } - var t EmailAddressTypeEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (e EmailAddressTypeEnum) Ptr() *EmailAddressTypeEnum { - return &e -} - -// - `READ` - READ -// - `WRITE` - WRITE -type EnabledActionsEnum string - -const ( - EnabledActionsEnumRead EnabledActionsEnum = "READ" - EnabledActionsEnumWrite EnabledActionsEnum = "WRITE" -) - -func NewEnabledActionsEnumFromString(s string) (EnabledActionsEnum, error) { - switch s { - case "READ": - return EnabledActionsEnumRead, nil - case "WRITE": - return EnabledActionsEnumWrite, nil - } - var t EnabledActionsEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (e EnabledActionsEnum) Ptr() *EnabledActionsEnum { - return &e -} - -// - `RAW` - RAW -// - `BASE64` - BASE64 -// - `GZIP_BASE64` - GZIP_BASE64 -type EncodingEnum string - -const ( - EncodingEnumRaw EncodingEnum = "RAW" - EncodingEnumBase64 EncodingEnum = "BASE64" - EncodingEnumGzipBase64 EncodingEnum = "GZIP_BASE64" -) - -func NewEncodingEnumFromString(s string) (EncodingEnum, error) { - switch s { - case "RAW": - return EncodingEnumRaw, nil - case "BASE64": - return EncodingEnumBase64, nil - case "GZIP_BASE64": - return EncodingEnumGzipBase64, nil - } - var t EncodingEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (e EncodingEnum) Ptr() *EncodingEnum { - return &e -} - -type ErrorValidationProblem struct { - Source *ValidationProblemSource `json:"source,omitempty"` - Title string `json:"title"` - Detail string `json:"detail"` - ProblemType string `json:"problem_type"` - - _rawJSON json.RawMessage -} - -func (e *ErrorValidationProblem) UnmarshalJSON(data []byte) error { - type unmarshaler ErrorValidationProblem - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *e = ErrorValidationProblem(value) - e._rawJSON = json.RawMessage(data) - return nil -} - -func (e *ErrorValidationProblem) String() string { - if len(e._rawJSON) > 0 { - if value, err := core.StringifyJSON(e._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(e); err == nil { - return value - } - return fmt.Sprintf("%#v", e) -} - -// - `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY -// - `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY -// - `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY -// - `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY -// - `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY -// - `INVITED_USER` - INVITED_USER -// - `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED -// - `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED -// - `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT -// - `CREATED_DESTINATION` - CREATED_DESTINATION -// - `DELETED_DESTINATION` - DELETED_DESTINATION -// - `CHANGED_DESTINATION` - CHANGED_DESTINATION -// - `CHANGED_SCOPES` - CHANGED_SCOPES -// - `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION -// - `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS -// - `ENABLED_INTEGRATION` - ENABLED_INTEGRATION -// - `DISABLED_INTEGRATION` - DISABLED_INTEGRATION -// - `ENABLED_CATEGORY` - ENABLED_CATEGORY -// - `DISABLED_CATEGORY` - DISABLED_CATEGORY -// - `CHANGED_PASSWORD` - CHANGED_PASSWORD -// - `RESET_PASSWORD` - RESET_PASSWORD -// - `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION -// - `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT -// - `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION -// - `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT -// - `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING -// - `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING -// - `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING -// - `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 -// - `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE -// - `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE -// - `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE -// - `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC -// - `MUTED_ISSUE` - MUTED_ISSUE -// - `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK -// - `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK -// - `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK -// - `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED -// - `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED -type EventTypeEnum string - -const ( - EventTypeEnumCreatedRemoteProductionApiKey EventTypeEnum = "CREATED_REMOTE_PRODUCTION_API_KEY" - EventTypeEnumDeletedRemoteProductionApiKey EventTypeEnum = "DELETED_REMOTE_PRODUCTION_API_KEY" - EventTypeEnumCreatedTestApiKey EventTypeEnum = "CREATED_TEST_API_KEY" - EventTypeEnumDeletedTestApiKey EventTypeEnum = "DELETED_TEST_API_KEY" - EventTypeEnumRegeneratedProductionApiKey EventTypeEnum = "REGENERATED_PRODUCTION_API_KEY" - EventTypeEnumInvitedUser EventTypeEnum = "INVITED_USER" - EventTypeEnumTwoFactorAuthEnabled EventTypeEnum = "TWO_FACTOR_AUTH_ENABLED" - EventTypeEnumTwoFactorAuthDisabled EventTypeEnum = "TWO_FACTOR_AUTH_DISABLED" - EventTypeEnumDeletedLinkedAccount EventTypeEnum = "DELETED_LINKED_ACCOUNT" - EventTypeEnumCreatedDestination EventTypeEnum = "CREATED_DESTINATION" - EventTypeEnumDeletedDestination EventTypeEnum = "DELETED_DESTINATION" - EventTypeEnumChangedDestination EventTypeEnum = "CHANGED_DESTINATION" - EventTypeEnumChangedScopes EventTypeEnum = "CHANGED_SCOPES" - EventTypeEnumChangedPersonalInformation EventTypeEnum = "CHANGED_PERSONAL_INFORMATION" - EventTypeEnumChangedOrganizationSettings EventTypeEnum = "CHANGED_ORGANIZATION_SETTINGS" - EventTypeEnumEnabledIntegration EventTypeEnum = "ENABLED_INTEGRATION" - EventTypeEnumDisabledIntegration EventTypeEnum = "DISABLED_INTEGRATION" - EventTypeEnumEnabledCategory EventTypeEnum = "ENABLED_CATEGORY" - EventTypeEnumDisabledCategory EventTypeEnum = "DISABLED_CATEGORY" - EventTypeEnumChangedPassword EventTypeEnum = "CHANGED_PASSWORD" - EventTypeEnumResetPassword EventTypeEnum = "RESET_PASSWORD" - EventTypeEnumEnabledRedactUnmappedDataForOrganization EventTypeEnum = "ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION" - EventTypeEnumEnabledRedactUnmappedDataForLinkedAccount EventTypeEnum = "ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT" - EventTypeEnumDisabledRedactUnmappedDataForOrganization EventTypeEnum = "DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION" - EventTypeEnumDisabledRedactUnmappedDataForLinkedAccount EventTypeEnum = "DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT" - EventTypeEnumCreatedIntegrationWideFieldMapping EventTypeEnum = "CREATED_INTEGRATION_WIDE_FIELD_MAPPING" - EventTypeEnumCreatedLinkedAccountFieldMapping EventTypeEnum = "CREATED_LINKED_ACCOUNT_FIELD_MAPPING" - EventTypeEnumChangedIntegrationWideFieldMapping EventTypeEnum = "CHANGED_INTEGRATION_WIDE_FIELD_MAPPING" - EventTypeEnumChangedLinkedAccountFieldMapping EventTypeEnum = "CHANGED_LINKED_ACCOUNT_FIELD_MAPPING" - EventTypeEnumDeletedIntegrationWideFieldMapping EventTypeEnum = "DELETED_INTEGRATION_WIDE_FIELD_MAPPING" - EventTypeEnumDeletedLinkedAccountFieldMapping EventTypeEnum = "DELETED_LINKED_ACCOUNT_FIELD_MAPPING" - EventTypeEnumCreatedLinkedAccountCommonModelOverride EventTypeEnum = "CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE" - EventTypeEnumChangedLinkedAccountCommonModelOverride EventTypeEnum = "CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE" - EventTypeEnumDeletedLinkedAccountCommonModelOverride EventTypeEnum = "DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE" - EventTypeEnumForcedLinkedAccountResync EventTypeEnum = "FORCED_LINKED_ACCOUNT_RESYNC" - EventTypeEnumMutedIssue EventTypeEnum = "MUTED_ISSUE" - EventTypeEnumGeneratedMagicLink EventTypeEnum = "GENERATED_MAGIC_LINK" - EventTypeEnumEnabledMergeWebhook EventTypeEnum = "ENABLED_MERGE_WEBHOOK" - EventTypeEnumDisabledMergeWebhook EventTypeEnum = "DISABLED_MERGE_WEBHOOK" - EventTypeEnumMergeWebhookTargetChanged EventTypeEnum = "MERGE_WEBHOOK_TARGET_CHANGED" - EventTypeEnumEndUserCredentialsAccessed EventTypeEnum = "END_USER_CREDENTIALS_ACCESSED" -) - -func NewEventTypeEnumFromString(s string) (EventTypeEnum, error) { - switch s { - case "CREATED_REMOTE_PRODUCTION_API_KEY": - return EventTypeEnumCreatedRemoteProductionApiKey, nil - case "DELETED_REMOTE_PRODUCTION_API_KEY": - return EventTypeEnumDeletedRemoteProductionApiKey, nil - case "CREATED_TEST_API_KEY": - return EventTypeEnumCreatedTestApiKey, nil - case "DELETED_TEST_API_KEY": - return EventTypeEnumDeletedTestApiKey, nil - case "REGENERATED_PRODUCTION_API_KEY": - return EventTypeEnumRegeneratedProductionApiKey, nil - case "INVITED_USER": - return EventTypeEnumInvitedUser, nil - case "TWO_FACTOR_AUTH_ENABLED": - return EventTypeEnumTwoFactorAuthEnabled, nil - case "TWO_FACTOR_AUTH_DISABLED": - return EventTypeEnumTwoFactorAuthDisabled, nil - case "DELETED_LINKED_ACCOUNT": - return EventTypeEnumDeletedLinkedAccount, nil - case "CREATED_DESTINATION": - return EventTypeEnumCreatedDestination, nil - case "DELETED_DESTINATION": - return EventTypeEnumDeletedDestination, nil - case "CHANGED_DESTINATION": - return EventTypeEnumChangedDestination, nil - case "CHANGED_SCOPES": - return EventTypeEnumChangedScopes, nil - case "CHANGED_PERSONAL_INFORMATION": - return EventTypeEnumChangedPersonalInformation, nil - case "CHANGED_ORGANIZATION_SETTINGS": - return EventTypeEnumChangedOrganizationSettings, nil - case "ENABLED_INTEGRATION": - return EventTypeEnumEnabledIntegration, nil - case "DISABLED_INTEGRATION": - return EventTypeEnumDisabledIntegration, nil - case "ENABLED_CATEGORY": - return EventTypeEnumEnabledCategory, nil - case "DISABLED_CATEGORY": - return EventTypeEnumDisabledCategory, nil - case "CHANGED_PASSWORD": - return EventTypeEnumChangedPassword, nil - case "RESET_PASSWORD": - return EventTypeEnumResetPassword, nil - case "ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION": - return EventTypeEnumEnabledRedactUnmappedDataForOrganization, nil - case "ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT": - return EventTypeEnumEnabledRedactUnmappedDataForLinkedAccount, nil - case "DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION": - return EventTypeEnumDisabledRedactUnmappedDataForOrganization, nil - case "DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT": - return EventTypeEnumDisabledRedactUnmappedDataForLinkedAccount, nil - case "CREATED_INTEGRATION_WIDE_FIELD_MAPPING": - return EventTypeEnumCreatedIntegrationWideFieldMapping, nil - case "CREATED_LINKED_ACCOUNT_FIELD_MAPPING": - return EventTypeEnumCreatedLinkedAccountFieldMapping, nil - case "CHANGED_INTEGRATION_WIDE_FIELD_MAPPING": - return EventTypeEnumChangedIntegrationWideFieldMapping, nil - case "CHANGED_LINKED_ACCOUNT_FIELD_MAPPING": - return EventTypeEnumChangedLinkedAccountFieldMapping, nil - case "DELETED_INTEGRATION_WIDE_FIELD_MAPPING": - return EventTypeEnumDeletedIntegrationWideFieldMapping, nil - case "DELETED_LINKED_ACCOUNT_FIELD_MAPPING": - return EventTypeEnumDeletedLinkedAccountFieldMapping, nil - case "CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE": - return EventTypeEnumCreatedLinkedAccountCommonModelOverride, nil - case "CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE": - return EventTypeEnumChangedLinkedAccountCommonModelOverride, nil - case "DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE": - return EventTypeEnumDeletedLinkedAccountCommonModelOverride, nil - case "FORCED_LINKED_ACCOUNT_RESYNC": - return EventTypeEnumForcedLinkedAccountResync, nil - case "MUTED_ISSUE": - return EventTypeEnumMutedIssue, nil - case "GENERATED_MAGIC_LINK": - return EventTypeEnumGeneratedMagicLink, nil - case "ENABLED_MERGE_WEBHOOK": - return EventTypeEnumEnabledMergeWebhook, nil - case "DISABLED_MERGE_WEBHOOK": - return EventTypeEnumDisabledMergeWebhook, nil - case "MERGE_WEBHOOK_TARGET_CHANGED": - return EventTypeEnumMergeWebhookTargetChanged, nil - case "END_USER_CREDENTIALS_ACCESSED": - return EventTypeEnumEndUserCredentialsAccessed, nil - } - var t EventTypeEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (e EventTypeEnum) Ptr() *EventTypeEnum { - return &e -} - -type ExternalTargetFieldApi struct { - Name *string `json:"name,omitempty"` - Description *string `json:"description,omitempty"` - IsMapped *string `json:"is_mapped,omitempty"` - - _rawJSON json.RawMessage -} - -func (e *ExternalTargetFieldApi) UnmarshalJSON(data []byte) error { - type unmarshaler ExternalTargetFieldApi - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *e = ExternalTargetFieldApi(value) - e._rawJSON = json.RawMessage(data) - return nil -} - -func (e *ExternalTargetFieldApi) String() string { - if len(e._rawJSON) > 0 { - if value, err := core.StringifyJSON(e._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(e); err == nil { - return value - } - return fmt.Sprintf("%#v", e) -} - -type ExternalTargetFieldApiResponse struct { - Activity []*ExternalTargetFieldApi `json:"Activity,omitempty"` - Application []*ExternalTargetFieldApi `json:"Application,omitempty"` - Attachment []*ExternalTargetFieldApi `json:"Attachment,omitempty"` - Candidate []*ExternalTargetFieldApi `json:"Candidate,omitempty"` - Department []*ExternalTargetFieldApi `json:"Department,omitempty"` - Eeoc []*ExternalTargetFieldApi `json:"EEOC,omitempty"` - ScheduledInterview []*ExternalTargetFieldApi `json:"ScheduledInterview,omitempty"` - Job []*ExternalTargetFieldApi `json:"Job,omitempty"` - JobPosting []*ExternalTargetFieldApi `json:"JobPosting,omitempty"` - JobInterviewStage []*ExternalTargetFieldApi `json:"JobInterviewStage,omitempty"` - Offer []*ExternalTargetFieldApi `json:"Offer,omitempty"` - Office []*ExternalTargetFieldApi `json:"Office,omitempty"` - RejectReason []*ExternalTargetFieldApi `json:"RejectReason,omitempty"` - Scorecard []*ExternalTargetFieldApi `json:"Scorecard,omitempty"` - Tag []*ExternalTargetFieldApi `json:"Tag,omitempty"` - RemoteUser []*ExternalTargetFieldApi `json:"RemoteUser,omitempty"` - - _rawJSON json.RawMessage -} - -func (e *ExternalTargetFieldApiResponse) UnmarshalJSON(data []byte) error { - type unmarshaler ExternalTargetFieldApiResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *e = ExternalTargetFieldApiResponse(value) - e._rawJSON = json.RawMessage(data) - return nil -} - -func (e *ExternalTargetFieldApiResponse) String() string { - if len(e._rawJSON) > 0 { - if value, err := core.StringifyJSON(e._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(e); err == nil { - return value - } - return fmt.Sprintf("%#v", e) -} - -type FieldMappingApiInstance struct { - Id *string `json:"id,omitempty"` - IsIntegrationWide *bool `json:"is_integration_wide,omitempty"` - TargetField *FieldMappingApiInstanceTargetField `json:"target_field,omitempty"` - RemoteField *FieldMappingApiInstanceRemoteField `json:"remote_field,omitempty"` - - _rawJSON json.RawMessage -} - -func (f *FieldMappingApiInstance) UnmarshalJSON(data []byte) error { - type unmarshaler FieldMappingApiInstance - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *f = FieldMappingApiInstance(value) - f._rawJSON = json.RawMessage(data) - return nil -} - -func (f *FieldMappingApiInstance) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(f); err == nil { - return value - } - return fmt.Sprintf("%#v", f) -} - -type FieldMappingApiInstanceRemoteField struct { - RemoteKeyName *string `json:"remote_key_name,omitempty"` - Schema map[string]interface{} `json:"schema,omitempty"` - RemoteEndpointInfo *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo `json:"remote_endpoint_info,omitempty"` - - _rawJSON json.RawMessage -} - -func (f *FieldMappingApiInstanceRemoteField) UnmarshalJSON(data []byte) error { - type unmarshaler FieldMappingApiInstanceRemoteField - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *f = FieldMappingApiInstanceRemoteField(value) - f._rawJSON = json.RawMessage(data) - return nil -} - -func (f *FieldMappingApiInstanceRemoteField) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(f); err == nil { - return value - } - return fmt.Sprintf("%#v", f) -} - -type FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo struct { - Method *string `json:"method,omitempty"` - UrlPath *string `json:"url_path,omitempty"` - FieldTraversalPath []string `json:"field_traversal_path,omitempty"` - - _rawJSON json.RawMessage -} - -func (f *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo) UnmarshalJSON(data []byte) error { - type unmarshaler FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *f = FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo(value) - f._rawJSON = json.RawMessage(data) - return nil -} - -func (f *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(f); err == nil { - return value - } - return fmt.Sprintf("%#v", f) -} - -type FieldMappingApiInstanceResponse struct { - Activity []*FieldMappingApiInstance `json:"Activity,omitempty"` - Application []*FieldMappingApiInstance `json:"Application,omitempty"` - Attachment []*FieldMappingApiInstance `json:"Attachment,omitempty"` - Candidate []*FieldMappingApiInstance `json:"Candidate,omitempty"` - Department []*FieldMappingApiInstance `json:"Department,omitempty"` - Eeoc []*FieldMappingApiInstance `json:"EEOC,omitempty"` - ScheduledInterview []*FieldMappingApiInstance `json:"ScheduledInterview,omitempty"` - Job []*FieldMappingApiInstance `json:"Job,omitempty"` - JobPosting []*FieldMappingApiInstance `json:"JobPosting,omitempty"` - JobInterviewStage []*FieldMappingApiInstance `json:"JobInterviewStage,omitempty"` - Offer []*FieldMappingApiInstance `json:"Offer,omitempty"` - Office []*FieldMappingApiInstance `json:"Office,omitempty"` - RejectReason []*FieldMappingApiInstance `json:"RejectReason,omitempty"` - Scorecard []*FieldMappingApiInstance `json:"Scorecard,omitempty"` - Tag []*FieldMappingApiInstance `json:"Tag,omitempty"` - RemoteUser []*FieldMappingApiInstance `json:"RemoteUser,omitempty"` - - _rawJSON json.RawMessage -} - -func (f *FieldMappingApiInstanceResponse) UnmarshalJSON(data []byte) error { - type unmarshaler FieldMappingApiInstanceResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *f = FieldMappingApiInstanceResponse(value) - f._rawJSON = json.RawMessage(data) - return nil -} - -func (f *FieldMappingApiInstanceResponse) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(f); err == nil { - return value - } - return fmt.Sprintf("%#v", f) -} - -type FieldMappingApiInstanceTargetField struct { - Name string `json:"name"` - Description string `json:"description"` - IsOrganizationWide bool `json:"is_organization_wide"` - - _rawJSON json.RawMessage -} - -func (f *FieldMappingApiInstanceTargetField) UnmarshalJSON(data []byte) error { - type unmarshaler FieldMappingApiInstanceTargetField - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *f = FieldMappingApiInstanceTargetField(value) - f._rawJSON = json.RawMessage(data) - return nil -} - -func (f *FieldMappingApiInstanceTargetField) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(f); err == nil { - return value - } - return fmt.Sprintf("%#v", f) -} - -type FieldMappingInstanceResponse struct { - Model *FieldMappingApiInstance `json:"model,omitempty"` - Warnings []*WarningValidationProblem `json:"warnings,omitempty"` - Errors []*ErrorValidationProblem `json:"errors,omitempty"` - Logs []*DebugModeLog `json:"logs,omitempty"` - - _rawJSON json.RawMessage -} - -func (f *FieldMappingInstanceResponse) UnmarshalJSON(data []byte) error { - type unmarshaler FieldMappingInstanceResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *f = FieldMappingInstanceResponse(value) - f._rawJSON = json.RawMessage(data) - return nil -} - -func (f *FieldMappingInstanceResponse) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(f); err == nil { - return value - } - return fmt.Sprintf("%#v", f) -} - -type FieldPermissionDeserializer struct { - EnabledFields []interface{} `json:"enabled_fields,omitempty"` - DisabledFields []interface{} `json:"disabled_fields,omitempty"` - - _rawJSON json.RawMessage -} - -func (f *FieldPermissionDeserializer) UnmarshalJSON(data []byte) error { - type unmarshaler FieldPermissionDeserializer - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *f = FieldPermissionDeserializer(value) - f._rawJSON = json.RawMessage(data) - return nil -} - -func (f *FieldPermissionDeserializer) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(f); err == nil { - return value - } - return fmt.Sprintf("%#v", f) -} - -type FieldPermissionDeserializerRequest struct { - EnabledFields []interface{} `json:"enabled_fields,omitempty"` - DisabledFields []interface{} `json:"disabled_fields,omitempty"` - - _rawJSON json.RawMessage -} - -func (f *FieldPermissionDeserializerRequest) UnmarshalJSON(data []byte) error { - type unmarshaler FieldPermissionDeserializerRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *f = FieldPermissionDeserializerRequest(value) - f._rawJSON = json.RawMessage(data) - return nil -} - -func (f *FieldPermissionDeserializerRequest) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(f); err == nil { - return value - } - return fmt.Sprintf("%#v", f) -} - -// - `MALE` - MALE -// - `FEMALE` - FEMALE -// - `NON-BINARY` - NON-BINARY -// - `OTHER` - OTHER -// - `DECLINE_TO_SELF_IDENTIFY` - DECLINE_TO_SELF_IDENTIFY -type GenderEnum string - -const ( - GenderEnumMale GenderEnum = "MALE" - GenderEnumFemale GenderEnum = "FEMALE" - GenderEnumNonBinary GenderEnum = "NON-BINARY" - GenderEnumOther GenderEnum = "OTHER" - GenderEnumDeclineToSelfIdentify GenderEnum = "DECLINE_TO_SELF_IDENTIFY" -) - -func NewGenderEnumFromString(s string) (GenderEnum, error) { - switch s { - case "MALE": - return GenderEnumMale, nil - case "FEMALE": - return GenderEnumFemale, nil - case "NON-BINARY": - return GenderEnumNonBinary, nil - case "OTHER": - return GenderEnumOther, nil - case "DECLINE_TO_SELF_IDENTIFY": - return GenderEnumDeclineToSelfIdentify, nil - } - var t GenderEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (g GenderEnum) Ptr() *GenderEnum { - return &g -} - -type IndividualCommonModelScopeDeserializer struct { - ModelName string `json:"model_name"` - ModelPermissions map[string]*ModelPermissionDeserializer `json:"model_permissions,omitempty"` - FieldPermissions *FieldPermissionDeserializer `json:"field_permissions,omitempty"` - - _rawJSON json.RawMessage -} - -func (i *IndividualCommonModelScopeDeserializer) UnmarshalJSON(data []byte) error { - type unmarshaler IndividualCommonModelScopeDeserializer - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *i = IndividualCommonModelScopeDeserializer(value) - i._rawJSON = json.RawMessage(data) - return nil -} - -func (i *IndividualCommonModelScopeDeserializer) String() string { - if len(i._rawJSON) > 0 { - if value, err := core.StringifyJSON(i._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(i); err == nil { - return value - } - return fmt.Sprintf("%#v", i) -} - -type IndividualCommonModelScopeDeserializerRequest struct { - ModelName string `json:"model_name"` - ModelPermissions map[string]*ModelPermissionDeserializerRequest `json:"model_permissions,omitempty"` - FieldPermissions *FieldPermissionDeserializerRequest `json:"field_permissions,omitempty"` - - _rawJSON json.RawMessage -} - -func (i *IndividualCommonModelScopeDeserializerRequest) UnmarshalJSON(data []byte) error { - type unmarshaler IndividualCommonModelScopeDeserializerRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *i = IndividualCommonModelScopeDeserializerRequest(value) - i._rawJSON = json.RawMessage(data) - return nil -} - -func (i *IndividualCommonModelScopeDeserializerRequest) String() string { - if len(i._rawJSON) > 0 { - if value, err := core.StringifyJSON(i._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(i); err == nil { - return value - } - return fmt.Sprintf("%#v", i) -} - -type Issue struct { - Id *string `json:"id,omitempty"` - // Status of the issue. Options: ('ONGOING', 'RESOLVED') - // - // - `ONGOING` - ONGOING - // - `RESOLVED` - RESOLVED - Status *IssueStatus `json:"status,omitempty"` - ErrorDescription string `json:"error_description"` - EndUser map[string]interface{} `json:"end_user,omitempty"` - FirstIncidentTime *time.Time `json:"first_incident_time,omitempty"` - LastIncidentTime *time.Time `json:"last_incident_time,omitempty"` - IsMuted *bool `json:"is_muted,omitempty"` - ErrorDetails []string `json:"error_details,omitempty"` - - _rawJSON json.RawMessage -} - -func (i *Issue) UnmarshalJSON(data []byte) error { - type unmarshaler Issue - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *i = Issue(value) - i._rawJSON = json.RawMessage(data) - return nil -} - -func (i *Issue) String() string { - if len(i._rawJSON) > 0 { - if value, err := core.StringifyJSON(i._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(i); err == nil { - return value - } - return fmt.Sprintf("%#v", i) -} - -// Status of the issue. Options: ('ONGOING', 'RESOLVED') -// -// - `ONGOING` - ONGOING -// - `RESOLVED` - RESOLVED -type IssueStatus struct { - typeName string - IssueStatusEnum IssueStatusEnum - String string -} - -func NewIssueStatusFromIssueStatusEnum(value IssueStatusEnum) *IssueStatus { - return &IssueStatus{typeName: "issueStatusEnum", IssueStatusEnum: value} -} - -func NewIssueStatusFromString(value string) *IssueStatus { - return &IssueStatus{typeName: "string", String: value} -} - -func (i *IssueStatus) UnmarshalJSON(data []byte) error { - var valueIssueStatusEnum IssueStatusEnum - if err := json.Unmarshal(data, &valueIssueStatusEnum); err == nil { - i.typeName = "issueStatusEnum" - i.IssueStatusEnum = valueIssueStatusEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - i.typeName = "string" - i.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, i) -} - -func (i IssueStatus) MarshalJSON() ([]byte, error) { - switch i.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "issueStatusEnum": - return json.Marshal(i.IssueStatusEnum) - case "string": - return json.Marshal(i.String) - } -} - -type IssueStatusVisitor interface { - VisitIssueStatusEnum(IssueStatusEnum) error - VisitString(string) error -} - -func (i *IssueStatus) Accept(visitor IssueStatusVisitor) error { - switch i.typeName { - default: - return fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "issueStatusEnum": - return visitor.VisitIssueStatusEnum(i.IssueStatusEnum) - case "string": - return visitor.VisitString(i.String) - } -} - -// - `ONGOING` - ONGOING -// - `RESOLVED` - RESOLVED -type IssueStatusEnum string - -const ( - IssueStatusEnumOngoing IssueStatusEnum = "ONGOING" - IssueStatusEnumResolved IssueStatusEnum = "RESOLVED" -) - -func NewIssueStatusEnumFromString(s string) (IssueStatusEnum, error) { - switch s { - case "ONGOING": - return IssueStatusEnumOngoing, nil - case "RESOLVED": - return IssueStatusEnumResolved, nil - } - var t IssueStatusEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (i IssueStatusEnum) Ptr() *IssueStatusEnum { - return &i -} - -// # The Job Object -// -// ### Description -// -// The `Job` object can be used to track any jobs that are currently or will be open/closed for applications. -// -// ### Usage Example -// -// Fetch from the `LIST Jobs` endpoint to show all job postings. -type Job struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The job's name. - Name *string `json:"name,omitempty"` - // The job's description. - Description *string `json:"description,omitempty"` - // The job's code. Typically an additional identifier used to reference the particular job that is displayed on the ATS. - Code *string `json:"code,omitempty"` - // The job's status. - // - // - `OPEN` - OPEN - // - `CLOSED` - CLOSED - // - `DRAFT` - DRAFT - // - `ARCHIVED` - ARCHIVED - // - `PENDING` - PENDING - Status *JobStatus `json:"status,omitempty"` - // The job's type. - // - // - `POSTING` - POSTING - // - `REQUISITION` - REQUISITION - // - `PROFILE` - PROFILE - Type *JobTypeEnum `json:"type,omitempty"` - // IDs of `JobPosting` objects that serve as job postings for this `Job`. - JobPostings []*string `json:"job_postings,omitempty"` - JobPostingUrls []*Url `json:"job_posting_urls,omitempty"` - // When the third party's job was created. - RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty"` - // When the third party's job was updated. - RemoteUpdatedAt *time.Time `json:"remote_updated_at,omitempty"` - // Whether the job is confidential. - Confidential *bool `json:"confidential,omitempty"` - // IDs of `Department` objects for this `Job`. - Departments []*JobDepartmentsItem `json:"departments,omitempty"` - // IDs of `Office` objects for this `Job`. - Offices []*JobOfficesItem `json:"offices,omitempty"` - // IDs of `RemoteUser` objects that serve as hiring managers for this `Job`. - HiringManagers []*JobHiringManagersItem `json:"hiring_managers,omitempty"` - // IDs of `RemoteUser` objects that serve as recruiters for this `Job`. - Recruiters []*JobRecruitersItem `json:"recruiters,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` - - _rawJSON json.RawMessage -} - -func (j *Job) UnmarshalJSON(data []byte) error { - type unmarshaler Job - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *j = Job(value) - j._rawJSON = json.RawMessage(data) - return nil -} - -func (j *Job) String() string { - if len(j._rawJSON) > 0 { - if value, err := core.StringifyJSON(j._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(j); err == nil { - return value - } - return fmt.Sprintf("%#v", j) + typ string } -type JobDepartmentsItem struct { - typeName string - String string - Department *Department -} - -func NewJobDepartmentsItemFromString(value string) *JobDepartmentsItem { - return &JobDepartmentsItem{typeName: "string", String: value} -} - -func NewJobDepartmentsItemFromDepartment(value *Department) *JobDepartmentsItem { - return &JobDepartmentsItem{typeName: "department", Department: value} -} - -func (j *JobDepartmentsItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - j.typeName = "string" - j.String = valueString - return nil - } - valueDepartment := new(Department) - if err := json.Unmarshal(data, &valueDepartment); err == nil { - j.typeName = "department" - j.Department = valueDepartment - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, j) -} - -func (j JobDepartmentsItem) MarshalJSON() ([]byte, error) { - switch j.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "string": - return json.Marshal(j.String) - case "department": - return json.Marshal(j.Department) - } -} - -type JobDepartmentsItemVisitor interface { - VisitString(string) error - VisitDepartment(*Department) error -} - -func (j *JobDepartmentsItem) Accept(visitor JobDepartmentsItemVisitor) error { - switch j.typeName { - default: - return fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "string": - return visitor.VisitString(j.String) - case "department": - return visitor.VisitDepartment(j.Department) - } -} - -type JobHiringManagersItem struct { - typeName string - String string - RemoteUser *RemoteUser -} - -func NewJobHiringManagersItemFromString(value string) *JobHiringManagersItem { - return &JobHiringManagersItem{typeName: "string", String: value} -} - -func NewJobHiringManagersItemFromRemoteUser(value *RemoteUser) *JobHiringManagersItem { - return &JobHiringManagersItem{typeName: "remoteUser", RemoteUser: value} -} - -func (j *JobHiringManagersItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - j.typeName = "string" - j.String = valueString - return nil - } - valueRemoteUser := new(RemoteUser) - if err := json.Unmarshal(data, &valueRemoteUser); err == nil { - j.typeName = "remoteUser" - j.RemoteUser = valueRemoteUser - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, j) -} - -func (j JobHiringManagersItem) MarshalJSON() ([]byte, error) { - switch j.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "string": - return json.Marshal(j.String) - case "remoteUser": - return json.Marshal(j.RemoteUser) - } -} - -type JobHiringManagersItemVisitor interface { - VisitString(string) error - VisitRemoteUser(*RemoteUser) error -} - -func (j *JobHiringManagersItem) Accept(visitor JobHiringManagersItemVisitor) error { - switch j.typeName { - default: - return fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "string": - return visitor.VisitString(j.String) - case "remoteUser": - return visitor.VisitRemoteUser(j.RemoteUser) - } -} - -// # The JobInterviewStage Object -// -// ### Description -// -// The `JobInterviewStage` object is used to represent a particular recruiting stage for an `Application`. A given `Application` typically has the `JobInterviewStage` object represented in the current_stage field. -// -// ### Usage Example -// -// Fetch from the `LIST JobInterviewStages` endpoint and view the job interview stages used by a company. -type JobInterviewStage struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // Standard stage names are offered by ATS systems but can be modified by users. - Name *string `json:"name,omitempty"` - // This field is populated only if the stage is specific to a particular job. If the stage is generic, this field will not be populated. - Job *JobInterviewStageJob `json:"job,omitempty"` - // The stage’s order, with the lowest values ordered first. If the third-party does not return details on the order of stages, this field will not be populated. - StageOrder *int `json:"stage_order,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` - - _rawJSON json.RawMessage -} - -func (j *JobInterviewStage) UnmarshalJSON(data []byte) error { - type unmarshaler JobInterviewStage - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *j = JobInterviewStage(value) - j._rawJSON = json.RawMessage(data) - return nil -} - -func (j *JobInterviewStage) String() string { - if len(j._rawJSON) > 0 { - if value, err := core.StringifyJSON(j._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(j); err == nil { - return value - } - return fmt.Sprintf("%#v", j) -} - -// This field is populated only if the stage is specific to a particular job. If the stage is generic, this field will not be populated. -type JobInterviewStageJob struct { - typeName string - String string - Job *Job -} - -func NewJobInterviewStageJobFromString(value string) *JobInterviewStageJob { - return &JobInterviewStageJob{typeName: "string", String: value} -} - -func NewJobInterviewStageJobFromJob(value *Job) *JobInterviewStageJob { - return &JobInterviewStageJob{typeName: "job", Job: value} -} - -func (j *JobInterviewStageJob) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - j.typeName = "string" - j.String = valueString - return nil - } - valueJob := new(Job) - if err := json.Unmarshal(data, &valueJob); err == nil { - j.typeName = "job" - j.Job = valueJob - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, j) -} - -func (j JobInterviewStageJob) MarshalJSON() ([]byte, error) { - switch j.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "string": - return json.Marshal(j.String) - case "job": - return json.Marshal(j.Job) - } -} - -type JobInterviewStageJobVisitor interface { - VisitString(string) error - VisitJob(*Job) error -} - -func (j *JobInterviewStageJob) Accept(visitor JobInterviewStageJobVisitor) error { - switch j.typeName { - default: - return fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "string": - return visitor.VisitString(j.String) - case "job": - return visitor.VisitJob(j.Job) - } -} - -type JobOfficesItem struct { - typeName string - String string - Office *Office -} - -func NewJobOfficesItemFromString(value string) *JobOfficesItem { - return &JobOfficesItem{typeName: "string", String: value} -} - -func NewJobOfficesItemFromOffice(value *Office) *JobOfficesItem { - return &JobOfficesItem{typeName: "office", Office: value} -} - -func (j *JobOfficesItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - j.typeName = "string" - j.String = valueString - return nil - } - valueOffice := new(Office) - if err := json.Unmarshal(data, &valueOffice); err == nil { - j.typeName = "office" - j.Office = valueOffice - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, j) -} - -func (j JobOfficesItem) MarshalJSON() ([]byte, error) { - switch j.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "string": - return json.Marshal(j.String) - case "office": - return json.Marshal(j.Office) - } -} - -type JobOfficesItemVisitor interface { - VisitString(string) error - VisitOffice(*Office) error -} - -func (j *JobOfficesItem) Accept(visitor JobOfficesItemVisitor) error { - switch j.typeName { - default: - return fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "string": - return visitor.VisitString(j.String) - case "office": - return visitor.VisitOffice(j.Office) - } -} - -// # 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. -type JobPosting struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The job posting’s title. - Title *string `json:"title,omitempty"` - // The Url object is used to represent hyperlinks for a candidate to apply to a given job. - JobPostingUrls []*JobPostingJobPostingUrlsItem `json:"job_posting_urls,omitempty"` - // ID of `Job` object for this `JobPosting`. - Job *JobPostingJob `json:"job,omitempty"` - // The job posting's status. - // - // - `PUBLISHED` - PUBLISHED - // - `CLOSED` - CLOSED - // - `DRAFT` - DRAFT - // - `INTERNAL` - INTERNAL - // - `PENDING` - PENDING - Status *JobPostingStatusEnum `json:"status,omitempty"` - // The job posting’s content. - Content *string `json:"content,omitempty"` - // When the third party's job posting was created. - RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty"` - // When the third party's job posting was updated. - RemoteUpdatedAt *time.Time `json:"remote_updated_at,omitempty"` - // Indicates whether the job posting is internal or external. - IsInternal *bool `json:"is_internal,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` - - _rawJSON json.RawMessage -} - -func (j *JobPosting) UnmarshalJSON(data []byte) error { - type unmarshaler JobPosting - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *j = JobPosting(value) - j._rawJSON = json.RawMessage(data) - return nil -} - -func (j *JobPosting) String() string { - if len(j._rawJSON) > 0 { - if value, err := core.StringifyJSON(j._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(j); err == nil { - return value +func (j *JobDepartmentsItem) GetString() string { + if j == nil { + return "" } - return fmt.Sprintf("%#v", j) -} - -// ID of `Job` object for this `JobPosting`. -type JobPostingJob struct { - typeName string - String string - Job *Job -} - -func NewJobPostingJobFromString(value string) *JobPostingJob { - return &JobPostingJob{typeName: "string", String: value} + return j.String } -func NewJobPostingJobFromJob(value *Job) *JobPostingJob { - return &JobPostingJob{typeName: "job", Job: value} -} - -func (j *JobPostingJob) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - j.typeName = "string" - j.String = valueString - return nil - } - valueJob := new(Job) - if err := json.Unmarshal(data, &valueJob); err == nil { - j.typeName = "job" - j.Job = valueJob +func (j *JobDepartmentsItem) GetDepartment() *Department { + if j == nil { return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, j) -} - -func (j JobPostingJob) MarshalJSON() ([]byte, error) { - switch j.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "string": - return json.Marshal(j.String) - case "job": - return json.Marshal(j.Job) - } -} - -type JobPostingJobVisitor interface { - VisitString(string) error - VisitJob(*Job) error -} - -func (j *JobPostingJob) Accept(visitor JobPostingJobVisitor) error { - switch j.typeName { - default: - return fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "string": - return visitor.VisitString(j.String) - case "job": - return visitor.VisitJob(j.Job) - } -} - -type JobPostingJobPostingUrlsItem struct { - typeName string - String string - Url *Url -} - -func NewJobPostingJobPostingUrlsItemFromString(value string) *JobPostingJobPostingUrlsItem { - return &JobPostingJobPostingUrlsItem{typeName: "string", String: value} -} - -func NewJobPostingJobPostingUrlsItemFromUrl(value *Url) *JobPostingJobPostingUrlsItem { - return &JobPostingJobPostingUrlsItem{typeName: "url", Url: value} + } + return j.Department } -func (j *JobPostingJobPostingUrlsItem) UnmarshalJSON(data []byte) error { +func (j *JobDepartmentsItem) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - j.typeName = "string" + j.typ = "String" j.String = valueString return nil } - valueUrl := new(Url) - if err := json.Unmarshal(data, &valueUrl); err == nil { - j.typeName = "url" - j.Url = valueUrl + valueDepartment := new(Department) + if err := json.Unmarshal(data, &valueDepartment); err == nil { + j.typ = "Department" + j.Department = valueDepartment return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, j) } -func (j JobPostingJobPostingUrlsItem) MarshalJSON() ([]byte, error) { - switch j.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "string": +func (j JobDepartmentsItem) MarshalJSON() ([]byte, error) { + if j.typ == "String" || j.String != "" { return json.Marshal(j.String) - case "url": - return json.Marshal(j.Url) } + if j.typ == "Department" || j.Department != nil { + return json.Marshal(j.Department) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", j) } -type JobPostingJobPostingUrlsItemVisitor interface { +type JobDepartmentsItemVisitor interface { VisitString(string) error - VisitUrl(*Url) error + VisitDepartment(*Department) error } -func (j *JobPostingJobPostingUrlsItem) Accept(visitor JobPostingJobPostingUrlsItemVisitor) error { - switch j.typeName { - default: - return fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "string": +func (j *JobDepartmentsItem) Accept(visitor JobDepartmentsItemVisitor) error { + if j.typ == "String" || j.String != "" { return visitor.VisitString(j.String) - case "url": - return visitor.VisitUrl(j.Url) } -} - -// - `PUBLISHED` - PUBLISHED -// - `CLOSED` - CLOSED -// - `DRAFT` - DRAFT -// - `INTERNAL` - INTERNAL -// - `PENDING` - PENDING -type JobPostingStatusEnum string - -const ( - JobPostingStatusEnumPublished JobPostingStatusEnum = "PUBLISHED" - JobPostingStatusEnumClosed JobPostingStatusEnum = "CLOSED" - JobPostingStatusEnumDraft JobPostingStatusEnum = "DRAFT" - JobPostingStatusEnumInternal JobPostingStatusEnum = "INTERNAL" - JobPostingStatusEnumPending JobPostingStatusEnum = "PENDING" -) - -func NewJobPostingStatusEnumFromString(s string) (JobPostingStatusEnum, error) { - switch s { - case "PUBLISHED": - return JobPostingStatusEnumPublished, nil - case "CLOSED": - return JobPostingStatusEnumClosed, nil - case "DRAFT": - return JobPostingStatusEnumDraft, nil - case "INTERNAL": - return JobPostingStatusEnumInternal, nil - case "PENDING": - return JobPostingStatusEnumPending, nil + if j.typ == "Department" || j.Department != nil { + return visitor.VisitDepartment(j.Department) } - var t JobPostingStatusEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (j JobPostingStatusEnum) Ptr() *JobPostingStatusEnum { - return &j + return fmt.Errorf("type %T does not include a non-empty union type", j) } -type JobRecruitersItem struct { - typeName string +type JobHiringManagersItem struct { String string RemoteUser *RemoteUser + + typ string } -func NewJobRecruitersItemFromString(value string) *JobRecruitersItem { - return &JobRecruitersItem{typeName: "string", String: value} +func (j *JobHiringManagersItem) GetString() string { + if j == nil { + return "" + } + return j.String } -func NewJobRecruitersItemFromRemoteUser(value *RemoteUser) *JobRecruitersItem { - return &JobRecruitersItem{typeName: "remoteUser", RemoteUser: value} +func (j *JobHiringManagersItem) GetRemoteUser() *RemoteUser { + if j == nil { + return nil + } + return j.RemoteUser } -func (j *JobRecruitersItem) UnmarshalJSON(data []byte) error { +func (j *JobHiringManagersItem) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - j.typeName = "string" + j.typ = "String" j.String = valueString return nil } valueRemoteUser := new(RemoteUser) if err := json.Unmarshal(data, &valueRemoteUser); err == nil { - j.typeName = "remoteUser" + j.typ = "RemoteUser" j.RemoteUser = valueRemoteUser return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, j) } -func (j JobRecruitersItem) MarshalJSON() ([]byte, error) { - switch j.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "string": +func (j JobHiringManagersItem) MarshalJSON() ([]byte, error) { + if j.typ == "String" || j.String != "" { return json.Marshal(j.String) - case "remoteUser": + } + if j.typ == "RemoteUser" || j.RemoteUser != nil { return json.Marshal(j.RemoteUser) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", j) } -type JobRecruitersItemVisitor interface { +type JobHiringManagersItemVisitor interface { VisitString(string) error VisitRemoteUser(*RemoteUser) error } -func (j *JobRecruitersItem) Accept(visitor JobRecruitersItemVisitor) error { - switch j.typeName { - default: - return fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "string": - return visitor.VisitString(j.String) - case "remoteUser": - return visitor.VisitRemoteUser(j.RemoteUser) - } -} - -// The job's status. -// -// - `OPEN` - OPEN -// - `CLOSED` - CLOSED -// - `DRAFT` - DRAFT -// - `ARCHIVED` - ARCHIVED -// - `PENDING` - PENDING -type JobStatus struct { - typeName string - JobStatusEnum JobStatusEnum - String string -} - -func NewJobStatusFromJobStatusEnum(value JobStatusEnum) *JobStatus { - return &JobStatus{typeName: "jobStatusEnum", JobStatusEnum: value} -} - -func NewJobStatusFromString(value string) *JobStatus { - return &JobStatus{typeName: "string", String: value} -} - -func (j *JobStatus) UnmarshalJSON(data []byte) error { - var valueJobStatusEnum JobStatusEnum - if err := json.Unmarshal(data, &valueJobStatusEnum); err == nil { - j.typeName = "jobStatusEnum" - j.JobStatusEnum = valueJobStatusEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - j.typeName = "string" - j.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, j) -} - -func (j JobStatus) MarshalJSON() ([]byte, error) { - switch j.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "jobStatusEnum": - return json.Marshal(j.JobStatusEnum) - case "string": - return json.Marshal(j.String) - } -} - -type JobStatusVisitor interface { - VisitJobStatusEnum(JobStatusEnum) error - VisitString(string) error -} - -func (j *JobStatus) Accept(visitor JobStatusVisitor) error { - switch j.typeName { - default: - return fmt.Errorf("invalid type %s in %T", j.typeName, j) - case "jobStatusEnum": - return visitor.VisitJobStatusEnum(j.JobStatusEnum) - case "string": +func (j *JobHiringManagersItem) Accept(visitor JobHiringManagersItemVisitor) error { + if j.typ == "String" || j.String != "" { return visitor.VisitString(j.String) } -} - -// - `OPEN` - OPEN -// - `CLOSED` - CLOSED -// - `DRAFT` - DRAFT -// - `ARCHIVED` - ARCHIVED -// - `PENDING` - PENDING -type JobStatusEnum string - -const ( - JobStatusEnumOpen JobStatusEnum = "OPEN" - JobStatusEnumClosed JobStatusEnum = "CLOSED" - JobStatusEnumDraft JobStatusEnum = "DRAFT" - JobStatusEnumArchived JobStatusEnum = "ARCHIVED" - JobStatusEnumPending JobStatusEnum = "PENDING" -) - -func NewJobStatusEnumFromString(s string) (JobStatusEnum, error) { - switch s { - case "OPEN": - return JobStatusEnumOpen, nil - case "CLOSED": - return JobStatusEnumClosed, nil - case "DRAFT": - return JobStatusEnumDraft, nil - case "ARCHIVED": - return JobStatusEnumArchived, nil - case "PENDING": - return JobStatusEnumPending, nil - } - var t JobStatusEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (j JobStatusEnum) Ptr() *JobStatusEnum { - return &j -} - -// - `POSTING` - POSTING -// - `REQUISITION` - REQUISITION -// - `PROFILE` - PROFILE -type JobTypeEnum string - -const ( - JobTypeEnumPosting JobTypeEnum = "POSTING" - JobTypeEnumRequisition JobTypeEnum = "REQUISITION" - JobTypeEnumProfile JobTypeEnum = "PROFILE" -) - -func NewJobTypeEnumFromString(s string) (JobTypeEnum, error) { - switch s { - case "POSTING": - return JobTypeEnumPosting, nil - case "REQUISITION": - return JobTypeEnumRequisition, nil - case "PROFILE": - return JobTypeEnumProfile, nil - } - var t JobTypeEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (j JobTypeEnum) Ptr() *JobTypeEnum { - return &j -} - -// - `en` - en -// - `de` - de -type LanguageEnum string - -const ( - LanguageEnumEn LanguageEnum = "en" - LanguageEnumDe LanguageEnum = "de" -) - -func NewLanguageEnumFromString(s string) (LanguageEnum, error) { - switch s { - case "en": - return LanguageEnumEn, nil - case "de": - return LanguageEnumDe, nil - } - var t LanguageEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (l LanguageEnum) Ptr() *LanguageEnum { - return &l -} - -type LinkToken struct { - LinkToken string `json:"link_token"` - IntegrationName *string `json:"integration_name,omitempty"` - MagicLinkUrl *string `json:"magic_link_url,omitempty"` - - _rawJSON json.RawMessage -} - -func (l *LinkToken) UnmarshalJSON(data []byte) error { - type unmarshaler LinkToken - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *l = LinkToken(value) - l._rawJSON = json.RawMessage(data) - return nil -} - -func (l *LinkToken) String() string { - if len(l._rawJSON) > 0 { - if value, err := core.StringifyJSON(l._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(l); err == nil { - return value - } - return fmt.Sprintf("%#v", l) -} - -type LinkedAccountStatus struct { - LinkedAccountStatus string `json:"linked_account_status"` - CanMakeRequest bool `json:"can_make_request"` - - _rawJSON json.RawMessage -} - -func (l *LinkedAccountStatus) UnmarshalJSON(data []byte) error { - type unmarshaler LinkedAccountStatus - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *l = LinkedAccountStatus(value) - l._rawJSON = json.RawMessage(data) - return nil -} - -func (l *LinkedAccountStatus) String() string { - if len(l._rawJSON) > 0 { - if value, err := core.StringifyJSON(l._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(l); err == nil { - return value - } - return fmt.Sprintf("%#v", l) -} - -type MetaResponse struct { - RequestSchema map[string]interface{} `json:"request_schema,omitempty"` - RemoteFieldClasses map[string]interface{} `json:"remote_field_classes,omitempty"` - Status *LinkedAccountStatus `json:"status,omitempty"` - HasConditionalParams bool `json:"has_conditional_params"` - HasRequiredLinkedAccountParams bool `json:"has_required_linked_account_params"` - - _rawJSON json.RawMessage -} - -func (m *MetaResponse) UnmarshalJSON(data []byte) error { - type unmarshaler MetaResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *m = MetaResponse(value) - m._rawJSON = json.RawMessage(data) - return nil -} - -func (m *MetaResponse) String() string { - if len(m._rawJSON) > 0 { - if value, err := core.StringifyJSON(m._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(m); err == nil { - return value - } - return fmt.Sprintf("%#v", m) -} - -// - `GET` - GET -// - `OPTIONS` - OPTIONS -// - `HEAD` - HEAD -// - `POST` - POST -// - `PUT` - PUT -// - `PATCH` - PATCH -// - `DELETE` - DELETE -type MethodEnum string - -const ( - MethodEnumGet MethodEnum = "GET" - MethodEnumOptions MethodEnum = "OPTIONS" - MethodEnumHead MethodEnum = "HEAD" - MethodEnumPost MethodEnum = "POST" - MethodEnumPut MethodEnum = "PUT" - MethodEnumPatch MethodEnum = "PATCH" - MethodEnumDelete MethodEnum = "DELETE" -) - -func NewMethodEnumFromString(s string) (MethodEnum, error) { - switch s { - case "GET": - return MethodEnumGet, nil - case "OPTIONS": - return MethodEnumOptions, nil - case "HEAD": - return MethodEnumHead, nil - case "POST": - return MethodEnumPost, nil - case "PUT": - return MethodEnumPut, nil - case "PATCH": - return MethodEnumPatch, nil - case "DELETE": - return MethodEnumDelete, nil + if j.typ == "RemoteUser" || j.RemoteUser != nil { + return visitor.VisitRemoteUser(j.RemoteUser) } - var t MethodEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (m MethodEnum) Ptr() *MethodEnum { - return &m + return fmt.Errorf("type %T does not include a non-empty union type", j) } - -// # The ModelOperation Object -// + +// # The JobInterviewStage Object // ### Description -// -// The `ModelOperation` object is used to represent the operations that are currently supported for a given model. -// +// The `JobInterviewStage` object is used to represent a particular recruiting stage for an `Application`. A given `Application` typically has the `JobInterviewStage` object represented in the current_stage field. // ### Usage Example -// -// View what operations are supported for the `Candidate` endpoint. -type ModelOperation struct { - ModelName string `json:"model_name"` - AvailableOperations []string `json:"available_operations,omitempty"` - RequiredPostParameters []string `json:"required_post_parameters,omitempty"` - SupportedFields []string `json:"supported_fields,omitempty"` +// Fetch from the `LIST JobInterviewStages` endpoint and view the job interview stages used by a company. +type JobInterviewStage struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // Standard stage names are offered by ATS systems but can be modified by users. + Name *string `json:"name,omitempty" url:"name,omitempty"` + // This field is populated only if the stage is specific to a particular job. If the stage is generic, this field will not be populated. + Job *JobInterviewStageJob `json:"job,omitempty" url:"job,omitempty"` + // The stage’s order, with the lowest values ordered first. If the third-party does not return details on the order of stages, this field will not be populated. + StageOrder *int `json:"stage_order,omitempty" url:"stage_order,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (m *ModelOperation) UnmarshalJSON(data []byte) error { - type unmarshaler ModelOperation - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (j *JobInterviewStage) GetId() *string { + if j == nil { + return nil } - *m = ModelOperation(value) - m._rawJSON = json.RawMessage(data) - return nil + return j.Id } -func (m *ModelOperation) String() string { - if len(m._rawJSON) > 0 { - if value, err := core.StringifyJSON(m._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(m); err == nil { - return value +func (j *JobInterviewStage) GetRemoteId() *string { + if j == nil { + return nil } - return fmt.Sprintf("%#v", m) + return j.RemoteId } -type ModelPermissionDeserializer struct { - IsEnabled *bool `json:"is_enabled,omitempty"` - - _rawJSON json.RawMessage +func (j *JobInterviewStage) GetCreatedAt() *time.Time { + if j == nil { + return nil + } + return j.CreatedAt } -func (m *ModelPermissionDeserializer) UnmarshalJSON(data []byte) error { - type unmarshaler ModelPermissionDeserializer - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (j *JobInterviewStage) GetModifiedAt() *time.Time { + if j == nil { + return nil } - *m = ModelPermissionDeserializer(value) - m._rawJSON = json.RawMessage(data) - return nil + return j.ModifiedAt } -func (m *ModelPermissionDeserializer) String() string { - if len(m._rawJSON) > 0 { - if value, err := core.StringifyJSON(m._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(m); err == nil { - return value +func (j *JobInterviewStage) GetName() *string { + if j == nil { + return nil } - return fmt.Sprintf("%#v", m) + return j.Name } -type ModelPermissionDeserializerRequest struct { - IsEnabled *bool `json:"is_enabled,omitempty"` - - _rawJSON json.RawMessage +func (j *JobInterviewStage) GetJob() *JobInterviewStageJob { + if j == nil { + return nil + } + return j.Job } -func (m *ModelPermissionDeserializerRequest) UnmarshalJSON(data []byte) error { - type unmarshaler ModelPermissionDeserializerRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (j *JobInterviewStage) GetStageOrder() *int { + if j == nil { + return nil } - *m = ModelPermissionDeserializerRequest(value) - m._rawJSON = json.RawMessage(data) - return nil + return j.StageOrder } -func (m *ModelPermissionDeserializerRequest) String() string { - if len(m._rawJSON) > 0 { - if value, err := core.StringifyJSON(m._rawJSON); err == nil { - return value - } +func (j *JobInterviewStage) GetRemoteWasDeleted() *bool { + if j == nil { + return nil } - if value, err := core.StringifyJSON(m); err == nil { - return value + return j.RemoteWasDeleted +} + +func (j *JobInterviewStage) GetFieldMappings() map[string]interface{} { + if j == nil { + return nil } - return fmt.Sprintf("%#v", m) + return j.FieldMappings } -// # The MultipartFormField Object -// -// ### Description -// -// The `MultipartFormField` object is used to represent fields in an HTTP request using `multipart/form-data`. -// -// ### Usage Example -// -// Create a `MultipartFormField` to define a multipart form entry. -type MultipartFormFieldRequest struct { - // The name of the form field - Name string `json:"name"` - // The data for the form field. - Data string `json:"data"` - // The encoding of the value of `data`. Defaults to `RAW` if not defined. - // - // - `RAW` - RAW - // - `BASE64` - BASE64 - // - `GZIP_BASE64` - GZIP_BASE64 - Encoding *MultipartFormFieldRequestEncoding `json:"encoding,omitempty"` - // The file name of the form field, if the field is for a file. - FileName *string `json:"file_name,omitempty"` - // The MIME type of the file, if the field is for a file. - ContentType *string `json:"content_type,omitempty"` +func (j *JobInterviewStage) GetRemoteData() []*RemoteData { + if j == nil { + return nil + } + return j.RemoteData +} - _rawJSON json.RawMessage +func (j *JobInterviewStage) GetExtraProperties() map[string]interface{} { + return j.extraProperties } -func (m *MultipartFormFieldRequest) UnmarshalJSON(data []byte) error { - type unmarshaler MultipartFormFieldRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { +func (j *JobInterviewStage) UnmarshalJSON(data []byte) error { + type embed JobInterviewStage + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*j), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { return err } - *m = MultipartFormFieldRequest(value) - m._rawJSON = json.RawMessage(data) + *j = JobInterviewStage(unmarshaler.embed) + j.CreatedAt = unmarshaler.CreatedAt.TimePtr() + j.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *j) + if err != nil { + return err + } + j.extraProperties = extraProperties + j.rawJSON = json.RawMessage(data) return nil } -func (m *MultipartFormFieldRequest) String() string { - if len(m._rawJSON) > 0 { - if value, err := core.StringifyJSON(m._rawJSON); err == nil { +func (j *JobInterviewStage) MarshalJSON() ([]byte, error) { + type embed JobInterviewStage + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*j), + CreatedAt: internal.NewOptionalDateTime(j.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(j.ModifiedAt), + } + return json.Marshal(marshaler) +} + +func (j *JobInterviewStage) String() string { + if len(j.rawJSON) > 0 { + if value, err := internal.StringifyJSON(j.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(m); err == nil { + if value, err := internal.StringifyJSON(j); err == nil { return value } - return fmt.Sprintf("%#v", m) + return fmt.Sprintf("%#v", j) } -// The encoding of the value of `data`. Defaults to `RAW` if not defined. -// -// - `RAW` - RAW -// - `BASE64` - BASE64 -// - `GZIP_BASE64` - GZIP_BASE64 -type MultipartFormFieldRequestEncoding struct { - typeName string - EncodingEnum EncodingEnum - String string -} +// This field is populated only if the stage is specific to a particular job. If the stage is generic, this field will not be populated. +type JobInterviewStageJob struct { + String string + Job *Job -func NewMultipartFormFieldRequestEncodingFromEncodingEnum(value EncodingEnum) *MultipartFormFieldRequestEncoding { - return &MultipartFormFieldRequestEncoding{typeName: "encodingEnum", EncodingEnum: value} + typ string } -func NewMultipartFormFieldRequestEncodingFromString(value string) *MultipartFormFieldRequestEncoding { - return &MultipartFormFieldRequestEncoding{typeName: "string", String: value} +func (j *JobInterviewStageJob) GetString() string { + if j == nil { + return "" + } + return j.String } -func (m *MultipartFormFieldRequestEncoding) UnmarshalJSON(data []byte) error { - var valueEncodingEnum EncodingEnum - if err := json.Unmarshal(data, &valueEncodingEnum); err == nil { - m.typeName = "encodingEnum" - m.EncodingEnum = valueEncodingEnum +func (j *JobInterviewStageJob) GetJob() *Job { + if j == nil { return nil } + return j.Job +} + +func (j *JobInterviewStageJob) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - m.typeName = "string" - m.String = valueString + j.typ = "String" + j.String = valueString return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, m) + valueJob := new(Job) + if err := json.Unmarshal(data, &valueJob); err == nil { + j.typ = "Job" + j.Job = valueJob + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, j) } -func (m MultipartFormFieldRequestEncoding) MarshalJSON() ([]byte, error) { - switch m.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", m.typeName, m) - case "encodingEnum": - return json.Marshal(m.EncodingEnum) - case "string": - return json.Marshal(m.String) +func (j JobInterviewStageJob) MarshalJSON() ([]byte, error) { + if j.typ == "String" || j.String != "" { + return json.Marshal(j.String) } + if j.typ == "Job" || j.Job != nil { + return json.Marshal(j.Job) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", j) } -type MultipartFormFieldRequestEncodingVisitor interface { - VisitEncodingEnum(EncodingEnum) error +type JobInterviewStageJobVisitor interface { VisitString(string) error + VisitJob(*Job) error } -func (m *MultipartFormFieldRequestEncoding) Accept(visitor MultipartFormFieldRequestEncodingVisitor) error { - switch m.typeName { - default: - return fmt.Errorf("invalid type %s in %T", m.typeName, m) - case "encodingEnum": - return visitor.VisitEncodingEnum(m.EncodingEnum) - case "string": - return visitor.VisitString(m.String) +func (j *JobInterviewStageJob) Accept(visitor JobInterviewStageJobVisitor) error { + if j.typ == "String" || j.String != "" { + return visitor.VisitString(j.String) + } + if j.typ == "Job" || j.Job != nil { + return visitor.VisitJob(j.Job) } + return fmt.Errorf("type %T does not include a non-empty union type", j) } -// # The Offer Object -// -// ### Description -// -// The `Offer` object is used to represent an offer for a candidate's application specific to a job. -// -// ### Usage Example -// -// Fetch from the `LIST Offers` endpoint and filter by `ID` to show all offers. -type Offer struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The application who is receiving the offer. - Application *OfferApplication `json:"application,omitempty"` - // The user who created the offer. - Creator *OfferCreator `json:"creator,omitempty"` - // When the third party's offer was created. - RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty"` - // When the offer was closed. - ClosedAt *time.Time `json:"closed_at,omitempty"` - // When the offer was sent. - SentAt *time.Time `json:"sent_at,omitempty"` - // The employment start date on the offer. - StartDate *time.Time `json:"start_date,omitempty"` - // The offer's status. - // - // - `DRAFT` - DRAFT - // - `APPROVAL-SENT` - APPROVAL-SENT - // - `APPROVED` - APPROVED - // - `SENT` - SENT - // - `SENT-MANUALLY` - SENT-MANUALLY - // - `OPENED` - OPENED - // - `DENIED` - DENIED - // - `SIGNED` - SIGNED - // - `DEPRECATED` - DEPRECATED - Status *OfferStatus `json:"status,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` +type JobOfficesItem struct { + String string + Office *Office - _rawJSON json.RawMessage + typ string } -func (o *Offer) UnmarshalJSON(data []byte) error { - type unmarshaler Offer - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (j *JobOfficesItem) GetString() string { + if j == nil { + return "" } - *o = Offer(value) - o._rawJSON = json.RawMessage(data) - return nil + return j.String } -func (o *Offer) String() string { - if len(o._rawJSON) > 0 { - if value, err := core.StringifyJSON(o._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(o); err == nil { - return value +func (j *JobOfficesItem) GetOffice() *Office { + if j == nil { + return nil } - return fmt.Sprintf("%#v", o) -} - -// The application who is receiving the offer. -type OfferApplication struct { - typeName string - String string - Application *Application -} - -func NewOfferApplicationFromString(value string) *OfferApplication { - return &OfferApplication{typeName: "string", String: value} + return j.Office } -func NewOfferApplicationFromApplication(value *Application) *OfferApplication { - return &OfferApplication{typeName: "application", Application: value} -} - -func (o *OfferApplication) UnmarshalJSON(data []byte) error { +func (j *JobOfficesItem) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - o.typeName = "string" - o.String = valueString + j.typ = "String" + j.String = valueString return nil } - valueApplication := new(Application) - if err := json.Unmarshal(data, &valueApplication); err == nil { - o.typeName = "application" - o.Application = valueApplication + valueOffice := new(Office) + if err := json.Unmarshal(data, &valueOffice); err == nil { + j.typ = "Office" + j.Office = valueOffice return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, o) + return fmt.Errorf("%s cannot be deserialized as a %T", data, j) } -func (o OfferApplication) MarshalJSON() ([]byte, error) { - switch o.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", o.typeName, o) - case "string": - return json.Marshal(o.String) - case "application": - return json.Marshal(o.Application) +func (j JobOfficesItem) MarshalJSON() ([]byte, error) { + if j.typ == "String" || j.String != "" { + return json.Marshal(j.String) + } + if j.typ == "Office" || j.Office != nil { + return json.Marshal(j.Office) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", j) } -type OfferApplicationVisitor interface { +type JobOfficesItemVisitor interface { VisitString(string) error - VisitApplication(*Application) error + VisitOffice(*Office) error } -func (o *OfferApplication) Accept(visitor OfferApplicationVisitor) error { - switch o.typeName { - default: - return fmt.Errorf("invalid type %s in %T", o.typeName, o) - case "string": - return visitor.VisitString(o.String) - case "application": - return visitor.VisitApplication(o.Application) +func (j *JobOfficesItem) Accept(visitor JobOfficesItemVisitor) error { + if j.typ == "String" || j.String != "" { + return visitor.VisitString(j.String) + } + if j.typ == "Office" || j.Office != nil { + return visitor.VisitOffice(j.Office) } + return fmt.Errorf("type %T does not include a non-empty union type", j) } -// The user who created the offer. -type OfferCreator struct { - typeName string +type JobRecruitersItem struct { String string RemoteUser *RemoteUser + + typ string } -func NewOfferCreatorFromString(value string) *OfferCreator { - return &OfferCreator{typeName: "string", String: value} +func (j *JobRecruitersItem) GetString() string { + if j == nil { + return "" + } + return j.String } -func NewOfferCreatorFromRemoteUser(value *RemoteUser) *OfferCreator { - return &OfferCreator{typeName: "remoteUser", RemoteUser: value} +func (j *JobRecruitersItem) GetRemoteUser() *RemoteUser { + if j == nil { + return nil + } + return j.RemoteUser } -func (o *OfferCreator) UnmarshalJSON(data []byte) error { +func (j *JobRecruitersItem) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - o.typeName = "string" - o.String = valueString + j.typ = "String" + j.String = valueString return nil } valueRemoteUser := new(RemoteUser) if err := json.Unmarshal(data, &valueRemoteUser); err == nil { - o.typeName = "remoteUser" - o.RemoteUser = valueRemoteUser + j.typ = "RemoteUser" + j.RemoteUser = valueRemoteUser return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, o) + return fmt.Errorf("%s cannot be deserialized as a %T", data, j) } -func (o OfferCreator) MarshalJSON() ([]byte, error) { - switch o.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", o.typeName, o) - case "string": - return json.Marshal(o.String) - case "remoteUser": - return json.Marshal(o.RemoteUser) +func (j JobRecruitersItem) MarshalJSON() ([]byte, error) { + if j.typ == "String" || j.String != "" { + return json.Marshal(j.String) } + if j.typ == "RemoteUser" || j.RemoteUser != nil { + return json.Marshal(j.RemoteUser) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", j) } -type OfferCreatorVisitor interface { +type JobRecruitersItemVisitor interface { VisitString(string) error VisitRemoteUser(*RemoteUser) error } -func (o *OfferCreator) Accept(visitor OfferCreatorVisitor) error { - switch o.typeName { - default: - return fmt.Errorf("invalid type %s in %T", o.typeName, o) - case "string": - return visitor.VisitString(o.String) - case "remoteUser": - return visitor.VisitRemoteUser(o.RemoteUser) +func (j *JobRecruitersItem) Accept(visitor JobRecruitersItemVisitor) error { + if j.typ == "String" || j.String != "" { + return visitor.VisitString(j.String) + } + if j.typ == "RemoteUser" || j.RemoteUser != nil { + return visitor.VisitRemoteUser(j.RemoteUser) } + return fmt.Errorf("type %T does not include a non-empty union type", j) } -// The offer's status. -// -// - `DRAFT` - DRAFT -// - `APPROVAL-SENT` - APPROVAL-SENT -// - `APPROVED` - APPROVED -// - `SENT` - SENT -// - `SENT-MANUALLY` - SENT-MANUALLY -// - `OPENED` - OPENED -// - `DENIED` - DENIED -// - `SIGNED` - SIGNED -// - `DEPRECATED` - DEPRECATED -type OfferStatus struct { - typeName string - OfferStatusEnum OfferStatusEnum - String string +// The job's status. +// +// * `OPEN` - OPEN +// * `CLOSED` - CLOSED +// * `DRAFT` - DRAFT +// * `ARCHIVED` - ARCHIVED +// * `PENDING` - PENDING +type JobStatus struct { + JobStatusEnum JobStatusEnum + String string + + typ string } -func NewOfferStatusFromOfferStatusEnum(value OfferStatusEnum) *OfferStatus { - return &OfferStatus{typeName: "offerStatusEnum", OfferStatusEnum: value} +func (j *JobStatus) GetJobStatusEnum() JobStatusEnum { + if j == nil { + return "" + } + return j.JobStatusEnum } -func NewOfferStatusFromString(value string) *OfferStatus { - return &OfferStatus{typeName: "string", String: value} +func (j *JobStatus) GetString() string { + if j == nil { + return "" + } + return j.String } -func (o *OfferStatus) UnmarshalJSON(data []byte) error { - var valueOfferStatusEnum OfferStatusEnum - if err := json.Unmarshal(data, &valueOfferStatusEnum); err == nil { - o.typeName = "offerStatusEnum" - o.OfferStatusEnum = valueOfferStatusEnum +func (j *JobStatus) UnmarshalJSON(data []byte) error { + var valueJobStatusEnum JobStatusEnum + if err := json.Unmarshal(data, &valueJobStatusEnum); err == nil { + j.typ = "JobStatusEnum" + j.JobStatusEnum = valueJobStatusEnum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - o.typeName = "string" - o.String = valueString + j.typ = "String" + j.String = valueString return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, o) + return fmt.Errorf("%s cannot be deserialized as a %T", data, j) } -func (o OfferStatus) MarshalJSON() ([]byte, error) { - switch o.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", o.typeName, o) - case "offerStatusEnum": - return json.Marshal(o.OfferStatusEnum) - case "string": - return json.Marshal(o.String) +func (j JobStatus) MarshalJSON() ([]byte, error) { + if j.typ == "JobStatusEnum" || j.JobStatusEnum != "" { + return json.Marshal(j.JobStatusEnum) + } + if j.typ == "String" || j.String != "" { + return json.Marshal(j.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", j) } -type OfferStatusVisitor interface { - VisitOfferStatusEnum(OfferStatusEnum) error +type JobStatusVisitor interface { + VisitJobStatusEnum(JobStatusEnum) error VisitString(string) error } -func (o *OfferStatus) Accept(visitor OfferStatusVisitor) error { - switch o.typeName { - default: - return fmt.Errorf("invalid type %s in %T", o.typeName, o) - case "offerStatusEnum": - return visitor.VisitOfferStatusEnum(o.OfferStatusEnum) - case "string": - return visitor.VisitString(o.String) +func (j *JobStatus) Accept(visitor JobStatusVisitor) error { + if j.typ == "JobStatusEnum" || j.JobStatusEnum != "" { + return visitor.VisitJobStatusEnum(j.JobStatusEnum) } + if j.typ == "String" || j.String != "" { + return visitor.VisitString(j.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", j) } -// - `DRAFT` - DRAFT -// - `APPROVAL-SENT` - APPROVAL-SENT -// - `APPROVED` - APPROVED -// - `SENT` - SENT -// - `SENT-MANUALLY` - SENT-MANUALLY -// - `OPENED` - OPENED -// - `DENIED` - DENIED -// - `SIGNED` - SIGNED -// - `DEPRECATED` - DEPRECATED -type OfferStatusEnum string +// * `OPEN` - OPEN +// * `CLOSED` - CLOSED +// * `DRAFT` - DRAFT +// * `ARCHIVED` - ARCHIVED +// * `PENDING` - PENDING +type JobStatusEnum string const ( - OfferStatusEnumDraft OfferStatusEnum = "DRAFT" - OfferStatusEnumApprovalSent OfferStatusEnum = "APPROVAL-SENT" - OfferStatusEnumApproved OfferStatusEnum = "APPROVED" - OfferStatusEnumSent OfferStatusEnum = "SENT" - OfferStatusEnumSentManually OfferStatusEnum = "SENT-MANUALLY" - OfferStatusEnumOpened OfferStatusEnum = "OPENED" - OfferStatusEnumDenied OfferStatusEnum = "DENIED" - OfferStatusEnumSigned OfferStatusEnum = "SIGNED" - OfferStatusEnumDeprecated OfferStatusEnum = "DEPRECATED" + JobStatusEnumOpen JobStatusEnum = "OPEN" + JobStatusEnumClosed JobStatusEnum = "CLOSED" + JobStatusEnumDraft JobStatusEnum = "DRAFT" + JobStatusEnumArchived JobStatusEnum = "ARCHIVED" + JobStatusEnumPending JobStatusEnum = "PENDING" ) -func NewOfferStatusEnumFromString(s string) (OfferStatusEnum, error) { +func NewJobStatusEnumFromString(s string) (JobStatusEnum, error) { switch s { + case "OPEN": + return JobStatusEnumOpen, nil + case "CLOSED": + return JobStatusEnumClosed, nil case "DRAFT": - return OfferStatusEnumDraft, nil - case "APPROVAL-SENT": - return OfferStatusEnumApprovalSent, nil - case "APPROVED": - return OfferStatusEnumApproved, nil - case "SENT": - return OfferStatusEnumSent, nil - case "SENT-MANUALLY": - return OfferStatusEnumSentManually, nil - case "OPENED": - return OfferStatusEnumOpened, nil - case "DENIED": - return OfferStatusEnumDenied, nil - case "SIGNED": - return OfferStatusEnumSigned, nil - case "DEPRECATED": - return OfferStatusEnumDeprecated, nil + return JobStatusEnumDraft, nil + case "ARCHIVED": + return JobStatusEnumArchived, nil + case "PENDING": + return JobStatusEnumPending, nil } - var t OfferStatusEnum + var t JobStatusEnum return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (o OfferStatusEnum) Ptr() *OfferStatusEnum { - return &o +func (j JobStatusEnum) Ptr() *JobStatusEnum { + return &j } -// # The Office Object -// -// ### Description -// -// The `Office` object is used to represent an office within a company. A given `Job` has the `Office` ID in its offices field. -// -// ### Usage Example +// The job's type. // -// Fetch from the `LIST Offices` endpoint and view the offices within a company. -type Office struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The office's name. - Name *string `json:"name,omitempty"` - // The office's location. - Location *string `json:"location,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` - - _rawJSON json.RawMessage -} +// * `POSTING` - POSTING +// * `REQUISITION` - REQUISITION +// * `PROFILE` - PROFILE +type JobType struct { + JobTypeEnum JobTypeEnum + String string -func (o *Office) UnmarshalJSON(data []byte) error { - type unmarshaler Office - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *o = Office(value) - o._rawJSON = json.RawMessage(data) - return nil + typ string } -func (o *Office) String() string { - if len(o._rawJSON) > 0 { - if value, err := core.StringifyJSON(o._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(o); err == nil { - return value +func (j *JobType) GetJobTypeEnum() JobTypeEnum { + if j == nil { + return "" } - return fmt.Sprintf("%#v", o) -} - -// - `DEFINITELY_NO` - DEFINITELY_NO -// - `NO` - NO -// - `YES` - YES -// - `STRONG_YES` - STRONG_YES -// - `NO_DECISION` - NO_DECISION -type OverallRecommendationEnum string - -const ( - OverallRecommendationEnumDefinitelyNo OverallRecommendationEnum = "DEFINITELY_NO" - OverallRecommendationEnumNo OverallRecommendationEnum = "NO" - OverallRecommendationEnumYes OverallRecommendationEnum = "YES" - OverallRecommendationEnumStrongYes OverallRecommendationEnum = "STRONG_YES" - OverallRecommendationEnumNoDecision OverallRecommendationEnum = "NO_DECISION" -) - -func NewOverallRecommendationEnumFromString(s string) (OverallRecommendationEnum, error) { - switch s { - case "DEFINITELY_NO": - return OverallRecommendationEnumDefinitelyNo, nil - case "NO": - return OverallRecommendationEnumNo, nil - case "YES": - return OverallRecommendationEnumYes, nil - case "STRONG_YES": - return OverallRecommendationEnumStrongYes, nil - case "NO_DECISION": - return OverallRecommendationEnumNoDecision, nil - } - var t OverallRecommendationEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (o OverallRecommendationEnum) Ptr() *OverallRecommendationEnum { - return &o -} - -type PaginatedAccountDetailsAndActionsList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*AccountDetailsAndActions `json:"results,omitempty"` - - _rawJSON json.RawMessage + return j.JobTypeEnum } -func (p *PaginatedAccountDetailsAndActionsList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedAccountDetailsAndActionsList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (j *JobType) GetString() string { + if j == nil { + return "" } - *p = PaginatedAccountDetailsAndActionsList(value) - p._rawJSON = json.RawMessage(data) - return nil + return j.String } -func (p *PaginatedAccountDetailsAndActionsList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value +func (j *JobType) UnmarshalJSON(data []byte) error { + var valueJobTypeEnum JobTypeEnum + if err := json.Unmarshal(data, &valueJobTypeEnum); err == nil { + j.typ = "JobTypeEnum" + j.JobTypeEnum = valueJobTypeEnum + return nil } - return fmt.Sprintf("%#v", p) -} - -type PaginatedActivityList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Activity `json:"results,omitempty"` - - _rawJSON json.RawMessage -} - -func (p *PaginatedActivityList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedActivityList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + j.typ = "String" + j.String = valueString + return nil } - *p = PaginatedActivityList(value) - p._rawJSON = json.RawMessage(data) - return nil + return fmt.Errorf("%s cannot be deserialized as a %T", data, j) } -func (p *PaginatedActivityList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } +func (j JobType) MarshalJSON() ([]byte, error) { + if j.typ == "JobTypeEnum" || j.JobTypeEnum != "" { + return json.Marshal(j.JobTypeEnum) } - if value, err := core.StringifyJSON(p); err == nil { - return value + if j.typ == "String" || j.String != "" { + return json.Marshal(j.String) } - return fmt.Sprintf("%#v", p) -} - -type PaginatedApplicationList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Application `json:"results,omitempty"` - - _rawJSON json.RawMessage + return nil, fmt.Errorf("type %T does not include a non-empty union type", j) } -func (p *PaginatedApplicationList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedApplicationList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *p = PaginatedApplicationList(value) - p._rawJSON = json.RawMessage(data) - return nil +type JobTypeVisitor interface { + VisitJobTypeEnum(JobTypeEnum) error + VisitString(string) error } -func (p *PaginatedApplicationList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } +func (j *JobType) Accept(visitor JobTypeVisitor) error { + if j.typ == "JobTypeEnum" || j.JobTypeEnum != "" { + return visitor.VisitJobTypeEnum(j.JobTypeEnum) } - if value, err := core.StringifyJSON(p); err == nil { - return value + if j.typ == "String" || j.String != "" { + return visitor.VisitString(j.String) } - return fmt.Sprintf("%#v", p) + return fmt.Errorf("type %T does not include a non-empty union type", j) } -type PaginatedAttachmentList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Attachment `json:"results,omitempty"` +// * `POSTING` - POSTING +// * `REQUISITION` - REQUISITION +// * `PROFILE` - PROFILE +type JobTypeEnum string - _rawJSON json.RawMessage -} +const ( + JobTypeEnumPosting JobTypeEnum = "POSTING" + JobTypeEnumRequisition JobTypeEnum = "REQUISITION" + JobTypeEnumProfile JobTypeEnum = "PROFILE" +) -func (p *PaginatedAttachmentList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedAttachmentList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func NewJobTypeEnumFromString(s string) (JobTypeEnum, error) { + switch s { + case "POSTING": + return JobTypeEnumPosting, nil + case "REQUISITION": + return JobTypeEnumRequisition, nil + case "PROFILE": + return JobTypeEnumProfile, nil } - *p = PaginatedAttachmentList(value) - p._rawJSON = json.RawMessage(data) - return nil + var t JobTypeEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (p *PaginatedAttachmentList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) +func (j JobTypeEnum) Ptr() *JobTypeEnum { + return &j } -type PaginatedAuditLogEventList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*AuditLogEvent `json:"results,omitempty"` +// * `SYNCING` - SYNCING +// * `DONE` - DONE +// * `FAILED` - FAILED +// * `DISABLED` - DISABLED +// * `PAUSED` - PAUSED +// * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED +type LastSyncResultEnum string - _rawJSON json.RawMessage -} +const ( + LastSyncResultEnumSyncing LastSyncResultEnum = "SYNCING" + LastSyncResultEnumDone LastSyncResultEnum = "DONE" + LastSyncResultEnumFailed LastSyncResultEnum = "FAILED" + LastSyncResultEnumDisabled LastSyncResultEnum = "DISABLED" + LastSyncResultEnumPaused LastSyncResultEnum = "PAUSED" + LastSyncResultEnumPartiallySynced LastSyncResultEnum = "PARTIALLY_SYNCED" +) -func (p *PaginatedAuditLogEventList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedAuditLogEventList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func NewLastSyncResultEnumFromString(s string) (LastSyncResultEnum, error) { + switch s { + case "SYNCING": + return LastSyncResultEnumSyncing, nil + case "DONE": + return LastSyncResultEnumDone, nil + case "FAILED": + return LastSyncResultEnumFailed, nil + case "DISABLED": + return LastSyncResultEnumDisabled, nil + case "PAUSED": + return LastSyncResultEnumPaused, nil + case "PARTIALLY_SYNCED": + return LastSyncResultEnumPartiallySynced, nil } - *p = PaginatedAuditLogEventList(value) - p._rawJSON = json.RawMessage(data) - return nil + var t LastSyncResultEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (p *PaginatedAuditLogEventList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) +func (l LastSyncResultEnum) Ptr() *LastSyncResultEnum { + return &l } -type PaginatedCandidateList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Candidate `json:"results,omitempty"` +type LinkedAccountStatus struct { + LinkedAccountStatus string `json:"linked_account_status" url:"linked_account_status"` + CanMakeRequest bool `json:"can_make_request" url:"can_make_request"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (p *PaginatedCandidateList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedCandidateList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (l *LinkedAccountStatus) GetLinkedAccountStatus() string { + if l == nil { + return "" } - *p = PaginatedCandidateList(value) - p._rawJSON = json.RawMessage(data) - return nil + return l.LinkedAccountStatus } -func (p *PaginatedCandidateList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value +func (l *LinkedAccountStatus) GetCanMakeRequest() bool { + if l == nil { + return false } - return fmt.Sprintf("%#v", p) + return l.CanMakeRequest } -type PaginatedDepartmentList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Department `json:"results,omitempty"` - - _rawJSON json.RawMessage +func (l *LinkedAccountStatus) GetExtraProperties() map[string]interface{} { + return l.extraProperties } -func (p *PaginatedDepartmentList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedDepartmentList +func (l *LinkedAccountStatus) UnmarshalJSON(data []byte) error { + type unmarshaler LinkedAccountStatus var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err - } - *p = PaginatedDepartmentList(value) - p._rawJSON = json.RawMessage(data) - return nil -} - -func (p *PaginatedDepartmentList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) -} - -type PaginatedEeocList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Eeoc `json:"results,omitempty"` - - _rawJSON json.RawMessage -} - -func (p *PaginatedEeocList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedEeocList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { + } + *l = LinkedAccountStatus(value) + extraProperties, err := internal.ExtractExtraProperties(data, *l) + if err != nil { return err } - *p = PaginatedEeocList(value) - p._rawJSON = json.RawMessage(data) + l.extraProperties = extraProperties + l.rawJSON = json.RawMessage(data) return nil } -func (p *PaginatedEeocList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { +func (l *LinkedAccountStatus) String() string { + if len(l.rawJSON) > 0 { + if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(p); err == nil { + if value, err := internal.StringifyJSON(l); err == nil { return value } - return fmt.Sprintf("%#v", p) + return fmt.Sprintf("%#v", l) } -type PaginatedIssueList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Issue `json:"results,omitempty"` +type MetaResponse struct { + RequestSchema map[string]interface{} `json:"request_schema" url:"request_schema"` + RemoteFieldClasses map[string]interface{} `json:"remote_field_classes,omitempty" url:"remote_field_classes,omitempty"` + Status *LinkedAccountStatus `json:"status,omitempty" url:"status,omitempty"` + HasConditionalParams bool `json:"has_conditional_params" url:"has_conditional_params"` + HasRequiredLinkedAccountParams bool `json:"has_required_linked_account_params" url:"has_required_linked_account_params"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (p *PaginatedIssueList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedIssueList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (m *MetaResponse) GetRequestSchema() map[string]interface{} { + if m == nil { + return nil } - *p = PaginatedIssueList(value) - p._rawJSON = json.RawMessage(data) - return nil + return m.RequestSchema } -func (p *PaginatedIssueList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } +func (m *MetaResponse) GetRemoteFieldClasses() map[string]interface{} { + if m == nil { + return nil } - if value, err := core.StringifyJSON(p); err == nil { - return value + return m.RemoteFieldClasses +} + +func (m *MetaResponse) GetStatus() *LinkedAccountStatus { + if m == nil { + return nil } - return fmt.Sprintf("%#v", p) + return m.Status +} + +func (m *MetaResponse) GetHasConditionalParams() bool { + if m == nil { + return false + } + return m.HasConditionalParams } -type PaginatedJobInterviewStageList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*JobInterviewStage `json:"results,omitempty"` +func (m *MetaResponse) GetHasRequiredLinkedAccountParams() bool { + if m == nil { + return false + } + return m.HasRequiredLinkedAccountParams +} - _rawJSON json.RawMessage +func (m *MetaResponse) GetExtraProperties() map[string]interface{} { + return m.extraProperties } -func (p *PaginatedJobInterviewStageList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedJobInterviewStageList +func (m *MetaResponse) UnmarshalJSON(data []byte) error { + type unmarshaler MetaResponse var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *p = PaginatedJobInterviewStageList(value) - p._rawJSON = json.RawMessage(data) + *m = MetaResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *m) + if err != nil { + return err + } + m.extraProperties = extraProperties + m.rawJSON = json.RawMessage(data) return nil } -func (p *PaginatedJobInterviewStageList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { +func (m *MetaResponse) String() string { + if len(m.rawJSON) > 0 { + if value, err := internal.StringifyJSON(m.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(p); err == nil { + if value, err := internal.StringifyJSON(m); err == nil { return value } - return fmt.Sprintf("%#v", p) + return fmt.Sprintf("%#v", m) } -type PaginatedJobList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Job `json:"results,omitempty"` +// * `GET` - GET +// * `OPTIONS` - OPTIONS +// * `HEAD` - HEAD +// * `POST` - POST +// * `PUT` - PUT +// * `PATCH` - PATCH +// * `DELETE` - DELETE +type MethodEnum string - _rawJSON json.RawMessage -} +const ( + MethodEnumGet MethodEnum = "GET" + MethodEnumOptions MethodEnum = "OPTIONS" + MethodEnumHead MethodEnum = "HEAD" + MethodEnumPost MethodEnum = "POST" + MethodEnumPut MethodEnum = "PUT" + MethodEnumPatch MethodEnum = "PATCH" + MethodEnumDelete MethodEnum = "DELETE" +) -func (p *PaginatedJobList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedJobList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func NewMethodEnumFromString(s string) (MethodEnum, error) { + switch s { + case "GET": + return MethodEnumGet, nil + case "OPTIONS": + return MethodEnumOptions, nil + case "HEAD": + return MethodEnumHead, nil + case "POST": + return MethodEnumPost, nil + case "PUT": + return MethodEnumPut, nil + case "PATCH": + return MethodEnumPatch, nil + case "DELETE": + return MethodEnumDelete, nil } - *p = PaginatedJobList(value) - p._rawJSON = json.RawMessage(data) - return nil + var t MethodEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (p *PaginatedJobList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) +func (m MethodEnum) Ptr() *MethodEnum { + return &m } -type PaginatedJobPostingList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*JobPosting `json:"results,omitempty"` +// # The ModelOperation Object +// ### Description +// The `ModelOperation` object is used to represent the operations that are currently supported for a given model. +// +// ### Usage Example +// View what operations are supported for the `Candidate` endpoint. +type ModelOperation struct { + ModelName string `json:"model_name" url:"model_name"` + AvailableOperations []string `json:"available_operations" url:"available_operations"` + RequiredPostParameters []string `json:"required_post_parameters" url:"required_post_parameters"` + SupportedFields []string `json:"supported_fields" url:"supported_fields"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (p *PaginatedJobPostingList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedJobPostingList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (m *ModelOperation) GetModelName() string { + if m == nil { + return "" } - *p = PaginatedJobPostingList(value) - p._rawJSON = json.RawMessage(data) - return nil + return m.ModelName } -func (p *PaginatedJobPostingList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } +func (m *ModelOperation) GetAvailableOperations() []string { + if m == nil { + return nil } - if value, err := core.StringifyJSON(p); err == nil { - return value + return m.AvailableOperations +} + +func (m *ModelOperation) GetRequiredPostParameters() []string { + if m == nil { + return nil } - return fmt.Sprintf("%#v", p) + return m.RequiredPostParameters } -type PaginatedOfferList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Offer `json:"results,omitempty"` +func (m *ModelOperation) GetSupportedFields() []string { + if m == nil { + return nil + } + return m.SupportedFields +} - _rawJSON json.RawMessage +func (m *ModelOperation) GetExtraProperties() map[string]interface{} { + return m.extraProperties } -func (p *PaginatedOfferList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedOfferList +func (m *ModelOperation) UnmarshalJSON(data []byte) error { + type unmarshaler ModelOperation var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *p = PaginatedOfferList(value) - p._rawJSON = json.RawMessage(data) + *m = ModelOperation(value) + extraProperties, err := internal.ExtractExtraProperties(data, *m) + if err != nil { + return err + } + m.extraProperties = extraProperties + m.rawJSON = json.RawMessage(data) return nil } -func (p *PaginatedOfferList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { +func (m *ModelOperation) String() string { + if len(m.rawJSON) > 0 { + if value, err := internal.StringifyJSON(m.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(p); err == nil { + if value, err := internal.StringifyJSON(m); err == nil { return value } - return fmt.Sprintf("%#v", p) + return fmt.Sprintf("%#v", m) +} + +type ModelPermissionDeserializerRequest struct { + IsEnabled *bool `json:"is_enabled,omitempty" url:"is_enabled,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage } -type PaginatedOfficeList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Office `json:"results,omitempty"` +func (m *ModelPermissionDeserializerRequest) GetIsEnabled() *bool { + if m == nil { + return nil + } + return m.IsEnabled +} - _rawJSON json.RawMessage +func (m *ModelPermissionDeserializerRequest) GetExtraProperties() map[string]interface{} { + return m.extraProperties } -func (p *PaginatedOfficeList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedOfficeList +func (m *ModelPermissionDeserializerRequest) UnmarshalJSON(data []byte) error { + type unmarshaler ModelPermissionDeserializerRequest var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *p = PaginatedOfficeList(value) - p._rawJSON = json.RawMessage(data) + *m = ModelPermissionDeserializerRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *m) + if err != nil { + return err + } + m.extraProperties = extraProperties + m.rawJSON = json.RawMessage(data) return nil } -func (p *PaginatedOfficeList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { +func (m *ModelPermissionDeserializerRequest) String() string { + if len(m.rawJSON) > 0 { + if value, err := internal.StringifyJSON(m.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(p); err == nil { + if value, err := internal.StringifyJSON(m); err == nil { return value } - return fmt.Sprintf("%#v", p) + return fmt.Sprintf("%#v", m) } -type PaginatedRejectReasonList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*RejectReason `json:"results,omitempty"` +// # The MultipartFormField Object +// ### Description +// The `MultipartFormField` object is used to represent fields in an HTTP request using `multipart/form-data`. +// +// ### Usage Example +// Create a `MultipartFormField` to define a multipart form entry. +type MultipartFormFieldRequest struct { + // The name of the form field + Name string `json:"name" url:"name"` + // The data for the form field. + Data string `json:"data" url:"data"` + // The encoding of the value of `data`. Defaults to `RAW` if not defined. + // + // * `RAW` - RAW + // * `BASE64` - BASE64 + // * `GZIP_BASE64` - GZIP_BASE64 + Encoding *MultipartFormFieldRequestEncoding `json:"encoding,omitempty" url:"encoding,omitempty"` + // The file name of the form field, if the field is for a file. + FileName *string `json:"file_name,omitempty" url:"file_name,omitempty"` + // The MIME type of the file, if the field is for a file. + ContentType *string `json:"content_type,omitempty" url:"content_type,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} - _rawJSON json.RawMessage +func (m *MultipartFormFieldRequest) GetName() string { + if m == nil { + return "" + } + return m.Name } -func (p *PaginatedRejectReasonList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedRejectReasonList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (m *MultipartFormFieldRequest) GetData() string { + if m == nil { + return "" } - *p = PaginatedRejectReasonList(value) - p._rawJSON = json.RawMessage(data) - return nil + return m.Data } -func (p *PaginatedRejectReasonList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } +func (m *MultipartFormFieldRequest) GetEncoding() *MultipartFormFieldRequestEncoding { + if m == nil { + return nil } - if value, err := core.StringifyJSON(p); err == nil { - return value + return m.Encoding +} + +func (m *MultipartFormFieldRequest) GetFileName() *string { + if m == nil { + return nil } - return fmt.Sprintf("%#v", p) + return m.FileName } -type PaginatedRemoteUserList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*RemoteUser `json:"results,omitempty"` +func (m *MultipartFormFieldRequest) GetContentType() *string { + if m == nil { + return nil + } + return m.ContentType +} - _rawJSON json.RawMessage +func (m *MultipartFormFieldRequest) GetExtraProperties() map[string]interface{} { + return m.extraProperties } -func (p *PaginatedRemoteUserList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedRemoteUserList +func (m *MultipartFormFieldRequest) UnmarshalJSON(data []byte) error { + type unmarshaler MultipartFormFieldRequest var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *p = PaginatedRemoteUserList(value) - p._rawJSON = json.RawMessage(data) + *m = MultipartFormFieldRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *m) + if err != nil { + return err + } + m.extraProperties = extraProperties + m.rawJSON = json.RawMessage(data) return nil } -func (p *PaginatedRemoteUserList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { +func (m *MultipartFormFieldRequest) String() string { + if len(m.rawJSON) > 0 { + if value, err := internal.StringifyJSON(m.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(p); err == nil { + if value, err := internal.StringifyJSON(m); err == nil { return value } - return fmt.Sprintf("%#v", p) + return fmt.Sprintf("%#v", m) } -type PaginatedScheduledInterviewList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*ScheduledInterview `json:"results,omitempty"` +// The encoding of the value of `data`. Defaults to `RAW` if not defined. +// +// * `RAW` - RAW +// * `BASE64` - BASE64 +// * `GZIP_BASE64` - GZIP_BASE64 +type MultipartFormFieldRequestEncoding struct { + EncodingEnum EncodingEnum + String string - _rawJSON json.RawMessage + typ string } -func (p *PaginatedScheduledInterviewList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedScheduledInterviewList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (m *MultipartFormFieldRequestEncoding) GetEncodingEnum() EncodingEnum { + if m == nil { + return "" } - *p = PaginatedScheduledInterviewList(value) - p._rawJSON = json.RawMessage(data) - return nil + return m.EncodingEnum } -func (p *PaginatedScheduledInterviewList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } +func (m *MultipartFormFieldRequestEncoding) GetString() string { + if m == nil { + return "" } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) + return m.String } -type PaginatedScorecardList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Scorecard `json:"results,omitempty"` - - _rawJSON json.RawMessage +func (m *MultipartFormFieldRequestEncoding) UnmarshalJSON(data []byte) error { + var valueEncodingEnum EncodingEnum + if err := json.Unmarshal(data, &valueEncodingEnum); err == nil { + m.typ = "EncodingEnum" + m.EncodingEnum = valueEncodingEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + m.typ = "String" + m.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, m) } -func (p *PaginatedScorecardList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedScorecardList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (m MultipartFormFieldRequestEncoding) MarshalJSON() ([]byte, error) { + if m.typ == "EncodingEnum" || m.EncodingEnum != "" { + return json.Marshal(m.EncodingEnum) } - *p = PaginatedScorecardList(value) - p._rawJSON = json.RawMessage(data) - return nil + if m.typ == "String" || m.String != "" { + return json.Marshal(m.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", m) } -func (p *PaginatedScorecardList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } +type MultipartFormFieldRequestEncodingVisitor interface { + VisitEncodingEnum(EncodingEnum) error + VisitString(string) error +} + +func (m *MultipartFormFieldRequestEncoding) Accept(visitor MultipartFormFieldRequestEncodingVisitor) error { + if m.typ == "EncodingEnum" || m.EncodingEnum != "" { + return visitor.VisitEncodingEnum(m.EncodingEnum) } - if value, err := core.StringifyJSON(p); err == nil { - return value + if m.typ == "String" || m.String != "" { + return visitor.VisitString(m.String) } - return fmt.Sprintf("%#v", p) + return fmt.Errorf("type %T does not include a non-empty union type", m) } -type PaginatedScreeningQuestionList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*ScreeningQuestion `json:"results,omitempty"` +// # The Offer Object +// ### Description +// The `Offer` object is used to represent an offer for a candidate's application specific to a job. +// ### Usage Example +// Fetch from the `LIST Offers` endpoint and filter by `ID` to show all offers. +type Offer struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The application who is receiving the offer. + Application *OfferApplication `json:"application,omitempty" url:"application,omitempty"` + // The user who created the offer. + Creator *OfferCreator `json:"creator,omitempty" url:"creator,omitempty"` + // When the third party's offer was created. + RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty" url:"remote_created_at,omitempty"` + // When the offer was closed. + ClosedAt *time.Time `json:"closed_at,omitempty" url:"closed_at,omitempty"` + // When the offer was sent. + SentAt *time.Time `json:"sent_at,omitempty" url:"sent_at,omitempty"` + // The employment start date on the offer. + StartDate *time.Time `json:"start_date,omitempty" url:"start_date,omitempty"` + // The offer's status. + // + // * `DRAFT` - DRAFT + // * `APPROVAL-SENT` - APPROVAL-SENT + // * `APPROVED` - APPROVED + // * `SENT` - SENT + // * `SENT-MANUALLY` - SENT-MANUALLY + // * `OPENED` - OPENED + // * `DENIED` - DENIED + // * `SIGNED` - SIGNED + // * `DEPRECATED` - DEPRECATED + Status *OfferStatus `json:"status,omitempty" url:"status,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (p *PaginatedScreeningQuestionList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedScreeningQuestionList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (o *Offer) GetId() *string { + if o == nil { + return nil } - *p = PaginatedScreeningQuestionList(value) - p._rawJSON = json.RawMessage(data) - return nil + return o.Id } -func (p *PaginatedScreeningQuestionList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value +func (o *Offer) GetRemoteId() *string { + if o == nil { + return nil } - return fmt.Sprintf("%#v", p) + return o.RemoteId } -type PaginatedSyncStatusList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*SyncStatus `json:"results,omitempty"` - - _rawJSON json.RawMessage +func (o *Offer) GetCreatedAt() *time.Time { + if o == nil { + return nil + } + return o.CreatedAt } -func (p *PaginatedSyncStatusList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedSyncStatusList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (o *Offer) GetModifiedAt() *time.Time { + if o == nil { + return nil } - *p = PaginatedSyncStatusList(value) - p._rawJSON = json.RawMessage(data) - return nil + return o.ModifiedAt } -func (p *PaginatedSyncStatusList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value +func (o *Offer) GetApplication() *OfferApplication { + if o == nil { + return nil } - return fmt.Sprintf("%#v", p) + return o.Application } -type PaginatedTagList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Tag `json:"results,omitempty"` +func (o *Offer) GetCreator() *OfferCreator { + if o == nil { + return nil + } + return o.Creator +} - _rawJSON json.RawMessage +func (o *Offer) GetRemoteCreatedAt() *time.Time { + if o == nil { + return nil + } + return o.RemoteCreatedAt } -func (p *PaginatedTagList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedTagList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (o *Offer) GetClosedAt() *time.Time { + if o == nil { + return nil } - *p = PaginatedTagList(value) - p._rawJSON = json.RawMessage(data) - return nil + return o.ClosedAt } -func (p *PaginatedTagList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value +func (o *Offer) GetSentAt() *time.Time { + if o == nil { + return nil } - return fmt.Sprintf("%#v", p) + return o.SentAt } -// # The Candidate Object -// -// ### Description -// -// The `Candidate` object is used to represent profile information about a given Candidate. Because it is specific to a Candidate, this information stays constant across applications. -// -// ### Usage Example -// -// Fetch from the `LIST Candidates` endpoint and filter by `ID` to show all candidates. -type PatchedCandidateRequest struct { - // The candidate's first name. - FirstName *string `json:"first_name,omitempty"` - // The candidate's last name. - LastName *string `json:"last_name,omitempty"` - // The candidate's current company. - Company *string `json:"company,omitempty"` - // The candidate's current title. - Title *string `json:"title,omitempty"` - // When the most recent interaction with the candidate occurred. - LastInteractionAt *time.Time `json:"last_interaction_at,omitempty"` - // Whether or not the candidate is private. - IsPrivate *bool `json:"is_private,omitempty"` - // Whether or not the candidate can be emailed. - CanEmail *bool `json:"can_email,omitempty"` - // The candidate's locations. - Locations []*string `json:"locations,omitempty"` - PhoneNumbers []*PhoneNumberRequest `json:"phone_numbers,omitempty"` - EmailAddresses []*EmailAddressRequest `json:"email_addresses,omitempty"` - Urls []*UrlRequest `json:"urls,omitempty"` - // Array of `Tag` names as strings. - Tags []*string `json:"tags,omitempty"` - // Array of `Application` object IDs. - Applications []*string `json:"applications,omitempty"` - // Array of `Attachment` object IDs. - Attachments []*string `json:"attachments,omitempty"` - RemoteTemplateId *string `json:"remote_template_id,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` - - _rawJSON json.RawMessage +func (o *Offer) GetStartDate() *time.Time { + if o == nil { + return nil + } + return o.StartDate } -func (p *PatchedCandidateRequest) UnmarshalJSON(data []byte) error { - type unmarshaler PatchedCandidateRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (o *Offer) GetStatus() *OfferStatus { + if o == nil { + return nil } - *p = PatchedCandidateRequest(value) - p._rawJSON = json.RawMessage(data) - return nil + return o.Status } -func (p *PatchedCandidateRequest) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } +func (o *Offer) GetRemoteWasDeleted() *bool { + if o == nil { + return nil } - if value, err := core.StringifyJSON(p); err == nil { - return value + return o.RemoteWasDeleted +} + +func (o *Offer) GetFieldMappings() map[string]interface{} { + if o == nil { + return nil } - return fmt.Sprintf("%#v", p) + return o.FieldMappings } -// # The PhoneNumber Object -// -// ### Description -// -// The `PhoneNumber` object is used to represent a candidate's phone number. -// -// ### Usage Example -// -// Fetch from the `GET Candidate` endpoint and view their phone numbers. -type PhoneNumber struct { - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The phone number. - Value *string `json:"value,omitempty"` - // The type of phone number. - // - // - `HOME` - HOME - // - `WORK` - WORK - // - `MOBILE` - MOBILE - // - `SKYPE` - SKYPE - // - `OTHER` - OTHER - PhoneNumberType *PhoneNumberPhoneNumberType `json:"phone_number_type,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` +func (o *Offer) GetRemoteData() []*RemoteData { + if o == nil { + return nil + } + return o.RemoteData +} - _rawJSON json.RawMessage +func (o *Offer) GetExtraProperties() map[string]interface{} { + return o.extraProperties } -func (p *PhoneNumber) UnmarshalJSON(data []byte) error { - type unmarshaler PhoneNumber - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { +func (o *Offer) UnmarshalJSON(data []byte) error { + type embed Offer + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + ClosedAt *internal.DateTime `json:"closed_at,omitempty"` + SentAt *internal.DateTime `json:"sent_at,omitempty"` + StartDate *internal.DateTime `json:"start_date,omitempty"` + }{ + embed: embed(*o), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *o = Offer(unmarshaler.embed) + o.CreatedAt = unmarshaler.CreatedAt.TimePtr() + o.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + o.RemoteCreatedAt = unmarshaler.RemoteCreatedAt.TimePtr() + o.ClosedAt = unmarshaler.ClosedAt.TimePtr() + o.SentAt = unmarshaler.SentAt.TimePtr() + o.StartDate = unmarshaler.StartDate.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *o) + if err != nil { return err } - *p = PhoneNumber(value) - p._rawJSON = json.RawMessage(data) + o.extraProperties = extraProperties + o.rawJSON = json.RawMessage(data) return nil } -func (p *PhoneNumber) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { +func (o *Offer) MarshalJSON() ([]byte, error) { + type embed Offer + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + ClosedAt *internal.DateTime `json:"closed_at,omitempty"` + SentAt *internal.DateTime `json:"sent_at,omitempty"` + StartDate *internal.DateTime `json:"start_date,omitempty"` + }{ + embed: embed(*o), + CreatedAt: internal.NewOptionalDateTime(o.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(o.ModifiedAt), + RemoteCreatedAt: internal.NewOptionalDateTime(o.RemoteCreatedAt), + ClosedAt: internal.NewOptionalDateTime(o.ClosedAt), + SentAt: internal.NewOptionalDateTime(o.SentAt), + StartDate: internal.NewOptionalDateTime(o.StartDate), + } + return json.Marshal(marshaler) +} + +func (o *Offer) String() string { + if len(o.rawJSON) > 0 { + if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(p); err == nil { + if value, err := internal.StringifyJSON(o); err == nil { return value } - return fmt.Sprintf("%#v", p) + return fmt.Sprintf("%#v", o) } -// The type of phone number. -// -// - `HOME` - HOME -// - `WORK` - WORK -// - `MOBILE` - MOBILE -// - `SKYPE` - SKYPE -// - `OTHER` - OTHER -type PhoneNumberPhoneNumberType struct { - typeName string - PhoneNumberTypeEnum PhoneNumberTypeEnum - String string -} +// The application who is receiving the offer. +type OfferApplication struct { + String string + Application *Application -func NewPhoneNumberPhoneNumberTypeFromPhoneNumberTypeEnum(value PhoneNumberTypeEnum) *PhoneNumberPhoneNumberType { - return &PhoneNumberPhoneNumberType{typeName: "phoneNumberTypeEnum", PhoneNumberTypeEnum: value} + typ string } -func NewPhoneNumberPhoneNumberTypeFromString(value string) *PhoneNumberPhoneNumberType { - return &PhoneNumberPhoneNumberType{typeName: "string", String: value} +func (o *OfferApplication) GetString() string { + if o == nil { + return "" + } + return o.String } -func (p *PhoneNumberPhoneNumberType) UnmarshalJSON(data []byte) error { - var valuePhoneNumberTypeEnum PhoneNumberTypeEnum - if err := json.Unmarshal(data, &valuePhoneNumberTypeEnum); err == nil { - p.typeName = "phoneNumberTypeEnum" - p.PhoneNumberTypeEnum = valuePhoneNumberTypeEnum +func (o *OfferApplication) GetApplication() *Application { + if o == nil { return nil } + return o.Application +} + +func (o *OfferApplication) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" - p.String = valueString + o.typ = "String" + o.String = valueString return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, p) + valueApplication := new(Application) + if err := json.Unmarshal(data, &valueApplication); err == nil { + o.typ = "Application" + o.Application = valueApplication + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, o) } -func (p PhoneNumberPhoneNumberType) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "phoneNumberTypeEnum": - return json.Marshal(p.PhoneNumberTypeEnum) - case "string": - return json.Marshal(p.String) +func (o OfferApplication) MarshalJSON() ([]byte, error) { + if o.typ == "String" || o.String != "" { + return json.Marshal(o.String) + } + if o.typ == "Application" || o.Application != nil { + return json.Marshal(o.Application) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", o) } -type PhoneNumberPhoneNumberTypeVisitor interface { - VisitPhoneNumberTypeEnum(PhoneNumberTypeEnum) error +type OfferApplicationVisitor interface { VisitString(string) error + VisitApplication(*Application) error } -func (p *PhoneNumberPhoneNumberType) Accept(visitor PhoneNumberPhoneNumberTypeVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "phoneNumberTypeEnum": - return visitor.VisitPhoneNumberTypeEnum(p.PhoneNumberTypeEnum) - case "string": - return visitor.VisitString(p.String) +func (o *OfferApplication) Accept(visitor OfferApplicationVisitor) error { + if o.typ == "String" || o.String != "" { + return visitor.VisitString(o.String) + } + if o.typ == "Application" || o.Application != nil { + return visitor.VisitApplication(o.Application) } + return fmt.Errorf("type %T does not include a non-empty union type", o) } -// # The PhoneNumber Object -// -// ### Description -// -// The `PhoneNumber` object is used to represent a candidate's phone number. -// -// ### Usage Example -// -// Fetch from the `GET Candidate` endpoint and view their phone numbers. -type PhoneNumberRequest struct { - // The phone number. - Value *string `json:"value,omitempty"` - // The type of phone number. - // - // - `HOME` - HOME - // - `WORK` - WORK - // - `MOBILE` - MOBILE - // - `SKYPE` - SKYPE - // - `OTHER` - OTHER - PhoneNumberType *PhoneNumberRequestPhoneNumberType `json:"phone_number_type,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` +// The user who created the offer. +type OfferCreator struct { + String string + RemoteUser *RemoteUser - _rawJSON json.RawMessage + typ string } -func (p *PhoneNumberRequest) UnmarshalJSON(data []byte) error { - type unmarshaler PhoneNumberRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (o *OfferCreator) GetString() string { + if o == nil { + return "" } - *p = PhoneNumberRequest(value) - p._rawJSON = json.RawMessage(data) - return nil + return o.String } -func (p *PhoneNumberRequest) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value +func (o *OfferCreator) GetRemoteUser() *RemoteUser { + if o == nil { + return nil } - return fmt.Sprintf("%#v", p) -} - -// The type of phone number. -// -// - `HOME` - HOME -// - `WORK` - WORK -// - `MOBILE` - MOBILE -// - `SKYPE` - SKYPE -// - `OTHER` - OTHER -type PhoneNumberRequestPhoneNumberType struct { - typeName string - PhoneNumberTypeEnum PhoneNumberTypeEnum - String string -} - -func NewPhoneNumberRequestPhoneNumberTypeFromPhoneNumberTypeEnum(value PhoneNumberTypeEnum) *PhoneNumberRequestPhoneNumberType { - return &PhoneNumberRequestPhoneNumberType{typeName: "phoneNumberTypeEnum", PhoneNumberTypeEnum: value} -} - -func NewPhoneNumberRequestPhoneNumberTypeFromString(value string) *PhoneNumberRequestPhoneNumberType { - return &PhoneNumberRequestPhoneNumberType{typeName: "string", String: value} + return o.RemoteUser } -func (p *PhoneNumberRequestPhoneNumberType) UnmarshalJSON(data []byte) error { - var valuePhoneNumberTypeEnum PhoneNumberTypeEnum - if err := json.Unmarshal(data, &valuePhoneNumberTypeEnum); err == nil { - p.typeName = "phoneNumberTypeEnum" - p.PhoneNumberTypeEnum = valuePhoneNumberTypeEnum - return nil - } +func (o *OfferCreator) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" - p.String = valueString + o.typ = "String" + o.String = valueString return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, p) + valueRemoteUser := new(RemoteUser) + if err := json.Unmarshal(data, &valueRemoteUser); err == nil { + o.typ = "RemoteUser" + o.RemoteUser = valueRemoteUser + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, o) } -func (p PhoneNumberRequestPhoneNumberType) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "phoneNumberTypeEnum": - return json.Marshal(p.PhoneNumberTypeEnum) - case "string": - return json.Marshal(p.String) +func (o OfferCreator) MarshalJSON() ([]byte, error) { + if o.typ == "String" || o.String != "" { + return json.Marshal(o.String) + } + if o.typ == "RemoteUser" || o.RemoteUser != nil { + return json.Marshal(o.RemoteUser) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", o) } -type PhoneNumberRequestPhoneNumberTypeVisitor interface { - VisitPhoneNumberTypeEnum(PhoneNumberTypeEnum) error +type OfferCreatorVisitor interface { VisitString(string) error + VisitRemoteUser(*RemoteUser) error } -func (p *PhoneNumberRequestPhoneNumberType) Accept(visitor PhoneNumberRequestPhoneNumberTypeVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "phoneNumberTypeEnum": - return visitor.VisitPhoneNumberTypeEnum(p.PhoneNumberTypeEnum) - case "string": - return visitor.VisitString(p.String) +func (o *OfferCreator) Accept(visitor OfferCreatorVisitor) error { + if o.typ == "String" || o.String != "" { + return visitor.VisitString(o.String) + } + if o.typ == "RemoteUser" || o.RemoteUser != nil { + return visitor.VisitRemoteUser(o.RemoteUser) } + return fmt.Errorf("type %T does not include a non-empty union type", o) } -// - `HOME` - HOME -// - `WORK` - WORK -// - `MOBILE` - MOBILE -// - `SKYPE` - SKYPE -// - `OTHER` - OTHER -type PhoneNumberTypeEnum string +// The offer's status. +// +// * `DRAFT` - DRAFT +// * `APPROVAL-SENT` - APPROVAL-SENT +// * `APPROVED` - APPROVED +// * `SENT` - SENT +// * `SENT-MANUALLY` - SENT-MANUALLY +// * `OPENED` - OPENED +// * `DENIED` - DENIED +// * `SIGNED` - SIGNED +// * `DEPRECATED` - DEPRECATED +type OfferStatus struct { + OfferStatusEnum OfferStatusEnum + String string -const ( - PhoneNumberTypeEnumHome PhoneNumberTypeEnum = "HOME" - PhoneNumberTypeEnumWork PhoneNumberTypeEnum = "WORK" - PhoneNumberTypeEnumMobile PhoneNumberTypeEnum = "MOBILE" - PhoneNumberTypeEnumSkype PhoneNumberTypeEnum = "SKYPE" - PhoneNumberTypeEnumOther PhoneNumberTypeEnum = "OTHER" -) + typ string +} -func NewPhoneNumberTypeEnumFromString(s string) (PhoneNumberTypeEnum, error) { - switch s { - case "HOME": - return PhoneNumberTypeEnumHome, nil - case "WORK": - return PhoneNumberTypeEnumWork, nil - case "MOBILE": - return PhoneNumberTypeEnumMobile, nil - case "SKYPE": - return PhoneNumberTypeEnumSkype, nil - case "OTHER": - return PhoneNumberTypeEnumOther, nil +func (o *OfferStatus) GetOfferStatusEnum() OfferStatusEnum { + if o == nil { + return "" } - var t PhoneNumberTypeEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) + return o.OfferStatusEnum } -func (p PhoneNumberTypeEnum) Ptr() *PhoneNumberTypeEnum { - return &p +func (o *OfferStatus) GetString() string { + if o == nil { + return "" + } + return o.String } -// - `AMERICAN_INDIAN_OR_ALASKAN_NATIVE` - AMERICAN_INDIAN_OR_ALASKAN_NATIVE -// - `ASIAN` - ASIAN -// - `BLACK_OR_AFRICAN_AMERICAN` - BLACK_OR_AFRICAN_AMERICAN -// - `HISPANIC_OR_LATINO` - HISPANIC_OR_LATINO -// - `WHITE` - WHITE -// - `NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER` - NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER -// - `TWO_OR_MORE_RACES` - TWO_OR_MORE_RACES -// - `DECLINE_TO_SELF_IDENTIFY` - DECLINE_TO_SELF_IDENTIFY -type RaceEnum string +func (o *OfferStatus) UnmarshalJSON(data []byte) error { + var valueOfferStatusEnum OfferStatusEnum + if err := json.Unmarshal(data, &valueOfferStatusEnum); err == nil { + o.typ = "OfferStatusEnum" + o.OfferStatusEnum = valueOfferStatusEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + o.typ = "String" + o.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, o) +} -const ( - RaceEnumAmericanIndianOrAlaskanNative RaceEnum = "AMERICAN_INDIAN_OR_ALASKAN_NATIVE" - RaceEnumAsian RaceEnum = "ASIAN" - RaceEnumBlackOrAfricanAmerican RaceEnum = "BLACK_OR_AFRICAN_AMERICAN" - RaceEnumHispanicOrLatino RaceEnum = "HISPANIC_OR_LATINO" - RaceEnumWhite RaceEnum = "WHITE" - RaceEnumNativeHawaiianOrOtherPacificIslander RaceEnum = "NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER" - RaceEnumTwoOrMoreRaces RaceEnum = "TWO_OR_MORE_RACES" - RaceEnumDeclineToSelfIdentify RaceEnum = "DECLINE_TO_SELF_IDENTIFY" -) +func (o OfferStatus) MarshalJSON() ([]byte, error) { + if o.typ == "OfferStatusEnum" || o.OfferStatusEnum != "" { + return json.Marshal(o.OfferStatusEnum) + } + if o.typ == "String" || o.String != "" { + return json.Marshal(o.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", o) +} -func NewRaceEnumFromString(s string) (RaceEnum, error) { - switch s { - case "AMERICAN_INDIAN_OR_ALASKAN_NATIVE": - return RaceEnumAmericanIndianOrAlaskanNative, nil - case "ASIAN": - return RaceEnumAsian, nil - case "BLACK_OR_AFRICAN_AMERICAN": - return RaceEnumBlackOrAfricanAmerican, nil - case "HISPANIC_OR_LATINO": - return RaceEnumHispanicOrLatino, nil - case "WHITE": - return RaceEnumWhite, nil - case "NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER": - return RaceEnumNativeHawaiianOrOtherPacificIslander, nil - case "TWO_OR_MORE_RACES": - return RaceEnumTwoOrMoreRaces, nil - case "DECLINE_TO_SELF_IDENTIFY": - return RaceEnumDeclineToSelfIdentify, nil - } - var t RaceEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) +type OfferStatusVisitor interface { + VisitOfferStatusEnum(OfferStatusEnum) error + VisitString(string) error } -func (r RaceEnum) Ptr() *RaceEnum { - return &r +func (o *OfferStatus) Accept(visitor OfferStatusVisitor) error { + if o.typ == "OfferStatusEnum" || o.OfferStatusEnum != "" { + return visitor.VisitOfferStatusEnum(o.OfferStatusEnum) + } + if o.typ == "String" || o.String != "" { + return visitor.VisitString(o.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", o) } -// - `GENERAL_CUSTOMER_REQUEST` - GENERAL_CUSTOMER_REQUEST -// - `GDPR` - GDPR -// - `OTHER` - OTHER -type ReasonEnum string +// * `DRAFT` - DRAFT +// * `APPROVAL-SENT` - APPROVAL-SENT +// * `APPROVED` - APPROVED +// * `SENT` - SENT +// * `SENT-MANUALLY` - SENT-MANUALLY +// * `OPENED` - OPENED +// * `DENIED` - DENIED +// * `SIGNED` - SIGNED +// * `DEPRECATED` - DEPRECATED +type OfferStatusEnum string const ( - ReasonEnumGeneralCustomerRequest ReasonEnum = "GENERAL_CUSTOMER_REQUEST" - ReasonEnumGdpr ReasonEnum = "GDPR" - ReasonEnumOther ReasonEnum = "OTHER" + OfferStatusEnumDraft OfferStatusEnum = "DRAFT" + OfferStatusEnumApprovalSent OfferStatusEnum = "APPROVAL-SENT" + OfferStatusEnumApproved OfferStatusEnum = "APPROVED" + OfferStatusEnumSent OfferStatusEnum = "SENT" + OfferStatusEnumSentManually OfferStatusEnum = "SENT-MANUALLY" + OfferStatusEnumOpened OfferStatusEnum = "OPENED" + OfferStatusEnumDenied OfferStatusEnum = "DENIED" + OfferStatusEnumSigned OfferStatusEnum = "SIGNED" + OfferStatusEnumDeprecated OfferStatusEnum = "DEPRECATED" ) -func NewReasonEnumFromString(s string) (ReasonEnum, error) { +func NewOfferStatusEnumFromString(s string) (OfferStatusEnum, error) { switch s { - case "GENERAL_CUSTOMER_REQUEST": - return ReasonEnumGeneralCustomerRequest, nil - case "GDPR": - return ReasonEnumGdpr, nil - case "OTHER": - return ReasonEnumOther, nil + case "DRAFT": + return OfferStatusEnumDraft, nil + case "APPROVAL-SENT": + return OfferStatusEnumApprovalSent, nil + case "APPROVED": + return OfferStatusEnumApproved, nil + case "SENT": + return OfferStatusEnumSent, nil + case "SENT-MANUALLY": + return OfferStatusEnumSentManually, nil + case "OPENED": + return OfferStatusEnumOpened, nil + case "DENIED": + return OfferStatusEnumDenied, nil + case "SIGNED": + return OfferStatusEnumSigned, nil + case "DEPRECATED": + return OfferStatusEnumDeprecated, nil } - var t ReasonEnum + var t OfferStatusEnum return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (r ReasonEnum) Ptr() *ReasonEnum { - return &r +func (o OfferStatusEnum) Ptr() *OfferStatusEnum { + return &o } -// # The RejectReason Object -// +// # The Office Object // ### Description -// -// The `RejectReason` object is used to represent a reason for rejecting an application. These can typically be configured within an ATS system. -// +// The `Office` object is used to represent an office within a company. A given `Job` has the `Office` ID in its offices field. // ### Usage Example -// -// Fetch from the `LIST RejectReasons` endpoint and filter by `ID` to show all reasons. -type RejectReason struct { - Id *string `json:"id,omitempty"` +// Fetch from the `LIST Offices` endpoint and view the offices within a company. +type Office struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The rejection reason’s name. - Name *string `json:"name,omitempty"` + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The office's name. + Name *string `json:"name,omitempty" url:"name,omitempty"` + // The office's location. + Location *string `json:"location,omitempty" url:"location,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (r *RejectReason) UnmarshalJSON(data []byte) error { - type unmarshaler RejectReason - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (o *Office) GetId() *string { + if o == nil { + return nil } - *r = RejectReason(value) - r._rawJSON = json.RawMessage(data) - return nil + return o.Id } -func (r *RejectReason) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(r); err == nil { - return value +func (o *Office) GetRemoteId() *string { + if o == nil { + return nil } - return fmt.Sprintf("%#v", r) + return o.RemoteId } -// # The RemoteData Object -// -// ### Description -// -// The `RemoteData` object is used to represent the full data pulled from the third-party API for an object. -// -// ### Usage Example -// -// TODO -type RemoteData struct { - // The third-party API path that is being called. - Path string `json:"path"` - Data interface{} `json:"data,omitempty"` - - _rawJSON json.RawMessage +func (o *Office) GetCreatedAt() *time.Time { + if o == nil { + return nil + } + return o.CreatedAt } -func (r *RemoteData) UnmarshalJSON(data []byte) error { - type unmarshaler RemoteData - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (o *Office) GetModifiedAt() *time.Time { + if o == nil { + return nil } - *r = RemoteData(value) - r._rawJSON = json.RawMessage(data) - return nil + return o.ModifiedAt } -func (r *RemoteData) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(r); err == nil { - return value +func (o *Office) GetName() *string { + if o == nil { + return nil } - return fmt.Sprintf("%#v", r) + return o.Name } -type RemoteEndpointInfo struct { - Method string `json:"method"` - UrlPath string `json:"url_path"` - FieldTraversalPath []interface{} `json:"field_traversal_path,omitempty"` - - _rawJSON json.RawMessage +func (o *Office) GetLocation() *string { + if o == nil { + return nil + } + return o.Location } -func (r *RemoteEndpointInfo) UnmarshalJSON(data []byte) error { - type unmarshaler RemoteEndpointInfo - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (o *Office) GetRemoteWasDeleted() *bool { + if o == nil { + return nil } - *r = RemoteEndpointInfo(value) - r._rawJSON = json.RawMessage(data) - return nil + return o.RemoteWasDeleted } -func (r *RemoteEndpointInfo) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(r); err == nil { - return value +func (o *Office) GetFieldMappings() map[string]interface{} { + if o == nil { + return nil } - return fmt.Sprintf("%#v", r) + return o.FieldMappings } -type RemoteFieldApi struct { - Schema map[string]interface{} `json:"schema,omitempty"` - RemoteKeyName string `json:"remote_key_name"` - RemoteEndpointInfo *RemoteEndpointInfo `json:"remote_endpoint_info,omitempty"` - ExampleValues []interface{} `json:"example_values,omitempty"` - AdvancedMetadata *AdvancedMetadata `json:"advanced_metadata,omitempty"` - Coverage *RemoteFieldApiCoverage `json:"coverage,omitempty"` +func (o *Office) GetRemoteData() []*RemoteData { + if o == nil { + return nil + } + return o.RemoteData +} - _rawJSON json.RawMessage +func (o *Office) GetExtraProperties() map[string]interface{} { + return o.extraProperties } -func (r *RemoteFieldApi) UnmarshalJSON(data []byte) error { - type unmarshaler RemoteFieldApi - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { +func (o *Office) UnmarshalJSON(data []byte) error { + type embed Office + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*o), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *o = Office(unmarshaler.embed) + o.CreatedAt = unmarshaler.CreatedAt.TimePtr() + o.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *o) + if err != nil { return err } - *r = RemoteFieldApi(value) - r._rawJSON = json.RawMessage(data) + o.extraProperties = extraProperties + o.rawJSON = json.RawMessage(data) return nil } -func (r *RemoteFieldApi) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { +func (o *Office) MarshalJSON() ([]byte, error) { + type embed Office + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*o), + CreatedAt: internal.NewOptionalDateTime(o.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(o.ModifiedAt), + } + return json.Marshal(marshaler) +} + +func (o *Office) String() string { + if len(o.rawJSON) > 0 { + if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(r); err == nil { + if value, err := internal.StringifyJSON(o); err == nil { return value } - return fmt.Sprintf("%#v", r) -} - -type RemoteFieldApiCoverage struct { - typeName string - Integer int - Double float64 + return fmt.Sprintf("%#v", o) } -func NewRemoteFieldApiCoverageFromInteger(value int) *RemoteFieldApiCoverage { - return &RemoteFieldApiCoverage{typeName: "integer", Integer: value} -} +// # The PhoneNumber Object +// ### Description +// The `PhoneNumber` object is used to represent a candidate's phone number. +// ### Usage Example +// Fetch from the `GET Candidate` endpoint and view their phone numbers. +type PhoneNumber struct { + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The phone number. + Value *string `json:"value,omitempty" url:"value,omitempty"` + // The type of phone number. + // + // * `HOME` - HOME + // * `WORK` - WORK + // * `MOBILE` - MOBILE + // * `SKYPE` - SKYPE + // * `OTHER` - OTHER + PhoneNumberType *PhoneNumberPhoneNumberType `json:"phone_number_type,omitempty" url:"phone_number_type,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` -func NewRemoteFieldApiCoverageFromDouble(value float64) *RemoteFieldApiCoverage { - return &RemoteFieldApiCoverage{typeName: "double", Double: value} + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (r *RemoteFieldApiCoverage) UnmarshalJSON(data []byte) error { - var valueInteger int - if err := json.Unmarshal(data, &valueInteger); err == nil { - r.typeName = "integer" - r.Integer = valueInteger +func (p *PhoneNumber) GetCreatedAt() *time.Time { + if p == nil { return nil } - var valueDouble float64 - if err := json.Unmarshal(data, &valueDouble); err == nil { - r.typeName = "double" - r.Double = valueDouble + return p.CreatedAt +} + +func (p *PhoneNumber) GetModifiedAt() *time.Time { + if p == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, r) + return p.ModifiedAt } -func (r RemoteFieldApiCoverage) MarshalJSON() ([]byte, error) { - switch r.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", r.typeName, r) - case "integer": - return json.Marshal(r.Integer) - case "double": - return json.Marshal(r.Double) +func (p *PhoneNumber) GetValue() *string { + if p == nil { + return nil } + return p.Value } -type RemoteFieldApiCoverageVisitor interface { - VisitInteger(int) error - VisitDouble(float64) error +func (p *PhoneNumber) GetPhoneNumberType() *PhoneNumberPhoneNumberType { + if p == nil { + return nil + } + return p.PhoneNumberType } -func (r *RemoteFieldApiCoverage) Accept(visitor RemoteFieldApiCoverageVisitor) error { - switch r.typeName { - default: - return fmt.Errorf("invalid type %s in %T", r.typeName, r) - case "integer": - return visitor.VisitInteger(r.Integer) - case "double": - return visitor.VisitDouble(r.Double) +func (p *PhoneNumber) GetRemoteWasDeleted() *bool { + if p == nil { + return nil } + return p.RemoteWasDeleted } -type RemoteFieldApiResponse struct { - Activity []*RemoteFieldApi `json:"Activity,omitempty"` - Application []*RemoteFieldApi `json:"Application,omitempty"` - Attachment []*RemoteFieldApi `json:"Attachment,omitempty"` - Candidate []*RemoteFieldApi `json:"Candidate,omitempty"` - Department []*RemoteFieldApi `json:"Department,omitempty"` - Eeoc []*RemoteFieldApi `json:"EEOC,omitempty"` - ScheduledInterview []*RemoteFieldApi `json:"ScheduledInterview,omitempty"` - Job []*RemoteFieldApi `json:"Job,omitempty"` - JobPosting []*RemoteFieldApi `json:"JobPosting,omitempty"` - JobInterviewStage []*RemoteFieldApi `json:"JobInterviewStage,omitempty"` - Offer []*RemoteFieldApi `json:"Offer,omitempty"` - Office []*RemoteFieldApi `json:"Office,omitempty"` - RejectReason []*RemoteFieldApi `json:"RejectReason,omitempty"` - Scorecard []*RemoteFieldApi `json:"Scorecard,omitempty"` - Tag []*RemoteFieldApi `json:"Tag,omitempty"` - RemoteUser []*RemoteFieldApi `json:"RemoteUser,omitempty"` - - _rawJSON json.RawMessage +func (p *PhoneNumber) GetExtraProperties() map[string]interface{} { + return p.extraProperties } -func (r *RemoteFieldApiResponse) UnmarshalJSON(data []byte) error { - type unmarshaler RemoteFieldApiResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { +func (p *PhoneNumber) UnmarshalJSON(data []byte) error { + type embed PhoneNumber + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*p), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *p = PhoneNumber(unmarshaler.embed) + p.CreatedAt = unmarshaler.CreatedAt.TimePtr() + p.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { return err } - *r = RemoteFieldApiResponse(value) - r._rawJSON = json.RawMessage(data) + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) return nil } -func (r *RemoteFieldApiResponse) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { +func (p *PhoneNumber) MarshalJSON() ([]byte, error) { + type embed PhoneNumber + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*p), + CreatedAt: internal.NewOptionalDateTime(p.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(p.ModifiedAt), + } + return json.Marshal(marshaler) +} + +func (p *PhoneNumber) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(r); err == nil { + if value, err := internal.StringifyJSON(p); err == nil { return value } - return fmt.Sprintf("%#v", r) + return fmt.Sprintf("%#v", p) } -// # The RemoteKey Object -// -// ### Description -// -// The `RemoteKey` object is used to represent a request for a new remote key. -// -// ### Usage Example +// The type of phone number. // -// Post a `GenerateRemoteKey` to receive a new `RemoteKey`. -type RemoteKey struct { - Name string `json:"name"` - Key string `json:"key"` +// * `HOME` - HOME +// * `WORK` - WORK +// * `MOBILE` - MOBILE +// * `SKYPE` - SKYPE +// * `OTHER` - OTHER +type PhoneNumberPhoneNumberType struct { + PhoneNumberTypeEnum PhoneNumberTypeEnum + String string - _rawJSON json.RawMessage + typ string } -func (r *RemoteKey) UnmarshalJSON(data []byte) error { - type unmarshaler RemoteKey - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (p *PhoneNumberPhoneNumberType) GetPhoneNumberTypeEnum() PhoneNumberTypeEnum { + if p == nil { + return "" } - *r = RemoteKey(value) - r._rawJSON = json.RawMessage(data) - return nil + return p.PhoneNumberTypeEnum } -func (r *RemoteKey) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { - return value - } +func (p *PhoneNumberPhoneNumberType) GetString() string { + if p == nil { + return "" } - if value, err := core.StringifyJSON(r); err == nil { - return value + return p.String +} + +func (p *PhoneNumberPhoneNumberType) UnmarshalJSON(data []byte) error { + var valuePhoneNumberTypeEnum PhoneNumberTypeEnum + if err := json.Unmarshal(data, &valuePhoneNumberTypeEnum); err == nil { + p.typ = "PhoneNumberTypeEnum" + p.PhoneNumberTypeEnum = valuePhoneNumberTypeEnum + return nil } - return fmt.Sprintf("%#v", r) + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + p.typ = "String" + p.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, p) } -// # The RemoteResponse Object -// -// ### Description -// -// The `RemoteResponse` object is used to represent information returned from a third-party endpoint. -// -// ### Usage Example -// -// View the `RemoteResponse` returned from your `DataPassthrough`. -type RemoteResponse struct { - Method string `json:"method"` - Path string `json:"path"` - Status int `json:"status"` - Response interface{} `json:"response,omitempty"` - ResponseHeaders map[string]interface{} `json:"response_headers,omitempty"` - ResponseType *RemoteResponseResponseType `json:"response_type,omitempty"` - Headers map[string]interface{} `json:"headers,omitempty"` +func (p PhoneNumberPhoneNumberType) MarshalJSON() ([]byte, error) { + if p.typ == "PhoneNumberTypeEnum" || p.PhoneNumberTypeEnum != "" { + return json.Marshal(p.PhoneNumberTypeEnum) + } + if p.typ == "String" || p.String != "" { + return json.Marshal(p.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) +} - _rawJSON json.RawMessage +type PhoneNumberPhoneNumberTypeVisitor interface { + VisitPhoneNumberTypeEnum(PhoneNumberTypeEnum) error + VisitString(string) error } -func (r *RemoteResponse) UnmarshalJSON(data []byte) error { - type unmarshaler RemoteResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (p *PhoneNumberPhoneNumberType) Accept(visitor PhoneNumberPhoneNumberTypeVisitor) error { + if p.typ == "PhoneNumberTypeEnum" || p.PhoneNumberTypeEnum != "" { + return visitor.VisitPhoneNumberTypeEnum(p.PhoneNumberTypeEnum) } - *r = RemoteResponse(value) - r._rawJSON = json.RawMessage(data) - return nil + if p.typ == "String" || p.String != "" { + return visitor.VisitString(p.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", p) } -func (r *RemoteResponse) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(r); err == nil { - return value +// * `HOME` - HOME +// * `WORK` - WORK +// * `MOBILE` - MOBILE +// * `SKYPE` - SKYPE +// * `OTHER` - OTHER +type PhoneNumberTypeEnum string + +const ( + PhoneNumberTypeEnumHome PhoneNumberTypeEnum = "HOME" + PhoneNumberTypeEnumWork PhoneNumberTypeEnum = "WORK" + PhoneNumberTypeEnumMobile PhoneNumberTypeEnum = "MOBILE" + PhoneNumberTypeEnumSkype PhoneNumberTypeEnum = "SKYPE" + PhoneNumberTypeEnumOther PhoneNumberTypeEnum = "OTHER" +) + +func NewPhoneNumberTypeEnumFromString(s string) (PhoneNumberTypeEnum, error) { + switch s { + case "HOME": + return PhoneNumberTypeEnumHome, nil + case "WORK": + return PhoneNumberTypeEnumWork, nil + case "MOBILE": + return PhoneNumberTypeEnumMobile, nil + case "SKYPE": + return PhoneNumberTypeEnumSkype, nil + case "OTHER": + return PhoneNumberTypeEnumOther, nil } - return fmt.Sprintf("%#v", r) + var t PhoneNumberTypeEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (p PhoneNumberTypeEnum) Ptr() *PhoneNumberTypeEnum { + return &p } -type RemoteResponseResponseType struct { - typeName string - ResponseTypeEnum ResponseTypeEnum - String string +// # The RejectReason Object +// ### Description +// The `RejectReason` object is used to represent a reason for rejecting an application. These can typically be configured within an ATS system. +// ### Usage Example +// Fetch from the `LIST RejectReasons` endpoint and filter by `ID` to show all reasons. +type RejectReason struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The rejection reason’s name. + Name *string `json:"name,omitempty" url:"name,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func NewRemoteResponseResponseTypeFromResponseTypeEnum(value ResponseTypeEnum) *RemoteResponseResponseType { - return &RemoteResponseResponseType{typeName: "responseTypeEnum", ResponseTypeEnum: value} +func (r *RejectReason) GetId() *string { + if r == nil { + return nil + } + return r.Id } -func NewRemoteResponseResponseTypeFromString(value string) *RemoteResponseResponseType { - return &RemoteResponseResponseType{typeName: "string", String: value} +func (r *RejectReason) GetRemoteId() *string { + if r == nil { + return nil + } + return r.RemoteId } -func (r *RemoteResponseResponseType) UnmarshalJSON(data []byte) error { - var valueResponseTypeEnum ResponseTypeEnum - if err := json.Unmarshal(data, &valueResponseTypeEnum); err == nil { - r.typeName = "responseTypeEnum" - r.ResponseTypeEnum = valueResponseTypeEnum +func (r *RejectReason) GetCreatedAt() *time.Time { + if r == nil { return nil } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - r.typeName = "string" - r.String = valueString + return r.CreatedAt +} + +func (r *RejectReason) GetModifiedAt() *time.Time { + if r == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, r) + return r.ModifiedAt } -func (r RemoteResponseResponseType) MarshalJSON() ([]byte, error) { - switch r.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", r.typeName, r) - case "responseTypeEnum": - return json.Marshal(r.ResponseTypeEnum) - case "string": - return json.Marshal(r.String) +func (r *RejectReason) GetName() *string { + if r == nil { + return nil } + return r.Name } -type RemoteResponseResponseTypeVisitor interface { - VisitResponseTypeEnum(ResponseTypeEnum) error - VisitString(string) error +func (r *RejectReason) GetRemoteWasDeleted() *bool { + if r == nil { + return nil + } + return r.RemoteWasDeleted } -func (r *RemoteResponseResponseType) Accept(visitor RemoteResponseResponseTypeVisitor) error { - switch r.typeName { - default: - return fmt.Errorf("invalid type %s in %T", r.typeName, r) - case "responseTypeEnum": - return visitor.VisitResponseTypeEnum(r.ResponseTypeEnum) - case "string": - return visitor.VisitString(r.String) +func (r *RejectReason) GetFieldMappings() map[string]interface{} { + if r == nil { + return nil } + return r.FieldMappings } -// # The RemoteUser Object -// -// ### Description -// -// The `RemoteUser` object is used to represent a user with a login to the ATS system. -// -// ### Usage Example -// -// Fetch from the `LIST RemoteUsers` endpoint to show all users for a third party. -type RemoteUser struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The user's first name. - FirstName *string `json:"first_name,omitempty"` - // The user's last name. - LastName *string `json:"last_name,omitempty"` - // The user's email. - Email *string `json:"email,omitempty"` - // Whether the user's account had been disabled. - Disabled *bool `json:"disabled,omitempty"` - // When the third party's user was created. - RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty"` - // The user's role. - // - // - `SUPER_ADMIN` - SUPER_ADMIN - // - `ADMIN` - ADMIN - // - `TEAM_MEMBER` - TEAM_MEMBER - // - `LIMITED_TEAM_MEMBER` - LIMITED_TEAM_MEMBER - // - `INTERVIEWER` - INTERVIEWER - AccessRole *RemoteUserAccessRole `json:"access_role,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` +func (r *RejectReason) GetRemoteData() []*RemoteData { + if r == nil { + return nil + } + return r.RemoteData +} - _rawJSON json.RawMessage +func (r *RejectReason) GetExtraProperties() map[string]interface{} { + return r.extraProperties } -func (r *RemoteUser) UnmarshalJSON(data []byte) error { - type unmarshaler RemoteUser - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { +func (r *RejectReason) UnmarshalJSON(data []byte) error { + type embed RejectReason + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*r), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *r = RejectReason(unmarshaler.embed) + r.CreatedAt = unmarshaler.CreatedAt.TimePtr() + r.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { return err } - *r = RemoteUser(value) - r._rawJSON = json.RawMessage(data) + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) return nil } -func (r *RemoteUser) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { +func (r *RejectReason) MarshalJSON() ([]byte, error) { + type embed RejectReason + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*r), + CreatedAt: internal.NewOptionalDateTime(r.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(r.ModifiedAt), + } + return json.Marshal(marshaler) +} + +func (r *RejectReason) String() string { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(r); err == nil { + if value, err := internal.StringifyJSON(r); err == nil { return value } return fmt.Sprintf("%#v", r) } -// The user's role. +// # The RemoteData Object +// ### Description +// The `RemoteData` object is used to represent the full data pulled from the third-party API for an object. // -// - `SUPER_ADMIN` - SUPER_ADMIN -// - `ADMIN` - ADMIN -// - `TEAM_MEMBER` - TEAM_MEMBER -// - `LIMITED_TEAM_MEMBER` - LIMITED_TEAM_MEMBER -// - `INTERVIEWER` - INTERVIEWER -type RemoteUserAccessRole struct { - typeName string - AccessRoleEnum AccessRoleEnum - String string -} +// ### Usage Example +// TODO +type RemoteData struct { + // The third-party API path that is being called. + Path string `json:"path" url:"path"` + Data interface{} `json:"data,omitempty" url:"data,omitempty"` -func NewRemoteUserAccessRoleFromAccessRoleEnum(value AccessRoleEnum) *RemoteUserAccessRole { - return &RemoteUserAccessRole{typeName: "accessRoleEnum", AccessRoleEnum: value} + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func NewRemoteUserAccessRoleFromString(value string) *RemoteUserAccessRole { - return &RemoteUserAccessRole{typeName: "string", String: value} +func (r *RemoteData) GetPath() string { + if r == nil { + return "" + } + return r.Path } -func (r *RemoteUserAccessRole) UnmarshalJSON(data []byte) error { - var valueAccessRoleEnum AccessRoleEnum - if err := json.Unmarshal(data, &valueAccessRoleEnum); err == nil { - r.typeName = "accessRoleEnum" - r.AccessRoleEnum = valueAccessRoleEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - r.typeName = "string" - r.String = valueString +func (r *RemoteData) GetData() interface{} { + if r == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, r) + return r.Data } -func (r RemoteUserAccessRole) MarshalJSON() ([]byte, error) { - switch r.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", r.typeName, r) - case "accessRoleEnum": - return json.Marshal(r.AccessRoleEnum) - case "string": - return json.Marshal(r.String) - } +func (r *RemoteData) GetExtraProperties() map[string]interface{} { + return r.extraProperties } -type RemoteUserAccessRoleVisitor interface { - VisitAccessRoleEnum(AccessRoleEnum) error - VisitString(string) error +func (r *RemoteData) UnmarshalJSON(data []byte) error { + type unmarshaler RemoteData + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *r = RemoteData(value) + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { + return err + } + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) + return nil } -func (r *RemoteUserAccessRole) Accept(visitor RemoteUserAccessRoleVisitor) error { - switch r.typeName { - default: - return fmt.Errorf("invalid type %s in %T", r.typeName, r) - case "accessRoleEnum": - return visitor.VisitAccessRoleEnum(r.AccessRoleEnum) - case "string": - return visitor.VisitString(r.String) +func (r *RemoteData) String() string { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(r); err == nil { + return value } + return fmt.Sprintf("%#v", r) } -// - `JSON` - JSON -// - `XML` - XML -// - `MULTIPART` - MULTIPART -type RequestFormatEnum string - -const ( - RequestFormatEnumJson RequestFormatEnum = "JSON" - RequestFormatEnumXml RequestFormatEnum = "XML" - RequestFormatEnumMultipart RequestFormatEnum = "MULTIPART" -) +// # The RemoteKey Object +// ### Description +// The `RemoteKey` object is used to represent a request for a new remote key. +// +// ### Usage Example +// Post a `GenerateRemoteKey` to receive a new `RemoteKey`. +type RemoteKey struct { + Name string `json:"name" url:"name"` + Key string `json:"key" url:"key"` -func NewRequestFormatEnumFromString(s string) (RequestFormatEnum, error) { - switch s { - case "JSON": - return RequestFormatEnumJson, nil - case "XML": - return RequestFormatEnumXml, nil - case "MULTIPART": - return RequestFormatEnumMultipart, nil - } - var t RequestFormatEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (r RequestFormatEnum) Ptr() *RequestFormatEnum { - return &r +func (r *RemoteKey) GetName() string { + if r == nil { + return "" + } + return r.Name } -// - `JSON` - JSON -// - `BASE64_GZIP` - BASE64_GZIP -type ResponseTypeEnum string - -const ( - ResponseTypeEnumJson ResponseTypeEnum = "JSON" - ResponseTypeEnumBase64Gzip ResponseTypeEnum = "BASE64_GZIP" -) - -func NewResponseTypeEnumFromString(s string) (ResponseTypeEnum, error) { - switch s { - case "JSON": - return ResponseTypeEnumJson, nil - case "BASE64_GZIP": - return ResponseTypeEnumBase64Gzip, nil +func (r *RemoteKey) GetKey() string { + if r == nil { + return "" } - var t ResponseTypeEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) + return r.Key } -func (r ResponseTypeEnum) Ptr() *ResponseTypeEnum { - return &r +func (r *RemoteKey) GetExtraProperties() map[string]interface{} { + return r.extraProperties } -// - `ADMIN` - ADMIN -// - `DEVELOPER` - DEVELOPER -// - `MEMBER` - MEMBER -// - `API` - API -// - `SYSTEM` - SYSTEM -// - `MERGE_TEAM` - MERGE_TEAM -type RoleEnum string - -const ( - RoleEnumAdmin RoleEnum = "ADMIN" - RoleEnumDeveloper RoleEnum = "DEVELOPER" - RoleEnumMember RoleEnum = "MEMBER" - RoleEnumApi RoleEnum = "API" - RoleEnumSystem RoleEnum = "SYSTEM" - RoleEnumMergeTeam RoleEnum = "MERGE_TEAM" -) - -func NewRoleEnumFromString(s string) (RoleEnum, error) { - switch s { - case "ADMIN": - return RoleEnumAdmin, nil - case "DEVELOPER": - return RoleEnumDeveloper, nil - case "MEMBER": - return RoleEnumMember, nil - case "API": - return RoleEnumApi, nil - case "SYSTEM": - return RoleEnumSystem, nil - case "MERGE_TEAM": - return RoleEnumMergeTeam, nil - } - var t RoleEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) +func (r *RemoteKey) UnmarshalJSON(data []byte) error { + type unmarshaler RemoteKey + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *r = RemoteKey(value) + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { + return err + } + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) + return nil } -func (r RoleEnum) Ptr() *RoleEnum { - return &r +func (r *RemoteKey) String() string { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(r); err == nil { + return value + } + return fmt.Sprintf("%#v", r) } -// # The ScheduledInterview Object -// +// # The RemoteResponse Object // ### Description -// -// The `ScheduledInterview` object is used to represent a scheduled interview for a given candidate’s application to a job. An `Application` can have multiple `ScheduledInterview`s depending on the particular hiring process. +// The `RemoteResponse` object is used to represent information returned from a third-party endpoint. // // ### Usage Example -// -// Fetch from the `LIST ScheduledInterviews` endpoint and filter by `interviewers` to show all office locations. -type ScheduledInterview struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The application being interviewed. - Application *ScheduledInterviewApplication `json:"application,omitempty"` - // The stage of the interview. - JobInterviewStage *ScheduledInterviewJobInterviewStage `json:"job_interview_stage,omitempty"` - // The user organizing the interview. - Organizer *ScheduledInterviewOrganizer `json:"organizer,omitempty"` - // Array of `RemoteUser` IDs. - Interviewers []*ScheduledInterviewInterviewersItem `json:"interviewers,omitempty"` - // The interview's location. - Location *string `json:"location,omitempty"` - // When the interview was started. - StartAt *time.Time `json:"start_at,omitempty"` - // When the interview was ended. - EndAt *time.Time `json:"end_at,omitempty"` - // When the third party's interview was created. - RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty"` - // When the third party's interview was updated. - RemoteUpdatedAt *time.Time `json:"remote_updated_at,omitempty"` - // The interview's status. - // - // - `SCHEDULED` - SCHEDULED - // - `AWAITING_FEEDBACK` - AWAITING_FEEDBACK - // - `COMPLETE` - COMPLETE - Status *ScheduledInterviewStatus `json:"status,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` +// View the `RemoteResponse` returned from your `DataPassthrough`. +type RemoteResponse struct { + Method string `json:"method" url:"method"` + Path string `json:"path" url:"path"` + Status int `json:"status" url:"status"` + Response interface{} `json:"response" url:"response"` + ResponseHeaders map[string]interface{} `json:"response_headers,omitempty" url:"response_headers,omitempty"` + ResponseType *RemoteResponseResponseType `json:"response_type,omitempty" url:"response_type,omitempty"` + Headers map[string]interface{} `json:"headers,omitempty" url:"headers,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (s *ScheduledInterview) UnmarshalJSON(data []byte) error { - type unmarshaler ScheduledInterview - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (r *RemoteResponse) GetMethod() string { + if r == nil { + return "" } - *s = ScheduledInterview(value) - s._rawJSON = json.RawMessage(data) - return nil + return r.Method } -func (s *ScheduledInterview) String() string { - if len(s._rawJSON) > 0 { - if value, err := core.StringifyJSON(s._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(s); err == nil { - return value +func (r *RemoteResponse) GetPath() string { + if r == nil { + return "" } - return fmt.Sprintf("%#v", s) + return r.Path } -// The application being interviewed. -type ScheduledInterviewApplication struct { - typeName string - String string - Application *Application +func (r *RemoteResponse) GetStatus() int { + if r == nil { + return 0 + } + return r.Status } -func NewScheduledInterviewApplicationFromString(value string) *ScheduledInterviewApplication { - return &ScheduledInterviewApplication{typeName: "string", String: value} +func (r *RemoteResponse) GetResponse() interface{} { + if r == nil { + return nil + } + return r.Response } -func NewScheduledInterviewApplicationFromApplication(value *Application) *ScheduledInterviewApplication { - return &ScheduledInterviewApplication{typeName: "application", Application: value} +func (r *RemoteResponse) GetResponseHeaders() map[string]interface{} { + if r == nil { + return nil + } + return r.ResponseHeaders } -func (s *ScheduledInterviewApplication) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - s.typeName = "string" - s.String = valueString +func (r *RemoteResponse) GetResponseType() *RemoteResponseResponseType { + if r == nil { return nil } - valueApplication := new(Application) - if err := json.Unmarshal(data, &valueApplication); err == nil { - s.typeName = "application" - s.Application = valueApplication + return r.ResponseType +} + +func (r *RemoteResponse) GetHeaders() map[string]interface{} { + if r == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, s) + return r.Headers } -func (s ScheduledInterviewApplication) MarshalJSON() ([]byte, error) { - switch s.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", s.typeName, s) - case "string": - return json.Marshal(s.String) - case "application": - return json.Marshal(s.Application) +func (r *RemoteResponse) GetExtraProperties() map[string]interface{} { + return r.extraProperties +} + +func (r *RemoteResponse) UnmarshalJSON(data []byte) error { + type unmarshaler RemoteResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *r = RemoteResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { + return err } + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) + return nil } -type ScheduledInterviewApplicationVisitor interface { - VisitString(string) error - VisitApplication(*Application) error -} - -func (s *ScheduledInterviewApplication) Accept(visitor ScheduledInterviewApplicationVisitor) error { - switch s.typeName { - default: - return fmt.Errorf("invalid type %s in %T", s.typeName, s) - case "string": - return visitor.VisitString(s.String) - case "application": - return visitor.VisitApplication(s.Application) +func (r *RemoteResponse) String() string { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { + return value + } } + if value, err := internal.StringifyJSON(r); err == nil { + return value + } + return fmt.Sprintf("%#v", r) } -type ScheduledInterviewInterviewersItem struct { - typeName string - String string - RemoteUser *RemoteUser +type RemoteResponseResponseType struct { + ResponseTypeEnum ResponseTypeEnum + String string + + typ string } -func NewScheduledInterviewInterviewersItemFromString(value string) *ScheduledInterviewInterviewersItem { - return &ScheduledInterviewInterviewersItem{typeName: "string", String: value} +func (r *RemoteResponseResponseType) GetResponseTypeEnum() ResponseTypeEnum { + if r == nil { + return "" + } + return r.ResponseTypeEnum } -func NewScheduledInterviewInterviewersItemFromRemoteUser(value *RemoteUser) *ScheduledInterviewInterviewersItem { - return &ScheduledInterviewInterviewersItem{typeName: "remoteUser", RemoteUser: value} +func (r *RemoteResponseResponseType) GetString() string { + if r == nil { + return "" + } + return r.String } -func (s *ScheduledInterviewInterviewersItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - s.typeName = "string" - s.String = valueString +func (r *RemoteResponseResponseType) UnmarshalJSON(data []byte) error { + var valueResponseTypeEnum ResponseTypeEnum + if err := json.Unmarshal(data, &valueResponseTypeEnum); err == nil { + r.typ = "ResponseTypeEnum" + r.ResponseTypeEnum = valueResponseTypeEnum return nil } - valueRemoteUser := new(RemoteUser) - if err := json.Unmarshal(data, &valueRemoteUser); err == nil { - s.typeName = "remoteUser" - s.RemoteUser = valueRemoteUser + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + r.typ = "String" + r.String = valueString return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, s) + return fmt.Errorf("%s cannot be deserialized as a %T", data, r) } -func (s ScheduledInterviewInterviewersItem) MarshalJSON() ([]byte, error) { - switch s.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", s.typeName, s) - case "string": - return json.Marshal(s.String) - case "remoteUser": - return json.Marshal(s.RemoteUser) +func (r RemoteResponseResponseType) MarshalJSON() ([]byte, error) { + if r.typ == "ResponseTypeEnum" || r.ResponseTypeEnum != "" { + return json.Marshal(r.ResponseTypeEnum) + } + if r.typ == "String" || r.String != "" { + return json.Marshal(r.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", r) } -type ScheduledInterviewInterviewersItemVisitor interface { +type RemoteResponseResponseTypeVisitor interface { + VisitResponseTypeEnum(ResponseTypeEnum) error VisitString(string) error - VisitRemoteUser(*RemoteUser) error } -func (s *ScheduledInterviewInterviewersItem) Accept(visitor ScheduledInterviewInterviewersItemVisitor) error { - switch s.typeName { - default: - return fmt.Errorf("invalid type %s in %T", s.typeName, s) - case "string": - return visitor.VisitString(s.String) - case "remoteUser": - return visitor.VisitRemoteUser(s.RemoteUser) +func (r *RemoteResponseResponseType) Accept(visitor RemoteResponseResponseTypeVisitor) error { + if r.typ == "ResponseTypeEnum" || r.ResponseTypeEnum != "" { + return visitor.VisitResponseTypeEnum(r.ResponseTypeEnum) } + if r.typ == "String" || r.String != "" { + return visitor.VisitString(r.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", r) } -// The stage of the interview. -type ScheduledInterviewJobInterviewStage struct { - typeName string - String string - JobInterviewStage *JobInterviewStage -} - -func NewScheduledInterviewJobInterviewStageFromString(value string) *ScheduledInterviewJobInterviewStage { - return &ScheduledInterviewJobInterviewStage{typeName: "string", String: value} -} +// # The RemoteUser Object +// ### Description +// The `RemoteUser` object is used to represent a user with a login to the ATS system. +// ### Usage Example +// Fetch from the `LIST RemoteUsers` endpoint to show all users for a third party. +type RemoteUser struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The user's first name. + FirstName *string `json:"first_name,omitempty" url:"first_name,omitempty"` + // The user's last name. + LastName *string `json:"last_name,omitempty" url:"last_name,omitempty"` + // The user's email. + Email *string `json:"email,omitempty" url:"email,omitempty"` + // Whether the user's account had been disabled. + Disabled *bool `json:"disabled,omitempty" url:"disabled,omitempty"` + // When the third party's user was created. + RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty" url:"remote_created_at,omitempty"` + // The user's role. + // + // * `SUPER_ADMIN` - SUPER_ADMIN + // * `ADMIN` - ADMIN + // * `TEAM_MEMBER` - TEAM_MEMBER + // * `LIMITED_TEAM_MEMBER` - LIMITED_TEAM_MEMBER + // * `INTERVIEWER` - INTERVIEWER + AccessRole *RemoteUserAccessRole `json:"access_role,omitempty" url:"access_role,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` -func NewScheduledInterviewJobInterviewStageFromJobInterviewStage(value *JobInterviewStage) *ScheduledInterviewJobInterviewStage { - return &ScheduledInterviewJobInterviewStage{typeName: "jobInterviewStage", JobInterviewStage: value} + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (s *ScheduledInterviewJobInterviewStage) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - s.typeName = "string" - s.String = valueString +func (r *RemoteUser) GetId() *string { + if r == nil { return nil } - valueJobInterviewStage := new(JobInterviewStage) - if err := json.Unmarshal(data, &valueJobInterviewStage); err == nil { - s.typeName = "jobInterviewStage" - s.JobInterviewStage = valueJobInterviewStage + return r.Id +} + +func (r *RemoteUser) GetRemoteId() *string { + if r == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, s) + return r.RemoteId } -func (s ScheduledInterviewJobInterviewStage) MarshalJSON() ([]byte, error) { - switch s.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", s.typeName, s) - case "string": - return json.Marshal(s.String) - case "jobInterviewStage": - return json.Marshal(s.JobInterviewStage) +func (r *RemoteUser) GetCreatedAt() *time.Time { + if r == nil { + return nil } + return r.CreatedAt } -type ScheduledInterviewJobInterviewStageVisitor interface { - VisitString(string) error - VisitJobInterviewStage(*JobInterviewStage) error +func (r *RemoteUser) GetModifiedAt() *time.Time { + if r == nil { + return nil + } + return r.ModifiedAt } -func (s *ScheduledInterviewJobInterviewStage) Accept(visitor ScheduledInterviewJobInterviewStageVisitor) error { - switch s.typeName { - default: - return fmt.Errorf("invalid type %s in %T", s.typeName, s) - case "string": - return visitor.VisitString(s.String) - case "jobInterviewStage": - return visitor.VisitJobInterviewStage(s.JobInterviewStage) +func (r *RemoteUser) GetFirstName() *string { + if r == nil { + return nil } + return r.FirstName } -// The user organizing the interview. -type ScheduledInterviewOrganizer struct { - typeName string - String string - RemoteUser *RemoteUser +func (r *RemoteUser) GetLastName() *string { + if r == nil { + return nil + } + return r.LastName } -func NewScheduledInterviewOrganizerFromString(value string) *ScheduledInterviewOrganizer { - return &ScheduledInterviewOrganizer{typeName: "string", String: value} +func (r *RemoteUser) GetEmail() *string { + if r == nil { + return nil + } + return r.Email } -func NewScheduledInterviewOrganizerFromRemoteUser(value *RemoteUser) *ScheduledInterviewOrganizer { - return &ScheduledInterviewOrganizer{typeName: "remoteUser", RemoteUser: value} +func (r *RemoteUser) GetDisabled() *bool { + if r == nil { + return nil + } + return r.Disabled } -func (s *ScheduledInterviewOrganizer) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - s.typeName = "string" - s.String = valueString +func (r *RemoteUser) GetRemoteCreatedAt() *time.Time { + if r == nil { return nil } - valueRemoteUser := new(RemoteUser) - if err := json.Unmarshal(data, &valueRemoteUser); err == nil { - s.typeName = "remoteUser" - s.RemoteUser = valueRemoteUser + return r.RemoteCreatedAt +} + +func (r *RemoteUser) GetAccessRole() *RemoteUserAccessRole { + if r == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, s) + return r.AccessRole } -func (s ScheduledInterviewOrganizer) MarshalJSON() ([]byte, error) { - switch s.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", s.typeName, s) - case "string": - return json.Marshal(s.String) - case "remoteUser": - return json.Marshal(s.RemoteUser) +func (r *RemoteUser) GetRemoteWasDeleted() *bool { + if r == nil { + return nil } + return r.RemoteWasDeleted } -type ScheduledInterviewOrganizerVisitor interface { - VisitString(string) error - VisitRemoteUser(*RemoteUser) error +func (r *RemoteUser) GetFieldMappings() map[string]interface{} { + if r == nil { + return nil + } + return r.FieldMappings } -func (s *ScheduledInterviewOrganizer) Accept(visitor ScheduledInterviewOrganizerVisitor) error { - switch s.typeName { - default: - return fmt.Errorf("invalid type %s in %T", s.typeName, s) - case "string": - return visitor.VisitString(s.String) - case "remoteUser": - return visitor.VisitRemoteUser(s.RemoteUser) +func (r *RemoteUser) GetRemoteData() []*RemoteData { + if r == nil { + return nil } + return r.RemoteData } -// # The ScheduledInterview Object -// -// ### Description -// -// The `ScheduledInterview` object is used to represent a scheduled interview for a given candidate’s application to a job. An `Application` can have multiple `ScheduledInterview`s depending on the particular hiring process. -// -// ### Usage Example -// -// Fetch from the `LIST ScheduledInterviews` endpoint and filter by `interviewers` to show all office locations. -type ScheduledInterviewRequest struct { - // The application being interviewed. - Application *ScheduledInterviewRequestApplication `json:"application,omitempty"` - // The stage of the interview. - JobInterviewStage *ScheduledInterviewRequestJobInterviewStage `json:"job_interview_stage,omitempty"` - // The user organizing the interview. - Organizer *ScheduledInterviewRequestOrganizer `json:"organizer,omitempty"` - // Array of `RemoteUser` IDs. - Interviewers []*ScheduledInterviewRequestInterviewersItem `json:"interviewers,omitempty"` - // The interview's location. - Location *string `json:"location,omitempty"` - // When the interview was started. - StartAt *time.Time `json:"start_at,omitempty"` - // When the interview was ended. - EndAt *time.Time `json:"end_at,omitempty"` - // The interview's status. - // - // - `SCHEDULED` - SCHEDULED - // - `AWAITING_FEEDBACK` - AWAITING_FEEDBACK - // - `COMPLETE` - COMPLETE - Status *ScheduledInterviewRequestStatus `json:"status,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` - - _rawJSON json.RawMessage +func (r *RemoteUser) GetExtraProperties() map[string]interface{} { + return r.extraProperties } -func (s *ScheduledInterviewRequest) UnmarshalJSON(data []byte) error { - type unmarshaler ScheduledInterviewRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { +func (r *RemoteUser) UnmarshalJSON(data []byte) error { + type embed RemoteUser + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + }{ + embed: embed(*r), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { return err } - *s = ScheduledInterviewRequest(value) - s._rawJSON = json.RawMessage(data) + *r = RemoteUser(unmarshaler.embed) + r.CreatedAt = unmarshaler.CreatedAt.TimePtr() + r.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + r.RemoteCreatedAt = unmarshaler.RemoteCreatedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { + return err + } + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) return nil } -func (s *ScheduledInterviewRequest) String() string { - if len(s._rawJSON) > 0 { - if value, err := core.StringifyJSON(s._rawJSON); err == nil { +func (r *RemoteUser) MarshalJSON() ([]byte, error) { + type embed RemoteUser + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + }{ + embed: embed(*r), + CreatedAt: internal.NewOptionalDateTime(r.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(r.ModifiedAt), + RemoteCreatedAt: internal.NewOptionalDateTime(r.RemoteCreatedAt), + } + return json.Marshal(marshaler) +} + +func (r *RemoteUser) String() string { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(s); err == nil { + if value, err := internal.StringifyJSON(r); err == nil { return value } - return fmt.Sprintf("%#v", s) -} - -// The application being interviewed. -type ScheduledInterviewRequestApplication struct { - typeName string - String string - Application *Application + return fmt.Sprintf("%#v", r) } -func NewScheduledInterviewRequestApplicationFromString(value string) *ScheduledInterviewRequestApplication { - return &ScheduledInterviewRequestApplication{typeName: "string", String: value} -} +// The user's role. +// +// * `SUPER_ADMIN` - SUPER_ADMIN +// * `ADMIN` - ADMIN +// * `TEAM_MEMBER` - TEAM_MEMBER +// * `LIMITED_TEAM_MEMBER` - LIMITED_TEAM_MEMBER +// * `INTERVIEWER` - INTERVIEWER +type RemoteUserAccessRole struct { + AccessRoleEnum AccessRoleEnum + String string -func NewScheduledInterviewRequestApplicationFromApplication(value *Application) *ScheduledInterviewRequestApplication { - return &ScheduledInterviewRequestApplication{typeName: "application", Application: value} + typ string } -func (s *ScheduledInterviewRequestApplication) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - s.typeName = "string" - s.String = valueString - return nil - } - valueApplication := new(Application) - if err := json.Unmarshal(data, &valueApplication); err == nil { - s.typeName = "application" - s.Application = valueApplication - return nil +func (r *RemoteUserAccessRole) GetAccessRoleEnum() AccessRoleEnum { + if r == nil { + return "" } - return fmt.Errorf("%s cannot be deserialized as a %T", data, s) + return r.AccessRoleEnum } -func (s ScheduledInterviewRequestApplication) MarshalJSON() ([]byte, error) { - switch s.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", s.typeName, s) - case "string": - return json.Marshal(s.String) - case "application": - return json.Marshal(s.Application) +func (r *RemoteUserAccessRole) GetString() string { + if r == nil { + return "" } + return r.String } -type ScheduledInterviewRequestApplicationVisitor interface { - VisitString(string) error - VisitApplication(*Application) error -} - -func (s *ScheduledInterviewRequestApplication) Accept(visitor ScheduledInterviewRequestApplicationVisitor) error { - switch s.typeName { - default: - return fmt.Errorf("invalid type %s in %T", s.typeName, s) - case "string": - return visitor.VisitString(s.String) - case "application": - return visitor.VisitApplication(s.Application) +func (r *RemoteUserAccessRole) UnmarshalJSON(data []byte) error { + var valueAccessRoleEnum AccessRoleEnum + if err := json.Unmarshal(data, &valueAccessRoleEnum); err == nil { + r.typ = "AccessRoleEnum" + r.AccessRoleEnum = valueAccessRoleEnum + return nil } -} - -type ScheduledInterviewRequestInterviewersItem struct { - typeName string - String string - RemoteUser *RemoteUser -} - -func NewScheduledInterviewRequestInterviewersItemFromString(value string) *ScheduledInterviewRequestInterviewersItem { - return &ScheduledInterviewRequestInterviewersItem{typeName: "string", String: value} -} - -func NewScheduledInterviewRequestInterviewersItemFromRemoteUser(value *RemoteUser) *ScheduledInterviewRequestInterviewersItem { - return &ScheduledInterviewRequestInterviewersItem{typeName: "remoteUser", RemoteUser: value} -} - -func (s *ScheduledInterviewRequestInterviewersItem) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - s.typeName = "string" - s.String = valueString - return nil - } - valueRemoteUser := new(RemoteUser) - if err := json.Unmarshal(data, &valueRemoteUser); err == nil { - s.typeName = "remoteUser" - s.RemoteUser = valueRemoteUser + r.typ = "String" + r.String = valueString return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, s) + return fmt.Errorf("%s cannot be deserialized as a %T", data, r) } -func (s ScheduledInterviewRequestInterviewersItem) MarshalJSON() ([]byte, error) { - switch s.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", s.typeName, s) - case "string": - return json.Marshal(s.String) - case "remoteUser": - return json.Marshal(s.RemoteUser) +func (r RemoteUserAccessRole) MarshalJSON() ([]byte, error) { + if r.typ == "AccessRoleEnum" || r.AccessRoleEnum != "" { + return json.Marshal(r.AccessRoleEnum) + } + if r.typ == "String" || r.String != "" { + return json.Marshal(r.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", r) } -type ScheduledInterviewRequestInterviewersItemVisitor interface { +type RemoteUserAccessRoleVisitor interface { + VisitAccessRoleEnum(AccessRoleEnum) error VisitString(string) error - VisitRemoteUser(*RemoteUser) error } -func (s *ScheduledInterviewRequestInterviewersItem) Accept(visitor ScheduledInterviewRequestInterviewersItemVisitor) error { - switch s.typeName { - default: - return fmt.Errorf("invalid type %s in %T", s.typeName, s) - case "string": - return visitor.VisitString(s.String) - case "remoteUser": - return visitor.VisitRemoteUser(s.RemoteUser) +func (r *RemoteUserAccessRole) Accept(visitor RemoteUserAccessRoleVisitor) error { + if r.typ == "AccessRoleEnum" || r.AccessRoleEnum != "" { + return visitor.VisitAccessRoleEnum(r.AccessRoleEnum) + } + if r.typ == "String" || r.String != "" { + return visitor.VisitString(r.String) } + return fmt.Errorf("type %T does not include a non-empty union type", r) } -// The stage of the interview. -type ScheduledInterviewRequestJobInterviewStage struct { - typeName string - String string - JobInterviewStage *JobInterviewStage +// * `JSON` - JSON +// * `XML` - XML +// * `MULTIPART` - MULTIPART +type RequestFormatEnum string + +const ( + RequestFormatEnumJson RequestFormatEnum = "JSON" + RequestFormatEnumXml RequestFormatEnum = "XML" + RequestFormatEnumMultipart RequestFormatEnum = "MULTIPART" +) + +func NewRequestFormatEnumFromString(s string) (RequestFormatEnum, error) { + switch s { + case "JSON": + return RequestFormatEnumJson, nil + case "XML": + return RequestFormatEnumXml, nil + case "MULTIPART": + return RequestFormatEnumMultipart, nil + } + var t RequestFormatEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -func NewScheduledInterviewRequestJobInterviewStageFromString(value string) *ScheduledInterviewRequestJobInterviewStage { - return &ScheduledInterviewRequestJobInterviewStage{typeName: "string", String: value} +func (r RequestFormatEnum) Ptr() *RequestFormatEnum { + return &r } -func NewScheduledInterviewRequestJobInterviewStageFromJobInterviewStage(value *JobInterviewStage) *ScheduledInterviewRequestJobInterviewStage { - return &ScheduledInterviewRequestJobInterviewStage{typeName: "jobInterviewStage", JobInterviewStage: value} -} +// * `JSON` - JSON +// * `BASE64_GZIP` - BASE64_GZIP +type ResponseTypeEnum string -func (s *ScheduledInterviewRequestJobInterviewStage) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - s.typeName = "string" - s.String = valueString - return nil - } - valueJobInterviewStage := new(JobInterviewStage) - if err := json.Unmarshal(data, &valueJobInterviewStage); err == nil { - s.typeName = "jobInterviewStage" - s.JobInterviewStage = valueJobInterviewStage - return nil +const ( + ResponseTypeEnumJson ResponseTypeEnum = "JSON" + ResponseTypeEnumBase64Gzip ResponseTypeEnum = "BASE64_GZIP" +) + +func NewResponseTypeEnumFromString(s string) (ResponseTypeEnum, error) { + switch s { + case "JSON": + return ResponseTypeEnumJson, nil + case "BASE64_GZIP": + return ResponseTypeEnumBase64Gzip, nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, s) + var t ResponseTypeEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (s ScheduledInterviewRequestJobInterviewStage) MarshalJSON() ([]byte, error) { - switch s.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", s.typeName, s) - case "string": - return json.Marshal(s.String) - case "jobInterviewStage": - return json.Marshal(s.JobInterviewStage) - } +func (r ResponseTypeEnum) Ptr() *ResponseTypeEnum { + return &r } -type ScheduledInterviewRequestJobInterviewStageVisitor interface { - VisitString(string) error - VisitJobInterviewStage(*JobInterviewStage) error +// # The ScheduledInterview Object +// ### Description +// The `ScheduledInterview` object is used to represent a scheduled interview for a given candidate’s application to a job. An `Application` can have multiple `ScheduledInterview`s depending on the particular hiring process. +// ### Usage Example +// Fetch from the `LIST ScheduledInterviews` endpoint and filter by `interviewers` to show all office locations. +type ScheduledInterview struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The application being interviewed. + Application *ScheduledInterviewApplication `json:"application,omitempty" url:"application,omitempty"` + // The stage of the interview. + JobInterviewStage *ScheduledInterviewJobInterviewStage `json:"job_interview_stage,omitempty" url:"job_interview_stage,omitempty"` + // The user organizing the interview. + Organizer *ScheduledInterviewOrganizer `json:"organizer,omitempty" url:"organizer,omitempty"` + // Array of `RemoteUser` IDs. + Interviewers []*ScheduledInterviewInterviewersItem `json:"interviewers,omitempty" url:"interviewers,omitempty"` + // The interview's location. + Location *string `json:"location,omitempty" url:"location,omitempty"` + // When the interview was started. + StartAt *time.Time `json:"start_at,omitempty" url:"start_at,omitempty"` + // When the interview was ended. + EndAt *time.Time `json:"end_at,omitempty" url:"end_at,omitempty"` + // When the third party's interview was created. + RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty" url:"remote_created_at,omitempty"` + // When the third party's interview was updated. + RemoteUpdatedAt *time.Time `json:"remote_updated_at,omitempty" url:"remote_updated_at,omitempty"` + // The interview's status. + // + // * `SCHEDULED` - SCHEDULED + // * `AWAITING_FEEDBACK` - AWAITING_FEEDBACK + // * `COMPLETE` - COMPLETE + Status *ScheduledInterviewStatus `json:"status,omitempty" url:"status,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (s *ScheduledInterviewRequestJobInterviewStage) Accept(visitor ScheduledInterviewRequestJobInterviewStageVisitor) error { - switch s.typeName { - default: - return fmt.Errorf("invalid type %s in %T", s.typeName, s) - case "string": - return visitor.VisitString(s.String) - case "jobInterviewStage": - return visitor.VisitJobInterviewStage(s.JobInterviewStage) +func (s *ScheduledInterview) GetId() *string { + if s == nil { + return nil } + return s.Id } -// The user organizing the interview. -type ScheduledInterviewRequestOrganizer struct { - typeName string - String string - RemoteUser *RemoteUser +func (s *ScheduledInterview) GetRemoteId() *string { + if s == nil { + return nil + } + return s.RemoteId } -func NewScheduledInterviewRequestOrganizerFromString(value string) *ScheduledInterviewRequestOrganizer { - return &ScheduledInterviewRequestOrganizer{typeName: "string", String: value} +func (s *ScheduledInterview) GetCreatedAt() *time.Time { + if s == nil { + return nil + } + return s.CreatedAt } -func NewScheduledInterviewRequestOrganizerFromRemoteUser(value *RemoteUser) *ScheduledInterviewRequestOrganizer { - return &ScheduledInterviewRequestOrganizer{typeName: "remoteUser", RemoteUser: value} +func (s *ScheduledInterview) GetModifiedAt() *time.Time { + if s == nil { + return nil + } + return s.ModifiedAt } -func (s *ScheduledInterviewRequestOrganizer) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - s.typeName = "string" - s.String = valueString +func (s *ScheduledInterview) GetApplication() *ScheduledInterviewApplication { + if s == nil { return nil } - valueRemoteUser := new(RemoteUser) - if err := json.Unmarshal(data, &valueRemoteUser); err == nil { - s.typeName = "remoteUser" - s.RemoteUser = valueRemoteUser + return s.Application +} + +func (s *ScheduledInterview) GetJobInterviewStage() *ScheduledInterviewJobInterviewStage { + if s == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, s) + return s.JobInterviewStage } -func (s ScheduledInterviewRequestOrganizer) MarshalJSON() ([]byte, error) { - switch s.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", s.typeName, s) - case "string": - return json.Marshal(s.String) - case "remoteUser": - return json.Marshal(s.RemoteUser) +func (s *ScheduledInterview) GetOrganizer() *ScheduledInterviewOrganizer { + if s == nil { + return nil } + return s.Organizer } -type ScheduledInterviewRequestOrganizerVisitor interface { - VisitString(string) error - VisitRemoteUser(*RemoteUser) error +func (s *ScheduledInterview) GetInterviewers() []*ScheduledInterviewInterviewersItem { + if s == nil { + return nil + } + return s.Interviewers } -func (s *ScheduledInterviewRequestOrganizer) Accept(visitor ScheduledInterviewRequestOrganizerVisitor) error { - switch s.typeName { - default: - return fmt.Errorf("invalid type %s in %T", s.typeName, s) - case "string": - return visitor.VisitString(s.String) - case "remoteUser": - return visitor.VisitRemoteUser(s.RemoteUser) +func (s *ScheduledInterview) GetLocation() *string { + if s == nil { + return nil } + return s.Location } -// The interview's status. -// -// - `SCHEDULED` - SCHEDULED -// - `AWAITING_FEEDBACK` - AWAITING_FEEDBACK -// - `COMPLETE` - COMPLETE -type ScheduledInterviewRequestStatus struct { - typeName string - ScheduledInterviewStatusEnum ScheduledInterviewStatusEnum - String string +func (s *ScheduledInterview) GetStartAt() *time.Time { + if s == nil { + return nil + } + return s.StartAt } -func NewScheduledInterviewRequestStatusFromScheduledInterviewStatusEnum(value ScheduledInterviewStatusEnum) *ScheduledInterviewRequestStatus { - return &ScheduledInterviewRequestStatus{typeName: "scheduledInterviewStatusEnum", ScheduledInterviewStatusEnum: value} +func (s *ScheduledInterview) GetEndAt() *time.Time { + if s == nil { + return nil + } + return s.EndAt } -func NewScheduledInterviewRequestStatusFromString(value string) *ScheduledInterviewRequestStatus { - return &ScheduledInterviewRequestStatus{typeName: "string", String: value} +func (s *ScheduledInterview) GetRemoteCreatedAt() *time.Time { + if s == nil { + return nil + } + return s.RemoteCreatedAt } -func (s *ScheduledInterviewRequestStatus) UnmarshalJSON(data []byte) error { - var valueScheduledInterviewStatusEnum ScheduledInterviewStatusEnum - if err := json.Unmarshal(data, &valueScheduledInterviewStatusEnum); err == nil { - s.typeName = "scheduledInterviewStatusEnum" - s.ScheduledInterviewStatusEnum = valueScheduledInterviewStatusEnum +func (s *ScheduledInterview) GetRemoteUpdatedAt() *time.Time { + if s == nil { return nil } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - s.typeName = "string" - s.String = valueString + return s.RemoteUpdatedAt +} + +func (s *ScheduledInterview) GetStatus() *ScheduledInterviewStatus { + if s == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, s) + return s.Status } -func (s ScheduledInterviewRequestStatus) MarshalJSON() ([]byte, error) { - switch s.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", s.typeName, s) - case "scheduledInterviewStatusEnum": - return json.Marshal(s.ScheduledInterviewStatusEnum) - case "string": - return json.Marshal(s.String) +func (s *ScheduledInterview) GetRemoteWasDeleted() *bool { + if s == nil { + return nil } + return s.RemoteWasDeleted } -type ScheduledInterviewRequestStatusVisitor interface { - VisitScheduledInterviewStatusEnum(ScheduledInterviewStatusEnum) error - VisitString(string) error +func (s *ScheduledInterview) GetFieldMappings() map[string]interface{} { + if s == nil { + return nil + } + return s.FieldMappings } -func (s *ScheduledInterviewRequestStatus) Accept(visitor ScheduledInterviewRequestStatusVisitor) error { - switch s.typeName { - default: - return fmt.Errorf("invalid type %s in %T", s.typeName, s) - case "scheduledInterviewStatusEnum": - return visitor.VisitScheduledInterviewStatusEnum(s.ScheduledInterviewStatusEnum) - case "string": - return visitor.VisitString(s.String) +func (s *ScheduledInterview) GetRemoteData() []*RemoteData { + if s == nil { + return nil } + return s.RemoteData } -type ScheduledInterviewResponse struct { - Model *ScheduledInterview `json:"model,omitempty"` - Warnings []*WarningValidationProblem `json:"warnings,omitempty"` - Errors []*ErrorValidationProblem `json:"errors,omitempty"` - Logs []*DebugModeLog `json:"logs,omitempty"` - - _rawJSON json.RawMessage +func (s *ScheduledInterview) GetExtraProperties() map[string]interface{} { + return s.extraProperties } -func (s *ScheduledInterviewResponse) UnmarshalJSON(data []byte) error { - type unmarshaler ScheduledInterviewResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { +func (s *ScheduledInterview) UnmarshalJSON(data []byte) error { + type embed ScheduledInterview + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + StartAt *internal.DateTime `json:"start_at,omitempty"` + EndAt *internal.DateTime `json:"end_at,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + RemoteUpdatedAt *internal.DateTime `json:"remote_updated_at,omitempty"` + }{ + embed: embed(*s), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *s = ScheduledInterview(unmarshaler.embed) + s.CreatedAt = unmarshaler.CreatedAt.TimePtr() + s.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + s.StartAt = unmarshaler.StartAt.TimePtr() + s.EndAt = unmarshaler.EndAt.TimePtr() + s.RemoteCreatedAt = unmarshaler.RemoteCreatedAt.TimePtr() + s.RemoteUpdatedAt = unmarshaler.RemoteUpdatedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *s) + if err != nil { return err } - *s = ScheduledInterviewResponse(value) - s._rawJSON = json.RawMessage(data) + s.extraProperties = extraProperties + s.rawJSON = json.RawMessage(data) return nil } -func (s *ScheduledInterviewResponse) String() string { - if len(s._rawJSON) > 0 { - if value, err := core.StringifyJSON(s._rawJSON); err == nil { +func (s *ScheduledInterview) MarshalJSON() ([]byte, error) { + type embed ScheduledInterview + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + StartAt *internal.DateTime `json:"start_at,omitempty"` + EndAt *internal.DateTime `json:"end_at,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + RemoteUpdatedAt *internal.DateTime `json:"remote_updated_at,omitempty"` + }{ + embed: embed(*s), + CreatedAt: internal.NewOptionalDateTime(s.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(s.ModifiedAt), + StartAt: internal.NewOptionalDateTime(s.StartAt), + EndAt: internal.NewOptionalDateTime(s.EndAt), + RemoteCreatedAt: internal.NewOptionalDateTime(s.RemoteCreatedAt), + RemoteUpdatedAt: internal.NewOptionalDateTime(s.RemoteUpdatedAt), + } + return json.Marshal(marshaler) +} + +func (s *ScheduledInterview) String() string { + if len(s.rawJSON) > 0 { + if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(s); err == nil { + if value, err := internal.StringifyJSON(s); err == nil { return value } return fmt.Sprintf("%#v", s) } -// The interview's status. -// -// - `SCHEDULED` - SCHEDULED -// - `AWAITING_FEEDBACK` - AWAITING_FEEDBACK -// - `COMPLETE` - COMPLETE -type ScheduledInterviewStatus struct { - typeName string - ScheduledInterviewStatusEnum ScheduledInterviewStatusEnum - String string -} +// The application being interviewed. +type ScheduledInterviewApplication struct { + String string + Application *Application -func NewScheduledInterviewStatusFromScheduledInterviewStatusEnum(value ScheduledInterviewStatusEnum) *ScheduledInterviewStatus { - return &ScheduledInterviewStatus{typeName: "scheduledInterviewStatusEnum", ScheduledInterviewStatusEnum: value} + typ string } -func NewScheduledInterviewStatusFromString(value string) *ScheduledInterviewStatus { - return &ScheduledInterviewStatus{typeName: "string", String: value} +func (s *ScheduledInterviewApplication) GetString() string { + if s == nil { + return "" + } + return s.String } -func (s *ScheduledInterviewStatus) UnmarshalJSON(data []byte) error { - var valueScheduledInterviewStatusEnum ScheduledInterviewStatusEnum - if err := json.Unmarshal(data, &valueScheduledInterviewStatusEnum); err == nil { - s.typeName = "scheduledInterviewStatusEnum" - s.ScheduledInterviewStatusEnum = valueScheduledInterviewStatusEnum +func (s *ScheduledInterviewApplication) GetApplication() *Application { + if s == nil { return nil } + return s.Application +} + +func (s *ScheduledInterviewApplication) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - s.typeName = "string" + s.typ = "String" s.String = valueString return nil } + valueApplication := new(Application) + if err := json.Unmarshal(data, &valueApplication); err == nil { + s.typ = "Application" + s.Application = valueApplication + return nil + } return fmt.Errorf("%s cannot be deserialized as a %T", data, s) } -func (s ScheduledInterviewStatus) MarshalJSON() ([]byte, error) { - switch s.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", s.typeName, s) - case "scheduledInterviewStatusEnum": - return json.Marshal(s.ScheduledInterviewStatusEnum) - case "string": +func (s ScheduledInterviewApplication) MarshalJSON() ([]byte, error) { + if s.typ == "String" || s.String != "" { return json.Marshal(s.String) } + if s.typ == "Application" || s.Application != nil { + return json.Marshal(s.Application) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", s) } -type ScheduledInterviewStatusVisitor interface { - VisitScheduledInterviewStatusEnum(ScheduledInterviewStatusEnum) error +type ScheduledInterviewApplicationVisitor interface { VisitString(string) error + VisitApplication(*Application) error } -func (s *ScheduledInterviewStatus) Accept(visitor ScheduledInterviewStatusVisitor) error { - switch s.typeName { - default: - return fmt.Errorf("invalid type %s in %T", s.typeName, s) - case "scheduledInterviewStatusEnum": - return visitor.VisitScheduledInterviewStatusEnum(s.ScheduledInterviewStatusEnum) - case "string": +func (s *ScheduledInterviewApplication) Accept(visitor ScheduledInterviewApplicationVisitor) error { + if s.typ == "String" || s.String != "" { return visitor.VisitString(s.String) } -} - -// - `SCHEDULED` - SCHEDULED -// - `AWAITING_FEEDBACK` - AWAITING_FEEDBACK -// - `COMPLETE` - COMPLETE -type ScheduledInterviewStatusEnum string - -const ( - ScheduledInterviewStatusEnumScheduled ScheduledInterviewStatusEnum = "SCHEDULED" - ScheduledInterviewStatusEnumAwaitingFeedback ScheduledInterviewStatusEnum = "AWAITING_FEEDBACK" - ScheduledInterviewStatusEnumComplete ScheduledInterviewStatusEnum = "COMPLETE" -) - -func NewScheduledInterviewStatusEnumFromString(s string) (ScheduledInterviewStatusEnum, error) { - switch s { - case "SCHEDULED": - return ScheduledInterviewStatusEnumScheduled, nil - case "AWAITING_FEEDBACK": - return ScheduledInterviewStatusEnumAwaitingFeedback, nil - case "COMPLETE": - return ScheduledInterviewStatusEnumComplete, nil + if s.typ == "Application" || s.Application != nil { + return visitor.VisitApplication(s.Application) } - var t ScheduledInterviewStatusEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (s ScheduledInterviewStatusEnum) Ptr() *ScheduledInterviewStatusEnum { - return &s + return fmt.Errorf("type %T does not include a non-empty union type", s) } -// # The Scorecard Object -// -// ### Description -// -// The `Scorecard` object is used to represent an interviewer's candidate recommendation based on a particular interview. -// -// ### Usage Example -// -// Fetch from the `LIST Scorecards` endpoint and filter by `application` to show all scorecard for an applicant. -type Scorecard struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The application being scored. - Application *ScorecardApplication `json:"application,omitempty"` - // The interview being scored. - Interview *ScorecardInterview `json:"interview,omitempty"` - // The interviewer doing the scoring. - Interviewer *ScorecardInterviewer `json:"interviewer,omitempty"` - // When the third party's scorecard was created. - RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty"` - // When the scorecard was submitted. - SubmittedAt *time.Time `json:"submitted_at,omitempty"` - // The inteviewer's recommendation. - // - // - `DEFINITELY_NO` - DEFINITELY_NO - // - `NO` - NO - // - `YES` - YES - // - `STRONG_YES` - STRONG_YES - // - `NO_DECISION` - NO_DECISION - OverallRecommendation *ScorecardOverallRecommendation `json:"overall_recommendation,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` +type ScheduledInterviewInterviewersItem struct { + String string + RemoteUser *RemoteUser - _rawJSON json.RawMessage + typ string } -func (s *Scorecard) UnmarshalJSON(data []byte) error { - type unmarshaler Scorecard - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (s *ScheduledInterviewInterviewersItem) GetString() string { + if s == nil { + return "" } - *s = Scorecard(value) - s._rawJSON = json.RawMessage(data) - return nil + return s.String } -func (s *Scorecard) String() string { - if len(s._rawJSON) > 0 { - if value, err := core.StringifyJSON(s._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(s); err == nil { - return value +func (s *ScheduledInterviewInterviewersItem) GetRemoteUser() *RemoteUser { + if s == nil { + return nil } - return fmt.Sprintf("%#v", s) -} - -// The application being scored. -type ScorecardApplication struct { - typeName string - String string - Application *Application -} - -func NewScorecardApplicationFromString(value string) *ScorecardApplication { - return &ScorecardApplication{typeName: "string", String: value} -} - -func NewScorecardApplicationFromApplication(value *Application) *ScorecardApplication { - return &ScorecardApplication{typeName: "application", Application: value} + return s.RemoteUser } -func (s *ScorecardApplication) UnmarshalJSON(data []byte) error { +func (s *ScheduledInterviewInterviewersItem) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - s.typeName = "string" + s.typ = "String" s.String = valueString return nil } - valueApplication := new(Application) - if err := json.Unmarshal(data, &valueApplication); err == nil { - s.typeName = "application" - s.Application = valueApplication + valueRemoteUser := new(RemoteUser) + if err := json.Unmarshal(data, &valueRemoteUser); err == nil { + s.typ = "RemoteUser" + s.RemoteUser = valueRemoteUser return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, s) } -func (s ScorecardApplication) MarshalJSON() ([]byte, error) { - switch s.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", s.typeName, s) - case "string": +func (s ScheduledInterviewInterviewersItem) MarshalJSON() ([]byte, error) { + if s.typ == "String" || s.String != "" { return json.Marshal(s.String) - case "application": - return json.Marshal(s.Application) } + if s.typ == "RemoteUser" || s.RemoteUser != nil { + return json.Marshal(s.RemoteUser) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", s) } -type ScorecardApplicationVisitor interface { +type ScheduledInterviewInterviewersItemVisitor interface { VisitString(string) error - VisitApplication(*Application) error + VisitRemoteUser(*RemoteUser) error } -func (s *ScorecardApplication) Accept(visitor ScorecardApplicationVisitor) error { - switch s.typeName { - default: - return fmt.Errorf("invalid type %s in %T", s.typeName, s) - case "string": +func (s *ScheduledInterviewInterviewersItem) Accept(visitor ScheduledInterviewInterviewersItemVisitor) error { + if s.typ == "String" || s.String != "" { return visitor.VisitString(s.String) - case "application": - return visitor.VisitApplication(s.Application) } + if s.typ == "RemoteUser" || s.RemoteUser != nil { + return visitor.VisitRemoteUser(s.RemoteUser) + } + return fmt.Errorf("type %T does not include a non-empty union type", s) } -// The interview being scored. -type ScorecardInterview struct { - typeName string - String string - ScheduledInterview *ScheduledInterview +// The stage of the interview. +type ScheduledInterviewJobInterviewStage struct { + String string + JobInterviewStage *JobInterviewStage + + typ string } -func NewScorecardInterviewFromString(value string) *ScorecardInterview { - return &ScorecardInterview{typeName: "string", String: value} +func (s *ScheduledInterviewJobInterviewStage) GetString() string { + if s == nil { + return "" + } + return s.String } -func NewScorecardInterviewFromScheduledInterview(value *ScheduledInterview) *ScorecardInterview { - return &ScorecardInterview{typeName: "scheduledInterview", ScheduledInterview: value} +func (s *ScheduledInterviewJobInterviewStage) GetJobInterviewStage() *JobInterviewStage { + if s == nil { + return nil + } + return s.JobInterviewStage } -func (s *ScorecardInterview) UnmarshalJSON(data []byte) error { +func (s *ScheduledInterviewJobInterviewStage) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - s.typeName = "string" + s.typ = "String" s.String = valueString return nil } - valueScheduledInterview := new(ScheduledInterview) - if err := json.Unmarshal(data, &valueScheduledInterview); err == nil { - s.typeName = "scheduledInterview" - s.ScheduledInterview = valueScheduledInterview + valueJobInterviewStage := new(JobInterviewStage) + if err := json.Unmarshal(data, &valueJobInterviewStage); err == nil { + s.typ = "JobInterviewStage" + s.JobInterviewStage = valueJobInterviewStage return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, s) } -func (s ScorecardInterview) MarshalJSON() ([]byte, error) { - switch s.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", s.typeName, s) - case "string": +func (s ScheduledInterviewJobInterviewStage) MarshalJSON() ([]byte, error) { + if s.typ == "String" || s.String != "" { return json.Marshal(s.String) - case "scheduledInterview": - return json.Marshal(s.ScheduledInterview) } + if s.typ == "JobInterviewStage" || s.JobInterviewStage != nil { + return json.Marshal(s.JobInterviewStage) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", s) } -type ScorecardInterviewVisitor interface { +type ScheduledInterviewJobInterviewStageVisitor interface { VisitString(string) error - VisitScheduledInterview(*ScheduledInterview) error + VisitJobInterviewStage(*JobInterviewStage) error } -func (s *ScorecardInterview) Accept(visitor ScorecardInterviewVisitor) error { - switch s.typeName { - default: - return fmt.Errorf("invalid type %s in %T", s.typeName, s) - case "string": +func (s *ScheduledInterviewJobInterviewStage) Accept(visitor ScheduledInterviewJobInterviewStageVisitor) error { + if s.typ == "String" || s.String != "" { return visitor.VisitString(s.String) - case "scheduledInterview": - return visitor.VisitScheduledInterview(s.ScheduledInterview) } + if s.typ == "JobInterviewStage" || s.JobInterviewStage != nil { + return visitor.VisitJobInterviewStage(s.JobInterviewStage) + } + return fmt.Errorf("type %T does not include a non-empty union type", s) } -// The interviewer doing the scoring. -type ScorecardInterviewer struct { - typeName string +// The user organizing the interview. +type ScheduledInterviewOrganizer struct { String string RemoteUser *RemoteUser + + typ string } -func NewScorecardInterviewerFromString(value string) *ScorecardInterviewer { - return &ScorecardInterviewer{typeName: "string", String: value} +func (s *ScheduledInterviewOrganizer) GetString() string { + if s == nil { + return "" + } + return s.String } -func NewScorecardInterviewerFromRemoteUser(value *RemoteUser) *ScorecardInterviewer { - return &ScorecardInterviewer{typeName: "remoteUser", RemoteUser: value} +func (s *ScheduledInterviewOrganizer) GetRemoteUser() *RemoteUser { + if s == nil { + return nil + } + return s.RemoteUser } -func (s *ScorecardInterviewer) UnmarshalJSON(data []byte) error { +func (s *ScheduledInterviewOrganizer) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - s.typeName = "string" + s.typ = "String" s.String = valueString return nil } valueRemoteUser := new(RemoteUser) if err := json.Unmarshal(data, &valueRemoteUser); err == nil { - s.typeName = "remoteUser" + s.typ = "RemoteUser" s.RemoteUser = valueRemoteUser return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, s) } -func (s ScorecardInterviewer) MarshalJSON() ([]byte, error) { - switch s.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", s.typeName, s) - case "string": +func (s ScheduledInterviewOrganizer) MarshalJSON() ([]byte, error) { + if s.typ == "String" || s.String != "" { return json.Marshal(s.String) - case "remoteUser": + } + if s.typ == "RemoteUser" || s.RemoteUser != nil { return json.Marshal(s.RemoteUser) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", s) } -type ScorecardInterviewerVisitor interface { +type ScheduledInterviewOrganizerVisitor interface { VisitString(string) error VisitRemoteUser(*RemoteUser) error } -func (s *ScorecardInterviewer) Accept(visitor ScorecardInterviewerVisitor) error { - switch s.typeName { - default: - return fmt.Errorf("invalid type %s in %T", s.typeName, s) - case "string": +func (s *ScheduledInterviewOrganizer) Accept(visitor ScheduledInterviewOrganizerVisitor) error { + if s.typ == "String" || s.String != "" { return visitor.VisitString(s.String) - case "remoteUser": + } + if s.typ == "RemoteUser" || s.RemoteUser != nil { return visitor.VisitRemoteUser(s.RemoteUser) } + return fmt.Errorf("type %T does not include a non-empty union type", s) } -// The inteviewer's recommendation. +// The interview's status. // -// - `DEFINITELY_NO` - DEFINITELY_NO -// - `NO` - NO -// - `YES` - YES -// - `STRONG_YES` - STRONG_YES -// - `NO_DECISION` - NO_DECISION -type ScorecardOverallRecommendation struct { - typeName string - OverallRecommendationEnum OverallRecommendationEnum - String string +// * `SCHEDULED` - SCHEDULED +// * `AWAITING_FEEDBACK` - AWAITING_FEEDBACK +// * `COMPLETE` - COMPLETE +type ScheduledInterviewStatus struct { + ScheduledInterviewStatusEnum ScheduledInterviewStatusEnum + String string + + typ string } -func NewScorecardOverallRecommendationFromOverallRecommendationEnum(value OverallRecommendationEnum) *ScorecardOverallRecommendation { - return &ScorecardOverallRecommendation{typeName: "overallRecommendationEnum", OverallRecommendationEnum: value} +func (s *ScheduledInterviewStatus) GetScheduledInterviewStatusEnum() ScheduledInterviewStatusEnum { + if s == nil { + return "" + } + return s.ScheduledInterviewStatusEnum } -func NewScorecardOverallRecommendationFromString(value string) *ScorecardOverallRecommendation { - return &ScorecardOverallRecommendation{typeName: "string", String: value} +func (s *ScheduledInterviewStatus) GetString() string { + if s == nil { + return "" + } + return s.String } -func (s *ScorecardOverallRecommendation) UnmarshalJSON(data []byte) error { - var valueOverallRecommendationEnum OverallRecommendationEnum - if err := json.Unmarshal(data, &valueOverallRecommendationEnum); err == nil { - s.typeName = "overallRecommendationEnum" - s.OverallRecommendationEnum = valueOverallRecommendationEnum +func (s *ScheduledInterviewStatus) UnmarshalJSON(data []byte) error { + var valueScheduledInterviewStatusEnum ScheduledInterviewStatusEnum + if err := json.Unmarshal(data, &valueScheduledInterviewStatusEnum); err == nil { + s.typ = "ScheduledInterviewStatusEnum" + s.ScheduledInterviewStatusEnum = valueScheduledInterviewStatusEnum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - s.typeName = "string" + s.typ = "String" s.String = valueString return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, s) } -func (s ScorecardOverallRecommendation) MarshalJSON() ([]byte, error) { - switch s.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", s.typeName, s) - case "overallRecommendationEnum": - return json.Marshal(s.OverallRecommendationEnum) - case "string": +func (s ScheduledInterviewStatus) MarshalJSON() ([]byte, error) { + if s.typ == "ScheduledInterviewStatusEnum" || s.ScheduledInterviewStatusEnum != "" { + return json.Marshal(s.ScheduledInterviewStatusEnum) + } + if s.typ == "String" || s.String != "" { return json.Marshal(s.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", s) } -type ScorecardOverallRecommendationVisitor interface { - VisitOverallRecommendationEnum(OverallRecommendationEnum) error +type ScheduledInterviewStatusVisitor interface { + VisitScheduledInterviewStatusEnum(ScheduledInterviewStatusEnum) error VisitString(string) error } -func (s *ScorecardOverallRecommendation) Accept(visitor ScorecardOverallRecommendationVisitor) error { - switch s.typeName { - default: - return fmt.Errorf("invalid type %s in %T", s.typeName, s) - case "overallRecommendationEnum": - return visitor.VisitOverallRecommendationEnum(s.OverallRecommendationEnum) - case "string": +func (s *ScheduledInterviewStatus) Accept(visitor ScheduledInterviewStatusVisitor) error { + if s.typ == "ScheduledInterviewStatusEnum" || s.ScheduledInterviewStatusEnum != "" { + return visitor.VisitScheduledInterviewStatusEnum(s.ScheduledInterviewStatusEnum) + } + if s.typ == "String" || s.String != "" { return visitor.VisitString(s.String) } + return fmt.Errorf("type %T does not include a non-empty union type", s) +} + +// * `SCHEDULED` - SCHEDULED +// * `AWAITING_FEEDBACK` - AWAITING_FEEDBACK +// * `COMPLETE` - COMPLETE +type ScheduledInterviewStatusEnum string + +const ( + ScheduledInterviewStatusEnumScheduled ScheduledInterviewStatusEnum = "SCHEDULED" + ScheduledInterviewStatusEnumAwaitingFeedback ScheduledInterviewStatusEnum = "AWAITING_FEEDBACK" + ScheduledInterviewStatusEnumComplete ScheduledInterviewStatusEnum = "COMPLETE" +) + +func NewScheduledInterviewStatusEnumFromString(s string) (ScheduledInterviewStatusEnum, error) { + switch s { + case "SCHEDULED": + return ScheduledInterviewStatusEnumScheduled, nil + case "AWAITING_FEEDBACK": + return ScheduledInterviewStatusEnumAwaitingFeedback, nil + case "COMPLETE": + return ScheduledInterviewStatusEnumComplete, nil + } + var t ScheduledInterviewStatusEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (s ScheduledInterviewStatusEnum) Ptr() *ScheduledInterviewStatusEnum { + return &s } // # The ScreeningQuestion Object -// // ### Description -// // The `ScreeningQuestion` object is used to represent questions asked to screen candidates for a job. // // ### Usage Example -// // TODO type ScreeningQuestion struct { - Id *string `json:"id,omitempty"` + Id *string `json:"id,omitempty" url:"id,omitempty"` // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` // The job associated with the screening question. - Job *ScreeningQuestionJob `json:"job,omitempty"` + Job *ScreeningQuestionJob `json:"job,omitempty" url:"job,omitempty"` // The description of the screening question - Description *string `json:"description,omitempty"` + Description *string `json:"description,omitempty" url:"description,omitempty"` // The title of the screening question - Title *string `json:"title,omitempty"` + Title *string `json:"title,omitempty" url:"title,omitempty"` // The data type for the screening question. // - // - `DATE` - DATE - // - `FILE` - FILE - // - `SINGLE_SELECT` - SINGLE_SELECT - // - `MULTI_SELECT` - MULTI_SELECT - // - `SINGLE_LINE_TEXT` - SINGLE_LINE_TEXT - // - `MULTI_LINE_TEXT` - MULTI_LINE_TEXT - // - `NUMERIC` - NUMERIC - // - `BOOLEAN` - BOOLEAN - Type *ScreeningQuestionType `json:"type,omitempty"` + // * `DATE` - DATE + // * `FILE` - FILE + // * `SINGLE_SELECT` - SINGLE_SELECT + // * `MULTI_SELECT` - MULTI_SELECT + // * `SINGLE_LINE_TEXT` - SINGLE_LINE_TEXT + // * `MULTI_LINE_TEXT` - MULTI_LINE_TEXT + // * `NUMERIC` - NUMERIC + // * `BOOLEAN` - BOOLEAN + Type *ScreeningQuestionType `json:"type,omitempty" url:"type,omitempty"` // Whether or not the screening question is required. - Required *bool `json:"required,omitempty"` - Options []interface{} `json:"options,omitempty"` + Required *bool `json:"required,omitempty" url:"required,omitempty"` + Options []interface{} `json:"options,omitempty" url:"options,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} - _rawJSON json.RawMessage +func (s *ScreeningQuestion) GetId() *string { + if s == nil { + return nil + } + return s.Id +} + +func (s *ScreeningQuestion) GetRemoteId() *string { + if s == nil { + return nil + } + return s.RemoteId +} + +func (s *ScreeningQuestion) GetCreatedAt() *time.Time { + if s == nil { + return nil + } + return s.CreatedAt +} + +func (s *ScreeningQuestion) GetModifiedAt() *time.Time { + if s == nil { + return nil + } + return s.ModifiedAt +} + +func (s *ScreeningQuestion) GetJob() *ScreeningQuestionJob { + if s == nil { + return nil + } + return s.Job +} + +func (s *ScreeningQuestion) GetDescription() *string { + if s == nil { + return nil + } + return s.Description +} + +func (s *ScreeningQuestion) GetTitle() *string { + if s == nil { + return nil + } + return s.Title +} + +func (s *ScreeningQuestion) GetType() *ScreeningQuestionType { + if s == nil { + return nil + } + return s.Type +} + +func (s *ScreeningQuestion) GetRequired() *bool { + if s == nil { + return nil + } + return s.Required +} + +func (s *ScreeningQuestion) GetOptions() []interface{} { + if s == nil { + return nil + } + return s.Options +} + +func (s *ScreeningQuestion) GetRemoteWasDeleted() *bool { + if s == nil { + return nil + } + return s.RemoteWasDeleted +} + +func (s *ScreeningQuestion) GetExtraProperties() map[string]interface{} { + return s.extraProperties } func (s *ScreeningQuestion) UnmarshalJSON(data []byte) error { - type unmarshaler ScreeningQuestion - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { + type embed ScreeningQuestion + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*s), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *s = ScreeningQuestion(unmarshaler.embed) + s.CreatedAt = unmarshaler.CreatedAt.TimePtr() + s.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *s) + if err != nil { return err } - *s = ScreeningQuestion(value) - s._rawJSON = json.RawMessage(data) + s.extraProperties = extraProperties + s.rawJSON = json.RawMessage(data) return nil } +func (s *ScreeningQuestion) MarshalJSON() ([]byte, error) { + type embed ScreeningQuestion + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*s), + CreatedAt: internal.NewOptionalDateTime(s.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(s.ModifiedAt), + } + return json.Marshal(marshaler) +} + func (s *ScreeningQuestion) String() string { - if len(s._rawJSON) > 0 { - if value, err := core.StringifyJSON(s._rawJSON); err == nil { + if len(s.rawJSON) > 0 { + if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(s); err == nil { + if value, err := internal.StringifyJSON(s); err == nil { return value } return fmt.Sprintf("%#v", s) } // # The ScreeningQuestionAnswer Object -// // ### Description -// // The `ScreeningQuestionAnswer` object is used to represent candidate responses to a screening question, for a specific application. // // ### Usage Example -// // TODO type ScreeningQuestionAnswer struct { - Id *string `json:"id,omitempty"` + Id *string `json:"id,omitempty" url:"id,omitempty"` // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` // The screening question associated with the candidate’s answer. To determine the data type of the answer, you can expand on the screening question by adding `screening_question_answers.question` to the `expand` query parameter. - Question *ScreeningQuestionAnswerQuestion `json:"question,omitempty"` + Question *ScreeningQuestionAnswerQuestion `json:"question,omitempty" url:"question,omitempty"` // The candidate’s response to the screening question. - Answer *string `json:"answer,omitempty"` + Answer *string `json:"answer,omitempty" url:"answer,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (s *ScreeningQuestionAnswer) UnmarshalJSON(data []byte) error { - type unmarshaler ScreeningQuestionAnswer - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (s *ScreeningQuestionAnswer) GetId() *string { + if s == nil { + return nil } - *s = ScreeningQuestionAnswer(value) - s._rawJSON = json.RawMessage(data) - return nil + return s.Id } -func (s *ScreeningQuestionAnswer) String() string { - if len(s._rawJSON) > 0 { - if value, err := core.StringifyJSON(s._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(s); err == nil { - return value +func (s *ScreeningQuestionAnswer) GetRemoteId() *string { + if s == nil { + return nil } - return fmt.Sprintf("%#v", s) -} - -// The screening question associated with the candidate’s answer. To determine the data type of the answer, you can expand on the screening question by adding `screening_question_answers.question` to the `expand` query parameter. -type ScreeningQuestionAnswerQuestion struct { - typeName string - String string - ScreeningQuestion *ScreeningQuestion -} - -func NewScreeningQuestionAnswerQuestionFromString(value string) *ScreeningQuestionAnswerQuestion { - return &ScreeningQuestionAnswerQuestion{typeName: "string", String: value} -} - -func NewScreeningQuestionAnswerQuestionFromScreeningQuestion(value *ScreeningQuestion) *ScreeningQuestionAnswerQuestion { - return &ScreeningQuestionAnswerQuestion{typeName: "screeningQuestion", ScreeningQuestion: value} + return s.RemoteId } -func (s *ScreeningQuestionAnswerQuestion) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - s.typeName = "string" - s.String = valueString +func (s *ScreeningQuestionAnswer) GetCreatedAt() *time.Time { + if s == nil { return nil } - valueScreeningQuestion := new(ScreeningQuestion) - if err := json.Unmarshal(data, &valueScreeningQuestion); err == nil { - s.typeName = "screeningQuestion" - s.ScreeningQuestion = valueScreeningQuestion + return s.CreatedAt +} + +func (s *ScreeningQuestionAnswer) GetModifiedAt() *time.Time { + if s == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, s) + return s.ModifiedAt } -func (s ScreeningQuestionAnswerQuestion) MarshalJSON() ([]byte, error) { - switch s.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", s.typeName, s) - case "string": - return json.Marshal(s.String) - case "screeningQuestion": - return json.Marshal(s.ScreeningQuestion) +func (s *ScreeningQuestionAnswer) GetQuestion() *ScreeningQuestionAnswerQuestion { + if s == nil { + return nil } + return s.Question } -type ScreeningQuestionAnswerQuestionVisitor interface { - VisitString(string) error - VisitScreeningQuestion(*ScreeningQuestion) error +func (s *ScreeningQuestionAnswer) GetAnswer() *string { + if s == nil { + return nil + } + return s.Answer } -func (s *ScreeningQuestionAnswerQuestion) Accept(visitor ScreeningQuestionAnswerQuestionVisitor) error { - switch s.typeName { - default: - return fmt.Errorf("invalid type %s in %T", s.typeName, s) - case "string": - return visitor.VisitString(s.String) - case "screeningQuestion": - return visitor.VisitScreeningQuestion(s.ScreeningQuestion) +func (s *ScreeningQuestionAnswer) GetRemoteWasDeleted() *bool { + if s == nil { + return nil } + return s.RemoteWasDeleted } -// # The ScreeningQuestionAnswer Object -// -// ### Description -// -// The `ScreeningQuestionAnswer` object is used to represent candidate responses to a screening question, for a specific application. -// -// ### Usage Example -// -// TODO -type ScreeningQuestionAnswerRequest struct { - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The screening question associated with the candidate’s answer. To determine the data type of the answer, you can expand on the screening question by adding `screening_question_answers.question` to the `expand` query parameter. - Question *ScreeningQuestionAnswerRequestQuestion `json:"question,omitempty"` - // The candidate’s response to the screening question. - Answer *string `json:"answer,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` - - _rawJSON json.RawMessage +func (s *ScreeningQuestionAnswer) GetExtraProperties() map[string]interface{} { + return s.extraProperties } -func (s *ScreeningQuestionAnswerRequest) UnmarshalJSON(data []byte) error { - type unmarshaler ScreeningQuestionAnswerRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { +func (s *ScreeningQuestionAnswer) UnmarshalJSON(data []byte) error { + type embed ScreeningQuestionAnswer + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*s), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { return err } - *s = ScreeningQuestionAnswerRequest(value) - s._rawJSON = json.RawMessage(data) + *s = ScreeningQuestionAnswer(unmarshaler.embed) + s.CreatedAt = unmarshaler.CreatedAt.TimePtr() + s.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *s) + if err != nil { + return err + } + s.extraProperties = extraProperties + s.rawJSON = json.RawMessage(data) return nil } -func (s *ScreeningQuestionAnswerRequest) String() string { - if len(s._rawJSON) > 0 { - if value, err := core.StringifyJSON(s._rawJSON); err == nil { +func (s *ScreeningQuestionAnswer) MarshalJSON() ([]byte, error) { + type embed ScreeningQuestionAnswer + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*s), + CreatedAt: internal.NewOptionalDateTime(s.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(s.ModifiedAt), + } + return json.Marshal(marshaler) +} + +func (s *ScreeningQuestionAnswer) String() string { + if len(s.rawJSON) > 0 { + if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(s); err == nil { + if value, err := internal.StringifyJSON(s); err == nil { return value } return fmt.Sprintf("%#v", s) } // The screening question associated with the candidate’s answer. To determine the data type of the answer, you can expand on the screening question by adding `screening_question_answers.question` to the `expand` query parameter. -type ScreeningQuestionAnswerRequestQuestion struct { - typeName string +type ScreeningQuestionAnswerQuestion struct { String string ScreeningQuestion *ScreeningQuestion + + typ string } -func NewScreeningQuestionAnswerRequestQuestionFromString(value string) *ScreeningQuestionAnswerRequestQuestion { - return &ScreeningQuestionAnswerRequestQuestion{typeName: "string", String: value} +func (s *ScreeningQuestionAnswerQuestion) GetString() string { + if s == nil { + return "" + } + return s.String } -func NewScreeningQuestionAnswerRequestQuestionFromScreeningQuestion(value *ScreeningQuestion) *ScreeningQuestionAnswerRequestQuestion { - return &ScreeningQuestionAnswerRequestQuestion{typeName: "screeningQuestion", ScreeningQuestion: value} +func (s *ScreeningQuestionAnswerQuestion) GetScreeningQuestion() *ScreeningQuestion { + if s == nil { + return nil + } + return s.ScreeningQuestion } -func (s *ScreeningQuestionAnswerRequestQuestion) UnmarshalJSON(data []byte) error { +func (s *ScreeningQuestionAnswerQuestion) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - s.typeName = "string" + s.typ = "String" s.String = valueString return nil } valueScreeningQuestion := new(ScreeningQuestion) if err := json.Unmarshal(data, &valueScreeningQuestion); err == nil { - s.typeName = "screeningQuestion" + s.typ = "ScreeningQuestion" s.ScreeningQuestion = valueScreeningQuestion return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, s) } -func (s ScreeningQuestionAnswerRequestQuestion) MarshalJSON() ([]byte, error) { - switch s.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", s.typeName, s) - case "string": +func (s ScreeningQuestionAnswerQuestion) MarshalJSON() ([]byte, error) { + if s.typ == "String" || s.String != "" { return json.Marshal(s.String) - case "screeningQuestion": + } + if s.typ == "ScreeningQuestion" || s.ScreeningQuestion != nil { return json.Marshal(s.ScreeningQuestion) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", s) } -type ScreeningQuestionAnswerRequestQuestionVisitor interface { +type ScreeningQuestionAnswerQuestionVisitor interface { VisitString(string) error VisitScreeningQuestion(*ScreeningQuestion) error } -func (s *ScreeningQuestionAnswerRequestQuestion) Accept(visitor ScreeningQuestionAnswerRequestQuestionVisitor) error { - switch s.typeName { - default: - return fmt.Errorf("invalid type %s in %T", s.typeName, s) - case "string": +func (s *ScreeningQuestionAnswerQuestion) Accept(visitor ScreeningQuestionAnswerQuestionVisitor) error { + if s.typ == "String" || s.String != "" { return visitor.VisitString(s.String) - case "screeningQuestion": + } + if s.typ == "ScreeningQuestion" || s.ScreeningQuestion != nil { return visitor.VisitScreeningQuestion(s.ScreeningQuestion) } + return fmt.Errorf("type %T does not include a non-empty union type", s) } // The job associated with the screening question. type ScreeningQuestionJob struct { - typeName string - String string - Job *Job + String string + Job *Job + + typ string } -func NewScreeningQuestionJobFromString(value string) *ScreeningQuestionJob { - return &ScreeningQuestionJob{typeName: "string", String: value} +func (s *ScreeningQuestionJob) GetString() string { + if s == nil { + return "" + } + return s.String } -func NewScreeningQuestionJobFromJob(value *Job) *ScreeningQuestionJob { - return &ScreeningQuestionJob{typeName: "job", Job: value} +func (s *ScreeningQuestionJob) GetJob() *Job { + if s == nil { + return nil + } + return s.Job } func (s *ScreeningQuestionJob) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - s.typeName = "string" + s.typ = "String" s.String = valueString return nil } valueJob := new(Job) if err := json.Unmarshal(data, &valueJob); err == nil { - s.typeName = "job" + s.typ = "Job" s.Job = valueJob return nil } @@ -9278,14 +6351,13 @@ func (s *ScreeningQuestionJob) UnmarshalJSON(data []byte) error { } func (s ScreeningQuestionJob) MarshalJSON() ([]byte, error) { - switch s.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", s.typeName, s) - case "string": + if s.typ == "String" || s.String != "" { return json.Marshal(s.String) - case "job": + } + if s.typ == "Job" || s.Job != nil { return json.Marshal(s.Job) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", s) } type ScreeningQuestionJobVisitor interface { @@ -9294,59 +6366,129 @@ type ScreeningQuestionJobVisitor interface { } func (s *ScreeningQuestionJob) Accept(visitor ScreeningQuestionJobVisitor) error { - switch s.typeName { - default: - return fmt.Errorf("invalid type %s in %T", s.typeName, s) - case "string": + if s.typ == "String" || s.String != "" { return visitor.VisitString(s.String) - case "job": + } + if s.typ == "Job" || s.Job != nil { return visitor.VisitJob(s.Job) } + return fmt.Errorf("type %T does not include a non-empty union type", s) } // # The ScreeningQuestionOption Object -// // ### Description -// -// # The `ScreeningQuestionOption` object is used to represent options for a `ScreeningQuestion` object +// The `ScreeningQuestionOption` object is used to represent options for a `ScreeningQuestion` object // // ### Usage Example -// // TODO type ScreeningQuestionOption struct { - Id *string `json:"id,omitempty"` + Id *string `json:"id,omitempty" url:"id,omitempty"` // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` // Available response options - Label *string `json:"label,omitempty"` + Label *string `json:"label,omitempty" url:"label,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (s *ScreeningQuestionOption) GetId() *string { + if s == nil { + return nil + } + return s.Id +} + +func (s *ScreeningQuestionOption) GetRemoteId() *string { + if s == nil { + return nil + } + return s.RemoteId +} + +func (s *ScreeningQuestionOption) GetCreatedAt() *time.Time { + if s == nil { + return nil + } + return s.CreatedAt +} + +func (s *ScreeningQuestionOption) GetModifiedAt() *time.Time { + if s == nil { + return nil + } + return s.ModifiedAt +} - _rawJSON json.RawMessage +func (s *ScreeningQuestionOption) GetLabel() *string { + if s == nil { + return nil + } + return s.Label +} + +func (s *ScreeningQuestionOption) GetRemoteWasDeleted() *bool { + if s == nil { + return nil + } + return s.RemoteWasDeleted +} + +func (s *ScreeningQuestionOption) GetExtraProperties() map[string]interface{} { + return s.extraProperties } func (s *ScreeningQuestionOption) UnmarshalJSON(data []byte) error { - type unmarshaler ScreeningQuestionOption - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { + type embed ScreeningQuestionOption + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*s), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *s = ScreeningQuestionOption(unmarshaler.embed) + s.CreatedAt = unmarshaler.CreatedAt.TimePtr() + s.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *s) + if err != nil { return err } - *s = ScreeningQuestionOption(value) - s._rawJSON = json.RawMessage(data) + s.extraProperties = extraProperties + s.rawJSON = json.RawMessage(data) return nil } +func (s *ScreeningQuestionOption) MarshalJSON() ([]byte, error) { + type embed ScreeningQuestionOption + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*s), + CreatedAt: internal.NewOptionalDateTime(s.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(s.ModifiedAt), + } + return json.Marshal(marshaler) +} + func (s *ScreeningQuestionOption) String() string { - if len(s._rawJSON) > 0 { - if value, err := core.StringifyJSON(s._rawJSON); err == nil { + if len(s.rawJSON) > 0 { + if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(s); err == nil { + if value, err := internal.StringifyJSON(s); err == nil { return value } return fmt.Sprintf("%#v", s) @@ -9354,38 +6496,45 @@ func (s *ScreeningQuestionOption) String() string { // The data type for the screening question. // -// - `DATE` - DATE -// - `FILE` - FILE -// - `SINGLE_SELECT` - SINGLE_SELECT -// - `MULTI_SELECT` - MULTI_SELECT -// - `SINGLE_LINE_TEXT` - SINGLE_LINE_TEXT -// - `MULTI_LINE_TEXT` - MULTI_LINE_TEXT -// - `NUMERIC` - NUMERIC -// - `BOOLEAN` - BOOLEAN +// * `DATE` - DATE +// * `FILE` - FILE +// * `SINGLE_SELECT` - SINGLE_SELECT +// * `MULTI_SELECT` - MULTI_SELECT +// * `SINGLE_LINE_TEXT` - SINGLE_LINE_TEXT +// * `MULTI_LINE_TEXT` - MULTI_LINE_TEXT +// * `NUMERIC` - NUMERIC +// * `BOOLEAN` - BOOLEAN type ScreeningQuestionType struct { - typeName string ScreeningQuestionTypeEnum ScreeningQuestionTypeEnum String string + + typ string } -func NewScreeningQuestionTypeFromScreeningQuestionTypeEnum(value ScreeningQuestionTypeEnum) *ScreeningQuestionType { - return &ScreeningQuestionType{typeName: "screeningQuestionTypeEnum", ScreeningQuestionTypeEnum: value} +func (s *ScreeningQuestionType) GetScreeningQuestionTypeEnum() ScreeningQuestionTypeEnum { + if s == nil { + return "" + } + return s.ScreeningQuestionTypeEnum } -func NewScreeningQuestionTypeFromString(value string) *ScreeningQuestionType { - return &ScreeningQuestionType{typeName: "string", String: value} +func (s *ScreeningQuestionType) GetString() string { + if s == nil { + return "" + } + return s.String } func (s *ScreeningQuestionType) UnmarshalJSON(data []byte) error { var valueScreeningQuestionTypeEnum ScreeningQuestionTypeEnum if err := json.Unmarshal(data, &valueScreeningQuestionTypeEnum); err == nil { - s.typeName = "screeningQuestionTypeEnum" + s.typ = "ScreeningQuestionTypeEnum" s.ScreeningQuestionTypeEnum = valueScreeningQuestionTypeEnum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - s.typeName = "string" + s.typ = "String" s.String = valueString return nil } @@ -9393,14 +6542,13 @@ func (s *ScreeningQuestionType) UnmarshalJSON(data []byte) error { } func (s ScreeningQuestionType) MarshalJSON() ([]byte, error) { - switch s.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", s.typeName, s) - case "screeningQuestionTypeEnum": + if s.typ == "ScreeningQuestionTypeEnum" || s.ScreeningQuestionTypeEnum != "" { return json.Marshal(s.ScreeningQuestionTypeEnum) - case "string": + } + if s.typ == "String" || s.String != "" { return json.Marshal(s.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", s) } type ScreeningQuestionTypeVisitor interface { @@ -9409,24 +6557,23 @@ type ScreeningQuestionTypeVisitor interface { } func (s *ScreeningQuestionType) Accept(visitor ScreeningQuestionTypeVisitor) error { - switch s.typeName { - default: - return fmt.Errorf("invalid type %s in %T", s.typeName, s) - case "screeningQuestionTypeEnum": + if s.typ == "ScreeningQuestionTypeEnum" || s.ScreeningQuestionTypeEnum != "" { return visitor.VisitScreeningQuestionTypeEnum(s.ScreeningQuestionTypeEnum) - case "string": + } + if s.typ == "String" || s.String != "" { return visitor.VisitString(s.String) } + return fmt.Errorf("type %T does not include a non-empty union type", s) } -// - `DATE` - DATE -// - `FILE` - FILE -// - `SINGLE_SELECT` - SINGLE_SELECT -// - `MULTI_SELECT` - MULTI_SELECT -// - `SINGLE_LINE_TEXT` - SINGLE_LINE_TEXT -// - `MULTI_LINE_TEXT` - MULTI_LINE_TEXT -// - `NUMERIC` - NUMERIC -// - `BOOLEAN` - BOOLEAN +// * `DATE` - DATE +// * `FILE` - FILE +// * `SINGLE_SELECT` - SINGLE_SELECT +// * `MULTI_SELECT` - MULTI_SELECT +// * `SINGLE_LINE_TEXT` - SINGLE_LINE_TEXT +// * `MULTI_LINE_TEXT` - MULTI_LINE_TEXT +// * `NUMERIC` - NUMERIC +// * `BOOLEAN` - BOOLEAN type ScreeningQuestionTypeEnum string const ( @@ -9467,8 +6614,8 @@ func (s ScreeningQuestionTypeEnum) Ptr() *ScreeningQuestionTypeEnum { return &s } -// - `IN_NEXT_SYNC` - IN_NEXT_SYNC -// - `IN_LAST_SYNC` - IN_LAST_SYNC +// * `IN_NEXT_SYNC` - IN_NEXT_SYNC +// * `IN_LAST_SYNC` - IN_LAST_SYNC type SelectiveSyncConfigurationsUsageEnum string const ( @@ -9483,326 +6630,445 @@ func NewSelectiveSyncConfigurationsUsageEnumFromString(s string) (SelectiveSyncC case "IN_LAST_SYNC": return SelectiveSyncConfigurationsUsageEnumInLastSync, nil } - var t SelectiveSyncConfigurationsUsageEnum + var t SelectiveSyncConfigurationsUsageEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (s SelectiveSyncConfigurationsUsageEnum) Ptr() *SelectiveSyncConfigurationsUsageEnum { + return &s +} + +// * `SYNCING` - SYNCING +// * `DONE` - DONE +// * `FAILED` - FAILED +// * `DISABLED` - DISABLED +// * `PAUSED` - PAUSED +// * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED +type StatusFd5Enum string + +const ( + StatusFd5EnumSyncing StatusFd5Enum = "SYNCING" + StatusFd5EnumDone StatusFd5Enum = "DONE" + StatusFd5EnumFailed StatusFd5Enum = "FAILED" + StatusFd5EnumDisabled StatusFd5Enum = "DISABLED" + StatusFd5EnumPaused StatusFd5Enum = "PAUSED" + StatusFd5EnumPartiallySynced StatusFd5Enum = "PARTIALLY_SYNCED" +) + +func NewStatusFd5EnumFromString(s string) (StatusFd5Enum, error) { + switch s { + case "SYNCING": + return StatusFd5EnumSyncing, nil + case "DONE": + return StatusFd5EnumDone, nil + case "FAILED": + return StatusFd5EnumFailed, nil + case "DISABLED": + return StatusFd5EnumDisabled, nil + case "PAUSED": + return StatusFd5EnumPaused, nil + case "PARTIALLY_SYNCED": + return StatusFd5EnumPartiallySynced, nil + } + var t StatusFd5Enum return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (s SelectiveSyncConfigurationsUsageEnum) Ptr() *SelectiveSyncConfigurationsUsageEnum { +func (s StatusFd5Enum) Ptr() *StatusFd5Enum { return &s } // # The SyncStatus Object -// // ### Description -// -// # The `SyncStatus` object is used to represent the syncing state of an account +// The `SyncStatus` object is used to represent the syncing state of an account // // ### Usage Example -// // View the `SyncStatus` for an account to see how recently its models were synced. type SyncStatus struct { - ModelName string `json:"model_name"` - ModelId string `json:"model_id"` - LastSyncStart *time.Time `json:"last_sync_start,omitempty"` - NextSyncStart *time.Time `json:"next_sync_start,omitempty"` - Status SyncStatusStatusEnum `json:"status,omitempty"` - IsInitialSync bool `json:"is_initial_sync"` - SelectiveSyncConfigurationsUsage *SelectiveSyncConfigurationsUsageEnum `json:"selective_sync_configurations_usage,omitempty"` + ModelName string `json:"model_name" url:"model_name"` + ModelId string `json:"model_id" url:"model_id"` + LastSyncStart *time.Time `json:"last_sync_start,omitempty" url:"last_sync_start,omitempty"` + NextSyncStart *time.Time `json:"next_sync_start,omitempty" url:"next_sync_start,omitempty"` + LastSyncResult *SyncStatusLastSyncResult `json:"last_sync_result,omitempty" url:"last_sync_result,omitempty"` + LastSyncFinished *time.Time `json:"last_sync_finished,omitempty" url:"last_sync_finished,omitempty"` + Status *SyncStatusStatus `json:"status" url:"status"` + IsInitialSync bool `json:"is_initial_sync" url:"is_initial_sync"` + SelectiveSyncConfigurationsUsage *SelectiveSyncConfigurationsUsageEnum `json:"selective_sync_configurations_usage,omitempty" url:"selective_sync_configurations_usage,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (s *SyncStatus) GetModelName() string { + if s == nil { + return "" + } + return s.ModelName +} + +func (s *SyncStatus) GetModelId() string { + if s == nil { + return "" + } + return s.ModelId +} + +func (s *SyncStatus) GetLastSyncStart() *time.Time { + if s == nil { + return nil + } + return s.LastSyncStart +} + +func (s *SyncStatus) GetNextSyncStart() *time.Time { + if s == nil { + return nil + } + return s.NextSyncStart +} + +func (s *SyncStatus) GetLastSyncResult() *SyncStatusLastSyncResult { + if s == nil { + return nil + } + return s.LastSyncResult +} + +func (s *SyncStatus) GetLastSyncFinished() *time.Time { + if s == nil { + return nil + } + return s.LastSyncFinished +} + +func (s *SyncStatus) GetStatus() *SyncStatusStatus { + if s == nil { + return nil + } + return s.Status +} + +func (s *SyncStatus) GetIsInitialSync() bool { + if s == nil { + return false + } + return s.IsInitialSync +} + +func (s *SyncStatus) GetSelectiveSyncConfigurationsUsage() *SelectiveSyncConfigurationsUsageEnum { + if s == nil { + return nil + } + return s.SelectiveSyncConfigurationsUsage +} - _rawJSON json.RawMessage +func (s *SyncStatus) GetExtraProperties() map[string]interface{} { + return s.extraProperties } func (s *SyncStatus) UnmarshalJSON(data []byte) error { - type unmarshaler SyncStatus - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { + type embed SyncStatus + var unmarshaler = struct { + embed + LastSyncStart *internal.DateTime `json:"last_sync_start,omitempty"` + NextSyncStart *internal.DateTime `json:"next_sync_start,omitempty"` + LastSyncFinished *internal.DateTime `json:"last_sync_finished,omitempty"` + }{ + embed: embed(*s), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *s = SyncStatus(unmarshaler.embed) + s.LastSyncStart = unmarshaler.LastSyncStart.TimePtr() + s.NextSyncStart = unmarshaler.NextSyncStart.TimePtr() + s.LastSyncFinished = unmarshaler.LastSyncFinished.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *s) + if err != nil { return err } - *s = SyncStatus(value) - s._rawJSON = json.RawMessage(data) + s.extraProperties = extraProperties + s.rawJSON = json.RawMessage(data) return nil } +func (s *SyncStatus) MarshalJSON() ([]byte, error) { + type embed SyncStatus + var marshaler = struct { + embed + LastSyncStart *internal.DateTime `json:"last_sync_start,omitempty"` + NextSyncStart *internal.DateTime `json:"next_sync_start,omitempty"` + LastSyncFinished *internal.DateTime `json:"last_sync_finished,omitempty"` + }{ + embed: embed(*s), + LastSyncStart: internal.NewOptionalDateTime(s.LastSyncStart), + NextSyncStart: internal.NewOptionalDateTime(s.NextSyncStart), + LastSyncFinished: internal.NewOptionalDateTime(s.LastSyncFinished), + } + return json.Marshal(marshaler) +} + func (s *SyncStatus) String() string { - if len(s._rawJSON) > 0 { - if value, err := core.StringifyJSON(s._rawJSON); err == nil { + if len(s.rawJSON) > 0 { + if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(s); err == nil { + if value, err := internal.StringifyJSON(s); err == nil { return value } return fmt.Sprintf("%#v", s) } -// - `SYNCING` - SYNCING -// - `DONE` - DONE -// - `FAILED` - FAILED -// - `DISABLED` - DISABLED -// - `PAUSED` - PAUSED -// - `PARTIALLY_SYNCED` - PARTIALLY_SYNCED -type SyncStatusStatusEnum string +type SyncStatusLastSyncResult struct { + LastSyncResultEnum LastSyncResultEnum + String string -const ( - SyncStatusStatusEnumSyncing SyncStatusStatusEnum = "SYNCING" - SyncStatusStatusEnumDone SyncStatusStatusEnum = "DONE" - SyncStatusStatusEnumFailed SyncStatusStatusEnum = "FAILED" - SyncStatusStatusEnumDisabled SyncStatusStatusEnum = "DISABLED" - SyncStatusStatusEnumPaused SyncStatusStatusEnum = "PAUSED" - SyncStatusStatusEnumPartiallySynced SyncStatusStatusEnum = "PARTIALLY_SYNCED" -) + typ string +} -func NewSyncStatusStatusEnumFromString(s string) (SyncStatusStatusEnum, error) { - switch s { - case "SYNCING": - return SyncStatusStatusEnumSyncing, nil - case "DONE": - return SyncStatusStatusEnumDone, nil - case "FAILED": - return SyncStatusStatusEnumFailed, nil - case "DISABLED": - return SyncStatusStatusEnumDisabled, nil - case "PAUSED": - return SyncStatusStatusEnumPaused, nil - case "PARTIALLY_SYNCED": - return SyncStatusStatusEnumPartiallySynced, nil +func (s *SyncStatusLastSyncResult) GetLastSyncResultEnum() LastSyncResultEnum { + if s == nil { + return "" } - var t SyncStatusStatusEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) + return s.LastSyncResultEnum } -func (s SyncStatusStatusEnum) Ptr() *SyncStatusStatusEnum { - return &s +func (s *SyncStatusLastSyncResult) GetString() string { + if s == nil { + return "" + } + return s.String } -// # The Tag Object -// -// ### Description -// -// The `Tag` object is used to represent a tag for a candidate. -// -// ### Usage Example -// -// Fetch from the `LIST Tags` endpoint and view the tags used within a company. -type Tag struct { - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The tag's name. - Name *string `json:"name,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []map[string]interface{} `json:"remote_data,omitempty"` +func (s *SyncStatusLastSyncResult) UnmarshalJSON(data []byte) error { + var valueLastSyncResultEnum LastSyncResultEnum + if err := json.Unmarshal(data, &valueLastSyncResultEnum); err == nil { + s.typ = "LastSyncResultEnum" + s.LastSyncResultEnum = valueLastSyncResultEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + s.typ = "String" + s.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, s) +} - _rawJSON json.RawMessage +func (s SyncStatusLastSyncResult) MarshalJSON() ([]byte, error) { + if s.typ == "LastSyncResultEnum" || s.LastSyncResultEnum != "" { + return json.Marshal(s.LastSyncResultEnum) + } + if s.typ == "String" || s.String != "" { + return json.Marshal(s.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", s) } -func (t *Tag) UnmarshalJSON(data []byte) error { - type unmarshaler Tag - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +type SyncStatusLastSyncResultVisitor interface { + VisitLastSyncResultEnum(LastSyncResultEnum) error + VisitString(string) error +} + +func (s *SyncStatusLastSyncResult) Accept(visitor SyncStatusLastSyncResultVisitor) error { + if s.typ == "LastSyncResultEnum" || s.LastSyncResultEnum != "" { + return visitor.VisitLastSyncResultEnum(s.LastSyncResultEnum) } - *t = Tag(value) - t._rawJSON = json.RawMessage(data) - return nil + if s.typ == "String" || s.String != "" { + return visitor.VisitString(s.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", s) } -func (t *Tag) String() string { - if len(t._rawJSON) > 0 { - if value, err := core.StringifyJSON(t._rawJSON); err == nil { - return value - } +type SyncStatusStatus struct { + StatusFd5Enum StatusFd5Enum + String string + + typ string +} + +func (s *SyncStatusStatus) GetStatusFd5Enum() StatusFd5Enum { + if s == nil { + return "" } - if value, err := core.StringifyJSON(t); err == nil { - return value + return s.StatusFd5Enum +} + +func (s *SyncStatusStatus) GetString() string { + if s == nil { + return "" + } + return s.String +} + +func (s *SyncStatusStatus) UnmarshalJSON(data []byte) error { + var valueStatusFd5Enum StatusFd5Enum + if err := json.Unmarshal(data, &valueStatusFd5Enum); err == nil { + s.typ = "StatusFd5Enum" + s.StatusFd5Enum = valueStatusFd5Enum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + s.typ = "String" + s.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, s) +} + +func (s SyncStatusStatus) MarshalJSON() ([]byte, error) { + if s.typ == "StatusFd5Enum" || s.StatusFd5Enum != "" { + return json.Marshal(s.StatusFd5Enum) + } + if s.typ == "String" || s.String != "" { + return json.Marshal(s.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", s) +} + +type SyncStatusStatusVisitor interface { + VisitStatusFd5Enum(StatusFd5Enum) error + VisitString(string) error +} + +func (s *SyncStatusStatus) Accept(visitor SyncStatusStatusVisitor) error { + if s.typ == "StatusFd5Enum" || s.StatusFd5Enum != "" { + return visitor.VisitStatusFd5Enum(s.StatusFd5Enum) + } + if s.typ == "String" || s.String != "" { + return visitor.VisitString(s.String) } - return fmt.Sprintf("%#v", t) + return fmt.Errorf("type %T does not include a non-empty union type", s) } // # The Url Object -// // ### Description -// // The `Url` object is used to represent hyperlinks associated with the parent model. -// // ### Usage Example -// // Fetch from the `GET Candidate` endpoint and view their website urls. type Url struct { // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` // The site's url. - Value *string `json:"value,omitempty"` + Value *string `json:"value,omitempty" url:"value,omitempty"` // The type of site. // - // - `PERSONAL` - PERSONAL - // - `COMPANY` - COMPANY - // - `PORTFOLIO` - PORTFOLIO - // - `BLOG` - BLOG - // - `SOCIAL_MEDIA` - SOCIAL_MEDIA - // - `OTHER` - OTHER - // - `JOB_POSTING` - JOB_POSTING - UrlType *UrlUrlType `json:"url_type,omitempty"` + // * `PERSONAL` - PERSONAL + // * `COMPANY` - COMPANY + // * `PORTFOLIO` - PORTFOLIO + // * `BLOG` - BLOG + // * `SOCIAL_MEDIA` - SOCIAL_MEDIA + // * `OTHER` - OTHER + // * `JOB_POSTING` - JOB_POSTING + UrlType *UrlUrlType `json:"url_type,omitempty" url:"url_type,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (u *Url) UnmarshalJSON(data []byte) error { - type unmarshaler Url - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (u *Url) GetCreatedAt() *time.Time { + if u == nil { + return nil } - *u = Url(value) - u._rawJSON = json.RawMessage(data) - return nil + return u.CreatedAt } -func (u *Url) String() string { - if len(u._rawJSON) > 0 { - if value, err := core.StringifyJSON(u._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(u); err == nil { - return value +func (u *Url) GetModifiedAt() *time.Time { + if u == nil { + return nil } - return fmt.Sprintf("%#v", u) + return u.ModifiedAt } -// # The Url Object -// -// ### Description -// -// The `Url` object is used to represent hyperlinks associated with the parent model. -// -// ### Usage Example -// -// Fetch from the `GET Candidate` endpoint and view their website urls. -type UrlRequest struct { - // The site's url. - Value *string `json:"value,omitempty"` - // The type of site. - // - // - `PERSONAL` - PERSONAL - // - `COMPANY` - COMPANY - // - `PORTFOLIO` - PORTFOLIO - // - `BLOG` - BLOG - // - `SOCIAL_MEDIA` - SOCIAL_MEDIA - // - `OTHER` - OTHER - // - `JOB_POSTING` - JOB_POSTING - UrlType *UrlRequestUrlType `json:"url_type,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` - - _rawJSON json.RawMessage -} - -func (u *UrlRequest) UnmarshalJSON(data []byte) error { - type unmarshaler UrlRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (u *Url) GetValue() *string { + if u == nil { + return nil } - *u = UrlRequest(value) - u._rawJSON = json.RawMessage(data) - return nil + return u.Value } -func (u *UrlRequest) String() string { - if len(u._rawJSON) > 0 { - if value, err := core.StringifyJSON(u._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(u); err == nil { - return value +func (u *Url) GetUrlType() *UrlUrlType { + if u == nil { + return nil } - return fmt.Sprintf("%#v", u) -} - -// The type of site. -// -// - `PERSONAL` - PERSONAL -// - `COMPANY` - COMPANY -// - `PORTFOLIO` - PORTFOLIO -// - `BLOG` - BLOG -// - `SOCIAL_MEDIA` - SOCIAL_MEDIA -// - `OTHER` - OTHER -// - `JOB_POSTING` - JOB_POSTING -type UrlRequestUrlType struct { - typeName string - UrlTypeEnum UrlTypeEnum - String string + return u.UrlType } -func NewUrlRequestUrlTypeFromUrlTypeEnum(value UrlTypeEnum) *UrlRequestUrlType { - return &UrlRequestUrlType{typeName: "urlTypeEnum", UrlTypeEnum: value} +func (u *Url) GetRemoteWasDeleted() *bool { + if u == nil { + return nil + } + return u.RemoteWasDeleted } -func NewUrlRequestUrlTypeFromString(value string) *UrlRequestUrlType { - return &UrlRequestUrlType{typeName: "string", String: value} +func (u *Url) GetExtraProperties() map[string]interface{} { + return u.extraProperties } -func (u *UrlRequestUrlType) UnmarshalJSON(data []byte) error { - var valueUrlTypeEnum UrlTypeEnum - if err := json.Unmarshal(data, &valueUrlTypeEnum); err == nil { - u.typeName = "urlTypeEnum" - u.UrlTypeEnum = valueUrlTypeEnum - return nil +func (u *Url) UnmarshalJSON(data []byte) error { + type embed Url + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*u), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - u.typeName = "string" - u.String = valueString - return nil + *u = Url(unmarshaler.embed) + u.CreatedAt = unmarshaler.CreatedAt.TimePtr() + u.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *u) + if err != nil { + return err } - return fmt.Errorf("%s cannot be deserialized as a %T", data, u) + u.extraProperties = extraProperties + u.rawJSON = json.RawMessage(data) + return nil } -func (u UrlRequestUrlType) MarshalJSON() ([]byte, error) { - switch u.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", u.typeName, u) - case "urlTypeEnum": - return json.Marshal(u.UrlTypeEnum) - case "string": - return json.Marshal(u.String) +func (u *Url) MarshalJSON() ([]byte, error) { + type embed Url + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*u), + CreatedAt: internal.NewOptionalDateTime(u.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(u.ModifiedAt), } + return json.Marshal(marshaler) } -type UrlRequestUrlTypeVisitor interface { - VisitUrlTypeEnum(UrlTypeEnum) error - VisitString(string) error -} - -func (u *UrlRequestUrlType) Accept(visitor UrlRequestUrlTypeVisitor) error { - switch u.typeName { - default: - return fmt.Errorf("invalid type %s in %T", u.typeName, u) - case "urlTypeEnum": - return visitor.VisitUrlTypeEnum(u.UrlTypeEnum) - case "string": - return visitor.VisitString(u.String) +func (u *Url) String() string { + if len(u.rawJSON) > 0 { + if value, err := internal.StringifyJSON(u.rawJSON); err == nil { + return value + } } + if value, err := internal.StringifyJSON(u); err == nil { + return value + } + return fmt.Sprintf("%#v", u) } -// - `PERSONAL` - PERSONAL -// - `COMPANY` - COMPANY -// - `PORTFOLIO` - PORTFOLIO -// - `BLOG` - BLOG -// - `SOCIAL_MEDIA` - SOCIAL_MEDIA -// - `OTHER` - OTHER -// - `JOB_POSTING` - JOB_POSTING +// * `PERSONAL` - PERSONAL +// * `COMPANY` - COMPANY +// * `PORTFOLIO` - PORTFOLIO +// * `BLOG` - BLOG +// * `SOCIAL_MEDIA` - SOCIAL_MEDIA +// * `OTHER` - OTHER +// * `JOB_POSTING` - JOB_POSTING type UrlTypeEnum string const ( @@ -9842,37 +7108,44 @@ func (u UrlTypeEnum) Ptr() *UrlTypeEnum { // The type of site. // -// - `PERSONAL` - PERSONAL -// - `COMPANY` - COMPANY -// - `PORTFOLIO` - PORTFOLIO -// - `BLOG` - BLOG -// - `SOCIAL_MEDIA` - SOCIAL_MEDIA -// - `OTHER` - OTHER -// - `JOB_POSTING` - JOB_POSTING +// * `PERSONAL` - PERSONAL +// * `COMPANY` - COMPANY +// * `PORTFOLIO` - PORTFOLIO +// * `BLOG` - BLOG +// * `SOCIAL_MEDIA` - SOCIAL_MEDIA +// * `OTHER` - OTHER +// * `JOB_POSTING` - JOB_POSTING type UrlUrlType struct { - typeName string UrlTypeEnum UrlTypeEnum String string + + typ string } -func NewUrlUrlTypeFromUrlTypeEnum(value UrlTypeEnum) *UrlUrlType { - return &UrlUrlType{typeName: "urlTypeEnum", UrlTypeEnum: value} +func (u *UrlUrlType) GetUrlTypeEnum() UrlTypeEnum { + if u == nil { + return "" + } + return u.UrlTypeEnum } -func NewUrlUrlTypeFromString(value string) *UrlUrlType { - return &UrlUrlType{typeName: "string", String: value} +func (u *UrlUrlType) GetString() string { + if u == nil { + return "" + } + return u.String } func (u *UrlUrlType) UnmarshalJSON(data []byte) error { var valueUrlTypeEnum UrlTypeEnum if err := json.Unmarshal(data, &valueUrlTypeEnum); err == nil { - u.typeName = "urlTypeEnum" + u.typ = "UrlTypeEnum" u.UrlTypeEnum = valueUrlTypeEnum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - u.typeName = "string" + u.typ = "String" u.String = valueString return nil } @@ -9880,14 +7153,13 @@ func (u *UrlUrlType) UnmarshalJSON(data []byte) error { } func (u UrlUrlType) MarshalJSON() ([]byte, error) { - switch u.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", u.typeName, u) - case "urlTypeEnum": + if u.typ == "UrlTypeEnum" || u.UrlTypeEnum != "" { return json.Marshal(u.UrlTypeEnum) - case "string": + } + if u.typ == "String" || u.String != "" { return json.Marshal(u.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", u) } type UrlUrlTypeVisitor interface { @@ -9896,20 +7168,31 @@ type UrlUrlTypeVisitor interface { } func (u *UrlUrlType) Accept(visitor UrlUrlTypeVisitor) error { - switch u.typeName { - default: - return fmt.Errorf("invalid type %s in %T", u.typeName, u) - case "urlTypeEnum": + if u.typ == "UrlTypeEnum" || u.UrlTypeEnum != "" { return visitor.VisitUrlTypeEnum(u.UrlTypeEnum) - case "string": + } + if u.typ == "String" || u.String != "" { return visitor.VisitString(u.String) } + return fmt.Errorf("type %T does not include a non-empty union type", u) } type ValidationProblemSource struct { - Pointer string `json:"pointer"` + Pointer string `json:"pointer" url:"pointer"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (v *ValidationProblemSource) GetPointer() string { + if v == nil { + return "" + } + return v.Pointer +} - _rawJSON json.RawMessage +func (v *ValidationProblemSource) GetExtraProperties() map[string]interface{} { + return v.extraProperties } func (v *ValidationProblemSource) UnmarshalJSON(data []byte) error { @@ -9919,85 +7202,67 @@ func (v *ValidationProblemSource) UnmarshalJSON(data []byte) error { return err } *v = ValidationProblemSource(value) - v._rawJSON = json.RawMessage(data) + extraProperties, err := internal.ExtractExtraProperties(data, *v) + if err != nil { + return err + } + v.extraProperties = extraProperties + v.rawJSON = json.RawMessage(data) return nil } func (v *ValidationProblemSource) String() string { - if len(v._rawJSON) > 0 { - if value, err := core.StringifyJSON(v._rawJSON); err == nil { + if len(v.rawJSON) > 0 { + if value, err := internal.StringifyJSON(v.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(v); err == nil { + if value, err := internal.StringifyJSON(v); err == nil { return value } return fmt.Sprintf("%#v", v) } -// - `I_AM_NOT_A_PROTECTED_VETERAN` - I_AM_NOT_A_PROTECTED_VETERAN -// - `I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN` - I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN -// - `I_DONT_WISH_TO_ANSWER` - I_DONT_WISH_TO_ANSWER -type VeteranStatusEnum string - -const ( - VeteranStatusEnumIAmNotAProtectedVeteran VeteranStatusEnum = "I_AM_NOT_A_PROTECTED_VETERAN" - VeteranStatusEnumIIdentifyAsOneOrMoreOfTheClassificationsOfAProtectedVeteran VeteranStatusEnum = "I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN" - VeteranStatusEnumIDontWishToAnswer VeteranStatusEnum = "I_DONT_WISH_TO_ANSWER" -) +type WarningValidationProblem struct { + Source *ValidationProblemSource `json:"source,omitempty" url:"source,omitempty"` + Title string `json:"title" url:"title"` + Detail string `json:"detail" url:"detail"` + ProblemType string `json:"problem_type" url:"problem_type"` -func NewVeteranStatusEnumFromString(s string) (VeteranStatusEnum, error) { - switch s { - case "I_AM_NOT_A_PROTECTED_VETERAN": - return VeteranStatusEnumIAmNotAProtectedVeteran, nil - case "I_IDENTIFY_AS_ONE_OR_MORE_OF_THE_CLASSIFICATIONS_OF_A_PROTECTED_VETERAN": - return VeteranStatusEnumIIdentifyAsOneOrMoreOfTheClassificationsOfAProtectedVeteran, nil - case "I_DONT_WISH_TO_ANSWER": - return VeteranStatusEnumIDontWishToAnswer, nil - } - var t VeteranStatusEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (v VeteranStatusEnum) Ptr() *VeteranStatusEnum { - return &v +func (w *WarningValidationProblem) GetSource() *ValidationProblemSource { + if w == nil { + return nil + } + return w.Source } -// - `ADMIN_ONLY` - ADMIN_ONLY -// - `PUBLIC` - PUBLIC -// - `PRIVATE` - PRIVATE -type VisibilityEnum string - -const ( - VisibilityEnumAdminOnly VisibilityEnum = "ADMIN_ONLY" - VisibilityEnumPublic VisibilityEnum = "PUBLIC" - VisibilityEnumPrivate VisibilityEnum = "PRIVATE" -) - -func NewVisibilityEnumFromString(s string) (VisibilityEnum, error) { - switch s { - case "ADMIN_ONLY": - return VisibilityEnumAdminOnly, nil - case "PUBLIC": - return VisibilityEnumPublic, nil - case "PRIVATE": - return VisibilityEnumPrivate, nil - } - var t VisibilityEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) +func (w *WarningValidationProblem) GetTitle() string { + if w == nil { + return "" + } + return w.Title } -func (v VisibilityEnum) Ptr() *VisibilityEnum { - return &v +func (w *WarningValidationProblem) GetDetail() string { + if w == nil { + return "" + } + return w.Detail } -type WarningValidationProblem struct { - Source *ValidationProblemSource `json:"source,omitempty"` - Title string `json:"title"` - Detail string `json:"detail"` - ProblemType string `json:"problem_type"` +func (w *WarningValidationProblem) GetProblemType() string { + if w == nil { + return "" + } + return w.ProblemType +} - _rawJSON json.RawMessage +func (w *WarningValidationProblem) GetExtraProperties() map[string]interface{} { + return w.extraProperties } func (w *WarningValidationProblem) UnmarshalJSON(data []byte) error { @@ -10007,48 +7272,22 @@ func (w *WarningValidationProblem) UnmarshalJSON(data []byte) error { return err } *w = WarningValidationProblem(value) - w._rawJSON = json.RawMessage(data) - return nil -} - -func (w *WarningValidationProblem) String() string { - if len(w._rawJSON) > 0 { - if value, err := core.StringifyJSON(w._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(w); err == nil { - return value - } - return fmt.Sprintf("%#v", w) -} - -type WebhookReceiver struct { - Event string `json:"event"` - IsActive bool `json:"is_active"` - Key *string `json:"key,omitempty"` - - _rawJSON json.RawMessage -} - -func (w *WebhookReceiver) UnmarshalJSON(data []byte) error { - type unmarshaler WebhookReceiver - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { + extraProperties, err := internal.ExtractExtraProperties(data, *w) + if err != nil { return err } - *w = WebhookReceiver(value) - w._rawJSON = json.RawMessage(data) + w.extraProperties = extraProperties + w.rawJSON = json.RawMessage(data) return nil } -func (w *WebhookReceiver) String() string { - if len(w._rawJSON) > 0 { - if value, err := core.StringifyJSON(w._rawJSON); err == nil { +func (w *WarningValidationProblem) String() string { + if len(w.rawJSON) > 0 { + if value, err := internal.StringifyJSON(w.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(w); err == nil { + if value, err := internal.StringifyJSON(w); err == nil { return value } return fmt.Sprintf("%#v", w) diff --git a/ats/users.go b/ats/users.go index aa251c8..3d29cad 100644 --- a/ats/users.go +++ b/ats/users.go @@ -1,45 +1,112 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package ats import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type UsersListRequest struct { // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // If provided, will only return remote users with the given email address - Email *string `json:"-"` + Email *string `json:"-" url:"email,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // Deprecated. Use show_enum_origins. - RemoteFields *string `json:"-"` + RemoteFields *string `json:"-" url:"remote_fields,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` // 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) - ShowEnumOrigins *string `json:"-"` + ShowEnumOrigins *string `json:"-" url:"show_enum_origins,omitempty"` } type UsersRetrieveRequest struct { // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // Deprecated. Use show_enum_origins. - RemoteFields *string `json:"-"` + RemoteFields *string `json:"-" url:"remote_fields,omitempty"` // 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) - ShowEnumOrigins *string `json:"-"` + ShowEnumOrigins *string `json:"-" url:"show_enum_origins,omitempty"` +} + +type PaginatedRemoteUserList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*RemoteUser `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedRemoteUserList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedRemoteUserList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedRemoteUserList) GetResults() []*RemoteUser { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedRemoteUserList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedRemoteUserList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedRemoteUserList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedRemoteUserList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedRemoteUserList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) } diff --git a/ats/users/client.go b/ats/users/client.go index 4b5e939..0cdba3a 100644 --- a/ats/users/client.go +++ b/ats/users/client.go @@ -1,132 +1,137 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package users import ( context "context" fmt "fmt" - ats "github.com/merge-api/merge-go-client/ats" - core "github.com/merge-api/merge-go-client/core" + ats "github.com/merge-api/merge-go-client/v2/ats" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `RemoteUser` objects. -func (c *Client) List(ctx context.Context, request *ats.UsersListRequest) (*ats.PaginatedRemoteUserList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ats/v1/users" - - queryParams := make(url.Values) - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.Email != nil { - queryParams.Add("email", fmt.Sprintf("%v", *request.Email)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteFields != nil { - queryParams.Add("remote_fields", fmt.Sprintf("%v", request.RemoteFields)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if request.ShowEnumOrigins != nil { - queryParams.Add("show_enum_origins", fmt.Sprintf("%v", request.ShowEnumOrigins)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *ats.PaginatedRemoteUserList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *ats.UsersListRequest, + opts ...option.RequestOption, +) (*core.Page[*ats.RemoteUser], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ats/v1/users" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *ats.PaginatedRemoteUserList) *internal.PageResponse[*string, *ats.RemoteUser] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *ats.RemoteUser]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Returns a `RemoteUser` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *ats.UsersRetrieveRequest) (*ats.RemoteUser, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"ats/v1/users/%v", id) - - queryParams := make(url.Values) - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.RemoteFields != nil { - queryParams.Add("remote_fields", fmt.Sprintf("%v", request.RemoteFields)) - } - if request.ShowEnumOrigins != nil { - queryParams.Add("show_enum_origins", fmt.Sprintf("%v", request.ShowEnumOrigins)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *ats.UsersRetrieveRequest, + opts ...option.RequestOption, +) (*ats.RemoteUser, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/ats/v1/users/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ats.RemoteUser if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/ats/webhook_receivers.go b/ats/webhook_receivers.go index f408c3b..11791e6 100644 --- a/ats/webhook_receivers.go +++ b/ats/webhook_receivers.go @@ -1,9 +1,77 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package ats +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" +) + type WebhookReceiverRequest struct { - Event string `json:"event"` - IsActive bool `json:"is_active"` - Key *string `json:"key,omitempty"` + Event string `json:"event" url:"-"` + IsActive bool `json:"is_active" url:"-"` + Key *string `json:"key,omitempty" url:"-"` +} + +type WebhookReceiver struct { + Event string `json:"event" url:"event"` + IsActive bool `json:"is_active" url:"is_active"` + Key *string `json:"key,omitempty" url:"key,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (w *WebhookReceiver) GetEvent() string { + if w == nil { + return "" + } + return w.Event +} + +func (w *WebhookReceiver) GetIsActive() bool { + if w == nil { + return false + } + return w.IsActive +} + +func (w *WebhookReceiver) GetKey() *string { + if w == nil { + return nil + } + return w.Key +} + +func (w *WebhookReceiver) GetExtraProperties() map[string]interface{} { + return w.extraProperties +} + +func (w *WebhookReceiver) UnmarshalJSON(data []byte) error { + type unmarshaler WebhookReceiver + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *w = WebhookReceiver(value) + extraProperties, err := internal.ExtractExtraProperties(data, *w) + if err != nil { + return err + } + w.extraProperties = extraProperties + w.rawJSON = json.RawMessage(data) + return nil +} + +func (w *WebhookReceiver) String() string { + if len(w.rawJSON) > 0 { + if value, err := internal.StringifyJSON(w.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(w); err == nil { + return value + } + return fmt.Sprintf("%#v", w) } diff --git a/ats/webhookreceivers/client.go b/ats/webhookreceivers/client.go index ef22629..bb2d663 100644 --- a/ats/webhookreceivers/client.go +++ b/ats/webhookreceivers/client.go @@ -1,48 +1,65 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package webhookreceivers import ( context "context" - ats "github.com/merge-api/merge-go-client/ats" - core "github.com/merge-api/merge-go-client/core" + ats "github.com/merge-api/merge-go-client/v2/ats" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `WebhookReceiver` objects. -func (c *Client) List(ctx context.Context) ([]*ats.WebhookReceiver, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ats/v1/webhook-receivers" +func (c *Client) List( + ctx context.Context, + opts ...option.RequestOption, +) ([]*ats.WebhookReceiver, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ats/v1/webhook-receivers" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response []*ats.WebhookReceiver if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -51,22 +68,37 @@ func (c *Client) List(ctx context.Context) ([]*ats.WebhookReceiver, error) { } // Creates a `WebhookReceiver` object with the given values. -func (c *Client) Create(ctx context.Context, request *ats.WebhookReceiverRequest) (*ats.WebhookReceiver, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ats/v1/webhook-receivers" +func (c *Client) Create( + ctx context.Context, + request *ats.WebhookReceiverRequest, + opts ...option.RequestOption, +) (*ats.WebhookReceiver, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ats/v1/webhook-receivers" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *ats.WebhookReceiver if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err diff --git a/client/client.go b/client/client.go index c883fa3..90173c6 100644 --- a/client/client.go +++ b/client/client.go @@ -1,45 +1,49 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package client import ( - accountingclient "github.com/merge-api/merge-go-client/accounting/client" - atsclient "github.com/merge-api/merge-go-client/ats/client" - core "github.com/merge-api/merge-go-client/core" - crmclient "github.com/merge-api/merge-go-client/crm/client" - filestorageclient "github.com/merge-api/merge-go-client/filestorage/client" - hrisclient "github.com/merge-api/merge-go-client/hris/client" - ticketingclient "github.com/merge-api/merge-go-client/ticketing/client" + accountingclient "github.com/merge-api/merge-go-client/v2/accounting/client" + atsclient "github.com/merge-api/merge-go-client/v2/ats/client" + core "github.com/merge-api/merge-go-client/v2/core" + crmclient "github.com/merge-api/merge-go-client/v2/crm/client" + filestorageclient "github.com/merge-api/merge-go-client/v2/filestorage/client" + hrisclient "github.com/merge-api/merge-go-client/v2/hris/client" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" + ticketingclient "github.com/merge-api/merge-go-client/v2/ticketing/client" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header Ats *atsclient.Client + Accounting *accountingclient.Client Crm *crmclient.Client - Filestorage *filestorageclient.Client + FileStorage *filestorageclient.Client Hris *hrisclient.Client Ticketing *ticketingclient.Client - Accounting *accountingclient.Client } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ - baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), + baseURL: options.BaseURL, + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), header: options.ToHeader(), Ats: atsclient.NewClient(opts...), + Accounting: accountingclient.NewClient(opts...), Crm: crmclient.NewClient(opts...), - Filestorage: filestorageclient.NewClient(opts...), + FileStorage: filestorageclient.NewClient(opts...), Hris: hrisclient.NewClient(opts...), Ticketing: ticketingclient.NewClient(opts...), - Accounting: accountingclient.NewClient(opts...), } } diff --git a/client/client_test.go b/client/client_test.go index a0fa36e..634732a 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -1,11 +1,13 @@ +// Code generated by Fern. DO NOT EDIT. + package client import ( - "net/http" - "testing" - "time" - - "github.com/stretchr/testify/assert" + option "github.com/merge-api/merge-go-client/v2/option" + assert "github.com/stretchr/testify/assert" + http "net/http" + testing "testing" + time "time" ) func TestNewClient(t *testing.T) { @@ -16,7 +18,7 @@ func TestNewClient(t *testing.T) { t.Run("base url", func(t *testing.T) { c := NewClient( - WithBaseURL("test.co"), + option.WithBaseURL("test.co"), ) assert.Equal(t, "test.co", c.baseURL) }) @@ -26,7 +28,7 @@ func TestNewClient(t *testing.T) { Timeout: 5 * time.Second, } c := NewClient( - WithHTTPClient(httpClient), + option.WithHTTPClient(httpClient), ) assert.Empty(t, c.baseURL) }) @@ -35,7 +37,7 @@ func TestNewClient(t *testing.T) { header := make(http.Header) header.Set("X-API-Tenancy", "test") c := NewClient( - WithHTTPHeader(header), + option.WithHTTPHeader(header), ) assert.Empty(t, c.baseURL) assert.Equal(t, "test", c.header.Get("X-API-Tenancy")) diff --git a/client/options.go b/client/options.go deleted file mode 100644 index 892867c..0000000 --- a/client/options.go +++ /dev/null @@ -1,48 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -package client - -import ( - core "github.com/merge-api/merge-go-client/core" - http "net/http" -) - -// WithBaseURL sets the client's base URL, overriding the -// default environment, if any. -func WithBaseURL(baseURL string) core.ClientOption { - return func(opts *core.ClientOptions) { - opts.BaseURL = baseURL - } -} - -// WithHTTPClient uses the given HTTPClient to issue all HTTP requests. -func WithHTTPClient(httpClient core.HTTPClient) core.ClientOption { - return func(opts *core.ClientOptions) { - opts.HTTPClient = httpClient - } -} - -// WithHTTPHeader adds the given http.Header to all requests -// issued by the client. -func WithHTTPHeader(httpHeader http.Header) core.ClientOption { - return func(opts *core.ClientOptions) { - // Clone the headers so they can't be modified after the option call. - opts.HTTPHeader = httpHeader.Clone() - } -} - -// WithApiKey sets the 'Authorization: Bearer ' header on every request. -func WithApiKey(apiKey string) core.ClientOption { - return func(opts *core.ClientOptions) { - opts.ApiKey = apiKey - } -} - -// WithAccountToken sets the accountToken header on every request. -// -// Token identifying the end user. -func WithAccountToken(accountToken *string) core.ClientOption { - return func(opts *core.ClientOptions) { - opts.AccountToken = accountToken - } -} diff --git a/core/api_error.go b/core/api_error.go new file mode 100644 index 0000000..dc4190c --- /dev/null +++ b/core/api_error.go @@ -0,0 +1,42 @@ +package core + +import "fmt" + +// APIError is a lightweight wrapper around the standard error +// interface that preserves the status code from the RPC, if any. +type APIError struct { + err error + + StatusCode int `json:"-"` +} + +// NewAPIError constructs a new API error. +func NewAPIError(statusCode int, err error) *APIError { + return &APIError{ + err: err, + StatusCode: statusCode, + } +} + +// Unwrap returns the underlying error. This also makes the error compatible +// with errors.As and errors.Is. +func (a *APIError) Unwrap() error { + if a == nil { + return nil + } + return a.err +} + +// Error returns the API error's message. +func (a *APIError) Error() string { + if a == nil || (a.err == nil && a.StatusCode == 0) { + return "" + } + if a.err == nil { + return fmt.Sprintf("%d", a.StatusCode) + } + if a.StatusCode == 0 { + return a.err.Error() + } + return fmt.Sprintf("%d: %s", a.StatusCode, a.err.Error()) +} diff --git a/core/client_option.go b/core/client_option.go deleted file mode 100644 index 86d45ed..0000000 --- a/core/client_option.go +++ /dev/null @@ -1,53 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -package core - -import ( - fmt "fmt" - http "net/http" -) - -// ClientOption adapts the behavior of the generated client. -type ClientOption func(*ClientOptions) - -// ClientOptions defines all of the possible client options. -// This type is primarily used by the generated code and is -// not meant to be used directly; use ClientOption instead. -type ClientOptions struct { - BaseURL string - HTTPClient HTTPClient - HTTPHeader http.Header - ApiKey string - AccountToken *string -} - -// NewClientOptions returns a new *ClientOptions value. -// This function is primarily used by the generated code and is -// not meant to be used directly; use ClientOption instead. -func NewClientOptions() *ClientOptions { - return &ClientOptions{ - HTTPClient: http.DefaultClient, - HTTPHeader: make(http.Header), - } -} - -// ToHeader maps the configured client options into a http.Header issued -// on every request. -func (c *ClientOptions) ToHeader() http.Header { - header := c.cloneHeader() - if c.ApiKey != "" { - header.Set("Authorization", "Bearer "+c.ApiKey) - } - if c.AccountToken != nil { - header.Set("X-Account-Token", fmt.Sprintf("%v", *c.AccountToken)) - } - return header -} - -func (c *ClientOptions) cloneHeader() http.Header { - headers := c.HTTPHeader.Clone() - headers.Set("X-Fern-Language", "Go") - headers.Set("X-Fern-SDK-Name", "github.com/merge-api/merge-go-client") - headers.Set("X-Fern-SDK-Version", "v1.1.1") - return headers -} diff --git a/core/core.go b/core/core.go deleted file mode 100644 index 10e757f..0000000 --- a/core/core.go +++ /dev/null @@ -1,220 +0,0 @@ -package core - -import ( - "bytes" - "context" - "encoding/json" - "errors" - "fmt" - "io" - "mime/multipart" - "net/http" -) - -const ( - // contentType specifies the JSON Content-Type header value. - contentType = "application/json" - contentTypeHeader = "Content-Type" -) - -// HTTPClient is an interface for a subset of the *http.Client. -type HTTPClient interface { - Do(*http.Request) (*http.Response, error) -} - -// WriteMultipartJSON writes the given value as a JSON part. -// This is used to serialize non-primitive multipart properties -// (i.e. lists, objects, etc). -func WriteMultipartJSON(writer *multipart.Writer, field string, value interface{}) error { - bytes, err := json.Marshal(value) - if err != nil { - return err - } - return writer.WriteField(field, string(bytes)) -} - -// APIError is a lightweight wrapper around the standard error -// interface that preserves the status code from the RPC, if any. -type APIError struct { - err error - - StatusCode int `json:"-"` -} - -// NewAPIError constructs a new API error. -func NewAPIError(statusCode int, err error) *APIError { - return &APIError{ - err: err, - StatusCode: statusCode, - } -} - -// Unwrap returns the underlying error. This also makes the error compatible -// with errors.As and errors.Is. -func (a *APIError) Unwrap() error { - if a == nil { - return nil - } - return a.err -} - -// Error returns the API error's message. -func (a *APIError) Error() string { - if a == nil || (a.err == nil && a.StatusCode == 0) { - return "" - } - if a.err == nil { - return fmt.Sprintf("%d", a.StatusCode) - } - if a.StatusCode == 0 { - return a.err.Error() - } - return fmt.Sprintf("%d: %s", a.StatusCode, a.err.Error()) -} - -// ErrorDecoder decodes *http.Response errors and returns a -// typed API error (e.g. *APIError). -type ErrorDecoder func(statusCode int, body io.Reader) error - -// Caller calls APIs and deserializes their response, if any. -type Caller struct { - client HTTPClient -} - -// NewCaller returns a new *Caller backed by the given HTTP client. -func NewCaller(client HTTPClient) *Caller { - return &Caller{ - client: client, - } -} - -// CallParams represents the parameters used to issue an API call. -type CallParams struct { - URL string - Method string - Headers http.Header - Request interface{} - Response interface{} - ResponseIsOptional bool - ErrorDecoder ErrorDecoder -} - -// Call issues an API call according to the given call parameters. -func (c *Caller) Call(ctx context.Context, params *CallParams) error { - req, err := newRequest(ctx, params.URL, params.Method, params.Headers, params.Request) - if err != nil { - return err - } - - // If the call has been cancelled, don't issue the request. - if err := ctx.Err(); err != nil { - return err - } - - resp, err := c.client.Do(req) - if err != nil { - return err - } - - // Close the response body after we're done. - defer resp.Body.Close() - - // Check if the call was cancelled before we return the error - // associated with the call and/or unmarshal the response data. - if err := ctx.Err(); err != nil { - return err - } - - if resp.StatusCode < 200 || resp.StatusCode >= 300 { - return decodeError(resp, params.ErrorDecoder) - } - - // Mutate the response parameter in-place. - if params.Response != nil { - if writer, ok := params.Response.(io.Writer); ok { - _, err = io.Copy(writer, resp.Body) - } else { - err = json.NewDecoder(resp.Body).Decode(params.Response) - } - if err != nil { - if err == io.EOF { - if params.ResponseIsOptional { - // The response is optional, so we should ignore the - // io.EOF error - return nil - } - return fmt.Errorf("expected a %T response, but the server responded with nothing", params.Response) - } - return err - } - } - - return nil -} - -// newRequest returns a new *http.Request with all of the fields -// required to issue the call. -func newRequest( - ctx context.Context, - url string, - method string, - endpointHeaders http.Header, - request interface{}, -) (*http.Request, error) { - requestBody, err := newRequestBody(request) - if err != nil { - return nil, err - } - req, err := http.NewRequestWithContext(ctx, method, url, requestBody) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - req.Header.Set(contentTypeHeader, contentType) - for name, values := range endpointHeaders { - req.Header[name] = values - } - return req, nil -} - -// newRequestBody returns a new io.Reader that represents the HTTP request body. -func newRequestBody(request interface{}) (io.Reader, error) { - var requestBody io.Reader - if request != nil { - if body, ok := request.(io.Reader); ok { - requestBody = body - } else { - requestBytes, err := json.Marshal(request) - if err != nil { - return nil, err - } - requestBody = bytes.NewReader(requestBytes) - } - } - return requestBody, nil -} - -// decodeError decodes the error from the given HTTP response. Note that -// it's the caller's responsibility to close the response body. -func decodeError(response *http.Response, errorDecoder ErrorDecoder) error { - if errorDecoder != nil { - // This endpoint has custom errors, so we'll - // attempt to unmarshal the error into a structured - // type based on the status code. - return errorDecoder(response.StatusCode, response.Body) - } - // This endpoint doesn't have any custom error - // types, so we just read the body as-is, and - // put it into a normal error. - bytes, err := io.ReadAll(response.Body) - if err != nil && err != io.EOF { - return err - } - if err == io.EOF { - // The error didn't have a response body, - // so all we can do is return an error - // with the status code. - return NewAPIError(response.StatusCode, nil) - } - return NewAPIError(response.StatusCode, errors.New(string(bytes))) -} diff --git a/core/core_test.go b/core/core_test.go deleted file mode 100644 index 70a59ed..0000000 --- a/core/core_test.go +++ /dev/null @@ -1,219 +0,0 @@ -package core - -import ( - "bytes" - "context" - "encoding/json" - "errors" - "fmt" - "io" - "net/http" - "net/http/httptest" - "strconv" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -// TestCase represents a single test case. -type TestCase struct { - description string - - // Server-side assertions. - giveMethod string - giveResponseIsOptional bool - giveHeader http.Header - giveErrorDecoder ErrorDecoder - giveRequest *Request - - // Client-side assertions. - wantResponse *Response - wantError error -} - -// Request a simple request body. -type Request struct { - Id string `json:"id"` -} - -// Response a simple response body. -type Response struct { - Id string `json:"id"` -} - -// NotFoundError represents a 404. -type NotFoundError struct { - *APIError - - Message string `json:"message"` -} - -func TestCall(t *testing.T) { - tests := []*TestCase{ - { - description: "GET success", - giveMethod: http.MethodGet, - giveHeader: http.Header{ - "X-API-Status": []string{"success"}, - }, - giveRequest: &Request{ - Id: "123", - }, - wantResponse: &Response{ - Id: "123", - }, - }, - { - description: "GET not found", - giveMethod: http.MethodGet, - giveHeader: http.Header{ - "X-API-Status": []string{"fail"}, - }, - giveRequest: &Request{ - Id: strconv.Itoa(http.StatusNotFound), - }, - giveErrorDecoder: newTestErrorDecoder(t), - wantError: &NotFoundError{ - APIError: NewAPIError( - http.StatusNotFound, - errors.New(`{"message":"ID \"404\" not found"}`), - ), - }, - }, - { - description: "POST optional response", - giveMethod: http.MethodPost, - giveHeader: http.Header{ - "X-API-Status": []string{"success"}, - }, - giveRequest: &Request{ - Id: "123", - }, - giveResponseIsOptional: true, - }, - { - description: "POST API error", - giveMethod: http.MethodPost, - giveHeader: http.Header{ - "X-API-Status": []string{"fail"}, - }, - giveRequest: &Request{ - Id: strconv.Itoa(http.StatusInternalServerError), - }, - wantError: NewAPIError( - http.StatusInternalServerError, - errors.New("failed to process request"), - ), - }, - } - for _, test := range tests { - t.Run(test.description, func(t *testing.T) { - var ( - server = newTestServer(t, test) - client = server.Client() - ) - caller := NewCaller(client) - var response *Response - err := caller.Call( - context.Background(), - &CallParams{ - URL: server.URL, - Method: test.giveMethod, - Headers: test.giveHeader, - Request: test.giveRequest, - Response: &response, - ResponseIsOptional: test.giveResponseIsOptional, - ErrorDecoder: test.giveErrorDecoder, - }, - ) - if test.wantError != nil { - assert.EqualError(t, err, test.wantError.Error()) - return - } - require.NoError(t, err) - assert.Equal(t, test.wantResponse, response) - }) - } -} - -// newTestServer returns a new *httptest.Server configured with the -// given test parameters. -func newTestServer(t *testing.T, tc *TestCase) *httptest.Server { - return httptest.NewServer( - http.HandlerFunc( - func(w http.ResponseWriter, r *http.Request) { - assert.Equal(t, tc.giveMethod, r.Method) - assert.Equal(t, contentType, r.Header.Get(contentTypeHeader)) - for header, value := range tc.giveHeader { - assert.Equal(t, value, r.Header.Values(header)) - } - - bytes, err := io.ReadAll(r.Body) - require.NoError(t, err) - - request := new(Request) - require.NoError(t, json.Unmarshal(bytes, request)) - - switch request.Id { - case strconv.Itoa(http.StatusNotFound): - notFoundError := &NotFoundError{ - APIError: &APIError{ - StatusCode: http.StatusNotFound, - }, - Message: fmt.Sprintf("ID %q not found", request.Id), - } - bytes, err = json.Marshal(notFoundError) - require.NoError(t, err) - - w.WriteHeader(http.StatusNotFound) - _, err = w.Write(bytes) - require.NoError(t, err) - return - - case strconv.Itoa(http.StatusInternalServerError): - w.WriteHeader(http.StatusInternalServerError) - _, err = w.Write([]byte("failed to process request")) - require.NoError(t, err) - return - } - - if tc.giveResponseIsOptional { - w.WriteHeader(http.StatusOK) - return - } - - response := &Response{ - Id: request.Id, - } - bytes, err = json.Marshal(response) - require.NoError(t, err) - - _, err = w.Write(bytes) - require.NoError(t, err) - }, - ), - ) -} - -// newTestErrorDecoder returns an error decoder suitable for tests. -func newTestErrorDecoder(t *testing.T) func(int, io.Reader) error { - return func(statusCode int, body io.Reader) error { - raw, err := io.ReadAll(body) - require.NoError(t, err) - - var ( - apiError = NewAPIError(statusCode, errors.New(string(raw))) - decoder = json.NewDecoder(bytes.NewReader(raw)) - ) - switch statusCode { - case 404: - value := new(NotFoundError) - value.APIError = apiError - require.NoError(t, decoder.Decode(value)) - - return value - } - return apiError - } -} diff --git a/core/http.go b/core/http.go new file mode 100644 index 0000000..b553350 --- /dev/null +++ b/core/http.go @@ -0,0 +1,8 @@ +package core + +import "net/http" + +// HTTPClient is an interface for a subset of the *http.Client. +type HTTPClient interface { + Do(*http.Request) (*http.Response, error) +} diff --git a/core/page.go b/core/page.go new file mode 100644 index 0000000..96badc7 --- /dev/null +++ b/core/page.go @@ -0,0 +1,70 @@ +package core + +import ( + "context" + "errors" +) + +// ErrNoPages is a sentinel error used to signal that no pages remain. +// +// This error should be used similar to io.EOF, such that it represents +// a non-actionable error. +var ErrNoPages = errors.New("no pages remain") + +// Page represents a single page of results. +type Page[T any] struct { + Results []T + NextPageFunc func(context.Context) (*Page[T], error) +} + +// GetNextPage fetches the next page, if any. If no pages remain, +// the ErrNoPages error is returned. +func (p *Page[T]) GetNextPage(ctx context.Context) (*Page[T], error) { + return p.NextPageFunc(ctx) +} + +// Iterator returns an iterator that starts at the current page. +func (p *Page[T]) Iterator() *PageIterator[T] { + return &PageIterator[T]{ + page: p, + } +} + +// PageIterator is an auto-iterator for paginated endpoints. +type PageIterator[T any] struct { + page *Page[T] + current T + index int + err error +} + +// Next returns true if the given iterator has more results, +// fetching the next page as needed. +func (p *PageIterator[T]) Next(ctx context.Context) bool { + if p.page == nil || len(p.page.Results) == 0 { + return false + } + if p.index >= len(p.page.Results) { + p.index = 0 + p.page, p.err = p.page.GetNextPage(ctx) + if p.err != nil || p.page == nil || len(p.page.Results) == 0 { + return false + } + } + p.current = p.page.Results[p.index] + p.index += 1 + return true +} + +// Current returns the current element. +func (p *PageIterator[T]) Current() T { + return p.current +} + +// Err returns a non-nil error if the iterator encountered an error. +func (p *PageIterator[T]) Err() error { + if errors.Is(p.err, ErrNoPages) { + return nil + } + return p.err +} diff --git a/core/request_option.go b/core/request_option.go new file mode 100644 index 0000000..c8e8562 --- /dev/null +++ b/core/request_option.go @@ -0,0 +1,139 @@ +// Code generated by Fern. DO NOT EDIT. + +package core + +import ( + fmt "fmt" + http "net/http" + url "net/url" +) + +// RequestOption adapts the behavior of the client or an individual request. +type RequestOption interface { + applyRequestOptions(*RequestOptions) +} + +// RequestOptions defines all of the possible request options. +// +// This type is primarily used by the generated code and is not meant +// to be used directly; use the option package instead. +type RequestOptions struct { + BaseURL string + HTTPClient HTTPClient + HTTPHeader http.Header + BodyProperties map[string]interface{} + QueryParameters url.Values + MaxAttempts uint + ApiKey string + AccountToken *string +} + +// NewRequestOptions returns a new *RequestOptions value. +// +// This function is primarily used by the generated code and is not meant +// to be used directly; use RequestOption instead. +func NewRequestOptions(opts ...RequestOption) *RequestOptions { + options := &RequestOptions{ + HTTPHeader: make(http.Header), + BodyProperties: make(map[string]interface{}), + QueryParameters: make(url.Values), + } + for _, opt := range opts { + opt.applyRequestOptions(options) + } + return options +} + +// ToHeader maps the configured request options into a http.Header used +// for the request(s). +func (r *RequestOptions) ToHeader() http.Header { + header := r.cloneHeader() + if r.ApiKey != "" { + header.Set("Authorization", "Bearer "+r.ApiKey) + } + if r.AccountToken != nil { + header.Set("X-Account-Token", fmt.Sprintf("%v", *r.AccountToken)) + } + return header +} + +func (r *RequestOptions) cloneHeader() http.Header { + headers := r.HTTPHeader.Clone() + headers.Set("X-Fern-Language", "Go") + headers.Set("X-Fern-SDK-Name", "github.com/merge-api/merge-go-client/v2") + headers.Set("X-Fern-SDK-Version", "v2.0.0") + headers.Set("User-Agent", "github.com/merge-api/merge-go-client/2.0.0") + return headers +} + +// BaseURLOption implements the RequestOption interface. +type BaseURLOption struct { + BaseURL string +} + +func (b *BaseURLOption) applyRequestOptions(opts *RequestOptions) { + opts.BaseURL = b.BaseURL +} + +// HTTPClientOption implements the RequestOption interface. +type HTTPClientOption struct { + HTTPClient HTTPClient +} + +func (h *HTTPClientOption) applyRequestOptions(opts *RequestOptions) { + opts.HTTPClient = h.HTTPClient +} + +// HTTPHeaderOption implements the RequestOption interface. +type HTTPHeaderOption struct { + HTTPHeader http.Header +} + +func (h *HTTPHeaderOption) applyRequestOptions(opts *RequestOptions) { + opts.HTTPHeader = h.HTTPHeader +} + +// BodyPropertiesOption implements the RequestOption interface. +type BodyPropertiesOption struct { + BodyProperties map[string]interface{} +} + +func (b *BodyPropertiesOption) applyRequestOptions(opts *RequestOptions) { + opts.BodyProperties = b.BodyProperties +} + +// QueryParametersOption implements the RequestOption interface. +type QueryParametersOption struct { + QueryParameters url.Values +} + +func (q *QueryParametersOption) applyRequestOptions(opts *RequestOptions) { + opts.QueryParameters = q.QueryParameters +} + +// MaxAttemptsOption implements the RequestOption interface. +type MaxAttemptsOption struct { + MaxAttempts uint +} + +func (m *MaxAttemptsOption) applyRequestOptions(opts *RequestOptions) { + opts.MaxAttempts = m.MaxAttempts +} + +// ApiKeyOption implements the RequestOption interface. +type ApiKeyOption struct { + ApiKey string +} + +func (a *ApiKeyOption) applyRequestOptions(opts *RequestOptions) { + opts.ApiKey = a.ApiKey +} + +// AccountTokenOption implements the RequestOption interface. +type AccountTokenOption struct { + AccountToken *string +} + +func (a *AccountTokenOption) applyRequestOptions(opts *RequestOptions) { + opts.AccountToken = a.AccountToken +} diff --git a/crm/account_details.go b/crm/account_details.go new file mode 100644 index 0000000..5df5060 --- /dev/null +++ b/crm/account_details.go @@ -0,0 +1,226 @@ +// Code generated by Fern. DO NOT EDIT. + +package crm + +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" + time "time" +) + +type AccountDetails struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + Integration *string `json:"integration,omitempty" url:"integration,omitempty"` + IntegrationSlug *string `json:"integration_slug,omitempty" url:"integration_slug,omitempty"` + Category *AccountDetailsCategory `json:"category,omitempty" url:"category,omitempty"` + EndUserOriginId *string `json:"end_user_origin_id,omitempty" url:"end_user_origin_id,omitempty"` + EndUserOrganizationName *string `json:"end_user_organization_name,omitempty" url:"end_user_organization_name,omitempty"` + EndUserEmailAddress *string `json:"end_user_email_address,omitempty" url:"end_user_email_address,omitempty"` + Status *string `json:"status,omitempty" url:"status,omitempty"` + WebhookListenerUrl *string `json:"webhook_listener_url,omitempty" url:"webhook_listener_url,omitempty"` + // 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. + IsDuplicate *bool `json:"is_duplicate,omitempty" url:"is_duplicate,omitempty"` + AccountType *string `json:"account_type,omitempty" url:"account_type,omitempty"` + // The time at which account completes the linking flow. + CompletedAt *time.Time `json:"completed_at,omitempty" url:"completed_at,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AccountDetails) GetId() *string { + if a == nil { + return nil + } + return a.Id +} + +func (a *AccountDetails) GetIntegration() *string { + if a == nil { + return nil + } + return a.Integration +} + +func (a *AccountDetails) GetIntegrationSlug() *string { + if a == nil { + return nil + } + return a.IntegrationSlug +} + +func (a *AccountDetails) GetCategory() *AccountDetailsCategory { + if a == nil { + return nil + } + return a.Category +} + +func (a *AccountDetails) GetEndUserOriginId() *string { + if a == nil { + return nil + } + return a.EndUserOriginId +} + +func (a *AccountDetails) GetEndUserOrganizationName() *string { + if a == nil { + return nil + } + return a.EndUserOrganizationName +} + +func (a *AccountDetails) GetEndUserEmailAddress() *string { + if a == nil { + return nil + } + return a.EndUserEmailAddress +} + +func (a *AccountDetails) GetStatus() *string { + if a == nil { + return nil + } + return a.Status +} + +func (a *AccountDetails) GetWebhookListenerUrl() *string { + if a == nil { + return nil + } + return a.WebhookListenerUrl +} + +func (a *AccountDetails) GetIsDuplicate() *bool { + if a == nil { + return nil + } + return a.IsDuplicate +} + +func (a *AccountDetails) GetAccountType() *string { + if a == nil { + return nil + } + return a.AccountType +} + +func (a *AccountDetails) GetCompletedAt() *time.Time { + if a == nil { + return nil + } + return a.CompletedAt +} + +func (a *AccountDetails) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AccountDetails) UnmarshalJSON(data []byte) error { + type embed AccountDetails + var unmarshaler = struct { + embed + CompletedAt *internal.DateTime `json:"completed_at,omitempty"` + }{ + embed: embed(*a), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *a = AccountDetails(unmarshaler.embed) + a.CompletedAt = unmarshaler.CompletedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AccountDetails) MarshalJSON() ([]byte, error) { + type embed AccountDetails + var marshaler = struct { + embed + CompletedAt *internal.DateTime `json:"completed_at,omitempty"` + }{ + embed: embed(*a), + CompletedAt: internal.NewOptionalDateTime(a.CompletedAt), + } + return json.Marshal(marshaler) +} + +func (a *AccountDetails) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} + +type AccountDetailsCategory struct { + CategoryEnum CategoryEnum + String string + + typ string +} + +func (a *AccountDetailsCategory) GetCategoryEnum() CategoryEnum { + if a == nil { + return "" + } + return a.CategoryEnum +} + +func (a *AccountDetailsCategory) GetString() string { + if a == nil { + return "" + } + return a.String +} + +func (a *AccountDetailsCategory) UnmarshalJSON(data []byte) error { + var valueCategoryEnum CategoryEnum + if err := json.Unmarshal(data, &valueCategoryEnum); err == nil { + a.typ = "CategoryEnum" + a.CategoryEnum = valueCategoryEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + a.typ = "String" + a.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, a) +} + +func (a AccountDetailsCategory) MarshalJSON() ([]byte, error) { + if a.typ == "CategoryEnum" || a.CategoryEnum != "" { + return json.Marshal(a.CategoryEnum) + } + if a.typ == "String" || a.String != "" { + return json.Marshal(a.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type AccountDetailsCategoryVisitor interface { + VisitCategoryEnum(CategoryEnum) error + VisitString(string) error +} + +func (a *AccountDetailsCategory) Accept(visitor AccountDetailsCategoryVisitor) error { + if a.typ == "CategoryEnum" || a.CategoryEnum != "" { + return visitor.VisitCategoryEnum(a.CategoryEnum) + } + if a.typ == "String" || a.String != "" { + return visitor.VisitString(a.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} diff --git a/crm/account_token.go b/crm/account_token.go new file mode 100644 index 0000000..a3fbbb9 --- /dev/null +++ b/crm/account_token.go @@ -0,0 +1,71 @@ +// Code generated by Fern. DO NOT EDIT. + +package crm + +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" +) + +type AccountToken struct { + AccountToken string `json:"account_token" url:"account_token"` + Integration *AccountIntegration `json:"integration" url:"integration"` + Id string `json:"id" url:"id"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AccountToken) GetAccountToken() string { + if a == nil { + return "" + } + return a.AccountToken +} + +func (a *AccountToken) GetIntegration() *AccountIntegration { + if a == nil { + return nil + } + return a.Integration +} + +func (a *AccountToken) GetId() string { + if a == nil { + return "" + } + return a.Id +} + +func (a *AccountToken) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AccountToken) UnmarshalJSON(data []byte) error { + type unmarshaler AccountToken + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *a = AccountToken(value) + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AccountToken) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} diff --git a/crm/accountdetails/client.go b/crm/accountdetails/client.go index d6d3734..7c2f3ff 100644 --- a/crm/accountdetails/client.go +++ b/crm/accountdetails/client.go @@ -1,48 +1,65 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package accountdetails import ( context "context" - core "github.com/merge-api/merge-go-client/core" - crm "github.com/merge-api/merge-go-client/crm" + core "github.com/merge-api/merge-go-client/v2/core" + crm "github.com/merge-api/merge-go-client/v2/crm" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Get details for a linked account. -func (c *Client) Retrieve(ctx context.Context) (*crm.AccountDetails, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/account-details" +func (c *Client) Retrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*crm.AccountDetails, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/account-details" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *crm.AccountDetails if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/crm/accounts.go b/crm/accounts.go index 939a7ae..8e3c285 100644 --- a/crm/accounts.go +++ b/crm/accounts.go @@ -1,80 +1,594 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package crm import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type CrmAccountEndpointRequest struct { // Whether to include debug fields (such as log file links) in the response. - IsDebugMode *bool `json:"-"` + IsDebugMode *bool `json:"-" url:"is_debug_mode,omitempty"` // Whether or not third-party updates should be run asynchronously. - RunAsync *bool `json:"-"` - Model *AccountRequest `json:"model,omitempty"` + RunAsync *bool `json:"-" url:"run_async,omitempty"` + Model *AccountRequest `json:"model,omitempty" url:"-"` } type AccountsListRequest struct { // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *string `json:"-"` + Expand []*string `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - IncludeRemoteFields *bool `json:"-"` + IncludeRemoteFields *bool `json:"-" url:"include_remote_fields,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // If provided, will only return accounts with this name. - Name *string `json:"-"` + Name *string `json:"-" url:"name,omitempty"` // If provided, will only return accounts with this owner. - OwnerId *string `json:"-"` + OwnerId *string `json:"-" url:"owner_id,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` } type PatchedCrmAccountEndpointRequest struct { // Whether to include debug fields (such as log file links) in the response. - IsDebugMode *bool `json:"-"` + IsDebugMode *bool `json:"-" url:"is_debug_mode,omitempty"` // Whether or not third-party updates should be run asynchronously. - RunAsync *bool `json:"-"` - Model *PatchedAccountRequest `json:"model,omitempty"` + RunAsync *bool `json:"-" url:"run_async,omitempty"` + Model *PatchedAccountRequest `json:"model,omitempty" url:"-"` } type AccountsRemoteFieldClassesListRequest struct { // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - IncludeRemoteFields *bool `json:"-"` + IncludeRemoteFields *bool `json:"-" url:"include_remote_fields,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, will only return remote field classes with this is_common_model_field value - IsCommonModelField *bool `json:"-"` + IsCommonModelField *bool `json:"-" url:"is_common_model_field,omitempty"` + // If provided, will only return remote fields classes with this is_custom value + IsCustom *bool `json:"-" url:"is_custom,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` } type AccountsRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *string `json:"-"` + Expand []*string `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - IncludeRemoteFields *bool `json:"-"` + IncludeRemoteFields *bool `json:"-" url:"include_remote_fields,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` +} + +// # The Account Object +// ### Description +// The `Account` object is used to represent a company in a CRM system. +// ### Usage Example +// TODO +type AccountRequest struct { + // The account's owner. + Owner *AccountRequestOwner `json:"owner,omitempty" url:"owner,omitempty"` + // The account's name. + Name *string `json:"name,omitempty" url:"name,omitempty"` + // The account's description. + Description *string `json:"description,omitempty" url:"description,omitempty"` + // The account's industry. + Industry *string `json:"industry,omitempty" url:"industry,omitempty"` + // The account's website. + Website *string `json:"website,omitempty" url:"website,omitempty"` + // The account's number of employees. + NumberOfEmployees *int `json:"number_of_employees,omitempty" url:"number_of_employees,omitempty"` + Addresses []*AddressRequest `json:"addresses,omitempty" url:"addresses,omitempty"` + // The last date (either most recent or furthest in the future) of when an activity occurs in an account. + LastActivityAt *time.Time `json:"last_activity_at,omitempty" url:"last_activity_at,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + RemoteFields []*RemoteFieldRequest `json:"remote_fields,omitempty" url:"remote_fields,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AccountRequest) GetOwner() *AccountRequestOwner { + if a == nil { + return nil + } + return a.Owner +} + +func (a *AccountRequest) GetName() *string { + if a == nil { + return nil + } + return a.Name +} + +func (a *AccountRequest) GetDescription() *string { + if a == nil { + return nil + } + return a.Description +} + +func (a *AccountRequest) GetIndustry() *string { + if a == nil { + return nil + } + return a.Industry +} + +func (a *AccountRequest) GetWebsite() *string { + if a == nil { + return nil + } + return a.Website +} + +func (a *AccountRequest) GetNumberOfEmployees() *int { + if a == nil { + return nil + } + return a.NumberOfEmployees +} + +func (a *AccountRequest) GetAddresses() []*AddressRequest { + if a == nil { + return nil + } + return a.Addresses +} + +func (a *AccountRequest) GetLastActivityAt() *time.Time { + if a == nil { + return nil + } + return a.LastActivityAt +} + +func (a *AccountRequest) GetIntegrationParams() map[string]interface{} { + if a == nil { + return nil + } + return a.IntegrationParams +} + +func (a *AccountRequest) GetLinkedAccountParams() map[string]interface{} { + if a == nil { + return nil + } + return a.LinkedAccountParams +} + +func (a *AccountRequest) GetRemoteFields() []*RemoteFieldRequest { + if a == nil { + return nil + } + return a.RemoteFields +} + +func (a *AccountRequest) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AccountRequest) UnmarshalJSON(data []byte) error { + type embed AccountRequest + var unmarshaler = struct { + embed + LastActivityAt *internal.DateTime `json:"last_activity_at,omitempty"` + }{ + embed: embed(*a), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *a = AccountRequest(unmarshaler.embed) + a.LastActivityAt = unmarshaler.LastActivityAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AccountRequest) MarshalJSON() ([]byte, error) { + type embed AccountRequest + var marshaler = struct { + embed + LastActivityAt *internal.DateTime `json:"last_activity_at,omitempty"` + }{ + embed: embed(*a), + LastActivityAt: internal.NewOptionalDateTime(a.LastActivityAt), + } + return json.Marshal(marshaler) +} + +func (a *AccountRequest) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} + +// The account's owner. +type AccountRequestOwner struct { + String string + User *User + + typ string +} + +func (a *AccountRequestOwner) GetString() string { + if a == nil { + return "" + } + return a.String +} + +func (a *AccountRequestOwner) GetUser() *User { + if a == nil { + return nil + } + return a.User +} + +func (a *AccountRequestOwner) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + a.typ = "String" + a.String = valueString + return nil + } + valueUser := new(User) + if err := json.Unmarshal(data, &valueUser); err == nil { + a.typ = "User" + a.User = valueUser + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, a) +} + +func (a AccountRequestOwner) MarshalJSON() ([]byte, error) { + if a.typ == "String" || a.String != "" { + return json.Marshal(a.String) + } + if a.typ == "User" || a.User != nil { + return json.Marshal(a.User) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type AccountRequestOwnerVisitor interface { + VisitString(string) error + VisitUser(*User) error +} + +func (a *AccountRequestOwner) Accept(visitor AccountRequestOwnerVisitor) error { + if a.typ == "String" || a.String != "" { + return visitor.VisitString(a.String) + } + if a.typ == "User" || a.User != nil { + return visitor.VisitUser(a.User) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type CrmAccountResponse struct { + Model *Account `json:"model" url:"model"` + Warnings []*WarningValidationProblem `json:"warnings" url:"warnings"` + Errors []*ErrorValidationProblem `json:"errors" url:"errors"` + Logs []*DebugModeLog `json:"logs,omitempty" url:"logs,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (c *CrmAccountResponse) GetModel() *Account { + if c == nil { + return nil + } + return c.Model +} + +func (c *CrmAccountResponse) GetWarnings() []*WarningValidationProblem { + if c == nil { + return nil + } + return c.Warnings +} + +func (c *CrmAccountResponse) GetErrors() []*ErrorValidationProblem { + if c == nil { + return nil + } + return c.Errors +} + +func (c *CrmAccountResponse) GetLogs() []*DebugModeLog { + if c == nil { + return nil + } + return c.Logs +} + +func (c *CrmAccountResponse) GetExtraProperties() map[string]interface{} { + return c.extraProperties +} + +func (c *CrmAccountResponse) UnmarshalJSON(data []byte) error { + type unmarshaler CrmAccountResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *c = CrmAccountResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *c) + if err != nil { + return err + } + c.extraProperties = extraProperties + c.rawJSON = json.RawMessage(data) + return nil +} + +func (c *CrmAccountResponse) String() string { + if len(c.rawJSON) > 0 { + if value, err := internal.StringifyJSON(c.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(c); err == nil { + return value + } + return fmt.Sprintf("%#v", c) +} + +type PaginatedAccountList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Account `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedAccountList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedAccountList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedAccountList) GetResults() []*Account { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedAccountList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedAccountList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedAccountList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedAccountList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedAccountList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +// # The Account Object +// ### Description +// The `Account` object is used to represent a company in a CRM system. +// ### Usage Example +// TODO +type PatchedAccountRequest struct { + // The account's owner. + Owner *string `json:"owner,omitempty" url:"owner,omitempty"` + // The account's name. + Name *string `json:"name,omitempty" url:"name,omitempty"` + // The account's description. + Description *string `json:"description,omitempty" url:"description,omitempty"` + // The account's industry. + Industry *string `json:"industry,omitempty" url:"industry,omitempty"` + // The account's website. + Website *string `json:"website,omitempty" url:"website,omitempty"` + // The account's number of employees. + NumberOfEmployees *int `json:"number_of_employees,omitempty" url:"number_of_employees,omitempty"` + Addresses []*AddressRequest `json:"addresses,omitempty" url:"addresses,omitempty"` + // The last date (either most recent or furthest in the future) of when an activity occurs in an account. + LastActivityAt *time.Time `json:"last_activity_at,omitempty" url:"last_activity_at,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + RemoteFields []*RemoteFieldRequest `json:"remote_fields,omitempty" url:"remote_fields,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PatchedAccountRequest) GetOwner() *string { + if p == nil { + return nil + } + return p.Owner +} + +func (p *PatchedAccountRequest) GetName() *string { + if p == nil { + return nil + } + return p.Name +} + +func (p *PatchedAccountRequest) GetDescription() *string { + if p == nil { + return nil + } + return p.Description +} + +func (p *PatchedAccountRequest) GetIndustry() *string { + if p == nil { + return nil + } + return p.Industry +} + +func (p *PatchedAccountRequest) GetWebsite() *string { + if p == nil { + return nil + } + return p.Website +} + +func (p *PatchedAccountRequest) GetNumberOfEmployees() *int { + if p == nil { + return nil + } + return p.NumberOfEmployees +} + +func (p *PatchedAccountRequest) GetAddresses() []*AddressRequest { + if p == nil { + return nil + } + return p.Addresses +} + +func (p *PatchedAccountRequest) GetLastActivityAt() *time.Time { + if p == nil { + return nil + } + return p.LastActivityAt +} + +func (p *PatchedAccountRequest) GetIntegrationParams() map[string]interface{} { + if p == nil { + return nil + } + return p.IntegrationParams +} + +func (p *PatchedAccountRequest) GetLinkedAccountParams() map[string]interface{} { + if p == nil { + return nil + } + return p.LinkedAccountParams +} + +func (p *PatchedAccountRequest) GetRemoteFields() []*RemoteFieldRequest { + if p == nil { + return nil + } + return p.RemoteFields +} + +func (p *PatchedAccountRequest) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PatchedAccountRequest) UnmarshalJSON(data []byte) error { + type embed PatchedAccountRequest + var unmarshaler = struct { + embed + LastActivityAt *internal.DateTime `json:"last_activity_at,omitempty"` + }{ + embed: embed(*p), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *p = PatchedAccountRequest(unmarshaler.embed) + p.LastActivityAt = unmarshaler.LastActivityAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PatchedAccountRequest) MarshalJSON() ([]byte, error) { + type embed PatchedAccountRequest + var marshaler = struct { + embed + LastActivityAt *internal.DateTime `json:"last_activity_at,omitempty"` + }{ + embed: embed(*p), + LastActivityAt: internal.NewOptionalDateTime(p.LastActivityAt), + } + return json.Marshal(marshaler) +} + +func (p *PatchedAccountRequest) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) } diff --git a/crm/accounts/client.go b/crm/accounts/client.go index d0e9b91..7486c47 100644 --- a/crm/accounts/client.go +++ b/crm/accounts/client.go @@ -1,133 +1,135 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package accounts import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - crm "github.com/merge-api/merge-go-client/crm" + core "github.com/merge-api/merge-go-client/v2/core" + crm "github.com/merge-api/merge-go-client/v2/crm" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `Account` objects. -func (c *Client) List(ctx context.Context, request *crm.AccountsListRequest) (*crm.PaginatedAccountList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/accounts" - - queryParams := make(url.Values) - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeRemoteFields != nil { - queryParams.Add("include_remote_fields", fmt.Sprintf("%v", *request.IncludeRemoteFields)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.Name != nil { - queryParams.Add("name", fmt.Sprintf("%v", *request.Name)) - } - if request.OwnerId != nil { - queryParams.Add("owner_id", fmt.Sprintf("%v", *request.OwnerId)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *crm.PaginatedAccountList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *crm.AccountsListRequest, + opts ...option.RequestOption, +) (*core.Page[*crm.Account], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/accounts" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *crm.PaginatedAccountList) *internal.PageResponse[*string, *crm.Account] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *crm.Account]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Creates an `Account` object with the given values. -func (c *Client) Create(ctx context.Context, request *crm.CrmAccountEndpointRequest) (*crm.CrmAccountResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/accounts" - - queryParams := make(url.Values) - if request.IsDebugMode != nil { - queryParams.Add("is_debug_mode", fmt.Sprintf("%v", *request.IsDebugMode)) - } - if request.RunAsync != nil { - queryParams.Add("run_async", fmt.Sprintf("%v", *request.RunAsync)) +func (c *Client) Create( + ctx context.Context, + request *crm.CrmAccountEndpointRequest, + opts ...option.RequestOption, +) (*crm.CrmAccountResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/accounts" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *crm.CrmAccountResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -136,35 +138,46 @@ func (c *Client) Create(ctx context.Context, request *crm.CrmAccountEndpointRequ } // Returns an `Account` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *crm.AccountsRetrieveRequest) (*crm.Account, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"crm/v1/accounts/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeRemoteFields != nil { - queryParams.Add("include_remote_fields", fmt.Sprintf("%v", *request.IncludeRemoteFields)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *crm.AccountsRetrieveRequest, + opts ...option.RequestOption, +) (*crm.Account, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/crm/v1/accounts/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *crm.Account if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -173,33 +186,48 @@ func (c *Client) Retrieve(ctx context.Context, id string, request *crm.AccountsR } // Updates an `Account` object with the given `id`. -func (c *Client) PartialUpdate(ctx context.Context, id string, request *crm.PatchedCrmAccountEndpointRequest) (*crm.CrmAccountResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"crm/v1/accounts/%v", id) - - queryParams := make(url.Values) - if request.IsDebugMode != nil { - queryParams.Add("is_debug_mode", fmt.Sprintf("%v", *request.IsDebugMode)) - } - if request.RunAsync != nil { - queryParams.Add("run_async", fmt.Sprintf("%v", *request.RunAsync)) +func (c *Client) PartialUpdate( + ctx context.Context, + id string, + request *crm.PatchedCrmAccountEndpointRequest, + opts ...option.RequestOption, +) (*crm.CrmAccountResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/crm/v1/accounts/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *crm.CrmAccountResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPatch, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPatch, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -208,21 +236,38 @@ func (c *Client) PartialUpdate(ctx context.Context, id string, request *crm.Patc } // Returns metadata for `CRMAccount` PATCHs. -func (c *Client) MetaPatchRetrieve(ctx context.Context, id string) (*crm.MetaResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"crm/v1/accounts/meta/patch/%v", id) +func (c *Client) MetaPatchRetrieve( + ctx context.Context, + id string, + opts ...option.RequestOption, +) (*crm.MetaResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/crm/v1/accounts/meta/patch/%v", + id, + ) + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *crm.MetaResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -231,21 +276,34 @@ func (c *Client) MetaPatchRetrieve(ctx context.Context, id string) (*crm.MetaRes } // Returns metadata for `CRMAccount` POSTs. -func (c *Client) MetaPostRetrieve(ctx context.Context) (*crm.MetaResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/accounts/meta/post" +func (c *Client) MetaPostRetrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*crm.MetaResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/accounts/meta/post" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *crm.MetaResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -254,50 +312,60 @@ func (c *Client) MetaPostRetrieve(ctx context.Context) (*crm.MetaResponse, error } // Returns a list of `RemoteFieldClass` objects. -func (c *Client) RemoteFieldClassesList(ctx context.Context, request *crm.AccountsRemoteFieldClassesListRequest) (*crm.PaginatedRemoteFieldClassList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/accounts/remote-field-classes" - - queryParams := make(url.Values) - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeRemoteFields != nil { - queryParams.Add("include_remote_fields", fmt.Sprintf("%v", *request.IncludeRemoteFields)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.IsCommonModelField != nil { - queryParams.Add("is_common_model_field", fmt.Sprintf("%v", *request.IsCommonModelField)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *crm.PaginatedRemoteFieldClassList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) RemoteFieldClassesList( + ctx context.Context, + request *crm.AccountsRemoteFieldClassesListRequest, + opts ...option.RequestOption, +) (*core.Page[*crm.RemoteFieldClass], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/accounts/remote-field-classes" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *crm.PaginatedRemoteFieldClassList) *internal.PageResponse[*string, *crm.RemoteFieldClass] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *crm.RemoteFieldClass]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } diff --git a/crm/accounttoken/client.go b/crm/accounttoken/client.go index dc09a30..52c0826 100644 --- a/crm/accounttoken/client.go +++ b/crm/accounttoken/client.go @@ -1,49 +1,69 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package accounttoken import ( context "context" - fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - crm "github.com/merge-api/merge-go-client/crm" + core "github.com/merge-api/merge-go-client/v2/core" + crm "github.com/merge-api/merge-go-client/v2/crm" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns the account token for the end user with the provided public token. -func (c *Client) Retrieve(ctx context.Context, publicToken string) (*crm.AccountToken, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"crm/v1/account-token/%v", publicToken) +func (c *Client) Retrieve( + ctx context.Context, + publicToken string, + opts ...option.RequestOption, +) (*crm.AccountToken, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/crm/v1/account-token/%v", + publicToken, + ) + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *crm.AccountToken if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/crm/association_types.go b/crm/association_types.go index ce8cb06..8194181 100644 --- a/crm/association_types.go +++ b/crm/association_types.go @@ -1,47 +1,352 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package crm import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type CrmAssociationTypeEndpointRequest struct { // Whether to include debug fields (such as log file links) in the response. - IsDebugMode *bool `json:"-"` + IsDebugMode *bool `json:"-" url:"is_debug_mode,omitempty"` // Whether or not third-party updates should be run asynchronously. - RunAsync *bool `json:"-"` - Model *AssociationTypeRequestRequest `json:"model,omitempty"` + RunAsync *bool `json:"-" url:"run_async,omitempty"` + Model *AssociationTypeRequestRequest `json:"model,omitempty" url:"-"` } type CustomObjectClassesAssociationTypesListRequest struct { // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *string `json:"-"` + Expand []*string `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` } type CustomObjectClassesAssociationTypesRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *string `json:"-"` + Expand []*string `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` +} + +type AssociationTypeRequestRequest struct { + SourceObjectClass *ObjectClassDescriptionRequest `json:"source_object_class" url:"source_object_class"` + TargetObjectClasses []*ObjectClassDescriptionRequest `json:"target_object_classes" url:"target_object_classes"` + RemoteKeyName string `json:"remote_key_name" url:"remote_key_name"` + DisplayName *string `json:"display_name,omitempty" url:"display_name,omitempty"` + Cardinality *CardinalityEnum `json:"cardinality,omitempty" url:"cardinality,omitempty"` + IsRequired *bool `json:"is_required,omitempty" url:"is_required,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AssociationTypeRequestRequest) GetSourceObjectClass() *ObjectClassDescriptionRequest { + if a == nil { + return nil + } + return a.SourceObjectClass +} + +func (a *AssociationTypeRequestRequest) GetTargetObjectClasses() []*ObjectClassDescriptionRequest { + if a == nil { + return nil + } + return a.TargetObjectClasses +} + +func (a *AssociationTypeRequestRequest) GetRemoteKeyName() string { + if a == nil { + return "" + } + return a.RemoteKeyName +} + +func (a *AssociationTypeRequestRequest) GetDisplayName() *string { + if a == nil { + return nil + } + return a.DisplayName +} + +func (a *AssociationTypeRequestRequest) GetCardinality() *CardinalityEnum { + if a == nil { + return nil + } + return a.Cardinality +} + +func (a *AssociationTypeRequestRequest) GetIsRequired() *bool { + if a == nil { + return nil + } + return a.IsRequired +} + +func (a *AssociationTypeRequestRequest) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AssociationTypeRequestRequest) UnmarshalJSON(data []byte) error { + type unmarshaler AssociationTypeRequestRequest + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *a = AssociationTypeRequestRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AssociationTypeRequestRequest) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} + +type CrmAssociationTypeResponse struct { + Model *AssociationType `json:"model" url:"model"` + Warnings []*WarningValidationProblem `json:"warnings" url:"warnings"` + Errors []*ErrorValidationProblem `json:"errors" url:"errors"` + Logs []*DebugModeLog `json:"logs,omitempty" url:"logs,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (c *CrmAssociationTypeResponse) GetModel() *AssociationType { + if c == nil { + return nil + } + return c.Model +} + +func (c *CrmAssociationTypeResponse) GetWarnings() []*WarningValidationProblem { + if c == nil { + return nil + } + return c.Warnings +} + +func (c *CrmAssociationTypeResponse) GetErrors() []*ErrorValidationProblem { + if c == nil { + return nil + } + return c.Errors +} + +func (c *CrmAssociationTypeResponse) GetLogs() []*DebugModeLog { + if c == nil { + return nil + } + return c.Logs +} + +func (c *CrmAssociationTypeResponse) GetExtraProperties() map[string]interface{} { + return c.extraProperties +} + +func (c *CrmAssociationTypeResponse) UnmarshalJSON(data []byte) error { + type unmarshaler CrmAssociationTypeResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *c = CrmAssociationTypeResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *c) + if err != nil { + return err + } + c.extraProperties = extraProperties + c.rawJSON = json.RawMessage(data) + return nil +} + +func (c *CrmAssociationTypeResponse) String() string { + if len(c.rawJSON) > 0 { + if value, err := internal.StringifyJSON(c.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(c); err == nil { + return value + } + return fmt.Sprintf("%#v", c) +} + +type ObjectClassDescriptionRequest struct { + Id string `json:"id" url:"id"` + OriginType OriginTypeEnum `json:"origin_type" url:"origin_type"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (o *ObjectClassDescriptionRequest) GetId() string { + if o == nil { + return "" + } + return o.Id +} + +func (o *ObjectClassDescriptionRequest) GetOriginType() OriginTypeEnum { + if o == nil { + return "" + } + return o.OriginType +} + +func (o *ObjectClassDescriptionRequest) GetExtraProperties() map[string]interface{} { + return o.extraProperties +} + +func (o *ObjectClassDescriptionRequest) UnmarshalJSON(data []byte) error { + type unmarshaler ObjectClassDescriptionRequest + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *o = ObjectClassDescriptionRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *o) + if err != nil { + return err + } + o.extraProperties = extraProperties + o.rawJSON = json.RawMessage(data) + return nil +} + +func (o *ObjectClassDescriptionRequest) String() string { + if len(o.rawJSON) > 0 { + if value, err := internal.StringifyJSON(o.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(o); err == nil { + return value + } + return fmt.Sprintf("%#v", o) +} + +// * `CUSTOM_OBJECT` - CUSTOM_OBJECT +// * `COMMON_MODEL` - COMMON_MODEL +// * `REMOTE_ONLY_MODEL` - REMOTE_ONLY_MODEL +type OriginTypeEnum string + +const ( + OriginTypeEnumCustomObject OriginTypeEnum = "CUSTOM_OBJECT" + OriginTypeEnumCommonModel OriginTypeEnum = "COMMON_MODEL" + OriginTypeEnumRemoteOnlyModel OriginTypeEnum = "REMOTE_ONLY_MODEL" +) + +func NewOriginTypeEnumFromString(s string) (OriginTypeEnum, error) { + switch s { + case "CUSTOM_OBJECT": + return OriginTypeEnumCustomObject, nil + case "COMMON_MODEL": + return OriginTypeEnumCommonModel, nil + case "REMOTE_ONLY_MODEL": + return OriginTypeEnumRemoteOnlyModel, nil + } + var t OriginTypeEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (o OriginTypeEnum) Ptr() *OriginTypeEnum { + return &o +} + +type PaginatedAssociationTypeList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*AssociationType `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedAssociationTypeList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedAssociationTypeList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedAssociationTypeList) GetResults() []*AssociationType { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedAssociationTypeList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedAssociationTypeList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedAssociationTypeList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedAssociationTypeList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedAssociationTypeList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) } diff --git a/crm/associations.go b/crm/associations.go index 8170e2e..0a68a0c 100644 --- a/crm/associations.go +++ b/crm/associations.go @@ -1,41 +1,277 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package crm import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type CustomObjectClassesCustomObjectsAssociationsListRequest struct { // If provided, will only return opportunities with this association_type. - AssociationTypeId *string `json:"-"` + AssociationTypeId *string `json:"-" url:"association_type_id,omitempty"` // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *string `json:"-"` + Expand []*string `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` } type CustomObjectClassesCustomObjectsAssociationsUpdateRequest struct { // Whether to include debug fields (such as log file links) in the response. - IsDebugMode *bool `json:"-"` + IsDebugMode *bool `json:"-" url:"is_debug_mode,omitempty"` // Whether or not third-party updates should be run asynchronously. - RunAsync *bool `json:"-"` + RunAsync *bool `json:"-" url:"run_async,omitempty"` +} + +// # The Association Object +// ### Description +// The `Association` record refers to an instance of an Association Type. +// ### Usage Example +// TODO +type Association struct { + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + SourceObject *string `json:"source_object,omitempty" url:"source_object,omitempty"` + TargetObject *string `json:"target_object,omitempty" url:"target_object,omitempty"` + // The association type the association belongs to. + AssociationType *AssociationAssociationType `json:"association_type,omitempty" url:"association_type,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *Association) GetCreatedAt() *time.Time { + if a == nil { + return nil + } + return a.CreatedAt +} + +func (a *Association) GetModifiedAt() *time.Time { + if a == nil { + return nil + } + return a.ModifiedAt +} + +func (a *Association) GetSourceObject() *string { + if a == nil { + return nil + } + return a.SourceObject +} + +func (a *Association) GetTargetObject() *string { + if a == nil { + return nil + } + return a.TargetObject +} + +func (a *Association) GetAssociationType() *AssociationAssociationType { + if a == nil { + return nil + } + return a.AssociationType +} + +func (a *Association) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *Association) UnmarshalJSON(data []byte) error { + type embed Association + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*a), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *a = Association(unmarshaler.embed) + a.CreatedAt = unmarshaler.CreatedAt.TimePtr() + a.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *Association) MarshalJSON() ([]byte, error) { + type embed Association + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*a), + CreatedAt: internal.NewOptionalDateTime(a.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(a.ModifiedAt), + } + return json.Marshal(marshaler) +} + +func (a *Association) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} + +// The association type the association belongs to. +type AssociationAssociationType struct { + String string + AssociationType *AssociationType + + typ string +} + +func (a *AssociationAssociationType) GetString() string { + if a == nil { + return "" + } + return a.String +} + +func (a *AssociationAssociationType) GetAssociationType() *AssociationType { + if a == nil { + return nil + } + return a.AssociationType +} + +func (a *AssociationAssociationType) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + a.typ = "String" + a.String = valueString + return nil + } + valueAssociationType := new(AssociationType) + if err := json.Unmarshal(data, &valueAssociationType); err == nil { + a.typ = "AssociationType" + a.AssociationType = valueAssociationType + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, a) +} + +func (a AssociationAssociationType) MarshalJSON() ([]byte, error) { + if a.typ == "String" || a.String != "" { + return json.Marshal(a.String) + } + if a.typ == "AssociationType" || a.AssociationType != nil { + return json.Marshal(a.AssociationType) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type AssociationAssociationTypeVisitor interface { + VisitString(string) error + VisitAssociationType(*AssociationType) error +} + +func (a *AssociationAssociationType) Accept(visitor AssociationAssociationTypeVisitor) error { + if a.typ == "String" || a.String != "" { + return visitor.VisitString(a.String) + } + if a.typ == "AssociationType" || a.AssociationType != nil { + return visitor.VisitAssociationType(a.AssociationType) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type PaginatedAssociationList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Association `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedAssociationList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedAssociationList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedAssociationList) GetResults() []*Association { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedAssociationList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedAssociationList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedAssociationList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedAssociationList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedAssociationList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) } diff --git a/crm/associations/client.go b/crm/associations/client.go index 952d9cd..95404d3 100644 --- a/crm/associations/client.go +++ b/crm/associations/client.go @@ -1,126 +1,151 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package associations import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - crm "github.com/merge-api/merge-go-client/crm" + core "github.com/merge-api/merge-go-client/v2/core" + crm "github.com/merge-api/merge-go-client/v2/crm" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `Association` objects. -func (c *Client) CustomObjectClassesCustomObjectsAssociationsList(ctx context.Context, customObjectClassId string, objectId string, request *crm.CustomObjectClassesCustomObjectsAssociationsListRequest) (*crm.PaginatedAssociationList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"crm/v1/custom-object-classes/%v/custom-objects/%v/associations", customObjectClassId, objectId) - - queryParams := make(url.Values) - if request.AssociationTypeId != nil { - queryParams.Add("association_type_id", fmt.Sprintf("%v", *request.AssociationTypeId)) - } - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *crm.PaginatedAssociationList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) CustomObjectClassesCustomObjectsAssociationsList( + ctx context.Context, + customObjectClassId string, + objectId string, + request *crm.CustomObjectClassesCustomObjectsAssociationsListRequest, + opts ...option.RequestOption, +) (*core.Page[*crm.Association], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/crm/v1/custom-object-classes/%v/custom-objects/%v/associations", + customObjectClassId, + objectId, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *crm.PaginatedAssociationList) *internal.PageResponse[*string, *crm.Association] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *crm.Association]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Creates an Association between `source_object_id` and `target_object_id` of type `association_type_id`. -func (c *Client) CustomObjectClassesCustomObjectsAssociationsUpdate(ctx context.Context, associationTypeId string, sourceClassId string, sourceObjectId string, targetClassId string, targetObjectId string, request *crm.CustomObjectClassesCustomObjectsAssociationsUpdateRequest) (*crm.Association, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"crm/v1/custom-object-classes/%v/custom-objects/%v/associations/%v/%v/%v", associationTypeId, sourceClassId, sourceObjectId, targetClassId, targetObjectId) - - queryParams := make(url.Values) - if request.IsDebugMode != nil { - queryParams.Add("is_debug_mode", fmt.Sprintf("%v", *request.IsDebugMode)) - } - if request.RunAsync != nil { - queryParams.Add("run_async", fmt.Sprintf("%v", *request.RunAsync)) +func (c *Client) CustomObjectClassesCustomObjectsAssociationsUpdate( + ctx context.Context, + associationTypeId string, + sourceClassId string, + sourceObjectId string, + targetClassId string, + targetObjectId string, + request *crm.CustomObjectClassesCustomObjectsAssociationsUpdateRequest, + opts ...option.RequestOption, +) (*crm.Association, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/crm/v1/custom-object-classes/%v/custom-objects/%v/associations/%v/%v/%v", + sourceClassId, + sourceObjectId, + targetClassId, + targetObjectId, + associationTypeId, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *crm.Association if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPut, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPut, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/crm/associationtypes/client.go b/crm/associationtypes/client.go index 15e93dc..dfc0d44 100644 --- a/crm/associationtypes/client.go +++ b/crm/associationtypes/client.go @@ -1,124 +1,143 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package associationtypes import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - crm "github.com/merge-api/merge-go-client/crm" + core "github.com/merge-api/merge-go-client/v2/core" + crm "github.com/merge-api/merge-go-client/v2/crm" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `AssociationType` objects. -func (c *Client) CustomObjectClassesAssociationTypesList(ctx context.Context, customObjectClassId string, request *crm.CustomObjectClassesAssociationTypesListRequest) (*crm.PaginatedAssociationTypeList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"crm/v1/custom-object-classes/%v/association-types", customObjectClassId) - - queryParams := make(url.Values) - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *crm.PaginatedAssociationTypeList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) CustomObjectClassesAssociationTypesList( + ctx context.Context, + customObjectClassId string, + request *crm.CustomObjectClassesAssociationTypesListRequest, + opts ...option.RequestOption, +) (*core.Page[*crm.AssociationType], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/crm/v1/custom-object-classes/%v/association-types", + customObjectClassId, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *crm.PaginatedAssociationTypeList) *internal.PageResponse[*string, *crm.AssociationType] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *crm.AssociationType]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Creates an `AssociationType` object with the given values. -func (c *Client) CustomObjectClassesAssociationTypesCreate(ctx context.Context, customObjectClassId string, request *crm.CrmAssociationTypeEndpointRequest) (*crm.CrmAssociationTypeResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"crm/v1/custom-object-classes/%v/association-types", customObjectClassId) - - queryParams := make(url.Values) - if request.IsDebugMode != nil { - queryParams.Add("is_debug_mode", fmt.Sprintf("%v", *request.IsDebugMode)) - } - if request.RunAsync != nil { - queryParams.Add("run_async", fmt.Sprintf("%v", *request.RunAsync)) +func (c *Client) CustomObjectClassesAssociationTypesCreate( + ctx context.Context, + customObjectClassId string, + request *crm.CrmAssociationTypeEndpointRequest, + opts ...option.RequestOption, +) (*crm.CrmAssociationTypeResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/crm/v1/custom-object-classes/%v/association-types", + customObjectClassId, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *crm.CrmAssociationTypeResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -127,32 +146,48 @@ func (c *Client) CustomObjectClassesAssociationTypesCreate(ctx context.Context, } // Returns an `AssociationType` object with the given `id`. -func (c *Client) CustomObjectClassesAssociationTypesRetrieve(ctx context.Context, customObjectClassId string, id string, request *crm.CustomObjectClassesAssociationTypesRetrieveRequest) (*crm.AssociationType, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"crm/v1/custom-object-classes/%v/association-types/%v", customObjectClassId, id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) +func (c *Client) CustomObjectClassesAssociationTypesRetrieve( + ctx context.Context, + customObjectClassId string, + id string, + request *crm.CustomObjectClassesAssociationTypesRetrieveRequest, + opts ...option.RequestOption, +) (*crm.AssociationType, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/crm/v1/custom-object-classes/%v/association-types/%v", + customObjectClassId, + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *crm.AssociationType if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -161,21 +196,38 @@ func (c *Client) CustomObjectClassesAssociationTypesRetrieve(ctx context.Context } // Returns metadata for `CRMAssociationType` POSTs. -func (c *Client) CustomObjectClassesAssociationTypesMetaPostRetrieve(ctx context.Context, customObjectClassId string) (*crm.MetaResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"crm/v1/custom-object-classes/%v/association-types/meta/post", customObjectClassId) +func (c *Client) CustomObjectClassesAssociationTypesMetaPostRetrieve( + ctx context.Context, + customObjectClassId string, + opts ...option.RequestOption, +) (*crm.MetaResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/crm/v1/custom-object-classes/%v/association-types/meta/post", + customObjectClassId, + ) + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *crm.MetaResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/crm/async_passthrough.go b/crm/async_passthrough.go index f6acd9e..54f6de3 100644 --- a/crm/async_passthrough.go +++ b/crm/async_passthrough.go @@ -1,36 +1,44 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package crm import ( json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" ) type AsyncPassthroughRetrieveResponse struct { - typeName string RemoteResponse *RemoteResponse String string + + typ string } -func NewAsyncPassthroughRetrieveResponseFromRemoteResponse(value *RemoteResponse) *AsyncPassthroughRetrieveResponse { - return &AsyncPassthroughRetrieveResponse{typeName: "remoteResponse", RemoteResponse: value} +func (a *AsyncPassthroughRetrieveResponse) GetRemoteResponse() *RemoteResponse { + if a == nil { + return nil + } + return a.RemoteResponse } -func NewAsyncPassthroughRetrieveResponseFromString(value string) *AsyncPassthroughRetrieveResponse { - return &AsyncPassthroughRetrieveResponse{typeName: "string", String: value} +func (a *AsyncPassthroughRetrieveResponse) GetString() string { + if a == nil { + return "" + } + return a.String } func (a *AsyncPassthroughRetrieveResponse) UnmarshalJSON(data []byte) error { valueRemoteResponse := new(RemoteResponse) if err := json.Unmarshal(data, &valueRemoteResponse); err == nil { - a.typeName = "remoteResponse" + a.typ = "RemoteResponse" a.RemoteResponse = valueRemoteResponse return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" + a.typ = "String" a.String = valueString return nil } @@ -38,14 +46,13 @@ func (a *AsyncPassthroughRetrieveResponse) UnmarshalJSON(data []byte) error { } func (a AsyncPassthroughRetrieveResponse) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "remoteResponse": + if a.typ == "RemoteResponse" || a.RemoteResponse != nil { return json.Marshal(a.RemoteResponse) - case "string": + } + if a.typ == "String" || a.String != "" { return json.Marshal(a.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) } type AsyncPassthroughRetrieveResponseVisitor interface { @@ -54,12 +61,57 @@ type AsyncPassthroughRetrieveResponseVisitor interface { } func (a *AsyncPassthroughRetrieveResponse) Accept(visitor AsyncPassthroughRetrieveResponseVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "remoteResponse": + if a.typ == "RemoteResponse" || a.RemoteResponse != nil { return visitor.VisitRemoteResponse(a.RemoteResponse) - case "string": + } + if a.typ == "String" || a.String != "" { return visitor.VisitString(a.String) } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type AsyncPassthroughReciept struct { + AsyncPassthroughReceiptId string `json:"async_passthrough_receipt_id" url:"async_passthrough_receipt_id"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AsyncPassthroughReciept) GetAsyncPassthroughReceiptId() string { + if a == nil { + return "" + } + return a.AsyncPassthroughReceiptId +} + +func (a *AsyncPassthroughReciept) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AsyncPassthroughReciept) UnmarshalJSON(data []byte) error { + type unmarshaler AsyncPassthroughReciept + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *a = AsyncPassthroughReciept(value) + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AsyncPassthroughReciept) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) } diff --git a/crm/asyncpassthrough/client.go b/crm/asyncpassthrough/client.go index c328ef7..3476edc 100644 --- a/crm/asyncpassthrough/client.go +++ b/crm/asyncpassthrough/client.go @@ -1,50 +1,68 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package asyncpassthrough import ( context "context" - fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - crm "github.com/merge-api/merge-go-client/crm" + core "github.com/merge-api/merge-go-client/v2/core" + crm "github.com/merge-api/merge-go-client/v2/crm" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Asynchronously pull data from an endpoint not currently supported by Merge. -func (c *Client) Create(ctx context.Context, request *crm.DataPassthroughRequest) (*crm.AsyncPassthroughReciept, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/async-passthrough" +func (c *Client) Create( + ctx context.Context, + request *crm.DataPassthroughRequest, + opts ...option.RequestOption, +) (*crm.AsyncPassthroughReciept, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/async-passthrough" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *crm.AsyncPassthroughReciept if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -53,21 +71,38 @@ func (c *Client) Create(ctx context.Context, request *crm.DataPassthroughRequest } // Retrieves data from earlier async-passthrough POST request -func (c *Client) Retrieve(ctx context.Context, asyncPassthroughReceiptId string) (*crm.AsyncPassthroughRetrieveResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"crm/v1/async-passthrough/%v", asyncPassthroughReceiptId) +func (c *Client) Retrieve( + ctx context.Context, + asyncPassthroughReceiptId string, + opts ...option.RequestOption, +) (*crm.AsyncPassthroughRetrieveResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/crm/v1/async-passthrough/%v", + asyncPassthroughReceiptId, + ) + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *crm.AsyncPassthroughRetrieveResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/crm/audit_trail.go b/crm/audit_trail.go index cb6bb58..f5fa787 100644 --- a/crm/audit_trail.go +++ b/crm/audit_trail.go @@ -1,18 +1,667 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package crm +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" + time "time" +) + type AuditTrailListRequest struct { // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // If included, will only include audit trail events that occurred before this time - EndDate *string `json:"-"` - // 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`, `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED` - EventType *string `json:"-"` + EndDate *string `json:"-" url:"end_date,omitempty"` + // 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`, `REGENERATED_WEBHOOK_SIGNATURE`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `DELETED_ALL_COMMON_MODELS_FOR_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`, `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED` + EventType *string `json:"-" url:"event_type,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // If included, will only include audit trail events that occurred after this time - StartDate *string `json:"-"` + StartDate *string `json:"-" url:"start_date,omitempty"` // If provided, this will return events associated with the specified user email. Please note that the email address reflects the user's email at the time of the event, and may not be their current email. - UserEmail *string `json:"-"` + UserEmail *string `json:"-" url:"user_email,omitempty"` +} + +type AuditLogEvent struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The User's full name at the time of this Event occurring. + UserName *string `json:"user_name,omitempty" url:"user_name,omitempty"` + // The User's email at the time of this Event occurring. + UserEmail *string `json:"user_email,omitempty" url:"user_email,omitempty"` + // Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. + // + // * `ADMIN` - ADMIN + // * `DEVELOPER` - DEVELOPER + // * `MEMBER` - MEMBER + // * `API` - API + // * `SYSTEM` - SYSTEM + // * `MERGE_TEAM` - MERGE_TEAM + Role *AuditLogEventRole `json:"role" url:"role"` + IpAddress string `json:"ip_address" url:"ip_address"` + // Designates the type of event that occurred. + // + // * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + // * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + // * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + // * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + // * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + // * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + // * `INVITED_USER` - INVITED_USER + // * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + // * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + // * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + // * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + // * `CREATED_DESTINATION` - CREATED_DESTINATION + // * `DELETED_DESTINATION` - DELETED_DESTINATION + // * `CHANGED_DESTINATION` - CHANGED_DESTINATION + // * `CHANGED_SCOPES` - CHANGED_SCOPES + // * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + // * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + // * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + // * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + // * `ENABLED_CATEGORY` - ENABLED_CATEGORY + // * `DISABLED_CATEGORY` - DISABLED_CATEGORY + // * `CHANGED_PASSWORD` - CHANGED_PASSWORD + // * `RESET_PASSWORD` - RESET_PASSWORD + // * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + // * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + // * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + // * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + // * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING + // * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING + // * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + // * `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 + // * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + // * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + // * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + // * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + // * `MUTED_ISSUE` - MUTED_ISSUE + // * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + // * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + // * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + // * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + // * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + EventType *AuditLogEventEventType `json:"event_type" url:"event_type"` + EventDescription string `json:"event_description" url:"event_description"` + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AuditLogEvent) GetId() *string { + if a == nil { + return nil + } + return a.Id +} + +func (a *AuditLogEvent) GetUserName() *string { + if a == nil { + return nil + } + return a.UserName +} + +func (a *AuditLogEvent) GetUserEmail() *string { + if a == nil { + return nil + } + return a.UserEmail +} + +func (a *AuditLogEvent) GetRole() *AuditLogEventRole { + if a == nil { + return nil + } + return a.Role +} + +func (a *AuditLogEvent) GetIpAddress() string { + if a == nil { + return "" + } + return a.IpAddress +} + +func (a *AuditLogEvent) GetEventType() *AuditLogEventEventType { + if a == nil { + return nil + } + return a.EventType +} + +func (a *AuditLogEvent) GetEventDescription() string { + if a == nil { + return "" + } + return a.EventDescription +} + +func (a *AuditLogEvent) GetCreatedAt() *time.Time { + if a == nil { + return nil + } + return a.CreatedAt +} + +func (a *AuditLogEvent) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AuditLogEvent) UnmarshalJSON(data []byte) error { + type embed AuditLogEvent + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + }{ + embed: embed(*a), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *a = AuditLogEvent(unmarshaler.embed) + a.CreatedAt = unmarshaler.CreatedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AuditLogEvent) MarshalJSON() ([]byte, error) { + type embed AuditLogEvent + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + }{ + embed: embed(*a), + CreatedAt: internal.NewOptionalDateTime(a.CreatedAt), + } + return json.Marshal(marshaler) +} + +func (a *AuditLogEvent) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} + +// Designates the type of event that occurred. +// +// * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY +// * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY +// * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY +// * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY +// * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY +// * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE +// * `INVITED_USER` - INVITED_USER +// * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED +// * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED +// * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT +// * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT +// * `CREATED_DESTINATION` - CREATED_DESTINATION +// * `DELETED_DESTINATION` - DELETED_DESTINATION +// * `CHANGED_DESTINATION` - CHANGED_DESTINATION +// * `CHANGED_SCOPES` - CHANGED_SCOPES +// * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION +// * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS +// * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION +// * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION +// * `ENABLED_CATEGORY` - ENABLED_CATEGORY +// * `DISABLED_CATEGORY` - DISABLED_CATEGORY +// * `CHANGED_PASSWORD` - CHANGED_PASSWORD +// * `RESET_PASSWORD` - RESET_PASSWORD +// * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION +// * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT +// * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION +// * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT +// * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING +// * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING +// * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING +// * `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 +// * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE +// * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE +// * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE +// * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC +// * `MUTED_ISSUE` - MUTED_ISSUE +// * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK +// * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK +// * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK +// * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED +// * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED +type AuditLogEventEventType struct { + EventTypeEnum EventTypeEnum + String string + + typ string +} + +func (a *AuditLogEventEventType) GetEventTypeEnum() EventTypeEnum { + if a == nil { + return "" + } + return a.EventTypeEnum +} + +func (a *AuditLogEventEventType) GetString() string { + if a == nil { + return "" + } + return a.String +} + +func (a *AuditLogEventEventType) UnmarshalJSON(data []byte) error { + var valueEventTypeEnum EventTypeEnum + if err := json.Unmarshal(data, &valueEventTypeEnum); err == nil { + a.typ = "EventTypeEnum" + a.EventTypeEnum = valueEventTypeEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + a.typ = "String" + a.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, a) +} + +func (a AuditLogEventEventType) MarshalJSON() ([]byte, error) { + if a.typ == "EventTypeEnum" || a.EventTypeEnum != "" { + return json.Marshal(a.EventTypeEnum) + } + if a.typ == "String" || a.String != "" { + return json.Marshal(a.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type AuditLogEventEventTypeVisitor interface { + VisitEventTypeEnum(EventTypeEnum) error + VisitString(string) error +} + +func (a *AuditLogEventEventType) Accept(visitor AuditLogEventEventTypeVisitor) error { + if a.typ == "EventTypeEnum" || a.EventTypeEnum != "" { + return visitor.VisitEventTypeEnum(a.EventTypeEnum) + } + if a.typ == "String" || a.String != "" { + return visitor.VisitString(a.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} + +// Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. +// +// * `ADMIN` - ADMIN +// * `DEVELOPER` - DEVELOPER +// * `MEMBER` - MEMBER +// * `API` - API +// * `SYSTEM` - SYSTEM +// * `MERGE_TEAM` - MERGE_TEAM +type AuditLogEventRole struct { + RoleEnum RoleEnum + String string + + typ string +} + +func (a *AuditLogEventRole) GetRoleEnum() RoleEnum { + if a == nil { + return "" + } + return a.RoleEnum +} + +func (a *AuditLogEventRole) GetString() string { + if a == nil { + return "" + } + return a.String +} + +func (a *AuditLogEventRole) UnmarshalJSON(data []byte) error { + var valueRoleEnum RoleEnum + if err := json.Unmarshal(data, &valueRoleEnum); err == nil { + a.typ = "RoleEnum" + a.RoleEnum = valueRoleEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + a.typ = "String" + a.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, a) +} + +func (a AuditLogEventRole) MarshalJSON() ([]byte, error) { + if a.typ == "RoleEnum" || a.RoleEnum != "" { + return json.Marshal(a.RoleEnum) + } + if a.typ == "String" || a.String != "" { + return json.Marshal(a.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type AuditLogEventRoleVisitor interface { + VisitRoleEnum(RoleEnum) error + VisitString(string) error +} + +func (a *AuditLogEventRole) Accept(visitor AuditLogEventRoleVisitor) error { + if a.typ == "RoleEnum" || a.RoleEnum != "" { + return visitor.VisitRoleEnum(a.RoleEnum) + } + if a.typ == "String" || a.String != "" { + return visitor.VisitString(a.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} + +// * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY +// * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY +// * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY +// * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY +// * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY +// * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE +// * `INVITED_USER` - INVITED_USER +// * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED +// * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED +// * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT +// * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT +// * `CREATED_DESTINATION` - CREATED_DESTINATION +// * `DELETED_DESTINATION` - DELETED_DESTINATION +// * `CHANGED_DESTINATION` - CHANGED_DESTINATION +// * `CHANGED_SCOPES` - CHANGED_SCOPES +// * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION +// * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS +// * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION +// * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION +// * `ENABLED_CATEGORY` - ENABLED_CATEGORY +// * `DISABLED_CATEGORY` - DISABLED_CATEGORY +// * `CHANGED_PASSWORD` - CHANGED_PASSWORD +// * `RESET_PASSWORD` - RESET_PASSWORD +// * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION +// * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT +// * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION +// * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT +// * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING +// * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING +// * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING +// * `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 +// * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE +// * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE +// * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE +// * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC +// * `MUTED_ISSUE` - MUTED_ISSUE +// * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK +// * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK +// * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK +// * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED +// * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED +type EventTypeEnum string + +const ( + EventTypeEnumCreatedRemoteProductionApiKey EventTypeEnum = "CREATED_REMOTE_PRODUCTION_API_KEY" + EventTypeEnumDeletedRemoteProductionApiKey EventTypeEnum = "DELETED_REMOTE_PRODUCTION_API_KEY" + EventTypeEnumCreatedTestApiKey EventTypeEnum = "CREATED_TEST_API_KEY" + EventTypeEnumDeletedTestApiKey EventTypeEnum = "DELETED_TEST_API_KEY" + EventTypeEnumRegeneratedProductionApiKey EventTypeEnum = "REGENERATED_PRODUCTION_API_KEY" + EventTypeEnumRegeneratedWebhookSignature EventTypeEnum = "REGENERATED_WEBHOOK_SIGNATURE" + EventTypeEnumInvitedUser EventTypeEnum = "INVITED_USER" + EventTypeEnumTwoFactorAuthEnabled EventTypeEnum = "TWO_FACTOR_AUTH_ENABLED" + EventTypeEnumTwoFactorAuthDisabled EventTypeEnum = "TWO_FACTOR_AUTH_DISABLED" + EventTypeEnumDeletedLinkedAccount EventTypeEnum = "DELETED_LINKED_ACCOUNT" + EventTypeEnumDeletedAllCommonModelsForLinkedAccount EventTypeEnum = "DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT" + EventTypeEnumCreatedDestination EventTypeEnum = "CREATED_DESTINATION" + EventTypeEnumDeletedDestination EventTypeEnum = "DELETED_DESTINATION" + EventTypeEnumChangedDestination EventTypeEnum = "CHANGED_DESTINATION" + EventTypeEnumChangedScopes EventTypeEnum = "CHANGED_SCOPES" + EventTypeEnumChangedPersonalInformation EventTypeEnum = "CHANGED_PERSONAL_INFORMATION" + EventTypeEnumChangedOrganizationSettings EventTypeEnum = "CHANGED_ORGANIZATION_SETTINGS" + EventTypeEnumEnabledIntegration EventTypeEnum = "ENABLED_INTEGRATION" + EventTypeEnumDisabledIntegration EventTypeEnum = "DISABLED_INTEGRATION" + EventTypeEnumEnabledCategory EventTypeEnum = "ENABLED_CATEGORY" + EventTypeEnumDisabledCategory EventTypeEnum = "DISABLED_CATEGORY" + EventTypeEnumChangedPassword EventTypeEnum = "CHANGED_PASSWORD" + EventTypeEnumResetPassword EventTypeEnum = "RESET_PASSWORD" + EventTypeEnumEnabledRedactUnmappedDataForOrganization EventTypeEnum = "ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION" + EventTypeEnumEnabledRedactUnmappedDataForLinkedAccount EventTypeEnum = "ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT" + EventTypeEnumDisabledRedactUnmappedDataForOrganization EventTypeEnum = "DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION" + EventTypeEnumDisabledRedactUnmappedDataForLinkedAccount EventTypeEnum = "DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT" + EventTypeEnumCreatedIntegrationWideFieldMapping EventTypeEnum = "CREATED_INTEGRATION_WIDE_FIELD_MAPPING" + EventTypeEnumCreatedLinkedAccountFieldMapping EventTypeEnum = "CREATED_LINKED_ACCOUNT_FIELD_MAPPING" + EventTypeEnumChangedIntegrationWideFieldMapping EventTypeEnum = "CHANGED_INTEGRATION_WIDE_FIELD_MAPPING" + EventTypeEnumChangedLinkedAccountFieldMapping EventTypeEnum = "CHANGED_LINKED_ACCOUNT_FIELD_MAPPING" + EventTypeEnumDeletedIntegrationWideFieldMapping EventTypeEnum = "DELETED_INTEGRATION_WIDE_FIELD_MAPPING" + EventTypeEnumDeletedLinkedAccountFieldMapping EventTypeEnum = "DELETED_LINKED_ACCOUNT_FIELD_MAPPING" + EventTypeEnumCreatedLinkedAccountCommonModelOverride EventTypeEnum = "CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE" + EventTypeEnumChangedLinkedAccountCommonModelOverride EventTypeEnum = "CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE" + EventTypeEnumDeletedLinkedAccountCommonModelOverride EventTypeEnum = "DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE" + EventTypeEnumForcedLinkedAccountResync EventTypeEnum = "FORCED_LINKED_ACCOUNT_RESYNC" + EventTypeEnumMutedIssue EventTypeEnum = "MUTED_ISSUE" + EventTypeEnumGeneratedMagicLink EventTypeEnum = "GENERATED_MAGIC_LINK" + EventTypeEnumEnabledMergeWebhook EventTypeEnum = "ENABLED_MERGE_WEBHOOK" + EventTypeEnumDisabledMergeWebhook EventTypeEnum = "DISABLED_MERGE_WEBHOOK" + EventTypeEnumMergeWebhookTargetChanged EventTypeEnum = "MERGE_WEBHOOK_TARGET_CHANGED" + EventTypeEnumEndUserCredentialsAccessed EventTypeEnum = "END_USER_CREDENTIALS_ACCESSED" +) + +func NewEventTypeEnumFromString(s string) (EventTypeEnum, error) { + switch s { + case "CREATED_REMOTE_PRODUCTION_API_KEY": + return EventTypeEnumCreatedRemoteProductionApiKey, nil + case "DELETED_REMOTE_PRODUCTION_API_KEY": + return EventTypeEnumDeletedRemoteProductionApiKey, nil + case "CREATED_TEST_API_KEY": + return EventTypeEnumCreatedTestApiKey, nil + case "DELETED_TEST_API_KEY": + return EventTypeEnumDeletedTestApiKey, nil + case "REGENERATED_PRODUCTION_API_KEY": + return EventTypeEnumRegeneratedProductionApiKey, nil + case "REGENERATED_WEBHOOK_SIGNATURE": + return EventTypeEnumRegeneratedWebhookSignature, nil + case "INVITED_USER": + return EventTypeEnumInvitedUser, nil + case "TWO_FACTOR_AUTH_ENABLED": + return EventTypeEnumTwoFactorAuthEnabled, nil + case "TWO_FACTOR_AUTH_DISABLED": + return EventTypeEnumTwoFactorAuthDisabled, nil + case "DELETED_LINKED_ACCOUNT": + return EventTypeEnumDeletedLinkedAccount, nil + case "DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT": + return EventTypeEnumDeletedAllCommonModelsForLinkedAccount, nil + case "CREATED_DESTINATION": + return EventTypeEnumCreatedDestination, nil + case "DELETED_DESTINATION": + return EventTypeEnumDeletedDestination, nil + case "CHANGED_DESTINATION": + return EventTypeEnumChangedDestination, nil + case "CHANGED_SCOPES": + return EventTypeEnumChangedScopes, nil + case "CHANGED_PERSONAL_INFORMATION": + return EventTypeEnumChangedPersonalInformation, nil + case "CHANGED_ORGANIZATION_SETTINGS": + return EventTypeEnumChangedOrganizationSettings, nil + case "ENABLED_INTEGRATION": + return EventTypeEnumEnabledIntegration, nil + case "DISABLED_INTEGRATION": + return EventTypeEnumDisabledIntegration, nil + case "ENABLED_CATEGORY": + return EventTypeEnumEnabledCategory, nil + case "DISABLED_CATEGORY": + return EventTypeEnumDisabledCategory, nil + case "CHANGED_PASSWORD": + return EventTypeEnumChangedPassword, nil + case "RESET_PASSWORD": + return EventTypeEnumResetPassword, nil + case "ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION": + return EventTypeEnumEnabledRedactUnmappedDataForOrganization, nil + case "ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT": + return EventTypeEnumEnabledRedactUnmappedDataForLinkedAccount, nil + case "DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION": + return EventTypeEnumDisabledRedactUnmappedDataForOrganization, nil + case "DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT": + return EventTypeEnumDisabledRedactUnmappedDataForLinkedAccount, nil + case "CREATED_INTEGRATION_WIDE_FIELD_MAPPING": + return EventTypeEnumCreatedIntegrationWideFieldMapping, nil + case "CREATED_LINKED_ACCOUNT_FIELD_MAPPING": + return EventTypeEnumCreatedLinkedAccountFieldMapping, nil + case "CHANGED_INTEGRATION_WIDE_FIELD_MAPPING": + return EventTypeEnumChangedIntegrationWideFieldMapping, nil + case "CHANGED_LINKED_ACCOUNT_FIELD_MAPPING": + return EventTypeEnumChangedLinkedAccountFieldMapping, nil + case "DELETED_INTEGRATION_WIDE_FIELD_MAPPING": + return EventTypeEnumDeletedIntegrationWideFieldMapping, nil + case "DELETED_LINKED_ACCOUNT_FIELD_MAPPING": + return EventTypeEnumDeletedLinkedAccountFieldMapping, nil + case "CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE": + return EventTypeEnumCreatedLinkedAccountCommonModelOverride, nil + case "CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE": + return EventTypeEnumChangedLinkedAccountCommonModelOverride, nil + case "DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE": + return EventTypeEnumDeletedLinkedAccountCommonModelOverride, nil + case "FORCED_LINKED_ACCOUNT_RESYNC": + return EventTypeEnumForcedLinkedAccountResync, nil + case "MUTED_ISSUE": + return EventTypeEnumMutedIssue, nil + case "GENERATED_MAGIC_LINK": + return EventTypeEnumGeneratedMagicLink, nil + case "ENABLED_MERGE_WEBHOOK": + return EventTypeEnumEnabledMergeWebhook, nil + case "DISABLED_MERGE_WEBHOOK": + return EventTypeEnumDisabledMergeWebhook, nil + case "MERGE_WEBHOOK_TARGET_CHANGED": + return EventTypeEnumMergeWebhookTargetChanged, nil + case "END_USER_CREDENTIALS_ACCESSED": + return EventTypeEnumEndUserCredentialsAccessed, nil + } + var t EventTypeEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (e EventTypeEnum) Ptr() *EventTypeEnum { + return &e +} + +type PaginatedAuditLogEventList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*AuditLogEvent `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedAuditLogEventList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedAuditLogEventList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedAuditLogEventList) GetResults() []*AuditLogEvent { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedAuditLogEventList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedAuditLogEventList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedAuditLogEventList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedAuditLogEventList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedAuditLogEventList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +// * `ADMIN` - ADMIN +// * `DEVELOPER` - DEVELOPER +// * `MEMBER` - MEMBER +// * `API` - API +// * `SYSTEM` - SYSTEM +// * `MERGE_TEAM` - MERGE_TEAM +type RoleEnum string + +const ( + RoleEnumAdmin RoleEnum = "ADMIN" + RoleEnumDeveloper RoleEnum = "DEVELOPER" + RoleEnumMember RoleEnum = "MEMBER" + RoleEnumApi RoleEnum = "API" + RoleEnumSystem RoleEnum = "SYSTEM" + RoleEnumMergeTeam RoleEnum = "MERGE_TEAM" +) + +func NewRoleEnumFromString(s string) (RoleEnum, error) { + switch s { + case "ADMIN": + return RoleEnumAdmin, nil + case "DEVELOPER": + return RoleEnumDeveloper, nil + case "MEMBER": + return RoleEnumMember, nil + case "API": + return RoleEnumApi, nil + case "SYSTEM": + return RoleEnumSystem, nil + case "MERGE_TEAM": + return RoleEnumMergeTeam, nil + } + var t RoleEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (r RoleEnum) Ptr() *RoleEnum { + return &r } diff --git a/crm/audittrail/client.go b/crm/audittrail/client.go index c78838c..c0b90d6 100644 --- a/crm/audittrail/client.go +++ b/crm/audittrail/client.go @@ -1,76 +1,92 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package audittrail import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - crm "github.com/merge-api/merge-go-client/crm" + core "github.com/merge-api/merge-go-client/v2/core" + crm "github.com/merge-api/merge-go-client/v2/crm" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Gets a list of audit trail events. -func (c *Client) List(ctx context.Context, request *crm.AuditTrailListRequest) (*crm.PaginatedAuditLogEventList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL +func (c *Client) List( + ctx context.Context, + request *crm.AuditTrailListRequest, + opts ...option.RequestOption, +) (*core.Page[*crm.AuditLogEvent], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/audit-trail" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } - endpointURL := baseURL + "/" + "crm/v1/audit-trail" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) - queryParams := make(url.Values) - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.EndDate != nil { - queryParams.Add("end_date", fmt.Sprintf("%v", *request.EndDate)) - } - if request.EventType != nil { - queryParams.Add("event_type", fmt.Sprintf("%v", *request.EventType)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } } - if request.StartDate != nil { - queryParams.Add("start_date", fmt.Sprintf("%v", *request.StartDate)) - } - if request.UserEmail != nil { - queryParams.Add("user_email", fmt.Sprintf("%v", *request.UserEmail)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *crm.PaginatedAuditLogEventList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { - return nil, err + readPageResponse := func(response *crm.PaginatedAuditLogEventList) *internal.PageResponse[*string, *crm.AuditLogEvent] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *crm.AuditLogEvent]{ + Next: next, + Results: results, + Done: next == zeroValue, + } } - return response, nil + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } diff --git a/crm/available_actions.go b/crm/available_actions.go new file mode 100644 index 0000000..4f150ac --- /dev/null +++ b/crm/available_actions.go @@ -0,0 +1,77 @@ +// Code generated by Fern. DO NOT EDIT. + +package crm + +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" +) + +// # The AvailableActions Object +// ### Description +// The `Activity` object is used to see all available model/operation combinations for an integration. +// +// ### Usage Example +// Fetch all the actions available for the `Zenefits` integration. +type AvailableActions struct { + Integration *AccountIntegration `json:"integration" url:"integration"` + PassthroughAvailable bool `json:"passthrough_available" url:"passthrough_available"` + AvailableModelOperations []*ModelOperation `json:"available_model_operations,omitempty" url:"available_model_operations,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AvailableActions) GetIntegration() *AccountIntegration { + if a == nil { + return nil + } + return a.Integration +} + +func (a *AvailableActions) GetPassthroughAvailable() bool { + if a == nil { + return false + } + return a.PassthroughAvailable +} + +func (a *AvailableActions) GetAvailableModelOperations() []*ModelOperation { + if a == nil { + return nil + } + return a.AvailableModelOperations +} + +func (a *AvailableActions) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AvailableActions) UnmarshalJSON(data []byte) error { + type unmarshaler AvailableActions + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *a = AvailableActions(value) + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AvailableActions) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} diff --git a/crm/availableactions/client.go b/crm/availableactions/client.go index 72e95db..cd6b9b1 100644 --- a/crm/availableactions/client.go +++ b/crm/availableactions/client.go @@ -1,48 +1,65 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package availableactions import ( context "context" - core "github.com/merge-api/merge-go-client/core" - crm "github.com/merge-api/merge-go-client/crm" + core "github.com/merge-api/merge-go-client/v2/core" + crm "github.com/merge-api/merge-go-client/v2/crm" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of models and actions available for an account. -func (c *Client) Retrieve(ctx context.Context) (*crm.AvailableActions, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/available-actions" +func (c *Client) Retrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*crm.AvailableActions, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/available-actions" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *crm.AvailableActions if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/crm/client/client.go b/crm/client/client.go index c4b5c6f..a1e7f0a 100644 --- a/crm/client/client.go +++ b/crm/client/client.go @@ -1,46 +1,48 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package client import ( - core "github.com/merge-api/merge-go-client/core" - accountdetails "github.com/merge-api/merge-go-client/crm/accountdetails" - accounts "github.com/merge-api/merge-go-client/crm/accounts" - accounttoken "github.com/merge-api/merge-go-client/crm/accounttoken" - associations "github.com/merge-api/merge-go-client/crm/associations" - associationtypes "github.com/merge-api/merge-go-client/crm/associationtypes" - asyncpassthrough "github.com/merge-api/merge-go-client/crm/asyncpassthrough" - audittrail "github.com/merge-api/merge-go-client/crm/audittrail" - availableactions "github.com/merge-api/merge-go-client/crm/availableactions" - contacts "github.com/merge-api/merge-go-client/crm/contacts" - customobjectclasses "github.com/merge-api/merge-go-client/crm/customobjectclasses" - customobjects "github.com/merge-api/merge-go-client/crm/customobjects" - deleteaccount "github.com/merge-api/merge-go-client/crm/deleteaccount" - engagements "github.com/merge-api/merge-go-client/crm/engagements" - engagementtypes "github.com/merge-api/merge-go-client/crm/engagementtypes" - fieldmapping "github.com/merge-api/merge-go-client/crm/fieldmapping" - forceresync "github.com/merge-api/merge-go-client/crm/forceresync" - generatekey "github.com/merge-api/merge-go-client/crm/generatekey" - issues "github.com/merge-api/merge-go-client/crm/issues" - leads "github.com/merge-api/merge-go-client/crm/leads" - linkedaccounts "github.com/merge-api/merge-go-client/crm/linkedaccounts" - linktoken "github.com/merge-api/merge-go-client/crm/linktoken" - notes "github.com/merge-api/merge-go-client/crm/notes" - opportunities "github.com/merge-api/merge-go-client/crm/opportunities" - passthrough "github.com/merge-api/merge-go-client/crm/passthrough" - regeneratekey "github.com/merge-api/merge-go-client/crm/regeneratekey" - scopes "github.com/merge-api/merge-go-client/crm/scopes" - stages "github.com/merge-api/merge-go-client/crm/stages" - syncstatus "github.com/merge-api/merge-go-client/crm/syncstatus" - tasks "github.com/merge-api/merge-go-client/crm/tasks" - users "github.com/merge-api/merge-go-client/crm/users" - webhookreceivers "github.com/merge-api/merge-go-client/crm/webhookreceivers" + core "github.com/merge-api/merge-go-client/v2/core" + accountdetails "github.com/merge-api/merge-go-client/v2/crm/accountdetails" + accounts "github.com/merge-api/merge-go-client/v2/crm/accounts" + accounttoken "github.com/merge-api/merge-go-client/v2/crm/accounttoken" + associations "github.com/merge-api/merge-go-client/v2/crm/associations" + associationtypes "github.com/merge-api/merge-go-client/v2/crm/associationtypes" + asyncpassthrough "github.com/merge-api/merge-go-client/v2/crm/asyncpassthrough" + audittrail "github.com/merge-api/merge-go-client/v2/crm/audittrail" + availableactions "github.com/merge-api/merge-go-client/v2/crm/availableactions" + contacts "github.com/merge-api/merge-go-client/v2/crm/contacts" + customobjectclasses "github.com/merge-api/merge-go-client/v2/crm/customobjectclasses" + customobjects "github.com/merge-api/merge-go-client/v2/crm/customobjects" + deleteaccount "github.com/merge-api/merge-go-client/v2/crm/deleteaccount" + engagements "github.com/merge-api/merge-go-client/v2/crm/engagements" + engagementtypes "github.com/merge-api/merge-go-client/v2/crm/engagementtypes" + fieldmapping "github.com/merge-api/merge-go-client/v2/crm/fieldmapping" + forceresync "github.com/merge-api/merge-go-client/v2/crm/forceresync" + generatekey "github.com/merge-api/merge-go-client/v2/crm/generatekey" + issues "github.com/merge-api/merge-go-client/v2/crm/issues" + leads "github.com/merge-api/merge-go-client/v2/crm/leads" + linkedaccounts "github.com/merge-api/merge-go-client/v2/crm/linkedaccounts" + linktoken "github.com/merge-api/merge-go-client/v2/crm/linktoken" + notes "github.com/merge-api/merge-go-client/v2/crm/notes" + opportunities "github.com/merge-api/merge-go-client/v2/crm/opportunities" + passthrough "github.com/merge-api/merge-go-client/v2/crm/passthrough" + regeneratekey "github.com/merge-api/merge-go-client/v2/crm/regeneratekey" + scopes "github.com/merge-api/merge-go-client/v2/crm/scopes" + stages "github.com/merge-api/merge-go-client/v2/crm/stages" + syncstatus "github.com/merge-api/merge-go-client/v2/crm/syncstatus" + tasks "github.com/merge-api/merge-go-client/v2/crm/tasks" + users "github.com/merge-api/merge-go-client/v2/crm/users" + webhookreceivers "github.com/merge-api/merge-go-client/v2/crm/webhookreceivers" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header AccountDetails *accountdetails.Client @@ -76,14 +78,16 @@ type Client struct { WebhookReceivers *webhookreceivers.Client } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ - baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), + baseURL: options.BaseURL, + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), header: options.ToHeader(), AccountDetails: accountdetails.NewClient(opts...), AccountToken: accounttoken.NewClient(opts...), diff --git a/crm/contacts.go b/crm/contacts.go index d2150d5..9ca00a4 100644 --- a/crm/contacts.go +++ b/crm/contacts.go @@ -1,133 +1,762 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package crm import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type CrmContactEndpointRequest struct { // Whether to include debug fields (such as log file links) in the response. - IsDebugMode *bool `json:"-"` + IsDebugMode *bool `json:"-" url:"is_debug_mode,omitempty"` // Whether or not third-party updates should be run asynchronously. - RunAsync *bool `json:"-"` - Model *ContactRequest `json:"model,omitempty"` + RunAsync *bool `json:"-" url:"run_async,omitempty"` + Model *ContactRequest `json:"model,omitempty" url:"-"` } type ContactsListRequest struct { // If provided, will only return contacts with this account. - AccountId *string `json:"-"` + AccountId *string `json:"-" url:"account_id,omitempty"` // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // If provided, will only return contacts matching the email addresses; multiple email_addresses can be separated by commas. - EmailAddresses *string `json:"-"` + EmailAddresses *string `json:"-" url:"email_addresses,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *ContactsListRequestExpand `json:"-"` + Expand []*ContactsListRequestExpandItem `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - IncludeRemoteFields *bool `json:"-"` + IncludeRemoteFields *bool `json:"-" url:"include_remote_fields,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // If provided, will only return contacts matching the phone numbers; multiple phone numbers can be separated by commas. - PhoneNumbers *string `json:"-"` + PhoneNumbers *string `json:"-" url:"phone_numbers,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` } type PatchedCrmContactEndpointRequest struct { // Whether to include debug fields (such as log file links) in the response. - IsDebugMode *bool `json:"-"` + IsDebugMode *bool `json:"-" url:"is_debug_mode,omitempty"` // Whether or not third-party updates should be run asynchronously. - RunAsync *bool `json:"-"` - Model *PatchedContactRequest `json:"model,omitempty"` + RunAsync *bool `json:"-" url:"run_async,omitempty"` + Model *PatchedContactRequest `json:"model,omitempty" url:"-"` } type ContactsRemoteFieldClassesListRequest struct { // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - IncludeRemoteFields *bool `json:"-"` + IncludeRemoteFields *bool `json:"-" url:"include_remote_fields,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, will only return remote field classes with this is_common_model_field value - IsCommonModelField *bool `json:"-"` + IsCommonModelField *bool `json:"-" url:"is_common_model_field,omitempty"` + // If provided, will only return remote fields classes with this is_custom value + IsCustom *bool `json:"-" url:"is_custom,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` } type ContactsRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *ContactsRetrieveRequestExpand `json:"-"` + Expand []*ContactsRetrieveRequestExpandItem `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - IncludeRemoteFields *bool `json:"-"` + IncludeRemoteFields *bool `json:"-" url:"include_remote_fields,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` } -type ContactsListRequestExpand string +type ContactsListRequestExpandItem string const ( - ContactsListRequestExpandAccount ContactsListRequestExpand = "account" - ContactsListRequestExpandAccountOwner ContactsListRequestExpand = "account,owner" - ContactsListRequestExpandOwner ContactsListRequestExpand = "owner" + ContactsListRequestExpandItemAccount ContactsListRequestExpandItem = "account" + ContactsListRequestExpandItemOwner ContactsListRequestExpandItem = "owner" ) -func NewContactsListRequestExpandFromString(s string) (ContactsListRequestExpand, error) { +func NewContactsListRequestExpandItemFromString(s string) (ContactsListRequestExpandItem, error) { switch s { case "account": - return ContactsListRequestExpandAccount, nil - case "account,owner": - return ContactsListRequestExpandAccountOwner, nil + return ContactsListRequestExpandItemAccount, nil case "owner": - return ContactsListRequestExpandOwner, nil + return ContactsListRequestExpandItemOwner, nil } - var t ContactsListRequestExpand + var t ContactsListRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (c ContactsListRequestExpand) Ptr() *ContactsListRequestExpand { +func (c ContactsListRequestExpandItem) Ptr() *ContactsListRequestExpandItem { return &c } -type ContactsRetrieveRequestExpand string +type ContactsRetrieveRequestExpandItem string const ( - ContactsRetrieveRequestExpandAccount ContactsRetrieveRequestExpand = "account" - ContactsRetrieveRequestExpandAccountOwner ContactsRetrieveRequestExpand = "account,owner" - ContactsRetrieveRequestExpandOwner ContactsRetrieveRequestExpand = "owner" + ContactsRetrieveRequestExpandItemAccount ContactsRetrieveRequestExpandItem = "account" + ContactsRetrieveRequestExpandItemOwner ContactsRetrieveRequestExpandItem = "owner" ) -func NewContactsRetrieveRequestExpandFromString(s string) (ContactsRetrieveRequestExpand, error) { +func NewContactsRetrieveRequestExpandItemFromString(s string) (ContactsRetrieveRequestExpandItem, error) { switch s { case "account": - return ContactsRetrieveRequestExpandAccount, nil - case "account,owner": - return ContactsRetrieveRequestExpandAccountOwner, nil + return ContactsRetrieveRequestExpandItemAccount, nil case "owner": - return ContactsRetrieveRequestExpandOwner, nil + return ContactsRetrieveRequestExpandItemOwner, nil } - var t ContactsRetrieveRequestExpand + var t ContactsRetrieveRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (c ContactsRetrieveRequestExpand) Ptr() *ContactsRetrieveRequestExpand { +func (c ContactsRetrieveRequestExpandItem) Ptr() *ContactsRetrieveRequestExpandItem { return &c } + +// # The Contact Object +// ### Description +// The `Contact` object is used to represent an existing point of contact at a company in a CRM system. +// ### Usage Example +// TODO +type ContactRequest struct { + // The contact's first name. + FirstName *string `json:"first_name,omitempty" url:"first_name,omitempty"` + // The contact's last name. + LastName *string `json:"last_name,omitempty" url:"last_name,omitempty"` + // The contact's account. + Account *ContactRequestAccount `json:"account,omitempty" url:"account,omitempty"` + // The contact's owner. + Owner *ContactRequestOwner `json:"owner,omitempty" url:"owner,omitempty"` + Addresses []*AddressRequest `json:"addresses,omitempty" url:"addresses,omitempty"` + EmailAddresses []*EmailAddressRequest `json:"email_addresses,omitempty" url:"email_addresses,omitempty"` + PhoneNumbers []*PhoneNumberRequest `json:"phone_numbers,omitempty" url:"phone_numbers,omitempty"` + // When the contact's last activity occurred. + LastActivityAt *time.Time `json:"last_activity_at,omitempty" url:"last_activity_at,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + RemoteFields []*RemoteFieldRequest `json:"remote_fields,omitempty" url:"remote_fields,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (c *ContactRequest) GetFirstName() *string { + if c == nil { + return nil + } + return c.FirstName +} + +func (c *ContactRequest) GetLastName() *string { + if c == nil { + return nil + } + return c.LastName +} + +func (c *ContactRequest) GetAccount() *ContactRequestAccount { + if c == nil { + return nil + } + return c.Account +} + +func (c *ContactRequest) GetOwner() *ContactRequestOwner { + if c == nil { + return nil + } + return c.Owner +} + +func (c *ContactRequest) GetAddresses() []*AddressRequest { + if c == nil { + return nil + } + return c.Addresses +} + +func (c *ContactRequest) GetEmailAddresses() []*EmailAddressRequest { + if c == nil { + return nil + } + return c.EmailAddresses +} + +func (c *ContactRequest) GetPhoneNumbers() []*PhoneNumberRequest { + if c == nil { + return nil + } + return c.PhoneNumbers +} + +func (c *ContactRequest) GetLastActivityAt() *time.Time { + if c == nil { + return nil + } + return c.LastActivityAt +} + +func (c *ContactRequest) GetIntegrationParams() map[string]interface{} { + if c == nil { + return nil + } + return c.IntegrationParams +} + +func (c *ContactRequest) GetLinkedAccountParams() map[string]interface{} { + if c == nil { + return nil + } + return c.LinkedAccountParams +} + +func (c *ContactRequest) GetRemoteFields() []*RemoteFieldRequest { + if c == nil { + return nil + } + return c.RemoteFields +} + +func (c *ContactRequest) GetExtraProperties() map[string]interface{} { + return c.extraProperties +} + +func (c *ContactRequest) UnmarshalJSON(data []byte) error { + type embed ContactRequest + var unmarshaler = struct { + embed + LastActivityAt *internal.DateTime `json:"last_activity_at,omitempty"` + }{ + embed: embed(*c), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *c = ContactRequest(unmarshaler.embed) + c.LastActivityAt = unmarshaler.LastActivityAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *c) + if err != nil { + return err + } + c.extraProperties = extraProperties + c.rawJSON = json.RawMessage(data) + return nil +} + +func (c *ContactRequest) MarshalJSON() ([]byte, error) { + type embed ContactRequest + var marshaler = struct { + embed + LastActivityAt *internal.DateTime `json:"last_activity_at,omitempty"` + }{ + embed: embed(*c), + LastActivityAt: internal.NewOptionalDateTime(c.LastActivityAt), + } + return json.Marshal(marshaler) +} + +func (c *ContactRequest) String() string { + if len(c.rawJSON) > 0 { + if value, err := internal.StringifyJSON(c.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(c); err == nil { + return value + } + return fmt.Sprintf("%#v", c) +} + +// The contact's account. +type ContactRequestAccount struct { + String string + Account *Account + + typ string +} + +func (c *ContactRequestAccount) GetString() string { + if c == nil { + return "" + } + return c.String +} + +func (c *ContactRequestAccount) GetAccount() *Account { + if c == nil { + return nil + } + return c.Account +} + +func (c *ContactRequestAccount) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + c.typ = "String" + c.String = valueString + return nil + } + valueAccount := new(Account) + if err := json.Unmarshal(data, &valueAccount); err == nil { + c.typ = "Account" + c.Account = valueAccount + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, c) +} + +func (c ContactRequestAccount) MarshalJSON() ([]byte, error) { + if c.typ == "String" || c.String != "" { + return json.Marshal(c.String) + } + if c.typ == "Account" || c.Account != nil { + return json.Marshal(c.Account) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", c) +} + +type ContactRequestAccountVisitor interface { + VisitString(string) error + VisitAccount(*Account) error +} + +func (c *ContactRequestAccount) Accept(visitor ContactRequestAccountVisitor) error { + if c.typ == "String" || c.String != "" { + return visitor.VisitString(c.String) + } + if c.typ == "Account" || c.Account != nil { + return visitor.VisitAccount(c.Account) + } + return fmt.Errorf("type %T does not include a non-empty union type", c) +} + +// The contact's owner. +type ContactRequestOwner struct { + String string + User *User + + typ string +} + +func (c *ContactRequestOwner) GetString() string { + if c == nil { + return "" + } + return c.String +} + +func (c *ContactRequestOwner) GetUser() *User { + if c == nil { + return nil + } + return c.User +} + +func (c *ContactRequestOwner) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + c.typ = "String" + c.String = valueString + return nil + } + valueUser := new(User) + if err := json.Unmarshal(data, &valueUser); err == nil { + c.typ = "User" + c.User = valueUser + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, c) +} + +func (c ContactRequestOwner) MarshalJSON() ([]byte, error) { + if c.typ == "String" || c.String != "" { + return json.Marshal(c.String) + } + if c.typ == "User" || c.User != nil { + return json.Marshal(c.User) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", c) +} + +type ContactRequestOwnerVisitor interface { + VisitString(string) error + VisitUser(*User) error +} + +func (c *ContactRequestOwner) Accept(visitor ContactRequestOwnerVisitor) error { + if c.typ == "String" || c.String != "" { + return visitor.VisitString(c.String) + } + if c.typ == "User" || c.User != nil { + return visitor.VisitUser(c.User) + } + return fmt.Errorf("type %T does not include a non-empty union type", c) +} + +type CrmContactResponse struct { + Model *Contact `json:"model" url:"model"` + Warnings []*WarningValidationProblem `json:"warnings" url:"warnings"` + Errors []*ErrorValidationProblem `json:"errors" url:"errors"` + Logs []*DebugModeLog `json:"logs,omitempty" url:"logs,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (c *CrmContactResponse) GetModel() *Contact { + if c == nil { + return nil + } + return c.Model +} + +func (c *CrmContactResponse) GetWarnings() []*WarningValidationProblem { + if c == nil { + return nil + } + return c.Warnings +} + +func (c *CrmContactResponse) GetErrors() []*ErrorValidationProblem { + if c == nil { + return nil + } + return c.Errors +} + +func (c *CrmContactResponse) GetLogs() []*DebugModeLog { + if c == nil { + return nil + } + return c.Logs +} + +func (c *CrmContactResponse) GetExtraProperties() map[string]interface{} { + return c.extraProperties +} + +func (c *CrmContactResponse) UnmarshalJSON(data []byte) error { + type unmarshaler CrmContactResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *c = CrmContactResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *c) + if err != nil { + return err + } + c.extraProperties = extraProperties + c.rawJSON = json.RawMessage(data) + return nil +} + +func (c *CrmContactResponse) String() string { + if len(c.rawJSON) > 0 { + if value, err := internal.StringifyJSON(c.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(c); err == nil { + return value + } + return fmt.Sprintf("%#v", c) +} + +type PaginatedContactList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Contact `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedContactList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedContactList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedContactList) GetResults() []*Contact { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedContactList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedContactList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedContactList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedContactList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedContactList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +// # The Contact Object +// ### Description +// The `Contact` object is used to represent an existing point of contact at a company in a CRM system. +// ### Usage Example +// TODO +type PatchedContactRequest struct { + // The contact's first name. + FirstName *string `json:"first_name,omitempty" url:"first_name,omitempty"` + // The contact's last name. + LastName *string `json:"last_name,omitempty" url:"last_name,omitempty"` + // The contact's account. + Account *string `json:"account,omitempty" url:"account,omitempty"` + // The contact's owner. + Owner *PatchedContactRequestOwner `json:"owner,omitempty" url:"owner,omitempty"` + Addresses []*AddressRequest `json:"addresses,omitempty" url:"addresses,omitempty"` + EmailAddresses []*EmailAddressRequest `json:"email_addresses,omitempty" url:"email_addresses,omitempty"` + PhoneNumbers []*PhoneNumberRequest `json:"phone_numbers,omitempty" url:"phone_numbers,omitempty"` + // When the contact's last activity occurred. + LastActivityAt *time.Time `json:"last_activity_at,omitempty" url:"last_activity_at,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + RemoteFields []*RemoteFieldRequest `json:"remote_fields,omitempty" url:"remote_fields,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PatchedContactRequest) GetFirstName() *string { + if p == nil { + return nil + } + return p.FirstName +} + +func (p *PatchedContactRequest) GetLastName() *string { + if p == nil { + return nil + } + return p.LastName +} + +func (p *PatchedContactRequest) GetAccount() *string { + if p == nil { + return nil + } + return p.Account +} + +func (p *PatchedContactRequest) GetOwner() *PatchedContactRequestOwner { + if p == nil { + return nil + } + return p.Owner +} + +func (p *PatchedContactRequest) GetAddresses() []*AddressRequest { + if p == nil { + return nil + } + return p.Addresses +} + +func (p *PatchedContactRequest) GetEmailAddresses() []*EmailAddressRequest { + if p == nil { + return nil + } + return p.EmailAddresses +} + +func (p *PatchedContactRequest) GetPhoneNumbers() []*PhoneNumberRequest { + if p == nil { + return nil + } + return p.PhoneNumbers +} + +func (p *PatchedContactRequest) GetLastActivityAt() *time.Time { + if p == nil { + return nil + } + return p.LastActivityAt +} + +func (p *PatchedContactRequest) GetIntegrationParams() map[string]interface{} { + if p == nil { + return nil + } + return p.IntegrationParams +} + +func (p *PatchedContactRequest) GetLinkedAccountParams() map[string]interface{} { + if p == nil { + return nil + } + return p.LinkedAccountParams +} + +func (p *PatchedContactRequest) GetRemoteFields() []*RemoteFieldRequest { + if p == nil { + return nil + } + return p.RemoteFields +} + +func (p *PatchedContactRequest) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PatchedContactRequest) UnmarshalJSON(data []byte) error { + type embed PatchedContactRequest + var unmarshaler = struct { + embed + LastActivityAt *internal.DateTime `json:"last_activity_at,omitempty"` + }{ + embed: embed(*p), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *p = PatchedContactRequest(unmarshaler.embed) + p.LastActivityAt = unmarshaler.LastActivityAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PatchedContactRequest) MarshalJSON() ([]byte, error) { + type embed PatchedContactRequest + var marshaler = struct { + embed + LastActivityAt *internal.DateTime `json:"last_activity_at,omitempty"` + }{ + embed: embed(*p), + LastActivityAt: internal.NewOptionalDateTime(p.LastActivityAt), + } + return json.Marshal(marshaler) +} + +func (p *PatchedContactRequest) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +// The contact's owner. +type PatchedContactRequestOwner struct { + String string + User *User + + typ string +} + +func (p *PatchedContactRequestOwner) GetString() string { + if p == nil { + return "" + } + return p.String +} + +func (p *PatchedContactRequestOwner) GetUser() *User { + if p == nil { + return nil + } + return p.User +} + +func (p *PatchedContactRequestOwner) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + p.typ = "String" + p.String = valueString + return nil + } + valueUser := new(User) + if err := json.Unmarshal(data, &valueUser); err == nil { + p.typ = "User" + p.User = valueUser + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, p) +} + +func (p PatchedContactRequestOwner) MarshalJSON() ([]byte, error) { + if p.typ == "String" || p.String != "" { + return json.Marshal(p.String) + } + if p.typ == "User" || p.User != nil { + return json.Marshal(p.User) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) +} + +type PatchedContactRequestOwnerVisitor interface { + VisitString(string) error + VisitUser(*User) error +} + +func (p *PatchedContactRequestOwner) Accept(visitor PatchedContactRequestOwnerVisitor) error { + if p.typ == "String" || p.String != "" { + return visitor.VisitString(p.String) + } + if p.typ == "User" || p.User != nil { + return visitor.VisitUser(p.User) + } + return fmt.Errorf("type %T does not include a non-empty union type", p) +} diff --git a/crm/contacts/client.go b/crm/contacts/client.go index 120741d..3a45064 100644 --- a/crm/contacts/client.go +++ b/crm/contacts/client.go @@ -1,136 +1,135 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package contacts import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - crm "github.com/merge-api/merge-go-client/crm" + core "github.com/merge-api/merge-go-client/v2/core" + crm "github.com/merge-api/merge-go-client/v2/crm" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `Contact` objects. -func (c *Client) List(ctx context.Context, request *crm.ContactsListRequest) (*crm.PaginatedContactList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/contacts" - - queryParams := make(url.Values) - if request.AccountId != nil { - queryParams.Add("account_id", fmt.Sprintf("%v", *request.AccountId)) - } - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.EmailAddresses != nil { - queryParams.Add("email_addresses", fmt.Sprintf("%v", *request.EmailAddresses)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeRemoteFields != nil { - queryParams.Add("include_remote_fields", fmt.Sprintf("%v", *request.IncludeRemoteFields)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.PhoneNumbers != nil { - queryParams.Add("phone_numbers", fmt.Sprintf("%v", *request.PhoneNumbers)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *crm.PaginatedContactList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *crm.ContactsListRequest, + opts ...option.RequestOption, +) (*core.Page[*crm.Contact], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/contacts" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *crm.PaginatedContactList) *internal.PageResponse[*string, *crm.Contact] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *crm.Contact]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Creates a `Contact` object with the given values. -func (c *Client) Create(ctx context.Context, request *crm.CrmContactEndpointRequest) (*crm.CrmContactResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/contacts" - - queryParams := make(url.Values) - if request.IsDebugMode != nil { - queryParams.Add("is_debug_mode", fmt.Sprintf("%v", *request.IsDebugMode)) - } - if request.RunAsync != nil { - queryParams.Add("run_async", fmt.Sprintf("%v", *request.RunAsync)) +func (c *Client) Create( + ctx context.Context, + request *crm.CrmContactEndpointRequest, + opts ...option.RequestOption, +) (*crm.CrmContactResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/contacts" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *crm.CrmContactResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -139,35 +138,46 @@ func (c *Client) Create(ctx context.Context, request *crm.CrmContactEndpointRequ } // Returns a `Contact` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *crm.ContactsRetrieveRequest) (*crm.Contact, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"crm/v1/contacts/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeRemoteFields != nil { - queryParams.Add("include_remote_fields", fmt.Sprintf("%v", *request.IncludeRemoteFields)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *crm.ContactsRetrieveRequest, + opts ...option.RequestOption, +) (*crm.Contact, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/crm/v1/contacts/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *crm.Contact if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -176,33 +186,48 @@ func (c *Client) Retrieve(ctx context.Context, id string, request *crm.ContactsR } // Updates a `Contact` object with the given `id`. -func (c *Client) PartialUpdate(ctx context.Context, id string, request *crm.PatchedCrmContactEndpointRequest) (*crm.CrmContactResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"crm/v1/contacts/%v", id) - - queryParams := make(url.Values) - if request.IsDebugMode != nil { - queryParams.Add("is_debug_mode", fmt.Sprintf("%v", *request.IsDebugMode)) - } - if request.RunAsync != nil { - queryParams.Add("run_async", fmt.Sprintf("%v", *request.RunAsync)) +func (c *Client) PartialUpdate( + ctx context.Context, + id string, + request *crm.PatchedCrmContactEndpointRequest, + opts ...option.RequestOption, +) (*crm.CrmContactResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/crm/v1/contacts/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *crm.CrmContactResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPatch, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPatch, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -211,20 +236,39 @@ func (c *Client) PartialUpdate(ctx context.Context, id string, request *crm.Patc } // Ignores a specific row based on the `model_id` in the url. These records will have their properties set to null, and will not be updated in future syncs. The "reason" and "message" fields in the request body will be stored for audit purposes. -func (c *Client) IgnoreCreate(ctx context.Context, modelId string, request *crm.IgnoreCommonModelRequest) error { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"crm/v1/contacts/ignore/%v", modelId) +func (c *Client) IgnoreCreate( + ctx context.Context, + modelId string, + request *crm.IgnoreCommonModelRequest, + opts ...option.RequestOption, +) error { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/crm/v1/contacts/ignore/%v", + modelId, + ) + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, }, ); err != nil { return err @@ -233,21 +277,38 @@ func (c *Client) IgnoreCreate(ctx context.Context, modelId string, request *crm. } // Returns metadata for `CRMContact` PATCHs. -func (c *Client) MetaPatchRetrieve(ctx context.Context, id string) (*crm.MetaResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"crm/v1/contacts/meta/patch/%v", id) +func (c *Client) MetaPatchRetrieve( + ctx context.Context, + id string, + opts ...option.RequestOption, +) (*crm.MetaResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/crm/v1/contacts/meta/patch/%v", + id, + ) + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *crm.MetaResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -256,21 +317,34 @@ func (c *Client) MetaPatchRetrieve(ctx context.Context, id string) (*crm.MetaRes } // Returns metadata for `CRMContact` POSTs. -func (c *Client) MetaPostRetrieve(ctx context.Context) (*crm.MetaResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/contacts/meta/post" +func (c *Client) MetaPostRetrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*crm.MetaResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/contacts/meta/post" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *crm.MetaResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -279,50 +353,60 @@ func (c *Client) MetaPostRetrieve(ctx context.Context) (*crm.MetaResponse, error } // Returns a list of `RemoteFieldClass` objects. -func (c *Client) RemoteFieldClassesList(ctx context.Context, request *crm.ContactsRemoteFieldClassesListRequest) (*crm.PaginatedRemoteFieldClassList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/contacts/remote-field-classes" - - queryParams := make(url.Values) - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeRemoteFields != nil { - queryParams.Add("include_remote_fields", fmt.Sprintf("%v", *request.IncludeRemoteFields)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.IsCommonModelField != nil { - queryParams.Add("is_common_model_field", fmt.Sprintf("%v", *request.IsCommonModelField)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *crm.PaginatedRemoteFieldClassList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) RemoteFieldClassesList( + ctx context.Context, + request *crm.ContactsRemoteFieldClassesListRequest, + opts ...option.RequestOption, +) (*core.Page[*crm.RemoteFieldClass], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/contacts/remote-field-classes" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *crm.PaginatedRemoteFieldClassList) *internal.PageResponse[*string, *crm.RemoteFieldClass] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *crm.RemoteFieldClass]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } diff --git a/crm/custom_object_classes.go b/crm/custom_object_classes.go index 5a57fcc..226587c 100644 --- a/crm/custom_object_classes.go +++ b/crm/custom_object_classes.go @@ -1,39 +1,630 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package crm import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type CustomObjectClassesListRequest struct { // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *string `json:"-"` + Expand []*string `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` } type CustomObjectClassesRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *string `json:"-"` + Expand []*string `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` +} + +// # The Custom Object Class Object +// ### Description +// The `Custom Object Class` object is used to represent a Custom Object Schema in the remote system. +// ### Usage Example +// TODO +type CustomObjectClass struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The custom object class's name. + Name *string `json:"name,omitempty" url:"name,omitempty"` + // The custom object class's description. + Description *string `json:"description,omitempty" url:"description,omitempty"` + // The custom object class's singular and plural labels. + Labels map[string]*string `json:"labels,omitempty" url:"labels,omitempty"` + Fields []*RemoteFieldClassForCustomObjectClass `json:"fields,omitempty" url:"fields,omitempty"` + // The types of associations with other models that the custom object class can have. + AssociationTypes []map[string]interface{} `json:"association_types,omitempty" url:"association_types,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (c *CustomObjectClass) GetId() *string { + if c == nil { + return nil + } + return c.Id +} + +func (c *CustomObjectClass) GetRemoteId() *string { + if c == nil { + return nil + } + return c.RemoteId +} + +func (c *CustomObjectClass) GetCreatedAt() *time.Time { + if c == nil { + return nil + } + return c.CreatedAt +} + +func (c *CustomObjectClass) GetModifiedAt() *time.Time { + if c == nil { + return nil + } + return c.ModifiedAt +} + +func (c *CustomObjectClass) GetName() *string { + if c == nil { + return nil + } + return c.Name +} + +func (c *CustomObjectClass) GetDescription() *string { + if c == nil { + return nil + } + return c.Description +} + +func (c *CustomObjectClass) GetLabels() map[string]*string { + if c == nil { + return nil + } + return c.Labels +} + +func (c *CustomObjectClass) GetFields() []*RemoteFieldClassForCustomObjectClass { + if c == nil { + return nil + } + return c.Fields +} + +func (c *CustomObjectClass) GetAssociationTypes() []map[string]interface{} { + if c == nil { + return nil + } + return c.AssociationTypes +} + +func (c *CustomObjectClass) GetExtraProperties() map[string]interface{} { + return c.extraProperties +} + +func (c *CustomObjectClass) UnmarshalJSON(data []byte) error { + type embed CustomObjectClass + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*c), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *c = CustomObjectClass(unmarshaler.embed) + c.CreatedAt = unmarshaler.CreatedAt.TimePtr() + c.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *c) + if err != nil { + return err + } + c.extraProperties = extraProperties + c.rawJSON = json.RawMessage(data) + return nil +} + +func (c *CustomObjectClass) MarshalJSON() ([]byte, error) { + type embed CustomObjectClass + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*c), + CreatedAt: internal.NewOptionalDateTime(c.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(c.ModifiedAt), + } + return json.Marshal(marshaler) +} + +func (c *CustomObjectClass) String() string { + if len(c.rawJSON) > 0 { + if value, err := internal.StringifyJSON(c.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(c); err == nil { + return value + } + return fmt.Sprintf("%#v", c) +} + +type PaginatedCustomObjectClassList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*CustomObjectClass `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedCustomObjectClassList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedCustomObjectClassList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedCustomObjectClassList) GetResults() []*CustomObjectClass { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedCustomObjectClassList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedCustomObjectClassList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedCustomObjectClassList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedCustomObjectClassList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedCustomObjectClassList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +type RemoteFieldClassForCustomObjectClass struct { + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + DisplayName *string `json:"display_name,omitempty" url:"display_name,omitempty"` + RemoteKeyName *string `json:"remote_key_name,omitempty" url:"remote_key_name,omitempty"` + Description *string `json:"description,omitempty" url:"description,omitempty"` + IsRequired *bool `json:"is_required,omitempty" url:"is_required,omitempty"` + FieldType *RemoteFieldClassForCustomObjectClassFieldType `json:"field_type,omitempty" url:"field_type,omitempty"` + FieldFormat *RemoteFieldClassForCustomObjectClassFieldFormat `json:"field_format,omitempty" url:"field_format,omitempty"` + FieldChoices []*RemoteFieldClassForCustomObjectClassFieldChoicesItem `json:"field_choices,omitempty" url:"field_choices,omitempty"` + ItemSchema *RemoteFieldClassForCustomObjectClassItemSchema `json:"item_schema,omitempty" url:"item_schema,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (r *RemoteFieldClassForCustomObjectClass) GetCreatedAt() *time.Time { + if r == nil { + return nil + } + return r.CreatedAt +} + +func (r *RemoteFieldClassForCustomObjectClass) GetModifiedAt() *time.Time { + if r == nil { + return nil + } + return r.ModifiedAt +} + +func (r *RemoteFieldClassForCustomObjectClass) GetDisplayName() *string { + if r == nil { + return nil + } + return r.DisplayName +} + +func (r *RemoteFieldClassForCustomObjectClass) GetRemoteKeyName() *string { + if r == nil { + return nil + } + return r.RemoteKeyName +} + +func (r *RemoteFieldClassForCustomObjectClass) GetDescription() *string { + if r == nil { + return nil + } + return r.Description +} + +func (r *RemoteFieldClassForCustomObjectClass) GetIsRequired() *bool { + if r == nil { + return nil + } + return r.IsRequired +} + +func (r *RemoteFieldClassForCustomObjectClass) GetFieldType() *RemoteFieldClassForCustomObjectClassFieldType { + if r == nil { + return nil + } + return r.FieldType +} + +func (r *RemoteFieldClassForCustomObjectClass) GetFieldFormat() *RemoteFieldClassForCustomObjectClassFieldFormat { + if r == nil { + return nil + } + return r.FieldFormat +} + +func (r *RemoteFieldClassForCustomObjectClass) GetFieldChoices() []*RemoteFieldClassForCustomObjectClassFieldChoicesItem { + if r == nil { + return nil + } + return r.FieldChoices +} + +func (r *RemoteFieldClassForCustomObjectClass) GetItemSchema() *RemoteFieldClassForCustomObjectClassItemSchema { + if r == nil { + return nil + } + return r.ItemSchema +} + +func (r *RemoteFieldClassForCustomObjectClass) GetExtraProperties() map[string]interface{} { + return r.extraProperties +} + +func (r *RemoteFieldClassForCustomObjectClass) UnmarshalJSON(data []byte) error { + type embed RemoteFieldClassForCustomObjectClass + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*r), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *r = RemoteFieldClassForCustomObjectClass(unmarshaler.embed) + r.CreatedAt = unmarshaler.CreatedAt.TimePtr() + r.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { + return err + } + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) + return nil +} + +func (r *RemoteFieldClassForCustomObjectClass) MarshalJSON() ([]byte, error) { + type embed RemoteFieldClassForCustomObjectClass + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*r), + CreatedAt: internal.NewOptionalDateTime(r.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(r.ModifiedAt), + } + return json.Marshal(marshaler) +} + +func (r *RemoteFieldClassForCustomObjectClass) String() string { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(r); err == nil { + return value + } + return fmt.Sprintf("%#v", r) +} + +type RemoteFieldClassForCustomObjectClassFieldChoicesItem struct { + Value interface{} `json:"value,omitempty" url:"value,omitempty"` + DisplayName *string `json:"display_name,omitempty" url:"display_name,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (r *RemoteFieldClassForCustomObjectClassFieldChoicesItem) GetValue() interface{} { + if r == nil { + return nil + } + return r.Value +} + +func (r *RemoteFieldClassForCustomObjectClassFieldChoicesItem) GetDisplayName() *string { + if r == nil { + return nil + } + return r.DisplayName +} + +func (r *RemoteFieldClassForCustomObjectClassFieldChoicesItem) GetExtraProperties() map[string]interface{} { + return r.extraProperties +} + +func (r *RemoteFieldClassForCustomObjectClassFieldChoicesItem) UnmarshalJSON(data []byte) error { + type unmarshaler RemoteFieldClassForCustomObjectClassFieldChoicesItem + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *r = RemoteFieldClassForCustomObjectClassFieldChoicesItem(value) + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { + return err + } + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) + return nil +} + +func (r *RemoteFieldClassForCustomObjectClassFieldChoicesItem) String() string { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(r); err == nil { + return value + } + return fmt.Sprintf("%#v", r) +} + +type RemoteFieldClassForCustomObjectClassFieldFormat struct { + FieldFormatEnum FieldFormatEnum + String string + + typ string +} + +func (r *RemoteFieldClassForCustomObjectClassFieldFormat) GetFieldFormatEnum() FieldFormatEnum { + if r == nil { + return "" + } + return r.FieldFormatEnum +} + +func (r *RemoteFieldClassForCustomObjectClassFieldFormat) GetString() string { + if r == nil { + return "" + } + return r.String +} + +func (r *RemoteFieldClassForCustomObjectClassFieldFormat) UnmarshalJSON(data []byte) error { + var valueFieldFormatEnum FieldFormatEnum + if err := json.Unmarshal(data, &valueFieldFormatEnum); err == nil { + r.typ = "FieldFormatEnum" + r.FieldFormatEnum = valueFieldFormatEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + r.typ = "String" + r.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, r) +} + +func (r RemoteFieldClassForCustomObjectClassFieldFormat) MarshalJSON() ([]byte, error) { + if r.typ == "FieldFormatEnum" || r.FieldFormatEnum != "" { + return json.Marshal(r.FieldFormatEnum) + } + if r.typ == "String" || r.String != "" { + return json.Marshal(r.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", r) +} + +type RemoteFieldClassForCustomObjectClassFieldFormatVisitor interface { + VisitFieldFormatEnum(FieldFormatEnum) error + VisitString(string) error +} + +func (r *RemoteFieldClassForCustomObjectClassFieldFormat) Accept(visitor RemoteFieldClassForCustomObjectClassFieldFormatVisitor) error { + if r.typ == "FieldFormatEnum" || r.FieldFormatEnum != "" { + return visitor.VisitFieldFormatEnum(r.FieldFormatEnum) + } + if r.typ == "String" || r.String != "" { + return visitor.VisitString(r.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", r) +} + +type RemoteFieldClassForCustomObjectClassFieldType struct { + FieldTypeEnum FieldTypeEnum + String string + + typ string +} + +func (r *RemoteFieldClassForCustomObjectClassFieldType) GetFieldTypeEnum() FieldTypeEnum { + if r == nil { + return "" + } + return r.FieldTypeEnum +} + +func (r *RemoteFieldClassForCustomObjectClassFieldType) GetString() string { + if r == nil { + return "" + } + return r.String +} + +func (r *RemoteFieldClassForCustomObjectClassFieldType) UnmarshalJSON(data []byte) error { + var valueFieldTypeEnum FieldTypeEnum + if err := json.Unmarshal(data, &valueFieldTypeEnum); err == nil { + r.typ = "FieldTypeEnum" + r.FieldTypeEnum = valueFieldTypeEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + r.typ = "String" + r.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, r) +} + +func (r RemoteFieldClassForCustomObjectClassFieldType) MarshalJSON() ([]byte, error) { + if r.typ == "FieldTypeEnum" || r.FieldTypeEnum != "" { + return json.Marshal(r.FieldTypeEnum) + } + if r.typ == "String" || r.String != "" { + return json.Marshal(r.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", r) +} + +type RemoteFieldClassForCustomObjectClassFieldTypeVisitor interface { + VisitFieldTypeEnum(FieldTypeEnum) error + VisitString(string) error +} + +func (r *RemoteFieldClassForCustomObjectClassFieldType) Accept(visitor RemoteFieldClassForCustomObjectClassFieldTypeVisitor) error { + if r.typ == "FieldTypeEnum" || r.FieldTypeEnum != "" { + return visitor.VisitFieldTypeEnum(r.FieldTypeEnum) + } + if r.typ == "String" || r.String != "" { + return visitor.VisitString(r.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", r) +} + +type RemoteFieldClassForCustomObjectClassItemSchema struct { + ItemType *string `json:"item_type,omitempty" url:"item_type,omitempty"` + ItemFormat *string `json:"item_format,omitempty" url:"item_format,omitempty"` + ItemChoices []*string `json:"item_choices,omitempty" url:"item_choices,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (r *RemoteFieldClassForCustomObjectClassItemSchema) GetItemType() *string { + if r == nil { + return nil + } + return r.ItemType +} + +func (r *RemoteFieldClassForCustomObjectClassItemSchema) GetItemFormat() *string { + if r == nil { + return nil + } + return r.ItemFormat +} + +func (r *RemoteFieldClassForCustomObjectClassItemSchema) GetItemChoices() []*string { + if r == nil { + return nil + } + return r.ItemChoices +} + +func (r *RemoteFieldClassForCustomObjectClassItemSchema) GetExtraProperties() map[string]interface{} { + return r.extraProperties +} + +func (r *RemoteFieldClassForCustomObjectClassItemSchema) UnmarshalJSON(data []byte) error { + type unmarshaler RemoteFieldClassForCustomObjectClassItemSchema + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *r = RemoteFieldClassForCustomObjectClassItemSchema(value) + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { + return err + } + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) + return nil +} + +func (r *RemoteFieldClassForCustomObjectClassItemSchema) String() string { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(r); err == nil { + return value + } + return fmt.Sprintf("%#v", r) } diff --git a/crm/custom_objects.go b/crm/custom_objects.go index cf21226..98e063f 100644 --- a/crm/custom_objects.go +++ b/crm/custom_objects.go @@ -1,64 +1,391 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package crm import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type CrmCustomObjectEndpointRequest struct { // Whether to include debug fields (such as log file links) in the response. - IsDebugMode *bool `json:"-"` + IsDebugMode *bool `json:"-" url:"is_debug_mode,omitempty"` // Whether or not third-party updates should be run asynchronously. - RunAsync *bool `json:"-"` - Model *CustomObjectRequest `json:"model,omitempty"` + RunAsync *bool `json:"-" url:"run_async,omitempty"` + Model *CustomObjectRequest `json:"model,omitempty" url:"-"` } type CustomObjectClassesCustomObjectsListRequest struct { // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - IncludeRemoteFields *bool `json:"-"` + IncludeRemoteFields *bool `json:"-" url:"include_remote_fields,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` } type CustomObjectClassesCustomObjectsRemoteFieldClassesListRequest struct { // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - IncludeRemoteFields *bool `json:"-"` + IncludeRemoteFields *bool `json:"-" url:"include_remote_fields,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, will only return remote field classes with this is_common_model_field value - IsCommonModelField *bool `json:"-"` + IsCommonModelField *bool `json:"-" url:"is_common_model_field,omitempty"` + // If provided, will only return remote fields classes with this is_custom value + IsCustom *bool `json:"-" url:"is_custom,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` } type CustomObjectClassesCustomObjectsRetrieveRequest struct { // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - IncludeRemoteFields *bool `json:"-"` + IncludeRemoteFields *bool `json:"-" url:"include_remote_fields,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` +} + +type CrmCustomObjectResponse struct { + Model *CustomObject `json:"model" url:"model"` + Warnings []*WarningValidationProblem `json:"warnings" url:"warnings"` + Errors []*ErrorValidationProblem `json:"errors" url:"errors"` + Logs []*DebugModeLog `json:"logs,omitempty" url:"logs,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (c *CrmCustomObjectResponse) GetModel() *CustomObject { + if c == nil { + return nil + } + return c.Model +} + +func (c *CrmCustomObjectResponse) GetWarnings() []*WarningValidationProblem { + if c == nil { + return nil + } + return c.Warnings +} + +func (c *CrmCustomObjectResponse) GetErrors() []*ErrorValidationProblem { + if c == nil { + return nil + } + return c.Errors +} + +func (c *CrmCustomObjectResponse) GetLogs() []*DebugModeLog { + if c == nil { + return nil + } + return c.Logs +} + +func (c *CrmCustomObjectResponse) GetExtraProperties() map[string]interface{} { + return c.extraProperties +} + +func (c *CrmCustomObjectResponse) UnmarshalJSON(data []byte) error { + type unmarshaler CrmCustomObjectResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *c = CrmCustomObjectResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *c) + if err != nil { + return err + } + c.extraProperties = extraProperties + c.rawJSON = json.RawMessage(data) + return nil +} + +func (c *CrmCustomObjectResponse) String() string { + if len(c.rawJSON) > 0 { + if value, err := internal.StringifyJSON(c.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(c); err == nil { + return value + } + return fmt.Sprintf("%#v", c) +} + +// # The CustomObject Object +// ### Description +// The `Custom Object` record refers to an instance of a Custom Object Class. +// ### Usage Example +// TODO +type CustomObject struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The custom object class the custom object record belongs to. + ObjectClass *string `json:"object_class,omitempty" url:"object_class,omitempty"` + // The fields and values contained within the custom object record. + Fields map[string]interface{} `json:"fields,omitempty" url:"fields,omitempty"` + RemoteFields []*RemoteField `json:"remote_fields,omitempty" url:"remote_fields,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (c *CustomObject) GetId() *string { + if c == nil { + return nil + } + return c.Id +} + +func (c *CustomObject) GetRemoteId() *string { + if c == nil { + return nil + } + return c.RemoteId +} + +func (c *CustomObject) GetCreatedAt() *time.Time { + if c == nil { + return nil + } + return c.CreatedAt +} + +func (c *CustomObject) GetModifiedAt() *time.Time { + if c == nil { + return nil + } + return c.ModifiedAt +} + +func (c *CustomObject) GetObjectClass() *string { + if c == nil { + return nil + } + return c.ObjectClass +} + +func (c *CustomObject) GetFields() map[string]interface{} { + if c == nil { + return nil + } + return c.Fields +} + +func (c *CustomObject) GetRemoteFields() []*RemoteField { + if c == nil { + return nil + } + return c.RemoteFields +} + +func (c *CustomObject) GetExtraProperties() map[string]interface{} { + return c.extraProperties +} + +func (c *CustomObject) UnmarshalJSON(data []byte) error { + type embed CustomObject + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*c), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *c = CustomObject(unmarshaler.embed) + c.CreatedAt = unmarshaler.CreatedAt.TimePtr() + c.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *c) + if err != nil { + return err + } + c.extraProperties = extraProperties + c.rawJSON = json.RawMessage(data) + return nil +} + +func (c *CustomObject) MarshalJSON() ([]byte, error) { + type embed CustomObject + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*c), + CreatedAt: internal.NewOptionalDateTime(c.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(c.ModifiedAt), + } + return json.Marshal(marshaler) +} + +func (c *CustomObject) String() string { + if len(c.rawJSON) > 0 { + if value, err := internal.StringifyJSON(c.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(c); err == nil { + return value + } + return fmt.Sprintf("%#v", c) +} + +type CustomObjectRequest struct { + Fields map[string]interface{} `json:"fields" url:"fields"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (c *CustomObjectRequest) GetFields() map[string]interface{} { + if c == nil { + return nil + } + return c.Fields +} + +func (c *CustomObjectRequest) GetIntegrationParams() map[string]interface{} { + if c == nil { + return nil + } + return c.IntegrationParams +} + +func (c *CustomObjectRequest) GetLinkedAccountParams() map[string]interface{} { + if c == nil { + return nil + } + return c.LinkedAccountParams +} + +func (c *CustomObjectRequest) GetExtraProperties() map[string]interface{} { + return c.extraProperties +} + +func (c *CustomObjectRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CustomObjectRequest + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *c = CustomObjectRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *c) + if err != nil { + return err + } + c.extraProperties = extraProperties + c.rawJSON = json.RawMessage(data) + return nil +} + +func (c *CustomObjectRequest) String() string { + if len(c.rawJSON) > 0 { + if value, err := internal.StringifyJSON(c.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(c); err == nil { + return value + } + return fmt.Sprintf("%#v", c) +} + +type PaginatedCustomObjectList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*CustomObject `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedCustomObjectList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedCustomObjectList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedCustomObjectList) GetResults() []*CustomObject { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedCustomObjectList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedCustomObjectList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedCustomObjectList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedCustomObjectList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedCustomObjectList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) } diff --git a/crm/customobjectclasses/client.go b/crm/customobjectclasses/client.go index 341eb99..f30ac4f 100644 --- a/crm/customobjectclasses/client.go +++ b/crm/customobjectclasses/client.go @@ -1,123 +1,137 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package customobjectclasses import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - crm "github.com/merge-api/merge-go-client/crm" + core "github.com/merge-api/merge-go-client/v2/core" + crm "github.com/merge-api/merge-go-client/v2/crm" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `CustomObjectClass` objects. -func (c *Client) List(ctx context.Context, request *crm.CustomObjectClassesListRequest) (*crm.PaginatedCustomObjectClassList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/custom-object-classes" - - queryParams := make(url.Values) - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *crm.PaginatedCustomObjectClassList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *crm.CustomObjectClassesListRequest, + opts ...option.RequestOption, +) (*core.Page[*crm.CustomObjectClass], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/custom-object-classes" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *crm.PaginatedCustomObjectClassList) *internal.PageResponse[*string, *crm.CustomObjectClass] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *crm.CustomObjectClass]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Returns a `CustomObjectClass` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *crm.CustomObjectClassesRetrieveRequest) (*crm.CustomObjectClass, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"crm/v1/custom-object-classes/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *crm.CustomObjectClassesRetrieveRequest, + opts ...option.RequestOption, +) (*crm.CustomObjectClass, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/crm/v1/custom-object-classes/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *crm.CustomObjectClass if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/crm/customobjects/client.go b/crm/customobjects/client.go index 3bf67d7..46d3eef 100644 --- a/crm/customobjects/client.go +++ b/crm/customobjects/client.go @@ -1,124 +1,143 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package customobjects import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - crm "github.com/merge-api/merge-go-client/crm" + core "github.com/merge-api/merge-go-client/v2/core" + crm "github.com/merge-api/merge-go-client/v2/crm" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `CustomObject` objects. -func (c *Client) CustomObjectClassesCustomObjectsList(ctx context.Context, customObjectClassId string, request *crm.CustomObjectClassesCustomObjectsListRequest) (*crm.PaginatedCustomObjectList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"crm/v1/custom-object-classes/%v/custom-objects", customObjectClassId) - - queryParams := make(url.Values) - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeRemoteFields != nil { - queryParams.Add("include_remote_fields", fmt.Sprintf("%v", *request.IncludeRemoteFields)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *crm.PaginatedCustomObjectList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) CustomObjectClassesCustomObjectsList( + ctx context.Context, + customObjectClassId string, + request *crm.CustomObjectClassesCustomObjectsListRequest, + opts ...option.RequestOption, +) (*core.Page[*crm.CustomObject], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/crm/v1/custom-object-classes/%v/custom-objects", + customObjectClassId, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *crm.PaginatedCustomObjectList) *internal.PageResponse[*string, *crm.CustomObject] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *crm.CustomObject]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Creates a `CustomObject` object with the given values. -func (c *Client) CustomObjectClassesCustomObjectsCreate(ctx context.Context, customObjectClassId string, request *crm.CrmCustomObjectEndpointRequest) (*crm.CrmCustomObjectResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"crm/v1/custom-object-classes/%v/custom-objects", customObjectClassId) - - queryParams := make(url.Values) - if request.IsDebugMode != nil { - queryParams.Add("is_debug_mode", fmt.Sprintf("%v", *request.IsDebugMode)) - } - if request.RunAsync != nil { - queryParams.Add("run_async", fmt.Sprintf("%v", *request.RunAsync)) +func (c *Client) CustomObjectClassesCustomObjectsCreate( + ctx context.Context, + customObjectClassId string, + request *crm.CrmCustomObjectEndpointRequest, + opts ...option.RequestOption, +) (*crm.CrmCustomObjectResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/crm/v1/custom-object-classes/%v/custom-objects", + customObjectClassId, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *crm.CrmCustomObjectResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -127,32 +146,48 @@ func (c *Client) CustomObjectClassesCustomObjectsCreate(ctx context.Context, cus } // Returns a `CustomObject` object with the given `id`. -func (c *Client) CustomObjectClassesCustomObjectsRetrieve(ctx context.Context, customObjectClassId string, id string, request *crm.CustomObjectClassesCustomObjectsRetrieveRequest) (*crm.CustomObject, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"crm/v1/custom-object-classes/%v/custom-objects/%v", customObjectClassId, id) - - queryParams := make(url.Values) - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeRemoteFields != nil { - queryParams.Add("include_remote_fields", fmt.Sprintf("%v", *request.IncludeRemoteFields)) +func (c *Client) CustomObjectClassesCustomObjectsRetrieve( + ctx context.Context, + customObjectClassId string, + id string, + request *crm.CustomObjectClassesCustomObjectsRetrieveRequest, + opts ...option.RequestOption, +) (*crm.CustomObject, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/crm/v1/custom-object-classes/%v/custom-objects/%v", + customObjectClassId, + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *crm.CustomObject if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -161,21 +196,38 @@ func (c *Client) CustomObjectClassesCustomObjectsRetrieve(ctx context.Context, c } // Returns metadata for `CRMCustomObject` POSTs. -func (c *Client) CustomObjectClassesCustomObjectsMetaPostRetrieve(ctx context.Context, customObjectClassId string) (*crm.MetaResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"crm/v1/custom-object-classes/%v/custom-objects/meta/post", customObjectClassId) +func (c *Client) CustomObjectClassesCustomObjectsMetaPostRetrieve( + ctx context.Context, + customObjectClassId string, + opts ...option.RequestOption, +) (*crm.MetaResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/crm/v1/custom-object-classes/%v/custom-objects/meta/post", + customObjectClassId, + ) + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *crm.MetaResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -184,50 +236,60 @@ func (c *Client) CustomObjectClassesCustomObjectsMetaPostRetrieve(ctx context.Co } // Returns a list of `RemoteFieldClass` objects. -func (c *Client) CustomObjectClassesCustomObjectsRemoteFieldClassesList(ctx context.Context, request *crm.CustomObjectClassesCustomObjectsRemoteFieldClassesListRequest) (*crm.PaginatedRemoteFieldClassList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/custom-object-classes/custom-objects/remote-field-classes" - - queryParams := make(url.Values) - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeRemoteFields != nil { - queryParams.Add("include_remote_fields", fmt.Sprintf("%v", *request.IncludeRemoteFields)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.IsCommonModelField != nil { - queryParams.Add("is_common_model_field", fmt.Sprintf("%v", *request.IsCommonModelField)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *crm.PaginatedRemoteFieldClassList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) CustomObjectClassesCustomObjectsRemoteFieldClassesList( + ctx context.Context, + request *crm.CustomObjectClassesCustomObjectsRemoteFieldClassesListRequest, + opts ...option.RequestOption, +) (*core.Page[*crm.RemoteFieldClass], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/custom-object-classes/custom-objects/remote-field-classes" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *crm.PaginatedRemoteFieldClassList) *internal.PageResponse[*string, *crm.RemoteFieldClass] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *crm.RemoteFieldClass]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } diff --git a/crm/deleteaccount/client.go b/crm/deleteaccount/client.go index e8c17c5..2471264 100644 --- a/crm/deleteaccount/client.go +++ b/crm/deleteaccount/client.go @@ -1,45 +1,62 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package deleteaccount import ( context "context" - core "github.com/merge-api/merge-go-client/core" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Delete a linked account. -func (c *Client) Delete(ctx context.Context) error { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/delete-account" +func (c *Client) Delete( + ctx context.Context, + opts ...option.RequestOption, +) error { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/delete-account" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, }, ); err != nil { return err diff --git a/crm/engagement_types.go b/crm/engagement_types.go index aa6a22f..6ab7e14 100644 --- a/crm/engagement_types.go +++ b/crm/engagement_types.go @@ -1,56 +1,125 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package crm import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type EngagementTypesListRequest struct { // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - IncludeRemoteFields *bool `json:"-"` + IncludeRemoteFields *bool `json:"-" url:"include_remote_fields,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` } type EngagementTypesRemoteFieldClassesListRequest struct { // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - IncludeRemoteFields *bool `json:"-"` + IncludeRemoteFields *bool `json:"-" url:"include_remote_fields,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, will only return remote field classes with this is_common_model_field value - IsCommonModelField *bool `json:"-"` + IsCommonModelField *bool `json:"-" url:"is_common_model_field,omitempty"` + // If provided, will only return remote fields classes with this is_custom value + IsCustom *bool `json:"-" url:"is_custom,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` } type EngagementTypesRetrieveRequest struct { // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - IncludeRemoteFields *bool `json:"-"` + IncludeRemoteFields *bool `json:"-" url:"include_remote_fields,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` +} + +type PaginatedEngagementTypeList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*EngagementType `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedEngagementTypeList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedEngagementTypeList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedEngagementTypeList) GetResults() []*EngagementType { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedEngagementTypeList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedEngagementTypeList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedEngagementTypeList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedEngagementTypeList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedEngagementTypeList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) } diff --git a/crm/engagements.go b/crm/engagements.go index 9b08e4b..8908cc8 100644 --- a/crm/engagements.go +++ b/crm/engagements.go @@ -1,203 +1,1567 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package crm import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type EngagementEndpointRequest struct { // Whether to include debug fields (such as log file links) in the response. - IsDebugMode *bool `json:"-"` + IsDebugMode *bool `json:"-" url:"is_debug_mode,omitempty"` // Whether or not third-party updates should be run asynchronously. - RunAsync *bool `json:"-"` - Model *EngagementRequest `json:"model,omitempty"` + RunAsync *bool `json:"-" url:"run_async,omitempty"` + Model *EngagementRequest `json:"model,omitempty" url:"-"` } type EngagementsListRequest struct { // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *EngagementsListRequestExpand `json:"-"` + Expand []*EngagementsListRequestExpandItem `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - IncludeRemoteFields *bool `json:"-"` + IncludeRemoteFields *bool `json:"-" url:"include_remote_fields,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` // If provided, will only return engagements started after this datetime. - StartedAfter *time.Time `json:"-"` + StartedAfter *time.Time `json:"-" url:"started_after,omitempty"` // If provided, will only return engagements started before this datetime. - StartedBefore *time.Time `json:"-"` + StartedBefore *time.Time `json:"-" url:"started_before,omitempty"` } type PatchedEngagementEndpointRequest struct { // Whether to include debug fields (such as log file links) in the response. - IsDebugMode *bool `json:"-"` + IsDebugMode *bool `json:"-" url:"is_debug_mode,omitempty"` // Whether or not third-party updates should be run asynchronously. - RunAsync *bool `json:"-"` - Model *PatchedEngagementRequest `json:"model,omitempty"` + RunAsync *bool `json:"-" url:"run_async,omitempty"` + Model *PatchedEngagementRequest `json:"model,omitempty" url:"-"` } type EngagementsRemoteFieldClassesListRequest struct { // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - IncludeRemoteFields *bool `json:"-"` + IncludeRemoteFields *bool `json:"-" url:"include_remote_fields,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, will only return remote field classes with this is_common_model_field value - IsCommonModelField *bool `json:"-"` + IsCommonModelField *bool `json:"-" url:"is_common_model_field,omitempty"` + // If provided, will only return remote fields classes with this is_custom value + IsCustom *bool `json:"-" url:"is_custom,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` } type EngagementsRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *EngagementsRetrieveRequestExpand `json:"-"` + Expand []*EngagementsRetrieveRequestExpandItem `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - IncludeRemoteFields *bool `json:"-"` + IncludeRemoteFields *bool `json:"-" url:"include_remote_fields,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` } -type EngagementsListRequestExpand string +type EngagementsListRequestExpandItem string const ( - EngagementsListRequestExpandAccount EngagementsListRequestExpand = "account" - EngagementsListRequestExpandAccountEngagementType EngagementsListRequestExpand = "account,engagement_type" - EngagementsListRequestExpandContacts EngagementsListRequestExpand = "contacts" - EngagementsListRequestExpandContactsAccount EngagementsListRequestExpand = "contacts,account" - EngagementsListRequestExpandContactsAccountEngagementType EngagementsListRequestExpand = "contacts,account,engagement_type" - EngagementsListRequestExpandContactsEngagementType EngagementsListRequestExpand = "contacts,engagement_type" - EngagementsListRequestExpandContactsOwner EngagementsListRequestExpand = "contacts,owner" - EngagementsListRequestExpandContactsOwnerAccount EngagementsListRequestExpand = "contacts,owner,account" - EngagementsListRequestExpandContactsOwnerAccountEngagementType EngagementsListRequestExpand = "contacts,owner,account,engagement_type" - EngagementsListRequestExpandContactsOwnerEngagementType EngagementsListRequestExpand = "contacts,owner,engagement_type" - EngagementsListRequestExpandEngagementType EngagementsListRequestExpand = "engagement_type" - EngagementsListRequestExpandOwner EngagementsListRequestExpand = "owner" - EngagementsListRequestExpandOwnerAccount EngagementsListRequestExpand = "owner,account" - EngagementsListRequestExpandOwnerAccountEngagementType EngagementsListRequestExpand = "owner,account,engagement_type" - EngagementsListRequestExpandOwnerEngagementType EngagementsListRequestExpand = "owner,engagement_type" + EngagementsListRequestExpandItemAccount EngagementsListRequestExpandItem = "account" + EngagementsListRequestExpandItemContacts EngagementsListRequestExpandItem = "contacts" + EngagementsListRequestExpandItemEngagementType EngagementsListRequestExpandItem = "engagement_type" + EngagementsListRequestExpandItemOwner EngagementsListRequestExpandItem = "owner" ) -func NewEngagementsListRequestExpandFromString(s string) (EngagementsListRequestExpand, error) { +func NewEngagementsListRequestExpandItemFromString(s string) (EngagementsListRequestExpandItem, error) { switch s { case "account": - return EngagementsListRequestExpandAccount, nil - case "account,engagement_type": - return EngagementsListRequestExpandAccountEngagementType, nil + return EngagementsListRequestExpandItemAccount, nil case "contacts": - return EngagementsListRequestExpandContacts, nil - case "contacts,account": - return EngagementsListRequestExpandContactsAccount, nil - case "contacts,account,engagement_type": - return EngagementsListRequestExpandContactsAccountEngagementType, nil - case "contacts,engagement_type": - return EngagementsListRequestExpandContactsEngagementType, nil - case "contacts,owner": - return EngagementsListRequestExpandContactsOwner, nil - case "contacts,owner,account": - return EngagementsListRequestExpandContactsOwnerAccount, nil - case "contacts,owner,account,engagement_type": - return EngagementsListRequestExpandContactsOwnerAccountEngagementType, nil - case "contacts,owner,engagement_type": - return EngagementsListRequestExpandContactsOwnerEngagementType, nil + return EngagementsListRequestExpandItemContacts, nil case "engagement_type": - return EngagementsListRequestExpandEngagementType, nil + return EngagementsListRequestExpandItemEngagementType, nil case "owner": - return EngagementsListRequestExpandOwner, nil - case "owner,account": - return EngagementsListRequestExpandOwnerAccount, nil - case "owner,account,engagement_type": - return EngagementsListRequestExpandOwnerAccountEngagementType, nil - case "owner,engagement_type": - return EngagementsListRequestExpandOwnerEngagementType, nil - } - var t EngagementsListRequestExpand + return EngagementsListRequestExpandItemOwner, nil + } + var t EngagementsListRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (e EngagementsListRequestExpand) Ptr() *EngagementsListRequestExpand { +func (e EngagementsListRequestExpandItem) Ptr() *EngagementsListRequestExpandItem { return &e } -type EngagementsRetrieveRequestExpand string +type EngagementsRetrieveRequestExpandItem string const ( - EngagementsRetrieveRequestExpandAccount EngagementsRetrieveRequestExpand = "account" - EngagementsRetrieveRequestExpandAccountEngagementType EngagementsRetrieveRequestExpand = "account,engagement_type" - EngagementsRetrieveRequestExpandContacts EngagementsRetrieveRequestExpand = "contacts" - EngagementsRetrieveRequestExpandContactsAccount EngagementsRetrieveRequestExpand = "contacts,account" - EngagementsRetrieveRequestExpandContactsAccountEngagementType EngagementsRetrieveRequestExpand = "contacts,account,engagement_type" - EngagementsRetrieveRequestExpandContactsEngagementType EngagementsRetrieveRequestExpand = "contacts,engagement_type" - EngagementsRetrieveRequestExpandContactsOwner EngagementsRetrieveRequestExpand = "contacts,owner" - EngagementsRetrieveRequestExpandContactsOwnerAccount EngagementsRetrieveRequestExpand = "contacts,owner,account" - EngagementsRetrieveRequestExpandContactsOwnerAccountEngagementType EngagementsRetrieveRequestExpand = "contacts,owner,account,engagement_type" - EngagementsRetrieveRequestExpandContactsOwnerEngagementType EngagementsRetrieveRequestExpand = "contacts,owner,engagement_type" - EngagementsRetrieveRequestExpandEngagementType EngagementsRetrieveRequestExpand = "engagement_type" - EngagementsRetrieveRequestExpandOwner EngagementsRetrieveRequestExpand = "owner" - EngagementsRetrieveRequestExpandOwnerAccount EngagementsRetrieveRequestExpand = "owner,account" - EngagementsRetrieveRequestExpandOwnerAccountEngagementType EngagementsRetrieveRequestExpand = "owner,account,engagement_type" - EngagementsRetrieveRequestExpandOwnerEngagementType EngagementsRetrieveRequestExpand = "owner,engagement_type" + EngagementsRetrieveRequestExpandItemAccount EngagementsRetrieveRequestExpandItem = "account" + EngagementsRetrieveRequestExpandItemContacts EngagementsRetrieveRequestExpandItem = "contacts" + EngagementsRetrieveRequestExpandItemEngagementType EngagementsRetrieveRequestExpandItem = "engagement_type" + EngagementsRetrieveRequestExpandItemOwner EngagementsRetrieveRequestExpandItem = "owner" ) -func NewEngagementsRetrieveRequestExpandFromString(s string) (EngagementsRetrieveRequestExpand, error) { +func NewEngagementsRetrieveRequestExpandItemFromString(s string) (EngagementsRetrieveRequestExpandItem, error) { switch s { case "account": - return EngagementsRetrieveRequestExpandAccount, nil - case "account,engagement_type": - return EngagementsRetrieveRequestExpandAccountEngagementType, nil + return EngagementsRetrieveRequestExpandItemAccount, nil case "contacts": - return EngagementsRetrieveRequestExpandContacts, nil - case "contacts,account": - return EngagementsRetrieveRequestExpandContactsAccount, nil - case "contacts,account,engagement_type": - return EngagementsRetrieveRequestExpandContactsAccountEngagementType, nil - case "contacts,engagement_type": - return EngagementsRetrieveRequestExpandContactsEngagementType, nil - case "contacts,owner": - return EngagementsRetrieveRequestExpandContactsOwner, nil - case "contacts,owner,account": - return EngagementsRetrieveRequestExpandContactsOwnerAccount, nil - case "contacts,owner,account,engagement_type": - return EngagementsRetrieveRequestExpandContactsOwnerAccountEngagementType, nil - case "contacts,owner,engagement_type": - return EngagementsRetrieveRequestExpandContactsOwnerEngagementType, nil + return EngagementsRetrieveRequestExpandItemContacts, nil case "engagement_type": - return EngagementsRetrieveRequestExpandEngagementType, nil + return EngagementsRetrieveRequestExpandItemEngagementType, nil case "owner": - return EngagementsRetrieveRequestExpandOwner, nil - case "owner,account": - return EngagementsRetrieveRequestExpandOwnerAccount, nil - case "owner,account,engagement_type": - return EngagementsRetrieveRequestExpandOwnerAccountEngagementType, nil - case "owner,engagement_type": - return EngagementsRetrieveRequestExpandOwnerEngagementType, nil - } - var t EngagementsRetrieveRequestExpand + return EngagementsRetrieveRequestExpandItemOwner, nil + } + var t EngagementsRetrieveRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (e EngagementsRetrieveRequestExpand) Ptr() *EngagementsRetrieveRequestExpand { +func (e EngagementsRetrieveRequestExpandItem) Ptr() *EngagementsRetrieveRequestExpandItem { return &e } + +// * `INBOUND` - INBOUND +// * `OUTBOUND` - OUTBOUND +type DirectionEnum string + +const ( + DirectionEnumInbound DirectionEnum = "INBOUND" + DirectionEnumOutbound DirectionEnum = "OUTBOUND" +) + +func NewDirectionEnumFromString(s string) (DirectionEnum, error) { + switch s { + case "INBOUND": + return DirectionEnumInbound, nil + case "OUTBOUND": + return DirectionEnumOutbound, nil + } + var t DirectionEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (d DirectionEnum) Ptr() *DirectionEnum { + return &d +} + +// # The Engagement Object +// ### Description +// The `Engagement` object is used to represent an interaction noted in a CRM system. +// ### Usage Example +// TODO +type Engagement struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The engagement's owner. + Owner *EngagementOwner `json:"owner,omitempty" url:"owner,omitempty"` + // The engagement's content. + Content *string `json:"content,omitempty" url:"content,omitempty"` + // The engagement's subject. + Subject *string `json:"subject,omitempty" url:"subject,omitempty"` + // The engagement's direction. + // + // * `INBOUND` - INBOUND + // * `OUTBOUND` - OUTBOUND + Direction *EngagementDirection `json:"direction,omitempty" url:"direction,omitempty"` + // The engagement type of the engagement. + EngagementType *EngagementEngagementType `json:"engagement_type,omitempty" url:"engagement_type,omitempty"` + // The time at which the engagement started. + StartTime *time.Time `json:"start_time,omitempty" url:"start_time,omitempty"` + // The time at which the engagement ended. + EndTime *time.Time `json:"end_time,omitempty" url:"end_time,omitempty"` + // The account of the engagement. + Account *EngagementAccount `json:"account,omitempty" url:"account,omitempty"` + Contacts []*EngagementContactsItem `json:"contacts,omitempty" url:"contacts,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + RemoteFields []*RemoteField `json:"remote_fields,omitempty" url:"remote_fields,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (e *Engagement) GetId() *string { + if e == nil { + return nil + } + return e.Id +} + +func (e *Engagement) GetRemoteId() *string { + if e == nil { + return nil + } + return e.RemoteId +} + +func (e *Engagement) GetCreatedAt() *time.Time { + if e == nil { + return nil + } + return e.CreatedAt +} + +func (e *Engagement) GetModifiedAt() *time.Time { + if e == nil { + return nil + } + return e.ModifiedAt +} + +func (e *Engagement) GetOwner() *EngagementOwner { + if e == nil { + return nil + } + return e.Owner +} + +func (e *Engagement) GetContent() *string { + if e == nil { + return nil + } + return e.Content +} + +func (e *Engagement) GetSubject() *string { + if e == nil { + return nil + } + return e.Subject +} + +func (e *Engagement) GetDirection() *EngagementDirection { + if e == nil { + return nil + } + return e.Direction +} + +func (e *Engagement) GetEngagementType() *EngagementEngagementType { + if e == nil { + return nil + } + return e.EngagementType +} + +func (e *Engagement) GetStartTime() *time.Time { + if e == nil { + return nil + } + return e.StartTime +} + +func (e *Engagement) GetEndTime() *time.Time { + if e == nil { + return nil + } + return e.EndTime +} + +func (e *Engagement) GetAccount() *EngagementAccount { + if e == nil { + return nil + } + return e.Account +} + +func (e *Engagement) GetContacts() []*EngagementContactsItem { + if e == nil { + return nil + } + return e.Contacts +} + +func (e *Engagement) GetRemoteWasDeleted() *bool { + if e == nil { + return nil + } + return e.RemoteWasDeleted +} + +func (e *Engagement) GetFieldMappings() map[string]interface{} { + if e == nil { + return nil + } + return e.FieldMappings +} + +func (e *Engagement) GetRemoteData() []*RemoteData { + if e == nil { + return nil + } + return e.RemoteData +} + +func (e *Engagement) GetRemoteFields() []*RemoteField { + if e == nil { + return nil + } + return e.RemoteFields +} + +func (e *Engagement) GetExtraProperties() map[string]interface{} { + return e.extraProperties +} + +func (e *Engagement) UnmarshalJSON(data []byte) error { + type embed Engagement + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + StartTime *internal.DateTime `json:"start_time,omitempty"` + EndTime *internal.DateTime `json:"end_time,omitempty"` + }{ + embed: embed(*e), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *e = Engagement(unmarshaler.embed) + e.CreatedAt = unmarshaler.CreatedAt.TimePtr() + e.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + e.StartTime = unmarshaler.StartTime.TimePtr() + e.EndTime = unmarshaler.EndTime.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *e) + if err != nil { + return err + } + e.extraProperties = extraProperties + e.rawJSON = json.RawMessage(data) + return nil +} + +func (e *Engagement) MarshalJSON() ([]byte, error) { + type embed Engagement + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + StartTime *internal.DateTime `json:"start_time,omitempty"` + EndTime *internal.DateTime `json:"end_time,omitempty"` + }{ + embed: embed(*e), + CreatedAt: internal.NewOptionalDateTime(e.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(e.ModifiedAt), + StartTime: internal.NewOptionalDateTime(e.StartTime), + EndTime: internal.NewOptionalDateTime(e.EndTime), + } + return json.Marshal(marshaler) +} + +func (e *Engagement) String() string { + if len(e.rawJSON) > 0 { + if value, err := internal.StringifyJSON(e.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(e); err == nil { + return value + } + return fmt.Sprintf("%#v", e) +} + +// The account of the engagement. +type EngagementAccount struct { + String string + Account *Account + + typ string +} + +func (e *EngagementAccount) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *EngagementAccount) GetAccount() *Account { + if e == nil { + return nil + } + return e.Account +} + +func (e *EngagementAccount) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + valueAccount := new(Account) + if err := json.Unmarshal(data, &valueAccount); err == nil { + e.typ = "Account" + e.Account = valueAccount + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e EngagementAccount) MarshalJSON() ([]byte, error) { + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + if e.typ == "Account" || e.Account != nil { + return json.Marshal(e.Account) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type EngagementAccountVisitor interface { + VisitString(string) error + VisitAccount(*Account) error +} + +func (e *EngagementAccount) Accept(visitor EngagementAccountVisitor) error { + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + if e.typ == "Account" || e.Account != nil { + return visitor.VisitAccount(e.Account) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type EngagementContactsItem struct { + String string + Contact *Contact + + typ string +} + +func (e *EngagementContactsItem) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *EngagementContactsItem) GetContact() *Contact { + if e == nil { + return nil + } + return e.Contact +} + +func (e *EngagementContactsItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + valueContact := new(Contact) + if err := json.Unmarshal(data, &valueContact); err == nil { + e.typ = "Contact" + e.Contact = valueContact + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e EngagementContactsItem) MarshalJSON() ([]byte, error) { + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + if e.typ == "Contact" || e.Contact != nil { + return json.Marshal(e.Contact) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type EngagementContactsItemVisitor interface { + VisitString(string) error + VisitContact(*Contact) error +} + +func (e *EngagementContactsItem) Accept(visitor EngagementContactsItemVisitor) error { + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + if e.typ == "Contact" || e.Contact != nil { + return visitor.VisitContact(e.Contact) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +// The engagement's direction. +// +// * `INBOUND` - INBOUND +// * `OUTBOUND` - OUTBOUND +type EngagementDirection struct { + DirectionEnum DirectionEnum + String string + + typ string +} + +func (e *EngagementDirection) GetDirectionEnum() DirectionEnum { + if e == nil { + return "" + } + return e.DirectionEnum +} + +func (e *EngagementDirection) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *EngagementDirection) UnmarshalJSON(data []byte) error { + var valueDirectionEnum DirectionEnum + if err := json.Unmarshal(data, &valueDirectionEnum); err == nil { + e.typ = "DirectionEnum" + e.DirectionEnum = valueDirectionEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e EngagementDirection) MarshalJSON() ([]byte, error) { + if e.typ == "DirectionEnum" || e.DirectionEnum != "" { + return json.Marshal(e.DirectionEnum) + } + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type EngagementDirectionVisitor interface { + VisitDirectionEnum(DirectionEnum) error + VisitString(string) error +} + +func (e *EngagementDirection) Accept(visitor EngagementDirectionVisitor) error { + if e.typ == "DirectionEnum" || e.DirectionEnum != "" { + return visitor.VisitDirectionEnum(e.DirectionEnum) + } + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +// The engagement type of the engagement. +type EngagementEngagementType struct { + String string + EngagementType *EngagementType + + typ string +} + +func (e *EngagementEngagementType) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *EngagementEngagementType) GetEngagementType() *EngagementType { + if e == nil { + return nil + } + return e.EngagementType +} + +func (e *EngagementEngagementType) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + valueEngagementType := new(EngagementType) + if err := json.Unmarshal(data, &valueEngagementType); err == nil { + e.typ = "EngagementType" + e.EngagementType = valueEngagementType + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e EngagementEngagementType) MarshalJSON() ([]byte, error) { + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + if e.typ == "EngagementType" || e.EngagementType != nil { + return json.Marshal(e.EngagementType) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type EngagementEngagementTypeVisitor interface { + VisitString(string) error + VisitEngagementType(*EngagementType) error +} + +func (e *EngagementEngagementType) Accept(visitor EngagementEngagementTypeVisitor) error { + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + if e.typ == "EngagementType" || e.EngagementType != nil { + return visitor.VisitEngagementType(e.EngagementType) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +// The engagement's owner. +type EngagementOwner struct { + String string + User *User + + typ string +} + +func (e *EngagementOwner) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *EngagementOwner) GetUser() *User { + if e == nil { + return nil + } + return e.User +} + +func (e *EngagementOwner) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + valueUser := new(User) + if err := json.Unmarshal(data, &valueUser); err == nil { + e.typ = "User" + e.User = valueUser + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e EngagementOwner) MarshalJSON() ([]byte, error) { + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + if e.typ == "User" || e.User != nil { + return json.Marshal(e.User) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type EngagementOwnerVisitor interface { + VisitString(string) error + VisitUser(*User) error +} + +func (e *EngagementOwner) Accept(visitor EngagementOwnerVisitor) error { + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + if e.typ == "User" || e.User != nil { + return visitor.VisitUser(e.User) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +// # The Engagement Object +// ### Description +// The `Engagement` object is used to represent an interaction noted in a CRM system. +// ### Usage Example +// TODO +type EngagementRequest struct { + // The engagement's owner. + Owner *EngagementRequestOwner `json:"owner,omitempty" url:"owner,omitempty"` + // The engagement's content. + Content *string `json:"content,omitempty" url:"content,omitempty"` + // The engagement's subject. + Subject *string `json:"subject,omitempty" url:"subject,omitempty"` + // The engagement's direction. + // + // * `INBOUND` - INBOUND + // * `OUTBOUND` - OUTBOUND + Direction *EngagementRequestDirection `json:"direction,omitempty" url:"direction,omitempty"` + // The engagement type of the engagement. + EngagementType *EngagementRequestEngagementType `json:"engagement_type,omitempty" url:"engagement_type,omitempty"` + // The time at which the engagement started. + StartTime *time.Time `json:"start_time,omitempty" url:"start_time,omitempty"` + // The time at which the engagement ended. + EndTime *time.Time `json:"end_time,omitempty" url:"end_time,omitempty"` + // The account of the engagement. + Account *EngagementRequestAccount `json:"account,omitempty" url:"account,omitempty"` + Contacts []*EngagementRequestContactsItem `json:"contacts,omitempty" url:"contacts,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + RemoteFields []*RemoteFieldRequest `json:"remote_fields,omitempty" url:"remote_fields,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (e *EngagementRequest) GetOwner() *EngagementRequestOwner { + if e == nil { + return nil + } + return e.Owner +} + +func (e *EngagementRequest) GetContent() *string { + if e == nil { + return nil + } + return e.Content +} + +func (e *EngagementRequest) GetSubject() *string { + if e == nil { + return nil + } + return e.Subject +} + +func (e *EngagementRequest) GetDirection() *EngagementRequestDirection { + if e == nil { + return nil + } + return e.Direction +} + +func (e *EngagementRequest) GetEngagementType() *EngagementRequestEngagementType { + if e == nil { + return nil + } + return e.EngagementType +} + +func (e *EngagementRequest) GetStartTime() *time.Time { + if e == nil { + return nil + } + return e.StartTime +} + +func (e *EngagementRequest) GetEndTime() *time.Time { + if e == nil { + return nil + } + return e.EndTime +} + +func (e *EngagementRequest) GetAccount() *EngagementRequestAccount { + if e == nil { + return nil + } + return e.Account +} + +func (e *EngagementRequest) GetContacts() []*EngagementRequestContactsItem { + if e == nil { + return nil + } + return e.Contacts +} + +func (e *EngagementRequest) GetIntegrationParams() map[string]interface{} { + if e == nil { + return nil + } + return e.IntegrationParams +} + +func (e *EngagementRequest) GetLinkedAccountParams() map[string]interface{} { + if e == nil { + return nil + } + return e.LinkedAccountParams +} + +func (e *EngagementRequest) GetRemoteFields() []*RemoteFieldRequest { + if e == nil { + return nil + } + return e.RemoteFields +} + +func (e *EngagementRequest) GetExtraProperties() map[string]interface{} { + return e.extraProperties +} + +func (e *EngagementRequest) UnmarshalJSON(data []byte) error { + type embed EngagementRequest + var unmarshaler = struct { + embed + StartTime *internal.DateTime `json:"start_time,omitempty"` + EndTime *internal.DateTime `json:"end_time,omitempty"` + }{ + embed: embed(*e), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *e = EngagementRequest(unmarshaler.embed) + e.StartTime = unmarshaler.StartTime.TimePtr() + e.EndTime = unmarshaler.EndTime.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *e) + if err != nil { + return err + } + e.extraProperties = extraProperties + e.rawJSON = json.RawMessage(data) + return nil +} + +func (e *EngagementRequest) MarshalJSON() ([]byte, error) { + type embed EngagementRequest + var marshaler = struct { + embed + StartTime *internal.DateTime `json:"start_time,omitempty"` + EndTime *internal.DateTime `json:"end_time,omitempty"` + }{ + embed: embed(*e), + StartTime: internal.NewOptionalDateTime(e.StartTime), + EndTime: internal.NewOptionalDateTime(e.EndTime), + } + return json.Marshal(marshaler) +} + +func (e *EngagementRequest) String() string { + if len(e.rawJSON) > 0 { + if value, err := internal.StringifyJSON(e.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(e); err == nil { + return value + } + return fmt.Sprintf("%#v", e) +} + +// The account of the engagement. +type EngagementRequestAccount struct { + String string + Account *Account + + typ string +} + +func (e *EngagementRequestAccount) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *EngagementRequestAccount) GetAccount() *Account { + if e == nil { + return nil + } + return e.Account +} + +func (e *EngagementRequestAccount) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + valueAccount := new(Account) + if err := json.Unmarshal(data, &valueAccount); err == nil { + e.typ = "Account" + e.Account = valueAccount + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e EngagementRequestAccount) MarshalJSON() ([]byte, error) { + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + if e.typ == "Account" || e.Account != nil { + return json.Marshal(e.Account) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type EngagementRequestAccountVisitor interface { + VisitString(string) error + VisitAccount(*Account) error +} + +func (e *EngagementRequestAccount) Accept(visitor EngagementRequestAccountVisitor) error { + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + if e.typ == "Account" || e.Account != nil { + return visitor.VisitAccount(e.Account) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type EngagementRequestContactsItem struct { + String string + Contact *Contact + + typ string +} + +func (e *EngagementRequestContactsItem) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *EngagementRequestContactsItem) GetContact() *Contact { + if e == nil { + return nil + } + return e.Contact +} + +func (e *EngagementRequestContactsItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + valueContact := new(Contact) + if err := json.Unmarshal(data, &valueContact); err == nil { + e.typ = "Contact" + e.Contact = valueContact + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e EngagementRequestContactsItem) MarshalJSON() ([]byte, error) { + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + if e.typ == "Contact" || e.Contact != nil { + return json.Marshal(e.Contact) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type EngagementRequestContactsItemVisitor interface { + VisitString(string) error + VisitContact(*Contact) error +} + +func (e *EngagementRequestContactsItem) Accept(visitor EngagementRequestContactsItemVisitor) error { + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + if e.typ == "Contact" || e.Contact != nil { + return visitor.VisitContact(e.Contact) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +// The engagement's direction. +// +// * `INBOUND` - INBOUND +// * `OUTBOUND` - OUTBOUND +type EngagementRequestDirection struct { + DirectionEnum DirectionEnum + String string + + typ string +} + +func (e *EngagementRequestDirection) GetDirectionEnum() DirectionEnum { + if e == nil { + return "" + } + return e.DirectionEnum +} + +func (e *EngagementRequestDirection) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *EngagementRequestDirection) UnmarshalJSON(data []byte) error { + var valueDirectionEnum DirectionEnum + if err := json.Unmarshal(data, &valueDirectionEnum); err == nil { + e.typ = "DirectionEnum" + e.DirectionEnum = valueDirectionEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e EngagementRequestDirection) MarshalJSON() ([]byte, error) { + if e.typ == "DirectionEnum" || e.DirectionEnum != "" { + return json.Marshal(e.DirectionEnum) + } + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type EngagementRequestDirectionVisitor interface { + VisitDirectionEnum(DirectionEnum) error + VisitString(string) error +} + +func (e *EngagementRequestDirection) Accept(visitor EngagementRequestDirectionVisitor) error { + if e.typ == "DirectionEnum" || e.DirectionEnum != "" { + return visitor.VisitDirectionEnum(e.DirectionEnum) + } + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +// The engagement type of the engagement. +type EngagementRequestEngagementType struct { + String string + EngagementType *EngagementType + + typ string +} + +func (e *EngagementRequestEngagementType) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *EngagementRequestEngagementType) GetEngagementType() *EngagementType { + if e == nil { + return nil + } + return e.EngagementType +} + +func (e *EngagementRequestEngagementType) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + valueEngagementType := new(EngagementType) + if err := json.Unmarshal(data, &valueEngagementType); err == nil { + e.typ = "EngagementType" + e.EngagementType = valueEngagementType + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e EngagementRequestEngagementType) MarshalJSON() ([]byte, error) { + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + if e.typ == "EngagementType" || e.EngagementType != nil { + return json.Marshal(e.EngagementType) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type EngagementRequestEngagementTypeVisitor interface { + VisitString(string) error + VisitEngagementType(*EngagementType) error +} + +func (e *EngagementRequestEngagementType) Accept(visitor EngagementRequestEngagementTypeVisitor) error { + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + if e.typ == "EngagementType" || e.EngagementType != nil { + return visitor.VisitEngagementType(e.EngagementType) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +// The engagement's owner. +type EngagementRequestOwner struct { + String string + User *User + + typ string +} + +func (e *EngagementRequestOwner) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *EngagementRequestOwner) GetUser() *User { + if e == nil { + return nil + } + return e.User +} + +func (e *EngagementRequestOwner) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + valueUser := new(User) + if err := json.Unmarshal(data, &valueUser); err == nil { + e.typ = "User" + e.User = valueUser + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e EngagementRequestOwner) MarshalJSON() ([]byte, error) { + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + if e.typ == "User" || e.User != nil { + return json.Marshal(e.User) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type EngagementRequestOwnerVisitor interface { + VisitString(string) error + VisitUser(*User) error +} + +func (e *EngagementRequestOwner) Accept(visitor EngagementRequestOwnerVisitor) error { + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + if e.typ == "User" || e.User != nil { + return visitor.VisitUser(e.User) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type EngagementResponse struct { + Model *Engagement `json:"model" url:"model"` + Warnings []*WarningValidationProblem `json:"warnings" url:"warnings"` + Errors []*ErrorValidationProblem `json:"errors" url:"errors"` + Logs []*DebugModeLog `json:"logs,omitempty" url:"logs,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (e *EngagementResponse) GetModel() *Engagement { + if e == nil { + return nil + } + return e.Model +} + +func (e *EngagementResponse) GetWarnings() []*WarningValidationProblem { + if e == nil { + return nil + } + return e.Warnings +} + +func (e *EngagementResponse) GetErrors() []*ErrorValidationProblem { + if e == nil { + return nil + } + return e.Errors +} + +func (e *EngagementResponse) GetLogs() []*DebugModeLog { + if e == nil { + return nil + } + return e.Logs +} + +func (e *EngagementResponse) GetExtraProperties() map[string]interface{} { + return e.extraProperties +} + +func (e *EngagementResponse) UnmarshalJSON(data []byte) error { + type unmarshaler EngagementResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *e = EngagementResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *e) + if err != nil { + return err + } + e.extraProperties = extraProperties + e.rawJSON = json.RawMessage(data) + return nil +} + +func (e *EngagementResponse) String() string { + if len(e.rawJSON) > 0 { + if value, err := internal.StringifyJSON(e.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(e); err == nil { + return value + } + return fmt.Sprintf("%#v", e) +} + +type PaginatedEngagementList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Engagement `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedEngagementList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedEngagementList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedEngagementList) GetResults() []*Engagement { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedEngagementList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedEngagementList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedEngagementList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedEngagementList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedEngagementList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +// # The Engagement Object +// ### Description +// The `Engagement` object is used to represent an interaction noted in a CRM system. +// ### Usage Example +// TODO +type PatchedEngagementRequest struct { + // The engagement's owner. + Owner *string `json:"owner,omitempty" url:"owner,omitempty"` + // The engagement's content. + Content *string `json:"content,omitempty" url:"content,omitempty"` + // The engagement's subject. + Subject *string `json:"subject,omitempty" url:"subject,omitempty"` + // The engagement's direction. + // + // * `INBOUND` - INBOUND + // * `OUTBOUND` - OUTBOUND + Direction *PatchedEngagementRequestDirection `json:"direction,omitempty" url:"direction,omitempty"` + // The engagement type of the engagement. + EngagementType *string `json:"engagement_type,omitempty" url:"engagement_type,omitempty"` + // The time at which the engagement started. + StartTime *time.Time `json:"start_time,omitempty" url:"start_time,omitempty"` + // The time at which the engagement ended. + EndTime *time.Time `json:"end_time,omitempty" url:"end_time,omitempty"` + // The account of the engagement. + Account *string `json:"account,omitempty" url:"account,omitempty"` + Contacts []*string `json:"contacts,omitempty" url:"contacts,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + RemoteFields []*RemoteFieldRequest `json:"remote_fields,omitempty" url:"remote_fields,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PatchedEngagementRequest) GetOwner() *string { + if p == nil { + return nil + } + return p.Owner +} + +func (p *PatchedEngagementRequest) GetContent() *string { + if p == nil { + return nil + } + return p.Content +} + +func (p *PatchedEngagementRequest) GetSubject() *string { + if p == nil { + return nil + } + return p.Subject +} + +func (p *PatchedEngagementRequest) GetDirection() *PatchedEngagementRequestDirection { + if p == nil { + return nil + } + return p.Direction +} + +func (p *PatchedEngagementRequest) GetEngagementType() *string { + if p == nil { + return nil + } + return p.EngagementType +} + +func (p *PatchedEngagementRequest) GetStartTime() *time.Time { + if p == nil { + return nil + } + return p.StartTime +} + +func (p *PatchedEngagementRequest) GetEndTime() *time.Time { + if p == nil { + return nil + } + return p.EndTime +} + +func (p *PatchedEngagementRequest) GetAccount() *string { + if p == nil { + return nil + } + return p.Account +} + +func (p *PatchedEngagementRequest) GetContacts() []*string { + if p == nil { + return nil + } + return p.Contacts +} + +func (p *PatchedEngagementRequest) GetIntegrationParams() map[string]interface{} { + if p == nil { + return nil + } + return p.IntegrationParams +} + +func (p *PatchedEngagementRequest) GetLinkedAccountParams() map[string]interface{} { + if p == nil { + return nil + } + return p.LinkedAccountParams +} + +func (p *PatchedEngagementRequest) GetRemoteFields() []*RemoteFieldRequest { + if p == nil { + return nil + } + return p.RemoteFields +} + +func (p *PatchedEngagementRequest) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PatchedEngagementRequest) UnmarshalJSON(data []byte) error { + type embed PatchedEngagementRequest + var unmarshaler = struct { + embed + StartTime *internal.DateTime `json:"start_time,omitempty"` + EndTime *internal.DateTime `json:"end_time,omitempty"` + }{ + embed: embed(*p), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *p = PatchedEngagementRequest(unmarshaler.embed) + p.StartTime = unmarshaler.StartTime.TimePtr() + p.EndTime = unmarshaler.EndTime.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PatchedEngagementRequest) MarshalJSON() ([]byte, error) { + type embed PatchedEngagementRequest + var marshaler = struct { + embed + StartTime *internal.DateTime `json:"start_time,omitempty"` + EndTime *internal.DateTime `json:"end_time,omitempty"` + }{ + embed: embed(*p), + StartTime: internal.NewOptionalDateTime(p.StartTime), + EndTime: internal.NewOptionalDateTime(p.EndTime), + } + return json.Marshal(marshaler) +} + +func (p *PatchedEngagementRequest) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +// The engagement's direction. +// +// * `INBOUND` - INBOUND +// * `OUTBOUND` - OUTBOUND +type PatchedEngagementRequestDirection struct { + DirectionEnum DirectionEnum + String string + + typ string +} + +func (p *PatchedEngagementRequestDirection) GetDirectionEnum() DirectionEnum { + if p == nil { + return "" + } + return p.DirectionEnum +} + +func (p *PatchedEngagementRequestDirection) GetString() string { + if p == nil { + return "" + } + return p.String +} + +func (p *PatchedEngagementRequestDirection) UnmarshalJSON(data []byte) error { + var valueDirectionEnum DirectionEnum + if err := json.Unmarshal(data, &valueDirectionEnum); err == nil { + p.typ = "DirectionEnum" + p.DirectionEnum = valueDirectionEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + p.typ = "String" + p.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, p) +} + +func (p PatchedEngagementRequestDirection) MarshalJSON() ([]byte, error) { + if p.typ == "DirectionEnum" || p.DirectionEnum != "" { + return json.Marshal(p.DirectionEnum) + } + if p.typ == "String" || p.String != "" { + return json.Marshal(p.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) +} + +type PatchedEngagementRequestDirectionVisitor interface { + VisitDirectionEnum(DirectionEnum) error + VisitString(string) error +} + +func (p *PatchedEngagementRequestDirection) Accept(visitor PatchedEngagementRequestDirectionVisitor) error { + if p.typ == "DirectionEnum" || p.DirectionEnum != "" { + return visitor.VisitDirectionEnum(p.DirectionEnum) + } + if p.typ == "String" || p.String != "" { + return visitor.VisitString(p.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", p) +} diff --git a/crm/engagements/client.go b/crm/engagements/client.go index a6d3c8e..56a8fa8 100644 --- a/crm/engagements/client.go +++ b/crm/engagements/client.go @@ -1,133 +1,135 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package engagements import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - crm "github.com/merge-api/merge-go-client/crm" + core "github.com/merge-api/merge-go-client/v2/core" + crm "github.com/merge-api/merge-go-client/v2/crm" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `Engagement` objects. -func (c *Client) List(ctx context.Context, request *crm.EngagementsListRequest) (*crm.PaginatedEngagementList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/engagements" - - queryParams := make(url.Values) - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeRemoteFields != nil { - queryParams.Add("include_remote_fields", fmt.Sprintf("%v", *request.IncludeRemoteFields)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if request.StartedAfter != nil { - queryParams.Add("started_after", fmt.Sprintf("%v", request.StartedAfter.Format(time.RFC3339))) - } - if request.StartedBefore != nil { - queryParams.Add("started_before", fmt.Sprintf("%v", request.StartedBefore.Format(time.RFC3339))) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *crm.PaginatedEngagementList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *crm.EngagementsListRequest, + opts ...option.RequestOption, +) (*core.Page[*crm.Engagement], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/engagements" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *crm.PaginatedEngagementList) *internal.PageResponse[*string, *crm.Engagement] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *crm.Engagement]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Creates an `Engagement` object with the given values. -func (c *Client) Create(ctx context.Context, request *crm.EngagementEndpointRequest) (*crm.EngagementResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/engagements" - - queryParams := make(url.Values) - if request.IsDebugMode != nil { - queryParams.Add("is_debug_mode", fmt.Sprintf("%v", *request.IsDebugMode)) - } - if request.RunAsync != nil { - queryParams.Add("run_async", fmt.Sprintf("%v", *request.RunAsync)) +func (c *Client) Create( + ctx context.Context, + request *crm.EngagementEndpointRequest, + opts ...option.RequestOption, +) (*crm.EngagementResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/engagements" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *crm.EngagementResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -136,35 +138,46 @@ func (c *Client) Create(ctx context.Context, request *crm.EngagementEndpointRequ } // Returns an `Engagement` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *crm.EngagementsRetrieveRequest) (*crm.Engagement, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"crm/v1/engagements/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeRemoteFields != nil { - queryParams.Add("include_remote_fields", fmt.Sprintf("%v", *request.IncludeRemoteFields)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *crm.EngagementsRetrieveRequest, + opts ...option.RequestOption, +) (*crm.Engagement, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/crm/v1/engagements/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *crm.Engagement if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -173,33 +186,48 @@ func (c *Client) Retrieve(ctx context.Context, id string, request *crm.Engagemen } // Updates an `Engagement` object with the given `id`. -func (c *Client) PartialUpdate(ctx context.Context, id string, request *crm.PatchedEngagementEndpointRequest) (*crm.EngagementResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"crm/v1/engagements/%v", id) - - queryParams := make(url.Values) - if request.IsDebugMode != nil { - queryParams.Add("is_debug_mode", fmt.Sprintf("%v", *request.IsDebugMode)) - } - if request.RunAsync != nil { - queryParams.Add("run_async", fmt.Sprintf("%v", *request.RunAsync)) +func (c *Client) PartialUpdate( + ctx context.Context, + id string, + request *crm.PatchedEngagementEndpointRequest, + opts ...option.RequestOption, +) (*crm.EngagementResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/crm/v1/engagements/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *crm.EngagementResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPatch, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPatch, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -208,21 +236,38 @@ func (c *Client) PartialUpdate(ctx context.Context, id string, request *crm.Patc } // Returns metadata for `Engagement` PATCHs. -func (c *Client) MetaPatchRetrieve(ctx context.Context, id string) (*crm.MetaResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"crm/v1/engagements/meta/patch/%v", id) +func (c *Client) MetaPatchRetrieve( + ctx context.Context, + id string, + opts ...option.RequestOption, +) (*crm.MetaResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/crm/v1/engagements/meta/patch/%v", + id, + ) + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *crm.MetaResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -231,21 +276,34 @@ func (c *Client) MetaPatchRetrieve(ctx context.Context, id string) (*crm.MetaRes } // Returns metadata for `Engagement` POSTs. -func (c *Client) MetaPostRetrieve(ctx context.Context) (*crm.MetaResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/engagements/meta/post" +func (c *Client) MetaPostRetrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*crm.MetaResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/engagements/meta/post" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *crm.MetaResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -254,50 +312,60 @@ func (c *Client) MetaPostRetrieve(ctx context.Context) (*crm.MetaResponse, error } // Returns a list of `RemoteFieldClass` objects. -func (c *Client) RemoteFieldClassesList(ctx context.Context, request *crm.EngagementsRemoteFieldClassesListRequest) (*crm.PaginatedRemoteFieldClassList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/engagements/remote-field-classes" - - queryParams := make(url.Values) - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeRemoteFields != nil { - queryParams.Add("include_remote_fields", fmt.Sprintf("%v", *request.IncludeRemoteFields)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.IsCommonModelField != nil { - queryParams.Add("is_common_model_field", fmt.Sprintf("%v", *request.IsCommonModelField)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *crm.PaginatedRemoteFieldClassList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) RemoteFieldClassesList( + ctx context.Context, + request *crm.EngagementsRemoteFieldClassesListRequest, + opts ...option.RequestOption, +) (*core.Page[*crm.RemoteFieldClass], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/engagements/remote-field-classes" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *crm.PaginatedRemoteFieldClassList) *internal.PageResponse[*string, *crm.RemoteFieldClass] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *crm.RemoteFieldClass]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } diff --git a/crm/engagementtypes/client.go b/crm/engagementtypes/client.go index 3d4e449..645d6f7 100644 --- a/crm/engagementtypes/client.go +++ b/crm/engagementtypes/client.go @@ -1,123 +1,137 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package engagementtypes import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - crm "github.com/merge-api/merge-go-client/crm" + core "github.com/merge-api/merge-go-client/v2/core" + crm "github.com/merge-api/merge-go-client/v2/crm" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `EngagementType` objects. -func (c *Client) List(ctx context.Context, request *crm.EngagementTypesListRequest) (*crm.PaginatedEngagementTypeList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/engagement-types" - - queryParams := make(url.Values) - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeRemoteFields != nil { - queryParams.Add("include_remote_fields", fmt.Sprintf("%v", *request.IncludeRemoteFields)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *crm.PaginatedEngagementTypeList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *crm.EngagementTypesListRequest, + opts ...option.RequestOption, +) (*core.Page[*crm.EngagementType], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/engagement-types" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *crm.PaginatedEngagementTypeList) *internal.PageResponse[*string, *crm.EngagementType] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *crm.EngagementType]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Returns an `EngagementType` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *crm.EngagementTypesRetrieveRequest) (*crm.EngagementType, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"crm/v1/engagement-types/%v", id) - - queryParams := make(url.Values) - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeRemoteFields != nil { - queryParams.Add("include_remote_fields", fmt.Sprintf("%v", *request.IncludeRemoteFields)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *crm.EngagementTypesRetrieveRequest, + opts ...option.RequestOption, +) (*crm.EngagementType, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/crm/v1/engagement-types/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *crm.EngagementType if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -126,50 +140,60 @@ func (c *Client) Retrieve(ctx context.Context, id string, request *crm.Engagemen } // Returns a list of `RemoteFieldClass` objects. -func (c *Client) RemoteFieldClassesList(ctx context.Context, request *crm.EngagementTypesRemoteFieldClassesListRequest) (*crm.PaginatedRemoteFieldClassList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/engagement-types/remote-field-classes" - - queryParams := make(url.Values) - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeRemoteFields != nil { - queryParams.Add("include_remote_fields", fmt.Sprintf("%v", *request.IncludeRemoteFields)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.IsCommonModelField != nil { - queryParams.Add("is_common_model_field", fmt.Sprintf("%v", *request.IsCommonModelField)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *crm.PaginatedRemoteFieldClassList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) RemoteFieldClassesList( + ctx context.Context, + request *crm.EngagementTypesRemoteFieldClassesListRequest, + opts ...option.RequestOption, +) (*core.Page[*crm.RemoteFieldClass], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/engagement-types/remote-field-classes" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *crm.PaginatedRemoteFieldClassList) *internal.PageResponse[*string, *crm.RemoteFieldClass] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *crm.RemoteFieldClass]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } diff --git a/crm/field_mapping.go b/crm/field_mapping.go index f6eaf4d..9d41422 100644 --- a/crm/field_mapping.go +++ b/crm/field_mapping.go @@ -1,41 +1,1061 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package crm +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" +) + type CreateFieldMappingRequest struct { // If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. - ExcludeRemoteFieldMetadata *bool `json:"-"` + ExcludeRemoteFieldMetadata *bool `json:"-" url:"exclude_remote_field_metadata,omitempty"` // The name of the target field you want this remote field to map to. - TargetFieldName string `json:"target_field_name"` + TargetFieldName string `json:"target_field_name" url:"-"` // The description of the target field you want this remote field to map to. - TargetFieldDescription string `json:"target_field_description"` + TargetFieldDescription string `json:"target_field_description" url:"-"` // The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint. - RemoteFieldTraversalPath []interface{} `json:"remote_field_traversal_path,omitempty"` + RemoteFieldTraversalPath []interface{} `json:"remote_field_traversal_path,omitempty" url:"-"` // The method of the remote endpoint where the remote field is coming from. - RemoteMethod string `json:"remote_method"` + RemoteMethod string `json:"remote_method" url:"-"` // The path of the remote endpoint where the remote field is coming from. - RemoteUrlPath string `json:"remote_url_path"` + RemoteUrlPath string `json:"remote_url_path" url:"-"` // The name of the Common Model that the remote field corresponds to in a given category. - CommonModelName string `json:"common_model_name"` + CommonModelName string `json:"common_model_name" url:"-"` } type PatchedEditFieldMappingRequest struct { // The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint. - RemoteFieldTraversalPath []interface{} `json:"remote_field_traversal_path,omitempty"` + RemoteFieldTraversalPath []interface{} `json:"remote_field_traversal_path,omitempty" url:"-"` // The method of the remote endpoint where the remote field is coming from. - RemoteMethod *string `json:"remote_method,omitempty"` + RemoteMethod *string `json:"remote_method,omitempty" url:"-"` // The path of the remote endpoint where the remote field is coming from. - RemoteUrlPath *string `json:"remote_url_path,omitempty"` + RemoteUrlPath *string `json:"remote_url_path,omitempty" url:"-"` } type FieldMappingsRetrieveRequest struct { // If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. - ExcludeRemoteFieldMetadata *bool `json:"-"` + ExcludeRemoteFieldMetadata *bool `json:"-" url:"exclude_remote_field_metadata,omitempty"` } type RemoteFieldsRetrieveRequest struct { // A comma seperated list of Common Model names. If included, will only return Remote Fields for those Common Models. - CommonModels *string `json:"-"` + CommonModels *string `json:"-" url:"common_models,omitempty"` // If true, will include example values, where available, for remote fields in the 3rd party platform. These examples come from active data from your customers. - IncludeExampleValues *string `json:"-"` + IncludeExampleValues *string `json:"-" url:"include_example_values,omitempty"` +} + +type AdvancedMetadata struct { + Id string `json:"id" url:"id"` + DisplayName *string `json:"display_name,omitempty" url:"display_name,omitempty"` + Description *string `json:"description,omitempty" url:"description,omitempty"` + IsRequired *bool `json:"is_required,omitempty" url:"is_required,omitempty"` + IsCustom *bool `json:"is_custom,omitempty" url:"is_custom,omitempty"` + FieldChoices []interface{} `json:"field_choices,omitempty" url:"field_choices,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AdvancedMetadata) GetId() string { + if a == nil { + return "" + } + return a.Id +} + +func (a *AdvancedMetadata) GetDisplayName() *string { + if a == nil { + return nil + } + return a.DisplayName +} + +func (a *AdvancedMetadata) GetDescription() *string { + if a == nil { + return nil + } + return a.Description +} + +func (a *AdvancedMetadata) GetIsRequired() *bool { + if a == nil { + return nil + } + return a.IsRequired +} + +func (a *AdvancedMetadata) GetIsCustom() *bool { + if a == nil { + return nil + } + return a.IsCustom +} + +func (a *AdvancedMetadata) GetFieldChoices() []interface{} { + if a == nil { + return nil + } + return a.FieldChoices +} + +func (a *AdvancedMetadata) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AdvancedMetadata) UnmarshalJSON(data []byte) error { + type unmarshaler AdvancedMetadata + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *a = AdvancedMetadata(value) + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AdvancedMetadata) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} + +type ExternalTargetFieldApi struct { + Name *string `json:"name,omitempty" url:"name,omitempty"` + Description *string `json:"description,omitempty" url:"description,omitempty"` + IsMapped *string `json:"is_mapped,omitempty" url:"is_mapped,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (e *ExternalTargetFieldApi) GetName() *string { + if e == nil { + return nil + } + return e.Name +} + +func (e *ExternalTargetFieldApi) GetDescription() *string { + if e == nil { + return nil + } + return e.Description +} + +func (e *ExternalTargetFieldApi) GetIsMapped() *string { + if e == nil { + return nil + } + return e.IsMapped +} + +func (e *ExternalTargetFieldApi) GetExtraProperties() map[string]interface{} { + return e.extraProperties +} + +func (e *ExternalTargetFieldApi) UnmarshalJSON(data []byte) error { + type unmarshaler ExternalTargetFieldApi + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *e = ExternalTargetFieldApi(value) + extraProperties, err := internal.ExtractExtraProperties(data, *e) + if err != nil { + return err + } + e.extraProperties = extraProperties + e.rawJSON = json.RawMessage(data) + return nil +} + +func (e *ExternalTargetFieldApi) String() string { + if len(e.rawJSON) > 0 { + if value, err := internal.StringifyJSON(e.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(e); err == nil { + return value + } + return fmt.Sprintf("%#v", e) +} + +type ExternalTargetFieldApiResponse struct { + Account []*ExternalTargetFieldApi `json:"Account,omitempty" url:"Account,omitempty"` + Contact []*ExternalTargetFieldApi `json:"Contact,omitempty" url:"Contact,omitempty"` + Lead []*ExternalTargetFieldApi `json:"Lead,omitempty" url:"Lead,omitempty"` + Note []*ExternalTargetFieldApi `json:"Note,omitempty" url:"Note,omitempty"` + Opportunity []*ExternalTargetFieldApi `json:"Opportunity,omitempty" url:"Opportunity,omitempty"` + Stage []*ExternalTargetFieldApi `json:"Stage,omitempty" url:"Stage,omitempty"` + User []*ExternalTargetFieldApi `json:"User,omitempty" url:"User,omitempty"` + Task []*ExternalTargetFieldApi `json:"Task,omitempty" url:"Task,omitempty"` + Engagement []*ExternalTargetFieldApi `json:"Engagement,omitempty" url:"Engagement,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (e *ExternalTargetFieldApiResponse) GetAccount() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.Account +} + +func (e *ExternalTargetFieldApiResponse) GetContact() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.Contact +} + +func (e *ExternalTargetFieldApiResponse) GetLead() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.Lead +} + +func (e *ExternalTargetFieldApiResponse) GetNote() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.Note +} + +func (e *ExternalTargetFieldApiResponse) GetOpportunity() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.Opportunity +} + +func (e *ExternalTargetFieldApiResponse) GetStage() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.Stage +} + +func (e *ExternalTargetFieldApiResponse) GetUser() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.User +} + +func (e *ExternalTargetFieldApiResponse) GetTask() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.Task +} + +func (e *ExternalTargetFieldApiResponse) GetEngagement() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.Engagement +} + +func (e *ExternalTargetFieldApiResponse) GetExtraProperties() map[string]interface{} { + return e.extraProperties +} + +func (e *ExternalTargetFieldApiResponse) UnmarshalJSON(data []byte) error { + type unmarshaler ExternalTargetFieldApiResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *e = ExternalTargetFieldApiResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *e) + if err != nil { + return err + } + e.extraProperties = extraProperties + e.rawJSON = json.RawMessage(data) + return nil +} + +func (e *ExternalTargetFieldApiResponse) String() string { + if len(e.rawJSON) > 0 { + if value, err := internal.StringifyJSON(e.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(e); err == nil { + return value + } + return fmt.Sprintf("%#v", e) +} + +type FieldMappingApiInstance struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + IsIntegrationWide *bool `json:"is_integration_wide,omitempty" url:"is_integration_wide,omitempty"` + TargetField *FieldMappingApiInstanceTargetField `json:"target_field,omitempty" url:"target_field,omitempty"` + RemoteField *FieldMappingApiInstanceRemoteField `json:"remote_field,omitempty" url:"remote_field,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (f *FieldMappingApiInstance) GetId() *string { + if f == nil { + return nil + } + return f.Id +} + +func (f *FieldMappingApiInstance) GetIsIntegrationWide() *bool { + if f == nil { + return nil + } + return f.IsIntegrationWide +} + +func (f *FieldMappingApiInstance) GetTargetField() *FieldMappingApiInstanceTargetField { + if f == nil { + return nil + } + return f.TargetField +} + +func (f *FieldMappingApiInstance) GetRemoteField() *FieldMappingApiInstanceRemoteField { + if f == nil { + return nil + } + return f.RemoteField +} + +func (f *FieldMappingApiInstance) GetExtraProperties() map[string]interface{} { + return f.extraProperties +} + +func (f *FieldMappingApiInstance) UnmarshalJSON(data []byte) error { + type unmarshaler FieldMappingApiInstance + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *f = FieldMappingApiInstance(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { + return err + } + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) + return nil +} + +func (f *FieldMappingApiInstance) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(f); err == nil { + return value + } + return fmt.Sprintf("%#v", f) +} + +type FieldMappingApiInstanceRemoteField struct { + RemoteKeyName *string `json:"remote_key_name,omitempty" url:"remote_key_name,omitempty"` + Schema map[string]interface{} `json:"schema,omitempty" url:"schema,omitempty"` + RemoteEndpointInfo *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo `json:"remote_endpoint_info" url:"remote_endpoint_info"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (f *FieldMappingApiInstanceRemoteField) GetRemoteKeyName() *string { + if f == nil { + return nil + } + return f.RemoteKeyName +} + +func (f *FieldMappingApiInstanceRemoteField) GetSchema() map[string]interface{} { + if f == nil { + return nil + } + return f.Schema +} + +func (f *FieldMappingApiInstanceRemoteField) GetRemoteEndpointInfo() *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo { + if f == nil { + return nil + } + return f.RemoteEndpointInfo +} + +func (f *FieldMappingApiInstanceRemoteField) GetExtraProperties() map[string]interface{} { + return f.extraProperties +} + +func (f *FieldMappingApiInstanceRemoteField) UnmarshalJSON(data []byte) error { + type unmarshaler FieldMappingApiInstanceRemoteField + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *f = FieldMappingApiInstanceRemoteField(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { + return err + } + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) + return nil +} + +func (f *FieldMappingApiInstanceRemoteField) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(f); err == nil { + return value + } + return fmt.Sprintf("%#v", f) +} + +type FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo struct { + Method *string `json:"method,omitempty" url:"method,omitempty"` + UrlPath *string `json:"url_path,omitempty" url:"url_path,omitempty"` + FieldTraversalPath []string `json:"field_traversal_path,omitempty" url:"field_traversal_path,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (f *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo) GetMethod() *string { + if f == nil { + return nil + } + return f.Method +} + +func (f *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo) GetUrlPath() *string { + if f == nil { + return nil + } + return f.UrlPath +} + +func (f *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo) GetFieldTraversalPath() []string { + if f == nil { + return nil + } + return f.FieldTraversalPath +} + +func (f *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo) GetExtraProperties() map[string]interface{} { + return f.extraProperties +} + +func (f *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo) UnmarshalJSON(data []byte) error { + type unmarshaler FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *f = FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { + return err + } + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) + return nil +} + +func (f *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(f); err == nil { + return value + } + return fmt.Sprintf("%#v", f) +} + +type FieldMappingApiInstanceResponse struct { + Account []*FieldMappingApiInstance `json:"Account,omitempty" url:"Account,omitempty"` + Contact []*FieldMappingApiInstance `json:"Contact,omitempty" url:"Contact,omitempty"` + Lead []*FieldMappingApiInstance `json:"Lead,omitempty" url:"Lead,omitempty"` + Note []*FieldMappingApiInstance `json:"Note,omitempty" url:"Note,omitempty"` + Opportunity []*FieldMappingApiInstance `json:"Opportunity,omitempty" url:"Opportunity,omitempty"` + Stage []*FieldMappingApiInstance `json:"Stage,omitempty" url:"Stage,omitempty"` + User []*FieldMappingApiInstance `json:"User,omitempty" url:"User,omitempty"` + Task []*FieldMappingApiInstance `json:"Task,omitempty" url:"Task,omitempty"` + Engagement []*FieldMappingApiInstance `json:"Engagement,omitempty" url:"Engagement,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (f *FieldMappingApiInstanceResponse) GetAccount() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Account +} + +func (f *FieldMappingApiInstanceResponse) GetContact() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Contact +} + +func (f *FieldMappingApiInstanceResponse) GetLead() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Lead +} + +func (f *FieldMappingApiInstanceResponse) GetNote() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Note +} + +func (f *FieldMappingApiInstanceResponse) GetOpportunity() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Opportunity +} + +func (f *FieldMappingApiInstanceResponse) GetStage() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Stage +} + +func (f *FieldMappingApiInstanceResponse) GetUser() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.User +} + +func (f *FieldMappingApiInstanceResponse) GetTask() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Task +} + +func (f *FieldMappingApiInstanceResponse) GetEngagement() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Engagement +} + +func (f *FieldMappingApiInstanceResponse) GetExtraProperties() map[string]interface{} { + return f.extraProperties +} + +func (f *FieldMappingApiInstanceResponse) UnmarshalJSON(data []byte) error { + type unmarshaler FieldMappingApiInstanceResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *f = FieldMappingApiInstanceResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { + return err + } + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) + return nil +} + +func (f *FieldMappingApiInstanceResponse) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(f); err == nil { + return value + } + return fmt.Sprintf("%#v", f) +} + +type FieldMappingApiInstanceTargetField struct { + Name string `json:"name" url:"name"` + Description string `json:"description" url:"description"` + IsOrganizationWide bool `json:"is_organization_wide" url:"is_organization_wide"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (f *FieldMappingApiInstanceTargetField) GetName() string { + if f == nil { + return "" + } + return f.Name +} + +func (f *FieldMappingApiInstanceTargetField) GetDescription() string { + if f == nil { + return "" + } + return f.Description +} + +func (f *FieldMappingApiInstanceTargetField) GetIsOrganizationWide() bool { + if f == nil { + return false + } + return f.IsOrganizationWide +} + +func (f *FieldMappingApiInstanceTargetField) GetExtraProperties() map[string]interface{} { + return f.extraProperties +} + +func (f *FieldMappingApiInstanceTargetField) UnmarshalJSON(data []byte) error { + type unmarshaler FieldMappingApiInstanceTargetField + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *f = FieldMappingApiInstanceTargetField(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { + return err + } + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) + return nil +} + +func (f *FieldMappingApiInstanceTargetField) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(f); err == nil { + return value + } + return fmt.Sprintf("%#v", f) +} + +type FieldMappingInstanceResponse struct { + Model *FieldMappingApiInstance `json:"model" url:"model"` + Warnings []*WarningValidationProblem `json:"warnings" url:"warnings"` + Errors []*ErrorValidationProblem `json:"errors" url:"errors"` + Logs []*DebugModeLog `json:"logs,omitempty" url:"logs,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (f *FieldMappingInstanceResponse) GetModel() *FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Model +} + +func (f *FieldMappingInstanceResponse) GetWarnings() []*WarningValidationProblem { + if f == nil { + return nil + } + return f.Warnings +} + +func (f *FieldMappingInstanceResponse) GetErrors() []*ErrorValidationProblem { + if f == nil { + return nil + } + return f.Errors +} + +func (f *FieldMappingInstanceResponse) GetLogs() []*DebugModeLog { + if f == nil { + return nil + } + return f.Logs +} + +func (f *FieldMappingInstanceResponse) GetExtraProperties() map[string]interface{} { + return f.extraProperties +} + +func (f *FieldMappingInstanceResponse) UnmarshalJSON(data []byte) error { + type unmarshaler FieldMappingInstanceResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *f = FieldMappingInstanceResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { + return err + } + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) + return nil +} + +func (f *FieldMappingInstanceResponse) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(f); err == nil { + return value + } + return fmt.Sprintf("%#v", f) +} + +type RemoteEndpointInfo struct { + Method string `json:"method" url:"method"` + UrlPath string `json:"url_path" url:"url_path"` + FieldTraversalPath []interface{} `json:"field_traversal_path" url:"field_traversal_path"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (r *RemoteEndpointInfo) GetMethod() string { + if r == nil { + return "" + } + return r.Method +} + +func (r *RemoteEndpointInfo) GetUrlPath() string { + if r == nil { + return "" + } + return r.UrlPath +} + +func (r *RemoteEndpointInfo) GetFieldTraversalPath() []interface{} { + if r == nil { + return nil + } + return r.FieldTraversalPath +} + +func (r *RemoteEndpointInfo) GetExtraProperties() map[string]interface{} { + return r.extraProperties +} + +func (r *RemoteEndpointInfo) UnmarshalJSON(data []byte) error { + type unmarshaler RemoteEndpointInfo + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *r = RemoteEndpointInfo(value) + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { + return err + } + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) + return nil +} + +func (r *RemoteEndpointInfo) String() string { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(r); err == nil { + return value + } + return fmt.Sprintf("%#v", r) +} + +type RemoteFieldApi struct { + Schema map[string]interface{} `json:"schema" url:"schema"` + RemoteKeyName string `json:"remote_key_name" url:"remote_key_name"` + RemoteEndpointInfo *RemoteEndpointInfo `json:"remote_endpoint_info" url:"remote_endpoint_info"` + ExampleValues []interface{} `json:"example_values,omitempty" url:"example_values,omitempty"` + AdvancedMetadata *AdvancedMetadata `json:"advanced_metadata,omitempty" url:"advanced_metadata,omitempty"` + Coverage *RemoteFieldApiCoverage `json:"coverage,omitempty" url:"coverage,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (r *RemoteFieldApi) GetSchema() map[string]interface{} { + if r == nil { + return nil + } + return r.Schema +} + +func (r *RemoteFieldApi) GetRemoteKeyName() string { + if r == nil { + return "" + } + return r.RemoteKeyName +} + +func (r *RemoteFieldApi) GetRemoteEndpointInfo() *RemoteEndpointInfo { + if r == nil { + return nil + } + return r.RemoteEndpointInfo +} + +func (r *RemoteFieldApi) GetExampleValues() []interface{} { + if r == nil { + return nil + } + return r.ExampleValues +} + +func (r *RemoteFieldApi) GetAdvancedMetadata() *AdvancedMetadata { + if r == nil { + return nil + } + return r.AdvancedMetadata +} + +func (r *RemoteFieldApi) GetCoverage() *RemoteFieldApiCoverage { + if r == nil { + return nil + } + return r.Coverage +} + +func (r *RemoteFieldApi) GetExtraProperties() map[string]interface{} { + return r.extraProperties +} + +func (r *RemoteFieldApi) UnmarshalJSON(data []byte) error { + type unmarshaler RemoteFieldApi + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *r = RemoteFieldApi(value) + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { + return err + } + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) + return nil +} + +func (r *RemoteFieldApi) String() string { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(r); err == nil { + return value + } + return fmt.Sprintf("%#v", r) +} + +type RemoteFieldApiCoverage struct { + Integer int + Double float64 + + typ string +} + +func (r *RemoteFieldApiCoverage) GetInteger() int { + if r == nil { + return 0 + } + return r.Integer +} + +func (r *RemoteFieldApiCoverage) GetDouble() float64 { + if r == nil { + return 0 + } + return r.Double +} + +func (r *RemoteFieldApiCoverage) UnmarshalJSON(data []byte) error { + var valueInteger int + if err := json.Unmarshal(data, &valueInteger); err == nil { + r.typ = "Integer" + r.Integer = valueInteger + return nil + } + var valueDouble float64 + if err := json.Unmarshal(data, &valueDouble); err == nil { + r.typ = "Double" + r.Double = valueDouble + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, r) +} + +func (r RemoteFieldApiCoverage) MarshalJSON() ([]byte, error) { + if r.typ == "Integer" || r.Integer != 0 { + return json.Marshal(r.Integer) + } + if r.typ == "Double" || r.Double != 0 { + return json.Marshal(r.Double) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", r) +} + +type RemoteFieldApiCoverageVisitor interface { + VisitInteger(int) error + VisitDouble(float64) error +} + +func (r *RemoteFieldApiCoverage) Accept(visitor RemoteFieldApiCoverageVisitor) error { + if r.typ == "Integer" || r.Integer != 0 { + return visitor.VisitInteger(r.Integer) + } + if r.typ == "Double" || r.Double != 0 { + return visitor.VisitDouble(r.Double) + } + return fmt.Errorf("type %T does not include a non-empty union type", r) +} + +type RemoteFieldApiResponse struct { + Account []*RemoteFieldApi `json:"Account,omitempty" url:"Account,omitempty"` + Contact []*RemoteFieldApi `json:"Contact,omitempty" url:"Contact,omitempty"` + Lead []*RemoteFieldApi `json:"Lead,omitempty" url:"Lead,omitempty"` + Note []*RemoteFieldApi `json:"Note,omitempty" url:"Note,omitempty"` + Opportunity []*RemoteFieldApi `json:"Opportunity,omitempty" url:"Opportunity,omitempty"` + Stage []*RemoteFieldApi `json:"Stage,omitempty" url:"Stage,omitempty"` + User []*RemoteFieldApi `json:"User,omitempty" url:"User,omitempty"` + Task []*RemoteFieldApi `json:"Task,omitempty" url:"Task,omitempty"` + Engagement []*RemoteFieldApi `json:"Engagement,omitempty" url:"Engagement,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (r *RemoteFieldApiResponse) GetAccount() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.Account +} + +func (r *RemoteFieldApiResponse) GetContact() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.Contact +} + +func (r *RemoteFieldApiResponse) GetLead() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.Lead +} + +func (r *RemoteFieldApiResponse) GetNote() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.Note +} + +func (r *RemoteFieldApiResponse) GetOpportunity() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.Opportunity +} + +func (r *RemoteFieldApiResponse) GetStage() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.Stage +} + +func (r *RemoteFieldApiResponse) GetUser() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.User +} + +func (r *RemoteFieldApiResponse) GetTask() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.Task +} + +func (r *RemoteFieldApiResponse) GetEngagement() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.Engagement +} + +func (r *RemoteFieldApiResponse) GetExtraProperties() map[string]interface{} { + return r.extraProperties +} + +func (r *RemoteFieldApiResponse) UnmarshalJSON(data []byte) error { + type unmarshaler RemoteFieldApiResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *r = RemoteFieldApiResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { + return err + } + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) + return nil +} + +func (r *RemoteFieldApiResponse) String() string { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(r); err == nil { + return value + } + return fmt.Sprintf("%#v", r) } diff --git a/crm/fieldmapping/client.go b/crm/fieldmapping/client.go index 7e87d72..31f8508 100644 --- a/crm/fieldmapping/client.go +++ b/crm/fieldmapping/client.go @@ -1,58 +1,73 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package fieldmapping import ( context "context" - fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - crm "github.com/merge-api/merge-go-client/crm" + core "github.com/merge-api/merge-go-client/v2/core" + crm "github.com/merge-api/merge-go-client/v2/crm" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge fields. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). -func (c *Client) FieldMappingsRetrieve(ctx context.Context, request *crm.FieldMappingsRetrieveRequest) (*crm.FieldMappingApiInstanceResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/field-mappings" - - queryParams := make(url.Values) - if request.ExcludeRemoteFieldMetadata != nil { - queryParams.Add("exclude_remote_field_metadata", fmt.Sprintf("%v", *request.ExcludeRemoteFieldMetadata)) +func (c *Client) FieldMappingsRetrieve( + ctx context.Context, + request *crm.FieldMappingsRetrieveRequest, + opts ...option.RequestOption, +) (*crm.FieldMappingApiInstanceResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/field-mappings" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *crm.FieldMappingApiInstanceResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -61,30 +76,44 @@ func (c *Client) FieldMappingsRetrieve(ctx context.Context, request *crm.FieldMa } // Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. -func (c *Client) FieldMappingsCreate(ctx context.Context, request *crm.CreateFieldMappingRequest) (*crm.FieldMappingInstanceResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/field-mappings" - - queryParams := make(url.Values) - if request.ExcludeRemoteFieldMetadata != nil { - queryParams.Add("exclude_remote_field_metadata", fmt.Sprintf("%v", *request.ExcludeRemoteFieldMetadata)) +func (c *Client) FieldMappingsCreate( + ctx context.Context, + request *crm.CreateFieldMappingRequest, + opts ...option.RequestOption, +) (*crm.FieldMappingInstanceResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/field-mappings" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *crm.FieldMappingInstanceResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -93,21 +122,38 @@ func (c *Client) FieldMappingsCreate(ctx context.Context, request *crm.CreateFie } // Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. -func (c *Client) FieldMappingsDestroy(ctx context.Context, fieldMappingId string) (*crm.FieldMappingInstanceResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"crm/v1/field-mappings/%v", fieldMappingId) +func (c *Client) FieldMappingsDestroy( + ctx context.Context, + fieldMappingId string, + opts ...option.RequestOption, +) (*crm.FieldMappingInstanceResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/crm/v1/field-mappings/%v", + fieldMappingId, + ) + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *crm.FieldMappingInstanceResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodDelete, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodDelete, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -116,22 +162,41 @@ func (c *Client) FieldMappingsDestroy(ctx context.Context, fieldMappingId string } // Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. -func (c *Client) FieldMappingsPartialUpdate(ctx context.Context, fieldMappingId string, request *crm.PatchedEditFieldMappingRequest) (*crm.FieldMappingInstanceResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"crm/v1/field-mappings/%v", fieldMappingId) +func (c *Client) FieldMappingsPartialUpdate( + ctx context.Context, + fieldMappingId string, + request *crm.PatchedEditFieldMappingRequest, + opts ...option.RequestOption, +) (*crm.FieldMappingInstanceResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/crm/v1/field-mappings/%v", + fieldMappingId, + ) + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *crm.FieldMappingInstanceResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPatch, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPatch, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -140,32 +205,42 @@ func (c *Client) FieldMappingsPartialUpdate(ctx context.Context, fieldMappingId } // Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data is enabled. You can use remote fields to override existing Merge fields or map a new Merge field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). -func (c *Client) RemoteFieldsRetrieve(ctx context.Context, request *crm.RemoteFieldsRetrieveRequest) (*crm.RemoteFieldApiResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/remote-fields" - - queryParams := make(url.Values) - if request.CommonModels != nil { - queryParams.Add("common_models", fmt.Sprintf("%v", *request.CommonModels)) - } - if request.IncludeExampleValues != nil { - queryParams.Add("include_example_values", fmt.Sprintf("%v", *request.IncludeExampleValues)) +func (c *Client) RemoteFieldsRetrieve( + ctx context.Context, + request *crm.RemoteFieldsRetrieveRequest, + opts ...option.RequestOption, +) (*crm.RemoteFieldApiResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/remote-fields" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *crm.RemoteFieldApiResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -174,21 +249,34 @@ func (c *Client) RemoteFieldsRetrieve(ctx context.Context, request *crm.RemoteFi } // Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields are additional fields appended to the Merge Common Model for all Linked Accounts in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). -func (c *Client) TargetFieldsRetrieve(ctx context.Context) (*crm.ExternalTargetFieldApiResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/target-fields" +func (c *Client) TargetFieldsRetrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*crm.ExternalTargetFieldApiResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/target-fields" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *crm.ExternalTargetFieldApiResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/crm/forceresync/client.go b/crm/forceresync/client.go index cab91e7..7f2e16e 100644 --- a/crm/forceresync/client.go +++ b/crm/forceresync/client.go @@ -1,48 +1,65 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package forceresync import ( context "context" - core "github.com/merge-api/merge-go-client/core" - crm "github.com/merge-api/merge-go-client/crm" + core "github.com/merge-api/merge-go-client/v2/core" + crm "github.com/merge-api/merge-go-client/v2/crm" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } -// Force re-sync of all models. This is available for all organizations via the dashboard. Force re-sync is also available programmatically via API for monthly, quarterly, and highest sync frequency customers on the Professional or Enterprise plans. Doing so will consume a sync credit for the relevant linked account. -func (c *Client) SyncStatusResyncCreate(ctx context.Context) ([]*crm.SyncStatus, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/sync-status/resync" +// Force re-sync of all models. This endpoint is available for monthly, quarterly, and highest sync frequency customers on the Professional or Enterprise plans. Doing so will consume a sync credit for the relevant linked account. Force re-syncs can also be triggered manually in the Merge Dashboard and is available for all customers. +func (c *Client) SyncStatusResyncCreate( + ctx context.Context, + opts ...option.RequestOption, +) ([]*crm.SyncStatus, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/sync-status/resync" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response []*crm.SyncStatus if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/crm/generate_key.go b/crm/generate_key.go index 15cbbf3..8a955e7 100644 --- a/crm/generate_key.go +++ b/crm/generate_key.go @@ -1,8 +1,8 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package crm type GenerateRemoteKeyRequest struct { // The name of the remote key - Name string `json:"name"` + Name string `json:"name" url:"-"` } diff --git a/crm/generatekey/client.go b/crm/generatekey/client.go index 93e55d6..a80bdee 100644 --- a/crm/generatekey/client.go +++ b/crm/generatekey/client.go @@ -1,49 +1,68 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package generatekey import ( context "context" - core "github.com/merge-api/merge-go-client/core" - crm "github.com/merge-api/merge-go-client/crm" + core "github.com/merge-api/merge-go-client/v2/core" + crm "github.com/merge-api/merge-go-client/v2/crm" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Create a remote key. -func (c *Client) Create(ctx context.Context, request *crm.GenerateRemoteKeyRequest) (*crm.RemoteKey, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/generate-key" +func (c *Client) Create( + ctx context.Context, + request *crm.GenerateRemoteKeyRequest, + opts ...option.RequestOption, +) (*crm.RemoteKey, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/generate-key" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *crm.RemoteKey if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err diff --git a/crm/issues.go b/crm/issues.go index eb0bab4..37d58b8 100644 --- a/crm/issues.go +++ b/crm/issues.go @@ -1,41 +1,43 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package crm import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type IssuesListRequest struct { - AccountToken *string `json:"-"` + AccountToken *string `json:"-" url:"account_token,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // If included, will only include issues whose most recent action occurred before this time - EndDate *string `json:"-"` - EndUserOrganizationName *string `json:"-"` + EndDate *string `json:"-" url:"end_date,omitempty"` + EndUserOrganizationName *string `json:"-" url:"end_user_organization_name,omitempty"` // If provided, will only return issues whose first incident time was after this datetime. - FirstIncidentTimeAfter *time.Time `json:"-"` + FirstIncidentTimeAfter *time.Time `json:"-" url:"first_incident_time_after,omitempty"` // If provided, will only return issues whose first incident time was before this datetime. - FirstIncidentTimeBefore *time.Time `json:"-"` + FirstIncidentTimeBefore *time.Time `json:"-" url:"first_incident_time_before,omitempty"` // If true, will include muted issues - IncludeMuted *string `json:"-"` - IntegrationName *string `json:"-"` + IncludeMuted *string `json:"-" url:"include_muted,omitempty"` + IntegrationName *string `json:"-" url:"integration_name,omitempty"` // If provided, will only return issues whose last incident time was after this datetime. - LastIncidentTimeAfter *time.Time `json:"-"` + LastIncidentTimeAfter *time.Time `json:"-" url:"last_incident_time_after,omitempty"` // If provided, will only return issues whose last incident time was before this datetime. - LastIncidentTimeBefore *time.Time `json:"-"` + LastIncidentTimeBefore *time.Time `json:"-" url:"last_incident_time_before,omitempty"` // If provided, will only include issues pertaining to the linked account passed in. - LinkedAccountId *string `json:"-"` + LinkedAccountId *string `json:"-" url:"linked_account_id,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // If included, will only include issues whose most recent action occurred after this time - StartDate *string `json:"-"` + StartDate *string `json:"-" url:"start_date,omitempty"` // Status of the issue. Options: ('ONGOING', 'RESOLVED') // - // - `ONGOING` - ONGOING - // - `RESOLVED` - RESOLVED - Status *IssuesListRequestStatus `json:"-"` + // * `ONGOING` - ONGOING + // * `RESOLVED` - RESOLVED + Status *IssuesListRequestStatus `json:"-" url:"status,omitempty"` } type IssuesListRequestStatus string @@ -59,3 +61,283 @@ func NewIssuesListRequestStatusFromString(s string) (IssuesListRequestStatus, er func (i IssuesListRequestStatus) Ptr() *IssuesListRequestStatus { return &i } + +type Issue struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // Status of the issue. Options: ('ONGOING', 'RESOLVED') + // + // * `ONGOING` - ONGOING + // * `RESOLVED` - RESOLVED + Status *IssueStatus `json:"status,omitempty" url:"status,omitempty"` + ErrorDescription string `json:"error_description" url:"error_description"` + EndUser map[string]interface{} `json:"end_user,omitempty" url:"end_user,omitempty"` + FirstIncidentTime *time.Time `json:"first_incident_time,omitempty" url:"first_incident_time,omitempty"` + LastIncidentTime *time.Time `json:"last_incident_time,omitempty" url:"last_incident_time,omitempty"` + IsMuted *bool `json:"is_muted,omitempty" url:"is_muted,omitempty"` + ErrorDetails []string `json:"error_details,omitempty" url:"error_details,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (i *Issue) GetId() *string { + if i == nil { + return nil + } + return i.Id +} + +func (i *Issue) GetStatus() *IssueStatus { + if i == nil { + return nil + } + return i.Status +} + +func (i *Issue) GetErrorDescription() string { + if i == nil { + return "" + } + return i.ErrorDescription +} + +func (i *Issue) GetEndUser() map[string]interface{} { + if i == nil { + return nil + } + return i.EndUser +} + +func (i *Issue) GetFirstIncidentTime() *time.Time { + if i == nil { + return nil + } + return i.FirstIncidentTime +} + +func (i *Issue) GetLastIncidentTime() *time.Time { + if i == nil { + return nil + } + return i.LastIncidentTime +} + +func (i *Issue) GetIsMuted() *bool { + if i == nil { + return nil + } + return i.IsMuted +} + +func (i *Issue) GetErrorDetails() []string { + if i == nil { + return nil + } + return i.ErrorDetails +} + +func (i *Issue) GetExtraProperties() map[string]interface{} { + return i.extraProperties +} + +func (i *Issue) UnmarshalJSON(data []byte) error { + type embed Issue + var unmarshaler = struct { + embed + FirstIncidentTime *internal.DateTime `json:"first_incident_time,omitempty"` + LastIncidentTime *internal.DateTime `json:"last_incident_time,omitempty"` + }{ + embed: embed(*i), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *i = Issue(unmarshaler.embed) + i.FirstIncidentTime = unmarshaler.FirstIncidentTime.TimePtr() + i.LastIncidentTime = unmarshaler.LastIncidentTime.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *i) + if err != nil { + return err + } + i.extraProperties = extraProperties + i.rawJSON = json.RawMessage(data) + return nil +} + +func (i *Issue) MarshalJSON() ([]byte, error) { + type embed Issue + var marshaler = struct { + embed + FirstIncidentTime *internal.DateTime `json:"first_incident_time,omitempty"` + LastIncidentTime *internal.DateTime `json:"last_incident_time,omitempty"` + }{ + embed: embed(*i), + FirstIncidentTime: internal.NewOptionalDateTime(i.FirstIncidentTime), + LastIncidentTime: internal.NewOptionalDateTime(i.LastIncidentTime), + } + return json.Marshal(marshaler) +} + +func (i *Issue) String() string { + if len(i.rawJSON) > 0 { + if value, err := internal.StringifyJSON(i.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(i); err == nil { + return value + } + return fmt.Sprintf("%#v", i) +} + +// Status of the issue. Options: ('ONGOING', 'RESOLVED') +// +// * `ONGOING` - ONGOING +// * `RESOLVED` - RESOLVED +type IssueStatus struct { + IssueStatusEnum IssueStatusEnum + String string + + typ string +} + +func (i *IssueStatus) GetIssueStatusEnum() IssueStatusEnum { + if i == nil { + return "" + } + return i.IssueStatusEnum +} + +func (i *IssueStatus) GetString() string { + if i == nil { + return "" + } + return i.String +} + +func (i *IssueStatus) UnmarshalJSON(data []byte) error { + var valueIssueStatusEnum IssueStatusEnum + if err := json.Unmarshal(data, &valueIssueStatusEnum); err == nil { + i.typ = "IssueStatusEnum" + i.IssueStatusEnum = valueIssueStatusEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + i.typ = "String" + i.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) +} + +func (i IssueStatus) MarshalJSON() ([]byte, error) { + if i.typ == "IssueStatusEnum" || i.IssueStatusEnum != "" { + return json.Marshal(i.IssueStatusEnum) + } + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) +} + +type IssueStatusVisitor interface { + VisitIssueStatusEnum(IssueStatusEnum) error + VisitString(string) error +} + +func (i *IssueStatus) Accept(visitor IssueStatusVisitor) error { + if i.typ == "IssueStatusEnum" || i.IssueStatusEnum != "" { + return visitor.VisitIssueStatusEnum(i.IssueStatusEnum) + } + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", i) +} + +// * `ONGOING` - ONGOING +// * `RESOLVED` - RESOLVED +type IssueStatusEnum string + +const ( + IssueStatusEnumOngoing IssueStatusEnum = "ONGOING" + IssueStatusEnumResolved IssueStatusEnum = "RESOLVED" +) + +func NewIssueStatusEnumFromString(s string) (IssueStatusEnum, error) { + switch s { + case "ONGOING": + return IssueStatusEnumOngoing, nil + case "RESOLVED": + return IssueStatusEnumResolved, nil + } + var t IssueStatusEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (i IssueStatusEnum) Ptr() *IssueStatusEnum { + return &i +} + +type PaginatedIssueList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Issue `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedIssueList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedIssueList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedIssueList) GetResults() []*Issue { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedIssueList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedIssueList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedIssueList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedIssueList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedIssueList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} diff --git a/crm/issues/client.go b/crm/issues/client.go index 8c735ba..355c841 100644 --- a/crm/issues/client.go +++ b/crm/issues/client.go @@ -1,121 +1,129 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package issues import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - crm "github.com/merge-api/merge-go-client/crm" + core "github.com/merge-api/merge-go-client/v2/core" + crm "github.com/merge-api/merge-go-client/v2/crm" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Gets all issues for Organization. -func (c *Client) List(ctx context.Context, request *crm.IssuesListRequest) (*crm.PaginatedIssueList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/issues" - - queryParams := make(url.Values) - if request.AccountToken != nil { - queryParams.Add("account_token", fmt.Sprintf("%v", *request.AccountToken)) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.EndDate != nil { - queryParams.Add("end_date", fmt.Sprintf("%v", *request.EndDate)) - } - if request.EndUserOrganizationName != nil { - queryParams.Add("end_user_organization_name", fmt.Sprintf("%v", *request.EndUserOrganizationName)) - } - if request.FirstIncidentTimeAfter != nil { - queryParams.Add("first_incident_time_after", fmt.Sprintf("%v", request.FirstIncidentTimeAfter.Format(time.RFC3339))) - } - if request.FirstIncidentTimeBefore != nil { - queryParams.Add("first_incident_time_before", fmt.Sprintf("%v", request.FirstIncidentTimeBefore.Format(time.RFC3339))) - } - if request.IncludeMuted != nil { - queryParams.Add("include_muted", fmt.Sprintf("%v", *request.IncludeMuted)) - } - if request.IntegrationName != nil { - queryParams.Add("integration_name", fmt.Sprintf("%v", *request.IntegrationName)) - } - if request.LastIncidentTimeAfter != nil { - queryParams.Add("last_incident_time_after", fmt.Sprintf("%v", request.LastIncidentTimeAfter.Format(time.RFC3339))) - } - if request.LastIncidentTimeBefore != nil { - queryParams.Add("last_incident_time_before", fmt.Sprintf("%v", request.LastIncidentTimeBefore.Format(time.RFC3339))) - } - if request.LinkedAccountId != nil { - queryParams.Add("linked_account_id", fmt.Sprintf("%v", *request.LinkedAccountId)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.StartDate != nil { - queryParams.Add("start_date", fmt.Sprintf("%v", *request.StartDate)) - } - if request.Status != nil { - queryParams.Add("status", fmt.Sprintf("%v", *request.Status)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *crm.PaginatedIssueList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *crm.IssuesListRequest, + opts ...option.RequestOption, +) (*core.Page[*crm.Issue], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/issues" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *crm.PaginatedIssueList) *internal.PageResponse[*string, *crm.Issue] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *crm.Issue]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Get a specific issue. -func (c *Client) Retrieve(ctx context.Context, id string) (*crm.Issue, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"crm/v1/issues/%v", id) +func (c *Client) Retrieve( + ctx context.Context, + id string, + opts ...option.RequestOption, +) (*crm.Issue, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/crm/v1/issues/%v", + id, + ) + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *crm.Issue if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/crm/leads.go b/crm/leads.go index a1e5e27..b5f69af 100644 --- a/crm/leads.go +++ b/crm/leads.go @@ -1,153 +1,1103 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package crm import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type LeadEndpointRequest struct { // Whether to include debug fields (such as log file links) in the response. - IsDebugMode *bool `json:"-"` + IsDebugMode *bool `json:"-" url:"is_debug_mode,omitempty"` // Whether or not third-party updates should be run asynchronously. - RunAsync *bool `json:"-"` - Model *LeadRequest `json:"model,omitempty"` + RunAsync *bool `json:"-" url:"run_async,omitempty"` + Model *LeadRequest `json:"model,omitempty" url:"-"` } type LeadsListRequest struct { // If provided, will only return leads with this account. - ConvertedAccountId *string `json:"-"` + ConvertedAccountId *string `json:"-" url:"converted_account_id,omitempty"` // If provided, will only return leads with this contact. - ConvertedContactId *string `json:"-"` + ConvertedContactId *string `json:"-" url:"converted_contact_id,omitempty"` // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // If provided, will only return contacts matching the email addresses; multiple email_addresses can be separated by commas. - EmailAddresses *string `json:"-"` + EmailAddresses *string `json:"-" url:"email_addresses,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *LeadsListRequestExpand `json:"-"` + Expand []*LeadsListRequestExpandItem `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - IncludeRemoteFields *bool `json:"-"` + IncludeRemoteFields *bool `json:"-" url:"include_remote_fields,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // If provided, will only return leads with this owner. - OwnerId *string `json:"-"` + OwnerId *string `json:"-" url:"owner_id,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // If provided, will only return contacts matching the phone numbers; multiple phone numbers can be separated by commas. - PhoneNumbers *string `json:"-"` + PhoneNumbers *string `json:"-" url:"phone_numbers,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` } type LeadsRemoteFieldClassesListRequest struct { // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - IncludeRemoteFields *bool `json:"-"` + IncludeRemoteFields *bool `json:"-" url:"include_remote_fields,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, will only return remote field classes with this is_common_model_field value - IsCommonModelField *bool `json:"-"` + IsCommonModelField *bool `json:"-" url:"is_common_model_field,omitempty"` + // If provided, will only return remote fields classes with this is_custom value + IsCustom *bool `json:"-" url:"is_custom,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` } type LeadsRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *LeadsRetrieveRequestExpand `json:"-"` + Expand []*LeadsRetrieveRequestExpandItem `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - IncludeRemoteFields *bool `json:"-"` + IncludeRemoteFields *bool `json:"-" url:"include_remote_fields,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` } -type LeadsListRequestExpand string +type LeadsListRequestExpandItem string const ( - LeadsListRequestExpandConvertedAccount LeadsListRequestExpand = "converted_account" - LeadsListRequestExpandConvertedContact LeadsListRequestExpand = "converted_contact" - LeadsListRequestExpandConvertedContactConvertedAccount LeadsListRequestExpand = "converted_contact,converted_account" - LeadsListRequestExpandOwner LeadsListRequestExpand = "owner" - LeadsListRequestExpandOwnerConvertedAccount LeadsListRequestExpand = "owner,converted_account" - LeadsListRequestExpandOwnerConvertedContact LeadsListRequestExpand = "owner,converted_contact" - LeadsListRequestExpandOwnerConvertedContactConvertedAccount LeadsListRequestExpand = "owner,converted_contact,converted_account" + LeadsListRequestExpandItemConvertedAccount LeadsListRequestExpandItem = "converted_account" + LeadsListRequestExpandItemConvertedContact LeadsListRequestExpandItem = "converted_contact" + LeadsListRequestExpandItemOwner LeadsListRequestExpandItem = "owner" ) -func NewLeadsListRequestExpandFromString(s string) (LeadsListRequestExpand, error) { +func NewLeadsListRequestExpandItemFromString(s string) (LeadsListRequestExpandItem, error) { switch s { case "converted_account": - return LeadsListRequestExpandConvertedAccount, nil + return LeadsListRequestExpandItemConvertedAccount, nil case "converted_contact": - return LeadsListRequestExpandConvertedContact, nil - case "converted_contact,converted_account": - return LeadsListRequestExpandConvertedContactConvertedAccount, nil + return LeadsListRequestExpandItemConvertedContact, nil case "owner": - return LeadsListRequestExpandOwner, nil - case "owner,converted_account": - return LeadsListRequestExpandOwnerConvertedAccount, nil - case "owner,converted_contact": - return LeadsListRequestExpandOwnerConvertedContact, nil - case "owner,converted_contact,converted_account": - return LeadsListRequestExpandOwnerConvertedContactConvertedAccount, nil - } - var t LeadsListRequestExpand + return LeadsListRequestExpandItemOwner, nil + } + var t LeadsListRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (l LeadsListRequestExpand) Ptr() *LeadsListRequestExpand { +func (l LeadsListRequestExpandItem) Ptr() *LeadsListRequestExpandItem { return &l } -type LeadsRetrieveRequestExpand string +type LeadsRetrieveRequestExpandItem string const ( - LeadsRetrieveRequestExpandConvertedAccount LeadsRetrieveRequestExpand = "converted_account" - LeadsRetrieveRequestExpandConvertedContact LeadsRetrieveRequestExpand = "converted_contact" - LeadsRetrieveRequestExpandConvertedContactConvertedAccount LeadsRetrieveRequestExpand = "converted_contact,converted_account" - LeadsRetrieveRequestExpandOwner LeadsRetrieveRequestExpand = "owner" - LeadsRetrieveRequestExpandOwnerConvertedAccount LeadsRetrieveRequestExpand = "owner,converted_account" - LeadsRetrieveRequestExpandOwnerConvertedContact LeadsRetrieveRequestExpand = "owner,converted_contact" - LeadsRetrieveRequestExpandOwnerConvertedContactConvertedAccount LeadsRetrieveRequestExpand = "owner,converted_contact,converted_account" + LeadsRetrieveRequestExpandItemConvertedAccount LeadsRetrieveRequestExpandItem = "converted_account" + LeadsRetrieveRequestExpandItemConvertedContact LeadsRetrieveRequestExpandItem = "converted_contact" + LeadsRetrieveRequestExpandItemOwner LeadsRetrieveRequestExpandItem = "owner" ) -func NewLeadsRetrieveRequestExpandFromString(s string) (LeadsRetrieveRequestExpand, error) { +func NewLeadsRetrieveRequestExpandItemFromString(s string) (LeadsRetrieveRequestExpandItem, error) { switch s { case "converted_account": - return LeadsRetrieveRequestExpandConvertedAccount, nil + return LeadsRetrieveRequestExpandItemConvertedAccount, nil case "converted_contact": - return LeadsRetrieveRequestExpandConvertedContact, nil - case "converted_contact,converted_account": - return LeadsRetrieveRequestExpandConvertedContactConvertedAccount, nil + return LeadsRetrieveRequestExpandItemConvertedContact, nil case "owner": - return LeadsRetrieveRequestExpandOwner, nil - case "owner,converted_account": - return LeadsRetrieveRequestExpandOwnerConvertedAccount, nil - case "owner,converted_contact": - return LeadsRetrieveRequestExpandOwnerConvertedContact, nil - case "owner,converted_contact,converted_account": - return LeadsRetrieveRequestExpandOwnerConvertedContactConvertedAccount, nil - } - var t LeadsRetrieveRequestExpand + return LeadsRetrieveRequestExpandItemOwner, nil + } + var t LeadsRetrieveRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (l LeadsRetrieveRequestExpand) Ptr() *LeadsRetrieveRequestExpand { +func (l LeadsRetrieveRequestExpandItem) Ptr() *LeadsRetrieveRequestExpandItem { return &l } + +// # The Lead Object +// ### Description +// The `Lead` object is used to represent an individual who is a potential customer. +// ### Usage Example +// TODO +type Lead struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The lead's owner. + Owner *LeadOwner `json:"owner,omitempty" url:"owner,omitempty"` + // The lead's source. + LeadSource *string `json:"lead_source,omitempty" url:"lead_source,omitempty"` + // The lead's title. + Title *string `json:"title,omitempty" url:"title,omitempty"` + // The lead's company. + Company *string `json:"company,omitempty" url:"company,omitempty"` + // The lead's first name. + FirstName *string `json:"first_name,omitempty" url:"first_name,omitempty"` + // The lead's last name. + LastName *string `json:"last_name,omitempty" url:"last_name,omitempty"` + Addresses []*Address `json:"addresses,omitempty" url:"addresses,omitempty"` + EmailAddresses []*EmailAddress `json:"email_addresses,omitempty" url:"email_addresses,omitempty"` + PhoneNumbers []*PhoneNumber `json:"phone_numbers,omitempty" url:"phone_numbers,omitempty"` + // When the third party's lead was updated. + RemoteUpdatedAt *time.Time `json:"remote_updated_at,omitempty" url:"remote_updated_at,omitempty"` + // When the third party's lead was created. + RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty" url:"remote_created_at,omitempty"` + // When the lead was converted. + ConvertedDate *time.Time `json:"converted_date,omitempty" url:"converted_date,omitempty"` + // The contact of the converted lead. + ConvertedContact *LeadConvertedContact `json:"converted_contact,omitempty" url:"converted_contact,omitempty"` + // The account of the converted lead. + ConvertedAccount *LeadConvertedAccount `json:"converted_account,omitempty" url:"converted_account,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + RemoteFields []*RemoteField `json:"remote_fields,omitempty" url:"remote_fields,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (l *Lead) GetId() *string { + if l == nil { + return nil + } + return l.Id +} + +func (l *Lead) GetRemoteId() *string { + if l == nil { + return nil + } + return l.RemoteId +} + +func (l *Lead) GetCreatedAt() *time.Time { + if l == nil { + return nil + } + return l.CreatedAt +} + +func (l *Lead) GetModifiedAt() *time.Time { + if l == nil { + return nil + } + return l.ModifiedAt +} + +func (l *Lead) GetOwner() *LeadOwner { + if l == nil { + return nil + } + return l.Owner +} + +func (l *Lead) GetLeadSource() *string { + if l == nil { + return nil + } + return l.LeadSource +} + +func (l *Lead) GetTitle() *string { + if l == nil { + return nil + } + return l.Title +} + +func (l *Lead) GetCompany() *string { + if l == nil { + return nil + } + return l.Company +} + +func (l *Lead) GetFirstName() *string { + if l == nil { + return nil + } + return l.FirstName +} + +func (l *Lead) GetLastName() *string { + if l == nil { + return nil + } + return l.LastName +} + +func (l *Lead) GetAddresses() []*Address { + if l == nil { + return nil + } + return l.Addresses +} + +func (l *Lead) GetEmailAddresses() []*EmailAddress { + if l == nil { + return nil + } + return l.EmailAddresses +} + +func (l *Lead) GetPhoneNumbers() []*PhoneNumber { + if l == nil { + return nil + } + return l.PhoneNumbers +} + +func (l *Lead) GetRemoteUpdatedAt() *time.Time { + if l == nil { + return nil + } + return l.RemoteUpdatedAt +} + +func (l *Lead) GetRemoteCreatedAt() *time.Time { + if l == nil { + return nil + } + return l.RemoteCreatedAt +} + +func (l *Lead) GetConvertedDate() *time.Time { + if l == nil { + return nil + } + return l.ConvertedDate +} + +func (l *Lead) GetConvertedContact() *LeadConvertedContact { + if l == nil { + return nil + } + return l.ConvertedContact +} + +func (l *Lead) GetConvertedAccount() *LeadConvertedAccount { + if l == nil { + return nil + } + return l.ConvertedAccount +} + +func (l *Lead) GetRemoteWasDeleted() *bool { + if l == nil { + return nil + } + return l.RemoteWasDeleted +} + +func (l *Lead) GetFieldMappings() map[string]interface{} { + if l == nil { + return nil + } + return l.FieldMappings +} + +func (l *Lead) GetRemoteData() []*RemoteData { + if l == nil { + return nil + } + return l.RemoteData +} + +func (l *Lead) GetRemoteFields() []*RemoteField { + if l == nil { + return nil + } + return l.RemoteFields +} + +func (l *Lead) GetExtraProperties() map[string]interface{} { + return l.extraProperties +} + +func (l *Lead) UnmarshalJSON(data []byte) error { + type embed Lead + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + RemoteUpdatedAt *internal.DateTime `json:"remote_updated_at,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + ConvertedDate *internal.DateTime `json:"converted_date,omitempty"` + }{ + embed: embed(*l), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *l = Lead(unmarshaler.embed) + l.CreatedAt = unmarshaler.CreatedAt.TimePtr() + l.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + l.RemoteUpdatedAt = unmarshaler.RemoteUpdatedAt.TimePtr() + l.RemoteCreatedAt = unmarshaler.RemoteCreatedAt.TimePtr() + l.ConvertedDate = unmarshaler.ConvertedDate.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *l) + if err != nil { + return err + } + l.extraProperties = extraProperties + l.rawJSON = json.RawMessage(data) + return nil +} + +func (l *Lead) MarshalJSON() ([]byte, error) { + type embed Lead + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + RemoteUpdatedAt *internal.DateTime `json:"remote_updated_at,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + ConvertedDate *internal.DateTime `json:"converted_date,omitempty"` + }{ + embed: embed(*l), + CreatedAt: internal.NewOptionalDateTime(l.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(l.ModifiedAt), + RemoteUpdatedAt: internal.NewOptionalDateTime(l.RemoteUpdatedAt), + RemoteCreatedAt: internal.NewOptionalDateTime(l.RemoteCreatedAt), + ConvertedDate: internal.NewOptionalDateTime(l.ConvertedDate), + } + return json.Marshal(marshaler) +} + +func (l *Lead) String() string { + if len(l.rawJSON) > 0 { + if value, err := internal.StringifyJSON(l.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(l); err == nil { + return value + } + return fmt.Sprintf("%#v", l) +} + +// The account of the converted lead. +type LeadConvertedAccount struct { + String string + Account *Account + + typ string +} + +func (l *LeadConvertedAccount) GetString() string { + if l == nil { + return "" + } + return l.String +} + +func (l *LeadConvertedAccount) GetAccount() *Account { + if l == nil { + return nil + } + return l.Account +} + +func (l *LeadConvertedAccount) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + l.typ = "String" + l.String = valueString + return nil + } + valueAccount := new(Account) + if err := json.Unmarshal(data, &valueAccount); err == nil { + l.typ = "Account" + l.Account = valueAccount + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, l) +} + +func (l LeadConvertedAccount) MarshalJSON() ([]byte, error) { + if l.typ == "String" || l.String != "" { + return json.Marshal(l.String) + } + if l.typ == "Account" || l.Account != nil { + return json.Marshal(l.Account) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", l) +} + +type LeadConvertedAccountVisitor interface { + VisitString(string) error + VisitAccount(*Account) error +} + +func (l *LeadConvertedAccount) Accept(visitor LeadConvertedAccountVisitor) error { + if l.typ == "String" || l.String != "" { + return visitor.VisitString(l.String) + } + if l.typ == "Account" || l.Account != nil { + return visitor.VisitAccount(l.Account) + } + return fmt.Errorf("type %T does not include a non-empty union type", l) +} + +// The contact of the converted lead. +type LeadConvertedContact struct { + String string + Contact *Contact + + typ string +} + +func (l *LeadConvertedContact) GetString() string { + if l == nil { + return "" + } + return l.String +} + +func (l *LeadConvertedContact) GetContact() *Contact { + if l == nil { + return nil + } + return l.Contact +} + +func (l *LeadConvertedContact) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + l.typ = "String" + l.String = valueString + return nil + } + valueContact := new(Contact) + if err := json.Unmarshal(data, &valueContact); err == nil { + l.typ = "Contact" + l.Contact = valueContact + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, l) +} + +func (l LeadConvertedContact) MarshalJSON() ([]byte, error) { + if l.typ == "String" || l.String != "" { + return json.Marshal(l.String) + } + if l.typ == "Contact" || l.Contact != nil { + return json.Marshal(l.Contact) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", l) +} + +type LeadConvertedContactVisitor interface { + VisitString(string) error + VisitContact(*Contact) error +} + +func (l *LeadConvertedContact) Accept(visitor LeadConvertedContactVisitor) error { + if l.typ == "String" || l.String != "" { + return visitor.VisitString(l.String) + } + if l.typ == "Contact" || l.Contact != nil { + return visitor.VisitContact(l.Contact) + } + return fmt.Errorf("type %T does not include a non-empty union type", l) +} + +// The lead's owner. +type LeadOwner struct { + String string + User *User + + typ string +} + +func (l *LeadOwner) GetString() string { + if l == nil { + return "" + } + return l.String +} + +func (l *LeadOwner) GetUser() *User { + if l == nil { + return nil + } + return l.User +} + +func (l *LeadOwner) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + l.typ = "String" + l.String = valueString + return nil + } + valueUser := new(User) + if err := json.Unmarshal(data, &valueUser); err == nil { + l.typ = "User" + l.User = valueUser + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, l) +} + +func (l LeadOwner) MarshalJSON() ([]byte, error) { + if l.typ == "String" || l.String != "" { + return json.Marshal(l.String) + } + if l.typ == "User" || l.User != nil { + return json.Marshal(l.User) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", l) +} + +type LeadOwnerVisitor interface { + VisitString(string) error + VisitUser(*User) error +} + +func (l *LeadOwner) Accept(visitor LeadOwnerVisitor) error { + if l.typ == "String" || l.String != "" { + return visitor.VisitString(l.String) + } + if l.typ == "User" || l.User != nil { + return visitor.VisitUser(l.User) + } + return fmt.Errorf("type %T does not include a non-empty union type", l) +} + +// # The Lead Object +// ### Description +// The `Lead` object is used to represent an individual who is a potential customer. +// ### Usage Example +// TODO +type LeadRequest struct { + // The lead's owner. + Owner *LeadRequestOwner `json:"owner,omitempty" url:"owner,omitempty"` + // The lead's source. + LeadSource *string `json:"lead_source,omitempty" url:"lead_source,omitempty"` + // The lead's title. + Title *string `json:"title,omitempty" url:"title,omitempty"` + // The lead's company. + Company *string `json:"company,omitempty" url:"company,omitempty"` + // The lead's first name. + FirstName *string `json:"first_name,omitempty" url:"first_name,omitempty"` + // The lead's last name. + LastName *string `json:"last_name,omitempty" url:"last_name,omitempty"` + Addresses []*AddressRequest `json:"addresses,omitempty" url:"addresses,omitempty"` + EmailAddresses []*EmailAddressRequest `json:"email_addresses,omitempty" url:"email_addresses,omitempty"` + PhoneNumbers []*PhoneNumberRequest `json:"phone_numbers,omitempty" url:"phone_numbers,omitempty"` + // When the lead was converted. + ConvertedDate *time.Time `json:"converted_date,omitempty" url:"converted_date,omitempty"` + // The contact of the converted lead. + ConvertedContact *LeadRequestConvertedContact `json:"converted_contact,omitempty" url:"converted_contact,omitempty"` + // The account of the converted lead. + ConvertedAccount *LeadRequestConvertedAccount `json:"converted_account,omitempty" url:"converted_account,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + RemoteFields []*RemoteFieldRequest `json:"remote_fields,omitempty" url:"remote_fields,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (l *LeadRequest) GetOwner() *LeadRequestOwner { + if l == nil { + return nil + } + return l.Owner +} + +func (l *LeadRequest) GetLeadSource() *string { + if l == nil { + return nil + } + return l.LeadSource +} + +func (l *LeadRequest) GetTitle() *string { + if l == nil { + return nil + } + return l.Title +} + +func (l *LeadRequest) GetCompany() *string { + if l == nil { + return nil + } + return l.Company +} + +func (l *LeadRequest) GetFirstName() *string { + if l == nil { + return nil + } + return l.FirstName +} + +func (l *LeadRequest) GetLastName() *string { + if l == nil { + return nil + } + return l.LastName +} + +func (l *LeadRequest) GetAddresses() []*AddressRequest { + if l == nil { + return nil + } + return l.Addresses +} + +func (l *LeadRequest) GetEmailAddresses() []*EmailAddressRequest { + if l == nil { + return nil + } + return l.EmailAddresses +} + +func (l *LeadRequest) GetPhoneNumbers() []*PhoneNumberRequest { + if l == nil { + return nil + } + return l.PhoneNumbers +} + +func (l *LeadRequest) GetConvertedDate() *time.Time { + if l == nil { + return nil + } + return l.ConvertedDate +} + +func (l *LeadRequest) GetConvertedContact() *LeadRequestConvertedContact { + if l == nil { + return nil + } + return l.ConvertedContact +} + +func (l *LeadRequest) GetConvertedAccount() *LeadRequestConvertedAccount { + if l == nil { + return nil + } + return l.ConvertedAccount +} + +func (l *LeadRequest) GetIntegrationParams() map[string]interface{} { + if l == nil { + return nil + } + return l.IntegrationParams +} + +func (l *LeadRequest) GetLinkedAccountParams() map[string]interface{} { + if l == nil { + return nil + } + return l.LinkedAccountParams +} + +func (l *LeadRequest) GetRemoteFields() []*RemoteFieldRequest { + if l == nil { + return nil + } + return l.RemoteFields +} + +func (l *LeadRequest) GetExtraProperties() map[string]interface{} { + return l.extraProperties +} + +func (l *LeadRequest) UnmarshalJSON(data []byte) error { + type embed LeadRequest + var unmarshaler = struct { + embed + ConvertedDate *internal.DateTime `json:"converted_date,omitempty"` + }{ + embed: embed(*l), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *l = LeadRequest(unmarshaler.embed) + l.ConvertedDate = unmarshaler.ConvertedDate.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *l) + if err != nil { + return err + } + l.extraProperties = extraProperties + l.rawJSON = json.RawMessage(data) + return nil +} + +func (l *LeadRequest) MarshalJSON() ([]byte, error) { + type embed LeadRequest + var marshaler = struct { + embed + ConvertedDate *internal.DateTime `json:"converted_date,omitempty"` + }{ + embed: embed(*l), + ConvertedDate: internal.NewOptionalDateTime(l.ConvertedDate), + } + return json.Marshal(marshaler) +} + +func (l *LeadRequest) String() string { + if len(l.rawJSON) > 0 { + if value, err := internal.StringifyJSON(l.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(l); err == nil { + return value + } + return fmt.Sprintf("%#v", l) +} + +// The account of the converted lead. +type LeadRequestConvertedAccount struct { + String string + Account *Account + + typ string +} + +func (l *LeadRequestConvertedAccount) GetString() string { + if l == nil { + return "" + } + return l.String +} + +func (l *LeadRequestConvertedAccount) GetAccount() *Account { + if l == nil { + return nil + } + return l.Account +} + +func (l *LeadRequestConvertedAccount) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + l.typ = "String" + l.String = valueString + return nil + } + valueAccount := new(Account) + if err := json.Unmarshal(data, &valueAccount); err == nil { + l.typ = "Account" + l.Account = valueAccount + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, l) +} + +func (l LeadRequestConvertedAccount) MarshalJSON() ([]byte, error) { + if l.typ == "String" || l.String != "" { + return json.Marshal(l.String) + } + if l.typ == "Account" || l.Account != nil { + return json.Marshal(l.Account) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", l) +} + +type LeadRequestConvertedAccountVisitor interface { + VisitString(string) error + VisitAccount(*Account) error +} + +func (l *LeadRequestConvertedAccount) Accept(visitor LeadRequestConvertedAccountVisitor) error { + if l.typ == "String" || l.String != "" { + return visitor.VisitString(l.String) + } + if l.typ == "Account" || l.Account != nil { + return visitor.VisitAccount(l.Account) + } + return fmt.Errorf("type %T does not include a non-empty union type", l) +} + +// The contact of the converted lead. +type LeadRequestConvertedContact struct { + String string + Contact *Contact + + typ string +} + +func (l *LeadRequestConvertedContact) GetString() string { + if l == nil { + return "" + } + return l.String +} + +func (l *LeadRequestConvertedContact) GetContact() *Contact { + if l == nil { + return nil + } + return l.Contact +} + +func (l *LeadRequestConvertedContact) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + l.typ = "String" + l.String = valueString + return nil + } + valueContact := new(Contact) + if err := json.Unmarshal(data, &valueContact); err == nil { + l.typ = "Contact" + l.Contact = valueContact + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, l) +} + +func (l LeadRequestConvertedContact) MarshalJSON() ([]byte, error) { + if l.typ == "String" || l.String != "" { + return json.Marshal(l.String) + } + if l.typ == "Contact" || l.Contact != nil { + return json.Marshal(l.Contact) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", l) +} + +type LeadRequestConvertedContactVisitor interface { + VisitString(string) error + VisitContact(*Contact) error +} + +func (l *LeadRequestConvertedContact) Accept(visitor LeadRequestConvertedContactVisitor) error { + if l.typ == "String" || l.String != "" { + return visitor.VisitString(l.String) + } + if l.typ == "Contact" || l.Contact != nil { + return visitor.VisitContact(l.Contact) + } + return fmt.Errorf("type %T does not include a non-empty union type", l) +} + +// The lead's owner. +type LeadRequestOwner struct { + String string + User *User + + typ string +} + +func (l *LeadRequestOwner) GetString() string { + if l == nil { + return "" + } + return l.String +} + +func (l *LeadRequestOwner) GetUser() *User { + if l == nil { + return nil + } + return l.User +} + +func (l *LeadRequestOwner) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + l.typ = "String" + l.String = valueString + return nil + } + valueUser := new(User) + if err := json.Unmarshal(data, &valueUser); err == nil { + l.typ = "User" + l.User = valueUser + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, l) +} + +func (l LeadRequestOwner) MarshalJSON() ([]byte, error) { + if l.typ == "String" || l.String != "" { + return json.Marshal(l.String) + } + if l.typ == "User" || l.User != nil { + return json.Marshal(l.User) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", l) +} + +type LeadRequestOwnerVisitor interface { + VisitString(string) error + VisitUser(*User) error +} + +func (l *LeadRequestOwner) Accept(visitor LeadRequestOwnerVisitor) error { + if l.typ == "String" || l.String != "" { + return visitor.VisitString(l.String) + } + if l.typ == "User" || l.User != nil { + return visitor.VisitUser(l.User) + } + return fmt.Errorf("type %T does not include a non-empty union type", l) +} + +type LeadResponse struct { + Model *Lead `json:"model" url:"model"` + Warnings []*WarningValidationProblem `json:"warnings" url:"warnings"` + Errors []*ErrorValidationProblem `json:"errors" url:"errors"` + Logs []*DebugModeLog `json:"logs,omitempty" url:"logs,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (l *LeadResponse) GetModel() *Lead { + if l == nil { + return nil + } + return l.Model +} + +func (l *LeadResponse) GetWarnings() []*WarningValidationProblem { + if l == nil { + return nil + } + return l.Warnings +} + +func (l *LeadResponse) GetErrors() []*ErrorValidationProblem { + if l == nil { + return nil + } + return l.Errors +} + +func (l *LeadResponse) GetLogs() []*DebugModeLog { + if l == nil { + return nil + } + return l.Logs +} + +func (l *LeadResponse) GetExtraProperties() map[string]interface{} { + return l.extraProperties +} + +func (l *LeadResponse) UnmarshalJSON(data []byte) error { + type unmarshaler LeadResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *l = LeadResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *l) + if err != nil { + return err + } + l.extraProperties = extraProperties + l.rawJSON = json.RawMessage(data) + return nil +} + +func (l *LeadResponse) String() string { + if len(l.rawJSON) > 0 { + if value, err := internal.StringifyJSON(l.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(l); err == nil { + return value + } + return fmt.Sprintf("%#v", l) +} + +type PaginatedLeadList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Lead `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedLeadList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedLeadList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedLeadList) GetResults() []*Lead { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedLeadList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedLeadList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedLeadList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedLeadList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedLeadList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} diff --git a/crm/leads/client.go b/crm/leads/client.go index ef6acde..1cb779d 100644 --- a/crm/leads/client.go +++ b/crm/leads/client.go @@ -1,142 +1,135 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package leads import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - crm "github.com/merge-api/merge-go-client/crm" + core "github.com/merge-api/merge-go-client/v2/core" + crm "github.com/merge-api/merge-go-client/v2/crm" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `Lead` objects. -func (c *Client) List(ctx context.Context, request *crm.LeadsListRequest) (*crm.PaginatedLeadList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/leads" - - queryParams := make(url.Values) - if request.ConvertedAccountId != nil { - queryParams.Add("converted_account_id", fmt.Sprintf("%v", *request.ConvertedAccountId)) - } - if request.ConvertedContactId != nil { - queryParams.Add("converted_contact_id", fmt.Sprintf("%v", *request.ConvertedContactId)) - } - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.EmailAddresses != nil { - queryParams.Add("email_addresses", fmt.Sprintf("%v", *request.EmailAddresses)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeRemoteFields != nil { - queryParams.Add("include_remote_fields", fmt.Sprintf("%v", *request.IncludeRemoteFields)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.OwnerId != nil { - queryParams.Add("owner_id", fmt.Sprintf("%v", *request.OwnerId)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.PhoneNumbers != nil { - queryParams.Add("phone_numbers", fmt.Sprintf("%v", *request.PhoneNumbers)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *crm.PaginatedLeadList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *crm.LeadsListRequest, + opts ...option.RequestOption, +) (*core.Page[*crm.Lead], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/leads" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *crm.PaginatedLeadList) *internal.PageResponse[*string, *crm.Lead] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *crm.Lead]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Creates a `Lead` object with the given values. -func (c *Client) Create(ctx context.Context, request *crm.LeadEndpointRequest) (*crm.LeadResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/leads" - - queryParams := make(url.Values) - if request.IsDebugMode != nil { - queryParams.Add("is_debug_mode", fmt.Sprintf("%v", *request.IsDebugMode)) - } - if request.RunAsync != nil { - queryParams.Add("run_async", fmt.Sprintf("%v", *request.RunAsync)) +func (c *Client) Create( + ctx context.Context, + request *crm.LeadEndpointRequest, + opts ...option.RequestOption, +) (*crm.LeadResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/leads" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *crm.LeadResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -145,35 +138,46 @@ func (c *Client) Create(ctx context.Context, request *crm.LeadEndpointRequest) ( } // Returns a `Lead` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *crm.LeadsRetrieveRequest) (*crm.Lead, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"crm/v1/leads/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeRemoteFields != nil { - queryParams.Add("include_remote_fields", fmt.Sprintf("%v", *request.IncludeRemoteFields)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *crm.LeadsRetrieveRequest, + opts ...option.RequestOption, +) (*crm.Lead, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/crm/v1/leads/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *crm.Lead if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -182,21 +186,34 @@ func (c *Client) Retrieve(ctx context.Context, id string, request *crm.LeadsRetr } // Returns metadata for `Lead` POSTs. -func (c *Client) MetaPostRetrieve(ctx context.Context) (*crm.MetaResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/leads/meta/post" +func (c *Client) MetaPostRetrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*crm.MetaResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/leads/meta/post" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *crm.MetaResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -205,50 +222,60 @@ func (c *Client) MetaPostRetrieve(ctx context.Context) (*crm.MetaResponse, error } // Returns a list of `RemoteFieldClass` objects. -func (c *Client) RemoteFieldClassesList(ctx context.Context, request *crm.LeadsRemoteFieldClassesListRequest) (*crm.PaginatedRemoteFieldClassList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/leads/remote-field-classes" - - queryParams := make(url.Values) - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeRemoteFields != nil { - queryParams.Add("include_remote_fields", fmt.Sprintf("%v", *request.IncludeRemoteFields)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.IsCommonModelField != nil { - queryParams.Add("is_common_model_field", fmt.Sprintf("%v", *request.IsCommonModelField)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *crm.PaginatedRemoteFieldClassList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) RemoteFieldClassesList( + ctx context.Context, + request *crm.LeadsRemoteFieldClassesListRequest, + opts ...option.RequestOption, +) (*core.Page[*crm.RemoteFieldClass], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/leads/remote-field-classes" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *crm.PaginatedRemoteFieldClassList) *internal.PageResponse[*string, *crm.RemoteFieldClass] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *crm.RemoteFieldClass]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } diff --git a/crm/link_token.go b/crm/link_token.go index 41a3abc..ddfd699 100644 --- a/crm/link_token.go +++ b/crm/link_token.go @@ -1,35 +1,279 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package crm +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" +) + type EndUserDetailsRequest struct { // Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent. - EndUserEmailAddress string `json:"end_user_email_address"` + EndUserEmailAddress string `json:"end_user_email_address" url:"-"` // Your end user's organization. - EndUserOrganizationName string `json:"end_user_organization_name"` + EndUserOrganizationName string `json:"end_user_organization_name" url:"-"` // This unique identifier typically represents the ID for your end user in your product's database. This value must be distinct from other Linked Accounts' unique identifiers. - EndUserOriginId string `json:"end_user_origin_id"` + EndUserOriginId string `json:"end_user_origin_id" url:"-"` // The integration categories to show in Merge Link. - Categories []CategoriesEnum `json:"categories,omitempty"` + Categories []CategoriesEnum `json:"categories,omitempty" url:"-"` // The slug of a specific pre-selected integration for this linking flow token. For examples of slugs, see https://docs.merge.dev/guides/merge-link/single-integration/. - Integration *string `json:"integration,omitempty"` + Integration *string `json:"integration,omitempty" url:"-"` // An integer number of minutes between [30, 720 or 10080 if for a Magic Link URL] for how long this token is valid. Defaults to 30. - LinkExpiryMins *int `json:"link_expiry_mins,omitempty"` + LinkExpiryMins *int `json:"link_expiry_mins,omitempty" url:"-"` // Whether to generate a Magic Link URL. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. - ShouldCreateMagicLinkUrl *bool `json:"should_create_magic_link_url,omitempty"` + ShouldCreateMagicLinkUrl *bool `json:"should_create_magic_link_url,omitempty" url:"-"` // Whether to generate a Magic Link URL on the Admin Needed screen during the linking flow. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. - HideAdminMagicLink *bool `json:"hide_admin_magic_link,omitempty"` + HideAdminMagicLink *bool `json:"hide_admin_magic_link,omitempty" url:"-"` // An array of objects to specify the models and fields that will be disabled for a given Linked Account. Each object uses model_id, enabled_actions, and disabled_fields to specify the model, method, and fields that are scoped for a given Linked Account. - CommonModels []*CommonModelScopesBodyRequest `json:"common_models,omitempty"` + CommonModels []*CommonModelScopesBodyRequest `json:"common_models,omitempty" url:"-"` // 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. - CategoryCommonModelScopes map[string][]*IndividualCommonModelScopeDeserializerRequest `json:"category_common_model_scopes,omitempty"` + CategoryCommonModelScopes map[string][]*IndividualCommonModelScopeDeserializerRequest `json:"category_common_model_scopes,omitempty" url:"-"` // The following subset of IETF language tags can be used to configure localization. // // * `en` - en // * `de` - de - Language *LanguageEnum `json:"language,omitempty"` + Language *EndUserDetailsRequestLanguage `json:"language,omitempty" url:"-"` // The boolean that indicates whether initial, periodic, and force syncs will be disabled. - AreSyncsDisabled *bool `json:"are_syncs_disabled,omitempty"` + AreSyncsDisabled *bool `json:"are_syncs_disabled,omitempty" url:"-"` // A JSON object containing integration-specific configuration options. - IntegrationSpecificConfig map[string]interface{} `json:"integration_specific_config,omitempty"` + IntegrationSpecificConfig map[string]interface{} `json:"integration_specific_config,omitempty" url:"-"` +} + +// The following subset of IETF language tags can be used to configure localization. +// +// * `en` - en +// * `de` - de +type EndUserDetailsRequestLanguage struct { + LanguageEnum LanguageEnum + String string + + typ string +} + +func (e *EndUserDetailsRequestLanguage) GetLanguageEnum() LanguageEnum { + if e == nil { + return "" + } + return e.LanguageEnum +} + +func (e *EndUserDetailsRequestLanguage) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *EndUserDetailsRequestLanguage) UnmarshalJSON(data []byte) error { + var valueLanguageEnum LanguageEnum + if err := json.Unmarshal(data, &valueLanguageEnum); err == nil { + e.typ = "LanguageEnum" + e.LanguageEnum = valueLanguageEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e EndUserDetailsRequestLanguage) MarshalJSON() ([]byte, error) { + if e.typ == "LanguageEnum" || e.LanguageEnum != "" { + return json.Marshal(e.LanguageEnum) + } + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type EndUserDetailsRequestLanguageVisitor interface { + VisitLanguageEnum(LanguageEnum) error + VisitString(string) error +} + +func (e *EndUserDetailsRequestLanguage) Accept(visitor EndUserDetailsRequestLanguageVisitor) error { + if e.typ == "LanguageEnum" || e.LanguageEnum != "" { + return visitor.VisitLanguageEnum(e.LanguageEnum) + } + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type CommonModelScopesBodyRequest struct { + ModelId string `json:"model_id" url:"model_id"` + EnabledActions []EnabledActionsEnum `json:"enabled_actions" url:"enabled_actions"` + DisabledFields []string `json:"disabled_fields" url:"disabled_fields"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (c *CommonModelScopesBodyRequest) GetModelId() string { + if c == nil { + return "" + } + return c.ModelId +} + +func (c *CommonModelScopesBodyRequest) GetEnabledActions() []EnabledActionsEnum { + if c == nil { + return nil + } + return c.EnabledActions +} + +func (c *CommonModelScopesBodyRequest) GetDisabledFields() []string { + if c == nil { + return nil + } + return c.DisabledFields +} + +func (c *CommonModelScopesBodyRequest) GetExtraProperties() map[string]interface{} { + return c.extraProperties +} + +func (c *CommonModelScopesBodyRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CommonModelScopesBodyRequest + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *c = CommonModelScopesBodyRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *c) + if err != nil { + return err + } + c.extraProperties = extraProperties + c.rawJSON = json.RawMessage(data) + return nil +} + +func (c *CommonModelScopesBodyRequest) String() string { + if len(c.rawJSON) > 0 { + if value, err := internal.StringifyJSON(c.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(c); err == nil { + return value + } + return fmt.Sprintf("%#v", c) +} + +// * `READ` - READ +// * `WRITE` - WRITE +type EnabledActionsEnum string + +const ( + EnabledActionsEnumRead EnabledActionsEnum = "READ" + EnabledActionsEnumWrite EnabledActionsEnum = "WRITE" +) + +func NewEnabledActionsEnumFromString(s string) (EnabledActionsEnum, error) { + switch s { + case "READ": + return EnabledActionsEnumRead, nil + case "WRITE": + return EnabledActionsEnumWrite, nil + } + var t EnabledActionsEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (e EnabledActionsEnum) Ptr() *EnabledActionsEnum { + return &e +} + +// * `en` - en +// * `de` - de +type LanguageEnum string + +const ( + LanguageEnumEn LanguageEnum = "en" + LanguageEnumDe LanguageEnum = "de" +) + +func NewLanguageEnumFromString(s string) (LanguageEnum, error) { + switch s { + case "en": + return LanguageEnumEn, nil + case "de": + return LanguageEnumDe, nil + } + var t LanguageEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (l LanguageEnum) Ptr() *LanguageEnum { + return &l +} + +type LinkToken struct { + LinkToken string `json:"link_token" url:"link_token"` + IntegrationName *string `json:"integration_name,omitempty" url:"integration_name,omitempty"` + MagicLinkUrl *string `json:"magic_link_url,omitempty" url:"magic_link_url,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (l *LinkToken) GetLinkToken() string { + if l == nil { + return "" + } + return l.LinkToken +} + +func (l *LinkToken) GetIntegrationName() *string { + if l == nil { + return nil + } + return l.IntegrationName +} + +func (l *LinkToken) GetMagicLinkUrl() *string { + if l == nil { + return nil + } + return l.MagicLinkUrl +} + +func (l *LinkToken) GetExtraProperties() map[string]interface{} { + return l.extraProperties +} + +func (l *LinkToken) UnmarshalJSON(data []byte) error { + type unmarshaler LinkToken + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *l = LinkToken(value) + extraProperties, err := internal.ExtractExtraProperties(data, *l) + if err != nil { + return err + } + l.extraProperties = extraProperties + l.rawJSON = json.RawMessage(data) + return nil +} + +func (l *LinkToken) String() string { + if len(l.rawJSON) > 0 { + if value, err := internal.StringifyJSON(l.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(l); err == nil { + return value + } + return fmt.Sprintf("%#v", l) } diff --git a/crm/linked_accounts.go b/crm/linked_accounts.go index fafec98..02a2ac7 100644 --- a/crm/linked_accounts.go +++ b/crm/linked_accounts.go @@ -1,45 +1,48 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package crm import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" + time "time" ) type LinkedAccountsListRequest struct { // Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing` // - // - `hris` - hris - // - `ats` - ats - // - `accounting` - accounting - // - `ticketing` - ticketing - // - `crm` - crm - // - `mktg` - mktg - // - `filestorage` - filestorage - Category *LinkedAccountsListRequestCategory `json:"-"` + // * `hris` - hris + // * `ats` - ats + // * `accounting` - accounting + // * `ticketing` - ticketing + // * `crm` - crm + // * `mktg` - mktg + // * `filestorage` - filestorage + Category *LinkedAccountsListRequestCategory `json:"-" url:"category,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // If provided, will only return linked accounts associated with the given email address. - EndUserEmailAddress *string `json:"-"` + EndUserEmailAddress *string `json:"-" url:"end_user_email_address,omitempty"` // If provided, will only return linked accounts associated with the given organization name. - EndUserOrganizationName *string `json:"-"` + EndUserOrganizationName *string `json:"-" url:"end_user_organization_name,omitempty"` // If provided, will only return linked accounts associated with the given origin ID. - EndUserOriginId *string `json:"-"` + EndUserOriginId *string `json:"-" url:"end_user_origin_id,omitempty"` // Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once. - EndUserOriginIds *string `json:"-"` - Id *string `json:"-"` + EndUserOriginIds *string `json:"-" url:"end_user_origin_ids,omitempty"` + Id *string `json:"-" url:"id,omitempty"` // Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once. - Ids *string `json:"-"` + Ids *string `json:"-" url:"ids,omitempty"` // If `true`, will include complete production duplicates of the account specified by the `id` query parameter in the response. `id` must be for a complete production linked account. - IncludeDuplicates *bool `json:"-"` + IncludeDuplicates *bool `json:"-" url:"include_duplicates,omitempty"` // If provided, will only return linked accounts associated with the given integration name. - IntegrationName *string `json:"-"` + IntegrationName *string `json:"-" url:"integration_name,omitempty"` // If included, will only include test linked accounts. If not included, will only include non-test linked accounts. - IsTestAccount *string `json:"-"` + IsTestAccount *string `json:"-" url:"is_test_account,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED` - Status *string `json:"-"` + Status *string `json:"-" url:"status,omitempty"` } type LinkedAccountsListRequestCategory string @@ -78,3 +81,491 @@ func NewLinkedAccountsListRequestCategoryFromString(s string) (LinkedAccountsLis func (l LinkedAccountsListRequestCategory) Ptr() *LinkedAccountsListRequestCategory { return &l } + +// # The LinkedAccount Object +// ### Description +// The `LinkedAccount` object is used to represent an end user's link with a specific integration. +// +// ### Usage Example +// View a list of your organization's `LinkedAccount` objects. +type AccountDetailsAndActions struct { + Id string `json:"id" url:"id"` + Category *AccountDetailsAndActionsCategory `json:"category,omitempty" url:"category,omitempty"` + Status *AccountDetailsAndActionsStatus `json:"status" url:"status"` + StatusDetail *string `json:"status_detail,omitempty" url:"status_detail,omitempty"` + EndUserOriginId *string `json:"end_user_origin_id,omitempty" url:"end_user_origin_id,omitempty"` + EndUserOrganizationName string `json:"end_user_organization_name" url:"end_user_organization_name"` + EndUserEmailAddress string `json:"end_user_email_address" url:"end_user_email_address"` + // The tenant or domain the customer has provided access to. + Subdomain *string `json:"subdomain,omitempty" url:"subdomain,omitempty"` + WebhookListenerUrl string `json:"webhook_listener_url" url:"webhook_listener_url"` + // 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. + IsDuplicate *bool `json:"is_duplicate,omitempty" url:"is_duplicate,omitempty"` + Integration *AccountDetailsAndActionsIntegration `json:"integration,omitempty" url:"integration,omitempty"` + AccountType string `json:"account_type" url:"account_type"` + CompletedAt time.Time `json:"completed_at" url:"completed_at"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AccountDetailsAndActions) GetId() string { + if a == nil { + return "" + } + return a.Id +} + +func (a *AccountDetailsAndActions) GetCategory() *AccountDetailsAndActionsCategory { + if a == nil { + return nil + } + return a.Category +} + +func (a *AccountDetailsAndActions) GetStatus() *AccountDetailsAndActionsStatus { + if a == nil { + return nil + } + return a.Status +} + +func (a *AccountDetailsAndActions) GetStatusDetail() *string { + if a == nil { + return nil + } + return a.StatusDetail +} + +func (a *AccountDetailsAndActions) GetEndUserOriginId() *string { + if a == nil { + return nil + } + return a.EndUserOriginId +} + +func (a *AccountDetailsAndActions) GetEndUserOrganizationName() string { + if a == nil { + return "" + } + return a.EndUserOrganizationName +} + +func (a *AccountDetailsAndActions) GetEndUserEmailAddress() string { + if a == nil { + return "" + } + return a.EndUserEmailAddress +} + +func (a *AccountDetailsAndActions) GetSubdomain() *string { + if a == nil { + return nil + } + return a.Subdomain +} + +func (a *AccountDetailsAndActions) GetWebhookListenerUrl() string { + if a == nil { + return "" + } + return a.WebhookListenerUrl +} + +func (a *AccountDetailsAndActions) GetIsDuplicate() *bool { + if a == nil { + return nil + } + return a.IsDuplicate +} + +func (a *AccountDetailsAndActions) GetIntegration() *AccountDetailsAndActionsIntegration { + if a == nil { + return nil + } + return a.Integration +} + +func (a *AccountDetailsAndActions) GetAccountType() string { + if a == nil { + return "" + } + return a.AccountType +} + +func (a *AccountDetailsAndActions) GetCompletedAt() time.Time { + if a == nil { + return time.Time{} + } + return a.CompletedAt +} + +func (a *AccountDetailsAndActions) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AccountDetailsAndActions) UnmarshalJSON(data []byte) error { + type embed AccountDetailsAndActions + var unmarshaler = struct { + embed + CompletedAt *internal.DateTime `json:"completed_at"` + }{ + embed: embed(*a), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *a = AccountDetailsAndActions(unmarshaler.embed) + a.CompletedAt = unmarshaler.CompletedAt.Time() + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AccountDetailsAndActions) MarshalJSON() ([]byte, error) { + type embed AccountDetailsAndActions + var marshaler = struct { + embed + CompletedAt *internal.DateTime `json:"completed_at"` + }{ + embed: embed(*a), + CompletedAt: internal.NewDateTime(a.CompletedAt), + } + return json.Marshal(marshaler) +} + +func (a *AccountDetailsAndActions) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} + +type AccountDetailsAndActionsCategory struct { + CategoryEnum CategoryEnum + String string + + typ string +} + +func (a *AccountDetailsAndActionsCategory) GetCategoryEnum() CategoryEnum { + if a == nil { + return "" + } + return a.CategoryEnum +} + +func (a *AccountDetailsAndActionsCategory) GetString() string { + if a == nil { + return "" + } + return a.String +} + +func (a *AccountDetailsAndActionsCategory) UnmarshalJSON(data []byte) error { + var valueCategoryEnum CategoryEnum + if err := json.Unmarshal(data, &valueCategoryEnum); err == nil { + a.typ = "CategoryEnum" + a.CategoryEnum = valueCategoryEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + a.typ = "String" + a.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, a) +} + +func (a AccountDetailsAndActionsCategory) MarshalJSON() ([]byte, error) { + if a.typ == "CategoryEnum" || a.CategoryEnum != "" { + return json.Marshal(a.CategoryEnum) + } + if a.typ == "String" || a.String != "" { + return json.Marshal(a.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type AccountDetailsAndActionsCategoryVisitor interface { + VisitCategoryEnum(CategoryEnum) error + VisitString(string) error +} + +func (a *AccountDetailsAndActionsCategory) Accept(visitor AccountDetailsAndActionsCategoryVisitor) error { + if a.typ == "CategoryEnum" || a.CategoryEnum != "" { + return visitor.VisitCategoryEnum(a.CategoryEnum) + } + if a.typ == "String" || a.String != "" { + return visitor.VisitString(a.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type AccountDetailsAndActionsIntegration struct { + Name string `json:"name" url:"name"` + Categories []CategoriesEnum `json:"categories" url:"categories"` + Image *string `json:"image,omitempty" url:"image,omitempty"` + SquareImage *string `json:"square_image,omitempty" url:"square_image,omitempty"` + Color string `json:"color" url:"color"` + Slug string `json:"slug" url:"slug"` + PassthroughAvailable bool `json:"passthrough_available" url:"passthrough_available"` + AvailableModelOperations []*ModelOperation `json:"available_model_operations,omitempty" url:"available_model_operations,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AccountDetailsAndActionsIntegration) GetName() string { + if a == nil { + return "" + } + return a.Name +} + +func (a *AccountDetailsAndActionsIntegration) GetCategories() []CategoriesEnum { + if a == nil { + return nil + } + return a.Categories +} + +func (a *AccountDetailsAndActionsIntegration) GetImage() *string { + if a == nil { + return nil + } + return a.Image +} + +func (a *AccountDetailsAndActionsIntegration) GetSquareImage() *string { + if a == nil { + return nil + } + return a.SquareImage +} + +func (a *AccountDetailsAndActionsIntegration) GetColor() string { + if a == nil { + return "" + } + return a.Color +} + +func (a *AccountDetailsAndActionsIntegration) GetSlug() string { + if a == nil { + return "" + } + return a.Slug +} + +func (a *AccountDetailsAndActionsIntegration) GetPassthroughAvailable() bool { + if a == nil { + return false + } + return a.PassthroughAvailable +} + +func (a *AccountDetailsAndActionsIntegration) GetAvailableModelOperations() []*ModelOperation { + if a == nil { + return nil + } + return a.AvailableModelOperations +} + +func (a *AccountDetailsAndActionsIntegration) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AccountDetailsAndActionsIntegration) UnmarshalJSON(data []byte) error { + type unmarshaler AccountDetailsAndActionsIntegration + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *a = AccountDetailsAndActionsIntegration(value) + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AccountDetailsAndActionsIntegration) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} + +type AccountDetailsAndActionsStatus struct { + AccountDetailsAndActionsStatusEnum AccountDetailsAndActionsStatusEnum + String string + + typ string +} + +func (a *AccountDetailsAndActionsStatus) GetAccountDetailsAndActionsStatusEnum() AccountDetailsAndActionsStatusEnum { + if a == nil { + return "" + } + return a.AccountDetailsAndActionsStatusEnum +} + +func (a *AccountDetailsAndActionsStatus) GetString() string { + if a == nil { + return "" + } + return a.String +} + +func (a *AccountDetailsAndActionsStatus) UnmarshalJSON(data []byte) error { + var valueAccountDetailsAndActionsStatusEnum AccountDetailsAndActionsStatusEnum + if err := json.Unmarshal(data, &valueAccountDetailsAndActionsStatusEnum); err == nil { + a.typ = "AccountDetailsAndActionsStatusEnum" + a.AccountDetailsAndActionsStatusEnum = valueAccountDetailsAndActionsStatusEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + a.typ = "String" + a.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, a) +} + +func (a AccountDetailsAndActionsStatus) MarshalJSON() ([]byte, error) { + if a.typ == "AccountDetailsAndActionsStatusEnum" || a.AccountDetailsAndActionsStatusEnum != "" { + return json.Marshal(a.AccountDetailsAndActionsStatusEnum) + } + if a.typ == "String" || a.String != "" { + return json.Marshal(a.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type AccountDetailsAndActionsStatusVisitor interface { + VisitAccountDetailsAndActionsStatusEnum(AccountDetailsAndActionsStatusEnum) error + VisitString(string) error +} + +func (a *AccountDetailsAndActionsStatus) Accept(visitor AccountDetailsAndActionsStatusVisitor) error { + if a.typ == "AccountDetailsAndActionsStatusEnum" || a.AccountDetailsAndActionsStatusEnum != "" { + return visitor.VisitAccountDetailsAndActionsStatusEnum(a.AccountDetailsAndActionsStatusEnum) + } + if a.typ == "String" || a.String != "" { + return visitor.VisitString(a.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} + +// * `COMPLETE` - COMPLETE +// * `INCOMPLETE` - INCOMPLETE +// * `RELINK_NEEDED` - RELINK_NEEDED +// * `IDLE` - IDLE +type AccountDetailsAndActionsStatusEnum string + +const ( + AccountDetailsAndActionsStatusEnumComplete AccountDetailsAndActionsStatusEnum = "COMPLETE" + AccountDetailsAndActionsStatusEnumIncomplete AccountDetailsAndActionsStatusEnum = "INCOMPLETE" + AccountDetailsAndActionsStatusEnumRelinkNeeded AccountDetailsAndActionsStatusEnum = "RELINK_NEEDED" + AccountDetailsAndActionsStatusEnumIdle AccountDetailsAndActionsStatusEnum = "IDLE" +) + +func NewAccountDetailsAndActionsStatusEnumFromString(s string) (AccountDetailsAndActionsStatusEnum, error) { + switch s { + case "COMPLETE": + return AccountDetailsAndActionsStatusEnumComplete, nil + case "INCOMPLETE": + return AccountDetailsAndActionsStatusEnumIncomplete, nil + case "RELINK_NEEDED": + return AccountDetailsAndActionsStatusEnumRelinkNeeded, nil + case "IDLE": + return AccountDetailsAndActionsStatusEnumIdle, nil + } + var t AccountDetailsAndActionsStatusEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (a AccountDetailsAndActionsStatusEnum) Ptr() *AccountDetailsAndActionsStatusEnum { + return &a +} + +type PaginatedAccountDetailsAndActionsList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*AccountDetailsAndActions `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedAccountDetailsAndActionsList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedAccountDetailsAndActionsList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedAccountDetailsAndActionsList) GetResults() []*AccountDetailsAndActions { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedAccountDetailsAndActionsList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedAccountDetailsAndActionsList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedAccountDetailsAndActionsList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedAccountDetailsAndActionsList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedAccountDetailsAndActionsList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} diff --git a/crm/linkedaccounts/client.go b/crm/linkedaccounts/client.go index a98c8c6..f76504c 100644 --- a/crm/linkedaccounts/client.go +++ b/crm/linkedaccounts/client.go @@ -1,97 +1,92 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package linkedaccounts import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - crm "github.com/merge-api/merge-go-client/crm" + core "github.com/merge-api/merge-go-client/v2/core" + crm "github.com/merge-api/merge-go-client/v2/crm" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // List linked accounts for your organization. -func (c *Client) List(ctx context.Context, request *crm.LinkedAccountsListRequest) (*crm.PaginatedAccountDetailsAndActionsList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/linked-accounts" - - queryParams := make(url.Values) - if request.Category != nil { - queryParams.Add("category", fmt.Sprintf("%v", *request.Category)) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.EndUserEmailAddress != nil { - queryParams.Add("end_user_email_address", fmt.Sprintf("%v", *request.EndUserEmailAddress)) - } - if request.EndUserOrganizationName != nil { - queryParams.Add("end_user_organization_name", fmt.Sprintf("%v", *request.EndUserOrganizationName)) - } - if request.EndUserOriginId != nil { - queryParams.Add("end_user_origin_id", fmt.Sprintf("%v", *request.EndUserOriginId)) - } - if request.EndUserOriginIds != nil { - queryParams.Add("end_user_origin_ids", fmt.Sprintf("%v", *request.EndUserOriginIds)) - } - if request.Id != nil { - queryParams.Add("id", fmt.Sprintf("%v", *request.Id)) - } - if request.Ids != nil { - queryParams.Add("ids", fmt.Sprintf("%v", *request.Ids)) - } - if request.IncludeDuplicates != nil { - queryParams.Add("include_duplicates", fmt.Sprintf("%v", *request.IncludeDuplicates)) - } - if request.IntegrationName != nil { - queryParams.Add("integration_name", fmt.Sprintf("%v", *request.IntegrationName)) - } - if request.IsTestAccount != nil { - queryParams.Add("is_test_account", fmt.Sprintf("%v", *request.IsTestAccount)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.Status != nil { - queryParams.Add("status", fmt.Sprintf("%v", *request.Status)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *crm.PaginatedAccountDetailsAndActionsList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *crm.LinkedAccountsListRequest, + opts ...option.RequestOption, +) (*core.Page[*crm.AccountDetailsAndActions], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/linked-accounts" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *crm.PaginatedAccountDetailsAndActionsList) *internal.PageResponse[*string, *crm.AccountDetailsAndActions] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *crm.AccountDetailsAndActions]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } diff --git a/crm/linktoken/client.go b/crm/linktoken/client.go index e718439..1694856 100644 --- a/crm/linktoken/client.go +++ b/crm/linktoken/client.go @@ -1,49 +1,68 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package linktoken import ( context "context" - core "github.com/merge-api/merge-go-client/core" - crm "github.com/merge-api/merge-go-client/crm" + core "github.com/merge-api/merge-go-client/v2/core" + crm "github.com/merge-api/merge-go-client/v2/crm" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Creates a link token to be used when linking a new end user. -func (c *Client) Create(ctx context.Context, request *crm.EndUserDetailsRequest) (*crm.LinkToken, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/link-token" +func (c *Client) Create( + ctx context.Context, + request *crm.EndUserDetailsRequest, + opts ...option.RequestOption, +) (*crm.LinkToken, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/link-token" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *crm.LinkToken if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err diff --git a/crm/notes.go b/crm/notes.go index c346742..45dd507 100644 --- a/crm/notes.go +++ b/crm/notes.go @@ -1,199 +1,1091 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package crm import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type NoteEndpointRequest struct { // Whether to include debug fields (such as log file links) in the response. - IsDebugMode *bool `json:"-"` + IsDebugMode *bool `json:"-" url:"is_debug_mode,omitempty"` // Whether or not third-party updates should be run asynchronously. - RunAsync *bool `json:"-"` - Model *NoteRequest `json:"model,omitempty"` + RunAsync *bool `json:"-" url:"run_async,omitempty"` + Model *NoteRequest `json:"model,omitempty" url:"-"` } type NotesListRequest struct { // If provided, will only return notes with this account. - AccountId *string `json:"-"` + AccountId *string `json:"-" url:"account_id,omitempty"` // If provided, will only return notes with this contact. - ContactId *string `json:"-"` + ContactId *string `json:"-" url:"contact_id,omitempty"` // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *NotesListRequestExpand `json:"-"` + Expand []*NotesListRequestExpandItem `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - IncludeRemoteFields *bool `json:"-"` + IncludeRemoteFields *bool `json:"-" url:"include_remote_fields,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // If provided, will only return notes with this opportunity. - OpportunityId *string `json:"-"` + OpportunityId *string `json:"-" url:"opportunity_id,omitempty"` // If provided, will only return notes with this owner. - OwnerId *string `json:"-"` + OwnerId *string `json:"-" url:"owner_id,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` } type NotesRemoteFieldClassesListRequest struct { // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - IncludeRemoteFields *bool `json:"-"` + IncludeRemoteFields *bool `json:"-" url:"include_remote_fields,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, will only return remote field classes with this is_common_model_field value - IsCommonModelField *bool `json:"-"` + IsCommonModelField *bool `json:"-" url:"is_common_model_field,omitempty"` + // If provided, will only return remote fields classes with this is_custom value + IsCustom *bool `json:"-" url:"is_custom,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` } type NotesRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *NotesRetrieveRequestExpand `json:"-"` + Expand []*NotesRetrieveRequestExpandItem `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - IncludeRemoteFields *bool `json:"-"` + IncludeRemoteFields *bool `json:"-" url:"include_remote_fields,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` } -type NotesListRequestExpand string +type NotesListRequestExpandItem string const ( - NotesListRequestExpandAccount NotesListRequestExpand = "account" - NotesListRequestExpandAccountOpportunity NotesListRequestExpand = "account,opportunity" - NotesListRequestExpandContact NotesListRequestExpand = "contact" - NotesListRequestExpandContactAccount NotesListRequestExpand = "contact,account" - NotesListRequestExpandContactAccountOpportunity NotesListRequestExpand = "contact,account,opportunity" - NotesListRequestExpandContactOpportunity NotesListRequestExpand = "contact,opportunity" - NotesListRequestExpandOpportunity NotesListRequestExpand = "opportunity" - NotesListRequestExpandOwner NotesListRequestExpand = "owner" - NotesListRequestExpandOwnerAccount NotesListRequestExpand = "owner,account" - NotesListRequestExpandOwnerAccountOpportunity NotesListRequestExpand = "owner,account,opportunity" - NotesListRequestExpandOwnerContact NotesListRequestExpand = "owner,contact" - NotesListRequestExpandOwnerContactAccount NotesListRequestExpand = "owner,contact,account" - NotesListRequestExpandOwnerContactAccountOpportunity NotesListRequestExpand = "owner,contact,account,opportunity" - NotesListRequestExpandOwnerContactOpportunity NotesListRequestExpand = "owner,contact,opportunity" - NotesListRequestExpandOwnerOpportunity NotesListRequestExpand = "owner,opportunity" + NotesListRequestExpandItemAccount NotesListRequestExpandItem = "account" + NotesListRequestExpandItemContact NotesListRequestExpandItem = "contact" + NotesListRequestExpandItemOpportunity NotesListRequestExpandItem = "opportunity" + NotesListRequestExpandItemOwner NotesListRequestExpandItem = "owner" ) -func NewNotesListRequestExpandFromString(s string) (NotesListRequestExpand, error) { +func NewNotesListRequestExpandItemFromString(s string) (NotesListRequestExpandItem, error) { switch s { case "account": - return NotesListRequestExpandAccount, nil - case "account,opportunity": - return NotesListRequestExpandAccountOpportunity, nil + return NotesListRequestExpandItemAccount, nil case "contact": - return NotesListRequestExpandContact, nil - case "contact,account": - return NotesListRequestExpandContactAccount, nil - case "contact,account,opportunity": - return NotesListRequestExpandContactAccountOpportunity, nil - case "contact,opportunity": - return NotesListRequestExpandContactOpportunity, nil + return NotesListRequestExpandItemContact, nil case "opportunity": - return NotesListRequestExpandOpportunity, nil + return NotesListRequestExpandItemOpportunity, nil case "owner": - return NotesListRequestExpandOwner, nil - case "owner,account": - return NotesListRequestExpandOwnerAccount, nil - case "owner,account,opportunity": - return NotesListRequestExpandOwnerAccountOpportunity, nil - case "owner,contact": - return NotesListRequestExpandOwnerContact, nil - case "owner,contact,account": - return NotesListRequestExpandOwnerContactAccount, nil - case "owner,contact,account,opportunity": - return NotesListRequestExpandOwnerContactAccountOpportunity, nil - case "owner,contact,opportunity": - return NotesListRequestExpandOwnerContactOpportunity, nil - case "owner,opportunity": - return NotesListRequestExpandOwnerOpportunity, nil - } - var t NotesListRequestExpand + return NotesListRequestExpandItemOwner, nil + } + var t NotesListRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (n NotesListRequestExpand) Ptr() *NotesListRequestExpand { +func (n NotesListRequestExpandItem) Ptr() *NotesListRequestExpandItem { return &n } -type NotesRetrieveRequestExpand string +type NotesRetrieveRequestExpandItem string const ( - NotesRetrieveRequestExpandAccount NotesRetrieveRequestExpand = "account" - NotesRetrieveRequestExpandAccountOpportunity NotesRetrieveRequestExpand = "account,opportunity" - NotesRetrieveRequestExpandContact NotesRetrieveRequestExpand = "contact" - NotesRetrieveRequestExpandContactAccount NotesRetrieveRequestExpand = "contact,account" - NotesRetrieveRequestExpandContactAccountOpportunity NotesRetrieveRequestExpand = "contact,account,opportunity" - NotesRetrieveRequestExpandContactOpportunity NotesRetrieveRequestExpand = "contact,opportunity" - NotesRetrieveRequestExpandOpportunity NotesRetrieveRequestExpand = "opportunity" - NotesRetrieveRequestExpandOwner NotesRetrieveRequestExpand = "owner" - NotesRetrieveRequestExpandOwnerAccount NotesRetrieveRequestExpand = "owner,account" - NotesRetrieveRequestExpandOwnerAccountOpportunity NotesRetrieveRequestExpand = "owner,account,opportunity" - NotesRetrieveRequestExpandOwnerContact NotesRetrieveRequestExpand = "owner,contact" - NotesRetrieveRequestExpandOwnerContactAccount NotesRetrieveRequestExpand = "owner,contact,account" - NotesRetrieveRequestExpandOwnerContactAccountOpportunity NotesRetrieveRequestExpand = "owner,contact,account,opportunity" - NotesRetrieveRequestExpandOwnerContactOpportunity NotesRetrieveRequestExpand = "owner,contact,opportunity" - NotesRetrieveRequestExpandOwnerOpportunity NotesRetrieveRequestExpand = "owner,opportunity" + NotesRetrieveRequestExpandItemAccount NotesRetrieveRequestExpandItem = "account" + NotesRetrieveRequestExpandItemContact NotesRetrieveRequestExpandItem = "contact" + NotesRetrieveRequestExpandItemOpportunity NotesRetrieveRequestExpandItem = "opportunity" + NotesRetrieveRequestExpandItemOwner NotesRetrieveRequestExpandItem = "owner" ) -func NewNotesRetrieveRequestExpandFromString(s string) (NotesRetrieveRequestExpand, error) { +func NewNotesRetrieveRequestExpandItemFromString(s string) (NotesRetrieveRequestExpandItem, error) { switch s { case "account": - return NotesRetrieveRequestExpandAccount, nil - case "account,opportunity": - return NotesRetrieveRequestExpandAccountOpportunity, nil + return NotesRetrieveRequestExpandItemAccount, nil case "contact": - return NotesRetrieveRequestExpandContact, nil - case "contact,account": - return NotesRetrieveRequestExpandContactAccount, nil - case "contact,account,opportunity": - return NotesRetrieveRequestExpandContactAccountOpportunity, nil - case "contact,opportunity": - return NotesRetrieveRequestExpandContactOpportunity, nil + return NotesRetrieveRequestExpandItemContact, nil case "opportunity": - return NotesRetrieveRequestExpandOpportunity, nil + return NotesRetrieveRequestExpandItemOpportunity, nil case "owner": - return NotesRetrieveRequestExpandOwner, nil - case "owner,account": - return NotesRetrieveRequestExpandOwnerAccount, nil - case "owner,account,opportunity": - return NotesRetrieveRequestExpandOwnerAccountOpportunity, nil - case "owner,contact": - return NotesRetrieveRequestExpandOwnerContact, nil - case "owner,contact,account": - return NotesRetrieveRequestExpandOwnerContactAccount, nil - case "owner,contact,account,opportunity": - return NotesRetrieveRequestExpandOwnerContactAccountOpportunity, nil - case "owner,contact,opportunity": - return NotesRetrieveRequestExpandOwnerContactOpportunity, nil - case "owner,opportunity": - return NotesRetrieveRequestExpandOwnerOpportunity, nil - } - var t NotesRetrieveRequestExpand + return NotesRetrieveRequestExpandItemOwner, nil + } + var t NotesRetrieveRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (n NotesRetrieveRequestExpand) Ptr() *NotesRetrieveRequestExpand { +func (n NotesRetrieveRequestExpandItem) Ptr() *NotesRetrieveRequestExpandItem { return &n } + +// # The Note Object +// ### Description +// The `Note` object is used to represent a note on another object. +// ### Usage Example +// TODO +type Note struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The note's owner. + Owner *NoteOwner `json:"owner,omitempty" url:"owner,omitempty"` + // The note's content. + Content *string `json:"content,omitempty" url:"content,omitempty"` + // The note's contact. + Contact *NoteContact `json:"contact,omitempty" url:"contact,omitempty"` + // The note's account. + Account *NoteAccount `json:"account,omitempty" url:"account,omitempty"` + // The note's opportunity. + Opportunity *NoteOpportunity `json:"opportunity,omitempty" url:"opportunity,omitempty"` + // When the third party's lead was updated. + RemoteUpdatedAt *time.Time `json:"remote_updated_at,omitempty" url:"remote_updated_at,omitempty"` + // When the third party's lead was created. + RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty" url:"remote_created_at,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + RemoteFields []*RemoteField `json:"remote_fields,omitempty" url:"remote_fields,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (n *Note) GetId() *string { + if n == nil { + return nil + } + return n.Id +} + +func (n *Note) GetRemoteId() *string { + if n == nil { + return nil + } + return n.RemoteId +} + +func (n *Note) GetCreatedAt() *time.Time { + if n == nil { + return nil + } + return n.CreatedAt +} + +func (n *Note) GetModifiedAt() *time.Time { + if n == nil { + return nil + } + return n.ModifiedAt +} + +func (n *Note) GetOwner() *NoteOwner { + if n == nil { + return nil + } + return n.Owner +} + +func (n *Note) GetContent() *string { + if n == nil { + return nil + } + return n.Content +} + +func (n *Note) GetContact() *NoteContact { + if n == nil { + return nil + } + return n.Contact +} + +func (n *Note) GetAccount() *NoteAccount { + if n == nil { + return nil + } + return n.Account +} + +func (n *Note) GetOpportunity() *NoteOpportunity { + if n == nil { + return nil + } + return n.Opportunity +} + +func (n *Note) GetRemoteUpdatedAt() *time.Time { + if n == nil { + return nil + } + return n.RemoteUpdatedAt +} + +func (n *Note) GetRemoteCreatedAt() *time.Time { + if n == nil { + return nil + } + return n.RemoteCreatedAt +} + +func (n *Note) GetRemoteWasDeleted() *bool { + if n == nil { + return nil + } + return n.RemoteWasDeleted +} + +func (n *Note) GetFieldMappings() map[string]interface{} { + if n == nil { + return nil + } + return n.FieldMappings +} + +func (n *Note) GetRemoteData() []*RemoteData { + if n == nil { + return nil + } + return n.RemoteData +} + +func (n *Note) GetRemoteFields() []*RemoteField { + if n == nil { + return nil + } + return n.RemoteFields +} + +func (n *Note) GetExtraProperties() map[string]interface{} { + return n.extraProperties +} + +func (n *Note) UnmarshalJSON(data []byte) error { + type embed Note + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + RemoteUpdatedAt *internal.DateTime `json:"remote_updated_at,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + }{ + embed: embed(*n), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *n = Note(unmarshaler.embed) + n.CreatedAt = unmarshaler.CreatedAt.TimePtr() + n.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + n.RemoteUpdatedAt = unmarshaler.RemoteUpdatedAt.TimePtr() + n.RemoteCreatedAt = unmarshaler.RemoteCreatedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *n) + if err != nil { + return err + } + n.extraProperties = extraProperties + n.rawJSON = json.RawMessage(data) + return nil +} + +func (n *Note) MarshalJSON() ([]byte, error) { + type embed Note + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + RemoteUpdatedAt *internal.DateTime `json:"remote_updated_at,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + }{ + embed: embed(*n), + CreatedAt: internal.NewOptionalDateTime(n.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(n.ModifiedAt), + RemoteUpdatedAt: internal.NewOptionalDateTime(n.RemoteUpdatedAt), + RemoteCreatedAt: internal.NewOptionalDateTime(n.RemoteCreatedAt), + } + return json.Marshal(marshaler) +} + +func (n *Note) String() string { + if len(n.rawJSON) > 0 { + if value, err := internal.StringifyJSON(n.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(n); err == nil { + return value + } + return fmt.Sprintf("%#v", n) +} + +// The note's account. +type NoteAccount struct { + String string + Account *Account + + typ string +} + +func (n *NoteAccount) GetString() string { + if n == nil { + return "" + } + return n.String +} + +func (n *NoteAccount) GetAccount() *Account { + if n == nil { + return nil + } + return n.Account +} + +func (n *NoteAccount) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + n.typ = "String" + n.String = valueString + return nil + } + valueAccount := new(Account) + if err := json.Unmarshal(data, &valueAccount); err == nil { + n.typ = "Account" + n.Account = valueAccount + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, n) +} + +func (n NoteAccount) MarshalJSON() ([]byte, error) { + if n.typ == "String" || n.String != "" { + return json.Marshal(n.String) + } + if n.typ == "Account" || n.Account != nil { + return json.Marshal(n.Account) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", n) +} + +type NoteAccountVisitor interface { + VisitString(string) error + VisitAccount(*Account) error +} + +func (n *NoteAccount) Accept(visitor NoteAccountVisitor) error { + if n.typ == "String" || n.String != "" { + return visitor.VisitString(n.String) + } + if n.typ == "Account" || n.Account != nil { + return visitor.VisitAccount(n.Account) + } + return fmt.Errorf("type %T does not include a non-empty union type", n) +} + +// The note's contact. +type NoteContact struct { + String string + Contact *Contact + + typ string +} + +func (n *NoteContact) GetString() string { + if n == nil { + return "" + } + return n.String +} + +func (n *NoteContact) GetContact() *Contact { + if n == nil { + return nil + } + return n.Contact +} + +func (n *NoteContact) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + n.typ = "String" + n.String = valueString + return nil + } + valueContact := new(Contact) + if err := json.Unmarshal(data, &valueContact); err == nil { + n.typ = "Contact" + n.Contact = valueContact + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, n) +} + +func (n NoteContact) MarshalJSON() ([]byte, error) { + if n.typ == "String" || n.String != "" { + return json.Marshal(n.String) + } + if n.typ == "Contact" || n.Contact != nil { + return json.Marshal(n.Contact) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", n) +} + +type NoteContactVisitor interface { + VisitString(string) error + VisitContact(*Contact) error +} + +func (n *NoteContact) Accept(visitor NoteContactVisitor) error { + if n.typ == "String" || n.String != "" { + return visitor.VisitString(n.String) + } + if n.typ == "Contact" || n.Contact != nil { + return visitor.VisitContact(n.Contact) + } + return fmt.Errorf("type %T does not include a non-empty union type", n) +} + +// The note's opportunity. +type NoteOpportunity struct { + String string + Opportunity *Opportunity + + typ string +} + +func (n *NoteOpportunity) GetString() string { + if n == nil { + return "" + } + return n.String +} + +func (n *NoteOpportunity) GetOpportunity() *Opportunity { + if n == nil { + return nil + } + return n.Opportunity +} + +func (n *NoteOpportunity) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + n.typ = "String" + n.String = valueString + return nil + } + valueOpportunity := new(Opportunity) + if err := json.Unmarshal(data, &valueOpportunity); err == nil { + n.typ = "Opportunity" + n.Opportunity = valueOpportunity + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, n) +} + +func (n NoteOpportunity) MarshalJSON() ([]byte, error) { + if n.typ == "String" || n.String != "" { + return json.Marshal(n.String) + } + if n.typ == "Opportunity" || n.Opportunity != nil { + return json.Marshal(n.Opportunity) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", n) +} + +type NoteOpportunityVisitor interface { + VisitString(string) error + VisitOpportunity(*Opportunity) error +} + +func (n *NoteOpportunity) Accept(visitor NoteOpportunityVisitor) error { + if n.typ == "String" || n.String != "" { + return visitor.VisitString(n.String) + } + if n.typ == "Opportunity" || n.Opportunity != nil { + return visitor.VisitOpportunity(n.Opportunity) + } + return fmt.Errorf("type %T does not include a non-empty union type", n) +} + +// The note's owner. +type NoteOwner struct { + String string + User *User + + typ string +} + +func (n *NoteOwner) GetString() string { + if n == nil { + return "" + } + return n.String +} + +func (n *NoteOwner) GetUser() *User { + if n == nil { + return nil + } + return n.User +} + +func (n *NoteOwner) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + n.typ = "String" + n.String = valueString + return nil + } + valueUser := new(User) + if err := json.Unmarshal(data, &valueUser); err == nil { + n.typ = "User" + n.User = valueUser + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, n) +} + +func (n NoteOwner) MarshalJSON() ([]byte, error) { + if n.typ == "String" || n.String != "" { + return json.Marshal(n.String) + } + if n.typ == "User" || n.User != nil { + return json.Marshal(n.User) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", n) +} + +type NoteOwnerVisitor interface { + VisitString(string) error + VisitUser(*User) error +} + +func (n *NoteOwner) Accept(visitor NoteOwnerVisitor) error { + if n.typ == "String" || n.String != "" { + return visitor.VisitString(n.String) + } + if n.typ == "User" || n.User != nil { + return visitor.VisitUser(n.User) + } + return fmt.Errorf("type %T does not include a non-empty union type", n) +} + +// # The Note Object +// ### Description +// The `Note` object is used to represent a note on another object. +// ### Usage Example +// TODO +type NoteRequest struct { + // The note's owner. + Owner *NoteRequestOwner `json:"owner,omitempty" url:"owner,omitempty"` + // The note's content. + Content *string `json:"content,omitempty" url:"content,omitempty"` + // The note's contact. + Contact *NoteRequestContact `json:"contact,omitempty" url:"contact,omitempty"` + // The note's account. + Account *NoteRequestAccount `json:"account,omitempty" url:"account,omitempty"` + // The note's opportunity. + Opportunity *NoteRequestOpportunity `json:"opportunity,omitempty" url:"opportunity,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + RemoteFields []*RemoteFieldRequest `json:"remote_fields,omitempty" url:"remote_fields,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (n *NoteRequest) GetOwner() *NoteRequestOwner { + if n == nil { + return nil + } + return n.Owner +} + +func (n *NoteRequest) GetContent() *string { + if n == nil { + return nil + } + return n.Content +} + +func (n *NoteRequest) GetContact() *NoteRequestContact { + if n == nil { + return nil + } + return n.Contact +} + +func (n *NoteRequest) GetAccount() *NoteRequestAccount { + if n == nil { + return nil + } + return n.Account +} + +func (n *NoteRequest) GetOpportunity() *NoteRequestOpportunity { + if n == nil { + return nil + } + return n.Opportunity +} + +func (n *NoteRequest) GetIntegrationParams() map[string]interface{} { + if n == nil { + return nil + } + return n.IntegrationParams +} + +func (n *NoteRequest) GetLinkedAccountParams() map[string]interface{} { + if n == nil { + return nil + } + return n.LinkedAccountParams +} + +func (n *NoteRequest) GetRemoteFields() []*RemoteFieldRequest { + if n == nil { + return nil + } + return n.RemoteFields +} + +func (n *NoteRequest) GetExtraProperties() map[string]interface{} { + return n.extraProperties +} + +func (n *NoteRequest) UnmarshalJSON(data []byte) error { + type unmarshaler NoteRequest + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *n = NoteRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *n) + if err != nil { + return err + } + n.extraProperties = extraProperties + n.rawJSON = json.RawMessage(data) + return nil +} + +func (n *NoteRequest) String() string { + if len(n.rawJSON) > 0 { + if value, err := internal.StringifyJSON(n.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(n); err == nil { + return value + } + return fmt.Sprintf("%#v", n) +} + +// The note's account. +type NoteRequestAccount struct { + String string + Account *Account + + typ string +} + +func (n *NoteRequestAccount) GetString() string { + if n == nil { + return "" + } + return n.String +} + +func (n *NoteRequestAccount) GetAccount() *Account { + if n == nil { + return nil + } + return n.Account +} + +func (n *NoteRequestAccount) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + n.typ = "String" + n.String = valueString + return nil + } + valueAccount := new(Account) + if err := json.Unmarshal(data, &valueAccount); err == nil { + n.typ = "Account" + n.Account = valueAccount + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, n) +} + +func (n NoteRequestAccount) MarshalJSON() ([]byte, error) { + if n.typ == "String" || n.String != "" { + return json.Marshal(n.String) + } + if n.typ == "Account" || n.Account != nil { + return json.Marshal(n.Account) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", n) +} + +type NoteRequestAccountVisitor interface { + VisitString(string) error + VisitAccount(*Account) error +} + +func (n *NoteRequestAccount) Accept(visitor NoteRequestAccountVisitor) error { + if n.typ == "String" || n.String != "" { + return visitor.VisitString(n.String) + } + if n.typ == "Account" || n.Account != nil { + return visitor.VisitAccount(n.Account) + } + return fmt.Errorf("type %T does not include a non-empty union type", n) +} + +// The note's contact. +type NoteRequestContact struct { + String string + Contact *Contact + + typ string +} + +func (n *NoteRequestContact) GetString() string { + if n == nil { + return "" + } + return n.String +} + +func (n *NoteRequestContact) GetContact() *Contact { + if n == nil { + return nil + } + return n.Contact +} + +func (n *NoteRequestContact) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + n.typ = "String" + n.String = valueString + return nil + } + valueContact := new(Contact) + if err := json.Unmarshal(data, &valueContact); err == nil { + n.typ = "Contact" + n.Contact = valueContact + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, n) +} + +func (n NoteRequestContact) MarshalJSON() ([]byte, error) { + if n.typ == "String" || n.String != "" { + return json.Marshal(n.String) + } + if n.typ == "Contact" || n.Contact != nil { + return json.Marshal(n.Contact) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", n) +} + +type NoteRequestContactVisitor interface { + VisitString(string) error + VisitContact(*Contact) error +} + +func (n *NoteRequestContact) Accept(visitor NoteRequestContactVisitor) error { + if n.typ == "String" || n.String != "" { + return visitor.VisitString(n.String) + } + if n.typ == "Contact" || n.Contact != nil { + return visitor.VisitContact(n.Contact) + } + return fmt.Errorf("type %T does not include a non-empty union type", n) +} + +// The note's opportunity. +type NoteRequestOpportunity struct { + String string + Opportunity *Opportunity + + typ string +} + +func (n *NoteRequestOpportunity) GetString() string { + if n == nil { + return "" + } + return n.String +} + +func (n *NoteRequestOpportunity) GetOpportunity() *Opportunity { + if n == nil { + return nil + } + return n.Opportunity +} + +func (n *NoteRequestOpportunity) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + n.typ = "String" + n.String = valueString + return nil + } + valueOpportunity := new(Opportunity) + if err := json.Unmarshal(data, &valueOpportunity); err == nil { + n.typ = "Opportunity" + n.Opportunity = valueOpportunity + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, n) +} + +func (n NoteRequestOpportunity) MarshalJSON() ([]byte, error) { + if n.typ == "String" || n.String != "" { + return json.Marshal(n.String) + } + if n.typ == "Opportunity" || n.Opportunity != nil { + return json.Marshal(n.Opportunity) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", n) +} + +type NoteRequestOpportunityVisitor interface { + VisitString(string) error + VisitOpportunity(*Opportunity) error +} + +func (n *NoteRequestOpportunity) Accept(visitor NoteRequestOpportunityVisitor) error { + if n.typ == "String" || n.String != "" { + return visitor.VisitString(n.String) + } + if n.typ == "Opportunity" || n.Opportunity != nil { + return visitor.VisitOpportunity(n.Opportunity) + } + return fmt.Errorf("type %T does not include a non-empty union type", n) +} + +// The note's owner. +type NoteRequestOwner struct { + String string + User *User + + typ string +} + +func (n *NoteRequestOwner) GetString() string { + if n == nil { + return "" + } + return n.String +} + +func (n *NoteRequestOwner) GetUser() *User { + if n == nil { + return nil + } + return n.User +} + +func (n *NoteRequestOwner) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + n.typ = "String" + n.String = valueString + return nil + } + valueUser := new(User) + if err := json.Unmarshal(data, &valueUser); err == nil { + n.typ = "User" + n.User = valueUser + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, n) +} + +func (n NoteRequestOwner) MarshalJSON() ([]byte, error) { + if n.typ == "String" || n.String != "" { + return json.Marshal(n.String) + } + if n.typ == "User" || n.User != nil { + return json.Marshal(n.User) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", n) +} + +type NoteRequestOwnerVisitor interface { + VisitString(string) error + VisitUser(*User) error +} + +func (n *NoteRequestOwner) Accept(visitor NoteRequestOwnerVisitor) error { + if n.typ == "String" || n.String != "" { + return visitor.VisitString(n.String) + } + if n.typ == "User" || n.User != nil { + return visitor.VisitUser(n.User) + } + return fmt.Errorf("type %T does not include a non-empty union type", n) +} + +type NoteResponse struct { + Model *Note `json:"model" url:"model"` + Warnings []*WarningValidationProblem `json:"warnings" url:"warnings"` + Errors []*ErrorValidationProblem `json:"errors" url:"errors"` + Logs []*DebugModeLog `json:"logs,omitempty" url:"logs,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (n *NoteResponse) GetModel() *Note { + if n == nil { + return nil + } + return n.Model +} + +func (n *NoteResponse) GetWarnings() []*WarningValidationProblem { + if n == nil { + return nil + } + return n.Warnings +} + +func (n *NoteResponse) GetErrors() []*ErrorValidationProblem { + if n == nil { + return nil + } + return n.Errors +} + +func (n *NoteResponse) GetLogs() []*DebugModeLog { + if n == nil { + return nil + } + return n.Logs +} + +func (n *NoteResponse) GetExtraProperties() map[string]interface{} { + return n.extraProperties +} + +func (n *NoteResponse) UnmarshalJSON(data []byte) error { + type unmarshaler NoteResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *n = NoteResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *n) + if err != nil { + return err + } + n.extraProperties = extraProperties + n.rawJSON = json.RawMessage(data) + return nil +} + +func (n *NoteResponse) String() string { + if len(n.rawJSON) > 0 { + if value, err := internal.StringifyJSON(n.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(n); err == nil { + return value + } + return fmt.Sprintf("%#v", n) +} + +type PaginatedNoteList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Note `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedNoteList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedNoteList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedNoteList) GetResults() []*Note { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedNoteList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedNoteList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedNoteList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedNoteList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedNoteList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} diff --git a/crm/notes/client.go b/crm/notes/client.go index 8afd3a2..841ac9b 100644 --- a/crm/notes/client.go +++ b/crm/notes/client.go @@ -1,139 +1,135 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package notes import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - crm "github.com/merge-api/merge-go-client/crm" + core "github.com/merge-api/merge-go-client/v2/core" + crm "github.com/merge-api/merge-go-client/v2/crm" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `Note` objects. -func (c *Client) List(ctx context.Context, request *crm.NotesListRequest) (*crm.PaginatedNoteList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/notes" - - queryParams := make(url.Values) - if request.AccountId != nil { - queryParams.Add("account_id", fmt.Sprintf("%v", *request.AccountId)) - } - if request.ContactId != nil { - queryParams.Add("contact_id", fmt.Sprintf("%v", *request.ContactId)) - } - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeRemoteFields != nil { - queryParams.Add("include_remote_fields", fmt.Sprintf("%v", *request.IncludeRemoteFields)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.OpportunityId != nil { - queryParams.Add("opportunity_id", fmt.Sprintf("%v", *request.OpportunityId)) - } - if request.OwnerId != nil { - queryParams.Add("owner_id", fmt.Sprintf("%v", *request.OwnerId)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *crm.PaginatedNoteList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *crm.NotesListRequest, + opts ...option.RequestOption, +) (*core.Page[*crm.Note], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/notes" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *crm.PaginatedNoteList) *internal.PageResponse[*string, *crm.Note] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *crm.Note]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Creates a `Note` object with the given values. -func (c *Client) Create(ctx context.Context, request *crm.NoteEndpointRequest) (*crm.NoteResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/notes" - - queryParams := make(url.Values) - if request.IsDebugMode != nil { - queryParams.Add("is_debug_mode", fmt.Sprintf("%v", *request.IsDebugMode)) - } - if request.RunAsync != nil { - queryParams.Add("run_async", fmt.Sprintf("%v", *request.RunAsync)) +func (c *Client) Create( + ctx context.Context, + request *crm.NoteEndpointRequest, + opts ...option.RequestOption, +) (*crm.NoteResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/notes" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *crm.NoteResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -142,35 +138,46 @@ func (c *Client) Create(ctx context.Context, request *crm.NoteEndpointRequest) ( } // Returns a `Note` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *crm.NotesRetrieveRequest) (*crm.Note, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"crm/v1/notes/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeRemoteFields != nil { - queryParams.Add("include_remote_fields", fmt.Sprintf("%v", *request.IncludeRemoteFields)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *crm.NotesRetrieveRequest, + opts ...option.RequestOption, +) (*crm.Note, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/crm/v1/notes/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *crm.Note if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -179,21 +186,34 @@ func (c *Client) Retrieve(ctx context.Context, id string, request *crm.NotesRetr } // Returns metadata for `Note` POSTs. -func (c *Client) MetaPostRetrieve(ctx context.Context) (*crm.MetaResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/notes/meta/post" +func (c *Client) MetaPostRetrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*crm.MetaResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/notes/meta/post" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *crm.MetaResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -202,50 +222,60 @@ func (c *Client) MetaPostRetrieve(ctx context.Context) (*crm.MetaResponse, error } // Returns a list of `RemoteFieldClass` objects. -func (c *Client) RemoteFieldClassesList(ctx context.Context, request *crm.NotesRemoteFieldClassesListRequest) (*crm.PaginatedRemoteFieldClassList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/notes/remote-field-classes" - - queryParams := make(url.Values) - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeRemoteFields != nil { - queryParams.Add("include_remote_fields", fmt.Sprintf("%v", *request.IncludeRemoteFields)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.IsCommonModelField != nil { - queryParams.Add("is_common_model_field", fmt.Sprintf("%v", *request.IsCommonModelField)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *crm.PaginatedRemoteFieldClassList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) RemoteFieldClassesList( + ctx context.Context, + request *crm.NotesRemoteFieldClassesListRequest, + opts ...option.RequestOption, +) (*core.Page[*crm.RemoteFieldClass], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/notes/remote-field-classes" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *crm.PaginatedRemoteFieldClassList) *internal.PageResponse[*string, *crm.RemoteFieldClass] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *crm.RemoteFieldClass]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } diff --git a/crm/opportunities.go b/crm/opportunities.go index 1243136..3761a83 100644 --- a/crm/opportunities.go +++ b/crm/opportunities.go @@ -1,137 +1,131 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package crm import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type OpportunityEndpointRequest struct { // Whether to include debug fields (such as log file links) in the response. - IsDebugMode *bool `json:"-"` + IsDebugMode *bool `json:"-" url:"is_debug_mode,omitempty"` // Whether or not third-party updates should be run asynchronously. - RunAsync *bool `json:"-"` - Model *OpportunityRequest `json:"model,omitempty"` + RunAsync *bool `json:"-" url:"run_async,omitempty"` + Model *OpportunityRequest `json:"model,omitempty" url:"-"` } type OpportunitiesListRequest struct { // If provided, will only return opportunities with this account. - AccountId *string `json:"-"` + AccountId *string `json:"-" url:"account_id,omitempty"` // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *OpportunitiesListRequestExpand `json:"-"` + Expand []*OpportunitiesListRequestExpandItem `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - IncludeRemoteFields *bool `json:"-"` + IncludeRemoteFields *bool `json:"-" url:"include_remote_fields,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // If provided, will only return opportunities with this owner. - OwnerId *string `json:"-"` + OwnerId *string `json:"-" url:"owner_id,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // If provided, will only return opportunities created in the third party platform after this datetime. - RemoteCreatedAfter *time.Time `json:"-"` + RemoteCreatedAfter *time.Time `json:"-" url:"remote_created_after,omitempty"` // Deprecated. Use show_enum_origins. - RemoteFields *string `json:"-"` + RemoteFields *string `json:"-" url:"remote_fields,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` // 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) - ShowEnumOrigins *string `json:"-"` + ShowEnumOrigins *string `json:"-" url:"show_enum_origins,omitempty"` // If provided, will only return opportunities with this stage. - StageId *string `json:"-"` + StageId *string `json:"-" url:"stage_id,omitempty"` // If provided, will only return opportunities with this status. Options: ('OPEN', 'WON', 'LOST') // - // - `OPEN` - OPEN - // - `WON` - WON - // - `LOST` - LOST - Status *OpportunitiesListRequestStatus `json:"-"` + // * `OPEN` - OPEN + // * `WON` - WON + // * `LOST` - LOST + Status *OpportunitiesListRequestStatus `json:"-" url:"status,omitempty"` } type PatchedOpportunityEndpointRequest struct { // Whether to include debug fields (such as log file links) in the response. - IsDebugMode *bool `json:"-"` + IsDebugMode *bool `json:"-" url:"is_debug_mode,omitempty"` // Whether or not third-party updates should be run asynchronously. - RunAsync *bool `json:"-"` - Model *PatchedOpportunityRequest `json:"model,omitempty"` + RunAsync *bool `json:"-" url:"run_async,omitempty"` + Model *PatchedOpportunityRequest `json:"model,omitempty" url:"-"` } type OpportunitiesRemoteFieldClassesListRequest struct { // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - IncludeRemoteFields *bool `json:"-"` + IncludeRemoteFields *bool `json:"-" url:"include_remote_fields,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, will only return remote field classes with this is_common_model_field value - IsCommonModelField *bool `json:"-"` + IsCommonModelField *bool `json:"-" url:"is_common_model_field,omitempty"` + // If provided, will only return remote fields classes with this is_custom value + IsCustom *bool `json:"-" url:"is_custom,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` } type OpportunitiesRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *OpportunitiesRetrieveRequestExpand `json:"-"` + Expand []*OpportunitiesRetrieveRequestExpandItem `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - IncludeRemoteFields *bool `json:"-"` + IncludeRemoteFields *bool `json:"-" url:"include_remote_fields,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // Deprecated. Use show_enum_origins. - RemoteFields *string `json:"-"` + RemoteFields *string `json:"-" url:"remote_fields,omitempty"` // 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) - ShowEnumOrigins *string `json:"-"` + ShowEnumOrigins *string `json:"-" url:"show_enum_origins,omitempty"` } -type OpportunitiesListRequestExpand string +type OpportunitiesListRequestExpandItem string const ( - OpportunitiesListRequestExpandAccount OpportunitiesListRequestExpand = "account" - OpportunitiesListRequestExpandOwner OpportunitiesListRequestExpand = "owner" - OpportunitiesListRequestExpandOwnerAccount OpportunitiesListRequestExpand = "owner,account" - OpportunitiesListRequestExpandOwnerStage OpportunitiesListRequestExpand = "owner,stage" - OpportunitiesListRequestExpandOwnerStageAccount OpportunitiesListRequestExpand = "owner,stage,account" - OpportunitiesListRequestExpandStage OpportunitiesListRequestExpand = "stage" - OpportunitiesListRequestExpandStageAccount OpportunitiesListRequestExpand = "stage,account" + OpportunitiesListRequestExpandItemAccount OpportunitiesListRequestExpandItem = "account" + OpportunitiesListRequestExpandItemOwner OpportunitiesListRequestExpandItem = "owner" + OpportunitiesListRequestExpandItemStage OpportunitiesListRequestExpandItem = "stage" ) -func NewOpportunitiesListRequestExpandFromString(s string) (OpportunitiesListRequestExpand, error) { +func NewOpportunitiesListRequestExpandItemFromString(s string) (OpportunitiesListRequestExpandItem, error) { switch s { case "account": - return OpportunitiesListRequestExpandAccount, nil + return OpportunitiesListRequestExpandItemAccount, nil case "owner": - return OpportunitiesListRequestExpandOwner, nil - case "owner,account": - return OpportunitiesListRequestExpandOwnerAccount, nil - case "owner,stage": - return OpportunitiesListRequestExpandOwnerStage, nil - case "owner,stage,account": - return OpportunitiesListRequestExpandOwnerStageAccount, nil + return OpportunitiesListRequestExpandItemOwner, nil case "stage": - return OpportunitiesListRequestExpandStage, nil - case "stage,account": - return OpportunitiesListRequestExpandStageAccount, nil + return OpportunitiesListRequestExpandItemStage, nil } - var t OpportunitiesListRequestExpand + var t OpportunitiesListRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (o OpportunitiesListRequestExpand) Ptr() *OpportunitiesListRequestExpand { +func (o OpportunitiesListRequestExpandItem) Ptr() *OpportunitiesListRequestExpandItem { return &o } @@ -160,39 +154,830 @@ func (o OpportunitiesListRequestStatus) Ptr() *OpportunitiesListRequestStatus { return &o } -type OpportunitiesRetrieveRequestExpand string +type OpportunitiesRetrieveRequestExpandItem string const ( - OpportunitiesRetrieveRequestExpandAccount OpportunitiesRetrieveRequestExpand = "account" - OpportunitiesRetrieveRequestExpandOwner OpportunitiesRetrieveRequestExpand = "owner" - OpportunitiesRetrieveRequestExpandOwnerAccount OpportunitiesRetrieveRequestExpand = "owner,account" - OpportunitiesRetrieveRequestExpandOwnerStage OpportunitiesRetrieveRequestExpand = "owner,stage" - OpportunitiesRetrieveRequestExpandOwnerStageAccount OpportunitiesRetrieveRequestExpand = "owner,stage,account" - OpportunitiesRetrieveRequestExpandStage OpportunitiesRetrieveRequestExpand = "stage" - OpportunitiesRetrieveRequestExpandStageAccount OpportunitiesRetrieveRequestExpand = "stage,account" + OpportunitiesRetrieveRequestExpandItemAccount OpportunitiesRetrieveRequestExpandItem = "account" + OpportunitiesRetrieveRequestExpandItemOwner OpportunitiesRetrieveRequestExpandItem = "owner" + OpportunitiesRetrieveRequestExpandItemStage OpportunitiesRetrieveRequestExpandItem = "stage" ) -func NewOpportunitiesRetrieveRequestExpandFromString(s string) (OpportunitiesRetrieveRequestExpand, error) { +func NewOpportunitiesRetrieveRequestExpandItemFromString(s string) (OpportunitiesRetrieveRequestExpandItem, error) { switch s { case "account": - return OpportunitiesRetrieveRequestExpandAccount, nil + return OpportunitiesRetrieveRequestExpandItemAccount, nil case "owner": - return OpportunitiesRetrieveRequestExpandOwner, nil - case "owner,account": - return OpportunitiesRetrieveRequestExpandOwnerAccount, nil - case "owner,stage": - return OpportunitiesRetrieveRequestExpandOwnerStage, nil - case "owner,stage,account": - return OpportunitiesRetrieveRequestExpandOwnerStageAccount, nil + return OpportunitiesRetrieveRequestExpandItemOwner, nil case "stage": - return OpportunitiesRetrieveRequestExpandStage, nil - case "stage,account": - return OpportunitiesRetrieveRequestExpandStageAccount, nil + return OpportunitiesRetrieveRequestExpandItemStage, nil } - var t OpportunitiesRetrieveRequestExpand + var t OpportunitiesRetrieveRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (o OpportunitiesRetrieveRequestExpand) Ptr() *OpportunitiesRetrieveRequestExpand { +func (o OpportunitiesRetrieveRequestExpandItem) Ptr() *OpportunitiesRetrieveRequestExpandItem { return &o } + +// # The Opportunity Object +// ### Description +// The `Opportunity` object is used to represent a deal opportunity in a CRM system. +// ### Usage Example +// TODO +type OpportunityRequest struct { + // The opportunity's name. + Name *string `json:"name,omitempty" url:"name,omitempty"` + // The opportunity's description. + Description *string `json:"description,omitempty" url:"description,omitempty"` + // The opportunity's amount. + Amount *int `json:"amount,omitempty" url:"amount,omitempty"` + // The opportunity's owner. + Owner *OpportunityRequestOwner `json:"owner,omitempty" url:"owner,omitempty"` + // The account of the opportunity. + Account *OpportunityRequestAccount `json:"account,omitempty" url:"account,omitempty"` + // The stage of the opportunity. + Stage *OpportunityRequestStage `json:"stage,omitempty" url:"stage,omitempty"` + // The opportunity's status. + // + // * `OPEN` - OPEN + // * `WON` - WON + // * `LOST` - LOST + Status *OpportunityRequestStatus `json:"status,omitempty" url:"status,omitempty"` + // When the opportunity's last activity occurred. + LastActivityAt *time.Time `json:"last_activity_at,omitempty" url:"last_activity_at,omitempty"` + // When the opportunity was closed. + CloseDate *time.Time `json:"close_date,omitempty" url:"close_date,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + RemoteFields []*RemoteFieldRequest `json:"remote_fields,omitempty" url:"remote_fields,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (o *OpportunityRequest) GetName() *string { + if o == nil { + return nil + } + return o.Name +} + +func (o *OpportunityRequest) GetDescription() *string { + if o == nil { + return nil + } + return o.Description +} + +func (o *OpportunityRequest) GetAmount() *int { + if o == nil { + return nil + } + return o.Amount +} + +func (o *OpportunityRequest) GetOwner() *OpportunityRequestOwner { + if o == nil { + return nil + } + return o.Owner +} + +func (o *OpportunityRequest) GetAccount() *OpportunityRequestAccount { + if o == nil { + return nil + } + return o.Account +} + +func (o *OpportunityRequest) GetStage() *OpportunityRequestStage { + if o == nil { + return nil + } + return o.Stage +} + +func (o *OpportunityRequest) GetStatus() *OpportunityRequestStatus { + if o == nil { + return nil + } + return o.Status +} + +func (o *OpportunityRequest) GetLastActivityAt() *time.Time { + if o == nil { + return nil + } + return o.LastActivityAt +} + +func (o *OpportunityRequest) GetCloseDate() *time.Time { + if o == nil { + return nil + } + return o.CloseDate +} + +func (o *OpportunityRequest) GetIntegrationParams() map[string]interface{} { + if o == nil { + return nil + } + return o.IntegrationParams +} + +func (o *OpportunityRequest) GetLinkedAccountParams() map[string]interface{} { + if o == nil { + return nil + } + return o.LinkedAccountParams +} + +func (o *OpportunityRequest) GetRemoteFields() []*RemoteFieldRequest { + if o == nil { + return nil + } + return o.RemoteFields +} + +func (o *OpportunityRequest) GetExtraProperties() map[string]interface{} { + return o.extraProperties +} + +func (o *OpportunityRequest) UnmarshalJSON(data []byte) error { + type embed OpportunityRequest + var unmarshaler = struct { + embed + LastActivityAt *internal.DateTime `json:"last_activity_at,omitempty"` + CloseDate *internal.DateTime `json:"close_date,omitempty"` + }{ + embed: embed(*o), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *o = OpportunityRequest(unmarshaler.embed) + o.LastActivityAt = unmarshaler.LastActivityAt.TimePtr() + o.CloseDate = unmarshaler.CloseDate.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *o) + if err != nil { + return err + } + o.extraProperties = extraProperties + o.rawJSON = json.RawMessage(data) + return nil +} + +func (o *OpportunityRequest) MarshalJSON() ([]byte, error) { + type embed OpportunityRequest + var marshaler = struct { + embed + LastActivityAt *internal.DateTime `json:"last_activity_at,omitempty"` + CloseDate *internal.DateTime `json:"close_date,omitempty"` + }{ + embed: embed(*o), + LastActivityAt: internal.NewOptionalDateTime(o.LastActivityAt), + CloseDate: internal.NewOptionalDateTime(o.CloseDate), + } + return json.Marshal(marshaler) +} + +func (o *OpportunityRequest) String() string { + if len(o.rawJSON) > 0 { + if value, err := internal.StringifyJSON(o.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(o); err == nil { + return value + } + return fmt.Sprintf("%#v", o) +} + +// The account of the opportunity. +type OpportunityRequestAccount struct { + String string + Account *Account + + typ string +} + +func (o *OpportunityRequestAccount) GetString() string { + if o == nil { + return "" + } + return o.String +} + +func (o *OpportunityRequestAccount) GetAccount() *Account { + if o == nil { + return nil + } + return o.Account +} + +func (o *OpportunityRequestAccount) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + o.typ = "String" + o.String = valueString + return nil + } + valueAccount := new(Account) + if err := json.Unmarshal(data, &valueAccount); err == nil { + o.typ = "Account" + o.Account = valueAccount + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, o) +} + +func (o OpportunityRequestAccount) MarshalJSON() ([]byte, error) { + if o.typ == "String" || o.String != "" { + return json.Marshal(o.String) + } + if o.typ == "Account" || o.Account != nil { + return json.Marshal(o.Account) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", o) +} + +type OpportunityRequestAccountVisitor interface { + VisitString(string) error + VisitAccount(*Account) error +} + +func (o *OpportunityRequestAccount) Accept(visitor OpportunityRequestAccountVisitor) error { + if o.typ == "String" || o.String != "" { + return visitor.VisitString(o.String) + } + if o.typ == "Account" || o.Account != nil { + return visitor.VisitAccount(o.Account) + } + return fmt.Errorf("type %T does not include a non-empty union type", o) +} + +// The opportunity's owner. +type OpportunityRequestOwner struct { + String string + User *User + + typ string +} + +func (o *OpportunityRequestOwner) GetString() string { + if o == nil { + return "" + } + return o.String +} + +func (o *OpportunityRequestOwner) GetUser() *User { + if o == nil { + return nil + } + return o.User +} + +func (o *OpportunityRequestOwner) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + o.typ = "String" + o.String = valueString + return nil + } + valueUser := new(User) + if err := json.Unmarshal(data, &valueUser); err == nil { + o.typ = "User" + o.User = valueUser + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, o) +} + +func (o OpportunityRequestOwner) MarshalJSON() ([]byte, error) { + if o.typ == "String" || o.String != "" { + return json.Marshal(o.String) + } + if o.typ == "User" || o.User != nil { + return json.Marshal(o.User) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", o) +} + +type OpportunityRequestOwnerVisitor interface { + VisitString(string) error + VisitUser(*User) error +} + +func (o *OpportunityRequestOwner) Accept(visitor OpportunityRequestOwnerVisitor) error { + if o.typ == "String" || o.String != "" { + return visitor.VisitString(o.String) + } + if o.typ == "User" || o.User != nil { + return visitor.VisitUser(o.User) + } + return fmt.Errorf("type %T does not include a non-empty union type", o) +} + +// The stage of the opportunity. +type OpportunityRequestStage struct { + String string + Stage *Stage + + typ string +} + +func (o *OpportunityRequestStage) GetString() string { + if o == nil { + return "" + } + return o.String +} + +func (o *OpportunityRequestStage) GetStage() *Stage { + if o == nil { + return nil + } + return o.Stage +} + +func (o *OpportunityRequestStage) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + o.typ = "String" + o.String = valueString + return nil + } + valueStage := new(Stage) + if err := json.Unmarshal(data, &valueStage); err == nil { + o.typ = "Stage" + o.Stage = valueStage + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, o) +} + +func (o OpportunityRequestStage) MarshalJSON() ([]byte, error) { + if o.typ == "String" || o.String != "" { + return json.Marshal(o.String) + } + if o.typ == "Stage" || o.Stage != nil { + return json.Marshal(o.Stage) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", o) +} + +type OpportunityRequestStageVisitor interface { + VisitString(string) error + VisitStage(*Stage) error +} + +func (o *OpportunityRequestStage) Accept(visitor OpportunityRequestStageVisitor) error { + if o.typ == "String" || o.String != "" { + return visitor.VisitString(o.String) + } + if o.typ == "Stage" || o.Stage != nil { + return visitor.VisitStage(o.Stage) + } + return fmt.Errorf("type %T does not include a non-empty union type", o) +} + +// The opportunity's status. +// +// * `OPEN` - OPEN +// * `WON` - WON +// * `LOST` - LOST +type OpportunityRequestStatus struct { + OpportunityStatusEnum OpportunityStatusEnum + String string + + typ string +} + +func (o *OpportunityRequestStatus) GetOpportunityStatusEnum() OpportunityStatusEnum { + if o == nil { + return "" + } + return o.OpportunityStatusEnum +} + +func (o *OpportunityRequestStatus) GetString() string { + if o == nil { + return "" + } + return o.String +} + +func (o *OpportunityRequestStatus) UnmarshalJSON(data []byte) error { + var valueOpportunityStatusEnum OpportunityStatusEnum + if err := json.Unmarshal(data, &valueOpportunityStatusEnum); err == nil { + o.typ = "OpportunityStatusEnum" + o.OpportunityStatusEnum = valueOpportunityStatusEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + o.typ = "String" + o.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, o) +} + +func (o OpportunityRequestStatus) MarshalJSON() ([]byte, error) { + if o.typ == "OpportunityStatusEnum" || o.OpportunityStatusEnum != "" { + return json.Marshal(o.OpportunityStatusEnum) + } + if o.typ == "String" || o.String != "" { + return json.Marshal(o.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", o) +} + +type OpportunityRequestStatusVisitor interface { + VisitOpportunityStatusEnum(OpportunityStatusEnum) error + VisitString(string) error +} + +func (o *OpportunityRequestStatus) Accept(visitor OpportunityRequestStatusVisitor) error { + if o.typ == "OpportunityStatusEnum" || o.OpportunityStatusEnum != "" { + return visitor.VisitOpportunityStatusEnum(o.OpportunityStatusEnum) + } + if o.typ == "String" || o.String != "" { + return visitor.VisitString(o.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", o) +} + +type OpportunityResponse struct { + Model *Opportunity `json:"model" url:"model"` + Warnings []*WarningValidationProblem `json:"warnings" url:"warnings"` + Errors []*ErrorValidationProblem `json:"errors" url:"errors"` + Logs []*DebugModeLog `json:"logs,omitempty" url:"logs,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (o *OpportunityResponse) GetModel() *Opportunity { + if o == nil { + return nil + } + return o.Model +} + +func (o *OpportunityResponse) GetWarnings() []*WarningValidationProblem { + if o == nil { + return nil + } + return o.Warnings +} + +func (o *OpportunityResponse) GetErrors() []*ErrorValidationProblem { + if o == nil { + return nil + } + return o.Errors +} + +func (o *OpportunityResponse) GetLogs() []*DebugModeLog { + if o == nil { + return nil + } + return o.Logs +} + +func (o *OpportunityResponse) GetExtraProperties() map[string]interface{} { + return o.extraProperties +} + +func (o *OpportunityResponse) UnmarshalJSON(data []byte) error { + type unmarshaler OpportunityResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *o = OpportunityResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *o) + if err != nil { + return err + } + o.extraProperties = extraProperties + o.rawJSON = json.RawMessage(data) + return nil +} + +func (o *OpportunityResponse) String() string { + if len(o.rawJSON) > 0 { + if value, err := internal.StringifyJSON(o.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(o); err == nil { + return value + } + return fmt.Sprintf("%#v", o) +} + +type PaginatedOpportunityList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Opportunity `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedOpportunityList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedOpportunityList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedOpportunityList) GetResults() []*Opportunity { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedOpportunityList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedOpportunityList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedOpportunityList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedOpportunityList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedOpportunityList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +// # The Opportunity Object +// ### Description +// The `Opportunity` object is used to represent a deal opportunity in a CRM system. +// ### Usage Example +// TODO +type PatchedOpportunityRequest struct { + // The opportunity's name. + Name *string `json:"name,omitempty" url:"name,omitempty"` + // The opportunity's description. + Description *string `json:"description,omitempty" url:"description,omitempty"` + // The opportunity's amount. + Amount *int `json:"amount,omitempty" url:"amount,omitempty"` + // The opportunity's owner. + Owner *string `json:"owner,omitempty" url:"owner,omitempty"` + // The account of the opportunity. + Account *string `json:"account,omitempty" url:"account,omitempty"` + // The stage of the opportunity. + Stage *string `json:"stage,omitempty" url:"stage,omitempty"` + // The opportunity's status. + // + // * `OPEN` - OPEN + // * `WON` - WON + // * `LOST` - LOST + Status *PatchedOpportunityRequestStatus `json:"status,omitempty" url:"status,omitempty"` + // When the opportunity's last activity occurred. + LastActivityAt *time.Time `json:"last_activity_at,omitempty" url:"last_activity_at,omitempty"` + // When the opportunity was closed. + CloseDate *time.Time `json:"close_date,omitempty" url:"close_date,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + RemoteFields []*RemoteFieldRequest `json:"remote_fields,omitempty" url:"remote_fields,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PatchedOpportunityRequest) GetName() *string { + if p == nil { + return nil + } + return p.Name +} + +func (p *PatchedOpportunityRequest) GetDescription() *string { + if p == nil { + return nil + } + return p.Description +} + +func (p *PatchedOpportunityRequest) GetAmount() *int { + if p == nil { + return nil + } + return p.Amount +} + +func (p *PatchedOpportunityRequest) GetOwner() *string { + if p == nil { + return nil + } + return p.Owner +} + +func (p *PatchedOpportunityRequest) GetAccount() *string { + if p == nil { + return nil + } + return p.Account +} + +func (p *PatchedOpportunityRequest) GetStage() *string { + if p == nil { + return nil + } + return p.Stage +} + +func (p *PatchedOpportunityRequest) GetStatus() *PatchedOpportunityRequestStatus { + if p == nil { + return nil + } + return p.Status +} + +func (p *PatchedOpportunityRequest) GetLastActivityAt() *time.Time { + if p == nil { + return nil + } + return p.LastActivityAt +} + +func (p *PatchedOpportunityRequest) GetCloseDate() *time.Time { + if p == nil { + return nil + } + return p.CloseDate +} + +func (p *PatchedOpportunityRequest) GetIntegrationParams() map[string]interface{} { + if p == nil { + return nil + } + return p.IntegrationParams +} + +func (p *PatchedOpportunityRequest) GetLinkedAccountParams() map[string]interface{} { + if p == nil { + return nil + } + return p.LinkedAccountParams +} + +func (p *PatchedOpportunityRequest) GetRemoteFields() []*RemoteFieldRequest { + if p == nil { + return nil + } + return p.RemoteFields +} + +func (p *PatchedOpportunityRequest) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PatchedOpportunityRequest) UnmarshalJSON(data []byte) error { + type embed PatchedOpportunityRequest + var unmarshaler = struct { + embed + LastActivityAt *internal.DateTime `json:"last_activity_at,omitempty"` + CloseDate *internal.DateTime `json:"close_date,omitempty"` + }{ + embed: embed(*p), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *p = PatchedOpportunityRequest(unmarshaler.embed) + p.LastActivityAt = unmarshaler.LastActivityAt.TimePtr() + p.CloseDate = unmarshaler.CloseDate.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PatchedOpportunityRequest) MarshalJSON() ([]byte, error) { + type embed PatchedOpportunityRequest + var marshaler = struct { + embed + LastActivityAt *internal.DateTime `json:"last_activity_at,omitempty"` + CloseDate *internal.DateTime `json:"close_date,omitempty"` + }{ + embed: embed(*p), + LastActivityAt: internal.NewOptionalDateTime(p.LastActivityAt), + CloseDate: internal.NewOptionalDateTime(p.CloseDate), + } + return json.Marshal(marshaler) +} + +func (p *PatchedOpportunityRequest) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +// The opportunity's status. +// +// * `OPEN` - OPEN +// * `WON` - WON +// * `LOST` - LOST +type PatchedOpportunityRequestStatus struct { + OpportunityStatusEnum OpportunityStatusEnum + String string + + typ string +} + +func (p *PatchedOpportunityRequestStatus) GetOpportunityStatusEnum() OpportunityStatusEnum { + if p == nil { + return "" + } + return p.OpportunityStatusEnum +} + +func (p *PatchedOpportunityRequestStatus) GetString() string { + if p == nil { + return "" + } + return p.String +} + +func (p *PatchedOpportunityRequestStatus) UnmarshalJSON(data []byte) error { + var valueOpportunityStatusEnum OpportunityStatusEnum + if err := json.Unmarshal(data, &valueOpportunityStatusEnum); err == nil { + p.typ = "OpportunityStatusEnum" + p.OpportunityStatusEnum = valueOpportunityStatusEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + p.typ = "String" + p.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, p) +} + +func (p PatchedOpportunityRequestStatus) MarshalJSON() ([]byte, error) { + if p.typ == "OpportunityStatusEnum" || p.OpportunityStatusEnum != "" { + return json.Marshal(p.OpportunityStatusEnum) + } + if p.typ == "String" || p.String != "" { + return json.Marshal(p.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) +} + +type PatchedOpportunityRequestStatusVisitor interface { + VisitOpportunityStatusEnum(OpportunityStatusEnum) error + VisitString(string) error +} + +func (p *PatchedOpportunityRequestStatus) Accept(visitor PatchedOpportunityRequestStatusVisitor) error { + if p.typ == "OpportunityStatusEnum" || p.OpportunityStatusEnum != "" { + return visitor.VisitOpportunityStatusEnum(p.OpportunityStatusEnum) + } + if p.typ == "String" || p.String != "" { + return visitor.VisitString(p.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", p) +} diff --git a/crm/opportunities/client.go b/crm/opportunities/client.go index 970323f..d6a6528 100644 --- a/crm/opportunities/client.go +++ b/crm/opportunities/client.go @@ -1,148 +1,135 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package opportunities import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - crm "github.com/merge-api/merge-go-client/crm" + core "github.com/merge-api/merge-go-client/v2/core" + crm "github.com/merge-api/merge-go-client/v2/crm" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `Opportunity` objects. -func (c *Client) List(ctx context.Context, request *crm.OpportunitiesListRequest) (*crm.PaginatedOpportunityList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/opportunities" - - queryParams := make(url.Values) - if request.AccountId != nil { - queryParams.Add("account_id", fmt.Sprintf("%v", *request.AccountId)) - } - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeRemoteFields != nil { - queryParams.Add("include_remote_fields", fmt.Sprintf("%v", *request.IncludeRemoteFields)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.OwnerId != nil { - queryParams.Add("owner_id", fmt.Sprintf("%v", *request.OwnerId)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteCreatedAfter != nil { - queryParams.Add("remote_created_after", fmt.Sprintf("%v", request.RemoteCreatedAfter.Format(time.RFC3339))) - } - if request.RemoteFields != nil { - queryParams.Add("remote_fields", fmt.Sprintf("%v", request.RemoteFields)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if request.ShowEnumOrigins != nil { - queryParams.Add("show_enum_origins", fmt.Sprintf("%v", request.ShowEnumOrigins)) - } - if request.StageId != nil { - queryParams.Add("stage_id", fmt.Sprintf("%v", *request.StageId)) - } - if request.Status != nil { - queryParams.Add("status", fmt.Sprintf("%v", *request.Status)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *crm.PaginatedOpportunityList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *crm.OpportunitiesListRequest, + opts ...option.RequestOption, +) (*core.Page[*crm.Opportunity], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/opportunities" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *crm.PaginatedOpportunityList) *internal.PageResponse[*string, *crm.Opportunity] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *crm.Opportunity]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Creates an `Opportunity` object with the given values. -func (c *Client) Create(ctx context.Context, request *crm.OpportunityEndpointRequest) (*crm.OpportunityResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/opportunities" - - queryParams := make(url.Values) - if request.IsDebugMode != nil { - queryParams.Add("is_debug_mode", fmt.Sprintf("%v", *request.IsDebugMode)) - } - if request.RunAsync != nil { - queryParams.Add("run_async", fmt.Sprintf("%v", *request.RunAsync)) +func (c *Client) Create( + ctx context.Context, + request *crm.OpportunityEndpointRequest, + opts ...option.RequestOption, +) (*crm.OpportunityResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/opportunities" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *crm.OpportunityResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -151,41 +138,46 @@ func (c *Client) Create(ctx context.Context, request *crm.OpportunityEndpointReq } // Returns an `Opportunity` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *crm.OpportunitiesRetrieveRequest) (*crm.Opportunity, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"crm/v1/opportunities/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeRemoteFields != nil { - queryParams.Add("include_remote_fields", fmt.Sprintf("%v", *request.IncludeRemoteFields)) - } - if request.RemoteFields != nil { - queryParams.Add("remote_fields", fmt.Sprintf("%v", request.RemoteFields)) - } - if request.ShowEnumOrigins != nil { - queryParams.Add("show_enum_origins", fmt.Sprintf("%v", request.ShowEnumOrigins)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *crm.OpportunitiesRetrieveRequest, + opts ...option.RequestOption, +) (*crm.Opportunity, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/crm/v1/opportunities/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *crm.Opportunity if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -194,33 +186,48 @@ func (c *Client) Retrieve(ctx context.Context, id string, request *crm.Opportuni } // Updates an `Opportunity` object with the given `id`. -func (c *Client) PartialUpdate(ctx context.Context, id string, request *crm.PatchedOpportunityEndpointRequest) (*crm.OpportunityResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"crm/v1/opportunities/%v", id) - - queryParams := make(url.Values) - if request.IsDebugMode != nil { - queryParams.Add("is_debug_mode", fmt.Sprintf("%v", *request.IsDebugMode)) - } - if request.RunAsync != nil { - queryParams.Add("run_async", fmt.Sprintf("%v", *request.RunAsync)) +func (c *Client) PartialUpdate( + ctx context.Context, + id string, + request *crm.PatchedOpportunityEndpointRequest, + opts ...option.RequestOption, +) (*crm.OpportunityResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/crm/v1/opportunities/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *crm.OpportunityResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPatch, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPatch, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -229,21 +236,38 @@ func (c *Client) PartialUpdate(ctx context.Context, id string, request *crm.Patc } // Returns metadata for `Opportunity` PATCHs. -func (c *Client) MetaPatchRetrieve(ctx context.Context, id string) (*crm.MetaResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"crm/v1/opportunities/meta/patch/%v", id) +func (c *Client) MetaPatchRetrieve( + ctx context.Context, + id string, + opts ...option.RequestOption, +) (*crm.MetaResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/crm/v1/opportunities/meta/patch/%v", + id, + ) + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *crm.MetaResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -252,21 +276,34 @@ func (c *Client) MetaPatchRetrieve(ctx context.Context, id string) (*crm.MetaRes } // Returns metadata for `Opportunity` POSTs. -func (c *Client) MetaPostRetrieve(ctx context.Context) (*crm.MetaResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/opportunities/meta/post" +func (c *Client) MetaPostRetrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*crm.MetaResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/opportunities/meta/post" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *crm.MetaResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -275,50 +312,60 @@ func (c *Client) MetaPostRetrieve(ctx context.Context) (*crm.MetaResponse, error } // Returns a list of `RemoteFieldClass` objects. -func (c *Client) RemoteFieldClassesList(ctx context.Context, request *crm.OpportunitiesRemoteFieldClassesListRequest) (*crm.PaginatedRemoteFieldClassList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/opportunities/remote-field-classes" - - queryParams := make(url.Values) - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeRemoteFields != nil { - queryParams.Add("include_remote_fields", fmt.Sprintf("%v", *request.IncludeRemoteFields)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.IsCommonModelField != nil { - queryParams.Add("is_common_model_field", fmt.Sprintf("%v", *request.IsCommonModelField)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *crm.PaginatedRemoteFieldClassList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) RemoteFieldClassesList( + ctx context.Context, + request *crm.OpportunitiesRemoteFieldClassesListRequest, + opts ...option.RequestOption, +) (*core.Page[*crm.RemoteFieldClass], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/opportunities/remote-field-classes" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *crm.PaginatedRemoteFieldClassList) *internal.PageResponse[*string, *crm.RemoteFieldClass] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *crm.RemoteFieldClass]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } diff --git a/crm/passthrough/client.go b/crm/passthrough/client.go index 32e799b..9d79435 100644 --- a/crm/passthrough/client.go +++ b/crm/passthrough/client.go @@ -1,49 +1,68 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package passthrough import ( context "context" - core "github.com/merge-api/merge-go-client/core" - crm "github.com/merge-api/merge-go-client/crm" + core "github.com/merge-api/merge-go-client/v2/core" + crm "github.com/merge-api/merge-go-client/v2/crm" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Pull data from an endpoint not currently supported by Merge. -func (c *Client) Create(ctx context.Context, request *crm.DataPassthroughRequest) (*crm.RemoteResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/passthrough" +func (c *Client) Create( + ctx context.Context, + request *crm.DataPassthroughRequest, + opts ...option.RequestOption, +) (*crm.RemoteResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/passthrough" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *crm.RemoteResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err diff --git a/crm/regenerate_key.go b/crm/regenerate_key.go index 24acd22..369099f 100644 --- a/crm/regenerate_key.go +++ b/crm/regenerate_key.go @@ -1,8 +1,8 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package crm type RemoteKeyForRegenerationRequest struct { // The name of the remote key - Name string `json:"name"` + Name string `json:"name" url:"-"` } diff --git a/crm/regeneratekey/client.go b/crm/regeneratekey/client.go index b486b93..1fd6d35 100644 --- a/crm/regeneratekey/client.go +++ b/crm/regeneratekey/client.go @@ -1,49 +1,68 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package regeneratekey import ( context "context" - core "github.com/merge-api/merge-go-client/core" - crm "github.com/merge-api/merge-go-client/crm" + core "github.com/merge-api/merge-go-client/v2/core" + crm "github.com/merge-api/merge-go-client/v2/crm" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Exchange remote keys. -func (c *Client) Create(ctx context.Context, request *crm.RemoteKeyForRegenerationRequest) (*crm.RemoteKey, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/regenerate-key" +func (c *Client) Create( + ctx context.Context, + request *crm.RemoteKeyForRegenerationRequest, + opts ...option.RequestOption, +) (*crm.RemoteKey, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/regenerate-key" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *crm.RemoteKey if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err diff --git a/crm/scopes.go b/crm/scopes.go index 79f6cdd..a417bb4 100644 --- a/crm/scopes.go +++ b/crm/scopes.go @@ -1,8 +1,223 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package crm +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" +) + type LinkedAccountCommonModelScopeDeserializerRequest struct { // The common models you want to update the scopes for - CommonModels []*IndividualCommonModelScopeDeserializerRequest `json:"common_models,omitempty"` + CommonModels []*IndividualCommonModelScopeDeserializerRequest `json:"common_models,omitempty" url:"-"` +} + +type CommonModelScopeApi struct { + // The common models you want to update the scopes for + CommonModels []*IndividualCommonModelScopeDeserializer `json:"common_models" url:"common_models"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (c *CommonModelScopeApi) GetCommonModels() []*IndividualCommonModelScopeDeserializer { + if c == nil { + return nil + } + return c.CommonModels +} + +func (c *CommonModelScopeApi) GetExtraProperties() map[string]interface{} { + return c.extraProperties +} + +func (c *CommonModelScopeApi) UnmarshalJSON(data []byte) error { + type unmarshaler CommonModelScopeApi + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *c = CommonModelScopeApi(value) + extraProperties, err := internal.ExtractExtraProperties(data, *c) + if err != nil { + return err + } + c.extraProperties = extraProperties + c.rawJSON = json.RawMessage(data) + return nil +} + +func (c *CommonModelScopeApi) String() string { + if len(c.rawJSON) > 0 { + if value, err := internal.StringifyJSON(c.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(c); err == nil { + return value + } + return fmt.Sprintf("%#v", c) +} + +type FieldPermissionDeserializer struct { + EnabledFields []interface{} `json:"enabled_fields,omitempty" url:"enabled_fields,omitempty"` + DisabledFields []interface{} `json:"disabled_fields,omitempty" url:"disabled_fields,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (f *FieldPermissionDeserializer) GetEnabledFields() []interface{} { + if f == nil { + return nil + } + return f.EnabledFields +} + +func (f *FieldPermissionDeserializer) GetDisabledFields() []interface{} { + if f == nil { + return nil + } + return f.DisabledFields +} + +func (f *FieldPermissionDeserializer) GetExtraProperties() map[string]interface{} { + return f.extraProperties +} + +func (f *FieldPermissionDeserializer) UnmarshalJSON(data []byte) error { + type unmarshaler FieldPermissionDeserializer + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *f = FieldPermissionDeserializer(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { + return err + } + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) + return nil +} + +func (f *FieldPermissionDeserializer) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(f); err == nil { + return value + } + return fmt.Sprintf("%#v", f) +} + +type IndividualCommonModelScopeDeserializer struct { + ModelName string `json:"model_name" url:"model_name"` + ModelPermissions map[string]*ModelPermissionDeserializer `json:"model_permissions,omitempty" url:"model_permissions,omitempty"` + FieldPermissions *FieldPermissionDeserializer `json:"field_permissions,omitempty" url:"field_permissions,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (i *IndividualCommonModelScopeDeserializer) GetModelName() string { + if i == nil { + return "" + } + return i.ModelName +} + +func (i *IndividualCommonModelScopeDeserializer) GetModelPermissions() map[string]*ModelPermissionDeserializer { + if i == nil { + return nil + } + return i.ModelPermissions +} + +func (i *IndividualCommonModelScopeDeserializer) GetFieldPermissions() *FieldPermissionDeserializer { + if i == nil { + return nil + } + return i.FieldPermissions +} + +func (i *IndividualCommonModelScopeDeserializer) GetExtraProperties() map[string]interface{} { + return i.extraProperties +} + +func (i *IndividualCommonModelScopeDeserializer) UnmarshalJSON(data []byte) error { + type unmarshaler IndividualCommonModelScopeDeserializer + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *i = IndividualCommonModelScopeDeserializer(value) + extraProperties, err := internal.ExtractExtraProperties(data, *i) + if err != nil { + return err + } + i.extraProperties = extraProperties + i.rawJSON = json.RawMessage(data) + return nil +} + +func (i *IndividualCommonModelScopeDeserializer) String() string { + if len(i.rawJSON) > 0 { + if value, err := internal.StringifyJSON(i.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(i); err == nil { + return value + } + return fmt.Sprintf("%#v", i) +} + +type ModelPermissionDeserializer struct { + IsEnabled *bool `json:"is_enabled,omitempty" url:"is_enabled,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (m *ModelPermissionDeserializer) GetIsEnabled() *bool { + if m == nil { + return nil + } + return m.IsEnabled +} + +func (m *ModelPermissionDeserializer) GetExtraProperties() map[string]interface{} { + return m.extraProperties +} + +func (m *ModelPermissionDeserializer) UnmarshalJSON(data []byte) error { + type unmarshaler ModelPermissionDeserializer + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *m = ModelPermissionDeserializer(value) + extraProperties, err := internal.ExtractExtraProperties(data, *m) + if err != nil { + return err + } + m.extraProperties = extraProperties + m.rawJSON = json.RawMessage(data) + return nil +} + +func (m *ModelPermissionDeserializer) String() string { + if len(m.rawJSON) > 0 { + if value, err := internal.StringifyJSON(m.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(m); err == nil { + return value + } + return fmt.Sprintf("%#v", m) } diff --git a/crm/scopes/client.go b/crm/scopes/client.go index dff05ed..ae249a1 100644 --- a/crm/scopes/client.go +++ b/crm/scopes/client.go @@ -1,48 +1,65 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package scopes import ( context "context" - core "github.com/merge-api/merge-go-client/core" - crm "github.com/merge-api/merge-go-client/crm" + core "github.com/merge-api/merge-go-client/v2/core" + crm "github.com/merge-api/merge-go-client/v2/crm" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // 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/5950052-common-model-and-field-scopes). -func (c *Client) DefaultScopesRetrieve(ctx context.Context) (*crm.CommonModelScopeApi, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/default-scopes" +func (c *Client) DefaultScopesRetrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*crm.CommonModelScopeApi, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/default-scopes" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *crm.CommonModelScopeApi if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -51,21 +68,34 @@ func (c *Client) DefaultScopesRetrieve(ctx context.Context) (*crm.CommonModelSco } // Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). -func (c *Client) LinkedAccountScopesRetrieve(ctx context.Context) (*crm.CommonModelScopeApi, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/linked-account-scopes" +func (c *Client) LinkedAccountScopesRetrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*crm.CommonModelScopeApi, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/linked-account-scopes" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *crm.CommonModelScopeApi if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -74,22 +104,37 @@ func (c *Client) LinkedAccountScopesRetrieve(ctx context.Context) (*crm.CommonMo } // 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/5950052-common-model-and-field-scopes) -func (c *Client) LinkedAccountScopesCreate(ctx context.Context, request *crm.LinkedAccountCommonModelScopeDeserializerRequest) (*crm.CommonModelScopeApi, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/linked-account-scopes" +func (c *Client) LinkedAccountScopesCreate( + ctx context.Context, + request *crm.LinkedAccountCommonModelScopeDeserializerRequest, + opts ...option.RequestOption, +) (*crm.CommonModelScopeApi, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/linked-account-scopes" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *crm.CommonModelScopeApi if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err diff --git a/crm/stages.go b/crm/stages.go index 0b385e9..0117d8d 100644 --- a/crm/stages.go +++ b/crm/stages.go @@ -1,56 +1,125 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package crm import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type StagesListRequest struct { // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - IncludeRemoteFields *bool `json:"-"` + IncludeRemoteFields *bool `json:"-" url:"include_remote_fields,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` } type StagesRemoteFieldClassesListRequest struct { // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - IncludeRemoteFields *bool `json:"-"` + IncludeRemoteFields *bool `json:"-" url:"include_remote_fields,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, will only return remote field classes with this is_common_model_field value - IsCommonModelField *bool `json:"-"` + IsCommonModelField *bool `json:"-" url:"is_common_model_field,omitempty"` + // If provided, will only return remote fields classes with this is_custom value + IsCustom *bool `json:"-" url:"is_custom,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` } type StagesRetrieveRequest struct { // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - IncludeRemoteFields *bool `json:"-"` + IncludeRemoteFields *bool `json:"-" url:"include_remote_fields,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` +} + +type PaginatedStageList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Stage `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedStageList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedStageList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedStageList) GetResults() []*Stage { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedStageList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedStageList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedStageList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedStageList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedStageList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) } diff --git a/crm/stages/client.go b/crm/stages/client.go index 8f00614..8fad6a0 100644 --- a/crm/stages/client.go +++ b/crm/stages/client.go @@ -1,123 +1,137 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package stages import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - crm "github.com/merge-api/merge-go-client/crm" + core "github.com/merge-api/merge-go-client/v2/core" + crm "github.com/merge-api/merge-go-client/v2/crm" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `Stage` objects. -func (c *Client) List(ctx context.Context, request *crm.StagesListRequest) (*crm.PaginatedStageList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/stages" - - queryParams := make(url.Values) - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeRemoteFields != nil { - queryParams.Add("include_remote_fields", fmt.Sprintf("%v", *request.IncludeRemoteFields)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *crm.PaginatedStageList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *crm.StagesListRequest, + opts ...option.RequestOption, +) (*core.Page[*crm.Stage], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/stages" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *crm.PaginatedStageList) *internal.PageResponse[*string, *crm.Stage] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *crm.Stage]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Returns a `Stage` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *crm.StagesRetrieveRequest) (*crm.Stage, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"crm/v1/stages/%v", id) - - queryParams := make(url.Values) - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeRemoteFields != nil { - queryParams.Add("include_remote_fields", fmt.Sprintf("%v", *request.IncludeRemoteFields)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *crm.StagesRetrieveRequest, + opts ...option.RequestOption, +) (*crm.Stage, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/crm/v1/stages/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *crm.Stage if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -126,50 +140,60 @@ func (c *Client) Retrieve(ctx context.Context, id string, request *crm.StagesRet } // Returns a list of `RemoteFieldClass` objects. -func (c *Client) RemoteFieldClassesList(ctx context.Context, request *crm.StagesRemoteFieldClassesListRequest) (*crm.PaginatedRemoteFieldClassList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/stages/remote-field-classes" - - queryParams := make(url.Values) - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeRemoteFields != nil { - queryParams.Add("include_remote_fields", fmt.Sprintf("%v", *request.IncludeRemoteFields)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.IsCommonModelField != nil { - queryParams.Add("is_common_model_field", fmt.Sprintf("%v", *request.IsCommonModelField)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *crm.PaginatedRemoteFieldClassList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) RemoteFieldClassesList( + ctx context.Context, + request *crm.StagesRemoteFieldClassesListRequest, + opts ...option.RequestOption, +) (*core.Page[*crm.RemoteFieldClass], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/stages/remote-field-classes" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *crm.PaginatedRemoteFieldClassList) *internal.PageResponse[*string, *crm.RemoteFieldClass] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *crm.RemoteFieldClass]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } diff --git a/crm/sync_status.go b/crm/sync_status.go index 00cf1a8..5dbf82e 100644 --- a/crm/sync_status.go +++ b/crm/sync_status.go @@ -1,10 +1,78 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package crm +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" +) + type SyncStatusListRequest struct { // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` +} + +type PaginatedSyncStatusList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*SyncStatus `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedSyncStatusList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedSyncStatusList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedSyncStatusList) GetResults() []*SyncStatus { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedSyncStatusList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedSyncStatusList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedSyncStatusList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedSyncStatusList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedSyncStatusList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) } diff --git a/crm/syncstatus/client.go b/crm/syncstatus/client.go index 265061d..0142f15 100644 --- a/crm/syncstatus/client.go +++ b/crm/syncstatus/client.go @@ -1,61 +1,73 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package syncstatus import ( context "context" - fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - crm "github.com/merge-api/merge-go-client/crm" + core "github.com/merge-api/merge-go-client/v2/core" + crm "github.com/merge-api/merge-go-client/v2/crm" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } -// Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). -func (c *Client) List(ctx context.Context, request *crm.SyncStatusListRequest) (*crm.PaginatedSyncStatusList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/sync-status" - - queryParams := make(url.Values) - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) +// Get sync status for the current sync and the most recently finished sync. `last_sync_start` represents the most recent time any sync began. `last_sync_finished` represents the most recent time any sync completed. These timestamps may correspond to different sync instances which may result in a sync start time being later than a separate sync completed time. To ensure you are retrieving the latest available data reference the `last_sync_finished` timestamp where `last_sync_result` is `DONE`. Possible values for `status` and `last_sync_result` are `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). +func (c *Client) List( + ctx context.Context, + request *crm.SyncStatusListRequest, + opts ...option.RequestOption, +) (*crm.PaginatedSyncStatusList, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/sync-status" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *crm.PaginatedSyncStatusList if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/crm/tasks.go b/crm/tasks.go index d491f54..ee0408a 100644 --- a/crm/tasks.go +++ b/crm/tasks.go @@ -1,151 +1,1409 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package crm import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type TaskEndpointRequest struct { // Whether to include debug fields (such as log file links) in the response. - IsDebugMode *bool `json:"-"` + IsDebugMode *bool `json:"-" url:"is_debug_mode,omitempty"` // Whether or not third-party updates should be run asynchronously. - RunAsync *bool `json:"-"` - Model *TaskRequest `json:"model,omitempty"` + RunAsync *bool `json:"-" url:"run_async,omitempty"` + Model *TaskRequest `json:"model,omitempty" url:"-"` } type TasksListRequest struct { // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *TasksListRequestExpand `json:"-"` + Expand []*TasksListRequestExpandItem `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - IncludeRemoteFields *bool `json:"-"` + IncludeRemoteFields *bool `json:"-" url:"include_remote_fields,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` } type PatchedTaskEndpointRequest struct { // Whether to include debug fields (such as log file links) in the response. - IsDebugMode *bool `json:"-"` + IsDebugMode *bool `json:"-" url:"is_debug_mode,omitempty"` // Whether or not third-party updates should be run asynchronously. - RunAsync *bool `json:"-"` - Model *PatchedTaskRequest `json:"model,omitempty"` + RunAsync *bool `json:"-" url:"run_async,omitempty"` + Model *PatchedTaskRequest `json:"model,omitempty" url:"-"` } type TasksRemoteFieldClassesListRequest struct { // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - IncludeRemoteFields *bool `json:"-"` + IncludeRemoteFields *bool `json:"-" url:"include_remote_fields,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, will only return remote field classes with this is_common_model_field value - IsCommonModelField *bool `json:"-"` + IsCommonModelField *bool `json:"-" url:"is_common_model_field,omitempty"` + // If provided, will only return remote fields classes with this is_custom value + IsCustom *bool `json:"-" url:"is_custom,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` } type TasksRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *TasksRetrieveRequestExpand `json:"-"` + Expand []*TasksRetrieveRequestExpandItem `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - IncludeRemoteFields *bool `json:"-"` + IncludeRemoteFields *bool `json:"-" url:"include_remote_fields,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` } -type TasksListRequestExpand string +type TasksListRequestExpandItem string const ( - TasksListRequestExpandAccount TasksListRequestExpand = "account" - TasksListRequestExpandAccountOpportunity TasksListRequestExpand = "account,opportunity" - TasksListRequestExpandOpportunity TasksListRequestExpand = "opportunity" - TasksListRequestExpandOwner TasksListRequestExpand = "owner" - TasksListRequestExpandOwnerAccount TasksListRequestExpand = "owner,account" - TasksListRequestExpandOwnerAccountOpportunity TasksListRequestExpand = "owner,account,opportunity" - TasksListRequestExpandOwnerOpportunity TasksListRequestExpand = "owner,opportunity" + TasksListRequestExpandItemAccount TasksListRequestExpandItem = "account" + TasksListRequestExpandItemOpportunity TasksListRequestExpandItem = "opportunity" + TasksListRequestExpandItemOwner TasksListRequestExpandItem = "owner" ) -func NewTasksListRequestExpandFromString(s string) (TasksListRequestExpand, error) { +func NewTasksListRequestExpandItemFromString(s string) (TasksListRequestExpandItem, error) { switch s { case "account": - return TasksListRequestExpandAccount, nil - case "account,opportunity": - return TasksListRequestExpandAccountOpportunity, nil + return TasksListRequestExpandItemAccount, nil case "opportunity": - return TasksListRequestExpandOpportunity, nil + return TasksListRequestExpandItemOpportunity, nil case "owner": - return TasksListRequestExpandOwner, nil - case "owner,account": - return TasksListRequestExpandOwnerAccount, nil - case "owner,account,opportunity": - return TasksListRequestExpandOwnerAccountOpportunity, nil - case "owner,opportunity": - return TasksListRequestExpandOwnerOpportunity, nil - } - var t TasksListRequestExpand + return TasksListRequestExpandItemOwner, nil + } + var t TasksListRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (t TasksListRequestExpand) Ptr() *TasksListRequestExpand { +func (t TasksListRequestExpandItem) Ptr() *TasksListRequestExpandItem { return &t } -type TasksRetrieveRequestExpand string +type TasksRetrieveRequestExpandItem string const ( - TasksRetrieveRequestExpandAccount TasksRetrieveRequestExpand = "account" - TasksRetrieveRequestExpandAccountOpportunity TasksRetrieveRequestExpand = "account,opportunity" - TasksRetrieveRequestExpandOpportunity TasksRetrieveRequestExpand = "opportunity" - TasksRetrieveRequestExpandOwner TasksRetrieveRequestExpand = "owner" - TasksRetrieveRequestExpandOwnerAccount TasksRetrieveRequestExpand = "owner,account" - TasksRetrieveRequestExpandOwnerAccountOpportunity TasksRetrieveRequestExpand = "owner,account,opportunity" - TasksRetrieveRequestExpandOwnerOpportunity TasksRetrieveRequestExpand = "owner,opportunity" + TasksRetrieveRequestExpandItemAccount TasksRetrieveRequestExpandItem = "account" + TasksRetrieveRequestExpandItemOpportunity TasksRetrieveRequestExpandItem = "opportunity" + TasksRetrieveRequestExpandItemOwner TasksRetrieveRequestExpandItem = "owner" ) -func NewTasksRetrieveRequestExpandFromString(s string) (TasksRetrieveRequestExpand, error) { +func NewTasksRetrieveRequestExpandItemFromString(s string) (TasksRetrieveRequestExpandItem, error) { switch s { case "account": - return TasksRetrieveRequestExpandAccount, nil - case "account,opportunity": - return TasksRetrieveRequestExpandAccountOpportunity, nil + return TasksRetrieveRequestExpandItemAccount, nil case "opportunity": - return TasksRetrieveRequestExpandOpportunity, nil + return TasksRetrieveRequestExpandItemOpportunity, nil case "owner": - return TasksRetrieveRequestExpandOwner, nil - case "owner,account": - return TasksRetrieveRequestExpandOwnerAccount, nil - case "owner,account,opportunity": - return TasksRetrieveRequestExpandOwnerAccountOpportunity, nil - case "owner,opportunity": - return TasksRetrieveRequestExpandOwnerOpportunity, nil - } - var t TasksRetrieveRequestExpand + return TasksRetrieveRequestExpandItemOwner, nil + } + var t TasksRetrieveRequestExpandItem + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (t TasksRetrieveRequestExpandItem) Ptr() *TasksRetrieveRequestExpandItem { + return &t +} + +type PaginatedTaskList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Task `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedTaskList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedTaskList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedTaskList) GetResults() []*Task { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedTaskList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedTaskList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedTaskList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedTaskList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedTaskList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +// # The Task Object +// ### Description +// The `Task` object is used to represent a task, such as a to-do item. +// ### Usage Example +// TODO +type PatchedTaskRequest struct { + // The task's subject. + Subject *string `json:"subject,omitempty" url:"subject,omitempty"` + // The task's content. + Content *string `json:"content,omitempty" url:"content,omitempty"` + // The task's owner. + Owner *string `json:"owner,omitempty" url:"owner,omitempty"` + // The task's account. + Account *string `json:"account,omitempty" url:"account,omitempty"` + // The task's opportunity. + Opportunity *string `json:"opportunity,omitempty" url:"opportunity,omitempty"` + // When the task is completed. + CompletedDate *time.Time `json:"completed_date,omitempty" url:"completed_date,omitempty"` + // When the task is due. + DueDate *time.Time `json:"due_date,omitempty" url:"due_date,omitempty"` + // The task's status. + // + // * `OPEN` - OPEN + // * `CLOSED` - CLOSED + Status *PatchedTaskRequestStatus `json:"status,omitempty" url:"status,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + RemoteFields []*RemoteFieldRequest `json:"remote_fields,omitempty" url:"remote_fields,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PatchedTaskRequest) GetSubject() *string { + if p == nil { + return nil + } + return p.Subject +} + +func (p *PatchedTaskRequest) GetContent() *string { + if p == nil { + return nil + } + return p.Content +} + +func (p *PatchedTaskRequest) GetOwner() *string { + if p == nil { + return nil + } + return p.Owner +} + +func (p *PatchedTaskRequest) GetAccount() *string { + if p == nil { + return nil + } + return p.Account +} + +func (p *PatchedTaskRequest) GetOpportunity() *string { + if p == nil { + return nil + } + return p.Opportunity +} + +func (p *PatchedTaskRequest) GetCompletedDate() *time.Time { + if p == nil { + return nil + } + return p.CompletedDate +} + +func (p *PatchedTaskRequest) GetDueDate() *time.Time { + if p == nil { + return nil + } + return p.DueDate +} + +func (p *PatchedTaskRequest) GetStatus() *PatchedTaskRequestStatus { + if p == nil { + return nil + } + return p.Status +} + +func (p *PatchedTaskRequest) GetIntegrationParams() map[string]interface{} { + if p == nil { + return nil + } + return p.IntegrationParams +} + +func (p *PatchedTaskRequest) GetLinkedAccountParams() map[string]interface{} { + if p == nil { + return nil + } + return p.LinkedAccountParams +} + +func (p *PatchedTaskRequest) GetRemoteFields() []*RemoteFieldRequest { + if p == nil { + return nil + } + return p.RemoteFields +} + +func (p *PatchedTaskRequest) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PatchedTaskRequest) UnmarshalJSON(data []byte) error { + type embed PatchedTaskRequest + var unmarshaler = struct { + embed + CompletedDate *internal.DateTime `json:"completed_date,omitempty"` + DueDate *internal.DateTime `json:"due_date,omitempty"` + }{ + embed: embed(*p), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *p = PatchedTaskRequest(unmarshaler.embed) + p.CompletedDate = unmarshaler.CompletedDate.TimePtr() + p.DueDate = unmarshaler.DueDate.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PatchedTaskRequest) MarshalJSON() ([]byte, error) { + type embed PatchedTaskRequest + var marshaler = struct { + embed + CompletedDate *internal.DateTime `json:"completed_date,omitempty"` + DueDate *internal.DateTime `json:"due_date,omitempty"` + }{ + embed: embed(*p), + CompletedDate: internal.NewOptionalDateTime(p.CompletedDate), + DueDate: internal.NewOptionalDateTime(p.DueDate), + } + return json.Marshal(marshaler) +} + +func (p *PatchedTaskRequest) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +// The task's status. +// +// * `OPEN` - OPEN +// * `CLOSED` - CLOSED +type PatchedTaskRequestStatus struct { + TaskStatusEnum TaskStatusEnum + String string + + typ string +} + +func (p *PatchedTaskRequestStatus) GetTaskStatusEnum() TaskStatusEnum { + if p == nil { + return "" + } + return p.TaskStatusEnum +} + +func (p *PatchedTaskRequestStatus) GetString() string { + if p == nil { + return "" + } + return p.String +} + +func (p *PatchedTaskRequestStatus) UnmarshalJSON(data []byte) error { + var valueTaskStatusEnum TaskStatusEnum + if err := json.Unmarshal(data, &valueTaskStatusEnum); err == nil { + p.typ = "TaskStatusEnum" + p.TaskStatusEnum = valueTaskStatusEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + p.typ = "String" + p.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, p) +} + +func (p PatchedTaskRequestStatus) MarshalJSON() ([]byte, error) { + if p.typ == "TaskStatusEnum" || p.TaskStatusEnum != "" { + return json.Marshal(p.TaskStatusEnum) + } + if p.typ == "String" || p.String != "" { + return json.Marshal(p.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) +} + +type PatchedTaskRequestStatusVisitor interface { + VisitTaskStatusEnum(TaskStatusEnum) error + VisitString(string) error +} + +func (p *PatchedTaskRequestStatus) Accept(visitor PatchedTaskRequestStatusVisitor) error { + if p.typ == "TaskStatusEnum" || p.TaskStatusEnum != "" { + return visitor.VisitTaskStatusEnum(p.TaskStatusEnum) + } + if p.typ == "String" || p.String != "" { + return visitor.VisitString(p.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", p) +} + +// # The Task Object +// ### Description +// The `Task` object is used to represent a task, such as a to-do item. +// ### Usage Example +// TODO +type Task struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The task's subject. + Subject *string `json:"subject,omitempty" url:"subject,omitempty"` + // The task's content. + Content *string `json:"content,omitempty" url:"content,omitempty"` + // The task's owner. + Owner *TaskOwner `json:"owner,omitempty" url:"owner,omitempty"` + // The task's account. + Account *TaskAccount `json:"account,omitempty" url:"account,omitempty"` + // The task's opportunity. + Opportunity *TaskOpportunity `json:"opportunity,omitempty" url:"opportunity,omitempty"` + // When the task is completed. + CompletedDate *time.Time `json:"completed_date,omitempty" url:"completed_date,omitempty"` + // When the task is due. + DueDate *time.Time `json:"due_date,omitempty" url:"due_date,omitempty"` + // The task's status. + // + // * `OPEN` - OPEN + // * `CLOSED` - CLOSED + Status *TaskStatus `json:"status,omitempty" url:"status,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + RemoteFields []*RemoteField `json:"remote_fields,omitempty" url:"remote_fields,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (t *Task) GetId() *string { + if t == nil { + return nil + } + return t.Id +} + +func (t *Task) GetRemoteId() *string { + if t == nil { + return nil + } + return t.RemoteId +} + +func (t *Task) GetCreatedAt() *time.Time { + if t == nil { + return nil + } + return t.CreatedAt +} + +func (t *Task) GetModifiedAt() *time.Time { + if t == nil { + return nil + } + return t.ModifiedAt +} + +func (t *Task) GetSubject() *string { + if t == nil { + return nil + } + return t.Subject +} + +func (t *Task) GetContent() *string { + if t == nil { + return nil + } + return t.Content +} + +func (t *Task) GetOwner() *TaskOwner { + if t == nil { + return nil + } + return t.Owner +} + +func (t *Task) GetAccount() *TaskAccount { + if t == nil { + return nil + } + return t.Account +} + +func (t *Task) GetOpportunity() *TaskOpportunity { + if t == nil { + return nil + } + return t.Opportunity +} + +func (t *Task) GetCompletedDate() *time.Time { + if t == nil { + return nil + } + return t.CompletedDate +} + +func (t *Task) GetDueDate() *time.Time { + if t == nil { + return nil + } + return t.DueDate +} + +func (t *Task) GetStatus() *TaskStatus { + if t == nil { + return nil + } + return t.Status +} + +func (t *Task) GetRemoteWasDeleted() *bool { + if t == nil { + return nil + } + return t.RemoteWasDeleted +} + +func (t *Task) GetFieldMappings() map[string]interface{} { + if t == nil { + return nil + } + return t.FieldMappings +} + +func (t *Task) GetRemoteData() []*RemoteData { + if t == nil { + return nil + } + return t.RemoteData +} + +func (t *Task) GetRemoteFields() []*RemoteField { + if t == nil { + return nil + } + return t.RemoteFields +} + +func (t *Task) GetExtraProperties() map[string]interface{} { + return t.extraProperties +} + +func (t *Task) UnmarshalJSON(data []byte) error { + type embed Task + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + CompletedDate *internal.DateTime `json:"completed_date,omitempty"` + DueDate *internal.DateTime `json:"due_date,omitempty"` + }{ + embed: embed(*t), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *t = Task(unmarshaler.embed) + t.CreatedAt = unmarshaler.CreatedAt.TimePtr() + t.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + t.CompletedDate = unmarshaler.CompletedDate.TimePtr() + t.DueDate = unmarshaler.DueDate.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *t) + if err != nil { + return err + } + t.extraProperties = extraProperties + t.rawJSON = json.RawMessage(data) + return nil +} + +func (t *Task) MarshalJSON() ([]byte, error) { + type embed Task + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + CompletedDate *internal.DateTime `json:"completed_date,omitempty"` + DueDate *internal.DateTime `json:"due_date,omitempty"` + }{ + embed: embed(*t), + CreatedAt: internal.NewOptionalDateTime(t.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(t.ModifiedAt), + CompletedDate: internal.NewOptionalDateTime(t.CompletedDate), + DueDate: internal.NewOptionalDateTime(t.DueDate), + } + return json.Marshal(marshaler) +} + +func (t *Task) String() string { + if len(t.rawJSON) > 0 { + if value, err := internal.StringifyJSON(t.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(t); err == nil { + return value + } + return fmt.Sprintf("%#v", t) +} + +// The task's account. +type TaskAccount struct { + String string + Account *Account + + typ string +} + +func (t *TaskAccount) GetString() string { + if t == nil { + return "" + } + return t.String +} + +func (t *TaskAccount) GetAccount() *Account { + if t == nil { + return nil + } + return t.Account +} + +func (t *TaskAccount) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + t.typ = "String" + t.String = valueString + return nil + } + valueAccount := new(Account) + if err := json.Unmarshal(data, &valueAccount); err == nil { + t.typ = "Account" + t.Account = valueAccount + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, t) +} + +func (t TaskAccount) MarshalJSON() ([]byte, error) { + if t.typ == "String" || t.String != "" { + return json.Marshal(t.String) + } + if t.typ == "Account" || t.Account != nil { + return json.Marshal(t.Account) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) +} + +type TaskAccountVisitor interface { + VisitString(string) error + VisitAccount(*Account) error +} + +func (t *TaskAccount) Accept(visitor TaskAccountVisitor) error { + if t.typ == "String" || t.String != "" { + return visitor.VisitString(t.String) + } + if t.typ == "Account" || t.Account != nil { + return visitor.VisitAccount(t.Account) + } + return fmt.Errorf("type %T does not include a non-empty union type", t) +} + +// The task's opportunity. +type TaskOpportunity struct { + String string + Opportunity *Opportunity + + typ string +} + +func (t *TaskOpportunity) GetString() string { + if t == nil { + return "" + } + return t.String +} + +func (t *TaskOpportunity) GetOpportunity() *Opportunity { + if t == nil { + return nil + } + return t.Opportunity +} + +func (t *TaskOpportunity) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + t.typ = "String" + t.String = valueString + return nil + } + valueOpportunity := new(Opportunity) + if err := json.Unmarshal(data, &valueOpportunity); err == nil { + t.typ = "Opportunity" + t.Opportunity = valueOpportunity + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, t) +} + +func (t TaskOpportunity) MarshalJSON() ([]byte, error) { + if t.typ == "String" || t.String != "" { + return json.Marshal(t.String) + } + if t.typ == "Opportunity" || t.Opportunity != nil { + return json.Marshal(t.Opportunity) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) +} + +type TaskOpportunityVisitor interface { + VisitString(string) error + VisitOpportunity(*Opportunity) error +} + +func (t *TaskOpportunity) Accept(visitor TaskOpportunityVisitor) error { + if t.typ == "String" || t.String != "" { + return visitor.VisitString(t.String) + } + if t.typ == "Opportunity" || t.Opportunity != nil { + return visitor.VisitOpportunity(t.Opportunity) + } + return fmt.Errorf("type %T does not include a non-empty union type", t) +} + +// The task's owner. +type TaskOwner struct { + String string + User *User + + typ string +} + +func (t *TaskOwner) GetString() string { + if t == nil { + return "" + } + return t.String +} + +func (t *TaskOwner) GetUser() *User { + if t == nil { + return nil + } + return t.User +} + +func (t *TaskOwner) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + t.typ = "String" + t.String = valueString + return nil + } + valueUser := new(User) + if err := json.Unmarshal(data, &valueUser); err == nil { + t.typ = "User" + t.User = valueUser + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, t) +} + +func (t TaskOwner) MarshalJSON() ([]byte, error) { + if t.typ == "String" || t.String != "" { + return json.Marshal(t.String) + } + if t.typ == "User" || t.User != nil { + return json.Marshal(t.User) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) +} + +type TaskOwnerVisitor interface { + VisitString(string) error + VisitUser(*User) error +} + +func (t *TaskOwner) Accept(visitor TaskOwnerVisitor) error { + if t.typ == "String" || t.String != "" { + return visitor.VisitString(t.String) + } + if t.typ == "User" || t.User != nil { + return visitor.VisitUser(t.User) + } + return fmt.Errorf("type %T does not include a non-empty union type", t) +} + +// # The Task Object +// ### Description +// The `Task` object is used to represent a task, such as a to-do item. +// ### Usage Example +// TODO +type TaskRequest struct { + // The task's subject. + Subject *string `json:"subject,omitempty" url:"subject,omitempty"` + // The task's content. + Content *string `json:"content,omitempty" url:"content,omitempty"` + // The task's owner. + Owner *TaskRequestOwner `json:"owner,omitempty" url:"owner,omitempty"` + // The task's account. + Account *TaskRequestAccount `json:"account,omitempty" url:"account,omitempty"` + // The task's opportunity. + Opportunity *TaskRequestOpportunity `json:"opportunity,omitempty" url:"opportunity,omitempty"` + // When the task is completed. + CompletedDate *time.Time `json:"completed_date,omitempty" url:"completed_date,omitempty"` + // When the task is due. + DueDate *time.Time `json:"due_date,omitempty" url:"due_date,omitempty"` + // The task's status. + // + // * `OPEN` - OPEN + // * `CLOSED` - CLOSED + Status *TaskRequestStatus `json:"status,omitempty" url:"status,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + RemoteFields []*RemoteFieldRequest `json:"remote_fields,omitempty" url:"remote_fields,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (t *TaskRequest) GetSubject() *string { + if t == nil { + return nil + } + return t.Subject +} + +func (t *TaskRequest) GetContent() *string { + if t == nil { + return nil + } + return t.Content +} + +func (t *TaskRequest) GetOwner() *TaskRequestOwner { + if t == nil { + return nil + } + return t.Owner +} + +func (t *TaskRequest) GetAccount() *TaskRequestAccount { + if t == nil { + return nil + } + return t.Account +} + +func (t *TaskRequest) GetOpportunity() *TaskRequestOpportunity { + if t == nil { + return nil + } + return t.Opportunity +} + +func (t *TaskRequest) GetCompletedDate() *time.Time { + if t == nil { + return nil + } + return t.CompletedDate +} + +func (t *TaskRequest) GetDueDate() *time.Time { + if t == nil { + return nil + } + return t.DueDate +} + +func (t *TaskRequest) GetStatus() *TaskRequestStatus { + if t == nil { + return nil + } + return t.Status +} + +func (t *TaskRequest) GetIntegrationParams() map[string]interface{} { + if t == nil { + return nil + } + return t.IntegrationParams +} + +func (t *TaskRequest) GetLinkedAccountParams() map[string]interface{} { + if t == nil { + return nil + } + return t.LinkedAccountParams +} + +func (t *TaskRequest) GetRemoteFields() []*RemoteFieldRequest { + if t == nil { + return nil + } + return t.RemoteFields +} + +func (t *TaskRequest) GetExtraProperties() map[string]interface{} { + return t.extraProperties +} + +func (t *TaskRequest) UnmarshalJSON(data []byte) error { + type embed TaskRequest + var unmarshaler = struct { + embed + CompletedDate *internal.DateTime `json:"completed_date,omitempty"` + DueDate *internal.DateTime `json:"due_date,omitempty"` + }{ + embed: embed(*t), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *t = TaskRequest(unmarshaler.embed) + t.CompletedDate = unmarshaler.CompletedDate.TimePtr() + t.DueDate = unmarshaler.DueDate.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *t) + if err != nil { + return err + } + t.extraProperties = extraProperties + t.rawJSON = json.RawMessage(data) + return nil +} + +func (t *TaskRequest) MarshalJSON() ([]byte, error) { + type embed TaskRequest + var marshaler = struct { + embed + CompletedDate *internal.DateTime `json:"completed_date,omitempty"` + DueDate *internal.DateTime `json:"due_date,omitempty"` + }{ + embed: embed(*t), + CompletedDate: internal.NewOptionalDateTime(t.CompletedDate), + DueDate: internal.NewOptionalDateTime(t.DueDate), + } + return json.Marshal(marshaler) +} + +func (t *TaskRequest) String() string { + if len(t.rawJSON) > 0 { + if value, err := internal.StringifyJSON(t.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(t); err == nil { + return value + } + return fmt.Sprintf("%#v", t) +} + +// The task's account. +type TaskRequestAccount struct { + String string + Account *Account + + typ string +} + +func (t *TaskRequestAccount) GetString() string { + if t == nil { + return "" + } + return t.String +} + +func (t *TaskRequestAccount) GetAccount() *Account { + if t == nil { + return nil + } + return t.Account +} + +func (t *TaskRequestAccount) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + t.typ = "String" + t.String = valueString + return nil + } + valueAccount := new(Account) + if err := json.Unmarshal(data, &valueAccount); err == nil { + t.typ = "Account" + t.Account = valueAccount + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, t) +} + +func (t TaskRequestAccount) MarshalJSON() ([]byte, error) { + if t.typ == "String" || t.String != "" { + return json.Marshal(t.String) + } + if t.typ == "Account" || t.Account != nil { + return json.Marshal(t.Account) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) +} + +type TaskRequestAccountVisitor interface { + VisitString(string) error + VisitAccount(*Account) error +} + +func (t *TaskRequestAccount) Accept(visitor TaskRequestAccountVisitor) error { + if t.typ == "String" || t.String != "" { + return visitor.VisitString(t.String) + } + if t.typ == "Account" || t.Account != nil { + return visitor.VisitAccount(t.Account) + } + return fmt.Errorf("type %T does not include a non-empty union type", t) +} + +// The task's opportunity. +type TaskRequestOpportunity struct { + String string + Opportunity *Opportunity + + typ string +} + +func (t *TaskRequestOpportunity) GetString() string { + if t == nil { + return "" + } + return t.String +} + +func (t *TaskRequestOpportunity) GetOpportunity() *Opportunity { + if t == nil { + return nil + } + return t.Opportunity +} + +func (t *TaskRequestOpportunity) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + t.typ = "String" + t.String = valueString + return nil + } + valueOpportunity := new(Opportunity) + if err := json.Unmarshal(data, &valueOpportunity); err == nil { + t.typ = "Opportunity" + t.Opportunity = valueOpportunity + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, t) +} + +func (t TaskRequestOpportunity) MarshalJSON() ([]byte, error) { + if t.typ == "String" || t.String != "" { + return json.Marshal(t.String) + } + if t.typ == "Opportunity" || t.Opportunity != nil { + return json.Marshal(t.Opportunity) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) +} + +type TaskRequestOpportunityVisitor interface { + VisitString(string) error + VisitOpportunity(*Opportunity) error +} + +func (t *TaskRequestOpportunity) Accept(visitor TaskRequestOpportunityVisitor) error { + if t.typ == "String" || t.String != "" { + return visitor.VisitString(t.String) + } + if t.typ == "Opportunity" || t.Opportunity != nil { + return visitor.VisitOpportunity(t.Opportunity) + } + return fmt.Errorf("type %T does not include a non-empty union type", t) +} + +// The task's owner. +type TaskRequestOwner struct { + String string + User *User + + typ string +} + +func (t *TaskRequestOwner) GetString() string { + if t == nil { + return "" + } + return t.String +} + +func (t *TaskRequestOwner) GetUser() *User { + if t == nil { + return nil + } + return t.User +} + +func (t *TaskRequestOwner) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + t.typ = "String" + t.String = valueString + return nil + } + valueUser := new(User) + if err := json.Unmarshal(data, &valueUser); err == nil { + t.typ = "User" + t.User = valueUser + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, t) +} + +func (t TaskRequestOwner) MarshalJSON() ([]byte, error) { + if t.typ == "String" || t.String != "" { + return json.Marshal(t.String) + } + if t.typ == "User" || t.User != nil { + return json.Marshal(t.User) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) +} + +type TaskRequestOwnerVisitor interface { + VisitString(string) error + VisitUser(*User) error +} + +func (t *TaskRequestOwner) Accept(visitor TaskRequestOwnerVisitor) error { + if t.typ == "String" || t.String != "" { + return visitor.VisitString(t.String) + } + if t.typ == "User" || t.User != nil { + return visitor.VisitUser(t.User) + } + return fmt.Errorf("type %T does not include a non-empty union type", t) +} + +// The task's status. +// +// * `OPEN` - OPEN +// * `CLOSED` - CLOSED +type TaskRequestStatus struct { + TaskStatusEnum TaskStatusEnum + String string + + typ string +} + +func (t *TaskRequestStatus) GetTaskStatusEnum() TaskStatusEnum { + if t == nil { + return "" + } + return t.TaskStatusEnum +} + +func (t *TaskRequestStatus) GetString() string { + if t == nil { + return "" + } + return t.String +} + +func (t *TaskRequestStatus) UnmarshalJSON(data []byte) error { + var valueTaskStatusEnum TaskStatusEnum + if err := json.Unmarshal(data, &valueTaskStatusEnum); err == nil { + t.typ = "TaskStatusEnum" + t.TaskStatusEnum = valueTaskStatusEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + t.typ = "String" + t.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, t) +} + +func (t TaskRequestStatus) MarshalJSON() ([]byte, error) { + if t.typ == "TaskStatusEnum" || t.TaskStatusEnum != "" { + return json.Marshal(t.TaskStatusEnum) + } + if t.typ == "String" || t.String != "" { + return json.Marshal(t.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) +} + +type TaskRequestStatusVisitor interface { + VisitTaskStatusEnum(TaskStatusEnum) error + VisitString(string) error +} + +func (t *TaskRequestStatus) Accept(visitor TaskRequestStatusVisitor) error { + if t.typ == "TaskStatusEnum" || t.TaskStatusEnum != "" { + return visitor.VisitTaskStatusEnum(t.TaskStatusEnum) + } + if t.typ == "String" || t.String != "" { + return visitor.VisitString(t.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", t) +} + +type TaskResponse struct { + Model *Task `json:"model" url:"model"` + Warnings []*WarningValidationProblem `json:"warnings" url:"warnings"` + Errors []*ErrorValidationProblem `json:"errors" url:"errors"` + Logs []*DebugModeLog `json:"logs,omitempty" url:"logs,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (t *TaskResponse) GetModel() *Task { + if t == nil { + return nil + } + return t.Model +} + +func (t *TaskResponse) GetWarnings() []*WarningValidationProblem { + if t == nil { + return nil + } + return t.Warnings +} + +func (t *TaskResponse) GetErrors() []*ErrorValidationProblem { + if t == nil { + return nil + } + return t.Errors +} + +func (t *TaskResponse) GetLogs() []*DebugModeLog { + if t == nil { + return nil + } + return t.Logs +} + +func (t *TaskResponse) GetExtraProperties() map[string]interface{} { + return t.extraProperties +} + +func (t *TaskResponse) UnmarshalJSON(data []byte) error { + type unmarshaler TaskResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *t = TaskResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *t) + if err != nil { + return err + } + t.extraProperties = extraProperties + t.rawJSON = json.RawMessage(data) + return nil +} + +func (t *TaskResponse) String() string { + if len(t.rawJSON) > 0 { + if value, err := internal.StringifyJSON(t.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(t); err == nil { + return value + } + return fmt.Sprintf("%#v", t) +} + +// The task's status. +// +// * `OPEN` - OPEN +// * `CLOSED` - CLOSED +type TaskStatus struct { + TaskStatusEnum TaskStatusEnum + String string + + typ string +} + +func (t *TaskStatus) GetTaskStatusEnum() TaskStatusEnum { + if t == nil { + return "" + } + return t.TaskStatusEnum +} + +func (t *TaskStatus) GetString() string { + if t == nil { + return "" + } + return t.String +} + +func (t *TaskStatus) UnmarshalJSON(data []byte) error { + var valueTaskStatusEnum TaskStatusEnum + if err := json.Unmarshal(data, &valueTaskStatusEnum); err == nil { + t.typ = "TaskStatusEnum" + t.TaskStatusEnum = valueTaskStatusEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + t.typ = "String" + t.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, t) +} + +func (t TaskStatus) MarshalJSON() ([]byte, error) { + if t.typ == "TaskStatusEnum" || t.TaskStatusEnum != "" { + return json.Marshal(t.TaskStatusEnum) + } + if t.typ == "String" || t.String != "" { + return json.Marshal(t.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) +} + +type TaskStatusVisitor interface { + VisitTaskStatusEnum(TaskStatusEnum) error + VisitString(string) error +} + +func (t *TaskStatus) Accept(visitor TaskStatusVisitor) error { + if t.typ == "TaskStatusEnum" || t.TaskStatusEnum != "" { + return visitor.VisitTaskStatusEnum(t.TaskStatusEnum) + } + if t.typ == "String" || t.String != "" { + return visitor.VisitString(t.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", t) +} + +// * `OPEN` - OPEN +// * `CLOSED` - CLOSED +type TaskStatusEnum string + +const ( + TaskStatusEnumOpen TaskStatusEnum = "OPEN" + TaskStatusEnumClosed TaskStatusEnum = "CLOSED" +) + +func NewTaskStatusEnumFromString(s string) (TaskStatusEnum, error) { + switch s { + case "OPEN": + return TaskStatusEnumOpen, nil + case "CLOSED": + return TaskStatusEnumClosed, nil + } + var t TaskStatusEnum return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (t TasksRetrieveRequestExpand) Ptr() *TasksRetrieveRequestExpand { +func (t TaskStatusEnum) Ptr() *TaskStatusEnum { return &t } diff --git a/crm/tasks/client.go b/crm/tasks/client.go index 8230021..41ebaf4 100644 --- a/crm/tasks/client.go +++ b/crm/tasks/client.go @@ -1,127 +1,135 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package tasks import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - crm "github.com/merge-api/merge-go-client/crm" + core "github.com/merge-api/merge-go-client/v2/core" + crm "github.com/merge-api/merge-go-client/v2/crm" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `Task` objects. -func (c *Client) List(ctx context.Context, request *crm.TasksListRequest) (*crm.PaginatedTaskList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/tasks" - - queryParams := make(url.Values) - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeRemoteFields != nil { - queryParams.Add("include_remote_fields", fmt.Sprintf("%v", *request.IncludeRemoteFields)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *crm.PaginatedTaskList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *crm.TasksListRequest, + opts ...option.RequestOption, +) (*core.Page[*crm.Task], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/tasks" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *crm.PaginatedTaskList) *internal.PageResponse[*string, *crm.Task] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *crm.Task]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Creates a `Task` object with the given values. -func (c *Client) Create(ctx context.Context, request *crm.TaskEndpointRequest) (*crm.TaskResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/tasks" - - queryParams := make(url.Values) - if request.IsDebugMode != nil { - queryParams.Add("is_debug_mode", fmt.Sprintf("%v", *request.IsDebugMode)) - } - if request.RunAsync != nil { - queryParams.Add("run_async", fmt.Sprintf("%v", *request.RunAsync)) +func (c *Client) Create( + ctx context.Context, + request *crm.TaskEndpointRequest, + opts ...option.RequestOption, +) (*crm.TaskResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/tasks" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *crm.TaskResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -130,35 +138,46 @@ func (c *Client) Create(ctx context.Context, request *crm.TaskEndpointRequest) ( } // Returns a `Task` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *crm.TasksRetrieveRequest) (*crm.Task, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"crm/v1/tasks/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeRemoteFields != nil { - queryParams.Add("include_remote_fields", fmt.Sprintf("%v", *request.IncludeRemoteFields)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *crm.TasksRetrieveRequest, + opts ...option.RequestOption, +) (*crm.Task, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/crm/v1/tasks/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *crm.Task if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -167,33 +186,48 @@ func (c *Client) Retrieve(ctx context.Context, id string, request *crm.TasksRetr } // Updates a `Task` object with the given `id`. -func (c *Client) PartialUpdate(ctx context.Context, id string, request *crm.PatchedTaskEndpointRequest) (*crm.TaskResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"crm/v1/tasks/%v", id) - - queryParams := make(url.Values) - if request.IsDebugMode != nil { - queryParams.Add("is_debug_mode", fmt.Sprintf("%v", *request.IsDebugMode)) - } - if request.RunAsync != nil { - queryParams.Add("run_async", fmt.Sprintf("%v", *request.RunAsync)) +func (c *Client) PartialUpdate( + ctx context.Context, + id string, + request *crm.PatchedTaskEndpointRequest, + opts ...option.RequestOption, +) (*crm.TaskResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/crm/v1/tasks/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *crm.TaskResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPatch, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPatch, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -202,21 +236,38 @@ func (c *Client) PartialUpdate(ctx context.Context, id string, request *crm.Patc } // Returns metadata for `Task` PATCHs. -func (c *Client) MetaPatchRetrieve(ctx context.Context, id string) (*crm.MetaResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"crm/v1/tasks/meta/patch/%v", id) +func (c *Client) MetaPatchRetrieve( + ctx context.Context, + id string, + opts ...option.RequestOption, +) (*crm.MetaResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/crm/v1/tasks/meta/patch/%v", + id, + ) + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *crm.MetaResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -225,21 +276,34 @@ func (c *Client) MetaPatchRetrieve(ctx context.Context, id string) (*crm.MetaRes } // Returns metadata for `Task` POSTs. -func (c *Client) MetaPostRetrieve(ctx context.Context) (*crm.MetaResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/tasks/meta/post" +func (c *Client) MetaPostRetrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*crm.MetaResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/tasks/meta/post" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *crm.MetaResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -248,50 +312,60 @@ func (c *Client) MetaPostRetrieve(ctx context.Context) (*crm.MetaResponse, error } // Returns a list of `RemoteFieldClass` objects. -func (c *Client) RemoteFieldClassesList(ctx context.Context, request *crm.TasksRemoteFieldClassesListRequest) (*crm.PaginatedRemoteFieldClassList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/tasks/remote-field-classes" - - queryParams := make(url.Values) - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeRemoteFields != nil { - queryParams.Add("include_remote_fields", fmt.Sprintf("%v", *request.IncludeRemoteFields)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.IsCommonModelField != nil { - queryParams.Add("is_common_model_field", fmt.Sprintf("%v", *request.IsCommonModelField)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *crm.PaginatedRemoteFieldClassList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) RemoteFieldClassesList( + ctx context.Context, + request *crm.TasksRemoteFieldClassesListRequest, + opts ...option.RequestOption, +) (*core.Page[*crm.RemoteFieldClass], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/tasks/remote-field-classes" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *crm.PaginatedRemoteFieldClassList) *internal.PageResponse[*string, *crm.RemoteFieldClass] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *crm.RemoteFieldClass]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } diff --git a/crm/types.go b/crm/types.go index e9900da..f4d9a30 100644 --- a/crm/types.go +++ b/crm/types.go @@ -1,496 +1,449 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package crm import ( json "encoding/json" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) // # The Account Object -// // ### Description -// // The `Account` object is used to represent a company in a CRM system. -// // ### Usage Example -// // TODO type Account struct { - Id *string `json:"id,omitempty"` + Id *string `json:"id,omitempty" url:"id,omitempty"` // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` // The account's owner. - Owner *AccountOwner `json:"owner,omitempty"` + Owner *AccountOwner `json:"owner,omitempty" url:"owner,omitempty"` // The account's name. - Name *string `json:"name,omitempty"` + Name *string `json:"name,omitempty" url:"name,omitempty"` // The account's description. - Description *string `json:"description,omitempty"` + Description *string `json:"description,omitempty" url:"description,omitempty"` // The account's industry. - Industry *string `json:"industry,omitempty"` + Industry *string `json:"industry,omitempty" url:"industry,omitempty"` // The account's website. - Website *string `json:"website,omitempty"` + Website *string `json:"website,omitempty" url:"website,omitempty"` // The account's number of employees. - NumberOfEmployees *int `json:"number_of_employees,omitempty"` - Addresses []*Address `json:"addresses,omitempty"` - PhoneNumbers []*PhoneNumber `json:"phone_numbers,omitempty"` + NumberOfEmployees *int `json:"number_of_employees,omitempty" url:"number_of_employees,omitempty"` + Addresses []*Address `json:"addresses,omitempty" url:"addresses,omitempty"` + PhoneNumbers []*PhoneNumber `json:"phone_numbers,omitempty" url:"phone_numbers,omitempty"` // The last date (either most recent or furthest in the future) of when an activity occurs in an account. - LastActivityAt *time.Time `json:"last_activity_at,omitempty"` + LastActivityAt *time.Time `json:"last_activity_at,omitempty" url:"last_activity_at,omitempty"` // When the CRM system account data was last modified by a user with a login. - RemoteUpdatedAt *time.Time `json:"remote_updated_at,omitempty"` + RemoteUpdatedAt *time.Time `json:"remote_updated_at,omitempty" url:"remote_updated_at,omitempty"` // When the third party's account was created. - RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty"` + RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty" url:"remote_created_at,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` - RemoteFields []*RemoteField `json:"remote_fields,omitempty"` + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + RemoteFields []*RemoteField `json:"remote_fields,omitempty" url:"remote_fields,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (a *Account) UnmarshalJSON(data []byte) error { - type unmarshaler Account - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (a *Account) GetId() *string { + if a == nil { + return nil } - *a = Account(value) - a._rawJSON = json.RawMessage(data) - return nil + return a.Id } -func (a *Account) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } +func (a *Account) GetRemoteId() *string { + if a == nil { + return nil } - if value, err := core.StringifyJSON(a); err == nil { - return value + return a.RemoteId +} + +func (a *Account) GetCreatedAt() *time.Time { + if a == nil { + return nil } - return fmt.Sprintf("%#v", a) + return a.CreatedAt } -type AccountDetails struct { - Id *string `json:"id,omitempty"` - Integration *string `json:"integration,omitempty"` - IntegrationSlug *string `json:"integration_slug,omitempty"` - Category *CategoryEnum `json:"category,omitempty"` - EndUserOriginId *string `json:"end_user_origin_id,omitempty"` - EndUserOrganizationName *string `json:"end_user_organization_name,omitempty"` - EndUserEmailAddress *string `json:"end_user_email_address,omitempty"` - Status *string `json:"status,omitempty"` - WebhookListenerUrl *string `json:"webhook_listener_url,omitempty"` - // 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. - IsDuplicate *bool `json:"is_duplicate,omitempty"` - AccountType *string `json:"account_type,omitempty"` - // The time at which account completes the linking flow. - CompletedAt *time.Time `json:"completed_at,omitempty"` +func (a *Account) GetModifiedAt() *time.Time { + if a == nil { + return nil + } + return a.ModifiedAt +} - _rawJSON json.RawMessage +func (a *Account) GetOwner() *AccountOwner { + if a == nil { + return nil + } + return a.Owner } -func (a *AccountDetails) UnmarshalJSON(data []byte) error { - type unmarshaler AccountDetails - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (a *Account) GetName() *string { + if a == nil { + return nil } - *a = AccountDetails(value) - a._rawJSON = json.RawMessage(data) - return nil + return a.Name } -func (a *AccountDetails) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } +func (a *Account) GetDescription() *string { + if a == nil { + return nil } - if value, err := core.StringifyJSON(a); err == nil { - return value + return a.Description +} + +func (a *Account) GetIndustry() *string { + if a == nil { + return nil } - return fmt.Sprintf("%#v", a) + return a.Industry } -// # The LinkedAccount Object -// -// ### Description -// -// The `LinkedAccount` object is used to represent an end user's link with a specific integration. -// -// ### Usage Example -// -// View a list of your organization's `LinkedAccount` objects. -type AccountDetailsAndActions struct { - Id string `json:"id"` - Category *CategoryEnum `json:"category,omitempty"` - Status AccountDetailsAndActionsStatusEnum `json:"status,omitempty"` - StatusDetail *string `json:"status_detail,omitempty"` - EndUserOriginId *string `json:"end_user_origin_id,omitempty"` - EndUserOrganizationName string `json:"end_user_organization_name"` - EndUserEmailAddress string `json:"end_user_email_address"` - // The tenant or domain the customer has provided access to. - Subdomain *string `json:"subdomain,omitempty"` - WebhookListenerUrl string `json:"webhook_listener_url"` - // 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. - IsDuplicate *bool `json:"is_duplicate,omitempty"` - Integration *AccountDetailsAndActionsIntegration `json:"integration,omitempty"` - AccountType string `json:"account_type"` - CompletedAt time.Time `json:"completed_at"` - - _rawJSON json.RawMessage -} - -func (a *AccountDetailsAndActions) UnmarshalJSON(data []byte) error { - type unmarshaler AccountDetailsAndActions - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (a *Account) GetWebsite() *string { + if a == nil { + return nil } - *a = AccountDetailsAndActions(value) - a._rawJSON = json.RawMessage(data) - return nil + return a.Website } -func (a *AccountDetailsAndActions) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } +func (a *Account) GetNumberOfEmployees() *int { + if a == nil { + return nil } - if value, err := core.StringifyJSON(a); err == nil { - return value + return a.NumberOfEmployees +} + +func (a *Account) GetAddresses() []*Address { + if a == nil { + return nil } - return fmt.Sprintf("%#v", a) + return a.Addresses } -type AccountDetailsAndActionsIntegration struct { - Name string `json:"name"` - Categories []CategoriesEnum `json:"categories,omitempty"` - Image *string `json:"image,omitempty"` - SquareImage *string `json:"square_image,omitempty"` - Color string `json:"color"` - Slug string `json:"slug"` - PassthroughAvailable bool `json:"passthrough_available"` - AvailableModelOperations []*ModelOperation `json:"available_model_operations,omitempty"` +func (a *Account) GetPhoneNumbers() []*PhoneNumber { + if a == nil { + return nil + } + return a.PhoneNumbers +} - _rawJSON json.RawMessage +func (a *Account) GetLastActivityAt() *time.Time { + if a == nil { + return nil + } + return a.LastActivityAt } -func (a *AccountDetailsAndActionsIntegration) UnmarshalJSON(data []byte) error { - type unmarshaler AccountDetailsAndActionsIntegration - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (a *Account) GetRemoteUpdatedAt() *time.Time { + if a == nil { + return nil } - *a = AccountDetailsAndActionsIntegration(value) - a._rawJSON = json.RawMessage(data) - return nil + return a.RemoteUpdatedAt } -func (a *AccountDetailsAndActionsIntegration) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } +func (a *Account) GetRemoteCreatedAt() *time.Time { + if a == nil { + return nil } - if value, err := core.StringifyJSON(a); err == nil { - return value + return a.RemoteCreatedAt +} + +func (a *Account) GetRemoteWasDeleted() *bool { + if a == nil { + return nil } - return fmt.Sprintf("%#v", a) + return a.RemoteWasDeleted } -// - `COMPLETE` - COMPLETE -// - `INCOMPLETE` - INCOMPLETE -// - `RELINK_NEEDED` - RELINK_NEEDED -// - `IDLE` - IDLE -type AccountDetailsAndActionsStatusEnum string +func (a *Account) GetFieldMappings() map[string]interface{} { + if a == nil { + return nil + } + return a.FieldMappings +} -const ( - AccountDetailsAndActionsStatusEnumComplete AccountDetailsAndActionsStatusEnum = "COMPLETE" - AccountDetailsAndActionsStatusEnumIncomplete AccountDetailsAndActionsStatusEnum = "INCOMPLETE" - AccountDetailsAndActionsStatusEnumRelinkNeeded AccountDetailsAndActionsStatusEnum = "RELINK_NEEDED" - AccountDetailsAndActionsStatusEnumIdle AccountDetailsAndActionsStatusEnum = "IDLE" -) +func (a *Account) GetRemoteData() []*RemoteData { + if a == nil { + return nil + } + return a.RemoteData +} -func NewAccountDetailsAndActionsStatusEnumFromString(s string) (AccountDetailsAndActionsStatusEnum, error) { - switch s { - case "COMPLETE": - return AccountDetailsAndActionsStatusEnumComplete, nil - case "INCOMPLETE": - return AccountDetailsAndActionsStatusEnumIncomplete, nil - case "RELINK_NEEDED": - return AccountDetailsAndActionsStatusEnumRelinkNeeded, nil - case "IDLE": - return AccountDetailsAndActionsStatusEnumIdle, nil - } - var t AccountDetailsAndActionsStatusEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) +func (a *Account) GetRemoteFields() []*RemoteField { + if a == nil { + return nil + } + return a.RemoteFields } -func (a AccountDetailsAndActionsStatusEnum) Ptr() *AccountDetailsAndActionsStatusEnum { - return &a +func (a *Account) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *Account) UnmarshalJSON(data []byte) error { + type embed Account + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + LastActivityAt *internal.DateTime `json:"last_activity_at,omitempty"` + RemoteUpdatedAt *internal.DateTime `json:"remote_updated_at,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + }{ + embed: embed(*a), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *a = Account(unmarshaler.embed) + a.CreatedAt = unmarshaler.CreatedAt.TimePtr() + a.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + a.LastActivityAt = unmarshaler.LastActivityAt.TimePtr() + a.RemoteUpdatedAt = unmarshaler.RemoteUpdatedAt.TimePtr() + a.RemoteCreatedAt = unmarshaler.RemoteCreatedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *Account) MarshalJSON() ([]byte, error) { + type embed Account + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + LastActivityAt *internal.DateTime `json:"last_activity_at,omitempty"` + RemoteUpdatedAt *internal.DateTime `json:"remote_updated_at,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + }{ + embed: embed(*a), + CreatedAt: internal.NewOptionalDateTime(a.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(a.ModifiedAt), + LastActivityAt: internal.NewOptionalDateTime(a.LastActivityAt), + RemoteUpdatedAt: internal.NewOptionalDateTime(a.RemoteUpdatedAt), + RemoteCreatedAt: internal.NewOptionalDateTime(a.RemoteCreatedAt), + } + return json.Marshal(marshaler) +} + +func (a *Account) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) } type AccountIntegration struct { // Company name. - Name string `json:"name"` + Name string `json:"name" url:"name"` // Optional. This shortened name appears in places with limited space, usually in conjunction with the platform's logo (e.g., Merge Link menu).

Example: Workforce Now (in lieu of ADP Workforce Now), SuccessFactors (in lieu of SAP SuccessFactors) - AbbreviatedName *string `json:"abbreviated_name,omitempty"` + AbbreviatedName *string `json:"abbreviated_name,omitempty" url:"abbreviated_name,omitempty"` // Category or categories this integration belongs to. Multiple categories should be comma separated, i.e. [ats, hris]. - Categories []CategoriesEnum `json:"categories,omitempty"` + Categories []CategoriesEnum `json:"categories,omitempty" url:"categories,omitempty"` // Company logo in rectangular shape. - Image *string `json:"image,omitempty"` + Image *string `json:"image,omitempty" url:"image,omitempty"` // Company logo in square shape. - SquareImage *string `json:"square_image,omitempty"` + SquareImage *string `json:"square_image,omitempty" url:"square_image,omitempty"` // The color of this integration used for buttons and text throughout the app and landing pages. Choose a darker, saturated color. - Color *string `json:"color,omitempty"` - Slug *string `json:"slug,omitempty"` + Color *string `json:"color,omitempty" url:"color,omitempty"` + Slug *string `json:"slug,omitempty" url:"slug,omitempty"` // Mapping of API endpoints to documentation urls for support. Example: {'GET': [['/common-model-scopes', 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], 'POST': []} - ApiEndpointsToDocumentationUrls map[string]interface{} `json:"api_endpoints_to_documentation_urls,omitempty"` + ApiEndpointsToDocumentationUrls map[string]interface{} `json:"api_endpoints_to_documentation_urls,omitempty" url:"api_endpoints_to_documentation_urls,omitempty"` // Setup guide URL for third party webhook creation. Exposed in Merge Docs. - WebhookSetupGuideUrl *string `json:"webhook_setup_guide_url,omitempty"` + WebhookSetupGuideUrl *string `json:"webhook_setup_guide_url,omitempty" url:"webhook_setup_guide_url,omitempty"` // Category or categories this integration is in beta status for. - CategoryBetaStatus map[string]interface{} `json:"category_beta_status,omitempty"` + CategoryBetaStatus map[string]interface{} `json:"category_beta_status,omitempty" url:"category_beta_status,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (a *AccountIntegration) UnmarshalJSON(data []byte) error { - type unmarshaler AccountIntegration - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (a *AccountIntegration) GetName() string { + if a == nil { + return "" } - *a = AccountIntegration(value) - a._rawJSON = json.RawMessage(data) - return nil + return a.Name } -func (a *AccountIntegration) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(a); err == nil { - return value +func (a *AccountIntegration) GetAbbreviatedName() *string { + if a == nil { + return nil } - return fmt.Sprintf("%#v", a) + return a.AbbreviatedName } -// The account's owner. -type AccountOwner struct { - typeName string - String string - User *User +func (a *AccountIntegration) GetCategories() []CategoriesEnum { + if a == nil { + return nil + } + return a.Categories } -func NewAccountOwnerFromString(value string) *AccountOwner { - return &AccountOwner{typeName: "string", String: value} +func (a *AccountIntegration) GetImage() *string { + if a == nil { + return nil + } + return a.Image } -func NewAccountOwnerFromUser(value *User) *AccountOwner { - return &AccountOwner{typeName: "user", User: value} +func (a *AccountIntegration) GetSquareImage() *string { + if a == nil { + return nil + } + return a.SquareImage } -func (a *AccountOwner) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" - a.String = valueString +func (a *AccountIntegration) GetColor() *string { + if a == nil { return nil } - valueUser := new(User) - if err := json.Unmarshal(data, &valueUser); err == nil { - a.typeName = "user" - a.User = valueUser + return a.Color +} + +func (a *AccountIntegration) GetSlug() *string { + if a == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, a) + return a.Slug } -func (a AccountOwner) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "string": - return json.Marshal(a.String) - case "user": - return json.Marshal(a.User) +func (a *AccountIntegration) GetApiEndpointsToDocumentationUrls() map[string]interface{} { + if a == nil { + return nil } + return a.ApiEndpointsToDocumentationUrls } -type AccountOwnerVisitor interface { - VisitString(string) error - VisitUser(*User) error +func (a *AccountIntegration) GetWebhookSetupGuideUrl() *string { + if a == nil { + return nil + } + return a.WebhookSetupGuideUrl } -func (a *AccountOwner) Accept(visitor AccountOwnerVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "string": - return visitor.VisitString(a.String) - case "user": - return visitor.VisitUser(a.User) +func (a *AccountIntegration) GetCategoryBetaStatus() map[string]interface{} { + if a == nil { + return nil } + return a.CategoryBetaStatus } -// # The Account Object -// -// ### Description -// -// The `Account` object is used to represent a company in a CRM system. -// -// ### Usage Example -// -// TODO -type AccountRequest struct { - // The account's owner. - Owner *AccountRequestOwner `json:"owner,omitempty"` - // The account's name. - Name *string `json:"name,omitempty"` - // The account's description. - Description *string `json:"description,omitempty"` - // The account's industry. - Industry *string `json:"industry,omitempty"` - // The account's website. - Website *string `json:"website,omitempty"` - // The account's number of employees. - NumberOfEmployees *int `json:"number_of_employees,omitempty"` - Addresses []*AddressRequest `json:"addresses,omitempty"` - // The last date (either most recent or furthest in the future) of when an activity occurs in an account. - LastActivityAt *time.Time `json:"last_activity_at,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` - RemoteFields []*RemoteFieldRequest `json:"remote_fields,omitempty"` - - _rawJSON json.RawMessage +func (a *AccountIntegration) GetExtraProperties() map[string]interface{} { + return a.extraProperties } -func (a *AccountRequest) UnmarshalJSON(data []byte) error { - type unmarshaler AccountRequest +func (a *AccountIntegration) UnmarshalJSON(data []byte) error { + type unmarshaler AccountIntegration var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *a = AccountRequest(value) - a._rawJSON = json.RawMessage(data) + *a = AccountIntegration(value) + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) return nil } -func (a *AccountRequest) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { +func (a *AccountIntegration) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(a); err == nil { + if value, err := internal.StringifyJSON(a); err == nil { return value } return fmt.Sprintf("%#v", a) } // The account's owner. -type AccountRequestOwner struct { - typeName string - String string - User *User +type AccountOwner struct { + String string + User *User + + typ string } -func NewAccountRequestOwnerFromString(value string) *AccountRequestOwner { - return &AccountRequestOwner{typeName: "string", String: value} +func (a *AccountOwner) GetString() string { + if a == nil { + return "" + } + return a.String } -func NewAccountRequestOwnerFromUser(value *User) *AccountRequestOwner { - return &AccountRequestOwner{typeName: "user", User: value} +func (a *AccountOwner) GetUser() *User { + if a == nil { + return nil + } + return a.User } -func (a *AccountRequestOwner) UnmarshalJSON(data []byte) error { +func (a *AccountOwner) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" + a.typ = "String" a.String = valueString return nil } valueUser := new(User) if err := json.Unmarshal(data, &valueUser); err == nil { - a.typeName = "user" + a.typ = "User" a.User = valueUser return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, a) } -func (a AccountRequestOwner) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "string": +func (a AccountOwner) MarshalJSON() ([]byte, error) { + if a.typ == "String" || a.String != "" { return json.Marshal(a.String) - case "user": + } + if a.typ == "User" || a.User != nil { return json.Marshal(a.User) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) } -type AccountRequestOwnerVisitor interface { +type AccountOwnerVisitor interface { VisitString(string) error VisitUser(*User) error } -func (a *AccountRequestOwner) Accept(visitor AccountRequestOwnerVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "string": +func (a *AccountOwner) Accept(visitor AccountOwnerVisitor) error { + if a.typ == "String" || a.String != "" { return visitor.VisitString(a.String) - case "user": - return visitor.VisitUser(a.User) - } -} - -type AccountToken struct { - AccountToken string `json:"account_token"` - Integration *AccountIntegration `json:"integration,omitempty"` - - _rawJSON json.RawMessage -} - -func (a *AccountToken) UnmarshalJSON(data []byte) error { - type unmarshaler AccountToken - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *a = AccountToken(value) - a._rawJSON = json.RawMessage(data) - return nil -} - -func (a *AccountToken) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } } - if value, err := core.StringifyJSON(a); err == nil { - return value + if a.typ == "User" || a.User != nil { + return visitor.VisitUser(a.User) } - return fmt.Sprintf("%#v", a) + return fmt.Errorf("type %T does not include a non-empty union type", a) } -// - `CALL` - CALL -// - `MEETING` - MEETING -// - `EMAIL` - EMAIL +// * `CALL` - CALL +// * `MEETING` - MEETING +// * `EMAIL` - EMAIL type ActivityTypeEnum string const ( @@ -517,649 +470,752 @@ func (a ActivityTypeEnum) Ptr() *ActivityTypeEnum { } // # The Address Object -// // ### Description -// // The `Address` object is used to represent an entity's address. -// // ### Usage Example -// // TODO type Address struct { // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` // Line 1 of the address's street. - Street1 *string `json:"street_1,omitempty"` + Street1 *string `json:"street_1,omitempty" url:"street_1,omitempty"` // Line 2 of the address's street. - Street2 *string `json:"street_2,omitempty"` + Street2 *string `json:"street_2,omitempty" url:"street_2,omitempty"` // The address's city. - City *string `json:"city,omitempty"` + City *string `json:"city,omitempty" url:"city,omitempty"` // The address's state. - State *string `json:"state,omitempty"` + State *string `json:"state,omitempty" url:"state,omitempty"` // The address's postal code. - PostalCode *string `json:"postal_code,omitempty"` + PostalCode *string `json:"postal_code,omitempty" url:"postal_code,omitempty"` // The address's country. // - // - `AF` - Afghanistan - // - `AX` - Åland Islands - // - `AL` - Albania - // - `DZ` - Algeria - // - `AS` - American Samoa - // - `AD` - Andorra - // - `AO` - Angola - // - `AI` - Anguilla - // - `AQ` - Antarctica - // - `AG` - Antigua and Barbuda - // - `AR` - Argentina - // - `AM` - Armenia - // - `AW` - Aruba - // - `AU` - Australia - // - `AT` - Austria - // - `AZ` - Azerbaijan - // - `BS` - Bahamas - // - `BH` - Bahrain - // - `BD` - Bangladesh - // - `BB` - Barbados - // - `BY` - Belarus - // - `BE` - Belgium - // - `BZ` - Belize - // - `BJ` - Benin - // - `BM` - Bermuda - // - `BT` - Bhutan - // - `BO` - Bolivia - // - `BQ` - Bonaire, Sint Eustatius and Saba - // - `BA` - Bosnia and Herzegovina - // - `BW` - Botswana - // - `BV` - Bouvet Island - // - `BR` - Brazil - // - `IO` - British Indian Ocean Territory - // - `BN` - Brunei - // - `BG` - Bulgaria - // - `BF` - Burkina Faso - // - `BI` - Burundi - // - `CV` - Cabo Verde - // - `KH` - Cambodia - // - `CM` - Cameroon - // - `CA` - Canada - // - `KY` - Cayman Islands - // - `CF` - Central African Republic - // - `TD` - Chad - // - `CL` - Chile - // - `CN` - China - // - `CX` - Christmas Island - // - `CC` - Cocos (Keeling) Islands - // - `CO` - Colombia - // - `KM` - Comoros - // - `CG` - Congo - // - `CD` - Congo (the Democratic Republic of the) - // - `CK` - Cook Islands - // - `CR` - Costa Rica - // - `CI` - Côte d'Ivoire - // - `HR` - Croatia - // - `CU` - Cuba - // - `CW` - Curaçao - // - `CY` - Cyprus - // - `CZ` - Czechia - // - `DK` - Denmark - // - `DJ` - Djibouti - // - `DM` - Dominica - // - `DO` - Dominican Republic - // - `EC` - Ecuador - // - `EG` - Egypt - // - `SV` - El Salvador - // - `GQ` - Equatorial Guinea - // - `ER` - Eritrea - // - `EE` - Estonia - // - `SZ` - Eswatini - // - `ET` - Ethiopia - // - `FK` - Falkland Islands (Malvinas) - // - `FO` - Faroe Islands - // - `FJ` - Fiji - // - `FI` - Finland - // - `FR` - France - // - `GF` - French Guiana - // - `PF` - French Polynesia - // - `TF` - French Southern Territories - // - `GA` - Gabon - // - `GM` - Gambia - // - `GE` - Georgia - // - `DE` - Germany - // - `GH` - Ghana - // - `GI` - Gibraltar - // - `GR` - Greece - // - `GL` - Greenland - // - `GD` - Grenada - // - `GP` - Guadeloupe - // - `GU` - Guam - // - `GT` - Guatemala - // - `GG` - Guernsey - // - `GN` - Guinea - // - `GW` - Guinea-Bissau - // - `GY` - Guyana - // - `HT` - Haiti - // - `HM` - Heard Island and McDonald Islands - // - `VA` - Holy See - // - `HN` - Honduras - // - `HK` - Hong Kong - // - `HU` - Hungary - // - `IS` - Iceland - // - `IN` - India - // - `ID` - Indonesia - // - `IR` - Iran - // - `IQ` - Iraq - // - `IE` - Ireland - // - `IM` - Isle of Man - // - `IL` - Israel - // - `IT` - Italy - // - `JM` - Jamaica - // - `JP` - Japan - // - `JE` - Jersey - // - `JO` - Jordan - // - `KZ` - Kazakhstan - // - `KE` - Kenya - // - `KI` - Kiribati - // - `KW` - Kuwait - // - `KG` - Kyrgyzstan - // - `LA` - Laos - // - `LV` - Latvia - // - `LB` - Lebanon - // - `LS` - Lesotho - // - `LR` - Liberia - // - `LY` - Libya - // - `LI` - Liechtenstein - // - `LT` - Lithuania - // - `LU` - Luxembourg - // - `MO` - Macao - // - `MG` - Madagascar - // - `MW` - Malawi - // - `MY` - Malaysia - // - `MV` - Maldives - // - `ML` - Mali - // - `MT` - Malta - // - `MH` - Marshall Islands - // - `MQ` - Martinique - // - `MR` - Mauritania - // - `MU` - Mauritius - // - `YT` - Mayotte - // - `MX` - Mexico - // - `FM` - Micronesia (Federated States of) - // - `MD` - Moldova - // - `MC` - Monaco - // - `MN` - Mongolia - // - `ME` - Montenegro - // - `MS` - Montserrat - // - `MA` - Morocco - // - `MZ` - Mozambique - // - `MM` - Myanmar - // - `NA` - Namibia - // - `NR` - Nauru - // - `NP` - Nepal - // - `NL` - Netherlands - // - `NC` - New Caledonia - // - `NZ` - New Zealand - // - `NI` - Nicaragua - // - `NE` - Niger - // - `NG` - Nigeria - // - `NU` - Niue - // - `NF` - Norfolk Island - // - `KP` - North Korea - // - `MK` - North Macedonia - // - `MP` - Northern Mariana Islands - // - `NO` - Norway - // - `OM` - Oman - // - `PK` - Pakistan - // - `PW` - Palau - // - `PS` - Palestine, State of - // - `PA` - Panama - // - `PG` - Papua New Guinea - // - `PY` - Paraguay - // - `PE` - Peru - // - `PH` - Philippines - // - `PN` - Pitcairn - // - `PL` - Poland - // - `PT` - Portugal - // - `PR` - Puerto Rico - // - `QA` - Qatar - // - `RE` - Réunion - // - `RO` - Romania - // - `RU` - Russia - // - `RW` - Rwanda - // - `BL` - Saint Barthélemy - // - `SH` - Saint Helena, Ascension and Tristan da Cunha - // - `KN` - Saint Kitts and Nevis - // - `LC` - Saint Lucia - // - `MF` - Saint Martin (French part) - // - `PM` - Saint Pierre and Miquelon - // - `VC` - Saint Vincent and the Grenadines - // - `WS` - Samoa - // - `SM` - San Marino - // - `ST` - Sao Tome and Principe - // - `SA` - Saudi Arabia - // - `SN` - Senegal - // - `RS` - Serbia - // - `SC` - Seychelles - // - `SL` - Sierra Leone - // - `SG` - Singapore - // - `SX` - Sint Maarten (Dutch part) - // - `SK` - Slovakia - // - `SI` - Slovenia - // - `SB` - Solomon Islands - // - `SO` - Somalia - // - `ZA` - South Africa - // - `GS` - South Georgia and the South Sandwich Islands - // - `KR` - South Korea - // - `SS` - South Sudan - // - `ES` - Spain - // - `LK` - Sri Lanka - // - `SD` - Sudan - // - `SR` - Suriname - // - `SJ` - Svalbard and Jan Mayen - // - `SE` - Sweden - // - `CH` - Switzerland - // - `SY` - Syria - // - `TW` - Taiwan - // - `TJ` - Tajikistan - // - `TZ` - Tanzania - // - `TH` - Thailand - // - `TL` - Timor-Leste - // - `TG` - Togo - // - `TK` - Tokelau - // - `TO` - Tonga - // - `TT` - Trinidad and Tobago - // - `TN` - Tunisia - // - `TR` - Turkey - // - `TM` - Turkmenistan - // - `TC` - Turks and Caicos Islands - // - `TV` - Tuvalu - // - `UG` - Uganda - // - `UA` - Ukraine - // - `AE` - United Arab Emirates - // - `GB` - United Kingdom - // - `UM` - United States Minor Outlying Islands - // - `US` - United States of America - // - `UY` - Uruguay - // - `UZ` - Uzbekistan - // - `VU` - Vanuatu - // - `VE` - Venezuela - // - `VN` - Vietnam - // - `VG` - Virgin Islands (British) - // - `VI` - Virgin Islands (U.S.) - // - `WF` - Wallis and Futuna - // - `EH` - Western Sahara - // - `YE` - Yemen - // - `ZM` - Zambia - // - `ZW` - Zimbabwe - Country *AddressCountry `json:"country,omitempty"` + // * `AF` - Afghanistan + // * `AX` - Åland Islands + // * `AL` - Albania + // * `DZ` - Algeria + // * `AS` - American Samoa + // * `AD` - Andorra + // * `AO` - Angola + // * `AI` - Anguilla + // * `AQ` - Antarctica + // * `AG` - Antigua and Barbuda + // * `AR` - Argentina + // * `AM` - Armenia + // * `AW` - Aruba + // * `AU` - Australia + // * `AT` - Austria + // * `AZ` - Azerbaijan + // * `BS` - Bahamas + // * `BH` - Bahrain + // * `BD` - Bangladesh + // * `BB` - Barbados + // * `BY` - Belarus + // * `BE` - Belgium + // * `BZ` - Belize + // * `BJ` - Benin + // * `BM` - Bermuda + // * `BT` - Bhutan + // * `BO` - Bolivia + // * `BQ` - Bonaire, Sint Eustatius and Saba + // * `BA` - Bosnia and Herzegovina + // * `BW` - Botswana + // * `BV` - Bouvet Island + // * `BR` - Brazil + // * `IO` - British Indian Ocean Territory + // * `BN` - Brunei + // * `BG` - Bulgaria + // * `BF` - Burkina Faso + // * `BI` - Burundi + // * `CV` - Cabo Verde + // * `KH` - Cambodia + // * `CM` - Cameroon + // * `CA` - Canada + // * `KY` - Cayman Islands + // * `CF` - Central African Republic + // * `TD` - Chad + // * `CL` - Chile + // * `CN` - China + // * `CX` - Christmas Island + // * `CC` - Cocos (Keeling) Islands + // * `CO` - Colombia + // * `KM` - Comoros + // * `CG` - Congo + // * `CD` - Congo (the Democratic Republic of the) + // * `CK` - Cook Islands + // * `CR` - Costa Rica + // * `CI` - Côte d'Ivoire + // * `HR` - Croatia + // * `CU` - Cuba + // * `CW` - Curaçao + // * `CY` - Cyprus + // * `CZ` - Czechia + // * `DK` - Denmark + // * `DJ` - Djibouti + // * `DM` - Dominica + // * `DO` - Dominican Republic + // * `EC` - Ecuador + // * `EG` - Egypt + // * `SV` - El Salvador + // * `GQ` - Equatorial Guinea + // * `ER` - Eritrea + // * `EE` - Estonia + // * `SZ` - Eswatini + // * `ET` - Ethiopia + // * `FK` - Falkland Islands (Malvinas) + // * `FO` - Faroe Islands + // * `FJ` - Fiji + // * `FI` - Finland + // * `FR` - France + // * `GF` - French Guiana + // * `PF` - French Polynesia + // * `TF` - French Southern Territories + // * `GA` - Gabon + // * `GM` - Gambia + // * `GE` - Georgia + // * `DE` - Germany + // * `GH` - Ghana + // * `GI` - Gibraltar + // * `GR` - Greece + // * `GL` - Greenland + // * `GD` - Grenada + // * `GP` - Guadeloupe + // * `GU` - Guam + // * `GT` - Guatemala + // * `GG` - Guernsey + // * `GN` - Guinea + // * `GW` - Guinea-Bissau + // * `GY` - Guyana + // * `HT` - Haiti + // * `HM` - Heard Island and McDonald Islands + // * `VA` - Holy See + // * `HN` - Honduras + // * `HK` - Hong Kong + // * `HU` - Hungary + // * `IS` - Iceland + // * `IN` - India + // * `ID` - Indonesia + // * `IR` - Iran + // * `IQ` - Iraq + // * `IE` - Ireland + // * `IM` - Isle of Man + // * `IL` - Israel + // * `IT` - Italy + // * `JM` - Jamaica + // * `JP` - Japan + // * `JE` - Jersey + // * `JO` - Jordan + // * `KZ` - Kazakhstan + // * `KE` - Kenya + // * `KI` - Kiribati + // * `KW` - Kuwait + // * `KG` - Kyrgyzstan + // * `LA` - Laos + // * `LV` - Latvia + // * `LB` - Lebanon + // * `LS` - Lesotho + // * `LR` - Liberia + // * `LY` - Libya + // * `LI` - Liechtenstein + // * `LT` - Lithuania + // * `LU` - Luxembourg + // * `MO` - Macao + // * `MG` - Madagascar + // * `MW` - Malawi + // * `MY` - Malaysia + // * `MV` - Maldives + // * `ML` - Mali + // * `MT` - Malta + // * `MH` - Marshall Islands + // * `MQ` - Martinique + // * `MR` - Mauritania + // * `MU` - Mauritius + // * `YT` - Mayotte + // * `MX` - Mexico + // * `FM` - Micronesia (Federated States of) + // * `MD` - Moldova + // * `MC` - Monaco + // * `MN` - Mongolia + // * `ME` - Montenegro + // * `MS` - Montserrat + // * `MA` - Morocco + // * `MZ` - Mozambique + // * `MM` - Myanmar + // * `NA` - Namibia + // * `NR` - Nauru + // * `NP` - Nepal + // * `NL` - Netherlands + // * `NC` - New Caledonia + // * `NZ` - New Zealand + // * `NI` - Nicaragua + // * `NE` - Niger + // * `NG` - Nigeria + // * `NU` - Niue + // * `NF` - Norfolk Island + // * `KP` - North Korea + // * `MK` - North Macedonia + // * `MP` - Northern Mariana Islands + // * `NO` - Norway + // * `OM` - Oman + // * `PK` - Pakistan + // * `PW` - Palau + // * `PS` - Palestine, State of + // * `PA` - Panama + // * `PG` - Papua New Guinea + // * `PY` - Paraguay + // * `PE` - Peru + // * `PH` - Philippines + // * `PN` - Pitcairn + // * `PL` - Poland + // * `PT` - Portugal + // * `PR` - Puerto Rico + // * `QA` - Qatar + // * `RE` - Réunion + // * `RO` - Romania + // * `RU` - Russia + // * `RW` - Rwanda + // * `BL` - Saint Barthélemy + // * `SH` - Saint Helena, Ascension and Tristan da Cunha + // * `KN` - Saint Kitts and Nevis + // * `LC` - Saint Lucia + // * `MF` - Saint Martin (French part) + // * `PM` - Saint Pierre and Miquelon + // * `VC` - Saint Vincent and the Grenadines + // * `WS` - Samoa + // * `SM` - San Marino + // * `ST` - Sao Tome and Principe + // * `SA` - Saudi Arabia + // * `SN` - Senegal + // * `RS` - Serbia + // * `SC` - Seychelles + // * `SL` - Sierra Leone + // * `SG` - Singapore + // * `SX` - Sint Maarten (Dutch part) + // * `SK` - Slovakia + // * `SI` - Slovenia + // * `SB` - Solomon Islands + // * `SO` - Somalia + // * `ZA` - South Africa + // * `GS` - South Georgia and the South Sandwich Islands + // * `KR` - South Korea + // * `SS` - South Sudan + // * `ES` - Spain + // * `LK` - Sri Lanka + // * `SD` - Sudan + // * `SR` - Suriname + // * `SJ` - Svalbard and Jan Mayen + // * `SE` - Sweden + // * `CH` - Switzerland + // * `SY` - Syria + // * `TW` - Taiwan + // * `TJ` - Tajikistan + // * `TZ` - Tanzania + // * `TH` - Thailand + // * `TL` - Timor-Leste + // * `TG` - Togo + // * `TK` - Tokelau + // * `TO` - Tonga + // * `TT` - Trinidad and Tobago + // * `TN` - Tunisia + // * `TR` - Turkey + // * `TM` - Turkmenistan + // * `TC` - Turks and Caicos Islands + // * `TV` - Tuvalu + // * `UG` - Uganda + // * `UA` - Ukraine + // * `AE` - United Arab Emirates + // * `GB` - United Kingdom + // * `UM` - United States Minor Outlying Islands + // * `US` - United States of America + // * `UY` - Uruguay + // * `UZ` - Uzbekistan + // * `VU` - Vanuatu + // * `VE` - Venezuela + // * `VN` - Vietnam + // * `VG` - Virgin Islands (British) + // * `VI` - Virgin Islands (U.S.) + // * `WF` - Wallis and Futuna + // * `EH` - Western Sahara + // * `YE` - Yemen + // * `ZM` - Zambia + // * `ZW` - Zimbabwe + Country *AddressCountry `json:"country,omitempty" url:"country,omitempty"` // The address type. // - // - `BILLING` - BILLING - // - `SHIPPING` - SHIPPING - AddressType *AddressAddressType `json:"address_type,omitempty"` + // * `BILLING` - BILLING + // * `SHIPPING` - SHIPPING + AddressType *AddressAddressType `json:"address_type,omitempty" url:"address_type,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (a *Address) UnmarshalJSON(data []byte) error { - type unmarshaler Address - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (a *Address) GetCreatedAt() *time.Time { + if a == nil { + return nil } - *a = Address(value) - a._rawJSON = json.RawMessage(data) - return nil + return a.CreatedAt } -func (a *Address) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } +func (a *Address) GetModifiedAt() *time.Time { + if a == nil { + return nil } - if value, err := core.StringifyJSON(a); err == nil { - return value + return a.ModifiedAt +} + +func (a *Address) GetStreet1() *string { + if a == nil { + return nil } - return fmt.Sprintf("%#v", a) + return a.Street1 } -// The address type. -// -// - `BILLING` - BILLING -// - `SHIPPING` - SHIPPING -type AddressAddressType struct { - typeName string - AddressTypeEnum AddressTypeEnum - String string +func (a *Address) GetStreet2() *string { + if a == nil { + return nil + } + return a.Street2 } -func NewAddressAddressTypeFromAddressTypeEnum(value AddressTypeEnum) *AddressAddressType { - return &AddressAddressType{typeName: "addressTypeEnum", AddressTypeEnum: value} +func (a *Address) GetCity() *string { + if a == nil { + return nil + } + return a.City } -func NewAddressAddressTypeFromString(value string) *AddressAddressType { - return &AddressAddressType{typeName: "string", String: value} +func (a *Address) GetState() *string { + if a == nil { + return nil + } + return a.State } -func (a *AddressAddressType) UnmarshalJSON(data []byte) error { - var valueAddressTypeEnum AddressTypeEnum - if err := json.Unmarshal(data, &valueAddressTypeEnum); err == nil { - a.typeName = "addressTypeEnum" - a.AddressTypeEnum = valueAddressTypeEnum +func (a *Address) GetPostalCode() *string { + if a == nil { return nil } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" - a.String = valueString + return a.PostalCode +} + +func (a *Address) GetCountry() *AddressCountry { + if a == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, a) + return a.Country } -func (a AddressAddressType) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "addressTypeEnum": - return json.Marshal(a.AddressTypeEnum) - case "string": - return json.Marshal(a.String) +func (a *Address) GetAddressType() *AddressAddressType { + if a == nil { + return nil } + return a.AddressType } -type AddressAddressTypeVisitor interface { - VisitAddressTypeEnum(AddressTypeEnum) error - VisitString(string) error +func (a *Address) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *Address) UnmarshalJSON(data []byte) error { + type embed Address + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*a), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *a = Address(unmarshaler.embed) + a.CreatedAt = unmarshaler.CreatedAt.TimePtr() + a.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *Address) MarshalJSON() ([]byte, error) { + type embed Address + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*a), + CreatedAt: internal.NewOptionalDateTime(a.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(a.ModifiedAt), + } + return json.Marshal(marshaler) +} + +func (a *Address) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} + +// The address type. +// +// * `BILLING` - BILLING +// * `SHIPPING` - SHIPPING +type AddressAddressType struct { + AddressTypeEnum AddressTypeEnum + String string + + typ string +} + +func (a *AddressAddressType) GetAddressTypeEnum() AddressTypeEnum { + if a == nil { + return "" + } + return a.AddressTypeEnum +} + +func (a *AddressAddressType) GetString() string { + if a == nil { + return "" + } + return a.String +} + +func (a *AddressAddressType) UnmarshalJSON(data []byte) error { + var valueAddressTypeEnum AddressTypeEnum + if err := json.Unmarshal(data, &valueAddressTypeEnum); err == nil { + a.typ = "AddressTypeEnum" + a.AddressTypeEnum = valueAddressTypeEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + a.typ = "String" + a.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, a) +} + +func (a AddressAddressType) MarshalJSON() ([]byte, error) { + if a.typ == "AddressTypeEnum" || a.AddressTypeEnum != "" { + return json.Marshal(a.AddressTypeEnum) + } + if a.typ == "String" || a.String != "" { + return json.Marshal(a.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type AddressAddressTypeVisitor interface { + VisitAddressTypeEnum(AddressTypeEnum) error + VisitString(string) error } func (a *AddressAddressType) Accept(visitor AddressAddressTypeVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "addressTypeEnum": + if a.typ == "AddressTypeEnum" || a.AddressTypeEnum != "" { return visitor.VisitAddressTypeEnum(a.AddressTypeEnum) - case "string": + } + if a.typ == "String" || a.String != "" { return visitor.VisitString(a.String) } + return fmt.Errorf("type %T does not include a non-empty union type", a) } // The address's country. // -// - `AF` - Afghanistan -// - `AX` - Åland Islands -// - `AL` - Albania -// - `DZ` - Algeria -// - `AS` - American Samoa -// - `AD` - Andorra -// - `AO` - Angola -// - `AI` - Anguilla -// - `AQ` - Antarctica -// - `AG` - Antigua and Barbuda -// - `AR` - Argentina -// - `AM` - Armenia -// - `AW` - Aruba -// - `AU` - Australia -// - `AT` - Austria -// - `AZ` - Azerbaijan -// - `BS` - Bahamas -// - `BH` - Bahrain -// - `BD` - Bangladesh -// - `BB` - Barbados -// - `BY` - Belarus -// - `BE` - Belgium -// - `BZ` - Belize -// - `BJ` - Benin -// - `BM` - Bermuda -// - `BT` - Bhutan -// - `BO` - Bolivia -// - `BQ` - Bonaire, Sint Eustatius and Saba -// - `BA` - Bosnia and Herzegovina -// - `BW` - Botswana -// - `BV` - Bouvet Island -// - `BR` - Brazil -// - `IO` - British Indian Ocean Territory -// - `BN` - Brunei -// - `BG` - Bulgaria -// - `BF` - Burkina Faso -// - `BI` - Burundi -// - `CV` - Cabo Verde -// - `KH` - Cambodia -// - `CM` - Cameroon -// - `CA` - Canada -// - `KY` - Cayman Islands -// - `CF` - Central African Republic -// - `TD` - Chad -// - `CL` - Chile -// - `CN` - China -// - `CX` - Christmas Island -// - `CC` - Cocos (Keeling) Islands -// - `CO` - Colombia -// - `KM` - Comoros -// - `CG` - Congo -// - `CD` - Congo (the Democratic Republic of the) -// - `CK` - Cook Islands -// - `CR` - Costa Rica -// - `CI` - Côte d'Ivoire -// - `HR` - Croatia -// - `CU` - Cuba -// - `CW` - Curaçao -// - `CY` - Cyprus -// - `CZ` - Czechia -// - `DK` - Denmark -// - `DJ` - Djibouti -// - `DM` - Dominica -// - `DO` - Dominican Republic -// - `EC` - Ecuador -// - `EG` - Egypt -// - `SV` - El Salvador -// - `GQ` - Equatorial Guinea -// - `ER` - Eritrea -// - `EE` - Estonia -// - `SZ` - Eswatini -// - `ET` - Ethiopia -// - `FK` - Falkland Islands (Malvinas) -// - `FO` - Faroe Islands -// - `FJ` - Fiji -// - `FI` - Finland -// - `FR` - France -// - `GF` - French Guiana -// - `PF` - French Polynesia -// - `TF` - French Southern Territories -// - `GA` - Gabon -// - `GM` - Gambia -// - `GE` - Georgia -// - `DE` - Germany -// - `GH` - Ghana -// - `GI` - Gibraltar -// - `GR` - Greece -// - `GL` - Greenland -// - `GD` - Grenada -// - `GP` - Guadeloupe -// - `GU` - Guam -// - `GT` - Guatemala -// - `GG` - Guernsey -// - `GN` - Guinea -// - `GW` - Guinea-Bissau -// - `GY` - Guyana -// - `HT` - Haiti -// - `HM` - Heard Island and McDonald Islands -// - `VA` - Holy See -// - `HN` - Honduras -// - `HK` - Hong Kong -// - `HU` - Hungary -// - `IS` - Iceland -// - `IN` - India -// - `ID` - Indonesia -// - `IR` - Iran -// - `IQ` - Iraq -// - `IE` - Ireland -// - `IM` - Isle of Man -// - `IL` - Israel -// - `IT` - Italy -// - `JM` - Jamaica -// - `JP` - Japan -// - `JE` - Jersey -// - `JO` - Jordan -// - `KZ` - Kazakhstan -// - `KE` - Kenya -// - `KI` - Kiribati -// - `KW` - Kuwait -// - `KG` - Kyrgyzstan -// - `LA` - Laos -// - `LV` - Latvia -// - `LB` - Lebanon -// - `LS` - Lesotho -// - `LR` - Liberia -// - `LY` - Libya -// - `LI` - Liechtenstein -// - `LT` - Lithuania -// - `LU` - Luxembourg -// - `MO` - Macao -// - `MG` - Madagascar -// - `MW` - Malawi -// - `MY` - Malaysia -// - `MV` - Maldives -// - `ML` - Mali -// - `MT` - Malta -// - `MH` - Marshall Islands -// - `MQ` - Martinique -// - `MR` - Mauritania -// - `MU` - Mauritius -// - `YT` - Mayotte -// - `MX` - Mexico -// - `FM` - Micronesia (Federated States of) -// - `MD` - Moldova -// - `MC` - Monaco -// - `MN` - Mongolia -// - `ME` - Montenegro -// - `MS` - Montserrat -// - `MA` - Morocco -// - `MZ` - Mozambique -// - `MM` - Myanmar -// - `NA` - Namibia -// - `NR` - Nauru -// - `NP` - Nepal -// - `NL` - Netherlands -// - `NC` - New Caledonia -// - `NZ` - New Zealand -// - `NI` - Nicaragua -// - `NE` - Niger -// - `NG` - Nigeria -// - `NU` - Niue -// - `NF` - Norfolk Island -// - `KP` - North Korea -// - `MK` - North Macedonia -// - `MP` - Northern Mariana Islands -// - `NO` - Norway -// - `OM` - Oman -// - `PK` - Pakistan -// - `PW` - Palau -// - `PS` - Palestine, State of -// - `PA` - Panama -// - `PG` - Papua New Guinea -// - `PY` - Paraguay -// - `PE` - Peru -// - `PH` - Philippines -// - `PN` - Pitcairn -// - `PL` - Poland -// - `PT` - Portugal -// - `PR` - Puerto Rico -// - `QA` - Qatar -// - `RE` - Réunion -// - `RO` - Romania -// - `RU` - Russia -// - `RW` - Rwanda -// - `BL` - Saint Barthélemy -// - `SH` - Saint Helena, Ascension and Tristan da Cunha -// - `KN` - Saint Kitts and Nevis -// - `LC` - Saint Lucia -// - `MF` - Saint Martin (French part) -// - `PM` - Saint Pierre and Miquelon -// - `VC` - Saint Vincent and the Grenadines -// - `WS` - Samoa -// - `SM` - San Marino -// - `ST` - Sao Tome and Principe -// - `SA` - Saudi Arabia -// - `SN` - Senegal -// - `RS` - Serbia -// - `SC` - Seychelles -// - `SL` - Sierra Leone -// - `SG` - Singapore -// - `SX` - Sint Maarten (Dutch part) -// - `SK` - Slovakia -// - `SI` - Slovenia -// - `SB` - Solomon Islands -// - `SO` - Somalia -// - `ZA` - South Africa -// - `GS` - South Georgia and the South Sandwich Islands -// - `KR` - South Korea -// - `SS` - South Sudan -// - `ES` - Spain -// - `LK` - Sri Lanka -// - `SD` - Sudan -// - `SR` - Suriname -// - `SJ` - Svalbard and Jan Mayen -// - `SE` - Sweden -// - `CH` - Switzerland -// - `SY` - Syria -// - `TW` - Taiwan -// - `TJ` - Tajikistan -// - `TZ` - Tanzania -// - `TH` - Thailand -// - `TL` - Timor-Leste -// - `TG` - Togo -// - `TK` - Tokelau -// - `TO` - Tonga -// - `TT` - Trinidad and Tobago -// - `TN` - Tunisia -// - `TR` - Turkey -// - `TM` - Turkmenistan -// - `TC` - Turks and Caicos Islands -// - `TV` - Tuvalu -// - `UG` - Uganda -// - `UA` - Ukraine -// - `AE` - United Arab Emirates -// - `GB` - United Kingdom -// - `UM` - United States Minor Outlying Islands -// - `US` - United States of America -// - `UY` - Uruguay -// - `UZ` - Uzbekistan -// - `VU` - Vanuatu -// - `VE` - Venezuela -// - `VN` - Vietnam -// - `VG` - Virgin Islands (British) -// - `VI` - Virgin Islands (U.S.) -// - `WF` - Wallis and Futuna -// - `EH` - Western Sahara -// - `YE` - Yemen -// - `ZM` - Zambia -// - `ZW` - Zimbabwe +// * `AF` - Afghanistan +// * `AX` - Åland Islands +// * `AL` - Albania +// * `DZ` - Algeria +// * `AS` - American Samoa +// * `AD` - Andorra +// * `AO` - Angola +// * `AI` - Anguilla +// * `AQ` - Antarctica +// * `AG` - Antigua and Barbuda +// * `AR` - Argentina +// * `AM` - Armenia +// * `AW` - Aruba +// * `AU` - Australia +// * `AT` - Austria +// * `AZ` - Azerbaijan +// * `BS` - Bahamas +// * `BH` - Bahrain +// * `BD` - Bangladesh +// * `BB` - Barbados +// * `BY` - Belarus +// * `BE` - Belgium +// * `BZ` - Belize +// * `BJ` - Benin +// * `BM` - Bermuda +// * `BT` - Bhutan +// * `BO` - Bolivia +// * `BQ` - Bonaire, Sint Eustatius and Saba +// * `BA` - Bosnia and Herzegovina +// * `BW` - Botswana +// * `BV` - Bouvet Island +// * `BR` - Brazil +// * `IO` - British Indian Ocean Territory +// * `BN` - Brunei +// * `BG` - Bulgaria +// * `BF` - Burkina Faso +// * `BI` - Burundi +// * `CV` - Cabo Verde +// * `KH` - Cambodia +// * `CM` - Cameroon +// * `CA` - Canada +// * `KY` - Cayman Islands +// * `CF` - Central African Republic +// * `TD` - Chad +// * `CL` - Chile +// * `CN` - China +// * `CX` - Christmas Island +// * `CC` - Cocos (Keeling) Islands +// * `CO` - Colombia +// * `KM` - Comoros +// * `CG` - Congo +// * `CD` - Congo (the Democratic Republic of the) +// * `CK` - Cook Islands +// * `CR` - Costa Rica +// * `CI` - Côte d'Ivoire +// * `HR` - Croatia +// * `CU` - Cuba +// * `CW` - Curaçao +// * `CY` - Cyprus +// * `CZ` - Czechia +// * `DK` - Denmark +// * `DJ` - Djibouti +// * `DM` - Dominica +// * `DO` - Dominican Republic +// * `EC` - Ecuador +// * `EG` - Egypt +// * `SV` - El Salvador +// * `GQ` - Equatorial Guinea +// * `ER` - Eritrea +// * `EE` - Estonia +// * `SZ` - Eswatini +// * `ET` - Ethiopia +// * `FK` - Falkland Islands (Malvinas) +// * `FO` - Faroe Islands +// * `FJ` - Fiji +// * `FI` - Finland +// * `FR` - France +// * `GF` - French Guiana +// * `PF` - French Polynesia +// * `TF` - French Southern Territories +// * `GA` - Gabon +// * `GM` - Gambia +// * `GE` - Georgia +// * `DE` - Germany +// * `GH` - Ghana +// * `GI` - Gibraltar +// * `GR` - Greece +// * `GL` - Greenland +// * `GD` - Grenada +// * `GP` - Guadeloupe +// * `GU` - Guam +// * `GT` - Guatemala +// * `GG` - Guernsey +// * `GN` - Guinea +// * `GW` - Guinea-Bissau +// * `GY` - Guyana +// * `HT` - Haiti +// * `HM` - Heard Island and McDonald Islands +// * `VA` - Holy See +// * `HN` - Honduras +// * `HK` - Hong Kong +// * `HU` - Hungary +// * `IS` - Iceland +// * `IN` - India +// * `ID` - Indonesia +// * `IR` - Iran +// * `IQ` - Iraq +// * `IE` - Ireland +// * `IM` - Isle of Man +// * `IL` - Israel +// * `IT` - Italy +// * `JM` - Jamaica +// * `JP` - Japan +// * `JE` - Jersey +// * `JO` - Jordan +// * `KZ` - Kazakhstan +// * `KE` - Kenya +// * `KI` - Kiribati +// * `KW` - Kuwait +// * `KG` - Kyrgyzstan +// * `LA` - Laos +// * `LV` - Latvia +// * `LB` - Lebanon +// * `LS` - Lesotho +// * `LR` - Liberia +// * `LY` - Libya +// * `LI` - Liechtenstein +// * `LT` - Lithuania +// * `LU` - Luxembourg +// * `MO` - Macao +// * `MG` - Madagascar +// * `MW` - Malawi +// * `MY` - Malaysia +// * `MV` - Maldives +// * `ML` - Mali +// * `MT` - Malta +// * `MH` - Marshall Islands +// * `MQ` - Martinique +// * `MR` - Mauritania +// * `MU` - Mauritius +// * `YT` - Mayotte +// * `MX` - Mexico +// * `FM` - Micronesia (Federated States of) +// * `MD` - Moldova +// * `MC` - Monaco +// * `MN` - Mongolia +// * `ME` - Montenegro +// * `MS` - Montserrat +// * `MA` - Morocco +// * `MZ` - Mozambique +// * `MM` - Myanmar +// * `NA` - Namibia +// * `NR` - Nauru +// * `NP` - Nepal +// * `NL` - Netherlands +// * `NC` - New Caledonia +// * `NZ` - New Zealand +// * `NI` - Nicaragua +// * `NE` - Niger +// * `NG` - Nigeria +// * `NU` - Niue +// * `NF` - Norfolk Island +// * `KP` - North Korea +// * `MK` - North Macedonia +// * `MP` - Northern Mariana Islands +// * `NO` - Norway +// * `OM` - Oman +// * `PK` - Pakistan +// * `PW` - Palau +// * `PS` - Palestine, State of +// * `PA` - Panama +// * `PG` - Papua New Guinea +// * `PY` - Paraguay +// * `PE` - Peru +// * `PH` - Philippines +// * `PN` - Pitcairn +// * `PL` - Poland +// * `PT` - Portugal +// * `PR` - Puerto Rico +// * `QA` - Qatar +// * `RE` - Réunion +// * `RO` - Romania +// * `RU` - Russia +// * `RW` - Rwanda +// * `BL` - Saint Barthélemy +// * `SH` - Saint Helena, Ascension and Tristan da Cunha +// * `KN` - Saint Kitts and Nevis +// * `LC` - Saint Lucia +// * `MF` - Saint Martin (French part) +// * `PM` - Saint Pierre and Miquelon +// * `VC` - Saint Vincent and the Grenadines +// * `WS` - Samoa +// * `SM` - San Marino +// * `ST` - Sao Tome and Principe +// * `SA` - Saudi Arabia +// * `SN` - Senegal +// * `RS` - Serbia +// * `SC` - Seychelles +// * `SL` - Sierra Leone +// * `SG` - Singapore +// * `SX` - Sint Maarten (Dutch part) +// * `SK` - Slovakia +// * `SI` - Slovenia +// * `SB` - Solomon Islands +// * `SO` - Somalia +// * `ZA` - South Africa +// * `GS` - South Georgia and the South Sandwich Islands +// * `KR` - South Korea +// * `SS` - South Sudan +// * `ES` - Spain +// * `LK` - Sri Lanka +// * `SD` - Sudan +// * `SR` - Suriname +// * `SJ` - Svalbard and Jan Mayen +// * `SE` - Sweden +// * `CH` - Switzerland +// * `SY` - Syria +// * `TW` - Taiwan +// * `TJ` - Tajikistan +// * `TZ` - Tanzania +// * `TH` - Thailand +// * `TL` - Timor-Leste +// * `TG` - Togo +// * `TK` - Tokelau +// * `TO` - Tonga +// * `TT` - Trinidad and Tobago +// * `TN` - Tunisia +// * `TR` - Turkey +// * `TM` - Turkmenistan +// * `TC` - Turks and Caicos Islands +// * `TV` - Tuvalu +// * `UG` - Uganda +// * `UA` - Ukraine +// * `AE` - United Arab Emirates +// * `GB` - United Kingdom +// * `UM` - United States Minor Outlying Islands +// * `US` - United States of America +// * `UY` - Uruguay +// * `UZ` - Uzbekistan +// * `VU` - Vanuatu +// * `VE` - Venezuela +// * `VN` - Vietnam +// * `VG` - Virgin Islands (British) +// * `VI` - Virgin Islands (U.S.) +// * `WF` - Wallis and Futuna +// * `EH` - Western Sahara +// * `YE` - Yemen +// * `ZM` - Zambia +// * `ZW` - Zimbabwe type AddressCountry struct { - typeName string CountryEnum CountryEnum String string + + typ string } -func NewAddressCountryFromCountryEnum(value CountryEnum) *AddressCountry { - return &AddressCountry{typeName: "countryEnum", CountryEnum: value} +func (a *AddressCountry) GetCountryEnum() CountryEnum { + if a == nil { + return "" + } + return a.CountryEnum } -func NewAddressCountryFromString(value string) *AddressCountry { - return &AddressCountry{typeName: "string", String: value} +func (a *AddressCountry) GetString() string { + if a == nil { + return "" + } + return a.String } func (a *AddressCountry) UnmarshalJSON(data []byte) error { var valueCountryEnum CountryEnum if err := json.Unmarshal(data, &valueCountryEnum); err == nil { - a.typeName = "countryEnum" + a.typ = "CountryEnum" a.CountryEnum = valueCountryEnum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" + a.typ = "String" a.String = valueString return nil } @@ -1167,14 +1223,13 @@ func (a *AddressCountry) UnmarshalJSON(data []byte) error { } func (a AddressCountry) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "countryEnum": + if a.typ == "CountryEnum" || a.CountryEnum != "" { return json.Marshal(a.CountryEnum) - case "string": + } + if a.typ == "String" || a.String != "" { return json.Marshal(a.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) } type AddressCountryVisitor interface { @@ -1183,297 +1238,360 @@ type AddressCountryVisitor interface { } func (a *AddressCountry) Accept(visitor AddressCountryVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "countryEnum": + if a.typ == "CountryEnum" || a.CountryEnum != "" { return visitor.VisitCountryEnum(a.CountryEnum) - case "string": + } + if a.typ == "String" || a.String != "" { return visitor.VisitString(a.String) } + return fmt.Errorf("type %T does not include a non-empty union type", a) } // # The Address Object -// // ### Description -// // The `Address` object is used to represent an entity's address. -// // ### Usage Example -// // TODO type AddressRequest struct { // Line 1 of the address's street. - Street1 *string `json:"street_1,omitempty"` + Street1 *string `json:"street_1,omitempty" url:"street_1,omitempty"` // Line 2 of the address's street. - Street2 *string `json:"street_2,omitempty"` + Street2 *string `json:"street_2,omitempty" url:"street_2,omitempty"` // The address's city. - City *string `json:"city,omitempty"` + City *string `json:"city,omitempty" url:"city,omitempty"` // The address's state. - State *string `json:"state,omitempty"` + State *string `json:"state,omitempty" url:"state,omitempty"` // The address's postal code. - PostalCode *string `json:"postal_code,omitempty"` + PostalCode *string `json:"postal_code,omitempty" url:"postal_code,omitempty"` // The address's country. // - // - `AF` - Afghanistan - // - `AX` - Åland Islands - // - `AL` - Albania - // - `DZ` - Algeria - // - `AS` - American Samoa - // - `AD` - Andorra - // - `AO` - Angola - // - `AI` - Anguilla - // - `AQ` - Antarctica - // - `AG` - Antigua and Barbuda - // - `AR` - Argentina - // - `AM` - Armenia - // - `AW` - Aruba - // - `AU` - Australia - // - `AT` - Austria - // - `AZ` - Azerbaijan - // - `BS` - Bahamas - // - `BH` - Bahrain - // - `BD` - Bangladesh - // - `BB` - Barbados - // - `BY` - Belarus - // - `BE` - Belgium - // - `BZ` - Belize - // - `BJ` - Benin - // - `BM` - Bermuda - // - `BT` - Bhutan - // - `BO` - Bolivia - // - `BQ` - Bonaire, Sint Eustatius and Saba - // - `BA` - Bosnia and Herzegovina - // - `BW` - Botswana - // - `BV` - Bouvet Island - // - `BR` - Brazil - // - `IO` - British Indian Ocean Territory - // - `BN` - Brunei - // - `BG` - Bulgaria - // - `BF` - Burkina Faso - // - `BI` - Burundi - // - `CV` - Cabo Verde - // - `KH` - Cambodia - // - `CM` - Cameroon - // - `CA` - Canada - // - `KY` - Cayman Islands - // - `CF` - Central African Republic - // - `TD` - Chad - // - `CL` - Chile - // - `CN` - China - // - `CX` - Christmas Island - // - `CC` - Cocos (Keeling) Islands - // - `CO` - Colombia - // - `KM` - Comoros - // - `CG` - Congo - // - `CD` - Congo (the Democratic Republic of the) - // - `CK` - Cook Islands - // - `CR` - Costa Rica - // - `CI` - Côte d'Ivoire - // - `HR` - Croatia - // - `CU` - Cuba - // - `CW` - Curaçao - // - `CY` - Cyprus - // - `CZ` - Czechia - // - `DK` - Denmark - // - `DJ` - Djibouti - // - `DM` - Dominica - // - `DO` - Dominican Republic - // - `EC` - Ecuador - // - `EG` - Egypt - // - `SV` - El Salvador - // - `GQ` - Equatorial Guinea - // - `ER` - Eritrea - // - `EE` - Estonia - // - `SZ` - Eswatini - // - `ET` - Ethiopia - // - `FK` - Falkland Islands (Malvinas) - // - `FO` - Faroe Islands - // - `FJ` - Fiji - // - `FI` - Finland - // - `FR` - France - // - `GF` - French Guiana - // - `PF` - French Polynesia - // - `TF` - French Southern Territories - // - `GA` - Gabon - // - `GM` - Gambia - // - `GE` - Georgia - // - `DE` - Germany - // - `GH` - Ghana - // - `GI` - Gibraltar - // - `GR` - Greece - // - `GL` - Greenland - // - `GD` - Grenada - // - `GP` - Guadeloupe - // - `GU` - Guam - // - `GT` - Guatemala - // - `GG` - Guernsey - // - `GN` - Guinea - // - `GW` - Guinea-Bissau - // - `GY` - Guyana - // - `HT` - Haiti - // - `HM` - Heard Island and McDonald Islands - // - `VA` - Holy See - // - `HN` - Honduras - // - `HK` - Hong Kong - // - `HU` - Hungary - // - `IS` - Iceland - // - `IN` - India - // - `ID` - Indonesia - // - `IR` - Iran - // - `IQ` - Iraq - // - `IE` - Ireland - // - `IM` - Isle of Man - // - `IL` - Israel - // - `IT` - Italy - // - `JM` - Jamaica - // - `JP` - Japan - // - `JE` - Jersey - // - `JO` - Jordan - // - `KZ` - Kazakhstan - // - `KE` - Kenya - // - `KI` - Kiribati - // - `KW` - Kuwait - // - `KG` - Kyrgyzstan - // - `LA` - Laos - // - `LV` - Latvia - // - `LB` - Lebanon - // - `LS` - Lesotho - // - `LR` - Liberia - // - `LY` - Libya - // - `LI` - Liechtenstein - // - `LT` - Lithuania - // - `LU` - Luxembourg - // - `MO` - Macao - // - `MG` - Madagascar - // - `MW` - Malawi - // - `MY` - Malaysia - // - `MV` - Maldives - // - `ML` - Mali - // - `MT` - Malta - // - `MH` - Marshall Islands - // - `MQ` - Martinique - // - `MR` - Mauritania - // - `MU` - Mauritius - // - `YT` - Mayotte - // - `MX` - Mexico - // - `FM` - Micronesia (Federated States of) - // - `MD` - Moldova - // - `MC` - Monaco - // - `MN` - Mongolia - // - `ME` - Montenegro - // - `MS` - Montserrat - // - `MA` - Morocco - // - `MZ` - Mozambique - // - `MM` - Myanmar - // - `NA` - Namibia - // - `NR` - Nauru - // - `NP` - Nepal - // - `NL` - Netherlands - // - `NC` - New Caledonia - // - `NZ` - New Zealand - // - `NI` - Nicaragua - // - `NE` - Niger - // - `NG` - Nigeria - // - `NU` - Niue - // - `NF` - Norfolk Island - // - `KP` - North Korea - // - `MK` - North Macedonia - // - `MP` - Northern Mariana Islands - // - `NO` - Norway - // - `OM` - Oman - // - `PK` - Pakistan - // - `PW` - Palau - // - `PS` - Palestine, State of - // - `PA` - Panama - // - `PG` - Papua New Guinea - // - `PY` - Paraguay - // - `PE` - Peru - // - `PH` - Philippines - // - `PN` - Pitcairn - // - `PL` - Poland - // - `PT` - Portugal - // - `PR` - Puerto Rico - // - `QA` - Qatar - // - `RE` - Réunion - // - `RO` - Romania - // - `RU` - Russia - // - `RW` - Rwanda - // - `BL` - Saint Barthélemy - // - `SH` - Saint Helena, Ascension and Tristan da Cunha - // - `KN` - Saint Kitts and Nevis - // - `LC` - Saint Lucia - // - `MF` - Saint Martin (French part) - // - `PM` - Saint Pierre and Miquelon - // - `VC` - Saint Vincent and the Grenadines - // - `WS` - Samoa - // - `SM` - San Marino - // - `ST` - Sao Tome and Principe - // - `SA` - Saudi Arabia - // - `SN` - Senegal - // - `RS` - Serbia - // - `SC` - Seychelles - // - `SL` - Sierra Leone - // - `SG` - Singapore - // - `SX` - Sint Maarten (Dutch part) - // - `SK` - Slovakia - // - `SI` - Slovenia - // - `SB` - Solomon Islands - // - `SO` - Somalia - // - `ZA` - South Africa - // - `GS` - South Georgia and the South Sandwich Islands - // - `KR` - South Korea - // - `SS` - South Sudan - // - `ES` - Spain - // - `LK` - Sri Lanka - // - `SD` - Sudan - // - `SR` - Suriname - // - `SJ` - Svalbard and Jan Mayen - // - `SE` - Sweden - // - `CH` - Switzerland - // - `SY` - Syria - // - `TW` - Taiwan - // - `TJ` - Tajikistan - // - `TZ` - Tanzania - // - `TH` - Thailand - // - `TL` - Timor-Leste - // - `TG` - Togo - // - `TK` - Tokelau - // - `TO` - Tonga - // - `TT` - Trinidad and Tobago - // - `TN` - Tunisia - // - `TR` - Turkey - // - `TM` - Turkmenistan - // - `TC` - Turks and Caicos Islands - // - `TV` - Tuvalu - // - `UG` - Uganda - // - `UA` - Ukraine - // - `AE` - United Arab Emirates - // - `GB` - United Kingdom - // - `UM` - United States Minor Outlying Islands - // - `US` - United States of America - // - `UY` - Uruguay - // - `UZ` - Uzbekistan - // - `VU` - Vanuatu - // - `VE` - Venezuela - // - `VN` - Vietnam - // - `VG` - Virgin Islands (British) - // - `VI` - Virgin Islands (U.S.) - // - `WF` - Wallis and Futuna - // - `EH` - Western Sahara - // - `YE` - Yemen - // - `ZM` - Zambia - // - `ZW` - Zimbabwe - Country *AddressRequestCountry `json:"country,omitempty"` + // * `AF` - Afghanistan + // * `AX` - Åland Islands + // * `AL` - Albania + // * `DZ` - Algeria + // * `AS` - American Samoa + // * `AD` - Andorra + // * `AO` - Angola + // * `AI` - Anguilla + // * `AQ` - Antarctica + // * `AG` - Antigua and Barbuda + // * `AR` - Argentina + // * `AM` - Armenia + // * `AW` - Aruba + // * `AU` - Australia + // * `AT` - Austria + // * `AZ` - Azerbaijan + // * `BS` - Bahamas + // * `BH` - Bahrain + // * `BD` - Bangladesh + // * `BB` - Barbados + // * `BY` - Belarus + // * `BE` - Belgium + // * `BZ` - Belize + // * `BJ` - Benin + // * `BM` - Bermuda + // * `BT` - Bhutan + // * `BO` - Bolivia + // * `BQ` - Bonaire, Sint Eustatius and Saba + // * `BA` - Bosnia and Herzegovina + // * `BW` - Botswana + // * `BV` - Bouvet Island + // * `BR` - Brazil + // * `IO` - British Indian Ocean Territory + // * `BN` - Brunei + // * `BG` - Bulgaria + // * `BF` - Burkina Faso + // * `BI` - Burundi + // * `CV` - Cabo Verde + // * `KH` - Cambodia + // * `CM` - Cameroon + // * `CA` - Canada + // * `KY` - Cayman Islands + // * `CF` - Central African Republic + // * `TD` - Chad + // * `CL` - Chile + // * `CN` - China + // * `CX` - Christmas Island + // * `CC` - Cocos (Keeling) Islands + // * `CO` - Colombia + // * `KM` - Comoros + // * `CG` - Congo + // * `CD` - Congo (the Democratic Republic of the) + // * `CK` - Cook Islands + // * `CR` - Costa Rica + // * `CI` - Côte d'Ivoire + // * `HR` - Croatia + // * `CU` - Cuba + // * `CW` - Curaçao + // * `CY` - Cyprus + // * `CZ` - Czechia + // * `DK` - Denmark + // * `DJ` - Djibouti + // * `DM` - Dominica + // * `DO` - Dominican Republic + // * `EC` - Ecuador + // * `EG` - Egypt + // * `SV` - El Salvador + // * `GQ` - Equatorial Guinea + // * `ER` - Eritrea + // * `EE` - Estonia + // * `SZ` - Eswatini + // * `ET` - Ethiopia + // * `FK` - Falkland Islands (Malvinas) + // * `FO` - Faroe Islands + // * `FJ` - Fiji + // * `FI` - Finland + // * `FR` - France + // * `GF` - French Guiana + // * `PF` - French Polynesia + // * `TF` - French Southern Territories + // * `GA` - Gabon + // * `GM` - Gambia + // * `GE` - Georgia + // * `DE` - Germany + // * `GH` - Ghana + // * `GI` - Gibraltar + // * `GR` - Greece + // * `GL` - Greenland + // * `GD` - Grenada + // * `GP` - Guadeloupe + // * `GU` - Guam + // * `GT` - Guatemala + // * `GG` - Guernsey + // * `GN` - Guinea + // * `GW` - Guinea-Bissau + // * `GY` - Guyana + // * `HT` - Haiti + // * `HM` - Heard Island and McDonald Islands + // * `VA` - Holy See + // * `HN` - Honduras + // * `HK` - Hong Kong + // * `HU` - Hungary + // * `IS` - Iceland + // * `IN` - India + // * `ID` - Indonesia + // * `IR` - Iran + // * `IQ` - Iraq + // * `IE` - Ireland + // * `IM` - Isle of Man + // * `IL` - Israel + // * `IT` - Italy + // * `JM` - Jamaica + // * `JP` - Japan + // * `JE` - Jersey + // * `JO` - Jordan + // * `KZ` - Kazakhstan + // * `KE` - Kenya + // * `KI` - Kiribati + // * `KW` - Kuwait + // * `KG` - Kyrgyzstan + // * `LA` - Laos + // * `LV` - Latvia + // * `LB` - Lebanon + // * `LS` - Lesotho + // * `LR` - Liberia + // * `LY` - Libya + // * `LI` - Liechtenstein + // * `LT` - Lithuania + // * `LU` - Luxembourg + // * `MO` - Macao + // * `MG` - Madagascar + // * `MW` - Malawi + // * `MY` - Malaysia + // * `MV` - Maldives + // * `ML` - Mali + // * `MT` - Malta + // * `MH` - Marshall Islands + // * `MQ` - Martinique + // * `MR` - Mauritania + // * `MU` - Mauritius + // * `YT` - Mayotte + // * `MX` - Mexico + // * `FM` - Micronesia (Federated States of) + // * `MD` - Moldova + // * `MC` - Monaco + // * `MN` - Mongolia + // * `ME` - Montenegro + // * `MS` - Montserrat + // * `MA` - Morocco + // * `MZ` - Mozambique + // * `MM` - Myanmar + // * `NA` - Namibia + // * `NR` - Nauru + // * `NP` - Nepal + // * `NL` - Netherlands + // * `NC` - New Caledonia + // * `NZ` - New Zealand + // * `NI` - Nicaragua + // * `NE` - Niger + // * `NG` - Nigeria + // * `NU` - Niue + // * `NF` - Norfolk Island + // * `KP` - North Korea + // * `MK` - North Macedonia + // * `MP` - Northern Mariana Islands + // * `NO` - Norway + // * `OM` - Oman + // * `PK` - Pakistan + // * `PW` - Palau + // * `PS` - Palestine, State of + // * `PA` - Panama + // * `PG` - Papua New Guinea + // * `PY` - Paraguay + // * `PE` - Peru + // * `PH` - Philippines + // * `PN` - Pitcairn + // * `PL` - Poland + // * `PT` - Portugal + // * `PR` - Puerto Rico + // * `QA` - Qatar + // * `RE` - Réunion + // * `RO` - Romania + // * `RU` - Russia + // * `RW` - Rwanda + // * `BL` - Saint Barthélemy + // * `SH` - Saint Helena, Ascension and Tristan da Cunha + // * `KN` - Saint Kitts and Nevis + // * `LC` - Saint Lucia + // * `MF` - Saint Martin (French part) + // * `PM` - Saint Pierre and Miquelon + // * `VC` - Saint Vincent and the Grenadines + // * `WS` - Samoa + // * `SM` - San Marino + // * `ST` - Sao Tome and Principe + // * `SA` - Saudi Arabia + // * `SN` - Senegal + // * `RS` - Serbia + // * `SC` - Seychelles + // * `SL` - Sierra Leone + // * `SG` - Singapore + // * `SX` - Sint Maarten (Dutch part) + // * `SK` - Slovakia + // * `SI` - Slovenia + // * `SB` - Solomon Islands + // * `SO` - Somalia + // * `ZA` - South Africa + // * `GS` - South Georgia and the South Sandwich Islands + // * `KR` - South Korea + // * `SS` - South Sudan + // * `ES` - Spain + // * `LK` - Sri Lanka + // * `SD` - Sudan + // * `SR` - Suriname + // * `SJ` - Svalbard and Jan Mayen + // * `SE` - Sweden + // * `CH` - Switzerland + // * `SY` - Syria + // * `TW` - Taiwan + // * `TJ` - Tajikistan + // * `TZ` - Tanzania + // * `TH` - Thailand + // * `TL` - Timor-Leste + // * `TG` - Togo + // * `TK` - Tokelau + // * `TO` - Tonga + // * `TT` - Trinidad and Tobago + // * `TN` - Tunisia + // * `TR` - Turkey + // * `TM` - Turkmenistan + // * `TC` - Turks and Caicos Islands + // * `TV` - Tuvalu + // * `UG` - Uganda + // * `UA` - Ukraine + // * `AE` - United Arab Emirates + // * `GB` - United Kingdom + // * `UM` - United States Minor Outlying Islands + // * `US` - United States of America + // * `UY` - Uruguay + // * `UZ` - Uzbekistan + // * `VU` - Vanuatu + // * `VE` - Venezuela + // * `VN` - Vietnam + // * `VG` - Virgin Islands (British) + // * `VI` - Virgin Islands (U.S.) + // * `WF` - Wallis and Futuna + // * `EH` - Western Sahara + // * `YE` - Yemen + // * `ZM` - Zambia + // * `ZW` - Zimbabwe + Country *AddressRequestCountry `json:"country,omitempty" url:"country,omitempty"` // The address type. // - // - `BILLING` - BILLING - // - `SHIPPING` - SHIPPING - AddressType *AddressRequestAddressType `json:"address_type,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` + // * `BILLING` - BILLING + // * `SHIPPING` - SHIPPING + AddressType *AddressRequestAddressType `json:"address_type,omitempty" url:"address_type,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AddressRequest) GetStreet1() *string { + if a == nil { + return nil + } + return a.Street1 +} + +func (a *AddressRequest) GetStreet2() *string { + if a == nil { + return nil + } + return a.Street2 +} + +func (a *AddressRequest) GetCity() *string { + if a == nil { + return nil + } + return a.City +} + +func (a *AddressRequest) GetState() *string { + if a == nil { + return nil + } + return a.State +} + +func (a *AddressRequest) GetPostalCode() *string { + if a == nil { + return nil + } + return a.PostalCode +} + +func (a *AddressRequest) GetCountry() *AddressRequestCountry { + if a == nil { + return nil + } + return a.Country +} + +func (a *AddressRequest) GetAddressType() *AddressRequestAddressType { + if a == nil { + return nil + } + return a.AddressType +} + +func (a *AddressRequest) GetIntegrationParams() map[string]interface{} { + if a == nil { + return nil + } + return a.IntegrationParams +} + +func (a *AddressRequest) GetLinkedAccountParams() map[string]interface{} { + if a == nil { + return nil + } + return a.LinkedAccountParams +} - _rawJSON json.RawMessage +func (a *AddressRequest) GetExtraProperties() map[string]interface{} { + return a.extraProperties } func (a *AddressRequest) UnmarshalJSON(data []byte) error { @@ -1483,17 +1601,22 @@ func (a *AddressRequest) UnmarshalJSON(data []byte) error { return err } *a = AddressRequest(value) - a._rawJSON = json.RawMessage(data) + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) return nil } func (a *AddressRequest) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(a); err == nil { + if value, err := internal.StringifyJSON(a); err == nil { return value } return fmt.Sprintf("%#v", a) @@ -1501,32 +1624,39 @@ func (a *AddressRequest) String() string { // The address type. // -// - `BILLING` - BILLING -// - `SHIPPING` - SHIPPING +// * `BILLING` - BILLING +// * `SHIPPING` - SHIPPING type AddressRequestAddressType struct { - typeName string AddressTypeEnum AddressTypeEnum String string + + typ string } -func NewAddressRequestAddressTypeFromAddressTypeEnum(value AddressTypeEnum) *AddressRequestAddressType { - return &AddressRequestAddressType{typeName: "addressTypeEnum", AddressTypeEnum: value} +func (a *AddressRequestAddressType) GetAddressTypeEnum() AddressTypeEnum { + if a == nil { + return "" + } + return a.AddressTypeEnum } -func NewAddressRequestAddressTypeFromString(value string) *AddressRequestAddressType { - return &AddressRequestAddressType{typeName: "string", String: value} +func (a *AddressRequestAddressType) GetString() string { + if a == nil { + return "" + } + return a.String } func (a *AddressRequestAddressType) UnmarshalJSON(data []byte) error { var valueAddressTypeEnum AddressTypeEnum if err := json.Unmarshal(data, &valueAddressTypeEnum); err == nil { - a.typeName = "addressTypeEnum" + a.typ = "AddressTypeEnum" a.AddressTypeEnum = valueAddressTypeEnum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" + a.typ = "String" a.String = valueString return nil } @@ -1534,14 +1664,13 @@ func (a *AddressRequestAddressType) UnmarshalJSON(data []byte) error { } func (a AddressRequestAddressType) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "addressTypeEnum": + if a.typ == "AddressTypeEnum" || a.AddressTypeEnum != "" { return json.Marshal(a.AddressTypeEnum) - case "string": + } + if a.typ == "String" || a.String != "" { return json.Marshal(a.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) } type AddressRequestAddressTypeVisitor interface { @@ -1550,291 +1679,297 @@ type AddressRequestAddressTypeVisitor interface { } func (a *AddressRequestAddressType) Accept(visitor AddressRequestAddressTypeVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "addressTypeEnum": + if a.typ == "AddressTypeEnum" || a.AddressTypeEnum != "" { return visitor.VisitAddressTypeEnum(a.AddressTypeEnum) - case "string": + } + if a.typ == "String" || a.String != "" { return visitor.VisitString(a.String) } + return fmt.Errorf("type %T does not include a non-empty union type", a) } // The address's country. // -// - `AF` - Afghanistan -// - `AX` - Åland Islands -// - `AL` - Albania -// - `DZ` - Algeria -// - `AS` - American Samoa -// - `AD` - Andorra -// - `AO` - Angola -// - `AI` - Anguilla -// - `AQ` - Antarctica -// - `AG` - Antigua and Barbuda -// - `AR` - Argentina -// - `AM` - Armenia -// - `AW` - Aruba -// - `AU` - Australia -// - `AT` - Austria -// - `AZ` - Azerbaijan -// - `BS` - Bahamas -// - `BH` - Bahrain -// - `BD` - Bangladesh -// - `BB` - Barbados -// - `BY` - Belarus -// - `BE` - Belgium -// - `BZ` - Belize -// - `BJ` - Benin -// - `BM` - Bermuda -// - `BT` - Bhutan -// - `BO` - Bolivia -// - `BQ` - Bonaire, Sint Eustatius and Saba -// - `BA` - Bosnia and Herzegovina -// - `BW` - Botswana -// - `BV` - Bouvet Island -// - `BR` - Brazil -// - `IO` - British Indian Ocean Territory -// - `BN` - Brunei -// - `BG` - Bulgaria -// - `BF` - Burkina Faso -// - `BI` - Burundi -// - `CV` - Cabo Verde -// - `KH` - Cambodia -// - `CM` - Cameroon -// - `CA` - Canada -// - `KY` - Cayman Islands -// - `CF` - Central African Republic -// - `TD` - Chad -// - `CL` - Chile -// - `CN` - China -// - `CX` - Christmas Island -// - `CC` - Cocos (Keeling) Islands -// - `CO` - Colombia -// - `KM` - Comoros -// - `CG` - Congo -// - `CD` - Congo (the Democratic Republic of the) -// - `CK` - Cook Islands -// - `CR` - Costa Rica -// - `CI` - Côte d'Ivoire -// - `HR` - Croatia -// - `CU` - Cuba -// - `CW` - Curaçao -// - `CY` - Cyprus -// - `CZ` - Czechia -// - `DK` - Denmark -// - `DJ` - Djibouti -// - `DM` - Dominica -// - `DO` - Dominican Republic -// - `EC` - Ecuador -// - `EG` - Egypt -// - `SV` - El Salvador -// - `GQ` - Equatorial Guinea -// - `ER` - Eritrea -// - `EE` - Estonia -// - `SZ` - Eswatini -// - `ET` - Ethiopia -// - `FK` - Falkland Islands (Malvinas) -// - `FO` - Faroe Islands -// - `FJ` - Fiji -// - `FI` - Finland -// - `FR` - France -// - `GF` - French Guiana -// - `PF` - French Polynesia -// - `TF` - French Southern Territories -// - `GA` - Gabon -// - `GM` - Gambia -// - `GE` - Georgia -// - `DE` - Germany -// - `GH` - Ghana -// - `GI` - Gibraltar -// - `GR` - Greece -// - `GL` - Greenland -// - `GD` - Grenada -// - `GP` - Guadeloupe -// - `GU` - Guam -// - `GT` - Guatemala -// - `GG` - Guernsey -// - `GN` - Guinea -// - `GW` - Guinea-Bissau -// - `GY` - Guyana -// - `HT` - Haiti -// - `HM` - Heard Island and McDonald Islands -// - `VA` - Holy See -// - `HN` - Honduras -// - `HK` - Hong Kong -// - `HU` - Hungary -// - `IS` - Iceland -// - `IN` - India -// - `ID` - Indonesia -// - `IR` - Iran -// - `IQ` - Iraq -// - `IE` - Ireland -// - `IM` - Isle of Man -// - `IL` - Israel -// - `IT` - Italy -// - `JM` - Jamaica -// - `JP` - Japan -// - `JE` - Jersey -// - `JO` - Jordan -// - `KZ` - Kazakhstan -// - `KE` - Kenya -// - `KI` - Kiribati -// - `KW` - Kuwait -// - `KG` - Kyrgyzstan -// - `LA` - Laos -// - `LV` - Latvia -// - `LB` - Lebanon -// - `LS` - Lesotho -// - `LR` - Liberia -// - `LY` - Libya -// - `LI` - Liechtenstein -// - `LT` - Lithuania -// - `LU` - Luxembourg -// - `MO` - Macao -// - `MG` - Madagascar -// - `MW` - Malawi -// - `MY` - Malaysia -// - `MV` - Maldives -// - `ML` - Mali -// - `MT` - Malta -// - `MH` - Marshall Islands -// - `MQ` - Martinique -// - `MR` - Mauritania -// - `MU` - Mauritius -// - `YT` - Mayotte -// - `MX` - Mexico -// - `FM` - Micronesia (Federated States of) -// - `MD` - Moldova -// - `MC` - Monaco -// - `MN` - Mongolia -// - `ME` - Montenegro -// - `MS` - Montserrat -// - `MA` - Morocco -// - `MZ` - Mozambique -// - `MM` - Myanmar -// - `NA` - Namibia -// - `NR` - Nauru -// - `NP` - Nepal -// - `NL` - Netherlands -// - `NC` - New Caledonia -// - `NZ` - New Zealand -// - `NI` - Nicaragua -// - `NE` - Niger -// - `NG` - Nigeria -// - `NU` - Niue -// - `NF` - Norfolk Island -// - `KP` - North Korea -// - `MK` - North Macedonia -// - `MP` - Northern Mariana Islands -// - `NO` - Norway -// - `OM` - Oman -// - `PK` - Pakistan -// - `PW` - Palau -// - `PS` - Palestine, State of -// - `PA` - Panama -// - `PG` - Papua New Guinea -// - `PY` - Paraguay -// - `PE` - Peru -// - `PH` - Philippines -// - `PN` - Pitcairn -// - `PL` - Poland -// - `PT` - Portugal -// - `PR` - Puerto Rico -// - `QA` - Qatar -// - `RE` - Réunion -// - `RO` - Romania -// - `RU` - Russia -// - `RW` - Rwanda -// - `BL` - Saint Barthélemy -// - `SH` - Saint Helena, Ascension and Tristan da Cunha -// - `KN` - Saint Kitts and Nevis -// - `LC` - Saint Lucia -// - `MF` - Saint Martin (French part) -// - `PM` - Saint Pierre and Miquelon -// - `VC` - Saint Vincent and the Grenadines -// - `WS` - Samoa -// - `SM` - San Marino -// - `ST` - Sao Tome and Principe -// - `SA` - Saudi Arabia -// - `SN` - Senegal -// - `RS` - Serbia -// - `SC` - Seychelles -// - `SL` - Sierra Leone -// - `SG` - Singapore -// - `SX` - Sint Maarten (Dutch part) -// - `SK` - Slovakia -// - `SI` - Slovenia -// - `SB` - Solomon Islands -// - `SO` - Somalia -// - `ZA` - South Africa -// - `GS` - South Georgia and the South Sandwich Islands -// - `KR` - South Korea -// - `SS` - South Sudan -// - `ES` - Spain -// - `LK` - Sri Lanka -// - `SD` - Sudan -// - `SR` - Suriname -// - `SJ` - Svalbard and Jan Mayen -// - `SE` - Sweden -// - `CH` - Switzerland -// - `SY` - Syria -// - `TW` - Taiwan -// - `TJ` - Tajikistan -// - `TZ` - Tanzania -// - `TH` - Thailand -// - `TL` - Timor-Leste -// - `TG` - Togo -// - `TK` - Tokelau -// - `TO` - Tonga -// - `TT` - Trinidad and Tobago -// - `TN` - Tunisia -// - `TR` - Turkey -// - `TM` - Turkmenistan -// - `TC` - Turks and Caicos Islands -// - `TV` - Tuvalu -// - `UG` - Uganda -// - `UA` - Ukraine -// - `AE` - United Arab Emirates -// - `GB` - United Kingdom -// - `UM` - United States Minor Outlying Islands -// - `US` - United States of America -// - `UY` - Uruguay -// - `UZ` - Uzbekistan -// - `VU` - Vanuatu -// - `VE` - Venezuela -// - `VN` - Vietnam -// - `VG` - Virgin Islands (British) -// - `VI` - Virgin Islands (U.S.) -// - `WF` - Wallis and Futuna -// - `EH` - Western Sahara -// - `YE` - Yemen -// - `ZM` - Zambia -// - `ZW` - Zimbabwe +// * `AF` - Afghanistan +// * `AX` - Åland Islands +// * `AL` - Albania +// * `DZ` - Algeria +// * `AS` - American Samoa +// * `AD` - Andorra +// * `AO` - Angola +// * `AI` - Anguilla +// * `AQ` - Antarctica +// * `AG` - Antigua and Barbuda +// * `AR` - Argentina +// * `AM` - Armenia +// * `AW` - Aruba +// * `AU` - Australia +// * `AT` - Austria +// * `AZ` - Azerbaijan +// * `BS` - Bahamas +// * `BH` - Bahrain +// * `BD` - Bangladesh +// * `BB` - Barbados +// * `BY` - Belarus +// * `BE` - Belgium +// * `BZ` - Belize +// * `BJ` - Benin +// * `BM` - Bermuda +// * `BT` - Bhutan +// * `BO` - Bolivia +// * `BQ` - Bonaire, Sint Eustatius and Saba +// * `BA` - Bosnia and Herzegovina +// * `BW` - Botswana +// * `BV` - Bouvet Island +// * `BR` - Brazil +// * `IO` - British Indian Ocean Territory +// * `BN` - Brunei +// * `BG` - Bulgaria +// * `BF` - Burkina Faso +// * `BI` - Burundi +// * `CV` - Cabo Verde +// * `KH` - Cambodia +// * `CM` - Cameroon +// * `CA` - Canada +// * `KY` - Cayman Islands +// * `CF` - Central African Republic +// * `TD` - Chad +// * `CL` - Chile +// * `CN` - China +// * `CX` - Christmas Island +// * `CC` - Cocos (Keeling) Islands +// * `CO` - Colombia +// * `KM` - Comoros +// * `CG` - Congo +// * `CD` - Congo (the Democratic Republic of the) +// * `CK` - Cook Islands +// * `CR` - Costa Rica +// * `CI` - Côte d'Ivoire +// * `HR` - Croatia +// * `CU` - Cuba +// * `CW` - Curaçao +// * `CY` - Cyprus +// * `CZ` - Czechia +// * `DK` - Denmark +// * `DJ` - Djibouti +// * `DM` - Dominica +// * `DO` - Dominican Republic +// * `EC` - Ecuador +// * `EG` - Egypt +// * `SV` - El Salvador +// * `GQ` - Equatorial Guinea +// * `ER` - Eritrea +// * `EE` - Estonia +// * `SZ` - Eswatini +// * `ET` - Ethiopia +// * `FK` - Falkland Islands (Malvinas) +// * `FO` - Faroe Islands +// * `FJ` - Fiji +// * `FI` - Finland +// * `FR` - France +// * `GF` - French Guiana +// * `PF` - French Polynesia +// * `TF` - French Southern Territories +// * `GA` - Gabon +// * `GM` - Gambia +// * `GE` - Georgia +// * `DE` - Germany +// * `GH` - Ghana +// * `GI` - Gibraltar +// * `GR` - Greece +// * `GL` - Greenland +// * `GD` - Grenada +// * `GP` - Guadeloupe +// * `GU` - Guam +// * `GT` - Guatemala +// * `GG` - Guernsey +// * `GN` - Guinea +// * `GW` - Guinea-Bissau +// * `GY` - Guyana +// * `HT` - Haiti +// * `HM` - Heard Island and McDonald Islands +// * `VA` - Holy See +// * `HN` - Honduras +// * `HK` - Hong Kong +// * `HU` - Hungary +// * `IS` - Iceland +// * `IN` - India +// * `ID` - Indonesia +// * `IR` - Iran +// * `IQ` - Iraq +// * `IE` - Ireland +// * `IM` - Isle of Man +// * `IL` - Israel +// * `IT` - Italy +// * `JM` - Jamaica +// * `JP` - Japan +// * `JE` - Jersey +// * `JO` - Jordan +// * `KZ` - Kazakhstan +// * `KE` - Kenya +// * `KI` - Kiribati +// * `KW` - Kuwait +// * `KG` - Kyrgyzstan +// * `LA` - Laos +// * `LV` - Latvia +// * `LB` - Lebanon +// * `LS` - Lesotho +// * `LR` - Liberia +// * `LY` - Libya +// * `LI` - Liechtenstein +// * `LT` - Lithuania +// * `LU` - Luxembourg +// * `MO` - Macao +// * `MG` - Madagascar +// * `MW` - Malawi +// * `MY` - Malaysia +// * `MV` - Maldives +// * `ML` - Mali +// * `MT` - Malta +// * `MH` - Marshall Islands +// * `MQ` - Martinique +// * `MR` - Mauritania +// * `MU` - Mauritius +// * `YT` - Mayotte +// * `MX` - Mexico +// * `FM` - Micronesia (Federated States of) +// * `MD` - Moldova +// * `MC` - Monaco +// * `MN` - Mongolia +// * `ME` - Montenegro +// * `MS` - Montserrat +// * `MA` - Morocco +// * `MZ` - Mozambique +// * `MM` - Myanmar +// * `NA` - Namibia +// * `NR` - Nauru +// * `NP` - Nepal +// * `NL` - Netherlands +// * `NC` - New Caledonia +// * `NZ` - New Zealand +// * `NI` - Nicaragua +// * `NE` - Niger +// * `NG` - Nigeria +// * `NU` - Niue +// * `NF` - Norfolk Island +// * `KP` - North Korea +// * `MK` - North Macedonia +// * `MP` - Northern Mariana Islands +// * `NO` - Norway +// * `OM` - Oman +// * `PK` - Pakistan +// * `PW` - Palau +// * `PS` - Palestine, State of +// * `PA` - Panama +// * `PG` - Papua New Guinea +// * `PY` - Paraguay +// * `PE` - Peru +// * `PH` - Philippines +// * `PN` - Pitcairn +// * `PL` - Poland +// * `PT` - Portugal +// * `PR` - Puerto Rico +// * `QA` - Qatar +// * `RE` - Réunion +// * `RO` - Romania +// * `RU` - Russia +// * `RW` - Rwanda +// * `BL` - Saint Barthélemy +// * `SH` - Saint Helena, Ascension and Tristan da Cunha +// * `KN` - Saint Kitts and Nevis +// * `LC` - Saint Lucia +// * `MF` - Saint Martin (French part) +// * `PM` - Saint Pierre and Miquelon +// * `VC` - Saint Vincent and the Grenadines +// * `WS` - Samoa +// * `SM` - San Marino +// * `ST` - Sao Tome and Principe +// * `SA` - Saudi Arabia +// * `SN` - Senegal +// * `RS` - Serbia +// * `SC` - Seychelles +// * `SL` - Sierra Leone +// * `SG` - Singapore +// * `SX` - Sint Maarten (Dutch part) +// * `SK` - Slovakia +// * `SI` - Slovenia +// * `SB` - Solomon Islands +// * `SO` - Somalia +// * `ZA` - South Africa +// * `GS` - South Georgia and the South Sandwich Islands +// * `KR` - South Korea +// * `SS` - South Sudan +// * `ES` - Spain +// * `LK` - Sri Lanka +// * `SD` - Sudan +// * `SR` - Suriname +// * `SJ` - Svalbard and Jan Mayen +// * `SE` - Sweden +// * `CH` - Switzerland +// * `SY` - Syria +// * `TW` - Taiwan +// * `TJ` - Tajikistan +// * `TZ` - Tanzania +// * `TH` - Thailand +// * `TL` - Timor-Leste +// * `TG` - Togo +// * `TK` - Tokelau +// * `TO` - Tonga +// * `TT` - Trinidad and Tobago +// * `TN` - Tunisia +// * `TR` - Turkey +// * `TM` - Turkmenistan +// * `TC` - Turks and Caicos Islands +// * `TV` - Tuvalu +// * `UG` - Uganda +// * `UA` - Ukraine +// * `AE` - United Arab Emirates +// * `GB` - United Kingdom +// * `UM` - United States Minor Outlying Islands +// * `US` - United States of America +// * `UY` - Uruguay +// * `UZ` - Uzbekistan +// * `VU` - Vanuatu +// * `VE` - Venezuela +// * `VN` - Vietnam +// * `VG` - Virgin Islands (British) +// * `VI` - Virgin Islands (U.S.) +// * `WF` - Wallis and Futuna +// * `EH` - Western Sahara +// * `YE` - Yemen +// * `ZM` - Zambia +// * `ZW` - Zimbabwe type AddressRequestCountry struct { - typeName string CountryEnum CountryEnum String string + + typ string } -func NewAddressRequestCountryFromCountryEnum(value CountryEnum) *AddressRequestCountry { - return &AddressRequestCountry{typeName: "countryEnum", CountryEnum: value} +func (a *AddressRequestCountry) GetCountryEnum() CountryEnum { + if a == nil { + return "" + } + return a.CountryEnum } -func NewAddressRequestCountryFromString(value string) *AddressRequestCountry { - return &AddressRequestCountry{typeName: "string", String: value} +func (a *AddressRequestCountry) GetString() string { + if a == nil { + return "" + } + return a.String } func (a *AddressRequestCountry) UnmarshalJSON(data []byte) error { var valueCountryEnum CountryEnum if err := json.Unmarshal(data, &valueCountryEnum); err == nil { - a.typeName = "countryEnum" + a.typ = "CountryEnum" a.CountryEnum = valueCountryEnum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" + a.typ = "String" a.String = valueString return nil } @@ -1842,14 +1977,13 @@ func (a *AddressRequestCountry) UnmarshalJSON(data []byte) error { } func (a AddressRequestCountry) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "countryEnum": + if a.typ == "CountryEnum" || a.CountryEnum != "" { return json.Marshal(a.CountryEnum) - case "string": + } + if a.typ == "String" || a.String != "" { return json.Marshal(a.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) } type AddressRequestCountryVisitor interface { @@ -1858,18 +1992,17 @@ type AddressRequestCountryVisitor interface { } func (a *AddressRequestCountry) Accept(visitor AddressRequestCountryVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "countryEnum": + if a.typ == "CountryEnum" || a.CountryEnum != "" { return visitor.VisitCountryEnum(a.CountryEnum) - case "string": + } + if a.typ == "String" || a.String != "" { return visitor.VisitString(a.String) } + return fmt.Errorf("type %T does not include a non-empty union type", a) } -// - `BILLING` - BILLING -// - `SHIPPING` - SHIPPING +// * `BILLING` - BILLING +// * `SHIPPING` - SHIPPING type AddressTypeEnum string const ( @@ -1892,252 +2025,280 @@ func (a AddressTypeEnum) Ptr() *AddressTypeEnum { return &a } -type AdvancedMetadata struct { - Id string `json:"id"` - DisplayName *string `json:"display_name,omitempty"` - Description *string `json:"description,omitempty"` - IsRequired *bool `json:"is_required,omitempty"` - IsCustom *bool `json:"is_custom,omitempty"` - FieldChoices []interface{} `json:"field_choices,omitempty"` +type AssociationSubType struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + OriginType *string `json:"origin_type,omitempty" url:"origin_type,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (a *AdvancedMetadata) UnmarshalJSON(data []byte) error { - type unmarshaler AdvancedMetadata - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (a *AssociationSubType) GetId() *string { + if a == nil { + return nil } - *a = AdvancedMetadata(value) - a._rawJSON = json.RawMessage(data) - return nil + return a.Id } -func (a *AdvancedMetadata) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } +func (a *AssociationSubType) GetCreatedAt() *time.Time { + if a == nil { + return nil } - if value, err := core.StringifyJSON(a); err == nil { - return value + return a.CreatedAt +} + +func (a *AssociationSubType) GetModifiedAt() *time.Time { + if a == nil { + return nil } - return fmt.Sprintf("%#v", a) + return a.ModifiedAt } -// # The Association Object -// -// ### Description -// -// The `Association` record refers to an instance of an Association Type. -// -// ### Usage Example -// -// TODO -type Association struct { - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - SourceObject *string `json:"source_object,omitempty"` - TargetObject *string `json:"target_object,omitempty"` - // The association type the association belongs to. - AssociationType *AssociationAssociationType `json:"association_type,omitempty"` +func (a *AssociationSubType) GetOriginType() *string { + if a == nil { + return nil + } + return a.OriginType +} - _rawJSON json.RawMessage +func (a *AssociationSubType) GetExtraProperties() map[string]interface{} { + return a.extraProperties } -func (a *Association) UnmarshalJSON(data []byte) error { - type unmarshaler Association - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { +func (a *AssociationSubType) UnmarshalJSON(data []byte) error { + type embed AssociationSubType + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*a), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *a = AssociationSubType(unmarshaler.embed) + a.CreatedAt = unmarshaler.CreatedAt.TimePtr() + a.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { return err } - *a = Association(value) - a._rawJSON = json.RawMessage(data) + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) return nil } -func (a *Association) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { +func (a *AssociationSubType) MarshalJSON() ([]byte, error) { + type embed AssociationSubType + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*a), + CreatedAt: internal.NewOptionalDateTime(a.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(a.ModifiedAt), + } + return json.Marshal(marshaler) +} + +func (a *AssociationSubType) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(a); err == nil { + if value, err := internal.StringifyJSON(a); err == nil { return value } return fmt.Sprintf("%#v", a) } -// The association type the association belongs to. -type AssociationAssociationType struct { - typeName string - String string - AssociationType *AssociationType -} +// # The AssociationType Object +// ### Description +// The `Association Type` object represents the relationship between two objects. +// ### Usage Example +// TODO +type AssociationType struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The class of the source object (Custom Object or Common Model) for the association type. + SourceObjectClass map[string]interface{} `json:"source_object_class,omitempty" url:"source_object_class,omitempty"` + TargetObjectClasses []*AssociationSubType `json:"target_object_classes,omitempty" url:"target_object_classes,omitempty"` + RemoteKeyName *string `json:"remote_key_name,omitempty" url:"remote_key_name,omitempty"` + DisplayName *string `json:"display_name,omitempty" url:"display_name,omitempty"` + Cardinality *AssociationTypeCardinality `json:"cardinality,omitempty" url:"cardinality,omitempty"` + IsRequired *bool `json:"is_required,omitempty" url:"is_required,omitempty"` -func NewAssociationAssociationTypeFromString(value string) *AssociationAssociationType { - return &AssociationAssociationType{typeName: "string", String: value} + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func NewAssociationAssociationTypeFromAssociationType(value *AssociationType) *AssociationAssociationType { - return &AssociationAssociationType{typeName: "associationType", AssociationType: value} +func (a *AssociationType) GetId() *string { + if a == nil { + return nil + } + return a.Id } -func (a *AssociationAssociationType) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" - a.String = valueString +func (a *AssociationType) GetRemoteId() *string { + if a == nil { return nil } - valueAssociationType := new(AssociationType) - if err := json.Unmarshal(data, &valueAssociationType); err == nil { - a.typeName = "associationType" - a.AssociationType = valueAssociationType + return a.RemoteId +} + +func (a *AssociationType) GetCreatedAt() *time.Time { + if a == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, a) + return a.CreatedAt } -func (a AssociationAssociationType) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "string": - return json.Marshal(a.String) - case "associationType": - return json.Marshal(a.AssociationType) +func (a *AssociationType) GetModifiedAt() *time.Time { + if a == nil { + return nil } + return a.ModifiedAt } -type AssociationAssociationTypeVisitor interface { - VisitString(string) error - VisitAssociationType(*AssociationType) error +func (a *AssociationType) GetSourceObjectClass() map[string]interface{} { + if a == nil { + return nil + } + return a.SourceObjectClass } -func (a *AssociationAssociationType) Accept(visitor AssociationAssociationTypeVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "string": - return visitor.VisitString(a.String) - case "associationType": - return visitor.VisitAssociationType(a.AssociationType) +func (a *AssociationType) GetTargetObjectClasses() []*AssociationSubType { + if a == nil { + return nil } + return a.TargetObjectClasses } -type AssociationSubType struct { - Id *string `json:"id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - OriginType *string `json:"origin_type,omitempty"` - - _rawJSON json.RawMessage +func (a *AssociationType) GetRemoteKeyName() *string { + if a == nil { + return nil + } + return a.RemoteKeyName } -func (a *AssociationSubType) UnmarshalJSON(data []byte) error { - type unmarshaler AssociationSubType - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (a *AssociationType) GetDisplayName() *string { + if a == nil { + return nil } - *a = AssociationSubType(value) - a._rawJSON = json.RawMessage(data) - return nil + return a.DisplayName } -func (a *AssociationSubType) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(a); err == nil { - return value +func (a *AssociationType) GetCardinality() *AssociationTypeCardinality { + if a == nil { + return nil } - return fmt.Sprintf("%#v", a) + return a.Cardinality } -// # The AssociationType Object -// -// ### Description -// -// The `Association Type` object represents the relationship between two objects. -// -// ### Usage Example -// -// TODO -type AssociationType struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The class of the source object (Custom Object or Common Model) for the association type. - SourceObjectClass map[string]interface{} `json:"source_object_class,omitempty"` - TargetObjectClasses []*AssociationSubType `json:"target_object_classes,omitempty"` - RemoteKeyName *string `json:"remote_key_name,omitempty"` - DisplayName *string `json:"display_name,omitempty"` - Cardinality *AssociationTypeCardinality `json:"cardinality,omitempty"` - IsRequired *bool `json:"is_required,omitempty"` +func (a *AssociationType) GetIsRequired() *bool { + if a == nil { + return nil + } + return a.IsRequired +} - _rawJSON json.RawMessage +func (a *AssociationType) GetExtraProperties() map[string]interface{} { + return a.extraProperties } func (a *AssociationType) UnmarshalJSON(data []byte) error { - type unmarshaler AssociationType - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { + type embed AssociationType + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*a), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *a = AssociationType(unmarshaler.embed) + a.CreatedAt = unmarshaler.CreatedAt.TimePtr() + a.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { return err } - *a = AssociationType(value) - a._rawJSON = json.RawMessage(data) + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) return nil } +func (a *AssociationType) MarshalJSON() ([]byte, error) { + type embed AssociationType + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*a), + CreatedAt: internal.NewOptionalDateTime(a.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(a.ModifiedAt), + } + return json.Marshal(marshaler) +} + func (a *AssociationType) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(a); err == nil { + if value, err := internal.StringifyJSON(a); err == nil { return value } return fmt.Sprintf("%#v", a) } type AssociationTypeCardinality struct { - typeName string CardinalityEnum CardinalityEnum String string + + typ string } -func NewAssociationTypeCardinalityFromCardinalityEnum(value CardinalityEnum) *AssociationTypeCardinality { - return &AssociationTypeCardinality{typeName: "cardinalityEnum", CardinalityEnum: value} +func (a *AssociationTypeCardinality) GetCardinalityEnum() CardinalityEnum { + if a == nil { + return "" + } + return a.CardinalityEnum } -func NewAssociationTypeCardinalityFromString(value string) *AssociationTypeCardinality { - return &AssociationTypeCardinality{typeName: "string", String: value} +func (a *AssociationTypeCardinality) GetString() string { + if a == nil { + return "" + } + return a.String } func (a *AssociationTypeCardinality) UnmarshalJSON(data []byte) error { var valueCardinalityEnum CardinalityEnum if err := json.Unmarshal(data, &valueCardinalityEnum); err == nil { - a.typeName = "cardinalityEnum" + a.typ = "CardinalityEnum" a.CardinalityEnum = valueCardinalityEnum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" + a.typ = "String" a.String = valueString return nil } @@ -2145,14 +2306,13 @@ func (a *AssociationTypeCardinality) UnmarshalJSON(data []byte) error { } func (a AssociationTypeCardinality) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "cardinalityEnum": + if a.typ == "CardinalityEnum" || a.CardinalityEnum != "" { return json.Marshal(a.CardinalityEnum) - case "string": + } + if a.typ == "String" || a.String != "" { return json.Marshal(a.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) } type AssociationTypeCardinalityVisitor interface { @@ -2161,385 +2321,27 @@ type AssociationTypeCardinalityVisitor interface { } func (a *AssociationTypeCardinality) Accept(visitor AssociationTypeCardinalityVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "cardinalityEnum": + if a.typ == "CardinalityEnum" || a.CardinalityEnum != "" { return visitor.VisitCardinalityEnum(a.CardinalityEnum) - case "string": + } + if a.typ == "String" || a.String != "" { return visitor.VisitString(a.String) } + return fmt.Errorf("type %T does not include a non-empty union type", a) } -type AssociationTypeRequestRequest struct { - SourceObjectClass *ObjectClassDescriptionRequest `json:"source_object_class,omitempty"` - TargetObjectClasses []*ObjectClassDescriptionRequest `json:"target_object_classes,omitempty"` - RemoteKeyName string `json:"remote_key_name"` - DisplayName *string `json:"display_name,omitempty"` - Cardinality *CardinalityEnum `json:"cardinality,omitempty"` - IsRequired *bool `json:"is_required,omitempty"` +// * `ONE_TO_ONE` - ONE_TO_ONE +// * `MANY_TO_ONE` - MANY_TO_ONE +// * `MANY_TO_MANY` - MANY_TO_MANY +// * `ONE_TO_MANY` - ONE_TO_MANY +type CardinalityEnum string - _rawJSON json.RawMessage -} - -func (a *AssociationTypeRequestRequest) UnmarshalJSON(data []byte) error { - type unmarshaler AssociationTypeRequestRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *a = AssociationTypeRequestRequest(value) - a._rawJSON = json.RawMessage(data) - return nil -} - -func (a *AssociationTypeRequestRequest) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(a); err == nil { - return value - } - return fmt.Sprintf("%#v", a) -} - -type AsyncPassthroughReciept struct { - AsyncPassthroughReceiptId string `json:"async_passthrough_receipt_id"` - - _rawJSON json.RawMessage -} - -func (a *AsyncPassthroughReciept) UnmarshalJSON(data []byte) error { - type unmarshaler AsyncPassthroughReciept - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *a = AsyncPassthroughReciept(value) - a._rawJSON = json.RawMessage(data) - return nil -} - -func (a *AsyncPassthroughReciept) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(a); err == nil { - return value - } - return fmt.Sprintf("%#v", a) -} - -type AuditLogEvent struct { - Id *string `json:"id,omitempty"` - // The User's full name at the time of this Event occurring. - UserName *string `json:"user_name,omitempty"` - // The User's email at the time of this Event occurring. - UserEmail *string `json:"user_email,omitempty"` - // Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. - // - // - `ADMIN` - ADMIN - // - `DEVELOPER` - DEVELOPER - // - `MEMBER` - MEMBER - // - `API` - API - // - `SYSTEM` - SYSTEM - // - `MERGE_TEAM` - MERGE_TEAM - Role *AuditLogEventRole `json:"role,omitempty"` - IpAddress string `json:"ip_address"` - // Designates the type of event that occurred. - // - // - `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY - // - `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY - // - `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY - // - `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY - // - `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY - // - `INVITED_USER` - INVITED_USER - // - `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED - // - `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED - // - `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT - // - `CREATED_DESTINATION` - CREATED_DESTINATION - // - `DELETED_DESTINATION` - DELETED_DESTINATION - // - `CHANGED_DESTINATION` - CHANGED_DESTINATION - // - `CHANGED_SCOPES` - CHANGED_SCOPES - // - `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION - // - `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS - // - `ENABLED_INTEGRATION` - ENABLED_INTEGRATION - // - `DISABLED_INTEGRATION` - DISABLED_INTEGRATION - // - `ENABLED_CATEGORY` - ENABLED_CATEGORY - // - `DISABLED_CATEGORY` - DISABLED_CATEGORY - // - `CHANGED_PASSWORD` - CHANGED_PASSWORD - // - `RESET_PASSWORD` - RESET_PASSWORD - // - `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - // - `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - // - `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - // - `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - // - `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING - // - `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING - // - `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING - // - `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 - // - `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - // - `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - // - `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - // - `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC - // - `MUTED_ISSUE` - MUTED_ISSUE - // - `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK - // - `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK - // - `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK - // - `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED - // - `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED - EventType *AuditLogEventEventType `json:"event_type,omitempty"` - EventDescription string `json:"event_description"` - CreatedAt *time.Time `json:"created_at,omitempty"` - - _rawJSON json.RawMessage -} - -func (a *AuditLogEvent) UnmarshalJSON(data []byte) error { - type unmarshaler AuditLogEvent - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *a = AuditLogEvent(value) - a._rawJSON = json.RawMessage(data) - return nil -} - -func (a *AuditLogEvent) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(a); err == nil { - return value - } - return fmt.Sprintf("%#v", a) -} - -// Designates the type of event that occurred. -// -// - `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY -// - `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY -// - `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY -// - `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY -// - `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY -// - `INVITED_USER` - INVITED_USER -// - `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED -// - `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED -// - `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT -// - `CREATED_DESTINATION` - CREATED_DESTINATION -// - `DELETED_DESTINATION` - DELETED_DESTINATION -// - `CHANGED_DESTINATION` - CHANGED_DESTINATION -// - `CHANGED_SCOPES` - CHANGED_SCOPES -// - `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION -// - `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS -// - `ENABLED_INTEGRATION` - ENABLED_INTEGRATION -// - `DISABLED_INTEGRATION` - DISABLED_INTEGRATION -// - `ENABLED_CATEGORY` - ENABLED_CATEGORY -// - `DISABLED_CATEGORY` - DISABLED_CATEGORY -// - `CHANGED_PASSWORD` - CHANGED_PASSWORD -// - `RESET_PASSWORD` - RESET_PASSWORD -// - `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION -// - `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT -// - `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION -// - `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT -// - `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING -// - `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING -// - `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING -// - `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 -// - `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE -// - `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE -// - `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE -// - `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC -// - `MUTED_ISSUE` - MUTED_ISSUE -// - `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK -// - `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK -// - `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK -// - `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED -// - `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED -type AuditLogEventEventType struct { - typeName string - EventTypeEnum EventTypeEnum - String string -} - -func NewAuditLogEventEventTypeFromEventTypeEnum(value EventTypeEnum) *AuditLogEventEventType { - return &AuditLogEventEventType{typeName: "eventTypeEnum", EventTypeEnum: value} -} - -func NewAuditLogEventEventTypeFromString(value string) *AuditLogEventEventType { - return &AuditLogEventEventType{typeName: "string", String: value} -} - -func (a *AuditLogEventEventType) UnmarshalJSON(data []byte) error { - var valueEventTypeEnum EventTypeEnum - if err := json.Unmarshal(data, &valueEventTypeEnum); err == nil { - a.typeName = "eventTypeEnum" - a.EventTypeEnum = valueEventTypeEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" - a.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, a) -} - -func (a AuditLogEventEventType) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "eventTypeEnum": - return json.Marshal(a.EventTypeEnum) - case "string": - return json.Marshal(a.String) - } -} - -type AuditLogEventEventTypeVisitor interface { - VisitEventTypeEnum(EventTypeEnum) error - VisitString(string) error -} - -func (a *AuditLogEventEventType) Accept(visitor AuditLogEventEventTypeVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "eventTypeEnum": - return visitor.VisitEventTypeEnum(a.EventTypeEnum) - case "string": - return visitor.VisitString(a.String) - } -} - -// Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. -// -// - `ADMIN` - ADMIN -// - `DEVELOPER` - DEVELOPER -// - `MEMBER` - MEMBER -// - `API` - API -// - `SYSTEM` - SYSTEM -// - `MERGE_TEAM` - MERGE_TEAM -type AuditLogEventRole struct { - typeName string - RoleEnum RoleEnum - String string -} - -func NewAuditLogEventRoleFromRoleEnum(value RoleEnum) *AuditLogEventRole { - return &AuditLogEventRole{typeName: "roleEnum", RoleEnum: value} -} - -func NewAuditLogEventRoleFromString(value string) *AuditLogEventRole { - return &AuditLogEventRole{typeName: "string", String: value} -} - -func (a *AuditLogEventRole) UnmarshalJSON(data []byte) error { - var valueRoleEnum RoleEnum - if err := json.Unmarshal(data, &valueRoleEnum); err == nil { - a.typeName = "roleEnum" - a.RoleEnum = valueRoleEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" - a.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, a) -} - -func (a AuditLogEventRole) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "roleEnum": - return json.Marshal(a.RoleEnum) - case "string": - return json.Marshal(a.String) - } -} - -type AuditLogEventRoleVisitor interface { - VisitRoleEnum(RoleEnum) error - VisitString(string) error -} - -func (a *AuditLogEventRole) Accept(visitor AuditLogEventRoleVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "roleEnum": - return visitor.VisitRoleEnum(a.RoleEnum) - case "string": - return visitor.VisitString(a.String) - } -} - -// # The AvailableActions Object -// -// ### Description -// -// The `Activity` object is used to see all available model/operation combinations for an integration. -// -// ### Usage Example -// -// Fetch all the actions available for the `Zenefits` integration. -type AvailableActions struct { - Integration *AccountIntegration `json:"integration,omitempty"` - PassthroughAvailable bool `json:"passthrough_available"` - AvailableModelOperations []*ModelOperation `json:"available_model_operations,omitempty"` - - _rawJSON json.RawMessage -} - -func (a *AvailableActions) UnmarshalJSON(data []byte) error { - type unmarshaler AvailableActions - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *a = AvailableActions(value) - a._rawJSON = json.RawMessage(data) - return nil -} - -func (a *AvailableActions) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(a); err == nil { - return value - } - return fmt.Sprintf("%#v", a) -} - -// - `ONE_TO_ONE` - ONE_TO_ONE -// - `MANY_TO_ONE` - MANY_TO_ONE -// - `MANY_TO_MANY` - MANY_TO_MANY -// - `ONE_TO_MANY` - ONE_TO_MANY -type CardinalityEnum string - -const ( - CardinalityEnumOneToOne CardinalityEnum = "ONE_TO_ONE" - CardinalityEnumManyToOne CardinalityEnum = "MANY_TO_ONE" - CardinalityEnumManyToMany CardinalityEnum = "MANY_TO_MANY" - CardinalityEnumOneToMany CardinalityEnum = "ONE_TO_MANY" -) +const ( + CardinalityEnumOneToOne CardinalityEnum = "ONE_TO_ONE" + CardinalityEnumManyToOne CardinalityEnum = "MANY_TO_ONE" + CardinalityEnumManyToMany CardinalityEnum = "MANY_TO_MANY" + CardinalityEnumOneToMany CardinalityEnum = "ONE_TO_MANY" +) func NewCardinalityEnumFromString(s string) (CardinalityEnum, error) { switch s { @@ -2560,13 +2362,13 @@ func (c CardinalityEnum) Ptr() *CardinalityEnum { return &c } -// - `hris` - hris -// - `ats` - ats -// - `accounting` - accounting -// - `ticketing` - ticketing -// - `crm` - crm -// - `mktg` - mktg -// - `filestorage` - filestorage +// * `hris` - hris +// * `ats` - ats +// * `accounting` - accounting +// * `ticketing` - ticketing +// * `crm` - crm +// * `mktg` - mktg +// * `filestorage` - filestorage type CategoriesEnum string const ( @@ -2604,13 +2406,13 @@ func (c CategoriesEnum) Ptr() *CategoriesEnum { return &c } -// - `hris` - hris -// - `ats` - ats -// - `accounting` - accounting -// - `ticketing` - ticketing -// - `crm` - crm -// - `mktg` - mktg -// - `filestorage` - filestorage +// * `hris` - hris +// * `ats` - ats +// * `accounting` - accounting +// * `ticketing` - ticketing +// * `crm` - crm +// * `mktg` - mktg +// * `filestorage` - filestorage type CategoryEnum string const ( @@ -2648,126 +2450,220 @@ func (c CategoryEnum) Ptr() *CategoryEnum { return &c } -type CommonModelScopeApi struct { - // The common models you want to update the scopes for - CommonModels []*IndividualCommonModelScopeDeserializer `json:"common_models,omitempty"` +// # The Contact Object +// ### Description +// The `Contact` object is used to represent an existing point of contact at a company in a CRM system. +// ### Usage Example +// TODO +type Contact struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The contact's first name. + FirstName *string `json:"first_name,omitempty" url:"first_name,omitempty"` + // The contact's last name. + LastName *string `json:"last_name,omitempty" url:"last_name,omitempty"` + // The contact's account. + Account *ContactAccount `json:"account,omitempty" url:"account,omitempty"` + // The contact's owner. + Owner *ContactOwner `json:"owner,omitempty" url:"owner,omitempty"` + Addresses []*Address `json:"addresses,omitempty" url:"addresses,omitempty"` + EmailAddresses []*EmailAddress `json:"email_addresses,omitempty" url:"email_addresses,omitempty"` + PhoneNumbers []*PhoneNumber `json:"phone_numbers,omitempty" url:"phone_numbers,omitempty"` + // When the contact's last activity occurred. + LastActivityAt *time.Time `json:"last_activity_at,omitempty" url:"last_activity_at,omitempty"` + // When the third party's contact was created. + RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty" url:"remote_created_at,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + RemoteFields []*RemoteField `json:"remote_fields,omitempty" url:"remote_fields,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (c *CommonModelScopeApi) UnmarshalJSON(data []byte) error { - type unmarshaler CommonModelScopeApi - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (c *Contact) GetId() *string { + if c == nil { + return nil } - *c = CommonModelScopeApi(value) - c._rawJSON = json.RawMessage(data) - return nil + return c.Id } -func (c *CommonModelScopeApi) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { - return value - } +func (c *Contact) GetRemoteId() *string { + if c == nil { + return nil } - if value, err := core.StringifyJSON(c); err == nil { - return value + return c.RemoteId +} + +func (c *Contact) GetCreatedAt() *time.Time { + if c == nil { + return nil } - return fmt.Sprintf("%#v", c) + return c.CreatedAt } -type CommonModelScopesBodyRequest struct { - ModelId string `json:"model_id"` - EnabledActions []EnabledActionsEnum `json:"enabled_actions,omitempty"` - DisabledFields []string `json:"disabled_fields,omitempty"` +func (c *Contact) GetModifiedAt() *time.Time { + if c == nil { + return nil + } + return c.ModifiedAt +} - _rawJSON json.RawMessage +func (c *Contact) GetFirstName() *string { + if c == nil { + return nil + } + return c.FirstName } -func (c *CommonModelScopesBodyRequest) UnmarshalJSON(data []byte) error { - type unmarshaler CommonModelScopesBodyRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (c *Contact) GetLastName() *string { + if c == nil { + return nil } - *c = CommonModelScopesBodyRequest(value) - c._rawJSON = json.RawMessage(data) - return nil + return c.LastName } -func (c *CommonModelScopesBodyRequest) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { - return value - } +func (c *Contact) GetAccount() *ContactAccount { + if c == nil { + return nil } - if value, err := core.StringifyJSON(c); err == nil { - return value + return c.Account +} + +func (c *Contact) GetOwner() *ContactOwner { + if c == nil { + return nil } - return fmt.Sprintf("%#v", c) + return c.Owner } -// # The Contact Object -// -// ### Description -// -// The `Contact` object is used to represent an existing point of contact at a company in a CRM system. -// -// ### Usage Example -// -// TODO -type Contact struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The contact's first name. - FirstName *string `json:"first_name,omitempty"` - // The contact's last name. - LastName *string `json:"last_name,omitempty"` - // The contact's account. - Account *ContactAccount `json:"account,omitempty"` - // The contact's owner. - Owner *ContactOwner `json:"owner,omitempty"` - Addresses []*Address `json:"addresses,omitempty"` - EmailAddresses []*EmailAddress `json:"email_addresses,omitempty"` - PhoneNumbers []*PhoneNumber `json:"phone_numbers,omitempty"` - // When the contact's last activity occurred. - LastActivityAt *time.Time `json:"last_activity_at,omitempty"` - // When the third party's contact was created. - RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` - RemoteFields []*RemoteField `json:"remote_fields,omitempty"` +func (c *Contact) GetAddresses() []*Address { + if c == nil { + return nil + } + return c.Addresses +} + +func (c *Contact) GetEmailAddresses() []*EmailAddress { + if c == nil { + return nil + } + return c.EmailAddresses +} + +func (c *Contact) GetPhoneNumbers() []*PhoneNumber { + if c == nil { + return nil + } + return c.PhoneNumbers +} + +func (c *Contact) GetLastActivityAt() *time.Time { + if c == nil { + return nil + } + return c.LastActivityAt +} + +func (c *Contact) GetRemoteCreatedAt() *time.Time { + if c == nil { + return nil + } + return c.RemoteCreatedAt +} + +func (c *Contact) GetRemoteWasDeleted() *bool { + if c == nil { + return nil + } + return c.RemoteWasDeleted +} + +func (c *Contact) GetFieldMappings() map[string]interface{} { + if c == nil { + return nil + } + return c.FieldMappings +} + +func (c *Contact) GetRemoteData() []*RemoteData { + if c == nil { + return nil + } + return c.RemoteData +} + +func (c *Contact) GetRemoteFields() []*RemoteField { + if c == nil { + return nil + } + return c.RemoteFields +} - _rawJSON json.RawMessage +func (c *Contact) GetExtraProperties() map[string]interface{} { + return c.extraProperties } func (c *Contact) UnmarshalJSON(data []byte) error { - type unmarshaler Contact - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { + type embed Contact + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + LastActivityAt *internal.DateTime `json:"last_activity_at,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + }{ + embed: embed(*c), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *c = Contact(unmarshaler.embed) + c.CreatedAt = unmarshaler.CreatedAt.TimePtr() + c.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + c.LastActivityAt = unmarshaler.LastActivityAt.TimePtr() + c.RemoteCreatedAt = unmarshaler.RemoteCreatedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *c) + if err != nil { return err } - *c = Contact(value) - c._rawJSON = json.RawMessage(data) + c.extraProperties = extraProperties + c.rawJSON = json.RawMessage(data) return nil } +func (c *Contact) MarshalJSON() ([]byte, error) { + type embed Contact + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + LastActivityAt *internal.DateTime `json:"last_activity_at,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + }{ + embed: embed(*c), + CreatedAt: internal.NewOptionalDateTime(c.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(c.ModifiedAt), + LastActivityAt: internal.NewOptionalDateTime(c.LastActivityAt), + RemoteCreatedAt: internal.NewOptionalDateTime(c.RemoteCreatedAt), + } + return json.Marshal(marshaler) +} + func (c *Contact) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { + if len(c.rawJSON) > 0 { + if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(c); err == nil { + if value, err := internal.StringifyJSON(c); err == nil { return value } return fmt.Sprintf("%#v", c) @@ -2775,29 +2671,36 @@ func (c *Contact) String() string { // The contact's account. type ContactAccount struct { - typeName string - String string - Account *Account + String string + Account *Account + + typ string } -func NewContactAccountFromString(value string) *ContactAccount { - return &ContactAccount{typeName: "string", String: value} +func (c *ContactAccount) GetString() string { + if c == nil { + return "" + } + return c.String } -func NewContactAccountFromAccount(value *Account) *ContactAccount { - return &ContactAccount{typeName: "account", Account: value} +func (c *ContactAccount) GetAccount() *Account { + if c == nil { + return nil + } + return c.Account } func (c *ContactAccount) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - c.typeName = "string" + c.typ = "String" c.String = valueString return nil } valueAccount := new(Account) if err := json.Unmarshal(data, &valueAccount); err == nil { - c.typeName = "account" + c.typ = "Account" c.Account = valueAccount return nil } @@ -2805,14 +2708,13 @@ func (c *ContactAccount) UnmarshalJSON(data []byte) error { } func (c ContactAccount) MarshalJSON() ([]byte, error) { - switch c.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": + if c.typ == "String" || c.String != "" { return json.Marshal(c.String) - case "account": + } + if c.typ == "Account" || c.Account != nil { return json.Marshal(c.Account) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", c) } type ContactAccountVisitor interface { @@ -2821,41 +2723,47 @@ type ContactAccountVisitor interface { } func (c *ContactAccount) Accept(visitor ContactAccountVisitor) error { - switch c.typeName { - default: - return fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": + if c.typ == "String" || c.String != "" { return visitor.VisitString(c.String) - case "account": + } + if c.typ == "Account" || c.Account != nil { return visitor.VisitAccount(c.Account) } + return fmt.Errorf("type %T does not include a non-empty union type", c) } // The contact's owner. type ContactOwner struct { - typeName string - String string - User *User + String string + User *User + + typ string } -func NewContactOwnerFromString(value string) *ContactOwner { - return &ContactOwner{typeName: "string", String: value} +func (c *ContactOwner) GetString() string { + if c == nil { + return "" + } + return c.String } -func NewContactOwnerFromUser(value *User) *ContactOwner { - return &ContactOwner{typeName: "user", User: value} +func (c *ContactOwner) GetUser() *User { + if c == nil { + return nil + } + return c.User } func (c *ContactOwner) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - c.typeName = "string" + c.typ = "String" c.String = valueString return nil } valueUser := new(User) if err := json.Unmarshal(data, &valueUser); err == nil { - c.typeName = "user" + c.typ = "User" c.User = valueUser return nil } @@ -2863,14 +2771,13 @@ func (c *ContactOwner) UnmarshalJSON(data []byte) error { } func (c ContactOwner) MarshalJSON() ([]byte, error) { - switch c.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": + if c.typ == "String" || c.String != "" { return json.Marshal(c.String) - case "user": + } + if c.typ == "User" || c.User != nil { return json.Marshal(c.User) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", c) } type ContactOwnerVisitor interface { @@ -2879,434 +2786,264 @@ type ContactOwnerVisitor interface { } func (c *ContactOwner) Accept(visitor ContactOwnerVisitor) error { - switch c.typeName { - default: - return fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return visitor.VisitString(c.String) - case "user": - return visitor.VisitUser(c.User) - } -} - -// # The Contact Object -// -// ### Description -// -// The `Contact` object is used to represent an existing point of contact at a company in a CRM system. -// -// ### Usage Example -// -// TODO -type ContactRequest struct { - // The contact's first name. - FirstName *string `json:"first_name,omitempty"` - // The contact's last name. - LastName *string `json:"last_name,omitempty"` - // The contact's account. - Account *ContactRequestAccount `json:"account,omitempty"` - // The contact's owner. - Owner *ContactRequestOwner `json:"owner,omitempty"` - Addresses []*AddressRequest `json:"addresses,omitempty"` - EmailAddresses []*EmailAddressRequest `json:"email_addresses,omitempty"` - PhoneNumbers []*PhoneNumberRequest `json:"phone_numbers,omitempty"` - // When the contact's last activity occurred. - LastActivityAt *time.Time `json:"last_activity_at,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` - RemoteFields []*RemoteFieldRequest `json:"remote_fields,omitempty"` - - _rawJSON json.RawMessage -} - -func (c *ContactRequest) UnmarshalJSON(data []byte) error { - type unmarshaler ContactRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *c = ContactRequest(value) - c._rawJSON = json.RawMessage(data) - return nil -} - -func (c *ContactRequest) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(c); err == nil { - return value - } - return fmt.Sprintf("%#v", c) -} - -// The contact's account. -type ContactRequestAccount struct { - typeName string - String string - Account *Account -} - -func NewContactRequestAccountFromString(value string) *ContactRequestAccount { - return &ContactRequestAccount{typeName: "string", String: value} -} - -func NewContactRequestAccountFromAccount(value *Account) *ContactRequestAccount { - return &ContactRequestAccount{typeName: "account", Account: value} -} - -func (c *ContactRequestAccount) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - c.typeName = "string" - c.String = valueString - return nil - } - valueAccount := new(Account) - if err := json.Unmarshal(data, &valueAccount); err == nil { - c.typeName = "account" - c.Account = valueAccount - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, c) -} - -func (c ContactRequestAccount) MarshalJSON() ([]byte, error) { - switch c.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return json.Marshal(c.String) - case "account": - return json.Marshal(c.Account) - } -} - -type ContactRequestAccountVisitor interface { - VisitString(string) error - VisitAccount(*Account) error -} - -func (c *ContactRequestAccount) Accept(visitor ContactRequestAccountVisitor) error { - switch c.typeName { - default: - return fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": + if c.typ == "String" || c.String != "" { return visitor.VisitString(c.String) - case "account": - return visitor.VisitAccount(c.Account) - } -} - -// The contact's owner. -type ContactRequestOwner struct { - typeName string - String string - User *User -} - -func NewContactRequestOwnerFromString(value string) *ContactRequestOwner { - return &ContactRequestOwner{typeName: "string", String: value} -} - -func NewContactRequestOwnerFromUser(value *User) *ContactRequestOwner { - return &ContactRequestOwner{typeName: "user", User: value} -} - -func (c *ContactRequestOwner) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - c.typeName = "string" - c.String = valueString - return nil - } - valueUser := new(User) - if err := json.Unmarshal(data, &valueUser); err == nil { - c.typeName = "user" - c.User = valueUser - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, c) -} - -func (c ContactRequestOwner) MarshalJSON() ([]byte, error) { - switch c.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return json.Marshal(c.String) - case "user": - return json.Marshal(c.User) } -} - -type ContactRequestOwnerVisitor interface { - VisitString(string) error - VisitUser(*User) error -} - -func (c *ContactRequestOwner) Accept(visitor ContactRequestOwnerVisitor) error { - switch c.typeName { - default: - return fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return visitor.VisitString(c.String) - case "user": + if c.typ == "User" || c.User != nil { return visitor.VisitUser(c.User) } -} - -// - `AF` - Afghanistan -// - `AX` - Åland Islands -// - `AL` - Albania -// - `DZ` - Algeria -// - `AS` - American Samoa -// - `AD` - Andorra -// - `AO` - Angola -// - `AI` - Anguilla -// - `AQ` - Antarctica -// - `AG` - Antigua and Barbuda -// - `AR` - Argentina -// - `AM` - Armenia -// - `AW` - Aruba -// - `AU` - Australia -// - `AT` - Austria -// - `AZ` - Azerbaijan -// - `BS` - Bahamas -// - `BH` - Bahrain -// - `BD` - Bangladesh -// - `BB` - Barbados -// - `BY` - Belarus -// - `BE` - Belgium -// - `BZ` - Belize -// - `BJ` - Benin -// - `BM` - Bermuda -// - `BT` - Bhutan -// - `BO` - Bolivia -// - `BQ` - Bonaire, Sint Eustatius and Saba -// - `BA` - Bosnia and Herzegovina -// - `BW` - Botswana -// - `BV` - Bouvet Island -// - `BR` - Brazil -// - `IO` - British Indian Ocean Territory -// - `BN` - Brunei -// - `BG` - Bulgaria -// - `BF` - Burkina Faso -// - `BI` - Burundi -// - `CV` - Cabo Verde -// - `KH` - Cambodia -// - `CM` - Cameroon -// - `CA` - Canada -// - `KY` - Cayman Islands -// - `CF` - Central African Republic -// - `TD` - Chad -// - `CL` - Chile -// - `CN` - China -// - `CX` - Christmas Island -// - `CC` - Cocos (Keeling) Islands -// - `CO` - Colombia -// - `KM` - Comoros -// - `CG` - Congo -// - `CD` - Congo (the Democratic Republic of the) -// - `CK` - Cook Islands -// - `CR` - Costa Rica -// - `CI` - Côte d'Ivoire -// - `HR` - Croatia -// - `CU` - Cuba -// - `CW` - Curaçao -// - `CY` - Cyprus -// - `CZ` - Czechia -// - `DK` - Denmark -// - `DJ` - Djibouti -// - `DM` - Dominica -// - `DO` - Dominican Republic -// - `EC` - Ecuador -// - `EG` - Egypt -// - `SV` - El Salvador -// - `GQ` - Equatorial Guinea -// - `ER` - Eritrea -// - `EE` - Estonia -// - `SZ` - Eswatini -// - `ET` - Ethiopia -// - `FK` - Falkland Islands (Malvinas) -// - `FO` - Faroe Islands -// - `FJ` - Fiji -// - `FI` - Finland -// - `FR` - France -// - `GF` - French Guiana -// - `PF` - French Polynesia -// - `TF` - French Southern Territories -// - `GA` - Gabon -// - `GM` - Gambia -// - `GE` - Georgia -// - `DE` - Germany -// - `GH` - Ghana -// - `GI` - Gibraltar -// - `GR` - Greece -// - `GL` - Greenland -// - `GD` - Grenada -// - `GP` - Guadeloupe -// - `GU` - Guam -// - `GT` - Guatemala -// - `GG` - Guernsey -// - `GN` - Guinea -// - `GW` - Guinea-Bissau -// - `GY` - Guyana -// - `HT` - Haiti -// - `HM` - Heard Island and McDonald Islands -// - `VA` - Holy See -// - `HN` - Honduras -// - `HK` - Hong Kong -// - `HU` - Hungary -// - `IS` - Iceland -// - `IN` - India -// - `ID` - Indonesia -// - `IR` - Iran -// - `IQ` - Iraq -// - `IE` - Ireland -// - `IM` - Isle of Man -// - `IL` - Israel -// - `IT` - Italy -// - `JM` - Jamaica -// - `JP` - Japan -// - `JE` - Jersey -// - `JO` - Jordan -// - `KZ` - Kazakhstan -// - `KE` - Kenya -// - `KI` - Kiribati -// - `KW` - Kuwait -// - `KG` - Kyrgyzstan -// - `LA` - Laos -// - `LV` - Latvia -// - `LB` - Lebanon -// - `LS` - Lesotho -// - `LR` - Liberia -// - `LY` - Libya -// - `LI` - Liechtenstein -// - `LT` - Lithuania -// - `LU` - Luxembourg -// - `MO` - Macao -// - `MG` - Madagascar -// - `MW` - Malawi -// - `MY` - Malaysia -// - `MV` - Maldives -// - `ML` - Mali -// - `MT` - Malta -// - `MH` - Marshall Islands -// - `MQ` - Martinique -// - `MR` - Mauritania -// - `MU` - Mauritius -// - `YT` - Mayotte -// - `MX` - Mexico -// - `FM` - Micronesia (Federated States of) -// - `MD` - Moldova -// - `MC` - Monaco -// - `MN` - Mongolia -// - `ME` - Montenegro -// - `MS` - Montserrat -// - `MA` - Morocco -// - `MZ` - Mozambique -// - `MM` - Myanmar -// - `NA` - Namibia -// - `NR` - Nauru -// - `NP` - Nepal -// - `NL` - Netherlands -// - `NC` - New Caledonia -// - `NZ` - New Zealand -// - `NI` - Nicaragua -// - `NE` - Niger -// - `NG` - Nigeria -// - `NU` - Niue -// - `NF` - Norfolk Island -// - `KP` - North Korea -// - `MK` - North Macedonia -// - `MP` - Northern Mariana Islands -// - `NO` - Norway -// - `OM` - Oman -// - `PK` - Pakistan -// - `PW` - Palau -// - `PS` - Palestine, State of -// - `PA` - Panama -// - `PG` - Papua New Guinea -// - `PY` - Paraguay -// - `PE` - Peru -// - `PH` - Philippines -// - `PN` - Pitcairn -// - `PL` - Poland -// - `PT` - Portugal -// - `PR` - Puerto Rico -// - `QA` - Qatar -// - `RE` - Réunion -// - `RO` - Romania -// - `RU` - Russia -// - `RW` - Rwanda -// - `BL` - Saint Barthélemy -// - `SH` - Saint Helena, Ascension and Tristan da Cunha -// - `KN` - Saint Kitts and Nevis -// - `LC` - Saint Lucia -// - `MF` - Saint Martin (French part) -// - `PM` - Saint Pierre and Miquelon -// - `VC` - Saint Vincent and the Grenadines -// - `WS` - Samoa -// - `SM` - San Marino -// - `ST` - Sao Tome and Principe -// - `SA` - Saudi Arabia -// - `SN` - Senegal -// - `RS` - Serbia -// - `SC` - Seychelles -// - `SL` - Sierra Leone -// - `SG` - Singapore -// - `SX` - Sint Maarten (Dutch part) -// - `SK` - Slovakia -// - `SI` - Slovenia -// - `SB` - Solomon Islands -// - `SO` - Somalia -// - `ZA` - South Africa -// - `GS` - South Georgia and the South Sandwich Islands -// - `KR` - South Korea -// - `SS` - South Sudan -// - `ES` - Spain -// - `LK` - Sri Lanka -// - `SD` - Sudan -// - `SR` - Suriname -// - `SJ` - Svalbard and Jan Mayen -// - `SE` - Sweden -// - `CH` - Switzerland -// - `SY` - Syria -// - `TW` - Taiwan -// - `TJ` - Tajikistan -// - `TZ` - Tanzania -// - `TH` - Thailand -// - `TL` - Timor-Leste -// - `TG` - Togo -// - `TK` - Tokelau -// - `TO` - Tonga -// - `TT` - Trinidad and Tobago -// - `TN` - Tunisia -// - `TR` - Turkey -// - `TM` - Turkmenistan -// - `TC` - Turks and Caicos Islands -// - `TV` - Tuvalu -// - `UG` - Uganda -// - `UA` - Ukraine -// - `AE` - United Arab Emirates -// - `GB` - United Kingdom -// - `UM` - United States Minor Outlying Islands -// - `US` - United States of America -// - `UY` - Uruguay -// - `UZ` - Uzbekistan -// - `VU` - Vanuatu -// - `VE` - Venezuela -// - `VN` - Vietnam -// - `VG` - Virgin Islands (British) -// - `VI` - Virgin Islands (U.S.) -// - `WF` - Wallis and Futuna -// - `EH` - Western Sahara -// - `YE` - Yemen -// - `ZM` - Zambia -// - `ZW` - Zimbabwe + return fmt.Errorf("type %T does not include a non-empty union type", c) +} + +// * `AF` - Afghanistan +// * `AX` - Åland Islands +// * `AL` - Albania +// * `DZ` - Algeria +// * `AS` - American Samoa +// * `AD` - Andorra +// * `AO` - Angola +// * `AI` - Anguilla +// * `AQ` - Antarctica +// * `AG` - Antigua and Barbuda +// * `AR` - Argentina +// * `AM` - Armenia +// * `AW` - Aruba +// * `AU` - Australia +// * `AT` - Austria +// * `AZ` - Azerbaijan +// * `BS` - Bahamas +// * `BH` - Bahrain +// * `BD` - Bangladesh +// * `BB` - Barbados +// * `BY` - Belarus +// * `BE` - Belgium +// * `BZ` - Belize +// * `BJ` - Benin +// * `BM` - Bermuda +// * `BT` - Bhutan +// * `BO` - Bolivia +// * `BQ` - Bonaire, Sint Eustatius and Saba +// * `BA` - Bosnia and Herzegovina +// * `BW` - Botswana +// * `BV` - Bouvet Island +// * `BR` - Brazil +// * `IO` - British Indian Ocean Territory +// * `BN` - Brunei +// * `BG` - Bulgaria +// * `BF` - Burkina Faso +// * `BI` - Burundi +// * `CV` - Cabo Verde +// * `KH` - Cambodia +// * `CM` - Cameroon +// * `CA` - Canada +// * `KY` - Cayman Islands +// * `CF` - Central African Republic +// * `TD` - Chad +// * `CL` - Chile +// * `CN` - China +// * `CX` - Christmas Island +// * `CC` - Cocos (Keeling) Islands +// * `CO` - Colombia +// * `KM` - Comoros +// * `CG` - Congo +// * `CD` - Congo (the Democratic Republic of the) +// * `CK` - Cook Islands +// * `CR` - Costa Rica +// * `CI` - Côte d'Ivoire +// * `HR` - Croatia +// * `CU` - Cuba +// * `CW` - Curaçao +// * `CY` - Cyprus +// * `CZ` - Czechia +// * `DK` - Denmark +// * `DJ` - Djibouti +// * `DM` - Dominica +// * `DO` - Dominican Republic +// * `EC` - Ecuador +// * `EG` - Egypt +// * `SV` - El Salvador +// * `GQ` - Equatorial Guinea +// * `ER` - Eritrea +// * `EE` - Estonia +// * `SZ` - Eswatini +// * `ET` - Ethiopia +// * `FK` - Falkland Islands (Malvinas) +// * `FO` - Faroe Islands +// * `FJ` - Fiji +// * `FI` - Finland +// * `FR` - France +// * `GF` - French Guiana +// * `PF` - French Polynesia +// * `TF` - French Southern Territories +// * `GA` - Gabon +// * `GM` - Gambia +// * `GE` - Georgia +// * `DE` - Germany +// * `GH` - Ghana +// * `GI` - Gibraltar +// * `GR` - Greece +// * `GL` - Greenland +// * `GD` - Grenada +// * `GP` - Guadeloupe +// * `GU` - Guam +// * `GT` - Guatemala +// * `GG` - Guernsey +// * `GN` - Guinea +// * `GW` - Guinea-Bissau +// * `GY` - Guyana +// * `HT` - Haiti +// * `HM` - Heard Island and McDonald Islands +// * `VA` - Holy See +// * `HN` - Honduras +// * `HK` - Hong Kong +// * `HU` - Hungary +// * `IS` - Iceland +// * `IN` - India +// * `ID` - Indonesia +// * `IR` - Iran +// * `IQ` - Iraq +// * `IE` - Ireland +// * `IM` - Isle of Man +// * `IL` - Israel +// * `IT` - Italy +// * `JM` - Jamaica +// * `JP` - Japan +// * `JE` - Jersey +// * `JO` - Jordan +// * `KZ` - Kazakhstan +// * `KE` - Kenya +// * `KI` - Kiribati +// * `KW` - Kuwait +// * `KG` - Kyrgyzstan +// * `LA` - Laos +// * `LV` - Latvia +// * `LB` - Lebanon +// * `LS` - Lesotho +// * `LR` - Liberia +// * `LY` - Libya +// * `LI` - Liechtenstein +// * `LT` - Lithuania +// * `LU` - Luxembourg +// * `MO` - Macao +// * `MG` - Madagascar +// * `MW` - Malawi +// * `MY` - Malaysia +// * `MV` - Maldives +// * `ML` - Mali +// * `MT` - Malta +// * `MH` - Marshall Islands +// * `MQ` - Martinique +// * `MR` - Mauritania +// * `MU` - Mauritius +// * `YT` - Mayotte +// * `MX` - Mexico +// * `FM` - Micronesia (Federated States of) +// * `MD` - Moldova +// * `MC` - Monaco +// * `MN` - Mongolia +// * `ME` - Montenegro +// * `MS` - Montserrat +// * `MA` - Morocco +// * `MZ` - Mozambique +// * `MM` - Myanmar +// * `NA` - Namibia +// * `NR` - Nauru +// * `NP` - Nepal +// * `NL` - Netherlands +// * `NC` - New Caledonia +// * `NZ` - New Zealand +// * `NI` - Nicaragua +// * `NE` - Niger +// * `NG` - Nigeria +// * `NU` - Niue +// * `NF` - Norfolk Island +// * `KP` - North Korea +// * `MK` - North Macedonia +// * `MP` - Northern Mariana Islands +// * `NO` - Norway +// * `OM` - Oman +// * `PK` - Pakistan +// * `PW` - Palau +// * `PS` - Palestine, State of +// * `PA` - Panama +// * `PG` - Papua New Guinea +// * `PY` - Paraguay +// * `PE` - Peru +// * `PH` - Philippines +// * `PN` - Pitcairn +// * `PL` - Poland +// * `PT` - Portugal +// * `PR` - Puerto Rico +// * `QA` - Qatar +// * `RE` - Réunion +// * `RO` - Romania +// * `RU` - Russia +// * `RW` - Rwanda +// * `BL` - Saint Barthélemy +// * `SH` - Saint Helena, Ascension and Tristan da Cunha +// * `KN` - Saint Kitts and Nevis +// * `LC` - Saint Lucia +// * `MF` - Saint Martin (French part) +// * `PM` - Saint Pierre and Miquelon +// * `VC` - Saint Vincent and the Grenadines +// * `WS` - Samoa +// * `SM` - San Marino +// * `ST` - Sao Tome and Principe +// * `SA` - Saudi Arabia +// * `SN` - Senegal +// * `RS` - Serbia +// * `SC` - Seychelles +// * `SL` - Sierra Leone +// * `SG` - Singapore +// * `SX` - Sint Maarten (Dutch part) +// * `SK` - Slovakia +// * `SI` - Slovenia +// * `SB` - Solomon Islands +// * `SO` - Somalia +// * `ZA` - South Africa +// * `GS` - South Georgia and the South Sandwich Islands +// * `KR` - South Korea +// * `SS` - South Sudan +// * `ES` - Spain +// * `LK` - Sri Lanka +// * `SD` - Sudan +// * `SR` - Suriname +// * `SJ` - Svalbard and Jan Mayen +// * `SE` - Sweden +// * `CH` - Switzerland +// * `SY` - Syria +// * `TW` - Taiwan +// * `TJ` - Tajikistan +// * `TZ` - Tanzania +// * `TH` - Thailand +// * `TL` - Timor-Leste +// * `TG` - Togo +// * `TK` - Tokelau +// * `TO` - Tonga +// * `TT` - Trinidad and Tobago +// * `TN` - Tunisia +// * `TR` - Turkey +// * `TM` - Turkmenistan +// * `TC` - Turks and Caicos Islands +// * `TV` - Tuvalu +// * `UG` - Uganda +// * `UA` - Ukraine +// * `AE` - United Arab Emirates +// * `GB` - United Kingdom +// * `UM` - United States Minor Outlying Islands +// * `US` - United States of America +// * `UY` - Uruguay +// * `UZ` - Uzbekistan +// * `VU` - Vanuatu +// * `VE` - Venezuela +// * `VN` - Vietnam +// * `VG` - Virgin Islands (British) +// * `VI` - Virgin Islands (U.S.) +// * `WF` - Wallis and Futuna +// * `EH` - Western Sahara +// * `YE` - Yemen +// * `ZM` - Zambia +// * `ZW` - Zimbabwe type CountryEnum string const ( @@ -4070,463 +3807,392 @@ func (c CountryEnum) Ptr() *CountryEnum { return &c } -type CrmAccountResponse struct { - Model *Account `json:"model,omitempty"` - Warnings []*WarningValidationProblem `json:"warnings,omitempty"` - Errors []*ErrorValidationProblem `json:"errors,omitempty"` - Logs []*DebugModeLog `json:"logs,omitempty"` +// # The DataPassthrough Object +// ### Description +// The `DataPassthrough` object is used to send information to an otherwise-unsupported third-party endpoint. +// +// ### Usage Example +// Create a `DataPassthrough` to get team hierarchies from your Rippling integration. +type DataPassthroughRequest struct { + Method MethodEnum `json:"method" url:"method"` + // The path of the request in the third party's platform. + Path string `json:"path" url:"path"` + // An optional override of the third party's base url for the request. + BaseUrlOverride *string `json:"base_url_override,omitempty" url:"base_url_override,omitempty"` + // The data with the request. You must include a `request_format` parameter matching the data's format + Data *string `json:"data,omitempty" url:"data,omitempty"` + // Pass an array of `MultipartFormField` objects in here instead of using the `data` param if `request_format` is set to `MULTIPART`. + MultipartFormData []*MultipartFormFieldRequest `json:"multipart_form_data,omitempty" url:"multipart_form_data,omitempty"` + // The headers to use for the request (Merge will handle the account's authorization headers). `Content-Type` header is required for passthrough. Choose content type corresponding to expected format of receiving server. + Headers map[string]interface{} `json:"headers,omitempty" url:"headers,omitempty"` + RequestFormat *RequestFormatEnum `json:"request_format,omitempty" url:"request_format,omitempty"` + // Optional. If true, the response will always be an object of the form `{"type": T, "value": ...}` where `T` will be one of `string, boolean, number, null, array, object`. + NormalizeResponse *bool `json:"normalize_response,omitempty" url:"normalize_response,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (c *CrmAccountResponse) UnmarshalJSON(data []byte) error { - type unmarshaler CrmAccountResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (d *DataPassthroughRequest) GetMethod() MethodEnum { + if d == nil { + return "" } - *c = CrmAccountResponse(value) - c._rawJSON = json.RawMessage(data) - return nil + return d.Method } -func (c *CrmAccountResponse) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(c); err == nil { - return value +func (d *DataPassthroughRequest) GetPath() string { + if d == nil { + return "" } - return fmt.Sprintf("%#v", c) + return d.Path } -type CrmAssociationTypeResponse struct { - Model *AssociationType `json:"model,omitempty"` - Warnings []*WarningValidationProblem `json:"warnings,omitempty"` - Errors []*ErrorValidationProblem `json:"errors,omitempty"` - Logs []*DebugModeLog `json:"logs,omitempty"` +func (d *DataPassthroughRequest) GetBaseUrlOverride() *string { + if d == nil { + return nil + } + return d.BaseUrlOverride +} - _rawJSON json.RawMessage +func (d *DataPassthroughRequest) GetData() *string { + if d == nil { + return nil + } + return d.Data } -func (c *CrmAssociationTypeResponse) UnmarshalJSON(data []byte) error { - type unmarshaler CrmAssociationTypeResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (d *DataPassthroughRequest) GetMultipartFormData() []*MultipartFormFieldRequest { + if d == nil { + return nil } - *c = CrmAssociationTypeResponse(value) - c._rawJSON = json.RawMessage(data) - return nil + return d.MultipartFormData } -func (c *CrmAssociationTypeResponse) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { - return value - } +func (d *DataPassthroughRequest) GetHeaders() map[string]interface{} { + if d == nil { + return nil } - if value, err := core.StringifyJSON(c); err == nil { - return value + return d.Headers +} + +func (d *DataPassthroughRequest) GetRequestFormat() *RequestFormatEnum { + if d == nil { + return nil } - return fmt.Sprintf("%#v", c) + return d.RequestFormat } -type CrmContactResponse struct { - Model *Contact `json:"model,omitempty"` - Warnings []*WarningValidationProblem `json:"warnings,omitempty"` - Errors []*ErrorValidationProblem `json:"errors,omitempty"` - Logs []*DebugModeLog `json:"logs,omitempty"` +func (d *DataPassthroughRequest) GetNormalizeResponse() *bool { + if d == nil { + return nil + } + return d.NormalizeResponse +} - _rawJSON json.RawMessage +func (d *DataPassthroughRequest) GetExtraProperties() map[string]interface{} { + return d.extraProperties } -func (c *CrmContactResponse) UnmarshalJSON(data []byte) error { - type unmarshaler CrmContactResponse +func (d *DataPassthroughRequest) UnmarshalJSON(data []byte) error { + type unmarshaler DataPassthroughRequest var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *c = CrmContactResponse(value) - c._rawJSON = json.RawMessage(data) + *d = DataPassthroughRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *d) + if err != nil { + return err + } + d.extraProperties = extraProperties + d.rawJSON = json.RawMessage(data) return nil } -func (c *CrmContactResponse) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { +func (d *DataPassthroughRequest) String() string { + if len(d.rawJSON) > 0 { + if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(c); err == nil { + if value, err := internal.StringifyJSON(d); err == nil { return value } - return fmt.Sprintf("%#v", c) + return fmt.Sprintf("%#v", d) } -type CrmCustomObjectResponse struct { - Model *CustomObject `json:"model,omitempty"` - Warnings []*WarningValidationProblem `json:"warnings,omitempty"` - Errors []*ErrorValidationProblem `json:"errors,omitempty"` - Logs []*DebugModeLog `json:"logs,omitempty"` +type DebugModeLog struct { + LogId string `json:"log_id" url:"log_id"` + DashboardView string `json:"dashboard_view" url:"dashboard_view"` + LogSummary *DebugModelLogSummary `json:"log_summary" url:"log_summary"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (c *CrmCustomObjectResponse) UnmarshalJSON(data []byte) error { - type unmarshaler CrmCustomObjectResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (d *DebugModeLog) GetLogId() string { + if d == nil { + return "" } - *c = CrmCustomObjectResponse(value) - c._rawJSON = json.RawMessage(data) - return nil + return d.LogId } -func (c *CrmCustomObjectResponse) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(c); err == nil { - return value +func (d *DebugModeLog) GetDashboardView() string { + if d == nil { + return "" } - return fmt.Sprintf("%#v", c) + return d.DashboardView } -// # The CustomObject Object -// -// ### Description -// -// The `Custom Object` record refers to an instance of a Custom Object Class. -// -// ### Usage Example -// -// TODO -type CustomObject struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The custom object class the custom object record belongs to. - ObjectClass *string `json:"object_class,omitempty"` - // The fields and values contained within the custom object record. - Fields map[string]interface{} `json:"fields,omitempty"` - RemoteFields []*RemoteField `json:"remote_fields,omitempty"` +func (d *DebugModeLog) GetLogSummary() *DebugModelLogSummary { + if d == nil { + return nil + } + return d.LogSummary +} - _rawJSON json.RawMessage +func (d *DebugModeLog) GetExtraProperties() map[string]interface{} { + return d.extraProperties } -func (c *CustomObject) UnmarshalJSON(data []byte) error { - type unmarshaler CustomObject +func (d *DebugModeLog) UnmarshalJSON(data []byte) error { + type unmarshaler DebugModeLog var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *c = CustomObject(value) - c._rawJSON = json.RawMessage(data) + *d = DebugModeLog(value) + extraProperties, err := internal.ExtractExtraProperties(data, *d) + if err != nil { + return err + } + d.extraProperties = extraProperties + d.rawJSON = json.RawMessage(data) return nil } -func (c *CustomObject) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { +func (d *DebugModeLog) String() string { + if len(d.rawJSON) > 0 { + if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(c); err == nil { + if value, err := internal.StringifyJSON(d); err == nil { return value } - return fmt.Sprintf("%#v", c) + return fmt.Sprintf("%#v", d) } -// # The Custom Object Class Object -// -// ### Description -// -// The `Custom Object Class` object is used to represent a Custom Object Schema in the remote system. -// -// ### Usage Example -// -// TODO -type CustomObjectClass struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - CreatedAt *time.Time `json:"created_at,omitempty"` - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The custom object class's name. - Name *string `json:"name,omitempty"` - // The custom object class's description. - Description *string `json:"description,omitempty"` - // The custom object class's singular and plural labels. - Labels map[string]*string `json:"labels,omitempty"` - Fields []*RemoteFieldClassForCustomObjectClass `json:"fields,omitempty"` - // The types of associations with other models that the custom object class can have. - AssociationTypes []map[string]interface{} `json:"association_types,omitempty"` - - _rawJSON json.RawMessage -} - -func (c *CustomObjectClass) UnmarshalJSON(data []byte) error { - type unmarshaler CustomObjectClass - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *c = CustomObjectClass(value) - c._rawJSON = json.RawMessage(data) - return nil +type DebugModelLogSummary struct { + Url string `json:"url" url:"url"` + Method string `json:"method" url:"method"` + StatusCode int `json:"status_code" url:"status_code"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (c *CustomObjectClass) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { - return value - } +func (d *DebugModelLogSummary) GetUrl() string { + if d == nil { + return "" } - if value, err := core.StringifyJSON(c); err == nil { - return value + return d.Url +} + +func (d *DebugModelLogSummary) GetMethod() string { + if d == nil { + return "" } - return fmt.Sprintf("%#v", c) + return d.Method } -type CustomObjectRequest struct { - Fields map[string]interface{} `json:"fields,omitempty"` +func (d *DebugModelLogSummary) GetStatusCode() int { + if d == nil { + return 0 + } + return d.StatusCode +} - _rawJSON json.RawMessage +func (d *DebugModelLogSummary) GetExtraProperties() map[string]interface{} { + return d.extraProperties } -func (c *CustomObjectRequest) UnmarshalJSON(data []byte) error { - type unmarshaler CustomObjectRequest +func (d *DebugModelLogSummary) UnmarshalJSON(data []byte) error { + type unmarshaler DebugModelLogSummary var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *c = CustomObjectRequest(value) - c._rawJSON = json.RawMessage(data) + *d = DebugModelLogSummary(value) + extraProperties, err := internal.ExtractExtraProperties(data, *d) + if err != nil { + return err + } + d.extraProperties = extraProperties + d.rawJSON = json.RawMessage(data) return nil } -func (c *CustomObjectRequest) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { +func (d *DebugModelLogSummary) String() string { + if len(d.rawJSON) > 0 { + if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(c); err == nil { + if value, err := internal.StringifyJSON(d); err == nil { return value } - return fmt.Sprintf("%#v", c) + return fmt.Sprintf("%#v", d) } -// # The DataPassthrough Object -// +// # The EmailAddress Object // ### Description -// -// The `DataPassthrough` object is used to send information to an otherwise-unsupported third-party endpoint. -// +// The `EmailAddress` object is used to represent an entity's email address. // ### Usage Example -// -// Create a `DataPassthrough` to get team hierarchies from your Rippling integration. -type DataPassthroughRequest struct { - Method MethodEnum `json:"method,omitempty"` - // The path of the request in the third party's platform. - Path string `json:"path"` - // An optional override of the third party's base url for the request. - BaseUrlOverride *string `json:"base_url_override,omitempty"` - // The data with the request. You must include a `request_format` parameter matching the data's format - Data *string `json:"data,omitempty"` - // Pass an array of `MultipartFormField` objects in here instead of using the `data` param if `request_format` is set to `MULTIPART`. - MultipartFormData []*MultipartFormFieldRequest `json:"multipart_form_data,omitempty"` - // The headers to use for the request (Merge will handle the account's authorization headers). `Content-Type` header is required for passthrough. Choose content type corresponding to expected format of receiving server. - Headers map[string]interface{} `json:"headers,omitempty"` - RequestFormat *RequestFormatEnum `json:"request_format,omitempty"` - // Optional. If true, the response will always be an object of the form `{"type": T, "value": ...}` where `T` will be one of `string, boolean, number, null, array, object`. - NormalizeResponse *bool `json:"normalize_response,omitempty"` +// Fetch from the `GET Contact` endpoint and view their email addresses. +type EmailAddress struct { + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The email address. + EmailAddress *string `json:"email_address,omitempty" url:"email_address,omitempty"` + // The email address's type. + EmailAddressType *string `json:"email_address_type,omitempty" url:"email_address_type,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (d *DataPassthroughRequest) UnmarshalJSON(data []byte) error { - type unmarshaler DataPassthroughRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (e *EmailAddress) GetCreatedAt() *time.Time { + if e == nil { + return nil } - *d = DataPassthroughRequest(value) - d._rawJSON = json.RawMessage(data) - return nil + return e.CreatedAt } -func (d *DataPassthroughRequest) String() string { - if len(d._rawJSON) > 0 { - if value, err := core.StringifyJSON(d._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(d); err == nil { - return value +func (e *EmailAddress) GetModifiedAt() *time.Time { + if e == nil { + return nil } - return fmt.Sprintf("%#v", d) -} - -type DebugModeLog struct { - LogId string `json:"log_id"` - DashboardView string `json:"dashboard_view"` - LogSummary *DebugModelLogSummary `json:"log_summary,omitempty"` - - _rawJSON json.RawMessage + return e.ModifiedAt } -func (d *DebugModeLog) UnmarshalJSON(data []byte) error { - type unmarshaler DebugModeLog - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (e *EmailAddress) GetEmailAddress() *string { + if e == nil { + return nil } - *d = DebugModeLog(value) - d._rawJSON = json.RawMessage(data) - return nil + return e.EmailAddress } -func (d *DebugModeLog) String() string { - if len(d._rawJSON) > 0 { - if value, err := core.StringifyJSON(d._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(d); err == nil { - return value +func (e *EmailAddress) GetEmailAddressType() *string { + if e == nil { + return nil } - return fmt.Sprintf("%#v", d) + return e.EmailAddressType } -type DebugModelLogSummary struct { - Url string `json:"url"` - Method string `json:"method"` - StatusCode int `json:"status_code"` - - _rawJSON json.RawMessage +func (e *EmailAddress) GetExtraProperties() map[string]interface{} { + return e.extraProperties } -func (d *DebugModelLogSummary) UnmarshalJSON(data []byte) error { - type unmarshaler DebugModelLogSummary - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { +func (e *EmailAddress) UnmarshalJSON(data []byte) error { + type embed EmailAddress + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*e), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { return err } - *d = DebugModelLogSummary(value) - d._rawJSON = json.RawMessage(data) + *e = EmailAddress(unmarshaler.embed) + e.CreatedAt = unmarshaler.CreatedAt.TimePtr() + e.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *e) + if err != nil { + return err + } + e.extraProperties = extraProperties + e.rawJSON = json.RawMessage(data) return nil } -func (d *DebugModelLogSummary) String() string { - if len(d._rawJSON) > 0 { - if value, err := core.StringifyJSON(d._rawJSON); err == nil { +func (e *EmailAddress) MarshalJSON() ([]byte, error) { + type embed EmailAddress + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*e), + CreatedAt: internal.NewOptionalDateTime(e.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(e.ModifiedAt), + } + return json.Marshal(marshaler) +} + +func (e *EmailAddress) String() string { + if len(e.rawJSON) > 0 { + if value, err := internal.StringifyJSON(e.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(d); err == nil { + if value, err := internal.StringifyJSON(e); err == nil { return value } - return fmt.Sprintf("%#v", d) -} - -// - `INBOUND` - INBOUND -// - `OUTBOUND` - OUTBOUND -type DirectionEnum string - -const ( - DirectionEnumInbound DirectionEnum = "INBOUND" - DirectionEnumOutbound DirectionEnum = "OUTBOUND" -) - -func NewDirectionEnumFromString(s string) (DirectionEnum, error) { - switch s { - case "INBOUND": - return DirectionEnumInbound, nil - case "OUTBOUND": - return DirectionEnumOutbound, nil - } - var t DirectionEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (d DirectionEnum) Ptr() *DirectionEnum { - return &d + return fmt.Sprintf("%#v", e) } // # The EmailAddress Object -// // ### Description -// // The `EmailAddress` object is used to represent an entity's email address. -// // ### Usage Example -// // Fetch from the `GET Contact` endpoint and view their email addresses. -type EmailAddress struct { - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` +type EmailAddressRequest struct { // The email address. - EmailAddress *string `json:"email_address,omitempty"` + EmailAddress *string `json:"email_address,omitempty" url:"email_address,omitempty"` // The email address's type. - EmailAddressType *string `json:"email_address_type,omitempty"` + EmailAddressType *string `json:"email_address_type,omitempty" url:"email_address_type,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (e *EmailAddress) UnmarshalJSON(data []byte) error { - type unmarshaler EmailAddress - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (e *EmailAddressRequest) GetEmailAddress() *string { + if e == nil { + return nil } - *e = EmailAddress(value) - e._rawJSON = json.RawMessage(data) - return nil + return e.EmailAddress } -func (e *EmailAddress) String() string { - if len(e._rawJSON) > 0 { - if value, err := core.StringifyJSON(e._rawJSON); err == nil { - return value - } +func (e *EmailAddressRequest) GetEmailAddressType() *string { + if e == nil { + return nil } - if value, err := core.StringifyJSON(e); err == nil { - return value + return e.EmailAddressType +} + +func (e *EmailAddressRequest) GetIntegrationParams() map[string]interface{} { + if e == nil { + return nil } - return fmt.Sprintf("%#v", e) + return e.IntegrationParams } -// # The EmailAddress Object -// -// ### Description -// -// The `EmailAddress` object is used to represent an entity's email address. -// -// ### Usage Example -// -// Fetch from the `GET Contact` endpoint and view their email addresses. -type EmailAddressRequest struct { - // The email address. - EmailAddress *string `json:"email_address,omitempty"` - // The email address's type. - EmailAddressType *string `json:"email_address_type,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` +func (e *EmailAddressRequest) GetLinkedAccountParams() map[string]interface{} { + if e == nil { + return nil + } + return e.LinkedAccountParams +} - _rawJSON json.RawMessage +func (e *EmailAddressRequest) GetExtraProperties() map[string]interface{} { + return e.extraProperties } func (e *EmailAddressRequest) UnmarshalJSON(data []byte) error { @@ -4536,49 +4202,30 @@ func (e *EmailAddressRequest) UnmarshalJSON(data []byte) error { return err } *e = EmailAddressRequest(value) - e._rawJSON = json.RawMessage(data) + extraProperties, err := internal.ExtractExtraProperties(data, *e) + if err != nil { + return err + } + e.extraProperties = extraProperties + e.rawJSON = json.RawMessage(data) return nil } func (e *EmailAddressRequest) String() string { - if len(e._rawJSON) > 0 { - if value, err := core.StringifyJSON(e._rawJSON); err == nil { + if len(e.rawJSON) > 0 { + if value, err := internal.StringifyJSON(e.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(e); err == nil { + if value, err := internal.StringifyJSON(e); err == nil { return value } return fmt.Sprintf("%#v", e) } -// - `READ` - READ -// - `WRITE` - WRITE -type EnabledActionsEnum string - -const ( - EnabledActionsEnumRead EnabledActionsEnum = "READ" - EnabledActionsEnumWrite EnabledActionsEnum = "WRITE" -) - -func NewEnabledActionsEnumFromString(s string) (EnabledActionsEnum, error) { - switch s { - case "READ": - return EnabledActionsEnumRead, nil - case "WRITE": - return EnabledActionsEnumWrite, nil - } - var t EnabledActionsEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (e EnabledActionsEnum) Ptr() *EnabledActionsEnum { - return &e -} - -// - `RAW` - RAW -// - `BASE64` - BASE64 -// - `GZIP_BASE64` - GZIP_BASE64 +// * `RAW` - RAW +// * `BASE64` - BASE64 +// * `GZIP_BASE64` - GZIP_BASE64 type EncodingEnum string const ( @@ -4604,5214 +4251,1958 @@ func (e EncodingEnum) Ptr() *EncodingEnum { return &e } -// # The Engagement Object -// +// # The Engagement Type Object // ### Description -// -// The `Engagement` object is used to represent an interaction noted in a CRM system. -// +// The `Engagement Type` object is used to represent an interaction activity. A given `Engagement` typically has an `Engagement Type` object represented in the engagement_type field. // ### Usage Example -// // TODO -type Engagement struct { - Id *string `json:"id,omitempty"` +type EngagementType struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The engagement's owner. - Owner *EngagementOwner `json:"owner,omitempty"` - // The engagement's content. - Content *string `json:"content,omitempty"` - // The engagement's subject. - Subject *string `json:"subject,omitempty"` - // The engagement's direction. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The engagement type's activity type. // - // - `INBOUND` - INBOUND - // - `OUTBOUND` - OUTBOUND - Direction *EngagementDirection `json:"direction,omitempty"` - // The engagement type of the engagement. - EngagementType *EngagementEngagementType `json:"engagement_type,omitempty"` - // The time at which the engagement started. - StartTime *time.Time `json:"start_time,omitempty"` - // The time at which the engagement ended. - EndTime *time.Time `json:"end_time,omitempty"` - // The account of the engagement. - Account *EngagementAccount `json:"account,omitempty"` - Contacts []*EngagementContactsItem `json:"contacts,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` - RemoteFields []*RemoteField `json:"remote_fields,omitempty"` + // * `CALL` - CALL + // * `MEETING` - MEETING + // * `EMAIL` - EMAIL + ActivityType *EngagementTypeActivityType `json:"activity_type,omitempty" url:"activity_type,omitempty"` + // The engagement type's name. + Name *string `json:"name,omitempty" url:"name,omitempty"` + RemoteFields []*RemoteField `json:"remote_fields,omitempty" url:"remote_fields,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (e *Engagement) UnmarshalJSON(data []byte) error { - type unmarshaler Engagement - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (e *EngagementType) GetId() *string { + if e == nil { + return nil } - *e = Engagement(value) - e._rawJSON = json.RawMessage(data) - return nil + return e.Id } -func (e *Engagement) String() string { - if len(e._rawJSON) > 0 { - if value, err := core.StringifyJSON(e._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(e); err == nil { - return value +func (e *EngagementType) GetRemoteId() *string { + if e == nil { + return nil } - return fmt.Sprintf("%#v", e) -} - -// The account of the engagement. -type EngagementAccount struct { - typeName string - String string - Account *Account + return e.RemoteId } -func NewEngagementAccountFromString(value string) *EngagementAccount { - return &EngagementAccount{typeName: "string", String: value} -} - -func NewEngagementAccountFromAccount(value *Account) *EngagementAccount { - return &EngagementAccount{typeName: "account", Account: value} -} - -func (e *EngagementAccount) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString - return nil - } - valueAccount := new(Account) - if err := json.Unmarshal(data, &valueAccount); err == nil { - e.typeName = "account" - e.Account = valueAccount +func (e *EngagementType) GetCreatedAt() *time.Time { + if e == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) + return e.CreatedAt } -func (e EngagementAccount) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return json.Marshal(e.String) - case "account": - return json.Marshal(e.Account) +func (e *EngagementType) GetModifiedAt() *time.Time { + if e == nil { + return nil } + return e.ModifiedAt } -type EngagementAccountVisitor interface { - VisitString(string) error - VisitAccount(*Account) error -} - -func (e *EngagementAccount) Accept(visitor EngagementAccountVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return visitor.VisitString(e.String) - case "account": - return visitor.VisitAccount(e.Account) +func (e *EngagementType) GetActivityType() *EngagementTypeActivityType { + if e == nil { + return nil } + return e.ActivityType } -type EngagementContactsItem struct { - typeName string - String string - Contact *Contact +func (e *EngagementType) GetName() *string { + if e == nil { + return nil + } + return e.Name } -func NewEngagementContactsItemFromString(value string) *EngagementContactsItem { - return &EngagementContactsItem{typeName: "string", String: value} +func (e *EngagementType) GetRemoteFields() []*RemoteField { + if e == nil { + return nil + } + return e.RemoteFields } -func NewEngagementContactsItemFromContact(value *Contact) *EngagementContactsItem { - return &EngagementContactsItem{typeName: "contact", Contact: value} +func (e *EngagementType) GetExtraProperties() map[string]interface{} { + return e.extraProperties } -func (e *EngagementContactsItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString - return nil +func (e *EngagementType) UnmarshalJSON(data []byte) error { + type embed EngagementType + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*e), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err } - valueContact := new(Contact) - if err := json.Unmarshal(data, &valueContact); err == nil { - e.typeName = "contact" - e.Contact = valueContact - return nil + *e = EngagementType(unmarshaler.embed) + e.CreatedAt = unmarshaler.CreatedAt.TimePtr() + e.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *e) + if err != nil { + return err } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) + e.extraProperties = extraProperties + e.rawJSON = json.RawMessage(data) + return nil } -func (e EngagementContactsItem) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return json.Marshal(e.String) - case "contact": - return json.Marshal(e.Contact) +func (e *EngagementType) MarshalJSON() ([]byte, error) { + type embed EngagementType + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*e), + CreatedAt: internal.NewOptionalDateTime(e.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(e.ModifiedAt), } + return json.Marshal(marshaler) } -type EngagementContactsItemVisitor interface { - VisitString(string) error - VisitContact(*Contact) error -} - -func (e *EngagementContactsItem) Accept(visitor EngagementContactsItemVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return visitor.VisitString(e.String) - case "contact": - return visitor.VisitContact(e.Contact) +func (e *EngagementType) String() string { + if len(e.rawJSON) > 0 { + if value, err := internal.StringifyJSON(e.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(e); err == nil { + return value } + return fmt.Sprintf("%#v", e) } -// The engagement's direction. +// The engagement type's activity type. // -// - `INBOUND` - INBOUND -// - `OUTBOUND` - OUTBOUND -type EngagementDirection struct { - typeName string - DirectionEnum DirectionEnum - String string +// * `CALL` - CALL +// * `MEETING` - MEETING +// * `EMAIL` - EMAIL +type EngagementTypeActivityType struct { + ActivityTypeEnum ActivityTypeEnum + String string + + typ string } -func NewEngagementDirectionFromDirectionEnum(value DirectionEnum) *EngagementDirection { - return &EngagementDirection{typeName: "directionEnum", DirectionEnum: value} +func (e *EngagementTypeActivityType) GetActivityTypeEnum() ActivityTypeEnum { + if e == nil { + return "" + } + return e.ActivityTypeEnum } -func NewEngagementDirectionFromString(value string) *EngagementDirection { - return &EngagementDirection{typeName: "string", String: value} +func (e *EngagementTypeActivityType) GetString() string { + if e == nil { + return "" + } + return e.String } -func (e *EngagementDirection) UnmarshalJSON(data []byte) error { - var valueDirectionEnum DirectionEnum - if err := json.Unmarshal(data, &valueDirectionEnum); err == nil { - e.typeName = "directionEnum" - e.DirectionEnum = valueDirectionEnum +func (e *EngagementTypeActivityType) UnmarshalJSON(data []byte) error { + var valueActivityTypeEnum ActivityTypeEnum + if err := json.Unmarshal(data, &valueActivityTypeEnum); err == nil { + e.typ = "ActivityTypeEnum" + e.ActivityTypeEnum = valueActivityTypeEnum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" + e.typ = "String" e.String = valueString return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, e) } -func (e EngagementDirection) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "directionEnum": - return json.Marshal(e.DirectionEnum) - case "string": +func (e EngagementTypeActivityType) MarshalJSON() ([]byte, error) { + if e.typ == "ActivityTypeEnum" || e.ActivityTypeEnum != "" { + return json.Marshal(e.ActivityTypeEnum) + } + if e.typ == "String" || e.String != "" { return json.Marshal(e.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) } -type EngagementDirectionVisitor interface { - VisitDirectionEnum(DirectionEnum) error +type EngagementTypeActivityTypeVisitor interface { + VisitActivityTypeEnum(ActivityTypeEnum) error VisitString(string) error } -func (e *EngagementDirection) Accept(visitor EngagementDirectionVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "directionEnum": - return visitor.VisitDirectionEnum(e.DirectionEnum) - case "string": +func (e *EngagementTypeActivityType) Accept(visitor EngagementTypeActivityTypeVisitor) error { + if e.typ == "ActivityTypeEnum" || e.ActivityTypeEnum != "" { + return visitor.VisitActivityTypeEnum(e.ActivityTypeEnum) + } + if e.typ == "String" || e.String != "" { return visitor.VisitString(e.String) } + return fmt.Errorf("type %T does not include a non-empty union type", e) } -// The engagement type of the engagement. -type EngagementEngagementType struct { - typeName string - String string - EngagementType *EngagementType -} - -func NewEngagementEngagementTypeFromString(value string) *EngagementEngagementType { - return &EngagementEngagementType{typeName: "string", String: value} -} +type ErrorValidationProblem struct { + Source *ValidationProblemSource `json:"source,omitempty" url:"source,omitempty"` + Title string `json:"title" url:"title"` + Detail string `json:"detail" url:"detail"` + ProblemType string `json:"problem_type" url:"problem_type"` -func NewEngagementEngagementTypeFromEngagementType(value *EngagementType) *EngagementEngagementType { - return &EngagementEngagementType{typeName: "engagementType", EngagementType: value} + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (e *EngagementEngagementType) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString - return nil - } - valueEngagementType := new(EngagementType) - if err := json.Unmarshal(data, &valueEngagementType); err == nil { - e.typeName = "engagementType" - e.EngagementType = valueEngagementType +func (e *ErrorValidationProblem) GetSource() *ValidationProblemSource { + if e == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) -} - -func (e EngagementEngagementType) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return json.Marshal(e.String) - case "engagementType": - return json.Marshal(e.EngagementType) - } -} - -type EngagementEngagementTypeVisitor interface { - VisitString(string) error - VisitEngagementType(*EngagementType) error + return e.Source } -func (e *EngagementEngagementType) Accept(visitor EngagementEngagementTypeVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return visitor.VisitString(e.String) - case "engagementType": - return visitor.VisitEngagementType(e.EngagementType) +func (e *ErrorValidationProblem) GetTitle() string { + if e == nil { + return "" } + return e.Title } -// The engagement's owner. -type EngagementOwner struct { - typeName string - String string - User *User -} - -func NewEngagementOwnerFromString(value string) *EngagementOwner { - return &EngagementOwner{typeName: "string", String: value} -} - -func NewEngagementOwnerFromUser(value *User) *EngagementOwner { - return &EngagementOwner{typeName: "user", User: value} -} - -func (e *EngagementOwner) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString - return nil - } - valueUser := new(User) - if err := json.Unmarshal(data, &valueUser); err == nil { - e.typeName = "user" - e.User = valueUser - return nil +func (e *ErrorValidationProblem) GetDetail() string { + if e == nil { + return "" } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) + return e.Detail } -func (e EngagementOwner) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return json.Marshal(e.String) - case "user": - return json.Marshal(e.User) +func (e *ErrorValidationProblem) GetProblemType() string { + if e == nil { + return "" } + return e.ProblemType } -type EngagementOwnerVisitor interface { - VisitString(string) error - VisitUser(*User) error -} - -func (e *EngagementOwner) Accept(visitor EngagementOwnerVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return visitor.VisitString(e.String) - case "user": - return visitor.VisitUser(e.User) - } +func (e *ErrorValidationProblem) GetExtraProperties() map[string]interface{} { + return e.extraProperties } -// # The Engagement Object -// -// ### Description -// -// The `Engagement` object is used to represent an interaction noted in a CRM system. -// -// ### Usage Example -// -// TODO -type EngagementRequest struct { - // The engagement's owner. - Owner *EngagementRequestOwner `json:"owner,omitempty"` - // The engagement's content. - Content *string `json:"content,omitempty"` - // The engagement's subject. - Subject *string `json:"subject,omitempty"` - // The engagement's direction. - // - // - `INBOUND` - INBOUND - // - `OUTBOUND` - OUTBOUND - Direction *EngagementRequestDirection `json:"direction,omitempty"` - // The engagement type of the engagement. - EngagementType *EngagementRequestEngagementType `json:"engagement_type,omitempty"` - // The time at which the engagement started. - StartTime *time.Time `json:"start_time,omitempty"` - // The time at which the engagement ended. - EndTime *time.Time `json:"end_time,omitempty"` - // The account of the engagement. - Account *EngagementRequestAccount `json:"account,omitempty"` - Contacts []*EngagementRequestContactsItem `json:"contacts,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` - RemoteFields []*RemoteFieldRequest `json:"remote_fields,omitempty"` - - _rawJSON json.RawMessage -} - -func (e *EngagementRequest) UnmarshalJSON(data []byte) error { - type unmarshaler EngagementRequest +func (e *ErrorValidationProblem) UnmarshalJSON(data []byte) error { + type unmarshaler ErrorValidationProblem var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *e = EngagementRequest(value) - e._rawJSON = json.RawMessage(data) + *e = ErrorValidationProblem(value) + extraProperties, err := internal.ExtractExtraProperties(data, *e) + if err != nil { + return err + } + e.extraProperties = extraProperties + e.rawJSON = json.RawMessage(data) return nil } -func (e *EngagementRequest) String() string { - if len(e._rawJSON) > 0 { - if value, err := core.StringifyJSON(e._rawJSON); err == nil { +func (e *ErrorValidationProblem) String() string { + if len(e.rawJSON) > 0 { + if value, err := internal.StringifyJSON(e.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(e); err == nil { + if value, err := internal.StringifyJSON(e); err == nil { return value } return fmt.Sprintf("%#v", e) } -// The account of the engagement. -type EngagementRequestAccount struct { - typeName string - String string - Account *Account -} - -func NewEngagementRequestAccountFromString(value string) *EngagementRequestAccount { - return &EngagementRequestAccount{typeName: "string", String: value} -} - -func NewEngagementRequestAccountFromAccount(value *Account) *EngagementRequestAccount { - return &EngagementRequestAccount{typeName: "account", Account: value} -} - -func (e *EngagementRequestAccount) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString - return nil - } - valueAccount := new(Account) - if err := json.Unmarshal(data, &valueAccount); err == nil { - e.typeName = "account" - e.Account = valueAccount - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) -} - -func (e EngagementRequestAccount) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return json.Marshal(e.String) - case "account": - return json.Marshal(e.Account) - } -} +// * `string` - string +// * `number` - number +// * `date` - date +// * `datetime` - datetime +// * `bool` - bool +// * `list` - list +type FieldFormatEnum string -type EngagementRequestAccountVisitor interface { - VisitString(string) error - VisitAccount(*Account) error -} +const ( + FieldFormatEnumString FieldFormatEnum = "string" + FieldFormatEnumNumber FieldFormatEnum = "number" + FieldFormatEnumDate FieldFormatEnum = "date" + FieldFormatEnumDatetime FieldFormatEnum = "datetime" + FieldFormatEnumBool FieldFormatEnum = "bool" + FieldFormatEnumList FieldFormatEnum = "list" +) -func (e *EngagementRequestAccount) Accept(visitor EngagementRequestAccountVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) +func NewFieldFormatEnumFromString(s string) (FieldFormatEnum, error) { + switch s { case "string": - return visitor.VisitString(e.String) - case "account": - return visitor.VisitAccount(e.Account) + return FieldFormatEnumString, nil + case "number": + return FieldFormatEnumNumber, nil + case "date": + return FieldFormatEnumDate, nil + case "datetime": + return FieldFormatEnumDatetime, nil + case "bool": + return FieldFormatEnumBool, nil + case "list": + return FieldFormatEnumList, nil } + var t FieldFormatEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -type EngagementRequestContactsItem struct { - typeName string - String string - Contact *Contact +func (f FieldFormatEnum) Ptr() *FieldFormatEnum { + return &f } -func NewEngagementRequestContactsItemFromString(value string) *EngagementRequestContactsItem { - return &EngagementRequestContactsItem{typeName: "string", String: value} -} +type FieldPermissionDeserializerRequest struct { + EnabledFields []interface{} `json:"enabled_fields,omitempty" url:"enabled_fields,omitempty"` + DisabledFields []interface{} `json:"disabled_fields,omitempty" url:"disabled_fields,omitempty"` -func NewEngagementRequestContactsItemFromContact(value *Contact) *EngagementRequestContactsItem { - return &EngagementRequestContactsItem{typeName: "contact", Contact: value} + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (e *EngagementRequestContactsItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString - return nil - } - valueContact := new(Contact) - if err := json.Unmarshal(data, &valueContact); err == nil { - e.typeName = "contact" - e.Contact = valueContact +func (f *FieldPermissionDeserializerRequest) GetEnabledFields() []interface{} { + if f == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) + return f.EnabledFields } -func (e EngagementRequestContactsItem) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return json.Marshal(e.String) - case "contact": - return json.Marshal(e.Contact) +func (f *FieldPermissionDeserializerRequest) GetDisabledFields() []interface{} { + if f == nil { + return nil } + return f.DisabledFields } -type EngagementRequestContactsItemVisitor interface { - VisitString(string) error - VisitContact(*Contact) error +func (f *FieldPermissionDeserializerRequest) GetExtraProperties() map[string]interface{} { + return f.extraProperties } -func (e *EngagementRequestContactsItem) Accept(visitor EngagementRequestContactsItemVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return visitor.VisitString(e.String) - case "contact": - return visitor.VisitContact(e.Contact) +func (f *FieldPermissionDeserializerRequest) UnmarshalJSON(data []byte) error { + type unmarshaler FieldPermissionDeserializerRequest + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err } + *f = FieldPermissionDeserializerRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { + return err + } + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) + return nil } -// The engagement's direction. -// -// - `INBOUND` - INBOUND -// - `OUTBOUND` - OUTBOUND -type EngagementRequestDirection struct { - typeName string - DirectionEnum DirectionEnum - String string -} - -func NewEngagementRequestDirectionFromDirectionEnum(value DirectionEnum) *EngagementRequestDirection { - return &EngagementRequestDirection{typeName: "directionEnum", DirectionEnum: value} -} - -func NewEngagementRequestDirectionFromString(value string) *EngagementRequestDirection { - return &EngagementRequestDirection{typeName: "string", String: value} -} - -func (e *EngagementRequestDirection) UnmarshalJSON(data []byte) error { - var valueDirectionEnum DirectionEnum - if err := json.Unmarshal(data, &valueDirectionEnum); err == nil { - e.typeName = "directionEnum" - e.DirectionEnum = valueDirectionEnum - return nil +func (f *FieldPermissionDeserializerRequest) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { + return value + } } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString - return nil + if value, err := internal.StringifyJSON(f); err == nil { + return value } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) + return fmt.Sprintf("%#v", f) } -func (e EngagementRequestDirection) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "directionEnum": - return json.Marshal(e.DirectionEnum) - case "string": - return json.Marshal(e.String) - } -} +// * `string` - string +// * `number` - number +// * `date` - date +// * `datetime` - datetime +// * `bool` - bool +// * `list` - list +type FieldTypeEnum string -type EngagementRequestDirectionVisitor interface { - VisitDirectionEnum(DirectionEnum) error - VisitString(string) error -} +const ( + FieldTypeEnumString FieldTypeEnum = "string" + FieldTypeEnumNumber FieldTypeEnum = "number" + FieldTypeEnumDate FieldTypeEnum = "date" + FieldTypeEnumDatetime FieldTypeEnum = "datetime" + FieldTypeEnumBool FieldTypeEnum = "bool" + FieldTypeEnumList FieldTypeEnum = "list" +) -func (e *EngagementRequestDirection) Accept(visitor EngagementRequestDirectionVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "directionEnum": - return visitor.VisitDirectionEnum(e.DirectionEnum) +func NewFieldTypeEnumFromString(s string) (FieldTypeEnum, error) { + switch s { case "string": - return visitor.VisitString(e.String) + return FieldTypeEnumString, nil + case "number": + return FieldTypeEnumNumber, nil + case "date": + return FieldTypeEnumDate, nil + case "datetime": + return FieldTypeEnumDatetime, nil + case "bool": + return FieldTypeEnumBool, nil + case "list": + return FieldTypeEnumList, nil } + var t FieldTypeEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -// The engagement type of the engagement. -type EngagementRequestEngagementType struct { - typeName string - String string - EngagementType *EngagementType +func (f FieldTypeEnum) Ptr() *FieldTypeEnum { + return &f } -func NewEngagementRequestEngagementTypeFromString(value string) *EngagementRequestEngagementType { - return &EngagementRequestEngagementType{typeName: "string", String: value} -} +type IgnoreCommonModelRequest struct { + Reason *IgnoreCommonModelRequestReason `json:"reason" url:"reason"` + Message *string `json:"message,omitempty" url:"message,omitempty"` -func NewEngagementRequestEngagementTypeFromEngagementType(value *EngagementType) *EngagementRequestEngagementType { - return &EngagementRequestEngagementType{typeName: "engagementType", EngagementType: value} + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (e *EngagementRequestEngagementType) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString +func (i *IgnoreCommonModelRequest) GetReason() *IgnoreCommonModelRequestReason { + if i == nil { return nil } - valueEngagementType := new(EngagementType) - if err := json.Unmarshal(data, &valueEngagementType); err == nil { - e.typeName = "engagementType" - e.EngagementType = valueEngagementType + return i.Reason +} + +func (i *IgnoreCommonModelRequest) GetMessage() *string { + if i == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) + return i.Message } -func (e EngagementRequestEngagementType) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return json.Marshal(e.String) - case "engagementType": - return json.Marshal(e.EngagementType) - } +func (i *IgnoreCommonModelRequest) GetExtraProperties() map[string]interface{} { + return i.extraProperties } -type EngagementRequestEngagementTypeVisitor interface { - VisitString(string) error - VisitEngagementType(*EngagementType) error +func (i *IgnoreCommonModelRequest) UnmarshalJSON(data []byte) error { + type unmarshaler IgnoreCommonModelRequest + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *i = IgnoreCommonModelRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *i) + if err != nil { + return err + } + i.extraProperties = extraProperties + i.rawJSON = json.RawMessage(data) + return nil } -func (e *EngagementRequestEngagementType) Accept(visitor EngagementRequestEngagementTypeVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return visitor.VisitString(e.String) - case "engagementType": - return visitor.VisitEngagementType(e.EngagementType) +func (i *IgnoreCommonModelRequest) String() string { + if len(i.rawJSON) > 0 { + if value, err := internal.StringifyJSON(i.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(i); err == nil { + return value } + return fmt.Sprintf("%#v", i) } -// The engagement's owner. -type EngagementRequestOwner struct { - typeName string - String string - User *User +type IgnoreCommonModelRequestReason struct { + ReasonEnum ReasonEnum + String string + + typ string } -func NewEngagementRequestOwnerFromString(value string) *EngagementRequestOwner { - return &EngagementRequestOwner{typeName: "string", String: value} +func (i *IgnoreCommonModelRequestReason) GetReasonEnum() ReasonEnum { + if i == nil { + return "" + } + return i.ReasonEnum } -func NewEngagementRequestOwnerFromUser(value *User) *EngagementRequestOwner { - return &EngagementRequestOwner{typeName: "user", User: value} +func (i *IgnoreCommonModelRequestReason) GetString() string { + if i == nil { + return "" + } + return i.String } -func (e *EngagementRequestOwner) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString +func (i *IgnoreCommonModelRequestReason) UnmarshalJSON(data []byte) error { + var valueReasonEnum ReasonEnum + if err := json.Unmarshal(data, &valueReasonEnum); err == nil { + i.typ = "ReasonEnum" + i.ReasonEnum = valueReasonEnum return nil } - valueUser := new(User) - if err := json.Unmarshal(data, &valueUser); err == nil { - e.typeName = "user" - e.User = valueUser + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + i.typ = "String" + i.String = valueString return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) } -func (e EngagementRequestOwner) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return json.Marshal(e.String) - case "user": - return json.Marshal(e.User) +func (i IgnoreCommonModelRequestReason) MarshalJSON() ([]byte, error) { + if i.typ == "ReasonEnum" || i.ReasonEnum != "" { + return json.Marshal(i.ReasonEnum) + } + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) } -type EngagementRequestOwnerVisitor interface { +type IgnoreCommonModelRequestReasonVisitor interface { + VisitReasonEnum(ReasonEnum) error VisitString(string) error - VisitUser(*User) error } -func (e *EngagementRequestOwner) Accept(visitor EngagementRequestOwnerVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return visitor.VisitString(e.String) - case "user": - return visitor.VisitUser(e.User) +func (i *IgnoreCommonModelRequestReason) Accept(visitor IgnoreCommonModelRequestReasonVisitor) error { + if i.typ == "ReasonEnum" || i.ReasonEnum != "" { + return visitor.VisitReasonEnum(i.ReasonEnum) + } + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) } + return fmt.Errorf("type %T does not include a non-empty union type", i) } -type EngagementResponse struct { - Model *Engagement `json:"model,omitempty"` - Warnings []*WarningValidationProblem `json:"warnings,omitempty"` - Errors []*ErrorValidationProblem `json:"errors,omitempty"` - Logs []*DebugModeLog `json:"logs,omitempty"` +type IndividualCommonModelScopeDeserializerRequest struct { + ModelName string `json:"model_name" url:"model_name"` + ModelPermissions map[string]*ModelPermissionDeserializerRequest `json:"model_permissions,omitempty" url:"model_permissions,omitempty"` + FieldPermissions *FieldPermissionDeserializerRequest `json:"field_permissions,omitempty" url:"field_permissions,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (e *EngagementResponse) UnmarshalJSON(data []byte) error { - type unmarshaler EngagementResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (i *IndividualCommonModelScopeDeserializerRequest) GetModelName() string { + if i == nil { + return "" } - *e = EngagementResponse(value) - e._rawJSON = json.RawMessage(data) - return nil + return i.ModelName } -func (e *EngagementResponse) String() string { - if len(e._rawJSON) > 0 { - if value, err := core.StringifyJSON(e._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(e); err == nil { - return value +func (i *IndividualCommonModelScopeDeserializerRequest) GetModelPermissions() map[string]*ModelPermissionDeserializerRequest { + if i == nil { + return nil } - return fmt.Sprintf("%#v", e) + return i.ModelPermissions } -// # The Engagement Type Object -// -// ### Description -// -// The `Engagement Type` object is used to represent an interaction activity. A given `Engagement` typically has an `Engagement Type` object represented in the engagement_type field. -// -// ### Usage Example -// -// TODO -type EngagementType struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The engagement type's activity type. - // - // - `CALL` - CALL - // - `MEETING` - MEETING - // - `EMAIL` - EMAIL - ActivityType *EngagementTypeActivityType `json:"activity_type,omitempty"` - // The engagement type's name. - Name *string `json:"name,omitempty"` - RemoteFields []*RemoteField `json:"remote_fields,omitempty"` +func (i *IndividualCommonModelScopeDeserializerRequest) GetFieldPermissions() *FieldPermissionDeserializerRequest { + if i == nil { + return nil + } + return i.FieldPermissions +} - _rawJSON json.RawMessage +func (i *IndividualCommonModelScopeDeserializerRequest) GetExtraProperties() map[string]interface{} { + return i.extraProperties } -func (e *EngagementType) UnmarshalJSON(data []byte) error { - type unmarshaler EngagementType +func (i *IndividualCommonModelScopeDeserializerRequest) UnmarshalJSON(data []byte) error { + type unmarshaler IndividualCommonModelScopeDeserializerRequest var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *e = EngagementType(value) - e._rawJSON = json.RawMessage(data) + *i = IndividualCommonModelScopeDeserializerRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *i) + if err != nil { + return err + } + i.extraProperties = extraProperties + i.rawJSON = json.RawMessage(data) return nil } -func (e *EngagementType) String() string { - if len(e._rawJSON) > 0 { - if value, err := core.StringifyJSON(e._rawJSON); err == nil { +func (i *IndividualCommonModelScopeDeserializerRequest) String() string { + if len(i.rawJSON) > 0 { + if value, err := internal.StringifyJSON(i.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(e); err == nil { + if value, err := internal.StringifyJSON(i); err == nil { return value } - return fmt.Sprintf("%#v", e) -} - -// The engagement type's activity type. -// -// - `CALL` - CALL -// - `MEETING` - MEETING -// - `EMAIL` - EMAIL -type EngagementTypeActivityType struct { - typeName string - ActivityTypeEnum ActivityTypeEnum - String string -} - -func NewEngagementTypeActivityTypeFromActivityTypeEnum(value ActivityTypeEnum) *EngagementTypeActivityType { - return &EngagementTypeActivityType{typeName: "activityTypeEnum", ActivityTypeEnum: value} + return fmt.Sprintf("%#v", i) } -func NewEngagementTypeActivityTypeFromString(value string) *EngagementTypeActivityType { - return &EngagementTypeActivityType{typeName: "string", String: value} -} +// * `string` - uuid +// * `number` - url +// * `date` - email +// * `datetime` - phone +// * `bool` - currency +// * `list` - decimal +type ItemFormatEnum string -func (e *EngagementTypeActivityType) UnmarshalJSON(data []byte) error { - var valueActivityTypeEnum ActivityTypeEnum - if err := json.Unmarshal(data, &valueActivityTypeEnum); err == nil { - e.typeName = "activityTypeEnum" - e.ActivityTypeEnum = valueActivityTypeEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) -} +const ( + ItemFormatEnumString ItemFormatEnum = "string" + ItemFormatEnumNumber ItemFormatEnum = "number" + ItemFormatEnumDate ItemFormatEnum = "date" + ItemFormatEnumDatetime ItemFormatEnum = "datetime" + ItemFormatEnumBool ItemFormatEnum = "bool" + ItemFormatEnumList ItemFormatEnum = "list" +) -func (e EngagementTypeActivityType) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "activityTypeEnum": - return json.Marshal(e.ActivityTypeEnum) +func NewItemFormatEnumFromString(s string) (ItemFormatEnum, error) { + switch s { case "string": - return json.Marshal(e.String) - } -} - -type EngagementTypeActivityTypeVisitor interface { - VisitActivityTypeEnum(ActivityTypeEnum) error - VisitString(string) error -} - -func (e *EngagementTypeActivityType) Accept(visitor EngagementTypeActivityTypeVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "activityTypeEnum": - return visitor.VisitActivityTypeEnum(e.ActivityTypeEnum) - case "string": - return visitor.VisitString(e.String) - } -} - -type ErrorValidationProblem struct { - Source *ValidationProblemSource `json:"source,omitempty"` - Title string `json:"title"` - Detail string `json:"detail"` - ProblemType string `json:"problem_type"` - - _rawJSON json.RawMessage -} - -func (e *ErrorValidationProblem) UnmarshalJSON(data []byte) error { - type unmarshaler ErrorValidationProblem - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *e = ErrorValidationProblem(value) - e._rawJSON = json.RawMessage(data) - return nil -} - -func (e *ErrorValidationProblem) String() string { - if len(e._rawJSON) > 0 { - if value, err := core.StringifyJSON(e._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(e); err == nil { - return value - } - return fmt.Sprintf("%#v", e) -} - -// - `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY -// - `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY -// - `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY -// - `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY -// - `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY -// - `INVITED_USER` - INVITED_USER -// - `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED -// - `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED -// - `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT -// - `CREATED_DESTINATION` - CREATED_DESTINATION -// - `DELETED_DESTINATION` - DELETED_DESTINATION -// - `CHANGED_DESTINATION` - CHANGED_DESTINATION -// - `CHANGED_SCOPES` - CHANGED_SCOPES -// - `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION -// - `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS -// - `ENABLED_INTEGRATION` - ENABLED_INTEGRATION -// - `DISABLED_INTEGRATION` - DISABLED_INTEGRATION -// - `ENABLED_CATEGORY` - ENABLED_CATEGORY -// - `DISABLED_CATEGORY` - DISABLED_CATEGORY -// - `CHANGED_PASSWORD` - CHANGED_PASSWORD -// - `RESET_PASSWORD` - RESET_PASSWORD -// - `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION -// - `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT -// - `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION -// - `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT -// - `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING -// - `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING -// - `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING -// - `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 -// - `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE -// - `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE -// - `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE -// - `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC -// - `MUTED_ISSUE` - MUTED_ISSUE -// - `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK -// - `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK -// - `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK -// - `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED -// - `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED -type EventTypeEnum string - -const ( - EventTypeEnumCreatedRemoteProductionApiKey EventTypeEnum = "CREATED_REMOTE_PRODUCTION_API_KEY" - EventTypeEnumDeletedRemoteProductionApiKey EventTypeEnum = "DELETED_REMOTE_PRODUCTION_API_KEY" - EventTypeEnumCreatedTestApiKey EventTypeEnum = "CREATED_TEST_API_KEY" - EventTypeEnumDeletedTestApiKey EventTypeEnum = "DELETED_TEST_API_KEY" - EventTypeEnumRegeneratedProductionApiKey EventTypeEnum = "REGENERATED_PRODUCTION_API_KEY" - EventTypeEnumInvitedUser EventTypeEnum = "INVITED_USER" - EventTypeEnumTwoFactorAuthEnabled EventTypeEnum = "TWO_FACTOR_AUTH_ENABLED" - EventTypeEnumTwoFactorAuthDisabled EventTypeEnum = "TWO_FACTOR_AUTH_DISABLED" - EventTypeEnumDeletedLinkedAccount EventTypeEnum = "DELETED_LINKED_ACCOUNT" - EventTypeEnumCreatedDestination EventTypeEnum = "CREATED_DESTINATION" - EventTypeEnumDeletedDestination EventTypeEnum = "DELETED_DESTINATION" - EventTypeEnumChangedDestination EventTypeEnum = "CHANGED_DESTINATION" - EventTypeEnumChangedScopes EventTypeEnum = "CHANGED_SCOPES" - EventTypeEnumChangedPersonalInformation EventTypeEnum = "CHANGED_PERSONAL_INFORMATION" - EventTypeEnumChangedOrganizationSettings EventTypeEnum = "CHANGED_ORGANIZATION_SETTINGS" - EventTypeEnumEnabledIntegration EventTypeEnum = "ENABLED_INTEGRATION" - EventTypeEnumDisabledIntegration EventTypeEnum = "DISABLED_INTEGRATION" - EventTypeEnumEnabledCategory EventTypeEnum = "ENABLED_CATEGORY" - EventTypeEnumDisabledCategory EventTypeEnum = "DISABLED_CATEGORY" - EventTypeEnumChangedPassword EventTypeEnum = "CHANGED_PASSWORD" - EventTypeEnumResetPassword EventTypeEnum = "RESET_PASSWORD" - EventTypeEnumEnabledRedactUnmappedDataForOrganization EventTypeEnum = "ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION" - EventTypeEnumEnabledRedactUnmappedDataForLinkedAccount EventTypeEnum = "ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT" - EventTypeEnumDisabledRedactUnmappedDataForOrganization EventTypeEnum = "DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION" - EventTypeEnumDisabledRedactUnmappedDataForLinkedAccount EventTypeEnum = "DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT" - EventTypeEnumCreatedIntegrationWideFieldMapping EventTypeEnum = "CREATED_INTEGRATION_WIDE_FIELD_MAPPING" - EventTypeEnumCreatedLinkedAccountFieldMapping EventTypeEnum = "CREATED_LINKED_ACCOUNT_FIELD_MAPPING" - EventTypeEnumChangedIntegrationWideFieldMapping EventTypeEnum = "CHANGED_INTEGRATION_WIDE_FIELD_MAPPING" - EventTypeEnumChangedLinkedAccountFieldMapping EventTypeEnum = "CHANGED_LINKED_ACCOUNT_FIELD_MAPPING" - EventTypeEnumDeletedIntegrationWideFieldMapping EventTypeEnum = "DELETED_INTEGRATION_WIDE_FIELD_MAPPING" - EventTypeEnumDeletedLinkedAccountFieldMapping EventTypeEnum = "DELETED_LINKED_ACCOUNT_FIELD_MAPPING" - EventTypeEnumCreatedLinkedAccountCommonModelOverride EventTypeEnum = "CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE" - EventTypeEnumChangedLinkedAccountCommonModelOverride EventTypeEnum = "CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE" - EventTypeEnumDeletedLinkedAccountCommonModelOverride EventTypeEnum = "DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE" - EventTypeEnumForcedLinkedAccountResync EventTypeEnum = "FORCED_LINKED_ACCOUNT_RESYNC" - EventTypeEnumMutedIssue EventTypeEnum = "MUTED_ISSUE" - EventTypeEnumGeneratedMagicLink EventTypeEnum = "GENERATED_MAGIC_LINK" - EventTypeEnumEnabledMergeWebhook EventTypeEnum = "ENABLED_MERGE_WEBHOOK" - EventTypeEnumDisabledMergeWebhook EventTypeEnum = "DISABLED_MERGE_WEBHOOK" - EventTypeEnumMergeWebhookTargetChanged EventTypeEnum = "MERGE_WEBHOOK_TARGET_CHANGED" - EventTypeEnumEndUserCredentialsAccessed EventTypeEnum = "END_USER_CREDENTIALS_ACCESSED" -) - -func NewEventTypeEnumFromString(s string) (EventTypeEnum, error) { - switch s { - case "CREATED_REMOTE_PRODUCTION_API_KEY": - return EventTypeEnumCreatedRemoteProductionApiKey, nil - case "DELETED_REMOTE_PRODUCTION_API_KEY": - return EventTypeEnumDeletedRemoteProductionApiKey, nil - case "CREATED_TEST_API_KEY": - return EventTypeEnumCreatedTestApiKey, nil - case "DELETED_TEST_API_KEY": - return EventTypeEnumDeletedTestApiKey, nil - case "REGENERATED_PRODUCTION_API_KEY": - return EventTypeEnumRegeneratedProductionApiKey, nil - case "INVITED_USER": - return EventTypeEnumInvitedUser, nil - case "TWO_FACTOR_AUTH_ENABLED": - return EventTypeEnumTwoFactorAuthEnabled, nil - case "TWO_FACTOR_AUTH_DISABLED": - return EventTypeEnumTwoFactorAuthDisabled, nil - case "DELETED_LINKED_ACCOUNT": - return EventTypeEnumDeletedLinkedAccount, nil - case "CREATED_DESTINATION": - return EventTypeEnumCreatedDestination, nil - case "DELETED_DESTINATION": - return EventTypeEnumDeletedDestination, nil - case "CHANGED_DESTINATION": - return EventTypeEnumChangedDestination, nil - case "CHANGED_SCOPES": - return EventTypeEnumChangedScopes, nil - case "CHANGED_PERSONAL_INFORMATION": - return EventTypeEnumChangedPersonalInformation, nil - case "CHANGED_ORGANIZATION_SETTINGS": - return EventTypeEnumChangedOrganizationSettings, nil - case "ENABLED_INTEGRATION": - return EventTypeEnumEnabledIntegration, nil - case "DISABLED_INTEGRATION": - return EventTypeEnumDisabledIntegration, nil - case "ENABLED_CATEGORY": - return EventTypeEnumEnabledCategory, nil - case "DISABLED_CATEGORY": - return EventTypeEnumDisabledCategory, nil - case "CHANGED_PASSWORD": - return EventTypeEnumChangedPassword, nil - case "RESET_PASSWORD": - return EventTypeEnumResetPassword, nil - case "ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION": - return EventTypeEnumEnabledRedactUnmappedDataForOrganization, nil - case "ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT": - return EventTypeEnumEnabledRedactUnmappedDataForLinkedAccount, nil - case "DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION": - return EventTypeEnumDisabledRedactUnmappedDataForOrganization, nil - case "DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT": - return EventTypeEnumDisabledRedactUnmappedDataForLinkedAccount, nil - case "CREATED_INTEGRATION_WIDE_FIELD_MAPPING": - return EventTypeEnumCreatedIntegrationWideFieldMapping, nil - case "CREATED_LINKED_ACCOUNT_FIELD_MAPPING": - return EventTypeEnumCreatedLinkedAccountFieldMapping, nil - case "CHANGED_INTEGRATION_WIDE_FIELD_MAPPING": - return EventTypeEnumChangedIntegrationWideFieldMapping, nil - case "CHANGED_LINKED_ACCOUNT_FIELD_MAPPING": - return EventTypeEnumChangedLinkedAccountFieldMapping, nil - case "DELETED_INTEGRATION_WIDE_FIELD_MAPPING": - return EventTypeEnumDeletedIntegrationWideFieldMapping, nil - case "DELETED_LINKED_ACCOUNT_FIELD_MAPPING": - return EventTypeEnumDeletedLinkedAccountFieldMapping, nil - case "CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE": - return EventTypeEnumCreatedLinkedAccountCommonModelOverride, nil - case "CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE": - return EventTypeEnumChangedLinkedAccountCommonModelOverride, nil - case "DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE": - return EventTypeEnumDeletedLinkedAccountCommonModelOverride, nil - case "FORCED_LINKED_ACCOUNT_RESYNC": - return EventTypeEnumForcedLinkedAccountResync, nil - case "MUTED_ISSUE": - return EventTypeEnumMutedIssue, nil - case "GENERATED_MAGIC_LINK": - return EventTypeEnumGeneratedMagicLink, nil - case "ENABLED_MERGE_WEBHOOK": - return EventTypeEnumEnabledMergeWebhook, nil - case "DISABLED_MERGE_WEBHOOK": - return EventTypeEnumDisabledMergeWebhook, nil - case "MERGE_WEBHOOK_TARGET_CHANGED": - return EventTypeEnumMergeWebhookTargetChanged, nil - case "END_USER_CREDENTIALS_ACCESSED": - return EventTypeEnumEndUserCredentialsAccessed, nil - } - var t EventTypeEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (e EventTypeEnum) Ptr() *EventTypeEnum { - return &e -} - -type ExternalTargetFieldApi struct { - Name *string `json:"name,omitempty"` - Description *string `json:"description,omitempty"` - IsMapped *string `json:"is_mapped,omitempty"` - - _rawJSON json.RawMessage -} - -func (e *ExternalTargetFieldApi) UnmarshalJSON(data []byte) error { - type unmarshaler ExternalTargetFieldApi - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *e = ExternalTargetFieldApi(value) - e._rawJSON = json.RawMessage(data) - return nil -} - -func (e *ExternalTargetFieldApi) String() string { - if len(e._rawJSON) > 0 { - if value, err := core.StringifyJSON(e._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(e); err == nil { - return value - } - return fmt.Sprintf("%#v", e) -} - -type ExternalTargetFieldApiResponse struct { - Account []*ExternalTargetFieldApi `json:"Account,omitempty"` - Contact []*ExternalTargetFieldApi `json:"Contact,omitempty"` - Lead []*ExternalTargetFieldApi `json:"Lead,omitempty"` - Note []*ExternalTargetFieldApi `json:"Note,omitempty"` - Opportunity []*ExternalTargetFieldApi `json:"Opportunity,omitempty"` - Stage []*ExternalTargetFieldApi `json:"Stage,omitempty"` - User []*ExternalTargetFieldApi `json:"User,omitempty"` - Task []*ExternalTargetFieldApi `json:"Task,omitempty"` - Engagement []*ExternalTargetFieldApi `json:"Engagement,omitempty"` - - _rawJSON json.RawMessage -} - -func (e *ExternalTargetFieldApiResponse) UnmarshalJSON(data []byte) error { - type unmarshaler ExternalTargetFieldApiResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *e = ExternalTargetFieldApiResponse(value) - e._rawJSON = json.RawMessage(data) - return nil -} - -func (e *ExternalTargetFieldApiResponse) String() string { - if len(e._rawJSON) > 0 { - if value, err := core.StringifyJSON(e._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(e); err == nil { - return value - } - return fmt.Sprintf("%#v", e) -} - -// - `string` - string -// - `number` - number -// - `date` - date -// - `datetime` - datetime -// - `bool` - bool -// - `list` - list -type FieldFormatEnum string - -const ( - FieldFormatEnumString FieldFormatEnum = "string" - FieldFormatEnumNumber FieldFormatEnum = "number" - FieldFormatEnumDate FieldFormatEnum = "date" - FieldFormatEnumDatetime FieldFormatEnum = "datetime" - FieldFormatEnumBool FieldFormatEnum = "bool" - FieldFormatEnumList FieldFormatEnum = "list" -) - -func NewFieldFormatEnumFromString(s string) (FieldFormatEnum, error) { - switch s { - case "string": - return FieldFormatEnumString, nil + return ItemFormatEnumString, nil case "number": - return FieldFormatEnumNumber, nil + return ItemFormatEnumNumber, nil case "date": - return FieldFormatEnumDate, nil + return ItemFormatEnumDate, nil case "datetime": - return FieldFormatEnumDatetime, nil - case "bool": - return FieldFormatEnumBool, nil - case "list": - return FieldFormatEnumList, nil - } - var t FieldFormatEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (f FieldFormatEnum) Ptr() *FieldFormatEnum { - return &f -} - -type FieldMappingApiInstance struct { - Id *string `json:"id,omitempty"` - IsIntegrationWide *bool `json:"is_integration_wide,omitempty"` - TargetField *FieldMappingApiInstanceTargetField `json:"target_field,omitempty"` - RemoteField *FieldMappingApiInstanceRemoteField `json:"remote_field,omitempty"` - - _rawJSON json.RawMessage -} - -func (f *FieldMappingApiInstance) UnmarshalJSON(data []byte) error { - type unmarshaler FieldMappingApiInstance - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *f = FieldMappingApiInstance(value) - f._rawJSON = json.RawMessage(data) - return nil -} - -func (f *FieldMappingApiInstance) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(f); err == nil { - return value - } - return fmt.Sprintf("%#v", f) -} - -type FieldMappingApiInstanceRemoteField struct { - RemoteKeyName *string `json:"remote_key_name,omitempty"` - Schema map[string]interface{} `json:"schema,omitempty"` - RemoteEndpointInfo *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo `json:"remote_endpoint_info,omitempty"` - - _rawJSON json.RawMessage -} - -func (f *FieldMappingApiInstanceRemoteField) UnmarshalJSON(data []byte) error { - type unmarshaler FieldMappingApiInstanceRemoteField - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *f = FieldMappingApiInstanceRemoteField(value) - f._rawJSON = json.RawMessage(data) - return nil -} - -func (f *FieldMappingApiInstanceRemoteField) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(f); err == nil { - return value - } - return fmt.Sprintf("%#v", f) -} - -type FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo struct { - Method *string `json:"method,omitempty"` - UrlPath *string `json:"url_path,omitempty"` - FieldTraversalPath []string `json:"field_traversal_path,omitempty"` - - _rawJSON json.RawMessage -} - -func (f *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo) UnmarshalJSON(data []byte) error { - type unmarshaler FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *f = FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo(value) - f._rawJSON = json.RawMessage(data) - return nil -} - -func (f *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(f); err == nil { - return value - } - return fmt.Sprintf("%#v", f) -} - -type FieldMappingApiInstanceResponse struct { - Account []*FieldMappingApiInstance `json:"Account,omitempty"` - Contact []*FieldMappingApiInstance `json:"Contact,omitempty"` - Lead []*FieldMappingApiInstance `json:"Lead,omitempty"` - Note []*FieldMappingApiInstance `json:"Note,omitempty"` - Opportunity []*FieldMappingApiInstance `json:"Opportunity,omitempty"` - Stage []*FieldMappingApiInstance `json:"Stage,omitempty"` - User []*FieldMappingApiInstance `json:"User,omitempty"` - Task []*FieldMappingApiInstance `json:"Task,omitempty"` - Engagement []*FieldMappingApiInstance `json:"Engagement,omitempty"` - - _rawJSON json.RawMessage -} - -func (f *FieldMappingApiInstanceResponse) UnmarshalJSON(data []byte) error { - type unmarshaler FieldMappingApiInstanceResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *f = FieldMappingApiInstanceResponse(value) - f._rawJSON = json.RawMessage(data) - return nil -} - -func (f *FieldMappingApiInstanceResponse) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(f); err == nil { - return value - } - return fmt.Sprintf("%#v", f) -} - -type FieldMappingApiInstanceTargetField struct { - Name string `json:"name"` - Description string `json:"description"` - IsOrganizationWide bool `json:"is_organization_wide"` - - _rawJSON json.RawMessage -} - -func (f *FieldMappingApiInstanceTargetField) UnmarshalJSON(data []byte) error { - type unmarshaler FieldMappingApiInstanceTargetField - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *f = FieldMappingApiInstanceTargetField(value) - f._rawJSON = json.RawMessage(data) - return nil -} - -func (f *FieldMappingApiInstanceTargetField) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(f); err == nil { - return value - } - return fmt.Sprintf("%#v", f) -} - -type FieldMappingInstanceResponse struct { - Model *FieldMappingApiInstance `json:"model,omitempty"` - Warnings []*WarningValidationProblem `json:"warnings,omitempty"` - Errors []*ErrorValidationProblem `json:"errors,omitempty"` - Logs []*DebugModeLog `json:"logs,omitempty"` - - _rawJSON json.RawMessage -} - -func (f *FieldMappingInstanceResponse) UnmarshalJSON(data []byte) error { - type unmarshaler FieldMappingInstanceResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *f = FieldMappingInstanceResponse(value) - f._rawJSON = json.RawMessage(data) - return nil -} - -func (f *FieldMappingInstanceResponse) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(f); err == nil { - return value - } - return fmt.Sprintf("%#v", f) -} - -type FieldPermissionDeserializer struct { - EnabledFields []interface{} `json:"enabled_fields,omitempty"` - DisabledFields []interface{} `json:"disabled_fields,omitempty"` - - _rawJSON json.RawMessage -} - -func (f *FieldPermissionDeserializer) UnmarshalJSON(data []byte) error { - type unmarshaler FieldPermissionDeserializer - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *f = FieldPermissionDeserializer(value) - f._rawJSON = json.RawMessage(data) - return nil -} - -func (f *FieldPermissionDeserializer) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(f); err == nil { - return value - } - return fmt.Sprintf("%#v", f) -} - -type FieldPermissionDeserializerRequest struct { - EnabledFields []interface{} `json:"enabled_fields,omitempty"` - DisabledFields []interface{} `json:"disabled_fields,omitempty"` - - _rawJSON json.RawMessage -} - -func (f *FieldPermissionDeserializerRequest) UnmarshalJSON(data []byte) error { - type unmarshaler FieldPermissionDeserializerRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *f = FieldPermissionDeserializerRequest(value) - f._rawJSON = json.RawMessage(data) - return nil -} - -func (f *FieldPermissionDeserializerRequest) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(f); err == nil { - return value - } - return fmt.Sprintf("%#v", f) -} - -// - `string` - string -// - `number` - number -// - `date` - date -// - `datetime` - datetime -// - `bool` - bool -// - `list` - list -type FieldTypeEnum string - -const ( - FieldTypeEnumString FieldTypeEnum = "string" - FieldTypeEnumNumber FieldTypeEnum = "number" - FieldTypeEnumDate FieldTypeEnum = "date" - FieldTypeEnumDatetime FieldTypeEnum = "datetime" - FieldTypeEnumBool FieldTypeEnum = "bool" - FieldTypeEnumList FieldTypeEnum = "list" -) - -func NewFieldTypeEnumFromString(s string) (FieldTypeEnum, error) { - switch s { - case "string": - return FieldTypeEnumString, nil - case "number": - return FieldTypeEnumNumber, nil - case "date": - return FieldTypeEnumDate, nil - case "datetime": - return FieldTypeEnumDatetime, nil - case "bool": - return FieldTypeEnumBool, nil - case "list": - return FieldTypeEnumList, nil - } - var t FieldTypeEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (f FieldTypeEnum) Ptr() *FieldTypeEnum { - return &f -} - -type IgnoreCommonModelRequest struct { - Reason ReasonEnum `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` - - _rawJSON json.RawMessage -} - -func (i *IgnoreCommonModelRequest) UnmarshalJSON(data []byte) error { - type unmarshaler IgnoreCommonModelRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *i = IgnoreCommonModelRequest(value) - i._rawJSON = json.RawMessage(data) - return nil -} - -func (i *IgnoreCommonModelRequest) String() string { - if len(i._rawJSON) > 0 { - if value, err := core.StringifyJSON(i._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(i); err == nil { - return value - } - return fmt.Sprintf("%#v", i) -} - -type IndividualCommonModelScopeDeserializer struct { - ModelName string `json:"model_name"` - ModelPermissions map[string]*ModelPermissionDeserializer `json:"model_permissions,omitempty"` - FieldPermissions *FieldPermissionDeserializer `json:"field_permissions,omitempty"` - - _rawJSON json.RawMessage -} - -func (i *IndividualCommonModelScopeDeserializer) UnmarshalJSON(data []byte) error { - type unmarshaler IndividualCommonModelScopeDeserializer - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *i = IndividualCommonModelScopeDeserializer(value) - i._rawJSON = json.RawMessage(data) - return nil -} - -func (i *IndividualCommonModelScopeDeserializer) String() string { - if len(i._rawJSON) > 0 { - if value, err := core.StringifyJSON(i._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(i); err == nil { - return value - } - return fmt.Sprintf("%#v", i) -} - -type IndividualCommonModelScopeDeserializerRequest struct { - ModelName string `json:"model_name"` - ModelPermissions map[string]*ModelPermissionDeserializerRequest `json:"model_permissions,omitempty"` - FieldPermissions *FieldPermissionDeserializerRequest `json:"field_permissions,omitempty"` - - _rawJSON json.RawMessage -} - -func (i *IndividualCommonModelScopeDeserializerRequest) UnmarshalJSON(data []byte) error { - type unmarshaler IndividualCommonModelScopeDeserializerRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *i = IndividualCommonModelScopeDeserializerRequest(value) - i._rawJSON = json.RawMessage(data) - return nil -} - -func (i *IndividualCommonModelScopeDeserializerRequest) String() string { - if len(i._rawJSON) > 0 { - if value, err := core.StringifyJSON(i._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(i); err == nil { - return value - } - return fmt.Sprintf("%#v", i) -} - -type Issue struct { - Id *string `json:"id,omitempty"` - // Status of the issue. Options: ('ONGOING', 'RESOLVED') - // - // - `ONGOING` - ONGOING - // - `RESOLVED` - RESOLVED - Status *IssueStatus `json:"status,omitempty"` - ErrorDescription string `json:"error_description"` - EndUser map[string]interface{} `json:"end_user,omitempty"` - FirstIncidentTime *time.Time `json:"first_incident_time,omitempty"` - LastIncidentTime *time.Time `json:"last_incident_time,omitempty"` - IsMuted *bool `json:"is_muted,omitempty"` - ErrorDetails []string `json:"error_details,omitempty"` - - _rawJSON json.RawMessage -} - -func (i *Issue) UnmarshalJSON(data []byte) error { - type unmarshaler Issue - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *i = Issue(value) - i._rawJSON = json.RawMessage(data) - return nil -} - -func (i *Issue) String() string { - if len(i._rawJSON) > 0 { - if value, err := core.StringifyJSON(i._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(i); err == nil { - return value - } - return fmt.Sprintf("%#v", i) -} - -// Status of the issue. Options: ('ONGOING', 'RESOLVED') -// -// - `ONGOING` - ONGOING -// - `RESOLVED` - RESOLVED -type IssueStatus struct { - typeName string - IssueStatusEnum IssueStatusEnum - String string -} - -func NewIssueStatusFromIssueStatusEnum(value IssueStatusEnum) *IssueStatus { - return &IssueStatus{typeName: "issueStatusEnum", IssueStatusEnum: value} -} - -func NewIssueStatusFromString(value string) *IssueStatus { - return &IssueStatus{typeName: "string", String: value} -} - -func (i *IssueStatus) UnmarshalJSON(data []byte) error { - var valueIssueStatusEnum IssueStatusEnum - if err := json.Unmarshal(data, &valueIssueStatusEnum); err == nil { - i.typeName = "issueStatusEnum" - i.IssueStatusEnum = valueIssueStatusEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - i.typeName = "string" - i.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, i) -} - -func (i IssueStatus) MarshalJSON() ([]byte, error) { - switch i.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "issueStatusEnum": - return json.Marshal(i.IssueStatusEnum) - case "string": - return json.Marshal(i.String) - } -} - -type IssueStatusVisitor interface { - VisitIssueStatusEnum(IssueStatusEnum) error - VisitString(string) error -} - -func (i *IssueStatus) Accept(visitor IssueStatusVisitor) error { - switch i.typeName { - default: - return fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "issueStatusEnum": - return visitor.VisitIssueStatusEnum(i.IssueStatusEnum) - case "string": - return visitor.VisitString(i.String) - } -} - -// - `ONGOING` - ONGOING -// - `RESOLVED` - RESOLVED -type IssueStatusEnum string - -const ( - IssueStatusEnumOngoing IssueStatusEnum = "ONGOING" - IssueStatusEnumResolved IssueStatusEnum = "RESOLVED" -) - -func NewIssueStatusEnumFromString(s string) (IssueStatusEnum, error) { - switch s { - case "ONGOING": - return IssueStatusEnumOngoing, nil - case "RESOLVED": - return IssueStatusEnumResolved, nil - } - var t IssueStatusEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (i IssueStatusEnum) Ptr() *IssueStatusEnum { - return &i -} - -// - `string` - uuid -// - `number` - url -// - `date` - email -// - `datetime` - phone -// - `bool` - currency -// - `list` - decimal -type ItemFormatEnum string - -const ( - ItemFormatEnumString ItemFormatEnum = "string" - ItemFormatEnumNumber ItemFormatEnum = "number" - ItemFormatEnumDate ItemFormatEnum = "date" - ItemFormatEnumDatetime ItemFormatEnum = "datetime" - ItemFormatEnumBool ItemFormatEnum = "bool" - ItemFormatEnumList ItemFormatEnum = "list" -) - -func NewItemFormatEnumFromString(s string) (ItemFormatEnum, error) { - switch s { - case "string": - return ItemFormatEnumString, nil - case "number": - return ItemFormatEnumNumber, nil - case "date": - return ItemFormatEnumDate, nil - case "datetime": - return ItemFormatEnumDatetime, nil + return ItemFormatEnumDatetime, nil case "bool": return ItemFormatEnumBool, nil - case "list": - return ItemFormatEnumList, nil - } - var t ItemFormatEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (i ItemFormatEnum) Ptr() *ItemFormatEnum { - return &i -} - -type ItemSchema struct { - ItemType *ItemTypeEnum `json:"item_type,omitempty"` - ItemFormat *ItemFormatEnum `json:"item_format,omitempty"` - ItemChoices []string `json:"item_choices,omitempty"` - - _rawJSON json.RawMessage -} - -func (i *ItemSchema) UnmarshalJSON(data []byte) error { - type unmarshaler ItemSchema - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *i = ItemSchema(value) - i._rawJSON = json.RawMessage(data) - return nil -} - -func (i *ItemSchema) String() string { - if len(i._rawJSON) > 0 { - if value, err := core.StringifyJSON(i._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(i); err == nil { - return value - } - return fmt.Sprintf("%#v", i) -} - -// - `string` - string -// - `number` - number -// - `date` - date -// - `datetime` - datetime -// - `bool` - bool -// - `list` - list -type ItemTypeEnum string - -const ( - ItemTypeEnumString ItemTypeEnum = "string" - ItemTypeEnumNumber ItemTypeEnum = "number" - ItemTypeEnumDate ItemTypeEnum = "date" - ItemTypeEnumDatetime ItemTypeEnum = "datetime" - ItemTypeEnumBool ItemTypeEnum = "bool" - ItemTypeEnumList ItemTypeEnum = "list" -) - -func NewItemTypeEnumFromString(s string) (ItemTypeEnum, error) { - switch s { - case "string": - return ItemTypeEnumString, nil - case "number": - return ItemTypeEnumNumber, nil - case "date": - return ItemTypeEnumDate, nil - case "datetime": - return ItemTypeEnumDatetime, nil - case "bool": - return ItemTypeEnumBool, nil - case "list": - return ItemTypeEnumList, nil - } - var t ItemTypeEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (i ItemTypeEnum) Ptr() *ItemTypeEnum { - return &i -} - -// - `en` - en -// - `de` - de -type LanguageEnum string - -const ( - LanguageEnumEn LanguageEnum = "en" - LanguageEnumDe LanguageEnum = "de" -) - -func NewLanguageEnumFromString(s string) (LanguageEnum, error) { - switch s { - case "en": - return LanguageEnumEn, nil - case "de": - return LanguageEnumDe, nil - } - var t LanguageEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (l LanguageEnum) Ptr() *LanguageEnum { - return &l -} - -// # The Lead Object -// -// ### Description -// -// The `Lead` object is used to represent an individual who is a potential customer. -// -// ### Usage Example -// -// TODO -type Lead struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The lead's owner. - Owner *LeadOwner `json:"owner,omitempty"` - // The lead's source. - LeadSource *string `json:"lead_source,omitempty"` - // The lead's title. - Title *string `json:"title,omitempty"` - // The lead's company. - Company *string `json:"company,omitempty"` - // The lead's first name. - FirstName *string `json:"first_name,omitempty"` - // The lead's last name. - LastName *string `json:"last_name,omitempty"` - Addresses []*Address `json:"addresses,omitempty"` - EmailAddresses []*EmailAddress `json:"email_addresses,omitempty"` - PhoneNumbers []*PhoneNumber `json:"phone_numbers,omitempty"` - // When the third party's lead was updated. - RemoteUpdatedAt *time.Time `json:"remote_updated_at,omitempty"` - // When the third party's lead was created. - RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty"` - // When the lead was converted. - ConvertedDate *time.Time `json:"converted_date,omitempty"` - // The contact of the converted lead. - ConvertedContact *LeadConvertedContact `json:"converted_contact,omitempty"` - // The account of the converted lead. - ConvertedAccount *LeadConvertedAccount `json:"converted_account,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` - RemoteFields []*RemoteField `json:"remote_fields,omitempty"` - - _rawJSON json.RawMessage -} - -func (l *Lead) UnmarshalJSON(data []byte) error { - type unmarshaler Lead - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *l = Lead(value) - l._rawJSON = json.RawMessage(data) - return nil -} - -func (l *Lead) String() string { - if len(l._rawJSON) > 0 { - if value, err := core.StringifyJSON(l._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(l); err == nil { - return value - } - return fmt.Sprintf("%#v", l) -} - -// The account of the converted lead. -type LeadConvertedAccount struct { - typeName string - String string - Account *Account -} - -func NewLeadConvertedAccountFromString(value string) *LeadConvertedAccount { - return &LeadConvertedAccount{typeName: "string", String: value} -} - -func NewLeadConvertedAccountFromAccount(value *Account) *LeadConvertedAccount { - return &LeadConvertedAccount{typeName: "account", Account: value} -} - -func (l *LeadConvertedAccount) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - l.typeName = "string" - l.String = valueString - return nil - } - valueAccount := new(Account) - if err := json.Unmarshal(data, &valueAccount); err == nil { - l.typeName = "account" - l.Account = valueAccount - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, l) -} - -func (l LeadConvertedAccount) MarshalJSON() ([]byte, error) { - switch l.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", l.typeName, l) - case "string": - return json.Marshal(l.String) - case "account": - return json.Marshal(l.Account) - } -} - -type LeadConvertedAccountVisitor interface { - VisitString(string) error - VisitAccount(*Account) error -} - -func (l *LeadConvertedAccount) Accept(visitor LeadConvertedAccountVisitor) error { - switch l.typeName { - default: - return fmt.Errorf("invalid type %s in %T", l.typeName, l) - case "string": - return visitor.VisitString(l.String) - case "account": - return visitor.VisitAccount(l.Account) - } -} - -// The contact of the converted lead. -type LeadConvertedContact struct { - typeName string - String string - Contact *Contact -} - -func NewLeadConvertedContactFromString(value string) *LeadConvertedContact { - return &LeadConvertedContact{typeName: "string", String: value} -} - -func NewLeadConvertedContactFromContact(value *Contact) *LeadConvertedContact { - return &LeadConvertedContact{typeName: "contact", Contact: value} -} - -func (l *LeadConvertedContact) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - l.typeName = "string" - l.String = valueString - return nil - } - valueContact := new(Contact) - if err := json.Unmarshal(data, &valueContact); err == nil { - l.typeName = "contact" - l.Contact = valueContact - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, l) -} - -func (l LeadConvertedContact) MarshalJSON() ([]byte, error) { - switch l.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", l.typeName, l) - case "string": - return json.Marshal(l.String) - case "contact": - return json.Marshal(l.Contact) - } -} - -type LeadConvertedContactVisitor interface { - VisitString(string) error - VisitContact(*Contact) error -} - -func (l *LeadConvertedContact) Accept(visitor LeadConvertedContactVisitor) error { - switch l.typeName { - default: - return fmt.Errorf("invalid type %s in %T", l.typeName, l) - case "string": - return visitor.VisitString(l.String) - case "contact": - return visitor.VisitContact(l.Contact) - } -} - -// The lead's owner. -type LeadOwner struct { - typeName string - String string - User *User -} - -func NewLeadOwnerFromString(value string) *LeadOwner { - return &LeadOwner{typeName: "string", String: value} -} - -func NewLeadOwnerFromUser(value *User) *LeadOwner { - return &LeadOwner{typeName: "user", User: value} -} - -func (l *LeadOwner) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - l.typeName = "string" - l.String = valueString - return nil - } - valueUser := new(User) - if err := json.Unmarshal(data, &valueUser); err == nil { - l.typeName = "user" - l.User = valueUser - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, l) -} - -func (l LeadOwner) MarshalJSON() ([]byte, error) { - switch l.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", l.typeName, l) - case "string": - return json.Marshal(l.String) - case "user": - return json.Marshal(l.User) - } -} - -type LeadOwnerVisitor interface { - VisitString(string) error - VisitUser(*User) error -} - -func (l *LeadOwner) Accept(visitor LeadOwnerVisitor) error { - switch l.typeName { - default: - return fmt.Errorf("invalid type %s in %T", l.typeName, l) - case "string": - return visitor.VisitString(l.String) - case "user": - return visitor.VisitUser(l.User) - } -} - -// # The Lead Object -// -// ### Description -// -// The `Lead` object is used to represent an individual who is a potential customer. -// -// ### Usage Example -// -// TODO -type LeadRequest struct { - // The lead's owner. - Owner *LeadRequestOwner `json:"owner,omitempty"` - // The lead's source. - LeadSource *string `json:"lead_source,omitempty"` - // The lead's title. - Title *string `json:"title,omitempty"` - // The lead's company. - Company *string `json:"company,omitempty"` - // The lead's first name. - FirstName *string `json:"first_name,omitempty"` - // The lead's last name. - LastName *string `json:"last_name,omitempty"` - Addresses []*AddressRequest `json:"addresses,omitempty"` - EmailAddresses []*EmailAddressRequest `json:"email_addresses,omitempty"` - PhoneNumbers []*PhoneNumberRequest `json:"phone_numbers,omitempty"` - // When the lead was converted. - ConvertedDate *time.Time `json:"converted_date,omitempty"` - // The contact of the converted lead. - ConvertedContact *LeadRequestConvertedContact `json:"converted_contact,omitempty"` - // The account of the converted lead. - ConvertedAccount *LeadRequestConvertedAccount `json:"converted_account,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` - RemoteFields []*RemoteFieldRequest `json:"remote_fields,omitempty"` - - _rawJSON json.RawMessage -} - -func (l *LeadRequest) UnmarshalJSON(data []byte) error { - type unmarshaler LeadRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *l = LeadRequest(value) - l._rawJSON = json.RawMessage(data) - return nil -} - -func (l *LeadRequest) String() string { - if len(l._rawJSON) > 0 { - if value, err := core.StringifyJSON(l._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(l); err == nil { - return value - } - return fmt.Sprintf("%#v", l) -} - -// The account of the converted lead. -type LeadRequestConvertedAccount struct { - typeName string - String string - Account *Account -} - -func NewLeadRequestConvertedAccountFromString(value string) *LeadRequestConvertedAccount { - return &LeadRequestConvertedAccount{typeName: "string", String: value} -} - -func NewLeadRequestConvertedAccountFromAccount(value *Account) *LeadRequestConvertedAccount { - return &LeadRequestConvertedAccount{typeName: "account", Account: value} -} - -func (l *LeadRequestConvertedAccount) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - l.typeName = "string" - l.String = valueString - return nil - } - valueAccount := new(Account) - if err := json.Unmarshal(data, &valueAccount); err == nil { - l.typeName = "account" - l.Account = valueAccount - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, l) -} - -func (l LeadRequestConvertedAccount) MarshalJSON() ([]byte, error) { - switch l.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", l.typeName, l) - case "string": - return json.Marshal(l.String) - case "account": - return json.Marshal(l.Account) - } -} - -type LeadRequestConvertedAccountVisitor interface { - VisitString(string) error - VisitAccount(*Account) error -} - -func (l *LeadRequestConvertedAccount) Accept(visitor LeadRequestConvertedAccountVisitor) error { - switch l.typeName { - default: - return fmt.Errorf("invalid type %s in %T", l.typeName, l) - case "string": - return visitor.VisitString(l.String) - case "account": - return visitor.VisitAccount(l.Account) - } -} - -// The contact of the converted lead. -type LeadRequestConvertedContact struct { - typeName string - String string - Contact *Contact -} - -func NewLeadRequestConvertedContactFromString(value string) *LeadRequestConvertedContact { - return &LeadRequestConvertedContact{typeName: "string", String: value} -} - -func NewLeadRequestConvertedContactFromContact(value *Contact) *LeadRequestConvertedContact { - return &LeadRequestConvertedContact{typeName: "contact", Contact: value} -} - -func (l *LeadRequestConvertedContact) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - l.typeName = "string" - l.String = valueString - return nil - } - valueContact := new(Contact) - if err := json.Unmarshal(data, &valueContact); err == nil { - l.typeName = "contact" - l.Contact = valueContact - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, l) -} - -func (l LeadRequestConvertedContact) MarshalJSON() ([]byte, error) { - switch l.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", l.typeName, l) - case "string": - return json.Marshal(l.String) - case "contact": - return json.Marshal(l.Contact) - } -} - -type LeadRequestConvertedContactVisitor interface { - VisitString(string) error - VisitContact(*Contact) error -} - -func (l *LeadRequestConvertedContact) Accept(visitor LeadRequestConvertedContactVisitor) error { - switch l.typeName { - default: - return fmt.Errorf("invalid type %s in %T", l.typeName, l) - case "string": - return visitor.VisitString(l.String) - case "contact": - return visitor.VisitContact(l.Contact) - } -} - -// The lead's owner. -type LeadRequestOwner struct { - typeName string - String string - User *User -} - -func NewLeadRequestOwnerFromString(value string) *LeadRequestOwner { - return &LeadRequestOwner{typeName: "string", String: value} -} - -func NewLeadRequestOwnerFromUser(value *User) *LeadRequestOwner { - return &LeadRequestOwner{typeName: "user", User: value} -} - -func (l *LeadRequestOwner) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - l.typeName = "string" - l.String = valueString - return nil - } - valueUser := new(User) - if err := json.Unmarshal(data, &valueUser); err == nil { - l.typeName = "user" - l.User = valueUser - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, l) -} - -func (l LeadRequestOwner) MarshalJSON() ([]byte, error) { - switch l.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", l.typeName, l) - case "string": - return json.Marshal(l.String) - case "user": - return json.Marshal(l.User) - } -} - -type LeadRequestOwnerVisitor interface { - VisitString(string) error - VisitUser(*User) error -} - -func (l *LeadRequestOwner) Accept(visitor LeadRequestOwnerVisitor) error { - switch l.typeName { - default: - return fmt.Errorf("invalid type %s in %T", l.typeName, l) - case "string": - return visitor.VisitString(l.String) - case "user": - return visitor.VisitUser(l.User) - } -} - -type LeadResponse struct { - Model *Lead `json:"model,omitempty"` - Warnings []*WarningValidationProblem `json:"warnings,omitempty"` - Errors []*ErrorValidationProblem `json:"errors,omitempty"` - Logs []*DebugModeLog `json:"logs,omitempty"` - - _rawJSON json.RawMessage -} - -func (l *LeadResponse) UnmarshalJSON(data []byte) error { - type unmarshaler LeadResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *l = LeadResponse(value) - l._rawJSON = json.RawMessage(data) - return nil -} - -func (l *LeadResponse) String() string { - if len(l._rawJSON) > 0 { - if value, err := core.StringifyJSON(l._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(l); err == nil { - return value - } - return fmt.Sprintf("%#v", l) -} - -type LinkToken struct { - LinkToken string `json:"link_token"` - IntegrationName *string `json:"integration_name,omitempty"` - MagicLinkUrl *string `json:"magic_link_url,omitempty"` - - _rawJSON json.RawMessage -} - -func (l *LinkToken) UnmarshalJSON(data []byte) error { - type unmarshaler LinkToken - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *l = LinkToken(value) - l._rawJSON = json.RawMessage(data) - return nil -} - -func (l *LinkToken) String() string { - if len(l._rawJSON) > 0 { - if value, err := core.StringifyJSON(l._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(l); err == nil { - return value - } - return fmt.Sprintf("%#v", l) -} - -type LinkedAccountStatus struct { - LinkedAccountStatus string `json:"linked_account_status"` - CanMakeRequest bool `json:"can_make_request"` - - _rawJSON json.RawMessage -} - -func (l *LinkedAccountStatus) UnmarshalJSON(data []byte) error { - type unmarshaler LinkedAccountStatus - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *l = LinkedAccountStatus(value) - l._rawJSON = json.RawMessage(data) - return nil -} - -func (l *LinkedAccountStatus) String() string { - if len(l._rawJSON) > 0 { - if value, err := core.StringifyJSON(l._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(l); err == nil { - return value - } - return fmt.Sprintf("%#v", l) -} - -type MetaResponse struct { - RequestSchema map[string]interface{} `json:"request_schema,omitempty"` - RemoteFieldClasses map[string]interface{} `json:"remote_field_classes,omitempty"` - Status *LinkedAccountStatus `json:"status,omitempty"` - HasConditionalParams bool `json:"has_conditional_params"` - HasRequiredLinkedAccountParams bool `json:"has_required_linked_account_params"` - - _rawJSON json.RawMessage -} - -func (m *MetaResponse) UnmarshalJSON(data []byte) error { - type unmarshaler MetaResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *m = MetaResponse(value) - m._rawJSON = json.RawMessage(data) - return nil -} - -func (m *MetaResponse) String() string { - if len(m._rawJSON) > 0 { - if value, err := core.StringifyJSON(m._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(m); err == nil { - return value - } - return fmt.Sprintf("%#v", m) -} - -// - `GET` - GET -// - `OPTIONS` - OPTIONS -// - `HEAD` - HEAD -// - `POST` - POST -// - `PUT` - PUT -// - `PATCH` - PATCH -// - `DELETE` - DELETE -type MethodEnum string - -const ( - MethodEnumGet MethodEnum = "GET" - MethodEnumOptions MethodEnum = "OPTIONS" - MethodEnumHead MethodEnum = "HEAD" - MethodEnumPost MethodEnum = "POST" - MethodEnumPut MethodEnum = "PUT" - MethodEnumPatch MethodEnum = "PATCH" - MethodEnumDelete MethodEnum = "DELETE" -) - -func NewMethodEnumFromString(s string) (MethodEnum, error) { - switch s { - case "GET": - return MethodEnumGet, nil - case "OPTIONS": - return MethodEnumOptions, nil - case "HEAD": - return MethodEnumHead, nil - case "POST": - return MethodEnumPost, nil - case "PUT": - return MethodEnumPut, nil - case "PATCH": - return MethodEnumPatch, nil - case "DELETE": - return MethodEnumDelete, nil - } - var t MethodEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (m MethodEnum) Ptr() *MethodEnum { - return &m -} - -// # The ModelOperation Object -// -// ### Description -// -// The `ModelOperation` object is used to represent the operations that are currently supported for a given model. -// -// ### Usage Example -// -// View what operations are supported for the `Candidate` endpoint. -type ModelOperation struct { - ModelName string `json:"model_name"` - AvailableOperations []string `json:"available_operations,omitempty"` - RequiredPostParameters []string `json:"required_post_parameters,omitempty"` - SupportedFields []string `json:"supported_fields,omitempty"` - - _rawJSON json.RawMessage -} - -func (m *ModelOperation) UnmarshalJSON(data []byte) error { - type unmarshaler ModelOperation - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *m = ModelOperation(value) - m._rawJSON = json.RawMessage(data) - return nil -} - -func (m *ModelOperation) String() string { - if len(m._rawJSON) > 0 { - if value, err := core.StringifyJSON(m._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(m); err == nil { - return value - } - return fmt.Sprintf("%#v", m) -} - -type ModelPermissionDeserializer struct { - IsEnabled *bool `json:"is_enabled,omitempty"` - - _rawJSON json.RawMessage -} - -func (m *ModelPermissionDeserializer) UnmarshalJSON(data []byte) error { - type unmarshaler ModelPermissionDeserializer - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *m = ModelPermissionDeserializer(value) - m._rawJSON = json.RawMessage(data) - return nil -} - -func (m *ModelPermissionDeserializer) String() string { - if len(m._rawJSON) > 0 { - if value, err := core.StringifyJSON(m._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(m); err == nil { - return value - } - return fmt.Sprintf("%#v", m) -} - -type ModelPermissionDeserializerRequest struct { - IsEnabled *bool `json:"is_enabled,omitempty"` - - _rawJSON json.RawMessage -} - -func (m *ModelPermissionDeserializerRequest) UnmarshalJSON(data []byte) error { - type unmarshaler ModelPermissionDeserializerRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *m = ModelPermissionDeserializerRequest(value) - m._rawJSON = json.RawMessage(data) - return nil -} - -func (m *ModelPermissionDeserializerRequest) String() string { - if len(m._rawJSON) > 0 { - if value, err := core.StringifyJSON(m._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(m); err == nil { - return value - } - return fmt.Sprintf("%#v", m) -} - -// # The MultipartFormField Object -// -// ### Description -// -// The `MultipartFormField` object is used to represent fields in an HTTP request using `multipart/form-data`. -// -// ### Usage Example -// -// Create a `MultipartFormField` to define a multipart form entry. -type MultipartFormFieldRequest struct { - // The name of the form field - Name string `json:"name"` - // The data for the form field. - Data string `json:"data"` - // The encoding of the value of `data`. Defaults to `RAW` if not defined. - // - // - `RAW` - RAW - // - `BASE64` - BASE64 - // - `GZIP_BASE64` - GZIP_BASE64 - Encoding *MultipartFormFieldRequestEncoding `json:"encoding,omitempty"` - // The file name of the form field, if the field is for a file. - FileName *string `json:"file_name,omitempty"` - // The MIME type of the file, if the field is for a file. - ContentType *string `json:"content_type,omitempty"` - - _rawJSON json.RawMessage -} - -func (m *MultipartFormFieldRequest) UnmarshalJSON(data []byte) error { - type unmarshaler MultipartFormFieldRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *m = MultipartFormFieldRequest(value) - m._rawJSON = json.RawMessage(data) - return nil -} - -func (m *MultipartFormFieldRequest) String() string { - if len(m._rawJSON) > 0 { - if value, err := core.StringifyJSON(m._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(m); err == nil { - return value - } - return fmt.Sprintf("%#v", m) -} - -// The encoding of the value of `data`. Defaults to `RAW` if not defined. -// -// - `RAW` - RAW -// - `BASE64` - BASE64 -// - `GZIP_BASE64` - GZIP_BASE64 -type MultipartFormFieldRequestEncoding struct { - typeName string - EncodingEnum EncodingEnum - String string -} - -func NewMultipartFormFieldRequestEncodingFromEncodingEnum(value EncodingEnum) *MultipartFormFieldRequestEncoding { - return &MultipartFormFieldRequestEncoding{typeName: "encodingEnum", EncodingEnum: value} -} - -func NewMultipartFormFieldRequestEncodingFromString(value string) *MultipartFormFieldRequestEncoding { - return &MultipartFormFieldRequestEncoding{typeName: "string", String: value} -} - -func (m *MultipartFormFieldRequestEncoding) UnmarshalJSON(data []byte) error { - var valueEncodingEnum EncodingEnum - if err := json.Unmarshal(data, &valueEncodingEnum); err == nil { - m.typeName = "encodingEnum" - m.EncodingEnum = valueEncodingEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - m.typeName = "string" - m.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, m) -} - -func (m MultipartFormFieldRequestEncoding) MarshalJSON() ([]byte, error) { - switch m.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", m.typeName, m) - case "encodingEnum": - return json.Marshal(m.EncodingEnum) - case "string": - return json.Marshal(m.String) - } -} - -type MultipartFormFieldRequestEncodingVisitor interface { - VisitEncodingEnum(EncodingEnum) error - VisitString(string) error -} - -func (m *MultipartFormFieldRequestEncoding) Accept(visitor MultipartFormFieldRequestEncodingVisitor) error { - switch m.typeName { - default: - return fmt.Errorf("invalid type %s in %T", m.typeName, m) - case "encodingEnum": - return visitor.VisitEncodingEnum(m.EncodingEnum) - case "string": - return visitor.VisitString(m.String) - } -} - -// # The Note Object -// -// ### Description -// -// The `Note` object is used to represent a note on another object. -// -// ### Usage Example -// -// TODO -type Note struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The note's owner. - Owner *NoteOwner `json:"owner,omitempty"` - // The note's content. - Content *string `json:"content,omitempty"` - // The note's contact. - Contact *NoteContact `json:"contact,omitempty"` - // The note's account. - Account *NoteAccount `json:"account,omitempty"` - // The note's opportunity. - Opportunity *NoteOpportunity `json:"opportunity,omitempty"` - // When the third party's lead was updated. - RemoteUpdatedAt *time.Time `json:"remote_updated_at,omitempty"` - // When the third party's lead was created. - RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` - RemoteFields []*RemoteField `json:"remote_fields,omitempty"` - - _rawJSON json.RawMessage -} - -func (n *Note) UnmarshalJSON(data []byte) error { - type unmarshaler Note - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *n = Note(value) - n._rawJSON = json.RawMessage(data) - return nil -} - -func (n *Note) String() string { - if len(n._rawJSON) > 0 { - if value, err := core.StringifyJSON(n._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(n); err == nil { - return value - } - return fmt.Sprintf("%#v", n) -} - -// The note's account. -type NoteAccount struct { - typeName string - String string - Account *Account -} - -func NewNoteAccountFromString(value string) *NoteAccount { - return &NoteAccount{typeName: "string", String: value} -} - -func NewNoteAccountFromAccount(value *Account) *NoteAccount { - return &NoteAccount{typeName: "account", Account: value} -} - -func (n *NoteAccount) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - n.typeName = "string" - n.String = valueString - return nil - } - valueAccount := new(Account) - if err := json.Unmarshal(data, &valueAccount); err == nil { - n.typeName = "account" - n.Account = valueAccount - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, n) -} - -func (n NoteAccount) MarshalJSON() ([]byte, error) { - switch n.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", n.typeName, n) - case "string": - return json.Marshal(n.String) - case "account": - return json.Marshal(n.Account) - } -} - -type NoteAccountVisitor interface { - VisitString(string) error - VisitAccount(*Account) error -} - -func (n *NoteAccount) Accept(visitor NoteAccountVisitor) error { - switch n.typeName { - default: - return fmt.Errorf("invalid type %s in %T", n.typeName, n) - case "string": - return visitor.VisitString(n.String) - case "account": - return visitor.VisitAccount(n.Account) - } -} - -// The note's contact. -type NoteContact struct { - typeName string - String string - Contact *Contact -} - -func NewNoteContactFromString(value string) *NoteContact { - return &NoteContact{typeName: "string", String: value} -} - -func NewNoteContactFromContact(value *Contact) *NoteContact { - return &NoteContact{typeName: "contact", Contact: value} -} - -func (n *NoteContact) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - n.typeName = "string" - n.String = valueString - return nil - } - valueContact := new(Contact) - if err := json.Unmarshal(data, &valueContact); err == nil { - n.typeName = "contact" - n.Contact = valueContact - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, n) -} - -func (n NoteContact) MarshalJSON() ([]byte, error) { - switch n.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", n.typeName, n) - case "string": - return json.Marshal(n.String) - case "contact": - return json.Marshal(n.Contact) - } -} - -type NoteContactVisitor interface { - VisitString(string) error - VisitContact(*Contact) error -} - -func (n *NoteContact) Accept(visitor NoteContactVisitor) error { - switch n.typeName { - default: - return fmt.Errorf("invalid type %s in %T", n.typeName, n) - case "string": - return visitor.VisitString(n.String) - case "contact": - return visitor.VisitContact(n.Contact) - } -} - -// The note's opportunity. -type NoteOpportunity struct { - typeName string - String string - Opportunity *Opportunity -} - -func NewNoteOpportunityFromString(value string) *NoteOpportunity { - return &NoteOpportunity{typeName: "string", String: value} -} - -func NewNoteOpportunityFromOpportunity(value *Opportunity) *NoteOpportunity { - return &NoteOpportunity{typeName: "opportunity", Opportunity: value} -} - -func (n *NoteOpportunity) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - n.typeName = "string" - n.String = valueString - return nil - } - valueOpportunity := new(Opportunity) - if err := json.Unmarshal(data, &valueOpportunity); err == nil { - n.typeName = "opportunity" - n.Opportunity = valueOpportunity - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, n) -} - -func (n NoteOpportunity) MarshalJSON() ([]byte, error) { - switch n.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", n.typeName, n) - case "string": - return json.Marshal(n.String) - case "opportunity": - return json.Marshal(n.Opportunity) - } -} - -type NoteOpportunityVisitor interface { - VisitString(string) error - VisitOpportunity(*Opportunity) error -} - -func (n *NoteOpportunity) Accept(visitor NoteOpportunityVisitor) error { - switch n.typeName { - default: - return fmt.Errorf("invalid type %s in %T", n.typeName, n) - case "string": - return visitor.VisitString(n.String) - case "opportunity": - return visitor.VisitOpportunity(n.Opportunity) - } -} - -// The note's owner. -type NoteOwner struct { - typeName string - String string - User *User -} - -func NewNoteOwnerFromString(value string) *NoteOwner { - return &NoteOwner{typeName: "string", String: value} -} - -func NewNoteOwnerFromUser(value *User) *NoteOwner { - return &NoteOwner{typeName: "user", User: value} -} - -func (n *NoteOwner) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - n.typeName = "string" - n.String = valueString - return nil - } - valueUser := new(User) - if err := json.Unmarshal(data, &valueUser); err == nil { - n.typeName = "user" - n.User = valueUser - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, n) -} - -func (n NoteOwner) MarshalJSON() ([]byte, error) { - switch n.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", n.typeName, n) - case "string": - return json.Marshal(n.String) - case "user": - return json.Marshal(n.User) - } -} - -type NoteOwnerVisitor interface { - VisitString(string) error - VisitUser(*User) error -} - -func (n *NoteOwner) Accept(visitor NoteOwnerVisitor) error { - switch n.typeName { - default: - return fmt.Errorf("invalid type %s in %T", n.typeName, n) - case "string": - return visitor.VisitString(n.String) - case "user": - return visitor.VisitUser(n.User) - } -} - -// # The Note Object -// -// ### Description -// -// The `Note` object is used to represent a note on another object. -// -// ### Usage Example -// -// TODO -type NoteRequest struct { - // The note's owner. - Owner *NoteRequestOwner `json:"owner,omitempty"` - // The note's content. - Content *string `json:"content,omitempty"` - // The note's contact. - Contact *NoteRequestContact `json:"contact,omitempty"` - // The note's account. - Account *NoteRequestAccount `json:"account,omitempty"` - // The note's opportunity. - Opportunity *NoteRequestOpportunity `json:"opportunity,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` - RemoteFields []*RemoteFieldRequest `json:"remote_fields,omitempty"` - - _rawJSON json.RawMessage -} - -func (n *NoteRequest) UnmarshalJSON(data []byte) error { - type unmarshaler NoteRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *n = NoteRequest(value) - n._rawJSON = json.RawMessage(data) - return nil -} - -func (n *NoteRequest) String() string { - if len(n._rawJSON) > 0 { - if value, err := core.StringifyJSON(n._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(n); err == nil { - return value - } - return fmt.Sprintf("%#v", n) -} - -// The note's account. -type NoteRequestAccount struct { - typeName string - String string - Account *Account -} - -func NewNoteRequestAccountFromString(value string) *NoteRequestAccount { - return &NoteRequestAccount{typeName: "string", String: value} -} - -func NewNoteRequestAccountFromAccount(value *Account) *NoteRequestAccount { - return &NoteRequestAccount{typeName: "account", Account: value} -} - -func (n *NoteRequestAccount) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - n.typeName = "string" - n.String = valueString - return nil - } - valueAccount := new(Account) - if err := json.Unmarshal(data, &valueAccount); err == nil { - n.typeName = "account" - n.Account = valueAccount - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, n) -} - -func (n NoteRequestAccount) MarshalJSON() ([]byte, error) { - switch n.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", n.typeName, n) - case "string": - return json.Marshal(n.String) - case "account": - return json.Marshal(n.Account) - } -} - -type NoteRequestAccountVisitor interface { - VisitString(string) error - VisitAccount(*Account) error -} - -func (n *NoteRequestAccount) Accept(visitor NoteRequestAccountVisitor) error { - switch n.typeName { - default: - return fmt.Errorf("invalid type %s in %T", n.typeName, n) - case "string": - return visitor.VisitString(n.String) - case "account": - return visitor.VisitAccount(n.Account) - } -} - -// The note's contact. -type NoteRequestContact struct { - typeName string - String string - Contact *Contact -} - -func NewNoteRequestContactFromString(value string) *NoteRequestContact { - return &NoteRequestContact{typeName: "string", String: value} -} - -func NewNoteRequestContactFromContact(value *Contact) *NoteRequestContact { - return &NoteRequestContact{typeName: "contact", Contact: value} -} - -func (n *NoteRequestContact) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - n.typeName = "string" - n.String = valueString - return nil - } - valueContact := new(Contact) - if err := json.Unmarshal(data, &valueContact); err == nil { - n.typeName = "contact" - n.Contact = valueContact - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, n) -} - -func (n NoteRequestContact) MarshalJSON() ([]byte, error) { - switch n.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", n.typeName, n) - case "string": - return json.Marshal(n.String) - case "contact": - return json.Marshal(n.Contact) - } -} - -type NoteRequestContactVisitor interface { - VisitString(string) error - VisitContact(*Contact) error -} - -func (n *NoteRequestContact) Accept(visitor NoteRequestContactVisitor) error { - switch n.typeName { - default: - return fmt.Errorf("invalid type %s in %T", n.typeName, n) - case "string": - return visitor.VisitString(n.String) - case "contact": - return visitor.VisitContact(n.Contact) - } -} - -// The note's opportunity. -type NoteRequestOpportunity struct { - typeName string - String string - Opportunity *Opportunity -} - -func NewNoteRequestOpportunityFromString(value string) *NoteRequestOpportunity { - return &NoteRequestOpportunity{typeName: "string", String: value} -} - -func NewNoteRequestOpportunityFromOpportunity(value *Opportunity) *NoteRequestOpportunity { - return &NoteRequestOpportunity{typeName: "opportunity", Opportunity: value} -} - -func (n *NoteRequestOpportunity) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - n.typeName = "string" - n.String = valueString - return nil - } - valueOpportunity := new(Opportunity) - if err := json.Unmarshal(data, &valueOpportunity); err == nil { - n.typeName = "opportunity" - n.Opportunity = valueOpportunity - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, n) -} - -func (n NoteRequestOpportunity) MarshalJSON() ([]byte, error) { - switch n.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", n.typeName, n) - case "string": - return json.Marshal(n.String) - case "opportunity": - return json.Marshal(n.Opportunity) - } -} - -type NoteRequestOpportunityVisitor interface { - VisitString(string) error - VisitOpportunity(*Opportunity) error -} - -func (n *NoteRequestOpportunity) Accept(visitor NoteRequestOpportunityVisitor) error { - switch n.typeName { - default: - return fmt.Errorf("invalid type %s in %T", n.typeName, n) - case "string": - return visitor.VisitString(n.String) - case "opportunity": - return visitor.VisitOpportunity(n.Opportunity) - } -} - -// The note's owner. -type NoteRequestOwner struct { - typeName string - String string - User *User -} - -func NewNoteRequestOwnerFromString(value string) *NoteRequestOwner { - return &NoteRequestOwner{typeName: "string", String: value} -} - -func NewNoteRequestOwnerFromUser(value *User) *NoteRequestOwner { - return &NoteRequestOwner{typeName: "user", User: value} -} - -func (n *NoteRequestOwner) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - n.typeName = "string" - n.String = valueString - return nil - } - valueUser := new(User) - if err := json.Unmarshal(data, &valueUser); err == nil { - n.typeName = "user" - n.User = valueUser - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, n) -} - -func (n NoteRequestOwner) MarshalJSON() ([]byte, error) { - switch n.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", n.typeName, n) - case "string": - return json.Marshal(n.String) - case "user": - return json.Marshal(n.User) - } -} - -type NoteRequestOwnerVisitor interface { - VisitString(string) error - VisitUser(*User) error -} - -func (n *NoteRequestOwner) Accept(visitor NoteRequestOwnerVisitor) error { - switch n.typeName { - default: - return fmt.Errorf("invalid type %s in %T", n.typeName, n) - case "string": - return visitor.VisitString(n.String) - case "user": - return visitor.VisitUser(n.User) - } -} - -type NoteResponse struct { - Model *Note `json:"model,omitempty"` - Warnings []*WarningValidationProblem `json:"warnings,omitempty"` - Errors []*ErrorValidationProblem `json:"errors,omitempty"` - Logs []*DebugModeLog `json:"logs,omitempty"` - - _rawJSON json.RawMessage -} - -func (n *NoteResponse) UnmarshalJSON(data []byte) error { - type unmarshaler NoteResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *n = NoteResponse(value) - n._rawJSON = json.RawMessage(data) - return nil -} - -func (n *NoteResponse) String() string { - if len(n._rawJSON) > 0 { - if value, err := core.StringifyJSON(n._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(n); err == nil { - return value - } - return fmt.Sprintf("%#v", n) -} - -type ObjectClassDescriptionRequest struct { - Id string `json:"id"` - OriginType OriginTypeEnum `json:"origin_type,omitempty"` - - _rawJSON json.RawMessage -} - -func (o *ObjectClassDescriptionRequest) UnmarshalJSON(data []byte) error { - type unmarshaler ObjectClassDescriptionRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *o = ObjectClassDescriptionRequest(value) - o._rawJSON = json.RawMessage(data) - return nil -} - -func (o *ObjectClassDescriptionRequest) String() string { - if len(o._rawJSON) > 0 { - if value, err := core.StringifyJSON(o._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(o); err == nil { - return value - } - return fmt.Sprintf("%#v", o) -} - -// # The Opportunity Object -// -// ### Description -// -// The `Opportunity` object is used to represent a deal opportunity in a CRM system. -// -// ### Usage Example -// -// TODO -type Opportunity struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The opportunity's name. - Name *string `json:"name,omitempty"` - // The opportunity's description. - Description *string `json:"description,omitempty"` - // The opportunity's amount. - Amount *int `json:"amount,omitempty"` - // The opportunity's owner. - Owner *OpportunityOwner `json:"owner,omitempty"` - // The account of the opportunity. - Account *OpportunityAccount `json:"account,omitempty"` - // The stage of the opportunity. - Stage *OpportunityStage `json:"stage,omitempty"` - // The opportunity's status. - // - // - `OPEN` - OPEN - // - `WON` - WON - // - `LOST` - LOST - Status *OpportunityStatus `json:"status,omitempty"` - // When the opportunity's last activity occurred. - LastActivityAt *time.Time `json:"last_activity_at,omitempty"` - // When the opportunity was closed. - CloseDate *time.Time `json:"close_date,omitempty"` - // When the third party's opportunity was created. - RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` - RemoteFields []*RemoteField `json:"remote_fields,omitempty"` - - _rawJSON json.RawMessage -} - -func (o *Opportunity) UnmarshalJSON(data []byte) error { - type unmarshaler Opportunity - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *o = Opportunity(value) - o._rawJSON = json.RawMessage(data) - return nil -} - -func (o *Opportunity) String() string { - if len(o._rawJSON) > 0 { - if value, err := core.StringifyJSON(o._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(o); err == nil { - return value - } - return fmt.Sprintf("%#v", o) -} - -// The account of the opportunity. -type OpportunityAccount struct { - typeName string - String string - Account *Account -} - -func NewOpportunityAccountFromString(value string) *OpportunityAccount { - return &OpportunityAccount{typeName: "string", String: value} -} - -func NewOpportunityAccountFromAccount(value *Account) *OpportunityAccount { - return &OpportunityAccount{typeName: "account", Account: value} -} - -func (o *OpportunityAccount) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - o.typeName = "string" - o.String = valueString - return nil - } - valueAccount := new(Account) - if err := json.Unmarshal(data, &valueAccount); err == nil { - o.typeName = "account" - o.Account = valueAccount - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, o) -} - -func (o OpportunityAccount) MarshalJSON() ([]byte, error) { - switch o.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", o.typeName, o) - case "string": - return json.Marshal(o.String) - case "account": - return json.Marshal(o.Account) - } -} - -type OpportunityAccountVisitor interface { - VisitString(string) error - VisitAccount(*Account) error -} - -func (o *OpportunityAccount) Accept(visitor OpportunityAccountVisitor) error { - switch o.typeName { - default: - return fmt.Errorf("invalid type %s in %T", o.typeName, o) - case "string": - return visitor.VisitString(o.String) - case "account": - return visitor.VisitAccount(o.Account) - } -} - -// The opportunity's owner. -type OpportunityOwner struct { - typeName string - String string - User *User -} - -func NewOpportunityOwnerFromString(value string) *OpportunityOwner { - return &OpportunityOwner{typeName: "string", String: value} -} - -func NewOpportunityOwnerFromUser(value *User) *OpportunityOwner { - return &OpportunityOwner{typeName: "user", User: value} -} - -func (o *OpportunityOwner) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - o.typeName = "string" - o.String = valueString - return nil - } - valueUser := new(User) - if err := json.Unmarshal(data, &valueUser); err == nil { - o.typeName = "user" - o.User = valueUser - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, o) -} - -func (o OpportunityOwner) MarshalJSON() ([]byte, error) { - switch o.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", o.typeName, o) - case "string": - return json.Marshal(o.String) - case "user": - return json.Marshal(o.User) - } -} - -type OpportunityOwnerVisitor interface { - VisitString(string) error - VisitUser(*User) error -} - -func (o *OpportunityOwner) Accept(visitor OpportunityOwnerVisitor) error { - switch o.typeName { - default: - return fmt.Errorf("invalid type %s in %T", o.typeName, o) - case "string": - return visitor.VisitString(o.String) - case "user": - return visitor.VisitUser(o.User) - } -} - -// # The Opportunity Object -// -// ### Description -// -// The `Opportunity` object is used to represent a deal opportunity in a CRM system. -// -// ### Usage Example -// -// TODO -type OpportunityRequest struct { - // The opportunity's name. - Name *string `json:"name,omitempty"` - // The opportunity's description. - Description *string `json:"description,omitempty"` - // The opportunity's amount. - Amount *int `json:"amount,omitempty"` - // The opportunity's owner. - Owner *OpportunityRequestOwner `json:"owner,omitempty"` - // The account of the opportunity. - Account *OpportunityRequestAccount `json:"account,omitempty"` - // The stage of the opportunity. - Stage *OpportunityRequestStage `json:"stage,omitempty"` - // The opportunity's status. - // - // - `OPEN` - OPEN - // - `WON` - WON - // - `LOST` - LOST - Status *OpportunityRequestStatus `json:"status,omitempty"` - // When the opportunity's last activity occurred. - LastActivityAt *time.Time `json:"last_activity_at,omitempty"` - // When the opportunity was closed. - CloseDate *time.Time `json:"close_date,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` - RemoteFields []*RemoteFieldRequest `json:"remote_fields,omitempty"` - - _rawJSON json.RawMessage -} - -func (o *OpportunityRequest) UnmarshalJSON(data []byte) error { - type unmarshaler OpportunityRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *o = OpportunityRequest(value) - o._rawJSON = json.RawMessage(data) - return nil -} - -func (o *OpportunityRequest) String() string { - if len(o._rawJSON) > 0 { - if value, err := core.StringifyJSON(o._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(o); err == nil { - return value - } - return fmt.Sprintf("%#v", o) -} - -// The account of the opportunity. -type OpportunityRequestAccount struct { - typeName string - String string - Account *Account -} - -func NewOpportunityRequestAccountFromString(value string) *OpportunityRequestAccount { - return &OpportunityRequestAccount{typeName: "string", String: value} -} - -func NewOpportunityRequestAccountFromAccount(value *Account) *OpportunityRequestAccount { - return &OpportunityRequestAccount{typeName: "account", Account: value} -} - -func (o *OpportunityRequestAccount) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - o.typeName = "string" - o.String = valueString - return nil - } - valueAccount := new(Account) - if err := json.Unmarshal(data, &valueAccount); err == nil { - o.typeName = "account" - o.Account = valueAccount - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, o) -} - -func (o OpportunityRequestAccount) MarshalJSON() ([]byte, error) { - switch o.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", o.typeName, o) - case "string": - return json.Marshal(o.String) - case "account": - return json.Marshal(o.Account) - } -} - -type OpportunityRequestAccountVisitor interface { - VisitString(string) error - VisitAccount(*Account) error -} - -func (o *OpportunityRequestAccount) Accept(visitor OpportunityRequestAccountVisitor) error { - switch o.typeName { - default: - return fmt.Errorf("invalid type %s in %T", o.typeName, o) - case "string": - return visitor.VisitString(o.String) - case "account": - return visitor.VisitAccount(o.Account) - } -} - -// The opportunity's owner. -type OpportunityRequestOwner struct { - typeName string - String string - User *User -} - -func NewOpportunityRequestOwnerFromString(value string) *OpportunityRequestOwner { - return &OpportunityRequestOwner{typeName: "string", String: value} -} - -func NewOpportunityRequestOwnerFromUser(value *User) *OpportunityRequestOwner { - return &OpportunityRequestOwner{typeName: "user", User: value} -} - -func (o *OpportunityRequestOwner) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - o.typeName = "string" - o.String = valueString - return nil - } - valueUser := new(User) - if err := json.Unmarshal(data, &valueUser); err == nil { - o.typeName = "user" - o.User = valueUser - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, o) -} - -func (o OpportunityRequestOwner) MarshalJSON() ([]byte, error) { - switch o.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", o.typeName, o) - case "string": - return json.Marshal(o.String) - case "user": - return json.Marshal(o.User) - } -} - -type OpportunityRequestOwnerVisitor interface { - VisitString(string) error - VisitUser(*User) error -} - -func (o *OpportunityRequestOwner) Accept(visitor OpportunityRequestOwnerVisitor) error { - switch o.typeName { - default: - return fmt.Errorf("invalid type %s in %T", o.typeName, o) - case "string": - return visitor.VisitString(o.String) - case "user": - return visitor.VisitUser(o.User) - } -} - -// The stage of the opportunity. -type OpportunityRequestStage struct { - typeName string - String string - Stage *Stage -} - -func NewOpportunityRequestStageFromString(value string) *OpportunityRequestStage { - return &OpportunityRequestStage{typeName: "string", String: value} -} - -func NewOpportunityRequestStageFromStage(value *Stage) *OpportunityRequestStage { - return &OpportunityRequestStage{typeName: "stage", Stage: value} -} - -func (o *OpportunityRequestStage) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - o.typeName = "string" - o.String = valueString - return nil - } - valueStage := new(Stage) - if err := json.Unmarshal(data, &valueStage); err == nil { - o.typeName = "stage" - o.Stage = valueStage - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, o) -} - -func (o OpportunityRequestStage) MarshalJSON() ([]byte, error) { - switch o.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", o.typeName, o) - case "string": - return json.Marshal(o.String) - case "stage": - return json.Marshal(o.Stage) - } -} - -type OpportunityRequestStageVisitor interface { - VisitString(string) error - VisitStage(*Stage) error -} - -func (o *OpportunityRequestStage) Accept(visitor OpportunityRequestStageVisitor) error { - switch o.typeName { - default: - return fmt.Errorf("invalid type %s in %T", o.typeName, o) - case "string": - return visitor.VisitString(o.String) - case "stage": - return visitor.VisitStage(o.Stage) - } -} - -// The opportunity's status. -// -// - `OPEN` - OPEN -// - `WON` - WON -// - `LOST` - LOST -type OpportunityRequestStatus struct { - typeName string - OpportunityStatusEnum OpportunityStatusEnum - String string -} - -func NewOpportunityRequestStatusFromOpportunityStatusEnum(value OpportunityStatusEnum) *OpportunityRequestStatus { - return &OpportunityRequestStatus{typeName: "opportunityStatusEnum", OpportunityStatusEnum: value} -} - -func NewOpportunityRequestStatusFromString(value string) *OpportunityRequestStatus { - return &OpportunityRequestStatus{typeName: "string", String: value} -} - -func (o *OpportunityRequestStatus) UnmarshalJSON(data []byte) error { - var valueOpportunityStatusEnum OpportunityStatusEnum - if err := json.Unmarshal(data, &valueOpportunityStatusEnum); err == nil { - o.typeName = "opportunityStatusEnum" - o.OpportunityStatusEnum = valueOpportunityStatusEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - o.typeName = "string" - o.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, o) -} - -func (o OpportunityRequestStatus) MarshalJSON() ([]byte, error) { - switch o.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", o.typeName, o) - case "opportunityStatusEnum": - return json.Marshal(o.OpportunityStatusEnum) - case "string": - return json.Marshal(o.String) - } -} - -type OpportunityRequestStatusVisitor interface { - VisitOpportunityStatusEnum(OpportunityStatusEnum) error - VisitString(string) error -} - -func (o *OpportunityRequestStatus) Accept(visitor OpportunityRequestStatusVisitor) error { - switch o.typeName { - default: - return fmt.Errorf("invalid type %s in %T", o.typeName, o) - case "opportunityStatusEnum": - return visitor.VisitOpportunityStatusEnum(o.OpportunityStatusEnum) - case "string": - return visitor.VisitString(o.String) - } -} - -type OpportunityResponse struct { - Model *Opportunity `json:"model,omitempty"` - Warnings []*WarningValidationProblem `json:"warnings,omitempty"` - Errors []*ErrorValidationProblem `json:"errors,omitempty"` - Logs []*DebugModeLog `json:"logs,omitempty"` - - _rawJSON json.RawMessage -} - -func (o *OpportunityResponse) UnmarshalJSON(data []byte) error { - type unmarshaler OpportunityResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *o = OpportunityResponse(value) - o._rawJSON = json.RawMessage(data) - return nil -} - -func (o *OpportunityResponse) String() string { - if len(o._rawJSON) > 0 { - if value, err := core.StringifyJSON(o._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(o); err == nil { - return value + case "list": + return ItemFormatEnumList, nil } - return fmt.Sprintf("%#v", o) + var t ItemFormatEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -// The stage of the opportunity. -type OpportunityStage struct { - typeName string - String string - Stage *Stage +func (i ItemFormatEnum) Ptr() *ItemFormatEnum { + return &i } -func NewOpportunityStageFromString(value string) *OpportunityStage { - return &OpportunityStage{typeName: "string", String: value} -} +type ItemSchema struct { + ItemType *ItemTypeEnum `json:"item_type,omitempty" url:"item_type,omitempty"` + ItemFormat *ItemFormatEnum `json:"item_format,omitempty" url:"item_format,omitempty"` + ItemChoices []string `json:"item_choices,omitempty" url:"item_choices,omitempty"` -func NewOpportunityStageFromStage(value *Stage) *OpportunityStage { - return &OpportunityStage{typeName: "stage", Stage: value} + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (o *OpportunityStage) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - o.typeName = "string" - o.String = valueString - return nil - } - valueStage := new(Stage) - if err := json.Unmarshal(data, &valueStage); err == nil { - o.typeName = "stage" - o.Stage = valueStage +func (i *ItemSchema) GetItemType() *ItemTypeEnum { + if i == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, o) + return i.ItemType } -func (o OpportunityStage) MarshalJSON() ([]byte, error) { - switch o.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", o.typeName, o) - case "string": - return json.Marshal(o.String) - case "stage": - return json.Marshal(o.Stage) +func (i *ItemSchema) GetItemFormat() *ItemFormatEnum { + if i == nil { + return nil } + return i.ItemFormat } -type OpportunityStageVisitor interface { - VisitString(string) error - VisitStage(*Stage) error -} - -func (o *OpportunityStage) Accept(visitor OpportunityStageVisitor) error { - switch o.typeName { - default: - return fmt.Errorf("invalid type %s in %T", o.typeName, o) - case "string": - return visitor.VisitString(o.String) - case "stage": - return visitor.VisitStage(o.Stage) +func (i *ItemSchema) GetItemChoices() []string { + if i == nil { + return nil } + return i.ItemChoices } -// The opportunity's status. -// -// - `OPEN` - OPEN -// - `WON` - WON -// - `LOST` - LOST -type OpportunityStatus struct { - typeName string - OpportunityStatusEnum OpportunityStatusEnum - String string -} - -func NewOpportunityStatusFromOpportunityStatusEnum(value OpportunityStatusEnum) *OpportunityStatus { - return &OpportunityStatus{typeName: "opportunityStatusEnum", OpportunityStatusEnum: value} -} - -func NewOpportunityStatusFromString(value string) *OpportunityStatus { - return &OpportunityStatus{typeName: "string", String: value} +func (i *ItemSchema) GetExtraProperties() map[string]interface{} { + return i.extraProperties } -func (o *OpportunityStatus) UnmarshalJSON(data []byte) error { - var valueOpportunityStatusEnum OpportunityStatusEnum - if err := json.Unmarshal(data, &valueOpportunityStatusEnum); err == nil { - o.typeName = "opportunityStatusEnum" - o.OpportunityStatusEnum = valueOpportunityStatusEnum - return nil +func (i *ItemSchema) UnmarshalJSON(data []byte) error { + type unmarshaler ItemSchema + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - o.typeName = "string" - o.String = valueString - return nil + *i = ItemSchema(value) + extraProperties, err := internal.ExtractExtraProperties(data, *i) + if err != nil { + return err } - return fmt.Errorf("%s cannot be deserialized as a %T", data, o) + i.extraProperties = extraProperties + i.rawJSON = json.RawMessage(data) + return nil } -func (o OpportunityStatus) MarshalJSON() ([]byte, error) { - switch o.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", o.typeName, o) - case "opportunityStatusEnum": - return json.Marshal(o.OpportunityStatusEnum) - case "string": - return json.Marshal(o.String) +func (i *ItemSchema) String() string { + if len(i.rawJSON) > 0 { + if value, err := internal.StringifyJSON(i.rawJSON); err == nil { + return value + } } -} - -type OpportunityStatusVisitor interface { - VisitOpportunityStatusEnum(OpportunityStatusEnum) error - VisitString(string) error -} - -func (o *OpportunityStatus) Accept(visitor OpportunityStatusVisitor) error { - switch o.typeName { - default: - return fmt.Errorf("invalid type %s in %T", o.typeName, o) - case "opportunityStatusEnum": - return visitor.VisitOpportunityStatusEnum(o.OpportunityStatusEnum) - case "string": - return visitor.VisitString(o.String) + if value, err := internal.StringifyJSON(i); err == nil { + return value } + return fmt.Sprintf("%#v", i) } -// - `OPEN` - OPEN -// - `WON` - WON -// - `LOST` - LOST -type OpportunityStatusEnum string +// * `string` - string +// * `number` - number +// * `date` - date +// * `datetime` - datetime +// * `bool` - bool +// * `list` - list +type ItemTypeEnum string const ( - OpportunityStatusEnumOpen OpportunityStatusEnum = "OPEN" - OpportunityStatusEnumWon OpportunityStatusEnum = "WON" - OpportunityStatusEnumLost OpportunityStatusEnum = "LOST" + ItemTypeEnumString ItemTypeEnum = "string" + ItemTypeEnumNumber ItemTypeEnum = "number" + ItemTypeEnumDate ItemTypeEnum = "date" + ItemTypeEnumDatetime ItemTypeEnum = "datetime" + ItemTypeEnumBool ItemTypeEnum = "bool" + ItemTypeEnumList ItemTypeEnum = "list" ) -func NewOpportunityStatusEnumFromString(s string) (OpportunityStatusEnum, error) { +func NewItemTypeEnumFromString(s string) (ItemTypeEnum, error) { switch s { - case "OPEN": - return OpportunityStatusEnumOpen, nil - case "WON": - return OpportunityStatusEnumWon, nil - case "LOST": - return OpportunityStatusEnumLost, nil + case "string": + return ItemTypeEnumString, nil + case "number": + return ItemTypeEnumNumber, nil + case "date": + return ItemTypeEnumDate, nil + case "datetime": + return ItemTypeEnumDatetime, nil + case "bool": + return ItemTypeEnumBool, nil + case "list": + return ItemTypeEnumList, nil } - var t OpportunityStatusEnum + var t ItemTypeEnum return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (o OpportunityStatusEnum) Ptr() *OpportunityStatusEnum { - return &o +func (i ItemTypeEnum) Ptr() *ItemTypeEnum { + return &i } -// - `CUSTOM_OBJECT` - CUSTOM_OBJECT -// - `COMMON_MODEL` - COMMON_MODEL -// - `REMOTE_ONLY_MODEL` - REMOTE_ONLY_MODEL -type OriginTypeEnum string +// * `SYNCING` - SYNCING +// * `DONE` - DONE +// * `FAILED` - FAILED +// * `DISABLED` - DISABLED +// * `PAUSED` - PAUSED +// * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED +type LastSyncResultEnum string const ( - OriginTypeEnumCustomObject OriginTypeEnum = "CUSTOM_OBJECT" - OriginTypeEnumCommonModel OriginTypeEnum = "COMMON_MODEL" - OriginTypeEnumRemoteOnlyModel OriginTypeEnum = "REMOTE_ONLY_MODEL" + LastSyncResultEnumSyncing LastSyncResultEnum = "SYNCING" + LastSyncResultEnumDone LastSyncResultEnum = "DONE" + LastSyncResultEnumFailed LastSyncResultEnum = "FAILED" + LastSyncResultEnumDisabled LastSyncResultEnum = "DISABLED" + LastSyncResultEnumPaused LastSyncResultEnum = "PAUSED" + LastSyncResultEnumPartiallySynced LastSyncResultEnum = "PARTIALLY_SYNCED" ) -func NewOriginTypeEnumFromString(s string) (OriginTypeEnum, error) { +func NewLastSyncResultEnumFromString(s string) (LastSyncResultEnum, error) { switch s { - case "CUSTOM_OBJECT": - return OriginTypeEnumCustomObject, nil - case "COMMON_MODEL": - return OriginTypeEnumCommonModel, nil - case "REMOTE_ONLY_MODEL": - return OriginTypeEnumRemoteOnlyModel, nil - } - var t OriginTypeEnum + case "SYNCING": + return LastSyncResultEnumSyncing, nil + case "DONE": + return LastSyncResultEnumDone, nil + case "FAILED": + return LastSyncResultEnumFailed, nil + case "DISABLED": + return LastSyncResultEnumDisabled, nil + case "PAUSED": + return LastSyncResultEnumPaused, nil + case "PARTIALLY_SYNCED": + return LastSyncResultEnumPartiallySynced, nil + } + var t LastSyncResultEnum return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (o OriginTypeEnum) Ptr() *OriginTypeEnum { - return &o +func (l LastSyncResultEnum) Ptr() *LastSyncResultEnum { + return &l } -type PaginatedAccountDetailsAndActionsList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*AccountDetailsAndActions `json:"results,omitempty"` +type LinkedAccountStatus struct { + LinkedAccountStatus string `json:"linked_account_status" url:"linked_account_status"` + CanMakeRequest bool `json:"can_make_request" url:"can_make_request"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (p *PaginatedAccountDetailsAndActionsList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedAccountDetailsAndActionsList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (l *LinkedAccountStatus) GetLinkedAccountStatus() string { + if l == nil { + return "" } - *p = PaginatedAccountDetailsAndActionsList(value) - p._rawJSON = json.RawMessage(data) - return nil + return l.LinkedAccountStatus } -func (p *PaginatedAccountDetailsAndActionsList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } +func (l *LinkedAccountStatus) GetCanMakeRequest() bool { + if l == nil { + return false } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) + return l.CanMakeRequest } -type PaginatedAccountList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Account `json:"results,omitempty"` - - _rawJSON json.RawMessage +func (l *LinkedAccountStatus) GetExtraProperties() map[string]interface{} { + return l.extraProperties } -func (p *PaginatedAccountList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedAccountList +func (l *LinkedAccountStatus) UnmarshalJSON(data []byte) error { + type unmarshaler LinkedAccountStatus var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *p = PaginatedAccountList(value) - p._rawJSON = json.RawMessage(data) + *l = LinkedAccountStatus(value) + extraProperties, err := internal.ExtractExtraProperties(data, *l) + if err != nil { + return err + } + l.extraProperties = extraProperties + l.rawJSON = json.RawMessage(data) return nil } -func (p *PaginatedAccountList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { +func (l *LinkedAccountStatus) String() string { + if len(l.rawJSON) > 0 { + if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(p); err == nil { + if value, err := internal.StringifyJSON(l); err == nil { return value } - return fmt.Sprintf("%#v", p) + return fmt.Sprintf("%#v", l) } -type PaginatedAssociationList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Association `json:"results,omitempty"` +type MetaResponse struct { + RequestSchema map[string]interface{} `json:"request_schema" url:"request_schema"` + RemoteFieldClasses map[string]interface{} `json:"remote_field_classes,omitempty" url:"remote_field_classes,omitempty"` + Status *LinkedAccountStatus `json:"status,omitempty" url:"status,omitempty"` + HasConditionalParams bool `json:"has_conditional_params" url:"has_conditional_params"` + HasRequiredLinkedAccountParams bool `json:"has_required_linked_account_params" url:"has_required_linked_account_params"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (p *PaginatedAssociationList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedAssociationList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (m *MetaResponse) GetRequestSchema() map[string]interface{} { + if m == nil { + return nil } - *p = PaginatedAssociationList(value) - p._rawJSON = json.RawMessage(data) - return nil + return m.RequestSchema } -func (p *PaginatedAssociationList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value +func (m *MetaResponse) GetRemoteFieldClasses() map[string]interface{} { + if m == nil { + return nil } - return fmt.Sprintf("%#v", p) + return m.RemoteFieldClasses } -type PaginatedAssociationTypeList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*AssociationType `json:"results,omitempty"` - - _rawJSON json.RawMessage +func (m *MetaResponse) GetStatus() *LinkedAccountStatus { + if m == nil { + return nil + } + return m.Status } -func (p *PaginatedAssociationTypeList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedAssociationTypeList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (m *MetaResponse) GetHasConditionalParams() bool { + if m == nil { + return false } - *p = PaginatedAssociationTypeList(value) - p._rawJSON = json.RawMessage(data) - return nil + return m.HasConditionalParams } -func (p *PaginatedAssociationTypeList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value +func (m *MetaResponse) GetHasRequiredLinkedAccountParams() bool { + if m == nil { + return false } - return fmt.Sprintf("%#v", p) + return m.HasRequiredLinkedAccountParams } -type PaginatedAuditLogEventList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*AuditLogEvent `json:"results,omitempty"` - - _rawJSON json.RawMessage +func (m *MetaResponse) GetExtraProperties() map[string]interface{} { + return m.extraProperties } -func (p *PaginatedAuditLogEventList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedAuditLogEventList +func (m *MetaResponse) UnmarshalJSON(data []byte) error { + type unmarshaler MetaResponse var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *p = PaginatedAuditLogEventList(value) - p._rawJSON = json.RawMessage(data) + *m = MetaResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *m) + if err != nil { + return err + } + m.extraProperties = extraProperties + m.rawJSON = json.RawMessage(data) return nil } -func (p *PaginatedAuditLogEventList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { +func (m *MetaResponse) String() string { + if len(m.rawJSON) > 0 { + if value, err := internal.StringifyJSON(m.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(p); err == nil { + if value, err := internal.StringifyJSON(m); err == nil { return value } - return fmt.Sprintf("%#v", p) + return fmt.Sprintf("%#v", m) } -type PaginatedContactList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Contact `json:"results,omitempty"` +// * `GET` - GET +// * `OPTIONS` - OPTIONS +// * `HEAD` - HEAD +// * `POST` - POST +// * `PUT` - PUT +// * `PATCH` - PATCH +// * `DELETE` - DELETE +type MethodEnum string - _rawJSON json.RawMessage -} +const ( + MethodEnumGet MethodEnum = "GET" + MethodEnumOptions MethodEnum = "OPTIONS" + MethodEnumHead MethodEnum = "HEAD" + MethodEnumPost MethodEnum = "POST" + MethodEnumPut MethodEnum = "PUT" + MethodEnumPatch MethodEnum = "PATCH" + MethodEnumDelete MethodEnum = "DELETE" +) -func (p *PaginatedContactList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedContactList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func NewMethodEnumFromString(s string) (MethodEnum, error) { + switch s { + case "GET": + return MethodEnumGet, nil + case "OPTIONS": + return MethodEnumOptions, nil + case "HEAD": + return MethodEnumHead, nil + case "POST": + return MethodEnumPost, nil + case "PUT": + return MethodEnumPut, nil + case "PATCH": + return MethodEnumPatch, nil + case "DELETE": + return MethodEnumDelete, nil } - *p = PaginatedContactList(value) - p._rawJSON = json.RawMessage(data) - return nil + var t MethodEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (p *PaginatedContactList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) +func (m MethodEnum) Ptr() *MethodEnum { + return &m } -type PaginatedCustomObjectClassList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*CustomObjectClass `json:"results,omitempty"` +// # The ModelOperation Object +// ### Description +// The `ModelOperation` object is used to represent the operations that are currently supported for a given model. +// +// ### Usage Example +// View what operations are supported for the `Candidate` endpoint. +type ModelOperation struct { + ModelName string `json:"model_name" url:"model_name"` + AvailableOperations []string `json:"available_operations" url:"available_operations"` + RequiredPostParameters []string `json:"required_post_parameters" url:"required_post_parameters"` + SupportedFields []string `json:"supported_fields" url:"supported_fields"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (p *PaginatedCustomObjectClassList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedCustomObjectClassList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (m *ModelOperation) GetModelName() string { + if m == nil { + return "" } - *p = PaginatedCustomObjectClassList(value) - p._rawJSON = json.RawMessage(data) - return nil + return m.ModelName } -func (p *PaginatedCustomObjectClassList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value +func (m *ModelOperation) GetAvailableOperations() []string { + if m == nil { + return nil } - return fmt.Sprintf("%#v", p) -} - -type PaginatedCustomObjectList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*CustomObject `json:"results,omitempty"` - - _rawJSON json.RawMessage + return m.AvailableOperations } -func (p *PaginatedCustomObjectList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedCustomObjectList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (m *ModelOperation) GetRequiredPostParameters() []string { + if m == nil { + return nil } - *p = PaginatedCustomObjectList(value) - p._rawJSON = json.RawMessage(data) - return nil + return m.RequiredPostParameters } -func (p *PaginatedCustomObjectList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value +func (m *ModelOperation) GetSupportedFields() []string { + if m == nil { + return nil } - return fmt.Sprintf("%#v", p) + return m.SupportedFields } -type PaginatedEngagementList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Engagement `json:"results,omitempty"` - - _rawJSON json.RawMessage +func (m *ModelOperation) GetExtraProperties() map[string]interface{} { + return m.extraProperties } -func (p *PaginatedEngagementList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedEngagementList +func (m *ModelOperation) UnmarshalJSON(data []byte) error { + type unmarshaler ModelOperation var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *p = PaginatedEngagementList(value) - p._rawJSON = json.RawMessage(data) + *m = ModelOperation(value) + extraProperties, err := internal.ExtractExtraProperties(data, *m) + if err != nil { + return err + } + m.extraProperties = extraProperties + m.rawJSON = json.RawMessage(data) return nil } -func (p *PaginatedEngagementList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { +func (m *ModelOperation) String() string { + if len(m.rawJSON) > 0 { + if value, err := internal.StringifyJSON(m.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(p); err == nil { + if value, err := internal.StringifyJSON(m); err == nil { return value } - return fmt.Sprintf("%#v", p) + return fmt.Sprintf("%#v", m) +} + +type ModelPermissionDeserializerRequest struct { + IsEnabled *bool `json:"is_enabled,omitempty" url:"is_enabled,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage } -type PaginatedEngagementTypeList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*EngagementType `json:"results,omitempty"` +func (m *ModelPermissionDeserializerRequest) GetIsEnabled() *bool { + if m == nil { + return nil + } + return m.IsEnabled +} - _rawJSON json.RawMessage +func (m *ModelPermissionDeserializerRequest) GetExtraProperties() map[string]interface{} { + return m.extraProperties } -func (p *PaginatedEngagementTypeList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedEngagementTypeList +func (m *ModelPermissionDeserializerRequest) UnmarshalJSON(data []byte) error { + type unmarshaler ModelPermissionDeserializerRequest var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *p = PaginatedEngagementTypeList(value) - p._rawJSON = json.RawMessage(data) + *m = ModelPermissionDeserializerRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *m) + if err != nil { + return err + } + m.extraProperties = extraProperties + m.rawJSON = json.RawMessage(data) return nil } -func (p *PaginatedEngagementTypeList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { +func (m *ModelPermissionDeserializerRequest) String() string { + if len(m.rawJSON) > 0 { + if value, err := internal.StringifyJSON(m.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(p); err == nil { + if value, err := internal.StringifyJSON(m); err == nil { return value } - return fmt.Sprintf("%#v", p) + return fmt.Sprintf("%#v", m) } -type PaginatedIssueList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Issue `json:"results,omitempty"` +// # The MultipartFormField Object +// ### Description +// The `MultipartFormField` object is used to represent fields in an HTTP request using `multipart/form-data`. +// +// ### Usage Example +// Create a `MultipartFormField` to define a multipart form entry. +type MultipartFormFieldRequest struct { + // The name of the form field + Name string `json:"name" url:"name"` + // The data for the form field. + Data string `json:"data" url:"data"` + // The encoding of the value of `data`. Defaults to `RAW` if not defined. + // + // * `RAW` - RAW + // * `BASE64` - BASE64 + // * `GZIP_BASE64` - GZIP_BASE64 + Encoding *MultipartFormFieldRequestEncoding `json:"encoding,omitempty" url:"encoding,omitempty"` + // The file name of the form field, if the field is for a file. + FileName *string `json:"file_name,omitempty" url:"file_name,omitempty"` + // The MIME type of the file, if the field is for a file. + ContentType *string `json:"content_type,omitempty" url:"content_type,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} - _rawJSON json.RawMessage +func (m *MultipartFormFieldRequest) GetName() string { + if m == nil { + return "" + } + return m.Name } -func (p *PaginatedIssueList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedIssueList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (m *MultipartFormFieldRequest) GetData() string { + if m == nil { + return "" } - *p = PaginatedIssueList(value) - p._rawJSON = json.RawMessage(data) - return nil + return m.Data } -func (p *PaginatedIssueList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } +func (m *MultipartFormFieldRequest) GetEncoding() *MultipartFormFieldRequestEncoding { + if m == nil { + return nil } - if value, err := core.StringifyJSON(p); err == nil { - return value + return m.Encoding +} + +func (m *MultipartFormFieldRequest) GetFileName() *string { + if m == nil { + return nil } - return fmt.Sprintf("%#v", p) + return m.FileName } -type PaginatedLeadList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Lead `json:"results,omitempty"` +func (m *MultipartFormFieldRequest) GetContentType() *string { + if m == nil { + return nil + } + return m.ContentType +} - _rawJSON json.RawMessage +func (m *MultipartFormFieldRequest) GetExtraProperties() map[string]interface{} { + return m.extraProperties } -func (p *PaginatedLeadList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedLeadList +func (m *MultipartFormFieldRequest) UnmarshalJSON(data []byte) error { + type unmarshaler MultipartFormFieldRequest var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *p = PaginatedLeadList(value) - p._rawJSON = json.RawMessage(data) + *m = MultipartFormFieldRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *m) + if err != nil { + return err + } + m.extraProperties = extraProperties + m.rawJSON = json.RawMessage(data) return nil } -func (p *PaginatedLeadList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { +func (m *MultipartFormFieldRequest) String() string { + if len(m.rawJSON) > 0 { + if value, err := internal.StringifyJSON(m.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(p); err == nil { + if value, err := internal.StringifyJSON(m); err == nil { return value } - return fmt.Sprintf("%#v", p) + return fmt.Sprintf("%#v", m) } -type PaginatedNoteList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Note `json:"results,omitempty"` +// The encoding of the value of `data`. Defaults to `RAW` if not defined. +// +// * `RAW` - RAW +// * `BASE64` - BASE64 +// * `GZIP_BASE64` - GZIP_BASE64 +type MultipartFormFieldRequestEncoding struct { + EncodingEnum EncodingEnum + String string + + typ string +} - _rawJSON json.RawMessage +func (m *MultipartFormFieldRequestEncoding) GetEncodingEnum() EncodingEnum { + if m == nil { + return "" + } + return m.EncodingEnum } -func (p *PaginatedNoteList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedNoteList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (m *MultipartFormFieldRequestEncoding) GetString() string { + if m == nil { + return "" } - *p = PaginatedNoteList(value) - p._rawJSON = json.RawMessage(data) - return nil + return m.String } -func (p *PaginatedNoteList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } +func (m *MultipartFormFieldRequestEncoding) UnmarshalJSON(data []byte) error { + var valueEncodingEnum EncodingEnum + if err := json.Unmarshal(data, &valueEncodingEnum); err == nil { + m.typ = "EncodingEnum" + m.EncodingEnum = valueEncodingEnum + return nil } - if value, err := core.StringifyJSON(p); err == nil { - return value + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + m.typ = "String" + m.String = valueString + return nil } - return fmt.Sprintf("%#v", p) + return fmt.Errorf("%s cannot be deserialized as a %T", data, m) } -type PaginatedOpportunityList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Opportunity `json:"results,omitempty"` - - _rawJSON json.RawMessage +func (m MultipartFormFieldRequestEncoding) MarshalJSON() ([]byte, error) { + if m.typ == "EncodingEnum" || m.EncodingEnum != "" { + return json.Marshal(m.EncodingEnum) + } + if m.typ == "String" || m.String != "" { + return json.Marshal(m.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", m) } -func (p *PaginatedOpportunityList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedOpportunityList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *p = PaginatedOpportunityList(value) - p._rawJSON = json.RawMessage(data) - return nil +type MultipartFormFieldRequestEncodingVisitor interface { + VisitEncodingEnum(EncodingEnum) error + VisitString(string) error } -func (p *PaginatedOpportunityList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } +func (m *MultipartFormFieldRequestEncoding) Accept(visitor MultipartFormFieldRequestEncodingVisitor) error { + if m.typ == "EncodingEnum" || m.EncodingEnum != "" { + return visitor.VisitEncodingEnum(m.EncodingEnum) } - if value, err := core.StringifyJSON(p); err == nil { - return value + if m.typ == "String" || m.String != "" { + return visitor.VisitString(m.String) } - return fmt.Sprintf("%#v", p) + return fmt.Errorf("type %T does not include a non-empty union type", m) } -type PaginatedRemoteFieldClassList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*RemoteFieldClass `json:"results,omitempty"` +// # The Opportunity Object +// ### Description +// The `Opportunity` object is used to represent a deal opportunity in a CRM system. +// ### Usage Example +// TODO +type Opportunity struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The opportunity's name. + Name *string `json:"name,omitempty" url:"name,omitempty"` + // The opportunity's description. + Description *string `json:"description,omitempty" url:"description,omitempty"` + // The opportunity's amount. + Amount *int `json:"amount,omitempty" url:"amount,omitempty"` + // The opportunity's owner. + Owner *OpportunityOwner `json:"owner,omitempty" url:"owner,omitempty"` + // The account of the opportunity. + Account *OpportunityAccount `json:"account,omitempty" url:"account,omitempty"` + // The stage of the opportunity. + Stage *OpportunityStage `json:"stage,omitempty" url:"stage,omitempty"` + // The opportunity's status. + // + // * `OPEN` - OPEN + // * `WON` - WON + // * `LOST` - LOST + Status *OpportunityStatus `json:"status,omitempty" url:"status,omitempty"` + // When the opportunity's last activity occurred. + LastActivityAt *time.Time `json:"last_activity_at,omitempty" url:"last_activity_at,omitempty"` + // When the opportunity was closed. + CloseDate *time.Time `json:"close_date,omitempty" url:"close_date,omitempty"` + // When the third party's opportunity was created. + RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty" url:"remote_created_at,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + RemoteFields []*RemoteField `json:"remote_fields,omitempty" url:"remote_fields,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (p *PaginatedRemoteFieldClassList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedRemoteFieldClassList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (o *Opportunity) GetId() *string { + if o == nil { + return nil } - *p = PaginatedRemoteFieldClassList(value) - p._rawJSON = json.RawMessage(data) - return nil + return o.Id } -func (p *PaginatedRemoteFieldClassList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value +func (o *Opportunity) GetRemoteId() *string { + if o == nil { + return nil } - return fmt.Sprintf("%#v", p) + return o.RemoteId } -type PaginatedStageList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Stage `json:"results,omitempty"` +func (o *Opportunity) GetCreatedAt() *time.Time { + if o == nil { + return nil + } + return o.CreatedAt +} - _rawJSON json.RawMessage +func (o *Opportunity) GetModifiedAt() *time.Time { + if o == nil { + return nil + } + return o.ModifiedAt } -func (p *PaginatedStageList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedStageList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (o *Opportunity) GetName() *string { + if o == nil { + return nil } - *p = PaginatedStageList(value) - p._rawJSON = json.RawMessage(data) - return nil + return o.Name } -func (p *PaginatedStageList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } +func (o *Opportunity) GetDescription() *string { + if o == nil { + return nil } - if value, err := core.StringifyJSON(p); err == nil { - return value + return o.Description +} + +func (o *Opportunity) GetAmount() *int { + if o == nil { + return nil } - return fmt.Sprintf("%#v", p) + return o.Amount } -type PaginatedSyncStatusList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*SyncStatus `json:"results,omitempty"` +func (o *Opportunity) GetOwner() *OpportunityOwner { + if o == nil { + return nil + } + return o.Owner +} - _rawJSON json.RawMessage +func (o *Opportunity) GetAccount() *OpportunityAccount { + if o == nil { + return nil + } + return o.Account } -func (p *PaginatedSyncStatusList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedSyncStatusList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (o *Opportunity) GetStage() *OpportunityStage { + if o == nil { + return nil } - *p = PaginatedSyncStatusList(value) - p._rawJSON = json.RawMessage(data) - return nil + return o.Stage } -func (p *PaginatedSyncStatusList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } +func (o *Opportunity) GetStatus() *OpportunityStatus { + if o == nil { + return nil } - if value, err := core.StringifyJSON(p); err == nil { - return value + return o.Status +} + +func (o *Opportunity) GetLastActivityAt() *time.Time { + if o == nil { + return nil } - return fmt.Sprintf("%#v", p) + return o.LastActivityAt } -type PaginatedTaskList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Task `json:"results,omitempty"` +func (o *Opportunity) GetCloseDate() *time.Time { + if o == nil { + return nil + } + return o.CloseDate +} - _rawJSON json.RawMessage +func (o *Opportunity) GetRemoteCreatedAt() *time.Time { + if o == nil { + return nil + } + return o.RemoteCreatedAt } -func (p *PaginatedTaskList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedTaskList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (o *Opportunity) GetRemoteWasDeleted() *bool { + if o == nil { + return nil } - *p = PaginatedTaskList(value) - p._rawJSON = json.RawMessage(data) - return nil + return o.RemoteWasDeleted } -func (p *PaginatedTaskList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } +func (o *Opportunity) GetFieldMappings() map[string]interface{} { + if o == nil { + return nil } - if value, err := core.StringifyJSON(p); err == nil { - return value + return o.FieldMappings +} + +func (o *Opportunity) GetRemoteData() []*RemoteData { + if o == nil { + return nil } - return fmt.Sprintf("%#v", p) + return o.RemoteData } -type PaginatedUserList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*User `json:"results,omitempty"` +func (o *Opportunity) GetRemoteFields() []*RemoteField { + if o == nil { + return nil + } + return o.RemoteFields +} - _rawJSON json.RawMessage +func (o *Opportunity) GetExtraProperties() map[string]interface{} { + return o.extraProperties } -func (p *PaginatedUserList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedUserList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { +func (o *Opportunity) UnmarshalJSON(data []byte) error { + type embed Opportunity + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + LastActivityAt *internal.DateTime `json:"last_activity_at,omitempty"` + CloseDate *internal.DateTime `json:"close_date,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + }{ + embed: embed(*o), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { return err } - *p = PaginatedUserList(value) - p._rawJSON = json.RawMessage(data) + *o = Opportunity(unmarshaler.embed) + o.CreatedAt = unmarshaler.CreatedAt.TimePtr() + o.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + o.LastActivityAt = unmarshaler.LastActivityAt.TimePtr() + o.CloseDate = unmarshaler.CloseDate.TimePtr() + o.RemoteCreatedAt = unmarshaler.RemoteCreatedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *o) + if err != nil { + return err + } + o.extraProperties = extraProperties + o.rawJSON = json.RawMessage(data) return nil } -func (p *PaginatedUserList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { +func (o *Opportunity) MarshalJSON() ([]byte, error) { + type embed Opportunity + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + LastActivityAt *internal.DateTime `json:"last_activity_at,omitempty"` + CloseDate *internal.DateTime `json:"close_date,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + }{ + embed: embed(*o), + CreatedAt: internal.NewOptionalDateTime(o.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(o.ModifiedAt), + LastActivityAt: internal.NewOptionalDateTime(o.LastActivityAt), + CloseDate: internal.NewOptionalDateTime(o.CloseDate), + RemoteCreatedAt: internal.NewOptionalDateTime(o.RemoteCreatedAt), + } + return json.Marshal(marshaler) +} + +func (o *Opportunity) String() string { + if len(o.rawJSON) > 0 { + if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(p); err == nil { + if value, err := internal.StringifyJSON(o); err == nil { return value } - return fmt.Sprintf("%#v", p) + return fmt.Sprintf("%#v", o) } -// # The Account Object -// -// ### Description -// -// The `Account` object is used to represent a company in a CRM system. -// -// ### Usage Example -// -// TODO -type PatchedAccountRequest struct { - // The account's owner. - Owner *string `json:"owner,omitempty"` - // The account's name. - Name *string `json:"name,omitempty"` - // The account's description. - Description *string `json:"description,omitempty"` - // The account's industry. - Industry *string `json:"industry,omitempty"` - // The account's website. - Website *string `json:"website,omitempty"` - // The account's number of employees. - NumberOfEmployees *int `json:"number_of_employees,omitempty"` - Addresses []*AddressRequest `json:"addresses,omitempty"` - // The last date (either most recent or furthest in the future) of when an activity occurs in an account. - LastActivityAt *time.Time `json:"last_activity_at,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` - RemoteFields []*RemoteFieldRequest `json:"remote_fields,omitempty"` +// The account of the opportunity. +type OpportunityAccount struct { + String string + Account *Account - _rawJSON json.RawMessage + typ string } -func (p *PatchedAccountRequest) UnmarshalJSON(data []byte) error { - type unmarshaler PatchedAccountRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (o *OpportunityAccount) GetString() string { + if o == nil { + return "" } - *p = PatchedAccountRequest(value) - p._rawJSON = json.RawMessage(data) - return nil + return o.String } -func (p *PatchedAccountRequest) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value +func (o *OpportunityAccount) GetAccount() *Account { + if o == nil { + return nil } - return fmt.Sprintf("%#v", p) -} - -// # The Contact Object -// -// ### Description -// -// The `Contact` object is used to represent an existing point of contact at a company in a CRM system. -// -// ### Usage Example -// -// TODO -type PatchedContactRequest struct { - // The contact's first name. - FirstName *string `json:"first_name,omitempty"` - // The contact's last name. - LastName *string `json:"last_name,omitempty"` - // The contact's account. - Account *string `json:"account,omitempty"` - // The contact's owner. - Owner *PatchedContactRequestOwner `json:"owner,omitempty"` - Addresses []*AddressRequest `json:"addresses,omitempty"` - EmailAddresses []*EmailAddressRequest `json:"email_addresses,omitempty"` - PhoneNumbers []*PhoneNumberRequest `json:"phone_numbers,omitempty"` - // When the contact's last activity occurred. - LastActivityAt *time.Time `json:"last_activity_at,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` - RemoteFields []*RemoteFieldRequest `json:"remote_fields,omitempty"` + return o.Account +} - _rawJSON json.RawMessage +func (o *OpportunityAccount) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + o.typ = "String" + o.String = valueString + return nil + } + valueAccount := new(Account) + if err := json.Unmarshal(data, &valueAccount); err == nil { + o.typ = "Account" + o.Account = valueAccount + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, o) } -func (p *PatchedContactRequest) UnmarshalJSON(data []byte) error { - type unmarshaler PatchedContactRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (o OpportunityAccount) MarshalJSON() ([]byte, error) { + if o.typ == "String" || o.String != "" { + return json.Marshal(o.String) } - *p = PatchedContactRequest(value) - p._rawJSON = json.RawMessage(data) - return nil + if o.typ == "Account" || o.Account != nil { + return json.Marshal(o.Account) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", o) } -func (p *PatchedContactRequest) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } +type OpportunityAccountVisitor interface { + VisitString(string) error + VisitAccount(*Account) error +} + +func (o *OpportunityAccount) Accept(visitor OpportunityAccountVisitor) error { + if o.typ == "String" || o.String != "" { + return visitor.VisitString(o.String) } - if value, err := core.StringifyJSON(p); err == nil { - return value + if o.typ == "Account" || o.Account != nil { + return visitor.VisitAccount(o.Account) } - return fmt.Sprintf("%#v", p) + return fmt.Errorf("type %T does not include a non-empty union type", o) } -// The contact's owner. -type PatchedContactRequestOwner struct { - typeName string - String string - User *User +// The opportunity's owner. +type OpportunityOwner struct { + String string + User *User + + typ string } -func NewPatchedContactRequestOwnerFromString(value string) *PatchedContactRequestOwner { - return &PatchedContactRequestOwner{typeName: "string", String: value} +func (o *OpportunityOwner) GetString() string { + if o == nil { + return "" + } + return o.String } -func NewPatchedContactRequestOwnerFromUser(value *User) *PatchedContactRequestOwner { - return &PatchedContactRequestOwner{typeName: "user", User: value} +func (o *OpportunityOwner) GetUser() *User { + if o == nil { + return nil + } + return o.User } -func (p *PatchedContactRequestOwner) UnmarshalJSON(data []byte) error { +func (o *OpportunityOwner) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" - p.String = valueString + o.typ = "String" + o.String = valueString return nil } valueUser := new(User) if err := json.Unmarshal(data, &valueUser); err == nil { - p.typeName = "user" - p.User = valueUser + o.typ = "User" + o.User = valueUser return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, p) + return fmt.Errorf("%s cannot be deserialized as a %T", data, o) } -func (p PatchedContactRequestOwner) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": - return json.Marshal(p.String) - case "user": - return json.Marshal(p.User) +func (o OpportunityOwner) MarshalJSON() ([]byte, error) { + if o.typ == "String" || o.String != "" { + return json.Marshal(o.String) + } + if o.typ == "User" || o.User != nil { + return json.Marshal(o.User) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", o) } -type PatchedContactRequestOwnerVisitor interface { +type OpportunityOwnerVisitor interface { VisitString(string) error VisitUser(*User) error } -func (p *PatchedContactRequestOwner) Accept(visitor PatchedContactRequestOwnerVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": - return visitor.VisitString(p.String) - case "user": - return visitor.VisitUser(p.User) - } -} - -// # The Engagement Object -// -// ### Description -// -// The `Engagement` object is used to represent an interaction noted in a CRM system. -// -// ### Usage Example -// -// TODO -type PatchedEngagementRequest struct { - // The engagement's owner. - Owner *string `json:"owner,omitempty"` - // The engagement's content. - Content *string `json:"content,omitempty"` - // The engagement's subject. - Subject *string `json:"subject,omitempty"` - // The engagement's direction. - // - // - `INBOUND` - INBOUND - // - `OUTBOUND` - OUTBOUND - Direction *PatchedEngagementRequestDirection `json:"direction,omitempty"` - // The engagement type of the engagement. - EngagementType *string `json:"engagement_type,omitempty"` - // The time at which the engagement started. - StartTime *time.Time `json:"start_time,omitempty"` - // The time at which the engagement ended. - EndTime *time.Time `json:"end_time,omitempty"` - // The account of the engagement. - Account *string `json:"account,omitempty"` - Contacts []*string `json:"contacts,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` - RemoteFields []*RemoteFieldRequest `json:"remote_fields,omitempty"` - - _rawJSON json.RawMessage -} - -func (p *PatchedEngagementRequest) UnmarshalJSON(data []byte) error { - type unmarshaler PatchedEngagementRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *p = PatchedEngagementRequest(value) - p._rawJSON = json.RawMessage(data) - return nil -} - -func (p *PatchedEngagementRequest) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } +func (o *OpportunityOwner) Accept(visitor OpportunityOwnerVisitor) error { + if o.typ == "String" || o.String != "" { + return visitor.VisitString(o.String) } - if value, err := core.StringifyJSON(p); err == nil { - return value + if o.typ == "User" || o.User != nil { + return visitor.VisitUser(o.User) } - return fmt.Sprintf("%#v", p) + return fmt.Errorf("type %T does not include a non-empty union type", o) } -// The engagement's direction. -// -// - `INBOUND` - INBOUND -// - `OUTBOUND` - OUTBOUND -type PatchedEngagementRequestDirection struct { - typeName string - DirectionEnum DirectionEnum - String string -} +// The stage of the opportunity. +type OpportunityStage struct { + String string + Stage *Stage -func NewPatchedEngagementRequestDirectionFromDirectionEnum(value DirectionEnum) *PatchedEngagementRequestDirection { - return &PatchedEngagementRequestDirection{typeName: "directionEnum", DirectionEnum: value} + typ string } -func NewPatchedEngagementRequestDirectionFromString(value string) *PatchedEngagementRequestDirection { - return &PatchedEngagementRequestDirection{typeName: "string", String: value} +func (o *OpportunityStage) GetString() string { + if o == nil { + return "" + } + return o.String } -func (p *PatchedEngagementRequestDirection) UnmarshalJSON(data []byte) error { - var valueDirectionEnum DirectionEnum - if err := json.Unmarshal(data, &valueDirectionEnum); err == nil { - p.typeName = "directionEnum" - p.DirectionEnum = valueDirectionEnum +func (o *OpportunityStage) GetStage() *Stage { + if o == nil { return nil } + return o.Stage +} + +func (o *OpportunityStage) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" - p.String = valueString + o.typ = "String" + o.String = valueString return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, p) -} - -func (p PatchedEngagementRequestDirection) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "directionEnum": - return json.Marshal(p.DirectionEnum) - case "string": - return json.Marshal(p.String) + valueStage := new(Stage) + if err := json.Unmarshal(data, &valueStage); err == nil { + o.typ = "Stage" + o.Stage = valueStage + return nil } + return fmt.Errorf("%s cannot be deserialized as a %T", data, o) } -type PatchedEngagementRequestDirectionVisitor interface { - VisitDirectionEnum(DirectionEnum) error - VisitString(string) error -} - -func (p *PatchedEngagementRequestDirection) Accept(visitor PatchedEngagementRequestDirectionVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "directionEnum": - return visitor.VisitDirectionEnum(p.DirectionEnum) - case "string": - return visitor.VisitString(p.String) +func (o OpportunityStage) MarshalJSON() ([]byte, error) { + if o.typ == "String" || o.String != "" { + return json.Marshal(o.String) } + if o.typ == "Stage" || o.Stage != nil { + return json.Marshal(o.Stage) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", o) } -// # The Opportunity Object -// -// ### Description -// -// The `Opportunity` object is used to represent a deal opportunity in a CRM system. -// -// ### Usage Example -// -// TODO -type PatchedOpportunityRequest struct { - // The opportunity's name. - Name *string `json:"name,omitempty"` - // The opportunity's description. - Description *string `json:"description,omitempty"` - // The opportunity's amount. - Amount *int `json:"amount,omitempty"` - // The opportunity's owner. - Owner *string `json:"owner,omitempty"` - // The account of the opportunity. - Account *string `json:"account,omitempty"` - // The stage of the opportunity. - Stage *string `json:"stage,omitempty"` - // The opportunity's status. - // - // - `OPEN` - OPEN - // - `WON` - WON - // - `LOST` - LOST - Status *PatchedOpportunityRequestStatus `json:"status,omitempty"` - // When the opportunity's last activity occurred. - LastActivityAt *time.Time `json:"last_activity_at,omitempty"` - // When the opportunity was closed. - CloseDate *time.Time `json:"close_date,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` - RemoteFields []*RemoteFieldRequest `json:"remote_fields,omitempty"` - - _rawJSON json.RawMessage -} - -func (p *PatchedOpportunityRequest) UnmarshalJSON(data []byte) error { - type unmarshaler PatchedOpportunityRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *p = PatchedOpportunityRequest(value) - p._rawJSON = json.RawMessage(data) - return nil +type OpportunityStageVisitor interface { + VisitString(string) error + VisitStage(*Stage) error } -func (p *PatchedOpportunityRequest) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } +func (o *OpportunityStage) Accept(visitor OpportunityStageVisitor) error { + if o.typ == "String" || o.String != "" { + return visitor.VisitString(o.String) } - if value, err := core.StringifyJSON(p); err == nil { - return value + if o.typ == "Stage" || o.Stage != nil { + return visitor.VisitStage(o.Stage) } - return fmt.Sprintf("%#v", p) + return fmt.Errorf("type %T does not include a non-empty union type", o) } // The opportunity's status. // -// - `OPEN` - OPEN -// - `WON` - WON -// - `LOST` - LOST -type PatchedOpportunityRequestStatus struct { - typeName string +// * `OPEN` - OPEN +// * `WON` - WON +// * `LOST` - LOST +type OpportunityStatus struct { OpportunityStatusEnum OpportunityStatusEnum String string + + typ string } -func NewPatchedOpportunityRequestStatusFromOpportunityStatusEnum(value OpportunityStatusEnum) *PatchedOpportunityRequestStatus { - return &PatchedOpportunityRequestStatus{typeName: "opportunityStatusEnum", OpportunityStatusEnum: value} +func (o *OpportunityStatus) GetOpportunityStatusEnum() OpportunityStatusEnum { + if o == nil { + return "" + } + return o.OpportunityStatusEnum } -func NewPatchedOpportunityRequestStatusFromString(value string) *PatchedOpportunityRequestStatus { - return &PatchedOpportunityRequestStatus{typeName: "string", String: value} +func (o *OpportunityStatus) GetString() string { + if o == nil { + return "" + } + return o.String } -func (p *PatchedOpportunityRequestStatus) UnmarshalJSON(data []byte) error { +func (o *OpportunityStatus) UnmarshalJSON(data []byte) error { var valueOpportunityStatusEnum OpportunityStatusEnum if err := json.Unmarshal(data, &valueOpportunityStatusEnum); err == nil { - p.typeName = "opportunityStatusEnum" - p.OpportunityStatusEnum = valueOpportunityStatusEnum + o.typ = "OpportunityStatusEnum" + o.OpportunityStatusEnum = valueOpportunityStatusEnum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" - p.String = valueString + o.typ = "String" + o.String = valueString return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, p) + return fmt.Errorf("%s cannot be deserialized as a %T", data, o) } -func (p PatchedOpportunityRequestStatus) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "opportunityStatusEnum": - return json.Marshal(p.OpportunityStatusEnum) - case "string": - return json.Marshal(p.String) +func (o OpportunityStatus) MarshalJSON() ([]byte, error) { + if o.typ == "OpportunityStatusEnum" || o.OpportunityStatusEnum != "" { + return json.Marshal(o.OpportunityStatusEnum) + } + if o.typ == "String" || o.String != "" { + return json.Marshal(o.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", o) } -type PatchedOpportunityRequestStatusVisitor interface { +type OpportunityStatusVisitor interface { VisitOpportunityStatusEnum(OpportunityStatusEnum) error VisitString(string) error } -func (p *PatchedOpportunityRequestStatus) Accept(visitor PatchedOpportunityRequestStatusVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "opportunityStatusEnum": - return visitor.VisitOpportunityStatusEnum(p.OpportunityStatusEnum) - case "string": - return visitor.VisitString(p.String) +func (o *OpportunityStatus) Accept(visitor OpportunityStatusVisitor) error { + if o.typ == "OpportunityStatusEnum" || o.OpportunityStatusEnum != "" { + return visitor.VisitOpportunityStatusEnum(o.OpportunityStatusEnum) } + if o.typ == "String" || o.String != "" { + return visitor.VisitString(o.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", o) } -// # The Task Object -// -// ### Description -// -// The `Task` object is used to represent a task, such as a to-do item. -// -// ### Usage Example -// -// TODO -type PatchedTaskRequest struct { - // The task's subject. - Subject *string `json:"subject,omitempty"` - // The task's content. - Content *string `json:"content,omitempty"` - // The task's owner. - Owner *string `json:"owner,omitempty"` - // The task's account. - Account *string `json:"account,omitempty"` - // The task's opportunity. - Opportunity *string `json:"opportunity,omitempty"` - // When the task is completed. - CompletedDate *time.Time `json:"completed_date,omitempty"` - // When the task is due. - DueDate *time.Time `json:"due_date,omitempty"` - // The task's status. - // - // - `OPEN` - OPEN - // - `CLOSED` - CLOSED - Status *PatchedTaskRequestStatus `json:"status,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` - RemoteFields []*RemoteFieldRequest `json:"remote_fields,omitempty"` +// * `OPEN` - OPEN +// * `WON` - WON +// * `LOST` - LOST +type OpportunityStatusEnum string - _rawJSON json.RawMessage -} +const ( + OpportunityStatusEnumOpen OpportunityStatusEnum = "OPEN" + OpportunityStatusEnumWon OpportunityStatusEnum = "WON" + OpportunityStatusEnumLost OpportunityStatusEnum = "LOST" +) -func (p *PatchedTaskRequest) UnmarshalJSON(data []byte) error { - type unmarshaler PatchedTaskRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func NewOpportunityStatusEnumFromString(s string) (OpportunityStatusEnum, error) { + switch s { + case "OPEN": + return OpportunityStatusEnumOpen, nil + case "WON": + return OpportunityStatusEnumWon, nil + case "LOST": + return OpportunityStatusEnumLost, nil } - *p = PatchedTaskRequest(value) - p._rawJSON = json.RawMessage(data) - return nil + var t OpportunityStatusEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (p *PatchedTaskRequest) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) +func (o OpportunityStatusEnum) Ptr() *OpportunityStatusEnum { + return &o } -// The task's status. -// -// - `OPEN` - OPEN -// - `CLOSED` - CLOSED -type PatchedTaskRequestStatus struct { - typeName string - TaskStatusEnum TaskStatusEnum - String string -} +type PaginatedRemoteFieldClassList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*RemoteFieldClass `json:"results,omitempty" url:"results,omitempty"` -func NewPatchedTaskRequestStatusFromTaskStatusEnum(value TaskStatusEnum) *PatchedTaskRequestStatus { - return &PatchedTaskRequestStatus{typeName: "taskStatusEnum", TaskStatusEnum: value} + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func NewPatchedTaskRequestStatusFromString(value string) *PatchedTaskRequestStatus { - return &PatchedTaskRequestStatus{typeName: "string", String: value} +func (p *PaginatedRemoteFieldClassList) GetNext() *string { + if p == nil { + return nil + } + return p.Next } -func (p *PatchedTaskRequestStatus) UnmarshalJSON(data []byte) error { - var valueTaskStatusEnum TaskStatusEnum - if err := json.Unmarshal(data, &valueTaskStatusEnum); err == nil { - p.typeName = "taskStatusEnum" - p.TaskStatusEnum = valueTaskStatusEnum +func (p *PaginatedRemoteFieldClassList) GetPrevious() *string { + if p == nil { return nil } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" - p.String = valueString + return p.Previous +} + +func (p *PaginatedRemoteFieldClassList) GetResults() []*RemoteFieldClass { + if p == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, p) + return p.Results } -func (p PatchedTaskRequestStatus) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "taskStatusEnum": - return json.Marshal(p.TaskStatusEnum) - case "string": - return json.Marshal(p.String) - } +func (p *PaginatedRemoteFieldClassList) GetExtraProperties() map[string]interface{} { + return p.extraProperties } -type PatchedTaskRequestStatusVisitor interface { - VisitTaskStatusEnum(TaskStatusEnum) error - VisitString(string) error +func (p *PaginatedRemoteFieldClassList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedRemoteFieldClassList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedRemoteFieldClassList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil } -func (p *PatchedTaskRequestStatus) Accept(visitor PatchedTaskRequestStatusVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "taskStatusEnum": - return visitor.VisitTaskStatusEnum(p.TaskStatusEnum) - case "string": - return visitor.VisitString(p.String) +func (p *PaginatedRemoteFieldClassList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value } + return fmt.Sprintf("%#v", p) } // # The PhoneNumber Object -// // ### Description -// // The `PhoneNumber` object is used to represent an entity's phone number. -// // ### Usage Example -// // Fetch from the `GET Contact` endpoint and view their phone numbers. type PhoneNumber struct { // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` // The phone number. - PhoneNumber *string `json:"phone_number,omitempty"` + PhoneNumber *string `json:"phone_number,omitempty" url:"phone_number,omitempty"` // The phone number's type. - PhoneNumberType *string `json:"phone_number_type,omitempty"` + PhoneNumberType *string `json:"phone_number_type,omitempty" url:"phone_number_type,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PhoneNumber) GetCreatedAt() *time.Time { + if p == nil { + return nil + } + return p.CreatedAt +} + +func (p *PhoneNumber) GetModifiedAt() *time.Time { + if p == nil { + return nil + } + return p.ModifiedAt +} + +func (p *PhoneNumber) GetPhoneNumber() *string { + if p == nil { + return nil + } + return p.PhoneNumber +} + +func (p *PhoneNumber) GetPhoneNumberType() *string { + if p == nil { + return nil + } + return p.PhoneNumberType +} - _rawJSON json.RawMessage +func (p *PhoneNumber) GetExtraProperties() map[string]interface{} { + return p.extraProperties } func (p *PhoneNumber) UnmarshalJSON(data []byte) error { - type unmarshaler PhoneNumber - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { + type embed PhoneNumber + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*p), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { return err } - *p = PhoneNumber(value) - p._rawJSON = json.RawMessage(data) + *p = PhoneNumber(unmarshaler.embed) + p.CreatedAt = unmarshaler.CreatedAt.TimePtr() + p.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) return nil } +func (p *PhoneNumber) MarshalJSON() ([]byte, error) { + type embed PhoneNumber + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*p), + CreatedAt: internal.NewOptionalDateTime(p.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(p.ModifiedAt), + } + return json.Marshal(marshaler) +} + func (p *PhoneNumber) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(p); err == nil { + if value, err := internal.StringifyJSON(p); err == nil { return value } return fmt.Sprintf("%#v", p) } // # The PhoneNumber Object -// // ### Description -// // The `PhoneNumber` object is used to represent an entity's phone number. -// // ### Usage Example -// // Fetch from the `GET Contact` endpoint and view their phone numbers. type PhoneNumberRequest struct { // The phone number. - PhoneNumber *string `json:"phone_number,omitempty"` + PhoneNumber *string `json:"phone_number,omitempty" url:"phone_number,omitempty"` // The phone number's type. - PhoneNumberType *string `json:"phone_number_type,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` + PhoneNumberType *string `json:"phone_number_type,omitempty" url:"phone_number_type,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PhoneNumberRequest) GetPhoneNumber() *string { + if p == nil { + return nil + } + return p.PhoneNumber +} + +func (p *PhoneNumberRequest) GetPhoneNumberType() *string { + if p == nil { + return nil + } + return p.PhoneNumberType +} + +func (p *PhoneNumberRequest) GetIntegrationParams() map[string]interface{} { + if p == nil { + return nil + } + return p.IntegrationParams +} + +func (p *PhoneNumberRequest) GetLinkedAccountParams() map[string]interface{} { + if p == nil { + return nil + } + return p.LinkedAccountParams +} - _rawJSON json.RawMessage +func (p *PhoneNumberRequest) GetExtraProperties() map[string]interface{} { + return p.extraProperties } func (p *PhoneNumberRequest) UnmarshalJSON(data []byte) error { @@ -9821,25 +6212,30 @@ func (p *PhoneNumberRequest) UnmarshalJSON(data []byte) error { return err } *p = PhoneNumberRequest(value) - p._rawJSON = json.RawMessage(data) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) return nil } func (p *PhoneNumberRequest) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(p); err == nil { + if value, err := internal.StringifyJSON(p); err == nil { return value } return fmt.Sprintf("%#v", p) } -// - `GENERAL_CUSTOMER_REQUEST` - GENERAL_CUSTOMER_REQUEST -// - `GDPR` - GDPR -// - `OTHER` - OTHER +// * `GENERAL_CUSTOMER_REQUEST` - GENERAL_CUSTOMER_REQUEST +// * `GDPR` - GDPR +// * `OTHER` - OTHER type ReasonEnum string const ( @@ -9866,655 +6262,323 @@ func (r ReasonEnum) Ptr() *ReasonEnum { } // # The RemoteData Object -// // ### Description -// // The `RemoteData` object is used to represent the full data pulled from the third-party API for an object. // // ### Usage Example -// // TODO type RemoteData struct { // The third-party API path that is being called. - Path string `json:"path"` - Data interface{} `json:"data,omitempty"` - - _rawJSON json.RawMessage -} - -func (r *RemoteData) UnmarshalJSON(data []byte) error { - type unmarshaler RemoteData - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *r = RemoteData(value) - r._rawJSON = json.RawMessage(data) - return nil -} - -func (r *RemoteData) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(r); err == nil { - return value - } - return fmt.Sprintf("%#v", r) -} - -type RemoteEndpointInfo struct { - Method string `json:"method"` - UrlPath string `json:"url_path"` - FieldTraversalPath []interface{} `json:"field_traversal_path,omitempty"` + Path string `json:"path" url:"path"` + Data interface{} `json:"data,omitempty" url:"data,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (r *RemoteEndpointInfo) UnmarshalJSON(data []byte) error { - type unmarshaler RemoteEndpointInfo - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (r *RemoteData) GetPath() string { + if r == nil { + return "" } - *r = RemoteEndpointInfo(value) - r._rawJSON = json.RawMessage(data) - return nil + return r.Path } -func (r *RemoteEndpointInfo) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(r); err == nil { - return value +func (r *RemoteData) GetData() interface{} { + if r == nil { + return nil } - return fmt.Sprintf("%#v", r) + return r.Data } -type RemoteField struct { - RemoteFieldClass *RemoteFieldRemoteFieldClass `json:"remote_field_class,omitempty"` - Value map[string]interface{} `json:"value,omitempty"` - - _rawJSON json.RawMessage +func (r *RemoteData) GetExtraProperties() map[string]interface{} { + return r.extraProperties } -func (r *RemoteField) UnmarshalJSON(data []byte) error { - type unmarshaler RemoteField +func (r *RemoteData) UnmarshalJSON(data []byte) error { + type unmarshaler RemoteData var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *r = RemoteField(value) - r._rawJSON = json.RawMessage(data) - return nil -} - -func (r *RemoteField) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(r); err == nil { - return value - } - return fmt.Sprintf("%#v", r) -} - -type RemoteFieldApi struct { - Schema map[string]interface{} `json:"schema,omitempty"` - RemoteKeyName string `json:"remote_key_name"` - RemoteEndpointInfo *RemoteEndpointInfo `json:"remote_endpoint_info,omitempty"` - ExampleValues []interface{} `json:"example_values,omitempty"` - AdvancedMetadata *AdvancedMetadata `json:"advanced_metadata,omitempty"` - Coverage *RemoteFieldApiCoverage `json:"coverage,omitempty"` - - _rawJSON json.RawMessage -} - -func (r *RemoteFieldApi) UnmarshalJSON(data []byte) error { - type unmarshaler RemoteFieldApi - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { + *r = RemoteData(value) + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { return err } - *r = RemoteFieldApi(value) - r._rawJSON = json.RawMessage(data) + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) return nil } -func (r *RemoteFieldApi) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { +func (r *RemoteData) String() string { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(r); err == nil { + if value, err := internal.StringifyJSON(r); err == nil { return value } return fmt.Sprintf("%#v", r) } -type RemoteFieldApiCoverage struct { - typeName string - Integer int - Double float64 -} - -func NewRemoteFieldApiCoverageFromInteger(value int) *RemoteFieldApiCoverage { - return &RemoteFieldApiCoverage{typeName: "integer", Integer: value} -} +type RemoteField struct { + RemoteFieldClass *RemoteFieldRemoteFieldClass `json:"remote_field_class" url:"remote_field_class"` + Value interface{} `json:"value,omitempty" url:"value,omitempty"` -func NewRemoteFieldApiCoverageFromDouble(value float64) *RemoteFieldApiCoverage { - return &RemoteFieldApiCoverage{typeName: "double", Double: value} + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (r *RemoteFieldApiCoverage) UnmarshalJSON(data []byte) error { - var valueInteger int - if err := json.Unmarshal(data, &valueInteger); err == nil { - r.typeName = "integer" - r.Integer = valueInteger - return nil - } - var valueDouble float64 - if err := json.Unmarshal(data, &valueDouble); err == nil { - r.typeName = "double" - r.Double = valueDouble +func (r *RemoteField) GetRemoteFieldClass() *RemoteFieldRemoteFieldClass { + if r == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, r) -} - -func (r RemoteFieldApiCoverage) MarshalJSON() ([]byte, error) { - switch r.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", r.typeName, r) - case "integer": - return json.Marshal(r.Integer) - case "double": - return json.Marshal(r.Double) - } + return r.RemoteFieldClass } -type RemoteFieldApiCoverageVisitor interface { - VisitInteger(int) error - VisitDouble(float64) error -} - -func (r *RemoteFieldApiCoverage) Accept(visitor RemoteFieldApiCoverageVisitor) error { - switch r.typeName { - default: - return fmt.Errorf("invalid type %s in %T", r.typeName, r) - case "integer": - return visitor.VisitInteger(r.Integer) - case "double": - return visitor.VisitDouble(r.Double) +func (r *RemoteField) GetValue() interface{} { + if r == nil { + return nil } + return r.Value } -type RemoteFieldApiResponse struct { - Account []*RemoteFieldApi `json:"Account,omitempty"` - Contact []*RemoteFieldApi `json:"Contact,omitempty"` - Lead []*RemoteFieldApi `json:"Lead,omitempty"` - Note []*RemoteFieldApi `json:"Note,omitempty"` - Opportunity []*RemoteFieldApi `json:"Opportunity,omitempty"` - Stage []*RemoteFieldApi `json:"Stage,omitempty"` - User []*RemoteFieldApi `json:"User,omitempty"` - Task []*RemoteFieldApi `json:"Task,omitempty"` - Engagement []*RemoteFieldApi `json:"Engagement,omitempty"` - - _rawJSON json.RawMessage +func (r *RemoteField) GetExtraProperties() map[string]interface{} { + return r.extraProperties } -func (r *RemoteFieldApiResponse) UnmarshalJSON(data []byte) error { - type unmarshaler RemoteFieldApiResponse +func (r *RemoteField) UnmarshalJSON(data []byte) error { + type unmarshaler RemoteField var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *r = RemoteFieldApiResponse(value) - r._rawJSON = json.RawMessage(data) + *r = RemoteField(value) + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { + return err + } + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) return nil } -func (r *RemoteFieldApiResponse) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { +func (r *RemoteField) String() string { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(r); err == nil { + if value, err := internal.StringifyJSON(r); err == nil { return value } return fmt.Sprintf("%#v", r) } type RemoteFieldClass struct { - Id *string `json:"id,omitempty"` - DisplayName *string `json:"display_name,omitempty"` - RemoteKeyName *string `json:"remote_key_name,omitempty"` - Description *string `json:"description,omitempty"` - IsCustom *bool `json:"is_custom,omitempty"` - IsRequired *bool `json:"is_required,omitempty"` - FieldType *RemoteFieldClassFieldType `json:"field_type,omitempty"` - FieldFormat *RemoteFieldClassFieldFormat `json:"field_format,omitempty"` - FieldChoices []*RemoteFieldClassFieldChoicesItem `json:"field_choices,omitempty"` - ItemSchema *ItemSchema `json:"item_schema,omitempty"` + Id *string `json:"id,omitempty" url:"id,omitempty"` + DisplayName *string `json:"display_name,omitempty" url:"display_name,omitempty"` + RemoteKeyName *string `json:"remote_key_name,omitempty" url:"remote_key_name,omitempty"` + Description *string `json:"description,omitempty" url:"description,omitempty"` + IsCustom *bool `json:"is_custom,omitempty" url:"is_custom,omitempty"` + IsRequired *bool `json:"is_required,omitempty" url:"is_required,omitempty"` + FieldType *FieldTypeEnum `json:"field_type,omitempty" url:"field_type,omitempty"` + FieldFormat *FieldFormatEnum `json:"field_format,omitempty" url:"field_format,omitempty"` + FieldChoices []*RemoteFieldClassFieldChoicesItem `json:"field_choices,omitempty" url:"field_choices,omitempty"` + ItemSchema *ItemSchema `json:"item_schema,omitempty" url:"item_schema,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (r *RemoteFieldClass) UnmarshalJSON(data []byte) error { - type unmarshaler RemoteFieldClass - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (r *RemoteFieldClass) GetId() *string { + if r == nil { + return nil } - *r = RemoteFieldClass(value) - r._rawJSON = json.RawMessage(data) - return nil + return r.Id } -func (r *RemoteFieldClass) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(r); err == nil { - return value +func (r *RemoteFieldClass) GetDisplayName() *string { + if r == nil { + return nil } - return fmt.Sprintf("%#v", r) -} - -type RemoteFieldClassFieldChoicesItem struct { - Value interface{} `json:"value,omitempty"` - DisplayName *string `json:"display_name,omitempty"` - - _rawJSON json.RawMessage + return r.DisplayName } -func (r *RemoteFieldClassFieldChoicesItem) UnmarshalJSON(data []byte) error { - type unmarshaler RemoteFieldClassFieldChoicesItem - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (r *RemoteFieldClass) GetRemoteKeyName() *string { + if r == nil { + return nil } - *r = RemoteFieldClassFieldChoicesItem(value) - r._rawJSON = json.RawMessage(data) - return nil + return r.RemoteKeyName } -func (r *RemoteFieldClassFieldChoicesItem) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(r); err == nil { - return value +func (r *RemoteFieldClass) GetDescription() *string { + if r == nil { + return nil } - return fmt.Sprintf("%#v", r) + return r.Description } -type RemoteFieldClassFieldFormat struct { - typeName string - FieldFormatEnum FieldFormatEnum - String string -} - -func NewRemoteFieldClassFieldFormatFromFieldFormatEnum(value FieldFormatEnum) *RemoteFieldClassFieldFormat { - return &RemoteFieldClassFieldFormat{typeName: "fieldFormatEnum", FieldFormatEnum: value} -} - -func NewRemoteFieldClassFieldFormatFromString(value string) *RemoteFieldClassFieldFormat { - return &RemoteFieldClassFieldFormat{typeName: "string", String: value} -} - -func (r *RemoteFieldClassFieldFormat) UnmarshalJSON(data []byte) error { - var valueFieldFormatEnum FieldFormatEnum - if err := json.Unmarshal(data, &valueFieldFormatEnum); err == nil { - r.typeName = "fieldFormatEnum" - r.FieldFormatEnum = valueFieldFormatEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - r.typeName = "string" - r.String = valueString +func (r *RemoteFieldClass) GetIsCustom() *bool { + if r == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, r) + return r.IsCustom } -func (r RemoteFieldClassFieldFormat) MarshalJSON() ([]byte, error) { - switch r.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", r.typeName, r) - case "fieldFormatEnum": - return json.Marshal(r.FieldFormatEnum) - case "string": - return json.Marshal(r.String) +func (r *RemoteFieldClass) GetIsRequired() *bool { + if r == nil { + return nil } + return r.IsRequired } -type RemoteFieldClassFieldFormatVisitor interface { - VisitFieldFormatEnum(FieldFormatEnum) error - VisitString(string) error -} - -func (r *RemoteFieldClassFieldFormat) Accept(visitor RemoteFieldClassFieldFormatVisitor) error { - switch r.typeName { - default: - return fmt.Errorf("invalid type %s in %T", r.typeName, r) - case "fieldFormatEnum": - return visitor.VisitFieldFormatEnum(r.FieldFormatEnum) - case "string": - return visitor.VisitString(r.String) +func (r *RemoteFieldClass) GetFieldType() *FieldTypeEnum { + if r == nil { + return nil } + return r.FieldType } -type RemoteFieldClassFieldType struct { - typeName string - FieldTypeEnum FieldTypeEnum - String string -} - -func NewRemoteFieldClassFieldTypeFromFieldTypeEnum(value FieldTypeEnum) *RemoteFieldClassFieldType { - return &RemoteFieldClassFieldType{typeName: "fieldTypeEnum", FieldTypeEnum: value} -} - -func NewRemoteFieldClassFieldTypeFromString(value string) *RemoteFieldClassFieldType { - return &RemoteFieldClassFieldType{typeName: "string", String: value} -} - -func (r *RemoteFieldClassFieldType) UnmarshalJSON(data []byte) error { - var valueFieldTypeEnum FieldTypeEnum - if err := json.Unmarshal(data, &valueFieldTypeEnum); err == nil { - r.typeName = "fieldTypeEnum" - r.FieldTypeEnum = valueFieldTypeEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - r.typeName = "string" - r.String = valueString +func (r *RemoteFieldClass) GetFieldFormat() *FieldFormatEnum { + if r == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, r) + return r.FieldFormat } -func (r RemoteFieldClassFieldType) MarshalJSON() ([]byte, error) { - switch r.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", r.typeName, r) - case "fieldTypeEnum": - return json.Marshal(r.FieldTypeEnum) - case "string": - return json.Marshal(r.String) +func (r *RemoteFieldClass) GetFieldChoices() []*RemoteFieldClassFieldChoicesItem { + if r == nil { + return nil } + return r.FieldChoices } -type RemoteFieldClassFieldTypeVisitor interface { - VisitFieldTypeEnum(FieldTypeEnum) error - VisitString(string) error -} - -func (r *RemoteFieldClassFieldType) Accept(visitor RemoteFieldClassFieldTypeVisitor) error { - switch r.typeName { - default: - return fmt.Errorf("invalid type %s in %T", r.typeName, r) - case "fieldTypeEnum": - return visitor.VisitFieldTypeEnum(r.FieldTypeEnum) - case "string": - return visitor.VisitString(r.String) +func (r *RemoteFieldClass) GetItemSchema() *ItemSchema { + if r == nil { + return nil } + return r.ItemSchema } -type RemoteFieldClassForCustomObjectClass struct { - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - DisplayName *string `json:"display_name,omitempty"` - RemoteKeyName *string `json:"remote_key_name,omitempty"` - Description *string `json:"description,omitempty"` - IsRequired *bool `json:"is_required,omitempty"` - FieldType *RemoteFieldClassForCustomObjectClassFieldType `json:"field_type,omitempty"` - FieldFormat *RemoteFieldClassForCustomObjectClassFieldFormat `json:"field_format,omitempty"` - FieldChoices []*RemoteFieldClassForCustomObjectClassFieldChoicesItem `json:"field_choices,omitempty"` - ItemSchema *RemoteFieldClassForCustomObjectClassItemSchema `json:"item_schema,omitempty"` - - _rawJSON json.RawMessage +func (r *RemoteFieldClass) GetExtraProperties() map[string]interface{} { + return r.extraProperties } -func (r *RemoteFieldClassForCustomObjectClass) UnmarshalJSON(data []byte) error { - type unmarshaler RemoteFieldClassForCustomObjectClass +func (r *RemoteFieldClass) UnmarshalJSON(data []byte) error { + type unmarshaler RemoteFieldClass var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *r = RemoteFieldClassForCustomObjectClass(value) - r._rawJSON = json.RawMessage(data) - return nil -} - -func (r *RemoteFieldClassForCustomObjectClass) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(r); err == nil { - return value - } - return fmt.Sprintf("%#v", r) -} - -type RemoteFieldClassForCustomObjectClassFieldChoicesItem struct { - Value interface{} `json:"value,omitempty"` - DisplayName *string `json:"display_name,omitempty"` - - _rawJSON json.RawMessage -} - -func (r *RemoteFieldClassForCustomObjectClassFieldChoicesItem) UnmarshalJSON(data []byte) error { - type unmarshaler RemoteFieldClassForCustomObjectClassFieldChoicesItem - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { + *r = RemoteFieldClass(value) + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { return err } - *r = RemoteFieldClassForCustomObjectClassFieldChoicesItem(value) - r._rawJSON = json.RawMessage(data) + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) return nil } -func (r *RemoteFieldClassForCustomObjectClassFieldChoicesItem) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { +func (r *RemoteFieldClass) String() string { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(r); err == nil { + if value, err := internal.StringifyJSON(r); err == nil { return value } return fmt.Sprintf("%#v", r) } -type RemoteFieldClassForCustomObjectClassFieldFormat struct { - typeName string - FieldFormatEnum FieldFormatEnum - String string -} - -func NewRemoteFieldClassForCustomObjectClassFieldFormatFromFieldFormatEnum(value FieldFormatEnum) *RemoteFieldClassForCustomObjectClassFieldFormat { - return &RemoteFieldClassForCustomObjectClassFieldFormat{typeName: "fieldFormatEnum", FieldFormatEnum: value} -} - -func NewRemoteFieldClassForCustomObjectClassFieldFormatFromString(value string) *RemoteFieldClassForCustomObjectClassFieldFormat { - return &RemoteFieldClassForCustomObjectClassFieldFormat{typeName: "string", String: value} -} - -func (r *RemoteFieldClassForCustomObjectClassFieldFormat) UnmarshalJSON(data []byte) error { - var valueFieldFormatEnum FieldFormatEnum - if err := json.Unmarshal(data, &valueFieldFormatEnum); err == nil { - r.typeName = "fieldFormatEnum" - r.FieldFormatEnum = valueFieldFormatEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - r.typeName = "string" - r.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, r) -} - -func (r RemoteFieldClassForCustomObjectClassFieldFormat) MarshalJSON() ([]byte, error) { - switch r.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", r.typeName, r) - case "fieldFormatEnum": - return json.Marshal(r.FieldFormatEnum) - case "string": - return json.Marshal(r.String) - } -} - -type RemoteFieldClassForCustomObjectClassFieldFormatVisitor interface { - VisitFieldFormatEnum(FieldFormatEnum) error - VisitString(string) error -} - -func (r *RemoteFieldClassForCustomObjectClassFieldFormat) Accept(visitor RemoteFieldClassForCustomObjectClassFieldFormatVisitor) error { - switch r.typeName { - default: - return fmt.Errorf("invalid type %s in %T", r.typeName, r) - case "fieldFormatEnum": - return visitor.VisitFieldFormatEnum(r.FieldFormatEnum) - case "string": - return visitor.VisitString(r.String) - } -} - -type RemoteFieldClassForCustomObjectClassFieldType struct { - typeName string - FieldTypeEnum FieldTypeEnum - String string -} - -func NewRemoteFieldClassForCustomObjectClassFieldTypeFromFieldTypeEnum(value FieldTypeEnum) *RemoteFieldClassForCustomObjectClassFieldType { - return &RemoteFieldClassForCustomObjectClassFieldType{typeName: "fieldTypeEnum", FieldTypeEnum: value} -} - -func NewRemoteFieldClassForCustomObjectClassFieldTypeFromString(value string) *RemoteFieldClassForCustomObjectClassFieldType { - return &RemoteFieldClassForCustomObjectClassFieldType{typeName: "string", String: value} -} - -func (r *RemoteFieldClassForCustomObjectClassFieldType) UnmarshalJSON(data []byte) error { - var valueFieldTypeEnum FieldTypeEnum - if err := json.Unmarshal(data, &valueFieldTypeEnum); err == nil { - r.typeName = "fieldTypeEnum" - r.FieldTypeEnum = valueFieldTypeEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - r.typeName = "string" - r.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, r) -} - -func (r RemoteFieldClassForCustomObjectClassFieldType) MarshalJSON() ([]byte, error) { - switch r.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", r.typeName, r) - case "fieldTypeEnum": - return json.Marshal(r.FieldTypeEnum) - case "string": - return json.Marshal(r.String) - } -} +type RemoteFieldClassFieldChoicesItem struct { + Value interface{} `json:"value,omitempty" url:"value,omitempty"` + DisplayName *string `json:"display_name,omitempty" url:"display_name,omitempty"` -type RemoteFieldClassForCustomObjectClassFieldTypeVisitor interface { - VisitFieldTypeEnum(FieldTypeEnum) error - VisitString(string) error + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (r *RemoteFieldClassForCustomObjectClassFieldType) Accept(visitor RemoteFieldClassForCustomObjectClassFieldTypeVisitor) error { - switch r.typeName { - default: - return fmt.Errorf("invalid type %s in %T", r.typeName, r) - case "fieldTypeEnum": - return visitor.VisitFieldTypeEnum(r.FieldTypeEnum) - case "string": - return visitor.VisitString(r.String) +func (r *RemoteFieldClassFieldChoicesItem) GetValue() interface{} { + if r == nil { + return nil } + return r.Value } -type RemoteFieldClassForCustomObjectClassItemSchema struct { - ItemType *string `json:"item_type,omitempty"` - ItemFormat *string `json:"item_format,omitempty"` - ItemChoices []*string `json:"item_choices,omitempty"` +func (r *RemoteFieldClassFieldChoicesItem) GetDisplayName() *string { + if r == nil { + return nil + } + return r.DisplayName +} - _rawJSON json.RawMessage +func (r *RemoteFieldClassFieldChoicesItem) GetExtraProperties() map[string]interface{} { + return r.extraProperties } -func (r *RemoteFieldClassForCustomObjectClassItemSchema) UnmarshalJSON(data []byte) error { - type unmarshaler RemoteFieldClassForCustomObjectClassItemSchema +func (r *RemoteFieldClassFieldChoicesItem) UnmarshalJSON(data []byte) error { + type unmarshaler RemoteFieldClassFieldChoicesItem var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *r = RemoteFieldClassForCustomObjectClassItemSchema(value) - r._rawJSON = json.RawMessage(data) + *r = RemoteFieldClassFieldChoicesItem(value) + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { + return err + } + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) return nil } -func (r *RemoteFieldClassForCustomObjectClassItemSchema) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { +func (r *RemoteFieldClassFieldChoicesItem) String() string { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(r); err == nil { + if value, err := internal.StringifyJSON(r); err == nil { return value } return fmt.Sprintf("%#v", r) } type RemoteFieldRemoteFieldClass struct { - typeName string String string RemoteFieldClass *RemoteFieldClass + + typ string } -func NewRemoteFieldRemoteFieldClassFromString(value string) *RemoteFieldRemoteFieldClass { - return &RemoteFieldRemoteFieldClass{typeName: "string", String: value} +func (r *RemoteFieldRemoteFieldClass) GetString() string { + if r == nil { + return "" + } + return r.String } -func NewRemoteFieldRemoteFieldClassFromRemoteFieldClass(value *RemoteFieldClass) *RemoteFieldRemoteFieldClass { - return &RemoteFieldRemoteFieldClass{typeName: "remoteFieldClass", RemoteFieldClass: value} +func (r *RemoteFieldRemoteFieldClass) GetRemoteFieldClass() *RemoteFieldClass { + if r == nil { + return nil + } + return r.RemoteFieldClass } func (r *RemoteFieldRemoteFieldClass) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - r.typeName = "string" + r.typ = "String" r.String = valueString return nil } valueRemoteFieldClass := new(RemoteFieldClass) if err := json.Unmarshal(data, &valueRemoteFieldClass); err == nil { - r.typeName = "remoteFieldClass" + r.typ = "RemoteFieldClass" r.RemoteFieldClass = valueRemoteFieldClass return nil } @@ -10522,14 +6586,13 @@ func (r *RemoteFieldRemoteFieldClass) UnmarshalJSON(data []byte) error { } func (r RemoteFieldRemoteFieldClass) MarshalJSON() ([]byte, error) { - switch r.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", r.typeName, r) - case "string": + if r.typ == "String" || r.String != "" { return json.Marshal(r.String) - case "remoteFieldClass": + } + if r.typ == "RemoteFieldClass" || r.RemoteFieldClass != nil { return json.Marshal(r.RemoteFieldClass) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", r) } type RemoteFieldRemoteFieldClassVisitor interface { @@ -10538,21 +6601,39 @@ type RemoteFieldRemoteFieldClassVisitor interface { } func (r *RemoteFieldRemoteFieldClass) Accept(visitor RemoteFieldRemoteFieldClassVisitor) error { - switch r.typeName { - default: - return fmt.Errorf("invalid type %s in %T", r.typeName, r) - case "string": + if r.typ == "String" || r.String != "" { return visitor.VisitString(r.String) - case "remoteFieldClass": + } + if r.typ == "RemoteFieldClass" || r.RemoteFieldClass != nil { return visitor.VisitRemoteFieldClass(r.RemoteFieldClass) } + return fmt.Errorf("type %T does not include a non-empty union type", r) } type RemoteFieldRequest struct { - RemoteFieldClass *RemoteFieldRequestRemoteFieldClass `json:"remote_field_class,omitempty"` - Value interface{} `json:"value,omitempty"` + RemoteFieldClass *RemoteFieldRequestRemoteFieldClass `json:"remote_field_class" url:"remote_field_class"` + Value interface{} `json:"value,omitempty" url:"value,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (r *RemoteFieldRequest) GetRemoteFieldClass() *RemoteFieldRequestRemoteFieldClass { + if r == nil { + return nil + } + return r.RemoteFieldClass +} + +func (r *RemoteFieldRequest) GetValue() interface{} { + if r == nil { + return nil + } + return r.Value +} - _rawJSON json.RawMessage +func (r *RemoteFieldRequest) GetExtraProperties() map[string]interface{} { + return r.extraProperties } func (r *RemoteFieldRequest) UnmarshalJSON(data []byte) error { @@ -10562,46 +6643,58 @@ func (r *RemoteFieldRequest) UnmarshalJSON(data []byte) error { return err } *r = RemoteFieldRequest(value) - r._rawJSON = json.RawMessage(data) + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { + return err + } + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) return nil } func (r *RemoteFieldRequest) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(r); err == nil { + if value, err := internal.StringifyJSON(r); err == nil { return value } return fmt.Sprintf("%#v", r) } type RemoteFieldRequestRemoteFieldClass struct { - typeName string String string RemoteFieldClass *RemoteFieldClass + + typ string } -func NewRemoteFieldRequestRemoteFieldClassFromString(value string) *RemoteFieldRequestRemoteFieldClass { - return &RemoteFieldRequestRemoteFieldClass{typeName: "string", String: value} +func (r *RemoteFieldRequestRemoteFieldClass) GetString() string { + if r == nil { + return "" + } + return r.String } -func NewRemoteFieldRequestRemoteFieldClassFromRemoteFieldClass(value *RemoteFieldClass) *RemoteFieldRequestRemoteFieldClass { - return &RemoteFieldRequestRemoteFieldClass{typeName: "remoteFieldClass", RemoteFieldClass: value} +func (r *RemoteFieldRequestRemoteFieldClass) GetRemoteFieldClass() *RemoteFieldClass { + if r == nil { + return nil + } + return r.RemoteFieldClass } func (r *RemoteFieldRequestRemoteFieldClass) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - r.typeName = "string" + r.typ = "String" r.String = valueString return nil } valueRemoteFieldClass := new(RemoteFieldClass) if err := json.Unmarshal(data, &valueRemoteFieldClass); err == nil { - r.typeName = "remoteFieldClass" + r.typ = "RemoteFieldClass" r.RemoteFieldClass = valueRemoteFieldClass return nil } @@ -10609,14 +6702,13 @@ func (r *RemoteFieldRequestRemoteFieldClass) UnmarshalJSON(data []byte) error { } func (r RemoteFieldRequestRemoteFieldClass) MarshalJSON() ([]byte, error) { - switch r.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", r.typeName, r) - case "string": + if r.typ == "String" || r.String != "" { return json.Marshal(r.String) - case "remoteFieldClass": + } + if r.typ == "RemoteFieldClass" || r.RemoteFieldClass != nil { return json.Marshal(r.RemoteFieldClass) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", r) } type RemoteFieldRequestRemoteFieldClassVisitor interface { @@ -10625,30 +6717,45 @@ type RemoteFieldRequestRemoteFieldClassVisitor interface { } func (r *RemoteFieldRequestRemoteFieldClass) Accept(visitor RemoteFieldRequestRemoteFieldClassVisitor) error { - switch r.typeName { - default: - return fmt.Errorf("invalid type %s in %T", r.typeName, r) - case "string": + if r.typ == "String" || r.String != "" { return visitor.VisitString(r.String) - case "remoteFieldClass": + } + if r.typ == "RemoteFieldClass" || r.RemoteFieldClass != nil { return visitor.VisitRemoteFieldClass(r.RemoteFieldClass) } + return fmt.Errorf("type %T does not include a non-empty union type", r) } // # The RemoteKey Object -// // ### Description -// // The `RemoteKey` object is used to represent a request for a new remote key. // // ### Usage Example -// // Post a `GenerateRemoteKey` to receive a new `RemoteKey`. type RemoteKey struct { - Name string `json:"name"` - Key string `json:"key"` + Name string `json:"name" url:"name"` + Key string `json:"key" url:"key"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (r *RemoteKey) GetName() string { + if r == nil { + return "" + } + return r.Name +} - _rawJSON json.RawMessage +func (r *RemoteKey) GetKey() string { + if r == nil { + return "" + } + return r.Key +} + +func (r *RemoteKey) GetExtraProperties() map[string]interface{} { + return r.extraProperties } func (r *RemoteKey) UnmarshalJSON(data []byte) error { @@ -10658,41 +6765,97 @@ func (r *RemoteKey) UnmarshalJSON(data []byte) error { return err } *r = RemoteKey(value) - r._rawJSON = json.RawMessage(data) + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { + return err + } + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) return nil } func (r *RemoteKey) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(r); err == nil { + if value, err := internal.StringifyJSON(r); err == nil { return value } return fmt.Sprintf("%#v", r) } // # The RemoteResponse Object -// // ### Description -// // The `RemoteResponse` object is used to represent information returned from a third-party endpoint. // // ### Usage Example -// // View the `RemoteResponse` returned from your `DataPassthrough`. type RemoteResponse struct { - Method string `json:"method"` - Path string `json:"path"` - Status int `json:"status"` - Response interface{} `json:"response,omitempty"` - ResponseHeaders map[string]interface{} `json:"response_headers,omitempty"` - ResponseType *ResponseTypeEnum `json:"response_type,omitempty"` - Headers map[string]interface{} `json:"headers,omitempty"` + Method string `json:"method" url:"method"` + Path string `json:"path" url:"path"` + Status int `json:"status" url:"status"` + Response interface{} `json:"response" url:"response"` + ResponseHeaders map[string]interface{} `json:"response_headers,omitempty" url:"response_headers,omitempty"` + ResponseType *RemoteResponseResponseType `json:"response_type,omitempty" url:"response_type,omitempty"` + Headers map[string]interface{} `json:"headers,omitempty" url:"headers,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (r *RemoteResponse) GetMethod() string { + if r == nil { + return "" + } + return r.Method +} + +func (r *RemoteResponse) GetPath() string { + if r == nil { + return "" + } + return r.Path +} - _rawJSON json.RawMessage +func (r *RemoteResponse) GetStatus() int { + if r == nil { + return 0 + } + return r.Status +} + +func (r *RemoteResponse) GetResponse() interface{} { + if r == nil { + return nil + } + return r.Response +} + +func (r *RemoteResponse) GetResponseHeaders() map[string]interface{} { + if r == nil { + return nil + } + return r.ResponseHeaders +} + +func (r *RemoteResponse) GetResponseType() *RemoteResponseResponseType { + if r == nil { + return nil + } + return r.ResponseType +} + +func (r *RemoteResponse) GetHeaders() map[string]interface{} { + if r == nil { + return nil + } + return r.Headers +} + +func (r *RemoteResponse) GetExtraProperties() map[string]interface{} { + return r.extraProperties } func (r *RemoteResponse) UnmarshalJSON(data []byte) error { @@ -10702,25 +6865,92 @@ func (r *RemoteResponse) UnmarshalJSON(data []byte) error { return err } *r = RemoteResponse(value) - r._rawJSON = json.RawMessage(data) + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { + return err + } + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) return nil } func (r *RemoteResponse) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(r); err == nil { + if value, err := internal.StringifyJSON(r); err == nil { return value } return fmt.Sprintf("%#v", r) } -// - `JSON` - JSON -// - `XML` - XML -// - `MULTIPART` - MULTIPART +type RemoteResponseResponseType struct { + ResponseTypeEnum ResponseTypeEnum + String string + + typ string +} + +func (r *RemoteResponseResponseType) GetResponseTypeEnum() ResponseTypeEnum { + if r == nil { + return "" + } + return r.ResponseTypeEnum +} + +func (r *RemoteResponseResponseType) GetString() string { + if r == nil { + return "" + } + return r.String +} + +func (r *RemoteResponseResponseType) UnmarshalJSON(data []byte) error { + var valueResponseTypeEnum ResponseTypeEnum + if err := json.Unmarshal(data, &valueResponseTypeEnum); err == nil { + r.typ = "ResponseTypeEnum" + r.ResponseTypeEnum = valueResponseTypeEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + r.typ = "String" + r.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, r) +} + +func (r RemoteResponseResponseType) MarshalJSON() ([]byte, error) { + if r.typ == "ResponseTypeEnum" || r.ResponseTypeEnum != "" { + return json.Marshal(r.ResponseTypeEnum) + } + if r.typ == "String" || r.String != "" { + return json.Marshal(r.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", r) +} + +type RemoteResponseResponseTypeVisitor interface { + VisitResponseTypeEnum(ResponseTypeEnum) error + VisitString(string) error +} + +func (r *RemoteResponseResponseType) Accept(visitor RemoteResponseResponseTypeVisitor) error { + if r.typ == "ResponseTypeEnum" || r.ResponseTypeEnum != "" { + return visitor.VisitResponseTypeEnum(r.ResponseTypeEnum) + } + if r.typ == "String" || r.String != "" { + return visitor.VisitString(r.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", r) +} + +// * `JSON` - JSON +// * `XML` - XML +// * `MULTIPART` - MULTIPART type RequestFormatEnum string const ( @@ -10746,8 +6976,8 @@ func (r RequestFormatEnum) Ptr() *RequestFormatEnum { return &r } -// - `JSON` - JSON -// - `BASE64_GZIP` - BASE64_GZIP +// * `JSON` - JSON +// * `BASE64_GZIP` - BASE64_GZIP type ResponseTypeEnum string const ( @@ -10770,48 +7000,8 @@ func (r ResponseTypeEnum) Ptr() *ResponseTypeEnum { return &r } -// - `ADMIN` - ADMIN -// - `DEVELOPER` - DEVELOPER -// - `MEMBER` - MEMBER -// - `API` - API -// - `SYSTEM` - SYSTEM -// - `MERGE_TEAM` - MERGE_TEAM -type RoleEnum string - -const ( - RoleEnumAdmin RoleEnum = "ADMIN" - RoleEnumDeveloper RoleEnum = "DEVELOPER" - RoleEnumMember RoleEnum = "MEMBER" - RoleEnumApi RoleEnum = "API" - RoleEnumSystem RoleEnum = "SYSTEM" - RoleEnumMergeTeam RoleEnum = "MERGE_TEAM" -) - -func NewRoleEnumFromString(s string) (RoleEnum, error) { - switch s { - case "ADMIN": - return RoleEnumAdmin, nil - case "DEVELOPER": - return RoleEnumDeveloper, nil - case "MEMBER": - return RoleEnumMember, nil - case "API": - return RoleEnumApi, nil - case "SYSTEM": - return RoleEnumSystem, nil - case "MERGE_TEAM": - return RoleEnumMergeTeam, nil - } - var t RoleEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (r RoleEnum) Ptr() *RoleEnum { - return &r -} - -// - `IN_NEXT_SYNC` - IN_NEXT_SYNC -// - `IN_LAST_SYNC` - IN_LAST_SYNC +// * `IN_NEXT_SYNC` - IN_NEXT_SYNC +// * `IN_LAST_SYNC` - IN_LAST_SYNC type SelectiveSyncConfigurationsUsageEnum string const ( @@ -10835,852 +7025,629 @@ func (s SelectiveSyncConfigurationsUsageEnum) Ptr() *SelectiveSyncConfigurations } // # The Stage Object -// // ### Description -// // The `Stage` object is used to represent the stage of an opportunity. -// -// ### Usage Example -// -// TODO -type Stage struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The stage's name. - Name *string `json:"name,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` - RemoteFields []*RemoteField `json:"remote_fields,omitempty"` - - _rawJSON json.RawMessage -} - -func (s *Stage) UnmarshalJSON(data []byte) error { - type unmarshaler Stage - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *s = Stage(value) - s._rawJSON = json.RawMessage(data) - return nil -} - -func (s *Stage) String() string { - if len(s._rawJSON) > 0 { - if value, err := core.StringifyJSON(s._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(s); err == nil { - return value - } - return fmt.Sprintf("%#v", s) -} - -// # The SyncStatus Object -// -// ### Description -// -// # The `SyncStatus` object is used to represent the syncing state of an account -// -// ### Usage Example -// -// View the `SyncStatus` for an account to see how recently its models were synced. -type SyncStatus struct { - ModelName string `json:"model_name"` - ModelId string `json:"model_id"` - LastSyncStart *time.Time `json:"last_sync_start,omitempty"` - NextSyncStart *time.Time `json:"next_sync_start,omitempty"` - Status SyncStatusStatusEnum `json:"status,omitempty"` - IsInitialSync bool `json:"is_initial_sync"` - SelectiveSyncConfigurationsUsage *SelectiveSyncConfigurationsUsageEnum `json:"selective_sync_configurations_usage,omitempty"` - - _rawJSON json.RawMessage -} - -func (s *SyncStatus) UnmarshalJSON(data []byte) error { - type unmarshaler SyncStatus - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *s = SyncStatus(value) - s._rawJSON = json.RawMessage(data) - return nil -} - -func (s *SyncStatus) String() string { - if len(s._rawJSON) > 0 { - if value, err := core.StringifyJSON(s._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(s); err == nil { - return value - } - return fmt.Sprintf("%#v", s) -} - -// - `SYNCING` - SYNCING -// - `DONE` - DONE -// - `FAILED` - FAILED -// - `DISABLED` - DISABLED -// - `PAUSED` - PAUSED -// - `PARTIALLY_SYNCED` - PARTIALLY_SYNCED -type SyncStatusStatusEnum string - -const ( - SyncStatusStatusEnumSyncing SyncStatusStatusEnum = "SYNCING" - SyncStatusStatusEnumDone SyncStatusStatusEnum = "DONE" - SyncStatusStatusEnumFailed SyncStatusStatusEnum = "FAILED" - SyncStatusStatusEnumDisabled SyncStatusStatusEnum = "DISABLED" - SyncStatusStatusEnumPaused SyncStatusStatusEnum = "PAUSED" - SyncStatusStatusEnumPartiallySynced SyncStatusStatusEnum = "PARTIALLY_SYNCED" -) - -func NewSyncStatusStatusEnumFromString(s string) (SyncStatusStatusEnum, error) { - switch s { - case "SYNCING": - return SyncStatusStatusEnumSyncing, nil - case "DONE": - return SyncStatusStatusEnumDone, nil - case "FAILED": - return SyncStatusStatusEnumFailed, nil - case "DISABLED": - return SyncStatusStatusEnumDisabled, nil - case "PAUSED": - return SyncStatusStatusEnumPaused, nil - case "PARTIALLY_SYNCED": - return SyncStatusStatusEnumPartiallySynced, nil - } - var t SyncStatusStatusEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (s SyncStatusStatusEnum) Ptr() *SyncStatusStatusEnum { - return &s -} - -// # The Task Object -// -// ### Description -// -// The `Task` object is used to represent a task, such as a to-do item. -// -// ### Usage Example -// -// TODO -type Task struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The task's subject. - Subject *string `json:"subject,omitempty"` - // The task's content. - Content *string `json:"content,omitempty"` - // The task's owner. - Owner *TaskOwner `json:"owner,omitempty"` - // The task's account. - Account *TaskAccount `json:"account,omitempty"` - // The task's opportunity. - Opportunity *TaskOpportunity `json:"opportunity,omitempty"` - // When the task is completed. - CompletedDate *time.Time `json:"completed_date,omitempty"` - // When the task is due. - DueDate *time.Time `json:"due_date,omitempty"` - // The task's status. - // - // - `OPEN` - OPEN - // - `CLOSED` - CLOSED - Status *TaskStatus `json:"status,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` - RemoteFields []*RemoteField `json:"remote_fields,omitempty"` - - _rawJSON json.RawMessage -} - -func (t *Task) UnmarshalJSON(data []byte) error { - type unmarshaler Task - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *t = Task(value) - t._rawJSON = json.RawMessage(data) - return nil -} - -func (t *Task) String() string { - if len(t._rawJSON) > 0 { - if value, err := core.StringifyJSON(t._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(t); err == nil { - return value - } - return fmt.Sprintf("%#v", t) -} - -// The task's account. -type TaskAccount struct { - typeName string - String string - Account *Account -} - -func NewTaskAccountFromString(value string) *TaskAccount { - return &TaskAccount{typeName: "string", String: value} -} - -func NewTaskAccountFromAccount(value *Account) *TaskAccount { - return &TaskAccount{typeName: "account", Account: value} -} - -func (t *TaskAccount) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" - t.String = valueString - return nil - } - valueAccount := new(Account) - if err := json.Unmarshal(data, &valueAccount); err == nil { - t.typeName = "account" - t.Account = valueAccount - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, t) -} - -func (t TaskAccount) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return json.Marshal(t.String) - case "account": - return json.Marshal(t.Account) - } -} +// ### Usage Example +// TODO +type Stage struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The stage's name. + Name *string `json:"name,omitempty" url:"name,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + RemoteFields []*RemoteField `json:"remote_fields,omitempty" url:"remote_fields,omitempty"` -type TaskAccountVisitor interface { - VisitString(string) error - VisitAccount(*Account) error + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (t *TaskAccount) Accept(visitor TaskAccountVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return visitor.VisitString(t.String) - case "account": - return visitor.VisitAccount(t.Account) +func (s *Stage) GetId() *string { + if s == nil { + return nil } + return s.Id } -// The task's opportunity. -type TaskOpportunity struct { - typeName string - String string - Opportunity *Opportunity +func (s *Stage) GetRemoteId() *string { + if s == nil { + return nil + } + return s.RemoteId } -func NewTaskOpportunityFromString(value string) *TaskOpportunity { - return &TaskOpportunity{typeName: "string", String: value} +func (s *Stage) GetCreatedAt() *time.Time { + if s == nil { + return nil + } + return s.CreatedAt } -func NewTaskOpportunityFromOpportunity(value *Opportunity) *TaskOpportunity { - return &TaskOpportunity{typeName: "opportunity", Opportunity: value} +func (s *Stage) GetModifiedAt() *time.Time { + if s == nil { + return nil + } + return s.ModifiedAt } -func (t *TaskOpportunity) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" - t.String = valueString +func (s *Stage) GetName() *string { + if s == nil { return nil } - valueOpportunity := new(Opportunity) - if err := json.Unmarshal(data, &valueOpportunity); err == nil { - t.typeName = "opportunity" - t.Opportunity = valueOpportunity + return s.Name +} + +func (s *Stage) GetRemoteWasDeleted() *bool { + if s == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, t) + return s.RemoteWasDeleted } -func (t TaskOpportunity) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return json.Marshal(t.String) - case "opportunity": - return json.Marshal(t.Opportunity) +func (s *Stage) GetFieldMappings() map[string]interface{} { + if s == nil { + return nil } + return s.FieldMappings } -type TaskOpportunityVisitor interface { - VisitString(string) error - VisitOpportunity(*Opportunity) error +func (s *Stage) GetRemoteData() []*RemoteData { + if s == nil { + return nil + } + return s.RemoteData } -func (t *TaskOpportunity) Accept(visitor TaskOpportunityVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return visitor.VisitString(t.String) - case "opportunity": - return visitor.VisitOpportunity(t.Opportunity) +func (s *Stage) GetRemoteFields() []*RemoteField { + if s == nil { + return nil } + return s.RemoteFields } -// The task's owner. -type TaskOwner struct { - typeName string - String string - User *User +func (s *Stage) GetExtraProperties() map[string]interface{} { + return s.extraProperties } -func NewTaskOwnerFromString(value string) *TaskOwner { - return &TaskOwner{typeName: "string", String: value} +func (s *Stage) UnmarshalJSON(data []byte) error { + type embed Stage + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*s), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *s = Stage(unmarshaler.embed) + s.CreatedAt = unmarshaler.CreatedAt.TimePtr() + s.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *s) + if err != nil { + return err + } + s.extraProperties = extraProperties + s.rawJSON = json.RawMessage(data) + return nil } -func NewTaskOwnerFromUser(value *User) *TaskOwner { - return &TaskOwner{typeName: "user", User: value} +func (s *Stage) MarshalJSON() ([]byte, error) { + type embed Stage + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*s), + CreatedAt: internal.NewOptionalDateTime(s.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(s.ModifiedAt), + } + return json.Marshal(marshaler) } -func (t *TaskOwner) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" - t.String = valueString - return nil +func (s *Stage) String() string { + if len(s.rawJSON) > 0 { + if value, err := internal.StringifyJSON(s.rawJSON); err == nil { + return value + } } - valueUser := new(User) - if err := json.Unmarshal(data, &valueUser); err == nil { - t.typeName = "user" - t.User = valueUser - return nil + if value, err := internal.StringifyJSON(s); err == nil { + return value } - return fmt.Errorf("%s cannot be deserialized as a %T", data, t) + return fmt.Sprintf("%#v", s) } -func (t TaskOwner) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return json.Marshal(t.String) - case "user": - return json.Marshal(t.User) - } -} +// * `SYNCING` - SYNCING +// * `DONE` - DONE +// * `FAILED` - FAILED +// * `DISABLED` - DISABLED +// * `PAUSED` - PAUSED +// * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED +type StatusFd5Enum string -type TaskOwnerVisitor interface { - VisitString(string) error - VisitUser(*User) error -} +const ( + StatusFd5EnumSyncing StatusFd5Enum = "SYNCING" + StatusFd5EnumDone StatusFd5Enum = "DONE" + StatusFd5EnumFailed StatusFd5Enum = "FAILED" + StatusFd5EnumDisabled StatusFd5Enum = "DISABLED" + StatusFd5EnumPaused StatusFd5Enum = "PAUSED" + StatusFd5EnumPartiallySynced StatusFd5Enum = "PARTIALLY_SYNCED" +) -func (t *TaskOwner) Accept(visitor TaskOwnerVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return visitor.VisitString(t.String) - case "user": - return visitor.VisitUser(t.User) +func NewStatusFd5EnumFromString(s string) (StatusFd5Enum, error) { + switch s { + case "SYNCING": + return StatusFd5EnumSyncing, nil + case "DONE": + return StatusFd5EnumDone, nil + case "FAILED": + return StatusFd5EnumFailed, nil + case "DISABLED": + return StatusFd5EnumDisabled, nil + case "PAUSED": + return StatusFd5EnumPaused, nil + case "PARTIALLY_SYNCED": + return StatusFd5EnumPartiallySynced, nil } + var t StatusFd5Enum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -// # The Task Object -// +func (s StatusFd5Enum) Ptr() *StatusFd5Enum { + return &s +} + +// # The SyncStatus Object // ### Description -// -// The `Task` object is used to represent a task, such as a to-do item. +// The `SyncStatus` object is used to represent the syncing state of an account // // ### Usage Example -// -// TODO -type TaskRequest struct { - // The task's subject. - Subject *string `json:"subject,omitempty"` - // The task's content. - Content *string `json:"content,omitempty"` - // The task's owner. - Owner *TaskRequestOwner `json:"owner,omitempty"` - // The task's account. - Account *TaskRequestAccount `json:"account,omitempty"` - // The task's opportunity. - Opportunity *TaskRequestOpportunity `json:"opportunity,omitempty"` - // When the task is completed. - CompletedDate *time.Time `json:"completed_date,omitempty"` - // When the task is due. - DueDate *time.Time `json:"due_date,omitempty"` - // The task's status. - // - // - `OPEN` - OPEN - // - `CLOSED` - CLOSED - Status *TaskRequestStatus `json:"status,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` - RemoteFields []*RemoteFieldRequest `json:"remote_fields,omitempty"` +// View the `SyncStatus` for an account to see how recently its models were synced. +type SyncStatus struct { + ModelName string `json:"model_name" url:"model_name"` + ModelId string `json:"model_id" url:"model_id"` + LastSyncStart *time.Time `json:"last_sync_start,omitempty" url:"last_sync_start,omitempty"` + NextSyncStart *time.Time `json:"next_sync_start,omitempty" url:"next_sync_start,omitempty"` + LastSyncResult *SyncStatusLastSyncResult `json:"last_sync_result,omitempty" url:"last_sync_result,omitempty"` + LastSyncFinished *time.Time `json:"last_sync_finished,omitempty" url:"last_sync_finished,omitempty"` + Status *SyncStatusStatus `json:"status" url:"status"` + IsInitialSync bool `json:"is_initial_sync" url:"is_initial_sync"` + SelectiveSyncConfigurationsUsage *SelectiveSyncConfigurationsUsageEnum `json:"selective_sync_configurations_usage,omitempty" url:"selective_sync_configurations_usage,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (t *TaskRequest) UnmarshalJSON(data []byte) error { - type unmarshaler TaskRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (s *SyncStatus) GetModelName() string { + if s == nil { + return "" } - *t = TaskRequest(value) - t._rawJSON = json.RawMessage(data) - return nil + return s.ModelName } -func (t *TaskRequest) String() string { - if len(t._rawJSON) > 0 { - if value, err := core.StringifyJSON(t._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(t); err == nil { - return value +func (s *SyncStatus) GetModelId() string { + if s == nil { + return "" } - return fmt.Sprintf("%#v", t) -} - -// The task's account. -type TaskRequestAccount struct { - typeName string - String string - Account *Account -} - -func NewTaskRequestAccountFromString(value string) *TaskRequestAccount { - return &TaskRequestAccount{typeName: "string", String: value} + return s.ModelId } -func NewTaskRequestAccountFromAccount(value *Account) *TaskRequestAccount { - return &TaskRequestAccount{typeName: "account", Account: value} -} - -func (t *TaskRequestAccount) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" - t.String = valueString +func (s *SyncStatus) GetLastSyncStart() *time.Time { + if s == nil { return nil } - valueAccount := new(Account) - if err := json.Unmarshal(data, &valueAccount); err == nil { - t.typeName = "account" - t.Account = valueAccount + return s.LastSyncStart +} + +func (s *SyncStatus) GetNextSyncStart() *time.Time { + if s == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, t) + return s.NextSyncStart } -func (t TaskRequestAccount) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return json.Marshal(t.String) - case "account": - return json.Marshal(t.Account) +func (s *SyncStatus) GetLastSyncResult() *SyncStatusLastSyncResult { + if s == nil { + return nil } + return s.LastSyncResult } -type TaskRequestAccountVisitor interface { - VisitString(string) error - VisitAccount(*Account) error +func (s *SyncStatus) GetLastSyncFinished() *time.Time { + if s == nil { + return nil + } + return s.LastSyncFinished } -func (t *TaskRequestAccount) Accept(visitor TaskRequestAccountVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return visitor.VisitString(t.String) - case "account": - return visitor.VisitAccount(t.Account) +func (s *SyncStatus) GetStatus() *SyncStatusStatus { + if s == nil { + return nil } + return s.Status } -// The task's opportunity. -type TaskRequestOpportunity struct { - typeName string - String string - Opportunity *Opportunity +func (s *SyncStatus) GetIsInitialSync() bool { + if s == nil { + return false + } + return s.IsInitialSync } -func NewTaskRequestOpportunityFromString(value string) *TaskRequestOpportunity { - return &TaskRequestOpportunity{typeName: "string", String: value} +func (s *SyncStatus) GetSelectiveSyncConfigurationsUsage() *SelectiveSyncConfigurationsUsageEnum { + if s == nil { + return nil + } + return s.SelectiveSyncConfigurationsUsage } -func NewTaskRequestOpportunityFromOpportunity(value *Opportunity) *TaskRequestOpportunity { - return &TaskRequestOpportunity{typeName: "opportunity", Opportunity: value} +func (s *SyncStatus) GetExtraProperties() map[string]interface{} { + return s.extraProperties } -func (t *TaskRequestOpportunity) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" - t.String = valueString - return nil +func (s *SyncStatus) UnmarshalJSON(data []byte) error { + type embed SyncStatus + var unmarshaler = struct { + embed + LastSyncStart *internal.DateTime `json:"last_sync_start,omitempty"` + NextSyncStart *internal.DateTime `json:"next_sync_start,omitempty"` + LastSyncFinished *internal.DateTime `json:"last_sync_finished,omitempty"` + }{ + embed: embed(*s), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err } - valueOpportunity := new(Opportunity) - if err := json.Unmarshal(data, &valueOpportunity); err == nil { - t.typeName = "opportunity" - t.Opportunity = valueOpportunity - return nil + *s = SyncStatus(unmarshaler.embed) + s.LastSyncStart = unmarshaler.LastSyncStart.TimePtr() + s.NextSyncStart = unmarshaler.NextSyncStart.TimePtr() + s.LastSyncFinished = unmarshaler.LastSyncFinished.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *s) + if err != nil { + return err } - return fmt.Errorf("%s cannot be deserialized as a %T", data, t) + s.extraProperties = extraProperties + s.rawJSON = json.RawMessage(data) + return nil } -func (t TaskRequestOpportunity) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return json.Marshal(t.String) - case "opportunity": - return json.Marshal(t.Opportunity) +func (s *SyncStatus) MarshalJSON() ([]byte, error) { + type embed SyncStatus + var marshaler = struct { + embed + LastSyncStart *internal.DateTime `json:"last_sync_start,omitempty"` + NextSyncStart *internal.DateTime `json:"next_sync_start,omitempty"` + LastSyncFinished *internal.DateTime `json:"last_sync_finished,omitempty"` + }{ + embed: embed(*s), + LastSyncStart: internal.NewOptionalDateTime(s.LastSyncStart), + NextSyncStart: internal.NewOptionalDateTime(s.NextSyncStart), + LastSyncFinished: internal.NewOptionalDateTime(s.LastSyncFinished), } + return json.Marshal(marshaler) } -type TaskRequestOpportunityVisitor interface { - VisitString(string) error - VisitOpportunity(*Opportunity) error -} - -func (t *TaskRequestOpportunity) Accept(visitor TaskRequestOpportunityVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return visitor.VisitString(t.String) - case "opportunity": - return visitor.VisitOpportunity(t.Opportunity) +func (s *SyncStatus) String() string { + if len(s.rawJSON) > 0 { + if value, err := internal.StringifyJSON(s.rawJSON); err == nil { + return value + } } + if value, err := internal.StringifyJSON(s); err == nil { + return value + } + return fmt.Sprintf("%#v", s) } -// The task's owner. -type TaskRequestOwner struct { - typeName string - String string - User *User +type SyncStatusLastSyncResult struct { + LastSyncResultEnum LastSyncResultEnum + String string + + typ string } -func NewTaskRequestOwnerFromString(value string) *TaskRequestOwner { - return &TaskRequestOwner{typeName: "string", String: value} +func (s *SyncStatusLastSyncResult) GetLastSyncResultEnum() LastSyncResultEnum { + if s == nil { + return "" + } + return s.LastSyncResultEnum } -func NewTaskRequestOwnerFromUser(value *User) *TaskRequestOwner { - return &TaskRequestOwner{typeName: "user", User: value} +func (s *SyncStatusLastSyncResult) GetString() string { + if s == nil { + return "" + } + return s.String } -func (t *TaskRequestOwner) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" - t.String = valueString +func (s *SyncStatusLastSyncResult) UnmarshalJSON(data []byte) error { + var valueLastSyncResultEnum LastSyncResultEnum + if err := json.Unmarshal(data, &valueLastSyncResultEnum); err == nil { + s.typ = "LastSyncResultEnum" + s.LastSyncResultEnum = valueLastSyncResultEnum return nil } - valueUser := new(User) - if err := json.Unmarshal(data, &valueUser); err == nil { - t.typeName = "user" - t.User = valueUser + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + s.typ = "String" + s.String = valueString return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, t) + return fmt.Errorf("%s cannot be deserialized as a %T", data, s) } -func (t TaskRequestOwner) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return json.Marshal(t.String) - case "user": - return json.Marshal(t.User) +func (s SyncStatusLastSyncResult) MarshalJSON() ([]byte, error) { + if s.typ == "LastSyncResultEnum" || s.LastSyncResultEnum != "" { + return json.Marshal(s.LastSyncResultEnum) + } + if s.typ == "String" || s.String != "" { + return json.Marshal(s.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", s) } -type TaskRequestOwnerVisitor interface { +type SyncStatusLastSyncResultVisitor interface { + VisitLastSyncResultEnum(LastSyncResultEnum) error VisitString(string) error - VisitUser(*User) error } -func (t *TaskRequestOwner) Accept(visitor TaskRequestOwnerVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return visitor.VisitString(t.String) - case "user": - return visitor.VisitUser(t.User) +func (s *SyncStatusLastSyncResult) Accept(visitor SyncStatusLastSyncResultVisitor) error { + if s.typ == "LastSyncResultEnum" || s.LastSyncResultEnum != "" { + return visitor.VisitLastSyncResultEnum(s.LastSyncResultEnum) } + if s.typ == "String" || s.String != "" { + return visitor.VisitString(s.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", s) } -// The task's status. -// -// - `OPEN` - OPEN -// - `CLOSED` - CLOSED -type TaskRequestStatus struct { - typeName string - TaskStatusEnum TaskStatusEnum - String string +type SyncStatusStatus struct { + StatusFd5Enum StatusFd5Enum + String string + + typ string } -func NewTaskRequestStatusFromTaskStatusEnum(value TaskStatusEnum) *TaskRequestStatus { - return &TaskRequestStatus{typeName: "taskStatusEnum", TaskStatusEnum: value} +func (s *SyncStatusStatus) GetStatusFd5Enum() StatusFd5Enum { + if s == nil { + return "" + } + return s.StatusFd5Enum } -func NewTaskRequestStatusFromString(value string) *TaskRequestStatus { - return &TaskRequestStatus{typeName: "string", String: value} +func (s *SyncStatusStatus) GetString() string { + if s == nil { + return "" + } + return s.String } -func (t *TaskRequestStatus) UnmarshalJSON(data []byte) error { - var valueTaskStatusEnum TaskStatusEnum - if err := json.Unmarshal(data, &valueTaskStatusEnum); err == nil { - t.typeName = "taskStatusEnum" - t.TaskStatusEnum = valueTaskStatusEnum +func (s *SyncStatusStatus) UnmarshalJSON(data []byte) error { + var valueStatusFd5Enum StatusFd5Enum + if err := json.Unmarshal(data, &valueStatusFd5Enum); err == nil { + s.typ = "StatusFd5Enum" + s.StatusFd5Enum = valueStatusFd5Enum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" - t.String = valueString + s.typ = "String" + s.String = valueString return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, t) + return fmt.Errorf("%s cannot be deserialized as a %T", data, s) } -func (t TaskRequestStatus) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "taskStatusEnum": - return json.Marshal(t.TaskStatusEnum) - case "string": - return json.Marshal(t.String) +func (s SyncStatusStatus) MarshalJSON() ([]byte, error) { + if s.typ == "StatusFd5Enum" || s.StatusFd5Enum != "" { + return json.Marshal(s.StatusFd5Enum) + } + if s.typ == "String" || s.String != "" { + return json.Marshal(s.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", s) } -type TaskRequestStatusVisitor interface { - VisitTaskStatusEnum(TaskStatusEnum) error +type SyncStatusStatusVisitor interface { + VisitStatusFd5Enum(StatusFd5Enum) error VisitString(string) error } -func (t *TaskRequestStatus) Accept(visitor TaskRequestStatusVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "taskStatusEnum": - return visitor.VisitTaskStatusEnum(t.TaskStatusEnum) - case "string": - return visitor.VisitString(t.String) +func (s *SyncStatusStatus) Accept(visitor SyncStatusStatusVisitor) error { + if s.typ == "StatusFd5Enum" || s.StatusFd5Enum != "" { + return visitor.VisitStatusFd5Enum(s.StatusFd5Enum) + } + if s.typ == "String" || s.String != "" { + return visitor.VisitString(s.String) } + return fmt.Errorf("type %T does not include a non-empty union type", s) } -type TaskResponse struct { - Model *Task `json:"model,omitempty"` - Warnings []*WarningValidationProblem `json:"warnings,omitempty"` - Errors []*ErrorValidationProblem `json:"errors,omitempty"` - Logs []*DebugModeLog `json:"logs,omitempty"` +// # The User Object +// ### Description +// The `User` object is used to represent a user with a login to the CRM system. +// ### Usage Example +// TODO +type User struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The user's name. + Name *string `json:"name,omitempty" url:"name,omitempty"` + // The user's email address. + Email *string `json:"email,omitempty" url:"email,omitempty"` + // Whether or not the user is active. + IsActive *bool `json:"is_active,omitempty" url:"is_active,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + RemoteFields []*RemoteField `json:"remote_fields,omitempty" url:"remote_fields,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (t *TaskResponse) UnmarshalJSON(data []byte) error { - type unmarshaler TaskResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (u *User) GetId() *string { + if u == nil { + return nil } - *t = TaskResponse(value) - t._rawJSON = json.RawMessage(data) - return nil + return u.Id } -func (t *TaskResponse) String() string { - if len(t._rawJSON) > 0 { - if value, err := core.StringifyJSON(t._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(t); err == nil { - return value +func (u *User) GetRemoteId() *string { + if u == nil { + return nil } - return fmt.Sprintf("%#v", t) -} - -// The task's status. -// -// - `OPEN` - OPEN -// - `CLOSED` - CLOSED -type TaskStatus struct { - typeName string - TaskStatusEnum TaskStatusEnum - String string + return u.RemoteId } -func NewTaskStatusFromTaskStatusEnum(value TaskStatusEnum) *TaskStatus { - return &TaskStatus{typeName: "taskStatusEnum", TaskStatusEnum: value} +func (u *User) GetCreatedAt() *time.Time { + if u == nil { + return nil + } + return u.CreatedAt } -func NewTaskStatusFromString(value string) *TaskStatus { - return &TaskStatus{typeName: "string", String: value} +func (u *User) GetModifiedAt() *time.Time { + if u == nil { + return nil + } + return u.ModifiedAt } -func (t *TaskStatus) UnmarshalJSON(data []byte) error { - var valueTaskStatusEnum TaskStatusEnum - if err := json.Unmarshal(data, &valueTaskStatusEnum); err == nil { - t.typeName = "taskStatusEnum" - t.TaskStatusEnum = valueTaskStatusEnum +func (u *User) GetName() *string { + if u == nil { return nil } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" - t.String = valueString + return u.Name +} + +func (u *User) GetEmail() *string { + if u == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, t) + return u.Email } -func (t TaskStatus) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "taskStatusEnum": - return json.Marshal(t.TaskStatusEnum) - case "string": - return json.Marshal(t.String) +func (u *User) GetIsActive() *bool { + if u == nil { + return nil } + return u.IsActive } -type TaskStatusVisitor interface { - VisitTaskStatusEnum(TaskStatusEnum) error - VisitString(string) error +func (u *User) GetRemoteWasDeleted() *bool { + if u == nil { + return nil + } + return u.RemoteWasDeleted } -func (t *TaskStatus) Accept(visitor TaskStatusVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "taskStatusEnum": - return visitor.VisitTaskStatusEnum(t.TaskStatusEnum) - case "string": - return visitor.VisitString(t.String) +func (u *User) GetFieldMappings() map[string]interface{} { + if u == nil { + return nil } + return u.FieldMappings } -// - `OPEN` - OPEN -// - `CLOSED` - CLOSED -type TaskStatusEnum string - -const ( - TaskStatusEnumOpen TaskStatusEnum = "OPEN" - TaskStatusEnumClosed TaskStatusEnum = "CLOSED" -) - -func NewTaskStatusEnumFromString(s string) (TaskStatusEnum, error) { - switch s { - case "OPEN": - return TaskStatusEnumOpen, nil - case "CLOSED": - return TaskStatusEnumClosed, nil +func (u *User) GetRemoteData() []*RemoteData { + if u == nil { + return nil } - var t TaskStatusEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) + return u.RemoteData } -func (t TaskStatusEnum) Ptr() *TaskStatusEnum { - return &t +func (u *User) GetRemoteFields() []*RemoteField { + if u == nil { + return nil + } + return u.RemoteFields } -// # The User Object -// -// ### Description -// -// The `User` object is used to represent a user with a login to the CRM system. -// -// ### Usage Example -// -// TODO -type User struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The user's name. - Name *string `json:"name,omitempty"` - // The user's email address. - Email *string `json:"email,omitempty"` - // Whether or not the user is active. - IsActive *bool `json:"is_active,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` - RemoteFields []*RemoteField `json:"remote_fields,omitempty"` - - _rawJSON json.RawMessage +func (u *User) GetExtraProperties() map[string]interface{} { + return u.extraProperties } func (u *User) UnmarshalJSON(data []byte) error { - type unmarshaler User - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { + type embed User + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*u), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *u = User(unmarshaler.embed) + u.CreatedAt = unmarshaler.CreatedAt.TimePtr() + u.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *u) + if err != nil { return err } - *u = User(value) - u._rawJSON = json.RawMessage(data) + u.extraProperties = extraProperties + u.rawJSON = json.RawMessage(data) return nil } +func (u *User) MarshalJSON() ([]byte, error) { + type embed User + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*u), + CreatedAt: internal.NewOptionalDateTime(u.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(u.ModifiedAt), + } + return json.Marshal(marshaler) +} + func (u *User) String() string { - if len(u._rawJSON) > 0 { - if value, err := core.StringifyJSON(u._rawJSON); err == nil { + if len(u.rawJSON) > 0 { + if value, err := internal.StringifyJSON(u.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(u); err == nil { + if value, err := internal.StringifyJSON(u); err == nil { return value } return fmt.Sprintf("%#v", u) } type ValidationProblemSource struct { - Pointer string `json:"pointer"` + Pointer string `json:"pointer" url:"pointer"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} - _rawJSON json.RawMessage +func (v *ValidationProblemSource) GetPointer() string { + if v == nil { + return "" + } + return v.Pointer +} + +func (v *ValidationProblemSource) GetExtraProperties() map[string]interface{} { + return v.extraProperties } func (v *ValidationProblemSource) UnmarshalJSON(data []byte) error { @@ -11690,80 +7657,92 @@ func (v *ValidationProblemSource) UnmarshalJSON(data []byte) error { return err } *v = ValidationProblemSource(value) - v._rawJSON = json.RawMessage(data) + extraProperties, err := internal.ExtractExtraProperties(data, *v) + if err != nil { + return err + } + v.extraProperties = extraProperties + v.rawJSON = json.RawMessage(data) return nil } func (v *ValidationProblemSource) String() string { - if len(v._rawJSON) > 0 { - if value, err := core.StringifyJSON(v._rawJSON); err == nil { + if len(v.rawJSON) > 0 { + if value, err := internal.StringifyJSON(v.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(v); err == nil { + if value, err := internal.StringifyJSON(v); err == nil { return value } return fmt.Sprintf("%#v", v) } type WarningValidationProblem struct { - Source *ValidationProblemSource `json:"source,omitempty"` - Title string `json:"title"` - Detail string `json:"detail"` - ProblemType string `json:"problem_type"` + Source *ValidationProblemSource `json:"source,omitempty" url:"source,omitempty"` + Title string `json:"title" url:"title"` + Detail string `json:"detail" url:"detail"` + ProblemType string `json:"problem_type" url:"problem_type"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (w *WarningValidationProblem) UnmarshalJSON(data []byte) error { - type unmarshaler WarningValidationProblem - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (w *WarningValidationProblem) GetSource() *ValidationProblemSource { + if w == nil { + return nil } - *w = WarningValidationProblem(value) - w._rawJSON = json.RawMessage(data) - return nil + return w.Source } -func (w *WarningValidationProblem) String() string { - if len(w._rawJSON) > 0 { - if value, err := core.StringifyJSON(w._rawJSON); err == nil { - return value - } +func (w *WarningValidationProblem) GetTitle() string { + if w == nil { + return "" } - if value, err := core.StringifyJSON(w); err == nil { - return value + return w.Title +} + +func (w *WarningValidationProblem) GetDetail() string { + if w == nil { + return "" } - return fmt.Sprintf("%#v", w) + return w.Detail } -type WebhookReceiver struct { - Event string `json:"event"` - IsActive bool `json:"is_active"` - Key *string `json:"key,omitempty"` +func (w *WarningValidationProblem) GetProblemType() string { + if w == nil { + return "" + } + return w.ProblemType +} - _rawJSON json.RawMessage +func (w *WarningValidationProblem) GetExtraProperties() map[string]interface{} { + return w.extraProperties } -func (w *WebhookReceiver) UnmarshalJSON(data []byte) error { - type unmarshaler WebhookReceiver +func (w *WarningValidationProblem) UnmarshalJSON(data []byte) error { + type unmarshaler WarningValidationProblem var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *w = WebhookReceiver(value) - w._rawJSON = json.RawMessage(data) + *w = WarningValidationProblem(value) + extraProperties, err := internal.ExtractExtraProperties(data, *w) + if err != nil { + return err + } + w.extraProperties = extraProperties + w.rawJSON = json.RawMessage(data) return nil } -func (w *WebhookReceiver) String() string { - if len(w._rawJSON) > 0 { - if value, err := core.StringifyJSON(w._rawJSON); err == nil { +func (w *WarningValidationProblem) String() string { + if len(w.rawJSON) > 0 { + if value, err := internal.StringifyJSON(w.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(w); err == nil { + if value, err := internal.StringifyJSON(w); err == nil { return value } return fmt.Sprintf("%#v", w) diff --git a/crm/users.go b/crm/users.go index 4f3ff32..e1be1cc 100644 --- a/crm/users.go +++ b/crm/users.go @@ -1,58 +1,127 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package crm import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type UsersListRequest struct { // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // If provided, will only return users with this email. - Email *string `json:"-"` + Email *string `json:"-" url:"email,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - IncludeRemoteFields *bool `json:"-"` + IncludeRemoteFields *bool `json:"-" url:"include_remote_fields,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` } type UsersRemoteFieldClassesListRequest struct { // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - IncludeRemoteFields *bool `json:"-"` + IncludeRemoteFields *bool `json:"-" url:"include_remote_fields,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, will only return remote field classes with this is_common_model_field value - IsCommonModelField *bool `json:"-"` + IsCommonModelField *bool `json:"-" url:"is_common_model_field,omitempty"` + // If provided, will only return remote fields classes with this is_custom value + IsCustom *bool `json:"-" url:"is_custom,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` } type UsersRetrieveRequest struct { // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - IncludeRemoteFields *bool `json:"-"` + IncludeRemoteFields *bool `json:"-" url:"include_remote_fields,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` +} + +type PaginatedUserList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*User `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedUserList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedUserList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedUserList) GetResults() []*User { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedUserList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedUserList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedUserList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedUserList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedUserList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) } diff --git a/crm/users/client.go b/crm/users/client.go index 27f33d2..eb2d0a0 100644 --- a/crm/users/client.go +++ b/crm/users/client.go @@ -1,126 +1,137 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package users import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - crm "github.com/merge-api/merge-go-client/crm" + core "github.com/merge-api/merge-go-client/v2/core" + crm "github.com/merge-api/merge-go-client/v2/crm" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `User` objects. -func (c *Client) List(ctx context.Context, request *crm.UsersListRequest) (*crm.PaginatedUserList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/users" - - queryParams := make(url.Values) - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.Email != nil { - queryParams.Add("email", fmt.Sprintf("%v", *request.Email)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeRemoteFields != nil { - queryParams.Add("include_remote_fields", fmt.Sprintf("%v", *request.IncludeRemoteFields)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *crm.PaginatedUserList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *crm.UsersListRequest, + opts ...option.RequestOption, +) (*core.Page[*crm.User], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/users" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *crm.PaginatedUserList) *internal.PageResponse[*string, *crm.User] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *crm.User]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Returns a `User` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *crm.UsersRetrieveRequest) (*crm.User, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"crm/v1/users/%v", id) - - queryParams := make(url.Values) - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeRemoteFields != nil { - queryParams.Add("include_remote_fields", fmt.Sprintf("%v", *request.IncludeRemoteFields)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *crm.UsersRetrieveRequest, + opts ...option.RequestOption, +) (*crm.User, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/crm/v1/users/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *crm.User if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -129,20 +140,39 @@ func (c *Client) Retrieve(ctx context.Context, id string, request *crm.UsersRetr } // Ignores a specific row based on the `model_id` in the url. These records will have their properties set to null, and will not be updated in future syncs. The "reason" and "message" fields in the request body will be stored for audit purposes. -func (c *Client) IgnoreCreate(ctx context.Context, modelId string, request *crm.IgnoreCommonModelRequest) error { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"crm/v1/users/ignore/%v", modelId) +func (c *Client) IgnoreCreate( + ctx context.Context, + modelId string, + request *crm.IgnoreCommonModelRequest, + opts ...option.RequestOption, +) error { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/crm/v1/users/ignore/%v", + modelId, + ) + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, }, ); err != nil { return err @@ -151,50 +181,60 @@ func (c *Client) IgnoreCreate(ctx context.Context, modelId string, request *crm. } // Returns a list of `RemoteFieldClass` objects. -func (c *Client) RemoteFieldClassesList(ctx context.Context, request *crm.UsersRemoteFieldClassesListRequest) (*crm.PaginatedRemoteFieldClassList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/users/remote-field-classes" - - queryParams := make(url.Values) - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeRemoteFields != nil { - queryParams.Add("include_remote_fields", fmt.Sprintf("%v", *request.IncludeRemoteFields)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.IsCommonModelField != nil { - queryParams.Add("is_common_model_field", fmt.Sprintf("%v", *request.IsCommonModelField)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *crm.PaginatedRemoteFieldClassList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) RemoteFieldClassesList( + ctx context.Context, + request *crm.UsersRemoteFieldClassesListRequest, + opts ...option.RequestOption, +) (*core.Page[*crm.RemoteFieldClass], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/users/remote-field-classes" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *crm.PaginatedRemoteFieldClassList) *internal.PageResponse[*string, *crm.RemoteFieldClass] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *crm.RemoteFieldClass]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } diff --git a/crm/webhook_receivers.go b/crm/webhook_receivers.go index dcf2806..f66c2a9 100644 --- a/crm/webhook_receivers.go +++ b/crm/webhook_receivers.go @@ -1,9 +1,77 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package crm +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" +) + type WebhookReceiverRequest struct { - Event string `json:"event"` - IsActive bool `json:"is_active"` - Key *string `json:"key,omitempty"` + Event string `json:"event" url:"-"` + IsActive bool `json:"is_active" url:"-"` + Key *string `json:"key,omitempty" url:"-"` +} + +type WebhookReceiver struct { + Event string `json:"event" url:"event"` + IsActive bool `json:"is_active" url:"is_active"` + Key *string `json:"key,omitempty" url:"key,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (w *WebhookReceiver) GetEvent() string { + if w == nil { + return "" + } + return w.Event +} + +func (w *WebhookReceiver) GetIsActive() bool { + if w == nil { + return false + } + return w.IsActive +} + +func (w *WebhookReceiver) GetKey() *string { + if w == nil { + return nil + } + return w.Key +} + +func (w *WebhookReceiver) GetExtraProperties() map[string]interface{} { + return w.extraProperties +} + +func (w *WebhookReceiver) UnmarshalJSON(data []byte) error { + type unmarshaler WebhookReceiver + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *w = WebhookReceiver(value) + extraProperties, err := internal.ExtractExtraProperties(data, *w) + if err != nil { + return err + } + w.extraProperties = extraProperties + w.rawJSON = json.RawMessage(data) + return nil +} + +func (w *WebhookReceiver) String() string { + if len(w.rawJSON) > 0 { + if value, err := internal.StringifyJSON(w.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(w); err == nil { + return value + } + return fmt.Sprintf("%#v", w) } diff --git a/crm/webhookreceivers/client.go b/crm/webhookreceivers/client.go index 845b53e..459bbd3 100644 --- a/crm/webhookreceivers/client.go +++ b/crm/webhookreceivers/client.go @@ -1,48 +1,65 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package webhookreceivers import ( context "context" - core "github.com/merge-api/merge-go-client/core" - crm "github.com/merge-api/merge-go-client/crm" + core "github.com/merge-api/merge-go-client/v2/core" + crm "github.com/merge-api/merge-go-client/v2/crm" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `WebhookReceiver` objects. -func (c *Client) List(ctx context.Context) ([]*crm.WebhookReceiver, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/webhook-receivers" +func (c *Client) List( + ctx context.Context, + opts ...option.RequestOption, +) ([]*crm.WebhookReceiver, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/webhook-receivers" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response []*crm.WebhookReceiver if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -51,22 +68,37 @@ func (c *Client) List(ctx context.Context) ([]*crm.WebhookReceiver, error) { } // Creates a `WebhookReceiver` object with the given values. -func (c *Client) Create(ctx context.Context, request *crm.WebhookReceiverRequest) (*crm.WebhookReceiver, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "crm/v1/webhook-receivers" +func (c *Client) Create( + ctx context.Context, + request *crm.WebhookReceiverRequest, + opts ...option.RequestOption, +) (*crm.WebhookReceiver, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/crm/v1/webhook-receivers" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *crm.WebhookReceiver if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err diff --git a/environments.go b/environments.go index 6331bd0..12179ef 100644 --- a/environments.go +++ b/environments.go @@ -1,17 +1,17 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. -package api +package merge // Environments defines all of the API environments. // These values can be used with the WithBaseURL -// ClientOption to override the client's default environment, +// RequestOption to override the client's default environment, // if any. var Environments = struct { Production string - Sandbox string ProductionEu string + Sandbox string }{ Production: "https://api.merge.dev/api", - Sandbox: "https://api-sandbox.merge.dev/api", ProductionEu: "https://api-eu.merge.dev/api", + Sandbox: "https://api-sandbox.merge.dev/api", } diff --git a/file_param.go b/file_param.go new file mode 100644 index 0000000..821b42a --- /dev/null +++ b/file_param.go @@ -0,0 +1,41 @@ +package merge + +import ( + "io" +) + +// FileParam is a file type suitable for multipart/form-data uploads. +type FileParam struct { + io.Reader + filename string + contentType string +} + +// FileParamOption adapts the behavior of the FileParam. No options are +// implemented yet, but this interface allows for future extensibility. +type FileParamOption interface { + apply() +} + +// NewFileParam returns a *FileParam type suitable for multipart/form-data uploads. All file +// upload endpoints accept a simple io.Reader, which is usually created by opening a file +// via os.Open. +// +// However, some endpoints require additional metadata about the file such as a specific +// Content-Type or custom filename. FileParam makes it easier to create the correct type +// signature for these endpoints. +func NewFileParam( + reader io.Reader, + filename string, + contentType string, + opts ...FileParamOption, +) *FileParam { + return &FileParam{ + Reader: reader, + filename: filename, + contentType: contentType, + } +} + +func (f *FileParam) Name() string { return f.filename } +func (f *FileParam) ContentType() string { return f.contentType } diff --git a/filestorage/account_details.go b/filestorage/account_details.go new file mode 100644 index 0000000..901374f --- /dev/null +++ b/filestorage/account_details.go @@ -0,0 +1,226 @@ +// Code generated by Fern. DO NOT EDIT. + +package filestorage + +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" + time "time" +) + +type AccountDetails struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + Integration *string `json:"integration,omitempty" url:"integration,omitempty"` + IntegrationSlug *string `json:"integration_slug,omitempty" url:"integration_slug,omitempty"` + Category *AccountDetailsCategory `json:"category,omitempty" url:"category,omitempty"` + EndUserOriginId *string `json:"end_user_origin_id,omitempty" url:"end_user_origin_id,omitempty"` + EndUserOrganizationName *string `json:"end_user_organization_name,omitempty" url:"end_user_organization_name,omitempty"` + EndUserEmailAddress *string `json:"end_user_email_address,omitempty" url:"end_user_email_address,omitempty"` + Status *string `json:"status,omitempty" url:"status,omitempty"` + WebhookListenerUrl *string `json:"webhook_listener_url,omitempty" url:"webhook_listener_url,omitempty"` + // 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. + IsDuplicate *bool `json:"is_duplicate,omitempty" url:"is_duplicate,omitempty"` + AccountType *string `json:"account_type,omitempty" url:"account_type,omitempty"` + // The time at which account completes the linking flow. + CompletedAt *time.Time `json:"completed_at,omitempty" url:"completed_at,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AccountDetails) GetId() *string { + if a == nil { + return nil + } + return a.Id +} + +func (a *AccountDetails) GetIntegration() *string { + if a == nil { + return nil + } + return a.Integration +} + +func (a *AccountDetails) GetIntegrationSlug() *string { + if a == nil { + return nil + } + return a.IntegrationSlug +} + +func (a *AccountDetails) GetCategory() *AccountDetailsCategory { + if a == nil { + return nil + } + return a.Category +} + +func (a *AccountDetails) GetEndUserOriginId() *string { + if a == nil { + return nil + } + return a.EndUserOriginId +} + +func (a *AccountDetails) GetEndUserOrganizationName() *string { + if a == nil { + return nil + } + return a.EndUserOrganizationName +} + +func (a *AccountDetails) GetEndUserEmailAddress() *string { + if a == nil { + return nil + } + return a.EndUserEmailAddress +} + +func (a *AccountDetails) GetStatus() *string { + if a == nil { + return nil + } + return a.Status +} + +func (a *AccountDetails) GetWebhookListenerUrl() *string { + if a == nil { + return nil + } + return a.WebhookListenerUrl +} + +func (a *AccountDetails) GetIsDuplicate() *bool { + if a == nil { + return nil + } + return a.IsDuplicate +} + +func (a *AccountDetails) GetAccountType() *string { + if a == nil { + return nil + } + return a.AccountType +} + +func (a *AccountDetails) GetCompletedAt() *time.Time { + if a == nil { + return nil + } + return a.CompletedAt +} + +func (a *AccountDetails) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AccountDetails) UnmarshalJSON(data []byte) error { + type embed AccountDetails + var unmarshaler = struct { + embed + CompletedAt *internal.DateTime `json:"completed_at,omitempty"` + }{ + embed: embed(*a), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *a = AccountDetails(unmarshaler.embed) + a.CompletedAt = unmarshaler.CompletedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AccountDetails) MarshalJSON() ([]byte, error) { + type embed AccountDetails + var marshaler = struct { + embed + CompletedAt *internal.DateTime `json:"completed_at,omitempty"` + }{ + embed: embed(*a), + CompletedAt: internal.NewOptionalDateTime(a.CompletedAt), + } + return json.Marshal(marshaler) +} + +func (a *AccountDetails) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} + +type AccountDetailsCategory struct { + CategoryEnum CategoryEnum + String string + + typ string +} + +func (a *AccountDetailsCategory) GetCategoryEnum() CategoryEnum { + if a == nil { + return "" + } + return a.CategoryEnum +} + +func (a *AccountDetailsCategory) GetString() string { + if a == nil { + return "" + } + return a.String +} + +func (a *AccountDetailsCategory) UnmarshalJSON(data []byte) error { + var valueCategoryEnum CategoryEnum + if err := json.Unmarshal(data, &valueCategoryEnum); err == nil { + a.typ = "CategoryEnum" + a.CategoryEnum = valueCategoryEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + a.typ = "String" + a.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, a) +} + +func (a AccountDetailsCategory) MarshalJSON() ([]byte, error) { + if a.typ == "CategoryEnum" || a.CategoryEnum != "" { + return json.Marshal(a.CategoryEnum) + } + if a.typ == "String" || a.String != "" { + return json.Marshal(a.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type AccountDetailsCategoryVisitor interface { + VisitCategoryEnum(CategoryEnum) error + VisitString(string) error +} + +func (a *AccountDetailsCategory) Accept(visitor AccountDetailsCategoryVisitor) error { + if a.typ == "CategoryEnum" || a.CategoryEnum != "" { + return visitor.VisitCategoryEnum(a.CategoryEnum) + } + if a.typ == "String" || a.String != "" { + return visitor.VisitString(a.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} diff --git a/filestorage/account_token.go b/filestorage/account_token.go new file mode 100644 index 0000000..7547f25 --- /dev/null +++ b/filestorage/account_token.go @@ -0,0 +1,71 @@ +// Code generated by Fern. DO NOT EDIT. + +package filestorage + +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" +) + +type AccountToken struct { + AccountToken string `json:"account_token" url:"account_token"` + Integration *AccountIntegration `json:"integration" url:"integration"` + Id string `json:"id" url:"id"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AccountToken) GetAccountToken() string { + if a == nil { + return "" + } + return a.AccountToken +} + +func (a *AccountToken) GetIntegration() *AccountIntegration { + if a == nil { + return nil + } + return a.Integration +} + +func (a *AccountToken) GetId() string { + if a == nil { + return "" + } + return a.Id +} + +func (a *AccountToken) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AccountToken) UnmarshalJSON(data []byte) error { + type unmarshaler AccountToken + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *a = AccountToken(value) + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AccountToken) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} diff --git a/filestorage/accountdetails/client.go b/filestorage/accountdetails/client.go index 1de6d73..0508d3b 100644 --- a/filestorage/accountdetails/client.go +++ b/filestorage/accountdetails/client.go @@ -1,48 +1,65 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package accountdetails import ( context "context" - core "github.com/merge-api/merge-go-client/core" - filestorage "github.com/merge-api/merge-go-client/filestorage" + core "github.com/merge-api/merge-go-client/v2/core" + filestorage "github.com/merge-api/merge-go-client/v2/filestorage" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Get details for a linked account. -func (c *Client) Retrieve(ctx context.Context) (*filestorage.AccountDetails, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "filestorage/v1/account-details" +func (c *Client) Retrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*filestorage.AccountDetails, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/filestorage/v1/account-details" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *filestorage.AccountDetails if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/filestorage/accounttoken/client.go b/filestorage/accounttoken/client.go index f1211e6..28ad091 100644 --- a/filestorage/accounttoken/client.go +++ b/filestorage/accounttoken/client.go @@ -1,49 +1,69 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package accounttoken import ( context "context" - fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - filestorage "github.com/merge-api/merge-go-client/filestorage" + core "github.com/merge-api/merge-go-client/v2/core" + filestorage "github.com/merge-api/merge-go-client/v2/filestorage" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns the account token for the end user with the provided public token. -func (c *Client) Retrieve(ctx context.Context, publicToken string) (*filestorage.AccountToken, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"filestorage/v1/account-token/%v", publicToken) +func (c *Client) Retrieve( + ctx context.Context, + publicToken string, + opts ...option.RequestOption, +) (*filestorage.AccountToken, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/filestorage/v1/account-token/%v", + publicToken, + ) + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *filestorage.AccountToken if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/filestorage/async_passthrough.go b/filestorage/async_passthrough.go index 1a49961..f3a8045 100644 --- a/filestorage/async_passthrough.go +++ b/filestorage/async_passthrough.go @@ -1,36 +1,44 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package filestorage import ( json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" ) type AsyncPassthroughRetrieveResponse struct { - typeName string RemoteResponse *RemoteResponse String string + + typ string } -func NewAsyncPassthroughRetrieveResponseFromRemoteResponse(value *RemoteResponse) *AsyncPassthroughRetrieveResponse { - return &AsyncPassthroughRetrieveResponse{typeName: "remoteResponse", RemoteResponse: value} +func (a *AsyncPassthroughRetrieveResponse) GetRemoteResponse() *RemoteResponse { + if a == nil { + return nil + } + return a.RemoteResponse } -func NewAsyncPassthroughRetrieveResponseFromString(value string) *AsyncPassthroughRetrieveResponse { - return &AsyncPassthroughRetrieveResponse{typeName: "string", String: value} +func (a *AsyncPassthroughRetrieveResponse) GetString() string { + if a == nil { + return "" + } + return a.String } func (a *AsyncPassthroughRetrieveResponse) UnmarshalJSON(data []byte) error { valueRemoteResponse := new(RemoteResponse) if err := json.Unmarshal(data, &valueRemoteResponse); err == nil { - a.typeName = "remoteResponse" + a.typ = "RemoteResponse" a.RemoteResponse = valueRemoteResponse return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" + a.typ = "String" a.String = valueString return nil } @@ -38,14 +46,13 @@ func (a *AsyncPassthroughRetrieveResponse) UnmarshalJSON(data []byte) error { } func (a AsyncPassthroughRetrieveResponse) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "remoteResponse": + if a.typ == "RemoteResponse" || a.RemoteResponse != nil { return json.Marshal(a.RemoteResponse) - case "string": + } + if a.typ == "String" || a.String != "" { return json.Marshal(a.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) } type AsyncPassthroughRetrieveResponseVisitor interface { @@ -54,12 +61,57 @@ type AsyncPassthroughRetrieveResponseVisitor interface { } func (a *AsyncPassthroughRetrieveResponse) Accept(visitor AsyncPassthroughRetrieveResponseVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "remoteResponse": + if a.typ == "RemoteResponse" || a.RemoteResponse != nil { return visitor.VisitRemoteResponse(a.RemoteResponse) - case "string": + } + if a.typ == "String" || a.String != "" { return visitor.VisitString(a.String) } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type AsyncPassthroughReciept struct { + AsyncPassthroughReceiptId string `json:"async_passthrough_receipt_id" url:"async_passthrough_receipt_id"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AsyncPassthroughReciept) GetAsyncPassthroughReceiptId() string { + if a == nil { + return "" + } + return a.AsyncPassthroughReceiptId +} + +func (a *AsyncPassthroughReciept) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AsyncPassthroughReciept) UnmarshalJSON(data []byte) error { + type unmarshaler AsyncPassthroughReciept + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *a = AsyncPassthroughReciept(value) + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AsyncPassthroughReciept) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) } diff --git a/filestorage/asyncpassthrough/client.go b/filestorage/asyncpassthrough/client.go index 2363c97..e55e1a4 100644 --- a/filestorage/asyncpassthrough/client.go +++ b/filestorage/asyncpassthrough/client.go @@ -1,50 +1,68 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package asyncpassthrough import ( context "context" - fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - filestorage "github.com/merge-api/merge-go-client/filestorage" + core "github.com/merge-api/merge-go-client/v2/core" + filestorage "github.com/merge-api/merge-go-client/v2/filestorage" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Asynchronously pull data from an endpoint not currently supported by Merge. -func (c *Client) Create(ctx context.Context, request *filestorage.DataPassthroughRequest) (*filestorage.AsyncPassthroughReciept, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "filestorage/v1/async-passthrough" +func (c *Client) Create( + ctx context.Context, + request *filestorage.DataPassthroughRequest, + opts ...option.RequestOption, +) (*filestorage.AsyncPassthroughReciept, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/filestorage/v1/async-passthrough" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *filestorage.AsyncPassthroughReciept if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -53,21 +71,38 @@ func (c *Client) Create(ctx context.Context, request *filestorage.DataPassthroug } // Retrieves data from earlier async-passthrough POST request -func (c *Client) Retrieve(ctx context.Context, asyncPassthroughReceiptId string) (*filestorage.AsyncPassthroughRetrieveResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"filestorage/v1/async-passthrough/%v", asyncPassthroughReceiptId) +func (c *Client) Retrieve( + ctx context.Context, + asyncPassthroughReceiptId string, + opts ...option.RequestOption, +) (*filestorage.AsyncPassthroughRetrieveResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/filestorage/v1/async-passthrough/%v", + asyncPassthroughReceiptId, + ) + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *filestorage.AsyncPassthroughRetrieveResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/filestorage/audit_trail.go b/filestorage/audit_trail.go index d5de4cb..1ca6148 100644 --- a/filestorage/audit_trail.go +++ b/filestorage/audit_trail.go @@ -1,18 +1,667 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package filestorage +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" + time "time" +) + type AuditTrailListRequest struct { // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // If included, will only include audit trail events that occurred before this time - EndDate *string `json:"-"` - // 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`, `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED` - EventType *string `json:"-"` + EndDate *string `json:"-" url:"end_date,omitempty"` + // 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`, `REGENERATED_WEBHOOK_SIGNATURE`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `DELETED_ALL_COMMON_MODELS_FOR_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`, `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED` + EventType *string `json:"-" url:"event_type,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // If included, will only include audit trail events that occurred after this time - StartDate *string `json:"-"` + StartDate *string `json:"-" url:"start_date,omitempty"` // If provided, this will return events associated with the specified user email. Please note that the email address reflects the user's email at the time of the event, and may not be their current email. - UserEmail *string `json:"-"` + UserEmail *string `json:"-" url:"user_email,omitempty"` +} + +type AuditLogEvent struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The User's full name at the time of this Event occurring. + UserName *string `json:"user_name,omitempty" url:"user_name,omitempty"` + // The User's email at the time of this Event occurring. + UserEmail *string `json:"user_email,omitempty" url:"user_email,omitempty"` + // Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. + // + // * `ADMIN` - ADMIN + // * `DEVELOPER` - DEVELOPER + // * `MEMBER` - MEMBER + // * `API` - API + // * `SYSTEM` - SYSTEM + // * `MERGE_TEAM` - MERGE_TEAM + Role *AuditLogEventRole `json:"role" url:"role"` + IpAddress string `json:"ip_address" url:"ip_address"` + // Designates the type of event that occurred. + // + // * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + // * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + // * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + // * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + // * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + // * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + // * `INVITED_USER` - INVITED_USER + // * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + // * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + // * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + // * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + // * `CREATED_DESTINATION` - CREATED_DESTINATION + // * `DELETED_DESTINATION` - DELETED_DESTINATION + // * `CHANGED_DESTINATION` - CHANGED_DESTINATION + // * `CHANGED_SCOPES` - CHANGED_SCOPES + // * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + // * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + // * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + // * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + // * `ENABLED_CATEGORY` - ENABLED_CATEGORY + // * `DISABLED_CATEGORY` - DISABLED_CATEGORY + // * `CHANGED_PASSWORD` - CHANGED_PASSWORD + // * `RESET_PASSWORD` - RESET_PASSWORD + // * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + // * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + // * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + // * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + // * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING + // * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING + // * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + // * `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 + // * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + // * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + // * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + // * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + // * `MUTED_ISSUE` - MUTED_ISSUE + // * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + // * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + // * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + // * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + // * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + EventType *AuditLogEventEventType `json:"event_type" url:"event_type"` + EventDescription string `json:"event_description" url:"event_description"` + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AuditLogEvent) GetId() *string { + if a == nil { + return nil + } + return a.Id +} + +func (a *AuditLogEvent) GetUserName() *string { + if a == nil { + return nil + } + return a.UserName +} + +func (a *AuditLogEvent) GetUserEmail() *string { + if a == nil { + return nil + } + return a.UserEmail +} + +func (a *AuditLogEvent) GetRole() *AuditLogEventRole { + if a == nil { + return nil + } + return a.Role +} + +func (a *AuditLogEvent) GetIpAddress() string { + if a == nil { + return "" + } + return a.IpAddress +} + +func (a *AuditLogEvent) GetEventType() *AuditLogEventEventType { + if a == nil { + return nil + } + return a.EventType +} + +func (a *AuditLogEvent) GetEventDescription() string { + if a == nil { + return "" + } + return a.EventDescription +} + +func (a *AuditLogEvent) GetCreatedAt() *time.Time { + if a == nil { + return nil + } + return a.CreatedAt +} + +func (a *AuditLogEvent) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AuditLogEvent) UnmarshalJSON(data []byte) error { + type embed AuditLogEvent + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + }{ + embed: embed(*a), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *a = AuditLogEvent(unmarshaler.embed) + a.CreatedAt = unmarshaler.CreatedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AuditLogEvent) MarshalJSON() ([]byte, error) { + type embed AuditLogEvent + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + }{ + embed: embed(*a), + CreatedAt: internal.NewOptionalDateTime(a.CreatedAt), + } + return json.Marshal(marshaler) +} + +func (a *AuditLogEvent) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} + +// Designates the type of event that occurred. +// +// * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY +// * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY +// * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY +// * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY +// * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY +// * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE +// * `INVITED_USER` - INVITED_USER +// * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED +// * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED +// * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT +// * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT +// * `CREATED_DESTINATION` - CREATED_DESTINATION +// * `DELETED_DESTINATION` - DELETED_DESTINATION +// * `CHANGED_DESTINATION` - CHANGED_DESTINATION +// * `CHANGED_SCOPES` - CHANGED_SCOPES +// * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION +// * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS +// * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION +// * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION +// * `ENABLED_CATEGORY` - ENABLED_CATEGORY +// * `DISABLED_CATEGORY` - DISABLED_CATEGORY +// * `CHANGED_PASSWORD` - CHANGED_PASSWORD +// * `RESET_PASSWORD` - RESET_PASSWORD +// * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION +// * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT +// * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION +// * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT +// * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING +// * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING +// * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING +// * `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 +// * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE +// * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE +// * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE +// * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC +// * `MUTED_ISSUE` - MUTED_ISSUE +// * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK +// * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK +// * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK +// * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED +// * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED +type AuditLogEventEventType struct { + EventTypeEnum EventTypeEnum + String string + + typ string +} + +func (a *AuditLogEventEventType) GetEventTypeEnum() EventTypeEnum { + if a == nil { + return "" + } + return a.EventTypeEnum +} + +func (a *AuditLogEventEventType) GetString() string { + if a == nil { + return "" + } + return a.String +} + +func (a *AuditLogEventEventType) UnmarshalJSON(data []byte) error { + var valueEventTypeEnum EventTypeEnum + if err := json.Unmarshal(data, &valueEventTypeEnum); err == nil { + a.typ = "EventTypeEnum" + a.EventTypeEnum = valueEventTypeEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + a.typ = "String" + a.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, a) +} + +func (a AuditLogEventEventType) MarshalJSON() ([]byte, error) { + if a.typ == "EventTypeEnum" || a.EventTypeEnum != "" { + return json.Marshal(a.EventTypeEnum) + } + if a.typ == "String" || a.String != "" { + return json.Marshal(a.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type AuditLogEventEventTypeVisitor interface { + VisitEventTypeEnum(EventTypeEnum) error + VisitString(string) error +} + +func (a *AuditLogEventEventType) Accept(visitor AuditLogEventEventTypeVisitor) error { + if a.typ == "EventTypeEnum" || a.EventTypeEnum != "" { + return visitor.VisitEventTypeEnum(a.EventTypeEnum) + } + if a.typ == "String" || a.String != "" { + return visitor.VisitString(a.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} + +// Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. +// +// * `ADMIN` - ADMIN +// * `DEVELOPER` - DEVELOPER +// * `MEMBER` - MEMBER +// * `API` - API +// * `SYSTEM` - SYSTEM +// * `MERGE_TEAM` - MERGE_TEAM +type AuditLogEventRole struct { + RoleEnum RoleEnum + String string + + typ string +} + +func (a *AuditLogEventRole) GetRoleEnum() RoleEnum { + if a == nil { + return "" + } + return a.RoleEnum +} + +func (a *AuditLogEventRole) GetString() string { + if a == nil { + return "" + } + return a.String +} + +func (a *AuditLogEventRole) UnmarshalJSON(data []byte) error { + var valueRoleEnum RoleEnum + if err := json.Unmarshal(data, &valueRoleEnum); err == nil { + a.typ = "RoleEnum" + a.RoleEnum = valueRoleEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + a.typ = "String" + a.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, a) +} + +func (a AuditLogEventRole) MarshalJSON() ([]byte, error) { + if a.typ == "RoleEnum" || a.RoleEnum != "" { + return json.Marshal(a.RoleEnum) + } + if a.typ == "String" || a.String != "" { + return json.Marshal(a.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type AuditLogEventRoleVisitor interface { + VisitRoleEnum(RoleEnum) error + VisitString(string) error +} + +func (a *AuditLogEventRole) Accept(visitor AuditLogEventRoleVisitor) error { + if a.typ == "RoleEnum" || a.RoleEnum != "" { + return visitor.VisitRoleEnum(a.RoleEnum) + } + if a.typ == "String" || a.String != "" { + return visitor.VisitString(a.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} + +// * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY +// * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY +// * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY +// * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY +// * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY +// * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE +// * `INVITED_USER` - INVITED_USER +// * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED +// * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED +// * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT +// * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT +// * `CREATED_DESTINATION` - CREATED_DESTINATION +// * `DELETED_DESTINATION` - DELETED_DESTINATION +// * `CHANGED_DESTINATION` - CHANGED_DESTINATION +// * `CHANGED_SCOPES` - CHANGED_SCOPES +// * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION +// * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS +// * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION +// * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION +// * `ENABLED_CATEGORY` - ENABLED_CATEGORY +// * `DISABLED_CATEGORY` - DISABLED_CATEGORY +// * `CHANGED_PASSWORD` - CHANGED_PASSWORD +// * `RESET_PASSWORD` - RESET_PASSWORD +// * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION +// * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT +// * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION +// * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT +// * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING +// * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING +// * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING +// * `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 +// * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE +// * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE +// * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE +// * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC +// * `MUTED_ISSUE` - MUTED_ISSUE +// * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK +// * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK +// * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK +// * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED +// * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED +type EventTypeEnum string + +const ( + EventTypeEnumCreatedRemoteProductionApiKey EventTypeEnum = "CREATED_REMOTE_PRODUCTION_API_KEY" + EventTypeEnumDeletedRemoteProductionApiKey EventTypeEnum = "DELETED_REMOTE_PRODUCTION_API_KEY" + EventTypeEnumCreatedTestApiKey EventTypeEnum = "CREATED_TEST_API_KEY" + EventTypeEnumDeletedTestApiKey EventTypeEnum = "DELETED_TEST_API_KEY" + EventTypeEnumRegeneratedProductionApiKey EventTypeEnum = "REGENERATED_PRODUCTION_API_KEY" + EventTypeEnumRegeneratedWebhookSignature EventTypeEnum = "REGENERATED_WEBHOOK_SIGNATURE" + EventTypeEnumInvitedUser EventTypeEnum = "INVITED_USER" + EventTypeEnumTwoFactorAuthEnabled EventTypeEnum = "TWO_FACTOR_AUTH_ENABLED" + EventTypeEnumTwoFactorAuthDisabled EventTypeEnum = "TWO_FACTOR_AUTH_DISABLED" + EventTypeEnumDeletedLinkedAccount EventTypeEnum = "DELETED_LINKED_ACCOUNT" + EventTypeEnumDeletedAllCommonModelsForLinkedAccount EventTypeEnum = "DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT" + EventTypeEnumCreatedDestination EventTypeEnum = "CREATED_DESTINATION" + EventTypeEnumDeletedDestination EventTypeEnum = "DELETED_DESTINATION" + EventTypeEnumChangedDestination EventTypeEnum = "CHANGED_DESTINATION" + EventTypeEnumChangedScopes EventTypeEnum = "CHANGED_SCOPES" + EventTypeEnumChangedPersonalInformation EventTypeEnum = "CHANGED_PERSONAL_INFORMATION" + EventTypeEnumChangedOrganizationSettings EventTypeEnum = "CHANGED_ORGANIZATION_SETTINGS" + EventTypeEnumEnabledIntegration EventTypeEnum = "ENABLED_INTEGRATION" + EventTypeEnumDisabledIntegration EventTypeEnum = "DISABLED_INTEGRATION" + EventTypeEnumEnabledCategory EventTypeEnum = "ENABLED_CATEGORY" + EventTypeEnumDisabledCategory EventTypeEnum = "DISABLED_CATEGORY" + EventTypeEnumChangedPassword EventTypeEnum = "CHANGED_PASSWORD" + EventTypeEnumResetPassword EventTypeEnum = "RESET_PASSWORD" + EventTypeEnumEnabledRedactUnmappedDataForOrganization EventTypeEnum = "ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION" + EventTypeEnumEnabledRedactUnmappedDataForLinkedAccount EventTypeEnum = "ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT" + EventTypeEnumDisabledRedactUnmappedDataForOrganization EventTypeEnum = "DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION" + EventTypeEnumDisabledRedactUnmappedDataForLinkedAccount EventTypeEnum = "DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT" + EventTypeEnumCreatedIntegrationWideFieldMapping EventTypeEnum = "CREATED_INTEGRATION_WIDE_FIELD_MAPPING" + EventTypeEnumCreatedLinkedAccountFieldMapping EventTypeEnum = "CREATED_LINKED_ACCOUNT_FIELD_MAPPING" + EventTypeEnumChangedIntegrationWideFieldMapping EventTypeEnum = "CHANGED_INTEGRATION_WIDE_FIELD_MAPPING" + EventTypeEnumChangedLinkedAccountFieldMapping EventTypeEnum = "CHANGED_LINKED_ACCOUNT_FIELD_MAPPING" + EventTypeEnumDeletedIntegrationWideFieldMapping EventTypeEnum = "DELETED_INTEGRATION_WIDE_FIELD_MAPPING" + EventTypeEnumDeletedLinkedAccountFieldMapping EventTypeEnum = "DELETED_LINKED_ACCOUNT_FIELD_MAPPING" + EventTypeEnumCreatedLinkedAccountCommonModelOverride EventTypeEnum = "CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE" + EventTypeEnumChangedLinkedAccountCommonModelOverride EventTypeEnum = "CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE" + EventTypeEnumDeletedLinkedAccountCommonModelOverride EventTypeEnum = "DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE" + EventTypeEnumForcedLinkedAccountResync EventTypeEnum = "FORCED_LINKED_ACCOUNT_RESYNC" + EventTypeEnumMutedIssue EventTypeEnum = "MUTED_ISSUE" + EventTypeEnumGeneratedMagicLink EventTypeEnum = "GENERATED_MAGIC_LINK" + EventTypeEnumEnabledMergeWebhook EventTypeEnum = "ENABLED_MERGE_WEBHOOK" + EventTypeEnumDisabledMergeWebhook EventTypeEnum = "DISABLED_MERGE_WEBHOOK" + EventTypeEnumMergeWebhookTargetChanged EventTypeEnum = "MERGE_WEBHOOK_TARGET_CHANGED" + EventTypeEnumEndUserCredentialsAccessed EventTypeEnum = "END_USER_CREDENTIALS_ACCESSED" +) + +func NewEventTypeEnumFromString(s string) (EventTypeEnum, error) { + switch s { + case "CREATED_REMOTE_PRODUCTION_API_KEY": + return EventTypeEnumCreatedRemoteProductionApiKey, nil + case "DELETED_REMOTE_PRODUCTION_API_KEY": + return EventTypeEnumDeletedRemoteProductionApiKey, nil + case "CREATED_TEST_API_KEY": + return EventTypeEnumCreatedTestApiKey, nil + case "DELETED_TEST_API_KEY": + return EventTypeEnumDeletedTestApiKey, nil + case "REGENERATED_PRODUCTION_API_KEY": + return EventTypeEnumRegeneratedProductionApiKey, nil + case "REGENERATED_WEBHOOK_SIGNATURE": + return EventTypeEnumRegeneratedWebhookSignature, nil + case "INVITED_USER": + return EventTypeEnumInvitedUser, nil + case "TWO_FACTOR_AUTH_ENABLED": + return EventTypeEnumTwoFactorAuthEnabled, nil + case "TWO_FACTOR_AUTH_DISABLED": + return EventTypeEnumTwoFactorAuthDisabled, nil + case "DELETED_LINKED_ACCOUNT": + return EventTypeEnumDeletedLinkedAccount, nil + case "DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT": + return EventTypeEnumDeletedAllCommonModelsForLinkedAccount, nil + case "CREATED_DESTINATION": + return EventTypeEnumCreatedDestination, nil + case "DELETED_DESTINATION": + return EventTypeEnumDeletedDestination, nil + case "CHANGED_DESTINATION": + return EventTypeEnumChangedDestination, nil + case "CHANGED_SCOPES": + return EventTypeEnumChangedScopes, nil + case "CHANGED_PERSONAL_INFORMATION": + return EventTypeEnumChangedPersonalInformation, nil + case "CHANGED_ORGANIZATION_SETTINGS": + return EventTypeEnumChangedOrganizationSettings, nil + case "ENABLED_INTEGRATION": + return EventTypeEnumEnabledIntegration, nil + case "DISABLED_INTEGRATION": + return EventTypeEnumDisabledIntegration, nil + case "ENABLED_CATEGORY": + return EventTypeEnumEnabledCategory, nil + case "DISABLED_CATEGORY": + return EventTypeEnumDisabledCategory, nil + case "CHANGED_PASSWORD": + return EventTypeEnumChangedPassword, nil + case "RESET_PASSWORD": + return EventTypeEnumResetPassword, nil + case "ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION": + return EventTypeEnumEnabledRedactUnmappedDataForOrganization, nil + case "ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT": + return EventTypeEnumEnabledRedactUnmappedDataForLinkedAccount, nil + case "DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION": + return EventTypeEnumDisabledRedactUnmappedDataForOrganization, nil + case "DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT": + return EventTypeEnumDisabledRedactUnmappedDataForLinkedAccount, nil + case "CREATED_INTEGRATION_WIDE_FIELD_MAPPING": + return EventTypeEnumCreatedIntegrationWideFieldMapping, nil + case "CREATED_LINKED_ACCOUNT_FIELD_MAPPING": + return EventTypeEnumCreatedLinkedAccountFieldMapping, nil + case "CHANGED_INTEGRATION_WIDE_FIELD_MAPPING": + return EventTypeEnumChangedIntegrationWideFieldMapping, nil + case "CHANGED_LINKED_ACCOUNT_FIELD_MAPPING": + return EventTypeEnumChangedLinkedAccountFieldMapping, nil + case "DELETED_INTEGRATION_WIDE_FIELD_MAPPING": + return EventTypeEnumDeletedIntegrationWideFieldMapping, nil + case "DELETED_LINKED_ACCOUNT_FIELD_MAPPING": + return EventTypeEnumDeletedLinkedAccountFieldMapping, nil + case "CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE": + return EventTypeEnumCreatedLinkedAccountCommonModelOverride, nil + case "CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE": + return EventTypeEnumChangedLinkedAccountCommonModelOverride, nil + case "DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE": + return EventTypeEnumDeletedLinkedAccountCommonModelOverride, nil + case "FORCED_LINKED_ACCOUNT_RESYNC": + return EventTypeEnumForcedLinkedAccountResync, nil + case "MUTED_ISSUE": + return EventTypeEnumMutedIssue, nil + case "GENERATED_MAGIC_LINK": + return EventTypeEnumGeneratedMagicLink, nil + case "ENABLED_MERGE_WEBHOOK": + return EventTypeEnumEnabledMergeWebhook, nil + case "DISABLED_MERGE_WEBHOOK": + return EventTypeEnumDisabledMergeWebhook, nil + case "MERGE_WEBHOOK_TARGET_CHANGED": + return EventTypeEnumMergeWebhookTargetChanged, nil + case "END_USER_CREDENTIALS_ACCESSED": + return EventTypeEnumEndUserCredentialsAccessed, nil + } + var t EventTypeEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (e EventTypeEnum) Ptr() *EventTypeEnum { + return &e +} + +type PaginatedAuditLogEventList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*AuditLogEvent `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedAuditLogEventList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedAuditLogEventList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedAuditLogEventList) GetResults() []*AuditLogEvent { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedAuditLogEventList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedAuditLogEventList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedAuditLogEventList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedAuditLogEventList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedAuditLogEventList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +// * `ADMIN` - ADMIN +// * `DEVELOPER` - DEVELOPER +// * `MEMBER` - MEMBER +// * `API` - API +// * `SYSTEM` - SYSTEM +// * `MERGE_TEAM` - MERGE_TEAM +type RoleEnum string + +const ( + RoleEnumAdmin RoleEnum = "ADMIN" + RoleEnumDeveloper RoleEnum = "DEVELOPER" + RoleEnumMember RoleEnum = "MEMBER" + RoleEnumApi RoleEnum = "API" + RoleEnumSystem RoleEnum = "SYSTEM" + RoleEnumMergeTeam RoleEnum = "MERGE_TEAM" +) + +func NewRoleEnumFromString(s string) (RoleEnum, error) { + switch s { + case "ADMIN": + return RoleEnumAdmin, nil + case "DEVELOPER": + return RoleEnumDeveloper, nil + case "MEMBER": + return RoleEnumMember, nil + case "API": + return RoleEnumApi, nil + case "SYSTEM": + return RoleEnumSystem, nil + case "MERGE_TEAM": + return RoleEnumMergeTeam, nil + } + var t RoleEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (r RoleEnum) Ptr() *RoleEnum { + return &r } diff --git a/filestorage/audittrail/client.go b/filestorage/audittrail/client.go index 2d2e7b1..d7c742a 100644 --- a/filestorage/audittrail/client.go +++ b/filestorage/audittrail/client.go @@ -1,76 +1,92 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package audittrail import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - filestorage "github.com/merge-api/merge-go-client/filestorage" + core "github.com/merge-api/merge-go-client/v2/core" + filestorage "github.com/merge-api/merge-go-client/v2/filestorage" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Gets a list of audit trail events. -func (c *Client) List(ctx context.Context, request *filestorage.AuditTrailListRequest) (*filestorage.PaginatedAuditLogEventList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL +func (c *Client) List( + ctx context.Context, + request *filestorage.AuditTrailListRequest, + opts ...option.RequestOption, +) (*core.Page[*filestorage.AuditLogEvent], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/filestorage/v1/audit-trail" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } - endpointURL := baseURL + "/" + "filestorage/v1/audit-trail" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) - queryParams := make(url.Values) - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.EndDate != nil { - queryParams.Add("end_date", fmt.Sprintf("%v", *request.EndDate)) - } - if request.EventType != nil { - queryParams.Add("event_type", fmt.Sprintf("%v", *request.EventType)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } } - if request.StartDate != nil { - queryParams.Add("start_date", fmt.Sprintf("%v", *request.StartDate)) - } - if request.UserEmail != nil { - queryParams.Add("user_email", fmt.Sprintf("%v", *request.UserEmail)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *filestorage.PaginatedAuditLogEventList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { - return nil, err + readPageResponse := func(response *filestorage.PaginatedAuditLogEventList) *internal.PageResponse[*string, *filestorage.AuditLogEvent] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *filestorage.AuditLogEvent]{ + Next: next, + Results: results, + Done: next == zeroValue, + } } - return response, nil + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } diff --git a/filestorage/available_actions.go b/filestorage/available_actions.go new file mode 100644 index 0000000..c511dbe --- /dev/null +++ b/filestorage/available_actions.go @@ -0,0 +1,77 @@ +// Code generated by Fern. DO NOT EDIT. + +package filestorage + +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" +) + +// # The AvailableActions Object +// ### Description +// The `Activity` object is used to see all available model/operation combinations for an integration. +// +// ### Usage Example +// Fetch all the actions available for the `Zenefits` integration. +type AvailableActions struct { + Integration *AccountIntegration `json:"integration" url:"integration"` + PassthroughAvailable bool `json:"passthrough_available" url:"passthrough_available"` + AvailableModelOperations []*ModelOperation `json:"available_model_operations,omitempty" url:"available_model_operations,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AvailableActions) GetIntegration() *AccountIntegration { + if a == nil { + return nil + } + return a.Integration +} + +func (a *AvailableActions) GetPassthroughAvailable() bool { + if a == nil { + return false + } + return a.PassthroughAvailable +} + +func (a *AvailableActions) GetAvailableModelOperations() []*ModelOperation { + if a == nil { + return nil + } + return a.AvailableModelOperations +} + +func (a *AvailableActions) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AvailableActions) UnmarshalJSON(data []byte) error { + type unmarshaler AvailableActions + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *a = AvailableActions(value) + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AvailableActions) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} diff --git a/filestorage/availableactions/client.go b/filestorage/availableactions/client.go index 00097b1..a200712 100644 --- a/filestorage/availableactions/client.go +++ b/filestorage/availableactions/client.go @@ -1,48 +1,65 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package availableactions import ( context "context" - core "github.com/merge-api/merge-go-client/core" - filestorage "github.com/merge-api/merge-go-client/filestorage" + core "github.com/merge-api/merge-go-client/v2/core" + filestorage "github.com/merge-api/merge-go-client/v2/filestorage" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of models and actions available for an account. -func (c *Client) Retrieve(ctx context.Context) (*filestorage.AvailableActions, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "filestorage/v1/available-actions" +func (c *Client) Retrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*filestorage.AvailableActions, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/filestorage/v1/available-actions" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *filestorage.AvailableActions if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/filestorage/client/client.go b/filestorage/client/client.go index 9f160e4..943b543 100644 --- a/filestorage/client/client.go +++ b/filestorage/client/client.go @@ -1,37 +1,39 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package client import ( - core "github.com/merge-api/merge-go-client/core" - accountdetails "github.com/merge-api/merge-go-client/filestorage/accountdetails" - accounttoken "github.com/merge-api/merge-go-client/filestorage/accounttoken" - asyncpassthrough "github.com/merge-api/merge-go-client/filestorage/asyncpassthrough" - audittrail "github.com/merge-api/merge-go-client/filestorage/audittrail" - availableactions "github.com/merge-api/merge-go-client/filestorage/availableactions" - deleteaccount "github.com/merge-api/merge-go-client/filestorage/deleteaccount" - drives "github.com/merge-api/merge-go-client/filestorage/drives" - fieldmapping "github.com/merge-api/merge-go-client/filestorage/fieldmapping" - files "github.com/merge-api/merge-go-client/filestorage/files" - folders "github.com/merge-api/merge-go-client/filestorage/folders" - forceresync "github.com/merge-api/merge-go-client/filestorage/forceresync" - generatekey "github.com/merge-api/merge-go-client/filestorage/generatekey" - groups "github.com/merge-api/merge-go-client/filestorage/groups" - issues "github.com/merge-api/merge-go-client/filestorage/issues" - linkedaccounts "github.com/merge-api/merge-go-client/filestorage/linkedaccounts" - linktoken "github.com/merge-api/merge-go-client/filestorage/linktoken" - passthrough "github.com/merge-api/merge-go-client/filestorage/passthrough" - regeneratekey "github.com/merge-api/merge-go-client/filestorage/regeneratekey" - scopes "github.com/merge-api/merge-go-client/filestorage/scopes" - syncstatus "github.com/merge-api/merge-go-client/filestorage/syncstatus" - users "github.com/merge-api/merge-go-client/filestorage/users" - webhookreceivers "github.com/merge-api/merge-go-client/filestorage/webhookreceivers" + core "github.com/merge-api/merge-go-client/v2/core" + accountdetails "github.com/merge-api/merge-go-client/v2/filestorage/accountdetails" + accounttoken "github.com/merge-api/merge-go-client/v2/filestorage/accounttoken" + asyncpassthrough "github.com/merge-api/merge-go-client/v2/filestorage/asyncpassthrough" + audittrail "github.com/merge-api/merge-go-client/v2/filestorage/audittrail" + availableactions "github.com/merge-api/merge-go-client/v2/filestorage/availableactions" + deleteaccount "github.com/merge-api/merge-go-client/v2/filestorage/deleteaccount" + drives "github.com/merge-api/merge-go-client/v2/filestorage/drives" + fieldmapping "github.com/merge-api/merge-go-client/v2/filestorage/fieldmapping" + files "github.com/merge-api/merge-go-client/v2/filestorage/files" + folders "github.com/merge-api/merge-go-client/v2/filestorage/folders" + forceresync "github.com/merge-api/merge-go-client/v2/filestorage/forceresync" + generatekey "github.com/merge-api/merge-go-client/v2/filestorage/generatekey" + groups "github.com/merge-api/merge-go-client/v2/filestorage/groups" + issues "github.com/merge-api/merge-go-client/v2/filestorage/issues" + linkedaccounts "github.com/merge-api/merge-go-client/v2/filestorage/linkedaccounts" + linktoken "github.com/merge-api/merge-go-client/v2/filestorage/linktoken" + passthrough "github.com/merge-api/merge-go-client/v2/filestorage/passthrough" + regeneratekey "github.com/merge-api/merge-go-client/v2/filestorage/regeneratekey" + scopes "github.com/merge-api/merge-go-client/v2/filestorage/scopes" + syncstatus "github.com/merge-api/merge-go-client/v2/filestorage/syncstatus" + users "github.com/merge-api/merge-go-client/v2/filestorage/users" + webhookreceivers "github.com/merge-api/merge-go-client/v2/filestorage/webhookreceivers" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header AccountDetails *accountdetails.Client @@ -58,14 +60,16 @@ type Client struct { WebhookReceivers *webhookreceivers.Client } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ - baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), + baseURL: options.BaseURL, + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), header: options.ToHeader(), AccountDetails: accountdetails.NewClient(opts...), AccountToken: accounttoken.NewClient(opts...), diff --git a/filestorage/deleteaccount/client.go b/filestorage/deleteaccount/client.go index 7e00d3f..65beeeb 100644 --- a/filestorage/deleteaccount/client.go +++ b/filestorage/deleteaccount/client.go @@ -1,45 +1,62 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package deleteaccount import ( context "context" - core "github.com/merge-api/merge-go-client/core" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Delete a linked account. -func (c *Client) Delete(ctx context.Context) error { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "filestorage/v1/delete-account" +func (c *Client) Delete( + ctx context.Context, + opts ...option.RequestOption, +) error { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/filestorage/v1/delete-account" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, }, ); err != nil { return err diff --git a/filestorage/drives.go b/filestorage/drives.go index 1fc4d14..b51911f 100644 --- a/filestorage/drives.go +++ b/filestorage/drives.go @@ -1,37 +1,104 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package filestorage import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type DrivesListRequest struct { // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // If provided, will only return drives with this name. This performs an exact match. - Name *string `json:"-"` + Name *string `json:"-" url:"name,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` } type DrivesRetrieveRequest struct { // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` +} + +type PaginatedDriveList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Drive `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedDriveList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedDriveList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedDriveList) GetResults() []*Drive { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedDriveList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedDriveList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedDriveList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedDriveList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedDriveList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) } diff --git a/filestorage/drives/client.go b/filestorage/drives/client.go index cfb4433..858a927 100644 --- a/filestorage/drives/client.go +++ b/filestorage/drives/client.go @@ -1,120 +1,137 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package drives import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - filestorage "github.com/merge-api/merge-go-client/filestorage" + core "github.com/merge-api/merge-go-client/v2/core" + filestorage "github.com/merge-api/merge-go-client/v2/filestorage" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `Drive` objects. -func (c *Client) List(ctx context.Context, request *filestorage.DrivesListRequest) (*filestorage.PaginatedDriveList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "filestorage/v1/drives" - - queryParams := make(url.Values) - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.Name != nil { - queryParams.Add("name", fmt.Sprintf("%v", *request.Name)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *filestorage.PaginatedDriveList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *filestorage.DrivesListRequest, + opts ...option.RequestOption, +) (*core.Page[*filestorage.Drive], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/filestorage/v1/drives" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *filestorage.PaginatedDriveList) *internal.PageResponse[*string, *filestorage.Drive] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *filestorage.Drive]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Returns a `Drive` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *filestorage.DrivesRetrieveRequest) (*filestorage.Drive, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"filestorage/v1/drives/%v", id) - - queryParams := make(url.Values) - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *filestorage.DrivesRetrieveRequest, + opts ...option.RequestOption, +) (*filestorage.Drive, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/filestorage/v1/drives/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *filestorage.Drive if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/filestorage/field_mapping.go b/filestorage/field_mapping.go index bfa9d95..bed8896 100644 --- a/filestorage/field_mapping.go +++ b/filestorage/field_mapping.go @@ -1,41 +1,965 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package filestorage +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" +) + type CreateFieldMappingRequest struct { // If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. - ExcludeRemoteFieldMetadata *bool `json:"-"` + ExcludeRemoteFieldMetadata *bool `json:"-" url:"exclude_remote_field_metadata,omitempty"` // The name of the target field you want this remote field to map to. - TargetFieldName string `json:"target_field_name"` + TargetFieldName string `json:"target_field_name" url:"-"` // The description of the target field you want this remote field to map to. - TargetFieldDescription string `json:"target_field_description"` + TargetFieldDescription string `json:"target_field_description" url:"-"` // The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint. - RemoteFieldTraversalPath []interface{} `json:"remote_field_traversal_path,omitempty"` + RemoteFieldTraversalPath []interface{} `json:"remote_field_traversal_path,omitempty" url:"-"` // The method of the remote endpoint where the remote field is coming from. - RemoteMethod string `json:"remote_method"` + RemoteMethod string `json:"remote_method" url:"-"` // The path of the remote endpoint where the remote field is coming from. - RemoteUrlPath string `json:"remote_url_path"` + RemoteUrlPath string `json:"remote_url_path" url:"-"` // The name of the Common Model that the remote field corresponds to in a given category. - CommonModelName string `json:"common_model_name"` + CommonModelName string `json:"common_model_name" url:"-"` } type PatchedEditFieldMappingRequest struct { // The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint. - RemoteFieldTraversalPath []interface{} `json:"remote_field_traversal_path,omitempty"` + RemoteFieldTraversalPath []interface{} `json:"remote_field_traversal_path,omitempty" url:"-"` // The method of the remote endpoint where the remote field is coming from. - RemoteMethod *string `json:"remote_method,omitempty"` + RemoteMethod *string `json:"remote_method,omitempty" url:"-"` // The path of the remote endpoint where the remote field is coming from. - RemoteUrlPath *string `json:"remote_url_path,omitempty"` + RemoteUrlPath *string `json:"remote_url_path,omitempty" url:"-"` } type FieldMappingsRetrieveRequest struct { // If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. - ExcludeRemoteFieldMetadata *bool `json:"-"` + ExcludeRemoteFieldMetadata *bool `json:"-" url:"exclude_remote_field_metadata,omitempty"` } type RemoteFieldsRetrieveRequest struct { // A comma seperated list of Common Model names. If included, will only return Remote Fields for those Common Models. - CommonModels *string `json:"-"` + CommonModels *string `json:"-" url:"common_models,omitempty"` // If true, will include example values, where available, for remote fields in the 3rd party platform. These examples come from active data from your customers. - IncludeExampleValues *string `json:"-"` + IncludeExampleValues *string `json:"-" url:"include_example_values,omitempty"` +} + +type AdvancedMetadata struct { + Id string `json:"id" url:"id"` + DisplayName *string `json:"display_name,omitempty" url:"display_name,omitempty"` + Description *string `json:"description,omitempty" url:"description,omitempty"` + IsRequired *bool `json:"is_required,omitempty" url:"is_required,omitempty"` + IsCustom *bool `json:"is_custom,omitempty" url:"is_custom,omitempty"` + FieldChoices []interface{} `json:"field_choices,omitempty" url:"field_choices,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AdvancedMetadata) GetId() string { + if a == nil { + return "" + } + return a.Id +} + +func (a *AdvancedMetadata) GetDisplayName() *string { + if a == nil { + return nil + } + return a.DisplayName +} + +func (a *AdvancedMetadata) GetDescription() *string { + if a == nil { + return nil + } + return a.Description +} + +func (a *AdvancedMetadata) GetIsRequired() *bool { + if a == nil { + return nil + } + return a.IsRequired +} + +func (a *AdvancedMetadata) GetIsCustom() *bool { + if a == nil { + return nil + } + return a.IsCustom +} + +func (a *AdvancedMetadata) GetFieldChoices() []interface{} { + if a == nil { + return nil + } + return a.FieldChoices +} + +func (a *AdvancedMetadata) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AdvancedMetadata) UnmarshalJSON(data []byte) error { + type unmarshaler AdvancedMetadata + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *a = AdvancedMetadata(value) + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AdvancedMetadata) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} + +type ExternalTargetFieldApi struct { + Name *string `json:"name,omitempty" url:"name,omitempty"` + Description *string `json:"description,omitempty" url:"description,omitempty"` + IsMapped *string `json:"is_mapped,omitempty" url:"is_mapped,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (e *ExternalTargetFieldApi) GetName() *string { + if e == nil { + return nil + } + return e.Name +} + +func (e *ExternalTargetFieldApi) GetDescription() *string { + if e == nil { + return nil + } + return e.Description +} + +func (e *ExternalTargetFieldApi) GetIsMapped() *string { + if e == nil { + return nil + } + return e.IsMapped +} + +func (e *ExternalTargetFieldApi) GetExtraProperties() map[string]interface{} { + return e.extraProperties +} + +func (e *ExternalTargetFieldApi) UnmarshalJSON(data []byte) error { + type unmarshaler ExternalTargetFieldApi + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *e = ExternalTargetFieldApi(value) + extraProperties, err := internal.ExtractExtraProperties(data, *e) + if err != nil { + return err + } + e.extraProperties = extraProperties + e.rawJSON = json.RawMessage(data) + return nil +} + +func (e *ExternalTargetFieldApi) String() string { + if len(e.rawJSON) > 0 { + if value, err := internal.StringifyJSON(e.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(e); err == nil { + return value + } + return fmt.Sprintf("%#v", e) +} + +type ExternalTargetFieldApiResponse struct { + File []*ExternalTargetFieldApi `json:"File,omitempty" url:"File,omitempty"` + Folder []*ExternalTargetFieldApi `json:"Folder,omitempty" url:"Folder,omitempty"` + Drive []*ExternalTargetFieldApi `json:"Drive,omitempty" url:"Drive,omitempty"` + Group []*ExternalTargetFieldApi `json:"Group,omitempty" url:"Group,omitempty"` + User []*ExternalTargetFieldApi `json:"User,omitempty" url:"User,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (e *ExternalTargetFieldApiResponse) GetFile() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.File +} + +func (e *ExternalTargetFieldApiResponse) GetFolder() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.Folder +} + +func (e *ExternalTargetFieldApiResponse) GetDrive() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.Drive +} + +func (e *ExternalTargetFieldApiResponse) GetGroup() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.Group +} + +func (e *ExternalTargetFieldApiResponse) GetUser() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.User +} + +func (e *ExternalTargetFieldApiResponse) GetExtraProperties() map[string]interface{} { + return e.extraProperties +} + +func (e *ExternalTargetFieldApiResponse) UnmarshalJSON(data []byte) error { + type unmarshaler ExternalTargetFieldApiResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *e = ExternalTargetFieldApiResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *e) + if err != nil { + return err + } + e.extraProperties = extraProperties + e.rawJSON = json.RawMessage(data) + return nil +} + +func (e *ExternalTargetFieldApiResponse) String() string { + if len(e.rawJSON) > 0 { + if value, err := internal.StringifyJSON(e.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(e); err == nil { + return value + } + return fmt.Sprintf("%#v", e) +} + +type FieldMappingApiInstance struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + IsIntegrationWide *bool `json:"is_integration_wide,omitempty" url:"is_integration_wide,omitempty"` + TargetField *FieldMappingApiInstanceTargetField `json:"target_field,omitempty" url:"target_field,omitempty"` + RemoteField *FieldMappingApiInstanceRemoteField `json:"remote_field,omitempty" url:"remote_field,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (f *FieldMappingApiInstance) GetId() *string { + if f == nil { + return nil + } + return f.Id +} + +func (f *FieldMappingApiInstance) GetIsIntegrationWide() *bool { + if f == nil { + return nil + } + return f.IsIntegrationWide +} + +func (f *FieldMappingApiInstance) GetTargetField() *FieldMappingApiInstanceTargetField { + if f == nil { + return nil + } + return f.TargetField +} + +func (f *FieldMappingApiInstance) GetRemoteField() *FieldMappingApiInstanceRemoteField { + if f == nil { + return nil + } + return f.RemoteField +} + +func (f *FieldMappingApiInstance) GetExtraProperties() map[string]interface{} { + return f.extraProperties +} + +func (f *FieldMappingApiInstance) UnmarshalJSON(data []byte) error { + type unmarshaler FieldMappingApiInstance + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *f = FieldMappingApiInstance(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { + return err + } + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) + return nil +} + +func (f *FieldMappingApiInstance) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(f); err == nil { + return value + } + return fmt.Sprintf("%#v", f) +} + +type FieldMappingApiInstanceRemoteField struct { + RemoteKeyName *string `json:"remote_key_name,omitempty" url:"remote_key_name,omitempty"` + Schema map[string]interface{} `json:"schema,omitempty" url:"schema,omitempty"` + RemoteEndpointInfo *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo `json:"remote_endpoint_info" url:"remote_endpoint_info"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (f *FieldMappingApiInstanceRemoteField) GetRemoteKeyName() *string { + if f == nil { + return nil + } + return f.RemoteKeyName +} + +func (f *FieldMappingApiInstanceRemoteField) GetSchema() map[string]interface{} { + if f == nil { + return nil + } + return f.Schema +} + +func (f *FieldMappingApiInstanceRemoteField) GetRemoteEndpointInfo() *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo { + if f == nil { + return nil + } + return f.RemoteEndpointInfo +} + +func (f *FieldMappingApiInstanceRemoteField) GetExtraProperties() map[string]interface{} { + return f.extraProperties +} + +func (f *FieldMappingApiInstanceRemoteField) UnmarshalJSON(data []byte) error { + type unmarshaler FieldMappingApiInstanceRemoteField + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *f = FieldMappingApiInstanceRemoteField(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { + return err + } + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) + return nil +} + +func (f *FieldMappingApiInstanceRemoteField) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(f); err == nil { + return value + } + return fmt.Sprintf("%#v", f) +} + +type FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo struct { + Method *string `json:"method,omitempty" url:"method,omitempty"` + UrlPath *string `json:"url_path,omitempty" url:"url_path,omitempty"` + FieldTraversalPath []string `json:"field_traversal_path,omitempty" url:"field_traversal_path,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (f *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo) GetMethod() *string { + if f == nil { + return nil + } + return f.Method +} + +func (f *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo) GetUrlPath() *string { + if f == nil { + return nil + } + return f.UrlPath +} + +func (f *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo) GetFieldTraversalPath() []string { + if f == nil { + return nil + } + return f.FieldTraversalPath +} + +func (f *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo) GetExtraProperties() map[string]interface{} { + return f.extraProperties +} + +func (f *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo) UnmarshalJSON(data []byte) error { + type unmarshaler FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *f = FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { + return err + } + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) + return nil +} + +func (f *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(f); err == nil { + return value + } + return fmt.Sprintf("%#v", f) +} + +type FieldMappingApiInstanceResponse struct { + File []*FieldMappingApiInstance `json:"File,omitempty" url:"File,omitempty"` + Folder []*FieldMappingApiInstance `json:"Folder,omitempty" url:"Folder,omitempty"` + Drive []*FieldMappingApiInstance `json:"Drive,omitempty" url:"Drive,omitempty"` + Group []*FieldMappingApiInstance `json:"Group,omitempty" url:"Group,omitempty"` + User []*FieldMappingApiInstance `json:"User,omitempty" url:"User,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (f *FieldMappingApiInstanceResponse) GetFile() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.File +} + +func (f *FieldMappingApiInstanceResponse) GetFolder() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Folder +} + +func (f *FieldMappingApiInstanceResponse) GetDrive() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Drive +} + +func (f *FieldMappingApiInstanceResponse) GetGroup() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Group +} + +func (f *FieldMappingApiInstanceResponse) GetUser() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.User +} + +func (f *FieldMappingApiInstanceResponse) GetExtraProperties() map[string]interface{} { + return f.extraProperties +} + +func (f *FieldMappingApiInstanceResponse) UnmarshalJSON(data []byte) error { + type unmarshaler FieldMappingApiInstanceResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *f = FieldMappingApiInstanceResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { + return err + } + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) + return nil +} + +func (f *FieldMappingApiInstanceResponse) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(f); err == nil { + return value + } + return fmt.Sprintf("%#v", f) +} + +type FieldMappingApiInstanceTargetField struct { + Name string `json:"name" url:"name"` + Description string `json:"description" url:"description"` + IsOrganizationWide bool `json:"is_organization_wide" url:"is_organization_wide"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (f *FieldMappingApiInstanceTargetField) GetName() string { + if f == nil { + return "" + } + return f.Name +} + +func (f *FieldMappingApiInstanceTargetField) GetDescription() string { + if f == nil { + return "" + } + return f.Description +} + +func (f *FieldMappingApiInstanceTargetField) GetIsOrganizationWide() bool { + if f == nil { + return false + } + return f.IsOrganizationWide +} + +func (f *FieldMappingApiInstanceTargetField) GetExtraProperties() map[string]interface{} { + return f.extraProperties +} + +func (f *FieldMappingApiInstanceTargetField) UnmarshalJSON(data []byte) error { + type unmarshaler FieldMappingApiInstanceTargetField + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *f = FieldMappingApiInstanceTargetField(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { + return err + } + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) + return nil +} + +func (f *FieldMappingApiInstanceTargetField) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(f); err == nil { + return value + } + return fmt.Sprintf("%#v", f) +} + +type FieldMappingInstanceResponse struct { + Model *FieldMappingApiInstance `json:"model" url:"model"` + Warnings []*WarningValidationProblem `json:"warnings" url:"warnings"` + Errors []*ErrorValidationProblem `json:"errors" url:"errors"` + Logs []*DebugModeLog `json:"logs,omitempty" url:"logs,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (f *FieldMappingInstanceResponse) GetModel() *FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Model +} + +func (f *FieldMappingInstanceResponse) GetWarnings() []*WarningValidationProblem { + if f == nil { + return nil + } + return f.Warnings +} + +func (f *FieldMappingInstanceResponse) GetErrors() []*ErrorValidationProblem { + if f == nil { + return nil + } + return f.Errors +} + +func (f *FieldMappingInstanceResponse) GetLogs() []*DebugModeLog { + if f == nil { + return nil + } + return f.Logs +} + +func (f *FieldMappingInstanceResponse) GetExtraProperties() map[string]interface{} { + return f.extraProperties +} + +func (f *FieldMappingInstanceResponse) UnmarshalJSON(data []byte) error { + type unmarshaler FieldMappingInstanceResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *f = FieldMappingInstanceResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { + return err + } + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) + return nil +} + +func (f *FieldMappingInstanceResponse) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(f); err == nil { + return value + } + return fmt.Sprintf("%#v", f) +} + +type RemoteEndpointInfo struct { + Method string `json:"method" url:"method"` + UrlPath string `json:"url_path" url:"url_path"` + FieldTraversalPath []interface{} `json:"field_traversal_path" url:"field_traversal_path"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (r *RemoteEndpointInfo) GetMethod() string { + if r == nil { + return "" + } + return r.Method +} + +func (r *RemoteEndpointInfo) GetUrlPath() string { + if r == nil { + return "" + } + return r.UrlPath +} + +func (r *RemoteEndpointInfo) GetFieldTraversalPath() []interface{} { + if r == nil { + return nil + } + return r.FieldTraversalPath +} + +func (r *RemoteEndpointInfo) GetExtraProperties() map[string]interface{} { + return r.extraProperties +} + +func (r *RemoteEndpointInfo) UnmarshalJSON(data []byte) error { + type unmarshaler RemoteEndpointInfo + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *r = RemoteEndpointInfo(value) + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { + return err + } + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) + return nil +} + +func (r *RemoteEndpointInfo) String() string { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(r); err == nil { + return value + } + return fmt.Sprintf("%#v", r) +} + +type RemoteFieldApi struct { + Schema map[string]interface{} `json:"schema" url:"schema"` + RemoteKeyName string `json:"remote_key_name" url:"remote_key_name"` + RemoteEndpointInfo *RemoteEndpointInfo `json:"remote_endpoint_info" url:"remote_endpoint_info"` + ExampleValues []interface{} `json:"example_values,omitempty" url:"example_values,omitempty"` + AdvancedMetadata *AdvancedMetadata `json:"advanced_metadata,omitempty" url:"advanced_metadata,omitempty"` + Coverage *RemoteFieldApiCoverage `json:"coverage,omitempty" url:"coverage,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (r *RemoteFieldApi) GetSchema() map[string]interface{} { + if r == nil { + return nil + } + return r.Schema +} + +func (r *RemoteFieldApi) GetRemoteKeyName() string { + if r == nil { + return "" + } + return r.RemoteKeyName +} + +func (r *RemoteFieldApi) GetRemoteEndpointInfo() *RemoteEndpointInfo { + if r == nil { + return nil + } + return r.RemoteEndpointInfo +} + +func (r *RemoteFieldApi) GetExampleValues() []interface{} { + if r == nil { + return nil + } + return r.ExampleValues +} + +func (r *RemoteFieldApi) GetAdvancedMetadata() *AdvancedMetadata { + if r == nil { + return nil + } + return r.AdvancedMetadata +} + +func (r *RemoteFieldApi) GetCoverage() *RemoteFieldApiCoverage { + if r == nil { + return nil + } + return r.Coverage +} + +func (r *RemoteFieldApi) GetExtraProperties() map[string]interface{} { + return r.extraProperties +} + +func (r *RemoteFieldApi) UnmarshalJSON(data []byte) error { + type unmarshaler RemoteFieldApi + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *r = RemoteFieldApi(value) + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { + return err + } + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) + return nil +} + +func (r *RemoteFieldApi) String() string { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(r); err == nil { + return value + } + return fmt.Sprintf("%#v", r) +} + +type RemoteFieldApiCoverage struct { + Integer int + Double float64 + + typ string +} + +func (r *RemoteFieldApiCoverage) GetInteger() int { + if r == nil { + return 0 + } + return r.Integer +} + +func (r *RemoteFieldApiCoverage) GetDouble() float64 { + if r == nil { + return 0 + } + return r.Double +} + +func (r *RemoteFieldApiCoverage) UnmarshalJSON(data []byte) error { + var valueInteger int + if err := json.Unmarshal(data, &valueInteger); err == nil { + r.typ = "Integer" + r.Integer = valueInteger + return nil + } + var valueDouble float64 + if err := json.Unmarshal(data, &valueDouble); err == nil { + r.typ = "Double" + r.Double = valueDouble + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, r) +} + +func (r RemoteFieldApiCoverage) MarshalJSON() ([]byte, error) { + if r.typ == "Integer" || r.Integer != 0 { + return json.Marshal(r.Integer) + } + if r.typ == "Double" || r.Double != 0 { + return json.Marshal(r.Double) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", r) +} + +type RemoteFieldApiCoverageVisitor interface { + VisitInteger(int) error + VisitDouble(float64) error +} + +func (r *RemoteFieldApiCoverage) Accept(visitor RemoteFieldApiCoverageVisitor) error { + if r.typ == "Integer" || r.Integer != 0 { + return visitor.VisitInteger(r.Integer) + } + if r.typ == "Double" || r.Double != 0 { + return visitor.VisitDouble(r.Double) + } + return fmt.Errorf("type %T does not include a non-empty union type", r) +} + +type RemoteFieldApiResponse struct { + File []*RemoteFieldApi `json:"File,omitempty" url:"File,omitempty"` + Folder []*RemoteFieldApi `json:"Folder,omitempty" url:"Folder,omitempty"` + Drive []*RemoteFieldApi `json:"Drive,omitempty" url:"Drive,omitempty"` + Group []*RemoteFieldApi `json:"Group,omitempty" url:"Group,omitempty"` + User []*RemoteFieldApi `json:"User,omitempty" url:"User,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (r *RemoteFieldApiResponse) GetFile() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.File +} + +func (r *RemoteFieldApiResponse) GetFolder() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.Folder +} + +func (r *RemoteFieldApiResponse) GetDrive() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.Drive +} + +func (r *RemoteFieldApiResponse) GetGroup() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.Group +} + +func (r *RemoteFieldApiResponse) GetUser() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.User +} + +func (r *RemoteFieldApiResponse) GetExtraProperties() map[string]interface{} { + return r.extraProperties +} + +func (r *RemoteFieldApiResponse) UnmarshalJSON(data []byte) error { + type unmarshaler RemoteFieldApiResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *r = RemoteFieldApiResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { + return err + } + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) + return nil +} + +func (r *RemoteFieldApiResponse) String() string { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(r); err == nil { + return value + } + return fmt.Sprintf("%#v", r) } diff --git a/filestorage/fieldmapping/client.go b/filestorage/fieldmapping/client.go index f17e440..dedf160 100644 --- a/filestorage/fieldmapping/client.go +++ b/filestorage/fieldmapping/client.go @@ -1,58 +1,73 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package fieldmapping import ( context "context" - fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - filestorage "github.com/merge-api/merge-go-client/filestorage" + core "github.com/merge-api/merge-go-client/v2/core" + filestorage "github.com/merge-api/merge-go-client/v2/filestorage" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge fields. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). -func (c *Client) FieldMappingsRetrieve(ctx context.Context, request *filestorage.FieldMappingsRetrieveRequest) (*filestorage.FieldMappingApiInstanceResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "filestorage/v1/field-mappings" - - queryParams := make(url.Values) - if request.ExcludeRemoteFieldMetadata != nil { - queryParams.Add("exclude_remote_field_metadata", fmt.Sprintf("%v", *request.ExcludeRemoteFieldMetadata)) +func (c *Client) FieldMappingsRetrieve( + ctx context.Context, + request *filestorage.FieldMappingsRetrieveRequest, + opts ...option.RequestOption, +) (*filestorage.FieldMappingApiInstanceResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/filestorage/v1/field-mappings" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *filestorage.FieldMappingApiInstanceResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -61,30 +76,44 @@ func (c *Client) FieldMappingsRetrieve(ctx context.Context, request *filestorage } // Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. -func (c *Client) FieldMappingsCreate(ctx context.Context, request *filestorage.CreateFieldMappingRequest) (*filestorage.FieldMappingInstanceResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "filestorage/v1/field-mappings" - - queryParams := make(url.Values) - if request.ExcludeRemoteFieldMetadata != nil { - queryParams.Add("exclude_remote_field_metadata", fmt.Sprintf("%v", *request.ExcludeRemoteFieldMetadata)) +func (c *Client) FieldMappingsCreate( + ctx context.Context, + request *filestorage.CreateFieldMappingRequest, + opts ...option.RequestOption, +) (*filestorage.FieldMappingInstanceResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/filestorage/v1/field-mappings" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *filestorage.FieldMappingInstanceResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -93,21 +122,38 @@ func (c *Client) FieldMappingsCreate(ctx context.Context, request *filestorage.C } // Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. -func (c *Client) FieldMappingsDestroy(ctx context.Context, fieldMappingId string) (*filestorage.FieldMappingInstanceResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"filestorage/v1/field-mappings/%v", fieldMappingId) +func (c *Client) FieldMappingsDestroy( + ctx context.Context, + fieldMappingId string, + opts ...option.RequestOption, +) (*filestorage.FieldMappingInstanceResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/filestorage/v1/field-mappings/%v", + fieldMappingId, + ) + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *filestorage.FieldMappingInstanceResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodDelete, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodDelete, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -116,22 +162,41 @@ func (c *Client) FieldMappingsDestroy(ctx context.Context, fieldMappingId string } // Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. -func (c *Client) FieldMappingsPartialUpdate(ctx context.Context, fieldMappingId string, request *filestorage.PatchedEditFieldMappingRequest) (*filestorage.FieldMappingInstanceResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"filestorage/v1/field-mappings/%v", fieldMappingId) +func (c *Client) FieldMappingsPartialUpdate( + ctx context.Context, + fieldMappingId string, + request *filestorage.PatchedEditFieldMappingRequest, + opts ...option.RequestOption, +) (*filestorage.FieldMappingInstanceResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/filestorage/v1/field-mappings/%v", + fieldMappingId, + ) + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *filestorage.FieldMappingInstanceResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPatch, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPatch, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -140,32 +205,42 @@ func (c *Client) FieldMappingsPartialUpdate(ctx context.Context, fieldMappingId } // Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data is enabled. You can use remote fields to override existing Merge fields or map a new Merge field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). -func (c *Client) RemoteFieldsRetrieve(ctx context.Context, request *filestorage.RemoteFieldsRetrieveRequest) (*filestorage.RemoteFieldApiResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "filestorage/v1/remote-fields" - - queryParams := make(url.Values) - if request.CommonModels != nil { - queryParams.Add("common_models", fmt.Sprintf("%v", *request.CommonModels)) - } - if request.IncludeExampleValues != nil { - queryParams.Add("include_example_values", fmt.Sprintf("%v", *request.IncludeExampleValues)) +func (c *Client) RemoteFieldsRetrieve( + ctx context.Context, + request *filestorage.RemoteFieldsRetrieveRequest, + opts ...option.RequestOption, +) (*filestorage.RemoteFieldApiResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/filestorage/v1/remote-fields" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *filestorage.RemoteFieldApiResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -174,21 +249,34 @@ func (c *Client) RemoteFieldsRetrieve(ctx context.Context, request *filestorage. } // Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields are additional fields appended to the Merge Common Model for all Linked Accounts in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). -func (c *Client) TargetFieldsRetrieve(ctx context.Context) (*filestorage.ExternalTargetFieldApiResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "filestorage/v1/target-fields" +func (c *Client) TargetFieldsRetrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*filestorage.ExternalTargetFieldApiResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/filestorage/v1/target-fields" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *filestorage.ExternalTargetFieldApiResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/filestorage/files.go b/filestorage/files.go index f10e725..eb075b4 100644 --- a/filestorage/files.go +++ b/filestorage/files.go @@ -1,135 +1,1399 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package filestorage import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type FileStorageFileEndpointRequest struct { // Whether to include debug fields (such as log file links) in the response. - IsDebugMode *bool `json:"-"` + IsDebugMode *bool `json:"-" url:"is_debug_mode,omitempty"` // Whether or not third-party updates should be run asynchronously. - RunAsync *bool `json:"-"` - Model *FileRequest `json:"model,omitempty"` + RunAsync *bool `json:"-" url:"run_async,omitempty"` + Model *FileRequest `json:"model,omitempty" url:"-"` +} + +type FilesDownloadRequestMetaListRequest struct { + // If provided, will only return objects created after this datetime. + CreatedAfter *string `json:"-" url:"created_after,omitempty"` + // If provided, will only return objects created before this datetime. + CreatedBefore *string `json:"-" url:"created_before,omitempty"` + // The pagination cursor value. + Cursor *string `json:"-" url:"cursor,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` + // A comma-separated list of preferred MIME types in order of priority. If supported by the third-party provider, the file(s) will be returned in the first supported MIME type from the list. The default MIME type is PDF. To see supported MIME types by file type, refer to our export format help center article. + MimeTypes *string `json:"-" url:"mime_types,omitempty"` + // If provided, will only return objects modified after this datetime. + ModifiedAfter *string `json:"-" url:"modified_after,omitempty"` + // If provided, will only return objects modified before this datetime. + ModifiedBefore *string `json:"-" url:"modified_before,omitempty"` + // Overrides the default ordering for this endpoint. Possible values include: created_at, -created_at, modified_at, -modified_at. + OrderBy *FilesDownloadRequestMetaListRequestOrderBy `json:"-" url:"order_by,omitempty"` + // Number of results to return per page. + PageSize *int `json:"-" url:"page_size,omitempty"` +} + +type FilesDownloadRequestMetaRetrieveRequest struct { + // If provided, specifies the export format of the file to be downloaded. For information on supported export formats, please refer to our export format help center article. + MimeType *string `json:"-" url:"mime_type,omitempty"` } type FilesDownloadRetrieveRequest struct { + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, specifies the export format of the file to be downloaded. For information on supported export formats, please refer to our export format help center article. - MimeType *string `json:"-"` + MimeType *string `json:"-" url:"mime_type,omitempty"` } type FilesListRequest struct { // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Specifying a drive id returns only the files in that drive. Specifying null returns only the files outside the top-level drive. - DriveId *string `json:"-"` + DriveId *string `json:"-" url:"drive_id,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *FilesListRequestExpand `json:"-"` + Expand []*FilesListRequestExpandItem `json:"-" url:"expand,omitempty"` // Specifying a folder id returns only the files in that folder. Specifying null returns only the files in root directory. - FolderId *string `json:"-"` + FolderId *string `json:"-" url:"folder_id,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, will only return files with these mime_types. Multiple values can be separated by commas. - MimeType *string `json:"-"` + MimeType *string `json:"-" url:"mime_type,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // If provided, will only return files with this name. This performs an exact match. - Name *string `json:"-"` + Name *string `json:"-" url:"name,omitempty"` + // Overrides the default ordering for this endpoint. Possible values include: created_at, -created_at, modified_at, -modified_at. + OrderBy *FilesListRequestOrderBy `json:"-" url:"order_by,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` } type FilesRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *FilesRetrieveRequestExpand `json:"-"` + Expand []*FilesRetrieveRequestExpandItem `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` } -type FilesListRequestExpand string +type FilesDownloadRequestMetaListRequestOrderBy string const ( - FilesListRequestExpandDrive FilesListRequestExpand = "drive" - FilesListRequestExpandFolder FilesListRequestExpand = "folder" - FilesListRequestExpandFolderDrive FilesListRequestExpand = "folder,drive" - FilesListRequestExpandPermissions FilesListRequestExpand = "permissions" - FilesListRequestExpandPermissionsDrive FilesListRequestExpand = "permissions,drive" - FilesListRequestExpandPermissionsFolder FilesListRequestExpand = "permissions,folder" - FilesListRequestExpandPermissionsFolderDrive FilesListRequestExpand = "permissions,folder,drive" + FilesDownloadRequestMetaListRequestOrderByCreatedAtDescending FilesDownloadRequestMetaListRequestOrderBy = "-created_at" + FilesDownloadRequestMetaListRequestOrderByModifiedAtDescending FilesDownloadRequestMetaListRequestOrderBy = "-modified_at" + FilesDownloadRequestMetaListRequestOrderByCreatedAtAscending FilesDownloadRequestMetaListRequestOrderBy = "created_at" + FilesDownloadRequestMetaListRequestOrderByModifiedAtAscending FilesDownloadRequestMetaListRequestOrderBy = "modified_at" ) -func NewFilesListRequestExpandFromString(s string) (FilesListRequestExpand, error) { +func NewFilesDownloadRequestMetaListRequestOrderByFromString(s string) (FilesDownloadRequestMetaListRequestOrderBy, error) { + switch s { + case "-created_at": + return FilesDownloadRequestMetaListRequestOrderByCreatedAtDescending, nil + case "-modified_at": + return FilesDownloadRequestMetaListRequestOrderByModifiedAtDescending, nil + case "created_at": + return FilesDownloadRequestMetaListRequestOrderByCreatedAtAscending, nil + case "modified_at": + return FilesDownloadRequestMetaListRequestOrderByModifiedAtAscending, nil + } + var t FilesDownloadRequestMetaListRequestOrderBy + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (f FilesDownloadRequestMetaListRequestOrderBy) Ptr() *FilesDownloadRequestMetaListRequestOrderBy { + return &f +} + +type FilesListRequestExpandItem string + +const ( + FilesListRequestExpandItemDrive FilesListRequestExpandItem = "drive" + FilesListRequestExpandItemFolder FilesListRequestExpandItem = "folder" + FilesListRequestExpandItemPermissions FilesListRequestExpandItem = "permissions" +) + +func NewFilesListRequestExpandItemFromString(s string) (FilesListRequestExpandItem, error) { switch s { case "drive": - return FilesListRequestExpandDrive, nil + return FilesListRequestExpandItemDrive, nil case "folder": - return FilesListRequestExpandFolder, nil - case "folder,drive": - return FilesListRequestExpandFolderDrive, nil + return FilesListRequestExpandItemFolder, nil case "permissions": - return FilesListRequestExpandPermissions, nil - case "permissions,drive": - return FilesListRequestExpandPermissionsDrive, nil - case "permissions,folder": - return FilesListRequestExpandPermissionsFolder, nil - case "permissions,folder,drive": - return FilesListRequestExpandPermissionsFolderDrive, nil - } - var t FilesListRequestExpand + return FilesListRequestExpandItemPermissions, nil + } + var t FilesListRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (f FilesListRequestExpand) Ptr() *FilesListRequestExpand { +func (f FilesListRequestExpandItem) Ptr() *FilesListRequestExpandItem { return &f } -type FilesRetrieveRequestExpand string +type FilesListRequestOrderBy string const ( - FilesRetrieveRequestExpandDrive FilesRetrieveRequestExpand = "drive" - FilesRetrieveRequestExpandFolder FilesRetrieveRequestExpand = "folder" - FilesRetrieveRequestExpandFolderDrive FilesRetrieveRequestExpand = "folder,drive" - FilesRetrieveRequestExpandPermissions FilesRetrieveRequestExpand = "permissions" - FilesRetrieveRequestExpandPermissionsDrive FilesRetrieveRequestExpand = "permissions,drive" - FilesRetrieveRequestExpandPermissionsFolder FilesRetrieveRequestExpand = "permissions,folder" - FilesRetrieveRequestExpandPermissionsFolderDrive FilesRetrieveRequestExpand = "permissions,folder,drive" + FilesListRequestOrderByCreatedAtDescending FilesListRequestOrderBy = "-created_at" + FilesListRequestOrderByModifiedAtDescending FilesListRequestOrderBy = "-modified_at" + FilesListRequestOrderByCreatedAtAscending FilesListRequestOrderBy = "created_at" + FilesListRequestOrderByModifiedAtAscending FilesListRequestOrderBy = "modified_at" ) -func NewFilesRetrieveRequestExpandFromString(s string) (FilesRetrieveRequestExpand, error) { +func NewFilesListRequestOrderByFromString(s string) (FilesListRequestOrderBy, error) { + switch s { + case "-created_at": + return FilesListRequestOrderByCreatedAtDescending, nil + case "-modified_at": + return FilesListRequestOrderByModifiedAtDescending, nil + case "created_at": + return FilesListRequestOrderByCreatedAtAscending, nil + case "modified_at": + return FilesListRequestOrderByModifiedAtAscending, nil + } + var t FilesListRequestOrderBy + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (f FilesListRequestOrderBy) Ptr() *FilesListRequestOrderBy { + return &f +} + +type FilesRetrieveRequestExpandItem string + +const ( + FilesRetrieveRequestExpandItemDrive FilesRetrieveRequestExpandItem = "drive" + FilesRetrieveRequestExpandItemFolder FilesRetrieveRequestExpandItem = "folder" + FilesRetrieveRequestExpandItemPermissions FilesRetrieveRequestExpandItem = "permissions" +) + +func NewFilesRetrieveRequestExpandItemFromString(s string) (FilesRetrieveRequestExpandItem, error) { switch s { case "drive": - return FilesRetrieveRequestExpandDrive, nil + return FilesRetrieveRequestExpandItemDrive, nil case "folder": - return FilesRetrieveRequestExpandFolder, nil - case "folder,drive": - return FilesRetrieveRequestExpandFolderDrive, nil + return FilesRetrieveRequestExpandItemFolder, nil case "permissions": - return FilesRetrieveRequestExpandPermissions, nil - case "permissions,drive": - return FilesRetrieveRequestExpandPermissionsDrive, nil - case "permissions,folder": - return FilesRetrieveRequestExpandPermissionsFolder, nil - case "permissions,folder,drive": - return FilesRetrieveRequestExpandPermissionsFolderDrive, nil - } - var t FilesRetrieveRequestExpand + return FilesRetrieveRequestExpandItemPermissions, nil + } + var t FilesRetrieveRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (f FilesRetrieveRequestExpand) Ptr() *FilesRetrieveRequestExpand { +func (f FilesRetrieveRequestExpandItem) Ptr() *FilesRetrieveRequestExpandItem { return &f } + +type DownloadRequestMeta struct { + Id string `json:"id" url:"id"` + Url string `json:"url" url:"url"` + Method string `json:"method" url:"method"` + Headers map[string]interface{} `json:"headers" url:"headers"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (d *DownloadRequestMeta) GetId() string { + if d == nil { + return "" + } + return d.Id +} + +func (d *DownloadRequestMeta) GetUrl() string { + if d == nil { + return "" + } + return d.Url +} + +func (d *DownloadRequestMeta) GetMethod() string { + if d == nil { + return "" + } + return d.Method +} + +func (d *DownloadRequestMeta) GetHeaders() map[string]interface{} { + if d == nil { + return nil + } + return d.Headers +} + +func (d *DownloadRequestMeta) GetExtraProperties() map[string]interface{} { + return d.extraProperties +} + +func (d *DownloadRequestMeta) UnmarshalJSON(data []byte) error { + type unmarshaler DownloadRequestMeta + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *d = DownloadRequestMeta(value) + extraProperties, err := internal.ExtractExtraProperties(data, *d) + if err != nil { + return err + } + d.extraProperties = extraProperties + d.rawJSON = json.RawMessage(data) + return nil +} + +func (d *DownloadRequestMeta) String() string { + if len(d.rawJSON) > 0 { + if value, err := internal.StringifyJSON(d.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(d); err == nil { + return value + } + return fmt.Sprintf("%#v", d) +} + +// # The File Object +// ### Description +// The `File` object is used to represent a file in the workspace. The Object typically exists under a folder or drive, if it exists. +// ### Usage Example +// Fetch from the `GET /api/filestorage/v1/files` endpoint and view their files. +type File struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The file's name. + Name *string `json:"name,omitempty" url:"name,omitempty"` + // The URL to access the file. + FileUrl *string `json:"file_url,omitempty" url:"file_url,omitempty"` + // The URL that produces a thumbnail preview of the file. Typically an image. + FileThumbnailUrl *string `json:"file_thumbnail_url,omitempty" url:"file_thumbnail_url,omitempty"` + // The file's size, in bytes. + Size *int64 `json:"size,omitempty" url:"size,omitempty"` + // The file's mime type. + MimeType *string `json:"mime_type,omitempty" url:"mime_type,omitempty"` + // The file's description. + Description *string `json:"description,omitempty" url:"description,omitempty"` + // The folder that the file belongs to. + Folder *FileFolder `json:"folder,omitempty" url:"folder,omitempty"` + // This field stores file checksum data. 'type' indicates the algorithm (e.g. crc_32, sha1, sha256, quickXor, or md5), and 'content_hash' is the unique hash used to verify file integrity and detect alterations. + Checksum map[string]interface{} `json:"checksum,omitempty" url:"checksum,omitempty"` + // The Permission object is used to represent a user's or group's access to a File or Folder. Permissions are unexpanded by default. Use the query param `expand=permissions` to see more details under `GET /files`. + Permissions *FilePermissions `json:"permissions,omitempty" url:"permissions,omitempty"` + // The drive that the file belongs to. + Drive *FileDrive `json:"drive,omitempty" url:"drive,omitempty"` + // When the third party's file was created. + RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty" url:"remote_created_at,omitempty"` + // When the third party's file was updated. + RemoteUpdatedAt *time.Time `json:"remote_updated_at,omitempty" url:"remote_updated_at,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (f *File) GetId() *string { + if f == nil { + return nil + } + return f.Id +} + +func (f *File) GetRemoteId() *string { + if f == nil { + return nil + } + return f.RemoteId +} + +func (f *File) GetCreatedAt() *time.Time { + if f == nil { + return nil + } + return f.CreatedAt +} + +func (f *File) GetModifiedAt() *time.Time { + if f == nil { + return nil + } + return f.ModifiedAt +} + +func (f *File) GetName() *string { + if f == nil { + return nil + } + return f.Name +} + +func (f *File) GetFileUrl() *string { + if f == nil { + return nil + } + return f.FileUrl +} + +func (f *File) GetFileThumbnailUrl() *string { + if f == nil { + return nil + } + return f.FileThumbnailUrl +} + +func (f *File) GetSize() *int64 { + if f == nil { + return nil + } + return f.Size +} + +func (f *File) GetMimeType() *string { + if f == nil { + return nil + } + return f.MimeType +} + +func (f *File) GetDescription() *string { + if f == nil { + return nil + } + return f.Description +} + +func (f *File) GetFolder() *FileFolder { + if f == nil { + return nil + } + return f.Folder +} + +func (f *File) GetChecksum() map[string]interface{} { + if f == nil { + return nil + } + return f.Checksum +} + +func (f *File) GetPermissions() *FilePermissions { + if f == nil { + return nil + } + return f.Permissions +} + +func (f *File) GetDrive() *FileDrive { + if f == nil { + return nil + } + return f.Drive +} + +func (f *File) GetRemoteCreatedAt() *time.Time { + if f == nil { + return nil + } + return f.RemoteCreatedAt +} + +func (f *File) GetRemoteUpdatedAt() *time.Time { + if f == nil { + return nil + } + return f.RemoteUpdatedAt +} + +func (f *File) GetRemoteWasDeleted() *bool { + if f == nil { + return nil + } + return f.RemoteWasDeleted +} + +func (f *File) GetFieldMappings() map[string]interface{} { + if f == nil { + return nil + } + return f.FieldMappings +} + +func (f *File) GetRemoteData() []*RemoteData { + if f == nil { + return nil + } + return f.RemoteData +} + +func (f *File) GetExtraProperties() map[string]interface{} { + return f.extraProperties +} + +func (f *File) UnmarshalJSON(data []byte) error { + type embed File + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + RemoteUpdatedAt *internal.DateTime `json:"remote_updated_at,omitempty"` + }{ + embed: embed(*f), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *f = File(unmarshaler.embed) + f.CreatedAt = unmarshaler.CreatedAt.TimePtr() + f.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + f.RemoteCreatedAt = unmarshaler.RemoteCreatedAt.TimePtr() + f.RemoteUpdatedAt = unmarshaler.RemoteUpdatedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { + return err + } + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) + return nil +} + +func (f *File) MarshalJSON() ([]byte, error) { + type embed File + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + RemoteUpdatedAt *internal.DateTime `json:"remote_updated_at,omitempty"` + }{ + embed: embed(*f), + CreatedAt: internal.NewOptionalDateTime(f.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(f.ModifiedAt), + RemoteCreatedAt: internal.NewOptionalDateTime(f.RemoteCreatedAt), + RemoteUpdatedAt: internal.NewOptionalDateTime(f.RemoteUpdatedAt), + } + return json.Marshal(marshaler) +} + +func (f *File) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(f); err == nil { + return value + } + return fmt.Sprintf("%#v", f) +} + +// The drive that the file belongs to. +type FileDrive struct { + String string + Drive *Drive + + typ string +} + +func (f *FileDrive) GetString() string { + if f == nil { + return "" + } + return f.String +} + +func (f *FileDrive) GetDrive() *Drive { + if f == nil { + return nil + } + return f.Drive +} + +func (f *FileDrive) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + f.typ = "String" + f.String = valueString + return nil + } + valueDrive := new(Drive) + if err := json.Unmarshal(data, &valueDrive); err == nil { + f.typ = "Drive" + f.Drive = valueDrive + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, f) +} + +func (f FileDrive) MarshalJSON() ([]byte, error) { + if f.typ == "String" || f.String != "" { + return json.Marshal(f.String) + } + if f.typ == "Drive" || f.Drive != nil { + return json.Marshal(f.Drive) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", f) +} + +type FileDriveVisitor interface { + VisitString(string) error + VisitDrive(*Drive) error +} + +func (f *FileDrive) Accept(visitor FileDriveVisitor) error { + if f.typ == "String" || f.String != "" { + return visitor.VisitString(f.String) + } + if f.typ == "Drive" || f.Drive != nil { + return visitor.VisitDrive(f.Drive) + } + return fmt.Errorf("type %T does not include a non-empty union type", f) +} + +// The folder that the file belongs to. +type FileFolder struct { + String string + Folder *Folder + + typ string +} + +func (f *FileFolder) GetString() string { + if f == nil { + return "" + } + return f.String +} + +func (f *FileFolder) GetFolder() *Folder { + if f == nil { + return nil + } + return f.Folder +} + +func (f *FileFolder) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + f.typ = "String" + f.String = valueString + return nil + } + valueFolder := new(Folder) + if err := json.Unmarshal(data, &valueFolder); err == nil { + f.typ = "Folder" + f.Folder = valueFolder + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, f) +} + +func (f FileFolder) MarshalJSON() ([]byte, error) { + if f.typ == "String" || f.String != "" { + return json.Marshal(f.String) + } + if f.typ == "Folder" || f.Folder != nil { + return json.Marshal(f.Folder) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", f) +} + +type FileFolderVisitor interface { + VisitString(string) error + VisitFolder(*Folder) error +} + +func (f *FileFolder) Accept(visitor FileFolderVisitor) error { + if f.typ == "String" || f.String != "" { + return visitor.VisitString(f.String) + } + if f.typ == "Folder" || f.Folder != nil { + return visitor.VisitFolder(f.Folder) + } + return fmt.Errorf("type %T does not include a non-empty union type", f) +} + +// The Permission object is used to represent a user's or group's access to a File or Folder. Permissions are unexpanded by default. Use the query param `expand=permissions` to see more details under `GET /files`. +type FilePermissions struct { + String string + Permission *Permission + FilePermissionsItemList []*FilePermissionsItem + + typ string +} + +func (f *FilePermissions) GetString() string { + if f == nil { + return "" + } + return f.String +} + +func (f *FilePermissions) GetPermission() *Permission { + if f == nil { + return nil + } + return f.Permission +} + +func (f *FilePermissions) GetFilePermissionsItemList() []*FilePermissionsItem { + if f == nil { + return nil + } + return f.FilePermissionsItemList +} + +func (f *FilePermissions) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + f.typ = "String" + f.String = valueString + return nil + } + valuePermission := new(Permission) + if err := json.Unmarshal(data, &valuePermission); err == nil { + f.typ = "Permission" + f.Permission = valuePermission + return nil + } + var valueFilePermissionsItemList []*FilePermissionsItem + if err := json.Unmarshal(data, &valueFilePermissionsItemList); err == nil { + f.typ = "FilePermissionsItemList" + f.FilePermissionsItemList = valueFilePermissionsItemList + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, f) +} + +func (f FilePermissions) MarshalJSON() ([]byte, error) { + if f.typ == "String" || f.String != "" { + return json.Marshal(f.String) + } + if f.typ == "Permission" || f.Permission != nil { + return json.Marshal(f.Permission) + } + if f.typ == "FilePermissionsItemList" || f.FilePermissionsItemList != nil { + return json.Marshal(f.FilePermissionsItemList) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", f) +} + +type FilePermissionsVisitor interface { + VisitString(string) error + VisitPermission(*Permission) error + VisitFilePermissionsItemList([]*FilePermissionsItem) error +} + +func (f *FilePermissions) Accept(visitor FilePermissionsVisitor) error { + if f.typ == "String" || f.String != "" { + return visitor.VisitString(f.String) + } + if f.typ == "Permission" || f.Permission != nil { + return visitor.VisitPermission(f.Permission) + } + if f.typ == "FilePermissionsItemList" || f.FilePermissionsItemList != nil { + return visitor.VisitFilePermissionsItemList(f.FilePermissionsItemList) + } + return fmt.Errorf("type %T does not include a non-empty union type", f) +} + +type FilePermissionsItem struct { + String string + Permission *Permission + + typ string +} + +func (f *FilePermissionsItem) GetString() string { + if f == nil { + return "" + } + return f.String +} + +func (f *FilePermissionsItem) GetPermission() *Permission { + if f == nil { + return nil + } + return f.Permission +} + +func (f *FilePermissionsItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + f.typ = "String" + f.String = valueString + return nil + } + valuePermission := new(Permission) + if err := json.Unmarshal(data, &valuePermission); err == nil { + f.typ = "Permission" + f.Permission = valuePermission + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, f) +} + +func (f FilePermissionsItem) MarshalJSON() ([]byte, error) { + if f.typ == "String" || f.String != "" { + return json.Marshal(f.String) + } + if f.typ == "Permission" || f.Permission != nil { + return json.Marshal(f.Permission) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", f) +} + +type FilePermissionsItemVisitor interface { + VisitString(string) error + VisitPermission(*Permission) error +} + +func (f *FilePermissionsItem) Accept(visitor FilePermissionsItemVisitor) error { + if f.typ == "String" || f.String != "" { + return visitor.VisitString(f.String) + } + if f.typ == "Permission" || f.Permission != nil { + return visitor.VisitPermission(f.Permission) + } + return fmt.Errorf("type %T does not include a non-empty union type", f) +} + +// # The File Object +// ### Description +// The `File` object is used to represent a file in the workspace. The Object typically exists under a folder or drive, if it exists. +// ### Usage Example +// Fetch from the `GET /api/filestorage/v1/files` endpoint and view their files. +type FileRequest struct { + // The file's name. + Name *string `json:"name,omitempty" url:"name,omitempty"` + // The URL to access the file. + FileUrl *string `json:"file_url,omitempty" url:"file_url,omitempty"` + // The URL that produces a thumbnail preview of the file. Typically an image. + FileThumbnailUrl *string `json:"file_thumbnail_url,omitempty" url:"file_thumbnail_url,omitempty"` + // The file's size, in bytes. + Size *int64 `json:"size,omitempty" url:"size,omitempty"` + // The file's mime type. + MimeType *string `json:"mime_type,omitempty" url:"mime_type,omitempty"` + // The file's description. + Description *string `json:"description,omitempty" url:"description,omitempty"` + // The folder that the file belongs to. + Folder *FileRequestFolder `json:"folder,omitempty" url:"folder,omitempty"` + // This field stores file checksum data. 'type' indicates the algorithm (e.g. crc_32, sha1, sha256, quickXor, or md5), and 'content_hash' is the unique hash used to verify file integrity and detect alterations. + Checksum map[string]interface{} `json:"checksum,omitempty" url:"checksum,omitempty"` + // The Permission object is used to represent a user's or group's access to a File or Folder. Permissions are unexpanded by default. Use the query param `expand=permissions` to see more details under `GET /files`. + Permissions *FileRequestPermissions `json:"permissions,omitempty" url:"permissions,omitempty"` + // The drive that the file belongs to. + Drive *FileRequestDrive `json:"drive,omitempty" url:"drive,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (f *FileRequest) GetName() *string { + if f == nil { + return nil + } + return f.Name +} + +func (f *FileRequest) GetFileUrl() *string { + if f == nil { + return nil + } + return f.FileUrl +} + +func (f *FileRequest) GetFileThumbnailUrl() *string { + if f == nil { + return nil + } + return f.FileThumbnailUrl +} + +func (f *FileRequest) GetSize() *int64 { + if f == nil { + return nil + } + return f.Size +} + +func (f *FileRequest) GetMimeType() *string { + if f == nil { + return nil + } + return f.MimeType +} + +func (f *FileRequest) GetDescription() *string { + if f == nil { + return nil + } + return f.Description +} + +func (f *FileRequest) GetFolder() *FileRequestFolder { + if f == nil { + return nil + } + return f.Folder +} + +func (f *FileRequest) GetChecksum() map[string]interface{} { + if f == nil { + return nil + } + return f.Checksum +} + +func (f *FileRequest) GetPermissions() *FileRequestPermissions { + if f == nil { + return nil + } + return f.Permissions +} + +func (f *FileRequest) GetDrive() *FileRequestDrive { + if f == nil { + return nil + } + return f.Drive +} + +func (f *FileRequest) GetIntegrationParams() map[string]interface{} { + if f == nil { + return nil + } + return f.IntegrationParams +} + +func (f *FileRequest) GetLinkedAccountParams() map[string]interface{} { + if f == nil { + return nil + } + return f.LinkedAccountParams +} + +func (f *FileRequest) GetExtraProperties() map[string]interface{} { + return f.extraProperties +} + +func (f *FileRequest) UnmarshalJSON(data []byte) error { + type unmarshaler FileRequest + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *f = FileRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { + return err + } + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) + return nil +} + +func (f *FileRequest) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(f); err == nil { + return value + } + return fmt.Sprintf("%#v", f) +} + +// The drive that the file belongs to. +type FileRequestDrive struct { + String string + Drive *Drive + + typ string +} + +func (f *FileRequestDrive) GetString() string { + if f == nil { + return "" + } + return f.String +} + +func (f *FileRequestDrive) GetDrive() *Drive { + if f == nil { + return nil + } + return f.Drive +} + +func (f *FileRequestDrive) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + f.typ = "String" + f.String = valueString + return nil + } + valueDrive := new(Drive) + if err := json.Unmarshal(data, &valueDrive); err == nil { + f.typ = "Drive" + f.Drive = valueDrive + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, f) +} + +func (f FileRequestDrive) MarshalJSON() ([]byte, error) { + if f.typ == "String" || f.String != "" { + return json.Marshal(f.String) + } + if f.typ == "Drive" || f.Drive != nil { + return json.Marshal(f.Drive) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", f) +} + +type FileRequestDriveVisitor interface { + VisitString(string) error + VisitDrive(*Drive) error +} + +func (f *FileRequestDrive) Accept(visitor FileRequestDriveVisitor) error { + if f.typ == "String" || f.String != "" { + return visitor.VisitString(f.String) + } + if f.typ == "Drive" || f.Drive != nil { + return visitor.VisitDrive(f.Drive) + } + return fmt.Errorf("type %T does not include a non-empty union type", f) +} + +// The folder that the file belongs to. +type FileRequestFolder struct { + String string + Folder *Folder + + typ string +} + +func (f *FileRequestFolder) GetString() string { + if f == nil { + return "" + } + return f.String +} + +func (f *FileRequestFolder) GetFolder() *Folder { + if f == nil { + return nil + } + return f.Folder +} + +func (f *FileRequestFolder) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + f.typ = "String" + f.String = valueString + return nil + } + valueFolder := new(Folder) + if err := json.Unmarshal(data, &valueFolder); err == nil { + f.typ = "Folder" + f.Folder = valueFolder + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, f) +} + +func (f FileRequestFolder) MarshalJSON() ([]byte, error) { + if f.typ == "String" || f.String != "" { + return json.Marshal(f.String) + } + if f.typ == "Folder" || f.Folder != nil { + return json.Marshal(f.Folder) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", f) +} + +type FileRequestFolderVisitor interface { + VisitString(string) error + VisitFolder(*Folder) error +} + +func (f *FileRequestFolder) Accept(visitor FileRequestFolderVisitor) error { + if f.typ == "String" || f.String != "" { + return visitor.VisitString(f.String) + } + if f.typ == "Folder" || f.Folder != nil { + return visitor.VisitFolder(f.Folder) + } + return fmt.Errorf("type %T does not include a non-empty union type", f) +} + +// The Permission object is used to represent a user's or group's access to a File or Folder. Permissions are unexpanded by default. Use the query param `expand=permissions` to see more details under `GET /files`. +type FileRequestPermissions struct { + String string + PermissionRequest *PermissionRequest + FileRequestPermissionsItemList []*FileRequestPermissionsItem + + typ string +} + +func (f *FileRequestPermissions) GetString() string { + if f == nil { + return "" + } + return f.String +} + +func (f *FileRequestPermissions) GetPermissionRequest() *PermissionRequest { + if f == nil { + return nil + } + return f.PermissionRequest +} + +func (f *FileRequestPermissions) GetFileRequestPermissionsItemList() []*FileRequestPermissionsItem { + if f == nil { + return nil + } + return f.FileRequestPermissionsItemList +} + +func (f *FileRequestPermissions) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + f.typ = "String" + f.String = valueString + return nil + } + valuePermissionRequest := new(PermissionRequest) + if err := json.Unmarshal(data, &valuePermissionRequest); err == nil { + f.typ = "PermissionRequest" + f.PermissionRequest = valuePermissionRequest + return nil + } + var valueFileRequestPermissionsItemList []*FileRequestPermissionsItem + if err := json.Unmarshal(data, &valueFileRequestPermissionsItemList); err == nil { + f.typ = "FileRequestPermissionsItemList" + f.FileRequestPermissionsItemList = valueFileRequestPermissionsItemList + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, f) +} + +func (f FileRequestPermissions) MarshalJSON() ([]byte, error) { + if f.typ == "String" || f.String != "" { + return json.Marshal(f.String) + } + if f.typ == "PermissionRequest" || f.PermissionRequest != nil { + return json.Marshal(f.PermissionRequest) + } + if f.typ == "FileRequestPermissionsItemList" || f.FileRequestPermissionsItemList != nil { + return json.Marshal(f.FileRequestPermissionsItemList) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", f) +} + +type FileRequestPermissionsVisitor interface { + VisitString(string) error + VisitPermissionRequest(*PermissionRequest) error + VisitFileRequestPermissionsItemList([]*FileRequestPermissionsItem) error +} + +func (f *FileRequestPermissions) Accept(visitor FileRequestPermissionsVisitor) error { + if f.typ == "String" || f.String != "" { + return visitor.VisitString(f.String) + } + if f.typ == "PermissionRequest" || f.PermissionRequest != nil { + return visitor.VisitPermissionRequest(f.PermissionRequest) + } + if f.typ == "FileRequestPermissionsItemList" || f.FileRequestPermissionsItemList != nil { + return visitor.VisitFileRequestPermissionsItemList(f.FileRequestPermissionsItemList) + } + return fmt.Errorf("type %T does not include a non-empty union type", f) +} + +type FileRequestPermissionsItem struct { + String string + PermissionRequest *PermissionRequest + + typ string +} + +func (f *FileRequestPermissionsItem) GetString() string { + if f == nil { + return "" + } + return f.String +} + +func (f *FileRequestPermissionsItem) GetPermissionRequest() *PermissionRequest { + if f == nil { + return nil + } + return f.PermissionRequest +} + +func (f *FileRequestPermissionsItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + f.typ = "String" + f.String = valueString + return nil + } + valuePermissionRequest := new(PermissionRequest) + if err := json.Unmarshal(data, &valuePermissionRequest); err == nil { + f.typ = "PermissionRequest" + f.PermissionRequest = valuePermissionRequest + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, f) +} + +func (f FileRequestPermissionsItem) MarshalJSON() ([]byte, error) { + if f.typ == "String" || f.String != "" { + return json.Marshal(f.String) + } + if f.typ == "PermissionRequest" || f.PermissionRequest != nil { + return json.Marshal(f.PermissionRequest) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", f) +} + +type FileRequestPermissionsItemVisitor interface { + VisitString(string) error + VisitPermissionRequest(*PermissionRequest) error +} + +func (f *FileRequestPermissionsItem) Accept(visitor FileRequestPermissionsItemVisitor) error { + if f.typ == "String" || f.String != "" { + return visitor.VisitString(f.String) + } + if f.typ == "PermissionRequest" || f.PermissionRequest != nil { + return visitor.VisitPermissionRequest(f.PermissionRequest) + } + return fmt.Errorf("type %T does not include a non-empty union type", f) +} + +type FileStorageFileResponse struct { + Model *File `json:"model" url:"model"` + Warnings []*WarningValidationProblem `json:"warnings" url:"warnings"` + Errors []*ErrorValidationProblem `json:"errors" url:"errors"` + Logs []*DebugModeLog `json:"logs,omitempty" url:"logs,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (f *FileStorageFileResponse) GetModel() *File { + if f == nil { + return nil + } + return f.Model +} + +func (f *FileStorageFileResponse) GetWarnings() []*WarningValidationProblem { + if f == nil { + return nil + } + return f.Warnings +} + +func (f *FileStorageFileResponse) GetErrors() []*ErrorValidationProblem { + if f == nil { + return nil + } + return f.Errors +} + +func (f *FileStorageFileResponse) GetLogs() []*DebugModeLog { + if f == nil { + return nil + } + return f.Logs +} + +func (f *FileStorageFileResponse) GetExtraProperties() map[string]interface{} { + return f.extraProperties +} + +func (f *FileStorageFileResponse) UnmarshalJSON(data []byte) error { + type unmarshaler FileStorageFileResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *f = FileStorageFileResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { + return err + } + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) + return nil +} + +func (f *FileStorageFileResponse) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(f); err == nil { + return value + } + return fmt.Sprintf("%#v", f) +} + +type PaginatedDownloadRequestMetaList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*DownloadRequestMeta `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedDownloadRequestMetaList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedDownloadRequestMetaList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedDownloadRequestMetaList) GetResults() []*DownloadRequestMeta { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedDownloadRequestMetaList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedDownloadRequestMetaList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedDownloadRequestMetaList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedDownloadRequestMetaList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedDownloadRequestMetaList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +type PaginatedFileList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*File `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedFileList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedFileList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedFileList) GetResults() []*File { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedFileList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedFileList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedFileList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedFileList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedFileList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} diff --git a/filestorage/files/client.go b/filestorage/files/client.go index bd9bc58..73b3ba4 100644 --- a/filestorage/files/client.go +++ b/filestorage/files/client.go @@ -1,4 +1,4 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package files @@ -6,98 +6,132 @@ import ( bytes "bytes" context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - filestorage "github.com/merge-api/merge-go-client/filestorage" + core "github.com/merge-api/merge-go-client/v2/core" + filestorage "github.com/merge-api/merge-go-client/v2/filestorage" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" io "io" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `File` objects. -func (c *Client) List(ctx context.Context, request *filestorage.FilesListRequest) (*filestorage.PaginatedFileList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL +func (c *Client) List( + ctx context.Context, + request *filestorage.FilesListRequest, + opts ...option.RequestOption, +) (*core.Page[*filestorage.File], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/filestorage/v1/files" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } - endpointURL := baseURL + "/" + "filestorage/v1/files" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) - queryParams := make(url.Values) - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.DriveId != nil { - queryParams.Add("drive_id", fmt.Sprintf("%v", *request.DriveId)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.FolderId != nil { - queryParams.Add("folder_id", fmt.Sprintf("%v", *request.FolderId)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.MimeType != nil { - queryParams.Add("mime_type", fmt.Sprintf("%v", *request.MimeType)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.Name != nil { - queryParams.Add("name", fmt.Sprintf("%v", *request.Name)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *filestorage.PaginatedFileList) *internal.PageResponse[*string, *filestorage.File] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *filestorage.File]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) +} + +// Creates a `File` object with the given values. +func (c *Client) Create( + ctx context.Context, + request *filestorage.FileStorageFileEndpointRequest, + opts ...option.RequestOption, +) (*filestorage.FileStorageFileResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/filestorage/v1/files" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") - var response *filestorage.PaginatedFileList + var response *filestorage.FileStorageFileResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -105,34 +139,47 @@ func (c *Client) List(ctx context.Context, request *filestorage.FilesListRequest return response, nil } -// Creates a `File` object with the given values. -func (c *Client) Create(ctx context.Context, request *filestorage.FileStorageFileEndpointRequest) (*filestorage.FileStorageFileResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "filestorage/v1/files" - - queryParams := make(url.Values) - if request.IsDebugMode != nil { - queryParams.Add("is_debug_mode", fmt.Sprintf("%v", *request.IsDebugMode)) - } - if request.RunAsync != nil { - queryParams.Add("run_async", fmt.Sprintf("%v", *request.RunAsync)) +// Returns a `File` object with the given `id`. +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *filestorage.FilesRetrieveRequest, + opts ...option.RequestOption, +) (*filestorage.File, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/filestorage/v1/files/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) - var response *filestorage.FileStorageFileResponse + var response *filestorage.File if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -140,33 +187,47 @@ func (c *Client) Create(ctx context.Context, request *filestorage.FileStorageFil return response, nil } -// Returns a `File` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *filestorage.FilesRetrieveRequest) (*filestorage.File, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"filestorage/v1/files/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) +// Returns the `File` content with the given `id` as a stream of bytes. +func (c *Client) DownloadRetrieve( + ctx context.Context, + id string, + request *filestorage.FilesDownloadRetrieveRequest, + opts ...option.RequestOption, +) (io.Reader, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/filestorage/v1/files/%v/download", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) - var response *filestorage.File + response := bytes.NewBuffer(nil) if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: response, }, ); err != nil { return nil, err @@ -174,30 +235,47 @@ func (c *Client) Retrieve(ctx context.Context, id string, request *filestorage.F return response, nil } -// Returns the `File` content with the given `id` as a stream of bytes. -func (c *Client) DownloadRetrieve(ctx context.Context, id string, request *filestorage.FilesDownloadRetrieveRequest) (io.Reader, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"filestorage/v1/files/%v/download", id) - - queryParams := make(url.Values) - if request.MimeType != nil { - queryParams.Add("mime_type", fmt.Sprintf("%v", *request.MimeType)) +// Returns metadata to construct an authenticated file download request for a singular file, allowing you to download file directly from the third-party. +func (c *Client) DownloadRequestMetaRetrieve( + ctx context.Context, + id string, + request *filestorage.FilesDownloadRequestMetaRetrieveRequest, + opts ...option.RequestOption, +) (*filestorage.DownloadRequestMeta, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/filestorage/v1/files/%v/download/request-meta", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) - response := bytes.NewBuffer(nil) + var response *filestorage.DownloadRequestMeta if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -205,22 +283,94 @@ func (c *Client) DownloadRetrieve(ctx context.Context, id string, request *files return response, nil } -// Returns metadata for `FileStorageFile` POSTs. -func (c *Client) MetaPostRetrieve(ctx context.Context) (*filestorage.MetaResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL +// Returns metadata to construct authenticated file download requests, allowing you to download files directly from the third-party. +func (c *Client) DownloadRequestMetaList( + ctx context.Context, + request *filestorage.FilesDownloadRequestMetaListRequest, + opts ...option.RequestOption, +) (*core.Page[*filestorage.DownloadRequestMeta], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/filestorage/v1/files/download/request-meta" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } - endpointURL := baseURL + "/" + "filestorage/v1/files/meta/post" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *filestorage.PaginatedDownloadRequestMetaList) *internal.PageResponse[*string, *filestorage.DownloadRequestMeta] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *filestorage.DownloadRequestMeta]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) +} + +// Returns metadata for `FileStorageFile` POSTs. +func (c *Client) MetaPostRetrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*filestorage.MetaResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/filestorage/v1/files/meta/post" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *filestorage.MetaResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/filestorage/folders.go b/filestorage/folders.go index 3231490..f8e7cdf 100644 --- a/filestorage/folders.go +++ b/filestorage/folders.go @@ -1,128 +1,634 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package filestorage import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type FileStorageFolderEndpointRequest struct { // Whether to include debug fields (such as log file links) in the response. - IsDebugMode *bool `json:"-"` + IsDebugMode *bool `json:"-" url:"is_debug_mode,omitempty"` // Whether or not third-party updates should be run asynchronously. - RunAsync *bool `json:"-"` - Model *FolderRequest `json:"model,omitempty"` + RunAsync *bool `json:"-" url:"run_async,omitempty"` + Model *FolderRequest `json:"model,omitempty" url:"-"` } type FoldersListRequest struct { // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // If provided, will only return folders in this drive. - DriveId *string `json:"-"` + DriveId *string `json:"-" url:"drive_id,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *FoldersListRequestExpand `json:"-"` + Expand []*FoldersListRequestExpandItem `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // If provided, will only return folders with this name. This performs an exact match. - Name *string `json:"-"` + Name *string `json:"-" url:"name,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // If provided, will only return folders in this parent folder. If null, will return folders in root directory. - ParentFolderId *string `json:"-"` + ParentFolderId *string `json:"-" url:"parent_folder_id,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` } type FoldersRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *FoldersRetrieveRequestExpand `json:"-"` + Expand []*FoldersRetrieveRequestExpandItem `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` } -type FoldersListRequestExpand string +type FoldersListRequestExpandItem string const ( - FoldersListRequestExpandDrive FoldersListRequestExpand = "drive" - FoldersListRequestExpandParentFolder FoldersListRequestExpand = "parent_folder" - FoldersListRequestExpandParentFolderDrive FoldersListRequestExpand = "parent_folder,drive" - FoldersListRequestExpandPermissions FoldersListRequestExpand = "permissions" - FoldersListRequestExpandPermissionsDrive FoldersListRequestExpand = "permissions,drive" - FoldersListRequestExpandPermissionsParentFolder FoldersListRequestExpand = "permissions,parent_folder" - FoldersListRequestExpandPermissionsParentFolderDrive FoldersListRequestExpand = "permissions,parent_folder,drive" + FoldersListRequestExpandItemDrive FoldersListRequestExpandItem = "drive" + FoldersListRequestExpandItemParentFolder FoldersListRequestExpandItem = "parent_folder" + FoldersListRequestExpandItemPermissions FoldersListRequestExpandItem = "permissions" ) -func NewFoldersListRequestExpandFromString(s string) (FoldersListRequestExpand, error) { +func NewFoldersListRequestExpandItemFromString(s string) (FoldersListRequestExpandItem, error) { switch s { case "drive": - return FoldersListRequestExpandDrive, nil + return FoldersListRequestExpandItemDrive, nil case "parent_folder": - return FoldersListRequestExpandParentFolder, nil - case "parent_folder,drive": - return FoldersListRequestExpandParentFolderDrive, nil + return FoldersListRequestExpandItemParentFolder, nil case "permissions": - return FoldersListRequestExpandPermissions, nil - case "permissions,drive": - return FoldersListRequestExpandPermissionsDrive, nil - case "permissions,parent_folder": - return FoldersListRequestExpandPermissionsParentFolder, nil - case "permissions,parent_folder,drive": - return FoldersListRequestExpandPermissionsParentFolderDrive, nil - } - var t FoldersListRequestExpand + return FoldersListRequestExpandItemPermissions, nil + } + var t FoldersListRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (f FoldersListRequestExpand) Ptr() *FoldersListRequestExpand { +func (f FoldersListRequestExpandItem) Ptr() *FoldersListRequestExpandItem { return &f } -type FoldersRetrieveRequestExpand string +type FoldersRetrieveRequestExpandItem string const ( - FoldersRetrieveRequestExpandDrive FoldersRetrieveRequestExpand = "drive" - FoldersRetrieveRequestExpandParentFolder FoldersRetrieveRequestExpand = "parent_folder" - FoldersRetrieveRequestExpandParentFolderDrive FoldersRetrieveRequestExpand = "parent_folder,drive" - FoldersRetrieveRequestExpandPermissions FoldersRetrieveRequestExpand = "permissions" - FoldersRetrieveRequestExpandPermissionsDrive FoldersRetrieveRequestExpand = "permissions,drive" - FoldersRetrieveRequestExpandPermissionsParentFolder FoldersRetrieveRequestExpand = "permissions,parent_folder" - FoldersRetrieveRequestExpandPermissionsParentFolderDrive FoldersRetrieveRequestExpand = "permissions,parent_folder,drive" + FoldersRetrieveRequestExpandItemDrive FoldersRetrieveRequestExpandItem = "drive" + FoldersRetrieveRequestExpandItemParentFolder FoldersRetrieveRequestExpandItem = "parent_folder" + FoldersRetrieveRequestExpandItemPermissions FoldersRetrieveRequestExpandItem = "permissions" ) -func NewFoldersRetrieveRequestExpandFromString(s string) (FoldersRetrieveRequestExpand, error) { +func NewFoldersRetrieveRequestExpandItemFromString(s string) (FoldersRetrieveRequestExpandItem, error) { switch s { case "drive": - return FoldersRetrieveRequestExpandDrive, nil + return FoldersRetrieveRequestExpandItemDrive, nil case "parent_folder": - return FoldersRetrieveRequestExpandParentFolder, nil - case "parent_folder,drive": - return FoldersRetrieveRequestExpandParentFolderDrive, nil + return FoldersRetrieveRequestExpandItemParentFolder, nil case "permissions": - return FoldersRetrieveRequestExpandPermissions, nil - case "permissions,drive": - return FoldersRetrieveRequestExpandPermissionsDrive, nil - case "permissions,parent_folder": - return FoldersRetrieveRequestExpandPermissionsParentFolder, nil - case "permissions,parent_folder,drive": - return FoldersRetrieveRequestExpandPermissionsParentFolderDrive, nil - } - var t FoldersRetrieveRequestExpand + return FoldersRetrieveRequestExpandItemPermissions, nil + } + var t FoldersRetrieveRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (f FoldersRetrieveRequestExpand) Ptr() *FoldersRetrieveRequestExpand { +func (f FoldersRetrieveRequestExpandItem) Ptr() *FoldersRetrieveRequestExpandItem { return &f } + +type FileStorageFolderResponse struct { + Model *Folder `json:"model" url:"model"` + Warnings []*WarningValidationProblem `json:"warnings" url:"warnings"` + Errors []*ErrorValidationProblem `json:"errors" url:"errors"` + Logs []*DebugModeLog `json:"logs,omitempty" url:"logs,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (f *FileStorageFolderResponse) GetModel() *Folder { + if f == nil { + return nil + } + return f.Model +} + +func (f *FileStorageFolderResponse) GetWarnings() []*WarningValidationProblem { + if f == nil { + return nil + } + return f.Warnings +} + +func (f *FileStorageFolderResponse) GetErrors() []*ErrorValidationProblem { + if f == nil { + return nil + } + return f.Errors +} + +func (f *FileStorageFolderResponse) GetLogs() []*DebugModeLog { + if f == nil { + return nil + } + return f.Logs +} + +func (f *FileStorageFolderResponse) GetExtraProperties() map[string]interface{} { + return f.extraProperties +} + +func (f *FileStorageFolderResponse) UnmarshalJSON(data []byte) error { + type unmarshaler FileStorageFolderResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *f = FileStorageFolderResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { + return err + } + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) + return nil +} + +func (f *FileStorageFolderResponse) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(f); err == nil { + return value + } + return fmt.Sprintf("%#v", f) +} + +// # The Folder Object +// ### Description +// The `Folder` object is used to represent a collection of files and/or folders in the workspace. Could be within a drive, if it exists. +// ### Usage Example +// Fetch from the `GET /api/filestorage/v1/folders` endpoint and view their folders. +type FolderRequest struct { + // The folder's name. + Name *string `json:"name,omitempty" url:"name,omitempty"` + // The URL to access the folder. + FolderUrl *string `json:"folder_url,omitempty" url:"folder_url,omitempty"` + // The folder's size, in bytes. + Size *int64 `json:"size,omitempty" url:"size,omitempty"` + // The folder's description. + Description *string `json:"description,omitempty" url:"description,omitempty"` + // The folder that the folder belongs to. + ParentFolder *FolderRequestParentFolder `json:"parent_folder,omitempty" url:"parent_folder,omitempty"` + // The drive that the folder belongs to. + Drive *FolderRequestDrive `json:"drive,omitempty" url:"drive,omitempty"` + // The Permission object is used to represent a user's or group's access to a File or Folder. Permissions are unexpanded by default. Use the query param `expand=permissions` to see more details under `GET /folders`. + Permissions *FolderRequestPermissions `json:"permissions,omitempty" url:"permissions,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (f *FolderRequest) GetName() *string { + if f == nil { + return nil + } + return f.Name +} + +func (f *FolderRequest) GetFolderUrl() *string { + if f == nil { + return nil + } + return f.FolderUrl +} + +func (f *FolderRequest) GetSize() *int64 { + if f == nil { + return nil + } + return f.Size +} + +func (f *FolderRequest) GetDescription() *string { + if f == nil { + return nil + } + return f.Description +} + +func (f *FolderRequest) GetParentFolder() *FolderRequestParentFolder { + if f == nil { + return nil + } + return f.ParentFolder +} + +func (f *FolderRequest) GetDrive() *FolderRequestDrive { + if f == nil { + return nil + } + return f.Drive +} + +func (f *FolderRequest) GetPermissions() *FolderRequestPermissions { + if f == nil { + return nil + } + return f.Permissions +} + +func (f *FolderRequest) GetIntegrationParams() map[string]interface{} { + if f == nil { + return nil + } + return f.IntegrationParams +} + +func (f *FolderRequest) GetLinkedAccountParams() map[string]interface{} { + if f == nil { + return nil + } + return f.LinkedAccountParams +} + +func (f *FolderRequest) GetExtraProperties() map[string]interface{} { + return f.extraProperties +} + +func (f *FolderRequest) UnmarshalJSON(data []byte) error { + type unmarshaler FolderRequest + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *f = FolderRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { + return err + } + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) + return nil +} + +func (f *FolderRequest) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(f); err == nil { + return value + } + return fmt.Sprintf("%#v", f) +} + +// The drive that the folder belongs to. +type FolderRequestDrive struct { + String string + Drive *Drive + + typ string +} + +func (f *FolderRequestDrive) GetString() string { + if f == nil { + return "" + } + return f.String +} + +func (f *FolderRequestDrive) GetDrive() *Drive { + if f == nil { + return nil + } + return f.Drive +} + +func (f *FolderRequestDrive) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + f.typ = "String" + f.String = valueString + return nil + } + valueDrive := new(Drive) + if err := json.Unmarshal(data, &valueDrive); err == nil { + f.typ = "Drive" + f.Drive = valueDrive + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, f) +} + +func (f FolderRequestDrive) MarshalJSON() ([]byte, error) { + if f.typ == "String" || f.String != "" { + return json.Marshal(f.String) + } + if f.typ == "Drive" || f.Drive != nil { + return json.Marshal(f.Drive) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", f) +} + +type FolderRequestDriveVisitor interface { + VisitString(string) error + VisitDrive(*Drive) error +} + +func (f *FolderRequestDrive) Accept(visitor FolderRequestDriveVisitor) error { + if f.typ == "String" || f.String != "" { + return visitor.VisitString(f.String) + } + if f.typ == "Drive" || f.Drive != nil { + return visitor.VisitDrive(f.Drive) + } + return fmt.Errorf("type %T does not include a non-empty union type", f) +} + +// The folder that the folder belongs to. +type FolderRequestParentFolder struct { + String string + Folder *Folder + + typ string +} + +func (f *FolderRequestParentFolder) GetString() string { + if f == nil { + return "" + } + return f.String +} + +func (f *FolderRequestParentFolder) GetFolder() *Folder { + if f == nil { + return nil + } + return f.Folder +} + +func (f *FolderRequestParentFolder) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + f.typ = "String" + f.String = valueString + return nil + } + valueFolder := new(Folder) + if err := json.Unmarshal(data, &valueFolder); err == nil { + f.typ = "Folder" + f.Folder = valueFolder + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, f) +} + +func (f FolderRequestParentFolder) MarshalJSON() ([]byte, error) { + if f.typ == "String" || f.String != "" { + return json.Marshal(f.String) + } + if f.typ == "Folder" || f.Folder != nil { + return json.Marshal(f.Folder) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", f) +} + +type FolderRequestParentFolderVisitor interface { + VisitString(string) error + VisitFolder(*Folder) error +} + +func (f *FolderRequestParentFolder) Accept(visitor FolderRequestParentFolderVisitor) error { + if f.typ == "String" || f.String != "" { + return visitor.VisitString(f.String) + } + if f.typ == "Folder" || f.Folder != nil { + return visitor.VisitFolder(f.Folder) + } + return fmt.Errorf("type %T does not include a non-empty union type", f) +} + +// The Permission object is used to represent a user's or group's access to a File or Folder. Permissions are unexpanded by default. Use the query param `expand=permissions` to see more details under `GET /folders`. +type FolderRequestPermissions struct { + String string + PermissionRequest *PermissionRequest + FolderRequestPermissionsItemList []*FolderRequestPermissionsItem + + typ string +} + +func (f *FolderRequestPermissions) GetString() string { + if f == nil { + return "" + } + return f.String +} + +func (f *FolderRequestPermissions) GetPermissionRequest() *PermissionRequest { + if f == nil { + return nil + } + return f.PermissionRequest +} + +func (f *FolderRequestPermissions) GetFolderRequestPermissionsItemList() []*FolderRequestPermissionsItem { + if f == nil { + return nil + } + return f.FolderRequestPermissionsItemList +} + +func (f *FolderRequestPermissions) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + f.typ = "String" + f.String = valueString + return nil + } + valuePermissionRequest := new(PermissionRequest) + if err := json.Unmarshal(data, &valuePermissionRequest); err == nil { + f.typ = "PermissionRequest" + f.PermissionRequest = valuePermissionRequest + return nil + } + var valueFolderRequestPermissionsItemList []*FolderRequestPermissionsItem + if err := json.Unmarshal(data, &valueFolderRequestPermissionsItemList); err == nil { + f.typ = "FolderRequestPermissionsItemList" + f.FolderRequestPermissionsItemList = valueFolderRequestPermissionsItemList + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, f) +} + +func (f FolderRequestPermissions) MarshalJSON() ([]byte, error) { + if f.typ == "String" || f.String != "" { + return json.Marshal(f.String) + } + if f.typ == "PermissionRequest" || f.PermissionRequest != nil { + return json.Marshal(f.PermissionRequest) + } + if f.typ == "FolderRequestPermissionsItemList" || f.FolderRequestPermissionsItemList != nil { + return json.Marshal(f.FolderRequestPermissionsItemList) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", f) +} + +type FolderRequestPermissionsVisitor interface { + VisitString(string) error + VisitPermissionRequest(*PermissionRequest) error + VisitFolderRequestPermissionsItemList([]*FolderRequestPermissionsItem) error +} + +func (f *FolderRequestPermissions) Accept(visitor FolderRequestPermissionsVisitor) error { + if f.typ == "String" || f.String != "" { + return visitor.VisitString(f.String) + } + if f.typ == "PermissionRequest" || f.PermissionRequest != nil { + return visitor.VisitPermissionRequest(f.PermissionRequest) + } + if f.typ == "FolderRequestPermissionsItemList" || f.FolderRequestPermissionsItemList != nil { + return visitor.VisitFolderRequestPermissionsItemList(f.FolderRequestPermissionsItemList) + } + return fmt.Errorf("type %T does not include a non-empty union type", f) +} + +type FolderRequestPermissionsItem struct { + String string + PermissionRequest *PermissionRequest + + typ string +} + +func (f *FolderRequestPermissionsItem) GetString() string { + if f == nil { + return "" + } + return f.String +} + +func (f *FolderRequestPermissionsItem) GetPermissionRequest() *PermissionRequest { + if f == nil { + return nil + } + return f.PermissionRequest +} + +func (f *FolderRequestPermissionsItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + f.typ = "String" + f.String = valueString + return nil + } + valuePermissionRequest := new(PermissionRequest) + if err := json.Unmarshal(data, &valuePermissionRequest); err == nil { + f.typ = "PermissionRequest" + f.PermissionRequest = valuePermissionRequest + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, f) +} + +func (f FolderRequestPermissionsItem) MarshalJSON() ([]byte, error) { + if f.typ == "String" || f.String != "" { + return json.Marshal(f.String) + } + if f.typ == "PermissionRequest" || f.PermissionRequest != nil { + return json.Marshal(f.PermissionRequest) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", f) +} + +type FolderRequestPermissionsItemVisitor interface { + VisitString(string) error + VisitPermissionRequest(*PermissionRequest) error +} + +func (f *FolderRequestPermissionsItem) Accept(visitor FolderRequestPermissionsItemVisitor) error { + if f.typ == "String" || f.String != "" { + return visitor.VisitString(f.String) + } + if f.typ == "PermissionRequest" || f.PermissionRequest != nil { + return visitor.VisitPermissionRequest(f.PermissionRequest) + } + return fmt.Errorf("type %T does not include a non-empty union type", f) +} + +type PaginatedFolderList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Folder `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedFolderList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedFolderList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedFolderList) GetResults() []*Folder { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedFolderList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedFolderList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedFolderList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedFolderList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedFolderList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} diff --git a/filestorage/folders/client.go b/filestorage/folders/client.go index 3f5a2c4..e7eb7cc 100644 --- a/filestorage/folders/client.go +++ b/filestorage/folders/client.go @@ -1,133 +1,135 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package folders import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - filestorage "github.com/merge-api/merge-go-client/filestorage" + core "github.com/merge-api/merge-go-client/v2/core" + filestorage "github.com/merge-api/merge-go-client/v2/filestorage" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `Folder` objects. -func (c *Client) List(ctx context.Context, request *filestorage.FoldersListRequest) (*filestorage.PaginatedFolderList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "filestorage/v1/folders" - - queryParams := make(url.Values) - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.DriveId != nil { - queryParams.Add("drive_id", fmt.Sprintf("%v", *request.DriveId)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.Name != nil { - queryParams.Add("name", fmt.Sprintf("%v", *request.Name)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.ParentFolderId != nil { - queryParams.Add("parent_folder_id", fmt.Sprintf("%v", *request.ParentFolderId)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *filestorage.PaginatedFolderList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *filestorage.FoldersListRequest, + opts ...option.RequestOption, +) (*core.Page[*filestorage.Folder], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/filestorage/v1/folders" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *filestorage.PaginatedFolderList) *internal.PageResponse[*string, *filestorage.Folder] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *filestorage.Folder]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Creates a `Folder` object with the given values. -func (c *Client) Create(ctx context.Context, request *filestorage.FileStorageFolderEndpointRequest) (*filestorage.FileStorageFolderResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "filestorage/v1/folders" - - queryParams := make(url.Values) - if request.IsDebugMode != nil { - queryParams.Add("is_debug_mode", fmt.Sprintf("%v", *request.IsDebugMode)) - } - if request.RunAsync != nil { - queryParams.Add("run_async", fmt.Sprintf("%v", *request.RunAsync)) +func (c *Client) Create( + ctx context.Context, + request *filestorage.FileStorageFolderEndpointRequest, + opts ...option.RequestOption, +) (*filestorage.FileStorageFolderResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/filestorage/v1/folders" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *filestorage.FileStorageFolderResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -136,32 +138,46 @@ func (c *Client) Create(ctx context.Context, request *filestorage.FileStorageFol } // Returns a `Folder` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *filestorage.FoldersRetrieveRequest) (*filestorage.Folder, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"filestorage/v1/folders/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *filestorage.FoldersRetrieveRequest, + opts ...option.RequestOption, +) (*filestorage.Folder, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/filestorage/v1/folders/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *filestorage.Folder if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -170,21 +186,34 @@ func (c *Client) Retrieve(ctx context.Context, id string, request *filestorage.F } // Returns metadata for `FileStorageFolder` POSTs. -func (c *Client) MetaPostRetrieve(ctx context.Context) (*filestorage.MetaResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "filestorage/v1/folders/meta/post" +func (c *Client) MetaPostRetrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*filestorage.MetaResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/filestorage/v1/folders/meta/post" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *filestorage.MetaResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/filestorage/forceresync/client.go b/filestorage/forceresync/client.go index 2bb6232..f987f79 100644 --- a/filestorage/forceresync/client.go +++ b/filestorage/forceresync/client.go @@ -1,48 +1,65 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package forceresync import ( context "context" - core "github.com/merge-api/merge-go-client/core" - filestorage "github.com/merge-api/merge-go-client/filestorage" + core "github.com/merge-api/merge-go-client/v2/core" + filestorage "github.com/merge-api/merge-go-client/v2/filestorage" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } -// Force re-sync of all models. This is available for all organizations via the dashboard. Force re-sync is also available programmatically via API for monthly, quarterly, and highest sync frequency customers on the Professional or Enterprise plans. Doing so will consume a sync credit for the relevant linked account. -func (c *Client) SyncStatusResyncCreate(ctx context.Context) ([]*filestorage.SyncStatus, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "filestorage/v1/sync-status/resync" +// Force re-sync of all models. This endpoint is available for monthly, quarterly, and highest sync frequency customers on the Professional or Enterprise plans. Doing so will consume a sync credit for the relevant linked account. Force re-syncs can also be triggered manually in the Merge Dashboard and is available for all customers. +func (c *Client) SyncStatusResyncCreate( + ctx context.Context, + opts ...option.RequestOption, +) ([]*filestorage.SyncStatus, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/filestorage/v1/sync-status/resync" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response []*filestorage.SyncStatus if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/filestorage/generate_key.go b/filestorage/generate_key.go index edf19d2..de5834b 100644 --- a/filestorage/generate_key.go +++ b/filestorage/generate_key.go @@ -1,8 +1,8 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package filestorage type GenerateRemoteKeyRequest struct { // The name of the remote key - Name string `json:"name"` + Name string `json:"name" url:"-"` } diff --git a/filestorage/generatekey/client.go b/filestorage/generatekey/client.go index f3cc1f5..f99069b 100644 --- a/filestorage/generatekey/client.go +++ b/filestorage/generatekey/client.go @@ -1,49 +1,68 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package generatekey import ( context "context" - core "github.com/merge-api/merge-go-client/core" - filestorage "github.com/merge-api/merge-go-client/filestorage" + core "github.com/merge-api/merge-go-client/v2/core" + filestorage "github.com/merge-api/merge-go-client/v2/filestorage" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Create a remote key. -func (c *Client) Create(ctx context.Context, request *filestorage.GenerateRemoteKeyRequest) (*filestorage.RemoteKey, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "filestorage/v1/generate-key" +func (c *Client) Create( + ctx context.Context, + request *filestorage.GenerateRemoteKeyRequest, + opts ...option.RequestOption, +) (*filestorage.RemoteKey, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/filestorage/v1/generate-key" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *filestorage.RemoteKey if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err diff --git a/filestorage/groups.go b/filestorage/groups.go index b6b3fd3..e4b078f 100644 --- a/filestorage/groups.go +++ b/filestorage/groups.go @@ -1,39 +1,150 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package filestorage import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type GroupsListRequest struct { // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *string `json:"-"` + Expand []*GroupsListRequestExpandItem `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` } type GroupsRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *string `json:"-"` + Expand []*GroupsRetrieveRequestExpandItem `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` +} + +type GroupsListRequestExpandItem string + +const ( + GroupsListRequestExpandItemChildGroups GroupsListRequestExpandItem = "child_groups" + GroupsListRequestExpandItemUsers GroupsListRequestExpandItem = "users" +) + +func NewGroupsListRequestExpandItemFromString(s string) (GroupsListRequestExpandItem, error) { + switch s { + case "child_groups": + return GroupsListRequestExpandItemChildGroups, nil + case "users": + return GroupsListRequestExpandItemUsers, nil + } + var t GroupsListRequestExpandItem + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (g GroupsListRequestExpandItem) Ptr() *GroupsListRequestExpandItem { + return &g +} + +type GroupsRetrieveRequestExpandItem string + +const ( + GroupsRetrieveRequestExpandItemChildGroups GroupsRetrieveRequestExpandItem = "child_groups" + GroupsRetrieveRequestExpandItemUsers GroupsRetrieveRequestExpandItem = "users" +) + +func NewGroupsRetrieveRequestExpandItemFromString(s string) (GroupsRetrieveRequestExpandItem, error) { + switch s { + case "child_groups": + return GroupsRetrieveRequestExpandItemChildGroups, nil + case "users": + return GroupsRetrieveRequestExpandItemUsers, nil + } + var t GroupsRetrieveRequestExpandItem + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (g GroupsRetrieveRequestExpandItem) Ptr() *GroupsRetrieveRequestExpandItem { + return &g +} + +type PaginatedGroupList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Group `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedGroupList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedGroupList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedGroupList) GetResults() []*Group { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedGroupList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedGroupList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedGroupList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedGroupList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedGroupList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) } diff --git a/filestorage/groups/client.go b/filestorage/groups/client.go index 51a55fa..c1e3774 100644 --- a/filestorage/groups/client.go +++ b/filestorage/groups/client.go @@ -1,123 +1,137 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package groups import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - filestorage "github.com/merge-api/merge-go-client/filestorage" + core "github.com/merge-api/merge-go-client/v2/core" + filestorage "github.com/merge-api/merge-go-client/v2/filestorage" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `Group` objects. -func (c *Client) List(ctx context.Context, request *filestorage.GroupsListRequest) (*filestorage.PaginatedGroupList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "filestorage/v1/groups" - - queryParams := make(url.Values) - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *filestorage.PaginatedGroupList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *filestorage.GroupsListRequest, + opts ...option.RequestOption, +) (*core.Page[*filestorage.Group], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/filestorage/v1/groups" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *filestorage.PaginatedGroupList) *internal.PageResponse[*string, *filestorage.Group] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *filestorage.Group]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Returns a `Group` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *filestorage.GroupsRetrieveRequest) (*filestorage.Group, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"filestorage/v1/groups/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *filestorage.GroupsRetrieveRequest, + opts ...option.RequestOption, +) (*filestorage.Group, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/filestorage/v1/groups/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *filestorage.Group if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/filestorage/issues.go b/filestorage/issues.go index d0fe24d..60cff42 100644 --- a/filestorage/issues.go +++ b/filestorage/issues.go @@ -1,41 +1,43 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package filestorage import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type IssuesListRequest struct { - AccountToken *string `json:"-"` + AccountToken *string `json:"-" url:"account_token,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // If included, will only include issues whose most recent action occurred before this time - EndDate *string `json:"-"` - EndUserOrganizationName *string `json:"-"` + EndDate *string `json:"-" url:"end_date,omitempty"` + EndUserOrganizationName *string `json:"-" url:"end_user_organization_name,omitempty"` // If provided, will only return issues whose first incident time was after this datetime. - FirstIncidentTimeAfter *time.Time `json:"-"` + FirstIncidentTimeAfter *time.Time `json:"-" url:"first_incident_time_after,omitempty"` // If provided, will only return issues whose first incident time was before this datetime. - FirstIncidentTimeBefore *time.Time `json:"-"` + FirstIncidentTimeBefore *time.Time `json:"-" url:"first_incident_time_before,omitempty"` // If true, will include muted issues - IncludeMuted *string `json:"-"` - IntegrationName *string `json:"-"` + IncludeMuted *string `json:"-" url:"include_muted,omitempty"` + IntegrationName *string `json:"-" url:"integration_name,omitempty"` // If provided, will only return issues whose last incident time was after this datetime. - LastIncidentTimeAfter *time.Time `json:"-"` + LastIncidentTimeAfter *time.Time `json:"-" url:"last_incident_time_after,omitempty"` // If provided, will only return issues whose last incident time was before this datetime. - LastIncidentTimeBefore *time.Time `json:"-"` + LastIncidentTimeBefore *time.Time `json:"-" url:"last_incident_time_before,omitempty"` // If provided, will only include issues pertaining to the linked account passed in. - LinkedAccountId *string `json:"-"` + LinkedAccountId *string `json:"-" url:"linked_account_id,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // If included, will only include issues whose most recent action occurred after this time - StartDate *string `json:"-"` + StartDate *string `json:"-" url:"start_date,omitempty"` // Status of the issue. Options: ('ONGOING', 'RESOLVED') // - // - `ONGOING` - ONGOING - // - `RESOLVED` - RESOLVED - Status *IssuesListRequestStatus `json:"-"` + // * `ONGOING` - ONGOING + // * `RESOLVED` - RESOLVED + Status *IssuesListRequestStatus `json:"-" url:"status,omitempty"` } type IssuesListRequestStatus string @@ -59,3 +61,283 @@ func NewIssuesListRequestStatusFromString(s string) (IssuesListRequestStatus, er func (i IssuesListRequestStatus) Ptr() *IssuesListRequestStatus { return &i } + +type Issue struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // Status of the issue. Options: ('ONGOING', 'RESOLVED') + // + // * `ONGOING` - ONGOING + // * `RESOLVED` - RESOLVED + Status *IssueStatus `json:"status,omitempty" url:"status,omitempty"` + ErrorDescription string `json:"error_description" url:"error_description"` + EndUser map[string]interface{} `json:"end_user,omitempty" url:"end_user,omitempty"` + FirstIncidentTime *time.Time `json:"first_incident_time,omitempty" url:"first_incident_time,omitempty"` + LastIncidentTime *time.Time `json:"last_incident_time,omitempty" url:"last_incident_time,omitempty"` + IsMuted *bool `json:"is_muted,omitempty" url:"is_muted,omitempty"` + ErrorDetails []string `json:"error_details,omitempty" url:"error_details,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (i *Issue) GetId() *string { + if i == nil { + return nil + } + return i.Id +} + +func (i *Issue) GetStatus() *IssueStatus { + if i == nil { + return nil + } + return i.Status +} + +func (i *Issue) GetErrorDescription() string { + if i == nil { + return "" + } + return i.ErrorDescription +} + +func (i *Issue) GetEndUser() map[string]interface{} { + if i == nil { + return nil + } + return i.EndUser +} + +func (i *Issue) GetFirstIncidentTime() *time.Time { + if i == nil { + return nil + } + return i.FirstIncidentTime +} + +func (i *Issue) GetLastIncidentTime() *time.Time { + if i == nil { + return nil + } + return i.LastIncidentTime +} + +func (i *Issue) GetIsMuted() *bool { + if i == nil { + return nil + } + return i.IsMuted +} + +func (i *Issue) GetErrorDetails() []string { + if i == nil { + return nil + } + return i.ErrorDetails +} + +func (i *Issue) GetExtraProperties() map[string]interface{} { + return i.extraProperties +} + +func (i *Issue) UnmarshalJSON(data []byte) error { + type embed Issue + var unmarshaler = struct { + embed + FirstIncidentTime *internal.DateTime `json:"first_incident_time,omitempty"` + LastIncidentTime *internal.DateTime `json:"last_incident_time,omitempty"` + }{ + embed: embed(*i), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *i = Issue(unmarshaler.embed) + i.FirstIncidentTime = unmarshaler.FirstIncidentTime.TimePtr() + i.LastIncidentTime = unmarshaler.LastIncidentTime.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *i) + if err != nil { + return err + } + i.extraProperties = extraProperties + i.rawJSON = json.RawMessage(data) + return nil +} + +func (i *Issue) MarshalJSON() ([]byte, error) { + type embed Issue + var marshaler = struct { + embed + FirstIncidentTime *internal.DateTime `json:"first_incident_time,omitempty"` + LastIncidentTime *internal.DateTime `json:"last_incident_time,omitempty"` + }{ + embed: embed(*i), + FirstIncidentTime: internal.NewOptionalDateTime(i.FirstIncidentTime), + LastIncidentTime: internal.NewOptionalDateTime(i.LastIncidentTime), + } + return json.Marshal(marshaler) +} + +func (i *Issue) String() string { + if len(i.rawJSON) > 0 { + if value, err := internal.StringifyJSON(i.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(i); err == nil { + return value + } + return fmt.Sprintf("%#v", i) +} + +// Status of the issue. Options: ('ONGOING', 'RESOLVED') +// +// * `ONGOING` - ONGOING +// * `RESOLVED` - RESOLVED +type IssueStatus struct { + IssueStatusEnum IssueStatusEnum + String string + + typ string +} + +func (i *IssueStatus) GetIssueStatusEnum() IssueStatusEnum { + if i == nil { + return "" + } + return i.IssueStatusEnum +} + +func (i *IssueStatus) GetString() string { + if i == nil { + return "" + } + return i.String +} + +func (i *IssueStatus) UnmarshalJSON(data []byte) error { + var valueIssueStatusEnum IssueStatusEnum + if err := json.Unmarshal(data, &valueIssueStatusEnum); err == nil { + i.typ = "IssueStatusEnum" + i.IssueStatusEnum = valueIssueStatusEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + i.typ = "String" + i.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) +} + +func (i IssueStatus) MarshalJSON() ([]byte, error) { + if i.typ == "IssueStatusEnum" || i.IssueStatusEnum != "" { + return json.Marshal(i.IssueStatusEnum) + } + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) +} + +type IssueStatusVisitor interface { + VisitIssueStatusEnum(IssueStatusEnum) error + VisitString(string) error +} + +func (i *IssueStatus) Accept(visitor IssueStatusVisitor) error { + if i.typ == "IssueStatusEnum" || i.IssueStatusEnum != "" { + return visitor.VisitIssueStatusEnum(i.IssueStatusEnum) + } + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", i) +} + +// * `ONGOING` - ONGOING +// * `RESOLVED` - RESOLVED +type IssueStatusEnum string + +const ( + IssueStatusEnumOngoing IssueStatusEnum = "ONGOING" + IssueStatusEnumResolved IssueStatusEnum = "RESOLVED" +) + +func NewIssueStatusEnumFromString(s string) (IssueStatusEnum, error) { + switch s { + case "ONGOING": + return IssueStatusEnumOngoing, nil + case "RESOLVED": + return IssueStatusEnumResolved, nil + } + var t IssueStatusEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (i IssueStatusEnum) Ptr() *IssueStatusEnum { + return &i +} + +type PaginatedIssueList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Issue `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedIssueList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedIssueList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedIssueList) GetResults() []*Issue { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedIssueList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedIssueList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedIssueList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedIssueList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedIssueList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} diff --git a/filestorage/issues/client.go b/filestorage/issues/client.go index 08224e3..a27eb7e 100644 --- a/filestorage/issues/client.go +++ b/filestorage/issues/client.go @@ -1,121 +1,129 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package issues import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - filestorage "github.com/merge-api/merge-go-client/filestorage" + core "github.com/merge-api/merge-go-client/v2/core" + filestorage "github.com/merge-api/merge-go-client/v2/filestorage" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Gets all issues for Organization. -func (c *Client) List(ctx context.Context, request *filestorage.IssuesListRequest) (*filestorage.PaginatedIssueList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "filestorage/v1/issues" - - queryParams := make(url.Values) - if request.AccountToken != nil { - queryParams.Add("account_token", fmt.Sprintf("%v", *request.AccountToken)) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.EndDate != nil { - queryParams.Add("end_date", fmt.Sprintf("%v", *request.EndDate)) - } - if request.EndUserOrganizationName != nil { - queryParams.Add("end_user_organization_name", fmt.Sprintf("%v", *request.EndUserOrganizationName)) - } - if request.FirstIncidentTimeAfter != nil { - queryParams.Add("first_incident_time_after", fmt.Sprintf("%v", request.FirstIncidentTimeAfter.Format(time.RFC3339))) - } - if request.FirstIncidentTimeBefore != nil { - queryParams.Add("first_incident_time_before", fmt.Sprintf("%v", request.FirstIncidentTimeBefore.Format(time.RFC3339))) - } - if request.IncludeMuted != nil { - queryParams.Add("include_muted", fmt.Sprintf("%v", *request.IncludeMuted)) - } - if request.IntegrationName != nil { - queryParams.Add("integration_name", fmt.Sprintf("%v", *request.IntegrationName)) - } - if request.LastIncidentTimeAfter != nil { - queryParams.Add("last_incident_time_after", fmt.Sprintf("%v", request.LastIncidentTimeAfter.Format(time.RFC3339))) - } - if request.LastIncidentTimeBefore != nil { - queryParams.Add("last_incident_time_before", fmt.Sprintf("%v", request.LastIncidentTimeBefore.Format(time.RFC3339))) - } - if request.LinkedAccountId != nil { - queryParams.Add("linked_account_id", fmt.Sprintf("%v", *request.LinkedAccountId)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.StartDate != nil { - queryParams.Add("start_date", fmt.Sprintf("%v", *request.StartDate)) - } - if request.Status != nil { - queryParams.Add("status", fmt.Sprintf("%v", *request.Status)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *filestorage.PaginatedIssueList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *filestorage.IssuesListRequest, + opts ...option.RequestOption, +) (*core.Page[*filestorage.Issue], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/filestorage/v1/issues" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *filestorage.PaginatedIssueList) *internal.PageResponse[*string, *filestorage.Issue] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *filestorage.Issue]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Get a specific issue. -func (c *Client) Retrieve(ctx context.Context, id string) (*filestorage.Issue, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"filestorage/v1/issues/%v", id) +func (c *Client) Retrieve( + ctx context.Context, + id string, + opts ...option.RequestOption, +) (*filestorage.Issue, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/filestorage/v1/issues/%v", + id, + ) + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *filestorage.Issue if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/filestorage/link_token.go b/filestorage/link_token.go index bd2d2d9..d167521 100644 --- a/filestorage/link_token.go +++ b/filestorage/link_token.go @@ -1,35 +1,279 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package filestorage +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" +) + type EndUserDetailsRequest struct { // Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent. - EndUserEmailAddress string `json:"end_user_email_address"` + EndUserEmailAddress string `json:"end_user_email_address" url:"-"` // Your end user's organization. - EndUserOrganizationName string `json:"end_user_organization_name"` + EndUserOrganizationName string `json:"end_user_organization_name" url:"-"` // This unique identifier typically represents the ID for your end user in your product's database. This value must be distinct from other Linked Accounts' unique identifiers. - EndUserOriginId string `json:"end_user_origin_id"` + EndUserOriginId string `json:"end_user_origin_id" url:"-"` // The integration categories to show in Merge Link. - Categories []CategoriesEnum `json:"categories,omitempty"` + Categories []CategoriesEnum `json:"categories,omitempty" url:"-"` // The slug of a specific pre-selected integration for this linking flow token. For examples of slugs, see https://docs.merge.dev/guides/merge-link/single-integration/. - Integration *string `json:"integration,omitempty"` + Integration *string `json:"integration,omitempty" url:"-"` // An integer number of minutes between [30, 720 or 10080 if for a Magic Link URL] for how long this token is valid. Defaults to 30. - LinkExpiryMins *int `json:"link_expiry_mins,omitempty"` + LinkExpiryMins *int `json:"link_expiry_mins,omitempty" url:"-"` // Whether to generate a Magic Link URL. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. - ShouldCreateMagicLinkUrl *bool `json:"should_create_magic_link_url,omitempty"` + ShouldCreateMagicLinkUrl *bool `json:"should_create_magic_link_url,omitempty" url:"-"` // Whether to generate a Magic Link URL on the Admin Needed screen during the linking flow. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. - HideAdminMagicLink *bool `json:"hide_admin_magic_link,omitempty"` + HideAdminMagicLink *bool `json:"hide_admin_magic_link,omitempty" url:"-"` // An array of objects to specify the models and fields that will be disabled for a given Linked Account. Each object uses model_id, enabled_actions, and disabled_fields to specify the model, method, and fields that are scoped for a given Linked Account. - CommonModels []*CommonModelScopesBodyRequest `json:"common_models,omitempty"` + CommonModels []*CommonModelScopesBodyRequest `json:"common_models,omitempty" url:"-"` // 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. - CategoryCommonModelScopes map[string][]*IndividualCommonModelScopeDeserializerRequest `json:"category_common_model_scopes,omitempty"` + CategoryCommonModelScopes map[string][]*IndividualCommonModelScopeDeserializerRequest `json:"category_common_model_scopes,omitempty" url:"-"` // The following subset of IETF language tags can be used to configure localization. // // * `en` - en // * `de` - de - Language *LanguageEnum `json:"language,omitempty"` + Language *EndUserDetailsRequestLanguage `json:"language,omitempty" url:"-"` // The boolean that indicates whether initial, periodic, and force syncs will be disabled. - AreSyncsDisabled *bool `json:"are_syncs_disabled,omitempty"` + AreSyncsDisabled *bool `json:"are_syncs_disabled,omitempty" url:"-"` // A JSON object containing integration-specific configuration options. - IntegrationSpecificConfig map[string]interface{} `json:"integration_specific_config,omitempty"` + IntegrationSpecificConfig map[string]interface{} `json:"integration_specific_config,omitempty" url:"-"` +} + +// The following subset of IETF language tags can be used to configure localization. +// +// * `en` - en +// * `de` - de +type EndUserDetailsRequestLanguage struct { + LanguageEnum LanguageEnum + String string + + typ string +} + +func (e *EndUserDetailsRequestLanguage) GetLanguageEnum() LanguageEnum { + if e == nil { + return "" + } + return e.LanguageEnum +} + +func (e *EndUserDetailsRequestLanguage) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *EndUserDetailsRequestLanguage) UnmarshalJSON(data []byte) error { + var valueLanguageEnum LanguageEnum + if err := json.Unmarshal(data, &valueLanguageEnum); err == nil { + e.typ = "LanguageEnum" + e.LanguageEnum = valueLanguageEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e EndUserDetailsRequestLanguage) MarshalJSON() ([]byte, error) { + if e.typ == "LanguageEnum" || e.LanguageEnum != "" { + return json.Marshal(e.LanguageEnum) + } + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type EndUserDetailsRequestLanguageVisitor interface { + VisitLanguageEnum(LanguageEnum) error + VisitString(string) error +} + +func (e *EndUserDetailsRequestLanguage) Accept(visitor EndUserDetailsRequestLanguageVisitor) error { + if e.typ == "LanguageEnum" || e.LanguageEnum != "" { + return visitor.VisitLanguageEnum(e.LanguageEnum) + } + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type CommonModelScopesBodyRequest struct { + ModelId string `json:"model_id" url:"model_id"` + EnabledActions []EnabledActionsEnum `json:"enabled_actions" url:"enabled_actions"` + DisabledFields []string `json:"disabled_fields" url:"disabled_fields"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (c *CommonModelScopesBodyRequest) GetModelId() string { + if c == nil { + return "" + } + return c.ModelId +} + +func (c *CommonModelScopesBodyRequest) GetEnabledActions() []EnabledActionsEnum { + if c == nil { + return nil + } + return c.EnabledActions +} + +func (c *CommonModelScopesBodyRequest) GetDisabledFields() []string { + if c == nil { + return nil + } + return c.DisabledFields +} + +func (c *CommonModelScopesBodyRequest) GetExtraProperties() map[string]interface{} { + return c.extraProperties +} + +func (c *CommonModelScopesBodyRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CommonModelScopesBodyRequest + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *c = CommonModelScopesBodyRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *c) + if err != nil { + return err + } + c.extraProperties = extraProperties + c.rawJSON = json.RawMessage(data) + return nil +} + +func (c *CommonModelScopesBodyRequest) String() string { + if len(c.rawJSON) > 0 { + if value, err := internal.StringifyJSON(c.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(c); err == nil { + return value + } + return fmt.Sprintf("%#v", c) +} + +// * `READ` - READ +// * `WRITE` - WRITE +type EnabledActionsEnum string + +const ( + EnabledActionsEnumRead EnabledActionsEnum = "READ" + EnabledActionsEnumWrite EnabledActionsEnum = "WRITE" +) + +func NewEnabledActionsEnumFromString(s string) (EnabledActionsEnum, error) { + switch s { + case "READ": + return EnabledActionsEnumRead, nil + case "WRITE": + return EnabledActionsEnumWrite, nil + } + var t EnabledActionsEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (e EnabledActionsEnum) Ptr() *EnabledActionsEnum { + return &e +} + +// * `en` - en +// * `de` - de +type LanguageEnum string + +const ( + LanguageEnumEn LanguageEnum = "en" + LanguageEnumDe LanguageEnum = "de" +) + +func NewLanguageEnumFromString(s string) (LanguageEnum, error) { + switch s { + case "en": + return LanguageEnumEn, nil + case "de": + return LanguageEnumDe, nil + } + var t LanguageEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (l LanguageEnum) Ptr() *LanguageEnum { + return &l +} + +type LinkToken struct { + LinkToken string `json:"link_token" url:"link_token"` + IntegrationName *string `json:"integration_name,omitempty" url:"integration_name,omitempty"` + MagicLinkUrl *string `json:"magic_link_url,omitempty" url:"magic_link_url,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (l *LinkToken) GetLinkToken() string { + if l == nil { + return "" + } + return l.LinkToken +} + +func (l *LinkToken) GetIntegrationName() *string { + if l == nil { + return nil + } + return l.IntegrationName +} + +func (l *LinkToken) GetMagicLinkUrl() *string { + if l == nil { + return nil + } + return l.MagicLinkUrl +} + +func (l *LinkToken) GetExtraProperties() map[string]interface{} { + return l.extraProperties +} + +func (l *LinkToken) UnmarshalJSON(data []byte) error { + type unmarshaler LinkToken + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *l = LinkToken(value) + extraProperties, err := internal.ExtractExtraProperties(data, *l) + if err != nil { + return err + } + l.extraProperties = extraProperties + l.rawJSON = json.RawMessage(data) + return nil +} + +func (l *LinkToken) String() string { + if len(l.rawJSON) > 0 { + if value, err := internal.StringifyJSON(l.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(l); err == nil { + return value + } + return fmt.Sprintf("%#v", l) } diff --git a/filestorage/linked_accounts.go b/filestorage/linked_accounts.go index f2c25d7..d616714 100644 --- a/filestorage/linked_accounts.go +++ b/filestorage/linked_accounts.go @@ -1,45 +1,48 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package filestorage import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" + time "time" ) type LinkedAccountsListRequest struct { // Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing` // - // - `hris` - hris - // - `ats` - ats - // - `accounting` - accounting - // - `ticketing` - ticketing - // - `crm` - crm - // - `mktg` - mktg - // - `filestorage` - filestorage - Category *LinkedAccountsListRequestCategory `json:"-"` + // * `hris` - hris + // * `ats` - ats + // * `accounting` - accounting + // * `ticketing` - ticketing + // * `crm` - crm + // * `mktg` - mktg + // * `filestorage` - filestorage + Category *LinkedAccountsListRequestCategory `json:"-" url:"category,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // If provided, will only return linked accounts associated with the given email address. - EndUserEmailAddress *string `json:"-"` + EndUserEmailAddress *string `json:"-" url:"end_user_email_address,omitempty"` // If provided, will only return linked accounts associated with the given organization name. - EndUserOrganizationName *string `json:"-"` + EndUserOrganizationName *string `json:"-" url:"end_user_organization_name,omitempty"` // If provided, will only return linked accounts associated with the given origin ID. - EndUserOriginId *string `json:"-"` + EndUserOriginId *string `json:"-" url:"end_user_origin_id,omitempty"` // Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once. - EndUserOriginIds *string `json:"-"` - Id *string `json:"-"` + EndUserOriginIds *string `json:"-" url:"end_user_origin_ids,omitempty"` + Id *string `json:"-" url:"id,omitempty"` // Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once. - Ids *string `json:"-"` + Ids *string `json:"-" url:"ids,omitempty"` // If `true`, will include complete production duplicates of the account specified by the `id` query parameter in the response. `id` must be for a complete production linked account. - IncludeDuplicates *bool `json:"-"` + IncludeDuplicates *bool `json:"-" url:"include_duplicates,omitempty"` // If provided, will only return linked accounts associated with the given integration name. - IntegrationName *string `json:"-"` + IntegrationName *string `json:"-" url:"integration_name,omitempty"` // If included, will only include test linked accounts. If not included, will only include non-test linked accounts. - IsTestAccount *string `json:"-"` + IsTestAccount *string `json:"-" url:"is_test_account,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED` - Status *string `json:"-"` + Status *string `json:"-" url:"status,omitempty"` } type LinkedAccountsListRequestCategory string @@ -78,3 +81,491 @@ func NewLinkedAccountsListRequestCategoryFromString(s string) (LinkedAccountsLis func (l LinkedAccountsListRequestCategory) Ptr() *LinkedAccountsListRequestCategory { return &l } + +// # The LinkedAccount Object +// ### Description +// The `LinkedAccount` object is used to represent an end user's link with a specific integration. +// +// ### Usage Example +// View a list of your organization's `LinkedAccount` objects. +type AccountDetailsAndActions struct { + Id string `json:"id" url:"id"` + Category *AccountDetailsAndActionsCategory `json:"category,omitempty" url:"category,omitempty"` + Status *AccountDetailsAndActionsStatus `json:"status" url:"status"` + StatusDetail *string `json:"status_detail,omitempty" url:"status_detail,omitempty"` + EndUserOriginId *string `json:"end_user_origin_id,omitempty" url:"end_user_origin_id,omitempty"` + EndUserOrganizationName string `json:"end_user_organization_name" url:"end_user_organization_name"` + EndUserEmailAddress string `json:"end_user_email_address" url:"end_user_email_address"` + // The tenant or domain the customer has provided access to. + Subdomain *string `json:"subdomain,omitempty" url:"subdomain,omitempty"` + WebhookListenerUrl string `json:"webhook_listener_url" url:"webhook_listener_url"` + // 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. + IsDuplicate *bool `json:"is_duplicate,omitempty" url:"is_duplicate,omitempty"` + Integration *AccountDetailsAndActionsIntegration `json:"integration,omitempty" url:"integration,omitempty"` + AccountType string `json:"account_type" url:"account_type"` + CompletedAt time.Time `json:"completed_at" url:"completed_at"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AccountDetailsAndActions) GetId() string { + if a == nil { + return "" + } + return a.Id +} + +func (a *AccountDetailsAndActions) GetCategory() *AccountDetailsAndActionsCategory { + if a == nil { + return nil + } + return a.Category +} + +func (a *AccountDetailsAndActions) GetStatus() *AccountDetailsAndActionsStatus { + if a == nil { + return nil + } + return a.Status +} + +func (a *AccountDetailsAndActions) GetStatusDetail() *string { + if a == nil { + return nil + } + return a.StatusDetail +} + +func (a *AccountDetailsAndActions) GetEndUserOriginId() *string { + if a == nil { + return nil + } + return a.EndUserOriginId +} + +func (a *AccountDetailsAndActions) GetEndUserOrganizationName() string { + if a == nil { + return "" + } + return a.EndUserOrganizationName +} + +func (a *AccountDetailsAndActions) GetEndUserEmailAddress() string { + if a == nil { + return "" + } + return a.EndUserEmailAddress +} + +func (a *AccountDetailsAndActions) GetSubdomain() *string { + if a == nil { + return nil + } + return a.Subdomain +} + +func (a *AccountDetailsAndActions) GetWebhookListenerUrl() string { + if a == nil { + return "" + } + return a.WebhookListenerUrl +} + +func (a *AccountDetailsAndActions) GetIsDuplicate() *bool { + if a == nil { + return nil + } + return a.IsDuplicate +} + +func (a *AccountDetailsAndActions) GetIntegration() *AccountDetailsAndActionsIntegration { + if a == nil { + return nil + } + return a.Integration +} + +func (a *AccountDetailsAndActions) GetAccountType() string { + if a == nil { + return "" + } + return a.AccountType +} + +func (a *AccountDetailsAndActions) GetCompletedAt() time.Time { + if a == nil { + return time.Time{} + } + return a.CompletedAt +} + +func (a *AccountDetailsAndActions) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AccountDetailsAndActions) UnmarshalJSON(data []byte) error { + type embed AccountDetailsAndActions + var unmarshaler = struct { + embed + CompletedAt *internal.DateTime `json:"completed_at"` + }{ + embed: embed(*a), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *a = AccountDetailsAndActions(unmarshaler.embed) + a.CompletedAt = unmarshaler.CompletedAt.Time() + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AccountDetailsAndActions) MarshalJSON() ([]byte, error) { + type embed AccountDetailsAndActions + var marshaler = struct { + embed + CompletedAt *internal.DateTime `json:"completed_at"` + }{ + embed: embed(*a), + CompletedAt: internal.NewDateTime(a.CompletedAt), + } + return json.Marshal(marshaler) +} + +func (a *AccountDetailsAndActions) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} + +type AccountDetailsAndActionsCategory struct { + CategoryEnum CategoryEnum + String string + + typ string +} + +func (a *AccountDetailsAndActionsCategory) GetCategoryEnum() CategoryEnum { + if a == nil { + return "" + } + return a.CategoryEnum +} + +func (a *AccountDetailsAndActionsCategory) GetString() string { + if a == nil { + return "" + } + return a.String +} + +func (a *AccountDetailsAndActionsCategory) UnmarshalJSON(data []byte) error { + var valueCategoryEnum CategoryEnum + if err := json.Unmarshal(data, &valueCategoryEnum); err == nil { + a.typ = "CategoryEnum" + a.CategoryEnum = valueCategoryEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + a.typ = "String" + a.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, a) +} + +func (a AccountDetailsAndActionsCategory) MarshalJSON() ([]byte, error) { + if a.typ == "CategoryEnum" || a.CategoryEnum != "" { + return json.Marshal(a.CategoryEnum) + } + if a.typ == "String" || a.String != "" { + return json.Marshal(a.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type AccountDetailsAndActionsCategoryVisitor interface { + VisitCategoryEnum(CategoryEnum) error + VisitString(string) error +} + +func (a *AccountDetailsAndActionsCategory) Accept(visitor AccountDetailsAndActionsCategoryVisitor) error { + if a.typ == "CategoryEnum" || a.CategoryEnum != "" { + return visitor.VisitCategoryEnum(a.CategoryEnum) + } + if a.typ == "String" || a.String != "" { + return visitor.VisitString(a.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type AccountDetailsAndActionsIntegration struct { + Name string `json:"name" url:"name"` + Categories []CategoriesEnum `json:"categories" url:"categories"` + Image *string `json:"image,omitempty" url:"image,omitempty"` + SquareImage *string `json:"square_image,omitempty" url:"square_image,omitempty"` + Color string `json:"color" url:"color"` + Slug string `json:"slug" url:"slug"` + PassthroughAvailable bool `json:"passthrough_available" url:"passthrough_available"` + AvailableModelOperations []*ModelOperation `json:"available_model_operations,omitempty" url:"available_model_operations,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AccountDetailsAndActionsIntegration) GetName() string { + if a == nil { + return "" + } + return a.Name +} + +func (a *AccountDetailsAndActionsIntegration) GetCategories() []CategoriesEnum { + if a == nil { + return nil + } + return a.Categories +} + +func (a *AccountDetailsAndActionsIntegration) GetImage() *string { + if a == nil { + return nil + } + return a.Image +} + +func (a *AccountDetailsAndActionsIntegration) GetSquareImage() *string { + if a == nil { + return nil + } + return a.SquareImage +} + +func (a *AccountDetailsAndActionsIntegration) GetColor() string { + if a == nil { + return "" + } + return a.Color +} + +func (a *AccountDetailsAndActionsIntegration) GetSlug() string { + if a == nil { + return "" + } + return a.Slug +} + +func (a *AccountDetailsAndActionsIntegration) GetPassthroughAvailable() bool { + if a == nil { + return false + } + return a.PassthroughAvailable +} + +func (a *AccountDetailsAndActionsIntegration) GetAvailableModelOperations() []*ModelOperation { + if a == nil { + return nil + } + return a.AvailableModelOperations +} + +func (a *AccountDetailsAndActionsIntegration) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AccountDetailsAndActionsIntegration) UnmarshalJSON(data []byte) error { + type unmarshaler AccountDetailsAndActionsIntegration + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *a = AccountDetailsAndActionsIntegration(value) + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AccountDetailsAndActionsIntegration) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} + +type AccountDetailsAndActionsStatus struct { + AccountDetailsAndActionsStatusEnum AccountDetailsAndActionsStatusEnum + String string + + typ string +} + +func (a *AccountDetailsAndActionsStatus) GetAccountDetailsAndActionsStatusEnum() AccountDetailsAndActionsStatusEnum { + if a == nil { + return "" + } + return a.AccountDetailsAndActionsStatusEnum +} + +func (a *AccountDetailsAndActionsStatus) GetString() string { + if a == nil { + return "" + } + return a.String +} + +func (a *AccountDetailsAndActionsStatus) UnmarshalJSON(data []byte) error { + var valueAccountDetailsAndActionsStatusEnum AccountDetailsAndActionsStatusEnum + if err := json.Unmarshal(data, &valueAccountDetailsAndActionsStatusEnum); err == nil { + a.typ = "AccountDetailsAndActionsStatusEnum" + a.AccountDetailsAndActionsStatusEnum = valueAccountDetailsAndActionsStatusEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + a.typ = "String" + a.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, a) +} + +func (a AccountDetailsAndActionsStatus) MarshalJSON() ([]byte, error) { + if a.typ == "AccountDetailsAndActionsStatusEnum" || a.AccountDetailsAndActionsStatusEnum != "" { + return json.Marshal(a.AccountDetailsAndActionsStatusEnum) + } + if a.typ == "String" || a.String != "" { + return json.Marshal(a.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type AccountDetailsAndActionsStatusVisitor interface { + VisitAccountDetailsAndActionsStatusEnum(AccountDetailsAndActionsStatusEnum) error + VisitString(string) error +} + +func (a *AccountDetailsAndActionsStatus) Accept(visitor AccountDetailsAndActionsStatusVisitor) error { + if a.typ == "AccountDetailsAndActionsStatusEnum" || a.AccountDetailsAndActionsStatusEnum != "" { + return visitor.VisitAccountDetailsAndActionsStatusEnum(a.AccountDetailsAndActionsStatusEnum) + } + if a.typ == "String" || a.String != "" { + return visitor.VisitString(a.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} + +// * `COMPLETE` - COMPLETE +// * `INCOMPLETE` - INCOMPLETE +// * `RELINK_NEEDED` - RELINK_NEEDED +// * `IDLE` - IDLE +type AccountDetailsAndActionsStatusEnum string + +const ( + AccountDetailsAndActionsStatusEnumComplete AccountDetailsAndActionsStatusEnum = "COMPLETE" + AccountDetailsAndActionsStatusEnumIncomplete AccountDetailsAndActionsStatusEnum = "INCOMPLETE" + AccountDetailsAndActionsStatusEnumRelinkNeeded AccountDetailsAndActionsStatusEnum = "RELINK_NEEDED" + AccountDetailsAndActionsStatusEnumIdle AccountDetailsAndActionsStatusEnum = "IDLE" +) + +func NewAccountDetailsAndActionsStatusEnumFromString(s string) (AccountDetailsAndActionsStatusEnum, error) { + switch s { + case "COMPLETE": + return AccountDetailsAndActionsStatusEnumComplete, nil + case "INCOMPLETE": + return AccountDetailsAndActionsStatusEnumIncomplete, nil + case "RELINK_NEEDED": + return AccountDetailsAndActionsStatusEnumRelinkNeeded, nil + case "IDLE": + return AccountDetailsAndActionsStatusEnumIdle, nil + } + var t AccountDetailsAndActionsStatusEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (a AccountDetailsAndActionsStatusEnum) Ptr() *AccountDetailsAndActionsStatusEnum { + return &a +} + +type PaginatedAccountDetailsAndActionsList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*AccountDetailsAndActions `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedAccountDetailsAndActionsList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedAccountDetailsAndActionsList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedAccountDetailsAndActionsList) GetResults() []*AccountDetailsAndActions { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedAccountDetailsAndActionsList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedAccountDetailsAndActionsList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedAccountDetailsAndActionsList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedAccountDetailsAndActionsList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedAccountDetailsAndActionsList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} diff --git a/filestorage/linkedaccounts/client.go b/filestorage/linkedaccounts/client.go index d427fec..d303f4b 100644 --- a/filestorage/linkedaccounts/client.go +++ b/filestorage/linkedaccounts/client.go @@ -1,97 +1,92 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package linkedaccounts import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - filestorage "github.com/merge-api/merge-go-client/filestorage" + core "github.com/merge-api/merge-go-client/v2/core" + filestorage "github.com/merge-api/merge-go-client/v2/filestorage" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // List linked accounts for your organization. -func (c *Client) List(ctx context.Context, request *filestorage.LinkedAccountsListRequest) (*filestorage.PaginatedAccountDetailsAndActionsList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "filestorage/v1/linked-accounts" - - queryParams := make(url.Values) - if request.Category != nil { - queryParams.Add("category", fmt.Sprintf("%v", *request.Category)) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.EndUserEmailAddress != nil { - queryParams.Add("end_user_email_address", fmt.Sprintf("%v", *request.EndUserEmailAddress)) - } - if request.EndUserOrganizationName != nil { - queryParams.Add("end_user_organization_name", fmt.Sprintf("%v", *request.EndUserOrganizationName)) - } - if request.EndUserOriginId != nil { - queryParams.Add("end_user_origin_id", fmt.Sprintf("%v", *request.EndUserOriginId)) - } - if request.EndUserOriginIds != nil { - queryParams.Add("end_user_origin_ids", fmt.Sprintf("%v", *request.EndUserOriginIds)) - } - if request.Id != nil { - queryParams.Add("id", fmt.Sprintf("%v", *request.Id)) - } - if request.Ids != nil { - queryParams.Add("ids", fmt.Sprintf("%v", *request.Ids)) - } - if request.IncludeDuplicates != nil { - queryParams.Add("include_duplicates", fmt.Sprintf("%v", *request.IncludeDuplicates)) - } - if request.IntegrationName != nil { - queryParams.Add("integration_name", fmt.Sprintf("%v", *request.IntegrationName)) - } - if request.IsTestAccount != nil { - queryParams.Add("is_test_account", fmt.Sprintf("%v", *request.IsTestAccount)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.Status != nil { - queryParams.Add("status", fmt.Sprintf("%v", *request.Status)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *filestorage.PaginatedAccountDetailsAndActionsList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *filestorage.LinkedAccountsListRequest, + opts ...option.RequestOption, +) (*core.Page[*filestorage.AccountDetailsAndActions], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/filestorage/v1/linked-accounts" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *filestorage.PaginatedAccountDetailsAndActionsList) *internal.PageResponse[*string, *filestorage.AccountDetailsAndActions] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *filestorage.AccountDetailsAndActions]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } diff --git a/filestorage/linktoken/client.go b/filestorage/linktoken/client.go index 12e97eb..7692c72 100644 --- a/filestorage/linktoken/client.go +++ b/filestorage/linktoken/client.go @@ -1,49 +1,68 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package linktoken import ( context "context" - core "github.com/merge-api/merge-go-client/core" - filestorage "github.com/merge-api/merge-go-client/filestorage" + core "github.com/merge-api/merge-go-client/v2/core" + filestorage "github.com/merge-api/merge-go-client/v2/filestorage" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Creates a link token to be used when linking a new end user. -func (c *Client) Create(ctx context.Context, request *filestorage.EndUserDetailsRequest) (*filestorage.LinkToken, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "filestorage/v1/link-token" +func (c *Client) Create( + ctx context.Context, + request *filestorage.EndUserDetailsRequest, + opts ...option.RequestOption, +) (*filestorage.LinkToken, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/filestorage/v1/link-token" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *filestorage.LinkToken if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err diff --git a/filestorage/passthrough/client.go b/filestorage/passthrough/client.go index 68363b4..f3fe712 100644 --- a/filestorage/passthrough/client.go +++ b/filestorage/passthrough/client.go @@ -1,49 +1,68 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package passthrough import ( context "context" - core "github.com/merge-api/merge-go-client/core" - filestorage "github.com/merge-api/merge-go-client/filestorage" + core "github.com/merge-api/merge-go-client/v2/core" + filestorage "github.com/merge-api/merge-go-client/v2/filestorage" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Pull data from an endpoint not currently supported by Merge. -func (c *Client) Create(ctx context.Context, request *filestorage.DataPassthroughRequest) (*filestorage.RemoteResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "filestorage/v1/passthrough" +func (c *Client) Create( + ctx context.Context, + request *filestorage.DataPassthroughRequest, + opts ...option.RequestOption, +) (*filestorage.RemoteResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/filestorage/v1/passthrough" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *filestorage.RemoteResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err diff --git a/filestorage/regenerate_key.go b/filestorage/regenerate_key.go index 7990184..8f02ddf 100644 --- a/filestorage/regenerate_key.go +++ b/filestorage/regenerate_key.go @@ -1,8 +1,8 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package filestorage type RemoteKeyForRegenerationRequest struct { // The name of the remote key - Name string `json:"name"` + Name string `json:"name" url:"-"` } diff --git a/filestorage/regeneratekey/client.go b/filestorage/regeneratekey/client.go index a8b12a0..b01ab3f 100644 --- a/filestorage/regeneratekey/client.go +++ b/filestorage/regeneratekey/client.go @@ -1,49 +1,68 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package regeneratekey import ( context "context" - core "github.com/merge-api/merge-go-client/core" - filestorage "github.com/merge-api/merge-go-client/filestorage" + core "github.com/merge-api/merge-go-client/v2/core" + filestorage "github.com/merge-api/merge-go-client/v2/filestorage" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Exchange remote keys. -func (c *Client) Create(ctx context.Context, request *filestorage.RemoteKeyForRegenerationRequest) (*filestorage.RemoteKey, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "filestorage/v1/regenerate-key" +func (c *Client) Create( + ctx context.Context, + request *filestorage.RemoteKeyForRegenerationRequest, + opts ...option.RequestOption, +) (*filestorage.RemoteKey, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/filestorage/v1/regenerate-key" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *filestorage.RemoteKey if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err diff --git a/filestorage/scopes.go b/filestorage/scopes.go index 120cb91..caabe73 100644 --- a/filestorage/scopes.go +++ b/filestorage/scopes.go @@ -1,8 +1,223 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package filestorage +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" +) + type LinkedAccountCommonModelScopeDeserializerRequest struct { // The common models you want to update the scopes for - CommonModels []*IndividualCommonModelScopeDeserializerRequest `json:"common_models,omitempty"` + CommonModels []*IndividualCommonModelScopeDeserializerRequest `json:"common_models,omitempty" url:"-"` +} + +type CommonModelScopeApi struct { + // The common models you want to update the scopes for + CommonModels []*IndividualCommonModelScopeDeserializer `json:"common_models" url:"common_models"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (c *CommonModelScopeApi) GetCommonModels() []*IndividualCommonModelScopeDeserializer { + if c == nil { + return nil + } + return c.CommonModels +} + +func (c *CommonModelScopeApi) GetExtraProperties() map[string]interface{} { + return c.extraProperties +} + +func (c *CommonModelScopeApi) UnmarshalJSON(data []byte) error { + type unmarshaler CommonModelScopeApi + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *c = CommonModelScopeApi(value) + extraProperties, err := internal.ExtractExtraProperties(data, *c) + if err != nil { + return err + } + c.extraProperties = extraProperties + c.rawJSON = json.RawMessage(data) + return nil +} + +func (c *CommonModelScopeApi) String() string { + if len(c.rawJSON) > 0 { + if value, err := internal.StringifyJSON(c.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(c); err == nil { + return value + } + return fmt.Sprintf("%#v", c) +} + +type FieldPermissionDeserializer struct { + EnabledFields []interface{} `json:"enabled_fields,omitempty" url:"enabled_fields,omitempty"` + DisabledFields []interface{} `json:"disabled_fields,omitempty" url:"disabled_fields,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (f *FieldPermissionDeserializer) GetEnabledFields() []interface{} { + if f == nil { + return nil + } + return f.EnabledFields +} + +func (f *FieldPermissionDeserializer) GetDisabledFields() []interface{} { + if f == nil { + return nil + } + return f.DisabledFields +} + +func (f *FieldPermissionDeserializer) GetExtraProperties() map[string]interface{} { + return f.extraProperties +} + +func (f *FieldPermissionDeserializer) UnmarshalJSON(data []byte) error { + type unmarshaler FieldPermissionDeserializer + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *f = FieldPermissionDeserializer(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { + return err + } + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) + return nil +} + +func (f *FieldPermissionDeserializer) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(f); err == nil { + return value + } + return fmt.Sprintf("%#v", f) +} + +type IndividualCommonModelScopeDeserializer struct { + ModelName string `json:"model_name" url:"model_name"` + ModelPermissions map[string]*ModelPermissionDeserializer `json:"model_permissions,omitempty" url:"model_permissions,omitempty"` + FieldPermissions *FieldPermissionDeserializer `json:"field_permissions,omitempty" url:"field_permissions,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (i *IndividualCommonModelScopeDeserializer) GetModelName() string { + if i == nil { + return "" + } + return i.ModelName +} + +func (i *IndividualCommonModelScopeDeserializer) GetModelPermissions() map[string]*ModelPermissionDeserializer { + if i == nil { + return nil + } + return i.ModelPermissions +} + +func (i *IndividualCommonModelScopeDeserializer) GetFieldPermissions() *FieldPermissionDeserializer { + if i == nil { + return nil + } + return i.FieldPermissions +} + +func (i *IndividualCommonModelScopeDeserializer) GetExtraProperties() map[string]interface{} { + return i.extraProperties +} + +func (i *IndividualCommonModelScopeDeserializer) UnmarshalJSON(data []byte) error { + type unmarshaler IndividualCommonModelScopeDeserializer + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *i = IndividualCommonModelScopeDeserializer(value) + extraProperties, err := internal.ExtractExtraProperties(data, *i) + if err != nil { + return err + } + i.extraProperties = extraProperties + i.rawJSON = json.RawMessage(data) + return nil +} + +func (i *IndividualCommonModelScopeDeserializer) String() string { + if len(i.rawJSON) > 0 { + if value, err := internal.StringifyJSON(i.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(i); err == nil { + return value + } + return fmt.Sprintf("%#v", i) +} + +type ModelPermissionDeserializer struct { + IsEnabled *bool `json:"is_enabled,omitempty" url:"is_enabled,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (m *ModelPermissionDeserializer) GetIsEnabled() *bool { + if m == nil { + return nil + } + return m.IsEnabled +} + +func (m *ModelPermissionDeserializer) GetExtraProperties() map[string]interface{} { + return m.extraProperties +} + +func (m *ModelPermissionDeserializer) UnmarshalJSON(data []byte) error { + type unmarshaler ModelPermissionDeserializer + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *m = ModelPermissionDeserializer(value) + extraProperties, err := internal.ExtractExtraProperties(data, *m) + if err != nil { + return err + } + m.extraProperties = extraProperties + m.rawJSON = json.RawMessage(data) + return nil +} + +func (m *ModelPermissionDeserializer) String() string { + if len(m.rawJSON) > 0 { + if value, err := internal.StringifyJSON(m.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(m); err == nil { + return value + } + return fmt.Sprintf("%#v", m) } diff --git a/filestorage/scopes/client.go b/filestorage/scopes/client.go index b25a450..9e0beb0 100644 --- a/filestorage/scopes/client.go +++ b/filestorage/scopes/client.go @@ -1,48 +1,65 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package scopes import ( context "context" - core "github.com/merge-api/merge-go-client/core" - filestorage "github.com/merge-api/merge-go-client/filestorage" + core "github.com/merge-api/merge-go-client/v2/core" + filestorage "github.com/merge-api/merge-go-client/v2/filestorage" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // 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/5950052-common-model-and-field-scopes). -func (c *Client) DefaultScopesRetrieve(ctx context.Context) (*filestorage.CommonModelScopeApi, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "filestorage/v1/default-scopes" +func (c *Client) DefaultScopesRetrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*filestorage.CommonModelScopeApi, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/filestorage/v1/default-scopes" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *filestorage.CommonModelScopeApi if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -51,21 +68,34 @@ func (c *Client) DefaultScopesRetrieve(ctx context.Context) (*filestorage.Common } // Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). -func (c *Client) LinkedAccountScopesRetrieve(ctx context.Context) (*filestorage.CommonModelScopeApi, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "filestorage/v1/linked-account-scopes" +func (c *Client) LinkedAccountScopesRetrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*filestorage.CommonModelScopeApi, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/filestorage/v1/linked-account-scopes" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *filestorage.CommonModelScopeApi if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -74,22 +104,37 @@ func (c *Client) LinkedAccountScopesRetrieve(ctx context.Context) (*filestorage. } // 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/5950052-common-model-and-field-scopes) -func (c *Client) LinkedAccountScopesCreate(ctx context.Context, request *filestorage.LinkedAccountCommonModelScopeDeserializerRequest) (*filestorage.CommonModelScopeApi, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "filestorage/v1/linked-account-scopes" +func (c *Client) LinkedAccountScopesCreate( + ctx context.Context, + request *filestorage.LinkedAccountCommonModelScopeDeserializerRequest, + opts ...option.RequestOption, +) (*filestorage.CommonModelScopeApi, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/filestorage/v1/linked-account-scopes" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *filestorage.CommonModelScopeApi if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err diff --git a/filestorage/sync_status.go b/filestorage/sync_status.go index f80e028..98427ac 100644 --- a/filestorage/sync_status.go +++ b/filestorage/sync_status.go @@ -1,10 +1,78 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package filestorage +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" +) + type SyncStatusListRequest struct { // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` +} + +type PaginatedSyncStatusList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*SyncStatus `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedSyncStatusList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedSyncStatusList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedSyncStatusList) GetResults() []*SyncStatus { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedSyncStatusList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedSyncStatusList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedSyncStatusList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedSyncStatusList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedSyncStatusList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) } diff --git a/filestorage/syncstatus/client.go b/filestorage/syncstatus/client.go index d38c7f2..4612e3c 100644 --- a/filestorage/syncstatus/client.go +++ b/filestorage/syncstatus/client.go @@ -1,64 +1,92 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package syncstatus import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - filestorage "github.com/merge-api/merge-go-client/filestorage" + core "github.com/merge-api/merge-go-client/v2/core" + filestorage "github.com/merge-api/merge-go-client/v2/filestorage" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } -// Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). -func (c *Client) List(ctx context.Context, request *filestorage.SyncStatusListRequest) (*filestorage.PaginatedSyncStatusList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL +// Get sync status for the current sync and the most recently finished sync. `last_sync_start` represents the most recent time any sync began. `last_sync_finished` represents the most recent time any sync completed. These timestamps may correspond to different sync instances which may result in a sync start time being later than a separate sync completed time. To ensure you are retrieving the latest available data reference the `last_sync_finished` timestamp where `last_sync_result` is `DONE`. Possible values for `status` and `last_sync_result` are `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). +func (c *Client) List( + ctx context.Context, + request *filestorage.SyncStatusListRequest, + opts ...option.RequestOption, +) (*core.Page[*filestorage.SyncStatus], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/filestorage/v1/sync-status" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } - endpointURL := baseURL + "/" + "filestorage/v1/sync-status" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) - queryParams := make(url.Values) - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *filestorage.PaginatedSyncStatusList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { - return nil, err + readPageResponse := func(response *filestorage.PaginatedSyncStatusList) *internal.PageResponse[*string, *filestorage.SyncStatus] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *filestorage.SyncStatus]{ + Next: next, + Results: results, + Done: next == zeroValue, + } } - return response, nil + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } diff --git a/filestorage/types.go b/filestorage/types.go index 85354e9..4c1e770 100644 --- a/filestorage/types.go +++ b/filestorage/types.go @@ -1,617 +1,148 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package filestorage import ( json "encoding/json" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) -type AccountDetails struct { - Id *string `json:"id,omitempty"` - Integration *string `json:"integration,omitempty"` - IntegrationSlug *string `json:"integration_slug,omitempty"` - Category *CategoryEnum `json:"category,omitempty"` - EndUserOriginId *string `json:"end_user_origin_id,omitempty"` - EndUserOrganizationName *string `json:"end_user_organization_name,omitempty"` - EndUserEmailAddress *string `json:"end_user_email_address,omitempty"` - Status *string `json:"status,omitempty"` - WebhookListenerUrl *string `json:"webhook_listener_url,omitempty"` - // 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. - IsDuplicate *bool `json:"is_duplicate,omitempty"` - AccountType *string `json:"account_type,omitempty"` - // The time at which account completes the linking flow. - CompletedAt *time.Time `json:"completed_at,omitempty"` - - _rawJSON json.RawMessage -} - -func (a *AccountDetails) UnmarshalJSON(data []byte) error { - type unmarshaler AccountDetails - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *a = AccountDetails(value) - a._rawJSON = json.RawMessage(data) - return nil -} - -func (a *AccountDetails) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(a); err == nil { - return value - } - return fmt.Sprintf("%#v", a) -} - -// # The LinkedAccount Object -// -// ### Description -// -// The `LinkedAccount` object is used to represent an end user's link with a specific integration. -// -// ### Usage Example -// -// View a list of your organization's `LinkedAccount` objects. -type AccountDetailsAndActions struct { - Id string `json:"id"` - Category *CategoryEnum `json:"category,omitempty"` - Status AccountDetailsAndActionsStatusEnum `json:"status,omitempty"` - StatusDetail *string `json:"status_detail,omitempty"` - EndUserOriginId *string `json:"end_user_origin_id,omitempty"` - EndUserOrganizationName string `json:"end_user_organization_name"` - EndUserEmailAddress string `json:"end_user_email_address"` - // The tenant or domain the customer has provided access to. - Subdomain *string `json:"subdomain,omitempty"` - WebhookListenerUrl string `json:"webhook_listener_url"` - // 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. - IsDuplicate *bool `json:"is_duplicate,omitempty"` - Integration *AccountDetailsAndActionsIntegration `json:"integration,omitempty"` - AccountType string `json:"account_type"` - CompletedAt time.Time `json:"completed_at"` - - _rawJSON json.RawMessage -} - -func (a *AccountDetailsAndActions) UnmarshalJSON(data []byte) error { - type unmarshaler AccountDetailsAndActions - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *a = AccountDetailsAndActions(value) - a._rawJSON = json.RawMessage(data) - return nil -} - -func (a *AccountDetailsAndActions) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(a); err == nil { - return value - } - return fmt.Sprintf("%#v", a) -} - -type AccountDetailsAndActionsIntegration struct { - Name string `json:"name"` - Categories []CategoriesEnum `json:"categories,omitempty"` - Image *string `json:"image,omitempty"` - SquareImage *string `json:"square_image,omitempty"` - Color string `json:"color"` - Slug string `json:"slug"` - PassthroughAvailable bool `json:"passthrough_available"` - AvailableModelOperations []*ModelOperation `json:"available_model_operations,omitempty"` - - _rawJSON json.RawMessage -} - -func (a *AccountDetailsAndActionsIntegration) UnmarshalJSON(data []byte) error { - type unmarshaler AccountDetailsAndActionsIntegration - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *a = AccountDetailsAndActionsIntegration(value) - a._rawJSON = json.RawMessage(data) - return nil -} - -func (a *AccountDetailsAndActionsIntegration) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(a); err == nil { - return value - } - return fmt.Sprintf("%#v", a) -} - -// - `COMPLETE` - COMPLETE -// - `INCOMPLETE` - INCOMPLETE -// - `RELINK_NEEDED` - RELINK_NEEDED -// - `IDLE` - IDLE -type AccountDetailsAndActionsStatusEnum string - -const ( - AccountDetailsAndActionsStatusEnumComplete AccountDetailsAndActionsStatusEnum = "COMPLETE" - AccountDetailsAndActionsStatusEnumIncomplete AccountDetailsAndActionsStatusEnum = "INCOMPLETE" - AccountDetailsAndActionsStatusEnumRelinkNeeded AccountDetailsAndActionsStatusEnum = "RELINK_NEEDED" - AccountDetailsAndActionsStatusEnumIdle AccountDetailsAndActionsStatusEnum = "IDLE" -) - -func NewAccountDetailsAndActionsStatusEnumFromString(s string) (AccountDetailsAndActionsStatusEnum, error) { - switch s { - case "COMPLETE": - return AccountDetailsAndActionsStatusEnumComplete, nil - case "INCOMPLETE": - return AccountDetailsAndActionsStatusEnumIncomplete, nil - case "RELINK_NEEDED": - return AccountDetailsAndActionsStatusEnumRelinkNeeded, nil - case "IDLE": - return AccountDetailsAndActionsStatusEnumIdle, nil - } - var t AccountDetailsAndActionsStatusEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (a AccountDetailsAndActionsStatusEnum) Ptr() *AccountDetailsAndActionsStatusEnum { - return &a -} - type AccountIntegration struct { // Company name. - Name string `json:"name"` + Name string `json:"name" url:"name"` // Optional. This shortened name appears in places with limited space, usually in conjunction with the platform's logo (e.g., Merge Link menu).

Example: Workforce Now (in lieu of ADP Workforce Now), SuccessFactors (in lieu of SAP SuccessFactors) - AbbreviatedName *string `json:"abbreviated_name,omitempty"` + AbbreviatedName *string `json:"abbreviated_name,omitempty" url:"abbreviated_name,omitempty"` // Category or categories this integration belongs to. Multiple categories should be comma separated, i.e. [ats, hris]. - Categories []CategoriesEnum `json:"categories,omitempty"` + Categories []CategoriesEnum `json:"categories,omitempty" url:"categories,omitempty"` // Company logo in rectangular shape. - Image *string `json:"image,omitempty"` + Image *string `json:"image,omitempty" url:"image,omitempty"` // Company logo in square shape. - SquareImage *string `json:"square_image,omitempty"` + SquareImage *string `json:"square_image,omitempty" url:"square_image,omitempty"` // The color of this integration used for buttons and text throughout the app and landing pages. Choose a darker, saturated color. - Color *string `json:"color,omitempty"` - Slug *string `json:"slug,omitempty"` + Color *string `json:"color,omitempty" url:"color,omitempty"` + Slug *string `json:"slug,omitempty" url:"slug,omitempty"` // Mapping of API endpoints to documentation urls for support. Example: {'GET': [['/common-model-scopes', 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], 'POST': []} - ApiEndpointsToDocumentationUrls map[string]interface{} `json:"api_endpoints_to_documentation_urls,omitempty"` + ApiEndpointsToDocumentationUrls map[string]interface{} `json:"api_endpoints_to_documentation_urls,omitempty" url:"api_endpoints_to_documentation_urls,omitempty"` // Setup guide URL for third party webhook creation. Exposed in Merge Docs. - WebhookSetupGuideUrl *string `json:"webhook_setup_guide_url,omitempty"` + WebhookSetupGuideUrl *string `json:"webhook_setup_guide_url,omitempty" url:"webhook_setup_guide_url,omitempty"` // Category or categories this integration is in beta status for. - CategoryBetaStatus map[string]interface{} `json:"category_beta_status,omitempty"` + CategoryBetaStatus map[string]interface{} `json:"category_beta_status,omitempty" url:"category_beta_status,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (a *AccountIntegration) UnmarshalJSON(data []byte) error { - type unmarshaler AccountIntegration - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *a = AccountIntegration(value) - a._rawJSON = json.RawMessage(data) - return nil -} - -func (a *AccountIntegration) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(a); err == nil { - return value - } - return fmt.Sprintf("%#v", a) -} - -type AccountToken struct { - AccountToken string `json:"account_token"` - Integration *AccountIntegration `json:"integration,omitempty"` - - _rawJSON json.RawMessage -} - -func (a *AccountToken) UnmarshalJSON(data []byte) error { - type unmarshaler AccountToken - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *a = AccountToken(value) - a._rawJSON = json.RawMessage(data) - return nil -} - -func (a *AccountToken) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(a); err == nil { - return value - } - return fmt.Sprintf("%#v", a) -} - -type AdvancedMetadata struct { - Id string `json:"id"` - DisplayName *string `json:"display_name,omitempty"` - Description *string `json:"description,omitempty"` - IsRequired *bool `json:"is_required,omitempty"` - IsCustom *bool `json:"is_custom,omitempty"` - FieldChoices []interface{} `json:"field_choices,omitempty"` - - _rawJSON json.RawMessage -} - -func (a *AdvancedMetadata) UnmarshalJSON(data []byte) error { - type unmarshaler AdvancedMetadata - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *a = AdvancedMetadata(value) - a._rawJSON = json.RawMessage(data) - return nil -} - -func (a *AdvancedMetadata) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(a); err == nil { - return value - } - return fmt.Sprintf("%#v", a) -} - -type AsyncPassthroughReciept struct { - AsyncPassthroughReceiptId string `json:"async_passthrough_receipt_id"` - - _rawJSON json.RawMessage -} - -func (a *AsyncPassthroughReciept) UnmarshalJSON(data []byte) error { - type unmarshaler AsyncPassthroughReciept - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (a *AccountIntegration) GetName() string { + if a == nil { + return "" } - *a = AsyncPassthroughReciept(value) - a._rawJSON = json.RawMessage(data) - return nil + return a.Name } -func (a *AsyncPassthroughReciept) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(a); err == nil { - return value +func (a *AccountIntegration) GetAbbreviatedName() *string { + if a == nil { + return nil } - return fmt.Sprintf("%#v", a) + return a.AbbreviatedName } -type AuditLogEvent struct { - Id *string `json:"id,omitempty"` - // The User's full name at the time of this Event occurring. - UserName *string `json:"user_name,omitempty"` - // The User's email at the time of this Event occurring. - UserEmail *string `json:"user_email,omitempty"` - // Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. - // - // - `ADMIN` - ADMIN - // - `DEVELOPER` - DEVELOPER - // - `MEMBER` - MEMBER - // - `API` - API - // - `SYSTEM` - SYSTEM - // - `MERGE_TEAM` - MERGE_TEAM - Role *AuditLogEventRole `json:"role,omitempty"` - IpAddress string `json:"ip_address"` - // Designates the type of event that occurred. - // - // - `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY - // - `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY - // - `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY - // - `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY - // - `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY - // - `INVITED_USER` - INVITED_USER - // - `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED - // - `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED - // - `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT - // - `CREATED_DESTINATION` - CREATED_DESTINATION - // - `DELETED_DESTINATION` - DELETED_DESTINATION - // - `CHANGED_DESTINATION` - CHANGED_DESTINATION - // - `CHANGED_SCOPES` - CHANGED_SCOPES - // - `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION - // - `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS - // - `ENABLED_INTEGRATION` - ENABLED_INTEGRATION - // - `DISABLED_INTEGRATION` - DISABLED_INTEGRATION - // - `ENABLED_CATEGORY` - ENABLED_CATEGORY - // - `DISABLED_CATEGORY` - DISABLED_CATEGORY - // - `CHANGED_PASSWORD` - CHANGED_PASSWORD - // - `RESET_PASSWORD` - RESET_PASSWORD - // - `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - // - `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - // - `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - // - `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - // - `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING - // - `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING - // - `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING - // - `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 - // - `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - // - `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - // - `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - // - `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC - // - `MUTED_ISSUE` - MUTED_ISSUE - // - `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK - // - `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK - // - `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK - // - `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED - // - `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED - EventType *AuditLogEventEventType `json:"event_type,omitempty"` - EventDescription string `json:"event_description"` - CreatedAt *time.Time `json:"created_at,omitempty"` - - _rawJSON json.RawMessage -} - -func (a *AuditLogEvent) UnmarshalJSON(data []byte) error { - type unmarshaler AuditLogEvent - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (a *AccountIntegration) GetCategories() []CategoriesEnum { + if a == nil { + return nil } - *a = AuditLogEvent(value) - a._rawJSON = json.RawMessage(data) - return nil + return a.Categories } -func (a *AuditLogEvent) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(a); err == nil { - return value +func (a *AccountIntegration) GetImage() *string { + if a == nil { + return nil } - return fmt.Sprintf("%#v", a) -} - -// Designates the type of event that occurred. -// -// - `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY -// - `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY -// - `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY -// - `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY -// - `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY -// - `INVITED_USER` - INVITED_USER -// - `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED -// - `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED -// - `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT -// - `CREATED_DESTINATION` - CREATED_DESTINATION -// - `DELETED_DESTINATION` - DELETED_DESTINATION -// - `CHANGED_DESTINATION` - CHANGED_DESTINATION -// - `CHANGED_SCOPES` - CHANGED_SCOPES -// - `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION -// - `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS -// - `ENABLED_INTEGRATION` - ENABLED_INTEGRATION -// - `DISABLED_INTEGRATION` - DISABLED_INTEGRATION -// - `ENABLED_CATEGORY` - ENABLED_CATEGORY -// - `DISABLED_CATEGORY` - DISABLED_CATEGORY -// - `CHANGED_PASSWORD` - CHANGED_PASSWORD -// - `RESET_PASSWORD` - RESET_PASSWORD -// - `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION -// - `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT -// - `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION -// - `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT -// - `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING -// - `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING -// - `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING -// - `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 -// - `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE -// - `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE -// - `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE -// - `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC -// - `MUTED_ISSUE` - MUTED_ISSUE -// - `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK -// - `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK -// - `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK -// - `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED -// - `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED -type AuditLogEventEventType struct { - typeName string - EventTypeEnum EventTypeEnum - String string -} - -func NewAuditLogEventEventTypeFromEventTypeEnum(value EventTypeEnum) *AuditLogEventEventType { - return &AuditLogEventEventType{typeName: "eventTypeEnum", EventTypeEnum: value} -} - -func NewAuditLogEventEventTypeFromString(value string) *AuditLogEventEventType { - return &AuditLogEventEventType{typeName: "string", String: value} + return a.Image } -func (a *AuditLogEventEventType) UnmarshalJSON(data []byte) error { - var valueEventTypeEnum EventTypeEnum - if err := json.Unmarshal(data, &valueEventTypeEnum); err == nil { - a.typeName = "eventTypeEnum" - a.EventTypeEnum = valueEventTypeEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" - a.String = valueString +func (a *AccountIntegration) GetSquareImage() *string { + if a == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, a) + return a.SquareImage } -func (a AuditLogEventEventType) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "eventTypeEnum": - return json.Marshal(a.EventTypeEnum) - case "string": - return json.Marshal(a.String) +func (a *AccountIntegration) GetColor() *string { + if a == nil { + return nil } + return a.Color } -type AuditLogEventEventTypeVisitor interface { - VisitEventTypeEnum(EventTypeEnum) error - VisitString(string) error -} - -func (a *AuditLogEventEventType) Accept(visitor AuditLogEventEventTypeVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "eventTypeEnum": - return visitor.VisitEventTypeEnum(a.EventTypeEnum) - case "string": - return visitor.VisitString(a.String) +func (a *AccountIntegration) GetSlug() *string { + if a == nil { + return nil } + return a.Slug } -// Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. -// -// - `ADMIN` - ADMIN -// - `DEVELOPER` - DEVELOPER -// - `MEMBER` - MEMBER -// - `API` - API -// - `SYSTEM` - SYSTEM -// - `MERGE_TEAM` - MERGE_TEAM -type AuditLogEventRole struct { - typeName string - RoleEnum RoleEnum - String string -} - -func NewAuditLogEventRoleFromRoleEnum(value RoleEnum) *AuditLogEventRole { - return &AuditLogEventRole{typeName: "roleEnum", RoleEnum: value} -} - -func NewAuditLogEventRoleFromString(value string) *AuditLogEventRole { - return &AuditLogEventRole{typeName: "string", String: value} -} - -func (a *AuditLogEventRole) UnmarshalJSON(data []byte) error { - var valueRoleEnum RoleEnum - if err := json.Unmarshal(data, &valueRoleEnum); err == nil { - a.typeName = "roleEnum" - a.RoleEnum = valueRoleEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" - a.String = valueString +func (a *AccountIntegration) GetApiEndpointsToDocumentationUrls() map[string]interface{} { + if a == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, a) + return a.ApiEndpointsToDocumentationUrls } -func (a AuditLogEventRole) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "roleEnum": - return json.Marshal(a.RoleEnum) - case "string": - return json.Marshal(a.String) +func (a *AccountIntegration) GetWebhookSetupGuideUrl() *string { + if a == nil { + return nil } + return a.WebhookSetupGuideUrl } -type AuditLogEventRoleVisitor interface { - VisitRoleEnum(RoleEnum) error - VisitString(string) error -} - -func (a *AuditLogEventRole) Accept(visitor AuditLogEventRoleVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "roleEnum": - return visitor.VisitRoleEnum(a.RoleEnum) - case "string": - return visitor.VisitString(a.String) +func (a *AccountIntegration) GetCategoryBetaStatus() map[string]interface{} { + if a == nil { + return nil } + return a.CategoryBetaStatus } -// # The AvailableActions Object -// -// ### Description -// -// The `Activity` object is used to see all available model/operation combinations for an integration. -// -// ### Usage Example -// -// Fetch all the actions available for the `Zenefits` integration. -type AvailableActions struct { - Integration *AccountIntegration `json:"integration,omitempty"` - PassthroughAvailable bool `json:"passthrough_available"` - AvailableModelOperations []*ModelOperation `json:"available_model_operations,omitempty"` - - _rawJSON json.RawMessage +func (a *AccountIntegration) GetExtraProperties() map[string]interface{} { + return a.extraProperties } -func (a *AvailableActions) UnmarshalJSON(data []byte) error { - type unmarshaler AvailableActions +func (a *AccountIntegration) UnmarshalJSON(data []byte) error { + type unmarshaler AccountIntegration var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *a = AvailableActions(value) - a._rawJSON = json.RawMessage(data) + *a = AccountIntegration(value) + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) return nil } -func (a *AvailableActions) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { +func (a *AccountIntegration) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(a); err == nil { + if value, err := internal.StringifyJSON(a); err == nil { return value } return fmt.Sprintf("%#v", a) } -// - `hris` - hris -// - `ats` - ats -// - `accounting` - accounting -// - `ticketing` - ticketing -// - `crm` - crm -// - `mktg` - mktg -// - `filestorage` - filestorage +// * `hris` - hris +// * `ats` - ats +// * `accounting` - accounting +// * `ticketing` - ticketing +// * `crm` - crm +// * `mktg` - mktg +// * `filestorage` - filestorage type CategoriesEnum string const ( @@ -649,13 +180,13 @@ func (c CategoriesEnum) Ptr() *CategoriesEnum { return &c } -// - `hris` - hris -// - `ats` - ats -// - `accounting` - accounting -// - `ticketing` - ticketing -// - `crm` - crm -// - `mktg` - mktg -// - `filestorage` - filestorage +// * `hris` - hris +// * `ats` - ats +// * `accounting` - accounting +// * `ticketing` - ticketing +// * `crm` - crm +// * `mktg` - mktg +// * `filestorage` - filestorage type CategoryEnum string const ( @@ -693,93 +224,90 @@ func (c CategoryEnum) Ptr() *CategoryEnum { return &c } -type CommonModelScopeApi struct { - // The common models you want to update the scopes for - CommonModels []*IndividualCommonModelScopeDeserializer `json:"common_models,omitempty"` +// # The DataPassthrough Object +// ### Description +// The `DataPassthrough` object is used to send information to an otherwise-unsupported third-party endpoint. +// +// ### Usage Example +// Create a `DataPassthrough` to get team hierarchies from your Rippling integration. +type DataPassthroughRequest struct { + Method MethodEnum `json:"method" url:"method"` + // The path of the request in the third party's platform. + Path string `json:"path" url:"path"` + // An optional override of the third party's base url for the request. + BaseUrlOverride *string `json:"base_url_override,omitempty" url:"base_url_override,omitempty"` + // The data with the request. You must include a `request_format` parameter matching the data's format + Data *string `json:"data,omitempty" url:"data,omitempty"` + // Pass an array of `MultipartFormField` objects in here instead of using the `data` param if `request_format` is set to `MULTIPART`. + MultipartFormData []*MultipartFormFieldRequest `json:"multipart_form_data,omitempty" url:"multipart_form_data,omitempty"` + // The headers to use for the request (Merge will handle the account's authorization headers). `Content-Type` header is required for passthrough. Choose content type corresponding to expected format of receiving server. + Headers map[string]interface{} `json:"headers,omitempty" url:"headers,omitempty"` + RequestFormat *RequestFormatEnum `json:"request_format,omitempty" url:"request_format,omitempty"` + // Optional. If true, the response will always be an object of the form `{"type": T, "value": ...}` where `T` will be one of `string, boolean, number, null, array, object`. + NormalizeResponse *bool `json:"normalize_response,omitempty" url:"normalize_response,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (c *CommonModelScopeApi) UnmarshalJSON(data []byte) error { - type unmarshaler CommonModelScopeApi - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (d *DataPassthroughRequest) GetMethod() MethodEnum { + if d == nil { + return "" } - *c = CommonModelScopeApi(value) - c._rawJSON = json.RawMessage(data) - return nil + return d.Method } -func (c *CommonModelScopeApi) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(c); err == nil { - return value +func (d *DataPassthroughRequest) GetPath() string { + if d == nil { + return "" } - return fmt.Sprintf("%#v", c) + return d.Path } -type CommonModelScopesBodyRequest struct { - ModelId string `json:"model_id"` - EnabledActions []EnabledActionsEnum `json:"enabled_actions,omitempty"` - DisabledFields []string `json:"disabled_fields,omitempty"` +func (d *DataPassthroughRequest) GetBaseUrlOverride() *string { + if d == nil { + return nil + } + return d.BaseUrlOverride +} - _rawJSON json.RawMessage +func (d *DataPassthroughRequest) GetData() *string { + if d == nil { + return nil + } + return d.Data } -func (c *CommonModelScopesBodyRequest) UnmarshalJSON(data []byte) error { - type unmarshaler CommonModelScopesBodyRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (d *DataPassthroughRequest) GetMultipartFormData() []*MultipartFormFieldRequest { + if d == nil { + return nil } - *c = CommonModelScopesBodyRequest(value) - c._rawJSON = json.RawMessage(data) - return nil + return d.MultipartFormData } -func (c *CommonModelScopesBodyRequest) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { - return value - } +func (d *DataPassthroughRequest) GetHeaders() map[string]interface{} { + if d == nil { + return nil } - if value, err := core.StringifyJSON(c); err == nil { - return value + return d.Headers +} + +func (d *DataPassthroughRequest) GetRequestFormat() *RequestFormatEnum { + if d == nil { + return nil } - return fmt.Sprintf("%#v", c) + return d.RequestFormat } -// # The DataPassthrough Object -// -// ### Description -// -// The `DataPassthrough` object is used to send information to an otherwise-unsupported third-party endpoint. -// -// ### Usage Example -// -// Create a `DataPassthrough` to get team hierarchies from your Rippling integration. -type DataPassthroughRequest struct { - Method MethodEnum `json:"method,omitempty"` - // The path of the request in the third party's platform. - Path string `json:"path"` - // An optional override of the third party's base url for the request. - BaseUrlOverride *string `json:"base_url_override,omitempty"` - // The data with the request. You must include a `request_format` parameter matching the data's format - Data *string `json:"data,omitempty"` - // Pass an array of `MultipartFormField` objects in here instead of using the `data` param if `request_format` is set to `MULTIPART`. - MultipartFormData []*MultipartFormFieldRequest `json:"multipart_form_data,omitempty"` - // The headers to use for the request (Merge will handle the account's authorization headers). `Content-Type` header is required for passthrough. Choose content type corresponding to expected format of receiving server. - Headers map[string]interface{} `json:"headers,omitempty"` - RequestFormat *RequestFormatEnum `json:"request_format,omitempty"` - // Optional. If true, the response will always be an object of the form `{"type": T, "value": ...}` where `T` will be one of `string, boolean, number, null, array, object`. - NormalizeResponse *bool `json:"normalize_response,omitempty"` +func (d *DataPassthroughRequest) GetNormalizeResponse() *bool { + if d == nil { + return nil + } + return d.NormalizeResponse +} - _rawJSON json.RawMessage +func (d *DataPassthroughRequest) GetExtraProperties() map[string]interface{} { + return d.extraProperties } func (d *DataPassthroughRequest) UnmarshalJSON(data []byte) error { @@ -789,59 +317,121 @@ func (d *DataPassthroughRequest) UnmarshalJSON(data []byte) error { return err } *d = DataPassthroughRequest(value) - d._rawJSON = json.RawMessage(data) + extraProperties, err := internal.ExtractExtraProperties(data, *d) + if err != nil { + return err + } + d.extraProperties = extraProperties + d.rawJSON = json.RawMessage(data) return nil } func (d *DataPassthroughRequest) String() string { - if len(d._rawJSON) > 0 { - if value, err := core.StringifyJSON(d._rawJSON); err == nil { + if len(d.rawJSON) > 0 { + if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(d); err == nil { + if value, err := internal.StringifyJSON(d); err == nil { return value } return fmt.Sprintf("%#v", d) } type DebugModeLog struct { - LogId string `json:"log_id"` - DashboardView string `json:"dashboard_view"` - LogSummary *DebugModelLogSummary `json:"log_summary,omitempty"` + LogId string `json:"log_id" url:"log_id"` + DashboardView string `json:"dashboard_view" url:"dashboard_view"` + LogSummary *DebugModelLogSummary `json:"log_summary" url:"log_summary"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (d *DebugModeLog) UnmarshalJSON(data []byte) error { - type unmarshaler DebugModeLog - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (d *DebugModeLog) GetLogId() string { + if d == nil { + return "" + } + return d.LogId +} + +func (d *DebugModeLog) GetDashboardView() string { + if d == nil { + return "" + } + return d.DashboardView +} + +func (d *DebugModeLog) GetLogSummary() *DebugModelLogSummary { + if d == nil { + return nil + } + return d.LogSummary +} + +func (d *DebugModeLog) GetExtraProperties() map[string]interface{} { + return d.extraProperties +} + +func (d *DebugModeLog) UnmarshalJSON(data []byte) error { + type unmarshaler DebugModeLog + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err } *d = DebugModeLog(value) - d._rawJSON = json.RawMessage(data) + extraProperties, err := internal.ExtractExtraProperties(data, *d) + if err != nil { + return err + } + d.extraProperties = extraProperties + d.rawJSON = json.RawMessage(data) return nil } func (d *DebugModeLog) String() string { - if len(d._rawJSON) > 0 { - if value, err := core.StringifyJSON(d._rawJSON); err == nil { + if len(d.rawJSON) > 0 { + if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(d); err == nil { + if value, err := internal.StringifyJSON(d); err == nil { return value } return fmt.Sprintf("%#v", d) } type DebugModelLogSummary struct { - Url string `json:"url"` - Method string `json:"method"` - StatusCode int `json:"status_code"` + Url string `json:"url" url:"url"` + Method string `json:"method" url:"method"` + StatusCode int `json:"status_code" url:"status_code"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (d *DebugModelLogSummary) GetUrl() string { + if d == nil { + return "" + } + return d.Url +} - _rawJSON json.RawMessage +func (d *DebugModelLogSummary) GetMethod() string { + if d == nil { + return "" + } + return d.Method +} + +func (d *DebugModelLogSummary) GetStatusCode() int { + if d == nil { + return 0 + } + return d.StatusCode +} + +func (d *DebugModelLogSummary) GetExtraProperties() map[string]interface{} { + return d.extraProperties } func (d *DebugModelLogSummary) UnmarshalJSON(data []byte) error { @@ -851,2030 +441,1004 @@ func (d *DebugModelLogSummary) UnmarshalJSON(data []byte) error { return err } *d = DebugModelLogSummary(value) - d._rawJSON = json.RawMessage(data) + extraProperties, err := internal.ExtractExtraProperties(data, *d) + if err != nil { + return err + } + d.extraProperties = extraProperties + d.rawJSON = json.RawMessage(data) return nil } func (d *DebugModelLogSummary) String() string { - if len(d._rawJSON) > 0 { - if value, err := core.StringifyJSON(d._rawJSON); err == nil { + if len(d.rawJSON) > 0 { + if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(d); err == nil { + if value, err := internal.StringifyJSON(d); err == nil { return value } return fmt.Sprintf("%#v", d) } // # The Drive Object -// // ### Description -// // The `Drive` object is used to represent a drive that contains the folders and files in the user's workspace. -// // ### Usage Example -// // Fetch from the `GET /api/filestorage/v1/drives` endpoint and view their drives. type Drive struct { - Id *string `json:"id,omitempty"` + Id *string `json:"id,omitempty" url:"id,omitempty"` // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` // The drive's name. - Name *string `json:"name,omitempty"` + Name *string `json:"name,omitempty" url:"name,omitempty"` // When the third party's drive was created. - RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty"` + RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty" url:"remote_created_at,omitempty"` // The drive's url. - DriveUrl *string `json:"drive_url,omitempty"` + DriveUrl *string `json:"drive_url,omitempty" url:"drive_url,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (d *Drive) UnmarshalJSON(data []byte) error { - type unmarshaler Drive - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (d *Drive) GetId() *string { + if d == nil { + return nil } - *d = Drive(value) - d._rawJSON = json.RawMessage(data) - return nil + return d.Id } -func (d *Drive) String() string { - if len(d._rawJSON) > 0 { - if value, err := core.StringifyJSON(d._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(d); err == nil { - return value +func (d *Drive) GetRemoteId() *string { + if d == nil { + return nil } - return fmt.Sprintf("%#v", d) + return d.RemoteId } -// - `READ` - READ -// - `WRITE` - WRITE -type EnabledActionsEnum string - -const ( - EnabledActionsEnumRead EnabledActionsEnum = "READ" - EnabledActionsEnumWrite EnabledActionsEnum = "WRITE" -) +func (d *Drive) GetCreatedAt() *time.Time { + if d == nil { + return nil + } + return d.CreatedAt +} -func NewEnabledActionsEnumFromString(s string) (EnabledActionsEnum, error) { - switch s { - case "READ": - return EnabledActionsEnumRead, nil - case "WRITE": - return EnabledActionsEnumWrite, nil +func (d *Drive) GetModifiedAt() *time.Time { + if d == nil { + return nil } - var t EnabledActionsEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) + return d.ModifiedAt } -func (e EnabledActionsEnum) Ptr() *EnabledActionsEnum { - return &e +func (d *Drive) GetName() *string { + if d == nil { + return nil + } + return d.Name } -// - `RAW` - RAW -// - `BASE64` - BASE64 -// - `GZIP_BASE64` - GZIP_BASE64 -type EncodingEnum string +func (d *Drive) GetRemoteCreatedAt() *time.Time { + if d == nil { + return nil + } + return d.RemoteCreatedAt +} -const ( - EncodingEnumRaw EncodingEnum = "RAW" - EncodingEnumBase64 EncodingEnum = "BASE64" - EncodingEnumGzipBase64 EncodingEnum = "GZIP_BASE64" -) +func (d *Drive) GetDriveUrl() *string { + if d == nil { + return nil + } + return d.DriveUrl +} -func NewEncodingEnumFromString(s string) (EncodingEnum, error) { - switch s { - case "RAW": - return EncodingEnumRaw, nil - case "BASE64": - return EncodingEnumBase64, nil - case "GZIP_BASE64": - return EncodingEnumGzipBase64, nil +func (d *Drive) GetRemoteWasDeleted() *bool { + if d == nil { + return nil } - var t EncodingEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) + return d.RemoteWasDeleted } -func (e EncodingEnum) Ptr() *EncodingEnum { - return &e +func (d *Drive) GetFieldMappings() map[string]interface{} { + if d == nil { + return nil + } + return d.FieldMappings } -type ErrorValidationProblem struct { - Source *ValidationProblemSource `json:"source,omitempty"` - Title string `json:"title"` - Detail string `json:"detail"` - ProblemType string `json:"problem_type"` +func (d *Drive) GetRemoteData() []*RemoteData { + if d == nil { + return nil + } + return d.RemoteData +} - _rawJSON json.RawMessage +func (d *Drive) GetExtraProperties() map[string]interface{} { + return d.extraProperties } -func (e *ErrorValidationProblem) UnmarshalJSON(data []byte) error { - type unmarshaler ErrorValidationProblem - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { +func (d *Drive) UnmarshalJSON(data []byte) error { + type embed Drive + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + }{ + embed: embed(*d), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { return err } - *e = ErrorValidationProblem(value) - e._rawJSON = json.RawMessage(data) + *d = Drive(unmarshaler.embed) + d.CreatedAt = unmarshaler.CreatedAt.TimePtr() + d.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + d.RemoteCreatedAt = unmarshaler.RemoteCreatedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *d) + if err != nil { + return err + } + d.extraProperties = extraProperties + d.rawJSON = json.RawMessage(data) return nil } -func (e *ErrorValidationProblem) String() string { - if len(e._rawJSON) > 0 { - if value, err := core.StringifyJSON(e._rawJSON); err == nil { +func (d *Drive) MarshalJSON() ([]byte, error) { + type embed Drive + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + }{ + embed: embed(*d), + CreatedAt: internal.NewOptionalDateTime(d.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(d.ModifiedAt), + RemoteCreatedAt: internal.NewOptionalDateTime(d.RemoteCreatedAt), + } + return json.Marshal(marshaler) +} + +func (d *Drive) String() string { + if len(d.rawJSON) > 0 { + if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(e); err == nil { + if value, err := internal.StringifyJSON(d); err == nil { return value } - return fmt.Sprintf("%#v", e) + return fmt.Sprintf("%#v", d) } -// - `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY -// - `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY -// - `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY -// - `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY -// - `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY -// - `INVITED_USER` - INVITED_USER -// - `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED -// - `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED -// - `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT -// - `CREATED_DESTINATION` - CREATED_DESTINATION -// - `DELETED_DESTINATION` - DELETED_DESTINATION -// - `CHANGED_DESTINATION` - CHANGED_DESTINATION -// - `CHANGED_SCOPES` - CHANGED_SCOPES -// - `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION -// - `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS -// - `ENABLED_INTEGRATION` - ENABLED_INTEGRATION -// - `DISABLED_INTEGRATION` - DISABLED_INTEGRATION -// - `ENABLED_CATEGORY` - ENABLED_CATEGORY -// - `DISABLED_CATEGORY` - DISABLED_CATEGORY -// - `CHANGED_PASSWORD` - CHANGED_PASSWORD -// - `RESET_PASSWORD` - RESET_PASSWORD -// - `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION -// - `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT -// - `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION -// - `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT -// - `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING -// - `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING -// - `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING -// - `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 -// - `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE -// - `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE -// - `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE -// - `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC -// - `MUTED_ISSUE` - MUTED_ISSUE -// - `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK -// - `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK -// - `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK -// - `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED -// - `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED -type EventTypeEnum string +// * `RAW` - RAW +// * `BASE64` - BASE64 +// * `GZIP_BASE64` - GZIP_BASE64 +type EncodingEnum string const ( - EventTypeEnumCreatedRemoteProductionApiKey EventTypeEnum = "CREATED_REMOTE_PRODUCTION_API_KEY" - EventTypeEnumDeletedRemoteProductionApiKey EventTypeEnum = "DELETED_REMOTE_PRODUCTION_API_KEY" - EventTypeEnumCreatedTestApiKey EventTypeEnum = "CREATED_TEST_API_KEY" - EventTypeEnumDeletedTestApiKey EventTypeEnum = "DELETED_TEST_API_KEY" - EventTypeEnumRegeneratedProductionApiKey EventTypeEnum = "REGENERATED_PRODUCTION_API_KEY" - EventTypeEnumInvitedUser EventTypeEnum = "INVITED_USER" - EventTypeEnumTwoFactorAuthEnabled EventTypeEnum = "TWO_FACTOR_AUTH_ENABLED" - EventTypeEnumTwoFactorAuthDisabled EventTypeEnum = "TWO_FACTOR_AUTH_DISABLED" - EventTypeEnumDeletedLinkedAccount EventTypeEnum = "DELETED_LINKED_ACCOUNT" - EventTypeEnumCreatedDestination EventTypeEnum = "CREATED_DESTINATION" - EventTypeEnumDeletedDestination EventTypeEnum = "DELETED_DESTINATION" - EventTypeEnumChangedDestination EventTypeEnum = "CHANGED_DESTINATION" - EventTypeEnumChangedScopes EventTypeEnum = "CHANGED_SCOPES" - EventTypeEnumChangedPersonalInformation EventTypeEnum = "CHANGED_PERSONAL_INFORMATION" - EventTypeEnumChangedOrganizationSettings EventTypeEnum = "CHANGED_ORGANIZATION_SETTINGS" - EventTypeEnumEnabledIntegration EventTypeEnum = "ENABLED_INTEGRATION" - EventTypeEnumDisabledIntegration EventTypeEnum = "DISABLED_INTEGRATION" - EventTypeEnumEnabledCategory EventTypeEnum = "ENABLED_CATEGORY" - EventTypeEnumDisabledCategory EventTypeEnum = "DISABLED_CATEGORY" - EventTypeEnumChangedPassword EventTypeEnum = "CHANGED_PASSWORD" - EventTypeEnumResetPassword EventTypeEnum = "RESET_PASSWORD" - EventTypeEnumEnabledRedactUnmappedDataForOrganization EventTypeEnum = "ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION" - EventTypeEnumEnabledRedactUnmappedDataForLinkedAccount EventTypeEnum = "ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT" - EventTypeEnumDisabledRedactUnmappedDataForOrganization EventTypeEnum = "DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION" - EventTypeEnumDisabledRedactUnmappedDataForLinkedAccount EventTypeEnum = "DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT" - EventTypeEnumCreatedIntegrationWideFieldMapping EventTypeEnum = "CREATED_INTEGRATION_WIDE_FIELD_MAPPING" - EventTypeEnumCreatedLinkedAccountFieldMapping EventTypeEnum = "CREATED_LINKED_ACCOUNT_FIELD_MAPPING" - EventTypeEnumChangedIntegrationWideFieldMapping EventTypeEnum = "CHANGED_INTEGRATION_WIDE_FIELD_MAPPING" - EventTypeEnumChangedLinkedAccountFieldMapping EventTypeEnum = "CHANGED_LINKED_ACCOUNT_FIELD_MAPPING" - EventTypeEnumDeletedIntegrationWideFieldMapping EventTypeEnum = "DELETED_INTEGRATION_WIDE_FIELD_MAPPING" - EventTypeEnumDeletedLinkedAccountFieldMapping EventTypeEnum = "DELETED_LINKED_ACCOUNT_FIELD_MAPPING" - EventTypeEnumCreatedLinkedAccountCommonModelOverride EventTypeEnum = "CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE" - EventTypeEnumChangedLinkedAccountCommonModelOverride EventTypeEnum = "CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE" - EventTypeEnumDeletedLinkedAccountCommonModelOverride EventTypeEnum = "DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE" - EventTypeEnumForcedLinkedAccountResync EventTypeEnum = "FORCED_LINKED_ACCOUNT_RESYNC" - EventTypeEnumMutedIssue EventTypeEnum = "MUTED_ISSUE" - EventTypeEnumGeneratedMagicLink EventTypeEnum = "GENERATED_MAGIC_LINK" - EventTypeEnumEnabledMergeWebhook EventTypeEnum = "ENABLED_MERGE_WEBHOOK" - EventTypeEnumDisabledMergeWebhook EventTypeEnum = "DISABLED_MERGE_WEBHOOK" - EventTypeEnumMergeWebhookTargetChanged EventTypeEnum = "MERGE_WEBHOOK_TARGET_CHANGED" - EventTypeEnumEndUserCredentialsAccessed EventTypeEnum = "END_USER_CREDENTIALS_ACCESSED" + EncodingEnumRaw EncodingEnum = "RAW" + EncodingEnumBase64 EncodingEnum = "BASE64" + EncodingEnumGzipBase64 EncodingEnum = "GZIP_BASE64" ) -func NewEventTypeEnumFromString(s string) (EventTypeEnum, error) { +func NewEncodingEnumFromString(s string) (EncodingEnum, error) { switch s { - case "CREATED_REMOTE_PRODUCTION_API_KEY": - return EventTypeEnumCreatedRemoteProductionApiKey, nil - case "DELETED_REMOTE_PRODUCTION_API_KEY": - return EventTypeEnumDeletedRemoteProductionApiKey, nil - case "CREATED_TEST_API_KEY": - return EventTypeEnumCreatedTestApiKey, nil - case "DELETED_TEST_API_KEY": - return EventTypeEnumDeletedTestApiKey, nil - case "REGENERATED_PRODUCTION_API_KEY": - return EventTypeEnumRegeneratedProductionApiKey, nil - case "INVITED_USER": - return EventTypeEnumInvitedUser, nil - case "TWO_FACTOR_AUTH_ENABLED": - return EventTypeEnumTwoFactorAuthEnabled, nil - case "TWO_FACTOR_AUTH_DISABLED": - return EventTypeEnumTwoFactorAuthDisabled, nil - case "DELETED_LINKED_ACCOUNT": - return EventTypeEnumDeletedLinkedAccount, nil - case "CREATED_DESTINATION": - return EventTypeEnumCreatedDestination, nil - case "DELETED_DESTINATION": - return EventTypeEnumDeletedDestination, nil - case "CHANGED_DESTINATION": - return EventTypeEnumChangedDestination, nil - case "CHANGED_SCOPES": - return EventTypeEnumChangedScopes, nil - case "CHANGED_PERSONAL_INFORMATION": - return EventTypeEnumChangedPersonalInformation, nil - case "CHANGED_ORGANIZATION_SETTINGS": - return EventTypeEnumChangedOrganizationSettings, nil - case "ENABLED_INTEGRATION": - return EventTypeEnumEnabledIntegration, nil - case "DISABLED_INTEGRATION": - return EventTypeEnumDisabledIntegration, nil - case "ENABLED_CATEGORY": - return EventTypeEnumEnabledCategory, nil - case "DISABLED_CATEGORY": - return EventTypeEnumDisabledCategory, nil - case "CHANGED_PASSWORD": - return EventTypeEnumChangedPassword, nil - case "RESET_PASSWORD": - return EventTypeEnumResetPassword, nil - case "ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION": - return EventTypeEnumEnabledRedactUnmappedDataForOrganization, nil - case "ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT": - return EventTypeEnumEnabledRedactUnmappedDataForLinkedAccount, nil - case "DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION": - return EventTypeEnumDisabledRedactUnmappedDataForOrganization, nil - case "DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT": - return EventTypeEnumDisabledRedactUnmappedDataForLinkedAccount, nil - case "CREATED_INTEGRATION_WIDE_FIELD_MAPPING": - return EventTypeEnumCreatedIntegrationWideFieldMapping, nil - case "CREATED_LINKED_ACCOUNT_FIELD_MAPPING": - return EventTypeEnumCreatedLinkedAccountFieldMapping, nil - case "CHANGED_INTEGRATION_WIDE_FIELD_MAPPING": - return EventTypeEnumChangedIntegrationWideFieldMapping, nil - case "CHANGED_LINKED_ACCOUNT_FIELD_MAPPING": - return EventTypeEnumChangedLinkedAccountFieldMapping, nil - case "DELETED_INTEGRATION_WIDE_FIELD_MAPPING": - return EventTypeEnumDeletedIntegrationWideFieldMapping, nil - case "DELETED_LINKED_ACCOUNT_FIELD_MAPPING": - return EventTypeEnumDeletedLinkedAccountFieldMapping, nil - case "CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE": - return EventTypeEnumCreatedLinkedAccountCommonModelOverride, nil - case "CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE": - return EventTypeEnumChangedLinkedAccountCommonModelOverride, nil - case "DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE": - return EventTypeEnumDeletedLinkedAccountCommonModelOverride, nil - case "FORCED_LINKED_ACCOUNT_RESYNC": - return EventTypeEnumForcedLinkedAccountResync, nil - case "MUTED_ISSUE": - return EventTypeEnumMutedIssue, nil - case "GENERATED_MAGIC_LINK": - return EventTypeEnumGeneratedMagicLink, nil - case "ENABLED_MERGE_WEBHOOK": - return EventTypeEnumEnabledMergeWebhook, nil - case "DISABLED_MERGE_WEBHOOK": - return EventTypeEnumDisabledMergeWebhook, nil - case "MERGE_WEBHOOK_TARGET_CHANGED": - return EventTypeEnumMergeWebhookTargetChanged, nil - case "END_USER_CREDENTIALS_ACCESSED": - return EventTypeEnumEndUserCredentialsAccessed, nil - } - var t EventTypeEnum + case "RAW": + return EncodingEnumRaw, nil + case "BASE64": + return EncodingEnumBase64, nil + case "GZIP_BASE64": + return EncodingEnumGzipBase64, nil + } + var t EncodingEnum return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (e EventTypeEnum) Ptr() *EventTypeEnum { +func (e EncodingEnum) Ptr() *EncodingEnum { return &e } -type ExternalTargetFieldApi struct { - Name *string `json:"name,omitempty"` - Description *string `json:"description,omitempty"` - IsMapped *string `json:"is_mapped,omitempty"` +type ErrorValidationProblem struct { + Source *ValidationProblemSource `json:"source,omitempty" url:"source,omitempty"` + Title string `json:"title" url:"title"` + Detail string `json:"detail" url:"detail"` + ProblemType string `json:"problem_type" url:"problem_type"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (e *ExternalTargetFieldApi) UnmarshalJSON(data []byte) error { - type unmarshaler ExternalTargetFieldApi - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (e *ErrorValidationProblem) GetSource() *ValidationProblemSource { + if e == nil { + return nil } - *e = ExternalTargetFieldApi(value) - e._rawJSON = json.RawMessage(data) - return nil + return e.Source } -func (e *ExternalTargetFieldApi) String() string { - if len(e._rawJSON) > 0 { - if value, err := core.StringifyJSON(e._rawJSON); err == nil { - return value - } +func (e *ErrorValidationProblem) GetTitle() string { + if e == nil { + return "" } - if value, err := core.StringifyJSON(e); err == nil { - return value - } - return fmt.Sprintf("%#v", e) -} - -type ExternalTargetFieldApiResponse struct { - File []*ExternalTargetFieldApi `json:"File,omitempty"` - Folder []*ExternalTargetFieldApi `json:"Folder,omitempty"` - Drive []*ExternalTargetFieldApi `json:"Drive,omitempty"` - Group []*ExternalTargetFieldApi `json:"Group,omitempty"` - User []*ExternalTargetFieldApi `json:"User,omitempty"` - - _rawJSON json.RawMessage + return e.Title } -func (e *ExternalTargetFieldApiResponse) UnmarshalJSON(data []byte) error { - type unmarshaler ExternalTargetFieldApiResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (e *ErrorValidationProblem) GetDetail() string { + if e == nil { + return "" } - *e = ExternalTargetFieldApiResponse(value) - e._rawJSON = json.RawMessage(data) - return nil + return e.Detail } -func (e *ExternalTargetFieldApiResponse) String() string { - if len(e._rawJSON) > 0 { - if value, err := core.StringifyJSON(e._rawJSON); err == nil { - return value - } +func (e *ErrorValidationProblem) GetProblemType() string { + if e == nil { + return "" } - if value, err := core.StringifyJSON(e); err == nil { - return value - } - return fmt.Sprintf("%#v", e) + return e.ProblemType } -type FieldMappingApiInstance struct { - Id *string `json:"id,omitempty"` - IsIntegrationWide *bool `json:"is_integration_wide,omitempty"` - TargetField *FieldMappingApiInstanceTargetField `json:"target_field,omitempty"` - RemoteField *FieldMappingApiInstanceRemoteField `json:"remote_field,omitempty"` - - _rawJSON json.RawMessage +func (e *ErrorValidationProblem) GetExtraProperties() map[string]interface{} { + return e.extraProperties } -func (f *FieldMappingApiInstance) UnmarshalJSON(data []byte) error { - type unmarshaler FieldMappingApiInstance +func (e *ErrorValidationProblem) UnmarshalJSON(data []byte) error { + type unmarshaler ErrorValidationProblem var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *f = FieldMappingApiInstance(value) - f._rawJSON = json.RawMessage(data) - return nil -} - -func (f *FieldMappingApiInstance) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(f); err == nil { - return value - } - return fmt.Sprintf("%#v", f) -} - -type FieldMappingApiInstanceRemoteField struct { - RemoteKeyName *string `json:"remote_key_name,omitempty"` - Schema map[string]interface{} `json:"schema,omitempty"` - RemoteEndpointInfo *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo `json:"remote_endpoint_info,omitempty"` - - _rawJSON json.RawMessage -} - -func (f *FieldMappingApiInstanceRemoteField) UnmarshalJSON(data []byte) error { - type unmarshaler FieldMappingApiInstanceRemoteField - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { + *e = ErrorValidationProblem(value) + extraProperties, err := internal.ExtractExtraProperties(data, *e) + if err != nil { return err } - *f = FieldMappingApiInstanceRemoteField(value) - f._rawJSON = json.RawMessage(data) + e.extraProperties = extraProperties + e.rawJSON = json.RawMessage(data) return nil } -func (f *FieldMappingApiInstanceRemoteField) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { +func (e *ErrorValidationProblem) String() string { + if len(e.rawJSON) > 0 { + if value, err := internal.StringifyJSON(e.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(f); err == nil { + if value, err := internal.StringifyJSON(e); err == nil { return value } - return fmt.Sprintf("%#v", f) + return fmt.Sprintf("%#v", e) } -type FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo struct { - Method *string `json:"method,omitempty"` - UrlPath *string `json:"url_path,omitempty"` - FieldTraversalPath []string `json:"field_traversal_path,omitempty"` +type FieldPermissionDeserializerRequest struct { + EnabledFields []interface{} `json:"enabled_fields,omitempty" url:"enabled_fields,omitempty"` + DisabledFields []interface{} `json:"disabled_fields,omitempty" url:"disabled_fields,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (f *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo) UnmarshalJSON(data []byte) error { - type unmarshaler FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (f *FieldPermissionDeserializerRequest) GetEnabledFields() []interface{} { + if f == nil { + return nil } - *f = FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo(value) - f._rawJSON = json.RawMessage(data) - return nil + return f.EnabledFields } -func (f *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(f); err == nil { - return value +func (f *FieldPermissionDeserializerRequest) GetDisabledFields() []interface{} { + if f == nil { + return nil } - return fmt.Sprintf("%#v", f) + return f.DisabledFields } -type FieldMappingApiInstanceResponse struct { - File []*FieldMappingApiInstance `json:"File,omitempty"` - Folder []*FieldMappingApiInstance `json:"Folder,omitempty"` - Drive []*FieldMappingApiInstance `json:"Drive,omitempty"` - Group []*FieldMappingApiInstance `json:"Group,omitempty"` - User []*FieldMappingApiInstance `json:"User,omitempty"` - - _rawJSON json.RawMessage +func (f *FieldPermissionDeserializerRequest) GetExtraProperties() map[string]interface{} { + return f.extraProperties } -func (f *FieldMappingApiInstanceResponse) UnmarshalJSON(data []byte) error { - type unmarshaler FieldMappingApiInstanceResponse +func (f *FieldPermissionDeserializerRequest) UnmarshalJSON(data []byte) error { + type unmarshaler FieldPermissionDeserializerRequest var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *f = FieldMappingApiInstanceResponse(value) - f._rawJSON = json.RawMessage(data) - return nil -} - -func (f *FieldMappingApiInstanceResponse) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(f); err == nil { - return value - } - return fmt.Sprintf("%#v", f) -} - -type FieldMappingApiInstanceTargetField struct { - Name string `json:"name"` - Description string `json:"description"` - IsOrganizationWide bool `json:"is_organization_wide"` - - _rawJSON json.RawMessage -} - -func (f *FieldMappingApiInstanceTargetField) UnmarshalJSON(data []byte) error { - type unmarshaler FieldMappingApiInstanceTargetField - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { + *f = FieldPermissionDeserializerRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { return err } - *f = FieldMappingApiInstanceTargetField(value) - f._rawJSON = json.RawMessage(data) + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) return nil } -func (f *FieldMappingApiInstanceTargetField) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { +func (f *FieldPermissionDeserializerRequest) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(f); err == nil { + if value, err := internal.StringifyJSON(f); err == nil { return value } return fmt.Sprintf("%#v", f) } -type FieldMappingInstanceResponse struct { - Model *FieldMappingApiInstance `json:"model,omitempty"` - Warnings []*WarningValidationProblem `json:"warnings,omitempty"` - Errors []*ErrorValidationProblem `json:"errors,omitempty"` - Logs []*DebugModeLog `json:"logs,omitempty"` +// # The Folder Object +// ### Description +// The `Folder` object is used to represent a collection of files and/or folders in the workspace. Could be within a drive, if it exists. +// ### Usage Example +// Fetch from the `GET /api/filestorage/v1/folders` endpoint and view their folders. +type Folder struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The folder's name. + Name *string `json:"name,omitempty" url:"name,omitempty"` + // The URL to access the folder. + FolderUrl *string `json:"folder_url,omitempty" url:"folder_url,omitempty"` + // The folder's size, in bytes. + Size *int64 `json:"size,omitempty" url:"size,omitempty"` + // The folder's description. + Description *string `json:"description,omitempty" url:"description,omitempty"` + // The folder that the folder belongs to. + ParentFolder *FolderParentFolder `json:"parent_folder,omitempty" url:"parent_folder,omitempty"` + // The drive that the folder belongs to. + Drive *FolderDrive `json:"drive,omitempty" url:"drive,omitempty"` + // The Permission object is used to represent a user's or group's access to a File or Folder. Permissions are unexpanded by default. Use the query param `expand=permissions` to see more details under `GET /folders`. + Permissions *FolderPermissions `json:"permissions,omitempty" url:"permissions,omitempty"` + // When the third party's folder was created. + RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty" url:"remote_created_at,omitempty"` + // When the third party's folder was updated. + RemoteUpdatedAt *time.Time `json:"remote_updated_at,omitempty" url:"remote_updated_at,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (f *FieldMappingInstanceResponse) UnmarshalJSON(data []byte) error { - type unmarshaler FieldMappingInstanceResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (f *Folder) GetId() *string { + if f == nil { + return nil } - *f = FieldMappingInstanceResponse(value) - f._rawJSON = json.RawMessage(data) - return nil + return f.Id } -func (f *FieldMappingInstanceResponse) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(f); err == nil { - return value +func (f *Folder) GetRemoteId() *string { + if f == nil { + return nil } - return fmt.Sprintf("%#v", f) -} - -type FieldPermissionDeserializer struct { - EnabledFields []interface{} `json:"enabled_fields,omitempty"` - DisabledFields []interface{} `json:"disabled_fields,omitempty"` - - _rawJSON json.RawMessage + return f.RemoteId } -func (f *FieldPermissionDeserializer) UnmarshalJSON(data []byte) error { - type unmarshaler FieldPermissionDeserializer - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (f *Folder) GetCreatedAt() *time.Time { + if f == nil { + return nil } - *f = FieldPermissionDeserializer(value) - f._rawJSON = json.RawMessage(data) - return nil + return f.CreatedAt } -func (f *FieldPermissionDeserializer) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(f); err == nil { - return value +func (f *Folder) GetModifiedAt() *time.Time { + if f == nil { + return nil } - return fmt.Sprintf("%#v", f) -} - -type FieldPermissionDeserializerRequest struct { - EnabledFields []interface{} `json:"enabled_fields,omitempty"` - DisabledFields []interface{} `json:"disabled_fields,omitempty"` - - _rawJSON json.RawMessage + return f.ModifiedAt } -func (f *FieldPermissionDeserializerRequest) UnmarshalJSON(data []byte) error { - type unmarshaler FieldPermissionDeserializerRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *f = FieldPermissionDeserializerRequest(value) - f._rawJSON = json.RawMessage(data) - return nil -} - -func (f *FieldPermissionDeserializerRequest) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(f); err == nil { - return value - } - return fmt.Sprintf("%#v", f) -} - -// # The File Object -// -// ### Description -// -// The `File` object is used to represent a file in the workspace. The Object typically exists under a folder or drive, if it exists. -// -// ### Usage Example -// -// Fetch from the `GET /api/filestorage/v1/files` endpoint and view their files. -type File struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The file's name. - Name *string `json:"name,omitempty"` - // The URL to access the file. - FileUrl *string `json:"file_url,omitempty"` - // The URL that produces a thumbnail preview of the file. Typically an image. - FileThumbnailUrl *string `json:"file_thumbnail_url,omitempty"` - // The file's size, in bytes. - Size *int64 `json:"size,omitempty"` - // The file's mime type. - MimeType *string `json:"mime_type,omitempty"` - // The file's description. - Description *string `json:"description,omitempty"` - // The folder that the file belongs to. - Folder *FileFolder `json:"folder,omitempty"` - // The Permission object is used to represent a user's or group's access to a File or Folder. Permissions are unexpanded by default. Use the query param `expand=permissions` to see more details under `GET /files`. - Permissions *FilePermissions `json:"permissions,omitempty"` - // The drive that the file belongs to. - Drive *FileDrive `json:"drive,omitempty"` - // When the third party's file was created. - RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty"` - // When the third party's file was updated. - RemoteUpdatedAt *time.Time `json:"remote_updated_at,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` - - _rawJSON json.RawMessage -} - -func (f *File) UnmarshalJSON(data []byte) error { - type unmarshaler File - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *f = File(value) - f._rawJSON = json.RawMessage(data) - return nil -} - -func (f *File) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(f); err == nil { - return value - } - return fmt.Sprintf("%#v", f) -} - -// The drive that the file belongs to. -type FileDrive struct { - typeName string - String string - Drive *Drive -} - -func NewFileDriveFromString(value string) *FileDrive { - return &FileDrive{typeName: "string", String: value} -} - -func NewFileDriveFromDrive(value *Drive) *FileDrive { - return &FileDrive{typeName: "drive", Drive: value} -} - -func (f *FileDrive) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - f.typeName = "string" - f.String = valueString - return nil - } - valueDrive := new(Drive) - if err := json.Unmarshal(data, &valueDrive); err == nil { - f.typeName = "drive" - f.Drive = valueDrive - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, f) -} - -func (f FileDrive) MarshalJSON() ([]byte, error) { - switch f.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", f.typeName, f) - case "string": - return json.Marshal(f.String) - case "drive": - return json.Marshal(f.Drive) - } -} - -type FileDriveVisitor interface { - VisitString(string) error - VisitDrive(*Drive) error -} - -func (f *FileDrive) Accept(visitor FileDriveVisitor) error { - switch f.typeName { - default: - return fmt.Errorf("invalid type %s in %T", f.typeName, f) - case "string": - return visitor.VisitString(f.String) - case "drive": - return visitor.VisitDrive(f.Drive) - } -} - -// The folder that the file belongs to. -type FileFolder struct { - typeName string - String string - Folder *Folder -} - -func NewFileFolderFromString(value string) *FileFolder { - return &FileFolder{typeName: "string", String: value} -} - -func NewFileFolderFromFolder(value *Folder) *FileFolder { - return &FileFolder{typeName: "folder", Folder: value} -} - -func (f *FileFolder) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - f.typeName = "string" - f.String = valueString - return nil - } - valueFolder := new(Folder) - if err := json.Unmarshal(data, &valueFolder); err == nil { - f.typeName = "folder" - f.Folder = valueFolder - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, f) -} - -func (f FileFolder) MarshalJSON() ([]byte, error) { - switch f.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", f.typeName, f) - case "string": - return json.Marshal(f.String) - case "folder": - return json.Marshal(f.Folder) - } -} - -type FileFolderVisitor interface { - VisitString(string) error - VisitFolder(*Folder) error -} - -func (f *FileFolder) Accept(visitor FileFolderVisitor) error { - switch f.typeName { - default: - return fmt.Errorf("invalid type %s in %T", f.typeName, f) - case "string": - return visitor.VisitString(f.String) - case "folder": - return visitor.VisitFolder(f.Folder) - } -} - -// The Permission object is used to represent a user's or group's access to a File or Folder. Permissions are unexpanded by default. Use the query param `expand=permissions` to see more details under `GET /files`. -type FilePermissions struct { - typeName string - String string - PermissionRequest *PermissionRequest - FilePermissionsItemList []*FilePermissionsItem -} - -func NewFilePermissionsFromString(value string) *FilePermissions { - return &FilePermissions{typeName: "string", String: value} -} - -func NewFilePermissionsFromPermissionRequest(value *PermissionRequest) *FilePermissions { - return &FilePermissions{typeName: "permissionRequest", PermissionRequest: value} -} - -func NewFilePermissionsFromFilePermissionsItemList(value []*FilePermissionsItem) *FilePermissions { - return &FilePermissions{typeName: "filePermissionsItemList", FilePermissionsItemList: value} -} - -func (f *FilePermissions) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - f.typeName = "string" - f.String = valueString - return nil - } - valuePermissionRequest := new(PermissionRequest) - if err := json.Unmarshal(data, &valuePermissionRequest); err == nil { - f.typeName = "permissionRequest" - f.PermissionRequest = valuePermissionRequest - return nil - } - var valueFilePermissionsItemList []*FilePermissionsItem - if err := json.Unmarshal(data, &valueFilePermissionsItemList); err == nil { - f.typeName = "filePermissionsItemList" - f.FilePermissionsItemList = valueFilePermissionsItemList - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, f) -} - -func (f FilePermissions) MarshalJSON() ([]byte, error) { - switch f.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", f.typeName, f) - case "string": - return json.Marshal(f.String) - case "permissionRequest": - return json.Marshal(f.PermissionRequest) - case "filePermissionsItemList": - return json.Marshal(f.FilePermissionsItemList) - } -} - -type FilePermissionsVisitor interface { - VisitString(string) error - VisitPermissionRequest(*PermissionRequest) error - VisitFilePermissionsItemList([]*FilePermissionsItem) error -} - -func (f *FilePermissions) Accept(visitor FilePermissionsVisitor) error { - switch f.typeName { - default: - return fmt.Errorf("invalid type %s in %T", f.typeName, f) - case "string": - return visitor.VisitString(f.String) - case "permissionRequest": - return visitor.VisitPermissionRequest(f.PermissionRequest) - case "filePermissionsItemList": - return visitor.VisitFilePermissionsItemList(f.FilePermissionsItemList) - } -} - -type FilePermissionsItem struct { - typeName string - String string - PermissionRequest *PermissionRequest -} - -func NewFilePermissionsItemFromString(value string) *FilePermissionsItem { - return &FilePermissionsItem{typeName: "string", String: value} -} - -func NewFilePermissionsItemFromPermissionRequest(value *PermissionRequest) *FilePermissionsItem { - return &FilePermissionsItem{typeName: "permissionRequest", PermissionRequest: value} -} - -func (f *FilePermissionsItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - f.typeName = "string" - f.String = valueString - return nil - } - valuePermissionRequest := new(PermissionRequest) - if err := json.Unmarshal(data, &valuePermissionRequest); err == nil { - f.typeName = "permissionRequest" - f.PermissionRequest = valuePermissionRequest - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, f) -} - -func (f FilePermissionsItem) MarshalJSON() ([]byte, error) { - switch f.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", f.typeName, f) - case "string": - return json.Marshal(f.String) - case "permissionRequest": - return json.Marshal(f.PermissionRequest) - } -} - -type FilePermissionsItemVisitor interface { - VisitString(string) error - VisitPermissionRequest(*PermissionRequest) error -} - -func (f *FilePermissionsItem) Accept(visitor FilePermissionsItemVisitor) error { - switch f.typeName { - default: - return fmt.Errorf("invalid type %s in %T", f.typeName, f) - case "string": - return visitor.VisitString(f.String) - case "permissionRequest": - return visitor.VisitPermissionRequest(f.PermissionRequest) - } -} - -// # The File Object -// -// ### Description -// -// The `File` object is used to represent a file in the workspace. The Object typically exists under a folder or drive, if it exists. -// -// ### Usage Example -// -// Fetch from the `GET /api/filestorage/v1/files` endpoint and view their files. -type FileRequest struct { - // The file's name. - Name *string `json:"name,omitempty"` - // The URL to access the file. - FileUrl *string `json:"file_url,omitempty"` - // The URL that produces a thumbnail preview of the file. Typically an image. - FileThumbnailUrl *string `json:"file_thumbnail_url,omitempty"` - // The file's size, in bytes. - Size *int64 `json:"size,omitempty"` - // The file's mime type. - MimeType *string `json:"mime_type,omitempty"` - // The file's description. - Description *string `json:"description,omitempty"` - // The folder that the file belongs to. - Folder *FileRequestFolder `json:"folder,omitempty"` - // The Permission object is used to represent a user's or group's access to a File or Folder. Permissions are unexpanded by default. Use the query param `expand=permissions` to see more details under `GET /files`. - Permissions *FileRequestPermissions `json:"permissions,omitempty"` - // The drive that the file belongs to. - Drive *FileRequestDrive `json:"drive,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` - - _rawJSON json.RawMessage -} - -func (f *FileRequest) UnmarshalJSON(data []byte) error { - type unmarshaler FileRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *f = FileRequest(value) - f._rawJSON = json.RawMessage(data) - return nil -} - -func (f *FileRequest) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(f); err == nil { - return value - } - return fmt.Sprintf("%#v", f) -} - -// The drive that the file belongs to. -type FileRequestDrive struct { - typeName string - String string - Drive *Drive -} - -func NewFileRequestDriveFromString(value string) *FileRequestDrive { - return &FileRequestDrive{typeName: "string", String: value} -} - -func NewFileRequestDriveFromDrive(value *Drive) *FileRequestDrive { - return &FileRequestDrive{typeName: "drive", Drive: value} -} - -func (f *FileRequestDrive) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - f.typeName = "string" - f.String = valueString - return nil - } - valueDrive := new(Drive) - if err := json.Unmarshal(data, &valueDrive); err == nil { - f.typeName = "drive" - f.Drive = valueDrive - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, f) -} - -func (f FileRequestDrive) MarshalJSON() ([]byte, error) { - switch f.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", f.typeName, f) - case "string": - return json.Marshal(f.String) - case "drive": - return json.Marshal(f.Drive) - } -} - -type FileRequestDriveVisitor interface { - VisitString(string) error - VisitDrive(*Drive) error -} - -func (f *FileRequestDrive) Accept(visitor FileRequestDriveVisitor) error { - switch f.typeName { - default: - return fmt.Errorf("invalid type %s in %T", f.typeName, f) - case "string": - return visitor.VisitString(f.String) - case "drive": - return visitor.VisitDrive(f.Drive) - } -} - -// The folder that the file belongs to. -type FileRequestFolder struct { - typeName string - String string - Folder *Folder -} - -func NewFileRequestFolderFromString(value string) *FileRequestFolder { - return &FileRequestFolder{typeName: "string", String: value} -} - -func NewFileRequestFolderFromFolder(value *Folder) *FileRequestFolder { - return &FileRequestFolder{typeName: "folder", Folder: value} -} - -func (f *FileRequestFolder) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - f.typeName = "string" - f.String = valueString - return nil - } - valueFolder := new(Folder) - if err := json.Unmarshal(data, &valueFolder); err == nil { - f.typeName = "folder" - f.Folder = valueFolder - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, f) -} - -func (f FileRequestFolder) MarshalJSON() ([]byte, error) { - switch f.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", f.typeName, f) - case "string": - return json.Marshal(f.String) - case "folder": - return json.Marshal(f.Folder) - } -} - -type FileRequestFolderVisitor interface { - VisitString(string) error - VisitFolder(*Folder) error -} - -func (f *FileRequestFolder) Accept(visitor FileRequestFolderVisitor) error { - switch f.typeName { - default: - return fmt.Errorf("invalid type %s in %T", f.typeName, f) - case "string": - return visitor.VisitString(f.String) - case "folder": - return visitor.VisitFolder(f.Folder) - } -} - -// The Permission object is used to represent a user's or group's access to a File or Folder. Permissions are unexpanded by default. Use the query param `expand=permissions` to see more details under `GET /files`. -type FileRequestPermissions struct { - typeName string - String string - PermissionRequest *PermissionRequest - FileRequestPermissionsItemList []*FileRequestPermissionsItem -} - -func NewFileRequestPermissionsFromString(value string) *FileRequestPermissions { - return &FileRequestPermissions{typeName: "string", String: value} -} - -func NewFileRequestPermissionsFromPermissionRequest(value *PermissionRequest) *FileRequestPermissions { - return &FileRequestPermissions{typeName: "permissionRequest", PermissionRequest: value} -} - -func NewFileRequestPermissionsFromFileRequestPermissionsItemList(value []*FileRequestPermissionsItem) *FileRequestPermissions { - return &FileRequestPermissions{typeName: "fileRequestPermissionsItemList", FileRequestPermissionsItemList: value} -} - -func (f *FileRequestPermissions) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - f.typeName = "string" - f.String = valueString - return nil - } - valuePermissionRequest := new(PermissionRequest) - if err := json.Unmarshal(data, &valuePermissionRequest); err == nil { - f.typeName = "permissionRequest" - f.PermissionRequest = valuePermissionRequest - return nil - } - var valueFileRequestPermissionsItemList []*FileRequestPermissionsItem - if err := json.Unmarshal(data, &valueFileRequestPermissionsItemList); err == nil { - f.typeName = "fileRequestPermissionsItemList" - f.FileRequestPermissionsItemList = valueFileRequestPermissionsItemList - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, f) -} - -func (f FileRequestPermissions) MarshalJSON() ([]byte, error) { - switch f.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", f.typeName, f) - case "string": - return json.Marshal(f.String) - case "permissionRequest": - return json.Marshal(f.PermissionRequest) - case "fileRequestPermissionsItemList": - return json.Marshal(f.FileRequestPermissionsItemList) - } -} - -type FileRequestPermissionsVisitor interface { - VisitString(string) error - VisitPermissionRequest(*PermissionRequest) error - VisitFileRequestPermissionsItemList([]*FileRequestPermissionsItem) error -} - -func (f *FileRequestPermissions) Accept(visitor FileRequestPermissionsVisitor) error { - switch f.typeName { - default: - return fmt.Errorf("invalid type %s in %T", f.typeName, f) - case "string": - return visitor.VisitString(f.String) - case "permissionRequest": - return visitor.VisitPermissionRequest(f.PermissionRequest) - case "fileRequestPermissionsItemList": - return visitor.VisitFileRequestPermissionsItemList(f.FileRequestPermissionsItemList) - } -} - -type FileRequestPermissionsItem struct { - typeName string - String string - PermissionRequest *PermissionRequest -} - -func NewFileRequestPermissionsItemFromString(value string) *FileRequestPermissionsItem { - return &FileRequestPermissionsItem{typeName: "string", String: value} -} - -func NewFileRequestPermissionsItemFromPermissionRequest(value *PermissionRequest) *FileRequestPermissionsItem { - return &FileRequestPermissionsItem{typeName: "permissionRequest", PermissionRequest: value} -} - -func (f *FileRequestPermissionsItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - f.typeName = "string" - f.String = valueString - return nil - } - valuePermissionRequest := new(PermissionRequest) - if err := json.Unmarshal(data, &valuePermissionRequest); err == nil { - f.typeName = "permissionRequest" - f.PermissionRequest = valuePermissionRequest - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, f) -} - -func (f FileRequestPermissionsItem) MarshalJSON() ([]byte, error) { - switch f.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", f.typeName, f) - case "string": - return json.Marshal(f.String) - case "permissionRequest": - return json.Marshal(f.PermissionRequest) - } -} - -type FileRequestPermissionsItemVisitor interface { - VisitString(string) error - VisitPermissionRequest(*PermissionRequest) error -} - -func (f *FileRequestPermissionsItem) Accept(visitor FileRequestPermissionsItemVisitor) error { - switch f.typeName { - default: - return fmt.Errorf("invalid type %s in %T", f.typeName, f) - case "string": - return visitor.VisitString(f.String) - case "permissionRequest": - return visitor.VisitPermissionRequest(f.PermissionRequest) - } -} - -type FileStorageFileResponse struct { - Model *File `json:"model,omitempty"` - Warnings []*WarningValidationProblem `json:"warnings,omitempty"` - Errors []*ErrorValidationProblem `json:"errors,omitempty"` - Logs []*DebugModeLog `json:"logs,omitempty"` - - _rawJSON json.RawMessage -} - -func (f *FileStorageFileResponse) UnmarshalJSON(data []byte) error { - type unmarshaler FileStorageFileResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *f = FileStorageFileResponse(value) - f._rawJSON = json.RawMessage(data) - return nil -} - -func (f *FileStorageFileResponse) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(f); err == nil { - return value - } - return fmt.Sprintf("%#v", f) -} - -type FileStorageFolderResponse struct { - Model *Folder `json:"model,omitempty"` - Warnings []*WarningValidationProblem `json:"warnings,omitempty"` - Errors []*ErrorValidationProblem `json:"errors,omitempty"` - Logs []*DebugModeLog `json:"logs,omitempty"` - - _rawJSON json.RawMessage -} - -func (f *FileStorageFolderResponse) UnmarshalJSON(data []byte) error { - type unmarshaler FileStorageFolderResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *f = FileStorageFolderResponse(value) - f._rawJSON = json.RawMessage(data) - return nil -} - -func (f *FileStorageFolderResponse) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(f); err == nil { - return value - } - return fmt.Sprintf("%#v", f) -} - -// # The Folder Object -// -// ### Description -// -// The `Folder` object is used to represent a collection of files and/or folders in the workspace. Could be within a drive, if it exists. -// -// ### Usage Example -// -// Fetch from the `GET /api/filestorage/v1/folders` endpoint and view their folders. -type Folder struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The folder's name. - Name *string `json:"name,omitempty"` - // The URL to access the folder. - FolderUrl *string `json:"folder_url,omitempty"` - // The folder's size, in bytes. - Size *int64 `json:"size,omitempty"` - // The folder's description. - Description *string `json:"description,omitempty"` - // The folder that the folder belongs to. - ParentFolder *FolderParentFolder `json:"parent_folder,omitempty"` - // The drive that the folder belongs to. - Drive *FolderDrive `json:"drive,omitempty"` - // The Permission object is used to represent a user's or group's access to a File or Folder. Permissions are unexpanded by default. Use the query param `expand=permissions` to see more details under `GET /folders`. - Permissions *FolderPermissions `json:"permissions,omitempty"` - // When the third party's folder was created. - RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty"` - // When the third party's folder was updated. - RemoteUpdatedAt *time.Time `json:"remote_updated_at,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` - - _rawJSON json.RawMessage -} - -func (f *Folder) UnmarshalJSON(data []byte) error { - type unmarshaler Folder - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *f = Folder(value) - f._rawJSON = json.RawMessage(data) - return nil -} - -func (f *Folder) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(f); err == nil { - return value - } - return fmt.Sprintf("%#v", f) -} - -// The drive that the folder belongs to. -type FolderDrive struct { - typeName string - String string - Drive *Drive -} - -func NewFolderDriveFromString(value string) *FolderDrive { - return &FolderDrive{typeName: "string", String: value} -} - -func NewFolderDriveFromDrive(value *Drive) *FolderDrive { - return &FolderDrive{typeName: "drive", Drive: value} -} - -func (f *FolderDrive) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - f.typeName = "string" - f.String = valueString - return nil - } - valueDrive := new(Drive) - if err := json.Unmarshal(data, &valueDrive); err == nil { - f.typeName = "drive" - f.Drive = valueDrive - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, f) -} - -func (f FolderDrive) MarshalJSON() ([]byte, error) { - switch f.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", f.typeName, f) - case "string": - return json.Marshal(f.String) - case "drive": - return json.Marshal(f.Drive) - } -} - -type FolderDriveVisitor interface { - VisitString(string) error - VisitDrive(*Drive) error -} - -func (f *FolderDrive) Accept(visitor FolderDriveVisitor) error { - switch f.typeName { - default: - return fmt.Errorf("invalid type %s in %T", f.typeName, f) - case "string": - return visitor.VisitString(f.String) - case "drive": - return visitor.VisitDrive(f.Drive) - } -} - -// The folder that the folder belongs to. -type FolderParentFolder struct { - typeName string - String string - Folder *Folder -} - -func NewFolderParentFolderFromString(value string) *FolderParentFolder { - return &FolderParentFolder{typeName: "string", String: value} -} - -func NewFolderParentFolderFromFolder(value *Folder) *FolderParentFolder { - return &FolderParentFolder{typeName: "folder", Folder: value} -} - -func (f *FolderParentFolder) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - f.typeName = "string" - f.String = valueString - return nil - } - valueFolder := new(Folder) - if err := json.Unmarshal(data, &valueFolder); err == nil { - f.typeName = "folder" - f.Folder = valueFolder - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, f) -} - -func (f FolderParentFolder) MarshalJSON() ([]byte, error) { - switch f.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", f.typeName, f) - case "string": - return json.Marshal(f.String) - case "folder": - return json.Marshal(f.Folder) - } -} - -type FolderParentFolderVisitor interface { - VisitString(string) error - VisitFolder(*Folder) error -} - -func (f *FolderParentFolder) Accept(visitor FolderParentFolderVisitor) error { - switch f.typeName { - default: - return fmt.Errorf("invalid type %s in %T", f.typeName, f) - case "string": - return visitor.VisitString(f.String) - case "folder": - return visitor.VisitFolder(f.Folder) - } -} - -// The Permission object is used to represent a user's or group's access to a File or Folder. Permissions are unexpanded by default. Use the query param `expand=permissions` to see more details under `GET /folders`. -type FolderPermissions struct { - typeName string - String string - PermissionRequest *PermissionRequest - FolderPermissionsItemList []*FolderPermissionsItem -} - -func NewFolderPermissionsFromString(value string) *FolderPermissions { - return &FolderPermissions{typeName: "string", String: value} -} - -func NewFolderPermissionsFromPermissionRequest(value *PermissionRequest) *FolderPermissions { - return &FolderPermissions{typeName: "permissionRequest", PermissionRequest: value} -} - -func NewFolderPermissionsFromFolderPermissionsItemList(value []*FolderPermissionsItem) *FolderPermissions { - return &FolderPermissions{typeName: "folderPermissionsItemList", FolderPermissionsItemList: value} -} - -func (f *FolderPermissions) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - f.typeName = "string" - f.String = valueString - return nil - } - valuePermissionRequest := new(PermissionRequest) - if err := json.Unmarshal(data, &valuePermissionRequest); err == nil { - f.typeName = "permissionRequest" - f.PermissionRequest = valuePermissionRequest - return nil - } - var valueFolderPermissionsItemList []*FolderPermissionsItem - if err := json.Unmarshal(data, &valueFolderPermissionsItemList); err == nil { - f.typeName = "folderPermissionsItemList" - f.FolderPermissionsItemList = valueFolderPermissionsItemList +func (f *Folder) GetName() *string { + if f == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, f) + return f.Name } -func (f FolderPermissions) MarshalJSON() ([]byte, error) { - switch f.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", f.typeName, f) - case "string": - return json.Marshal(f.String) - case "permissionRequest": - return json.Marshal(f.PermissionRequest) - case "folderPermissionsItemList": - return json.Marshal(f.FolderPermissionsItemList) +func (f *Folder) GetFolderUrl() *string { + if f == nil { + return nil } + return f.FolderUrl } -type FolderPermissionsVisitor interface { - VisitString(string) error - VisitPermissionRequest(*PermissionRequest) error - VisitFolderPermissionsItemList([]*FolderPermissionsItem) error +func (f *Folder) GetSize() *int64 { + if f == nil { + return nil + } + return f.Size } -func (f *FolderPermissions) Accept(visitor FolderPermissionsVisitor) error { - switch f.typeName { - default: - return fmt.Errorf("invalid type %s in %T", f.typeName, f) - case "string": - return visitor.VisitString(f.String) - case "permissionRequest": - return visitor.VisitPermissionRequest(f.PermissionRequest) - case "folderPermissionsItemList": - return visitor.VisitFolderPermissionsItemList(f.FolderPermissionsItemList) +func (f *Folder) GetDescription() *string { + if f == nil { + return nil } + return f.Description } -type FolderPermissionsItem struct { - typeName string - String string - PermissionRequest *PermissionRequest +func (f *Folder) GetParentFolder() *FolderParentFolder { + if f == nil { + return nil + } + return f.ParentFolder } -func NewFolderPermissionsItemFromString(value string) *FolderPermissionsItem { - return &FolderPermissionsItem{typeName: "string", String: value} +func (f *Folder) GetDrive() *FolderDrive { + if f == nil { + return nil + } + return f.Drive } -func NewFolderPermissionsItemFromPermissionRequest(value *PermissionRequest) *FolderPermissionsItem { - return &FolderPermissionsItem{typeName: "permissionRequest", PermissionRequest: value} +func (f *Folder) GetPermissions() *FolderPermissions { + if f == nil { + return nil + } + return f.Permissions } -func (f *FolderPermissionsItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - f.typeName = "string" - f.String = valueString +func (f *Folder) GetRemoteCreatedAt() *time.Time { + if f == nil { return nil } - valuePermissionRequest := new(PermissionRequest) - if err := json.Unmarshal(data, &valuePermissionRequest); err == nil { - f.typeName = "permissionRequest" - f.PermissionRequest = valuePermissionRequest + return f.RemoteCreatedAt +} + +func (f *Folder) GetRemoteUpdatedAt() *time.Time { + if f == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, f) + return f.RemoteUpdatedAt } -func (f FolderPermissionsItem) MarshalJSON() ([]byte, error) { - switch f.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", f.typeName, f) - case "string": - return json.Marshal(f.String) - case "permissionRequest": - return json.Marshal(f.PermissionRequest) +func (f *Folder) GetRemoteWasDeleted() *bool { + if f == nil { + return nil } + return f.RemoteWasDeleted } -type FolderPermissionsItemVisitor interface { - VisitString(string) error - VisitPermissionRequest(*PermissionRequest) error +func (f *Folder) GetFieldMappings() map[string]interface{} { + if f == nil { + return nil + } + return f.FieldMappings } -func (f *FolderPermissionsItem) Accept(visitor FolderPermissionsItemVisitor) error { - switch f.typeName { - default: - return fmt.Errorf("invalid type %s in %T", f.typeName, f) - case "string": - return visitor.VisitString(f.String) - case "permissionRequest": - return visitor.VisitPermissionRequest(f.PermissionRequest) +func (f *Folder) GetRemoteData() []*RemoteData { + if f == nil { + return nil } + return f.RemoteData } -// # The Folder Object -// -// ### Description -// -// The `Folder` object is used to represent a collection of files and/or folders in the workspace. Could be within a drive, if it exists. -// -// ### Usage Example -// -// Fetch from the `GET /api/filestorage/v1/folders` endpoint and view their folders. -type FolderRequest struct { - // The folder's name. - Name *string `json:"name,omitempty"` - // The URL to access the folder. - FolderUrl *string `json:"folder_url,omitempty"` - // The folder's size, in bytes. - Size *int64 `json:"size,omitempty"` - // The folder's description. - Description *string `json:"description,omitempty"` - // The folder that the folder belongs to. - ParentFolder *FolderRequestParentFolder `json:"parent_folder,omitempty"` - // The drive that the folder belongs to. - Drive *FolderRequestDrive `json:"drive,omitempty"` - // The Permission object is used to represent a user's or group's access to a File or Folder. Permissions are unexpanded by default. Use the query param `expand=permissions` to see more details under `GET /folders`. - Permissions *FolderRequestPermissions `json:"permissions,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` - - _rawJSON json.RawMessage +func (f *Folder) GetExtraProperties() map[string]interface{} { + return f.extraProperties } -func (f *FolderRequest) UnmarshalJSON(data []byte) error { - type unmarshaler FolderRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { +func (f *Folder) UnmarshalJSON(data []byte) error { + type embed Folder + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + RemoteUpdatedAt *internal.DateTime `json:"remote_updated_at,omitempty"` + }{ + embed: embed(*f), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *f = Folder(unmarshaler.embed) + f.CreatedAt = unmarshaler.CreatedAt.TimePtr() + f.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + f.RemoteCreatedAt = unmarshaler.RemoteCreatedAt.TimePtr() + f.RemoteUpdatedAt = unmarshaler.RemoteUpdatedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { return err } - *f = FolderRequest(value) - f._rawJSON = json.RawMessage(data) + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) return nil } -func (f *FolderRequest) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { +func (f *Folder) MarshalJSON() ([]byte, error) { + type embed Folder + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + RemoteUpdatedAt *internal.DateTime `json:"remote_updated_at,omitempty"` + }{ + embed: embed(*f), + CreatedAt: internal.NewOptionalDateTime(f.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(f.ModifiedAt), + RemoteCreatedAt: internal.NewOptionalDateTime(f.RemoteCreatedAt), + RemoteUpdatedAt: internal.NewOptionalDateTime(f.RemoteUpdatedAt), + } + return json.Marshal(marshaler) +} + +func (f *Folder) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(f); err == nil { + if value, err := internal.StringifyJSON(f); err == nil { return value } return fmt.Sprintf("%#v", f) } // The drive that the folder belongs to. -type FolderRequestDrive struct { - typeName string - String string - Drive *Drive +type FolderDrive struct { + String string + Drive *Drive + + typ string } -func NewFolderRequestDriveFromString(value string) *FolderRequestDrive { - return &FolderRequestDrive{typeName: "string", String: value} +func (f *FolderDrive) GetString() string { + if f == nil { + return "" + } + return f.String } -func NewFolderRequestDriveFromDrive(value *Drive) *FolderRequestDrive { - return &FolderRequestDrive{typeName: "drive", Drive: value} +func (f *FolderDrive) GetDrive() *Drive { + if f == nil { + return nil + } + return f.Drive } -func (f *FolderRequestDrive) UnmarshalJSON(data []byte) error { +func (f *FolderDrive) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - f.typeName = "string" + f.typ = "String" f.String = valueString return nil } valueDrive := new(Drive) if err := json.Unmarshal(data, &valueDrive); err == nil { - f.typeName = "drive" + f.typ = "Drive" f.Drive = valueDrive return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, f) } -func (f FolderRequestDrive) MarshalJSON() ([]byte, error) { - switch f.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", f.typeName, f) - case "string": +func (f FolderDrive) MarshalJSON() ([]byte, error) { + if f.typ == "String" || f.String != "" { return json.Marshal(f.String) - case "drive": + } + if f.typ == "Drive" || f.Drive != nil { return json.Marshal(f.Drive) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", f) } -type FolderRequestDriveVisitor interface { +type FolderDriveVisitor interface { VisitString(string) error VisitDrive(*Drive) error } -func (f *FolderRequestDrive) Accept(visitor FolderRequestDriveVisitor) error { - switch f.typeName { - default: - return fmt.Errorf("invalid type %s in %T", f.typeName, f) - case "string": +func (f *FolderDrive) Accept(visitor FolderDriveVisitor) error { + if f.typ == "String" || f.String != "" { return visitor.VisitString(f.String) - case "drive": + } + if f.typ == "Drive" || f.Drive != nil { return visitor.VisitDrive(f.Drive) } + return fmt.Errorf("type %T does not include a non-empty union type", f) } // The folder that the folder belongs to. -type FolderRequestParentFolder struct { - typeName string - String string - Folder *Folder +type FolderParentFolder struct { + String string + Folder *Folder + + typ string } -func NewFolderRequestParentFolderFromString(value string) *FolderRequestParentFolder { - return &FolderRequestParentFolder{typeName: "string", String: value} +func (f *FolderParentFolder) GetString() string { + if f == nil { + return "" + } + return f.String } -func NewFolderRequestParentFolderFromFolder(value *Folder) *FolderRequestParentFolder { - return &FolderRequestParentFolder{typeName: "folder", Folder: value} +func (f *FolderParentFolder) GetFolder() *Folder { + if f == nil { + return nil + } + return f.Folder } -func (f *FolderRequestParentFolder) UnmarshalJSON(data []byte) error { +func (f *FolderParentFolder) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - f.typeName = "string" + f.typ = "String" f.String = valueString return nil } valueFolder := new(Folder) if err := json.Unmarshal(data, &valueFolder); err == nil { - f.typeName = "folder" + f.typ = "Folder" f.Folder = valueFolder return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, f) } -func (f FolderRequestParentFolder) MarshalJSON() ([]byte, error) { - switch f.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", f.typeName, f) - case "string": +func (f FolderParentFolder) MarshalJSON() ([]byte, error) { + if f.typ == "String" || f.String != "" { return json.Marshal(f.String) - case "folder": + } + if f.typ == "Folder" || f.Folder != nil { return json.Marshal(f.Folder) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", f) } -type FolderRequestParentFolderVisitor interface { +type FolderParentFolderVisitor interface { VisitString(string) error VisitFolder(*Folder) error } -func (f *FolderRequestParentFolder) Accept(visitor FolderRequestParentFolderVisitor) error { - switch f.typeName { - default: - return fmt.Errorf("invalid type %s in %T", f.typeName, f) - case "string": +func (f *FolderParentFolder) Accept(visitor FolderParentFolderVisitor) error { + if f.typ == "String" || f.String != "" { return visitor.VisitString(f.String) - case "folder": + } + if f.typ == "Folder" || f.Folder != nil { return visitor.VisitFolder(f.Folder) } + return fmt.Errorf("type %T does not include a non-empty union type", f) } // The Permission object is used to represent a user's or group's access to a File or Folder. Permissions are unexpanded by default. Use the query param `expand=permissions` to see more details under `GET /folders`. -type FolderRequestPermissions struct { - typeName string - String string - PermissionRequest *PermissionRequest - FolderRequestPermissionsItemList []*FolderRequestPermissionsItem +type FolderPermissions struct { + String string + Permission *Permission + FolderPermissionsItemList []*FolderPermissionsItem + + typ string } -func NewFolderRequestPermissionsFromString(value string) *FolderRequestPermissions { - return &FolderRequestPermissions{typeName: "string", String: value} +func (f *FolderPermissions) GetString() string { + if f == nil { + return "" + } + return f.String } -func NewFolderRequestPermissionsFromPermissionRequest(value *PermissionRequest) *FolderRequestPermissions { - return &FolderRequestPermissions{typeName: "permissionRequest", PermissionRequest: value} +func (f *FolderPermissions) GetPermission() *Permission { + if f == nil { + return nil + } + return f.Permission } -func NewFolderRequestPermissionsFromFolderRequestPermissionsItemList(value []*FolderRequestPermissionsItem) *FolderRequestPermissions { - return &FolderRequestPermissions{typeName: "folderRequestPermissionsItemList", FolderRequestPermissionsItemList: value} +func (f *FolderPermissions) GetFolderPermissionsItemList() []*FolderPermissionsItem { + if f == nil { + return nil + } + return f.FolderPermissionsItemList } -func (f *FolderRequestPermissions) UnmarshalJSON(data []byte) error { +func (f *FolderPermissions) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - f.typeName = "string" + f.typ = "String" f.String = valueString return nil } - valuePermissionRequest := new(PermissionRequest) - if err := json.Unmarshal(data, &valuePermissionRequest); err == nil { - f.typeName = "permissionRequest" - f.PermissionRequest = valuePermissionRequest + valuePermission := new(Permission) + if err := json.Unmarshal(data, &valuePermission); err == nil { + f.typ = "Permission" + f.Permission = valuePermission return nil } - var valueFolderRequestPermissionsItemList []*FolderRequestPermissionsItem - if err := json.Unmarshal(data, &valueFolderRequestPermissionsItemList); err == nil { - f.typeName = "folderRequestPermissionsItemList" - f.FolderRequestPermissionsItemList = valueFolderRequestPermissionsItemList + var valueFolderPermissionsItemList []*FolderPermissionsItem + if err := json.Unmarshal(data, &valueFolderPermissionsItemList); err == nil { + f.typ = "FolderPermissionsItemList" + f.FolderPermissionsItemList = valueFolderPermissionsItemList return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, f) } -func (f FolderRequestPermissions) MarshalJSON() ([]byte, error) { - switch f.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", f.typeName, f) - case "string": +func (f FolderPermissions) MarshalJSON() ([]byte, error) { + if f.typ == "String" || f.String != "" { return json.Marshal(f.String) - case "permissionRequest": - return json.Marshal(f.PermissionRequest) - case "folderRequestPermissionsItemList": - return json.Marshal(f.FolderRequestPermissionsItemList) } + if f.typ == "Permission" || f.Permission != nil { + return json.Marshal(f.Permission) + } + if f.typ == "FolderPermissionsItemList" || f.FolderPermissionsItemList != nil { + return json.Marshal(f.FolderPermissionsItemList) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", f) } -type FolderRequestPermissionsVisitor interface { +type FolderPermissionsVisitor interface { VisitString(string) error - VisitPermissionRequest(*PermissionRequest) error - VisitFolderRequestPermissionsItemList([]*FolderRequestPermissionsItem) error + VisitPermission(*Permission) error + VisitFolderPermissionsItemList([]*FolderPermissionsItem) error } -func (f *FolderRequestPermissions) Accept(visitor FolderRequestPermissionsVisitor) error { - switch f.typeName { - default: - return fmt.Errorf("invalid type %s in %T", f.typeName, f) - case "string": +func (f *FolderPermissions) Accept(visitor FolderPermissionsVisitor) error { + if f.typ == "String" || f.String != "" { return visitor.VisitString(f.String) - case "permissionRequest": - return visitor.VisitPermissionRequest(f.PermissionRequest) - case "folderRequestPermissionsItemList": - return visitor.VisitFolderRequestPermissionsItemList(f.FolderRequestPermissionsItemList) } + if f.typ == "Permission" || f.Permission != nil { + return visitor.VisitPermission(f.Permission) + } + if f.typ == "FolderPermissionsItemList" || f.FolderPermissionsItemList != nil { + return visitor.VisitFolderPermissionsItemList(f.FolderPermissionsItemList) + } + return fmt.Errorf("type %T does not include a non-empty union type", f) } -type FolderRequestPermissionsItem struct { - typeName string - String string - PermissionRequest *PermissionRequest +type FolderPermissionsItem struct { + String string + Permission *Permission + + typ string } -func NewFolderRequestPermissionsItemFromString(value string) *FolderRequestPermissionsItem { - return &FolderRequestPermissionsItem{typeName: "string", String: value} +func (f *FolderPermissionsItem) GetString() string { + if f == nil { + return "" + } + return f.String } -func NewFolderRequestPermissionsItemFromPermissionRequest(value *PermissionRequest) *FolderRequestPermissionsItem { - return &FolderRequestPermissionsItem{typeName: "permissionRequest", PermissionRequest: value} +func (f *FolderPermissionsItem) GetPermission() *Permission { + if f == nil { + return nil + } + return f.Permission } -func (f *FolderRequestPermissionsItem) UnmarshalJSON(data []byte) error { +func (f *FolderPermissionsItem) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - f.typeName = "string" + f.typ = "String" f.String = valueString return nil } - valuePermissionRequest := new(PermissionRequest) - if err := json.Unmarshal(data, &valuePermissionRequest); err == nil { - f.typeName = "permissionRequest" - f.PermissionRequest = valuePermissionRequest + valuePermission := new(Permission) + if err := json.Unmarshal(data, &valuePermission); err == nil { + f.typ = "Permission" + f.Permission = valuePermission return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, f) } -func (f FolderRequestPermissionsItem) MarshalJSON() ([]byte, error) { - switch f.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", f.typeName, f) - case "string": +func (f FolderPermissionsItem) MarshalJSON() ([]byte, error) { + if f.typ == "String" || f.String != "" { return json.Marshal(f.String) - case "permissionRequest": - return json.Marshal(f.PermissionRequest) } + if f.typ == "Permission" || f.Permission != nil { + return json.Marshal(f.Permission) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", f) } -type FolderRequestPermissionsItemVisitor interface { +type FolderPermissionsItemVisitor interface { VisitString(string) error - VisitPermissionRequest(*PermissionRequest) error + VisitPermission(*Permission) error } -func (f *FolderRequestPermissionsItem) Accept(visitor FolderRequestPermissionsItemVisitor) error { - switch f.typeName { - default: - return fmt.Errorf("invalid type %s in %T", f.typeName, f) - case "string": +func (f *FolderPermissionsItem) Accept(visitor FolderPermissionsItemVisitor) error { + if f.typ == "String" || f.String != "" { return visitor.VisitString(f.String) - case "permissionRequest": - return visitor.VisitPermissionRequest(f.PermissionRequest) } + if f.typ == "Permission" || f.Permission != nil { + return visitor.VisitPermission(f.Permission) + } + return fmt.Errorf("type %T does not include a non-empty union type", f) } // # The Group Object -// // ### Description -// // The `Group` object is used to represent any subset of `Users`. This can extend to company domains as well. -// // ### Usage Example -// // Fetch from the `GET /api/filestorage/v1/groups` endpoint and view their groups. type Group struct { - Id *string `json:"id,omitempty"` + Id *string `json:"id,omitempty" url:"id,omitempty"` // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` // The group's name. - Name *string `json:"name,omitempty"` + Name *string `json:"name,omitempty" url:"name,omitempty"` // 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. - Users []string `json:"users,omitempty"` + Users []string `json:"users" url:"users"` // Groups that inherit the permissions of the parent group. - ChildGroups []*GroupChildGroupsItem `json:"child_groups,omitempty"` + ChildGroups []*GroupChildGroupsItem `json:"child_groups,omitempty" url:"child_groups,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (g *Group) GetId() *string { + if g == nil { + return nil + } + return g.Id +} + +func (g *Group) GetRemoteId() *string { + if g == nil { + return nil + } + return g.RemoteId +} + +func (g *Group) GetCreatedAt() *time.Time { + if g == nil { + return nil + } + return g.CreatedAt +} + +func (g *Group) GetModifiedAt() *time.Time { + if g == nil { + return nil + } + return g.ModifiedAt +} + +func (g *Group) GetName() *string { + if g == nil { + return nil + } + return g.Name +} + +func (g *Group) GetUsers() []string { + if g == nil { + return nil + } + return g.Users +} + +func (g *Group) GetChildGroups() []*GroupChildGroupsItem { + if g == nil { + return nil + } + return g.ChildGroups +} + +func (g *Group) GetRemoteWasDeleted() *bool { + if g == nil { + return nil + } + return g.RemoteWasDeleted +} + +func (g *Group) GetFieldMappings() map[string]interface{} { + if g == nil { + return nil + } + return g.FieldMappings +} + +func (g *Group) GetRemoteData() []*RemoteData { + if g == nil { + return nil + } + return g.RemoteData +} - _rawJSON json.RawMessage +func (g *Group) GetExtraProperties() map[string]interface{} { + return g.extraProperties } func (g *Group) UnmarshalJSON(data []byte) error { - type unmarshaler Group - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { + type embed Group + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*g), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { return err } - *g = Group(value) - g._rawJSON = json.RawMessage(data) + *g = Group(unmarshaler.embed) + g.CreatedAt = unmarshaler.CreatedAt.TimePtr() + g.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *g) + if err != nil { + return err + } + g.extraProperties = extraProperties + g.rawJSON = json.RawMessage(data) return nil } +func (g *Group) MarshalJSON() ([]byte, error) { + type embed Group + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*g), + CreatedAt: internal.NewOptionalDateTime(g.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(g.ModifiedAt), + } + return json.Marshal(marshaler) +} + func (g *Group) String() string { - if len(g._rawJSON) > 0 { - if value, err := core.StringifyJSON(g._rawJSON); err == nil { + if len(g.rawJSON) > 0 { + if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(g); err == nil { + if value, err := internal.StringifyJSON(g); err == nil { return value } return fmt.Sprintf("%#v", g) } type GroupChildGroupsItem struct { - typeName string - String string - Group *Group + String string + Group *Group + + typ string } -func NewGroupChildGroupsItemFromString(value string) *GroupChildGroupsItem { - return &GroupChildGroupsItem{typeName: "string", String: value} +func (g *GroupChildGroupsItem) GetString() string { + if g == nil { + return "" + } + return g.String } -func NewGroupChildGroupsItemFromGroup(value *Group) *GroupChildGroupsItem { - return &GroupChildGroupsItem{typeName: "group", Group: value} +func (g *GroupChildGroupsItem) GetGroup() *Group { + if g == nil { + return nil + } + return g.Group } func (g *GroupChildGroupsItem) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - g.typeName = "string" + g.typ = "String" g.String = valueString return nil } valueGroup := new(Group) if err := json.Unmarshal(data, &valueGroup); err == nil { - g.typeName = "group" + g.typ = "Group" g.Group = valueGroup return nil } @@ -2882,14 +1446,13 @@ func (g *GroupChildGroupsItem) UnmarshalJSON(data []byte) error { } func (g GroupChildGroupsItem) MarshalJSON() ([]byte, error) { - switch g.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", g.typeName, g) - case "string": + if g.typ == "String" || g.String != "" { return json.Marshal(g.String) - case "group": + } + if g.typ == "Group" || g.Group != nil { return json.Marshal(g.Group) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", g) } type GroupChildGroupsItemVisitor interface { @@ -2898,53 +1461,47 @@ type GroupChildGroupsItemVisitor interface { } func (g *GroupChildGroupsItem) Accept(visitor GroupChildGroupsItemVisitor) error { - switch g.typeName { - default: - return fmt.Errorf("invalid type %s in %T", g.typeName, g) - case "string": + if g.typ == "String" || g.String != "" { return visitor.VisitString(g.String) - case "group": + } + if g.typ == "Group" || g.Group != nil { return visitor.VisitGroup(g.Group) } + return fmt.Errorf("type %T does not include a non-empty union type", g) } -type IndividualCommonModelScopeDeserializer struct { - ModelName string `json:"model_name"` - ModelPermissions map[string]*ModelPermissionDeserializer `json:"model_permissions,omitempty"` - FieldPermissions *FieldPermissionDeserializer `json:"field_permissions,omitempty"` +type IndividualCommonModelScopeDeserializerRequest struct { + ModelName string `json:"model_name" url:"model_name"` + ModelPermissions map[string]*ModelPermissionDeserializerRequest `json:"model_permissions,omitempty" url:"model_permissions,omitempty"` + FieldPermissions *FieldPermissionDeserializerRequest `json:"field_permissions,omitempty" url:"field_permissions,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (i *IndividualCommonModelScopeDeserializer) UnmarshalJSON(data []byte) error { - type unmarshaler IndividualCommonModelScopeDeserializer - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (i *IndividualCommonModelScopeDeserializerRequest) GetModelName() string { + if i == nil { + return "" } - *i = IndividualCommonModelScopeDeserializer(value) - i._rawJSON = json.RawMessage(data) - return nil + return i.ModelName } -func (i *IndividualCommonModelScopeDeserializer) String() string { - if len(i._rawJSON) > 0 { - if value, err := core.StringifyJSON(i._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(i); err == nil { - return value +func (i *IndividualCommonModelScopeDeserializerRequest) GetModelPermissions() map[string]*ModelPermissionDeserializerRequest { + if i == nil { + return nil } - return fmt.Sprintf("%#v", i) + return i.ModelPermissions } -type IndividualCommonModelScopeDeserializerRequest struct { - ModelName string `json:"model_name"` - ModelPermissions map[string]*ModelPermissionDeserializerRequest `json:"model_permissions,omitempty"` - FieldPermissions *FieldPermissionDeserializerRequest `json:"field_permissions,omitempty"` +func (i *IndividualCommonModelScopeDeserializerRequest) GetFieldPermissions() *FieldPermissionDeserializerRequest { + if i == nil { + return nil + } + return i.FieldPermissions +} - _rawJSON json.RawMessage +func (i *IndividualCommonModelScopeDeserializerRequest) GetExtraProperties() map[string]interface{} { + return i.extraProperties } func (i *IndividualCommonModelScopeDeserializerRequest) UnmarshalJSON(data []byte) error { @@ -2954,207 +1511,91 @@ func (i *IndividualCommonModelScopeDeserializerRequest) UnmarshalJSON(data []byt return err } *i = IndividualCommonModelScopeDeserializerRequest(value) - i._rawJSON = json.RawMessage(data) - return nil -} - -func (i *IndividualCommonModelScopeDeserializerRequest) String() string { - if len(i._rawJSON) > 0 { - if value, err := core.StringifyJSON(i._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(i); err == nil { - return value - } - return fmt.Sprintf("%#v", i) -} - -type Issue struct { - Id *string `json:"id,omitempty"` - // Status of the issue. Options: ('ONGOING', 'RESOLVED') - // - // - `ONGOING` - ONGOING - // - `RESOLVED` - RESOLVED - Status *IssueStatus `json:"status,omitempty"` - ErrorDescription string `json:"error_description"` - EndUser map[string]interface{} `json:"end_user,omitempty"` - FirstIncidentTime *time.Time `json:"first_incident_time,omitempty"` - LastIncidentTime *time.Time `json:"last_incident_time,omitempty"` - IsMuted *bool `json:"is_muted,omitempty"` - ErrorDetails []string `json:"error_details,omitempty"` - - _rawJSON json.RawMessage -} - -func (i *Issue) UnmarshalJSON(data []byte) error { - type unmarshaler Issue - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { + extraProperties, err := internal.ExtractExtraProperties(data, *i) + if err != nil { return err } - *i = Issue(value) - i._rawJSON = json.RawMessage(data) + i.extraProperties = extraProperties + i.rawJSON = json.RawMessage(data) return nil } -func (i *Issue) String() string { - if len(i._rawJSON) > 0 { - if value, err := core.StringifyJSON(i._rawJSON); err == nil { +func (i *IndividualCommonModelScopeDeserializerRequest) String() string { + if len(i.rawJSON) > 0 { + if value, err := internal.StringifyJSON(i.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(i); err == nil { + if value, err := internal.StringifyJSON(i); err == nil { return value } return fmt.Sprintf("%#v", i) } -// Status of the issue. Options: ('ONGOING', 'RESOLVED') -// -// - `ONGOING` - ONGOING -// - `RESOLVED` - RESOLVED -type IssueStatus struct { - typeName string - IssueStatusEnum IssueStatusEnum - String string -} - -func NewIssueStatusFromIssueStatusEnum(value IssueStatusEnum) *IssueStatus { - return &IssueStatus{typeName: "issueStatusEnum", IssueStatusEnum: value} -} - -func NewIssueStatusFromString(value string) *IssueStatus { - return &IssueStatus{typeName: "string", String: value} -} - -func (i *IssueStatus) UnmarshalJSON(data []byte) error { - var valueIssueStatusEnum IssueStatusEnum - if err := json.Unmarshal(data, &valueIssueStatusEnum); err == nil { - i.typeName = "issueStatusEnum" - i.IssueStatusEnum = valueIssueStatusEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - i.typeName = "string" - i.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, i) -} - -func (i IssueStatus) MarshalJSON() ([]byte, error) { - switch i.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "issueStatusEnum": - return json.Marshal(i.IssueStatusEnum) - case "string": - return json.Marshal(i.String) - } -} - -type IssueStatusVisitor interface { - VisitIssueStatusEnum(IssueStatusEnum) error - VisitString(string) error -} - -func (i *IssueStatus) Accept(visitor IssueStatusVisitor) error { - switch i.typeName { - default: - return fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "issueStatusEnum": - return visitor.VisitIssueStatusEnum(i.IssueStatusEnum) - case "string": - return visitor.VisitString(i.String) - } -} - -// - `ONGOING` - ONGOING -// - `RESOLVED` - RESOLVED -type IssueStatusEnum string - -const ( - IssueStatusEnumOngoing IssueStatusEnum = "ONGOING" - IssueStatusEnumResolved IssueStatusEnum = "RESOLVED" -) - -func NewIssueStatusEnumFromString(s string) (IssueStatusEnum, error) { - switch s { - case "ONGOING": - return IssueStatusEnumOngoing, nil - case "RESOLVED": - return IssueStatusEnumResolved, nil - } - var t IssueStatusEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (i IssueStatusEnum) Ptr() *IssueStatusEnum { - return &i -} - -// - `en` - en -// - `de` - de -type LanguageEnum string +// * `SYNCING` - SYNCING +// * `DONE` - DONE +// * `FAILED` - FAILED +// * `DISABLED` - DISABLED +// * `PAUSED` - PAUSED +// * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED +type LastSyncResultEnum string const ( - LanguageEnumEn LanguageEnum = "en" - LanguageEnumDe LanguageEnum = "de" + LastSyncResultEnumSyncing LastSyncResultEnum = "SYNCING" + LastSyncResultEnumDone LastSyncResultEnum = "DONE" + LastSyncResultEnumFailed LastSyncResultEnum = "FAILED" + LastSyncResultEnumDisabled LastSyncResultEnum = "DISABLED" + LastSyncResultEnumPaused LastSyncResultEnum = "PAUSED" + LastSyncResultEnumPartiallySynced LastSyncResultEnum = "PARTIALLY_SYNCED" ) -func NewLanguageEnumFromString(s string) (LanguageEnum, error) { +func NewLastSyncResultEnumFromString(s string) (LastSyncResultEnum, error) { switch s { - case "en": - return LanguageEnumEn, nil - case "de": - return LanguageEnumDe, nil + case "SYNCING": + return LastSyncResultEnumSyncing, nil + case "DONE": + return LastSyncResultEnumDone, nil + case "FAILED": + return LastSyncResultEnumFailed, nil + case "DISABLED": + return LastSyncResultEnumDisabled, nil + case "PAUSED": + return LastSyncResultEnumPaused, nil + case "PARTIALLY_SYNCED": + return LastSyncResultEnumPartiallySynced, nil } - var t LanguageEnum + var t LastSyncResultEnum return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (l LanguageEnum) Ptr() *LanguageEnum { +func (l LastSyncResultEnum) Ptr() *LastSyncResultEnum { return &l } -type LinkToken struct { - LinkToken string `json:"link_token"` - IntegrationName *string `json:"integration_name,omitempty"` - MagicLinkUrl *string `json:"magic_link_url,omitempty"` +type LinkedAccountStatus struct { + LinkedAccountStatus string `json:"linked_account_status" url:"linked_account_status"` + CanMakeRequest bool `json:"can_make_request" url:"can_make_request"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (l *LinkToken) UnmarshalJSON(data []byte) error { - type unmarshaler LinkToken - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (l *LinkedAccountStatus) GetLinkedAccountStatus() string { + if l == nil { + return "" } - *l = LinkToken(value) - l._rawJSON = json.RawMessage(data) - return nil + return l.LinkedAccountStatus } -func (l *LinkToken) String() string { - if len(l._rawJSON) > 0 { - if value, err := core.StringifyJSON(l._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(l); err == nil { - return value +func (l *LinkedAccountStatus) GetCanMakeRequest() bool { + if l == nil { + return false } - return fmt.Sprintf("%#v", l) + return l.CanMakeRequest } -type LinkedAccountStatus struct { - LinkedAccountStatus string `json:"linked_account_status"` - CanMakeRequest bool `json:"can_make_request"` - - _rawJSON json.RawMessage +func (l *LinkedAccountStatus) GetExtraProperties() map[string]interface{} { + return l.extraProperties } func (l *LinkedAccountStatus) UnmarshalJSON(data []byte) error { @@ -3164,30 +1605,75 @@ func (l *LinkedAccountStatus) UnmarshalJSON(data []byte) error { return err } *l = LinkedAccountStatus(value) - l._rawJSON = json.RawMessage(data) + extraProperties, err := internal.ExtractExtraProperties(data, *l) + if err != nil { + return err + } + l.extraProperties = extraProperties + l.rawJSON = json.RawMessage(data) return nil } func (l *LinkedAccountStatus) String() string { - if len(l._rawJSON) > 0 { - if value, err := core.StringifyJSON(l._rawJSON); err == nil { + if len(l.rawJSON) > 0 { + if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(l); err == nil { + if value, err := internal.StringifyJSON(l); err == nil { return value } return fmt.Sprintf("%#v", l) } type MetaResponse struct { - RequestSchema map[string]interface{} `json:"request_schema,omitempty"` - RemoteFieldClasses map[string]interface{} `json:"remote_field_classes,omitempty"` - Status *LinkedAccountStatus `json:"status,omitempty"` - HasConditionalParams bool `json:"has_conditional_params"` - HasRequiredLinkedAccountParams bool `json:"has_required_linked_account_params"` + RequestSchema map[string]interface{} `json:"request_schema" url:"request_schema"` + RemoteFieldClasses map[string]interface{} `json:"remote_field_classes,omitempty" url:"remote_field_classes,omitempty"` + Status *LinkedAccountStatus `json:"status,omitempty" url:"status,omitempty"` + HasConditionalParams bool `json:"has_conditional_params" url:"has_conditional_params"` + HasRequiredLinkedAccountParams bool `json:"has_required_linked_account_params" url:"has_required_linked_account_params"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (m *MetaResponse) GetRequestSchema() map[string]interface{} { + if m == nil { + return nil + } + return m.RequestSchema +} + +func (m *MetaResponse) GetRemoteFieldClasses() map[string]interface{} { + if m == nil { + return nil + } + return m.RemoteFieldClasses +} + +func (m *MetaResponse) GetStatus() *LinkedAccountStatus { + if m == nil { + return nil + } + return m.Status +} + +func (m *MetaResponse) GetHasConditionalParams() bool { + if m == nil { + return false + } + return m.HasConditionalParams +} + +func (m *MetaResponse) GetHasRequiredLinkedAccountParams() bool { + if m == nil { + return false + } + return m.HasRequiredLinkedAccountParams +} - _rawJSON json.RawMessage +func (m *MetaResponse) GetExtraProperties() map[string]interface{} { + return m.extraProperties } func (m *MetaResponse) UnmarshalJSON(data []byte) error { @@ -3197,29 +1683,34 @@ func (m *MetaResponse) UnmarshalJSON(data []byte) error { return err } *m = MetaResponse(value) - m._rawJSON = json.RawMessage(data) + extraProperties, err := internal.ExtractExtraProperties(data, *m) + if err != nil { + return err + } + m.extraProperties = extraProperties + m.rawJSON = json.RawMessage(data) return nil } func (m *MetaResponse) String() string { - if len(m._rawJSON) > 0 { - if value, err := core.StringifyJSON(m._rawJSON); err == nil { + if len(m.rawJSON) > 0 { + if value, err := internal.StringifyJSON(m.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(m); err == nil { + if value, err := internal.StringifyJSON(m); err == nil { return value } return fmt.Sprintf("%#v", m) } -// - `GET` - GET -// - `OPTIONS` - OPTIONS -// - `HEAD` - HEAD -// - `POST` - POST -// - `PUT` - PUT -// - `PATCH` - PATCH -// - `DELETE` - DELETE +// * `GET` - GET +// * `OPTIONS` - OPTIONS +// * `HEAD` - HEAD +// * `POST` - POST +// * `PUT` - PUT +// * `PATCH` - PATCH +// * `DELETE` - DELETE type MethodEnum string const ( @@ -3258,79 +1749,97 @@ func (m MethodEnum) Ptr() *MethodEnum { } // # The ModelOperation Object -// // ### Description -// // The `ModelOperation` object is used to represent the operations that are currently supported for a given model. // // ### Usage Example -// // View what operations are supported for the `Candidate` endpoint. type ModelOperation struct { - ModelName string `json:"model_name"` - AvailableOperations []string `json:"available_operations,omitempty"` - RequiredPostParameters []string `json:"required_post_parameters,omitempty"` - SupportedFields []string `json:"supported_fields,omitempty"` + ModelName string `json:"model_name" url:"model_name"` + AvailableOperations []string `json:"available_operations" url:"available_operations"` + RequiredPostParameters []string `json:"required_post_parameters" url:"required_post_parameters"` + SupportedFields []string `json:"supported_fields" url:"supported_fields"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (m *ModelOperation) UnmarshalJSON(data []byte) error { - type unmarshaler ModelOperation - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (m *ModelOperation) GetModelName() string { + if m == nil { + return "" } - *m = ModelOperation(value) - m._rawJSON = json.RawMessage(data) - return nil + return m.ModelName } -func (m *ModelOperation) String() string { - if len(m._rawJSON) > 0 { - if value, err := core.StringifyJSON(m._rawJSON); err == nil { - return value - } +func (m *ModelOperation) GetAvailableOperations() []string { + if m == nil { + return nil } - if value, err := core.StringifyJSON(m); err == nil { - return value + return m.AvailableOperations +} + +func (m *ModelOperation) GetRequiredPostParameters() []string { + if m == nil { + return nil } - return fmt.Sprintf("%#v", m) + return m.RequiredPostParameters } -type ModelPermissionDeserializer struct { - IsEnabled *bool `json:"is_enabled,omitempty"` +func (m *ModelOperation) GetSupportedFields() []string { + if m == nil { + return nil + } + return m.SupportedFields +} - _rawJSON json.RawMessage +func (m *ModelOperation) GetExtraProperties() map[string]interface{} { + return m.extraProperties } -func (m *ModelPermissionDeserializer) UnmarshalJSON(data []byte) error { - type unmarshaler ModelPermissionDeserializer +func (m *ModelOperation) UnmarshalJSON(data []byte) error { + type unmarshaler ModelOperation var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *m = ModelPermissionDeserializer(value) - m._rawJSON = json.RawMessage(data) + *m = ModelOperation(value) + extraProperties, err := internal.ExtractExtraProperties(data, *m) + if err != nil { + return err + } + m.extraProperties = extraProperties + m.rawJSON = json.RawMessage(data) return nil } -func (m *ModelPermissionDeserializer) String() string { - if len(m._rawJSON) > 0 { - if value, err := core.StringifyJSON(m._rawJSON); err == nil { +func (m *ModelOperation) String() string { + if len(m.rawJSON) > 0 { + if value, err := internal.StringifyJSON(m.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(m); err == nil { + if value, err := internal.StringifyJSON(m); err == nil { return value } return fmt.Sprintf("%#v", m) } type ModelPermissionDeserializerRequest struct { - IsEnabled *bool `json:"is_enabled,omitempty"` + IsEnabled *bool `json:"is_enabled,omitempty" url:"is_enabled,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (m *ModelPermissionDeserializerRequest) GetIsEnabled() *bool { + if m == nil { + return nil + } + return m.IsEnabled +} - _rawJSON json.RawMessage +func (m *ModelPermissionDeserializerRequest) GetExtraProperties() map[string]interface{} { + return m.extraProperties } func (m *ModelPermissionDeserializerRequest) UnmarshalJSON(data []byte) error { @@ -3340,466 +1849,324 @@ func (m *ModelPermissionDeserializerRequest) UnmarshalJSON(data []byte) error { return err } *m = ModelPermissionDeserializerRequest(value) - m._rawJSON = json.RawMessage(data) + extraProperties, err := internal.ExtractExtraProperties(data, *m) + if err != nil { + return err + } + m.extraProperties = extraProperties + m.rawJSON = json.RawMessage(data) return nil } func (m *ModelPermissionDeserializerRequest) String() string { - if len(m._rawJSON) > 0 { - if value, err := core.StringifyJSON(m._rawJSON); err == nil { + if len(m.rawJSON) > 0 { + if value, err := internal.StringifyJSON(m.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(m); err == nil { + if value, err := internal.StringifyJSON(m); err == nil { return value } return fmt.Sprintf("%#v", m) } // # The MultipartFormField Object -// // ### Description -// // The `MultipartFormField` object is used to represent fields in an HTTP request using `multipart/form-data`. // // ### Usage Example -// // Create a `MultipartFormField` to define a multipart form entry. type MultipartFormFieldRequest struct { // The name of the form field - Name string `json:"name"` + Name string `json:"name" url:"name"` // The data for the form field. - Data string `json:"data"` + Data string `json:"data" url:"data"` // The encoding of the value of `data`. Defaults to `RAW` if not defined. // - // - `RAW` - RAW - // - `BASE64` - BASE64 - // - `GZIP_BASE64` - GZIP_BASE64 - Encoding *MultipartFormFieldRequestEncoding `json:"encoding,omitempty"` + // * `RAW` - RAW + // * `BASE64` - BASE64 + // * `GZIP_BASE64` - GZIP_BASE64 + Encoding *MultipartFormFieldRequestEncoding `json:"encoding,omitempty" url:"encoding,omitempty"` // The file name of the form field, if the field is for a file. - FileName *string `json:"file_name,omitempty"` + FileName *string `json:"file_name,omitempty" url:"file_name,omitempty"` // The MIME type of the file, if the field is for a file. - ContentType *string `json:"content_type,omitempty"` + ContentType *string `json:"content_type,omitempty" url:"content_type,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (m *MultipartFormFieldRequest) UnmarshalJSON(data []byte) error { - type unmarshaler MultipartFormFieldRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (m *MultipartFormFieldRequest) GetName() string { + if m == nil { + return "" } - *m = MultipartFormFieldRequest(value) - m._rawJSON = json.RawMessage(data) - return nil + return m.Name } -func (m *MultipartFormFieldRequest) String() string { - if len(m._rawJSON) > 0 { - if value, err := core.StringifyJSON(m._rawJSON); err == nil { - return value - } +func (m *MultipartFormFieldRequest) GetData() string { + if m == nil { + return "" } - if value, err := core.StringifyJSON(m); err == nil { - return value - } - return fmt.Sprintf("%#v", m) -} - -// The encoding of the value of `data`. Defaults to `RAW` if not defined. -// -// - `RAW` - RAW -// - `BASE64` - BASE64 -// - `GZIP_BASE64` - GZIP_BASE64 -type MultipartFormFieldRequestEncoding struct { - typeName string - EncodingEnum EncodingEnum - String string -} - -func NewMultipartFormFieldRequestEncodingFromEncodingEnum(value EncodingEnum) *MultipartFormFieldRequestEncoding { - return &MultipartFormFieldRequestEncoding{typeName: "encodingEnum", EncodingEnum: value} + return m.Data } -func NewMultipartFormFieldRequestEncodingFromString(value string) *MultipartFormFieldRequestEncoding { - return &MultipartFormFieldRequestEncoding{typeName: "string", String: value} -} - -func (m *MultipartFormFieldRequestEncoding) UnmarshalJSON(data []byte) error { - var valueEncodingEnum EncodingEnum - if err := json.Unmarshal(data, &valueEncodingEnum); err == nil { - m.typeName = "encodingEnum" - m.EncodingEnum = valueEncodingEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - m.typeName = "string" - m.String = valueString +func (m *MultipartFormFieldRequest) GetEncoding() *MultipartFormFieldRequestEncoding { + if m == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, m) -} - -func (m MultipartFormFieldRequestEncoding) MarshalJSON() ([]byte, error) { - switch m.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", m.typeName, m) - case "encodingEnum": - return json.Marshal(m.EncodingEnum) - case "string": - return json.Marshal(m.String) - } -} - -type MultipartFormFieldRequestEncodingVisitor interface { - VisitEncodingEnum(EncodingEnum) error - VisitString(string) error -} - -func (m *MultipartFormFieldRequestEncoding) Accept(visitor MultipartFormFieldRequestEncodingVisitor) error { - switch m.typeName { - default: - return fmt.Errorf("invalid type %s in %T", m.typeName, m) - case "encodingEnum": - return visitor.VisitEncodingEnum(m.EncodingEnum) - case "string": - return visitor.VisitString(m.String) - } -} - -type PaginatedAccountDetailsAndActionsList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*AccountDetailsAndActions `json:"results,omitempty"` - - _rawJSON json.RawMessage -} - -func (p *PaginatedAccountDetailsAndActionsList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedAccountDetailsAndActionsList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *p = PaginatedAccountDetailsAndActionsList(value) - p._rawJSON = json.RawMessage(data) - return nil -} - -func (p *PaginatedAccountDetailsAndActionsList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) -} - -type PaginatedAuditLogEventList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*AuditLogEvent `json:"results,omitempty"` - - _rawJSON json.RawMessage -} - -func (p *PaginatedAuditLogEventList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedAuditLogEventList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *p = PaginatedAuditLogEventList(value) - p._rawJSON = json.RawMessage(data) - return nil -} - -func (p *PaginatedAuditLogEventList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) -} - -type PaginatedDriveList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Drive `json:"results,omitempty"` - - _rawJSON json.RawMessage + return m.Encoding } -func (p *PaginatedDriveList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedDriveList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (m *MultipartFormFieldRequest) GetFileName() *string { + if m == nil { + return nil } - *p = PaginatedDriveList(value) - p._rawJSON = json.RawMessage(data) - return nil + return m.FileName } -func (p *PaginatedDriveList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value +func (m *MultipartFormFieldRequest) GetContentType() *string { + if m == nil { + return nil } - return fmt.Sprintf("%#v", p) + return m.ContentType } -type PaginatedFileList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*File `json:"results,omitempty"` - - _rawJSON json.RawMessage +func (m *MultipartFormFieldRequest) GetExtraProperties() map[string]interface{} { + return m.extraProperties } -func (p *PaginatedFileList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedFileList +func (m *MultipartFormFieldRequest) UnmarshalJSON(data []byte) error { + type unmarshaler MultipartFormFieldRequest var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *p = PaginatedFileList(value) - p._rawJSON = json.RawMessage(data) - return nil -} - -func (p *PaginatedFileList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) -} - -type PaginatedFolderList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Folder `json:"results,omitempty"` - - _rawJSON json.RawMessage -} - -func (p *PaginatedFolderList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedFolderList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { + *m = MultipartFormFieldRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *m) + if err != nil { return err } - *p = PaginatedFolderList(value) - p._rawJSON = json.RawMessage(data) + m.extraProperties = extraProperties + m.rawJSON = json.RawMessage(data) return nil } -func (p *PaginatedFolderList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { +func (m *MultipartFormFieldRequest) String() string { + if len(m.rawJSON) > 0 { + if value, err := internal.StringifyJSON(m.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(p); err == nil { + if value, err := internal.StringifyJSON(m); err == nil { return value } - return fmt.Sprintf("%#v", p) + return fmt.Sprintf("%#v", m) } -type PaginatedGroupList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Group `json:"results,omitempty"` - - _rawJSON json.RawMessage -} +// The encoding of the value of `data`. Defaults to `RAW` if not defined. +// +// * `RAW` - RAW +// * `BASE64` - BASE64 +// * `GZIP_BASE64` - GZIP_BASE64 +type MultipartFormFieldRequestEncoding struct { + EncodingEnum EncodingEnum + String string -func (p *PaginatedGroupList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedGroupList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *p = PaginatedGroupList(value) - p._rawJSON = json.RawMessage(data) - return nil + typ string } -func (p *PaginatedGroupList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } +func (m *MultipartFormFieldRequestEncoding) GetEncodingEnum() EncodingEnum { + if m == nil { + return "" } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) -} - -type PaginatedIssueList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Issue `json:"results,omitempty"` - - _rawJSON json.RawMessage + return m.EncodingEnum } -func (p *PaginatedIssueList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedIssueList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (m *MultipartFormFieldRequestEncoding) GetString() string { + if m == nil { + return "" } - *p = PaginatedIssueList(value) - p._rawJSON = json.RawMessage(data) - return nil + return m.String } -func (p *PaginatedIssueList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value +func (m *MultipartFormFieldRequestEncoding) UnmarshalJSON(data []byte) error { + var valueEncodingEnum EncodingEnum + if err := json.Unmarshal(data, &valueEncodingEnum); err == nil { + m.typ = "EncodingEnum" + m.EncodingEnum = valueEncodingEnum + return nil } - return fmt.Sprintf("%#v", p) -} - -type PaginatedSyncStatusList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*SyncStatus `json:"results,omitempty"` - - _rawJSON json.RawMessage -} - -func (p *PaginatedSyncStatusList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedSyncStatusList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + m.typ = "String" + m.String = valueString + return nil } - *p = PaginatedSyncStatusList(value) - p._rawJSON = json.RawMessage(data) - return nil + return fmt.Errorf("%s cannot be deserialized as a %T", data, m) } -func (p *PaginatedSyncStatusList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } +func (m MultipartFormFieldRequestEncoding) MarshalJSON() ([]byte, error) { + if m.typ == "EncodingEnum" || m.EncodingEnum != "" { + return json.Marshal(m.EncodingEnum) } - if value, err := core.StringifyJSON(p); err == nil { - return value + if m.typ == "String" || m.String != "" { + return json.Marshal(m.String) } - return fmt.Sprintf("%#v", p) -} - -type PaginatedUserList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*User `json:"results,omitempty"` - - _rawJSON json.RawMessage + return nil, fmt.Errorf("type %T does not include a non-empty union type", m) } -func (p *PaginatedUserList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedUserList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *p = PaginatedUserList(value) - p._rawJSON = json.RawMessage(data) - return nil +type MultipartFormFieldRequestEncodingVisitor interface { + VisitEncodingEnum(EncodingEnum) error + VisitString(string) error } -func (p *PaginatedUserList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } +func (m *MultipartFormFieldRequestEncoding) Accept(visitor MultipartFormFieldRequestEncodingVisitor) error { + if m.typ == "EncodingEnum" || m.EncodingEnum != "" { + return visitor.VisitEncodingEnum(m.EncodingEnum) } - if value, err := core.StringifyJSON(p); err == nil { - return value + if m.typ == "String" || m.String != "" { + return visitor.VisitString(m.String) } - return fmt.Sprintf("%#v", p) + return fmt.Errorf("type %T does not include a non-empty union type", m) } // # The Permission Object -// // ### Description -// // The Permission object is used to represent a user's or group's access to a File or Folder. Permissions are unexpanded by default. // // ### Usage Example -// // Fetch from the `GET Files` or `GET Folders` endpoint. Permissions are unexpanded by default. Use the query param `expand=permissions` to see more details. type Permission struct { - Id *string `json:"id,omitempty"` + Id *string `json:"id,omitempty" url:"id,omitempty"` // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` // The user that is granted this permission. This will only be populated if the type is `USER`. - User *PermissionUser `json:"user,omitempty"` + User *PermissionUser `json:"user,omitempty" url:"user,omitempty"` // The group that is granted this permission. This will only be populated if the type is `GROUP`. - Group *PermissionGroup `json:"group,omitempty"` + Group *PermissionGroup `json:"group,omitempty" url:"group,omitempty"` // Denotes what type of people have access to the file. // - // - `USER` - USER - // - `GROUP` - GROUP - // - `COMPANY` - COMPANY - // - `ANYONE` - ANYONE - Type *PermissionType `json:"type,omitempty"` + // * `USER` - USER + // * `GROUP` - GROUP + // * `COMPANY` - COMPANY + // * `ANYONE` - ANYONE + Type *PermissionType `json:"type,omitempty" url:"type,omitempty"` // 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. - Roles []*PermissionRolesItem `json:"roles,omitempty"` + Roles []*PermissionRolesItem `json:"roles,omitempty" url:"roles,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *Permission) GetId() *string { + if p == nil { + return nil + } + return p.Id +} + +func (p *Permission) GetRemoteId() *string { + if p == nil { + return nil + } + return p.RemoteId +} - _rawJSON json.RawMessage +func (p *Permission) GetCreatedAt() *time.Time { + if p == nil { + return nil + } + return p.CreatedAt +} + +func (p *Permission) GetModifiedAt() *time.Time { + if p == nil { + return nil + } + return p.ModifiedAt +} + +func (p *Permission) GetUser() *PermissionUser { + if p == nil { + return nil + } + return p.User +} + +func (p *Permission) GetGroup() *PermissionGroup { + if p == nil { + return nil + } + return p.Group +} + +func (p *Permission) GetType() *PermissionType { + if p == nil { + return nil + } + return p.Type +} + +func (p *Permission) GetRoles() []*PermissionRolesItem { + if p == nil { + return nil + } + return p.Roles +} + +func (p *Permission) GetExtraProperties() map[string]interface{} { + return p.extraProperties } func (p *Permission) UnmarshalJSON(data []byte) error { - type unmarshaler Permission - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { + type embed Permission + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*p), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *p = Permission(unmarshaler.embed) + p.CreatedAt = unmarshaler.CreatedAt.TimePtr() + p.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { return err } - *p = Permission(value) - p._rawJSON = json.RawMessage(data) + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) return nil } +func (p *Permission) MarshalJSON() ([]byte, error) { + type embed Permission + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*p), + CreatedAt: internal.NewOptionalDateTime(p.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(p.ModifiedAt), + } + return json.Marshal(marshaler) +} + func (p *Permission) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(p); err == nil { + if value, err := internal.StringifyJSON(p); err == nil { return value } return fmt.Sprintf("%#v", p) @@ -3807,29 +2174,36 @@ func (p *Permission) String() string { // The group that is granted this permission. This will only be populated if the type is `GROUP`. type PermissionGroup struct { - typeName string - String string - Group *Group + String string + Group *Group + + typ string } -func NewPermissionGroupFromString(value string) *PermissionGroup { - return &PermissionGroup{typeName: "string", String: value} +func (p *PermissionGroup) GetString() string { + if p == nil { + return "" + } + return p.String } -func NewPermissionGroupFromGroup(value *Group) *PermissionGroup { - return &PermissionGroup{typeName: "group", Group: value} +func (p *PermissionGroup) GetGroup() *Group { + if p == nil { + return nil + } + return p.Group } func (p *PermissionGroup) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" + p.typ = "String" p.String = valueString return nil } valueGroup := new(Group) if err := json.Unmarshal(data, &valueGroup); err == nil { - p.typeName = "group" + p.typ = "Group" p.Group = valueGroup return nil } @@ -3837,14 +2211,13 @@ func (p *PermissionGroup) UnmarshalJSON(data []byte) error { } func (p PermissionGroup) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": + if p.typ == "String" || p.String != "" { return json.Marshal(p.String) - case "group": + } + if p.typ == "Group" || p.Group != nil { return json.Marshal(p.Group) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) } type PermissionGroupVisitor interface { @@ -3853,45 +2226,95 @@ type PermissionGroupVisitor interface { } func (p *PermissionGroup) Accept(visitor PermissionGroupVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": + if p.typ == "String" || p.String != "" { return visitor.VisitString(p.String) - case "group": + } + if p.typ == "Group" || p.Group != nil { return visitor.VisitGroup(p.Group) } + return fmt.Errorf("type %T does not include a non-empty union type", p) } // # The Permission Object -// // ### Description -// // The Permission object is used to represent a user's or group's access to a File or Folder. Permissions are unexpanded by default. // // ### Usage Example -// // Fetch from the `GET Files` or `GET Folders` endpoint. Permissions are unexpanded by default. Use the query param `expand=permissions` to see more details. type PermissionRequest struct { // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` // The user that is granted this permission. This will only be populated if the type is `USER`. - User *PermissionRequestUser `json:"user,omitempty"` + User *PermissionRequestUser `json:"user,omitempty" url:"user,omitempty"` // The group that is granted this permission. This will only be populated if the type is `GROUP`. - Group *PermissionRequestGroup `json:"group,omitempty"` + Group *PermissionRequestGroup `json:"group,omitempty" url:"group,omitempty"` // Denotes what type of people have access to the file. // - // - `USER` - USER - // - `GROUP` - GROUP - // - `COMPANY` - COMPANY - // - `ANYONE` - ANYONE - Type *PermissionRequestType `json:"type,omitempty"` + // * `USER` - USER + // * `GROUP` - GROUP + // * `COMPANY` - COMPANY + // * `ANYONE` - ANYONE + Type *PermissionRequestType `json:"type,omitempty" url:"type,omitempty"` // 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. - Roles []*PermissionRequestRolesItem `json:"roles,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` + Roles []*PermissionRequestRolesItem `json:"roles,omitempty" url:"roles,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PermissionRequest) GetRemoteId() *string { + if p == nil { + return nil + } + return p.RemoteId +} + +func (p *PermissionRequest) GetUser() *PermissionRequestUser { + if p == nil { + return nil + } + return p.User +} + +func (p *PermissionRequest) GetGroup() *PermissionRequestGroup { + if p == nil { + return nil + } + return p.Group +} + +func (p *PermissionRequest) GetType() *PermissionRequestType { + if p == nil { + return nil + } + return p.Type +} + +func (p *PermissionRequest) GetRoles() []*PermissionRequestRolesItem { + if p == nil { + return nil + } + return p.Roles +} - _rawJSON json.RawMessage +func (p *PermissionRequest) GetIntegrationParams() map[string]interface{} { + if p == nil { + return nil + } + return p.IntegrationParams +} + +func (p *PermissionRequest) GetLinkedAccountParams() map[string]interface{} { + if p == nil { + return nil + } + return p.LinkedAccountParams +} + +func (p *PermissionRequest) GetExtraProperties() map[string]interface{} { + return p.extraProperties } func (p *PermissionRequest) UnmarshalJSON(data []byte) error { @@ -3901,17 +2324,22 @@ func (p *PermissionRequest) UnmarshalJSON(data []byte) error { return err } *p = PermissionRequest(value) - p._rawJSON = json.RawMessage(data) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) return nil } func (p *PermissionRequest) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(p); err == nil { + if value, err := internal.StringifyJSON(p); err == nil { return value } return fmt.Sprintf("%#v", p) @@ -3919,29 +2347,36 @@ func (p *PermissionRequest) String() string { // The group that is granted this permission. This will only be populated if the type is `GROUP`. type PermissionRequestGroup struct { - typeName string - String string - Group *Group + String string + Group *Group + + typ string } -func NewPermissionRequestGroupFromString(value string) *PermissionRequestGroup { - return &PermissionRequestGroup{typeName: "string", String: value} +func (p *PermissionRequestGroup) GetString() string { + if p == nil { + return "" + } + return p.String } -func NewPermissionRequestGroupFromGroup(value *Group) *PermissionRequestGroup { - return &PermissionRequestGroup{typeName: "group", Group: value} +func (p *PermissionRequestGroup) GetGroup() *Group { + if p == nil { + return nil + } + return p.Group } func (p *PermissionRequestGroup) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" + p.typ = "String" p.String = valueString return nil } valueGroup := new(Group) if err := json.Unmarshal(data, &valueGroup); err == nil { - p.typeName = "group" + p.typ = "Group" p.Group = valueGroup return nil } @@ -3949,14 +2384,13 @@ func (p *PermissionRequestGroup) UnmarshalJSON(data []byte) error { } func (p PermissionRequestGroup) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": + if p.typ == "String" || p.String != "" { return json.Marshal(p.String) - case "group": + } + if p.typ == "Group" || p.Group != nil { return json.Marshal(p.Group) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) } type PermissionRequestGroupVisitor interface { @@ -3965,45 +2399,51 @@ type PermissionRequestGroupVisitor interface { } func (p *PermissionRequestGroup) Accept(visitor PermissionRequestGroupVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": + if p.typ == "String" || p.String != "" { return visitor.VisitString(p.String) - case "group": + } + if p.typ == "Group" || p.Group != nil { return visitor.VisitGroup(p.Group) } + return fmt.Errorf("type %T does not include a non-empty union type", p) } // The permissions that the user or group has for the File or Folder. // -// - `READ` - READ -// - `WRITE` - WRITE -// - `OWNER` - OWNER +// * `READ` - READ +// * `WRITE` - WRITE +// * `OWNER` - OWNER type PermissionRequestRolesItem struct { - typeName string RolesEnum RolesEnum String string + + typ string } -func NewPermissionRequestRolesItemFromRolesEnum(value RolesEnum) *PermissionRequestRolesItem { - return &PermissionRequestRolesItem{typeName: "rolesEnum", RolesEnum: value} +func (p *PermissionRequestRolesItem) GetRolesEnum() RolesEnum { + if p == nil { + return "" + } + return p.RolesEnum } -func NewPermissionRequestRolesItemFromString(value string) *PermissionRequestRolesItem { - return &PermissionRequestRolesItem{typeName: "string", String: value} +func (p *PermissionRequestRolesItem) GetString() string { + if p == nil { + return "" + } + return p.String } func (p *PermissionRequestRolesItem) UnmarshalJSON(data []byte) error { var valueRolesEnum RolesEnum if err := json.Unmarshal(data, &valueRolesEnum); err == nil { - p.typeName = "rolesEnum" + p.typ = "RolesEnum" p.RolesEnum = valueRolesEnum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" + p.typ = "String" p.String = valueString return nil } @@ -4011,14 +2451,13 @@ func (p *PermissionRequestRolesItem) UnmarshalJSON(data []byte) error { } func (p PermissionRequestRolesItem) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "rolesEnum": + if p.typ == "RolesEnum" || p.RolesEnum != "" { return json.Marshal(p.RolesEnum) - case "string": + } + if p.typ == "String" || p.String != "" { return json.Marshal(p.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) } type PermissionRequestRolesItemVisitor interface { @@ -4027,46 +2466,52 @@ type PermissionRequestRolesItemVisitor interface { } func (p *PermissionRequestRolesItem) Accept(visitor PermissionRequestRolesItemVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "rolesEnum": + if p.typ == "RolesEnum" || p.RolesEnum != "" { return visitor.VisitRolesEnum(p.RolesEnum) - case "string": + } + if p.typ == "String" || p.String != "" { return visitor.VisitString(p.String) } + return fmt.Errorf("type %T does not include a non-empty union type", p) } // Denotes what type of people have access to the file. // -// - `USER` - USER -// - `GROUP` - GROUP -// - `COMPANY` - COMPANY -// - `ANYONE` - ANYONE +// * `USER` - USER +// * `GROUP` - GROUP +// * `COMPANY` - COMPANY +// * `ANYONE` - ANYONE type PermissionRequestType struct { - typeName string TypeEnum TypeEnum String string + + typ string } -func NewPermissionRequestTypeFromTypeEnum(value TypeEnum) *PermissionRequestType { - return &PermissionRequestType{typeName: "typeEnum", TypeEnum: value} +func (p *PermissionRequestType) GetTypeEnum() TypeEnum { + if p == nil { + return "" + } + return p.TypeEnum } -func NewPermissionRequestTypeFromString(value string) *PermissionRequestType { - return &PermissionRequestType{typeName: "string", String: value} +func (p *PermissionRequestType) GetString() string { + if p == nil { + return "" + } + return p.String } func (p *PermissionRequestType) UnmarshalJSON(data []byte) error { var valueTypeEnum TypeEnum if err := json.Unmarshal(data, &valueTypeEnum); err == nil { - p.typeName = "typeEnum" + p.typ = "TypeEnum" p.TypeEnum = valueTypeEnum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" + p.typ = "String" p.String = valueString return nil } @@ -4074,14 +2519,13 @@ func (p *PermissionRequestType) UnmarshalJSON(data []byte) error { } func (p PermissionRequestType) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "typeEnum": + if p.typ == "TypeEnum" || p.TypeEnum != "" { return json.Marshal(p.TypeEnum) - case "string": + } + if p.typ == "String" || p.String != "" { return json.Marshal(p.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) } type PermissionRequestTypeVisitor interface { @@ -4090,41 +2534,47 @@ type PermissionRequestTypeVisitor interface { } func (p *PermissionRequestType) Accept(visitor PermissionRequestTypeVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "typeEnum": + if p.typ == "TypeEnum" || p.TypeEnum != "" { return visitor.VisitTypeEnum(p.TypeEnum) - case "string": + } + if p.typ == "String" || p.String != "" { return visitor.VisitString(p.String) } + return fmt.Errorf("type %T does not include a non-empty union type", p) } // The user that is granted this permission. This will only be populated if the type is `USER`. type PermissionRequestUser struct { - typeName string - String string - User *User + String string + User *User + + typ string } -func NewPermissionRequestUserFromString(value string) *PermissionRequestUser { - return &PermissionRequestUser{typeName: "string", String: value} +func (p *PermissionRequestUser) GetString() string { + if p == nil { + return "" + } + return p.String } -func NewPermissionRequestUserFromUser(value *User) *PermissionRequestUser { - return &PermissionRequestUser{typeName: "user", User: value} +func (p *PermissionRequestUser) GetUser() *User { + if p == nil { + return nil + } + return p.User } func (p *PermissionRequestUser) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" + p.typ = "String" p.String = valueString return nil } valueUser := new(User) if err := json.Unmarshal(data, &valueUser); err == nil { - p.typeName = "user" + p.typ = "User" p.User = valueUser return nil } @@ -4132,14 +2582,13 @@ func (p *PermissionRequestUser) UnmarshalJSON(data []byte) error { } func (p PermissionRequestUser) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": + if p.typ == "String" || p.String != "" { return json.Marshal(p.String) - case "user": + } + if p.typ == "User" || p.User != nil { return json.Marshal(p.User) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) } type PermissionRequestUserVisitor interface { @@ -4148,45 +2597,51 @@ type PermissionRequestUserVisitor interface { } func (p *PermissionRequestUser) Accept(visitor PermissionRequestUserVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": + if p.typ == "String" || p.String != "" { return visitor.VisitString(p.String) - case "user": + } + if p.typ == "User" || p.User != nil { return visitor.VisitUser(p.User) } + return fmt.Errorf("type %T does not include a non-empty union type", p) } // The permissions that the user or group has for the File or Folder. // -// - `READ` - READ -// - `WRITE` - WRITE -// - `OWNER` - OWNER +// * `READ` - READ +// * `WRITE` - WRITE +// * `OWNER` - OWNER type PermissionRolesItem struct { - typeName string RolesEnum RolesEnum String string + + typ string } -func NewPermissionRolesItemFromRolesEnum(value RolesEnum) *PermissionRolesItem { - return &PermissionRolesItem{typeName: "rolesEnum", RolesEnum: value} +func (p *PermissionRolesItem) GetRolesEnum() RolesEnum { + if p == nil { + return "" + } + return p.RolesEnum } -func NewPermissionRolesItemFromString(value string) *PermissionRolesItem { - return &PermissionRolesItem{typeName: "string", String: value} +func (p *PermissionRolesItem) GetString() string { + if p == nil { + return "" + } + return p.String } func (p *PermissionRolesItem) UnmarshalJSON(data []byte) error { var valueRolesEnum RolesEnum if err := json.Unmarshal(data, &valueRolesEnum); err == nil { - p.typeName = "rolesEnum" + p.typ = "RolesEnum" p.RolesEnum = valueRolesEnum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" + p.typ = "String" p.String = valueString return nil } @@ -4194,14 +2649,13 @@ func (p *PermissionRolesItem) UnmarshalJSON(data []byte) error { } func (p PermissionRolesItem) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "rolesEnum": + if p.typ == "RolesEnum" || p.RolesEnum != "" { return json.Marshal(p.RolesEnum) - case "string": + } + if p.typ == "String" || p.String != "" { return json.Marshal(p.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) } type PermissionRolesItemVisitor interface { @@ -4210,46 +2664,52 @@ type PermissionRolesItemVisitor interface { } func (p *PermissionRolesItem) Accept(visitor PermissionRolesItemVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "rolesEnum": + if p.typ == "RolesEnum" || p.RolesEnum != "" { return visitor.VisitRolesEnum(p.RolesEnum) - case "string": + } + if p.typ == "String" || p.String != "" { return visitor.VisitString(p.String) } + return fmt.Errorf("type %T does not include a non-empty union type", p) } // Denotes what type of people have access to the file. // -// - `USER` - USER -// - `GROUP` - GROUP -// - `COMPANY` - COMPANY -// - `ANYONE` - ANYONE +// * `USER` - USER +// * `GROUP` - GROUP +// * `COMPANY` - COMPANY +// * `ANYONE` - ANYONE type PermissionType struct { - typeName string TypeEnum TypeEnum String string + + typ string } -func NewPermissionTypeFromTypeEnum(value TypeEnum) *PermissionType { - return &PermissionType{typeName: "typeEnum", TypeEnum: value} +func (p *PermissionType) GetTypeEnum() TypeEnum { + if p == nil { + return "" + } + return p.TypeEnum } -func NewPermissionTypeFromString(value string) *PermissionType { - return &PermissionType{typeName: "string", String: value} +func (p *PermissionType) GetString() string { + if p == nil { + return "" + } + return p.String } func (p *PermissionType) UnmarshalJSON(data []byte) error { var valueTypeEnum TypeEnum if err := json.Unmarshal(data, &valueTypeEnum); err == nil { - p.typeName = "typeEnum" + p.typ = "TypeEnum" p.TypeEnum = valueTypeEnum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" + p.typ = "String" p.String = valueString return nil } @@ -4257,14 +2717,13 @@ func (p *PermissionType) UnmarshalJSON(data []byte) error { } func (p PermissionType) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "typeEnum": + if p.typ == "TypeEnum" || p.TypeEnum != "" { return json.Marshal(p.TypeEnum) - case "string": + } + if p.typ == "String" || p.String != "" { return json.Marshal(p.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) } type PermissionTypeVisitor interface { @@ -4273,41 +2732,47 @@ type PermissionTypeVisitor interface { } func (p *PermissionType) Accept(visitor PermissionTypeVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "typeEnum": + if p.typ == "TypeEnum" || p.TypeEnum != "" { return visitor.VisitTypeEnum(p.TypeEnum) - case "string": + } + if p.typ == "String" || p.String != "" { return visitor.VisitString(p.String) } + return fmt.Errorf("type %T does not include a non-empty union type", p) } // The user that is granted this permission. This will only be populated if the type is `USER`. type PermissionUser struct { - typeName string - String string - User *User + String string + User *User + + typ string } -func NewPermissionUserFromString(value string) *PermissionUser { - return &PermissionUser{typeName: "string", String: value} +func (p *PermissionUser) GetString() string { + if p == nil { + return "" + } + return p.String } -func NewPermissionUserFromUser(value *User) *PermissionUser { - return &PermissionUser{typeName: "user", User: value} +func (p *PermissionUser) GetUser() *User { + if p == nil { + return nil + } + return p.User } func (p *PermissionUser) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" + p.typ = "String" p.String = valueString return nil } valueUser := new(User) if err := json.Unmarshal(data, &valueUser); err == nil { - p.typeName = "user" + p.typ = "User" p.User = valueUser return nil } @@ -4315,14 +2780,13 @@ func (p *PermissionUser) UnmarshalJSON(data []byte) error { } func (p PermissionUser) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": + if p.typ == "String" || p.String != "" { return json.Marshal(p.String) - case "user": + } + if p.typ == "User" || p.User != nil { return json.Marshal(p.User) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) } type PermissionUserVisitor interface { @@ -4331,269 +2795,206 @@ type PermissionUserVisitor interface { } func (p *PermissionUser) Accept(visitor PermissionUserVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "string": + if p.typ == "String" || p.String != "" { return visitor.VisitString(p.String) - case "user": + } + if p.typ == "User" || p.User != nil { return visitor.VisitUser(p.User) } + return fmt.Errorf("type %T does not include a non-empty union type", p) } // # The RemoteData Object -// // ### Description -// // The `RemoteData` object is used to represent the full data pulled from the third-party API for an object. // // ### Usage Example -// // TODO type RemoteData struct { // The third-party API path that is being called. - Path string `json:"path"` - Data interface{} `json:"data,omitempty"` + Path string `json:"path" url:"path"` + Data interface{} `json:"data,omitempty" url:"data,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (r *RemoteData) UnmarshalJSON(data []byte) error { - type unmarshaler RemoteData - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (r *RemoteData) GetPath() string { + if r == nil { + return "" } - *r = RemoteData(value) - r._rawJSON = json.RawMessage(data) - return nil + return r.Path } -func (r *RemoteData) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(r); err == nil { - return value +func (r *RemoteData) GetData() interface{} { + if r == nil { + return nil } - return fmt.Sprintf("%#v", r) + return r.Data } -type RemoteEndpointInfo struct { - Method string `json:"method"` - UrlPath string `json:"url_path"` - FieldTraversalPath []interface{} `json:"field_traversal_path,omitempty"` - - _rawJSON json.RawMessage +func (r *RemoteData) GetExtraProperties() map[string]interface{} { + return r.extraProperties } -func (r *RemoteEndpointInfo) UnmarshalJSON(data []byte) error { - type unmarshaler RemoteEndpointInfo +func (r *RemoteData) UnmarshalJSON(data []byte) error { + type unmarshaler RemoteData var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *r = RemoteEndpointInfo(value) - r._rawJSON = json.RawMessage(data) - return nil -} - -func (r *RemoteEndpointInfo) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(r); err == nil { - return value - } - return fmt.Sprintf("%#v", r) -} - -type RemoteFieldApi struct { - Schema map[string]interface{} `json:"schema,omitempty"` - RemoteKeyName string `json:"remote_key_name"` - RemoteEndpointInfo *RemoteEndpointInfo `json:"remote_endpoint_info,omitempty"` - ExampleValues []interface{} `json:"example_values,omitempty"` - AdvancedMetadata *AdvancedMetadata `json:"advanced_metadata,omitempty"` - Coverage *RemoteFieldApiCoverage `json:"coverage,omitempty"` - - _rawJSON json.RawMessage -} - -func (r *RemoteFieldApi) UnmarshalJSON(data []byte) error { - type unmarshaler RemoteFieldApi - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { + *r = RemoteData(value) + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { return err } - *r = RemoteFieldApi(value) - r._rawJSON = json.RawMessage(data) + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) return nil } -func (r *RemoteFieldApi) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { +func (r *RemoteData) String() string { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(r); err == nil { + if value, err := internal.StringifyJSON(r); err == nil { return value } return fmt.Sprintf("%#v", r) } -type RemoteFieldApiCoverage struct { - typeName string - Integer int - Double float64 -} - -func NewRemoteFieldApiCoverageFromInteger(value int) *RemoteFieldApiCoverage { - return &RemoteFieldApiCoverage{typeName: "integer", Integer: value} -} - -func NewRemoteFieldApiCoverageFromDouble(value float64) *RemoteFieldApiCoverage { - return &RemoteFieldApiCoverage{typeName: "double", Double: value} -} +// # The RemoteKey Object +// ### Description +// The `RemoteKey` object is used to represent a request for a new remote key. +// +// ### Usage Example +// Post a `GenerateRemoteKey` to receive a new `RemoteKey`. +type RemoteKey struct { + Name string `json:"name" url:"name"` + Key string `json:"key" url:"key"` -func (r *RemoteFieldApiCoverage) UnmarshalJSON(data []byte) error { - var valueInteger int - if err := json.Unmarshal(data, &valueInteger); err == nil { - r.typeName = "integer" - r.Integer = valueInteger - return nil - } - var valueDouble float64 - if err := json.Unmarshal(data, &valueDouble); err == nil { - r.typeName = "double" - r.Double = valueDouble - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, r) + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (r RemoteFieldApiCoverage) MarshalJSON() ([]byte, error) { - switch r.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", r.typeName, r) - case "integer": - return json.Marshal(r.Integer) - case "double": - return json.Marshal(r.Double) +func (r *RemoteKey) GetName() string { + if r == nil { + return "" } + return r.Name } -type RemoteFieldApiCoverageVisitor interface { - VisitInteger(int) error - VisitDouble(float64) error -} - -func (r *RemoteFieldApiCoverage) Accept(visitor RemoteFieldApiCoverageVisitor) error { - switch r.typeName { - default: - return fmt.Errorf("invalid type %s in %T", r.typeName, r) - case "integer": - return visitor.VisitInteger(r.Integer) - case "double": - return visitor.VisitDouble(r.Double) +func (r *RemoteKey) GetKey() string { + if r == nil { + return "" } + return r.Key } -type RemoteFieldApiResponse struct { - File []*RemoteFieldApi `json:"File,omitempty"` - Folder []*RemoteFieldApi `json:"Folder,omitempty"` - Drive []*RemoteFieldApi `json:"Drive,omitempty"` - Group []*RemoteFieldApi `json:"Group,omitempty"` - User []*RemoteFieldApi `json:"User,omitempty"` - - _rawJSON json.RawMessage +func (r *RemoteKey) GetExtraProperties() map[string]interface{} { + return r.extraProperties } -func (r *RemoteFieldApiResponse) UnmarshalJSON(data []byte) error { - type unmarshaler RemoteFieldApiResponse +func (r *RemoteKey) UnmarshalJSON(data []byte) error { + type unmarshaler RemoteKey var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *r = RemoteFieldApiResponse(value) - r._rawJSON = json.RawMessage(data) + *r = RemoteKey(value) + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { + return err + } + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) return nil } -func (r *RemoteFieldApiResponse) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { +func (r *RemoteKey) String() string { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(r); err == nil { + if value, err := internal.StringifyJSON(r); err == nil { return value } return fmt.Sprintf("%#v", r) } -// # The RemoteKey Object -// +// # The RemoteResponse Object // ### Description -// -// The `RemoteKey` object is used to represent a request for a new remote key. +// The `RemoteResponse` object is used to represent information returned from a third-party endpoint. // // ### Usage Example -// -// Post a `GenerateRemoteKey` to receive a new `RemoteKey`. -type RemoteKey struct { - Name string `json:"name"` - Key string `json:"key"` +// View the `RemoteResponse` returned from your `DataPassthrough`. +type RemoteResponse struct { + Method string `json:"method" url:"method"` + Path string `json:"path" url:"path"` + Status int `json:"status" url:"status"` + Response interface{} `json:"response" url:"response"` + ResponseHeaders map[string]interface{} `json:"response_headers,omitempty" url:"response_headers,omitempty"` + ResponseType *RemoteResponseResponseType `json:"response_type,omitempty" url:"response_type,omitempty"` + Headers map[string]interface{} `json:"headers,omitempty" url:"headers,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (r *RemoteKey) UnmarshalJSON(data []byte) error { - type unmarshaler RemoteKey - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (r *RemoteResponse) GetMethod() string { + if r == nil { + return "" } - *r = RemoteKey(value) - r._rawJSON = json.RawMessage(data) - return nil + return r.Method } -func (r *RemoteKey) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { - return value - } +func (r *RemoteResponse) GetPath() string { + if r == nil { + return "" } - if value, err := core.StringifyJSON(r); err == nil { - return value + return r.Path +} + +func (r *RemoteResponse) GetStatus() int { + if r == nil { + return 0 } - return fmt.Sprintf("%#v", r) + return r.Status } -// # The RemoteResponse Object -// -// ### Description -// -// The `RemoteResponse` object is used to represent information returned from a third-party endpoint. -// -// ### Usage Example -// -// View the `RemoteResponse` returned from your `DataPassthrough`. -type RemoteResponse struct { - Method string `json:"method"` - Path string `json:"path"` - Status int `json:"status"` - Response interface{} `json:"response,omitempty"` - ResponseHeaders map[string]interface{} `json:"response_headers,omitempty"` - ResponseType *ResponseTypeEnum `json:"response_type,omitempty"` - Headers map[string]interface{} `json:"headers,omitempty"` +func (r *RemoteResponse) GetResponse() interface{} { + if r == nil { + return nil + } + return r.Response +} + +func (r *RemoteResponse) GetResponseHeaders() map[string]interface{} { + if r == nil { + return nil + } + return r.ResponseHeaders +} + +func (r *RemoteResponse) GetResponseType() *RemoteResponseResponseType { + if r == nil { + return nil + } + return r.ResponseType +} + +func (r *RemoteResponse) GetHeaders() map[string]interface{} { + if r == nil { + return nil + } + return r.Headers +} - _rawJSON json.RawMessage +func (r *RemoteResponse) GetExtraProperties() map[string]interface{} { + return r.extraProperties } func (r *RemoteResponse) UnmarshalJSON(data []byte) error { @@ -4603,25 +3004,92 @@ func (r *RemoteResponse) UnmarshalJSON(data []byte) error { return err } *r = RemoteResponse(value) - r._rawJSON = json.RawMessage(data) + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { + return err + } + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) return nil } func (r *RemoteResponse) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(r); err == nil { + if value, err := internal.StringifyJSON(r); err == nil { return value } return fmt.Sprintf("%#v", r) } -// - `JSON` - JSON -// - `XML` - XML -// - `MULTIPART` - MULTIPART +type RemoteResponseResponseType struct { + ResponseTypeEnum ResponseTypeEnum + String string + + typ string +} + +func (r *RemoteResponseResponseType) GetResponseTypeEnum() ResponseTypeEnum { + if r == nil { + return "" + } + return r.ResponseTypeEnum +} + +func (r *RemoteResponseResponseType) GetString() string { + if r == nil { + return "" + } + return r.String +} + +func (r *RemoteResponseResponseType) UnmarshalJSON(data []byte) error { + var valueResponseTypeEnum ResponseTypeEnum + if err := json.Unmarshal(data, &valueResponseTypeEnum); err == nil { + r.typ = "ResponseTypeEnum" + r.ResponseTypeEnum = valueResponseTypeEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + r.typ = "String" + r.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, r) +} + +func (r RemoteResponseResponseType) MarshalJSON() ([]byte, error) { + if r.typ == "ResponseTypeEnum" || r.ResponseTypeEnum != "" { + return json.Marshal(r.ResponseTypeEnum) + } + if r.typ == "String" || r.String != "" { + return json.Marshal(r.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", r) +} + +type RemoteResponseResponseTypeVisitor interface { + VisitResponseTypeEnum(ResponseTypeEnum) error + VisitString(string) error +} + +func (r *RemoteResponseResponseType) Accept(visitor RemoteResponseResponseTypeVisitor) error { + if r.typ == "ResponseTypeEnum" || r.ResponseTypeEnum != "" { + return visitor.VisitResponseTypeEnum(r.ResponseTypeEnum) + } + if r.typ == "String" || r.String != "" { + return visitor.VisitString(r.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", r) +} + +// * `JSON` - JSON +// * `XML` - XML +// * `MULTIPART` - MULTIPART type RequestFormatEnum string const ( @@ -4647,8 +3115,8 @@ func (r RequestFormatEnum) Ptr() *RequestFormatEnum { return &r } -// - `JSON` - JSON -// - `BASE64_GZIP` - BASE64_GZIP +// * `JSON` - JSON +// * `BASE64_GZIP` - BASE64_GZIP type ResponseTypeEnum string const ( @@ -4671,49 +3139,9 @@ func (r ResponseTypeEnum) Ptr() *ResponseTypeEnum { return &r } -// - `ADMIN` - ADMIN -// - `DEVELOPER` - DEVELOPER -// - `MEMBER` - MEMBER -// - `API` - API -// - `SYSTEM` - SYSTEM -// - `MERGE_TEAM` - MERGE_TEAM -type RoleEnum string - -const ( - RoleEnumAdmin RoleEnum = "ADMIN" - RoleEnumDeveloper RoleEnum = "DEVELOPER" - RoleEnumMember RoleEnum = "MEMBER" - RoleEnumApi RoleEnum = "API" - RoleEnumSystem RoleEnum = "SYSTEM" - RoleEnumMergeTeam RoleEnum = "MERGE_TEAM" -) - -func NewRoleEnumFromString(s string) (RoleEnum, error) { - switch s { - case "ADMIN": - return RoleEnumAdmin, nil - case "DEVELOPER": - return RoleEnumDeveloper, nil - case "MEMBER": - return RoleEnumMember, nil - case "API": - return RoleEnumApi, nil - case "SYSTEM": - return RoleEnumSystem, nil - case "MERGE_TEAM": - return RoleEnumMergeTeam, nil - } - var t RoleEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (r RoleEnum) Ptr() *RoleEnum { - return &r -} - -// - `READ` - READ -// - `WRITE` - WRITE -// - `OWNER` - OWNER +// * `READ` - READ +// * `WRITE` - WRITE +// * `OWNER` - OWNER type RolesEnum string const ( @@ -4739,8 +3167,8 @@ func (r RolesEnum) Ptr() *RolesEnum { return &r } -// - `IN_NEXT_SYNC` - IN_NEXT_SYNC -// - `IN_LAST_SYNC` - IN_LAST_SYNC +// * `IN_NEXT_SYNC` - IN_NEXT_SYNC +// * `IN_LAST_SYNC` - IN_LAST_SYNC type SelectiveSyncConfigurationsUsageEnum string const ( @@ -4763,94 +3191,316 @@ func (s SelectiveSyncConfigurationsUsageEnum) Ptr() *SelectiveSyncConfigurations return &s } +// * `SYNCING` - SYNCING +// * `DONE` - DONE +// * `FAILED` - FAILED +// * `DISABLED` - DISABLED +// * `PAUSED` - PAUSED +// * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED +type StatusFd5Enum string + +const ( + StatusFd5EnumSyncing StatusFd5Enum = "SYNCING" + StatusFd5EnumDone StatusFd5Enum = "DONE" + StatusFd5EnumFailed StatusFd5Enum = "FAILED" + StatusFd5EnumDisabled StatusFd5Enum = "DISABLED" + StatusFd5EnumPaused StatusFd5Enum = "PAUSED" + StatusFd5EnumPartiallySynced StatusFd5Enum = "PARTIALLY_SYNCED" +) + +func NewStatusFd5EnumFromString(s string) (StatusFd5Enum, error) { + switch s { + case "SYNCING": + return StatusFd5EnumSyncing, nil + case "DONE": + return StatusFd5EnumDone, nil + case "FAILED": + return StatusFd5EnumFailed, nil + case "DISABLED": + return StatusFd5EnumDisabled, nil + case "PAUSED": + return StatusFd5EnumPaused, nil + case "PARTIALLY_SYNCED": + return StatusFd5EnumPartiallySynced, nil + } + var t StatusFd5Enum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (s StatusFd5Enum) Ptr() *StatusFd5Enum { + return &s +} + // # The SyncStatus Object -// // ### Description -// -// # The `SyncStatus` object is used to represent the syncing state of an account +// The `SyncStatus` object is used to represent the syncing state of an account // // ### Usage Example -// // View the `SyncStatus` for an account to see how recently its models were synced. type SyncStatus struct { - ModelName string `json:"model_name"` - ModelId string `json:"model_id"` - LastSyncStart *time.Time `json:"last_sync_start,omitempty"` - NextSyncStart *time.Time `json:"next_sync_start,omitempty"` - Status SyncStatusStatusEnum `json:"status,omitempty"` - IsInitialSync bool `json:"is_initial_sync"` - SelectiveSyncConfigurationsUsage *SelectiveSyncConfigurationsUsageEnum `json:"selective_sync_configurations_usage,omitempty"` + ModelName string `json:"model_name" url:"model_name"` + ModelId string `json:"model_id" url:"model_id"` + LastSyncStart *time.Time `json:"last_sync_start,omitempty" url:"last_sync_start,omitempty"` + NextSyncStart *time.Time `json:"next_sync_start,omitempty" url:"next_sync_start,omitempty"` + LastSyncResult *SyncStatusLastSyncResult `json:"last_sync_result,omitempty" url:"last_sync_result,omitempty"` + LastSyncFinished *time.Time `json:"last_sync_finished,omitempty" url:"last_sync_finished,omitempty"` + Status *SyncStatusStatus `json:"status" url:"status"` + IsInitialSync bool `json:"is_initial_sync" url:"is_initial_sync"` + SelectiveSyncConfigurationsUsage *SelectiveSyncConfigurationsUsageEnum `json:"selective_sync_configurations_usage,omitempty" url:"selective_sync_configurations_usage,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (s *SyncStatus) GetModelName() string { + if s == nil { + return "" + } + return s.ModelName +} + +func (s *SyncStatus) GetModelId() string { + if s == nil { + return "" + } + return s.ModelId +} + +func (s *SyncStatus) GetLastSyncStart() *time.Time { + if s == nil { + return nil + } + return s.LastSyncStart +} + +func (s *SyncStatus) GetNextSyncStart() *time.Time { + if s == nil { + return nil + } + return s.NextSyncStart +} + +func (s *SyncStatus) GetLastSyncResult() *SyncStatusLastSyncResult { + if s == nil { + return nil + } + return s.LastSyncResult +} + +func (s *SyncStatus) GetLastSyncFinished() *time.Time { + if s == nil { + return nil + } + return s.LastSyncFinished +} + +func (s *SyncStatus) GetStatus() *SyncStatusStatus { + if s == nil { + return nil + } + return s.Status +} - _rawJSON json.RawMessage +func (s *SyncStatus) GetIsInitialSync() bool { + if s == nil { + return false + } + return s.IsInitialSync +} + +func (s *SyncStatus) GetSelectiveSyncConfigurationsUsage() *SelectiveSyncConfigurationsUsageEnum { + if s == nil { + return nil + } + return s.SelectiveSyncConfigurationsUsage +} + +func (s *SyncStatus) GetExtraProperties() map[string]interface{} { + return s.extraProperties } func (s *SyncStatus) UnmarshalJSON(data []byte) error { - type unmarshaler SyncStatus - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { + type embed SyncStatus + var unmarshaler = struct { + embed + LastSyncStart *internal.DateTime `json:"last_sync_start,omitempty"` + NextSyncStart *internal.DateTime `json:"next_sync_start,omitempty"` + LastSyncFinished *internal.DateTime `json:"last_sync_finished,omitempty"` + }{ + embed: embed(*s), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *s = SyncStatus(unmarshaler.embed) + s.LastSyncStart = unmarshaler.LastSyncStart.TimePtr() + s.NextSyncStart = unmarshaler.NextSyncStart.TimePtr() + s.LastSyncFinished = unmarshaler.LastSyncFinished.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *s) + if err != nil { return err } - *s = SyncStatus(value) - s._rawJSON = json.RawMessage(data) + s.extraProperties = extraProperties + s.rawJSON = json.RawMessage(data) return nil } +func (s *SyncStatus) MarshalJSON() ([]byte, error) { + type embed SyncStatus + var marshaler = struct { + embed + LastSyncStart *internal.DateTime `json:"last_sync_start,omitempty"` + NextSyncStart *internal.DateTime `json:"next_sync_start,omitempty"` + LastSyncFinished *internal.DateTime `json:"last_sync_finished,omitempty"` + }{ + embed: embed(*s), + LastSyncStart: internal.NewOptionalDateTime(s.LastSyncStart), + NextSyncStart: internal.NewOptionalDateTime(s.NextSyncStart), + LastSyncFinished: internal.NewOptionalDateTime(s.LastSyncFinished), + } + return json.Marshal(marshaler) +} + func (s *SyncStatus) String() string { - if len(s._rawJSON) > 0 { - if value, err := core.StringifyJSON(s._rawJSON); err == nil { + if len(s.rawJSON) > 0 { + if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(s); err == nil { + if value, err := internal.StringifyJSON(s); err == nil { return value } return fmt.Sprintf("%#v", s) } -// - `SYNCING` - SYNCING -// - `DONE` - DONE -// - `FAILED` - FAILED -// - `DISABLED` - DISABLED -// - `PAUSED` - PAUSED -// - `PARTIALLY_SYNCED` - PARTIALLY_SYNCED -type SyncStatusStatusEnum string +type SyncStatusLastSyncResult struct { + LastSyncResultEnum LastSyncResultEnum + String string -const ( - SyncStatusStatusEnumSyncing SyncStatusStatusEnum = "SYNCING" - SyncStatusStatusEnumDone SyncStatusStatusEnum = "DONE" - SyncStatusStatusEnumFailed SyncStatusStatusEnum = "FAILED" - SyncStatusStatusEnumDisabled SyncStatusStatusEnum = "DISABLED" - SyncStatusStatusEnumPaused SyncStatusStatusEnum = "PAUSED" - SyncStatusStatusEnumPartiallySynced SyncStatusStatusEnum = "PARTIALLY_SYNCED" -) + typ string +} -func NewSyncStatusStatusEnumFromString(s string) (SyncStatusStatusEnum, error) { - switch s { - case "SYNCING": - return SyncStatusStatusEnumSyncing, nil - case "DONE": - return SyncStatusStatusEnumDone, nil - case "FAILED": - return SyncStatusStatusEnumFailed, nil - case "DISABLED": - return SyncStatusStatusEnumDisabled, nil - case "PAUSED": - return SyncStatusStatusEnumPaused, nil - case "PARTIALLY_SYNCED": - return SyncStatusStatusEnumPartiallySynced, nil +func (s *SyncStatusLastSyncResult) GetLastSyncResultEnum() LastSyncResultEnum { + if s == nil { + return "" } - var t SyncStatusStatusEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) + return s.LastSyncResultEnum } -func (s SyncStatusStatusEnum) Ptr() *SyncStatusStatusEnum { - return &s +func (s *SyncStatusLastSyncResult) GetString() string { + if s == nil { + return "" + } + return s.String +} + +func (s *SyncStatusLastSyncResult) UnmarshalJSON(data []byte) error { + var valueLastSyncResultEnum LastSyncResultEnum + if err := json.Unmarshal(data, &valueLastSyncResultEnum); err == nil { + s.typ = "LastSyncResultEnum" + s.LastSyncResultEnum = valueLastSyncResultEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + s.typ = "String" + s.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, s) +} + +func (s SyncStatusLastSyncResult) MarshalJSON() ([]byte, error) { + if s.typ == "LastSyncResultEnum" || s.LastSyncResultEnum != "" { + return json.Marshal(s.LastSyncResultEnum) + } + if s.typ == "String" || s.String != "" { + return json.Marshal(s.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", s) +} + +type SyncStatusLastSyncResultVisitor interface { + VisitLastSyncResultEnum(LastSyncResultEnum) error + VisitString(string) error +} + +func (s *SyncStatusLastSyncResult) Accept(visitor SyncStatusLastSyncResultVisitor) error { + if s.typ == "LastSyncResultEnum" || s.LastSyncResultEnum != "" { + return visitor.VisitLastSyncResultEnum(s.LastSyncResultEnum) + } + if s.typ == "String" || s.String != "" { + return visitor.VisitString(s.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", s) +} + +type SyncStatusStatus struct { + StatusFd5Enum StatusFd5Enum + String string + + typ string +} + +func (s *SyncStatusStatus) GetStatusFd5Enum() StatusFd5Enum { + if s == nil { + return "" + } + return s.StatusFd5Enum +} + +func (s *SyncStatusStatus) GetString() string { + if s == nil { + return "" + } + return s.String +} + +func (s *SyncStatusStatus) UnmarshalJSON(data []byte) error { + var valueStatusFd5Enum StatusFd5Enum + if err := json.Unmarshal(data, &valueStatusFd5Enum); err == nil { + s.typ = "StatusFd5Enum" + s.StatusFd5Enum = valueStatusFd5Enum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + s.typ = "String" + s.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, s) +} + +func (s SyncStatusStatus) MarshalJSON() ([]byte, error) { + if s.typ == "StatusFd5Enum" || s.StatusFd5Enum != "" { + return json.Marshal(s.StatusFd5Enum) + } + if s.typ == "String" || s.String != "" { + return json.Marshal(s.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", s) +} + +type SyncStatusStatusVisitor interface { + VisitStatusFd5Enum(StatusFd5Enum) error + VisitString(string) error } -// - `USER` - USER -// - `GROUP` - GROUP -// - `COMPANY` - COMPANY -// - `ANYONE` - ANYONE +func (s *SyncStatusStatus) Accept(visitor SyncStatusStatusVisitor) error { + if s.typ == "StatusFd5Enum" || s.StatusFd5Enum != "" { + return visitor.VisitStatusFd5Enum(s.StatusFd5Enum) + } + if s.typ == "String" || s.String != "" { + return visitor.VisitString(s.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", s) +} + +// * `USER` - USER +// * `GROUP` - GROUP +// * `COMPANY` - COMPANY +// * `ANYONE` - ANYONE type TypeEnum string const ( @@ -4880,63 +3530,173 @@ func (t TypeEnum) Ptr() *TypeEnum { } // # The User Object -// // ### Description -// // The `User` object is used to represent a user within the File Storage account. -// // ### Usage Example -// // Fetch from the `GET /api/filestorage/v1/users` endpoint and view their users. type User struct { - Id *string `json:"id,omitempty"` + Id *string `json:"id,omitempty" url:"id,omitempty"` // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` // The user's name. - Name *string `json:"name,omitempty"` + Name *string `json:"name,omitempty" url:"name,omitempty"` // The user's email address. This is typically used to identify a user across linked accounts. - EmailAddress *string `json:"email_address,omitempty"` + EmailAddress *string `json:"email_address,omitempty" url:"email_address,omitempty"` // Whether the user is the one who linked this account. - IsMe *bool `json:"is_me,omitempty"` + IsMe *bool `json:"is_me,omitempty" url:"is_me,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (u *User) GetId() *string { + if u == nil { + return nil + } + return u.Id +} + +func (u *User) GetRemoteId() *string { + if u == nil { + return nil + } + return u.RemoteId +} + +func (u *User) GetCreatedAt() *time.Time { + if u == nil { + return nil + } + return u.CreatedAt +} + +func (u *User) GetModifiedAt() *time.Time { + if u == nil { + return nil + } + return u.ModifiedAt +} + +func (u *User) GetName() *string { + if u == nil { + return nil + } + return u.Name +} + +func (u *User) GetEmailAddress() *string { + if u == nil { + return nil + } + return u.EmailAddress +} + +func (u *User) GetIsMe() *bool { + if u == nil { + return nil + } + return u.IsMe +} + +func (u *User) GetRemoteWasDeleted() *bool { + if u == nil { + return nil + } + return u.RemoteWasDeleted +} + +func (u *User) GetFieldMappings() map[string]interface{} { + if u == nil { + return nil + } + return u.FieldMappings +} + +func (u *User) GetRemoteData() []*RemoteData { + if u == nil { + return nil + } + return u.RemoteData +} - _rawJSON json.RawMessage +func (u *User) GetExtraProperties() map[string]interface{} { + return u.extraProperties } func (u *User) UnmarshalJSON(data []byte) error { - type unmarshaler User - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { + type embed User + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*u), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *u = User(unmarshaler.embed) + u.CreatedAt = unmarshaler.CreatedAt.TimePtr() + u.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *u) + if err != nil { return err } - *u = User(value) - u._rawJSON = json.RawMessage(data) + u.extraProperties = extraProperties + u.rawJSON = json.RawMessage(data) return nil } +func (u *User) MarshalJSON() ([]byte, error) { + type embed User + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*u), + CreatedAt: internal.NewOptionalDateTime(u.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(u.ModifiedAt), + } + return json.Marshal(marshaler) +} + func (u *User) String() string { - if len(u._rawJSON) > 0 { - if value, err := core.StringifyJSON(u._rawJSON); err == nil { + if len(u.rawJSON) > 0 { + if value, err := internal.StringifyJSON(u.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(u); err == nil { + if value, err := internal.StringifyJSON(u); err == nil { return value } return fmt.Sprintf("%#v", u) } type ValidationProblemSource struct { - Pointer string `json:"pointer"` + Pointer string `json:"pointer" url:"pointer"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} - _rawJSON json.RawMessage +func (v *ValidationProblemSource) GetPointer() string { + if v == nil { + return "" + } + return v.Pointer +} + +func (v *ValidationProblemSource) GetExtraProperties() map[string]interface{} { + return v.extraProperties } func (v *ValidationProblemSource) UnmarshalJSON(data []byte) error { @@ -4946,80 +3706,92 @@ func (v *ValidationProblemSource) UnmarshalJSON(data []byte) error { return err } *v = ValidationProblemSource(value) - v._rawJSON = json.RawMessage(data) + extraProperties, err := internal.ExtractExtraProperties(data, *v) + if err != nil { + return err + } + v.extraProperties = extraProperties + v.rawJSON = json.RawMessage(data) return nil } func (v *ValidationProblemSource) String() string { - if len(v._rawJSON) > 0 { - if value, err := core.StringifyJSON(v._rawJSON); err == nil { + if len(v.rawJSON) > 0 { + if value, err := internal.StringifyJSON(v.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(v); err == nil { + if value, err := internal.StringifyJSON(v); err == nil { return value } return fmt.Sprintf("%#v", v) } type WarningValidationProblem struct { - Source *ValidationProblemSource `json:"source,omitempty"` - Title string `json:"title"` - Detail string `json:"detail"` - ProblemType string `json:"problem_type"` + Source *ValidationProblemSource `json:"source,omitempty" url:"source,omitempty"` + Title string `json:"title" url:"title"` + Detail string `json:"detail" url:"detail"` + ProblemType string `json:"problem_type" url:"problem_type"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (w *WarningValidationProblem) UnmarshalJSON(data []byte) error { - type unmarshaler WarningValidationProblem - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (w *WarningValidationProblem) GetSource() *ValidationProblemSource { + if w == nil { + return nil } - *w = WarningValidationProblem(value) - w._rawJSON = json.RawMessage(data) - return nil + return w.Source } -func (w *WarningValidationProblem) String() string { - if len(w._rawJSON) > 0 { - if value, err := core.StringifyJSON(w._rawJSON); err == nil { - return value - } +func (w *WarningValidationProblem) GetTitle() string { + if w == nil { + return "" } - if value, err := core.StringifyJSON(w); err == nil { - return value + return w.Title +} + +func (w *WarningValidationProblem) GetDetail() string { + if w == nil { + return "" } - return fmt.Sprintf("%#v", w) + return w.Detail } -type WebhookReceiver struct { - Event string `json:"event"` - IsActive bool `json:"is_active"` - Key *string `json:"key,omitempty"` +func (w *WarningValidationProblem) GetProblemType() string { + if w == nil { + return "" + } + return w.ProblemType +} - _rawJSON json.RawMessage +func (w *WarningValidationProblem) GetExtraProperties() map[string]interface{} { + return w.extraProperties } -func (w *WebhookReceiver) UnmarshalJSON(data []byte) error { - type unmarshaler WebhookReceiver +func (w *WarningValidationProblem) UnmarshalJSON(data []byte) error { + type unmarshaler WarningValidationProblem var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *w = WebhookReceiver(value) - w._rawJSON = json.RawMessage(data) + *w = WarningValidationProblem(value) + extraProperties, err := internal.ExtractExtraProperties(data, *w) + if err != nil { + return err + } + w.extraProperties = extraProperties + w.rawJSON = json.RawMessage(data) return nil } -func (w *WebhookReceiver) String() string { - if len(w._rawJSON) > 0 { - if value, err := core.StringifyJSON(w._rawJSON); err == nil { +func (w *WarningValidationProblem) String() string { + if len(w.rawJSON) > 0 { + if value, err := internal.StringifyJSON(w.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(w); err == nil { + if value, err := internal.StringifyJSON(w); err == nil { return value } return fmt.Sprintf("%#v", w) diff --git a/filestorage/users.go b/filestorage/users.go index 881ea59..86ba6dc 100644 --- a/filestorage/users.go +++ b/filestorage/users.go @@ -1,37 +1,104 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package filestorage import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type UsersListRequest struct { // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, will only return the user object for requestor. - IsMe *string `json:"-"` + IsMe *string `json:"-" url:"is_me,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` } type UsersRetrieveRequest struct { // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` +} + +type PaginatedUserList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*User `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedUserList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedUserList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedUserList) GetResults() []*User { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedUserList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedUserList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedUserList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedUserList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedUserList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) } diff --git a/filestorage/users/client.go b/filestorage/users/client.go index f0db16b..9dd4d92 100644 --- a/filestorage/users/client.go +++ b/filestorage/users/client.go @@ -1,120 +1,137 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package users import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - filestorage "github.com/merge-api/merge-go-client/filestorage" + core "github.com/merge-api/merge-go-client/v2/core" + filestorage "github.com/merge-api/merge-go-client/v2/filestorage" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `User` objects. -func (c *Client) List(ctx context.Context, request *filestorage.UsersListRequest) (*filestorage.PaginatedUserList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "filestorage/v1/users" - - queryParams := make(url.Values) - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.IsMe != nil { - queryParams.Add("is_me", fmt.Sprintf("%v", *request.IsMe)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *filestorage.PaginatedUserList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *filestorage.UsersListRequest, + opts ...option.RequestOption, +) (*core.Page[*filestorage.User], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/filestorage/v1/users" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *filestorage.PaginatedUserList) *internal.PageResponse[*string, *filestorage.User] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *filestorage.User]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Returns a `User` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *filestorage.UsersRetrieveRequest) (*filestorage.User, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"filestorage/v1/users/%v", id) - - queryParams := make(url.Values) - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *filestorage.UsersRetrieveRequest, + opts ...option.RequestOption, +) (*filestorage.User, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/filestorage/v1/users/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *filestorage.User if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/filestorage/webhook_receivers.go b/filestorage/webhook_receivers.go index ed76723..1d9c0f7 100644 --- a/filestorage/webhook_receivers.go +++ b/filestorage/webhook_receivers.go @@ -1,9 +1,77 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package filestorage +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" +) + type WebhookReceiverRequest struct { - Event string `json:"event"` - IsActive bool `json:"is_active"` - Key *string `json:"key,omitempty"` + Event string `json:"event" url:"-"` + IsActive bool `json:"is_active" url:"-"` + Key *string `json:"key,omitempty" url:"-"` +} + +type WebhookReceiver struct { + Event string `json:"event" url:"event"` + IsActive bool `json:"is_active" url:"is_active"` + Key *string `json:"key,omitempty" url:"key,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (w *WebhookReceiver) GetEvent() string { + if w == nil { + return "" + } + return w.Event +} + +func (w *WebhookReceiver) GetIsActive() bool { + if w == nil { + return false + } + return w.IsActive +} + +func (w *WebhookReceiver) GetKey() *string { + if w == nil { + return nil + } + return w.Key +} + +func (w *WebhookReceiver) GetExtraProperties() map[string]interface{} { + return w.extraProperties +} + +func (w *WebhookReceiver) UnmarshalJSON(data []byte) error { + type unmarshaler WebhookReceiver + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *w = WebhookReceiver(value) + extraProperties, err := internal.ExtractExtraProperties(data, *w) + if err != nil { + return err + } + w.extraProperties = extraProperties + w.rawJSON = json.RawMessage(data) + return nil +} + +func (w *WebhookReceiver) String() string { + if len(w.rawJSON) > 0 { + if value, err := internal.StringifyJSON(w.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(w); err == nil { + return value + } + return fmt.Sprintf("%#v", w) } diff --git a/filestorage/webhookreceivers/client.go b/filestorage/webhookreceivers/client.go index be8a512..86e828e 100644 --- a/filestorage/webhookreceivers/client.go +++ b/filestorage/webhookreceivers/client.go @@ -1,48 +1,65 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package webhookreceivers import ( context "context" - core "github.com/merge-api/merge-go-client/core" - filestorage "github.com/merge-api/merge-go-client/filestorage" + core "github.com/merge-api/merge-go-client/v2/core" + filestorage "github.com/merge-api/merge-go-client/v2/filestorage" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `WebhookReceiver` objects. -func (c *Client) List(ctx context.Context) ([]*filestorage.WebhookReceiver, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "filestorage/v1/webhook-receivers" +func (c *Client) List( + ctx context.Context, + opts ...option.RequestOption, +) ([]*filestorage.WebhookReceiver, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/filestorage/v1/webhook-receivers" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response []*filestorage.WebhookReceiver if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -51,22 +68,37 @@ func (c *Client) List(ctx context.Context) ([]*filestorage.WebhookReceiver, erro } // Creates a `WebhookReceiver` object with the given values. -func (c *Client) Create(ctx context.Context, request *filestorage.WebhookReceiverRequest) (*filestorage.WebhookReceiver, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "filestorage/v1/webhook-receivers" +func (c *Client) Create( + ctx context.Context, + request *filestorage.WebhookReceiverRequest, + opts ...option.RequestOption, +) (*filestorage.WebhookReceiver, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/filestorage/v1/webhook-receivers" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *filestorage.WebhookReceiver if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err diff --git a/go.mod b/go.mod index c5c3157..a0a2b27 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,14 @@ -module github.com/merge-api/merge-go-client +module github.com/merge-api/merge-go-client/v2 -go 1.13 +go 1.18 require ( + github.com/google/uuid v1.4.0 github.com/stretchr/testify v1.7.0 +) + +require ( + github.com/davecgh/go-spew v1.1.0 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index fc3dd9e..b3766d4 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,7 @@ github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= +github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= diff --git a/hris/account_details.go b/hris/account_details.go new file mode 100644 index 0000000..23261b3 --- /dev/null +++ b/hris/account_details.go @@ -0,0 +1,226 @@ +// Code generated by Fern. DO NOT EDIT. + +package hris + +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" + time "time" +) + +type AccountDetails struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + Integration *string `json:"integration,omitempty" url:"integration,omitempty"` + IntegrationSlug *string `json:"integration_slug,omitempty" url:"integration_slug,omitempty"` + Category *AccountDetailsCategory `json:"category,omitempty" url:"category,omitempty"` + EndUserOriginId *string `json:"end_user_origin_id,omitempty" url:"end_user_origin_id,omitempty"` + EndUserOrganizationName *string `json:"end_user_organization_name,omitempty" url:"end_user_organization_name,omitempty"` + EndUserEmailAddress *string `json:"end_user_email_address,omitempty" url:"end_user_email_address,omitempty"` + Status *string `json:"status,omitempty" url:"status,omitempty"` + WebhookListenerUrl *string `json:"webhook_listener_url,omitempty" url:"webhook_listener_url,omitempty"` + // 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. + IsDuplicate *bool `json:"is_duplicate,omitempty" url:"is_duplicate,omitempty"` + AccountType *string `json:"account_type,omitempty" url:"account_type,omitempty"` + // The time at which account completes the linking flow. + CompletedAt *time.Time `json:"completed_at,omitempty" url:"completed_at,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AccountDetails) GetId() *string { + if a == nil { + return nil + } + return a.Id +} + +func (a *AccountDetails) GetIntegration() *string { + if a == nil { + return nil + } + return a.Integration +} + +func (a *AccountDetails) GetIntegrationSlug() *string { + if a == nil { + return nil + } + return a.IntegrationSlug +} + +func (a *AccountDetails) GetCategory() *AccountDetailsCategory { + if a == nil { + return nil + } + return a.Category +} + +func (a *AccountDetails) GetEndUserOriginId() *string { + if a == nil { + return nil + } + return a.EndUserOriginId +} + +func (a *AccountDetails) GetEndUserOrganizationName() *string { + if a == nil { + return nil + } + return a.EndUserOrganizationName +} + +func (a *AccountDetails) GetEndUserEmailAddress() *string { + if a == nil { + return nil + } + return a.EndUserEmailAddress +} + +func (a *AccountDetails) GetStatus() *string { + if a == nil { + return nil + } + return a.Status +} + +func (a *AccountDetails) GetWebhookListenerUrl() *string { + if a == nil { + return nil + } + return a.WebhookListenerUrl +} + +func (a *AccountDetails) GetIsDuplicate() *bool { + if a == nil { + return nil + } + return a.IsDuplicate +} + +func (a *AccountDetails) GetAccountType() *string { + if a == nil { + return nil + } + return a.AccountType +} + +func (a *AccountDetails) GetCompletedAt() *time.Time { + if a == nil { + return nil + } + return a.CompletedAt +} + +func (a *AccountDetails) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AccountDetails) UnmarshalJSON(data []byte) error { + type embed AccountDetails + var unmarshaler = struct { + embed + CompletedAt *internal.DateTime `json:"completed_at,omitempty"` + }{ + embed: embed(*a), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *a = AccountDetails(unmarshaler.embed) + a.CompletedAt = unmarshaler.CompletedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AccountDetails) MarshalJSON() ([]byte, error) { + type embed AccountDetails + var marshaler = struct { + embed + CompletedAt *internal.DateTime `json:"completed_at,omitempty"` + }{ + embed: embed(*a), + CompletedAt: internal.NewOptionalDateTime(a.CompletedAt), + } + return json.Marshal(marshaler) +} + +func (a *AccountDetails) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} + +type AccountDetailsCategory struct { + CategoryEnum CategoryEnum + String string + + typ string +} + +func (a *AccountDetailsCategory) GetCategoryEnum() CategoryEnum { + if a == nil { + return "" + } + return a.CategoryEnum +} + +func (a *AccountDetailsCategory) GetString() string { + if a == nil { + return "" + } + return a.String +} + +func (a *AccountDetailsCategory) UnmarshalJSON(data []byte) error { + var valueCategoryEnum CategoryEnum + if err := json.Unmarshal(data, &valueCategoryEnum); err == nil { + a.typ = "CategoryEnum" + a.CategoryEnum = valueCategoryEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + a.typ = "String" + a.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, a) +} + +func (a AccountDetailsCategory) MarshalJSON() ([]byte, error) { + if a.typ == "CategoryEnum" || a.CategoryEnum != "" { + return json.Marshal(a.CategoryEnum) + } + if a.typ == "String" || a.String != "" { + return json.Marshal(a.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type AccountDetailsCategoryVisitor interface { + VisitCategoryEnum(CategoryEnum) error + VisitString(string) error +} + +func (a *AccountDetailsCategory) Accept(visitor AccountDetailsCategoryVisitor) error { + if a.typ == "CategoryEnum" || a.CategoryEnum != "" { + return visitor.VisitCategoryEnum(a.CategoryEnum) + } + if a.typ == "String" || a.String != "" { + return visitor.VisitString(a.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} diff --git a/hris/account_token.go b/hris/account_token.go new file mode 100644 index 0000000..ccb77f0 --- /dev/null +++ b/hris/account_token.go @@ -0,0 +1,71 @@ +// Code generated by Fern. DO NOT EDIT. + +package hris + +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" +) + +type AccountToken struct { + AccountToken string `json:"account_token" url:"account_token"` + Integration *AccountIntegration `json:"integration" url:"integration"` + Id string `json:"id" url:"id"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AccountToken) GetAccountToken() string { + if a == nil { + return "" + } + return a.AccountToken +} + +func (a *AccountToken) GetIntegration() *AccountIntegration { + if a == nil { + return nil + } + return a.Integration +} + +func (a *AccountToken) GetId() string { + if a == nil { + return "" + } + return a.Id +} + +func (a *AccountToken) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AccountToken) UnmarshalJSON(data []byte) error { + type unmarshaler AccountToken + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *a = AccountToken(value) + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AccountToken) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} diff --git a/hris/accountdetails/client.go b/hris/accountdetails/client.go index 6ad9088..323f703 100644 --- a/hris/accountdetails/client.go +++ b/hris/accountdetails/client.go @@ -1,48 +1,65 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package accountdetails import ( context "context" - core "github.com/merge-api/merge-go-client/core" - hris "github.com/merge-api/merge-go-client/hris" + core "github.com/merge-api/merge-go-client/v2/core" + hris "github.com/merge-api/merge-go-client/v2/hris" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Get details for a linked account. -func (c *Client) Retrieve(ctx context.Context) (*hris.AccountDetails, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "hris/v1/account-details" +func (c *Client) Retrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*hris.AccountDetails, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/hris/v1/account-details" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *hris.AccountDetails if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/hris/accounttoken/client.go b/hris/accounttoken/client.go index a0eddc7..4434263 100644 --- a/hris/accounttoken/client.go +++ b/hris/accounttoken/client.go @@ -1,49 +1,69 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package accounttoken import ( context "context" - fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - hris "github.com/merge-api/merge-go-client/hris" + core "github.com/merge-api/merge-go-client/v2/core" + hris "github.com/merge-api/merge-go-client/v2/hris" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns the account token for the end user with the provided public token. -func (c *Client) Retrieve(ctx context.Context, publicToken string) (*hris.AccountToken, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"hris/v1/account-token/%v", publicToken) +func (c *Client) Retrieve( + ctx context.Context, + publicToken string, + opts ...option.RequestOption, +) (*hris.AccountToken, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/hris/v1/account-token/%v", + publicToken, + ) + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *hris.AccountToken if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/hris/async_passthrough.go b/hris/async_passthrough.go index 2096434..d8451d3 100644 --- a/hris/async_passthrough.go +++ b/hris/async_passthrough.go @@ -1,36 +1,44 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package hris import ( json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" ) type AsyncPassthroughRetrieveResponse struct { - typeName string RemoteResponse *RemoteResponse String string + + typ string } -func NewAsyncPassthroughRetrieveResponseFromRemoteResponse(value *RemoteResponse) *AsyncPassthroughRetrieveResponse { - return &AsyncPassthroughRetrieveResponse{typeName: "remoteResponse", RemoteResponse: value} +func (a *AsyncPassthroughRetrieveResponse) GetRemoteResponse() *RemoteResponse { + if a == nil { + return nil + } + return a.RemoteResponse } -func NewAsyncPassthroughRetrieveResponseFromString(value string) *AsyncPassthroughRetrieveResponse { - return &AsyncPassthroughRetrieveResponse{typeName: "string", String: value} +func (a *AsyncPassthroughRetrieveResponse) GetString() string { + if a == nil { + return "" + } + return a.String } func (a *AsyncPassthroughRetrieveResponse) UnmarshalJSON(data []byte) error { valueRemoteResponse := new(RemoteResponse) if err := json.Unmarshal(data, &valueRemoteResponse); err == nil { - a.typeName = "remoteResponse" + a.typ = "RemoteResponse" a.RemoteResponse = valueRemoteResponse return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" + a.typ = "String" a.String = valueString return nil } @@ -38,14 +46,13 @@ func (a *AsyncPassthroughRetrieveResponse) UnmarshalJSON(data []byte) error { } func (a AsyncPassthroughRetrieveResponse) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "remoteResponse": + if a.typ == "RemoteResponse" || a.RemoteResponse != nil { return json.Marshal(a.RemoteResponse) - case "string": + } + if a.typ == "String" || a.String != "" { return json.Marshal(a.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) } type AsyncPassthroughRetrieveResponseVisitor interface { @@ -54,12 +61,57 @@ type AsyncPassthroughRetrieveResponseVisitor interface { } func (a *AsyncPassthroughRetrieveResponse) Accept(visitor AsyncPassthroughRetrieveResponseVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "remoteResponse": + if a.typ == "RemoteResponse" || a.RemoteResponse != nil { return visitor.VisitRemoteResponse(a.RemoteResponse) - case "string": + } + if a.typ == "String" || a.String != "" { return visitor.VisitString(a.String) } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type AsyncPassthroughReciept struct { + AsyncPassthroughReceiptId string `json:"async_passthrough_receipt_id" url:"async_passthrough_receipt_id"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AsyncPassthroughReciept) GetAsyncPassthroughReceiptId() string { + if a == nil { + return "" + } + return a.AsyncPassthroughReceiptId +} + +func (a *AsyncPassthroughReciept) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AsyncPassthroughReciept) UnmarshalJSON(data []byte) error { + type unmarshaler AsyncPassthroughReciept + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *a = AsyncPassthroughReciept(value) + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AsyncPassthroughReciept) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) } diff --git a/hris/asyncpassthrough/client.go b/hris/asyncpassthrough/client.go index 7f2162f..3960c30 100644 --- a/hris/asyncpassthrough/client.go +++ b/hris/asyncpassthrough/client.go @@ -1,50 +1,68 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package asyncpassthrough import ( context "context" - fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - hris "github.com/merge-api/merge-go-client/hris" + core "github.com/merge-api/merge-go-client/v2/core" + hris "github.com/merge-api/merge-go-client/v2/hris" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Asynchronously pull data from an endpoint not currently supported by Merge. -func (c *Client) Create(ctx context.Context, request *hris.DataPassthroughRequest) (*hris.AsyncPassthroughReciept, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "hris/v1/async-passthrough" +func (c *Client) Create( + ctx context.Context, + request *hris.DataPassthroughRequest, + opts ...option.RequestOption, +) (*hris.AsyncPassthroughReciept, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/hris/v1/async-passthrough" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *hris.AsyncPassthroughReciept if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -53,21 +71,38 @@ func (c *Client) Create(ctx context.Context, request *hris.DataPassthroughReques } // Retrieves data from earlier async-passthrough POST request -func (c *Client) Retrieve(ctx context.Context, asyncPassthroughReceiptId string) (*hris.AsyncPassthroughRetrieveResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"hris/v1/async-passthrough/%v", asyncPassthroughReceiptId) +func (c *Client) Retrieve( + ctx context.Context, + asyncPassthroughReceiptId string, + opts ...option.RequestOption, +) (*hris.AsyncPassthroughRetrieveResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/hris/v1/async-passthrough/%v", + asyncPassthroughReceiptId, + ) + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *hris.AsyncPassthroughRetrieveResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/hris/audit_trail.go b/hris/audit_trail.go index 28d957d..18ab4cb 100644 --- a/hris/audit_trail.go +++ b/hris/audit_trail.go @@ -1,18 +1,667 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package hris +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" + time "time" +) + type AuditTrailListRequest struct { // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // If included, will only include audit trail events that occurred before this time - EndDate *string `json:"-"` - // 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`, `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED` - EventType *string `json:"-"` + EndDate *string `json:"-" url:"end_date,omitempty"` + // 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`, `DELETED_ALL_COMMON_MODELS_FOR_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`, `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED` + EventType *string `json:"-" url:"event_type,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // If included, will only include audit trail events that occurred after this time - StartDate *string `json:"-"` + StartDate *string `json:"-" url:"start_date,omitempty"` // If provided, this will return events associated with the specified user email. Please note that the email address reflects the user's email at the time of the event, and may not be their current email. - UserEmail *string `json:"-"` + UserEmail *string `json:"-" url:"user_email,omitempty"` +} + +type AuditLogEvent struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The User's full name at the time of this Event occurring. + UserName *string `json:"user_name,omitempty" url:"user_name,omitempty"` + // The User's email at the time of this Event occurring. + UserEmail *string `json:"user_email,omitempty" url:"user_email,omitempty"` + // Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. + // + // * `ADMIN` - ADMIN + // * `DEVELOPER` - DEVELOPER + // * `MEMBER` - MEMBER + // * `API` - API + // * `SYSTEM` - SYSTEM + // * `MERGE_TEAM` - MERGE_TEAM + Role *AuditLogEventRole `json:"role" url:"role"` + IpAddress string `json:"ip_address" url:"ip_address"` + // Designates the type of event that occurred. + // + // * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + // * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + // * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + // * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + // * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + // * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + // * `INVITED_USER` - INVITED_USER + // * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + // * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + // * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + // * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + // * `CREATED_DESTINATION` - CREATED_DESTINATION + // * `DELETED_DESTINATION` - DELETED_DESTINATION + // * `CHANGED_DESTINATION` - CHANGED_DESTINATION + // * `CHANGED_SCOPES` - CHANGED_SCOPES + // * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + // * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + // * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + // * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + // * `ENABLED_CATEGORY` - ENABLED_CATEGORY + // * `DISABLED_CATEGORY` - DISABLED_CATEGORY + // * `CHANGED_PASSWORD` - CHANGED_PASSWORD + // * `RESET_PASSWORD` - RESET_PASSWORD + // * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + // * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + // * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + // * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + // * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING + // * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING + // * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + // * `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 + // * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + // * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + // * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + // * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + // * `MUTED_ISSUE` - MUTED_ISSUE + // * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + // * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + // * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + // * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + // * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + EventType *AuditLogEventEventType `json:"event_type" url:"event_type"` + EventDescription string `json:"event_description" url:"event_description"` + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AuditLogEvent) GetId() *string { + if a == nil { + return nil + } + return a.Id +} + +func (a *AuditLogEvent) GetUserName() *string { + if a == nil { + return nil + } + return a.UserName +} + +func (a *AuditLogEvent) GetUserEmail() *string { + if a == nil { + return nil + } + return a.UserEmail +} + +func (a *AuditLogEvent) GetRole() *AuditLogEventRole { + if a == nil { + return nil + } + return a.Role +} + +func (a *AuditLogEvent) GetIpAddress() string { + if a == nil { + return "" + } + return a.IpAddress +} + +func (a *AuditLogEvent) GetEventType() *AuditLogEventEventType { + if a == nil { + return nil + } + return a.EventType +} + +func (a *AuditLogEvent) GetEventDescription() string { + if a == nil { + return "" + } + return a.EventDescription +} + +func (a *AuditLogEvent) GetCreatedAt() *time.Time { + if a == nil { + return nil + } + return a.CreatedAt +} + +func (a *AuditLogEvent) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AuditLogEvent) UnmarshalJSON(data []byte) error { + type embed AuditLogEvent + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + }{ + embed: embed(*a), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *a = AuditLogEvent(unmarshaler.embed) + a.CreatedAt = unmarshaler.CreatedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AuditLogEvent) MarshalJSON() ([]byte, error) { + type embed AuditLogEvent + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + }{ + embed: embed(*a), + CreatedAt: internal.NewOptionalDateTime(a.CreatedAt), + } + return json.Marshal(marshaler) +} + +func (a *AuditLogEvent) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} + +// Designates the type of event that occurred. +// +// * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY +// * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY +// * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY +// * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY +// * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY +// * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE +// * `INVITED_USER` - INVITED_USER +// * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED +// * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED +// * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT +// * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT +// * `CREATED_DESTINATION` - CREATED_DESTINATION +// * `DELETED_DESTINATION` - DELETED_DESTINATION +// * `CHANGED_DESTINATION` - CHANGED_DESTINATION +// * `CHANGED_SCOPES` - CHANGED_SCOPES +// * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION +// * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS +// * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION +// * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION +// * `ENABLED_CATEGORY` - ENABLED_CATEGORY +// * `DISABLED_CATEGORY` - DISABLED_CATEGORY +// * `CHANGED_PASSWORD` - CHANGED_PASSWORD +// * `RESET_PASSWORD` - RESET_PASSWORD +// * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION +// * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT +// * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION +// * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT +// * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING +// * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING +// * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING +// * `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 +// * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE +// * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE +// * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE +// * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC +// * `MUTED_ISSUE` - MUTED_ISSUE +// * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK +// * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK +// * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK +// * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED +// * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED +type AuditLogEventEventType struct { + EventTypeEnum EventTypeEnum + String string + + typ string +} + +func (a *AuditLogEventEventType) GetEventTypeEnum() EventTypeEnum { + if a == nil { + return "" + } + return a.EventTypeEnum +} + +func (a *AuditLogEventEventType) GetString() string { + if a == nil { + return "" + } + return a.String +} + +func (a *AuditLogEventEventType) UnmarshalJSON(data []byte) error { + var valueEventTypeEnum EventTypeEnum + if err := json.Unmarshal(data, &valueEventTypeEnum); err == nil { + a.typ = "EventTypeEnum" + a.EventTypeEnum = valueEventTypeEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + a.typ = "String" + a.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, a) +} + +func (a AuditLogEventEventType) MarshalJSON() ([]byte, error) { + if a.typ == "EventTypeEnum" || a.EventTypeEnum != "" { + return json.Marshal(a.EventTypeEnum) + } + if a.typ == "String" || a.String != "" { + return json.Marshal(a.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type AuditLogEventEventTypeVisitor interface { + VisitEventTypeEnum(EventTypeEnum) error + VisitString(string) error +} + +func (a *AuditLogEventEventType) Accept(visitor AuditLogEventEventTypeVisitor) error { + if a.typ == "EventTypeEnum" || a.EventTypeEnum != "" { + return visitor.VisitEventTypeEnum(a.EventTypeEnum) + } + if a.typ == "String" || a.String != "" { + return visitor.VisitString(a.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} + +// Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. +// +// * `ADMIN` - ADMIN +// * `DEVELOPER` - DEVELOPER +// * `MEMBER` - MEMBER +// * `API` - API +// * `SYSTEM` - SYSTEM +// * `MERGE_TEAM` - MERGE_TEAM +type AuditLogEventRole struct { + RoleEnum RoleEnum + String string + + typ string +} + +func (a *AuditLogEventRole) GetRoleEnum() RoleEnum { + if a == nil { + return "" + } + return a.RoleEnum +} + +func (a *AuditLogEventRole) GetString() string { + if a == nil { + return "" + } + return a.String +} + +func (a *AuditLogEventRole) UnmarshalJSON(data []byte) error { + var valueRoleEnum RoleEnum + if err := json.Unmarshal(data, &valueRoleEnum); err == nil { + a.typ = "RoleEnum" + a.RoleEnum = valueRoleEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + a.typ = "String" + a.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, a) +} + +func (a AuditLogEventRole) MarshalJSON() ([]byte, error) { + if a.typ == "RoleEnum" || a.RoleEnum != "" { + return json.Marshal(a.RoleEnum) + } + if a.typ == "String" || a.String != "" { + return json.Marshal(a.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type AuditLogEventRoleVisitor interface { + VisitRoleEnum(RoleEnum) error + VisitString(string) error +} + +func (a *AuditLogEventRole) Accept(visitor AuditLogEventRoleVisitor) error { + if a.typ == "RoleEnum" || a.RoleEnum != "" { + return visitor.VisitRoleEnum(a.RoleEnum) + } + if a.typ == "String" || a.String != "" { + return visitor.VisitString(a.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} + +// * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY +// * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY +// * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY +// * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY +// * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY +// * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE +// * `INVITED_USER` - INVITED_USER +// * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED +// * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED +// * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT +// * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT +// * `CREATED_DESTINATION` - CREATED_DESTINATION +// * `DELETED_DESTINATION` - DELETED_DESTINATION +// * `CHANGED_DESTINATION` - CHANGED_DESTINATION +// * `CHANGED_SCOPES` - CHANGED_SCOPES +// * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION +// * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS +// * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION +// * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION +// * `ENABLED_CATEGORY` - ENABLED_CATEGORY +// * `DISABLED_CATEGORY` - DISABLED_CATEGORY +// * `CHANGED_PASSWORD` - CHANGED_PASSWORD +// * `RESET_PASSWORD` - RESET_PASSWORD +// * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION +// * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT +// * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION +// * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT +// * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING +// * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING +// * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING +// * `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 +// * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE +// * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE +// * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE +// * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC +// * `MUTED_ISSUE` - MUTED_ISSUE +// * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK +// * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK +// * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK +// * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED +// * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED +type EventTypeEnum string + +const ( + EventTypeEnumCreatedRemoteProductionApiKey EventTypeEnum = "CREATED_REMOTE_PRODUCTION_API_KEY" + EventTypeEnumDeletedRemoteProductionApiKey EventTypeEnum = "DELETED_REMOTE_PRODUCTION_API_KEY" + EventTypeEnumCreatedTestApiKey EventTypeEnum = "CREATED_TEST_API_KEY" + EventTypeEnumDeletedTestApiKey EventTypeEnum = "DELETED_TEST_API_KEY" + EventTypeEnumRegeneratedProductionApiKey EventTypeEnum = "REGENERATED_PRODUCTION_API_KEY" + EventTypeEnumRegeneratedWebhookSignature EventTypeEnum = "REGENERATED_WEBHOOK_SIGNATURE" + EventTypeEnumInvitedUser EventTypeEnum = "INVITED_USER" + EventTypeEnumTwoFactorAuthEnabled EventTypeEnum = "TWO_FACTOR_AUTH_ENABLED" + EventTypeEnumTwoFactorAuthDisabled EventTypeEnum = "TWO_FACTOR_AUTH_DISABLED" + EventTypeEnumDeletedLinkedAccount EventTypeEnum = "DELETED_LINKED_ACCOUNT" + EventTypeEnumDeletedAllCommonModelsForLinkedAccount EventTypeEnum = "DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT" + EventTypeEnumCreatedDestination EventTypeEnum = "CREATED_DESTINATION" + EventTypeEnumDeletedDestination EventTypeEnum = "DELETED_DESTINATION" + EventTypeEnumChangedDestination EventTypeEnum = "CHANGED_DESTINATION" + EventTypeEnumChangedScopes EventTypeEnum = "CHANGED_SCOPES" + EventTypeEnumChangedPersonalInformation EventTypeEnum = "CHANGED_PERSONAL_INFORMATION" + EventTypeEnumChangedOrganizationSettings EventTypeEnum = "CHANGED_ORGANIZATION_SETTINGS" + EventTypeEnumEnabledIntegration EventTypeEnum = "ENABLED_INTEGRATION" + EventTypeEnumDisabledIntegration EventTypeEnum = "DISABLED_INTEGRATION" + EventTypeEnumEnabledCategory EventTypeEnum = "ENABLED_CATEGORY" + EventTypeEnumDisabledCategory EventTypeEnum = "DISABLED_CATEGORY" + EventTypeEnumChangedPassword EventTypeEnum = "CHANGED_PASSWORD" + EventTypeEnumResetPassword EventTypeEnum = "RESET_PASSWORD" + EventTypeEnumEnabledRedactUnmappedDataForOrganization EventTypeEnum = "ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION" + EventTypeEnumEnabledRedactUnmappedDataForLinkedAccount EventTypeEnum = "ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT" + EventTypeEnumDisabledRedactUnmappedDataForOrganization EventTypeEnum = "DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION" + EventTypeEnumDisabledRedactUnmappedDataForLinkedAccount EventTypeEnum = "DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT" + EventTypeEnumCreatedIntegrationWideFieldMapping EventTypeEnum = "CREATED_INTEGRATION_WIDE_FIELD_MAPPING" + EventTypeEnumCreatedLinkedAccountFieldMapping EventTypeEnum = "CREATED_LINKED_ACCOUNT_FIELD_MAPPING" + EventTypeEnumChangedIntegrationWideFieldMapping EventTypeEnum = "CHANGED_INTEGRATION_WIDE_FIELD_MAPPING" + EventTypeEnumChangedLinkedAccountFieldMapping EventTypeEnum = "CHANGED_LINKED_ACCOUNT_FIELD_MAPPING" + EventTypeEnumDeletedIntegrationWideFieldMapping EventTypeEnum = "DELETED_INTEGRATION_WIDE_FIELD_MAPPING" + EventTypeEnumDeletedLinkedAccountFieldMapping EventTypeEnum = "DELETED_LINKED_ACCOUNT_FIELD_MAPPING" + EventTypeEnumCreatedLinkedAccountCommonModelOverride EventTypeEnum = "CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE" + EventTypeEnumChangedLinkedAccountCommonModelOverride EventTypeEnum = "CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE" + EventTypeEnumDeletedLinkedAccountCommonModelOverride EventTypeEnum = "DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE" + EventTypeEnumForcedLinkedAccountResync EventTypeEnum = "FORCED_LINKED_ACCOUNT_RESYNC" + EventTypeEnumMutedIssue EventTypeEnum = "MUTED_ISSUE" + EventTypeEnumGeneratedMagicLink EventTypeEnum = "GENERATED_MAGIC_LINK" + EventTypeEnumEnabledMergeWebhook EventTypeEnum = "ENABLED_MERGE_WEBHOOK" + EventTypeEnumDisabledMergeWebhook EventTypeEnum = "DISABLED_MERGE_WEBHOOK" + EventTypeEnumMergeWebhookTargetChanged EventTypeEnum = "MERGE_WEBHOOK_TARGET_CHANGED" + EventTypeEnumEndUserCredentialsAccessed EventTypeEnum = "END_USER_CREDENTIALS_ACCESSED" +) + +func NewEventTypeEnumFromString(s string) (EventTypeEnum, error) { + switch s { + case "CREATED_REMOTE_PRODUCTION_API_KEY": + return EventTypeEnumCreatedRemoteProductionApiKey, nil + case "DELETED_REMOTE_PRODUCTION_API_KEY": + return EventTypeEnumDeletedRemoteProductionApiKey, nil + case "CREATED_TEST_API_KEY": + return EventTypeEnumCreatedTestApiKey, nil + case "DELETED_TEST_API_KEY": + return EventTypeEnumDeletedTestApiKey, nil + case "REGENERATED_PRODUCTION_API_KEY": + return EventTypeEnumRegeneratedProductionApiKey, nil + case "REGENERATED_WEBHOOK_SIGNATURE": + return EventTypeEnumRegeneratedWebhookSignature, nil + case "INVITED_USER": + return EventTypeEnumInvitedUser, nil + case "TWO_FACTOR_AUTH_ENABLED": + return EventTypeEnumTwoFactorAuthEnabled, nil + case "TWO_FACTOR_AUTH_DISABLED": + return EventTypeEnumTwoFactorAuthDisabled, nil + case "DELETED_LINKED_ACCOUNT": + return EventTypeEnumDeletedLinkedAccount, nil + case "DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT": + return EventTypeEnumDeletedAllCommonModelsForLinkedAccount, nil + case "CREATED_DESTINATION": + return EventTypeEnumCreatedDestination, nil + case "DELETED_DESTINATION": + return EventTypeEnumDeletedDestination, nil + case "CHANGED_DESTINATION": + return EventTypeEnumChangedDestination, nil + case "CHANGED_SCOPES": + return EventTypeEnumChangedScopes, nil + case "CHANGED_PERSONAL_INFORMATION": + return EventTypeEnumChangedPersonalInformation, nil + case "CHANGED_ORGANIZATION_SETTINGS": + return EventTypeEnumChangedOrganizationSettings, nil + case "ENABLED_INTEGRATION": + return EventTypeEnumEnabledIntegration, nil + case "DISABLED_INTEGRATION": + return EventTypeEnumDisabledIntegration, nil + case "ENABLED_CATEGORY": + return EventTypeEnumEnabledCategory, nil + case "DISABLED_CATEGORY": + return EventTypeEnumDisabledCategory, nil + case "CHANGED_PASSWORD": + return EventTypeEnumChangedPassword, nil + case "RESET_PASSWORD": + return EventTypeEnumResetPassword, nil + case "ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION": + return EventTypeEnumEnabledRedactUnmappedDataForOrganization, nil + case "ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT": + return EventTypeEnumEnabledRedactUnmappedDataForLinkedAccount, nil + case "DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION": + return EventTypeEnumDisabledRedactUnmappedDataForOrganization, nil + case "DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT": + return EventTypeEnumDisabledRedactUnmappedDataForLinkedAccount, nil + case "CREATED_INTEGRATION_WIDE_FIELD_MAPPING": + return EventTypeEnumCreatedIntegrationWideFieldMapping, nil + case "CREATED_LINKED_ACCOUNT_FIELD_MAPPING": + return EventTypeEnumCreatedLinkedAccountFieldMapping, nil + case "CHANGED_INTEGRATION_WIDE_FIELD_MAPPING": + return EventTypeEnumChangedIntegrationWideFieldMapping, nil + case "CHANGED_LINKED_ACCOUNT_FIELD_MAPPING": + return EventTypeEnumChangedLinkedAccountFieldMapping, nil + case "DELETED_INTEGRATION_WIDE_FIELD_MAPPING": + return EventTypeEnumDeletedIntegrationWideFieldMapping, nil + case "DELETED_LINKED_ACCOUNT_FIELD_MAPPING": + return EventTypeEnumDeletedLinkedAccountFieldMapping, nil + case "CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE": + return EventTypeEnumCreatedLinkedAccountCommonModelOverride, nil + case "CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE": + return EventTypeEnumChangedLinkedAccountCommonModelOverride, nil + case "DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE": + return EventTypeEnumDeletedLinkedAccountCommonModelOverride, nil + case "FORCED_LINKED_ACCOUNT_RESYNC": + return EventTypeEnumForcedLinkedAccountResync, nil + case "MUTED_ISSUE": + return EventTypeEnumMutedIssue, nil + case "GENERATED_MAGIC_LINK": + return EventTypeEnumGeneratedMagicLink, nil + case "ENABLED_MERGE_WEBHOOK": + return EventTypeEnumEnabledMergeWebhook, nil + case "DISABLED_MERGE_WEBHOOK": + return EventTypeEnumDisabledMergeWebhook, nil + case "MERGE_WEBHOOK_TARGET_CHANGED": + return EventTypeEnumMergeWebhookTargetChanged, nil + case "END_USER_CREDENTIALS_ACCESSED": + return EventTypeEnumEndUserCredentialsAccessed, nil + } + var t EventTypeEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (e EventTypeEnum) Ptr() *EventTypeEnum { + return &e +} + +type PaginatedAuditLogEventList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*AuditLogEvent `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedAuditLogEventList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedAuditLogEventList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedAuditLogEventList) GetResults() []*AuditLogEvent { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedAuditLogEventList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedAuditLogEventList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedAuditLogEventList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedAuditLogEventList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedAuditLogEventList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +// * `ADMIN` - ADMIN +// * `DEVELOPER` - DEVELOPER +// * `MEMBER` - MEMBER +// * `API` - API +// * `SYSTEM` - SYSTEM +// * `MERGE_TEAM` - MERGE_TEAM +type RoleEnum string + +const ( + RoleEnumAdmin RoleEnum = "ADMIN" + RoleEnumDeveloper RoleEnum = "DEVELOPER" + RoleEnumMember RoleEnum = "MEMBER" + RoleEnumApi RoleEnum = "API" + RoleEnumSystem RoleEnum = "SYSTEM" + RoleEnumMergeTeam RoleEnum = "MERGE_TEAM" +) + +func NewRoleEnumFromString(s string) (RoleEnum, error) { + switch s { + case "ADMIN": + return RoleEnumAdmin, nil + case "DEVELOPER": + return RoleEnumDeveloper, nil + case "MEMBER": + return RoleEnumMember, nil + case "API": + return RoleEnumApi, nil + case "SYSTEM": + return RoleEnumSystem, nil + case "MERGE_TEAM": + return RoleEnumMergeTeam, nil + } + var t RoleEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (r RoleEnum) Ptr() *RoleEnum { + return &r } diff --git a/hris/audittrail/client.go b/hris/audittrail/client.go index 55f37be..993fe5f 100644 --- a/hris/audittrail/client.go +++ b/hris/audittrail/client.go @@ -1,76 +1,92 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package audittrail import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - hris "github.com/merge-api/merge-go-client/hris" + core "github.com/merge-api/merge-go-client/v2/core" + hris "github.com/merge-api/merge-go-client/v2/hris" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Gets a list of audit trail events. -func (c *Client) List(ctx context.Context, request *hris.AuditTrailListRequest) (*hris.PaginatedAuditLogEventList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL +func (c *Client) List( + ctx context.Context, + request *hris.AuditTrailListRequest, + opts ...option.RequestOption, +) (*core.Page[*hris.AuditLogEvent], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/hris/v1/audit-trail" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } - endpointURL := baseURL + "/" + "hris/v1/audit-trail" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) - queryParams := make(url.Values) - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.EndDate != nil { - queryParams.Add("end_date", fmt.Sprintf("%v", *request.EndDate)) - } - if request.EventType != nil { - queryParams.Add("event_type", fmt.Sprintf("%v", *request.EventType)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } } - if request.StartDate != nil { - queryParams.Add("start_date", fmt.Sprintf("%v", *request.StartDate)) - } - if request.UserEmail != nil { - queryParams.Add("user_email", fmt.Sprintf("%v", *request.UserEmail)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *hris.PaginatedAuditLogEventList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { - return nil, err + readPageResponse := func(response *hris.PaginatedAuditLogEventList) *internal.PageResponse[*string, *hris.AuditLogEvent] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *hris.AuditLogEvent]{ + Next: next, + Results: results, + Done: next == zeroValue, + } } - return response, nil + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } diff --git a/hris/available_actions.go b/hris/available_actions.go new file mode 100644 index 0000000..987aadf --- /dev/null +++ b/hris/available_actions.go @@ -0,0 +1,77 @@ +// Code generated by Fern. DO NOT EDIT. + +package hris + +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" +) + +// # The AvailableActions Object +// ### Description +// The `Activity` object is used to see all available model/operation combinations for an integration. +// +// ### Usage Example +// Fetch all the actions available for the `Zenefits` integration. +type AvailableActions struct { + Integration *AccountIntegration `json:"integration" url:"integration"` + PassthroughAvailable bool `json:"passthrough_available" url:"passthrough_available"` + AvailableModelOperations []*ModelOperation `json:"available_model_operations,omitempty" url:"available_model_operations,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AvailableActions) GetIntegration() *AccountIntegration { + if a == nil { + return nil + } + return a.Integration +} + +func (a *AvailableActions) GetPassthroughAvailable() bool { + if a == nil { + return false + } + return a.PassthroughAvailable +} + +func (a *AvailableActions) GetAvailableModelOperations() []*ModelOperation { + if a == nil { + return nil + } + return a.AvailableModelOperations +} + +func (a *AvailableActions) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AvailableActions) UnmarshalJSON(data []byte) error { + type unmarshaler AvailableActions + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *a = AvailableActions(value) + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AvailableActions) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} diff --git a/hris/availableactions/client.go b/hris/availableactions/client.go index 554f288..0c3c1f1 100644 --- a/hris/availableactions/client.go +++ b/hris/availableactions/client.go @@ -1,48 +1,65 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package availableactions import ( context "context" - core "github.com/merge-api/merge-go-client/core" - hris "github.com/merge-api/merge-go-client/hris" + core "github.com/merge-api/merge-go-client/v2/core" + hris "github.com/merge-api/merge-go-client/v2/hris" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of models and actions available for an account. -func (c *Client) Retrieve(ctx context.Context) (*hris.AvailableActions, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "hris/v1/available-actions" +func (c *Client) Retrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*hris.AvailableActions, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/hris/v1/available-actions" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *hris.AvailableActions if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/hris/bank_info.go b/hris/bank_info.go index 4dea908..470477a 100644 --- a/hris/bank_info.go +++ b/hris/bank_info.go @@ -1,61 +1,65 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package hris import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type BankInfoListRequest struct { // If provided, will only return BankInfo's with this account type. Options: ('SAVINGS', 'CHECKING') // - // - `SAVINGS` - SAVINGS - // - `CHECKING` - CHECKING - AccountType *BankInfoListRequestAccountType `json:"-"` + // * `SAVINGS` - SAVINGS + // * `CHECKING` - CHECKING + AccountType *BankInfoListRequestAccountType `json:"-" url:"account_type,omitempty"` // If provided, will only return BankInfo's with this bank name. - BankName *string `json:"-"` + BankName *string `json:"-" url:"bank_name,omitempty"` // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // If provided, will only return bank accounts for this employee. - EmployeeId *string `json:"-"` + EmployeeId *string `json:"-" url:"employee_id,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *string `json:"-"` + Expand []*string `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Overrides the default ordering for this endpoint. Possible values include: remote_created_at, -remote_created_at. - OrderBy *BankInfoListRequestOrderBy `json:"-"` + OrderBy *BankInfoListRequestOrderBy `json:"-" url:"order_by,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // Deprecated. Use show_enum_origins. - RemoteFields *string `json:"-"` + RemoteFields *string `json:"-" url:"remote_fields,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` // 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) - ShowEnumOrigins *string `json:"-"` + ShowEnumOrigins *string `json:"-" url:"show_enum_origins,omitempty"` } type BankInfoRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *string `json:"-"` + Expand []*string `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // Deprecated. Use show_enum_origins. - RemoteFields *string `json:"-"` + RemoteFields *string `json:"-" url:"remote_fields,omitempty"` // 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) - ShowEnumOrigins *string `json:"-"` + ShowEnumOrigins *string `json:"-" url:"show_enum_origins,omitempty"` } type BankInfoListRequestAccountType string @@ -101,3 +105,405 @@ func NewBankInfoListRequestOrderByFromString(s string) (BankInfoListRequestOrder func (b BankInfoListRequestOrderBy) Ptr() *BankInfoListRequestOrderBy { return &b } + +// * `SAVINGS` - SAVINGS +// * `CHECKING` - CHECKING +type AccountTypeEnum string + +const ( + AccountTypeEnumSavings AccountTypeEnum = "SAVINGS" + AccountTypeEnumChecking AccountTypeEnum = "CHECKING" +) + +func NewAccountTypeEnumFromString(s string) (AccountTypeEnum, error) { + switch s { + case "SAVINGS": + return AccountTypeEnumSavings, nil + case "CHECKING": + return AccountTypeEnumChecking, nil + } + var t AccountTypeEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (a AccountTypeEnum) Ptr() *AccountTypeEnum { + return &a +} + +// # The BankInfo Object +// ### Description +// The `BankInfo` object is used to represent the Bank Account information for an Employee. +// +// ### Usage Example +// Fetch from the `LIST BankInfo` endpoint and filter by `ID` to show all bank information. +type BankInfo struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The employee with this bank account. + Employee *BankInfoEmployee `json:"employee,omitempty" url:"employee,omitempty"` + // The account number. + AccountNumber *string `json:"account_number,omitempty" url:"account_number,omitempty"` + // The routing number. + RoutingNumber *string `json:"routing_number,omitempty" url:"routing_number,omitempty"` + // The bank name. + BankName *string `json:"bank_name,omitempty" url:"bank_name,omitempty"` + // The bank account type + // + // * `SAVINGS` - SAVINGS + // * `CHECKING` - CHECKING + AccountType *BankInfoAccountType `json:"account_type,omitempty" url:"account_type,omitempty"` + // When the matching bank object was created in the third party system. + RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty" url:"remote_created_at,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (b *BankInfo) GetId() *string { + if b == nil { + return nil + } + return b.Id +} + +func (b *BankInfo) GetRemoteId() *string { + if b == nil { + return nil + } + return b.RemoteId +} + +func (b *BankInfo) GetCreatedAt() *time.Time { + if b == nil { + return nil + } + return b.CreatedAt +} + +func (b *BankInfo) GetModifiedAt() *time.Time { + if b == nil { + return nil + } + return b.ModifiedAt +} + +func (b *BankInfo) GetEmployee() *BankInfoEmployee { + if b == nil { + return nil + } + return b.Employee +} + +func (b *BankInfo) GetAccountNumber() *string { + if b == nil { + return nil + } + return b.AccountNumber +} + +func (b *BankInfo) GetRoutingNumber() *string { + if b == nil { + return nil + } + return b.RoutingNumber +} + +func (b *BankInfo) GetBankName() *string { + if b == nil { + return nil + } + return b.BankName +} + +func (b *BankInfo) GetAccountType() *BankInfoAccountType { + if b == nil { + return nil + } + return b.AccountType +} + +func (b *BankInfo) GetRemoteCreatedAt() *time.Time { + if b == nil { + return nil + } + return b.RemoteCreatedAt +} + +func (b *BankInfo) GetRemoteWasDeleted() *bool { + if b == nil { + return nil + } + return b.RemoteWasDeleted +} + +func (b *BankInfo) GetFieldMappings() map[string]interface{} { + if b == nil { + return nil + } + return b.FieldMappings +} + +func (b *BankInfo) GetRemoteData() []*RemoteData { + if b == nil { + return nil + } + return b.RemoteData +} + +func (b *BankInfo) GetExtraProperties() map[string]interface{} { + return b.extraProperties +} + +func (b *BankInfo) UnmarshalJSON(data []byte) error { + type embed BankInfo + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + }{ + embed: embed(*b), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *b = BankInfo(unmarshaler.embed) + b.CreatedAt = unmarshaler.CreatedAt.TimePtr() + b.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + b.RemoteCreatedAt = unmarshaler.RemoteCreatedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *b) + if err != nil { + return err + } + b.extraProperties = extraProperties + b.rawJSON = json.RawMessage(data) + return nil +} + +func (b *BankInfo) MarshalJSON() ([]byte, error) { + type embed BankInfo + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + }{ + embed: embed(*b), + CreatedAt: internal.NewOptionalDateTime(b.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(b.ModifiedAt), + RemoteCreatedAt: internal.NewOptionalDateTime(b.RemoteCreatedAt), + } + return json.Marshal(marshaler) +} + +func (b *BankInfo) String() string { + if len(b.rawJSON) > 0 { + if value, err := internal.StringifyJSON(b.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(b); err == nil { + return value + } + return fmt.Sprintf("%#v", b) +} + +// The bank account type +// +// * `SAVINGS` - SAVINGS +// * `CHECKING` - CHECKING +type BankInfoAccountType struct { + AccountTypeEnum AccountTypeEnum + String string + + typ string +} + +func (b *BankInfoAccountType) GetAccountTypeEnum() AccountTypeEnum { + if b == nil { + return "" + } + return b.AccountTypeEnum +} + +func (b *BankInfoAccountType) GetString() string { + if b == nil { + return "" + } + return b.String +} + +func (b *BankInfoAccountType) UnmarshalJSON(data []byte) error { + var valueAccountTypeEnum AccountTypeEnum + if err := json.Unmarshal(data, &valueAccountTypeEnum); err == nil { + b.typ = "AccountTypeEnum" + b.AccountTypeEnum = valueAccountTypeEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + b.typ = "String" + b.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, b) +} + +func (b BankInfoAccountType) MarshalJSON() ([]byte, error) { + if b.typ == "AccountTypeEnum" || b.AccountTypeEnum != "" { + return json.Marshal(b.AccountTypeEnum) + } + if b.typ == "String" || b.String != "" { + return json.Marshal(b.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", b) +} + +type BankInfoAccountTypeVisitor interface { + VisitAccountTypeEnum(AccountTypeEnum) error + VisitString(string) error +} + +func (b *BankInfoAccountType) Accept(visitor BankInfoAccountTypeVisitor) error { + if b.typ == "AccountTypeEnum" || b.AccountTypeEnum != "" { + return visitor.VisitAccountTypeEnum(b.AccountTypeEnum) + } + if b.typ == "String" || b.String != "" { + return visitor.VisitString(b.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", b) +} + +// The employee with this bank account. +type BankInfoEmployee struct { + String string + Employee *Employee + + typ string +} + +func (b *BankInfoEmployee) GetString() string { + if b == nil { + return "" + } + return b.String +} + +func (b *BankInfoEmployee) GetEmployee() *Employee { + if b == nil { + return nil + } + return b.Employee +} + +func (b *BankInfoEmployee) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + b.typ = "String" + b.String = valueString + return nil + } + valueEmployee := new(Employee) + if err := json.Unmarshal(data, &valueEmployee); err == nil { + b.typ = "Employee" + b.Employee = valueEmployee + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, b) +} + +func (b BankInfoEmployee) MarshalJSON() ([]byte, error) { + if b.typ == "String" || b.String != "" { + return json.Marshal(b.String) + } + if b.typ == "Employee" || b.Employee != nil { + return json.Marshal(b.Employee) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", b) +} + +type BankInfoEmployeeVisitor interface { + VisitString(string) error + VisitEmployee(*Employee) error +} + +func (b *BankInfoEmployee) Accept(visitor BankInfoEmployeeVisitor) error { + if b.typ == "String" || b.String != "" { + return visitor.VisitString(b.String) + } + if b.typ == "Employee" || b.Employee != nil { + return visitor.VisitEmployee(b.Employee) + } + return fmt.Errorf("type %T does not include a non-empty union type", b) +} + +type PaginatedBankInfoList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*BankInfo `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedBankInfoList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedBankInfoList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedBankInfoList) GetResults() []*BankInfo { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedBankInfoList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedBankInfoList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedBankInfoList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedBankInfoList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedBankInfoList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} diff --git a/hris/bankinfo/client.go b/hris/bankinfo/client.go index 13ae14b..7cf54a6 100644 --- a/hris/bankinfo/client.go +++ b/hris/bankinfo/client.go @@ -1,147 +1,137 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package bankinfo import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - hris "github.com/merge-api/merge-go-client/hris" + core "github.com/merge-api/merge-go-client/v2/core" + hris "github.com/merge-api/merge-go-client/v2/hris" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `BankInfo` objects. -func (c *Client) List(ctx context.Context, request *hris.BankInfoListRequest) (*hris.PaginatedBankInfoList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "hris/v1/bank-info" - - queryParams := make(url.Values) - if request.AccountType != nil { - queryParams.Add("account_type", fmt.Sprintf("%v", *request.AccountType)) - } - if request.BankName != nil { - queryParams.Add("bank_name", fmt.Sprintf("%v", *request.BankName)) - } - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.EmployeeId != nil { - queryParams.Add("employee_id", fmt.Sprintf("%v", *request.EmployeeId)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.OrderBy != nil { - queryParams.Add("order_by", fmt.Sprintf("%v", *request.OrderBy)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteFields != nil { - queryParams.Add("remote_fields", fmt.Sprintf("%v", request.RemoteFields)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if request.ShowEnumOrigins != nil { - queryParams.Add("show_enum_origins", fmt.Sprintf("%v", request.ShowEnumOrigins)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *hris.PaginatedBankInfoList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *hris.BankInfoListRequest, + opts ...option.RequestOption, +) (*core.Page[*hris.BankInfo], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/hris/v1/bank-info" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *hris.PaginatedBankInfoList) *internal.PageResponse[*string, *hris.BankInfo] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *hris.BankInfo]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Returns a `BankInfo` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *hris.BankInfoRetrieveRequest) (*hris.BankInfo, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"hris/v1/bank-info/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.RemoteFields != nil { - queryParams.Add("remote_fields", fmt.Sprintf("%v", request.RemoteFields)) - } - if request.ShowEnumOrigins != nil { - queryParams.Add("show_enum_origins", fmt.Sprintf("%v", request.ShowEnumOrigins)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *hris.BankInfoRetrieveRequest, + opts ...option.RequestOption, +) (*hris.BankInfo, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/hris/v1/bank-info/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *hris.BankInfo if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/hris/benefits.go b/hris/benefits.go index eaa3d36..40b5517 100644 --- a/hris/benefits.go +++ b/hris/benefits.go @@ -1,41 +1,377 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package hris import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type BenefitsListRequest struct { // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // If provided, will return the benefits associated with the employee. - EmployeeId *string `json:"-"` + EmployeeId *string `json:"-" url:"employee_id,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *string `json:"-"` + Expand []*string `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` } type BenefitsRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *string `json:"-"` + Expand []*string `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` +} + +// # The Benefit Object +// ### Description +// The `Benefit` object is used to represent a benefit that an employee has enrolled in. +// +// ### Usage Example +// Fetch from the `LIST Benefits` endpoint and filter by `ID` to show all benefits. +type Benefit struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The employee on the plan. + Employee *BenefitEmployee `json:"employee,omitempty" url:"employee,omitempty"` + // The name of the benefit provider. + ProviderName *string `json:"provider_name,omitempty" url:"provider_name,omitempty"` + // The type of benefit plan + BenefitPlanType *string `json:"benefit_plan_type,omitempty" url:"benefit_plan_type,omitempty"` + // The employee's contribution. + EmployeeContribution *float64 `json:"employee_contribution,omitempty" url:"employee_contribution,omitempty"` + // The company's contribution. + CompanyContribution *float64 `json:"company_contribution,omitempty" url:"company_contribution,omitempty"` + // The day and time the benefit started. + StartDate *time.Time `json:"start_date,omitempty" url:"start_date,omitempty"` + // The day and time the benefit ended. + EndDate *time.Time `json:"end_date,omitempty" url:"end_date,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + // The employer benefit plan the employee is enrolled in. + EmployerBenefit *string `json:"employer_benefit,omitempty" url:"employer_benefit,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (b *Benefit) GetId() *string { + if b == nil { + return nil + } + return b.Id +} + +func (b *Benefit) GetRemoteId() *string { + if b == nil { + return nil + } + return b.RemoteId +} + +func (b *Benefit) GetCreatedAt() *time.Time { + if b == nil { + return nil + } + return b.CreatedAt +} + +func (b *Benefit) GetModifiedAt() *time.Time { + if b == nil { + return nil + } + return b.ModifiedAt +} + +func (b *Benefit) GetEmployee() *BenefitEmployee { + if b == nil { + return nil + } + return b.Employee +} + +func (b *Benefit) GetProviderName() *string { + if b == nil { + return nil + } + return b.ProviderName +} + +func (b *Benefit) GetBenefitPlanType() *string { + if b == nil { + return nil + } + return b.BenefitPlanType +} + +func (b *Benefit) GetEmployeeContribution() *float64 { + if b == nil { + return nil + } + return b.EmployeeContribution +} + +func (b *Benefit) GetCompanyContribution() *float64 { + if b == nil { + return nil + } + return b.CompanyContribution +} + +func (b *Benefit) GetStartDate() *time.Time { + if b == nil { + return nil + } + return b.StartDate +} + +func (b *Benefit) GetEndDate() *time.Time { + if b == nil { + return nil + } + return b.EndDate +} + +func (b *Benefit) GetRemoteWasDeleted() *bool { + if b == nil { + return nil + } + return b.RemoteWasDeleted +} + +func (b *Benefit) GetEmployerBenefit() *string { + if b == nil { + return nil + } + return b.EmployerBenefit +} + +func (b *Benefit) GetFieldMappings() map[string]interface{} { + if b == nil { + return nil + } + return b.FieldMappings +} + +func (b *Benefit) GetRemoteData() []*RemoteData { + if b == nil { + return nil + } + return b.RemoteData +} + +func (b *Benefit) GetExtraProperties() map[string]interface{} { + return b.extraProperties +} + +func (b *Benefit) UnmarshalJSON(data []byte) error { + type embed Benefit + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + StartDate *internal.DateTime `json:"start_date,omitempty"` + EndDate *internal.DateTime `json:"end_date,omitempty"` + }{ + embed: embed(*b), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *b = Benefit(unmarshaler.embed) + b.CreatedAt = unmarshaler.CreatedAt.TimePtr() + b.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + b.StartDate = unmarshaler.StartDate.TimePtr() + b.EndDate = unmarshaler.EndDate.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *b) + if err != nil { + return err + } + b.extraProperties = extraProperties + b.rawJSON = json.RawMessage(data) + return nil +} + +func (b *Benefit) MarshalJSON() ([]byte, error) { + type embed Benefit + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + StartDate *internal.DateTime `json:"start_date,omitempty"` + EndDate *internal.DateTime `json:"end_date,omitempty"` + }{ + embed: embed(*b), + CreatedAt: internal.NewOptionalDateTime(b.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(b.ModifiedAt), + StartDate: internal.NewOptionalDateTime(b.StartDate), + EndDate: internal.NewOptionalDateTime(b.EndDate), + } + return json.Marshal(marshaler) +} + +func (b *Benefit) String() string { + if len(b.rawJSON) > 0 { + if value, err := internal.StringifyJSON(b.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(b); err == nil { + return value + } + return fmt.Sprintf("%#v", b) +} + +// The employee on the plan. +type BenefitEmployee struct { + String string + Employee *Employee + + typ string +} + +func (b *BenefitEmployee) GetString() string { + if b == nil { + return "" + } + return b.String +} + +func (b *BenefitEmployee) GetEmployee() *Employee { + if b == nil { + return nil + } + return b.Employee +} + +func (b *BenefitEmployee) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + b.typ = "String" + b.String = valueString + return nil + } + valueEmployee := new(Employee) + if err := json.Unmarshal(data, &valueEmployee); err == nil { + b.typ = "Employee" + b.Employee = valueEmployee + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, b) +} + +func (b BenefitEmployee) MarshalJSON() ([]byte, error) { + if b.typ == "String" || b.String != "" { + return json.Marshal(b.String) + } + if b.typ == "Employee" || b.Employee != nil { + return json.Marshal(b.Employee) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", b) +} + +type BenefitEmployeeVisitor interface { + VisitString(string) error + VisitEmployee(*Employee) error +} + +func (b *BenefitEmployee) Accept(visitor BenefitEmployeeVisitor) error { + if b.typ == "String" || b.String != "" { + return visitor.VisitString(b.String) + } + if b.typ == "Employee" || b.Employee != nil { + return visitor.VisitEmployee(b.Employee) + } + return fmt.Errorf("type %T does not include a non-empty union type", b) +} + +type PaginatedBenefitList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Benefit `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedBenefitList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedBenefitList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedBenefitList) GetResults() []*Benefit { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedBenefitList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedBenefitList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedBenefitList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedBenefitList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedBenefitList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) } diff --git a/hris/benefits/client.go b/hris/benefits/client.go index 7aef808..2e3224e 100644 --- a/hris/benefits/client.go +++ b/hris/benefits/client.go @@ -1,126 +1,137 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package benefits import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - hris "github.com/merge-api/merge-go-client/hris" + core "github.com/merge-api/merge-go-client/v2/core" + hris "github.com/merge-api/merge-go-client/v2/hris" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `Benefit` objects. -func (c *Client) List(ctx context.Context, request *hris.BenefitsListRequest) (*hris.PaginatedBenefitList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "hris/v1/benefits" - - queryParams := make(url.Values) - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.EmployeeId != nil { - queryParams.Add("employee_id", fmt.Sprintf("%v", *request.EmployeeId)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *hris.PaginatedBenefitList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *hris.BenefitsListRequest, + opts ...option.RequestOption, +) (*core.Page[*hris.Benefit], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/hris/v1/benefits" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *hris.PaginatedBenefitList) *internal.PageResponse[*string, *hris.Benefit] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *hris.Benefit]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Returns a `Benefit` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *hris.BenefitsRetrieveRequest) (*hris.Benefit, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"hris/v1/benefits/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *hris.BenefitsRetrieveRequest, + opts ...option.RequestOption, +) (*hris.Benefit, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/hris/v1/benefits/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *hris.Benefit if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/hris/client/client.go b/hris/client/client.go index 6ceb897..080a391 100644 --- a/hris/client/client.go +++ b/hris/client/client.go @@ -1,48 +1,50 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package client import ( - core "github.com/merge-api/merge-go-client/core" - accountdetails "github.com/merge-api/merge-go-client/hris/accountdetails" - accounttoken "github.com/merge-api/merge-go-client/hris/accounttoken" - asyncpassthrough "github.com/merge-api/merge-go-client/hris/asyncpassthrough" - audittrail "github.com/merge-api/merge-go-client/hris/audittrail" - availableactions "github.com/merge-api/merge-go-client/hris/availableactions" - bankinfo "github.com/merge-api/merge-go-client/hris/bankinfo" - benefits "github.com/merge-api/merge-go-client/hris/benefits" - companies "github.com/merge-api/merge-go-client/hris/companies" - deleteaccount "github.com/merge-api/merge-go-client/hris/deleteaccount" - dependents "github.com/merge-api/merge-go-client/hris/dependents" - employeepayrollruns "github.com/merge-api/merge-go-client/hris/employeepayrollruns" - employees "github.com/merge-api/merge-go-client/hris/employees" - employerbenefits "github.com/merge-api/merge-go-client/hris/employerbenefits" - employments "github.com/merge-api/merge-go-client/hris/employments" - fieldmapping "github.com/merge-api/merge-go-client/hris/fieldmapping" - forceresync "github.com/merge-api/merge-go-client/hris/forceresync" - generatekey "github.com/merge-api/merge-go-client/hris/generatekey" - groups "github.com/merge-api/merge-go-client/hris/groups" - issues "github.com/merge-api/merge-go-client/hris/issues" - linkedaccounts "github.com/merge-api/merge-go-client/hris/linkedaccounts" - linktoken "github.com/merge-api/merge-go-client/hris/linktoken" - locations "github.com/merge-api/merge-go-client/hris/locations" - passthrough "github.com/merge-api/merge-go-client/hris/passthrough" - paygroups "github.com/merge-api/merge-go-client/hris/paygroups" - payrollruns "github.com/merge-api/merge-go-client/hris/payrollruns" - regeneratekey "github.com/merge-api/merge-go-client/hris/regeneratekey" - scopes "github.com/merge-api/merge-go-client/hris/scopes" - syncstatus "github.com/merge-api/merge-go-client/hris/syncstatus" - teams "github.com/merge-api/merge-go-client/hris/teams" - timeoff "github.com/merge-api/merge-go-client/hris/timeoff" - timeoffbalances "github.com/merge-api/merge-go-client/hris/timeoffbalances" - timesheetentries "github.com/merge-api/merge-go-client/hris/timesheetentries" - webhookreceivers "github.com/merge-api/merge-go-client/hris/webhookreceivers" + core "github.com/merge-api/merge-go-client/v2/core" + accountdetails "github.com/merge-api/merge-go-client/v2/hris/accountdetails" + accounttoken "github.com/merge-api/merge-go-client/v2/hris/accounttoken" + asyncpassthrough "github.com/merge-api/merge-go-client/v2/hris/asyncpassthrough" + audittrail "github.com/merge-api/merge-go-client/v2/hris/audittrail" + availableactions "github.com/merge-api/merge-go-client/v2/hris/availableactions" + bankinfo "github.com/merge-api/merge-go-client/v2/hris/bankinfo" + benefits "github.com/merge-api/merge-go-client/v2/hris/benefits" + companies "github.com/merge-api/merge-go-client/v2/hris/companies" + deleteaccount "github.com/merge-api/merge-go-client/v2/hris/deleteaccount" + dependents "github.com/merge-api/merge-go-client/v2/hris/dependents" + employeepayrollruns "github.com/merge-api/merge-go-client/v2/hris/employeepayrollruns" + employees "github.com/merge-api/merge-go-client/v2/hris/employees" + employerbenefits "github.com/merge-api/merge-go-client/v2/hris/employerbenefits" + employments "github.com/merge-api/merge-go-client/v2/hris/employments" + fieldmapping "github.com/merge-api/merge-go-client/v2/hris/fieldmapping" + forceresync "github.com/merge-api/merge-go-client/v2/hris/forceresync" + generatekey "github.com/merge-api/merge-go-client/v2/hris/generatekey" + groups "github.com/merge-api/merge-go-client/v2/hris/groups" + issues "github.com/merge-api/merge-go-client/v2/hris/issues" + linkedaccounts "github.com/merge-api/merge-go-client/v2/hris/linkedaccounts" + linktoken "github.com/merge-api/merge-go-client/v2/hris/linktoken" + locations "github.com/merge-api/merge-go-client/v2/hris/locations" + passthrough "github.com/merge-api/merge-go-client/v2/hris/passthrough" + paygroups "github.com/merge-api/merge-go-client/v2/hris/paygroups" + payrollruns "github.com/merge-api/merge-go-client/v2/hris/payrollruns" + regeneratekey "github.com/merge-api/merge-go-client/v2/hris/regeneratekey" + scopes "github.com/merge-api/merge-go-client/v2/hris/scopes" + syncstatus "github.com/merge-api/merge-go-client/v2/hris/syncstatus" + teams "github.com/merge-api/merge-go-client/v2/hris/teams" + timeoff "github.com/merge-api/merge-go-client/v2/hris/timeoff" + timeoffbalances "github.com/merge-api/merge-go-client/v2/hris/timeoffbalances" + timesheetentries "github.com/merge-api/merge-go-client/v2/hris/timesheetentries" + webhookreceivers "github.com/merge-api/merge-go-client/v2/hris/webhookreceivers" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header AccountDetails *accountdetails.Client @@ -80,14 +82,16 @@ type Client struct { WebhookReceivers *webhookreceivers.Client } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ - baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), + baseURL: options.BaseURL, + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), header: options.ToHeader(), AccountDetails: accountdetails.NewClient(opts...), AccountToken: accounttoken.NewClient(opts...), diff --git a/hris/companies.go b/hris/companies.go index af314bf..1b6a482 100644 --- a/hris/companies.go +++ b/hris/companies.go @@ -1,35 +1,102 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package hris import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type CompaniesListRequest struct { // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` } type CompaniesRetrieveRequest struct { // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` +} + +type PaginatedCompanyList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Company `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedCompanyList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedCompanyList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedCompanyList) GetResults() []*Company { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedCompanyList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedCompanyList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedCompanyList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedCompanyList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedCompanyList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) } diff --git a/hris/companies/client.go b/hris/companies/client.go index 7e94f85..5d455db 100644 --- a/hris/companies/client.go +++ b/hris/companies/client.go @@ -1,117 +1,137 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package companies import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - hris "github.com/merge-api/merge-go-client/hris" + core "github.com/merge-api/merge-go-client/v2/core" + hris "github.com/merge-api/merge-go-client/v2/hris" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `Company` objects. -func (c *Client) List(ctx context.Context, request *hris.CompaniesListRequest) (*hris.PaginatedCompanyList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "hris/v1/companies" - - queryParams := make(url.Values) - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *hris.PaginatedCompanyList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *hris.CompaniesListRequest, + opts ...option.RequestOption, +) (*core.Page[*hris.Company], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/hris/v1/companies" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *hris.PaginatedCompanyList) *internal.PageResponse[*string, *hris.Company] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *hris.Company]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Returns a `Company` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *hris.CompaniesRetrieveRequest) (*hris.Company, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"hris/v1/companies/%v", id) - - queryParams := make(url.Values) - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *hris.CompaniesRetrieveRequest, + opts ...option.RequestOption, +) (*hris.Company, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/hris/v1/companies/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *hris.Company if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/hris/deleteaccount/client.go b/hris/deleteaccount/client.go index d676c7e..22f131b 100644 --- a/hris/deleteaccount/client.go +++ b/hris/deleteaccount/client.go @@ -1,45 +1,62 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package deleteaccount import ( context "context" - core "github.com/merge-api/merge-go-client/core" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Delete a linked account. -func (c *Client) Delete(ctx context.Context) error { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "hris/v1/delete-account" +func (c *Client) Delete( + ctx context.Context, + opts ...option.RequestOption, +) error { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/hris/v1/delete-account" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, }, ); err != nil { return err diff --git a/hris/dependents.go b/hris/dependents.go index 8a4f976..d32b9f6 100644 --- a/hris/dependents.go +++ b/hris/dependents.go @@ -1,39 +1,509 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package hris import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type DependentsListRequest struct { // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include sensitive fields (such as social security numbers) in the response. - IncludeSensitiveFields *bool `json:"-"` + IncludeSensitiveFields *bool `json:"-" url:"include_sensitive_fields,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` } type DependentsRetrieveRequest struct { // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include sensitive fields (such as social security numbers) in the response. - IncludeSensitiveFields *bool `json:"-"` + IncludeSensitiveFields *bool `json:"-" url:"include_sensitive_fields,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` +} + +// # The Dependent Object +// ### Description +// The `Dependent` object is used to represent a dependent (e.g. child, spouse, domestic partner, etc) of an `Employee` +// +// ### Usage Example +// Fetch from the `LIST Dependents` endpoint and filter by `ID` to show all dependents. +type Dependent struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The dependents's first name. + FirstName *string `json:"first_name,omitempty" url:"first_name,omitempty"` + // The dependents's middle name. + MiddleName *string `json:"middle_name,omitempty" url:"middle_name,omitempty"` + // The dependents's last name. + LastName *string `json:"last_name,omitempty" url:"last_name,omitempty"` + // The dependent's relationship to the employee. + // + // * `CHILD` - CHILD + // * `SPOUSE` - SPOUSE + // * `DOMESTIC_PARTNER` - DOMESTIC_PARTNER + Relationship *DependentRelationship `json:"relationship,omitempty" url:"relationship,omitempty"` + // The employee this person is a dependent of. + Employee *string `json:"employee,omitempty" url:"employee,omitempty"` + // The dependent's date of birth. + DateOfBirth *time.Time `json:"date_of_birth,omitempty" url:"date_of_birth,omitempty"` + // The dependent's gender. + // + // * `MALE` - MALE + // * `FEMALE` - FEMALE + // * `NON-BINARY` - NON-BINARY + // * `OTHER` - OTHER + // * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE + Gender *DependentGender `json:"gender,omitempty" url:"gender,omitempty"` + // The dependent's phone number. + PhoneNumber *string `json:"phone_number,omitempty" url:"phone_number,omitempty"` + // The dependents's home address. + HomeLocation *string `json:"home_location,omitempty" url:"home_location,omitempty"` + // Whether or not the dependent is a student + IsStudent *bool `json:"is_student,omitempty" url:"is_student,omitempty"` + // The dependents's social security number. + Ssn *string `json:"ssn,omitempty" url:"ssn,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (d *Dependent) GetId() *string { + if d == nil { + return nil + } + return d.Id +} + +func (d *Dependent) GetRemoteId() *string { + if d == nil { + return nil + } + return d.RemoteId +} + +func (d *Dependent) GetCreatedAt() *time.Time { + if d == nil { + return nil + } + return d.CreatedAt +} + +func (d *Dependent) GetModifiedAt() *time.Time { + if d == nil { + return nil + } + return d.ModifiedAt +} + +func (d *Dependent) GetFirstName() *string { + if d == nil { + return nil + } + return d.FirstName +} + +func (d *Dependent) GetMiddleName() *string { + if d == nil { + return nil + } + return d.MiddleName +} + +func (d *Dependent) GetLastName() *string { + if d == nil { + return nil + } + return d.LastName +} + +func (d *Dependent) GetRelationship() *DependentRelationship { + if d == nil { + return nil + } + return d.Relationship +} + +func (d *Dependent) GetEmployee() *string { + if d == nil { + return nil + } + return d.Employee +} + +func (d *Dependent) GetDateOfBirth() *time.Time { + if d == nil { + return nil + } + return d.DateOfBirth +} + +func (d *Dependent) GetGender() *DependentGender { + if d == nil { + return nil + } + return d.Gender +} + +func (d *Dependent) GetPhoneNumber() *string { + if d == nil { + return nil + } + return d.PhoneNumber +} + +func (d *Dependent) GetHomeLocation() *string { + if d == nil { + return nil + } + return d.HomeLocation +} + +func (d *Dependent) GetIsStudent() *bool { + if d == nil { + return nil + } + return d.IsStudent +} + +func (d *Dependent) GetSsn() *string { + if d == nil { + return nil + } + return d.Ssn +} + +func (d *Dependent) GetRemoteWasDeleted() *bool { + if d == nil { + return nil + } + return d.RemoteWasDeleted +} + +func (d *Dependent) GetFieldMappings() map[string]interface{} { + if d == nil { + return nil + } + return d.FieldMappings +} + +func (d *Dependent) GetRemoteData() []*RemoteData { + if d == nil { + return nil + } + return d.RemoteData +} + +func (d *Dependent) GetExtraProperties() map[string]interface{} { + return d.extraProperties +} + +func (d *Dependent) UnmarshalJSON(data []byte) error { + type embed Dependent + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + DateOfBirth *internal.DateTime `json:"date_of_birth,omitempty"` + }{ + embed: embed(*d), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *d = Dependent(unmarshaler.embed) + d.CreatedAt = unmarshaler.CreatedAt.TimePtr() + d.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + d.DateOfBirth = unmarshaler.DateOfBirth.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *d) + if err != nil { + return err + } + d.extraProperties = extraProperties + d.rawJSON = json.RawMessage(data) + return nil +} + +func (d *Dependent) MarshalJSON() ([]byte, error) { + type embed Dependent + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + DateOfBirth *internal.DateTime `json:"date_of_birth,omitempty"` + }{ + embed: embed(*d), + CreatedAt: internal.NewOptionalDateTime(d.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(d.ModifiedAt), + DateOfBirth: internal.NewOptionalDateTime(d.DateOfBirth), + } + return json.Marshal(marshaler) +} + +func (d *Dependent) String() string { + if len(d.rawJSON) > 0 { + if value, err := internal.StringifyJSON(d.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(d); err == nil { + return value + } + return fmt.Sprintf("%#v", d) +} + +// The dependent's gender. +// +// * `MALE` - MALE +// * `FEMALE` - FEMALE +// * `NON-BINARY` - NON-BINARY +// * `OTHER` - OTHER +// * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE +type DependentGender struct { + GenderEnum GenderEnum + String string + + typ string +} + +func (d *DependentGender) GetGenderEnum() GenderEnum { + if d == nil { + return "" + } + return d.GenderEnum +} + +func (d *DependentGender) GetString() string { + if d == nil { + return "" + } + return d.String +} + +func (d *DependentGender) UnmarshalJSON(data []byte) error { + var valueGenderEnum GenderEnum + if err := json.Unmarshal(data, &valueGenderEnum); err == nil { + d.typ = "GenderEnum" + d.GenderEnum = valueGenderEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + d.typ = "String" + d.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, d) +} + +func (d DependentGender) MarshalJSON() ([]byte, error) { + if d.typ == "GenderEnum" || d.GenderEnum != "" { + return json.Marshal(d.GenderEnum) + } + if d.typ == "String" || d.String != "" { + return json.Marshal(d.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", d) +} + +type DependentGenderVisitor interface { + VisitGenderEnum(GenderEnum) error + VisitString(string) error +} + +func (d *DependentGender) Accept(visitor DependentGenderVisitor) error { + if d.typ == "GenderEnum" || d.GenderEnum != "" { + return visitor.VisitGenderEnum(d.GenderEnum) + } + if d.typ == "String" || d.String != "" { + return visitor.VisitString(d.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", d) +} + +// The dependent's relationship to the employee. +// +// * `CHILD` - CHILD +// * `SPOUSE` - SPOUSE +// * `DOMESTIC_PARTNER` - DOMESTIC_PARTNER +type DependentRelationship struct { + RelationshipEnum RelationshipEnum + String string + + typ string +} + +func (d *DependentRelationship) GetRelationshipEnum() RelationshipEnum { + if d == nil { + return "" + } + return d.RelationshipEnum +} + +func (d *DependentRelationship) GetString() string { + if d == nil { + return "" + } + return d.String +} + +func (d *DependentRelationship) UnmarshalJSON(data []byte) error { + var valueRelationshipEnum RelationshipEnum + if err := json.Unmarshal(data, &valueRelationshipEnum); err == nil { + d.typ = "RelationshipEnum" + d.RelationshipEnum = valueRelationshipEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + d.typ = "String" + d.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, d) +} + +func (d DependentRelationship) MarshalJSON() ([]byte, error) { + if d.typ == "RelationshipEnum" || d.RelationshipEnum != "" { + return json.Marshal(d.RelationshipEnum) + } + if d.typ == "String" || d.String != "" { + return json.Marshal(d.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", d) +} + +type DependentRelationshipVisitor interface { + VisitRelationshipEnum(RelationshipEnum) error + VisitString(string) error +} + +func (d *DependentRelationship) Accept(visitor DependentRelationshipVisitor) error { + if d.typ == "RelationshipEnum" || d.RelationshipEnum != "" { + return visitor.VisitRelationshipEnum(d.RelationshipEnum) + } + if d.typ == "String" || d.String != "" { + return visitor.VisitString(d.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", d) +} + +type PaginatedDependentList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Dependent `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedDependentList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedDependentList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedDependentList) GetResults() []*Dependent { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedDependentList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedDependentList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedDependentList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedDependentList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedDependentList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +// * `CHILD` - CHILD +// * `SPOUSE` - SPOUSE +// * `DOMESTIC_PARTNER` - DOMESTIC_PARTNER +type RelationshipEnum string + +const ( + RelationshipEnumChild RelationshipEnum = "CHILD" + RelationshipEnumSpouse RelationshipEnum = "SPOUSE" + RelationshipEnumDomesticPartner RelationshipEnum = "DOMESTIC_PARTNER" +) + +func NewRelationshipEnumFromString(s string) (RelationshipEnum, error) { + switch s { + case "CHILD": + return RelationshipEnumChild, nil + case "SPOUSE": + return RelationshipEnumSpouse, nil + case "DOMESTIC_PARTNER": + return RelationshipEnumDomesticPartner, nil + } + var t RelationshipEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (r RelationshipEnum) Ptr() *RelationshipEnum { + return &r } diff --git a/hris/dependents/client.go b/hris/dependents/client.go index 3abb489..ffcfed6 100644 --- a/hris/dependents/client.go +++ b/hris/dependents/client.go @@ -1,123 +1,137 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package dependents import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - hris "github.com/merge-api/merge-go-client/hris" + core "github.com/merge-api/merge-go-client/v2/core" + hris "github.com/merge-api/merge-go-client/v2/hris" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `Dependent` objects. -func (c *Client) List(ctx context.Context, request *hris.DependentsListRequest) (*hris.PaginatedDependentList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "hris/v1/dependents" - - queryParams := make(url.Values) - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeSensitiveFields != nil { - queryParams.Add("include_sensitive_fields", fmt.Sprintf("%v", *request.IncludeSensitiveFields)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *hris.PaginatedDependentList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *hris.DependentsListRequest, + opts ...option.RequestOption, +) (*core.Page[*hris.Dependent], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/hris/v1/dependents" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *hris.PaginatedDependentList) *internal.PageResponse[*string, *hris.Dependent] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *hris.Dependent]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Returns a `Dependent` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *hris.DependentsRetrieveRequest) (*hris.Dependent, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"hris/v1/dependents/%v", id) - - queryParams := make(url.Values) - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeSensitiveFields != nil { - queryParams.Add("include_sensitive_fields", fmt.Sprintf("%v", *request.IncludeSensitiveFields)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *hris.DependentsRetrieveRequest, + opts ...option.RequestOption, +) (*hris.Dependent, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/hris/v1/dependents/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *hris.Dependent if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/hris/employee_payroll_runs.go b/hris/employee_payroll_runs.go index 388404a..91045e0 100644 --- a/hris/employee_payroll_runs.go +++ b/hris/employee_payroll_runs.go @@ -1,102 +1,1092 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package hris import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type EmployeePayrollRunsListRequest struct { // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // If provided, will only return employee payroll runs for this employee. - EmployeeId *string `json:"-"` + EmployeeId *string `json:"-" url:"employee_id,omitempty"` // If provided, will only return employee payroll runs ended after this datetime. - EndedAfter *time.Time `json:"-"` + EndedAfter *time.Time `json:"-" url:"ended_after,omitempty"` // If provided, will only return employee payroll runs ended before this datetime. - EndedBefore *time.Time `json:"-"` + EndedBefore *time.Time `json:"-" url:"ended_before,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *EmployeePayrollRunsListRequestExpand `json:"-"` + Expand []*EmployeePayrollRunsListRequestExpandItem `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // If provided, will only return employee payroll runs for this employee. - PayrollRunId *string `json:"-"` + PayrollRunId *string `json:"-" url:"payroll_run_id,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` // If provided, will only return employee payroll runs started after this datetime. - StartedAfter *time.Time `json:"-"` + StartedAfter *time.Time `json:"-" url:"started_after,omitempty"` // If provided, will only return employee payroll runs started before this datetime. - StartedBefore *time.Time `json:"-"` + StartedBefore *time.Time `json:"-" url:"started_before,omitempty"` } type EmployeePayrollRunsRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *EmployeePayrollRunsRetrieveRequestExpand `json:"-"` + Expand []*EmployeePayrollRunsRetrieveRequestExpandItem `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` } -type EmployeePayrollRunsListRequestExpand string +type EmployeePayrollRunsListRequestExpandItem string const ( - EmployeePayrollRunsListRequestExpandEmployee EmployeePayrollRunsListRequestExpand = "employee" - EmployeePayrollRunsListRequestExpandEmployeePayrollRun EmployeePayrollRunsListRequestExpand = "employee,payroll_run" - EmployeePayrollRunsListRequestExpandPayrollRun EmployeePayrollRunsListRequestExpand = "payroll_run" + EmployeePayrollRunsListRequestExpandItemEmployee EmployeePayrollRunsListRequestExpandItem = "employee" + EmployeePayrollRunsListRequestExpandItemPayrollRun EmployeePayrollRunsListRequestExpandItem = "payroll_run" ) -func NewEmployeePayrollRunsListRequestExpandFromString(s string) (EmployeePayrollRunsListRequestExpand, error) { +func NewEmployeePayrollRunsListRequestExpandItemFromString(s string) (EmployeePayrollRunsListRequestExpandItem, error) { switch s { case "employee": - return EmployeePayrollRunsListRequestExpandEmployee, nil - case "employee,payroll_run": - return EmployeePayrollRunsListRequestExpandEmployeePayrollRun, nil + return EmployeePayrollRunsListRequestExpandItemEmployee, nil case "payroll_run": - return EmployeePayrollRunsListRequestExpandPayrollRun, nil + return EmployeePayrollRunsListRequestExpandItemPayrollRun, nil } - var t EmployeePayrollRunsListRequestExpand + var t EmployeePayrollRunsListRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (e EmployeePayrollRunsListRequestExpand) Ptr() *EmployeePayrollRunsListRequestExpand { +func (e EmployeePayrollRunsListRequestExpandItem) Ptr() *EmployeePayrollRunsListRequestExpandItem { return &e } -type EmployeePayrollRunsRetrieveRequestExpand string +type EmployeePayrollRunsRetrieveRequestExpandItem string const ( - EmployeePayrollRunsRetrieveRequestExpandEmployee EmployeePayrollRunsRetrieveRequestExpand = "employee" - EmployeePayrollRunsRetrieveRequestExpandEmployeePayrollRun EmployeePayrollRunsRetrieveRequestExpand = "employee,payroll_run" - EmployeePayrollRunsRetrieveRequestExpandPayrollRun EmployeePayrollRunsRetrieveRequestExpand = "payroll_run" + EmployeePayrollRunsRetrieveRequestExpandItemEmployee EmployeePayrollRunsRetrieveRequestExpandItem = "employee" + EmployeePayrollRunsRetrieveRequestExpandItemPayrollRun EmployeePayrollRunsRetrieveRequestExpandItem = "payroll_run" ) -func NewEmployeePayrollRunsRetrieveRequestExpandFromString(s string) (EmployeePayrollRunsRetrieveRequestExpand, error) { +func NewEmployeePayrollRunsRetrieveRequestExpandItemFromString(s string) (EmployeePayrollRunsRetrieveRequestExpandItem, error) { switch s { case "employee": - return EmployeePayrollRunsRetrieveRequestExpandEmployee, nil - case "employee,payroll_run": - return EmployeePayrollRunsRetrieveRequestExpandEmployeePayrollRun, nil + return EmployeePayrollRunsRetrieveRequestExpandItemEmployee, nil case "payroll_run": - return EmployeePayrollRunsRetrieveRequestExpandPayrollRun, nil + return EmployeePayrollRunsRetrieveRequestExpandItemPayrollRun, nil + } + var t EmployeePayrollRunsRetrieveRequestExpandItem + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (e EmployeePayrollRunsRetrieveRequestExpandItem) Ptr() *EmployeePayrollRunsRetrieveRequestExpandItem { + return &e +} + +// # The Deduction Object +// ### Description +// The `Deduction` object is used to represent an array of the wages withheld from total earnings for the purpose of paying taxes. +// +// ### Usage Example +// Fetch from the `LIST Deductions` endpoint and filter by `ID` to show all deductions. +type Deduction struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + EmployeePayrollRun *string `json:"employee_payroll_run,omitempty" url:"employee_payroll_run,omitempty"` + // The deduction's name. + Name *string `json:"name,omitempty" url:"name,omitempty"` + // The amount of money that is withheld from an employee's gross pay by the employee. + EmployeeDeduction *float64 `json:"employee_deduction,omitempty" url:"employee_deduction,omitempty"` + // The amount of money that is withheld on behalf of an employee by the company. + CompanyDeduction *float64 `json:"company_deduction,omitempty" url:"company_deduction,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (d *Deduction) GetId() *string { + if d == nil { + return nil + } + return d.Id +} + +func (d *Deduction) GetRemoteId() *string { + if d == nil { + return nil + } + return d.RemoteId +} + +func (d *Deduction) GetCreatedAt() *time.Time { + if d == nil { + return nil + } + return d.CreatedAt +} + +func (d *Deduction) GetModifiedAt() *time.Time { + if d == nil { + return nil + } + return d.ModifiedAt +} + +func (d *Deduction) GetEmployeePayrollRun() *string { + if d == nil { + return nil + } + return d.EmployeePayrollRun +} + +func (d *Deduction) GetName() *string { + if d == nil { + return nil + } + return d.Name +} + +func (d *Deduction) GetEmployeeDeduction() *float64 { + if d == nil { + return nil + } + return d.EmployeeDeduction +} + +func (d *Deduction) GetCompanyDeduction() *float64 { + if d == nil { + return nil + } + return d.CompanyDeduction +} + +func (d *Deduction) GetRemoteWasDeleted() *bool { + if d == nil { + return nil + } + return d.RemoteWasDeleted +} + +func (d *Deduction) GetFieldMappings() map[string]interface{} { + if d == nil { + return nil + } + return d.FieldMappings +} + +func (d *Deduction) GetRemoteData() []*RemoteData { + if d == nil { + return nil + } + return d.RemoteData +} + +func (d *Deduction) GetExtraProperties() map[string]interface{} { + return d.extraProperties +} + +func (d *Deduction) UnmarshalJSON(data []byte) error { + type embed Deduction + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*d), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *d = Deduction(unmarshaler.embed) + d.CreatedAt = unmarshaler.CreatedAt.TimePtr() + d.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *d) + if err != nil { + return err + } + d.extraProperties = extraProperties + d.rawJSON = json.RawMessage(data) + return nil +} + +func (d *Deduction) MarshalJSON() ([]byte, error) { + type embed Deduction + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*d), + CreatedAt: internal.NewOptionalDateTime(d.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(d.ModifiedAt), + } + return json.Marshal(marshaler) +} + +func (d *Deduction) String() string { + if len(d.rawJSON) > 0 { + if value, err := internal.StringifyJSON(d.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(d); err == nil { + return value + } + return fmt.Sprintf("%#v", d) +} + +// # The Earning Object +// ### Description +// The `Earning` object is used to represent an array of different compensations that an employee receives within specific wage categories. +// +// ### Usage Example +// Fetch from the `LIST Earnings` endpoint and filter by `ID` to show all earnings. +type Earning struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + EmployeePayrollRun *string `json:"employee_payroll_run,omitempty" url:"employee_payroll_run,omitempty"` + // The amount earned. + Amount *float64 `json:"amount,omitempty" url:"amount,omitempty"` + // The type of earning. + // + // * `SALARY` - SALARY + // * `REIMBURSEMENT` - REIMBURSEMENT + // * `OVERTIME` - OVERTIME + // * `BONUS` - BONUS + Type *EarningType `json:"type,omitempty" url:"type,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (e *Earning) GetId() *string { + if e == nil { + return nil + } + return e.Id +} + +func (e *Earning) GetRemoteId() *string { + if e == nil { + return nil + } + return e.RemoteId +} + +func (e *Earning) GetCreatedAt() *time.Time { + if e == nil { + return nil + } + return e.CreatedAt +} + +func (e *Earning) GetModifiedAt() *time.Time { + if e == nil { + return nil + } + return e.ModifiedAt +} + +func (e *Earning) GetEmployeePayrollRun() *string { + if e == nil { + return nil + } + return e.EmployeePayrollRun +} + +func (e *Earning) GetAmount() *float64 { + if e == nil { + return nil + } + return e.Amount +} + +func (e *Earning) GetType() *EarningType { + if e == nil { + return nil } - var t EmployeePayrollRunsRetrieveRequestExpand + return e.Type +} + +func (e *Earning) GetRemoteWasDeleted() *bool { + if e == nil { + return nil + } + return e.RemoteWasDeleted +} + +func (e *Earning) GetFieldMappings() map[string]interface{} { + if e == nil { + return nil + } + return e.FieldMappings +} + +func (e *Earning) GetRemoteData() []*RemoteData { + if e == nil { + return nil + } + return e.RemoteData +} + +func (e *Earning) GetExtraProperties() map[string]interface{} { + return e.extraProperties +} + +func (e *Earning) UnmarshalJSON(data []byte) error { + type embed Earning + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*e), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *e = Earning(unmarshaler.embed) + e.CreatedAt = unmarshaler.CreatedAt.TimePtr() + e.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *e) + if err != nil { + return err + } + e.extraProperties = extraProperties + e.rawJSON = json.RawMessage(data) + return nil +} + +func (e *Earning) MarshalJSON() ([]byte, error) { + type embed Earning + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*e), + CreatedAt: internal.NewOptionalDateTime(e.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(e.ModifiedAt), + } + return json.Marshal(marshaler) +} + +func (e *Earning) String() string { + if len(e.rawJSON) > 0 { + if value, err := internal.StringifyJSON(e.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(e); err == nil { + return value + } + return fmt.Sprintf("%#v", e) +} + +// The type of earning. +// +// * `SALARY` - SALARY +// * `REIMBURSEMENT` - REIMBURSEMENT +// * `OVERTIME` - OVERTIME +// * `BONUS` - BONUS +type EarningType struct { + EarningTypeEnum EarningTypeEnum + String string + + typ string +} + +func (e *EarningType) GetEarningTypeEnum() EarningTypeEnum { + if e == nil { + return "" + } + return e.EarningTypeEnum +} + +func (e *EarningType) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *EarningType) UnmarshalJSON(data []byte) error { + var valueEarningTypeEnum EarningTypeEnum + if err := json.Unmarshal(data, &valueEarningTypeEnum); err == nil { + e.typ = "EarningTypeEnum" + e.EarningTypeEnum = valueEarningTypeEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e EarningType) MarshalJSON() ([]byte, error) { + if e.typ == "EarningTypeEnum" || e.EarningTypeEnum != "" { + return json.Marshal(e.EarningTypeEnum) + } + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type EarningTypeVisitor interface { + VisitEarningTypeEnum(EarningTypeEnum) error + VisitString(string) error +} + +func (e *EarningType) Accept(visitor EarningTypeVisitor) error { + if e.typ == "EarningTypeEnum" || e.EarningTypeEnum != "" { + return visitor.VisitEarningTypeEnum(e.EarningTypeEnum) + } + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +// * `SALARY` - SALARY +// * `REIMBURSEMENT` - REIMBURSEMENT +// * `OVERTIME` - OVERTIME +// * `BONUS` - BONUS +type EarningTypeEnum string + +const ( + EarningTypeEnumSalary EarningTypeEnum = "SALARY" + EarningTypeEnumReimbursement EarningTypeEnum = "REIMBURSEMENT" + EarningTypeEnumOvertime EarningTypeEnum = "OVERTIME" + EarningTypeEnumBonus EarningTypeEnum = "BONUS" +) + +func NewEarningTypeEnumFromString(s string) (EarningTypeEnum, error) { + switch s { + case "SALARY": + return EarningTypeEnumSalary, nil + case "REIMBURSEMENT": + return EarningTypeEnumReimbursement, nil + case "OVERTIME": + return EarningTypeEnumOvertime, nil + case "BONUS": + return EarningTypeEnumBonus, nil + } + var t EarningTypeEnum return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (e EmployeePayrollRunsRetrieveRequestExpand) Ptr() *EmployeePayrollRunsRetrieveRequestExpand { +func (e EarningTypeEnum) Ptr() *EarningTypeEnum { return &e } + +// # The EmployeePayrollRun Object +// ### Description +// The `EmployeePayrollRun` object is used to represent an employee's pay statement for a specific payroll run. +// +// ### Usage Example +// Fetch from the `LIST EmployeePayrollRun` endpoint and filter by `ID` to show all employee payroll runs. +type EmployeePayrollRun struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The employee whose payroll is being run. + Employee *EmployeePayrollRunEmployee `json:"employee,omitempty" url:"employee,omitempty"` + // The payroll being run. + PayrollRun *EmployeePayrollRunPayrollRun `json:"payroll_run,omitempty" url:"payroll_run,omitempty"` + // The total earnings throughout a given period for an employee before any deductions are made. + GrossPay *float64 `json:"gross_pay,omitempty" url:"gross_pay,omitempty"` + // The take-home pay throughout a given period for an employee after deductions are made. + NetPay *float64 `json:"net_pay,omitempty" url:"net_pay,omitempty"` + // The day and time the payroll run started. + StartDate *time.Time `json:"start_date,omitempty" url:"start_date,omitempty"` + // The day and time the payroll run ended. + EndDate *time.Time `json:"end_date,omitempty" url:"end_date,omitempty"` + // The day and time the payroll run was checked. + CheckDate *time.Time `json:"check_date,omitempty" url:"check_date,omitempty"` + Earnings []*Earning `json:"earnings,omitempty" url:"earnings,omitempty"` + Deductions []*Deduction `json:"deductions,omitempty" url:"deductions,omitempty"` + Taxes []*Tax `json:"taxes,omitempty" url:"taxes,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (e *EmployeePayrollRun) GetId() *string { + if e == nil { + return nil + } + return e.Id +} + +func (e *EmployeePayrollRun) GetRemoteId() *string { + if e == nil { + return nil + } + return e.RemoteId +} + +func (e *EmployeePayrollRun) GetCreatedAt() *time.Time { + if e == nil { + return nil + } + return e.CreatedAt +} + +func (e *EmployeePayrollRun) GetModifiedAt() *time.Time { + if e == nil { + return nil + } + return e.ModifiedAt +} + +func (e *EmployeePayrollRun) GetEmployee() *EmployeePayrollRunEmployee { + if e == nil { + return nil + } + return e.Employee +} + +func (e *EmployeePayrollRun) GetPayrollRun() *EmployeePayrollRunPayrollRun { + if e == nil { + return nil + } + return e.PayrollRun +} + +func (e *EmployeePayrollRun) GetGrossPay() *float64 { + if e == nil { + return nil + } + return e.GrossPay +} + +func (e *EmployeePayrollRun) GetNetPay() *float64 { + if e == nil { + return nil + } + return e.NetPay +} + +func (e *EmployeePayrollRun) GetStartDate() *time.Time { + if e == nil { + return nil + } + return e.StartDate +} + +func (e *EmployeePayrollRun) GetEndDate() *time.Time { + if e == nil { + return nil + } + return e.EndDate +} + +func (e *EmployeePayrollRun) GetCheckDate() *time.Time { + if e == nil { + return nil + } + return e.CheckDate +} + +func (e *EmployeePayrollRun) GetEarnings() []*Earning { + if e == nil { + return nil + } + return e.Earnings +} + +func (e *EmployeePayrollRun) GetDeductions() []*Deduction { + if e == nil { + return nil + } + return e.Deductions +} + +func (e *EmployeePayrollRun) GetTaxes() []*Tax { + if e == nil { + return nil + } + return e.Taxes +} + +func (e *EmployeePayrollRun) GetRemoteWasDeleted() *bool { + if e == nil { + return nil + } + return e.RemoteWasDeleted +} + +func (e *EmployeePayrollRun) GetFieldMappings() map[string]interface{} { + if e == nil { + return nil + } + return e.FieldMappings +} + +func (e *EmployeePayrollRun) GetRemoteData() []*RemoteData { + if e == nil { + return nil + } + return e.RemoteData +} + +func (e *EmployeePayrollRun) GetExtraProperties() map[string]interface{} { + return e.extraProperties +} + +func (e *EmployeePayrollRun) UnmarshalJSON(data []byte) error { + type embed EmployeePayrollRun + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + StartDate *internal.DateTime `json:"start_date,omitempty"` + EndDate *internal.DateTime `json:"end_date,omitempty"` + CheckDate *internal.DateTime `json:"check_date,omitempty"` + }{ + embed: embed(*e), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *e = EmployeePayrollRun(unmarshaler.embed) + e.CreatedAt = unmarshaler.CreatedAt.TimePtr() + e.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + e.StartDate = unmarshaler.StartDate.TimePtr() + e.EndDate = unmarshaler.EndDate.TimePtr() + e.CheckDate = unmarshaler.CheckDate.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *e) + if err != nil { + return err + } + e.extraProperties = extraProperties + e.rawJSON = json.RawMessage(data) + return nil +} + +func (e *EmployeePayrollRun) MarshalJSON() ([]byte, error) { + type embed EmployeePayrollRun + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + StartDate *internal.DateTime `json:"start_date,omitempty"` + EndDate *internal.DateTime `json:"end_date,omitempty"` + CheckDate *internal.DateTime `json:"check_date,omitempty"` + }{ + embed: embed(*e), + CreatedAt: internal.NewOptionalDateTime(e.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(e.ModifiedAt), + StartDate: internal.NewOptionalDateTime(e.StartDate), + EndDate: internal.NewOptionalDateTime(e.EndDate), + CheckDate: internal.NewOptionalDateTime(e.CheckDate), + } + return json.Marshal(marshaler) +} + +func (e *EmployeePayrollRun) String() string { + if len(e.rawJSON) > 0 { + if value, err := internal.StringifyJSON(e.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(e); err == nil { + return value + } + return fmt.Sprintf("%#v", e) +} + +// The employee whose payroll is being run. +type EmployeePayrollRunEmployee struct { + String string + Employee *Employee + + typ string +} + +func (e *EmployeePayrollRunEmployee) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *EmployeePayrollRunEmployee) GetEmployee() *Employee { + if e == nil { + return nil + } + return e.Employee +} + +func (e *EmployeePayrollRunEmployee) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + valueEmployee := new(Employee) + if err := json.Unmarshal(data, &valueEmployee); err == nil { + e.typ = "Employee" + e.Employee = valueEmployee + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e EmployeePayrollRunEmployee) MarshalJSON() ([]byte, error) { + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + if e.typ == "Employee" || e.Employee != nil { + return json.Marshal(e.Employee) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type EmployeePayrollRunEmployeeVisitor interface { + VisitString(string) error + VisitEmployee(*Employee) error +} + +func (e *EmployeePayrollRunEmployee) Accept(visitor EmployeePayrollRunEmployeeVisitor) error { + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + if e.typ == "Employee" || e.Employee != nil { + return visitor.VisitEmployee(e.Employee) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +// The payroll being run. +type EmployeePayrollRunPayrollRun struct { + String string + PayrollRun *PayrollRun + + typ string +} + +func (e *EmployeePayrollRunPayrollRun) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *EmployeePayrollRunPayrollRun) GetPayrollRun() *PayrollRun { + if e == nil { + return nil + } + return e.PayrollRun +} + +func (e *EmployeePayrollRunPayrollRun) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + valuePayrollRun := new(PayrollRun) + if err := json.Unmarshal(data, &valuePayrollRun); err == nil { + e.typ = "PayrollRun" + e.PayrollRun = valuePayrollRun + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e EmployeePayrollRunPayrollRun) MarshalJSON() ([]byte, error) { + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + if e.typ == "PayrollRun" || e.PayrollRun != nil { + return json.Marshal(e.PayrollRun) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type EmployeePayrollRunPayrollRunVisitor interface { + VisitString(string) error + VisitPayrollRun(*PayrollRun) error +} + +func (e *EmployeePayrollRunPayrollRun) Accept(visitor EmployeePayrollRunPayrollRunVisitor) error { + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + if e.typ == "PayrollRun" || e.PayrollRun != nil { + return visitor.VisitPayrollRun(e.PayrollRun) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type PaginatedEmployeePayrollRunList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*EmployeePayrollRun `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedEmployeePayrollRunList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedEmployeePayrollRunList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedEmployeePayrollRunList) GetResults() []*EmployeePayrollRun { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedEmployeePayrollRunList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedEmployeePayrollRunList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedEmployeePayrollRunList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedEmployeePayrollRunList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedEmployeePayrollRunList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +// # The Tax Object +// ### Description +// The `Tax` object is used to represent an array of the tax deductions for a given employee's payroll run. +// +// ### Usage Example +// Fetch from the `LIST Taxes` endpoint and filter by `ID` to show all taxes. +type Tax struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + EmployeePayrollRun *string `json:"employee_payroll_run,omitempty" url:"employee_payroll_run,omitempty"` + // The tax's name. + Name *string `json:"name,omitempty" url:"name,omitempty"` + // The tax amount. + Amount *float64 `json:"amount,omitempty" url:"amount,omitempty"` + // Whether or not the employer is responsible for paying the tax. + EmployerTax *bool `json:"employer_tax,omitempty" url:"employer_tax,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (t *Tax) GetId() *string { + if t == nil { + return nil + } + return t.Id +} + +func (t *Tax) GetRemoteId() *string { + if t == nil { + return nil + } + return t.RemoteId +} + +func (t *Tax) GetCreatedAt() *time.Time { + if t == nil { + return nil + } + return t.CreatedAt +} + +func (t *Tax) GetModifiedAt() *time.Time { + if t == nil { + return nil + } + return t.ModifiedAt +} + +func (t *Tax) GetEmployeePayrollRun() *string { + if t == nil { + return nil + } + return t.EmployeePayrollRun +} + +func (t *Tax) GetName() *string { + if t == nil { + return nil + } + return t.Name +} + +func (t *Tax) GetAmount() *float64 { + if t == nil { + return nil + } + return t.Amount +} + +func (t *Tax) GetEmployerTax() *bool { + if t == nil { + return nil + } + return t.EmployerTax +} + +func (t *Tax) GetRemoteWasDeleted() *bool { + if t == nil { + return nil + } + return t.RemoteWasDeleted +} + +func (t *Tax) GetFieldMappings() map[string]interface{} { + if t == nil { + return nil + } + return t.FieldMappings +} + +func (t *Tax) GetRemoteData() []*RemoteData { + if t == nil { + return nil + } + return t.RemoteData +} + +func (t *Tax) GetExtraProperties() map[string]interface{} { + return t.extraProperties +} + +func (t *Tax) UnmarshalJSON(data []byte) error { + type embed Tax + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*t), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *t = Tax(unmarshaler.embed) + t.CreatedAt = unmarshaler.CreatedAt.TimePtr() + t.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *t) + if err != nil { + return err + } + t.extraProperties = extraProperties + t.rawJSON = json.RawMessage(data) + return nil +} + +func (t *Tax) MarshalJSON() ([]byte, error) { + type embed Tax + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*t), + CreatedAt: internal.NewOptionalDateTime(t.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(t.ModifiedAt), + } + return json.Marshal(marshaler) +} + +func (t *Tax) String() string { + if len(t.rawJSON) > 0 { + if value, err := internal.StringifyJSON(t.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(t); err == nil { + return value + } + return fmt.Sprintf("%#v", t) +} diff --git a/hris/employeepayrollruns/client.go b/hris/employeepayrollruns/client.go index 83c476e..244b58f 100644 --- a/hris/employeepayrollruns/client.go +++ b/hris/employeepayrollruns/client.go @@ -1,141 +1,137 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package employeepayrollruns import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - hris "github.com/merge-api/merge-go-client/hris" + core "github.com/merge-api/merge-go-client/v2/core" + hris "github.com/merge-api/merge-go-client/v2/hris" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `EmployeePayrollRun` objects. -func (c *Client) List(ctx context.Context, request *hris.EmployeePayrollRunsListRequest) (*hris.PaginatedEmployeePayrollRunList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "hris/v1/employee-payroll-runs" - - queryParams := make(url.Values) - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.EmployeeId != nil { - queryParams.Add("employee_id", fmt.Sprintf("%v", *request.EmployeeId)) - } - if request.EndedAfter != nil { - queryParams.Add("ended_after", fmt.Sprintf("%v", request.EndedAfter.Format(time.RFC3339))) - } - if request.EndedBefore != nil { - queryParams.Add("ended_before", fmt.Sprintf("%v", request.EndedBefore.Format(time.RFC3339))) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.PayrollRunId != nil { - queryParams.Add("payroll_run_id", fmt.Sprintf("%v", *request.PayrollRunId)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if request.StartedAfter != nil { - queryParams.Add("started_after", fmt.Sprintf("%v", request.StartedAfter.Format(time.RFC3339))) - } - if request.StartedBefore != nil { - queryParams.Add("started_before", fmt.Sprintf("%v", request.StartedBefore.Format(time.RFC3339))) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *hris.PaginatedEmployeePayrollRunList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *hris.EmployeePayrollRunsListRequest, + opts ...option.RequestOption, +) (*core.Page[*hris.EmployeePayrollRun], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/hris/v1/employee-payroll-runs" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *hris.PaginatedEmployeePayrollRunList) *internal.PageResponse[*string, *hris.EmployeePayrollRun] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *hris.EmployeePayrollRun]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Returns an `EmployeePayrollRun` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *hris.EmployeePayrollRunsRetrieveRequest) (*hris.EmployeePayrollRun, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"hris/v1/employee-payroll-runs/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *hris.EmployeePayrollRunsRetrieveRequest, + opts ...option.RequestOption, +) (*hris.EmployeePayrollRun, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/hris/v1/employee-payroll-runs/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *hris.EmployeePayrollRun if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/hris/employees.go b/hris/employees.go index b89be4c..12c615d 100644 --- a/hris/employees.go +++ b/hris/employees.go @@ -1,110 +1,108 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package hris import ( json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type EmployeeEndpointRequest struct { // Whether to include debug fields (such as log file links) in the response. - IsDebugMode *bool `json:"-"` + IsDebugMode *bool `json:"-" url:"is_debug_mode,omitempty"` // Whether or not third-party updates should be run asynchronously. - RunAsync *bool `json:"-"` - Model *EmployeeRequest `json:"model,omitempty"` -} - -type IgnoreCommonModelRequest struct { - Reason *IgnoreCommonModelRequestReason `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` + RunAsync *bool `json:"-" url:"run_async,omitempty"` + Model *EmployeeRequest `json:"model,omitempty" url:"-"` } type EmployeesListRequest struct { // If provided, will only return employees for this company. - CompanyId *string `json:"-"` + CompanyId *string `json:"-" url:"company_id,omitempty"` // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // If provided, will only return employees with this display name. - DisplayFullName *string `json:"-"` + DisplayFullName *string `json:"-" url:"display_full_name,omitempty"` // If provided, will only return employees with this employment status. // - // - `ACTIVE` - ACTIVE - // - `PENDING` - PENDING - // - `INACTIVE` - INACTIVE - EmploymentStatus *EmployeesListRequestEmploymentStatus `json:"-"` + // * `ACTIVE` - ACTIVE + // * `PENDING` - PENDING + // * `INACTIVE` - INACTIVE + EmploymentStatus *EmployeesListRequestEmploymentStatus `json:"-" url:"employment_status,omitempty"` // If provided, will only return employees that have an employment of the specified employment_type. - EmploymentType *string `json:"-"` + EmploymentType *string `json:"-" url:"employment_type,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *EmployeesListRequestExpand `json:"-"` + Expand []*EmployeesListRequestExpandItem `json:"-" url:"expand,omitempty"` // If provided, will only return employees with this first name. - FirstName *string `json:"-"` + FirstName *string `json:"-" url:"first_name,omitempty"` // If provided, will only return employees matching the group ids; multiple groups can be separated by commas. - Groups *string `json:"-"` + Groups *string `json:"-" url:"groups,omitempty"` // If provided, will only return employees for this home location. - HomeLocationId *string `json:"-"` + HomeLocationId *string `json:"-" url:"home_location_id,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include sensitive fields (such as social security numbers) in the response. - IncludeSensitiveFields *bool `json:"-"` + IncludeSensitiveFields *bool `json:"-" url:"include_sensitive_fields,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, will only return employees that have an employment of the specified job_title. - JobTitle *string `json:"-"` + JobTitle *string `json:"-" url:"job_title,omitempty"` // If provided, will only return employees with this last name. - LastName *string `json:"-"` + LastName *string `json:"-" url:"last_name,omitempty"` // If provided, will only return employees for this manager. - ManagerId *string `json:"-"` + ManagerId *string `json:"-" url:"manager_id,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // If provided, will only return employees for this pay group - PayGroupId *string `json:"-"` + PayGroupId *string `json:"-" url:"pay_group_id,omitempty"` // If provided, will only return Employees with this personal email - PersonalEmail *string `json:"-"` + PersonalEmail *string `json:"-" url:"personal_email,omitempty"` // Deprecated. Use show_enum_origins. - RemoteFields *EmployeesListRequestRemoteFields `json:"-"` + RemoteFields *EmployeesListRequestRemoteFields `json:"-" url:"remote_fields,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` // 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) - ShowEnumOrigins *EmployeesListRequestShowEnumOrigins `json:"-"` + ShowEnumOrigins *EmployeesListRequestShowEnumOrigins `json:"-" url:"show_enum_origins,omitempty"` // If provided, will only return employees that started after this datetime. - StartedAfter *time.Time `json:"-"` + StartedAfter *time.Time `json:"-" url:"started_after,omitempty"` // If provided, will only return employees that started before this datetime. - StartedBefore *time.Time `json:"-"` + StartedBefore *time.Time `json:"-" url:"started_before,omitempty"` // If provided, will only return employees for this team. - TeamId *string `json:"-"` + TeamId *string `json:"-" url:"team_id,omitempty"` // If provided, will only return employees that were terminated after this datetime. - TerminatedAfter *time.Time `json:"-"` + TerminatedAfter *time.Time `json:"-" url:"terminated_after,omitempty"` // If provided, will only return employees that were terminated before this datetime. - TerminatedBefore *time.Time `json:"-"` + TerminatedBefore *time.Time `json:"-" url:"terminated_before,omitempty"` // If provided, will only return Employees with this work email - WorkEmail *string `json:"-"` + WorkEmail *string `json:"-" url:"work_email,omitempty"` // If provided, will only return employees for this location. - WorkLocationId *string `json:"-"` + WorkLocationId *string `json:"-" url:"work_location_id,omitempty"` } type EmployeesRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *EmployeesRetrieveRequestExpand `json:"-"` + Expand []*EmployeesRetrieveRequestExpandItem `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include sensitive fields (such as social security numbers) in the response. - IncludeSensitiveFields *bool `json:"-"` + IncludeSensitiveFields *bool `json:"-" url:"include_sensitive_fields,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // Deprecated. Use show_enum_origins. - RemoteFields *EmployeesRetrieveRequestRemoteFields `json:"-"` + RemoteFields *EmployeesRetrieveRequestRemoteFields `json:"-" url:"remote_fields,omitempty"` // 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) - ShowEnumOrigins *EmployeesRetrieveRequestShowEnumOrigins `json:"-"` + ShowEnumOrigins *EmployeesRetrieveRequestShowEnumOrigins `json:"-" url:"show_enum_origins,omitempty"` } type EmployeesListRequestEmploymentStatus string @@ -132,784 +130,43 @@ func (e EmployeesListRequestEmploymentStatus) Ptr() *EmployeesListRequestEmploym return &e } -type EmployeesListRequestExpand string +type EmployeesListRequestExpandItem string const ( - EmployeesListRequestExpandCompany EmployeesListRequestExpand = "company" - EmployeesListRequestExpandCompanyPayGroup EmployeesListRequestExpand = "company,pay_group" - EmployeesListRequestExpandEmployments EmployeesListRequestExpand = "employments" - EmployeesListRequestExpandEmploymentsCompany EmployeesListRequestExpand = "employments,company" - EmployeesListRequestExpandEmploymentsCompanyPayGroup EmployeesListRequestExpand = "employments,company,pay_group" - EmployeesListRequestExpandEmploymentsGroups EmployeesListRequestExpand = "employments,groups" - EmployeesListRequestExpandEmploymentsGroupsCompany EmployeesListRequestExpand = "employments,groups,company" - EmployeesListRequestExpandEmploymentsGroupsCompanyPayGroup EmployeesListRequestExpand = "employments,groups,company,pay_group" - EmployeesListRequestExpandEmploymentsGroupsHomeLocation EmployeesListRequestExpand = "employments,groups,home_location" - EmployeesListRequestExpandEmploymentsGroupsHomeLocationCompany EmployeesListRequestExpand = "employments,groups,home_location,company" - EmployeesListRequestExpandEmploymentsGroupsHomeLocationCompanyPayGroup EmployeesListRequestExpand = "employments,groups,home_location,company,pay_group" - EmployeesListRequestExpandEmploymentsGroupsHomeLocationManager EmployeesListRequestExpand = "employments,groups,home_location,manager" - EmployeesListRequestExpandEmploymentsGroupsHomeLocationManagerCompany EmployeesListRequestExpand = "employments,groups,home_location,manager,company" - EmployeesListRequestExpandEmploymentsGroupsHomeLocationManagerCompanyPayGroup EmployeesListRequestExpand = "employments,groups,home_location,manager,company,pay_group" - EmployeesListRequestExpandEmploymentsGroupsHomeLocationManagerPayGroup EmployeesListRequestExpand = "employments,groups,home_location,manager,pay_group" - EmployeesListRequestExpandEmploymentsGroupsHomeLocationManagerTeam EmployeesListRequestExpand = "employments,groups,home_location,manager,team" - EmployeesListRequestExpandEmploymentsGroupsHomeLocationManagerTeamCompany EmployeesListRequestExpand = "employments,groups,home_location,manager,team,company" - EmployeesListRequestExpandEmploymentsGroupsHomeLocationManagerTeamCompanyPayGroup EmployeesListRequestExpand = "employments,groups,home_location,manager,team,company,pay_group" - EmployeesListRequestExpandEmploymentsGroupsHomeLocationManagerTeamPayGroup EmployeesListRequestExpand = "employments,groups,home_location,manager,team,pay_group" - EmployeesListRequestExpandEmploymentsGroupsHomeLocationPayGroup EmployeesListRequestExpand = "employments,groups,home_location,pay_group" - EmployeesListRequestExpandEmploymentsGroupsHomeLocationTeam EmployeesListRequestExpand = "employments,groups,home_location,team" - EmployeesListRequestExpandEmploymentsGroupsHomeLocationTeamCompany EmployeesListRequestExpand = "employments,groups,home_location,team,company" - EmployeesListRequestExpandEmploymentsGroupsHomeLocationTeamCompanyPayGroup EmployeesListRequestExpand = "employments,groups,home_location,team,company,pay_group" - EmployeesListRequestExpandEmploymentsGroupsHomeLocationTeamPayGroup EmployeesListRequestExpand = "employments,groups,home_location,team,pay_group" - EmployeesListRequestExpandEmploymentsGroupsHomeLocationWorkLocation EmployeesListRequestExpand = "employments,groups,home_location,work_location" - EmployeesListRequestExpandEmploymentsGroupsHomeLocationWorkLocationCompany EmployeesListRequestExpand = "employments,groups,home_location,work_location,company" - EmployeesListRequestExpandEmploymentsGroupsHomeLocationWorkLocationCompanyPayGroup EmployeesListRequestExpand = "employments,groups,home_location,work_location,company,pay_group" - EmployeesListRequestExpandEmploymentsGroupsHomeLocationWorkLocationManager EmployeesListRequestExpand = "employments,groups,home_location,work_location,manager" - EmployeesListRequestExpandEmploymentsGroupsHomeLocationWorkLocationManagerCompany EmployeesListRequestExpand = "employments,groups,home_location,work_location,manager,company" - EmployeesListRequestExpandEmploymentsGroupsHomeLocationWorkLocationManagerCompanyPayGroup EmployeesListRequestExpand = "employments,groups,home_location,work_location,manager,company,pay_group" - EmployeesListRequestExpandEmploymentsGroupsHomeLocationWorkLocationManagerPayGroup EmployeesListRequestExpand = "employments,groups,home_location,work_location,manager,pay_group" - EmployeesListRequestExpandEmploymentsGroupsHomeLocationWorkLocationManagerTeam EmployeesListRequestExpand = "employments,groups,home_location,work_location,manager,team" - EmployeesListRequestExpandEmploymentsGroupsHomeLocationWorkLocationManagerTeamCompany EmployeesListRequestExpand = "employments,groups,home_location,work_location,manager,team,company" - EmployeesListRequestExpandEmploymentsGroupsHomeLocationWorkLocationManagerTeamCompanyPayGroup EmployeesListRequestExpand = "employments,groups,home_location,work_location,manager,team,company,pay_group" - EmployeesListRequestExpandEmploymentsGroupsHomeLocationWorkLocationManagerTeamPayGroup EmployeesListRequestExpand = "employments,groups,home_location,work_location,manager,team,pay_group" - EmployeesListRequestExpandEmploymentsGroupsHomeLocationWorkLocationPayGroup EmployeesListRequestExpand = "employments,groups,home_location,work_location,pay_group" - EmployeesListRequestExpandEmploymentsGroupsHomeLocationWorkLocationTeam EmployeesListRequestExpand = "employments,groups,home_location,work_location,team" - EmployeesListRequestExpandEmploymentsGroupsHomeLocationWorkLocationTeamCompany EmployeesListRequestExpand = "employments,groups,home_location,work_location,team,company" - EmployeesListRequestExpandEmploymentsGroupsHomeLocationWorkLocationTeamCompanyPayGroup EmployeesListRequestExpand = "employments,groups,home_location,work_location,team,company,pay_group" - EmployeesListRequestExpandEmploymentsGroupsHomeLocationWorkLocationTeamPayGroup EmployeesListRequestExpand = "employments,groups,home_location,work_location,team,pay_group" - EmployeesListRequestExpandEmploymentsGroupsManager EmployeesListRequestExpand = "employments,groups,manager" - EmployeesListRequestExpandEmploymentsGroupsManagerCompany EmployeesListRequestExpand = "employments,groups,manager,company" - EmployeesListRequestExpandEmploymentsGroupsManagerCompanyPayGroup EmployeesListRequestExpand = "employments,groups,manager,company,pay_group" - EmployeesListRequestExpandEmploymentsGroupsManagerPayGroup EmployeesListRequestExpand = "employments,groups,manager,pay_group" - EmployeesListRequestExpandEmploymentsGroupsManagerTeam EmployeesListRequestExpand = "employments,groups,manager,team" - EmployeesListRequestExpandEmploymentsGroupsManagerTeamCompany EmployeesListRequestExpand = "employments,groups,manager,team,company" - EmployeesListRequestExpandEmploymentsGroupsManagerTeamCompanyPayGroup EmployeesListRequestExpand = "employments,groups,manager,team,company,pay_group" - EmployeesListRequestExpandEmploymentsGroupsManagerTeamPayGroup EmployeesListRequestExpand = "employments,groups,manager,team,pay_group" - EmployeesListRequestExpandEmploymentsGroupsPayGroup EmployeesListRequestExpand = "employments,groups,pay_group" - EmployeesListRequestExpandEmploymentsGroupsTeam EmployeesListRequestExpand = "employments,groups,team" - EmployeesListRequestExpandEmploymentsGroupsTeamCompany EmployeesListRequestExpand = "employments,groups,team,company" - EmployeesListRequestExpandEmploymentsGroupsTeamCompanyPayGroup EmployeesListRequestExpand = "employments,groups,team,company,pay_group" - EmployeesListRequestExpandEmploymentsGroupsTeamPayGroup EmployeesListRequestExpand = "employments,groups,team,pay_group" - EmployeesListRequestExpandEmploymentsGroupsWorkLocation EmployeesListRequestExpand = "employments,groups,work_location" - EmployeesListRequestExpandEmploymentsGroupsWorkLocationCompany EmployeesListRequestExpand = "employments,groups,work_location,company" - EmployeesListRequestExpandEmploymentsGroupsWorkLocationCompanyPayGroup EmployeesListRequestExpand = "employments,groups,work_location,company,pay_group" - EmployeesListRequestExpandEmploymentsGroupsWorkLocationManager EmployeesListRequestExpand = "employments,groups,work_location,manager" - EmployeesListRequestExpandEmploymentsGroupsWorkLocationManagerCompany EmployeesListRequestExpand = "employments,groups,work_location,manager,company" - EmployeesListRequestExpandEmploymentsGroupsWorkLocationManagerCompanyPayGroup EmployeesListRequestExpand = "employments,groups,work_location,manager,company,pay_group" - EmployeesListRequestExpandEmploymentsGroupsWorkLocationManagerPayGroup EmployeesListRequestExpand = "employments,groups,work_location,manager,pay_group" - EmployeesListRequestExpandEmploymentsGroupsWorkLocationManagerTeam EmployeesListRequestExpand = "employments,groups,work_location,manager,team" - EmployeesListRequestExpandEmploymentsGroupsWorkLocationManagerTeamCompany EmployeesListRequestExpand = "employments,groups,work_location,manager,team,company" - EmployeesListRequestExpandEmploymentsGroupsWorkLocationManagerTeamCompanyPayGroup EmployeesListRequestExpand = "employments,groups,work_location,manager,team,company,pay_group" - EmployeesListRequestExpandEmploymentsGroupsWorkLocationManagerTeamPayGroup EmployeesListRequestExpand = "employments,groups,work_location,manager,team,pay_group" - EmployeesListRequestExpandEmploymentsGroupsWorkLocationPayGroup EmployeesListRequestExpand = "employments,groups,work_location,pay_group" - EmployeesListRequestExpandEmploymentsGroupsWorkLocationTeam EmployeesListRequestExpand = "employments,groups,work_location,team" - EmployeesListRequestExpandEmploymentsGroupsWorkLocationTeamCompany EmployeesListRequestExpand = "employments,groups,work_location,team,company" - EmployeesListRequestExpandEmploymentsGroupsWorkLocationTeamCompanyPayGroup EmployeesListRequestExpand = "employments,groups,work_location,team,company,pay_group" - EmployeesListRequestExpandEmploymentsGroupsWorkLocationTeamPayGroup EmployeesListRequestExpand = "employments,groups,work_location,team,pay_group" - EmployeesListRequestExpandEmploymentsHomeLocation EmployeesListRequestExpand = "employments,home_location" - EmployeesListRequestExpandEmploymentsHomeLocationCompany EmployeesListRequestExpand = "employments,home_location,company" - EmployeesListRequestExpandEmploymentsHomeLocationCompanyPayGroup EmployeesListRequestExpand = "employments,home_location,company,pay_group" - EmployeesListRequestExpandEmploymentsHomeLocationManager EmployeesListRequestExpand = "employments,home_location,manager" - EmployeesListRequestExpandEmploymentsHomeLocationManagerCompany EmployeesListRequestExpand = "employments,home_location,manager,company" - EmployeesListRequestExpandEmploymentsHomeLocationManagerCompanyPayGroup EmployeesListRequestExpand = "employments,home_location,manager,company,pay_group" - EmployeesListRequestExpandEmploymentsHomeLocationManagerPayGroup EmployeesListRequestExpand = "employments,home_location,manager,pay_group" - EmployeesListRequestExpandEmploymentsHomeLocationManagerTeam EmployeesListRequestExpand = "employments,home_location,manager,team" - EmployeesListRequestExpandEmploymentsHomeLocationManagerTeamCompany EmployeesListRequestExpand = "employments,home_location,manager,team,company" - EmployeesListRequestExpandEmploymentsHomeLocationManagerTeamCompanyPayGroup EmployeesListRequestExpand = "employments,home_location,manager,team,company,pay_group" - EmployeesListRequestExpandEmploymentsHomeLocationManagerTeamPayGroup EmployeesListRequestExpand = "employments,home_location,manager,team,pay_group" - EmployeesListRequestExpandEmploymentsHomeLocationPayGroup EmployeesListRequestExpand = "employments,home_location,pay_group" - EmployeesListRequestExpandEmploymentsHomeLocationTeam EmployeesListRequestExpand = "employments,home_location,team" - EmployeesListRequestExpandEmploymentsHomeLocationTeamCompany EmployeesListRequestExpand = "employments,home_location,team,company" - EmployeesListRequestExpandEmploymentsHomeLocationTeamCompanyPayGroup EmployeesListRequestExpand = "employments,home_location,team,company,pay_group" - EmployeesListRequestExpandEmploymentsHomeLocationTeamPayGroup EmployeesListRequestExpand = "employments,home_location,team,pay_group" - EmployeesListRequestExpandEmploymentsHomeLocationWorkLocation EmployeesListRequestExpand = "employments,home_location,work_location" - EmployeesListRequestExpandEmploymentsHomeLocationWorkLocationCompany EmployeesListRequestExpand = "employments,home_location,work_location,company" - EmployeesListRequestExpandEmploymentsHomeLocationWorkLocationCompanyPayGroup EmployeesListRequestExpand = "employments,home_location,work_location,company,pay_group" - EmployeesListRequestExpandEmploymentsHomeLocationWorkLocationManager EmployeesListRequestExpand = "employments,home_location,work_location,manager" - EmployeesListRequestExpandEmploymentsHomeLocationWorkLocationManagerCompany EmployeesListRequestExpand = "employments,home_location,work_location,manager,company" - EmployeesListRequestExpandEmploymentsHomeLocationWorkLocationManagerCompanyPayGroup EmployeesListRequestExpand = "employments,home_location,work_location,manager,company,pay_group" - EmployeesListRequestExpandEmploymentsHomeLocationWorkLocationManagerPayGroup EmployeesListRequestExpand = "employments,home_location,work_location,manager,pay_group" - EmployeesListRequestExpandEmploymentsHomeLocationWorkLocationManagerTeam EmployeesListRequestExpand = "employments,home_location,work_location,manager,team" - EmployeesListRequestExpandEmploymentsHomeLocationWorkLocationManagerTeamCompany EmployeesListRequestExpand = "employments,home_location,work_location,manager,team,company" - EmployeesListRequestExpandEmploymentsHomeLocationWorkLocationManagerTeamCompanyPayGroup EmployeesListRequestExpand = "employments,home_location,work_location,manager,team,company,pay_group" - EmployeesListRequestExpandEmploymentsHomeLocationWorkLocationManagerTeamPayGroup EmployeesListRequestExpand = "employments,home_location,work_location,manager,team,pay_group" - EmployeesListRequestExpandEmploymentsHomeLocationWorkLocationPayGroup EmployeesListRequestExpand = "employments,home_location,work_location,pay_group" - EmployeesListRequestExpandEmploymentsHomeLocationWorkLocationTeam EmployeesListRequestExpand = "employments,home_location,work_location,team" - EmployeesListRequestExpandEmploymentsHomeLocationWorkLocationTeamCompany EmployeesListRequestExpand = "employments,home_location,work_location,team,company" - EmployeesListRequestExpandEmploymentsHomeLocationWorkLocationTeamCompanyPayGroup EmployeesListRequestExpand = "employments,home_location,work_location,team,company,pay_group" - EmployeesListRequestExpandEmploymentsHomeLocationWorkLocationTeamPayGroup EmployeesListRequestExpand = "employments,home_location,work_location,team,pay_group" - EmployeesListRequestExpandEmploymentsManager EmployeesListRequestExpand = "employments,manager" - EmployeesListRequestExpandEmploymentsManagerCompany EmployeesListRequestExpand = "employments,manager,company" - EmployeesListRequestExpandEmploymentsManagerCompanyPayGroup EmployeesListRequestExpand = "employments,manager,company,pay_group" - EmployeesListRequestExpandEmploymentsManagerPayGroup EmployeesListRequestExpand = "employments,manager,pay_group" - EmployeesListRequestExpandEmploymentsManagerTeam EmployeesListRequestExpand = "employments,manager,team" - EmployeesListRequestExpandEmploymentsManagerTeamCompany EmployeesListRequestExpand = "employments,manager,team,company" - EmployeesListRequestExpandEmploymentsManagerTeamCompanyPayGroup EmployeesListRequestExpand = "employments,manager,team,company,pay_group" - EmployeesListRequestExpandEmploymentsManagerTeamPayGroup EmployeesListRequestExpand = "employments,manager,team,pay_group" - EmployeesListRequestExpandEmploymentsPayGroup EmployeesListRequestExpand = "employments,pay_group" - EmployeesListRequestExpandEmploymentsTeam EmployeesListRequestExpand = "employments,team" - EmployeesListRequestExpandEmploymentsTeamCompany EmployeesListRequestExpand = "employments,team,company" - EmployeesListRequestExpandEmploymentsTeamCompanyPayGroup EmployeesListRequestExpand = "employments,team,company,pay_group" - EmployeesListRequestExpandEmploymentsTeamPayGroup EmployeesListRequestExpand = "employments,team,pay_group" - EmployeesListRequestExpandEmploymentsWorkLocation EmployeesListRequestExpand = "employments,work_location" - EmployeesListRequestExpandEmploymentsWorkLocationCompany EmployeesListRequestExpand = "employments,work_location,company" - EmployeesListRequestExpandEmploymentsWorkLocationCompanyPayGroup EmployeesListRequestExpand = "employments,work_location,company,pay_group" - EmployeesListRequestExpandEmploymentsWorkLocationManager EmployeesListRequestExpand = "employments,work_location,manager" - EmployeesListRequestExpandEmploymentsWorkLocationManagerCompany EmployeesListRequestExpand = "employments,work_location,manager,company" - EmployeesListRequestExpandEmploymentsWorkLocationManagerCompanyPayGroup EmployeesListRequestExpand = "employments,work_location,manager,company,pay_group" - EmployeesListRequestExpandEmploymentsWorkLocationManagerPayGroup EmployeesListRequestExpand = "employments,work_location,manager,pay_group" - EmployeesListRequestExpandEmploymentsWorkLocationManagerTeam EmployeesListRequestExpand = "employments,work_location,manager,team" - EmployeesListRequestExpandEmploymentsWorkLocationManagerTeamCompany EmployeesListRequestExpand = "employments,work_location,manager,team,company" - EmployeesListRequestExpandEmploymentsWorkLocationManagerTeamCompanyPayGroup EmployeesListRequestExpand = "employments,work_location,manager,team,company,pay_group" - EmployeesListRequestExpandEmploymentsWorkLocationManagerTeamPayGroup EmployeesListRequestExpand = "employments,work_location,manager,team,pay_group" - EmployeesListRequestExpandEmploymentsWorkLocationPayGroup EmployeesListRequestExpand = "employments,work_location,pay_group" - EmployeesListRequestExpandEmploymentsWorkLocationTeam EmployeesListRequestExpand = "employments,work_location,team" - EmployeesListRequestExpandEmploymentsWorkLocationTeamCompany EmployeesListRequestExpand = "employments,work_location,team,company" - EmployeesListRequestExpandEmploymentsWorkLocationTeamCompanyPayGroup EmployeesListRequestExpand = "employments,work_location,team,company,pay_group" - EmployeesListRequestExpandEmploymentsWorkLocationTeamPayGroup EmployeesListRequestExpand = "employments,work_location,team,pay_group" - EmployeesListRequestExpandGroups EmployeesListRequestExpand = "groups" - EmployeesListRequestExpandGroupsCompany EmployeesListRequestExpand = "groups,company" - EmployeesListRequestExpandGroupsCompanyPayGroup EmployeesListRequestExpand = "groups,company,pay_group" - EmployeesListRequestExpandGroupsHomeLocation EmployeesListRequestExpand = "groups,home_location" - EmployeesListRequestExpandGroupsHomeLocationCompany EmployeesListRequestExpand = "groups,home_location,company" - EmployeesListRequestExpandGroupsHomeLocationCompanyPayGroup EmployeesListRequestExpand = "groups,home_location,company,pay_group" - EmployeesListRequestExpandGroupsHomeLocationManager EmployeesListRequestExpand = "groups,home_location,manager" - EmployeesListRequestExpandGroupsHomeLocationManagerCompany EmployeesListRequestExpand = "groups,home_location,manager,company" - EmployeesListRequestExpandGroupsHomeLocationManagerCompanyPayGroup EmployeesListRequestExpand = "groups,home_location,manager,company,pay_group" - EmployeesListRequestExpandGroupsHomeLocationManagerPayGroup EmployeesListRequestExpand = "groups,home_location,manager,pay_group" - EmployeesListRequestExpandGroupsHomeLocationManagerTeam EmployeesListRequestExpand = "groups,home_location,manager,team" - EmployeesListRequestExpandGroupsHomeLocationManagerTeamCompany EmployeesListRequestExpand = "groups,home_location,manager,team,company" - EmployeesListRequestExpandGroupsHomeLocationManagerTeamCompanyPayGroup EmployeesListRequestExpand = "groups,home_location,manager,team,company,pay_group" - EmployeesListRequestExpandGroupsHomeLocationManagerTeamPayGroup EmployeesListRequestExpand = "groups,home_location,manager,team,pay_group" - EmployeesListRequestExpandGroupsHomeLocationPayGroup EmployeesListRequestExpand = "groups,home_location,pay_group" - EmployeesListRequestExpandGroupsHomeLocationTeam EmployeesListRequestExpand = "groups,home_location,team" - EmployeesListRequestExpandGroupsHomeLocationTeamCompany EmployeesListRequestExpand = "groups,home_location,team,company" - EmployeesListRequestExpandGroupsHomeLocationTeamCompanyPayGroup EmployeesListRequestExpand = "groups,home_location,team,company,pay_group" - EmployeesListRequestExpandGroupsHomeLocationTeamPayGroup EmployeesListRequestExpand = "groups,home_location,team,pay_group" - EmployeesListRequestExpandGroupsHomeLocationWorkLocation EmployeesListRequestExpand = "groups,home_location,work_location" - EmployeesListRequestExpandGroupsHomeLocationWorkLocationCompany EmployeesListRequestExpand = "groups,home_location,work_location,company" - EmployeesListRequestExpandGroupsHomeLocationWorkLocationCompanyPayGroup EmployeesListRequestExpand = "groups,home_location,work_location,company,pay_group" - EmployeesListRequestExpandGroupsHomeLocationWorkLocationManager EmployeesListRequestExpand = "groups,home_location,work_location,manager" - EmployeesListRequestExpandGroupsHomeLocationWorkLocationManagerCompany EmployeesListRequestExpand = "groups,home_location,work_location,manager,company" - EmployeesListRequestExpandGroupsHomeLocationWorkLocationManagerCompanyPayGroup EmployeesListRequestExpand = "groups,home_location,work_location,manager,company,pay_group" - EmployeesListRequestExpandGroupsHomeLocationWorkLocationManagerPayGroup EmployeesListRequestExpand = "groups,home_location,work_location,manager,pay_group" - EmployeesListRequestExpandGroupsHomeLocationWorkLocationManagerTeam EmployeesListRequestExpand = "groups,home_location,work_location,manager,team" - EmployeesListRequestExpandGroupsHomeLocationWorkLocationManagerTeamCompany EmployeesListRequestExpand = "groups,home_location,work_location,manager,team,company" - EmployeesListRequestExpandGroupsHomeLocationWorkLocationManagerTeamCompanyPayGroup EmployeesListRequestExpand = "groups,home_location,work_location,manager,team,company,pay_group" - EmployeesListRequestExpandGroupsHomeLocationWorkLocationManagerTeamPayGroup EmployeesListRequestExpand = "groups,home_location,work_location,manager,team,pay_group" - EmployeesListRequestExpandGroupsHomeLocationWorkLocationPayGroup EmployeesListRequestExpand = "groups,home_location,work_location,pay_group" - EmployeesListRequestExpandGroupsHomeLocationWorkLocationTeam EmployeesListRequestExpand = "groups,home_location,work_location,team" - EmployeesListRequestExpandGroupsHomeLocationWorkLocationTeamCompany EmployeesListRequestExpand = "groups,home_location,work_location,team,company" - EmployeesListRequestExpandGroupsHomeLocationWorkLocationTeamCompanyPayGroup EmployeesListRequestExpand = "groups,home_location,work_location,team,company,pay_group" - EmployeesListRequestExpandGroupsHomeLocationWorkLocationTeamPayGroup EmployeesListRequestExpand = "groups,home_location,work_location,team,pay_group" - EmployeesListRequestExpandGroupsManager EmployeesListRequestExpand = "groups,manager" - EmployeesListRequestExpandGroupsManagerCompany EmployeesListRequestExpand = "groups,manager,company" - EmployeesListRequestExpandGroupsManagerCompanyPayGroup EmployeesListRequestExpand = "groups,manager,company,pay_group" - EmployeesListRequestExpandGroupsManagerPayGroup EmployeesListRequestExpand = "groups,manager,pay_group" - EmployeesListRequestExpandGroupsManagerTeam EmployeesListRequestExpand = "groups,manager,team" - EmployeesListRequestExpandGroupsManagerTeamCompany EmployeesListRequestExpand = "groups,manager,team,company" - EmployeesListRequestExpandGroupsManagerTeamCompanyPayGroup EmployeesListRequestExpand = "groups,manager,team,company,pay_group" - EmployeesListRequestExpandGroupsManagerTeamPayGroup EmployeesListRequestExpand = "groups,manager,team,pay_group" - EmployeesListRequestExpandGroupsPayGroup EmployeesListRequestExpand = "groups,pay_group" - EmployeesListRequestExpandGroupsTeam EmployeesListRequestExpand = "groups,team" - EmployeesListRequestExpandGroupsTeamCompany EmployeesListRequestExpand = "groups,team,company" - EmployeesListRequestExpandGroupsTeamCompanyPayGroup EmployeesListRequestExpand = "groups,team,company,pay_group" - EmployeesListRequestExpandGroupsTeamPayGroup EmployeesListRequestExpand = "groups,team,pay_group" - EmployeesListRequestExpandGroupsWorkLocation EmployeesListRequestExpand = "groups,work_location" - EmployeesListRequestExpandGroupsWorkLocationCompany EmployeesListRequestExpand = "groups,work_location,company" - EmployeesListRequestExpandGroupsWorkLocationCompanyPayGroup EmployeesListRequestExpand = "groups,work_location,company,pay_group" - EmployeesListRequestExpandGroupsWorkLocationManager EmployeesListRequestExpand = "groups,work_location,manager" - EmployeesListRequestExpandGroupsWorkLocationManagerCompany EmployeesListRequestExpand = "groups,work_location,manager,company" - EmployeesListRequestExpandGroupsWorkLocationManagerCompanyPayGroup EmployeesListRequestExpand = "groups,work_location,manager,company,pay_group" - EmployeesListRequestExpandGroupsWorkLocationManagerPayGroup EmployeesListRequestExpand = "groups,work_location,manager,pay_group" - EmployeesListRequestExpandGroupsWorkLocationManagerTeam EmployeesListRequestExpand = "groups,work_location,manager,team" - EmployeesListRequestExpandGroupsWorkLocationManagerTeamCompany EmployeesListRequestExpand = "groups,work_location,manager,team,company" - EmployeesListRequestExpandGroupsWorkLocationManagerTeamCompanyPayGroup EmployeesListRequestExpand = "groups,work_location,manager,team,company,pay_group" - EmployeesListRequestExpandGroupsWorkLocationManagerTeamPayGroup EmployeesListRequestExpand = "groups,work_location,manager,team,pay_group" - EmployeesListRequestExpandGroupsWorkLocationPayGroup EmployeesListRequestExpand = "groups,work_location,pay_group" - EmployeesListRequestExpandGroupsWorkLocationTeam EmployeesListRequestExpand = "groups,work_location,team" - EmployeesListRequestExpandGroupsWorkLocationTeamCompany EmployeesListRequestExpand = "groups,work_location,team,company" - EmployeesListRequestExpandGroupsWorkLocationTeamCompanyPayGroup EmployeesListRequestExpand = "groups,work_location,team,company,pay_group" - EmployeesListRequestExpandGroupsWorkLocationTeamPayGroup EmployeesListRequestExpand = "groups,work_location,team,pay_group" - EmployeesListRequestExpandHomeLocation EmployeesListRequestExpand = "home_location" - EmployeesListRequestExpandHomeLocationCompany EmployeesListRequestExpand = "home_location,company" - EmployeesListRequestExpandHomeLocationCompanyPayGroup EmployeesListRequestExpand = "home_location,company,pay_group" - EmployeesListRequestExpandHomeLocationManager EmployeesListRequestExpand = "home_location,manager" - EmployeesListRequestExpandHomeLocationManagerCompany EmployeesListRequestExpand = "home_location,manager,company" - EmployeesListRequestExpandHomeLocationManagerCompanyPayGroup EmployeesListRequestExpand = "home_location,manager,company,pay_group" - EmployeesListRequestExpandHomeLocationManagerPayGroup EmployeesListRequestExpand = "home_location,manager,pay_group" - EmployeesListRequestExpandHomeLocationManagerTeam EmployeesListRequestExpand = "home_location,manager,team" - EmployeesListRequestExpandHomeLocationManagerTeamCompany EmployeesListRequestExpand = "home_location,manager,team,company" - EmployeesListRequestExpandHomeLocationManagerTeamCompanyPayGroup EmployeesListRequestExpand = "home_location,manager,team,company,pay_group" - EmployeesListRequestExpandHomeLocationManagerTeamPayGroup EmployeesListRequestExpand = "home_location,manager,team,pay_group" - EmployeesListRequestExpandHomeLocationPayGroup EmployeesListRequestExpand = "home_location,pay_group" - EmployeesListRequestExpandHomeLocationTeam EmployeesListRequestExpand = "home_location,team" - EmployeesListRequestExpandHomeLocationTeamCompany EmployeesListRequestExpand = "home_location,team,company" - EmployeesListRequestExpandHomeLocationTeamCompanyPayGroup EmployeesListRequestExpand = "home_location,team,company,pay_group" - EmployeesListRequestExpandHomeLocationTeamPayGroup EmployeesListRequestExpand = "home_location,team,pay_group" - EmployeesListRequestExpandHomeLocationWorkLocation EmployeesListRequestExpand = "home_location,work_location" - EmployeesListRequestExpandHomeLocationWorkLocationCompany EmployeesListRequestExpand = "home_location,work_location,company" - EmployeesListRequestExpandHomeLocationWorkLocationCompanyPayGroup EmployeesListRequestExpand = "home_location,work_location,company,pay_group" - EmployeesListRequestExpandHomeLocationWorkLocationManager EmployeesListRequestExpand = "home_location,work_location,manager" - EmployeesListRequestExpandHomeLocationWorkLocationManagerCompany EmployeesListRequestExpand = "home_location,work_location,manager,company" - EmployeesListRequestExpandHomeLocationWorkLocationManagerCompanyPayGroup EmployeesListRequestExpand = "home_location,work_location,manager,company,pay_group" - EmployeesListRequestExpandHomeLocationWorkLocationManagerPayGroup EmployeesListRequestExpand = "home_location,work_location,manager,pay_group" - EmployeesListRequestExpandHomeLocationWorkLocationManagerTeam EmployeesListRequestExpand = "home_location,work_location,manager,team" - EmployeesListRequestExpandHomeLocationWorkLocationManagerTeamCompany EmployeesListRequestExpand = "home_location,work_location,manager,team,company" - EmployeesListRequestExpandHomeLocationWorkLocationManagerTeamCompanyPayGroup EmployeesListRequestExpand = "home_location,work_location,manager,team,company,pay_group" - EmployeesListRequestExpandHomeLocationWorkLocationManagerTeamPayGroup EmployeesListRequestExpand = "home_location,work_location,manager,team,pay_group" - EmployeesListRequestExpandHomeLocationWorkLocationPayGroup EmployeesListRequestExpand = "home_location,work_location,pay_group" - EmployeesListRequestExpandHomeLocationWorkLocationTeam EmployeesListRequestExpand = "home_location,work_location,team" - EmployeesListRequestExpandHomeLocationWorkLocationTeamCompany EmployeesListRequestExpand = "home_location,work_location,team,company" - EmployeesListRequestExpandHomeLocationWorkLocationTeamCompanyPayGroup EmployeesListRequestExpand = "home_location,work_location,team,company,pay_group" - EmployeesListRequestExpandHomeLocationWorkLocationTeamPayGroup EmployeesListRequestExpand = "home_location,work_location,team,pay_group" - EmployeesListRequestExpandManager EmployeesListRequestExpand = "manager" - EmployeesListRequestExpandManagerCompany EmployeesListRequestExpand = "manager,company" - EmployeesListRequestExpandManagerCompanyPayGroup EmployeesListRequestExpand = "manager,company,pay_group" - EmployeesListRequestExpandManagerPayGroup EmployeesListRequestExpand = "manager,pay_group" - EmployeesListRequestExpandManagerTeam EmployeesListRequestExpand = "manager,team" - EmployeesListRequestExpandManagerTeamCompany EmployeesListRequestExpand = "manager,team,company" - EmployeesListRequestExpandManagerTeamCompanyPayGroup EmployeesListRequestExpand = "manager,team,company,pay_group" - EmployeesListRequestExpandManagerTeamPayGroup EmployeesListRequestExpand = "manager,team,pay_group" - EmployeesListRequestExpandPayGroup EmployeesListRequestExpand = "pay_group" - EmployeesListRequestExpandTeam EmployeesListRequestExpand = "team" - EmployeesListRequestExpandTeamCompany EmployeesListRequestExpand = "team,company" - EmployeesListRequestExpandTeamCompanyPayGroup EmployeesListRequestExpand = "team,company,pay_group" - EmployeesListRequestExpandTeamPayGroup EmployeesListRequestExpand = "team,pay_group" - EmployeesListRequestExpandWorkLocation EmployeesListRequestExpand = "work_location" - EmployeesListRequestExpandWorkLocationCompany EmployeesListRequestExpand = "work_location,company" - EmployeesListRequestExpandWorkLocationCompanyPayGroup EmployeesListRequestExpand = "work_location,company,pay_group" - EmployeesListRequestExpandWorkLocationManager EmployeesListRequestExpand = "work_location,manager" - EmployeesListRequestExpandWorkLocationManagerCompany EmployeesListRequestExpand = "work_location,manager,company" - EmployeesListRequestExpandWorkLocationManagerCompanyPayGroup EmployeesListRequestExpand = "work_location,manager,company,pay_group" - EmployeesListRequestExpandWorkLocationManagerPayGroup EmployeesListRequestExpand = "work_location,manager,pay_group" - EmployeesListRequestExpandWorkLocationManagerTeam EmployeesListRequestExpand = "work_location,manager,team" - EmployeesListRequestExpandWorkLocationManagerTeamCompany EmployeesListRequestExpand = "work_location,manager,team,company" - EmployeesListRequestExpandWorkLocationManagerTeamCompanyPayGroup EmployeesListRequestExpand = "work_location,manager,team,company,pay_group" - EmployeesListRequestExpandWorkLocationManagerTeamPayGroup EmployeesListRequestExpand = "work_location,manager,team,pay_group" - EmployeesListRequestExpandWorkLocationPayGroup EmployeesListRequestExpand = "work_location,pay_group" - EmployeesListRequestExpandWorkLocationTeam EmployeesListRequestExpand = "work_location,team" - EmployeesListRequestExpandWorkLocationTeamCompany EmployeesListRequestExpand = "work_location,team,company" - EmployeesListRequestExpandWorkLocationTeamCompanyPayGroup EmployeesListRequestExpand = "work_location,team,company,pay_group" - EmployeesListRequestExpandWorkLocationTeamPayGroup EmployeesListRequestExpand = "work_location,team,pay_group" + EmployeesListRequestExpandItemCompany EmployeesListRequestExpandItem = "company" + EmployeesListRequestExpandItemEmployments EmployeesListRequestExpandItem = "employments" + EmployeesListRequestExpandItemGroups EmployeesListRequestExpandItem = "groups" + EmployeesListRequestExpandItemHomeLocation EmployeesListRequestExpandItem = "home_location" + EmployeesListRequestExpandItemManager EmployeesListRequestExpandItem = "manager" + EmployeesListRequestExpandItemPayGroup EmployeesListRequestExpandItem = "pay_group" + EmployeesListRequestExpandItemTeam EmployeesListRequestExpandItem = "team" + EmployeesListRequestExpandItemWorkLocation EmployeesListRequestExpandItem = "work_location" ) -func NewEmployeesListRequestExpandFromString(s string) (EmployeesListRequestExpand, error) { +func NewEmployeesListRequestExpandItemFromString(s string) (EmployeesListRequestExpandItem, error) { switch s { case "company": - return EmployeesListRequestExpandCompany, nil - case "company,pay_group": - return EmployeesListRequestExpandCompanyPayGroup, nil + return EmployeesListRequestExpandItemCompany, nil case "employments": - return EmployeesListRequestExpandEmployments, nil - case "employments,company": - return EmployeesListRequestExpandEmploymentsCompany, nil - case "employments,company,pay_group": - return EmployeesListRequestExpandEmploymentsCompanyPayGroup, nil - case "employments,groups": - return EmployeesListRequestExpandEmploymentsGroups, nil - case "employments,groups,company": - return EmployeesListRequestExpandEmploymentsGroupsCompany, nil - case "employments,groups,company,pay_group": - return EmployeesListRequestExpandEmploymentsGroupsCompanyPayGroup, nil - case "employments,groups,home_location": - return EmployeesListRequestExpandEmploymentsGroupsHomeLocation, nil - case "employments,groups,home_location,company": - return EmployeesListRequestExpandEmploymentsGroupsHomeLocationCompany, nil - case "employments,groups,home_location,company,pay_group": - return EmployeesListRequestExpandEmploymentsGroupsHomeLocationCompanyPayGroup, nil - case "employments,groups,home_location,manager": - return EmployeesListRequestExpandEmploymentsGroupsHomeLocationManager, nil - case "employments,groups,home_location,manager,company": - return EmployeesListRequestExpandEmploymentsGroupsHomeLocationManagerCompany, nil - case "employments,groups,home_location,manager,company,pay_group": - return EmployeesListRequestExpandEmploymentsGroupsHomeLocationManagerCompanyPayGroup, nil - case "employments,groups,home_location,manager,pay_group": - return EmployeesListRequestExpandEmploymentsGroupsHomeLocationManagerPayGroup, nil - case "employments,groups,home_location,manager,team": - return EmployeesListRequestExpandEmploymentsGroupsHomeLocationManagerTeam, nil - case "employments,groups,home_location,manager,team,company": - return EmployeesListRequestExpandEmploymentsGroupsHomeLocationManagerTeamCompany, nil - case "employments,groups,home_location,manager,team,company,pay_group": - return EmployeesListRequestExpandEmploymentsGroupsHomeLocationManagerTeamCompanyPayGroup, nil - case "employments,groups,home_location,manager,team,pay_group": - return EmployeesListRequestExpandEmploymentsGroupsHomeLocationManagerTeamPayGroup, nil - case "employments,groups,home_location,pay_group": - return EmployeesListRequestExpandEmploymentsGroupsHomeLocationPayGroup, nil - case "employments,groups,home_location,team": - return EmployeesListRequestExpandEmploymentsGroupsHomeLocationTeam, nil - case "employments,groups,home_location,team,company": - return EmployeesListRequestExpandEmploymentsGroupsHomeLocationTeamCompany, nil - case "employments,groups,home_location,team,company,pay_group": - return EmployeesListRequestExpandEmploymentsGroupsHomeLocationTeamCompanyPayGroup, nil - case "employments,groups,home_location,team,pay_group": - return EmployeesListRequestExpandEmploymentsGroupsHomeLocationTeamPayGroup, nil - case "employments,groups,home_location,work_location": - return EmployeesListRequestExpandEmploymentsGroupsHomeLocationWorkLocation, nil - case "employments,groups,home_location,work_location,company": - return EmployeesListRequestExpandEmploymentsGroupsHomeLocationWorkLocationCompany, nil - case "employments,groups,home_location,work_location,company,pay_group": - return EmployeesListRequestExpandEmploymentsGroupsHomeLocationWorkLocationCompanyPayGroup, nil - case "employments,groups,home_location,work_location,manager": - return EmployeesListRequestExpandEmploymentsGroupsHomeLocationWorkLocationManager, nil - case "employments,groups,home_location,work_location,manager,company": - return EmployeesListRequestExpandEmploymentsGroupsHomeLocationWorkLocationManagerCompany, nil - case "employments,groups,home_location,work_location,manager,company,pay_group": - return EmployeesListRequestExpandEmploymentsGroupsHomeLocationWorkLocationManagerCompanyPayGroup, nil - case "employments,groups,home_location,work_location,manager,pay_group": - return EmployeesListRequestExpandEmploymentsGroupsHomeLocationWorkLocationManagerPayGroup, nil - case "employments,groups,home_location,work_location,manager,team": - return EmployeesListRequestExpandEmploymentsGroupsHomeLocationWorkLocationManagerTeam, nil - case "employments,groups,home_location,work_location,manager,team,company": - return EmployeesListRequestExpandEmploymentsGroupsHomeLocationWorkLocationManagerTeamCompany, nil - case "employments,groups,home_location,work_location,manager,team,company,pay_group": - return EmployeesListRequestExpandEmploymentsGroupsHomeLocationWorkLocationManagerTeamCompanyPayGroup, nil - case "employments,groups,home_location,work_location,manager,team,pay_group": - return EmployeesListRequestExpandEmploymentsGroupsHomeLocationWorkLocationManagerTeamPayGroup, nil - case "employments,groups,home_location,work_location,pay_group": - return EmployeesListRequestExpandEmploymentsGroupsHomeLocationWorkLocationPayGroup, nil - case "employments,groups,home_location,work_location,team": - return EmployeesListRequestExpandEmploymentsGroupsHomeLocationWorkLocationTeam, nil - case "employments,groups,home_location,work_location,team,company": - return EmployeesListRequestExpandEmploymentsGroupsHomeLocationWorkLocationTeamCompany, nil - case "employments,groups,home_location,work_location,team,company,pay_group": - return EmployeesListRequestExpandEmploymentsGroupsHomeLocationWorkLocationTeamCompanyPayGroup, nil - case "employments,groups,home_location,work_location,team,pay_group": - return EmployeesListRequestExpandEmploymentsGroupsHomeLocationWorkLocationTeamPayGroup, nil - case "employments,groups,manager": - return EmployeesListRequestExpandEmploymentsGroupsManager, nil - case "employments,groups,manager,company": - return EmployeesListRequestExpandEmploymentsGroupsManagerCompany, nil - case "employments,groups,manager,company,pay_group": - return EmployeesListRequestExpandEmploymentsGroupsManagerCompanyPayGroup, nil - case "employments,groups,manager,pay_group": - return EmployeesListRequestExpandEmploymentsGroupsManagerPayGroup, nil - case "employments,groups,manager,team": - return EmployeesListRequestExpandEmploymentsGroupsManagerTeam, nil - case "employments,groups,manager,team,company": - return EmployeesListRequestExpandEmploymentsGroupsManagerTeamCompany, nil - case "employments,groups,manager,team,company,pay_group": - return EmployeesListRequestExpandEmploymentsGroupsManagerTeamCompanyPayGroup, nil - case "employments,groups,manager,team,pay_group": - return EmployeesListRequestExpandEmploymentsGroupsManagerTeamPayGroup, nil - case "employments,groups,pay_group": - return EmployeesListRequestExpandEmploymentsGroupsPayGroup, nil - case "employments,groups,team": - return EmployeesListRequestExpandEmploymentsGroupsTeam, nil - case "employments,groups,team,company": - return EmployeesListRequestExpandEmploymentsGroupsTeamCompany, nil - case "employments,groups,team,company,pay_group": - return EmployeesListRequestExpandEmploymentsGroupsTeamCompanyPayGroup, nil - case "employments,groups,team,pay_group": - return EmployeesListRequestExpandEmploymentsGroupsTeamPayGroup, nil - case "employments,groups,work_location": - return EmployeesListRequestExpandEmploymentsGroupsWorkLocation, nil - case "employments,groups,work_location,company": - return EmployeesListRequestExpandEmploymentsGroupsWorkLocationCompany, nil - case "employments,groups,work_location,company,pay_group": - return EmployeesListRequestExpandEmploymentsGroupsWorkLocationCompanyPayGroup, nil - case "employments,groups,work_location,manager": - return EmployeesListRequestExpandEmploymentsGroupsWorkLocationManager, nil - case "employments,groups,work_location,manager,company": - return EmployeesListRequestExpandEmploymentsGroupsWorkLocationManagerCompany, nil - case "employments,groups,work_location,manager,company,pay_group": - return EmployeesListRequestExpandEmploymentsGroupsWorkLocationManagerCompanyPayGroup, nil - case "employments,groups,work_location,manager,pay_group": - return EmployeesListRequestExpandEmploymentsGroupsWorkLocationManagerPayGroup, nil - case "employments,groups,work_location,manager,team": - return EmployeesListRequestExpandEmploymentsGroupsWorkLocationManagerTeam, nil - case "employments,groups,work_location,manager,team,company": - return EmployeesListRequestExpandEmploymentsGroupsWorkLocationManagerTeamCompany, nil - case "employments,groups,work_location,manager,team,company,pay_group": - return EmployeesListRequestExpandEmploymentsGroupsWorkLocationManagerTeamCompanyPayGroup, nil - case "employments,groups,work_location,manager,team,pay_group": - return EmployeesListRequestExpandEmploymentsGroupsWorkLocationManagerTeamPayGroup, nil - case "employments,groups,work_location,pay_group": - return EmployeesListRequestExpandEmploymentsGroupsWorkLocationPayGroup, nil - case "employments,groups,work_location,team": - return EmployeesListRequestExpandEmploymentsGroupsWorkLocationTeam, nil - case "employments,groups,work_location,team,company": - return EmployeesListRequestExpandEmploymentsGroupsWorkLocationTeamCompany, nil - case "employments,groups,work_location,team,company,pay_group": - return EmployeesListRequestExpandEmploymentsGroupsWorkLocationTeamCompanyPayGroup, nil - case "employments,groups,work_location,team,pay_group": - return EmployeesListRequestExpandEmploymentsGroupsWorkLocationTeamPayGroup, nil - case "employments,home_location": - return EmployeesListRequestExpandEmploymentsHomeLocation, nil - case "employments,home_location,company": - return EmployeesListRequestExpandEmploymentsHomeLocationCompany, nil - case "employments,home_location,company,pay_group": - return EmployeesListRequestExpandEmploymentsHomeLocationCompanyPayGroup, nil - case "employments,home_location,manager": - return EmployeesListRequestExpandEmploymentsHomeLocationManager, nil - case "employments,home_location,manager,company": - return EmployeesListRequestExpandEmploymentsHomeLocationManagerCompany, nil - case "employments,home_location,manager,company,pay_group": - return EmployeesListRequestExpandEmploymentsHomeLocationManagerCompanyPayGroup, nil - case "employments,home_location,manager,pay_group": - return EmployeesListRequestExpandEmploymentsHomeLocationManagerPayGroup, nil - case "employments,home_location,manager,team": - return EmployeesListRequestExpandEmploymentsHomeLocationManagerTeam, nil - case "employments,home_location,manager,team,company": - return EmployeesListRequestExpandEmploymentsHomeLocationManagerTeamCompany, nil - case "employments,home_location,manager,team,company,pay_group": - return EmployeesListRequestExpandEmploymentsHomeLocationManagerTeamCompanyPayGroup, nil - case "employments,home_location,manager,team,pay_group": - return EmployeesListRequestExpandEmploymentsHomeLocationManagerTeamPayGroup, nil - case "employments,home_location,pay_group": - return EmployeesListRequestExpandEmploymentsHomeLocationPayGroup, nil - case "employments,home_location,team": - return EmployeesListRequestExpandEmploymentsHomeLocationTeam, nil - case "employments,home_location,team,company": - return EmployeesListRequestExpandEmploymentsHomeLocationTeamCompany, nil - case "employments,home_location,team,company,pay_group": - return EmployeesListRequestExpandEmploymentsHomeLocationTeamCompanyPayGroup, nil - case "employments,home_location,team,pay_group": - return EmployeesListRequestExpandEmploymentsHomeLocationTeamPayGroup, nil - case "employments,home_location,work_location": - return EmployeesListRequestExpandEmploymentsHomeLocationWorkLocation, nil - case "employments,home_location,work_location,company": - return EmployeesListRequestExpandEmploymentsHomeLocationWorkLocationCompany, nil - case "employments,home_location,work_location,company,pay_group": - return EmployeesListRequestExpandEmploymentsHomeLocationWorkLocationCompanyPayGroup, nil - case "employments,home_location,work_location,manager": - return EmployeesListRequestExpandEmploymentsHomeLocationWorkLocationManager, nil - case "employments,home_location,work_location,manager,company": - return EmployeesListRequestExpandEmploymentsHomeLocationWorkLocationManagerCompany, nil - case "employments,home_location,work_location,manager,company,pay_group": - return EmployeesListRequestExpandEmploymentsHomeLocationWorkLocationManagerCompanyPayGroup, nil - case "employments,home_location,work_location,manager,pay_group": - return EmployeesListRequestExpandEmploymentsHomeLocationWorkLocationManagerPayGroup, nil - case "employments,home_location,work_location,manager,team": - return EmployeesListRequestExpandEmploymentsHomeLocationWorkLocationManagerTeam, nil - case "employments,home_location,work_location,manager,team,company": - return EmployeesListRequestExpandEmploymentsHomeLocationWorkLocationManagerTeamCompany, nil - case "employments,home_location,work_location,manager,team,company,pay_group": - return EmployeesListRequestExpandEmploymentsHomeLocationWorkLocationManagerTeamCompanyPayGroup, nil - case "employments,home_location,work_location,manager,team,pay_group": - return EmployeesListRequestExpandEmploymentsHomeLocationWorkLocationManagerTeamPayGroup, nil - case "employments,home_location,work_location,pay_group": - return EmployeesListRequestExpandEmploymentsHomeLocationWorkLocationPayGroup, nil - case "employments,home_location,work_location,team": - return EmployeesListRequestExpandEmploymentsHomeLocationWorkLocationTeam, nil - case "employments,home_location,work_location,team,company": - return EmployeesListRequestExpandEmploymentsHomeLocationWorkLocationTeamCompany, nil - case "employments,home_location,work_location,team,company,pay_group": - return EmployeesListRequestExpandEmploymentsHomeLocationWorkLocationTeamCompanyPayGroup, nil - case "employments,home_location,work_location,team,pay_group": - return EmployeesListRequestExpandEmploymentsHomeLocationWorkLocationTeamPayGroup, nil - case "employments,manager": - return EmployeesListRequestExpandEmploymentsManager, nil - case "employments,manager,company": - return EmployeesListRequestExpandEmploymentsManagerCompany, nil - case "employments,manager,company,pay_group": - return EmployeesListRequestExpandEmploymentsManagerCompanyPayGroup, nil - case "employments,manager,pay_group": - return EmployeesListRequestExpandEmploymentsManagerPayGroup, nil - case "employments,manager,team": - return EmployeesListRequestExpandEmploymentsManagerTeam, nil - case "employments,manager,team,company": - return EmployeesListRequestExpandEmploymentsManagerTeamCompany, nil - case "employments,manager,team,company,pay_group": - return EmployeesListRequestExpandEmploymentsManagerTeamCompanyPayGroup, nil - case "employments,manager,team,pay_group": - return EmployeesListRequestExpandEmploymentsManagerTeamPayGroup, nil - case "employments,pay_group": - return EmployeesListRequestExpandEmploymentsPayGroup, nil - case "employments,team": - return EmployeesListRequestExpandEmploymentsTeam, nil - case "employments,team,company": - return EmployeesListRequestExpandEmploymentsTeamCompany, nil - case "employments,team,company,pay_group": - return EmployeesListRequestExpandEmploymentsTeamCompanyPayGroup, nil - case "employments,team,pay_group": - return EmployeesListRequestExpandEmploymentsTeamPayGroup, nil - case "employments,work_location": - return EmployeesListRequestExpandEmploymentsWorkLocation, nil - case "employments,work_location,company": - return EmployeesListRequestExpandEmploymentsWorkLocationCompany, nil - case "employments,work_location,company,pay_group": - return EmployeesListRequestExpandEmploymentsWorkLocationCompanyPayGroup, nil - case "employments,work_location,manager": - return EmployeesListRequestExpandEmploymentsWorkLocationManager, nil - case "employments,work_location,manager,company": - return EmployeesListRequestExpandEmploymentsWorkLocationManagerCompany, nil - case "employments,work_location,manager,company,pay_group": - return EmployeesListRequestExpandEmploymentsWorkLocationManagerCompanyPayGroup, nil - case "employments,work_location,manager,pay_group": - return EmployeesListRequestExpandEmploymentsWorkLocationManagerPayGroup, nil - case "employments,work_location,manager,team": - return EmployeesListRequestExpandEmploymentsWorkLocationManagerTeam, nil - case "employments,work_location,manager,team,company": - return EmployeesListRequestExpandEmploymentsWorkLocationManagerTeamCompany, nil - case "employments,work_location,manager,team,company,pay_group": - return EmployeesListRequestExpandEmploymentsWorkLocationManagerTeamCompanyPayGroup, nil - case "employments,work_location,manager,team,pay_group": - return EmployeesListRequestExpandEmploymentsWorkLocationManagerTeamPayGroup, nil - case "employments,work_location,pay_group": - return EmployeesListRequestExpandEmploymentsWorkLocationPayGroup, nil - case "employments,work_location,team": - return EmployeesListRequestExpandEmploymentsWorkLocationTeam, nil - case "employments,work_location,team,company": - return EmployeesListRequestExpandEmploymentsWorkLocationTeamCompany, nil - case "employments,work_location,team,company,pay_group": - return EmployeesListRequestExpandEmploymentsWorkLocationTeamCompanyPayGroup, nil - case "employments,work_location,team,pay_group": - return EmployeesListRequestExpandEmploymentsWorkLocationTeamPayGroup, nil + return EmployeesListRequestExpandItemEmployments, nil case "groups": - return EmployeesListRequestExpandGroups, nil - case "groups,company": - return EmployeesListRequestExpandGroupsCompany, nil - case "groups,company,pay_group": - return EmployeesListRequestExpandGroupsCompanyPayGroup, nil - case "groups,home_location": - return EmployeesListRequestExpandGroupsHomeLocation, nil - case "groups,home_location,company": - return EmployeesListRequestExpandGroupsHomeLocationCompany, nil - case "groups,home_location,company,pay_group": - return EmployeesListRequestExpandGroupsHomeLocationCompanyPayGroup, nil - case "groups,home_location,manager": - return EmployeesListRequestExpandGroupsHomeLocationManager, nil - case "groups,home_location,manager,company": - return EmployeesListRequestExpandGroupsHomeLocationManagerCompany, nil - case "groups,home_location,manager,company,pay_group": - return EmployeesListRequestExpandGroupsHomeLocationManagerCompanyPayGroup, nil - case "groups,home_location,manager,pay_group": - return EmployeesListRequestExpandGroupsHomeLocationManagerPayGroup, nil - case "groups,home_location,manager,team": - return EmployeesListRequestExpandGroupsHomeLocationManagerTeam, nil - case "groups,home_location,manager,team,company": - return EmployeesListRequestExpandGroupsHomeLocationManagerTeamCompany, nil - case "groups,home_location,manager,team,company,pay_group": - return EmployeesListRequestExpandGroupsHomeLocationManagerTeamCompanyPayGroup, nil - case "groups,home_location,manager,team,pay_group": - return EmployeesListRequestExpandGroupsHomeLocationManagerTeamPayGroup, nil - case "groups,home_location,pay_group": - return EmployeesListRequestExpandGroupsHomeLocationPayGroup, nil - case "groups,home_location,team": - return EmployeesListRequestExpandGroupsHomeLocationTeam, nil - case "groups,home_location,team,company": - return EmployeesListRequestExpandGroupsHomeLocationTeamCompany, nil - case "groups,home_location,team,company,pay_group": - return EmployeesListRequestExpandGroupsHomeLocationTeamCompanyPayGroup, nil - case "groups,home_location,team,pay_group": - return EmployeesListRequestExpandGroupsHomeLocationTeamPayGroup, nil - case "groups,home_location,work_location": - return EmployeesListRequestExpandGroupsHomeLocationWorkLocation, nil - case "groups,home_location,work_location,company": - return EmployeesListRequestExpandGroupsHomeLocationWorkLocationCompany, nil - case "groups,home_location,work_location,company,pay_group": - return EmployeesListRequestExpandGroupsHomeLocationWorkLocationCompanyPayGroup, nil - case "groups,home_location,work_location,manager": - return EmployeesListRequestExpandGroupsHomeLocationWorkLocationManager, nil - case "groups,home_location,work_location,manager,company": - return EmployeesListRequestExpandGroupsHomeLocationWorkLocationManagerCompany, nil - case "groups,home_location,work_location,manager,company,pay_group": - return EmployeesListRequestExpandGroupsHomeLocationWorkLocationManagerCompanyPayGroup, nil - case "groups,home_location,work_location,manager,pay_group": - return EmployeesListRequestExpandGroupsHomeLocationWorkLocationManagerPayGroup, nil - case "groups,home_location,work_location,manager,team": - return EmployeesListRequestExpandGroupsHomeLocationWorkLocationManagerTeam, nil - case "groups,home_location,work_location,manager,team,company": - return EmployeesListRequestExpandGroupsHomeLocationWorkLocationManagerTeamCompany, nil - case "groups,home_location,work_location,manager,team,company,pay_group": - return EmployeesListRequestExpandGroupsHomeLocationWorkLocationManagerTeamCompanyPayGroup, nil - case "groups,home_location,work_location,manager,team,pay_group": - return EmployeesListRequestExpandGroupsHomeLocationWorkLocationManagerTeamPayGroup, nil - case "groups,home_location,work_location,pay_group": - return EmployeesListRequestExpandGroupsHomeLocationWorkLocationPayGroup, nil - case "groups,home_location,work_location,team": - return EmployeesListRequestExpandGroupsHomeLocationWorkLocationTeam, nil - case "groups,home_location,work_location,team,company": - return EmployeesListRequestExpandGroupsHomeLocationWorkLocationTeamCompany, nil - case "groups,home_location,work_location,team,company,pay_group": - return EmployeesListRequestExpandGroupsHomeLocationWorkLocationTeamCompanyPayGroup, nil - case "groups,home_location,work_location,team,pay_group": - return EmployeesListRequestExpandGroupsHomeLocationWorkLocationTeamPayGroup, nil - case "groups,manager": - return EmployeesListRequestExpandGroupsManager, nil - case "groups,manager,company": - return EmployeesListRequestExpandGroupsManagerCompany, nil - case "groups,manager,company,pay_group": - return EmployeesListRequestExpandGroupsManagerCompanyPayGroup, nil - case "groups,manager,pay_group": - return EmployeesListRequestExpandGroupsManagerPayGroup, nil - case "groups,manager,team": - return EmployeesListRequestExpandGroupsManagerTeam, nil - case "groups,manager,team,company": - return EmployeesListRequestExpandGroupsManagerTeamCompany, nil - case "groups,manager,team,company,pay_group": - return EmployeesListRequestExpandGroupsManagerTeamCompanyPayGroup, nil - case "groups,manager,team,pay_group": - return EmployeesListRequestExpandGroupsManagerTeamPayGroup, nil - case "groups,pay_group": - return EmployeesListRequestExpandGroupsPayGroup, nil - case "groups,team": - return EmployeesListRequestExpandGroupsTeam, nil - case "groups,team,company": - return EmployeesListRequestExpandGroupsTeamCompany, nil - case "groups,team,company,pay_group": - return EmployeesListRequestExpandGroupsTeamCompanyPayGroup, nil - case "groups,team,pay_group": - return EmployeesListRequestExpandGroupsTeamPayGroup, nil - case "groups,work_location": - return EmployeesListRequestExpandGroupsWorkLocation, nil - case "groups,work_location,company": - return EmployeesListRequestExpandGroupsWorkLocationCompany, nil - case "groups,work_location,company,pay_group": - return EmployeesListRequestExpandGroupsWorkLocationCompanyPayGroup, nil - case "groups,work_location,manager": - return EmployeesListRequestExpandGroupsWorkLocationManager, nil - case "groups,work_location,manager,company": - return EmployeesListRequestExpandGroupsWorkLocationManagerCompany, nil - case "groups,work_location,manager,company,pay_group": - return EmployeesListRequestExpandGroupsWorkLocationManagerCompanyPayGroup, nil - case "groups,work_location,manager,pay_group": - return EmployeesListRequestExpandGroupsWorkLocationManagerPayGroup, nil - case "groups,work_location,manager,team": - return EmployeesListRequestExpandGroupsWorkLocationManagerTeam, nil - case "groups,work_location,manager,team,company": - return EmployeesListRequestExpandGroupsWorkLocationManagerTeamCompany, nil - case "groups,work_location,manager,team,company,pay_group": - return EmployeesListRequestExpandGroupsWorkLocationManagerTeamCompanyPayGroup, nil - case "groups,work_location,manager,team,pay_group": - return EmployeesListRequestExpandGroupsWorkLocationManagerTeamPayGroup, nil - case "groups,work_location,pay_group": - return EmployeesListRequestExpandGroupsWorkLocationPayGroup, nil - case "groups,work_location,team": - return EmployeesListRequestExpandGroupsWorkLocationTeam, nil - case "groups,work_location,team,company": - return EmployeesListRequestExpandGroupsWorkLocationTeamCompany, nil - case "groups,work_location,team,company,pay_group": - return EmployeesListRequestExpandGroupsWorkLocationTeamCompanyPayGroup, nil - case "groups,work_location,team,pay_group": - return EmployeesListRequestExpandGroupsWorkLocationTeamPayGroup, nil + return EmployeesListRequestExpandItemGroups, nil case "home_location": - return EmployeesListRequestExpandHomeLocation, nil - case "home_location,company": - return EmployeesListRequestExpandHomeLocationCompany, nil - case "home_location,company,pay_group": - return EmployeesListRequestExpandHomeLocationCompanyPayGroup, nil - case "home_location,manager": - return EmployeesListRequestExpandHomeLocationManager, nil - case "home_location,manager,company": - return EmployeesListRequestExpandHomeLocationManagerCompany, nil - case "home_location,manager,company,pay_group": - return EmployeesListRequestExpandHomeLocationManagerCompanyPayGroup, nil - case "home_location,manager,pay_group": - return EmployeesListRequestExpandHomeLocationManagerPayGroup, nil - case "home_location,manager,team": - return EmployeesListRequestExpandHomeLocationManagerTeam, nil - case "home_location,manager,team,company": - return EmployeesListRequestExpandHomeLocationManagerTeamCompany, nil - case "home_location,manager,team,company,pay_group": - return EmployeesListRequestExpandHomeLocationManagerTeamCompanyPayGroup, nil - case "home_location,manager,team,pay_group": - return EmployeesListRequestExpandHomeLocationManagerTeamPayGroup, nil - case "home_location,pay_group": - return EmployeesListRequestExpandHomeLocationPayGroup, nil - case "home_location,team": - return EmployeesListRequestExpandHomeLocationTeam, nil - case "home_location,team,company": - return EmployeesListRequestExpandHomeLocationTeamCompany, nil - case "home_location,team,company,pay_group": - return EmployeesListRequestExpandHomeLocationTeamCompanyPayGroup, nil - case "home_location,team,pay_group": - return EmployeesListRequestExpandHomeLocationTeamPayGroup, nil - case "home_location,work_location": - return EmployeesListRequestExpandHomeLocationWorkLocation, nil - case "home_location,work_location,company": - return EmployeesListRequestExpandHomeLocationWorkLocationCompany, nil - case "home_location,work_location,company,pay_group": - return EmployeesListRequestExpandHomeLocationWorkLocationCompanyPayGroup, nil - case "home_location,work_location,manager": - return EmployeesListRequestExpandHomeLocationWorkLocationManager, nil - case "home_location,work_location,manager,company": - return EmployeesListRequestExpandHomeLocationWorkLocationManagerCompany, nil - case "home_location,work_location,manager,company,pay_group": - return EmployeesListRequestExpandHomeLocationWorkLocationManagerCompanyPayGroup, nil - case "home_location,work_location,manager,pay_group": - return EmployeesListRequestExpandHomeLocationWorkLocationManagerPayGroup, nil - case "home_location,work_location,manager,team": - return EmployeesListRequestExpandHomeLocationWorkLocationManagerTeam, nil - case "home_location,work_location,manager,team,company": - return EmployeesListRequestExpandHomeLocationWorkLocationManagerTeamCompany, nil - case "home_location,work_location,manager,team,company,pay_group": - return EmployeesListRequestExpandHomeLocationWorkLocationManagerTeamCompanyPayGroup, nil - case "home_location,work_location,manager,team,pay_group": - return EmployeesListRequestExpandHomeLocationWorkLocationManagerTeamPayGroup, nil - case "home_location,work_location,pay_group": - return EmployeesListRequestExpandHomeLocationWorkLocationPayGroup, nil - case "home_location,work_location,team": - return EmployeesListRequestExpandHomeLocationWorkLocationTeam, nil - case "home_location,work_location,team,company": - return EmployeesListRequestExpandHomeLocationWorkLocationTeamCompany, nil - case "home_location,work_location,team,company,pay_group": - return EmployeesListRequestExpandHomeLocationWorkLocationTeamCompanyPayGroup, nil - case "home_location,work_location,team,pay_group": - return EmployeesListRequestExpandHomeLocationWorkLocationTeamPayGroup, nil + return EmployeesListRequestExpandItemHomeLocation, nil case "manager": - return EmployeesListRequestExpandManager, nil - case "manager,company": - return EmployeesListRequestExpandManagerCompany, nil - case "manager,company,pay_group": - return EmployeesListRequestExpandManagerCompanyPayGroup, nil - case "manager,pay_group": - return EmployeesListRequestExpandManagerPayGroup, nil - case "manager,team": - return EmployeesListRequestExpandManagerTeam, nil - case "manager,team,company": - return EmployeesListRequestExpandManagerTeamCompany, nil - case "manager,team,company,pay_group": - return EmployeesListRequestExpandManagerTeamCompanyPayGroup, nil - case "manager,team,pay_group": - return EmployeesListRequestExpandManagerTeamPayGroup, nil + return EmployeesListRequestExpandItemManager, nil case "pay_group": - return EmployeesListRequestExpandPayGroup, nil + return EmployeesListRequestExpandItemPayGroup, nil case "team": - return EmployeesListRequestExpandTeam, nil - case "team,company": - return EmployeesListRequestExpandTeamCompany, nil - case "team,company,pay_group": - return EmployeesListRequestExpandTeamCompanyPayGroup, nil - case "team,pay_group": - return EmployeesListRequestExpandTeamPayGroup, nil + return EmployeesListRequestExpandItemTeam, nil case "work_location": - return EmployeesListRequestExpandWorkLocation, nil - case "work_location,company": - return EmployeesListRequestExpandWorkLocationCompany, nil - case "work_location,company,pay_group": - return EmployeesListRequestExpandWorkLocationCompanyPayGroup, nil - case "work_location,manager": - return EmployeesListRequestExpandWorkLocationManager, nil - case "work_location,manager,company": - return EmployeesListRequestExpandWorkLocationManagerCompany, nil - case "work_location,manager,company,pay_group": - return EmployeesListRequestExpandWorkLocationManagerCompanyPayGroup, nil - case "work_location,manager,pay_group": - return EmployeesListRequestExpandWorkLocationManagerPayGroup, nil - case "work_location,manager,team": - return EmployeesListRequestExpandWorkLocationManagerTeam, nil - case "work_location,manager,team,company": - return EmployeesListRequestExpandWorkLocationManagerTeamCompany, nil - case "work_location,manager,team,company,pay_group": - return EmployeesListRequestExpandWorkLocationManagerTeamCompanyPayGroup, nil - case "work_location,manager,team,pay_group": - return EmployeesListRequestExpandWorkLocationManagerTeamPayGroup, nil - case "work_location,pay_group": - return EmployeesListRequestExpandWorkLocationPayGroup, nil - case "work_location,team": - return EmployeesListRequestExpandWorkLocationTeam, nil - case "work_location,team,company": - return EmployeesListRequestExpandWorkLocationTeamCompany, nil - case "work_location,team,company,pay_group": - return EmployeesListRequestExpandWorkLocationTeamCompanyPayGroup, nil - case "work_location,team,pay_group": - return EmployeesListRequestExpandWorkLocationTeamPayGroup, nil - } - var t EmployeesListRequestExpand + return EmployeesListRequestExpandItemWorkLocation, nil + } + var t EmployeesListRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (e EmployeesListRequestExpand) Ptr() *EmployeesListRequestExpand { +func (e EmployeesListRequestExpandItem) Ptr() *EmployeesListRequestExpandItem { return &e } @@ -1035,784 +292,43 @@ func (e EmployeesListRequestShowEnumOrigins) Ptr() *EmployeesListRequestShowEnum return &e } -type EmployeesRetrieveRequestExpand string +type EmployeesRetrieveRequestExpandItem string const ( - EmployeesRetrieveRequestExpandCompany EmployeesRetrieveRequestExpand = "company" - EmployeesRetrieveRequestExpandCompanyPayGroup EmployeesRetrieveRequestExpand = "company,pay_group" - EmployeesRetrieveRequestExpandEmployments EmployeesRetrieveRequestExpand = "employments" - EmployeesRetrieveRequestExpandEmploymentsCompany EmployeesRetrieveRequestExpand = "employments,company" - EmployeesRetrieveRequestExpandEmploymentsCompanyPayGroup EmployeesRetrieveRequestExpand = "employments,company,pay_group" - EmployeesRetrieveRequestExpandEmploymentsGroups EmployeesRetrieveRequestExpand = "employments,groups" - EmployeesRetrieveRequestExpandEmploymentsGroupsCompany EmployeesRetrieveRequestExpand = "employments,groups,company" - EmployeesRetrieveRequestExpandEmploymentsGroupsCompanyPayGroup EmployeesRetrieveRequestExpand = "employments,groups,company,pay_group" - EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocation EmployeesRetrieveRequestExpand = "employments,groups,home_location" - EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationCompany EmployeesRetrieveRequestExpand = "employments,groups,home_location,company" - EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationCompanyPayGroup EmployeesRetrieveRequestExpand = "employments,groups,home_location,company,pay_group" - EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationManager EmployeesRetrieveRequestExpand = "employments,groups,home_location,manager" - EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationManagerCompany EmployeesRetrieveRequestExpand = "employments,groups,home_location,manager,company" - EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationManagerCompanyPayGroup EmployeesRetrieveRequestExpand = "employments,groups,home_location,manager,company,pay_group" - EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationManagerPayGroup EmployeesRetrieveRequestExpand = "employments,groups,home_location,manager,pay_group" - EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationManagerTeam EmployeesRetrieveRequestExpand = "employments,groups,home_location,manager,team" - EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationManagerTeamCompany EmployeesRetrieveRequestExpand = "employments,groups,home_location,manager,team,company" - EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationManagerTeamCompanyPayGroup EmployeesRetrieveRequestExpand = "employments,groups,home_location,manager,team,company,pay_group" - EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationManagerTeamPayGroup EmployeesRetrieveRequestExpand = "employments,groups,home_location,manager,team,pay_group" - EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationPayGroup EmployeesRetrieveRequestExpand = "employments,groups,home_location,pay_group" - EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationTeam EmployeesRetrieveRequestExpand = "employments,groups,home_location,team" - EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationTeamCompany EmployeesRetrieveRequestExpand = "employments,groups,home_location,team,company" - EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationTeamCompanyPayGroup EmployeesRetrieveRequestExpand = "employments,groups,home_location,team,company,pay_group" - EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationTeamPayGroup EmployeesRetrieveRequestExpand = "employments,groups,home_location,team,pay_group" - EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationWorkLocation EmployeesRetrieveRequestExpand = "employments,groups,home_location,work_location" - EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationWorkLocationCompany EmployeesRetrieveRequestExpand = "employments,groups,home_location,work_location,company" - EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationWorkLocationCompanyPayGroup EmployeesRetrieveRequestExpand = "employments,groups,home_location,work_location,company,pay_group" - EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationWorkLocationManager EmployeesRetrieveRequestExpand = "employments,groups,home_location,work_location,manager" - EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationWorkLocationManagerCompany EmployeesRetrieveRequestExpand = "employments,groups,home_location,work_location,manager,company" - EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationWorkLocationManagerCompanyPayGroup EmployeesRetrieveRequestExpand = "employments,groups,home_location,work_location,manager,company,pay_group" - EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationWorkLocationManagerPayGroup EmployeesRetrieveRequestExpand = "employments,groups,home_location,work_location,manager,pay_group" - EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationWorkLocationManagerTeam EmployeesRetrieveRequestExpand = "employments,groups,home_location,work_location,manager,team" - EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationWorkLocationManagerTeamCompany EmployeesRetrieveRequestExpand = "employments,groups,home_location,work_location,manager,team,company" - EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationWorkLocationManagerTeamCompanyPayGroup EmployeesRetrieveRequestExpand = "employments,groups,home_location,work_location,manager,team,company,pay_group" - EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationWorkLocationManagerTeamPayGroup EmployeesRetrieveRequestExpand = "employments,groups,home_location,work_location,manager,team,pay_group" - EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationWorkLocationPayGroup EmployeesRetrieveRequestExpand = "employments,groups,home_location,work_location,pay_group" - EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationWorkLocationTeam EmployeesRetrieveRequestExpand = "employments,groups,home_location,work_location,team" - EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationWorkLocationTeamCompany EmployeesRetrieveRequestExpand = "employments,groups,home_location,work_location,team,company" - EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationWorkLocationTeamCompanyPayGroup EmployeesRetrieveRequestExpand = "employments,groups,home_location,work_location,team,company,pay_group" - EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationWorkLocationTeamPayGroup EmployeesRetrieveRequestExpand = "employments,groups,home_location,work_location,team,pay_group" - EmployeesRetrieveRequestExpandEmploymentsGroupsManager EmployeesRetrieveRequestExpand = "employments,groups,manager" - EmployeesRetrieveRequestExpandEmploymentsGroupsManagerCompany EmployeesRetrieveRequestExpand = "employments,groups,manager,company" - EmployeesRetrieveRequestExpandEmploymentsGroupsManagerCompanyPayGroup EmployeesRetrieveRequestExpand = "employments,groups,manager,company,pay_group" - EmployeesRetrieveRequestExpandEmploymentsGroupsManagerPayGroup EmployeesRetrieveRequestExpand = "employments,groups,manager,pay_group" - EmployeesRetrieveRequestExpandEmploymentsGroupsManagerTeam EmployeesRetrieveRequestExpand = "employments,groups,manager,team" - EmployeesRetrieveRequestExpandEmploymentsGroupsManagerTeamCompany EmployeesRetrieveRequestExpand = "employments,groups,manager,team,company" - EmployeesRetrieveRequestExpandEmploymentsGroupsManagerTeamCompanyPayGroup EmployeesRetrieveRequestExpand = "employments,groups,manager,team,company,pay_group" - EmployeesRetrieveRequestExpandEmploymentsGroupsManagerTeamPayGroup EmployeesRetrieveRequestExpand = "employments,groups,manager,team,pay_group" - EmployeesRetrieveRequestExpandEmploymentsGroupsPayGroup EmployeesRetrieveRequestExpand = "employments,groups,pay_group" - EmployeesRetrieveRequestExpandEmploymentsGroupsTeam EmployeesRetrieveRequestExpand = "employments,groups,team" - EmployeesRetrieveRequestExpandEmploymentsGroupsTeamCompany EmployeesRetrieveRequestExpand = "employments,groups,team,company" - EmployeesRetrieveRequestExpandEmploymentsGroupsTeamCompanyPayGroup EmployeesRetrieveRequestExpand = "employments,groups,team,company,pay_group" - EmployeesRetrieveRequestExpandEmploymentsGroupsTeamPayGroup EmployeesRetrieveRequestExpand = "employments,groups,team,pay_group" - EmployeesRetrieveRequestExpandEmploymentsGroupsWorkLocation EmployeesRetrieveRequestExpand = "employments,groups,work_location" - EmployeesRetrieveRequestExpandEmploymentsGroupsWorkLocationCompany EmployeesRetrieveRequestExpand = "employments,groups,work_location,company" - EmployeesRetrieveRequestExpandEmploymentsGroupsWorkLocationCompanyPayGroup EmployeesRetrieveRequestExpand = "employments,groups,work_location,company,pay_group" - EmployeesRetrieveRequestExpandEmploymentsGroupsWorkLocationManager EmployeesRetrieveRequestExpand = "employments,groups,work_location,manager" - EmployeesRetrieveRequestExpandEmploymentsGroupsWorkLocationManagerCompany EmployeesRetrieveRequestExpand = "employments,groups,work_location,manager,company" - EmployeesRetrieveRequestExpandEmploymentsGroupsWorkLocationManagerCompanyPayGroup EmployeesRetrieveRequestExpand = "employments,groups,work_location,manager,company,pay_group" - EmployeesRetrieveRequestExpandEmploymentsGroupsWorkLocationManagerPayGroup EmployeesRetrieveRequestExpand = "employments,groups,work_location,manager,pay_group" - EmployeesRetrieveRequestExpandEmploymentsGroupsWorkLocationManagerTeam EmployeesRetrieveRequestExpand = "employments,groups,work_location,manager,team" - EmployeesRetrieveRequestExpandEmploymentsGroupsWorkLocationManagerTeamCompany EmployeesRetrieveRequestExpand = "employments,groups,work_location,manager,team,company" - EmployeesRetrieveRequestExpandEmploymentsGroupsWorkLocationManagerTeamCompanyPayGroup EmployeesRetrieveRequestExpand = "employments,groups,work_location,manager,team,company,pay_group" - EmployeesRetrieveRequestExpandEmploymentsGroupsWorkLocationManagerTeamPayGroup EmployeesRetrieveRequestExpand = "employments,groups,work_location,manager,team,pay_group" - EmployeesRetrieveRequestExpandEmploymentsGroupsWorkLocationPayGroup EmployeesRetrieveRequestExpand = "employments,groups,work_location,pay_group" - EmployeesRetrieveRequestExpandEmploymentsGroupsWorkLocationTeam EmployeesRetrieveRequestExpand = "employments,groups,work_location,team" - EmployeesRetrieveRequestExpandEmploymentsGroupsWorkLocationTeamCompany EmployeesRetrieveRequestExpand = "employments,groups,work_location,team,company" - EmployeesRetrieveRequestExpandEmploymentsGroupsWorkLocationTeamCompanyPayGroup EmployeesRetrieveRequestExpand = "employments,groups,work_location,team,company,pay_group" - EmployeesRetrieveRequestExpandEmploymentsGroupsWorkLocationTeamPayGroup EmployeesRetrieveRequestExpand = "employments,groups,work_location,team,pay_group" - EmployeesRetrieveRequestExpandEmploymentsHomeLocation EmployeesRetrieveRequestExpand = "employments,home_location" - EmployeesRetrieveRequestExpandEmploymentsHomeLocationCompany EmployeesRetrieveRequestExpand = "employments,home_location,company" - EmployeesRetrieveRequestExpandEmploymentsHomeLocationCompanyPayGroup EmployeesRetrieveRequestExpand = "employments,home_location,company,pay_group" - EmployeesRetrieveRequestExpandEmploymentsHomeLocationManager EmployeesRetrieveRequestExpand = "employments,home_location,manager" - EmployeesRetrieveRequestExpandEmploymentsHomeLocationManagerCompany EmployeesRetrieveRequestExpand = "employments,home_location,manager,company" - EmployeesRetrieveRequestExpandEmploymentsHomeLocationManagerCompanyPayGroup EmployeesRetrieveRequestExpand = "employments,home_location,manager,company,pay_group" - EmployeesRetrieveRequestExpandEmploymentsHomeLocationManagerPayGroup EmployeesRetrieveRequestExpand = "employments,home_location,manager,pay_group" - EmployeesRetrieveRequestExpandEmploymentsHomeLocationManagerTeam EmployeesRetrieveRequestExpand = "employments,home_location,manager,team" - EmployeesRetrieveRequestExpandEmploymentsHomeLocationManagerTeamCompany EmployeesRetrieveRequestExpand = "employments,home_location,manager,team,company" - EmployeesRetrieveRequestExpandEmploymentsHomeLocationManagerTeamCompanyPayGroup EmployeesRetrieveRequestExpand = "employments,home_location,manager,team,company,pay_group" - EmployeesRetrieveRequestExpandEmploymentsHomeLocationManagerTeamPayGroup EmployeesRetrieveRequestExpand = "employments,home_location,manager,team,pay_group" - EmployeesRetrieveRequestExpandEmploymentsHomeLocationPayGroup EmployeesRetrieveRequestExpand = "employments,home_location,pay_group" - EmployeesRetrieveRequestExpandEmploymentsHomeLocationTeam EmployeesRetrieveRequestExpand = "employments,home_location,team" - EmployeesRetrieveRequestExpandEmploymentsHomeLocationTeamCompany EmployeesRetrieveRequestExpand = "employments,home_location,team,company" - EmployeesRetrieveRequestExpandEmploymentsHomeLocationTeamCompanyPayGroup EmployeesRetrieveRequestExpand = "employments,home_location,team,company,pay_group" - EmployeesRetrieveRequestExpandEmploymentsHomeLocationTeamPayGroup EmployeesRetrieveRequestExpand = "employments,home_location,team,pay_group" - EmployeesRetrieveRequestExpandEmploymentsHomeLocationWorkLocation EmployeesRetrieveRequestExpand = "employments,home_location,work_location" - EmployeesRetrieveRequestExpandEmploymentsHomeLocationWorkLocationCompany EmployeesRetrieveRequestExpand = "employments,home_location,work_location,company" - EmployeesRetrieveRequestExpandEmploymentsHomeLocationWorkLocationCompanyPayGroup EmployeesRetrieveRequestExpand = "employments,home_location,work_location,company,pay_group" - EmployeesRetrieveRequestExpandEmploymentsHomeLocationWorkLocationManager EmployeesRetrieveRequestExpand = "employments,home_location,work_location,manager" - EmployeesRetrieveRequestExpandEmploymentsHomeLocationWorkLocationManagerCompany EmployeesRetrieveRequestExpand = "employments,home_location,work_location,manager,company" - EmployeesRetrieveRequestExpandEmploymentsHomeLocationWorkLocationManagerCompanyPayGroup EmployeesRetrieveRequestExpand = "employments,home_location,work_location,manager,company,pay_group" - EmployeesRetrieveRequestExpandEmploymentsHomeLocationWorkLocationManagerPayGroup EmployeesRetrieveRequestExpand = "employments,home_location,work_location,manager,pay_group" - EmployeesRetrieveRequestExpandEmploymentsHomeLocationWorkLocationManagerTeam EmployeesRetrieveRequestExpand = "employments,home_location,work_location,manager,team" - EmployeesRetrieveRequestExpandEmploymentsHomeLocationWorkLocationManagerTeamCompany EmployeesRetrieveRequestExpand = "employments,home_location,work_location,manager,team,company" - EmployeesRetrieveRequestExpandEmploymentsHomeLocationWorkLocationManagerTeamCompanyPayGroup EmployeesRetrieveRequestExpand = "employments,home_location,work_location,manager,team,company,pay_group" - EmployeesRetrieveRequestExpandEmploymentsHomeLocationWorkLocationManagerTeamPayGroup EmployeesRetrieveRequestExpand = "employments,home_location,work_location,manager,team,pay_group" - EmployeesRetrieveRequestExpandEmploymentsHomeLocationWorkLocationPayGroup EmployeesRetrieveRequestExpand = "employments,home_location,work_location,pay_group" - EmployeesRetrieveRequestExpandEmploymentsHomeLocationWorkLocationTeam EmployeesRetrieveRequestExpand = "employments,home_location,work_location,team" - EmployeesRetrieveRequestExpandEmploymentsHomeLocationWorkLocationTeamCompany EmployeesRetrieveRequestExpand = "employments,home_location,work_location,team,company" - EmployeesRetrieveRequestExpandEmploymentsHomeLocationWorkLocationTeamCompanyPayGroup EmployeesRetrieveRequestExpand = "employments,home_location,work_location,team,company,pay_group" - EmployeesRetrieveRequestExpandEmploymentsHomeLocationWorkLocationTeamPayGroup EmployeesRetrieveRequestExpand = "employments,home_location,work_location,team,pay_group" - EmployeesRetrieveRequestExpandEmploymentsManager EmployeesRetrieveRequestExpand = "employments,manager" - EmployeesRetrieveRequestExpandEmploymentsManagerCompany EmployeesRetrieveRequestExpand = "employments,manager,company" - EmployeesRetrieveRequestExpandEmploymentsManagerCompanyPayGroup EmployeesRetrieveRequestExpand = "employments,manager,company,pay_group" - EmployeesRetrieveRequestExpandEmploymentsManagerPayGroup EmployeesRetrieveRequestExpand = "employments,manager,pay_group" - EmployeesRetrieveRequestExpandEmploymentsManagerTeam EmployeesRetrieveRequestExpand = "employments,manager,team" - EmployeesRetrieveRequestExpandEmploymentsManagerTeamCompany EmployeesRetrieveRequestExpand = "employments,manager,team,company" - EmployeesRetrieveRequestExpandEmploymentsManagerTeamCompanyPayGroup EmployeesRetrieveRequestExpand = "employments,manager,team,company,pay_group" - EmployeesRetrieveRequestExpandEmploymentsManagerTeamPayGroup EmployeesRetrieveRequestExpand = "employments,manager,team,pay_group" - EmployeesRetrieveRequestExpandEmploymentsPayGroup EmployeesRetrieveRequestExpand = "employments,pay_group" - EmployeesRetrieveRequestExpandEmploymentsTeam EmployeesRetrieveRequestExpand = "employments,team" - EmployeesRetrieveRequestExpandEmploymentsTeamCompany EmployeesRetrieveRequestExpand = "employments,team,company" - EmployeesRetrieveRequestExpandEmploymentsTeamCompanyPayGroup EmployeesRetrieveRequestExpand = "employments,team,company,pay_group" - EmployeesRetrieveRequestExpandEmploymentsTeamPayGroup EmployeesRetrieveRequestExpand = "employments,team,pay_group" - EmployeesRetrieveRequestExpandEmploymentsWorkLocation EmployeesRetrieveRequestExpand = "employments,work_location" - EmployeesRetrieveRequestExpandEmploymentsWorkLocationCompany EmployeesRetrieveRequestExpand = "employments,work_location,company" - EmployeesRetrieveRequestExpandEmploymentsWorkLocationCompanyPayGroup EmployeesRetrieveRequestExpand = "employments,work_location,company,pay_group" - EmployeesRetrieveRequestExpandEmploymentsWorkLocationManager EmployeesRetrieveRequestExpand = "employments,work_location,manager" - EmployeesRetrieveRequestExpandEmploymentsWorkLocationManagerCompany EmployeesRetrieveRequestExpand = "employments,work_location,manager,company" - EmployeesRetrieveRequestExpandEmploymentsWorkLocationManagerCompanyPayGroup EmployeesRetrieveRequestExpand = "employments,work_location,manager,company,pay_group" - EmployeesRetrieveRequestExpandEmploymentsWorkLocationManagerPayGroup EmployeesRetrieveRequestExpand = "employments,work_location,manager,pay_group" - EmployeesRetrieveRequestExpandEmploymentsWorkLocationManagerTeam EmployeesRetrieveRequestExpand = "employments,work_location,manager,team" - EmployeesRetrieveRequestExpandEmploymentsWorkLocationManagerTeamCompany EmployeesRetrieveRequestExpand = "employments,work_location,manager,team,company" - EmployeesRetrieveRequestExpandEmploymentsWorkLocationManagerTeamCompanyPayGroup EmployeesRetrieveRequestExpand = "employments,work_location,manager,team,company,pay_group" - EmployeesRetrieveRequestExpandEmploymentsWorkLocationManagerTeamPayGroup EmployeesRetrieveRequestExpand = "employments,work_location,manager,team,pay_group" - EmployeesRetrieveRequestExpandEmploymentsWorkLocationPayGroup EmployeesRetrieveRequestExpand = "employments,work_location,pay_group" - EmployeesRetrieveRequestExpandEmploymentsWorkLocationTeam EmployeesRetrieveRequestExpand = "employments,work_location,team" - EmployeesRetrieveRequestExpandEmploymentsWorkLocationTeamCompany EmployeesRetrieveRequestExpand = "employments,work_location,team,company" - EmployeesRetrieveRequestExpandEmploymentsWorkLocationTeamCompanyPayGroup EmployeesRetrieveRequestExpand = "employments,work_location,team,company,pay_group" - EmployeesRetrieveRequestExpandEmploymentsWorkLocationTeamPayGroup EmployeesRetrieveRequestExpand = "employments,work_location,team,pay_group" - EmployeesRetrieveRequestExpandGroups EmployeesRetrieveRequestExpand = "groups" - EmployeesRetrieveRequestExpandGroupsCompany EmployeesRetrieveRequestExpand = "groups,company" - EmployeesRetrieveRequestExpandGroupsCompanyPayGroup EmployeesRetrieveRequestExpand = "groups,company,pay_group" - EmployeesRetrieveRequestExpandGroupsHomeLocation EmployeesRetrieveRequestExpand = "groups,home_location" - EmployeesRetrieveRequestExpandGroupsHomeLocationCompany EmployeesRetrieveRequestExpand = "groups,home_location,company" - EmployeesRetrieveRequestExpandGroupsHomeLocationCompanyPayGroup EmployeesRetrieveRequestExpand = "groups,home_location,company,pay_group" - EmployeesRetrieveRequestExpandGroupsHomeLocationManager EmployeesRetrieveRequestExpand = "groups,home_location,manager" - EmployeesRetrieveRequestExpandGroupsHomeLocationManagerCompany EmployeesRetrieveRequestExpand = "groups,home_location,manager,company" - EmployeesRetrieveRequestExpandGroupsHomeLocationManagerCompanyPayGroup EmployeesRetrieveRequestExpand = "groups,home_location,manager,company,pay_group" - EmployeesRetrieveRequestExpandGroupsHomeLocationManagerPayGroup EmployeesRetrieveRequestExpand = "groups,home_location,manager,pay_group" - EmployeesRetrieveRequestExpandGroupsHomeLocationManagerTeam EmployeesRetrieveRequestExpand = "groups,home_location,manager,team" - EmployeesRetrieveRequestExpandGroupsHomeLocationManagerTeamCompany EmployeesRetrieveRequestExpand = "groups,home_location,manager,team,company" - EmployeesRetrieveRequestExpandGroupsHomeLocationManagerTeamCompanyPayGroup EmployeesRetrieveRequestExpand = "groups,home_location,manager,team,company,pay_group" - EmployeesRetrieveRequestExpandGroupsHomeLocationManagerTeamPayGroup EmployeesRetrieveRequestExpand = "groups,home_location,manager,team,pay_group" - EmployeesRetrieveRequestExpandGroupsHomeLocationPayGroup EmployeesRetrieveRequestExpand = "groups,home_location,pay_group" - EmployeesRetrieveRequestExpandGroupsHomeLocationTeam EmployeesRetrieveRequestExpand = "groups,home_location,team" - EmployeesRetrieveRequestExpandGroupsHomeLocationTeamCompany EmployeesRetrieveRequestExpand = "groups,home_location,team,company" - EmployeesRetrieveRequestExpandGroupsHomeLocationTeamCompanyPayGroup EmployeesRetrieveRequestExpand = "groups,home_location,team,company,pay_group" - EmployeesRetrieveRequestExpandGroupsHomeLocationTeamPayGroup EmployeesRetrieveRequestExpand = "groups,home_location,team,pay_group" - EmployeesRetrieveRequestExpandGroupsHomeLocationWorkLocation EmployeesRetrieveRequestExpand = "groups,home_location,work_location" - EmployeesRetrieveRequestExpandGroupsHomeLocationWorkLocationCompany EmployeesRetrieveRequestExpand = "groups,home_location,work_location,company" - EmployeesRetrieveRequestExpandGroupsHomeLocationWorkLocationCompanyPayGroup EmployeesRetrieveRequestExpand = "groups,home_location,work_location,company,pay_group" - EmployeesRetrieveRequestExpandGroupsHomeLocationWorkLocationManager EmployeesRetrieveRequestExpand = "groups,home_location,work_location,manager" - EmployeesRetrieveRequestExpandGroupsHomeLocationWorkLocationManagerCompany EmployeesRetrieveRequestExpand = "groups,home_location,work_location,manager,company" - EmployeesRetrieveRequestExpandGroupsHomeLocationWorkLocationManagerCompanyPayGroup EmployeesRetrieveRequestExpand = "groups,home_location,work_location,manager,company,pay_group" - EmployeesRetrieveRequestExpandGroupsHomeLocationWorkLocationManagerPayGroup EmployeesRetrieveRequestExpand = "groups,home_location,work_location,manager,pay_group" - EmployeesRetrieveRequestExpandGroupsHomeLocationWorkLocationManagerTeam EmployeesRetrieveRequestExpand = "groups,home_location,work_location,manager,team" - EmployeesRetrieveRequestExpandGroupsHomeLocationWorkLocationManagerTeamCompany EmployeesRetrieveRequestExpand = "groups,home_location,work_location,manager,team,company" - EmployeesRetrieveRequestExpandGroupsHomeLocationWorkLocationManagerTeamCompanyPayGroup EmployeesRetrieveRequestExpand = "groups,home_location,work_location,manager,team,company,pay_group" - EmployeesRetrieveRequestExpandGroupsHomeLocationWorkLocationManagerTeamPayGroup EmployeesRetrieveRequestExpand = "groups,home_location,work_location,manager,team,pay_group" - EmployeesRetrieveRequestExpandGroupsHomeLocationWorkLocationPayGroup EmployeesRetrieveRequestExpand = "groups,home_location,work_location,pay_group" - EmployeesRetrieveRequestExpandGroupsHomeLocationWorkLocationTeam EmployeesRetrieveRequestExpand = "groups,home_location,work_location,team" - EmployeesRetrieveRequestExpandGroupsHomeLocationWorkLocationTeamCompany EmployeesRetrieveRequestExpand = "groups,home_location,work_location,team,company" - EmployeesRetrieveRequestExpandGroupsHomeLocationWorkLocationTeamCompanyPayGroup EmployeesRetrieveRequestExpand = "groups,home_location,work_location,team,company,pay_group" - EmployeesRetrieveRequestExpandGroupsHomeLocationWorkLocationTeamPayGroup EmployeesRetrieveRequestExpand = "groups,home_location,work_location,team,pay_group" - EmployeesRetrieveRequestExpandGroupsManager EmployeesRetrieveRequestExpand = "groups,manager" - EmployeesRetrieveRequestExpandGroupsManagerCompany EmployeesRetrieveRequestExpand = "groups,manager,company" - EmployeesRetrieveRequestExpandGroupsManagerCompanyPayGroup EmployeesRetrieveRequestExpand = "groups,manager,company,pay_group" - EmployeesRetrieveRequestExpandGroupsManagerPayGroup EmployeesRetrieveRequestExpand = "groups,manager,pay_group" - EmployeesRetrieveRequestExpandGroupsManagerTeam EmployeesRetrieveRequestExpand = "groups,manager,team" - EmployeesRetrieveRequestExpandGroupsManagerTeamCompany EmployeesRetrieveRequestExpand = "groups,manager,team,company" - EmployeesRetrieveRequestExpandGroupsManagerTeamCompanyPayGroup EmployeesRetrieveRequestExpand = "groups,manager,team,company,pay_group" - EmployeesRetrieveRequestExpandGroupsManagerTeamPayGroup EmployeesRetrieveRequestExpand = "groups,manager,team,pay_group" - EmployeesRetrieveRequestExpandGroupsPayGroup EmployeesRetrieveRequestExpand = "groups,pay_group" - EmployeesRetrieveRequestExpandGroupsTeam EmployeesRetrieveRequestExpand = "groups,team" - EmployeesRetrieveRequestExpandGroupsTeamCompany EmployeesRetrieveRequestExpand = "groups,team,company" - EmployeesRetrieveRequestExpandGroupsTeamCompanyPayGroup EmployeesRetrieveRequestExpand = "groups,team,company,pay_group" - EmployeesRetrieveRequestExpandGroupsTeamPayGroup EmployeesRetrieveRequestExpand = "groups,team,pay_group" - EmployeesRetrieveRequestExpandGroupsWorkLocation EmployeesRetrieveRequestExpand = "groups,work_location" - EmployeesRetrieveRequestExpandGroupsWorkLocationCompany EmployeesRetrieveRequestExpand = "groups,work_location,company" - EmployeesRetrieveRequestExpandGroupsWorkLocationCompanyPayGroup EmployeesRetrieveRequestExpand = "groups,work_location,company,pay_group" - EmployeesRetrieveRequestExpandGroupsWorkLocationManager EmployeesRetrieveRequestExpand = "groups,work_location,manager" - EmployeesRetrieveRequestExpandGroupsWorkLocationManagerCompany EmployeesRetrieveRequestExpand = "groups,work_location,manager,company" - EmployeesRetrieveRequestExpandGroupsWorkLocationManagerCompanyPayGroup EmployeesRetrieveRequestExpand = "groups,work_location,manager,company,pay_group" - EmployeesRetrieveRequestExpandGroupsWorkLocationManagerPayGroup EmployeesRetrieveRequestExpand = "groups,work_location,manager,pay_group" - EmployeesRetrieveRequestExpandGroupsWorkLocationManagerTeam EmployeesRetrieveRequestExpand = "groups,work_location,manager,team" - EmployeesRetrieveRequestExpandGroupsWorkLocationManagerTeamCompany EmployeesRetrieveRequestExpand = "groups,work_location,manager,team,company" - EmployeesRetrieveRequestExpandGroupsWorkLocationManagerTeamCompanyPayGroup EmployeesRetrieveRequestExpand = "groups,work_location,manager,team,company,pay_group" - EmployeesRetrieveRequestExpandGroupsWorkLocationManagerTeamPayGroup EmployeesRetrieveRequestExpand = "groups,work_location,manager,team,pay_group" - EmployeesRetrieveRequestExpandGroupsWorkLocationPayGroup EmployeesRetrieveRequestExpand = "groups,work_location,pay_group" - EmployeesRetrieveRequestExpandGroupsWorkLocationTeam EmployeesRetrieveRequestExpand = "groups,work_location,team" - EmployeesRetrieveRequestExpandGroupsWorkLocationTeamCompany EmployeesRetrieveRequestExpand = "groups,work_location,team,company" - EmployeesRetrieveRequestExpandGroupsWorkLocationTeamCompanyPayGroup EmployeesRetrieveRequestExpand = "groups,work_location,team,company,pay_group" - EmployeesRetrieveRequestExpandGroupsWorkLocationTeamPayGroup EmployeesRetrieveRequestExpand = "groups,work_location,team,pay_group" - EmployeesRetrieveRequestExpandHomeLocation EmployeesRetrieveRequestExpand = "home_location" - EmployeesRetrieveRequestExpandHomeLocationCompany EmployeesRetrieveRequestExpand = "home_location,company" - EmployeesRetrieveRequestExpandHomeLocationCompanyPayGroup EmployeesRetrieveRequestExpand = "home_location,company,pay_group" - EmployeesRetrieveRequestExpandHomeLocationManager EmployeesRetrieveRequestExpand = "home_location,manager" - EmployeesRetrieveRequestExpandHomeLocationManagerCompany EmployeesRetrieveRequestExpand = "home_location,manager,company" - EmployeesRetrieveRequestExpandHomeLocationManagerCompanyPayGroup EmployeesRetrieveRequestExpand = "home_location,manager,company,pay_group" - EmployeesRetrieveRequestExpandHomeLocationManagerPayGroup EmployeesRetrieveRequestExpand = "home_location,manager,pay_group" - EmployeesRetrieveRequestExpandHomeLocationManagerTeam EmployeesRetrieveRequestExpand = "home_location,manager,team" - EmployeesRetrieveRequestExpandHomeLocationManagerTeamCompany EmployeesRetrieveRequestExpand = "home_location,manager,team,company" - EmployeesRetrieveRequestExpandHomeLocationManagerTeamCompanyPayGroup EmployeesRetrieveRequestExpand = "home_location,manager,team,company,pay_group" - EmployeesRetrieveRequestExpandHomeLocationManagerTeamPayGroup EmployeesRetrieveRequestExpand = "home_location,manager,team,pay_group" - EmployeesRetrieveRequestExpandHomeLocationPayGroup EmployeesRetrieveRequestExpand = "home_location,pay_group" - EmployeesRetrieveRequestExpandHomeLocationTeam EmployeesRetrieveRequestExpand = "home_location,team" - EmployeesRetrieveRequestExpandHomeLocationTeamCompany EmployeesRetrieveRequestExpand = "home_location,team,company" - EmployeesRetrieveRequestExpandHomeLocationTeamCompanyPayGroup EmployeesRetrieveRequestExpand = "home_location,team,company,pay_group" - EmployeesRetrieveRequestExpandHomeLocationTeamPayGroup EmployeesRetrieveRequestExpand = "home_location,team,pay_group" - EmployeesRetrieveRequestExpandHomeLocationWorkLocation EmployeesRetrieveRequestExpand = "home_location,work_location" - EmployeesRetrieveRequestExpandHomeLocationWorkLocationCompany EmployeesRetrieveRequestExpand = "home_location,work_location,company" - EmployeesRetrieveRequestExpandHomeLocationWorkLocationCompanyPayGroup EmployeesRetrieveRequestExpand = "home_location,work_location,company,pay_group" - EmployeesRetrieveRequestExpandHomeLocationWorkLocationManager EmployeesRetrieveRequestExpand = "home_location,work_location,manager" - EmployeesRetrieveRequestExpandHomeLocationWorkLocationManagerCompany EmployeesRetrieveRequestExpand = "home_location,work_location,manager,company" - EmployeesRetrieveRequestExpandHomeLocationWorkLocationManagerCompanyPayGroup EmployeesRetrieveRequestExpand = "home_location,work_location,manager,company,pay_group" - EmployeesRetrieveRequestExpandHomeLocationWorkLocationManagerPayGroup EmployeesRetrieveRequestExpand = "home_location,work_location,manager,pay_group" - EmployeesRetrieveRequestExpandHomeLocationWorkLocationManagerTeam EmployeesRetrieveRequestExpand = "home_location,work_location,manager,team" - EmployeesRetrieveRequestExpandHomeLocationWorkLocationManagerTeamCompany EmployeesRetrieveRequestExpand = "home_location,work_location,manager,team,company" - EmployeesRetrieveRequestExpandHomeLocationWorkLocationManagerTeamCompanyPayGroup EmployeesRetrieveRequestExpand = "home_location,work_location,manager,team,company,pay_group" - EmployeesRetrieveRequestExpandHomeLocationWorkLocationManagerTeamPayGroup EmployeesRetrieveRequestExpand = "home_location,work_location,manager,team,pay_group" - EmployeesRetrieveRequestExpandHomeLocationWorkLocationPayGroup EmployeesRetrieveRequestExpand = "home_location,work_location,pay_group" - EmployeesRetrieveRequestExpandHomeLocationWorkLocationTeam EmployeesRetrieveRequestExpand = "home_location,work_location,team" - EmployeesRetrieveRequestExpandHomeLocationWorkLocationTeamCompany EmployeesRetrieveRequestExpand = "home_location,work_location,team,company" - EmployeesRetrieveRequestExpandHomeLocationWorkLocationTeamCompanyPayGroup EmployeesRetrieveRequestExpand = "home_location,work_location,team,company,pay_group" - EmployeesRetrieveRequestExpandHomeLocationWorkLocationTeamPayGroup EmployeesRetrieveRequestExpand = "home_location,work_location,team,pay_group" - EmployeesRetrieveRequestExpandManager EmployeesRetrieveRequestExpand = "manager" - EmployeesRetrieveRequestExpandManagerCompany EmployeesRetrieveRequestExpand = "manager,company" - EmployeesRetrieveRequestExpandManagerCompanyPayGroup EmployeesRetrieveRequestExpand = "manager,company,pay_group" - EmployeesRetrieveRequestExpandManagerPayGroup EmployeesRetrieveRequestExpand = "manager,pay_group" - EmployeesRetrieveRequestExpandManagerTeam EmployeesRetrieveRequestExpand = "manager,team" - EmployeesRetrieveRequestExpandManagerTeamCompany EmployeesRetrieveRequestExpand = "manager,team,company" - EmployeesRetrieveRequestExpandManagerTeamCompanyPayGroup EmployeesRetrieveRequestExpand = "manager,team,company,pay_group" - EmployeesRetrieveRequestExpandManagerTeamPayGroup EmployeesRetrieveRequestExpand = "manager,team,pay_group" - EmployeesRetrieveRequestExpandPayGroup EmployeesRetrieveRequestExpand = "pay_group" - EmployeesRetrieveRequestExpandTeam EmployeesRetrieveRequestExpand = "team" - EmployeesRetrieveRequestExpandTeamCompany EmployeesRetrieveRequestExpand = "team,company" - EmployeesRetrieveRequestExpandTeamCompanyPayGroup EmployeesRetrieveRequestExpand = "team,company,pay_group" - EmployeesRetrieveRequestExpandTeamPayGroup EmployeesRetrieveRequestExpand = "team,pay_group" - EmployeesRetrieveRequestExpandWorkLocation EmployeesRetrieveRequestExpand = "work_location" - EmployeesRetrieveRequestExpandWorkLocationCompany EmployeesRetrieveRequestExpand = "work_location,company" - EmployeesRetrieveRequestExpandWorkLocationCompanyPayGroup EmployeesRetrieveRequestExpand = "work_location,company,pay_group" - EmployeesRetrieveRequestExpandWorkLocationManager EmployeesRetrieveRequestExpand = "work_location,manager" - EmployeesRetrieveRequestExpandWorkLocationManagerCompany EmployeesRetrieveRequestExpand = "work_location,manager,company" - EmployeesRetrieveRequestExpandWorkLocationManagerCompanyPayGroup EmployeesRetrieveRequestExpand = "work_location,manager,company,pay_group" - EmployeesRetrieveRequestExpandWorkLocationManagerPayGroup EmployeesRetrieveRequestExpand = "work_location,manager,pay_group" - EmployeesRetrieveRequestExpandWorkLocationManagerTeam EmployeesRetrieveRequestExpand = "work_location,manager,team" - EmployeesRetrieveRequestExpandWorkLocationManagerTeamCompany EmployeesRetrieveRequestExpand = "work_location,manager,team,company" - EmployeesRetrieveRequestExpandWorkLocationManagerTeamCompanyPayGroup EmployeesRetrieveRequestExpand = "work_location,manager,team,company,pay_group" - EmployeesRetrieveRequestExpandWorkLocationManagerTeamPayGroup EmployeesRetrieveRequestExpand = "work_location,manager,team,pay_group" - EmployeesRetrieveRequestExpandWorkLocationPayGroup EmployeesRetrieveRequestExpand = "work_location,pay_group" - EmployeesRetrieveRequestExpandWorkLocationTeam EmployeesRetrieveRequestExpand = "work_location,team" - EmployeesRetrieveRequestExpandWorkLocationTeamCompany EmployeesRetrieveRequestExpand = "work_location,team,company" - EmployeesRetrieveRequestExpandWorkLocationTeamCompanyPayGroup EmployeesRetrieveRequestExpand = "work_location,team,company,pay_group" - EmployeesRetrieveRequestExpandWorkLocationTeamPayGroup EmployeesRetrieveRequestExpand = "work_location,team,pay_group" + EmployeesRetrieveRequestExpandItemCompany EmployeesRetrieveRequestExpandItem = "company" + EmployeesRetrieveRequestExpandItemEmployments EmployeesRetrieveRequestExpandItem = "employments" + EmployeesRetrieveRequestExpandItemGroups EmployeesRetrieveRequestExpandItem = "groups" + EmployeesRetrieveRequestExpandItemHomeLocation EmployeesRetrieveRequestExpandItem = "home_location" + EmployeesRetrieveRequestExpandItemManager EmployeesRetrieveRequestExpandItem = "manager" + EmployeesRetrieveRequestExpandItemPayGroup EmployeesRetrieveRequestExpandItem = "pay_group" + EmployeesRetrieveRequestExpandItemTeam EmployeesRetrieveRequestExpandItem = "team" + EmployeesRetrieveRequestExpandItemWorkLocation EmployeesRetrieveRequestExpandItem = "work_location" ) -func NewEmployeesRetrieveRequestExpandFromString(s string) (EmployeesRetrieveRequestExpand, error) { +func NewEmployeesRetrieveRequestExpandItemFromString(s string) (EmployeesRetrieveRequestExpandItem, error) { switch s { case "company": - return EmployeesRetrieveRequestExpandCompany, nil - case "company,pay_group": - return EmployeesRetrieveRequestExpandCompanyPayGroup, nil + return EmployeesRetrieveRequestExpandItemCompany, nil case "employments": - return EmployeesRetrieveRequestExpandEmployments, nil - case "employments,company": - return EmployeesRetrieveRequestExpandEmploymentsCompany, nil - case "employments,company,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsCompanyPayGroup, nil - case "employments,groups": - return EmployeesRetrieveRequestExpandEmploymentsGroups, nil - case "employments,groups,company": - return EmployeesRetrieveRequestExpandEmploymentsGroupsCompany, nil - case "employments,groups,company,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsGroupsCompanyPayGroup, nil - case "employments,groups,home_location": - return EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocation, nil - case "employments,groups,home_location,company": - return EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationCompany, nil - case "employments,groups,home_location,company,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationCompanyPayGroup, nil - case "employments,groups,home_location,manager": - return EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationManager, nil - case "employments,groups,home_location,manager,company": - return EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationManagerCompany, nil - case "employments,groups,home_location,manager,company,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationManagerCompanyPayGroup, nil - case "employments,groups,home_location,manager,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationManagerPayGroup, nil - case "employments,groups,home_location,manager,team": - return EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationManagerTeam, nil - case "employments,groups,home_location,manager,team,company": - return EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationManagerTeamCompany, nil - case "employments,groups,home_location,manager,team,company,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationManagerTeamCompanyPayGroup, nil - case "employments,groups,home_location,manager,team,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationManagerTeamPayGroup, nil - case "employments,groups,home_location,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationPayGroup, nil - case "employments,groups,home_location,team": - return EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationTeam, nil - case "employments,groups,home_location,team,company": - return EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationTeamCompany, nil - case "employments,groups,home_location,team,company,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationTeamCompanyPayGroup, nil - case "employments,groups,home_location,team,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationTeamPayGroup, nil - case "employments,groups,home_location,work_location": - return EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationWorkLocation, nil - case "employments,groups,home_location,work_location,company": - return EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationWorkLocationCompany, nil - case "employments,groups,home_location,work_location,company,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationWorkLocationCompanyPayGroup, nil - case "employments,groups,home_location,work_location,manager": - return EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationWorkLocationManager, nil - case "employments,groups,home_location,work_location,manager,company": - return EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationWorkLocationManagerCompany, nil - case "employments,groups,home_location,work_location,manager,company,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationWorkLocationManagerCompanyPayGroup, nil - case "employments,groups,home_location,work_location,manager,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationWorkLocationManagerPayGroup, nil - case "employments,groups,home_location,work_location,manager,team": - return EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationWorkLocationManagerTeam, nil - case "employments,groups,home_location,work_location,manager,team,company": - return EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationWorkLocationManagerTeamCompany, nil - case "employments,groups,home_location,work_location,manager,team,company,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationWorkLocationManagerTeamCompanyPayGroup, nil - case "employments,groups,home_location,work_location,manager,team,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationWorkLocationManagerTeamPayGroup, nil - case "employments,groups,home_location,work_location,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationWorkLocationPayGroup, nil - case "employments,groups,home_location,work_location,team": - return EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationWorkLocationTeam, nil - case "employments,groups,home_location,work_location,team,company": - return EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationWorkLocationTeamCompany, nil - case "employments,groups,home_location,work_location,team,company,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationWorkLocationTeamCompanyPayGroup, nil - case "employments,groups,home_location,work_location,team,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsGroupsHomeLocationWorkLocationTeamPayGroup, nil - case "employments,groups,manager": - return EmployeesRetrieveRequestExpandEmploymentsGroupsManager, nil - case "employments,groups,manager,company": - return EmployeesRetrieveRequestExpandEmploymentsGroupsManagerCompany, nil - case "employments,groups,manager,company,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsGroupsManagerCompanyPayGroup, nil - case "employments,groups,manager,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsGroupsManagerPayGroup, nil - case "employments,groups,manager,team": - return EmployeesRetrieveRequestExpandEmploymentsGroupsManagerTeam, nil - case "employments,groups,manager,team,company": - return EmployeesRetrieveRequestExpandEmploymentsGroupsManagerTeamCompany, nil - case "employments,groups,manager,team,company,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsGroupsManagerTeamCompanyPayGroup, nil - case "employments,groups,manager,team,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsGroupsManagerTeamPayGroup, nil - case "employments,groups,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsGroupsPayGroup, nil - case "employments,groups,team": - return EmployeesRetrieveRequestExpandEmploymentsGroupsTeam, nil - case "employments,groups,team,company": - return EmployeesRetrieveRequestExpandEmploymentsGroupsTeamCompany, nil - case "employments,groups,team,company,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsGroupsTeamCompanyPayGroup, nil - case "employments,groups,team,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsGroupsTeamPayGroup, nil - case "employments,groups,work_location": - return EmployeesRetrieveRequestExpandEmploymentsGroupsWorkLocation, nil - case "employments,groups,work_location,company": - return EmployeesRetrieveRequestExpandEmploymentsGroupsWorkLocationCompany, nil - case "employments,groups,work_location,company,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsGroupsWorkLocationCompanyPayGroup, nil - case "employments,groups,work_location,manager": - return EmployeesRetrieveRequestExpandEmploymentsGroupsWorkLocationManager, nil - case "employments,groups,work_location,manager,company": - return EmployeesRetrieveRequestExpandEmploymentsGroupsWorkLocationManagerCompany, nil - case "employments,groups,work_location,manager,company,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsGroupsWorkLocationManagerCompanyPayGroup, nil - case "employments,groups,work_location,manager,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsGroupsWorkLocationManagerPayGroup, nil - case "employments,groups,work_location,manager,team": - return EmployeesRetrieveRequestExpandEmploymentsGroupsWorkLocationManagerTeam, nil - case "employments,groups,work_location,manager,team,company": - return EmployeesRetrieveRequestExpandEmploymentsGroupsWorkLocationManagerTeamCompany, nil - case "employments,groups,work_location,manager,team,company,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsGroupsWorkLocationManagerTeamCompanyPayGroup, nil - case "employments,groups,work_location,manager,team,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsGroupsWorkLocationManagerTeamPayGroup, nil - case "employments,groups,work_location,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsGroupsWorkLocationPayGroup, nil - case "employments,groups,work_location,team": - return EmployeesRetrieveRequestExpandEmploymentsGroupsWorkLocationTeam, nil - case "employments,groups,work_location,team,company": - return EmployeesRetrieveRequestExpandEmploymentsGroupsWorkLocationTeamCompany, nil - case "employments,groups,work_location,team,company,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsGroupsWorkLocationTeamCompanyPayGroup, nil - case "employments,groups,work_location,team,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsGroupsWorkLocationTeamPayGroup, nil - case "employments,home_location": - return EmployeesRetrieveRequestExpandEmploymentsHomeLocation, nil - case "employments,home_location,company": - return EmployeesRetrieveRequestExpandEmploymentsHomeLocationCompany, nil - case "employments,home_location,company,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsHomeLocationCompanyPayGroup, nil - case "employments,home_location,manager": - return EmployeesRetrieveRequestExpandEmploymentsHomeLocationManager, nil - case "employments,home_location,manager,company": - return EmployeesRetrieveRequestExpandEmploymentsHomeLocationManagerCompany, nil - case "employments,home_location,manager,company,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsHomeLocationManagerCompanyPayGroup, nil - case "employments,home_location,manager,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsHomeLocationManagerPayGroup, nil - case "employments,home_location,manager,team": - return EmployeesRetrieveRequestExpandEmploymentsHomeLocationManagerTeam, nil - case "employments,home_location,manager,team,company": - return EmployeesRetrieveRequestExpandEmploymentsHomeLocationManagerTeamCompany, nil - case "employments,home_location,manager,team,company,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsHomeLocationManagerTeamCompanyPayGroup, nil - case "employments,home_location,manager,team,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsHomeLocationManagerTeamPayGroup, nil - case "employments,home_location,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsHomeLocationPayGroup, nil - case "employments,home_location,team": - return EmployeesRetrieveRequestExpandEmploymentsHomeLocationTeam, nil - case "employments,home_location,team,company": - return EmployeesRetrieveRequestExpandEmploymentsHomeLocationTeamCompany, nil - case "employments,home_location,team,company,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsHomeLocationTeamCompanyPayGroup, nil - case "employments,home_location,team,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsHomeLocationTeamPayGroup, nil - case "employments,home_location,work_location": - return EmployeesRetrieveRequestExpandEmploymentsHomeLocationWorkLocation, nil - case "employments,home_location,work_location,company": - return EmployeesRetrieveRequestExpandEmploymentsHomeLocationWorkLocationCompany, nil - case "employments,home_location,work_location,company,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsHomeLocationWorkLocationCompanyPayGroup, nil - case "employments,home_location,work_location,manager": - return EmployeesRetrieveRequestExpandEmploymentsHomeLocationWorkLocationManager, nil - case "employments,home_location,work_location,manager,company": - return EmployeesRetrieveRequestExpandEmploymentsHomeLocationWorkLocationManagerCompany, nil - case "employments,home_location,work_location,manager,company,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsHomeLocationWorkLocationManagerCompanyPayGroup, nil - case "employments,home_location,work_location,manager,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsHomeLocationWorkLocationManagerPayGroup, nil - case "employments,home_location,work_location,manager,team": - return EmployeesRetrieveRequestExpandEmploymentsHomeLocationWorkLocationManagerTeam, nil - case "employments,home_location,work_location,manager,team,company": - return EmployeesRetrieveRequestExpandEmploymentsHomeLocationWorkLocationManagerTeamCompany, nil - case "employments,home_location,work_location,manager,team,company,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsHomeLocationWorkLocationManagerTeamCompanyPayGroup, nil - case "employments,home_location,work_location,manager,team,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsHomeLocationWorkLocationManagerTeamPayGroup, nil - case "employments,home_location,work_location,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsHomeLocationWorkLocationPayGroup, nil - case "employments,home_location,work_location,team": - return EmployeesRetrieveRequestExpandEmploymentsHomeLocationWorkLocationTeam, nil - case "employments,home_location,work_location,team,company": - return EmployeesRetrieveRequestExpandEmploymentsHomeLocationWorkLocationTeamCompany, nil - case "employments,home_location,work_location,team,company,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsHomeLocationWorkLocationTeamCompanyPayGroup, nil - case "employments,home_location,work_location,team,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsHomeLocationWorkLocationTeamPayGroup, nil - case "employments,manager": - return EmployeesRetrieveRequestExpandEmploymentsManager, nil - case "employments,manager,company": - return EmployeesRetrieveRequestExpandEmploymentsManagerCompany, nil - case "employments,manager,company,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsManagerCompanyPayGroup, nil - case "employments,manager,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsManagerPayGroup, nil - case "employments,manager,team": - return EmployeesRetrieveRequestExpandEmploymentsManagerTeam, nil - case "employments,manager,team,company": - return EmployeesRetrieveRequestExpandEmploymentsManagerTeamCompany, nil - case "employments,manager,team,company,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsManagerTeamCompanyPayGroup, nil - case "employments,manager,team,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsManagerTeamPayGroup, nil - case "employments,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsPayGroup, nil - case "employments,team": - return EmployeesRetrieveRequestExpandEmploymentsTeam, nil - case "employments,team,company": - return EmployeesRetrieveRequestExpandEmploymentsTeamCompany, nil - case "employments,team,company,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsTeamCompanyPayGroup, nil - case "employments,team,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsTeamPayGroup, nil - case "employments,work_location": - return EmployeesRetrieveRequestExpandEmploymentsWorkLocation, nil - case "employments,work_location,company": - return EmployeesRetrieveRequestExpandEmploymentsWorkLocationCompany, nil - case "employments,work_location,company,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsWorkLocationCompanyPayGroup, nil - case "employments,work_location,manager": - return EmployeesRetrieveRequestExpandEmploymentsWorkLocationManager, nil - case "employments,work_location,manager,company": - return EmployeesRetrieveRequestExpandEmploymentsWorkLocationManagerCompany, nil - case "employments,work_location,manager,company,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsWorkLocationManagerCompanyPayGroup, nil - case "employments,work_location,manager,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsWorkLocationManagerPayGroup, nil - case "employments,work_location,manager,team": - return EmployeesRetrieveRequestExpandEmploymentsWorkLocationManagerTeam, nil - case "employments,work_location,manager,team,company": - return EmployeesRetrieveRequestExpandEmploymentsWorkLocationManagerTeamCompany, nil - case "employments,work_location,manager,team,company,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsWorkLocationManagerTeamCompanyPayGroup, nil - case "employments,work_location,manager,team,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsWorkLocationManagerTeamPayGroup, nil - case "employments,work_location,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsWorkLocationPayGroup, nil - case "employments,work_location,team": - return EmployeesRetrieveRequestExpandEmploymentsWorkLocationTeam, nil - case "employments,work_location,team,company": - return EmployeesRetrieveRequestExpandEmploymentsWorkLocationTeamCompany, nil - case "employments,work_location,team,company,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsWorkLocationTeamCompanyPayGroup, nil - case "employments,work_location,team,pay_group": - return EmployeesRetrieveRequestExpandEmploymentsWorkLocationTeamPayGroup, nil + return EmployeesRetrieveRequestExpandItemEmployments, nil case "groups": - return EmployeesRetrieveRequestExpandGroups, nil - case "groups,company": - return EmployeesRetrieveRequestExpandGroupsCompany, nil - case "groups,company,pay_group": - return EmployeesRetrieveRequestExpandGroupsCompanyPayGroup, nil - case "groups,home_location": - return EmployeesRetrieveRequestExpandGroupsHomeLocation, nil - case "groups,home_location,company": - return EmployeesRetrieveRequestExpandGroupsHomeLocationCompany, nil - case "groups,home_location,company,pay_group": - return EmployeesRetrieveRequestExpandGroupsHomeLocationCompanyPayGroup, nil - case "groups,home_location,manager": - return EmployeesRetrieveRequestExpandGroupsHomeLocationManager, nil - case "groups,home_location,manager,company": - return EmployeesRetrieveRequestExpandGroupsHomeLocationManagerCompany, nil - case "groups,home_location,manager,company,pay_group": - return EmployeesRetrieveRequestExpandGroupsHomeLocationManagerCompanyPayGroup, nil - case "groups,home_location,manager,pay_group": - return EmployeesRetrieveRequestExpandGroupsHomeLocationManagerPayGroup, nil - case "groups,home_location,manager,team": - return EmployeesRetrieveRequestExpandGroupsHomeLocationManagerTeam, nil - case "groups,home_location,manager,team,company": - return EmployeesRetrieveRequestExpandGroupsHomeLocationManagerTeamCompany, nil - case "groups,home_location,manager,team,company,pay_group": - return EmployeesRetrieveRequestExpandGroupsHomeLocationManagerTeamCompanyPayGroup, nil - case "groups,home_location,manager,team,pay_group": - return EmployeesRetrieveRequestExpandGroupsHomeLocationManagerTeamPayGroup, nil - case "groups,home_location,pay_group": - return EmployeesRetrieveRequestExpandGroupsHomeLocationPayGroup, nil - case "groups,home_location,team": - return EmployeesRetrieveRequestExpandGroupsHomeLocationTeam, nil - case "groups,home_location,team,company": - return EmployeesRetrieveRequestExpandGroupsHomeLocationTeamCompany, nil - case "groups,home_location,team,company,pay_group": - return EmployeesRetrieveRequestExpandGroupsHomeLocationTeamCompanyPayGroup, nil - case "groups,home_location,team,pay_group": - return EmployeesRetrieveRequestExpandGroupsHomeLocationTeamPayGroup, nil - case "groups,home_location,work_location": - return EmployeesRetrieveRequestExpandGroupsHomeLocationWorkLocation, nil - case "groups,home_location,work_location,company": - return EmployeesRetrieveRequestExpandGroupsHomeLocationWorkLocationCompany, nil - case "groups,home_location,work_location,company,pay_group": - return EmployeesRetrieveRequestExpandGroupsHomeLocationWorkLocationCompanyPayGroup, nil - case "groups,home_location,work_location,manager": - return EmployeesRetrieveRequestExpandGroupsHomeLocationWorkLocationManager, nil - case "groups,home_location,work_location,manager,company": - return EmployeesRetrieveRequestExpandGroupsHomeLocationWorkLocationManagerCompany, nil - case "groups,home_location,work_location,manager,company,pay_group": - return EmployeesRetrieveRequestExpandGroupsHomeLocationWorkLocationManagerCompanyPayGroup, nil - case "groups,home_location,work_location,manager,pay_group": - return EmployeesRetrieveRequestExpandGroupsHomeLocationWorkLocationManagerPayGroup, nil - case "groups,home_location,work_location,manager,team": - return EmployeesRetrieveRequestExpandGroupsHomeLocationWorkLocationManagerTeam, nil - case "groups,home_location,work_location,manager,team,company": - return EmployeesRetrieveRequestExpandGroupsHomeLocationWorkLocationManagerTeamCompany, nil - case "groups,home_location,work_location,manager,team,company,pay_group": - return EmployeesRetrieveRequestExpandGroupsHomeLocationWorkLocationManagerTeamCompanyPayGroup, nil - case "groups,home_location,work_location,manager,team,pay_group": - return EmployeesRetrieveRequestExpandGroupsHomeLocationWorkLocationManagerTeamPayGroup, nil - case "groups,home_location,work_location,pay_group": - return EmployeesRetrieveRequestExpandGroupsHomeLocationWorkLocationPayGroup, nil - case "groups,home_location,work_location,team": - return EmployeesRetrieveRequestExpandGroupsHomeLocationWorkLocationTeam, nil - case "groups,home_location,work_location,team,company": - return EmployeesRetrieveRequestExpandGroupsHomeLocationWorkLocationTeamCompany, nil - case "groups,home_location,work_location,team,company,pay_group": - return EmployeesRetrieveRequestExpandGroupsHomeLocationWorkLocationTeamCompanyPayGroup, nil - case "groups,home_location,work_location,team,pay_group": - return EmployeesRetrieveRequestExpandGroupsHomeLocationWorkLocationTeamPayGroup, nil - case "groups,manager": - return EmployeesRetrieveRequestExpandGroupsManager, nil - case "groups,manager,company": - return EmployeesRetrieveRequestExpandGroupsManagerCompany, nil - case "groups,manager,company,pay_group": - return EmployeesRetrieveRequestExpandGroupsManagerCompanyPayGroup, nil - case "groups,manager,pay_group": - return EmployeesRetrieveRequestExpandGroupsManagerPayGroup, nil - case "groups,manager,team": - return EmployeesRetrieveRequestExpandGroupsManagerTeam, nil - case "groups,manager,team,company": - return EmployeesRetrieveRequestExpandGroupsManagerTeamCompany, nil - case "groups,manager,team,company,pay_group": - return EmployeesRetrieveRequestExpandGroupsManagerTeamCompanyPayGroup, nil - case "groups,manager,team,pay_group": - return EmployeesRetrieveRequestExpandGroupsManagerTeamPayGroup, nil - case "groups,pay_group": - return EmployeesRetrieveRequestExpandGroupsPayGroup, nil - case "groups,team": - return EmployeesRetrieveRequestExpandGroupsTeam, nil - case "groups,team,company": - return EmployeesRetrieveRequestExpandGroupsTeamCompany, nil - case "groups,team,company,pay_group": - return EmployeesRetrieveRequestExpandGroupsTeamCompanyPayGroup, nil - case "groups,team,pay_group": - return EmployeesRetrieveRequestExpandGroupsTeamPayGroup, nil - case "groups,work_location": - return EmployeesRetrieveRequestExpandGroupsWorkLocation, nil - case "groups,work_location,company": - return EmployeesRetrieveRequestExpandGroupsWorkLocationCompany, nil - case "groups,work_location,company,pay_group": - return EmployeesRetrieveRequestExpandGroupsWorkLocationCompanyPayGroup, nil - case "groups,work_location,manager": - return EmployeesRetrieveRequestExpandGroupsWorkLocationManager, nil - case "groups,work_location,manager,company": - return EmployeesRetrieveRequestExpandGroupsWorkLocationManagerCompany, nil - case "groups,work_location,manager,company,pay_group": - return EmployeesRetrieveRequestExpandGroupsWorkLocationManagerCompanyPayGroup, nil - case "groups,work_location,manager,pay_group": - return EmployeesRetrieveRequestExpandGroupsWorkLocationManagerPayGroup, nil - case "groups,work_location,manager,team": - return EmployeesRetrieveRequestExpandGroupsWorkLocationManagerTeam, nil - case "groups,work_location,manager,team,company": - return EmployeesRetrieveRequestExpandGroupsWorkLocationManagerTeamCompany, nil - case "groups,work_location,manager,team,company,pay_group": - return EmployeesRetrieveRequestExpandGroupsWorkLocationManagerTeamCompanyPayGroup, nil - case "groups,work_location,manager,team,pay_group": - return EmployeesRetrieveRequestExpandGroupsWorkLocationManagerTeamPayGroup, nil - case "groups,work_location,pay_group": - return EmployeesRetrieveRequestExpandGroupsWorkLocationPayGroup, nil - case "groups,work_location,team": - return EmployeesRetrieveRequestExpandGroupsWorkLocationTeam, nil - case "groups,work_location,team,company": - return EmployeesRetrieveRequestExpandGroupsWorkLocationTeamCompany, nil - case "groups,work_location,team,company,pay_group": - return EmployeesRetrieveRequestExpandGroupsWorkLocationTeamCompanyPayGroup, nil - case "groups,work_location,team,pay_group": - return EmployeesRetrieveRequestExpandGroupsWorkLocationTeamPayGroup, nil + return EmployeesRetrieveRequestExpandItemGroups, nil case "home_location": - return EmployeesRetrieveRequestExpandHomeLocation, nil - case "home_location,company": - return EmployeesRetrieveRequestExpandHomeLocationCompany, nil - case "home_location,company,pay_group": - return EmployeesRetrieveRequestExpandHomeLocationCompanyPayGroup, nil - case "home_location,manager": - return EmployeesRetrieveRequestExpandHomeLocationManager, nil - case "home_location,manager,company": - return EmployeesRetrieveRequestExpandHomeLocationManagerCompany, nil - case "home_location,manager,company,pay_group": - return EmployeesRetrieveRequestExpandHomeLocationManagerCompanyPayGroup, nil - case "home_location,manager,pay_group": - return EmployeesRetrieveRequestExpandHomeLocationManagerPayGroup, nil - case "home_location,manager,team": - return EmployeesRetrieveRequestExpandHomeLocationManagerTeam, nil - case "home_location,manager,team,company": - return EmployeesRetrieveRequestExpandHomeLocationManagerTeamCompany, nil - case "home_location,manager,team,company,pay_group": - return EmployeesRetrieveRequestExpandHomeLocationManagerTeamCompanyPayGroup, nil - case "home_location,manager,team,pay_group": - return EmployeesRetrieveRequestExpandHomeLocationManagerTeamPayGroup, nil - case "home_location,pay_group": - return EmployeesRetrieveRequestExpandHomeLocationPayGroup, nil - case "home_location,team": - return EmployeesRetrieveRequestExpandHomeLocationTeam, nil - case "home_location,team,company": - return EmployeesRetrieveRequestExpandHomeLocationTeamCompany, nil - case "home_location,team,company,pay_group": - return EmployeesRetrieveRequestExpandHomeLocationTeamCompanyPayGroup, nil - case "home_location,team,pay_group": - return EmployeesRetrieveRequestExpandHomeLocationTeamPayGroup, nil - case "home_location,work_location": - return EmployeesRetrieveRequestExpandHomeLocationWorkLocation, nil - case "home_location,work_location,company": - return EmployeesRetrieveRequestExpandHomeLocationWorkLocationCompany, nil - case "home_location,work_location,company,pay_group": - return EmployeesRetrieveRequestExpandHomeLocationWorkLocationCompanyPayGroup, nil - case "home_location,work_location,manager": - return EmployeesRetrieveRequestExpandHomeLocationWorkLocationManager, nil - case "home_location,work_location,manager,company": - return EmployeesRetrieveRequestExpandHomeLocationWorkLocationManagerCompany, nil - case "home_location,work_location,manager,company,pay_group": - return EmployeesRetrieveRequestExpandHomeLocationWorkLocationManagerCompanyPayGroup, nil - case "home_location,work_location,manager,pay_group": - return EmployeesRetrieveRequestExpandHomeLocationWorkLocationManagerPayGroup, nil - case "home_location,work_location,manager,team": - return EmployeesRetrieveRequestExpandHomeLocationWorkLocationManagerTeam, nil - case "home_location,work_location,manager,team,company": - return EmployeesRetrieveRequestExpandHomeLocationWorkLocationManagerTeamCompany, nil - case "home_location,work_location,manager,team,company,pay_group": - return EmployeesRetrieveRequestExpandHomeLocationWorkLocationManagerTeamCompanyPayGroup, nil - case "home_location,work_location,manager,team,pay_group": - return EmployeesRetrieveRequestExpandHomeLocationWorkLocationManagerTeamPayGroup, nil - case "home_location,work_location,pay_group": - return EmployeesRetrieveRequestExpandHomeLocationWorkLocationPayGroup, nil - case "home_location,work_location,team": - return EmployeesRetrieveRequestExpandHomeLocationWorkLocationTeam, nil - case "home_location,work_location,team,company": - return EmployeesRetrieveRequestExpandHomeLocationWorkLocationTeamCompany, nil - case "home_location,work_location,team,company,pay_group": - return EmployeesRetrieveRequestExpandHomeLocationWorkLocationTeamCompanyPayGroup, nil - case "home_location,work_location,team,pay_group": - return EmployeesRetrieveRequestExpandHomeLocationWorkLocationTeamPayGroup, nil + return EmployeesRetrieveRequestExpandItemHomeLocation, nil case "manager": - return EmployeesRetrieveRequestExpandManager, nil - case "manager,company": - return EmployeesRetrieveRequestExpandManagerCompany, nil - case "manager,company,pay_group": - return EmployeesRetrieveRequestExpandManagerCompanyPayGroup, nil - case "manager,pay_group": - return EmployeesRetrieveRequestExpandManagerPayGroup, nil - case "manager,team": - return EmployeesRetrieveRequestExpandManagerTeam, nil - case "manager,team,company": - return EmployeesRetrieveRequestExpandManagerTeamCompany, nil - case "manager,team,company,pay_group": - return EmployeesRetrieveRequestExpandManagerTeamCompanyPayGroup, nil - case "manager,team,pay_group": - return EmployeesRetrieveRequestExpandManagerTeamPayGroup, nil + return EmployeesRetrieveRequestExpandItemManager, nil case "pay_group": - return EmployeesRetrieveRequestExpandPayGroup, nil + return EmployeesRetrieveRequestExpandItemPayGroup, nil case "team": - return EmployeesRetrieveRequestExpandTeam, nil - case "team,company": - return EmployeesRetrieveRequestExpandTeamCompany, nil - case "team,company,pay_group": - return EmployeesRetrieveRequestExpandTeamCompanyPayGroup, nil - case "team,pay_group": - return EmployeesRetrieveRequestExpandTeamPayGroup, nil + return EmployeesRetrieveRequestExpandItemTeam, nil case "work_location": - return EmployeesRetrieveRequestExpandWorkLocation, nil - case "work_location,company": - return EmployeesRetrieveRequestExpandWorkLocationCompany, nil - case "work_location,company,pay_group": - return EmployeesRetrieveRequestExpandWorkLocationCompanyPayGroup, nil - case "work_location,manager": - return EmployeesRetrieveRequestExpandWorkLocationManager, nil - case "work_location,manager,company": - return EmployeesRetrieveRequestExpandWorkLocationManagerCompany, nil - case "work_location,manager,company,pay_group": - return EmployeesRetrieveRequestExpandWorkLocationManagerCompanyPayGroup, nil - case "work_location,manager,pay_group": - return EmployeesRetrieveRequestExpandWorkLocationManagerPayGroup, nil - case "work_location,manager,team": - return EmployeesRetrieveRequestExpandWorkLocationManagerTeam, nil - case "work_location,manager,team,company": - return EmployeesRetrieveRequestExpandWorkLocationManagerTeamCompany, nil - case "work_location,manager,team,company,pay_group": - return EmployeesRetrieveRequestExpandWorkLocationManagerTeamCompanyPayGroup, nil - case "work_location,manager,team,pay_group": - return EmployeesRetrieveRequestExpandWorkLocationManagerTeamPayGroup, nil - case "work_location,pay_group": - return EmployeesRetrieveRequestExpandWorkLocationPayGroup, nil - case "work_location,team": - return EmployeesRetrieveRequestExpandWorkLocationTeam, nil - case "work_location,team,company": - return EmployeesRetrieveRequestExpandWorkLocationTeamCompany, nil - case "work_location,team,company,pay_group": - return EmployeesRetrieveRequestExpandWorkLocationTeamCompanyPayGroup, nil - case "work_location,team,pay_group": - return EmployeesRetrieveRequestExpandWorkLocationTeamPayGroup, nil - } - var t EmployeesRetrieveRequestExpand + return EmployeesRetrieveRequestExpandItemWorkLocation, nil + } + var t EmployeesRetrieveRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (e EmployeesRetrieveRequestExpand) Ptr() *EmployeesRetrieveRequestExpand { +func (e EmployeesRetrieveRequestExpandItem) Ptr() *EmployeesRetrieveRequestExpandItem { return &e } @@ -1938,59 +454,1414 @@ func (e EmployeesRetrieveRequestShowEnumOrigins) Ptr() *EmployeesRetrieveRequest return &e } -type IgnoreCommonModelRequestReason struct { - typeName string - ReasonEnum ReasonEnum +// # The Employee Object +// ### Description +// The `Employee` object is used to represent any person who has been employed by a company. By default, it returns all employees. To filter for only active employees, set the `employment_status` query parameter to `ACTIVE`. +// +// ### Usage Example +// Fetch from the `LIST Employee` endpoint and filter by `ID` to show all employees. +type EmployeeRequest struct { + // The employee's number that appears in the third-party integration's UI. + EmployeeNumber *string `json:"employee_number,omitempty" url:"employee_number,omitempty"` + // The ID of the employee's company. + Company *EmployeeRequestCompany `json:"company,omitempty" url:"company,omitempty"` + // The employee's first name. + FirstName *string `json:"first_name,omitempty" url:"first_name,omitempty"` + // The employee's last name. + LastName *string `json:"last_name,omitempty" url:"last_name,omitempty"` + // The employee's preferred first name. + PreferredName *string `json:"preferred_name,omitempty" url:"preferred_name,omitempty"` + // The employee's full name, to use for display purposes. If a preferred first name is available, the full name will include the preferred first name. + DisplayFullName *string `json:"display_full_name,omitempty" url:"display_full_name,omitempty"` + // The employee's username that appears in the remote UI. + Username *string `json:"username,omitempty" url:"username,omitempty"` + Groups []*EmployeeRequestGroupsItem `json:"groups,omitempty" url:"groups,omitempty"` + // The employee's work email. + WorkEmail *string `json:"work_email,omitempty" url:"work_email,omitempty"` + // The employee's personal email. + PersonalEmail *string `json:"personal_email,omitempty" url:"personal_email,omitempty"` + // The employee's mobile phone number. + MobilePhoneNumber *string `json:"mobile_phone_number,omitempty" url:"mobile_phone_number,omitempty"` + // Array of `Employment` IDs for this Employee. + Employments []*EmployeeRequestEmploymentsItem `json:"employments,omitempty" url:"employments,omitempty"` + // The employee's home address. + HomeLocation *EmployeeRequestHomeLocation `json:"home_location,omitempty" url:"home_location,omitempty"` + // The employee's work address. + WorkLocation *EmployeeRequestWorkLocation `json:"work_location,omitempty" url:"work_location,omitempty"` + // The employee ID of the employee's manager. + Manager *EmployeeRequestManager `json:"manager,omitempty" url:"manager,omitempty"` + // The employee's team. + Team *EmployeeRequestTeam `json:"team,omitempty" url:"team,omitempty"` + // The employee's pay group + PayGroup *EmployeeRequestPayGroup `json:"pay_group,omitempty" url:"pay_group,omitempty"` + // The employee's social security number. + Ssn *string `json:"ssn,omitempty" url:"ssn,omitempty"` + // The employee's gender. + // + // * `MALE` - MALE + // * `FEMALE` - FEMALE + // * `NON-BINARY` - NON-BINARY + // * `OTHER` - OTHER + // * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE + Gender *EmployeeRequestGender `json:"gender,omitempty" url:"gender,omitempty"` + // The employee's ethnicity. + // + // * `AMERICAN_INDIAN_OR_ALASKA_NATIVE` - AMERICAN_INDIAN_OR_ALASKA_NATIVE + // * `ASIAN_OR_INDIAN_SUBCONTINENT` - ASIAN_OR_INDIAN_SUBCONTINENT + // * `BLACK_OR_AFRICAN_AMERICAN` - BLACK_OR_AFRICAN_AMERICAN + // * `HISPANIC_OR_LATINO` - HISPANIC_OR_LATINO + // * `NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER` - NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER + // * `TWO_OR_MORE_RACES` - TWO_OR_MORE_RACES + // * `WHITE` - WHITE + // * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE + Ethnicity *EmployeeRequestEthnicity `json:"ethnicity,omitempty" url:"ethnicity,omitempty"` + // The employee's filing status as related to marital status. + // + // * `SINGLE` - SINGLE + // * `MARRIED_FILING_JOINTLY` - MARRIED_FILING_JOINTLY + // * `MARRIED_FILING_SEPARATELY` - MARRIED_FILING_SEPARATELY + // * `HEAD_OF_HOUSEHOLD` - HEAD_OF_HOUSEHOLD + // * `QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD` - QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD + MaritalStatus *EmployeeRequestMaritalStatus `json:"marital_status,omitempty" url:"marital_status,omitempty"` + // The employee's date of birth. + DateOfBirth *time.Time `json:"date_of_birth,omitempty" url:"date_of_birth,omitempty"` + // The date that the employee was hired, usually the day that an offer letter is signed. If an employee has multiple hire dates from previous employments, this represents the most recent hire date. Note: If you're looking for the employee's start date, refer to the start_date field. + HireDate *time.Time `json:"hire_date,omitempty" url:"hire_date,omitempty"` + // The date that the employee started working. If an employee was rehired, the most recent start date will be returned. + StartDate *time.Time `json:"start_date,omitempty" url:"start_date,omitempty"` + // The employment status of the employee. + // + // * `ACTIVE` - ACTIVE + // * `PENDING` - PENDING + // * `INACTIVE` - INACTIVE + EmploymentStatus *EmployeeRequestEmploymentStatus `json:"employment_status,omitempty" url:"employment_status,omitempty"` + // The employee's termination date. + TerminationDate *time.Time `json:"termination_date,omitempty" url:"termination_date,omitempty"` + // The URL of the employee's avatar image. + Avatar *string `json:"avatar,omitempty" url:"avatar,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (e *EmployeeRequest) GetEmployeeNumber() *string { + if e == nil { + return nil + } + return e.EmployeeNumber +} + +func (e *EmployeeRequest) GetCompany() *EmployeeRequestCompany { + if e == nil { + return nil + } + return e.Company +} + +func (e *EmployeeRequest) GetFirstName() *string { + if e == nil { + return nil + } + return e.FirstName +} + +func (e *EmployeeRequest) GetLastName() *string { + if e == nil { + return nil + } + return e.LastName +} + +func (e *EmployeeRequest) GetPreferredName() *string { + if e == nil { + return nil + } + return e.PreferredName +} + +func (e *EmployeeRequest) GetDisplayFullName() *string { + if e == nil { + return nil + } + return e.DisplayFullName +} + +func (e *EmployeeRequest) GetUsername() *string { + if e == nil { + return nil + } + return e.Username +} + +func (e *EmployeeRequest) GetGroups() []*EmployeeRequestGroupsItem { + if e == nil { + return nil + } + return e.Groups +} + +func (e *EmployeeRequest) GetWorkEmail() *string { + if e == nil { + return nil + } + return e.WorkEmail +} + +func (e *EmployeeRequest) GetPersonalEmail() *string { + if e == nil { + return nil + } + return e.PersonalEmail +} + +func (e *EmployeeRequest) GetMobilePhoneNumber() *string { + if e == nil { + return nil + } + return e.MobilePhoneNumber +} + +func (e *EmployeeRequest) GetEmployments() []*EmployeeRequestEmploymentsItem { + if e == nil { + return nil + } + return e.Employments +} + +func (e *EmployeeRequest) GetHomeLocation() *EmployeeRequestHomeLocation { + if e == nil { + return nil + } + return e.HomeLocation +} + +func (e *EmployeeRequest) GetWorkLocation() *EmployeeRequestWorkLocation { + if e == nil { + return nil + } + return e.WorkLocation +} + +func (e *EmployeeRequest) GetManager() *EmployeeRequestManager { + if e == nil { + return nil + } + return e.Manager +} + +func (e *EmployeeRequest) GetTeam() *EmployeeRequestTeam { + if e == nil { + return nil + } + return e.Team +} + +func (e *EmployeeRequest) GetPayGroup() *EmployeeRequestPayGroup { + if e == nil { + return nil + } + return e.PayGroup +} + +func (e *EmployeeRequest) GetSsn() *string { + if e == nil { + return nil + } + return e.Ssn +} + +func (e *EmployeeRequest) GetGender() *EmployeeRequestGender { + if e == nil { + return nil + } + return e.Gender +} + +func (e *EmployeeRequest) GetEthnicity() *EmployeeRequestEthnicity { + if e == nil { + return nil + } + return e.Ethnicity +} + +func (e *EmployeeRequest) GetMaritalStatus() *EmployeeRequestMaritalStatus { + if e == nil { + return nil + } + return e.MaritalStatus +} + +func (e *EmployeeRequest) GetDateOfBirth() *time.Time { + if e == nil { + return nil + } + return e.DateOfBirth +} + +func (e *EmployeeRequest) GetHireDate() *time.Time { + if e == nil { + return nil + } + return e.HireDate +} + +func (e *EmployeeRequest) GetStartDate() *time.Time { + if e == nil { + return nil + } + return e.StartDate +} + +func (e *EmployeeRequest) GetEmploymentStatus() *EmployeeRequestEmploymentStatus { + if e == nil { + return nil + } + return e.EmploymentStatus +} + +func (e *EmployeeRequest) GetTerminationDate() *time.Time { + if e == nil { + return nil + } + return e.TerminationDate +} + +func (e *EmployeeRequest) GetAvatar() *string { + if e == nil { + return nil + } + return e.Avatar +} + +func (e *EmployeeRequest) GetIntegrationParams() map[string]interface{} { + if e == nil { + return nil + } + return e.IntegrationParams +} + +func (e *EmployeeRequest) GetLinkedAccountParams() map[string]interface{} { + if e == nil { + return nil + } + return e.LinkedAccountParams +} + +func (e *EmployeeRequest) GetExtraProperties() map[string]interface{} { + return e.extraProperties +} + +func (e *EmployeeRequest) UnmarshalJSON(data []byte) error { + type embed EmployeeRequest + var unmarshaler = struct { + embed + DateOfBirth *internal.DateTime `json:"date_of_birth,omitempty"` + HireDate *internal.DateTime `json:"hire_date,omitempty"` + StartDate *internal.DateTime `json:"start_date,omitempty"` + TerminationDate *internal.DateTime `json:"termination_date,omitempty"` + }{ + embed: embed(*e), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *e = EmployeeRequest(unmarshaler.embed) + e.DateOfBirth = unmarshaler.DateOfBirth.TimePtr() + e.HireDate = unmarshaler.HireDate.TimePtr() + e.StartDate = unmarshaler.StartDate.TimePtr() + e.TerminationDate = unmarshaler.TerminationDate.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *e) + if err != nil { + return err + } + e.extraProperties = extraProperties + e.rawJSON = json.RawMessage(data) + return nil +} + +func (e *EmployeeRequest) MarshalJSON() ([]byte, error) { + type embed EmployeeRequest + var marshaler = struct { + embed + DateOfBirth *internal.DateTime `json:"date_of_birth,omitempty"` + HireDate *internal.DateTime `json:"hire_date,omitempty"` + StartDate *internal.DateTime `json:"start_date,omitempty"` + TerminationDate *internal.DateTime `json:"termination_date,omitempty"` + }{ + embed: embed(*e), + DateOfBirth: internal.NewOptionalDateTime(e.DateOfBirth), + HireDate: internal.NewOptionalDateTime(e.HireDate), + StartDate: internal.NewOptionalDateTime(e.StartDate), + TerminationDate: internal.NewOptionalDateTime(e.TerminationDate), + } + return json.Marshal(marshaler) +} + +func (e *EmployeeRequest) String() string { + if len(e.rawJSON) > 0 { + if value, err := internal.StringifyJSON(e.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(e); err == nil { + return value + } + return fmt.Sprintf("%#v", e) +} + +// The ID of the employee's company. +type EmployeeRequestCompany struct { + String string + Company *Company + + typ string +} + +func (e *EmployeeRequestCompany) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *EmployeeRequestCompany) GetCompany() *Company { + if e == nil { + return nil + } + return e.Company +} + +func (e *EmployeeRequestCompany) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + valueCompany := new(Company) + if err := json.Unmarshal(data, &valueCompany); err == nil { + e.typ = "Company" + e.Company = valueCompany + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e EmployeeRequestCompany) MarshalJSON() ([]byte, error) { + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + if e.typ == "Company" || e.Company != nil { + return json.Marshal(e.Company) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type EmployeeRequestCompanyVisitor interface { + VisitString(string) error + VisitCompany(*Company) error +} + +func (e *EmployeeRequestCompany) Accept(visitor EmployeeRequestCompanyVisitor) error { + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + if e.typ == "Company" || e.Company != nil { + return visitor.VisitCompany(e.Company) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +// The employment status of the employee. +// +// * `ACTIVE` - ACTIVE +// * `PENDING` - PENDING +// * `INACTIVE` - INACTIVE +type EmployeeRequestEmploymentStatus struct { + EmploymentStatusEnum EmploymentStatusEnum + String string + + typ string +} + +func (e *EmployeeRequestEmploymentStatus) GetEmploymentStatusEnum() EmploymentStatusEnum { + if e == nil { + return "" + } + return e.EmploymentStatusEnum +} + +func (e *EmployeeRequestEmploymentStatus) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *EmployeeRequestEmploymentStatus) UnmarshalJSON(data []byte) error { + var valueEmploymentStatusEnum EmploymentStatusEnum + if err := json.Unmarshal(data, &valueEmploymentStatusEnum); err == nil { + e.typ = "EmploymentStatusEnum" + e.EmploymentStatusEnum = valueEmploymentStatusEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e EmployeeRequestEmploymentStatus) MarshalJSON() ([]byte, error) { + if e.typ == "EmploymentStatusEnum" || e.EmploymentStatusEnum != "" { + return json.Marshal(e.EmploymentStatusEnum) + } + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type EmployeeRequestEmploymentStatusVisitor interface { + VisitEmploymentStatusEnum(EmploymentStatusEnum) error + VisitString(string) error +} + +func (e *EmployeeRequestEmploymentStatus) Accept(visitor EmployeeRequestEmploymentStatusVisitor) error { + if e.typ == "EmploymentStatusEnum" || e.EmploymentStatusEnum != "" { + return visitor.VisitEmploymentStatusEnum(e.EmploymentStatusEnum) + } + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type EmployeeRequestEmploymentsItem struct { String string + Employment *Employment + + typ string } -func NewIgnoreCommonModelRequestReasonFromReasonEnum(value ReasonEnum) *IgnoreCommonModelRequestReason { - return &IgnoreCommonModelRequestReason{typeName: "reasonEnum", ReasonEnum: value} +func (e *EmployeeRequestEmploymentsItem) GetString() string { + if e == nil { + return "" + } + return e.String } -func NewIgnoreCommonModelRequestReasonFromString(value string) *IgnoreCommonModelRequestReason { - return &IgnoreCommonModelRequestReason{typeName: "string", String: value} +func (e *EmployeeRequestEmploymentsItem) GetEmployment() *Employment { + if e == nil { + return nil + } + return e.Employment } -func (i *IgnoreCommonModelRequestReason) UnmarshalJSON(data []byte) error { - var valueReasonEnum ReasonEnum - if err := json.Unmarshal(data, &valueReasonEnum); err == nil { - i.typeName = "reasonEnum" - i.ReasonEnum = valueReasonEnum +func (e *EmployeeRequestEmploymentsItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + valueEmployment := new(Employment) + if err := json.Unmarshal(data, &valueEmployment); err == nil { + e.typ = "Employment" + e.Employment = valueEmployment + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e EmployeeRequestEmploymentsItem) MarshalJSON() ([]byte, error) { + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + if e.typ == "Employment" || e.Employment != nil { + return json.Marshal(e.Employment) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type EmployeeRequestEmploymentsItemVisitor interface { + VisitString(string) error + VisitEmployment(*Employment) error +} + +func (e *EmployeeRequestEmploymentsItem) Accept(visitor EmployeeRequestEmploymentsItemVisitor) error { + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + if e.typ == "Employment" || e.Employment != nil { + return visitor.VisitEmployment(e.Employment) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +// The employee's ethnicity. +// +// * `AMERICAN_INDIAN_OR_ALASKA_NATIVE` - AMERICAN_INDIAN_OR_ALASKA_NATIVE +// * `ASIAN_OR_INDIAN_SUBCONTINENT` - ASIAN_OR_INDIAN_SUBCONTINENT +// * `BLACK_OR_AFRICAN_AMERICAN` - BLACK_OR_AFRICAN_AMERICAN +// * `HISPANIC_OR_LATINO` - HISPANIC_OR_LATINO +// * `NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER` - NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER +// * `TWO_OR_MORE_RACES` - TWO_OR_MORE_RACES +// * `WHITE` - WHITE +// * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE +type EmployeeRequestEthnicity struct { + EthnicityEnum EthnicityEnum + String string + + typ string +} + +func (e *EmployeeRequestEthnicity) GetEthnicityEnum() EthnicityEnum { + if e == nil { + return "" + } + return e.EthnicityEnum +} + +func (e *EmployeeRequestEthnicity) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *EmployeeRequestEthnicity) UnmarshalJSON(data []byte) error { + var valueEthnicityEnum EthnicityEnum + if err := json.Unmarshal(data, &valueEthnicityEnum); err == nil { + e.typ = "EthnicityEnum" + e.EthnicityEnum = valueEthnicityEnum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - i.typeName = "string" - i.String = valueString + e.typ = "String" + e.String = valueString return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, i) + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) } -func (i IgnoreCommonModelRequestReason) MarshalJSON() ([]byte, error) { - switch i.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "reasonEnum": - return json.Marshal(i.ReasonEnum) - case "string": - return json.Marshal(i.String) +func (e EmployeeRequestEthnicity) MarshalJSON() ([]byte, error) { + if e.typ == "EthnicityEnum" || e.EthnicityEnum != "" { + return json.Marshal(e.EthnicityEnum) + } + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) } -type IgnoreCommonModelRequestReasonVisitor interface { - VisitReasonEnum(ReasonEnum) error +type EmployeeRequestEthnicityVisitor interface { + VisitEthnicityEnum(EthnicityEnum) error VisitString(string) error } -func (i *IgnoreCommonModelRequestReason) Accept(visitor IgnoreCommonModelRequestReasonVisitor) error { - switch i.typeName { - default: - return fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "reasonEnum": - return visitor.VisitReasonEnum(i.ReasonEnum) - case "string": - return visitor.VisitString(i.String) +func (e *EmployeeRequestEthnicity) Accept(visitor EmployeeRequestEthnicityVisitor) error { + if e.typ == "EthnicityEnum" || e.EthnicityEnum != "" { + return visitor.VisitEthnicityEnum(e.EthnicityEnum) + } + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +// The employee's gender. +// +// * `MALE` - MALE +// * `FEMALE` - FEMALE +// * `NON-BINARY` - NON-BINARY +// * `OTHER` - OTHER +// * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE +type EmployeeRequestGender struct { + GenderEnum GenderEnum + String string + + typ string +} + +func (e *EmployeeRequestGender) GetGenderEnum() GenderEnum { + if e == nil { + return "" + } + return e.GenderEnum +} + +func (e *EmployeeRequestGender) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *EmployeeRequestGender) UnmarshalJSON(data []byte) error { + var valueGenderEnum GenderEnum + if err := json.Unmarshal(data, &valueGenderEnum); err == nil { + e.typ = "GenderEnum" + e.GenderEnum = valueGenderEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e EmployeeRequestGender) MarshalJSON() ([]byte, error) { + if e.typ == "GenderEnum" || e.GenderEnum != "" { + return json.Marshal(e.GenderEnum) + } + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type EmployeeRequestGenderVisitor interface { + VisitGenderEnum(GenderEnum) error + VisitString(string) error +} + +func (e *EmployeeRequestGender) Accept(visitor EmployeeRequestGenderVisitor) error { + if e.typ == "GenderEnum" || e.GenderEnum != "" { + return visitor.VisitGenderEnum(e.GenderEnum) + } + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type EmployeeRequestGroupsItem struct { + String string + Group *Group + + typ string +} + +func (e *EmployeeRequestGroupsItem) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *EmployeeRequestGroupsItem) GetGroup() *Group { + if e == nil { + return nil + } + return e.Group +} + +func (e *EmployeeRequestGroupsItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + valueGroup := new(Group) + if err := json.Unmarshal(data, &valueGroup); err == nil { + e.typ = "Group" + e.Group = valueGroup + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e EmployeeRequestGroupsItem) MarshalJSON() ([]byte, error) { + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + if e.typ == "Group" || e.Group != nil { + return json.Marshal(e.Group) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type EmployeeRequestGroupsItemVisitor interface { + VisitString(string) error + VisitGroup(*Group) error +} + +func (e *EmployeeRequestGroupsItem) Accept(visitor EmployeeRequestGroupsItemVisitor) error { + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + if e.typ == "Group" || e.Group != nil { + return visitor.VisitGroup(e.Group) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +// The employee's home address. +type EmployeeRequestHomeLocation struct { + String string + Location *Location + + typ string +} + +func (e *EmployeeRequestHomeLocation) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *EmployeeRequestHomeLocation) GetLocation() *Location { + if e == nil { + return nil + } + return e.Location +} + +func (e *EmployeeRequestHomeLocation) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + valueLocation := new(Location) + if err := json.Unmarshal(data, &valueLocation); err == nil { + e.typ = "Location" + e.Location = valueLocation + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e EmployeeRequestHomeLocation) MarshalJSON() ([]byte, error) { + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + if e.typ == "Location" || e.Location != nil { + return json.Marshal(e.Location) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type EmployeeRequestHomeLocationVisitor interface { + VisitString(string) error + VisitLocation(*Location) error +} + +func (e *EmployeeRequestHomeLocation) Accept(visitor EmployeeRequestHomeLocationVisitor) error { + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + if e.typ == "Location" || e.Location != nil { + return visitor.VisitLocation(e.Location) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +// The employee ID of the employee's manager. +type EmployeeRequestManager struct { + String string + Employee *Employee + + typ string +} + +func (e *EmployeeRequestManager) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *EmployeeRequestManager) GetEmployee() *Employee { + if e == nil { + return nil + } + return e.Employee +} + +func (e *EmployeeRequestManager) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + valueEmployee := new(Employee) + if err := json.Unmarshal(data, &valueEmployee); err == nil { + e.typ = "Employee" + e.Employee = valueEmployee + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e EmployeeRequestManager) MarshalJSON() ([]byte, error) { + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + if e.typ == "Employee" || e.Employee != nil { + return json.Marshal(e.Employee) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type EmployeeRequestManagerVisitor interface { + VisitString(string) error + VisitEmployee(*Employee) error +} + +func (e *EmployeeRequestManager) Accept(visitor EmployeeRequestManagerVisitor) error { + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + if e.typ == "Employee" || e.Employee != nil { + return visitor.VisitEmployee(e.Employee) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +// The employee's filing status as related to marital status. +// +// * `SINGLE` - SINGLE +// * `MARRIED_FILING_JOINTLY` - MARRIED_FILING_JOINTLY +// * `MARRIED_FILING_SEPARATELY` - MARRIED_FILING_SEPARATELY +// * `HEAD_OF_HOUSEHOLD` - HEAD_OF_HOUSEHOLD +// * `QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD` - QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD +type EmployeeRequestMaritalStatus struct { + MaritalStatusEnum MaritalStatusEnum + String string + + typ string +} + +func (e *EmployeeRequestMaritalStatus) GetMaritalStatusEnum() MaritalStatusEnum { + if e == nil { + return "" + } + return e.MaritalStatusEnum +} + +func (e *EmployeeRequestMaritalStatus) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *EmployeeRequestMaritalStatus) UnmarshalJSON(data []byte) error { + var valueMaritalStatusEnum MaritalStatusEnum + if err := json.Unmarshal(data, &valueMaritalStatusEnum); err == nil { + e.typ = "MaritalStatusEnum" + e.MaritalStatusEnum = valueMaritalStatusEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e EmployeeRequestMaritalStatus) MarshalJSON() ([]byte, error) { + if e.typ == "MaritalStatusEnum" || e.MaritalStatusEnum != "" { + return json.Marshal(e.MaritalStatusEnum) + } + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type EmployeeRequestMaritalStatusVisitor interface { + VisitMaritalStatusEnum(MaritalStatusEnum) error + VisitString(string) error +} + +func (e *EmployeeRequestMaritalStatus) Accept(visitor EmployeeRequestMaritalStatusVisitor) error { + if e.typ == "MaritalStatusEnum" || e.MaritalStatusEnum != "" { + return visitor.VisitMaritalStatusEnum(e.MaritalStatusEnum) + } + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +// The employee's pay group +type EmployeeRequestPayGroup struct { + String string + PayGroup *PayGroup + + typ string +} + +func (e *EmployeeRequestPayGroup) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *EmployeeRequestPayGroup) GetPayGroup() *PayGroup { + if e == nil { + return nil + } + return e.PayGroup +} + +func (e *EmployeeRequestPayGroup) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + valuePayGroup := new(PayGroup) + if err := json.Unmarshal(data, &valuePayGroup); err == nil { + e.typ = "PayGroup" + e.PayGroup = valuePayGroup + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e EmployeeRequestPayGroup) MarshalJSON() ([]byte, error) { + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + if e.typ == "PayGroup" || e.PayGroup != nil { + return json.Marshal(e.PayGroup) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type EmployeeRequestPayGroupVisitor interface { + VisitString(string) error + VisitPayGroup(*PayGroup) error +} + +func (e *EmployeeRequestPayGroup) Accept(visitor EmployeeRequestPayGroupVisitor) error { + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + if e.typ == "PayGroup" || e.PayGroup != nil { + return visitor.VisitPayGroup(e.PayGroup) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +// The employee's team. +type EmployeeRequestTeam struct { + String string + Team *Team + + typ string +} + +func (e *EmployeeRequestTeam) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *EmployeeRequestTeam) GetTeam() *Team { + if e == nil { + return nil + } + return e.Team +} + +func (e *EmployeeRequestTeam) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + valueTeam := new(Team) + if err := json.Unmarshal(data, &valueTeam); err == nil { + e.typ = "Team" + e.Team = valueTeam + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e EmployeeRequestTeam) MarshalJSON() ([]byte, error) { + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + if e.typ == "Team" || e.Team != nil { + return json.Marshal(e.Team) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type EmployeeRequestTeamVisitor interface { + VisitString(string) error + VisitTeam(*Team) error +} + +func (e *EmployeeRequestTeam) Accept(visitor EmployeeRequestTeamVisitor) error { + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + if e.typ == "Team" || e.Team != nil { + return visitor.VisitTeam(e.Team) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +// The employee's work address. +type EmployeeRequestWorkLocation struct { + String string + Location *Location + + typ string +} + +func (e *EmployeeRequestWorkLocation) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *EmployeeRequestWorkLocation) GetLocation() *Location { + if e == nil { + return nil + } + return e.Location +} + +func (e *EmployeeRequestWorkLocation) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + valueLocation := new(Location) + if err := json.Unmarshal(data, &valueLocation); err == nil { + e.typ = "Location" + e.Location = valueLocation + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e EmployeeRequestWorkLocation) MarshalJSON() ([]byte, error) { + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + if e.typ == "Location" || e.Location != nil { + return json.Marshal(e.Location) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type EmployeeRequestWorkLocationVisitor interface { + VisitString(string) error + VisitLocation(*Location) error +} + +func (e *EmployeeRequestWorkLocation) Accept(visitor EmployeeRequestWorkLocationVisitor) error { + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + if e.typ == "Location" || e.Location != nil { + return visitor.VisitLocation(e.Location) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type EmployeeResponse struct { + Model *Employee `json:"model" url:"model"` + Warnings []*WarningValidationProblem `json:"warnings" url:"warnings"` + Errors []*ErrorValidationProblem `json:"errors" url:"errors"` + Logs []*DebugModeLog `json:"logs,omitempty" url:"logs,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (e *EmployeeResponse) GetModel() *Employee { + if e == nil { + return nil + } + return e.Model +} + +func (e *EmployeeResponse) GetWarnings() []*WarningValidationProblem { + if e == nil { + return nil + } + return e.Warnings +} + +func (e *EmployeeResponse) GetErrors() []*ErrorValidationProblem { + if e == nil { + return nil + } + return e.Errors +} + +func (e *EmployeeResponse) GetLogs() []*DebugModeLog { + if e == nil { + return nil + } + return e.Logs +} + +func (e *EmployeeResponse) GetExtraProperties() map[string]interface{} { + return e.extraProperties +} + +func (e *EmployeeResponse) UnmarshalJSON(data []byte) error { + type unmarshaler EmployeeResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *e = EmployeeResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *e) + if err != nil { + return err + } + e.extraProperties = extraProperties + e.rawJSON = json.RawMessage(data) + return nil +} + +func (e *EmployeeResponse) String() string { + if len(e.rawJSON) > 0 { + if value, err := internal.StringifyJSON(e.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(e); err == nil { + return value + } + return fmt.Sprintf("%#v", e) +} + +type IgnoreCommonModelRequest struct { + Reason *IgnoreCommonModelRequestReason `json:"reason" url:"reason"` + Message *string `json:"message,omitempty" url:"message,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (i *IgnoreCommonModelRequest) GetReason() *IgnoreCommonModelRequestReason { + if i == nil { + return nil + } + return i.Reason +} + +func (i *IgnoreCommonModelRequest) GetMessage() *string { + if i == nil { + return nil + } + return i.Message +} + +func (i *IgnoreCommonModelRequest) GetExtraProperties() map[string]interface{} { + return i.extraProperties +} + +func (i *IgnoreCommonModelRequest) UnmarshalJSON(data []byte) error { + type unmarshaler IgnoreCommonModelRequest + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *i = IgnoreCommonModelRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *i) + if err != nil { + return err + } + i.extraProperties = extraProperties + i.rawJSON = json.RawMessage(data) + return nil +} + +func (i *IgnoreCommonModelRequest) String() string { + if len(i.rawJSON) > 0 { + if value, err := internal.StringifyJSON(i.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(i); err == nil { + return value + } + return fmt.Sprintf("%#v", i) +} + +type IgnoreCommonModelRequestReason struct { + ReasonEnum ReasonEnum + String string + + typ string +} + +func (i *IgnoreCommonModelRequestReason) GetReasonEnum() ReasonEnum { + if i == nil { + return "" + } + return i.ReasonEnum +} + +func (i *IgnoreCommonModelRequestReason) GetString() string { + if i == nil { + return "" + } + return i.String +} + +func (i *IgnoreCommonModelRequestReason) UnmarshalJSON(data []byte) error { + var valueReasonEnum ReasonEnum + if err := json.Unmarshal(data, &valueReasonEnum); err == nil { + i.typ = "ReasonEnum" + i.ReasonEnum = valueReasonEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + i.typ = "String" + i.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) +} + +func (i IgnoreCommonModelRequestReason) MarshalJSON() ([]byte, error) { + if i.typ == "ReasonEnum" || i.ReasonEnum != "" { + return json.Marshal(i.ReasonEnum) + } + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) +} + +type IgnoreCommonModelRequestReasonVisitor interface { + VisitReasonEnum(ReasonEnum) error + VisitString(string) error +} + +func (i *IgnoreCommonModelRequestReason) Accept(visitor IgnoreCommonModelRequestReasonVisitor) error { + if i.typ == "ReasonEnum" || i.ReasonEnum != "" { + return visitor.VisitReasonEnum(i.ReasonEnum) + } + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", i) +} + +type PaginatedEmployeeList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Employee `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedEmployeeList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedEmployeeList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedEmployeeList) GetResults() []*Employee { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedEmployeeList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedEmployeeList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedEmployeeList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedEmployeeList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedEmployeeList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +// * `GENERAL_CUSTOMER_REQUEST` - GENERAL_CUSTOMER_REQUEST +// * `GDPR` - GDPR +// * `OTHER` - OTHER +type ReasonEnum string + +const ( + ReasonEnumGeneralCustomerRequest ReasonEnum = "GENERAL_CUSTOMER_REQUEST" + ReasonEnumGdpr ReasonEnum = "GDPR" + ReasonEnumOther ReasonEnum = "OTHER" +) + +func NewReasonEnumFromString(s string) (ReasonEnum, error) { + switch s { + case "GENERAL_CUSTOMER_REQUEST": + return ReasonEnumGeneralCustomerRequest, nil + case "GDPR": + return ReasonEnumGdpr, nil + case "OTHER": + return ReasonEnumOther, nil + } + var t ReasonEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (r ReasonEnum) Ptr() *ReasonEnum { + return &r } diff --git a/hris/employees/client.go b/hris/employees/client.go index 3089dfd..1bc02a6 100644 --- a/hris/employees/client.go +++ b/hris/employees/client.go @@ -1,190 +1,135 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package employees import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - hris "github.com/merge-api/merge-go-client/hris" + core "github.com/merge-api/merge-go-client/v2/core" + hris "github.com/merge-api/merge-go-client/v2/hris" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `Employee` objects. -func (c *Client) List(ctx context.Context, request *hris.EmployeesListRequest) (*hris.PaginatedEmployeeList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "hris/v1/employees" - - queryParams := make(url.Values) - if request.CompanyId != nil { - queryParams.Add("company_id", fmt.Sprintf("%v", *request.CompanyId)) - } - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.DisplayFullName != nil { - queryParams.Add("display_full_name", fmt.Sprintf("%v", *request.DisplayFullName)) - } - if request.EmploymentStatus != nil { - queryParams.Add("employment_status", fmt.Sprintf("%v", *request.EmploymentStatus)) - } - if request.EmploymentType != nil { - queryParams.Add("employment_type", fmt.Sprintf("%v", *request.EmploymentType)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.FirstName != nil { - queryParams.Add("first_name", fmt.Sprintf("%v", *request.FirstName)) - } - if request.Groups != nil { - queryParams.Add("groups", fmt.Sprintf("%v", *request.Groups)) - } - if request.HomeLocationId != nil { - queryParams.Add("home_location_id", fmt.Sprintf("%v", *request.HomeLocationId)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeSensitiveFields != nil { - queryParams.Add("include_sensitive_fields", fmt.Sprintf("%v", *request.IncludeSensitiveFields)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.JobTitle != nil { - queryParams.Add("job_title", fmt.Sprintf("%v", *request.JobTitle)) - } - if request.LastName != nil { - queryParams.Add("last_name", fmt.Sprintf("%v", *request.LastName)) - } - if request.ManagerId != nil { - queryParams.Add("manager_id", fmt.Sprintf("%v", *request.ManagerId)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.PayGroupId != nil { - queryParams.Add("pay_group_id", fmt.Sprintf("%v", *request.PayGroupId)) - } - if request.PersonalEmail != nil { - queryParams.Add("personal_email", fmt.Sprintf("%v", *request.PersonalEmail)) - } - if request.RemoteFields != nil { - queryParams.Add("remote_fields", fmt.Sprintf("%v", *request.RemoteFields)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if request.ShowEnumOrigins != nil { - queryParams.Add("show_enum_origins", fmt.Sprintf("%v", *request.ShowEnumOrigins)) - } - if request.StartedAfter != nil { - queryParams.Add("started_after", fmt.Sprintf("%v", request.StartedAfter.Format(time.RFC3339))) - } - if request.StartedBefore != nil { - queryParams.Add("started_before", fmt.Sprintf("%v", request.StartedBefore.Format(time.RFC3339))) - } - if request.TeamId != nil { - queryParams.Add("team_id", fmt.Sprintf("%v", *request.TeamId)) - } - if request.TerminatedAfter != nil { - queryParams.Add("terminated_after", fmt.Sprintf("%v", request.TerminatedAfter.Format(time.RFC3339))) - } - if request.TerminatedBefore != nil { - queryParams.Add("terminated_before", fmt.Sprintf("%v", request.TerminatedBefore.Format(time.RFC3339))) - } - if request.WorkEmail != nil { - queryParams.Add("work_email", fmt.Sprintf("%v", *request.WorkEmail)) - } - if request.WorkLocationId != nil { - queryParams.Add("work_location_id", fmt.Sprintf("%v", *request.WorkLocationId)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *hris.PaginatedEmployeeList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *hris.EmployeesListRequest, + opts ...option.RequestOption, +) (*core.Page[*hris.Employee], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/hris/v1/employees" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *hris.PaginatedEmployeeList) *internal.PageResponse[*string, *hris.Employee] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *hris.Employee]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Creates an `Employee` object with the given values. -func (c *Client) Create(ctx context.Context, request *hris.EmployeeEndpointRequest) (*hris.EmployeeResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "hris/v1/employees" - - queryParams := make(url.Values) - if request.IsDebugMode != nil { - queryParams.Add("is_debug_mode", fmt.Sprintf("%v", *request.IsDebugMode)) - } - if request.RunAsync != nil { - queryParams.Add("run_async", fmt.Sprintf("%v", *request.RunAsync)) +func (c *Client) Create( + ctx context.Context, + request *hris.EmployeeEndpointRequest, + opts ...option.RequestOption, +) (*hris.EmployeeResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/hris/v1/employees" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *hris.EmployeeResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -193,41 +138,46 @@ func (c *Client) Create(ctx context.Context, request *hris.EmployeeEndpointReque } // Returns an `Employee` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *hris.EmployeesRetrieveRequest) (*hris.Employee, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"hris/v1/employees/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeSensitiveFields != nil { - queryParams.Add("include_sensitive_fields", fmt.Sprintf("%v", *request.IncludeSensitiveFields)) - } - if request.RemoteFields != nil { - queryParams.Add("remote_fields", fmt.Sprintf("%v", *request.RemoteFields)) - } - if request.ShowEnumOrigins != nil { - queryParams.Add("show_enum_origins", fmt.Sprintf("%v", *request.ShowEnumOrigins)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *hris.EmployeesRetrieveRequest, + opts ...option.RequestOption, +) (*hris.Employee, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/hris/v1/employees/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *hris.Employee if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -236,20 +186,39 @@ func (c *Client) Retrieve(ctx context.Context, id string, request *hris.Employee } // Ignores a specific row based on the `model_id` in the url. These records will have their properties set to null, and will not be updated in future syncs. The "reason" and "message" fields in the request body will be stored for audit purposes. -func (c *Client) IgnoreCreate(ctx context.Context, modelId string, request *hris.IgnoreCommonModelRequest) error { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"hris/v1/employees/ignore/%v", modelId) +func (c *Client) IgnoreCreate( + ctx context.Context, + modelId string, + request *hris.IgnoreCommonModelRequest, + opts ...option.RequestOption, +) error { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/hris/v1/employees/ignore/%v", + modelId, + ) + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, }, ); err != nil { return err @@ -258,21 +227,34 @@ func (c *Client) IgnoreCreate(ctx context.Context, modelId string, request *hris } // Returns metadata for `Employee` POSTs. -func (c *Client) MetaPostRetrieve(ctx context.Context) (*hris.MetaResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "hris/v1/employees/meta/post" +func (c *Client) MetaPostRetrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*hris.MetaResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/hris/v1/employees/meta/post" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *hris.MetaResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/hris/employer_benefits.go b/hris/employer_benefits.go index 66ee6a1..557661f 100644 --- a/hris/employer_benefits.go +++ b/hris/employer_benefits.go @@ -1,35 +1,375 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package hris import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type EmployerBenefitsListRequest struct { // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` } type EmployerBenefitsRetrieveRequest struct { // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` +} + +// * `MEDICAL` - MEDICAL +// * `HEALTH_SAVINGS` - HEALTH_SAVINGS +// * `INSURANCE` - INSURANCE +// * `RETIREMENT` - RETIREMENT +// * `OTHER` - OTHER +type BenefitPlanTypeEnum string + +const ( + BenefitPlanTypeEnumMedical BenefitPlanTypeEnum = "MEDICAL" + BenefitPlanTypeEnumHealthSavings BenefitPlanTypeEnum = "HEALTH_SAVINGS" + BenefitPlanTypeEnumInsurance BenefitPlanTypeEnum = "INSURANCE" + BenefitPlanTypeEnumRetirement BenefitPlanTypeEnum = "RETIREMENT" + BenefitPlanTypeEnumOther BenefitPlanTypeEnum = "OTHER" +) + +func NewBenefitPlanTypeEnumFromString(s string) (BenefitPlanTypeEnum, error) { + switch s { + case "MEDICAL": + return BenefitPlanTypeEnumMedical, nil + case "HEALTH_SAVINGS": + return BenefitPlanTypeEnumHealthSavings, nil + case "INSURANCE": + return BenefitPlanTypeEnumInsurance, nil + case "RETIREMENT": + return BenefitPlanTypeEnumRetirement, nil + case "OTHER": + return BenefitPlanTypeEnumOther, nil + } + var t BenefitPlanTypeEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (b BenefitPlanTypeEnum) Ptr() *BenefitPlanTypeEnum { + return &b +} + +// # The EmployerBenefit Object +// ### Description +// The `Employer Benefit` object is used to represent a benefit plan offered by a company. +// +// ### Usage Example +// Fetch from the `LIST EmployerBenefits` endpoint and filter by `ID` to show all EmployerBenefits. +type EmployerBenefit struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The type of benefit plan. + // + // * `MEDICAL` - MEDICAL + // * `HEALTH_SAVINGS` - HEALTH_SAVINGS + // * `INSURANCE` - INSURANCE + // * `RETIREMENT` - RETIREMENT + // * `OTHER` - OTHER + BenefitPlanType *EmployerBenefitBenefitPlanType `json:"benefit_plan_type,omitempty" url:"benefit_plan_type,omitempty"` + // The employer benefit's name - typically the carrier or network name. + Name *string `json:"name,omitempty" url:"name,omitempty"` + // The employer benefit's description. + Description *string `json:"description,omitempty" url:"description,omitempty"` + // The employer benefit's deduction code. + DeductionCode *string `json:"deduction_code,omitempty" url:"deduction_code,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (e *EmployerBenefit) GetId() *string { + if e == nil { + return nil + } + return e.Id +} + +func (e *EmployerBenefit) GetRemoteId() *string { + if e == nil { + return nil + } + return e.RemoteId +} + +func (e *EmployerBenefit) GetCreatedAt() *time.Time { + if e == nil { + return nil + } + return e.CreatedAt +} + +func (e *EmployerBenefit) GetModifiedAt() *time.Time { + if e == nil { + return nil + } + return e.ModifiedAt +} + +func (e *EmployerBenefit) GetBenefitPlanType() *EmployerBenefitBenefitPlanType { + if e == nil { + return nil + } + return e.BenefitPlanType +} + +func (e *EmployerBenefit) GetName() *string { + if e == nil { + return nil + } + return e.Name +} + +func (e *EmployerBenefit) GetDescription() *string { + if e == nil { + return nil + } + return e.Description +} + +func (e *EmployerBenefit) GetDeductionCode() *string { + if e == nil { + return nil + } + return e.DeductionCode +} + +func (e *EmployerBenefit) GetRemoteWasDeleted() *bool { + if e == nil { + return nil + } + return e.RemoteWasDeleted +} + +func (e *EmployerBenefit) GetFieldMappings() map[string]interface{} { + if e == nil { + return nil + } + return e.FieldMappings +} + +func (e *EmployerBenefit) GetRemoteData() []*RemoteData { + if e == nil { + return nil + } + return e.RemoteData +} + +func (e *EmployerBenefit) GetExtraProperties() map[string]interface{} { + return e.extraProperties +} + +func (e *EmployerBenefit) UnmarshalJSON(data []byte) error { + type embed EmployerBenefit + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*e), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *e = EmployerBenefit(unmarshaler.embed) + e.CreatedAt = unmarshaler.CreatedAt.TimePtr() + e.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *e) + if err != nil { + return err + } + e.extraProperties = extraProperties + e.rawJSON = json.RawMessage(data) + return nil +} + +func (e *EmployerBenefit) MarshalJSON() ([]byte, error) { + type embed EmployerBenefit + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*e), + CreatedAt: internal.NewOptionalDateTime(e.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(e.ModifiedAt), + } + return json.Marshal(marshaler) +} + +func (e *EmployerBenefit) String() string { + if len(e.rawJSON) > 0 { + if value, err := internal.StringifyJSON(e.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(e); err == nil { + return value + } + return fmt.Sprintf("%#v", e) +} + +// The type of benefit plan. +// +// * `MEDICAL` - MEDICAL +// * `HEALTH_SAVINGS` - HEALTH_SAVINGS +// * `INSURANCE` - INSURANCE +// * `RETIREMENT` - RETIREMENT +// * `OTHER` - OTHER +type EmployerBenefitBenefitPlanType struct { + BenefitPlanTypeEnum BenefitPlanTypeEnum + String string + + typ string +} + +func (e *EmployerBenefitBenefitPlanType) GetBenefitPlanTypeEnum() BenefitPlanTypeEnum { + if e == nil { + return "" + } + return e.BenefitPlanTypeEnum +} + +func (e *EmployerBenefitBenefitPlanType) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *EmployerBenefitBenefitPlanType) UnmarshalJSON(data []byte) error { + var valueBenefitPlanTypeEnum BenefitPlanTypeEnum + if err := json.Unmarshal(data, &valueBenefitPlanTypeEnum); err == nil { + e.typ = "BenefitPlanTypeEnum" + e.BenefitPlanTypeEnum = valueBenefitPlanTypeEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e EmployerBenefitBenefitPlanType) MarshalJSON() ([]byte, error) { + if e.typ == "BenefitPlanTypeEnum" || e.BenefitPlanTypeEnum != "" { + return json.Marshal(e.BenefitPlanTypeEnum) + } + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type EmployerBenefitBenefitPlanTypeVisitor interface { + VisitBenefitPlanTypeEnum(BenefitPlanTypeEnum) error + VisitString(string) error +} + +func (e *EmployerBenefitBenefitPlanType) Accept(visitor EmployerBenefitBenefitPlanTypeVisitor) error { + if e.typ == "BenefitPlanTypeEnum" || e.BenefitPlanTypeEnum != "" { + return visitor.VisitBenefitPlanTypeEnum(e.BenefitPlanTypeEnum) + } + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type PaginatedEmployerBenefitList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*EmployerBenefit `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedEmployerBenefitList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedEmployerBenefitList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedEmployerBenefitList) GetResults() []*EmployerBenefit { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedEmployerBenefitList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedEmployerBenefitList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedEmployerBenefitList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedEmployerBenefitList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedEmployerBenefitList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) } diff --git a/hris/employerbenefits/client.go b/hris/employerbenefits/client.go index 95b1b37..cbf455b 100644 --- a/hris/employerbenefits/client.go +++ b/hris/employerbenefits/client.go @@ -1,117 +1,137 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package employerbenefits import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - hris "github.com/merge-api/merge-go-client/hris" + core "github.com/merge-api/merge-go-client/v2/core" + hris "github.com/merge-api/merge-go-client/v2/hris" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `EmployerBenefit` objects. -func (c *Client) List(ctx context.Context, request *hris.EmployerBenefitsListRequest) (*hris.PaginatedEmployerBenefitList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "hris/v1/employer-benefits" - - queryParams := make(url.Values) - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *hris.PaginatedEmployerBenefitList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *hris.EmployerBenefitsListRequest, + opts ...option.RequestOption, +) (*core.Page[*hris.EmployerBenefit], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/hris/v1/employer-benefits" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *hris.PaginatedEmployerBenefitList) *internal.PageResponse[*string, *hris.EmployerBenefit] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *hris.EmployerBenefit]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Returns an `EmployerBenefit` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *hris.EmployerBenefitsRetrieveRequest) (*hris.EmployerBenefit, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"hris/v1/employer-benefits/%v", id) - - queryParams := make(url.Values) - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *hris.EmployerBenefitsRetrieveRequest, + opts ...option.RequestOption, +) (*hris.EmployerBenefit, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/hris/v1/employer-benefits/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *hris.EmployerBenefit if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/hris/employments.go b/hris/employments.go index 8ae2657..7b2016c 100644 --- a/hris/employments.go +++ b/hris/employments.go @@ -1,78 +1,79 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package hris import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type EmploymentsListRequest struct { // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // If provided, will only return employments for this employee. - EmployeeId *string `json:"-"` + EmployeeId *string `json:"-" url:"employee_id,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *EmploymentsListRequestExpand `json:"-"` + Expand []*EmploymentsListRequestExpandItem `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Overrides the default ordering for this endpoint. Possible values include: effective_date, -effective_date. - OrderBy *EmploymentsListRequestOrderBy `json:"-"` + OrderBy *EmploymentsListRequestOrderBy `json:"-" url:"order_by,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // Deprecated. Use show_enum_origins. - RemoteFields *EmploymentsListRequestRemoteFields `json:"-"` + RemoteFields *EmploymentsListRequestRemoteFields `json:"-" url:"remote_fields,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` // 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) - ShowEnumOrigins *EmploymentsListRequestShowEnumOrigins `json:"-"` + ShowEnumOrigins *EmploymentsListRequestShowEnumOrigins `json:"-" url:"show_enum_origins,omitempty"` } type EmploymentsRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *EmploymentsRetrieveRequestExpand `json:"-"` + Expand []*EmploymentsRetrieveRequestExpandItem `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // Deprecated. Use show_enum_origins. - RemoteFields *EmploymentsRetrieveRequestRemoteFields `json:"-"` + RemoteFields *EmploymentsRetrieveRequestRemoteFields `json:"-" url:"remote_fields,omitempty"` // 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) - ShowEnumOrigins *EmploymentsRetrieveRequestShowEnumOrigins `json:"-"` + ShowEnumOrigins *EmploymentsRetrieveRequestShowEnumOrigins `json:"-" url:"show_enum_origins,omitempty"` } -type EmploymentsListRequestExpand string +type EmploymentsListRequestExpandItem string const ( - EmploymentsListRequestExpandEmployee EmploymentsListRequestExpand = "employee" - EmploymentsListRequestExpandEmployeePayGroup EmploymentsListRequestExpand = "employee,pay_group" - EmploymentsListRequestExpandPayGroup EmploymentsListRequestExpand = "pay_group" + EmploymentsListRequestExpandItemEmployee EmploymentsListRequestExpandItem = "employee" + EmploymentsListRequestExpandItemPayGroup EmploymentsListRequestExpandItem = "pay_group" ) -func NewEmploymentsListRequestExpandFromString(s string) (EmploymentsListRequestExpand, error) { +func NewEmploymentsListRequestExpandItemFromString(s string) (EmploymentsListRequestExpandItem, error) { switch s { case "employee": - return EmploymentsListRequestExpandEmployee, nil - case "employee,pay_group": - return EmploymentsListRequestExpandEmployeePayGroup, nil + return EmploymentsListRequestExpandItemEmployee, nil case "pay_group": - return EmploymentsListRequestExpandPayGroup, nil + return EmploymentsListRequestExpandItemPayGroup, nil } - var t EmploymentsListRequestExpand + var t EmploymentsListRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (e EmploymentsListRequestExpand) Ptr() *EmploymentsListRequestExpand { +func (e EmploymentsListRequestExpandItem) Ptr() *EmploymentsListRequestExpandItem { return &e } @@ -220,28 +221,25 @@ func (e EmploymentsListRequestShowEnumOrigins) Ptr() *EmploymentsListRequestShow return &e } -type EmploymentsRetrieveRequestExpand string +type EmploymentsRetrieveRequestExpandItem string const ( - EmploymentsRetrieveRequestExpandEmployee EmploymentsRetrieveRequestExpand = "employee" - EmploymentsRetrieveRequestExpandEmployeePayGroup EmploymentsRetrieveRequestExpand = "employee,pay_group" - EmploymentsRetrieveRequestExpandPayGroup EmploymentsRetrieveRequestExpand = "pay_group" + EmploymentsRetrieveRequestExpandItemEmployee EmploymentsRetrieveRequestExpandItem = "employee" + EmploymentsRetrieveRequestExpandItemPayGroup EmploymentsRetrieveRequestExpandItem = "pay_group" ) -func NewEmploymentsRetrieveRequestExpandFromString(s string) (EmploymentsRetrieveRequestExpand, error) { +func NewEmploymentsRetrieveRequestExpandItemFromString(s string) (EmploymentsRetrieveRequestExpandItem, error) { switch s { case "employee": - return EmploymentsRetrieveRequestExpandEmployee, nil - case "employee,pay_group": - return EmploymentsRetrieveRequestExpandEmployeePayGroup, nil + return EmploymentsRetrieveRequestExpandItemEmployee, nil case "pay_group": - return EmploymentsRetrieveRequestExpandPayGroup, nil + return EmploymentsRetrieveRequestExpandItemPayGroup, nil } - var t EmploymentsRetrieveRequestExpand + var t EmploymentsRetrieveRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (e EmploymentsRetrieveRequestExpand) Ptr() *EmploymentsRetrieveRequestExpand { +func (e EmploymentsRetrieveRequestExpandItem) Ptr() *EmploymentsRetrieveRequestExpandItem { return &e } @@ -366,3 +364,65 @@ func NewEmploymentsRetrieveRequestShowEnumOriginsFromString(s string) (Employmen func (e EmploymentsRetrieveRequestShowEnumOrigins) Ptr() *EmploymentsRetrieveRequestShowEnumOrigins { return &e } + +type PaginatedEmploymentList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Employment `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedEmploymentList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedEmploymentList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedEmploymentList) GetResults() []*Employment { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedEmploymentList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedEmploymentList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedEmploymentList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedEmploymentList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedEmploymentList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} diff --git a/hris/employments/client.go b/hris/employments/client.go index 28b64d7..144ea04 100644 --- a/hris/employments/client.go +++ b/hris/employments/client.go @@ -1,141 +1,137 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package employments import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - hris "github.com/merge-api/merge-go-client/hris" + core "github.com/merge-api/merge-go-client/v2/core" + hris "github.com/merge-api/merge-go-client/v2/hris" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `Employment` objects. -func (c *Client) List(ctx context.Context, request *hris.EmploymentsListRequest) (*hris.PaginatedEmploymentList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "hris/v1/employments" - - queryParams := make(url.Values) - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.EmployeeId != nil { - queryParams.Add("employee_id", fmt.Sprintf("%v", *request.EmployeeId)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.OrderBy != nil { - queryParams.Add("order_by", fmt.Sprintf("%v", *request.OrderBy)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteFields != nil { - queryParams.Add("remote_fields", fmt.Sprintf("%v", *request.RemoteFields)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if request.ShowEnumOrigins != nil { - queryParams.Add("show_enum_origins", fmt.Sprintf("%v", *request.ShowEnumOrigins)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *hris.PaginatedEmploymentList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *hris.EmploymentsListRequest, + opts ...option.RequestOption, +) (*core.Page[*hris.Employment], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/hris/v1/employments" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *hris.PaginatedEmploymentList) *internal.PageResponse[*string, *hris.Employment] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *hris.Employment]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Returns an `Employment` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *hris.EmploymentsRetrieveRequest) (*hris.Employment, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"hris/v1/employments/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.RemoteFields != nil { - queryParams.Add("remote_fields", fmt.Sprintf("%v", *request.RemoteFields)) - } - if request.ShowEnumOrigins != nil { - queryParams.Add("show_enum_origins", fmt.Sprintf("%v", *request.ShowEnumOrigins)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *hris.EmploymentsRetrieveRequest, + opts ...option.RequestOption, +) (*hris.Employment, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/hris/v1/employments/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *hris.Employment if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/hris/field_mapping.go b/hris/field_mapping.go index 1687dad..51c901d 100644 --- a/hris/field_mapping.go +++ b/hris/field_mapping.go @@ -1,41 +1,1229 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package hris +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" +) + type CreateFieldMappingRequest struct { // If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. - ExcludeRemoteFieldMetadata *bool `json:"-"` + ExcludeRemoteFieldMetadata *bool `json:"-" url:"exclude_remote_field_metadata,omitempty"` // The name of the target field you want this remote field to map to. - TargetFieldName string `json:"target_field_name"` + TargetFieldName string `json:"target_field_name" url:"-"` // The description of the target field you want this remote field to map to. - TargetFieldDescription string `json:"target_field_description"` + TargetFieldDescription string `json:"target_field_description" url:"-"` // The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint. - RemoteFieldTraversalPath []interface{} `json:"remote_field_traversal_path,omitempty"` + RemoteFieldTraversalPath []interface{} `json:"remote_field_traversal_path,omitempty" url:"-"` // The method of the remote endpoint where the remote field is coming from. - RemoteMethod string `json:"remote_method"` + RemoteMethod string `json:"remote_method" url:"-"` // The path of the remote endpoint where the remote field is coming from. - RemoteUrlPath string `json:"remote_url_path"` + RemoteUrlPath string `json:"remote_url_path" url:"-"` // The name of the Common Model that the remote field corresponds to in a given category. - CommonModelName string `json:"common_model_name"` + CommonModelName string `json:"common_model_name" url:"-"` } type PatchedEditFieldMappingRequest struct { // The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint. - RemoteFieldTraversalPath []interface{} `json:"remote_field_traversal_path,omitempty"` + RemoteFieldTraversalPath []interface{} `json:"remote_field_traversal_path,omitempty" url:"-"` // The method of the remote endpoint where the remote field is coming from. - RemoteMethod *string `json:"remote_method,omitempty"` + RemoteMethod *string `json:"remote_method,omitempty" url:"-"` // The path of the remote endpoint where the remote field is coming from. - RemoteUrlPath *string `json:"remote_url_path,omitempty"` + RemoteUrlPath *string `json:"remote_url_path,omitempty" url:"-"` } type FieldMappingsRetrieveRequest struct { // If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. - ExcludeRemoteFieldMetadata *bool `json:"-"` + ExcludeRemoteFieldMetadata *bool `json:"-" url:"exclude_remote_field_metadata,omitempty"` } type RemoteFieldsRetrieveRequest struct { // A comma seperated list of Common Model names. If included, will only return Remote Fields for those Common Models. - CommonModels *string `json:"-"` + CommonModels *string `json:"-" url:"common_models,omitempty"` // If true, will include example values, where available, for remote fields in the 3rd party platform. These examples come from active data from your customers. - IncludeExampleValues *string `json:"-"` + IncludeExampleValues *string `json:"-" url:"include_example_values,omitempty"` +} + +type AdvancedMetadata struct { + Id string `json:"id" url:"id"` + DisplayName *string `json:"display_name,omitempty" url:"display_name,omitempty"` + Description *string `json:"description,omitempty" url:"description,omitempty"` + IsRequired *bool `json:"is_required,omitempty" url:"is_required,omitempty"` + IsCustom *bool `json:"is_custom,omitempty" url:"is_custom,omitempty"` + FieldChoices []interface{} `json:"field_choices,omitempty" url:"field_choices,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AdvancedMetadata) GetId() string { + if a == nil { + return "" + } + return a.Id +} + +func (a *AdvancedMetadata) GetDisplayName() *string { + if a == nil { + return nil + } + return a.DisplayName +} + +func (a *AdvancedMetadata) GetDescription() *string { + if a == nil { + return nil + } + return a.Description +} + +func (a *AdvancedMetadata) GetIsRequired() *bool { + if a == nil { + return nil + } + return a.IsRequired +} + +func (a *AdvancedMetadata) GetIsCustom() *bool { + if a == nil { + return nil + } + return a.IsCustom +} + +func (a *AdvancedMetadata) GetFieldChoices() []interface{} { + if a == nil { + return nil + } + return a.FieldChoices +} + +func (a *AdvancedMetadata) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AdvancedMetadata) UnmarshalJSON(data []byte) error { + type unmarshaler AdvancedMetadata + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *a = AdvancedMetadata(value) + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AdvancedMetadata) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} + +type ExternalTargetFieldApi struct { + Name *string `json:"name,omitempty" url:"name,omitempty"` + Description *string `json:"description,omitempty" url:"description,omitempty"` + IsMapped *string `json:"is_mapped,omitempty" url:"is_mapped,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (e *ExternalTargetFieldApi) GetName() *string { + if e == nil { + return nil + } + return e.Name +} + +func (e *ExternalTargetFieldApi) GetDescription() *string { + if e == nil { + return nil + } + return e.Description +} + +func (e *ExternalTargetFieldApi) GetIsMapped() *string { + if e == nil { + return nil + } + return e.IsMapped +} + +func (e *ExternalTargetFieldApi) GetExtraProperties() map[string]interface{} { + return e.extraProperties +} + +func (e *ExternalTargetFieldApi) UnmarshalJSON(data []byte) error { + type unmarshaler ExternalTargetFieldApi + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *e = ExternalTargetFieldApi(value) + extraProperties, err := internal.ExtractExtraProperties(data, *e) + if err != nil { + return err + } + e.extraProperties = extraProperties + e.rawJSON = json.RawMessage(data) + return nil +} + +func (e *ExternalTargetFieldApi) String() string { + if len(e.rawJSON) > 0 { + if value, err := internal.StringifyJSON(e.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(e); err == nil { + return value + } + return fmt.Sprintf("%#v", e) +} + +type ExternalTargetFieldApiResponse struct { + Benefit []*ExternalTargetFieldApi `json:"Benefit,omitempty" url:"Benefit,omitempty"` + EmployerBenefit []*ExternalTargetFieldApi `json:"EmployerBenefit,omitempty" url:"EmployerBenefit,omitempty"` + Company []*ExternalTargetFieldApi `json:"Company,omitempty" url:"Company,omitempty"` + EmployeePayrollRun []*ExternalTargetFieldApi `json:"EmployeePayrollRun,omitempty" url:"EmployeePayrollRun,omitempty"` + Employee []*ExternalTargetFieldApi `json:"Employee,omitempty" url:"Employee,omitempty"` + Employment []*ExternalTargetFieldApi `json:"Employment,omitempty" url:"Employment,omitempty"` + Location []*ExternalTargetFieldApi `json:"Location,omitempty" url:"Location,omitempty"` + PayrollRun []*ExternalTargetFieldApi `json:"PayrollRun,omitempty" url:"PayrollRun,omitempty"` + Team []*ExternalTargetFieldApi `json:"Team,omitempty" url:"Team,omitempty"` + TimeOff []*ExternalTargetFieldApi `json:"TimeOff,omitempty" url:"TimeOff,omitempty"` + TimeOffBalance []*ExternalTargetFieldApi `json:"TimeOffBalance,omitempty" url:"TimeOffBalance,omitempty"` + BankInfo []*ExternalTargetFieldApi `json:"BankInfo,omitempty" url:"BankInfo,omitempty"` + PayGroup []*ExternalTargetFieldApi `json:"PayGroup,omitempty" url:"PayGroup,omitempty"` + Group []*ExternalTargetFieldApi `json:"Group,omitempty" url:"Group,omitempty"` + Dependent []*ExternalTargetFieldApi `json:"Dependent,omitempty" url:"Dependent,omitempty"` + TimesheetEntry []*ExternalTargetFieldApi `json:"TimesheetEntry,omitempty" url:"TimesheetEntry,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (e *ExternalTargetFieldApiResponse) GetBenefit() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.Benefit +} + +func (e *ExternalTargetFieldApiResponse) GetEmployerBenefit() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.EmployerBenefit +} + +func (e *ExternalTargetFieldApiResponse) GetCompany() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.Company +} + +func (e *ExternalTargetFieldApiResponse) GetEmployeePayrollRun() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.EmployeePayrollRun +} + +func (e *ExternalTargetFieldApiResponse) GetEmployee() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.Employee +} + +func (e *ExternalTargetFieldApiResponse) GetEmployment() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.Employment +} + +func (e *ExternalTargetFieldApiResponse) GetLocation() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.Location +} + +func (e *ExternalTargetFieldApiResponse) GetPayrollRun() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.PayrollRun +} + +func (e *ExternalTargetFieldApiResponse) GetTeam() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.Team +} + +func (e *ExternalTargetFieldApiResponse) GetTimeOff() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.TimeOff +} + +func (e *ExternalTargetFieldApiResponse) GetTimeOffBalance() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.TimeOffBalance +} + +func (e *ExternalTargetFieldApiResponse) GetBankInfo() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.BankInfo +} + +func (e *ExternalTargetFieldApiResponse) GetPayGroup() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.PayGroup +} + +func (e *ExternalTargetFieldApiResponse) GetGroup() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.Group +} + +func (e *ExternalTargetFieldApiResponse) GetDependent() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.Dependent +} + +func (e *ExternalTargetFieldApiResponse) GetTimesheetEntry() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.TimesheetEntry +} + +func (e *ExternalTargetFieldApiResponse) GetExtraProperties() map[string]interface{} { + return e.extraProperties +} + +func (e *ExternalTargetFieldApiResponse) UnmarshalJSON(data []byte) error { + type unmarshaler ExternalTargetFieldApiResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *e = ExternalTargetFieldApiResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *e) + if err != nil { + return err + } + e.extraProperties = extraProperties + e.rawJSON = json.RawMessage(data) + return nil +} + +func (e *ExternalTargetFieldApiResponse) String() string { + if len(e.rawJSON) > 0 { + if value, err := internal.StringifyJSON(e.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(e); err == nil { + return value + } + return fmt.Sprintf("%#v", e) +} + +type FieldMappingApiInstance struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + IsIntegrationWide *bool `json:"is_integration_wide,omitempty" url:"is_integration_wide,omitempty"` + TargetField *FieldMappingApiInstanceTargetField `json:"target_field,omitempty" url:"target_field,omitempty"` + RemoteField *FieldMappingApiInstanceRemoteField `json:"remote_field,omitempty" url:"remote_field,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (f *FieldMappingApiInstance) GetId() *string { + if f == nil { + return nil + } + return f.Id +} + +func (f *FieldMappingApiInstance) GetIsIntegrationWide() *bool { + if f == nil { + return nil + } + return f.IsIntegrationWide +} + +func (f *FieldMappingApiInstance) GetTargetField() *FieldMappingApiInstanceTargetField { + if f == nil { + return nil + } + return f.TargetField +} + +func (f *FieldMappingApiInstance) GetRemoteField() *FieldMappingApiInstanceRemoteField { + if f == nil { + return nil + } + return f.RemoteField +} + +func (f *FieldMappingApiInstance) GetExtraProperties() map[string]interface{} { + return f.extraProperties +} + +func (f *FieldMappingApiInstance) UnmarshalJSON(data []byte) error { + type unmarshaler FieldMappingApiInstance + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *f = FieldMappingApiInstance(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { + return err + } + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) + return nil +} + +func (f *FieldMappingApiInstance) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(f); err == nil { + return value + } + return fmt.Sprintf("%#v", f) +} + +type FieldMappingApiInstanceRemoteField struct { + RemoteKeyName *string `json:"remote_key_name,omitempty" url:"remote_key_name,omitempty"` + Schema map[string]interface{} `json:"schema,omitempty" url:"schema,omitempty"` + RemoteEndpointInfo *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo `json:"remote_endpoint_info" url:"remote_endpoint_info"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (f *FieldMappingApiInstanceRemoteField) GetRemoteKeyName() *string { + if f == nil { + return nil + } + return f.RemoteKeyName +} + +func (f *FieldMappingApiInstanceRemoteField) GetSchema() map[string]interface{} { + if f == nil { + return nil + } + return f.Schema +} + +func (f *FieldMappingApiInstanceRemoteField) GetRemoteEndpointInfo() *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo { + if f == nil { + return nil + } + return f.RemoteEndpointInfo +} + +func (f *FieldMappingApiInstanceRemoteField) GetExtraProperties() map[string]interface{} { + return f.extraProperties +} + +func (f *FieldMappingApiInstanceRemoteField) UnmarshalJSON(data []byte) error { + type unmarshaler FieldMappingApiInstanceRemoteField + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *f = FieldMappingApiInstanceRemoteField(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { + return err + } + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) + return nil +} + +func (f *FieldMappingApiInstanceRemoteField) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(f); err == nil { + return value + } + return fmt.Sprintf("%#v", f) +} + +type FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo struct { + Method *string `json:"method,omitempty" url:"method,omitempty"` + UrlPath *string `json:"url_path,omitempty" url:"url_path,omitempty"` + FieldTraversalPath []string `json:"field_traversal_path,omitempty" url:"field_traversal_path,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (f *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo) GetMethod() *string { + if f == nil { + return nil + } + return f.Method +} + +func (f *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo) GetUrlPath() *string { + if f == nil { + return nil + } + return f.UrlPath +} + +func (f *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo) GetFieldTraversalPath() []string { + if f == nil { + return nil + } + return f.FieldTraversalPath +} + +func (f *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo) GetExtraProperties() map[string]interface{} { + return f.extraProperties +} + +func (f *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo) UnmarshalJSON(data []byte) error { + type unmarshaler FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *f = FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { + return err + } + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) + return nil +} + +func (f *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(f); err == nil { + return value + } + return fmt.Sprintf("%#v", f) +} + +type FieldMappingApiInstanceResponse struct { + Benefit []*FieldMappingApiInstance `json:"Benefit,omitempty" url:"Benefit,omitempty"` + EmployerBenefit []*FieldMappingApiInstance `json:"EmployerBenefit,omitempty" url:"EmployerBenefit,omitempty"` + Company []*FieldMappingApiInstance `json:"Company,omitempty" url:"Company,omitempty"` + EmployeePayrollRun []*FieldMappingApiInstance `json:"EmployeePayrollRun,omitempty" url:"EmployeePayrollRun,omitempty"` + Employee []*FieldMappingApiInstance `json:"Employee,omitempty" url:"Employee,omitempty"` + Employment []*FieldMappingApiInstance `json:"Employment,omitempty" url:"Employment,omitempty"` + Location []*FieldMappingApiInstance `json:"Location,omitempty" url:"Location,omitempty"` + PayrollRun []*FieldMappingApiInstance `json:"PayrollRun,omitempty" url:"PayrollRun,omitempty"` + Team []*FieldMappingApiInstance `json:"Team,omitempty" url:"Team,omitempty"` + TimeOff []*FieldMappingApiInstance `json:"TimeOff,omitempty" url:"TimeOff,omitempty"` + TimeOffBalance []*FieldMappingApiInstance `json:"TimeOffBalance,omitempty" url:"TimeOffBalance,omitempty"` + BankInfo []*FieldMappingApiInstance `json:"BankInfo,omitempty" url:"BankInfo,omitempty"` + PayGroup []*FieldMappingApiInstance `json:"PayGroup,omitempty" url:"PayGroup,omitempty"` + Group []*FieldMappingApiInstance `json:"Group,omitempty" url:"Group,omitempty"` + Dependent []*FieldMappingApiInstance `json:"Dependent,omitempty" url:"Dependent,omitempty"` + TimesheetEntry []*FieldMappingApiInstance `json:"TimesheetEntry,omitempty" url:"TimesheetEntry,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (f *FieldMappingApiInstanceResponse) GetBenefit() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Benefit +} + +func (f *FieldMappingApiInstanceResponse) GetEmployerBenefit() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.EmployerBenefit +} + +func (f *FieldMappingApiInstanceResponse) GetCompany() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Company +} + +func (f *FieldMappingApiInstanceResponse) GetEmployeePayrollRun() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.EmployeePayrollRun +} + +func (f *FieldMappingApiInstanceResponse) GetEmployee() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Employee +} + +func (f *FieldMappingApiInstanceResponse) GetEmployment() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Employment +} + +func (f *FieldMappingApiInstanceResponse) GetLocation() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Location +} + +func (f *FieldMappingApiInstanceResponse) GetPayrollRun() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.PayrollRun +} + +func (f *FieldMappingApiInstanceResponse) GetTeam() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Team +} + +func (f *FieldMappingApiInstanceResponse) GetTimeOff() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.TimeOff +} + +func (f *FieldMappingApiInstanceResponse) GetTimeOffBalance() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.TimeOffBalance +} + +func (f *FieldMappingApiInstanceResponse) GetBankInfo() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.BankInfo +} + +func (f *FieldMappingApiInstanceResponse) GetPayGroup() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.PayGroup +} + +func (f *FieldMappingApiInstanceResponse) GetGroup() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Group +} + +func (f *FieldMappingApiInstanceResponse) GetDependent() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Dependent +} + +func (f *FieldMappingApiInstanceResponse) GetTimesheetEntry() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.TimesheetEntry +} + +func (f *FieldMappingApiInstanceResponse) GetExtraProperties() map[string]interface{} { + return f.extraProperties +} + +func (f *FieldMappingApiInstanceResponse) UnmarshalJSON(data []byte) error { + type unmarshaler FieldMappingApiInstanceResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *f = FieldMappingApiInstanceResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { + return err + } + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) + return nil +} + +func (f *FieldMappingApiInstanceResponse) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(f); err == nil { + return value + } + return fmt.Sprintf("%#v", f) +} + +type FieldMappingApiInstanceTargetField struct { + Name string `json:"name" url:"name"` + Description string `json:"description" url:"description"` + IsOrganizationWide bool `json:"is_organization_wide" url:"is_organization_wide"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (f *FieldMappingApiInstanceTargetField) GetName() string { + if f == nil { + return "" + } + return f.Name +} + +func (f *FieldMappingApiInstanceTargetField) GetDescription() string { + if f == nil { + return "" + } + return f.Description +} + +func (f *FieldMappingApiInstanceTargetField) GetIsOrganizationWide() bool { + if f == nil { + return false + } + return f.IsOrganizationWide +} + +func (f *FieldMappingApiInstanceTargetField) GetExtraProperties() map[string]interface{} { + return f.extraProperties +} + +func (f *FieldMappingApiInstanceTargetField) UnmarshalJSON(data []byte) error { + type unmarshaler FieldMappingApiInstanceTargetField + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *f = FieldMappingApiInstanceTargetField(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { + return err + } + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) + return nil +} + +func (f *FieldMappingApiInstanceTargetField) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(f); err == nil { + return value + } + return fmt.Sprintf("%#v", f) +} + +type FieldMappingInstanceResponse struct { + Model *FieldMappingApiInstance `json:"model" url:"model"` + Warnings []*WarningValidationProblem `json:"warnings" url:"warnings"` + Errors []*ErrorValidationProblem `json:"errors" url:"errors"` + Logs []*DebugModeLog `json:"logs,omitempty" url:"logs,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (f *FieldMappingInstanceResponse) GetModel() *FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Model +} + +func (f *FieldMappingInstanceResponse) GetWarnings() []*WarningValidationProblem { + if f == nil { + return nil + } + return f.Warnings +} + +func (f *FieldMappingInstanceResponse) GetErrors() []*ErrorValidationProblem { + if f == nil { + return nil + } + return f.Errors +} + +func (f *FieldMappingInstanceResponse) GetLogs() []*DebugModeLog { + if f == nil { + return nil + } + return f.Logs +} + +func (f *FieldMappingInstanceResponse) GetExtraProperties() map[string]interface{} { + return f.extraProperties +} + +func (f *FieldMappingInstanceResponse) UnmarshalJSON(data []byte) error { + type unmarshaler FieldMappingInstanceResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *f = FieldMappingInstanceResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { + return err + } + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) + return nil +} + +func (f *FieldMappingInstanceResponse) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(f); err == nil { + return value + } + return fmt.Sprintf("%#v", f) +} + +type RemoteEndpointInfo struct { + Method string `json:"method" url:"method"` + UrlPath string `json:"url_path" url:"url_path"` + FieldTraversalPath []interface{} `json:"field_traversal_path" url:"field_traversal_path"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (r *RemoteEndpointInfo) GetMethod() string { + if r == nil { + return "" + } + return r.Method +} + +func (r *RemoteEndpointInfo) GetUrlPath() string { + if r == nil { + return "" + } + return r.UrlPath +} + +func (r *RemoteEndpointInfo) GetFieldTraversalPath() []interface{} { + if r == nil { + return nil + } + return r.FieldTraversalPath +} + +func (r *RemoteEndpointInfo) GetExtraProperties() map[string]interface{} { + return r.extraProperties +} + +func (r *RemoteEndpointInfo) UnmarshalJSON(data []byte) error { + type unmarshaler RemoteEndpointInfo + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *r = RemoteEndpointInfo(value) + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { + return err + } + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) + return nil +} + +func (r *RemoteEndpointInfo) String() string { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(r); err == nil { + return value + } + return fmt.Sprintf("%#v", r) +} + +type RemoteFieldApi struct { + Schema map[string]interface{} `json:"schema" url:"schema"` + RemoteKeyName string `json:"remote_key_name" url:"remote_key_name"` + RemoteEndpointInfo *RemoteEndpointInfo `json:"remote_endpoint_info" url:"remote_endpoint_info"` + ExampleValues []interface{} `json:"example_values,omitempty" url:"example_values,omitempty"` + AdvancedMetadata *AdvancedMetadata `json:"advanced_metadata,omitempty" url:"advanced_metadata,omitempty"` + Coverage *RemoteFieldApiCoverage `json:"coverage,omitempty" url:"coverage,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (r *RemoteFieldApi) GetSchema() map[string]interface{} { + if r == nil { + return nil + } + return r.Schema +} + +func (r *RemoteFieldApi) GetRemoteKeyName() string { + if r == nil { + return "" + } + return r.RemoteKeyName +} + +func (r *RemoteFieldApi) GetRemoteEndpointInfo() *RemoteEndpointInfo { + if r == nil { + return nil + } + return r.RemoteEndpointInfo +} + +func (r *RemoteFieldApi) GetExampleValues() []interface{} { + if r == nil { + return nil + } + return r.ExampleValues +} + +func (r *RemoteFieldApi) GetAdvancedMetadata() *AdvancedMetadata { + if r == nil { + return nil + } + return r.AdvancedMetadata +} + +func (r *RemoteFieldApi) GetCoverage() *RemoteFieldApiCoverage { + if r == nil { + return nil + } + return r.Coverage +} + +func (r *RemoteFieldApi) GetExtraProperties() map[string]interface{} { + return r.extraProperties +} + +func (r *RemoteFieldApi) UnmarshalJSON(data []byte) error { + type unmarshaler RemoteFieldApi + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *r = RemoteFieldApi(value) + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { + return err + } + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) + return nil +} + +func (r *RemoteFieldApi) String() string { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(r); err == nil { + return value + } + return fmt.Sprintf("%#v", r) +} + +type RemoteFieldApiCoverage struct { + Integer int + Double float64 + + typ string +} + +func (r *RemoteFieldApiCoverage) GetInteger() int { + if r == nil { + return 0 + } + return r.Integer +} + +func (r *RemoteFieldApiCoverage) GetDouble() float64 { + if r == nil { + return 0 + } + return r.Double +} + +func (r *RemoteFieldApiCoverage) UnmarshalJSON(data []byte) error { + var valueInteger int + if err := json.Unmarshal(data, &valueInteger); err == nil { + r.typ = "Integer" + r.Integer = valueInteger + return nil + } + var valueDouble float64 + if err := json.Unmarshal(data, &valueDouble); err == nil { + r.typ = "Double" + r.Double = valueDouble + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, r) +} + +func (r RemoteFieldApiCoverage) MarshalJSON() ([]byte, error) { + if r.typ == "Integer" || r.Integer != 0 { + return json.Marshal(r.Integer) + } + if r.typ == "Double" || r.Double != 0 { + return json.Marshal(r.Double) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", r) +} + +type RemoteFieldApiCoverageVisitor interface { + VisitInteger(int) error + VisitDouble(float64) error +} + +func (r *RemoteFieldApiCoverage) Accept(visitor RemoteFieldApiCoverageVisitor) error { + if r.typ == "Integer" || r.Integer != 0 { + return visitor.VisitInteger(r.Integer) + } + if r.typ == "Double" || r.Double != 0 { + return visitor.VisitDouble(r.Double) + } + return fmt.Errorf("type %T does not include a non-empty union type", r) +} + +type RemoteFieldApiResponse struct { + Benefit []*RemoteFieldApi `json:"Benefit,omitempty" url:"Benefit,omitempty"` + EmployerBenefit []*RemoteFieldApi `json:"EmployerBenefit,omitempty" url:"EmployerBenefit,omitempty"` + Company []*RemoteFieldApi `json:"Company,omitempty" url:"Company,omitempty"` + EmployeePayrollRun []*RemoteFieldApi `json:"EmployeePayrollRun,omitempty" url:"EmployeePayrollRun,omitempty"` + Employee []*RemoteFieldApi `json:"Employee,omitempty" url:"Employee,omitempty"` + Employment []*RemoteFieldApi `json:"Employment,omitempty" url:"Employment,omitempty"` + Location []*RemoteFieldApi `json:"Location,omitempty" url:"Location,omitempty"` + PayrollRun []*RemoteFieldApi `json:"PayrollRun,omitempty" url:"PayrollRun,omitempty"` + Team []*RemoteFieldApi `json:"Team,omitempty" url:"Team,omitempty"` + TimeOff []*RemoteFieldApi `json:"TimeOff,omitempty" url:"TimeOff,omitempty"` + TimeOffBalance []*RemoteFieldApi `json:"TimeOffBalance,omitempty" url:"TimeOffBalance,omitempty"` + BankInfo []*RemoteFieldApi `json:"BankInfo,omitempty" url:"BankInfo,omitempty"` + PayGroup []*RemoteFieldApi `json:"PayGroup,omitempty" url:"PayGroup,omitempty"` + Group []*RemoteFieldApi `json:"Group,omitempty" url:"Group,omitempty"` + Dependent []*RemoteFieldApi `json:"Dependent,omitempty" url:"Dependent,omitempty"` + TimesheetEntry []*RemoteFieldApi `json:"TimesheetEntry,omitempty" url:"TimesheetEntry,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (r *RemoteFieldApiResponse) GetBenefit() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.Benefit +} + +func (r *RemoteFieldApiResponse) GetEmployerBenefit() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.EmployerBenefit +} + +func (r *RemoteFieldApiResponse) GetCompany() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.Company +} + +func (r *RemoteFieldApiResponse) GetEmployeePayrollRun() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.EmployeePayrollRun +} + +func (r *RemoteFieldApiResponse) GetEmployee() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.Employee +} + +func (r *RemoteFieldApiResponse) GetEmployment() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.Employment +} + +func (r *RemoteFieldApiResponse) GetLocation() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.Location +} + +func (r *RemoteFieldApiResponse) GetPayrollRun() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.PayrollRun +} + +func (r *RemoteFieldApiResponse) GetTeam() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.Team +} + +func (r *RemoteFieldApiResponse) GetTimeOff() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.TimeOff +} + +func (r *RemoteFieldApiResponse) GetTimeOffBalance() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.TimeOffBalance +} + +func (r *RemoteFieldApiResponse) GetBankInfo() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.BankInfo +} + +func (r *RemoteFieldApiResponse) GetPayGroup() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.PayGroup +} + +func (r *RemoteFieldApiResponse) GetGroup() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.Group +} + +func (r *RemoteFieldApiResponse) GetDependent() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.Dependent +} + +func (r *RemoteFieldApiResponse) GetTimesheetEntry() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.TimesheetEntry +} + +func (r *RemoteFieldApiResponse) GetExtraProperties() map[string]interface{} { + return r.extraProperties +} + +func (r *RemoteFieldApiResponse) UnmarshalJSON(data []byte) error { + type unmarshaler RemoteFieldApiResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *r = RemoteFieldApiResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { + return err + } + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) + return nil +} + +func (r *RemoteFieldApiResponse) String() string { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(r); err == nil { + return value + } + return fmt.Sprintf("%#v", r) } diff --git a/hris/fieldmapping/client.go b/hris/fieldmapping/client.go index cf465fc..44d8a78 100644 --- a/hris/fieldmapping/client.go +++ b/hris/fieldmapping/client.go @@ -1,58 +1,73 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package fieldmapping import ( context "context" - fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - hris "github.com/merge-api/merge-go-client/hris" + core "github.com/merge-api/merge-go-client/v2/core" + hris "github.com/merge-api/merge-go-client/v2/hris" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge fields. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). -func (c *Client) FieldMappingsRetrieve(ctx context.Context, request *hris.FieldMappingsRetrieveRequest) (*hris.FieldMappingApiInstanceResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "hris/v1/field-mappings" - - queryParams := make(url.Values) - if request.ExcludeRemoteFieldMetadata != nil { - queryParams.Add("exclude_remote_field_metadata", fmt.Sprintf("%v", *request.ExcludeRemoteFieldMetadata)) +func (c *Client) FieldMappingsRetrieve( + ctx context.Context, + request *hris.FieldMappingsRetrieveRequest, + opts ...option.RequestOption, +) (*hris.FieldMappingApiInstanceResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/hris/v1/field-mappings" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *hris.FieldMappingApiInstanceResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -61,30 +76,44 @@ func (c *Client) FieldMappingsRetrieve(ctx context.Context, request *hris.FieldM } // Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. -func (c *Client) FieldMappingsCreate(ctx context.Context, request *hris.CreateFieldMappingRequest) (*hris.FieldMappingInstanceResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "hris/v1/field-mappings" - - queryParams := make(url.Values) - if request.ExcludeRemoteFieldMetadata != nil { - queryParams.Add("exclude_remote_field_metadata", fmt.Sprintf("%v", *request.ExcludeRemoteFieldMetadata)) +func (c *Client) FieldMappingsCreate( + ctx context.Context, + request *hris.CreateFieldMappingRequest, + opts ...option.RequestOption, +) (*hris.FieldMappingInstanceResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/hris/v1/field-mappings" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *hris.FieldMappingInstanceResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -93,21 +122,38 @@ func (c *Client) FieldMappingsCreate(ctx context.Context, request *hris.CreateFi } // Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. -func (c *Client) FieldMappingsDestroy(ctx context.Context, fieldMappingId string) (*hris.FieldMappingInstanceResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"hris/v1/field-mappings/%v", fieldMappingId) +func (c *Client) FieldMappingsDestroy( + ctx context.Context, + fieldMappingId string, + opts ...option.RequestOption, +) (*hris.FieldMappingInstanceResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/hris/v1/field-mappings/%v", + fieldMappingId, + ) + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *hris.FieldMappingInstanceResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodDelete, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodDelete, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -116,22 +162,41 @@ func (c *Client) FieldMappingsDestroy(ctx context.Context, fieldMappingId string } // Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. -func (c *Client) FieldMappingsPartialUpdate(ctx context.Context, fieldMappingId string, request *hris.PatchedEditFieldMappingRequest) (*hris.FieldMappingInstanceResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"hris/v1/field-mappings/%v", fieldMappingId) +func (c *Client) FieldMappingsPartialUpdate( + ctx context.Context, + fieldMappingId string, + request *hris.PatchedEditFieldMappingRequest, + opts ...option.RequestOption, +) (*hris.FieldMappingInstanceResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/hris/v1/field-mappings/%v", + fieldMappingId, + ) + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *hris.FieldMappingInstanceResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPatch, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPatch, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -140,32 +205,42 @@ func (c *Client) FieldMappingsPartialUpdate(ctx context.Context, fieldMappingId } // Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data is enabled. You can use remote fields to override existing Merge fields or map a new Merge field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). -func (c *Client) RemoteFieldsRetrieve(ctx context.Context, request *hris.RemoteFieldsRetrieveRequest) (*hris.RemoteFieldApiResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "hris/v1/remote-fields" - - queryParams := make(url.Values) - if request.CommonModels != nil { - queryParams.Add("common_models", fmt.Sprintf("%v", *request.CommonModels)) - } - if request.IncludeExampleValues != nil { - queryParams.Add("include_example_values", fmt.Sprintf("%v", *request.IncludeExampleValues)) +func (c *Client) RemoteFieldsRetrieve( + ctx context.Context, + request *hris.RemoteFieldsRetrieveRequest, + opts ...option.RequestOption, +) (*hris.RemoteFieldApiResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/hris/v1/remote-fields" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *hris.RemoteFieldApiResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -174,21 +249,34 @@ func (c *Client) RemoteFieldsRetrieve(ctx context.Context, request *hris.RemoteF } // Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields are additional fields appended to the Merge Common Model for all Linked Accounts in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). -func (c *Client) TargetFieldsRetrieve(ctx context.Context) (*hris.ExternalTargetFieldApiResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "hris/v1/target-fields" +func (c *Client) TargetFieldsRetrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*hris.ExternalTargetFieldApiResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/hris/v1/target-fields" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *hris.ExternalTargetFieldApiResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/hris/forceresync/client.go b/hris/forceresync/client.go index c9ce44b..c369763 100644 --- a/hris/forceresync/client.go +++ b/hris/forceresync/client.go @@ -1,48 +1,65 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package forceresync import ( context "context" - core "github.com/merge-api/merge-go-client/core" - hris "github.com/merge-api/merge-go-client/hris" + core "github.com/merge-api/merge-go-client/v2/core" + hris "github.com/merge-api/merge-go-client/v2/hris" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } -// Force re-sync of all models. This is available for all organizations via the dashboard. Force re-sync is also available programmatically via API for monthly, quarterly, and highest sync frequency customers on the Professional or Enterprise plans. Doing so will consume a sync credit for the relevant linked account. -func (c *Client) SyncStatusResyncCreate(ctx context.Context) ([]*hris.SyncStatus, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "hris/v1/sync-status/resync" +// Force re-sync of all models. This endpoint is available for monthly, quarterly, and highest sync frequency customers on the Professional or Enterprise plans. Doing so will consume a sync credit for the relevant linked account. Force re-syncs can also be triggered manually in the Merge Dashboard and is available for all customers. +func (c *Client) SyncStatusResyncCreate( + ctx context.Context, + opts ...option.RequestOption, +) ([]*hris.SyncStatus, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/hris/v1/sync-status/resync" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response []*hris.SyncStatus if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/hris/generate_key.go b/hris/generate_key.go index edd4d55..922a1a2 100644 --- a/hris/generate_key.go +++ b/hris/generate_key.go @@ -1,8 +1,8 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package hris type GenerateRemoteKeyRequest struct { // The name of the remote key - Name string `json:"name"` + Name string `json:"name" url:"-"` } diff --git a/hris/generatekey/client.go b/hris/generatekey/client.go index ee7c9a6..b3d7f10 100644 --- a/hris/generatekey/client.go +++ b/hris/generatekey/client.go @@ -1,49 +1,68 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package generatekey import ( context "context" - core "github.com/merge-api/merge-go-client/core" - hris "github.com/merge-api/merge-go-client/hris" + core "github.com/merge-api/merge-go-client/v2/core" + hris "github.com/merge-api/merge-go-client/v2/hris" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Create a remote key. -func (c *Client) Create(ctx context.Context, request *hris.GenerateRemoteKeyRequest) (*hris.RemoteKey, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "hris/v1/generate-key" +func (c *Client) Create( + ctx context.Context, + request *hris.GenerateRemoteKeyRequest, + opts ...option.RequestOption, +) (*hris.RemoteKey, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/hris/v1/generate-key" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *hris.RemoteKey if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err diff --git a/hris/groups.go b/hris/groups.go index 035d5ea..4540b3b 100644 --- a/hris/groups.go +++ b/hris/groups.go @@ -1,49 +1,116 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package hris import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type GroupsListRequest struct { // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, specifies whether to return only Group objects which refer to a team in the third party platform. Note that this is an opinionated view based on how a team may be represented in the third party platform. - IsCommonlyUsedAsTeam *string `json:"-"` + IsCommonlyUsedAsTeam *string `json:"-" url:"is_commonly_used_as_team,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // If provided, will only return groups with these names. Multiple values can be separated by commas. - Names *string `json:"-"` + Names *string `json:"-" url:"names,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // Deprecated. Use show_enum_origins. - RemoteFields *string `json:"-"` + RemoteFields *string `json:"-" url:"remote_fields,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` // 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) - ShowEnumOrigins *string `json:"-"` + ShowEnumOrigins *string `json:"-" url:"show_enum_origins,omitempty"` // If provided, will only return groups of these types. Multiple values can be separated by commas. - Types *string `json:"-"` + Types *string `json:"-" url:"types,omitempty"` } type GroupsRetrieveRequest struct { // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // Deprecated. Use show_enum_origins. - RemoteFields *string `json:"-"` + RemoteFields *string `json:"-" url:"remote_fields,omitempty"` // 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) - ShowEnumOrigins *string `json:"-"` + ShowEnumOrigins *string `json:"-" url:"show_enum_origins,omitempty"` +} + +type PaginatedGroupList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Group `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedGroupList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedGroupList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedGroupList) GetResults() []*Group { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedGroupList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedGroupList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedGroupList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedGroupList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedGroupList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) } diff --git a/hris/groups/client.go b/hris/groups/client.go index c08d27f..e545f44 100644 --- a/hris/groups/client.go +++ b/hris/groups/client.go @@ -1,138 +1,137 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package groups import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - hris "github.com/merge-api/merge-go-client/hris" + core "github.com/merge-api/merge-go-client/v2/core" + hris "github.com/merge-api/merge-go-client/v2/hris" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `Group` objects. -func (c *Client) List(ctx context.Context, request *hris.GroupsListRequest) (*hris.PaginatedGroupList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "hris/v1/groups" - - queryParams := make(url.Values) - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.IsCommonlyUsedAsTeam != nil { - queryParams.Add("is_commonly_used_as_team", fmt.Sprintf("%v", *request.IsCommonlyUsedAsTeam)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.Names != nil { - queryParams.Add("names", fmt.Sprintf("%v", *request.Names)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteFields != nil { - queryParams.Add("remote_fields", fmt.Sprintf("%v", request.RemoteFields)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if request.ShowEnumOrigins != nil { - queryParams.Add("show_enum_origins", fmt.Sprintf("%v", request.ShowEnumOrigins)) - } - if request.Types != nil { - queryParams.Add("types", fmt.Sprintf("%v", *request.Types)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *hris.PaginatedGroupList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *hris.GroupsListRequest, + opts ...option.RequestOption, +) (*core.Page[*hris.Group], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/hris/v1/groups" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *hris.PaginatedGroupList) *internal.PageResponse[*string, *hris.Group] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *hris.Group]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Returns a `Group` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *hris.GroupsRetrieveRequest) (*hris.Group, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"hris/v1/groups/%v", id) - - queryParams := make(url.Values) - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.RemoteFields != nil { - queryParams.Add("remote_fields", fmt.Sprintf("%v", request.RemoteFields)) - } - if request.ShowEnumOrigins != nil { - queryParams.Add("show_enum_origins", fmt.Sprintf("%v", request.ShowEnumOrigins)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *hris.GroupsRetrieveRequest, + opts ...option.RequestOption, +) (*hris.Group, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/hris/v1/groups/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *hris.Group if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/hris/issues.go b/hris/issues.go index 7346502..e26293a 100644 --- a/hris/issues.go +++ b/hris/issues.go @@ -1,41 +1,43 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package hris import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type IssuesListRequest struct { - AccountToken *string `json:"-"` + AccountToken *string `json:"-" url:"account_token,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // If included, will only include issues whose most recent action occurred before this time - EndDate *string `json:"-"` - EndUserOrganizationName *string `json:"-"` + EndDate *string `json:"-" url:"end_date,omitempty"` + EndUserOrganizationName *string `json:"-" url:"end_user_organization_name,omitempty"` // If provided, will only return issues whose first incident time was after this datetime. - FirstIncidentTimeAfter *time.Time `json:"-"` + FirstIncidentTimeAfter *time.Time `json:"-" url:"first_incident_time_after,omitempty"` // If provided, will only return issues whose first incident time was before this datetime. - FirstIncidentTimeBefore *time.Time `json:"-"` + FirstIncidentTimeBefore *time.Time `json:"-" url:"first_incident_time_before,omitempty"` // If true, will include muted issues - IncludeMuted *string `json:"-"` - IntegrationName *string `json:"-"` + IncludeMuted *string `json:"-" url:"include_muted,omitempty"` + IntegrationName *string `json:"-" url:"integration_name,omitempty"` // If provided, will only return issues whose last incident time was after this datetime. - LastIncidentTimeAfter *time.Time `json:"-"` + LastIncidentTimeAfter *time.Time `json:"-" url:"last_incident_time_after,omitempty"` // If provided, will only return issues whose last incident time was before this datetime. - LastIncidentTimeBefore *time.Time `json:"-"` + LastIncidentTimeBefore *time.Time `json:"-" url:"last_incident_time_before,omitempty"` // If provided, will only include issues pertaining to the linked account passed in. - LinkedAccountId *string `json:"-"` + LinkedAccountId *string `json:"-" url:"linked_account_id,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // If included, will only include issues whose most recent action occurred after this time - StartDate *string `json:"-"` + StartDate *string `json:"-" url:"start_date,omitempty"` // Status of the issue. Options: ('ONGOING', 'RESOLVED') // - // - `ONGOING` - ONGOING - // - `RESOLVED` - RESOLVED - Status *IssuesListRequestStatus `json:"-"` + // * `ONGOING` - ONGOING + // * `RESOLVED` - RESOLVED + Status *IssuesListRequestStatus `json:"-" url:"status,omitempty"` } type IssuesListRequestStatus string @@ -59,3 +61,283 @@ func NewIssuesListRequestStatusFromString(s string) (IssuesListRequestStatus, er func (i IssuesListRequestStatus) Ptr() *IssuesListRequestStatus { return &i } + +type Issue struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // Status of the issue. Options: ('ONGOING', 'RESOLVED') + // + // * `ONGOING` - ONGOING + // * `RESOLVED` - RESOLVED + Status *IssueStatus `json:"status,omitempty" url:"status,omitempty"` + ErrorDescription string `json:"error_description" url:"error_description"` + EndUser map[string]interface{} `json:"end_user,omitempty" url:"end_user,omitempty"` + FirstIncidentTime *time.Time `json:"first_incident_time,omitempty" url:"first_incident_time,omitempty"` + LastIncidentTime *time.Time `json:"last_incident_time,omitempty" url:"last_incident_time,omitempty"` + IsMuted *bool `json:"is_muted,omitempty" url:"is_muted,omitempty"` + ErrorDetails []string `json:"error_details,omitempty" url:"error_details,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (i *Issue) GetId() *string { + if i == nil { + return nil + } + return i.Id +} + +func (i *Issue) GetStatus() *IssueStatus { + if i == nil { + return nil + } + return i.Status +} + +func (i *Issue) GetErrorDescription() string { + if i == nil { + return "" + } + return i.ErrorDescription +} + +func (i *Issue) GetEndUser() map[string]interface{} { + if i == nil { + return nil + } + return i.EndUser +} + +func (i *Issue) GetFirstIncidentTime() *time.Time { + if i == nil { + return nil + } + return i.FirstIncidentTime +} + +func (i *Issue) GetLastIncidentTime() *time.Time { + if i == nil { + return nil + } + return i.LastIncidentTime +} + +func (i *Issue) GetIsMuted() *bool { + if i == nil { + return nil + } + return i.IsMuted +} + +func (i *Issue) GetErrorDetails() []string { + if i == nil { + return nil + } + return i.ErrorDetails +} + +func (i *Issue) GetExtraProperties() map[string]interface{} { + return i.extraProperties +} + +func (i *Issue) UnmarshalJSON(data []byte) error { + type embed Issue + var unmarshaler = struct { + embed + FirstIncidentTime *internal.DateTime `json:"first_incident_time,omitempty"` + LastIncidentTime *internal.DateTime `json:"last_incident_time,omitempty"` + }{ + embed: embed(*i), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *i = Issue(unmarshaler.embed) + i.FirstIncidentTime = unmarshaler.FirstIncidentTime.TimePtr() + i.LastIncidentTime = unmarshaler.LastIncidentTime.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *i) + if err != nil { + return err + } + i.extraProperties = extraProperties + i.rawJSON = json.RawMessage(data) + return nil +} + +func (i *Issue) MarshalJSON() ([]byte, error) { + type embed Issue + var marshaler = struct { + embed + FirstIncidentTime *internal.DateTime `json:"first_incident_time,omitempty"` + LastIncidentTime *internal.DateTime `json:"last_incident_time,omitempty"` + }{ + embed: embed(*i), + FirstIncidentTime: internal.NewOptionalDateTime(i.FirstIncidentTime), + LastIncidentTime: internal.NewOptionalDateTime(i.LastIncidentTime), + } + return json.Marshal(marshaler) +} + +func (i *Issue) String() string { + if len(i.rawJSON) > 0 { + if value, err := internal.StringifyJSON(i.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(i); err == nil { + return value + } + return fmt.Sprintf("%#v", i) +} + +// Status of the issue. Options: ('ONGOING', 'RESOLVED') +// +// * `ONGOING` - ONGOING +// * `RESOLVED` - RESOLVED +type IssueStatus struct { + IssueStatusEnum IssueStatusEnum + String string + + typ string +} + +func (i *IssueStatus) GetIssueStatusEnum() IssueStatusEnum { + if i == nil { + return "" + } + return i.IssueStatusEnum +} + +func (i *IssueStatus) GetString() string { + if i == nil { + return "" + } + return i.String +} + +func (i *IssueStatus) UnmarshalJSON(data []byte) error { + var valueIssueStatusEnum IssueStatusEnum + if err := json.Unmarshal(data, &valueIssueStatusEnum); err == nil { + i.typ = "IssueStatusEnum" + i.IssueStatusEnum = valueIssueStatusEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + i.typ = "String" + i.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) +} + +func (i IssueStatus) MarshalJSON() ([]byte, error) { + if i.typ == "IssueStatusEnum" || i.IssueStatusEnum != "" { + return json.Marshal(i.IssueStatusEnum) + } + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) +} + +type IssueStatusVisitor interface { + VisitIssueStatusEnum(IssueStatusEnum) error + VisitString(string) error +} + +func (i *IssueStatus) Accept(visitor IssueStatusVisitor) error { + if i.typ == "IssueStatusEnum" || i.IssueStatusEnum != "" { + return visitor.VisitIssueStatusEnum(i.IssueStatusEnum) + } + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", i) +} + +// * `ONGOING` - ONGOING +// * `RESOLVED` - RESOLVED +type IssueStatusEnum string + +const ( + IssueStatusEnumOngoing IssueStatusEnum = "ONGOING" + IssueStatusEnumResolved IssueStatusEnum = "RESOLVED" +) + +func NewIssueStatusEnumFromString(s string) (IssueStatusEnum, error) { + switch s { + case "ONGOING": + return IssueStatusEnumOngoing, nil + case "RESOLVED": + return IssueStatusEnumResolved, nil + } + var t IssueStatusEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (i IssueStatusEnum) Ptr() *IssueStatusEnum { + return &i +} + +type PaginatedIssueList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Issue `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedIssueList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedIssueList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedIssueList) GetResults() []*Issue { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedIssueList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedIssueList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedIssueList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedIssueList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedIssueList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} diff --git a/hris/issues/client.go b/hris/issues/client.go index 4eed038..372391e 100644 --- a/hris/issues/client.go +++ b/hris/issues/client.go @@ -1,121 +1,129 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package issues import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - hris "github.com/merge-api/merge-go-client/hris" + core "github.com/merge-api/merge-go-client/v2/core" + hris "github.com/merge-api/merge-go-client/v2/hris" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Gets all issues for Organization. -func (c *Client) List(ctx context.Context, request *hris.IssuesListRequest) (*hris.PaginatedIssueList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "hris/v1/issues" - - queryParams := make(url.Values) - if request.AccountToken != nil { - queryParams.Add("account_token", fmt.Sprintf("%v", *request.AccountToken)) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.EndDate != nil { - queryParams.Add("end_date", fmt.Sprintf("%v", *request.EndDate)) - } - if request.EndUserOrganizationName != nil { - queryParams.Add("end_user_organization_name", fmt.Sprintf("%v", *request.EndUserOrganizationName)) - } - if request.FirstIncidentTimeAfter != nil { - queryParams.Add("first_incident_time_after", fmt.Sprintf("%v", request.FirstIncidentTimeAfter.Format(time.RFC3339))) - } - if request.FirstIncidentTimeBefore != nil { - queryParams.Add("first_incident_time_before", fmt.Sprintf("%v", request.FirstIncidentTimeBefore.Format(time.RFC3339))) - } - if request.IncludeMuted != nil { - queryParams.Add("include_muted", fmt.Sprintf("%v", *request.IncludeMuted)) - } - if request.IntegrationName != nil { - queryParams.Add("integration_name", fmt.Sprintf("%v", *request.IntegrationName)) - } - if request.LastIncidentTimeAfter != nil { - queryParams.Add("last_incident_time_after", fmt.Sprintf("%v", request.LastIncidentTimeAfter.Format(time.RFC3339))) - } - if request.LastIncidentTimeBefore != nil { - queryParams.Add("last_incident_time_before", fmt.Sprintf("%v", request.LastIncidentTimeBefore.Format(time.RFC3339))) - } - if request.LinkedAccountId != nil { - queryParams.Add("linked_account_id", fmt.Sprintf("%v", *request.LinkedAccountId)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.StartDate != nil { - queryParams.Add("start_date", fmt.Sprintf("%v", *request.StartDate)) - } - if request.Status != nil { - queryParams.Add("status", fmt.Sprintf("%v", *request.Status)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *hris.PaginatedIssueList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *hris.IssuesListRequest, + opts ...option.RequestOption, +) (*core.Page[*hris.Issue], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/hris/v1/issues" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *hris.PaginatedIssueList) *internal.PageResponse[*string, *hris.Issue] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *hris.Issue]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Get a specific issue. -func (c *Client) Retrieve(ctx context.Context, id string) (*hris.Issue, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"hris/v1/issues/%v", id) +func (c *Client) Retrieve( + ctx context.Context, + id string, + opts ...option.RequestOption, +) (*hris.Issue, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/hris/v1/issues/%v", + id, + ) + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *hris.Issue if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/hris/link_token.go b/hris/link_token.go index 30d412f..e69241e 100644 --- a/hris/link_token.go +++ b/hris/link_token.go @@ -1,35 +1,279 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package hris +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" +) + type EndUserDetailsRequest struct { // Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent. - EndUserEmailAddress string `json:"end_user_email_address"` + EndUserEmailAddress string `json:"end_user_email_address" url:"-"` // Your end user's organization. - EndUserOrganizationName string `json:"end_user_organization_name"` + EndUserOrganizationName string `json:"end_user_organization_name" url:"-"` // This unique identifier typically represents the ID for your end user in your product's database. This value must be distinct from other Linked Accounts' unique identifiers. - EndUserOriginId string `json:"end_user_origin_id"` + EndUserOriginId string `json:"end_user_origin_id" url:"-"` // The integration categories to show in Merge Link. - Categories []CategoriesEnum `json:"categories,omitempty"` + Categories []CategoriesEnum `json:"categories,omitempty" url:"-"` // The slug of a specific pre-selected integration for this linking flow token. For examples of slugs, see https://docs.merge.dev/guides/merge-link/single-integration/. - Integration *string `json:"integration,omitempty"` + Integration *string `json:"integration,omitempty" url:"-"` // An integer number of minutes between [30, 720 or 10080 if for a Magic Link URL] for how long this token is valid. Defaults to 30. - LinkExpiryMins *int `json:"link_expiry_mins,omitempty"` + LinkExpiryMins *int `json:"link_expiry_mins,omitempty" url:"-"` // Whether to generate a Magic Link URL. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. - ShouldCreateMagicLinkUrl *bool `json:"should_create_magic_link_url,omitempty"` + ShouldCreateMagicLinkUrl *bool `json:"should_create_magic_link_url,omitempty" url:"-"` // Whether to generate a Magic Link URL on the Admin Needed screen during the linking flow. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. - HideAdminMagicLink *bool `json:"hide_admin_magic_link,omitempty"` + HideAdminMagicLink *bool `json:"hide_admin_magic_link,omitempty" url:"-"` // An array of objects to specify the models and fields that will be disabled for a given Linked Account. Each object uses model_id, enabled_actions, and disabled_fields to specify the model, method, and fields that are scoped for a given Linked Account. - CommonModels []*CommonModelScopesBodyRequest `json:"common_models,omitempty"` + CommonModels []*CommonModelScopesBodyRequest `json:"common_models,omitempty" url:"-"` // 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. - CategoryCommonModelScopes map[string][]*IndividualCommonModelScopeDeserializerRequest `json:"category_common_model_scopes,omitempty"` + CategoryCommonModelScopes map[string][]*IndividualCommonModelScopeDeserializerRequest `json:"category_common_model_scopes,omitempty" url:"-"` // The following subset of IETF language tags can be used to configure localization. // // * `en` - en // * `de` - de - Language *LanguageEnum `json:"language,omitempty"` + Language *EndUserDetailsRequestLanguage `json:"language,omitempty" url:"-"` // The boolean that indicates whether initial, periodic, and force syncs will be disabled. - AreSyncsDisabled *bool `json:"are_syncs_disabled,omitempty"` + AreSyncsDisabled *bool `json:"are_syncs_disabled,omitempty" url:"-"` // A JSON object containing integration-specific configuration options. - IntegrationSpecificConfig map[string]interface{} `json:"integration_specific_config,omitempty"` + IntegrationSpecificConfig map[string]interface{} `json:"integration_specific_config,omitempty" url:"-"` +} + +// The following subset of IETF language tags can be used to configure localization. +// +// * `en` - en +// * `de` - de +type EndUserDetailsRequestLanguage struct { + LanguageEnum LanguageEnum + String string + + typ string +} + +func (e *EndUserDetailsRequestLanguage) GetLanguageEnum() LanguageEnum { + if e == nil { + return "" + } + return e.LanguageEnum +} + +func (e *EndUserDetailsRequestLanguage) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *EndUserDetailsRequestLanguage) UnmarshalJSON(data []byte) error { + var valueLanguageEnum LanguageEnum + if err := json.Unmarshal(data, &valueLanguageEnum); err == nil { + e.typ = "LanguageEnum" + e.LanguageEnum = valueLanguageEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e EndUserDetailsRequestLanguage) MarshalJSON() ([]byte, error) { + if e.typ == "LanguageEnum" || e.LanguageEnum != "" { + return json.Marshal(e.LanguageEnum) + } + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type EndUserDetailsRequestLanguageVisitor interface { + VisitLanguageEnum(LanguageEnum) error + VisitString(string) error +} + +func (e *EndUserDetailsRequestLanguage) Accept(visitor EndUserDetailsRequestLanguageVisitor) error { + if e.typ == "LanguageEnum" || e.LanguageEnum != "" { + return visitor.VisitLanguageEnum(e.LanguageEnum) + } + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type CommonModelScopesBodyRequest struct { + ModelId string `json:"model_id" url:"model_id"` + EnabledActions []EnabledActionsEnum `json:"enabled_actions" url:"enabled_actions"` + DisabledFields []string `json:"disabled_fields" url:"disabled_fields"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (c *CommonModelScopesBodyRequest) GetModelId() string { + if c == nil { + return "" + } + return c.ModelId +} + +func (c *CommonModelScopesBodyRequest) GetEnabledActions() []EnabledActionsEnum { + if c == nil { + return nil + } + return c.EnabledActions +} + +func (c *CommonModelScopesBodyRequest) GetDisabledFields() []string { + if c == nil { + return nil + } + return c.DisabledFields +} + +func (c *CommonModelScopesBodyRequest) GetExtraProperties() map[string]interface{} { + return c.extraProperties +} + +func (c *CommonModelScopesBodyRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CommonModelScopesBodyRequest + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *c = CommonModelScopesBodyRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *c) + if err != nil { + return err + } + c.extraProperties = extraProperties + c.rawJSON = json.RawMessage(data) + return nil +} + +func (c *CommonModelScopesBodyRequest) String() string { + if len(c.rawJSON) > 0 { + if value, err := internal.StringifyJSON(c.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(c); err == nil { + return value + } + return fmt.Sprintf("%#v", c) +} + +// * `READ` - READ +// * `WRITE` - WRITE +type EnabledActionsEnum string + +const ( + EnabledActionsEnumRead EnabledActionsEnum = "READ" + EnabledActionsEnumWrite EnabledActionsEnum = "WRITE" +) + +func NewEnabledActionsEnumFromString(s string) (EnabledActionsEnum, error) { + switch s { + case "READ": + return EnabledActionsEnumRead, nil + case "WRITE": + return EnabledActionsEnumWrite, nil + } + var t EnabledActionsEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (e EnabledActionsEnum) Ptr() *EnabledActionsEnum { + return &e +} + +// * `en` - en +// * `de` - de +type LanguageEnum string + +const ( + LanguageEnumEn LanguageEnum = "en" + LanguageEnumDe LanguageEnum = "de" +) + +func NewLanguageEnumFromString(s string) (LanguageEnum, error) { + switch s { + case "en": + return LanguageEnumEn, nil + case "de": + return LanguageEnumDe, nil + } + var t LanguageEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (l LanguageEnum) Ptr() *LanguageEnum { + return &l +} + +type LinkToken struct { + LinkToken string `json:"link_token" url:"link_token"` + IntegrationName *string `json:"integration_name,omitempty" url:"integration_name,omitempty"` + MagicLinkUrl *string `json:"magic_link_url,omitempty" url:"magic_link_url,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (l *LinkToken) GetLinkToken() string { + if l == nil { + return "" + } + return l.LinkToken +} + +func (l *LinkToken) GetIntegrationName() *string { + if l == nil { + return nil + } + return l.IntegrationName +} + +func (l *LinkToken) GetMagicLinkUrl() *string { + if l == nil { + return nil + } + return l.MagicLinkUrl +} + +func (l *LinkToken) GetExtraProperties() map[string]interface{} { + return l.extraProperties +} + +func (l *LinkToken) UnmarshalJSON(data []byte) error { + type unmarshaler LinkToken + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *l = LinkToken(value) + extraProperties, err := internal.ExtractExtraProperties(data, *l) + if err != nil { + return err + } + l.extraProperties = extraProperties + l.rawJSON = json.RawMessage(data) + return nil +} + +func (l *LinkToken) String() string { + if len(l.rawJSON) > 0 { + if value, err := internal.StringifyJSON(l.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(l); err == nil { + return value + } + return fmt.Sprintf("%#v", l) } diff --git a/hris/linked_accounts.go b/hris/linked_accounts.go index 0bd48e5..f8fd060 100644 --- a/hris/linked_accounts.go +++ b/hris/linked_accounts.go @@ -1,45 +1,48 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package hris import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" + time "time" ) type LinkedAccountsListRequest struct { // Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing` // - // - `hris` - hris - // - `ats` - ats - // - `accounting` - accounting - // - `ticketing` - ticketing - // - `crm` - crm - // - `mktg` - mktg - // - `filestorage` - filestorage - Category *LinkedAccountsListRequestCategory `json:"-"` + // * `hris` - hris + // * `ats` - ats + // * `accounting` - accounting + // * `ticketing` - ticketing + // * `crm` - crm + // * `mktg` - mktg + // * `filestorage` - filestorage + Category *LinkedAccountsListRequestCategory `json:"-" url:"category,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // If provided, will only return linked accounts associated with the given email address. - EndUserEmailAddress *string `json:"-"` + EndUserEmailAddress *string `json:"-" url:"end_user_email_address,omitempty"` // If provided, will only return linked accounts associated with the given organization name. - EndUserOrganizationName *string `json:"-"` + EndUserOrganizationName *string `json:"-" url:"end_user_organization_name,omitempty"` // If provided, will only return linked accounts associated with the given origin ID. - EndUserOriginId *string `json:"-"` + EndUserOriginId *string `json:"-" url:"end_user_origin_id,omitempty"` // Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once. - EndUserOriginIds *string `json:"-"` - Id *string `json:"-"` + EndUserOriginIds *string `json:"-" url:"end_user_origin_ids,omitempty"` + Id *string `json:"-" url:"id,omitempty"` // Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once. - Ids *string `json:"-"` + Ids *string `json:"-" url:"ids,omitempty"` // If `true`, will include complete production duplicates of the account specified by the `id` query parameter in the response. `id` must be for a complete production linked account. - IncludeDuplicates *bool `json:"-"` + IncludeDuplicates *bool `json:"-" url:"include_duplicates,omitempty"` // If provided, will only return linked accounts associated with the given integration name. - IntegrationName *string `json:"-"` + IntegrationName *string `json:"-" url:"integration_name,omitempty"` // If included, will only include test linked accounts. If not included, will only include non-test linked accounts. - IsTestAccount *string `json:"-"` + IsTestAccount *string `json:"-" url:"is_test_account,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED` - Status *string `json:"-"` + Status *string `json:"-" url:"status,omitempty"` } type LinkedAccountsListRequestCategory string @@ -78,3 +81,491 @@ func NewLinkedAccountsListRequestCategoryFromString(s string) (LinkedAccountsLis func (l LinkedAccountsListRequestCategory) Ptr() *LinkedAccountsListRequestCategory { return &l } + +// # The LinkedAccount Object +// ### Description +// The `LinkedAccount` object is used to represent an end user's link with a specific integration. +// +// ### Usage Example +// View a list of your organization's `LinkedAccount` objects. +type AccountDetailsAndActions struct { + Id string `json:"id" url:"id"` + Category *AccountDetailsAndActionsCategory `json:"category,omitempty" url:"category,omitempty"` + Status *AccountDetailsAndActionsStatus `json:"status" url:"status"` + StatusDetail *string `json:"status_detail,omitempty" url:"status_detail,omitempty"` + EndUserOriginId *string `json:"end_user_origin_id,omitempty" url:"end_user_origin_id,omitempty"` + EndUserOrganizationName string `json:"end_user_organization_name" url:"end_user_organization_name"` + EndUserEmailAddress string `json:"end_user_email_address" url:"end_user_email_address"` + // The tenant or domain the customer has provided access to. + Subdomain *string `json:"subdomain,omitempty" url:"subdomain,omitempty"` + WebhookListenerUrl string `json:"webhook_listener_url" url:"webhook_listener_url"` + // 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. + IsDuplicate *bool `json:"is_duplicate,omitempty" url:"is_duplicate,omitempty"` + Integration *AccountDetailsAndActionsIntegration `json:"integration,omitempty" url:"integration,omitempty"` + AccountType string `json:"account_type" url:"account_type"` + CompletedAt time.Time `json:"completed_at" url:"completed_at"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AccountDetailsAndActions) GetId() string { + if a == nil { + return "" + } + return a.Id +} + +func (a *AccountDetailsAndActions) GetCategory() *AccountDetailsAndActionsCategory { + if a == nil { + return nil + } + return a.Category +} + +func (a *AccountDetailsAndActions) GetStatus() *AccountDetailsAndActionsStatus { + if a == nil { + return nil + } + return a.Status +} + +func (a *AccountDetailsAndActions) GetStatusDetail() *string { + if a == nil { + return nil + } + return a.StatusDetail +} + +func (a *AccountDetailsAndActions) GetEndUserOriginId() *string { + if a == nil { + return nil + } + return a.EndUserOriginId +} + +func (a *AccountDetailsAndActions) GetEndUserOrganizationName() string { + if a == nil { + return "" + } + return a.EndUserOrganizationName +} + +func (a *AccountDetailsAndActions) GetEndUserEmailAddress() string { + if a == nil { + return "" + } + return a.EndUserEmailAddress +} + +func (a *AccountDetailsAndActions) GetSubdomain() *string { + if a == nil { + return nil + } + return a.Subdomain +} + +func (a *AccountDetailsAndActions) GetWebhookListenerUrl() string { + if a == nil { + return "" + } + return a.WebhookListenerUrl +} + +func (a *AccountDetailsAndActions) GetIsDuplicate() *bool { + if a == nil { + return nil + } + return a.IsDuplicate +} + +func (a *AccountDetailsAndActions) GetIntegration() *AccountDetailsAndActionsIntegration { + if a == nil { + return nil + } + return a.Integration +} + +func (a *AccountDetailsAndActions) GetAccountType() string { + if a == nil { + return "" + } + return a.AccountType +} + +func (a *AccountDetailsAndActions) GetCompletedAt() time.Time { + if a == nil { + return time.Time{} + } + return a.CompletedAt +} + +func (a *AccountDetailsAndActions) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AccountDetailsAndActions) UnmarshalJSON(data []byte) error { + type embed AccountDetailsAndActions + var unmarshaler = struct { + embed + CompletedAt *internal.DateTime `json:"completed_at"` + }{ + embed: embed(*a), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *a = AccountDetailsAndActions(unmarshaler.embed) + a.CompletedAt = unmarshaler.CompletedAt.Time() + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AccountDetailsAndActions) MarshalJSON() ([]byte, error) { + type embed AccountDetailsAndActions + var marshaler = struct { + embed + CompletedAt *internal.DateTime `json:"completed_at"` + }{ + embed: embed(*a), + CompletedAt: internal.NewDateTime(a.CompletedAt), + } + return json.Marshal(marshaler) +} + +func (a *AccountDetailsAndActions) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} + +type AccountDetailsAndActionsCategory struct { + CategoryEnum CategoryEnum + String string + + typ string +} + +func (a *AccountDetailsAndActionsCategory) GetCategoryEnum() CategoryEnum { + if a == nil { + return "" + } + return a.CategoryEnum +} + +func (a *AccountDetailsAndActionsCategory) GetString() string { + if a == nil { + return "" + } + return a.String +} + +func (a *AccountDetailsAndActionsCategory) UnmarshalJSON(data []byte) error { + var valueCategoryEnum CategoryEnum + if err := json.Unmarshal(data, &valueCategoryEnum); err == nil { + a.typ = "CategoryEnum" + a.CategoryEnum = valueCategoryEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + a.typ = "String" + a.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, a) +} + +func (a AccountDetailsAndActionsCategory) MarshalJSON() ([]byte, error) { + if a.typ == "CategoryEnum" || a.CategoryEnum != "" { + return json.Marshal(a.CategoryEnum) + } + if a.typ == "String" || a.String != "" { + return json.Marshal(a.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type AccountDetailsAndActionsCategoryVisitor interface { + VisitCategoryEnum(CategoryEnum) error + VisitString(string) error +} + +func (a *AccountDetailsAndActionsCategory) Accept(visitor AccountDetailsAndActionsCategoryVisitor) error { + if a.typ == "CategoryEnum" || a.CategoryEnum != "" { + return visitor.VisitCategoryEnum(a.CategoryEnum) + } + if a.typ == "String" || a.String != "" { + return visitor.VisitString(a.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type AccountDetailsAndActionsIntegration struct { + Name string `json:"name" url:"name"` + Categories []CategoriesEnum `json:"categories" url:"categories"` + Image *string `json:"image,omitempty" url:"image,omitempty"` + SquareImage *string `json:"square_image,omitempty" url:"square_image,omitempty"` + Color string `json:"color" url:"color"` + Slug string `json:"slug" url:"slug"` + PassthroughAvailable bool `json:"passthrough_available" url:"passthrough_available"` + AvailableModelOperations []*ModelOperation `json:"available_model_operations,omitempty" url:"available_model_operations,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AccountDetailsAndActionsIntegration) GetName() string { + if a == nil { + return "" + } + return a.Name +} + +func (a *AccountDetailsAndActionsIntegration) GetCategories() []CategoriesEnum { + if a == nil { + return nil + } + return a.Categories +} + +func (a *AccountDetailsAndActionsIntegration) GetImage() *string { + if a == nil { + return nil + } + return a.Image +} + +func (a *AccountDetailsAndActionsIntegration) GetSquareImage() *string { + if a == nil { + return nil + } + return a.SquareImage +} + +func (a *AccountDetailsAndActionsIntegration) GetColor() string { + if a == nil { + return "" + } + return a.Color +} + +func (a *AccountDetailsAndActionsIntegration) GetSlug() string { + if a == nil { + return "" + } + return a.Slug +} + +func (a *AccountDetailsAndActionsIntegration) GetPassthroughAvailable() bool { + if a == nil { + return false + } + return a.PassthroughAvailable +} + +func (a *AccountDetailsAndActionsIntegration) GetAvailableModelOperations() []*ModelOperation { + if a == nil { + return nil + } + return a.AvailableModelOperations +} + +func (a *AccountDetailsAndActionsIntegration) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AccountDetailsAndActionsIntegration) UnmarshalJSON(data []byte) error { + type unmarshaler AccountDetailsAndActionsIntegration + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *a = AccountDetailsAndActionsIntegration(value) + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AccountDetailsAndActionsIntegration) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} + +type AccountDetailsAndActionsStatus struct { + AccountDetailsAndActionsStatusEnum AccountDetailsAndActionsStatusEnum + String string + + typ string +} + +func (a *AccountDetailsAndActionsStatus) GetAccountDetailsAndActionsStatusEnum() AccountDetailsAndActionsStatusEnum { + if a == nil { + return "" + } + return a.AccountDetailsAndActionsStatusEnum +} + +func (a *AccountDetailsAndActionsStatus) GetString() string { + if a == nil { + return "" + } + return a.String +} + +func (a *AccountDetailsAndActionsStatus) UnmarshalJSON(data []byte) error { + var valueAccountDetailsAndActionsStatusEnum AccountDetailsAndActionsStatusEnum + if err := json.Unmarshal(data, &valueAccountDetailsAndActionsStatusEnum); err == nil { + a.typ = "AccountDetailsAndActionsStatusEnum" + a.AccountDetailsAndActionsStatusEnum = valueAccountDetailsAndActionsStatusEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + a.typ = "String" + a.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, a) +} + +func (a AccountDetailsAndActionsStatus) MarshalJSON() ([]byte, error) { + if a.typ == "AccountDetailsAndActionsStatusEnum" || a.AccountDetailsAndActionsStatusEnum != "" { + return json.Marshal(a.AccountDetailsAndActionsStatusEnum) + } + if a.typ == "String" || a.String != "" { + return json.Marshal(a.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type AccountDetailsAndActionsStatusVisitor interface { + VisitAccountDetailsAndActionsStatusEnum(AccountDetailsAndActionsStatusEnum) error + VisitString(string) error +} + +func (a *AccountDetailsAndActionsStatus) Accept(visitor AccountDetailsAndActionsStatusVisitor) error { + if a.typ == "AccountDetailsAndActionsStatusEnum" || a.AccountDetailsAndActionsStatusEnum != "" { + return visitor.VisitAccountDetailsAndActionsStatusEnum(a.AccountDetailsAndActionsStatusEnum) + } + if a.typ == "String" || a.String != "" { + return visitor.VisitString(a.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} + +// * `COMPLETE` - COMPLETE +// * `INCOMPLETE` - INCOMPLETE +// * `RELINK_NEEDED` - RELINK_NEEDED +// * `IDLE` - IDLE +type AccountDetailsAndActionsStatusEnum string + +const ( + AccountDetailsAndActionsStatusEnumComplete AccountDetailsAndActionsStatusEnum = "COMPLETE" + AccountDetailsAndActionsStatusEnumIncomplete AccountDetailsAndActionsStatusEnum = "INCOMPLETE" + AccountDetailsAndActionsStatusEnumRelinkNeeded AccountDetailsAndActionsStatusEnum = "RELINK_NEEDED" + AccountDetailsAndActionsStatusEnumIdle AccountDetailsAndActionsStatusEnum = "IDLE" +) + +func NewAccountDetailsAndActionsStatusEnumFromString(s string) (AccountDetailsAndActionsStatusEnum, error) { + switch s { + case "COMPLETE": + return AccountDetailsAndActionsStatusEnumComplete, nil + case "INCOMPLETE": + return AccountDetailsAndActionsStatusEnumIncomplete, nil + case "RELINK_NEEDED": + return AccountDetailsAndActionsStatusEnumRelinkNeeded, nil + case "IDLE": + return AccountDetailsAndActionsStatusEnumIdle, nil + } + var t AccountDetailsAndActionsStatusEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (a AccountDetailsAndActionsStatusEnum) Ptr() *AccountDetailsAndActionsStatusEnum { + return &a +} + +type PaginatedAccountDetailsAndActionsList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*AccountDetailsAndActions `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedAccountDetailsAndActionsList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedAccountDetailsAndActionsList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedAccountDetailsAndActionsList) GetResults() []*AccountDetailsAndActions { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedAccountDetailsAndActionsList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedAccountDetailsAndActionsList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedAccountDetailsAndActionsList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedAccountDetailsAndActionsList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedAccountDetailsAndActionsList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} diff --git a/hris/linkedaccounts/client.go b/hris/linkedaccounts/client.go index 771779e..2f90fa4 100644 --- a/hris/linkedaccounts/client.go +++ b/hris/linkedaccounts/client.go @@ -1,97 +1,92 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package linkedaccounts import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - hris "github.com/merge-api/merge-go-client/hris" + core "github.com/merge-api/merge-go-client/v2/core" + hris "github.com/merge-api/merge-go-client/v2/hris" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // List linked accounts for your organization. -func (c *Client) List(ctx context.Context, request *hris.LinkedAccountsListRequest) (*hris.PaginatedAccountDetailsAndActionsList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "hris/v1/linked-accounts" - - queryParams := make(url.Values) - if request.Category != nil { - queryParams.Add("category", fmt.Sprintf("%v", *request.Category)) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.EndUserEmailAddress != nil { - queryParams.Add("end_user_email_address", fmt.Sprintf("%v", *request.EndUserEmailAddress)) - } - if request.EndUserOrganizationName != nil { - queryParams.Add("end_user_organization_name", fmt.Sprintf("%v", *request.EndUserOrganizationName)) - } - if request.EndUserOriginId != nil { - queryParams.Add("end_user_origin_id", fmt.Sprintf("%v", *request.EndUserOriginId)) - } - if request.EndUserOriginIds != nil { - queryParams.Add("end_user_origin_ids", fmt.Sprintf("%v", *request.EndUserOriginIds)) - } - if request.Id != nil { - queryParams.Add("id", fmt.Sprintf("%v", *request.Id)) - } - if request.Ids != nil { - queryParams.Add("ids", fmt.Sprintf("%v", *request.Ids)) - } - if request.IncludeDuplicates != nil { - queryParams.Add("include_duplicates", fmt.Sprintf("%v", *request.IncludeDuplicates)) - } - if request.IntegrationName != nil { - queryParams.Add("integration_name", fmt.Sprintf("%v", *request.IntegrationName)) - } - if request.IsTestAccount != nil { - queryParams.Add("is_test_account", fmt.Sprintf("%v", *request.IsTestAccount)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.Status != nil { - queryParams.Add("status", fmt.Sprintf("%v", *request.Status)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *hris.PaginatedAccountDetailsAndActionsList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *hris.LinkedAccountsListRequest, + opts ...option.RequestOption, +) (*core.Page[*hris.AccountDetailsAndActions], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/hris/v1/linked-accounts" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *hris.PaginatedAccountDetailsAndActionsList) *internal.PageResponse[*string, *hris.AccountDetailsAndActions] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *hris.AccountDetailsAndActions]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } diff --git a/hris/linktoken/client.go b/hris/linktoken/client.go index e1f8d12..6a5cfca 100644 --- a/hris/linktoken/client.go +++ b/hris/linktoken/client.go @@ -1,49 +1,68 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package linktoken import ( context "context" - core "github.com/merge-api/merge-go-client/core" - hris "github.com/merge-api/merge-go-client/hris" + core "github.com/merge-api/merge-go-client/v2/core" + hris "github.com/merge-api/merge-go-client/v2/hris" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Creates a link token to be used when linking a new end user. -func (c *Client) Create(ctx context.Context, request *hris.EndUserDetailsRequest) (*hris.LinkToken, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "hris/v1/link-token" +func (c *Client) Create( + ctx context.Context, + request *hris.EndUserDetailsRequest, + opts ...option.RequestOption, +) (*hris.LinkToken, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/hris/v1/link-token" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *hris.LinkToken if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err diff --git a/hris/locations.go b/hris/locations.go index 0de9b13..7779040 100644 --- a/hris/locations.go +++ b/hris/locations.go @@ -1,51 +1,55 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package hris import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type LocationsListRequest struct { // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, will only return locations with this location_type // - // - `HOME` - HOME - // - `WORK` - WORK - LocationType *LocationsListRequestLocationType `json:"-"` + // * `HOME` - HOME + // * `WORK` - WORK + LocationType *LocationsListRequestLocationType `json:"-" url:"location_type,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // Deprecated. Use show_enum_origins. - RemoteFields *LocationsListRequestRemoteFields `json:"-"` + RemoteFields *LocationsListRequestRemoteFields `json:"-" url:"remote_fields,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` // 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) - ShowEnumOrigins *LocationsListRequestShowEnumOrigins `json:"-"` + ShowEnumOrigins *LocationsListRequestShowEnumOrigins `json:"-" url:"show_enum_origins,omitempty"` } type LocationsRetrieveRequest struct { // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // Deprecated. Use show_enum_origins. - RemoteFields *LocationsRetrieveRequestRemoteFields `json:"-"` + RemoteFields *LocationsRetrieveRequestRemoteFields `json:"-" url:"remote_fields,omitempty"` // 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) - ShowEnumOrigins *LocationsRetrieveRequestShowEnumOrigins `json:"-"` + ShowEnumOrigins *LocationsRetrieveRequestShowEnumOrigins `json:"-" url:"show_enum_origins,omitempty"` } type LocationsListRequestLocationType string @@ -169,3 +173,65 @@ func NewLocationsRetrieveRequestShowEnumOriginsFromString(s string) (LocationsRe func (l LocationsRetrieveRequestShowEnumOrigins) Ptr() *LocationsRetrieveRequestShowEnumOrigins { return &l } + +type PaginatedLocationList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Location `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedLocationList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedLocationList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedLocationList) GetResults() []*Location { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedLocationList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedLocationList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedLocationList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedLocationList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedLocationList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} diff --git a/hris/locations/client.go b/hris/locations/client.go index 0946a9f..46ac58f 100644 --- a/hris/locations/client.go +++ b/hris/locations/client.go @@ -1,132 +1,137 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package locations import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - hris "github.com/merge-api/merge-go-client/hris" + core "github.com/merge-api/merge-go-client/v2/core" + hris "github.com/merge-api/merge-go-client/v2/hris" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `Location` objects. -func (c *Client) List(ctx context.Context, request *hris.LocationsListRequest) (*hris.PaginatedLocationList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "hris/v1/locations" - - queryParams := make(url.Values) - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.LocationType != nil { - queryParams.Add("location_type", fmt.Sprintf("%v", *request.LocationType)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteFields != nil { - queryParams.Add("remote_fields", fmt.Sprintf("%v", *request.RemoteFields)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if request.ShowEnumOrigins != nil { - queryParams.Add("show_enum_origins", fmt.Sprintf("%v", *request.ShowEnumOrigins)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *hris.PaginatedLocationList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *hris.LocationsListRequest, + opts ...option.RequestOption, +) (*core.Page[*hris.Location], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/hris/v1/locations" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *hris.PaginatedLocationList) *internal.PageResponse[*string, *hris.Location] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *hris.Location]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Returns a `Location` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *hris.LocationsRetrieveRequest) (*hris.Location, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"hris/v1/locations/%v", id) - - queryParams := make(url.Values) - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.RemoteFields != nil { - queryParams.Add("remote_fields", fmt.Sprintf("%v", *request.RemoteFields)) - } - if request.ShowEnumOrigins != nil { - queryParams.Add("show_enum_origins", fmt.Sprintf("%v", *request.ShowEnumOrigins)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *hris.LocationsRetrieveRequest, + opts ...option.RequestOption, +) (*hris.Location, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/hris/v1/locations/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *hris.Location if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/hris/passthrough/client.go b/hris/passthrough/client.go index 713d624..4a6f3a6 100644 --- a/hris/passthrough/client.go +++ b/hris/passthrough/client.go @@ -1,49 +1,68 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package passthrough import ( context "context" - core "github.com/merge-api/merge-go-client/core" - hris "github.com/merge-api/merge-go-client/hris" + core "github.com/merge-api/merge-go-client/v2/core" + hris "github.com/merge-api/merge-go-client/v2/hris" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Pull data from an endpoint not currently supported by Merge. -func (c *Client) Create(ctx context.Context, request *hris.DataPassthroughRequest) (*hris.RemoteResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "hris/v1/passthrough" +func (c *Client) Create( + ctx context.Context, + request *hris.DataPassthroughRequest, + opts ...option.RequestOption, +) (*hris.RemoteResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/hris/v1/passthrough" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *hris.RemoteResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err diff --git a/hris/pay_groups.go b/hris/pay_groups.go index c226271..773ee7f 100644 --- a/hris/pay_groups.go +++ b/hris/pay_groups.go @@ -1,35 +1,102 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package hris import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type PayGroupsListRequest struct { // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` } type PayGroupsRetrieveRequest struct { // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` +} + +type PaginatedPayGroupList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*PayGroup `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedPayGroupList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedPayGroupList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedPayGroupList) GetResults() []*PayGroup { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedPayGroupList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedPayGroupList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedPayGroupList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedPayGroupList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedPayGroupList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) } diff --git a/hris/paygroups/client.go b/hris/paygroups/client.go index 9a4b884..d90b683 100644 --- a/hris/paygroups/client.go +++ b/hris/paygroups/client.go @@ -1,117 +1,137 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package paygroups import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - hris "github.com/merge-api/merge-go-client/hris" + core "github.com/merge-api/merge-go-client/v2/core" + hris "github.com/merge-api/merge-go-client/v2/hris" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `PayGroup` objects. -func (c *Client) List(ctx context.Context, request *hris.PayGroupsListRequest) (*hris.PaginatedPayGroupList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "hris/v1/pay-groups" - - queryParams := make(url.Values) - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *hris.PaginatedPayGroupList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *hris.PayGroupsListRequest, + opts ...option.RequestOption, +) (*core.Page[*hris.PayGroup], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/hris/v1/pay-groups" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *hris.PaginatedPayGroupList) *internal.PageResponse[*string, *hris.PayGroup] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *hris.PayGroup]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Returns a `PayGroup` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *hris.PayGroupsRetrieveRequest) (*hris.PayGroup, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"hris/v1/pay-groups/%v", id) - - queryParams := make(url.Values) - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *hris.PayGroupsRetrieveRequest, + opts ...option.RequestOption, +) (*hris.PayGroup, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/hris/v1/pay-groups/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *hris.PayGroup if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/hris/payroll_runs.go b/hris/payroll_runs.go index 195cea7..bd89e57 100644 --- a/hris/payroll_runs.go +++ b/hris/payroll_runs.go @@ -1,62 +1,66 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package hris import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type PayrollRunsListRequest struct { // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // If provided, will only return payroll runs ended after this datetime. - EndedAfter *time.Time `json:"-"` + EndedAfter *time.Time `json:"-" url:"ended_after,omitempty"` // If provided, will only return payroll runs ended before this datetime. - EndedBefore *time.Time `json:"-"` + EndedBefore *time.Time `json:"-" url:"ended_before,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // Deprecated. Use show_enum_origins. - RemoteFields *PayrollRunsListRequestRemoteFields `json:"-"` + RemoteFields *PayrollRunsListRequestRemoteFields `json:"-" url:"remote_fields,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` // If provided, will only return PayrollRun's with this status. Options: ('REGULAR', 'OFF_CYCLE', 'CORRECTION', 'TERMINATION', 'SIGN_ON_BONUS') // - // - `REGULAR` - REGULAR - // - `OFF_CYCLE` - OFF_CYCLE - // - `CORRECTION` - CORRECTION - // - `TERMINATION` - TERMINATION - // - `SIGN_ON_BONUS` - SIGN_ON_BONUS - RunType *PayrollRunsListRequestRunType `json:"-"` + // * `REGULAR` - REGULAR + // * `OFF_CYCLE` - OFF_CYCLE + // * `CORRECTION` - CORRECTION + // * `TERMINATION` - TERMINATION + // * `SIGN_ON_BONUS` - SIGN_ON_BONUS + RunType *PayrollRunsListRequestRunType `json:"-" url:"run_type,omitempty"` // 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) - ShowEnumOrigins *PayrollRunsListRequestShowEnumOrigins `json:"-"` + ShowEnumOrigins *PayrollRunsListRequestShowEnumOrigins `json:"-" url:"show_enum_origins,omitempty"` // If provided, will only return payroll runs started after this datetime. - StartedAfter *time.Time `json:"-"` + StartedAfter *time.Time `json:"-" url:"started_after,omitempty"` // If provided, will only return payroll runs started before this datetime. - StartedBefore *time.Time `json:"-"` + StartedBefore *time.Time `json:"-" url:"started_before,omitempty"` } type PayrollRunsRetrieveRequest struct { // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // Deprecated. Use show_enum_origins. - RemoteFields *PayrollRunsRetrieveRequestRemoteFields `json:"-"` + RemoteFields *PayrollRunsRetrieveRequestRemoteFields `json:"-" url:"remote_fields,omitempty"` // 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) - ShowEnumOrigins *PayrollRunsRetrieveRequestShowEnumOrigins `json:"-"` + ShowEnumOrigins *PayrollRunsRetrieveRequestShowEnumOrigins `json:"-" url:"show_enum_origins,omitempty"` } type PayrollRunsListRequestRemoteFields string @@ -189,3 +193,65 @@ func NewPayrollRunsRetrieveRequestShowEnumOriginsFromString(s string) (PayrollRu func (p PayrollRunsRetrieveRequestShowEnumOrigins) Ptr() *PayrollRunsRetrieveRequestShowEnumOrigins { return &p } + +type PaginatedPayrollRunList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*PayrollRun `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedPayrollRunList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedPayrollRunList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedPayrollRunList) GetResults() []*PayrollRun { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedPayrollRunList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedPayrollRunList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedPayrollRunList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedPayrollRunList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedPayrollRunList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} diff --git a/hris/payrollruns/client.go b/hris/payrollruns/client.go index 4b0b68a..b36289d 100644 --- a/hris/payrollruns/client.go +++ b/hris/payrollruns/client.go @@ -1,144 +1,137 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package payrollruns import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - hris "github.com/merge-api/merge-go-client/hris" + core "github.com/merge-api/merge-go-client/v2/core" + hris "github.com/merge-api/merge-go-client/v2/hris" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `PayrollRun` objects. -func (c *Client) List(ctx context.Context, request *hris.PayrollRunsListRequest) (*hris.PaginatedPayrollRunList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "hris/v1/payroll-runs" - - queryParams := make(url.Values) - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.EndedAfter != nil { - queryParams.Add("ended_after", fmt.Sprintf("%v", request.EndedAfter.Format(time.RFC3339))) - } - if request.EndedBefore != nil { - queryParams.Add("ended_before", fmt.Sprintf("%v", request.EndedBefore.Format(time.RFC3339))) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteFields != nil { - queryParams.Add("remote_fields", fmt.Sprintf("%v", *request.RemoteFields)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if request.RunType != nil { - queryParams.Add("run_type", fmt.Sprintf("%v", *request.RunType)) - } - if request.ShowEnumOrigins != nil { - queryParams.Add("show_enum_origins", fmt.Sprintf("%v", *request.ShowEnumOrigins)) - } - if request.StartedAfter != nil { - queryParams.Add("started_after", fmt.Sprintf("%v", request.StartedAfter.Format(time.RFC3339))) - } - if request.StartedBefore != nil { - queryParams.Add("started_before", fmt.Sprintf("%v", request.StartedBefore.Format(time.RFC3339))) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *hris.PaginatedPayrollRunList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *hris.PayrollRunsListRequest, + opts ...option.RequestOption, +) (*core.Page[*hris.PayrollRun], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/hris/v1/payroll-runs" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *hris.PaginatedPayrollRunList) *internal.PageResponse[*string, *hris.PayrollRun] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *hris.PayrollRun]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Returns a `PayrollRun` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *hris.PayrollRunsRetrieveRequest) (*hris.PayrollRun, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"hris/v1/payroll-runs/%v", id) - - queryParams := make(url.Values) - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.RemoteFields != nil { - queryParams.Add("remote_fields", fmt.Sprintf("%v", *request.RemoteFields)) - } - if request.ShowEnumOrigins != nil { - queryParams.Add("show_enum_origins", fmt.Sprintf("%v", *request.ShowEnumOrigins)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *hris.PayrollRunsRetrieveRequest, + opts ...option.RequestOption, +) (*hris.PayrollRun, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/hris/v1/payroll-runs/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *hris.PayrollRun if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/hris/regenerate_key.go b/hris/regenerate_key.go index a7b86ea..d966584 100644 --- a/hris/regenerate_key.go +++ b/hris/regenerate_key.go @@ -1,8 +1,8 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package hris type RemoteKeyForRegenerationRequest struct { // The name of the remote key - Name string `json:"name"` + Name string `json:"name" url:"-"` } diff --git a/hris/regeneratekey/client.go b/hris/regeneratekey/client.go index 333391c..3d3e8f2 100644 --- a/hris/regeneratekey/client.go +++ b/hris/regeneratekey/client.go @@ -1,49 +1,68 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package regeneratekey import ( context "context" - core "github.com/merge-api/merge-go-client/core" - hris "github.com/merge-api/merge-go-client/hris" + core "github.com/merge-api/merge-go-client/v2/core" + hris "github.com/merge-api/merge-go-client/v2/hris" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Exchange remote keys. -func (c *Client) Create(ctx context.Context, request *hris.RemoteKeyForRegenerationRequest) (*hris.RemoteKey, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "hris/v1/regenerate-key" +func (c *Client) Create( + ctx context.Context, + request *hris.RemoteKeyForRegenerationRequest, + opts ...option.RequestOption, +) (*hris.RemoteKey, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/hris/v1/regenerate-key" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *hris.RemoteKey if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err diff --git a/hris/scopes.go b/hris/scopes.go index 4d95d77..c5918e3 100644 --- a/hris/scopes.go +++ b/hris/scopes.go @@ -1,8 +1,223 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package hris +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" +) + type LinkedAccountCommonModelScopeDeserializerRequest struct { // The common models you want to update the scopes for - CommonModels []*IndividualCommonModelScopeDeserializerRequest `json:"common_models,omitempty"` + CommonModels []*IndividualCommonModelScopeDeserializerRequest `json:"common_models,omitempty" url:"-"` +} + +type CommonModelScopeApi struct { + // The common models you want to update the scopes for + CommonModels []*IndividualCommonModelScopeDeserializer `json:"common_models" url:"common_models"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (c *CommonModelScopeApi) GetCommonModels() []*IndividualCommonModelScopeDeserializer { + if c == nil { + return nil + } + return c.CommonModels +} + +func (c *CommonModelScopeApi) GetExtraProperties() map[string]interface{} { + return c.extraProperties +} + +func (c *CommonModelScopeApi) UnmarshalJSON(data []byte) error { + type unmarshaler CommonModelScopeApi + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *c = CommonModelScopeApi(value) + extraProperties, err := internal.ExtractExtraProperties(data, *c) + if err != nil { + return err + } + c.extraProperties = extraProperties + c.rawJSON = json.RawMessage(data) + return nil +} + +func (c *CommonModelScopeApi) String() string { + if len(c.rawJSON) > 0 { + if value, err := internal.StringifyJSON(c.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(c); err == nil { + return value + } + return fmt.Sprintf("%#v", c) +} + +type FieldPermissionDeserializer struct { + EnabledFields []interface{} `json:"enabled_fields,omitempty" url:"enabled_fields,omitempty"` + DisabledFields []interface{} `json:"disabled_fields,omitempty" url:"disabled_fields,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (f *FieldPermissionDeserializer) GetEnabledFields() []interface{} { + if f == nil { + return nil + } + return f.EnabledFields +} + +func (f *FieldPermissionDeserializer) GetDisabledFields() []interface{} { + if f == nil { + return nil + } + return f.DisabledFields +} + +func (f *FieldPermissionDeserializer) GetExtraProperties() map[string]interface{} { + return f.extraProperties +} + +func (f *FieldPermissionDeserializer) UnmarshalJSON(data []byte) error { + type unmarshaler FieldPermissionDeserializer + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *f = FieldPermissionDeserializer(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { + return err + } + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) + return nil +} + +func (f *FieldPermissionDeserializer) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(f); err == nil { + return value + } + return fmt.Sprintf("%#v", f) +} + +type IndividualCommonModelScopeDeserializer struct { + ModelName string `json:"model_name" url:"model_name"` + ModelPermissions map[string]*ModelPermissionDeserializer `json:"model_permissions,omitempty" url:"model_permissions,omitempty"` + FieldPermissions *FieldPermissionDeserializer `json:"field_permissions,omitempty" url:"field_permissions,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (i *IndividualCommonModelScopeDeserializer) GetModelName() string { + if i == nil { + return "" + } + return i.ModelName +} + +func (i *IndividualCommonModelScopeDeserializer) GetModelPermissions() map[string]*ModelPermissionDeserializer { + if i == nil { + return nil + } + return i.ModelPermissions +} + +func (i *IndividualCommonModelScopeDeserializer) GetFieldPermissions() *FieldPermissionDeserializer { + if i == nil { + return nil + } + return i.FieldPermissions +} + +func (i *IndividualCommonModelScopeDeserializer) GetExtraProperties() map[string]interface{} { + return i.extraProperties +} + +func (i *IndividualCommonModelScopeDeserializer) UnmarshalJSON(data []byte) error { + type unmarshaler IndividualCommonModelScopeDeserializer + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *i = IndividualCommonModelScopeDeserializer(value) + extraProperties, err := internal.ExtractExtraProperties(data, *i) + if err != nil { + return err + } + i.extraProperties = extraProperties + i.rawJSON = json.RawMessage(data) + return nil +} + +func (i *IndividualCommonModelScopeDeserializer) String() string { + if len(i.rawJSON) > 0 { + if value, err := internal.StringifyJSON(i.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(i); err == nil { + return value + } + return fmt.Sprintf("%#v", i) +} + +type ModelPermissionDeserializer struct { + IsEnabled *bool `json:"is_enabled,omitempty" url:"is_enabled,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (m *ModelPermissionDeserializer) GetIsEnabled() *bool { + if m == nil { + return nil + } + return m.IsEnabled +} + +func (m *ModelPermissionDeserializer) GetExtraProperties() map[string]interface{} { + return m.extraProperties +} + +func (m *ModelPermissionDeserializer) UnmarshalJSON(data []byte) error { + type unmarshaler ModelPermissionDeserializer + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *m = ModelPermissionDeserializer(value) + extraProperties, err := internal.ExtractExtraProperties(data, *m) + if err != nil { + return err + } + m.extraProperties = extraProperties + m.rawJSON = json.RawMessage(data) + return nil +} + +func (m *ModelPermissionDeserializer) String() string { + if len(m.rawJSON) > 0 { + if value, err := internal.StringifyJSON(m.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(m); err == nil { + return value + } + return fmt.Sprintf("%#v", m) } diff --git a/hris/scopes/client.go b/hris/scopes/client.go index 7a1f18b..5d2c3ee 100644 --- a/hris/scopes/client.go +++ b/hris/scopes/client.go @@ -1,48 +1,65 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package scopes import ( context "context" - core "github.com/merge-api/merge-go-client/core" - hris "github.com/merge-api/merge-go-client/hris" + core "github.com/merge-api/merge-go-client/v2/core" + hris "github.com/merge-api/merge-go-client/v2/hris" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // 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/5950052-common-model-and-field-scopes). -func (c *Client) DefaultScopesRetrieve(ctx context.Context) (*hris.CommonModelScopeApi, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "hris/v1/default-scopes" +func (c *Client) DefaultScopesRetrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*hris.CommonModelScopeApi, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/hris/v1/default-scopes" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *hris.CommonModelScopeApi if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -51,21 +68,34 @@ func (c *Client) DefaultScopesRetrieve(ctx context.Context) (*hris.CommonModelSc } // Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). -func (c *Client) LinkedAccountScopesRetrieve(ctx context.Context) (*hris.CommonModelScopeApi, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "hris/v1/linked-account-scopes" +func (c *Client) LinkedAccountScopesRetrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*hris.CommonModelScopeApi, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/hris/v1/linked-account-scopes" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *hris.CommonModelScopeApi if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -74,22 +104,37 @@ func (c *Client) LinkedAccountScopesRetrieve(ctx context.Context) (*hris.CommonM } // 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/5950052-common-model-and-field-scopes) -func (c *Client) LinkedAccountScopesCreate(ctx context.Context, request *hris.LinkedAccountCommonModelScopeDeserializerRequest) (*hris.CommonModelScopeApi, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "hris/v1/linked-account-scopes" +func (c *Client) LinkedAccountScopesCreate( + ctx context.Context, + request *hris.LinkedAccountCommonModelScopeDeserializerRequest, + opts ...option.RequestOption, +) (*hris.CommonModelScopeApi, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/hris/v1/linked-account-scopes" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *hris.CommonModelScopeApi if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err diff --git a/hris/sync_status.go b/hris/sync_status.go index 314b38b..5686784 100644 --- a/hris/sync_status.go +++ b/hris/sync_status.go @@ -1,10 +1,78 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package hris +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" +) + type SyncStatusListRequest struct { // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` +} + +type PaginatedSyncStatusList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*SyncStatus `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedSyncStatusList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedSyncStatusList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedSyncStatusList) GetResults() []*SyncStatus { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedSyncStatusList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedSyncStatusList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedSyncStatusList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedSyncStatusList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedSyncStatusList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) } diff --git a/hris/syncstatus/client.go b/hris/syncstatus/client.go index a909da2..81998ef 100644 --- a/hris/syncstatus/client.go +++ b/hris/syncstatus/client.go @@ -1,64 +1,92 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package syncstatus import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - hris "github.com/merge-api/merge-go-client/hris" + core "github.com/merge-api/merge-go-client/v2/core" + hris "github.com/merge-api/merge-go-client/v2/hris" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } -// Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). -func (c *Client) List(ctx context.Context, request *hris.SyncStatusListRequest) (*hris.PaginatedSyncStatusList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL +// Get sync status for the current sync and the most recently finished sync. `last_sync_start` represents the most recent time any sync began. `last_sync_finished` represents the most recent time any sync completed. These timestamps may correspond to different sync instances which may result in a sync start time being later than a separate sync completed time. To ensure you are retrieving the latest available data reference the `last_sync_finished` timestamp where `last_sync_result` is `DONE`. Possible values for `status` and `last_sync_result` are `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). +func (c *Client) List( + ctx context.Context, + request *hris.SyncStatusListRequest, + opts ...option.RequestOption, +) (*core.Page[*hris.SyncStatus], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/hris/v1/sync-status" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } - endpointURL := baseURL + "/" + "hris/v1/sync-status" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) - queryParams := make(url.Values) - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *hris.PaginatedSyncStatusList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { - return nil, err + readPageResponse := func(response *hris.PaginatedSyncStatusList) *internal.PageResponse[*string, *hris.SyncStatus] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *hris.SyncStatus]{ + Next: next, + Results: results, + Done: next == zeroValue, + } } - return response, nil + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } diff --git a/hris/teams.go b/hris/teams.go index 2d6bcc8..2b944f9 100644 --- a/hris/teams.go +++ b/hris/teams.go @@ -1,41 +1,108 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package hris import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type TeamsListRequest struct { // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *string `json:"-"` + Expand []*string `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // If provided, will only return teams with this parent team. - ParentTeamId *string `json:"-"` + ParentTeamId *string `json:"-" url:"parent_team_id,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` } type TeamsRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *string `json:"-"` + Expand []*string `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` +} + +type PaginatedTeamList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Team `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedTeamList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedTeamList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedTeamList) GetResults() []*Team { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedTeamList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedTeamList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedTeamList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedTeamList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedTeamList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) } diff --git a/hris/teams/client.go b/hris/teams/client.go index 19d28df..e55efd7 100644 --- a/hris/teams/client.go +++ b/hris/teams/client.go @@ -1,126 +1,137 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package teams import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - hris "github.com/merge-api/merge-go-client/hris" + core "github.com/merge-api/merge-go-client/v2/core" + hris "github.com/merge-api/merge-go-client/v2/hris" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `Team` objects. -func (c *Client) List(ctx context.Context, request *hris.TeamsListRequest) (*hris.PaginatedTeamList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "hris/v1/teams" - - queryParams := make(url.Values) - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.ParentTeamId != nil { - queryParams.Add("parent_team_id", fmt.Sprintf("%v", *request.ParentTeamId)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *hris.PaginatedTeamList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *hris.TeamsListRequest, + opts ...option.RequestOption, +) (*core.Page[*hris.Team], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/hris/v1/teams" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *hris.PaginatedTeamList) *internal.PageResponse[*string, *hris.Team] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *hris.Team]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Returns a `Team` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *hris.TeamsRetrieveRequest) (*hris.Team, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"hris/v1/teams/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *hris.TeamsRetrieveRequest, + opts ...option.RequestOption, +) (*hris.Team, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/hris/v1/teams/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *hris.Team if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/hris/time_off.go b/hris/time_off.go index aeeef06..5bc7e39 100644 --- a/hris/time_off.go +++ b/hris/time_off.go @@ -1,111 +1,112 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package hris import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type TimeOffEndpointRequest struct { // Whether to include debug fields (such as log file links) in the response. - IsDebugMode *bool `json:"-"` + IsDebugMode *bool `json:"-" url:"is_debug_mode,omitempty"` // Whether or not third-party updates should be run asynchronously. - RunAsync *bool `json:"-"` - Model *TimeOffRequest `json:"model,omitempty"` + RunAsync *bool `json:"-" url:"run_async,omitempty"` + Model *TimeOffRequest `json:"model,omitempty" url:"-"` } type TimeOffListRequest struct { // If provided, will only return time off for this approver. - ApproverId *string `json:"-"` + ApproverId *string `json:"-" url:"approver_id,omitempty"` // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // If provided, will only return time off for this employee. - EmployeeId *string `json:"-"` + EmployeeId *string `json:"-" url:"employee_id,omitempty"` // If provided, will only return employees that ended after this datetime. - EndedAfter *time.Time `json:"-"` + EndedAfter *time.Time `json:"-" url:"ended_after,omitempty"` // If provided, will only return time-offs that ended before this datetime. - EndedBefore *time.Time `json:"-"` + EndedBefore *time.Time `json:"-" url:"ended_before,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *TimeOffListRequestExpand `json:"-"` + Expand []*TimeOffListRequestExpandItem `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // Deprecated. Use show_enum_origins. - RemoteFields *TimeOffListRequestRemoteFields `json:"-"` + RemoteFields *TimeOffListRequestRemoteFields `json:"-" url:"remote_fields,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` // If provided, will only return TimeOff with this request type. Options: ('VACATION', 'SICK', 'PERSONAL', 'JURY_DUTY', 'VOLUNTEER', 'BEREAVEMENT') // - // - `VACATION` - VACATION - // - `SICK` - SICK - // - `PERSONAL` - PERSONAL - // - `JURY_DUTY` - JURY_DUTY - // - `VOLUNTEER` - VOLUNTEER - // - `BEREAVEMENT` - BEREAVEMENT - RequestType *TimeOffListRequestRequestType `json:"-"` + // * `VACATION` - VACATION + // * `SICK` - SICK + // * `PERSONAL` - PERSONAL + // * `JURY_DUTY` - JURY_DUTY + // * `VOLUNTEER` - VOLUNTEER + // * `BEREAVEMENT` - BEREAVEMENT + RequestType *TimeOffListRequestRequestType `json:"-" url:"request_type,omitempty"` // 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) - ShowEnumOrigins *TimeOffListRequestShowEnumOrigins `json:"-"` + ShowEnumOrigins *TimeOffListRequestShowEnumOrigins `json:"-" url:"show_enum_origins,omitempty"` // If provided, will only return time-offs that started after this datetime. - StartedAfter *time.Time `json:"-"` + StartedAfter *time.Time `json:"-" url:"started_after,omitempty"` // If provided, will only return time-offs that started before this datetime. - StartedBefore *time.Time `json:"-"` + StartedBefore *time.Time `json:"-" url:"started_before,omitempty"` // If provided, will only return TimeOff with this status. Options: ('REQUESTED', 'APPROVED', 'DECLINED', 'CANCELLED', 'DELETED') // - // - `REQUESTED` - REQUESTED - // - `APPROVED` - APPROVED - // - `DECLINED` - DECLINED - // - `CANCELLED` - CANCELLED - // - `DELETED` - DELETED - Status *TimeOffListRequestStatus `json:"-"` + // * `REQUESTED` - REQUESTED + // * `APPROVED` - APPROVED + // * `DECLINED` - DECLINED + // * `CANCELLED` - CANCELLED + // * `DELETED` - DELETED + Status *TimeOffListRequestStatus `json:"-" url:"status,omitempty"` } type TimeOffRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *TimeOffRetrieveRequestExpand `json:"-"` + Expand []*TimeOffRetrieveRequestExpandItem `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // Deprecated. Use show_enum_origins. - RemoteFields *TimeOffRetrieveRequestRemoteFields `json:"-"` + RemoteFields *TimeOffRetrieveRequestRemoteFields `json:"-" url:"remote_fields,omitempty"` // 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) - ShowEnumOrigins *TimeOffRetrieveRequestShowEnumOrigins `json:"-"` + ShowEnumOrigins *TimeOffRetrieveRequestShowEnumOrigins `json:"-" url:"show_enum_origins,omitempty"` } -type TimeOffListRequestExpand string +type TimeOffListRequestExpandItem string const ( - TimeOffListRequestExpandApprover TimeOffListRequestExpand = "approver" - TimeOffListRequestExpandEmployee TimeOffListRequestExpand = "employee" - TimeOffListRequestExpandEmployeeApprover TimeOffListRequestExpand = "employee,approver" + TimeOffListRequestExpandItemApprover TimeOffListRequestExpandItem = "approver" + TimeOffListRequestExpandItemEmployee TimeOffListRequestExpandItem = "employee" ) -func NewTimeOffListRequestExpandFromString(s string) (TimeOffListRequestExpand, error) { +func NewTimeOffListRequestExpandItemFromString(s string) (TimeOffListRequestExpandItem, error) { switch s { case "approver": - return TimeOffListRequestExpandApprover, nil + return TimeOffListRequestExpandItemApprover, nil case "employee": - return TimeOffListRequestExpandEmployee, nil - case "employee,approver": - return TimeOffListRequestExpandEmployeeApprover, nil + return TimeOffListRequestExpandItemEmployee, nil } - var t TimeOffListRequestExpand + var t TimeOffListRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (t TimeOffListRequestExpand) Ptr() *TimeOffListRequestExpand { +func (t TimeOffListRequestExpandItem) Ptr() *TimeOffListRequestExpandItem { return &t } @@ -248,28 +249,25 @@ func (t TimeOffListRequestStatus) Ptr() *TimeOffListRequestStatus { return &t } -type TimeOffRetrieveRequestExpand string +type TimeOffRetrieveRequestExpandItem string const ( - TimeOffRetrieveRequestExpandApprover TimeOffRetrieveRequestExpand = "approver" - TimeOffRetrieveRequestExpandEmployee TimeOffRetrieveRequestExpand = "employee" - TimeOffRetrieveRequestExpandEmployeeApprover TimeOffRetrieveRequestExpand = "employee,approver" + TimeOffRetrieveRequestExpandItemApprover TimeOffRetrieveRequestExpandItem = "approver" + TimeOffRetrieveRequestExpandItemEmployee TimeOffRetrieveRequestExpandItem = "employee" ) -func NewTimeOffRetrieveRequestExpandFromString(s string) (TimeOffRetrieveRequestExpand, error) { +func NewTimeOffRetrieveRequestExpandItemFromString(s string) (TimeOffRetrieveRequestExpandItem, error) { switch s { case "approver": - return TimeOffRetrieveRequestExpandApprover, nil + return TimeOffRetrieveRequestExpandItemApprover, nil case "employee": - return TimeOffRetrieveRequestExpandEmployee, nil - case "employee,approver": - return TimeOffRetrieveRequestExpandEmployeeApprover, nil + return TimeOffRetrieveRequestExpandItemEmployee, nil } - var t TimeOffRetrieveRequestExpand + var t TimeOffRetrieveRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (t TimeOffRetrieveRequestExpand) Ptr() *TimeOffRetrieveRequestExpand { +func (t TimeOffRetrieveRequestExpandItem) Ptr() *TimeOffRetrieveRequestExpandItem { return &t } @@ -346,3 +344,1307 @@ func NewTimeOffRetrieveRequestShowEnumOriginsFromString(s string) (TimeOffRetrie func (t TimeOffRetrieveRequestShowEnumOrigins) Ptr() *TimeOffRetrieveRequestShowEnumOrigins { return &t } + +type PaginatedTimeOffList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*TimeOff `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedTimeOffList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedTimeOffList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedTimeOffList) GetResults() []*TimeOff { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedTimeOffList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedTimeOffList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedTimeOffList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedTimeOffList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedTimeOffList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +// * `VACATION` - VACATION +// * `SICK` - SICK +// * `PERSONAL` - PERSONAL +// * `JURY_DUTY` - JURY_DUTY +// * `VOLUNTEER` - VOLUNTEER +// * `BEREAVEMENT` - BEREAVEMENT +type RequestTypeEnum string + +const ( + RequestTypeEnumVacation RequestTypeEnum = "VACATION" + RequestTypeEnumSick RequestTypeEnum = "SICK" + RequestTypeEnumPersonal RequestTypeEnum = "PERSONAL" + RequestTypeEnumJuryDuty RequestTypeEnum = "JURY_DUTY" + RequestTypeEnumVolunteer RequestTypeEnum = "VOLUNTEER" + RequestTypeEnumBereavement RequestTypeEnum = "BEREAVEMENT" +) + +func NewRequestTypeEnumFromString(s string) (RequestTypeEnum, error) { + switch s { + case "VACATION": + return RequestTypeEnumVacation, nil + case "SICK": + return RequestTypeEnumSick, nil + case "PERSONAL": + return RequestTypeEnumPersonal, nil + case "JURY_DUTY": + return RequestTypeEnumJuryDuty, nil + case "VOLUNTEER": + return RequestTypeEnumVolunteer, nil + case "BEREAVEMENT": + return RequestTypeEnumBereavement, nil + } + var t RequestTypeEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (r RequestTypeEnum) Ptr() *RequestTypeEnum { + return &r +} + +// # The TimeOff Object +// ### Description +// The `TimeOff` object is used to represent all employees' Time Off entries. +// +// ### Usage Example +// Fetch from the `LIST TimeOffs` endpoint and filter by `ID` to show all time off requests. +type TimeOff struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The employee requesting time off. + Employee *TimeOffEmployee `json:"employee,omitempty" url:"employee,omitempty"` + // The Merge ID of the employee with the ability to approve the time off request. + Approver *TimeOffApprover `json:"approver,omitempty" url:"approver,omitempty"` + // The status of this time off request. + // + // * `REQUESTED` - REQUESTED + // * `APPROVED` - APPROVED + // * `DECLINED` - DECLINED + // * `CANCELLED` - CANCELLED + // * `DELETED` - DELETED + Status *TimeOffStatus `json:"status,omitempty" url:"status,omitempty"` + // The employee note for this time off request. + EmployeeNote *string `json:"employee_note,omitempty" url:"employee_note,omitempty"` + // The measurement that the third-party integration uses to count time requested. + // + // * `HOURS` - HOURS + // * `DAYS` - DAYS + Units *TimeOffUnits `json:"units,omitempty" url:"units,omitempty"` + // The time off quantity measured by the prescribed “units”. + Amount *float64 `json:"amount,omitempty" url:"amount,omitempty"` + // The type of time off request. + // + // * `VACATION` - VACATION + // * `SICK` - SICK + // * `PERSONAL` - PERSONAL + // * `JURY_DUTY` - JURY_DUTY + // * `VOLUNTEER` - VOLUNTEER + // * `BEREAVEMENT` - BEREAVEMENT + RequestType *TimeOffRequestType `json:"request_type,omitempty" url:"request_type,omitempty"` + // The day and time of the start of the time requested off. + StartTime *time.Time `json:"start_time,omitempty" url:"start_time,omitempty"` + // The day and time of the end of the time requested off. + EndTime *time.Time `json:"end_time,omitempty" url:"end_time,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (t *TimeOff) GetId() *string { + if t == nil { + return nil + } + return t.Id +} + +func (t *TimeOff) GetRemoteId() *string { + if t == nil { + return nil + } + return t.RemoteId +} + +func (t *TimeOff) GetCreatedAt() *time.Time { + if t == nil { + return nil + } + return t.CreatedAt +} + +func (t *TimeOff) GetModifiedAt() *time.Time { + if t == nil { + return nil + } + return t.ModifiedAt +} + +func (t *TimeOff) GetEmployee() *TimeOffEmployee { + if t == nil { + return nil + } + return t.Employee +} + +func (t *TimeOff) GetApprover() *TimeOffApprover { + if t == nil { + return nil + } + return t.Approver +} + +func (t *TimeOff) GetStatus() *TimeOffStatus { + if t == nil { + return nil + } + return t.Status +} + +func (t *TimeOff) GetEmployeeNote() *string { + if t == nil { + return nil + } + return t.EmployeeNote +} + +func (t *TimeOff) GetUnits() *TimeOffUnits { + if t == nil { + return nil + } + return t.Units +} + +func (t *TimeOff) GetAmount() *float64 { + if t == nil { + return nil + } + return t.Amount +} + +func (t *TimeOff) GetRequestType() *TimeOffRequestType { + if t == nil { + return nil + } + return t.RequestType +} + +func (t *TimeOff) GetStartTime() *time.Time { + if t == nil { + return nil + } + return t.StartTime +} + +func (t *TimeOff) GetEndTime() *time.Time { + if t == nil { + return nil + } + return t.EndTime +} + +func (t *TimeOff) GetRemoteWasDeleted() *bool { + if t == nil { + return nil + } + return t.RemoteWasDeleted +} + +func (t *TimeOff) GetFieldMappings() map[string]interface{} { + if t == nil { + return nil + } + return t.FieldMappings +} + +func (t *TimeOff) GetRemoteData() []*RemoteData { + if t == nil { + return nil + } + return t.RemoteData +} + +func (t *TimeOff) GetExtraProperties() map[string]interface{} { + return t.extraProperties +} + +func (t *TimeOff) UnmarshalJSON(data []byte) error { + type embed TimeOff + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + StartTime *internal.DateTime `json:"start_time,omitempty"` + EndTime *internal.DateTime `json:"end_time,omitempty"` + }{ + embed: embed(*t), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *t = TimeOff(unmarshaler.embed) + t.CreatedAt = unmarshaler.CreatedAt.TimePtr() + t.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + t.StartTime = unmarshaler.StartTime.TimePtr() + t.EndTime = unmarshaler.EndTime.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *t) + if err != nil { + return err + } + t.extraProperties = extraProperties + t.rawJSON = json.RawMessage(data) + return nil +} + +func (t *TimeOff) MarshalJSON() ([]byte, error) { + type embed TimeOff + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + StartTime *internal.DateTime `json:"start_time,omitempty"` + EndTime *internal.DateTime `json:"end_time,omitempty"` + }{ + embed: embed(*t), + CreatedAt: internal.NewOptionalDateTime(t.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(t.ModifiedAt), + StartTime: internal.NewOptionalDateTime(t.StartTime), + EndTime: internal.NewOptionalDateTime(t.EndTime), + } + return json.Marshal(marshaler) +} + +func (t *TimeOff) String() string { + if len(t.rawJSON) > 0 { + if value, err := internal.StringifyJSON(t.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(t); err == nil { + return value + } + return fmt.Sprintf("%#v", t) +} + +// The Merge ID of the employee with the ability to approve the time off request. +type TimeOffApprover struct { + String string + Employee *Employee + + typ string +} + +func (t *TimeOffApprover) GetString() string { + if t == nil { + return "" + } + return t.String +} + +func (t *TimeOffApprover) GetEmployee() *Employee { + if t == nil { + return nil + } + return t.Employee +} + +func (t *TimeOffApprover) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + t.typ = "String" + t.String = valueString + return nil + } + valueEmployee := new(Employee) + if err := json.Unmarshal(data, &valueEmployee); err == nil { + t.typ = "Employee" + t.Employee = valueEmployee + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, t) +} + +func (t TimeOffApprover) MarshalJSON() ([]byte, error) { + if t.typ == "String" || t.String != "" { + return json.Marshal(t.String) + } + if t.typ == "Employee" || t.Employee != nil { + return json.Marshal(t.Employee) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) +} + +type TimeOffApproverVisitor interface { + VisitString(string) error + VisitEmployee(*Employee) error +} + +func (t *TimeOffApprover) Accept(visitor TimeOffApproverVisitor) error { + if t.typ == "String" || t.String != "" { + return visitor.VisitString(t.String) + } + if t.typ == "Employee" || t.Employee != nil { + return visitor.VisitEmployee(t.Employee) + } + return fmt.Errorf("type %T does not include a non-empty union type", t) +} + +// The employee requesting time off. +type TimeOffEmployee struct { + String string + Employee *Employee + + typ string +} + +func (t *TimeOffEmployee) GetString() string { + if t == nil { + return "" + } + return t.String +} + +func (t *TimeOffEmployee) GetEmployee() *Employee { + if t == nil { + return nil + } + return t.Employee +} + +func (t *TimeOffEmployee) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + t.typ = "String" + t.String = valueString + return nil + } + valueEmployee := new(Employee) + if err := json.Unmarshal(data, &valueEmployee); err == nil { + t.typ = "Employee" + t.Employee = valueEmployee + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, t) +} + +func (t TimeOffEmployee) MarshalJSON() ([]byte, error) { + if t.typ == "String" || t.String != "" { + return json.Marshal(t.String) + } + if t.typ == "Employee" || t.Employee != nil { + return json.Marshal(t.Employee) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) +} + +type TimeOffEmployeeVisitor interface { + VisitString(string) error + VisitEmployee(*Employee) error +} + +func (t *TimeOffEmployee) Accept(visitor TimeOffEmployeeVisitor) error { + if t.typ == "String" || t.String != "" { + return visitor.VisitString(t.String) + } + if t.typ == "Employee" || t.Employee != nil { + return visitor.VisitEmployee(t.Employee) + } + return fmt.Errorf("type %T does not include a non-empty union type", t) +} + +// # The TimeOff Object +// ### Description +// The `TimeOff` object is used to represent all employees' Time Off entries. +// +// ### Usage Example +// Fetch from the `LIST TimeOffs` endpoint and filter by `ID` to show all time off requests. +type TimeOffRequest struct { + // The employee requesting time off. + Employee *TimeOffRequestEmployee `json:"employee,omitempty" url:"employee,omitempty"` + // The Merge ID of the employee with the ability to approve the time off request. + Approver *TimeOffRequestApprover `json:"approver,omitempty" url:"approver,omitempty"` + // The status of this time off request. + // + // * `REQUESTED` - REQUESTED + // * `APPROVED` - APPROVED + // * `DECLINED` - DECLINED + // * `CANCELLED` - CANCELLED + // * `DELETED` - DELETED + Status *TimeOffRequestStatus `json:"status,omitempty" url:"status,omitempty"` + // The employee note for this time off request. + EmployeeNote *string `json:"employee_note,omitempty" url:"employee_note,omitempty"` + // The measurement that the third-party integration uses to count time requested. + // + // * `HOURS` - HOURS + // * `DAYS` - DAYS + Units *TimeOffRequestUnits `json:"units,omitempty" url:"units,omitempty"` + // The time off quantity measured by the prescribed “units”. + Amount *float64 `json:"amount,omitempty" url:"amount,omitempty"` + // The type of time off request. + // + // * `VACATION` - VACATION + // * `SICK` - SICK + // * `PERSONAL` - PERSONAL + // * `JURY_DUTY` - JURY_DUTY + // * `VOLUNTEER` - VOLUNTEER + // * `BEREAVEMENT` - BEREAVEMENT + RequestType *TimeOffRequestRequestType `json:"request_type,omitempty" url:"request_type,omitempty"` + // The day and time of the start of the time requested off. + StartTime *time.Time `json:"start_time,omitempty" url:"start_time,omitempty"` + // The day and time of the end of the time requested off. + EndTime *time.Time `json:"end_time,omitempty" url:"end_time,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (t *TimeOffRequest) GetEmployee() *TimeOffRequestEmployee { + if t == nil { + return nil + } + return t.Employee +} + +func (t *TimeOffRequest) GetApprover() *TimeOffRequestApprover { + if t == nil { + return nil + } + return t.Approver +} + +func (t *TimeOffRequest) GetStatus() *TimeOffRequestStatus { + if t == nil { + return nil + } + return t.Status +} + +func (t *TimeOffRequest) GetEmployeeNote() *string { + if t == nil { + return nil + } + return t.EmployeeNote +} + +func (t *TimeOffRequest) GetUnits() *TimeOffRequestUnits { + if t == nil { + return nil + } + return t.Units +} + +func (t *TimeOffRequest) GetAmount() *float64 { + if t == nil { + return nil + } + return t.Amount +} + +func (t *TimeOffRequest) GetRequestType() *TimeOffRequestRequestType { + if t == nil { + return nil + } + return t.RequestType +} + +func (t *TimeOffRequest) GetStartTime() *time.Time { + if t == nil { + return nil + } + return t.StartTime +} + +func (t *TimeOffRequest) GetEndTime() *time.Time { + if t == nil { + return nil + } + return t.EndTime +} + +func (t *TimeOffRequest) GetIntegrationParams() map[string]interface{} { + if t == nil { + return nil + } + return t.IntegrationParams +} + +func (t *TimeOffRequest) GetLinkedAccountParams() map[string]interface{} { + if t == nil { + return nil + } + return t.LinkedAccountParams +} + +func (t *TimeOffRequest) GetExtraProperties() map[string]interface{} { + return t.extraProperties +} + +func (t *TimeOffRequest) UnmarshalJSON(data []byte) error { + type embed TimeOffRequest + var unmarshaler = struct { + embed + StartTime *internal.DateTime `json:"start_time,omitempty"` + EndTime *internal.DateTime `json:"end_time,omitempty"` + }{ + embed: embed(*t), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *t = TimeOffRequest(unmarshaler.embed) + t.StartTime = unmarshaler.StartTime.TimePtr() + t.EndTime = unmarshaler.EndTime.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *t) + if err != nil { + return err + } + t.extraProperties = extraProperties + t.rawJSON = json.RawMessage(data) + return nil +} + +func (t *TimeOffRequest) MarshalJSON() ([]byte, error) { + type embed TimeOffRequest + var marshaler = struct { + embed + StartTime *internal.DateTime `json:"start_time,omitempty"` + EndTime *internal.DateTime `json:"end_time,omitempty"` + }{ + embed: embed(*t), + StartTime: internal.NewOptionalDateTime(t.StartTime), + EndTime: internal.NewOptionalDateTime(t.EndTime), + } + return json.Marshal(marshaler) +} + +func (t *TimeOffRequest) String() string { + if len(t.rawJSON) > 0 { + if value, err := internal.StringifyJSON(t.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(t); err == nil { + return value + } + return fmt.Sprintf("%#v", t) +} + +// The Merge ID of the employee with the ability to approve the time off request. +type TimeOffRequestApprover struct { + String string + Employee *Employee + + typ string +} + +func (t *TimeOffRequestApprover) GetString() string { + if t == nil { + return "" + } + return t.String +} + +func (t *TimeOffRequestApprover) GetEmployee() *Employee { + if t == nil { + return nil + } + return t.Employee +} + +func (t *TimeOffRequestApprover) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + t.typ = "String" + t.String = valueString + return nil + } + valueEmployee := new(Employee) + if err := json.Unmarshal(data, &valueEmployee); err == nil { + t.typ = "Employee" + t.Employee = valueEmployee + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, t) +} + +func (t TimeOffRequestApprover) MarshalJSON() ([]byte, error) { + if t.typ == "String" || t.String != "" { + return json.Marshal(t.String) + } + if t.typ == "Employee" || t.Employee != nil { + return json.Marshal(t.Employee) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) +} + +type TimeOffRequestApproverVisitor interface { + VisitString(string) error + VisitEmployee(*Employee) error +} + +func (t *TimeOffRequestApprover) Accept(visitor TimeOffRequestApproverVisitor) error { + if t.typ == "String" || t.String != "" { + return visitor.VisitString(t.String) + } + if t.typ == "Employee" || t.Employee != nil { + return visitor.VisitEmployee(t.Employee) + } + return fmt.Errorf("type %T does not include a non-empty union type", t) +} + +// The employee requesting time off. +type TimeOffRequestEmployee struct { + String string + Employee *Employee + + typ string +} + +func (t *TimeOffRequestEmployee) GetString() string { + if t == nil { + return "" + } + return t.String +} + +func (t *TimeOffRequestEmployee) GetEmployee() *Employee { + if t == nil { + return nil + } + return t.Employee +} + +func (t *TimeOffRequestEmployee) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + t.typ = "String" + t.String = valueString + return nil + } + valueEmployee := new(Employee) + if err := json.Unmarshal(data, &valueEmployee); err == nil { + t.typ = "Employee" + t.Employee = valueEmployee + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, t) +} + +func (t TimeOffRequestEmployee) MarshalJSON() ([]byte, error) { + if t.typ == "String" || t.String != "" { + return json.Marshal(t.String) + } + if t.typ == "Employee" || t.Employee != nil { + return json.Marshal(t.Employee) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) +} + +type TimeOffRequestEmployeeVisitor interface { + VisitString(string) error + VisitEmployee(*Employee) error +} + +func (t *TimeOffRequestEmployee) Accept(visitor TimeOffRequestEmployeeVisitor) error { + if t.typ == "String" || t.String != "" { + return visitor.VisitString(t.String) + } + if t.typ == "Employee" || t.Employee != nil { + return visitor.VisitEmployee(t.Employee) + } + return fmt.Errorf("type %T does not include a non-empty union type", t) +} + +// The type of time off request. +// +// * `VACATION` - VACATION +// * `SICK` - SICK +// * `PERSONAL` - PERSONAL +// * `JURY_DUTY` - JURY_DUTY +// * `VOLUNTEER` - VOLUNTEER +// * `BEREAVEMENT` - BEREAVEMENT +type TimeOffRequestRequestType struct { + RequestTypeEnum RequestTypeEnum + String string + + typ string +} + +func (t *TimeOffRequestRequestType) GetRequestTypeEnum() RequestTypeEnum { + if t == nil { + return "" + } + return t.RequestTypeEnum +} + +func (t *TimeOffRequestRequestType) GetString() string { + if t == nil { + return "" + } + return t.String +} + +func (t *TimeOffRequestRequestType) UnmarshalJSON(data []byte) error { + var valueRequestTypeEnum RequestTypeEnum + if err := json.Unmarshal(data, &valueRequestTypeEnum); err == nil { + t.typ = "RequestTypeEnum" + t.RequestTypeEnum = valueRequestTypeEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + t.typ = "String" + t.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, t) +} + +func (t TimeOffRequestRequestType) MarshalJSON() ([]byte, error) { + if t.typ == "RequestTypeEnum" || t.RequestTypeEnum != "" { + return json.Marshal(t.RequestTypeEnum) + } + if t.typ == "String" || t.String != "" { + return json.Marshal(t.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) +} + +type TimeOffRequestRequestTypeVisitor interface { + VisitRequestTypeEnum(RequestTypeEnum) error + VisitString(string) error +} + +func (t *TimeOffRequestRequestType) Accept(visitor TimeOffRequestRequestTypeVisitor) error { + if t.typ == "RequestTypeEnum" || t.RequestTypeEnum != "" { + return visitor.VisitRequestTypeEnum(t.RequestTypeEnum) + } + if t.typ == "String" || t.String != "" { + return visitor.VisitString(t.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", t) +} + +// The status of this time off request. +// +// * `REQUESTED` - REQUESTED +// * `APPROVED` - APPROVED +// * `DECLINED` - DECLINED +// * `CANCELLED` - CANCELLED +// * `DELETED` - DELETED +type TimeOffRequestStatus struct { + TimeOffStatusEnum TimeOffStatusEnum + String string + + typ string +} + +func (t *TimeOffRequestStatus) GetTimeOffStatusEnum() TimeOffStatusEnum { + if t == nil { + return "" + } + return t.TimeOffStatusEnum +} + +func (t *TimeOffRequestStatus) GetString() string { + if t == nil { + return "" + } + return t.String +} + +func (t *TimeOffRequestStatus) UnmarshalJSON(data []byte) error { + var valueTimeOffStatusEnum TimeOffStatusEnum + if err := json.Unmarshal(data, &valueTimeOffStatusEnum); err == nil { + t.typ = "TimeOffStatusEnum" + t.TimeOffStatusEnum = valueTimeOffStatusEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + t.typ = "String" + t.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, t) +} + +func (t TimeOffRequestStatus) MarshalJSON() ([]byte, error) { + if t.typ == "TimeOffStatusEnum" || t.TimeOffStatusEnum != "" { + return json.Marshal(t.TimeOffStatusEnum) + } + if t.typ == "String" || t.String != "" { + return json.Marshal(t.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) +} + +type TimeOffRequestStatusVisitor interface { + VisitTimeOffStatusEnum(TimeOffStatusEnum) error + VisitString(string) error +} + +func (t *TimeOffRequestStatus) Accept(visitor TimeOffRequestStatusVisitor) error { + if t.typ == "TimeOffStatusEnum" || t.TimeOffStatusEnum != "" { + return visitor.VisitTimeOffStatusEnum(t.TimeOffStatusEnum) + } + if t.typ == "String" || t.String != "" { + return visitor.VisitString(t.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", t) +} + +// The type of time off request. +// +// * `VACATION` - VACATION +// * `SICK` - SICK +// * `PERSONAL` - PERSONAL +// * `JURY_DUTY` - JURY_DUTY +// * `VOLUNTEER` - VOLUNTEER +// * `BEREAVEMENT` - BEREAVEMENT +type TimeOffRequestType struct { + RequestTypeEnum RequestTypeEnum + String string + + typ string +} + +func (t *TimeOffRequestType) GetRequestTypeEnum() RequestTypeEnum { + if t == nil { + return "" + } + return t.RequestTypeEnum +} + +func (t *TimeOffRequestType) GetString() string { + if t == nil { + return "" + } + return t.String +} + +func (t *TimeOffRequestType) UnmarshalJSON(data []byte) error { + var valueRequestTypeEnum RequestTypeEnum + if err := json.Unmarshal(data, &valueRequestTypeEnum); err == nil { + t.typ = "RequestTypeEnum" + t.RequestTypeEnum = valueRequestTypeEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + t.typ = "String" + t.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, t) +} + +func (t TimeOffRequestType) MarshalJSON() ([]byte, error) { + if t.typ == "RequestTypeEnum" || t.RequestTypeEnum != "" { + return json.Marshal(t.RequestTypeEnum) + } + if t.typ == "String" || t.String != "" { + return json.Marshal(t.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) +} + +type TimeOffRequestTypeVisitor interface { + VisitRequestTypeEnum(RequestTypeEnum) error + VisitString(string) error +} + +func (t *TimeOffRequestType) Accept(visitor TimeOffRequestTypeVisitor) error { + if t.typ == "RequestTypeEnum" || t.RequestTypeEnum != "" { + return visitor.VisitRequestTypeEnum(t.RequestTypeEnum) + } + if t.typ == "String" || t.String != "" { + return visitor.VisitString(t.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", t) +} + +// The measurement that the third-party integration uses to count time requested. +// +// * `HOURS` - HOURS +// * `DAYS` - DAYS +type TimeOffRequestUnits struct { + UnitsEnum UnitsEnum + String string + + typ string +} + +func (t *TimeOffRequestUnits) GetUnitsEnum() UnitsEnum { + if t == nil { + return "" + } + return t.UnitsEnum +} + +func (t *TimeOffRequestUnits) GetString() string { + if t == nil { + return "" + } + return t.String +} + +func (t *TimeOffRequestUnits) UnmarshalJSON(data []byte) error { + var valueUnitsEnum UnitsEnum + if err := json.Unmarshal(data, &valueUnitsEnum); err == nil { + t.typ = "UnitsEnum" + t.UnitsEnum = valueUnitsEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + t.typ = "String" + t.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, t) +} + +func (t TimeOffRequestUnits) MarshalJSON() ([]byte, error) { + if t.typ == "UnitsEnum" || t.UnitsEnum != "" { + return json.Marshal(t.UnitsEnum) + } + if t.typ == "String" || t.String != "" { + return json.Marshal(t.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) +} + +type TimeOffRequestUnitsVisitor interface { + VisitUnitsEnum(UnitsEnum) error + VisitString(string) error +} + +func (t *TimeOffRequestUnits) Accept(visitor TimeOffRequestUnitsVisitor) error { + if t.typ == "UnitsEnum" || t.UnitsEnum != "" { + return visitor.VisitUnitsEnum(t.UnitsEnum) + } + if t.typ == "String" || t.String != "" { + return visitor.VisitString(t.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", t) +} + +type TimeOffResponse struct { + Model *TimeOff `json:"model" url:"model"` + Warnings []*WarningValidationProblem `json:"warnings" url:"warnings"` + Errors []*ErrorValidationProblem `json:"errors" url:"errors"` + Logs []*DebugModeLog `json:"logs,omitempty" url:"logs,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (t *TimeOffResponse) GetModel() *TimeOff { + if t == nil { + return nil + } + return t.Model +} + +func (t *TimeOffResponse) GetWarnings() []*WarningValidationProblem { + if t == nil { + return nil + } + return t.Warnings +} + +func (t *TimeOffResponse) GetErrors() []*ErrorValidationProblem { + if t == nil { + return nil + } + return t.Errors +} + +func (t *TimeOffResponse) GetLogs() []*DebugModeLog { + if t == nil { + return nil + } + return t.Logs +} + +func (t *TimeOffResponse) GetExtraProperties() map[string]interface{} { + return t.extraProperties +} + +func (t *TimeOffResponse) UnmarshalJSON(data []byte) error { + type unmarshaler TimeOffResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *t = TimeOffResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *t) + if err != nil { + return err + } + t.extraProperties = extraProperties + t.rawJSON = json.RawMessage(data) + return nil +} + +func (t *TimeOffResponse) String() string { + if len(t.rawJSON) > 0 { + if value, err := internal.StringifyJSON(t.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(t); err == nil { + return value + } + return fmt.Sprintf("%#v", t) +} + +// The status of this time off request. +// +// * `REQUESTED` - REQUESTED +// * `APPROVED` - APPROVED +// * `DECLINED` - DECLINED +// * `CANCELLED` - CANCELLED +// * `DELETED` - DELETED +type TimeOffStatus struct { + TimeOffStatusEnum TimeOffStatusEnum + String string + + typ string +} + +func (t *TimeOffStatus) GetTimeOffStatusEnum() TimeOffStatusEnum { + if t == nil { + return "" + } + return t.TimeOffStatusEnum +} + +func (t *TimeOffStatus) GetString() string { + if t == nil { + return "" + } + return t.String +} + +func (t *TimeOffStatus) UnmarshalJSON(data []byte) error { + var valueTimeOffStatusEnum TimeOffStatusEnum + if err := json.Unmarshal(data, &valueTimeOffStatusEnum); err == nil { + t.typ = "TimeOffStatusEnum" + t.TimeOffStatusEnum = valueTimeOffStatusEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + t.typ = "String" + t.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, t) +} + +func (t TimeOffStatus) MarshalJSON() ([]byte, error) { + if t.typ == "TimeOffStatusEnum" || t.TimeOffStatusEnum != "" { + return json.Marshal(t.TimeOffStatusEnum) + } + if t.typ == "String" || t.String != "" { + return json.Marshal(t.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) +} + +type TimeOffStatusVisitor interface { + VisitTimeOffStatusEnum(TimeOffStatusEnum) error + VisitString(string) error +} + +func (t *TimeOffStatus) Accept(visitor TimeOffStatusVisitor) error { + if t.typ == "TimeOffStatusEnum" || t.TimeOffStatusEnum != "" { + return visitor.VisitTimeOffStatusEnum(t.TimeOffStatusEnum) + } + if t.typ == "String" || t.String != "" { + return visitor.VisitString(t.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", t) +} + +// * `REQUESTED` - REQUESTED +// * `APPROVED` - APPROVED +// * `DECLINED` - DECLINED +// * `CANCELLED` - CANCELLED +// * `DELETED` - DELETED +type TimeOffStatusEnum string + +const ( + TimeOffStatusEnumRequested TimeOffStatusEnum = "REQUESTED" + TimeOffStatusEnumApproved TimeOffStatusEnum = "APPROVED" + TimeOffStatusEnumDeclined TimeOffStatusEnum = "DECLINED" + TimeOffStatusEnumCancelled TimeOffStatusEnum = "CANCELLED" + TimeOffStatusEnumDeleted TimeOffStatusEnum = "DELETED" +) + +func NewTimeOffStatusEnumFromString(s string) (TimeOffStatusEnum, error) { + switch s { + case "REQUESTED": + return TimeOffStatusEnumRequested, nil + case "APPROVED": + return TimeOffStatusEnumApproved, nil + case "DECLINED": + return TimeOffStatusEnumDeclined, nil + case "CANCELLED": + return TimeOffStatusEnumCancelled, nil + case "DELETED": + return TimeOffStatusEnumDeleted, nil + } + var t TimeOffStatusEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (t TimeOffStatusEnum) Ptr() *TimeOffStatusEnum { + return &t +} + +// The measurement that the third-party integration uses to count time requested. +// +// * `HOURS` - HOURS +// * `DAYS` - DAYS +type TimeOffUnits struct { + UnitsEnum UnitsEnum + String string + + typ string +} + +func (t *TimeOffUnits) GetUnitsEnum() UnitsEnum { + if t == nil { + return "" + } + return t.UnitsEnum +} + +func (t *TimeOffUnits) GetString() string { + if t == nil { + return "" + } + return t.String +} + +func (t *TimeOffUnits) UnmarshalJSON(data []byte) error { + var valueUnitsEnum UnitsEnum + if err := json.Unmarshal(data, &valueUnitsEnum); err == nil { + t.typ = "UnitsEnum" + t.UnitsEnum = valueUnitsEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + t.typ = "String" + t.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, t) +} + +func (t TimeOffUnits) MarshalJSON() ([]byte, error) { + if t.typ == "UnitsEnum" || t.UnitsEnum != "" { + return json.Marshal(t.UnitsEnum) + } + if t.typ == "String" || t.String != "" { + return json.Marshal(t.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) +} + +type TimeOffUnitsVisitor interface { + VisitUnitsEnum(UnitsEnum) error + VisitString(string) error +} + +func (t *TimeOffUnits) Accept(visitor TimeOffUnitsVisitor) error { + if t.typ == "UnitsEnum" || t.UnitsEnum != "" { + return visitor.VisitUnitsEnum(t.UnitsEnum) + } + if t.typ == "String" || t.String != "" { + return visitor.VisitString(t.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", t) +} + +// * `HOURS` - HOURS +// * `DAYS` - DAYS +type UnitsEnum string + +const ( + UnitsEnumHours UnitsEnum = "HOURS" + UnitsEnumDays UnitsEnum = "DAYS" +) + +func NewUnitsEnumFromString(s string) (UnitsEnum, error) { + switch s { + case "HOURS": + return UnitsEnumHours, nil + case "DAYS": + return UnitsEnumDays, nil + } + var t UnitsEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (u UnitsEnum) Ptr() *UnitsEnum { + return &u +} diff --git a/hris/time_off_balances.go b/hris/time_off_balances.go index b752380..d9ad62f 100644 --- a/hris/time_off_balances.go +++ b/hris/time_off_balances.go @@ -1,61 +1,65 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package hris import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type TimeOffBalancesListRequest struct { // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // If provided, will only return time off balances for this employee. - EmployeeId *string `json:"-"` + EmployeeId *string `json:"-" url:"employee_id,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *string `json:"-"` + Expand []*string `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // If provided, will only return TimeOffBalance with this policy type. Options: ('VACATION', 'SICK', 'PERSONAL', 'JURY_DUTY', 'VOLUNTEER', 'BEREAVEMENT') // - // - `VACATION` - VACATION - // - `SICK` - SICK - // - `PERSONAL` - PERSONAL - // - `JURY_DUTY` - JURY_DUTY - // - `VOLUNTEER` - VOLUNTEER - // - `BEREAVEMENT` - BEREAVEMENT - PolicyType *TimeOffBalancesListRequestPolicyType `json:"-"` + // * `VACATION` - VACATION + // * `SICK` - SICK + // * `PERSONAL` - PERSONAL + // * `JURY_DUTY` - JURY_DUTY + // * `VOLUNTEER` - VOLUNTEER + // * `BEREAVEMENT` - BEREAVEMENT + PolicyType *TimeOffBalancesListRequestPolicyType `json:"-" url:"policy_type,omitempty"` // Deprecated. Use show_enum_origins. - RemoteFields *string `json:"-"` + RemoteFields *string `json:"-" url:"remote_fields,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` // 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) - ShowEnumOrigins *string `json:"-"` + ShowEnumOrigins *string `json:"-" url:"show_enum_origins,omitempty"` } type TimeOffBalancesRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *string `json:"-"` + Expand []*string `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // Deprecated. Use show_enum_origins. - RemoteFields *string `json:"-"` + RemoteFields *string `json:"-" url:"remote_fields,omitempty"` // 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) - ShowEnumOrigins *string `json:"-"` + ShowEnumOrigins *string `json:"-" url:"show_enum_origins,omitempty"` } type TimeOffBalancesListRequestPolicyType string @@ -91,3 +95,407 @@ func NewTimeOffBalancesListRequestPolicyTypeFromString(s string) (TimeOffBalance func (t TimeOffBalancesListRequestPolicyType) Ptr() *TimeOffBalancesListRequestPolicyType { return &t } + +type PaginatedTimeOffBalanceList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*TimeOffBalance `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedTimeOffBalanceList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedTimeOffBalanceList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedTimeOffBalanceList) GetResults() []*TimeOffBalance { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedTimeOffBalanceList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedTimeOffBalanceList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedTimeOffBalanceList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedTimeOffBalanceList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedTimeOffBalanceList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +// * `VACATION` - VACATION +// * `SICK` - SICK +// * `PERSONAL` - PERSONAL +// * `JURY_DUTY` - JURY_DUTY +// * `VOLUNTEER` - VOLUNTEER +// * `BEREAVEMENT` - BEREAVEMENT +type PolicyTypeEnum string + +const ( + PolicyTypeEnumVacation PolicyTypeEnum = "VACATION" + PolicyTypeEnumSick PolicyTypeEnum = "SICK" + PolicyTypeEnumPersonal PolicyTypeEnum = "PERSONAL" + PolicyTypeEnumJuryDuty PolicyTypeEnum = "JURY_DUTY" + PolicyTypeEnumVolunteer PolicyTypeEnum = "VOLUNTEER" + PolicyTypeEnumBereavement PolicyTypeEnum = "BEREAVEMENT" +) + +func NewPolicyTypeEnumFromString(s string) (PolicyTypeEnum, error) { + switch s { + case "VACATION": + return PolicyTypeEnumVacation, nil + case "SICK": + return PolicyTypeEnumSick, nil + case "PERSONAL": + return PolicyTypeEnumPersonal, nil + case "JURY_DUTY": + return PolicyTypeEnumJuryDuty, nil + case "VOLUNTEER": + return PolicyTypeEnumVolunteer, nil + case "BEREAVEMENT": + return PolicyTypeEnumBereavement, nil + } + var t PolicyTypeEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (p PolicyTypeEnum) Ptr() *PolicyTypeEnum { + return &p +} + +// # The TimeOffBalance Object +// ### Description +// The `TimeOffBalance` object is used to represent current balances for an employee's Time Off plan. +// +// ### Usage Example +// Fetch from the `LIST TimeOffBalances` endpoint and filter by `ID` to show all time off balances. +type TimeOffBalance struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The employee the balance belongs to. + Employee *TimeOffBalanceEmployee `json:"employee,omitempty" url:"employee,omitempty"` + // The current remaining PTO balance, measured in hours. For integrations that return this value in days, Merge multiplies by 8 to calculate hours. + Balance *float64 `json:"balance,omitempty" url:"balance,omitempty"` + // The amount of PTO used in terms of hours. For integrations that return this value in days, Merge multiplies by 8 to calculate hours. + Used *float64 `json:"used,omitempty" url:"used,omitempty"` + // The policy type of this time off balance. + // + // * `VACATION` - VACATION + // * `SICK` - SICK + // * `PERSONAL` - PERSONAL + // * `JURY_DUTY` - JURY_DUTY + // * `VOLUNTEER` - VOLUNTEER + // * `BEREAVEMENT` - BEREAVEMENT + PolicyType *TimeOffBalancePolicyType `json:"policy_type,omitempty" url:"policy_type,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (t *TimeOffBalance) GetId() *string { + if t == nil { + return nil + } + return t.Id +} + +func (t *TimeOffBalance) GetRemoteId() *string { + if t == nil { + return nil + } + return t.RemoteId +} + +func (t *TimeOffBalance) GetCreatedAt() *time.Time { + if t == nil { + return nil + } + return t.CreatedAt +} + +func (t *TimeOffBalance) GetModifiedAt() *time.Time { + if t == nil { + return nil + } + return t.ModifiedAt +} + +func (t *TimeOffBalance) GetEmployee() *TimeOffBalanceEmployee { + if t == nil { + return nil + } + return t.Employee +} + +func (t *TimeOffBalance) GetBalance() *float64 { + if t == nil { + return nil + } + return t.Balance +} + +func (t *TimeOffBalance) GetUsed() *float64 { + if t == nil { + return nil + } + return t.Used +} + +func (t *TimeOffBalance) GetPolicyType() *TimeOffBalancePolicyType { + if t == nil { + return nil + } + return t.PolicyType +} + +func (t *TimeOffBalance) GetRemoteWasDeleted() *bool { + if t == nil { + return nil + } + return t.RemoteWasDeleted +} + +func (t *TimeOffBalance) GetFieldMappings() map[string]interface{} { + if t == nil { + return nil + } + return t.FieldMappings +} + +func (t *TimeOffBalance) GetRemoteData() []*RemoteData { + if t == nil { + return nil + } + return t.RemoteData +} + +func (t *TimeOffBalance) GetExtraProperties() map[string]interface{} { + return t.extraProperties +} + +func (t *TimeOffBalance) UnmarshalJSON(data []byte) error { + type embed TimeOffBalance + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*t), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *t = TimeOffBalance(unmarshaler.embed) + t.CreatedAt = unmarshaler.CreatedAt.TimePtr() + t.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *t) + if err != nil { + return err + } + t.extraProperties = extraProperties + t.rawJSON = json.RawMessage(data) + return nil +} + +func (t *TimeOffBalance) MarshalJSON() ([]byte, error) { + type embed TimeOffBalance + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*t), + CreatedAt: internal.NewOptionalDateTime(t.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(t.ModifiedAt), + } + return json.Marshal(marshaler) +} + +func (t *TimeOffBalance) String() string { + if len(t.rawJSON) > 0 { + if value, err := internal.StringifyJSON(t.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(t); err == nil { + return value + } + return fmt.Sprintf("%#v", t) +} + +// The employee the balance belongs to. +type TimeOffBalanceEmployee struct { + String string + Employee *Employee + + typ string +} + +func (t *TimeOffBalanceEmployee) GetString() string { + if t == nil { + return "" + } + return t.String +} + +func (t *TimeOffBalanceEmployee) GetEmployee() *Employee { + if t == nil { + return nil + } + return t.Employee +} + +func (t *TimeOffBalanceEmployee) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + t.typ = "String" + t.String = valueString + return nil + } + valueEmployee := new(Employee) + if err := json.Unmarshal(data, &valueEmployee); err == nil { + t.typ = "Employee" + t.Employee = valueEmployee + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, t) +} + +func (t TimeOffBalanceEmployee) MarshalJSON() ([]byte, error) { + if t.typ == "String" || t.String != "" { + return json.Marshal(t.String) + } + if t.typ == "Employee" || t.Employee != nil { + return json.Marshal(t.Employee) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) +} + +type TimeOffBalanceEmployeeVisitor interface { + VisitString(string) error + VisitEmployee(*Employee) error +} + +func (t *TimeOffBalanceEmployee) Accept(visitor TimeOffBalanceEmployeeVisitor) error { + if t.typ == "String" || t.String != "" { + return visitor.VisitString(t.String) + } + if t.typ == "Employee" || t.Employee != nil { + return visitor.VisitEmployee(t.Employee) + } + return fmt.Errorf("type %T does not include a non-empty union type", t) +} + +// The policy type of this time off balance. +// +// * `VACATION` - VACATION +// * `SICK` - SICK +// * `PERSONAL` - PERSONAL +// * `JURY_DUTY` - JURY_DUTY +// * `VOLUNTEER` - VOLUNTEER +// * `BEREAVEMENT` - BEREAVEMENT +type TimeOffBalancePolicyType struct { + PolicyTypeEnum PolicyTypeEnum + String string + + typ string +} + +func (t *TimeOffBalancePolicyType) GetPolicyTypeEnum() PolicyTypeEnum { + if t == nil { + return "" + } + return t.PolicyTypeEnum +} + +func (t *TimeOffBalancePolicyType) GetString() string { + if t == nil { + return "" + } + return t.String +} + +func (t *TimeOffBalancePolicyType) UnmarshalJSON(data []byte) error { + var valuePolicyTypeEnum PolicyTypeEnum + if err := json.Unmarshal(data, &valuePolicyTypeEnum); err == nil { + t.typ = "PolicyTypeEnum" + t.PolicyTypeEnum = valuePolicyTypeEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + t.typ = "String" + t.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, t) +} + +func (t TimeOffBalancePolicyType) MarshalJSON() ([]byte, error) { + if t.typ == "PolicyTypeEnum" || t.PolicyTypeEnum != "" { + return json.Marshal(t.PolicyTypeEnum) + } + if t.typ == "String" || t.String != "" { + return json.Marshal(t.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) +} + +type TimeOffBalancePolicyTypeVisitor interface { + VisitPolicyTypeEnum(PolicyTypeEnum) error + VisitString(string) error +} + +func (t *TimeOffBalancePolicyType) Accept(visitor TimeOffBalancePolicyTypeVisitor) error { + if t.typ == "PolicyTypeEnum" || t.PolicyTypeEnum != "" { + return visitor.VisitPolicyTypeEnum(t.PolicyTypeEnum) + } + if t.typ == "String" || t.String != "" { + return visitor.VisitString(t.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", t) +} diff --git a/hris/timeoff/client.go b/hris/timeoff/client.go index 70f71dc..97517f4 100644 --- a/hris/timeoff/client.go +++ b/hris/timeoff/client.go @@ -1,154 +1,135 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package timeoff import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - hris "github.com/merge-api/merge-go-client/hris" + core "github.com/merge-api/merge-go-client/v2/core" + hris "github.com/merge-api/merge-go-client/v2/hris" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `TimeOff` objects. -func (c *Client) List(ctx context.Context, request *hris.TimeOffListRequest) (*hris.PaginatedTimeOffList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "hris/v1/time-off" - - queryParams := make(url.Values) - if request.ApproverId != nil { - queryParams.Add("approver_id", fmt.Sprintf("%v", *request.ApproverId)) - } - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.EmployeeId != nil { - queryParams.Add("employee_id", fmt.Sprintf("%v", *request.EmployeeId)) - } - if request.EndedAfter != nil { - queryParams.Add("ended_after", fmt.Sprintf("%v", request.EndedAfter.Format(time.RFC3339))) - } - if request.EndedBefore != nil { - queryParams.Add("ended_before", fmt.Sprintf("%v", request.EndedBefore.Format(time.RFC3339))) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteFields != nil { - queryParams.Add("remote_fields", fmt.Sprintf("%v", *request.RemoteFields)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if request.RequestType != nil { - queryParams.Add("request_type", fmt.Sprintf("%v", *request.RequestType)) - } - if request.ShowEnumOrigins != nil { - queryParams.Add("show_enum_origins", fmt.Sprintf("%v", *request.ShowEnumOrigins)) - } - if request.StartedAfter != nil { - queryParams.Add("started_after", fmt.Sprintf("%v", request.StartedAfter.Format(time.RFC3339))) - } - if request.StartedBefore != nil { - queryParams.Add("started_before", fmt.Sprintf("%v", request.StartedBefore.Format(time.RFC3339))) - } - if request.Status != nil { - queryParams.Add("status", fmt.Sprintf("%v", *request.Status)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *hris.PaginatedTimeOffList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *hris.TimeOffListRequest, + opts ...option.RequestOption, +) (*core.Page[*hris.TimeOff], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/hris/v1/time-off" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *hris.PaginatedTimeOffList) *internal.PageResponse[*string, *hris.TimeOff] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *hris.TimeOff]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Creates a `TimeOff` object with the given values. -func (c *Client) Create(ctx context.Context, request *hris.TimeOffEndpointRequest) (*hris.TimeOffResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "hris/v1/time-off" - - queryParams := make(url.Values) - if request.IsDebugMode != nil { - queryParams.Add("is_debug_mode", fmt.Sprintf("%v", *request.IsDebugMode)) - } - if request.RunAsync != nil { - queryParams.Add("run_async", fmt.Sprintf("%v", *request.RunAsync)) +func (c *Client) Create( + ctx context.Context, + request *hris.TimeOffEndpointRequest, + opts ...option.RequestOption, +) (*hris.TimeOffResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/hris/v1/time-off" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *hris.TimeOffResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -157,38 +138,46 @@ func (c *Client) Create(ctx context.Context, request *hris.TimeOffEndpointReques } // Returns a `TimeOff` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *hris.TimeOffRetrieveRequest) (*hris.TimeOff, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"hris/v1/time-off/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.RemoteFields != nil { - queryParams.Add("remote_fields", fmt.Sprintf("%v", *request.RemoteFields)) - } - if request.ShowEnumOrigins != nil { - queryParams.Add("show_enum_origins", fmt.Sprintf("%v", *request.ShowEnumOrigins)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *hris.TimeOffRetrieveRequest, + opts ...option.RequestOption, +) (*hris.TimeOff, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/hris/v1/time-off/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *hris.TimeOff if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -197,21 +186,34 @@ func (c *Client) Retrieve(ctx context.Context, id string, request *hris.TimeOffR } // Returns metadata for `TimeOff` POSTs. -func (c *Client) MetaPostRetrieve(ctx context.Context) (*hris.MetaResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "hris/v1/time-off/meta/post" +func (c *Client) MetaPostRetrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*hris.MetaResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/hris/v1/time-off/meta/post" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *hris.MetaResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/hris/timeoffbalances/client.go b/hris/timeoffbalances/client.go index 943bb83..8b0eeb4 100644 --- a/hris/timeoffbalances/client.go +++ b/hris/timeoffbalances/client.go @@ -1,141 +1,137 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package timeoffbalances import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - hris "github.com/merge-api/merge-go-client/hris" + core "github.com/merge-api/merge-go-client/v2/core" + hris "github.com/merge-api/merge-go-client/v2/hris" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `TimeOffBalance` objects. -func (c *Client) List(ctx context.Context, request *hris.TimeOffBalancesListRequest) (*hris.PaginatedTimeOffBalanceList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "hris/v1/time-off-balances" - - queryParams := make(url.Values) - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.EmployeeId != nil { - queryParams.Add("employee_id", fmt.Sprintf("%v", *request.EmployeeId)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.PolicyType != nil { - queryParams.Add("policy_type", fmt.Sprintf("%v", *request.PolicyType)) - } - if request.RemoteFields != nil { - queryParams.Add("remote_fields", fmt.Sprintf("%v", request.RemoteFields)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if request.ShowEnumOrigins != nil { - queryParams.Add("show_enum_origins", fmt.Sprintf("%v", request.ShowEnumOrigins)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *hris.PaginatedTimeOffBalanceList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *hris.TimeOffBalancesListRequest, + opts ...option.RequestOption, +) (*core.Page[*hris.TimeOffBalance], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/hris/v1/time-off-balances" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *hris.PaginatedTimeOffBalanceList) *internal.PageResponse[*string, *hris.TimeOffBalance] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *hris.TimeOffBalance]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Returns a `TimeOffBalance` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *hris.TimeOffBalancesRetrieveRequest) (*hris.TimeOffBalance, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"hris/v1/time-off-balances/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.RemoteFields != nil { - queryParams.Add("remote_fields", fmt.Sprintf("%v", request.RemoteFields)) - } - if request.ShowEnumOrigins != nil { - queryParams.Add("show_enum_origins", fmt.Sprintf("%v", request.ShowEnumOrigins)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *hris.TimeOffBalancesRetrieveRequest, + opts ...option.RequestOption, +) (*hris.TimeOffBalance, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/hris/v1/time-off-balances/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *hris.TimeOffBalance if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/hris/timesheet_entries.go b/hris/timesheet_entries.go index cbcddc5..e892c01 100644 --- a/hris/timesheet_entries.go +++ b/hris/timesheet_entries.go @@ -1,62 +1,66 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package hris import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type TimesheetEntryEndpointRequest struct { // Whether to include debug fields (such as log file links) in the response. - IsDebugMode *bool `json:"-"` + IsDebugMode *bool `json:"-" url:"is_debug_mode,omitempty"` // Whether or not third-party updates should be run asynchronously. - RunAsync *bool `json:"-"` - Model *TimesheetEntryRequest `json:"model,omitempty"` + RunAsync *bool `json:"-" url:"run_async,omitempty"` + Model *TimesheetEntryRequest `json:"model,omitempty" url:"-"` } type TimesheetEntriesListRequest struct { // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // If provided, will only return timesheet entries for this employee. - EmployeeId *string `json:"-"` + EmployeeId *string `json:"-" url:"employee_id,omitempty"` // If provided, will only return timesheet entries ended after this datetime. - EndedAfter *time.Time `json:"-"` + EndedAfter *time.Time `json:"-" url:"ended_after,omitempty"` // If provided, will only return timesheet entries ended before this datetime. - EndedBefore *time.Time `json:"-"` + EndedBefore *time.Time `json:"-" url:"ended_before,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *string `json:"-"` + Expand []*string `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Overrides the default ordering for this endpoint. Possible values include: start_time, -start_time. - OrderBy *TimesheetEntriesListRequestOrderBy `json:"-"` + OrderBy *TimesheetEntriesListRequestOrderBy `json:"-" url:"order_by,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` // If provided, will only return timesheet entries started after this datetime. - StartedAfter *time.Time `json:"-"` + StartedAfter *time.Time `json:"-" url:"started_after,omitempty"` // If provided, will only return timesheet entries started before this datetime. - StartedBefore *time.Time `json:"-"` + StartedBefore *time.Time `json:"-" url:"started_before,omitempty"` } type TimesheetEntriesRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *string `json:"-"` + Expand []*string `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` } type TimesheetEntriesListRequestOrderBy string @@ -80,3 +84,549 @@ func NewTimesheetEntriesListRequestOrderByFromString(s string) (TimesheetEntries func (t TimesheetEntriesListRequestOrderBy) Ptr() *TimesheetEntriesListRequestOrderBy { return &t } + +type PaginatedTimesheetEntryList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*TimesheetEntry `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedTimesheetEntryList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedTimesheetEntryList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedTimesheetEntryList) GetResults() []*TimesheetEntry { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedTimesheetEntryList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedTimesheetEntryList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedTimesheetEntryList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedTimesheetEntryList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedTimesheetEntryList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +// # The Timesheet Entry Object +// ### Description +// The `Timesheet Entry` object is used to track coverage for hours worked by an 'Employee'. +// +// ### Usage Example +// GET and POST Timesheet Entries +type TimesheetEntry struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The employee the timesheet entry is for. + Employee *TimesheetEntryEmployee `json:"employee,omitempty" url:"employee,omitempty"` + // The number of hours logged by the employee. + HoursWorked *float64 `json:"hours_worked,omitempty" url:"hours_worked,omitempty"` + // The time at which the employee started work. + StartTime *time.Time `json:"start_time,omitempty" url:"start_time,omitempty"` + // The time at which the employee ended work. + EndTime *time.Time `json:"end_time,omitempty" url:"end_time,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (t *TimesheetEntry) GetId() *string { + if t == nil { + return nil + } + return t.Id +} + +func (t *TimesheetEntry) GetRemoteId() *string { + if t == nil { + return nil + } + return t.RemoteId +} + +func (t *TimesheetEntry) GetCreatedAt() *time.Time { + if t == nil { + return nil + } + return t.CreatedAt +} + +func (t *TimesheetEntry) GetModifiedAt() *time.Time { + if t == nil { + return nil + } + return t.ModifiedAt +} + +func (t *TimesheetEntry) GetEmployee() *TimesheetEntryEmployee { + if t == nil { + return nil + } + return t.Employee +} + +func (t *TimesheetEntry) GetHoursWorked() *float64 { + if t == nil { + return nil + } + return t.HoursWorked +} + +func (t *TimesheetEntry) GetStartTime() *time.Time { + if t == nil { + return nil + } + return t.StartTime +} + +func (t *TimesheetEntry) GetEndTime() *time.Time { + if t == nil { + return nil + } + return t.EndTime +} + +func (t *TimesheetEntry) GetRemoteWasDeleted() *bool { + if t == nil { + return nil + } + return t.RemoteWasDeleted +} + +func (t *TimesheetEntry) GetFieldMappings() map[string]interface{} { + if t == nil { + return nil + } + return t.FieldMappings +} + +func (t *TimesheetEntry) GetRemoteData() []*RemoteData { + if t == nil { + return nil + } + return t.RemoteData +} + +func (t *TimesheetEntry) GetExtraProperties() map[string]interface{} { + return t.extraProperties +} + +func (t *TimesheetEntry) UnmarshalJSON(data []byte) error { + type embed TimesheetEntry + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + StartTime *internal.DateTime `json:"start_time,omitempty"` + EndTime *internal.DateTime `json:"end_time,omitempty"` + }{ + embed: embed(*t), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *t = TimesheetEntry(unmarshaler.embed) + t.CreatedAt = unmarshaler.CreatedAt.TimePtr() + t.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + t.StartTime = unmarshaler.StartTime.TimePtr() + t.EndTime = unmarshaler.EndTime.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *t) + if err != nil { + return err + } + t.extraProperties = extraProperties + t.rawJSON = json.RawMessage(data) + return nil +} + +func (t *TimesheetEntry) MarshalJSON() ([]byte, error) { + type embed TimesheetEntry + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + StartTime *internal.DateTime `json:"start_time,omitempty"` + EndTime *internal.DateTime `json:"end_time,omitempty"` + }{ + embed: embed(*t), + CreatedAt: internal.NewOptionalDateTime(t.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(t.ModifiedAt), + StartTime: internal.NewOptionalDateTime(t.StartTime), + EndTime: internal.NewOptionalDateTime(t.EndTime), + } + return json.Marshal(marshaler) +} + +func (t *TimesheetEntry) String() string { + if len(t.rawJSON) > 0 { + if value, err := internal.StringifyJSON(t.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(t); err == nil { + return value + } + return fmt.Sprintf("%#v", t) +} + +// The employee the timesheet entry is for. +type TimesheetEntryEmployee struct { + String string + Employee *Employee + + typ string +} + +func (t *TimesheetEntryEmployee) GetString() string { + if t == nil { + return "" + } + return t.String +} + +func (t *TimesheetEntryEmployee) GetEmployee() *Employee { + if t == nil { + return nil + } + return t.Employee +} + +func (t *TimesheetEntryEmployee) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + t.typ = "String" + t.String = valueString + return nil + } + valueEmployee := new(Employee) + if err := json.Unmarshal(data, &valueEmployee); err == nil { + t.typ = "Employee" + t.Employee = valueEmployee + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, t) +} + +func (t TimesheetEntryEmployee) MarshalJSON() ([]byte, error) { + if t.typ == "String" || t.String != "" { + return json.Marshal(t.String) + } + if t.typ == "Employee" || t.Employee != nil { + return json.Marshal(t.Employee) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) +} + +type TimesheetEntryEmployeeVisitor interface { + VisitString(string) error + VisitEmployee(*Employee) error +} + +func (t *TimesheetEntryEmployee) Accept(visitor TimesheetEntryEmployeeVisitor) error { + if t.typ == "String" || t.String != "" { + return visitor.VisitString(t.String) + } + if t.typ == "Employee" || t.Employee != nil { + return visitor.VisitEmployee(t.Employee) + } + return fmt.Errorf("type %T does not include a non-empty union type", t) +} + +// # The Timesheet Entry Object +// ### Description +// The `Timesheet Entry` object is used to track coverage for hours worked by an 'Employee'. +// +// ### Usage Example +// GET and POST Timesheet Entries +type TimesheetEntryRequest struct { + // The employee the timesheet entry is for. + Employee *TimesheetEntryRequestEmployee `json:"employee,omitempty" url:"employee,omitempty"` + // The number of hours logged by the employee. + HoursWorked *float64 `json:"hours_worked,omitempty" url:"hours_worked,omitempty"` + // The time at which the employee started work. + StartTime *time.Time `json:"start_time,omitempty" url:"start_time,omitempty"` + // The time at which the employee ended work. + EndTime *time.Time `json:"end_time,omitempty" url:"end_time,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (t *TimesheetEntryRequest) GetEmployee() *TimesheetEntryRequestEmployee { + if t == nil { + return nil + } + return t.Employee +} + +func (t *TimesheetEntryRequest) GetHoursWorked() *float64 { + if t == nil { + return nil + } + return t.HoursWorked +} + +func (t *TimesheetEntryRequest) GetStartTime() *time.Time { + if t == nil { + return nil + } + return t.StartTime +} + +func (t *TimesheetEntryRequest) GetEndTime() *time.Time { + if t == nil { + return nil + } + return t.EndTime +} + +func (t *TimesheetEntryRequest) GetIntegrationParams() map[string]interface{} { + if t == nil { + return nil + } + return t.IntegrationParams +} + +func (t *TimesheetEntryRequest) GetLinkedAccountParams() map[string]interface{} { + if t == nil { + return nil + } + return t.LinkedAccountParams +} + +func (t *TimesheetEntryRequest) GetExtraProperties() map[string]interface{} { + return t.extraProperties +} + +func (t *TimesheetEntryRequest) UnmarshalJSON(data []byte) error { + type embed TimesheetEntryRequest + var unmarshaler = struct { + embed + StartTime *internal.DateTime `json:"start_time,omitempty"` + EndTime *internal.DateTime `json:"end_time,omitempty"` + }{ + embed: embed(*t), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *t = TimesheetEntryRequest(unmarshaler.embed) + t.StartTime = unmarshaler.StartTime.TimePtr() + t.EndTime = unmarshaler.EndTime.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *t) + if err != nil { + return err + } + t.extraProperties = extraProperties + t.rawJSON = json.RawMessage(data) + return nil +} + +func (t *TimesheetEntryRequest) MarshalJSON() ([]byte, error) { + type embed TimesheetEntryRequest + var marshaler = struct { + embed + StartTime *internal.DateTime `json:"start_time,omitempty"` + EndTime *internal.DateTime `json:"end_time,omitempty"` + }{ + embed: embed(*t), + StartTime: internal.NewOptionalDateTime(t.StartTime), + EndTime: internal.NewOptionalDateTime(t.EndTime), + } + return json.Marshal(marshaler) +} + +func (t *TimesheetEntryRequest) String() string { + if len(t.rawJSON) > 0 { + if value, err := internal.StringifyJSON(t.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(t); err == nil { + return value + } + return fmt.Sprintf("%#v", t) +} + +// The employee the timesheet entry is for. +type TimesheetEntryRequestEmployee struct { + String string + Employee *Employee + + typ string +} + +func (t *TimesheetEntryRequestEmployee) GetString() string { + if t == nil { + return "" + } + return t.String +} + +func (t *TimesheetEntryRequestEmployee) GetEmployee() *Employee { + if t == nil { + return nil + } + return t.Employee +} + +func (t *TimesheetEntryRequestEmployee) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + t.typ = "String" + t.String = valueString + return nil + } + valueEmployee := new(Employee) + if err := json.Unmarshal(data, &valueEmployee); err == nil { + t.typ = "Employee" + t.Employee = valueEmployee + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, t) +} + +func (t TimesheetEntryRequestEmployee) MarshalJSON() ([]byte, error) { + if t.typ == "String" || t.String != "" { + return json.Marshal(t.String) + } + if t.typ == "Employee" || t.Employee != nil { + return json.Marshal(t.Employee) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) +} + +type TimesheetEntryRequestEmployeeVisitor interface { + VisitString(string) error + VisitEmployee(*Employee) error +} + +func (t *TimesheetEntryRequestEmployee) Accept(visitor TimesheetEntryRequestEmployeeVisitor) error { + if t.typ == "String" || t.String != "" { + return visitor.VisitString(t.String) + } + if t.typ == "Employee" || t.Employee != nil { + return visitor.VisitEmployee(t.Employee) + } + return fmt.Errorf("type %T does not include a non-empty union type", t) +} + +type TimesheetEntryResponse struct { + Model *TimesheetEntry `json:"model" url:"model"` + Warnings []*WarningValidationProblem `json:"warnings" url:"warnings"` + Errors []*ErrorValidationProblem `json:"errors" url:"errors"` + Logs []*DebugModeLog `json:"logs,omitempty" url:"logs,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (t *TimesheetEntryResponse) GetModel() *TimesheetEntry { + if t == nil { + return nil + } + return t.Model +} + +func (t *TimesheetEntryResponse) GetWarnings() []*WarningValidationProblem { + if t == nil { + return nil + } + return t.Warnings +} + +func (t *TimesheetEntryResponse) GetErrors() []*ErrorValidationProblem { + if t == nil { + return nil + } + return t.Errors +} + +func (t *TimesheetEntryResponse) GetLogs() []*DebugModeLog { + if t == nil { + return nil + } + return t.Logs +} + +func (t *TimesheetEntryResponse) GetExtraProperties() map[string]interface{} { + return t.extraProperties +} + +func (t *TimesheetEntryResponse) UnmarshalJSON(data []byte) error { + type unmarshaler TimesheetEntryResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *t = TimesheetEntryResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *t) + if err != nil { + return err + } + t.extraProperties = extraProperties + t.rawJSON = json.RawMessage(data) + return nil +} + +func (t *TimesheetEntryResponse) String() string { + if len(t.rawJSON) > 0 { + if value, err := internal.StringifyJSON(t.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(t); err == nil { + return value + } + return fmt.Sprintf("%#v", t) +} diff --git a/hris/timesheetentries/client.go b/hris/timesheetentries/client.go index f5f8757..f401006 100644 --- a/hris/timesheetentries/client.go +++ b/hris/timesheetentries/client.go @@ -1,142 +1,135 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package timesheetentries import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - hris "github.com/merge-api/merge-go-client/hris" + core "github.com/merge-api/merge-go-client/v2/core" + hris "github.com/merge-api/merge-go-client/v2/hris" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `TimesheetEntry` objects. -func (c *Client) List(ctx context.Context, request *hris.TimesheetEntriesListRequest) (*hris.PaginatedTimesheetEntryList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "hris/v1/timesheet-entries" - - queryParams := make(url.Values) - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.EmployeeId != nil { - queryParams.Add("employee_id", fmt.Sprintf("%v", *request.EmployeeId)) - } - if request.EndedAfter != nil { - queryParams.Add("ended_after", fmt.Sprintf("%v", request.EndedAfter.Format(time.RFC3339))) - } - if request.EndedBefore != nil { - queryParams.Add("ended_before", fmt.Sprintf("%v", request.EndedBefore.Format(time.RFC3339))) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.OrderBy != nil { - queryParams.Add("order_by", fmt.Sprintf("%v", *request.OrderBy)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if request.StartedAfter != nil { - queryParams.Add("started_after", fmt.Sprintf("%v", request.StartedAfter.Format(time.RFC3339))) - } - if request.StartedBefore != nil { - queryParams.Add("started_before", fmt.Sprintf("%v", request.StartedBefore.Format(time.RFC3339))) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *hris.PaginatedTimesheetEntryList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *hris.TimesheetEntriesListRequest, + opts ...option.RequestOption, +) (*core.Page[*hris.TimesheetEntry], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/hris/v1/timesheet-entries" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *hris.PaginatedTimesheetEntryList) *internal.PageResponse[*string, *hris.TimesheetEntry] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *hris.TimesheetEntry]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Creates a `TimesheetEntry` object with the given values. -func (c *Client) Create(ctx context.Context, request *hris.TimesheetEntryEndpointRequest) (*hris.TimesheetEntryResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "hris/v1/timesheet-entries" - - queryParams := make(url.Values) - if request.IsDebugMode != nil { - queryParams.Add("is_debug_mode", fmt.Sprintf("%v", *request.IsDebugMode)) - } - if request.RunAsync != nil { - queryParams.Add("run_async", fmt.Sprintf("%v", *request.RunAsync)) +func (c *Client) Create( + ctx context.Context, + request *hris.TimesheetEntryEndpointRequest, + opts ...option.RequestOption, +) (*hris.TimesheetEntryResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/hris/v1/timesheet-entries" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *hris.TimesheetEntryResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -145,32 +138,46 @@ func (c *Client) Create(ctx context.Context, request *hris.TimesheetEntryEndpoin } // Returns a `TimesheetEntry` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *hris.TimesheetEntriesRetrieveRequest) (*hris.TimesheetEntry, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"hris/v1/timesheet-entries/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *hris.TimesheetEntriesRetrieveRequest, + opts ...option.RequestOption, +) (*hris.TimesheetEntry, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/hris/v1/timesheet-entries/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *hris.TimesheetEntry if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -179,21 +186,34 @@ func (c *Client) Retrieve(ctx context.Context, id string, request *hris.Timeshee } // Returns metadata for `TimesheetEntry` POSTs. -func (c *Client) MetaPostRetrieve(ctx context.Context) (*hris.MetaResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "hris/v1/timesheet-entries/meta/post" +func (c *Client) MetaPostRetrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*hris.MetaResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/hris/v1/timesheet-entries/meta/post" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *hris.MetaResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/hris/types.go b/hris/types.go index afa42fa..739f3a5 100644 --- a/hris/types.go +++ b/hris/types.go @@ -1,198 +1,111 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package hris import ( json "encoding/json" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) -type AccountDetails struct { - Id *string `json:"id,omitempty"` - Integration *string `json:"integration,omitempty"` - IntegrationSlug *string `json:"integration_slug,omitempty"` - Category *CategoryEnum `json:"category,omitempty"` - EndUserOriginId *string `json:"end_user_origin_id,omitempty"` - EndUserOrganizationName *string `json:"end_user_organization_name,omitempty"` - EndUserEmailAddress *string `json:"end_user_email_address,omitempty"` - Status *string `json:"status,omitempty"` - WebhookListenerUrl *string `json:"webhook_listener_url,omitempty"` - // 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. - IsDuplicate *bool `json:"is_duplicate,omitempty"` - AccountType *string `json:"account_type,omitempty"` - // The time at which account completes the linking flow. - CompletedAt *time.Time `json:"completed_at,omitempty"` - - _rawJSON json.RawMessage -} - -func (a *AccountDetails) UnmarshalJSON(data []byte) error { - type unmarshaler AccountDetails - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *a = AccountDetails(value) - a._rawJSON = json.RawMessage(data) - return nil +type AccountIntegration struct { + // Company name. + Name string `json:"name" url:"name"` + // Optional. This shortened name appears in places with limited space, usually in conjunction with the platform's logo (e.g., Merge Link menu).

Example: Workforce Now (in lieu of ADP Workforce Now), SuccessFactors (in lieu of SAP SuccessFactors) + AbbreviatedName *string `json:"abbreviated_name,omitempty" url:"abbreviated_name,omitempty"` + // Category or categories this integration belongs to. Multiple categories should be comma separated, i.e. [ats, hris]. + Categories []CategoriesEnum `json:"categories,omitempty" url:"categories,omitempty"` + // Company logo in rectangular shape. + Image *string `json:"image,omitempty" url:"image,omitempty"` + // Company logo in square shape. + SquareImage *string `json:"square_image,omitempty" url:"square_image,omitempty"` + // The color of this integration used for buttons and text throughout the app and landing pages. Choose a darker, saturated color. + Color *string `json:"color,omitempty" url:"color,omitempty"` + Slug *string `json:"slug,omitempty" url:"slug,omitempty"` + // Mapping of API endpoints to documentation urls for support. Example: {'GET': [['/common-model-scopes', 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], 'POST': []} + ApiEndpointsToDocumentationUrls map[string]interface{} `json:"api_endpoints_to_documentation_urls,omitempty" url:"api_endpoints_to_documentation_urls,omitempty"` + // Setup guide URL for third party webhook creation. Exposed in Merge Docs. + WebhookSetupGuideUrl *string `json:"webhook_setup_guide_url,omitempty" url:"webhook_setup_guide_url,omitempty"` + // Category or categories this integration is in beta status for. + CategoryBetaStatus map[string]interface{} `json:"category_beta_status,omitempty" url:"category_beta_status,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (a *AccountDetails) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(a); err == nil { - return value +func (a *AccountIntegration) GetName() string { + if a == nil { + return "" } - return fmt.Sprintf("%#v", a) + return a.Name } -// # The LinkedAccount Object -// -// ### Description -// -// The `LinkedAccount` object is used to represent an end user's link with a specific integration. -// -// ### Usage Example -// -// View a list of your organization's `LinkedAccount` objects. -type AccountDetailsAndActions struct { - Id string `json:"id"` - Category *CategoryEnum `json:"category,omitempty"` - Status AccountDetailsAndActionsStatusEnum `json:"status,omitempty"` - StatusDetail *string `json:"status_detail,omitempty"` - EndUserOriginId *string `json:"end_user_origin_id,omitempty"` - EndUserOrganizationName string `json:"end_user_organization_name"` - EndUserEmailAddress string `json:"end_user_email_address"` - // The tenant or domain the customer has provided access to. - Subdomain *string `json:"subdomain,omitempty"` - WebhookListenerUrl string `json:"webhook_listener_url"` - // 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. - IsDuplicate *bool `json:"is_duplicate,omitempty"` - Integration *AccountDetailsAndActionsIntegration `json:"integration,omitempty"` - AccountType string `json:"account_type"` - CompletedAt time.Time `json:"completed_at"` - - _rawJSON json.RawMessage -} - -func (a *AccountDetailsAndActions) UnmarshalJSON(data []byte) error { - type unmarshaler AccountDetailsAndActions - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (a *AccountIntegration) GetAbbreviatedName() *string { + if a == nil { + return nil } - *a = AccountDetailsAndActions(value) - a._rawJSON = json.RawMessage(data) - return nil + return a.AbbreviatedName } -func (a *AccountDetailsAndActions) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(a); err == nil { - return value +func (a *AccountIntegration) GetCategories() []CategoriesEnum { + if a == nil { + return nil } - return fmt.Sprintf("%#v", a) + return a.Categories } -type AccountDetailsAndActionsIntegration struct { - Name string `json:"name"` - Categories []CategoriesEnum `json:"categories,omitempty"` - Image *string `json:"image,omitempty"` - SquareImage *string `json:"square_image,omitempty"` - Color string `json:"color"` - Slug string `json:"slug"` - PassthroughAvailable bool `json:"passthrough_available"` - AvailableModelOperations []*ModelOperation `json:"available_model_operations,omitempty"` - - _rawJSON json.RawMessage +func (a *AccountIntegration) GetImage() *string { + if a == nil { + return nil + } + return a.Image } -func (a *AccountDetailsAndActionsIntegration) UnmarshalJSON(data []byte) error { - type unmarshaler AccountDetailsAndActionsIntegration - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (a *AccountIntegration) GetSquareImage() *string { + if a == nil { + return nil } - *a = AccountDetailsAndActionsIntegration(value) - a._rawJSON = json.RawMessage(data) - return nil + return a.SquareImage } -func (a *AccountDetailsAndActionsIntegration) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(a); err == nil { - return value +func (a *AccountIntegration) GetColor() *string { + if a == nil { + return nil } - return fmt.Sprintf("%#v", a) + return a.Color } -// - `COMPLETE` - COMPLETE -// - `INCOMPLETE` - INCOMPLETE -// - `RELINK_NEEDED` - RELINK_NEEDED -// - `IDLE` - IDLE -type AccountDetailsAndActionsStatusEnum string - -const ( - AccountDetailsAndActionsStatusEnumComplete AccountDetailsAndActionsStatusEnum = "COMPLETE" - AccountDetailsAndActionsStatusEnumIncomplete AccountDetailsAndActionsStatusEnum = "INCOMPLETE" - AccountDetailsAndActionsStatusEnumRelinkNeeded AccountDetailsAndActionsStatusEnum = "RELINK_NEEDED" - AccountDetailsAndActionsStatusEnumIdle AccountDetailsAndActionsStatusEnum = "IDLE" -) +func (a *AccountIntegration) GetSlug() *string { + if a == nil { + return nil + } + return a.Slug +} -func NewAccountDetailsAndActionsStatusEnumFromString(s string) (AccountDetailsAndActionsStatusEnum, error) { - switch s { - case "COMPLETE": - return AccountDetailsAndActionsStatusEnumComplete, nil - case "INCOMPLETE": - return AccountDetailsAndActionsStatusEnumIncomplete, nil - case "RELINK_NEEDED": - return AccountDetailsAndActionsStatusEnumRelinkNeeded, nil - case "IDLE": - return AccountDetailsAndActionsStatusEnumIdle, nil - } - var t AccountDetailsAndActionsStatusEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) +func (a *AccountIntegration) GetApiEndpointsToDocumentationUrls() map[string]interface{} { + if a == nil { + return nil + } + return a.ApiEndpointsToDocumentationUrls } -func (a AccountDetailsAndActionsStatusEnum) Ptr() *AccountDetailsAndActionsStatusEnum { - return &a +func (a *AccountIntegration) GetWebhookSetupGuideUrl() *string { + if a == nil { + return nil + } + return a.WebhookSetupGuideUrl } -type AccountIntegration struct { - // Company name. - Name string `json:"name"` - // Optional. This shortened name appears in places with limited space, usually in conjunction with the platform's logo (e.g., Merge Link menu).

Example: Workforce Now (in lieu of ADP Workforce Now), SuccessFactors (in lieu of SAP SuccessFactors) - AbbreviatedName *string `json:"abbreviated_name,omitempty"` - // Category or categories this integration belongs to. Multiple categories should be comma separated, i.e. [ats, hris]. - Categories []CategoriesEnum `json:"categories,omitempty"` - // Company logo in rectangular shape. - Image *string `json:"image,omitempty"` - // Company logo in square shape. - SquareImage *string `json:"square_image,omitempty"` - // The color of this integration used for buttons and text throughout the app and landing pages. Choose a darker, saturated color. - Color *string `json:"color,omitempty"` - Slug *string `json:"slug,omitempty"` - // Mapping of API endpoints to documentation urls for support. Example: {'GET': [['/common-model-scopes', 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], 'POST': []} - ApiEndpointsToDocumentationUrls map[string]interface{} `json:"api_endpoints_to_documentation_urls,omitempty"` - // Setup guide URL for third party webhook creation. Exposed in Merge Docs. - WebhookSetupGuideUrl *string `json:"webhook_setup_guide_url,omitempty"` - // Category or categories this integration is in beta status for. - CategoryBetaStatus map[string]interface{} `json:"category_beta_status,omitempty"` +func (a *AccountIntegration) GetCategoryBetaStatus() map[string]interface{} { + if a == nil { + return nil + } + return a.CategoryBetaStatus +} - _rawJSON json.RawMessage +func (a *AccountIntegration) GetExtraProperties() map[string]interface{} { + return a.extraProperties } func (a *AccountIntegration) UnmarshalJSON(data []byte) error { @@ -202,1226 +115,518 @@ func (a *AccountIntegration) UnmarshalJSON(data []byte) error { return err } *a = AccountIntegration(value) - a._rawJSON = json.RawMessage(data) - return nil -} - -func (a *AccountIntegration) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(a); err == nil { - return value - } - return fmt.Sprintf("%#v", a) -} - -type AccountToken struct { - AccountToken string `json:"account_token"` - Integration *AccountIntegration `json:"integration,omitempty"` - - _rawJSON json.RawMessage -} - -func (a *AccountToken) UnmarshalJSON(data []byte) error { - type unmarshaler AccountToken - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { return err } - *a = AccountToken(value) - a._rawJSON = json.RawMessage(data) + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) return nil } -func (a *AccountToken) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { +func (a *AccountIntegration) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(a); err == nil { + if value, err := internal.StringifyJSON(a); err == nil { return value } return fmt.Sprintf("%#v", a) } -// - `SAVINGS` - SAVINGS -// - `CHECKING` - CHECKING -type AccountTypeEnum string +// * `hris` - hris +// * `ats` - ats +// * `accounting` - accounting +// * `ticketing` - ticketing +// * `crm` - crm +// * `mktg` - mktg +// * `filestorage` - filestorage +type CategoriesEnum string const ( - AccountTypeEnumSavings AccountTypeEnum = "SAVINGS" - AccountTypeEnumChecking AccountTypeEnum = "CHECKING" + CategoriesEnumHris CategoriesEnum = "hris" + CategoriesEnumAts CategoriesEnum = "ats" + CategoriesEnumAccounting CategoriesEnum = "accounting" + CategoriesEnumTicketing CategoriesEnum = "ticketing" + CategoriesEnumCrm CategoriesEnum = "crm" + CategoriesEnumMktg CategoriesEnum = "mktg" + CategoriesEnumFilestorage CategoriesEnum = "filestorage" ) -func NewAccountTypeEnumFromString(s string) (AccountTypeEnum, error) { +func NewCategoriesEnumFromString(s string) (CategoriesEnum, error) { switch s { - case "SAVINGS": - return AccountTypeEnumSavings, nil - case "CHECKING": - return AccountTypeEnumChecking, nil + case "hris": + return CategoriesEnumHris, nil + case "ats": + return CategoriesEnumAts, nil + case "accounting": + return CategoriesEnumAccounting, nil + case "ticketing": + return CategoriesEnumTicketing, nil + case "crm": + return CategoriesEnumCrm, nil + case "mktg": + return CategoriesEnumMktg, nil + case "filestorage": + return CategoriesEnumFilestorage, nil } - var t AccountTypeEnum + var t CategoriesEnum return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (a AccountTypeEnum) Ptr() *AccountTypeEnum { - return &a +func (c CategoriesEnum) Ptr() *CategoriesEnum { + return &c } -type AdvancedMetadata struct { - Id string `json:"id"` - DisplayName *string `json:"display_name,omitempty"` - Description *string `json:"description,omitempty"` - IsRequired *bool `json:"is_required,omitempty"` - IsCustom *bool `json:"is_custom,omitempty"` - FieldChoices []interface{} `json:"field_choices,omitempty"` +// * `hris` - hris +// * `ats` - ats +// * `accounting` - accounting +// * `ticketing` - ticketing +// * `crm` - crm +// * `mktg` - mktg +// * `filestorage` - filestorage +type CategoryEnum string - _rawJSON json.RawMessage -} +const ( + CategoryEnumHris CategoryEnum = "hris" + CategoryEnumAts CategoryEnum = "ats" + CategoryEnumAccounting CategoryEnum = "accounting" + CategoryEnumTicketing CategoryEnum = "ticketing" + CategoryEnumCrm CategoryEnum = "crm" + CategoryEnumMktg CategoryEnum = "mktg" + CategoryEnumFilestorage CategoryEnum = "filestorage" +) -func (a *AdvancedMetadata) UnmarshalJSON(data []byte) error { - type unmarshaler AdvancedMetadata - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func NewCategoryEnumFromString(s string) (CategoryEnum, error) { + switch s { + case "hris": + return CategoryEnumHris, nil + case "ats": + return CategoryEnumAts, nil + case "accounting": + return CategoryEnumAccounting, nil + case "ticketing": + return CategoryEnumTicketing, nil + case "crm": + return CategoryEnumCrm, nil + case "mktg": + return CategoryEnumMktg, nil + case "filestorage": + return CategoryEnumFilestorage, nil } - *a = AdvancedMetadata(value) - a._rawJSON = json.RawMessage(data) - return nil + var t CategoryEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (a *AdvancedMetadata) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(a); err == nil { - return value - } - return fmt.Sprintf("%#v", a) +func (c CategoryEnum) Ptr() *CategoryEnum { + return &c } -type AsyncPassthroughReciept struct { - AsyncPassthroughReceiptId string `json:"async_passthrough_receipt_id"` +// # The Company Object +// ### Description +// The `Company` object is used to represent a company within the HRIS / Payroll system. +// +// ### Usage Example +// Fetch from the `LIST Companies` endpoint and filter by `ID` to show all companies. +type Company struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The company's legal name. + LegalName *string `json:"legal_name,omitempty" url:"legal_name,omitempty"` + // The company's display name. + DisplayName *string `json:"display_name,omitempty" url:"display_name,omitempty"` + // The company's Employer Identification Numbers. + Eins []*string `json:"eins,omitempty" url:"eins,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (a *AsyncPassthroughReciept) UnmarshalJSON(data []byte) error { - type unmarshaler AsyncPassthroughReciept - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (c *Company) GetId() *string { + if c == nil { + return nil } - *a = AsyncPassthroughReciept(value) - a._rawJSON = json.RawMessage(data) - return nil + return c.Id } -func (a *AsyncPassthroughReciept) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(a); err == nil { - return value +func (c *Company) GetRemoteId() *string { + if c == nil { + return nil } - return fmt.Sprintf("%#v", a) + return c.RemoteId } -type AuditLogEvent struct { - Id *string `json:"id,omitempty"` - // The User's full name at the time of this Event occurring. - UserName *string `json:"user_name,omitempty"` - // The User's email at the time of this Event occurring. - UserEmail *string `json:"user_email,omitempty"` - // Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. - // - // - `ADMIN` - ADMIN - // - `DEVELOPER` - DEVELOPER - // - `MEMBER` - MEMBER - // - `API` - API - // - `SYSTEM` - SYSTEM - // - `MERGE_TEAM` - MERGE_TEAM - Role *AuditLogEventRole `json:"role,omitempty"` - IpAddress string `json:"ip_address"` - // Designates the type of event that occurred. - // - // - `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY - // - `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY - // - `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY - // - `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY - // - `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY - // - `INVITED_USER` - INVITED_USER - // - `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED - // - `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED - // - `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT - // - `CREATED_DESTINATION` - CREATED_DESTINATION - // - `DELETED_DESTINATION` - DELETED_DESTINATION - // - `CHANGED_DESTINATION` - CHANGED_DESTINATION - // - `CHANGED_SCOPES` - CHANGED_SCOPES - // - `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION - // - `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS - // - `ENABLED_INTEGRATION` - ENABLED_INTEGRATION - // - `DISABLED_INTEGRATION` - DISABLED_INTEGRATION - // - `ENABLED_CATEGORY` - ENABLED_CATEGORY - // - `DISABLED_CATEGORY` - DISABLED_CATEGORY - // - `CHANGED_PASSWORD` - CHANGED_PASSWORD - // - `RESET_PASSWORD` - RESET_PASSWORD - // - `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - // - `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - // - `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - // - `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - // - `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING - // - `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING - // - `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING - // - `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 - // - `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - // - `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - // - `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - // - `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC - // - `MUTED_ISSUE` - MUTED_ISSUE - // - `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK - // - `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK - // - `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK - // - `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED - // - `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED - EventType *AuditLogEventEventType `json:"event_type,omitempty"` - EventDescription string `json:"event_description"` - CreatedAt *time.Time `json:"created_at,omitempty"` - - _rawJSON json.RawMessage -} - -func (a *AuditLogEvent) UnmarshalJSON(data []byte) error { - type unmarshaler AuditLogEvent - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (c *Company) GetCreatedAt() *time.Time { + if c == nil { + return nil } - *a = AuditLogEvent(value) - a._rawJSON = json.RawMessage(data) - return nil + return c.CreatedAt } -func (a *AuditLogEvent) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(a); err == nil { - return value +func (c *Company) GetModifiedAt() *time.Time { + if c == nil { + return nil } - return fmt.Sprintf("%#v", a) -} - -// Designates the type of event that occurred. -// -// - `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY -// - `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY -// - `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY -// - `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY -// - `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY -// - `INVITED_USER` - INVITED_USER -// - `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED -// - `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED -// - `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT -// - `CREATED_DESTINATION` - CREATED_DESTINATION -// - `DELETED_DESTINATION` - DELETED_DESTINATION -// - `CHANGED_DESTINATION` - CHANGED_DESTINATION -// - `CHANGED_SCOPES` - CHANGED_SCOPES -// - `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION -// - `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS -// - `ENABLED_INTEGRATION` - ENABLED_INTEGRATION -// - `DISABLED_INTEGRATION` - DISABLED_INTEGRATION -// - `ENABLED_CATEGORY` - ENABLED_CATEGORY -// - `DISABLED_CATEGORY` - DISABLED_CATEGORY -// - `CHANGED_PASSWORD` - CHANGED_PASSWORD -// - `RESET_PASSWORD` - RESET_PASSWORD -// - `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION -// - `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT -// - `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION -// - `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT -// - `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING -// - `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING -// - `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING -// - `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 -// - `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE -// - `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE -// - `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE -// - `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC -// - `MUTED_ISSUE` - MUTED_ISSUE -// - `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK -// - `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK -// - `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK -// - `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED -// - `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED -type AuditLogEventEventType struct { - typeName string - EventTypeEnum EventTypeEnum - String string -} - -func NewAuditLogEventEventTypeFromEventTypeEnum(value EventTypeEnum) *AuditLogEventEventType { - return &AuditLogEventEventType{typeName: "eventTypeEnum", EventTypeEnum: value} -} - -func NewAuditLogEventEventTypeFromString(value string) *AuditLogEventEventType { - return &AuditLogEventEventType{typeName: "string", String: value} + return c.ModifiedAt } -func (a *AuditLogEventEventType) UnmarshalJSON(data []byte) error { - var valueEventTypeEnum EventTypeEnum - if err := json.Unmarshal(data, &valueEventTypeEnum); err == nil { - a.typeName = "eventTypeEnum" - a.EventTypeEnum = valueEventTypeEnum +func (c *Company) GetLegalName() *string { + if c == nil { return nil } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" - a.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, a) + return c.LegalName } -func (a AuditLogEventEventType) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "eventTypeEnum": - return json.Marshal(a.EventTypeEnum) - case "string": - return json.Marshal(a.String) +func (c *Company) GetDisplayName() *string { + if c == nil { + return nil } + return c.DisplayName } -type AuditLogEventEventTypeVisitor interface { - VisitEventTypeEnum(EventTypeEnum) error - VisitString(string) error -} - -func (a *AuditLogEventEventType) Accept(visitor AuditLogEventEventTypeVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "eventTypeEnum": - return visitor.VisitEventTypeEnum(a.EventTypeEnum) - case "string": - return visitor.VisitString(a.String) +func (c *Company) GetEins() []*string { + if c == nil { + return nil } + return c.Eins } -// Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. -// -// - `ADMIN` - ADMIN -// - `DEVELOPER` - DEVELOPER -// - `MEMBER` - MEMBER -// - `API` - API -// - `SYSTEM` - SYSTEM -// - `MERGE_TEAM` - MERGE_TEAM -type AuditLogEventRole struct { - typeName string - RoleEnum RoleEnum - String string -} - -func NewAuditLogEventRoleFromRoleEnum(value RoleEnum) *AuditLogEventRole { - return &AuditLogEventRole{typeName: "roleEnum", RoleEnum: value} -} - -func NewAuditLogEventRoleFromString(value string) *AuditLogEventRole { - return &AuditLogEventRole{typeName: "string", String: value} -} - -func (a *AuditLogEventRole) UnmarshalJSON(data []byte) error { - var valueRoleEnum RoleEnum - if err := json.Unmarshal(data, &valueRoleEnum); err == nil { - a.typeName = "roleEnum" - a.RoleEnum = valueRoleEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" - a.String = valueString +func (c *Company) GetRemoteWasDeleted() *bool { + if c == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, a) + return c.RemoteWasDeleted } -func (a AuditLogEventRole) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "roleEnum": - return json.Marshal(a.RoleEnum) - case "string": - return json.Marshal(a.String) +func (c *Company) GetFieldMappings() map[string]interface{} { + if c == nil { + return nil } + return c.FieldMappings } -type AuditLogEventRoleVisitor interface { - VisitRoleEnum(RoleEnum) error - VisitString(string) error -} - -func (a *AuditLogEventRole) Accept(visitor AuditLogEventRoleVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "roleEnum": - return visitor.VisitRoleEnum(a.RoleEnum) - case "string": - return visitor.VisitString(a.String) +func (c *Company) GetRemoteData() []*RemoteData { + if c == nil { + return nil } + return c.RemoteData } -// # The AvailableActions Object -// -// ### Description -// -// The `Activity` object is used to see all available model/operation combinations for an integration. -// -// ### Usage Example -// -// Fetch all the actions available for the `Zenefits` integration. -type AvailableActions struct { - Integration *AccountIntegration `json:"integration,omitempty"` - PassthroughAvailable bool `json:"passthrough_available"` - AvailableModelOperations []*ModelOperation `json:"available_model_operations,omitempty"` - - _rawJSON json.RawMessage +func (c *Company) GetExtraProperties() map[string]interface{} { + return c.extraProperties } -func (a *AvailableActions) UnmarshalJSON(data []byte) error { - type unmarshaler AvailableActions - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { +func (c *Company) UnmarshalJSON(data []byte) error { + type embed Company + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*c), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { return err } - *a = AvailableActions(value) - a._rawJSON = json.RawMessage(data) + *c = Company(unmarshaler.embed) + c.CreatedAt = unmarshaler.CreatedAt.TimePtr() + c.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *c) + if err != nil { + return err + } + c.extraProperties = extraProperties + c.rawJSON = json.RawMessage(data) return nil } -func (a *AvailableActions) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { +func (c *Company) MarshalJSON() ([]byte, error) { + type embed Company + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*c), + CreatedAt: internal.NewOptionalDateTime(c.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(c.ModifiedAt), + } + return json.Marshal(marshaler) +} + +func (c *Company) String() string { + if len(c.rawJSON) > 0 { + if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(a); err == nil { + if value, err := internal.StringifyJSON(c); err == nil { return value } - return fmt.Sprintf("%#v", a) + return fmt.Sprintf("%#v", c) } -// # The BankInfo Object -// -// ### Description -// -// The `BankInfo` object is used to represent the Bank Account information for an Employee. -// -// ### Usage Example -// -// Fetch from the `LIST BankInfo` endpoint and filter by `ID` to show all bank information. -type BankInfo struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The employee with this bank account. - Employee *BankInfoEmployee `json:"employee,omitempty"` - // The account number. - AccountNumber *string `json:"account_number,omitempty"` - // The routing number. - RoutingNumber *string `json:"routing_number,omitempty"` - // The bank name. - BankName *string `json:"bank_name,omitempty"` - // The bank account type - // - // - `SAVINGS` - SAVINGS - // - `CHECKING` - CHECKING - AccountType *BankInfoAccountType `json:"account_type,omitempty"` - // When the matching bank object was created in the third party system. - RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` - - _rawJSON json.RawMessage -} - -func (b *BankInfo) UnmarshalJSON(data []byte) error { - type unmarshaler BankInfo - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *b = BankInfo(value) - b._rawJSON = json.RawMessage(data) - return nil -} - -func (b *BankInfo) String() string { - if len(b._rawJSON) > 0 { - if value, err := core.StringifyJSON(b._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(b); err == nil { - return value - } - return fmt.Sprintf("%#v", b) -} - -// The bank account type -// -// - `SAVINGS` - SAVINGS -// - `CHECKING` - CHECKING -type BankInfoAccountType struct { - typeName string - AccountTypeEnum AccountTypeEnum - String string -} - -func NewBankInfoAccountTypeFromAccountTypeEnum(value AccountTypeEnum) *BankInfoAccountType { - return &BankInfoAccountType{typeName: "accountTypeEnum", AccountTypeEnum: value} -} - -func NewBankInfoAccountTypeFromString(value string) *BankInfoAccountType { - return &BankInfoAccountType{typeName: "string", String: value} -} - -func (b *BankInfoAccountType) UnmarshalJSON(data []byte) error { - var valueAccountTypeEnum AccountTypeEnum - if err := json.Unmarshal(data, &valueAccountTypeEnum); err == nil { - b.typeName = "accountTypeEnum" - b.AccountTypeEnum = valueAccountTypeEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - b.typeName = "string" - b.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, b) -} - -func (b BankInfoAccountType) MarshalJSON() ([]byte, error) { - switch b.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", b.typeName, b) - case "accountTypeEnum": - return json.Marshal(b.AccountTypeEnum) - case "string": - return json.Marshal(b.String) - } -} - -type BankInfoAccountTypeVisitor interface { - VisitAccountTypeEnum(AccountTypeEnum) error - VisitString(string) error -} - -func (b *BankInfoAccountType) Accept(visitor BankInfoAccountTypeVisitor) error { - switch b.typeName { - default: - return fmt.Errorf("invalid type %s in %T", b.typeName, b) - case "accountTypeEnum": - return visitor.VisitAccountTypeEnum(b.AccountTypeEnum) - case "string": - return visitor.VisitString(b.String) - } -} - -// The employee with this bank account. -type BankInfoEmployee struct { - typeName string - String string - Employee *Employee -} - -func NewBankInfoEmployeeFromString(value string) *BankInfoEmployee { - return &BankInfoEmployee{typeName: "string", String: value} -} - -func NewBankInfoEmployeeFromEmployee(value *Employee) *BankInfoEmployee { - return &BankInfoEmployee{typeName: "employee", Employee: value} -} - -func (b *BankInfoEmployee) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - b.typeName = "string" - b.String = valueString - return nil - } - valueEmployee := new(Employee) - if err := json.Unmarshal(data, &valueEmployee); err == nil { - b.typeName = "employee" - b.Employee = valueEmployee - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, b) -} - -func (b BankInfoEmployee) MarshalJSON() ([]byte, error) { - switch b.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", b.typeName, b) - case "string": - return json.Marshal(b.String) - case "employee": - return json.Marshal(b.Employee) - } -} - -type BankInfoEmployeeVisitor interface { - VisitString(string) error - VisitEmployee(*Employee) error -} - -func (b *BankInfoEmployee) Accept(visitor BankInfoEmployeeVisitor) error { - switch b.typeName { - default: - return fmt.Errorf("invalid type %s in %T", b.typeName, b) - case "string": - return visitor.VisitString(b.String) - case "employee": - return visitor.VisitEmployee(b.Employee) - } -} - -// # The Benefit Object -// -// ### Description -// -// The `Benefit` object is used to represent a benefit that an employee has enrolled in. -// -// ### Usage Example -// -// Fetch from the `LIST Benefits` endpoint and filter by `ID` to show all benefits. -type Benefit struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The employee on the plan. - Employee *BenefitEmployee `json:"employee,omitempty"` - // The name of the benefit provider. - ProviderName *string `json:"provider_name,omitempty"` - // The type of benefit plan - BenefitPlanType *string `json:"benefit_plan_type,omitempty"` - // The employee's contribution. - EmployeeContribution *float64 `json:"employee_contribution,omitempty"` - // The company's contribution. - CompanyContribution *float64 `json:"company_contribution,omitempty"` - // The day and time the benefit started. - StartDate *time.Time `json:"start_date,omitempty"` - // The day and time the benefit ended. - EndDate *time.Time `json:"end_date,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - // The employer benefit plan the employee is enrolled in. - EmployerBenefit *string `json:"employer_benefit,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` - - _rawJSON json.RawMessage -} - -func (b *Benefit) UnmarshalJSON(data []byte) error { - type unmarshaler Benefit - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *b = Benefit(value) - b._rawJSON = json.RawMessage(data) - return nil -} - -func (b *Benefit) String() string { - if len(b._rawJSON) > 0 { - if value, err := core.StringifyJSON(b._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(b); err == nil { - return value - } - return fmt.Sprintf("%#v", b) -} - -// The employee on the plan. -type BenefitEmployee struct { - typeName string - String string - Employee *Employee -} - -func NewBenefitEmployeeFromString(value string) *BenefitEmployee { - return &BenefitEmployee{typeName: "string", String: value} -} - -func NewBenefitEmployeeFromEmployee(value *Employee) *BenefitEmployee { - return &BenefitEmployee{typeName: "employee", Employee: value} -} - -func (b *BenefitEmployee) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - b.typeName = "string" - b.String = valueString - return nil - } - valueEmployee := new(Employee) - if err := json.Unmarshal(data, &valueEmployee); err == nil { - b.typeName = "employee" - b.Employee = valueEmployee - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, b) -} - -func (b BenefitEmployee) MarshalJSON() ([]byte, error) { - switch b.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", b.typeName, b) - case "string": - return json.Marshal(b.String) - case "employee": - return json.Marshal(b.Employee) - } -} - -type BenefitEmployeeVisitor interface { - VisitString(string) error - VisitEmployee(*Employee) error -} - -func (b *BenefitEmployee) Accept(visitor BenefitEmployeeVisitor) error { - switch b.typeName { - default: - return fmt.Errorf("invalid type %s in %T", b.typeName, b) - case "string": - return visitor.VisitString(b.String) - case "employee": - return visitor.VisitEmployee(b.Employee) - } -} - -// - `MEDICAL` - MEDICAL -// - `HEALTH_SAVINGS` - HEALTH_SAVINGS -// - `INSURANCE` - INSURANCE -// - `RETIREMENT` - RETIREMENT -// - `OTHER` - OTHER -type BenefitPlanTypeEnum string - -const ( - BenefitPlanTypeEnumMedical BenefitPlanTypeEnum = "MEDICAL" - BenefitPlanTypeEnumHealthSavings BenefitPlanTypeEnum = "HEALTH_SAVINGS" - BenefitPlanTypeEnumInsurance BenefitPlanTypeEnum = "INSURANCE" - BenefitPlanTypeEnumRetirement BenefitPlanTypeEnum = "RETIREMENT" - BenefitPlanTypeEnumOther BenefitPlanTypeEnum = "OTHER" -) - -func NewBenefitPlanTypeEnumFromString(s string) (BenefitPlanTypeEnum, error) { - switch s { - case "MEDICAL": - return BenefitPlanTypeEnumMedical, nil - case "HEALTH_SAVINGS": - return BenefitPlanTypeEnumHealthSavings, nil - case "INSURANCE": - return BenefitPlanTypeEnumInsurance, nil - case "RETIREMENT": - return BenefitPlanTypeEnumRetirement, nil - case "OTHER": - return BenefitPlanTypeEnumOther, nil - } - var t BenefitPlanTypeEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (b BenefitPlanTypeEnum) Ptr() *BenefitPlanTypeEnum { - return &b -} - -// - `hris` - hris -// - `ats` - ats -// - `accounting` - accounting -// - `ticketing` - ticketing -// - `crm` - crm -// - `mktg` - mktg -// - `filestorage` - filestorage -type CategoriesEnum string - -const ( - CategoriesEnumHris CategoriesEnum = "hris" - CategoriesEnumAts CategoriesEnum = "ats" - CategoriesEnumAccounting CategoriesEnum = "accounting" - CategoriesEnumTicketing CategoriesEnum = "ticketing" - CategoriesEnumCrm CategoriesEnum = "crm" - CategoriesEnumMktg CategoriesEnum = "mktg" - CategoriesEnumFilestorage CategoriesEnum = "filestorage" -) - -func NewCategoriesEnumFromString(s string) (CategoriesEnum, error) { - switch s { - case "hris": - return CategoriesEnumHris, nil - case "ats": - return CategoriesEnumAts, nil - case "accounting": - return CategoriesEnumAccounting, nil - case "ticketing": - return CategoriesEnumTicketing, nil - case "crm": - return CategoriesEnumCrm, nil - case "mktg": - return CategoriesEnumMktg, nil - case "filestorage": - return CategoriesEnumFilestorage, nil - } - var t CategoriesEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (c CategoriesEnum) Ptr() *CategoriesEnum { - return &c -} - -// - `hris` - hris -// - `ats` - ats -// - `accounting` - accounting -// - `ticketing` - ticketing -// - `crm` - crm -// - `mktg` - mktg -// - `filestorage` - filestorage -type CategoryEnum string - -const ( - CategoryEnumHris CategoryEnum = "hris" - CategoryEnumAts CategoryEnum = "ats" - CategoryEnumAccounting CategoryEnum = "accounting" - CategoryEnumTicketing CategoryEnum = "ticketing" - CategoryEnumCrm CategoryEnum = "crm" - CategoryEnumMktg CategoryEnum = "mktg" - CategoryEnumFilestorage CategoryEnum = "filestorage" -) - -func NewCategoryEnumFromString(s string) (CategoryEnum, error) { - switch s { - case "hris": - return CategoryEnumHris, nil - case "ats": - return CategoryEnumAts, nil - case "accounting": - return CategoryEnumAccounting, nil - case "ticketing": - return CategoryEnumTicketing, nil - case "crm": - return CategoryEnumCrm, nil - case "mktg": - return CategoryEnumMktg, nil - case "filestorage": - return CategoryEnumFilestorage, nil - } - var t CategoryEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (c CategoryEnum) Ptr() *CategoryEnum { - return &c -} - -type CommonModelScopeApi struct { - // The common models you want to update the scopes for - CommonModels []*IndividualCommonModelScopeDeserializer `json:"common_models,omitempty"` - - _rawJSON json.RawMessage -} - -func (c *CommonModelScopeApi) UnmarshalJSON(data []byte) error { - type unmarshaler CommonModelScopeApi - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *c = CommonModelScopeApi(value) - c._rawJSON = json.RawMessage(data) - return nil -} - -func (c *CommonModelScopeApi) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(c); err == nil { - return value - } - return fmt.Sprintf("%#v", c) -} - -type CommonModelScopesBodyRequest struct { - ModelId string `json:"model_id"` - EnabledActions []EnabledActionsEnum `json:"enabled_actions,omitempty"` - DisabledFields []string `json:"disabled_fields,omitempty"` - - _rawJSON json.RawMessage -} - -func (c *CommonModelScopesBodyRequest) UnmarshalJSON(data []byte) error { - type unmarshaler CommonModelScopesBodyRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *c = CommonModelScopesBodyRequest(value) - c._rawJSON = json.RawMessage(data) - return nil -} - -func (c *CommonModelScopesBodyRequest) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(c); err == nil { - return value - } - return fmt.Sprintf("%#v", c) -} - -// # The Company Object -// -// ### Description -// -// The `Company` object is used to represent a company within the HRIS / Payroll system. -// -// ### Usage Example -// -// Fetch from the `LIST Companies` endpoint and filter by `ID` to show all companies. -type Company struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The company's legal name. - LegalName *string `json:"legal_name,omitempty"` - // The company's display name. - DisplayName *string `json:"display_name,omitempty"` - // The company's Employer Identification Numbers. - Eins []*string `json:"eins,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` - - _rawJSON json.RawMessage -} - -func (c *Company) UnmarshalJSON(data []byte) error { - type unmarshaler Company - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *c = Company(value) - c._rawJSON = json.RawMessage(data) - return nil -} - -func (c *Company) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(c); err == nil { - return value - } - return fmt.Sprintf("%#v", c) -} - -// - `AF` - Afghanistan -// - `AX` - Åland Islands -// - `AL` - Albania -// - `DZ` - Algeria -// - `AS` - American Samoa -// - `AD` - Andorra -// - `AO` - Angola -// - `AI` - Anguilla -// - `AQ` - Antarctica -// - `AG` - Antigua and Barbuda -// - `AR` - Argentina -// - `AM` - Armenia -// - `AW` - Aruba -// - `AU` - Australia -// - `AT` - Austria -// - `AZ` - Azerbaijan -// - `BS` - Bahamas -// - `BH` - Bahrain -// - `BD` - Bangladesh -// - `BB` - Barbados -// - `BY` - Belarus -// - `BE` - Belgium -// - `BZ` - Belize -// - `BJ` - Benin -// - `BM` - Bermuda -// - `BT` - Bhutan -// - `BO` - Bolivia -// - `BQ` - Bonaire, Sint Eustatius and Saba -// - `BA` - Bosnia and Herzegovina -// - `BW` - Botswana -// - `BV` - Bouvet Island -// - `BR` - Brazil -// - `IO` - British Indian Ocean Territory -// - `BN` - Brunei -// - `BG` - Bulgaria -// - `BF` - Burkina Faso -// - `BI` - Burundi -// - `CV` - Cabo Verde -// - `KH` - Cambodia -// - `CM` - Cameroon -// - `CA` - Canada -// - `KY` - Cayman Islands -// - `CF` - Central African Republic -// - `TD` - Chad -// - `CL` - Chile -// - `CN` - China -// - `CX` - Christmas Island -// - `CC` - Cocos (Keeling) Islands -// - `CO` - Colombia -// - `KM` - Comoros -// - `CG` - Congo -// - `CD` - Congo (the Democratic Republic of the) -// - `CK` - Cook Islands -// - `CR` - Costa Rica -// - `CI` - Côte d'Ivoire -// - `HR` - Croatia -// - `CU` - Cuba -// - `CW` - Curaçao -// - `CY` - Cyprus -// - `CZ` - Czechia -// - `DK` - Denmark -// - `DJ` - Djibouti -// - `DM` - Dominica -// - `DO` - Dominican Republic -// - `EC` - Ecuador -// - `EG` - Egypt -// - `SV` - El Salvador -// - `GQ` - Equatorial Guinea -// - `ER` - Eritrea -// - `EE` - Estonia -// - `SZ` - Eswatini -// - `ET` - Ethiopia -// - `FK` - Falkland Islands (Malvinas) -// - `FO` - Faroe Islands -// - `FJ` - Fiji -// - `FI` - Finland -// - `FR` - France -// - `GF` - French Guiana -// - `PF` - French Polynesia -// - `TF` - French Southern Territories -// - `GA` - Gabon -// - `GM` - Gambia -// - `GE` - Georgia -// - `DE` - Germany -// - `GH` - Ghana -// - `GI` - Gibraltar -// - `GR` - Greece -// - `GL` - Greenland -// - `GD` - Grenada -// - `GP` - Guadeloupe -// - `GU` - Guam -// - `GT` - Guatemala -// - `GG` - Guernsey -// - `GN` - Guinea -// - `GW` - Guinea-Bissau -// - `GY` - Guyana -// - `HT` - Haiti -// - `HM` - Heard Island and McDonald Islands -// - `VA` - Holy See -// - `HN` - Honduras -// - `HK` - Hong Kong -// - `HU` - Hungary -// - `IS` - Iceland -// - `IN` - India -// - `ID` - Indonesia -// - `IR` - Iran -// - `IQ` - Iraq -// - `IE` - Ireland -// - `IM` - Isle of Man -// - `IL` - Israel -// - `IT` - Italy -// - `JM` - Jamaica -// - `JP` - Japan -// - `JE` - Jersey -// - `JO` - Jordan -// - `KZ` - Kazakhstan -// - `KE` - Kenya -// - `KI` - Kiribati -// - `KW` - Kuwait -// - `KG` - Kyrgyzstan -// - `LA` - Laos -// - `LV` - Latvia -// - `LB` - Lebanon -// - `LS` - Lesotho -// - `LR` - Liberia -// - `LY` - Libya -// - `LI` - Liechtenstein -// - `LT` - Lithuania -// - `LU` - Luxembourg -// - `MO` - Macao -// - `MG` - Madagascar -// - `MW` - Malawi -// - `MY` - Malaysia -// - `MV` - Maldives -// - `ML` - Mali -// - `MT` - Malta -// - `MH` - Marshall Islands -// - `MQ` - Martinique -// - `MR` - Mauritania -// - `MU` - Mauritius -// - `YT` - Mayotte -// - `MX` - Mexico -// - `FM` - Micronesia (Federated States of) -// - `MD` - Moldova -// - `MC` - Monaco -// - `MN` - Mongolia -// - `ME` - Montenegro -// - `MS` - Montserrat -// - `MA` - Morocco -// - `MZ` - Mozambique -// - `MM` - Myanmar -// - `NA` - Namibia -// - `NR` - Nauru -// - `NP` - Nepal -// - `NL` - Netherlands -// - `NC` - New Caledonia -// - `NZ` - New Zealand -// - `NI` - Nicaragua -// - `NE` - Niger -// - `NG` - Nigeria -// - `NU` - Niue -// - `NF` - Norfolk Island -// - `KP` - North Korea -// - `MK` - North Macedonia -// - `MP` - Northern Mariana Islands -// - `NO` - Norway -// - `OM` - Oman -// - `PK` - Pakistan -// - `PW` - Palau -// - `PS` - Palestine, State of -// - `PA` - Panama -// - `PG` - Papua New Guinea -// - `PY` - Paraguay -// - `PE` - Peru -// - `PH` - Philippines -// - `PN` - Pitcairn -// - `PL` - Poland -// - `PT` - Portugal -// - `PR` - Puerto Rico -// - `QA` - Qatar -// - `RE` - Réunion -// - `RO` - Romania -// - `RU` - Russia -// - `RW` - Rwanda -// - `BL` - Saint Barthélemy -// - `SH` - Saint Helena, Ascension and Tristan da Cunha -// - `KN` - Saint Kitts and Nevis -// - `LC` - Saint Lucia -// - `MF` - Saint Martin (French part) -// - `PM` - Saint Pierre and Miquelon -// - `VC` - Saint Vincent and the Grenadines -// - `WS` - Samoa -// - `SM` - San Marino -// - `ST` - Sao Tome and Principe -// - `SA` - Saudi Arabia -// - `SN` - Senegal -// - `RS` - Serbia -// - `SC` - Seychelles -// - `SL` - Sierra Leone -// - `SG` - Singapore -// - `SX` - Sint Maarten (Dutch part) -// - `SK` - Slovakia -// - `SI` - Slovenia -// - `SB` - Solomon Islands -// - `SO` - Somalia -// - `ZA` - South Africa -// - `GS` - South Georgia and the South Sandwich Islands -// - `KR` - South Korea -// - `SS` - South Sudan -// - `ES` - Spain -// - `LK` - Sri Lanka -// - `SD` - Sudan -// - `SR` - Suriname -// - `SJ` - Svalbard and Jan Mayen -// - `SE` - Sweden -// - `CH` - Switzerland -// - `SY` - Syria -// - `TW` - Taiwan -// - `TJ` - Tajikistan -// - `TZ` - Tanzania -// - `TH` - Thailand -// - `TL` - Timor-Leste -// - `TG` - Togo -// - `TK` - Tokelau -// - `TO` - Tonga -// - `TT` - Trinidad and Tobago -// - `TN` - Tunisia -// - `TR` - Turkey -// - `TM` - Turkmenistan -// - `TC` - Turks and Caicos Islands -// - `TV` - Tuvalu -// - `UG` - Uganda -// - `UA` - Ukraine -// - `AE` - United Arab Emirates -// - `GB` - United Kingdom -// - `UM` - United States Minor Outlying Islands -// - `US` - United States of America -// - `UY` - Uruguay -// - `UZ` - Uzbekistan -// - `VU` - Vanuatu -// - `VE` - Venezuela -// - `VN` - Vietnam -// - `VG` - Virgin Islands (British) -// - `VI` - Virgin Islands (U.S.) -// - `WF` - Wallis and Futuna -// - `EH` - Western Sahara -// - `YE` - Yemen -// - `ZM` - Zambia -// - `ZW` - Zimbabwe -type CountryEnum string +// * `AF` - Afghanistan +// * `AX` - Åland Islands +// * `AL` - Albania +// * `DZ` - Algeria +// * `AS` - American Samoa +// * `AD` - Andorra +// * `AO` - Angola +// * `AI` - Anguilla +// * `AQ` - Antarctica +// * `AG` - Antigua and Barbuda +// * `AR` - Argentina +// * `AM` - Armenia +// * `AW` - Aruba +// * `AU` - Australia +// * `AT` - Austria +// * `AZ` - Azerbaijan +// * `BS` - Bahamas +// * `BH` - Bahrain +// * `BD` - Bangladesh +// * `BB` - Barbados +// * `BY` - Belarus +// * `BE` - Belgium +// * `BZ` - Belize +// * `BJ` - Benin +// * `BM` - Bermuda +// * `BT` - Bhutan +// * `BO` - Bolivia +// * `BQ` - Bonaire, Sint Eustatius and Saba +// * `BA` - Bosnia and Herzegovina +// * `BW` - Botswana +// * `BV` - Bouvet Island +// * `BR` - Brazil +// * `IO` - British Indian Ocean Territory +// * `BN` - Brunei +// * `BG` - Bulgaria +// * `BF` - Burkina Faso +// * `BI` - Burundi +// * `CV` - Cabo Verde +// * `KH` - Cambodia +// * `CM` - Cameroon +// * `CA` - Canada +// * `KY` - Cayman Islands +// * `CF` - Central African Republic +// * `TD` - Chad +// * `CL` - Chile +// * `CN` - China +// * `CX` - Christmas Island +// * `CC` - Cocos (Keeling) Islands +// * `CO` - Colombia +// * `KM` - Comoros +// * `CG` - Congo +// * `CD` - Congo (the Democratic Republic of the) +// * `CK` - Cook Islands +// * `CR` - Costa Rica +// * `CI` - Côte d'Ivoire +// * `HR` - Croatia +// * `CU` - Cuba +// * `CW` - Curaçao +// * `CY` - Cyprus +// * `CZ` - Czechia +// * `DK` - Denmark +// * `DJ` - Djibouti +// * `DM` - Dominica +// * `DO` - Dominican Republic +// * `EC` - Ecuador +// * `EG` - Egypt +// * `SV` - El Salvador +// * `GQ` - Equatorial Guinea +// * `ER` - Eritrea +// * `EE` - Estonia +// * `SZ` - Eswatini +// * `ET` - Ethiopia +// * `FK` - Falkland Islands (Malvinas) +// * `FO` - Faroe Islands +// * `FJ` - Fiji +// * `FI` - Finland +// * `FR` - France +// * `GF` - French Guiana +// * `PF` - French Polynesia +// * `TF` - French Southern Territories +// * `GA` - Gabon +// * `GM` - Gambia +// * `GE` - Georgia +// * `DE` - Germany +// * `GH` - Ghana +// * `GI` - Gibraltar +// * `GR` - Greece +// * `GL` - Greenland +// * `GD` - Grenada +// * `GP` - Guadeloupe +// * `GU` - Guam +// * `GT` - Guatemala +// * `GG` - Guernsey +// * `GN` - Guinea +// * `GW` - Guinea-Bissau +// * `GY` - Guyana +// * `HT` - Haiti +// * `HM` - Heard Island and McDonald Islands +// * `VA` - Holy See +// * `HN` - Honduras +// * `HK` - Hong Kong +// * `HU` - Hungary +// * `IS` - Iceland +// * `IN` - India +// * `ID` - Indonesia +// * `IR` - Iran +// * `IQ` - Iraq +// * `IE` - Ireland +// * `IM` - Isle of Man +// * `IL` - Israel +// * `IT` - Italy +// * `JM` - Jamaica +// * `JP` - Japan +// * `JE` - Jersey +// * `JO` - Jordan +// * `KZ` - Kazakhstan +// * `KE` - Kenya +// * `KI` - Kiribati +// * `KW` - Kuwait +// * `KG` - Kyrgyzstan +// * `LA` - Laos +// * `LV` - Latvia +// * `LB` - Lebanon +// * `LS` - Lesotho +// * `LR` - Liberia +// * `LY` - Libya +// * `LI` - Liechtenstein +// * `LT` - Lithuania +// * `LU` - Luxembourg +// * `MO` - Macao +// * `MG` - Madagascar +// * `MW` - Malawi +// * `MY` - Malaysia +// * `MV` - Maldives +// * `ML` - Mali +// * `MT` - Malta +// * `MH` - Marshall Islands +// * `MQ` - Martinique +// * `MR` - Mauritania +// * `MU` - Mauritius +// * `YT` - Mayotte +// * `MX` - Mexico +// * `FM` - Micronesia (Federated States of) +// * `MD` - Moldova +// * `MC` - Monaco +// * `MN` - Mongolia +// * `ME` - Montenegro +// * `MS` - Montserrat +// * `MA` - Morocco +// * `MZ` - Mozambique +// * `MM` - Myanmar +// * `NA` - Namibia +// * `NR` - Nauru +// * `NP` - Nepal +// * `NL` - Netherlands +// * `NC` - New Caledonia +// * `NZ` - New Zealand +// * `NI` - Nicaragua +// * `NE` - Niger +// * `NG` - Nigeria +// * `NU` - Niue +// * `NF` - Norfolk Island +// * `KP` - North Korea +// * `MK` - North Macedonia +// * `MP` - Northern Mariana Islands +// * `NO` - Norway +// * `OM` - Oman +// * `PK` - Pakistan +// * `PW` - Palau +// * `PS` - Palestine, State of +// * `PA` - Panama +// * `PG` - Papua New Guinea +// * `PY` - Paraguay +// * `PE` - Peru +// * `PH` - Philippines +// * `PN` - Pitcairn +// * `PL` - Poland +// * `PT` - Portugal +// * `PR` - Puerto Rico +// * `QA` - Qatar +// * `RE` - Réunion +// * `RO` - Romania +// * `RU` - Russia +// * `RW` - Rwanda +// * `BL` - Saint Barthélemy +// * `SH` - Saint Helena, Ascension and Tristan da Cunha +// * `KN` - Saint Kitts and Nevis +// * `LC` - Saint Lucia +// * `MF` - Saint Martin (French part) +// * `PM` - Saint Pierre and Miquelon +// * `VC` - Saint Vincent and the Grenadines +// * `WS` - Samoa +// * `SM` - San Marino +// * `ST` - Sao Tome and Principe +// * `SA` - Saudi Arabia +// * `SN` - Senegal +// * `RS` - Serbia +// * `SC` - Seychelles +// * `SL` - Sierra Leone +// * `SG` - Singapore +// * `SX` - Sint Maarten (Dutch part) +// * `SK` - Slovakia +// * `SI` - Slovenia +// * `SB` - Solomon Islands +// * `SO` - Somalia +// * `ZA` - South Africa +// * `GS` - South Georgia and the South Sandwich Islands +// * `KR` - South Korea +// * `SS` - South Sudan +// * `ES` - Spain +// * `LK` - Sri Lanka +// * `SD` - Sudan +// * `SR` - Suriname +// * `SJ` - Svalbard and Jan Mayen +// * `SE` - Sweden +// * `CH` - Switzerland +// * `SY` - Syria +// * `TW` - Taiwan +// * `TJ` - Tajikistan +// * `TZ` - Tanzania +// * `TH` - Thailand +// * `TL` - Timor-Leste +// * `TG` - Togo +// * `TK` - Tokelau +// * `TO` - Tonga +// * `TT` - Trinidad and Tobago +// * `TN` - Tunisia +// * `TR` - Turkey +// * `TM` - Turkmenistan +// * `TC` - Turks and Caicos Islands +// * `TV` - Tuvalu +// * `UG` - Uganda +// * `UA` - Ukraine +// * `AE` - United Arab Emirates +// * `GB` - United Kingdom +// * `UM` - United States Minor Outlying Islands +// * `US` - United States of America +// * `UY` - Uruguay +// * `UZ` - Uzbekistan +// * `VU` - Vanuatu +// * `VE` - Venezuela +// * `VN` - Vietnam +// * `VG` - Virgin Islands (British) +// * `VI` - Virgin Islands (U.S.) +// * `WF` - Wallis and Futuna +// * `EH` - Western Sahara +// * `YE` - Yemen +// * `ZM` - Zambia +// * `ZW` - Zimbabwe +type CountryEnum string const ( CountryEnumAf CountryEnum = "AF" @@ -2185,31 +1390,89 @@ func (c CountryEnum) Ptr() *CountryEnum { } // # The DataPassthrough Object -// // ### Description -// // The `DataPassthrough` object is used to send information to an otherwise-unsupported third-party endpoint. // // ### Usage Example -// // Create a `DataPassthrough` to get team hierarchies from your Rippling integration. type DataPassthroughRequest struct { - Method MethodEnum `json:"method,omitempty"` + Method MethodEnum `json:"method" url:"method"` // The path of the request in the third party's platform. - Path string `json:"path"` + Path string `json:"path" url:"path"` // An optional override of the third party's base url for the request. - BaseUrlOverride *string `json:"base_url_override,omitempty"` + BaseUrlOverride *string `json:"base_url_override,omitempty" url:"base_url_override,omitempty"` // The data with the request. You must include a `request_format` parameter matching the data's format - Data *string `json:"data,omitempty"` + Data *string `json:"data,omitempty" url:"data,omitempty"` // Pass an array of `MultipartFormField` objects in here instead of using the `data` param if `request_format` is set to `MULTIPART`. - MultipartFormData []*MultipartFormFieldRequest `json:"multipart_form_data,omitempty"` + MultipartFormData []*MultipartFormFieldRequest `json:"multipart_form_data,omitempty" url:"multipart_form_data,omitempty"` // The headers to use for the request (Merge will handle the account's authorization headers). `Content-Type` header is required for passthrough. Choose content type corresponding to expected format of receiving server. - Headers map[string]interface{} `json:"headers,omitempty"` - RequestFormat *RequestFormatEnum `json:"request_format,omitempty"` + Headers map[string]interface{} `json:"headers,omitempty" url:"headers,omitempty"` + RequestFormat *RequestFormatEnum `json:"request_format,omitempty" url:"request_format,omitempty"` // Optional. If true, the response will always be an object of the form `{"type": T, "value": ...}` where `T` will be one of `string, boolean, number, null, array, object`. - NormalizeResponse *bool `json:"normalize_response,omitempty"` + NormalizeResponse *bool `json:"normalize_response,omitempty" url:"normalize_response,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (d *DataPassthroughRequest) GetMethod() MethodEnum { + if d == nil { + return "" + } + return d.Method +} + +func (d *DataPassthroughRequest) GetPath() string { + if d == nil { + return "" + } + return d.Path +} + +func (d *DataPassthroughRequest) GetBaseUrlOverride() *string { + if d == nil { + return nil + } + return d.BaseUrlOverride +} + +func (d *DataPassthroughRequest) GetData() *string { + if d == nil { + return nil + } + return d.Data +} + +func (d *DataPassthroughRequest) GetMultipartFormData() []*MultipartFormFieldRequest { + if d == nil { + return nil + } + return d.MultipartFormData +} + +func (d *DataPassthroughRequest) GetHeaders() map[string]interface{} { + if d == nil { + return nil + } + return d.Headers +} - _rawJSON json.RawMessage +func (d *DataPassthroughRequest) GetRequestFormat() *RequestFormatEnum { + if d == nil { + return nil + } + return d.RequestFormat +} + +func (d *DataPassthroughRequest) GetNormalizeResponse() *bool { + if d == nil { + return nil + } + return d.NormalizeResponse +} + +func (d *DataPassthroughRequest) GetExtraProperties() map[string]interface{} { + return d.extraProperties } func (d *DataPassthroughRequest) UnmarshalJSON(data []byte) error { @@ -2219,28 +1482,59 @@ func (d *DataPassthroughRequest) UnmarshalJSON(data []byte) error { return err } *d = DataPassthroughRequest(value) - d._rawJSON = json.RawMessage(data) + extraProperties, err := internal.ExtractExtraProperties(data, *d) + if err != nil { + return err + } + d.extraProperties = extraProperties + d.rawJSON = json.RawMessage(data) return nil } func (d *DataPassthroughRequest) String() string { - if len(d._rawJSON) > 0 { - if value, err := core.StringifyJSON(d._rawJSON); err == nil { + if len(d.rawJSON) > 0 { + if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(d); err == nil { + if value, err := internal.StringifyJSON(d); err == nil { return value } return fmt.Sprintf("%#v", d) } type DebugModeLog struct { - LogId string `json:"log_id"` - DashboardView string `json:"dashboard_view"` - LogSummary *DebugModelLogSummary `json:"log_summary,omitempty"` + LogId string `json:"log_id" url:"log_id"` + DashboardView string `json:"dashboard_view" url:"dashboard_view"` + LogSummary *DebugModelLogSummary `json:"log_summary" url:"log_summary"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (d *DebugModeLog) GetLogId() string { + if d == nil { + return "" + } + return d.LogId +} + +func (d *DebugModeLog) GetDashboardView() string { + if d == nil { + return "" + } + return d.DashboardView +} + +func (d *DebugModeLog) GetLogSummary() *DebugModelLogSummary { + if d == nil { + return nil + } + return d.LogSummary +} - _rawJSON json.RawMessage +func (d *DebugModeLog) GetExtraProperties() map[string]interface{} { + return d.extraProperties } func (d *DebugModeLog) UnmarshalJSON(data []byte) error { @@ -2250,592 +1544,515 @@ func (d *DebugModeLog) UnmarshalJSON(data []byte) error { return err } *d = DebugModeLog(value) - d._rawJSON = json.RawMessage(data) + extraProperties, err := internal.ExtractExtraProperties(data, *d) + if err != nil { + return err + } + d.extraProperties = extraProperties + d.rawJSON = json.RawMessage(data) return nil } func (d *DebugModeLog) String() string { - if len(d._rawJSON) > 0 { - if value, err := core.StringifyJSON(d._rawJSON); err == nil { + if len(d.rawJSON) > 0 { + if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(d); err == nil { + if value, err := internal.StringifyJSON(d); err == nil { return value } return fmt.Sprintf("%#v", d) } type DebugModelLogSummary struct { - Url string `json:"url"` - Method string `json:"method"` - StatusCode int `json:"status_code"` + Url string `json:"url" url:"url"` + Method string `json:"method" url:"method"` + StatusCode int `json:"status_code" url:"status_code"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (d *DebugModelLogSummary) UnmarshalJSON(data []byte) error { - type unmarshaler DebugModelLogSummary - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (d *DebugModelLogSummary) GetUrl() string { + if d == nil { + return "" } - *d = DebugModelLogSummary(value) - d._rawJSON = json.RawMessage(data) - return nil + return d.Url } -func (d *DebugModelLogSummary) String() string { - if len(d._rawJSON) > 0 { - if value, err := core.StringifyJSON(d._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(d); err == nil { - return value +func (d *DebugModelLogSummary) GetMethod() string { + if d == nil { + return "" } - return fmt.Sprintf("%#v", d) + return d.Method } -// # The Deduction Object -// -// ### Description -// -// The `Deduction` object is used to represent an array of the wages withheld from total earnings for the purpose of paying taxes. -// -// ### Usage Example -// -// Fetch from the `LIST Deductions` endpoint and filter by `ID` to show all deductions. -type Deduction struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - EmployeePayrollRun *string `json:"employee_payroll_run,omitempty"` - // The deduction's name. - Name *string `json:"name,omitempty"` - // The amount of money that is withheld from an employee's gross pay by the employee. - EmployeeDeduction *float64 `json:"employee_deduction,omitempty"` - // The amount of money that is withheld on behalf of an employee by the company. - CompanyDeduction *float64 `json:"company_deduction,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` +func (d *DebugModelLogSummary) GetStatusCode() int { + if d == nil { + return 0 + } + return d.StatusCode +} - _rawJSON json.RawMessage +func (d *DebugModelLogSummary) GetExtraProperties() map[string]interface{} { + return d.extraProperties } -func (d *Deduction) UnmarshalJSON(data []byte) error { - type unmarshaler Deduction +func (d *DebugModelLogSummary) UnmarshalJSON(data []byte) error { + type unmarshaler DebugModelLogSummary var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *d = Deduction(value) - d._rawJSON = json.RawMessage(data) + *d = DebugModelLogSummary(value) + extraProperties, err := internal.ExtractExtraProperties(data, *d) + if err != nil { + return err + } + d.extraProperties = extraProperties + d.rawJSON = json.RawMessage(data) return nil } -func (d *Deduction) String() string { - if len(d._rawJSON) > 0 { - if value, err := core.StringifyJSON(d._rawJSON); err == nil { +func (d *DebugModelLogSummary) String() string { + if len(d.rawJSON) > 0 { + if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(d); err == nil { + if value, err := internal.StringifyJSON(d); err == nil { return value } return fmt.Sprintf("%#v", d) } -// # The Dependent Object -// +// # The Employee Object // ### Description -// -// The `Dependent` object is used to represent a dependent (e.g. child, spouse, domestic partner, etc) of an `Employee` +// The `Employee` object is used to represent any person who has been employed by a company. By default, it returns all employees. To filter for only active employees, set the `employment_status` query parameter to `ACTIVE`. // // ### Usage Example -// -// Fetch from the `LIST Dependents` endpoint and filter by `ID` to show all dependents. -type Dependent struct { - Id *string `json:"id,omitempty"` +// Fetch from the `LIST Employee` endpoint and filter by `ID` to show all employees. +type Employee struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The dependents's first name. - FirstName *string `json:"first_name,omitempty"` - // The dependents's middle name. - MiddleName *string `json:"middle_name,omitempty"` - // The dependents's last name. - LastName *string `json:"last_name,omitempty"` - // The dependent's relationship to the employee. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The employee's number that appears in the third-party integration's UI. + EmployeeNumber *string `json:"employee_number,omitempty" url:"employee_number,omitempty"` + // The ID of the employee's company. + Company *EmployeeCompany `json:"company,omitempty" url:"company,omitempty"` + // The employee's first name. + FirstName *string `json:"first_name,omitempty" url:"first_name,omitempty"` + // The employee's last name. + LastName *string `json:"last_name,omitempty" url:"last_name,omitempty"` + // The employee's preferred first name. + PreferredName *string `json:"preferred_name,omitempty" url:"preferred_name,omitempty"` + // The employee's full name, to use for display purposes. If a preferred first name is available, the full name will include the preferred first name. + DisplayFullName *string `json:"display_full_name,omitempty" url:"display_full_name,omitempty"` + // The employee's username that appears in the remote UI. + Username *string `json:"username,omitempty" url:"username,omitempty"` + Groups []*EmployeeGroupsItem `json:"groups,omitempty" url:"groups,omitempty"` + // The employee's work email. + WorkEmail *string `json:"work_email,omitempty" url:"work_email,omitempty"` + // The employee's personal email. + PersonalEmail *string `json:"personal_email,omitempty" url:"personal_email,omitempty"` + // The employee's mobile phone number. + MobilePhoneNumber *string `json:"mobile_phone_number,omitempty" url:"mobile_phone_number,omitempty"` + // Array of `Employment` IDs for this Employee. + Employments []*EmployeeEmploymentsItem `json:"employments,omitempty" url:"employments,omitempty"` + // The employee's home address. + HomeLocation *EmployeeHomeLocation `json:"home_location,omitempty" url:"home_location,omitempty"` + // The employee's work address. + WorkLocation *EmployeeWorkLocation `json:"work_location,omitempty" url:"work_location,omitempty"` + // The employee ID of the employee's manager. + Manager *EmployeeManager `json:"manager,omitempty" url:"manager,omitempty"` + // The employee's team. + Team *EmployeeTeam `json:"team,omitempty" url:"team,omitempty"` + // The employee's pay group + PayGroup *EmployeePayGroup `json:"pay_group,omitempty" url:"pay_group,omitempty"` + // The employee's social security number. + Ssn *string `json:"ssn,omitempty" url:"ssn,omitempty"` + // The employee's gender. // - // - `CHILD` - CHILD - // - `SPOUSE` - SPOUSE - // - `DOMESTIC_PARTNER` - DOMESTIC_PARTNER - Relationship *DependentRelationship `json:"relationship,omitempty"` - // The employee this person is a dependent of. - Employee *string `json:"employee,omitempty"` - // The dependent's date of birth. - DateOfBirth *time.Time `json:"date_of_birth,omitempty"` - // The dependent's gender. + // * `MALE` - MALE + // * `FEMALE` - FEMALE + // * `NON-BINARY` - NON-BINARY + // * `OTHER` - OTHER + // * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE + Gender *EmployeeGender `json:"gender,omitempty" url:"gender,omitempty"` + // The employee's ethnicity. + // + // * `AMERICAN_INDIAN_OR_ALASKA_NATIVE` - AMERICAN_INDIAN_OR_ALASKA_NATIVE + // * `ASIAN_OR_INDIAN_SUBCONTINENT` - ASIAN_OR_INDIAN_SUBCONTINENT + // * `BLACK_OR_AFRICAN_AMERICAN` - BLACK_OR_AFRICAN_AMERICAN + // * `HISPANIC_OR_LATINO` - HISPANIC_OR_LATINO + // * `NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER` - NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER + // * `TWO_OR_MORE_RACES` - TWO_OR_MORE_RACES + // * `WHITE` - WHITE + // * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE + Ethnicity *EmployeeEthnicity `json:"ethnicity,omitempty" url:"ethnicity,omitempty"` + // The employee's filing status as related to marital status. + // + // * `SINGLE` - SINGLE + // * `MARRIED_FILING_JOINTLY` - MARRIED_FILING_JOINTLY + // * `MARRIED_FILING_SEPARATELY` - MARRIED_FILING_SEPARATELY + // * `HEAD_OF_HOUSEHOLD` - HEAD_OF_HOUSEHOLD + // * `QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD` - QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD + MaritalStatus *EmployeeMaritalStatus `json:"marital_status,omitempty" url:"marital_status,omitempty"` + // The employee's date of birth. + DateOfBirth *time.Time `json:"date_of_birth,omitempty" url:"date_of_birth,omitempty"` + // The date that the employee was hired, usually the day that an offer letter is signed. If an employee has multiple hire dates from previous employments, this represents the most recent hire date. Note: If you're looking for the employee's start date, refer to the start_date field. + HireDate *time.Time `json:"hire_date,omitempty" url:"hire_date,omitempty"` + // The date that the employee started working. If an employee was rehired, the most recent start date will be returned. + StartDate *time.Time `json:"start_date,omitempty" url:"start_date,omitempty"` + // When the third party's employee was created. + RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty" url:"remote_created_at,omitempty"` + // The employment status of the employee. // - // - `MALE` - MALE - // - `FEMALE` - FEMALE - // - `NON-BINARY` - NON-BINARY - // - `OTHER` - OTHER - // - `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE - Gender *DependentGender `json:"gender,omitempty"` - // The dependent's phone number. - PhoneNumber *string `json:"phone_number,omitempty"` - // The dependents's home address. - HomeLocation *string `json:"home_location,omitempty"` - // Whether or not the dependent is a student - IsStudent *bool `json:"is_student,omitempty"` - // The dependents's social security number. - Ssn *string `json:"ssn,omitempty"` + // * `ACTIVE` - ACTIVE + // * `PENDING` - PENDING + // * `INACTIVE` - INACTIVE + EmploymentStatus *EmployeeEmploymentStatus `json:"employment_status,omitempty" url:"employment_status,omitempty"` + // The employee's termination date. + TerminationDate *time.Time `json:"termination_date,omitempty" url:"termination_date,omitempty"` + // The URL of the employee's avatar image. + Avatar *string `json:"avatar,omitempty" url:"avatar,omitempty"` + // Custom fields configured for a given model. + CustomFields map[string]interface{} `json:"custom_fields,omitempty" url:"custom_fields,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (d *Dependent) UnmarshalJSON(data []byte) error { - type unmarshaler Dependent - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (e *Employee) GetId() *string { + if e == nil { + return nil } - *d = Dependent(value) - d._rawJSON = json.RawMessage(data) - return nil + return e.Id } -func (d *Dependent) String() string { - if len(d._rawJSON) > 0 { - if value, err := core.StringifyJSON(d._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(d); err == nil { - return value +func (e *Employee) GetRemoteId() *string { + if e == nil { + return nil } - return fmt.Sprintf("%#v", d) + return e.RemoteId } -// The dependent's gender. -// -// - `MALE` - MALE -// - `FEMALE` - FEMALE -// - `NON-BINARY` - NON-BINARY -// - `OTHER` - OTHER -// - `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE -type DependentGender struct { - typeName string - GenderEnum GenderEnum - String string +func (e *Employee) GetCreatedAt() *time.Time { + if e == nil { + return nil + } + return e.CreatedAt } -func NewDependentGenderFromGenderEnum(value GenderEnum) *DependentGender { - return &DependentGender{typeName: "genderEnum", GenderEnum: value} +func (e *Employee) GetModifiedAt() *time.Time { + if e == nil { + return nil + } + return e.ModifiedAt } -func NewDependentGenderFromString(value string) *DependentGender { - return &DependentGender{typeName: "string", String: value} +func (e *Employee) GetEmployeeNumber() *string { + if e == nil { + return nil + } + return e.EmployeeNumber } -func (d *DependentGender) UnmarshalJSON(data []byte) error { - var valueGenderEnum GenderEnum - if err := json.Unmarshal(data, &valueGenderEnum); err == nil { - d.typeName = "genderEnum" - d.GenderEnum = valueGenderEnum +func (e *Employee) GetCompany() *EmployeeCompany { + if e == nil { return nil } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - d.typeName = "string" - d.String = valueString + return e.Company +} + +func (e *Employee) GetFirstName() *string { + if e == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, d) + return e.FirstName } -func (d DependentGender) MarshalJSON() ([]byte, error) { - switch d.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", d.typeName, d) - case "genderEnum": - return json.Marshal(d.GenderEnum) - case "string": - return json.Marshal(d.String) +func (e *Employee) GetLastName() *string { + if e == nil { + return nil } + return e.LastName } -type DependentGenderVisitor interface { - VisitGenderEnum(GenderEnum) error - VisitString(string) error +func (e *Employee) GetPreferredName() *string { + if e == nil { + return nil + } + return e.PreferredName } -func (d *DependentGender) Accept(visitor DependentGenderVisitor) error { - switch d.typeName { - default: - return fmt.Errorf("invalid type %s in %T", d.typeName, d) - case "genderEnum": - return visitor.VisitGenderEnum(d.GenderEnum) - case "string": - return visitor.VisitString(d.String) +func (e *Employee) GetDisplayFullName() *string { + if e == nil { + return nil } + return e.DisplayFullName } -// The dependent's relationship to the employee. -// -// - `CHILD` - CHILD -// - `SPOUSE` - SPOUSE -// - `DOMESTIC_PARTNER` - DOMESTIC_PARTNER -type DependentRelationship struct { - typeName string - RelationshipEnum RelationshipEnum - String string +func (e *Employee) GetUsername() *string { + if e == nil { + return nil + } + return e.Username } -func NewDependentRelationshipFromRelationshipEnum(value RelationshipEnum) *DependentRelationship { - return &DependentRelationship{typeName: "relationshipEnum", RelationshipEnum: value} +func (e *Employee) GetGroups() []*EmployeeGroupsItem { + if e == nil { + return nil + } + return e.Groups } -func NewDependentRelationshipFromString(value string) *DependentRelationship { - return &DependentRelationship{typeName: "string", String: value} +func (e *Employee) GetWorkEmail() *string { + if e == nil { + return nil + } + return e.WorkEmail } -func (d *DependentRelationship) UnmarshalJSON(data []byte) error { - var valueRelationshipEnum RelationshipEnum - if err := json.Unmarshal(data, &valueRelationshipEnum); err == nil { - d.typeName = "relationshipEnum" - d.RelationshipEnum = valueRelationshipEnum +func (e *Employee) GetPersonalEmail() *string { + if e == nil { return nil } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - d.typeName = "string" - d.String = valueString + return e.PersonalEmail +} + +func (e *Employee) GetMobilePhoneNumber() *string { + if e == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, d) + return e.MobilePhoneNumber } -func (d DependentRelationship) MarshalJSON() ([]byte, error) { - switch d.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", d.typeName, d) - case "relationshipEnum": - return json.Marshal(d.RelationshipEnum) - case "string": - return json.Marshal(d.String) +func (e *Employee) GetEmployments() []*EmployeeEmploymentsItem { + if e == nil { + return nil } + return e.Employments } -type DependentRelationshipVisitor interface { - VisitRelationshipEnum(RelationshipEnum) error - VisitString(string) error +func (e *Employee) GetHomeLocation() *EmployeeHomeLocation { + if e == nil { + return nil + } + return e.HomeLocation } -func (d *DependentRelationship) Accept(visitor DependentRelationshipVisitor) error { - switch d.typeName { - default: - return fmt.Errorf("invalid type %s in %T", d.typeName, d) - case "relationshipEnum": - return visitor.VisitRelationshipEnum(d.RelationshipEnum) - case "string": - return visitor.VisitString(d.String) +func (e *Employee) GetWorkLocation() *EmployeeWorkLocation { + if e == nil { + return nil } + return e.WorkLocation } -// # The Earning Object -// -// ### Description -// -// The `Earning` object is used to represent an array of different compensations that an employee receives within specific wage categories. -// -// ### Usage Example -// -// Fetch from the `LIST Earnings` endpoint and filter by `ID` to show all earnings. -type Earning struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - EmployeePayrollRun *string `json:"employee_payroll_run,omitempty"` - // The amount earned. - Amount *float64 `json:"amount,omitempty"` - // The type of earning. - // - // - `SALARY` - SALARY - // - `REIMBURSEMENT` - REIMBURSEMENT - // - `OVERTIME` - OVERTIME - // - `BONUS` - BONUS - Type *EarningType `json:"type,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` - - _rawJSON json.RawMessage +func (e *Employee) GetManager() *EmployeeManager { + if e == nil { + return nil + } + return e.Manager } -func (e *Earning) UnmarshalJSON(data []byte) error { - type unmarshaler Earning - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (e *Employee) GetTeam() *EmployeeTeam { + if e == nil { + return nil } - *e = Earning(value) - e._rawJSON = json.RawMessage(data) - return nil + return e.Team } -func (e *Earning) String() string { - if len(e._rawJSON) > 0 { - if value, err := core.StringifyJSON(e._rawJSON); err == nil { - return value - } +func (e *Employee) GetPayGroup() *EmployeePayGroup { + if e == nil { + return nil } - if value, err := core.StringifyJSON(e); err == nil { - return value + return e.PayGroup +} + +func (e *Employee) GetSsn() *string { + if e == nil { + return nil } - return fmt.Sprintf("%#v", e) + return e.Ssn } -// The type of earning. -// -// - `SALARY` - SALARY -// - `REIMBURSEMENT` - REIMBURSEMENT -// - `OVERTIME` - OVERTIME -// - `BONUS` - BONUS -type EarningType struct { - typeName string - EarningTypeEnum EarningTypeEnum - String string +func (e *Employee) GetGender() *EmployeeGender { + if e == nil { + return nil + } + return e.Gender } -func NewEarningTypeFromEarningTypeEnum(value EarningTypeEnum) *EarningType { - return &EarningType{typeName: "earningTypeEnum", EarningTypeEnum: value} +func (e *Employee) GetEthnicity() *EmployeeEthnicity { + if e == nil { + return nil + } + return e.Ethnicity } -func NewEarningTypeFromString(value string) *EarningType { - return &EarningType{typeName: "string", String: value} +func (e *Employee) GetMaritalStatus() *EmployeeMaritalStatus { + if e == nil { + return nil + } + return e.MaritalStatus } -func (e *EarningType) UnmarshalJSON(data []byte) error { - var valueEarningTypeEnum EarningTypeEnum - if err := json.Unmarshal(data, &valueEarningTypeEnum); err == nil { - e.typeName = "earningTypeEnum" - e.EarningTypeEnum = valueEarningTypeEnum +func (e *Employee) GetDateOfBirth() *time.Time { + if e == nil { return nil } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString + return e.DateOfBirth +} + +func (e *Employee) GetHireDate() *time.Time { + if e == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) + return e.HireDate } -func (e EarningType) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "earningTypeEnum": - return json.Marshal(e.EarningTypeEnum) - case "string": - return json.Marshal(e.String) +func (e *Employee) GetStartDate() *time.Time { + if e == nil { + return nil } + return e.StartDate } -type EarningTypeVisitor interface { - VisitEarningTypeEnum(EarningTypeEnum) error - VisitString(string) error +func (e *Employee) GetRemoteCreatedAt() *time.Time { + if e == nil { + return nil + } + return e.RemoteCreatedAt } -func (e *EarningType) Accept(visitor EarningTypeVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "earningTypeEnum": - return visitor.VisitEarningTypeEnum(e.EarningTypeEnum) - case "string": - return visitor.VisitString(e.String) +func (e *Employee) GetEmploymentStatus() *EmployeeEmploymentStatus { + if e == nil { + return nil } + return e.EmploymentStatus } -// - `SALARY` - SALARY -// - `REIMBURSEMENT` - REIMBURSEMENT -// - `OVERTIME` - OVERTIME -// - `BONUS` - BONUS -type EarningTypeEnum string +func (e *Employee) GetTerminationDate() *time.Time { + if e == nil { + return nil + } + return e.TerminationDate +} -const ( - EarningTypeEnumSalary EarningTypeEnum = "SALARY" - EarningTypeEnumReimbursement EarningTypeEnum = "REIMBURSEMENT" - EarningTypeEnumOvertime EarningTypeEnum = "OVERTIME" - EarningTypeEnumBonus EarningTypeEnum = "BONUS" -) +func (e *Employee) GetAvatar() *string { + if e == nil { + return nil + } + return e.Avatar +} -func NewEarningTypeEnumFromString(s string) (EarningTypeEnum, error) { - switch s { - case "SALARY": - return EarningTypeEnumSalary, nil - case "REIMBURSEMENT": - return EarningTypeEnumReimbursement, nil - case "OVERTIME": - return EarningTypeEnumOvertime, nil - case "BONUS": - return EarningTypeEnumBonus, nil - } - var t EarningTypeEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) +func (e *Employee) GetCustomFields() map[string]interface{} { + if e == nil { + return nil + } + return e.CustomFields } -func (e EarningTypeEnum) Ptr() *EarningTypeEnum { - return &e +func (e *Employee) GetRemoteWasDeleted() *bool { + if e == nil { + return nil + } + return e.RemoteWasDeleted } -// # The Employee Object -// -// ### Description -// -// The `Employee` object is used to represent any person who has been employed by a company. By default, it returns all employees. To filter for only active employees, set the `employment_status` query parameter to `ACTIVE`. -// -// ### Usage Example -// -// Fetch from the `LIST Employee` endpoint and filter by `ID` to show all employees. -type Employee struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The employee's number that appears in the third-party integration's UI. - EmployeeNumber *string `json:"employee_number,omitempty"` - // The ID of the employee's company. - Company *EmployeeCompany `json:"company,omitempty"` - // The employee's first name. - FirstName *string `json:"first_name,omitempty"` - // The employee's last name. - LastName *string `json:"last_name,omitempty"` - // The employee's preferred first name. - PreferredName *string `json:"preferred_name,omitempty"` - // The employee's full name, to use for display purposes. If a preferred first name is available, the full name will include the preferred first name. - DisplayFullName *string `json:"display_full_name,omitempty"` - // The employee's username that appears in the remote UI. - Username *string `json:"username,omitempty"` - Groups []*EmployeeGroupsItem `json:"groups,omitempty"` - // The employee's work email. - WorkEmail *string `json:"work_email,omitempty"` - // The employee's personal email. - PersonalEmail *string `json:"personal_email,omitempty"` - // The employee's mobile phone number. - MobilePhoneNumber *string `json:"mobile_phone_number,omitempty"` - // Array of `Employment` IDs for this Employee. - Employments []*EmployeeEmploymentsItem `json:"employments,omitempty"` - // The employee's home address. - HomeLocation *EmployeeHomeLocation `json:"home_location,omitempty"` - // The employee's work address. - WorkLocation *EmployeeWorkLocation `json:"work_location,omitempty"` - // The employee ID of the employee's manager. - Manager *EmployeeManager `json:"manager,omitempty"` - // The employee's team. - Team *EmployeeTeam `json:"team,omitempty"` - // The employee's pay group - PayGroup *EmployeePayGroup `json:"pay_group,omitempty"` - // The employee's social security number. - Ssn *string `json:"ssn,omitempty"` - // The employee's gender. - // - // - `MALE` - MALE - // - `FEMALE` - FEMALE - // - `NON-BINARY` - NON-BINARY - // - `OTHER` - OTHER - // - `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE - Gender *EmployeeGender `json:"gender,omitempty"` - // The employee's ethnicity. - // - // - `AMERICAN_INDIAN_OR_ALASKA_NATIVE` - AMERICAN_INDIAN_OR_ALASKA_NATIVE - // - `ASIAN_OR_INDIAN_SUBCONTINENT` - ASIAN_OR_INDIAN_SUBCONTINENT - // - `BLACK_OR_AFRICAN_AMERICAN` - BLACK_OR_AFRICAN_AMERICAN - // - `HISPANIC_OR_LATINO` - HISPANIC_OR_LATINO - // - `NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER` - NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER - // - `TWO_OR_MORE_RACES` - TWO_OR_MORE_RACES - // - `WHITE` - WHITE - // - `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE - Ethnicity *EmployeeEthnicity `json:"ethnicity,omitempty"` - // The employee's filing status as related to marital status. - // - // - `SINGLE` - SINGLE - // - `MARRIED_FILING_JOINTLY` - MARRIED_FILING_JOINTLY - // - `MARRIED_FILING_SEPARATELY` - MARRIED_FILING_SEPARATELY - // - `HEAD_OF_HOUSEHOLD` - HEAD_OF_HOUSEHOLD - // - `QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD` - QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD - MaritalStatus *EmployeeMaritalStatus `json:"marital_status,omitempty"` - // The employee's date of birth. - DateOfBirth *time.Time `json:"date_of_birth,omitempty"` - // The date that the employee was hired, usually the day that an offer letter is signed. If an employee has multiple hire dates from previous employments, this represents the most recent hire date. Note: If you're looking for the employee's start date, refer to the start_date field. - HireDate *time.Time `json:"hire_date,omitempty"` - // The date that the employee started working. If an employee was rehired, the most recent start date will be returned. - StartDate *time.Time `json:"start_date,omitempty"` - // When the third party's employee was created. - RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty"` - // The employment status of the employee. - // - // - `ACTIVE` - ACTIVE - // - `PENDING` - PENDING - // - `INACTIVE` - INACTIVE - EmploymentStatus *EmployeeEmploymentStatus `json:"employment_status,omitempty"` - // The employee's termination date. - TerminationDate *time.Time `json:"termination_date,omitempty"` - // The URL of the employee's avatar image. - Avatar *string `json:"avatar,omitempty"` - // Custom fields configured for a given model. - CustomFields map[string]interface{} `json:"custom_fields,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` +func (e *Employee) GetFieldMappings() map[string]interface{} { + if e == nil { + return nil + } + return e.FieldMappings +} + +func (e *Employee) GetRemoteData() []*RemoteData { + if e == nil { + return nil + } + return e.RemoteData +} - _rawJSON json.RawMessage +func (e *Employee) GetExtraProperties() map[string]interface{} { + return e.extraProperties } func (e *Employee) UnmarshalJSON(data []byte) error { - type unmarshaler Employee - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { + type embed Employee + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + DateOfBirth *internal.DateTime `json:"date_of_birth,omitempty"` + HireDate *internal.DateTime `json:"hire_date,omitempty"` + StartDate *internal.DateTime `json:"start_date,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + TerminationDate *internal.DateTime `json:"termination_date,omitempty"` + }{ + embed: embed(*e), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *e = Employee(unmarshaler.embed) + e.CreatedAt = unmarshaler.CreatedAt.TimePtr() + e.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + e.DateOfBirth = unmarshaler.DateOfBirth.TimePtr() + e.HireDate = unmarshaler.HireDate.TimePtr() + e.StartDate = unmarshaler.StartDate.TimePtr() + e.RemoteCreatedAt = unmarshaler.RemoteCreatedAt.TimePtr() + e.TerminationDate = unmarshaler.TerminationDate.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *e) + if err != nil { return err } - *e = Employee(value) - e._rawJSON = json.RawMessage(data) + e.extraProperties = extraProperties + e.rawJSON = json.RawMessage(data) return nil } +func (e *Employee) MarshalJSON() ([]byte, error) { + type embed Employee + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + DateOfBirth *internal.DateTime `json:"date_of_birth,omitempty"` + HireDate *internal.DateTime `json:"hire_date,omitempty"` + StartDate *internal.DateTime `json:"start_date,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + TerminationDate *internal.DateTime `json:"termination_date,omitempty"` + }{ + embed: embed(*e), + CreatedAt: internal.NewOptionalDateTime(e.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(e.ModifiedAt), + DateOfBirth: internal.NewOptionalDateTime(e.DateOfBirth), + HireDate: internal.NewOptionalDateTime(e.HireDate), + StartDate: internal.NewOptionalDateTime(e.StartDate), + RemoteCreatedAt: internal.NewOptionalDateTime(e.RemoteCreatedAt), + TerminationDate: internal.NewOptionalDateTime(e.TerminationDate), + } + return json.Marshal(marshaler) +} + func (e *Employee) String() string { - if len(e._rawJSON) > 0 { - if value, err := core.StringifyJSON(e._rawJSON); err == nil { + if len(e.rawJSON) > 0 { + if value, err := internal.StringifyJSON(e.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(e); err == nil { + if value, err := internal.StringifyJSON(e); err == nil { return value } return fmt.Sprintf("%#v", e) @@ -2843,29 +2060,36 @@ func (e *Employee) String() string { // The ID of the employee's company. type EmployeeCompany struct { - typeName string - String string - Company *Company + String string + Company *Company + + typ string } -func NewEmployeeCompanyFromString(value string) *EmployeeCompany { - return &EmployeeCompany{typeName: "string", String: value} +func (e *EmployeeCompany) GetString() string { + if e == nil { + return "" + } + return e.String } -func NewEmployeeCompanyFromCompany(value *Company) *EmployeeCompany { - return &EmployeeCompany{typeName: "company", Company: value} +func (e *EmployeeCompany) GetCompany() *Company { + if e == nil { + return nil + } + return e.Company } func (e *EmployeeCompany) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" + e.typ = "String" e.String = valueString return nil } valueCompany := new(Company) if err := json.Unmarshal(data, &valueCompany); err == nil { - e.typeName = "company" + e.typ = "Company" e.Company = valueCompany return nil } @@ -2873,14 +2097,13 @@ func (e *EmployeeCompany) UnmarshalJSON(data []byte) error { } func (e EmployeeCompany) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": + if e.typ == "String" || e.String != "" { return json.Marshal(e.String) - case "company": + } + if e.typ == "Company" || e.Company != nil { return json.Marshal(e.Company) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) } type EmployeeCompanyVisitor interface { @@ -2889,45 +2112,51 @@ type EmployeeCompanyVisitor interface { } func (e *EmployeeCompany) Accept(visitor EmployeeCompanyVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": + if e.typ == "String" || e.String != "" { return visitor.VisitString(e.String) - case "company": + } + if e.typ == "Company" || e.Company != nil { return visitor.VisitCompany(e.Company) } + return fmt.Errorf("type %T does not include a non-empty union type", e) } // The employment status of the employee. // -// - `ACTIVE` - ACTIVE -// - `PENDING` - PENDING -// - `INACTIVE` - INACTIVE +// * `ACTIVE` - ACTIVE +// * `PENDING` - PENDING +// * `INACTIVE` - INACTIVE type EmployeeEmploymentStatus struct { - typeName string EmploymentStatusEnum EmploymentStatusEnum String string + + typ string } -func NewEmployeeEmploymentStatusFromEmploymentStatusEnum(value EmploymentStatusEnum) *EmployeeEmploymentStatus { - return &EmployeeEmploymentStatus{typeName: "employmentStatusEnum", EmploymentStatusEnum: value} +func (e *EmployeeEmploymentStatus) GetEmploymentStatusEnum() EmploymentStatusEnum { + if e == nil { + return "" + } + return e.EmploymentStatusEnum } -func NewEmployeeEmploymentStatusFromString(value string) *EmployeeEmploymentStatus { - return &EmployeeEmploymentStatus{typeName: "string", String: value} +func (e *EmployeeEmploymentStatus) GetString() string { + if e == nil { + return "" + } + return e.String } func (e *EmployeeEmploymentStatus) UnmarshalJSON(data []byte) error { var valueEmploymentStatusEnum EmploymentStatusEnum if err := json.Unmarshal(data, &valueEmploymentStatusEnum); err == nil { - e.typeName = "employmentStatusEnum" + e.typ = "EmploymentStatusEnum" e.EmploymentStatusEnum = valueEmploymentStatusEnum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" + e.typ = "String" e.String = valueString return nil } @@ -2935,14 +2164,13 @@ func (e *EmployeeEmploymentStatus) UnmarshalJSON(data []byte) error { } func (e EmployeeEmploymentStatus) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "employmentStatusEnum": + if e.typ == "EmploymentStatusEnum" || e.EmploymentStatusEnum != "" { return json.Marshal(e.EmploymentStatusEnum) - case "string": + } + if e.typ == "String" || e.String != "" { return json.Marshal(e.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) } type EmployeeEmploymentStatusVisitor interface { @@ -2951,40 +2179,46 @@ type EmployeeEmploymentStatusVisitor interface { } func (e *EmployeeEmploymentStatus) Accept(visitor EmployeeEmploymentStatusVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "employmentStatusEnum": + if e.typ == "EmploymentStatusEnum" || e.EmploymentStatusEnum != "" { return visitor.VisitEmploymentStatusEnum(e.EmploymentStatusEnum) - case "string": + } + if e.typ == "String" || e.String != "" { return visitor.VisitString(e.String) } + return fmt.Errorf("type %T does not include a non-empty union type", e) } type EmployeeEmploymentsItem struct { - typeName string String string Employment *Employment + + typ string } -func NewEmployeeEmploymentsItemFromString(value string) *EmployeeEmploymentsItem { - return &EmployeeEmploymentsItem{typeName: "string", String: value} +func (e *EmployeeEmploymentsItem) GetString() string { + if e == nil { + return "" + } + return e.String } -func NewEmployeeEmploymentsItemFromEmployment(value *Employment) *EmployeeEmploymentsItem { - return &EmployeeEmploymentsItem{typeName: "employment", Employment: value} +func (e *EmployeeEmploymentsItem) GetEmployment() *Employment { + if e == nil { + return nil + } + return e.Employment } func (e *EmployeeEmploymentsItem) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" + e.typ = "String" e.String = valueString return nil } valueEmployment := new(Employment) if err := json.Unmarshal(data, &valueEmployment); err == nil { - e.typeName = "employment" + e.typ = "Employment" e.Employment = valueEmployment return nil } @@ -2992,14 +2226,13 @@ func (e *EmployeeEmploymentsItem) UnmarshalJSON(data []byte) error { } func (e EmployeeEmploymentsItem) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": + if e.typ == "String" || e.String != "" { return json.Marshal(e.String) - case "employment": + } + if e.typ == "Employment" || e.Employment != nil { return json.Marshal(e.Employment) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) } type EmployeeEmploymentsItemVisitor interface { @@ -3008,50 +2241,56 @@ type EmployeeEmploymentsItemVisitor interface { } func (e *EmployeeEmploymentsItem) Accept(visitor EmployeeEmploymentsItemVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": + if e.typ == "String" || e.String != "" { return visitor.VisitString(e.String) - case "employment": + } + if e.typ == "Employment" || e.Employment != nil { return visitor.VisitEmployment(e.Employment) } + return fmt.Errorf("type %T does not include a non-empty union type", e) } // The employee's ethnicity. // -// - `AMERICAN_INDIAN_OR_ALASKA_NATIVE` - AMERICAN_INDIAN_OR_ALASKA_NATIVE -// - `ASIAN_OR_INDIAN_SUBCONTINENT` - ASIAN_OR_INDIAN_SUBCONTINENT -// - `BLACK_OR_AFRICAN_AMERICAN` - BLACK_OR_AFRICAN_AMERICAN -// - `HISPANIC_OR_LATINO` - HISPANIC_OR_LATINO -// - `NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER` - NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER -// - `TWO_OR_MORE_RACES` - TWO_OR_MORE_RACES -// - `WHITE` - WHITE -// - `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE +// * `AMERICAN_INDIAN_OR_ALASKA_NATIVE` - AMERICAN_INDIAN_OR_ALASKA_NATIVE +// * `ASIAN_OR_INDIAN_SUBCONTINENT` - ASIAN_OR_INDIAN_SUBCONTINENT +// * `BLACK_OR_AFRICAN_AMERICAN` - BLACK_OR_AFRICAN_AMERICAN +// * `HISPANIC_OR_LATINO` - HISPANIC_OR_LATINO +// * `NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER` - NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER +// * `TWO_OR_MORE_RACES` - TWO_OR_MORE_RACES +// * `WHITE` - WHITE +// * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE type EmployeeEthnicity struct { - typeName string EthnicityEnum EthnicityEnum String string + + typ string } -func NewEmployeeEthnicityFromEthnicityEnum(value EthnicityEnum) *EmployeeEthnicity { - return &EmployeeEthnicity{typeName: "ethnicityEnum", EthnicityEnum: value} +func (e *EmployeeEthnicity) GetEthnicityEnum() EthnicityEnum { + if e == nil { + return "" + } + return e.EthnicityEnum } -func NewEmployeeEthnicityFromString(value string) *EmployeeEthnicity { - return &EmployeeEthnicity{typeName: "string", String: value} +func (e *EmployeeEthnicity) GetString() string { + if e == nil { + return "" + } + return e.String } func (e *EmployeeEthnicity) UnmarshalJSON(data []byte) error { var valueEthnicityEnum EthnicityEnum if err := json.Unmarshal(data, &valueEthnicityEnum); err == nil { - e.typeName = "ethnicityEnum" + e.typ = "EthnicityEnum" e.EthnicityEnum = valueEthnicityEnum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" + e.typ = "String" e.String = valueString return nil } @@ -3059,14 +2298,13 @@ func (e *EmployeeEthnicity) UnmarshalJSON(data []byte) error { } func (e EmployeeEthnicity) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "ethnicityEnum": + if e.typ == "EthnicityEnum" || e.EthnicityEnum != "" { return json.Marshal(e.EthnicityEnum) - case "string": + } + if e.typ == "String" || e.String != "" { return json.Marshal(e.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) } type EmployeeEthnicityVisitor interface { @@ -3075,47 +2313,53 @@ type EmployeeEthnicityVisitor interface { } func (e *EmployeeEthnicity) Accept(visitor EmployeeEthnicityVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "ethnicityEnum": + if e.typ == "EthnicityEnum" || e.EthnicityEnum != "" { return visitor.VisitEthnicityEnum(e.EthnicityEnum) - case "string": + } + if e.typ == "String" || e.String != "" { return visitor.VisitString(e.String) } + return fmt.Errorf("type %T does not include a non-empty union type", e) } // The employee's gender. // -// - `MALE` - MALE -// - `FEMALE` - FEMALE -// - `NON-BINARY` - NON-BINARY -// - `OTHER` - OTHER -// - `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE +// * `MALE` - MALE +// * `FEMALE` - FEMALE +// * `NON-BINARY` - NON-BINARY +// * `OTHER` - OTHER +// * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE type EmployeeGender struct { - typeName string GenderEnum GenderEnum String string + + typ string } -func NewEmployeeGenderFromGenderEnum(value GenderEnum) *EmployeeGender { - return &EmployeeGender{typeName: "genderEnum", GenderEnum: value} +func (e *EmployeeGender) GetGenderEnum() GenderEnum { + if e == nil { + return "" + } + return e.GenderEnum } -func NewEmployeeGenderFromString(value string) *EmployeeGender { - return &EmployeeGender{typeName: "string", String: value} +func (e *EmployeeGender) GetString() string { + if e == nil { + return "" + } + return e.String } func (e *EmployeeGender) UnmarshalJSON(data []byte) error { var valueGenderEnum GenderEnum if err := json.Unmarshal(data, &valueGenderEnum); err == nil { - e.typeName = "genderEnum" + e.typ = "GenderEnum" e.GenderEnum = valueGenderEnum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" + e.typ = "String" e.String = valueString return nil } @@ -3123,14 +2367,13 @@ func (e *EmployeeGender) UnmarshalJSON(data []byte) error { } func (e EmployeeGender) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "genderEnum": + if e.typ == "GenderEnum" || e.GenderEnum != "" { return json.Marshal(e.GenderEnum) - case "string": + } + if e.typ == "String" || e.String != "" { return json.Marshal(e.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) } type EmployeeGenderVisitor interface { @@ -3139,40 +2382,46 @@ type EmployeeGenderVisitor interface { } func (e *EmployeeGender) Accept(visitor EmployeeGenderVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "genderEnum": + if e.typ == "GenderEnum" || e.GenderEnum != "" { return visitor.VisitGenderEnum(e.GenderEnum) - case "string": + } + if e.typ == "String" || e.String != "" { return visitor.VisitString(e.String) } + return fmt.Errorf("type %T does not include a non-empty union type", e) } type EmployeeGroupsItem struct { - typeName string - String string - Group *Group + String string + Group *Group + + typ string } -func NewEmployeeGroupsItemFromString(value string) *EmployeeGroupsItem { - return &EmployeeGroupsItem{typeName: "string", String: value} +func (e *EmployeeGroupsItem) GetString() string { + if e == nil { + return "" + } + return e.String } -func NewEmployeeGroupsItemFromGroup(value *Group) *EmployeeGroupsItem { - return &EmployeeGroupsItem{typeName: "group", Group: value} +func (e *EmployeeGroupsItem) GetGroup() *Group { + if e == nil { + return nil + } + return e.Group } func (e *EmployeeGroupsItem) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" + e.typ = "String" e.String = valueString return nil } valueGroup := new(Group) if err := json.Unmarshal(data, &valueGroup); err == nil { - e.typeName = "group" + e.typ = "Group" e.Group = valueGroup return nil } @@ -3180,14 +2429,13 @@ func (e *EmployeeGroupsItem) UnmarshalJSON(data []byte) error { } func (e EmployeeGroupsItem) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": + if e.typ == "String" || e.String != "" { return json.Marshal(e.String) - case "group": + } + if e.typ == "Group" || e.Group != nil { return json.Marshal(e.Group) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) } type EmployeeGroupsItemVisitor interface { @@ -3196,41 +2444,47 @@ type EmployeeGroupsItemVisitor interface { } func (e *EmployeeGroupsItem) Accept(visitor EmployeeGroupsItemVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": + if e.typ == "String" || e.String != "" { return visitor.VisitString(e.String) - case "group": + } + if e.typ == "Group" || e.Group != nil { return visitor.VisitGroup(e.Group) } + return fmt.Errorf("type %T does not include a non-empty union type", e) } // The employee's home address. type EmployeeHomeLocation struct { - typeName string String string Location *Location + + typ string } -func NewEmployeeHomeLocationFromString(value string) *EmployeeHomeLocation { - return &EmployeeHomeLocation{typeName: "string", String: value} +func (e *EmployeeHomeLocation) GetString() string { + if e == nil { + return "" + } + return e.String } -func NewEmployeeHomeLocationFromLocation(value *Location) *EmployeeHomeLocation { - return &EmployeeHomeLocation{typeName: "location", Location: value} +func (e *EmployeeHomeLocation) GetLocation() *Location { + if e == nil { + return nil + } + return e.Location } func (e *EmployeeHomeLocation) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" + e.typ = "String" e.String = valueString return nil } valueLocation := new(Location) if err := json.Unmarshal(data, &valueLocation); err == nil { - e.typeName = "location" + e.typ = "Location" e.Location = valueLocation return nil } @@ -3238,14 +2492,13 @@ func (e *EmployeeHomeLocation) UnmarshalJSON(data []byte) error { } func (e EmployeeHomeLocation) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": + if e.typ == "String" || e.String != "" { return json.Marshal(e.String) - case "location": + } + if e.typ == "Location" || e.Location != nil { return json.Marshal(e.Location) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) } type EmployeeHomeLocationVisitor interface { @@ -3254,41 +2507,47 @@ type EmployeeHomeLocationVisitor interface { } func (e *EmployeeHomeLocation) Accept(visitor EmployeeHomeLocationVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": + if e.typ == "String" || e.String != "" { return visitor.VisitString(e.String) - case "location": + } + if e.typ == "Location" || e.Location != nil { return visitor.VisitLocation(e.Location) } + return fmt.Errorf("type %T does not include a non-empty union type", e) } // The employee ID of the employee's manager. type EmployeeManager struct { - typeName string String string Employee *Employee + + typ string } -func NewEmployeeManagerFromString(value string) *EmployeeManager { - return &EmployeeManager{typeName: "string", String: value} +func (e *EmployeeManager) GetString() string { + if e == nil { + return "" + } + return e.String } -func NewEmployeeManagerFromEmployee(value *Employee) *EmployeeManager { - return &EmployeeManager{typeName: "employee", Employee: value} +func (e *EmployeeManager) GetEmployee() *Employee { + if e == nil { + return nil + } + return e.Employee } func (e *EmployeeManager) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" + e.typ = "String" e.String = valueString return nil } valueEmployee := new(Employee) if err := json.Unmarshal(data, &valueEmployee); err == nil { - e.typeName = "employee" + e.typ = "Employee" e.Employee = valueEmployee return nil } @@ -3296,14 +2555,13 @@ func (e *EmployeeManager) UnmarshalJSON(data []byte) error { } func (e EmployeeManager) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": + if e.typ == "String" || e.String != "" { return json.Marshal(e.String) - case "employee": + } + if e.typ == "Employee" || e.Employee != nil { return json.Marshal(e.Employee) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) } type EmployeeManagerVisitor interface { @@ -3312,47 +2570,53 @@ type EmployeeManagerVisitor interface { } func (e *EmployeeManager) Accept(visitor EmployeeManagerVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": + if e.typ == "String" || e.String != "" { return visitor.VisitString(e.String) - case "employee": + } + if e.typ == "Employee" || e.Employee != nil { return visitor.VisitEmployee(e.Employee) } + return fmt.Errorf("type %T does not include a non-empty union type", e) } // The employee's filing status as related to marital status. // -// - `SINGLE` - SINGLE -// - `MARRIED_FILING_JOINTLY` - MARRIED_FILING_JOINTLY -// - `MARRIED_FILING_SEPARATELY` - MARRIED_FILING_SEPARATELY -// - `HEAD_OF_HOUSEHOLD` - HEAD_OF_HOUSEHOLD -// - `QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD` - QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD +// * `SINGLE` - SINGLE +// * `MARRIED_FILING_JOINTLY` - MARRIED_FILING_JOINTLY +// * `MARRIED_FILING_SEPARATELY` - MARRIED_FILING_SEPARATELY +// * `HEAD_OF_HOUSEHOLD` - HEAD_OF_HOUSEHOLD +// * `QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD` - QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD type EmployeeMaritalStatus struct { - typeName string MaritalStatusEnum MaritalStatusEnum String string + + typ string } -func NewEmployeeMaritalStatusFromMaritalStatusEnum(value MaritalStatusEnum) *EmployeeMaritalStatus { - return &EmployeeMaritalStatus{typeName: "maritalStatusEnum", MaritalStatusEnum: value} +func (e *EmployeeMaritalStatus) GetMaritalStatusEnum() MaritalStatusEnum { + if e == nil { + return "" + } + return e.MaritalStatusEnum } -func NewEmployeeMaritalStatusFromString(value string) *EmployeeMaritalStatus { - return &EmployeeMaritalStatus{typeName: "string", String: value} +func (e *EmployeeMaritalStatus) GetString() string { + if e == nil { + return "" + } + return e.String } func (e *EmployeeMaritalStatus) UnmarshalJSON(data []byte) error { var valueMaritalStatusEnum MaritalStatusEnum if err := json.Unmarshal(data, &valueMaritalStatusEnum); err == nil { - e.typeName = "maritalStatusEnum" + e.typ = "MaritalStatusEnum" e.MaritalStatusEnum = valueMaritalStatusEnum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" + e.typ = "String" e.String = valueString return nil } @@ -3360,14 +2624,13 @@ func (e *EmployeeMaritalStatus) UnmarshalJSON(data []byte) error { } func (e EmployeeMaritalStatus) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "maritalStatusEnum": + if e.typ == "MaritalStatusEnum" || e.MaritalStatusEnum != "" { return json.Marshal(e.MaritalStatusEnum) - case "string": + } + if e.typ == "String" || e.String != "" { return json.Marshal(e.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) } type EmployeeMaritalStatusVisitor interface { @@ -3376,41 +2639,47 @@ type EmployeeMaritalStatusVisitor interface { } func (e *EmployeeMaritalStatus) Accept(visitor EmployeeMaritalStatusVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "maritalStatusEnum": + if e.typ == "MaritalStatusEnum" || e.MaritalStatusEnum != "" { return visitor.VisitMaritalStatusEnum(e.MaritalStatusEnum) - case "string": + } + if e.typ == "String" || e.String != "" { return visitor.VisitString(e.String) } + return fmt.Errorf("type %T does not include a non-empty union type", e) } // The employee's pay group type EmployeePayGroup struct { - typeName string String string PayGroup *PayGroup + + typ string } -func NewEmployeePayGroupFromString(value string) *EmployeePayGroup { - return &EmployeePayGroup{typeName: "string", String: value} +func (e *EmployeePayGroup) GetString() string { + if e == nil { + return "" + } + return e.String } -func NewEmployeePayGroupFromPayGroup(value *PayGroup) *EmployeePayGroup { - return &EmployeePayGroup{typeName: "payGroup", PayGroup: value} +func (e *EmployeePayGroup) GetPayGroup() *PayGroup { + if e == nil { + return nil + } + return e.PayGroup } func (e *EmployeePayGroup) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" + e.typ = "String" e.String = valueString return nil } valuePayGroup := new(PayGroup) if err := json.Unmarshal(data, &valuePayGroup); err == nil { - e.typeName = "payGroup" + e.typ = "PayGroup" e.PayGroup = valuePayGroup return nil } @@ -3418,14 +2687,13 @@ func (e *EmployeePayGroup) UnmarshalJSON(data []byte) error { } func (e EmployeePayGroup) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": + if e.typ == "String" || e.String != "" { return json.Marshal(e.String) - case "payGroup": + } + if e.typ == "PayGroup" || e.PayGroup != nil { return json.Marshal(e.PayGroup) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) } type EmployeePayGroupVisitor interface { @@ -3434,9141 +2702,6249 @@ type EmployeePayGroupVisitor interface { } func (e *EmployeePayGroup) Accept(visitor EmployeePayGroupVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": + if e.typ == "String" || e.String != "" { return visitor.VisitString(e.String) - case "payGroup": + } + if e.typ == "PayGroup" || e.PayGroup != nil { return visitor.VisitPayGroup(e.PayGroup) } + return fmt.Errorf("type %T does not include a non-empty union type", e) } -// # The EmployeePayrollRun Object -// -// ### Description -// -// The `EmployeePayrollRun` object is used to represent an employee's pay statement for a specific payroll run. -// -// ### Usage Example -// -// Fetch from the `LIST EmployeePayrollRun` endpoint and filter by `ID` to show all employee payroll runs. -type EmployeePayrollRun struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The employee whose payroll is being run. - Employee *EmployeePayrollRunEmployee `json:"employee,omitempty"` - // The payroll being run. - PayrollRun *EmployeePayrollRunPayrollRun `json:"payroll_run,omitempty"` - // The total earnings throughout a given period for an employee before any deductions are made. - GrossPay *float64 `json:"gross_pay,omitempty"` - // The take-home pay throughout a given period for an employee after deductions are made. - NetPay *float64 `json:"net_pay,omitempty"` - // The day and time the payroll run started. - StartDate *time.Time `json:"start_date,omitempty"` - // The day and time the payroll run ended. - EndDate *time.Time `json:"end_date,omitempty"` - // The day and time the payroll run was checked. - CheckDate *time.Time `json:"check_date,omitempty"` - Earnings []*Earning `json:"earnings,omitempty"` - Deductions []*Deduction `json:"deductions,omitempty"` - Taxes []*Tax `json:"taxes,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` +// The employee's team. +type EmployeeTeam struct { + String string + Team *Team - _rawJSON json.RawMessage + typ string } -func (e *EmployeePayrollRun) UnmarshalJSON(data []byte) error { - type unmarshaler EmployeePayrollRun - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (e *EmployeeTeam) GetString() string { + if e == nil { + return "" } - *e = EmployeePayrollRun(value) - e._rawJSON = json.RawMessage(data) - return nil + return e.String } -func (e *EmployeePayrollRun) String() string { - if len(e._rawJSON) > 0 { - if value, err := core.StringifyJSON(e._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(e); err == nil { - return value +func (e *EmployeeTeam) GetTeam() *Team { + if e == nil { + return nil } - return fmt.Sprintf("%#v", e) -} - -// The employee whose payroll is being run. -type EmployeePayrollRunEmployee struct { - typeName string - String string - Employee *Employee -} - -func NewEmployeePayrollRunEmployeeFromString(value string) *EmployeePayrollRunEmployee { - return &EmployeePayrollRunEmployee{typeName: "string", String: value} + return e.Team } -func NewEmployeePayrollRunEmployeeFromEmployee(value *Employee) *EmployeePayrollRunEmployee { - return &EmployeePayrollRunEmployee{typeName: "employee", Employee: value} -} - -func (e *EmployeePayrollRunEmployee) UnmarshalJSON(data []byte) error { +func (e *EmployeeTeam) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" + e.typ = "String" e.String = valueString return nil } - valueEmployee := new(Employee) - if err := json.Unmarshal(data, &valueEmployee); err == nil { - e.typeName = "employee" - e.Employee = valueEmployee + valueTeam := new(Team) + if err := json.Unmarshal(data, &valueTeam); err == nil { + e.typ = "Team" + e.Team = valueTeam return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, e) } -func (e EmployeePayrollRunEmployee) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": +func (e EmployeeTeam) MarshalJSON() ([]byte, error) { + if e.typ == "String" || e.String != "" { return json.Marshal(e.String) - case "employee": - return json.Marshal(e.Employee) } + if e.typ == "Team" || e.Team != nil { + return json.Marshal(e.Team) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) } -type EmployeePayrollRunEmployeeVisitor interface { +type EmployeeTeamVisitor interface { VisitString(string) error - VisitEmployee(*Employee) error + VisitTeam(*Team) error } -func (e *EmployeePayrollRunEmployee) Accept(visitor EmployeePayrollRunEmployeeVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": +func (e *EmployeeTeam) Accept(visitor EmployeeTeamVisitor) error { + if e.typ == "String" || e.String != "" { return visitor.VisitString(e.String) - case "employee": - return visitor.VisitEmployee(e.Employee) } + if e.typ == "Team" || e.Team != nil { + return visitor.VisitTeam(e.Team) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) } -// The payroll being run. -type EmployeePayrollRunPayrollRun struct { - typeName string - String string - PayrollRun *PayrollRun +// The employee's work address. +type EmployeeWorkLocation struct { + String string + Location *Location + + typ string } -func NewEmployeePayrollRunPayrollRunFromString(value string) *EmployeePayrollRunPayrollRun { - return &EmployeePayrollRunPayrollRun{typeName: "string", String: value} +func (e *EmployeeWorkLocation) GetString() string { + if e == nil { + return "" + } + return e.String } -func NewEmployeePayrollRunPayrollRunFromPayrollRun(value *PayrollRun) *EmployeePayrollRunPayrollRun { - return &EmployeePayrollRunPayrollRun{typeName: "payrollRun", PayrollRun: value} +func (e *EmployeeWorkLocation) GetLocation() *Location { + if e == nil { + return nil + } + return e.Location } -func (e *EmployeePayrollRunPayrollRun) UnmarshalJSON(data []byte) error { +func (e *EmployeeWorkLocation) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" + e.typ = "String" e.String = valueString return nil } - valuePayrollRun := new(PayrollRun) - if err := json.Unmarshal(data, &valuePayrollRun); err == nil { - e.typeName = "payrollRun" - e.PayrollRun = valuePayrollRun + valueLocation := new(Location) + if err := json.Unmarshal(data, &valueLocation); err == nil { + e.typ = "Location" + e.Location = valueLocation return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, e) } -func (e EmployeePayrollRunPayrollRun) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": +func (e EmployeeWorkLocation) MarshalJSON() ([]byte, error) { + if e.typ == "String" || e.String != "" { return json.Marshal(e.String) - case "payrollRun": - return json.Marshal(e.PayrollRun) } + if e.typ == "Location" || e.Location != nil { + return json.Marshal(e.Location) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) } -type EmployeePayrollRunPayrollRunVisitor interface { +type EmployeeWorkLocationVisitor interface { VisitString(string) error - VisitPayrollRun(*PayrollRun) error + VisitLocation(*Location) error } -func (e *EmployeePayrollRunPayrollRun) Accept(visitor EmployeePayrollRunPayrollRunVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": +func (e *EmployeeWorkLocation) Accept(visitor EmployeeWorkLocationVisitor) error { + if e.typ == "String" || e.String != "" { return visitor.VisitString(e.String) - case "payrollRun": - return visitor.VisitPayrollRun(e.PayrollRun) } + if e.typ == "Location" || e.Location != nil { + return visitor.VisitLocation(e.Location) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) } -// # The Employee Object -// +// # The Employment Object // ### Description +// The `Employment` object is used to represent a job position at a company. // -// The `Employee` object is used to represent any person who has been employed by a company. By default, it returns all employees. To filter for only active employees, set the `employment_status` query parameter to `ACTIVE`. +// If an integration supports historical tracking of employments, it will be reflected in the data. If not, a new `Employment` object will be created whenever there is a change in job title or pay. The `effective_date` field should be used to order `Employment` objects, with the most recent date corresponding to the latest employment record for an employee. // // ### Usage Example -// -// Fetch from the `LIST Employee` endpoint and filter by `ID` to show all employees. -type EmployeeRequest struct { - // The employee's number that appears in the third-party integration's UI. - EmployeeNumber *string `json:"employee_number,omitempty"` - // The ID of the employee's company. - Company *EmployeeRequestCompany `json:"company,omitempty"` - // The employee's first name. - FirstName *string `json:"first_name,omitempty"` - // The employee's last name. - LastName *string `json:"last_name,omitempty"` - // The employee's preferred first name. - PreferredName *string `json:"preferred_name,omitempty"` - // The employee's full name, to use for display purposes. If a preferred first name is available, the full name will include the preferred first name. - DisplayFullName *string `json:"display_full_name,omitempty"` - // The employee's username that appears in the remote UI. - Username *string `json:"username,omitempty"` - Groups []*EmployeeRequestGroupsItem `json:"groups,omitempty"` - // The employee's work email. - WorkEmail *string `json:"work_email,omitempty"` - // The employee's personal email. - PersonalEmail *string `json:"personal_email,omitempty"` - // The employee's mobile phone number. - MobilePhoneNumber *string `json:"mobile_phone_number,omitempty"` - // Array of `Employment` IDs for this Employee. - Employments []*EmployeeRequestEmploymentsItem `json:"employments,omitempty"` - // The employee's home address. - HomeLocation *EmployeeRequestHomeLocation `json:"home_location,omitempty"` - // The employee's work address. - WorkLocation *EmployeeRequestWorkLocation `json:"work_location,omitempty"` - // The employee ID of the employee's manager. - Manager *EmployeeRequestManager `json:"manager,omitempty"` - // The employee's team. - Team *EmployeeRequestTeam `json:"team,omitempty"` - // The employee's pay group - PayGroup *EmployeeRequestPayGroup `json:"pay_group,omitempty"` - // The employee's social security number. - Ssn *string `json:"ssn,omitempty"` - // The employee's gender. +// Fetch from the `LIST Employments` endpoint and filter by `ID` to show all employees. +type Employment struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The employee holding this position. + Employee *EmploymentEmployee `json:"employee,omitempty" url:"employee,omitempty"` + // The position's title. + JobTitle *string `json:"job_title,omitempty" url:"job_title,omitempty"` + // The position's pay rate. + PayRate *float64 `json:"pay_rate,omitempty" url:"pay_rate,omitempty"` + // The time period this pay rate encompasses. // - // - `MALE` - MALE - // - `FEMALE` - FEMALE - // - `NON-BINARY` - NON-BINARY - // - `OTHER` - OTHER - // - `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE - Gender *EmployeeRequestGender `json:"gender,omitempty"` - // The employee's ethnicity. + // * `HOUR` - HOUR + // * `DAY` - DAY + // * `WEEK` - WEEK + // * `EVERY_TWO_WEEKS` - EVERY_TWO_WEEKS + // * `SEMIMONTHLY` - SEMIMONTHLY + // * `MONTH` - MONTH + // * `QUARTER` - QUARTER + // * `EVERY_SIX_MONTHS` - EVERY_SIX_MONTHS + // * `YEAR` - YEAR + PayPeriod *EmploymentPayPeriod `json:"pay_period,omitempty" url:"pay_period,omitempty"` + // The position's pay frequency. // - // - `AMERICAN_INDIAN_OR_ALASKA_NATIVE` - AMERICAN_INDIAN_OR_ALASKA_NATIVE - // - `ASIAN_OR_INDIAN_SUBCONTINENT` - ASIAN_OR_INDIAN_SUBCONTINENT - // - `BLACK_OR_AFRICAN_AMERICAN` - BLACK_OR_AFRICAN_AMERICAN - // - `HISPANIC_OR_LATINO` - HISPANIC_OR_LATINO - // - `NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER` - NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER - // - `TWO_OR_MORE_RACES` - TWO_OR_MORE_RACES - // - `WHITE` - WHITE - // - `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE - Ethnicity *EmployeeRequestEthnicity `json:"ethnicity,omitempty"` - // The employee's filing status as related to marital status. + // * `WEEKLY` - WEEKLY + // * `BIWEEKLY` - BIWEEKLY + // * `MONTHLY` - MONTHLY + // * `QUARTERLY` - QUARTERLY + // * `SEMIANNUALLY` - SEMIANNUALLY + // * `ANNUALLY` - ANNUALLY + // * `THIRTEEN-MONTHLY` - THIRTEEN-MONTHLY + // * `PRO_RATA` - PRO_RATA + // * `SEMIMONTHLY` - SEMIMONTHLY + PayFrequency *EmploymentPayFrequency `json:"pay_frequency,omitempty" url:"pay_frequency,omitempty"` + // The position's currency code. // - // - `SINGLE` - SINGLE - // - `MARRIED_FILING_JOINTLY` - MARRIED_FILING_JOINTLY - // - `MARRIED_FILING_SEPARATELY` - MARRIED_FILING_SEPARATELY - // - `HEAD_OF_HOUSEHOLD` - HEAD_OF_HOUSEHOLD - // - `QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD` - QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD - MaritalStatus *EmployeeRequestMaritalStatus `json:"marital_status,omitempty"` - // The employee's date of birth. - DateOfBirth *time.Time `json:"date_of_birth,omitempty"` - // The date that the employee was hired, usually the day that an offer letter is signed. If an employee has multiple hire dates from previous employments, this represents the most recent hire date. Note: If you're looking for the employee's start date, refer to the start_date field. - HireDate *time.Time `json:"hire_date,omitempty"` - // The date that the employee started working. If an employee was rehired, the most recent start date will be returned. - StartDate *time.Time `json:"start_date,omitempty"` - // The employment status of the employee. + // * `XUA` - ADB Unit of Account + // * `AFN` - Afghan Afghani + // * `AFA` - Afghan Afghani (1927–2002) + // * `ALL` - Albanian Lek + // * `ALK` - Albanian Lek (1946–1965) + // * `DZD` - Algerian Dinar + // * `ADP` - Andorran Peseta + // * `AOA` - Angolan Kwanza + // * `AOK` - Angolan Kwanza (1977–1991) + // * `AON` - Angolan New Kwanza (1990–2000) + // * `AOR` - Angolan Readjusted Kwanza (1995–1999) + // * `ARA` - Argentine Austral + // * `ARS` - Argentine Peso + // * `ARM` - Argentine Peso (1881–1970) + // * `ARP` - Argentine Peso (1983–1985) + // * `ARL` - Argentine Peso Ley (1970–1983) + // * `AMD` - Armenian Dram + // * `AWG` - Aruban Florin + // * `AUD` - Australian Dollar + // * `ATS` - Austrian Schilling + // * `AZN` - Azerbaijani Manat + // * `AZM` - Azerbaijani Manat (1993–2006) + // * `BSD` - Bahamian Dollar + // * `BHD` - Bahraini Dinar + // * `BDT` - Bangladeshi Taka + // * `BBD` - Barbadian Dollar + // * `BYN` - Belarusian Ruble + // * `BYB` - Belarusian Ruble (1994–1999) + // * `BYR` - Belarusian Ruble (2000–2016) + // * `BEF` - Belgian Franc + // * `BEC` - Belgian Franc (convertible) + // * `BEL` - Belgian Franc (financial) + // * `BZD` - Belize Dollar + // * `BMD` - Bermudan Dollar + // * `BTN` - Bhutanese Ngultrum + // * `BOB` - Bolivian Boliviano + // * `BOL` - Bolivian Boliviano (1863–1963) + // * `BOV` - Bolivian Mvdol + // * `BOP` - Bolivian Peso + // * `BAM` - Bosnia-Herzegovina Convertible Mark + // * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) + // * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) + // * `BWP` - Botswanan Pula + // * `BRC` - Brazilian Cruzado (1986–1989) + // * `BRZ` - Brazilian Cruzeiro (1942–1967) + // * `BRE` - Brazilian Cruzeiro (1990–1993) + // * `BRR` - Brazilian Cruzeiro (1993–1994) + // * `BRN` - Brazilian New Cruzado (1989–1990) + // * `BRB` - Brazilian New Cruzeiro (1967–1986) + // * `BRL` - Brazilian Real + // * `GBP` - British Pound + // * `BND` - Brunei Dollar + // * `BGL` - Bulgarian Hard Lev + // * `BGN` - Bulgarian Lev + // * `BGO` - Bulgarian Lev (1879–1952) + // * `BGM` - Bulgarian Socialist Lev + // * `BUK` - Burmese Kyat + // * `BIF` - Burundian Franc + // * `XPF` - CFP Franc + // * `KHR` - Cambodian Riel + // * `CAD` - Canadian Dollar + // * `CVE` - Cape Verdean Escudo + // * `KYD` - Cayman Islands Dollar + // * `XAF` - Central African CFA Franc + // * `CLE` - Chilean Escudo + // * `CLP` - Chilean Peso + // * `CLF` - Chilean Unit of Account (UF) + // * `CNX` - Chinese People’s Bank Dollar + // * `CNY` - Chinese Yuan + // * `CNH` - Chinese Yuan (offshore) + // * `COP` - Colombian Peso + // * `COU` - Colombian Real Value Unit + // * `KMF` - Comorian Franc + // * `CDF` - Congolese Franc + // * `CRC` - Costa Rican Colón + // * `HRD` - Croatian Dinar + // * `HRK` - Croatian Kuna + // * `CUC` - Cuban Convertible Peso + // * `CUP` - Cuban Peso + // * `CYP` - Cypriot Pound + // * `CZK` - Czech Koruna + // * `CSK` - Czechoslovak Hard Koruna + // * `DKK` - Danish Krone + // * `DJF` - Djiboutian Franc + // * `DOP` - Dominican Peso + // * `NLG` - Dutch Guilder + // * `XCD` - East Caribbean Dollar + // * `DDM` - East German Mark + // * `ECS` - Ecuadorian Sucre + // * `ECV` - Ecuadorian Unit of Constant Value + // * `EGP` - Egyptian Pound + // * `GQE` - Equatorial Guinean Ekwele + // * `ERN` - Eritrean Nakfa + // * `EEK` - Estonian Kroon + // * `ETB` - Ethiopian Birr + // * `EUR` - Euro + // * `XBA` - European Composite Unit + // * `XEU` - European Currency Unit + // * `XBB` - European Monetary Unit + // * `XBC` - European Unit of Account (XBC) + // * `XBD` - European Unit of Account (XBD) + // * `FKP` - Falkland Islands Pound + // * `FJD` - Fijian Dollar + // * `FIM` - Finnish Markka + // * `FRF` - French Franc + // * `XFO` - French Gold Franc + // * `XFU` - French UIC-Franc + // * `GMD` - Gambian Dalasi + // * `GEK` - Georgian Kupon Larit + // * `GEL` - Georgian Lari + // * `DEM` - German Mark + // * `GHS` - Ghanaian Cedi + // * `GHC` - Ghanaian Cedi (1979–2007) + // * `GIP` - Gibraltar Pound + // * `XAU` - Gold + // * `GRD` - Greek Drachma + // * `GTQ` - Guatemalan Quetzal + // * `GWP` - Guinea-Bissau Peso + // * `GNF` - Guinean Franc + // * `GNS` - Guinean Syli + // * `GYD` - Guyanaese Dollar + // * `HTG` - Haitian Gourde + // * `HNL` - Honduran Lempira + // * `HKD` - Hong Kong Dollar + // * `HUF` - Hungarian Forint + // * `IMP` - IMP + // * `ISK` - Icelandic Króna + // * `ISJ` - Icelandic Króna (1918–1981) + // * `INR` - Indian Rupee + // * `IDR` - Indonesian Rupiah + // * `IRR` - Iranian Rial + // * `IQD` - Iraqi Dinar + // * `IEP` - Irish Pound + // * `ILS` - Israeli New Shekel + // * `ILP` - Israeli Pound + // * `ILR` - Israeli Shekel (1980–1985) + // * `ITL` - Italian Lira + // * `JMD` - Jamaican Dollar + // * `JPY` - Japanese Yen + // * `JOD` - Jordanian Dinar + // * `KZT` - Kazakhstani Tenge + // * `KES` - Kenyan Shilling + // * `KWD` - Kuwaiti Dinar + // * `KGS` - Kyrgystani Som + // * `LAK` - Laotian Kip + // * `LVL` - Latvian Lats + // * `LVR` - Latvian Ruble + // * `LBP` - Lebanese Pound + // * `LSL` - Lesotho Loti + // * `LRD` - Liberian Dollar + // * `LYD` - Libyan Dinar + // * `LTL` - Lithuanian Litas + // * `LTT` - Lithuanian Talonas + // * `LUL` - Luxembourg Financial Franc + // * `LUC` - Luxembourgian Convertible Franc + // * `LUF` - Luxembourgian Franc + // * `MOP` - Macanese Pataca + // * `MKD` - Macedonian Denar + // * `MKN` - Macedonian Denar (1992–1993) + // * `MGA` - Malagasy Ariary + // * `MGF` - Malagasy Franc + // * `MWK` - Malawian Kwacha + // * `MYR` - Malaysian Ringgit + // * `MVR` - Maldivian Rufiyaa + // * `MVP` - Maldivian Rupee (1947–1981) + // * `MLF` - Malian Franc + // * `MTL` - Maltese Lira + // * `MTP` - Maltese Pound + // * `MRU` - Mauritanian Ouguiya + // * `MRO` - Mauritanian Ouguiya (1973–2017) + // * `MUR` - Mauritian Rupee + // * `MXV` - Mexican Investment Unit + // * `MXN` - Mexican Peso + // * `MXP` - Mexican Silver Peso (1861–1992) + // * `MDC` - Moldovan Cupon + // * `MDL` - Moldovan Leu + // * `MCF` - Monegasque Franc + // * `MNT` - Mongolian Tugrik + // * `MAD` - Moroccan Dirham + // * `MAF` - Moroccan Franc + // * `MZE` - Mozambican Escudo + // * `MZN` - Mozambican Metical + // * `MZM` - Mozambican Metical (1980–2006) + // * `MMK` - Myanmar Kyat + // * `NAD` - Namibian Dollar + // * `NPR` - Nepalese Rupee + // * `ANG` - Netherlands Antillean Guilder + // * `TWD` - New Taiwan Dollar + // * `NZD` - New Zealand Dollar + // * `NIO` - Nicaraguan Córdoba + // * `NIC` - Nicaraguan Córdoba (1988–1991) + // * `NGN` - Nigerian Naira + // * `KPW` - North Korean Won + // * `NOK` - Norwegian Krone + // * `OMR` - Omani Rial + // * `PKR` - Pakistani Rupee + // * `XPD` - Palladium + // * `PAB` - Panamanian Balboa + // * `PGK` - Papua New Guinean Kina + // * `PYG` - Paraguayan Guarani + // * `PEI` - Peruvian Inti + // * `PEN` - Peruvian Sol + // * `PES` - Peruvian Sol (1863–1965) + // * `PHP` - Philippine Peso + // * `XPT` - Platinum + // * `PLN` - Polish Zloty + // * `PLZ` - Polish Zloty (1950–1995) + // * `PTE` - Portuguese Escudo + // * `GWE` - Portuguese Guinea Escudo + // * `QAR` - Qatari Rial + // * `XRE` - RINET Funds + // * `RHD` - Rhodesian Dollar + // * `RON` - Romanian Leu + // * `ROL` - Romanian Leu (1952–2006) + // * `RUB` - Russian Ruble + // * `RUR` - Russian Ruble (1991–1998) + // * `RWF` - Rwandan Franc + // * `SVC` - Salvadoran Colón + // * `WST` - Samoan Tala + // * `SAR` - Saudi Riyal + // * `RSD` - Serbian Dinar + // * `CSD` - Serbian Dinar (2002–2006) + // * `SCR` - Seychellois Rupee + // * `SLL` - Sierra Leonean Leone + // * `XAG` - Silver + // * `SGD` - Singapore Dollar + // * `SKK` - Slovak Koruna + // * `SIT` - Slovenian Tolar + // * `SBD` - Solomon Islands Dollar + // * `SOS` - Somali Shilling + // * `ZAR` - South African Rand + // * `ZAL` - South African Rand (financial) + // * `KRH` - South Korean Hwan (1953–1962) + // * `KRW` - South Korean Won + // * `KRO` - South Korean Won (1945–1953) + // * `SSP` - South Sudanese Pound + // * `SUR` - Soviet Rouble + // * `ESP` - Spanish Peseta + // * `ESA` - Spanish Peseta (A account) + // * `ESB` - Spanish Peseta (convertible account) + // * `XDR` - Special Drawing Rights + // * `LKR` - Sri Lankan Rupee + // * `SHP` - St. Helena Pound + // * `XSU` - Sucre + // * `SDD` - Sudanese Dinar (1992–2007) + // * `SDG` - Sudanese Pound + // * `SDP` - Sudanese Pound (1957–1998) + // * `SRD` - Surinamese Dollar + // * `SRG` - Surinamese Guilder + // * `SZL` - Swazi Lilangeni + // * `SEK` - Swedish Krona + // * `CHF` - Swiss Franc + // * `SYP` - Syrian Pound + // * `STN` - São Tomé & Príncipe Dobra + // * `STD` - São Tomé & Príncipe Dobra (1977–2017) + // * `TVD` - TVD + // * `TJR` - Tajikistani Ruble + // * `TJS` - Tajikistani Somoni + // * `TZS` - Tanzanian Shilling + // * `XTS` - Testing Currency Code + // * `THB` - Thai Baht + // * `XXX` - The codes assigned for transactions where no currency is involved + // * `TPE` - Timorese Escudo + // * `TOP` - Tongan Paʻanga + // * `TTD` - Trinidad & Tobago Dollar + // * `TND` - Tunisian Dinar + // * `TRY` - Turkish Lira + // * `TRL` - Turkish Lira (1922–2005) + // * `TMT` - Turkmenistani Manat + // * `TMM` - Turkmenistani Manat (1993–2009) + // * `USD` - US Dollar + // * `USN` - US Dollar (Next day) + // * `USS` - US Dollar (Same day) + // * `UGX` - Ugandan Shilling + // * `UGS` - Ugandan Shilling (1966–1987) + // * `UAH` - Ukrainian Hryvnia + // * `UAK` - Ukrainian Karbovanets + // * `AED` - United Arab Emirates Dirham + // * `UYW` - Uruguayan Nominal Wage Index Unit + // * `UYU` - Uruguayan Peso + // * `UYP` - Uruguayan Peso (1975–1993) + // * `UYI` - Uruguayan Peso (Indexed Units) + // * `UZS` - Uzbekistani Som + // * `VUV` - Vanuatu Vatu + // * `VES` - Venezuelan Bolívar + // * `VEB` - Venezuelan Bolívar (1871–2008) + // * `VEF` - Venezuelan Bolívar (2008–2018) + // * `VND` - Vietnamese Dong + // * `VNN` - Vietnamese Dong (1978–1985) + // * `CHE` - WIR Euro + // * `CHW` - WIR Franc + // * `XOF` - West African CFA Franc + // * `YDD` - Yemeni Dinar + // * `YER` - Yemeni Rial + // * `YUN` - Yugoslavian Convertible Dinar (1990–1992) + // * `YUD` - Yugoslavian Hard Dinar (1966–1990) + // * `YUM` - Yugoslavian New Dinar (1994–2002) + // * `YUR` - Yugoslavian Reformed Dinar (1992–1993) + // * `ZWN` - ZWN + // * `ZRN` - Zairean New Zaire (1993–1998) + // * `ZRZ` - Zairean Zaire (1971–1993) + // * `ZMW` - Zambian Kwacha + // * `ZMK` - Zambian Kwacha (1968–2012) + // * `ZWD` - Zimbabwean Dollar (1980–2008) + // * `ZWR` - Zimbabwean Dollar (2008) + // * `ZWL` - Zimbabwean Dollar (2009) + PayCurrency *EmploymentPayCurrency `json:"pay_currency,omitempty" url:"pay_currency,omitempty"` + // The employment's pay group + PayGroup *EmploymentPayGroup `json:"pay_group,omitempty" url:"pay_group,omitempty"` + // The position's FLSA status. // - // - `ACTIVE` - ACTIVE - // - `PENDING` - PENDING - // - `INACTIVE` - INACTIVE - EmploymentStatus *EmployeeRequestEmploymentStatus `json:"employment_status,omitempty"` - // The employee's termination date. - TerminationDate *time.Time `json:"termination_date,omitempty"` - // The URL of the employee's avatar image. - Avatar *string `json:"avatar,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` + // * `EXEMPT` - EXEMPT + // * `SALARIED_NONEXEMPT` - SALARIED_NONEXEMPT + // * `NONEXEMPT` - NONEXEMPT + // * `OWNER` - OWNER + FlsaStatus *EmploymentFlsaStatus `json:"flsa_status,omitempty" url:"flsa_status,omitempty"` + // The position's effective date. + EffectiveDate *time.Time `json:"effective_date,omitempty" url:"effective_date,omitempty"` + // The position's type of employment. + // + // * `FULL_TIME` - FULL_TIME + // * `PART_TIME` - PART_TIME + // * `INTERN` - INTERN + // * `CONTRACTOR` - CONTRACTOR + // * `FREELANCE` - FREELANCE + EmploymentType *EmploymentEmploymentType `json:"employment_type,omitempty" url:"employment_type,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (e *EmployeeRequest) UnmarshalJSON(data []byte) error { - type unmarshaler EmployeeRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (e *Employment) GetId() *string { + if e == nil { + return nil } - *e = EmployeeRequest(value) - e._rawJSON = json.RawMessage(data) - return nil + return e.Id } -func (e *EmployeeRequest) String() string { - if len(e._rawJSON) > 0 { - if value, err := core.StringifyJSON(e._rawJSON); err == nil { - return value - } +func (e *Employment) GetRemoteId() *string { + if e == nil { + return nil } - if value, err := core.StringifyJSON(e); err == nil { - return value + return e.RemoteId +} + +func (e *Employment) GetCreatedAt() *time.Time { + if e == nil { + return nil } - return fmt.Sprintf("%#v", e) + return e.CreatedAt } -// The ID of the employee's company. -type EmployeeRequestCompany struct { - typeName string - String string - Company *Company +func (e *Employment) GetModifiedAt() *time.Time { + if e == nil { + return nil + } + return e.ModifiedAt } -func NewEmployeeRequestCompanyFromString(value string) *EmployeeRequestCompany { - return &EmployeeRequestCompany{typeName: "string", String: value} +func (e *Employment) GetEmployee() *EmploymentEmployee { + if e == nil { + return nil + } + return e.Employee } -func NewEmployeeRequestCompanyFromCompany(value *Company) *EmployeeRequestCompany { - return &EmployeeRequestCompany{typeName: "company", Company: value} +func (e *Employment) GetJobTitle() *string { + if e == nil { + return nil + } + return e.JobTitle } -func (e *EmployeeRequestCompany) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString +func (e *Employment) GetPayRate() *float64 { + if e == nil { return nil } - valueCompany := new(Company) - if err := json.Unmarshal(data, &valueCompany); err == nil { - e.typeName = "company" - e.Company = valueCompany + return e.PayRate +} + +func (e *Employment) GetPayPeriod() *EmploymentPayPeriod { + if e == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) + return e.PayPeriod } -func (e EmployeeRequestCompany) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return json.Marshal(e.String) - case "company": - return json.Marshal(e.Company) +func (e *Employment) GetPayFrequency() *EmploymentPayFrequency { + if e == nil { + return nil } + return e.PayFrequency } -type EmployeeRequestCompanyVisitor interface { - VisitString(string) error - VisitCompany(*Company) error +func (e *Employment) GetPayCurrency() *EmploymentPayCurrency { + if e == nil { + return nil + } + return e.PayCurrency } -func (e *EmployeeRequestCompany) Accept(visitor EmployeeRequestCompanyVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return visitor.VisitString(e.String) - case "company": - return visitor.VisitCompany(e.Company) +func (e *Employment) GetPayGroup() *EmploymentPayGroup { + if e == nil { + return nil } + return e.PayGroup } -// The employment status of the employee. -// -// - `ACTIVE` - ACTIVE -// - `PENDING` - PENDING -// - `INACTIVE` - INACTIVE -type EmployeeRequestEmploymentStatus struct { - typeName string - EmploymentStatusEnum EmploymentStatusEnum - String string +func (e *Employment) GetFlsaStatus() *EmploymentFlsaStatus { + if e == nil { + return nil + } + return e.FlsaStatus } -func NewEmployeeRequestEmploymentStatusFromEmploymentStatusEnum(value EmploymentStatusEnum) *EmployeeRequestEmploymentStatus { - return &EmployeeRequestEmploymentStatus{typeName: "employmentStatusEnum", EmploymentStatusEnum: value} +func (e *Employment) GetEffectiveDate() *time.Time { + if e == nil { + return nil + } + return e.EffectiveDate } -func NewEmployeeRequestEmploymentStatusFromString(value string) *EmployeeRequestEmploymentStatus { - return &EmployeeRequestEmploymentStatus{typeName: "string", String: value} +func (e *Employment) GetEmploymentType() *EmploymentEmploymentType { + if e == nil { + return nil + } + return e.EmploymentType } -func (e *EmployeeRequestEmploymentStatus) UnmarshalJSON(data []byte) error { - var valueEmploymentStatusEnum EmploymentStatusEnum - if err := json.Unmarshal(data, &valueEmploymentStatusEnum); err == nil { - e.typeName = "employmentStatusEnum" - e.EmploymentStatusEnum = valueEmploymentStatusEnum +func (e *Employment) GetRemoteWasDeleted() *bool { + if e == nil { return nil } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString + return e.RemoteWasDeleted +} + +func (e *Employment) GetFieldMappings() map[string]interface{} { + if e == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) + return e.FieldMappings } -func (e EmployeeRequestEmploymentStatus) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "employmentStatusEnum": - return json.Marshal(e.EmploymentStatusEnum) - case "string": - return json.Marshal(e.String) +func (e *Employment) GetRemoteData() []*RemoteData { + if e == nil { + return nil } + return e.RemoteData } -type EmployeeRequestEmploymentStatusVisitor interface { - VisitEmploymentStatusEnum(EmploymentStatusEnum) error - VisitString(string) error +func (e *Employment) GetExtraProperties() map[string]interface{} { + return e.extraProperties } -func (e *EmployeeRequestEmploymentStatus) Accept(visitor EmployeeRequestEmploymentStatusVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "employmentStatusEnum": - return visitor.VisitEmploymentStatusEnum(e.EmploymentStatusEnum) - case "string": - return visitor.VisitString(e.String) +func (e *Employment) UnmarshalJSON(data []byte) error { + type embed Employment + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + EffectiveDate *internal.DateTime `json:"effective_date,omitempty"` + }{ + embed: embed(*e), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err } + *e = Employment(unmarshaler.embed) + e.CreatedAt = unmarshaler.CreatedAt.TimePtr() + e.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + e.EffectiveDate = unmarshaler.EffectiveDate.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *e) + if err != nil { + return err + } + e.extraProperties = extraProperties + e.rawJSON = json.RawMessage(data) + return nil } -type EmployeeRequestEmploymentsItem struct { - typeName string - String string - Employment *Employment +func (e *Employment) MarshalJSON() ([]byte, error) { + type embed Employment + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + EffectiveDate *internal.DateTime `json:"effective_date,omitempty"` + }{ + embed: embed(*e), + CreatedAt: internal.NewOptionalDateTime(e.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(e.ModifiedAt), + EffectiveDate: internal.NewOptionalDateTime(e.EffectiveDate), + } + return json.Marshal(marshaler) +} + +func (e *Employment) String() string { + if len(e.rawJSON) > 0 { + if value, err := internal.StringifyJSON(e.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(e); err == nil { + return value + } + return fmt.Sprintf("%#v", e) +} + +// The employee holding this position. +type EmploymentEmployee struct { + String string + Employee *Employee + + typ string } -func NewEmployeeRequestEmploymentsItemFromString(value string) *EmployeeRequestEmploymentsItem { - return &EmployeeRequestEmploymentsItem{typeName: "string", String: value} +func (e *EmploymentEmployee) GetString() string { + if e == nil { + return "" + } + return e.String } -func NewEmployeeRequestEmploymentsItemFromEmployment(value *Employment) *EmployeeRequestEmploymentsItem { - return &EmployeeRequestEmploymentsItem{typeName: "employment", Employment: value} +func (e *EmploymentEmployee) GetEmployee() *Employee { + if e == nil { + return nil + } + return e.Employee } -func (e *EmployeeRequestEmploymentsItem) UnmarshalJSON(data []byte) error { +func (e *EmploymentEmployee) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" + e.typ = "String" e.String = valueString return nil } - valueEmployment := new(Employment) - if err := json.Unmarshal(data, &valueEmployment); err == nil { - e.typeName = "employment" - e.Employment = valueEmployment + valueEmployee := new(Employee) + if err := json.Unmarshal(data, &valueEmployee); err == nil { + e.typ = "Employee" + e.Employee = valueEmployee return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, e) } -func (e EmployeeRequestEmploymentsItem) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": +func (e EmploymentEmployee) MarshalJSON() ([]byte, error) { + if e.typ == "String" || e.String != "" { return json.Marshal(e.String) - case "employment": - return json.Marshal(e.Employment) } + if e.typ == "Employee" || e.Employee != nil { + return json.Marshal(e.Employee) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) } -type EmployeeRequestEmploymentsItemVisitor interface { +type EmploymentEmployeeVisitor interface { VisitString(string) error - VisitEmployment(*Employment) error + VisitEmployee(*Employee) error } -func (e *EmployeeRequestEmploymentsItem) Accept(visitor EmployeeRequestEmploymentsItemVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": +func (e *EmploymentEmployee) Accept(visitor EmploymentEmployeeVisitor) error { + if e.typ == "String" || e.String != "" { return visitor.VisitString(e.String) - case "employment": - return visitor.VisitEmployment(e.Employment) } + if e.typ == "Employee" || e.Employee != nil { + return visitor.VisitEmployee(e.Employee) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) } -// The employee's ethnicity. +// The position's type of employment. // -// - `AMERICAN_INDIAN_OR_ALASKA_NATIVE` - AMERICAN_INDIAN_OR_ALASKA_NATIVE -// - `ASIAN_OR_INDIAN_SUBCONTINENT` - ASIAN_OR_INDIAN_SUBCONTINENT -// - `BLACK_OR_AFRICAN_AMERICAN` - BLACK_OR_AFRICAN_AMERICAN -// - `HISPANIC_OR_LATINO` - HISPANIC_OR_LATINO -// - `NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER` - NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER -// - `TWO_OR_MORE_RACES` - TWO_OR_MORE_RACES -// - `WHITE` - WHITE -// - `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE -type EmployeeRequestEthnicity struct { - typeName string - EthnicityEnum EthnicityEnum - String string +// * `FULL_TIME` - FULL_TIME +// * `PART_TIME` - PART_TIME +// * `INTERN` - INTERN +// * `CONTRACTOR` - CONTRACTOR +// * `FREELANCE` - FREELANCE +type EmploymentEmploymentType struct { + EmploymentTypeEnum EmploymentTypeEnum + String string + + typ string } -func NewEmployeeRequestEthnicityFromEthnicityEnum(value EthnicityEnum) *EmployeeRequestEthnicity { - return &EmployeeRequestEthnicity{typeName: "ethnicityEnum", EthnicityEnum: value} +func (e *EmploymentEmploymentType) GetEmploymentTypeEnum() EmploymentTypeEnum { + if e == nil { + return "" + } + return e.EmploymentTypeEnum } -func NewEmployeeRequestEthnicityFromString(value string) *EmployeeRequestEthnicity { - return &EmployeeRequestEthnicity{typeName: "string", String: value} +func (e *EmploymentEmploymentType) GetString() string { + if e == nil { + return "" + } + return e.String } -func (e *EmployeeRequestEthnicity) UnmarshalJSON(data []byte) error { - var valueEthnicityEnum EthnicityEnum - if err := json.Unmarshal(data, &valueEthnicityEnum); err == nil { - e.typeName = "ethnicityEnum" - e.EthnicityEnum = valueEthnicityEnum +func (e *EmploymentEmploymentType) UnmarshalJSON(data []byte) error { + var valueEmploymentTypeEnum EmploymentTypeEnum + if err := json.Unmarshal(data, &valueEmploymentTypeEnum); err == nil { + e.typ = "EmploymentTypeEnum" + e.EmploymentTypeEnum = valueEmploymentTypeEnum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" + e.typ = "String" e.String = valueString return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, e) } -func (e EmployeeRequestEthnicity) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "ethnicityEnum": - return json.Marshal(e.EthnicityEnum) - case "string": +func (e EmploymentEmploymentType) MarshalJSON() ([]byte, error) { + if e.typ == "EmploymentTypeEnum" || e.EmploymentTypeEnum != "" { + return json.Marshal(e.EmploymentTypeEnum) + } + if e.typ == "String" || e.String != "" { return json.Marshal(e.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) } -type EmployeeRequestEthnicityVisitor interface { - VisitEthnicityEnum(EthnicityEnum) error +type EmploymentEmploymentTypeVisitor interface { + VisitEmploymentTypeEnum(EmploymentTypeEnum) error VisitString(string) error } -func (e *EmployeeRequestEthnicity) Accept(visitor EmployeeRequestEthnicityVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "ethnicityEnum": - return visitor.VisitEthnicityEnum(e.EthnicityEnum) - case "string": +func (e *EmploymentEmploymentType) Accept(visitor EmploymentEmploymentTypeVisitor) error { + if e.typ == "EmploymentTypeEnum" || e.EmploymentTypeEnum != "" { + return visitor.VisitEmploymentTypeEnum(e.EmploymentTypeEnum) + } + if e.typ == "String" || e.String != "" { return visitor.VisitString(e.String) } + return fmt.Errorf("type %T does not include a non-empty union type", e) } -// The employee's gender. +// The position's FLSA status. // -// - `MALE` - MALE -// - `FEMALE` - FEMALE -// - `NON-BINARY` - NON-BINARY -// - `OTHER` - OTHER -// - `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE -type EmployeeRequestGender struct { - typeName string - GenderEnum GenderEnum - String string +// * `EXEMPT` - EXEMPT +// * `SALARIED_NONEXEMPT` - SALARIED_NONEXEMPT +// * `NONEXEMPT` - NONEXEMPT +// * `OWNER` - OWNER +type EmploymentFlsaStatus struct { + FlsaStatusEnum FlsaStatusEnum + String string + + typ string } -func NewEmployeeRequestGenderFromGenderEnum(value GenderEnum) *EmployeeRequestGender { - return &EmployeeRequestGender{typeName: "genderEnum", GenderEnum: value} +func (e *EmploymentFlsaStatus) GetFlsaStatusEnum() FlsaStatusEnum { + if e == nil { + return "" + } + return e.FlsaStatusEnum } -func NewEmployeeRequestGenderFromString(value string) *EmployeeRequestGender { - return &EmployeeRequestGender{typeName: "string", String: value} +func (e *EmploymentFlsaStatus) GetString() string { + if e == nil { + return "" + } + return e.String } -func (e *EmployeeRequestGender) UnmarshalJSON(data []byte) error { - var valueGenderEnum GenderEnum - if err := json.Unmarshal(data, &valueGenderEnum); err == nil { - e.typeName = "genderEnum" - e.GenderEnum = valueGenderEnum +func (e *EmploymentFlsaStatus) UnmarshalJSON(data []byte) error { + var valueFlsaStatusEnum FlsaStatusEnum + if err := json.Unmarshal(data, &valueFlsaStatusEnum); err == nil { + e.typ = "FlsaStatusEnum" + e.FlsaStatusEnum = valueFlsaStatusEnum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" + e.typ = "String" e.String = valueString return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, e) } -func (e EmployeeRequestGender) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "genderEnum": - return json.Marshal(e.GenderEnum) - case "string": +func (e EmploymentFlsaStatus) MarshalJSON() ([]byte, error) { + if e.typ == "FlsaStatusEnum" || e.FlsaStatusEnum != "" { + return json.Marshal(e.FlsaStatusEnum) + } + if e.typ == "String" || e.String != "" { return json.Marshal(e.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) } -type EmployeeRequestGenderVisitor interface { - VisitGenderEnum(GenderEnum) error +type EmploymentFlsaStatusVisitor interface { + VisitFlsaStatusEnum(FlsaStatusEnum) error VisitString(string) error } -func (e *EmployeeRequestGender) Accept(visitor EmployeeRequestGenderVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "genderEnum": - return visitor.VisitGenderEnum(e.GenderEnum) - case "string": +func (e *EmploymentFlsaStatus) Accept(visitor EmploymentFlsaStatusVisitor) error { + if e.typ == "FlsaStatusEnum" || e.FlsaStatusEnum != "" { + return visitor.VisitFlsaStatusEnum(e.FlsaStatusEnum) + } + if e.typ == "String" || e.String != "" { return visitor.VisitString(e.String) } + return fmt.Errorf("type %T does not include a non-empty union type", e) } -type EmployeeRequestGroupsItem struct { - typeName string - String string - Group *Group +// The position's currency code. +// +// * `XUA` - ADB Unit of Account +// * `AFN` - Afghan Afghani +// * `AFA` - Afghan Afghani (1927–2002) +// * `ALL` - Albanian Lek +// * `ALK` - Albanian Lek (1946–1965) +// * `DZD` - Algerian Dinar +// * `ADP` - Andorran Peseta +// * `AOA` - Angolan Kwanza +// * `AOK` - Angolan Kwanza (1977–1991) +// * `AON` - Angolan New Kwanza (1990–2000) +// * `AOR` - Angolan Readjusted Kwanza (1995–1999) +// * `ARA` - Argentine Austral +// * `ARS` - Argentine Peso +// * `ARM` - Argentine Peso (1881–1970) +// * `ARP` - Argentine Peso (1983–1985) +// * `ARL` - Argentine Peso Ley (1970–1983) +// * `AMD` - Armenian Dram +// * `AWG` - Aruban Florin +// * `AUD` - Australian Dollar +// * `ATS` - Austrian Schilling +// * `AZN` - Azerbaijani Manat +// * `AZM` - Azerbaijani Manat (1993–2006) +// * `BSD` - Bahamian Dollar +// * `BHD` - Bahraini Dinar +// * `BDT` - Bangladeshi Taka +// * `BBD` - Barbadian Dollar +// * `BYN` - Belarusian Ruble +// * `BYB` - Belarusian Ruble (1994–1999) +// * `BYR` - Belarusian Ruble (2000–2016) +// * `BEF` - Belgian Franc +// * `BEC` - Belgian Franc (convertible) +// * `BEL` - Belgian Franc (financial) +// * `BZD` - Belize Dollar +// * `BMD` - Bermudan Dollar +// * `BTN` - Bhutanese Ngultrum +// * `BOB` - Bolivian Boliviano +// * `BOL` - Bolivian Boliviano (1863–1963) +// * `BOV` - Bolivian Mvdol +// * `BOP` - Bolivian Peso +// * `BAM` - Bosnia-Herzegovina Convertible Mark +// * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) +// * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) +// * `BWP` - Botswanan Pula +// * `BRC` - Brazilian Cruzado (1986–1989) +// * `BRZ` - Brazilian Cruzeiro (1942–1967) +// * `BRE` - Brazilian Cruzeiro (1990–1993) +// * `BRR` - Brazilian Cruzeiro (1993–1994) +// * `BRN` - Brazilian New Cruzado (1989–1990) +// * `BRB` - Brazilian New Cruzeiro (1967–1986) +// * `BRL` - Brazilian Real +// * `GBP` - British Pound +// * `BND` - Brunei Dollar +// * `BGL` - Bulgarian Hard Lev +// * `BGN` - Bulgarian Lev +// * `BGO` - Bulgarian Lev (1879–1952) +// * `BGM` - Bulgarian Socialist Lev +// * `BUK` - Burmese Kyat +// * `BIF` - Burundian Franc +// * `XPF` - CFP Franc +// * `KHR` - Cambodian Riel +// * `CAD` - Canadian Dollar +// * `CVE` - Cape Verdean Escudo +// * `KYD` - Cayman Islands Dollar +// * `XAF` - Central African CFA Franc +// * `CLE` - Chilean Escudo +// * `CLP` - Chilean Peso +// * `CLF` - Chilean Unit of Account (UF) +// * `CNX` - Chinese People’s Bank Dollar +// * `CNY` - Chinese Yuan +// * `CNH` - Chinese Yuan (offshore) +// * `COP` - Colombian Peso +// * `COU` - Colombian Real Value Unit +// * `KMF` - Comorian Franc +// * `CDF` - Congolese Franc +// * `CRC` - Costa Rican Colón +// * `HRD` - Croatian Dinar +// * `HRK` - Croatian Kuna +// * `CUC` - Cuban Convertible Peso +// * `CUP` - Cuban Peso +// * `CYP` - Cypriot Pound +// * `CZK` - Czech Koruna +// * `CSK` - Czechoslovak Hard Koruna +// * `DKK` - Danish Krone +// * `DJF` - Djiboutian Franc +// * `DOP` - Dominican Peso +// * `NLG` - Dutch Guilder +// * `XCD` - East Caribbean Dollar +// * `DDM` - East German Mark +// * `ECS` - Ecuadorian Sucre +// * `ECV` - Ecuadorian Unit of Constant Value +// * `EGP` - Egyptian Pound +// * `GQE` - Equatorial Guinean Ekwele +// * `ERN` - Eritrean Nakfa +// * `EEK` - Estonian Kroon +// * `ETB` - Ethiopian Birr +// * `EUR` - Euro +// * `XBA` - European Composite Unit +// * `XEU` - European Currency Unit +// * `XBB` - European Monetary Unit +// * `XBC` - European Unit of Account (XBC) +// * `XBD` - European Unit of Account (XBD) +// * `FKP` - Falkland Islands Pound +// * `FJD` - Fijian Dollar +// * `FIM` - Finnish Markka +// * `FRF` - French Franc +// * `XFO` - French Gold Franc +// * `XFU` - French UIC-Franc +// * `GMD` - Gambian Dalasi +// * `GEK` - Georgian Kupon Larit +// * `GEL` - Georgian Lari +// * `DEM` - German Mark +// * `GHS` - Ghanaian Cedi +// * `GHC` - Ghanaian Cedi (1979–2007) +// * `GIP` - Gibraltar Pound +// * `XAU` - Gold +// * `GRD` - Greek Drachma +// * `GTQ` - Guatemalan Quetzal +// * `GWP` - Guinea-Bissau Peso +// * `GNF` - Guinean Franc +// * `GNS` - Guinean Syli +// * `GYD` - Guyanaese Dollar +// * `HTG` - Haitian Gourde +// * `HNL` - Honduran Lempira +// * `HKD` - Hong Kong Dollar +// * `HUF` - Hungarian Forint +// * `IMP` - IMP +// * `ISK` - Icelandic Króna +// * `ISJ` - Icelandic Króna (1918–1981) +// * `INR` - Indian Rupee +// * `IDR` - Indonesian Rupiah +// * `IRR` - Iranian Rial +// * `IQD` - Iraqi Dinar +// * `IEP` - Irish Pound +// * `ILS` - Israeli New Shekel +// * `ILP` - Israeli Pound +// * `ILR` - Israeli Shekel (1980–1985) +// * `ITL` - Italian Lira +// * `JMD` - Jamaican Dollar +// * `JPY` - Japanese Yen +// * `JOD` - Jordanian Dinar +// * `KZT` - Kazakhstani Tenge +// * `KES` - Kenyan Shilling +// * `KWD` - Kuwaiti Dinar +// * `KGS` - Kyrgystani Som +// * `LAK` - Laotian Kip +// * `LVL` - Latvian Lats +// * `LVR` - Latvian Ruble +// * `LBP` - Lebanese Pound +// * `LSL` - Lesotho Loti +// * `LRD` - Liberian Dollar +// * `LYD` - Libyan Dinar +// * `LTL` - Lithuanian Litas +// * `LTT` - Lithuanian Talonas +// * `LUL` - Luxembourg Financial Franc +// * `LUC` - Luxembourgian Convertible Franc +// * `LUF` - Luxembourgian Franc +// * `MOP` - Macanese Pataca +// * `MKD` - Macedonian Denar +// * `MKN` - Macedonian Denar (1992–1993) +// * `MGA` - Malagasy Ariary +// * `MGF` - Malagasy Franc +// * `MWK` - Malawian Kwacha +// * `MYR` - Malaysian Ringgit +// * `MVR` - Maldivian Rufiyaa +// * `MVP` - Maldivian Rupee (1947–1981) +// * `MLF` - Malian Franc +// * `MTL` - Maltese Lira +// * `MTP` - Maltese Pound +// * `MRU` - Mauritanian Ouguiya +// * `MRO` - Mauritanian Ouguiya (1973–2017) +// * `MUR` - Mauritian Rupee +// * `MXV` - Mexican Investment Unit +// * `MXN` - Mexican Peso +// * `MXP` - Mexican Silver Peso (1861–1992) +// * `MDC` - Moldovan Cupon +// * `MDL` - Moldovan Leu +// * `MCF` - Monegasque Franc +// * `MNT` - Mongolian Tugrik +// * `MAD` - Moroccan Dirham +// * `MAF` - Moroccan Franc +// * `MZE` - Mozambican Escudo +// * `MZN` - Mozambican Metical +// * `MZM` - Mozambican Metical (1980–2006) +// * `MMK` - Myanmar Kyat +// * `NAD` - Namibian Dollar +// * `NPR` - Nepalese Rupee +// * `ANG` - Netherlands Antillean Guilder +// * `TWD` - New Taiwan Dollar +// * `NZD` - New Zealand Dollar +// * `NIO` - Nicaraguan Córdoba +// * `NIC` - Nicaraguan Córdoba (1988–1991) +// * `NGN` - Nigerian Naira +// * `KPW` - North Korean Won +// * `NOK` - Norwegian Krone +// * `OMR` - Omani Rial +// * `PKR` - Pakistani Rupee +// * `XPD` - Palladium +// * `PAB` - Panamanian Balboa +// * `PGK` - Papua New Guinean Kina +// * `PYG` - Paraguayan Guarani +// * `PEI` - Peruvian Inti +// * `PEN` - Peruvian Sol +// * `PES` - Peruvian Sol (1863–1965) +// * `PHP` - Philippine Peso +// * `XPT` - Platinum +// * `PLN` - Polish Zloty +// * `PLZ` - Polish Zloty (1950–1995) +// * `PTE` - Portuguese Escudo +// * `GWE` - Portuguese Guinea Escudo +// * `QAR` - Qatari Rial +// * `XRE` - RINET Funds +// * `RHD` - Rhodesian Dollar +// * `RON` - Romanian Leu +// * `ROL` - Romanian Leu (1952–2006) +// * `RUB` - Russian Ruble +// * `RUR` - Russian Ruble (1991–1998) +// * `RWF` - Rwandan Franc +// * `SVC` - Salvadoran Colón +// * `WST` - Samoan Tala +// * `SAR` - Saudi Riyal +// * `RSD` - Serbian Dinar +// * `CSD` - Serbian Dinar (2002–2006) +// * `SCR` - Seychellois Rupee +// * `SLL` - Sierra Leonean Leone +// * `XAG` - Silver +// * `SGD` - Singapore Dollar +// * `SKK` - Slovak Koruna +// * `SIT` - Slovenian Tolar +// * `SBD` - Solomon Islands Dollar +// * `SOS` - Somali Shilling +// * `ZAR` - South African Rand +// * `ZAL` - South African Rand (financial) +// * `KRH` - South Korean Hwan (1953–1962) +// * `KRW` - South Korean Won +// * `KRO` - South Korean Won (1945–1953) +// * `SSP` - South Sudanese Pound +// * `SUR` - Soviet Rouble +// * `ESP` - Spanish Peseta +// * `ESA` - Spanish Peseta (A account) +// * `ESB` - Spanish Peseta (convertible account) +// * `XDR` - Special Drawing Rights +// * `LKR` - Sri Lankan Rupee +// * `SHP` - St. Helena Pound +// * `XSU` - Sucre +// * `SDD` - Sudanese Dinar (1992–2007) +// * `SDG` - Sudanese Pound +// * `SDP` - Sudanese Pound (1957–1998) +// * `SRD` - Surinamese Dollar +// * `SRG` - Surinamese Guilder +// * `SZL` - Swazi Lilangeni +// * `SEK` - Swedish Krona +// * `CHF` - Swiss Franc +// * `SYP` - Syrian Pound +// * `STN` - São Tomé & Príncipe Dobra +// * `STD` - São Tomé & Príncipe Dobra (1977–2017) +// * `TVD` - TVD +// * `TJR` - Tajikistani Ruble +// * `TJS` - Tajikistani Somoni +// * `TZS` - Tanzanian Shilling +// * `XTS` - Testing Currency Code +// * `THB` - Thai Baht +// * `XXX` - The codes assigned for transactions where no currency is involved +// * `TPE` - Timorese Escudo +// * `TOP` - Tongan Paʻanga +// * `TTD` - Trinidad & Tobago Dollar +// * `TND` - Tunisian Dinar +// * `TRY` - Turkish Lira +// * `TRL` - Turkish Lira (1922–2005) +// * `TMT` - Turkmenistani Manat +// * `TMM` - Turkmenistani Manat (1993–2009) +// * `USD` - US Dollar +// * `USN` - US Dollar (Next day) +// * `USS` - US Dollar (Same day) +// * `UGX` - Ugandan Shilling +// * `UGS` - Ugandan Shilling (1966–1987) +// * `UAH` - Ukrainian Hryvnia +// * `UAK` - Ukrainian Karbovanets +// * `AED` - United Arab Emirates Dirham +// * `UYW` - Uruguayan Nominal Wage Index Unit +// * `UYU` - Uruguayan Peso +// * `UYP` - Uruguayan Peso (1975–1993) +// * `UYI` - Uruguayan Peso (Indexed Units) +// * `UZS` - Uzbekistani Som +// * `VUV` - Vanuatu Vatu +// * `VES` - Venezuelan Bolívar +// * `VEB` - Venezuelan Bolívar (1871–2008) +// * `VEF` - Venezuelan Bolívar (2008–2018) +// * `VND` - Vietnamese Dong +// * `VNN` - Vietnamese Dong (1978–1985) +// * `CHE` - WIR Euro +// * `CHW` - WIR Franc +// * `XOF` - West African CFA Franc +// * `YDD` - Yemeni Dinar +// * `YER` - Yemeni Rial +// * `YUN` - Yugoslavian Convertible Dinar (1990–1992) +// * `YUD` - Yugoslavian Hard Dinar (1966–1990) +// * `YUM` - Yugoslavian New Dinar (1994–2002) +// * `YUR` - Yugoslavian Reformed Dinar (1992–1993) +// * `ZWN` - ZWN +// * `ZRN` - Zairean New Zaire (1993–1998) +// * `ZRZ` - Zairean Zaire (1971–1993) +// * `ZMW` - Zambian Kwacha +// * `ZMK` - Zambian Kwacha (1968–2012) +// * `ZWD` - Zimbabwean Dollar (1980–2008) +// * `ZWR` - Zimbabwean Dollar (2008) +// * `ZWL` - Zimbabwean Dollar (2009) +type EmploymentPayCurrency struct { + PayCurrencyEnum PayCurrencyEnum + String string + + typ string } -func NewEmployeeRequestGroupsItemFromString(value string) *EmployeeRequestGroupsItem { - return &EmployeeRequestGroupsItem{typeName: "string", String: value} +func (e *EmploymentPayCurrency) GetPayCurrencyEnum() PayCurrencyEnum { + if e == nil { + return "" + } + return e.PayCurrencyEnum } -func NewEmployeeRequestGroupsItemFromGroup(value *Group) *EmployeeRequestGroupsItem { - return &EmployeeRequestGroupsItem{typeName: "group", Group: value} +func (e *EmploymentPayCurrency) GetString() string { + if e == nil { + return "" + } + return e.String } -func (e *EmployeeRequestGroupsItem) UnmarshalJSON(data []byte) error { +func (e *EmploymentPayCurrency) UnmarshalJSON(data []byte) error { + var valuePayCurrencyEnum PayCurrencyEnum + if err := json.Unmarshal(data, &valuePayCurrencyEnum); err == nil { + e.typ = "PayCurrencyEnum" + e.PayCurrencyEnum = valuePayCurrencyEnum + return nil + } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" + e.typ = "String" e.String = valueString return nil } - valueGroup := new(Group) - if err := json.Unmarshal(data, &valueGroup); err == nil { - e.typeName = "group" - e.Group = valueGroup - return nil - } return fmt.Errorf("%s cannot be deserialized as a %T", data, e) } -func (e EmployeeRequestGroupsItem) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": +func (e EmploymentPayCurrency) MarshalJSON() ([]byte, error) { + if e.typ == "PayCurrencyEnum" || e.PayCurrencyEnum != "" { + return json.Marshal(e.PayCurrencyEnum) + } + if e.typ == "String" || e.String != "" { return json.Marshal(e.String) - case "group": - return json.Marshal(e.Group) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) } -type EmployeeRequestGroupsItemVisitor interface { +type EmploymentPayCurrencyVisitor interface { + VisitPayCurrencyEnum(PayCurrencyEnum) error VisitString(string) error - VisitGroup(*Group) error } -func (e *EmployeeRequestGroupsItem) Accept(visitor EmployeeRequestGroupsItemVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": +func (e *EmploymentPayCurrency) Accept(visitor EmploymentPayCurrencyVisitor) error { + if e.typ == "PayCurrencyEnum" || e.PayCurrencyEnum != "" { + return visitor.VisitPayCurrencyEnum(e.PayCurrencyEnum) + } + if e.typ == "String" || e.String != "" { return visitor.VisitString(e.String) - case "group": - return visitor.VisitGroup(e.Group) } + return fmt.Errorf("type %T does not include a non-empty union type", e) } -// The employee's home address. -type EmployeeRequestHomeLocation struct { - typeName string - String string - Location *Location +// The position's pay frequency. +// +// * `WEEKLY` - WEEKLY +// * `BIWEEKLY` - BIWEEKLY +// * `MONTHLY` - MONTHLY +// * `QUARTERLY` - QUARTERLY +// * `SEMIANNUALLY` - SEMIANNUALLY +// * `ANNUALLY` - ANNUALLY +// * `THIRTEEN-MONTHLY` - THIRTEEN-MONTHLY +// * `PRO_RATA` - PRO_RATA +// * `SEMIMONTHLY` - SEMIMONTHLY +type EmploymentPayFrequency struct { + PayFrequencyEnum PayFrequencyEnum + String string + + typ string } -func NewEmployeeRequestHomeLocationFromString(value string) *EmployeeRequestHomeLocation { - return &EmployeeRequestHomeLocation{typeName: "string", String: value} +func (e *EmploymentPayFrequency) GetPayFrequencyEnum() PayFrequencyEnum { + if e == nil { + return "" + } + return e.PayFrequencyEnum } -func NewEmployeeRequestHomeLocationFromLocation(value *Location) *EmployeeRequestHomeLocation { - return &EmployeeRequestHomeLocation{typeName: "location", Location: value} +func (e *EmploymentPayFrequency) GetString() string { + if e == nil { + return "" + } + return e.String } -func (e *EmployeeRequestHomeLocation) UnmarshalJSON(data []byte) error { +func (e *EmploymentPayFrequency) UnmarshalJSON(data []byte) error { + var valuePayFrequencyEnum PayFrequencyEnum + if err := json.Unmarshal(data, &valuePayFrequencyEnum); err == nil { + e.typ = "PayFrequencyEnum" + e.PayFrequencyEnum = valuePayFrequencyEnum + return nil + } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" + e.typ = "String" e.String = valueString return nil } - valueLocation := new(Location) - if err := json.Unmarshal(data, &valueLocation); err == nil { - e.typeName = "location" - e.Location = valueLocation - return nil - } return fmt.Errorf("%s cannot be deserialized as a %T", data, e) } -func (e EmployeeRequestHomeLocation) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": +func (e EmploymentPayFrequency) MarshalJSON() ([]byte, error) { + if e.typ == "PayFrequencyEnum" || e.PayFrequencyEnum != "" { + return json.Marshal(e.PayFrequencyEnum) + } + if e.typ == "String" || e.String != "" { return json.Marshal(e.String) - case "location": - return json.Marshal(e.Location) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) } -type EmployeeRequestHomeLocationVisitor interface { +type EmploymentPayFrequencyVisitor interface { + VisitPayFrequencyEnum(PayFrequencyEnum) error VisitString(string) error - VisitLocation(*Location) error } -func (e *EmployeeRequestHomeLocation) Accept(visitor EmployeeRequestHomeLocationVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": +func (e *EmploymentPayFrequency) Accept(visitor EmploymentPayFrequencyVisitor) error { + if e.typ == "PayFrequencyEnum" || e.PayFrequencyEnum != "" { + return visitor.VisitPayFrequencyEnum(e.PayFrequencyEnum) + } + if e.typ == "String" || e.String != "" { return visitor.VisitString(e.String) - case "location": - return visitor.VisitLocation(e.Location) } + return fmt.Errorf("type %T does not include a non-empty union type", e) } -// The employee ID of the employee's manager. -type EmployeeRequestManager struct { - typeName string +// The employment's pay group +type EmploymentPayGroup struct { String string - Employee *Employee + PayGroup *PayGroup + + typ string } -func NewEmployeeRequestManagerFromString(value string) *EmployeeRequestManager { - return &EmployeeRequestManager{typeName: "string", String: value} +func (e *EmploymentPayGroup) GetString() string { + if e == nil { + return "" + } + return e.String } -func NewEmployeeRequestManagerFromEmployee(value *Employee) *EmployeeRequestManager { - return &EmployeeRequestManager{typeName: "employee", Employee: value} +func (e *EmploymentPayGroup) GetPayGroup() *PayGroup { + if e == nil { + return nil + } + return e.PayGroup } -func (e *EmployeeRequestManager) UnmarshalJSON(data []byte) error { +func (e *EmploymentPayGroup) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" + e.typ = "String" e.String = valueString return nil } - valueEmployee := new(Employee) - if err := json.Unmarshal(data, &valueEmployee); err == nil { - e.typeName = "employee" - e.Employee = valueEmployee + valuePayGroup := new(PayGroup) + if err := json.Unmarshal(data, &valuePayGroup); err == nil { + e.typ = "PayGroup" + e.PayGroup = valuePayGroup return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, e) } -func (e EmployeeRequestManager) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": +func (e EmploymentPayGroup) MarshalJSON() ([]byte, error) { + if e.typ == "String" || e.String != "" { return json.Marshal(e.String) - case "employee": - return json.Marshal(e.Employee) } + if e.typ == "PayGroup" || e.PayGroup != nil { + return json.Marshal(e.PayGroup) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) } -type EmployeeRequestManagerVisitor interface { +type EmploymentPayGroupVisitor interface { VisitString(string) error - VisitEmployee(*Employee) error + VisitPayGroup(*PayGroup) error } -func (e *EmployeeRequestManager) Accept(visitor EmployeeRequestManagerVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": +func (e *EmploymentPayGroup) Accept(visitor EmploymentPayGroupVisitor) error { + if e.typ == "String" || e.String != "" { return visitor.VisitString(e.String) - case "employee": - return visitor.VisitEmployee(e.Employee) } + if e.typ == "PayGroup" || e.PayGroup != nil { + return visitor.VisitPayGroup(e.PayGroup) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) } -// The employee's filing status as related to marital status. +// The time period this pay rate encompasses. // -// - `SINGLE` - SINGLE -// - `MARRIED_FILING_JOINTLY` - MARRIED_FILING_JOINTLY -// - `MARRIED_FILING_SEPARATELY` - MARRIED_FILING_SEPARATELY -// - `HEAD_OF_HOUSEHOLD` - HEAD_OF_HOUSEHOLD -// - `QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD` - QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD -type EmployeeRequestMaritalStatus struct { - typeName string - MaritalStatusEnum MaritalStatusEnum - String string +// * `HOUR` - HOUR +// * `DAY` - DAY +// * `WEEK` - WEEK +// * `EVERY_TWO_WEEKS` - EVERY_TWO_WEEKS +// * `SEMIMONTHLY` - SEMIMONTHLY +// * `MONTH` - MONTH +// * `QUARTER` - QUARTER +// * `EVERY_SIX_MONTHS` - EVERY_SIX_MONTHS +// * `YEAR` - YEAR +type EmploymentPayPeriod struct { + PayPeriodEnum PayPeriodEnum + String string + + typ string } -func NewEmployeeRequestMaritalStatusFromMaritalStatusEnum(value MaritalStatusEnum) *EmployeeRequestMaritalStatus { - return &EmployeeRequestMaritalStatus{typeName: "maritalStatusEnum", MaritalStatusEnum: value} +func (e *EmploymentPayPeriod) GetPayPeriodEnum() PayPeriodEnum { + if e == nil { + return "" + } + return e.PayPeriodEnum } -func NewEmployeeRequestMaritalStatusFromString(value string) *EmployeeRequestMaritalStatus { - return &EmployeeRequestMaritalStatus{typeName: "string", String: value} +func (e *EmploymentPayPeriod) GetString() string { + if e == nil { + return "" + } + return e.String } -func (e *EmployeeRequestMaritalStatus) UnmarshalJSON(data []byte) error { - var valueMaritalStatusEnum MaritalStatusEnum - if err := json.Unmarshal(data, &valueMaritalStatusEnum); err == nil { - e.typeName = "maritalStatusEnum" - e.MaritalStatusEnum = valueMaritalStatusEnum +func (e *EmploymentPayPeriod) UnmarshalJSON(data []byte) error { + var valuePayPeriodEnum PayPeriodEnum + if err := json.Unmarshal(data, &valuePayPeriodEnum); err == nil { + e.typ = "PayPeriodEnum" + e.PayPeriodEnum = valuePayPeriodEnum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" + e.typ = "String" e.String = valueString return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, e) } -func (e EmployeeRequestMaritalStatus) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "maritalStatusEnum": - return json.Marshal(e.MaritalStatusEnum) - case "string": +func (e EmploymentPayPeriod) MarshalJSON() ([]byte, error) { + if e.typ == "PayPeriodEnum" || e.PayPeriodEnum != "" { + return json.Marshal(e.PayPeriodEnum) + } + if e.typ == "String" || e.String != "" { return json.Marshal(e.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) } -type EmployeeRequestMaritalStatusVisitor interface { - VisitMaritalStatusEnum(MaritalStatusEnum) error +type EmploymentPayPeriodVisitor interface { + VisitPayPeriodEnum(PayPeriodEnum) error VisitString(string) error } -func (e *EmployeeRequestMaritalStatus) Accept(visitor EmployeeRequestMaritalStatusVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "maritalStatusEnum": - return visitor.VisitMaritalStatusEnum(e.MaritalStatusEnum) - case "string": - return visitor.VisitString(e.String) - } -} - -// The employee's pay group -type EmployeeRequestPayGroup struct { - typeName string - String string - PayGroup *PayGroup -} - -func NewEmployeeRequestPayGroupFromString(value string) *EmployeeRequestPayGroup { - return &EmployeeRequestPayGroup{typeName: "string", String: value} -} - -func NewEmployeeRequestPayGroupFromPayGroup(value *PayGroup) *EmployeeRequestPayGroup { - return &EmployeeRequestPayGroup{typeName: "payGroup", PayGroup: value} -} - -func (e *EmployeeRequestPayGroup) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString - return nil +func (e *EmploymentPayPeriod) Accept(visitor EmploymentPayPeriodVisitor) error { + if e.typ == "PayPeriodEnum" || e.PayPeriodEnum != "" { + return visitor.VisitPayPeriodEnum(e.PayPeriodEnum) } - valuePayGroup := new(PayGroup) - if err := json.Unmarshal(data, &valuePayGroup); err == nil { - e.typeName = "payGroup" - e.PayGroup = valuePayGroup - return nil + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) + return fmt.Errorf("type %T does not include a non-empty union type", e) } -func (e EmployeeRequestPayGroup) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return json.Marshal(e.String) - case "payGroup": - return json.Marshal(e.PayGroup) - } -} +// * `ACTIVE` - ACTIVE +// * `PENDING` - PENDING +// * `INACTIVE` - INACTIVE +type EmploymentStatusEnum string -type EmployeeRequestPayGroupVisitor interface { - VisitString(string) error - VisitPayGroup(*PayGroup) error -} +const ( + EmploymentStatusEnumActive EmploymentStatusEnum = "ACTIVE" + EmploymentStatusEnumPending EmploymentStatusEnum = "PENDING" + EmploymentStatusEnumInactive EmploymentStatusEnum = "INACTIVE" +) -func (e *EmployeeRequestPayGroup) Accept(visitor EmployeeRequestPayGroupVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return visitor.VisitString(e.String) - case "payGroup": - return visitor.VisitPayGroup(e.PayGroup) +func NewEmploymentStatusEnumFromString(s string) (EmploymentStatusEnum, error) { + switch s { + case "ACTIVE": + return EmploymentStatusEnumActive, nil + case "PENDING": + return EmploymentStatusEnumPending, nil + case "INACTIVE": + return EmploymentStatusEnumInactive, nil } + var t EmploymentStatusEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -// The employee's team. -type EmployeeRequestTeam struct { - typeName string - String string - Team *Team +func (e EmploymentStatusEnum) Ptr() *EmploymentStatusEnum { + return &e } -func NewEmployeeRequestTeamFromString(value string) *EmployeeRequestTeam { - return &EmployeeRequestTeam{typeName: "string", String: value} -} +// * `FULL_TIME` - FULL_TIME +// * `PART_TIME` - PART_TIME +// * `INTERN` - INTERN +// * `CONTRACTOR` - CONTRACTOR +// * `FREELANCE` - FREELANCE +type EmploymentTypeEnum string -func NewEmployeeRequestTeamFromTeam(value *Team) *EmployeeRequestTeam { - return &EmployeeRequestTeam{typeName: "team", Team: value} -} +const ( + EmploymentTypeEnumFullTime EmploymentTypeEnum = "FULL_TIME" + EmploymentTypeEnumPartTime EmploymentTypeEnum = "PART_TIME" + EmploymentTypeEnumIntern EmploymentTypeEnum = "INTERN" + EmploymentTypeEnumContractor EmploymentTypeEnum = "CONTRACTOR" + EmploymentTypeEnumFreelance EmploymentTypeEnum = "FREELANCE" +) -func (e *EmployeeRequestTeam) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString - return nil - } - valueTeam := new(Team) - if err := json.Unmarshal(data, &valueTeam); err == nil { - e.typeName = "team" - e.Team = valueTeam - return nil +func NewEmploymentTypeEnumFromString(s string) (EmploymentTypeEnum, error) { + switch s { + case "FULL_TIME": + return EmploymentTypeEnumFullTime, nil + case "PART_TIME": + return EmploymentTypeEnumPartTime, nil + case "INTERN": + return EmploymentTypeEnumIntern, nil + case "CONTRACTOR": + return EmploymentTypeEnumContractor, nil + case "FREELANCE": + return EmploymentTypeEnumFreelance, nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) + var t EmploymentTypeEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (e EmployeeRequestTeam) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return json.Marshal(e.String) - case "team": - return json.Marshal(e.Team) - } +func (e EmploymentTypeEnum) Ptr() *EmploymentTypeEnum { + return &e } -type EmployeeRequestTeamVisitor interface { - VisitString(string) error - VisitTeam(*Team) error -} +// * `RAW` - RAW +// * `BASE64` - BASE64 +// * `GZIP_BASE64` - GZIP_BASE64 +type EncodingEnum string -func (e *EmployeeRequestTeam) Accept(visitor EmployeeRequestTeamVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return visitor.VisitString(e.String) - case "team": - return visitor.VisitTeam(e.Team) +const ( + EncodingEnumRaw EncodingEnum = "RAW" + EncodingEnumBase64 EncodingEnum = "BASE64" + EncodingEnumGzipBase64 EncodingEnum = "GZIP_BASE64" +) + +func NewEncodingEnumFromString(s string) (EncodingEnum, error) { + switch s { + case "RAW": + return EncodingEnumRaw, nil + case "BASE64": + return EncodingEnumBase64, nil + case "GZIP_BASE64": + return EncodingEnumGzipBase64, nil } + var t EncodingEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -// The employee's work address. -type EmployeeRequestWorkLocation struct { - typeName string - String string - Location *Location +func (e EncodingEnum) Ptr() *EncodingEnum { + return &e } -func NewEmployeeRequestWorkLocationFromString(value string) *EmployeeRequestWorkLocation { - return &EmployeeRequestWorkLocation{typeName: "string", String: value} -} +type ErrorValidationProblem struct { + Source *ValidationProblemSource `json:"source,omitempty" url:"source,omitempty"` + Title string `json:"title" url:"title"` + Detail string `json:"detail" url:"detail"` + ProblemType string `json:"problem_type" url:"problem_type"` -func NewEmployeeRequestWorkLocationFromLocation(value *Location) *EmployeeRequestWorkLocation { - return &EmployeeRequestWorkLocation{typeName: "location", Location: value} + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (e *EmployeeRequestWorkLocation) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString - return nil - } - valueLocation := new(Location) - if err := json.Unmarshal(data, &valueLocation); err == nil { - e.typeName = "location" - e.Location = valueLocation +func (e *ErrorValidationProblem) GetSource() *ValidationProblemSource { + if e == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) + return e.Source } -func (e EmployeeRequestWorkLocation) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return json.Marshal(e.String) - case "location": - return json.Marshal(e.Location) +func (e *ErrorValidationProblem) GetTitle() string { + if e == nil { + return "" } + return e.Title } -type EmployeeRequestWorkLocationVisitor interface { - VisitString(string) error - VisitLocation(*Location) error +func (e *ErrorValidationProblem) GetDetail() string { + if e == nil { + return "" + } + return e.Detail } -func (e *EmployeeRequestWorkLocation) Accept(visitor EmployeeRequestWorkLocationVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return visitor.VisitString(e.String) - case "location": - return visitor.VisitLocation(e.Location) +func (e *ErrorValidationProblem) GetProblemType() string { + if e == nil { + return "" } + return e.ProblemType } -type EmployeeResponse struct { - Model *Employee `json:"model,omitempty"` - Warnings []*WarningValidationProblem `json:"warnings,omitempty"` - Errors []*ErrorValidationProblem `json:"errors,omitempty"` - Logs []*DebugModeLog `json:"logs,omitempty"` - - _rawJSON json.RawMessage +func (e *ErrorValidationProblem) GetExtraProperties() map[string]interface{} { + return e.extraProperties } -func (e *EmployeeResponse) UnmarshalJSON(data []byte) error { - type unmarshaler EmployeeResponse +func (e *ErrorValidationProblem) UnmarshalJSON(data []byte) error { + type unmarshaler ErrorValidationProblem var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *e = EmployeeResponse(value) - e._rawJSON = json.RawMessage(data) + *e = ErrorValidationProblem(value) + extraProperties, err := internal.ExtractExtraProperties(data, *e) + if err != nil { + return err + } + e.extraProperties = extraProperties + e.rawJSON = json.RawMessage(data) return nil } -func (e *EmployeeResponse) String() string { - if len(e._rawJSON) > 0 { - if value, err := core.StringifyJSON(e._rawJSON); err == nil { +func (e *ErrorValidationProblem) String() string { + if len(e.rawJSON) > 0 { + if value, err := internal.StringifyJSON(e.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(e); err == nil { + if value, err := internal.StringifyJSON(e); err == nil { return value } return fmt.Sprintf("%#v", e) } -// The employee's team. -type EmployeeTeam struct { - typeName string - String string - Team *Team +// * `AMERICAN_INDIAN_OR_ALASKA_NATIVE` - AMERICAN_INDIAN_OR_ALASKA_NATIVE +// * `ASIAN_OR_INDIAN_SUBCONTINENT` - ASIAN_OR_INDIAN_SUBCONTINENT +// * `BLACK_OR_AFRICAN_AMERICAN` - BLACK_OR_AFRICAN_AMERICAN +// * `HISPANIC_OR_LATINO` - HISPANIC_OR_LATINO +// * `NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER` - NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER +// * `TWO_OR_MORE_RACES` - TWO_OR_MORE_RACES +// * `WHITE` - WHITE +// * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE +type EthnicityEnum string + +const ( + EthnicityEnumAmericanIndianOrAlaskaNative EthnicityEnum = "AMERICAN_INDIAN_OR_ALASKA_NATIVE" + EthnicityEnumAsianOrIndianSubcontinent EthnicityEnum = "ASIAN_OR_INDIAN_SUBCONTINENT" + EthnicityEnumBlackOrAfricanAmerican EthnicityEnum = "BLACK_OR_AFRICAN_AMERICAN" + EthnicityEnumHispanicOrLatino EthnicityEnum = "HISPANIC_OR_LATINO" + EthnicityEnumNativeHawaiianOrOtherPacificIslander EthnicityEnum = "NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER" + EthnicityEnumTwoOrMoreRaces EthnicityEnum = "TWO_OR_MORE_RACES" + EthnicityEnumWhite EthnicityEnum = "WHITE" + EthnicityEnumPreferNotToDisclose EthnicityEnum = "PREFER_NOT_TO_DISCLOSE" +) + +func NewEthnicityEnumFromString(s string) (EthnicityEnum, error) { + switch s { + case "AMERICAN_INDIAN_OR_ALASKA_NATIVE": + return EthnicityEnumAmericanIndianOrAlaskaNative, nil + case "ASIAN_OR_INDIAN_SUBCONTINENT": + return EthnicityEnumAsianOrIndianSubcontinent, nil + case "BLACK_OR_AFRICAN_AMERICAN": + return EthnicityEnumBlackOrAfricanAmerican, nil + case "HISPANIC_OR_LATINO": + return EthnicityEnumHispanicOrLatino, nil + case "NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER": + return EthnicityEnumNativeHawaiianOrOtherPacificIslander, nil + case "TWO_OR_MORE_RACES": + return EthnicityEnumTwoOrMoreRaces, nil + case "WHITE": + return EthnicityEnumWhite, nil + case "PREFER_NOT_TO_DISCLOSE": + return EthnicityEnumPreferNotToDisclose, nil + } + var t EthnicityEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -func NewEmployeeTeamFromString(value string) *EmployeeTeam { - return &EmployeeTeam{typeName: "string", String: value} +func (e EthnicityEnum) Ptr() *EthnicityEnum { + return &e } -func NewEmployeeTeamFromTeam(value *Team) *EmployeeTeam { - return &EmployeeTeam{typeName: "team", Team: value} +type FieldPermissionDeserializerRequest struct { + EnabledFields []interface{} `json:"enabled_fields,omitempty" url:"enabled_fields,omitempty"` + DisabledFields []interface{} `json:"disabled_fields,omitempty" url:"disabled_fields,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (e *EmployeeTeam) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString - return nil - } - valueTeam := new(Team) - if err := json.Unmarshal(data, &valueTeam); err == nil { - e.typeName = "team" - e.Team = valueTeam +func (f *FieldPermissionDeserializerRequest) GetEnabledFields() []interface{} { + if f == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) + return f.EnabledFields } -func (e EmployeeTeam) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return json.Marshal(e.String) - case "team": - return json.Marshal(e.Team) +func (f *FieldPermissionDeserializerRequest) GetDisabledFields() []interface{} { + if f == nil { + return nil } + return f.DisabledFields } -type EmployeeTeamVisitor interface { - VisitString(string) error - VisitTeam(*Team) error +func (f *FieldPermissionDeserializerRequest) GetExtraProperties() map[string]interface{} { + return f.extraProperties } -func (e *EmployeeTeam) Accept(visitor EmployeeTeamVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return visitor.VisitString(e.String) - case "team": - return visitor.VisitTeam(e.Team) +func (f *FieldPermissionDeserializerRequest) UnmarshalJSON(data []byte) error { + type unmarshaler FieldPermissionDeserializerRequest + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err } + *f = FieldPermissionDeserializerRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { + return err + } + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) + return nil } -// The employee's work address. -type EmployeeWorkLocation struct { - typeName string - String string - Location *Location -} - -func NewEmployeeWorkLocationFromString(value string) *EmployeeWorkLocation { - return &EmployeeWorkLocation{typeName: "string", String: value} +func (f *FieldPermissionDeserializerRequest) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(f); err == nil { + return value + } + return fmt.Sprintf("%#v", f) } -func NewEmployeeWorkLocationFromLocation(value *Location) *EmployeeWorkLocation { - return &EmployeeWorkLocation{typeName: "location", Location: value} -} +// * `EXEMPT` - EXEMPT +// * `SALARIED_NONEXEMPT` - SALARIED_NONEXEMPT +// * `NONEXEMPT` - NONEXEMPT +// * `OWNER` - OWNER +type FlsaStatusEnum string -func (e *EmployeeWorkLocation) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString - return nil - } - valueLocation := new(Location) - if err := json.Unmarshal(data, &valueLocation); err == nil { - e.typeName = "location" - e.Location = valueLocation - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) -} +const ( + FlsaStatusEnumExempt FlsaStatusEnum = "EXEMPT" + FlsaStatusEnumSalariedNonexempt FlsaStatusEnum = "SALARIED_NONEXEMPT" + FlsaStatusEnumNonexempt FlsaStatusEnum = "NONEXEMPT" + FlsaStatusEnumOwner FlsaStatusEnum = "OWNER" +) -func (e EmployeeWorkLocation) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return json.Marshal(e.String) - case "location": - return json.Marshal(e.Location) +func NewFlsaStatusEnumFromString(s string) (FlsaStatusEnum, error) { + switch s { + case "EXEMPT": + return FlsaStatusEnumExempt, nil + case "SALARIED_NONEXEMPT": + return FlsaStatusEnumSalariedNonexempt, nil + case "NONEXEMPT": + return FlsaStatusEnumNonexempt, nil + case "OWNER": + return FlsaStatusEnumOwner, nil } + var t FlsaStatusEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -type EmployeeWorkLocationVisitor interface { - VisitString(string) error - VisitLocation(*Location) error +func (f FlsaStatusEnum) Ptr() *FlsaStatusEnum { + return &f } -func (e *EmployeeWorkLocation) Accept(visitor EmployeeWorkLocationVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return visitor.VisitString(e.String) - case "location": - return visitor.VisitLocation(e.Location) +// * `MALE` - MALE +// * `FEMALE` - FEMALE +// * `NON-BINARY` - NON-BINARY +// * `OTHER` - OTHER +// * `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE +type GenderEnum string + +const ( + GenderEnumMale GenderEnum = "MALE" + GenderEnumFemale GenderEnum = "FEMALE" + GenderEnumNonBinary GenderEnum = "NON-BINARY" + GenderEnumOther GenderEnum = "OTHER" + GenderEnumPreferNotToDisclose GenderEnum = "PREFER_NOT_TO_DISCLOSE" +) + +func NewGenderEnumFromString(s string) (GenderEnum, error) { + switch s { + case "MALE": + return GenderEnumMale, nil + case "FEMALE": + return GenderEnumFemale, nil + case "NON-BINARY": + return GenderEnumNonBinary, nil + case "OTHER": + return GenderEnumOther, nil + case "PREFER_NOT_TO_DISCLOSE": + return GenderEnumPreferNotToDisclose, nil } + var t GenderEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -// # The EmployerBenefit Object -// +func (g GenderEnum) Ptr() *GenderEnum { + return &g +} + +// # The Group Object // ### Description -// -// The `Employer Benefit` object is used to represent a benefit plan offered by a company. +// The `Group` object is used to represent any subset of employees across, for example, `DEPARTMENT` or `TEAM`. Employees can be in multiple Groups. // // ### Usage Example -// -// Fetch from the `LIST EmployerBenefits` endpoint and filter by `ID` to show all EmployerBenefits. -type EmployerBenefit struct { - Id *string `json:"id,omitempty"` +// Fetch from the `LIST Employee` endpoint and expand groups to view an employee's groups. +type Group struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The type of benefit plan. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The parent group for this group. + ParentGroup *string `json:"parent_group,omitempty" url:"parent_group,omitempty"` + // The group name. + Name *string `json:"name,omitempty" url:"name,omitempty"` + // The Group type returned directly from the third-party. // - // - `MEDICAL` - MEDICAL - // - `HEALTH_SAVINGS` - HEALTH_SAVINGS - // - `INSURANCE` - INSURANCE - // - `RETIREMENT` - RETIREMENT - // - `OTHER` - OTHER - BenefitPlanType *EmployerBenefitBenefitPlanType `json:"benefit_plan_type,omitempty"` - // The employer benefit's name - typically the carrier or network name. - Name *string `json:"name,omitempty"` - // The employer benefit's description. - Description *string `json:"description,omitempty"` - // The employer benefit's deduction code. - DeductionCode *string `json:"deduction_code,omitempty"` + // * `TEAM` - TEAM + // * `DEPARTMENT` - DEPARTMENT + // * `COST_CENTER` - COST_CENTER + // * `BUSINESS_UNIT` - BUSINESS_UNIT + // * `GROUP` - GROUP + Type *GroupType `json:"type,omitempty" url:"type,omitempty"` + // Indicates whether the Group refers to a team in the third party platform. Note that this is an opinionated view based on how Merge observes most organizations representing teams in each third party platform. If your customer uses a platform different from most, there is a chance this will not be correct. + IsCommonlyUsedAsTeam *bool `json:"is_commonly_used_as_team,omitempty" url:"is_commonly_used_as_team,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (e *EmployerBenefit) UnmarshalJSON(data []byte) error { - type unmarshaler EmployerBenefit - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (g *Group) GetId() *string { + if g == nil { + return nil } - *e = EmployerBenefit(value) - e._rawJSON = json.RawMessage(data) - return nil + return g.Id } -func (e *EmployerBenefit) String() string { - if len(e._rawJSON) > 0 { - if value, err := core.StringifyJSON(e._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(e); err == nil { - return value +func (g *Group) GetRemoteId() *string { + if g == nil { + return nil } - return fmt.Sprintf("%#v", e) + return g.RemoteId } -// The type of benefit plan. -// -// - `MEDICAL` - MEDICAL -// - `HEALTH_SAVINGS` - HEALTH_SAVINGS -// - `INSURANCE` - INSURANCE -// - `RETIREMENT` - RETIREMENT -// - `OTHER` - OTHER -type EmployerBenefitBenefitPlanType struct { - typeName string - BenefitPlanTypeEnum BenefitPlanTypeEnum - String string +func (g *Group) GetCreatedAt() *time.Time { + if g == nil { + return nil + } + return g.CreatedAt } -func NewEmployerBenefitBenefitPlanTypeFromBenefitPlanTypeEnum(value BenefitPlanTypeEnum) *EmployerBenefitBenefitPlanType { - return &EmployerBenefitBenefitPlanType{typeName: "benefitPlanTypeEnum", BenefitPlanTypeEnum: value} +func (g *Group) GetModifiedAt() *time.Time { + if g == nil { + return nil + } + return g.ModifiedAt } -func NewEmployerBenefitBenefitPlanTypeFromString(value string) *EmployerBenefitBenefitPlanType { - return &EmployerBenefitBenefitPlanType{typeName: "string", String: value} +func (g *Group) GetParentGroup() *string { + if g == nil { + return nil + } + return g.ParentGroup } -func (e *EmployerBenefitBenefitPlanType) UnmarshalJSON(data []byte) error { - var valueBenefitPlanTypeEnum BenefitPlanTypeEnum - if err := json.Unmarshal(data, &valueBenefitPlanTypeEnum); err == nil { - e.typeName = "benefitPlanTypeEnum" - e.BenefitPlanTypeEnum = valueBenefitPlanTypeEnum +func (g *Group) GetName() *string { + if g == nil { return nil } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString + return g.Name +} + +func (g *Group) GetType() *GroupType { + if g == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) + return g.Type } -func (e EmployerBenefitBenefitPlanType) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "benefitPlanTypeEnum": - return json.Marshal(e.BenefitPlanTypeEnum) - case "string": - return json.Marshal(e.String) +func (g *Group) GetIsCommonlyUsedAsTeam() *bool { + if g == nil { + return nil } + return g.IsCommonlyUsedAsTeam } -type EmployerBenefitBenefitPlanTypeVisitor interface { - VisitBenefitPlanTypeEnum(BenefitPlanTypeEnum) error - VisitString(string) error +func (g *Group) GetRemoteWasDeleted() *bool { + if g == nil { + return nil + } + return g.RemoteWasDeleted } -func (e *EmployerBenefitBenefitPlanType) Accept(visitor EmployerBenefitBenefitPlanTypeVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "benefitPlanTypeEnum": - return visitor.VisitBenefitPlanTypeEnum(e.BenefitPlanTypeEnum) - case "string": - return visitor.VisitString(e.String) +func (g *Group) GetFieldMappings() map[string]interface{} { + if g == nil { + return nil } + return g.FieldMappings } -// # The Employment Object -// -// ### Description -// -// The `Employment` object is used to represent a job position at a company. -// -// If an integration supports historical tracking of employments, it will be reflected in the data. If not, a new `Employment` object will be created whenever there is a change in job title or pay. The `effective_date` field should be used to order `Employment` objects, with the most recent date corresponding to the latest employment record for an employee. -// -// ### Usage Example -// -// Fetch from the `LIST Employments` endpoint and filter by `ID` to show all employees. -type Employment struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The employee holding this position. - Employee *EmploymentEmployee `json:"employee,omitempty"` - // The position's title. - JobTitle *string `json:"job_title,omitempty"` - // The position's pay rate. - PayRate *float64 `json:"pay_rate,omitempty"` - // The time period this pay rate encompasses. - // - // - `HOUR` - HOUR - // - `DAY` - DAY - // - `WEEK` - WEEK - // - `EVERY_TWO_WEEKS` - EVERY_TWO_WEEKS - // - `SEMIMONTHLY` - SEMIMONTHLY - // - `MONTH` - MONTH - // - `QUARTER` - QUARTER - // - `EVERY_SIX_MONTHS` - EVERY_SIX_MONTHS - // - `YEAR` - YEAR - PayPeriod *EmploymentPayPeriod `json:"pay_period,omitempty"` - // The position's pay frequency. - // - // - `WEEKLY` - WEEKLY - // - `BIWEEKLY` - BIWEEKLY - // - `MONTHLY` - MONTHLY - // - `QUARTERLY` - QUARTERLY - // - `SEMIANNUALLY` - SEMIANNUALLY - // - `ANNUALLY` - ANNUALLY - // - `THIRTEEN-MONTHLY` - THIRTEEN-MONTHLY - // - `PRO_RATA` - PRO_RATA - // - `SEMIMONTHLY` - SEMIMONTHLY - PayFrequency *EmploymentPayFrequency `json:"pay_frequency,omitempty"` - // The position's currency code. - // - // - `XUA` - ADB Unit of Account - // - `AFN` - Afghan Afghani - // - `AFA` - Afghan Afghani (1927–2002) - // - `ALL` - Albanian Lek - // - `ALK` - Albanian Lek (1946–1965) - // - `DZD` - Algerian Dinar - // - `ADP` - Andorran Peseta - // - `AOA` - Angolan Kwanza - // - `AOK` - Angolan Kwanza (1977–1991) - // - `AON` - Angolan New Kwanza (1990–2000) - // - `AOR` - Angolan Readjusted Kwanza (1995–1999) - // - `ARA` - Argentine Austral - // - `ARS` - Argentine Peso - // - `ARM` - Argentine Peso (1881–1970) - // - `ARP` - Argentine Peso (1983–1985) - // - `ARL` - Argentine Peso Ley (1970–1983) - // - `AMD` - Armenian Dram - // - `AWG` - Aruban Florin - // - `AUD` - Australian Dollar - // - `ATS` - Austrian Schilling - // - `AZN` - Azerbaijani Manat - // - `AZM` - Azerbaijani Manat (1993–2006) - // - `BSD` - Bahamian Dollar - // - `BHD` - Bahraini Dinar - // - `BDT` - Bangladeshi Taka - // - `BBD` - Barbadian Dollar - // - `BYN` - Belarusian Ruble - // - `BYB` - Belarusian Ruble (1994–1999) - // - `BYR` - Belarusian Ruble (2000–2016) - // - `BEF` - Belgian Franc - // - `BEC` - Belgian Franc (convertible) - // - `BEL` - Belgian Franc (financial) - // - `BZD` - Belize Dollar - // - `BMD` - Bermudan Dollar - // - `BTN` - Bhutanese Ngultrum - // - `BOB` - Bolivian Boliviano - // - `BOL` - Bolivian Boliviano (1863–1963) - // - `BOV` - Bolivian Mvdol - // - `BOP` - Bolivian Peso - // - `BAM` - Bosnia-Herzegovina Convertible Mark - // - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) - // - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) - // - `BWP` - Botswanan Pula - // - `BRC` - Brazilian Cruzado (1986–1989) - // - `BRZ` - Brazilian Cruzeiro (1942–1967) - // - `BRE` - Brazilian Cruzeiro (1990–1993) - // - `BRR` - Brazilian Cruzeiro (1993–1994) - // - `BRN` - Brazilian New Cruzado (1989–1990) - // - `BRB` - Brazilian New Cruzeiro (1967–1986) - // - `BRL` - Brazilian Real - // - `GBP` - British Pound - // - `BND` - Brunei Dollar - // - `BGL` - Bulgarian Hard Lev - // - `BGN` - Bulgarian Lev - // - `BGO` - Bulgarian Lev (1879–1952) - // - `BGM` - Bulgarian Socialist Lev - // - `BUK` - Burmese Kyat - // - `BIF` - Burundian Franc - // - `XPF` - CFP Franc - // - `KHR` - Cambodian Riel - // - `CAD` - Canadian Dollar - // - `CVE` - Cape Verdean Escudo - // - `KYD` - Cayman Islands Dollar - // - `XAF` - Central African CFA Franc - // - `CLE` - Chilean Escudo - // - `CLP` - Chilean Peso - // - `CLF` - Chilean Unit of Account (UF) - // - `CNX` - Chinese People’s Bank Dollar - // - `CNY` - Chinese Yuan - // - `CNH` - Chinese Yuan (offshore) - // - `COP` - Colombian Peso - // - `COU` - Colombian Real Value Unit - // - `KMF` - Comorian Franc - // - `CDF` - Congolese Franc - // - `CRC` - Costa Rican Colón - // - `HRD` - Croatian Dinar - // - `HRK` - Croatian Kuna - // - `CUC` - Cuban Convertible Peso - // - `CUP` - Cuban Peso - // - `CYP` - Cypriot Pound - // - `CZK` - Czech Koruna - // - `CSK` - Czechoslovak Hard Koruna - // - `DKK` - Danish Krone - // - `DJF` - Djiboutian Franc - // - `DOP` - Dominican Peso - // - `NLG` - Dutch Guilder - // - `XCD` - East Caribbean Dollar - // - `DDM` - East German Mark - // - `ECS` - Ecuadorian Sucre - // - `ECV` - Ecuadorian Unit of Constant Value - // - `EGP` - Egyptian Pound - // - `GQE` - Equatorial Guinean Ekwele - // - `ERN` - Eritrean Nakfa - // - `EEK` - Estonian Kroon - // - `ETB` - Ethiopian Birr - // - `EUR` - Euro - // - `XBA` - European Composite Unit - // - `XEU` - European Currency Unit - // - `XBB` - European Monetary Unit - // - `XBC` - European Unit of Account (XBC) - // - `XBD` - European Unit of Account (XBD) - // - `FKP` - Falkland Islands Pound - // - `FJD` - Fijian Dollar - // - `FIM` - Finnish Markka - // - `FRF` - French Franc - // - `XFO` - French Gold Franc - // - `XFU` - French UIC-Franc - // - `GMD` - Gambian Dalasi - // - `GEK` - Georgian Kupon Larit - // - `GEL` - Georgian Lari - // - `DEM` - German Mark - // - `GHS` - Ghanaian Cedi - // - `GHC` - Ghanaian Cedi (1979–2007) - // - `GIP` - Gibraltar Pound - // - `XAU` - Gold - // - `GRD` - Greek Drachma - // - `GTQ` - Guatemalan Quetzal - // - `GWP` - Guinea-Bissau Peso - // - `GNF` - Guinean Franc - // - `GNS` - Guinean Syli - // - `GYD` - Guyanaese Dollar - // - `HTG` - Haitian Gourde - // - `HNL` - Honduran Lempira - // - `HKD` - Hong Kong Dollar - // - `HUF` - Hungarian Forint - // - `IMP` - IMP - // - `ISK` - Icelandic Króna - // - `ISJ` - Icelandic Króna (1918–1981) - // - `INR` - Indian Rupee - // - `IDR` - Indonesian Rupiah - // - `IRR` - Iranian Rial - // - `IQD` - Iraqi Dinar - // - `IEP` - Irish Pound - // - `ILS` - Israeli New Shekel - // - `ILP` - Israeli Pound - // - `ILR` - Israeli Shekel (1980–1985) - // - `ITL` - Italian Lira - // - `JMD` - Jamaican Dollar - // - `JPY` - Japanese Yen - // - `JOD` - Jordanian Dinar - // - `KZT` - Kazakhstani Tenge - // - `KES` - Kenyan Shilling - // - `KWD` - Kuwaiti Dinar - // - `KGS` - Kyrgystani Som - // - `LAK` - Laotian Kip - // - `LVL` - Latvian Lats - // - `LVR` - Latvian Ruble - // - `LBP` - Lebanese Pound - // - `LSL` - Lesotho Loti - // - `LRD` - Liberian Dollar - // - `LYD` - Libyan Dinar - // - `LTL` - Lithuanian Litas - // - `LTT` - Lithuanian Talonas - // - `LUL` - Luxembourg Financial Franc - // - `LUC` - Luxembourgian Convertible Franc - // - `LUF` - Luxembourgian Franc - // - `MOP` - Macanese Pataca - // - `MKD` - Macedonian Denar - // - `MKN` - Macedonian Denar (1992–1993) - // - `MGA` - Malagasy Ariary - // - `MGF` - Malagasy Franc - // - `MWK` - Malawian Kwacha - // - `MYR` - Malaysian Ringgit - // - `MVR` - Maldivian Rufiyaa - // - `MVP` - Maldivian Rupee (1947–1981) - // - `MLF` - Malian Franc - // - `MTL` - Maltese Lira - // - `MTP` - Maltese Pound - // - `MRU` - Mauritanian Ouguiya - // - `MRO` - Mauritanian Ouguiya (1973–2017) - // - `MUR` - Mauritian Rupee - // - `MXV` - Mexican Investment Unit - // - `MXN` - Mexican Peso - // - `MXP` - Mexican Silver Peso (1861–1992) - // - `MDC` - Moldovan Cupon - // - `MDL` - Moldovan Leu - // - `MCF` - Monegasque Franc - // - `MNT` - Mongolian Tugrik - // - `MAD` - Moroccan Dirham - // - `MAF` - Moroccan Franc - // - `MZE` - Mozambican Escudo - // - `MZN` - Mozambican Metical - // - `MZM` - Mozambican Metical (1980–2006) - // - `MMK` - Myanmar Kyat - // - `NAD` - Namibian Dollar - // - `NPR` - Nepalese Rupee - // - `ANG` - Netherlands Antillean Guilder - // - `TWD` - New Taiwan Dollar - // - `NZD` - New Zealand Dollar - // - `NIO` - Nicaraguan Córdoba - // - `NIC` - Nicaraguan Córdoba (1988–1991) - // - `NGN` - Nigerian Naira - // - `KPW` - North Korean Won - // - `NOK` - Norwegian Krone - // - `OMR` - Omani Rial - // - `PKR` - Pakistani Rupee - // - `XPD` - Palladium - // - `PAB` - Panamanian Balboa - // - `PGK` - Papua New Guinean Kina - // - `PYG` - Paraguayan Guarani - // - `PEI` - Peruvian Inti - // - `PEN` - Peruvian Sol - // - `PES` - Peruvian Sol (1863–1965) - // - `PHP` - Philippine Peso - // - `XPT` - Platinum - // - `PLN` - Polish Zloty - // - `PLZ` - Polish Zloty (1950–1995) - // - `PTE` - Portuguese Escudo - // - `GWE` - Portuguese Guinea Escudo - // - `QAR` - Qatari Rial - // - `XRE` - RINET Funds - // - `RHD` - Rhodesian Dollar - // - `RON` - Romanian Leu - // - `ROL` - Romanian Leu (1952–2006) - // - `RUB` - Russian Ruble - // - `RUR` - Russian Ruble (1991–1998) - // - `RWF` - Rwandan Franc - // - `SVC` - Salvadoran Colón - // - `WST` - Samoan Tala - // - `SAR` - Saudi Riyal - // - `RSD` - Serbian Dinar - // - `CSD` - Serbian Dinar (2002–2006) - // - `SCR` - Seychellois Rupee - // - `SLL` - Sierra Leonean Leone - // - `XAG` - Silver - // - `SGD` - Singapore Dollar - // - `SKK` - Slovak Koruna - // - `SIT` - Slovenian Tolar - // - `SBD` - Solomon Islands Dollar - // - `SOS` - Somali Shilling - // - `ZAR` - South African Rand - // - `ZAL` - South African Rand (financial) - // - `KRH` - South Korean Hwan (1953–1962) - // - `KRW` - South Korean Won - // - `KRO` - South Korean Won (1945–1953) - // - `SSP` - South Sudanese Pound - // - `SUR` - Soviet Rouble - // - `ESP` - Spanish Peseta - // - `ESA` - Spanish Peseta (A account) - // - `ESB` - Spanish Peseta (convertible account) - // - `XDR` - Special Drawing Rights - // - `LKR` - Sri Lankan Rupee - // - `SHP` - St. Helena Pound - // - `XSU` - Sucre - // - `SDD` - Sudanese Dinar (1992–2007) - // - `SDG` - Sudanese Pound - // - `SDP` - Sudanese Pound (1957–1998) - // - `SRD` - Surinamese Dollar - // - `SRG` - Surinamese Guilder - // - `SZL` - Swazi Lilangeni - // - `SEK` - Swedish Krona - // - `CHF` - Swiss Franc - // - `SYP` - Syrian Pound - // - `STN` - São Tomé & Príncipe Dobra - // - `STD` - São Tomé & Príncipe Dobra (1977–2017) - // - `TVD` - TVD - // - `TJR` - Tajikistani Ruble - // - `TJS` - Tajikistani Somoni - // - `TZS` - Tanzanian Shilling - // - `XTS` - Testing Currency Code - // - `THB` - Thai Baht - // - `XXX` - The codes assigned for transactions where no currency is involved - // - `TPE` - Timorese Escudo - // - `TOP` - Tongan Paʻanga - // - `TTD` - Trinidad & Tobago Dollar - // - `TND` - Tunisian Dinar - // - `TRY` - Turkish Lira - // - `TRL` - Turkish Lira (1922–2005) - // - `TMT` - Turkmenistani Manat - // - `TMM` - Turkmenistani Manat (1993–2009) - // - `USD` - US Dollar - // - `USN` - US Dollar (Next day) - // - `USS` - US Dollar (Same day) - // - `UGX` - Ugandan Shilling - // - `UGS` - Ugandan Shilling (1966–1987) - // - `UAH` - Ukrainian Hryvnia - // - `UAK` - Ukrainian Karbovanets - // - `AED` - United Arab Emirates Dirham - // - `UYW` - Uruguayan Nominal Wage Index Unit - // - `UYU` - Uruguayan Peso - // - `UYP` - Uruguayan Peso (1975–1993) - // - `UYI` - Uruguayan Peso (Indexed Units) - // - `UZS` - Uzbekistani Som - // - `VUV` - Vanuatu Vatu - // - `VES` - Venezuelan Bolívar - // - `VEB` - Venezuelan Bolívar (1871–2008) - // - `VEF` - Venezuelan Bolívar (2008–2018) - // - `VND` - Vietnamese Dong - // - `VNN` - Vietnamese Dong (1978–1985) - // - `CHE` - WIR Euro - // - `CHW` - WIR Franc - // - `XOF` - West African CFA Franc - // - `YDD` - Yemeni Dinar - // - `YER` - Yemeni Rial - // - `YUN` - Yugoslavian Convertible Dinar (1990–1992) - // - `YUD` - Yugoslavian Hard Dinar (1966–1990) - // - `YUM` - Yugoslavian New Dinar (1994–2002) - // - `YUR` - Yugoslavian Reformed Dinar (1992–1993) - // - `ZWN` - ZWN - // - `ZRN` - Zairean New Zaire (1993–1998) - // - `ZRZ` - Zairean Zaire (1971–1993) - // - `ZMW` - Zambian Kwacha - // - `ZMK` - Zambian Kwacha (1968–2012) - // - `ZWD` - Zimbabwean Dollar (1980–2008) - // - `ZWR` - Zimbabwean Dollar (2008) - // - `ZWL` - Zimbabwean Dollar (2009) - PayCurrency *EmploymentPayCurrency `json:"pay_currency,omitempty"` - // The employment's pay group - PayGroup *EmploymentPayGroup `json:"pay_group,omitempty"` - // The position's FLSA status. - // - // - `EXEMPT` - EXEMPT - // - `SALARIED_NONEXEMPT` - SALARIED_NONEXEMPT - // - `NONEXEMPT` - NONEXEMPT - // - `OWNER` - OWNER - FlsaStatus *EmploymentFlsaStatus `json:"flsa_status,omitempty"` - // The position's effective date. - EffectiveDate *time.Time `json:"effective_date,omitempty"` - // The position's type of employment. - // - // - `FULL_TIME` - FULL_TIME - // - `PART_TIME` - PART_TIME - // - `INTERN` - INTERN - // - `CONTRACTOR` - CONTRACTOR - // - `FREELANCE` - FREELANCE - EmploymentType *EmploymentEmploymentType `json:"employment_type,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` +func (g *Group) GetRemoteData() []*RemoteData { + if g == nil { + return nil + } + return g.RemoteData +} - _rawJSON json.RawMessage +func (g *Group) GetExtraProperties() map[string]interface{} { + return g.extraProperties } -func (e *Employment) UnmarshalJSON(data []byte) error { - type unmarshaler Employment - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { +func (g *Group) UnmarshalJSON(data []byte) error { + type embed Group + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*g), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *g = Group(unmarshaler.embed) + g.CreatedAt = unmarshaler.CreatedAt.TimePtr() + g.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *g) + if err != nil { return err } - *e = Employment(value) - e._rawJSON = json.RawMessage(data) + g.extraProperties = extraProperties + g.rawJSON = json.RawMessage(data) return nil } -func (e *Employment) String() string { - if len(e._rawJSON) > 0 { - if value, err := core.StringifyJSON(e._rawJSON); err == nil { +func (g *Group) MarshalJSON() ([]byte, error) { + type embed Group + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*g), + CreatedAt: internal.NewOptionalDateTime(g.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(g.ModifiedAt), + } + return json.Marshal(marshaler) +} + +func (g *Group) String() string { + if len(g.rawJSON) > 0 { + if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(e); err == nil { + if value, err := internal.StringifyJSON(g); err == nil { return value } - return fmt.Sprintf("%#v", e) + return fmt.Sprintf("%#v", g) } -// The employee holding this position. -type EmploymentEmployee struct { - typeName string - String string - Employee *Employee +// The Group type returned directly from the third-party. +// +// * `TEAM` - TEAM +// * `DEPARTMENT` - DEPARTMENT +// * `COST_CENTER` - COST_CENTER +// * `BUSINESS_UNIT` - BUSINESS_UNIT +// * `GROUP` - GROUP +type GroupType struct { + GroupTypeEnum GroupTypeEnum + String string + + typ string } -func NewEmploymentEmployeeFromString(value string) *EmploymentEmployee { - return &EmploymentEmployee{typeName: "string", String: value} +func (g *GroupType) GetGroupTypeEnum() GroupTypeEnum { + if g == nil { + return "" + } + return g.GroupTypeEnum } -func NewEmploymentEmployeeFromEmployee(value *Employee) *EmploymentEmployee { - return &EmploymentEmployee{typeName: "employee", Employee: value} +func (g *GroupType) GetString() string { + if g == nil { + return "" + } + return g.String } -func (e *EmploymentEmployee) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString +func (g *GroupType) UnmarshalJSON(data []byte) error { + var valueGroupTypeEnum GroupTypeEnum + if err := json.Unmarshal(data, &valueGroupTypeEnum); err == nil { + g.typ = "GroupTypeEnum" + g.GroupTypeEnum = valueGroupTypeEnum return nil } - valueEmployee := new(Employee) - if err := json.Unmarshal(data, &valueEmployee); err == nil { - e.typeName = "employee" - e.Employee = valueEmployee + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + g.typ = "String" + g.String = valueString return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) + return fmt.Errorf("%s cannot be deserialized as a %T", data, g) } -func (e EmploymentEmployee) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return json.Marshal(e.String) - case "employee": - return json.Marshal(e.Employee) +func (g GroupType) MarshalJSON() ([]byte, error) { + if g.typ == "GroupTypeEnum" || g.GroupTypeEnum != "" { + return json.Marshal(g.GroupTypeEnum) + } + if g.typ == "String" || g.String != "" { + return json.Marshal(g.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", g) } -type EmploymentEmployeeVisitor interface { +type GroupTypeVisitor interface { + VisitGroupTypeEnum(GroupTypeEnum) error VisitString(string) error - VisitEmployee(*Employee) error } -func (e *EmploymentEmployee) Accept(visitor EmploymentEmployeeVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return visitor.VisitString(e.String) - case "employee": - return visitor.VisitEmployee(e.Employee) +func (g *GroupType) Accept(visitor GroupTypeVisitor) error { + if g.typ == "GroupTypeEnum" || g.GroupTypeEnum != "" { + return visitor.VisitGroupTypeEnum(g.GroupTypeEnum) } + if g.typ == "String" || g.String != "" { + return visitor.VisitString(g.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", g) } -// The position's type of employment. -// -// - `FULL_TIME` - FULL_TIME -// - `PART_TIME` - PART_TIME -// - `INTERN` - INTERN -// - `CONTRACTOR` - CONTRACTOR -// - `FREELANCE` - FREELANCE -type EmploymentEmploymentType struct { - typeName string - EmploymentTypeEnum EmploymentTypeEnum - String string +// * `TEAM` - TEAM +// * `DEPARTMENT` - DEPARTMENT +// * `COST_CENTER` - COST_CENTER +// * `BUSINESS_UNIT` - BUSINESS_UNIT +// * `GROUP` - GROUP +type GroupTypeEnum string + +const ( + GroupTypeEnumTeam GroupTypeEnum = "TEAM" + GroupTypeEnumDepartment GroupTypeEnum = "DEPARTMENT" + GroupTypeEnumCostCenter GroupTypeEnum = "COST_CENTER" + GroupTypeEnumBusinessUnit GroupTypeEnum = "BUSINESS_UNIT" + GroupTypeEnumGroup GroupTypeEnum = "GROUP" +) + +func NewGroupTypeEnumFromString(s string) (GroupTypeEnum, error) { + switch s { + case "TEAM": + return GroupTypeEnumTeam, nil + case "DEPARTMENT": + return GroupTypeEnumDepartment, nil + case "COST_CENTER": + return GroupTypeEnumCostCenter, nil + case "BUSINESS_UNIT": + return GroupTypeEnumBusinessUnit, nil + case "GROUP": + return GroupTypeEnumGroup, nil + } + var t GroupTypeEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -func NewEmploymentEmploymentTypeFromEmploymentTypeEnum(value EmploymentTypeEnum) *EmploymentEmploymentType { - return &EmploymentEmploymentType{typeName: "employmentTypeEnum", EmploymentTypeEnum: value} +func (g GroupTypeEnum) Ptr() *GroupTypeEnum { + return &g } -func NewEmploymentEmploymentTypeFromString(value string) *EmploymentEmploymentType { - return &EmploymentEmploymentType{typeName: "string", String: value} +type IndividualCommonModelScopeDeserializerRequest struct { + ModelName string `json:"model_name" url:"model_name"` + ModelPermissions map[string]*ModelPermissionDeserializerRequest `json:"model_permissions,omitempty" url:"model_permissions,omitempty"` + FieldPermissions *FieldPermissionDeserializerRequest `json:"field_permissions,omitempty" url:"field_permissions,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (e *EmploymentEmploymentType) UnmarshalJSON(data []byte) error { - var valueEmploymentTypeEnum EmploymentTypeEnum - if err := json.Unmarshal(data, &valueEmploymentTypeEnum); err == nil { - e.typeName = "employmentTypeEnum" - e.EmploymentTypeEnum = valueEmploymentTypeEnum - return nil +func (i *IndividualCommonModelScopeDeserializerRequest) GetModelName() string { + if i == nil { + return "" } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString + return i.ModelName +} + +func (i *IndividualCommonModelScopeDeserializerRequest) GetModelPermissions() map[string]*ModelPermissionDeserializerRequest { + if i == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) + return i.ModelPermissions } -func (e EmploymentEmploymentType) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "employmentTypeEnum": - return json.Marshal(e.EmploymentTypeEnum) - case "string": - return json.Marshal(e.String) +func (i *IndividualCommonModelScopeDeserializerRequest) GetFieldPermissions() *FieldPermissionDeserializerRequest { + if i == nil { + return nil } + return i.FieldPermissions } -type EmploymentEmploymentTypeVisitor interface { - VisitEmploymentTypeEnum(EmploymentTypeEnum) error - VisitString(string) error +func (i *IndividualCommonModelScopeDeserializerRequest) GetExtraProperties() map[string]interface{} { + return i.extraProperties } -func (e *EmploymentEmploymentType) Accept(visitor EmploymentEmploymentTypeVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "employmentTypeEnum": - return visitor.VisitEmploymentTypeEnum(e.EmploymentTypeEnum) - case "string": - return visitor.VisitString(e.String) +func (i *IndividualCommonModelScopeDeserializerRequest) UnmarshalJSON(data []byte) error { + type unmarshaler IndividualCommonModelScopeDeserializerRequest + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *i = IndividualCommonModelScopeDeserializerRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *i) + if err != nil { + return err } + i.extraProperties = extraProperties + i.rawJSON = json.RawMessage(data) + return nil } -// The position's FLSA status. -// -// - `EXEMPT` - EXEMPT -// - `SALARIED_NONEXEMPT` - SALARIED_NONEXEMPT -// - `NONEXEMPT` - NONEXEMPT -// - `OWNER` - OWNER -type EmploymentFlsaStatus struct { - typeName string - FlsaStatusEnum FlsaStatusEnum - String string +func (i *IndividualCommonModelScopeDeserializerRequest) String() string { + if len(i.rawJSON) > 0 { + if value, err := internal.StringifyJSON(i.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(i); err == nil { + return value + } + return fmt.Sprintf("%#v", i) +} + +// * `SYNCING` - SYNCING +// * `DONE` - DONE +// * `FAILED` - FAILED +// * `DISABLED` - DISABLED +// * `PAUSED` - PAUSED +// * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED +type LastSyncResultEnum string + +const ( + LastSyncResultEnumSyncing LastSyncResultEnum = "SYNCING" + LastSyncResultEnumDone LastSyncResultEnum = "DONE" + LastSyncResultEnumFailed LastSyncResultEnum = "FAILED" + LastSyncResultEnumDisabled LastSyncResultEnum = "DISABLED" + LastSyncResultEnumPaused LastSyncResultEnum = "PAUSED" + LastSyncResultEnumPartiallySynced LastSyncResultEnum = "PARTIALLY_SYNCED" +) + +func NewLastSyncResultEnumFromString(s string) (LastSyncResultEnum, error) { + switch s { + case "SYNCING": + return LastSyncResultEnumSyncing, nil + case "DONE": + return LastSyncResultEnumDone, nil + case "FAILED": + return LastSyncResultEnumFailed, nil + case "DISABLED": + return LastSyncResultEnumDisabled, nil + case "PAUSED": + return LastSyncResultEnumPaused, nil + case "PARTIALLY_SYNCED": + return LastSyncResultEnumPartiallySynced, nil + } + var t LastSyncResultEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -func NewEmploymentFlsaStatusFromFlsaStatusEnum(value FlsaStatusEnum) *EmploymentFlsaStatus { - return &EmploymentFlsaStatus{typeName: "flsaStatusEnum", FlsaStatusEnum: value} +func (l LastSyncResultEnum) Ptr() *LastSyncResultEnum { + return &l } -func NewEmploymentFlsaStatusFromString(value string) *EmploymentFlsaStatus { - return &EmploymentFlsaStatus{typeName: "string", String: value} +type LinkedAccountStatus struct { + LinkedAccountStatus string `json:"linked_account_status" url:"linked_account_status"` + CanMakeRequest bool `json:"can_make_request" url:"can_make_request"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (e *EmploymentFlsaStatus) UnmarshalJSON(data []byte) error { - var valueFlsaStatusEnum FlsaStatusEnum - if err := json.Unmarshal(data, &valueFlsaStatusEnum); err == nil { - e.typeName = "flsaStatusEnum" - e.FlsaStatusEnum = valueFlsaStatusEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString - return nil +func (l *LinkedAccountStatus) GetLinkedAccountStatus() string { + if l == nil { + return "" } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) + return l.LinkedAccountStatus } -func (e EmploymentFlsaStatus) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "flsaStatusEnum": - return json.Marshal(e.FlsaStatusEnum) - case "string": - return json.Marshal(e.String) +func (l *LinkedAccountStatus) GetCanMakeRequest() bool { + if l == nil { + return false } + return l.CanMakeRequest } -type EmploymentFlsaStatusVisitor interface { - VisitFlsaStatusEnum(FlsaStatusEnum) error - VisitString(string) error +func (l *LinkedAccountStatus) GetExtraProperties() map[string]interface{} { + return l.extraProperties } -func (e *EmploymentFlsaStatus) Accept(visitor EmploymentFlsaStatusVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "flsaStatusEnum": - return visitor.VisitFlsaStatusEnum(e.FlsaStatusEnum) - case "string": - return visitor.VisitString(e.String) +func (l *LinkedAccountStatus) UnmarshalJSON(data []byte) error { + type unmarshaler LinkedAccountStatus + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *l = LinkedAccountStatus(value) + extraProperties, err := internal.ExtractExtraProperties(data, *l) + if err != nil { + return err } + l.extraProperties = extraProperties + l.rawJSON = json.RawMessage(data) + return nil } -// The position's currency code. -// -// - `XUA` - ADB Unit of Account -// - `AFN` - Afghan Afghani -// - `AFA` - Afghan Afghani (1927–2002) -// - `ALL` - Albanian Lek -// - `ALK` - Albanian Lek (1946–1965) -// - `DZD` - Algerian Dinar -// - `ADP` - Andorran Peseta -// - `AOA` - Angolan Kwanza -// - `AOK` - Angolan Kwanza (1977–1991) -// - `AON` - Angolan New Kwanza (1990–2000) -// - `AOR` - Angolan Readjusted Kwanza (1995–1999) -// - `ARA` - Argentine Austral -// - `ARS` - Argentine Peso -// - `ARM` - Argentine Peso (1881–1970) -// - `ARP` - Argentine Peso (1983–1985) -// - `ARL` - Argentine Peso Ley (1970–1983) -// - `AMD` - Armenian Dram -// - `AWG` - Aruban Florin -// - `AUD` - Australian Dollar -// - `ATS` - Austrian Schilling -// - `AZN` - Azerbaijani Manat -// - `AZM` - Azerbaijani Manat (1993–2006) -// - `BSD` - Bahamian Dollar -// - `BHD` - Bahraini Dinar -// - `BDT` - Bangladeshi Taka -// - `BBD` - Barbadian Dollar -// - `BYN` - Belarusian Ruble -// - `BYB` - Belarusian Ruble (1994–1999) -// - `BYR` - Belarusian Ruble (2000–2016) -// - `BEF` - Belgian Franc -// - `BEC` - Belgian Franc (convertible) -// - `BEL` - Belgian Franc (financial) -// - `BZD` - Belize Dollar -// - `BMD` - Bermudan Dollar -// - `BTN` - Bhutanese Ngultrum -// - `BOB` - Bolivian Boliviano -// - `BOL` - Bolivian Boliviano (1863–1963) -// - `BOV` - Bolivian Mvdol -// - `BOP` - Bolivian Peso -// - `BAM` - Bosnia-Herzegovina Convertible Mark -// - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) -// - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) -// - `BWP` - Botswanan Pula -// - `BRC` - Brazilian Cruzado (1986–1989) -// - `BRZ` - Brazilian Cruzeiro (1942–1967) -// - `BRE` - Brazilian Cruzeiro (1990–1993) -// - `BRR` - Brazilian Cruzeiro (1993–1994) -// - `BRN` - Brazilian New Cruzado (1989–1990) -// - `BRB` - Brazilian New Cruzeiro (1967–1986) -// - `BRL` - Brazilian Real -// - `GBP` - British Pound -// - `BND` - Brunei Dollar -// - `BGL` - Bulgarian Hard Lev -// - `BGN` - Bulgarian Lev -// - `BGO` - Bulgarian Lev (1879–1952) -// - `BGM` - Bulgarian Socialist Lev -// - `BUK` - Burmese Kyat -// - `BIF` - Burundian Franc -// - `XPF` - CFP Franc -// - `KHR` - Cambodian Riel -// - `CAD` - Canadian Dollar -// - `CVE` - Cape Verdean Escudo -// - `KYD` - Cayman Islands Dollar -// - `XAF` - Central African CFA Franc -// - `CLE` - Chilean Escudo -// - `CLP` - Chilean Peso -// - `CLF` - Chilean Unit of Account (UF) -// - `CNX` - Chinese People’s Bank Dollar -// - `CNY` - Chinese Yuan -// - `CNH` - Chinese Yuan (offshore) -// - `COP` - Colombian Peso -// - `COU` - Colombian Real Value Unit -// - `KMF` - Comorian Franc -// - `CDF` - Congolese Franc -// - `CRC` - Costa Rican Colón -// - `HRD` - Croatian Dinar -// - `HRK` - Croatian Kuna -// - `CUC` - Cuban Convertible Peso -// - `CUP` - Cuban Peso -// - `CYP` - Cypriot Pound -// - `CZK` - Czech Koruna -// - `CSK` - Czechoslovak Hard Koruna -// - `DKK` - Danish Krone -// - `DJF` - Djiboutian Franc -// - `DOP` - Dominican Peso -// - `NLG` - Dutch Guilder -// - `XCD` - East Caribbean Dollar -// - `DDM` - East German Mark -// - `ECS` - Ecuadorian Sucre -// - `ECV` - Ecuadorian Unit of Constant Value -// - `EGP` - Egyptian Pound -// - `GQE` - Equatorial Guinean Ekwele -// - `ERN` - Eritrean Nakfa -// - `EEK` - Estonian Kroon -// - `ETB` - Ethiopian Birr -// - `EUR` - Euro -// - `XBA` - European Composite Unit -// - `XEU` - European Currency Unit -// - `XBB` - European Monetary Unit -// - `XBC` - European Unit of Account (XBC) -// - `XBD` - European Unit of Account (XBD) -// - `FKP` - Falkland Islands Pound -// - `FJD` - Fijian Dollar -// - `FIM` - Finnish Markka -// - `FRF` - French Franc -// - `XFO` - French Gold Franc -// - `XFU` - French UIC-Franc -// - `GMD` - Gambian Dalasi -// - `GEK` - Georgian Kupon Larit -// - `GEL` - Georgian Lari -// - `DEM` - German Mark -// - `GHS` - Ghanaian Cedi -// - `GHC` - Ghanaian Cedi (1979–2007) -// - `GIP` - Gibraltar Pound -// - `XAU` - Gold -// - `GRD` - Greek Drachma -// - `GTQ` - Guatemalan Quetzal -// - `GWP` - Guinea-Bissau Peso -// - `GNF` - Guinean Franc -// - `GNS` - Guinean Syli -// - `GYD` - Guyanaese Dollar -// - `HTG` - Haitian Gourde -// - `HNL` - Honduran Lempira -// - `HKD` - Hong Kong Dollar -// - `HUF` - Hungarian Forint -// - `IMP` - IMP -// - `ISK` - Icelandic Króna -// - `ISJ` - Icelandic Króna (1918–1981) -// - `INR` - Indian Rupee -// - `IDR` - Indonesian Rupiah -// - `IRR` - Iranian Rial -// - `IQD` - Iraqi Dinar -// - `IEP` - Irish Pound -// - `ILS` - Israeli New Shekel -// - `ILP` - Israeli Pound -// - `ILR` - Israeli Shekel (1980–1985) -// - `ITL` - Italian Lira -// - `JMD` - Jamaican Dollar -// - `JPY` - Japanese Yen -// - `JOD` - Jordanian Dinar -// - `KZT` - Kazakhstani Tenge -// - `KES` - Kenyan Shilling -// - `KWD` - Kuwaiti Dinar -// - `KGS` - Kyrgystani Som -// - `LAK` - Laotian Kip -// - `LVL` - Latvian Lats -// - `LVR` - Latvian Ruble -// - `LBP` - Lebanese Pound -// - `LSL` - Lesotho Loti -// - `LRD` - Liberian Dollar -// - `LYD` - Libyan Dinar -// - `LTL` - Lithuanian Litas -// - `LTT` - Lithuanian Talonas -// - `LUL` - Luxembourg Financial Franc -// - `LUC` - Luxembourgian Convertible Franc -// - `LUF` - Luxembourgian Franc -// - `MOP` - Macanese Pataca -// - `MKD` - Macedonian Denar -// - `MKN` - Macedonian Denar (1992–1993) -// - `MGA` - Malagasy Ariary -// - `MGF` - Malagasy Franc -// - `MWK` - Malawian Kwacha -// - `MYR` - Malaysian Ringgit -// - `MVR` - Maldivian Rufiyaa -// - `MVP` - Maldivian Rupee (1947–1981) -// - `MLF` - Malian Franc -// - `MTL` - Maltese Lira -// - `MTP` - Maltese Pound -// - `MRU` - Mauritanian Ouguiya -// - `MRO` - Mauritanian Ouguiya (1973–2017) -// - `MUR` - Mauritian Rupee -// - `MXV` - Mexican Investment Unit -// - `MXN` - Mexican Peso -// - `MXP` - Mexican Silver Peso (1861–1992) -// - `MDC` - Moldovan Cupon -// - `MDL` - Moldovan Leu -// - `MCF` - Monegasque Franc -// - `MNT` - Mongolian Tugrik -// - `MAD` - Moroccan Dirham -// - `MAF` - Moroccan Franc -// - `MZE` - Mozambican Escudo -// - `MZN` - Mozambican Metical -// - `MZM` - Mozambican Metical (1980–2006) -// - `MMK` - Myanmar Kyat -// - `NAD` - Namibian Dollar -// - `NPR` - Nepalese Rupee -// - `ANG` - Netherlands Antillean Guilder -// - `TWD` - New Taiwan Dollar -// - `NZD` - New Zealand Dollar -// - `NIO` - Nicaraguan Córdoba -// - `NIC` - Nicaraguan Córdoba (1988–1991) -// - `NGN` - Nigerian Naira -// - `KPW` - North Korean Won -// - `NOK` - Norwegian Krone -// - `OMR` - Omani Rial -// - `PKR` - Pakistani Rupee -// - `XPD` - Palladium -// - `PAB` - Panamanian Balboa -// - `PGK` - Papua New Guinean Kina -// - `PYG` - Paraguayan Guarani -// - `PEI` - Peruvian Inti -// - `PEN` - Peruvian Sol -// - `PES` - Peruvian Sol (1863–1965) -// - `PHP` - Philippine Peso -// - `XPT` - Platinum -// - `PLN` - Polish Zloty -// - `PLZ` - Polish Zloty (1950–1995) -// - `PTE` - Portuguese Escudo -// - `GWE` - Portuguese Guinea Escudo -// - `QAR` - Qatari Rial -// - `XRE` - RINET Funds -// - `RHD` - Rhodesian Dollar -// - `RON` - Romanian Leu -// - `ROL` - Romanian Leu (1952–2006) -// - `RUB` - Russian Ruble -// - `RUR` - Russian Ruble (1991–1998) -// - `RWF` - Rwandan Franc -// - `SVC` - Salvadoran Colón -// - `WST` - Samoan Tala -// - `SAR` - Saudi Riyal -// - `RSD` - Serbian Dinar -// - `CSD` - Serbian Dinar (2002–2006) -// - `SCR` - Seychellois Rupee -// - `SLL` - Sierra Leonean Leone -// - `XAG` - Silver -// - `SGD` - Singapore Dollar -// - `SKK` - Slovak Koruna -// - `SIT` - Slovenian Tolar -// - `SBD` - Solomon Islands Dollar -// - `SOS` - Somali Shilling -// - `ZAR` - South African Rand -// - `ZAL` - South African Rand (financial) -// - `KRH` - South Korean Hwan (1953–1962) -// - `KRW` - South Korean Won -// - `KRO` - South Korean Won (1945–1953) -// - `SSP` - South Sudanese Pound -// - `SUR` - Soviet Rouble -// - `ESP` - Spanish Peseta -// - `ESA` - Spanish Peseta (A account) -// - `ESB` - Spanish Peseta (convertible account) -// - `XDR` - Special Drawing Rights -// - `LKR` - Sri Lankan Rupee -// - `SHP` - St. Helena Pound -// - `XSU` - Sucre -// - `SDD` - Sudanese Dinar (1992–2007) -// - `SDG` - Sudanese Pound -// - `SDP` - Sudanese Pound (1957–1998) -// - `SRD` - Surinamese Dollar -// - `SRG` - Surinamese Guilder -// - `SZL` - Swazi Lilangeni -// - `SEK` - Swedish Krona -// - `CHF` - Swiss Franc -// - `SYP` - Syrian Pound -// - `STN` - São Tomé & Príncipe Dobra -// - `STD` - São Tomé & Príncipe Dobra (1977–2017) -// - `TVD` - TVD -// - `TJR` - Tajikistani Ruble -// - `TJS` - Tajikistani Somoni -// - `TZS` - Tanzanian Shilling -// - `XTS` - Testing Currency Code -// - `THB` - Thai Baht -// - `XXX` - The codes assigned for transactions where no currency is involved -// - `TPE` - Timorese Escudo -// - `TOP` - Tongan Paʻanga -// - `TTD` - Trinidad & Tobago Dollar -// - `TND` - Tunisian Dinar -// - `TRY` - Turkish Lira -// - `TRL` - Turkish Lira (1922–2005) -// - `TMT` - Turkmenistani Manat -// - `TMM` - Turkmenistani Manat (1993–2009) -// - `USD` - US Dollar -// - `USN` - US Dollar (Next day) -// - `USS` - US Dollar (Same day) -// - `UGX` - Ugandan Shilling -// - `UGS` - Ugandan Shilling (1966–1987) -// - `UAH` - Ukrainian Hryvnia -// - `UAK` - Ukrainian Karbovanets -// - `AED` - United Arab Emirates Dirham -// - `UYW` - Uruguayan Nominal Wage Index Unit -// - `UYU` - Uruguayan Peso -// - `UYP` - Uruguayan Peso (1975–1993) -// - `UYI` - Uruguayan Peso (Indexed Units) -// - `UZS` - Uzbekistani Som -// - `VUV` - Vanuatu Vatu -// - `VES` - Venezuelan Bolívar -// - `VEB` - Venezuelan Bolívar (1871–2008) -// - `VEF` - Venezuelan Bolívar (2008–2018) -// - `VND` - Vietnamese Dong -// - `VNN` - Vietnamese Dong (1978–1985) -// - `CHE` - WIR Euro -// - `CHW` - WIR Franc -// - `XOF` - West African CFA Franc -// - `YDD` - Yemeni Dinar -// - `YER` - Yemeni Rial -// - `YUN` - Yugoslavian Convertible Dinar (1990–1992) -// - `YUD` - Yugoslavian Hard Dinar (1966–1990) -// - `YUM` - Yugoslavian New Dinar (1994–2002) -// - `YUR` - Yugoslavian Reformed Dinar (1992–1993) -// - `ZWN` - ZWN -// - `ZRN` - Zairean New Zaire (1993–1998) -// - `ZRZ` - Zairean Zaire (1971–1993) -// - `ZMW` - Zambian Kwacha -// - `ZMK` - Zambian Kwacha (1968–2012) -// - `ZWD` - Zimbabwean Dollar (1980–2008) -// - `ZWR` - Zimbabwean Dollar (2008) -// - `ZWL` - Zimbabwean Dollar (2009) -type EmploymentPayCurrency struct { - typeName string - PayCurrencyEnum PayCurrencyEnum - String string +func (l *LinkedAccountStatus) String() string { + if len(l.rawJSON) > 0 { + if value, err := internal.StringifyJSON(l.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(l); err == nil { + return value + } + return fmt.Sprintf("%#v", l) } -func NewEmploymentPayCurrencyFromPayCurrencyEnum(value PayCurrencyEnum) *EmploymentPayCurrency { - return &EmploymentPayCurrency{typeName: "payCurrencyEnum", PayCurrencyEnum: value} +// # The Location Object +// ### Description +// The `Location` object is used to represent an address that can be associated with an employee. +// +// ### Usage Example +// Fetch from the `LIST Locations` endpoint and filter by `ID` to show all office locations. +type Location struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The location's name. + Name *string `json:"name,omitempty" url:"name,omitempty"` + // The location's phone number. + PhoneNumber *string `json:"phone_number,omitempty" url:"phone_number,omitempty"` + // Line 1 of the location's street address. + Street1 *string `json:"street_1,omitempty" url:"street_1,omitempty"` + // Line 2 of the location's street address. + Street2 *string `json:"street_2,omitempty" url:"street_2,omitempty"` + // The location's city. + City *string `json:"city,omitempty" url:"city,omitempty"` + // The location's state. Represents a region if outside of the US. + State *string `json:"state,omitempty" url:"state,omitempty"` + // The location's zip code or postal code. + ZipCode *string `json:"zip_code,omitempty" url:"zip_code,omitempty"` + // The location's country. + // + // * `AF` - Afghanistan + // * `AX` - Åland Islands + // * `AL` - Albania + // * `DZ` - Algeria + // * `AS` - American Samoa + // * `AD` - Andorra + // * `AO` - Angola + // * `AI` - Anguilla + // * `AQ` - Antarctica + // * `AG` - Antigua and Barbuda + // * `AR` - Argentina + // * `AM` - Armenia + // * `AW` - Aruba + // * `AU` - Australia + // * `AT` - Austria + // * `AZ` - Azerbaijan + // * `BS` - Bahamas + // * `BH` - Bahrain + // * `BD` - Bangladesh + // * `BB` - Barbados + // * `BY` - Belarus + // * `BE` - Belgium + // * `BZ` - Belize + // * `BJ` - Benin + // * `BM` - Bermuda + // * `BT` - Bhutan + // * `BO` - Bolivia + // * `BQ` - Bonaire, Sint Eustatius and Saba + // * `BA` - Bosnia and Herzegovina + // * `BW` - Botswana + // * `BV` - Bouvet Island + // * `BR` - Brazil + // * `IO` - British Indian Ocean Territory + // * `BN` - Brunei + // * `BG` - Bulgaria + // * `BF` - Burkina Faso + // * `BI` - Burundi + // * `CV` - Cabo Verde + // * `KH` - Cambodia + // * `CM` - Cameroon + // * `CA` - Canada + // * `KY` - Cayman Islands + // * `CF` - Central African Republic + // * `TD` - Chad + // * `CL` - Chile + // * `CN` - China + // * `CX` - Christmas Island + // * `CC` - Cocos (Keeling) Islands + // * `CO` - Colombia + // * `KM` - Comoros + // * `CG` - Congo + // * `CD` - Congo (the Democratic Republic of the) + // * `CK` - Cook Islands + // * `CR` - Costa Rica + // * `CI` - Côte d'Ivoire + // * `HR` - Croatia + // * `CU` - Cuba + // * `CW` - Curaçao + // * `CY` - Cyprus + // * `CZ` - Czechia + // * `DK` - Denmark + // * `DJ` - Djibouti + // * `DM` - Dominica + // * `DO` - Dominican Republic + // * `EC` - Ecuador + // * `EG` - Egypt + // * `SV` - El Salvador + // * `GQ` - Equatorial Guinea + // * `ER` - Eritrea + // * `EE` - Estonia + // * `SZ` - Eswatini + // * `ET` - Ethiopia + // * `FK` - Falkland Islands (Malvinas) + // * `FO` - Faroe Islands + // * `FJ` - Fiji + // * `FI` - Finland + // * `FR` - France + // * `GF` - French Guiana + // * `PF` - French Polynesia + // * `TF` - French Southern Territories + // * `GA` - Gabon + // * `GM` - Gambia + // * `GE` - Georgia + // * `DE` - Germany + // * `GH` - Ghana + // * `GI` - Gibraltar + // * `GR` - Greece + // * `GL` - Greenland + // * `GD` - Grenada + // * `GP` - Guadeloupe + // * `GU` - Guam + // * `GT` - Guatemala + // * `GG` - Guernsey + // * `GN` - Guinea + // * `GW` - Guinea-Bissau + // * `GY` - Guyana + // * `HT` - Haiti + // * `HM` - Heard Island and McDonald Islands + // * `VA` - Holy See + // * `HN` - Honduras + // * `HK` - Hong Kong + // * `HU` - Hungary + // * `IS` - Iceland + // * `IN` - India + // * `ID` - Indonesia + // * `IR` - Iran + // * `IQ` - Iraq + // * `IE` - Ireland + // * `IM` - Isle of Man + // * `IL` - Israel + // * `IT` - Italy + // * `JM` - Jamaica + // * `JP` - Japan + // * `JE` - Jersey + // * `JO` - Jordan + // * `KZ` - Kazakhstan + // * `KE` - Kenya + // * `KI` - Kiribati + // * `KW` - Kuwait + // * `KG` - Kyrgyzstan + // * `LA` - Laos + // * `LV` - Latvia + // * `LB` - Lebanon + // * `LS` - Lesotho + // * `LR` - Liberia + // * `LY` - Libya + // * `LI` - Liechtenstein + // * `LT` - Lithuania + // * `LU` - Luxembourg + // * `MO` - Macao + // * `MG` - Madagascar + // * `MW` - Malawi + // * `MY` - Malaysia + // * `MV` - Maldives + // * `ML` - Mali + // * `MT` - Malta + // * `MH` - Marshall Islands + // * `MQ` - Martinique + // * `MR` - Mauritania + // * `MU` - Mauritius + // * `YT` - Mayotte + // * `MX` - Mexico + // * `FM` - Micronesia (Federated States of) + // * `MD` - Moldova + // * `MC` - Monaco + // * `MN` - Mongolia + // * `ME` - Montenegro + // * `MS` - Montserrat + // * `MA` - Morocco + // * `MZ` - Mozambique + // * `MM` - Myanmar + // * `NA` - Namibia + // * `NR` - Nauru + // * `NP` - Nepal + // * `NL` - Netherlands + // * `NC` - New Caledonia + // * `NZ` - New Zealand + // * `NI` - Nicaragua + // * `NE` - Niger + // * `NG` - Nigeria + // * `NU` - Niue + // * `NF` - Norfolk Island + // * `KP` - North Korea + // * `MK` - North Macedonia + // * `MP` - Northern Mariana Islands + // * `NO` - Norway + // * `OM` - Oman + // * `PK` - Pakistan + // * `PW` - Palau + // * `PS` - Palestine, State of + // * `PA` - Panama + // * `PG` - Papua New Guinea + // * `PY` - Paraguay + // * `PE` - Peru + // * `PH` - Philippines + // * `PN` - Pitcairn + // * `PL` - Poland + // * `PT` - Portugal + // * `PR` - Puerto Rico + // * `QA` - Qatar + // * `RE` - Réunion + // * `RO` - Romania + // * `RU` - Russia + // * `RW` - Rwanda + // * `BL` - Saint Barthélemy + // * `SH` - Saint Helena, Ascension and Tristan da Cunha + // * `KN` - Saint Kitts and Nevis + // * `LC` - Saint Lucia + // * `MF` - Saint Martin (French part) + // * `PM` - Saint Pierre and Miquelon + // * `VC` - Saint Vincent and the Grenadines + // * `WS` - Samoa + // * `SM` - San Marino + // * `ST` - Sao Tome and Principe + // * `SA` - Saudi Arabia + // * `SN` - Senegal + // * `RS` - Serbia + // * `SC` - Seychelles + // * `SL` - Sierra Leone + // * `SG` - Singapore + // * `SX` - Sint Maarten (Dutch part) + // * `SK` - Slovakia + // * `SI` - Slovenia + // * `SB` - Solomon Islands + // * `SO` - Somalia + // * `ZA` - South Africa + // * `GS` - South Georgia and the South Sandwich Islands + // * `KR` - South Korea + // * `SS` - South Sudan + // * `ES` - Spain + // * `LK` - Sri Lanka + // * `SD` - Sudan + // * `SR` - Suriname + // * `SJ` - Svalbard and Jan Mayen + // * `SE` - Sweden + // * `CH` - Switzerland + // * `SY` - Syria + // * `TW` - Taiwan + // * `TJ` - Tajikistan + // * `TZ` - Tanzania + // * `TH` - Thailand + // * `TL` - Timor-Leste + // * `TG` - Togo + // * `TK` - Tokelau + // * `TO` - Tonga + // * `TT` - Trinidad and Tobago + // * `TN` - Tunisia + // * `TR` - Turkey + // * `TM` - Turkmenistan + // * `TC` - Turks and Caicos Islands + // * `TV` - Tuvalu + // * `UG` - Uganda + // * `UA` - Ukraine + // * `AE` - United Arab Emirates + // * `GB` - United Kingdom + // * `UM` - United States Minor Outlying Islands + // * `US` - United States of America + // * `UY` - Uruguay + // * `UZ` - Uzbekistan + // * `VU` - Vanuatu + // * `VE` - Venezuela + // * `VN` - Vietnam + // * `VG` - Virgin Islands (British) + // * `VI` - Virgin Islands (U.S.) + // * `WF` - Wallis and Futuna + // * `EH` - Western Sahara + // * `YE` - Yemen + // * `ZM` - Zambia + // * `ZW` - Zimbabwe + Country *LocationCountry `json:"country,omitempty" url:"country,omitempty"` + // The location's type. Can be either WORK or HOME + // + // * `HOME` - HOME + // * `WORK` - WORK + LocationType *LocationLocationType `json:"location_type,omitempty" url:"location_type,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func NewEmploymentPayCurrencyFromString(value string) *EmploymentPayCurrency { - return &EmploymentPayCurrency{typeName: "string", String: value} +func (l *Location) GetId() *string { + if l == nil { + return nil + } + return l.Id } -func (e *EmploymentPayCurrency) UnmarshalJSON(data []byte) error { - var valuePayCurrencyEnum PayCurrencyEnum - if err := json.Unmarshal(data, &valuePayCurrencyEnum); err == nil { - e.typeName = "payCurrencyEnum" - e.PayCurrencyEnum = valuePayCurrencyEnum +func (l *Location) GetRemoteId() *string { + if l == nil { return nil } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString + return l.RemoteId +} + +func (l *Location) GetCreatedAt() *time.Time { + if l == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) + return l.CreatedAt } -func (e EmploymentPayCurrency) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "payCurrencyEnum": - return json.Marshal(e.PayCurrencyEnum) - case "string": - return json.Marshal(e.String) +func (l *Location) GetModifiedAt() *time.Time { + if l == nil { + return nil } + return l.ModifiedAt } -type EmploymentPayCurrencyVisitor interface { - VisitPayCurrencyEnum(PayCurrencyEnum) error - VisitString(string) error +func (l *Location) GetName() *string { + if l == nil { + return nil + } + return l.Name } -func (e *EmploymentPayCurrency) Accept(visitor EmploymentPayCurrencyVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "payCurrencyEnum": - return visitor.VisitPayCurrencyEnum(e.PayCurrencyEnum) - case "string": - return visitor.VisitString(e.String) +func (l *Location) GetPhoneNumber() *string { + if l == nil { + return nil } + return l.PhoneNumber } -// The position's pay frequency. -// -// - `WEEKLY` - WEEKLY -// - `BIWEEKLY` - BIWEEKLY -// - `MONTHLY` - MONTHLY -// - `QUARTERLY` - QUARTERLY -// - `SEMIANNUALLY` - SEMIANNUALLY -// - `ANNUALLY` - ANNUALLY -// - `THIRTEEN-MONTHLY` - THIRTEEN-MONTHLY -// - `PRO_RATA` - PRO_RATA -// - `SEMIMONTHLY` - SEMIMONTHLY -type EmploymentPayFrequency struct { - typeName string - PayFrequencyEnum PayFrequencyEnum - String string +func (l *Location) GetStreet1() *string { + if l == nil { + return nil + } + return l.Street1 } -func NewEmploymentPayFrequencyFromPayFrequencyEnum(value PayFrequencyEnum) *EmploymentPayFrequency { - return &EmploymentPayFrequency{typeName: "payFrequencyEnum", PayFrequencyEnum: value} +func (l *Location) GetStreet2() *string { + if l == nil { + return nil + } + return l.Street2 } -func NewEmploymentPayFrequencyFromString(value string) *EmploymentPayFrequency { - return &EmploymentPayFrequency{typeName: "string", String: value} +func (l *Location) GetCity() *string { + if l == nil { + return nil + } + return l.City } -func (e *EmploymentPayFrequency) UnmarshalJSON(data []byte) error { - var valuePayFrequencyEnum PayFrequencyEnum - if err := json.Unmarshal(data, &valuePayFrequencyEnum); err == nil { - e.typeName = "payFrequencyEnum" - e.PayFrequencyEnum = valuePayFrequencyEnum +func (l *Location) GetState() *string { + if l == nil { return nil } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString + return l.State +} + +func (l *Location) GetZipCode() *string { + if l == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) + return l.ZipCode } -func (e EmploymentPayFrequency) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "payFrequencyEnum": - return json.Marshal(e.PayFrequencyEnum) - case "string": - return json.Marshal(e.String) +func (l *Location) GetCountry() *LocationCountry { + if l == nil { + return nil } + return l.Country } -type EmploymentPayFrequencyVisitor interface { - VisitPayFrequencyEnum(PayFrequencyEnum) error - VisitString(string) error +func (l *Location) GetLocationType() *LocationLocationType { + if l == nil { + return nil + } + return l.LocationType } -func (e *EmploymentPayFrequency) Accept(visitor EmploymentPayFrequencyVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "payFrequencyEnum": - return visitor.VisitPayFrequencyEnum(e.PayFrequencyEnum) - case "string": - return visitor.VisitString(e.String) +func (l *Location) GetRemoteWasDeleted() *bool { + if l == nil { + return nil } + return l.RemoteWasDeleted } -// The employment's pay group -type EmploymentPayGroup struct { - typeName string - String string - PayGroup *PayGroup +func (l *Location) GetFieldMappings() map[string]interface{} { + if l == nil { + return nil + } + return l.FieldMappings } -func NewEmploymentPayGroupFromString(value string) *EmploymentPayGroup { - return &EmploymentPayGroup{typeName: "string", String: value} +func (l *Location) GetRemoteData() []*RemoteData { + if l == nil { + return nil + } + return l.RemoteData } -func NewEmploymentPayGroupFromPayGroup(value *PayGroup) *EmploymentPayGroup { - return &EmploymentPayGroup{typeName: "payGroup", PayGroup: value} +func (l *Location) GetExtraProperties() map[string]interface{} { + return l.extraProperties } -func (e *EmploymentPayGroup) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString - return nil +func (l *Location) UnmarshalJSON(data []byte) error { + type embed Location + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*l), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err } - valuePayGroup := new(PayGroup) - if err := json.Unmarshal(data, &valuePayGroup); err == nil { - e.typeName = "payGroup" - e.PayGroup = valuePayGroup - return nil + *l = Location(unmarshaler.embed) + l.CreatedAt = unmarshaler.CreatedAt.TimePtr() + l.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *l) + if err != nil { + return err } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) + l.extraProperties = extraProperties + l.rawJSON = json.RawMessage(data) + return nil } -func (e EmploymentPayGroup) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return json.Marshal(e.String) - case "payGroup": - return json.Marshal(e.PayGroup) +func (l *Location) MarshalJSON() ([]byte, error) { + type embed Location + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*l), + CreatedAt: internal.NewOptionalDateTime(l.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(l.ModifiedAt), } + return json.Marshal(marshaler) } -type EmploymentPayGroupVisitor interface { - VisitString(string) error - VisitPayGroup(*PayGroup) error -} - -func (e *EmploymentPayGroup) Accept(visitor EmploymentPayGroupVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "string": - return visitor.VisitString(e.String) - case "payGroup": - return visitor.VisitPayGroup(e.PayGroup) +func (l *Location) String() string { + if len(l.rawJSON) > 0 { + if value, err := internal.StringifyJSON(l.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(l); err == nil { + return value } + return fmt.Sprintf("%#v", l) } -// The time period this pay rate encompasses. +// The location's country. // -// - `HOUR` - HOUR -// - `DAY` - DAY -// - `WEEK` - WEEK -// - `EVERY_TWO_WEEKS` - EVERY_TWO_WEEKS -// - `SEMIMONTHLY` - SEMIMONTHLY -// - `MONTH` - MONTH -// - `QUARTER` - QUARTER -// - `EVERY_SIX_MONTHS` - EVERY_SIX_MONTHS -// - `YEAR` - YEAR -type EmploymentPayPeriod struct { - typeName string - PayPeriodEnum PayPeriodEnum - String string +// * `AF` - Afghanistan +// * `AX` - Åland Islands +// * `AL` - Albania +// * `DZ` - Algeria +// * `AS` - American Samoa +// * `AD` - Andorra +// * `AO` - Angola +// * `AI` - Anguilla +// * `AQ` - Antarctica +// * `AG` - Antigua and Barbuda +// * `AR` - Argentina +// * `AM` - Armenia +// * `AW` - Aruba +// * `AU` - Australia +// * `AT` - Austria +// * `AZ` - Azerbaijan +// * `BS` - Bahamas +// * `BH` - Bahrain +// * `BD` - Bangladesh +// * `BB` - Barbados +// * `BY` - Belarus +// * `BE` - Belgium +// * `BZ` - Belize +// * `BJ` - Benin +// * `BM` - Bermuda +// * `BT` - Bhutan +// * `BO` - Bolivia +// * `BQ` - Bonaire, Sint Eustatius and Saba +// * `BA` - Bosnia and Herzegovina +// * `BW` - Botswana +// * `BV` - Bouvet Island +// * `BR` - Brazil +// * `IO` - British Indian Ocean Territory +// * `BN` - Brunei +// * `BG` - Bulgaria +// * `BF` - Burkina Faso +// * `BI` - Burundi +// * `CV` - Cabo Verde +// * `KH` - Cambodia +// * `CM` - Cameroon +// * `CA` - Canada +// * `KY` - Cayman Islands +// * `CF` - Central African Republic +// * `TD` - Chad +// * `CL` - Chile +// * `CN` - China +// * `CX` - Christmas Island +// * `CC` - Cocos (Keeling) Islands +// * `CO` - Colombia +// * `KM` - Comoros +// * `CG` - Congo +// * `CD` - Congo (the Democratic Republic of the) +// * `CK` - Cook Islands +// * `CR` - Costa Rica +// * `CI` - Côte d'Ivoire +// * `HR` - Croatia +// * `CU` - Cuba +// * `CW` - Curaçao +// * `CY` - Cyprus +// * `CZ` - Czechia +// * `DK` - Denmark +// * `DJ` - Djibouti +// * `DM` - Dominica +// * `DO` - Dominican Republic +// * `EC` - Ecuador +// * `EG` - Egypt +// * `SV` - El Salvador +// * `GQ` - Equatorial Guinea +// * `ER` - Eritrea +// * `EE` - Estonia +// * `SZ` - Eswatini +// * `ET` - Ethiopia +// * `FK` - Falkland Islands (Malvinas) +// * `FO` - Faroe Islands +// * `FJ` - Fiji +// * `FI` - Finland +// * `FR` - France +// * `GF` - French Guiana +// * `PF` - French Polynesia +// * `TF` - French Southern Territories +// * `GA` - Gabon +// * `GM` - Gambia +// * `GE` - Georgia +// * `DE` - Germany +// * `GH` - Ghana +// * `GI` - Gibraltar +// * `GR` - Greece +// * `GL` - Greenland +// * `GD` - Grenada +// * `GP` - Guadeloupe +// * `GU` - Guam +// * `GT` - Guatemala +// * `GG` - Guernsey +// * `GN` - Guinea +// * `GW` - Guinea-Bissau +// * `GY` - Guyana +// * `HT` - Haiti +// * `HM` - Heard Island and McDonald Islands +// * `VA` - Holy See +// * `HN` - Honduras +// * `HK` - Hong Kong +// * `HU` - Hungary +// * `IS` - Iceland +// * `IN` - India +// * `ID` - Indonesia +// * `IR` - Iran +// * `IQ` - Iraq +// * `IE` - Ireland +// * `IM` - Isle of Man +// * `IL` - Israel +// * `IT` - Italy +// * `JM` - Jamaica +// * `JP` - Japan +// * `JE` - Jersey +// * `JO` - Jordan +// * `KZ` - Kazakhstan +// * `KE` - Kenya +// * `KI` - Kiribati +// * `KW` - Kuwait +// * `KG` - Kyrgyzstan +// * `LA` - Laos +// * `LV` - Latvia +// * `LB` - Lebanon +// * `LS` - Lesotho +// * `LR` - Liberia +// * `LY` - Libya +// * `LI` - Liechtenstein +// * `LT` - Lithuania +// * `LU` - Luxembourg +// * `MO` - Macao +// * `MG` - Madagascar +// * `MW` - Malawi +// * `MY` - Malaysia +// * `MV` - Maldives +// * `ML` - Mali +// * `MT` - Malta +// * `MH` - Marshall Islands +// * `MQ` - Martinique +// * `MR` - Mauritania +// * `MU` - Mauritius +// * `YT` - Mayotte +// * `MX` - Mexico +// * `FM` - Micronesia (Federated States of) +// * `MD` - Moldova +// * `MC` - Monaco +// * `MN` - Mongolia +// * `ME` - Montenegro +// * `MS` - Montserrat +// * `MA` - Morocco +// * `MZ` - Mozambique +// * `MM` - Myanmar +// * `NA` - Namibia +// * `NR` - Nauru +// * `NP` - Nepal +// * `NL` - Netherlands +// * `NC` - New Caledonia +// * `NZ` - New Zealand +// * `NI` - Nicaragua +// * `NE` - Niger +// * `NG` - Nigeria +// * `NU` - Niue +// * `NF` - Norfolk Island +// * `KP` - North Korea +// * `MK` - North Macedonia +// * `MP` - Northern Mariana Islands +// * `NO` - Norway +// * `OM` - Oman +// * `PK` - Pakistan +// * `PW` - Palau +// * `PS` - Palestine, State of +// * `PA` - Panama +// * `PG` - Papua New Guinea +// * `PY` - Paraguay +// * `PE` - Peru +// * `PH` - Philippines +// * `PN` - Pitcairn +// * `PL` - Poland +// * `PT` - Portugal +// * `PR` - Puerto Rico +// * `QA` - Qatar +// * `RE` - Réunion +// * `RO` - Romania +// * `RU` - Russia +// * `RW` - Rwanda +// * `BL` - Saint Barthélemy +// * `SH` - Saint Helena, Ascension and Tristan da Cunha +// * `KN` - Saint Kitts and Nevis +// * `LC` - Saint Lucia +// * `MF` - Saint Martin (French part) +// * `PM` - Saint Pierre and Miquelon +// * `VC` - Saint Vincent and the Grenadines +// * `WS` - Samoa +// * `SM` - San Marino +// * `ST` - Sao Tome and Principe +// * `SA` - Saudi Arabia +// * `SN` - Senegal +// * `RS` - Serbia +// * `SC` - Seychelles +// * `SL` - Sierra Leone +// * `SG` - Singapore +// * `SX` - Sint Maarten (Dutch part) +// * `SK` - Slovakia +// * `SI` - Slovenia +// * `SB` - Solomon Islands +// * `SO` - Somalia +// * `ZA` - South Africa +// * `GS` - South Georgia and the South Sandwich Islands +// * `KR` - South Korea +// * `SS` - South Sudan +// * `ES` - Spain +// * `LK` - Sri Lanka +// * `SD` - Sudan +// * `SR` - Suriname +// * `SJ` - Svalbard and Jan Mayen +// * `SE` - Sweden +// * `CH` - Switzerland +// * `SY` - Syria +// * `TW` - Taiwan +// * `TJ` - Tajikistan +// * `TZ` - Tanzania +// * `TH` - Thailand +// * `TL` - Timor-Leste +// * `TG` - Togo +// * `TK` - Tokelau +// * `TO` - Tonga +// * `TT` - Trinidad and Tobago +// * `TN` - Tunisia +// * `TR` - Turkey +// * `TM` - Turkmenistan +// * `TC` - Turks and Caicos Islands +// * `TV` - Tuvalu +// * `UG` - Uganda +// * `UA` - Ukraine +// * `AE` - United Arab Emirates +// * `GB` - United Kingdom +// * `UM` - United States Minor Outlying Islands +// * `US` - United States of America +// * `UY` - Uruguay +// * `UZ` - Uzbekistan +// * `VU` - Vanuatu +// * `VE` - Venezuela +// * `VN` - Vietnam +// * `VG` - Virgin Islands (British) +// * `VI` - Virgin Islands (U.S.) +// * `WF` - Wallis and Futuna +// * `EH` - Western Sahara +// * `YE` - Yemen +// * `ZM` - Zambia +// * `ZW` - Zimbabwe +type LocationCountry struct { + CountryEnum CountryEnum + String string + + typ string } -func NewEmploymentPayPeriodFromPayPeriodEnum(value PayPeriodEnum) *EmploymentPayPeriod { - return &EmploymentPayPeriod{typeName: "payPeriodEnum", PayPeriodEnum: value} +func (l *LocationCountry) GetCountryEnum() CountryEnum { + if l == nil { + return "" + } + return l.CountryEnum } -func NewEmploymentPayPeriodFromString(value string) *EmploymentPayPeriod { - return &EmploymentPayPeriod{typeName: "string", String: value} +func (l *LocationCountry) GetString() string { + if l == nil { + return "" + } + return l.String } -func (e *EmploymentPayPeriod) UnmarshalJSON(data []byte) error { - var valuePayPeriodEnum PayPeriodEnum - if err := json.Unmarshal(data, &valuePayPeriodEnum); err == nil { - e.typeName = "payPeriodEnum" - e.PayPeriodEnum = valuePayPeriodEnum +func (l *LocationCountry) UnmarshalJSON(data []byte) error { + var valueCountryEnum CountryEnum + if err := json.Unmarshal(data, &valueCountryEnum); err == nil { + l.typ = "CountryEnum" + l.CountryEnum = valueCountryEnum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - e.typeName = "string" - e.String = valueString + l.typ = "String" + l.String = valueString return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, e) + return fmt.Errorf("%s cannot be deserialized as a %T", data, l) } -func (e EmploymentPayPeriod) MarshalJSON() ([]byte, error) { - switch e.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "payPeriodEnum": - return json.Marshal(e.PayPeriodEnum) - case "string": - return json.Marshal(e.String) +func (l LocationCountry) MarshalJSON() ([]byte, error) { + if l.typ == "CountryEnum" || l.CountryEnum != "" { + return json.Marshal(l.CountryEnum) + } + if l.typ == "String" || l.String != "" { + return json.Marshal(l.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", l) } -type EmploymentPayPeriodVisitor interface { - VisitPayPeriodEnum(PayPeriodEnum) error +type LocationCountryVisitor interface { + VisitCountryEnum(CountryEnum) error VisitString(string) error } -func (e *EmploymentPayPeriod) Accept(visitor EmploymentPayPeriodVisitor) error { - switch e.typeName { - default: - return fmt.Errorf("invalid type %s in %T", e.typeName, e) - case "payPeriodEnum": - return visitor.VisitPayPeriodEnum(e.PayPeriodEnum) - case "string": - return visitor.VisitString(e.String) +func (l *LocationCountry) Accept(visitor LocationCountryVisitor) error { + if l.typ == "CountryEnum" || l.CountryEnum != "" { + return visitor.VisitCountryEnum(l.CountryEnum) + } + if l.typ == "String" || l.String != "" { + return visitor.VisitString(l.String) } + return fmt.Errorf("type %T does not include a non-empty union type", l) } -// - `ACTIVE` - ACTIVE -// - `PENDING` - PENDING -// - `INACTIVE` - INACTIVE -type EmploymentStatusEnum string +// The location's type. Can be either WORK or HOME +// +// * `HOME` - HOME +// * `WORK` - WORK +type LocationLocationType struct { + LocationTypeEnum LocationTypeEnum + String string -const ( - EmploymentStatusEnumActive EmploymentStatusEnum = "ACTIVE" - EmploymentStatusEnumPending EmploymentStatusEnum = "PENDING" - EmploymentStatusEnumInactive EmploymentStatusEnum = "INACTIVE" -) + typ string +} -func NewEmploymentStatusEnumFromString(s string) (EmploymentStatusEnum, error) { - switch s { - case "ACTIVE": - return EmploymentStatusEnumActive, nil - case "PENDING": - return EmploymentStatusEnumPending, nil - case "INACTIVE": - return EmploymentStatusEnumInactive, nil +func (l *LocationLocationType) GetLocationTypeEnum() LocationTypeEnum { + if l == nil { + return "" } - var t EmploymentStatusEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) + return l.LocationTypeEnum } -func (e EmploymentStatusEnum) Ptr() *EmploymentStatusEnum { - return &e +func (l *LocationLocationType) GetString() string { + if l == nil { + return "" + } + return l.String } -// - `FULL_TIME` - FULL_TIME -// - `PART_TIME` - PART_TIME -// - `INTERN` - INTERN -// - `CONTRACTOR` - CONTRACTOR -// - `FREELANCE` - FREELANCE -type EmploymentTypeEnum string +func (l *LocationLocationType) UnmarshalJSON(data []byte) error { + var valueLocationTypeEnum LocationTypeEnum + if err := json.Unmarshal(data, &valueLocationTypeEnum); err == nil { + l.typ = "LocationTypeEnum" + l.LocationTypeEnum = valueLocationTypeEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + l.typ = "String" + l.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, l) +} + +func (l LocationLocationType) MarshalJSON() ([]byte, error) { + if l.typ == "LocationTypeEnum" || l.LocationTypeEnum != "" { + return json.Marshal(l.LocationTypeEnum) + } + if l.typ == "String" || l.String != "" { + return json.Marshal(l.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", l) +} + +type LocationLocationTypeVisitor interface { + VisitLocationTypeEnum(LocationTypeEnum) error + VisitString(string) error +} + +func (l *LocationLocationType) Accept(visitor LocationLocationTypeVisitor) error { + if l.typ == "LocationTypeEnum" || l.LocationTypeEnum != "" { + return visitor.VisitLocationTypeEnum(l.LocationTypeEnum) + } + if l.typ == "String" || l.String != "" { + return visitor.VisitString(l.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", l) +} + +// * `HOME` - HOME +// * `WORK` - WORK +type LocationTypeEnum string const ( - EmploymentTypeEnumFullTime EmploymentTypeEnum = "FULL_TIME" - EmploymentTypeEnumPartTime EmploymentTypeEnum = "PART_TIME" - EmploymentTypeEnumIntern EmploymentTypeEnum = "INTERN" - EmploymentTypeEnumContractor EmploymentTypeEnum = "CONTRACTOR" - EmploymentTypeEnumFreelance EmploymentTypeEnum = "FREELANCE" + LocationTypeEnumHome LocationTypeEnum = "HOME" + LocationTypeEnumWork LocationTypeEnum = "WORK" ) -func NewEmploymentTypeEnumFromString(s string) (EmploymentTypeEnum, error) { +func NewLocationTypeEnumFromString(s string) (LocationTypeEnum, error) { switch s { - case "FULL_TIME": - return EmploymentTypeEnumFullTime, nil - case "PART_TIME": - return EmploymentTypeEnumPartTime, nil - case "INTERN": - return EmploymentTypeEnumIntern, nil - case "CONTRACTOR": - return EmploymentTypeEnumContractor, nil - case "FREELANCE": - return EmploymentTypeEnumFreelance, nil + case "HOME": + return LocationTypeEnumHome, nil + case "WORK": + return LocationTypeEnumWork, nil } - var t EmploymentTypeEnum + var t LocationTypeEnum return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (e EmploymentTypeEnum) Ptr() *EmploymentTypeEnum { - return &e +func (l LocationTypeEnum) Ptr() *LocationTypeEnum { + return &l } -// - `READ` - READ -// - `WRITE` - WRITE -type EnabledActionsEnum string +// * `SINGLE` - SINGLE +// * `MARRIED_FILING_JOINTLY` - MARRIED_FILING_JOINTLY +// * `MARRIED_FILING_SEPARATELY` - MARRIED_FILING_SEPARATELY +// * `HEAD_OF_HOUSEHOLD` - HEAD_OF_HOUSEHOLD +// * `QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD` - QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD +type MaritalStatusEnum string const ( - EnabledActionsEnumRead EnabledActionsEnum = "READ" - EnabledActionsEnumWrite EnabledActionsEnum = "WRITE" + MaritalStatusEnumSingle MaritalStatusEnum = "SINGLE" + MaritalStatusEnumMarriedFilingJointly MaritalStatusEnum = "MARRIED_FILING_JOINTLY" + MaritalStatusEnumMarriedFilingSeparately MaritalStatusEnum = "MARRIED_FILING_SEPARATELY" + MaritalStatusEnumHeadOfHousehold MaritalStatusEnum = "HEAD_OF_HOUSEHOLD" + MaritalStatusEnumQualifyingWidowOrWidowerWithDependentChild MaritalStatusEnum = "QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD" ) -func NewEnabledActionsEnumFromString(s string) (EnabledActionsEnum, error) { +func NewMaritalStatusEnumFromString(s string) (MaritalStatusEnum, error) { switch s { - case "READ": - return EnabledActionsEnumRead, nil - case "WRITE": - return EnabledActionsEnumWrite, nil + case "SINGLE": + return MaritalStatusEnumSingle, nil + case "MARRIED_FILING_JOINTLY": + return MaritalStatusEnumMarriedFilingJointly, nil + case "MARRIED_FILING_SEPARATELY": + return MaritalStatusEnumMarriedFilingSeparately, nil + case "HEAD_OF_HOUSEHOLD": + return MaritalStatusEnumHeadOfHousehold, nil + case "QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD": + return MaritalStatusEnumQualifyingWidowOrWidowerWithDependentChild, nil } - var t EnabledActionsEnum + var t MaritalStatusEnum return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (e EnabledActionsEnum) Ptr() *EnabledActionsEnum { - return &e +func (m MaritalStatusEnum) Ptr() *MaritalStatusEnum { + return &m } -// - `RAW` - RAW -// - `BASE64` - BASE64 -// - `GZIP_BASE64` - GZIP_BASE64 -type EncodingEnum string +type MetaResponse struct { + RequestSchema map[string]interface{} `json:"request_schema" url:"request_schema"` + RemoteFieldClasses map[string]interface{} `json:"remote_field_classes,omitempty" url:"remote_field_classes,omitempty"` + Status *LinkedAccountStatus `json:"status,omitempty" url:"status,omitempty"` + HasConditionalParams bool `json:"has_conditional_params" url:"has_conditional_params"` + HasRequiredLinkedAccountParams bool `json:"has_required_linked_account_params" url:"has_required_linked_account_params"` -const ( - EncodingEnumRaw EncodingEnum = "RAW" - EncodingEnumBase64 EncodingEnum = "BASE64" - EncodingEnumGzipBase64 EncodingEnum = "GZIP_BASE64" -) + extraProperties map[string]interface{} + rawJSON json.RawMessage +} -func NewEncodingEnumFromString(s string) (EncodingEnum, error) { - switch s { - case "RAW": - return EncodingEnumRaw, nil - case "BASE64": - return EncodingEnumBase64, nil - case "GZIP_BASE64": - return EncodingEnumGzipBase64, nil +func (m *MetaResponse) GetRequestSchema() map[string]interface{} { + if m == nil { + return nil } - var t EncodingEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) + return m.RequestSchema } -func (e EncodingEnum) Ptr() *EncodingEnum { - return &e +func (m *MetaResponse) GetRemoteFieldClasses() map[string]interface{} { + if m == nil { + return nil + } + return m.RemoteFieldClasses } -type ErrorValidationProblem struct { - Source *ValidationProblemSource `json:"source,omitempty"` - Title string `json:"title"` - Detail string `json:"detail"` - ProblemType string `json:"problem_type"` +func (m *MetaResponse) GetStatus() *LinkedAccountStatus { + if m == nil { + return nil + } + return m.Status +} - _rawJSON json.RawMessage +func (m *MetaResponse) GetHasConditionalParams() bool { + if m == nil { + return false + } + return m.HasConditionalParams } -func (e *ErrorValidationProblem) UnmarshalJSON(data []byte) error { - type unmarshaler ErrorValidationProblem +func (m *MetaResponse) GetHasRequiredLinkedAccountParams() bool { + if m == nil { + return false + } + return m.HasRequiredLinkedAccountParams +} + +func (m *MetaResponse) GetExtraProperties() map[string]interface{} { + return m.extraProperties +} + +func (m *MetaResponse) UnmarshalJSON(data []byte) error { + type unmarshaler MetaResponse var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *e = ErrorValidationProblem(value) - e._rawJSON = json.RawMessage(data) + *m = MetaResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *m) + if err != nil { + return err + } + m.extraProperties = extraProperties + m.rawJSON = json.RawMessage(data) return nil } -func (e *ErrorValidationProblem) String() string { - if len(e._rawJSON) > 0 { - if value, err := core.StringifyJSON(e._rawJSON); err == nil { +func (m *MetaResponse) String() string { + if len(m.rawJSON) > 0 { + if value, err := internal.StringifyJSON(m.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(e); err == nil { + if value, err := internal.StringifyJSON(m); err == nil { return value } - return fmt.Sprintf("%#v", e) + return fmt.Sprintf("%#v", m) } -// - `AMERICAN_INDIAN_OR_ALASKA_NATIVE` - AMERICAN_INDIAN_OR_ALASKA_NATIVE -// - `ASIAN_OR_INDIAN_SUBCONTINENT` - ASIAN_OR_INDIAN_SUBCONTINENT -// - `BLACK_OR_AFRICAN_AMERICAN` - BLACK_OR_AFRICAN_AMERICAN -// - `HISPANIC_OR_LATINO` - HISPANIC_OR_LATINO -// - `NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER` - NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER -// - `TWO_OR_MORE_RACES` - TWO_OR_MORE_RACES -// - `WHITE` - WHITE -// - `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE -type EthnicityEnum string +// * `GET` - GET +// * `OPTIONS` - OPTIONS +// * `HEAD` - HEAD +// * `POST` - POST +// * `PUT` - PUT +// * `PATCH` - PATCH +// * `DELETE` - DELETE +type MethodEnum string const ( - EthnicityEnumAmericanIndianOrAlaskaNative EthnicityEnum = "AMERICAN_INDIAN_OR_ALASKA_NATIVE" - EthnicityEnumAsianOrIndianSubcontinent EthnicityEnum = "ASIAN_OR_INDIAN_SUBCONTINENT" - EthnicityEnumBlackOrAfricanAmerican EthnicityEnum = "BLACK_OR_AFRICAN_AMERICAN" - EthnicityEnumHispanicOrLatino EthnicityEnum = "HISPANIC_OR_LATINO" - EthnicityEnumNativeHawaiianOrOtherPacificIslander EthnicityEnum = "NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER" - EthnicityEnumTwoOrMoreRaces EthnicityEnum = "TWO_OR_MORE_RACES" - EthnicityEnumWhite EthnicityEnum = "WHITE" - EthnicityEnumPreferNotToDisclose EthnicityEnum = "PREFER_NOT_TO_DISCLOSE" + MethodEnumGet MethodEnum = "GET" + MethodEnumOptions MethodEnum = "OPTIONS" + MethodEnumHead MethodEnum = "HEAD" + MethodEnumPost MethodEnum = "POST" + MethodEnumPut MethodEnum = "PUT" + MethodEnumPatch MethodEnum = "PATCH" + MethodEnumDelete MethodEnum = "DELETE" ) -func NewEthnicityEnumFromString(s string) (EthnicityEnum, error) { +func NewMethodEnumFromString(s string) (MethodEnum, error) { switch s { - case "AMERICAN_INDIAN_OR_ALASKA_NATIVE": - return EthnicityEnumAmericanIndianOrAlaskaNative, nil - case "ASIAN_OR_INDIAN_SUBCONTINENT": - return EthnicityEnumAsianOrIndianSubcontinent, nil - case "BLACK_OR_AFRICAN_AMERICAN": - return EthnicityEnumBlackOrAfricanAmerican, nil - case "HISPANIC_OR_LATINO": - return EthnicityEnumHispanicOrLatino, nil - case "NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER": - return EthnicityEnumNativeHawaiianOrOtherPacificIslander, nil - case "TWO_OR_MORE_RACES": - return EthnicityEnumTwoOrMoreRaces, nil - case "WHITE": - return EthnicityEnumWhite, nil - case "PREFER_NOT_TO_DISCLOSE": - return EthnicityEnumPreferNotToDisclose, nil + case "GET": + return MethodEnumGet, nil + case "OPTIONS": + return MethodEnumOptions, nil + case "HEAD": + return MethodEnumHead, nil + case "POST": + return MethodEnumPost, nil + case "PUT": + return MethodEnumPut, nil + case "PATCH": + return MethodEnumPatch, nil + case "DELETE": + return MethodEnumDelete, nil } - var t EthnicityEnum + var t MethodEnum return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (e EthnicityEnum) Ptr() *EthnicityEnum { - return &e +func (m MethodEnum) Ptr() *MethodEnum { + return &m } -// - `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY -// - `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY -// - `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY -// - `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY -// - `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY -// - `INVITED_USER` - INVITED_USER -// - `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED -// - `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED -// - `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT -// - `CREATED_DESTINATION` - CREATED_DESTINATION -// - `DELETED_DESTINATION` - DELETED_DESTINATION -// - `CHANGED_DESTINATION` - CHANGED_DESTINATION -// - `CHANGED_SCOPES` - CHANGED_SCOPES -// - `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION -// - `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS -// - `ENABLED_INTEGRATION` - ENABLED_INTEGRATION -// - `DISABLED_INTEGRATION` - DISABLED_INTEGRATION -// - `ENABLED_CATEGORY` - ENABLED_CATEGORY -// - `DISABLED_CATEGORY` - DISABLED_CATEGORY -// - `CHANGED_PASSWORD` - CHANGED_PASSWORD -// - `RESET_PASSWORD` - RESET_PASSWORD -// - `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION -// - `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT -// - `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION -// - `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT -// - `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING -// - `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING -// - `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING -// - `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 -// - `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE -// - `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE -// - `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE -// - `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC -// - `MUTED_ISSUE` - MUTED_ISSUE -// - `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK -// - `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK -// - `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK -// - `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED -// - `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED -type EventTypeEnum string - -const ( - EventTypeEnumCreatedRemoteProductionApiKey EventTypeEnum = "CREATED_REMOTE_PRODUCTION_API_KEY" - EventTypeEnumDeletedRemoteProductionApiKey EventTypeEnum = "DELETED_REMOTE_PRODUCTION_API_KEY" - EventTypeEnumCreatedTestApiKey EventTypeEnum = "CREATED_TEST_API_KEY" - EventTypeEnumDeletedTestApiKey EventTypeEnum = "DELETED_TEST_API_KEY" - EventTypeEnumRegeneratedProductionApiKey EventTypeEnum = "REGENERATED_PRODUCTION_API_KEY" - EventTypeEnumInvitedUser EventTypeEnum = "INVITED_USER" - EventTypeEnumTwoFactorAuthEnabled EventTypeEnum = "TWO_FACTOR_AUTH_ENABLED" - EventTypeEnumTwoFactorAuthDisabled EventTypeEnum = "TWO_FACTOR_AUTH_DISABLED" - EventTypeEnumDeletedLinkedAccount EventTypeEnum = "DELETED_LINKED_ACCOUNT" - EventTypeEnumCreatedDestination EventTypeEnum = "CREATED_DESTINATION" - EventTypeEnumDeletedDestination EventTypeEnum = "DELETED_DESTINATION" - EventTypeEnumChangedDestination EventTypeEnum = "CHANGED_DESTINATION" - EventTypeEnumChangedScopes EventTypeEnum = "CHANGED_SCOPES" - EventTypeEnumChangedPersonalInformation EventTypeEnum = "CHANGED_PERSONAL_INFORMATION" - EventTypeEnumChangedOrganizationSettings EventTypeEnum = "CHANGED_ORGANIZATION_SETTINGS" - EventTypeEnumEnabledIntegration EventTypeEnum = "ENABLED_INTEGRATION" - EventTypeEnumDisabledIntegration EventTypeEnum = "DISABLED_INTEGRATION" - EventTypeEnumEnabledCategory EventTypeEnum = "ENABLED_CATEGORY" - EventTypeEnumDisabledCategory EventTypeEnum = "DISABLED_CATEGORY" - EventTypeEnumChangedPassword EventTypeEnum = "CHANGED_PASSWORD" - EventTypeEnumResetPassword EventTypeEnum = "RESET_PASSWORD" - EventTypeEnumEnabledRedactUnmappedDataForOrganization EventTypeEnum = "ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION" - EventTypeEnumEnabledRedactUnmappedDataForLinkedAccount EventTypeEnum = "ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT" - EventTypeEnumDisabledRedactUnmappedDataForOrganization EventTypeEnum = "DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION" - EventTypeEnumDisabledRedactUnmappedDataForLinkedAccount EventTypeEnum = "DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT" - EventTypeEnumCreatedIntegrationWideFieldMapping EventTypeEnum = "CREATED_INTEGRATION_WIDE_FIELD_MAPPING" - EventTypeEnumCreatedLinkedAccountFieldMapping EventTypeEnum = "CREATED_LINKED_ACCOUNT_FIELD_MAPPING" - EventTypeEnumChangedIntegrationWideFieldMapping EventTypeEnum = "CHANGED_INTEGRATION_WIDE_FIELD_MAPPING" - EventTypeEnumChangedLinkedAccountFieldMapping EventTypeEnum = "CHANGED_LINKED_ACCOUNT_FIELD_MAPPING" - EventTypeEnumDeletedIntegrationWideFieldMapping EventTypeEnum = "DELETED_INTEGRATION_WIDE_FIELD_MAPPING" - EventTypeEnumDeletedLinkedAccountFieldMapping EventTypeEnum = "DELETED_LINKED_ACCOUNT_FIELD_MAPPING" - EventTypeEnumCreatedLinkedAccountCommonModelOverride EventTypeEnum = "CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE" - EventTypeEnumChangedLinkedAccountCommonModelOverride EventTypeEnum = "CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE" - EventTypeEnumDeletedLinkedAccountCommonModelOverride EventTypeEnum = "DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE" - EventTypeEnumForcedLinkedAccountResync EventTypeEnum = "FORCED_LINKED_ACCOUNT_RESYNC" - EventTypeEnumMutedIssue EventTypeEnum = "MUTED_ISSUE" - EventTypeEnumGeneratedMagicLink EventTypeEnum = "GENERATED_MAGIC_LINK" - EventTypeEnumEnabledMergeWebhook EventTypeEnum = "ENABLED_MERGE_WEBHOOK" - EventTypeEnumDisabledMergeWebhook EventTypeEnum = "DISABLED_MERGE_WEBHOOK" - EventTypeEnumMergeWebhookTargetChanged EventTypeEnum = "MERGE_WEBHOOK_TARGET_CHANGED" - EventTypeEnumEndUserCredentialsAccessed EventTypeEnum = "END_USER_CREDENTIALS_ACCESSED" -) +// # The ModelOperation Object +// ### Description +// The `ModelOperation` object is used to represent the operations that are currently supported for a given model. +// +// ### Usage Example +// View what operations are supported for the `Candidate` endpoint. +type ModelOperation struct { + ModelName string `json:"model_name" url:"model_name"` + AvailableOperations []string `json:"available_operations" url:"available_operations"` + RequiredPostParameters []string `json:"required_post_parameters" url:"required_post_parameters"` + SupportedFields []string `json:"supported_fields" url:"supported_fields"` -func NewEventTypeEnumFromString(s string) (EventTypeEnum, error) { - switch s { - case "CREATED_REMOTE_PRODUCTION_API_KEY": - return EventTypeEnumCreatedRemoteProductionApiKey, nil - case "DELETED_REMOTE_PRODUCTION_API_KEY": - return EventTypeEnumDeletedRemoteProductionApiKey, nil - case "CREATED_TEST_API_KEY": - return EventTypeEnumCreatedTestApiKey, nil - case "DELETED_TEST_API_KEY": - return EventTypeEnumDeletedTestApiKey, nil - case "REGENERATED_PRODUCTION_API_KEY": - return EventTypeEnumRegeneratedProductionApiKey, nil - case "INVITED_USER": - return EventTypeEnumInvitedUser, nil - case "TWO_FACTOR_AUTH_ENABLED": - return EventTypeEnumTwoFactorAuthEnabled, nil - case "TWO_FACTOR_AUTH_DISABLED": - return EventTypeEnumTwoFactorAuthDisabled, nil - case "DELETED_LINKED_ACCOUNT": - return EventTypeEnumDeletedLinkedAccount, nil - case "CREATED_DESTINATION": - return EventTypeEnumCreatedDestination, nil - case "DELETED_DESTINATION": - return EventTypeEnumDeletedDestination, nil - case "CHANGED_DESTINATION": - return EventTypeEnumChangedDestination, nil - case "CHANGED_SCOPES": - return EventTypeEnumChangedScopes, nil - case "CHANGED_PERSONAL_INFORMATION": - return EventTypeEnumChangedPersonalInformation, nil - case "CHANGED_ORGANIZATION_SETTINGS": - return EventTypeEnumChangedOrganizationSettings, nil - case "ENABLED_INTEGRATION": - return EventTypeEnumEnabledIntegration, nil - case "DISABLED_INTEGRATION": - return EventTypeEnumDisabledIntegration, nil - case "ENABLED_CATEGORY": - return EventTypeEnumEnabledCategory, nil - case "DISABLED_CATEGORY": - return EventTypeEnumDisabledCategory, nil - case "CHANGED_PASSWORD": - return EventTypeEnumChangedPassword, nil - case "RESET_PASSWORD": - return EventTypeEnumResetPassword, nil - case "ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION": - return EventTypeEnumEnabledRedactUnmappedDataForOrganization, nil - case "ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT": - return EventTypeEnumEnabledRedactUnmappedDataForLinkedAccount, nil - case "DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION": - return EventTypeEnumDisabledRedactUnmappedDataForOrganization, nil - case "DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT": - return EventTypeEnumDisabledRedactUnmappedDataForLinkedAccount, nil - case "CREATED_INTEGRATION_WIDE_FIELD_MAPPING": - return EventTypeEnumCreatedIntegrationWideFieldMapping, nil - case "CREATED_LINKED_ACCOUNT_FIELD_MAPPING": - return EventTypeEnumCreatedLinkedAccountFieldMapping, nil - case "CHANGED_INTEGRATION_WIDE_FIELD_MAPPING": - return EventTypeEnumChangedIntegrationWideFieldMapping, nil - case "CHANGED_LINKED_ACCOUNT_FIELD_MAPPING": - return EventTypeEnumChangedLinkedAccountFieldMapping, nil - case "DELETED_INTEGRATION_WIDE_FIELD_MAPPING": - return EventTypeEnumDeletedIntegrationWideFieldMapping, nil - case "DELETED_LINKED_ACCOUNT_FIELD_MAPPING": - return EventTypeEnumDeletedLinkedAccountFieldMapping, nil - case "CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE": - return EventTypeEnumCreatedLinkedAccountCommonModelOverride, nil - case "CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE": - return EventTypeEnumChangedLinkedAccountCommonModelOverride, nil - case "DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE": - return EventTypeEnumDeletedLinkedAccountCommonModelOverride, nil - case "FORCED_LINKED_ACCOUNT_RESYNC": - return EventTypeEnumForcedLinkedAccountResync, nil - case "MUTED_ISSUE": - return EventTypeEnumMutedIssue, nil - case "GENERATED_MAGIC_LINK": - return EventTypeEnumGeneratedMagicLink, nil - case "ENABLED_MERGE_WEBHOOK": - return EventTypeEnumEnabledMergeWebhook, nil - case "DISABLED_MERGE_WEBHOOK": - return EventTypeEnumDisabledMergeWebhook, nil - case "MERGE_WEBHOOK_TARGET_CHANGED": - return EventTypeEnumMergeWebhookTargetChanged, nil - case "END_USER_CREDENTIALS_ACCESSED": - return EventTypeEnumEndUserCredentialsAccessed, nil - } - var t EventTypeEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (e EventTypeEnum) Ptr() *EventTypeEnum { - return &e +func (m *ModelOperation) GetModelName() string { + if m == nil { + return "" + } + return m.ModelName } -type ExternalTargetFieldApi struct { - Name *string `json:"name,omitempty"` - Description *string `json:"description,omitempty"` - IsMapped *string `json:"is_mapped,omitempty"` - - _rawJSON json.RawMessage +func (m *ModelOperation) GetAvailableOperations() []string { + if m == nil { + return nil + } + return m.AvailableOperations } -func (e *ExternalTargetFieldApi) UnmarshalJSON(data []byte) error { - type unmarshaler ExternalTargetFieldApi - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (m *ModelOperation) GetRequiredPostParameters() []string { + if m == nil { + return nil } - *e = ExternalTargetFieldApi(value) - e._rawJSON = json.RawMessage(data) - return nil + return m.RequiredPostParameters } -func (e *ExternalTargetFieldApi) String() string { - if len(e._rawJSON) > 0 { - if value, err := core.StringifyJSON(e._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(e); err == nil { - return value +func (m *ModelOperation) GetSupportedFields() []string { + if m == nil { + return nil } - return fmt.Sprintf("%#v", e) + return m.SupportedFields +} + +func (m *ModelOperation) GetExtraProperties() map[string]interface{} { + return m.extraProperties } -type ExternalTargetFieldApiResponse struct { - Benefit []*ExternalTargetFieldApi `json:"Benefit,omitempty"` - EmployerBenefit []*ExternalTargetFieldApi `json:"EmployerBenefit,omitempty"` - Company []*ExternalTargetFieldApi `json:"Company,omitempty"` - EmployeePayrollRun []*ExternalTargetFieldApi `json:"EmployeePayrollRun,omitempty"` - Employee []*ExternalTargetFieldApi `json:"Employee,omitempty"` - Employment []*ExternalTargetFieldApi `json:"Employment,omitempty"` - Location []*ExternalTargetFieldApi `json:"Location,omitempty"` - PayrollRun []*ExternalTargetFieldApi `json:"PayrollRun,omitempty"` - Team []*ExternalTargetFieldApi `json:"Team,omitempty"` - TimeOff []*ExternalTargetFieldApi `json:"TimeOff,omitempty"` - TimeOffBalance []*ExternalTargetFieldApi `json:"TimeOffBalance,omitempty"` - BankInfo []*ExternalTargetFieldApi `json:"BankInfo,omitempty"` - PayGroup []*ExternalTargetFieldApi `json:"PayGroup,omitempty"` - Group []*ExternalTargetFieldApi `json:"Group,omitempty"` - Dependent []*ExternalTargetFieldApi `json:"Dependent,omitempty"` - TimesheetEntry []*ExternalTargetFieldApi `json:"TimesheetEntry,omitempty"` - - _rawJSON json.RawMessage -} - -func (e *ExternalTargetFieldApiResponse) UnmarshalJSON(data []byte) error { - type unmarshaler ExternalTargetFieldApiResponse +func (m *ModelOperation) UnmarshalJSON(data []byte) error { + type unmarshaler ModelOperation var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *e = ExternalTargetFieldApiResponse(value) - e._rawJSON = json.RawMessage(data) + *m = ModelOperation(value) + extraProperties, err := internal.ExtractExtraProperties(data, *m) + if err != nil { + return err + } + m.extraProperties = extraProperties + m.rawJSON = json.RawMessage(data) return nil } -func (e *ExternalTargetFieldApiResponse) String() string { - if len(e._rawJSON) > 0 { - if value, err := core.StringifyJSON(e._rawJSON); err == nil { +func (m *ModelOperation) String() string { + if len(m.rawJSON) > 0 { + if value, err := internal.StringifyJSON(m.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(e); err == nil { + if value, err := internal.StringifyJSON(m); err == nil { return value } - return fmt.Sprintf("%#v", e) + return fmt.Sprintf("%#v", m) } -type FieldMappingApiInstance struct { - Id *string `json:"id,omitempty"` - IsIntegrationWide *bool `json:"is_integration_wide,omitempty"` - TargetField *FieldMappingApiInstanceTargetField `json:"target_field,omitempty"` - RemoteField *FieldMappingApiInstanceRemoteField `json:"remote_field,omitempty"` - - _rawJSON json.RawMessage -} +type ModelPermissionDeserializerRequest struct { + IsEnabled *bool `json:"is_enabled,omitempty" url:"is_enabled,omitempty"` -func (f *FieldMappingApiInstance) UnmarshalJSON(data []byte) error { - type unmarshaler FieldMappingApiInstance - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *f = FieldMappingApiInstance(value) - f._rawJSON = json.RawMessage(data) - return nil + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (f *FieldMappingApiInstance) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(f); err == nil { - return value +func (m *ModelPermissionDeserializerRequest) GetIsEnabled() *bool { + if m == nil { + return nil } - return fmt.Sprintf("%#v", f) + return m.IsEnabled } -type FieldMappingApiInstanceRemoteField struct { - RemoteKeyName *string `json:"remote_key_name,omitempty"` - Schema map[string]interface{} `json:"schema,omitempty"` - RemoteEndpointInfo *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo `json:"remote_endpoint_info,omitempty"` - - _rawJSON json.RawMessage +func (m *ModelPermissionDeserializerRequest) GetExtraProperties() map[string]interface{} { + return m.extraProperties } -func (f *FieldMappingApiInstanceRemoteField) UnmarshalJSON(data []byte) error { - type unmarshaler FieldMappingApiInstanceRemoteField +func (m *ModelPermissionDeserializerRequest) UnmarshalJSON(data []byte) error { + type unmarshaler ModelPermissionDeserializerRequest var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *f = FieldMappingApiInstanceRemoteField(value) - f._rawJSON = json.RawMessage(data) + *m = ModelPermissionDeserializerRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *m) + if err != nil { + return err + } + m.extraProperties = extraProperties + m.rawJSON = json.RawMessage(data) return nil } -func (f *FieldMappingApiInstanceRemoteField) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { +func (m *ModelPermissionDeserializerRequest) String() string { + if len(m.rawJSON) > 0 { + if value, err := internal.StringifyJSON(m.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(f); err == nil { + if value, err := internal.StringifyJSON(m); err == nil { return value } - return fmt.Sprintf("%#v", f) -} - -type FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo struct { - Method *string `json:"method,omitempty"` - UrlPath *string `json:"url_path,omitempty"` - FieldTraversalPath []string `json:"field_traversal_path,omitempty"` - - _rawJSON json.RawMessage -} - -func (f *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo) UnmarshalJSON(data []byte) error { - type unmarshaler FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *f = FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo(value) - f._rawJSON = json.RawMessage(data) - return nil -} - -func (f *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(f); err == nil { - return value - } - return fmt.Sprintf("%#v", f) -} - -type FieldMappingApiInstanceResponse struct { - Benefit []*FieldMappingApiInstance `json:"Benefit,omitempty"` - EmployerBenefit []*FieldMappingApiInstance `json:"EmployerBenefit,omitempty"` - Company []*FieldMappingApiInstance `json:"Company,omitempty"` - EmployeePayrollRun []*FieldMappingApiInstance `json:"EmployeePayrollRun,omitempty"` - Employee []*FieldMappingApiInstance `json:"Employee,omitempty"` - Employment []*FieldMappingApiInstance `json:"Employment,omitempty"` - Location []*FieldMappingApiInstance `json:"Location,omitempty"` - PayrollRun []*FieldMappingApiInstance `json:"PayrollRun,omitempty"` - Team []*FieldMappingApiInstance `json:"Team,omitempty"` - TimeOff []*FieldMappingApiInstance `json:"TimeOff,omitempty"` - TimeOffBalance []*FieldMappingApiInstance `json:"TimeOffBalance,omitempty"` - BankInfo []*FieldMappingApiInstance `json:"BankInfo,omitempty"` - PayGroup []*FieldMappingApiInstance `json:"PayGroup,omitempty"` - Group []*FieldMappingApiInstance `json:"Group,omitempty"` - Dependent []*FieldMappingApiInstance `json:"Dependent,omitempty"` - TimesheetEntry []*FieldMappingApiInstance `json:"TimesheetEntry,omitempty"` - - _rawJSON json.RawMessage -} - -func (f *FieldMappingApiInstanceResponse) UnmarshalJSON(data []byte) error { - type unmarshaler FieldMappingApiInstanceResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *f = FieldMappingApiInstanceResponse(value) - f._rawJSON = json.RawMessage(data) - return nil -} - -func (f *FieldMappingApiInstanceResponse) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(f); err == nil { - return value - } - return fmt.Sprintf("%#v", f) + return fmt.Sprintf("%#v", m) } -type FieldMappingApiInstanceTargetField struct { - Name string `json:"name"` - Description string `json:"description"` - IsOrganizationWide bool `json:"is_organization_wide"` - - _rawJSON json.RawMessage -} +// # The MultipartFormField Object +// ### Description +// The `MultipartFormField` object is used to represent fields in an HTTP request using `multipart/form-data`. +// +// ### Usage Example +// Create a `MultipartFormField` to define a multipart form entry. +type MultipartFormFieldRequest struct { + // The name of the form field + Name string `json:"name" url:"name"` + // The data for the form field. + Data string `json:"data" url:"data"` + // The encoding of the value of `data`. Defaults to `RAW` if not defined. + // + // * `RAW` - RAW + // * `BASE64` - BASE64 + // * `GZIP_BASE64` - GZIP_BASE64 + Encoding *EncodingEnum `json:"encoding,omitempty" url:"encoding,omitempty"` + // The file name of the form field, if the field is for a file. + FileName *string `json:"file_name,omitempty" url:"file_name,omitempty"` + // The MIME type of the file, if the field is for a file. + ContentType *string `json:"content_type,omitempty" url:"content_type,omitempty"` -func (f *FieldMappingApiInstanceTargetField) UnmarshalJSON(data []byte) error { - type unmarshaler FieldMappingApiInstanceTargetField - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *f = FieldMappingApiInstanceTargetField(value) - f._rawJSON = json.RawMessage(data) - return nil + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (f *FieldMappingApiInstanceTargetField) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(f); err == nil { - return value +func (m *MultipartFormFieldRequest) GetName() string { + if m == nil { + return "" } - return fmt.Sprintf("%#v", f) + return m.Name } -type FieldMappingInstanceResponse struct { - Model *FieldMappingApiInstance `json:"model,omitempty"` - Warnings []*WarningValidationProblem `json:"warnings,omitempty"` - Errors []*ErrorValidationProblem `json:"errors,omitempty"` - Logs []*DebugModeLog `json:"logs,omitempty"` - - _rawJSON json.RawMessage -} - -func (f *FieldMappingInstanceResponse) UnmarshalJSON(data []byte) error { - type unmarshaler FieldMappingInstanceResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (m *MultipartFormFieldRequest) GetData() string { + if m == nil { + return "" } - *f = FieldMappingInstanceResponse(value) - f._rawJSON = json.RawMessage(data) - return nil + return m.Data } -func (f *FieldMappingInstanceResponse) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(f); err == nil { - return value +func (m *MultipartFormFieldRequest) GetEncoding() *EncodingEnum { + if m == nil { + return nil } - return fmt.Sprintf("%#v", f) -} - -type FieldPermissionDeserializer struct { - EnabledFields []interface{} `json:"enabled_fields,omitempty"` - DisabledFields []interface{} `json:"disabled_fields,omitempty"` - - _rawJSON json.RawMessage + return m.Encoding } -func (f *FieldPermissionDeserializer) UnmarshalJSON(data []byte) error { - type unmarshaler FieldPermissionDeserializer - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (m *MultipartFormFieldRequest) GetFileName() *string { + if m == nil { + return nil } - *f = FieldPermissionDeserializer(value) - f._rawJSON = json.RawMessage(data) - return nil + return m.FileName } -func (f *FieldPermissionDeserializer) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(f); err == nil { - return value +func (m *MultipartFormFieldRequest) GetContentType() *string { + if m == nil { + return nil } - return fmt.Sprintf("%#v", f) + return m.ContentType } -type FieldPermissionDeserializerRequest struct { - EnabledFields []interface{} `json:"enabled_fields,omitempty"` - DisabledFields []interface{} `json:"disabled_fields,omitempty"` - - _rawJSON json.RawMessage +func (m *MultipartFormFieldRequest) GetExtraProperties() map[string]interface{} { + return m.extraProperties } -func (f *FieldPermissionDeserializerRequest) UnmarshalJSON(data []byte) error { - type unmarshaler FieldPermissionDeserializerRequest +func (m *MultipartFormFieldRequest) UnmarshalJSON(data []byte) error { + type unmarshaler MultipartFormFieldRequest var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *f = FieldPermissionDeserializerRequest(value) - f._rawJSON = json.RawMessage(data) - return nil -} - -func (f *FieldPermissionDeserializerRequest) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(f); err == nil { - return value - } - return fmt.Sprintf("%#v", f) -} - -// - `EXEMPT` - EXEMPT -// - `SALARIED_NONEXEMPT` - SALARIED_NONEXEMPT -// - `NONEXEMPT` - NONEXEMPT -// - `OWNER` - OWNER -type FlsaStatusEnum string - -const ( - FlsaStatusEnumExempt FlsaStatusEnum = "EXEMPT" - FlsaStatusEnumSalariedNonexempt FlsaStatusEnum = "SALARIED_NONEXEMPT" - FlsaStatusEnumNonexempt FlsaStatusEnum = "NONEXEMPT" - FlsaStatusEnumOwner FlsaStatusEnum = "OWNER" -) - -func NewFlsaStatusEnumFromString(s string) (FlsaStatusEnum, error) { - switch s { - case "EXEMPT": - return FlsaStatusEnumExempt, nil - case "SALARIED_NONEXEMPT": - return FlsaStatusEnumSalariedNonexempt, nil - case "NONEXEMPT": - return FlsaStatusEnumNonexempt, nil - case "OWNER": - return FlsaStatusEnumOwner, nil - } - var t FlsaStatusEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (f FlsaStatusEnum) Ptr() *FlsaStatusEnum { - return &f -} - -// - `MALE` - MALE -// - `FEMALE` - FEMALE -// - `NON-BINARY` - NON-BINARY -// - `OTHER` - OTHER -// - `PREFER_NOT_TO_DISCLOSE` - PREFER_NOT_TO_DISCLOSE -type GenderEnum string - -const ( - GenderEnumMale GenderEnum = "MALE" - GenderEnumFemale GenderEnum = "FEMALE" - GenderEnumNonBinary GenderEnum = "NON-BINARY" - GenderEnumOther GenderEnum = "OTHER" - GenderEnumPreferNotToDisclose GenderEnum = "PREFER_NOT_TO_DISCLOSE" -) - -func NewGenderEnumFromString(s string) (GenderEnum, error) { - switch s { - case "MALE": - return GenderEnumMale, nil - case "FEMALE": - return GenderEnumFemale, nil - case "NON-BINARY": - return GenderEnumNonBinary, nil - case "OTHER": - return GenderEnumOther, nil - case "PREFER_NOT_TO_DISCLOSE": - return GenderEnumPreferNotToDisclose, nil - } - var t GenderEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (g GenderEnum) Ptr() *GenderEnum { - return &g -} - -// # The Group Object -// -// ### Description -// -// The `Group` object is used to represent any subset of employees across, for example, `DEPARTMENT` or `TEAM`. Employees can be in multiple Groups. -// -// ### Usage Example -// -// Fetch from the `LIST Employee` endpoint and expand groups to view an employee's groups. -type Group struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The parent group for this group. - ParentGroup *string `json:"parent_group,omitempty"` - // The group name. - Name *string `json:"name,omitempty"` - // The Group type returned directly from the third-party. - // - // - `TEAM` - TEAM - // - `DEPARTMENT` - DEPARTMENT - // - `COST_CENTER` - COST_CENTER - // - `BUSINESS_UNIT` - BUSINESS_UNIT - // - `GROUP` - GROUP - Type *GroupType `json:"type,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - // Indicates whether the Group refers to a team in the third party platform. Note that this is an opinionated view based on how Merge observes most organizations representing teams in each third party platform. If your customer uses a platform different from most, there is a chance this will not be correct. - IsCommonlyUsedAsTeam *bool `json:"is_commonly_used_as_team,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` - - _rawJSON json.RawMessage -} - -func (g *Group) UnmarshalJSON(data []byte) error { - type unmarshaler Group - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { + *m = MultipartFormFieldRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *m) + if err != nil { return err } - *g = Group(value) - g._rawJSON = json.RawMessage(data) + m.extraProperties = extraProperties + m.rawJSON = json.RawMessage(data) return nil } -func (g *Group) String() string { - if len(g._rawJSON) > 0 { - if value, err := core.StringifyJSON(g._rawJSON); err == nil { +func (m *MultipartFormFieldRequest) String() string { + if len(m.rawJSON) > 0 { + if value, err := internal.StringifyJSON(m.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(g); err == nil { + if value, err := internal.StringifyJSON(m); err == nil { return value } - return fmt.Sprintf("%#v", g) -} - -// The Group type returned directly from the third-party. -// -// - `TEAM` - TEAM -// - `DEPARTMENT` - DEPARTMENT -// - `COST_CENTER` - COST_CENTER -// - `BUSINESS_UNIT` - BUSINESS_UNIT -// - `GROUP` - GROUP -type GroupType struct { - typeName string - GroupTypeEnum GroupTypeEnum - String string -} - -func NewGroupTypeFromGroupTypeEnum(value GroupTypeEnum) *GroupType { - return &GroupType{typeName: "groupTypeEnum", GroupTypeEnum: value} -} - -func NewGroupTypeFromString(value string) *GroupType { - return &GroupType{typeName: "string", String: value} -} - -func (g *GroupType) UnmarshalJSON(data []byte) error { - var valueGroupTypeEnum GroupTypeEnum - if err := json.Unmarshal(data, &valueGroupTypeEnum); err == nil { - g.typeName = "groupTypeEnum" - g.GroupTypeEnum = valueGroupTypeEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - g.typeName = "string" - g.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, g) -} - -func (g GroupType) MarshalJSON() ([]byte, error) { - switch g.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", g.typeName, g) - case "groupTypeEnum": - return json.Marshal(g.GroupTypeEnum) - case "string": - return json.Marshal(g.String) - } -} - -type GroupTypeVisitor interface { - VisitGroupTypeEnum(GroupTypeEnum) error - VisitString(string) error -} - -func (g *GroupType) Accept(visitor GroupTypeVisitor) error { - switch g.typeName { - default: - return fmt.Errorf("invalid type %s in %T", g.typeName, g) - case "groupTypeEnum": - return visitor.VisitGroupTypeEnum(g.GroupTypeEnum) - case "string": - return visitor.VisitString(g.String) - } + return fmt.Sprintf("%#v", m) } -// - `TEAM` - TEAM -// - `DEPARTMENT` - DEPARTMENT -// - `COST_CENTER` - COST_CENTER -// - `BUSINESS_UNIT` - BUSINESS_UNIT -// - `GROUP` - GROUP -type GroupTypeEnum string +// * `XUA` - ADB Unit of Account +// * `AFN` - Afghan Afghani +// * `AFA` - Afghan Afghani (1927–2002) +// * `ALL` - Albanian Lek +// * `ALK` - Albanian Lek (1946–1965) +// * `DZD` - Algerian Dinar +// * `ADP` - Andorran Peseta +// * `AOA` - Angolan Kwanza +// * `AOK` - Angolan Kwanza (1977–1991) +// * `AON` - Angolan New Kwanza (1990–2000) +// * `AOR` - Angolan Readjusted Kwanza (1995–1999) +// * `ARA` - Argentine Austral +// * `ARS` - Argentine Peso +// * `ARM` - Argentine Peso (1881–1970) +// * `ARP` - Argentine Peso (1983–1985) +// * `ARL` - Argentine Peso Ley (1970–1983) +// * `AMD` - Armenian Dram +// * `AWG` - Aruban Florin +// * `AUD` - Australian Dollar +// * `ATS` - Austrian Schilling +// * `AZN` - Azerbaijani Manat +// * `AZM` - Azerbaijani Manat (1993–2006) +// * `BSD` - Bahamian Dollar +// * `BHD` - Bahraini Dinar +// * `BDT` - Bangladeshi Taka +// * `BBD` - Barbadian Dollar +// * `BYN` - Belarusian Ruble +// * `BYB` - Belarusian Ruble (1994–1999) +// * `BYR` - Belarusian Ruble (2000–2016) +// * `BEF` - Belgian Franc +// * `BEC` - Belgian Franc (convertible) +// * `BEL` - Belgian Franc (financial) +// * `BZD` - Belize Dollar +// * `BMD` - Bermudan Dollar +// * `BTN` - Bhutanese Ngultrum +// * `BOB` - Bolivian Boliviano +// * `BOL` - Bolivian Boliviano (1863–1963) +// * `BOV` - Bolivian Mvdol +// * `BOP` - Bolivian Peso +// * `BAM` - Bosnia-Herzegovina Convertible Mark +// * `BAD` - Bosnia-Herzegovina Dinar (1992–1994) +// * `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) +// * `BWP` - Botswanan Pula +// * `BRC` - Brazilian Cruzado (1986–1989) +// * `BRZ` - Brazilian Cruzeiro (1942–1967) +// * `BRE` - Brazilian Cruzeiro (1990–1993) +// * `BRR` - Brazilian Cruzeiro (1993–1994) +// * `BRN` - Brazilian New Cruzado (1989–1990) +// * `BRB` - Brazilian New Cruzeiro (1967–1986) +// * `BRL` - Brazilian Real +// * `GBP` - British Pound +// * `BND` - Brunei Dollar +// * `BGL` - Bulgarian Hard Lev +// * `BGN` - Bulgarian Lev +// * `BGO` - Bulgarian Lev (1879–1952) +// * `BGM` - Bulgarian Socialist Lev +// * `BUK` - Burmese Kyat +// * `BIF` - Burundian Franc +// * `XPF` - CFP Franc +// * `KHR` - Cambodian Riel +// * `CAD` - Canadian Dollar +// * `CVE` - Cape Verdean Escudo +// * `KYD` - Cayman Islands Dollar +// * `XAF` - Central African CFA Franc +// * `CLE` - Chilean Escudo +// * `CLP` - Chilean Peso +// * `CLF` - Chilean Unit of Account (UF) +// * `CNX` - Chinese People’s Bank Dollar +// * `CNY` - Chinese Yuan +// * `CNH` - Chinese Yuan (offshore) +// * `COP` - Colombian Peso +// * `COU` - Colombian Real Value Unit +// * `KMF` - Comorian Franc +// * `CDF` - Congolese Franc +// * `CRC` - Costa Rican Colón +// * `HRD` - Croatian Dinar +// * `HRK` - Croatian Kuna +// * `CUC` - Cuban Convertible Peso +// * `CUP` - Cuban Peso +// * `CYP` - Cypriot Pound +// * `CZK` - Czech Koruna +// * `CSK` - Czechoslovak Hard Koruna +// * `DKK` - Danish Krone +// * `DJF` - Djiboutian Franc +// * `DOP` - Dominican Peso +// * `NLG` - Dutch Guilder +// * `XCD` - East Caribbean Dollar +// * `DDM` - East German Mark +// * `ECS` - Ecuadorian Sucre +// * `ECV` - Ecuadorian Unit of Constant Value +// * `EGP` - Egyptian Pound +// * `GQE` - Equatorial Guinean Ekwele +// * `ERN` - Eritrean Nakfa +// * `EEK` - Estonian Kroon +// * `ETB` - Ethiopian Birr +// * `EUR` - Euro +// * `XBA` - European Composite Unit +// * `XEU` - European Currency Unit +// * `XBB` - European Monetary Unit +// * `XBC` - European Unit of Account (XBC) +// * `XBD` - European Unit of Account (XBD) +// * `FKP` - Falkland Islands Pound +// * `FJD` - Fijian Dollar +// * `FIM` - Finnish Markka +// * `FRF` - French Franc +// * `XFO` - French Gold Franc +// * `XFU` - French UIC-Franc +// * `GMD` - Gambian Dalasi +// * `GEK` - Georgian Kupon Larit +// * `GEL` - Georgian Lari +// * `DEM` - German Mark +// * `GHS` - Ghanaian Cedi +// * `GHC` - Ghanaian Cedi (1979–2007) +// * `GIP` - Gibraltar Pound +// * `XAU` - Gold +// * `GRD` - Greek Drachma +// * `GTQ` - Guatemalan Quetzal +// * `GWP` - Guinea-Bissau Peso +// * `GNF` - Guinean Franc +// * `GNS` - Guinean Syli +// * `GYD` - Guyanaese Dollar +// * `HTG` - Haitian Gourde +// * `HNL` - Honduran Lempira +// * `HKD` - Hong Kong Dollar +// * `HUF` - Hungarian Forint +// * `IMP` - IMP +// * `ISK` - Icelandic Króna +// * `ISJ` - Icelandic Króna (1918–1981) +// * `INR` - Indian Rupee +// * `IDR` - Indonesian Rupiah +// * `IRR` - Iranian Rial +// * `IQD` - Iraqi Dinar +// * `IEP` - Irish Pound +// * `ILS` - Israeli New Shekel +// * `ILP` - Israeli Pound +// * `ILR` - Israeli Shekel (1980–1985) +// * `ITL` - Italian Lira +// * `JMD` - Jamaican Dollar +// * `JPY` - Japanese Yen +// * `JOD` - Jordanian Dinar +// * `KZT` - Kazakhstani Tenge +// * `KES` - Kenyan Shilling +// * `KWD` - Kuwaiti Dinar +// * `KGS` - Kyrgystani Som +// * `LAK` - Laotian Kip +// * `LVL` - Latvian Lats +// * `LVR` - Latvian Ruble +// * `LBP` - Lebanese Pound +// * `LSL` - Lesotho Loti +// * `LRD` - Liberian Dollar +// * `LYD` - Libyan Dinar +// * `LTL` - Lithuanian Litas +// * `LTT` - Lithuanian Talonas +// * `LUL` - Luxembourg Financial Franc +// * `LUC` - Luxembourgian Convertible Franc +// * `LUF` - Luxembourgian Franc +// * `MOP` - Macanese Pataca +// * `MKD` - Macedonian Denar +// * `MKN` - Macedonian Denar (1992–1993) +// * `MGA` - Malagasy Ariary +// * `MGF` - Malagasy Franc +// * `MWK` - Malawian Kwacha +// * `MYR` - Malaysian Ringgit +// * `MVR` - Maldivian Rufiyaa +// * `MVP` - Maldivian Rupee (1947–1981) +// * `MLF` - Malian Franc +// * `MTL` - Maltese Lira +// * `MTP` - Maltese Pound +// * `MRU` - Mauritanian Ouguiya +// * `MRO` - Mauritanian Ouguiya (1973–2017) +// * `MUR` - Mauritian Rupee +// * `MXV` - Mexican Investment Unit +// * `MXN` - Mexican Peso +// * `MXP` - Mexican Silver Peso (1861–1992) +// * `MDC` - Moldovan Cupon +// * `MDL` - Moldovan Leu +// * `MCF` - Monegasque Franc +// * `MNT` - Mongolian Tugrik +// * `MAD` - Moroccan Dirham +// * `MAF` - Moroccan Franc +// * `MZE` - Mozambican Escudo +// * `MZN` - Mozambican Metical +// * `MZM` - Mozambican Metical (1980–2006) +// * `MMK` - Myanmar Kyat +// * `NAD` - Namibian Dollar +// * `NPR` - Nepalese Rupee +// * `ANG` - Netherlands Antillean Guilder +// * `TWD` - New Taiwan Dollar +// * `NZD` - New Zealand Dollar +// * `NIO` - Nicaraguan Córdoba +// * `NIC` - Nicaraguan Córdoba (1988–1991) +// * `NGN` - Nigerian Naira +// * `KPW` - North Korean Won +// * `NOK` - Norwegian Krone +// * `OMR` - Omani Rial +// * `PKR` - Pakistani Rupee +// * `XPD` - Palladium +// * `PAB` - Panamanian Balboa +// * `PGK` - Papua New Guinean Kina +// * `PYG` - Paraguayan Guarani +// * `PEI` - Peruvian Inti +// * `PEN` - Peruvian Sol +// * `PES` - Peruvian Sol (1863–1965) +// * `PHP` - Philippine Peso +// * `XPT` - Platinum +// * `PLN` - Polish Zloty +// * `PLZ` - Polish Zloty (1950–1995) +// * `PTE` - Portuguese Escudo +// * `GWE` - Portuguese Guinea Escudo +// * `QAR` - Qatari Rial +// * `XRE` - RINET Funds +// * `RHD` - Rhodesian Dollar +// * `RON` - Romanian Leu +// * `ROL` - Romanian Leu (1952–2006) +// * `RUB` - Russian Ruble +// * `RUR` - Russian Ruble (1991–1998) +// * `RWF` - Rwandan Franc +// * `SVC` - Salvadoran Colón +// * `WST` - Samoan Tala +// * `SAR` - Saudi Riyal +// * `RSD` - Serbian Dinar +// * `CSD` - Serbian Dinar (2002–2006) +// * `SCR` - Seychellois Rupee +// * `SLL` - Sierra Leonean Leone +// * `XAG` - Silver +// * `SGD` - Singapore Dollar +// * `SKK` - Slovak Koruna +// * `SIT` - Slovenian Tolar +// * `SBD` - Solomon Islands Dollar +// * `SOS` - Somali Shilling +// * `ZAR` - South African Rand +// * `ZAL` - South African Rand (financial) +// * `KRH` - South Korean Hwan (1953–1962) +// * `KRW` - South Korean Won +// * `KRO` - South Korean Won (1945–1953) +// * `SSP` - South Sudanese Pound +// * `SUR` - Soviet Rouble +// * `ESP` - Spanish Peseta +// * `ESA` - Spanish Peseta (A account) +// * `ESB` - Spanish Peseta (convertible account) +// * `XDR` - Special Drawing Rights +// * `LKR` - Sri Lankan Rupee +// * `SHP` - St. Helena Pound +// * `XSU` - Sucre +// * `SDD` - Sudanese Dinar (1992–2007) +// * `SDG` - Sudanese Pound +// * `SDP` - Sudanese Pound (1957–1998) +// * `SRD` - Surinamese Dollar +// * `SRG` - Surinamese Guilder +// * `SZL` - Swazi Lilangeni +// * `SEK` - Swedish Krona +// * `CHF` - Swiss Franc +// * `SYP` - Syrian Pound +// * `STN` - São Tomé & Príncipe Dobra +// * `STD` - São Tomé & Príncipe Dobra (1977–2017) +// * `TVD` - TVD +// * `TJR` - Tajikistani Ruble +// * `TJS` - Tajikistani Somoni +// * `TZS` - Tanzanian Shilling +// * `XTS` - Testing Currency Code +// * `THB` - Thai Baht +// * `XXX` - The codes assigned for transactions where no currency is involved +// * `TPE` - Timorese Escudo +// * `TOP` - Tongan Paʻanga +// * `TTD` - Trinidad & Tobago Dollar +// * `TND` - Tunisian Dinar +// * `TRY` - Turkish Lira +// * `TRL` - Turkish Lira (1922–2005) +// * `TMT` - Turkmenistani Manat +// * `TMM` - Turkmenistani Manat (1993–2009) +// * `USD` - US Dollar +// * `USN` - US Dollar (Next day) +// * `USS` - US Dollar (Same day) +// * `UGX` - Ugandan Shilling +// * `UGS` - Ugandan Shilling (1966–1987) +// * `UAH` - Ukrainian Hryvnia +// * `UAK` - Ukrainian Karbovanets +// * `AED` - United Arab Emirates Dirham +// * `UYW` - Uruguayan Nominal Wage Index Unit +// * `UYU` - Uruguayan Peso +// * `UYP` - Uruguayan Peso (1975–1993) +// * `UYI` - Uruguayan Peso (Indexed Units) +// * `UZS` - Uzbekistani Som +// * `VUV` - Vanuatu Vatu +// * `VES` - Venezuelan Bolívar +// * `VEB` - Venezuelan Bolívar (1871–2008) +// * `VEF` - Venezuelan Bolívar (2008–2018) +// * `VND` - Vietnamese Dong +// * `VNN` - Vietnamese Dong (1978–1985) +// * `CHE` - WIR Euro +// * `CHW` - WIR Franc +// * `XOF` - West African CFA Franc +// * `YDD` - Yemeni Dinar +// * `YER` - Yemeni Rial +// * `YUN` - Yugoslavian Convertible Dinar (1990–1992) +// * `YUD` - Yugoslavian Hard Dinar (1966–1990) +// * `YUM` - Yugoslavian New Dinar (1994–2002) +// * `YUR` - Yugoslavian Reformed Dinar (1992–1993) +// * `ZWN` - ZWN +// * `ZRN` - Zairean New Zaire (1993–1998) +// * `ZRZ` - Zairean Zaire (1971–1993) +// * `ZMW` - Zambian Kwacha +// * `ZMK` - Zambian Kwacha (1968–2012) +// * `ZWD` - Zimbabwean Dollar (1980–2008) +// * `ZWR` - Zimbabwean Dollar (2008) +// * `ZWL` - Zimbabwean Dollar (2009) +type PayCurrencyEnum string const ( - GroupTypeEnumTeam GroupTypeEnum = "TEAM" - GroupTypeEnumDepartment GroupTypeEnum = "DEPARTMENT" - GroupTypeEnumCostCenter GroupTypeEnum = "COST_CENTER" - GroupTypeEnumBusinessUnit GroupTypeEnum = "BUSINESS_UNIT" - GroupTypeEnumGroup GroupTypeEnum = "GROUP" -) - -func NewGroupTypeEnumFromString(s string) (GroupTypeEnum, error) { - switch s { - case "TEAM": - return GroupTypeEnumTeam, nil - case "DEPARTMENT": - return GroupTypeEnumDepartment, nil - case "COST_CENTER": - return GroupTypeEnumCostCenter, nil - case "BUSINESS_UNIT": - return GroupTypeEnumBusinessUnit, nil - case "GROUP": - return GroupTypeEnumGroup, nil - } - var t GroupTypeEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (g GroupTypeEnum) Ptr() *GroupTypeEnum { - return &g -} - -type IndividualCommonModelScopeDeserializer struct { - ModelName string `json:"model_name"` - ModelPermissions map[string]*ModelPermissionDeserializer `json:"model_permissions,omitempty"` - FieldPermissions *FieldPermissionDeserializer `json:"field_permissions,omitempty"` - - _rawJSON json.RawMessage -} - -func (i *IndividualCommonModelScopeDeserializer) UnmarshalJSON(data []byte) error { - type unmarshaler IndividualCommonModelScopeDeserializer - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *i = IndividualCommonModelScopeDeserializer(value) - i._rawJSON = json.RawMessage(data) - return nil -} - -func (i *IndividualCommonModelScopeDeserializer) String() string { - if len(i._rawJSON) > 0 { - if value, err := core.StringifyJSON(i._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(i); err == nil { - return value - } - return fmt.Sprintf("%#v", i) -} - -type IndividualCommonModelScopeDeserializerRequest struct { - ModelName string `json:"model_name"` - ModelPermissions map[string]*ModelPermissionDeserializerRequest `json:"model_permissions,omitempty"` - FieldPermissions *FieldPermissionDeserializerRequest `json:"field_permissions,omitempty"` - - _rawJSON json.RawMessage -} - -func (i *IndividualCommonModelScopeDeserializerRequest) UnmarshalJSON(data []byte) error { - type unmarshaler IndividualCommonModelScopeDeserializerRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *i = IndividualCommonModelScopeDeserializerRequest(value) - i._rawJSON = json.RawMessage(data) - return nil -} - -func (i *IndividualCommonModelScopeDeserializerRequest) String() string { - if len(i._rawJSON) > 0 { - if value, err := core.StringifyJSON(i._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(i); err == nil { - return value - } - return fmt.Sprintf("%#v", i) -} - -type Issue struct { - Id *string `json:"id,omitempty"` - // Status of the issue. Options: ('ONGOING', 'RESOLVED') - // - // - `ONGOING` - ONGOING - // - `RESOLVED` - RESOLVED - Status *IssueStatus `json:"status,omitempty"` - ErrorDescription string `json:"error_description"` - EndUser map[string]interface{} `json:"end_user,omitempty"` - FirstIncidentTime *time.Time `json:"first_incident_time,omitempty"` - LastIncidentTime *time.Time `json:"last_incident_time,omitempty"` - IsMuted *bool `json:"is_muted,omitempty"` - ErrorDetails []string `json:"error_details,omitempty"` - - _rawJSON json.RawMessage -} - -func (i *Issue) UnmarshalJSON(data []byte) error { - type unmarshaler Issue - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *i = Issue(value) - i._rawJSON = json.RawMessage(data) - return nil -} - -func (i *Issue) String() string { - if len(i._rawJSON) > 0 { - if value, err := core.StringifyJSON(i._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(i); err == nil { - return value - } - return fmt.Sprintf("%#v", i) -} - -// Status of the issue. Options: ('ONGOING', 'RESOLVED') -// -// - `ONGOING` - ONGOING -// - `RESOLVED` - RESOLVED -type IssueStatus struct { - typeName string - IssueStatusEnum IssueStatusEnum - String string -} - -func NewIssueStatusFromIssueStatusEnum(value IssueStatusEnum) *IssueStatus { - return &IssueStatus{typeName: "issueStatusEnum", IssueStatusEnum: value} -} - -func NewIssueStatusFromString(value string) *IssueStatus { - return &IssueStatus{typeName: "string", String: value} -} - -func (i *IssueStatus) UnmarshalJSON(data []byte) error { - var valueIssueStatusEnum IssueStatusEnum - if err := json.Unmarshal(data, &valueIssueStatusEnum); err == nil { - i.typeName = "issueStatusEnum" - i.IssueStatusEnum = valueIssueStatusEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - i.typeName = "string" - i.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, i) -} - -func (i IssueStatus) MarshalJSON() ([]byte, error) { - switch i.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "issueStatusEnum": - return json.Marshal(i.IssueStatusEnum) - case "string": - return json.Marshal(i.String) - } -} - -type IssueStatusVisitor interface { - VisitIssueStatusEnum(IssueStatusEnum) error - VisitString(string) error -} - -func (i *IssueStatus) Accept(visitor IssueStatusVisitor) error { - switch i.typeName { - default: - return fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "issueStatusEnum": - return visitor.VisitIssueStatusEnum(i.IssueStatusEnum) - case "string": - return visitor.VisitString(i.String) - } -} - -// - `ONGOING` - ONGOING -// - `RESOLVED` - RESOLVED -type IssueStatusEnum string - -const ( - IssueStatusEnumOngoing IssueStatusEnum = "ONGOING" - IssueStatusEnumResolved IssueStatusEnum = "RESOLVED" -) - -func NewIssueStatusEnumFromString(s string) (IssueStatusEnum, error) { - switch s { - case "ONGOING": - return IssueStatusEnumOngoing, nil - case "RESOLVED": - return IssueStatusEnumResolved, nil - } - var t IssueStatusEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (i IssueStatusEnum) Ptr() *IssueStatusEnum { - return &i -} - -// - `en` - en -// - `de` - de -type LanguageEnum string - -const ( - LanguageEnumEn LanguageEnum = "en" - LanguageEnumDe LanguageEnum = "de" -) - -func NewLanguageEnumFromString(s string) (LanguageEnum, error) { - switch s { - case "en": - return LanguageEnumEn, nil - case "de": - return LanguageEnumDe, nil - } - var t LanguageEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (l LanguageEnum) Ptr() *LanguageEnum { - return &l -} - -type LinkToken struct { - LinkToken string `json:"link_token"` - IntegrationName *string `json:"integration_name,omitempty"` - MagicLinkUrl *string `json:"magic_link_url,omitempty"` - - _rawJSON json.RawMessage -} - -func (l *LinkToken) UnmarshalJSON(data []byte) error { - type unmarshaler LinkToken - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *l = LinkToken(value) - l._rawJSON = json.RawMessage(data) - return nil -} - -func (l *LinkToken) String() string { - if len(l._rawJSON) > 0 { - if value, err := core.StringifyJSON(l._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(l); err == nil { - return value - } - return fmt.Sprintf("%#v", l) -} - -type LinkedAccountStatus struct { - LinkedAccountStatus string `json:"linked_account_status"` - CanMakeRequest bool `json:"can_make_request"` - - _rawJSON json.RawMessage -} - -func (l *LinkedAccountStatus) UnmarshalJSON(data []byte) error { - type unmarshaler LinkedAccountStatus - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *l = LinkedAccountStatus(value) - l._rawJSON = json.RawMessage(data) - return nil -} - -func (l *LinkedAccountStatus) String() string { - if len(l._rawJSON) > 0 { - if value, err := core.StringifyJSON(l._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(l); err == nil { - return value - } - return fmt.Sprintf("%#v", l) -} - -// # The Location Object -// -// ### Description -// -// The `Location` object is used to represent an address that can be associated with an employee. -// -// ### Usage Example -// -// Fetch from the `LIST Locations` endpoint and filter by `ID` to show all office locations. -type Location struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The location's name. - Name *string `json:"name,omitempty"` - // The location's phone number. - PhoneNumber *string `json:"phone_number,omitempty"` - // Line 1 of the location's street address. - Street1 *string `json:"street_1,omitempty"` - // Line 2 of the location's street address. - Street2 *string `json:"street_2,omitempty"` - // The location's city. - City *string `json:"city,omitempty"` - // The location's state. Represents a region if outside of the US. - State *string `json:"state,omitempty"` - // The location's zip code or postal code. - ZipCode *string `json:"zip_code,omitempty"` - // The location's country. - // - // - `AF` - Afghanistan - // - `AX` - Åland Islands - // - `AL` - Albania - // - `DZ` - Algeria - // - `AS` - American Samoa - // - `AD` - Andorra - // - `AO` - Angola - // - `AI` - Anguilla - // - `AQ` - Antarctica - // - `AG` - Antigua and Barbuda - // - `AR` - Argentina - // - `AM` - Armenia - // - `AW` - Aruba - // - `AU` - Australia - // - `AT` - Austria - // - `AZ` - Azerbaijan - // - `BS` - Bahamas - // - `BH` - Bahrain - // - `BD` - Bangladesh - // - `BB` - Barbados - // - `BY` - Belarus - // - `BE` - Belgium - // - `BZ` - Belize - // - `BJ` - Benin - // - `BM` - Bermuda - // - `BT` - Bhutan - // - `BO` - Bolivia - // - `BQ` - Bonaire, Sint Eustatius and Saba - // - `BA` - Bosnia and Herzegovina - // - `BW` - Botswana - // - `BV` - Bouvet Island - // - `BR` - Brazil - // - `IO` - British Indian Ocean Territory - // - `BN` - Brunei - // - `BG` - Bulgaria - // - `BF` - Burkina Faso - // - `BI` - Burundi - // - `CV` - Cabo Verde - // - `KH` - Cambodia - // - `CM` - Cameroon - // - `CA` - Canada - // - `KY` - Cayman Islands - // - `CF` - Central African Republic - // - `TD` - Chad - // - `CL` - Chile - // - `CN` - China - // - `CX` - Christmas Island - // - `CC` - Cocos (Keeling) Islands - // - `CO` - Colombia - // - `KM` - Comoros - // - `CG` - Congo - // - `CD` - Congo (the Democratic Republic of the) - // - `CK` - Cook Islands - // - `CR` - Costa Rica - // - `CI` - Côte d'Ivoire - // - `HR` - Croatia - // - `CU` - Cuba - // - `CW` - Curaçao - // - `CY` - Cyprus - // - `CZ` - Czechia - // - `DK` - Denmark - // - `DJ` - Djibouti - // - `DM` - Dominica - // - `DO` - Dominican Republic - // - `EC` - Ecuador - // - `EG` - Egypt - // - `SV` - El Salvador - // - `GQ` - Equatorial Guinea - // - `ER` - Eritrea - // - `EE` - Estonia - // - `SZ` - Eswatini - // - `ET` - Ethiopia - // - `FK` - Falkland Islands (Malvinas) - // - `FO` - Faroe Islands - // - `FJ` - Fiji - // - `FI` - Finland - // - `FR` - France - // - `GF` - French Guiana - // - `PF` - French Polynesia - // - `TF` - French Southern Territories - // - `GA` - Gabon - // - `GM` - Gambia - // - `GE` - Georgia - // - `DE` - Germany - // - `GH` - Ghana - // - `GI` - Gibraltar - // - `GR` - Greece - // - `GL` - Greenland - // - `GD` - Grenada - // - `GP` - Guadeloupe - // - `GU` - Guam - // - `GT` - Guatemala - // - `GG` - Guernsey - // - `GN` - Guinea - // - `GW` - Guinea-Bissau - // - `GY` - Guyana - // - `HT` - Haiti - // - `HM` - Heard Island and McDonald Islands - // - `VA` - Holy See - // - `HN` - Honduras - // - `HK` - Hong Kong - // - `HU` - Hungary - // - `IS` - Iceland - // - `IN` - India - // - `ID` - Indonesia - // - `IR` - Iran - // - `IQ` - Iraq - // - `IE` - Ireland - // - `IM` - Isle of Man - // - `IL` - Israel - // - `IT` - Italy - // - `JM` - Jamaica - // - `JP` - Japan - // - `JE` - Jersey - // - `JO` - Jordan - // - `KZ` - Kazakhstan - // - `KE` - Kenya - // - `KI` - Kiribati - // - `KW` - Kuwait - // - `KG` - Kyrgyzstan - // - `LA` - Laos - // - `LV` - Latvia - // - `LB` - Lebanon - // - `LS` - Lesotho - // - `LR` - Liberia - // - `LY` - Libya - // - `LI` - Liechtenstein - // - `LT` - Lithuania - // - `LU` - Luxembourg - // - `MO` - Macao - // - `MG` - Madagascar - // - `MW` - Malawi - // - `MY` - Malaysia - // - `MV` - Maldives - // - `ML` - Mali - // - `MT` - Malta - // - `MH` - Marshall Islands - // - `MQ` - Martinique - // - `MR` - Mauritania - // - `MU` - Mauritius - // - `YT` - Mayotte - // - `MX` - Mexico - // - `FM` - Micronesia (Federated States of) - // - `MD` - Moldova - // - `MC` - Monaco - // - `MN` - Mongolia - // - `ME` - Montenegro - // - `MS` - Montserrat - // - `MA` - Morocco - // - `MZ` - Mozambique - // - `MM` - Myanmar - // - `NA` - Namibia - // - `NR` - Nauru - // - `NP` - Nepal - // - `NL` - Netherlands - // - `NC` - New Caledonia - // - `NZ` - New Zealand - // - `NI` - Nicaragua - // - `NE` - Niger - // - `NG` - Nigeria - // - `NU` - Niue - // - `NF` - Norfolk Island - // - `KP` - North Korea - // - `MK` - North Macedonia - // - `MP` - Northern Mariana Islands - // - `NO` - Norway - // - `OM` - Oman - // - `PK` - Pakistan - // - `PW` - Palau - // - `PS` - Palestine, State of - // - `PA` - Panama - // - `PG` - Papua New Guinea - // - `PY` - Paraguay - // - `PE` - Peru - // - `PH` - Philippines - // - `PN` - Pitcairn - // - `PL` - Poland - // - `PT` - Portugal - // - `PR` - Puerto Rico - // - `QA` - Qatar - // - `RE` - Réunion - // - `RO` - Romania - // - `RU` - Russia - // - `RW` - Rwanda - // - `BL` - Saint Barthélemy - // - `SH` - Saint Helena, Ascension and Tristan da Cunha - // - `KN` - Saint Kitts and Nevis - // - `LC` - Saint Lucia - // - `MF` - Saint Martin (French part) - // - `PM` - Saint Pierre and Miquelon - // - `VC` - Saint Vincent and the Grenadines - // - `WS` - Samoa - // - `SM` - San Marino - // - `ST` - Sao Tome and Principe - // - `SA` - Saudi Arabia - // - `SN` - Senegal - // - `RS` - Serbia - // - `SC` - Seychelles - // - `SL` - Sierra Leone - // - `SG` - Singapore - // - `SX` - Sint Maarten (Dutch part) - // - `SK` - Slovakia - // - `SI` - Slovenia - // - `SB` - Solomon Islands - // - `SO` - Somalia - // - `ZA` - South Africa - // - `GS` - South Georgia and the South Sandwich Islands - // - `KR` - South Korea - // - `SS` - South Sudan - // - `ES` - Spain - // - `LK` - Sri Lanka - // - `SD` - Sudan - // - `SR` - Suriname - // - `SJ` - Svalbard and Jan Mayen - // - `SE` - Sweden - // - `CH` - Switzerland - // - `SY` - Syria - // - `TW` - Taiwan - // - `TJ` - Tajikistan - // - `TZ` - Tanzania - // - `TH` - Thailand - // - `TL` - Timor-Leste - // - `TG` - Togo - // - `TK` - Tokelau - // - `TO` - Tonga - // - `TT` - Trinidad and Tobago - // - `TN` - Tunisia - // - `TR` - Turkey - // - `TM` - Turkmenistan - // - `TC` - Turks and Caicos Islands - // - `TV` - Tuvalu - // - `UG` - Uganda - // - `UA` - Ukraine - // - `AE` - United Arab Emirates - // - `GB` - United Kingdom - // - `UM` - United States Minor Outlying Islands - // - `US` - United States of America - // - `UY` - Uruguay - // - `UZ` - Uzbekistan - // - `VU` - Vanuatu - // - `VE` - Venezuela - // - `VN` - Vietnam - // - `VG` - Virgin Islands (British) - // - `VI` - Virgin Islands (U.S.) - // - `WF` - Wallis and Futuna - // - `EH` - Western Sahara - // - `YE` - Yemen - // - `ZM` - Zambia - // - `ZW` - Zimbabwe - Country *LocationCountry `json:"country,omitempty"` - // The location's type. Can be either WORK or HOME - // - // - `HOME` - HOME - // - `WORK` - WORK - LocationType *LocationLocationType `json:"location_type,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` - - _rawJSON json.RawMessage -} - -func (l *Location) UnmarshalJSON(data []byte) error { - type unmarshaler Location - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *l = Location(value) - l._rawJSON = json.RawMessage(data) - return nil -} - -func (l *Location) String() string { - if len(l._rawJSON) > 0 { - if value, err := core.StringifyJSON(l._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(l); err == nil { - return value - } - return fmt.Sprintf("%#v", l) -} - -// The location's country. -// -// - `AF` - Afghanistan -// - `AX` - Åland Islands -// - `AL` - Albania -// - `DZ` - Algeria -// - `AS` - American Samoa -// - `AD` - Andorra -// - `AO` - Angola -// - `AI` - Anguilla -// - `AQ` - Antarctica -// - `AG` - Antigua and Barbuda -// - `AR` - Argentina -// - `AM` - Armenia -// - `AW` - Aruba -// - `AU` - Australia -// - `AT` - Austria -// - `AZ` - Azerbaijan -// - `BS` - Bahamas -// - `BH` - Bahrain -// - `BD` - Bangladesh -// - `BB` - Barbados -// - `BY` - Belarus -// - `BE` - Belgium -// - `BZ` - Belize -// - `BJ` - Benin -// - `BM` - Bermuda -// - `BT` - Bhutan -// - `BO` - Bolivia -// - `BQ` - Bonaire, Sint Eustatius and Saba -// - `BA` - Bosnia and Herzegovina -// - `BW` - Botswana -// - `BV` - Bouvet Island -// - `BR` - Brazil -// - `IO` - British Indian Ocean Territory -// - `BN` - Brunei -// - `BG` - Bulgaria -// - `BF` - Burkina Faso -// - `BI` - Burundi -// - `CV` - Cabo Verde -// - `KH` - Cambodia -// - `CM` - Cameroon -// - `CA` - Canada -// - `KY` - Cayman Islands -// - `CF` - Central African Republic -// - `TD` - Chad -// - `CL` - Chile -// - `CN` - China -// - `CX` - Christmas Island -// - `CC` - Cocos (Keeling) Islands -// - `CO` - Colombia -// - `KM` - Comoros -// - `CG` - Congo -// - `CD` - Congo (the Democratic Republic of the) -// - `CK` - Cook Islands -// - `CR` - Costa Rica -// - `CI` - Côte d'Ivoire -// - `HR` - Croatia -// - `CU` - Cuba -// - `CW` - Curaçao -// - `CY` - Cyprus -// - `CZ` - Czechia -// - `DK` - Denmark -// - `DJ` - Djibouti -// - `DM` - Dominica -// - `DO` - Dominican Republic -// - `EC` - Ecuador -// - `EG` - Egypt -// - `SV` - El Salvador -// - `GQ` - Equatorial Guinea -// - `ER` - Eritrea -// - `EE` - Estonia -// - `SZ` - Eswatini -// - `ET` - Ethiopia -// - `FK` - Falkland Islands (Malvinas) -// - `FO` - Faroe Islands -// - `FJ` - Fiji -// - `FI` - Finland -// - `FR` - France -// - `GF` - French Guiana -// - `PF` - French Polynesia -// - `TF` - French Southern Territories -// - `GA` - Gabon -// - `GM` - Gambia -// - `GE` - Georgia -// - `DE` - Germany -// - `GH` - Ghana -// - `GI` - Gibraltar -// - `GR` - Greece -// - `GL` - Greenland -// - `GD` - Grenada -// - `GP` - Guadeloupe -// - `GU` - Guam -// - `GT` - Guatemala -// - `GG` - Guernsey -// - `GN` - Guinea -// - `GW` - Guinea-Bissau -// - `GY` - Guyana -// - `HT` - Haiti -// - `HM` - Heard Island and McDonald Islands -// - `VA` - Holy See -// - `HN` - Honduras -// - `HK` - Hong Kong -// - `HU` - Hungary -// - `IS` - Iceland -// - `IN` - India -// - `ID` - Indonesia -// - `IR` - Iran -// - `IQ` - Iraq -// - `IE` - Ireland -// - `IM` - Isle of Man -// - `IL` - Israel -// - `IT` - Italy -// - `JM` - Jamaica -// - `JP` - Japan -// - `JE` - Jersey -// - `JO` - Jordan -// - `KZ` - Kazakhstan -// - `KE` - Kenya -// - `KI` - Kiribati -// - `KW` - Kuwait -// - `KG` - Kyrgyzstan -// - `LA` - Laos -// - `LV` - Latvia -// - `LB` - Lebanon -// - `LS` - Lesotho -// - `LR` - Liberia -// - `LY` - Libya -// - `LI` - Liechtenstein -// - `LT` - Lithuania -// - `LU` - Luxembourg -// - `MO` - Macao -// - `MG` - Madagascar -// - `MW` - Malawi -// - `MY` - Malaysia -// - `MV` - Maldives -// - `ML` - Mali -// - `MT` - Malta -// - `MH` - Marshall Islands -// - `MQ` - Martinique -// - `MR` - Mauritania -// - `MU` - Mauritius -// - `YT` - Mayotte -// - `MX` - Mexico -// - `FM` - Micronesia (Federated States of) -// - `MD` - Moldova -// - `MC` - Monaco -// - `MN` - Mongolia -// - `ME` - Montenegro -// - `MS` - Montserrat -// - `MA` - Morocco -// - `MZ` - Mozambique -// - `MM` - Myanmar -// - `NA` - Namibia -// - `NR` - Nauru -// - `NP` - Nepal -// - `NL` - Netherlands -// - `NC` - New Caledonia -// - `NZ` - New Zealand -// - `NI` - Nicaragua -// - `NE` - Niger -// - `NG` - Nigeria -// - `NU` - Niue -// - `NF` - Norfolk Island -// - `KP` - North Korea -// - `MK` - North Macedonia -// - `MP` - Northern Mariana Islands -// - `NO` - Norway -// - `OM` - Oman -// - `PK` - Pakistan -// - `PW` - Palau -// - `PS` - Palestine, State of -// - `PA` - Panama -// - `PG` - Papua New Guinea -// - `PY` - Paraguay -// - `PE` - Peru -// - `PH` - Philippines -// - `PN` - Pitcairn -// - `PL` - Poland -// - `PT` - Portugal -// - `PR` - Puerto Rico -// - `QA` - Qatar -// - `RE` - Réunion -// - `RO` - Romania -// - `RU` - Russia -// - `RW` - Rwanda -// - `BL` - Saint Barthélemy -// - `SH` - Saint Helena, Ascension and Tristan da Cunha -// - `KN` - Saint Kitts and Nevis -// - `LC` - Saint Lucia -// - `MF` - Saint Martin (French part) -// - `PM` - Saint Pierre and Miquelon -// - `VC` - Saint Vincent and the Grenadines -// - `WS` - Samoa -// - `SM` - San Marino -// - `ST` - Sao Tome and Principe -// - `SA` - Saudi Arabia -// - `SN` - Senegal -// - `RS` - Serbia -// - `SC` - Seychelles -// - `SL` - Sierra Leone -// - `SG` - Singapore -// - `SX` - Sint Maarten (Dutch part) -// - `SK` - Slovakia -// - `SI` - Slovenia -// - `SB` - Solomon Islands -// - `SO` - Somalia -// - `ZA` - South Africa -// - `GS` - South Georgia and the South Sandwich Islands -// - `KR` - South Korea -// - `SS` - South Sudan -// - `ES` - Spain -// - `LK` - Sri Lanka -// - `SD` - Sudan -// - `SR` - Suriname -// - `SJ` - Svalbard and Jan Mayen -// - `SE` - Sweden -// - `CH` - Switzerland -// - `SY` - Syria -// - `TW` - Taiwan -// - `TJ` - Tajikistan -// - `TZ` - Tanzania -// - `TH` - Thailand -// - `TL` - Timor-Leste -// - `TG` - Togo -// - `TK` - Tokelau -// - `TO` - Tonga -// - `TT` - Trinidad and Tobago -// - `TN` - Tunisia -// - `TR` - Turkey -// - `TM` - Turkmenistan -// - `TC` - Turks and Caicos Islands -// - `TV` - Tuvalu -// - `UG` - Uganda -// - `UA` - Ukraine -// - `AE` - United Arab Emirates -// - `GB` - United Kingdom -// - `UM` - United States Minor Outlying Islands -// - `US` - United States of America -// - `UY` - Uruguay -// - `UZ` - Uzbekistan -// - `VU` - Vanuatu -// - `VE` - Venezuela -// - `VN` - Vietnam -// - `VG` - Virgin Islands (British) -// - `VI` - Virgin Islands (U.S.) -// - `WF` - Wallis and Futuna -// - `EH` - Western Sahara -// - `YE` - Yemen -// - `ZM` - Zambia -// - `ZW` - Zimbabwe -type LocationCountry struct { - typeName string - CountryEnum CountryEnum - String string -} - -func NewLocationCountryFromCountryEnum(value CountryEnum) *LocationCountry { - return &LocationCountry{typeName: "countryEnum", CountryEnum: value} -} - -func NewLocationCountryFromString(value string) *LocationCountry { - return &LocationCountry{typeName: "string", String: value} -} - -func (l *LocationCountry) UnmarshalJSON(data []byte) error { - var valueCountryEnum CountryEnum - if err := json.Unmarshal(data, &valueCountryEnum); err == nil { - l.typeName = "countryEnum" - l.CountryEnum = valueCountryEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - l.typeName = "string" - l.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, l) -} - -func (l LocationCountry) MarshalJSON() ([]byte, error) { - switch l.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", l.typeName, l) - case "countryEnum": - return json.Marshal(l.CountryEnum) - case "string": - return json.Marshal(l.String) - } -} - -type LocationCountryVisitor interface { - VisitCountryEnum(CountryEnum) error - VisitString(string) error -} - -func (l *LocationCountry) Accept(visitor LocationCountryVisitor) error { - switch l.typeName { - default: - return fmt.Errorf("invalid type %s in %T", l.typeName, l) - case "countryEnum": - return visitor.VisitCountryEnum(l.CountryEnum) - case "string": - return visitor.VisitString(l.String) - } -} - -// The location's type. Can be either WORK or HOME -// -// - `HOME` - HOME -// - `WORK` - WORK -type LocationLocationType struct { - typeName string - LocationTypeEnum LocationTypeEnum - String string -} - -func NewLocationLocationTypeFromLocationTypeEnum(value LocationTypeEnum) *LocationLocationType { - return &LocationLocationType{typeName: "locationTypeEnum", LocationTypeEnum: value} -} - -func NewLocationLocationTypeFromString(value string) *LocationLocationType { - return &LocationLocationType{typeName: "string", String: value} -} - -func (l *LocationLocationType) UnmarshalJSON(data []byte) error { - var valueLocationTypeEnum LocationTypeEnum - if err := json.Unmarshal(data, &valueLocationTypeEnum); err == nil { - l.typeName = "locationTypeEnum" - l.LocationTypeEnum = valueLocationTypeEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - l.typeName = "string" - l.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, l) -} - -func (l LocationLocationType) MarshalJSON() ([]byte, error) { - switch l.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", l.typeName, l) - case "locationTypeEnum": - return json.Marshal(l.LocationTypeEnum) - case "string": - return json.Marshal(l.String) - } -} - -type LocationLocationTypeVisitor interface { - VisitLocationTypeEnum(LocationTypeEnum) error - VisitString(string) error -} - -func (l *LocationLocationType) Accept(visitor LocationLocationTypeVisitor) error { - switch l.typeName { - default: - return fmt.Errorf("invalid type %s in %T", l.typeName, l) - case "locationTypeEnum": - return visitor.VisitLocationTypeEnum(l.LocationTypeEnum) - case "string": - return visitor.VisitString(l.String) - } -} - -// - `HOME` - HOME -// - `WORK` - WORK -type LocationTypeEnum string - -const ( - LocationTypeEnumHome LocationTypeEnum = "HOME" - LocationTypeEnumWork LocationTypeEnum = "WORK" -) - -func NewLocationTypeEnumFromString(s string) (LocationTypeEnum, error) { - switch s { - case "HOME": - return LocationTypeEnumHome, nil - case "WORK": - return LocationTypeEnumWork, nil - } - var t LocationTypeEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (l LocationTypeEnum) Ptr() *LocationTypeEnum { - return &l -} - -// - `SINGLE` - SINGLE -// - `MARRIED_FILING_JOINTLY` - MARRIED_FILING_JOINTLY -// - `MARRIED_FILING_SEPARATELY` - MARRIED_FILING_SEPARATELY -// - `HEAD_OF_HOUSEHOLD` - HEAD_OF_HOUSEHOLD -// - `QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD` - QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD -type MaritalStatusEnum string - -const ( - MaritalStatusEnumSingle MaritalStatusEnum = "SINGLE" - MaritalStatusEnumMarriedFilingJointly MaritalStatusEnum = "MARRIED_FILING_JOINTLY" - MaritalStatusEnumMarriedFilingSeparately MaritalStatusEnum = "MARRIED_FILING_SEPARATELY" - MaritalStatusEnumHeadOfHousehold MaritalStatusEnum = "HEAD_OF_HOUSEHOLD" - MaritalStatusEnumQualifyingWidowOrWidowerWithDependentChild MaritalStatusEnum = "QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD" -) - -func NewMaritalStatusEnumFromString(s string) (MaritalStatusEnum, error) { - switch s { - case "SINGLE": - return MaritalStatusEnumSingle, nil - case "MARRIED_FILING_JOINTLY": - return MaritalStatusEnumMarriedFilingJointly, nil - case "MARRIED_FILING_SEPARATELY": - return MaritalStatusEnumMarriedFilingSeparately, nil - case "HEAD_OF_HOUSEHOLD": - return MaritalStatusEnumHeadOfHousehold, nil - case "QUALIFYING_WIDOW_OR_WIDOWER_WITH_DEPENDENT_CHILD": - return MaritalStatusEnumQualifyingWidowOrWidowerWithDependentChild, nil - } - var t MaritalStatusEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (m MaritalStatusEnum) Ptr() *MaritalStatusEnum { - return &m -} - -type MetaResponse struct { - RequestSchema map[string]interface{} `json:"request_schema,omitempty"` - RemoteFieldClasses map[string]interface{} `json:"remote_field_classes,omitempty"` - Status *LinkedAccountStatus `json:"status,omitempty"` - HasConditionalParams bool `json:"has_conditional_params"` - HasRequiredLinkedAccountParams bool `json:"has_required_linked_account_params"` - - _rawJSON json.RawMessage -} - -func (m *MetaResponse) UnmarshalJSON(data []byte) error { - type unmarshaler MetaResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *m = MetaResponse(value) - m._rawJSON = json.RawMessage(data) - return nil -} - -func (m *MetaResponse) String() string { - if len(m._rawJSON) > 0 { - if value, err := core.StringifyJSON(m._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(m); err == nil { - return value - } - return fmt.Sprintf("%#v", m) -} - -// - `GET` - GET -// - `OPTIONS` - OPTIONS -// - `HEAD` - HEAD -// - `POST` - POST -// - `PUT` - PUT -// - `PATCH` - PATCH -// - `DELETE` - DELETE -type MethodEnum string - -const ( - MethodEnumGet MethodEnum = "GET" - MethodEnumOptions MethodEnum = "OPTIONS" - MethodEnumHead MethodEnum = "HEAD" - MethodEnumPost MethodEnum = "POST" - MethodEnumPut MethodEnum = "PUT" - MethodEnumPatch MethodEnum = "PATCH" - MethodEnumDelete MethodEnum = "DELETE" -) - -func NewMethodEnumFromString(s string) (MethodEnum, error) { - switch s { - case "GET": - return MethodEnumGet, nil - case "OPTIONS": - return MethodEnumOptions, nil - case "HEAD": - return MethodEnumHead, nil - case "POST": - return MethodEnumPost, nil - case "PUT": - return MethodEnumPut, nil - case "PATCH": - return MethodEnumPatch, nil - case "DELETE": - return MethodEnumDelete, nil - } - var t MethodEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (m MethodEnum) Ptr() *MethodEnum { - return &m -} - -// # The ModelOperation Object -// -// ### Description -// -// The `ModelOperation` object is used to represent the operations that are currently supported for a given model. -// -// ### Usage Example -// -// View what operations are supported for the `Candidate` endpoint. -type ModelOperation struct { - ModelName string `json:"model_name"` - AvailableOperations []string `json:"available_operations,omitempty"` - RequiredPostParameters []string `json:"required_post_parameters,omitempty"` - SupportedFields []string `json:"supported_fields,omitempty"` - - _rawJSON json.RawMessage -} - -func (m *ModelOperation) UnmarshalJSON(data []byte) error { - type unmarshaler ModelOperation - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *m = ModelOperation(value) - m._rawJSON = json.RawMessage(data) - return nil -} - -func (m *ModelOperation) String() string { - if len(m._rawJSON) > 0 { - if value, err := core.StringifyJSON(m._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(m); err == nil { - return value - } - return fmt.Sprintf("%#v", m) -} - -type ModelPermissionDeserializer struct { - IsEnabled *bool `json:"is_enabled,omitempty"` - - _rawJSON json.RawMessage -} - -func (m *ModelPermissionDeserializer) UnmarshalJSON(data []byte) error { - type unmarshaler ModelPermissionDeserializer - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *m = ModelPermissionDeserializer(value) - m._rawJSON = json.RawMessage(data) - return nil -} - -func (m *ModelPermissionDeserializer) String() string { - if len(m._rawJSON) > 0 { - if value, err := core.StringifyJSON(m._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(m); err == nil { - return value - } - return fmt.Sprintf("%#v", m) -} - -type ModelPermissionDeserializerRequest struct { - IsEnabled *bool `json:"is_enabled,omitempty"` - - _rawJSON json.RawMessage -} - -func (m *ModelPermissionDeserializerRequest) UnmarshalJSON(data []byte) error { - type unmarshaler ModelPermissionDeserializerRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *m = ModelPermissionDeserializerRequest(value) - m._rawJSON = json.RawMessage(data) - return nil -} - -func (m *ModelPermissionDeserializerRequest) String() string { - if len(m._rawJSON) > 0 { - if value, err := core.StringifyJSON(m._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(m); err == nil { - return value - } - return fmt.Sprintf("%#v", m) -} - -// # The MultipartFormField Object -// -// ### Description -// -// The `MultipartFormField` object is used to represent fields in an HTTP request using `multipart/form-data`. -// -// ### Usage Example -// -// Create a `MultipartFormField` to define a multipart form entry. -type MultipartFormFieldRequest struct { - // The name of the form field - Name string `json:"name"` - // The data for the form field. - Data string `json:"data"` - // The encoding of the value of `data`. Defaults to `RAW` if not defined. - // - // - `RAW` - RAW - // - `BASE64` - BASE64 - // - `GZIP_BASE64` - GZIP_BASE64 - Encoding *MultipartFormFieldRequestEncoding `json:"encoding,omitempty"` - // The file name of the form field, if the field is for a file. - FileName *string `json:"file_name,omitempty"` - // The MIME type of the file, if the field is for a file. - ContentType *string `json:"content_type,omitempty"` - - _rawJSON json.RawMessage -} - -func (m *MultipartFormFieldRequest) UnmarshalJSON(data []byte) error { - type unmarshaler MultipartFormFieldRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *m = MultipartFormFieldRequest(value) - m._rawJSON = json.RawMessage(data) - return nil -} - -func (m *MultipartFormFieldRequest) String() string { - if len(m._rawJSON) > 0 { - if value, err := core.StringifyJSON(m._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(m); err == nil { - return value - } - return fmt.Sprintf("%#v", m) -} - -// The encoding of the value of `data`. Defaults to `RAW` if not defined. -// -// - `RAW` - RAW -// - `BASE64` - BASE64 -// - `GZIP_BASE64` - GZIP_BASE64 -type MultipartFormFieldRequestEncoding struct { - typeName string - EncodingEnum EncodingEnum - String string -} - -func NewMultipartFormFieldRequestEncodingFromEncodingEnum(value EncodingEnum) *MultipartFormFieldRequestEncoding { - return &MultipartFormFieldRequestEncoding{typeName: "encodingEnum", EncodingEnum: value} -} - -func NewMultipartFormFieldRequestEncodingFromString(value string) *MultipartFormFieldRequestEncoding { - return &MultipartFormFieldRequestEncoding{typeName: "string", String: value} -} - -func (m *MultipartFormFieldRequestEncoding) UnmarshalJSON(data []byte) error { - var valueEncodingEnum EncodingEnum - if err := json.Unmarshal(data, &valueEncodingEnum); err == nil { - m.typeName = "encodingEnum" - m.EncodingEnum = valueEncodingEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - m.typeName = "string" - m.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, m) -} - -func (m MultipartFormFieldRequestEncoding) MarshalJSON() ([]byte, error) { - switch m.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", m.typeName, m) - case "encodingEnum": - return json.Marshal(m.EncodingEnum) - case "string": - return json.Marshal(m.String) - } -} - -type MultipartFormFieldRequestEncodingVisitor interface { - VisitEncodingEnum(EncodingEnum) error - VisitString(string) error -} - -func (m *MultipartFormFieldRequestEncoding) Accept(visitor MultipartFormFieldRequestEncodingVisitor) error { - switch m.typeName { - default: - return fmt.Errorf("invalid type %s in %T", m.typeName, m) - case "encodingEnum": - return visitor.VisitEncodingEnum(m.EncodingEnum) - case "string": - return visitor.VisitString(m.String) - } -} - -type PaginatedAccountDetailsAndActionsList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*AccountDetailsAndActions `json:"results,omitempty"` - - _rawJSON json.RawMessage -} - -func (p *PaginatedAccountDetailsAndActionsList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedAccountDetailsAndActionsList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *p = PaginatedAccountDetailsAndActionsList(value) - p._rawJSON = json.RawMessage(data) - return nil -} - -func (p *PaginatedAccountDetailsAndActionsList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) -} - -type PaginatedAuditLogEventList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*AuditLogEvent `json:"results,omitempty"` - - _rawJSON json.RawMessage -} - -func (p *PaginatedAuditLogEventList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedAuditLogEventList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *p = PaginatedAuditLogEventList(value) - p._rawJSON = json.RawMessage(data) - return nil -} - -func (p *PaginatedAuditLogEventList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) -} - -type PaginatedBankInfoList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*BankInfo `json:"results,omitempty"` - - _rawJSON json.RawMessage -} - -func (p *PaginatedBankInfoList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedBankInfoList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *p = PaginatedBankInfoList(value) - p._rawJSON = json.RawMessage(data) - return nil -} - -func (p *PaginatedBankInfoList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) -} - -type PaginatedBenefitList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Benefit `json:"results,omitempty"` - - _rawJSON json.RawMessage -} - -func (p *PaginatedBenefitList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedBenefitList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *p = PaginatedBenefitList(value) - p._rawJSON = json.RawMessage(data) - return nil -} - -func (p *PaginatedBenefitList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) -} - -type PaginatedCompanyList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Company `json:"results,omitempty"` - - _rawJSON json.RawMessage -} - -func (p *PaginatedCompanyList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedCompanyList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *p = PaginatedCompanyList(value) - p._rawJSON = json.RawMessage(data) - return nil -} - -func (p *PaginatedCompanyList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) -} - -type PaginatedDependentList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Dependent `json:"results,omitempty"` - - _rawJSON json.RawMessage -} - -func (p *PaginatedDependentList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedDependentList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *p = PaginatedDependentList(value) - p._rawJSON = json.RawMessage(data) - return nil -} - -func (p *PaginatedDependentList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) -} - -type PaginatedEmployeeList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Employee `json:"results,omitempty"` - - _rawJSON json.RawMessage -} - -func (p *PaginatedEmployeeList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedEmployeeList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *p = PaginatedEmployeeList(value) - p._rawJSON = json.RawMessage(data) - return nil -} - -func (p *PaginatedEmployeeList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) -} - -type PaginatedEmployeePayrollRunList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*EmployeePayrollRun `json:"results,omitempty"` - - _rawJSON json.RawMessage -} - -func (p *PaginatedEmployeePayrollRunList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedEmployeePayrollRunList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *p = PaginatedEmployeePayrollRunList(value) - p._rawJSON = json.RawMessage(data) - return nil -} - -func (p *PaginatedEmployeePayrollRunList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) -} - -type PaginatedEmployerBenefitList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*EmployerBenefit `json:"results,omitempty"` - - _rawJSON json.RawMessage -} - -func (p *PaginatedEmployerBenefitList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedEmployerBenefitList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *p = PaginatedEmployerBenefitList(value) - p._rawJSON = json.RawMessage(data) - return nil -} - -func (p *PaginatedEmployerBenefitList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) -} - -type PaginatedEmploymentList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Employment `json:"results,omitempty"` - - _rawJSON json.RawMessage -} - -func (p *PaginatedEmploymentList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedEmploymentList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *p = PaginatedEmploymentList(value) - p._rawJSON = json.RawMessage(data) - return nil -} - -func (p *PaginatedEmploymentList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) -} - -type PaginatedGroupList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Group `json:"results,omitempty"` - - _rawJSON json.RawMessage -} - -func (p *PaginatedGroupList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedGroupList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *p = PaginatedGroupList(value) - p._rawJSON = json.RawMessage(data) - return nil -} - -func (p *PaginatedGroupList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) -} - -type PaginatedIssueList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Issue `json:"results,omitempty"` - - _rawJSON json.RawMessage -} - -func (p *PaginatedIssueList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedIssueList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *p = PaginatedIssueList(value) - p._rawJSON = json.RawMessage(data) - return nil -} - -func (p *PaginatedIssueList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) -} - -type PaginatedLocationList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Location `json:"results,omitempty"` - - _rawJSON json.RawMessage -} - -func (p *PaginatedLocationList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedLocationList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *p = PaginatedLocationList(value) - p._rawJSON = json.RawMessage(data) - return nil -} - -func (p *PaginatedLocationList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) -} - -type PaginatedPayGroupList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*PayGroup `json:"results,omitempty"` - - _rawJSON json.RawMessage -} - -func (p *PaginatedPayGroupList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedPayGroupList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *p = PaginatedPayGroupList(value) - p._rawJSON = json.RawMessage(data) - return nil -} - -func (p *PaginatedPayGroupList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) -} - -type PaginatedPayrollRunList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*PayrollRun `json:"results,omitempty"` - - _rawJSON json.RawMessage -} - -func (p *PaginatedPayrollRunList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedPayrollRunList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *p = PaginatedPayrollRunList(value) - p._rawJSON = json.RawMessage(data) - return nil -} - -func (p *PaginatedPayrollRunList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) -} - -type PaginatedSyncStatusList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*SyncStatus `json:"results,omitempty"` - - _rawJSON json.RawMessage -} - -func (p *PaginatedSyncStatusList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedSyncStatusList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *p = PaginatedSyncStatusList(value) - p._rawJSON = json.RawMessage(data) - return nil -} - -func (p *PaginatedSyncStatusList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) -} - -type PaginatedTeamList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Team `json:"results,omitempty"` - - _rawJSON json.RawMessage -} - -func (p *PaginatedTeamList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedTeamList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *p = PaginatedTeamList(value) - p._rawJSON = json.RawMessage(data) - return nil -} - -func (p *PaginatedTeamList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) -} - -type PaginatedTimeOffBalanceList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*TimeOffBalance `json:"results,omitempty"` - - _rawJSON json.RawMessage -} - -func (p *PaginatedTimeOffBalanceList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedTimeOffBalanceList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *p = PaginatedTimeOffBalanceList(value) - p._rawJSON = json.RawMessage(data) - return nil -} - -func (p *PaginatedTimeOffBalanceList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) -} - -type PaginatedTimeOffList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*TimeOff `json:"results,omitempty"` - - _rawJSON json.RawMessage -} - -func (p *PaginatedTimeOffList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedTimeOffList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *p = PaginatedTimeOffList(value) - p._rawJSON = json.RawMessage(data) - return nil -} - -func (p *PaginatedTimeOffList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) -} - -type PaginatedTimesheetEntryList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*TimesheetEntry `json:"results,omitempty"` - - _rawJSON json.RawMessage -} - -func (p *PaginatedTimesheetEntryList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedTimesheetEntryList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *p = PaginatedTimesheetEntryList(value) - p._rawJSON = json.RawMessage(data) - return nil -} - -func (p *PaginatedTimesheetEntryList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) -} - -// - `XUA` - ADB Unit of Account -// - `AFN` - Afghan Afghani -// - `AFA` - Afghan Afghani (1927–2002) -// - `ALL` - Albanian Lek -// - `ALK` - Albanian Lek (1946–1965) -// - `DZD` - Algerian Dinar -// - `ADP` - Andorran Peseta -// - `AOA` - Angolan Kwanza -// - `AOK` - Angolan Kwanza (1977–1991) -// - `AON` - Angolan New Kwanza (1990–2000) -// - `AOR` - Angolan Readjusted Kwanza (1995–1999) -// - `ARA` - Argentine Austral -// - `ARS` - Argentine Peso -// - `ARM` - Argentine Peso (1881–1970) -// - `ARP` - Argentine Peso (1983–1985) -// - `ARL` - Argentine Peso Ley (1970–1983) -// - `AMD` - Armenian Dram -// - `AWG` - Aruban Florin -// - `AUD` - Australian Dollar -// - `ATS` - Austrian Schilling -// - `AZN` - Azerbaijani Manat -// - `AZM` - Azerbaijani Manat (1993–2006) -// - `BSD` - Bahamian Dollar -// - `BHD` - Bahraini Dinar -// - `BDT` - Bangladeshi Taka -// - `BBD` - Barbadian Dollar -// - `BYN` - Belarusian Ruble -// - `BYB` - Belarusian Ruble (1994–1999) -// - `BYR` - Belarusian Ruble (2000–2016) -// - `BEF` - Belgian Franc -// - `BEC` - Belgian Franc (convertible) -// - `BEL` - Belgian Franc (financial) -// - `BZD` - Belize Dollar -// - `BMD` - Bermudan Dollar -// - `BTN` - Bhutanese Ngultrum -// - `BOB` - Bolivian Boliviano -// - `BOL` - Bolivian Boliviano (1863–1963) -// - `BOV` - Bolivian Mvdol -// - `BOP` - Bolivian Peso -// - `BAM` - Bosnia-Herzegovina Convertible Mark -// - `BAD` - Bosnia-Herzegovina Dinar (1992–1994) -// - `BAN` - Bosnia-Herzegovina New Dinar (1994–1997) -// - `BWP` - Botswanan Pula -// - `BRC` - Brazilian Cruzado (1986–1989) -// - `BRZ` - Brazilian Cruzeiro (1942–1967) -// - `BRE` - Brazilian Cruzeiro (1990–1993) -// - `BRR` - Brazilian Cruzeiro (1993–1994) -// - `BRN` - Brazilian New Cruzado (1989–1990) -// - `BRB` - Brazilian New Cruzeiro (1967–1986) -// - `BRL` - Brazilian Real -// - `GBP` - British Pound -// - `BND` - Brunei Dollar -// - `BGL` - Bulgarian Hard Lev -// - `BGN` - Bulgarian Lev -// - `BGO` - Bulgarian Lev (1879–1952) -// - `BGM` - Bulgarian Socialist Lev -// - `BUK` - Burmese Kyat -// - `BIF` - Burundian Franc -// - `XPF` - CFP Franc -// - `KHR` - Cambodian Riel -// - `CAD` - Canadian Dollar -// - `CVE` - Cape Verdean Escudo -// - `KYD` - Cayman Islands Dollar -// - `XAF` - Central African CFA Franc -// - `CLE` - Chilean Escudo -// - `CLP` - Chilean Peso -// - `CLF` - Chilean Unit of Account (UF) -// - `CNX` - Chinese People’s Bank Dollar -// - `CNY` - Chinese Yuan -// - `CNH` - Chinese Yuan (offshore) -// - `COP` - Colombian Peso -// - `COU` - Colombian Real Value Unit -// - `KMF` - Comorian Franc -// - `CDF` - Congolese Franc -// - `CRC` - Costa Rican Colón -// - `HRD` - Croatian Dinar -// - `HRK` - Croatian Kuna -// - `CUC` - Cuban Convertible Peso -// - `CUP` - Cuban Peso -// - `CYP` - Cypriot Pound -// - `CZK` - Czech Koruna -// - `CSK` - Czechoslovak Hard Koruna -// - `DKK` - Danish Krone -// - `DJF` - Djiboutian Franc -// - `DOP` - Dominican Peso -// - `NLG` - Dutch Guilder -// - `XCD` - East Caribbean Dollar -// - `DDM` - East German Mark -// - `ECS` - Ecuadorian Sucre -// - `ECV` - Ecuadorian Unit of Constant Value -// - `EGP` - Egyptian Pound -// - `GQE` - Equatorial Guinean Ekwele -// - `ERN` - Eritrean Nakfa -// - `EEK` - Estonian Kroon -// - `ETB` - Ethiopian Birr -// - `EUR` - Euro -// - `XBA` - European Composite Unit -// - `XEU` - European Currency Unit -// - `XBB` - European Monetary Unit -// - `XBC` - European Unit of Account (XBC) -// - `XBD` - European Unit of Account (XBD) -// - `FKP` - Falkland Islands Pound -// - `FJD` - Fijian Dollar -// - `FIM` - Finnish Markka -// - `FRF` - French Franc -// - `XFO` - French Gold Franc -// - `XFU` - French UIC-Franc -// - `GMD` - Gambian Dalasi -// - `GEK` - Georgian Kupon Larit -// - `GEL` - Georgian Lari -// - `DEM` - German Mark -// - `GHS` - Ghanaian Cedi -// - `GHC` - Ghanaian Cedi (1979–2007) -// - `GIP` - Gibraltar Pound -// - `XAU` - Gold -// - `GRD` - Greek Drachma -// - `GTQ` - Guatemalan Quetzal -// - `GWP` - Guinea-Bissau Peso -// - `GNF` - Guinean Franc -// - `GNS` - Guinean Syli -// - `GYD` - Guyanaese Dollar -// - `HTG` - Haitian Gourde -// - `HNL` - Honduran Lempira -// - `HKD` - Hong Kong Dollar -// - `HUF` - Hungarian Forint -// - `IMP` - IMP -// - `ISK` - Icelandic Króna -// - `ISJ` - Icelandic Króna (1918–1981) -// - `INR` - Indian Rupee -// - `IDR` - Indonesian Rupiah -// - `IRR` - Iranian Rial -// - `IQD` - Iraqi Dinar -// - `IEP` - Irish Pound -// - `ILS` - Israeli New Shekel -// - `ILP` - Israeli Pound -// - `ILR` - Israeli Shekel (1980–1985) -// - `ITL` - Italian Lira -// - `JMD` - Jamaican Dollar -// - `JPY` - Japanese Yen -// - `JOD` - Jordanian Dinar -// - `KZT` - Kazakhstani Tenge -// - `KES` - Kenyan Shilling -// - `KWD` - Kuwaiti Dinar -// - `KGS` - Kyrgystani Som -// - `LAK` - Laotian Kip -// - `LVL` - Latvian Lats -// - `LVR` - Latvian Ruble -// - `LBP` - Lebanese Pound -// - `LSL` - Lesotho Loti -// - `LRD` - Liberian Dollar -// - `LYD` - Libyan Dinar -// - `LTL` - Lithuanian Litas -// - `LTT` - Lithuanian Talonas -// - `LUL` - Luxembourg Financial Franc -// - `LUC` - Luxembourgian Convertible Franc -// - `LUF` - Luxembourgian Franc -// - `MOP` - Macanese Pataca -// - `MKD` - Macedonian Denar -// - `MKN` - Macedonian Denar (1992–1993) -// - `MGA` - Malagasy Ariary -// - `MGF` - Malagasy Franc -// - `MWK` - Malawian Kwacha -// - `MYR` - Malaysian Ringgit -// - `MVR` - Maldivian Rufiyaa -// - `MVP` - Maldivian Rupee (1947–1981) -// - `MLF` - Malian Franc -// - `MTL` - Maltese Lira -// - `MTP` - Maltese Pound -// - `MRU` - Mauritanian Ouguiya -// - `MRO` - Mauritanian Ouguiya (1973–2017) -// - `MUR` - Mauritian Rupee -// - `MXV` - Mexican Investment Unit -// - `MXN` - Mexican Peso -// - `MXP` - Mexican Silver Peso (1861–1992) -// - `MDC` - Moldovan Cupon -// - `MDL` - Moldovan Leu -// - `MCF` - Monegasque Franc -// - `MNT` - Mongolian Tugrik -// - `MAD` - Moroccan Dirham -// - `MAF` - Moroccan Franc -// - `MZE` - Mozambican Escudo -// - `MZN` - Mozambican Metical -// - `MZM` - Mozambican Metical (1980–2006) -// - `MMK` - Myanmar Kyat -// - `NAD` - Namibian Dollar -// - `NPR` - Nepalese Rupee -// - `ANG` - Netherlands Antillean Guilder -// - `TWD` - New Taiwan Dollar -// - `NZD` - New Zealand Dollar -// - `NIO` - Nicaraguan Córdoba -// - `NIC` - Nicaraguan Córdoba (1988–1991) -// - `NGN` - Nigerian Naira -// - `KPW` - North Korean Won -// - `NOK` - Norwegian Krone -// - `OMR` - Omani Rial -// - `PKR` - Pakistani Rupee -// - `XPD` - Palladium -// - `PAB` - Panamanian Balboa -// - `PGK` - Papua New Guinean Kina -// - `PYG` - Paraguayan Guarani -// - `PEI` - Peruvian Inti -// - `PEN` - Peruvian Sol -// - `PES` - Peruvian Sol (1863–1965) -// - `PHP` - Philippine Peso -// - `XPT` - Platinum -// - `PLN` - Polish Zloty -// - `PLZ` - Polish Zloty (1950–1995) -// - `PTE` - Portuguese Escudo -// - `GWE` - Portuguese Guinea Escudo -// - `QAR` - Qatari Rial -// - `XRE` - RINET Funds -// - `RHD` - Rhodesian Dollar -// - `RON` - Romanian Leu -// - `ROL` - Romanian Leu (1952–2006) -// - `RUB` - Russian Ruble -// - `RUR` - Russian Ruble (1991–1998) -// - `RWF` - Rwandan Franc -// - `SVC` - Salvadoran Colón -// - `WST` - Samoan Tala -// - `SAR` - Saudi Riyal -// - `RSD` - Serbian Dinar -// - `CSD` - Serbian Dinar (2002–2006) -// - `SCR` - Seychellois Rupee -// - `SLL` - Sierra Leonean Leone -// - `XAG` - Silver -// - `SGD` - Singapore Dollar -// - `SKK` - Slovak Koruna -// - `SIT` - Slovenian Tolar -// - `SBD` - Solomon Islands Dollar -// - `SOS` - Somali Shilling -// - `ZAR` - South African Rand -// - `ZAL` - South African Rand (financial) -// - `KRH` - South Korean Hwan (1953–1962) -// - `KRW` - South Korean Won -// - `KRO` - South Korean Won (1945–1953) -// - `SSP` - South Sudanese Pound -// - `SUR` - Soviet Rouble -// - `ESP` - Spanish Peseta -// - `ESA` - Spanish Peseta (A account) -// - `ESB` - Spanish Peseta (convertible account) -// - `XDR` - Special Drawing Rights -// - `LKR` - Sri Lankan Rupee -// - `SHP` - St. Helena Pound -// - `XSU` - Sucre -// - `SDD` - Sudanese Dinar (1992–2007) -// - `SDG` - Sudanese Pound -// - `SDP` - Sudanese Pound (1957–1998) -// - `SRD` - Surinamese Dollar -// - `SRG` - Surinamese Guilder -// - `SZL` - Swazi Lilangeni -// - `SEK` - Swedish Krona -// - `CHF` - Swiss Franc -// - `SYP` - Syrian Pound -// - `STN` - São Tomé & Príncipe Dobra -// - `STD` - São Tomé & Príncipe Dobra (1977–2017) -// - `TVD` - TVD -// - `TJR` - Tajikistani Ruble -// - `TJS` - Tajikistani Somoni -// - `TZS` - Tanzanian Shilling -// - `XTS` - Testing Currency Code -// - `THB` - Thai Baht -// - `XXX` - The codes assigned for transactions where no currency is involved -// - `TPE` - Timorese Escudo -// - `TOP` - Tongan Paʻanga -// - `TTD` - Trinidad & Tobago Dollar -// - `TND` - Tunisian Dinar -// - `TRY` - Turkish Lira -// - `TRL` - Turkish Lira (1922–2005) -// - `TMT` - Turkmenistani Manat -// - `TMM` - Turkmenistani Manat (1993–2009) -// - `USD` - US Dollar -// - `USN` - US Dollar (Next day) -// - `USS` - US Dollar (Same day) -// - `UGX` - Ugandan Shilling -// - `UGS` - Ugandan Shilling (1966–1987) -// - `UAH` - Ukrainian Hryvnia -// - `UAK` - Ukrainian Karbovanets -// - `AED` - United Arab Emirates Dirham -// - `UYW` - Uruguayan Nominal Wage Index Unit -// - `UYU` - Uruguayan Peso -// - `UYP` - Uruguayan Peso (1975–1993) -// - `UYI` - Uruguayan Peso (Indexed Units) -// - `UZS` - Uzbekistani Som -// - `VUV` - Vanuatu Vatu -// - `VES` - Venezuelan Bolívar -// - `VEB` - Venezuelan Bolívar (1871–2008) -// - `VEF` - Venezuelan Bolívar (2008–2018) -// - `VND` - Vietnamese Dong -// - `VNN` - Vietnamese Dong (1978–1985) -// - `CHE` - WIR Euro -// - `CHW` - WIR Franc -// - `XOF` - West African CFA Franc -// - `YDD` - Yemeni Dinar -// - `YER` - Yemeni Rial -// - `YUN` - Yugoslavian Convertible Dinar (1990–1992) -// - `YUD` - Yugoslavian Hard Dinar (1966–1990) -// - `YUM` - Yugoslavian New Dinar (1994–2002) -// - `YUR` - Yugoslavian Reformed Dinar (1992–1993) -// - `ZWN` - ZWN -// - `ZRN` - Zairean New Zaire (1993–1998) -// - `ZRZ` - Zairean Zaire (1971–1993) -// - `ZMW` - Zambian Kwacha -// - `ZMK` - Zambian Kwacha (1968–2012) -// - `ZWD` - Zimbabwean Dollar (1980–2008) -// - `ZWR` - Zimbabwean Dollar (2008) -// - `ZWL` - Zimbabwean Dollar (2009) -type PayCurrencyEnum string - -const ( - PayCurrencyEnumXua PayCurrencyEnum = "XUA" - PayCurrencyEnumAfn PayCurrencyEnum = "AFN" - PayCurrencyEnumAfa PayCurrencyEnum = "AFA" - PayCurrencyEnumAll PayCurrencyEnum = "ALL" - PayCurrencyEnumAlk PayCurrencyEnum = "ALK" - PayCurrencyEnumDzd PayCurrencyEnum = "DZD" - PayCurrencyEnumAdp PayCurrencyEnum = "ADP" - PayCurrencyEnumAoa PayCurrencyEnum = "AOA" - PayCurrencyEnumAok PayCurrencyEnum = "AOK" - PayCurrencyEnumAon PayCurrencyEnum = "AON" - PayCurrencyEnumAor PayCurrencyEnum = "AOR" - PayCurrencyEnumAra PayCurrencyEnum = "ARA" - PayCurrencyEnumArs PayCurrencyEnum = "ARS" - PayCurrencyEnumArm PayCurrencyEnum = "ARM" - PayCurrencyEnumArp PayCurrencyEnum = "ARP" - PayCurrencyEnumArl PayCurrencyEnum = "ARL" - PayCurrencyEnumAmd PayCurrencyEnum = "AMD" - PayCurrencyEnumAwg PayCurrencyEnum = "AWG" - PayCurrencyEnumAud PayCurrencyEnum = "AUD" - PayCurrencyEnumAts PayCurrencyEnum = "ATS" - PayCurrencyEnumAzn PayCurrencyEnum = "AZN" - PayCurrencyEnumAzm PayCurrencyEnum = "AZM" - PayCurrencyEnumBsd PayCurrencyEnum = "BSD" - PayCurrencyEnumBhd PayCurrencyEnum = "BHD" - PayCurrencyEnumBdt PayCurrencyEnum = "BDT" - PayCurrencyEnumBbd PayCurrencyEnum = "BBD" - PayCurrencyEnumByn PayCurrencyEnum = "BYN" - PayCurrencyEnumByb PayCurrencyEnum = "BYB" - PayCurrencyEnumByr PayCurrencyEnum = "BYR" - PayCurrencyEnumBef PayCurrencyEnum = "BEF" - PayCurrencyEnumBec PayCurrencyEnum = "BEC" - PayCurrencyEnumBel PayCurrencyEnum = "BEL" - PayCurrencyEnumBzd PayCurrencyEnum = "BZD" - PayCurrencyEnumBmd PayCurrencyEnum = "BMD" - PayCurrencyEnumBtn PayCurrencyEnum = "BTN" - PayCurrencyEnumBob PayCurrencyEnum = "BOB" - PayCurrencyEnumBol PayCurrencyEnum = "BOL" - PayCurrencyEnumBov PayCurrencyEnum = "BOV" - PayCurrencyEnumBop PayCurrencyEnum = "BOP" - PayCurrencyEnumBam PayCurrencyEnum = "BAM" - PayCurrencyEnumBad PayCurrencyEnum = "BAD" - PayCurrencyEnumBan PayCurrencyEnum = "BAN" - PayCurrencyEnumBwp PayCurrencyEnum = "BWP" - PayCurrencyEnumBrc PayCurrencyEnum = "BRC" - PayCurrencyEnumBrz PayCurrencyEnum = "BRZ" - PayCurrencyEnumBre PayCurrencyEnum = "BRE" - PayCurrencyEnumBrr PayCurrencyEnum = "BRR" - PayCurrencyEnumBrn PayCurrencyEnum = "BRN" - PayCurrencyEnumBrb PayCurrencyEnum = "BRB" - PayCurrencyEnumBrl PayCurrencyEnum = "BRL" - PayCurrencyEnumGbp PayCurrencyEnum = "GBP" - PayCurrencyEnumBnd PayCurrencyEnum = "BND" - PayCurrencyEnumBgl PayCurrencyEnum = "BGL" - PayCurrencyEnumBgn PayCurrencyEnum = "BGN" - PayCurrencyEnumBgo PayCurrencyEnum = "BGO" - PayCurrencyEnumBgm PayCurrencyEnum = "BGM" - PayCurrencyEnumBuk PayCurrencyEnum = "BUK" - PayCurrencyEnumBif PayCurrencyEnum = "BIF" - PayCurrencyEnumXpf PayCurrencyEnum = "XPF" - PayCurrencyEnumKhr PayCurrencyEnum = "KHR" - PayCurrencyEnumCad PayCurrencyEnum = "CAD" - PayCurrencyEnumCve PayCurrencyEnum = "CVE" - PayCurrencyEnumKyd PayCurrencyEnum = "KYD" - PayCurrencyEnumXaf PayCurrencyEnum = "XAF" - PayCurrencyEnumCle PayCurrencyEnum = "CLE" - PayCurrencyEnumClp PayCurrencyEnum = "CLP" - PayCurrencyEnumClf PayCurrencyEnum = "CLF" - PayCurrencyEnumCnx PayCurrencyEnum = "CNX" - PayCurrencyEnumCny PayCurrencyEnum = "CNY" - PayCurrencyEnumCnh PayCurrencyEnum = "CNH" - PayCurrencyEnumCop PayCurrencyEnum = "COP" - PayCurrencyEnumCou PayCurrencyEnum = "COU" - PayCurrencyEnumKmf PayCurrencyEnum = "KMF" - PayCurrencyEnumCdf PayCurrencyEnum = "CDF" - PayCurrencyEnumCrc PayCurrencyEnum = "CRC" - PayCurrencyEnumHrd PayCurrencyEnum = "HRD" - PayCurrencyEnumHrk PayCurrencyEnum = "HRK" - PayCurrencyEnumCuc PayCurrencyEnum = "CUC" - PayCurrencyEnumCup PayCurrencyEnum = "CUP" - PayCurrencyEnumCyp PayCurrencyEnum = "CYP" - PayCurrencyEnumCzk PayCurrencyEnum = "CZK" - PayCurrencyEnumCsk PayCurrencyEnum = "CSK" - PayCurrencyEnumDkk PayCurrencyEnum = "DKK" - PayCurrencyEnumDjf PayCurrencyEnum = "DJF" - PayCurrencyEnumDop PayCurrencyEnum = "DOP" - PayCurrencyEnumNlg PayCurrencyEnum = "NLG" - PayCurrencyEnumXcd PayCurrencyEnum = "XCD" - PayCurrencyEnumDdm PayCurrencyEnum = "DDM" - PayCurrencyEnumEcs PayCurrencyEnum = "ECS" - PayCurrencyEnumEcv PayCurrencyEnum = "ECV" - PayCurrencyEnumEgp PayCurrencyEnum = "EGP" - PayCurrencyEnumGqe PayCurrencyEnum = "GQE" - PayCurrencyEnumErn PayCurrencyEnum = "ERN" - PayCurrencyEnumEek PayCurrencyEnum = "EEK" - PayCurrencyEnumEtb PayCurrencyEnum = "ETB" - PayCurrencyEnumEur PayCurrencyEnum = "EUR" - PayCurrencyEnumXba PayCurrencyEnum = "XBA" - PayCurrencyEnumXeu PayCurrencyEnum = "XEU" - PayCurrencyEnumXbb PayCurrencyEnum = "XBB" - PayCurrencyEnumXbc PayCurrencyEnum = "XBC" - PayCurrencyEnumXbd PayCurrencyEnum = "XBD" - PayCurrencyEnumFkp PayCurrencyEnum = "FKP" - PayCurrencyEnumFjd PayCurrencyEnum = "FJD" - PayCurrencyEnumFim PayCurrencyEnum = "FIM" - PayCurrencyEnumFrf PayCurrencyEnum = "FRF" - PayCurrencyEnumXfo PayCurrencyEnum = "XFO" - PayCurrencyEnumXfu PayCurrencyEnum = "XFU" - PayCurrencyEnumGmd PayCurrencyEnum = "GMD" - PayCurrencyEnumGek PayCurrencyEnum = "GEK" - PayCurrencyEnumGel PayCurrencyEnum = "GEL" - PayCurrencyEnumDem PayCurrencyEnum = "DEM" - PayCurrencyEnumGhs PayCurrencyEnum = "GHS" - PayCurrencyEnumGhc PayCurrencyEnum = "GHC" - PayCurrencyEnumGip PayCurrencyEnum = "GIP" - PayCurrencyEnumXau PayCurrencyEnum = "XAU" - PayCurrencyEnumGrd PayCurrencyEnum = "GRD" - PayCurrencyEnumGtq PayCurrencyEnum = "GTQ" - PayCurrencyEnumGwp PayCurrencyEnum = "GWP" - PayCurrencyEnumGnf PayCurrencyEnum = "GNF" - PayCurrencyEnumGns PayCurrencyEnum = "GNS" - PayCurrencyEnumGyd PayCurrencyEnum = "GYD" - PayCurrencyEnumHtg PayCurrencyEnum = "HTG" - PayCurrencyEnumHnl PayCurrencyEnum = "HNL" - PayCurrencyEnumHkd PayCurrencyEnum = "HKD" - PayCurrencyEnumHuf PayCurrencyEnum = "HUF" - PayCurrencyEnumImp PayCurrencyEnum = "IMP" - PayCurrencyEnumIsk PayCurrencyEnum = "ISK" - PayCurrencyEnumIsj PayCurrencyEnum = "ISJ" - PayCurrencyEnumInr PayCurrencyEnum = "INR" - PayCurrencyEnumIdr PayCurrencyEnum = "IDR" - PayCurrencyEnumIrr PayCurrencyEnum = "IRR" - PayCurrencyEnumIqd PayCurrencyEnum = "IQD" - PayCurrencyEnumIep PayCurrencyEnum = "IEP" - PayCurrencyEnumIls PayCurrencyEnum = "ILS" - PayCurrencyEnumIlp PayCurrencyEnum = "ILP" - PayCurrencyEnumIlr PayCurrencyEnum = "ILR" - PayCurrencyEnumItl PayCurrencyEnum = "ITL" - PayCurrencyEnumJmd PayCurrencyEnum = "JMD" - PayCurrencyEnumJpy PayCurrencyEnum = "JPY" - PayCurrencyEnumJod PayCurrencyEnum = "JOD" - PayCurrencyEnumKzt PayCurrencyEnum = "KZT" - PayCurrencyEnumKes PayCurrencyEnum = "KES" - PayCurrencyEnumKwd PayCurrencyEnum = "KWD" - PayCurrencyEnumKgs PayCurrencyEnum = "KGS" - PayCurrencyEnumLak PayCurrencyEnum = "LAK" - PayCurrencyEnumLvl PayCurrencyEnum = "LVL" - PayCurrencyEnumLvr PayCurrencyEnum = "LVR" - PayCurrencyEnumLbp PayCurrencyEnum = "LBP" - PayCurrencyEnumLsl PayCurrencyEnum = "LSL" - PayCurrencyEnumLrd PayCurrencyEnum = "LRD" - PayCurrencyEnumLyd PayCurrencyEnum = "LYD" - PayCurrencyEnumLtl PayCurrencyEnum = "LTL" - PayCurrencyEnumLtt PayCurrencyEnum = "LTT" - PayCurrencyEnumLul PayCurrencyEnum = "LUL" - PayCurrencyEnumLuc PayCurrencyEnum = "LUC" - PayCurrencyEnumLuf PayCurrencyEnum = "LUF" - PayCurrencyEnumMop PayCurrencyEnum = "MOP" - PayCurrencyEnumMkd PayCurrencyEnum = "MKD" - PayCurrencyEnumMkn PayCurrencyEnum = "MKN" - PayCurrencyEnumMga PayCurrencyEnum = "MGA" - PayCurrencyEnumMgf PayCurrencyEnum = "MGF" - PayCurrencyEnumMwk PayCurrencyEnum = "MWK" - PayCurrencyEnumMyr PayCurrencyEnum = "MYR" - PayCurrencyEnumMvr PayCurrencyEnum = "MVR" - PayCurrencyEnumMvp PayCurrencyEnum = "MVP" - PayCurrencyEnumMlf PayCurrencyEnum = "MLF" - PayCurrencyEnumMtl PayCurrencyEnum = "MTL" - PayCurrencyEnumMtp PayCurrencyEnum = "MTP" - PayCurrencyEnumMru PayCurrencyEnum = "MRU" - PayCurrencyEnumMro PayCurrencyEnum = "MRO" - PayCurrencyEnumMur PayCurrencyEnum = "MUR" - PayCurrencyEnumMxv PayCurrencyEnum = "MXV" - PayCurrencyEnumMxn PayCurrencyEnum = "MXN" - PayCurrencyEnumMxp PayCurrencyEnum = "MXP" - PayCurrencyEnumMdc PayCurrencyEnum = "MDC" - PayCurrencyEnumMdl PayCurrencyEnum = "MDL" - PayCurrencyEnumMcf PayCurrencyEnum = "MCF" - PayCurrencyEnumMnt PayCurrencyEnum = "MNT" - PayCurrencyEnumMad PayCurrencyEnum = "MAD" - PayCurrencyEnumMaf PayCurrencyEnum = "MAF" - PayCurrencyEnumMze PayCurrencyEnum = "MZE" - PayCurrencyEnumMzn PayCurrencyEnum = "MZN" - PayCurrencyEnumMzm PayCurrencyEnum = "MZM" - PayCurrencyEnumMmk PayCurrencyEnum = "MMK" - PayCurrencyEnumNad PayCurrencyEnum = "NAD" - PayCurrencyEnumNpr PayCurrencyEnum = "NPR" - PayCurrencyEnumAng PayCurrencyEnum = "ANG" - PayCurrencyEnumTwd PayCurrencyEnum = "TWD" - PayCurrencyEnumNzd PayCurrencyEnum = "NZD" - PayCurrencyEnumNio PayCurrencyEnum = "NIO" - PayCurrencyEnumNic PayCurrencyEnum = "NIC" - PayCurrencyEnumNgn PayCurrencyEnum = "NGN" - PayCurrencyEnumKpw PayCurrencyEnum = "KPW" - PayCurrencyEnumNok PayCurrencyEnum = "NOK" - PayCurrencyEnumOmr PayCurrencyEnum = "OMR" - PayCurrencyEnumPkr PayCurrencyEnum = "PKR" - PayCurrencyEnumXpd PayCurrencyEnum = "XPD" - PayCurrencyEnumPab PayCurrencyEnum = "PAB" - PayCurrencyEnumPgk PayCurrencyEnum = "PGK" - PayCurrencyEnumPyg PayCurrencyEnum = "PYG" - PayCurrencyEnumPei PayCurrencyEnum = "PEI" - PayCurrencyEnumPen PayCurrencyEnum = "PEN" - PayCurrencyEnumPes PayCurrencyEnum = "PES" - PayCurrencyEnumPhp PayCurrencyEnum = "PHP" - PayCurrencyEnumXpt PayCurrencyEnum = "XPT" - PayCurrencyEnumPln PayCurrencyEnum = "PLN" - PayCurrencyEnumPlz PayCurrencyEnum = "PLZ" - PayCurrencyEnumPte PayCurrencyEnum = "PTE" - PayCurrencyEnumGwe PayCurrencyEnum = "GWE" - PayCurrencyEnumQar PayCurrencyEnum = "QAR" - PayCurrencyEnumXre PayCurrencyEnum = "XRE" - PayCurrencyEnumRhd PayCurrencyEnum = "RHD" - PayCurrencyEnumRon PayCurrencyEnum = "RON" - PayCurrencyEnumRol PayCurrencyEnum = "ROL" - PayCurrencyEnumRub PayCurrencyEnum = "RUB" - PayCurrencyEnumRur PayCurrencyEnum = "RUR" - PayCurrencyEnumRwf PayCurrencyEnum = "RWF" - PayCurrencyEnumSvc PayCurrencyEnum = "SVC" - PayCurrencyEnumWst PayCurrencyEnum = "WST" - PayCurrencyEnumSar PayCurrencyEnum = "SAR" - PayCurrencyEnumRsd PayCurrencyEnum = "RSD" - PayCurrencyEnumCsd PayCurrencyEnum = "CSD" - PayCurrencyEnumScr PayCurrencyEnum = "SCR" - PayCurrencyEnumSll PayCurrencyEnum = "SLL" - PayCurrencyEnumXag PayCurrencyEnum = "XAG" - PayCurrencyEnumSgd PayCurrencyEnum = "SGD" - PayCurrencyEnumSkk PayCurrencyEnum = "SKK" - PayCurrencyEnumSit PayCurrencyEnum = "SIT" - PayCurrencyEnumSbd PayCurrencyEnum = "SBD" - PayCurrencyEnumSos PayCurrencyEnum = "SOS" - PayCurrencyEnumZar PayCurrencyEnum = "ZAR" - PayCurrencyEnumZal PayCurrencyEnum = "ZAL" - PayCurrencyEnumKrh PayCurrencyEnum = "KRH" - PayCurrencyEnumKrw PayCurrencyEnum = "KRW" - PayCurrencyEnumKro PayCurrencyEnum = "KRO" - PayCurrencyEnumSsp PayCurrencyEnum = "SSP" - PayCurrencyEnumSur PayCurrencyEnum = "SUR" - PayCurrencyEnumEsp PayCurrencyEnum = "ESP" - PayCurrencyEnumEsa PayCurrencyEnum = "ESA" - PayCurrencyEnumEsb PayCurrencyEnum = "ESB" - PayCurrencyEnumXdr PayCurrencyEnum = "XDR" - PayCurrencyEnumLkr PayCurrencyEnum = "LKR" - PayCurrencyEnumShp PayCurrencyEnum = "SHP" - PayCurrencyEnumXsu PayCurrencyEnum = "XSU" - PayCurrencyEnumSdd PayCurrencyEnum = "SDD" - PayCurrencyEnumSdg PayCurrencyEnum = "SDG" - PayCurrencyEnumSdp PayCurrencyEnum = "SDP" - PayCurrencyEnumSrd PayCurrencyEnum = "SRD" - PayCurrencyEnumSrg PayCurrencyEnum = "SRG" - PayCurrencyEnumSzl PayCurrencyEnum = "SZL" - PayCurrencyEnumSek PayCurrencyEnum = "SEK" - PayCurrencyEnumChf PayCurrencyEnum = "CHF" - PayCurrencyEnumSyp PayCurrencyEnum = "SYP" - PayCurrencyEnumStn PayCurrencyEnum = "STN" - PayCurrencyEnumStd PayCurrencyEnum = "STD" - PayCurrencyEnumTvd PayCurrencyEnum = "TVD" - PayCurrencyEnumTjr PayCurrencyEnum = "TJR" - PayCurrencyEnumTjs PayCurrencyEnum = "TJS" - PayCurrencyEnumTzs PayCurrencyEnum = "TZS" - PayCurrencyEnumXts PayCurrencyEnum = "XTS" - PayCurrencyEnumThb PayCurrencyEnum = "THB" - PayCurrencyEnumXxx PayCurrencyEnum = "XXX" - PayCurrencyEnumTpe PayCurrencyEnum = "TPE" - PayCurrencyEnumTop PayCurrencyEnum = "TOP" - PayCurrencyEnumTtd PayCurrencyEnum = "TTD" - PayCurrencyEnumTnd PayCurrencyEnum = "TND" - PayCurrencyEnumTry PayCurrencyEnum = "TRY" - PayCurrencyEnumTrl PayCurrencyEnum = "TRL" - PayCurrencyEnumTmt PayCurrencyEnum = "TMT" - PayCurrencyEnumTmm PayCurrencyEnum = "TMM" - PayCurrencyEnumUsd PayCurrencyEnum = "USD" - PayCurrencyEnumUsn PayCurrencyEnum = "USN" - PayCurrencyEnumUss PayCurrencyEnum = "USS" - PayCurrencyEnumUgx PayCurrencyEnum = "UGX" - PayCurrencyEnumUgs PayCurrencyEnum = "UGS" - PayCurrencyEnumUah PayCurrencyEnum = "UAH" - PayCurrencyEnumUak PayCurrencyEnum = "UAK" - PayCurrencyEnumAed PayCurrencyEnum = "AED" - PayCurrencyEnumUyw PayCurrencyEnum = "UYW" - PayCurrencyEnumUyu PayCurrencyEnum = "UYU" - PayCurrencyEnumUyp PayCurrencyEnum = "UYP" - PayCurrencyEnumUyi PayCurrencyEnum = "UYI" - PayCurrencyEnumUzs PayCurrencyEnum = "UZS" - PayCurrencyEnumVuv PayCurrencyEnum = "VUV" - PayCurrencyEnumVes PayCurrencyEnum = "VES" - PayCurrencyEnumVeb PayCurrencyEnum = "VEB" - PayCurrencyEnumVef PayCurrencyEnum = "VEF" - PayCurrencyEnumVnd PayCurrencyEnum = "VND" - PayCurrencyEnumVnn PayCurrencyEnum = "VNN" - PayCurrencyEnumChe PayCurrencyEnum = "CHE" - PayCurrencyEnumChw PayCurrencyEnum = "CHW" - PayCurrencyEnumXof PayCurrencyEnum = "XOF" - PayCurrencyEnumYdd PayCurrencyEnum = "YDD" - PayCurrencyEnumYer PayCurrencyEnum = "YER" - PayCurrencyEnumYun PayCurrencyEnum = "YUN" - PayCurrencyEnumYud PayCurrencyEnum = "YUD" - PayCurrencyEnumYum PayCurrencyEnum = "YUM" - PayCurrencyEnumYur PayCurrencyEnum = "YUR" - PayCurrencyEnumZwn PayCurrencyEnum = "ZWN" - PayCurrencyEnumZrn PayCurrencyEnum = "ZRN" - PayCurrencyEnumZrz PayCurrencyEnum = "ZRZ" - PayCurrencyEnumZmw PayCurrencyEnum = "ZMW" - PayCurrencyEnumZmk PayCurrencyEnum = "ZMK" - PayCurrencyEnumZwd PayCurrencyEnum = "ZWD" - PayCurrencyEnumZwr PayCurrencyEnum = "ZWR" - PayCurrencyEnumZwl PayCurrencyEnum = "ZWL" -) - -func NewPayCurrencyEnumFromString(s string) (PayCurrencyEnum, error) { - switch s { - case "XUA": - return PayCurrencyEnumXua, nil - case "AFN": - return PayCurrencyEnumAfn, nil - case "AFA": - return PayCurrencyEnumAfa, nil - case "ALL": - return PayCurrencyEnumAll, nil - case "ALK": - return PayCurrencyEnumAlk, nil - case "DZD": - return PayCurrencyEnumDzd, nil - case "ADP": - return PayCurrencyEnumAdp, nil - case "AOA": - return PayCurrencyEnumAoa, nil - case "AOK": - return PayCurrencyEnumAok, nil - case "AON": - return PayCurrencyEnumAon, nil - case "AOR": - return PayCurrencyEnumAor, nil - case "ARA": - return PayCurrencyEnumAra, nil - case "ARS": - return PayCurrencyEnumArs, nil - case "ARM": - return PayCurrencyEnumArm, nil - case "ARP": - return PayCurrencyEnumArp, nil - case "ARL": - return PayCurrencyEnumArl, nil - case "AMD": - return PayCurrencyEnumAmd, nil - case "AWG": - return PayCurrencyEnumAwg, nil - case "AUD": - return PayCurrencyEnumAud, nil - case "ATS": - return PayCurrencyEnumAts, nil - case "AZN": - return PayCurrencyEnumAzn, nil - case "AZM": - return PayCurrencyEnumAzm, nil - case "BSD": - return PayCurrencyEnumBsd, nil - case "BHD": - return PayCurrencyEnumBhd, nil - case "BDT": - return PayCurrencyEnumBdt, nil - case "BBD": - return PayCurrencyEnumBbd, nil - case "BYN": - return PayCurrencyEnumByn, nil - case "BYB": - return PayCurrencyEnumByb, nil - case "BYR": - return PayCurrencyEnumByr, nil - case "BEF": - return PayCurrencyEnumBef, nil - case "BEC": - return PayCurrencyEnumBec, nil - case "BEL": - return PayCurrencyEnumBel, nil - case "BZD": - return PayCurrencyEnumBzd, nil - case "BMD": - return PayCurrencyEnumBmd, nil - case "BTN": - return PayCurrencyEnumBtn, nil - case "BOB": - return PayCurrencyEnumBob, nil - case "BOL": - return PayCurrencyEnumBol, nil - case "BOV": - return PayCurrencyEnumBov, nil - case "BOP": - return PayCurrencyEnumBop, nil - case "BAM": - return PayCurrencyEnumBam, nil - case "BAD": - return PayCurrencyEnumBad, nil - case "BAN": - return PayCurrencyEnumBan, nil - case "BWP": - return PayCurrencyEnumBwp, nil - case "BRC": - return PayCurrencyEnumBrc, nil - case "BRZ": - return PayCurrencyEnumBrz, nil - case "BRE": - return PayCurrencyEnumBre, nil - case "BRR": - return PayCurrencyEnumBrr, nil - case "BRN": - return PayCurrencyEnumBrn, nil - case "BRB": - return PayCurrencyEnumBrb, nil - case "BRL": - return PayCurrencyEnumBrl, nil - case "GBP": - return PayCurrencyEnumGbp, nil - case "BND": - return PayCurrencyEnumBnd, nil - case "BGL": - return PayCurrencyEnumBgl, nil - case "BGN": - return PayCurrencyEnumBgn, nil - case "BGO": - return PayCurrencyEnumBgo, nil - case "BGM": - return PayCurrencyEnumBgm, nil - case "BUK": - return PayCurrencyEnumBuk, nil - case "BIF": - return PayCurrencyEnumBif, nil - case "XPF": - return PayCurrencyEnumXpf, nil - case "KHR": - return PayCurrencyEnumKhr, nil - case "CAD": - return PayCurrencyEnumCad, nil - case "CVE": - return PayCurrencyEnumCve, nil - case "KYD": - return PayCurrencyEnumKyd, nil - case "XAF": - return PayCurrencyEnumXaf, nil - case "CLE": - return PayCurrencyEnumCle, nil - case "CLP": - return PayCurrencyEnumClp, nil - case "CLF": - return PayCurrencyEnumClf, nil - case "CNX": - return PayCurrencyEnumCnx, nil - case "CNY": - return PayCurrencyEnumCny, nil - case "CNH": - return PayCurrencyEnumCnh, nil - case "COP": - return PayCurrencyEnumCop, nil - case "COU": - return PayCurrencyEnumCou, nil - case "KMF": - return PayCurrencyEnumKmf, nil - case "CDF": - return PayCurrencyEnumCdf, nil - case "CRC": - return PayCurrencyEnumCrc, nil - case "HRD": - return PayCurrencyEnumHrd, nil - case "HRK": - return PayCurrencyEnumHrk, nil - case "CUC": - return PayCurrencyEnumCuc, nil - case "CUP": - return PayCurrencyEnumCup, nil - case "CYP": - return PayCurrencyEnumCyp, nil - case "CZK": - return PayCurrencyEnumCzk, nil - case "CSK": - return PayCurrencyEnumCsk, nil - case "DKK": - return PayCurrencyEnumDkk, nil - case "DJF": - return PayCurrencyEnumDjf, nil - case "DOP": - return PayCurrencyEnumDop, nil - case "NLG": - return PayCurrencyEnumNlg, nil - case "XCD": - return PayCurrencyEnumXcd, nil - case "DDM": - return PayCurrencyEnumDdm, nil - case "ECS": - return PayCurrencyEnumEcs, nil - case "ECV": - return PayCurrencyEnumEcv, nil - case "EGP": - return PayCurrencyEnumEgp, nil - case "GQE": - return PayCurrencyEnumGqe, nil - case "ERN": - return PayCurrencyEnumErn, nil - case "EEK": - return PayCurrencyEnumEek, nil - case "ETB": - return PayCurrencyEnumEtb, nil - case "EUR": - return PayCurrencyEnumEur, nil - case "XBA": - return PayCurrencyEnumXba, nil - case "XEU": - return PayCurrencyEnumXeu, nil - case "XBB": - return PayCurrencyEnumXbb, nil - case "XBC": - return PayCurrencyEnumXbc, nil - case "XBD": - return PayCurrencyEnumXbd, nil - case "FKP": - return PayCurrencyEnumFkp, nil - case "FJD": - return PayCurrencyEnumFjd, nil - case "FIM": - return PayCurrencyEnumFim, nil - case "FRF": - return PayCurrencyEnumFrf, nil - case "XFO": - return PayCurrencyEnumXfo, nil - case "XFU": - return PayCurrencyEnumXfu, nil - case "GMD": - return PayCurrencyEnumGmd, nil - case "GEK": - return PayCurrencyEnumGek, nil - case "GEL": - return PayCurrencyEnumGel, nil - case "DEM": - return PayCurrencyEnumDem, nil - case "GHS": - return PayCurrencyEnumGhs, nil - case "GHC": - return PayCurrencyEnumGhc, nil - case "GIP": - return PayCurrencyEnumGip, nil - case "XAU": - return PayCurrencyEnumXau, nil - case "GRD": - return PayCurrencyEnumGrd, nil - case "GTQ": - return PayCurrencyEnumGtq, nil - case "GWP": - return PayCurrencyEnumGwp, nil - case "GNF": - return PayCurrencyEnumGnf, nil - case "GNS": - return PayCurrencyEnumGns, nil - case "GYD": - return PayCurrencyEnumGyd, nil - case "HTG": - return PayCurrencyEnumHtg, nil - case "HNL": - return PayCurrencyEnumHnl, nil - case "HKD": - return PayCurrencyEnumHkd, nil - case "HUF": - return PayCurrencyEnumHuf, nil - case "IMP": - return PayCurrencyEnumImp, nil - case "ISK": - return PayCurrencyEnumIsk, nil - case "ISJ": - return PayCurrencyEnumIsj, nil - case "INR": - return PayCurrencyEnumInr, nil - case "IDR": - return PayCurrencyEnumIdr, nil - case "IRR": - return PayCurrencyEnumIrr, nil - case "IQD": - return PayCurrencyEnumIqd, nil - case "IEP": - return PayCurrencyEnumIep, nil - case "ILS": - return PayCurrencyEnumIls, nil - case "ILP": - return PayCurrencyEnumIlp, nil - case "ILR": - return PayCurrencyEnumIlr, nil - case "ITL": - return PayCurrencyEnumItl, nil - case "JMD": - return PayCurrencyEnumJmd, nil - case "JPY": - return PayCurrencyEnumJpy, nil - case "JOD": - return PayCurrencyEnumJod, nil - case "KZT": - return PayCurrencyEnumKzt, nil - case "KES": - return PayCurrencyEnumKes, nil - case "KWD": - return PayCurrencyEnumKwd, nil - case "KGS": - return PayCurrencyEnumKgs, nil - case "LAK": - return PayCurrencyEnumLak, nil - case "LVL": - return PayCurrencyEnumLvl, nil - case "LVR": - return PayCurrencyEnumLvr, nil - case "LBP": - return PayCurrencyEnumLbp, nil - case "LSL": - return PayCurrencyEnumLsl, nil - case "LRD": - return PayCurrencyEnumLrd, nil - case "LYD": - return PayCurrencyEnumLyd, nil - case "LTL": - return PayCurrencyEnumLtl, nil - case "LTT": - return PayCurrencyEnumLtt, nil - case "LUL": - return PayCurrencyEnumLul, nil - case "LUC": - return PayCurrencyEnumLuc, nil - case "LUF": - return PayCurrencyEnumLuf, nil - case "MOP": - return PayCurrencyEnumMop, nil - case "MKD": - return PayCurrencyEnumMkd, nil - case "MKN": - return PayCurrencyEnumMkn, nil - case "MGA": - return PayCurrencyEnumMga, nil - case "MGF": - return PayCurrencyEnumMgf, nil - case "MWK": - return PayCurrencyEnumMwk, nil - case "MYR": - return PayCurrencyEnumMyr, nil - case "MVR": - return PayCurrencyEnumMvr, nil - case "MVP": - return PayCurrencyEnumMvp, nil - case "MLF": - return PayCurrencyEnumMlf, nil - case "MTL": - return PayCurrencyEnumMtl, nil - case "MTP": - return PayCurrencyEnumMtp, nil - case "MRU": - return PayCurrencyEnumMru, nil - case "MRO": - return PayCurrencyEnumMro, nil - case "MUR": - return PayCurrencyEnumMur, nil - case "MXV": - return PayCurrencyEnumMxv, nil - case "MXN": - return PayCurrencyEnumMxn, nil - case "MXP": - return PayCurrencyEnumMxp, nil - case "MDC": - return PayCurrencyEnumMdc, nil - case "MDL": - return PayCurrencyEnumMdl, nil - case "MCF": - return PayCurrencyEnumMcf, nil - case "MNT": - return PayCurrencyEnumMnt, nil - case "MAD": - return PayCurrencyEnumMad, nil - case "MAF": - return PayCurrencyEnumMaf, nil - case "MZE": - return PayCurrencyEnumMze, nil - case "MZN": - return PayCurrencyEnumMzn, nil - case "MZM": - return PayCurrencyEnumMzm, nil - case "MMK": - return PayCurrencyEnumMmk, nil - case "NAD": - return PayCurrencyEnumNad, nil - case "NPR": - return PayCurrencyEnumNpr, nil - case "ANG": - return PayCurrencyEnumAng, nil - case "TWD": - return PayCurrencyEnumTwd, nil - case "NZD": - return PayCurrencyEnumNzd, nil - case "NIO": - return PayCurrencyEnumNio, nil - case "NIC": - return PayCurrencyEnumNic, nil - case "NGN": - return PayCurrencyEnumNgn, nil - case "KPW": - return PayCurrencyEnumKpw, nil - case "NOK": - return PayCurrencyEnumNok, nil - case "OMR": - return PayCurrencyEnumOmr, nil - case "PKR": - return PayCurrencyEnumPkr, nil - case "XPD": - return PayCurrencyEnumXpd, nil - case "PAB": - return PayCurrencyEnumPab, nil - case "PGK": - return PayCurrencyEnumPgk, nil - case "PYG": - return PayCurrencyEnumPyg, nil - case "PEI": - return PayCurrencyEnumPei, nil - case "PEN": - return PayCurrencyEnumPen, nil - case "PES": - return PayCurrencyEnumPes, nil - case "PHP": - return PayCurrencyEnumPhp, nil - case "XPT": - return PayCurrencyEnumXpt, nil - case "PLN": - return PayCurrencyEnumPln, nil - case "PLZ": - return PayCurrencyEnumPlz, nil - case "PTE": - return PayCurrencyEnumPte, nil - case "GWE": - return PayCurrencyEnumGwe, nil - case "QAR": - return PayCurrencyEnumQar, nil - case "XRE": - return PayCurrencyEnumXre, nil - case "RHD": - return PayCurrencyEnumRhd, nil - case "RON": - return PayCurrencyEnumRon, nil - case "ROL": - return PayCurrencyEnumRol, nil - case "RUB": - return PayCurrencyEnumRub, nil - case "RUR": - return PayCurrencyEnumRur, nil - case "RWF": - return PayCurrencyEnumRwf, nil - case "SVC": - return PayCurrencyEnumSvc, nil - case "WST": - return PayCurrencyEnumWst, nil - case "SAR": - return PayCurrencyEnumSar, nil - case "RSD": - return PayCurrencyEnumRsd, nil - case "CSD": - return PayCurrencyEnumCsd, nil - case "SCR": - return PayCurrencyEnumScr, nil - case "SLL": - return PayCurrencyEnumSll, nil - case "XAG": - return PayCurrencyEnumXag, nil - case "SGD": - return PayCurrencyEnumSgd, nil - case "SKK": - return PayCurrencyEnumSkk, nil - case "SIT": - return PayCurrencyEnumSit, nil - case "SBD": - return PayCurrencyEnumSbd, nil - case "SOS": - return PayCurrencyEnumSos, nil - case "ZAR": - return PayCurrencyEnumZar, nil - case "ZAL": - return PayCurrencyEnumZal, nil - case "KRH": - return PayCurrencyEnumKrh, nil - case "KRW": - return PayCurrencyEnumKrw, nil - case "KRO": - return PayCurrencyEnumKro, nil - case "SSP": - return PayCurrencyEnumSsp, nil - case "SUR": - return PayCurrencyEnumSur, nil - case "ESP": - return PayCurrencyEnumEsp, nil - case "ESA": - return PayCurrencyEnumEsa, nil - case "ESB": - return PayCurrencyEnumEsb, nil - case "XDR": - return PayCurrencyEnumXdr, nil - case "LKR": - return PayCurrencyEnumLkr, nil - case "SHP": - return PayCurrencyEnumShp, nil - case "XSU": - return PayCurrencyEnumXsu, nil - case "SDD": - return PayCurrencyEnumSdd, nil - case "SDG": - return PayCurrencyEnumSdg, nil - case "SDP": - return PayCurrencyEnumSdp, nil - case "SRD": - return PayCurrencyEnumSrd, nil - case "SRG": - return PayCurrencyEnumSrg, nil - case "SZL": - return PayCurrencyEnumSzl, nil - case "SEK": - return PayCurrencyEnumSek, nil - case "CHF": - return PayCurrencyEnumChf, nil - case "SYP": - return PayCurrencyEnumSyp, nil - case "STN": - return PayCurrencyEnumStn, nil - case "STD": - return PayCurrencyEnumStd, nil - case "TVD": - return PayCurrencyEnumTvd, nil - case "TJR": - return PayCurrencyEnumTjr, nil - case "TJS": - return PayCurrencyEnumTjs, nil - case "TZS": - return PayCurrencyEnumTzs, nil - case "XTS": - return PayCurrencyEnumXts, nil - case "THB": - return PayCurrencyEnumThb, nil - case "XXX": - return PayCurrencyEnumXxx, nil - case "TPE": - return PayCurrencyEnumTpe, nil - case "TOP": - return PayCurrencyEnumTop, nil - case "TTD": - return PayCurrencyEnumTtd, nil - case "TND": - return PayCurrencyEnumTnd, nil - case "TRY": - return PayCurrencyEnumTry, nil - case "TRL": - return PayCurrencyEnumTrl, nil - case "TMT": - return PayCurrencyEnumTmt, nil - case "TMM": - return PayCurrencyEnumTmm, nil - case "USD": - return PayCurrencyEnumUsd, nil - case "USN": - return PayCurrencyEnumUsn, nil - case "USS": - return PayCurrencyEnumUss, nil - case "UGX": - return PayCurrencyEnumUgx, nil - case "UGS": - return PayCurrencyEnumUgs, nil - case "UAH": - return PayCurrencyEnumUah, nil - case "UAK": - return PayCurrencyEnumUak, nil - case "AED": - return PayCurrencyEnumAed, nil - case "UYW": - return PayCurrencyEnumUyw, nil - case "UYU": - return PayCurrencyEnumUyu, nil - case "UYP": - return PayCurrencyEnumUyp, nil - case "UYI": - return PayCurrencyEnumUyi, nil - case "UZS": - return PayCurrencyEnumUzs, nil - case "VUV": - return PayCurrencyEnumVuv, nil - case "VES": - return PayCurrencyEnumVes, nil - case "VEB": - return PayCurrencyEnumVeb, nil - case "VEF": - return PayCurrencyEnumVef, nil - case "VND": - return PayCurrencyEnumVnd, nil - case "VNN": - return PayCurrencyEnumVnn, nil - case "CHE": - return PayCurrencyEnumChe, nil - case "CHW": - return PayCurrencyEnumChw, nil - case "XOF": - return PayCurrencyEnumXof, nil - case "YDD": - return PayCurrencyEnumYdd, nil - case "YER": - return PayCurrencyEnumYer, nil - case "YUN": - return PayCurrencyEnumYun, nil - case "YUD": - return PayCurrencyEnumYud, nil - case "YUM": - return PayCurrencyEnumYum, nil - case "YUR": - return PayCurrencyEnumYur, nil - case "ZWN": - return PayCurrencyEnumZwn, nil - case "ZRN": - return PayCurrencyEnumZrn, nil - case "ZRZ": - return PayCurrencyEnumZrz, nil - case "ZMW": - return PayCurrencyEnumZmw, nil - case "ZMK": - return PayCurrencyEnumZmk, nil - case "ZWD": - return PayCurrencyEnumZwd, nil - case "ZWR": - return PayCurrencyEnumZwr, nil - case "ZWL": - return PayCurrencyEnumZwl, nil - } - var t PayCurrencyEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (p PayCurrencyEnum) Ptr() *PayCurrencyEnum { - return &p -} - -// - `WEEKLY` - WEEKLY -// - `BIWEEKLY` - BIWEEKLY -// - `MONTHLY` - MONTHLY -// - `QUARTERLY` - QUARTERLY -// - `SEMIANNUALLY` - SEMIANNUALLY -// - `ANNUALLY` - ANNUALLY -// - `THIRTEEN-MONTHLY` - THIRTEEN-MONTHLY -// - `PRO_RATA` - PRO_RATA -// - `SEMIMONTHLY` - SEMIMONTHLY -type PayFrequencyEnum string - -const ( - PayFrequencyEnumWeekly PayFrequencyEnum = "WEEKLY" - PayFrequencyEnumBiweekly PayFrequencyEnum = "BIWEEKLY" - PayFrequencyEnumMonthly PayFrequencyEnum = "MONTHLY" - PayFrequencyEnumQuarterly PayFrequencyEnum = "QUARTERLY" - PayFrequencyEnumSemiannually PayFrequencyEnum = "SEMIANNUALLY" - PayFrequencyEnumAnnually PayFrequencyEnum = "ANNUALLY" - PayFrequencyEnumThirteenMonthly PayFrequencyEnum = "THIRTEEN-MONTHLY" - PayFrequencyEnumProRata PayFrequencyEnum = "PRO_RATA" - PayFrequencyEnumSemimonthly PayFrequencyEnum = "SEMIMONTHLY" -) - -func NewPayFrequencyEnumFromString(s string) (PayFrequencyEnum, error) { - switch s { - case "WEEKLY": - return PayFrequencyEnumWeekly, nil - case "BIWEEKLY": - return PayFrequencyEnumBiweekly, nil - case "MONTHLY": - return PayFrequencyEnumMonthly, nil - case "QUARTERLY": - return PayFrequencyEnumQuarterly, nil - case "SEMIANNUALLY": - return PayFrequencyEnumSemiannually, nil - case "ANNUALLY": - return PayFrequencyEnumAnnually, nil - case "THIRTEEN-MONTHLY": - return PayFrequencyEnumThirteenMonthly, nil - case "PRO_RATA": - return PayFrequencyEnumProRata, nil - case "SEMIMONTHLY": - return PayFrequencyEnumSemimonthly, nil - } - var t PayFrequencyEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (p PayFrequencyEnum) Ptr() *PayFrequencyEnum { - return &p -} - -// # The PayGroup Object -// -// ### Description -// -// The `PayGroup` object is used to represent a subset of employees that are put together for payroll processing purposes. -// -// ### Usage Example -// -// Fetch from the `LIST PayGroup` endpoint and filter by `ID` to show all pay group information. -type PayGroup struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The pay group name. - PayGroupName *string `json:"pay_group_name,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` - - _rawJSON json.RawMessage -} - -func (p *PayGroup) UnmarshalJSON(data []byte) error { - type unmarshaler PayGroup - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *p = PayGroup(value) - p._rawJSON = json.RawMessage(data) - return nil -} - -func (p *PayGroup) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) -} - -// - `HOUR` - HOUR -// - `DAY` - DAY -// - `WEEK` - WEEK -// - `EVERY_TWO_WEEKS` - EVERY_TWO_WEEKS -// - `SEMIMONTHLY` - SEMIMONTHLY -// - `MONTH` - MONTH -// - `QUARTER` - QUARTER -// - `EVERY_SIX_MONTHS` - EVERY_SIX_MONTHS -// - `YEAR` - YEAR -type PayPeriodEnum string - -const ( - PayPeriodEnumHour PayPeriodEnum = "HOUR" - PayPeriodEnumDay PayPeriodEnum = "DAY" - PayPeriodEnumWeek PayPeriodEnum = "WEEK" - PayPeriodEnumEveryTwoWeeks PayPeriodEnum = "EVERY_TWO_WEEKS" - PayPeriodEnumSemimonthly PayPeriodEnum = "SEMIMONTHLY" - PayPeriodEnumMonth PayPeriodEnum = "MONTH" - PayPeriodEnumQuarter PayPeriodEnum = "QUARTER" - PayPeriodEnumEverySixMonths PayPeriodEnum = "EVERY_SIX_MONTHS" - PayPeriodEnumYear PayPeriodEnum = "YEAR" + PayCurrencyEnumXua PayCurrencyEnum = "XUA" + PayCurrencyEnumAfn PayCurrencyEnum = "AFN" + PayCurrencyEnumAfa PayCurrencyEnum = "AFA" + PayCurrencyEnumAll PayCurrencyEnum = "ALL" + PayCurrencyEnumAlk PayCurrencyEnum = "ALK" + PayCurrencyEnumDzd PayCurrencyEnum = "DZD" + PayCurrencyEnumAdp PayCurrencyEnum = "ADP" + PayCurrencyEnumAoa PayCurrencyEnum = "AOA" + PayCurrencyEnumAok PayCurrencyEnum = "AOK" + PayCurrencyEnumAon PayCurrencyEnum = "AON" + PayCurrencyEnumAor PayCurrencyEnum = "AOR" + PayCurrencyEnumAra PayCurrencyEnum = "ARA" + PayCurrencyEnumArs PayCurrencyEnum = "ARS" + PayCurrencyEnumArm PayCurrencyEnum = "ARM" + PayCurrencyEnumArp PayCurrencyEnum = "ARP" + PayCurrencyEnumArl PayCurrencyEnum = "ARL" + PayCurrencyEnumAmd PayCurrencyEnum = "AMD" + PayCurrencyEnumAwg PayCurrencyEnum = "AWG" + PayCurrencyEnumAud PayCurrencyEnum = "AUD" + PayCurrencyEnumAts PayCurrencyEnum = "ATS" + PayCurrencyEnumAzn PayCurrencyEnum = "AZN" + PayCurrencyEnumAzm PayCurrencyEnum = "AZM" + PayCurrencyEnumBsd PayCurrencyEnum = "BSD" + PayCurrencyEnumBhd PayCurrencyEnum = "BHD" + PayCurrencyEnumBdt PayCurrencyEnum = "BDT" + PayCurrencyEnumBbd PayCurrencyEnum = "BBD" + PayCurrencyEnumByn PayCurrencyEnum = "BYN" + PayCurrencyEnumByb PayCurrencyEnum = "BYB" + PayCurrencyEnumByr PayCurrencyEnum = "BYR" + PayCurrencyEnumBef PayCurrencyEnum = "BEF" + PayCurrencyEnumBec PayCurrencyEnum = "BEC" + PayCurrencyEnumBel PayCurrencyEnum = "BEL" + PayCurrencyEnumBzd PayCurrencyEnum = "BZD" + PayCurrencyEnumBmd PayCurrencyEnum = "BMD" + PayCurrencyEnumBtn PayCurrencyEnum = "BTN" + PayCurrencyEnumBob PayCurrencyEnum = "BOB" + PayCurrencyEnumBol PayCurrencyEnum = "BOL" + PayCurrencyEnumBov PayCurrencyEnum = "BOV" + PayCurrencyEnumBop PayCurrencyEnum = "BOP" + PayCurrencyEnumBam PayCurrencyEnum = "BAM" + PayCurrencyEnumBad PayCurrencyEnum = "BAD" + PayCurrencyEnumBan PayCurrencyEnum = "BAN" + PayCurrencyEnumBwp PayCurrencyEnum = "BWP" + PayCurrencyEnumBrc PayCurrencyEnum = "BRC" + PayCurrencyEnumBrz PayCurrencyEnum = "BRZ" + PayCurrencyEnumBre PayCurrencyEnum = "BRE" + PayCurrencyEnumBrr PayCurrencyEnum = "BRR" + PayCurrencyEnumBrn PayCurrencyEnum = "BRN" + PayCurrencyEnumBrb PayCurrencyEnum = "BRB" + PayCurrencyEnumBrl PayCurrencyEnum = "BRL" + PayCurrencyEnumGbp PayCurrencyEnum = "GBP" + PayCurrencyEnumBnd PayCurrencyEnum = "BND" + PayCurrencyEnumBgl PayCurrencyEnum = "BGL" + PayCurrencyEnumBgn PayCurrencyEnum = "BGN" + PayCurrencyEnumBgo PayCurrencyEnum = "BGO" + PayCurrencyEnumBgm PayCurrencyEnum = "BGM" + PayCurrencyEnumBuk PayCurrencyEnum = "BUK" + PayCurrencyEnumBif PayCurrencyEnum = "BIF" + PayCurrencyEnumXpf PayCurrencyEnum = "XPF" + PayCurrencyEnumKhr PayCurrencyEnum = "KHR" + PayCurrencyEnumCad PayCurrencyEnum = "CAD" + PayCurrencyEnumCve PayCurrencyEnum = "CVE" + PayCurrencyEnumKyd PayCurrencyEnum = "KYD" + PayCurrencyEnumXaf PayCurrencyEnum = "XAF" + PayCurrencyEnumCle PayCurrencyEnum = "CLE" + PayCurrencyEnumClp PayCurrencyEnum = "CLP" + PayCurrencyEnumClf PayCurrencyEnum = "CLF" + PayCurrencyEnumCnx PayCurrencyEnum = "CNX" + PayCurrencyEnumCny PayCurrencyEnum = "CNY" + PayCurrencyEnumCnh PayCurrencyEnum = "CNH" + PayCurrencyEnumCop PayCurrencyEnum = "COP" + PayCurrencyEnumCou PayCurrencyEnum = "COU" + PayCurrencyEnumKmf PayCurrencyEnum = "KMF" + PayCurrencyEnumCdf PayCurrencyEnum = "CDF" + PayCurrencyEnumCrc PayCurrencyEnum = "CRC" + PayCurrencyEnumHrd PayCurrencyEnum = "HRD" + PayCurrencyEnumHrk PayCurrencyEnum = "HRK" + PayCurrencyEnumCuc PayCurrencyEnum = "CUC" + PayCurrencyEnumCup PayCurrencyEnum = "CUP" + PayCurrencyEnumCyp PayCurrencyEnum = "CYP" + PayCurrencyEnumCzk PayCurrencyEnum = "CZK" + PayCurrencyEnumCsk PayCurrencyEnum = "CSK" + PayCurrencyEnumDkk PayCurrencyEnum = "DKK" + PayCurrencyEnumDjf PayCurrencyEnum = "DJF" + PayCurrencyEnumDop PayCurrencyEnum = "DOP" + PayCurrencyEnumNlg PayCurrencyEnum = "NLG" + PayCurrencyEnumXcd PayCurrencyEnum = "XCD" + PayCurrencyEnumDdm PayCurrencyEnum = "DDM" + PayCurrencyEnumEcs PayCurrencyEnum = "ECS" + PayCurrencyEnumEcv PayCurrencyEnum = "ECV" + PayCurrencyEnumEgp PayCurrencyEnum = "EGP" + PayCurrencyEnumGqe PayCurrencyEnum = "GQE" + PayCurrencyEnumErn PayCurrencyEnum = "ERN" + PayCurrencyEnumEek PayCurrencyEnum = "EEK" + PayCurrencyEnumEtb PayCurrencyEnum = "ETB" + PayCurrencyEnumEur PayCurrencyEnum = "EUR" + PayCurrencyEnumXba PayCurrencyEnum = "XBA" + PayCurrencyEnumXeu PayCurrencyEnum = "XEU" + PayCurrencyEnumXbb PayCurrencyEnum = "XBB" + PayCurrencyEnumXbc PayCurrencyEnum = "XBC" + PayCurrencyEnumXbd PayCurrencyEnum = "XBD" + PayCurrencyEnumFkp PayCurrencyEnum = "FKP" + PayCurrencyEnumFjd PayCurrencyEnum = "FJD" + PayCurrencyEnumFim PayCurrencyEnum = "FIM" + PayCurrencyEnumFrf PayCurrencyEnum = "FRF" + PayCurrencyEnumXfo PayCurrencyEnum = "XFO" + PayCurrencyEnumXfu PayCurrencyEnum = "XFU" + PayCurrencyEnumGmd PayCurrencyEnum = "GMD" + PayCurrencyEnumGek PayCurrencyEnum = "GEK" + PayCurrencyEnumGel PayCurrencyEnum = "GEL" + PayCurrencyEnumDem PayCurrencyEnum = "DEM" + PayCurrencyEnumGhs PayCurrencyEnum = "GHS" + PayCurrencyEnumGhc PayCurrencyEnum = "GHC" + PayCurrencyEnumGip PayCurrencyEnum = "GIP" + PayCurrencyEnumXau PayCurrencyEnum = "XAU" + PayCurrencyEnumGrd PayCurrencyEnum = "GRD" + PayCurrencyEnumGtq PayCurrencyEnum = "GTQ" + PayCurrencyEnumGwp PayCurrencyEnum = "GWP" + PayCurrencyEnumGnf PayCurrencyEnum = "GNF" + PayCurrencyEnumGns PayCurrencyEnum = "GNS" + PayCurrencyEnumGyd PayCurrencyEnum = "GYD" + PayCurrencyEnumHtg PayCurrencyEnum = "HTG" + PayCurrencyEnumHnl PayCurrencyEnum = "HNL" + PayCurrencyEnumHkd PayCurrencyEnum = "HKD" + PayCurrencyEnumHuf PayCurrencyEnum = "HUF" + PayCurrencyEnumImp PayCurrencyEnum = "IMP" + PayCurrencyEnumIsk PayCurrencyEnum = "ISK" + PayCurrencyEnumIsj PayCurrencyEnum = "ISJ" + PayCurrencyEnumInr PayCurrencyEnum = "INR" + PayCurrencyEnumIdr PayCurrencyEnum = "IDR" + PayCurrencyEnumIrr PayCurrencyEnum = "IRR" + PayCurrencyEnumIqd PayCurrencyEnum = "IQD" + PayCurrencyEnumIep PayCurrencyEnum = "IEP" + PayCurrencyEnumIls PayCurrencyEnum = "ILS" + PayCurrencyEnumIlp PayCurrencyEnum = "ILP" + PayCurrencyEnumIlr PayCurrencyEnum = "ILR" + PayCurrencyEnumItl PayCurrencyEnum = "ITL" + PayCurrencyEnumJmd PayCurrencyEnum = "JMD" + PayCurrencyEnumJpy PayCurrencyEnum = "JPY" + PayCurrencyEnumJod PayCurrencyEnum = "JOD" + PayCurrencyEnumKzt PayCurrencyEnum = "KZT" + PayCurrencyEnumKes PayCurrencyEnum = "KES" + PayCurrencyEnumKwd PayCurrencyEnum = "KWD" + PayCurrencyEnumKgs PayCurrencyEnum = "KGS" + PayCurrencyEnumLak PayCurrencyEnum = "LAK" + PayCurrencyEnumLvl PayCurrencyEnum = "LVL" + PayCurrencyEnumLvr PayCurrencyEnum = "LVR" + PayCurrencyEnumLbp PayCurrencyEnum = "LBP" + PayCurrencyEnumLsl PayCurrencyEnum = "LSL" + PayCurrencyEnumLrd PayCurrencyEnum = "LRD" + PayCurrencyEnumLyd PayCurrencyEnum = "LYD" + PayCurrencyEnumLtl PayCurrencyEnum = "LTL" + PayCurrencyEnumLtt PayCurrencyEnum = "LTT" + PayCurrencyEnumLul PayCurrencyEnum = "LUL" + PayCurrencyEnumLuc PayCurrencyEnum = "LUC" + PayCurrencyEnumLuf PayCurrencyEnum = "LUF" + PayCurrencyEnumMop PayCurrencyEnum = "MOP" + PayCurrencyEnumMkd PayCurrencyEnum = "MKD" + PayCurrencyEnumMkn PayCurrencyEnum = "MKN" + PayCurrencyEnumMga PayCurrencyEnum = "MGA" + PayCurrencyEnumMgf PayCurrencyEnum = "MGF" + PayCurrencyEnumMwk PayCurrencyEnum = "MWK" + PayCurrencyEnumMyr PayCurrencyEnum = "MYR" + PayCurrencyEnumMvr PayCurrencyEnum = "MVR" + PayCurrencyEnumMvp PayCurrencyEnum = "MVP" + PayCurrencyEnumMlf PayCurrencyEnum = "MLF" + PayCurrencyEnumMtl PayCurrencyEnum = "MTL" + PayCurrencyEnumMtp PayCurrencyEnum = "MTP" + PayCurrencyEnumMru PayCurrencyEnum = "MRU" + PayCurrencyEnumMro PayCurrencyEnum = "MRO" + PayCurrencyEnumMur PayCurrencyEnum = "MUR" + PayCurrencyEnumMxv PayCurrencyEnum = "MXV" + PayCurrencyEnumMxn PayCurrencyEnum = "MXN" + PayCurrencyEnumMxp PayCurrencyEnum = "MXP" + PayCurrencyEnumMdc PayCurrencyEnum = "MDC" + PayCurrencyEnumMdl PayCurrencyEnum = "MDL" + PayCurrencyEnumMcf PayCurrencyEnum = "MCF" + PayCurrencyEnumMnt PayCurrencyEnum = "MNT" + PayCurrencyEnumMad PayCurrencyEnum = "MAD" + PayCurrencyEnumMaf PayCurrencyEnum = "MAF" + PayCurrencyEnumMze PayCurrencyEnum = "MZE" + PayCurrencyEnumMzn PayCurrencyEnum = "MZN" + PayCurrencyEnumMzm PayCurrencyEnum = "MZM" + PayCurrencyEnumMmk PayCurrencyEnum = "MMK" + PayCurrencyEnumNad PayCurrencyEnum = "NAD" + PayCurrencyEnumNpr PayCurrencyEnum = "NPR" + PayCurrencyEnumAng PayCurrencyEnum = "ANG" + PayCurrencyEnumTwd PayCurrencyEnum = "TWD" + PayCurrencyEnumNzd PayCurrencyEnum = "NZD" + PayCurrencyEnumNio PayCurrencyEnum = "NIO" + PayCurrencyEnumNic PayCurrencyEnum = "NIC" + PayCurrencyEnumNgn PayCurrencyEnum = "NGN" + PayCurrencyEnumKpw PayCurrencyEnum = "KPW" + PayCurrencyEnumNok PayCurrencyEnum = "NOK" + PayCurrencyEnumOmr PayCurrencyEnum = "OMR" + PayCurrencyEnumPkr PayCurrencyEnum = "PKR" + PayCurrencyEnumXpd PayCurrencyEnum = "XPD" + PayCurrencyEnumPab PayCurrencyEnum = "PAB" + PayCurrencyEnumPgk PayCurrencyEnum = "PGK" + PayCurrencyEnumPyg PayCurrencyEnum = "PYG" + PayCurrencyEnumPei PayCurrencyEnum = "PEI" + PayCurrencyEnumPen PayCurrencyEnum = "PEN" + PayCurrencyEnumPes PayCurrencyEnum = "PES" + PayCurrencyEnumPhp PayCurrencyEnum = "PHP" + PayCurrencyEnumXpt PayCurrencyEnum = "XPT" + PayCurrencyEnumPln PayCurrencyEnum = "PLN" + PayCurrencyEnumPlz PayCurrencyEnum = "PLZ" + PayCurrencyEnumPte PayCurrencyEnum = "PTE" + PayCurrencyEnumGwe PayCurrencyEnum = "GWE" + PayCurrencyEnumQar PayCurrencyEnum = "QAR" + PayCurrencyEnumXre PayCurrencyEnum = "XRE" + PayCurrencyEnumRhd PayCurrencyEnum = "RHD" + PayCurrencyEnumRon PayCurrencyEnum = "RON" + PayCurrencyEnumRol PayCurrencyEnum = "ROL" + PayCurrencyEnumRub PayCurrencyEnum = "RUB" + PayCurrencyEnumRur PayCurrencyEnum = "RUR" + PayCurrencyEnumRwf PayCurrencyEnum = "RWF" + PayCurrencyEnumSvc PayCurrencyEnum = "SVC" + PayCurrencyEnumWst PayCurrencyEnum = "WST" + PayCurrencyEnumSar PayCurrencyEnum = "SAR" + PayCurrencyEnumRsd PayCurrencyEnum = "RSD" + PayCurrencyEnumCsd PayCurrencyEnum = "CSD" + PayCurrencyEnumScr PayCurrencyEnum = "SCR" + PayCurrencyEnumSll PayCurrencyEnum = "SLL" + PayCurrencyEnumXag PayCurrencyEnum = "XAG" + PayCurrencyEnumSgd PayCurrencyEnum = "SGD" + PayCurrencyEnumSkk PayCurrencyEnum = "SKK" + PayCurrencyEnumSit PayCurrencyEnum = "SIT" + PayCurrencyEnumSbd PayCurrencyEnum = "SBD" + PayCurrencyEnumSos PayCurrencyEnum = "SOS" + PayCurrencyEnumZar PayCurrencyEnum = "ZAR" + PayCurrencyEnumZal PayCurrencyEnum = "ZAL" + PayCurrencyEnumKrh PayCurrencyEnum = "KRH" + PayCurrencyEnumKrw PayCurrencyEnum = "KRW" + PayCurrencyEnumKro PayCurrencyEnum = "KRO" + PayCurrencyEnumSsp PayCurrencyEnum = "SSP" + PayCurrencyEnumSur PayCurrencyEnum = "SUR" + PayCurrencyEnumEsp PayCurrencyEnum = "ESP" + PayCurrencyEnumEsa PayCurrencyEnum = "ESA" + PayCurrencyEnumEsb PayCurrencyEnum = "ESB" + PayCurrencyEnumXdr PayCurrencyEnum = "XDR" + PayCurrencyEnumLkr PayCurrencyEnum = "LKR" + PayCurrencyEnumShp PayCurrencyEnum = "SHP" + PayCurrencyEnumXsu PayCurrencyEnum = "XSU" + PayCurrencyEnumSdd PayCurrencyEnum = "SDD" + PayCurrencyEnumSdg PayCurrencyEnum = "SDG" + PayCurrencyEnumSdp PayCurrencyEnum = "SDP" + PayCurrencyEnumSrd PayCurrencyEnum = "SRD" + PayCurrencyEnumSrg PayCurrencyEnum = "SRG" + PayCurrencyEnumSzl PayCurrencyEnum = "SZL" + PayCurrencyEnumSek PayCurrencyEnum = "SEK" + PayCurrencyEnumChf PayCurrencyEnum = "CHF" + PayCurrencyEnumSyp PayCurrencyEnum = "SYP" + PayCurrencyEnumStn PayCurrencyEnum = "STN" + PayCurrencyEnumStd PayCurrencyEnum = "STD" + PayCurrencyEnumTvd PayCurrencyEnum = "TVD" + PayCurrencyEnumTjr PayCurrencyEnum = "TJR" + PayCurrencyEnumTjs PayCurrencyEnum = "TJS" + PayCurrencyEnumTzs PayCurrencyEnum = "TZS" + PayCurrencyEnumXts PayCurrencyEnum = "XTS" + PayCurrencyEnumThb PayCurrencyEnum = "THB" + PayCurrencyEnumXxx PayCurrencyEnum = "XXX" + PayCurrencyEnumTpe PayCurrencyEnum = "TPE" + PayCurrencyEnumTop PayCurrencyEnum = "TOP" + PayCurrencyEnumTtd PayCurrencyEnum = "TTD" + PayCurrencyEnumTnd PayCurrencyEnum = "TND" + PayCurrencyEnumTry PayCurrencyEnum = "TRY" + PayCurrencyEnumTrl PayCurrencyEnum = "TRL" + PayCurrencyEnumTmt PayCurrencyEnum = "TMT" + PayCurrencyEnumTmm PayCurrencyEnum = "TMM" + PayCurrencyEnumUsd PayCurrencyEnum = "USD" + PayCurrencyEnumUsn PayCurrencyEnum = "USN" + PayCurrencyEnumUss PayCurrencyEnum = "USS" + PayCurrencyEnumUgx PayCurrencyEnum = "UGX" + PayCurrencyEnumUgs PayCurrencyEnum = "UGS" + PayCurrencyEnumUah PayCurrencyEnum = "UAH" + PayCurrencyEnumUak PayCurrencyEnum = "UAK" + PayCurrencyEnumAed PayCurrencyEnum = "AED" + PayCurrencyEnumUyw PayCurrencyEnum = "UYW" + PayCurrencyEnumUyu PayCurrencyEnum = "UYU" + PayCurrencyEnumUyp PayCurrencyEnum = "UYP" + PayCurrencyEnumUyi PayCurrencyEnum = "UYI" + PayCurrencyEnumUzs PayCurrencyEnum = "UZS" + PayCurrencyEnumVuv PayCurrencyEnum = "VUV" + PayCurrencyEnumVes PayCurrencyEnum = "VES" + PayCurrencyEnumVeb PayCurrencyEnum = "VEB" + PayCurrencyEnumVef PayCurrencyEnum = "VEF" + PayCurrencyEnumVnd PayCurrencyEnum = "VND" + PayCurrencyEnumVnn PayCurrencyEnum = "VNN" + PayCurrencyEnumChe PayCurrencyEnum = "CHE" + PayCurrencyEnumChw PayCurrencyEnum = "CHW" + PayCurrencyEnumXof PayCurrencyEnum = "XOF" + PayCurrencyEnumYdd PayCurrencyEnum = "YDD" + PayCurrencyEnumYer PayCurrencyEnum = "YER" + PayCurrencyEnumYun PayCurrencyEnum = "YUN" + PayCurrencyEnumYud PayCurrencyEnum = "YUD" + PayCurrencyEnumYum PayCurrencyEnum = "YUM" + PayCurrencyEnumYur PayCurrencyEnum = "YUR" + PayCurrencyEnumZwn PayCurrencyEnum = "ZWN" + PayCurrencyEnumZrn PayCurrencyEnum = "ZRN" + PayCurrencyEnumZrz PayCurrencyEnum = "ZRZ" + PayCurrencyEnumZmw PayCurrencyEnum = "ZMW" + PayCurrencyEnumZmk PayCurrencyEnum = "ZMK" + PayCurrencyEnumZwd PayCurrencyEnum = "ZWD" + PayCurrencyEnumZwr PayCurrencyEnum = "ZWR" + PayCurrencyEnumZwl PayCurrencyEnum = "ZWL" ) -func NewPayPeriodEnumFromString(s string) (PayPeriodEnum, error) { +func NewPayCurrencyEnumFromString(s string) (PayCurrencyEnum, error) { switch s { - case "HOUR": - return PayPeriodEnumHour, nil - case "DAY": - return PayPeriodEnumDay, nil - case "WEEK": - return PayPeriodEnumWeek, nil - case "EVERY_TWO_WEEKS": - return PayPeriodEnumEveryTwoWeeks, nil - case "SEMIMONTHLY": - return PayPeriodEnumSemimonthly, nil - case "MONTH": - return PayPeriodEnumMonth, nil - case "QUARTER": - return PayPeriodEnumQuarter, nil - case "EVERY_SIX_MONTHS": - return PayPeriodEnumEverySixMonths, nil - case "YEAR": - return PayPeriodEnumYear, nil - } - var t PayPeriodEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (p PayPeriodEnum) Ptr() *PayPeriodEnum { - return &p -} - -// # The PayrollRun Object -// -// ### Description -// -// The `PayrollRun` object is used to represent a group of pay statements for a specific pay schedule. -// -// ### Usage Example -// -// Fetch from the `LIST PayrollRuns` endpoint and filter by `ID` to show all payroll runs. -type PayrollRun struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The state of the payroll run - // - // - `PAID` - PAID - // - `DRAFT` - DRAFT - // - `APPROVED` - APPROVED - // - `FAILED` - FAILED - // - `CLOSED` - CLOSED - RunState *PayrollRunRunState `json:"run_state,omitempty"` - // The type of the payroll run - // - // - `REGULAR` - REGULAR - // - `OFF_CYCLE` - OFF_CYCLE - // - `CORRECTION` - CORRECTION - // - `TERMINATION` - TERMINATION - // - `SIGN_ON_BONUS` - SIGN_ON_BONUS - RunType *PayrollRunRunType `json:"run_type,omitempty"` - // The day and time the payroll run started. - StartDate *time.Time `json:"start_date,omitempty"` - // The day and time the payroll run ended. - EndDate *time.Time `json:"end_date,omitempty"` - // The day and time the payroll run was checked. - CheckDate *time.Time `json:"check_date,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` - - _rawJSON json.RawMessage -} - -func (p *PayrollRun) UnmarshalJSON(data []byte) error { - type unmarshaler PayrollRun - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *p = PayrollRun(value) - p._rawJSON = json.RawMessage(data) - return nil -} - -func (p *PayrollRun) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) -} - -// The state of the payroll run -// -// - `PAID` - PAID -// - `DRAFT` - DRAFT -// - `APPROVED` - APPROVED -// - `FAILED` - FAILED -// - `CLOSED` - CLOSED -type PayrollRunRunState struct { - typeName string - RunStateEnum RunStateEnum - String string -} - -func NewPayrollRunRunStateFromRunStateEnum(value RunStateEnum) *PayrollRunRunState { - return &PayrollRunRunState{typeName: "runStateEnum", RunStateEnum: value} -} - -func NewPayrollRunRunStateFromString(value string) *PayrollRunRunState { - return &PayrollRunRunState{typeName: "string", String: value} -} - -func (p *PayrollRunRunState) UnmarshalJSON(data []byte) error { - var valueRunStateEnum RunStateEnum - if err := json.Unmarshal(data, &valueRunStateEnum); err == nil { - p.typeName = "runStateEnum" - p.RunStateEnum = valueRunStateEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" - p.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, p) -} - -func (p PayrollRunRunState) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "runStateEnum": - return json.Marshal(p.RunStateEnum) - case "string": - return json.Marshal(p.String) - } -} - -type PayrollRunRunStateVisitor interface { - VisitRunStateEnum(RunStateEnum) error - VisitString(string) error -} - -func (p *PayrollRunRunState) Accept(visitor PayrollRunRunStateVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "runStateEnum": - return visitor.VisitRunStateEnum(p.RunStateEnum) - case "string": - return visitor.VisitString(p.String) - } -} - -// The type of the payroll run -// -// - `REGULAR` - REGULAR -// - `OFF_CYCLE` - OFF_CYCLE -// - `CORRECTION` - CORRECTION -// - `TERMINATION` - TERMINATION -// - `SIGN_ON_BONUS` - SIGN_ON_BONUS -type PayrollRunRunType struct { - typeName string - RunTypeEnum RunTypeEnum - String string -} - -func NewPayrollRunRunTypeFromRunTypeEnum(value RunTypeEnum) *PayrollRunRunType { - return &PayrollRunRunType{typeName: "runTypeEnum", RunTypeEnum: value} -} - -func NewPayrollRunRunTypeFromString(value string) *PayrollRunRunType { - return &PayrollRunRunType{typeName: "string", String: value} -} - -func (p *PayrollRunRunType) UnmarshalJSON(data []byte) error { - var valueRunTypeEnum RunTypeEnum - if err := json.Unmarshal(data, &valueRunTypeEnum); err == nil { - p.typeName = "runTypeEnum" - p.RunTypeEnum = valueRunTypeEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" - p.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, p) -} - -func (p PayrollRunRunType) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "runTypeEnum": - return json.Marshal(p.RunTypeEnum) - case "string": - return json.Marshal(p.String) - } -} - -type PayrollRunRunTypeVisitor interface { - VisitRunTypeEnum(RunTypeEnum) error - VisitString(string) error -} - -func (p *PayrollRunRunType) Accept(visitor PayrollRunRunTypeVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "runTypeEnum": - return visitor.VisitRunTypeEnum(p.RunTypeEnum) - case "string": - return visitor.VisitString(p.String) + case "XUA": + return PayCurrencyEnumXua, nil + case "AFN": + return PayCurrencyEnumAfn, nil + case "AFA": + return PayCurrencyEnumAfa, nil + case "ALL": + return PayCurrencyEnumAll, nil + case "ALK": + return PayCurrencyEnumAlk, nil + case "DZD": + return PayCurrencyEnumDzd, nil + case "ADP": + return PayCurrencyEnumAdp, nil + case "AOA": + return PayCurrencyEnumAoa, nil + case "AOK": + return PayCurrencyEnumAok, nil + case "AON": + return PayCurrencyEnumAon, nil + case "AOR": + return PayCurrencyEnumAor, nil + case "ARA": + return PayCurrencyEnumAra, nil + case "ARS": + return PayCurrencyEnumArs, nil + case "ARM": + return PayCurrencyEnumArm, nil + case "ARP": + return PayCurrencyEnumArp, nil + case "ARL": + return PayCurrencyEnumArl, nil + case "AMD": + return PayCurrencyEnumAmd, nil + case "AWG": + return PayCurrencyEnumAwg, nil + case "AUD": + return PayCurrencyEnumAud, nil + case "ATS": + return PayCurrencyEnumAts, nil + case "AZN": + return PayCurrencyEnumAzn, nil + case "AZM": + return PayCurrencyEnumAzm, nil + case "BSD": + return PayCurrencyEnumBsd, nil + case "BHD": + return PayCurrencyEnumBhd, nil + case "BDT": + return PayCurrencyEnumBdt, nil + case "BBD": + return PayCurrencyEnumBbd, nil + case "BYN": + return PayCurrencyEnumByn, nil + case "BYB": + return PayCurrencyEnumByb, nil + case "BYR": + return PayCurrencyEnumByr, nil + case "BEF": + return PayCurrencyEnumBef, nil + case "BEC": + return PayCurrencyEnumBec, nil + case "BEL": + return PayCurrencyEnumBel, nil + case "BZD": + return PayCurrencyEnumBzd, nil + case "BMD": + return PayCurrencyEnumBmd, nil + case "BTN": + return PayCurrencyEnumBtn, nil + case "BOB": + return PayCurrencyEnumBob, nil + case "BOL": + return PayCurrencyEnumBol, nil + case "BOV": + return PayCurrencyEnumBov, nil + case "BOP": + return PayCurrencyEnumBop, nil + case "BAM": + return PayCurrencyEnumBam, nil + case "BAD": + return PayCurrencyEnumBad, nil + case "BAN": + return PayCurrencyEnumBan, nil + case "BWP": + return PayCurrencyEnumBwp, nil + case "BRC": + return PayCurrencyEnumBrc, nil + case "BRZ": + return PayCurrencyEnumBrz, nil + case "BRE": + return PayCurrencyEnumBre, nil + case "BRR": + return PayCurrencyEnumBrr, nil + case "BRN": + return PayCurrencyEnumBrn, nil + case "BRB": + return PayCurrencyEnumBrb, nil + case "BRL": + return PayCurrencyEnumBrl, nil + case "GBP": + return PayCurrencyEnumGbp, nil + case "BND": + return PayCurrencyEnumBnd, nil + case "BGL": + return PayCurrencyEnumBgl, nil + case "BGN": + return PayCurrencyEnumBgn, nil + case "BGO": + return PayCurrencyEnumBgo, nil + case "BGM": + return PayCurrencyEnumBgm, nil + case "BUK": + return PayCurrencyEnumBuk, nil + case "BIF": + return PayCurrencyEnumBif, nil + case "XPF": + return PayCurrencyEnumXpf, nil + case "KHR": + return PayCurrencyEnumKhr, nil + case "CAD": + return PayCurrencyEnumCad, nil + case "CVE": + return PayCurrencyEnumCve, nil + case "KYD": + return PayCurrencyEnumKyd, nil + case "XAF": + return PayCurrencyEnumXaf, nil + case "CLE": + return PayCurrencyEnumCle, nil + case "CLP": + return PayCurrencyEnumClp, nil + case "CLF": + return PayCurrencyEnumClf, nil + case "CNX": + return PayCurrencyEnumCnx, nil + case "CNY": + return PayCurrencyEnumCny, nil + case "CNH": + return PayCurrencyEnumCnh, nil + case "COP": + return PayCurrencyEnumCop, nil + case "COU": + return PayCurrencyEnumCou, nil + case "KMF": + return PayCurrencyEnumKmf, nil + case "CDF": + return PayCurrencyEnumCdf, nil + case "CRC": + return PayCurrencyEnumCrc, nil + case "HRD": + return PayCurrencyEnumHrd, nil + case "HRK": + return PayCurrencyEnumHrk, nil + case "CUC": + return PayCurrencyEnumCuc, nil + case "CUP": + return PayCurrencyEnumCup, nil + case "CYP": + return PayCurrencyEnumCyp, nil + case "CZK": + return PayCurrencyEnumCzk, nil + case "CSK": + return PayCurrencyEnumCsk, nil + case "DKK": + return PayCurrencyEnumDkk, nil + case "DJF": + return PayCurrencyEnumDjf, nil + case "DOP": + return PayCurrencyEnumDop, nil + case "NLG": + return PayCurrencyEnumNlg, nil + case "XCD": + return PayCurrencyEnumXcd, nil + case "DDM": + return PayCurrencyEnumDdm, nil + case "ECS": + return PayCurrencyEnumEcs, nil + case "ECV": + return PayCurrencyEnumEcv, nil + case "EGP": + return PayCurrencyEnumEgp, nil + case "GQE": + return PayCurrencyEnumGqe, nil + case "ERN": + return PayCurrencyEnumErn, nil + case "EEK": + return PayCurrencyEnumEek, nil + case "ETB": + return PayCurrencyEnumEtb, nil + case "EUR": + return PayCurrencyEnumEur, nil + case "XBA": + return PayCurrencyEnumXba, nil + case "XEU": + return PayCurrencyEnumXeu, nil + case "XBB": + return PayCurrencyEnumXbb, nil + case "XBC": + return PayCurrencyEnumXbc, nil + case "XBD": + return PayCurrencyEnumXbd, nil + case "FKP": + return PayCurrencyEnumFkp, nil + case "FJD": + return PayCurrencyEnumFjd, nil + case "FIM": + return PayCurrencyEnumFim, nil + case "FRF": + return PayCurrencyEnumFrf, nil + case "XFO": + return PayCurrencyEnumXfo, nil + case "XFU": + return PayCurrencyEnumXfu, nil + case "GMD": + return PayCurrencyEnumGmd, nil + case "GEK": + return PayCurrencyEnumGek, nil + case "GEL": + return PayCurrencyEnumGel, nil + case "DEM": + return PayCurrencyEnumDem, nil + case "GHS": + return PayCurrencyEnumGhs, nil + case "GHC": + return PayCurrencyEnumGhc, nil + case "GIP": + return PayCurrencyEnumGip, nil + case "XAU": + return PayCurrencyEnumXau, nil + case "GRD": + return PayCurrencyEnumGrd, nil + case "GTQ": + return PayCurrencyEnumGtq, nil + case "GWP": + return PayCurrencyEnumGwp, nil + case "GNF": + return PayCurrencyEnumGnf, nil + case "GNS": + return PayCurrencyEnumGns, nil + case "GYD": + return PayCurrencyEnumGyd, nil + case "HTG": + return PayCurrencyEnumHtg, nil + case "HNL": + return PayCurrencyEnumHnl, nil + case "HKD": + return PayCurrencyEnumHkd, nil + case "HUF": + return PayCurrencyEnumHuf, nil + case "IMP": + return PayCurrencyEnumImp, nil + case "ISK": + return PayCurrencyEnumIsk, nil + case "ISJ": + return PayCurrencyEnumIsj, nil + case "INR": + return PayCurrencyEnumInr, nil + case "IDR": + return PayCurrencyEnumIdr, nil + case "IRR": + return PayCurrencyEnumIrr, nil + case "IQD": + return PayCurrencyEnumIqd, nil + case "IEP": + return PayCurrencyEnumIep, nil + case "ILS": + return PayCurrencyEnumIls, nil + case "ILP": + return PayCurrencyEnumIlp, nil + case "ILR": + return PayCurrencyEnumIlr, nil + case "ITL": + return PayCurrencyEnumItl, nil + case "JMD": + return PayCurrencyEnumJmd, nil + case "JPY": + return PayCurrencyEnumJpy, nil + case "JOD": + return PayCurrencyEnumJod, nil + case "KZT": + return PayCurrencyEnumKzt, nil + case "KES": + return PayCurrencyEnumKes, nil + case "KWD": + return PayCurrencyEnumKwd, nil + case "KGS": + return PayCurrencyEnumKgs, nil + case "LAK": + return PayCurrencyEnumLak, nil + case "LVL": + return PayCurrencyEnumLvl, nil + case "LVR": + return PayCurrencyEnumLvr, nil + case "LBP": + return PayCurrencyEnumLbp, nil + case "LSL": + return PayCurrencyEnumLsl, nil + case "LRD": + return PayCurrencyEnumLrd, nil + case "LYD": + return PayCurrencyEnumLyd, nil + case "LTL": + return PayCurrencyEnumLtl, nil + case "LTT": + return PayCurrencyEnumLtt, nil + case "LUL": + return PayCurrencyEnumLul, nil + case "LUC": + return PayCurrencyEnumLuc, nil + case "LUF": + return PayCurrencyEnumLuf, nil + case "MOP": + return PayCurrencyEnumMop, nil + case "MKD": + return PayCurrencyEnumMkd, nil + case "MKN": + return PayCurrencyEnumMkn, nil + case "MGA": + return PayCurrencyEnumMga, nil + case "MGF": + return PayCurrencyEnumMgf, nil + case "MWK": + return PayCurrencyEnumMwk, nil + case "MYR": + return PayCurrencyEnumMyr, nil + case "MVR": + return PayCurrencyEnumMvr, nil + case "MVP": + return PayCurrencyEnumMvp, nil + case "MLF": + return PayCurrencyEnumMlf, nil + case "MTL": + return PayCurrencyEnumMtl, nil + case "MTP": + return PayCurrencyEnumMtp, nil + case "MRU": + return PayCurrencyEnumMru, nil + case "MRO": + return PayCurrencyEnumMro, nil + case "MUR": + return PayCurrencyEnumMur, nil + case "MXV": + return PayCurrencyEnumMxv, nil + case "MXN": + return PayCurrencyEnumMxn, nil + case "MXP": + return PayCurrencyEnumMxp, nil + case "MDC": + return PayCurrencyEnumMdc, nil + case "MDL": + return PayCurrencyEnumMdl, nil + case "MCF": + return PayCurrencyEnumMcf, nil + case "MNT": + return PayCurrencyEnumMnt, nil + case "MAD": + return PayCurrencyEnumMad, nil + case "MAF": + return PayCurrencyEnumMaf, nil + case "MZE": + return PayCurrencyEnumMze, nil + case "MZN": + return PayCurrencyEnumMzn, nil + case "MZM": + return PayCurrencyEnumMzm, nil + case "MMK": + return PayCurrencyEnumMmk, nil + case "NAD": + return PayCurrencyEnumNad, nil + case "NPR": + return PayCurrencyEnumNpr, nil + case "ANG": + return PayCurrencyEnumAng, nil + case "TWD": + return PayCurrencyEnumTwd, nil + case "NZD": + return PayCurrencyEnumNzd, nil + case "NIO": + return PayCurrencyEnumNio, nil + case "NIC": + return PayCurrencyEnumNic, nil + case "NGN": + return PayCurrencyEnumNgn, nil + case "KPW": + return PayCurrencyEnumKpw, nil + case "NOK": + return PayCurrencyEnumNok, nil + case "OMR": + return PayCurrencyEnumOmr, nil + case "PKR": + return PayCurrencyEnumPkr, nil + case "XPD": + return PayCurrencyEnumXpd, nil + case "PAB": + return PayCurrencyEnumPab, nil + case "PGK": + return PayCurrencyEnumPgk, nil + case "PYG": + return PayCurrencyEnumPyg, nil + case "PEI": + return PayCurrencyEnumPei, nil + case "PEN": + return PayCurrencyEnumPen, nil + case "PES": + return PayCurrencyEnumPes, nil + case "PHP": + return PayCurrencyEnumPhp, nil + case "XPT": + return PayCurrencyEnumXpt, nil + case "PLN": + return PayCurrencyEnumPln, nil + case "PLZ": + return PayCurrencyEnumPlz, nil + case "PTE": + return PayCurrencyEnumPte, nil + case "GWE": + return PayCurrencyEnumGwe, nil + case "QAR": + return PayCurrencyEnumQar, nil + case "XRE": + return PayCurrencyEnumXre, nil + case "RHD": + return PayCurrencyEnumRhd, nil + case "RON": + return PayCurrencyEnumRon, nil + case "ROL": + return PayCurrencyEnumRol, nil + case "RUB": + return PayCurrencyEnumRub, nil + case "RUR": + return PayCurrencyEnumRur, nil + case "RWF": + return PayCurrencyEnumRwf, nil + case "SVC": + return PayCurrencyEnumSvc, nil + case "WST": + return PayCurrencyEnumWst, nil + case "SAR": + return PayCurrencyEnumSar, nil + case "RSD": + return PayCurrencyEnumRsd, nil + case "CSD": + return PayCurrencyEnumCsd, nil + case "SCR": + return PayCurrencyEnumScr, nil + case "SLL": + return PayCurrencyEnumSll, nil + case "XAG": + return PayCurrencyEnumXag, nil + case "SGD": + return PayCurrencyEnumSgd, nil + case "SKK": + return PayCurrencyEnumSkk, nil + case "SIT": + return PayCurrencyEnumSit, nil + case "SBD": + return PayCurrencyEnumSbd, nil + case "SOS": + return PayCurrencyEnumSos, nil + case "ZAR": + return PayCurrencyEnumZar, nil + case "ZAL": + return PayCurrencyEnumZal, nil + case "KRH": + return PayCurrencyEnumKrh, nil + case "KRW": + return PayCurrencyEnumKrw, nil + case "KRO": + return PayCurrencyEnumKro, nil + case "SSP": + return PayCurrencyEnumSsp, nil + case "SUR": + return PayCurrencyEnumSur, nil + case "ESP": + return PayCurrencyEnumEsp, nil + case "ESA": + return PayCurrencyEnumEsa, nil + case "ESB": + return PayCurrencyEnumEsb, nil + case "XDR": + return PayCurrencyEnumXdr, nil + case "LKR": + return PayCurrencyEnumLkr, nil + case "SHP": + return PayCurrencyEnumShp, nil + case "XSU": + return PayCurrencyEnumXsu, nil + case "SDD": + return PayCurrencyEnumSdd, nil + case "SDG": + return PayCurrencyEnumSdg, nil + case "SDP": + return PayCurrencyEnumSdp, nil + case "SRD": + return PayCurrencyEnumSrd, nil + case "SRG": + return PayCurrencyEnumSrg, nil + case "SZL": + return PayCurrencyEnumSzl, nil + case "SEK": + return PayCurrencyEnumSek, nil + case "CHF": + return PayCurrencyEnumChf, nil + case "SYP": + return PayCurrencyEnumSyp, nil + case "STN": + return PayCurrencyEnumStn, nil + case "STD": + return PayCurrencyEnumStd, nil + case "TVD": + return PayCurrencyEnumTvd, nil + case "TJR": + return PayCurrencyEnumTjr, nil + case "TJS": + return PayCurrencyEnumTjs, nil + case "TZS": + return PayCurrencyEnumTzs, nil + case "XTS": + return PayCurrencyEnumXts, nil + case "THB": + return PayCurrencyEnumThb, nil + case "XXX": + return PayCurrencyEnumXxx, nil + case "TPE": + return PayCurrencyEnumTpe, nil + case "TOP": + return PayCurrencyEnumTop, nil + case "TTD": + return PayCurrencyEnumTtd, nil + case "TND": + return PayCurrencyEnumTnd, nil + case "TRY": + return PayCurrencyEnumTry, nil + case "TRL": + return PayCurrencyEnumTrl, nil + case "TMT": + return PayCurrencyEnumTmt, nil + case "TMM": + return PayCurrencyEnumTmm, nil + case "USD": + return PayCurrencyEnumUsd, nil + case "USN": + return PayCurrencyEnumUsn, nil + case "USS": + return PayCurrencyEnumUss, nil + case "UGX": + return PayCurrencyEnumUgx, nil + case "UGS": + return PayCurrencyEnumUgs, nil + case "UAH": + return PayCurrencyEnumUah, nil + case "UAK": + return PayCurrencyEnumUak, nil + case "AED": + return PayCurrencyEnumAed, nil + case "UYW": + return PayCurrencyEnumUyw, nil + case "UYU": + return PayCurrencyEnumUyu, nil + case "UYP": + return PayCurrencyEnumUyp, nil + case "UYI": + return PayCurrencyEnumUyi, nil + case "UZS": + return PayCurrencyEnumUzs, nil + case "VUV": + return PayCurrencyEnumVuv, nil + case "VES": + return PayCurrencyEnumVes, nil + case "VEB": + return PayCurrencyEnumVeb, nil + case "VEF": + return PayCurrencyEnumVef, nil + case "VND": + return PayCurrencyEnumVnd, nil + case "VNN": + return PayCurrencyEnumVnn, nil + case "CHE": + return PayCurrencyEnumChe, nil + case "CHW": + return PayCurrencyEnumChw, nil + case "XOF": + return PayCurrencyEnumXof, nil + case "YDD": + return PayCurrencyEnumYdd, nil + case "YER": + return PayCurrencyEnumYer, nil + case "YUN": + return PayCurrencyEnumYun, nil + case "YUD": + return PayCurrencyEnumYud, nil + case "YUM": + return PayCurrencyEnumYum, nil + case "YUR": + return PayCurrencyEnumYur, nil + case "ZWN": + return PayCurrencyEnumZwn, nil + case "ZRN": + return PayCurrencyEnumZrn, nil + case "ZRZ": + return PayCurrencyEnumZrz, nil + case "ZMW": + return PayCurrencyEnumZmw, nil + case "ZMK": + return PayCurrencyEnumZmk, nil + case "ZWD": + return PayCurrencyEnumZwd, nil + case "ZWR": + return PayCurrencyEnumZwr, nil + case "ZWL": + return PayCurrencyEnumZwl, nil } -} - -// - `VACATION` - VACATION -// - `SICK` - SICK -// - `PERSONAL` - PERSONAL -// - `JURY_DUTY` - JURY_DUTY -// - `VOLUNTEER` - VOLUNTEER -// - `BEREAVEMENT` - BEREAVEMENT -type PolicyTypeEnum string - -const ( - PolicyTypeEnumVacation PolicyTypeEnum = "VACATION" - PolicyTypeEnumSick PolicyTypeEnum = "SICK" - PolicyTypeEnumPersonal PolicyTypeEnum = "PERSONAL" - PolicyTypeEnumJuryDuty PolicyTypeEnum = "JURY_DUTY" - PolicyTypeEnumVolunteer PolicyTypeEnum = "VOLUNTEER" - PolicyTypeEnumBereavement PolicyTypeEnum = "BEREAVEMENT" -) - -func NewPolicyTypeEnumFromString(s string) (PolicyTypeEnum, error) { - switch s { - case "VACATION": - return PolicyTypeEnumVacation, nil - case "SICK": - return PolicyTypeEnumSick, nil - case "PERSONAL": - return PolicyTypeEnumPersonal, nil - case "JURY_DUTY": - return PolicyTypeEnumJuryDuty, nil - case "VOLUNTEER": - return PolicyTypeEnumVolunteer, nil - case "BEREAVEMENT": - return PolicyTypeEnumBereavement, nil - } - var t PolicyTypeEnum + var t PayCurrencyEnum return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (p PolicyTypeEnum) Ptr() *PolicyTypeEnum { +func (p PayCurrencyEnum) Ptr() *PayCurrencyEnum { return &p } -// - `GENERAL_CUSTOMER_REQUEST` - GENERAL_CUSTOMER_REQUEST -// - `GDPR` - GDPR -// - `OTHER` - OTHER -type ReasonEnum string - -const ( - ReasonEnumGeneralCustomerRequest ReasonEnum = "GENERAL_CUSTOMER_REQUEST" - ReasonEnumGdpr ReasonEnum = "GDPR" - ReasonEnumOther ReasonEnum = "OTHER" -) - -func NewReasonEnumFromString(s string) (ReasonEnum, error) { - switch s { - case "GENERAL_CUSTOMER_REQUEST": - return ReasonEnumGeneralCustomerRequest, nil - case "GDPR": - return ReasonEnumGdpr, nil - case "OTHER": - return ReasonEnumOther, nil - } - var t ReasonEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (r ReasonEnum) Ptr() *ReasonEnum { - return &r -} - -// - `CHILD` - CHILD -// - `SPOUSE` - SPOUSE -// - `DOMESTIC_PARTNER` - DOMESTIC_PARTNER -type RelationshipEnum string +// * `WEEKLY` - WEEKLY +// * `BIWEEKLY` - BIWEEKLY +// * `MONTHLY` - MONTHLY +// * `QUARTERLY` - QUARTERLY +// * `SEMIANNUALLY` - SEMIANNUALLY +// * `ANNUALLY` - ANNUALLY +// * `THIRTEEN-MONTHLY` - THIRTEEN-MONTHLY +// * `PRO_RATA` - PRO_RATA +// * `SEMIMONTHLY` - SEMIMONTHLY +type PayFrequencyEnum string const ( - RelationshipEnumChild RelationshipEnum = "CHILD" - RelationshipEnumSpouse RelationshipEnum = "SPOUSE" - RelationshipEnumDomesticPartner RelationshipEnum = "DOMESTIC_PARTNER" + PayFrequencyEnumWeekly PayFrequencyEnum = "WEEKLY" + PayFrequencyEnumBiweekly PayFrequencyEnum = "BIWEEKLY" + PayFrequencyEnumMonthly PayFrequencyEnum = "MONTHLY" + PayFrequencyEnumQuarterly PayFrequencyEnum = "QUARTERLY" + PayFrequencyEnumSemiannually PayFrequencyEnum = "SEMIANNUALLY" + PayFrequencyEnumAnnually PayFrequencyEnum = "ANNUALLY" + PayFrequencyEnumThirteenMonthly PayFrequencyEnum = "THIRTEEN-MONTHLY" + PayFrequencyEnumProRata PayFrequencyEnum = "PRO_RATA" + PayFrequencyEnumSemimonthly PayFrequencyEnum = "SEMIMONTHLY" ) -func NewRelationshipEnumFromString(s string) (RelationshipEnum, error) { +func NewPayFrequencyEnumFromString(s string) (PayFrequencyEnum, error) { switch s { - case "CHILD": - return RelationshipEnumChild, nil - case "SPOUSE": - return RelationshipEnumSpouse, nil - case "DOMESTIC_PARTNER": - return RelationshipEnumDomesticPartner, nil - } - var t RelationshipEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (r RelationshipEnum) Ptr() *RelationshipEnum { - return &r -} - -// # The RemoteData Object -// -// ### Description -// -// The `RemoteData` object is used to represent the full data pulled from the third-party API for an object. -// -// ### Usage Example -// -// TODO -type RemoteData struct { - // The third-party API path that is being called. - Path string `json:"path"` - Data interface{} `json:"data,omitempty"` - - _rawJSON json.RawMessage -} - -func (r *RemoteData) UnmarshalJSON(data []byte) error { - type unmarshaler RemoteData - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *r = RemoteData(value) - r._rawJSON = json.RawMessage(data) - return nil -} - -func (r *RemoteData) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(r); err == nil { - return value - } - return fmt.Sprintf("%#v", r) -} - -type RemoteEndpointInfo struct { - Method string `json:"method"` - UrlPath string `json:"url_path"` - FieldTraversalPath []interface{} `json:"field_traversal_path,omitempty"` - - _rawJSON json.RawMessage -} - -func (r *RemoteEndpointInfo) UnmarshalJSON(data []byte) error { - type unmarshaler RemoteEndpointInfo - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *r = RemoteEndpointInfo(value) - r._rawJSON = json.RawMessage(data) - return nil -} - -func (r *RemoteEndpointInfo) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(r); err == nil { - return value - } - return fmt.Sprintf("%#v", r) -} - -type RemoteFieldApi struct { - Schema map[string]interface{} `json:"schema,omitempty"` - RemoteKeyName string `json:"remote_key_name"` - RemoteEndpointInfo *RemoteEndpointInfo `json:"remote_endpoint_info,omitempty"` - ExampleValues []interface{} `json:"example_values,omitempty"` - AdvancedMetadata *AdvancedMetadata `json:"advanced_metadata,omitempty"` - Coverage *RemoteFieldApiCoverage `json:"coverage,omitempty"` - - _rawJSON json.RawMessage -} - -func (r *RemoteFieldApi) UnmarshalJSON(data []byte) error { - type unmarshaler RemoteFieldApi - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *r = RemoteFieldApi(value) - r._rawJSON = json.RawMessage(data) - return nil -} - -func (r *RemoteFieldApi) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(r); err == nil { - return value - } - return fmt.Sprintf("%#v", r) -} - -type RemoteFieldApiCoverage struct { - typeName string - Integer int - Double float64 -} - -func NewRemoteFieldApiCoverageFromInteger(value int) *RemoteFieldApiCoverage { - return &RemoteFieldApiCoverage{typeName: "integer", Integer: value} -} - -func NewRemoteFieldApiCoverageFromDouble(value float64) *RemoteFieldApiCoverage { - return &RemoteFieldApiCoverage{typeName: "double", Double: value} -} - -func (r *RemoteFieldApiCoverage) UnmarshalJSON(data []byte) error { - var valueInteger int - if err := json.Unmarshal(data, &valueInteger); err == nil { - r.typeName = "integer" - r.Integer = valueInteger - return nil - } - var valueDouble float64 - if err := json.Unmarshal(data, &valueDouble); err == nil { - r.typeName = "double" - r.Double = valueDouble - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, r) -} - -func (r RemoteFieldApiCoverage) MarshalJSON() ([]byte, error) { - switch r.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", r.typeName, r) - case "integer": - return json.Marshal(r.Integer) - case "double": - return json.Marshal(r.Double) - } -} - -type RemoteFieldApiCoverageVisitor interface { - VisitInteger(int) error - VisitDouble(float64) error -} - -func (r *RemoteFieldApiCoverage) Accept(visitor RemoteFieldApiCoverageVisitor) error { - switch r.typeName { - default: - return fmt.Errorf("invalid type %s in %T", r.typeName, r) - case "integer": - return visitor.VisitInteger(r.Integer) - case "double": - return visitor.VisitDouble(r.Double) - } -} - -type RemoteFieldApiResponse struct { - Benefit []*RemoteFieldApi `json:"Benefit,omitempty"` - EmployerBenefit []*RemoteFieldApi `json:"EmployerBenefit,omitempty"` - Company []*RemoteFieldApi `json:"Company,omitempty"` - EmployeePayrollRun []*RemoteFieldApi `json:"EmployeePayrollRun,omitempty"` - Employee []*RemoteFieldApi `json:"Employee,omitempty"` - Employment []*RemoteFieldApi `json:"Employment,omitempty"` - Location []*RemoteFieldApi `json:"Location,omitempty"` - PayrollRun []*RemoteFieldApi `json:"PayrollRun,omitempty"` - Team []*RemoteFieldApi `json:"Team,omitempty"` - TimeOff []*RemoteFieldApi `json:"TimeOff,omitempty"` - TimeOffBalance []*RemoteFieldApi `json:"TimeOffBalance,omitempty"` - BankInfo []*RemoteFieldApi `json:"BankInfo,omitempty"` - PayGroup []*RemoteFieldApi `json:"PayGroup,omitempty"` - Group []*RemoteFieldApi `json:"Group,omitempty"` - Dependent []*RemoteFieldApi `json:"Dependent,omitempty"` - TimesheetEntry []*RemoteFieldApi `json:"TimesheetEntry,omitempty"` - - _rawJSON json.RawMessage -} - -func (r *RemoteFieldApiResponse) UnmarshalJSON(data []byte) error { - type unmarshaler RemoteFieldApiResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *r = RemoteFieldApiResponse(value) - r._rawJSON = json.RawMessage(data) - return nil -} - -func (r *RemoteFieldApiResponse) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(r); err == nil { - return value - } - return fmt.Sprintf("%#v", r) -} - -// # The RemoteKey Object -// -// ### Description -// -// The `RemoteKey` object is used to represent a request for a new remote key. -// -// ### Usage Example -// -// Post a `GenerateRemoteKey` to receive a new `RemoteKey`. -type RemoteKey struct { - Name string `json:"name"` - Key string `json:"key"` - - _rawJSON json.RawMessage -} - -func (r *RemoteKey) UnmarshalJSON(data []byte) error { - type unmarshaler RemoteKey - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *r = RemoteKey(value) - r._rawJSON = json.RawMessage(data) - return nil -} - -func (r *RemoteKey) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(r); err == nil { - return value + case "WEEKLY": + return PayFrequencyEnumWeekly, nil + case "BIWEEKLY": + return PayFrequencyEnumBiweekly, nil + case "MONTHLY": + return PayFrequencyEnumMonthly, nil + case "QUARTERLY": + return PayFrequencyEnumQuarterly, nil + case "SEMIANNUALLY": + return PayFrequencyEnumSemiannually, nil + case "ANNUALLY": + return PayFrequencyEnumAnnually, nil + case "THIRTEEN-MONTHLY": + return PayFrequencyEnumThirteenMonthly, nil + case "PRO_RATA": + return PayFrequencyEnumProRata, nil + case "SEMIMONTHLY": + return PayFrequencyEnumSemimonthly, nil } - return fmt.Sprintf("%#v", r) + var t PayFrequencyEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -// # The RemoteResponse Object -// +func (p PayFrequencyEnum) Ptr() *PayFrequencyEnum { + return &p +} + +// # The PayGroup Object // ### Description -// -// The `RemoteResponse` object is used to represent information returned from a third-party endpoint. +// The `PayGroup` object is used to represent a subset of employees that are put together for payroll processing purposes. // // ### Usage Example -// -// View the `RemoteResponse` returned from your `DataPassthrough`. -type RemoteResponse struct { - Method string `json:"method"` - Path string `json:"path"` - Status int `json:"status"` - Response interface{} `json:"response,omitempty"` - ResponseHeaders map[string]interface{} `json:"response_headers,omitempty"` - ResponseType *RemoteResponseResponseType `json:"response_type,omitempty"` - Headers map[string]interface{} `json:"headers,omitempty"` +// Fetch from the `LIST PayGroup` endpoint and filter by `ID` to show all pay group information. +type PayGroup struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The pay group name. + PayGroupName *string `json:"pay_group_name,omitempty" url:"pay_group_name,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (r *RemoteResponse) UnmarshalJSON(data []byte) error { - type unmarshaler RemoteResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (p *PayGroup) GetId() *string { + if p == nil { + return nil } - *r = RemoteResponse(value) - r._rawJSON = json.RawMessage(data) - return nil + return p.Id } -func (r *RemoteResponse) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(r); err == nil { - return value +func (p *PayGroup) GetRemoteId() *string { + if p == nil { + return nil } - return fmt.Sprintf("%#v", r) -} - -type RemoteResponseResponseType struct { - typeName string - ResponseTypeEnum ResponseTypeEnum - String string -} - -func NewRemoteResponseResponseTypeFromResponseTypeEnum(value ResponseTypeEnum) *RemoteResponseResponseType { - return &RemoteResponseResponseType{typeName: "responseTypeEnum", ResponseTypeEnum: value} -} - -func NewRemoteResponseResponseTypeFromString(value string) *RemoteResponseResponseType { - return &RemoteResponseResponseType{typeName: "string", String: value} + return p.RemoteId } -func (r *RemoteResponseResponseType) UnmarshalJSON(data []byte) error { - var valueResponseTypeEnum ResponseTypeEnum - if err := json.Unmarshal(data, &valueResponseTypeEnum); err == nil { - r.typeName = "responseTypeEnum" - r.ResponseTypeEnum = valueResponseTypeEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - r.typeName = "string" - r.String = valueString +func (p *PayGroup) GetCreatedAt() *time.Time { + if p == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, r) + return p.CreatedAt } -func (r RemoteResponseResponseType) MarshalJSON() ([]byte, error) { - switch r.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", r.typeName, r) - case "responseTypeEnum": - return json.Marshal(r.ResponseTypeEnum) - case "string": - return json.Marshal(r.String) +func (p *PayGroup) GetModifiedAt() *time.Time { + if p == nil { + return nil } + return p.ModifiedAt } -type RemoteResponseResponseTypeVisitor interface { - VisitResponseTypeEnum(ResponseTypeEnum) error - VisitString(string) error -} - -func (r *RemoteResponseResponseType) Accept(visitor RemoteResponseResponseTypeVisitor) error { - switch r.typeName { - default: - return fmt.Errorf("invalid type %s in %T", r.typeName, r) - case "responseTypeEnum": - return visitor.VisitResponseTypeEnum(r.ResponseTypeEnum) - case "string": - return visitor.VisitString(r.String) +func (p *PayGroup) GetPayGroupName() *string { + if p == nil { + return nil } + return p.PayGroupName } -// - `JSON` - JSON -// - `XML` - XML -// - `MULTIPART` - MULTIPART -type RequestFormatEnum string - -const ( - RequestFormatEnumJson RequestFormatEnum = "JSON" - RequestFormatEnumXml RequestFormatEnum = "XML" - RequestFormatEnumMultipart RequestFormatEnum = "MULTIPART" -) - -func NewRequestFormatEnumFromString(s string) (RequestFormatEnum, error) { - switch s { - case "JSON": - return RequestFormatEnumJson, nil - case "XML": - return RequestFormatEnumXml, nil - case "MULTIPART": - return RequestFormatEnumMultipart, nil +func (p *PayGroup) GetRemoteWasDeleted() *bool { + if p == nil { + return nil } - var t RequestFormatEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (r RequestFormatEnum) Ptr() *RequestFormatEnum { - return &r -} - -// - `VACATION` - VACATION -// - `SICK` - SICK -// - `PERSONAL` - PERSONAL -// - `JURY_DUTY` - JURY_DUTY -// - `VOLUNTEER` - VOLUNTEER -// - `BEREAVEMENT` - BEREAVEMENT -type RequestTypeEnum string - -const ( - RequestTypeEnumVacation RequestTypeEnum = "VACATION" - RequestTypeEnumSick RequestTypeEnum = "SICK" - RequestTypeEnumPersonal RequestTypeEnum = "PERSONAL" - RequestTypeEnumJuryDuty RequestTypeEnum = "JURY_DUTY" - RequestTypeEnumVolunteer RequestTypeEnum = "VOLUNTEER" - RequestTypeEnumBereavement RequestTypeEnum = "BEREAVEMENT" -) - -func NewRequestTypeEnumFromString(s string) (RequestTypeEnum, error) { - switch s { - case "VACATION": - return RequestTypeEnumVacation, nil - case "SICK": - return RequestTypeEnumSick, nil - case "PERSONAL": - return RequestTypeEnumPersonal, nil - case "JURY_DUTY": - return RequestTypeEnumJuryDuty, nil - case "VOLUNTEER": - return RequestTypeEnumVolunteer, nil - case "BEREAVEMENT": - return RequestTypeEnumBereavement, nil - } - var t RequestTypeEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (r RequestTypeEnum) Ptr() *RequestTypeEnum { - return &r + return p.RemoteWasDeleted } -// - `JSON` - JSON -// - `BASE64_GZIP` - BASE64_GZIP -type ResponseTypeEnum string - -const ( - ResponseTypeEnumJson ResponseTypeEnum = "JSON" - ResponseTypeEnumBase64Gzip ResponseTypeEnum = "BASE64_GZIP" -) - -func NewResponseTypeEnumFromString(s string) (ResponseTypeEnum, error) { - switch s { - case "JSON": - return ResponseTypeEnumJson, nil - case "BASE64_GZIP": - return ResponseTypeEnumBase64Gzip, nil +func (p *PayGroup) GetFieldMappings() map[string]interface{} { + if p == nil { + return nil } - var t ResponseTypeEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) + return p.FieldMappings } -func (r ResponseTypeEnum) Ptr() *ResponseTypeEnum { - return &r +func (p *PayGroup) GetRemoteData() []*RemoteData { + if p == nil { + return nil + } + return p.RemoteData } -// - `ADMIN` - ADMIN -// - `DEVELOPER` - DEVELOPER -// - `MEMBER` - MEMBER -// - `API` - API -// - `SYSTEM` - SYSTEM -// - `MERGE_TEAM` - MERGE_TEAM -type RoleEnum string - -const ( - RoleEnumAdmin RoleEnum = "ADMIN" - RoleEnumDeveloper RoleEnum = "DEVELOPER" - RoleEnumMember RoleEnum = "MEMBER" - RoleEnumApi RoleEnum = "API" - RoleEnumSystem RoleEnum = "SYSTEM" - RoleEnumMergeTeam RoleEnum = "MERGE_TEAM" -) - -func NewRoleEnumFromString(s string) (RoleEnum, error) { - switch s { - case "ADMIN": - return RoleEnumAdmin, nil - case "DEVELOPER": - return RoleEnumDeveloper, nil - case "MEMBER": - return RoleEnumMember, nil - case "API": - return RoleEnumApi, nil - case "SYSTEM": - return RoleEnumSystem, nil - case "MERGE_TEAM": - return RoleEnumMergeTeam, nil - } - var t RoleEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) +func (p *PayGroup) GetExtraProperties() map[string]interface{} { + return p.extraProperties } -func (r RoleEnum) Ptr() *RoleEnum { - return &r +func (p *PayGroup) UnmarshalJSON(data []byte) error { + type embed PayGroup + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*p), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *p = PayGroup(unmarshaler.embed) + p.CreatedAt = unmarshaler.CreatedAt.TimePtr() + p.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil } -// - `PAID` - PAID -// - `DRAFT` - DRAFT -// - `APPROVED` - APPROVED -// - `FAILED` - FAILED -// - `CLOSED` - CLOSED -type RunStateEnum string - -const ( - RunStateEnumPaid RunStateEnum = "PAID" - RunStateEnumDraft RunStateEnum = "DRAFT" - RunStateEnumApproved RunStateEnum = "APPROVED" - RunStateEnumFailed RunStateEnum = "FAILED" - RunStateEnumClosed RunStateEnum = "CLOSED" -) - -func NewRunStateEnumFromString(s string) (RunStateEnum, error) { - switch s { - case "PAID": - return RunStateEnumPaid, nil - case "DRAFT": - return RunStateEnumDraft, nil - case "APPROVED": - return RunStateEnumApproved, nil - case "FAILED": - return RunStateEnumFailed, nil - case "CLOSED": - return RunStateEnumClosed, nil +func (p *PayGroup) MarshalJSON() ([]byte, error) { + type embed PayGroup + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*p), + CreatedAt: internal.NewOptionalDateTime(p.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(p.ModifiedAt), } - var t RunStateEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) + return json.Marshal(marshaler) } -func (r RunStateEnum) Ptr() *RunStateEnum { - return &r +func (p *PayGroup) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) } -// - `REGULAR` - REGULAR -// - `OFF_CYCLE` - OFF_CYCLE -// - `CORRECTION` - CORRECTION -// - `TERMINATION` - TERMINATION -// - `SIGN_ON_BONUS` - SIGN_ON_BONUS -type RunTypeEnum string +// * `HOUR` - HOUR +// * `DAY` - DAY +// * `WEEK` - WEEK +// * `EVERY_TWO_WEEKS` - EVERY_TWO_WEEKS +// * `SEMIMONTHLY` - SEMIMONTHLY +// * `MONTH` - MONTH +// * `QUARTER` - QUARTER +// * `EVERY_SIX_MONTHS` - EVERY_SIX_MONTHS +// * `YEAR` - YEAR +type PayPeriodEnum string const ( - RunTypeEnumRegular RunTypeEnum = "REGULAR" - RunTypeEnumOffCycle RunTypeEnum = "OFF_CYCLE" - RunTypeEnumCorrection RunTypeEnum = "CORRECTION" - RunTypeEnumTermination RunTypeEnum = "TERMINATION" - RunTypeEnumSignOnBonus RunTypeEnum = "SIGN_ON_BONUS" + PayPeriodEnumHour PayPeriodEnum = "HOUR" + PayPeriodEnumDay PayPeriodEnum = "DAY" + PayPeriodEnumWeek PayPeriodEnum = "WEEK" + PayPeriodEnumEveryTwoWeeks PayPeriodEnum = "EVERY_TWO_WEEKS" + PayPeriodEnumSemimonthly PayPeriodEnum = "SEMIMONTHLY" + PayPeriodEnumMonth PayPeriodEnum = "MONTH" + PayPeriodEnumQuarter PayPeriodEnum = "QUARTER" + PayPeriodEnumEverySixMonths PayPeriodEnum = "EVERY_SIX_MONTHS" + PayPeriodEnumYear PayPeriodEnum = "YEAR" ) -func NewRunTypeEnumFromString(s string) (RunTypeEnum, error) { +func NewPayPeriodEnumFromString(s string) (PayPeriodEnum, error) { switch s { - case "REGULAR": - return RunTypeEnumRegular, nil - case "OFF_CYCLE": - return RunTypeEnumOffCycle, nil - case "CORRECTION": - return RunTypeEnumCorrection, nil - case "TERMINATION": - return RunTypeEnumTermination, nil - case "SIGN_ON_BONUS": - return RunTypeEnumSignOnBonus, nil + case "HOUR": + return PayPeriodEnumHour, nil + case "DAY": + return PayPeriodEnumDay, nil + case "WEEK": + return PayPeriodEnumWeek, nil + case "EVERY_TWO_WEEKS": + return PayPeriodEnumEveryTwoWeeks, nil + case "SEMIMONTHLY": + return PayPeriodEnumSemimonthly, nil + case "MONTH": + return PayPeriodEnumMonth, nil + case "QUARTER": + return PayPeriodEnumQuarter, nil + case "EVERY_SIX_MONTHS": + return PayPeriodEnumEverySixMonths, nil + case "YEAR": + return PayPeriodEnumYear, nil } - var t RunTypeEnum + var t PayPeriodEnum return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (r RunTypeEnum) Ptr() *RunTypeEnum { - return &r +func (p PayPeriodEnum) Ptr() *PayPeriodEnum { + return &p } -// - `IN_NEXT_SYNC` - IN_NEXT_SYNC -// - `IN_LAST_SYNC` - IN_LAST_SYNC -type SelectiveSyncConfigurationsUsageEnum string - -const ( - SelectiveSyncConfigurationsUsageEnumInNextSync SelectiveSyncConfigurationsUsageEnum = "IN_NEXT_SYNC" - SelectiveSyncConfigurationsUsageEnumInLastSync SelectiveSyncConfigurationsUsageEnum = "IN_LAST_SYNC" -) - -func NewSelectiveSyncConfigurationsUsageEnumFromString(s string) (SelectiveSyncConfigurationsUsageEnum, error) { - switch s { - case "IN_NEXT_SYNC": - return SelectiveSyncConfigurationsUsageEnumInNextSync, nil - case "IN_LAST_SYNC": - return SelectiveSyncConfigurationsUsageEnumInLastSync, nil - } - var t SelectiveSyncConfigurationsUsageEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} +// # The PayrollRun Object +// ### Description +// The `PayrollRun` object is used to represent a group of pay statements for a specific pay schedule. +// +// ### Usage Example +// Fetch from the `LIST PayrollRuns` endpoint and filter by `ID` to show all payroll runs. +type PayrollRun struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The state of the payroll run + // + // * `PAID` - PAID + // * `DRAFT` - DRAFT + // * `APPROVED` - APPROVED + // * `FAILED` - FAILED + // * `CLOSED` - CLOSED + RunState *PayrollRunRunState `json:"run_state,omitempty" url:"run_state,omitempty"` + // The type of the payroll run + // + // * `REGULAR` - REGULAR + // * `OFF_CYCLE` - OFF_CYCLE + // * `CORRECTION` - CORRECTION + // * `TERMINATION` - TERMINATION + // * `SIGN_ON_BONUS` - SIGN_ON_BONUS + RunType *PayrollRunRunType `json:"run_type,omitempty" url:"run_type,omitempty"` + // The day and time the payroll run started. + StartDate *time.Time `json:"start_date,omitempty" url:"start_date,omitempty"` + // The day and time the payroll run ended. + EndDate *time.Time `json:"end_date,omitempty" url:"end_date,omitempty"` + // The day and time the payroll run was checked. + CheckDate *time.Time `json:"check_date,omitempty" url:"check_date,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` -func (s SelectiveSyncConfigurationsUsageEnum) Ptr() *SelectiveSyncConfigurationsUsageEnum { - return &s + extraProperties map[string]interface{} + rawJSON json.RawMessage } -// # The SyncStatus Object -// -// ### Description -// -// # The `SyncStatus` object is used to represent the syncing state of an account -// -// ### Usage Example -// -// View the `SyncStatus` for an account to see how recently its models were synced. -type SyncStatus struct { - ModelName string `json:"model_name"` - ModelId string `json:"model_id"` - LastSyncStart *time.Time `json:"last_sync_start,omitempty"` - NextSyncStart *time.Time `json:"next_sync_start,omitempty"` - Status SyncStatusStatusEnum `json:"status,omitempty"` - IsInitialSync bool `json:"is_initial_sync"` - SelectiveSyncConfigurationsUsage *SelectiveSyncConfigurationsUsageEnum `json:"selective_sync_configurations_usage,omitempty"` - - _rawJSON json.RawMessage +func (p *PayrollRun) GetId() *string { + if p == nil { + return nil + } + return p.Id } -func (s *SyncStatus) UnmarshalJSON(data []byte) error { - type unmarshaler SyncStatus - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (p *PayrollRun) GetRemoteId() *string { + if p == nil { + return nil } - *s = SyncStatus(value) - s._rawJSON = json.RawMessage(data) - return nil + return p.RemoteId } -func (s *SyncStatus) String() string { - if len(s._rawJSON) > 0 { - if value, err := core.StringifyJSON(s._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(s); err == nil { - return value +func (p *PayrollRun) GetCreatedAt() *time.Time { + if p == nil { + return nil } - return fmt.Sprintf("%#v", s) + return p.CreatedAt } -// - `SYNCING` - SYNCING -// - `DONE` - DONE -// - `FAILED` - FAILED -// - `DISABLED` - DISABLED -// - `PAUSED` - PAUSED -// - `PARTIALLY_SYNCED` - PARTIALLY_SYNCED -type SyncStatusStatusEnum string - -const ( - SyncStatusStatusEnumSyncing SyncStatusStatusEnum = "SYNCING" - SyncStatusStatusEnumDone SyncStatusStatusEnum = "DONE" - SyncStatusStatusEnumFailed SyncStatusStatusEnum = "FAILED" - SyncStatusStatusEnumDisabled SyncStatusStatusEnum = "DISABLED" - SyncStatusStatusEnumPaused SyncStatusStatusEnum = "PAUSED" - SyncStatusStatusEnumPartiallySynced SyncStatusStatusEnum = "PARTIALLY_SYNCED" -) +func (p *PayrollRun) GetModifiedAt() *time.Time { + if p == nil { + return nil + } + return p.ModifiedAt +} -func NewSyncStatusStatusEnumFromString(s string) (SyncStatusStatusEnum, error) { - switch s { - case "SYNCING": - return SyncStatusStatusEnumSyncing, nil - case "DONE": - return SyncStatusStatusEnumDone, nil - case "FAILED": - return SyncStatusStatusEnumFailed, nil - case "DISABLED": - return SyncStatusStatusEnumDisabled, nil - case "PAUSED": - return SyncStatusStatusEnumPaused, nil - case "PARTIALLY_SYNCED": - return SyncStatusStatusEnumPartiallySynced, nil +func (p *PayrollRun) GetRunState() *PayrollRunRunState { + if p == nil { + return nil } - var t SyncStatusStatusEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) + return p.RunState } -func (s SyncStatusStatusEnum) Ptr() *SyncStatusStatusEnum { - return &s +func (p *PayrollRun) GetRunType() *PayrollRunRunType { + if p == nil { + return nil + } + return p.RunType } -// # The Tax Object -// -// ### Description -// -// The `Tax` object is used to represent an array of the tax deductions for a given employee's payroll run. -// -// ### Usage Example -// -// Fetch from the `LIST Taxes` endpoint and filter by `ID` to show all taxes. -type Tax struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - EmployeePayrollRun *string `json:"employee_payroll_run,omitempty"` - // The tax's name. - Name *string `json:"name,omitempty"` - // The tax amount. - Amount *float64 `json:"amount,omitempty"` - // Whether or not the employer is responsible for paying the tax. - EmployerTax *bool `json:"employer_tax,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` +func (p *PayrollRun) GetStartDate() *time.Time { + if p == nil { + return nil + } + return p.StartDate +} - _rawJSON json.RawMessage +func (p *PayrollRun) GetEndDate() *time.Time { + if p == nil { + return nil + } + return p.EndDate } -func (t *Tax) UnmarshalJSON(data []byte) error { - type unmarshaler Tax - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (p *PayrollRun) GetCheckDate() *time.Time { + if p == nil { + return nil } - *t = Tax(value) - t._rawJSON = json.RawMessage(data) - return nil + return p.CheckDate } -func (t *Tax) String() string { - if len(t._rawJSON) > 0 { - if value, err := core.StringifyJSON(t._rawJSON); err == nil { - return value - } +func (p *PayrollRun) GetRemoteWasDeleted() *bool { + if p == nil { + return nil } - if value, err := core.StringifyJSON(t); err == nil { - return value + return p.RemoteWasDeleted +} + +func (p *PayrollRun) GetFieldMappings() map[string]interface{} { + if p == nil { + return nil } - return fmt.Sprintf("%#v", t) + return p.FieldMappings } -// # The Team Object -// -// ### Description -// -// The `Team` object is used to represent a subdivision of the company, usually a department. Each employee will be grouped into one specific Team. -// -// ### Usage Example -// -// If you're building a way to filter by `Team`, you'd hit the `GET Teams` endpoint to fetch the `Teams`, and then use the `ID` of the team your user selects to filter the `GET Employees` endpoint. -type Team struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The team's name. - Name *string `json:"name,omitempty"` - // The team's parent team. - ParentTeam *TeamParentTeam `json:"parent_team,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` +func (p *PayrollRun) GetRemoteData() []*RemoteData { + if p == nil { + return nil + } + return p.RemoteData +} - _rawJSON json.RawMessage +func (p *PayrollRun) GetExtraProperties() map[string]interface{} { + return p.extraProperties } -func (t *Team) UnmarshalJSON(data []byte) error { - type unmarshaler Team - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { +func (p *PayrollRun) UnmarshalJSON(data []byte) error { + type embed PayrollRun + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + StartDate *internal.DateTime `json:"start_date,omitempty"` + EndDate *internal.DateTime `json:"end_date,omitempty"` + CheckDate *internal.DateTime `json:"check_date,omitempty"` + }{ + embed: embed(*p), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *p = PayrollRun(unmarshaler.embed) + p.CreatedAt = unmarshaler.CreatedAt.TimePtr() + p.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + p.StartDate = unmarshaler.StartDate.TimePtr() + p.EndDate = unmarshaler.EndDate.TimePtr() + p.CheckDate = unmarshaler.CheckDate.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { return err } - *t = Team(value) - t._rawJSON = json.RawMessage(data) + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) return nil } -func (t *Team) String() string { - if len(t._rawJSON) > 0 { - if value, err := core.StringifyJSON(t._rawJSON); err == nil { +func (p *PayrollRun) MarshalJSON() ([]byte, error) { + type embed PayrollRun + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + StartDate *internal.DateTime `json:"start_date,omitempty"` + EndDate *internal.DateTime `json:"end_date,omitempty"` + CheckDate *internal.DateTime `json:"check_date,omitempty"` + }{ + embed: embed(*p), + CreatedAt: internal.NewOptionalDateTime(p.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(p.ModifiedAt), + StartDate: internal.NewOptionalDateTime(p.StartDate), + EndDate: internal.NewOptionalDateTime(p.EndDate), + CheckDate: internal.NewOptionalDateTime(p.CheckDate), + } + return json.Marshal(marshaler) +} + +func (p *PayrollRun) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(t); err == nil { + if value, err := internal.StringifyJSON(p); err == nil { return value } - return fmt.Sprintf("%#v", t) + return fmt.Sprintf("%#v", p) } -// The team's parent team. -type TeamParentTeam struct { - typeName string - String string - Team *Team +// The state of the payroll run +// +// * `PAID` - PAID +// * `DRAFT` - DRAFT +// * `APPROVED` - APPROVED +// * `FAILED` - FAILED +// * `CLOSED` - CLOSED +type PayrollRunRunState struct { + RunStateEnum RunStateEnum + String string + + typ string } -func NewTeamParentTeamFromString(value string) *TeamParentTeam { - return &TeamParentTeam{typeName: "string", String: value} +func (p *PayrollRunRunState) GetRunStateEnum() RunStateEnum { + if p == nil { + return "" + } + return p.RunStateEnum } -func NewTeamParentTeamFromTeam(value *Team) *TeamParentTeam { - return &TeamParentTeam{typeName: "team", Team: value} +func (p *PayrollRunRunState) GetString() string { + if p == nil { + return "" + } + return p.String } -func (t *TeamParentTeam) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" - t.String = valueString +func (p *PayrollRunRunState) UnmarshalJSON(data []byte) error { + var valueRunStateEnum RunStateEnum + if err := json.Unmarshal(data, &valueRunStateEnum); err == nil { + p.typ = "RunStateEnum" + p.RunStateEnum = valueRunStateEnum return nil } - valueTeam := new(Team) - if err := json.Unmarshal(data, &valueTeam); err == nil { - t.typeName = "team" - t.Team = valueTeam + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + p.typ = "String" + p.String = valueString return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, t) + return fmt.Errorf("%s cannot be deserialized as a %T", data, p) } -func (t TeamParentTeam) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return json.Marshal(t.String) - case "team": - return json.Marshal(t.Team) +func (p PayrollRunRunState) MarshalJSON() ([]byte, error) { + if p.typ == "RunStateEnum" || p.RunStateEnum != "" { + return json.Marshal(p.RunStateEnum) + } + if p.typ == "String" || p.String != "" { + return json.Marshal(p.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) } -type TeamParentTeamVisitor interface { +type PayrollRunRunStateVisitor interface { + VisitRunStateEnum(RunStateEnum) error VisitString(string) error - VisitTeam(*Team) error } -func (t *TeamParentTeam) Accept(visitor TeamParentTeamVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return visitor.VisitString(t.String) - case "team": - return visitor.VisitTeam(t.Team) +func (p *PayrollRunRunState) Accept(visitor PayrollRunRunStateVisitor) error { + if p.typ == "RunStateEnum" || p.RunStateEnum != "" { + return visitor.VisitRunStateEnum(p.RunStateEnum) + } + if p.typ == "String" || p.String != "" { + return visitor.VisitString(p.String) } + return fmt.Errorf("type %T does not include a non-empty union type", p) } -// # The TimeOff Object -// -// ### Description -// -// The `TimeOff` object is used to represent all employees' Time Off entries. -// -// ### Usage Example +// The type of the payroll run // -// Fetch from the `LIST TimeOffs` endpoint and filter by `ID` to show all time off requests. -type TimeOff struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The employee requesting time off. - Employee *TimeOffEmployee `json:"employee,omitempty"` - // The Merge ID of the employee with the ability to approve the time off request. - Approver *TimeOffApprover `json:"approver,omitempty"` - // The status of this time off request. - // - // - `REQUESTED` - REQUESTED - // - `APPROVED` - APPROVED - // - `DECLINED` - DECLINED - // - `CANCELLED` - CANCELLED - // - `DELETED` - DELETED - Status *TimeOffStatus `json:"status,omitempty"` - // The employee note for this time off request. - EmployeeNote *string `json:"employee_note,omitempty"` - // The measurement that the third-party integration uses to count time requested. - // - // - `HOURS` - HOURS - // - `DAYS` - DAYS - Units *TimeOffUnits `json:"units,omitempty"` - // The time off quantity measured by the prescribed “units”. - Amount *float64 `json:"amount,omitempty"` - // The type of time off request. - // - // - `VACATION` - VACATION - // - `SICK` - SICK - // - `PERSONAL` - PERSONAL - // - `JURY_DUTY` - JURY_DUTY - // - `VOLUNTEER` - VOLUNTEER - // - `BEREAVEMENT` - BEREAVEMENT - RequestType *TimeOffRequestType `json:"request_type,omitempty"` - // The day and time of the start of the time requested off. - StartTime *time.Time `json:"start_time,omitempty"` - // The day and time of the end of the time requested off. - EndTime *time.Time `json:"end_time,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` +// * `REGULAR` - REGULAR +// * `OFF_CYCLE` - OFF_CYCLE +// * `CORRECTION` - CORRECTION +// * `TERMINATION` - TERMINATION +// * `SIGN_ON_BONUS` - SIGN_ON_BONUS +type PayrollRunRunType struct { + RunTypeEnum RunTypeEnum + String string - _rawJSON json.RawMessage + typ string } -func (t *TimeOff) UnmarshalJSON(data []byte) error { - type unmarshaler TimeOff - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (p *PayrollRunRunType) GetRunTypeEnum() RunTypeEnum { + if p == nil { + return "" } - *t = TimeOff(value) - t._rawJSON = json.RawMessage(data) - return nil + return p.RunTypeEnum } -func (t *TimeOff) String() string { - if len(t._rawJSON) > 0 { - if value, err := core.StringifyJSON(t._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(t); err == nil { - return value +func (p *PayrollRunRunType) GetString() string { + if p == nil { + return "" } - return fmt.Sprintf("%#v", t) -} - -// The Merge ID of the employee with the ability to approve the time off request. -type TimeOffApprover struct { - typeName string - String string - Employee *Employee -} - -func NewTimeOffApproverFromString(value string) *TimeOffApprover { - return &TimeOffApprover{typeName: "string", String: value} -} - -func NewTimeOffApproverFromEmployee(value *Employee) *TimeOffApprover { - return &TimeOffApprover{typeName: "employee", Employee: value} + return p.String } -func (t *TimeOffApprover) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" - t.String = valueString +func (p *PayrollRunRunType) UnmarshalJSON(data []byte) error { + var valueRunTypeEnum RunTypeEnum + if err := json.Unmarshal(data, &valueRunTypeEnum); err == nil { + p.typ = "RunTypeEnum" + p.RunTypeEnum = valueRunTypeEnum return nil } - valueEmployee := new(Employee) - if err := json.Unmarshal(data, &valueEmployee); err == nil { - t.typeName = "employee" - t.Employee = valueEmployee + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + p.typ = "String" + p.String = valueString return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, t) + return fmt.Errorf("%s cannot be deserialized as a %T", data, p) } -func (t TimeOffApprover) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return json.Marshal(t.String) - case "employee": - return json.Marshal(t.Employee) +func (p PayrollRunRunType) MarshalJSON() ([]byte, error) { + if p.typ == "RunTypeEnum" || p.RunTypeEnum != "" { + return json.Marshal(p.RunTypeEnum) + } + if p.typ == "String" || p.String != "" { + return json.Marshal(p.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) } -type TimeOffApproverVisitor interface { +type PayrollRunRunTypeVisitor interface { + VisitRunTypeEnum(RunTypeEnum) error VisitString(string) error - VisitEmployee(*Employee) error } -func (t *TimeOffApprover) Accept(visitor TimeOffApproverVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return visitor.VisitString(t.String) - case "employee": - return visitor.VisitEmployee(t.Employee) +func (p *PayrollRunRunType) Accept(visitor PayrollRunRunTypeVisitor) error { + if p.typ == "RunTypeEnum" || p.RunTypeEnum != "" { + return visitor.VisitRunTypeEnum(p.RunTypeEnum) + } + if p.typ == "String" || p.String != "" { + return visitor.VisitString(p.String) } + return fmt.Errorf("type %T does not include a non-empty union type", p) } -// # The TimeOffBalance Object -// +// # The RemoteData Object // ### Description -// -// The `TimeOffBalance` object is used to represent current balances for an employee's Time Off plan. +// The `RemoteData` object is used to represent the full data pulled from the third-party API for an object. // // ### Usage Example -// -// Fetch from the `LIST TimeOffBalances` endpoint and filter by `ID` to show all time off balances. -type TimeOffBalance struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The employee the balance belongs to. - Employee *TimeOffBalanceEmployee `json:"employee,omitempty"` - // The current remaining PTO balance, measured in hours. For integrations that return this value in days, Merge multiplies by 8 to calculate hours. - Balance *float64 `json:"balance,omitempty"` - // The amount of PTO used in terms of hours. For integrations that return this value in days, Merge multiplies by 8 to calculate hours. - Used *float64 `json:"used,omitempty"` - // The policy type of this time off balance. - // - // - `VACATION` - VACATION - // - `SICK` - SICK - // - `PERSONAL` - PERSONAL - // - `JURY_DUTY` - JURY_DUTY - // - `VOLUNTEER` - VOLUNTEER - // - `BEREAVEMENT` - BEREAVEMENT - PolicyType *TimeOffBalancePolicyType `json:"policy_type,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` +// TODO +type RemoteData struct { + // The third-party API path that is being called. + Path string `json:"path" url:"path"` + Data interface{} `json:"data,omitempty" url:"data,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (t *TimeOffBalance) UnmarshalJSON(data []byte) error { - type unmarshaler TimeOffBalance - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (r *RemoteData) GetPath() string { + if r == nil { + return "" } - *t = TimeOffBalance(value) - t._rawJSON = json.RawMessage(data) - return nil + return r.Path } -func (t *TimeOffBalance) String() string { - if len(t._rawJSON) > 0 { - if value, err := core.StringifyJSON(t._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(t); err == nil { - return value +func (r *RemoteData) GetData() interface{} { + if r == nil { + return nil } - return fmt.Sprintf("%#v", t) -} - -// The employee the balance belongs to. -type TimeOffBalanceEmployee struct { - typeName string - String string - Employee *Employee -} - -func NewTimeOffBalanceEmployeeFromString(value string) *TimeOffBalanceEmployee { - return &TimeOffBalanceEmployee{typeName: "string", String: value} + return r.Data } -func NewTimeOffBalanceEmployeeFromEmployee(value *Employee) *TimeOffBalanceEmployee { - return &TimeOffBalanceEmployee{typeName: "employee", Employee: value} +func (r *RemoteData) GetExtraProperties() map[string]interface{} { + return r.extraProperties } -func (t *TimeOffBalanceEmployee) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" - t.String = valueString - return nil +func (r *RemoteData) UnmarshalJSON(data []byte) error { + type unmarshaler RemoteData + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err } - valueEmployee := new(Employee) - if err := json.Unmarshal(data, &valueEmployee); err == nil { - t.typeName = "employee" - t.Employee = valueEmployee - return nil + *r = RemoteData(value) + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { + return err } - return fmt.Errorf("%s cannot be deserialized as a %T", data, t) + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) + return nil } -func (t TimeOffBalanceEmployee) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return json.Marshal(t.String) - case "employee": - return json.Marshal(t.Employee) +func (r *RemoteData) String() string { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(r); err == nil { + return value } + return fmt.Sprintf("%#v", r) } -type TimeOffBalanceEmployeeVisitor interface { - VisitString(string) error - VisitEmployee(*Employee) error -} +// # The RemoteKey Object +// ### Description +// The `RemoteKey` object is used to represent a request for a new remote key. +// +// ### Usage Example +// Post a `GenerateRemoteKey` to receive a new `RemoteKey`. +type RemoteKey struct { + Name string `json:"name" url:"name"` + Key string `json:"key" url:"key"` -func (t *TimeOffBalanceEmployee) Accept(visitor TimeOffBalanceEmployeeVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return visitor.VisitString(t.String) - case "employee": - return visitor.VisitEmployee(t.Employee) - } + extraProperties map[string]interface{} + rawJSON json.RawMessage } -// The policy type of this time off balance. -// -// - `VACATION` - VACATION -// - `SICK` - SICK -// - `PERSONAL` - PERSONAL -// - `JURY_DUTY` - JURY_DUTY -// - `VOLUNTEER` - VOLUNTEER -// - `BEREAVEMENT` - BEREAVEMENT -type TimeOffBalancePolicyType struct { - typeName string - PolicyTypeEnum PolicyTypeEnum - String string +func (r *RemoteKey) GetName() string { + if r == nil { + return "" + } + return r.Name } -func NewTimeOffBalancePolicyTypeFromPolicyTypeEnum(value PolicyTypeEnum) *TimeOffBalancePolicyType { - return &TimeOffBalancePolicyType{typeName: "policyTypeEnum", PolicyTypeEnum: value} +func (r *RemoteKey) GetKey() string { + if r == nil { + return "" + } + return r.Key } -func NewTimeOffBalancePolicyTypeFromString(value string) *TimeOffBalancePolicyType { - return &TimeOffBalancePolicyType{typeName: "string", String: value} +func (r *RemoteKey) GetExtraProperties() map[string]interface{} { + return r.extraProperties } -func (t *TimeOffBalancePolicyType) UnmarshalJSON(data []byte) error { - var valuePolicyTypeEnum PolicyTypeEnum - if err := json.Unmarshal(data, &valuePolicyTypeEnum); err == nil { - t.typeName = "policyTypeEnum" - t.PolicyTypeEnum = valuePolicyTypeEnum - return nil +func (r *RemoteKey) UnmarshalJSON(data []byte) error { + type unmarshaler RemoteKey + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" - t.String = valueString - return nil + *r = RemoteKey(value) + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { + return err } - return fmt.Errorf("%s cannot be deserialized as a %T", data, t) + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) + return nil } -func (t TimeOffBalancePolicyType) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "policyTypeEnum": - return json.Marshal(t.PolicyTypeEnum) - case "string": - return json.Marshal(t.String) +func (r *RemoteKey) String() string { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(r); err == nil { + return value } + return fmt.Sprintf("%#v", r) } -type TimeOffBalancePolicyTypeVisitor interface { - VisitPolicyTypeEnum(PolicyTypeEnum) error - VisitString(string) error -} +// # The RemoteResponse Object +// ### Description +// The `RemoteResponse` object is used to represent information returned from a third-party endpoint. +// +// ### Usage Example +// View the `RemoteResponse` returned from your `DataPassthrough`. +type RemoteResponse struct { + Method string `json:"method" url:"method"` + Path string `json:"path" url:"path"` + Status int `json:"status" url:"status"` + Response interface{} `json:"response" url:"response"` + ResponseHeaders map[string]interface{} `json:"response_headers,omitempty" url:"response_headers,omitempty"` + ResponseType *RemoteResponseResponseType `json:"response_type,omitempty" url:"response_type,omitempty"` + Headers map[string]interface{} `json:"headers,omitempty" url:"headers,omitempty"` -func (t *TimeOffBalancePolicyType) Accept(visitor TimeOffBalancePolicyTypeVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "policyTypeEnum": - return visitor.VisitPolicyTypeEnum(t.PolicyTypeEnum) - case "string": - return visitor.VisitString(t.String) - } + extraProperties map[string]interface{} + rawJSON json.RawMessage } -// The employee requesting time off. -type TimeOffEmployee struct { - typeName string - String string - Employee *Employee +func (r *RemoteResponse) GetMethod() string { + if r == nil { + return "" + } + return r.Method } -func NewTimeOffEmployeeFromString(value string) *TimeOffEmployee { - return &TimeOffEmployee{typeName: "string", String: value} +func (r *RemoteResponse) GetPath() string { + if r == nil { + return "" + } + return r.Path } -func NewTimeOffEmployeeFromEmployee(value *Employee) *TimeOffEmployee { - return &TimeOffEmployee{typeName: "employee", Employee: value} +func (r *RemoteResponse) GetStatus() int { + if r == nil { + return 0 + } + return r.Status } -func (t *TimeOffEmployee) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" - t.String = valueString +func (r *RemoteResponse) GetResponse() interface{} { + if r == nil { return nil } - valueEmployee := new(Employee) - if err := json.Unmarshal(data, &valueEmployee); err == nil { - t.typeName = "employee" - t.Employee = valueEmployee + return r.Response +} + +func (r *RemoteResponse) GetResponseHeaders() map[string]interface{} { + if r == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, t) + return r.ResponseHeaders } -func (t TimeOffEmployee) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return json.Marshal(t.String) - case "employee": - return json.Marshal(t.Employee) +func (r *RemoteResponse) GetResponseType() *RemoteResponseResponseType { + if r == nil { + return nil } + return r.ResponseType } -type TimeOffEmployeeVisitor interface { - VisitString(string) error - VisitEmployee(*Employee) error +func (r *RemoteResponse) GetHeaders() map[string]interface{} { + if r == nil { + return nil + } + return r.Headers } -func (t *TimeOffEmployee) Accept(visitor TimeOffEmployeeVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return visitor.VisitString(t.String) - case "employee": - return visitor.VisitEmployee(t.Employee) - } +func (r *RemoteResponse) GetExtraProperties() map[string]interface{} { + return r.extraProperties } -// # The TimeOff Object -// -// ### Description -// -// The `TimeOff` object is used to represent all employees' Time Off entries. -// -// ### Usage Example -// -// Fetch from the `LIST TimeOffs` endpoint and filter by `ID` to show all time off requests. -type TimeOffRequest struct { - // The employee requesting time off. - Employee *TimeOffRequestEmployee `json:"employee,omitempty"` - // The Merge ID of the employee with the ability to approve the time off request. - Approver *TimeOffRequestApprover `json:"approver,omitempty"` - // The status of this time off request. - // - // - `REQUESTED` - REQUESTED - // - `APPROVED` - APPROVED - // - `DECLINED` - DECLINED - // - `CANCELLED` - CANCELLED - // - `DELETED` - DELETED - Status *TimeOffRequestStatus `json:"status,omitempty"` - // The employee note for this time off request. - EmployeeNote *string `json:"employee_note,omitempty"` - // The measurement that the third-party integration uses to count time requested. - // - // - `HOURS` - HOURS - // - `DAYS` - DAYS - Units *TimeOffRequestUnits `json:"units,omitempty"` - // The time off quantity measured by the prescribed “units”. - Amount *float64 `json:"amount,omitempty"` - // The type of time off request. - // - // - `VACATION` - VACATION - // - `SICK` - SICK - // - `PERSONAL` - PERSONAL - // - `JURY_DUTY` - JURY_DUTY - // - `VOLUNTEER` - VOLUNTEER - // - `BEREAVEMENT` - BEREAVEMENT - RequestType *TimeOffRequestRequestType `json:"request_type,omitempty"` - // The day and time of the start of the time requested off. - StartTime *time.Time `json:"start_time,omitempty"` - // The day and time of the end of the time requested off. - EndTime *time.Time `json:"end_time,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` - - _rawJSON json.RawMessage -} - -func (t *TimeOffRequest) UnmarshalJSON(data []byte) error { - type unmarshaler TimeOffRequest +func (r *RemoteResponse) UnmarshalJSON(data []byte) error { + type unmarshaler RemoteResponse var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *t = TimeOffRequest(value) - t._rawJSON = json.RawMessage(data) + *r = RemoteResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { + return err + } + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) return nil } -func (t *TimeOffRequest) String() string { - if len(t._rawJSON) > 0 { - if value, err := core.StringifyJSON(t._rawJSON); err == nil { +func (r *RemoteResponse) String() string { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(t); err == nil { + if value, err := internal.StringifyJSON(r); err == nil { return value } - return fmt.Sprintf("%#v", t) + return fmt.Sprintf("%#v", r) } -// The Merge ID of the employee with the ability to approve the time off request. -type TimeOffRequestApprover struct { - typeName string - String string - Employee *Employee +type RemoteResponseResponseType struct { + ResponseTypeEnum ResponseTypeEnum + String string + + typ string } -func NewTimeOffRequestApproverFromString(value string) *TimeOffRequestApprover { - return &TimeOffRequestApprover{typeName: "string", String: value} +func (r *RemoteResponseResponseType) GetResponseTypeEnum() ResponseTypeEnum { + if r == nil { + return "" + } + return r.ResponseTypeEnum } -func NewTimeOffRequestApproverFromEmployee(value *Employee) *TimeOffRequestApprover { - return &TimeOffRequestApprover{typeName: "employee", Employee: value} +func (r *RemoteResponseResponseType) GetString() string { + if r == nil { + return "" + } + return r.String } -func (t *TimeOffRequestApprover) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" - t.String = valueString +func (r *RemoteResponseResponseType) UnmarshalJSON(data []byte) error { + var valueResponseTypeEnum ResponseTypeEnum + if err := json.Unmarshal(data, &valueResponseTypeEnum); err == nil { + r.typ = "ResponseTypeEnum" + r.ResponseTypeEnum = valueResponseTypeEnum return nil } - valueEmployee := new(Employee) - if err := json.Unmarshal(data, &valueEmployee); err == nil { - t.typeName = "employee" - t.Employee = valueEmployee + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + r.typ = "String" + r.String = valueString return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, t) + return fmt.Errorf("%s cannot be deserialized as a %T", data, r) } -func (t TimeOffRequestApprover) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return json.Marshal(t.String) - case "employee": - return json.Marshal(t.Employee) +func (r RemoteResponseResponseType) MarshalJSON() ([]byte, error) { + if r.typ == "ResponseTypeEnum" || r.ResponseTypeEnum != "" { + return json.Marshal(r.ResponseTypeEnum) } -} - -type TimeOffRequestApproverVisitor interface { - VisitString(string) error - VisitEmployee(*Employee) error -} - -func (t *TimeOffRequestApprover) Accept(visitor TimeOffRequestApproverVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return visitor.VisitString(t.String) - case "employee": - return visitor.VisitEmployee(t.Employee) + if r.typ == "String" || r.String != "" { + return json.Marshal(r.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", r) } -// The employee requesting time off. -type TimeOffRequestEmployee struct { - typeName string - String string - Employee *Employee -} - -func NewTimeOffRequestEmployeeFromString(value string) *TimeOffRequestEmployee { - return &TimeOffRequestEmployee{typeName: "string", String: value} -} - -func NewTimeOffRequestEmployeeFromEmployee(value *Employee) *TimeOffRequestEmployee { - return &TimeOffRequestEmployee{typeName: "employee", Employee: value} +type RemoteResponseResponseTypeVisitor interface { + VisitResponseTypeEnum(ResponseTypeEnum) error + VisitString(string) error } -func (t *TimeOffRequestEmployee) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" - t.String = valueString - return nil +func (r *RemoteResponseResponseType) Accept(visitor RemoteResponseResponseTypeVisitor) error { + if r.typ == "ResponseTypeEnum" || r.ResponseTypeEnum != "" { + return visitor.VisitResponseTypeEnum(r.ResponseTypeEnum) } - valueEmployee := new(Employee) - if err := json.Unmarshal(data, &valueEmployee); err == nil { - t.typeName = "employee" - t.Employee = valueEmployee - return nil + if r.typ == "String" || r.String != "" { + return visitor.VisitString(r.String) } - return fmt.Errorf("%s cannot be deserialized as a %T", data, t) + return fmt.Errorf("type %T does not include a non-empty union type", r) } -func (t TimeOffRequestEmployee) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return json.Marshal(t.String) - case "employee": - return json.Marshal(t.Employee) - } -} +// * `JSON` - JSON +// * `XML` - XML +// * `MULTIPART` - MULTIPART +type RequestFormatEnum string -type TimeOffRequestEmployeeVisitor interface { - VisitString(string) error - VisitEmployee(*Employee) error -} +const ( + RequestFormatEnumJson RequestFormatEnum = "JSON" + RequestFormatEnumXml RequestFormatEnum = "XML" + RequestFormatEnumMultipart RequestFormatEnum = "MULTIPART" +) -func (t *TimeOffRequestEmployee) Accept(visitor TimeOffRequestEmployeeVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return visitor.VisitString(t.String) - case "employee": - return visitor.VisitEmployee(t.Employee) +func NewRequestFormatEnumFromString(s string) (RequestFormatEnum, error) { + switch s { + case "JSON": + return RequestFormatEnumJson, nil + case "XML": + return RequestFormatEnumXml, nil + case "MULTIPART": + return RequestFormatEnumMultipart, nil } + var t RequestFormatEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -// The type of time off request. -// -// - `VACATION` - VACATION -// - `SICK` - SICK -// - `PERSONAL` - PERSONAL -// - `JURY_DUTY` - JURY_DUTY -// - `VOLUNTEER` - VOLUNTEER -// - `BEREAVEMENT` - BEREAVEMENT -type TimeOffRequestRequestType struct { - typeName string - RequestTypeEnum RequestTypeEnum - String string +func (r RequestFormatEnum) Ptr() *RequestFormatEnum { + return &r } -func NewTimeOffRequestRequestTypeFromRequestTypeEnum(value RequestTypeEnum) *TimeOffRequestRequestType { - return &TimeOffRequestRequestType{typeName: "requestTypeEnum", RequestTypeEnum: value} -} +// * `JSON` - JSON +// * `BASE64_GZIP` - BASE64_GZIP +type ResponseTypeEnum string -func NewTimeOffRequestRequestTypeFromString(value string) *TimeOffRequestRequestType { - return &TimeOffRequestRequestType{typeName: "string", String: value} -} +const ( + ResponseTypeEnumJson ResponseTypeEnum = "JSON" + ResponseTypeEnumBase64Gzip ResponseTypeEnum = "BASE64_GZIP" +) -func (t *TimeOffRequestRequestType) UnmarshalJSON(data []byte) error { - var valueRequestTypeEnum RequestTypeEnum - if err := json.Unmarshal(data, &valueRequestTypeEnum); err == nil { - t.typeName = "requestTypeEnum" - t.RequestTypeEnum = valueRequestTypeEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" - t.String = valueString - return nil +func NewResponseTypeEnumFromString(s string) (ResponseTypeEnum, error) { + switch s { + case "JSON": + return ResponseTypeEnumJson, nil + case "BASE64_GZIP": + return ResponseTypeEnumBase64Gzip, nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, t) + var t ResponseTypeEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (t TimeOffRequestRequestType) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "requestTypeEnum": - return json.Marshal(t.RequestTypeEnum) - case "string": - return json.Marshal(t.String) - } +func (r ResponseTypeEnum) Ptr() *ResponseTypeEnum { + return &r } -type TimeOffRequestRequestTypeVisitor interface { - VisitRequestTypeEnum(RequestTypeEnum) error - VisitString(string) error -} +// * `PAID` - PAID +// * `DRAFT` - DRAFT +// * `APPROVED` - APPROVED +// * `FAILED` - FAILED +// * `CLOSED` - CLOSED +type RunStateEnum string -func (t *TimeOffRequestRequestType) Accept(visitor TimeOffRequestRequestTypeVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "requestTypeEnum": - return visitor.VisitRequestTypeEnum(t.RequestTypeEnum) - case "string": - return visitor.VisitString(t.String) +const ( + RunStateEnumPaid RunStateEnum = "PAID" + RunStateEnumDraft RunStateEnum = "DRAFT" + RunStateEnumApproved RunStateEnum = "APPROVED" + RunStateEnumFailed RunStateEnum = "FAILED" + RunStateEnumClosed RunStateEnum = "CLOSED" +) + +func NewRunStateEnumFromString(s string) (RunStateEnum, error) { + switch s { + case "PAID": + return RunStateEnumPaid, nil + case "DRAFT": + return RunStateEnumDraft, nil + case "APPROVED": + return RunStateEnumApproved, nil + case "FAILED": + return RunStateEnumFailed, nil + case "CLOSED": + return RunStateEnumClosed, nil } + var t RunStateEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -// The status of this time off request. -// -// - `REQUESTED` - REQUESTED -// - `APPROVED` - APPROVED -// - `DECLINED` - DECLINED -// - `CANCELLED` - CANCELLED -// - `DELETED` - DELETED -type TimeOffRequestStatus struct { - typeName string - TimeOffStatusEnum TimeOffStatusEnum - String string +func (r RunStateEnum) Ptr() *RunStateEnum { + return &r } -func NewTimeOffRequestStatusFromTimeOffStatusEnum(value TimeOffStatusEnum) *TimeOffRequestStatus { - return &TimeOffRequestStatus{typeName: "timeOffStatusEnum", TimeOffStatusEnum: value} -} +// * `REGULAR` - REGULAR +// * `OFF_CYCLE` - OFF_CYCLE +// * `CORRECTION` - CORRECTION +// * `TERMINATION` - TERMINATION +// * `SIGN_ON_BONUS` - SIGN_ON_BONUS +type RunTypeEnum string -func NewTimeOffRequestStatusFromString(value string) *TimeOffRequestStatus { - return &TimeOffRequestStatus{typeName: "string", String: value} -} +const ( + RunTypeEnumRegular RunTypeEnum = "REGULAR" + RunTypeEnumOffCycle RunTypeEnum = "OFF_CYCLE" + RunTypeEnumCorrection RunTypeEnum = "CORRECTION" + RunTypeEnumTermination RunTypeEnum = "TERMINATION" + RunTypeEnumSignOnBonus RunTypeEnum = "SIGN_ON_BONUS" +) -func (t *TimeOffRequestStatus) UnmarshalJSON(data []byte) error { - var valueTimeOffStatusEnum TimeOffStatusEnum - if err := json.Unmarshal(data, &valueTimeOffStatusEnum); err == nil { - t.typeName = "timeOffStatusEnum" - t.TimeOffStatusEnum = valueTimeOffStatusEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" - t.String = valueString - return nil +func NewRunTypeEnumFromString(s string) (RunTypeEnum, error) { + switch s { + case "REGULAR": + return RunTypeEnumRegular, nil + case "OFF_CYCLE": + return RunTypeEnumOffCycle, nil + case "CORRECTION": + return RunTypeEnumCorrection, nil + case "TERMINATION": + return RunTypeEnumTermination, nil + case "SIGN_ON_BONUS": + return RunTypeEnumSignOnBonus, nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, t) + var t RunTypeEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (t TimeOffRequestStatus) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "timeOffStatusEnum": - return json.Marshal(t.TimeOffStatusEnum) - case "string": - return json.Marshal(t.String) - } +func (r RunTypeEnum) Ptr() *RunTypeEnum { + return &r } -type TimeOffRequestStatusVisitor interface { - VisitTimeOffStatusEnum(TimeOffStatusEnum) error - VisitString(string) error -} +// * `IN_NEXT_SYNC` - IN_NEXT_SYNC +// * `IN_LAST_SYNC` - IN_LAST_SYNC +type SelectiveSyncConfigurationsUsageEnum string -func (t *TimeOffRequestStatus) Accept(visitor TimeOffRequestStatusVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "timeOffStatusEnum": - return visitor.VisitTimeOffStatusEnum(t.TimeOffStatusEnum) - case "string": - return visitor.VisitString(t.String) +const ( + SelectiveSyncConfigurationsUsageEnumInNextSync SelectiveSyncConfigurationsUsageEnum = "IN_NEXT_SYNC" + SelectiveSyncConfigurationsUsageEnumInLastSync SelectiveSyncConfigurationsUsageEnum = "IN_LAST_SYNC" +) + +func NewSelectiveSyncConfigurationsUsageEnumFromString(s string) (SelectiveSyncConfigurationsUsageEnum, error) { + switch s { + case "IN_NEXT_SYNC": + return SelectiveSyncConfigurationsUsageEnumInNextSync, nil + case "IN_LAST_SYNC": + return SelectiveSyncConfigurationsUsageEnumInLastSync, nil } + var t SelectiveSyncConfigurationsUsageEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -// The type of time off request. -// -// - `VACATION` - VACATION -// - `SICK` - SICK -// - `PERSONAL` - PERSONAL -// - `JURY_DUTY` - JURY_DUTY -// - `VOLUNTEER` - VOLUNTEER -// - `BEREAVEMENT` - BEREAVEMENT -type TimeOffRequestType struct { - typeName string - RequestTypeEnum RequestTypeEnum - String string +func (s SelectiveSyncConfigurationsUsageEnum) Ptr() *SelectiveSyncConfigurationsUsageEnum { + return &s } -func NewTimeOffRequestTypeFromRequestTypeEnum(value RequestTypeEnum) *TimeOffRequestType { - return &TimeOffRequestType{typeName: "requestTypeEnum", RequestTypeEnum: value} -} +// * `SYNCING` - SYNCING +// * `DONE` - DONE +// * `FAILED` - FAILED +// * `DISABLED` - DISABLED +// * `PAUSED` - PAUSED +// * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED +type StatusFd5Enum string -func NewTimeOffRequestTypeFromString(value string) *TimeOffRequestType { - return &TimeOffRequestType{typeName: "string", String: value} -} +const ( + StatusFd5EnumSyncing StatusFd5Enum = "SYNCING" + StatusFd5EnumDone StatusFd5Enum = "DONE" + StatusFd5EnumFailed StatusFd5Enum = "FAILED" + StatusFd5EnumDisabled StatusFd5Enum = "DISABLED" + StatusFd5EnumPaused StatusFd5Enum = "PAUSED" + StatusFd5EnumPartiallySynced StatusFd5Enum = "PARTIALLY_SYNCED" +) -func (t *TimeOffRequestType) UnmarshalJSON(data []byte) error { - var valueRequestTypeEnum RequestTypeEnum - if err := json.Unmarshal(data, &valueRequestTypeEnum); err == nil { - t.typeName = "requestTypeEnum" - t.RequestTypeEnum = valueRequestTypeEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" - t.String = valueString - return nil +func NewStatusFd5EnumFromString(s string) (StatusFd5Enum, error) { + switch s { + case "SYNCING": + return StatusFd5EnumSyncing, nil + case "DONE": + return StatusFd5EnumDone, nil + case "FAILED": + return StatusFd5EnumFailed, nil + case "DISABLED": + return StatusFd5EnumDisabled, nil + case "PAUSED": + return StatusFd5EnumPaused, nil + case "PARTIALLY_SYNCED": + return StatusFd5EnumPartiallySynced, nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, t) + var t StatusFd5Enum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (t TimeOffRequestType) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "requestTypeEnum": - return json.Marshal(t.RequestTypeEnum) - case "string": - return json.Marshal(t.String) - } +func (s StatusFd5Enum) Ptr() *StatusFd5Enum { + return &s } -type TimeOffRequestTypeVisitor interface { - VisitRequestTypeEnum(RequestTypeEnum) error - VisitString(string) error +// # The SyncStatus Object +// ### Description +// The `SyncStatus` object is used to represent the syncing state of an account +// +// ### Usage Example +// View the `SyncStatus` for an account to see how recently its models were synced. +type SyncStatus struct { + ModelName string `json:"model_name" url:"model_name"` + ModelId string `json:"model_id" url:"model_id"` + LastSyncStart *time.Time `json:"last_sync_start,omitempty" url:"last_sync_start,omitempty"` + NextSyncStart *time.Time `json:"next_sync_start,omitempty" url:"next_sync_start,omitempty"` + LastSyncResult *SyncStatusLastSyncResult `json:"last_sync_result,omitempty" url:"last_sync_result,omitempty"` + LastSyncFinished *time.Time `json:"last_sync_finished,omitempty" url:"last_sync_finished,omitempty"` + Status *SyncStatusStatus `json:"status" url:"status"` + IsInitialSync bool `json:"is_initial_sync" url:"is_initial_sync"` + SelectiveSyncConfigurationsUsage *SelectiveSyncConfigurationsUsageEnum `json:"selective_sync_configurations_usage,omitempty" url:"selective_sync_configurations_usage,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (t *TimeOffRequestType) Accept(visitor TimeOffRequestTypeVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "requestTypeEnum": - return visitor.VisitRequestTypeEnum(t.RequestTypeEnum) - case "string": - return visitor.VisitString(t.String) +func (s *SyncStatus) GetModelName() string { + if s == nil { + return "" } + return s.ModelName } -// The measurement that the third-party integration uses to count time requested. -// -// - `HOURS` - HOURS -// - `DAYS` - DAYS -type TimeOffRequestUnits struct { - typeName string - UnitsEnum UnitsEnum - String string +func (s *SyncStatus) GetModelId() string { + if s == nil { + return "" + } + return s.ModelId } -func NewTimeOffRequestUnitsFromUnitsEnum(value UnitsEnum) *TimeOffRequestUnits { - return &TimeOffRequestUnits{typeName: "unitsEnum", UnitsEnum: value} +func (s *SyncStatus) GetLastSyncStart() *time.Time { + if s == nil { + return nil + } + return s.LastSyncStart } -func NewTimeOffRequestUnitsFromString(value string) *TimeOffRequestUnits { - return &TimeOffRequestUnits{typeName: "string", String: value} +func (s *SyncStatus) GetNextSyncStart() *time.Time { + if s == nil { + return nil + } + return s.NextSyncStart } -func (t *TimeOffRequestUnits) UnmarshalJSON(data []byte) error { - var valueUnitsEnum UnitsEnum - if err := json.Unmarshal(data, &valueUnitsEnum); err == nil { - t.typeName = "unitsEnum" - t.UnitsEnum = valueUnitsEnum +func (s *SyncStatus) GetLastSyncResult() *SyncStatusLastSyncResult { + if s == nil { return nil } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" - t.String = valueString + return s.LastSyncResult +} + +func (s *SyncStatus) GetLastSyncFinished() *time.Time { + if s == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, t) + return s.LastSyncFinished } -func (t TimeOffRequestUnits) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "unitsEnum": - return json.Marshal(t.UnitsEnum) - case "string": - return json.Marshal(t.String) +func (s *SyncStatus) GetStatus() *SyncStatusStatus { + if s == nil { + return nil } + return s.Status } -type TimeOffRequestUnitsVisitor interface { - VisitUnitsEnum(UnitsEnum) error - VisitString(string) error +func (s *SyncStatus) GetIsInitialSync() bool { + if s == nil { + return false + } + return s.IsInitialSync } -func (t *TimeOffRequestUnits) Accept(visitor TimeOffRequestUnitsVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "unitsEnum": - return visitor.VisitUnitsEnum(t.UnitsEnum) - case "string": - return visitor.VisitString(t.String) +func (s *SyncStatus) GetSelectiveSyncConfigurationsUsage() *SelectiveSyncConfigurationsUsageEnum { + if s == nil { + return nil } + return s.SelectiveSyncConfigurationsUsage } -type TimeOffResponse struct { - Model *TimeOff `json:"model,omitempty"` - Warnings []*WarningValidationProblem `json:"warnings,omitempty"` - Errors []*ErrorValidationProblem `json:"errors,omitempty"` - Logs []*DebugModeLog `json:"logs,omitempty"` - - _rawJSON json.RawMessage +func (s *SyncStatus) GetExtraProperties() map[string]interface{} { + return s.extraProperties } -func (t *TimeOffResponse) UnmarshalJSON(data []byte) error { - type unmarshaler TimeOffResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { +func (s *SyncStatus) UnmarshalJSON(data []byte) error { + type embed SyncStatus + var unmarshaler = struct { + embed + LastSyncStart *internal.DateTime `json:"last_sync_start,omitempty"` + NextSyncStart *internal.DateTime `json:"next_sync_start,omitempty"` + LastSyncFinished *internal.DateTime `json:"last_sync_finished,omitempty"` + }{ + embed: embed(*s), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *s = SyncStatus(unmarshaler.embed) + s.LastSyncStart = unmarshaler.LastSyncStart.TimePtr() + s.NextSyncStart = unmarshaler.NextSyncStart.TimePtr() + s.LastSyncFinished = unmarshaler.LastSyncFinished.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *s) + if err != nil { return err } - *t = TimeOffResponse(value) - t._rawJSON = json.RawMessage(data) + s.extraProperties = extraProperties + s.rawJSON = json.RawMessage(data) return nil } -func (t *TimeOffResponse) String() string { - if len(t._rawJSON) > 0 { - if value, err := core.StringifyJSON(t._rawJSON); err == nil { +func (s *SyncStatus) MarshalJSON() ([]byte, error) { + type embed SyncStatus + var marshaler = struct { + embed + LastSyncStart *internal.DateTime `json:"last_sync_start,omitempty"` + NextSyncStart *internal.DateTime `json:"next_sync_start,omitempty"` + LastSyncFinished *internal.DateTime `json:"last_sync_finished,omitempty"` + }{ + embed: embed(*s), + LastSyncStart: internal.NewOptionalDateTime(s.LastSyncStart), + NextSyncStart: internal.NewOptionalDateTime(s.NextSyncStart), + LastSyncFinished: internal.NewOptionalDateTime(s.LastSyncFinished), + } + return json.Marshal(marshaler) +} + +func (s *SyncStatus) String() string { + if len(s.rawJSON) > 0 { + if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(t); err == nil { + if value, err := internal.StringifyJSON(s); err == nil { return value } - return fmt.Sprintf("%#v", t) + return fmt.Sprintf("%#v", s) } -// The status of this time off request. -// -// - `REQUESTED` - REQUESTED -// - `APPROVED` - APPROVED -// - `DECLINED` - DECLINED -// - `CANCELLED` - CANCELLED -// - `DELETED` - DELETED -type TimeOffStatus struct { - typeName string - TimeOffStatusEnum TimeOffStatusEnum - String string +type SyncStatusLastSyncResult struct { + LastSyncResultEnum LastSyncResultEnum + String string + + typ string } -func NewTimeOffStatusFromTimeOffStatusEnum(value TimeOffStatusEnum) *TimeOffStatus { - return &TimeOffStatus{typeName: "timeOffStatusEnum", TimeOffStatusEnum: value} +func (s *SyncStatusLastSyncResult) GetLastSyncResultEnum() LastSyncResultEnum { + if s == nil { + return "" + } + return s.LastSyncResultEnum } -func NewTimeOffStatusFromString(value string) *TimeOffStatus { - return &TimeOffStatus{typeName: "string", String: value} +func (s *SyncStatusLastSyncResult) GetString() string { + if s == nil { + return "" + } + return s.String } -func (t *TimeOffStatus) UnmarshalJSON(data []byte) error { - var valueTimeOffStatusEnum TimeOffStatusEnum - if err := json.Unmarshal(data, &valueTimeOffStatusEnum); err == nil { - t.typeName = "timeOffStatusEnum" - t.TimeOffStatusEnum = valueTimeOffStatusEnum +func (s *SyncStatusLastSyncResult) UnmarshalJSON(data []byte) error { + var valueLastSyncResultEnum LastSyncResultEnum + if err := json.Unmarshal(data, &valueLastSyncResultEnum); err == nil { + s.typ = "LastSyncResultEnum" + s.LastSyncResultEnum = valueLastSyncResultEnum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" - t.String = valueString + s.typ = "String" + s.String = valueString return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, t) + return fmt.Errorf("%s cannot be deserialized as a %T", data, s) } -func (t TimeOffStatus) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "timeOffStatusEnum": - return json.Marshal(t.TimeOffStatusEnum) - case "string": - return json.Marshal(t.String) +func (s SyncStatusLastSyncResult) MarshalJSON() ([]byte, error) { + if s.typ == "LastSyncResultEnum" || s.LastSyncResultEnum != "" { + return json.Marshal(s.LastSyncResultEnum) } + if s.typ == "String" || s.String != "" { + return json.Marshal(s.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", s) } -type TimeOffStatusVisitor interface { - VisitTimeOffStatusEnum(TimeOffStatusEnum) error +type SyncStatusLastSyncResultVisitor interface { + VisitLastSyncResultEnum(LastSyncResultEnum) error VisitString(string) error } -func (t *TimeOffStatus) Accept(visitor TimeOffStatusVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "timeOffStatusEnum": - return visitor.VisitTimeOffStatusEnum(t.TimeOffStatusEnum) - case "string": - return visitor.VisitString(t.String) +func (s *SyncStatusLastSyncResult) Accept(visitor SyncStatusLastSyncResultVisitor) error { + if s.typ == "LastSyncResultEnum" || s.LastSyncResultEnum != "" { + return visitor.VisitLastSyncResultEnum(s.LastSyncResultEnum) } + if s.typ == "String" || s.String != "" { + return visitor.VisitString(s.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", s) } -// - `REQUESTED` - REQUESTED -// - `APPROVED` - APPROVED -// - `DECLINED` - DECLINED -// - `CANCELLED` - CANCELLED -// - `DELETED` - DELETED -type TimeOffStatusEnum string - -const ( - TimeOffStatusEnumRequested TimeOffStatusEnum = "REQUESTED" - TimeOffStatusEnumApproved TimeOffStatusEnum = "APPROVED" - TimeOffStatusEnumDeclined TimeOffStatusEnum = "DECLINED" - TimeOffStatusEnumCancelled TimeOffStatusEnum = "CANCELLED" - TimeOffStatusEnumDeleted TimeOffStatusEnum = "DELETED" -) - -func NewTimeOffStatusEnumFromString(s string) (TimeOffStatusEnum, error) { - switch s { - case "REQUESTED": - return TimeOffStatusEnumRequested, nil - case "APPROVED": - return TimeOffStatusEnumApproved, nil - case "DECLINED": - return TimeOffStatusEnumDeclined, nil - case "CANCELLED": - return TimeOffStatusEnumCancelled, nil - case "DELETED": - return TimeOffStatusEnumDeleted, nil - } - var t TimeOffStatusEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (t TimeOffStatusEnum) Ptr() *TimeOffStatusEnum { - return &t -} +type SyncStatusStatus struct { + StatusFd5Enum StatusFd5Enum + String string -// The measurement that the third-party integration uses to count time requested. -// -// - `HOURS` - HOURS -// - `DAYS` - DAYS -type TimeOffUnits struct { - typeName string - UnitsEnum UnitsEnum - String string + typ string } -func NewTimeOffUnitsFromUnitsEnum(value UnitsEnum) *TimeOffUnits { - return &TimeOffUnits{typeName: "unitsEnum", UnitsEnum: value} +func (s *SyncStatusStatus) GetStatusFd5Enum() StatusFd5Enum { + if s == nil { + return "" + } + return s.StatusFd5Enum } -func NewTimeOffUnitsFromString(value string) *TimeOffUnits { - return &TimeOffUnits{typeName: "string", String: value} +func (s *SyncStatusStatus) GetString() string { + if s == nil { + return "" + } + return s.String } -func (t *TimeOffUnits) UnmarshalJSON(data []byte) error { - var valueUnitsEnum UnitsEnum - if err := json.Unmarshal(data, &valueUnitsEnum); err == nil { - t.typeName = "unitsEnum" - t.UnitsEnum = valueUnitsEnum +func (s *SyncStatusStatus) UnmarshalJSON(data []byte) error { + var valueStatusFd5Enum StatusFd5Enum + if err := json.Unmarshal(data, &valueStatusFd5Enum); err == nil { + s.typ = "StatusFd5Enum" + s.StatusFd5Enum = valueStatusFd5Enum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" - t.String = valueString + s.typ = "String" + s.String = valueString return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, t) + return fmt.Errorf("%s cannot be deserialized as a %T", data, s) } -func (t TimeOffUnits) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "unitsEnum": - return json.Marshal(t.UnitsEnum) - case "string": - return json.Marshal(t.String) +func (s SyncStatusStatus) MarshalJSON() ([]byte, error) { + if s.typ == "StatusFd5Enum" || s.StatusFd5Enum != "" { + return json.Marshal(s.StatusFd5Enum) } + if s.typ == "String" || s.String != "" { + return json.Marshal(s.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", s) } -type TimeOffUnitsVisitor interface { - VisitUnitsEnum(UnitsEnum) error +type SyncStatusStatusVisitor interface { + VisitStatusFd5Enum(StatusFd5Enum) error VisitString(string) error } -func (t *TimeOffUnits) Accept(visitor TimeOffUnitsVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "unitsEnum": - return visitor.VisitUnitsEnum(t.UnitsEnum) - case "string": - return visitor.VisitString(t.String) +func (s *SyncStatusStatus) Accept(visitor SyncStatusStatusVisitor) error { + if s.typ == "StatusFd5Enum" || s.StatusFd5Enum != "" { + return visitor.VisitStatusFd5Enum(s.StatusFd5Enum) } + if s.typ == "String" || s.String != "" { + return visitor.VisitString(s.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", s) } -// # The Timesheet Entry Object -// +// # The Team Object // ### Description -// -// The `Timesheet Entry` object is used to track coverage for hours worked by an 'Employee'. +// The `Team` object is used to represent a subdivision of the company, usually a department. Each employee will be grouped into one specific Team. // // ### Usage Example -// -// GET and POST Timesheet Entries -type TimesheetEntry struct { - Id *string `json:"id,omitempty"` +// If you're building a way to filter by `Team`, you'd hit the `GET Teams` endpoint to fetch the `Teams`, and then use the `ID` of the team your user selects to filter the `GET Employees` endpoint. +type Team struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The employee the timesheet entry is for. - Employee *TimesheetEntryEmployee `json:"employee,omitempty"` - // The number of hours logged by the employee. - HoursWorked *float64 `json:"hours_worked,omitempty"` - // The time at which the employee started work. - StartTime *time.Time `json:"start_time,omitempty"` - // The time at which the employee ended work. - EndTime *time.Time `json:"end_time,omitempty"` + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The team's name. + Name *string `json:"name,omitempty" url:"name,omitempty"` + // The team's parent team. + ParentTeam *TeamParentTeam `json:"parent_team,omitempty" url:"parent_team,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (t *TimesheetEntry) UnmarshalJSON(data []byte) error { - type unmarshaler TimesheetEntry - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (t *Team) GetId() *string { + if t == nil { + return nil } - *t = TimesheetEntry(value) - t._rawJSON = json.RawMessage(data) - return nil + return t.Id } -func (t *TimesheetEntry) String() string { - if len(t._rawJSON) > 0 { - if value, err := core.StringifyJSON(t._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(t); err == nil { - return value +func (t *Team) GetRemoteId() *string { + if t == nil { + return nil } - return fmt.Sprintf("%#v", t) + return t.RemoteId } -// The employee the timesheet entry is for. -type TimesheetEntryEmployee struct { - typeName string - String string - Employee *Employee +func (t *Team) GetCreatedAt() *time.Time { + if t == nil { + return nil + } + return t.CreatedAt } -func NewTimesheetEntryEmployeeFromString(value string) *TimesheetEntryEmployee { - return &TimesheetEntryEmployee{typeName: "string", String: value} +func (t *Team) GetModifiedAt() *time.Time { + if t == nil { + return nil + } + return t.ModifiedAt } -func NewTimesheetEntryEmployeeFromEmployee(value *Employee) *TimesheetEntryEmployee { - return &TimesheetEntryEmployee{typeName: "employee", Employee: value} +func (t *Team) GetName() *string { + if t == nil { + return nil + } + return t.Name } -func (t *TimesheetEntryEmployee) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" - t.String = valueString +func (t *Team) GetParentTeam() *TeamParentTeam { + if t == nil { return nil } - valueEmployee := new(Employee) - if err := json.Unmarshal(data, &valueEmployee); err == nil { - t.typeName = "employee" - t.Employee = valueEmployee + return t.ParentTeam +} + +func (t *Team) GetRemoteWasDeleted() *bool { + if t == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, t) + return t.RemoteWasDeleted } -func (t TimesheetEntryEmployee) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return json.Marshal(t.String) - case "employee": - return json.Marshal(t.Employee) +func (t *Team) GetFieldMappings() map[string]interface{} { + if t == nil { + return nil } + return t.FieldMappings } -type TimesheetEntryEmployeeVisitor interface { - VisitString(string) error - VisitEmployee(*Employee) error +func (t *Team) GetRemoteData() []*RemoteData { + if t == nil { + return nil + } + return t.RemoteData } -func (t *TimesheetEntryEmployee) Accept(visitor TimesheetEntryEmployeeVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return visitor.VisitString(t.String) - case "employee": - return visitor.VisitEmployee(t.Employee) - } +func (t *Team) GetExtraProperties() map[string]interface{} { + return t.extraProperties } -// # The Timesheet Entry Object -// -// ### Description -// -// The `Timesheet Entry` object is used to track coverage for hours worked by an 'Employee'. -// -// ### Usage Example -// -// GET and POST Timesheet Entries -type TimesheetEntryRequest struct { - // The employee the timesheet entry is for. - Employee *TimesheetEntryRequestEmployee `json:"employee,omitempty"` - // The number of hours logged by the employee. - HoursWorked *float64 `json:"hours_worked,omitempty"` - // The time at which the employee started work. - StartTime *time.Time `json:"start_time,omitempty"` - // The time at which the employee ended work. - EndTime *time.Time `json:"end_time,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` - - _rawJSON json.RawMessage -} - -func (t *TimesheetEntryRequest) UnmarshalJSON(data []byte) error { - type unmarshaler TimesheetEntryRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { +func (t *Team) UnmarshalJSON(data []byte) error { + type embed Team + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*t), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { return err } - *t = TimesheetEntryRequest(value) - t._rawJSON = json.RawMessage(data) + *t = Team(unmarshaler.embed) + t.CreatedAt = unmarshaler.CreatedAt.TimePtr() + t.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *t) + if err != nil { + return err + } + t.extraProperties = extraProperties + t.rawJSON = json.RawMessage(data) return nil } -func (t *TimesheetEntryRequest) String() string { - if len(t._rawJSON) > 0 { - if value, err := core.StringifyJSON(t._rawJSON); err == nil { +func (t *Team) MarshalJSON() ([]byte, error) { + type embed Team + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*t), + CreatedAt: internal.NewOptionalDateTime(t.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(t.ModifiedAt), + } + return json.Marshal(marshaler) +} + +func (t *Team) String() string { + if len(t.rawJSON) > 0 { + if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(t); err == nil { + if value, err := internal.StringifyJSON(t); err == nil { return value } return fmt.Sprintf("%#v", t) } -// The employee the timesheet entry is for. -type TimesheetEntryRequestEmployee struct { - typeName string - String string - Employee *Employee +// The team's parent team. +type TeamParentTeam struct { + String string + Team *Team + + typ string } -func NewTimesheetEntryRequestEmployeeFromString(value string) *TimesheetEntryRequestEmployee { - return &TimesheetEntryRequestEmployee{typeName: "string", String: value} +func (t *TeamParentTeam) GetString() string { + if t == nil { + return "" + } + return t.String } -func NewTimesheetEntryRequestEmployeeFromEmployee(value *Employee) *TimesheetEntryRequestEmployee { - return &TimesheetEntryRequestEmployee{typeName: "employee", Employee: value} +func (t *TeamParentTeam) GetTeam() *Team { + if t == nil { + return nil + } + return t.Team } -func (t *TimesheetEntryRequestEmployee) UnmarshalJSON(data []byte) error { +func (t *TeamParentTeam) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" + t.typ = "String" t.String = valueString return nil } - valueEmployee := new(Employee) - if err := json.Unmarshal(data, &valueEmployee); err == nil { - t.typeName = "employee" - t.Employee = valueEmployee + valueTeam := new(Team) + if err := json.Unmarshal(data, &valueTeam); err == nil { + t.typ = "Team" + t.Team = valueTeam return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, t) } -func (t TimesheetEntryRequestEmployee) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": +func (t TeamParentTeam) MarshalJSON() ([]byte, error) { + if t.typ == "String" || t.String != "" { return json.Marshal(t.String) - case "employee": - return json.Marshal(t.Employee) } + if t.typ == "Team" || t.Team != nil { + return json.Marshal(t.Team) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) } -type TimesheetEntryRequestEmployeeVisitor interface { +type TeamParentTeamVisitor interface { VisitString(string) error - VisitEmployee(*Employee) error + VisitTeam(*Team) error } -func (t *TimesheetEntryRequestEmployee) Accept(visitor TimesheetEntryRequestEmployeeVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": +func (t *TeamParentTeam) Accept(visitor TeamParentTeamVisitor) error { + if t.typ == "String" || t.String != "" { return visitor.VisitString(t.String) - case "employee": - return visitor.VisitEmployee(t.Employee) - } -} - -type TimesheetEntryResponse struct { - Model *TimesheetEntry `json:"model,omitempty"` - Warnings []*WarningValidationProblem `json:"warnings,omitempty"` - Errors []*ErrorValidationProblem `json:"errors,omitempty"` - Logs []*DebugModeLog `json:"logs,omitempty"` - - _rawJSON json.RawMessage -} - -func (t *TimesheetEntryResponse) UnmarshalJSON(data []byte) error { - type unmarshaler TimesheetEntryResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *t = TimesheetEntryResponse(value) - t._rawJSON = json.RawMessage(data) - return nil -} - -func (t *TimesheetEntryResponse) String() string { - if len(t._rawJSON) > 0 { - if value, err := core.StringifyJSON(t._rawJSON); err == nil { - return value - } } - if value, err := core.StringifyJSON(t); err == nil { - return value + if t.typ == "Team" || t.Team != nil { + return visitor.VisitTeam(t.Team) } - return fmt.Sprintf("%#v", t) + return fmt.Errorf("type %T does not include a non-empty union type", t) } -// - `HOURS` - HOURS -// - `DAYS` - DAYS -type UnitsEnum string - -const ( - UnitsEnumHours UnitsEnum = "HOURS" - UnitsEnumDays UnitsEnum = "DAYS" -) +type ValidationProblemSource struct { + Pointer string `json:"pointer" url:"pointer"` -func NewUnitsEnumFromString(s string) (UnitsEnum, error) { - switch s { - case "HOURS": - return UnitsEnumHours, nil - case "DAYS": - return UnitsEnumDays, nil - } - var t UnitsEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (u UnitsEnum) Ptr() *UnitsEnum { - return &u +func (v *ValidationProblemSource) GetPointer() string { + if v == nil { + return "" + } + return v.Pointer } -type ValidationProblemSource struct { - Pointer string `json:"pointer"` - - _rawJSON json.RawMessage +func (v *ValidationProblemSource) GetExtraProperties() map[string]interface{} { + return v.extraProperties } func (v *ValidationProblemSource) UnmarshalJSON(data []byte) error { @@ -12578,80 +8954,92 @@ func (v *ValidationProblemSource) UnmarshalJSON(data []byte) error { return err } *v = ValidationProblemSource(value) - v._rawJSON = json.RawMessage(data) + extraProperties, err := internal.ExtractExtraProperties(data, *v) + if err != nil { + return err + } + v.extraProperties = extraProperties + v.rawJSON = json.RawMessage(data) return nil } func (v *ValidationProblemSource) String() string { - if len(v._rawJSON) > 0 { - if value, err := core.StringifyJSON(v._rawJSON); err == nil { + if len(v.rawJSON) > 0 { + if value, err := internal.StringifyJSON(v.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(v); err == nil { + if value, err := internal.StringifyJSON(v); err == nil { return value } return fmt.Sprintf("%#v", v) } type WarningValidationProblem struct { - Source *ValidationProblemSource `json:"source,omitempty"` - Title string `json:"title"` - Detail string `json:"detail"` - ProblemType string `json:"problem_type"` + Source *ValidationProblemSource `json:"source,omitempty" url:"source,omitempty"` + Title string `json:"title" url:"title"` + Detail string `json:"detail" url:"detail"` + ProblemType string `json:"problem_type" url:"problem_type"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (w *WarningValidationProblem) UnmarshalJSON(data []byte) error { - type unmarshaler WarningValidationProblem - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (w *WarningValidationProblem) GetSource() *ValidationProblemSource { + if w == nil { + return nil } - *w = WarningValidationProblem(value) - w._rawJSON = json.RawMessage(data) - return nil + return w.Source } -func (w *WarningValidationProblem) String() string { - if len(w._rawJSON) > 0 { - if value, err := core.StringifyJSON(w._rawJSON); err == nil { - return value - } +func (w *WarningValidationProblem) GetTitle() string { + if w == nil { + return "" } - if value, err := core.StringifyJSON(w); err == nil { - return value + return w.Title +} + +func (w *WarningValidationProblem) GetDetail() string { + if w == nil { + return "" } - return fmt.Sprintf("%#v", w) + return w.Detail } -type WebhookReceiver struct { - Event string `json:"event"` - IsActive bool `json:"is_active"` - Key *string `json:"key,omitempty"` +func (w *WarningValidationProblem) GetProblemType() string { + if w == nil { + return "" + } + return w.ProblemType +} - _rawJSON json.RawMessage +func (w *WarningValidationProblem) GetExtraProperties() map[string]interface{} { + return w.extraProperties } -func (w *WebhookReceiver) UnmarshalJSON(data []byte) error { - type unmarshaler WebhookReceiver +func (w *WarningValidationProblem) UnmarshalJSON(data []byte) error { + type unmarshaler WarningValidationProblem var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *w = WebhookReceiver(value) - w._rawJSON = json.RawMessage(data) + *w = WarningValidationProblem(value) + extraProperties, err := internal.ExtractExtraProperties(data, *w) + if err != nil { + return err + } + w.extraProperties = extraProperties + w.rawJSON = json.RawMessage(data) return nil } -func (w *WebhookReceiver) String() string { - if len(w._rawJSON) > 0 { - if value, err := core.StringifyJSON(w._rawJSON); err == nil { +func (w *WarningValidationProblem) String() string { + if len(w.rawJSON) > 0 { + if value, err := internal.StringifyJSON(w.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(w); err == nil { + if value, err := internal.StringifyJSON(w); err == nil { return value } return fmt.Sprintf("%#v", w) diff --git a/hris/webhook_receivers.go b/hris/webhook_receivers.go index 0d9ee90..357d0d3 100644 --- a/hris/webhook_receivers.go +++ b/hris/webhook_receivers.go @@ -1,9 +1,77 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package hris +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" +) + type WebhookReceiverRequest struct { - Event string `json:"event"` - IsActive bool `json:"is_active"` - Key *string `json:"key,omitempty"` + Event string `json:"event" url:"-"` + IsActive bool `json:"is_active" url:"-"` + Key *string `json:"key,omitempty" url:"-"` +} + +type WebhookReceiver struct { + Event string `json:"event" url:"event"` + IsActive bool `json:"is_active" url:"is_active"` + Key *string `json:"key,omitempty" url:"key,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (w *WebhookReceiver) GetEvent() string { + if w == nil { + return "" + } + return w.Event +} + +func (w *WebhookReceiver) GetIsActive() bool { + if w == nil { + return false + } + return w.IsActive +} + +func (w *WebhookReceiver) GetKey() *string { + if w == nil { + return nil + } + return w.Key +} + +func (w *WebhookReceiver) GetExtraProperties() map[string]interface{} { + return w.extraProperties +} + +func (w *WebhookReceiver) UnmarshalJSON(data []byte) error { + type unmarshaler WebhookReceiver + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *w = WebhookReceiver(value) + extraProperties, err := internal.ExtractExtraProperties(data, *w) + if err != nil { + return err + } + w.extraProperties = extraProperties + w.rawJSON = json.RawMessage(data) + return nil +} + +func (w *WebhookReceiver) String() string { + if len(w.rawJSON) > 0 { + if value, err := internal.StringifyJSON(w.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(w); err == nil { + return value + } + return fmt.Sprintf("%#v", w) } diff --git a/hris/webhookreceivers/client.go b/hris/webhookreceivers/client.go index b0d9bdf..848bc83 100644 --- a/hris/webhookreceivers/client.go +++ b/hris/webhookreceivers/client.go @@ -1,48 +1,65 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package webhookreceivers import ( context "context" - core "github.com/merge-api/merge-go-client/core" - hris "github.com/merge-api/merge-go-client/hris" + core "github.com/merge-api/merge-go-client/v2/core" + hris "github.com/merge-api/merge-go-client/v2/hris" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `WebhookReceiver` objects. -func (c *Client) List(ctx context.Context) ([]*hris.WebhookReceiver, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "hris/v1/webhook-receivers" +func (c *Client) List( + ctx context.Context, + opts ...option.RequestOption, +) ([]*hris.WebhookReceiver, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/hris/v1/webhook-receivers" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response []*hris.WebhookReceiver if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -51,22 +68,37 @@ func (c *Client) List(ctx context.Context) ([]*hris.WebhookReceiver, error) { } // Creates a `WebhookReceiver` object with the given values. -func (c *Client) Create(ctx context.Context, request *hris.WebhookReceiverRequest) (*hris.WebhookReceiver, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "hris/v1/webhook-receivers" +func (c *Client) Create( + ctx context.Context, + request *hris.WebhookReceiverRequest, + opts ...option.RequestOption, +) (*hris.WebhookReceiver, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/hris/v1/webhook-receivers" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *hris.WebhookReceiver if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err diff --git a/internal/caller.go b/internal/caller.go new file mode 100644 index 0000000..eeab804 --- /dev/null +++ b/internal/caller.go @@ -0,0 +1,275 @@ +package internal + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "reflect" + "strings" + + "github.com/merge-api/merge-go-client/v2/core" +) + +const ( + // contentType specifies the JSON Content-Type header value. + contentType = "application/json" + contentTypeHeader = "Content-Type" +) + +// Caller calls APIs and deserializes their response, if any. +type Caller struct { + client core.HTTPClient + retrier *Retrier +} + +// CallerParams represents the parameters used to constrcut a new *Caller. +type CallerParams struct { + Client core.HTTPClient + MaxAttempts uint +} + +// NewCaller returns a new *Caller backed by the given parameters. +func NewCaller(params *CallerParams) *Caller { + var httpClient core.HTTPClient = http.DefaultClient + if params.Client != nil { + httpClient = params.Client + } + var retryOptions []RetryOption + if params.MaxAttempts > 0 { + retryOptions = append(retryOptions, WithMaxAttempts(params.MaxAttempts)) + } + return &Caller{ + client: httpClient, + retrier: NewRetrier(retryOptions...), + } +} + +// CallParams represents the parameters used to issue an API call. +type CallParams struct { + URL string + Method string + MaxAttempts uint + Headers http.Header + BodyProperties map[string]interface{} + QueryParameters url.Values + Client core.HTTPClient + Request interface{} + Response interface{} + ResponseIsOptional bool + ErrorDecoder ErrorDecoder +} + +// Call issues an API call according to the given call parameters. +func (c *Caller) Call(ctx context.Context, params *CallParams) error { + resp, err := c.CallRaw( + ctx, + &CallRawParams{ + URL: params.URL, + Method: params.Method, + MaxAttempts: params.MaxAttempts, + Headers: params.Headers, + BodyProperties: params.BodyProperties, + QueryParameters: params.QueryParameters, + Client: params.Client, + Request: params.Request, + ErrorDecoder: params.ErrorDecoder, + }, + ) + if err != nil { + return err + } + + // Close the response body after we're done. + defer resp.Body.Close() + + if params.Response != nil { + if writer, ok := params.Response.(io.Writer); ok { + _, err = io.Copy(writer, resp.Body) + } else { + err = json.NewDecoder(resp.Body).Decode(params.Response) + } + if err != nil { + if err == io.EOF { + if params.ResponseIsOptional { + // The response is optional, so we should ignore the + // io.EOF error + return nil + } + return fmt.Errorf("expected a %T response, but the server responded with nothing", params.Response) + } + return err + } + } + + return nil +} + +// CallRawParams represents the parameters used to issue an API call. +type CallRawParams struct { + URL string + Method string + MaxAttempts uint + Headers http.Header + BodyProperties map[string]interface{} + QueryParameters url.Values + Client core.HTTPClient + Request interface{} + ErrorDecoder ErrorDecoder +} + +// CallRaw issues an API call according to the given call parameters and returns the raw HTTP response. +// The caller is responsible for closing the response body. +func (c *Caller) CallRaw(ctx context.Context, params *CallRawParams) (*http.Response, error) { + url := buildURL(params.URL, params.QueryParameters) + req, err := newRequest( + ctx, + url, + params.Method, + params.Headers, + params.Request, + params.BodyProperties, + ) + if err != nil { + return nil, err + } + + // If the call has been cancelled, don't issue the request. + if err := ctx.Err(); err != nil { + return nil, err + } + + client := c.client + if params.Client != nil { + client = params.Client + } + + var retryOptions []RetryOption + if params.MaxAttempts > 0 { + retryOptions = append(retryOptions, WithMaxAttempts(params.MaxAttempts)) + } + + resp, err := c.retrier.Run( + client.Do, + req, + params.ErrorDecoder, + retryOptions..., + ) + if err != nil { + return nil, err + } + + // Check if the call was cancelled before we return the error + // associated with the call and/or unmarshal the response data. + if err := ctx.Err(); err != nil { + defer resp.Body.Close() + return nil, err + } + + if resp.StatusCode < 200 || resp.StatusCode >= 300 { + defer resp.Body.Close() + return nil, decodeError(resp, params.ErrorDecoder) + } + + return resp, nil +} + +// buildURL constructs the final URL by appending the given query parameters (if any). +func buildURL( + url string, + queryParameters url.Values, +) string { + if len(queryParameters) == 0 { + return url + } + if strings.ContainsRune(url, '?') { + url += "&" + } else { + url += "?" + } + url += queryParameters.Encode() + return url +} + +// newRequest returns a new *http.Request with all of the fields +// required to issue the call. +func newRequest( + ctx context.Context, + url string, + method string, + endpointHeaders http.Header, + request interface{}, + bodyProperties map[string]interface{}, +) (*http.Request, error) { + requestBody, err := newRequestBody(request, bodyProperties) + if err != nil { + return nil, err + } + req, err := http.NewRequestWithContext(ctx, method, url, requestBody) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + req.Header.Set(contentTypeHeader, contentType) + for name, values := range endpointHeaders { + req.Header[name] = values + } + return req, nil +} + +// newRequestBody returns a new io.Reader that represents the HTTP request body. +func newRequestBody(request interface{}, bodyProperties map[string]interface{}) (io.Reader, error) { + if isNil(request) { + if len(bodyProperties) == 0 { + return nil, nil + } + requestBytes, err := json.Marshal(bodyProperties) + if err != nil { + return nil, err + } + return bytes.NewReader(requestBytes), nil + } + if body, ok := request.(io.Reader); ok { + return body, nil + } + requestBytes, err := MarshalJSONWithExtraProperties(request, bodyProperties) + if err != nil { + return nil, err + } + return bytes.NewReader(requestBytes), nil +} + +// decodeError decodes the error from the given HTTP response. Note that +// it's the caller's responsibility to close the response body. +func decodeError(response *http.Response, errorDecoder ErrorDecoder) error { + if errorDecoder != nil { + // This endpoint has custom errors, so we'll + // attempt to unmarshal the error into a structured + // type based on the status code. + return errorDecoder(response.StatusCode, response.Body) + } + // This endpoint doesn't have any custom error + // types, so we just read the body as-is, and + // put it into a normal error. + bytes, err := io.ReadAll(response.Body) + if err != nil && err != io.EOF { + return err + } + if err == io.EOF { + // The error didn't have a response body, + // so all we can do is return an error + // with the status code. + return core.NewAPIError(response.StatusCode, nil) + } + return core.NewAPIError(response.StatusCode, errors.New(string(bytes))) +} + +// isNil is used to determine if the request value is equal to nil (i.e. an interface +// value that holds a nil concrete value is itself non-nil). +func isNil(value interface{}) bool { + return value == nil || reflect.ValueOf(value).IsNil() +} diff --git a/internal/caller_test.go b/internal/caller_test.go new file mode 100644 index 0000000..51ab005 --- /dev/null +++ b/internal/caller_test.go @@ -0,0 +1,453 @@ +package internal + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/http/httptest" + "net/url" + "strconv" + "testing" + + "github.com/merge-api/merge-go-client/v2/core" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +// TestCase represents a single test case. +type TestCase struct { + description string + + // Server-side assertions. + givePathSuffix string + giveMethod string + giveResponseIsOptional bool + giveHeader http.Header + giveErrorDecoder ErrorDecoder + giveRequest *Request + giveQueryParams url.Values + giveBodyProperties map[string]interface{} + + // Client-side assertions. + wantResponse *Response + wantHeaders http.Header + wantError error +} + +// Request a simple request body. +type Request struct { + Id string `json:"id"` +} + +// Response a simple response body. +type Response struct { + Id string `json:"id"` + ExtraBodyProperties map[string]interface{} `json:"extraBodyProperties,omitempty"` + QueryParameters url.Values `json:"queryParameters,omitempty"` +} + +// NotFoundError represents a 404. +type NotFoundError struct { + *core.APIError + + Message string `json:"message"` +} + +func TestCall(t *testing.T) { + tests := []*TestCase{ + { + description: "GET success", + giveMethod: http.MethodGet, + giveHeader: http.Header{ + "X-API-Status": []string{"success"}, + }, + giveRequest: &Request{ + Id: "123", + }, + wantResponse: &Response{ + Id: "123", + }, + }, + { + description: "GET success with query", + givePathSuffix: "?limit=1", + giveMethod: http.MethodGet, + giveHeader: http.Header{ + "X-API-Status": []string{"success"}, + }, + giveRequest: &Request{ + Id: "123", + }, + wantResponse: &Response{ + Id: "123", + QueryParameters: url.Values{ + "limit": []string{"1"}, + }, + }, + }, + { + description: "GET not found", + giveMethod: http.MethodGet, + giveHeader: http.Header{ + "X-API-Status": []string{"fail"}, + }, + giveRequest: &Request{ + Id: strconv.Itoa(http.StatusNotFound), + }, + giveErrorDecoder: newTestErrorDecoder(t), + wantError: &NotFoundError{ + APIError: core.NewAPIError( + http.StatusNotFound, + errors.New(`{"message":"ID \"404\" not found"}`), + ), + }, + }, + { + description: "POST empty body", + giveMethod: http.MethodPost, + giveHeader: http.Header{ + "X-API-Status": []string{"fail"}, + }, + giveRequest: nil, + wantError: core.NewAPIError( + http.StatusBadRequest, + errors.New("invalid request"), + ), + }, + { + description: "POST optional response", + giveMethod: http.MethodPost, + giveHeader: http.Header{ + "X-API-Status": []string{"success"}, + }, + giveRequest: &Request{ + Id: "123", + }, + giveResponseIsOptional: true, + }, + { + description: "POST API error", + giveMethod: http.MethodPost, + giveHeader: http.Header{ + "X-API-Status": []string{"fail"}, + }, + giveRequest: &Request{ + Id: strconv.Itoa(http.StatusInternalServerError), + }, + wantError: core.NewAPIError( + http.StatusInternalServerError, + errors.New("failed to process request"), + ), + }, + { + description: "POST extra properties", + giveMethod: http.MethodPost, + giveHeader: http.Header{ + "X-API-Status": []string{"success"}, + }, + giveRequest: new(Request), + giveBodyProperties: map[string]interface{}{ + "key": "value", + }, + wantResponse: &Response{ + ExtraBodyProperties: map[string]interface{}{ + "key": "value", + }, + }, + }, + { + description: "GET extra query parameters", + giveMethod: http.MethodGet, + giveHeader: http.Header{ + "X-API-Status": []string{"success"}, + }, + giveQueryParams: url.Values{ + "extra": []string{"true"}, + }, + giveRequest: &Request{ + Id: "123", + }, + wantResponse: &Response{ + Id: "123", + QueryParameters: url.Values{ + "extra": []string{"true"}, + }, + }, + }, + { + description: "GET merge extra query parameters", + givePathSuffix: "?limit=1", + giveMethod: http.MethodGet, + giveHeader: http.Header{ + "X-API-Status": []string{"success"}, + }, + giveRequest: &Request{ + Id: "123", + }, + giveQueryParams: url.Values{ + "extra": []string{"true"}, + }, + wantResponse: &Response{ + Id: "123", + QueryParameters: url.Values{ + "limit": []string{"1"}, + "extra": []string{"true"}, + }, + }, + }, + } + for _, test := range tests { + t.Run(test.description, func(t *testing.T) { + var ( + server = newTestServer(t, test) + client = server.Client() + ) + caller := NewCaller( + &CallerParams{ + Client: client, + }, + ) + var response *Response + err := caller.Call( + context.Background(), + &CallParams{ + URL: server.URL + test.givePathSuffix, + Method: test.giveMethod, + Headers: test.giveHeader, + BodyProperties: test.giveBodyProperties, + QueryParameters: test.giveQueryParams, + Request: test.giveRequest, + Response: &response, + ResponseIsOptional: test.giveResponseIsOptional, + ErrorDecoder: test.giveErrorDecoder, + }, + ) + if test.wantError != nil { + assert.EqualError(t, err, test.wantError.Error()) + return + } + require.NoError(t, err) + assert.Equal(t, test.wantResponse, response) + }) + } +} + +func TestCallRaw(t *testing.T) { + tests := []*TestCase{ + { + description: "HEAD success", + giveMethod: http.MethodHead, + giveHeader: http.Header{ + "X-API-Status": []string{"success"}, + }, + wantHeaders: http.Header{ + "Content-Length": []string{"250"}, + "Date": []string{"1970-01-01"}, + }, + }, + } + for _, test := range tests { + t.Run(test.description, func(t *testing.T) { + server := httptest.NewServer( + http.HandlerFunc( + func(w http.ResponseWriter, r *http.Request) { + assert.Equal(t, test.giveMethod, r.Method) + for header, value := range test.giveHeader { + assert.Equal(t, value, r.Header.Values(header)) + } + for header, values := range test.wantHeaders { + for _, value := range values { + w.Header().Add(header, value) + } + } + w.WriteHeader(http.StatusOK) + }, + ), + ) + defer server.Close() + + caller := NewCaller( + &CallerParams{ + Client: server.Client(), + }, + ) + response, err := caller.CallRaw( + context.Background(), + &CallRawParams{ + URL: server.URL + test.givePathSuffix, + Method: test.giveMethod, + Headers: test.giveHeader, + BodyProperties: test.giveBodyProperties, + QueryParameters: test.giveQueryParams, + Request: test.giveRequest, + ErrorDecoder: test.giveErrorDecoder, + }, + ) + if test.wantError != nil { + assert.EqualError(t, err, test.wantError.Error()) + return + } + require.NoError(t, err) + assert.Equal(t, test.wantHeaders, response.Header) + }) + } +} + +func TestMergeHeaders(t *testing.T) { + t.Run("both empty", func(t *testing.T) { + merged := MergeHeaders(make(http.Header), make(http.Header)) + assert.Empty(t, merged) + }) + + t.Run("empty left", func(t *testing.T) { + left := make(http.Header) + + right := make(http.Header) + right.Set("X-API-Version", "0.0.1") + + merged := MergeHeaders(left, right) + assert.Equal(t, "0.0.1", merged.Get("X-API-Version")) + }) + + t.Run("empty right", func(t *testing.T) { + left := make(http.Header) + left.Set("X-API-Version", "0.0.1") + + right := make(http.Header) + + merged := MergeHeaders(left, right) + assert.Equal(t, "0.0.1", merged.Get("X-API-Version")) + }) + + t.Run("single value override", func(t *testing.T) { + left := make(http.Header) + left.Set("X-API-Version", "0.0.0") + + right := make(http.Header) + right.Set("X-API-Version", "0.0.1") + + merged := MergeHeaders(left, right) + assert.Equal(t, []string{"0.0.1"}, merged.Values("X-API-Version")) + }) + + t.Run("multiple value override", func(t *testing.T) { + left := make(http.Header) + left.Set("X-API-Versions", "0.0.0") + + right := make(http.Header) + right.Add("X-API-Versions", "0.0.1") + right.Add("X-API-Versions", "0.0.2") + + merged := MergeHeaders(left, right) + assert.Equal(t, []string{"0.0.1", "0.0.2"}, merged.Values("X-API-Versions")) + }) + + t.Run("disjoint merge", func(t *testing.T) { + left := make(http.Header) + left.Set("X-API-Tenancy", "test") + + right := make(http.Header) + right.Set("X-API-Version", "0.0.1") + + merged := MergeHeaders(left, right) + assert.Equal(t, []string{"test"}, merged.Values("X-API-Tenancy")) + assert.Equal(t, []string{"0.0.1"}, merged.Values("X-API-Version")) + }) +} + +// newTestServer returns a new *httptest.Server configured with the +// given test parameters. +func newTestServer(t *testing.T, tc *TestCase) *httptest.Server { + return httptest.NewServer( + http.HandlerFunc( + func(w http.ResponseWriter, r *http.Request) { + assert.Equal(t, tc.giveMethod, r.Method) + assert.Equal(t, contentType, r.Header.Get(contentTypeHeader)) + for header, value := range tc.giveHeader { + assert.Equal(t, value, r.Header.Values(header)) + } + + request := new(Request) + + bytes, err := io.ReadAll(r.Body) + if tc.giveRequest == nil { + require.Empty(t, bytes) + w.WriteHeader(http.StatusBadRequest) + _, err = w.Write([]byte("invalid request")) + require.NoError(t, err) + return + } + require.NoError(t, err) + require.NoError(t, json.Unmarshal(bytes, request)) + + switch request.Id { + case strconv.Itoa(http.StatusNotFound): + notFoundError := &NotFoundError{ + APIError: &core.APIError{ + StatusCode: http.StatusNotFound, + }, + Message: fmt.Sprintf("ID %q not found", request.Id), + } + bytes, err = json.Marshal(notFoundError) + require.NoError(t, err) + + w.WriteHeader(http.StatusNotFound) + _, err = w.Write(bytes) + require.NoError(t, err) + return + + case strconv.Itoa(http.StatusInternalServerError): + w.WriteHeader(http.StatusInternalServerError) + _, err = w.Write([]byte("failed to process request")) + require.NoError(t, err) + return + } + + if tc.giveResponseIsOptional { + w.WriteHeader(http.StatusOK) + return + } + + extraBodyProperties := make(map[string]interface{}) + require.NoError(t, json.Unmarshal(bytes, &extraBodyProperties)) + delete(extraBodyProperties, "id") + + response := &Response{ + Id: request.Id, + ExtraBodyProperties: extraBodyProperties, + QueryParameters: r.URL.Query(), + } + bytes, err = json.Marshal(response) + require.NoError(t, err) + + _, err = w.Write(bytes) + require.NoError(t, err) + }, + ), + ) +} + +// newTestErrorDecoder returns an error decoder suitable for tests. +func newTestErrorDecoder(t *testing.T) func(int, io.Reader) error { + return func(statusCode int, body io.Reader) error { + raw, err := io.ReadAll(body) + require.NoError(t, err) + + var ( + apiError = core.NewAPIError(statusCode, errors.New(string(raw))) + decoder = json.NewDecoder(bytes.NewReader(raw)) + ) + if statusCode == http.StatusNotFound { + value := new(NotFoundError) + value.APIError = apiError + require.NoError(t, decoder.Decode(value)) + + return value + } + return apiError + } +} diff --git a/internal/error_decoder.go b/internal/error_decoder.go new file mode 100644 index 0000000..83ccb6a --- /dev/null +++ b/internal/error_decoder.go @@ -0,0 +1,45 @@ +package internal + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + + "github.com/merge-api/merge-go-client/v2/core" +) + +// ErrorDecoder decodes *http.Response errors and returns a +// typed API error (e.g. *core.APIError). +type ErrorDecoder func(statusCode int, body io.Reader) error + +// ErrorCodes maps HTTP status codes to error constructors. +type ErrorCodes map[int]func(*core.APIError) error + +// NewErrorDecoder returns a new ErrorDecoder backed by the given error codes. +func NewErrorDecoder(errorCodes ErrorCodes) ErrorDecoder { + return func(statusCode int, body io.Reader) error { + raw, err := io.ReadAll(body) + if err != nil { + return fmt.Errorf("failed to read error from response body: %w", err) + } + apiError := core.NewAPIError( + statusCode, + errors.New(string(raw)), + ) + newErrorFunc, ok := errorCodes[statusCode] + if !ok { + // This status code isn't recognized, so we return + // the API error as-is. + return apiError + } + customError := newErrorFunc(apiError) + if err := json.NewDecoder(bytes.NewReader(raw)).Decode(customError); err != nil { + // If we fail to decode the error, we return the + // API error as-is. + return apiError + } + return customError + } +} diff --git a/internal/error_decoder_test.go b/internal/error_decoder_test.go new file mode 100644 index 0000000..31840a5 --- /dev/null +++ b/internal/error_decoder_test.go @@ -0,0 +1,55 @@ +package internal + +import ( + "bytes" + "errors" + "net/http" + "testing" + + "github.com/merge-api/merge-go-client/v2/core" + "github.com/stretchr/testify/assert" +) + +func TestErrorDecoder(t *testing.T) { + decoder := NewErrorDecoder( + ErrorCodes{ + http.StatusNotFound: func(apiError *core.APIError) error { + return &NotFoundError{APIError: apiError} + }, + }) + + tests := []struct { + description string + giveStatusCode int + giveBody string + wantError error + }{ + { + description: "unrecognized status code", + giveStatusCode: http.StatusInternalServerError, + giveBody: "Internal Server Error", + wantError: core.NewAPIError(http.StatusInternalServerError, errors.New("Internal Server Error")), + }, + { + description: "not found with valid JSON", + giveStatusCode: http.StatusNotFound, + giveBody: `{"message": "Resource not found"}`, + wantError: &NotFoundError{ + APIError: core.NewAPIError(http.StatusNotFound, errors.New(`{"message": "Resource not found"}`)), + Message: "Resource not found", + }, + }, + { + description: "not found with invalid JSON", + giveStatusCode: http.StatusNotFound, + giveBody: `Resource not found`, + wantError: core.NewAPIError(http.StatusNotFound, errors.New("Resource not found")), + }, + } + + for _, tt := range tests { + t.Run(tt.description, func(t *testing.T) { + assert.Equal(t, tt.wantError, decoder(tt.giveStatusCode, bytes.NewReader([]byte(tt.giveBody)))) + }) + } +} diff --git a/internal/extra_properties.go b/internal/extra_properties.go new file mode 100644 index 0000000..540c3fd --- /dev/null +++ b/internal/extra_properties.go @@ -0,0 +1,141 @@ +package internal + +import ( + "bytes" + "encoding/json" + "fmt" + "reflect" + "strings" +) + +// MarshalJSONWithExtraProperty marshals the given value to JSON, including the extra property. +func MarshalJSONWithExtraProperty(marshaler interface{}, key string, value interface{}) ([]byte, error) { + return MarshalJSONWithExtraProperties(marshaler, map[string]interface{}{key: value}) +} + +// MarshalJSONWithExtraProperties marshals the given value to JSON, including any extra properties. +func MarshalJSONWithExtraProperties(marshaler interface{}, extraProperties map[string]interface{}) ([]byte, error) { + bytes, err := json.Marshal(marshaler) + if err != nil { + return nil, err + } + if len(extraProperties) == 0 { + return bytes, nil + } + keys, err := getKeys(marshaler) + if err != nil { + return nil, err + } + for _, key := range keys { + if _, ok := extraProperties[key]; ok { + return nil, fmt.Errorf("cannot add extra property %q because it is already defined on the type", key) + } + } + extraBytes, err := json.Marshal(extraProperties) + if err != nil { + return nil, err + } + if isEmptyJSON(bytes) { + if isEmptyJSON(extraBytes) { + return bytes, nil + } + return extraBytes, nil + } + result := bytes[:len(bytes)-1] + result = append(result, ',') + result = append(result, extraBytes[1:len(extraBytes)-1]...) + result = append(result, '}') + return result, nil +} + +// ExtractExtraProperties extracts any extra properties from the given value. +func ExtractExtraProperties(bytes []byte, value interface{}, exclude ...string) (map[string]interface{}, error) { + val := reflect.ValueOf(value) + for val.Kind() == reflect.Ptr { + if val.IsNil() { + return nil, fmt.Errorf("value must be non-nil to extract extra properties") + } + val = val.Elem() + } + if err := json.Unmarshal(bytes, &value); err != nil { + return nil, err + } + var extraProperties map[string]interface{} + if err := json.Unmarshal(bytes, &extraProperties); err != nil { + return nil, err + } + for i := 0; i < val.Type().NumField(); i++ { + key := jsonKey(val.Type().Field(i)) + if key == "" || key == "-" { + continue + } + delete(extraProperties, key) + } + for _, key := range exclude { + delete(extraProperties, key) + } + if len(extraProperties) == 0 { + return nil, nil + } + return extraProperties, nil +} + +// getKeys returns the keys associated with the given value. The value must be a +// a struct or a map with string keys. +func getKeys(value interface{}) ([]string, error) { + val := reflect.ValueOf(value) + if val.Kind() == reflect.Ptr { + val = val.Elem() + } + if !val.IsValid() { + return nil, nil + } + switch val.Kind() { + case reflect.Struct: + return getKeysForStructType(val.Type()), nil + case reflect.Map: + var keys []string + if val.Type().Key().Kind() != reflect.String { + return nil, fmt.Errorf("cannot extract keys from %T; only structs and maps with string keys are supported", value) + } + for _, key := range val.MapKeys() { + keys = append(keys, key.String()) + } + return keys, nil + default: + return nil, fmt.Errorf("cannot extract keys from %T; only structs and maps with string keys are supported", value) + } +} + +// getKeysForStructType returns all the keys associated with the given struct type, +// visiting embedded fields recursively. +func getKeysForStructType(structType reflect.Type) []string { + if structType.Kind() == reflect.Pointer { + structType = structType.Elem() + } + if structType.Kind() != reflect.Struct { + return nil + } + var keys []string + for i := 0; i < structType.NumField(); i++ { + field := structType.Field(i) + if field.Anonymous { + keys = append(keys, getKeysForStructType(field.Type)...) + continue + } + keys = append(keys, jsonKey(field)) + } + return keys +} + +// jsonKey returns the JSON key from the struct tag of the given field, +// excluding the omitempty flag (if any). +func jsonKey(field reflect.StructField) string { + return strings.TrimSuffix(field.Tag.Get("json"), ",omitempty") +} + +// isEmptyJSON returns true if the given data is empty, the empty JSON object, or +// an explicit null. +func isEmptyJSON(data []byte) bool { + return len(data) <= 2 || bytes.Equal(data, []byte("null")) +} diff --git a/internal/extra_properties_test.go b/internal/extra_properties_test.go new file mode 100644 index 0000000..aa2510e --- /dev/null +++ b/internal/extra_properties_test.go @@ -0,0 +1,228 @@ +package internal + +import ( + "encoding/json" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +type testMarshaler struct { + Name string `json:"name"` + BirthDate time.Time `json:"birthDate"` + CreatedAt time.Time `json:"created_at"` +} + +func (t *testMarshaler) MarshalJSON() ([]byte, error) { + type embed testMarshaler + var marshaler = struct { + embed + BirthDate string `json:"birthDate"` + CreatedAt string `json:"created_at"` + }{ + embed: embed(*t), + BirthDate: t.BirthDate.Format("2006-01-02"), + CreatedAt: t.CreatedAt.Format(time.RFC3339), + } + return MarshalJSONWithExtraProperty(marshaler, "type", "test") +} + +func TestMarshalJSONWithExtraProperties(t *testing.T) { + tests := []struct { + desc string + giveMarshaler interface{} + giveExtraProperties map[string]interface{} + wantBytes []byte + wantError string + }{ + { + desc: "invalid type", + giveMarshaler: []string{"invalid"}, + giveExtraProperties: map[string]interface{}{"key": "overwrite"}, + wantError: `cannot extract keys from []string; only structs and maps with string keys are supported`, + }, + { + desc: "invalid key type", + giveMarshaler: map[int]interface{}{42: "value"}, + giveExtraProperties: map[string]interface{}{"key": "overwrite"}, + wantError: `cannot extract keys from map[int]interface {}; only structs and maps with string keys are supported`, + }, + { + desc: "invalid map overwrite", + giveMarshaler: map[string]interface{}{"key": "value"}, + giveExtraProperties: map[string]interface{}{"key": "overwrite"}, + wantError: `cannot add extra property "key" because it is already defined on the type`, + }, + { + desc: "invalid struct overwrite", + giveMarshaler: new(testMarshaler), + giveExtraProperties: map[string]interface{}{"birthDate": "2000-01-01"}, + wantError: `cannot add extra property "birthDate" because it is already defined on the type`, + }, + { + desc: "invalid struct overwrite embedded type", + giveMarshaler: new(testMarshaler), + giveExtraProperties: map[string]interface{}{"name": "bob"}, + wantError: `cannot add extra property "name" because it is already defined on the type`, + }, + { + desc: "nil", + giveMarshaler: nil, + giveExtraProperties: nil, + wantBytes: []byte(`null`), + }, + { + desc: "empty", + giveMarshaler: map[string]interface{}{}, + giveExtraProperties: map[string]interface{}{}, + wantBytes: []byte(`{}`), + }, + { + desc: "no extra properties", + giveMarshaler: map[string]interface{}{"key": "value"}, + giveExtraProperties: map[string]interface{}{}, + wantBytes: []byte(`{"key":"value"}`), + }, + { + desc: "only extra properties", + giveMarshaler: map[string]interface{}{}, + giveExtraProperties: map[string]interface{}{"key": "value"}, + wantBytes: []byte(`{"key":"value"}`), + }, + { + desc: "single extra property", + giveMarshaler: map[string]interface{}{"key": "value"}, + giveExtraProperties: map[string]interface{}{"extra": "property"}, + wantBytes: []byte(`{"key":"value","extra":"property"}`), + }, + { + desc: "multiple extra properties", + giveMarshaler: map[string]interface{}{"key": "value"}, + giveExtraProperties: map[string]interface{}{"one": 1, "two": 2}, + wantBytes: []byte(`{"key":"value","one":1,"two":2}`), + }, + { + desc: "nested properties", + giveMarshaler: map[string]interface{}{"key": "value"}, + giveExtraProperties: map[string]interface{}{ + "user": map[string]interface{}{ + "age": 42, + "name": "alice", + }, + }, + wantBytes: []byte(`{"key":"value","user":{"age":42,"name":"alice"}}`), + }, + { + desc: "multiple nested properties", + giveMarshaler: map[string]interface{}{"key": "value"}, + giveExtraProperties: map[string]interface{}{ + "metadata": map[string]interface{}{ + "ip": "127.0.0.1", + }, + "user": map[string]interface{}{ + "age": 42, + "name": "alice", + }, + }, + wantBytes: []byte(`{"key":"value","metadata":{"ip":"127.0.0.1"},"user":{"age":42,"name":"alice"}}`), + }, + { + desc: "custom marshaler", + giveMarshaler: &testMarshaler{ + Name: "alice", + BirthDate: time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC), + CreatedAt: time.Date(2024, 1, 1, 0, 0, 0, 0, time.UTC), + }, + giveExtraProperties: map[string]interface{}{ + "extra": "property", + }, + wantBytes: []byte(`{"name":"alice","birthDate":"2000-01-01","created_at":"2024-01-01T00:00:00Z","type":"test","extra":"property"}`), + }, + } + for _, tt := range tests { + t.Run(tt.desc, func(t *testing.T) { + bytes, err := MarshalJSONWithExtraProperties(tt.giveMarshaler, tt.giveExtraProperties) + if tt.wantError != "" { + require.EqualError(t, err, tt.wantError) + assert.Nil(t, tt.wantBytes) + return + } + require.NoError(t, err) + assert.Equal(t, tt.wantBytes, bytes) + + value := make(map[string]interface{}) + require.NoError(t, json.Unmarshal(bytes, &value)) + }) + } +} + +func TestExtractExtraProperties(t *testing.T) { + t.Run("none", func(t *testing.T) { + type user struct { + Name string `json:"name"` + } + value := &user{ + Name: "alice", + } + extraProperties, err := ExtractExtraProperties([]byte(`{"name": "alice"}`), value) + require.NoError(t, err) + assert.Nil(t, extraProperties) + }) + + t.Run("non-nil pointer", func(t *testing.T) { + type user struct { + Name string `json:"name"` + } + value := &user{ + Name: "alice", + } + extraProperties, err := ExtractExtraProperties([]byte(`{"name": "alice", "age": 42}`), value) + require.NoError(t, err) + assert.Equal(t, map[string]interface{}{"age": float64(42)}, extraProperties) + }) + + t.Run("nil pointer", func(t *testing.T) { + type user struct { + Name string `json:"name"` + } + var value *user + _, err := ExtractExtraProperties([]byte(`{"name": "alice", "age": 42}`), value) + assert.EqualError(t, err, "value must be non-nil to extract extra properties") + }) + + t.Run("non-zero value", func(t *testing.T) { + type user struct { + Name string `json:"name"` + } + value := user{ + Name: "alice", + } + extraProperties, err := ExtractExtraProperties([]byte(`{"name": "alice", "age": 42}`), value) + require.NoError(t, err) + assert.Equal(t, map[string]interface{}{"age": float64(42)}, extraProperties) + }) + + t.Run("zero value", func(t *testing.T) { + type user struct { + Name string `json:"name"` + } + var value user + extraProperties, err := ExtractExtraProperties([]byte(`{"name": "alice", "age": 42}`), value) + require.NoError(t, err) + assert.Equal(t, map[string]interface{}{"age": float64(42)}, extraProperties) + }) + + t.Run("exclude", func(t *testing.T) { + type user struct { + Name string `json:"name"` + } + value := &user{ + Name: "alice", + } + extraProperties, err := ExtractExtraProperties([]byte(`{"name": "alice", "age": 42}`), value, "age") + require.NoError(t, err) + assert.Nil(t, extraProperties) + }) +} diff --git a/internal/http.go b/internal/http.go new file mode 100644 index 0000000..768968b --- /dev/null +++ b/internal/http.go @@ -0,0 +1,48 @@ +package internal + +import ( + "fmt" + "net/http" + "net/url" +) + +// HTTPClient is an interface for a subset of the *http.Client. +type HTTPClient interface { + Do(*http.Request) (*http.Response, error) +} + +// ResolveBaseURL resolves the base URL from the given arguments, +// preferring the first non-empty value. +func ResolveBaseURL(values ...string) string { + for _, value := range values { + if value != "" { + return value + } + } + return "" +} + +// EncodeURL encodes the given arguments into the URL, escaping +// values as needed. +func EncodeURL(urlFormat string, args ...interface{}) string { + escapedArgs := make([]interface{}, 0, len(args)) + for _, arg := range args { + escapedArgs = append(escapedArgs, url.PathEscape(fmt.Sprintf("%v", arg))) + } + return fmt.Sprintf(urlFormat, escapedArgs...) +} + +// MergeHeaders merges the given headers together, where the right +// takes precedence over the left. +func MergeHeaders(left, right http.Header) http.Header { + for key, values := range right { + if len(values) > 1 { + left[key] = values + continue + } + if value := right.Get(key); value != "" { + left.Set(key, value) + } + } + return left +} diff --git a/internal/pager.go b/internal/pager.go new file mode 100644 index 0000000..4c9423b --- /dev/null +++ b/internal/pager.go @@ -0,0 +1,127 @@ +package internal + +import ( + "context" + + "github.com/merge-api/merge-go-client/v2/core" +) + +// PagerMode represents the different types of pagination modes. +type PagerMode uint + +// The available set of pagination modes. +const ( + PagerModeCursor PagerMode = iota + 1 + PagerModeOffset +) + +// Pager is the primary abstraction used to call paginated APIs. +type Pager[ + Cursor comparable, + Response any, + Results any, +] struct { + mode PagerMode + caller *Caller + prepareCall PageRequestFunc[Cursor] + readPageResponse PageResponseFunc[Cursor, Response, Results] +} + +// PageRequest represents the information required to identify a single page. +type PageRequest[Cursor comparable] struct { + Cursor Cursor + + // Holds the value of the response type (populated by the *Caller). + Response any +} + +// PageResponse represents the information associated with a single page. +type PageResponse[Cursor comparable, Result any] struct { + Results []Result + Next Cursor + Done bool +} + +// PageRequestFunc prepares the *CallParams from the given page request. +type PageRequestFunc[Cursor comparable] func(request *PageRequest[Cursor]) *CallParams + +// PageResponseFunc extracts the next page information from the response. +type PageResponseFunc[ + Cursor comparable, + Response any, + Results any, +] func(Response) *PageResponse[Cursor, Results] + +// NewCursorPager constructs a new Pager that fetches pages from a paginated endpoint. +func NewCursorPager[Cursor comparable, Response any, Results any]( + caller *Caller, + prepareCall PageRequestFunc[Cursor], + readPageResponse PageResponseFunc[Cursor, Response, Results], +) *Pager[Cursor, Response, Results] { + return &Pager[Cursor, Response, Results]{ + mode: PagerModeCursor, + caller: caller, + prepareCall: prepareCall, + readPageResponse: readPageResponse, + } +} + +// NewOffsetPager constructs a new Pager that fetches pages from an offset paginated endpoint. +func NewOffsetPager[Cursor comparable, Response any, Results any]( + caller *Caller, + prepareCall PageRequestFunc[Cursor], + readPageResponse PageResponseFunc[Cursor, Response, Results], +) *Pager[Cursor, Response, Results] { + return &Pager[Cursor, Response, Results]{ + mode: PagerModeOffset, + caller: caller, + prepareCall: prepareCall, + readPageResponse: readPageResponse, + } +} + +// GetPage retrieves the page associated with the given cursor. +func (p *Pager[ + Cursor, + Response, + Results, +]) GetPage(ctx context.Context, cursor Cursor) (*core.Page[Results], error) { + var response Response + pageRequest := &PageRequest[Cursor]{ + Cursor: cursor, + Response: &response, + } + + callParams := p.prepareCall(pageRequest) + if err := p.caller.Call(ctx, callParams); err != nil { + return nil, err + } + + pageResponse := p.readPageResponse(response) + + if p.mode == PagerModeOffset { + return &core.Page[Results]{ + Results: pageResponse.Results, + NextPageFunc: func(ctx context.Context) (*core.Page[Results], error) { + page, err := p.GetPage(ctx, pageResponse.Next) + if err != nil { + return nil, err + } + if len(page.Results) == 0 { + return nil, core.ErrNoPages + } + return page, nil + }, + }, nil + } + + return &core.Page[Results]{ + Results: pageResponse.Results, + NextPageFunc: func(ctx context.Context) (*core.Page[Results], error) { + if pageResponse.Done { + return nil, core.ErrNoPages + } + return p.GetPage(ctx, pageResponse.Next) + }, + }, nil +} diff --git a/internal/pager_test.go b/internal/pager_test.go new file mode 100644 index 0000000..5476da8 --- /dev/null +++ b/internal/pager_test.go @@ -0,0 +1,162 @@ +package internal + +import ( + "context" + "encoding/json" + "net/http" + "net/http/httptest" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +type TestPageResponse struct { + Items []TestPageItem `json:"items"` + Next string `json:"next"` +} + +type TestPageItem struct { + ID string `json:"id"` + Name string `json:"name"` +} + +func TestPager(t *testing.T) { + tests := []struct { + description string + givePages []TestPageResponse + giveCursor string + wantItems []TestPageItem + wantError error + }{ + { + description: "handles multiple pages successfully", + givePages: []TestPageResponse{ + { + Items: []TestPageItem{{ID: "1", Name: "First"}}, + Next: "abc", + }, + { + Items: []TestPageItem{{ID: "2", Name: "Second"}}, + Next: "def", + }, + { + Items: []TestPageItem{{ID: "3", Name: "Third"}}, + Next: "", + }, + }, + wantItems: []TestPageItem{ + {ID: "1", Name: "First"}, + {ID: "2", Name: "Second"}, + {ID: "3", Name: "Third"}, + }, + }, + { + description: "handles empty response", + givePages: []TestPageResponse{ + { + Items: []TestPageItem{}, + Next: "", + }, + }, + wantItems: nil, + }, + { + description: "handles single page", + givePages: []TestPageResponse{ + { + Items: []TestPageItem{{ID: "1", Name: "Only"}}, + Next: "", + }, + }, + wantItems: []TestPageItem{ + {ID: "1", Name: "Only"}, + }, + }, + { + description: "handles initial cursor", + giveCursor: "abc", + givePages: []TestPageResponse{ + { + Items: []TestPageItem{{ID: "1", Name: "First"}}, + Next: "", + }, + }, + wantItems: []TestPageItem{ + {ID: "1", Name: "First"}, + }, + }, + } + + for _, tt := range tests { + t.Run(tt.description, func(t *testing.T) { + var pageIndex int + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if pageIndex >= len(tt.givePages) { + t.Fatal("requested more pages than available") + } + if pageIndex > 0 { + assert.Equal(t, tt.givePages[pageIndex-1].Next, r.URL.Query().Get("cursor")) + } + require.NoError(t, json.NewEncoder(w).Encode(tt.givePages[pageIndex])) + pageIndex++ + })) + defer server.Close() + + caller := NewCaller( + &CallerParams{ + Client: server.Client(), + }, + ) + pager := NewCursorPager( + caller, + func(request *PageRequest[*string]) *CallParams { + url := server.URL + if request.Cursor != nil { + url += "?cursor=" + *request.Cursor + } + return &CallParams{ + URL: url, + Method: http.MethodGet, + Response: request.Response, + } + }, + func(response *TestPageResponse) *PageResponse[*string, *TestPageItem] { + var items []*TestPageItem + for _, item := range response.Items { + itemCopy := item + items = append(items, &itemCopy) + } + var next *string + if response.Next != "" { + next = &response.Next + } + return &PageResponse[*string, *TestPageItem]{ + Results: items, + Next: next, + Done: response.Next == "", + } + }, + ) + + page, err := pager.GetPage(context.Background(), &tt.giveCursor) + if tt.wantError != nil { + assert.Equal(t, tt.wantError, err) + return + } + require.NoError(t, err) + + var items []TestPageItem + iter := page.Iterator() + for iter.Next(context.Background()) { + item := iter.Current() + items = append(items, TestPageItem{ + ID: item.ID, + Name: item.Name, + }) + } + require.NoError(t, iter.Err()) + assert.Equal(t, tt.wantItems, items) + }) + } +} diff --git a/internal/query.go b/internal/query.go new file mode 100644 index 0000000..24ec496 --- /dev/null +++ b/internal/query.go @@ -0,0 +1,300 @@ +package internal + +import ( + "encoding/base64" + "fmt" + "net/url" + "reflect" + "strings" + "time" + + "github.com/google/uuid" +) + +var ( + bytesType = reflect.TypeOf([]byte{}) + queryEncoderType = reflect.TypeOf(new(QueryEncoder)).Elem() + timeType = reflect.TypeOf(time.Time{}) + uuidType = reflect.TypeOf(uuid.UUID{}) +) + +// QueryEncoder is an interface implemented by any type that wishes to encode +// itself into URL values in a non-standard way. +type QueryEncoder interface { + EncodeQueryValues(key string, v *url.Values) error +} + +// QueryValues encodes url.Values from request objects. +// +// Note: This type is inspired by Google's query encoding library, but +// supports far less customization and is tailored to fit this SDK's use case. +// +// Ref: https://github.com/google/go-querystring +func QueryValues(v interface{}) (url.Values, error) { + values := make(url.Values) + val := reflect.ValueOf(v) + for val.Kind() == reflect.Ptr { + if val.IsNil() { + return values, nil + } + val = val.Elem() + } + + if v == nil { + return values, nil + } + + if val.Kind() != reflect.Struct { + return nil, fmt.Errorf("query: Values() expects struct input. Got %v", val.Kind()) + } + + err := reflectValue(values, val, "") + return values, err +} + +// reflectValue populates the values parameter from the struct fields in val. +// Embedded structs are followed recursively (using the rules defined in the +// Values function documentation) breadth-first. +func reflectValue(values url.Values, val reflect.Value, scope string) error { + typ := val.Type() + for i := 0; i < typ.NumField(); i++ { + sf := typ.Field(i) + if sf.PkgPath != "" && !sf.Anonymous { + // Skip unexported fields. + continue + } + + sv := val.Field(i) + tag := sf.Tag.Get("url") + if tag == "" || tag == "-" { + continue + } + + name, opts := parseTag(tag) + if name == "" { + name = sf.Name + } + + if scope != "" { + name = scope + "[" + name + "]" + } + + if opts.Contains("omitempty") && isEmptyValue(sv) { + continue + } + + if sv.Type().Implements(queryEncoderType) { + // If sv is a nil pointer and the custom encoder is defined on a non-pointer + // method receiver, set sv to the zero value of the underlying type + if !reflect.Indirect(sv).IsValid() && sv.Type().Elem().Implements(queryEncoderType) { + sv = reflect.New(sv.Type().Elem()) + } + + m := sv.Interface().(QueryEncoder) + if err := m.EncodeQueryValues(name, &values); err != nil { + return err + } + continue + } + + // Recursively dereference pointers, but stop at nil pointers. + for sv.Kind() == reflect.Ptr { + if sv.IsNil() { + break + } + sv = sv.Elem() + } + + if sv.Type() == uuidType || sv.Type() == bytesType || sv.Type() == timeType { + values.Add(name, valueString(sv, opts, sf)) + continue + } + + if sv.Kind() == reflect.Slice || sv.Kind() == reflect.Array { + if sv.Len() == 0 { + // Skip if slice or array is empty. + continue + } + for i := 0; i < sv.Len(); i++ { + value := sv.Index(i) + if isStructPointer(value) && !value.IsNil() { + if err := reflectValue(values, value.Elem(), name); err != nil { + return err + } + } else { + values.Add(name, valueString(value, opts, sf)) + } + } + continue + } + + if sv.Kind() == reflect.Map { + if err := reflectMap(values, sv, name); err != nil { + return err + } + continue + } + + if sv.Kind() == reflect.Struct { + if err := reflectValue(values, sv, name); err != nil { + return err + } + continue + } + + values.Add(name, valueString(sv, opts, sf)) + } + + return nil +} + +// reflectMap handles map types specifically, generating query parameters in the format key[mapkey]=value +func reflectMap(values url.Values, val reflect.Value, scope string) error { + if val.IsNil() { + return nil + } + + iter := val.MapRange() + for iter.Next() { + k := iter.Key() + v := iter.Value() + + key := fmt.Sprint(k.Interface()) + paramName := scope + "[" + key + "]" + + for v.Kind() == reflect.Ptr { + if v.IsNil() { + break + } + v = v.Elem() + } + + for v.Kind() == reflect.Interface { + v = v.Elem() + } + + if v.Kind() == reflect.Map { + if err := reflectMap(values, v, paramName); err != nil { + return err + } + continue + } + + if v.Kind() == reflect.Struct { + if err := reflectValue(values, v, paramName); err != nil { + return err + } + continue + } + + if v.Kind() == reflect.Slice || v.Kind() == reflect.Array { + if v.Len() == 0 { + continue + } + for i := 0; i < v.Len(); i++ { + value := v.Index(i) + if isStructPointer(value) && !value.IsNil() { + if err := reflectValue(values, value.Elem(), paramName); err != nil { + return err + } + } else { + values.Add(paramName, valueString(value, tagOptions{}, reflect.StructField{})) + } + } + continue + } + + values.Add(paramName, valueString(v, tagOptions{}, reflect.StructField{})) + } + + return nil +} + +// valueString returns the string representation of a value. +func valueString(v reflect.Value, opts tagOptions, sf reflect.StructField) string { + for v.Kind() == reflect.Ptr { + if v.IsNil() { + return "" + } + v = v.Elem() + } + + if v.Type() == timeType { + t := v.Interface().(time.Time) + if format := sf.Tag.Get("format"); format == "date" { + return t.Format("2006-01-02") + } + return t.Format(time.RFC3339) + } + + if v.Type() == uuidType { + u := v.Interface().(uuid.UUID) + return u.String() + } + + if v.Type() == bytesType { + b := v.Interface().([]byte) + return base64.StdEncoding.EncodeToString(b) + } + + return fmt.Sprint(v.Interface()) +} + +// isEmptyValue checks if a value should be considered empty for the purposes +// of omitting fields with the "omitempty" option. +func isEmptyValue(v reflect.Value) bool { + type zeroable interface { + IsZero() bool + } + + if !v.IsZero() { + if z, ok := v.Interface().(zeroable); ok { + return z.IsZero() + } + } + + switch v.Kind() { + case reflect.Array, reflect.Map, reflect.Slice, reflect.String: + return v.Len() == 0 + case reflect.Bool: + return !v.Bool() + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return v.Int() == 0 + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + return v.Uint() == 0 + case reflect.Float32, reflect.Float64: + return v.Float() == 0 + case reflect.Interface, reflect.Ptr: + return v.IsNil() + case reflect.Invalid, reflect.Complex64, reflect.Complex128, reflect.Chan, reflect.Func, reflect.Struct, reflect.UnsafePointer: + return false + } + + return false +} + +// isStructPointer returns true if the given reflect.Value is a pointer to a struct. +func isStructPointer(v reflect.Value) bool { + return v.Kind() == reflect.Ptr && v.Elem().Kind() == reflect.Struct +} + +// tagOptions is the string following a comma in a struct field's "url" tag, or +// the empty string. It does not include the leading comma. +type tagOptions []string + +// parseTag splits a struct field's url tag into its name and comma-separated +// options. +func parseTag(tag string) (string, tagOptions) { + s := strings.Split(tag, ",") + return s[0], s[1:] +} + +// Contains checks whether the tagOptions contains the specified option. +func (o tagOptions) Contains(option string) bool { + for _, s := range o { + if s == option { + return true + } + } + return false +} diff --git a/internal/query_test.go b/internal/query_test.go new file mode 100644 index 0000000..75f66f8 --- /dev/null +++ b/internal/query_test.go @@ -0,0 +1,239 @@ +package internal + +import ( + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestQueryValues(t *testing.T) { + t.Run("empty optional", func(t *testing.T) { + type nested struct { + Value *string `json:"value,omitempty" url:"value,omitempty"` + } + type example struct { + Nested *nested `json:"nested,omitempty" url:"nested,omitempty"` + } + + values, err := QueryValues(&example{}) + require.NoError(t, err) + assert.Empty(t, values) + }) + + t.Run("empty required", func(t *testing.T) { + type nested struct { + Value *string `json:"value,omitempty" url:"value,omitempty"` + } + type example struct { + Required string `json:"required" url:"required"` + Nested *nested `json:"nested,omitempty" url:"nested,omitempty"` + } + + values, err := QueryValues(&example{}) + require.NoError(t, err) + assert.Equal(t, "required=", values.Encode()) + }) + + t.Run("allow multiple", func(t *testing.T) { + type example struct { + Values []string `json:"values" url:"values"` + } + + values, err := QueryValues( + &example{ + Values: []string{"foo", "bar", "baz"}, + }, + ) + require.NoError(t, err) + assert.Equal(t, "values=foo&values=bar&values=baz", values.Encode()) + }) + + t.Run("nested object", func(t *testing.T) { + type nested struct { + Value *string `json:"value,omitempty" url:"value,omitempty"` + } + type example struct { + Required string `json:"required" url:"required"` + Nested *nested `json:"nested,omitempty" url:"nested,omitempty"` + } + + nestedValue := "nestedValue" + values, err := QueryValues( + &example{ + Required: "requiredValue", + Nested: &nested{ + Value: &nestedValue, + }, + }, + ) + require.NoError(t, err) + assert.Equal(t, "nested%5Bvalue%5D=nestedValue&required=requiredValue", values.Encode()) + }) + + t.Run("url unspecified", func(t *testing.T) { + type example struct { + Required string `json:"required" url:"required"` + NotFound string `json:"notFound"` + } + + values, err := QueryValues( + &example{ + Required: "requiredValue", + NotFound: "notFound", + }, + ) + require.NoError(t, err) + assert.Equal(t, "required=requiredValue", values.Encode()) + }) + + t.Run("url ignored", func(t *testing.T) { + type example struct { + Required string `json:"required" url:"required"` + NotFound string `json:"notFound" url:"-"` + } + + values, err := QueryValues( + &example{ + Required: "requiredValue", + NotFound: "notFound", + }, + ) + require.NoError(t, err) + assert.Equal(t, "required=requiredValue", values.Encode()) + }) + + t.Run("datetime", func(t *testing.T) { + type example struct { + DateTime time.Time `json:"dateTime" url:"dateTime"` + } + + values, err := QueryValues( + &example{ + DateTime: time.Date(1994, 3, 16, 12, 34, 56, 0, time.UTC), + }, + ) + require.NoError(t, err) + assert.Equal(t, "dateTime=1994-03-16T12%3A34%3A56Z", values.Encode()) + }) + + t.Run("date", func(t *testing.T) { + type example struct { + Date time.Time `json:"date" url:"date" format:"date"` + } + + values, err := QueryValues( + &example{ + Date: time.Date(1994, 3, 16, 12, 34, 56, 0, time.UTC), + }, + ) + require.NoError(t, err) + assert.Equal(t, "date=1994-03-16", values.Encode()) + }) + + t.Run("optional time", func(t *testing.T) { + type example struct { + Date *time.Time `json:"date,omitempty" url:"date,omitempty" format:"date"` + } + + values, err := QueryValues( + &example{}, + ) + require.NoError(t, err) + assert.Empty(t, values.Encode()) + }) + + t.Run("omitempty with non-pointer zero value", func(t *testing.T) { + type enum string + + type example struct { + Enum enum `json:"enum,omitempty" url:"enum,omitempty"` + } + + values, err := QueryValues( + &example{}, + ) + require.NoError(t, err) + assert.Empty(t, values.Encode()) + }) + + t.Run("object array", func(t *testing.T) { + type object struct { + Key string `json:"key" url:"key"` + Value string `json:"value" url:"value"` + } + type example struct { + Objects []*object `json:"objects,omitempty" url:"objects,omitempty"` + } + + values, err := QueryValues( + &example{ + Objects: []*object{ + { + Key: "hello", + Value: "world", + }, + { + Key: "foo", + Value: "bar", + }, + }, + }, + ) + require.NoError(t, err) + assert.Equal(t, "objects%5Bkey%5D=hello&objects%5Bkey%5D=foo&objects%5Bvalue%5D=world&objects%5Bvalue%5D=bar", values.Encode()) + }) + + t.Run("map", func(t *testing.T) { + type request struct { + Metadata map[string]interface{} `json:"metadata" url:"metadata"` + } + values, err := QueryValues( + &request{ + Metadata: map[string]interface{}{ + "foo": "bar", + "baz": "qux", + }, + }, + ) + require.NoError(t, err) + assert.Equal(t, "metadata%5Bbaz%5D=qux&metadata%5Bfoo%5D=bar", values.Encode()) + }) + + t.Run("nested map", func(t *testing.T) { + type request struct { + Metadata map[string]interface{} `json:"metadata" url:"metadata"` + } + values, err := QueryValues( + &request{ + Metadata: map[string]interface{}{ + "inner": map[string]interface{}{ + "foo": "bar", + }, + }, + }, + ) + require.NoError(t, err) + assert.Equal(t, "metadata%5Binner%5D%5Bfoo%5D=bar", values.Encode()) + }) + + t.Run("nested map array", func(t *testing.T) { + type request struct { + Metadata map[string]interface{} `json:"metadata" url:"metadata"` + } + values, err := QueryValues( + &request{ + Metadata: map[string]interface{}{ + "inner": []string{ + "one", + "two", + "three", + }, + }, + }, + ) + require.NoError(t, err) + assert.Equal(t, "metadata%5Binner%5D=one&metadata%5Binner%5D=two&metadata%5Binner%5D=three", values.Encode()) + }) +} diff --git a/internal/retrier.go b/internal/retrier.go new file mode 100644 index 0000000..3418f00 --- /dev/null +++ b/internal/retrier.go @@ -0,0 +1,165 @@ +package internal + +import ( + "crypto/rand" + "math/big" + "net/http" + "time" +) + +const ( + defaultRetryAttempts = 2 + minRetryDelay = 500 * time.Millisecond + maxRetryDelay = 5000 * time.Millisecond +) + +// RetryOption adapts the behavior the *Retrier. +type RetryOption func(*retryOptions) + +// RetryFunc is a retryable HTTP function call (i.e. *http.Client.Do). +type RetryFunc func(*http.Request) (*http.Response, error) + +// WithMaxAttempts configures the maximum number of attempts +// of the *Retrier. +func WithMaxAttempts(attempts uint) RetryOption { + return func(opts *retryOptions) { + opts.attempts = attempts + } +} + +// Retrier retries failed requests a configurable number of times with an +// exponential back-off between each retry. +type Retrier struct { + attempts uint +} + +// NewRetrier constructs a new *Retrier with the given options, if any. +func NewRetrier(opts ...RetryOption) *Retrier { + options := new(retryOptions) + for _, opt := range opts { + opt(options) + } + attempts := uint(defaultRetryAttempts) + if options.attempts > 0 { + attempts = options.attempts + } + return &Retrier{ + attempts: attempts, + } +} + +// Run issues the request and, upon failure, retries the request if possible. +// +// The request will be retried as long as the request is deemed retryable and the +// number of retry attempts has not grown larger than the configured retry limit. +func (r *Retrier) Run( + fn RetryFunc, + request *http.Request, + errorDecoder ErrorDecoder, + opts ...RetryOption, +) (*http.Response, error) { + options := new(retryOptions) + for _, opt := range opts { + opt(options) + } + maxRetryAttempts := r.attempts + if options.attempts > 0 { + maxRetryAttempts = options.attempts + } + var ( + retryAttempt uint + previousError error + ) + return r.run( + fn, + request, + errorDecoder, + maxRetryAttempts, + retryAttempt, + previousError, + ) +} + +func (r *Retrier) run( + fn RetryFunc, + request *http.Request, + errorDecoder ErrorDecoder, + maxRetryAttempts uint, + retryAttempt uint, + previousError error, +) (*http.Response, error) { + if retryAttempt >= maxRetryAttempts { + return nil, previousError + } + + // If the call has been cancelled, don't issue the request. + if err := request.Context().Err(); err != nil { + return nil, err + } + + response, err := fn(request) + if err != nil { + return nil, err + } + + if r.shouldRetry(response) { + defer response.Body.Close() + + delay, err := r.retryDelay(retryAttempt) + if err != nil { + return nil, err + } + + time.Sleep(delay) + + return r.run( + fn, + request, + errorDecoder, + maxRetryAttempts, + retryAttempt+1, + decodeError(response, errorDecoder), + ) + } + + return response, nil +} + +// shouldRetry returns true if the request should be retried based on the given +// response status code. +func (r *Retrier) shouldRetry(response *http.Response) bool { + return response.StatusCode == http.StatusTooManyRequests || + response.StatusCode == http.StatusRequestTimeout || + response.StatusCode >= http.StatusInternalServerError +} + +// retryDelay calculates the delay time in milliseconds based on the retry attempt. +func (r *Retrier) retryDelay(retryAttempt uint) (time.Duration, error) { + // Apply exponential backoff. + delay := minRetryDelay + minRetryDelay*time.Duration(retryAttempt*retryAttempt) + + // Do not allow the number to exceed maxRetryDelay. + if delay > maxRetryDelay { + delay = maxRetryDelay + } + + // Apply some jitter by randomizing the value in the range of 75%-100%. + max := big.NewInt(int64(delay / 4)) + jitter, err := rand.Int(rand.Reader, max) + if err != nil { + return 0, err + } + + delay -= time.Duration(jitter.Int64()) + + // Never sleep less than the base sleep seconds. + if delay < minRetryDelay { + delay = minRetryDelay + } + + return delay, nil +} + +type retryOptions struct { + attempts uint +} diff --git a/internal/retrier_test.go b/internal/retrier_test.go new file mode 100644 index 0000000..87613f0 --- /dev/null +++ b/internal/retrier_test.go @@ -0,0 +1,211 @@ +package internal + +import ( + "context" + "encoding/json" + "io" + "net/http" + "net/http/httptest" + "testing" + "time" + + "github.com/merge-api/merge-go-client/v2/core" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +type RetryTestCase struct { + description string + + giveAttempts uint + giveStatusCodes []int + giveResponse *Response + + wantResponse *Response + wantError *core.APIError +} + +func TestRetrier(t *testing.T) { + tests := []*RetryTestCase{ + { + description: "retry request succeeds after multiple failures", + giveAttempts: 3, + giveStatusCodes: []int{ + http.StatusServiceUnavailable, + http.StatusServiceUnavailable, + http.StatusOK, + }, + giveResponse: &Response{ + Id: "1", + }, + wantResponse: &Response{ + Id: "1", + }, + }, + { + description: "retry request fails if MaxAttempts is exceeded", + giveAttempts: 3, + giveStatusCodes: []int{ + http.StatusRequestTimeout, + http.StatusRequestTimeout, + http.StatusRequestTimeout, + http.StatusOK, + }, + wantError: &core.APIError{ + StatusCode: http.StatusRequestTimeout, + }, + }, + { + description: "retry durations increase exponentially and stay within the min and max delay values", + giveAttempts: 4, + giveStatusCodes: []int{ + http.StatusServiceUnavailable, + http.StatusServiceUnavailable, + http.StatusServiceUnavailable, + http.StatusOK, + }, + }, + { + description: "retry does not occur on status code 404", + giveAttempts: 2, + giveStatusCodes: []int{http.StatusNotFound, http.StatusOK}, + wantError: &core.APIError{ + StatusCode: http.StatusNotFound, + }, + }, + { + description: "retries occur on status code 429", + giveAttempts: 2, + giveStatusCodes: []int{http.StatusTooManyRequests, http.StatusOK}, + }, + { + description: "retries occur on status code 408", + giveAttempts: 2, + giveStatusCodes: []int{http.StatusRequestTimeout, http.StatusOK}, + }, + { + description: "retries occur on status code 500", + giveAttempts: 2, + giveStatusCodes: []int{http.StatusInternalServerError, http.StatusOK}, + }, + } + + for _, tc := range tests { + t.Run(tc.description, func(t *testing.T) { + var ( + test = tc + server = newTestRetryServer(t, test) + client = server.Client() + ) + + t.Parallel() + + caller := NewCaller( + &CallerParams{ + Client: client, + }, + ) + + var response *Response + err := caller.Call( + context.Background(), + &CallParams{ + URL: server.URL, + Method: http.MethodGet, + Request: &Request{}, + Response: &response, + MaxAttempts: test.giveAttempts, + ResponseIsOptional: true, + }, + ) + + if test.wantError != nil { + require.IsType(t, err, &core.APIError{}) + expectedErrorCode := test.wantError.StatusCode + actualErrorCode := err.(*core.APIError).StatusCode + assert.Equal(t, expectedErrorCode, actualErrorCode) + return + } + + require.NoError(t, err) + assert.Equal(t, test.wantResponse, response) + }) + } +} + +// newTestRetryServer returns a new *httptest.Server configured with the +// given test parameters, suitable for testing retries. +func newTestRetryServer(t *testing.T, tc *RetryTestCase) *httptest.Server { + var index int + timestamps := make([]time.Time, 0, len(tc.giveStatusCodes)) + + return httptest.NewServer( + http.HandlerFunc( + func(w http.ResponseWriter, r *http.Request) { + timestamps = append(timestamps, time.Now()) + if index > 0 && index < len(expectedRetryDurations) { + // Ensure that the duration between retries increases exponentially, + // and that it is within the minimum and maximum retry delay values. + actualDuration := timestamps[index].Sub(timestamps[index-1]) + expectedDurationMin := expectedRetryDurations[index-1] * 75 / 100 + expectedDurationMax := expectedRetryDurations[index-1] * 125 / 100 + assert.True( + t, + actualDuration >= expectedDurationMin && actualDuration <= expectedDurationMax, + "expected duration to be in range [%v, %v], got %v", + expectedDurationMin, + expectedDurationMax, + actualDuration, + ) + assert.LessOrEqual( + t, + actualDuration, + maxRetryDelay, + "expected duration to be less than the maxRetryDelay (%v), got %v", + maxRetryDelay, + actualDuration, + ) + assert.GreaterOrEqual( + t, + actualDuration, + minRetryDelay, + "expected duration to be greater than the minRetryDelay (%v), got %v", + minRetryDelay, + actualDuration, + ) + } + + request := new(Request) + bytes, err := io.ReadAll(r.Body) + require.NoError(t, err) + require.NoError(t, json.Unmarshal(bytes, request)) + require.LessOrEqual(t, index, len(tc.giveStatusCodes)) + + statusCode := tc.giveStatusCodes[index] + w.WriteHeader(statusCode) + + if tc.giveResponse != nil && statusCode == http.StatusOK { + bytes, err = json.Marshal(tc.giveResponse) + require.NoError(t, err) + _, err = w.Write(bytes) + require.NoError(t, err) + } + + index++ + }, + ), + ) +} + +// expectedRetryDurations holds an array of calculated retry durations, +// where the index of the array should correspond to the retry attempt. +// +// Values are calculated based off of `minRetryDelay + minRetryDelay*i*i`, with +// a max and min value of 5000ms and 500ms respectively. +var expectedRetryDurations = []time.Duration{ + 500 * time.Millisecond, + 1000 * time.Millisecond, + 2500 * time.Millisecond, + 5000 * time.Millisecond, + 5000 * time.Millisecond, +} diff --git a/core/stringer.go b/internal/stringer.go similarity index 94% rename from core/stringer.go rename to internal/stringer.go index 000cf44..3128018 100644 --- a/core/stringer.go +++ b/internal/stringer.go @@ -1,4 +1,4 @@ -package core +package internal import "encoding/json" diff --git a/internal/time.go b/internal/time.go new file mode 100644 index 0000000..ab0e269 --- /dev/null +++ b/internal/time.go @@ -0,0 +1,137 @@ +package internal + +import ( + "encoding/json" + "time" +) + +const dateFormat = "2006-01-02" + +// DateTime wraps time.Time and adapts its JSON representation +// to conform to a RFC3339 date (e.g. 2006-01-02). +// +// Ref: https://ijmacd.github.io/rfc3339-iso8601 +type Date struct { + t *time.Time +} + +// NewDate returns a new *Date. If the given time.Time +// is nil, nil will be returned. +func NewDate(t time.Time) *Date { + return &Date{t: &t} +} + +// NewOptionalDate returns a new *Date. If the given time.Time +// is nil, nil will be returned. +func NewOptionalDate(t *time.Time) *Date { + if t == nil { + return nil + } + return &Date{t: t} +} + +// Time returns the Date's underlying time, if any. If the +// date is nil, the zero value is returned. +func (d *Date) Time() time.Time { + if d == nil || d.t == nil { + return time.Time{} + } + return *d.t +} + +// TimePtr returns a pointer to the Date's underlying time.Time, if any. +func (d *Date) TimePtr() *time.Time { + if d == nil || d.t == nil { + return nil + } + if d.t.IsZero() { + return nil + } + return d.t +} + +func (d *Date) MarshalJSON() ([]byte, error) { + if d == nil || d.t == nil { + return nil, nil + } + return json.Marshal(d.t.Format(dateFormat)) +} + +func (d *Date) UnmarshalJSON(data []byte) error { + var raw string + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + + parsedTime, err := time.Parse(dateFormat, raw) + if err != nil { + return err + } + + *d = Date{t: &parsedTime} + return nil +} + +// DateTime wraps time.Time and adapts its JSON representation +// to conform to a RFC3339 date-time (e.g. 2017-07-21T17:32:28Z). +// +// Ref: https://ijmacd.github.io/rfc3339-iso8601 +type DateTime struct { + t *time.Time +} + +// NewDateTime returns a new *DateTime. +func NewDateTime(t time.Time) *DateTime { + return &DateTime{t: &t} +} + +// NewOptionalDateTime returns a new *DateTime. If the given time.Time +// is nil, nil will be returned. +func NewOptionalDateTime(t *time.Time) *DateTime { + if t == nil { + return nil + } + return &DateTime{t: t} +} + +// Time returns the DateTime's underlying time, if any. If the +// date-time is nil, the zero value is returned. +func (d *DateTime) Time() time.Time { + if d == nil || d.t == nil { + return time.Time{} + } + return *d.t +} + +// TimePtr returns a pointer to the DateTime's underlying time.Time, if any. +func (d *DateTime) TimePtr() *time.Time { + if d == nil || d.t == nil { + return nil + } + if d.t.IsZero() { + return nil + } + return d.t +} + +func (d *DateTime) MarshalJSON() ([]byte, error) { + if d == nil || d.t == nil { + return nil, nil + } + return json.Marshal(d.t.Format(time.RFC3339)) +} + +func (d *DateTime) UnmarshalJSON(data []byte) error { + var raw string + if err := json.Unmarshal(data, &raw); err != nil { + return err + } + + parsedTime, err := time.Parse(time.RFC3339, raw) + if err != nil { + return err + } + + *d = DateTime{t: &parsedTime} + return nil +} diff --git a/option/request_option.go b/option/request_option.go new file mode 100644 index 0000000..30e1c8b --- /dev/null +++ b/option/request_option.go @@ -0,0 +1,80 @@ +// Code generated by Fern. DO NOT EDIT. + +package option + +import ( + core "github.com/merge-api/merge-go-client/v2/core" + http "net/http" + url "net/url" +) + +// RequestOption adapts the behavior of an individual request. +type RequestOption = core.RequestOption + +// WithBaseURL sets the base URL, overriding the default +// environment, if any. +func WithBaseURL(baseURL string) *core.BaseURLOption { + return &core.BaseURLOption{ + BaseURL: baseURL, + } +} + +// WithHTTPClient uses the given HTTPClient to issue the request. +func WithHTTPClient(httpClient core.HTTPClient) *core.HTTPClientOption { + return &core.HTTPClientOption{ + HTTPClient: httpClient, + } +} + +// WithHTTPHeader adds the given http.Header to the request. +func WithHTTPHeader(httpHeader http.Header) *core.HTTPHeaderOption { + return &core.HTTPHeaderOption{ + // Clone the headers so they can't be modified after the option call. + HTTPHeader: httpHeader.Clone(), + } +} + +// WithBodyProperties adds the given body properties to the request. +func WithBodyProperties(bodyProperties map[string]interface{}) *core.BodyPropertiesOption { + copiedBodyProperties := make(map[string]interface{}, len(bodyProperties)) + for key, value := range bodyProperties { + copiedBodyProperties[key] = value + } + return &core.BodyPropertiesOption{ + BodyProperties: copiedBodyProperties, + } +} + +// WithQueryParameters adds the given query parameters to the request. +func WithQueryParameters(queryParameters url.Values) *core.QueryParametersOption { + copiedQueryParameters := make(url.Values, len(queryParameters)) + for key, values := range queryParameters { + copiedQueryParameters[key] = values + } + return &core.QueryParametersOption{ + QueryParameters: copiedQueryParameters, + } +} + +// WithMaxAttempts configures the maximum number of retry attempts. +func WithMaxAttempts(attempts uint) *core.MaxAttemptsOption { + return &core.MaxAttemptsOption{ + MaxAttempts: attempts, + } +} + +// WithApiKey sets the 'Authorization: Bearer ' request header. +func WithApiKey(apiKey string) *core.ApiKeyOption { + return &core.ApiKeyOption{ + ApiKey: apiKey, + } +} + +// WithAccountToken sets the accountToken request header. +// +// Token identifying the end user. +func WithAccountToken(accountToken *string) *core.AccountTokenOption { + return &core.AccountTokenOption{ + AccountToken: accountToken, + } +} diff --git a/pointer.go b/pointer.go index 82fb917..92fefda 100644 --- a/pointer.go +++ b/pointer.go @@ -1,6 +1,10 @@ -package api +package merge -import "time" +import ( + "time" + + "github.com/google/uuid" +) // Bool returns a pointer to the given bool value. func Bool(b bool) *bool { @@ -97,7 +101,32 @@ func Uintptr(u uintptr) *uintptr { return &u } +// UUID returns a pointer to the given uuid.UUID value. +func UUID(u uuid.UUID) *uuid.UUID { + return &u +} + // Time returns a pointer to the given time.Time value. func Time(t time.Time) *time.Time { return &t } + +// MustParseDate attempts to parse the given string as a +// date time.Time, and panics upon failure. +func MustParseDate(date string) time.Time { + t, err := time.Parse("2006-01-02", date) + if err != nil { + panic(err) + } + return t +} + +// MustParseDateTime attempts to parse the given string as a +// datetime time.Time, and panics upon failure. +func MustParseDateTime(datetime string) time.Time { + t, err := time.Parse(time.RFC3339, datetime) + if err != nil { + panic(err) + } + return t +} diff --git a/ticketing/account_details.go b/ticketing/account_details.go new file mode 100644 index 0000000..f29b9eb --- /dev/null +++ b/ticketing/account_details.go @@ -0,0 +1,226 @@ +// Code generated by Fern. DO NOT EDIT. + +package ticketing + +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" + time "time" +) + +type AccountDetails struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + Integration *string `json:"integration,omitempty" url:"integration,omitempty"` + IntegrationSlug *string `json:"integration_slug,omitempty" url:"integration_slug,omitempty"` + Category *AccountDetailsCategory `json:"category,omitempty" url:"category,omitempty"` + EndUserOriginId *string `json:"end_user_origin_id,omitempty" url:"end_user_origin_id,omitempty"` + EndUserOrganizationName *string `json:"end_user_organization_name,omitempty" url:"end_user_organization_name,omitempty"` + EndUserEmailAddress *string `json:"end_user_email_address,omitempty" url:"end_user_email_address,omitempty"` + Status *string `json:"status,omitempty" url:"status,omitempty"` + WebhookListenerUrl *string `json:"webhook_listener_url,omitempty" url:"webhook_listener_url,omitempty"` + // 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. + IsDuplicate *bool `json:"is_duplicate,omitempty" url:"is_duplicate,omitempty"` + AccountType *string `json:"account_type,omitempty" url:"account_type,omitempty"` + // The time at which account completes the linking flow. + CompletedAt *time.Time `json:"completed_at,omitempty" url:"completed_at,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AccountDetails) GetId() *string { + if a == nil { + return nil + } + return a.Id +} + +func (a *AccountDetails) GetIntegration() *string { + if a == nil { + return nil + } + return a.Integration +} + +func (a *AccountDetails) GetIntegrationSlug() *string { + if a == nil { + return nil + } + return a.IntegrationSlug +} + +func (a *AccountDetails) GetCategory() *AccountDetailsCategory { + if a == nil { + return nil + } + return a.Category +} + +func (a *AccountDetails) GetEndUserOriginId() *string { + if a == nil { + return nil + } + return a.EndUserOriginId +} + +func (a *AccountDetails) GetEndUserOrganizationName() *string { + if a == nil { + return nil + } + return a.EndUserOrganizationName +} + +func (a *AccountDetails) GetEndUserEmailAddress() *string { + if a == nil { + return nil + } + return a.EndUserEmailAddress +} + +func (a *AccountDetails) GetStatus() *string { + if a == nil { + return nil + } + return a.Status +} + +func (a *AccountDetails) GetWebhookListenerUrl() *string { + if a == nil { + return nil + } + return a.WebhookListenerUrl +} + +func (a *AccountDetails) GetIsDuplicate() *bool { + if a == nil { + return nil + } + return a.IsDuplicate +} + +func (a *AccountDetails) GetAccountType() *string { + if a == nil { + return nil + } + return a.AccountType +} + +func (a *AccountDetails) GetCompletedAt() *time.Time { + if a == nil { + return nil + } + return a.CompletedAt +} + +func (a *AccountDetails) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AccountDetails) UnmarshalJSON(data []byte) error { + type embed AccountDetails + var unmarshaler = struct { + embed + CompletedAt *internal.DateTime `json:"completed_at,omitempty"` + }{ + embed: embed(*a), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *a = AccountDetails(unmarshaler.embed) + a.CompletedAt = unmarshaler.CompletedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AccountDetails) MarshalJSON() ([]byte, error) { + type embed AccountDetails + var marshaler = struct { + embed + CompletedAt *internal.DateTime `json:"completed_at,omitempty"` + }{ + embed: embed(*a), + CompletedAt: internal.NewOptionalDateTime(a.CompletedAt), + } + return json.Marshal(marshaler) +} + +func (a *AccountDetails) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} + +type AccountDetailsCategory struct { + CategoryEnum CategoryEnum + String string + + typ string +} + +func (a *AccountDetailsCategory) GetCategoryEnum() CategoryEnum { + if a == nil { + return "" + } + return a.CategoryEnum +} + +func (a *AccountDetailsCategory) GetString() string { + if a == nil { + return "" + } + return a.String +} + +func (a *AccountDetailsCategory) UnmarshalJSON(data []byte) error { + var valueCategoryEnum CategoryEnum + if err := json.Unmarshal(data, &valueCategoryEnum); err == nil { + a.typ = "CategoryEnum" + a.CategoryEnum = valueCategoryEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + a.typ = "String" + a.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, a) +} + +func (a AccountDetailsCategory) MarshalJSON() ([]byte, error) { + if a.typ == "CategoryEnum" || a.CategoryEnum != "" { + return json.Marshal(a.CategoryEnum) + } + if a.typ == "String" || a.String != "" { + return json.Marshal(a.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type AccountDetailsCategoryVisitor interface { + VisitCategoryEnum(CategoryEnum) error + VisitString(string) error +} + +func (a *AccountDetailsCategory) Accept(visitor AccountDetailsCategoryVisitor) error { + if a.typ == "CategoryEnum" || a.CategoryEnum != "" { + return visitor.VisitCategoryEnum(a.CategoryEnum) + } + if a.typ == "String" || a.String != "" { + return visitor.VisitString(a.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} diff --git a/ticketing/account_token.go b/ticketing/account_token.go new file mode 100644 index 0000000..0072ce8 --- /dev/null +++ b/ticketing/account_token.go @@ -0,0 +1,71 @@ +// Code generated by Fern. DO NOT EDIT. + +package ticketing + +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" +) + +type AccountToken struct { + AccountToken string `json:"account_token" url:"account_token"` + Integration *AccountIntegration `json:"integration" url:"integration"` + Id string `json:"id" url:"id"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AccountToken) GetAccountToken() string { + if a == nil { + return "" + } + return a.AccountToken +} + +func (a *AccountToken) GetIntegration() *AccountIntegration { + if a == nil { + return nil + } + return a.Integration +} + +func (a *AccountToken) GetId() string { + if a == nil { + return "" + } + return a.Id +} + +func (a *AccountToken) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AccountToken) UnmarshalJSON(data []byte) error { + type unmarshaler AccountToken + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *a = AccountToken(value) + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AccountToken) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} diff --git a/ticketing/accountdetails/client.go b/ticketing/accountdetails/client.go index 6637203..54dcd9c 100644 --- a/ticketing/accountdetails/client.go +++ b/ticketing/accountdetails/client.go @@ -1,48 +1,65 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package accountdetails import ( context "context" - core "github.com/merge-api/merge-go-client/core" - ticketing "github.com/merge-api/merge-go-client/ticketing" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" + ticketing "github.com/merge-api/merge-go-client/v2/ticketing" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Get details for a linked account. -func (c *Client) Retrieve(ctx context.Context) (*ticketing.AccountDetails, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ticketing/v1/account-details" +func (c *Client) Retrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*ticketing.AccountDetails, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ticketing/v1/account-details" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ticketing.AccountDetails if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/ticketing/accounts.go b/ticketing/accounts.go index 77eb93d..11004bb 100644 --- a/ticketing/accounts.go +++ b/ticketing/accounts.go @@ -1,35 +1,102 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package ticketing import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type AccountsListRequest struct { // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` } type AccountsRetrieveRequest struct { // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` +} + +type PaginatedAccountList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Account `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedAccountList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedAccountList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedAccountList) GetResults() []*Account { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedAccountList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedAccountList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedAccountList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedAccountList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedAccountList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) } diff --git a/ticketing/accounts/client.go b/ticketing/accounts/client.go index 7767ee8..57903a5 100644 --- a/ticketing/accounts/client.go +++ b/ticketing/accounts/client.go @@ -1,117 +1,137 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package accounts import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - ticketing "github.com/merge-api/merge-go-client/ticketing" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" + ticketing "github.com/merge-api/merge-go-client/v2/ticketing" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `Account` objects. -func (c *Client) List(ctx context.Context, request *ticketing.AccountsListRequest) (*ticketing.PaginatedAccountList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ticketing/v1/accounts" - - queryParams := make(url.Values) - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *ticketing.PaginatedAccountList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *ticketing.AccountsListRequest, + opts ...option.RequestOption, +) (*core.Page[*ticketing.Account], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ticketing/v1/accounts" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *ticketing.PaginatedAccountList) *internal.PageResponse[*string, *ticketing.Account] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *ticketing.Account]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Returns an `Account` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *ticketing.AccountsRetrieveRequest) (*ticketing.Account, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"ticketing/v1/accounts/%v", id) - - queryParams := make(url.Values) - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *ticketing.AccountsRetrieveRequest, + opts ...option.RequestOption, +) (*ticketing.Account, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/ticketing/v1/accounts/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ticketing.Account if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/ticketing/accounttoken/client.go b/ticketing/accounttoken/client.go index 5ce5524..96fc287 100644 --- a/ticketing/accounttoken/client.go +++ b/ticketing/accounttoken/client.go @@ -1,49 +1,69 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package accounttoken import ( context "context" - fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - ticketing "github.com/merge-api/merge-go-client/ticketing" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" + ticketing "github.com/merge-api/merge-go-client/v2/ticketing" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns the account token for the end user with the provided public token. -func (c *Client) Retrieve(ctx context.Context, publicToken string) (*ticketing.AccountToken, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"ticketing/v1/account-token/%v", publicToken) +func (c *Client) Retrieve( + ctx context.Context, + publicToken string, + opts ...option.RequestOption, +) (*ticketing.AccountToken, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/ticketing/v1/account-token/%v", + publicToken, + ) + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ticketing.AccountToken if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/ticketing/async_passthrough.go b/ticketing/async_passthrough.go index 8f12b8b..f6e2681 100644 --- a/ticketing/async_passthrough.go +++ b/ticketing/async_passthrough.go @@ -1,36 +1,44 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package ticketing import ( json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" ) type AsyncPassthroughRetrieveResponse struct { - typeName string RemoteResponse *RemoteResponse String string + + typ string } -func NewAsyncPassthroughRetrieveResponseFromRemoteResponse(value *RemoteResponse) *AsyncPassthroughRetrieveResponse { - return &AsyncPassthroughRetrieveResponse{typeName: "remoteResponse", RemoteResponse: value} +func (a *AsyncPassthroughRetrieveResponse) GetRemoteResponse() *RemoteResponse { + if a == nil { + return nil + } + return a.RemoteResponse } -func NewAsyncPassthroughRetrieveResponseFromString(value string) *AsyncPassthroughRetrieveResponse { - return &AsyncPassthroughRetrieveResponse{typeName: "string", String: value} +func (a *AsyncPassthroughRetrieveResponse) GetString() string { + if a == nil { + return "" + } + return a.String } func (a *AsyncPassthroughRetrieveResponse) UnmarshalJSON(data []byte) error { valueRemoteResponse := new(RemoteResponse) if err := json.Unmarshal(data, &valueRemoteResponse); err == nil { - a.typeName = "remoteResponse" + a.typ = "RemoteResponse" a.RemoteResponse = valueRemoteResponse return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" + a.typ = "String" a.String = valueString return nil } @@ -38,14 +46,13 @@ func (a *AsyncPassthroughRetrieveResponse) UnmarshalJSON(data []byte) error { } func (a AsyncPassthroughRetrieveResponse) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "remoteResponse": + if a.typ == "RemoteResponse" || a.RemoteResponse != nil { return json.Marshal(a.RemoteResponse) - case "string": + } + if a.typ == "String" || a.String != "" { return json.Marshal(a.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) } type AsyncPassthroughRetrieveResponseVisitor interface { @@ -54,12 +61,57 @@ type AsyncPassthroughRetrieveResponseVisitor interface { } func (a *AsyncPassthroughRetrieveResponse) Accept(visitor AsyncPassthroughRetrieveResponseVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "remoteResponse": + if a.typ == "RemoteResponse" || a.RemoteResponse != nil { return visitor.VisitRemoteResponse(a.RemoteResponse) - case "string": + } + if a.typ == "String" || a.String != "" { return visitor.VisitString(a.String) } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type AsyncPassthroughReciept struct { + AsyncPassthroughReceiptId string `json:"async_passthrough_receipt_id" url:"async_passthrough_receipt_id"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AsyncPassthroughReciept) GetAsyncPassthroughReceiptId() string { + if a == nil { + return "" + } + return a.AsyncPassthroughReceiptId +} + +func (a *AsyncPassthroughReciept) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AsyncPassthroughReciept) UnmarshalJSON(data []byte) error { + type unmarshaler AsyncPassthroughReciept + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *a = AsyncPassthroughReciept(value) + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AsyncPassthroughReciept) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) } diff --git a/ticketing/asyncpassthrough/client.go b/ticketing/asyncpassthrough/client.go index 632e4d6..c36db1d 100644 --- a/ticketing/asyncpassthrough/client.go +++ b/ticketing/asyncpassthrough/client.go @@ -1,50 +1,68 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package asyncpassthrough import ( context "context" - fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - ticketing "github.com/merge-api/merge-go-client/ticketing" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" + ticketing "github.com/merge-api/merge-go-client/v2/ticketing" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Asynchronously pull data from an endpoint not currently supported by Merge. -func (c *Client) Create(ctx context.Context, request *ticketing.DataPassthroughRequest) (*ticketing.AsyncPassthroughReciept, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ticketing/v1/async-passthrough" +func (c *Client) Create( + ctx context.Context, + request *ticketing.DataPassthroughRequest, + opts ...option.RequestOption, +) (*ticketing.AsyncPassthroughReciept, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ticketing/v1/async-passthrough" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *ticketing.AsyncPassthroughReciept if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -53,21 +71,38 @@ func (c *Client) Create(ctx context.Context, request *ticketing.DataPassthroughR } // Retrieves data from earlier async-passthrough POST request -func (c *Client) Retrieve(ctx context.Context, asyncPassthroughReceiptId string) (*ticketing.AsyncPassthroughRetrieveResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"ticketing/v1/async-passthrough/%v", asyncPassthroughReceiptId) +func (c *Client) Retrieve( + ctx context.Context, + asyncPassthroughReceiptId string, + opts ...option.RequestOption, +) (*ticketing.AsyncPassthroughRetrieveResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/ticketing/v1/async-passthrough/%v", + asyncPassthroughReceiptId, + ) + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ticketing.AsyncPassthroughRetrieveResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/ticketing/attachments.go b/ticketing/attachments.go index c643a66..87c599e 100644 --- a/ticketing/attachments.go +++ b/ticketing/attachments.go @@ -1,56 +1,363 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package ticketing import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type TicketingAttachmentEndpointRequest struct { // Whether to include debug fields (such as log file links) in the response. - IsDebugMode *bool `json:"-"` + IsDebugMode *bool `json:"-" url:"is_debug_mode,omitempty"` // Whether or not third-party updates should be run asynchronously. - RunAsync *bool `json:"-"` - Model *AttachmentRequest `json:"model,omitempty"` + RunAsync *bool `json:"-" url:"run_async,omitempty"` + Model *AttachmentRequest `json:"model,omitempty" url:"-"` } type AttachmentsDownloadRetrieveRequest struct { + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, specifies the export format of the file to be downloaded. For information on supported export formats, please refer to our export format help center article. - MimeType *string `json:"-"` + MimeType *string `json:"-" url:"mime_type,omitempty"` } type AttachmentsListRequest struct { // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *string `json:"-"` + Expand []*string `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // If provided, will only return attachments created in the third party platform after this datetime. - RemoteCreatedAfter *time.Time `json:"-"` + RemoteCreatedAfter *time.Time `json:"-" url:"remote_created_after,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` // If provided, will only return comments for this ticket. - TicketId *string `json:"-"` + TicketId *string `json:"-" url:"ticket_id,omitempty"` } type AttachmentsRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *string `json:"-"` + Expand []*string `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` +} + +// # The Attachment Object +// ### Description +// The `Attachment` object is used to represent an attachment for a ticket. +// +// ### Usage Example +// TODO +type AttachmentRequest struct { + // The attachment's name. It is required to include the file extension in the attachment's name. + FileName *string `json:"file_name,omitempty" url:"file_name,omitempty"` + // The ticket associated with the attachment. + Ticket *AttachmentRequestTicket `json:"ticket,omitempty" url:"ticket,omitempty"` + // The attachment's url. It is required to include the file extension in the file's URL. + FileUrl *string `json:"file_url,omitempty" url:"file_url,omitempty"` + // The attachment's file format. + ContentType *string `json:"content_type,omitempty" url:"content_type,omitempty"` + // The user who uploaded the attachment. + UploadedBy *string `json:"uploaded_by,omitempty" url:"uploaded_by,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AttachmentRequest) GetFileName() *string { + if a == nil { + return nil + } + return a.FileName +} + +func (a *AttachmentRequest) GetTicket() *AttachmentRequestTicket { + if a == nil { + return nil + } + return a.Ticket +} + +func (a *AttachmentRequest) GetFileUrl() *string { + if a == nil { + return nil + } + return a.FileUrl +} + +func (a *AttachmentRequest) GetContentType() *string { + if a == nil { + return nil + } + return a.ContentType +} + +func (a *AttachmentRequest) GetUploadedBy() *string { + if a == nil { + return nil + } + return a.UploadedBy +} + +func (a *AttachmentRequest) GetIntegrationParams() map[string]interface{} { + if a == nil { + return nil + } + return a.IntegrationParams +} + +func (a *AttachmentRequest) GetLinkedAccountParams() map[string]interface{} { + if a == nil { + return nil + } + return a.LinkedAccountParams +} + +func (a *AttachmentRequest) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AttachmentRequest) UnmarshalJSON(data []byte) error { + type unmarshaler AttachmentRequest + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *a = AttachmentRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AttachmentRequest) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} + +// The ticket associated with the attachment. +type AttachmentRequestTicket struct { + String string + Ticket *Ticket + + typ string +} + +func (a *AttachmentRequestTicket) GetString() string { + if a == nil { + return "" + } + return a.String +} + +func (a *AttachmentRequestTicket) GetTicket() *Ticket { + if a == nil { + return nil + } + return a.Ticket +} + +func (a *AttachmentRequestTicket) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + a.typ = "String" + a.String = valueString + return nil + } + valueTicket := new(Ticket) + if err := json.Unmarshal(data, &valueTicket); err == nil { + a.typ = "Ticket" + a.Ticket = valueTicket + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, a) +} + +func (a AttachmentRequestTicket) MarshalJSON() ([]byte, error) { + if a.typ == "String" || a.String != "" { + return json.Marshal(a.String) + } + if a.typ == "Ticket" || a.Ticket != nil { + return json.Marshal(a.Ticket) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type AttachmentRequestTicketVisitor interface { + VisitString(string) error + VisitTicket(*Ticket) error +} + +func (a *AttachmentRequestTicket) Accept(visitor AttachmentRequestTicketVisitor) error { + if a.typ == "String" || a.String != "" { + return visitor.VisitString(a.String) + } + if a.typ == "Ticket" || a.Ticket != nil { + return visitor.VisitTicket(a.Ticket) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type PaginatedAttachmentList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Attachment `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedAttachmentList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedAttachmentList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedAttachmentList) GetResults() []*Attachment { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedAttachmentList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedAttachmentList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedAttachmentList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedAttachmentList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedAttachmentList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +type TicketingAttachmentResponse struct { + Model *Attachment `json:"model" url:"model"` + Warnings []*WarningValidationProblem `json:"warnings" url:"warnings"` + Errors []*ErrorValidationProblem `json:"errors" url:"errors"` + Logs []*DebugModeLog `json:"logs,omitempty" url:"logs,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (t *TicketingAttachmentResponse) GetModel() *Attachment { + if t == nil { + return nil + } + return t.Model +} + +func (t *TicketingAttachmentResponse) GetWarnings() []*WarningValidationProblem { + if t == nil { + return nil + } + return t.Warnings +} + +func (t *TicketingAttachmentResponse) GetErrors() []*ErrorValidationProblem { + if t == nil { + return nil + } + return t.Errors +} + +func (t *TicketingAttachmentResponse) GetLogs() []*DebugModeLog { + if t == nil { + return nil + } + return t.Logs +} + +func (t *TicketingAttachmentResponse) GetExtraProperties() map[string]interface{} { + return t.extraProperties +} + +func (t *TicketingAttachmentResponse) UnmarshalJSON(data []byte) error { + type unmarshaler TicketingAttachmentResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *t = TicketingAttachmentResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *t) + if err != nil { + return err + } + t.extraProperties = extraProperties + t.rawJSON = json.RawMessage(data) + return nil +} + +func (t *TicketingAttachmentResponse) String() string { + if len(t.rawJSON) > 0 { + if value, err := internal.StringifyJSON(t.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(t); err == nil { + return value + } + return fmt.Sprintf("%#v", t) } diff --git a/ticketing/attachments/client.go b/ticketing/attachments/client.go index 365a042..d33b926 100644 --- a/ticketing/attachments/client.go +++ b/ticketing/attachments/client.go @@ -1,4 +1,4 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package attachments @@ -6,127 +6,132 @@ import ( bytes "bytes" context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - ticketing "github.com/merge-api/merge-go-client/ticketing" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" + ticketing "github.com/merge-api/merge-go-client/v2/ticketing" io "io" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `Attachment` objects. -func (c *Client) List(ctx context.Context, request *ticketing.AttachmentsListRequest) (*ticketing.PaginatedAttachmentList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ticketing/v1/attachments" - - queryParams := make(url.Values) - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteCreatedAfter != nil { - queryParams.Add("remote_created_after", fmt.Sprintf("%v", request.RemoteCreatedAfter.Format(time.RFC3339))) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if request.TicketId != nil { - queryParams.Add("ticket_id", fmt.Sprintf("%v", *request.TicketId)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *ticketing.PaginatedAttachmentList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *ticketing.AttachmentsListRequest, + opts ...option.RequestOption, +) (*core.Page[*ticketing.Attachment], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ticketing/v1/attachments" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *ticketing.PaginatedAttachmentList) *internal.PageResponse[*string, *ticketing.Attachment] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *ticketing.Attachment]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Creates an `Attachment` object with the given values. -func (c *Client) Create(ctx context.Context, request *ticketing.TicketingAttachmentEndpointRequest) (*ticketing.TicketingAttachmentResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ticketing/v1/attachments" - - queryParams := make(url.Values) - if request.IsDebugMode != nil { - queryParams.Add("is_debug_mode", fmt.Sprintf("%v", *request.IsDebugMode)) - } - if request.RunAsync != nil { - queryParams.Add("run_async", fmt.Sprintf("%v", *request.RunAsync)) +func (c *Client) Create( + ctx context.Context, + request *ticketing.TicketingAttachmentEndpointRequest, + opts ...option.RequestOption, +) (*ticketing.TicketingAttachmentResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ticketing/v1/attachments" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *ticketing.TicketingAttachmentResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -135,32 +140,46 @@ func (c *Client) Create(ctx context.Context, request *ticketing.TicketingAttachm } // Returns an `Attachment` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *ticketing.AttachmentsRetrieveRequest) (*ticketing.Attachment, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"ticketing/v1/attachments/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *ticketing.AttachmentsRetrieveRequest, + opts ...option.RequestOption, +) (*ticketing.Attachment, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/ticketing/v1/attachments/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ticketing.Attachment if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -169,29 +188,46 @@ func (c *Client) Retrieve(ctx context.Context, id string, request *ticketing.Att } // Returns the `File` content with the given `id` as a stream of bytes. -func (c *Client) DownloadRetrieve(ctx context.Context, id string, request *ticketing.AttachmentsDownloadRetrieveRequest) (io.Reader, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"ticketing/v1/attachments/%v/download", id) - - queryParams := make(url.Values) - if request.MimeType != nil { - queryParams.Add("mime_type", fmt.Sprintf("%v", *request.MimeType)) +func (c *Client) DownloadRetrieve( + ctx context.Context, + id string, + request *ticketing.AttachmentsDownloadRetrieveRequest, + opts ...option.RequestOption, +) (io.Reader, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/ticketing/v1/attachments/%v/download", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) response := bytes.NewBuffer(nil) if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: response, }, ); err != nil { return nil, err @@ -200,21 +236,34 @@ func (c *Client) DownloadRetrieve(ctx context.Context, id string, request *ticke } // Returns metadata for `TicketingAttachment` POSTs. -func (c *Client) MetaPostRetrieve(ctx context.Context) (*ticketing.MetaResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ticketing/v1/attachments/meta/post" +func (c *Client) MetaPostRetrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*ticketing.MetaResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ticketing/v1/attachments/meta/post" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ticketing.MetaResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/ticketing/audit_trail.go b/ticketing/audit_trail.go index ad1e700..af42f13 100644 --- a/ticketing/audit_trail.go +++ b/ticketing/audit_trail.go @@ -1,18 +1,667 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package ticketing +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" + time "time" +) + type AuditTrailListRequest struct { // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // If included, will only include audit trail events that occurred before this time - EndDate *string `json:"-"` - // 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`, `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED` - EventType *string `json:"-"` + EndDate *string `json:"-" url:"end_date,omitempty"` + // 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`, `REGENERATED_WEBHOOK_SIGNATURE`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `DELETED_ALL_COMMON_MODELS_FOR_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`, `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED` + EventType *string `json:"-" url:"event_type,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // If included, will only include audit trail events that occurred after this time - StartDate *string `json:"-"` + StartDate *string `json:"-" url:"start_date,omitempty"` // If provided, this will return events associated with the specified user email. Please note that the email address reflects the user's email at the time of the event, and may not be their current email. - UserEmail *string `json:"-"` + UserEmail *string `json:"-" url:"user_email,omitempty"` +} + +type AuditLogEvent struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The User's full name at the time of this Event occurring. + UserName *string `json:"user_name,omitempty" url:"user_name,omitempty"` + // The User's email at the time of this Event occurring. + UserEmail *string `json:"user_email,omitempty" url:"user_email,omitempty"` + // Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. + // + // * `ADMIN` - ADMIN + // * `DEVELOPER` - DEVELOPER + // * `MEMBER` - MEMBER + // * `API` - API + // * `SYSTEM` - SYSTEM + // * `MERGE_TEAM` - MERGE_TEAM + Role *AuditLogEventRole `json:"role" url:"role"` + IpAddress string `json:"ip_address" url:"ip_address"` + // Designates the type of event that occurred. + // + // * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY + // * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY + // * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY + // * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY + // * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY + // * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE + // * `INVITED_USER` - INVITED_USER + // * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED + // * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED + // * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT + // * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT + // * `CREATED_DESTINATION` - CREATED_DESTINATION + // * `DELETED_DESTINATION` - DELETED_DESTINATION + // * `CHANGED_DESTINATION` - CHANGED_DESTINATION + // * `CHANGED_SCOPES` - CHANGED_SCOPES + // * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION + // * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS + // * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION + // * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION + // * `ENABLED_CATEGORY` - ENABLED_CATEGORY + // * `DISABLED_CATEGORY` - DISABLED_CATEGORY + // * `CHANGED_PASSWORD` - CHANGED_PASSWORD + // * `RESET_PASSWORD` - RESET_PASSWORD + // * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + // * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + // * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION + // * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT + // * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING + // * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING + // * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING + // * `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 + // * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + // * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + // * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE + // * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + // * `MUTED_ISSUE` - MUTED_ISSUE + // * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK + // * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK + // * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK + // * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED + // * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED + EventType *AuditLogEventEventType `json:"event_type" url:"event_type"` + EventDescription string `json:"event_description" url:"event_description"` + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AuditLogEvent) GetId() *string { + if a == nil { + return nil + } + return a.Id +} + +func (a *AuditLogEvent) GetUserName() *string { + if a == nil { + return nil + } + return a.UserName +} + +func (a *AuditLogEvent) GetUserEmail() *string { + if a == nil { + return nil + } + return a.UserEmail +} + +func (a *AuditLogEvent) GetRole() *AuditLogEventRole { + if a == nil { + return nil + } + return a.Role +} + +func (a *AuditLogEvent) GetIpAddress() string { + if a == nil { + return "" + } + return a.IpAddress +} + +func (a *AuditLogEvent) GetEventType() *AuditLogEventEventType { + if a == nil { + return nil + } + return a.EventType +} + +func (a *AuditLogEvent) GetEventDescription() string { + if a == nil { + return "" + } + return a.EventDescription +} + +func (a *AuditLogEvent) GetCreatedAt() *time.Time { + if a == nil { + return nil + } + return a.CreatedAt +} + +func (a *AuditLogEvent) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AuditLogEvent) UnmarshalJSON(data []byte) error { + type embed AuditLogEvent + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + }{ + embed: embed(*a), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *a = AuditLogEvent(unmarshaler.embed) + a.CreatedAt = unmarshaler.CreatedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AuditLogEvent) MarshalJSON() ([]byte, error) { + type embed AuditLogEvent + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + }{ + embed: embed(*a), + CreatedAt: internal.NewOptionalDateTime(a.CreatedAt), + } + return json.Marshal(marshaler) +} + +func (a *AuditLogEvent) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} + +// Designates the type of event that occurred. +// +// * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY +// * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY +// * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY +// * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY +// * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY +// * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE +// * `INVITED_USER` - INVITED_USER +// * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED +// * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED +// * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT +// * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT +// * `CREATED_DESTINATION` - CREATED_DESTINATION +// * `DELETED_DESTINATION` - DELETED_DESTINATION +// * `CHANGED_DESTINATION` - CHANGED_DESTINATION +// * `CHANGED_SCOPES` - CHANGED_SCOPES +// * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION +// * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS +// * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION +// * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION +// * `ENABLED_CATEGORY` - ENABLED_CATEGORY +// * `DISABLED_CATEGORY` - DISABLED_CATEGORY +// * `CHANGED_PASSWORD` - CHANGED_PASSWORD +// * `RESET_PASSWORD` - RESET_PASSWORD +// * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION +// * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT +// * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION +// * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT +// * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING +// * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING +// * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING +// * `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 +// * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE +// * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE +// * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE +// * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC +// * `MUTED_ISSUE` - MUTED_ISSUE +// * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK +// * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK +// * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK +// * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED +// * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED +type AuditLogEventEventType struct { + EventTypeEnum EventTypeEnum + String string + + typ string +} + +func (a *AuditLogEventEventType) GetEventTypeEnum() EventTypeEnum { + if a == nil { + return "" + } + return a.EventTypeEnum +} + +func (a *AuditLogEventEventType) GetString() string { + if a == nil { + return "" + } + return a.String +} + +func (a *AuditLogEventEventType) UnmarshalJSON(data []byte) error { + var valueEventTypeEnum EventTypeEnum + if err := json.Unmarshal(data, &valueEventTypeEnum); err == nil { + a.typ = "EventTypeEnum" + a.EventTypeEnum = valueEventTypeEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + a.typ = "String" + a.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, a) +} + +func (a AuditLogEventEventType) MarshalJSON() ([]byte, error) { + if a.typ == "EventTypeEnum" || a.EventTypeEnum != "" { + return json.Marshal(a.EventTypeEnum) + } + if a.typ == "String" || a.String != "" { + return json.Marshal(a.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type AuditLogEventEventTypeVisitor interface { + VisitEventTypeEnum(EventTypeEnum) error + VisitString(string) error +} + +func (a *AuditLogEventEventType) Accept(visitor AuditLogEventEventTypeVisitor) error { + if a.typ == "EventTypeEnum" || a.EventTypeEnum != "" { + return visitor.VisitEventTypeEnum(a.EventTypeEnum) + } + if a.typ == "String" || a.String != "" { + return visitor.VisitString(a.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} + +// Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. +// +// * `ADMIN` - ADMIN +// * `DEVELOPER` - DEVELOPER +// * `MEMBER` - MEMBER +// * `API` - API +// * `SYSTEM` - SYSTEM +// * `MERGE_TEAM` - MERGE_TEAM +type AuditLogEventRole struct { + RoleEnum RoleEnum + String string + + typ string +} + +func (a *AuditLogEventRole) GetRoleEnum() RoleEnum { + if a == nil { + return "" + } + return a.RoleEnum +} + +func (a *AuditLogEventRole) GetString() string { + if a == nil { + return "" + } + return a.String +} + +func (a *AuditLogEventRole) UnmarshalJSON(data []byte) error { + var valueRoleEnum RoleEnum + if err := json.Unmarshal(data, &valueRoleEnum); err == nil { + a.typ = "RoleEnum" + a.RoleEnum = valueRoleEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + a.typ = "String" + a.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, a) +} + +func (a AuditLogEventRole) MarshalJSON() ([]byte, error) { + if a.typ == "RoleEnum" || a.RoleEnum != "" { + return json.Marshal(a.RoleEnum) + } + if a.typ == "String" || a.String != "" { + return json.Marshal(a.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type AuditLogEventRoleVisitor interface { + VisitRoleEnum(RoleEnum) error + VisitString(string) error +} + +func (a *AuditLogEventRole) Accept(visitor AuditLogEventRoleVisitor) error { + if a.typ == "RoleEnum" || a.RoleEnum != "" { + return visitor.VisitRoleEnum(a.RoleEnum) + } + if a.typ == "String" || a.String != "" { + return visitor.VisitString(a.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} + +// * `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY +// * `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY +// * `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY +// * `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY +// * `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY +// * `REGENERATED_WEBHOOK_SIGNATURE` - REGENERATED_WEBHOOK_SIGNATURE +// * `INVITED_USER` - INVITED_USER +// * `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED +// * `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED +// * `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT +// * `DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT` - DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT +// * `CREATED_DESTINATION` - CREATED_DESTINATION +// * `DELETED_DESTINATION` - DELETED_DESTINATION +// * `CHANGED_DESTINATION` - CHANGED_DESTINATION +// * `CHANGED_SCOPES` - CHANGED_SCOPES +// * `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION +// * `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS +// * `ENABLED_INTEGRATION` - ENABLED_INTEGRATION +// * `DISABLED_INTEGRATION` - DISABLED_INTEGRATION +// * `ENABLED_CATEGORY` - ENABLED_CATEGORY +// * `DISABLED_CATEGORY` - DISABLED_CATEGORY +// * `CHANGED_PASSWORD` - CHANGED_PASSWORD +// * `RESET_PASSWORD` - RESET_PASSWORD +// * `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION +// * `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT +// * `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION +// * `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT +// * `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING +// * `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING +// * `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING +// * `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 +// * `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE +// * `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE +// * `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE +// * `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC +// * `MUTED_ISSUE` - MUTED_ISSUE +// * `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK +// * `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK +// * `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK +// * `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED +// * `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED +type EventTypeEnum string + +const ( + EventTypeEnumCreatedRemoteProductionApiKey EventTypeEnum = "CREATED_REMOTE_PRODUCTION_API_KEY" + EventTypeEnumDeletedRemoteProductionApiKey EventTypeEnum = "DELETED_REMOTE_PRODUCTION_API_KEY" + EventTypeEnumCreatedTestApiKey EventTypeEnum = "CREATED_TEST_API_KEY" + EventTypeEnumDeletedTestApiKey EventTypeEnum = "DELETED_TEST_API_KEY" + EventTypeEnumRegeneratedProductionApiKey EventTypeEnum = "REGENERATED_PRODUCTION_API_KEY" + EventTypeEnumRegeneratedWebhookSignature EventTypeEnum = "REGENERATED_WEBHOOK_SIGNATURE" + EventTypeEnumInvitedUser EventTypeEnum = "INVITED_USER" + EventTypeEnumTwoFactorAuthEnabled EventTypeEnum = "TWO_FACTOR_AUTH_ENABLED" + EventTypeEnumTwoFactorAuthDisabled EventTypeEnum = "TWO_FACTOR_AUTH_DISABLED" + EventTypeEnumDeletedLinkedAccount EventTypeEnum = "DELETED_LINKED_ACCOUNT" + EventTypeEnumDeletedAllCommonModelsForLinkedAccount EventTypeEnum = "DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT" + EventTypeEnumCreatedDestination EventTypeEnum = "CREATED_DESTINATION" + EventTypeEnumDeletedDestination EventTypeEnum = "DELETED_DESTINATION" + EventTypeEnumChangedDestination EventTypeEnum = "CHANGED_DESTINATION" + EventTypeEnumChangedScopes EventTypeEnum = "CHANGED_SCOPES" + EventTypeEnumChangedPersonalInformation EventTypeEnum = "CHANGED_PERSONAL_INFORMATION" + EventTypeEnumChangedOrganizationSettings EventTypeEnum = "CHANGED_ORGANIZATION_SETTINGS" + EventTypeEnumEnabledIntegration EventTypeEnum = "ENABLED_INTEGRATION" + EventTypeEnumDisabledIntegration EventTypeEnum = "DISABLED_INTEGRATION" + EventTypeEnumEnabledCategory EventTypeEnum = "ENABLED_CATEGORY" + EventTypeEnumDisabledCategory EventTypeEnum = "DISABLED_CATEGORY" + EventTypeEnumChangedPassword EventTypeEnum = "CHANGED_PASSWORD" + EventTypeEnumResetPassword EventTypeEnum = "RESET_PASSWORD" + EventTypeEnumEnabledRedactUnmappedDataForOrganization EventTypeEnum = "ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION" + EventTypeEnumEnabledRedactUnmappedDataForLinkedAccount EventTypeEnum = "ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT" + EventTypeEnumDisabledRedactUnmappedDataForOrganization EventTypeEnum = "DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION" + EventTypeEnumDisabledRedactUnmappedDataForLinkedAccount EventTypeEnum = "DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT" + EventTypeEnumCreatedIntegrationWideFieldMapping EventTypeEnum = "CREATED_INTEGRATION_WIDE_FIELD_MAPPING" + EventTypeEnumCreatedLinkedAccountFieldMapping EventTypeEnum = "CREATED_LINKED_ACCOUNT_FIELD_MAPPING" + EventTypeEnumChangedIntegrationWideFieldMapping EventTypeEnum = "CHANGED_INTEGRATION_WIDE_FIELD_MAPPING" + EventTypeEnumChangedLinkedAccountFieldMapping EventTypeEnum = "CHANGED_LINKED_ACCOUNT_FIELD_MAPPING" + EventTypeEnumDeletedIntegrationWideFieldMapping EventTypeEnum = "DELETED_INTEGRATION_WIDE_FIELD_MAPPING" + EventTypeEnumDeletedLinkedAccountFieldMapping EventTypeEnum = "DELETED_LINKED_ACCOUNT_FIELD_MAPPING" + EventTypeEnumCreatedLinkedAccountCommonModelOverride EventTypeEnum = "CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE" + EventTypeEnumChangedLinkedAccountCommonModelOverride EventTypeEnum = "CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE" + EventTypeEnumDeletedLinkedAccountCommonModelOverride EventTypeEnum = "DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE" + EventTypeEnumForcedLinkedAccountResync EventTypeEnum = "FORCED_LINKED_ACCOUNT_RESYNC" + EventTypeEnumMutedIssue EventTypeEnum = "MUTED_ISSUE" + EventTypeEnumGeneratedMagicLink EventTypeEnum = "GENERATED_MAGIC_LINK" + EventTypeEnumEnabledMergeWebhook EventTypeEnum = "ENABLED_MERGE_WEBHOOK" + EventTypeEnumDisabledMergeWebhook EventTypeEnum = "DISABLED_MERGE_WEBHOOK" + EventTypeEnumMergeWebhookTargetChanged EventTypeEnum = "MERGE_WEBHOOK_TARGET_CHANGED" + EventTypeEnumEndUserCredentialsAccessed EventTypeEnum = "END_USER_CREDENTIALS_ACCESSED" +) + +func NewEventTypeEnumFromString(s string) (EventTypeEnum, error) { + switch s { + case "CREATED_REMOTE_PRODUCTION_API_KEY": + return EventTypeEnumCreatedRemoteProductionApiKey, nil + case "DELETED_REMOTE_PRODUCTION_API_KEY": + return EventTypeEnumDeletedRemoteProductionApiKey, nil + case "CREATED_TEST_API_KEY": + return EventTypeEnumCreatedTestApiKey, nil + case "DELETED_TEST_API_KEY": + return EventTypeEnumDeletedTestApiKey, nil + case "REGENERATED_PRODUCTION_API_KEY": + return EventTypeEnumRegeneratedProductionApiKey, nil + case "REGENERATED_WEBHOOK_SIGNATURE": + return EventTypeEnumRegeneratedWebhookSignature, nil + case "INVITED_USER": + return EventTypeEnumInvitedUser, nil + case "TWO_FACTOR_AUTH_ENABLED": + return EventTypeEnumTwoFactorAuthEnabled, nil + case "TWO_FACTOR_AUTH_DISABLED": + return EventTypeEnumTwoFactorAuthDisabled, nil + case "DELETED_LINKED_ACCOUNT": + return EventTypeEnumDeletedLinkedAccount, nil + case "DELETED_ALL_COMMON_MODELS_FOR_LINKED_ACCOUNT": + return EventTypeEnumDeletedAllCommonModelsForLinkedAccount, nil + case "CREATED_DESTINATION": + return EventTypeEnumCreatedDestination, nil + case "DELETED_DESTINATION": + return EventTypeEnumDeletedDestination, nil + case "CHANGED_DESTINATION": + return EventTypeEnumChangedDestination, nil + case "CHANGED_SCOPES": + return EventTypeEnumChangedScopes, nil + case "CHANGED_PERSONAL_INFORMATION": + return EventTypeEnumChangedPersonalInformation, nil + case "CHANGED_ORGANIZATION_SETTINGS": + return EventTypeEnumChangedOrganizationSettings, nil + case "ENABLED_INTEGRATION": + return EventTypeEnumEnabledIntegration, nil + case "DISABLED_INTEGRATION": + return EventTypeEnumDisabledIntegration, nil + case "ENABLED_CATEGORY": + return EventTypeEnumEnabledCategory, nil + case "DISABLED_CATEGORY": + return EventTypeEnumDisabledCategory, nil + case "CHANGED_PASSWORD": + return EventTypeEnumChangedPassword, nil + case "RESET_PASSWORD": + return EventTypeEnumResetPassword, nil + case "ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION": + return EventTypeEnumEnabledRedactUnmappedDataForOrganization, nil + case "ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT": + return EventTypeEnumEnabledRedactUnmappedDataForLinkedAccount, nil + case "DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION": + return EventTypeEnumDisabledRedactUnmappedDataForOrganization, nil + case "DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT": + return EventTypeEnumDisabledRedactUnmappedDataForLinkedAccount, nil + case "CREATED_INTEGRATION_WIDE_FIELD_MAPPING": + return EventTypeEnumCreatedIntegrationWideFieldMapping, nil + case "CREATED_LINKED_ACCOUNT_FIELD_MAPPING": + return EventTypeEnumCreatedLinkedAccountFieldMapping, nil + case "CHANGED_INTEGRATION_WIDE_FIELD_MAPPING": + return EventTypeEnumChangedIntegrationWideFieldMapping, nil + case "CHANGED_LINKED_ACCOUNT_FIELD_MAPPING": + return EventTypeEnumChangedLinkedAccountFieldMapping, nil + case "DELETED_INTEGRATION_WIDE_FIELD_MAPPING": + return EventTypeEnumDeletedIntegrationWideFieldMapping, nil + case "DELETED_LINKED_ACCOUNT_FIELD_MAPPING": + return EventTypeEnumDeletedLinkedAccountFieldMapping, nil + case "CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE": + return EventTypeEnumCreatedLinkedAccountCommonModelOverride, nil + case "CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE": + return EventTypeEnumChangedLinkedAccountCommonModelOverride, nil + case "DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE": + return EventTypeEnumDeletedLinkedAccountCommonModelOverride, nil + case "FORCED_LINKED_ACCOUNT_RESYNC": + return EventTypeEnumForcedLinkedAccountResync, nil + case "MUTED_ISSUE": + return EventTypeEnumMutedIssue, nil + case "GENERATED_MAGIC_LINK": + return EventTypeEnumGeneratedMagicLink, nil + case "ENABLED_MERGE_WEBHOOK": + return EventTypeEnumEnabledMergeWebhook, nil + case "DISABLED_MERGE_WEBHOOK": + return EventTypeEnumDisabledMergeWebhook, nil + case "MERGE_WEBHOOK_TARGET_CHANGED": + return EventTypeEnumMergeWebhookTargetChanged, nil + case "END_USER_CREDENTIALS_ACCESSED": + return EventTypeEnumEndUserCredentialsAccessed, nil + } + var t EventTypeEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (e EventTypeEnum) Ptr() *EventTypeEnum { + return &e +} + +type PaginatedAuditLogEventList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*AuditLogEvent `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedAuditLogEventList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedAuditLogEventList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedAuditLogEventList) GetResults() []*AuditLogEvent { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedAuditLogEventList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedAuditLogEventList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedAuditLogEventList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedAuditLogEventList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedAuditLogEventList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +// * `ADMIN` - ADMIN +// * `DEVELOPER` - DEVELOPER +// * `MEMBER` - MEMBER +// * `API` - API +// * `SYSTEM` - SYSTEM +// * `MERGE_TEAM` - MERGE_TEAM +type RoleEnum string + +const ( + RoleEnumAdmin RoleEnum = "ADMIN" + RoleEnumDeveloper RoleEnum = "DEVELOPER" + RoleEnumMember RoleEnum = "MEMBER" + RoleEnumApi RoleEnum = "API" + RoleEnumSystem RoleEnum = "SYSTEM" + RoleEnumMergeTeam RoleEnum = "MERGE_TEAM" +) + +func NewRoleEnumFromString(s string) (RoleEnum, error) { + switch s { + case "ADMIN": + return RoleEnumAdmin, nil + case "DEVELOPER": + return RoleEnumDeveloper, nil + case "MEMBER": + return RoleEnumMember, nil + case "API": + return RoleEnumApi, nil + case "SYSTEM": + return RoleEnumSystem, nil + case "MERGE_TEAM": + return RoleEnumMergeTeam, nil + } + var t RoleEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (r RoleEnum) Ptr() *RoleEnum { + return &r } diff --git a/ticketing/audittrail/client.go b/ticketing/audittrail/client.go index 5950d1d..118a7c4 100644 --- a/ticketing/audittrail/client.go +++ b/ticketing/audittrail/client.go @@ -1,76 +1,92 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package audittrail import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - ticketing "github.com/merge-api/merge-go-client/ticketing" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" + ticketing "github.com/merge-api/merge-go-client/v2/ticketing" http "net/http" - url "net/url" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Gets a list of audit trail events. -func (c *Client) List(ctx context.Context, request *ticketing.AuditTrailListRequest) (*ticketing.PaginatedAuditLogEventList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL +func (c *Client) List( + ctx context.Context, + request *ticketing.AuditTrailListRequest, + opts ...option.RequestOption, +) (*core.Page[*ticketing.AuditLogEvent], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ticketing/v1/audit-trail" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } - endpointURL := baseURL + "/" + "ticketing/v1/audit-trail" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) - queryParams := make(url.Values) - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.EndDate != nil { - queryParams.Add("end_date", fmt.Sprintf("%v", *request.EndDate)) - } - if request.EventType != nil { - queryParams.Add("event_type", fmt.Sprintf("%v", *request.EventType)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } } - if request.StartDate != nil { - queryParams.Add("start_date", fmt.Sprintf("%v", *request.StartDate)) - } - if request.UserEmail != nil { - queryParams.Add("user_email", fmt.Sprintf("%v", *request.UserEmail)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *ticketing.PaginatedAuditLogEventList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { - return nil, err + readPageResponse := func(response *ticketing.PaginatedAuditLogEventList) *internal.PageResponse[*string, *ticketing.AuditLogEvent] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *ticketing.AuditLogEvent]{ + Next: next, + Results: results, + Done: next == zeroValue, + } } - return response, nil + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } diff --git a/ticketing/available_actions.go b/ticketing/available_actions.go new file mode 100644 index 0000000..70d6d39 --- /dev/null +++ b/ticketing/available_actions.go @@ -0,0 +1,77 @@ +// Code generated by Fern. DO NOT EDIT. + +package ticketing + +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" +) + +// # The AvailableActions Object +// ### Description +// The `Activity` object is used to see all available model/operation combinations for an integration. +// +// ### Usage Example +// Fetch all the actions available for the `Zenefits` integration. +type AvailableActions struct { + Integration *AccountIntegration `json:"integration" url:"integration"` + PassthroughAvailable bool `json:"passthrough_available" url:"passthrough_available"` + AvailableModelOperations []*ModelOperation `json:"available_model_operations,omitempty" url:"available_model_operations,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AvailableActions) GetIntegration() *AccountIntegration { + if a == nil { + return nil + } + return a.Integration +} + +func (a *AvailableActions) GetPassthroughAvailable() bool { + if a == nil { + return false + } + return a.PassthroughAvailable +} + +func (a *AvailableActions) GetAvailableModelOperations() []*ModelOperation { + if a == nil { + return nil + } + return a.AvailableModelOperations +} + +func (a *AvailableActions) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AvailableActions) UnmarshalJSON(data []byte) error { + type unmarshaler AvailableActions + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *a = AvailableActions(value) + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AvailableActions) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} diff --git a/ticketing/availableactions/client.go b/ticketing/availableactions/client.go index 4080cb0..de835b7 100644 --- a/ticketing/availableactions/client.go +++ b/ticketing/availableactions/client.go @@ -1,48 +1,65 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package availableactions import ( context "context" - core "github.com/merge-api/merge-go-client/core" - ticketing "github.com/merge-api/merge-go-client/ticketing" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" + ticketing "github.com/merge-api/merge-go-client/v2/ticketing" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of models and actions available for an account. -func (c *Client) Retrieve(ctx context.Context) (*ticketing.AvailableActions, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ticketing/v1/available-actions" +func (c *Client) Retrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*ticketing.AvailableActions, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ticketing/v1/available-actions" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ticketing.AvailableActions if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/ticketing/client/client.go b/ticketing/client/client.go index 140cbb3..b37257f 100644 --- a/ticketing/client/client.go +++ b/ticketing/client/client.go @@ -1,43 +1,45 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package client import ( - core "github.com/merge-api/merge-go-client/core" - accountdetails "github.com/merge-api/merge-go-client/ticketing/accountdetails" - accounts "github.com/merge-api/merge-go-client/ticketing/accounts" - accounttoken "github.com/merge-api/merge-go-client/ticketing/accounttoken" - asyncpassthrough "github.com/merge-api/merge-go-client/ticketing/asyncpassthrough" - attachments "github.com/merge-api/merge-go-client/ticketing/attachments" - audittrail "github.com/merge-api/merge-go-client/ticketing/audittrail" - availableactions "github.com/merge-api/merge-go-client/ticketing/availableactions" - collections "github.com/merge-api/merge-go-client/ticketing/collections" - comments "github.com/merge-api/merge-go-client/ticketing/comments" - contacts "github.com/merge-api/merge-go-client/ticketing/contacts" - deleteaccount "github.com/merge-api/merge-go-client/ticketing/deleteaccount" - fieldmapping "github.com/merge-api/merge-go-client/ticketing/fieldmapping" - forceresync "github.com/merge-api/merge-go-client/ticketing/forceresync" - generatekey "github.com/merge-api/merge-go-client/ticketing/generatekey" - issues "github.com/merge-api/merge-go-client/ticketing/issues" - linkedaccounts "github.com/merge-api/merge-go-client/ticketing/linkedaccounts" - linktoken "github.com/merge-api/merge-go-client/ticketing/linktoken" - passthrough "github.com/merge-api/merge-go-client/ticketing/passthrough" - projects "github.com/merge-api/merge-go-client/ticketing/projects" - regeneratekey "github.com/merge-api/merge-go-client/ticketing/regeneratekey" - roles "github.com/merge-api/merge-go-client/ticketing/roles" - scopes "github.com/merge-api/merge-go-client/ticketing/scopes" - syncstatus "github.com/merge-api/merge-go-client/ticketing/syncstatus" - tags "github.com/merge-api/merge-go-client/ticketing/tags" - teams "github.com/merge-api/merge-go-client/ticketing/teams" - tickets "github.com/merge-api/merge-go-client/ticketing/tickets" - users "github.com/merge-api/merge-go-client/ticketing/users" - webhookreceivers "github.com/merge-api/merge-go-client/ticketing/webhookreceivers" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" + accountdetails "github.com/merge-api/merge-go-client/v2/ticketing/accountdetails" + accounts "github.com/merge-api/merge-go-client/v2/ticketing/accounts" + accounttoken "github.com/merge-api/merge-go-client/v2/ticketing/accounttoken" + asyncpassthrough "github.com/merge-api/merge-go-client/v2/ticketing/asyncpassthrough" + attachments "github.com/merge-api/merge-go-client/v2/ticketing/attachments" + audittrail "github.com/merge-api/merge-go-client/v2/ticketing/audittrail" + availableactions "github.com/merge-api/merge-go-client/v2/ticketing/availableactions" + collections "github.com/merge-api/merge-go-client/v2/ticketing/collections" + comments "github.com/merge-api/merge-go-client/v2/ticketing/comments" + contacts "github.com/merge-api/merge-go-client/v2/ticketing/contacts" + deleteaccount "github.com/merge-api/merge-go-client/v2/ticketing/deleteaccount" + fieldmapping "github.com/merge-api/merge-go-client/v2/ticketing/fieldmapping" + forceresync "github.com/merge-api/merge-go-client/v2/ticketing/forceresync" + generatekey "github.com/merge-api/merge-go-client/v2/ticketing/generatekey" + issues "github.com/merge-api/merge-go-client/v2/ticketing/issues" + linkedaccounts "github.com/merge-api/merge-go-client/v2/ticketing/linkedaccounts" + linktoken "github.com/merge-api/merge-go-client/v2/ticketing/linktoken" + passthrough "github.com/merge-api/merge-go-client/v2/ticketing/passthrough" + projects "github.com/merge-api/merge-go-client/v2/ticketing/projects" + regeneratekey "github.com/merge-api/merge-go-client/v2/ticketing/regeneratekey" + roles "github.com/merge-api/merge-go-client/v2/ticketing/roles" + scopes "github.com/merge-api/merge-go-client/v2/ticketing/scopes" + syncstatus "github.com/merge-api/merge-go-client/v2/ticketing/syncstatus" + tags "github.com/merge-api/merge-go-client/v2/ticketing/tags" + teams "github.com/merge-api/merge-go-client/v2/ticketing/teams" + tickets "github.com/merge-api/merge-go-client/v2/ticketing/tickets" + users "github.com/merge-api/merge-go-client/v2/ticketing/users" + webhookreceivers "github.com/merge-api/merge-go-client/v2/ticketing/webhookreceivers" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header AccountDetails *accountdetails.Client @@ -70,14 +72,16 @@ type Client struct { WebhookReceivers *webhookreceivers.Client } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ - baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), + baseURL: options.BaseURL, + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), header: options.ToHeader(), AccountDetails: accountdetails.NewClient(opts...), AccountToken: accounttoken.NewClient(opts...), diff --git a/ticketing/collections.go b/ticketing/collections.go index 37da667..9852046 100644 --- a/ticketing/collections.go +++ b/ticketing/collections.go @@ -1,102 +1,155 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package ticketing import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type CollectionsListRequest struct { // If provided, will only return collections of the given type. - CollectionType *string `json:"-"` + CollectionType *string `json:"-" url:"collection_type,omitempty"` // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *CollectionsListRequestExpand `json:"-"` + Expand []*string `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // If provided, will only return collections whose parent collection matches the given id. - ParentCollectionId *string `json:"-"` + ParentCollectionId *string `json:"-" url:"parent_collection_id,omitempty"` // Deprecated. Use show_enum_origins. - RemoteFields *string `json:"-"` + RemoteFields *string `json:"-" url:"remote_fields,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` // 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) - ShowEnumOrigins *string `json:"-"` + ShowEnumOrigins *string `json:"-" url:"show_enum_origins,omitempty"` } type CollectionsRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *CollectionsRetrieveRequestExpand `json:"-"` + Expand []*string `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // Deprecated. Use show_enum_origins. - RemoteFields *string `json:"-"` + RemoteFields *string `json:"-" url:"remote_fields,omitempty"` // 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) - ShowEnumOrigins *string `json:"-"` + ShowEnumOrigins *string `json:"-" url:"show_enum_origins,omitempty"` } -type CollectionsListRequestExpand string +type CollectionsViewersListRequestExpandItem string const ( - CollectionsListRequestExpandParentCollection CollectionsListRequestExpand = "parent_collection" - CollectionsListRequestExpandTeams CollectionsListRequestExpand = "teams" - CollectionsListRequestExpandTeamsParentCollection CollectionsListRequestExpand = "teams,parent_collection" + CollectionsViewersListRequestExpandItemTeam CollectionsViewersListRequestExpandItem = "team" + CollectionsViewersListRequestExpandItemUser CollectionsViewersListRequestExpandItem = "user" ) -func NewCollectionsListRequestExpandFromString(s string) (CollectionsListRequestExpand, error) { +func NewCollectionsViewersListRequestExpandItemFromString(s string) (CollectionsViewersListRequestExpandItem, error) { switch s { - case "parent_collection": - return CollectionsListRequestExpandParentCollection, nil - case "teams": - return CollectionsListRequestExpandTeams, nil - case "teams,parent_collection": - return CollectionsListRequestExpandTeamsParentCollection, nil + case "team": + return CollectionsViewersListRequestExpandItemTeam, nil + case "user": + return CollectionsViewersListRequestExpandItemUser, nil } - var t CollectionsListRequestExpand + var t CollectionsViewersListRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (c CollectionsListRequestExpand) Ptr() *CollectionsListRequestExpand { +func (c CollectionsViewersListRequestExpandItem) Ptr() *CollectionsViewersListRequestExpandItem { return &c } -type CollectionsRetrieveRequestExpand string +type PaginatedCollectionList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Collection `json:"results,omitempty" url:"results,omitempty"` -const ( - CollectionsRetrieveRequestExpandParentCollection CollectionsRetrieveRequestExpand = "parent_collection" - CollectionsRetrieveRequestExpandTeams CollectionsRetrieveRequestExpand = "teams" - CollectionsRetrieveRequestExpandTeamsParentCollection CollectionsRetrieveRequestExpand = "teams,parent_collection" -) + extraProperties map[string]interface{} + rawJSON json.RawMessage +} -func NewCollectionsRetrieveRequestExpandFromString(s string) (CollectionsRetrieveRequestExpand, error) { - switch s { - case "parent_collection": - return CollectionsRetrieveRequestExpandParentCollection, nil - case "teams": - return CollectionsRetrieveRequestExpandTeams, nil - case "teams,parent_collection": - return CollectionsRetrieveRequestExpandTeamsParentCollection, nil +func (p *PaginatedCollectionList) GetNext() *string { + if p == nil { + return nil } - var t CollectionsRetrieveRequestExpand - return "", fmt.Errorf("%s is not a valid %T", s, t) + return p.Next } -func (c CollectionsRetrieveRequestExpand) Ptr() *CollectionsRetrieveRequestExpand { - return &c +func (p *PaginatedCollectionList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedCollectionList) GetResults() []*Collection { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedCollectionList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedCollectionList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedCollectionList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedCollectionList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedCollectionList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +type CollectionsViewersListRequest struct { + // The pagination cursor value. + Cursor *string `json:"-" url:"cursor,omitempty"` + // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. + Expand []*CollectionsViewersListRequestExpandItem `json:"-" url:"expand,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` + // Whether to include the original data Merge fetched from the third-party to produce these models. + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` + // Number of results to return per page. + PageSize *int `json:"-" url:"page_size,omitempty"` } diff --git a/ticketing/collections/client.go b/ticketing/collections/client.go index 46954e2..e9bdcbd 100644 --- a/ticketing/collections/client.go +++ b/ticketing/collections/client.go @@ -1,141 +1,200 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package collections import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - ticketing "github.com/merge-api/merge-go-client/ticketing" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" + ticketing "github.com/merge-api/merge-go-client/v2/ticketing" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `Collection` objects. -func (c *Client) List(ctx context.Context, request *ticketing.CollectionsListRequest) (*ticketing.PaginatedCollectionList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL +func (c *Client) List( + ctx context.Context, + request *ticketing.CollectionsListRequest, + opts ...option.RequestOption, +) (*core.Page[*ticketing.Collection], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ticketing/v1/collections" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } - endpointURL := baseURL + "/" + "ticketing/v1/collections" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) - queryParams := make(url.Values) - if request.CollectionType != nil { - queryParams.Add("collection_type", fmt.Sprintf("%v", *request.CollectionType)) - } - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.ParentCollectionId != nil { - queryParams.Add("parent_collection_id", fmt.Sprintf("%v", *request.ParentCollectionId)) - } - if request.RemoteFields != nil { - queryParams.Add("remote_fields", fmt.Sprintf("%v", request.RemoteFields)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if request.ShowEnumOrigins != nil { - queryParams.Add("show_enum_origins", fmt.Sprintf("%v", request.ShowEnumOrigins)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *ticketing.PaginatedCollectionList) *internal.PageResponse[*string, *ticketing.Collection] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *ticketing.Collection]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) +} - var response *ticketing.PaginatedCollectionList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +// Returns a list of `Viewer` objects that point to a User id or Team id that is either an assignee or viewer on a `Collection` with the given id. [Learn more.](https://help.merge.dev/en/articles/10333658-ticketing-access-control-list-acls) +func (c *Client) ViewersList( + ctx context.Context, + collectionId string, + request *ticketing.CollectionsViewersListRequest, + opts ...option.RequestOption, +) (*core.Page[*ticketing.Viewer], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/ticketing/v1/collections/%v/viewers", + collectionId, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *ticketing.PaginatedViewerList) *internal.PageResponse[*string, *ticketing.Viewer] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *ticketing.Viewer]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Returns a `Collection` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *ticketing.CollectionsRetrieveRequest) (*ticketing.Collection, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"ticketing/v1/collections/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.RemoteFields != nil { - queryParams.Add("remote_fields", fmt.Sprintf("%v", request.RemoteFields)) - } - if request.ShowEnumOrigins != nil { - queryParams.Add("show_enum_origins", fmt.Sprintf("%v", request.ShowEnumOrigins)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *ticketing.CollectionsRetrieveRequest, + opts ...option.RequestOption, +) (*ticketing.Collection, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/ticketing/v1/collections/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ticketing.Collection if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/ticketing/comments.go b/ticketing/comments.go index 095d753..5a141de 100644 --- a/ticketing/comments.go +++ b/ticketing/comments.go @@ -1,126 +1,923 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package ticketing import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type CommentEndpointRequest struct { // Whether to include debug fields (such as log file links) in the response. - IsDebugMode *bool `json:"-"` + IsDebugMode *bool `json:"-" url:"is_debug_mode,omitempty"` // Whether or not third-party updates should be run asynchronously. - RunAsync *bool `json:"-"` - Model *CommentRequest `json:"model,omitempty"` + RunAsync *bool `json:"-" url:"run_async,omitempty"` + Model *CommentRequest `json:"model,omitempty" url:"-"` } type CommentsListRequest struct { // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *CommentsListRequestExpand `json:"-"` + Expand []*CommentsListRequestExpandItem `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // If provided, will only return Comments created in the third party platform after this datetime. - RemoteCreatedAfter *time.Time `json:"-"` + RemoteCreatedAfter *time.Time `json:"-" url:"remote_created_after,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` // If provided, will only return comments for this ticket. - TicketId *string `json:"-"` + TicketId *string `json:"-" url:"ticket_id,omitempty"` } type CommentsRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *CommentsRetrieveRequestExpand `json:"-"` + Expand []*CommentsRetrieveRequestExpandItem `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` } -type CommentsListRequestExpand string +type CommentsListRequestExpandItem string const ( - CommentsListRequestExpandContact CommentsListRequestExpand = "contact" - CommentsListRequestExpandContactTicket CommentsListRequestExpand = "contact,ticket" - CommentsListRequestExpandTicket CommentsListRequestExpand = "ticket" - CommentsListRequestExpandUser CommentsListRequestExpand = "user" - CommentsListRequestExpandUserContact CommentsListRequestExpand = "user,contact" - CommentsListRequestExpandUserContactTicket CommentsListRequestExpand = "user,contact,ticket" - CommentsListRequestExpandUserTicket CommentsListRequestExpand = "user,ticket" + CommentsListRequestExpandItemContact CommentsListRequestExpandItem = "contact" + CommentsListRequestExpandItemTicket CommentsListRequestExpandItem = "ticket" + CommentsListRequestExpandItemUser CommentsListRequestExpandItem = "user" ) -func NewCommentsListRequestExpandFromString(s string) (CommentsListRequestExpand, error) { +func NewCommentsListRequestExpandItemFromString(s string) (CommentsListRequestExpandItem, error) { switch s { case "contact": - return CommentsListRequestExpandContact, nil - case "contact,ticket": - return CommentsListRequestExpandContactTicket, nil + return CommentsListRequestExpandItemContact, nil case "ticket": - return CommentsListRequestExpandTicket, nil + return CommentsListRequestExpandItemTicket, nil case "user": - return CommentsListRequestExpandUser, nil - case "user,contact": - return CommentsListRequestExpandUserContact, nil - case "user,contact,ticket": - return CommentsListRequestExpandUserContactTicket, nil - case "user,ticket": - return CommentsListRequestExpandUserTicket, nil - } - var t CommentsListRequestExpand + return CommentsListRequestExpandItemUser, nil + } + var t CommentsListRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (c CommentsListRequestExpand) Ptr() *CommentsListRequestExpand { +func (c CommentsListRequestExpandItem) Ptr() *CommentsListRequestExpandItem { return &c } -type CommentsRetrieveRequestExpand string +type CommentsRetrieveRequestExpandItem string const ( - CommentsRetrieveRequestExpandContact CommentsRetrieveRequestExpand = "contact" - CommentsRetrieveRequestExpandContactTicket CommentsRetrieveRequestExpand = "contact,ticket" - CommentsRetrieveRequestExpandTicket CommentsRetrieveRequestExpand = "ticket" - CommentsRetrieveRequestExpandUser CommentsRetrieveRequestExpand = "user" - CommentsRetrieveRequestExpandUserContact CommentsRetrieveRequestExpand = "user,contact" - CommentsRetrieveRequestExpandUserContactTicket CommentsRetrieveRequestExpand = "user,contact,ticket" - CommentsRetrieveRequestExpandUserTicket CommentsRetrieveRequestExpand = "user,ticket" + CommentsRetrieveRequestExpandItemContact CommentsRetrieveRequestExpandItem = "contact" + CommentsRetrieveRequestExpandItemTicket CommentsRetrieveRequestExpandItem = "ticket" + CommentsRetrieveRequestExpandItemUser CommentsRetrieveRequestExpandItem = "user" ) -func NewCommentsRetrieveRequestExpandFromString(s string) (CommentsRetrieveRequestExpand, error) { +func NewCommentsRetrieveRequestExpandItemFromString(s string) (CommentsRetrieveRequestExpandItem, error) { switch s { case "contact": - return CommentsRetrieveRequestExpandContact, nil - case "contact,ticket": - return CommentsRetrieveRequestExpandContactTicket, nil + return CommentsRetrieveRequestExpandItemContact, nil case "ticket": - return CommentsRetrieveRequestExpandTicket, nil + return CommentsRetrieveRequestExpandItemTicket, nil case "user": - return CommentsRetrieveRequestExpandUser, nil - case "user,contact": - return CommentsRetrieveRequestExpandUserContact, nil - case "user,contact,ticket": - return CommentsRetrieveRequestExpandUserContactTicket, nil - case "user,ticket": - return CommentsRetrieveRequestExpandUserTicket, nil - } - var t CommentsRetrieveRequestExpand + return CommentsRetrieveRequestExpandItemUser, nil + } + var t CommentsRetrieveRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (c CommentsRetrieveRequestExpand) Ptr() *CommentsRetrieveRequestExpand { +func (c CommentsRetrieveRequestExpandItem) Ptr() *CommentsRetrieveRequestExpandItem { return &c } + +// # The Comment Object +// ### Description +// The `Comment` object is used to represent a comment on a ticket. +// +// ### Usage Example +// TODO +type Comment struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The author of the Comment, if the author is a User. If the third party does not support specifying an author, we will append "[Posted on behalf of {name}]" to the comment. + User *CommentUser `json:"user,omitempty" url:"user,omitempty"` + // The author of the Comment, if the author is a Contact.If the third party does not support specifying an author, we will append "[Posted on behalf of {name}]" to the comment. + Contact *CommentContact `json:"contact,omitempty" url:"contact,omitempty"` + // The comment's text body. + Body *string `json:"body,omitempty" url:"body,omitempty"` + // The comment's text body formatted as html. + HtmlBody *string `json:"html_body,omitempty" url:"html_body,omitempty"` + // The ticket associated with the comment. + Ticket *CommentTicket `json:"ticket,omitempty" url:"ticket,omitempty"` + // Whether or not the comment is internal. + IsPrivate *bool `json:"is_private,omitempty" url:"is_private,omitempty"` + // When the third party's comment was created. + RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty" url:"remote_created_at,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (c *Comment) GetId() *string { + if c == nil { + return nil + } + return c.Id +} + +func (c *Comment) GetRemoteId() *string { + if c == nil { + return nil + } + return c.RemoteId +} + +func (c *Comment) GetCreatedAt() *time.Time { + if c == nil { + return nil + } + return c.CreatedAt +} + +func (c *Comment) GetModifiedAt() *time.Time { + if c == nil { + return nil + } + return c.ModifiedAt +} + +func (c *Comment) GetUser() *CommentUser { + if c == nil { + return nil + } + return c.User +} + +func (c *Comment) GetContact() *CommentContact { + if c == nil { + return nil + } + return c.Contact +} + +func (c *Comment) GetBody() *string { + if c == nil { + return nil + } + return c.Body +} + +func (c *Comment) GetHtmlBody() *string { + if c == nil { + return nil + } + return c.HtmlBody +} + +func (c *Comment) GetTicket() *CommentTicket { + if c == nil { + return nil + } + return c.Ticket +} + +func (c *Comment) GetIsPrivate() *bool { + if c == nil { + return nil + } + return c.IsPrivate +} + +func (c *Comment) GetRemoteCreatedAt() *time.Time { + if c == nil { + return nil + } + return c.RemoteCreatedAt +} + +func (c *Comment) GetRemoteWasDeleted() *bool { + if c == nil { + return nil + } + return c.RemoteWasDeleted +} + +func (c *Comment) GetFieldMappings() map[string]interface{} { + if c == nil { + return nil + } + return c.FieldMappings +} + +func (c *Comment) GetRemoteData() []*RemoteData { + if c == nil { + return nil + } + return c.RemoteData +} + +func (c *Comment) GetExtraProperties() map[string]interface{} { + return c.extraProperties +} + +func (c *Comment) UnmarshalJSON(data []byte) error { + type embed Comment + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + }{ + embed: embed(*c), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *c = Comment(unmarshaler.embed) + c.CreatedAt = unmarshaler.CreatedAt.TimePtr() + c.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + c.RemoteCreatedAt = unmarshaler.RemoteCreatedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *c) + if err != nil { + return err + } + c.extraProperties = extraProperties + c.rawJSON = json.RawMessage(data) + return nil +} + +func (c *Comment) MarshalJSON() ([]byte, error) { + type embed Comment + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + }{ + embed: embed(*c), + CreatedAt: internal.NewOptionalDateTime(c.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(c.ModifiedAt), + RemoteCreatedAt: internal.NewOptionalDateTime(c.RemoteCreatedAt), + } + return json.Marshal(marshaler) +} + +func (c *Comment) String() string { + if len(c.rawJSON) > 0 { + if value, err := internal.StringifyJSON(c.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(c); err == nil { + return value + } + return fmt.Sprintf("%#v", c) +} + +// The author of the Comment, if the author is a Contact.If the third party does not support specifying an author, we will append "[Posted on behalf of {name}]" to the comment. +type CommentContact struct { + String string + Contact *Contact + + typ string +} + +func (c *CommentContact) GetString() string { + if c == nil { + return "" + } + return c.String +} + +func (c *CommentContact) GetContact() *Contact { + if c == nil { + return nil + } + return c.Contact +} + +func (c *CommentContact) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + c.typ = "String" + c.String = valueString + return nil + } + valueContact := new(Contact) + if err := json.Unmarshal(data, &valueContact); err == nil { + c.typ = "Contact" + c.Contact = valueContact + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, c) +} + +func (c CommentContact) MarshalJSON() ([]byte, error) { + if c.typ == "String" || c.String != "" { + return json.Marshal(c.String) + } + if c.typ == "Contact" || c.Contact != nil { + return json.Marshal(c.Contact) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", c) +} + +type CommentContactVisitor interface { + VisitString(string) error + VisitContact(*Contact) error +} + +func (c *CommentContact) Accept(visitor CommentContactVisitor) error { + if c.typ == "String" || c.String != "" { + return visitor.VisitString(c.String) + } + if c.typ == "Contact" || c.Contact != nil { + return visitor.VisitContact(c.Contact) + } + return fmt.Errorf("type %T does not include a non-empty union type", c) +} + +// # The Comment Object +// ### Description +// The `Comment` object is used to represent a comment on a ticket. +// +// ### Usage Example +// TODO +type CommentRequest struct { + // The author of the Comment, if the author is a User. If the third party does not support specifying an author, we will append "[Posted on behalf of {name}]" to the comment. + User *CommentRequestUser `json:"user,omitempty" url:"user,omitempty"` + // The author of the Comment, if the author is a Contact.If the third party does not support specifying an author, we will append "[Posted on behalf of {name}]" to the comment. + Contact *CommentRequestContact `json:"contact,omitempty" url:"contact,omitempty"` + // The comment's text body. + Body *string `json:"body,omitempty" url:"body,omitempty"` + // The comment's text body formatted as html. + HtmlBody *string `json:"html_body,omitempty" url:"html_body,omitempty"` + // The ticket associated with the comment. + Ticket *CommentRequestTicket `json:"ticket,omitempty" url:"ticket,omitempty"` + // Whether or not the comment is internal. + IsPrivate *bool `json:"is_private,omitempty" url:"is_private,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (c *CommentRequest) GetUser() *CommentRequestUser { + if c == nil { + return nil + } + return c.User +} + +func (c *CommentRequest) GetContact() *CommentRequestContact { + if c == nil { + return nil + } + return c.Contact +} + +func (c *CommentRequest) GetBody() *string { + if c == nil { + return nil + } + return c.Body +} + +func (c *CommentRequest) GetHtmlBody() *string { + if c == nil { + return nil + } + return c.HtmlBody +} + +func (c *CommentRequest) GetTicket() *CommentRequestTicket { + if c == nil { + return nil + } + return c.Ticket +} + +func (c *CommentRequest) GetIsPrivate() *bool { + if c == nil { + return nil + } + return c.IsPrivate +} + +func (c *CommentRequest) GetIntegrationParams() map[string]interface{} { + if c == nil { + return nil + } + return c.IntegrationParams +} + +func (c *CommentRequest) GetLinkedAccountParams() map[string]interface{} { + if c == nil { + return nil + } + return c.LinkedAccountParams +} + +func (c *CommentRequest) GetExtraProperties() map[string]interface{} { + return c.extraProperties +} + +func (c *CommentRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CommentRequest + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *c = CommentRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *c) + if err != nil { + return err + } + c.extraProperties = extraProperties + c.rawJSON = json.RawMessage(data) + return nil +} + +func (c *CommentRequest) String() string { + if len(c.rawJSON) > 0 { + if value, err := internal.StringifyJSON(c.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(c); err == nil { + return value + } + return fmt.Sprintf("%#v", c) +} + +// The author of the Comment, if the author is a Contact.If the third party does not support specifying an author, we will append "[Posted on behalf of {name}]" to the comment. +type CommentRequestContact struct { + String string + Contact *Contact + + typ string +} + +func (c *CommentRequestContact) GetString() string { + if c == nil { + return "" + } + return c.String +} + +func (c *CommentRequestContact) GetContact() *Contact { + if c == nil { + return nil + } + return c.Contact +} + +func (c *CommentRequestContact) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + c.typ = "String" + c.String = valueString + return nil + } + valueContact := new(Contact) + if err := json.Unmarshal(data, &valueContact); err == nil { + c.typ = "Contact" + c.Contact = valueContact + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, c) +} + +func (c CommentRequestContact) MarshalJSON() ([]byte, error) { + if c.typ == "String" || c.String != "" { + return json.Marshal(c.String) + } + if c.typ == "Contact" || c.Contact != nil { + return json.Marshal(c.Contact) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", c) +} + +type CommentRequestContactVisitor interface { + VisitString(string) error + VisitContact(*Contact) error +} + +func (c *CommentRequestContact) Accept(visitor CommentRequestContactVisitor) error { + if c.typ == "String" || c.String != "" { + return visitor.VisitString(c.String) + } + if c.typ == "Contact" || c.Contact != nil { + return visitor.VisitContact(c.Contact) + } + return fmt.Errorf("type %T does not include a non-empty union type", c) +} + +// The ticket associated with the comment. +type CommentRequestTicket struct { + String string + Ticket *Ticket + + typ string +} + +func (c *CommentRequestTicket) GetString() string { + if c == nil { + return "" + } + return c.String +} + +func (c *CommentRequestTicket) GetTicket() *Ticket { + if c == nil { + return nil + } + return c.Ticket +} + +func (c *CommentRequestTicket) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + c.typ = "String" + c.String = valueString + return nil + } + valueTicket := new(Ticket) + if err := json.Unmarshal(data, &valueTicket); err == nil { + c.typ = "Ticket" + c.Ticket = valueTicket + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, c) +} + +func (c CommentRequestTicket) MarshalJSON() ([]byte, error) { + if c.typ == "String" || c.String != "" { + return json.Marshal(c.String) + } + if c.typ == "Ticket" || c.Ticket != nil { + return json.Marshal(c.Ticket) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", c) +} + +type CommentRequestTicketVisitor interface { + VisitString(string) error + VisitTicket(*Ticket) error +} + +func (c *CommentRequestTicket) Accept(visitor CommentRequestTicketVisitor) error { + if c.typ == "String" || c.String != "" { + return visitor.VisitString(c.String) + } + if c.typ == "Ticket" || c.Ticket != nil { + return visitor.VisitTicket(c.Ticket) + } + return fmt.Errorf("type %T does not include a non-empty union type", c) +} + +// The author of the Comment, if the author is a User. If the third party does not support specifying an author, we will append "[Posted on behalf of {name}]" to the comment. +type CommentRequestUser struct { + String string + User *User + + typ string +} + +func (c *CommentRequestUser) GetString() string { + if c == nil { + return "" + } + return c.String +} + +func (c *CommentRequestUser) GetUser() *User { + if c == nil { + return nil + } + return c.User +} + +func (c *CommentRequestUser) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + c.typ = "String" + c.String = valueString + return nil + } + valueUser := new(User) + if err := json.Unmarshal(data, &valueUser); err == nil { + c.typ = "User" + c.User = valueUser + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, c) +} + +func (c CommentRequestUser) MarshalJSON() ([]byte, error) { + if c.typ == "String" || c.String != "" { + return json.Marshal(c.String) + } + if c.typ == "User" || c.User != nil { + return json.Marshal(c.User) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", c) +} + +type CommentRequestUserVisitor interface { + VisitString(string) error + VisitUser(*User) error +} + +func (c *CommentRequestUser) Accept(visitor CommentRequestUserVisitor) error { + if c.typ == "String" || c.String != "" { + return visitor.VisitString(c.String) + } + if c.typ == "User" || c.User != nil { + return visitor.VisitUser(c.User) + } + return fmt.Errorf("type %T does not include a non-empty union type", c) +} + +type CommentResponse struct { + Model *Comment `json:"model" url:"model"` + Warnings []*WarningValidationProblem `json:"warnings" url:"warnings"` + Errors []*ErrorValidationProblem `json:"errors" url:"errors"` + Logs []*DebugModeLog `json:"logs,omitempty" url:"logs,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (c *CommentResponse) GetModel() *Comment { + if c == nil { + return nil + } + return c.Model +} + +func (c *CommentResponse) GetWarnings() []*WarningValidationProblem { + if c == nil { + return nil + } + return c.Warnings +} + +func (c *CommentResponse) GetErrors() []*ErrorValidationProblem { + if c == nil { + return nil + } + return c.Errors +} + +func (c *CommentResponse) GetLogs() []*DebugModeLog { + if c == nil { + return nil + } + return c.Logs +} + +func (c *CommentResponse) GetExtraProperties() map[string]interface{} { + return c.extraProperties +} + +func (c *CommentResponse) UnmarshalJSON(data []byte) error { + type unmarshaler CommentResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *c = CommentResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *c) + if err != nil { + return err + } + c.extraProperties = extraProperties + c.rawJSON = json.RawMessage(data) + return nil +} + +func (c *CommentResponse) String() string { + if len(c.rawJSON) > 0 { + if value, err := internal.StringifyJSON(c.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(c); err == nil { + return value + } + return fmt.Sprintf("%#v", c) +} + +// The ticket associated with the comment. +type CommentTicket struct { + String string + Ticket *Ticket + + typ string +} + +func (c *CommentTicket) GetString() string { + if c == nil { + return "" + } + return c.String +} + +func (c *CommentTicket) GetTicket() *Ticket { + if c == nil { + return nil + } + return c.Ticket +} + +func (c *CommentTicket) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + c.typ = "String" + c.String = valueString + return nil + } + valueTicket := new(Ticket) + if err := json.Unmarshal(data, &valueTicket); err == nil { + c.typ = "Ticket" + c.Ticket = valueTicket + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, c) +} + +func (c CommentTicket) MarshalJSON() ([]byte, error) { + if c.typ == "String" || c.String != "" { + return json.Marshal(c.String) + } + if c.typ == "Ticket" || c.Ticket != nil { + return json.Marshal(c.Ticket) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", c) +} + +type CommentTicketVisitor interface { + VisitString(string) error + VisitTicket(*Ticket) error +} + +func (c *CommentTicket) Accept(visitor CommentTicketVisitor) error { + if c.typ == "String" || c.String != "" { + return visitor.VisitString(c.String) + } + if c.typ == "Ticket" || c.Ticket != nil { + return visitor.VisitTicket(c.Ticket) + } + return fmt.Errorf("type %T does not include a non-empty union type", c) +} + +// The author of the Comment, if the author is a User. If the third party does not support specifying an author, we will append "[Posted on behalf of {name}]" to the comment. +type CommentUser struct { + String string + User *User + + typ string +} + +func (c *CommentUser) GetString() string { + if c == nil { + return "" + } + return c.String +} + +func (c *CommentUser) GetUser() *User { + if c == nil { + return nil + } + return c.User +} + +func (c *CommentUser) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + c.typ = "String" + c.String = valueString + return nil + } + valueUser := new(User) + if err := json.Unmarshal(data, &valueUser); err == nil { + c.typ = "User" + c.User = valueUser + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, c) +} + +func (c CommentUser) MarshalJSON() ([]byte, error) { + if c.typ == "String" || c.String != "" { + return json.Marshal(c.String) + } + if c.typ == "User" || c.User != nil { + return json.Marshal(c.User) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", c) +} + +type CommentUserVisitor interface { + VisitString(string) error + VisitUser(*User) error +} + +func (c *CommentUser) Accept(visitor CommentUserVisitor) error { + if c.typ == "String" || c.String != "" { + return visitor.VisitString(c.String) + } + if c.typ == "User" || c.User != nil { + return visitor.VisitUser(c.User) + } + return fmt.Errorf("type %T does not include a non-empty union type", c) +} + +type PaginatedCommentList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Comment `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedCommentList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedCommentList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedCommentList) GetResults() []*Comment { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedCommentList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedCommentList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedCommentList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedCommentList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedCommentList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} diff --git a/ticketing/comments/client.go b/ticketing/comments/client.go index c25120f..e39a288 100644 --- a/ticketing/comments/client.go +++ b/ticketing/comments/client.go @@ -1,130 +1,135 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package comments import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - ticketing "github.com/merge-api/merge-go-client/ticketing" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" + ticketing "github.com/merge-api/merge-go-client/v2/ticketing" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `Comment` objects. -func (c *Client) List(ctx context.Context, request *ticketing.CommentsListRequest) (*ticketing.PaginatedCommentList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ticketing/v1/comments" - - queryParams := make(url.Values) - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteCreatedAfter != nil { - queryParams.Add("remote_created_after", fmt.Sprintf("%v", request.RemoteCreatedAfter.Format(time.RFC3339))) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if request.TicketId != nil { - queryParams.Add("ticket_id", fmt.Sprintf("%v", *request.TicketId)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *ticketing.PaginatedCommentList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *ticketing.CommentsListRequest, + opts ...option.RequestOption, +) (*core.Page[*ticketing.Comment], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ticketing/v1/comments" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *ticketing.PaginatedCommentList) *internal.PageResponse[*string, *ticketing.Comment] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *ticketing.Comment]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Creates a `Comment` object with the given values. -func (c *Client) Create(ctx context.Context, request *ticketing.CommentEndpointRequest) (*ticketing.CommentResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ticketing/v1/comments" - - queryParams := make(url.Values) - if request.IsDebugMode != nil { - queryParams.Add("is_debug_mode", fmt.Sprintf("%v", *request.IsDebugMode)) - } - if request.RunAsync != nil { - queryParams.Add("run_async", fmt.Sprintf("%v", *request.RunAsync)) +func (c *Client) Create( + ctx context.Context, + request *ticketing.CommentEndpointRequest, + opts ...option.RequestOption, +) (*ticketing.CommentResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ticketing/v1/comments" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *ticketing.CommentResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -133,32 +138,46 @@ func (c *Client) Create(ctx context.Context, request *ticketing.CommentEndpointR } // Returns a `Comment` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *ticketing.CommentsRetrieveRequest) (*ticketing.Comment, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"ticketing/v1/comments/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *ticketing.CommentsRetrieveRequest, + opts ...option.RequestOption, +) (*ticketing.Comment, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/ticketing/v1/comments/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ticketing.Comment if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -167,21 +186,34 @@ func (c *Client) Retrieve(ctx context.Context, id string, request *ticketing.Com } // Returns metadata for `Comment` POSTs. -func (c *Client) MetaPostRetrieve(ctx context.Context) (*ticketing.MetaResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ticketing/v1/comments/meta/post" +func (c *Client) MetaPostRetrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*ticketing.MetaResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ticketing/v1/comments/meta/post" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ticketing.MetaResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/ticketing/contacts.go b/ticketing/contacts.go index 97faad1..7e7e27c 100644 --- a/ticketing/contacts.go +++ b/ticketing/contacts.go @@ -1,47 +1,352 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package ticketing import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type TicketingContactEndpointRequest struct { // Whether to include debug fields (such as log file links) in the response. - IsDebugMode *bool `json:"-"` + IsDebugMode *bool `json:"-" url:"is_debug_mode,omitempty"` // Whether or not third-party updates should be run asynchronously. - RunAsync *bool `json:"-"` - Model *ContactRequest `json:"model,omitempty"` + RunAsync *bool `json:"-" url:"run_async,omitempty"` + Model *ContactRequest `json:"model,omitempty" url:"-"` } type ContactsListRequest struct { // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *string `json:"-"` + Expand []*string `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` } type ContactsRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *string `json:"-"` + Expand []*string `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` +} + +// # The Contact Object +// ### Description +// The `Contact` object is used to represent the customer, lead, or external user that a ticket is associated with. +// +// ### Usage Example +// TODO +type ContactRequest struct { + // The contact's name. + Name *string `json:"name,omitempty" url:"name,omitempty"` + // The contact's email address. + EmailAddress *string `json:"email_address,omitempty" url:"email_address,omitempty"` + // The contact's phone number. + PhoneNumber *string `json:"phone_number,omitempty" url:"phone_number,omitempty"` + // The contact's details. + Details *string `json:"details,omitempty" url:"details,omitempty"` + // The contact's account. + Account *ContactRequestAccount `json:"account,omitempty" url:"account,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (c *ContactRequest) GetName() *string { + if c == nil { + return nil + } + return c.Name +} + +func (c *ContactRequest) GetEmailAddress() *string { + if c == nil { + return nil + } + return c.EmailAddress +} + +func (c *ContactRequest) GetPhoneNumber() *string { + if c == nil { + return nil + } + return c.PhoneNumber +} + +func (c *ContactRequest) GetDetails() *string { + if c == nil { + return nil + } + return c.Details +} + +func (c *ContactRequest) GetAccount() *ContactRequestAccount { + if c == nil { + return nil + } + return c.Account +} + +func (c *ContactRequest) GetIntegrationParams() map[string]interface{} { + if c == nil { + return nil + } + return c.IntegrationParams +} + +func (c *ContactRequest) GetLinkedAccountParams() map[string]interface{} { + if c == nil { + return nil + } + return c.LinkedAccountParams +} + +func (c *ContactRequest) GetExtraProperties() map[string]interface{} { + return c.extraProperties +} + +func (c *ContactRequest) UnmarshalJSON(data []byte) error { + type unmarshaler ContactRequest + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *c = ContactRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *c) + if err != nil { + return err + } + c.extraProperties = extraProperties + c.rawJSON = json.RawMessage(data) + return nil +} + +func (c *ContactRequest) String() string { + if len(c.rawJSON) > 0 { + if value, err := internal.StringifyJSON(c.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(c); err == nil { + return value + } + return fmt.Sprintf("%#v", c) +} + +// The contact's account. +type ContactRequestAccount struct { + String string + Account *Account + + typ string +} + +func (c *ContactRequestAccount) GetString() string { + if c == nil { + return "" + } + return c.String +} + +func (c *ContactRequestAccount) GetAccount() *Account { + if c == nil { + return nil + } + return c.Account +} + +func (c *ContactRequestAccount) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + c.typ = "String" + c.String = valueString + return nil + } + valueAccount := new(Account) + if err := json.Unmarshal(data, &valueAccount); err == nil { + c.typ = "Account" + c.Account = valueAccount + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, c) +} + +func (c ContactRequestAccount) MarshalJSON() ([]byte, error) { + if c.typ == "String" || c.String != "" { + return json.Marshal(c.String) + } + if c.typ == "Account" || c.Account != nil { + return json.Marshal(c.Account) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", c) +} + +type ContactRequestAccountVisitor interface { + VisitString(string) error + VisitAccount(*Account) error +} + +func (c *ContactRequestAccount) Accept(visitor ContactRequestAccountVisitor) error { + if c.typ == "String" || c.String != "" { + return visitor.VisitString(c.String) + } + if c.typ == "Account" || c.Account != nil { + return visitor.VisitAccount(c.Account) + } + return fmt.Errorf("type %T does not include a non-empty union type", c) +} + +type PaginatedContactList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Contact `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedContactList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedContactList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedContactList) GetResults() []*Contact { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedContactList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedContactList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedContactList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedContactList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedContactList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +type TicketingContactResponse struct { + Model *Contact `json:"model" url:"model"` + Warnings []*WarningValidationProblem `json:"warnings" url:"warnings"` + Errors []*ErrorValidationProblem `json:"errors" url:"errors"` + Logs []*DebugModeLog `json:"logs,omitempty" url:"logs,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (t *TicketingContactResponse) GetModel() *Contact { + if t == nil { + return nil + } + return t.Model +} + +func (t *TicketingContactResponse) GetWarnings() []*WarningValidationProblem { + if t == nil { + return nil + } + return t.Warnings +} + +func (t *TicketingContactResponse) GetErrors() []*ErrorValidationProblem { + if t == nil { + return nil + } + return t.Errors +} + +func (t *TicketingContactResponse) GetLogs() []*DebugModeLog { + if t == nil { + return nil + } + return t.Logs +} + +func (t *TicketingContactResponse) GetExtraProperties() map[string]interface{} { + return t.extraProperties +} + +func (t *TicketingContactResponse) UnmarshalJSON(data []byte) error { + type unmarshaler TicketingContactResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *t = TicketingContactResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *t) + if err != nil { + return err + } + t.extraProperties = extraProperties + t.rawJSON = json.RawMessage(data) + return nil +} + +func (t *TicketingContactResponse) String() string { + if len(t.rawJSON) > 0 { + if value, err := internal.StringifyJSON(t.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(t); err == nil { + return value + } + return fmt.Sprintf("%#v", t) } diff --git a/ticketing/contacts/client.go b/ticketing/contacts/client.go index 3645be4..ff5da87 100644 --- a/ticketing/contacts/client.go +++ b/ticketing/contacts/client.go @@ -1,124 +1,135 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package contacts import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - ticketing "github.com/merge-api/merge-go-client/ticketing" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" + ticketing "github.com/merge-api/merge-go-client/v2/ticketing" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `Contact` objects. -func (c *Client) List(ctx context.Context, request *ticketing.ContactsListRequest) (*ticketing.PaginatedContactList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ticketing/v1/contacts" - - queryParams := make(url.Values) - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *ticketing.PaginatedContactList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *ticketing.ContactsListRequest, + opts ...option.RequestOption, +) (*core.Page[*ticketing.Contact], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ticketing/v1/contacts" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *ticketing.PaginatedContactList) *internal.PageResponse[*string, *ticketing.Contact] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *ticketing.Contact]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Creates a `Contact` object with the given values. -func (c *Client) Create(ctx context.Context, request *ticketing.TicketingContactEndpointRequest) (*ticketing.TicketingContactResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ticketing/v1/contacts" - - queryParams := make(url.Values) - if request.IsDebugMode != nil { - queryParams.Add("is_debug_mode", fmt.Sprintf("%v", *request.IsDebugMode)) - } - if request.RunAsync != nil { - queryParams.Add("run_async", fmt.Sprintf("%v", *request.RunAsync)) +func (c *Client) Create( + ctx context.Context, + request *ticketing.TicketingContactEndpointRequest, + opts ...option.RequestOption, +) (*ticketing.TicketingContactResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ticketing/v1/contacts" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *ticketing.TicketingContactResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -127,32 +138,46 @@ func (c *Client) Create(ctx context.Context, request *ticketing.TicketingContact } // Returns a `Contact` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *ticketing.ContactsRetrieveRequest) (*ticketing.Contact, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"ticketing/v1/contacts/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *ticketing.ContactsRetrieveRequest, + opts ...option.RequestOption, +) (*ticketing.Contact, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/ticketing/v1/contacts/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ticketing.Contact if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -161,21 +186,34 @@ func (c *Client) Retrieve(ctx context.Context, id string, request *ticketing.Con } // Returns metadata for `TicketingContact` POSTs. -func (c *Client) MetaPostRetrieve(ctx context.Context) (*ticketing.MetaResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ticketing/v1/contacts/meta/post" +func (c *Client) MetaPostRetrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*ticketing.MetaResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ticketing/v1/contacts/meta/post" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ticketing.MetaResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/ticketing/deleteaccount/client.go b/ticketing/deleteaccount/client.go index e6d5351..c6e2d2c 100644 --- a/ticketing/deleteaccount/client.go +++ b/ticketing/deleteaccount/client.go @@ -1,45 +1,62 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package deleteaccount import ( context "context" - core "github.com/merge-api/merge-go-client/core" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Delete a linked account. -func (c *Client) Delete(ctx context.Context) error { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ticketing/v1/delete-account" +func (c *Client) Delete( + ctx context.Context, + opts ...option.RequestOption, +) error { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ticketing/v1/delete-account" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, }, ); err != nil { return err diff --git a/ticketing/field_mapping.go b/ticketing/field_mapping.go index 31fe90b..b0300a8 100644 --- a/ticketing/field_mapping.go +++ b/ticketing/field_mapping.go @@ -1,41 +1,1109 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package ticketing +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" +) + type CreateFieldMappingRequest struct { // If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. - ExcludeRemoteFieldMetadata *bool `json:"-"` + ExcludeRemoteFieldMetadata *bool `json:"-" url:"exclude_remote_field_metadata,omitempty"` // The name of the target field you want this remote field to map to. - TargetFieldName string `json:"target_field_name"` + TargetFieldName string `json:"target_field_name" url:"-"` // The description of the target field you want this remote field to map to. - TargetFieldDescription string `json:"target_field_description"` + TargetFieldDescription string `json:"target_field_description" url:"-"` // The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint. - RemoteFieldTraversalPath []interface{} `json:"remote_field_traversal_path,omitempty"` + RemoteFieldTraversalPath []interface{} `json:"remote_field_traversal_path,omitempty" url:"-"` // The method of the remote endpoint where the remote field is coming from. - RemoteMethod string `json:"remote_method"` + RemoteMethod string `json:"remote_method" url:"-"` // The path of the remote endpoint where the remote field is coming from. - RemoteUrlPath string `json:"remote_url_path"` + RemoteUrlPath string `json:"remote_url_path" url:"-"` // The name of the Common Model that the remote field corresponds to in a given category. - CommonModelName string `json:"common_model_name"` + CommonModelName string `json:"common_model_name" url:"-"` } type PatchedEditFieldMappingRequest struct { // The field traversal path of the remote field listed when you hit the GET /remote-fields endpoint. - RemoteFieldTraversalPath []interface{} `json:"remote_field_traversal_path,omitempty"` + RemoteFieldTraversalPath []interface{} `json:"remote_field_traversal_path,omitempty" url:"-"` // The method of the remote endpoint where the remote field is coming from. - RemoteMethod *string `json:"remote_method,omitempty"` + RemoteMethod *string `json:"remote_method,omitempty" url:"-"` // The path of the remote endpoint where the remote field is coming from. - RemoteUrlPath *string `json:"remote_url_path,omitempty"` + RemoteUrlPath *string `json:"remote_url_path,omitempty" url:"-"` } type FieldMappingsRetrieveRequest struct { // If `true`, remote fields metadata is excluded from each field mapping instance (i.e. `remote_fields.remote_key_name` and `remote_fields.schema` will be null). This will increase the speed of the request since these fields require some calculations. - ExcludeRemoteFieldMetadata *bool `json:"-"` + ExcludeRemoteFieldMetadata *bool `json:"-" url:"exclude_remote_field_metadata,omitempty"` } type RemoteFieldsRetrieveRequest struct { // A comma seperated list of Common Model names. If included, will only return Remote Fields for those Common Models. - CommonModels *string `json:"-"` + CommonModels *string `json:"-" url:"common_models,omitempty"` // If true, will include example values, where available, for remote fields in the 3rd party platform. These examples come from active data from your customers. - IncludeExampleValues *string `json:"-"` + IncludeExampleValues *string `json:"-" url:"include_example_values,omitempty"` +} + +type AdvancedMetadata struct { + Id string `json:"id" url:"id"` + DisplayName *string `json:"display_name,omitempty" url:"display_name,omitempty"` + Description *string `json:"description,omitempty" url:"description,omitempty"` + IsRequired *bool `json:"is_required,omitempty" url:"is_required,omitempty"` + IsCustom *bool `json:"is_custom,omitempty" url:"is_custom,omitempty"` + FieldChoices []interface{} `json:"field_choices,omitempty" url:"field_choices,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AdvancedMetadata) GetId() string { + if a == nil { + return "" + } + return a.Id +} + +func (a *AdvancedMetadata) GetDisplayName() *string { + if a == nil { + return nil + } + return a.DisplayName +} + +func (a *AdvancedMetadata) GetDescription() *string { + if a == nil { + return nil + } + return a.Description +} + +func (a *AdvancedMetadata) GetIsRequired() *bool { + if a == nil { + return nil + } + return a.IsRequired +} + +func (a *AdvancedMetadata) GetIsCustom() *bool { + if a == nil { + return nil + } + return a.IsCustom +} + +func (a *AdvancedMetadata) GetFieldChoices() []interface{} { + if a == nil { + return nil + } + return a.FieldChoices +} + +func (a *AdvancedMetadata) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AdvancedMetadata) UnmarshalJSON(data []byte) error { + type unmarshaler AdvancedMetadata + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *a = AdvancedMetadata(value) + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AdvancedMetadata) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} + +type ExternalTargetFieldApi struct { + Name *string `json:"name,omitempty" url:"name,omitempty"` + Description *string `json:"description,omitempty" url:"description,omitempty"` + IsMapped *string `json:"is_mapped,omitempty" url:"is_mapped,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (e *ExternalTargetFieldApi) GetName() *string { + if e == nil { + return nil + } + return e.Name +} + +func (e *ExternalTargetFieldApi) GetDescription() *string { + if e == nil { + return nil + } + return e.Description +} + +func (e *ExternalTargetFieldApi) GetIsMapped() *string { + if e == nil { + return nil + } + return e.IsMapped +} + +func (e *ExternalTargetFieldApi) GetExtraProperties() map[string]interface{} { + return e.extraProperties +} + +func (e *ExternalTargetFieldApi) UnmarshalJSON(data []byte) error { + type unmarshaler ExternalTargetFieldApi + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *e = ExternalTargetFieldApi(value) + extraProperties, err := internal.ExtractExtraProperties(data, *e) + if err != nil { + return err + } + e.extraProperties = extraProperties + e.rawJSON = json.RawMessage(data) + return nil +} + +func (e *ExternalTargetFieldApi) String() string { + if len(e.rawJSON) > 0 { + if value, err := internal.StringifyJSON(e.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(e); err == nil { + return value + } + return fmt.Sprintf("%#v", e) +} + +type ExternalTargetFieldApiResponse struct { + Ticket []*ExternalTargetFieldApi `json:"Ticket,omitempty" url:"Ticket,omitempty"` + Comment []*ExternalTargetFieldApi `json:"Comment,omitempty" url:"Comment,omitempty"` + Project []*ExternalTargetFieldApi `json:"Project,omitempty" url:"Project,omitempty"` + Collection []*ExternalTargetFieldApi `json:"Collection,omitempty" url:"Collection,omitempty"` + User []*ExternalTargetFieldApi `json:"User,omitempty" url:"User,omitempty"` + Role []*ExternalTargetFieldApi `json:"Role,omitempty" url:"Role,omitempty"` + Account []*ExternalTargetFieldApi `json:"Account,omitempty" url:"Account,omitempty"` + Team []*ExternalTargetFieldApi `json:"Team,omitempty" url:"Team,omitempty"` + Attachment []*ExternalTargetFieldApi `json:"Attachment,omitempty" url:"Attachment,omitempty"` + Tag []*ExternalTargetFieldApi `json:"Tag,omitempty" url:"Tag,omitempty"` + Contact []*ExternalTargetFieldApi `json:"Contact,omitempty" url:"Contact,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (e *ExternalTargetFieldApiResponse) GetTicket() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.Ticket +} + +func (e *ExternalTargetFieldApiResponse) GetComment() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.Comment +} + +func (e *ExternalTargetFieldApiResponse) GetProject() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.Project +} + +func (e *ExternalTargetFieldApiResponse) GetCollection() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.Collection +} + +func (e *ExternalTargetFieldApiResponse) GetUser() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.User +} + +func (e *ExternalTargetFieldApiResponse) GetRole() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.Role +} + +func (e *ExternalTargetFieldApiResponse) GetAccount() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.Account +} + +func (e *ExternalTargetFieldApiResponse) GetTeam() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.Team +} + +func (e *ExternalTargetFieldApiResponse) GetAttachment() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.Attachment +} + +func (e *ExternalTargetFieldApiResponse) GetTag() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.Tag +} + +func (e *ExternalTargetFieldApiResponse) GetContact() []*ExternalTargetFieldApi { + if e == nil { + return nil + } + return e.Contact +} + +func (e *ExternalTargetFieldApiResponse) GetExtraProperties() map[string]interface{} { + return e.extraProperties +} + +func (e *ExternalTargetFieldApiResponse) UnmarshalJSON(data []byte) error { + type unmarshaler ExternalTargetFieldApiResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *e = ExternalTargetFieldApiResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *e) + if err != nil { + return err + } + e.extraProperties = extraProperties + e.rawJSON = json.RawMessage(data) + return nil +} + +func (e *ExternalTargetFieldApiResponse) String() string { + if len(e.rawJSON) > 0 { + if value, err := internal.StringifyJSON(e.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(e); err == nil { + return value + } + return fmt.Sprintf("%#v", e) +} + +type FieldMappingApiInstance struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + IsIntegrationWide *bool `json:"is_integration_wide,omitempty" url:"is_integration_wide,omitempty"` + TargetField *FieldMappingApiInstanceTargetField `json:"target_field,omitempty" url:"target_field,omitempty"` + RemoteField *FieldMappingApiInstanceRemoteField `json:"remote_field,omitempty" url:"remote_field,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (f *FieldMappingApiInstance) GetId() *string { + if f == nil { + return nil + } + return f.Id +} + +func (f *FieldMappingApiInstance) GetIsIntegrationWide() *bool { + if f == nil { + return nil + } + return f.IsIntegrationWide +} + +func (f *FieldMappingApiInstance) GetTargetField() *FieldMappingApiInstanceTargetField { + if f == nil { + return nil + } + return f.TargetField +} + +func (f *FieldMappingApiInstance) GetRemoteField() *FieldMappingApiInstanceRemoteField { + if f == nil { + return nil + } + return f.RemoteField +} + +func (f *FieldMappingApiInstance) GetExtraProperties() map[string]interface{} { + return f.extraProperties +} + +func (f *FieldMappingApiInstance) UnmarshalJSON(data []byte) error { + type unmarshaler FieldMappingApiInstance + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *f = FieldMappingApiInstance(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { + return err + } + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) + return nil +} + +func (f *FieldMappingApiInstance) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(f); err == nil { + return value + } + return fmt.Sprintf("%#v", f) +} + +type FieldMappingApiInstanceRemoteField struct { + RemoteKeyName *string `json:"remote_key_name,omitempty" url:"remote_key_name,omitempty"` + Schema map[string]interface{} `json:"schema,omitempty" url:"schema,omitempty"` + RemoteEndpointInfo *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo `json:"remote_endpoint_info" url:"remote_endpoint_info"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (f *FieldMappingApiInstanceRemoteField) GetRemoteKeyName() *string { + if f == nil { + return nil + } + return f.RemoteKeyName +} + +func (f *FieldMappingApiInstanceRemoteField) GetSchema() map[string]interface{} { + if f == nil { + return nil + } + return f.Schema +} + +func (f *FieldMappingApiInstanceRemoteField) GetRemoteEndpointInfo() *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo { + if f == nil { + return nil + } + return f.RemoteEndpointInfo +} + +func (f *FieldMappingApiInstanceRemoteField) GetExtraProperties() map[string]interface{} { + return f.extraProperties +} + +func (f *FieldMappingApiInstanceRemoteField) UnmarshalJSON(data []byte) error { + type unmarshaler FieldMappingApiInstanceRemoteField + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *f = FieldMappingApiInstanceRemoteField(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { + return err + } + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) + return nil +} + +func (f *FieldMappingApiInstanceRemoteField) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(f); err == nil { + return value + } + return fmt.Sprintf("%#v", f) +} + +type FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo struct { + Method *string `json:"method,omitempty" url:"method,omitempty"` + UrlPath *string `json:"url_path,omitempty" url:"url_path,omitempty"` + FieldTraversalPath []string `json:"field_traversal_path,omitempty" url:"field_traversal_path,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (f *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo) GetMethod() *string { + if f == nil { + return nil + } + return f.Method +} + +func (f *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo) GetUrlPath() *string { + if f == nil { + return nil + } + return f.UrlPath +} + +func (f *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo) GetFieldTraversalPath() []string { + if f == nil { + return nil + } + return f.FieldTraversalPath +} + +func (f *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo) GetExtraProperties() map[string]interface{} { + return f.extraProperties +} + +func (f *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo) UnmarshalJSON(data []byte) error { + type unmarshaler FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *f = FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { + return err + } + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) + return nil +} + +func (f *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(f); err == nil { + return value + } + return fmt.Sprintf("%#v", f) +} + +type FieldMappingApiInstanceResponse struct { + Ticket []*FieldMappingApiInstance `json:"Ticket,omitempty" url:"Ticket,omitempty"` + Comment []*FieldMappingApiInstance `json:"Comment,omitempty" url:"Comment,omitempty"` + Project []*FieldMappingApiInstance `json:"Project,omitempty" url:"Project,omitempty"` + Collection []*FieldMappingApiInstance `json:"Collection,omitempty" url:"Collection,omitempty"` + User []*FieldMappingApiInstance `json:"User,omitempty" url:"User,omitempty"` + Role []*FieldMappingApiInstance `json:"Role,omitempty" url:"Role,omitempty"` + Account []*FieldMappingApiInstance `json:"Account,omitempty" url:"Account,omitempty"` + Team []*FieldMappingApiInstance `json:"Team,omitempty" url:"Team,omitempty"` + Attachment []*FieldMappingApiInstance `json:"Attachment,omitempty" url:"Attachment,omitempty"` + Tag []*FieldMappingApiInstance `json:"Tag,omitempty" url:"Tag,omitempty"` + Contact []*FieldMappingApiInstance `json:"Contact,omitempty" url:"Contact,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (f *FieldMappingApiInstanceResponse) GetTicket() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Ticket +} + +func (f *FieldMappingApiInstanceResponse) GetComment() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Comment +} + +func (f *FieldMappingApiInstanceResponse) GetProject() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Project +} + +func (f *FieldMappingApiInstanceResponse) GetCollection() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Collection +} + +func (f *FieldMappingApiInstanceResponse) GetUser() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.User +} + +func (f *FieldMappingApiInstanceResponse) GetRole() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Role +} + +func (f *FieldMappingApiInstanceResponse) GetAccount() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Account +} + +func (f *FieldMappingApiInstanceResponse) GetTeam() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Team +} + +func (f *FieldMappingApiInstanceResponse) GetAttachment() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Attachment +} + +func (f *FieldMappingApiInstanceResponse) GetTag() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Tag +} + +func (f *FieldMappingApiInstanceResponse) GetContact() []*FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Contact +} + +func (f *FieldMappingApiInstanceResponse) GetExtraProperties() map[string]interface{} { + return f.extraProperties +} + +func (f *FieldMappingApiInstanceResponse) UnmarshalJSON(data []byte) error { + type unmarshaler FieldMappingApiInstanceResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *f = FieldMappingApiInstanceResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { + return err + } + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) + return nil +} + +func (f *FieldMappingApiInstanceResponse) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(f); err == nil { + return value + } + return fmt.Sprintf("%#v", f) +} + +type FieldMappingApiInstanceTargetField struct { + Name string `json:"name" url:"name"` + Description string `json:"description" url:"description"` + IsOrganizationWide bool `json:"is_organization_wide" url:"is_organization_wide"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (f *FieldMappingApiInstanceTargetField) GetName() string { + if f == nil { + return "" + } + return f.Name +} + +func (f *FieldMappingApiInstanceTargetField) GetDescription() string { + if f == nil { + return "" + } + return f.Description +} + +func (f *FieldMappingApiInstanceTargetField) GetIsOrganizationWide() bool { + if f == nil { + return false + } + return f.IsOrganizationWide +} + +func (f *FieldMappingApiInstanceTargetField) GetExtraProperties() map[string]interface{} { + return f.extraProperties +} + +func (f *FieldMappingApiInstanceTargetField) UnmarshalJSON(data []byte) error { + type unmarshaler FieldMappingApiInstanceTargetField + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *f = FieldMappingApiInstanceTargetField(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { + return err + } + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) + return nil +} + +func (f *FieldMappingApiInstanceTargetField) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(f); err == nil { + return value + } + return fmt.Sprintf("%#v", f) +} + +type FieldMappingInstanceResponse struct { + Model *FieldMappingApiInstance `json:"model" url:"model"` + Warnings []*WarningValidationProblem `json:"warnings" url:"warnings"` + Errors []*ErrorValidationProblem `json:"errors" url:"errors"` + Logs []*DebugModeLog `json:"logs,omitempty" url:"logs,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (f *FieldMappingInstanceResponse) GetModel() *FieldMappingApiInstance { + if f == nil { + return nil + } + return f.Model +} + +func (f *FieldMappingInstanceResponse) GetWarnings() []*WarningValidationProblem { + if f == nil { + return nil + } + return f.Warnings +} + +func (f *FieldMappingInstanceResponse) GetErrors() []*ErrorValidationProblem { + if f == nil { + return nil + } + return f.Errors +} + +func (f *FieldMappingInstanceResponse) GetLogs() []*DebugModeLog { + if f == nil { + return nil + } + return f.Logs +} + +func (f *FieldMappingInstanceResponse) GetExtraProperties() map[string]interface{} { + return f.extraProperties +} + +func (f *FieldMappingInstanceResponse) UnmarshalJSON(data []byte) error { + type unmarshaler FieldMappingInstanceResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *f = FieldMappingInstanceResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { + return err + } + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) + return nil +} + +func (f *FieldMappingInstanceResponse) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(f); err == nil { + return value + } + return fmt.Sprintf("%#v", f) +} + +type RemoteEndpointInfo struct { + Method string `json:"method" url:"method"` + UrlPath string `json:"url_path" url:"url_path"` + FieldTraversalPath []interface{} `json:"field_traversal_path" url:"field_traversal_path"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (r *RemoteEndpointInfo) GetMethod() string { + if r == nil { + return "" + } + return r.Method +} + +func (r *RemoteEndpointInfo) GetUrlPath() string { + if r == nil { + return "" + } + return r.UrlPath +} + +func (r *RemoteEndpointInfo) GetFieldTraversalPath() []interface{} { + if r == nil { + return nil + } + return r.FieldTraversalPath +} + +func (r *RemoteEndpointInfo) GetExtraProperties() map[string]interface{} { + return r.extraProperties +} + +func (r *RemoteEndpointInfo) UnmarshalJSON(data []byte) error { + type unmarshaler RemoteEndpointInfo + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *r = RemoteEndpointInfo(value) + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { + return err + } + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) + return nil +} + +func (r *RemoteEndpointInfo) String() string { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(r); err == nil { + return value + } + return fmt.Sprintf("%#v", r) +} + +type RemoteFieldApi struct { + Schema map[string]interface{} `json:"schema" url:"schema"` + RemoteKeyName string `json:"remote_key_name" url:"remote_key_name"` + RemoteEndpointInfo *RemoteEndpointInfo `json:"remote_endpoint_info" url:"remote_endpoint_info"` + ExampleValues []interface{} `json:"example_values,omitempty" url:"example_values,omitempty"` + AdvancedMetadata *AdvancedMetadata `json:"advanced_metadata,omitempty" url:"advanced_metadata,omitempty"` + Coverage *RemoteFieldApiCoverage `json:"coverage,omitempty" url:"coverage,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (r *RemoteFieldApi) GetSchema() map[string]interface{} { + if r == nil { + return nil + } + return r.Schema +} + +func (r *RemoteFieldApi) GetRemoteKeyName() string { + if r == nil { + return "" + } + return r.RemoteKeyName +} + +func (r *RemoteFieldApi) GetRemoteEndpointInfo() *RemoteEndpointInfo { + if r == nil { + return nil + } + return r.RemoteEndpointInfo +} + +func (r *RemoteFieldApi) GetExampleValues() []interface{} { + if r == nil { + return nil + } + return r.ExampleValues +} + +func (r *RemoteFieldApi) GetAdvancedMetadata() *AdvancedMetadata { + if r == nil { + return nil + } + return r.AdvancedMetadata +} + +func (r *RemoteFieldApi) GetCoverage() *RemoteFieldApiCoverage { + if r == nil { + return nil + } + return r.Coverage +} + +func (r *RemoteFieldApi) GetExtraProperties() map[string]interface{} { + return r.extraProperties +} + +func (r *RemoteFieldApi) UnmarshalJSON(data []byte) error { + type unmarshaler RemoteFieldApi + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *r = RemoteFieldApi(value) + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { + return err + } + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) + return nil +} + +func (r *RemoteFieldApi) String() string { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(r); err == nil { + return value + } + return fmt.Sprintf("%#v", r) +} + +type RemoteFieldApiCoverage struct { + Integer int + Double float64 + + typ string +} + +func (r *RemoteFieldApiCoverage) GetInteger() int { + if r == nil { + return 0 + } + return r.Integer +} + +func (r *RemoteFieldApiCoverage) GetDouble() float64 { + if r == nil { + return 0 + } + return r.Double +} + +func (r *RemoteFieldApiCoverage) UnmarshalJSON(data []byte) error { + var valueInteger int + if err := json.Unmarshal(data, &valueInteger); err == nil { + r.typ = "Integer" + r.Integer = valueInteger + return nil + } + var valueDouble float64 + if err := json.Unmarshal(data, &valueDouble); err == nil { + r.typ = "Double" + r.Double = valueDouble + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, r) +} + +func (r RemoteFieldApiCoverage) MarshalJSON() ([]byte, error) { + if r.typ == "Integer" || r.Integer != 0 { + return json.Marshal(r.Integer) + } + if r.typ == "Double" || r.Double != 0 { + return json.Marshal(r.Double) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", r) +} + +type RemoteFieldApiCoverageVisitor interface { + VisitInteger(int) error + VisitDouble(float64) error +} + +func (r *RemoteFieldApiCoverage) Accept(visitor RemoteFieldApiCoverageVisitor) error { + if r.typ == "Integer" || r.Integer != 0 { + return visitor.VisitInteger(r.Integer) + } + if r.typ == "Double" || r.Double != 0 { + return visitor.VisitDouble(r.Double) + } + return fmt.Errorf("type %T does not include a non-empty union type", r) +} + +type RemoteFieldApiResponse struct { + Ticket []*RemoteFieldApi `json:"Ticket,omitempty" url:"Ticket,omitempty"` + Comment []*RemoteFieldApi `json:"Comment,omitempty" url:"Comment,omitempty"` + Project []*RemoteFieldApi `json:"Project,omitempty" url:"Project,omitempty"` + Collection []*RemoteFieldApi `json:"Collection,omitempty" url:"Collection,omitempty"` + User []*RemoteFieldApi `json:"User,omitempty" url:"User,omitempty"` + Role []*RemoteFieldApi `json:"Role,omitempty" url:"Role,omitempty"` + Account []*RemoteFieldApi `json:"Account,omitempty" url:"Account,omitempty"` + Team []*RemoteFieldApi `json:"Team,omitempty" url:"Team,omitempty"` + Attachment []*RemoteFieldApi `json:"Attachment,omitempty" url:"Attachment,omitempty"` + Tag []*RemoteFieldApi `json:"Tag,omitempty" url:"Tag,omitempty"` + Contact []*RemoteFieldApi `json:"Contact,omitempty" url:"Contact,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (r *RemoteFieldApiResponse) GetTicket() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.Ticket +} + +func (r *RemoteFieldApiResponse) GetComment() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.Comment +} + +func (r *RemoteFieldApiResponse) GetProject() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.Project +} + +func (r *RemoteFieldApiResponse) GetCollection() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.Collection +} + +func (r *RemoteFieldApiResponse) GetUser() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.User +} + +func (r *RemoteFieldApiResponse) GetRole() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.Role +} + +func (r *RemoteFieldApiResponse) GetAccount() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.Account +} + +func (r *RemoteFieldApiResponse) GetTeam() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.Team +} + +func (r *RemoteFieldApiResponse) GetAttachment() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.Attachment +} + +func (r *RemoteFieldApiResponse) GetTag() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.Tag +} + +func (r *RemoteFieldApiResponse) GetContact() []*RemoteFieldApi { + if r == nil { + return nil + } + return r.Contact +} + +func (r *RemoteFieldApiResponse) GetExtraProperties() map[string]interface{} { + return r.extraProperties +} + +func (r *RemoteFieldApiResponse) UnmarshalJSON(data []byte) error { + type unmarshaler RemoteFieldApiResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *r = RemoteFieldApiResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { + return err + } + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) + return nil +} + +func (r *RemoteFieldApiResponse) String() string { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(r); err == nil { + return value + } + return fmt.Sprintf("%#v", r) } diff --git a/ticketing/fieldmapping/client.go b/ticketing/fieldmapping/client.go index 5c7ce71..53a82fb 100644 --- a/ticketing/fieldmapping/client.go +++ b/ticketing/fieldmapping/client.go @@ -1,58 +1,73 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package fieldmapping import ( context "context" - fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - ticketing "github.com/merge-api/merge-go-client/ticketing" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" + ticketing "github.com/merge-api/merge-go-client/v2/ticketing" http "net/http" - url "net/url" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Get all Field Mappings for this Linked Account. Field Mappings are mappings between third-party Remote Fields and user defined Merge fields. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). -func (c *Client) FieldMappingsRetrieve(ctx context.Context, request *ticketing.FieldMappingsRetrieveRequest) (*ticketing.FieldMappingApiInstanceResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ticketing/v1/field-mappings" - - queryParams := make(url.Values) - if request.ExcludeRemoteFieldMetadata != nil { - queryParams.Add("exclude_remote_field_metadata", fmt.Sprintf("%v", *request.ExcludeRemoteFieldMetadata)) +func (c *Client) FieldMappingsRetrieve( + ctx context.Context, + request *ticketing.FieldMappingsRetrieveRequest, + opts ...option.RequestOption, +) (*ticketing.FieldMappingApiInstanceResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ticketing/v1/field-mappings" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ticketing.FieldMappingApiInstanceResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -61,30 +76,44 @@ func (c *Client) FieldMappingsRetrieve(ctx context.Context, request *ticketing.F } // Create new Field Mappings that will be available after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. -func (c *Client) FieldMappingsCreate(ctx context.Context, request *ticketing.CreateFieldMappingRequest) (*ticketing.FieldMappingInstanceResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ticketing/v1/field-mappings" - - queryParams := make(url.Values) - if request.ExcludeRemoteFieldMetadata != nil { - queryParams.Add("exclude_remote_field_metadata", fmt.Sprintf("%v", *request.ExcludeRemoteFieldMetadata)) +func (c *Client) FieldMappingsCreate( + ctx context.Context, + request *ticketing.CreateFieldMappingRequest, + opts ...option.RequestOption, +) (*ticketing.FieldMappingInstanceResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ticketing/v1/field-mappings" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *ticketing.FieldMappingInstanceResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -93,21 +122,38 @@ func (c *Client) FieldMappingsCreate(ctx context.Context, request *ticketing.Cre } // Deletes Field Mappings for a Linked Account. All data related to this Field Mapping will be deleted and these changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. -func (c *Client) FieldMappingsDestroy(ctx context.Context, fieldMappingId string) (*ticketing.FieldMappingInstanceResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"ticketing/v1/field-mappings/%v", fieldMappingId) +func (c *Client) FieldMappingsDestroy( + ctx context.Context, + fieldMappingId string, + opts ...option.RequestOption, +) (*ticketing.FieldMappingInstanceResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/ticketing/v1/field-mappings/%v", + fieldMappingId, + ) + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ticketing.FieldMappingInstanceResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodDelete, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodDelete, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -116,22 +162,41 @@ func (c *Client) FieldMappingsDestroy(ctx context.Context, fieldMappingId string } // Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync **ALL** data from start. -func (c *Client) FieldMappingsPartialUpdate(ctx context.Context, fieldMappingId string, request *ticketing.PatchedEditFieldMappingRequest) (*ticketing.FieldMappingInstanceResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"ticketing/v1/field-mappings/%v", fieldMappingId) +func (c *Client) FieldMappingsPartialUpdate( + ctx context.Context, + fieldMappingId string, + request *ticketing.PatchedEditFieldMappingRequest, + opts ...option.RequestOption, +) (*ticketing.FieldMappingInstanceResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/ticketing/v1/field-mappings/%v", + fieldMappingId, + ) + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *ticketing.FieldMappingInstanceResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPatch, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPatch, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -140,32 +205,42 @@ func (c *Client) FieldMappingsPartialUpdate(ctx context.Context, fieldMappingId } // Get all remote fields for a Linked Account. Remote fields are third-party fields that are accessible after initial sync if remote_data is enabled. You can use remote fields to override existing Merge fields or map a new Merge field. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/overview/). -func (c *Client) RemoteFieldsRetrieve(ctx context.Context, request *ticketing.RemoteFieldsRetrieveRequest) (*ticketing.RemoteFieldApiResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ticketing/v1/remote-fields" - - queryParams := make(url.Values) - if request.CommonModels != nil { - queryParams.Add("common_models", fmt.Sprintf("%v", *request.CommonModels)) - } - if request.IncludeExampleValues != nil { - queryParams.Add("include_example_values", fmt.Sprintf("%v", *request.IncludeExampleValues)) +func (c *Client) RemoteFieldsRetrieve( + ctx context.Context, + request *ticketing.RemoteFieldsRetrieveRequest, + opts ...option.RequestOption, +) (*ticketing.RemoteFieldApiResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ticketing/v1/remote-fields" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ticketing.RemoteFieldApiResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -174,21 +249,34 @@ func (c *Client) RemoteFieldsRetrieve(ctx context.Context, request *ticketing.Re } // Get all organization-wide Target Fields, this will not include any Linked Account specific Target Fields. Organization-wide Target Fields are additional fields appended to the Merge Common Model for all Linked Accounts in a category. [Learn more](https://docs.merge.dev/supplemental-data/field-mappings/target-fields/). -func (c *Client) TargetFieldsRetrieve(ctx context.Context) (*ticketing.ExternalTargetFieldApiResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ticketing/v1/target-fields" +func (c *Client) TargetFieldsRetrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*ticketing.ExternalTargetFieldApiResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ticketing/v1/target-fields" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ticketing.ExternalTargetFieldApiResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/ticketing/forceresync/client.go b/ticketing/forceresync/client.go index a945173..14d4654 100644 --- a/ticketing/forceresync/client.go +++ b/ticketing/forceresync/client.go @@ -1,48 +1,65 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package forceresync import ( context "context" - core "github.com/merge-api/merge-go-client/core" - ticketing "github.com/merge-api/merge-go-client/ticketing" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" + ticketing "github.com/merge-api/merge-go-client/v2/ticketing" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } -// Force re-sync of all models. This is available for all organizations via the dashboard. Force re-sync is also available programmatically via API for monthly, quarterly, and highest sync frequency customers on the Professional or Enterprise plans. Doing so will consume a sync credit for the relevant linked account. -func (c *Client) SyncStatusResyncCreate(ctx context.Context) ([]*ticketing.SyncStatus, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ticketing/v1/sync-status/resync" +// Force re-sync of all models. This endpoint is available for monthly, quarterly, and highest sync frequency customers on the Professional or Enterprise plans. Doing so will consume a sync credit for the relevant linked account. Force re-syncs can also be triggered manually in the Merge Dashboard and is available for all customers. +func (c *Client) SyncStatusResyncCreate( + ctx context.Context, + opts ...option.RequestOption, +) ([]*ticketing.SyncStatus, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ticketing/v1/sync-status/resync" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response []*ticketing.SyncStatus if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/ticketing/generate_key.go b/ticketing/generate_key.go index 575c8fa..93d4082 100644 --- a/ticketing/generate_key.go +++ b/ticketing/generate_key.go @@ -1,8 +1,8 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package ticketing type GenerateRemoteKeyRequest struct { // The name of the remote key - Name string `json:"name"` + Name string `json:"name" url:"-"` } diff --git a/ticketing/generatekey/client.go b/ticketing/generatekey/client.go index a8ad698..9779bf0 100644 --- a/ticketing/generatekey/client.go +++ b/ticketing/generatekey/client.go @@ -1,49 +1,68 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package generatekey import ( context "context" - core "github.com/merge-api/merge-go-client/core" - ticketing "github.com/merge-api/merge-go-client/ticketing" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" + ticketing "github.com/merge-api/merge-go-client/v2/ticketing" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Create a remote key. -func (c *Client) Create(ctx context.Context, request *ticketing.GenerateRemoteKeyRequest) (*ticketing.RemoteKey, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ticketing/v1/generate-key" +func (c *Client) Create( + ctx context.Context, + request *ticketing.GenerateRemoteKeyRequest, + opts ...option.RequestOption, +) (*ticketing.RemoteKey, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ticketing/v1/generate-key" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *ticketing.RemoteKey if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err diff --git a/ticketing/issues.go b/ticketing/issues.go index 812e918..db7970d 100644 --- a/ticketing/issues.go +++ b/ticketing/issues.go @@ -1,41 +1,43 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package ticketing import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type IssuesListRequest struct { - AccountToken *string `json:"-"` + AccountToken *string `json:"-" url:"account_token,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // If included, will only include issues whose most recent action occurred before this time - EndDate *string `json:"-"` - EndUserOrganizationName *string `json:"-"` + EndDate *string `json:"-" url:"end_date,omitempty"` + EndUserOrganizationName *string `json:"-" url:"end_user_organization_name,omitempty"` // If provided, will only return issues whose first incident time was after this datetime. - FirstIncidentTimeAfter *time.Time `json:"-"` + FirstIncidentTimeAfter *time.Time `json:"-" url:"first_incident_time_after,omitempty"` // If provided, will only return issues whose first incident time was before this datetime. - FirstIncidentTimeBefore *time.Time `json:"-"` + FirstIncidentTimeBefore *time.Time `json:"-" url:"first_incident_time_before,omitempty"` // If true, will include muted issues - IncludeMuted *string `json:"-"` - IntegrationName *string `json:"-"` + IncludeMuted *string `json:"-" url:"include_muted,omitempty"` + IntegrationName *string `json:"-" url:"integration_name,omitempty"` // If provided, will only return issues whose last incident time was after this datetime. - LastIncidentTimeAfter *time.Time `json:"-"` + LastIncidentTimeAfter *time.Time `json:"-" url:"last_incident_time_after,omitempty"` // If provided, will only return issues whose last incident time was before this datetime. - LastIncidentTimeBefore *time.Time `json:"-"` + LastIncidentTimeBefore *time.Time `json:"-" url:"last_incident_time_before,omitempty"` // If provided, will only include issues pertaining to the linked account passed in. - LinkedAccountId *string `json:"-"` + LinkedAccountId *string `json:"-" url:"linked_account_id,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // If included, will only include issues whose most recent action occurred after this time - StartDate *string `json:"-"` + StartDate *string `json:"-" url:"start_date,omitempty"` // Status of the issue. Options: ('ONGOING', 'RESOLVED') // - // - `ONGOING` - ONGOING - // - `RESOLVED` - RESOLVED - Status *IssuesListRequestStatus `json:"-"` + // * `ONGOING` - ONGOING + // * `RESOLVED` - RESOLVED + Status *IssuesListRequestStatus `json:"-" url:"status,omitempty"` } type IssuesListRequestStatus string @@ -59,3 +61,283 @@ func NewIssuesListRequestStatusFromString(s string) (IssuesListRequestStatus, er func (i IssuesListRequestStatus) Ptr() *IssuesListRequestStatus { return &i } + +type Issue struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // Status of the issue. Options: ('ONGOING', 'RESOLVED') + // + // * `ONGOING` - ONGOING + // * `RESOLVED` - RESOLVED + Status *IssueStatus `json:"status,omitempty" url:"status,omitempty"` + ErrorDescription string `json:"error_description" url:"error_description"` + EndUser map[string]interface{} `json:"end_user,omitempty" url:"end_user,omitempty"` + FirstIncidentTime *time.Time `json:"first_incident_time,omitempty" url:"first_incident_time,omitempty"` + LastIncidentTime *time.Time `json:"last_incident_time,omitempty" url:"last_incident_time,omitempty"` + IsMuted *bool `json:"is_muted,omitempty" url:"is_muted,omitempty"` + ErrorDetails []string `json:"error_details,omitempty" url:"error_details,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (i *Issue) GetId() *string { + if i == nil { + return nil + } + return i.Id +} + +func (i *Issue) GetStatus() *IssueStatus { + if i == nil { + return nil + } + return i.Status +} + +func (i *Issue) GetErrorDescription() string { + if i == nil { + return "" + } + return i.ErrorDescription +} + +func (i *Issue) GetEndUser() map[string]interface{} { + if i == nil { + return nil + } + return i.EndUser +} + +func (i *Issue) GetFirstIncidentTime() *time.Time { + if i == nil { + return nil + } + return i.FirstIncidentTime +} + +func (i *Issue) GetLastIncidentTime() *time.Time { + if i == nil { + return nil + } + return i.LastIncidentTime +} + +func (i *Issue) GetIsMuted() *bool { + if i == nil { + return nil + } + return i.IsMuted +} + +func (i *Issue) GetErrorDetails() []string { + if i == nil { + return nil + } + return i.ErrorDetails +} + +func (i *Issue) GetExtraProperties() map[string]interface{} { + return i.extraProperties +} + +func (i *Issue) UnmarshalJSON(data []byte) error { + type embed Issue + var unmarshaler = struct { + embed + FirstIncidentTime *internal.DateTime `json:"first_incident_time,omitempty"` + LastIncidentTime *internal.DateTime `json:"last_incident_time,omitempty"` + }{ + embed: embed(*i), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *i = Issue(unmarshaler.embed) + i.FirstIncidentTime = unmarshaler.FirstIncidentTime.TimePtr() + i.LastIncidentTime = unmarshaler.LastIncidentTime.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *i) + if err != nil { + return err + } + i.extraProperties = extraProperties + i.rawJSON = json.RawMessage(data) + return nil +} + +func (i *Issue) MarshalJSON() ([]byte, error) { + type embed Issue + var marshaler = struct { + embed + FirstIncidentTime *internal.DateTime `json:"first_incident_time,omitempty"` + LastIncidentTime *internal.DateTime `json:"last_incident_time,omitempty"` + }{ + embed: embed(*i), + FirstIncidentTime: internal.NewOptionalDateTime(i.FirstIncidentTime), + LastIncidentTime: internal.NewOptionalDateTime(i.LastIncidentTime), + } + return json.Marshal(marshaler) +} + +func (i *Issue) String() string { + if len(i.rawJSON) > 0 { + if value, err := internal.StringifyJSON(i.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(i); err == nil { + return value + } + return fmt.Sprintf("%#v", i) +} + +// Status of the issue. Options: ('ONGOING', 'RESOLVED') +// +// * `ONGOING` - ONGOING +// * `RESOLVED` - RESOLVED +type IssueStatus struct { + IssueStatusEnum IssueStatusEnum + String string + + typ string +} + +func (i *IssueStatus) GetIssueStatusEnum() IssueStatusEnum { + if i == nil { + return "" + } + return i.IssueStatusEnum +} + +func (i *IssueStatus) GetString() string { + if i == nil { + return "" + } + return i.String +} + +func (i *IssueStatus) UnmarshalJSON(data []byte) error { + var valueIssueStatusEnum IssueStatusEnum + if err := json.Unmarshal(data, &valueIssueStatusEnum); err == nil { + i.typ = "IssueStatusEnum" + i.IssueStatusEnum = valueIssueStatusEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + i.typ = "String" + i.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, i) +} + +func (i IssueStatus) MarshalJSON() ([]byte, error) { + if i.typ == "IssueStatusEnum" || i.IssueStatusEnum != "" { + return json.Marshal(i.IssueStatusEnum) + } + if i.typ == "String" || i.String != "" { + return json.Marshal(i.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", i) +} + +type IssueStatusVisitor interface { + VisitIssueStatusEnum(IssueStatusEnum) error + VisitString(string) error +} + +func (i *IssueStatus) Accept(visitor IssueStatusVisitor) error { + if i.typ == "IssueStatusEnum" || i.IssueStatusEnum != "" { + return visitor.VisitIssueStatusEnum(i.IssueStatusEnum) + } + if i.typ == "String" || i.String != "" { + return visitor.VisitString(i.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", i) +} + +// * `ONGOING` - ONGOING +// * `RESOLVED` - RESOLVED +type IssueStatusEnum string + +const ( + IssueStatusEnumOngoing IssueStatusEnum = "ONGOING" + IssueStatusEnumResolved IssueStatusEnum = "RESOLVED" +) + +func NewIssueStatusEnumFromString(s string) (IssueStatusEnum, error) { + switch s { + case "ONGOING": + return IssueStatusEnumOngoing, nil + case "RESOLVED": + return IssueStatusEnumResolved, nil + } + var t IssueStatusEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (i IssueStatusEnum) Ptr() *IssueStatusEnum { + return &i +} + +type PaginatedIssueList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Issue `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedIssueList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedIssueList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedIssueList) GetResults() []*Issue { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedIssueList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedIssueList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedIssueList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedIssueList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedIssueList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} diff --git a/ticketing/issues/client.go b/ticketing/issues/client.go index 42f5ece..ea0e8cf 100644 --- a/ticketing/issues/client.go +++ b/ticketing/issues/client.go @@ -1,121 +1,129 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package issues import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - ticketing "github.com/merge-api/merge-go-client/ticketing" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" + ticketing "github.com/merge-api/merge-go-client/v2/ticketing" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Gets all issues for Organization. -func (c *Client) List(ctx context.Context, request *ticketing.IssuesListRequest) (*ticketing.PaginatedIssueList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ticketing/v1/issues" - - queryParams := make(url.Values) - if request.AccountToken != nil { - queryParams.Add("account_token", fmt.Sprintf("%v", *request.AccountToken)) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.EndDate != nil { - queryParams.Add("end_date", fmt.Sprintf("%v", *request.EndDate)) - } - if request.EndUserOrganizationName != nil { - queryParams.Add("end_user_organization_name", fmt.Sprintf("%v", *request.EndUserOrganizationName)) - } - if request.FirstIncidentTimeAfter != nil { - queryParams.Add("first_incident_time_after", fmt.Sprintf("%v", request.FirstIncidentTimeAfter.Format(time.RFC3339))) - } - if request.FirstIncidentTimeBefore != nil { - queryParams.Add("first_incident_time_before", fmt.Sprintf("%v", request.FirstIncidentTimeBefore.Format(time.RFC3339))) - } - if request.IncludeMuted != nil { - queryParams.Add("include_muted", fmt.Sprintf("%v", *request.IncludeMuted)) - } - if request.IntegrationName != nil { - queryParams.Add("integration_name", fmt.Sprintf("%v", *request.IntegrationName)) - } - if request.LastIncidentTimeAfter != nil { - queryParams.Add("last_incident_time_after", fmt.Sprintf("%v", request.LastIncidentTimeAfter.Format(time.RFC3339))) - } - if request.LastIncidentTimeBefore != nil { - queryParams.Add("last_incident_time_before", fmt.Sprintf("%v", request.LastIncidentTimeBefore.Format(time.RFC3339))) - } - if request.LinkedAccountId != nil { - queryParams.Add("linked_account_id", fmt.Sprintf("%v", *request.LinkedAccountId)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.StartDate != nil { - queryParams.Add("start_date", fmt.Sprintf("%v", *request.StartDate)) - } - if request.Status != nil { - queryParams.Add("status", fmt.Sprintf("%v", *request.Status)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *ticketing.PaginatedIssueList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *ticketing.IssuesListRequest, + opts ...option.RequestOption, +) (*core.Page[*ticketing.Issue], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ticketing/v1/issues" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *ticketing.PaginatedIssueList) *internal.PageResponse[*string, *ticketing.Issue] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *ticketing.Issue]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Get a specific issue. -func (c *Client) Retrieve(ctx context.Context, id string) (*ticketing.Issue, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"ticketing/v1/issues/%v", id) +func (c *Client) Retrieve( + ctx context.Context, + id string, + opts ...option.RequestOption, +) (*ticketing.Issue, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/ticketing/v1/issues/%v", + id, + ) + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ticketing.Issue if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/ticketing/link_token.go b/ticketing/link_token.go index c66116f..3634735 100644 --- a/ticketing/link_token.go +++ b/ticketing/link_token.go @@ -1,35 +1,279 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package ticketing +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" +) + type EndUserDetailsRequest struct { // Your end user's email address. This is purely for identification purposes - setting this value will not cause any emails to be sent. - EndUserEmailAddress string `json:"end_user_email_address"` + EndUserEmailAddress string `json:"end_user_email_address" url:"-"` // Your end user's organization. - EndUserOrganizationName string `json:"end_user_organization_name"` + EndUserOrganizationName string `json:"end_user_organization_name" url:"-"` // This unique identifier typically represents the ID for your end user in your product's database. This value must be distinct from other Linked Accounts' unique identifiers. - EndUserOriginId string `json:"end_user_origin_id"` + EndUserOriginId string `json:"end_user_origin_id" url:"-"` // The integration categories to show in Merge Link. - Categories []CategoriesEnum `json:"categories,omitempty"` + Categories []CategoriesEnum `json:"categories,omitempty" url:"-"` // The slug of a specific pre-selected integration for this linking flow token. For examples of slugs, see https://docs.merge.dev/guides/merge-link/single-integration/. - Integration *string `json:"integration,omitempty"` + Integration *string `json:"integration,omitempty" url:"-"` // An integer number of minutes between [30, 720 or 10080 if for a Magic Link URL] for how long this token is valid. Defaults to 30. - LinkExpiryMins *int `json:"link_expiry_mins,omitempty"` + LinkExpiryMins *int `json:"link_expiry_mins,omitempty" url:"-"` // Whether to generate a Magic Link URL. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. - ShouldCreateMagicLinkUrl *bool `json:"should_create_magic_link_url,omitempty"` + ShouldCreateMagicLinkUrl *bool `json:"should_create_magic_link_url,omitempty" url:"-"` // Whether to generate a Magic Link URL on the Admin Needed screen during the linking flow. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link. - HideAdminMagicLink *bool `json:"hide_admin_magic_link,omitempty"` + HideAdminMagicLink *bool `json:"hide_admin_magic_link,omitempty" url:"-"` // An array of objects to specify the models and fields that will be disabled for a given Linked Account. Each object uses model_id, enabled_actions, and disabled_fields to specify the model, method, and fields that are scoped for a given Linked Account. - CommonModels []*CommonModelScopesBodyRequest `json:"common_models,omitempty"` + CommonModels []*CommonModelScopesBodyRequest `json:"common_models,omitempty" url:"-"` // 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. - CategoryCommonModelScopes map[string][]*IndividualCommonModelScopeDeserializerRequest `json:"category_common_model_scopes,omitempty"` + CategoryCommonModelScopes map[string][]*IndividualCommonModelScopeDeserializerRequest `json:"category_common_model_scopes,omitempty" url:"-"` // The following subset of IETF language tags can be used to configure localization. // // * `en` - en // * `de` - de - Language *LanguageEnum `json:"language,omitempty"` + Language *EndUserDetailsRequestLanguage `json:"language,omitempty" url:"-"` // The boolean that indicates whether initial, periodic, and force syncs will be disabled. - AreSyncsDisabled *bool `json:"are_syncs_disabled,omitempty"` + AreSyncsDisabled *bool `json:"are_syncs_disabled,omitempty" url:"-"` // A JSON object containing integration-specific configuration options. - IntegrationSpecificConfig map[string]interface{} `json:"integration_specific_config,omitempty"` + IntegrationSpecificConfig map[string]interface{} `json:"integration_specific_config,omitempty" url:"-"` +} + +// The following subset of IETF language tags can be used to configure localization. +// +// * `en` - en +// * `de` - de +type EndUserDetailsRequestLanguage struct { + LanguageEnum LanguageEnum + String string + + typ string +} + +func (e *EndUserDetailsRequestLanguage) GetLanguageEnum() LanguageEnum { + if e == nil { + return "" + } + return e.LanguageEnum +} + +func (e *EndUserDetailsRequestLanguage) GetString() string { + if e == nil { + return "" + } + return e.String +} + +func (e *EndUserDetailsRequestLanguage) UnmarshalJSON(data []byte) error { + var valueLanguageEnum LanguageEnum + if err := json.Unmarshal(data, &valueLanguageEnum); err == nil { + e.typ = "LanguageEnum" + e.LanguageEnum = valueLanguageEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + e.typ = "String" + e.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, e) +} + +func (e EndUserDetailsRequestLanguage) MarshalJSON() ([]byte, error) { + if e.typ == "LanguageEnum" || e.LanguageEnum != "" { + return json.Marshal(e.LanguageEnum) + } + if e.typ == "String" || e.String != "" { + return json.Marshal(e.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type EndUserDetailsRequestLanguageVisitor interface { + VisitLanguageEnum(LanguageEnum) error + VisitString(string) error +} + +func (e *EndUserDetailsRequestLanguage) Accept(visitor EndUserDetailsRequestLanguageVisitor) error { + if e.typ == "LanguageEnum" || e.LanguageEnum != "" { + return visitor.VisitLanguageEnum(e.LanguageEnum) + } + if e.typ == "String" || e.String != "" { + return visitor.VisitString(e.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", e) +} + +type CommonModelScopesBodyRequest struct { + ModelId string `json:"model_id" url:"model_id"` + EnabledActions []EnabledActionsEnum `json:"enabled_actions" url:"enabled_actions"` + DisabledFields []string `json:"disabled_fields" url:"disabled_fields"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (c *CommonModelScopesBodyRequest) GetModelId() string { + if c == nil { + return "" + } + return c.ModelId +} + +func (c *CommonModelScopesBodyRequest) GetEnabledActions() []EnabledActionsEnum { + if c == nil { + return nil + } + return c.EnabledActions +} + +func (c *CommonModelScopesBodyRequest) GetDisabledFields() []string { + if c == nil { + return nil + } + return c.DisabledFields +} + +func (c *CommonModelScopesBodyRequest) GetExtraProperties() map[string]interface{} { + return c.extraProperties +} + +func (c *CommonModelScopesBodyRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CommonModelScopesBodyRequest + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *c = CommonModelScopesBodyRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *c) + if err != nil { + return err + } + c.extraProperties = extraProperties + c.rawJSON = json.RawMessage(data) + return nil +} + +func (c *CommonModelScopesBodyRequest) String() string { + if len(c.rawJSON) > 0 { + if value, err := internal.StringifyJSON(c.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(c); err == nil { + return value + } + return fmt.Sprintf("%#v", c) +} + +// * `READ` - READ +// * `WRITE` - WRITE +type EnabledActionsEnum string + +const ( + EnabledActionsEnumRead EnabledActionsEnum = "READ" + EnabledActionsEnumWrite EnabledActionsEnum = "WRITE" +) + +func NewEnabledActionsEnumFromString(s string) (EnabledActionsEnum, error) { + switch s { + case "READ": + return EnabledActionsEnumRead, nil + case "WRITE": + return EnabledActionsEnumWrite, nil + } + var t EnabledActionsEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (e EnabledActionsEnum) Ptr() *EnabledActionsEnum { + return &e +} + +// * `en` - en +// * `de` - de +type LanguageEnum string + +const ( + LanguageEnumEn LanguageEnum = "en" + LanguageEnumDe LanguageEnum = "de" +) + +func NewLanguageEnumFromString(s string) (LanguageEnum, error) { + switch s { + case "en": + return LanguageEnumEn, nil + case "de": + return LanguageEnumDe, nil + } + var t LanguageEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (l LanguageEnum) Ptr() *LanguageEnum { + return &l +} + +type LinkToken struct { + LinkToken string `json:"link_token" url:"link_token"` + IntegrationName *string `json:"integration_name,omitempty" url:"integration_name,omitempty"` + MagicLinkUrl *string `json:"magic_link_url,omitempty" url:"magic_link_url,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (l *LinkToken) GetLinkToken() string { + if l == nil { + return "" + } + return l.LinkToken +} + +func (l *LinkToken) GetIntegrationName() *string { + if l == nil { + return nil + } + return l.IntegrationName +} + +func (l *LinkToken) GetMagicLinkUrl() *string { + if l == nil { + return nil + } + return l.MagicLinkUrl +} + +func (l *LinkToken) GetExtraProperties() map[string]interface{} { + return l.extraProperties +} + +func (l *LinkToken) UnmarshalJSON(data []byte) error { + type unmarshaler LinkToken + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *l = LinkToken(value) + extraProperties, err := internal.ExtractExtraProperties(data, *l) + if err != nil { + return err + } + l.extraProperties = extraProperties + l.rawJSON = json.RawMessage(data) + return nil +} + +func (l *LinkToken) String() string { + if len(l.rawJSON) > 0 { + if value, err := internal.StringifyJSON(l.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(l); err == nil { + return value + } + return fmt.Sprintf("%#v", l) } diff --git a/ticketing/linked_accounts.go b/ticketing/linked_accounts.go index 5a2f8e3..fc93c07 100644 --- a/ticketing/linked_accounts.go +++ b/ticketing/linked_accounts.go @@ -1,45 +1,48 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package ticketing import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" + time "time" ) type LinkedAccountsListRequest struct { // Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing` // - // - `hris` - hris - // - `ats` - ats - // - `accounting` - accounting - // - `ticketing` - ticketing - // - `crm` - crm - // - `mktg` - mktg - // - `filestorage` - filestorage - Category *LinkedAccountsListRequestCategory `json:"-"` + // * `hris` - hris + // * `ats` - ats + // * `accounting` - accounting + // * `ticketing` - ticketing + // * `crm` - crm + // * `mktg` - mktg + // * `filestorage` - filestorage + Category *LinkedAccountsListRequestCategory `json:"-" url:"category,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // If provided, will only return linked accounts associated with the given email address. - EndUserEmailAddress *string `json:"-"` + EndUserEmailAddress *string `json:"-" url:"end_user_email_address,omitempty"` // If provided, will only return linked accounts associated with the given organization name. - EndUserOrganizationName *string `json:"-"` + EndUserOrganizationName *string `json:"-" url:"end_user_organization_name,omitempty"` // If provided, will only return linked accounts associated with the given origin ID. - EndUserOriginId *string `json:"-"` + EndUserOriginId *string `json:"-" url:"end_user_origin_id,omitempty"` // Comma-separated list of EndUser origin IDs, making it possible to specify multiple EndUsers at once. - EndUserOriginIds *string `json:"-"` - Id *string `json:"-"` + EndUserOriginIds *string `json:"-" url:"end_user_origin_ids,omitempty"` + Id *string `json:"-" url:"id,omitempty"` // Comma-separated list of LinkedAccount IDs, making it possible to specify multiple LinkedAccounts at once. - Ids *string `json:"-"` + Ids *string `json:"-" url:"ids,omitempty"` // If `true`, will include complete production duplicates of the account specified by the `id` query parameter in the response. `id` must be for a complete production linked account. - IncludeDuplicates *bool `json:"-"` + IncludeDuplicates *bool `json:"-" url:"include_duplicates,omitempty"` // If provided, will only return linked accounts associated with the given integration name. - IntegrationName *string `json:"-"` + IntegrationName *string `json:"-" url:"integration_name,omitempty"` // If included, will only include test linked accounts. If not included, will only include non-test linked accounts. - IsTestAccount *string `json:"-"` + IsTestAccount *string `json:"-" url:"is_test_account,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // Filter by status. Options: `COMPLETE`, `IDLE`, `INCOMPLETE`, `RELINK_NEEDED` - Status *string `json:"-"` + Status *string `json:"-" url:"status,omitempty"` } type LinkedAccountsListRequestCategory string @@ -78,3 +81,491 @@ func NewLinkedAccountsListRequestCategoryFromString(s string) (LinkedAccountsLis func (l LinkedAccountsListRequestCategory) Ptr() *LinkedAccountsListRequestCategory { return &l } + +// # The LinkedAccount Object +// ### Description +// The `LinkedAccount` object is used to represent an end user's link with a specific integration. +// +// ### Usage Example +// View a list of your organization's `LinkedAccount` objects. +type AccountDetailsAndActions struct { + Id string `json:"id" url:"id"` + Category *AccountDetailsAndActionsCategory `json:"category,omitempty" url:"category,omitempty"` + Status *AccountDetailsAndActionsStatus `json:"status" url:"status"` + StatusDetail *string `json:"status_detail,omitempty" url:"status_detail,omitempty"` + EndUserOriginId *string `json:"end_user_origin_id,omitempty" url:"end_user_origin_id,omitempty"` + EndUserOrganizationName string `json:"end_user_organization_name" url:"end_user_organization_name"` + EndUserEmailAddress string `json:"end_user_email_address" url:"end_user_email_address"` + // The tenant or domain the customer has provided access to. + Subdomain *string `json:"subdomain,omitempty" url:"subdomain,omitempty"` + WebhookListenerUrl string `json:"webhook_listener_url" url:"webhook_listener_url"` + // 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. + IsDuplicate *bool `json:"is_duplicate,omitempty" url:"is_duplicate,omitempty"` + Integration *AccountDetailsAndActionsIntegration `json:"integration,omitempty" url:"integration,omitempty"` + AccountType string `json:"account_type" url:"account_type"` + CompletedAt time.Time `json:"completed_at" url:"completed_at"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AccountDetailsAndActions) GetId() string { + if a == nil { + return "" + } + return a.Id +} + +func (a *AccountDetailsAndActions) GetCategory() *AccountDetailsAndActionsCategory { + if a == nil { + return nil + } + return a.Category +} + +func (a *AccountDetailsAndActions) GetStatus() *AccountDetailsAndActionsStatus { + if a == nil { + return nil + } + return a.Status +} + +func (a *AccountDetailsAndActions) GetStatusDetail() *string { + if a == nil { + return nil + } + return a.StatusDetail +} + +func (a *AccountDetailsAndActions) GetEndUserOriginId() *string { + if a == nil { + return nil + } + return a.EndUserOriginId +} + +func (a *AccountDetailsAndActions) GetEndUserOrganizationName() string { + if a == nil { + return "" + } + return a.EndUserOrganizationName +} + +func (a *AccountDetailsAndActions) GetEndUserEmailAddress() string { + if a == nil { + return "" + } + return a.EndUserEmailAddress +} + +func (a *AccountDetailsAndActions) GetSubdomain() *string { + if a == nil { + return nil + } + return a.Subdomain +} + +func (a *AccountDetailsAndActions) GetWebhookListenerUrl() string { + if a == nil { + return "" + } + return a.WebhookListenerUrl +} + +func (a *AccountDetailsAndActions) GetIsDuplicate() *bool { + if a == nil { + return nil + } + return a.IsDuplicate +} + +func (a *AccountDetailsAndActions) GetIntegration() *AccountDetailsAndActionsIntegration { + if a == nil { + return nil + } + return a.Integration +} + +func (a *AccountDetailsAndActions) GetAccountType() string { + if a == nil { + return "" + } + return a.AccountType +} + +func (a *AccountDetailsAndActions) GetCompletedAt() time.Time { + if a == nil { + return time.Time{} + } + return a.CompletedAt +} + +func (a *AccountDetailsAndActions) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AccountDetailsAndActions) UnmarshalJSON(data []byte) error { + type embed AccountDetailsAndActions + var unmarshaler = struct { + embed + CompletedAt *internal.DateTime `json:"completed_at"` + }{ + embed: embed(*a), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *a = AccountDetailsAndActions(unmarshaler.embed) + a.CompletedAt = unmarshaler.CompletedAt.Time() + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AccountDetailsAndActions) MarshalJSON() ([]byte, error) { + type embed AccountDetailsAndActions + var marshaler = struct { + embed + CompletedAt *internal.DateTime `json:"completed_at"` + }{ + embed: embed(*a), + CompletedAt: internal.NewDateTime(a.CompletedAt), + } + return json.Marshal(marshaler) +} + +func (a *AccountDetailsAndActions) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} + +type AccountDetailsAndActionsCategory struct { + CategoryEnum CategoryEnum + String string + + typ string +} + +func (a *AccountDetailsAndActionsCategory) GetCategoryEnum() CategoryEnum { + if a == nil { + return "" + } + return a.CategoryEnum +} + +func (a *AccountDetailsAndActionsCategory) GetString() string { + if a == nil { + return "" + } + return a.String +} + +func (a *AccountDetailsAndActionsCategory) UnmarshalJSON(data []byte) error { + var valueCategoryEnum CategoryEnum + if err := json.Unmarshal(data, &valueCategoryEnum); err == nil { + a.typ = "CategoryEnum" + a.CategoryEnum = valueCategoryEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + a.typ = "String" + a.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, a) +} + +func (a AccountDetailsAndActionsCategory) MarshalJSON() ([]byte, error) { + if a.typ == "CategoryEnum" || a.CategoryEnum != "" { + return json.Marshal(a.CategoryEnum) + } + if a.typ == "String" || a.String != "" { + return json.Marshal(a.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type AccountDetailsAndActionsCategoryVisitor interface { + VisitCategoryEnum(CategoryEnum) error + VisitString(string) error +} + +func (a *AccountDetailsAndActionsCategory) Accept(visitor AccountDetailsAndActionsCategoryVisitor) error { + if a.typ == "CategoryEnum" || a.CategoryEnum != "" { + return visitor.VisitCategoryEnum(a.CategoryEnum) + } + if a.typ == "String" || a.String != "" { + return visitor.VisitString(a.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type AccountDetailsAndActionsIntegration struct { + Name string `json:"name" url:"name"` + Categories []CategoriesEnum `json:"categories" url:"categories"` + Image *string `json:"image,omitempty" url:"image,omitempty"` + SquareImage *string `json:"square_image,omitempty" url:"square_image,omitempty"` + Color string `json:"color" url:"color"` + Slug string `json:"slug" url:"slug"` + PassthroughAvailable bool `json:"passthrough_available" url:"passthrough_available"` + AvailableModelOperations []*ModelOperation `json:"available_model_operations,omitempty" url:"available_model_operations,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (a *AccountDetailsAndActionsIntegration) GetName() string { + if a == nil { + return "" + } + return a.Name +} + +func (a *AccountDetailsAndActionsIntegration) GetCategories() []CategoriesEnum { + if a == nil { + return nil + } + return a.Categories +} + +func (a *AccountDetailsAndActionsIntegration) GetImage() *string { + if a == nil { + return nil + } + return a.Image +} + +func (a *AccountDetailsAndActionsIntegration) GetSquareImage() *string { + if a == nil { + return nil + } + return a.SquareImage +} + +func (a *AccountDetailsAndActionsIntegration) GetColor() string { + if a == nil { + return "" + } + return a.Color +} + +func (a *AccountDetailsAndActionsIntegration) GetSlug() string { + if a == nil { + return "" + } + return a.Slug +} + +func (a *AccountDetailsAndActionsIntegration) GetPassthroughAvailable() bool { + if a == nil { + return false + } + return a.PassthroughAvailable +} + +func (a *AccountDetailsAndActionsIntegration) GetAvailableModelOperations() []*ModelOperation { + if a == nil { + return nil + } + return a.AvailableModelOperations +} + +func (a *AccountDetailsAndActionsIntegration) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *AccountDetailsAndActionsIntegration) UnmarshalJSON(data []byte) error { + type unmarshaler AccountDetailsAndActionsIntegration + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *a = AccountDetailsAndActionsIntegration(value) + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil +} + +func (a *AccountDetailsAndActionsIntegration) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value + } + return fmt.Sprintf("%#v", a) +} + +type AccountDetailsAndActionsStatus struct { + AccountDetailsAndActionsStatusEnum AccountDetailsAndActionsStatusEnum + String string + + typ string +} + +func (a *AccountDetailsAndActionsStatus) GetAccountDetailsAndActionsStatusEnum() AccountDetailsAndActionsStatusEnum { + if a == nil { + return "" + } + return a.AccountDetailsAndActionsStatusEnum +} + +func (a *AccountDetailsAndActionsStatus) GetString() string { + if a == nil { + return "" + } + return a.String +} + +func (a *AccountDetailsAndActionsStatus) UnmarshalJSON(data []byte) error { + var valueAccountDetailsAndActionsStatusEnum AccountDetailsAndActionsStatusEnum + if err := json.Unmarshal(data, &valueAccountDetailsAndActionsStatusEnum); err == nil { + a.typ = "AccountDetailsAndActionsStatusEnum" + a.AccountDetailsAndActionsStatusEnum = valueAccountDetailsAndActionsStatusEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + a.typ = "String" + a.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, a) +} + +func (a AccountDetailsAndActionsStatus) MarshalJSON() ([]byte, error) { + if a.typ == "AccountDetailsAndActionsStatusEnum" || a.AccountDetailsAndActionsStatusEnum != "" { + return json.Marshal(a.AccountDetailsAndActionsStatusEnum) + } + if a.typ == "String" || a.String != "" { + return json.Marshal(a.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) +} + +type AccountDetailsAndActionsStatusVisitor interface { + VisitAccountDetailsAndActionsStatusEnum(AccountDetailsAndActionsStatusEnum) error + VisitString(string) error +} + +func (a *AccountDetailsAndActionsStatus) Accept(visitor AccountDetailsAndActionsStatusVisitor) error { + if a.typ == "AccountDetailsAndActionsStatusEnum" || a.AccountDetailsAndActionsStatusEnum != "" { + return visitor.VisitAccountDetailsAndActionsStatusEnum(a.AccountDetailsAndActionsStatusEnum) + } + if a.typ == "String" || a.String != "" { + return visitor.VisitString(a.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", a) +} + +// * `COMPLETE` - COMPLETE +// * `INCOMPLETE` - INCOMPLETE +// * `RELINK_NEEDED` - RELINK_NEEDED +// * `IDLE` - IDLE +type AccountDetailsAndActionsStatusEnum string + +const ( + AccountDetailsAndActionsStatusEnumComplete AccountDetailsAndActionsStatusEnum = "COMPLETE" + AccountDetailsAndActionsStatusEnumIncomplete AccountDetailsAndActionsStatusEnum = "INCOMPLETE" + AccountDetailsAndActionsStatusEnumRelinkNeeded AccountDetailsAndActionsStatusEnum = "RELINK_NEEDED" + AccountDetailsAndActionsStatusEnumIdle AccountDetailsAndActionsStatusEnum = "IDLE" +) + +func NewAccountDetailsAndActionsStatusEnumFromString(s string) (AccountDetailsAndActionsStatusEnum, error) { + switch s { + case "COMPLETE": + return AccountDetailsAndActionsStatusEnumComplete, nil + case "INCOMPLETE": + return AccountDetailsAndActionsStatusEnumIncomplete, nil + case "RELINK_NEEDED": + return AccountDetailsAndActionsStatusEnumRelinkNeeded, nil + case "IDLE": + return AccountDetailsAndActionsStatusEnumIdle, nil + } + var t AccountDetailsAndActionsStatusEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (a AccountDetailsAndActionsStatusEnum) Ptr() *AccountDetailsAndActionsStatusEnum { + return &a +} + +type PaginatedAccountDetailsAndActionsList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*AccountDetailsAndActions `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedAccountDetailsAndActionsList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedAccountDetailsAndActionsList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedAccountDetailsAndActionsList) GetResults() []*AccountDetailsAndActions { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedAccountDetailsAndActionsList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedAccountDetailsAndActionsList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedAccountDetailsAndActionsList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedAccountDetailsAndActionsList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedAccountDetailsAndActionsList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} diff --git a/ticketing/linkedaccounts/client.go b/ticketing/linkedaccounts/client.go index fcf1b35..415cde9 100644 --- a/ticketing/linkedaccounts/client.go +++ b/ticketing/linkedaccounts/client.go @@ -1,97 +1,92 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package linkedaccounts import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - ticketing "github.com/merge-api/merge-go-client/ticketing" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" + ticketing "github.com/merge-api/merge-go-client/v2/ticketing" http "net/http" - url "net/url" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // List linked accounts for your organization. -func (c *Client) List(ctx context.Context, request *ticketing.LinkedAccountsListRequest) (*ticketing.PaginatedAccountDetailsAndActionsList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ticketing/v1/linked-accounts" - - queryParams := make(url.Values) - if request.Category != nil { - queryParams.Add("category", fmt.Sprintf("%v", *request.Category)) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.EndUserEmailAddress != nil { - queryParams.Add("end_user_email_address", fmt.Sprintf("%v", *request.EndUserEmailAddress)) - } - if request.EndUserOrganizationName != nil { - queryParams.Add("end_user_organization_name", fmt.Sprintf("%v", *request.EndUserOrganizationName)) - } - if request.EndUserOriginId != nil { - queryParams.Add("end_user_origin_id", fmt.Sprintf("%v", *request.EndUserOriginId)) - } - if request.EndUserOriginIds != nil { - queryParams.Add("end_user_origin_ids", fmt.Sprintf("%v", *request.EndUserOriginIds)) - } - if request.Id != nil { - queryParams.Add("id", fmt.Sprintf("%v", *request.Id)) - } - if request.Ids != nil { - queryParams.Add("ids", fmt.Sprintf("%v", *request.Ids)) - } - if request.IncludeDuplicates != nil { - queryParams.Add("include_duplicates", fmt.Sprintf("%v", *request.IncludeDuplicates)) - } - if request.IntegrationName != nil { - queryParams.Add("integration_name", fmt.Sprintf("%v", *request.IntegrationName)) - } - if request.IsTestAccount != nil { - queryParams.Add("is_test_account", fmt.Sprintf("%v", *request.IsTestAccount)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.Status != nil { - queryParams.Add("status", fmt.Sprintf("%v", *request.Status)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *ticketing.PaginatedAccountDetailsAndActionsList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *ticketing.LinkedAccountsListRequest, + opts ...option.RequestOption, +) (*core.Page[*ticketing.AccountDetailsAndActions], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ticketing/v1/linked-accounts" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *ticketing.PaginatedAccountDetailsAndActionsList) *internal.PageResponse[*string, *ticketing.AccountDetailsAndActions] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *ticketing.AccountDetailsAndActions]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } diff --git a/ticketing/linktoken/client.go b/ticketing/linktoken/client.go index 5dc22a7..2dba090 100644 --- a/ticketing/linktoken/client.go +++ b/ticketing/linktoken/client.go @@ -1,49 +1,68 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package linktoken import ( context "context" - core "github.com/merge-api/merge-go-client/core" - ticketing "github.com/merge-api/merge-go-client/ticketing" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" + ticketing "github.com/merge-api/merge-go-client/v2/ticketing" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Creates a link token to be used when linking a new end user. -func (c *Client) Create(ctx context.Context, request *ticketing.EndUserDetailsRequest) (*ticketing.LinkToken, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ticketing/v1/link-token" +func (c *Client) Create( + ctx context.Context, + request *ticketing.EndUserDetailsRequest, + opts ...option.RequestOption, +) (*ticketing.LinkToken, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ticketing/v1/link-token" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *ticketing.LinkToken if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err diff --git a/ticketing/passthrough/client.go b/ticketing/passthrough/client.go index f14faf0..09c1bd1 100644 --- a/ticketing/passthrough/client.go +++ b/ticketing/passthrough/client.go @@ -1,49 +1,68 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package passthrough import ( context "context" - core "github.com/merge-api/merge-go-client/core" - ticketing "github.com/merge-api/merge-go-client/ticketing" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" + ticketing "github.com/merge-api/merge-go-client/v2/ticketing" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Pull data from an endpoint not currently supported by Merge. -func (c *Client) Create(ctx context.Context, request *ticketing.DataPassthroughRequest) (*ticketing.RemoteResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ticketing/v1/passthrough" +func (c *Client) Create( + ctx context.Context, + request *ticketing.DataPassthroughRequest, + opts ...option.RequestOption, +) (*ticketing.RemoteResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ticketing/v1/passthrough" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *ticketing.RemoteResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err diff --git a/ticketing/projects.go b/ticketing/projects.go index 81449ef..510e477 100644 --- a/ticketing/projects.go +++ b/ticketing/projects.go @@ -1,76 +1,283 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package ticketing import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type ProjectsListRequest struct { // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` } type ProjectsRetrieveRequest struct { // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` } -type ProjectsUsersListRequestExpand string +type ProjectsUsersListRequestExpandItem string const ( - ProjectsUsersListRequestExpandRoles ProjectsUsersListRequestExpand = "roles" - ProjectsUsersListRequestExpandTeams ProjectsUsersListRequestExpand = "teams" - ProjectsUsersListRequestExpandTeamsRoles ProjectsUsersListRequestExpand = "teams,roles" + ProjectsUsersListRequestExpandItemRoles ProjectsUsersListRequestExpandItem = "roles" + ProjectsUsersListRequestExpandItemTeams ProjectsUsersListRequestExpandItem = "teams" ) -func NewProjectsUsersListRequestExpandFromString(s string) (ProjectsUsersListRequestExpand, error) { +func NewProjectsUsersListRequestExpandItemFromString(s string) (ProjectsUsersListRequestExpandItem, error) { switch s { case "roles": - return ProjectsUsersListRequestExpandRoles, nil + return ProjectsUsersListRequestExpandItemRoles, nil case "teams": - return ProjectsUsersListRequestExpandTeams, nil - case "teams,roles": - return ProjectsUsersListRequestExpandTeamsRoles, nil + return ProjectsUsersListRequestExpandItemTeams, nil } - var t ProjectsUsersListRequestExpand + var t ProjectsUsersListRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (p ProjectsUsersListRequestExpand) Ptr() *ProjectsUsersListRequestExpand { +func (p ProjectsUsersListRequestExpandItem) Ptr() *ProjectsUsersListRequestExpandItem { return &p } +type PaginatedProjectList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Project `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedProjectList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedProjectList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedProjectList) GetResults() []*Project { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedProjectList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedProjectList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedProjectList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedProjectList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedProjectList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +// # The Project Object +// ### Description +// Please use the `Collection` model. This model will be fully deprecated on 3/30/2024. +// +// ### Usage Example +// TODO +type Project struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The project's name. + Name *string `json:"name,omitempty" url:"name,omitempty"` + // The project's description. + Description *string `json:"description,omitempty" url:"description,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *Project) GetId() *string { + if p == nil { + return nil + } + return p.Id +} + +func (p *Project) GetRemoteId() *string { + if p == nil { + return nil + } + return p.RemoteId +} + +func (p *Project) GetCreatedAt() *time.Time { + if p == nil { + return nil + } + return p.CreatedAt +} + +func (p *Project) GetModifiedAt() *time.Time { + if p == nil { + return nil + } + return p.ModifiedAt +} + +func (p *Project) GetName() *string { + if p == nil { + return nil + } + return p.Name +} + +func (p *Project) GetDescription() *string { + if p == nil { + return nil + } + return p.Description +} + +func (p *Project) GetRemoteWasDeleted() *bool { + if p == nil { + return nil + } + return p.RemoteWasDeleted +} + +func (p *Project) GetFieldMappings() map[string]interface{} { + if p == nil { + return nil + } + return p.FieldMappings +} + +func (p *Project) GetRemoteData() []*RemoteData { + if p == nil { + return nil + } + return p.RemoteData +} + +func (p *Project) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *Project) UnmarshalJSON(data []byte) error { + type embed Project + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*p), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *p = Project(unmarshaler.embed) + p.CreatedAt = unmarshaler.CreatedAt.TimePtr() + p.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *Project) MarshalJSON() ([]byte, error) { + type embed Project + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*p), + CreatedAt: internal.NewOptionalDateTime(p.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(p.ModifiedAt), + } + return json.Marshal(marshaler) +} + +func (p *Project) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + type ProjectsUsersListRequest struct { // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *ProjectsUsersListRequestExpand `json:"-"` + Expand []*ProjectsUsersListRequestExpandItem `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` } diff --git a/ticketing/projects/client.go b/ticketing/projects/client.go index 595136f..cce80e4 100644 --- a/ticketing/projects/client.go +++ b/ticketing/projects/client.go @@ -1,117 +1,137 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package projects import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - ticketing "github.com/merge-api/merge-go-client/ticketing" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" + ticketing "github.com/merge-api/merge-go-client/v2/ticketing" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `Project` objects. -func (c *Client) List(ctx context.Context, request *ticketing.ProjectsListRequest) (*ticketing.PaginatedProjectList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ticketing/v1/projects" - - queryParams := make(url.Values) - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *ticketing.PaginatedProjectList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *ticketing.ProjectsListRequest, + opts ...option.RequestOption, +) (*core.Page[*ticketing.Project], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ticketing/v1/projects" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *ticketing.PaginatedProjectList) *internal.PageResponse[*string, *ticketing.Project] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *ticketing.Project]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Returns a `Project` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *ticketing.ProjectsRetrieveRequest) (*ticketing.Project, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"ticketing/v1/projects/%v", id) - - queryParams := make(url.Values) - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *ticketing.ProjectsRetrieveRequest, + opts ...option.RequestOption, +) (*ticketing.Project, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/ticketing/v1/projects/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ticketing.Project if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -120,47 +140,64 @@ func (c *Client) Retrieve(ctx context.Context, id string, request *ticketing.Pro } // Returns a list of `User` objects. -func (c *Client) UsersList(ctx context.Context, parentId string, request *ticketing.ProjectsUsersListRequest) (*ticketing.PaginatedUserList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"ticketing/v1/projects/%v/users", parentId) - - queryParams := make(url.Values) - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *ticketing.PaginatedUserList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) UsersList( + ctx context.Context, + parentId string, + request *ticketing.ProjectsUsersListRequest, + opts ...option.RequestOption, +) (*core.Page[*ticketing.User], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/ticketing/v1/projects/%v/users", + parentId, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *ticketing.PaginatedUserList) *internal.PageResponse[*string, *ticketing.User] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *ticketing.User]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } diff --git a/ticketing/regenerate_key.go b/ticketing/regenerate_key.go index 35ea754..5c05eb4 100644 --- a/ticketing/regenerate_key.go +++ b/ticketing/regenerate_key.go @@ -1,8 +1,8 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package ticketing type RemoteKeyForRegenerationRequest struct { // The name of the remote key - Name string `json:"name"` + Name string `json:"name" url:"-"` } diff --git a/ticketing/regeneratekey/client.go b/ticketing/regeneratekey/client.go index 8479506..77151fd 100644 --- a/ticketing/regeneratekey/client.go +++ b/ticketing/regeneratekey/client.go @@ -1,49 +1,68 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package regeneratekey import ( context "context" - core "github.com/merge-api/merge-go-client/core" - ticketing "github.com/merge-api/merge-go-client/ticketing" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" + ticketing "github.com/merge-api/merge-go-client/v2/ticketing" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Exchange remote keys. -func (c *Client) Create(ctx context.Context, request *ticketing.RemoteKeyForRegenerationRequest) (*ticketing.RemoteKey, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ticketing/v1/regenerate-key" +func (c *Client) Create( + ctx context.Context, + request *ticketing.RemoteKeyForRegenerationRequest, + opts ...option.RequestOption, +) (*ticketing.RemoteKey, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ticketing/v1/regenerate-key" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *ticketing.RemoteKey if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err diff --git a/ticketing/roles.go b/ticketing/roles.go index 9041d9c..56e4d5e 100644 --- a/ticketing/roles.go +++ b/ticketing/roles.go @@ -1,35 +1,102 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package ticketing import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type RolesListRequest struct { // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` } type RolesRetrieveRequest struct { // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` +} + +type PaginatedRoleList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Role `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedRoleList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedRoleList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedRoleList) GetResults() []*Role { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedRoleList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedRoleList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedRoleList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedRoleList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedRoleList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) } diff --git a/ticketing/roles/client.go b/ticketing/roles/client.go index 59e3ed2..da4bf4a 100644 --- a/ticketing/roles/client.go +++ b/ticketing/roles/client.go @@ -1,117 +1,137 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package roles import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - ticketing "github.com/merge-api/merge-go-client/ticketing" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" + ticketing "github.com/merge-api/merge-go-client/v2/ticketing" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `Role` objects. -func (c *Client) List(ctx context.Context, request *ticketing.RolesListRequest) (*ticketing.PaginatedRoleList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ticketing/v1/roles" - - queryParams := make(url.Values) - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *ticketing.PaginatedRoleList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *ticketing.RolesListRequest, + opts ...option.RequestOption, +) (*core.Page[*ticketing.Role], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ticketing/v1/roles" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *ticketing.PaginatedRoleList) *internal.PageResponse[*string, *ticketing.Role] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *ticketing.Role]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Returns a `Role` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *ticketing.RolesRetrieveRequest) (*ticketing.Role, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"ticketing/v1/roles/%v", id) - - queryParams := make(url.Values) - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *ticketing.RolesRetrieveRequest, + opts ...option.RequestOption, +) (*ticketing.Role, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/ticketing/v1/roles/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ticketing.Role if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/ticketing/scopes.go b/ticketing/scopes.go index 5ce051a..02a8526 100644 --- a/ticketing/scopes.go +++ b/ticketing/scopes.go @@ -1,8 +1,223 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package ticketing +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" +) + type LinkedAccountCommonModelScopeDeserializerRequest struct { // The common models you want to update the scopes for - CommonModels []*IndividualCommonModelScopeDeserializerRequest `json:"common_models,omitempty"` + CommonModels []*IndividualCommonModelScopeDeserializerRequest `json:"common_models,omitempty" url:"-"` +} + +type CommonModelScopeApi struct { + // The common models you want to update the scopes for + CommonModels []*IndividualCommonModelScopeDeserializer `json:"common_models" url:"common_models"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (c *CommonModelScopeApi) GetCommonModels() []*IndividualCommonModelScopeDeserializer { + if c == nil { + return nil + } + return c.CommonModels +} + +func (c *CommonModelScopeApi) GetExtraProperties() map[string]interface{} { + return c.extraProperties +} + +func (c *CommonModelScopeApi) UnmarshalJSON(data []byte) error { + type unmarshaler CommonModelScopeApi + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *c = CommonModelScopeApi(value) + extraProperties, err := internal.ExtractExtraProperties(data, *c) + if err != nil { + return err + } + c.extraProperties = extraProperties + c.rawJSON = json.RawMessage(data) + return nil +} + +func (c *CommonModelScopeApi) String() string { + if len(c.rawJSON) > 0 { + if value, err := internal.StringifyJSON(c.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(c); err == nil { + return value + } + return fmt.Sprintf("%#v", c) +} + +type FieldPermissionDeserializer struct { + EnabledFields []interface{} `json:"enabled_fields,omitempty" url:"enabled_fields,omitempty"` + DisabledFields []interface{} `json:"disabled_fields,omitempty" url:"disabled_fields,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (f *FieldPermissionDeserializer) GetEnabledFields() []interface{} { + if f == nil { + return nil + } + return f.EnabledFields +} + +func (f *FieldPermissionDeserializer) GetDisabledFields() []interface{} { + if f == nil { + return nil + } + return f.DisabledFields +} + +func (f *FieldPermissionDeserializer) GetExtraProperties() map[string]interface{} { + return f.extraProperties +} + +func (f *FieldPermissionDeserializer) UnmarshalJSON(data []byte) error { + type unmarshaler FieldPermissionDeserializer + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *f = FieldPermissionDeserializer(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { + return err + } + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) + return nil +} + +func (f *FieldPermissionDeserializer) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(f); err == nil { + return value + } + return fmt.Sprintf("%#v", f) +} + +type IndividualCommonModelScopeDeserializer struct { + ModelName string `json:"model_name" url:"model_name"` + ModelPermissions map[string]*ModelPermissionDeserializer `json:"model_permissions,omitempty" url:"model_permissions,omitempty"` + FieldPermissions *FieldPermissionDeserializer `json:"field_permissions,omitempty" url:"field_permissions,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (i *IndividualCommonModelScopeDeserializer) GetModelName() string { + if i == nil { + return "" + } + return i.ModelName +} + +func (i *IndividualCommonModelScopeDeserializer) GetModelPermissions() map[string]*ModelPermissionDeserializer { + if i == nil { + return nil + } + return i.ModelPermissions +} + +func (i *IndividualCommonModelScopeDeserializer) GetFieldPermissions() *FieldPermissionDeserializer { + if i == nil { + return nil + } + return i.FieldPermissions +} + +func (i *IndividualCommonModelScopeDeserializer) GetExtraProperties() map[string]interface{} { + return i.extraProperties +} + +func (i *IndividualCommonModelScopeDeserializer) UnmarshalJSON(data []byte) error { + type unmarshaler IndividualCommonModelScopeDeserializer + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *i = IndividualCommonModelScopeDeserializer(value) + extraProperties, err := internal.ExtractExtraProperties(data, *i) + if err != nil { + return err + } + i.extraProperties = extraProperties + i.rawJSON = json.RawMessage(data) + return nil +} + +func (i *IndividualCommonModelScopeDeserializer) String() string { + if len(i.rawJSON) > 0 { + if value, err := internal.StringifyJSON(i.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(i); err == nil { + return value + } + return fmt.Sprintf("%#v", i) +} + +type ModelPermissionDeserializer struct { + IsEnabled *bool `json:"is_enabled,omitempty" url:"is_enabled,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (m *ModelPermissionDeserializer) GetIsEnabled() *bool { + if m == nil { + return nil + } + return m.IsEnabled +} + +func (m *ModelPermissionDeserializer) GetExtraProperties() map[string]interface{} { + return m.extraProperties +} + +func (m *ModelPermissionDeserializer) UnmarshalJSON(data []byte) error { + type unmarshaler ModelPermissionDeserializer + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *m = ModelPermissionDeserializer(value) + extraProperties, err := internal.ExtractExtraProperties(data, *m) + if err != nil { + return err + } + m.extraProperties = extraProperties + m.rawJSON = json.RawMessage(data) + return nil +} + +func (m *ModelPermissionDeserializer) String() string { + if len(m.rawJSON) > 0 { + if value, err := internal.StringifyJSON(m.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(m); err == nil { + return value + } + return fmt.Sprintf("%#v", m) } diff --git a/ticketing/scopes/client.go b/ticketing/scopes/client.go index d5c8445..5f5030c 100644 --- a/ticketing/scopes/client.go +++ b/ticketing/scopes/client.go @@ -1,48 +1,65 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package scopes import ( context "context" - core "github.com/merge-api/merge-go-client/core" - ticketing "github.com/merge-api/merge-go-client/ticketing" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" + ticketing "github.com/merge-api/merge-go-client/v2/ticketing" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // 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/5950052-common-model-and-field-scopes). -func (c *Client) DefaultScopesRetrieve(ctx context.Context) (*ticketing.CommonModelScopeApi, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ticketing/v1/default-scopes" +func (c *Client) DefaultScopesRetrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*ticketing.CommonModelScopeApi, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ticketing/v1/default-scopes" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ticketing.CommonModelScopeApi if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -51,21 +68,34 @@ func (c *Client) DefaultScopesRetrieve(ctx context.Context) (*ticketing.CommonMo } // Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/5950052-common-model-and-field-scopes). -func (c *Client) LinkedAccountScopesRetrieve(ctx context.Context) (*ticketing.CommonModelScopeApi, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ticketing/v1/linked-account-scopes" +func (c *Client) LinkedAccountScopesRetrieve( + ctx context.Context, + opts ...option.RequestOption, +) (*ticketing.CommonModelScopeApi, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ticketing/v1/linked-account-scopes" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ticketing.CommonModelScopeApi if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -74,22 +104,37 @@ func (c *Client) LinkedAccountScopesRetrieve(ctx context.Context) (*ticketing.Co } // 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/5950052-common-model-and-field-scopes) -func (c *Client) LinkedAccountScopesCreate(ctx context.Context, request *ticketing.LinkedAccountCommonModelScopeDeserializerRequest) (*ticketing.CommonModelScopeApi, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ticketing/v1/linked-account-scopes" +func (c *Client) LinkedAccountScopesCreate( + ctx context.Context, + request *ticketing.LinkedAccountCommonModelScopeDeserializerRequest, + opts ...option.RequestOption, +) (*ticketing.CommonModelScopeApi, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ticketing/v1/linked-account-scopes" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *ticketing.CommonModelScopeApi if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err diff --git a/ticketing/sync_status.go b/ticketing/sync_status.go index 1eb634b..39aeb7a 100644 --- a/ticketing/sync_status.go +++ b/ticketing/sync_status.go @@ -1,10 +1,78 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package ticketing +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" +) + type SyncStatusListRequest struct { // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` +} + +type PaginatedSyncStatusList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*SyncStatus `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedSyncStatusList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedSyncStatusList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedSyncStatusList) GetResults() []*SyncStatus { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedSyncStatusList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedSyncStatusList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedSyncStatusList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedSyncStatusList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedSyncStatusList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) } diff --git a/ticketing/syncstatus/client.go b/ticketing/syncstatus/client.go index 46fe6d6..ff38765 100644 --- a/ticketing/syncstatus/client.go +++ b/ticketing/syncstatus/client.go @@ -1,64 +1,92 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package syncstatus import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - ticketing "github.com/merge-api/merge-go-client/ticketing" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" + ticketing "github.com/merge-api/merge-go-client/v2/ticketing" http "net/http" - url "net/url" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } -// Get syncing status. Possible values: `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). -func (c *Client) List(ctx context.Context, request *ticketing.SyncStatusListRequest) (*ticketing.PaginatedSyncStatusList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL +// Get sync status for the current sync and the most recently finished sync. `last_sync_start` represents the most recent time any sync began. `last_sync_finished` represents the most recent time any sync completed. These timestamps may correspond to different sync instances which may result in a sync start time being later than a separate sync completed time. To ensure you are retrieving the latest available data reference the `last_sync_finished` timestamp where `last_sync_result` is `DONE`. Possible values for `status` and `last_sync_result` are `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses). +func (c *Client) List( + ctx context.Context, + request *ticketing.SyncStatusListRequest, + opts ...option.RequestOption, +) (*core.Page[*ticketing.SyncStatus], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ticketing/v1/sync-status" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } - endpointURL := baseURL + "/" + "ticketing/v1/sync-status" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) - queryParams := make(url.Values) - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *ticketing.PaginatedSyncStatusList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { - return nil, err + readPageResponse := func(response *ticketing.PaginatedSyncStatusList) *internal.PageResponse[*string, *ticketing.SyncStatus] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *ticketing.SyncStatus]{ + Next: next, + Results: results, + Done: next == zeroValue, + } } - return response, nil + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } diff --git a/ticketing/tags.go b/ticketing/tags.go index 4d10984..ee152d1 100644 --- a/ticketing/tags.go +++ b/ticketing/tags.go @@ -1,35 +1,237 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package ticketing import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type TagsListRequest struct { // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` } type TagsRetrieveRequest struct { // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` +} + +type PaginatedTagList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Tag `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedTagList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedTagList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedTagList) GetResults() []*Tag { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedTagList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedTagList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedTagList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedTagList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedTagList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +// # The Tag Object +// ### Description +// The `Tag` object is used to represent a tag or label for a ticket. +// +// ### Usage Example +// TODO +type Tag struct { + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The tag's name. + Name *string `json:"name,omitempty" url:"name,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (t *Tag) GetRemoteId() *string { + if t == nil { + return nil + } + return t.RemoteId +} + +func (t *Tag) GetCreatedAt() *time.Time { + if t == nil { + return nil + } + return t.CreatedAt +} + +func (t *Tag) GetModifiedAt() *time.Time { + if t == nil { + return nil + } + return t.ModifiedAt +} + +func (t *Tag) GetId() *string { + if t == nil { + return nil + } + return t.Id +} + +func (t *Tag) GetName() *string { + if t == nil { + return nil + } + return t.Name +} + +func (t *Tag) GetRemoteWasDeleted() *bool { + if t == nil { + return nil + } + return t.RemoteWasDeleted +} + +func (t *Tag) GetFieldMappings() map[string]interface{} { + if t == nil { + return nil + } + return t.FieldMappings +} + +func (t *Tag) GetRemoteData() []*RemoteData { + if t == nil { + return nil + } + return t.RemoteData +} + +func (t *Tag) GetExtraProperties() map[string]interface{} { + return t.extraProperties +} + +func (t *Tag) UnmarshalJSON(data []byte) error { + type embed Tag + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*t), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *t = Tag(unmarshaler.embed) + t.CreatedAt = unmarshaler.CreatedAt.TimePtr() + t.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *t) + if err != nil { + return err + } + t.extraProperties = extraProperties + t.rawJSON = json.RawMessage(data) + return nil +} + +func (t *Tag) MarshalJSON() ([]byte, error) { + type embed Tag + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*t), + CreatedAt: internal.NewOptionalDateTime(t.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(t.ModifiedAt), + } + return json.Marshal(marshaler) +} + +func (t *Tag) String() string { + if len(t.rawJSON) > 0 { + if value, err := internal.StringifyJSON(t.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(t); err == nil { + return value + } + return fmt.Sprintf("%#v", t) } diff --git a/ticketing/tags/client.go b/ticketing/tags/client.go index 9ae714d..b8433f6 100644 --- a/ticketing/tags/client.go +++ b/ticketing/tags/client.go @@ -1,117 +1,137 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package tags import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - ticketing "github.com/merge-api/merge-go-client/ticketing" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" + ticketing "github.com/merge-api/merge-go-client/v2/ticketing" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `Tag` objects. -func (c *Client) List(ctx context.Context, request *ticketing.TagsListRequest) (*ticketing.PaginatedTagList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ticketing/v1/tags" - - queryParams := make(url.Values) - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *ticketing.PaginatedTagList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *ticketing.TagsListRequest, + opts ...option.RequestOption, +) (*core.Page[*ticketing.Tag], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ticketing/v1/tags" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *ticketing.PaginatedTagList) *internal.PageResponse[*string, *ticketing.Tag] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *ticketing.Tag]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Returns a `Tag` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *ticketing.TagsRetrieveRequest) (*ticketing.Tag, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"ticketing/v1/tags/%v", id) - - queryParams := make(url.Values) - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *ticketing.TagsRetrieveRequest, + opts ...option.RequestOption, +) (*ticketing.Tag, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/ticketing/v1/tags/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ticketing.Tag if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/ticketing/teams.go b/ticketing/teams.go index e8371da..2745ca6 100644 --- a/ticketing/teams.go +++ b/ticketing/teams.go @@ -1,35 +1,102 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package ticketing import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type TeamsListRequest struct { // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` } type TeamsRetrieveRequest struct { // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` +} + +type PaginatedTeamList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Team `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedTeamList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedTeamList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedTeamList) GetResults() []*Team { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedTeamList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedTeamList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedTeamList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedTeamList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedTeamList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) } diff --git a/ticketing/teams/client.go b/ticketing/teams/client.go index 7d65b4d..063fc35 100644 --- a/ticketing/teams/client.go +++ b/ticketing/teams/client.go @@ -1,117 +1,137 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package teams import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - ticketing "github.com/merge-api/merge-go-client/ticketing" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" + ticketing "github.com/merge-api/merge-go-client/v2/ticketing" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `Team` objects. -func (c *Client) List(ctx context.Context, request *ticketing.TeamsListRequest) (*ticketing.PaginatedTeamList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ticketing/v1/teams" - - queryParams := make(url.Values) - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *ticketing.PaginatedTeamList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *ticketing.TeamsListRequest, + opts ...option.RequestOption, +) (*core.Page[*ticketing.Team], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ticketing/v1/teams" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *ticketing.PaginatedTeamList) *internal.PageResponse[*string, *ticketing.Team] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *ticketing.Team]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Returns a `Team` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *ticketing.TeamsRetrieveRequest) (*ticketing.Team, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"ticketing/v1/teams/%v", id) - - queryParams := make(url.Values) - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *ticketing.TeamsRetrieveRequest, + opts ...option.RequestOption, +) (*ticketing.Team, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/ticketing/v1/teams/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ticketing.Team if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/ticketing/tickets.go b/ticketing/tickets.go index d04144d..da27dae 100644 --- a/ticketing/tickets.go +++ b/ticketing/tickets.go @@ -1,908 +1,182 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package ticketing import ( + json "encoding/json" fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) type TicketEndpointRequest struct { // Whether to include debug fields (such as log file links) in the response. - IsDebugMode *bool `json:"-"` + IsDebugMode *bool `json:"-" url:"is_debug_mode,omitempty"` // Whether or not third-party updates should be run asynchronously. - RunAsync *bool `json:"-"` - Model *TicketRequest `json:"model,omitempty"` + RunAsync *bool `json:"-" url:"run_async,omitempty"` + Model *TicketRequest `json:"model,omitempty" url:"-"` } type TicketsListRequest struct { // If provided, will only return tickets for this account. - AccountId *string `json:"-"` + AccountId *string `json:"-" url:"account_id,omitempty"` // If provided, will only return tickets assigned to the assignee_ids; multiple assignee_ids can be separated by commas. - AssigneeIds *string `json:"-"` + AssigneeIds *string `json:"-" url:"assignee_ids,omitempty"` // If provided, will only return tickets assigned to the collection_ids; multiple collection_ids can be separated by commas. - CollectionIds *string `json:"-"` + CollectionIds *string `json:"-" url:"collection_ids,omitempty"` // If provided, will only return tickets completed after this datetime. - CompletedAfter *time.Time `json:"-"` + CompletedAfter *time.Time `json:"-" url:"completed_after,omitempty"` // If provided, will only return tickets completed before this datetime. - CompletedBefore *time.Time `json:"-"` + CompletedBefore *time.Time `json:"-" url:"completed_before,omitempty"` // If provided, will only return tickets for this contact. - ContactId *string `json:"-"` + ContactId *string `json:"-" url:"contact_id,omitempty"` // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` + // If provided, will only return tickets created by this creator_id. + CreatorId *string `json:"-" url:"creator_id,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // If provided, will only return tickets due after this datetime. - DueAfter *time.Time `json:"-"` + DueAfter *time.Time `json:"-" url:"due_after,omitempty"` // If provided, will only return tickets due before this datetime. - DueBefore *time.Time `json:"-"` + DueBefore *time.Time `json:"-" url:"due_before,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *TicketsListRequestExpand `json:"-"` + Expand []*TicketsListRequestExpandItem `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - IncludeRemoteFields *bool `json:"-"` + IncludeRemoteFields *bool `json:"-" url:"include_remote_fields,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // If provided, will only return sub tickets of the parent_ticket_id. - ParentTicketId *string `json:"-"` + ParentTicketId *string `json:"-" url:"parent_ticket_id,omitempty"` // If provided, will only return tickets of this priority. // - // - `URGENT` - URGENT - // - `HIGH` - HIGH - // - `NORMAL` - NORMAL - // - `LOW` - LOW - Priority *TicketsListRequestPriority `json:"-"` + // * `URGENT` - URGENT + // * `HIGH` - HIGH + // * `NORMAL` - NORMAL + // * `LOW` - LOW + Priority *TicketsListRequestPriority `json:"-" url:"priority,omitempty"` // If provided, will only return tickets created in the third party platform after this datetime. - RemoteCreatedAfter *time.Time `json:"-"` + RemoteCreatedAfter *time.Time `json:"-" url:"remote_created_after,omitempty"` // If provided, will only return tickets created in the third party platform before this datetime. - RemoteCreatedBefore *time.Time `json:"-"` + RemoteCreatedBefore *time.Time `json:"-" url:"remote_created_before,omitempty"` // Deprecated. Use show_enum_origins. - RemoteFields *TicketsListRequestRemoteFields `json:"-"` + RemoteFields *TicketsListRequestRemoteFields `json:"-" url:"remote_fields,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` // If provided, will only return tickets updated in the third party platform after this datetime. - RemoteUpdatedAfter *time.Time `json:"-"` + RemoteUpdatedAfter *time.Time `json:"-" url:"remote_updated_after,omitempty"` // If provided, will only return tickets updated in the third party platform before this datetime. - RemoteUpdatedBefore *time.Time `json:"-"` + RemoteUpdatedBefore *time.Time `json:"-" url:"remote_updated_before,omitempty"` // 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) - ShowEnumOrigins *TicketsListRequestShowEnumOrigins `json:"-"` + ShowEnumOrigins *TicketsListRequestShowEnumOrigins `json:"-" url:"show_enum_origins,omitempty"` // If provided, will only return tickets of this status. - Status *string `json:"-"` + Status *string `json:"-" url:"status,omitempty"` // If provided, will only return tickets matching the tags; multiple tags can be separated by commas. - Tags *string `json:"-"` + Tags *string `json:"-" url:"tags,omitempty"` // If provided, will only return tickets of this type. - TicketType *string `json:"-"` + TicketType *string `json:"-" url:"ticket_type,omitempty"` // If provided, will only return tickets where the URL matches or contains the substring - TicketUrl *string `json:"-"` + TicketUrl *string `json:"-" url:"ticket_url,omitempty"` +} + +type TicketsMetaPostRetrieveRequest struct { + // If provided, will only return tickets for this collection. + CollectionId *string `json:"-" url:"collection_id,omitempty"` + // If provided, will only return tickets for this ticket type. + TicketType *string `json:"-" url:"ticket_type,omitempty"` } type PatchedTicketEndpointRequest struct { // Whether to include debug fields (such as log file links) in the response. - IsDebugMode *bool `json:"-"` + IsDebugMode *bool `json:"-" url:"is_debug_mode,omitempty"` // Whether or not third-party updates should be run asynchronously. - RunAsync *bool `json:"-"` - Model *PatchedTicketRequest `json:"model,omitempty"` + RunAsync *bool `json:"-" url:"run_async,omitempty"` + Model *PatchedTicketRequest `json:"model,omitempty" url:"-"` } type TicketsRemoteFieldClassesListRequest struct { // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // If provided, will only return remote field classes with the `ids` in this list - Ids *string `json:"-"` + Ids *string `json:"-" url:"ids,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, will only return remote field classes with this is_common_model_field value - IsCommonModelField *bool `json:"-"` + IsCommonModelField *bool `json:"-" url:"is_common_model_field,omitempty"` + // If provided, will only return remote fields classes with this is_custom value + IsCustom *bool `json:"-" url:"is_custom,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` } type TicketsRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *TicketsRetrieveRequestExpand `json:"-"` + Expand []*TicketsRetrieveRequestExpandItem `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format. - IncludeRemoteFields *bool `json:"-"` + IncludeRemoteFields *bool `json:"-" url:"include_remote_fields,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // Deprecated. Use show_enum_origins. - RemoteFields *TicketsRetrieveRequestRemoteFields `json:"-"` + RemoteFields *TicketsRetrieveRequestRemoteFields `json:"-" url:"remote_fields,omitempty"` // 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) - ShowEnumOrigins *TicketsRetrieveRequestShowEnumOrigins `json:"-"` + ShowEnumOrigins *TicketsRetrieveRequestShowEnumOrigins `json:"-" url:"show_enum_origins,omitempty"` } -type TicketsListRequestExpand string +type TicketsListRequestExpandItem string const ( - TicketsListRequestExpandAccount TicketsListRequestExpand = "account" - TicketsListRequestExpandAccountContact TicketsListRequestExpand = "account,contact" - TicketsListRequestExpandAccountContactCreator TicketsListRequestExpand = "account,contact,creator" - TicketsListRequestExpandAccountContactCreatorParentTicket TicketsListRequestExpand = "account,contact,creator,parent_ticket" - TicketsListRequestExpandAccountContactParentTicket TicketsListRequestExpand = "account,contact,parent_ticket" - TicketsListRequestExpandAccountCreator TicketsListRequestExpand = "account,creator" - TicketsListRequestExpandAccountCreatorParentTicket TicketsListRequestExpand = "account,creator,parent_ticket" - TicketsListRequestExpandAccountParentTicket TicketsListRequestExpand = "account,parent_ticket" - TicketsListRequestExpandAssignedTeams TicketsListRequestExpand = "assigned_teams" - TicketsListRequestExpandAssignedTeamsAccount TicketsListRequestExpand = "assigned_teams,account" - TicketsListRequestExpandAssignedTeamsAccountContact TicketsListRequestExpand = "assigned_teams,account,contact" - TicketsListRequestExpandAssignedTeamsAccountContactCreator TicketsListRequestExpand = "assigned_teams,account,contact,creator" - TicketsListRequestExpandAssignedTeamsAccountContactCreatorParentTicket TicketsListRequestExpand = "assigned_teams,account,contact,creator,parent_ticket" - TicketsListRequestExpandAssignedTeamsAccountContactParentTicket TicketsListRequestExpand = "assigned_teams,account,contact,parent_ticket" - TicketsListRequestExpandAssignedTeamsAccountCreator TicketsListRequestExpand = "assigned_teams,account,creator" - TicketsListRequestExpandAssignedTeamsAccountCreatorParentTicket TicketsListRequestExpand = "assigned_teams,account,creator,parent_ticket" - TicketsListRequestExpandAssignedTeamsAccountParentTicket TicketsListRequestExpand = "assigned_teams,account,parent_ticket" - TicketsListRequestExpandAssignedTeamsContact TicketsListRequestExpand = "assigned_teams,contact" - TicketsListRequestExpandAssignedTeamsContactCreator TicketsListRequestExpand = "assigned_teams,contact,creator" - TicketsListRequestExpandAssignedTeamsContactCreatorParentTicket TicketsListRequestExpand = "assigned_teams,contact,creator,parent_ticket" - TicketsListRequestExpandAssignedTeamsContactParentTicket TicketsListRequestExpand = "assigned_teams,contact,parent_ticket" - TicketsListRequestExpandAssignedTeamsCreator TicketsListRequestExpand = "assigned_teams,creator" - TicketsListRequestExpandAssignedTeamsCreatorParentTicket TicketsListRequestExpand = "assigned_teams,creator,parent_ticket" - TicketsListRequestExpandAssignedTeamsParentTicket TicketsListRequestExpand = "assigned_teams,parent_ticket" - TicketsListRequestExpandAssignees TicketsListRequestExpand = "assignees" - TicketsListRequestExpandAssigneesAccount TicketsListRequestExpand = "assignees,account" - TicketsListRequestExpandAssigneesAccountContact TicketsListRequestExpand = "assignees,account,contact" - TicketsListRequestExpandAssigneesAccountContactCreator TicketsListRequestExpand = "assignees,account,contact,creator" - TicketsListRequestExpandAssigneesAccountContactCreatorParentTicket TicketsListRequestExpand = "assignees,account,contact,creator,parent_ticket" - TicketsListRequestExpandAssigneesAccountContactParentTicket TicketsListRequestExpand = "assignees,account,contact,parent_ticket" - TicketsListRequestExpandAssigneesAccountCreator TicketsListRequestExpand = "assignees,account,creator" - TicketsListRequestExpandAssigneesAccountCreatorParentTicket TicketsListRequestExpand = "assignees,account,creator,parent_ticket" - TicketsListRequestExpandAssigneesAccountParentTicket TicketsListRequestExpand = "assignees,account,parent_ticket" - TicketsListRequestExpandAssigneesAssignedTeams TicketsListRequestExpand = "assignees,assigned_teams" - TicketsListRequestExpandAssigneesAssignedTeamsAccount TicketsListRequestExpand = "assignees,assigned_teams,account" - TicketsListRequestExpandAssigneesAssignedTeamsAccountContact TicketsListRequestExpand = "assignees,assigned_teams,account,contact" - TicketsListRequestExpandAssigneesAssignedTeamsAccountContactCreator TicketsListRequestExpand = "assignees,assigned_teams,account,contact,creator" - TicketsListRequestExpandAssigneesAssignedTeamsAccountContactCreatorParentTicket TicketsListRequestExpand = "assignees,assigned_teams,account,contact,creator,parent_ticket" - TicketsListRequestExpandAssigneesAssignedTeamsAccountContactParentTicket TicketsListRequestExpand = "assignees,assigned_teams,account,contact,parent_ticket" - TicketsListRequestExpandAssigneesAssignedTeamsAccountCreator TicketsListRequestExpand = "assignees,assigned_teams,account,creator" - TicketsListRequestExpandAssigneesAssignedTeamsAccountCreatorParentTicket TicketsListRequestExpand = "assignees,assigned_teams,account,creator,parent_ticket" - TicketsListRequestExpandAssigneesAssignedTeamsAccountParentTicket TicketsListRequestExpand = "assignees,assigned_teams,account,parent_ticket" - TicketsListRequestExpandAssigneesAssignedTeamsContact TicketsListRequestExpand = "assignees,assigned_teams,contact" - TicketsListRequestExpandAssigneesAssignedTeamsContactCreator TicketsListRequestExpand = "assignees,assigned_teams,contact,creator" - TicketsListRequestExpandAssigneesAssignedTeamsContactCreatorParentTicket TicketsListRequestExpand = "assignees,assigned_teams,contact,creator,parent_ticket" - TicketsListRequestExpandAssigneesAssignedTeamsContactParentTicket TicketsListRequestExpand = "assignees,assigned_teams,contact,parent_ticket" - TicketsListRequestExpandAssigneesAssignedTeamsCreator TicketsListRequestExpand = "assignees,assigned_teams,creator" - TicketsListRequestExpandAssigneesAssignedTeamsCreatorParentTicket TicketsListRequestExpand = "assignees,assigned_teams,creator,parent_ticket" - TicketsListRequestExpandAssigneesAssignedTeamsParentTicket TicketsListRequestExpand = "assignees,assigned_teams,parent_ticket" - TicketsListRequestExpandAssigneesCollections TicketsListRequestExpand = "assignees,collections" - TicketsListRequestExpandAssigneesCollectionsAccount TicketsListRequestExpand = "assignees,collections,account" - TicketsListRequestExpandAssigneesCollectionsAccountContact TicketsListRequestExpand = "assignees,collections,account,contact" - TicketsListRequestExpandAssigneesCollectionsAccountContactCreator TicketsListRequestExpand = "assignees,collections,account,contact,creator" - TicketsListRequestExpandAssigneesCollectionsAccountContactCreatorParentTicket TicketsListRequestExpand = "assignees,collections,account,contact,creator,parent_ticket" - TicketsListRequestExpandAssigneesCollectionsAccountContactParentTicket TicketsListRequestExpand = "assignees,collections,account,contact,parent_ticket" - TicketsListRequestExpandAssigneesCollectionsAccountCreator TicketsListRequestExpand = "assignees,collections,account,creator" - TicketsListRequestExpandAssigneesCollectionsAccountCreatorParentTicket TicketsListRequestExpand = "assignees,collections,account,creator,parent_ticket" - TicketsListRequestExpandAssigneesCollectionsAccountParentTicket TicketsListRequestExpand = "assignees,collections,account,parent_ticket" - TicketsListRequestExpandAssigneesCollectionsAssignedTeams TicketsListRequestExpand = "assignees,collections,assigned_teams" - TicketsListRequestExpandAssigneesCollectionsAssignedTeamsAccount TicketsListRequestExpand = "assignees,collections,assigned_teams,account" - TicketsListRequestExpandAssigneesCollectionsAssignedTeamsAccountContact TicketsListRequestExpand = "assignees,collections,assigned_teams,account,contact" - TicketsListRequestExpandAssigneesCollectionsAssignedTeamsAccountContactCreator TicketsListRequestExpand = "assignees,collections,assigned_teams,account,contact,creator" - TicketsListRequestExpandAssigneesCollectionsAssignedTeamsAccountContactCreatorParentTicket TicketsListRequestExpand = "assignees,collections,assigned_teams,account,contact,creator,parent_ticket" - TicketsListRequestExpandAssigneesCollectionsAssignedTeamsAccountContactParentTicket TicketsListRequestExpand = "assignees,collections,assigned_teams,account,contact,parent_ticket" - TicketsListRequestExpandAssigneesCollectionsAssignedTeamsAccountCreator TicketsListRequestExpand = "assignees,collections,assigned_teams,account,creator" - TicketsListRequestExpandAssigneesCollectionsAssignedTeamsAccountCreatorParentTicket TicketsListRequestExpand = "assignees,collections,assigned_teams,account,creator,parent_ticket" - TicketsListRequestExpandAssigneesCollectionsAssignedTeamsAccountParentTicket TicketsListRequestExpand = "assignees,collections,assigned_teams,account,parent_ticket" - TicketsListRequestExpandAssigneesCollectionsAssignedTeamsContact TicketsListRequestExpand = "assignees,collections,assigned_teams,contact" - TicketsListRequestExpandAssigneesCollectionsAssignedTeamsContactCreator TicketsListRequestExpand = "assignees,collections,assigned_teams,contact,creator" - TicketsListRequestExpandAssigneesCollectionsAssignedTeamsContactCreatorParentTicket TicketsListRequestExpand = "assignees,collections,assigned_teams,contact,creator,parent_ticket" - TicketsListRequestExpandAssigneesCollectionsAssignedTeamsContactParentTicket TicketsListRequestExpand = "assignees,collections,assigned_teams,contact,parent_ticket" - TicketsListRequestExpandAssigneesCollectionsAssignedTeamsCreator TicketsListRequestExpand = "assignees,collections,assigned_teams,creator" - TicketsListRequestExpandAssigneesCollectionsAssignedTeamsCreatorParentTicket TicketsListRequestExpand = "assignees,collections,assigned_teams,creator,parent_ticket" - TicketsListRequestExpandAssigneesCollectionsAssignedTeamsParentTicket TicketsListRequestExpand = "assignees,collections,assigned_teams,parent_ticket" - TicketsListRequestExpandAssigneesCollectionsContact TicketsListRequestExpand = "assignees,collections,contact" - TicketsListRequestExpandAssigneesCollectionsContactCreator TicketsListRequestExpand = "assignees,collections,contact,creator" - TicketsListRequestExpandAssigneesCollectionsContactCreatorParentTicket TicketsListRequestExpand = "assignees,collections,contact,creator,parent_ticket" - TicketsListRequestExpandAssigneesCollectionsContactParentTicket TicketsListRequestExpand = "assignees,collections,contact,parent_ticket" - TicketsListRequestExpandAssigneesCollectionsCreator TicketsListRequestExpand = "assignees,collections,creator" - TicketsListRequestExpandAssigneesCollectionsCreatorParentTicket TicketsListRequestExpand = "assignees,collections,creator,parent_ticket" - TicketsListRequestExpandAssigneesCollectionsParentTicket TicketsListRequestExpand = "assignees,collections,parent_ticket" - TicketsListRequestExpandAssigneesContact TicketsListRequestExpand = "assignees,contact" - TicketsListRequestExpandAssigneesContactCreator TicketsListRequestExpand = "assignees,contact,creator" - TicketsListRequestExpandAssigneesContactCreatorParentTicket TicketsListRequestExpand = "assignees,contact,creator,parent_ticket" - TicketsListRequestExpandAssigneesContactParentTicket TicketsListRequestExpand = "assignees,contact,parent_ticket" - TicketsListRequestExpandAssigneesCreator TicketsListRequestExpand = "assignees,creator" - TicketsListRequestExpandAssigneesCreatorParentTicket TicketsListRequestExpand = "assignees,creator,parent_ticket" - TicketsListRequestExpandAssigneesParentTicket TicketsListRequestExpand = "assignees,parent_ticket" - TicketsListRequestExpandAttachments TicketsListRequestExpand = "attachments" - TicketsListRequestExpandAttachmentsAccount TicketsListRequestExpand = "attachments,account" - TicketsListRequestExpandAttachmentsAccountContact TicketsListRequestExpand = "attachments,account,contact" - TicketsListRequestExpandAttachmentsAccountContactCreator TicketsListRequestExpand = "attachments,account,contact,creator" - TicketsListRequestExpandAttachmentsAccountContactCreatorParentTicket TicketsListRequestExpand = "attachments,account,contact,creator,parent_ticket" - TicketsListRequestExpandAttachmentsAccountContactParentTicket TicketsListRequestExpand = "attachments,account,contact,parent_ticket" - TicketsListRequestExpandAttachmentsAccountCreator TicketsListRequestExpand = "attachments,account,creator" - TicketsListRequestExpandAttachmentsAccountCreatorParentTicket TicketsListRequestExpand = "attachments,account,creator,parent_ticket" - TicketsListRequestExpandAttachmentsAccountParentTicket TicketsListRequestExpand = "attachments,account,parent_ticket" - TicketsListRequestExpandAttachmentsAssignedTeams TicketsListRequestExpand = "attachments,assigned_teams" - TicketsListRequestExpandAttachmentsAssignedTeamsAccount TicketsListRequestExpand = "attachments,assigned_teams,account" - TicketsListRequestExpandAttachmentsAssignedTeamsAccountContact TicketsListRequestExpand = "attachments,assigned_teams,account,contact" - TicketsListRequestExpandAttachmentsAssignedTeamsAccountContactCreator TicketsListRequestExpand = "attachments,assigned_teams,account,contact,creator" - TicketsListRequestExpandAttachmentsAssignedTeamsAccountContactCreatorParentTicket TicketsListRequestExpand = "attachments,assigned_teams,account,contact,creator,parent_ticket" - TicketsListRequestExpandAttachmentsAssignedTeamsAccountContactParentTicket TicketsListRequestExpand = "attachments,assigned_teams,account,contact,parent_ticket" - TicketsListRequestExpandAttachmentsAssignedTeamsAccountCreator TicketsListRequestExpand = "attachments,assigned_teams,account,creator" - TicketsListRequestExpandAttachmentsAssignedTeamsAccountCreatorParentTicket TicketsListRequestExpand = "attachments,assigned_teams,account,creator,parent_ticket" - TicketsListRequestExpandAttachmentsAssignedTeamsAccountParentTicket TicketsListRequestExpand = "attachments,assigned_teams,account,parent_ticket" - TicketsListRequestExpandAttachmentsAssignedTeamsContact TicketsListRequestExpand = "attachments,assigned_teams,contact" - TicketsListRequestExpandAttachmentsAssignedTeamsContactCreator TicketsListRequestExpand = "attachments,assigned_teams,contact,creator" - TicketsListRequestExpandAttachmentsAssignedTeamsContactCreatorParentTicket TicketsListRequestExpand = "attachments,assigned_teams,contact,creator,parent_ticket" - TicketsListRequestExpandAttachmentsAssignedTeamsContactParentTicket TicketsListRequestExpand = "attachments,assigned_teams,contact,parent_ticket" - TicketsListRequestExpandAttachmentsAssignedTeamsCreator TicketsListRequestExpand = "attachments,assigned_teams,creator" - TicketsListRequestExpandAttachmentsAssignedTeamsCreatorParentTicket TicketsListRequestExpand = "attachments,assigned_teams,creator,parent_ticket" - TicketsListRequestExpandAttachmentsAssignedTeamsParentTicket TicketsListRequestExpand = "attachments,assigned_teams,parent_ticket" - TicketsListRequestExpandAttachmentsAssignees TicketsListRequestExpand = "attachments,assignees" - TicketsListRequestExpandAttachmentsAssigneesAccount TicketsListRequestExpand = "attachments,assignees,account" - TicketsListRequestExpandAttachmentsAssigneesAccountContact TicketsListRequestExpand = "attachments,assignees,account,contact" - TicketsListRequestExpandAttachmentsAssigneesAccountContactCreator TicketsListRequestExpand = "attachments,assignees,account,contact,creator" - TicketsListRequestExpandAttachmentsAssigneesAccountContactCreatorParentTicket TicketsListRequestExpand = "attachments,assignees,account,contact,creator,parent_ticket" - TicketsListRequestExpandAttachmentsAssigneesAccountContactParentTicket TicketsListRequestExpand = "attachments,assignees,account,contact,parent_ticket" - TicketsListRequestExpandAttachmentsAssigneesAccountCreator TicketsListRequestExpand = "attachments,assignees,account,creator" - TicketsListRequestExpandAttachmentsAssigneesAccountCreatorParentTicket TicketsListRequestExpand = "attachments,assignees,account,creator,parent_ticket" - TicketsListRequestExpandAttachmentsAssigneesAccountParentTicket TicketsListRequestExpand = "attachments,assignees,account,parent_ticket" - TicketsListRequestExpandAttachmentsAssigneesAssignedTeams TicketsListRequestExpand = "attachments,assignees,assigned_teams" - TicketsListRequestExpandAttachmentsAssigneesAssignedTeamsAccount TicketsListRequestExpand = "attachments,assignees,assigned_teams,account" - TicketsListRequestExpandAttachmentsAssigneesAssignedTeamsAccountContact TicketsListRequestExpand = "attachments,assignees,assigned_teams,account,contact" - TicketsListRequestExpandAttachmentsAssigneesAssignedTeamsAccountContactCreator TicketsListRequestExpand = "attachments,assignees,assigned_teams,account,contact,creator" - TicketsListRequestExpandAttachmentsAssigneesAssignedTeamsAccountContactCreatorParentTicket TicketsListRequestExpand = "attachments,assignees,assigned_teams,account,contact,creator,parent_ticket" - TicketsListRequestExpandAttachmentsAssigneesAssignedTeamsAccountContactParentTicket TicketsListRequestExpand = "attachments,assignees,assigned_teams,account,contact,parent_ticket" - TicketsListRequestExpandAttachmentsAssigneesAssignedTeamsAccountCreator TicketsListRequestExpand = "attachments,assignees,assigned_teams,account,creator" - TicketsListRequestExpandAttachmentsAssigneesAssignedTeamsAccountCreatorParentTicket TicketsListRequestExpand = "attachments,assignees,assigned_teams,account,creator,parent_ticket" - TicketsListRequestExpandAttachmentsAssigneesAssignedTeamsAccountParentTicket TicketsListRequestExpand = "attachments,assignees,assigned_teams,account,parent_ticket" - TicketsListRequestExpandAttachmentsAssigneesAssignedTeamsContact TicketsListRequestExpand = "attachments,assignees,assigned_teams,contact" - TicketsListRequestExpandAttachmentsAssigneesAssignedTeamsContactCreator TicketsListRequestExpand = "attachments,assignees,assigned_teams,contact,creator" - TicketsListRequestExpandAttachmentsAssigneesAssignedTeamsContactCreatorParentTicket TicketsListRequestExpand = "attachments,assignees,assigned_teams,contact,creator,parent_ticket" - TicketsListRequestExpandAttachmentsAssigneesAssignedTeamsContactParentTicket TicketsListRequestExpand = "attachments,assignees,assigned_teams,contact,parent_ticket" - TicketsListRequestExpandAttachmentsAssigneesAssignedTeamsCreator TicketsListRequestExpand = "attachments,assignees,assigned_teams,creator" - TicketsListRequestExpandAttachmentsAssigneesAssignedTeamsCreatorParentTicket TicketsListRequestExpand = "attachments,assignees,assigned_teams,creator,parent_ticket" - TicketsListRequestExpandAttachmentsAssigneesAssignedTeamsParentTicket TicketsListRequestExpand = "attachments,assignees,assigned_teams,parent_ticket" - TicketsListRequestExpandAttachmentsAssigneesCollections TicketsListRequestExpand = "attachments,assignees,collections" - TicketsListRequestExpandAttachmentsAssigneesCollectionsAccount TicketsListRequestExpand = "attachments,assignees,collections,account" - TicketsListRequestExpandAttachmentsAssigneesCollectionsAccountContact TicketsListRequestExpand = "attachments,assignees,collections,account,contact" - TicketsListRequestExpandAttachmentsAssigneesCollectionsAccountContactCreator TicketsListRequestExpand = "attachments,assignees,collections,account,contact,creator" - TicketsListRequestExpandAttachmentsAssigneesCollectionsAccountContactCreatorParentTicket TicketsListRequestExpand = "attachments,assignees,collections,account,contact,creator,parent_ticket" - TicketsListRequestExpandAttachmentsAssigneesCollectionsAccountContactParentTicket TicketsListRequestExpand = "attachments,assignees,collections,account,contact,parent_ticket" - TicketsListRequestExpandAttachmentsAssigneesCollectionsAccountCreator TicketsListRequestExpand = "attachments,assignees,collections,account,creator" - TicketsListRequestExpandAttachmentsAssigneesCollectionsAccountCreatorParentTicket TicketsListRequestExpand = "attachments,assignees,collections,account,creator,parent_ticket" - TicketsListRequestExpandAttachmentsAssigneesCollectionsAccountParentTicket TicketsListRequestExpand = "attachments,assignees,collections,account,parent_ticket" - TicketsListRequestExpandAttachmentsAssigneesCollectionsAssignedTeams TicketsListRequestExpand = "attachments,assignees,collections,assigned_teams" - TicketsListRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsAccount TicketsListRequestExpand = "attachments,assignees,collections,assigned_teams,account" - TicketsListRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsAccountContact TicketsListRequestExpand = "attachments,assignees,collections,assigned_teams,account,contact" - TicketsListRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsAccountContactCreator TicketsListRequestExpand = "attachments,assignees,collections,assigned_teams,account,contact,creator" - TicketsListRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsAccountContactCreatorParentTicket TicketsListRequestExpand = "attachments,assignees,collections,assigned_teams,account,contact,creator,parent_ticket" - TicketsListRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsAccountContactParentTicket TicketsListRequestExpand = "attachments,assignees,collections,assigned_teams,account,contact,parent_ticket" - TicketsListRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsAccountCreator TicketsListRequestExpand = "attachments,assignees,collections,assigned_teams,account,creator" - TicketsListRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsAccountCreatorParentTicket TicketsListRequestExpand = "attachments,assignees,collections,assigned_teams,account,creator,parent_ticket" - TicketsListRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsAccountParentTicket TicketsListRequestExpand = "attachments,assignees,collections,assigned_teams,account,parent_ticket" - TicketsListRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsContact TicketsListRequestExpand = "attachments,assignees,collections,assigned_teams,contact" - TicketsListRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsContactCreator TicketsListRequestExpand = "attachments,assignees,collections,assigned_teams,contact,creator" - TicketsListRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsContactCreatorParentTicket TicketsListRequestExpand = "attachments,assignees,collections,assigned_teams,contact,creator,parent_ticket" - TicketsListRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsContactParentTicket TicketsListRequestExpand = "attachments,assignees,collections,assigned_teams,contact,parent_ticket" - TicketsListRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsCreator TicketsListRequestExpand = "attachments,assignees,collections,assigned_teams,creator" - TicketsListRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsCreatorParentTicket TicketsListRequestExpand = "attachments,assignees,collections,assigned_teams,creator,parent_ticket" - TicketsListRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsParentTicket TicketsListRequestExpand = "attachments,assignees,collections,assigned_teams,parent_ticket" - TicketsListRequestExpandAttachmentsAssigneesCollectionsContact TicketsListRequestExpand = "attachments,assignees,collections,contact" - TicketsListRequestExpandAttachmentsAssigneesCollectionsContactCreator TicketsListRequestExpand = "attachments,assignees,collections,contact,creator" - TicketsListRequestExpandAttachmentsAssigneesCollectionsContactCreatorParentTicket TicketsListRequestExpand = "attachments,assignees,collections,contact,creator,parent_ticket" - TicketsListRequestExpandAttachmentsAssigneesCollectionsContactParentTicket TicketsListRequestExpand = "attachments,assignees,collections,contact,parent_ticket" - TicketsListRequestExpandAttachmentsAssigneesCollectionsCreator TicketsListRequestExpand = "attachments,assignees,collections,creator" - TicketsListRequestExpandAttachmentsAssigneesCollectionsCreatorParentTicket TicketsListRequestExpand = "attachments,assignees,collections,creator,parent_ticket" - TicketsListRequestExpandAttachmentsAssigneesCollectionsParentTicket TicketsListRequestExpand = "attachments,assignees,collections,parent_ticket" - TicketsListRequestExpandAttachmentsAssigneesContact TicketsListRequestExpand = "attachments,assignees,contact" - TicketsListRequestExpandAttachmentsAssigneesContactCreator TicketsListRequestExpand = "attachments,assignees,contact,creator" - TicketsListRequestExpandAttachmentsAssigneesContactCreatorParentTicket TicketsListRequestExpand = "attachments,assignees,contact,creator,parent_ticket" - TicketsListRequestExpandAttachmentsAssigneesContactParentTicket TicketsListRequestExpand = "attachments,assignees,contact,parent_ticket" - TicketsListRequestExpandAttachmentsAssigneesCreator TicketsListRequestExpand = "attachments,assignees,creator" - TicketsListRequestExpandAttachmentsAssigneesCreatorParentTicket TicketsListRequestExpand = "attachments,assignees,creator,parent_ticket" - TicketsListRequestExpandAttachmentsAssigneesParentTicket TicketsListRequestExpand = "attachments,assignees,parent_ticket" - TicketsListRequestExpandAttachmentsCollections TicketsListRequestExpand = "attachments,collections" - TicketsListRequestExpandAttachmentsCollectionsAccount TicketsListRequestExpand = "attachments,collections,account" - TicketsListRequestExpandAttachmentsCollectionsAccountContact TicketsListRequestExpand = "attachments,collections,account,contact" - TicketsListRequestExpandAttachmentsCollectionsAccountContactCreator TicketsListRequestExpand = "attachments,collections,account,contact,creator" - TicketsListRequestExpandAttachmentsCollectionsAccountContactCreatorParentTicket TicketsListRequestExpand = "attachments,collections,account,contact,creator,parent_ticket" - TicketsListRequestExpandAttachmentsCollectionsAccountContactParentTicket TicketsListRequestExpand = "attachments,collections,account,contact,parent_ticket" - TicketsListRequestExpandAttachmentsCollectionsAccountCreator TicketsListRequestExpand = "attachments,collections,account,creator" - TicketsListRequestExpandAttachmentsCollectionsAccountCreatorParentTicket TicketsListRequestExpand = "attachments,collections,account,creator,parent_ticket" - TicketsListRequestExpandAttachmentsCollectionsAccountParentTicket TicketsListRequestExpand = "attachments,collections,account,parent_ticket" - TicketsListRequestExpandAttachmentsCollectionsAssignedTeams TicketsListRequestExpand = "attachments,collections,assigned_teams" - TicketsListRequestExpandAttachmentsCollectionsAssignedTeamsAccount TicketsListRequestExpand = "attachments,collections,assigned_teams,account" - TicketsListRequestExpandAttachmentsCollectionsAssignedTeamsAccountContact TicketsListRequestExpand = "attachments,collections,assigned_teams,account,contact" - TicketsListRequestExpandAttachmentsCollectionsAssignedTeamsAccountContactCreator TicketsListRequestExpand = "attachments,collections,assigned_teams,account,contact,creator" - TicketsListRequestExpandAttachmentsCollectionsAssignedTeamsAccountContactCreatorParentTicket TicketsListRequestExpand = "attachments,collections,assigned_teams,account,contact,creator,parent_ticket" - TicketsListRequestExpandAttachmentsCollectionsAssignedTeamsAccountContactParentTicket TicketsListRequestExpand = "attachments,collections,assigned_teams,account,contact,parent_ticket" - TicketsListRequestExpandAttachmentsCollectionsAssignedTeamsAccountCreator TicketsListRequestExpand = "attachments,collections,assigned_teams,account,creator" - TicketsListRequestExpandAttachmentsCollectionsAssignedTeamsAccountCreatorParentTicket TicketsListRequestExpand = "attachments,collections,assigned_teams,account,creator,parent_ticket" - TicketsListRequestExpandAttachmentsCollectionsAssignedTeamsAccountParentTicket TicketsListRequestExpand = "attachments,collections,assigned_teams,account,parent_ticket" - TicketsListRequestExpandAttachmentsCollectionsAssignedTeamsContact TicketsListRequestExpand = "attachments,collections,assigned_teams,contact" - TicketsListRequestExpandAttachmentsCollectionsAssignedTeamsContactCreator TicketsListRequestExpand = "attachments,collections,assigned_teams,contact,creator" - TicketsListRequestExpandAttachmentsCollectionsAssignedTeamsContactCreatorParentTicket TicketsListRequestExpand = "attachments,collections,assigned_teams,contact,creator,parent_ticket" - TicketsListRequestExpandAttachmentsCollectionsAssignedTeamsContactParentTicket TicketsListRequestExpand = "attachments,collections,assigned_teams,contact,parent_ticket" - TicketsListRequestExpandAttachmentsCollectionsAssignedTeamsCreator TicketsListRequestExpand = "attachments,collections,assigned_teams,creator" - TicketsListRequestExpandAttachmentsCollectionsAssignedTeamsCreatorParentTicket TicketsListRequestExpand = "attachments,collections,assigned_teams,creator,parent_ticket" - TicketsListRequestExpandAttachmentsCollectionsAssignedTeamsParentTicket TicketsListRequestExpand = "attachments,collections,assigned_teams,parent_ticket" - TicketsListRequestExpandAttachmentsCollectionsContact TicketsListRequestExpand = "attachments,collections,contact" - TicketsListRequestExpandAttachmentsCollectionsContactCreator TicketsListRequestExpand = "attachments,collections,contact,creator" - TicketsListRequestExpandAttachmentsCollectionsContactCreatorParentTicket TicketsListRequestExpand = "attachments,collections,contact,creator,parent_ticket" - TicketsListRequestExpandAttachmentsCollectionsContactParentTicket TicketsListRequestExpand = "attachments,collections,contact,parent_ticket" - TicketsListRequestExpandAttachmentsCollectionsCreator TicketsListRequestExpand = "attachments,collections,creator" - TicketsListRequestExpandAttachmentsCollectionsCreatorParentTicket TicketsListRequestExpand = "attachments,collections,creator,parent_ticket" - TicketsListRequestExpandAttachmentsCollectionsParentTicket TicketsListRequestExpand = "attachments,collections,parent_ticket" - TicketsListRequestExpandAttachmentsContact TicketsListRequestExpand = "attachments,contact" - TicketsListRequestExpandAttachmentsContactCreator TicketsListRequestExpand = "attachments,contact,creator" - TicketsListRequestExpandAttachmentsContactCreatorParentTicket TicketsListRequestExpand = "attachments,contact,creator,parent_ticket" - TicketsListRequestExpandAttachmentsContactParentTicket TicketsListRequestExpand = "attachments,contact,parent_ticket" - TicketsListRequestExpandAttachmentsCreator TicketsListRequestExpand = "attachments,creator" - TicketsListRequestExpandAttachmentsCreatorParentTicket TicketsListRequestExpand = "attachments,creator,parent_ticket" - TicketsListRequestExpandAttachmentsParentTicket TicketsListRequestExpand = "attachments,parent_ticket" - TicketsListRequestExpandCollections TicketsListRequestExpand = "collections" - TicketsListRequestExpandCollectionsAccount TicketsListRequestExpand = "collections,account" - TicketsListRequestExpandCollectionsAccountContact TicketsListRequestExpand = "collections,account,contact" - TicketsListRequestExpandCollectionsAccountContactCreator TicketsListRequestExpand = "collections,account,contact,creator" - TicketsListRequestExpandCollectionsAccountContactCreatorParentTicket TicketsListRequestExpand = "collections,account,contact,creator,parent_ticket" - TicketsListRequestExpandCollectionsAccountContactParentTicket TicketsListRequestExpand = "collections,account,contact,parent_ticket" - TicketsListRequestExpandCollectionsAccountCreator TicketsListRequestExpand = "collections,account,creator" - TicketsListRequestExpandCollectionsAccountCreatorParentTicket TicketsListRequestExpand = "collections,account,creator,parent_ticket" - TicketsListRequestExpandCollectionsAccountParentTicket TicketsListRequestExpand = "collections,account,parent_ticket" - TicketsListRequestExpandCollectionsAssignedTeams TicketsListRequestExpand = "collections,assigned_teams" - TicketsListRequestExpandCollectionsAssignedTeamsAccount TicketsListRequestExpand = "collections,assigned_teams,account" - TicketsListRequestExpandCollectionsAssignedTeamsAccountContact TicketsListRequestExpand = "collections,assigned_teams,account,contact" - TicketsListRequestExpandCollectionsAssignedTeamsAccountContactCreator TicketsListRequestExpand = "collections,assigned_teams,account,contact,creator" - TicketsListRequestExpandCollectionsAssignedTeamsAccountContactCreatorParentTicket TicketsListRequestExpand = "collections,assigned_teams,account,contact,creator,parent_ticket" - TicketsListRequestExpandCollectionsAssignedTeamsAccountContactParentTicket TicketsListRequestExpand = "collections,assigned_teams,account,contact,parent_ticket" - TicketsListRequestExpandCollectionsAssignedTeamsAccountCreator TicketsListRequestExpand = "collections,assigned_teams,account,creator" - TicketsListRequestExpandCollectionsAssignedTeamsAccountCreatorParentTicket TicketsListRequestExpand = "collections,assigned_teams,account,creator,parent_ticket" - TicketsListRequestExpandCollectionsAssignedTeamsAccountParentTicket TicketsListRequestExpand = "collections,assigned_teams,account,parent_ticket" - TicketsListRequestExpandCollectionsAssignedTeamsContact TicketsListRequestExpand = "collections,assigned_teams,contact" - TicketsListRequestExpandCollectionsAssignedTeamsContactCreator TicketsListRequestExpand = "collections,assigned_teams,contact,creator" - TicketsListRequestExpandCollectionsAssignedTeamsContactCreatorParentTicket TicketsListRequestExpand = "collections,assigned_teams,contact,creator,parent_ticket" - TicketsListRequestExpandCollectionsAssignedTeamsContactParentTicket TicketsListRequestExpand = "collections,assigned_teams,contact,parent_ticket" - TicketsListRequestExpandCollectionsAssignedTeamsCreator TicketsListRequestExpand = "collections,assigned_teams,creator" - TicketsListRequestExpandCollectionsAssignedTeamsCreatorParentTicket TicketsListRequestExpand = "collections,assigned_teams,creator,parent_ticket" - TicketsListRequestExpandCollectionsAssignedTeamsParentTicket TicketsListRequestExpand = "collections,assigned_teams,parent_ticket" - TicketsListRequestExpandCollectionsContact TicketsListRequestExpand = "collections,contact" - TicketsListRequestExpandCollectionsContactCreator TicketsListRequestExpand = "collections,contact,creator" - TicketsListRequestExpandCollectionsContactCreatorParentTicket TicketsListRequestExpand = "collections,contact,creator,parent_ticket" - TicketsListRequestExpandCollectionsContactParentTicket TicketsListRequestExpand = "collections,contact,parent_ticket" - TicketsListRequestExpandCollectionsCreator TicketsListRequestExpand = "collections,creator" - TicketsListRequestExpandCollectionsCreatorParentTicket TicketsListRequestExpand = "collections,creator,parent_ticket" - TicketsListRequestExpandCollectionsParentTicket TicketsListRequestExpand = "collections,parent_ticket" - TicketsListRequestExpandContact TicketsListRequestExpand = "contact" - TicketsListRequestExpandContactCreator TicketsListRequestExpand = "contact,creator" - TicketsListRequestExpandContactCreatorParentTicket TicketsListRequestExpand = "contact,creator,parent_ticket" - TicketsListRequestExpandContactParentTicket TicketsListRequestExpand = "contact,parent_ticket" - TicketsListRequestExpandCreator TicketsListRequestExpand = "creator" - TicketsListRequestExpandCreatorParentTicket TicketsListRequestExpand = "creator,parent_ticket" - TicketsListRequestExpandParentTicket TicketsListRequestExpand = "parent_ticket" + TicketsListRequestExpandItemAccount TicketsListRequestExpandItem = "account" + TicketsListRequestExpandItemAssignedTeams TicketsListRequestExpandItem = "assigned_teams" + TicketsListRequestExpandItemAssignees TicketsListRequestExpandItem = "assignees" + TicketsListRequestExpandItemAttachments TicketsListRequestExpandItem = "attachments" + TicketsListRequestExpandItemCollections TicketsListRequestExpandItem = "collections" + TicketsListRequestExpandItemContact TicketsListRequestExpandItem = "contact" + TicketsListRequestExpandItemCreator TicketsListRequestExpandItem = "creator" + TicketsListRequestExpandItemParentTicket TicketsListRequestExpandItem = "parent_ticket" ) -func NewTicketsListRequestExpandFromString(s string) (TicketsListRequestExpand, error) { +func NewTicketsListRequestExpandItemFromString(s string) (TicketsListRequestExpandItem, error) { switch s { case "account": - return TicketsListRequestExpandAccount, nil - case "account,contact": - return TicketsListRequestExpandAccountContact, nil - case "account,contact,creator": - return TicketsListRequestExpandAccountContactCreator, nil - case "account,contact,creator,parent_ticket": - return TicketsListRequestExpandAccountContactCreatorParentTicket, nil - case "account,contact,parent_ticket": - return TicketsListRequestExpandAccountContactParentTicket, nil - case "account,creator": - return TicketsListRequestExpandAccountCreator, nil - case "account,creator,parent_ticket": - return TicketsListRequestExpandAccountCreatorParentTicket, nil - case "account,parent_ticket": - return TicketsListRequestExpandAccountParentTicket, nil + return TicketsListRequestExpandItemAccount, nil case "assigned_teams": - return TicketsListRequestExpandAssignedTeams, nil - case "assigned_teams,account": - return TicketsListRequestExpandAssignedTeamsAccount, nil - case "assigned_teams,account,contact": - return TicketsListRequestExpandAssignedTeamsAccountContact, nil - case "assigned_teams,account,contact,creator": - return TicketsListRequestExpandAssignedTeamsAccountContactCreator, nil - case "assigned_teams,account,contact,creator,parent_ticket": - return TicketsListRequestExpandAssignedTeamsAccountContactCreatorParentTicket, nil - case "assigned_teams,account,contact,parent_ticket": - return TicketsListRequestExpandAssignedTeamsAccountContactParentTicket, nil - case "assigned_teams,account,creator": - return TicketsListRequestExpandAssignedTeamsAccountCreator, nil - case "assigned_teams,account,creator,parent_ticket": - return TicketsListRequestExpandAssignedTeamsAccountCreatorParentTicket, nil - case "assigned_teams,account,parent_ticket": - return TicketsListRequestExpandAssignedTeamsAccountParentTicket, nil - case "assigned_teams,contact": - return TicketsListRequestExpandAssignedTeamsContact, nil - case "assigned_teams,contact,creator": - return TicketsListRequestExpandAssignedTeamsContactCreator, nil - case "assigned_teams,contact,creator,parent_ticket": - return TicketsListRequestExpandAssignedTeamsContactCreatorParentTicket, nil - case "assigned_teams,contact,parent_ticket": - return TicketsListRequestExpandAssignedTeamsContactParentTicket, nil - case "assigned_teams,creator": - return TicketsListRequestExpandAssignedTeamsCreator, nil - case "assigned_teams,creator,parent_ticket": - return TicketsListRequestExpandAssignedTeamsCreatorParentTicket, nil - case "assigned_teams,parent_ticket": - return TicketsListRequestExpandAssignedTeamsParentTicket, nil + return TicketsListRequestExpandItemAssignedTeams, nil case "assignees": - return TicketsListRequestExpandAssignees, nil - case "assignees,account": - return TicketsListRequestExpandAssigneesAccount, nil - case "assignees,account,contact": - return TicketsListRequestExpandAssigneesAccountContact, nil - case "assignees,account,contact,creator": - return TicketsListRequestExpandAssigneesAccountContactCreator, nil - case "assignees,account,contact,creator,parent_ticket": - return TicketsListRequestExpandAssigneesAccountContactCreatorParentTicket, nil - case "assignees,account,contact,parent_ticket": - return TicketsListRequestExpandAssigneesAccountContactParentTicket, nil - case "assignees,account,creator": - return TicketsListRequestExpandAssigneesAccountCreator, nil - case "assignees,account,creator,parent_ticket": - return TicketsListRequestExpandAssigneesAccountCreatorParentTicket, nil - case "assignees,account,parent_ticket": - return TicketsListRequestExpandAssigneesAccountParentTicket, nil - case "assignees,assigned_teams": - return TicketsListRequestExpandAssigneesAssignedTeams, nil - case "assignees,assigned_teams,account": - return TicketsListRequestExpandAssigneesAssignedTeamsAccount, nil - case "assignees,assigned_teams,account,contact": - return TicketsListRequestExpandAssigneesAssignedTeamsAccountContact, nil - case "assignees,assigned_teams,account,contact,creator": - return TicketsListRequestExpandAssigneesAssignedTeamsAccountContactCreator, nil - case "assignees,assigned_teams,account,contact,creator,parent_ticket": - return TicketsListRequestExpandAssigneesAssignedTeamsAccountContactCreatorParentTicket, nil - case "assignees,assigned_teams,account,contact,parent_ticket": - return TicketsListRequestExpandAssigneesAssignedTeamsAccountContactParentTicket, nil - case "assignees,assigned_teams,account,creator": - return TicketsListRequestExpandAssigneesAssignedTeamsAccountCreator, nil - case "assignees,assigned_teams,account,creator,parent_ticket": - return TicketsListRequestExpandAssigneesAssignedTeamsAccountCreatorParentTicket, nil - case "assignees,assigned_teams,account,parent_ticket": - return TicketsListRequestExpandAssigneesAssignedTeamsAccountParentTicket, nil - case "assignees,assigned_teams,contact": - return TicketsListRequestExpandAssigneesAssignedTeamsContact, nil - case "assignees,assigned_teams,contact,creator": - return TicketsListRequestExpandAssigneesAssignedTeamsContactCreator, nil - case "assignees,assigned_teams,contact,creator,parent_ticket": - return TicketsListRequestExpandAssigneesAssignedTeamsContactCreatorParentTicket, nil - case "assignees,assigned_teams,contact,parent_ticket": - return TicketsListRequestExpandAssigneesAssignedTeamsContactParentTicket, nil - case "assignees,assigned_teams,creator": - return TicketsListRequestExpandAssigneesAssignedTeamsCreator, nil - case "assignees,assigned_teams,creator,parent_ticket": - return TicketsListRequestExpandAssigneesAssignedTeamsCreatorParentTicket, nil - case "assignees,assigned_teams,parent_ticket": - return TicketsListRequestExpandAssigneesAssignedTeamsParentTicket, nil - case "assignees,collections": - return TicketsListRequestExpandAssigneesCollections, nil - case "assignees,collections,account": - return TicketsListRequestExpandAssigneesCollectionsAccount, nil - case "assignees,collections,account,contact": - return TicketsListRequestExpandAssigneesCollectionsAccountContact, nil - case "assignees,collections,account,contact,creator": - return TicketsListRequestExpandAssigneesCollectionsAccountContactCreator, nil - case "assignees,collections,account,contact,creator,parent_ticket": - return TicketsListRequestExpandAssigneesCollectionsAccountContactCreatorParentTicket, nil - case "assignees,collections,account,contact,parent_ticket": - return TicketsListRequestExpandAssigneesCollectionsAccountContactParentTicket, nil - case "assignees,collections,account,creator": - return TicketsListRequestExpandAssigneesCollectionsAccountCreator, nil - case "assignees,collections,account,creator,parent_ticket": - return TicketsListRequestExpandAssigneesCollectionsAccountCreatorParentTicket, nil - case "assignees,collections,account,parent_ticket": - return TicketsListRequestExpandAssigneesCollectionsAccountParentTicket, nil - case "assignees,collections,assigned_teams": - return TicketsListRequestExpandAssigneesCollectionsAssignedTeams, nil - case "assignees,collections,assigned_teams,account": - return TicketsListRequestExpandAssigneesCollectionsAssignedTeamsAccount, nil - case "assignees,collections,assigned_teams,account,contact": - return TicketsListRequestExpandAssigneesCollectionsAssignedTeamsAccountContact, nil - case "assignees,collections,assigned_teams,account,contact,creator": - return TicketsListRequestExpandAssigneesCollectionsAssignedTeamsAccountContactCreator, nil - case "assignees,collections,assigned_teams,account,contact,creator,parent_ticket": - return TicketsListRequestExpandAssigneesCollectionsAssignedTeamsAccountContactCreatorParentTicket, nil - case "assignees,collections,assigned_teams,account,contact,parent_ticket": - return TicketsListRequestExpandAssigneesCollectionsAssignedTeamsAccountContactParentTicket, nil - case "assignees,collections,assigned_teams,account,creator": - return TicketsListRequestExpandAssigneesCollectionsAssignedTeamsAccountCreator, nil - case "assignees,collections,assigned_teams,account,creator,parent_ticket": - return TicketsListRequestExpandAssigneesCollectionsAssignedTeamsAccountCreatorParentTicket, nil - case "assignees,collections,assigned_teams,account,parent_ticket": - return TicketsListRequestExpandAssigneesCollectionsAssignedTeamsAccountParentTicket, nil - case "assignees,collections,assigned_teams,contact": - return TicketsListRequestExpandAssigneesCollectionsAssignedTeamsContact, nil - case "assignees,collections,assigned_teams,contact,creator": - return TicketsListRequestExpandAssigneesCollectionsAssignedTeamsContactCreator, nil - case "assignees,collections,assigned_teams,contact,creator,parent_ticket": - return TicketsListRequestExpandAssigneesCollectionsAssignedTeamsContactCreatorParentTicket, nil - case "assignees,collections,assigned_teams,contact,parent_ticket": - return TicketsListRequestExpandAssigneesCollectionsAssignedTeamsContactParentTicket, nil - case "assignees,collections,assigned_teams,creator": - return TicketsListRequestExpandAssigneesCollectionsAssignedTeamsCreator, nil - case "assignees,collections,assigned_teams,creator,parent_ticket": - return TicketsListRequestExpandAssigneesCollectionsAssignedTeamsCreatorParentTicket, nil - case "assignees,collections,assigned_teams,parent_ticket": - return TicketsListRequestExpandAssigneesCollectionsAssignedTeamsParentTicket, nil - case "assignees,collections,contact": - return TicketsListRequestExpandAssigneesCollectionsContact, nil - case "assignees,collections,contact,creator": - return TicketsListRequestExpandAssigneesCollectionsContactCreator, nil - case "assignees,collections,contact,creator,parent_ticket": - return TicketsListRequestExpandAssigneesCollectionsContactCreatorParentTicket, nil - case "assignees,collections,contact,parent_ticket": - return TicketsListRequestExpandAssigneesCollectionsContactParentTicket, nil - case "assignees,collections,creator": - return TicketsListRequestExpandAssigneesCollectionsCreator, nil - case "assignees,collections,creator,parent_ticket": - return TicketsListRequestExpandAssigneesCollectionsCreatorParentTicket, nil - case "assignees,collections,parent_ticket": - return TicketsListRequestExpandAssigneesCollectionsParentTicket, nil - case "assignees,contact": - return TicketsListRequestExpandAssigneesContact, nil - case "assignees,contact,creator": - return TicketsListRequestExpandAssigneesContactCreator, nil - case "assignees,contact,creator,parent_ticket": - return TicketsListRequestExpandAssigneesContactCreatorParentTicket, nil - case "assignees,contact,parent_ticket": - return TicketsListRequestExpandAssigneesContactParentTicket, nil - case "assignees,creator": - return TicketsListRequestExpandAssigneesCreator, nil - case "assignees,creator,parent_ticket": - return TicketsListRequestExpandAssigneesCreatorParentTicket, nil - case "assignees,parent_ticket": - return TicketsListRequestExpandAssigneesParentTicket, nil + return TicketsListRequestExpandItemAssignees, nil case "attachments": - return TicketsListRequestExpandAttachments, nil - case "attachments,account": - return TicketsListRequestExpandAttachmentsAccount, nil - case "attachments,account,contact": - return TicketsListRequestExpandAttachmentsAccountContact, nil - case "attachments,account,contact,creator": - return TicketsListRequestExpandAttachmentsAccountContactCreator, nil - case "attachments,account,contact,creator,parent_ticket": - return TicketsListRequestExpandAttachmentsAccountContactCreatorParentTicket, nil - case "attachments,account,contact,parent_ticket": - return TicketsListRequestExpandAttachmentsAccountContactParentTicket, nil - case "attachments,account,creator": - return TicketsListRequestExpandAttachmentsAccountCreator, nil - case "attachments,account,creator,parent_ticket": - return TicketsListRequestExpandAttachmentsAccountCreatorParentTicket, nil - case "attachments,account,parent_ticket": - return TicketsListRequestExpandAttachmentsAccountParentTicket, nil - case "attachments,assigned_teams": - return TicketsListRequestExpandAttachmentsAssignedTeams, nil - case "attachments,assigned_teams,account": - return TicketsListRequestExpandAttachmentsAssignedTeamsAccount, nil - case "attachments,assigned_teams,account,contact": - return TicketsListRequestExpandAttachmentsAssignedTeamsAccountContact, nil - case "attachments,assigned_teams,account,contact,creator": - return TicketsListRequestExpandAttachmentsAssignedTeamsAccountContactCreator, nil - case "attachments,assigned_teams,account,contact,creator,parent_ticket": - return TicketsListRequestExpandAttachmentsAssignedTeamsAccountContactCreatorParentTicket, nil - case "attachments,assigned_teams,account,contact,parent_ticket": - return TicketsListRequestExpandAttachmentsAssignedTeamsAccountContactParentTicket, nil - case "attachments,assigned_teams,account,creator": - return TicketsListRequestExpandAttachmentsAssignedTeamsAccountCreator, nil - case "attachments,assigned_teams,account,creator,parent_ticket": - return TicketsListRequestExpandAttachmentsAssignedTeamsAccountCreatorParentTicket, nil - case "attachments,assigned_teams,account,parent_ticket": - return TicketsListRequestExpandAttachmentsAssignedTeamsAccountParentTicket, nil - case "attachments,assigned_teams,contact": - return TicketsListRequestExpandAttachmentsAssignedTeamsContact, nil - case "attachments,assigned_teams,contact,creator": - return TicketsListRequestExpandAttachmentsAssignedTeamsContactCreator, nil - case "attachments,assigned_teams,contact,creator,parent_ticket": - return TicketsListRequestExpandAttachmentsAssignedTeamsContactCreatorParentTicket, nil - case "attachments,assigned_teams,contact,parent_ticket": - return TicketsListRequestExpandAttachmentsAssignedTeamsContactParentTicket, nil - case "attachments,assigned_teams,creator": - return TicketsListRequestExpandAttachmentsAssignedTeamsCreator, nil - case "attachments,assigned_teams,creator,parent_ticket": - return TicketsListRequestExpandAttachmentsAssignedTeamsCreatorParentTicket, nil - case "attachments,assigned_teams,parent_ticket": - return TicketsListRequestExpandAttachmentsAssignedTeamsParentTicket, nil - case "attachments,assignees": - return TicketsListRequestExpandAttachmentsAssignees, nil - case "attachments,assignees,account": - return TicketsListRequestExpandAttachmentsAssigneesAccount, nil - case "attachments,assignees,account,contact": - return TicketsListRequestExpandAttachmentsAssigneesAccountContact, nil - case "attachments,assignees,account,contact,creator": - return TicketsListRequestExpandAttachmentsAssigneesAccountContactCreator, nil - case "attachments,assignees,account,contact,creator,parent_ticket": - return TicketsListRequestExpandAttachmentsAssigneesAccountContactCreatorParentTicket, nil - case "attachments,assignees,account,contact,parent_ticket": - return TicketsListRequestExpandAttachmentsAssigneesAccountContactParentTicket, nil - case "attachments,assignees,account,creator": - return TicketsListRequestExpandAttachmentsAssigneesAccountCreator, nil - case "attachments,assignees,account,creator,parent_ticket": - return TicketsListRequestExpandAttachmentsAssigneesAccountCreatorParentTicket, nil - case "attachments,assignees,account,parent_ticket": - return TicketsListRequestExpandAttachmentsAssigneesAccountParentTicket, nil - case "attachments,assignees,assigned_teams": - return TicketsListRequestExpandAttachmentsAssigneesAssignedTeams, nil - case "attachments,assignees,assigned_teams,account": - return TicketsListRequestExpandAttachmentsAssigneesAssignedTeamsAccount, nil - case "attachments,assignees,assigned_teams,account,contact": - return TicketsListRequestExpandAttachmentsAssigneesAssignedTeamsAccountContact, nil - case "attachments,assignees,assigned_teams,account,contact,creator": - return TicketsListRequestExpandAttachmentsAssigneesAssignedTeamsAccountContactCreator, nil - case "attachments,assignees,assigned_teams,account,contact,creator,parent_ticket": - return TicketsListRequestExpandAttachmentsAssigneesAssignedTeamsAccountContactCreatorParentTicket, nil - case "attachments,assignees,assigned_teams,account,contact,parent_ticket": - return TicketsListRequestExpandAttachmentsAssigneesAssignedTeamsAccountContactParentTicket, nil - case "attachments,assignees,assigned_teams,account,creator": - return TicketsListRequestExpandAttachmentsAssigneesAssignedTeamsAccountCreator, nil - case "attachments,assignees,assigned_teams,account,creator,parent_ticket": - return TicketsListRequestExpandAttachmentsAssigneesAssignedTeamsAccountCreatorParentTicket, nil - case "attachments,assignees,assigned_teams,account,parent_ticket": - return TicketsListRequestExpandAttachmentsAssigneesAssignedTeamsAccountParentTicket, nil - case "attachments,assignees,assigned_teams,contact": - return TicketsListRequestExpandAttachmentsAssigneesAssignedTeamsContact, nil - case "attachments,assignees,assigned_teams,contact,creator": - return TicketsListRequestExpandAttachmentsAssigneesAssignedTeamsContactCreator, nil - case "attachments,assignees,assigned_teams,contact,creator,parent_ticket": - return TicketsListRequestExpandAttachmentsAssigneesAssignedTeamsContactCreatorParentTicket, nil - case "attachments,assignees,assigned_teams,contact,parent_ticket": - return TicketsListRequestExpandAttachmentsAssigneesAssignedTeamsContactParentTicket, nil - case "attachments,assignees,assigned_teams,creator": - return TicketsListRequestExpandAttachmentsAssigneesAssignedTeamsCreator, nil - case "attachments,assignees,assigned_teams,creator,parent_ticket": - return TicketsListRequestExpandAttachmentsAssigneesAssignedTeamsCreatorParentTicket, nil - case "attachments,assignees,assigned_teams,parent_ticket": - return TicketsListRequestExpandAttachmentsAssigneesAssignedTeamsParentTicket, nil - case "attachments,assignees,collections": - return TicketsListRequestExpandAttachmentsAssigneesCollections, nil - case "attachments,assignees,collections,account": - return TicketsListRequestExpandAttachmentsAssigneesCollectionsAccount, nil - case "attachments,assignees,collections,account,contact": - return TicketsListRequestExpandAttachmentsAssigneesCollectionsAccountContact, nil - case "attachments,assignees,collections,account,contact,creator": - return TicketsListRequestExpandAttachmentsAssigneesCollectionsAccountContactCreator, nil - case "attachments,assignees,collections,account,contact,creator,parent_ticket": - return TicketsListRequestExpandAttachmentsAssigneesCollectionsAccountContactCreatorParentTicket, nil - case "attachments,assignees,collections,account,contact,parent_ticket": - return TicketsListRequestExpandAttachmentsAssigneesCollectionsAccountContactParentTicket, nil - case "attachments,assignees,collections,account,creator": - return TicketsListRequestExpandAttachmentsAssigneesCollectionsAccountCreator, nil - case "attachments,assignees,collections,account,creator,parent_ticket": - return TicketsListRequestExpandAttachmentsAssigneesCollectionsAccountCreatorParentTicket, nil - case "attachments,assignees,collections,account,parent_ticket": - return TicketsListRequestExpandAttachmentsAssigneesCollectionsAccountParentTicket, nil - case "attachments,assignees,collections,assigned_teams": - return TicketsListRequestExpandAttachmentsAssigneesCollectionsAssignedTeams, nil - case "attachments,assignees,collections,assigned_teams,account": - return TicketsListRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsAccount, nil - case "attachments,assignees,collections,assigned_teams,account,contact": - return TicketsListRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsAccountContact, nil - case "attachments,assignees,collections,assigned_teams,account,contact,creator": - return TicketsListRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsAccountContactCreator, nil - case "attachments,assignees,collections,assigned_teams,account,contact,creator,parent_ticket": - return TicketsListRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsAccountContactCreatorParentTicket, nil - case "attachments,assignees,collections,assigned_teams,account,contact,parent_ticket": - return TicketsListRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsAccountContactParentTicket, nil - case "attachments,assignees,collections,assigned_teams,account,creator": - return TicketsListRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsAccountCreator, nil - case "attachments,assignees,collections,assigned_teams,account,creator,parent_ticket": - return TicketsListRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsAccountCreatorParentTicket, nil - case "attachments,assignees,collections,assigned_teams,account,parent_ticket": - return TicketsListRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsAccountParentTicket, nil - case "attachments,assignees,collections,assigned_teams,contact": - return TicketsListRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsContact, nil - case "attachments,assignees,collections,assigned_teams,contact,creator": - return TicketsListRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsContactCreator, nil - case "attachments,assignees,collections,assigned_teams,contact,creator,parent_ticket": - return TicketsListRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsContactCreatorParentTicket, nil - case "attachments,assignees,collections,assigned_teams,contact,parent_ticket": - return TicketsListRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsContactParentTicket, nil - case "attachments,assignees,collections,assigned_teams,creator": - return TicketsListRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsCreator, nil - case "attachments,assignees,collections,assigned_teams,creator,parent_ticket": - return TicketsListRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsCreatorParentTicket, nil - case "attachments,assignees,collections,assigned_teams,parent_ticket": - return TicketsListRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsParentTicket, nil - case "attachments,assignees,collections,contact": - return TicketsListRequestExpandAttachmentsAssigneesCollectionsContact, nil - case "attachments,assignees,collections,contact,creator": - return TicketsListRequestExpandAttachmentsAssigneesCollectionsContactCreator, nil - case "attachments,assignees,collections,contact,creator,parent_ticket": - return TicketsListRequestExpandAttachmentsAssigneesCollectionsContactCreatorParentTicket, nil - case "attachments,assignees,collections,contact,parent_ticket": - return TicketsListRequestExpandAttachmentsAssigneesCollectionsContactParentTicket, nil - case "attachments,assignees,collections,creator": - return TicketsListRequestExpandAttachmentsAssigneesCollectionsCreator, nil - case "attachments,assignees,collections,creator,parent_ticket": - return TicketsListRequestExpandAttachmentsAssigneesCollectionsCreatorParentTicket, nil - case "attachments,assignees,collections,parent_ticket": - return TicketsListRequestExpandAttachmentsAssigneesCollectionsParentTicket, nil - case "attachments,assignees,contact": - return TicketsListRequestExpandAttachmentsAssigneesContact, nil - case "attachments,assignees,contact,creator": - return TicketsListRequestExpandAttachmentsAssigneesContactCreator, nil - case "attachments,assignees,contact,creator,parent_ticket": - return TicketsListRequestExpandAttachmentsAssigneesContactCreatorParentTicket, nil - case "attachments,assignees,contact,parent_ticket": - return TicketsListRequestExpandAttachmentsAssigneesContactParentTicket, nil - case "attachments,assignees,creator": - return TicketsListRequestExpandAttachmentsAssigneesCreator, nil - case "attachments,assignees,creator,parent_ticket": - return TicketsListRequestExpandAttachmentsAssigneesCreatorParentTicket, nil - case "attachments,assignees,parent_ticket": - return TicketsListRequestExpandAttachmentsAssigneesParentTicket, nil - case "attachments,collections": - return TicketsListRequestExpandAttachmentsCollections, nil - case "attachments,collections,account": - return TicketsListRequestExpandAttachmentsCollectionsAccount, nil - case "attachments,collections,account,contact": - return TicketsListRequestExpandAttachmentsCollectionsAccountContact, nil - case "attachments,collections,account,contact,creator": - return TicketsListRequestExpandAttachmentsCollectionsAccountContactCreator, nil - case "attachments,collections,account,contact,creator,parent_ticket": - return TicketsListRequestExpandAttachmentsCollectionsAccountContactCreatorParentTicket, nil - case "attachments,collections,account,contact,parent_ticket": - return TicketsListRequestExpandAttachmentsCollectionsAccountContactParentTicket, nil - case "attachments,collections,account,creator": - return TicketsListRequestExpandAttachmentsCollectionsAccountCreator, nil - case "attachments,collections,account,creator,parent_ticket": - return TicketsListRequestExpandAttachmentsCollectionsAccountCreatorParentTicket, nil - case "attachments,collections,account,parent_ticket": - return TicketsListRequestExpandAttachmentsCollectionsAccountParentTicket, nil - case "attachments,collections,assigned_teams": - return TicketsListRequestExpandAttachmentsCollectionsAssignedTeams, nil - case "attachments,collections,assigned_teams,account": - return TicketsListRequestExpandAttachmentsCollectionsAssignedTeamsAccount, nil - case "attachments,collections,assigned_teams,account,contact": - return TicketsListRequestExpandAttachmentsCollectionsAssignedTeamsAccountContact, nil - case "attachments,collections,assigned_teams,account,contact,creator": - return TicketsListRequestExpandAttachmentsCollectionsAssignedTeamsAccountContactCreator, nil - case "attachments,collections,assigned_teams,account,contact,creator,parent_ticket": - return TicketsListRequestExpandAttachmentsCollectionsAssignedTeamsAccountContactCreatorParentTicket, nil - case "attachments,collections,assigned_teams,account,contact,parent_ticket": - return TicketsListRequestExpandAttachmentsCollectionsAssignedTeamsAccountContactParentTicket, nil - case "attachments,collections,assigned_teams,account,creator": - return TicketsListRequestExpandAttachmentsCollectionsAssignedTeamsAccountCreator, nil - case "attachments,collections,assigned_teams,account,creator,parent_ticket": - return TicketsListRequestExpandAttachmentsCollectionsAssignedTeamsAccountCreatorParentTicket, nil - case "attachments,collections,assigned_teams,account,parent_ticket": - return TicketsListRequestExpandAttachmentsCollectionsAssignedTeamsAccountParentTicket, nil - case "attachments,collections,assigned_teams,contact": - return TicketsListRequestExpandAttachmentsCollectionsAssignedTeamsContact, nil - case "attachments,collections,assigned_teams,contact,creator": - return TicketsListRequestExpandAttachmentsCollectionsAssignedTeamsContactCreator, nil - case "attachments,collections,assigned_teams,contact,creator,parent_ticket": - return TicketsListRequestExpandAttachmentsCollectionsAssignedTeamsContactCreatorParentTicket, nil - case "attachments,collections,assigned_teams,contact,parent_ticket": - return TicketsListRequestExpandAttachmentsCollectionsAssignedTeamsContactParentTicket, nil - case "attachments,collections,assigned_teams,creator": - return TicketsListRequestExpandAttachmentsCollectionsAssignedTeamsCreator, nil - case "attachments,collections,assigned_teams,creator,parent_ticket": - return TicketsListRequestExpandAttachmentsCollectionsAssignedTeamsCreatorParentTicket, nil - case "attachments,collections,assigned_teams,parent_ticket": - return TicketsListRequestExpandAttachmentsCollectionsAssignedTeamsParentTicket, nil - case "attachments,collections,contact": - return TicketsListRequestExpandAttachmentsCollectionsContact, nil - case "attachments,collections,contact,creator": - return TicketsListRequestExpandAttachmentsCollectionsContactCreator, nil - case "attachments,collections,contact,creator,parent_ticket": - return TicketsListRequestExpandAttachmentsCollectionsContactCreatorParentTicket, nil - case "attachments,collections,contact,parent_ticket": - return TicketsListRequestExpandAttachmentsCollectionsContactParentTicket, nil - case "attachments,collections,creator": - return TicketsListRequestExpandAttachmentsCollectionsCreator, nil - case "attachments,collections,creator,parent_ticket": - return TicketsListRequestExpandAttachmentsCollectionsCreatorParentTicket, nil - case "attachments,collections,parent_ticket": - return TicketsListRequestExpandAttachmentsCollectionsParentTicket, nil - case "attachments,contact": - return TicketsListRequestExpandAttachmentsContact, nil - case "attachments,contact,creator": - return TicketsListRequestExpandAttachmentsContactCreator, nil - case "attachments,contact,creator,parent_ticket": - return TicketsListRequestExpandAttachmentsContactCreatorParentTicket, nil - case "attachments,contact,parent_ticket": - return TicketsListRequestExpandAttachmentsContactParentTicket, nil - case "attachments,creator": - return TicketsListRequestExpandAttachmentsCreator, nil - case "attachments,creator,parent_ticket": - return TicketsListRequestExpandAttachmentsCreatorParentTicket, nil - case "attachments,parent_ticket": - return TicketsListRequestExpandAttachmentsParentTicket, nil + return TicketsListRequestExpandItemAttachments, nil case "collections": - return TicketsListRequestExpandCollections, nil - case "collections,account": - return TicketsListRequestExpandCollectionsAccount, nil - case "collections,account,contact": - return TicketsListRequestExpandCollectionsAccountContact, nil - case "collections,account,contact,creator": - return TicketsListRequestExpandCollectionsAccountContactCreator, nil - case "collections,account,contact,creator,parent_ticket": - return TicketsListRequestExpandCollectionsAccountContactCreatorParentTicket, nil - case "collections,account,contact,parent_ticket": - return TicketsListRequestExpandCollectionsAccountContactParentTicket, nil - case "collections,account,creator": - return TicketsListRequestExpandCollectionsAccountCreator, nil - case "collections,account,creator,parent_ticket": - return TicketsListRequestExpandCollectionsAccountCreatorParentTicket, nil - case "collections,account,parent_ticket": - return TicketsListRequestExpandCollectionsAccountParentTicket, nil - case "collections,assigned_teams": - return TicketsListRequestExpandCollectionsAssignedTeams, nil - case "collections,assigned_teams,account": - return TicketsListRequestExpandCollectionsAssignedTeamsAccount, nil - case "collections,assigned_teams,account,contact": - return TicketsListRequestExpandCollectionsAssignedTeamsAccountContact, nil - case "collections,assigned_teams,account,contact,creator": - return TicketsListRequestExpandCollectionsAssignedTeamsAccountContactCreator, nil - case "collections,assigned_teams,account,contact,creator,parent_ticket": - return TicketsListRequestExpandCollectionsAssignedTeamsAccountContactCreatorParentTicket, nil - case "collections,assigned_teams,account,contact,parent_ticket": - return TicketsListRequestExpandCollectionsAssignedTeamsAccountContactParentTicket, nil - case "collections,assigned_teams,account,creator": - return TicketsListRequestExpandCollectionsAssignedTeamsAccountCreator, nil - case "collections,assigned_teams,account,creator,parent_ticket": - return TicketsListRequestExpandCollectionsAssignedTeamsAccountCreatorParentTicket, nil - case "collections,assigned_teams,account,parent_ticket": - return TicketsListRequestExpandCollectionsAssignedTeamsAccountParentTicket, nil - case "collections,assigned_teams,contact": - return TicketsListRequestExpandCollectionsAssignedTeamsContact, nil - case "collections,assigned_teams,contact,creator": - return TicketsListRequestExpandCollectionsAssignedTeamsContactCreator, nil - case "collections,assigned_teams,contact,creator,parent_ticket": - return TicketsListRequestExpandCollectionsAssignedTeamsContactCreatorParentTicket, nil - case "collections,assigned_teams,contact,parent_ticket": - return TicketsListRequestExpandCollectionsAssignedTeamsContactParentTicket, nil - case "collections,assigned_teams,creator": - return TicketsListRequestExpandCollectionsAssignedTeamsCreator, nil - case "collections,assigned_teams,creator,parent_ticket": - return TicketsListRequestExpandCollectionsAssignedTeamsCreatorParentTicket, nil - case "collections,assigned_teams,parent_ticket": - return TicketsListRequestExpandCollectionsAssignedTeamsParentTicket, nil - case "collections,contact": - return TicketsListRequestExpandCollectionsContact, nil - case "collections,contact,creator": - return TicketsListRequestExpandCollectionsContactCreator, nil - case "collections,contact,creator,parent_ticket": - return TicketsListRequestExpandCollectionsContactCreatorParentTicket, nil - case "collections,contact,parent_ticket": - return TicketsListRequestExpandCollectionsContactParentTicket, nil - case "collections,creator": - return TicketsListRequestExpandCollectionsCreator, nil - case "collections,creator,parent_ticket": - return TicketsListRequestExpandCollectionsCreatorParentTicket, nil - case "collections,parent_ticket": - return TicketsListRequestExpandCollectionsParentTicket, nil + return TicketsListRequestExpandItemCollections, nil case "contact": - return TicketsListRequestExpandContact, nil - case "contact,creator": - return TicketsListRequestExpandContactCreator, nil - case "contact,creator,parent_ticket": - return TicketsListRequestExpandContactCreatorParentTicket, nil - case "contact,parent_ticket": - return TicketsListRequestExpandContactParentTicket, nil + return TicketsListRequestExpandItemContact, nil case "creator": - return TicketsListRequestExpandCreator, nil - case "creator,parent_ticket": - return TicketsListRequestExpandCreatorParentTicket, nil + return TicketsListRequestExpandItemCreator, nil case "parent_ticket": - return TicketsListRequestExpandParentTicket, nil + return TicketsListRequestExpandItemParentTicket, nil } - var t TicketsListRequestExpand + var t TicketsListRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (t TicketsListRequestExpand) Ptr() *TicketsListRequestExpand { +func (t TicketsListRequestExpandItem) Ptr() *TicketsListRequestExpandItem { return &t } @@ -1008,784 +282,43 @@ func (t TicketsListRequestShowEnumOrigins) Ptr() *TicketsListRequestShowEnumOrig return &t } -type TicketsRetrieveRequestExpand string +type TicketsRetrieveRequestExpandItem string const ( - TicketsRetrieveRequestExpandAccount TicketsRetrieveRequestExpand = "account" - TicketsRetrieveRequestExpandAccountContact TicketsRetrieveRequestExpand = "account,contact" - TicketsRetrieveRequestExpandAccountContactCreator TicketsRetrieveRequestExpand = "account,contact,creator" - TicketsRetrieveRequestExpandAccountContactCreatorParentTicket TicketsRetrieveRequestExpand = "account,contact,creator,parent_ticket" - TicketsRetrieveRequestExpandAccountContactParentTicket TicketsRetrieveRequestExpand = "account,contact,parent_ticket" - TicketsRetrieveRequestExpandAccountCreator TicketsRetrieveRequestExpand = "account,creator" - TicketsRetrieveRequestExpandAccountCreatorParentTicket TicketsRetrieveRequestExpand = "account,creator,parent_ticket" - TicketsRetrieveRequestExpandAccountParentTicket TicketsRetrieveRequestExpand = "account,parent_ticket" - TicketsRetrieveRequestExpandAssignedTeams TicketsRetrieveRequestExpand = "assigned_teams" - TicketsRetrieveRequestExpandAssignedTeamsAccount TicketsRetrieveRequestExpand = "assigned_teams,account" - TicketsRetrieveRequestExpandAssignedTeamsAccountContact TicketsRetrieveRequestExpand = "assigned_teams,account,contact" - TicketsRetrieveRequestExpandAssignedTeamsAccountContactCreator TicketsRetrieveRequestExpand = "assigned_teams,account,contact,creator" - TicketsRetrieveRequestExpandAssignedTeamsAccountContactCreatorParentTicket TicketsRetrieveRequestExpand = "assigned_teams,account,contact,creator,parent_ticket" - TicketsRetrieveRequestExpandAssignedTeamsAccountContactParentTicket TicketsRetrieveRequestExpand = "assigned_teams,account,contact,parent_ticket" - TicketsRetrieveRequestExpandAssignedTeamsAccountCreator TicketsRetrieveRequestExpand = "assigned_teams,account,creator" - TicketsRetrieveRequestExpandAssignedTeamsAccountCreatorParentTicket TicketsRetrieveRequestExpand = "assigned_teams,account,creator,parent_ticket" - TicketsRetrieveRequestExpandAssignedTeamsAccountParentTicket TicketsRetrieveRequestExpand = "assigned_teams,account,parent_ticket" - TicketsRetrieveRequestExpandAssignedTeamsContact TicketsRetrieveRequestExpand = "assigned_teams,contact" - TicketsRetrieveRequestExpandAssignedTeamsContactCreator TicketsRetrieveRequestExpand = "assigned_teams,contact,creator" - TicketsRetrieveRequestExpandAssignedTeamsContactCreatorParentTicket TicketsRetrieveRequestExpand = "assigned_teams,contact,creator,parent_ticket" - TicketsRetrieveRequestExpandAssignedTeamsContactParentTicket TicketsRetrieveRequestExpand = "assigned_teams,contact,parent_ticket" - TicketsRetrieveRequestExpandAssignedTeamsCreator TicketsRetrieveRequestExpand = "assigned_teams,creator" - TicketsRetrieveRequestExpandAssignedTeamsCreatorParentTicket TicketsRetrieveRequestExpand = "assigned_teams,creator,parent_ticket" - TicketsRetrieveRequestExpandAssignedTeamsParentTicket TicketsRetrieveRequestExpand = "assigned_teams,parent_ticket" - TicketsRetrieveRequestExpandAssignees TicketsRetrieveRequestExpand = "assignees" - TicketsRetrieveRequestExpandAssigneesAccount TicketsRetrieveRequestExpand = "assignees,account" - TicketsRetrieveRequestExpandAssigneesAccountContact TicketsRetrieveRequestExpand = "assignees,account,contact" - TicketsRetrieveRequestExpandAssigneesAccountContactCreator TicketsRetrieveRequestExpand = "assignees,account,contact,creator" - TicketsRetrieveRequestExpandAssigneesAccountContactCreatorParentTicket TicketsRetrieveRequestExpand = "assignees,account,contact,creator,parent_ticket" - TicketsRetrieveRequestExpandAssigneesAccountContactParentTicket TicketsRetrieveRequestExpand = "assignees,account,contact,parent_ticket" - TicketsRetrieveRequestExpandAssigneesAccountCreator TicketsRetrieveRequestExpand = "assignees,account,creator" - TicketsRetrieveRequestExpandAssigneesAccountCreatorParentTicket TicketsRetrieveRequestExpand = "assignees,account,creator,parent_ticket" - TicketsRetrieveRequestExpandAssigneesAccountParentTicket TicketsRetrieveRequestExpand = "assignees,account,parent_ticket" - TicketsRetrieveRequestExpandAssigneesAssignedTeams TicketsRetrieveRequestExpand = "assignees,assigned_teams" - TicketsRetrieveRequestExpandAssigneesAssignedTeamsAccount TicketsRetrieveRequestExpand = "assignees,assigned_teams,account" - TicketsRetrieveRequestExpandAssigneesAssignedTeamsAccountContact TicketsRetrieveRequestExpand = "assignees,assigned_teams,account,contact" - TicketsRetrieveRequestExpandAssigneesAssignedTeamsAccountContactCreator TicketsRetrieveRequestExpand = "assignees,assigned_teams,account,contact,creator" - TicketsRetrieveRequestExpandAssigneesAssignedTeamsAccountContactCreatorParentTicket TicketsRetrieveRequestExpand = "assignees,assigned_teams,account,contact,creator,parent_ticket" - TicketsRetrieveRequestExpandAssigneesAssignedTeamsAccountContactParentTicket TicketsRetrieveRequestExpand = "assignees,assigned_teams,account,contact,parent_ticket" - TicketsRetrieveRequestExpandAssigneesAssignedTeamsAccountCreator TicketsRetrieveRequestExpand = "assignees,assigned_teams,account,creator" - TicketsRetrieveRequestExpandAssigneesAssignedTeamsAccountCreatorParentTicket TicketsRetrieveRequestExpand = "assignees,assigned_teams,account,creator,parent_ticket" - TicketsRetrieveRequestExpandAssigneesAssignedTeamsAccountParentTicket TicketsRetrieveRequestExpand = "assignees,assigned_teams,account,parent_ticket" - TicketsRetrieveRequestExpandAssigneesAssignedTeamsContact TicketsRetrieveRequestExpand = "assignees,assigned_teams,contact" - TicketsRetrieveRequestExpandAssigneesAssignedTeamsContactCreator TicketsRetrieveRequestExpand = "assignees,assigned_teams,contact,creator" - TicketsRetrieveRequestExpandAssigneesAssignedTeamsContactCreatorParentTicket TicketsRetrieveRequestExpand = "assignees,assigned_teams,contact,creator,parent_ticket" - TicketsRetrieveRequestExpandAssigneesAssignedTeamsContactParentTicket TicketsRetrieveRequestExpand = "assignees,assigned_teams,contact,parent_ticket" - TicketsRetrieveRequestExpandAssigneesAssignedTeamsCreator TicketsRetrieveRequestExpand = "assignees,assigned_teams,creator" - TicketsRetrieveRequestExpandAssigneesAssignedTeamsCreatorParentTicket TicketsRetrieveRequestExpand = "assignees,assigned_teams,creator,parent_ticket" - TicketsRetrieveRequestExpandAssigneesAssignedTeamsParentTicket TicketsRetrieveRequestExpand = "assignees,assigned_teams,parent_ticket" - TicketsRetrieveRequestExpandAssigneesCollections TicketsRetrieveRequestExpand = "assignees,collections" - TicketsRetrieveRequestExpandAssigneesCollectionsAccount TicketsRetrieveRequestExpand = "assignees,collections,account" - TicketsRetrieveRequestExpandAssigneesCollectionsAccountContact TicketsRetrieveRequestExpand = "assignees,collections,account,contact" - TicketsRetrieveRequestExpandAssigneesCollectionsAccountContactCreator TicketsRetrieveRequestExpand = "assignees,collections,account,contact,creator" - TicketsRetrieveRequestExpandAssigneesCollectionsAccountContactCreatorParentTicket TicketsRetrieveRequestExpand = "assignees,collections,account,contact,creator,parent_ticket" - TicketsRetrieveRequestExpandAssigneesCollectionsAccountContactParentTicket TicketsRetrieveRequestExpand = "assignees,collections,account,contact,parent_ticket" - TicketsRetrieveRequestExpandAssigneesCollectionsAccountCreator TicketsRetrieveRequestExpand = "assignees,collections,account,creator" - TicketsRetrieveRequestExpandAssigneesCollectionsAccountCreatorParentTicket TicketsRetrieveRequestExpand = "assignees,collections,account,creator,parent_ticket" - TicketsRetrieveRequestExpandAssigneesCollectionsAccountParentTicket TicketsRetrieveRequestExpand = "assignees,collections,account,parent_ticket" - TicketsRetrieveRequestExpandAssigneesCollectionsAssignedTeams TicketsRetrieveRequestExpand = "assignees,collections,assigned_teams" - TicketsRetrieveRequestExpandAssigneesCollectionsAssignedTeamsAccount TicketsRetrieveRequestExpand = "assignees,collections,assigned_teams,account" - TicketsRetrieveRequestExpandAssigneesCollectionsAssignedTeamsAccountContact TicketsRetrieveRequestExpand = "assignees,collections,assigned_teams,account,contact" - TicketsRetrieveRequestExpandAssigneesCollectionsAssignedTeamsAccountContactCreator TicketsRetrieveRequestExpand = "assignees,collections,assigned_teams,account,contact,creator" - TicketsRetrieveRequestExpandAssigneesCollectionsAssignedTeamsAccountContactCreatorParentTicket TicketsRetrieveRequestExpand = "assignees,collections,assigned_teams,account,contact,creator,parent_ticket" - TicketsRetrieveRequestExpandAssigneesCollectionsAssignedTeamsAccountContactParentTicket TicketsRetrieveRequestExpand = "assignees,collections,assigned_teams,account,contact,parent_ticket" - TicketsRetrieveRequestExpandAssigneesCollectionsAssignedTeamsAccountCreator TicketsRetrieveRequestExpand = "assignees,collections,assigned_teams,account,creator" - TicketsRetrieveRequestExpandAssigneesCollectionsAssignedTeamsAccountCreatorParentTicket TicketsRetrieveRequestExpand = "assignees,collections,assigned_teams,account,creator,parent_ticket" - TicketsRetrieveRequestExpandAssigneesCollectionsAssignedTeamsAccountParentTicket TicketsRetrieveRequestExpand = "assignees,collections,assigned_teams,account,parent_ticket" - TicketsRetrieveRequestExpandAssigneesCollectionsAssignedTeamsContact TicketsRetrieveRequestExpand = "assignees,collections,assigned_teams,contact" - TicketsRetrieveRequestExpandAssigneesCollectionsAssignedTeamsContactCreator TicketsRetrieveRequestExpand = "assignees,collections,assigned_teams,contact,creator" - TicketsRetrieveRequestExpandAssigneesCollectionsAssignedTeamsContactCreatorParentTicket TicketsRetrieveRequestExpand = "assignees,collections,assigned_teams,contact,creator,parent_ticket" - TicketsRetrieveRequestExpandAssigneesCollectionsAssignedTeamsContactParentTicket TicketsRetrieveRequestExpand = "assignees,collections,assigned_teams,contact,parent_ticket" - TicketsRetrieveRequestExpandAssigneesCollectionsAssignedTeamsCreator TicketsRetrieveRequestExpand = "assignees,collections,assigned_teams,creator" - TicketsRetrieveRequestExpandAssigneesCollectionsAssignedTeamsCreatorParentTicket TicketsRetrieveRequestExpand = "assignees,collections,assigned_teams,creator,parent_ticket" - TicketsRetrieveRequestExpandAssigneesCollectionsAssignedTeamsParentTicket TicketsRetrieveRequestExpand = "assignees,collections,assigned_teams,parent_ticket" - TicketsRetrieveRequestExpandAssigneesCollectionsContact TicketsRetrieveRequestExpand = "assignees,collections,contact" - TicketsRetrieveRequestExpandAssigneesCollectionsContactCreator TicketsRetrieveRequestExpand = "assignees,collections,contact,creator" - TicketsRetrieveRequestExpandAssigneesCollectionsContactCreatorParentTicket TicketsRetrieveRequestExpand = "assignees,collections,contact,creator,parent_ticket" - TicketsRetrieveRequestExpandAssigneesCollectionsContactParentTicket TicketsRetrieveRequestExpand = "assignees,collections,contact,parent_ticket" - TicketsRetrieveRequestExpandAssigneesCollectionsCreator TicketsRetrieveRequestExpand = "assignees,collections,creator" - TicketsRetrieveRequestExpandAssigneesCollectionsCreatorParentTicket TicketsRetrieveRequestExpand = "assignees,collections,creator,parent_ticket" - TicketsRetrieveRequestExpandAssigneesCollectionsParentTicket TicketsRetrieveRequestExpand = "assignees,collections,parent_ticket" - TicketsRetrieveRequestExpandAssigneesContact TicketsRetrieveRequestExpand = "assignees,contact" - TicketsRetrieveRequestExpandAssigneesContactCreator TicketsRetrieveRequestExpand = "assignees,contact,creator" - TicketsRetrieveRequestExpandAssigneesContactCreatorParentTicket TicketsRetrieveRequestExpand = "assignees,contact,creator,parent_ticket" - TicketsRetrieveRequestExpandAssigneesContactParentTicket TicketsRetrieveRequestExpand = "assignees,contact,parent_ticket" - TicketsRetrieveRequestExpandAssigneesCreator TicketsRetrieveRequestExpand = "assignees,creator" - TicketsRetrieveRequestExpandAssigneesCreatorParentTicket TicketsRetrieveRequestExpand = "assignees,creator,parent_ticket" - TicketsRetrieveRequestExpandAssigneesParentTicket TicketsRetrieveRequestExpand = "assignees,parent_ticket" - TicketsRetrieveRequestExpandAttachments TicketsRetrieveRequestExpand = "attachments" - TicketsRetrieveRequestExpandAttachmentsAccount TicketsRetrieveRequestExpand = "attachments,account" - TicketsRetrieveRequestExpandAttachmentsAccountContact TicketsRetrieveRequestExpand = "attachments,account,contact" - TicketsRetrieveRequestExpandAttachmentsAccountContactCreator TicketsRetrieveRequestExpand = "attachments,account,contact,creator" - TicketsRetrieveRequestExpandAttachmentsAccountContactCreatorParentTicket TicketsRetrieveRequestExpand = "attachments,account,contact,creator,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsAccountContactParentTicket TicketsRetrieveRequestExpand = "attachments,account,contact,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsAccountCreator TicketsRetrieveRequestExpand = "attachments,account,creator" - TicketsRetrieveRequestExpandAttachmentsAccountCreatorParentTicket TicketsRetrieveRequestExpand = "attachments,account,creator,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsAccountParentTicket TicketsRetrieveRequestExpand = "attachments,account,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsAssignedTeams TicketsRetrieveRequestExpand = "attachments,assigned_teams" - TicketsRetrieveRequestExpandAttachmentsAssignedTeamsAccount TicketsRetrieveRequestExpand = "attachments,assigned_teams,account" - TicketsRetrieveRequestExpandAttachmentsAssignedTeamsAccountContact TicketsRetrieveRequestExpand = "attachments,assigned_teams,account,contact" - TicketsRetrieveRequestExpandAttachmentsAssignedTeamsAccountContactCreator TicketsRetrieveRequestExpand = "attachments,assigned_teams,account,contact,creator" - TicketsRetrieveRequestExpandAttachmentsAssignedTeamsAccountContactCreatorParentTicket TicketsRetrieveRequestExpand = "attachments,assigned_teams,account,contact,creator,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsAssignedTeamsAccountContactParentTicket TicketsRetrieveRequestExpand = "attachments,assigned_teams,account,contact,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsAssignedTeamsAccountCreator TicketsRetrieveRequestExpand = "attachments,assigned_teams,account,creator" - TicketsRetrieveRequestExpandAttachmentsAssignedTeamsAccountCreatorParentTicket TicketsRetrieveRequestExpand = "attachments,assigned_teams,account,creator,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsAssignedTeamsAccountParentTicket TicketsRetrieveRequestExpand = "attachments,assigned_teams,account,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsAssignedTeamsContact TicketsRetrieveRequestExpand = "attachments,assigned_teams,contact" - TicketsRetrieveRequestExpandAttachmentsAssignedTeamsContactCreator TicketsRetrieveRequestExpand = "attachments,assigned_teams,contact,creator" - TicketsRetrieveRequestExpandAttachmentsAssignedTeamsContactCreatorParentTicket TicketsRetrieveRequestExpand = "attachments,assigned_teams,contact,creator,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsAssignedTeamsContactParentTicket TicketsRetrieveRequestExpand = "attachments,assigned_teams,contact,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsAssignedTeamsCreator TicketsRetrieveRequestExpand = "attachments,assigned_teams,creator" - TicketsRetrieveRequestExpandAttachmentsAssignedTeamsCreatorParentTicket TicketsRetrieveRequestExpand = "attachments,assigned_teams,creator,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsAssignedTeamsParentTicket TicketsRetrieveRequestExpand = "attachments,assigned_teams,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsAssignees TicketsRetrieveRequestExpand = "attachments,assignees" - TicketsRetrieveRequestExpandAttachmentsAssigneesAccount TicketsRetrieveRequestExpand = "attachments,assignees,account" - TicketsRetrieveRequestExpandAttachmentsAssigneesAccountContact TicketsRetrieveRequestExpand = "attachments,assignees,account,contact" - TicketsRetrieveRequestExpandAttachmentsAssigneesAccountContactCreator TicketsRetrieveRequestExpand = "attachments,assignees,account,contact,creator" - TicketsRetrieveRequestExpandAttachmentsAssigneesAccountContactCreatorParentTicket TicketsRetrieveRequestExpand = "attachments,assignees,account,contact,creator,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsAssigneesAccountContactParentTicket TicketsRetrieveRequestExpand = "attachments,assignees,account,contact,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsAssigneesAccountCreator TicketsRetrieveRequestExpand = "attachments,assignees,account,creator" - TicketsRetrieveRequestExpandAttachmentsAssigneesAccountCreatorParentTicket TicketsRetrieveRequestExpand = "attachments,assignees,account,creator,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsAssigneesAccountParentTicket TicketsRetrieveRequestExpand = "attachments,assignees,account,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsAssigneesAssignedTeams TicketsRetrieveRequestExpand = "attachments,assignees,assigned_teams" - TicketsRetrieveRequestExpandAttachmentsAssigneesAssignedTeamsAccount TicketsRetrieveRequestExpand = "attachments,assignees,assigned_teams,account" - TicketsRetrieveRequestExpandAttachmentsAssigneesAssignedTeamsAccountContact TicketsRetrieveRequestExpand = "attachments,assignees,assigned_teams,account,contact" - TicketsRetrieveRequestExpandAttachmentsAssigneesAssignedTeamsAccountContactCreator TicketsRetrieveRequestExpand = "attachments,assignees,assigned_teams,account,contact,creator" - TicketsRetrieveRequestExpandAttachmentsAssigneesAssignedTeamsAccountContactCreatorParentTicket TicketsRetrieveRequestExpand = "attachments,assignees,assigned_teams,account,contact,creator,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsAssigneesAssignedTeamsAccountContactParentTicket TicketsRetrieveRequestExpand = "attachments,assignees,assigned_teams,account,contact,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsAssigneesAssignedTeamsAccountCreator TicketsRetrieveRequestExpand = "attachments,assignees,assigned_teams,account,creator" - TicketsRetrieveRequestExpandAttachmentsAssigneesAssignedTeamsAccountCreatorParentTicket TicketsRetrieveRequestExpand = "attachments,assignees,assigned_teams,account,creator,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsAssigneesAssignedTeamsAccountParentTicket TicketsRetrieveRequestExpand = "attachments,assignees,assigned_teams,account,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsAssigneesAssignedTeamsContact TicketsRetrieveRequestExpand = "attachments,assignees,assigned_teams,contact" - TicketsRetrieveRequestExpandAttachmentsAssigneesAssignedTeamsContactCreator TicketsRetrieveRequestExpand = "attachments,assignees,assigned_teams,contact,creator" - TicketsRetrieveRequestExpandAttachmentsAssigneesAssignedTeamsContactCreatorParentTicket TicketsRetrieveRequestExpand = "attachments,assignees,assigned_teams,contact,creator,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsAssigneesAssignedTeamsContactParentTicket TicketsRetrieveRequestExpand = "attachments,assignees,assigned_teams,contact,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsAssigneesAssignedTeamsCreator TicketsRetrieveRequestExpand = "attachments,assignees,assigned_teams,creator" - TicketsRetrieveRequestExpandAttachmentsAssigneesAssignedTeamsCreatorParentTicket TicketsRetrieveRequestExpand = "attachments,assignees,assigned_teams,creator,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsAssigneesAssignedTeamsParentTicket TicketsRetrieveRequestExpand = "attachments,assignees,assigned_teams,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsAssigneesCollections TicketsRetrieveRequestExpand = "attachments,assignees,collections" - TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsAccount TicketsRetrieveRequestExpand = "attachments,assignees,collections,account" - TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsAccountContact TicketsRetrieveRequestExpand = "attachments,assignees,collections,account,contact" - TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsAccountContactCreator TicketsRetrieveRequestExpand = "attachments,assignees,collections,account,contact,creator" - TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsAccountContactCreatorParentTicket TicketsRetrieveRequestExpand = "attachments,assignees,collections,account,contact,creator,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsAccountContactParentTicket TicketsRetrieveRequestExpand = "attachments,assignees,collections,account,contact,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsAccountCreator TicketsRetrieveRequestExpand = "attachments,assignees,collections,account,creator" - TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsAccountCreatorParentTicket TicketsRetrieveRequestExpand = "attachments,assignees,collections,account,creator,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsAccountParentTicket TicketsRetrieveRequestExpand = "attachments,assignees,collections,account,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsAssignedTeams TicketsRetrieveRequestExpand = "attachments,assignees,collections,assigned_teams" - TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsAccount TicketsRetrieveRequestExpand = "attachments,assignees,collections,assigned_teams,account" - TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsAccountContact TicketsRetrieveRequestExpand = "attachments,assignees,collections,assigned_teams,account,contact" - TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsAccountContactCreator TicketsRetrieveRequestExpand = "attachments,assignees,collections,assigned_teams,account,contact,creator" - TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsAccountContactCreatorParentTicket TicketsRetrieveRequestExpand = "attachments,assignees,collections,assigned_teams,account,contact,creator,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsAccountContactParentTicket TicketsRetrieveRequestExpand = "attachments,assignees,collections,assigned_teams,account,contact,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsAccountCreator TicketsRetrieveRequestExpand = "attachments,assignees,collections,assigned_teams,account,creator" - TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsAccountCreatorParentTicket TicketsRetrieveRequestExpand = "attachments,assignees,collections,assigned_teams,account,creator,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsAccountParentTicket TicketsRetrieveRequestExpand = "attachments,assignees,collections,assigned_teams,account,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsContact TicketsRetrieveRequestExpand = "attachments,assignees,collections,assigned_teams,contact" - TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsContactCreator TicketsRetrieveRequestExpand = "attachments,assignees,collections,assigned_teams,contact,creator" - TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsContactCreatorParentTicket TicketsRetrieveRequestExpand = "attachments,assignees,collections,assigned_teams,contact,creator,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsContactParentTicket TicketsRetrieveRequestExpand = "attachments,assignees,collections,assigned_teams,contact,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsCreator TicketsRetrieveRequestExpand = "attachments,assignees,collections,assigned_teams,creator" - TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsCreatorParentTicket TicketsRetrieveRequestExpand = "attachments,assignees,collections,assigned_teams,creator,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsParentTicket TicketsRetrieveRequestExpand = "attachments,assignees,collections,assigned_teams,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsContact TicketsRetrieveRequestExpand = "attachments,assignees,collections,contact" - TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsContactCreator TicketsRetrieveRequestExpand = "attachments,assignees,collections,contact,creator" - TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsContactCreatorParentTicket TicketsRetrieveRequestExpand = "attachments,assignees,collections,contact,creator,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsContactParentTicket TicketsRetrieveRequestExpand = "attachments,assignees,collections,contact,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsCreator TicketsRetrieveRequestExpand = "attachments,assignees,collections,creator" - TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsCreatorParentTicket TicketsRetrieveRequestExpand = "attachments,assignees,collections,creator,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsParentTicket TicketsRetrieveRequestExpand = "attachments,assignees,collections,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsAssigneesContact TicketsRetrieveRequestExpand = "attachments,assignees,contact" - TicketsRetrieveRequestExpandAttachmentsAssigneesContactCreator TicketsRetrieveRequestExpand = "attachments,assignees,contact,creator" - TicketsRetrieveRequestExpandAttachmentsAssigneesContactCreatorParentTicket TicketsRetrieveRequestExpand = "attachments,assignees,contact,creator,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsAssigneesContactParentTicket TicketsRetrieveRequestExpand = "attachments,assignees,contact,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsAssigneesCreator TicketsRetrieveRequestExpand = "attachments,assignees,creator" - TicketsRetrieveRequestExpandAttachmentsAssigneesCreatorParentTicket TicketsRetrieveRequestExpand = "attachments,assignees,creator,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsAssigneesParentTicket TicketsRetrieveRequestExpand = "attachments,assignees,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsCollections TicketsRetrieveRequestExpand = "attachments,collections" - TicketsRetrieveRequestExpandAttachmentsCollectionsAccount TicketsRetrieveRequestExpand = "attachments,collections,account" - TicketsRetrieveRequestExpandAttachmentsCollectionsAccountContact TicketsRetrieveRequestExpand = "attachments,collections,account,contact" - TicketsRetrieveRequestExpandAttachmentsCollectionsAccountContactCreator TicketsRetrieveRequestExpand = "attachments,collections,account,contact,creator" - TicketsRetrieveRequestExpandAttachmentsCollectionsAccountContactCreatorParentTicket TicketsRetrieveRequestExpand = "attachments,collections,account,contact,creator,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsCollectionsAccountContactParentTicket TicketsRetrieveRequestExpand = "attachments,collections,account,contact,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsCollectionsAccountCreator TicketsRetrieveRequestExpand = "attachments,collections,account,creator" - TicketsRetrieveRequestExpandAttachmentsCollectionsAccountCreatorParentTicket TicketsRetrieveRequestExpand = "attachments,collections,account,creator,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsCollectionsAccountParentTicket TicketsRetrieveRequestExpand = "attachments,collections,account,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsCollectionsAssignedTeams TicketsRetrieveRequestExpand = "attachments,collections,assigned_teams" - TicketsRetrieveRequestExpandAttachmentsCollectionsAssignedTeamsAccount TicketsRetrieveRequestExpand = "attachments,collections,assigned_teams,account" - TicketsRetrieveRequestExpandAttachmentsCollectionsAssignedTeamsAccountContact TicketsRetrieveRequestExpand = "attachments,collections,assigned_teams,account,contact" - TicketsRetrieveRequestExpandAttachmentsCollectionsAssignedTeamsAccountContactCreator TicketsRetrieveRequestExpand = "attachments,collections,assigned_teams,account,contact,creator" - TicketsRetrieveRequestExpandAttachmentsCollectionsAssignedTeamsAccountContactCreatorParentTicket TicketsRetrieveRequestExpand = "attachments,collections,assigned_teams,account,contact,creator,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsCollectionsAssignedTeamsAccountContactParentTicket TicketsRetrieveRequestExpand = "attachments,collections,assigned_teams,account,contact,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsCollectionsAssignedTeamsAccountCreator TicketsRetrieveRequestExpand = "attachments,collections,assigned_teams,account,creator" - TicketsRetrieveRequestExpandAttachmentsCollectionsAssignedTeamsAccountCreatorParentTicket TicketsRetrieveRequestExpand = "attachments,collections,assigned_teams,account,creator,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsCollectionsAssignedTeamsAccountParentTicket TicketsRetrieveRequestExpand = "attachments,collections,assigned_teams,account,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsCollectionsAssignedTeamsContact TicketsRetrieveRequestExpand = "attachments,collections,assigned_teams,contact" - TicketsRetrieveRequestExpandAttachmentsCollectionsAssignedTeamsContactCreator TicketsRetrieveRequestExpand = "attachments,collections,assigned_teams,contact,creator" - TicketsRetrieveRequestExpandAttachmentsCollectionsAssignedTeamsContactCreatorParentTicket TicketsRetrieveRequestExpand = "attachments,collections,assigned_teams,contact,creator,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsCollectionsAssignedTeamsContactParentTicket TicketsRetrieveRequestExpand = "attachments,collections,assigned_teams,contact,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsCollectionsAssignedTeamsCreator TicketsRetrieveRequestExpand = "attachments,collections,assigned_teams,creator" - TicketsRetrieveRequestExpandAttachmentsCollectionsAssignedTeamsCreatorParentTicket TicketsRetrieveRequestExpand = "attachments,collections,assigned_teams,creator,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsCollectionsAssignedTeamsParentTicket TicketsRetrieveRequestExpand = "attachments,collections,assigned_teams,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsCollectionsContact TicketsRetrieveRequestExpand = "attachments,collections,contact" - TicketsRetrieveRequestExpandAttachmentsCollectionsContactCreator TicketsRetrieveRequestExpand = "attachments,collections,contact,creator" - TicketsRetrieveRequestExpandAttachmentsCollectionsContactCreatorParentTicket TicketsRetrieveRequestExpand = "attachments,collections,contact,creator,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsCollectionsContactParentTicket TicketsRetrieveRequestExpand = "attachments,collections,contact,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsCollectionsCreator TicketsRetrieveRequestExpand = "attachments,collections,creator" - TicketsRetrieveRequestExpandAttachmentsCollectionsCreatorParentTicket TicketsRetrieveRequestExpand = "attachments,collections,creator,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsCollectionsParentTicket TicketsRetrieveRequestExpand = "attachments,collections,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsContact TicketsRetrieveRequestExpand = "attachments,contact" - TicketsRetrieveRequestExpandAttachmentsContactCreator TicketsRetrieveRequestExpand = "attachments,contact,creator" - TicketsRetrieveRequestExpandAttachmentsContactCreatorParentTicket TicketsRetrieveRequestExpand = "attachments,contact,creator,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsContactParentTicket TicketsRetrieveRequestExpand = "attachments,contact,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsCreator TicketsRetrieveRequestExpand = "attachments,creator" - TicketsRetrieveRequestExpandAttachmentsCreatorParentTicket TicketsRetrieveRequestExpand = "attachments,creator,parent_ticket" - TicketsRetrieveRequestExpandAttachmentsParentTicket TicketsRetrieveRequestExpand = "attachments,parent_ticket" - TicketsRetrieveRequestExpandCollections TicketsRetrieveRequestExpand = "collections" - TicketsRetrieveRequestExpandCollectionsAccount TicketsRetrieveRequestExpand = "collections,account" - TicketsRetrieveRequestExpandCollectionsAccountContact TicketsRetrieveRequestExpand = "collections,account,contact" - TicketsRetrieveRequestExpandCollectionsAccountContactCreator TicketsRetrieveRequestExpand = "collections,account,contact,creator" - TicketsRetrieveRequestExpandCollectionsAccountContactCreatorParentTicket TicketsRetrieveRequestExpand = "collections,account,contact,creator,parent_ticket" - TicketsRetrieveRequestExpandCollectionsAccountContactParentTicket TicketsRetrieveRequestExpand = "collections,account,contact,parent_ticket" - TicketsRetrieveRequestExpandCollectionsAccountCreator TicketsRetrieveRequestExpand = "collections,account,creator" - TicketsRetrieveRequestExpandCollectionsAccountCreatorParentTicket TicketsRetrieveRequestExpand = "collections,account,creator,parent_ticket" - TicketsRetrieveRequestExpandCollectionsAccountParentTicket TicketsRetrieveRequestExpand = "collections,account,parent_ticket" - TicketsRetrieveRequestExpandCollectionsAssignedTeams TicketsRetrieveRequestExpand = "collections,assigned_teams" - TicketsRetrieveRequestExpandCollectionsAssignedTeamsAccount TicketsRetrieveRequestExpand = "collections,assigned_teams,account" - TicketsRetrieveRequestExpandCollectionsAssignedTeamsAccountContact TicketsRetrieveRequestExpand = "collections,assigned_teams,account,contact" - TicketsRetrieveRequestExpandCollectionsAssignedTeamsAccountContactCreator TicketsRetrieveRequestExpand = "collections,assigned_teams,account,contact,creator" - TicketsRetrieveRequestExpandCollectionsAssignedTeamsAccountContactCreatorParentTicket TicketsRetrieveRequestExpand = "collections,assigned_teams,account,contact,creator,parent_ticket" - TicketsRetrieveRequestExpandCollectionsAssignedTeamsAccountContactParentTicket TicketsRetrieveRequestExpand = "collections,assigned_teams,account,contact,parent_ticket" - TicketsRetrieveRequestExpandCollectionsAssignedTeamsAccountCreator TicketsRetrieveRequestExpand = "collections,assigned_teams,account,creator" - TicketsRetrieveRequestExpandCollectionsAssignedTeamsAccountCreatorParentTicket TicketsRetrieveRequestExpand = "collections,assigned_teams,account,creator,parent_ticket" - TicketsRetrieveRequestExpandCollectionsAssignedTeamsAccountParentTicket TicketsRetrieveRequestExpand = "collections,assigned_teams,account,parent_ticket" - TicketsRetrieveRequestExpandCollectionsAssignedTeamsContact TicketsRetrieveRequestExpand = "collections,assigned_teams,contact" - TicketsRetrieveRequestExpandCollectionsAssignedTeamsContactCreator TicketsRetrieveRequestExpand = "collections,assigned_teams,contact,creator" - TicketsRetrieveRequestExpandCollectionsAssignedTeamsContactCreatorParentTicket TicketsRetrieveRequestExpand = "collections,assigned_teams,contact,creator,parent_ticket" - TicketsRetrieveRequestExpandCollectionsAssignedTeamsContactParentTicket TicketsRetrieveRequestExpand = "collections,assigned_teams,contact,parent_ticket" - TicketsRetrieveRequestExpandCollectionsAssignedTeamsCreator TicketsRetrieveRequestExpand = "collections,assigned_teams,creator" - TicketsRetrieveRequestExpandCollectionsAssignedTeamsCreatorParentTicket TicketsRetrieveRequestExpand = "collections,assigned_teams,creator,parent_ticket" - TicketsRetrieveRequestExpandCollectionsAssignedTeamsParentTicket TicketsRetrieveRequestExpand = "collections,assigned_teams,parent_ticket" - TicketsRetrieveRequestExpandCollectionsContact TicketsRetrieveRequestExpand = "collections,contact" - TicketsRetrieveRequestExpandCollectionsContactCreator TicketsRetrieveRequestExpand = "collections,contact,creator" - TicketsRetrieveRequestExpandCollectionsContactCreatorParentTicket TicketsRetrieveRequestExpand = "collections,contact,creator,parent_ticket" - TicketsRetrieveRequestExpandCollectionsContactParentTicket TicketsRetrieveRequestExpand = "collections,contact,parent_ticket" - TicketsRetrieveRequestExpandCollectionsCreator TicketsRetrieveRequestExpand = "collections,creator" - TicketsRetrieveRequestExpandCollectionsCreatorParentTicket TicketsRetrieveRequestExpand = "collections,creator,parent_ticket" - TicketsRetrieveRequestExpandCollectionsParentTicket TicketsRetrieveRequestExpand = "collections,parent_ticket" - TicketsRetrieveRequestExpandContact TicketsRetrieveRequestExpand = "contact" - TicketsRetrieveRequestExpandContactCreator TicketsRetrieveRequestExpand = "contact,creator" - TicketsRetrieveRequestExpandContactCreatorParentTicket TicketsRetrieveRequestExpand = "contact,creator,parent_ticket" - TicketsRetrieveRequestExpandContactParentTicket TicketsRetrieveRequestExpand = "contact,parent_ticket" - TicketsRetrieveRequestExpandCreator TicketsRetrieveRequestExpand = "creator" - TicketsRetrieveRequestExpandCreatorParentTicket TicketsRetrieveRequestExpand = "creator,parent_ticket" - TicketsRetrieveRequestExpandParentTicket TicketsRetrieveRequestExpand = "parent_ticket" + TicketsRetrieveRequestExpandItemAccount TicketsRetrieveRequestExpandItem = "account" + TicketsRetrieveRequestExpandItemAssignedTeams TicketsRetrieveRequestExpandItem = "assigned_teams" + TicketsRetrieveRequestExpandItemAssignees TicketsRetrieveRequestExpandItem = "assignees" + TicketsRetrieveRequestExpandItemAttachments TicketsRetrieveRequestExpandItem = "attachments" + TicketsRetrieveRequestExpandItemCollections TicketsRetrieveRequestExpandItem = "collections" + TicketsRetrieveRequestExpandItemContact TicketsRetrieveRequestExpandItem = "contact" + TicketsRetrieveRequestExpandItemCreator TicketsRetrieveRequestExpandItem = "creator" + TicketsRetrieveRequestExpandItemParentTicket TicketsRetrieveRequestExpandItem = "parent_ticket" ) -func NewTicketsRetrieveRequestExpandFromString(s string) (TicketsRetrieveRequestExpand, error) { +func NewTicketsRetrieveRequestExpandItemFromString(s string) (TicketsRetrieveRequestExpandItem, error) { switch s { case "account": - return TicketsRetrieveRequestExpandAccount, nil - case "account,contact": - return TicketsRetrieveRequestExpandAccountContact, nil - case "account,contact,creator": - return TicketsRetrieveRequestExpandAccountContactCreator, nil - case "account,contact,creator,parent_ticket": - return TicketsRetrieveRequestExpandAccountContactCreatorParentTicket, nil - case "account,contact,parent_ticket": - return TicketsRetrieveRequestExpandAccountContactParentTicket, nil - case "account,creator": - return TicketsRetrieveRequestExpandAccountCreator, nil - case "account,creator,parent_ticket": - return TicketsRetrieveRequestExpandAccountCreatorParentTicket, nil - case "account,parent_ticket": - return TicketsRetrieveRequestExpandAccountParentTicket, nil + return TicketsRetrieveRequestExpandItemAccount, nil case "assigned_teams": - return TicketsRetrieveRequestExpandAssignedTeams, nil - case "assigned_teams,account": - return TicketsRetrieveRequestExpandAssignedTeamsAccount, nil - case "assigned_teams,account,contact": - return TicketsRetrieveRequestExpandAssignedTeamsAccountContact, nil - case "assigned_teams,account,contact,creator": - return TicketsRetrieveRequestExpandAssignedTeamsAccountContactCreator, nil - case "assigned_teams,account,contact,creator,parent_ticket": - return TicketsRetrieveRequestExpandAssignedTeamsAccountContactCreatorParentTicket, nil - case "assigned_teams,account,contact,parent_ticket": - return TicketsRetrieveRequestExpandAssignedTeamsAccountContactParentTicket, nil - case "assigned_teams,account,creator": - return TicketsRetrieveRequestExpandAssignedTeamsAccountCreator, nil - case "assigned_teams,account,creator,parent_ticket": - return TicketsRetrieveRequestExpandAssignedTeamsAccountCreatorParentTicket, nil - case "assigned_teams,account,parent_ticket": - return TicketsRetrieveRequestExpandAssignedTeamsAccountParentTicket, nil - case "assigned_teams,contact": - return TicketsRetrieveRequestExpandAssignedTeamsContact, nil - case "assigned_teams,contact,creator": - return TicketsRetrieveRequestExpandAssignedTeamsContactCreator, nil - case "assigned_teams,contact,creator,parent_ticket": - return TicketsRetrieveRequestExpandAssignedTeamsContactCreatorParentTicket, nil - case "assigned_teams,contact,parent_ticket": - return TicketsRetrieveRequestExpandAssignedTeamsContactParentTicket, nil - case "assigned_teams,creator": - return TicketsRetrieveRequestExpandAssignedTeamsCreator, nil - case "assigned_teams,creator,parent_ticket": - return TicketsRetrieveRequestExpandAssignedTeamsCreatorParentTicket, nil - case "assigned_teams,parent_ticket": - return TicketsRetrieveRequestExpandAssignedTeamsParentTicket, nil + return TicketsRetrieveRequestExpandItemAssignedTeams, nil case "assignees": - return TicketsRetrieveRequestExpandAssignees, nil - case "assignees,account": - return TicketsRetrieveRequestExpandAssigneesAccount, nil - case "assignees,account,contact": - return TicketsRetrieveRequestExpandAssigneesAccountContact, nil - case "assignees,account,contact,creator": - return TicketsRetrieveRequestExpandAssigneesAccountContactCreator, nil - case "assignees,account,contact,creator,parent_ticket": - return TicketsRetrieveRequestExpandAssigneesAccountContactCreatorParentTicket, nil - case "assignees,account,contact,parent_ticket": - return TicketsRetrieveRequestExpandAssigneesAccountContactParentTicket, nil - case "assignees,account,creator": - return TicketsRetrieveRequestExpandAssigneesAccountCreator, nil - case "assignees,account,creator,parent_ticket": - return TicketsRetrieveRequestExpandAssigneesAccountCreatorParentTicket, nil - case "assignees,account,parent_ticket": - return TicketsRetrieveRequestExpandAssigneesAccountParentTicket, nil - case "assignees,assigned_teams": - return TicketsRetrieveRequestExpandAssigneesAssignedTeams, nil - case "assignees,assigned_teams,account": - return TicketsRetrieveRequestExpandAssigneesAssignedTeamsAccount, nil - case "assignees,assigned_teams,account,contact": - return TicketsRetrieveRequestExpandAssigneesAssignedTeamsAccountContact, nil - case "assignees,assigned_teams,account,contact,creator": - return TicketsRetrieveRequestExpandAssigneesAssignedTeamsAccountContactCreator, nil - case "assignees,assigned_teams,account,contact,creator,parent_ticket": - return TicketsRetrieveRequestExpandAssigneesAssignedTeamsAccountContactCreatorParentTicket, nil - case "assignees,assigned_teams,account,contact,parent_ticket": - return TicketsRetrieveRequestExpandAssigneesAssignedTeamsAccountContactParentTicket, nil - case "assignees,assigned_teams,account,creator": - return TicketsRetrieveRequestExpandAssigneesAssignedTeamsAccountCreator, nil - case "assignees,assigned_teams,account,creator,parent_ticket": - return TicketsRetrieveRequestExpandAssigneesAssignedTeamsAccountCreatorParentTicket, nil - case "assignees,assigned_teams,account,parent_ticket": - return TicketsRetrieveRequestExpandAssigneesAssignedTeamsAccountParentTicket, nil - case "assignees,assigned_teams,contact": - return TicketsRetrieveRequestExpandAssigneesAssignedTeamsContact, nil - case "assignees,assigned_teams,contact,creator": - return TicketsRetrieveRequestExpandAssigneesAssignedTeamsContactCreator, nil - case "assignees,assigned_teams,contact,creator,parent_ticket": - return TicketsRetrieveRequestExpandAssigneesAssignedTeamsContactCreatorParentTicket, nil - case "assignees,assigned_teams,contact,parent_ticket": - return TicketsRetrieveRequestExpandAssigneesAssignedTeamsContactParentTicket, nil - case "assignees,assigned_teams,creator": - return TicketsRetrieveRequestExpandAssigneesAssignedTeamsCreator, nil - case "assignees,assigned_teams,creator,parent_ticket": - return TicketsRetrieveRequestExpandAssigneesAssignedTeamsCreatorParentTicket, nil - case "assignees,assigned_teams,parent_ticket": - return TicketsRetrieveRequestExpandAssigneesAssignedTeamsParentTicket, nil - case "assignees,collections": - return TicketsRetrieveRequestExpandAssigneesCollections, nil - case "assignees,collections,account": - return TicketsRetrieveRequestExpandAssigneesCollectionsAccount, nil - case "assignees,collections,account,contact": - return TicketsRetrieveRequestExpandAssigneesCollectionsAccountContact, nil - case "assignees,collections,account,contact,creator": - return TicketsRetrieveRequestExpandAssigneesCollectionsAccountContactCreator, nil - case "assignees,collections,account,contact,creator,parent_ticket": - return TicketsRetrieveRequestExpandAssigneesCollectionsAccountContactCreatorParentTicket, nil - case "assignees,collections,account,contact,parent_ticket": - return TicketsRetrieveRequestExpandAssigneesCollectionsAccountContactParentTicket, nil - case "assignees,collections,account,creator": - return TicketsRetrieveRequestExpandAssigneesCollectionsAccountCreator, nil - case "assignees,collections,account,creator,parent_ticket": - return TicketsRetrieveRequestExpandAssigneesCollectionsAccountCreatorParentTicket, nil - case "assignees,collections,account,parent_ticket": - return TicketsRetrieveRequestExpandAssigneesCollectionsAccountParentTicket, nil - case "assignees,collections,assigned_teams": - return TicketsRetrieveRequestExpandAssigneesCollectionsAssignedTeams, nil - case "assignees,collections,assigned_teams,account": - return TicketsRetrieveRequestExpandAssigneesCollectionsAssignedTeamsAccount, nil - case "assignees,collections,assigned_teams,account,contact": - return TicketsRetrieveRequestExpandAssigneesCollectionsAssignedTeamsAccountContact, nil - case "assignees,collections,assigned_teams,account,contact,creator": - return TicketsRetrieveRequestExpandAssigneesCollectionsAssignedTeamsAccountContactCreator, nil - case "assignees,collections,assigned_teams,account,contact,creator,parent_ticket": - return TicketsRetrieveRequestExpandAssigneesCollectionsAssignedTeamsAccountContactCreatorParentTicket, nil - case "assignees,collections,assigned_teams,account,contact,parent_ticket": - return TicketsRetrieveRequestExpandAssigneesCollectionsAssignedTeamsAccountContactParentTicket, nil - case "assignees,collections,assigned_teams,account,creator": - return TicketsRetrieveRequestExpandAssigneesCollectionsAssignedTeamsAccountCreator, nil - case "assignees,collections,assigned_teams,account,creator,parent_ticket": - return TicketsRetrieveRequestExpandAssigneesCollectionsAssignedTeamsAccountCreatorParentTicket, nil - case "assignees,collections,assigned_teams,account,parent_ticket": - return TicketsRetrieveRequestExpandAssigneesCollectionsAssignedTeamsAccountParentTicket, nil - case "assignees,collections,assigned_teams,contact": - return TicketsRetrieveRequestExpandAssigneesCollectionsAssignedTeamsContact, nil - case "assignees,collections,assigned_teams,contact,creator": - return TicketsRetrieveRequestExpandAssigneesCollectionsAssignedTeamsContactCreator, nil - case "assignees,collections,assigned_teams,contact,creator,parent_ticket": - return TicketsRetrieveRequestExpandAssigneesCollectionsAssignedTeamsContactCreatorParentTicket, nil - case "assignees,collections,assigned_teams,contact,parent_ticket": - return TicketsRetrieveRequestExpandAssigneesCollectionsAssignedTeamsContactParentTicket, nil - case "assignees,collections,assigned_teams,creator": - return TicketsRetrieveRequestExpandAssigneesCollectionsAssignedTeamsCreator, nil - case "assignees,collections,assigned_teams,creator,parent_ticket": - return TicketsRetrieveRequestExpandAssigneesCollectionsAssignedTeamsCreatorParentTicket, nil - case "assignees,collections,assigned_teams,parent_ticket": - return TicketsRetrieveRequestExpandAssigneesCollectionsAssignedTeamsParentTicket, nil - case "assignees,collections,contact": - return TicketsRetrieveRequestExpandAssigneesCollectionsContact, nil - case "assignees,collections,contact,creator": - return TicketsRetrieveRequestExpandAssigneesCollectionsContactCreator, nil - case "assignees,collections,contact,creator,parent_ticket": - return TicketsRetrieveRequestExpandAssigneesCollectionsContactCreatorParentTicket, nil - case "assignees,collections,contact,parent_ticket": - return TicketsRetrieveRequestExpandAssigneesCollectionsContactParentTicket, nil - case "assignees,collections,creator": - return TicketsRetrieveRequestExpandAssigneesCollectionsCreator, nil - case "assignees,collections,creator,parent_ticket": - return TicketsRetrieveRequestExpandAssigneesCollectionsCreatorParentTicket, nil - case "assignees,collections,parent_ticket": - return TicketsRetrieveRequestExpandAssigneesCollectionsParentTicket, nil - case "assignees,contact": - return TicketsRetrieveRequestExpandAssigneesContact, nil - case "assignees,contact,creator": - return TicketsRetrieveRequestExpandAssigneesContactCreator, nil - case "assignees,contact,creator,parent_ticket": - return TicketsRetrieveRequestExpandAssigneesContactCreatorParentTicket, nil - case "assignees,contact,parent_ticket": - return TicketsRetrieveRequestExpandAssigneesContactParentTicket, nil - case "assignees,creator": - return TicketsRetrieveRequestExpandAssigneesCreator, nil - case "assignees,creator,parent_ticket": - return TicketsRetrieveRequestExpandAssigneesCreatorParentTicket, nil - case "assignees,parent_ticket": - return TicketsRetrieveRequestExpandAssigneesParentTicket, nil + return TicketsRetrieveRequestExpandItemAssignees, nil case "attachments": - return TicketsRetrieveRequestExpandAttachments, nil - case "attachments,account": - return TicketsRetrieveRequestExpandAttachmentsAccount, nil - case "attachments,account,contact": - return TicketsRetrieveRequestExpandAttachmentsAccountContact, nil - case "attachments,account,contact,creator": - return TicketsRetrieveRequestExpandAttachmentsAccountContactCreator, nil - case "attachments,account,contact,creator,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsAccountContactCreatorParentTicket, nil - case "attachments,account,contact,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsAccountContactParentTicket, nil - case "attachments,account,creator": - return TicketsRetrieveRequestExpandAttachmentsAccountCreator, nil - case "attachments,account,creator,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsAccountCreatorParentTicket, nil - case "attachments,account,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsAccountParentTicket, nil - case "attachments,assigned_teams": - return TicketsRetrieveRequestExpandAttachmentsAssignedTeams, nil - case "attachments,assigned_teams,account": - return TicketsRetrieveRequestExpandAttachmentsAssignedTeamsAccount, nil - case "attachments,assigned_teams,account,contact": - return TicketsRetrieveRequestExpandAttachmentsAssignedTeamsAccountContact, nil - case "attachments,assigned_teams,account,contact,creator": - return TicketsRetrieveRequestExpandAttachmentsAssignedTeamsAccountContactCreator, nil - case "attachments,assigned_teams,account,contact,creator,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsAssignedTeamsAccountContactCreatorParentTicket, nil - case "attachments,assigned_teams,account,contact,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsAssignedTeamsAccountContactParentTicket, nil - case "attachments,assigned_teams,account,creator": - return TicketsRetrieveRequestExpandAttachmentsAssignedTeamsAccountCreator, nil - case "attachments,assigned_teams,account,creator,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsAssignedTeamsAccountCreatorParentTicket, nil - case "attachments,assigned_teams,account,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsAssignedTeamsAccountParentTicket, nil - case "attachments,assigned_teams,contact": - return TicketsRetrieveRequestExpandAttachmentsAssignedTeamsContact, nil - case "attachments,assigned_teams,contact,creator": - return TicketsRetrieveRequestExpandAttachmentsAssignedTeamsContactCreator, nil - case "attachments,assigned_teams,contact,creator,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsAssignedTeamsContactCreatorParentTicket, nil - case "attachments,assigned_teams,contact,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsAssignedTeamsContactParentTicket, nil - case "attachments,assigned_teams,creator": - return TicketsRetrieveRequestExpandAttachmentsAssignedTeamsCreator, nil - case "attachments,assigned_teams,creator,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsAssignedTeamsCreatorParentTicket, nil - case "attachments,assigned_teams,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsAssignedTeamsParentTicket, nil - case "attachments,assignees": - return TicketsRetrieveRequestExpandAttachmentsAssignees, nil - case "attachments,assignees,account": - return TicketsRetrieveRequestExpandAttachmentsAssigneesAccount, nil - case "attachments,assignees,account,contact": - return TicketsRetrieveRequestExpandAttachmentsAssigneesAccountContact, nil - case "attachments,assignees,account,contact,creator": - return TicketsRetrieveRequestExpandAttachmentsAssigneesAccountContactCreator, nil - case "attachments,assignees,account,contact,creator,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsAssigneesAccountContactCreatorParentTicket, nil - case "attachments,assignees,account,contact,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsAssigneesAccountContactParentTicket, nil - case "attachments,assignees,account,creator": - return TicketsRetrieveRequestExpandAttachmentsAssigneesAccountCreator, nil - case "attachments,assignees,account,creator,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsAssigneesAccountCreatorParentTicket, nil - case "attachments,assignees,account,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsAssigneesAccountParentTicket, nil - case "attachments,assignees,assigned_teams": - return TicketsRetrieveRequestExpandAttachmentsAssigneesAssignedTeams, nil - case "attachments,assignees,assigned_teams,account": - return TicketsRetrieveRequestExpandAttachmentsAssigneesAssignedTeamsAccount, nil - case "attachments,assignees,assigned_teams,account,contact": - return TicketsRetrieveRequestExpandAttachmentsAssigneesAssignedTeamsAccountContact, nil - case "attachments,assignees,assigned_teams,account,contact,creator": - return TicketsRetrieveRequestExpandAttachmentsAssigneesAssignedTeamsAccountContactCreator, nil - case "attachments,assignees,assigned_teams,account,contact,creator,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsAssigneesAssignedTeamsAccountContactCreatorParentTicket, nil - case "attachments,assignees,assigned_teams,account,contact,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsAssigneesAssignedTeamsAccountContactParentTicket, nil - case "attachments,assignees,assigned_teams,account,creator": - return TicketsRetrieveRequestExpandAttachmentsAssigneesAssignedTeamsAccountCreator, nil - case "attachments,assignees,assigned_teams,account,creator,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsAssigneesAssignedTeamsAccountCreatorParentTicket, nil - case "attachments,assignees,assigned_teams,account,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsAssigneesAssignedTeamsAccountParentTicket, nil - case "attachments,assignees,assigned_teams,contact": - return TicketsRetrieveRequestExpandAttachmentsAssigneesAssignedTeamsContact, nil - case "attachments,assignees,assigned_teams,contact,creator": - return TicketsRetrieveRequestExpandAttachmentsAssigneesAssignedTeamsContactCreator, nil - case "attachments,assignees,assigned_teams,contact,creator,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsAssigneesAssignedTeamsContactCreatorParentTicket, nil - case "attachments,assignees,assigned_teams,contact,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsAssigneesAssignedTeamsContactParentTicket, nil - case "attachments,assignees,assigned_teams,creator": - return TicketsRetrieveRequestExpandAttachmentsAssigneesAssignedTeamsCreator, nil - case "attachments,assignees,assigned_teams,creator,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsAssigneesAssignedTeamsCreatorParentTicket, nil - case "attachments,assignees,assigned_teams,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsAssigneesAssignedTeamsParentTicket, nil - case "attachments,assignees,collections": - return TicketsRetrieveRequestExpandAttachmentsAssigneesCollections, nil - case "attachments,assignees,collections,account": - return TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsAccount, nil - case "attachments,assignees,collections,account,contact": - return TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsAccountContact, nil - case "attachments,assignees,collections,account,contact,creator": - return TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsAccountContactCreator, nil - case "attachments,assignees,collections,account,contact,creator,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsAccountContactCreatorParentTicket, nil - case "attachments,assignees,collections,account,contact,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsAccountContactParentTicket, nil - case "attachments,assignees,collections,account,creator": - return TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsAccountCreator, nil - case "attachments,assignees,collections,account,creator,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsAccountCreatorParentTicket, nil - case "attachments,assignees,collections,account,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsAccountParentTicket, nil - case "attachments,assignees,collections,assigned_teams": - return TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsAssignedTeams, nil - case "attachments,assignees,collections,assigned_teams,account": - return TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsAccount, nil - case "attachments,assignees,collections,assigned_teams,account,contact": - return TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsAccountContact, nil - case "attachments,assignees,collections,assigned_teams,account,contact,creator": - return TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsAccountContactCreator, nil - case "attachments,assignees,collections,assigned_teams,account,contact,creator,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsAccountContactCreatorParentTicket, nil - case "attachments,assignees,collections,assigned_teams,account,contact,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsAccountContactParentTicket, nil - case "attachments,assignees,collections,assigned_teams,account,creator": - return TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsAccountCreator, nil - case "attachments,assignees,collections,assigned_teams,account,creator,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsAccountCreatorParentTicket, nil - case "attachments,assignees,collections,assigned_teams,account,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsAccountParentTicket, nil - case "attachments,assignees,collections,assigned_teams,contact": - return TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsContact, nil - case "attachments,assignees,collections,assigned_teams,contact,creator": - return TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsContactCreator, nil - case "attachments,assignees,collections,assigned_teams,contact,creator,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsContactCreatorParentTicket, nil - case "attachments,assignees,collections,assigned_teams,contact,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsContactParentTicket, nil - case "attachments,assignees,collections,assigned_teams,creator": - return TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsCreator, nil - case "attachments,assignees,collections,assigned_teams,creator,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsCreatorParentTicket, nil - case "attachments,assignees,collections,assigned_teams,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsAssignedTeamsParentTicket, nil - case "attachments,assignees,collections,contact": - return TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsContact, nil - case "attachments,assignees,collections,contact,creator": - return TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsContactCreator, nil - case "attachments,assignees,collections,contact,creator,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsContactCreatorParentTicket, nil - case "attachments,assignees,collections,contact,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsContactParentTicket, nil - case "attachments,assignees,collections,creator": - return TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsCreator, nil - case "attachments,assignees,collections,creator,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsCreatorParentTicket, nil - case "attachments,assignees,collections,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsAssigneesCollectionsParentTicket, nil - case "attachments,assignees,contact": - return TicketsRetrieveRequestExpandAttachmentsAssigneesContact, nil - case "attachments,assignees,contact,creator": - return TicketsRetrieveRequestExpandAttachmentsAssigneesContactCreator, nil - case "attachments,assignees,contact,creator,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsAssigneesContactCreatorParentTicket, nil - case "attachments,assignees,contact,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsAssigneesContactParentTicket, nil - case "attachments,assignees,creator": - return TicketsRetrieveRequestExpandAttachmentsAssigneesCreator, nil - case "attachments,assignees,creator,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsAssigneesCreatorParentTicket, nil - case "attachments,assignees,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsAssigneesParentTicket, nil - case "attachments,collections": - return TicketsRetrieveRequestExpandAttachmentsCollections, nil - case "attachments,collections,account": - return TicketsRetrieveRequestExpandAttachmentsCollectionsAccount, nil - case "attachments,collections,account,contact": - return TicketsRetrieveRequestExpandAttachmentsCollectionsAccountContact, nil - case "attachments,collections,account,contact,creator": - return TicketsRetrieveRequestExpandAttachmentsCollectionsAccountContactCreator, nil - case "attachments,collections,account,contact,creator,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsCollectionsAccountContactCreatorParentTicket, nil - case "attachments,collections,account,contact,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsCollectionsAccountContactParentTicket, nil - case "attachments,collections,account,creator": - return TicketsRetrieveRequestExpandAttachmentsCollectionsAccountCreator, nil - case "attachments,collections,account,creator,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsCollectionsAccountCreatorParentTicket, nil - case "attachments,collections,account,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsCollectionsAccountParentTicket, nil - case "attachments,collections,assigned_teams": - return TicketsRetrieveRequestExpandAttachmentsCollectionsAssignedTeams, nil - case "attachments,collections,assigned_teams,account": - return TicketsRetrieveRequestExpandAttachmentsCollectionsAssignedTeamsAccount, nil - case "attachments,collections,assigned_teams,account,contact": - return TicketsRetrieveRequestExpandAttachmentsCollectionsAssignedTeamsAccountContact, nil - case "attachments,collections,assigned_teams,account,contact,creator": - return TicketsRetrieveRequestExpandAttachmentsCollectionsAssignedTeamsAccountContactCreator, nil - case "attachments,collections,assigned_teams,account,contact,creator,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsCollectionsAssignedTeamsAccountContactCreatorParentTicket, nil - case "attachments,collections,assigned_teams,account,contact,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsCollectionsAssignedTeamsAccountContactParentTicket, nil - case "attachments,collections,assigned_teams,account,creator": - return TicketsRetrieveRequestExpandAttachmentsCollectionsAssignedTeamsAccountCreator, nil - case "attachments,collections,assigned_teams,account,creator,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsCollectionsAssignedTeamsAccountCreatorParentTicket, nil - case "attachments,collections,assigned_teams,account,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsCollectionsAssignedTeamsAccountParentTicket, nil - case "attachments,collections,assigned_teams,contact": - return TicketsRetrieveRequestExpandAttachmentsCollectionsAssignedTeamsContact, nil - case "attachments,collections,assigned_teams,contact,creator": - return TicketsRetrieveRequestExpandAttachmentsCollectionsAssignedTeamsContactCreator, nil - case "attachments,collections,assigned_teams,contact,creator,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsCollectionsAssignedTeamsContactCreatorParentTicket, nil - case "attachments,collections,assigned_teams,contact,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsCollectionsAssignedTeamsContactParentTicket, nil - case "attachments,collections,assigned_teams,creator": - return TicketsRetrieveRequestExpandAttachmentsCollectionsAssignedTeamsCreator, nil - case "attachments,collections,assigned_teams,creator,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsCollectionsAssignedTeamsCreatorParentTicket, nil - case "attachments,collections,assigned_teams,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsCollectionsAssignedTeamsParentTicket, nil - case "attachments,collections,contact": - return TicketsRetrieveRequestExpandAttachmentsCollectionsContact, nil - case "attachments,collections,contact,creator": - return TicketsRetrieveRequestExpandAttachmentsCollectionsContactCreator, nil - case "attachments,collections,contact,creator,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsCollectionsContactCreatorParentTicket, nil - case "attachments,collections,contact,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsCollectionsContactParentTicket, nil - case "attachments,collections,creator": - return TicketsRetrieveRequestExpandAttachmentsCollectionsCreator, nil - case "attachments,collections,creator,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsCollectionsCreatorParentTicket, nil - case "attachments,collections,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsCollectionsParentTicket, nil - case "attachments,contact": - return TicketsRetrieveRequestExpandAttachmentsContact, nil - case "attachments,contact,creator": - return TicketsRetrieveRequestExpandAttachmentsContactCreator, nil - case "attachments,contact,creator,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsContactCreatorParentTicket, nil - case "attachments,contact,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsContactParentTicket, nil - case "attachments,creator": - return TicketsRetrieveRequestExpandAttachmentsCreator, nil - case "attachments,creator,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsCreatorParentTicket, nil - case "attachments,parent_ticket": - return TicketsRetrieveRequestExpandAttachmentsParentTicket, nil + return TicketsRetrieveRequestExpandItemAttachments, nil case "collections": - return TicketsRetrieveRequestExpandCollections, nil - case "collections,account": - return TicketsRetrieveRequestExpandCollectionsAccount, nil - case "collections,account,contact": - return TicketsRetrieveRequestExpandCollectionsAccountContact, nil - case "collections,account,contact,creator": - return TicketsRetrieveRequestExpandCollectionsAccountContactCreator, nil - case "collections,account,contact,creator,parent_ticket": - return TicketsRetrieveRequestExpandCollectionsAccountContactCreatorParentTicket, nil - case "collections,account,contact,parent_ticket": - return TicketsRetrieveRequestExpandCollectionsAccountContactParentTicket, nil - case "collections,account,creator": - return TicketsRetrieveRequestExpandCollectionsAccountCreator, nil - case "collections,account,creator,parent_ticket": - return TicketsRetrieveRequestExpandCollectionsAccountCreatorParentTicket, nil - case "collections,account,parent_ticket": - return TicketsRetrieveRequestExpandCollectionsAccountParentTicket, nil - case "collections,assigned_teams": - return TicketsRetrieveRequestExpandCollectionsAssignedTeams, nil - case "collections,assigned_teams,account": - return TicketsRetrieveRequestExpandCollectionsAssignedTeamsAccount, nil - case "collections,assigned_teams,account,contact": - return TicketsRetrieveRequestExpandCollectionsAssignedTeamsAccountContact, nil - case "collections,assigned_teams,account,contact,creator": - return TicketsRetrieveRequestExpandCollectionsAssignedTeamsAccountContactCreator, nil - case "collections,assigned_teams,account,contact,creator,parent_ticket": - return TicketsRetrieveRequestExpandCollectionsAssignedTeamsAccountContactCreatorParentTicket, nil - case "collections,assigned_teams,account,contact,parent_ticket": - return TicketsRetrieveRequestExpandCollectionsAssignedTeamsAccountContactParentTicket, nil - case "collections,assigned_teams,account,creator": - return TicketsRetrieveRequestExpandCollectionsAssignedTeamsAccountCreator, nil - case "collections,assigned_teams,account,creator,parent_ticket": - return TicketsRetrieveRequestExpandCollectionsAssignedTeamsAccountCreatorParentTicket, nil - case "collections,assigned_teams,account,parent_ticket": - return TicketsRetrieveRequestExpandCollectionsAssignedTeamsAccountParentTicket, nil - case "collections,assigned_teams,contact": - return TicketsRetrieveRequestExpandCollectionsAssignedTeamsContact, nil - case "collections,assigned_teams,contact,creator": - return TicketsRetrieveRequestExpandCollectionsAssignedTeamsContactCreator, nil - case "collections,assigned_teams,contact,creator,parent_ticket": - return TicketsRetrieveRequestExpandCollectionsAssignedTeamsContactCreatorParentTicket, nil - case "collections,assigned_teams,contact,parent_ticket": - return TicketsRetrieveRequestExpandCollectionsAssignedTeamsContactParentTicket, nil - case "collections,assigned_teams,creator": - return TicketsRetrieveRequestExpandCollectionsAssignedTeamsCreator, nil - case "collections,assigned_teams,creator,parent_ticket": - return TicketsRetrieveRequestExpandCollectionsAssignedTeamsCreatorParentTicket, nil - case "collections,assigned_teams,parent_ticket": - return TicketsRetrieveRequestExpandCollectionsAssignedTeamsParentTicket, nil - case "collections,contact": - return TicketsRetrieveRequestExpandCollectionsContact, nil - case "collections,contact,creator": - return TicketsRetrieveRequestExpandCollectionsContactCreator, nil - case "collections,contact,creator,parent_ticket": - return TicketsRetrieveRequestExpandCollectionsContactCreatorParentTicket, nil - case "collections,contact,parent_ticket": - return TicketsRetrieveRequestExpandCollectionsContactParentTicket, nil - case "collections,creator": - return TicketsRetrieveRequestExpandCollectionsCreator, nil - case "collections,creator,parent_ticket": - return TicketsRetrieveRequestExpandCollectionsCreatorParentTicket, nil - case "collections,parent_ticket": - return TicketsRetrieveRequestExpandCollectionsParentTicket, nil + return TicketsRetrieveRequestExpandItemCollections, nil case "contact": - return TicketsRetrieveRequestExpandContact, nil - case "contact,creator": - return TicketsRetrieveRequestExpandContactCreator, nil - case "contact,creator,parent_ticket": - return TicketsRetrieveRequestExpandContactCreatorParentTicket, nil - case "contact,parent_ticket": - return TicketsRetrieveRequestExpandContactParentTicket, nil + return TicketsRetrieveRequestExpandItemContact, nil case "creator": - return TicketsRetrieveRequestExpandCreator, nil - case "creator,parent_ticket": - return TicketsRetrieveRequestExpandCreatorParentTicket, nil + return TicketsRetrieveRequestExpandItemCreator, nil case "parent_ticket": - return TicketsRetrieveRequestExpandParentTicket, nil + return TicketsRetrieveRequestExpandItemParentTicket, nil } - var t TicketsRetrieveRequestExpand + var t TicketsRetrieveRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (t TicketsRetrieveRequestExpand) Ptr() *TicketsRetrieveRequestExpand { +func (t TicketsRetrieveRequestExpandItem) Ptr() *TicketsRetrieveRequestExpandItem { return &t } @@ -1863,42 +396,1725 @@ func (t TicketsRetrieveRequestShowEnumOrigins) Ptr() *TicketsRetrieveRequestShow return &t } -type TicketsViewersListRequestExpand string +type TicketsViewersListRequestExpandItem string const ( - TicketsViewersListRequestExpandTeam TicketsViewersListRequestExpand = "team" - TicketsViewersListRequestExpandUser TicketsViewersListRequestExpand = "user" - TicketsViewersListRequestExpandUserTeam TicketsViewersListRequestExpand = "user,team" + TicketsViewersListRequestExpandItemTeam TicketsViewersListRequestExpandItem = "team" + TicketsViewersListRequestExpandItemUser TicketsViewersListRequestExpandItem = "user" ) -func NewTicketsViewersListRequestExpandFromString(s string) (TicketsViewersListRequestExpand, error) { +func NewTicketsViewersListRequestExpandItemFromString(s string) (TicketsViewersListRequestExpandItem, error) { switch s { case "team": - return TicketsViewersListRequestExpandTeam, nil + return TicketsViewersListRequestExpandItemTeam, nil case "user": - return TicketsViewersListRequestExpandUser, nil - case "user,team": - return TicketsViewersListRequestExpandUserTeam, nil + return TicketsViewersListRequestExpandItemUser, nil } - var t TicketsViewersListRequestExpand + var t TicketsViewersListRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (t TicketsViewersListRequestExpand) Ptr() *TicketsViewersListRequestExpand { +func (t TicketsViewersListRequestExpandItem) Ptr() *TicketsViewersListRequestExpandItem { return &t } +type PaginatedRemoteFieldClassList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*RemoteFieldClass `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedRemoteFieldClassList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedRemoteFieldClassList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedRemoteFieldClassList) GetResults() []*RemoteFieldClass { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedRemoteFieldClassList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedRemoteFieldClassList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedRemoteFieldClassList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedRemoteFieldClassList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedRemoteFieldClassList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +type PaginatedTicketList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Ticket `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PaginatedTicketList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedTicketList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedTicketList) GetResults() []*Ticket { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedTicketList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedTicketList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedTicketList + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *p = PaginatedTicketList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PaginatedTicketList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +// # The Ticket Object +// ### Description +// The `Ticket` object is used to represent a ticket, issue, task or case. +// ### Usage Example +// TODO +type PatchedTicketRequest struct { + // The ticket's name. + Name *string `json:"name,omitempty" url:"name,omitempty"` + // The individual `Users` who are assigned to this ticket. This does not include `Users` who just have view access to this ticket. To fetch all `Users` and `Teams` that can access the ticket, use the `GET /tickets/{ticket_id}/viewers` [endpoint](https://docs.merge.dev/ticketing/tickets/#tickets_viewers_list). + Assignees []*string `json:"assignees,omitempty" url:"assignees,omitempty"` + // The `Teams` that are assigned to this ticket. This does not include `Teams` who just have view access to this ticket. To fetch all `Users` and `Teams` that can access this ticket, use the `GET /tickets/{ticket_id}/viewers` [endpoint](https://docs.merge.dev/ticketing/tickets/#tickets_viewers_list). + AssignedTeams []*string `json:"assigned_teams,omitempty" url:"assigned_teams,omitempty"` + // The user who created this ticket. + Creator *string `json:"creator,omitempty" url:"creator,omitempty"` + // The ticket's due date. + DueDate *time.Time `json:"due_date,omitempty" url:"due_date,omitempty"` + // The current status of the ticket. + // + // * `OPEN` - OPEN + // * `CLOSED` - CLOSED + // * `IN_PROGRESS` - IN_PROGRESS + // * `ON_HOLD` - ON_HOLD + Status *PatchedTicketRequestStatus `json:"status,omitempty" url:"status,omitempty"` + // The ticket’s description. HTML version of description is mapped if supported by the third-party platform. + Description *string `json:"description,omitempty" url:"description,omitempty"` + // The `Collections` that this `Ticket` is included in. + Collections []*string `json:"collections,omitempty" url:"collections,omitempty"` + // The sub category of the ticket within the 3rd party system. Examples include incident, task, subtask or to-do. + TicketType *string `json:"ticket_type,omitempty" url:"ticket_type,omitempty"` + // The account associated with the ticket. + Account *string `json:"account,omitempty" url:"account,omitempty"` + // The contact associated with the ticket. + Contact *string `json:"contact,omitempty" url:"contact,omitempty"` + // The ticket's parent ticket. + ParentTicket *string `json:"parent_ticket,omitempty" url:"parent_ticket,omitempty"` + // The description of who is able to access a given ticket, or where access is inherited from. + // + // * `COMPANY` - COMPANY + // * `PUBLIC` - PUBLIC + // * `PRIVATE` - PRIVATE + // * `COLLECTION` - COLLECTION + AccessLevel *PatchedTicketRequestAccessLevel `json:"access_level,omitempty" url:"access_level,omitempty"` + Tags []*string `json:"tags,omitempty" url:"tags,omitempty"` + Roles []*string `json:"roles,omitempty" url:"roles,omitempty"` + // When the ticket was completed. + CompletedAt *time.Time `json:"completed_at,omitempty" url:"completed_at,omitempty"` + // The 3rd party url of the Ticket. + TicketUrl *string `json:"ticket_url,omitempty" url:"ticket_url,omitempty"` + // The priority or urgency of the Ticket. + // + // * `URGENT` - URGENT + // * `HIGH` - HIGH + // * `NORMAL` - NORMAL + // * `LOW` - LOW + Priority *PriorityEnum `json:"priority,omitempty" url:"priority,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + RemoteFields []*RemoteFieldRequest `json:"remote_fields,omitempty" url:"remote_fields,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (p *PatchedTicketRequest) GetName() *string { + if p == nil { + return nil + } + return p.Name +} + +func (p *PatchedTicketRequest) GetAssignees() []*string { + if p == nil { + return nil + } + return p.Assignees +} + +func (p *PatchedTicketRequest) GetAssignedTeams() []*string { + if p == nil { + return nil + } + return p.AssignedTeams +} + +func (p *PatchedTicketRequest) GetCreator() *string { + if p == nil { + return nil + } + return p.Creator +} + +func (p *PatchedTicketRequest) GetDueDate() *time.Time { + if p == nil { + return nil + } + return p.DueDate +} + +func (p *PatchedTicketRequest) GetStatus() *PatchedTicketRequestStatus { + if p == nil { + return nil + } + return p.Status +} + +func (p *PatchedTicketRequest) GetDescription() *string { + if p == nil { + return nil + } + return p.Description +} + +func (p *PatchedTicketRequest) GetCollections() []*string { + if p == nil { + return nil + } + return p.Collections +} + +func (p *PatchedTicketRequest) GetTicketType() *string { + if p == nil { + return nil + } + return p.TicketType +} + +func (p *PatchedTicketRequest) GetAccount() *string { + if p == nil { + return nil + } + return p.Account +} + +func (p *PatchedTicketRequest) GetContact() *string { + if p == nil { + return nil + } + return p.Contact +} + +func (p *PatchedTicketRequest) GetParentTicket() *string { + if p == nil { + return nil + } + return p.ParentTicket +} + +func (p *PatchedTicketRequest) GetAccessLevel() *PatchedTicketRequestAccessLevel { + if p == nil { + return nil + } + return p.AccessLevel +} + +func (p *PatchedTicketRequest) GetTags() []*string { + if p == nil { + return nil + } + return p.Tags +} + +func (p *PatchedTicketRequest) GetRoles() []*string { + if p == nil { + return nil + } + return p.Roles +} + +func (p *PatchedTicketRequest) GetCompletedAt() *time.Time { + if p == nil { + return nil + } + return p.CompletedAt +} + +func (p *PatchedTicketRequest) GetTicketUrl() *string { + if p == nil { + return nil + } + return p.TicketUrl +} + +func (p *PatchedTicketRequest) GetPriority() *PriorityEnum { + if p == nil { + return nil + } + return p.Priority +} + +func (p *PatchedTicketRequest) GetIntegrationParams() map[string]interface{} { + if p == nil { + return nil + } + return p.IntegrationParams +} + +func (p *PatchedTicketRequest) GetLinkedAccountParams() map[string]interface{} { + if p == nil { + return nil + } + return p.LinkedAccountParams +} + +func (p *PatchedTicketRequest) GetRemoteFields() []*RemoteFieldRequest { + if p == nil { + return nil + } + return p.RemoteFields +} + +func (p *PatchedTicketRequest) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PatchedTicketRequest) UnmarshalJSON(data []byte) error { + type embed PatchedTicketRequest + var unmarshaler = struct { + embed + DueDate *internal.DateTime `json:"due_date,omitempty"` + CompletedAt *internal.DateTime `json:"completed_at,omitempty"` + }{ + embed: embed(*p), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *p = PatchedTicketRequest(unmarshaler.embed) + p.DueDate = unmarshaler.DueDate.TimePtr() + p.CompletedAt = unmarshaler.CompletedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) + return nil +} + +func (p *PatchedTicketRequest) MarshalJSON() ([]byte, error) { + type embed PatchedTicketRequest + var marshaler = struct { + embed + DueDate *internal.DateTime `json:"due_date,omitempty"` + CompletedAt *internal.DateTime `json:"completed_at,omitempty"` + }{ + embed: embed(*p), + DueDate: internal.NewOptionalDateTime(p.DueDate), + CompletedAt: internal.NewOptionalDateTime(p.CompletedAt), + } + return json.Marshal(marshaler) +} + +func (p *PatchedTicketRequest) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(p); err == nil { + return value + } + return fmt.Sprintf("%#v", p) +} + +// The description of who is able to access a given ticket, or where access is inherited from. +// +// * `COMPANY` - COMPANY +// * `PUBLIC` - PUBLIC +// * `PRIVATE` - PRIVATE +// * `COLLECTION` - COLLECTION +type PatchedTicketRequestAccessLevel struct { + TicketAccessLevelEnum TicketAccessLevelEnum + String string + + typ string +} + +func (p *PatchedTicketRequestAccessLevel) GetTicketAccessLevelEnum() TicketAccessLevelEnum { + if p == nil { + return "" + } + return p.TicketAccessLevelEnum +} + +func (p *PatchedTicketRequestAccessLevel) GetString() string { + if p == nil { + return "" + } + return p.String +} + +func (p *PatchedTicketRequestAccessLevel) UnmarshalJSON(data []byte) error { + var valueTicketAccessLevelEnum TicketAccessLevelEnum + if err := json.Unmarshal(data, &valueTicketAccessLevelEnum); err == nil { + p.typ = "TicketAccessLevelEnum" + p.TicketAccessLevelEnum = valueTicketAccessLevelEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + p.typ = "String" + p.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, p) +} + +func (p PatchedTicketRequestAccessLevel) MarshalJSON() ([]byte, error) { + if p.typ == "TicketAccessLevelEnum" || p.TicketAccessLevelEnum != "" { + return json.Marshal(p.TicketAccessLevelEnum) + } + if p.typ == "String" || p.String != "" { + return json.Marshal(p.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) +} + +type PatchedTicketRequestAccessLevelVisitor interface { + VisitTicketAccessLevelEnum(TicketAccessLevelEnum) error + VisitString(string) error +} + +func (p *PatchedTicketRequestAccessLevel) Accept(visitor PatchedTicketRequestAccessLevelVisitor) error { + if p.typ == "TicketAccessLevelEnum" || p.TicketAccessLevelEnum != "" { + return visitor.VisitTicketAccessLevelEnum(p.TicketAccessLevelEnum) + } + if p.typ == "String" || p.String != "" { + return visitor.VisitString(p.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", p) +} + +// The current status of the ticket. +// +// * `OPEN` - OPEN +// * `CLOSED` - CLOSED +// * `IN_PROGRESS` - IN_PROGRESS +// * `ON_HOLD` - ON_HOLD +type PatchedTicketRequestStatus struct { + TicketStatusEnum TicketStatusEnum + String string + + typ string +} + +func (p *PatchedTicketRequestStatus) GetTicketStatusEnum() TicketStatusEnum { + if p == nil { + return "" + } + return p.TicketStatusEnum +} + +func (p *PatchedTicketRequestStatus) GetString() string { + if p == nil { + return "" + } + return p.String +} + +func (p *PatchedTicketRequestStatus) UnmarshalJSON(data []byte) error { + var valueTicketStatusEnum TicketStatusEnum + if err := json.Unmarshal(data, &valueTicketStatusEnum); err == nil { + p.typ = "TicketStatusEnum" + p.TicketStatusEnum = valueTicketStatusEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + p.typ = "String" + p.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, p) +} + +func (p PatchedTicketRequestStatus) MarshalJSON() ([]byte, error) { + if p.typ == "TicketStatusEnum" || p.TicketStatusEnum != "" { + return json.Marshal(p.TicketStatusEnum) + } + if p.typ == "String" || p.String != "" { + return json.Marshal(p.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", p) +} + +type PatchedTicketRequestStatusVisitor interface { + VisitTicketStatusEnum(TicketStatusEnum) error + VisitString(string) error +} + +func (p *PatchedTicketRequestStatus) Accept(visitor PatchedTicketRequestStatusVisitor) error { + if p.typ == "TicketStatusEnum" || p.TicketStatusEnum != "" { + return visitor.VisitTicketStatusEnum(p.TicketStatusEnum) + } + if p.typ == "String" || p.String != "" { + return visitor.VisitString(p.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", p) +} + +type RemoteFieldRequest struct { + RemoteFieldClass *RemoteFieldRequestRemoteFieldClass `json:"remote_field_class" url:"remote_field_class"` + Value interface{} `json:"value,omitempty" url:"value,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (r *RemoteFieldRequest) GetRemoteFieldClass() *RemoteFieldRequestRemoteFieldClass { + if r == nil { + return nil + } + return r.RemoteFieldClass +} + +func (r *RemoteFieldRequest) GetValue() interface{} { + if r == nil { + return nil + } + return r.Value +} + +func (r *RemoteFieldRequest) GetExtraProperties() map[string]interface{} { + return r.extraProperties +} + +func (r *RemoteFieldRequest) UnmarshalJSON(data []byte) error { + type unmarshaler RemoteFieldRequest + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *r = RemoteFieldRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { + return err + } + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) + return nil +} + +func (r *RemoteFieldRequest) String() string { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(r); err == nil { + return value + } + return fmt.Sprintf("%#v", r) +} + +type RemoteFieldRequestRemoteFieldClass struct { + String string + RemoteFieldClass *RemoteFieldClass + + typ string +} + +func (r *RemoteFieldRequestRemoteFieldClass) GetString() string { + if r == nil { + return "" + } + return r.String +} + +func (r *RemoteFieldRequestRemoteFieldClass) GetRemoteFieldClass() *RemoteFieldClass { + if r == nil { + return nil + } + return r.RemoteFieldClass +} + +func (r *RemoteFieldRequestRemoteFieldClass) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + r.typ = "String" + r.String = valueString + return nil + } + valueRemoteFieldClass := new(RemoteFieldClass) + if err := json.Unmarshal(data, &valueRemoteFieldClass); err == nil { + r.typ = "RemoteFieldClass" + r.RemoteFieldClass = valueRemoteFieldClass + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, r) +} + +func (r RemoteFieldRequestRemoteFieldClass) MarshalJSON() ([]byte, error) { + if r.typ == "String" || r.String != "" { + return json.Marshal(r.String) + } + if r.typ == "RemoteFieldClass" || r.RemoteFieldClass != nil { + return json.Marshal(r.RemoteFieldClass) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", r) +} + +type RemoteFieldRequestRemoteFieldClassVisitor interface { + VisitString(string) error + VisitRemoteFieldClass(*RemoteFieldClass) error +} + +func (r *RemoteFieldRequestRemoteFieldClass) Accept(visitor RemoteFieldRequestRemoteFieldClassVisitor) error { + if r.typ == "String" || r.String != "" { + return visitor.VisitString(r.String) + } + if r.typ == "RemoteFieldClass" || r.RemoteFieldClass != nil { + return visitor.VisitRemoteFieldClass(r.RemoteFieldClass) + } + return fmt.Errorf("type %T does not include a non-empty union type", r) +} + +// # The Ticket Object +// ### Description +// The `Ticket` object is used to represent a ticket, issue, task or case. +// ### Usage Example +// TODO +type TicketRequest struct { + // The ticket's name. + Name *string `json:"name,omitempty" url:"name,omitempty"` + // The individual `Users` who are assigned to this ticket. This does not include `Users` who just have view access to this ticket. To fetch all `Users` and `Teams` that can access the ticket, use the `GET /tickets/{ticket_id}/viewers` [endpoint](https://docs.merge.dev/ticketing/tickets/#tickets_viewers_list). + Assignees []*TicketRequestAssigneesItem `json:"assignees,omitempty" url:"assignees,omitempty"` + // The `Teams` that are assigned to this ticket. This does not include `Teams` who just have view access to this ticket. To fetch all `Users` and `Teams` that can access this ticket, use the `GET /tickets/{ticket_id}/viewers` [endpoint](https://docs.merge.dev/ticketing/tickets/#tickets_viewers_list). + AssignedTeams []*TicketRequestAssignedTeamsItem `json:"assigned_teams,omitempty" url:"assigned_teams,omitempty"` + // The user who created this ticket. + Creator *TicketRequestCreator `json:"creator,omitempty" url:"creator,omitempty"` + // The ticket's due date. + DueDate *time.Time `json:"due_date,omitempty" url:"due_date,omitempty"` + // The current status of the ticket. + // + // * `OPEN` - OPEN + // * `CLOSED` - CLOSED + // * `IN_PROGRESS` - IN_PROGRESS + // * `ON_HOLD` - ON_HOLD + Status *TicketRequestStatus `json:"status,omitempty" url:"status,omitempty"` + // The ticket’s description. HTML version of description is mapped if supported by the third-party platform. + Description *string `json:"description,omitempty" url:"description,omitempty"` + // The `Collections` that this `Ticket` is included in. + Collections []*TicketRequestCollectionsItem `json:"collections,omitempty" url:"collections,omitempty"` + // The sub category of the ticket within the 3rd party system. Examples include incident, task, subtask or to-do. + TicketType *string `json:"ticket_type,omitempty" url:"ticket_type,omitempty"` + // The account associated with the ticket. + Account *TicketRequestAccount `json:"account,omitempty" url:"account,omitempty"` + // The contact associated with the ticket. + Contact *TicketRequestContact `json:"contact,omitempty" url:"contact,omitempty"` + // The ticket's parent ticket. + ParentTicket *TicketRequestParentTicket `json:"parent_ticket,omitempty" url:"parent_ticket,omitempty"` + Attachments []*TicketRequestAttachmentsItem `json:"attachments,omitempty" url:"attachments,omitempty"` + // The description of who is able to access a given ticket, or where access is inherited from. + // + // * `COMPANY` - COMPANY + // * `PUBLIC` - PUBLIC + // * `PRIVATE` - PRIVATE + // * `COLLECTION` - COLLECTION + AccessLevel *TicketRequestAccessLevel `json:"access_level,omitempty" url:"access_level,omitempty"` + Tags []*string `json:"tags,omitempty" url:"tags,omitempty"` + Roles []*string `json:"roles,omitempty" url:"roles,omitempty"` + // When the ticket was completed. + CompletedAt *time.Time `json:"completed_at,omitempty" url:"completed_at,omitempty"` + // The 3rd party url of the Ticket. + TicketUrl *string `json:"ticket_url,omitempty" url:"ticket_url,omitempty"` + // The priority or urgency of the Ticket. + // + // * `URGENT` - URGENT + // * `HIGH` - HIGH + // * `NORMAL` - NORMAL + // * `LOW` - LOW + Priority *TicketRequestPriority `json:"priority,omitempty" url:"priority,omitempty"` + IntegrationParams map[string]interface{} `json:"integration_params,omitempty" url:"integration_params,omitempty"` + LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty" url:"linked_account_params,omitempty"` + RemoteFields []*RemoteFieldRequest `json:"remote_fields,omitempty" url:"remote_fields,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (t *TicketRequest) GetName() *string { + if t == nil { + return nil + } + return t.Name +} + +func (t *TicketRequest) GetAssignees() []*TicketRequestAssigneesItem { + if t == nil { + return nil + } + return t.Assignees +} + +func (t *TicketRequest) GetAssignedTeams() []*TicketRequestAssignedTeamsItem { + if t == nil { + return nil + } + return t.AssignedTeams +} + +func (t *TicketRequest) GetCreator() *TicketRequestCreator { + if t == nil { + return nil + } + return t.Creator +} + +func (t *TicketRequest) GetDueDate() *time.Time { + if t == nil { + return nil + } + return t.DueDate +} + +func (t *TicketRequest) GetStatus() *TicketRequestStatus { + if t == nil { + return nil + } + return t.Status +} + +func (t *TicketRequest) GetDescription() *string { + if t == nil { + return nil + } + return t.Description +} + +func (t *TicketRequest) GetCollections() []*TicketRequestCollectionsItem { + if t == nil { + return nil + } + return t.Collections +} + +func (t *TicketRequest) GetTicketType() *string { + if t == nil { + return nil + } + return t.TicketType +} + +func (t *TicketRequest) GetAccount() *TicketRequestAccount { + if t == nil { + return nil + } + return t.Account +} + +func (t *TicketRequest) GetContact() *TicketRequestContact { + if t == nil { + return nil + } + return t.Contact +} + +func (t *TicketRequest) GetParentTicket() *TicketRequestParentTicket { + if t == nil { + return nil + } + return t.ParentTicket +} + +func (t *TicketRequest) GetAttachments() []*TicketRequestAttachmentsItem { + if t == nil { + return nil + } + return t.Attachments +} + +func (t *TicketRequest) GetAccessLevel() *TicketRequestAccessLevel { + if t == nil { + return nil + } + return t.AccessLevel +} + +func (t *TicketRequest) GetTags() []*string { + if t == nil { + return nil + } + return t.Tags +} + +func (t *TicketRequest) GetRoles() []*string { + if t == nil { + return nil + } + return t.Roles +} + +func (t *TicketRequest) GetCompletedAt() *time.Time { + if t == nil { + return nil + } + return t.CompletedAt +} + +func (t *TicketRequest) GetTicketUrl() *string { + if t == nil { + return nil + } + return t.TicketUrl +} + +func (t *TicketRequest) GetPriority() *TicketRequestPriority { + if t == nil { + return nil + } + return t.Priority +} + +func (t *TicketRequest) GetIntegrationParams() map[string]interface{} { + if t == nil { + return nil + } + return t.IntegrationParams +} + +func (t *TicketRequest) GetLinkedAccountParams() map[string]interface{} { + if t == nil { + return nil + } + return t.LinkedAccountParams +} + +func (t *TicketRequest) GetRemoteFields() []*RemoteFieldRequest { + if t == nil { + return nil + } + return t.RemoteFields +} + +func (t *TicketRequest) GetExtraProperties() map[string]interface{} { + return t.extraProperties +} + +func (t *TicketRequest) UnmarshalJSON(data []byte) error { + type embed TicketRequest + var unmarshaler = struct { + embed + DueDate *internal.DateTime `json:"due_date,omitempty"` + CompletedAt *internal.DateTime `json:"completed_at,omitempty"` + }{ + embed: embed(*t), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *t = TicketRequest(unmarshaler.embed) + t.DueDate = unmarshaler.DueDate.TimePtr() + t.CompletedAt = unmarshaler.CompletedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *t) + if err != nil { + return err + } + t.extraProperties = extraProperties + t.rawJSON = json.RawMessage(data) + return nil +} + +func (t *TicketRequest) MarshalJSON() ([]byte, error) { + type embed TicketRequest + var marshaler = struct { + embed + DueDate *internal.DateTime `json:"due_date,omitempty"` + CompletedAt *internal.DateTime `json:"completed_at,omitempty"` + }{ + embed: embed(*t), + DueDate: internal.NewOptionalDateTime(t.DueDate), + CompletedAt: internal.NewOptionalDateTime(t.CompletedAt), + } + return json.Marshal(marshaler) +} + +func (t *TicketRequest) String() string { + if len(t.rawJSON) > 0 { + if value, err := internal.StringifyJSON(t.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(t); err == nil { + return value + } + return fmt.Sprintf("%#v", t) +} + +// The description of who is able to access a given ticket, or where access is inherited from. +// +// * `COMPANY` - COMPANY +// * `PUBLIC` - PUBLIC +// * `PRIVATE` - PRIVATE +// * `COLLECTION` - COLLECTION +type TicketRequestAccessLevel struct { + TicketAccessLevelEnum TicketAccessLevelEnum + String string + + typ string +} + +func (t *TicketRequestAccessLevel) GetTicketAccessLevelEnum() TicketAccessLevelEnum { + if t == nil { + return "" + } + return t.TicketAccessLevelEnum +} + +func (t *TicketRequestAccessLevel) GetString() string { + if t == nil { + return "" + } + return t.String +} + +func (t *TicketRequestAccessLevel) UnmarshalJSON(data []byte) error { + var valueTicketAccessLevelEnum TicketAccessLevelEnum + if err := json.Unmarshal(data, &valueTicketAccessLevelEnum); err == nil { + t.typ = "TicketAccessLevelEnum" + t.TicketAccessLevelEnum = valueTicketAccessLevelEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + t.typ = "String" + t.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, t) +} + +func (t TicketRequestAccessLevel) MarshalJSON() ([]byte, error) { + if t.typ == "TicketAccessLevelEnum" || t.TicketAccessLevelEnum != "" { + return json.Marshal(t.TicketAccessLevelEnum) + } + if t.typ == "String" || t.String != "" { + return json.Marshal(t.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) +} + +type TicketRequestAccessLevelVisitor interface { + VisitTicketAccessLevelEnum(TicketAccessLevelEnum) error + VisitString(string) error +} + +func (t *TicketRequestAccessLevel) Accept(visitor TicketRequestAccessLevelVisitor) error { + if t.typ == "TicketAccessLevelEnum" || t.TicketAccessLevelEnum != "" { + return visitor.VisitTicketAccessLevelEnum(t.TicketAccessLevelEnum) + } + if t.typ == "String" || t.String != "" { + return visitor.VisitString(t.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", t) +} + +// The account associated with the ticket. +type TicketRequestAccount struct { + String string + Account *Account + + typ string +} + +func (t *TicketRequestAccount) GetString() string { + if t == nil { + return "" + } + return t.String +} + +func (t *TicketRequestAccount) GetAccount() *Account { + if t == nil { + return nil + } + return t.Account +} + +func (t *TicketRequestAccount) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + t.typ = "String" + t.String = valueString + return nil + } + valueAccount := new(Account) + if err := json.Unmarshal(data, &valueAccount); err == nil { + t.typ = "Account" + t.Account = valueAccount + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, t) +} + +func (t TicketRequestAccount) MarshalJSON() ([]byte, error) { + if t.typ == "String" || t.String != "" { + return json.Marshal(t.String) + } + if t.typ == "Account" || t.Account != nil { + return json.Marshal(t.Account) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) +} + +type TicketRequestAccountVisitor interface { + VisitString(string) error + VisitAccount(*Account) error +} + +func (t *TicketRequestAccount) Accept(visitor TicketRequestAccountVisitor) error { + if t.typ == "String" || t.String != "" { + return visitor.VisitString(t.String) + } + if t.typ == "Account" || t.Account != nil { + return visitor.VisitAccount(t.Account) + } + return fmt.Errorf("type %T does not include a non-empty union type", t) +} + +type TicketRequestAssignedTeamsItem struct { + String string + Team *Team + + typ string +} + +func (t *TicketRequestAssignedTeamsItem) GetString() string { + if t == nil { + return "" + } + return t.String +} + +func (t *TicketRequestAssignedTeamsItem) GetTeam() *Team { + if t == nil { + return nil + } + return t.Team +} + +func (t *TicketRequestAssignedTeamsItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + t.typ = "String" + t.String = valueString + return nil + } + valueTeam := new(Team) + if err := json.Unmarshal(data, &valueTeam); err == nil { + t.typ = "Team" + t.Team = valueTeam + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, t) +} + +func (t TicketRequestAssignedTeamsItem) MarshalJSON() ([]byte, error) { + if t.typ == "String" || t.String != "" { + return json.Marshal(t.String) + } + if t.typ == "Team" || t.Team != nil { + return json.Marshal(t.Team) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) +} + +type TicketRequestAssignedTeamsItemVisitor interface { + VisitString(string) error + VisitTeam(*Team) error +} + +func (t *TicketRequestAssignedTeamsItem) Accept(visitor TicketRequestAssignedTeamsItemVisitor) error { + if t.typ == "String" || t.String != "" { + return visitor.VisitString(t.String) + } + if t.typ == "Team" || t.Team != nil { + return visitor.VisitTeam(t.Team) + } + return fmt.Errorf("type %T does not include a non-empty union type", t) +} + +type TicketRequestAssigneesItem struct { + String string + User *User + + typ string +} + +func (t *TicketRequestAssigneesItem) GetString() string { + if t == nil { + return "" + } + return t.String +} + +func (t *TicketRequestAssigneesItem) GetUser() *User { + if t == nil { + return nil + } + return t.User +} + +func (t *TicketRequestAssigneesItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + t.typ = "String" + t.String = valueString + return nil + } + valueUser := new(User) + if err := json.Unmarshal(data, &valueUser); err == nil { + t.typ = "User" + t.User = valueUser + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, t) +} + +func (t TicketRequestAssigneesItem) MarshalJSON() ([]byte, error) { + if t.typ == "String" || t.String != "" { + return json.Marshal(t.String) + } + if t.typ == "User" || t.User != nil { + return json.Marshal(t.User) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) +} + +type TicketRequestAssigneesItemVisitor interface { + VisitString(string) error + VisitUser(*User) error +} + +func (t *TicketRequestAssigneesItem) Accept(visitor TicketRequestAssigneesItemVisitor) error { + if t.typ == "String" || t.String != "" { + return visitor.VisitString(t.String) + } + if t.typ == "User" || t.User != nil { + return visitor.VisitUser(t.User) + } + return fmt.Errorf("type %T does not include a non-empty union type", t) +} + +type TicketRequestAttachmentsItem struct { + String string + Attachment *Attachment + + typ string +} + +func (t *TicketRequestAttachmentsItem) GetString() string { + if t == nil { + return "" + } + return t.String +} + +func (t *TicketRequestAttachmentsItem) GetAttachment() *Attachment { + if t == nil { + return nil + } + return t.Attachment +} + +func (t *TicketRequestAttachmentsItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + t.typ = "String" + t.String = valueString + return nil + } + valueAttachment := new(Attachment) + if err := json.Unmarshal(data, &valueAttachment); err == nil { + t.typ = "Attachment" + t.Attachment = valueAttachment + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, t) +} + +func (t TicketRequestAttachmentsItem) MarshalJSON() ([]byte, error) { + if t.typ == "String" || t.String != "" { + return json.Marshal(t.String) + } + if t.typ == "Attachment" || t.Attachment != nil { + return json.Marshal(t.Attachment) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) +} + +type TicketRequestAttachmentsItemVisitor interface { + VisitString(string) error + VisitAttachment(*Attachment) error +} + +func (t *TicketRequestAttachmentsItem) Accept(visitor TicketRequestAttachmentsItemVisitor) error { + if t.typ == "String" || t.String != "" { + return visitor.VisitString(t.String) + } + if t.typ == "Attachment" || t.Attachment != nil { + return visitor.VisitAttachment(t.Attachment) + } + return fmt.Errorf("type %T does not include a non-empty union type", t) +} + +type TicketRequestCollectionsItem struct { + String string + Collection *Collection + + typ string +} + +func (t *TicketRequestCollectionsItem) GetString() string { + if t == nil { + return "" + } + return t.String +} + +func (t *TicketRequestCollectionsItem) GetCollection() *Collection { + if t == nil { + return nil + } + return t.Collection +} + +func (t *TicketRequestCollectionsItem) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + t.typ = "String" + t.String = valueString + return nil + } + valueCollection := new(Collection) + if err := json.Unmarshal(data, &valueCollection); err == nil { + t.typ = "Collection" + t.Collection = valueCollection + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, t) +} + +func (t TicketRequestCollectionsItem) MarshalJSON() ([]byte, error) { + if t.typ == "String" || t.String != "" { + return json.Marshal(t.String) + } + if t.typ == "Collection" || t.Collection != nil { + return json.Marshal(t.Collection) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) +} + +type TicketRequestCollectionsItemVisitor interface { + VisitString(string) error + VisitCollection(*Collection) error +} + +func (t *TicketRequestCollectionsItem) Accept(visitor TicketRequestCollectionsItemVisitor) error { + if t.typ == "String" || t.String != "" { + return visitor.VisitString(t.String) + } + if t.typ == "Collection" || t.Collection != nil { + return visitor.VisitCollection(t.Collection) + } + return fmt.Errorf("type %T does not include a non-empty union type", t) +} + +// The contact associated with the ticket. +type TicketRequestContact struct { + String string + Contact *Contact + + typ string +} + +func (t *TicketRequestContact) GetString() string { + if t == nil { + return "" + } + return t.String +} + +func (t *TicketRequestContact) GetContact() *Contact { + if t == nil { + return nil + } + return t.Contact +} + +func (t *TicketRequestContact) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + t.typ = "String" + t.String = valueString + return nil + } + valueContact := new(Contact) + if err := json.Unmarshal(data, &valueContact); err == nil { + t.typ = "Contact" + t.Contact = valueContact + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, t) +} + +func (t TicketRequestContact) MarshalJSON() ([]byte, error) { + if t.typ == "String" || t.String != "" { + return json.Marshal(t.String) + } + if t.typ == "Contact" || t.Contact != nil { + return json.Marshal(t.Contact) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) +} + +type TicketRequestContactVisitor interface { + VisitString(string) error + VisitContact(*Contact) error +} + +func (t *TicketRequestContact) Accept(visitor TicketRequestContactVisitor) error { + if t.typ == "String" || t.String != "" { + return visitor.VisitString(t.String) + } + if t.typ == "Contact" || t.Contact != nil { + return visitor.VisitContact(t.Contact) + } + return fmt.Errorf("type %T does not include a non-empty union type", t) +} + +// The user who created this ticket. +type TicketRequestCreator struct { + String string + User *User + + typ string +} + +func (t *TicketRequestCreator) GetString() string { + if t == nil { + return "" + } + return t.String +} + +func (t *TicketRequestCreator) GetUser() *User { + if t == nil { + return nil + } + return t.User +} + +func (t *TicketRequestCreator) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + t.typ = "String" + t.String = valueString + return nil + } + valueUser := new(User) + if err := json.Unmarshal(data, &valueUser); err == nil { + t.typ = "User" + t.User = valueUser + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, t) +} + +func (t TicketRequestCreator) MarshalJSON() ([]byte, error) { + if t.typ == "String" || t.String != "" { + return json.Marshal(t.String) + } + if t.typ == "User" || t.User != nil { + return json.Marshal(t.User) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) +} + +type TicketRequestCreatorVisitor interface { + VisitString(string) error + VisitUser(*User) error +} + +func (t *TicketRequestCreator) Accept(visitor TicketRequestCreatorVisitor) error { + if t.typ == "String" || t.String != "" { + return visitor.VisitString(t.String) + } + if t.typ == "User" || t.User != nil { + return visitor.VisitUser(t.User) + } + return fmt.Errorf("type %T does not include a non-empty union type", t) +} + +// The ticket's parent ticket. +type TicketRequestParentTicket struct { + String string + Ticket *Ticket + + typ string +} + +func (t *TicketRequestParentTicket) GetString() string { + if t == nil { + return "" + } + return t.String +} + +func (t *TicketRequestParentTicket) GetTicket() *Ticket { + if t == nil { + return nil + } + return t.Ticket +} + +func (t *TicketRequestParentTicket) UnmarshalJSON(data []byte) error { + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + t.typ = "String" + t.String = valueString + return nil + } + valueTicket := new(Ticket) + if err := json.Unmarshal(data, &valueTicket); err == nil { + t.typ = "Ticket" + t.Ticket = valueTicket + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, t) +} + +func (t TicketRequestParentTicket) MarshalJSON() ([]byte, error) { + if t.typ == "String" || t.String != "" { + return json.Marshal(t.String) + } + if t.typ == "Ticket" || t.Ticket != nil { + return json.Marshal(t.Ticket) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) +} + +type TicketRequestParentTicketVisitor interface { + VisitString(string) error + VisitTicket(*Ticket) error +} + +func (t *TicketRequestParentTicket) Accept(visitor TicketRequestParentTicketVisitor) error { + if t.typ == "String" || t.String != "" { + return visitor.VisitString(t.String) + } + if t.typ == "Ticket" || t.Ticket != nil { + return visitor.VisitTicket(t.Ticket) + } + return fmt.Errorf("type %T does not include a non-empty union type", t) +} + +// The priority or urgency of the Ticket. +// +// * `URGENT` - URGENT +// * `HIGH` - HIGH +// * `NORMAL` - NORMAL +// * `LOW` - LOW +type TicketRequestPriority struct { + PriorityEnum PriorityEnum + String string + + typ string +} + +func (t *TicketRequestPriority) GetPriorityEnum() PriorityEnum { + if t == nil { + return "" + } + return t.PriorityEnum +} + +func (t *TicketRequestPriority) GetString() string { + if t == nil { + return "" + } + return t.String +} + +func (t *TicketRequestPriority) UnmarshalJSON(data []byte) error { + var valuePriorityEnum PriorityEnum + if err := json.Unmarshal(data, &valuePriorityEnum); err == nil { + t.typ = "PriorityEnum" + t.PriorityEnum = valuePriorityEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + t.typ = "String" + t.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, t) +} + +func (t TicketRequestPriority) MarshalJSON() ([]byte, error) { + if t.typ == "PriorityEnum" || t.PriorityEnum != "" { + return json.Marshal(t.PriorityEnum) + } + if t.typ == "String" || t.String != "" { + return json.Marshal(t.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) +} + +type TicketRequestPriorityVisitor interface { + VisitPriorityEnum(PriorityEnum) error + VisitString(string) error +} + +func (t *TicketRequestPriority) Accept(visitor TicketRequestPriorityVisitor) error { + if t.typ == "PriorityEnum" || t.PriorityEnum != "" { + return visitor.VisitPriorityEnum(t.PriorityEnum) + } + if t.typ == "String" || t.String != "" { + return visitor.VisitString(t.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", t) +} + +// The current status of the ticket. +// +// * `OPEN` - OPEN +// * `CLOSED` - CLOSED +// * `IN_PROGRESS` - IN_PROGRESS +// * `ON_HOLD` - ON_HOLD +type TicketRequestStatus struct { + TicketStatusEnum TicketStatusEnum + String string + + typ string +} + +func (t *TicketRequestStatus) GetTicketStatusEnum() TicketStatusEnum { + if t == nil { + return "" + } + return t.TicketStatusEnum +} + +func (t *TicketRequestStatus) GetString() string { + if t == nil { + return "" + } + return t.String +} + +func (t *TicketRequestStatus) UnmarshalJSON(data []byte) error { + var valueTicketStatusEnum TicketStatusEnum + if err := json.Unmarshal(data, &valueTicketStatusEnum); err == nil { + t.typ = "TicketStatusEnum" + t.TicketStatusEnum = valueTicketStatusEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + t.typ = "String" + t.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, t) +} + +func (t TicketRequestStatus) MarshalJSON() ([]byte, error) { + if t.typ == "TicketStatusEnum" || t.TicketStatusEnum != "" { + return json.Marshal(t.TicketStatusEnum) + } + if t.typ == "String" || t.String != "" { + return json.Marshal(t.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) +} + +type TicketRequestStatusVisitor interface { + VisitTicketStatusEnum(TicketStatusEnum) error + VisitString(string) error +} + +func (t *TicketRequestStatus) Accept(visitor TicketRequestStatusVisitor) error { + if t.typ == "TicketStatusEnum" || t.TicketStatusEnum != "" { + return visitor.VisitTicketStatusEnum(t.TicketStatusEnum) + } + if t.typ == "String" || t.String != "" { + return visitor.VisitString(t.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", t) +} + +type TicketResponse struct { + Model *Ticket `json:"model" url:"model"` + Warnings []*WarningValidationProblem `json:"warnings" url:"warnings"` + Errors []*ErrorValidationProblem `json:"errors" url:"errors"` + Logs []*DebugModeLog `json:"logs,omitempty" url:"logs,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (t *TicketResponse) GetModel() *Ticket { + if t == nil { + return nil + } + return t.Model +} + +func (t *TicketResponse) GetWarnings() []*WarningValidationProblem { + if t == nil { + return nil + } + return t.Warnings +} + +func (t *TicketResponse) GetErrors() []*ErrorValidationProblem { + if t == nil { + return nil + } + return t.Errors +} + +func (t *TicketResponse) GetLogs() []*DebugModeLog { + if t == nil { + return nil + } + return t.Logs +} + +func (t *TicketResponse) GetExtraProperties() map[string]interface{} { + return t.extraProperties +} + +func (t *TicketResponse) UnmarshalJSON(data []byte) error { + type unmarshaler TicketResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *t = TicketResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *t) + if err != nil { + return err + } + t.extraProperties = extraProperties + t.rawJSON = json.RawMessage(data) + return nil +} + +func (t *TicketResponse) String() string { + if len(t.rawJSON) > 0 { + if value, err := internal.StringifyJSON(t.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(t); err == nil { + return value + } + return fmt.Sprintf("%#v", t) +} + type TicketsViewersListRequest struct { // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *TicketsViewersListRequestExpand `json:"-"` + Expand []*TicketsViewersListRequestExpandItem `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` } diff --git a/ticketing/tickets/client.go b/ticketing/tickets/client.go index 44440d9..5a7a090 100644 --- a/ticketing/tickets/client.go +++ b/ticketing/tickets/client.go @@ -1,187 +1,135 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package tickets import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - ticketing "github.com/merge-api/merge-go-client/ticketing" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" + ticketing "github.com/merge-api/merge-go-client/v2/ticketing" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `Ticket` objects. -func (c *Client) List(ctx context.Context, request *ticketing.TicketsListRequest) (*ticketing.PaginatedTicketList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ticketing/v1/tickets" - - queryParams := make(url.Values) - if request.AccountId != nil { - queryParams.Add("account_id", fmt.Sprintf("%v", *request.AccountId)) - } - if request.AssigneeIds != nil { - queryParams.Add("assignee_ids", fmt.Sprintf("%v", *request.AssigneeIds)) - } - if request.CollectionIds != nil { - queryParams.Add("collection_ids", fmt.Sprintf("%v", *request.CollectionIds)) - } - if request.CompletedAfter != nil { - queryParams.Add("completed_after", fmt.Sprintf("%v", request.CompletedAfter.Format(time.RFC3339))) - } - if request.CompletedBefore != nil { - queryParams.Add("completed_before", fmt.Sprintf("%v", request.CompletedBefore.Format(time.RFC3339))) - } - if request.ContactId != nil { - queryParams.Add("contact_id", fmt.Sprintf("%v", *request.ContactId)) - } - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.DueAfter != nil { - queryParams.Add("due_after", fmt.Sprintf("%v", request.DueAfter.Format(time.RFC3339))) - } - if request.DueBefore != nil { - queryParams.Add("due_before", fmt.Sprintf("%v", request.DueBefore.Format(time.RFC3339))) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeRemoteFields != nil { - queryParams.Add("include_remote_fields", fmt.Sprintf("%v", *request.IncludeRemoteFields)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.ParentTicketId != nil { - queryParams.Add("parent_ticket_id", fmt.Sprintf("%v", *request.ParentTicketId)) - } - if request.Priority != nil { - queryParams.Add("priority", fmt.Sprintf("%v", *request.Priority)) - } - if request.RemoteCreatedAfter != nil { - queryParams.Add("remote_created_after", fmt.Sprintf("%v", request.RemoteCreatedAfter.Format(time.RFC3339))) - } - if request.RemoteCreatedBefore != nil { - queryParams.Add("remote_created_before", fmt.Sprintf("%v", request.RemoteCreatedBefore.Format(time.RFC3339))) - } - if request.RemoteFields != nil { - queryParams.Add("remote_fields", fmt.Sprintf("%v", *request.RemoteFields)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if request.RemoteUpdatedAfter != nil { - queryParams.Add("remote_updated_after", fmt.Sprintf("%v", request.RemoteUpdatedAfter.Format(time.RFC3339))) - } - if request.RemoteUpdatedBefore != nil { - queryParams.Add("remote_updated_before", fmt.Sprintf("%v", request.RemoteUpdatedBefore.Format(time.RFC3339))) - } - if request.ShowEnumOrigins != nil { - queryParams.Add("show_enum_origins", fmt.Sprintf("%v", *request.ShowEnumOrigins)) - } - if request.Status != nil { - queryParams.Add("status", fmt.Sprintf("%v", *request.Status)) - } - if request.Tags != nil { - queryParams.Add("tags", fmt.Sprintf("%v", *request.Tags)) - } - if request.TicketType != nil { - queryParams.Add("ticket_type", fmt.Sprintf("%v", *request.TicketType)) - } - if request.TicketUrl != nil { - queryParams.Add("ticket_url", fmt.Sprintf("%v", *request.TicketUrl)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *ticketing.PaginatedTicketList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *ticketing.TicketsListRequest, + opts ...option.RequestOption, +) (*core.Page[*ticketing.Ticket], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ticketing/v1/tickets" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *ticketing.PaginatedTicketList) *internal.PageResponse[*string, *ticketing.Ticket] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *ticketing.Ticket]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Creates a `Ticket` object with the given values. -func (c *Client) Create(ctx context.Context, request *ticketing.TicketEndpointRequest) (*ticketing.TicketResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ticketing/v1/tickets" - - queryParams := make(url.Values) - if request.IsDebugMode != nil { - queryParams.Add("is_debug_mode", fmt.Sprintf("%v", *request.IsDebugMode)) - } - if request.RunAsync != nil { - queryParams.Add("run_async", fmt.Sprintf("%v", *request.RunAsync)) +func (c *Client) Create( + ctx context.Context, + request *ticketing.TicketEndpointRequest, + opts ...option.RequestOption, +) (*ticketing.TicketResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ticketing/v1/tickets" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *ticketing.TicketResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -190,41 +138,46 @@ func (c *Client) Create(ctx context.Context, request *ticketing.TicketEndpointRe } // Returns a `Ticket` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *ticketing.TicketsRetrieveRequest) (*ticketing.Ticket, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"ticketing/v1/tickets/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeRemoteFields != nil { - queryParams.Add("include_remote_fields", fmt.Sprintf("%v", *request.IncludeRemoteFields)) - } - if request.RemoteFields != nil { - queryParams.Add("remote_fields", fmt.Sprintf("%v", *request.RemoteFields)) - } - if request.ShowEnumOrigins != nil { - queryParams.Add("show_enum_origins", fmt.Sprintf("%v", *request.ShowEnumOrigins)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *ticketing.TicketsRetrieveRequest, + opts ...option.RequestOption, +) (*ticketing.Ticket, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/ticketing/v1/tickets/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ticketing.Ticket if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -233,33 +186,48 @@ func (c *Client) Retrieve(ctx context.Context, id string, request *ticketing.Tic } // Updates a `Ticket` object with the given `id`. -func (c *Client) PartialUpdate(ctx context.Context, id string, request *ticketing.PatchedTicketEndpointRequest) (*ticketing.TicketResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"ticketing/v1/tickets/%v", id) - - queryParams := make(url.Values) - if request.IsDebugMode != nil { - queryParams.Add("is_debug_mode", fmt.Sprintf("%v", *request.IsDebugMode)) - } - if request.RunAsync != nil { - queryParams.Add("run_async", fmt.Sprintf("%v", *request.RunAsync)) +func (c *Client) PartialUpdate( + ctx context.Context, + id string, + request *ticketing.PatchedTicketEndpointRequest, + opts ...option.RequestOption, +) (*ticketing.TicketResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/ticketing/v1/tickets/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *ticketing.TicketResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPatch, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPatch, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err @@ -267,68 +235,102 @@ func (c *Client) PartialUpdate(ctx context.Context, id string, request *ticketin return response, nil } -// Returns a list of `Viewer` objects. -func (c *Client) ViewersList(ctx context.Context, ticketId string, request *ticketing.TicketsViewersListRequest) (*ticketing.PaginatedViewerList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"ticketing/v1/tickets/%v/viewers", ticketId) - - queryParams := make(url.Values) - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *ticketing.PaginatedViewerList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +// Returns a list of `Viewer` objects that point to a User id or Team id that is either an assignee or viewer on a `Ticket` with the given id. [Learn more.](https://help.merge.dev/en/articles/10333658-ticketing-access-control-list-acls) +func (c *Client) ViewersList( + ctx context.Context, + ticketId string, + request *ticketing.TicketsViewersListRequest, + opts ...option.RequestOption, +) (*core.Page[*ticketing.Viewer], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/ticketing/v1/tickets/%v/viewers", + ticketId, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *ticketing.PaginatedViewerList) *internal.PageResponse[*string, *ticketing.Viewer] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *ticketing.Viewer]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Returns metadata for `Ticket` PATCHs. -func (c *Client) MetaPatchRetrieve(ctx context.Context, id string) (*ticketing.MetaResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"ticketing/v1/tickets/meta/patch/%v", id) +func (c *Client) MetaPatchRetrieve( + ctx context.Context, + id string, + opts ...option.RequestOption, +) (*ticketing.MetaResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/ticketing/v1/tickets/meta/patch/%v", + id, + ) + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ticketing.MetaResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -337,21 +339,42 @@ func (c *Client) MetaPatchRetrieve(ctx context.Context, id string) (*ticketing.M } // Returns metadata for `Ticket` POSTs. -func (c *Client) MetaPostRetrieve(ctx context.Context) (*ticketing.MetaResponse, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL +func (c *Client) MetaPostRetrieve( + ctx context.Context, + request *ticketing.TicketsMetaPostRetrieveRequest, + opts ...option.RequestOption, +) (*ticketing.MetaResponse, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ticketing/v1/tickets/meta/post" + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } - endpointURL := baseURL + "/" + "ticketing/v1/tickets/meta/post" + if len(queryParams) > 0 { + endpointURL += "?" + queryParams.Encode() + } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ticketing.MetaResponse if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -360,50 +383,60 @@ func (c *Client) MetaPostRetrieve(ctx context.Context) (*ticketing.MetaResponse, } // Returns a list of `RemoteFieldClass` objects. -func (c *Client) RemoteFieldClassesList(ctx context.Context, request *ticketing.TicketsRemoteFieldClassesListRequest) (*ticketing.PaginatedRemoteFieldClassList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ticketing/v1/tickets/remote-field-classes" - - queryParams := make(url.Values) - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.Ids != nil { - queryParams.Add("ids", fmt.Sprintf("%v", *request.Ids)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.IsCommonModelField != nil { - queryParams.Add("is_common_model_field", fmt.Sprintf("%v", *request.IsCommonModelField)) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *ticketing.PaginatedRemoteFieldClassList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) RemoteFieldClassesList( + ctx context.Context, + request *ticketing.TicketsRemoteFieldClassesListRequest, + opts ...option.RequestOption, +) (*core.Page[*ticketing.RemoteFieldClass], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ticketing/v1/tickets/remote-field-classes" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *ticketing.PaginatedRemoteFieldClassList) *internal.PageResponse[*string, *ticketing.RemoteFieldClass] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *ticketing.RemoteFieldClass]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } diff --git a/ticketing/types.go b/ticketing/types.go index 72c2851..5e23b92 100644 --- a/ticketing/types.go +++ b/ticketing/types.go @@ -1,590 +1,503 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package ticketing import ( json "encoding/json" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" + internal "github.com/merge-api/merge-go-client/v2/internal" time "time" ) -// - `PRIVATE` - PRIVATE -// - `COMPANY` - COMPANY -// - `PUBLIC` - PUBLIC -type AccessLevelEnum string - -const ( - AccessLevelEnumPrivate AccessLevelEnum = "PRIVATE" - AccessLevelEnumCompany AccessLevelEnum = "COMPANY" - AccessLevelEnumPublic AccessLevelEnum = "PUBLIC" -) - -func NewAccessLevelEnumFromString(s string) (AccessLevelEnum, error) { - switch s { - case "PRIVATE": - return AccessLevelEnumPrivate, nil - case "COMPANY": - return AccessLevelEnumCompany, nil - case "PUBLIC": - return AccessLevelEnumPublic, nil - } - var t AccessLevelEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (a AccessLevelEnum) Ptr() *AccessLevelEnum { - return &a -} - // # The Account Object -// // ### Description -// // The `Account` object is used to represent the account that a ticket is associated with. // // The account is a company that may be a customer. This does not represent the company that is receiving the ticket. // // ### Usage Example -// // TODO type Account struct { - Id *string `json:"id,omitempty"` + Id *string `json:"id,omitempty" url:"id,omitempty"` // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` // The account's name. - Name *string `json:"name,omitempty"` + Name *string `json:"name,omitempty" url:"name,omitempty"` // The account's domain names. - Domains []*string `json:"domains,omitempty"` + Domains []*string `json:"domains,omitempty" url:"domains,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (a *Account) UnmarshalJSON(data []byte) error { - type unmarshaler Account - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (a *Account) GetId() *string { + if a == nil { + return nil } - *a = Account(value) - a._rawJSON = json.RawMessage(data) - return nil + return a.Id } -func (a *Account) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(a); err == nil { - return value +func (a *Account) GetRemoteId() *string { + if a == nil { + return nil } - return fmt.Sprintf("%#v", a) + return a.RemoteId } -type AccountDetails struct { - Id *string `json:"id,omitempty"` - Integration *string `json:"integration,omitempty"` - IntegrationSlug *string `json:"integration_slug,omitempty"` - Category *CategoryEnum `json:"category,omitempty"` - EndUserOriginId *string `json:"end_user_origin_id,omitempty"` - EndUserOrganizationName *string `json:"end_user_organization_name,omitempty"` - EndUserEmailAddress *string `json:"end_user_email_address,omitempty"` - Status *string `json:"status,omitempty"` - WebhookListenerUrl *string `json:"webhook_listener_url,omitempty"` - // 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. - IsDuplicate *bool `json:"is_duplicate,omitempty"` - AccountType *string `json:"account_type,omitempty"` - // The time at which account completes the linking flow. - CompletedAt *time.Time `json:"completed_at,omitempty"` - - _rawJSON json.RawMessage +func (a *Account) GetCreatedAt() *time.Time { + if a == nil { + return nil + } + return a.CreatedAt } -func (a *AccountDetails) UnmarshalJSON(data []byte) error { - type unmarshaler AccountDetails - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (a *Account) GetModifiedAt() *time.Time { + if a == nil { + return nil } - *a = AccountDetails(value) - a._rawJSON = json.RawMessage(data) - return nil + return a.ModifiedAt } -func (a *AccountDetails) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(a); err == nil { - return value +func (a *Account) GetName() *string { + if a == nil { + return nil } - return fmt.Sprintf("%#v", a) + return a.Name } -// # The LinkedAccount Object -// -// ### Description -// -// The `LinkedAccount` object is used to represent an end user's link with a specific integration. -// -// ### Usage Example -// -// View a list of your organization's `LinkedAccount` objects. -type AccountDetailsAndActions struct { - Id string `json:"id"` - Category *CategoryEnum `json:"category,omitempty"` - Status AccountDetailsAndActionsStatusEnum `json:"status,omitempty"` - StatusDetail *string `json:"status_detail,omitempty"` - EndUserOriginId *string `json:"end_user_origin_id,omitempty"` - EndUserOrganizationName string `json:"end_user_organization_name"` - EndUserEmailAddress string `json:"end_user_email_address"` - // The tenant or domain the customer has provided access to. - Subdomain *string `json:"subdomain,omitempty"` - WebhookListenerUrl string `json:"webhook_listener_url"` - // 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. - IsDuplicate *bool `json:"is_duplicate,omitempty"` - Integration *AccountDetailsAndActionsIntegration `json:"integration,omitempty"` - AccountType string `json:"account_type"` - CompletedAt time.Time `json:"completed_at"` - - _rawJSON json.RawMessage -} - -func (a *AccountDetailsAndActions) UnmarshalJSON(data []byte) error { - type unmarshaler AccountDetailsAndActions - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (a *Account) GetDomains() []*string { + if a == nil { + return nil } - *a = AccountDetailsAndActions(value) - a._rawJSON = json.RawMessage(data) - return nil + return a.Domains } -func (a *AccountDetailsAndActions) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } +func (a *Account) GetRemoteWasDeleted() *bool { + if a == nil { + return nil } - if value, err := core.StringifyJSON(a); err == nil { - return value + return a.RemoteWasDeleted +} + +func (a *Account) GetFieldMappings() map[string]interface{} { + if a == nil { + return nil } - return fmt.Sprintf("%#v", a) + return a.FieldMappings } -type AccountDetailsAndActionsIntegration struct { - Name string `json:"name"` - Categories []CategoriesEnum `json:"categories,omitempty"` - Image *string `json:"image,omitempty"` - SquareImage *string `json:"square_image,omitempty"` - Color string `json:"color"` - Slug string `json:"slug"` - PassthroughAvailable bool `json:"passthrough_available"` - AvailableModelOperations []*ModelOperation `json:"available_model_operations,omitempty"` +func (a *Account) GetRemoteData() []*RemoteData { + if a == nil { + return nil + } + return a.RemoteData +} - _rawJSON json.RawMessage +func (a *Account) GetExtraProperties() map[string]interface{} { + return a.extraProperties } -func (a *AccountDetailsAndActionsIntegration) UnmarshalJSON(data []byte) error { - type unmarshaler AccountDetailsAndActionsIntegration - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { +func (a *Account) UnmarshalJSON(data []byte) error { + type embed Account + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*a), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *a = Account(unmarshaler.embed) + a.CreatedAt = unmarshaler.CreatedAt.TimePtr() + a.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { return err } - *a = AccountDetailsAndActionsIntegration(value) - a._rawJSON = json.RawMessage(data) + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) return nil } -func (a *AccountDetailsAndActionsIntegration) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { +func (a *Account) MarshalJSON() ([]byte, error) { + type embed Account + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*a), + CreatedAt: internal.NewOptionalDateTime(a.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(a.ModifiedAt), + } + return json.Marshal(marshaler) +} + +func (a *Account) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(a); err == nil { + if value, err := internal.StringifyJSON(a); err == nil { return value } return fmt.Sprintf("%#v", a) } -// - `COMPLETE` - COMPLETE -// - `INCOMPLETE` - INCOMPLETE -// - `RELINK_NEEDED` - RELINK_NEEDED -// - `IDLE` - IDLE -type AccountDetailsAndActionsStatusEnum string - -const ( - AccountDetailsAndActionsStatusEnumComplete AccountDetailsAndActionsStatusEnum = "COMPLETE" - AccountDetailsAndActionsStatusEnumIncomplete AccountDetailsAndActionsStatusEnum = "INCOMPLETE" - AccountDetailsAndActionsStatusEnumRelinkNeeded AccountDetailsAndActionsStatusEnum = "RELINK_NEEDED" - AccountDetailsAndActionsStatusEnumIdle AccountDetailsAndActionsStatusEnum = "IDLE" -) - -func NewAccountDetailsAndActionsStatusEnumFromString(s string) (AccountDetailsAndActionsStatusEnum, error) { - switch s { - case "COMPLETE": - return AccountDetailsAndActionsStatusEnumComplete, nil - case "INCOMPLETE": - return AccountDetailsAndActionsStatusEnumIncomplete, nil - case "RELINK_NEEDED": - return AccountDetailsAndActionsStatusEnumRelinkNeeded, nil - case "IDLE": - return AccountDetailsAndActionsStatusEnumIdle, nil - } - var t AccountDetailsAndActionsStatusEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (a AccountDetailsAndActionsStatusEnum) Ptr() *AccountDetailsAndActionsStatusEnum { - return &a -} - type AccountIntegration struct { // Company name. - Name string `json:"name"` + Name string `json:"name" url:"name"` // Optional. This shortened name appears in places with limited space, usually in conjunction with the platform's logo (e.g., Merge Link menu).

Example: Workforce Now (in lieu of ADP Workforce Now), SuccessFactors (in lieu of SAP SuccessFactors) - AbbreviatedName *string `json:"abbreviated_name,omitempty"` + AbbreviatedName *string `json:"abbreviated_name,omitempty" url:"abbreviated_name,omitempty"` // Category or categories this integration belongs to. Multiple categories should be comma separated, i.e. [ats, hris]. - Categories []CategoriesEnum `json:"categories,omitempty"` + Categories []CategoriesEnum `json:"categories,omitempty" url:"categories,omitempty"` // Company logo in rectangular shape. - Image *string `json:"image,omitempty"` + Image *string `json:"image,omitempty" url:"image,omitempty"` // Company logo in square shape. - SquareImage *string `json:"square_image,omitempty"` + SquareImage *string `json:"square_image,omitempty" url:"square_image,omitempty"` // The color of this integration used for buttons and text throughout the app and landing pages. Choose a darker, saturated color. - Color *string `json:"color,omitempty"` - Slug *string `json:"slug,omitempty"` + Color *string `json:"color,omitempty" url:"color,omitempty"` + Slug *string `json:"slug,omitempty" url:"slug,omitempty"` // Mapping of API endpoints to documentation urls for support. Example: {'GET': [['/common-model-scopes', 'https://docs.merge.dev/accounting/common-model-scopes/#common_model_scopes_retrieve'],['/common-model-actions', 'https://docs.merge.dev/accounting/common-model-actions/#common_model_actions_retrieve']], 'POST': []} - ApiEndpointsToDocumentationUrls map[string]interface{} `json:"api_endpoints_to_documentation_urls,omitempty"` + ApiEndpointsToDocumentationUrls map[string]interface{} `json:"api_endpoints_to_documentation_urls,omitempty" url:"api_endpoints_to_documentation_urls,omitempty"` // Setup guide URL for third party webhook creation. Exposed in Merge Docs. - WebhookSetupGuideUrl *string `json:"webhook_setup_guide_url,omitempty"` + WebhookSetupGuideUrl *string `json:"webhook_setup_guide_url,omitempty" url:"webhook_setup_guide_url,omitempty"` // Category or categories this integration is in beta status for. - CategoryBetaStatus map[string]interface{} `json:"category_beta_status,omitempty"` + CategoryBetaStatus map[string]interface{} `json:"category_beta_status,omitempty" url:"category_beta_status,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (a *AccountIntegration) UnmarshalJSON(data []byte) error { - type unmarshaler AccountIntegration - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (a *AccountIntegration) GetName() string { + if a == nil { + return "" } - *a = AccountIntegration(value) - a._rawJSON = json.RawMessage(data) - return nil + return a.Name } -func (a *AccountIntegration) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(a); err == nil { - return value +func (a *AccountIntegration) GetAbbreviatedName() *string { + if a == nil { + return nil } - return fmt.Sprintf("%#v", a) + return a.AbbreviatedName } -type AccountToken struct { - AccountToken string `json:"account_token"` - Integration *AccountIntegration `json:"integration,omitempty"` - - _rawJSON json.RawMessage +func (a *AccountIntegration) GetCategories() []CategoriesEnum { + if a == nil { + return nil + } + return a.Categories } -func (a *AccountToken) UnmarshalJSON(data []byte) error { - type unmarshaler AccountToken - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (a *AccountIntegration) GetImage() *string { + if a == nil { + return nil } - *a = AccountToken(value) - a._rawJSON = json.RawMessage(data) - return nil + return a.Image } -func (a *AccountToken) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(a); err == nil { - return value +func (a *AccountIntegration) GetSquareImage() *string { + if a == nil { + return nil } - return fmt.Sprintf("%#v", a) + return a.SquareImage } -type AdvancedMetadata struct { - Id string `json:"id"` - DisplayName *string `json:"display_name,omitempty"` - Description *string `json:"description,omitempty"` - IsRequired *bool `json:"is_required,omitempty"` - IsCustom *bool `json:"is_custom,omitempty"` - FieldChoices []interface{} `json:"field_choices,omitempty"` - - _rawJSON json.RawMessage +func (a *AccountIntegration) GetColor() *string { + if a == nil { + return nil + } + return a.Color } -func (a *AdvancedMetadata) UnmarshalJSON(data []byte) error { - type unmarshaler AdvancedMetadata - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (a *AccountIntegration) GetSlug() *string { + if a == nil { + return nil } - *a = AdvancedMetadata(value) - a._rawJSON = json.RawMessage(data) - return nil + return a.Slug } -func (a *AdvancedMetadata) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } +func (a *AccountIntegration) GetApiEndpointsToDocumentationUrls() map[string]interface{} { + if a == nil { + return nil } - if value, err := core.StringifyJSON(a); err == nil { - return value + return a.ApiEndpointsToDocumentationUrls +} + +func (a *AccountIntegration) GetWebhookSetupGuideUrl() *string { + if a == nil { + return nil } - return fmt.Sprintf("%#v", a) + return a.WebhookSetupGuideUrl } -type AsyncPassthroughReciept struct { - AsyncPassthroughReceiptId string `json:"async_passthrough_receipt_id"` +func (a *AccountIntegration) GetCategoryBetaStatus() map[string]interface{} { + if a == nil { + return nil + } + return a.CategoryBetaStatus +} - _rawJSON json.RawMessage +func (a *AccountIntegration) GetExtraProperties() map[string]interface{} { + return a.extraProperties } -func (a *AsyncPassthroughReciept) UnmarshalJSON(data []byte) error { - type unmarshaler AsyncPassthroughReciept +func (a *AccountIntegration) UnmarshalJSON(data []byte) error { + type unmarshaler AccountIntegration var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *a = AsyncPassthroughReciept(value) - a._rawJSON = json.RawMessage(data) + *a = AccountIntegration(value) + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err + } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) return nil } -func (a *AsyncPassthroughReciept) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { +func (a *AccountIntegration) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(a); err == nil { + if value, err := internal.StringifyJSON(a); err == nil { return value } return fmt.Sprintf("%#v", a) } // # The Attachment Object -// // ### Description -// // The `Attachment` object is used to represent an attachment for a ticket. // // ### Usage Example -// // TODO type Attachment struct { - Id *string `json:"id,omitempty"` + Id *string `json:"id,omitempty" url:"id,omitempty"` // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` // The attachment's name. It is required to include the file extension in the attachment's name. - FileName *string `json:"file_name,omitempty"` + FileName *string `json:"file_name,omitempty" url:"file_name,omitempty"` // The ticket associated with the attachment. - Ticket *AttachmentTicket `json:"ticket,omitempty"` + Ticket *AttachmentTicket `json:"ticket,omitempty" url:"ticket,omitempty"` // The attachment's url. It is required to include the file extension in the file's URL. - FileUrl *string `json:"file_url,omitempty"` + FileUrl *string `json:"file_url,omitempty" url:"file_url,omitempty"` // The attachment's file format. - ContentType *string `json:"content_type,omitempty"` + ContentType *string `json:"content_type,omitempty" url:"content_type,omitempty"` // The user who uploaded the attachment. - UploadedBy *string `json:"uploaded_by,omitempty"` + UploadedBy *string `json:"uploaded_by,omitempty" url:"uploaded_by,omitempty"` // When the third party's attachment was created. - RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty"` + RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty" url:"remote_created_at,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (a *Attachment) UnmarshalJSON(data []byte) error { - type unmarshaler Attachment - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (a *Attachment) GetId() *string { + if a == nil { + return nil } - *a = Attachment(value) - a._rawJSON = json.RawMessage(data) - return nil + return a.Id } -func (a *Attachment) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } +func (a *Attachment) GetRemoteId() *string { + if a == nil { + return nil } - if value, err := core.StringifyJSON(a); err == nil { - return value + return a.RemoteId +} + +func (a *Attachment) GetCreatedAt() *time.Time { + if a == nil { + return nil } - return fmt.Sprintf("%#v", a) + return a.CreatedAt } -// # The Attachment Object -// -// ### Description -// -// The `Attachment` object is used to represent an attachment for a ticket. -// -// ### Usage Example -// -// TODO -type AttachmentRequest struct { - // The attachment's name. It is required to include the file extension in the attachment's name. - FileName *string `json:"file_name,omitempty"` - // The ticket associated with the attachment. - Ticket *AttachmentRequestTicket `json:"ticket,omitempty"` - // The attachment's url. It is required to include the file extension in the file's URL. - FileUrl *string `json:"file_url,omitempty"` - // The attachment's file format. - ContentType *string `json:"content_type,omitempty"` - // The user who uploaded the attachment. - UploadedBy *string `json:"uploaded_by,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` +func (a *Attachment) GetModifiedAt() *time.Time { + if a == nil { + return nil + } + return a.ModifiedAt +} - _rawJSON json.RawMessage +func (a *Attachment) GetFileName() *string { + if a == nil { + return nil + } + return a.FileName } -func (a *AttachmentRequest) UnmarshalJSON(data []byte) error { - type unmarshaler AttachmentRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (a *Attachment) GetTicket() *AttachmentTicket { + if a == nil { + return nil } - *a = AttachmentRequest(value) - a._rawJSON = json.RawMessage(data) - return nil + return a.Ticket } -func (a *AttachmentRequest) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } +func (a *Attachment) GetFileUrl() *string { + if a == nil { + return nil } - if value, err := core.StringifyJSON(a); err == nil { - return value + return a.FileUrl +} + +func (a *Attachment) GetContentType() *string { + if a == nil { + return nil } - return fmt.Sprintf("%#v", a) + return a.ContentType } -// The ticket associated with the attachment. -type AttachmentRequestTicket struct { - typeName string - String string - Ticket *Ticket +func (a *Attachment) GetUploadedBy() *string { + if a == nil { + return nil + } + return a.UploadedBy } -func NewAttachmentRequestTicketFromString(value string) *AttachmentRequestTicket { - return &AttachmentRequestTicket{typeName: "string", String: value} +func (a *Attachment) GetRemoteCreatedAt() *time.Time { + if a == nil { + return nil + } + return a.RemoteCreatedAt } -func NewAttachmentRequestTicketFromTicket(value *Ticket) *AttachmentRequestTicket { - return &AttachmentRequestTicket{typeName: "ticket", Ticket: value} +func (a *Attachment) GetRemoteWasDeleted() *bool { + if a == nil { + return nil + } + return a.RemoteWasDeleted } -func (a *AttachmentRequestTicket) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" - a.String = valueString +func (a *Attachment) GetFieldMappings() map[string]interface{} { + if a == nil { return nil } - valueTicket := new(Ticket) - if err := json.Unmarshal(data, &valueTicket); err == nil { - a.typeName = "ticket" - a.Ticket = valueTicket + return a.FieldMappings +} + +func (a *Attachment) GetRemoteData() []*RemoteData { + if a == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, a) + return a.RemoteData } -func (a AttachmentRequestTicket) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "string": - return json.Marshal(a.String) - case "ticket": - return json.Marshal(a.Ticket) +func (a *Attachment) GetExtraProperties() map[string]interface{} { + return a.extraProperties +} + +func (a *Attachment) UnmarshalJSON(data []byte) error { + type embed Attachment + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + }{ + embed: embed(*a), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *a = Attachment(unmarshaler.embed) + a.CreatedAt = unmarshaler.CreatedAt.TimePtr() + a.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + a.RemoteCreatedAt = unmarshaler.RemoteCreatedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *a) + if err != nil { + return err } + a.extraProperties = extraProperties + a.rawJSON = json.RawMessage(data) + return nil } -type AttachmentRequestTicketVisitor interface { - VisitString(string) error - VisitTicket(*Ticket) error +func (a *Attachment) MarshalJSON() ([]byte, error) { + type embed Attachment + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + }{ + embed: embed(*a), + CreatedAt: internal.NewOptionalDateTime(a.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(a.ModifiedAt), + RemoteCreatedAt: internal.NewOptionalDateTime(a.RemoteCreatedAt), + } + return json.Marshal(marshaler) } -func (a *AttachmentRequestTicket) Accept(visitor AttachmentRequestTicketVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "string": - return visitor.VisitString(a.String) - case "ticket": - return visitor.VisitTicket(a.Ticket) +func (a *Attachment) String() string { + if len(a.rawJSON) > 0 { + if value, err := internal.StringifyJSON(a.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(a); err == nil { + return value } + return fmt.Sprintf("%#v", a) } // The ticket associated with the attachment. type AttachmentTicket struct { - typeName string - String string - Ticket *Ticket + String string + Ticket *Ticket + + typ string } -func NewAttachmentTicketFromString(value string) *AttachmentTicket { - return &AttachmentTicket{typeName: "string", String: value} +func (a *AttachmentTicket) GetString() string { + if a == nil { + return "" + } + return a.String } -func NewAttachmentTicketFromTicket(value *Ticket) *AttachmentTicket { - return &AttachmentTicket{typeName: "ticket", Ticket: value} +func (a *AttachmentTicket) GetTicket() *Ticket { + if a == nil { + return nil + } + return a.Ticket } func (a *AttachmentTicket) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" + a.typ = "String" a.String = valueString return nil } valueTicket := new(Ticket) if err := json.Unmarshal(data, &valueTicket); err == nil { - a.typeName = "ticket" + a.typ = "Ticket" a.Ticket = valueTicket return nil } @@ -592,14 +505,13 @@ func (a *AttachmentTicket) UnmarshalJSON(data []byte) error { } func (a AttachmentTicket) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "string": + if a.typ == "String" || a.String != "" { return json.Marshal(a.String) - case "ticket": + } + if a.typ == "Ticket" || a.Ticket != nil { return json.Marshal(a.Ticket) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", a) } type AttachmentTicketVisitor interface { @@ -608,318 +520,23 @@ type AttachmentTicketVisitor interface { } func (a *AttachmentTicket) Accept(visitor AttachmentTicketVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "string": + if a.typ == "String" || a.String != "" { return visitor.VisitString(a.String) - case "ticket": - return visitor.VisitTicket(a.Ticket) - } -} - -type AuditLogEvent struct { - Id *string `json:"id,omitempty"` - // The User's full name at the time of this Event occurring. - UserName *string `json:"user_name,omitempty"` - // The User's email at the time of this Event occurring. - UserEmail *string `json:"user_email,omitempty"` - // Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. - // - // - `ADMIN` - ADMIN - // - `DEVELOPER` - DEVELOPER - // - `MEMBER` - MEMBER - // - `API` - API - // - `SYSTEM` - SYSTEM - // - `MERGE_TEAM` - MERGE_TEAM - Role *AuditLogEventRole `json:"role,omitempty"` - IpAddress string `json:"ip_address"` - // Designates the type of event that occurred. - // - // - `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY - // - `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY - // - `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY - // - `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY - // - `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY - // - `INVITED_USER` - INVITED_USER - // - `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED - // - `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED - // - `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT - // - `CREATED_DESTINATION` - CREATED_DESTINATION - // - `DELETED_DESTINATION` - DELETED_DESTINATION - // - `CHANGED_DESTINATION` - CHANGED_DESTINATION - // - `CHANGED_SCOPES` - CHANGED_SCOPES - // - `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION - // - `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS - // - `ENABLED_INTEGRATION` - ENABLED_INTEGRATION - // - `DISABLED_INTEGRATION` - DISABLED_INTEGRATION - // - `ENABLED_CATEGORY` - ENABLED_CATEGORY - // - `DISABLED_CATEGORY` - DISABLED_CATEGORY - // - `CHANGED_PASSWORD` - CHANGED_PASSWORD - // - `RESET_PASSWORD` - RESET_PASSWORD - // - `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - // - `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - // - `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION - // - `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT - // - `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING - // - `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING - // - `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING - // - `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 - // - `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - // - `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - // - `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE - // - `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC - // - `MUTED_ISSUE` - MUTED_ISSUE - // - `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK - // - `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK - // - `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK - // - `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED - // - `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED - EventType *AuditLogEventEventType `json:"event_type,omitempty"` - EventDescription string `json:"event_description"` - CreatedAt *time.Time `json:"created_at,omitempty"` - - _rawJSON json.RawMessage -} - -func (a *AuditLogEvent) UnmarshalJSON(data []byte) error { - type unmarshaler AuditLogEvent - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *a = AuditLogEvent(value) - a._rawJSON = json.RawMessage(data) - return nil -} - -func (a *AuditLogEvent) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } } - if value, err := core.StringifyJSON(a); err == nil { - return value + if a.typ == "Ticket" || a.Ticket != nil { + return visitor.VisitTicket(a.Ticket) } - return fmt.Sprintf("%#v", a) + return fmt.Errorf("type %T does not include a non-empty union type", a) } -// Designates the type of event that occurred. -// -// - `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY -// - `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY -// - `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY -// - `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY -// - `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY -// - `INVITED_USER` - INVITED_USER -// - `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED -// - `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED -// - `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT -// - `CREATED_DESTINATION` - CREATED_DESTINATION -// - `DELETED_DESTINATION` - DELETED_DESTINATION -// - `CHANGED_DESTINATION` - CHANGED_DESTINATION -// - `CHANGED_SCOPES` - CHANGED_SCOPES -// - `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION -// - `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS -// - `ENABLED_INTEGRATION` - ENABLED_INTEGRATION -// - `DISABLED_INTEGRATION` - DISABLED_INTEGRATION -// - `ENABLED_CATEGORY` - ENABLED_CATEGORY -// - `DISABLED_CATEGORY` - DISABLED_CATEGORY -// - `CHANGED_PASSWORD` - CHANGED_PASSWORD -// - `RESET_PASSWORD` - RESET_PASSWORD -// - `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION -// - `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT -// - `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION -// - `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT -// - `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING -// - `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING -// - `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING -// - `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 -// - `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE -// - `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE -// - `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE -// - `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC -// - `MUTED_ISSUE` - MUTED_ISSUE -// - `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK -// - `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK -// - `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK -// - `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED -// - `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED -type AuditLogEventEventType struct { - typeName string - EventTypeEnum EventTypeEnum - String string -} - -func NewAuditLogEventEventTypeFromEventTypeEnum(value EventTypeEnum) *AuditLogEventEventType { - return &AuditLogEventEventType{typeName: "eventTypeEnum", EventTypeEnum: value} -} - -func NewAuditLogEventEventTypeFromString(value string) *AuditLogEventEventType { - return &AuditLogEventEventType{typeName: "string", String: value} -} - -func (a *AuditLogEventEventType) UnmarshalJSON(data []byte) error { - var valueEventTypeEnum EventTypeEnum - if err := json.Unmarshal(data, &valueEventTypeEnum); err == nil { - a.typeName = "eventTypeEnum" - a.EventTypeEnum = valueEventTypeEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" - a.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, a) -} - -func (a AuditLogEventEventType) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "eventTypeEnum": - return json.Marshal(a.EventTypeEnum) - case "string": - return json.Marshal(a.String) - } -} - -type AuditLogEventEventTypeVisitor interface { - VisitEventTypeEnum(EventTypeEnum) error - VisitString(string) error -} - -func (a *AuditLogEventEventType) Accept(visitor AuditLogEventEventTypeVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "eventTypeEnum": - return visitor.VisitEventTypeEnum(a.EventTypeEnum) - case "string": - return visitor.VisitString(a.String) - } -} - -// Designates the role of the user (or SYSTEM/API if action not taken by a user) at the time of this Event occurring. -// -// - `ADMIN` - ADMIN -// - `DEVELOPER` - DEVELOPER -// - `MEMBER` - MEMBER -// - `API` - API -// - `SYSTEM` - SYSTEM -// - `MERGE_TEAM` - MERGE_TEAM -type AuditLogEventRole struct { - typeName string - RoleEnum RoleEnum - String string -} - -func NewAuditLogEventRoleFromRoleEnum(value RoleEnum) *AuditLogEventRole { - return &AuditLogEventRole{typeName: "roleEnum", RoleEnum: value} -} - -func NewAuditLogEventRoleFromString(value string) *AuditLogEventRole { - return &AuditLogEventRole{typeName: "string", String: value} -} - -func (a *AuditLogEventRole) UnmarshalJSON(data []byte) error { - var valueRoleEnum RoleEnum - if err := json.Unmarshal(data, &valueRoleEnum); err == nil { - a.typeName = "roleEnum" - a.RoleEnum = valueRoleEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - a.typeName = "string" - a.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, a) -} - -func (a AuditLogEventRole) MarshalJSON() ([]byte, error) { - switch a.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "roleEnum": - return json.Marshal(a.RoleEnum) - case "string": - return json.Marshal(a.String) - } -} - -type AuditLogEventRoleVisitor interface { - VisitRoleEnum(RoleEnum) error - VisitString(string) error -} - -func (a *AuditLogEventRole) Accept(visitor AuditLogEventRoleVisitor) error { - switch a.typeName { - default: - return fmt.Errorf("invalid type %s in %T", a.typeName, a) - case "roleEnum": - return visitor.VisitRoleEnum(a.RoleEnum) - case "string": - return visitor.VisitString(a.String) - } -} - -// # The AvailableActions Object -// -// ### Description -// -// The `Activity` object is used to see all available model/operation combinations for an integration. -// -// ### Usage Example -// -// Fetch all the actions available for the `Zenefits` integration. -type AvailableActions struct { - Integration *AccountIntegration `json:"integration,omitempty"` - PassthroughAvailable bool `json:"passthrough_available"` - AvailableModelOperations []*ModelOperation `json:"available_model_operations,omitempty"` - - _rawJSON json.RawMessage -} - -func (a *AvailableActions) UnmarshalJSON(data []byte) error { - type unmarshaler AvailableActions - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *a = AvailableActions(value) - a._rawJSON = json.RawMessage(data) - return nil -} - -func (a *AvailableActions) String() string { - if len(a._rawJSON) > 0 { - if value, err := core.StringifyJSON(a._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(a); err == nil { - return value - } - return fmt.Sprintf("%#v", a) -} - -// - `hris` - hris -// - `ats` - ats -// - `accounting` - accounting -// - `ticketing` - ticketing -// - `crm` - crm -// - `mktg` - mktg -// - `filestorage` - filestorage -type CategoriesEnum string +// * `hris` - hris +// * `ats` - ats +// * `accounting` - accounting +// * `ticketing` - ticketing +// * `crm` - crm +// * `mktg` - mktg +// * `filestorage` - filestorage +type CategoriesEnum string const ( CategoriesEnumHris CategoriesEnum = "hris" @@ -956,13 +573,13 @@ func (c CategoriesEnum) Ptr() *CategoriesEnum { return &c } -// - `hris` - hris -// - `ats` - ats -// - `accounting` - accounting -// - `ticketing` - ticketing -// - `crm` - crm -// - `mktg` - mktg -// - `filestorage` - filestorage +// * `hris` - hris +// * `ats` - ats +// * `accounting` - accounting +// * `ticketing` - ticketing +// * `crm` - crm +// * `mktg` - mktg +// * `filestorage` - filestorage type CategoryEnum string const ( @@ -1001,66 +618,179 @@ func (c CategoryEnum) Ptr() *CategoryEnum { } // # The Collection Object -// // ### Description -// // The `Collection` object is used to represent one or more `Tickets`. There can be a hierarchy of `Collections`, in which a sub-collection belongs to a parent-collection. // // ### Usage Example -// // TODO type Collection struct { - Id *string `json:"id,omitempty"` + Id *string `json:"id,omitempty" url:"id,omitempty"` // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` // The collection's name. - Name *string `json:"name,omitempty"` + Name *string `json:"name,omitempty" url:"name,omitempty"` // The collection's description. - Description *string `json:"description,omitempty"` + Description *string `json:"description,omitempty" url:"description,omitempty"` + // The level of access a User has to the Collection and its sub-objects. + // + // * `PRIVATE` - PRIVATE + // * `COMPANY` - COMPANY + // * `PUBLIC` - PUBLIC + // * `PARENT_COLLECTION` - PARENT_COLLECTION + AccessLevel *CollectionAccessLevel `json:"access_level,omitempty" url:"access_level,omitempty"` // The collection's type. // - // - `LIST` - LIST - // - `PROJECT` - PROJECT - CollectionType *CollectionCollectionType `json:"collection_type,omitempty"` + // * `LIST` - LIST + // * `PROJECT` - PROJECT + CollectionType *CollectionTypeEnum `json:"collection_type,omitempty" url:"collection_type,omitempty"` // The parent collection for this collection. - ParentCollection *CollectionParentCollection `json:"parent_collection,omitempty"` - Teams []*CollectionTeamsItem `json:"teams,omitempty"` + ParentCollection *CollectionParentCollection `json:"parent_collection,omitempty" url:"parent_collection,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - // The level of access a User has to the Collection and its sub-objects. - // - // - `PRIVATE` - PRIVATE - // - `COMPANY` - COMPANY - // - `PUBLIC` - PUBLIC - AccessLevel *CollectionAccessLevel `json:"access_level,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (c *Collection) GetId() *string { + if c == nil { + return nil + } + return c.Id +} + +func (c *Collection) GetRemoteId() *string { + if c == nil { + return nil + } + return c.RemoteId +} + +func (c *Collection) GetCreatedAt() *time.Time { + if c == nil { + return nil + } + return c.CreatedAt +} + +func (c *Collection) GetModifiedAt() *time.Time { + if c == nil { + return nil + } + return c.ModifiedAt +} + +func (c *Collection) GetName() *string { + if c == nil { + return nil + } + return c.Name +} + +func (c *Collection) GetDescription() *string { + if c == nil { + return nil + } + return c.Description +} + +func (c *Collection) GetAccessLevel() *CollectionAccessLevel { + if c == nil { + return nil + } + return c.AccessLevel +} + +func (c *Collection) GetCollectionType() *CollectionTypeEnum { + if c == nil { + return nil + } + return c.CollectionType +} + +func (c *Collection) GetParentCollection() *CollectionParentCollection { + if c == nil { + return nil + } + return c.ParentCollection +} + +func (c *Collection) GetRemoteWasDeleted() *bool { + if c == nil { + return nil + } + return c.RemoteWasDeleted +} + +func (c *Collection) GetFieldMappings() map[string]interface{} { + if c == nil { + return nil + } + return c.FieldMappings +} + +func (c *Collection) GetRemoteData() []*RemoteData { + if c == nil { + return nil + } + return c.RemoteData +} - _rawJSON json.RawMessage +func (c *Collection) GetExtraProperties() map[string]interface{} { + return c.extraProperties } func (c *Collection) UnmarshalJSON(data []byte) error { - type unmarshaler Collection - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { + type embed Collection + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*c), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *c = Collection(unmarshaler.embed) + c.CreatedAt = unmarshaler.CreatedAt.TimePtr() + c.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *c) + if err != nil { return err } - *c = Collection(value) - c._rawJSON = json.RawMessage(data) + c.extraProperties = extraProperties + c.rawJSON = json.RawMessage(data) return nil } +func (c *Collection) MarshalJSON() ([]byte, error) { + type embed Collection + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*c), + CreatedAt: internal.NewOptionalDateTime(c.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(c.ModifiedAt), + } + return json.Marshal(marshaler) +} + func (c *Collection) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { + if len(c.rawJSON) > 0 { + if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(c); err == nil { + if value, err := internal.StringifyJSON(c); err == nil { return value } return fmt.Sprintf("%#v", c) @@ -1068,33 +798,41 @@ func (c *Collection) String() string { // The level of access a User has to the Collection and its sub-objects. // -// - `PRIVATE` - PRIVATE -// - `COMPANY` - COMPANY -// - `PUBLIC` - PUBLIC +// * `PRIVATE` - PRIVATE +// * `COMPANY` - COMPANY +// * `PUBLIC` - PUBLIC +// * `PARENT_COLLECTION` - PARENT_COLLECTION type CollectionAccessLevel struct { - typeName string - AccessLevelEnum AccessLevelEnum - String string + CollectionAccessLevelEnum CollectionAccessLevelEnum + String string + + typ string } -func NewCollectionAccessLevelFromAccessLevelEnum(value AccessLevelEnum) *CollectionAccessLevel { - return &CollectionAccessLevel{typeName: "accessLevelEnum", AccessLevelEnum: value} +func (c *CollectionAccessLevel) GetCollectionAccessLevelEnum() CollectionAccessLevelEnum { + if c == nil { + return "" + } + return c.CollectionAccessLevelEnum } -func NewCollectionAccessLevelFromString(value string) *CollectionAccessLevel { - return &CollectionAccessLevel{typeName: "string", String: value} +func (c *CollectionAccessLevel) GetString() string { + if c == nil { + return "" + } + return c.String } func (c *CollectionAccessLevel) UnmarshalJSON(data []byte) error { - var valueAccessLevelEnum AccessLevelEnum - if err := json.Unmarshal(data, &valueAccessLevelEnum); err == nil { - c.typeName = "accessLevelEnum" - c.AccessLevelEnum = valueAccessLevelEnum + var valueCollectionAccessLevelEnum CollectionAccessLevelEnum + if err := json.Unmarshal(data, &valueCollectionAccessLevelEnum); err == nil { + c.typ = "CollectionAccessLevelEnum" + c.CollectionAccessLevelEnum = valueCollectionAccessLevelEnum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - c.typeName = "string" + c.typ = "String" c.String = valueString return nil } @@ -1102,118 +840,94 @@ func (c *CollectionAccessLevel) UnmarshalJSON(data []byte) error { } func (c CollectionAccessLevel) MarshalJSON() ([]byte, error) { - switch c.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "accessLevelEnum": - return json.Marshal(c.AccessLevelEnum) - case "string": + if c.typ == "CollectionAccessLevelEnum" || c.CollectionAccessLevelEnum != "" { + return json.Marshal(c.CollectionAccessLevelEnum) + } + if c.typ == "String" || c.String != "" { return json.Marshal(c.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", c) } type CollectionAccessLevelVisitor interface { - VisitAccessLevelEnum(AccessLevelEnum) error + VisitCollectionAccessLevelEnum(CollectionAccessLevelEnum) error VisitString(string) error } func (c *CollectionAccessLevel) Accept(visitor CollectionAccessLevelVisitor) error { - switch c.typeName { - default: - return fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "accessLevelEnum": - return visitor.VisitAccessLevelEnum(c.AccessLevelEnum) - case "string": + if c.typ == "CollectionAccessLevelEnum" || c.CollectionAccessLevelEnum != "" { + return visitor.VisitCollectionAccessLevelEnum(c.CollectionAccessLevelEnum) + } + if c.typ == "String" || c.String != "" { return visitor.VisitString(c.String) } + return fmt.Errorf("type %T does not include a non-empty union type", c) } -// The collection's type. -// -// - `LIST` - LIST -// - `PROJECT` - PROJECT -type CollectionCollectionType struct { - typeName string - CollectionTypeEnum CollectionTypeEnum - String string -} - -func NewCollectionCollectionTypeFromCollectionTypeEnum(value CollectionTypeEnum) *CollectionCollectionType { - return &CollectionCollectionType{typeName: "collectionTypeEnum", CollectionTypeEnum: value} -} - -func NewCollectionCollectionTypeFromString(value string) *CollectionCollectionType { - return &CollectionCollectionType{typeName: "string", String: value} -} +// * `PRIVATE` - PRIVATE +// * `COMPANY` - COMPANY +// * `PUBLIC` - PUBLIC +// * `PARENT_COLLECTION` - PARENT_COLLECTION +type CollectionAccessLevelEnum string -func (c *CollectionCollectionType) UnmarshalJSON(data []byte) error { - var valueCollectionTypeEnum CollectionTypeEnum - if err := json.Unmarshal(data, &valueCollectionTypeEnum); err == nil { - c.typeName = "collectionTypeEnum" - c.CollectionTypeEnum = valueCollectionTypeEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - c.typeName = "string" - c.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, c) -} +const ( + CollectionAccessLevelEnumPrivate CollectionAccessLevelEnum = "PRIVATE" + CollectionAccessLevelEnumCompany CollectionAccessLevelEnum = "COMPANY" + CollectionAccessLevelEnumPublic CollectionAccessLevelEnum = "PUBLIC" + CollectionAccessLevelEnumParentCollection CollectionAccessLevelEnum = "PARENT_COLLECTION" +) -func (c CollectionCollectionType) MarshalJSON() ([]byte, error) { - switch c.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "collectionTypeEnum": - return json.Marshal(c.CollectionTypeEnum) - case "string": - return json.Marshal(c.String) +func NewCollectionAccessLevelEnumFromString(s string) (CollectionAccessLevelEnum, error) { + switch s { + case "PRIVATE": + return CollectionAccessLevelEnumPrivate, nil + case "COMPANY": + return CollectionAccessLevelEnumCompany, nil + case "PUBLIC": + return CollectionAccessLevelEnumPublic, nil + case "PARENT_COLLECTION": + return CollectionAccessLevelEnumParentCollection, nil } + var t CollectionAccessLevelEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -type CollectionCollectionTypeVisitor interface { - VisitCollectionTypeEnum(CollectionTypeEnum) error - VisitString(string) error -} - -func (c *CollectionCollectionType) Accept(visitor CollectionCollectionTypeVisitor) error { - switch c.typeName { - default: - return fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "collectionTypeEnum": - return visitor.VisitCollectionTypeEnum(c.CollectionTypeEnum) - case "string": - return visitor.VisitString(c.String) - } +func (c CollectionAccessLevelEnum) Ptr() *CollectionAccessLevelEnum { + return &c } // The parent collection for this collection. type CollectionParentCollection struct { - typeName string String string Collection *Collection + + typ string } -func NewCollectionParentCollectionFromString(value string) *CollectionParentCollection { - return &CollectionParentCollection{typeName: "string", String: value} +func (c *CollectionParentCollection) GetString() string { + if c == nil { + return "" + } + return c.String } -func NewCollectionParentCollectionFromCollection(value *Collection) *CollectionParentCollection { - return &CollectionParentCollection{typeName: "collection", Collection: value} +func (c *CollectionParentCollection) GetCollection() *Collection { + if c == nil { + return nil + } + return c.Collection } func (c *CollectionParentCollection) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - c.typeName = "string" + c.typ = "String" c.String = valueString return nil } valueCollection := new(Collection) if err := json.Unmarshal(data, &valueCollection); err == nil { - c.typeName = "collection" + c.typ = "Collection" c.Collection = valueCollection return nil } @@ -1221,14 +935,13 @@ func (c *CollectionParentCollection) UnmarshalJSON(data []byte) error { } func (c CollectionParentCollection) MarshalJSON() ([]byte, error) { - switch c.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": + if c.typ == "String" || c.String != "" { return json.Marshal(c.String) - case "collection": + } + if c.typ == "Collection" || c.Collection != nil { return json.Marshal(c.Collection) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", c) } type CollectionParentCollectionVisitor interface { @@ -1237,75 +950,17 @@ type CollectionParentCollectionVisitor interface { } func (c *CollectionParentCollection) Accept(visitor CollectionParentCollectionVisitor) error { - switch c.typeName { - default: - return fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": + if c.typ == "String" || c.String != "" { return visitor.VisitString(c.String) - case "collection": - return visitor.VisitCollection(c.Collection) - } -} - -type CollectionTeamsItem struct { - typeName string - String string - Team *Team -} - -func NewCollectionTeamsItemFromString(value string) *CollectionTeamsItem { - return &CollectionTeamsItem{typeName: "string", String: value} -} - -func NewCollectionTeamsItemFromTeam(value *Team) *CollectionTeamsItem { - return &CollectionTeamsItem{typeName: "team", Team: value} -} - -func (c *CollectionTeamsItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - c.typeName = "string" - c.String = valueString - return nil - } - valueTeam := new(Team) - if err := json.Unmarshal(data, &valueTeam); err == nil { - c.typeName = "team" - c.Team = valueTeam - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, c) -} - -func (c CollectionTeamsItem) MarshalJSON() ([]byte, error) { - switch c.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return json.Marshal(c.String) - case "team": - return json.Marshal(c.Team) } -} - -type CollectionTeamsItemVisitor interface { - VisitString(string) error - VisitTeam(*Team) error -} - -func (c *CollectionTeamsItem) Accept(visitor CollectionTeamsItemVisitor) error { - switch c.typeName { - default: - return fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return visitor.VisitString(c.String) - case "team": - return visitor.VisitTeam(c.Team) + if c.typ == "Collection" || c.Collection != nil { + return visitor.VisitCollection(c.Collection) } + return fmt.Errorf("type %T does not include a non-empty union type", c) } -// - `LIST` - LIST -// - `PROJECT` - PROJECT +// * `LIST` - LIST +// * `PROJECT` - PROJECT type CollectionTypeEnum string const ( @@ -1328,3628 +983,1947 @@ func (c CollectionTypeEnum) Ptr() *CollectionTypeEnum { return &c } -// # The Comment Object -// +// # The Contact Object // ### Description -// -// The `Comment` object is used to represent a comment on a ticket. +// The `Contact` object is used to represent the customer, lead, or external user that a ticket is associated with. // // ### Usage Example -// // TODO -type Comment struct { - Id *string `json:"id,omitempty"` +type Contact struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The author of the Comment, if the author is a User. If the third party does not support specifying an author, we will append "[Posted on behalf of {name}]" to the comment. - User *CommentUser `json:"user,omitempty"` - // The author of the Comment, if the author is a Contact.If the third party does not support specifying an author, we will append "[Posted on behalf of {name}]" to the comment. - Contact *CommentContact `json:"contact,omitempty"` - // The comment's text body. - Body *string `json:"body,omitempty"` - // The comment's text body formatted as html. - HtmlBody *string `json:"html_body,omitempty"` - // The ticket associated with the comment. - Ticket *CommentTicket `json:"ticket,omitempty"` - // Whether or not the comment is internal. - IsPrivate *bool `json:"is_private,omitempty"` - // When the third party's comment was created. - RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty"` + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The contact's name. + Name *string `json:"name,omitempty" url:"name,omitempty"` + // The contact's email address. + EmailAddress *string `json:"email_address,omitempty" url:"email_address,omitempty"` + // The contact's phone number. + PhoneNumber *string `json:"phone_number,omitempty" url:"phone_number,omitempty"` + // The contact's details. + Details *string `json:"details,omitempty" url:"details,omitempty"` + // The contact's account. + Account *ContactAccount `json:"account,omitempty" url:"account,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (c *Comment) UnmarshalJSON(data []byte) error { - type unmarshaler Comment - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (c *Contact) GetId() *string { + if c == nil { + return nil } - *c = Comment(value) - c._rawJSON = json.RawMessage(data) - return nil + return c.Id } -func (c *Comment) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(c); err == nil { - return value +func (c *Contact) GetRemoteId() *string { + if c == nil { + return nil } - return fmt.Sprintf("%#v", c) + return c.RemoteId } -// The author of the Comment, if the author is a Contact.If the third party does not support specifying an author, we will append "[Posted on behalf of {name}]" to the comment. -type CommentContact struct { - typeName string - String string - Contact *Contact +func (c *Contact) GetCreatedAt() *time.Time { + if c == nil { + return nil + } + return c.CreatedAt } -func NewCommentContactFromString(value string) *CommentContact { - return &CommentContact{typeName: "string", String: value} +func (c *Contact) GetModifiedAt() *time.Time { + if c == nil { + return nil + } + return c.ModifiedAt } -func NewCommentContactFromContact(value *Contact) *CommentContact { - return &CommentContact{typeName: "contact", Contact: value} +func (c *Contact) GetName() *string { + if c == nil { + return nil + } + return c.Name } -func (c *CommentContact) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - c.typeName = "string" - c.String = valueString +func (c *Contact) GetEmailAddress() *string { + if c == nil { return nil } - valueContact := new(Contact) - if err := json.Unmarshal(data, &valueContact); err == nil { - c.typeName = "contact" - c.Contact = valueContact + return c.EmailAddress +} + +func (c *Contact) GetPhoneNumber() *string { + if c == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, c) + return c.PhoneNumber } -func (c CommentContact) MarshalJSON() ([]byte, error) { - switch c.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return json.Marshal(c.String) - case "contact": - return json.Marshal(c.Contact) +func (c *Contact) GetDetails() *string { + if c == nil { + return nil } + return c.Details } -type CommentContactVisitor interface { - VisitString(string) error - VisitContact(*Contact) error +func (c *Contact) GetAccount() *ContactAccount { + if c == nil { + return nil + } + return c.Account } -func (c *CommentContact) Accept(visitor CommentContactVisitor) error { - switch c.typeName { - default: - return fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return visitor.VisitString(c.String) - case "contact": - return visitor.VisitContact(c.Contact) +func (c *Contact) GetRemoteWasDeleted() *bool { + if c == nil { + return nil } + return c.RemoteWasDeleted } -// # The Comment Object -// -// ### Description -// -// The `Comment` object is used to represent a comment on a ticket. -// -// ### Usage Example -// -// TODO -type CommentRequest struct { - // The author of the Comment, if the author is a User. If the third party does not support specifying an author, we will append "[Posted on behalf of {name}]" to the comment. - User *CommentRequestUser `json:"user,omitempty"` - // The author of the Comment, if the author is a Contact.If the third party does not support specifying an author, we will append "[Posted on behalf of {name}]" to the comment. - Contact *CommentRequestContact `json:"contact,omitempty"` - // The comment's text body. - Body *string `json:"body,omitempty"` - // The comment's text body formatted as html. - HtmlBody *string `json:"html_body,omitempty"` - // The ticket associated with the comment. - Ticket *CommentRequestTicket `json:"ticket,omitempty"` - // Whether or not the comment is internal. - IsPrivate *bool `json:"is_private,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` - - _rawJSON json.RawMessage -} - -func (c *CommentRequest) UnmarshalJSON(data []byte) error { - type unmarshaler CommentRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { +func (c *Contact) GetFieldMappings() map[string]interface{} { + if c == nil { + return nil + } + return c.FieldMappings +} + +func (c *Contact) GetRemoteData() []*RemoteData { + if c == nil { + return nil + } + return c.RemoteData +} + +func (c *Contact) GetExtraProperties() map[string]interface{} { + return c.extraProperties +} + +func (c *Contact) UnmarshalJSON(data []byte) error { + type embed Contact + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*c), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *c = Contact(unmarshaler.embed) + c.CreatedAt = unmarshaler.CreatedAt.TimePtr() + c.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *c) + if err != nil { return err } - *c = CommentRequest(value) - c._rawJSON = json.RawMessage(data) + c.extraProperties = extraProperties + c.rawJSON = json.RawMessage(data) return nil } -func (c *CommentRequest) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { +func (c *Contact) MarshalJSON() ([]byte, error) { + type embed Contact + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*c), + CreatedAt: internal.NewOptionalDateTime(c.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(c.ModifiedAt), + } + return json.Marshal(marshaler) +} + +func (c *Contact) String() string { + if len(c.rawJSON) > 0 { + if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(c); err == nil { + if value, err := internal.StringifyJSON(c); err == nil { return value } return fmt.Sprintf("%#v", c) } -// The author of the Comment, if the author is a Contact.If the third party does not support specifying an author, we will append "[Posted on behalf of {name}]" to the comment. -type CommentRequestContact struct { - typeName string - String string - Contact *Contact +// The contact's account. +type ContactAccount struct { + String string + Account *Account + + typ string } -func NewCommentRequestContactFromString(value string) *CommentRequestContact { - return &CommentRequestContact{typeName: "string", String: value} +func (c *ContactAccount) GetString() string { + if c == nil { + return "" + } + return c.String } -func NewCommentRequestContactFromContact(value *Contact) *CommentRequestContact { - return &CommentRequestContact{typeName: "contact", Contact: value} +func (c *ContactAccount) GetAccount() *Account { + if c == nil { + return nil + } + return c.Account } -func (c *CommentRequestContact) UnmarshalJSON(data []byte) error { +func (c *ContactAccount) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - c.typeName = "string" + c.typ = "String" c.String = valueString return nil } - valueContact := new(Contact) - if err := json.Unmarshal(data, &valueContact); err == nil { - c.typeName = "contact" - c.Contact = valueContact + valueAccount := new(Account) + if err := json.Unmarshal(data, &valueAccount); err == nil { + c.typ = "Account" + c.Account = valueAccount return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, c) } -func (c CommentRequestContact) MarshalJSON() ([]byte, error) { - switch c.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": +func (c ContactAccount) MarshalJSON() ([]byte, error) { + if c.typ == "String" || c.String != "" { return json.Marshal(c.String) - case "contact": - return json.Marshal(c.Contact) } + if c.typ == "Account" || c.Account != nil { + return json.Marshal(c.Account) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", c) } -type CommentRequestContactVisitor interface { +type ContactAccountVisitor interface { VisitString(string) error - VisitContact(*Contact) error + VisitAccount(*Account) error } -func (c *CommentRequestContact) Accept(visitor CommentRequestContactVisitor) error { - switch c.typeName { - default: - return fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": +func (c *ContactAccount) Accept(visitor ContactAccountVisitor) error { + if c.typ == "String" || c.String != "" { return visitor.VisitString(c.String) - case "contact": - return visitor.VisitContact(c.Contact) } + if c.typ == "Account" || c.Account != nil { + return visitor.VisitAccount(c.Account) + } + return fmt.Errorf("type %T does not include a non-empty union type", c) } -// The ticket associated with the comment. -type CommentRequestTicket struct { - typeName string - String string - Ticket *Ticket +// # The DataPassthrough Object +// ### Description +// The `DataPassthrough` object is used to send information to an otherwise-unsupported third-party endpoint. +// +// ### Usage Example +// Create a `DataPassthrough` to get team hierarchies from your Rippling integration. +type DataPassthroughRequest struct { + Method MethodEnum `json:"method" url:"method"` + // The path of the request in the third party's platform. + Path string `json:"path" url:"path"` + // An optional override of the third party's base url for the request. + BaseUrlOverride *string `json:"base_url_override,omitempty" url:"base_url_override,omitempty"` + // The data with the request. You must include a `request_format` parameter matching the data's format + Data *string `json:"data,omitempty" url:"data,omitempty"` + // Pass an array of `MultipartFormField` objects in here instead of using the `data` param if `request_format` is set to `MULTIPART`. + MultipartFormData []*MultipartFormFieldRequest `json:"multipart_form_data,omitempty" url:"multipart_form_data,omitempty"` + // The headers to use for the request (Merge will handle the account's authorization headers). `Content-Type` header is required for passthrough. Choose content type corresponding to expected format of receiving server. + Headers map[string]interface{} `json:"headers,omitempty" url:"headers,omitempty"` + RequestFormat *RequestFormatEnum `json:"request_format,omitempty" url:"request_format,omitempty"` + // Optional. If true, the response will always be an object of the form `{"type": T, "value": ...}` where `T` will be one of `string, boolean, number, null, array, object`. + NormalizeResponse *bool `json:"normalize_response,omitempty" url:"normalize_response,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func NewCommentRequestTicketFromString(value string) *CommentRequestTicket { - return &CommentRequestTicket{typeName: "string", String: value} +func (d *DataPassthroughRequest) GetMethod() MethodEnum { + if d == nil { + return "" + } + return d.Method } -func NewCommentRequestTicketFromTicket(value *Ticket) *CommentRequestTicket { - return &CommentRequestTicket{typeName: "ticket", Ticket: value} +func (d *DataPassthroughRequest) GetPath() string { + if d == nil { + return "" + } + return d.Path } -func (c *CommentRequestTicket) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - c.typeName = "string" - c.String = valueString +func (d *DataPassthroughRequest) GetBaseUrlOverride() *string { + if d == nil { return nil } - valueTicket := new(Ticket) - if err := json.Unmarshal(data, &valueTicket); err == nil { - c.typeName = "ticket" - c.Ticket = valueTicket + return d.BaseUrlOverride +} + +func (d *DataPassthroughRequest) GetData() *string { + if d == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, c) + return d.Data } -func (c CommentRequestTicket) MarshalJSON() ([]byte, error) { - switch c.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return json.Marshal(c.String) - case "ticket": - return json.Marshal(c.Ticket) +func (d *DataPassthroughRequest) GetMultipartFormData() []*MultipartFormFieldRequest { + if d == nil { + return nil } + return d.MultipartFormData } -type CommentRequestTicketVisitor interface { - VisitString(string) error - VisitTicket(*Ticket) error +func (d *DataPassthroughRequest) GetHeaders() map[string]interface{} { + if d == nil { + return nil + } + return d.Headers } -func (c *CommentRequestTicket) Accept(visitor CommentRequestTicketVisitor) error { - switch c.typeName { - default: - return fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return visitor.VisitString(c.String) - case "ticket": - return visitor.VisitTicket(c.Ticket) +func (d *DataPassthroughRequest) GetRequestFormat() *RequestFormatEnum { + if d == nil { + return nil } + return d.RequestFormat } -// The author of the Comment, if the author is a User. If the third party does not support specifying an author, we will append "[Posted on behalf of {name}]" to the comment. -type CommentRequestUser struct { - typeName string - String string - User *User +func (d *DataPassthroughRequest) GetNormalizeResponse() *bool { + if d == nil { + return nil + } + return d.NormalizeResponse } -func NewCommentRequestUserFromString(value string) *CommentRequestUser { - return &CommentRequestUser{typeName: "string", String: value} +func (d *DataPassthroughRequest) GetExtraProperties() map[string]interface{} { + return d.extraProperties } -func NewCommentRequestUserFromUser(value *User) *CommentRequestUser { - return &CommentRequestUser{typeName: "user", User: value} +func (d *DataPassthroughRequest) UnmarshalJSON(data []byte) error { + type unmarshaler DataPassthroughRequest + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *d = DataPassthroughRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *d) + if err != nil { + return err + } + d.extraProperties = extraProperties + d.rawJSON = json.RawMessage(data) + return nil } -func (c *CommentRequestUser) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - c.typeName = "string" - c.String = valueString - return nil +func (d *DataPassthroughRequest) String() string { + if len(d.rawJSON) > 0 { + if value, err := internal.StringifyJSON(d.rawJSON); err == nil { + return value + } } - valueUser := new(User) - if err := json.Unmarshal(data, &valueUser); err == nil { - c.typeName = "user" - c.User = valueUser - return nil + if value, err := internal.StringifyJSON(d); err == nil { + return value } - return fmt.Errorf("%s cannot be deserialized as a %T", data, c) + return fmt.Sprintf("%#v", d) } -func (c CommentRequestUser) MarshalJSON() ([]byte, error) { - switch c.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return json.Marshal(c.String) - case "user": - return json.Marshal(c.User) - } +type DebugModeLog struct { + LogId string `json:"log_id" url:"log_id"` + DashboardView string `json:"dashboard_view" url:"dashboard_view"` + LogSummary *DebugModelLogSummary `json:"log_summary" url:"log_summary"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage } -type CommentRequestUserVisitor interface { - VisitString(string) error - VisitUser(*User) error +func (d *DebugModeLog) GetLogId() string { + if d == nil { + return "" + } + return d.LogId } -func (c *CommentRequestUser) Accept(visitor CommentRequestUserVisitor) error { - switch c.typeName { - default: - return fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return visitor.VisitString(c.String) - case "user": - return visitor.VisitUser(c.User) +func (d *DebugModeLog) GetDashboardView() string { + if d == nil { + return "" } + return d.DashboardView } -type CommentResponse struct { - Model *Comment `json:"model,omitempty"` - Warnings []*WarningValidationProblem `json:"warnings,omitempty"` - Errors []*ErrorValidationProblem `json:"errors,omitempty"` - Logs []*DebugModeLog `json:"logs,omitempty"` +func (d *DebugModeLog) GetLogSummary() *DebugModelLogSummary { + if d == nil { + return nil + } + return d.LogSummary +} - _rawJSON json.RawMessage +func (d *DebugModeLog) GetExtraProperties() map[string]interface{} { + return d.extraProperties } -func (c *CommentResponse) UnmarshalJSON(data []byte) error { - type unmarshaler CommentResponse +func (d *DebugModeLog) UnmarshalJSON(data []byte) error { + type unmarshaler DebugModeLog var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *c = CommentResponse(value) - c._rawJSON = json.RawMessage(data) + *d = DebugModeLog(value) + extraProperties, err := internal.ExtractExtraProperties(data, *d) + if err != nil { + return err + } + d.extraProperties = extraProperties + d.rawJSON = json.RawMessage(data) return nil } -func (c *CommentResponse) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { +func (d *DebugModeLog) String() string { + if len(d.rawJSON) > 0 { + if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(c); err == nil { + if value, err := internal.StringifyJSON(d); err == nil { return value } - return fmt.Sprintf("%#v", c) + return fmt.Sprintf("%#v", d) } -// The ticket associated with the comment. -type CommentTicket struct { - typeName string - String string - Ticket *Ticket -} +type DebugModelLogSummary struct { + Url string `json:"url" url:"url"` + Method string `json:"method" url:"method"` + StatusCode int `json:"status_code" url:"status_code"` -func NewCommentTicketFromString(value string) *CommentTicket { - return &CommentTicket{typeName: "string", String: value} + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func NewCommentTicketFromTicket(value *Ticket) *CommentTicket { - return &CommentTicket{typeName: "ticket", Ticket: value} +func (d *DebugModelLogSummary) GetUrl() string { + if d == nil { + return "" + } + return d.Url } -func (c *CommentTicket) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - c.typeName = "string" - c.String = valueString - return nil - } - valueTicket := new(Ticket) - if err := json.Unmarshal(data, &valueTicket); err == nil { - c.typeName = "ticket" - c.Ticket = valueTicket - return nil +func (d *DebugModelLogSummary) GetMethod() string { + if d == nil { + return "" } - return fmt.Errorf("%s cannot be deserialized as a %T", data, c) + return d.Method } -func (c CommentTicket) MarshalJSON() ([]byte, error) { - switch c.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return json.Marshal(c.String) - case "ticket": - return json.Marshal(c.Ticket) +func (d *DebugModelLogSummary) GetStatusCode() int { + if d == nil { + return 0 } + return d.StatusCode } -type CommentTicketVisitor interface { - VisitString(string) error - VisitTicket(*Ticket) error +func (d *DebugModelLogSummary) GetExtraProperties() map[string]interface{} { + return d.extraProperties } -func (c *CommentTicket) Accept(visitor CommentTicketVisitor) error { - switch c.typeName { - default: - return fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return visitor.VisitString(c.String) - case "ticket": - return visitor.VisitTicket(c.Ticket) +func (d *DebugModelLogSummary) UnmarshalJSON(data []byte) error { + type unmarshaler DebugModelLogSummary + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *d = DebugModelLogSummary(value) + extraProperties, err := internal.ExtractExtraProperties(data, *d) + if err != nil { + return err } + d.extraProperties = extraProperties + d.rawJSON = json.RawMessage(data) + return nil } -// The author of the Comment, if the author is a User. If the third party does not support specifying an author, we will append "[Posted on behalf of {name}]" to the comment. -type CommentUser struct { - typeName string - String string - User *User +func (d *DebugModelLogSummary) String() string { + if len(d.rawJSON) > 0 { + if value, err := internal.StringifyJSON(d.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(d); err == nil { + return value + } + return fmt.Sprintf("%#v", d) } -func NewCommentUserFromString(value string) *CommentUser { - return &CommentUser{typeName: "string", String: value} -} +// * `RAW` - RAW +// * `BASE64` - BASE64 +// * `GZIP_BASE64` - GZIP_BASE64 +type EncodingEnum string -func NewCommentUserFromUser(value *User) *CommentUser { - return &CommentUser{typeName: "user", User: value} -} +const ( + EncodingEnumRaw EncodingEnum = "RAW" + EncodingEnumBase64 EncodingEnum = "BASE64" + EncodingEnumGzipBase64 EncodingEnum = "GZIP_BASE64" +) -func (c *CommentUser) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - c.typeName = "string" - c.String = valueString - return nil - } - valueUser := new(User) - if err := json.Unmarshal(data, &valueUser); err == nil { - c.typeName = "user" - c.User = valueUser - return nil +func NewEncodingEnumFromString(s string) (EncodingEnum, error) { + switch s { + case "RAW": + return EncodingEnumRaw, nil + case "BASE64": + return EncodingEnumBase64, nil + case "GZIP_BASE64": + return EncodingEnumGzipBase64, nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, c) + var t EncodingEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (c CommentUser) MarshalJSON() ([]byte, error) { - switch c.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return json.Marshal(c.String) - case "user": - return json.Marshal(c.User) - } +func (e EncodingEnum) Ptr() *EncodingEnum { + return &e } -type CommentUserVisitor interface { - VisitString(string) error - VisitUser(*User) error +type ErrorValidationProblem struct { + Source *ValidationProblemSource `json:"source,omitempty" url:"source,omitempty"` + Title string `json:"title" url:"title"` + Detail string `json:"detail" url:"detail"` + ProblemType string `json:"problem_type" url:"problem_type"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (c *CommentUser) Accept(visitor CommentUserVisitor) error { - switch c.typeName { - default: - return fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return visitor.VisitString(c.String) - case "user": - return visitor.VisitUser(c.User) +func (e *ErrorValidationProblem) GetSource() *ValidationProblemSource { + if e == nil { + return nil } + return e.Source } -type CommonModelScopeApi struct { - // The common models you want to update the scopes for - CommonModels []*IndividualCommonModelScopeDeserializer `json:"common_models,omitempty"` - - _rawJSON json.RawMessage +func (e *ErrorValidationProblem) GetTitle() string { + if e == nil { + return "" + } + return e.Title } -func (c *CommonModelScopeApi) UnmarshalJSON(data []byte) error { - type unmarshaler CommonModelScopeApi - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (e *ErrorValidationProblem) GetDetail() string { + if e == nil { + return "" } - *c = CommonModelScopeApi(value) - c._rawJSON = json.RawMessage(data) - return nil + return e.Detail } -func (c *CommonModelScopeApi) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(c); err == nil { - return value +func (e *ErrorValidationProblem) GetProblemType() string { + if e == nil { + return "" } - return fmt.Sprintf("%#v", c) + return e.ProblemType } -type CommonModelScopesBodyRequest struct { - ModelId string `json:"model_id"` - EnabledActions []EnabledActionsEnum `json:"enabled_actions,omitempty"` - DisabledFields []string `json:"disabled_fields,omitempty"` - - _rawJSON json.RawMessage +func (e *ErrorValidationProblem) GetExtraProperties() map[string]interface{} { + return e.extraProperties } -func (c *CommonModelScopesBodyRequest) UnmarshalJSON(data []byte) error { - type unmarshaler CommonModelScopesBodyRequest +func (e *ErrorValidationProblem) UnmarshalJSON(data []byte) error { + type unmarshaler ErrorValidationProblem var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *c = CommonModelScopesBodyRequest(value) - c._rawJSON = json.RawMessage(data) + *e = ErrorValidationProblem(value) + extraProperties, err := internal.ExtractExtraProperties(data, *e) + if err != nil { + return err + } + e.extraProperties = extraProperties + e.rawJSON = json.RawMessage(data) return nil } -func (c *CommonModelScopesBodyRequest) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { +func (e *ErrorValidationProblem) String() string { + if len(e.rawJSON) > 0 { + if value, err := internal.StringifyJSON(e.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(c); err == nil { + if value, err := internal.StringifyJSON(e); err == nil { return value } - return fmt.Sprintf("%#v", c) + return fmt.Sprintf("%#v", e) } -// # The Contact Object -// -// ### Description -// -// The `Contact` object is used to represent the customer, lead, or external user that a ticket is associated with. -// -// ### Usage Example -// -// TODO -type Contact struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The contact's name. - Name *string `json:"name,omitempty"` - // The contact's email address. - EmailAddress *string `json:"email_address,omitempty"` - // The contact's phone number. - PhoneNumber *string `json:"phone_number,omitempty"` - // The contact's details. - Details *string `json:"details,omitempty"` - // The contact's account. - Account *ContactAccount `json:"account,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` - - _rawJSON json.RawMessage -} - -func (c *Contact) UnmarshalJSON(data []byte) error { - type unmarshaler Contact - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *c = Contact(value) - c._rawJSON = json.RawMessage(data) - return nil -} - -func (c *Contact) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(c); err == nil { - return value - } - return fmt.Sprintf("%#v", c) -} - -// The contact's account. -type ContactAccount struct { - typeName string - String string - Account *Account -} - -func NewContactAccountFromString(value string) *ContactAccount { - return &ContactAccount{typeName: "string", String: value} -} - -func NewContactAccountFromAccount(value *Account) *ContactAccount { - return &ContactAccount{typeName: "account", Account: value} -} - -func (c *ContactAccount) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - c.typeName = "string" - c.String = valueString - return nil - } - valueAccount := new(Account) - if err := json.Unmarshal(data, &valueAccount); err == nil { - c.typeName = "account" - c.Account = valueAccount - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, c) -} - -func (c ContactAccount) MarshalJSON() ([]byte, error) { - switch c.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return json.Marshal(c.String) - case "account": - return json.Marshal(c.Account) - } -} - -type ContactAccountVisitor interface { - VisitString(string) error - VisitAccount(*Account) error -} - -func (c *ContactAccount) Accept(visitor ContactAccountVisitor) error { - switch c.typeName { - default: - return fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return visitor.VisitString(c.String) - case "account": - return visitor.VisitAccount(c.Account) - } -} - -// # The Contact Object -// -// ### Description -// -// The `Contact` object is used to represent the customer, lead, or external user that a ticket is associated with. -// -// ### Usage Example -// -// TODO -type ContactRequest struct { - // The contact's name. - Name *string `json:"name,omitempty"` - // The contact's email address. - EmailAddress *string `json:"email_address,omitempty"` - // The contact's phone number. - PhoneNumber *string `json:"phone_number,omitempty"` - // The contact's details. - Details *string `json:"details,omitempty"` - // The contact's account. - Account *ContactRequestAccount `json:"account,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` - - _rawJSON json.RawMessage -} - -func (c *ContactRequest) UnmarshalJSON(data []byte) error { - type unmarshaler ContactRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *c = ContactRequest(value) - c._rawJSON = json.RawMessage(data) - return nil -} - -func (c *ContactRequest) String() string { - if len(c._rawJSON) > 0 { - if value, err := core.StringifyJSON(c._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(c); err == nil { - return value - } - return fmt.Sprintf("%#v", c) -} - -// The contact's account. -type ContactRequestAccount struct { - typeName string - String string - Account *Account -} - -func NewContactRequestAccountFromString(value string) *ContactRequestAccount { - return &ContactRequestAccount{typeName: "string", String: value} -} - -func NewContactRequestAccountFromAccount(value *Account) *ContactRequestAccount { - return &ContactRequestAccount{typeName: "account", Account: value} -} - -func (c *ContactRequestAccount) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - c.typeName = "string" - c.String = valueString - return nil - } - valueAccount := new(Account) - if err := json.Unmarshal(data, &valueAccount); err == nil { - c.typeName = "account" - c.Account = valueAccount - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, c) -} - -func (c ContactRequestAccount) MarshalJSON() ([]byte, error) { - switch c.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return json.Marshal(c.String) - case "account": - return json.Marshal(c.Account) - } -} - -type ContactRequestAccountVisitor interface { - VisitString(string) error - VisitAccount(*Account) error -} - -func (c *ContactRequestAccount) Accept(visitor ContactRequestAccountVisitor) error { - switch c.typeName { - default: - return fmt.Errorf("invalid type %s in %T", c.typeName, c) - case "string": - return visitor.VisitString(c.String) - case "account": - return visitor.VisitAccount(c.Account) - } -} - -// # The DataPassthrough Object -// -// ### Description -// -// The `DataPassthrough` object is used to send information to an otherwise-unsupported third-party endpoint. -// -// ### Usage Example -// -// Create a `DataPassthrough` to get team hierarchies from your Rippling integration. -type DataPassthroughRequest struct { - Method MethodEnum `json:"method,omitempty"` - // The path of the request in the third party's platform. - Path string `json:"path"` - // An optional override of the third party's base url for the request. - BaseUrlOverride *string `json:"base_url_override,omitempty"` - // The data with the request. You must include a `request_format` parameter matching the data's format - Data *string `json:"data,omitempty"` - // Pass an array of `MultipartFormField` objects in here instead of using the `data` param if `request_format` is set to `MULTIPART`. - MultipartFormData []*MultipartFormFieldRequest `json:"multipart_form_data,omitempty"` - // The headers to use for the request (Merge will handle the account's authorization headers). `Content-Type` header is required for passthrough. Choose content type corresponding to expected format of receiving server. - Headers map[string]interface{} `json:"headers,omitempty"` - RequestFormat *RequestFormatEnum `json:"request_format,omitempty"` - // Optional. If true, the response will always be an object of the form `{"type": T, "value": ...}` where `T` will be one of `string, boolean, number, null, array, object`. - NormalizeResponse *bool `json:"normalize_response,omitempty"` - - _rawJSON json.RawMessage -} - -func (d *DataPassthroughRequest) UnmarshalJSON(data []byte) error { - type unmarshaler DataPassthroughRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *d = DataPassthroughRequest(value) - d._rawJSON = json.RawMessage(data) - return nil -} - -func (d *DataPassthroughRequest) String() string { - if len(d._rawJSON) > 0 { - if value, err := core.StringifyJSON(d._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(d); err == nil { - return value - } - return fmt.Sprintf("%#v", d) -} - -type DebugModeLog struct { - LogId string `json:"log_id"` - DashboardView string `json:"dashboard_view"` - LogSummary *DebugModelLogSummary `json:"log_summary,omitempty"` - - _rawJSON json.RawMessage -} - -func (d *DebugModeLog) UnmarshalJSON(data []byte) error { - type unmarshaler DebugModeLog - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *d = DebugModeLog(value) - d._rawJSON = json.RawMessage(data) - return nil -} - -func (d *DebugModeLog) String() string { - if len(d._rawJSON) > 0 { - if value, err := core.StringifyJSON(d._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(d); err == nil { - return value - } - return fmt.Sprintf("%#v", d) -} - -type DebugModelLogSummary struct { - Url string `json:"url"` - Method string `json:"method"` - StatusCode int `json:"status_code"` - - _rawJSON json.RawMessage -} - -func (d *DebugModelLogSummary) UnmarshalJSON(data []byte) error { - type unmarshaler DebugModelLogSummary - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *d = DebugModelLogSummary(value) - d._rawJSON = json.RawMessage(data) - return nil -} - -func (d *DebugModelLogSummary) String() string { - if len(d._rawJSON) > 0 { - if value, err := core.StringifyJSON(d._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(d); err == nil { - return value - } - return fmt.Sprintf("%#v", d) -} - -// - `READ` - READ -// - `WRITE` - WRITE -type EnabledActionsEnum string - -const ( - EnabledActionsEnumRead EnabledActionsEnum = "READ" - EnabledActionsEnumWrite EnabledActionsEnum = "WRITE" -) - -func NewEnabledActionsEnumFromString(s string) (EnabledActionsEnum, error) { - switch s { - case "READ": - return EnabledActionsEnumRead, nil - case "WRITE": - return EnabledActionsEnumWrite, nil - } - var t EnabledActionsEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (e EnabledActionsEnum) Ptr() *EnabledActionsEnum { - return &e -} - -// - `RAW` - RAW -// - `BASE64` - BASE64 -// - `GZIP_BASE64` - GZIP_BASE64 -type EncodingEnum string - -const ( - EncodingEnumRaw EncodingEnum = "RAW" - EncodingEnumBase64 EncodingEnum = "BASE64" - EncodingEnumGzipBase64 EncodingEnum = "GZIP_BASE64" -) - -func NewEncodingEnumFromString(s string) (EncodingEnum, error) { - switch s { - case "RAW": - return EncodingEnumRaw, nil - case "BASE64": - return EncodingEnumBase64, nil - case "GZIP_BASE64": - return EncodingEnumGzipBase64, nil - } - var t EncodingEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (e EncodingEnum) Ptr() *EncodingEnum { - return &e -} - -type ErrorValidationProblem struct { - Source *ValidationProblemSource `json:"source,omitempty"` - Title string `json:"title"` - Detail string `json:"detail"` - ProblemType string `json:"problem_type"` - - _rawJSON json.RawMessage -} - -func (e *ErrorValidationProblem) UnmarshalJSON(data []byte) error { - type unmarshaler ErrorValidationProblem - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *e = ErrorValidationProblem(value) - e._rawJSON = json.RawMessage(data) - return nil -} - -func (e *ErrorValidationProblem) String() string { - if len(e._rawJSON) > 0 { - if value, err := core.StringifyJSON(e._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(e); err == nil { - return value - } - return fmt.Sprintf("%#v", e) -} - -// - `CREATED_REMOTE_PRODUCTION_API_KEY` - CREATED_REMOTE_PRODUCTION_API_KEY -// - `DELETED_REMOTE_PRODUCTION_API_KEY` - DELETED_REMOTE_PRODUCTION_API_KEY -// - `CREATED_TEST_API_KEY` - CREATED_TEST_API_KEY -// - `DELETED_TEST_API_KEY` - DELETED_TEST_API_KEY -// - `REGENERATED_PRODUCTION_API_KEY` - REGENERATED_PRODUCTION_API_KEY -// - `INVITED_USER` - INVITED_USER -// - `TWO_FACTOR_AUTH_ENABLED` - TWO_FACTOR_AUTH_ENABLED -// - `TWO_FACTOR_AUTH_DISABLED` - TWO_FACTOR_AUTH_DISABLED -// - `DELETED_LINKED_ACCOUNT` - DELETED_LINKED_ACCOUNT -// - `CREATED_DESTINATION` - CREATED_DESTINATION -// - `DELETED_DESTINATION` - DELETED_DESTINATION -// - `CHANGED_DESTINATION` - CHANGED_DESTINATION -// - `CHANGED_SCOPES` - CHANGED_SCOPES -// - `CHANGED_PERSONAL_INFORMATION` - CHANGED_PERSONAL_INFORMATION -// - `CHANGED_ORGANIZATION_SETTINGS` - CHANGED_ORGANIZATION_SETTINGS -// - `ENABLED_INTEGRATION` - ENABLED_INTEGRATION -// - `DISABLED_INTEGRATION` - DISABLED_INTEGRATION -// - `ENABLED_CATEGORY` - ENABLED_CATEGORY -// - `DISABLED_CATEGORY` - DISABLED_CATEGORY -// - `CHANGED_PASSWORD` - CHANGED_PASSWORD -// - `RESET_PASSWORD` - RESET_PASSWORD -// - `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION -// - `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT -// - `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION` - DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION -// - `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT` - DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT -// - `CREATED_INTEGRATION_WIDE_FIELD_MAPPING` - CREATED_INTEGRATION_WIDE_FIELD_MAPPING -// - `CREATED_LINKED_ACCOUNT_FIELD_MAPPING` - CREATED_LINKED_ACCOUNT_FIELD_MAPPING -// - `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING` - CHANGED_INTEGRATION_WIDE_FIELD_MAPPING -// - `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 -// - `CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE -// - `CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE -// - `DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE` - DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE -// - `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC -// - `MUTED_ISSUE` - MUTED_ISSUE -// - `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK -// - `ENABLED_MERGE_WEBHOOK` - ENABLED_MERGE_WEBHOOK -// - `DISABLED_MERGE_WEBHOOK` - DISABLED_MERGE_WEBHOOK -// - `MERGE_WEBHOOK_TARGET_CHANGED` - MERGE_WEBHOOK_TARGET_CHANGED -// - `END_USER_CREDENTIALS_ACCESSED` - END_USER_CREDENTIALS_ACCESSED -type EventTypeEnum string - -const ( - EventTypeEnumCreatedRemoteProductionApiKey EventTypeEnum = "CREATED_REMOTE_PRODUCTION_API_KEY" - EventTypeEnumDeletedRemoteProductionApiKey EventTypeEnum = "DELETED_REMOTE_PRODUCTION_API_KEY" - EventTypeEnumCreatedTestApiKey EventTypeEnum = "CREATED_TEST_API_KEY" - EventTypeEnumDeletedTestApiKey EventTypeEnum = "DELETED_TEST_API_KEY" - EventTypeEnumRegeneratedProductionApiKey EventTypeEnum = "REGENERATED_PRODUCTION_API_KEY" - EventTypeEnumInvitedUser EventTypeEnum = "INVITED_USER" - EventTypeEnumTwoFactorAuthEnabled EventTypeEnum = "TWO_FACTOR_AUTH_ENABLED" - EventTypeEnumTwoFactorAuthDisabled EventTypeEnum = "TWO_FACTOR_AUTH_DISABLED" - EventTypeEnumDeletedLinkedAccount EventTypeEnum = "DELETED_LINKED_ACCOUNT" - EventTypeEnumCreatedDestination EventTypeEnum = "CREATED_DESTINATION" - EventTypeEnumDeletedDestination EventTypeEnum = "DELETED_DESTINATION" - EventTypeEnumChangedDestination EventTypeEnum = "CHANGED_DESTINATION" - EventTypeEnumChangedScopes EventTypeEnum = "CHANGED_SCOPES" - EventTypeEnumChangedPersonalInformation EventTypeEnum = "CHANGED_PERSONAL_INFORMATION" - EventTypeEnumChangedOrganizationSettings EventTypeEnum = "CHANGED_ORGANIZATION_SETTINGS" - EventTypeEnumEnabledIntegration EventTypeEnum = "ENABLED_INTEGRATION" - EventTypeEnumDisabledIntegration EventTypeEnum = "DISABLED_INTEGRATION" - EventTypeEnumEnabledCategory EventTypeEnum = "ENABLED_CATEGORY" - EventTypeEnumDisabledCategory EventTypeEnum = "DISABLED_CATEGORY" - EventTypeEnumChangedPassword EventTypeEnum = "CHANGED_PASSWORD" - EventTypeEnumResetPassword EventTypeEnum = "RESET_PASSWORD" - EventTypeEnumEnabledRedactUnmappedDataForOrganization EventTypeEnum = "ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION" - EventTypeEnumEnabledRedactUnmappedDataForLinkedAccount EventTypeEnum = "ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT" - EventTypeEnumDisabledRedactUnmappedDataForOrganization EventTypeEnum = "DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION" - EventTypeEnumDisabledRedactUnmappedDataForLinkedAccount EventTypeEnum = "DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT" - EventTypeEnumCreatedIntegrationWideFieldMapping EventTypeEnum = "CREATED_INTEGRATION_WIDE_FIELD_MAPPING" - EventTypeEnumCreatedLinkedAccountFieldMapping EventTypeEnum = "CREATED_LINKED_ACCOUNT_FIELD_MAPPING" - EventTypeEnumChangedIntegrationWideFieldMapping EventTypeEnum = "CHANGED_INTEGRATION_WIDE_FIELD_MAPPING" - EventTypeEnumChangedLinkedAccountFieldMapping EventTypeEnum = "CHANGED_LINKED_ACCOUNT_FIELD_MAPPING" - EventTypeEnumDeletedIntegrationWideFieldMapping EventTypeEnum = "DELETED_INTEGRATION_WIDE_FIELD_MAPPING" - EventTypeEnumDeletedLinkedAccountFieldMapping EventTypeEnum = "DELETED_LINKED_ACCOUNT_FIELD_MAPPING" - EventTypeEnumCreatedLinkedAccountCommonModelOverride EventTypeEnum = "CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE" - EventTypeEnumChangedLinkedAccountCommonModelOverride EventTypeEnum = "CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE" - EventTypeEnumDeletedLinkedAccountCommonModelOverride EventTypeEnum = "DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE" - EventTypeEnumForcedLinkedAccountResync EventTypeEnum = "FORCED_LINKED_ACCOUNT_RESYNC" - EventTypeEnumMutedIssue EventTypeEnum = "MUTED_ISSUE" - EventTypeEnumGeneratedMagicLink EventTypeEnum = "GENERATED_MAGIC_LINK" - EventTypeEnumEnabledMergeWebhook EventTypeEnum = "ENABLED_MERGE_WEBHOOK" - EventTypeEnumDisabledMergeWebhook EventTypeEnum = "DISABLED_MERGE_WEBHOOK" - EventTypeEnumMergeWebhookTargetChanged EventTypeEnum = "MERGE_WEBHOOK_TARGET_CHANGED" - EventTypeEnumEndUserCredentialsAccessed EventTypeEnum = "END_USER_CREDENTIALS_ACCESSED" -) - -func NewEventTypeEnumFromString(s string) (EventTypeEnum, error) { - switch s { - case "CREATED_REMOTE_PRODUCTION_API_KEY": - return EventTypeEnumCreatedRemoteProductionApiKey, nil - case "DELETED_REMOTE_PRODUCTION_API_KEY": - return EventTypeEnumDeletedRemoteProductionApiKey, nil - case "CREATED_TEST_API_KEY": - return EventTypeEnumCreatedTestApiKey, nil - case "DELETED_TEST_API_KEY": - return EventTypeEnumDeletedTestApiKey, nil - case "REGENERATED_PRODUCTION_API_KEY": - return EventTypeEnumRegeneratedProductionApiKey, nil - case "INVITED_USER": - return EventTypeEnumInvitedUser, nil - case "TWO_FACTOR_AUTH_ENABLED": - return EventTypeEnumTwoFactorAuthEnabled, nil - case "TWO_FACTOR_AUTH_DISABLED": - return EventTypeEnumTwoFactorAuthDisabled, nil - case "DELETED_LINKED_ACCOUNT": - return EventTypeEnumDeletedLinkedAccount, nil - case "CREATED_DESTINATION": - return EventTypeEnumCreatedDestination, nil - case "DELETED_DESTINATION": - return EventTypeEnumDeletedDestination, nil - case "CHANGED_DESTINATION": - return EventTypeEnumChangedDestination, nil - case "CHANGED_SCOPES": - return EventTypeEnumChangedScopes, nil - case "CHANGED_PERSONAL_INFORMATION": - return EventTypeEnumChangedPersonalInformation, nil - case "CHANGED_ORGANIZATION_SETTINGS": - return EventTypeEnumChangedOrganizationSettings, nil - case "ENABLED_INTEGRATION": - return EventTypeEnumEnabledIntegration, nil - case "DISABLED_INTEGRATION": - return EventTypeEnumDisabledIntegration, nil - case "ENABLED_CATEGORY": - return EventTypeEnumEnabledCategory, nil - case "DISABLED_CATEGORY": - return EventTypeEnumDisabledCategory, nil - case "CHANGED_PASSWORD": - return EventTypeEnumChangedPassword, nil - case "RESET_PASSWORD": - return EventTypeEnumResetPassword, nil - case "ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION": - return EventTypeEnumEnabledRedactUnmappedDataForOrganization, nil - case "ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT": - return EventTypeEnumEnabledRedactUnmappedDataForLinkedAccount, nil - case "DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION": - return EventTypeEnumDisabledRedactUnmappedDataForOrganization, nil - case "DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT": - return EventTypeEnumDisabledRedactUnmappedDataForLinkedAccount, nil - case "CREATED_INTEGRATION_WIDE_FIELD_MAPPING": - return EventTypeEnumCreatedIntegrationWideFieldMapping, nil - case "CREATED_LINKED_ACCOUNT_FIELD_MAPPING": - return EventTypeEnumCreatedLinkedAccountFieldMapping, nil - case "CHANGED_INTEGRATION_WIDE_FIELD_MAPPING": - return EventTypeEnumChangedIntegrationWideFieldMapping, nil - case "CHANGED_LINKED_ACCOUNT_FIELD_MAPPING": - return EventTypeEnumChangedLinkedAccountFieldMapping, nil - case "DELETED_INTEGRATION_WIDE_FIELD_MAPPING": - return EventTypeEnumDeletedIntegrationWideFieldMapping, nil - case "DELETED_LINKED_ACCOUNT_FIELD_MAPPING": - return EventTypeEnumDeletedLinkedAccountFieldMapping, nil - case "CREATED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE": - return EventTypeEnumCreatedLinkedAccountCommonModelOverride, nil - case "CHANGED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE": - return EventTypeEnumChangedLinkedAccountCommonModelOverride, nil - case "DELETED_LINKED_ACCOUNT_COMMON_MODEL_OVERRIDE": - return EventTypeEnumDeletedLinkedAccountCommonModelOverride, nil - case "FORCED_LINKED_ACCOUNT_RESYNC": - return EventTypeEnumForcedLinkedAccountResync, nil - case "MUTED_ISSUE": - return EventTypeEnumMutedIssue, nil - case "GENERATED_MAGIC_LINK": - return EventTypeEnumGeneratedMagicLink, nil - case "ENABLED_MERGE_WEBHOOK": - return EventTypeEnumEnabledMergeWebhook, nil - case "DISABLED_MERGE_WEBHOOK": - return EventTypeEnumDisabledMergeWebhook, nil - case "MERGE_WEBHOOK_TARGET_CHANGED": - return EventTypeEnumMergeWebhookTargetChanged, nil - case "END_USER_CREDENTIALS_ACCESSED": - return EventTypeEnumEndUserCredentialsAccessed, nil - } - var t EventTypeEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (e EventTypeEnum) Ptr() *EventTypeEnum { - return &e -} - -type ExternalTargetFieldApi struct { - Name *string `json:"name,omitempty"` - Description *string `json:"description,omitempty"` - IsMapped *string `json:"is_mapped,omitempty"` - - _rawJSON json.RawMessage -} - -func (e *ExternalTargetFieldApi) UnmarshalJSON(data []byte) error { - type unmarshaler ExternalTargetFieldApi - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *e = ExternalTargetFieldApi(value) - e._rawJSON = json.RawMessage(data) - return nil -} - -func (e *ExternalTargetFieldApi) String() string { - if len(e._rawJSON) > 0 { - if value, err := core.StringifyJSON(e._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(e); err == nil { - return value - } - return fmt.Sprintf("%#v", e) -} - -type ExternalTargetFieldApiResponse struct { - Ticket []*ExternalTargetFieldApi `json:"Ticket,omitempty"` - Comment []*ExternalTargetFieldApi `json:"Comment,omitempty"` - Project []*ExternalTargetFieldApi `json:"Project,omitempty"` - Collection []*ExternalTargetFieldApi `json:"Collection,omitempty"` - User []*ExternalTargetFieldApi `json:"User,omitempty"` - Role []*ExternalTargetFieldApi `json:"Role,omitempty"` - Account []*ExternalTargetFieldApi `json:"Account,omitempty"` - Team []*ExternalTargetFieldApi `json:"Team,omitempty"` - Attachment []*ExternalTargetFieldApi `json:"Attachment,omitempty"` - Tag []*ExternalTargetFieldApi `json:"Tag,omitempty"` - Contact []*ExternalTargetFieldApi `json:"Contact,omitempty"` - - _rawJSON json.RawMessage -} - -func (e *ExternalTargetFieldApiResponse) UnmarshalJSON(data []byte) error { - type unmarshaler ExternalTargetFieldApiResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *e = ExternalTargetFieldApiResponse(value) - e._rawJSON = json.RawMessage(data) - return nil -} - -func (e *ExternalTargetFieldApiResponse) String() string { - if len(e._rawJSON) > 0 { - if value, err := core.StringifyJSON(e._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(e); err == nil { - return value - } - return fmt.Sprintf("%#v", e) -} - -// - `string` - string -// - `number` - number -// - `date` - date -// - `datetime` - datetime -// - `bool` - bool -// - `list` - list -type FieldFormatEnum string - -const ( - FieldFormatEnumString FieldFormatEnum = "string" - FieldFormatEnumNumber FieldFormatEnum = "number" - FieldFormatEnumDate FieldFormatEnum = "date" - FieldFormatEnumDatetime FieldFormatEnum = "datetime" - FieldFormatEnumBool FieldFormatEnum = "bool" - FieldFormatEnumList FieldFormatEnum = "list" -) - -func NewFieldFormatEnumFromString(s string) (FieldFormatEnum, error) { - switch s { - case "string": - return FieldFormatEnumString, nil - case "number": - return FieldFormatEnumNumber, nil - case "date": - return FieldFormatEnumDate, nil - case "datetime": - return FieldFormatEnumDatetime, nil - case "bool": - return FieldFormatEnumBool, nil - case "list": - return FieldFormatEnumList, nil - } - var t FieldFormatEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (f FieldFormatEnum) Ptr() *FieldFormatEnum { - return &f -} - -type FieldMappingApiInstance struct { - Id *string `json:"id,omitempty"` - IsIntegrationWide *bool `json:"is_integration_wide,omitempty"` - TargetField *FieldMappingApiInstanceTargetField `json:"target_field,omitempty"` - RemoteField *FieldMappingApiInstanceRemoteField `json:"remote_field,omitempty"` - - _rawJSON json.RawMessage -} - -func (f *FieldMappingApiInstance) UnmarshalJSON(data []byte) error { - type unmarshaler FieldMappingApiInstance - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *f = FieldMappingApiInstance(value) - f._rawJSON = json.RawMessage(data) - return nil -} - -func (f *FieldMappingApiInstance) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(f); err == nil { - return value - } - return fmt.Sprintf("%#v", f) -} - -type FieldMappingApiInstanceRemoteField struct { - RemoteKeyName *string `json:"remote_key_name,omitempty"` - Schema map[string]interface{} `json:"schema,omitempty"` - RemoteEndpointInfo *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo `json:"remote_endpoint_info,omitempty"` - - _rawJSON json.RawMessage -} - -func (f *FieldMappingApiInstanceRemoteField) UnmarshalJSON(data []byte) error { - type unmarshaler FieldMappingApiInstanceRemoteField - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *f = FieldMappingApiInstanceRemoteField(value) - f._rawJSON = json.RawMessage(data) - return nil -} - -func (f *FieldMappingApiInstanceRemoteField) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(f); err == nil { - return value - } - return fmt.Sprintf("%#v", f) -} - -type FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo struct { - Method *string `json:"method,omitempty"` - UrlPath *string `json:"url_path,omitempty"` - FieldTraversalPath []string `json:"field_traversal_path,omitempty"` - - _rawJSON json.RawMessage -} - -func (f *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo) UnmarshalJSON(data []byte) error { - type unmarshaler FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *f = FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo(value) - f._rawJSON = json.RawMessage(data) - return nil -} - -func (f *FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(f); err == nil { - return value - } - return fmt.Sprintf("%#v", f) -} - -type FieldMappingApiInstanceResponse struct { - Ticket []*FieldMappingApiInstance `json:"Ticket,omitempty"` - Comment []*FieldMappingApiInstance `json:"Comment,omitempty"` - Project []*FieldMappingApiInstance `json:"Project,omitempty"` - Collection []*FieldMappingApiInstance `json:"Collection,omitempty"` - User []*FieldMappingApiInstance `json:"User,omitempty"` - Role []*FieldMappingApiInstance `json:"Role,omitempty"` - Account []*FieldMappingApiInstance `json:"Account,omitempty"` - Team []*FieldMappingApiInstance `json:"Team,omitempty"` - Attachment []*FieldMappingApiInstance `json:"Attachment,omitempty"` - Tag []*FieldMappingApiInstance `json:"Tag,omitempty"` - Contact []*FieldMappingApiInstance `json:"Contact,omitempty"` - - _rawJSON json.RawMessage -} - -func (f *FieldMappingApiInstanceResponse) UnmarshalJSON(data []byte) error { - type unmarshaler FieldMappingApiInstanceResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *f = FieldMappingApiInstanceResponse(value) - f._rawJSON = json.RawMessage(data) - return nil -} - -func (f *FieldMappingApiInstanceResponse) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(f); err == nil { - return value - } - return fmt.Sprintf("%#v", f) -} - -type FieldMappingApiInstanceTargetField struct { - Name string `json:"name"` - Description string `json:"description"` - IsOrganizationWide bool `json:"is_organization_wide"` - - _rawJSON json.RawMessage -} - -func (f *FieldMappingApiInstanceTargetField) UnmarshalJSON(data []byte) error { - type unmarshaler FieldMappingApiInstanceTargetField - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *f = FieldMappingApiInstanceTargetField(value) - f._rawJSON = json.RawMessage(data) - return nil -} - -func (f *FieldMappingApiInstanceTargetField) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(f); err == nil { - return value - } - return fmt.Sprintf("%#v", f) -} - -type FieldMappingInstanceResponse struct { - Model *FieldMappingApiInstance `json:"model,omitempty"` - Warnings []*WarningValidationProblem `json:"warnings,omitempty"` - Errors []*ErrorValidationProblem `json:"errors,omitempty"` - Logs []*DebugModeLog `json:"logs,omitempty"` - - _rawJSON json.RawMessage -} - -func (f *FieldMappingInstanceResponse) UnmarshalJSON(data []byte) error { - type unmarshaler FieldMappingInstanceResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *f = FieldMappingInstanceResponse(value) - f._rawJSON = json.RawMessage(data) - return nil -} - -func (f *FieldMappingInstanceResponse) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(f); err == nil { - return value - } - return fmt.Sprintf("%#v", f) -} - -type FieldPermissionDeserializer struct { - EnabledFields []interface{} `json:"enabled_fields,omitempty"` - DisabledFields []interface{} `json:"disabled_fields,omitempty"` - - _rawJSON json.RawMessage -} - -func (f *FieldPermissionDeserializer) UnmarshalJSON(data []byte) error { - type unmarshaler FieldPermissionDeserializer - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *f = FieldPermissionDeserializer(value) - f._rawJSON = json.RawMessage(data) - return nil -} - -func (f *FieldPermissionDeserializer) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(f); err == nil { - return value - } - return fmt.Sprintf("%#v", f) -} - -type FieldPermissionDeserializerRequest struct { - EnabledFields []interface{} `json:"enabled_fields,omitempty"` - DisabledFields []interface{} `json:"disabled_fields,omitempty"` - - _rawJSON json.RawMessage -} - -func (f *FieldPermissionDeserializerRequest) UnmarshalJSON(data []byte) error { - type unmarshaler FieldPermissionDeserializerRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *f = FieldPermissionDeserializerRequest(value) - f._rawJSON = json.RawMessage(data) - return nil -} - -func (f *FieldPermissionDeserializerRequest) String() string { - if len(f._rawJSON) > 0 { - if value, err := core.StringifyJSON(f._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(f); err == nil { - return value - } - return fmt.Sprintf("%#v", f) -} - -// - `string` - string -// - `number` - number -// - `date` - date -// - `datetime` - datetime -// - `bool` - bool -// - `list` - list -type FieldTypeEnum string - -const ( - FieldTypeEnumString FieldTypeEnum = "string" - FieldTypeEnumNumber FieldTypeEnum = "number" - FieldTypeEnumDate FieldTypeEnum = "date" - FieldTypeEnumDatetime FieldTypeEnum = "datetime" - FieldTypeEnumBool FieldTypeEnum = "bool" - FieldTypeEnumList FieldTypeEnum = "list" -) - -func NewFieldTypeEnumFromString(s string) (FieldTypeEnum, error) { - switch s { - case "string": - return FieldTypeEnumString, nil - case "number": - return FieldTypeEnumNumber, nil - case "date": - return FieldTypeEnumDate, nil - case "datetime": - return FieldTypeEnumDatetime, nil - case "bool": - return FieldTypeEnumBool, nil - case "list": - return FieldTypeEnumList, nil - } - var t FieldTypeEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (f FieldTypeEnum) Ptr() *FieldTypeEnum { - return &f -} - -type IndividualCommonModelScopeDeserializer struct { - ModelName string `json:"model_name"` - ModelPermissions map[string]*ModelPermissionDeserializer `json:"model_permissions,omitempty"` - FieldPermissions *FieldPermissionDeserializer `json:"field_permissions,omitempty"` - - _rawJSON json.RawMessage -} - -func (i *IndividualCommonModelScopeDeserializer) UnmarshalJSON(data []byte) error { - type unmarshaler IndividualCommonModelScopeDeserializer - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *i = IndividualCommonModelScopeDeserializer(value) - i._rawJSON = json.RawMessage(data) - return nil -} - -func (i *IndividualCommonModelScopeDeserializer) String() string { - if len(i._rawJSON) > 0 { - if value, err := core.StringifyJSON(i._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(i); err == nil { - return value - } - return fmt.Sprintf("%#v", i) -} - -type IndividualCommonModelScopeDeserializerRequest struct { - ModelName string `json:"model_name"` - ModelPermissions map[string]*ModelPermissionDeserializerRequest `json:"model_permissions,omitempty"` - FieldPermissions *FieldPermissionDeserializerRequest `json:"field_permissions,omitempty"` - - _rawJSON json.RawMessage -} - -func (i *IndividualCommonModelScopeDeserializerRequest) UnmarshalJSON(data []byte) error { - type unmarshaler IndividualCommonModelScopeDeserializerRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *i = IndividualCommonModelScopeDeserializerRequest(value) - i._rawJSON = json.RawMessage(data) - return nil -} - -func (i *IndividualCommonModelScopeDeserializerRequest) String() string { - if len(i._rawJSON) > 0 { - if value, err := core.StringifyJSON(i._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(i); err == nil { - return value - } - return fmt.Sprintf("%#v", i) -} - -type Issue struct { - Id *string `json:"id,omitempty"` - // Status of the issue. Options: ('ONGOING', 'RESOLVED') - // - // - `ONGOING` - ONGOING - // - `RESOLVED` - RESOLVED - Status *IssueStatus `json:"status,omitempty"` - ErrorDescription string `json:"error_description"` - EndUser map[string]interface{} `json:"end_user,omitempty"` - FirstIncidentTime *time.Time `json:"first_incident_time,omitempty"` - LastIncidentTime *time.Time `json:"last_incident_time,omitempty"` - IsMuted *bool `json:"is_muted,omitempty"` - ErrorDetails []string `json:"error_details,omitempty"` - - _rawJSON json.RawMessage -} - -func (i *Issue) UnmarshalJSON(data []byte) error { - type unmarshaler Issue - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *i = Issue(value) - i._rawJSON = json.RawMessage(data) - return nil -} - -func (i *Issue) String() string { - if len(i._rawJSON) > 0 { - if value, err := core.StringifyJSON(i._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(i); err == nil { - return value - } - return fmt.Sprintf("%#v", i) -} - -// Status of the issue. Options: ('ONGOING', 'RESOLVED') -// -// - `ONGOING` - ONGOING -// - `RESOLVED` - RESOLVED -type IssueStatus struct { - typeName string - IssueStatusEnum IssueStatusEnum - String string -} - -func NewIssueStatusFromIssueStatusEnum(value IssueStatusEnum) *IssueStatus { - return &IssueStatus{typeName: "issueStatusEnum", IssueStatusEnum: value} -} - -func NewIssueStatusFromString(value string) *IssueStatus { - return &IssueStatus{typeName: "string", String: value} -} - -func (i *IssueStatus) UnmarshalJSON(data []byte) error { - var valueIssueStatusEnum IssueStatusEnum - if err := json.Unmarshal(data, &valueIssueStatusEnum); err == nil { - i.typeName = "issueStatusEnum" - i.IssueStatusEnum = valueIssueStatusEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - i.typeName = "string" - i.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, i) -} - -func (i IssueStatus) MarshalJSON() ([]byte, error) { - switch i.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "issueStatusEnum": - return json.Marshal(i.IssueStatusEnum) - case "string": - return json.Marshal(i.String) - } -} - -type IssueStatusVisitor interface { - VisitIssueStatusEnum(IssueStatusEnum) error - VisitString(string) error -} - -func (i *IssueStatus) Accept(visitor IssueStatusVisitor) error { - switch i.typeName { - default: - return fmt.Errorf("invalid type %s in %T", i.typeName, i) - case "issueStatusEnum": - return visitor.VisitIssueStatusEnum(i.IssueStatusEnum) - case "string": - return visitor.VisitString(i.String) - } -} - -// - `ONGOING` - ONGOING -// - `RESOLVED` - RESOLVED -type IssueStatusEnum string - -const ( - IssueStatusEnumOngoing IssueStatusEnum = "ONGOING" - IssueStatusEnumResolved IssueStatusEnum = "RESOLVED" -) - -func NewIssueStatusEnumFromString(s string) (IssueStatusEnum, error) { - switch s { - case "ONGOING": - return IssueStatusEnumOngoing, nil - case "RESOLVED": - return IssueStatusEnumResolved, nil - } - var t IssueStatusEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (i IssueStatusEnum) Ptr() *IssueStatusEnum { - return &i -} - -// - `string` - uuid -// - `number` - url -// - `date` - email -// - `datetime` - phone -// - `bool` - currency -// - `list` - decimal -type ItemFormatEnum string - -const ( - ItemFormatEnumString ItemFormatEnum = "string" - ItemFormatEnumNumber ItemFormatEnum = "number" - ItemFormatEnumDate ItemFormatEnum = "date" - ItemFormatEnumDatetime ItemFormatEnum = "datetime" - ItemFormatEnumBool ItemFormatEnum = "bool" - ItemFormatEnumList ItemFormatEnum = "list" -) - -func NewItemFormatEnumFromString(s string) (ItemFormatEnum, error) { - switch s { - case "string": - return ItemFormatEnumString, nil - case "number": - return ItemFormatEnumNumber, nil - case "date": - return ItemFormatEnumDate, nil - case "datetime": - return ItemFormatEnumDatetime, nil - case "bool": - return ItemFormatEnumBool, nil - case "list": - return ItemFormatEnumList, nil - } - var t ItemFormatEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (i ItemFormatEnum) Ptr() *ItemFormatEnum { - return &i -} - -type ItemSchema struct { - ItemType *ItemTypeEnum `json:"item_type,omitempty"` - ItemFormat *ItemFormatEnum `json:"item_format,omitempty"` - ItemChoices []string `json:"item_choices,omitempty"` - - _rawJSON json.RawMessage -} - -func (i *ItemSchema) UnmarshalJSON(data []byte) error { - type unmarshaler ItemSchema - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *i = ItemSchema(value) - i._rawJSON = json.RawMessage(data) - return nil -} - -func (i *ItemSchema) String() string { - if len(i._rawJSON) > 0 { - if value, err := core.StringifyJSON(i._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(i); err == nil { - return value - } - return fmt.Sprintf("%#v", i) -} - -// - `string` - string -// - `number` - number -// - `date` - date -// - `datetime` - datetime -// - `bool` - bool -// - `list` - list -type ItemTypeEnum string - -const ( - ItemTypeEnumString ItemTypeEnum = "string" - ItemTypeEnumNumber ItemTypeEnum = "number" - ItemTypeEnumDate ItemTypeEnum = "date" - ItemTypeEnumDatetime ItemTypeEnum = "datetime" - ItemTypeEnumBool ItemTypeEnum = "bool" - ItemTypeEnumList ItemTypeEnum = "list" -) - -func NewItemTypeEnumFromString(s string) (ItemTypeEnum, error) { - switch s { - case "string": - return ItemTypeEnumString, nil - case "number": - return ItemTypeEnumNumber, nil - case "date": - return ItemTypeEnumDate, nil - case "datetime": - return ItemTypeEnumDatetime, nil - case "bool": - return ItemTypeEnumBool, nil - case "list": - return ItemTypeEnumList, nil - } - var t ItemTypeEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (i ItemTypeEnum) Ptr() *ItemTypeEnum { - return &i -} - -// - `en` - en -// - `de` - de -type LanguageEnum string - -const ( - LanguageEnumEn LanguageEnum = "en" - LanguageEnumDe LanguageEnum = "de" -) - -func NewLanguageEnumFromString(s string) (LanguageEnum, error) { - switch s { - case "en": - return LanguageEnumEn, nil - case "de": - return LanguageEnumDe, nil - } - var t LanguageEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (l LanguageEnum) Ptr() *LanguageEnum { - return &l -} - -type LinkToken struct { - LinkToken string `json:"link_token"` - IntegrationName *string `json:"integration_name,omitempty"` - MagicLinkUrl *string `json:"magic_link_url,omitempty"` - - _rawJSON json.RawMessage -} - -func (l *LinkToken) UnmarshalJSON(data []byte) error { - type unmarshaler LinkToken - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *l = LinkToken(value) - l._rawJSON = json.RawMessage(data) - return nil -} - -func (l *LinkToken) String() string { - if len(l._rawJSON) > 0 { - if value, err := core.StringifyJSON(l._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(l); err == nil { - return value - } - return fmt.Sprintf("%#v", l) -} - -type LinkedAccountStatus struct { - LinkedAccountStatus string `json:"linked_account_status"` - CanMakeRequest bool `json:"can_make_request"` - - _rawJSON json.RawMessage -} - -func (l *LinkedAccountStatus) UnmarshalJSON(data []byte) error { - type unmarshaler LinkedAccountStatus - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *l = LinkedAccountStatus(value) - l._rawJSON = json.RawMessage(data) - return nil -} - -func (l *LinkedAccountStatus) String() string { - if len(l._rawJSON) > 0 { - if value, err := core.StringifyJSON(l._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(l); err == nil { - return value - } - return fmt.Sprintf("%#v", l) -} - -type MetaResponse struct { - RequestSchema map[string]interface{} `json:"request_schema,omitempty"` - RemoteFieldClasses map[string]interface{} `json:"remote_field_classes,omitempty"` - Status *LinkedAccountStatus `json:"status,omitempty"` - HasConditionalParams bool `json:"has_conditional_params"` - HasRequiredLinkedAccountParams bool `json:"has_required_linked_account_params"` - - _rawJSON json.RawMessage -} - -func (m *MetaResponse) UnmarshalJSON(data []byte) error { - type unmarshaler MetaResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *m = MetaResponse(value) - m._rawJSON = json.RawMessage(data) - return nil -} - -func (m *MetaResponse) String() string { - if len(m._rawJSON) > 0 { - if value, err := core.StringifyJSON(m._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(m); err == nil { - return value - } - return fmt.Sprintf("%#v", m) -} - -// - `GET` - GET -// - `OPTIONS` - OPTIONS -// - `HEAD` - HEAD -// - `POST` - POST -// - `PUT` - PUT -// - `PATCH` - PATCH -// - `DELETE` - DELETE -type MethodEnum string - -const ( - MethodEnumGet MethodEnum = "GET" - MethodEnumOptions MethodEnum = "OPTIONS" - MethodEnumHead MethodEnum = "HEAD" - MethodEnumPost MethodEnum = "POST" - MethodEnumPut MethodEnum = "PUT" - MethodEnumPatch MethodEnum = "PATCH" - MethodEnumDelete MethodEnum = "DELETE" -) - -func NewMethodEnumFromString(s string) (MethodEnum, error) { - switch s { - case "GET": - return MethodEnumGet, nil - case "OPTIONS": - return MethodEnumOptions, nil - case "HEAD": - return MethodEnumHead, nil - case "POST": - return MethodEnumPost, nil - case "PUT": - return MethodEnumPut, nil - case "PATCH": - return MethodEnumPatch, nil - case "DELETE": - return MethodEnumDelete, nil - } - var t MethodEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (m MethodEnum) Ptr() *MethodEnum { - return &m -} - -// # The ModelOperation Object -// -// ### Description -// -// The `ModelOperation` object is used to represent the operations that are currently supported for a given model. -// -// ### Usage Example -// -// View what operations are supported for the `Candidate` endpoint. -type ModelOperation struct { - ModelName string `json:"model_name"` - AvailableOperations []string `json:"available_operations,omitempty"` - RequiredPostParameters []string `json:"required_post_parameters,omitempty"` - SupportedFields []string `json:"supported_fields,omitempty"` - - _rawJSON json.RawMessage -} - -func (m *ModelOperation) UnmarshalJSON(data []byte) error { - type unmarshaler ModelOperation - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *m = ModelOperation(value) - m._rawJSON = json.RawMessage(data) - return nil -} - -func (m *ModelOperation) String() string { - if len(m._rawJSON) > 0 { - if value, err := core.StringifyJSON(m._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(m); err == nil { - return value - } - return fmt.Sprintf("%#v", m) -} - -type ModelPermissionDeserializer struct { - IsEnabled *bool `json:"is_enabled,omitempty"` - - _rawJSON json.RawMessage -} - -func (m *ModelPermissionDeserializer) UnmarshalJSON(data []byte) error { - type unmarshaler ModelPermissionDeserializer - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *m = ModelPermissionDeserializer(value) - m._rawJSON = json.RawMessage(data) - return nil -} - -func (m *ModelPermissionDeserializer) String() string { - if len(m._rawJSON) > 0 { - if value, err := core.StringifyJSON(m._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(m); err == nil { - return value - } - return fmt.Sprintf("%#v", m) -} - -type ModelPermissionDeserializerRequest struct { - IsEnabled *bool `json:"is_enabled,omitempty"` - - _rawJSON json.RawMessage -} - -func (m *ModelPermissionDeserializerRequest) UnmarshalJSON(data []byte) error { - type unmarshaler ModelPermissionDeserializerRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *m = ModelPermissionDeserializerRequest(value) - m._rawJSON = json.RawMessage(data) - return nil -} - -func (m *ModelPermissionDeserializerRequest) String() string { - if len(m._rawJSON) > 0 { - if value, err := core.StringifyJSON(m._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(m); err == nil { - return value - } - return fmt.Sprintf("%#v", m) -} - -// # The MultipartFormField Object -// -// ### Description -// -// The `MultipartFormField` object is used to represent fields in an HTTP request using `multipart/form-data`. -// -// ### Usage Example -// -// Create a `MultipartFormField` to define a multipart form entry. -type MultipartFormFieldRequest struct { - // The name of the form field - Name string `json:"name"` - // The data for the form field. - Data string `json:"data"` - // The encoding of the value of `data`. Defaults to `RAW` if not defined. - // - // - `RAW` - RAW - // - `BASE64` - BASE64 - // - `GZIP_BASE64` - GZIP_BASE64 - Encoding *MultipartFormFieldRequestEncoding `json:"encoding,omitempty"` - // The file name of the form field, if the field is for a file. - FileName *string `json:"file_name,omitempty"` - // The MIME type of the file, if the field is for a file. - ContentType *string `json:"content_type,omitempty"` - - _rawJSON json.RawMessage -} - -func (m *MultipartFormFieldRequest) UnmarshalJSON(data []byte) error { - type unmarshaler MultipartFormFieldRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *m = MultipartFormFieldRequest(value) - m._rawJSON = json.RawMessage(data) - return nil -} - -func (m *MultipartFormFieldRequest) String() string { - if len(m._rawJSON) > 0 { - if value, err := core.StringifyJSON(m._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(m); err == nil { - return value - } - return fmt.Sprintf("%#v", m) -} - -// The encoding of the value of `data`. Defaults to `RAW` if not defined. -// -// - `RAW` - RAW -// - `BASE64` - BASE64 -// - `GZIP_BASE64` - GZIP_BASE64 -type MultipartFormFieldRequestEncoding struct { - typeName string - EncodingEnum EncodingEnum - String string -} - -func NewMultipartFormFieldRequestEncodingFromEncodingEnum(value EncodingEnum) *MultipartFormFieldRequestEncoding { - return &MultipartFormFieldRequestEncoding{typeName: "encodingEnum", EncodingEnum: value} -} - -func NewMultipartFormFieldRequestEncodingFromString(value string) *MultipartFormFieldRequestEncoding { - return &MultipartFormFieldRequestEncoding{typeName: "string", String: value} -} - -func (m *MultipartFormFieldRequestEncoding) UnmarshalJSON(data []byte) error { - var valueEncodingEnum EncodingEnum - if err := json.Unmarshal(data, &valueEncodingEnum); err == nil { - m.typeName = "encodingEnum" - m.EncodingEnum = valueEncodingEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - m.typeName = "string" - m.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, m) -} - -func (m MultipartFormFieldRequestEncoding) MarshalJSON() ([]byte, error) { - switch m.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", m.typeName, m) - case "encodingEnum": - return json.Marshal(m.EncodingEnum) - case "string": - return json.Marshal(m.String) - } -} +// * `string` - string +// * `number` - number +// * `date` - date +// * `datetime` - datetime +// * `bool` - bool +// * `list` - list +type FieldFormatEnum string -type MultipartFormFieldRequestEncodingVisitor interface { - VisitEncodingEnum(EncodingEnum) error - VisitString(string) error -} +const ( + FieldFormatEnumString FieldFormatEnum = "string" + FieldFormatEnumNumber FieldFormatEnum = "number" + FieldFormatEnumDate FieldFormatEnum = "date" + FieldFormatEnumDatetime FieldFormatEnum = "datetime" + FieldFormatEnumBool FieldFormatEnum = "bool" + FieldFormatEnumList FieldFormatEnum = "list" +) -func (m *MultipartFormFieldRequestEncoding) Accept(visitor MultipartFormFieldRequestEncodingVisitor) error { - switch m.typeName { - default: - return fmt.Errorf("invalid type %s in %T", m.typeName, m) - case "encodingEnum": - return visitor.VisitEncodingEnum(m.EncodingEnum) +func NewFieldFormatEnumFromString(s string) (FieldFormatEnum, error) { + switch s { case "string": - return visitor.VisitString(m.String) - } -} - -type PaginatedAccountDetailsAndActionsList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*AccountDetailsAndActions `json:"results,omitempty"` - - _rawJSON json.RawMessage -} - -func (p *PaginatedAccountDetailsAndActionsList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedAccountDetailsAndActionsList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *p = PaginatedAccountDetailsAndActionsList(value) - p._rawJSON = json.RawMessage(data) - return nil -} - -func (p *PaginatedAccountDetailsAndActionsList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) -} - -type PaginatedAccountList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Account `json:"results,omitempty"` - - _rawJSON json.RawMessage -} - -func (p *PaginatedAccountList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedAccountList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err + return FieldFormatEnumString, nil + case "number": + return FieldFormatEnumNumber, nil + case "date": + return FieldFormatEnumDate, nil + case "datetime": + return FieldFormatEnumDatetime, nil + case "bool": + return FieldFormatEnumBool, nil + case "list": + return FieldFormatEnumList, nil } - *p = PaginatedAccountList(value) - p._rawJSON = json.RawMessage(data) - return nil + var t FieldFormatEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (p *PaginatedAccountList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) +func (f FieldFormatEnum) Ptr() *FieldFormatEnum { + return &f } -type PaginatedAttachmentList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Attachment `json:"results,omitempty"` +type FieldPermissionDeserializerRequest struct { + EnabledFields []interface{} `json:"enabled_fields,omitempty" url:"enabled_fields,omitempty"` + DisabledFields []interface{} `json:"disabled_fields,omitempty" url:"disabled_fields,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (p *PaginatedAttachmentList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedAttachmentList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (f *FieldPermissionDeserializerRequest) GetEnabledFields() []interface{} { + if f == nil { + return nil } - *p = PaginatedAttachmentList(value) - p._rawJSON = json.RawMessage(data) - return nil + return f.EnabledFields } -func (p *PaginatedAttachmentList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value +func (f *FieldPermissionDeserializerRequest) GetDisabledFields() []interface{} { + if f == nil { + return nil } - return fmt.Sprintf("%#v", p) + return f.DisabledFields } -type PaginatedAuditLogEventList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*AuditLogEvent `json:"results,omitempty"` - - _rawJSON json.RawMessage +func (f *FieldPermissionDeserializerRequest) GetExtraProperties() map[string]interface{} { + return f.extraProperties } -func (p *PaginatedAuditLogEventList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedAuditLogEventList +func (f *FieldPermissionDeserializerRequest) UnmarshalJSON(data []byte) error { + type unmarshaler FieldPermissionDeserializerRequest var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *p = PaginatedAuditLogEventList(value) - p._rawJSON = json.RawMessage(data) - return nil -} - -func (p *PaginatedAuditLogEventList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) -} - -type PaginatedCollectionList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Collection `json:"results,omitempty"` - - _rawJSON json.RawMessage -} - -func (p *PaginatedCollectionList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedCollectionList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { + *f = FieldPermissionDeserializerRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *f) + if err != nil { return err } - *p = PaginatedCollectionList(value) - p._rawJSON = json.RawMessage(data) + f.extraProperties = extraProperties + f.rawJSON = json.RawMessage(data) return nil } -func (p *PaginatedCollectionList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { +func (f *FieldPermissionDeserializerRequest) String() string { + if len(f.rawJSON) > 0 { + if value, err := internal.StringifyJSON(f.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(p); err == nil { + if value, err := internal.StringifyJSON(f); err == nil { return value } - return fmt.Sprintf("%#v", p) + return fmt.Sprintf("%#v", f) } -type PaginatedCommentList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Comment `json:"results,omitempty"` +// * `string` - string +// * `number` - number +// * `date` - date +// * `datetime` - datetime +// * `bool` - bool +// * `list` - list +type FieldTypeEnum string - _rawJSON json.RawMessage -} +const ( + FieldTypeEnumString FieldTypeEnum = "string" + FieldTypeEnumNumber FieldTypeEnum = "number" + FieldTypeEnumDate FieldTypeEnum = "date" + FieldTypeEnumDatetime FieldTypeEnum = "datetime" + FieldTypeEnumBool FieldTypeEnum = "bool" + FieldTypeEnumList FieldTypeEnum = "list" +) -func (p *PaginatedCommentList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedCommentList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func NewFieldTypeEnumFromString(s string) (FieldTypeEnum, error) { + switch s { + case "string": + return FieldTypeEnumString, nil + case "number": + return FieldTypeEnumNumber, nil + case "date": + return FieldTypeEnumDate, nil + case "datetime": + return FieldTypeEnumDatetime, nil + case "bool": + return FieldTypeEnumBool, nil + case "list": + return FieldTypeEnumList, nil } - *p = PaginatedCommentList(value) - p._rawJSON = json.RawMessage(data) - return nil + var t FieldTypeEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (p *PaginatedCommentList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) +func (f FieldTypeEnum) Ptr() *FieldTypeEnum { + return &f } -type PaginatedContactList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Contact `json:"results,omitempty"` - - _rawJSON json.RawMessage -} +type IndividualCommonModelScopeDeserializerRequest struct { + ModelName string `json:"model_name" url:"model_name"` + ModelPermissions map[string]*ModelPermissionDeserializerRequest `json:"model_permissions,omitempty" url:"model_permissions,omitempty"` + FieldPermissions *FieldPermissionDeserializerRequest `json:"field_permissions,omitempty" url:"field_permissions,omitempty"` -func (p *PaginatedContactList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedContactList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *p = PaginatedContactList(value) - p._rawJSON = json.RawMessage(data) - return nil + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (p *PaginatedContactList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value +func (i *IndividualCommonModelScopeDeserializerRequest) GetModelName() string { + if i == nil { + return "" } - return fmt.Sprintf("%#v", p) -} - -type PaginatedIssueList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Issue `json:"results,omitempty"` - - _rawJSON json.RawMessage + return i.ModelName } -func (p *PaginatedIssueList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedIssueList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (i *IndividualCommonModelScopeDeserializerRequest) GetModelPermissions() map[string]*ModelPermissionDeserializerRequest { + if i == nil { + return nil } - *p = PaginatedIssueList(value) - p._rawJSON = json.RawMessage(data) - return nil + return i.ModelPermissions } -func (p *PaginatedIssueList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value +func (i *IndividualCommonModelScopeDeserializerRequest) GetFieldPermissions() *FieldPermissionDeserializerRequest { + if i == nil { + return nil } - return fmt.Sprintf("%#v", p) + return i.FieldPermissions } -type PaginatedProjectList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Project `json:"results,omitempty"` - - _rawJSON json.RawMessage +func (i *IndividualCommonModelScopeDeserializerRequest) GetExtraProperties() map[string]interface{} { + return i.extraProperties } -func (p *PaginatedProjectList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedProjectList +func (i *IndividualCommonModelScopeDeserializerRequest) UnmarshalJSON(data []byte) error { + type unmarshaler IndividualCommonModelScopeDeserializerRequest var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *p = PaginatedProjectList(value) - p._rawJSON = json.RawMessage(data) - return nil -} - -func (p *PaginatedProjectList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) -} - -type PaginatedRemoteFieldClassList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*RemoteFieldClass `json:"results,omitempty"` - - _rawJSON json.RawMessage -} - -func (p *PaginatedRemoteFieldClassList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedRemoteFieldClassList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { + *i = IndividualCommonModelScopeDeserializerRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *i) + if err != nil { return err } - *p = PaginatedRemoteFieldClassList(value) - p._rawJSON = json.RawMessage(data) + i.extraProperties = extraProperties + i.rawJSON = json.RawMessage(data) return nil } -func (p *PaginatedRemoteFieldClassList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { +func (i *IndividualCommonModelScopeDeserializerRequest) String() string { + if len(i.rawJSON) > 0 { + if value, err := internal.StringifyJSON(i.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(p); err == nil { + if value, err := internal.StringifyJSON(i); err == nil { return value } - return fmt.Sprintf("%#v", p) + return fmt.Sprintf("%#v", i) } -type PaginatedRoleList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Role `json:"results,omitempty"` +// * `string` - uuid +// * `number` - url +// * `date` - email +// * `datetime` - phone +// * `bool` - currency +// * `list` - decimal +type ItemFormatEnum string - _rawJSON json.RawMessage -} +const ( + ItemFormatEnumString ItemFormatEnum = "string" + ItemFormatEnumNumber ItemFormatEnum = "number" + ItemFormatEnumDate ItemFormatEnum = "date" + ItemFormatEnumDatetime ItemFormatEnum = "datetime" + ItemFormatEnumBool ItemFormatEnum = "bool" + ItemFormatEnumList ItemFormatEnum = "list" +) -func (p *PaginatedRoleList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedRoleList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func NewItemFormatEnumFromString(s string) (ItemFormatEnum, error) { + switch s { + case "string": + return ItemFormatEnumString, nil + case "number": + return ItemFormatEnumNumber, nil + case "date": + return ItemFormatEnumDate, nil + case "datetime": + return ItemFormatEnumDatetime, nil + case "bool": + return ItemFormatEnumBool, nil + case "list": + return ItemFormatEnumList, nil } - *p = PaginatedRoleList(value) - p._rawJSON = json.RawMessage(data) - return nil + var t ItemFormatEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (p *PaginatedRoleList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) +func (i ItemFormatEnum) Ptr() *ItemFormatEnum { + return &i } -type PaginatedSyncStatusList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*SyncStatus `json:"results,omitempty"` - - _rawJSON json.RawMessage -} +type ItemSchema struct { + ItemType *ItemTypeEnum `json:"item_type,omitempty" url:"item_type,omitempty"` + ItemFormat *ItemFormatEnum `json:"item_format,omitempty" url:"item_format,omitempty"` + ItemChoices []string `json:"item_choices,omitempty" url:"item_choices,omitempty"` -func (p *PaginatedSyncStatusList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedSyncStatusList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *p = PaginatedSyncStatusList(value) - p._rawJSON = json.RawMessage(data) - return nil + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (p *PaginatedSyncStatusList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value +func (i *ItemSchema) GetItemType() *ItemTypeEnum { + if i == nil { + return nil } - return fmt.Sprintf("%#v", p) -} - -type PaginatedTagList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Tag `json:"results,omitempty"` - - _rawJSON json.RawMessage + return i.ItemType } -func (p *PaginatedTagList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedTagList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (i *ItemSchema) GetItemFormat() *ItemFormatEnum { + if i == nil { + return nil } - *p = PaginatedTagList(value) - p._rawJSON = json.RawMessage(data) - return nil + return i.ItemFormat } -func (p *PaginatedTagList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value +func (i *ItemSchema) GetItemChoices() []string { + if i == nil { + return nil } - return fmt.Sprintf("%#v", p) + return i.ItemChoices } -type PaginatedTeamList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Team `json:"results,omitempty"` - - _rawJSON json.RawMessage +func (i *ItemSchema) GetExtraProperties() map[string]interface{} { + return i.extraProperties } -func (p *PaginatedTeamList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedTeamList +func (i *ItemSchema) UnmarshalJSON(data []byte) error { + type unmarshaler ItemSchema var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *p = PaginatedTeamList(value) - p._rawJSON = json.RawMessage(data) + *i = ItemSchema(value) + extraProperties, err := internal.ExtractExtraProperties(data, *i) + if err != nil { + return err + } + i.extraProperties = extraProperties + i.rawJSON = json.RawMessage(data) return nil } -func (p *PaginatedTeamList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { +func (i *ItemSchema) String() string { + if len(i.rawJSON) > 0 { + if value, err := internal.StringifyJSON(i.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(p); err == nil { + if value, err := internal.StringifyJSON(i); err == nil { return value } - return fmt.Sprintf("%#v", p) + return fmt.Sprintf("%#v", i) } -type PaginatedTicketList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Ticket `json:"results,omitempty"` +// * `string` - string +// * `number` - number +// * `date` - date +// * `datetime` - datetime +// * `bool` - bool +// * `list` - list +type ItemTypeEnum string - _rawJSON json.RawMessage -} +const ( + ItemTypeEnumString ItemTypeEnum = "string" + ItemTypeEnumNumber ItemTypeEnum = "number" + ItemTypeEnumDate ItemTypeEnum = "date" + ItemTypeEnumDatetime ItemTypeEnum = "datetime" + ItemTypeEnumBool ItemTypeEnum = "bool" + ItemTypeEnumList ItemTypeEnum = "list" +) -func (p *PaginatedTicketList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedTicketList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func NewItemTypeEnumFromString(s string) (ItemTypeEnum, error) { + switch s { + case "string": + return ItemTypeEnumString, nil + case "number": + return ItemTypeEnumNumber, nil + case "date": + return ItemTypeEnumDate, nil + case "datetime": + return ItemTypeEnumDatetime, nil + case "bool": + return ItemTypeEnumBool, nil + case "list": + return ItemTypeEnumList, nil } - *p = PaginatedTicketList(value) - p._rawJSON = json.RawMessage(data) - return nil + var t ItemTypeEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (p *PaginatedTicketList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) +func (i ItemTypeEnum) Ptr() *ItemTypeEnum { + return &i } -type PaginatedUserList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*User `json:"results,omitempty"` +// * `SYNCING` - SYNCING +// * `DONE` - DONE +// * `FAILED` - FAILED +// * `DISABLED` - DISABLED +// * `PAUSED` - PAUSED +// * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED +type LastSyncResultEnum string - _rawJSON json.RawMessage -} +const ( + LastSyncResultEnumSyncing LastSyncResultEnum = "SYNCING" + LastSyncResultEnumDone LastSyncResultEnum = "DONE" + LastSyncResultEnumFailed LastSyncResultEnum = "FAILED" + LastSyncResultEnumDisabled LastSyncResultEnum = "DISABLED" + LastSyncResultEnumPaused LastSyncResultEnum = "PAUSED" + LastSyncResultEnumPartiallySynced LastSyncResultEnum = "PARTIALLY_SYNCED" +) -func (p *PaginatedUserList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedUserList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func NewLastSyncResultEnumFromString(s string) (LastSyncResultEnum, error) { + switch s { + case "SYNCING": + return LastSyncResultEnumSyncing, nil + case "DONE": + return LastSyncResultEnumDone, nil + case "FAILED": + return LastSyncResultEnumFailed, nil + case "DISABLED": + return LastSyncResultEnumDisabled, nil + case "PAUSED": + return LastSyncResultEnumPaused, nil + case "PARTIALLY_SYNCED": + return LastSyncResultEnumPartiallySynced, nil } - *p = PaginatedUserList(value) - p._rawJSON = json.RawMessage(data) - return nil + var t LastSyncResultEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (p *PaginatedUserList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value - } - return fmt.Sprintf("%#v", p) +func (l LastSyncResultEnum) Ptr() *LastSyncResultEnum { + return &l } -type PaginatedViewerList struct { - Next *string `json:"next,omitempty"` - Previous *string `json:"previous,omitempty"` - Results []*Viewer `json:"results,omitempty"` +type LinkedAccountStatus struct { + LinkedAccountStatus string `json:"linked_account_status" url:"linked_account_status"` + CanMakeRequest bool `json:"can_make_request" url:"can_make_request"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (p *PaginatedViewerList) UnmarshalJSON(data []byte) error { - type unmarshaler PaginatedViewerList - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (l *LinkedAccountStatus) GetLinkedAccountStatus() string { + if l == nil { + return "" } - *p = PaginatedViewerList(value) - p._rawJSON = json.RawMessage(data) - return nil + return l.LinkedAccountStatus } -func (p *PaginatedViewerList) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value +func (l *LinkedAccountStatus) GetCanMakeRequest() bool { + if l == nil { + return false } - return fmt.Sprintf("%#v", p) + return l.CanMakeRequest } -// # The Ticket Object -// -// ### Description -// -// The `Ticket` object is used to represent a ticket, issue, task or case. -// -// ### Usage Example -// -// TODO -type PatchedTicketRequest struct { - // The ticket's name. - Name *string `json:"name,omitempty"` - // The individual `Users` who are assigned to this ticket. This does not include `Users` who just have view access to this ticket. - Assignees []*string `json:"assignees,omitempty"` - // The `Teams` that are assigned to this ticket. This does not include `Teams` who just have view access to this ticket. - AssignedTeams []*string `json:"assigned_teams,omitempty"` - // The user who created this ticket. - Creator *string `json:"creator,omitempty"` - // The ticket's due date. - DueDate *time.Time `json:"due_date,omitempty"` - // The current status of the ticket. - // - // - `OPEN` - OPEN - // - `CLOSED` - CLOSED - // - `IN_PROGRESS` - IN_PROGRESS - // - `ON_HOLD` - ON_HOLD - Status *PatchedTicketRequestStatus `json:"status,omitempty"` - // The ticket’s description. HTML version of description is mapped if supported by the third-party platform. - Description *string `json:"description,omitempty"` - // The `Collections` that this `Ticket` is included in. - Collections []*string `json:"collections,omitempty"` - // The sub category of the ticket within the 3rd party system. Examples include incident, task, subtask or to-do. - TicketType *string `json:"ticket_type,omitempty"` - // The account associated with the ticket. - Account *string `json:"account,omitempty"` - // The contact associated with the ticket. - Contact *string `json:"contact,omitempty"` - // The ticket's parent ticket. - ParentTicket *string `json:"parent_ticket,omitempty"` - Tags []*string `json:"tags,omitempty"` - Roles []*string `json:"roles,omitempty"` - // When the ticket was completed. - CompletedAt *time.Time `json:"completed_at,omitempty"` - // The 3rd party url of the Ticket. - TicketUrl *string `json:"ticket_url,omitempty"` - // The priority or urgency of the Ticket. - // - // - `URGENT` - URGENT - // - `HIGH` - HIGH - // - `NORMAL` - NORMAL - // - `LOW` - LOW - Priority *PatchedTicketRequestPriority `json:"priority,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` - RemoteFields []*RemoteFieldRequest `json:"remote_fields,omitempty"` - - _rawJSON json.RawMessage +func (l *LinkedAccountStatus) GetExtraProperties() map[string]interface{} { + return l.extraProperties } -func (p *PatchedTicketRequest) UnmarshalJSON(data []byte) error { - type unmarshaler PatchedTicketRequest +func (l *LinkedAccountStatus) UnmarshalJSON(data []byte) error { + type unmarshaler LinkedAccountStatus var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *p = PatchedTicketRequest(value) - p._rawJSON = json.RawMessage(data) + *l = LinkedAccountStatus(value) + extraProperties, err := internal.ExtractExtraProperties(data, *l) + if err != nil { + return err + } + l.extraProperties = extraProperties + l.rawJSON = json.RawMessage(data) return nil } -func (p *PatchedTicketRequest) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { +func (l *LinkedAccountStatus) String() string { + if len(l.rawJSON) > 0 { + if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(p); err == nil { + if value, err := internal.StringifyJSON(l); err == nil { return value } - return fmt.Sprintf("%#v", p) -} - -// The priority or urgency of the Ticket. -// -// - `URGENT` - URGENT -// - `HIGH` - HIGH -// - `NORMAL` - NORMAL -// - `LOW` - LOW -type PatchedTicketRequestPriority struct { - typeName string - PriorityEnum PriorityEnum - String string + return fmt.Sprintf("%#v", l) } -func NewPatchedTicketRequestPriorityFromPriorityEnum(value PriorityEnum) *PatchedTicketRequestPriority { - return &PatchedTicketRequestPriority{typeName: "priorityEnum", PriorityEnum: value} -} +type MetaResponse struct { + RequestSchema map[string]interface{} `json:"request_schema" url:"request_schema"` + RemoteFieldClasses map[string]interface{} `json:"remote_field_classes,omitempty" url:"remote_field_classes,omitempty"` + Status *LinkedAccountStatus `json:"status,omitempty" url:"status,omitempty"` + HasConditionalParams bool `json:"has_conditional_params" url:"has_conditional_params"` + HasRequiredLinkedAccountParams bool `json:"has_required_linked_account_params" url:"has_required_linked_account_params"` -func NewPatchedTicketRequestPriorityFromString(value string) *PatchedTicketRequestPriority { - return &PatchedTicketRequestPriority{typeName: "string", String: value} + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (p *PatchedTicketRequestPriority) UnmarshalJSON(data []byte) error { - var valuePriorityEnum PriorityEnum - if err := json.Unmarshal(data, &valuePriorityEnum); err == nil { - p.typeName = "priorityEnum" - p.PriorityEnum = valuePriorityEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" - p.String = valueString +func (m *MetaResponse) GetRequestSchema() map[string]interface{} { + if m == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, p) + return m.RequestSchema } -func (p PatchedTicketRequestPriority) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "priorityEnum": - return json.Marshal(p.PriorityEnum) - case "string": - return json.Marshal(p.String) +func (m *MetaResponse) GetRemoteFieldClasses() map[string]interface{} { + if m == nil { + return nil } + return m.RemoteFieldClasses } -type PatchedTicketRequestPriorityVisitor interface { - VisitPriorityEnum(PriorityEnum) error - VisitString(string) error -} - -func (p *PatchedTicketRequestPriority) Accept(visitor PatchedTicketRequestPriorityVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "priorityEnum": - return visitor.VisitPriorityEnum(p.PriorityEnum) - case "string": - return visitor.VisitString(p.String) +func (m *MetaResponse) GetStatus() *LinkedAccountStatus { + if m == nil { + return nil } + return m.Status } -// The current status of the ticket. -// -// - `OPEN` - OPEN -// - `CLOSED` - CLOSED -// - `IN_PROGRESS` - IN_PROGRESS -// - `ON_HOLD` - ON_HOLD -type PatchedTicketRequestStatus struct { - typeName string - TicketStatusEnum TicketStatusEnum - String string +func (m *MetaResponse) GetHasConditionalParams() bool { + if m == nil { + return false + } + return m.HasConditionalParams } -func NewPatchedTicketRequestStatusFromTicketStatusEnum(value TicketStatusEnum) *PatchedTicketRequestStatus { - return &PatchedTicketRequestStatus{typeName: "ticketStatusEnum", TicketStatusEnum: value} +func (m *MetaResponse) GetHasRequiredLinkedAccountParams() bool { + if m == nil { + return false + } + return m.HasRequiredLinkedAccountParams } -func NewPatchedTicketRequestStatusFromString(value string) *PatchedTicketRequestStatus { - return &PatchedTicketRequestStatus{typeName: "string", String: value} +func (m *MetaResponse) GetExtraProperties() map[string]interface{} { + return m.extraProperties } -func (p *PatchedTicketRequestStatus) UnmarshalJSON(data []byte) error { - var valueTicketStatusEnum TicketStatusEnum - if err := json.Unmarshal(data, &valueTicketStatusEnum); err == nil { - p.typeName = "ticketStatusEnum" - p.TicketStatusEnum = valueTicketStatusEnum - return nil +func (m *MetaResponse) UnmarshalJSON(data []byte) error { + type unmarshaler MetaResponse + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - p.typeName = "string" - p.String = valueString - return nil + *m = MetaResponse(value) + extraProperties, err := internal.ExtractExtraProperties(data, *m) + if err != nil { + return err } - return fmt.Errorf("%s cannot be deserialized as a %T", data, p) + m.extraProperties = extraProperties + m.rawJSON = json.RawMessage(data) + return nil } -func (p PatchedTicketRequestStatus) MarshalJSON() ([]byte, error) { - switch p.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "ticketStatusEnum": - return json.Marshal(p.TicketStatusEnum) - case "string": - return json.Marshal(p.String) +func (m *MetaResponse) String() string { + if len(m.rawJSON) > 0 { + if value, err := internal.StringifyJSON(m.rawJSON); err == nil { + return value + } } -} - -type PatchedTicketRequestStatusVisitor interface { - VisitTicketStatusEnum(TicketStatusEnum) error - VisitString(string) error -} - -func (p *PatchedTicketRequestStatus) Accept(visitor PatchedTicketRequestStatusVisitor) error { - switch p.typeName { - default: - return fmt.Errorf("invalid type %s in %T", p.typeName, p) - case "ticketStatusEnum": - return visitor.VisitTicketStatusEnum(p.TicketStatusEnum) - case "string": - return visitor.VisitString(p.String) + if value, err := internal.StringifyJSON(m); err == nil { + return value } + return fmt.Sprintf("%#v", m) } -// - `URGENT` - URGENT -// - `HIGH` - HIGH -// - `NORMAL` - NORMAL -// - `LOW` - LOW -type PriorityEnum string +// * `GET` - GET +// * `OPTIONS` - OPTIONS +// * `HEAD` - HEAD +// * `POST` - POST +// * `PUT` - PUT +// * `PATCH` - PATCH +// * `DELETE` - DELETE +type MethodEnum string const ( - PriorityEnumUrgent PriorityEnum = "URGENT" - PriorityEnumHigh PriorityEnum = "HIGH" - PriorityEnumNormal PriorityEnum = "NORMAL" - PriorityEnumLow PriorityEnum = "LOW" + MethodEnumGet MethodEnum = "GET" + MethodEnumOptions MethodEnum = "OPTIONS" + MethodEnumHead MethodEnum = "HEAD" + MethodEnumPost MethodEnum = "POST" + MethodEnumPut MethodEnum = "PUT" + MethodEnumPatch MethodEnum = "PATCH" + MethodEnumDelete MethodEnum = "DELETE" ) -func NewPriorityEnumFromString(s string) (PriorityEnum, error) { +func NewMethodEnumFromString(s string) (MethodEnum, error) { switch s { - case "URGENT": - return PriorityEnumUrgent, nil - case "HIGH": - return PriorityEnumHigh, nil - case "NORMAL": - return PriorityEnumNormal, nil - case "LOW": - return PriorityEnumLow, nil + case "GET": + return MethodEnumGet, nil + case "OPTIONS": + return MethodEnumOptions, nil + case "HEAD": + return MethodEnumHead, nil + case "POST": + return MethodEnumPost, nil + case "PUT": + return MethodEnumPut, nil + case "PATCH": + return MethodEnumPatch, nil + case "DELETE": + return MethodEnumDelete, nil } - var t PriorityEnum + var t MethodEnum return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (p PriorityEnum) Ptr() *PriorityEnum { - return &p +func (m MethodEnum) Ptr() *MethodEnum { + return &m } -// # The Project Object -// +// # The ModelOperation Object // ### Description -// -// Please use the `Collection` model. This model will be fully deprecated on 3/30/2024. +// The `ModelOperation` object is used to represent the operations that are currently supported for a given model. // // ### Usage Example -// -// TODO -type Project struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The project's name. - Name *string `json:"name,omitempty"` - // The project's description. - Description *string `json:"description,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` +// View what operations are supported for the `Candidate` endpoint. +type ModelOperation struct { + ModelName string `json:"model_name" url:"model_name"` + AvailableOperations []string `json:"available_operations" url:"available_operations"` + RequiredPostParameters []string `json:"required_post_parameters" url:"required_post_parameters"` + SupportedFields []string `json:"supported_fields" url:"supported_fields"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (p *Project) UnmarshalJSON(data []byte) error { - type unmarshaler Project - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (m *ModelOperation) GetModelName() string { + if m == nil { + return "" } - *p = Project(value) - p._rawJSON = json.RawMessage(data) - return nil + return m.ModelName } -func (p *Project) String() string { - if len(p._rawJSON) > 0 { - if value, err := core.StringifyJSON(p._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(p); err == nil { - return value +func (m *ModelOperation) GetAvailableOperations() []string { + if m == nil { + return nil } - return fmt.Sprintf("%#v", p) + return m.AvailableOperations } -// # The RemoteData Object -// -// ### Description -// -// The `RemoteData` object is used to represent the full data pulled from the third-party API for an object. -// -// ### Usage Example -// -// TODO -type RemoteData struct { - // The third-party API path that is being called. - Path string `json:"path"` - Data interface{} `json:"data,omitempty"` +func (m *ModelOperation) GetRequiredPostParameters() []string { + if m == nil { + return nil + } + return m.RequiredPostParameters +} - _rawJSON json.RawMessage +func (m *ModelOperation) GetSupportedFields() []string { + if m == nil { + return nil + } + return m.SupportedFields } -func (r *RemoteData) UnmarshalJSON(data []byte) error { - type unmarshaler RemoteData +func (m *ModelOperation) GetExtraProperties() map[string]interface{} { + return m.extraProperties +} + +func (m *ModelOperation) UnmarshalJSON(data []byte) error { + type unmarshaler ModelOperation var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *r = RemoteData(value) - r._rawJSON = json.RawMessage(data) + *m = ModelOperation(value) + extraProperties, err := internal.ExtractExtraProperties(data, *m) + if err != nil { + return err + } + m.extraProperties = extraProperties + m.rawJSON = json.RawMessage(data) return nil } -func (r *RemoteData) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { +func (m *ModelOperation) String() string { + if len(m.rawJSON) > 0 { + if value, err := internal.StringifyJSON(m.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(r); err == nil { + if value, err := internal.StringifyJSON(m); err == nil { return value } - return fmt.Sprintf("%#v", r) + return fmt.Sprintf("%#v", m) } -type RemoteEndpointInfo struct { - Method string `json:"method"` - UrlPath string `json:"url_path"` - FieldTraversalPath []interface{} `json:"field_traversal_path,omitempty"` +type ModelPermissionDeserializerRequest struct { + IsEnabled *bool `json:"is_enabled,omitempty" url:"is_enabled,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (m *ModelPermissionDeserializerRequest) GetIsEnabled() *bool { + if m == nil { + return nil + } + return m.IsEnabled +} - _rawJSON json.RawMessage +func (m *ModelPermissionDeserializerRequest) GetExtraProperties() map[string]interface{} { + return m.extraProperties } -func (r *RemoteEndpointInfo) UnmarshalJSON(data []byte) error { - type unmarshaler RemoteEndpointInfo +func (m *ModelPermissionDeserializerRequest) UnmarshalJSON(data []byte) error { + type unmarshaler ModelPermissionDeserializerRequest var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *r = RemoteEndpointInfo(value) - r._rawJSON = json.RawMessage(data) + *m = ModelPermissionDeserializerRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *m) + if err != nil { + return err + } + m.extraProperties = extraProperties + m.rawJSON = json.RawMessage(data) return nil } -func (r *RemoteEndpointInfo) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { +func (m *ModelPermissionDeserializerRequest) String() string { + if len(m.rawJSON) > 0 { + if value, err := internal.StringifyJSON(m.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(r); err == nil { + if value, err := internal.StringifyJSON(m); err == nil { return value } - return fmt.Sprintf("%#v", r) + return fmt.Sprintf("%#v", m) } -type RemoteField struct { - RemoteFieldClass *RemoteFieldRemoteFieldClass `json:"remote_field_class,omitempty"` - Value map[string]interface{} `json:"value,omitempty"` +// # The MultipartFormField Object +// ### Description +// The `MultipartFormField` object is used to represent fields in an HTTP request using `multipart/form-data`. +// +// ### Usage Example +// Create a `MultipartFormField` to define a multipart form entry. +type MultipartFormFieldRequest struct { + // The name of the form field + Name string `json:"name" url:"name"` + // The data for the form field. + Data string `json:"data" url:"data"` + // The encoding of the value of `data`. Defaults to `RAW` if not defined. + // + // * `RAW` - RAW + // * `BASE64` - BASE64 + // * `GZIP_BASE64` - GZIP_BASE64 + Encoding *MultipartFormFieldRequestEncoding `json:"encoding,omitempty" url:"encoding,omitempty"` + // The file name of the form field, if the field is for a file. + FileName *string `json:"file_name,omitempty" url:"file_name,omitempty"` + // The MIME type of the file, if the field is for a file. + ContentType *string `json:"content_type,omitempty" url:"content_type,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (r *RemoteField) UnmarshalJSON(data []byte) error { - type unmarshaler RemoteField - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (m *MultipartFormFieldRequest) GetName() string { + if m == nil { + return "" } - *r = RemoteField(value) - r._rawJSON = json.RawMessage(data) - return nil + return m.Name } -func (r *RemoteField) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { - return value - } +func (m *MultipartFormFieldRequest) GetData() string { + if m == nil { + return "" } - if value, err := core.StringifyJSON(r); err == nil { - return value + return m.Data +} + +func (m *MultipartFormFieldRequest) GetEncoding() *MultipartFormFieldRequestEncoding { + if m == nil { + return nil } - return fmt.Sprintf("%#v", r) + return m.Encoding +} + +func (m *MultipartFormFieldRequest) GetFileName() *string { + if m == nil { + return nil + } + return m.FileName } -type RemoteFieldApi struct { - Schema map[string]interface{} `json:"schema,omitempty"` - RemoteKeyName string `json:"remote_key_name"` - RemoteEndpointInfo *RemoteEndpointInfo `json:"remote_endpoint_info,omitempty"` - ExampleValues []interface{} `json:"example_values,omitempty"` - AdvancedMetadata *AdvancedMetadata `json:"advanced_metadata,omitempty"` - Coverage *RemoteFieldApiCoverage `json:"coverage,omitempty"` +func (m *MultipartFormFieldRequest) GetContentType() *string { + if m == nil { + return nil + } + return m.ContentType +} - _rawJSON json.RawMessage +func (m *MultipartFormFieldRequest) GetExtraProperties() map[string]interface{} { + return m.extraProperties } -func (r *RemoteFieldApi) UnmarshalJSON(data []byte) error { - type unmarshaler RemoteFieldApi +func (m *MultipartFormFieldRequest) UnmarshalJSON(data []byte) error { + type unmarshaler MultipartFormFieldRequest var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *r = RemoteFieldApi(value) - r._rawJSON = json.RawMessage(data) + *m = MultipartFormFieldRequest(value) + extraProperties, err := internal.ExtractExtraProperties(data, *m) + if err != nil { + return err + } + m.extraProperties = extraProperties + m.rawJSON = json.RawMessage(data) return nil } -func (r *RemoteFieldApi) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { +func (m *MultipartFormFieldRequest) String() string { + if len(m.rawJSON) > 0 { + if value, err := internal.StringifyJSON(m.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(r); err == nil { + if value, err := internal.StringifyJSON(m); err == nil { return value } - return fmt.Sprintf("%#v", r) + return fmt.Sprintf("%#v", m) } -type RemoteFieldApiCoverage struct { - typeName string - Integer int - Double float64 +// The encoding of the value of `data`. Defaults to `RAW` if not defined. +// +// * `RAW` - RAW +// * `BASE64` - BASE64 +// * `GZIP_BASE64` - GZIP_BASE64 +type MultipartFormFieldRequestEncoding struct { + EncodingEnum EncodingEnum + String string + + typ string } -func NewRemoteFieldApiCoverageFromInteger(value int) *RemoteFieldApiCoverage { - return &RemoteFieldApiCoverage{typeName: "integer", Integer: value} +func (m *MultipartFormFieldRequestEncoding) GetEncodingEnum() EncodingEnum { + if m == nil { + return "" + } + return m.EncodingEnum } -func NewRemoteFieldApiCoverageFromDouble(value float64) *RemoteFieldApiCoverage { - return &RemoteFieldApiCoverage{typeName: "double", Double: value} +func (m *MultipartFormFieldRequestEncoding) GetString() string { + if m == nil { + return "" + } + return m.String } -func (r *RemoteFieldApiCoverage) UnmarshalJSON(data []byte) error { - var valueInteger int - if err := json.Unmarshal(data, &valueInteger); err == nil { - r.typeName = "integer" - r.Integer = valueInteger +func (m *MultipartFormFieldRequestEncoding) UnmarshalJSON(data []byte) error { + var valueEncodingEnum EncodingEnum + if err := json.Unmarshal(data, &valueEncodingEnum); err == nil { + m.typ = "EncodingEnum" + m.EncodingEnum = valueEncodingEnum return nil } - var valueDouble float64 - if err := json.Unmarshal(data, &valueDouble); err == nil { - r.typeName = "double" - r.Double = valueDouble + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + m.typ = "String" + m.String = valueString return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, r) + return fmt.Errorf("%s cannot be deserialized as a %T", data, m) +} + +func (m MultipartFormFieldRequestEncoding) MarshalJSON() ([]byte, error) { + if m.typ == "EncodingEnum" || m.EncodingEnum != "" { + return json.Marshal(m.EncodingEnum) + } + if m.typ == "String" || m.String != "" { + return json.Marshal(m.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", m) +} + +type MultipartFormFieldRequestEncodingVisitor interface { + VisitEncodingEnum(EncodingEnum) error + VisitString(string) error } -func (r RemoteFieldApiCoverage) MarshalJSON() ([]byte, error) { - switch r.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", r.typeName, r) - case "integer": - return json.Marshal(r.Integer) - case "double": - return json.Marshal(r.Double) +func (m *MultipartFormFieldRequestEncoding) Accept(visitor MultipartFormFieldRequestEncodingVisitor) error { + if m.typ == "EncodingEnum" || m.EncodingEnum != "" { + return visitor.VisitEncodingEnum(m.EncodingEnum) + } + if m.typ == "String" || m.String != "" { + return visitor.VisitString(m.String) } + return fmt.Errorf("type %T does not include a non-empty union type", m) +} + +type PaginatedUserList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*User `json:"results,omitempty" url:"results,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage } -type RemoteFieldApiCoverageVisitor interface { - VisitInteger(int) error - VisitDouble(float64) error +func (p *PaginatedUserList) GetNext() *string { + if p == nil { + return nil + } + return p.Next } -func (r *RemoteFieldApiCoverage) Accept(visitor RemoteFieldApiCoverageVisitor) error { - switch r.typeName { - default: - return fmt.Errorf("invalid type %s in %T", r.typeName, r) - case "integer": - return visitor.VisitInteger(r.Integer) - case "double": - return visitor.VisitDouble(r.Double) +func (p *PaginatedUserList) GetPrevious() *string { + if p == nil { + return nil } + return p.Previous } -type RemoteFieldApiResponse struct { - Ticket []*RemoteFieldApi `json:"Ticket,omitempty"` - Comment []*RemoteFieldApi `json:"Comment,omitempty"` - Project []*RemoteFieldApi `json:"Project,omitempty"` - Collection []*RemoteFieldApi `json:"Collection,omitempty"` - User []*RemoteFieldApi `json:"User,omitempty"` - Role []*RemoteFieldApi `json:"Role,omitempty"` - Account []*RemoteFieldApi `json:"Account,omitempty"` - Team []*RemoteFieldApi `json:"Team,omitempty"` - Attachment []*RemoteFieldApi `json:"Attachment,omitempty"` - Tag []*RemoteFieldApi `json:"Tag,omitempty"` - Contact []*RemoteFieldApi `json:"Contact,omitempty"` +func (p *PaginatedUserList) GetResults() []*User { + if p == nil { + return nil + } + return p.Results +} - _rawJSON json.RawMessage +func (p *PaginatedUserList) GetExtraProperties() map[string]interface{} { + return p.extraProperties } -func (r *RemoteFieldApiResponse) UnmarshalJSON(data []byte) error { - type unmarshaler RemoteFieldApiResponse +func (p *PaginatedUserList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedUserList var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *r = RemoteFieldApiResponse(value) - r._rawJSON = json.RawMessage(data) + *p = PaginatedUserList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) return nil } -func (r *RemoteFieldApiResponse) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { +func (p *PaginatedUserList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(r); err == nil { + if value, err := internal.StringifyJSON(p); err == nil { return value } - return fmt.Sprintf("%#v", r) + return fmt.Sprintf("%#v", p) } -type RemoteFieldClass struct { - Id *string `json:"id,omitempty"` - DisplayName *string `json:"display_name,omitempty"` - RemoteKeyName *string `json:"remote_key_name,omitempty"` - Description *string `json:"description,omitempty"` - IsCustom *bool `json:"is_custom,omitempty"` - IsRequired *bool `json:"is_required,omitempty"` - FieldType *RemoteFieldClassFieldType `json:"field_type,omitempty"` - FieldFormat *RemoteFieldClassFieldFormat `json:"field_format,omitempty"` - FieldChoices []*RemoteFieldClassFieldChoicesItem `json:"field_choices,omitempty"` - ItemSchema *ItemSchema `json:"item_schema,omitempty"` +type PaginatedViewerList struct { + Next *string `json:"next,omitempty" url:"next,omitempty"` + Previous *string `json:"previous,omitempty" url:"previous,omitempty"` + Results []*Viewer `json:"results,omitempty" url:"results,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (r *RemoteFieldClass) UnmarshalJSON(data []byte) error { - type unmarshaler RemoteFieldClass +func (p *PaginatedViewerList) GetNext() *string { + if p == nil { + return nil + } + return p.Next +} + +func (p *PaginatedViewerList) GetPrevious() *string { + if p == nil { + return nil + } + return p.Previous +} + +func (p *PaginatedViewerList) GetResults() []*Viewer { + if p == nil { + return nil + } + return p.Results +} + +func (p *PaginatedViewerList) GetExtraProperties() map[string]interface{} { + return p.extraProperties +} + +func (p *PaginatedViewerList) UnmarshalJSON(data []byte) error { + type unmarshaler PaginatedViewerList var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *r = RemoteFieldClass(value) - r._rawJSON = json.RawMessage(data) + *p = PaginatedViewerList(value) + extraProperties, err := internal.ExtractExtraProperties(data, *p) + if err != nil { + return err + } + p.extraProperties = extraProperties + p.rawJSON = json.RawMessage(data) return nil } -func (r *RemoteFieldClass) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { +func (p *PaginatedViewerList) String() string { + if len(p.rawJSON) > 0 { + if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(r); err == nil { + if value, err := internal.StringifyJSON(p); err == nil { return value } - return fmt.Sprintf("%#v", r) + return fmt.Sprintf("%#v", p) } -type RemoteFieldClassFieldChoicesItem struct { - Value interface{} `json:"value,omitempty"` - DisplayName *string `json:"display_name,omitempty"` +// * `URGENT` - URGENT +// * `HIGH` - HIGH +// * `NORMAL` - NORMAL +// * `LOW` - LOW +type PriorityEnum string + +const ( + PriorityEnumUrgent PriorityEnum = "URGENT" + PriorityEnumHigh PriorityEnum = "HIGH" + PriorityEnumNormal PriorityEnum = "NORMAL" + PriorityEnumLow PriorityEnum = "LOW" +) + +func NewPriorityEnumFromString(s string) (PriorityEnum, error) { + switch s { + case "URGENT": + return PriorityEnumUrgent, nil + case "HIGH": + return PriorityEnumHigh, nil + case "NORMAL": + return PriorityEnumNormal, nil + case "LOW": + return PriorityEnumLow, nil + } + var t PriorityEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} - _rawJSON json.RawMessage +func (p PriorityEnum) Ptr() *PriorityEnum { + return &p } -func (r *RemoteFieldClassFieldChoicesItem) UnmarshalJSON(data []byte) error { - type unmarshaler RemoteFieldClassFieldChoicesItem +// # The RemoteData Object +// ### Description +// The `RemoteData` object is used to represent the full data pulled from the third-party API for an object. +// +// ### Usage Example +// TODO +type RemoteData struct { + // The third-party API path that is being called. + Path string `json:"path" url:"path"` + Data interface{} `json:"data,omitempty" url:"data,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (r *RemoteData) GetPath() string { + if r == nil { + return "" + } + return r.Path +} + +func (r *RemoteData) GetData() interface{} { + if r == nil { + return nil + } + return r.Data +} + +func (r *RemoteData) GetExtraProperties() map[string]interface{} { + return r.extraProperties +} + +func (r *RemoteData) UnmarshalJSON(data []byte) error { + type unmarshaler RemoteData var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *r = RemoteFieldClassFieldChoicesItem(value) - r._rawJSON = json.RawMessage(data) + *r = RemoteData(value) + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { + return err + } + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) return nil } -func (r *RemoteFieldClassFieldChoicesItem) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { +func (r *RemoteData) String() string { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(r); err == nil { + if value, err := internal.StringifyJSON(r); err == nil { return value } return fmt.Sprintf("%#v", r) } -type RemoteFieldClassFieldFormat struct { - typeName string - String string - FieldFormatEnum FieldFormatEnum -} - -func NewRemoteFieldClassFieldFormatFromString(value string) *RemoteFieldClassFieldFormat { - return &RemoteFieldClassFieldFormat{typeName: "string", String: value} -} +type RemoteField struct { + RemoteFieldClass *RemoteFieldRemoteFieldClass `json:"remote_field_class" url:"remote_field_class"` + Value interface{} `json:"value,omitempty" url:"value,omitempty"` -func NewRemoteFieldClassFieldFormatFromFieldFormatEnum(value FieldFormatEnum) *RemoteFieldClassFieldFormat { - return &RemoteFieldClassFieldFormat{typeName: "fieldFormatEnum", FieldFormatEnum: value} + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (r *RemoteFieldClassFieldFormat) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - r.typeName = "string" - r.String = valueString +func (r *RemoteField) GetRemoteFieldClass() *RemoteFieldRemoteFieldClass { + if r == nil { return nil } - var valueFieldFormatEnum FieldFormatEnum - if err := json.Unmarshal(data, &valueFieldFormatEnum); err == nil { - r.typeName = "fieldFormatEnum" - r.FieldFormatEnum = valueFieldFormatEnum + return r.RemoteFieldClass +} + +func (r *RemoteField) GetValue() interface{} { + if r == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, r) + return r.Value } -func (r RemoteFieldClassFieldFormat) MarshalJSON() ([]byte, error) { - switch r.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", r.typeName, r) - case "string": - return json.Marshal(r.String) - case "fieldFormatEnum": - return json.Marshal(r.FieldFormatEnum) - } +func (r *RemoteField) GetExtraProperties() map[string]interface{} { + return r.extraProperties } -type RemoteFieldClassFieldFormatVisitor interface { - VisitString(string) error - VisitFieldFormatEnum(FieldFormatEnum) error +func (r *RemoteField) UnmarshalJSON(data []byte) error { + type unmarshaler RemoteField + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *r = RemoteField(value) + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { + return err + } + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) + return nil } -func (r *RemoteFieldClassFieldFormat) Accept(visitor RemoteFieldClassFieldFormatVisitor) error { - switch r.typeName { - default: - return fmt.Errorf("invalid type %s in %T", r.typeName, r) - case "string": - return visitor.VisitString(r.String) - case "fieldFormatEnum": - return visitor.VisitFieldFormatEnum(r.FieldFormatEnum) +func (r *RemoteField) String() string { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(r); err == nil { + return value } + return fmt.Sprintf("%#v", r) } -type RemoteFieldClassFieldType struct { - typeName string - String string - FieldTypeEnum FieldTypeEnum +type RemoteFieldClass struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + DisplayName *string `json:"display_name,omitempty" url:"display_name,omitempty"` + RemoteKeyName *string `json:"remote_key_name,omitempty" url:"remote_key_name,omitempty"` + Description *string `json:"description,omitempty" url:"description,omitempty"` + IsCustom *bool `json:"is_custom,omitempty" url:"is_custom,omitempty"` + IsRequired *bool `json:"is_required,omitempty" url:"is_required,omitempty"` + FieldType *FieldTypeEnum `json:"field_type,omitempty" url:"field_type,omitempty"` + FieldFormat *FieldFormatEnum `json:"field_format,omitempty" url:"field_format,omitempty"` + FieldChoices []*RemoteFieldClassFieldChoicesItem `json:"field_choices,omitempty" url:"field_choices,omitempty"` + ItemSchema *ItemSchema `json:"item_schema,omitempty" url:"item_schema,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (r *RemoteFieldClass) GetId() *string { + if r == nil { + return nil + } + return r.Id } -func NewRemoteFieldClassFieldTypeFromString(value string) *RemoteFieldClassFieldType { - return &RemoteFieldClassFieldType{typeName: "string", String: value} +func (r *RemoteFieldClass) GetDisplayName() *string { + if r == nil { + return nil + } + return r.DisplayName } -func NewRemoteFieldClassFieldTypeFromFieldTypeEnum(value FieldTypeEnum) *RemoteFieldClassFieldType { - return &RemoteFieldClassFieldType{typeName: "fieldTypeEnum", FieldTypeEnum: value} +func (r *RemoteFieldClass) GetRemoteKeyName() *string { + if r == nil { + return nil + } + return r.RemoteKeyName } -func (r *RemoteFieldClassFieldType) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - r.typeName = "string" - r.String = valueString +func (r *RemoteFieldClass) GetDescription() *string { + if r == nil { return nil } - var valueFieldTypeEnum FieldTypeEnum - if err := json.Unmarshal(data, &valueFieldTypeEnum); err == nil { - r.typeName = "fieldTypeEnum" - r.FieldTypeEnum = valueFieldTypeEnum + return r.Description +} + +func (r *RemoteFieldClass) GetIsCustom() *bool { + if r == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, r) + return r.IsCustom } -func (r RemoteFieldClassFieldType) MarshalJSON() ([]byte, error) { - switch r.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", r.typeName, r) - case "string": - return json.Marshal(r.String) - case "fieldTypeEnum": - return json.Marshal(r.FieldTypeEnum) +func (r *RemoteFieldClass) GetIsRequired() *bool { + if r == nil { + return nil } + return r.IsRequired } -type RemoteFieldClassFieldTypeVisitor interface { - VisitString(string) error - VisitFieldTypeEnum(FieldTypeEnum) error +func (r *RemoteFieldClass) GetFieldType() *FieldTypeEnum { + if r == nil { + return nil + } + return r.FieldType } -func (r *RemoteFieldClassFieldType) Accept(visitor RemoteFieldClassFieldTypeVisitor) error { - switch r.typeName { - default: - return fmt.Errorf("invalid type %s in %T", r.typeName, r) - case "string": - return visitor.VisitString(r.String) - case "fieldTypeEnum": - return visitor.VisitFieldTypeEnum(r.FieldTypeEnum) +func (r *RemoteFieldClass) GetFieldFormat() *FieldFormatEnum { + if r == nil { + return nil } + return r.FieldFormat } -type RemoteFieldRemoteFieldClass struct { - typeName string - String string - RemoteFieldClass *RemoteFieldClass +func (r *RemoteFieldClass) GetFieldChoices() []*RemoteFieldClassFieldChoicesItem { + if r == nil { + return nil + } + return r.FieldChoices } -func NewRemoteFieldRemoteFieldClassFromString(value string) *RemoteFieldRemoteFieldClass { - return &RemoteFieldRemoteFieldClass{typeName: "string", String: value} +func (r *RemoteFieldClass) GetItemSchema() *ItemSchema { + if r == nil { + return nil + } + return r.ItemSchema } -func NewRemoteFieldRemoteFieldClassFromRemoteFieldClass(value *RemoteFieldClass) *RemoteFieldRemoteFieldClass { - return &RemoteFieldRemoteFieldClass{typeName: "remoteFieldClass", RemoteFieldClass: value} +func (r *RemoteFieldClass) GetExtraProperties() map[string]interface{} { + return r.extraProperties } -func (r *RemoteFieldRemoteFieldClass) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - r.typeName = "string" - r.String = valueString - return nil +func (r *RemoteFieldClass) UnmarshalJSON(data []byte) error { + type unmarshaler RemoteFieldClass + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err } - valueRemoteFieldClass := new(RemoteFieldClass) - if err := json.Unmarshal(data, &valueRemoteFieldClass); err == nil { - r.typeName = "remoteFieldClass" - r.RemoteFieldClass = valueRemoteFieldClass - return nil + *r = RemoteFieldClass(value) + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { + return err } - return fmt.Errorf("%s cannot be deserialized as a %T", data, r) + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) + return nil } -func (r RemoteFieldRemoteFieldClass) MarshalJSON() ([]byte, error) { - switch r.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", r.typeName, r) - case "string": - return json.Marshal(r.String) - case "remoteFieldClass": - return json.Marshal(r.RemoteFieldClass) +func (r *RemoteFieldClass) String() string { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(r); err == nil { + return value } + return fmt.Sprintf("%#v", r) } -type RemoteFieldRemoteFieldClassVisitor interface { - VisitString(string) error - VisitRemoteFieldClass(*RemoteFieldClass) error +type RemoteFieldClassFieldChoicesItem struct { + Value interface{} `json:"value,omitempty" url:"value,omitempty"` + DisplayName *string `json:"display_name,omitempty" url:"display_name,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (r *RemoteFieldRemoteFieldClass) Accept(visitor RemoteFieldRemoteFieldClassVisitor) error { - switch r.typeName { - default: - return fmt.Errorf("invalid type %s in %T", r.typeName, r) - case "string": - return visitor.VisitString(r.String) - case "remoteFieldClass": - return visitor.VisitRemoteFieldClass(r.RemoteFieldClass) +func (r *RemoteFieldClassFieldChoicesItem) GetValue() interface{} { + if r == nil { + return nil } + return r.Value } -type RemoteFieldRequest struct { - RemoteFieldClass *RemoteFieldRequestRemoteFieldClass `json:"remote_field_class,omitempty"` - Value interface{} `json:"value,omitempty"` +func (r *RemoteFieldClassFieldChoicesItem) GetDisplayName() *string { + if r == nil { + return nil + } + return r.DisplayName +} - _rawJSON json.RawMessage +func (r *RemoteFieldClassFieldChoicesItem) GetExtraProperties() map[string]interface{} { + return r.extraProperties } -func (r *RemoteFieldRequest) UnmarshalJSON(data []byte) error { - type unmarshaler RemoteFieldRequest +func (r *RemoteFieldClassFieldChoicesItem) UnmarshalJSON(data []byte) error { + type unmarshaler RemoteFieldClassFieldChoicesItem var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *r = RemoteFieldRequest(value) - r._rawJSON = json.RawMessage(data) + *r = RemoteFieldClassFieldChoicesItem(value) + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { + return err + } + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) return nil } -func (r *RemoteFieldRequest) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { +func (r *RemoteFieldClassFieldChoicesItem) String() string { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(r); err == nil { + if value, err := internal.StringifyJSON(r); err == nil { return value } return fmt.Sprintf("%#v", r) } -type RemoteFieldRequestRemoteFieldClass struct { - typeName string +type RemoteFieldRemoteFieldClass struct { String string RemoteFieldClass *RemoteFieldClass + + typ string } -func NewRemoteFieldRequestRemoteFieldClassFromString(value string) *RemoteFieldRequestRemoteFieldClass { - return &RemoteFieldRequestRemoteFieldClass{typeName: "string", String: value} +func (r *RemoteFieldRemoteFieldClass) GetString() string { + if r == nil { + return "" + } + return r.String } -func NewRemoteFieldRequestRemoteFieldClassFromRemoteFieldClass(value *RemoteFieldClass) *RemoteFieldRequestRemoteFieldClass { - return &RemoteFieldRequestRemoteFieldClass{typeName: "remoteFieldClass", RemoteFieldClass: value} +func (r *RemoteFieldRemoteFieldClass) GetRemoteFieldClass() *RemoteFieldClass { + if r == nil { + return nil + } + return r.RemoteFieldClass } -func (r *RemoteFieldRequestRemoteFieldClass) UnmarshalJSON(data []byte) error { +func (r *RemoteFieldRemoteFieldClass) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - r.typeName = "string" + r.typ = "String" r.String = valueString return nil } valueRemoteFieldClass := new(RemoteFieldClass) if err := json.Unmarshal(data, &valueRemoteFieldClass); err == nil { - r.typeName = "remoteFieldClass" + r.typ = "RemoteFieldClass" r.RemoteFieldClass = valueRemoteFieldClass return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, r) } -func (r RemoteFieldRequestRemoteFieldClass) MarshalJSON() ([]byte, error) { - switch r.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", r.typeName, r) - case "string": +func (r RemoteFieldRemoteFieldClass) MarshalJSON() ([]byte, error) { + if r.typ == "String" || r.String != "" { return json.Marshal(r.String) - case "remoteFieldClass": + } + if r.typ == "RemoteFieldClass" || r.RemoteFieldClass != nil { return json.Marshal(r.RemoteFieldClass) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", r) } -type RemoteFieldRequestRemoteFieldClassVisitor interface { +type RemoteFieldRemoteFieldClassVisitor interface { VisitString(string) error VisitRemoteFieldClass(*RemoteFieldClass) error } -func (r *RemoteFieldRequestRemoteFieldClass) Accept(visitor RemoteFieldRequestRemoteFieldClassVisitor) error { - switch r.typeName { - default: - return fmt.Errorf("invalid type %s in %T", r.typeName, r) - case "string": +func (r *RemoteFieldRemoteFieldClass) Accept(visitor RemoteFieldRemoteFieldClassVisitor) error { + if r.typ == "String" || r.String != "" { return visitor.VisitString(r.String) - case "remoteFieldClass": + } + if r.typ == "RemoteFieldClass" || r.RemoteFieldClass != nil { return visitor.VisitRemoteFieldClass(r.RemoteFieldClass) } + return fmt.Errorf("type %T does not include a non-empty union type", r) } // # The RemoteKey Object -// // ### Description -// // The `RemoteKey` object is used to represent a request for a new remote key. // // ### Usage Example -// // Post a `GenerateRemoteKey` to receive a new `RemoteKey`. type RemoteKey struct { - Name string `json:"name"` - Key string `json:"key"` + Name string `json:"name" url:"name"` + Key string `json:"key" url:"key"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (r *RemoteKey) GetName() string { + if r == nil { + return "" + } + return r.Name +} - _rawJSON json.RawMessage +func (r *RemoteKey) GetKey() string { + if r == nil { + return "" + } + return r.Key +} + +func (r *RemoteKey) GetExtraProperties() map[string]interface{} { + return r.extraProperties } func (r *RemoteKey) UnmarshalJSON(data []byte) error { @@ -4959,41 +2933,97 @@ func (r *RemoteKey) UnmarshalJSON(data []byte) error { return err } *r = RemoteKey(value) - r._rawJSON = json.RawMessage(data) + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { + return err + } + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) return nil } func (r *RemoteKey) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(r); err == nil { + if value, err := internal.StringifyJSON(r); err == nil { return value } return fmt.Sprintf("%#v", r) } // # The RemoteResponse Object -// // ### Description -// // The `RemoteResponse` object is used to represent information returned from a third-party endpoint. // // ### Usage Example -// // View the `RemoteResponse` returned from your `DataPassthrough`. type RemoteResponse struct { - Method string `json:"method"` - Path string `json:"path"` - Status int `json:"status"` - Response interface{} `json:"response,omitempty"` - ResponseHeaders map[string]interface{} `json:"response_headers,omitempty"` - ResponseType *ResponseTypeEnum `json:"response_type,omitempty"` - Headers map[string]interface{} `json:"headers,omitempty"` + Method string `json:"method" url:"method"` + Path string `json:"path" url:"path"` + Status int `json:"status" url:"status"` + Response interface{} `json:"response" url:"response"` + ResponseHeaders map[string]interface{} `json:"response_headers,omitempty" url:"response_headers,omitempty"` + ResponseType *RemoteResponseResponseType `json:"response_type,omitempty" url:"response_type,omitempty"` + Headers map[string]interface{} `json:"headers,omitempty" url:"headers,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (r *RemoteResponse) GetMethod() string { + if r == nil { + return "" + } + return r.Method +} + +func (r *RemoteResponse) GetPath() string { + if r == nil { + return "" + } + return r.Path +} + +func (r *RemoteResponse) GetStatus() int { + if r == nil { + return 0 + } + return r.Status +} + +func (r *RemoteResponse) GetResponse() interface{} { + if r == nil { + return nil + } + return r.Response +} + +func (r *RemoteResponse) GetResponseHeaders() map[string]interface{} { + if r == nil { + return nil + } + return r.ResponseHeaders +} + +func (r *RemoteResponse) GetResponseType() *RemoteResponseResponseType { + if r == nil { + return nil + } + return r.ResponseType +} + +func (r *RemoteResponse) GetHeaders() map[string]interface{} { + if r == nil { + return nil + } + return r.Headers +} - _rawJSON json.RawMessage +func (r *RemoteResponse) GetExtraProperties() map[string]interface{} { + return r.extraProperties } func (r *RemoteResponse) UnmarshalJSON(data []byte) error { @@ -5003,25 +3033,92 @@ func (r *RemoteResponse) UnmarshalJSON(data []byte) error { return err } *r = RemoteResponse(value) - r._rawJSON = json.RawMessage(data) + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { + return err + } + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) return nil } func (r *RemoteResponse) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(r); err == nil { + if value, err := internal.StringifyJSON(r); err == nil { return value } return fmt.Sprintf("%#v", r) } -// - `JSON` - JSON -// - `XML` - XML -// - `MULTIPART` - MULTIPART +type RemoteResponseResponseType struct { + ResponseTypeEnum ResponseTypeEnum + String string + + typ string +} + +func (r *RemoteResponseResponseType) GetResponseTypeEnum() ResponseTypeEnum { + if r == nil { + return "" + } + return r.ResponseTypeEnum +} + +func (r *RemoteResponseResponseType) GetString() string { + if r == nil { + return "" + } + return r.String +} + +func (r *RemoteResponseResponseType) UnmarshalJSON(data []byte) error { + var valueResponseTypeEnum ResponseTypeEnum + if err := json.Unmarshal(data, &valueResponseTypeEnum); err == nil { + r.typ = "ResponseTypeEnum" + r.ResponseTypeEnum = valueResponseTypeEnum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + r.typ = "String" + r.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, r) +} + +func (r RemoteResponseResponseType) MarshalJSON() ([]byte, error) { + if r.typ == "ResponseTypeEnum" || r.ResponseTypeEnum != "" { + return json.Marshal(r.ResponseTypeEnum) + } + if r.typ == "String" || r.String != "" { + return json.Marshal(r.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", r) +} + +type RemoteResponseResponseTypeVisitor interface { + VisitResponseTypeEnum(ResponseTypeEnum) error + VisitString(string) error +} + +func (r *RemoteResponseResponseType) Accept(visitor RemoteResponseResponseTypeVisitor) error { + if r.typ == "ResponseTypeEnum" || r.ResponseTypeEnum != "" { + return visitor.VisitResponseTypeEnum(r.ResponseTypeEnum) + } + if r.typ == "String" || r.String != "" { + return visitor.VisitString(r.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", r) +} + +// * `JSON` - JSON +// * `XML` - XML +// * `MULTIPART` - MULTIPART type RequestFormatEnum string const ( @@ -5047,8 +3144,8 @@ func (r RequestFormatEnum) Ptr() *RequestFormatEnum { return &r } -// - `JSON` - JSON -// - `BASE64_GZIP` - BASE64_GZIP +// * `JSON` - JSON +// * `BASE64_GZIP` - BASE64_GZIP type ResponseTypeEnum string const ( @@ -5072,224 +3169,293 @@ func (r ResponseTypeEnum) Ptr() *ResponseTypeEnum { } // # The Role Object -// // ### Description -// // The `Role` object is used to represent the set of actions & access that a user with this role is allowed to perform. // // ### Usage Example -// // TODO type Role struct { - Id *string `json:"id,omitempty"` + Id *string `json:"id,omitempty" url:"id,omitempty"` // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` // The name of the Role. - Name *string `json:"name,omitempty"` + Name *string `json:"name,omitempty" url:"name,omitempty"` // The set of actions that a User with this Role can perform. Possible enum values include: `VIEW`, `CREATE`, `EDIT`, `DELETE`, `CLOSE`, and `ASSIGN`. - TicketActions []*RoleTicketActionsItem `json:"ticket_actions,omitempty"` + TicketActions []*RoleTicketActionsItem `json:"ticket_actions,omitempty" url:"ticket_actions,omitempty"` // The level of Ticket access that a User with this Role can perform. // - // - `ALL` - ALL - // - `ASSIGNED_ONLY` - ASSIGNED_ONLY - // - `TEAM_ONLY` - TEAM_ONLY - TicketAccess *RoleTicketAccess `json:"ticket_access,omitempty"` + // * `ALL` - ALL + // * `ASSIGNED_ONLY` - ASSIGNED_ONLY + // * `TEAM_ONLY` - TEAM_ONLY + TicketAccess *RoleTicketAccess `json:"ticket_access,omitempty" url:"ticket_access,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (r *Role) GetId() *string { + if r == nil { + return nil + } + return r.Id +} + +func (r *Role) GetRemoteId() *string { + if r == nil { + return nil + } + return r.RemoteId +} + +func (r *Role) GetCreatedAt() *time.Time { + if r == nil { + return nil + } + return r.CreatedAt +} + +func (r *Role) GetModifiedAt() *time.Time { + if r == nil { + return nil + } + return r.ModifiedAt +} + +func (r *Role) GetName() *string { + if r == nil { + return nil + } + return r.Name +} + +func (r *Role) GetTicketActions() []*RoleTicketActionsItem { + if r == nil { + return nil + } + return r.TicketActions +} + +func (r *Role) GetTicketAccess() *RoleTicketAccess { + if r == nil { + return nil + } + return r.TicketAccess +} + +func (r *Role) GetRemoteWasDeleted() *bool { + if r == nil { + return nil + } + return r.RemoteWasDeleted +} + +func (r *Role) GetFieldMappings() map[string]interface{} { + if r == nil { + return nil + } + return r.FieldMappings +} + +func (r *Role) GetRemoteData() []*RemoteData { + if r == nil { + return nil + } + return r.RemoteData +} - _rawJSON json.RawMessage +func (r *Role) GetExtraProperties() map[string]interface{} { + return r.extraProperties } func (r *Role) UnmarshalJSON(data []byte) error { - type unmarshaler Role - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { + type embed Role + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*r), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *r = Role(unmarshaler.embed) + r.CreatedAt = unmarshaler.CreatedAt.TimePtr() + r.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *r) + if err != nil { return err } - *r = Role(value) - r._rawJSON = json.RawMessage(data) + r.extraProperties = extraProperties + r.rawJSON = json.RawMessage(data) return nil } +func (r *Role) MarshalJSON() ([]byte, error) { + type embed Role + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*r), + CreatedAt: internal.NewOptionalDateTime(r.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(r.ModifiedAt), + } + return json.Marshal(marshaler) +} + func (r *Role) String() string { - if len(r._rawJSON) > 0 { - if value, err := core.StringifyJSON(r._rawJSON); err == nil { + if len(r.rawJSON) > 0 { + if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(r); err == nil { + if value, err := internal.StringifyJSON(r); err == nil { return value } return fmt.Sprintf("%#v", r) } -// - `ADMIN` - ADMIN -// - `DEVELOPER` - DEVELOPER -// - `MEMBER` - MEMBER -// - `API` - API -// - `SYSTEM` - SYSTEM -// - `MERGE_TEAM` - MERGE_TEAM -type RoleEnum string - -const ( - RoleEnumAdmin RoleEnum = "ADMIN" - RoleEnumDeveloper RoleEnum = "DEVELOPER" - RoleEnumMember RoleEnum = "MEMBER" - RoleEnumApi RoleEnum = "API" - RoleEnumSystem RoleEnum = "SYSTEM" - RoleEnumMergeTeam RoleEnum = "MERGE_TEAM" -) - -func NewRoleEnumFromString(s string) (RoleEnum, error) { - switch s { - case "ADMIN": - return RoleEnumAdmin, nil - case "DEVELOPER": - return RoleEnumDeveloper, nil - case "MEMBER": - return RoleEnumMember, nil - case "API": - return RoleEnumApi, nil - case "SYSTEM": - return RoleEnumSystem, nil - case "MERGE_TEAM": - return RoleEnumMergeTeam, nil - } - var t RoleEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) -} - -func (r RoleEnum) Ptr() *RoleEnum { - return &r -} - // The level of Ticket access that a User with this Role can perform. // -// - `ALL` - ALL -// - `ASSIGNED_ONLY` - ASSIGNED_ONLY -// - `TEAM_ONLY` - TEAM_ONLY +// * `ALL` - ALL +// * `ASSIGNED_ONLY` - ASSIGNED_ONLY +// * `TEAM_ONLY` - TEAM_ONLY type RoleTicketAccess struct { - typeName string - String string TicketAccessEnum TicketAccessEnum + String string + + typ string } -func NewRoleTicketAccessFromString(value string) *RoleTicketAccess { - return &RoleTicketAccess{typeName: "string", String: value} +func (r *RoleTicketAccess) GetTicketAccessEnum() TicketAccessEnum { + if r == nil { + return "" + } + return r.TicketAccessEnum } -func NewRoleTicketAccessFromTicketAccessEnum(value TicketAccessEnum) *RoleTicketAccess { - return &RoleTicketAccess{typeName: "ticketAccessEnum", TicketAccessEnum: value} +func (r *RoleTicketAccess) GetString() string { + if r == nil { + return "" + } + return r.String } func (r *RoleTicketAccess) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - r.typeName = "string" - r.String = valueString - return nil - } var valueTicketAccessEnum TicketAccessEnum if err := json.Unmarshal(data, &valueTicketAccessEnum); err == nil { - r.typeName = "ticketAccessEnum" + r.typ = "TicketAccessEnum" r.TicketAccessEnum = valueTicketAccessEnum return nil } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + r.typ = "String" + r.String = valueString + return nil + } return fmt.Errorf("%s cannot be deserialized as a %T", data, r) } func (r RoleTicketAccess) MarshalJSON() ([]byte, error) { - switch r.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", r.typeName, r) - case "string": - return json.Marshal(r.String) - case "ticketAccessEnum": + if r.typ == "TicketAccessEnum" || r.TicketAccessEnum != "" { return json.Marshal(r.TicketAccessEnum) } + if r.typ == "String" || r.String != "" { + return json.Marshal(r.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", r) } type RoleTicketAccessVisitor interface { - VisitString(string) error VisitTicketAccessEnum(TicketAccessEnum) error + VisitString(string) error } func (r *RoleTicketAccess) Accept(visitor RoleTicketAccessVisitor) error { - switch r.typeName { - default: - return fmt.Errorf("invalid type %s in %T", r.typeName, r) - case "string": - return visitor.VisitString(r.String) - case "ticketAccessEnum": + if r.typ == "TicketAccessEnum" || r.TicketAccessEnum != "" { return visitor.VisitTicketAccessEnum(r.TicketAccessEnum) } + if r.typ == "String" || r.String != "" { + return visitor.VisitString(r.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", r) } type RoleTicketActionsItem struct { - typeName string - String string TicketActionsEnum TicketActionsEnum + String string + + typ string } -func NewRoleTicketActionsItemFromString(value string) *RoleTicketActionsItem { - return &RoleTicketActionsItem{typeName: "string", String: value} +func (r *RoleTicketActionsItem) GetTicketActionsEnum() TicketActionsEnum { + if r == nil { + return "" + } + return r.TicketActionsEnum } -func NewRoleTicketActionsItemFromTicketActionsEnum(value TicketActionsEnum) *RoleTicketActionsItem { - return &RoleTicketActionsItem{typeName: "ticketActionsEnum", TicketActionsEnum: value} +func (r *RoleTicketActionsItem) GetString() string { + if r == nil { + return "" + } + return r.String } func (r *RoleTicketActionsItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - r.typeName = "string" - r.String = valueString - return nil - } var valueTicketActionsEnum TicketActionsEnum if err := json.Unmarshal(data, &valueTicketActionsEnum); err == nil { - r.typeName = "ticketActionsEnum" + r.typ = "TicketActionsEnum" r.TicketActionsEnum = valueTicketActionsEnum return nil } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + r.typ = "String" + r.String = valueString + return nil + } return fmt.Errorf("%s cannot be deserialized as a %T", data, r) } func (r RoleTicketActionsItem) MarshalJSON() ([]byte, error) { - switch r.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", r.typeName, r) - case "string": - return json.Marshal(r.String) - case "ticketActionsEnum": + if r.typ == "TicketActionsEnum" || r.TicketActionsEnum != "" { return json.Marshal(r.TicketActionsEnum) } + if r.typ == "String" || r.String != "" { + return json.Marshal(r.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", r) } type RoleTicketActionsItemVisitor interface { - VisitString(string) error VisitTicketActionsEnum(TicketActionsEnum) error + VisitString(string) error } func (r *RoleTicketActionsItem) Accept(visitor RoleTicketActionsItemVisitor) error { - switch r.typeName { - default: - return fmt.Errorf("invalid type %s in %T", r.typeName, r) - case "string": - return visitor.VisitString(r.String) - case "ticketActionsEnum": + if r.typ == "TicketActionsEnum" || r.TicketActionsEnum != "" { return visitor.VisitTicketActionsEnum(r.TicketActionsEnum) } + if r.typ == "String" || r.String != "" { + return visitor.VisitString(r.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", r) } -// - `IN_NEXT_SYNC` - IN_NEXT_SYNC -// - `IN_LAST_SYNC` - IN_LAST_SYNC +// * `IN_NEXT_SYNC` - IN_NEXT_SYNC +// * `IN_LAST_SYNC` - IN_LAST_SYNC type SelectiveSyncConfigurationsUsageEnum string const ( @@ -5312,1610 +3478,1579 @@ func (s SelectiveSyncConfigurationsUsageEnum) Ptr() *SelectiveSyncConfigurations return &s } -// # The SyncStatus Object -// -// ### Description -// -// # The `SyncStatus` object is used to represent the syncing state of an account -// -// ### Usage Example -// -// View the `SyncStatus` for an account to see how recently its models were synced. -type SyncStatus struct { - ModelName string `json:"model_name"` - ModelId string `json:"model_id"` - LastSyncStart *time.Time `json:"last_sync_start,omitempty"` - NextSyncStart *time.Time `json:"next_sync_start,omitempty"` - Status SyncStatusStatusEnum `json:"status,omitempty"` - IsInitialSync bool `json:"is_initial_sync"` - SelectiveSyncConfigurationsUsage *SelectiveSyncConfigurationsUsageEnum `json:"selective_sync_configurations_usage,omitempty"` - - _rawJSON json.RawMessage -} - -func (s *SyncStatus) UnmarshalJSON(data []byte) error { - type unmarshaler SyncStatus - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *s = SyncStatus(value) - s._rawJSON = json.RawMessage(data) - return nil -} - -func (s *SyncStatus) String() string { - if len(s._rawJSON) > 0 { - if value, err := core.StringifyJSON(s._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(s); err == nil { - return value - } - return fmt.Sprintf("%#v", s) -} - -// - `SYNCING` - SYNCING -// - `DONE` - DONE -// - `FAILED` - FAILED -// - `DISABLED` - DISABLED -// - `PAUSED` - PAUSED -// - `PARTIALLY_SYNCED` - PARTIALLY_SYNCED -type SyncStatusStatusEnum string +// * `SYNCING` - SYNCING +// * `DONE` - DONE +// * `FAILED` - FAILED +// * `DISABLED` - DISABLED +// * `PAUSED` - PAUSED +// * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED +type StatusFd5Enum string const ( - SyncStatusStatusEnumSyncing SyncStatusStatusEnum = "SYNCING" - SyncStatusStatusEnumDone SyncStatusStatusEnum = "DONE" - SyncStatusStatusEnumFailed SyncStatusStatusEnum = "FAILED" - SyncStatusStatusEnumDisabled SyncStatusStatusEnum = "DISABLED" - SyncStatusStatusEnumPaused SyncStatusStatusEnum = "PAUSED" - SyncStatusStatusEnumPartiallySynced SyncStatusStatusEnum = "PARTIALLY_SYNCED" + StatusFd5EnumSyncing StatusFd5Enum = "SYNCING" + StatusFd5EnumDone StatusFd5Enum = "DONE" + StatusFd5EnumFailed StatusFd5Enum = "FAILED" + StatusFd5EnumDisabled StatusFd5Enum = "DISABLED" + StatusFd5EnumPaused StatusFd5Enum = "PAUSED" + StatusFd5EnumPartiallySynced StatusFd5Enum = "PARTIALLY_SYNCED" ) -func NewSyncStatusStatusEnumFromString(s string) (SyncStatusStatusEnum, error) { +func NewStatusFd5EnumFromString(s string) (StatusFd5Enum, error) { switch s { case "SYNCING": - return SyncStatusStatusEnumSyncing, nil + return StatusFd5EnumSyncing, nil case "DONE": - return SyncStatusStatusEnumDone, nil + return StatusFd5EnumDone, nil case "FAILED": - return SyncStatusStatusEnumFailed, nil + return StatusFd5EnumFailed, nil case "DISABLED": - return SyncStatusStatusEnumDisabled, nil + return StatusFd5EnumDisabled, nil case "PAUSED": - return SyncStatusStatusEnumPaused, nil + return StatusFd5EnumPaused, nil case "PARTIALLY_SYNCED": - return SyncStatusStatusEnumPartiallySynced, nil + return StatusFd5EnumPartiallySynced, nil } - var t SyncStatusStatusEnum + var t StatusFd5Enum return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (s SyncStatusStatusEnum) Ptr() *SyncStatusStatusEnum { +func (s StatusFd5Enum) Ptr() *StatusFd5Enum { return &s } -// # The Tag Object -// +// # The SyncStatus Object // ### Description -// -// The `Tag` object is used to represent a tag or label for a ticket. +// The `SyncStatus` object is used to represent the syncing state of an account // // ### Usage Example -// -// TODO -type Tag struct { - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - Id *string `json:"id,omitempty"` - // The tag's name. - Name *string `json:"name,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` +// View the `SyncStatus` for an account to see how recently its models were synced. +type SyncStatus struct { + ModelName string `json:"model_name" url:"model_name"` + ModelId string `json:"model_id" url:"model_id"` + LastSyncStart *time.Time `json:"last_sync_start,omitempty" url:"last_sync_start,omitempty"` + NextSyncStart *time.Time `json:"next_sync_start,omitempty" url:"next_sync_start,omitempty"` + LastSyncResult *SyncStatusLastSyncResult `json:"last_sync_result,omitempty" url:"last_sync_result,omitempty"` + LastSyncFinished *time.Time `json:"last_sync_finished,omitempty" url:"last_sync_finished,omitempty"` + Status *SyncStatusStatus `json:"status" url:"status"` + IsInitialSync bool `json:"is_initial_sync" url:"is_initial_sync"` + SelectiveSyncConfigurationsUsage *SelectiveSyncConfigurationsUsageEnum `json:"selective_sync_configurations_usage,omitempty" url:"selective_sync_configurations_usage,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (t *Tag) UnmarshalJSON(data []byte) error { - type unmarshaler Tag - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (s *SyncStatus) GetModelName() string { + if s == nil { + return "" } - *t = Tag(value) - t._rawJSON = json.RawMessage(data) - return nil + return s.ModelName } -func (t *Tag) String() string { - if len(t._rawJSON) > 0 { - if value, err := core.StringifyJSON(t._rawJSON); err == nil { - return value - } +func (s *SyncStatus) GetModelId() string { + if s == nil { + return "" } - if value, err := core.StringifyJSON(t); err == nil { - return value + return s.ModelId +} + +func (s *SyncStatus) GetLastSyncStart() *time.Time { + if s == nil { + return nil } - return fmt.Sprintf("%#v", t) + return s.LastSyncStart } -// # The Team Object -// -// ### Description -// -// The `Team` object is used to represent one or more `Users` within the company receiving the ticket. -// -// ### Usage Example -// -// TODO -type Team struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The team's name. - Name *string `json:"name,omitempty"` - // The team's description. - Description *string `json:"description,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` +func (s *SyncStatus) GetNextSyncStart() *time.Time { + if s == nil { + return nil + } + return s.NextSyncStart +} - _rawJSON json.RawMessage +func (s *SyncStatus) GetLastSyncResult() *SyncStatusLastSyncResult { + if s == nil { + return nil + } + return s.LastSyncResult } -func (t *Team) UnmarshalJSON(data []byte) error { - type unmarshaler Team - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (s *SyncStatus) GetLastSyncFinished() *time.Time { + if s == nil { + return nil } - *t = Team(value) - t._rawJSON = json.RawMessage(data) - return nil + return s.LastSyncFinished } -func (t *Team) String() string { - if len(t._rawJSON) > 0 { - if value, err := core.StringifyJSON(t._rawJSON); err == nil { - return value - } +func (s *SyncStatus) GetStatus() *SyncStatusStatus { + if s == nil { + return nil } - if value, err := core.StringifyJSON(t); err == nil { - return value + return s.Status +} + +func (s *SyncStatus) GetIsInitialSync() bool { + if s == nil { + return false } - return fmt.Sprintf("%#v", t) + return s.IsInitialSync } -// # The Ticket Object -// -// ### Description -// -// The `Ticket` object is used to represent a ticket, issue, task or case. -// -// ### Usage Example -// -// TODO -type Ticket struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The ticket's name. - Name *string `json:"name,omitempty"` - // The individual `Users` who are assigned to this ticket. This does not include `Users` who just have view access to this ticket. - Assignees []*TicketAssigneesItem `json:"assignees,omitempty"` - // The `Teams` that are assigned to this ticket. This does not include `Teams` who just have view access to this ticket. - AssignedTeams []*TicketAssignedTeamsItem `json:"assigned_teams,omitempty"` - // The user who created this ticket. - Creator *TicketCreator `json:"creator,omitempty"` - // The ticket's due date. - DueDate *time.Time `json:"due_date,omitempty"` - // The current status of the ticket. - // - // - `OPEN` - OPEN - // - `CLOSED` - CLOSED - // - `IN_PROGRESS` - IN_PROGRESS - // - `ON_HOLD` - ON_HOLD - Status *TicketStatus `json:"status,omitempty"` - // The ticket’s description. HTML version of description is mapped if supported by the third-party platform. - Description *string `json:"description,omitempty"` - // The `Collections` that this `Ticket` is included in. - Collections []*TicketCollectionsItem `json:"collections,omitempty"` - // The sub category of the ticket within the 3rd party system. Examples include incident, task, subtask or to-do. - TicketType *string `json:"ticket_type,omitempty"` - // The account associated with the ticket. - Account *TicketAccount `json:"account,omitempty"` - // The contact associated with the ticket. - Contact *TicketContact `json:"contact,omitempty"` - // The ticket's parent ticket. - ParentTicket *TicketParentTicket `json:"parent_ticket,omitempty"` - Attachments []*TicketAttachmentsItem `json:"attachments,omitempty"` - Tags []*string `json:"tags,omitempty"` - Roles []*string `json:"roles,omitempty"` - // When the third party's ticket was created. - RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty"` - // When the third party's ticket was updated. - RemoteUpdatedAt *time.Time `json:"remote_updated_at,omitempty"` - // When the ticket was completed. - CompletedAt *time.Time `json:"completed_at,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - // The 3rd party url of the Ticket. - TicketUrl *string `json:"ticket_url,omitempty"` - // The priority or urgency of the Ticket. - // - // - `URGENT` - URGENT - // - `HIGH` - HIGH - // - `NORMAL` - NORMAL - // - `LOW` - LOW - Priority *TicketPriority `json:"priority,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` - RemoteFields []*RemoteField `json:"remote_fields,omitempty"` +func (s *SyncStatus) GetSelectiveSyncConfigurationsUsage() *SelectiveSyncConfigurationsUsageEnum { + if s == nil { + return nil + } + return s.SelectiveSyncConfigurationsUsage +} - _rawJSON json.RawMessage +func (s *SyncStatus) GetExtraProperties() map[string]interface{} { + return s.extraProperties } -func (t *Ticket) UnmarshalJSON(data []byte) error { - type unmarshaler Ticket - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { +func (s *SyncStatus) UnmarshalJSON(data []byte) error { + type embed SyncStatus + var unmarshaler = struct { + embed + LastSyncStart *internal.DateTime `json:"last_sync_start,omitempty"` + NextSyncStart *internal.DateTime `json:"next_sync_start,omitempty"` + LastSyncFinished *internal.DateTime `json:"last_sync_finished,omitempty"` + }{ + embed: embed(*s), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *s = SyncStatus(unmarshaler.embed) + s.LastSyncStart = unmarshaler.LastSyncStart.TimePtr() + s.NextSyncStart = unmarshaler.NextSyncStart.TimePtr() + s.LastSyncFinished = unmarshaler.LastSyncFinished.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *s) + if err != nil { return err } - *t = Ticket(value) - t._rawJSON = json.RawMessage(data) + s.extraProperties = extraProperties + s.rawJSON = json.RawMessage(data) return nil } -func (t *Ticket) String() string { - if len(t._rawJSON) > 0 { - if value, err := core.StringifyJSON(t._rawJSON); err == nil { +func (s *SyncStatus) MarshalJSON() ([]byte, error) { + type embed SyncStatus + var marshaler = struct { + embed + LastSyncStart *internal.DateTime `json:"last_sync_start,omitempty"` + NextSyncStart *internal.DateTime `json:"next_sync_start,omitempty"` + LastSyncFinished *internal.DateTime `json:"last_sync_finished,omitempty"` + }{ + embed: embed(*s), + LastSyncStart: internal.NewOptionalDateTime(s.LastSyncStart), + NextSyncStart: internal.NewOptionalDateTime(s.NextSyncStart), + LastSyncFinished: internal.NewOptionalDateTime(s.LastSyncFinished), + } + return json.Marshal(marshaler) +} + +func (s *SyncStatus) String() string { + if len(s.rawJSON) > 0 { + if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(t); err == nil { + if value, err := internal.StringifyJSON(s); err == nil { return value } - return fmt.Sprintf("%#v", t) -} - -// - `ALL` - ALL -// - `ASSIGNED_ONLY` - ASSIGNED_ONLY -// - `TEAM_ONLY` - TEAM_ONLY -type TicketAccessEnum string - -const ( - TicketAccessEnumAll TicketAccessEnum = "ALL" - TicketAccessEnumAssignedOnly TicketAccessEnum = "ASSIGNED_ONLY" - TicketAccessEnumTeamOnly TicketAccessEnum = "TEAM_ONLY" -) - -func NewTicketAccessEnumFromString(s string) (TicketAccessEnum, error) { - switch s { - case "ALL": - return TicketAccessEnumAll, nil - case "ASSIGNED_ONLY": - return TicketAccessEnumAssignedOnly, nil - case "TEAM_ONLY": - return TicketAccessEnumTeamOnly, nil - } - var t TicketAccessEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) + return fmt.Sprintf("%#v", s) } -func (t TicketAccessEnum) Ptr() *TicketAccessEnum { - return &t -} +type SyncStatusLastSyncResult struct { + LastSyncResultEnum LastSyncResultEnum + String string -// The account associated with the ticket. -type TicketAccount struct { - typeName string - String string - Account *Account + typ string } -func NewTicketAccountFromString(value string) *TicketAccount { - return &TicketAccount{typeName: "string", String: value} +func (s *SyncStatusLastSyncResult) GetLastSyncResultEnum() LastSyncResultEnum { + if s == nil { + return "" + } + return s.LastSyncResultEnum } -func NewTicketAccountFromAccount(value *Account) *TicketAccount { - return &TicketAccount{typeName: "account", Account: value} +func (s *SyncStatusLastSyncResult) GetString() string { + if s == nil { + return "" + } + return s.String } -func (t *TicketAccount) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" - t.String = valueString +func (s *SyncStatusLastSyncResult) UnmarshalJSON(data []byte) error { + var valueLastSyncResultEnum LastSyncResultEnum + if err := json.Unmarshal(data, &valueLastSyncResultEnum); err == nil { + s.typ = "LastSyncResultEnum" + s.LastSyncResultEnum = valueLastSyncResultEnum return nil } - valueAccount := new(Account) - if err := json.Unmarshal(data, &valueAccount); err == nil { - t.typeName = "account" - t.Account = valueAccount + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + s.typ = "String" + s.String = valueString return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, t) + return fmt.Errorf("%s cannot be deserialized as a %T", data, s) } -func (t TicketAccount) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return json.Marshal(t.String) - case "account": - return json.Marshal(t.Account) +func (s SyncStatusLastSyncResult) MarshalJSON() ([]byte, error) { + if s.typ == "LastSyncResultEnum" || s.LastSyncResultEnum != "" { + return json.Marshal(s.LastSyncResultEnum) + } + if s.typ == "String" || s.String != "" { + return json.Marshal(s.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", s) } -type TicketAccountVisitor interface { +type SyncStatusLastSyncResultVisitor interface { + VisitLastSyncResultEnum(LastSyncResultEnum) error VisitString(string) error - VisitAccount(*Account) error } -func (t *TicketAccount) Accept(visitor TicketAccountVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return visitor.VisitString(t.String) - case "account": - return visitor.VisitAccount(t.Account) +func (s *SyncStatusLastSyncResult) Accept(visitor SyncStatusLastSyncResultVisitor) error { + if s.typ == "LastSyncResultEnum" || s.LastSyncResultEnum != "" { + return visitor.VisitLastSyncResultEnum(s.LastSyncResultEnum) } + if s.typ == "String" || s.String != "" { + return visitor.VisitString(s.String) + } + return fmt.Errorf("type %T does not include a non-empty union type", s) } -// - `VIEW` - VIEW -// - `CREATE` - CREATE -// - `EDIT` - EDIT -// - `DELETE` - DELETE -// - `CLOSE` - CLOSE -// - `ASSIGN` - ASSIGN -type TicketActionsEnum string +type SyncStatusStatus struct { + StatusFd5Enum StatusFd5Enum + String string -const ( - TicketActionsEnumView TicketActionsEnum = "VIEW" - TicketActionsEnumCreate TicketActionsEnum = "CREATE" - TicketActionsEnumEdit TicketActionsEnum = "EDIT" - TicketActionsEnumDelete TicketActionsEnum = "DELETE" - TicketActionsEnumClose TicketActionsEnum = "CLOSE" - TicketActionsEnumAssign TicketActionsEnum = "ASSIGN" -) + typ string +} -func NewTicketActionsEnumFromString(s string) (TicketActionsEnum, error) { - switch s { - case "VIEW": - return TicketActionsEnumView, nil - case "CREATE": - return TicketActionsEnumCreate, nil - case "EDIT": - return TicketActionsEnumEdit, nil - case "DELETE": - return TicketActionsEnumDelete, nil - case "CLOSE": - return TicketActionsEnumClose, nil - case "ASSIGN": - return TicketActionsEnumAssign, nil +func (s *SyncStatusStatus) GetStatusFd5Enum() StatusFd5Enum { + if s == nil { + return "" } - var t TicketActionsEnum - return "", fmt.Errorf("%s is not a valid %T", s, t) + return s.StatusFd5Enum } -func (t TicketActionsEnum) Ptr() *TicketActionsEnum { - return &t +func (s *SyncStatusStatus) GetString() string { + if s == nil { + return "" + } + return s.String } -type TicketAssignedTeamsItem struct { - typeName string - String string - Team *Team +func (s *SyncStatusStatus) UnmarshalJSON(data []byte) error { + var valueStatusFd5Enum StatusFd5Enum + if err := json.Unmarshal(data, &valueStatusFd5Enum); err == nil { + s.typ = "StatusFd5Enum" + s.StatusFd5Enum = valueStatusFd5Enum + return nil + } + var valueString string + if err := json.Unmarshal(data, &valueString); err == nil { + s.typ = "String" + s.String = valueString + return nil + } + return fmt.Errorf("%s cannot be deserialized as a %T", data, s) } -func NewTicketAssignedTeamsItemFromString(value string) *TicketAssignedTeamsItem { - return &TicketAssignedTeamsItem{typeName: "string", String: value} +func (s SyncStatusStatus) MarshalJSON() ([]byte, error) { + if s.typ == "StatusFd5Enum" || s.StatusFd5Enum != "" { + return json.Marshal(s.StatusFd5Enum) + } + if s.typ == "String" || s.String != "" { + return json.Marshal(s.String) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", s) } -func NewTicketAssignedTeamsItemFromTeam(value *Team) *TicketAssignedTeamsItem { - return &TicketAssignedTeamsItem{typeName: "team", Team: value} +type SyncStatusStatusVisitor interface { + VisitStatusFd5Enum(StatusFd5Enum) error + VisitString(string) error } -func (t *TicketAssignedTeamsItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" - t.String = valueString - return nil +func (s *SyncStatusStatus) Accept(visitor SyncStatusStatusVisitor) error { + if s.typ == "StatusFd5Enum" || s.StatusFd5Enum != "" { + return visitor.VisitStatusFd5Enum(s.StatusFd5Enum) } - valueTeam := new(Team) - if err := json.Unmarshal(data, &valueTeam); err == nil { - t.typeName = "team" - t.Team = valueTeam - return nil + if s.typ == "String" || s.String != "" { + return visitor.VisitString(s.String) } - return fmt.Errorf("%s cannot be deserialized as a %T", data, t) + return fmt.Errorf("type %T does not include a non-empty union type", s) +} + +// # The Team Object +// ### Description +// The `Team` object is used to represent one or more `Users` within the company receiving the ticket. +// +// ### Usage Example +// TODO +type Team struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The team's name. + Name *string `json:"name,omitempty" url:"name,omitempty"` + // The team's description. + Description *string `json:"description,omitempty" url:"description,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (t TicketAssignedTeamsItem) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return json.Marshal(t.String) - case "team": - return json.Marshal(t.Team) +func (t *Team) GetId() *string { + if t == nil { + return nil } + return t.Id } -type TicketAssignedTeamsItemVisitor interface { - VisitString(string) error - VisitTeam(*Team) error +func (t *Team) GetRemoteId() *string { + if t == nil { + return nil + } + return t.RemoteId } -func (t *TicketAssignedTeamsItem) Accept(visitor TicketAssignedTeamsItemVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return visitor.VisitString(t.String) - case "team": - return visitor.VisitTeam(t.Team) +func (t *Team) GetCreatedAt() *time.Time { + if t == nil { + return nil } + return t.CreatedAt } -type TicketAssigneesItem struct { - typeName string - String string - User *User +func (t *Team) GetModifiedAt() *time.Time { + if t == nil { + return nil + } + return t.ModifiedAt } -func NewTicketAssigneesItemFromString(value string) *TicketAssigneesItem { - return &TicketAssigneesItem{typeName: "string", String: value} +func (t *Team) GetName() *string { + if t == nil { + return nil + } + return t.Name } -func NewTicketAssigneesItemFromUser(value *User) *TicketAssigneesItem { - return &TicketAssigneesItem{typeName: "user", User: value} +func (t *Team) GetDescription() *string { + if t == nil { + return nil + } + return t.Description } -func (t *TicketAssigneesItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" - t.String = valueString +func (t *Team) GetRemoteWasDeleted() *bool { + if t == nil { return nil } - valueUser := new(User) - if err := json.Unmarshal(data, &valueUser); err == nil { - t.typeName = "user" - t.User = valueUser + return t.RemoteWasDeleted +} + +func (t *Team) GetFieldMappings() map[string]interface{} { + if t == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, t) + return t.FieldMappings } -func (t TicketAssigneesItem) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return json.Marshal(t.String) - case "user": - return json.Marshal(t.User) +func (t *Team) GetRemoteData() []*RemoteData { + if t == nil { + return nil } + return t.RemoteData } -type TicketAssigneesItemVisitor interface { - VisitString(string) error - VisitUser(*User) error +func (t *Team) GetExtraProperties() map[string]interface{} { + return t.extraProperties } -func (t *TicketAssigneesItem) Accept(visitor TicketAssigneesItemVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return visitor.VisitString(t.String) - case "user": - return visitor.VisitUser(t.User) +func (t *Team) UnmarshalJSON(data []byte) error { + type embed Team + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*t), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *t = Team(unmarshaler.embed) + t.CreatedAt = unmarshaler.CreatedAt.TimePtr() + t.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *t) + if err != nil { + return err } + t.extraProperties = extraProperties + t.rawJSON = json.RawMessage(data) + return nil } -type TicketAttachmentsItem struct { - typeName string - String string - Attachment *Attachment +func (t *Team) MarshalJSON() ([]byte, error) { + type embed Team + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*t), + CreatedAt: internal.NewOptionalDateTime(t.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(t.ModifiedAt), + } + return json.Marshal(marshaler) } -func NewTicketAttachmentsItemFromString(value string) *TicketAttachmentsItem { - return &TicketAttachmentsItem{typeName: "string", String: value} +func (t *Team) String() string { + if len(t.rawJSON) > 0 { + if value, err := internal.StringifyJSON(t.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(t); err == nil { + return value + } + return fmt.Sprintf("%#v", t) } -func NewTicketAttachmentsItemFromAttachment(value *Attachment) *TicketAttachmentsItem { - return &TicketAttachmentsItem{typeName: "attachment", Attachment: value} +// # The Ticket Object +// ### Description +// The `Ticket` object is used to represent a ticket, issue, task or case. +// ### Usage Example +// TODO +type Ticket struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The ticket's name. + Name *string `json:"name,omitempty" url:"name,omitempty"` + // The individual `Users` who are assigned to this ticket. This does not include `Users` who just have view access to this ticket. To fetch all `Users` and `Teams` that can access the ticket, use the `GET /tickets/{ticket_id}/viewers` [endpoint](https://docs.merge.dev/ticketing/tickets/#tickets_viewers_list). + Assignees []*TicketAssigneesItem `json:"assignees,omitempty" url:"assignees,omitempty"` + // The `Teams` that are assigned to this ticket. This does not include `Teams` who just have view access to this ticket. To fetch all `Users` and `Teams` that can access this ticket, use the `GET /tickets/{ticket_id}/viewers` [endpoint](https://docs.merge.dev/ticketing/tickets/#tickets_viewers_list). + AssignedTeams []*TicketAssignedTeamsItem `json:"assigned_teams,omitempty" url:"assigned_teams,omitempty"` + // The user who created this ticket. + Creator *TicketCreator `json:"creator,omitempty" url:"creator,omitempty"` + // The ticket's due date. + DueDate *time.Time `json:"due_date,omitempty" url:"due_date,omitempty"` + // The current status of the ticket. + // + // * `OPEN` - OPEN + // * `CLOSED` - CLOSED + // * `IN_PROGRESS` - IN_PROGRESS + // * `ON_HOLD` - ON_HOLD + Status *TicketStatus `json:"status,omitempty" url:"status,omitempty"` + // The ticket’s description. HTML version of description is mapped if supported by the third-party platform. + Description *string `json:"description,omitempty" url:"description,omitempty"` + // The `Collections` that this `Ticket` is included in. + Collections []*TicketCollectionsItem `json:"collections,omitempty" url:"collections,omitempty"` + // The sub category of the ticket within the 3rd party system. Examples include incident, task, subtask or to-do. + TicketType *string `json:"ticket_type,omitempty" url:"ticket_type,omitempty"` + // The account associated with the ticket. + Account *TicketAccount `json:"account,omitempty" url:"account,omitempty"` + // The contact associated with the ticket. + Contact *TicketContact `json:"contact,omitempty" url:"contact,omitempty"` + // The ticket's parent ticket. + ParentTicket *TicketParentTicket `json:"parent_ticket,omitempty" url:"parent_ticket,omitempty"` + Attachments []*TicketAttachmentsItem `json:"attachments,omitempty" url:"attachments,omitempty"` + // The description of who is able to access a given ticket, or where access is inherited from. + // + // * `COMPANY` - COMPANY + // * `PUBLIC` - PUBLIC + // * `PRIVATE` - PRIVATE + // * `COLLECTION` - COLLECTION + AccessLevel *TicketAccessLevel `json:"access_level,omitempty" url:"access_level,omitempty"` + Tags []*string `json:"tags,omitempty" url:"tags,omitempty"` + Roles []*string `json:"roles,omitempty" url:"roles,omitempty"` + // The 3rd party url of the Ticket. + TicketUrl *string `json:"ticket_url,omitempty" url:"ticket_url,omitempty"` + // The priority or urgency of the Ticket. + // + // * `URGENT` - URGENT + // * `HIGH` - HIGH + // * `NORMAL` - NORMAL + // * `LOW` - LOW + Priority *TicketPriority `json:"priority,omitempty" url:"priority,omitempty"` + // When the third party's ticket was created. + RemoteCreatedAt *time.Time `json:"remote_created_at,omitempty" url:"remote_created_at,omitempty"` + // When the third party's ticket was updated. + RemoteUpdatedAt *time.Time `json:"remote_updated_at,omitempty" url:"remote_updated_at,omitempty"` + // When the ticket was completed. + CompletedAt *time.Time `json:"completed_at,omitempty" url:"completed_at,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` + RemoteFields []*RemoteField `json:"remote_fields,omitempty" url:"remote_fields,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (t *TicketAttachmentsItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" - t.String = valueString +func (t *Ticket) GetId() *string { + if t == nil { return nil } - valueAttachment := new(Attachment) - if err := json.Unmarshal(data, &valueAttachment); err == nil { - t.typeName = "attachment" - t.Attachment = valueAttachment + return t.Id +} + +func (t *Ticket) GetRemoteId() *string { + if t == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, t) + return t.RemoteId } -func (t TicketAttachmentsItem) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return json.Marshal(t.String) - case "attachment": - return json.Marshal(t.Attachment) +func (t *Ticket) GetCreatedAt() *time.Time { + if t == nil { + return nil } + return t.CreatedAt } -type TicketAttachmentsItemVisitor interface { - VisitString(string) error - VisitAttachment(*Attachment) error +func (t *Ticket) GetModifiedAt() *time.Time { + if t == nil { + return nil + } + return t.ModifiedAt } -func (t *TicketAttachmentsItem) Accept(visitor TicketAttachmentsItemVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return visitor.VisitString(t.String) - case "attachment": - return visitor.VisitAttachment(t.Attachment) +func (t *Ticket) GetName() *string { + if t == nil { + return nil } + return t.Name } -type TicketCollectionsItem struct { - typeName string - String string - Collection *Collection +func (t *Ticket) GetAssignees() []*TicketAssigneesItem { + if t == nil { + return nil + } + return t.Assignees } -func NewTicketCollectionsItemFromString(value string) *TicketCollectionsItem { - return &TicketCollectionsItem{typeName: "string", String: value} +func (t *Ticket) GetAssignedTeams() []*TicketAssignedTeamsItem { + if t == nil { + return nil + } + return t.AssignedTeams } -func NewTicketCollectionsItemFromCollection(value *Collection) *TicketCollectionsItem { - return &TicketCollectionsItem{typeName: "collection", Collection: value} +func (t *Ticket) GetCreator() *TicketCreator { + if t == nil { + return nil + } + return t.Creator } -func (t *TicketCollectionsItem) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" - t.String = valueString +func (t *Ticket) GetDueDate() *time.Time { + if t == nil { return nil } - valueCollection := new(Collection) - if err := json.Unmarshal(data, &valueCollection); err == nil { - t.typeName = "collection" - t.Collection = valueCollection + return t.DueDate +} + +func (t *Ticket) GetStatus() *TicketStatus { + if t == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, t) + return t.Status } -func (t TicketCollectionsItem) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return json.Marshal(t.String) - case "collection": - return json.Marshal(t.Collection) +func (t *Ticket) GetDescription() *string { + if t == nil { + return nil } + return t.Description } -type TicketCollectionsItemVisitor interface { - VisitString(string) error - VisitCollection(*Collection) error +func (t *Ticket) GetCollections() []*TicketCollectionsItem { + if t == nil { + return nil + } + return t.Collections } -func (t *TicketCollectionsItem) Accept(visitor TicketCollectionsItemVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return visitor.VisitString(t.String) - case "collection": - return visitor.VisitCollection(t.Collection) +func (t *Ticket) GetTicketType() *string { + if t == nil { + return nil } + return t.TicketType } -// The contact associated with the ticket. -type TicketContact struct { - typeName string - String string - Contact *Contact +func (t *Ticket) GetAccount() *TicketAccount { + if t == nil { + return nil + } + return t.Account } -func NewTicketContactFromString(value string) *TicketContact { - return &TicketContact{typeName: "string", String: value} +func (t *Ticket) GetContact() *TicketContact { + if t == nil { + return nil + } + return t.Contact } -func NewTicketContactFromContact(value *Contact) *TicketContact { - return &TicketContact{typeName: "contact", Contact: value} +func (t *Ticket) GetParentTicket() *TicketParentTicket { + if t == nil { + return nil + } + return t.ParentTicket } -func (t *TicketContact) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" - t.String = valueString +func (t *Ticket) GetAttachments() []*TicketAttachmentsItem { + if t == nil { return nil } - valueContact := new(Contact) - if err := json.Unmarshal(data, &valueContact); err == nil { - t.typeName = "contact" - t.Contact = valueContact + return t.Attachments +} + +func (t *Ticket) GetAccessLevel() *TicketAccessLevel { + if t == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, t) + return t.AccessLevel } -func (t TicketContact) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return json.Marshal(t.String) - case "contact": - return json.Marshal(t.Contact) +func (t *Ticket) GetTags() []*string { + if t == nil { + return nil } + return t.Tags } -type TicketContactVisitor interface { - VisitString(string) error - VisitContact(*Contact) error +func (t *Ticket) GetRoles() []*string { + if t == nil { + return nil + } + return t.Roles } -func (t *TicketContact) Accept(visitor TicketContactVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return visitor.VisitString(t.String) - case "contact": - return visitor.VisitContact(t.Contact) +func (t *Ticket) GetTicketUrl() *string { + if t == nil { + return nil } + return t.TicketUrl } -// The user who created this ticket. -type TicketCreator struct { - typeName string - String string - User *User +func (t *Ticket) GetPriority() *TicketPriority { + if t == nil { + return nil + } + return t.Priority } -func NewTicketCreatorFromString(value string) *TicketCreator { - return &TicketCreator{typeName: "string", String: value} +func (t *Ticket) GetRemoteCreatedAt() *time.Time { + if t == nil { + return nil + } + return t.RemoteCreatedAt } -func NewTicketCreatorFromUser(value *User) *TicketCreator { - return &TicketCreator{typeName: "user", User: value} +func (t *Ticket) GetRemoteUpdatedAt() *time.Time { + if t == nil { + return nil + } + return t.RemoteUpdatedAt } -func (t *TicketCreator) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" - t.String = valueString +func (t *Ticket) GetCompletedAt() *time.Time { + if t == nil { return nil } - valueUser := new(User) - if err := json.Unmarshal(data, &valueUser); err == nil { - t.typeName = "user" - t.User = valueUser + return t.CompletedAt +} + +func (t *Ticket) GetRemoteWasDeleted() *bool { + if t == nil { return nil } - return fmt.Errorf("%s cannot be deserialized as a %T", data, t) + return t.RemoteWasDeleted } -func (t TicketCreator) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return json.Marshal(t.String) - case "user": - return json.Marshal(t.User) +func (t *Ticket) GetFieldMappings() map[string]interface{} { + if t == nil { + return nil } + return t.FieldMappings } -type TicketCreatorVisitor interface { - VisitString(string) error - VisitUser(*User) error +func (t *Ticket) GetRemoteData() []*RemoteData { + if t == nil { + return nil + } + return t.RemoteData } -func (t *TicketCreator) Accept(visitor TicketCreatorVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return visitor.VisitString(t.String) - case "user": - return visitor.VisitUser(t.User) +func (t *Ticket) GetRemoteFields() []*RemoteField { + if t == nil { + return nil } + return t.RemoteFields } -// The ticket's parent ticket. -type TicketParentTicket struct { - typeName string - String string - Ticket *Ticket +func (t *Ticket) GetExtraProperties() map[string]interface{} { + return t.extraProperties } -func NewTicketParentTicketFromString(value string) *TicketParentTicket { - return &TicketParentTicket{typeName: "string", String: value} +func (t *Ticket) UnmarshalJSON(data []byte) error { + type embed Ticket + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + DueDate *internal.DateTime `json:"due_date,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + RemoteUpdatedAt *internal.DateTime `json:"remote_updated_at,omitempty"` + CompletedAt *internal.DateTime `json:"completed_at,omitempty"` + }{ + embed: embed(*t), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *t = Ticket(unmarshaler.embed) + t.CreatedAt = unmarshaler.CreatedAt.TimePtr() + t.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + t.DueDate = unmarshaler.DueDate.TimePtr() + t.RemoteCreatedAt = unmarshaler.RemoteCreatedAt.TimePtr() + t.RemoteUpdatedAt = unmarshaler.RemoteUpdatedAt.TimePtr() + t.CompletedAt = unmarshaler.CompletedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *t) + if err != nil { + return err + } + t.extraProperties = extraProperties + t.rawJSON = json.RawMessage(data) + return nil } -func NewTicketParentTicketFromTicket(value *Ticket) *TicketParentTicket { - return &TicketParentTicket{typeName: "ticket", Ticket: value} +func (t *Ticket) MarshalJSON() ([]byte, error) { + type embed Ticket + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + DueDate *internal.DateTime `json:"due_date,omitempty"` + RemoteCreatedAt *internal.DateTime `json:"remote_created_at,omitempty"` + RemoteUpdatedAt *internal.DateTime `json:"remote_updated_at,omitempty"` + CompletedAt *internal.DateTime `json:"completed_at,omitempty"` + }{ + embed: embed(*t), + CreatedAt: internal.NewOptionalDateTime(t.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(t.ModifiedAt), + DueDate: internal.NewOptionalDateTime(t.DueDate), + RemoteCreatedAt: internal.NewOptionalDateTime(t.RemoteCreatedAt), + RemoteUpdatedAt: internal.NewOptionalDateTime(t.RemoteUpdatedAt), + CompletedAt: internal.NewOptionalDateTime(t.CompletedAt), + } + return json.Marshal(marshaler) } -func (t *TicketParentTicket) UnmarshalJSON(data []byte) error { - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" - t.String = valueString - return nil +func (t *Ticket) String() string { + if len(t.rawJSON) > 0 { + if value, err := internal.StringifyJSON(t.rawJSON); err == nil { + return value + } } - valueTicket := new(Ticket) - if err := json.Unmarshal(data, &valueTicket); err == nil { - t.typeName = "ticket" - t.Ticket = valueTicket - return nil + if value, err := internal.StringifyJSON(t); err == nil { + return value } - return fmt.Errorf("%s cannot be deserialized as a %T", data, t) + return fmt.Sprintf("%#v", t) } -func (t TicketParentTicket) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return json.Marshal(t.String) - case "ticket": - return json.Marshal(t.Ticket) +// * `ALL` - ALL +// * `ASSIGNED_ONLY` - ASSIGNED_ONLY +// * `TEAM_ONLY` - TEAM_ONLY +type TicketAccessEnum string + +const ( + TicketAccessEnumAll TicketAccessEnum = "ALL" + TicketAccessEnumAssignedOnly TicketAccessEnum = "ASSIGNED_ONLY" + TicketAccessEnumTeamOnly TicketAccessEnum = "TEAM_ONLY" +) + +func NewTicketAccessEnumFromString(s string) (TicketAccessEnum, error) { + switch s { + case "ALL": + return TicketAccessEnumAll, nil + case "ASSIGNED_ONLY": + return TicketAccessEnumAssignedOnly, nil + case "TEAM_ONLY": + return TicketAccessEnumTeamOnly, nil } + var t TicketAccessEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -type TicketParentTicketVisitor interface { - VisitString(string) error - VisitTicket(*Ticket) error -} - -func (t *TicketParentTicket) Accept(visitor TicketParentTicketVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return visitor.VisitString(t.String) - case "ticket": - return visitor.VisitTicket(t.Ticket) - } +func (t TicketAccessEnum) Ptr() *TicketAccessEnum { + return &t } -// The priority or urgency of the Ticket. +// The description of who is able to access a given ticket, or where access is inherited from. // -// - `URGENT` - URGENT -// - `HIGH` - HIGH -// - `NORMAL` - NORMAL -// - `LOW` - LOW -type TicketPriority struct { - typeName string - PriorityEnum PriorityEnum - String string +// * `COMPANY` - COMPANY +// * `PUBLIC` - PUBLIC +// * `PRIVATE` - PRIVATE +// * `COLLECTION` - COLLECTION +type TicketAccessLevel struct { + TicketAccessLevelEnum TicketAccessLevelEnum + String string + + typ string } -func NewTicketPriorityFromPriorityEnum(value PriorityEnum) *TicketPriority { - return &TicketPriority{typeName: "priorityEnum", PriorityEnum: value} +func (t *TicketAccessLevel) GetTicketAccessLevelEnum() TicketAccessLevelEnum { + if t == nil { + return "" + } + return t.TicketAccessLevelEnum } -func NewTicketPriorityFromString(value string) *TicketPriority { - return &TicketPriority{typeName: "string", String: value} +func (t *TicketAccessLevel) GetString() string { + if t == nil { + return "" + } + return t.String } -func (t *TicketPriority) UnmarshalJSON(data []byte) error { - var valuePriorityEnum PriorityEnum - if err := json.Unmarshal(data, &valuePriorityEnum); err == nil { - t.typeName = "priorityEnum" - t.PriorityEnum = valuePriorityEnum +func (t *TicketAccessLevel) UnmarshalJSON(data []byte) error { + var valueTicketAccessLevelEnum TicketAccessLevelEnum + if err := json.Unmarshal(data, &valueTicketAccessLevelEnum); err == nil { + t.typ = "TicketAccessLevelEnum" + t.TicketAccessLevelEnum = valueTicketAccessLevelEnum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" + t.typ = "String" t.String = valueString return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, t) } -func (t TicketPriority) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "priorityEnum": - return json.Marshal(t.PriorityEnum) - case "string": +func (t TicketAccessLevel) MarshalJSON() ([]byte, error) { + if t.typ == "TicketAccessLevelEnum" || t.TicketAccessLevelEnum != "" { + return json.Marshal(t.TicketAccessLevelEnum) + } + if t.typ == "String" || t.String != "" { return json.Marshal(t.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) } -type TicketPriorityVisitor interface { - VisitPriorityEnum(PriorityEnum) error +type TicketAccessLevelVisitor interface { + VisitTicketAccessLevelEnum(TicketAccessLevelEnum) error VisitString(string) error } -func (t *TicketPriority) Accept(visitor TicketPriorityVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "priorityEnum": - return visitor.VisitPriorityEnum(t.PriorityEnum) - case "string": +func (t *TicketAccessLevel) Accept(visitor TicketAccessLevelVisitor) error { + if t.typ == "TicketAccessLevelEnum" || t.TicketAccessLevelEnum != "" { + return visitor.VisitTicketAccessLevelEnum(t.TicketAccessLevelEnum) + } + if t.typ == "String" || t.String != "" { return visitor.VisitString(t.String) } + return fmt.Errorf("type %T does not include a non-empty union type", t) } -// # The Ticket Object -// -// ### Description -// -// The `Ticket` object is used to represent a ticket, issue, task or case. -// -// ### Usage Example -// -// TODO -type TicketRequest struct { - // The ticket's name. - Name *string `json:"name,omitempty"` - // The individual `Users` who are assigned to this ticket. This does not include `Users` who just have view access to this ticket. - Assignees []*TicketRequestAssigneesItem `json:"assignees,omitempty"` - // The `Teams` that are assigned to this ticket. This does not include `Teams` who just have view access to this ticket. - AssignedTeams []*TicketRequestAssignedTeamsItem `json:"assigned_teams,omitempty"` - // The user who created this ticket. - Creator *TicketRequestCreator `json:"creator,omitempty"` - // The ticket's due date. - DueDate *time.Time `json:"due_date,omitempty"` - // The current status of the ticket. - // - // - `OPEN` - OPEN - // - `CLOSED` - CLOSED - // - `IN_PROGRESS` - IN_PROGRESS - // - `ON_HOLD` - ON_HOLD - Status *TicketRequestStatus `json:"status,omitempty"` - // The ticket’s description. HTML version of description is mapped if supported by the third-party platform. - Description *string `json:"description,omitempty"` - // The `Collections` that this `Ticket` is included in. - Collections []*TicketRequestCollectionsItem `json:"collections,omitempty"` - // The sub category of the ticket within the 3rd party system. Examples include incident, task, subtask or to-do. - TicketType *string `json:"ticket_type,omitempty"` - // The account associated with the ticket. - Account *TicketRequestAccount `json:"account,omitempty"` - // The contact associated with the ticket. - Contact *TicketRequestContact `json:"contact,omitempty"` - // The ticket's parent ticket. - ParentTicket *TicketRequestParentTicket `json:"parent_ticket,omitempty"` - Attachments []*TicketRequestAttachmentsItem `json:"attachments,omitempty"` - Tags []*string `json:"tags,omitempty"` - Roles []*string `json:"roles,omitempty"` - // When the ticket was completed. - CompletedAt *time.Time `json:"completed_at,omitempty"` - // The 3rd party url of the Ticket. - TicketUrl *string `json:"ticket_url,omitempty"` - // The priority or urgency of the Ticket. - // - // - `URGENT` - URGENT - // - `HIGH` - HIGH - // - `NORMAL` - NORMAL - // - `LOW` - LOW - Priority *TicketRequestPriority `json:"priority,omitempty"` - IntegrationParams map[string]interface{} `json:"integration_params,omitempty"` - LinkedAccountParams map[string]interface{} `json:"linked_account_params,omitempty"` - RemoteFields []*RemoteFieldRequest `json:"remote_fields,omitempty"` +// * `COMPANY` - COMPANY +// * `PUBLIC` - PUBLIC +// * `PRIVATE` - PRIVATE +// * `COLLECTION` - COLLECTION +type TicketAccessLevelEnum string - _rawJSON json.RawMessage -} +const ( + TicketAccessLevelEnumCompany TicketAccessLevelEnum = "COMPANY" + TicketAccessLevelEnumPublic TicketAccessLevelEnum = "PUBLIC" + TicketAccessLevelEnumPrivate TicketAccessLevelEnum = "PRIVATE" + TicketAccessLevelEnumCollection TicketAccessLevelEnum = "COLLECTION" +) -func (t *TicketRequest) UnmarshalJSON(data []byte) error { - type unmarshaler TicketRequest - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func NewTicketAccessLevelEnumFromString(s string) (TicketAccessLevelEnum, error) { + switch s { + case "COMPANY": + return TicketAccessLevelEnumCompany, nil + case "PUBLIC": + return TicketAccessLevelEnumPublic, nil + case "PRIVATE": + return TicketAccessLevelEnumPrivate, nil + case "COLLECTION": + return TicketAccessLevelEnumCollection, nil } - *t = TicketRequest(value) - t._rawJSON = json.RawMessage(data) - return nil + var t TicketAccessLevelEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (t *TicketRequest) String() string { - if len(t._rawJSON) > 0 { - if value, err := core.StringifyJSON(t._rawJSON); err == nil { - return value - } - } - if value, err := core.StringifyJSON(t); err == nil { - return value - } - return fmt.Sprintf("%#v", t) +func (t TicketAccessLevelEnum) Ptr() *TicketAccessLevelEnum { + return &t } // The account associated with the ticket. -type TicketRequestAccount struct { - typeName string - String string - Account *Account +type TicketAccount struct { + String string + Account *Account + + typ string } -func NewTicketRequestAccountFromString(value string) *TicketRequestAccount { - return &TicketRequestAccount{typeName: "string", String: value} +func (t *TicketAccount) GetString() string { + if t == nil { + return "" + } + return t.String } -func NewTicketRequestAccountFromAccount(value *Account) *TicketRequestAccount { - return &TicketRequestAccount{typeName: "account", Account: value} +func (t *TicketAccount) GetAccount() *Account { + if t == nil { + return nil + } + return t.Account } -func (t *TicketRequestAccount) UnmarshalJSON(data []byte) error { +func (t *TicketAccount) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" + t.typ = "String" t.String = valueString return nil } valueAccount := new(Account) if err := json.Unmarshal(data, &valueAccount); err == nil { - t.typeName = "account" + t.typ = "Account" t.Account = valueAccount return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, t) } -func (t TicketRequestAccount) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": +func (t TicketAccount) MarshalJSON() ([]byte, error) { + if t.typ == "String" || t.String != "" { return json.Marshal(t.String) - case "account": + } + if t.typ == "Account" || t.Account != nil { return json.Marshal(t.Account) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) } -type TicketRequestAccountVisitor interface { +type TicketAccountVisitor interface { VisitString(string) error VisitAccount(*Account) error } -func (t *TicketRequestAccount) Accept(visitor TicketRequestAccountVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": +func (t *TicketAccount) Accept(visitor TicketAccountVisitor) error { + if t.typ == "String" || t.String != "" { return visitor.VisitString(t.String) - case "account": + } + if t.typ == "Account" || t.Account != nil { return visitor.VisitAccount(t.Account) } + return fmt.Errorf("type %T does not include a non-empty union type", t) +} + +// * `VIEW` - VIEW +// * `CREATE` - CREATE +// * `EDIT` - EDIT +// * `DELETE` - DELETE +// * `CLOSE` - CLOSE +// * `ASSIGN` - ASSIGN +type TicketActionsEnum string + +const ( + TicketActionsEnumView TicketActionsEnum = "VIEW" + TicketActionsEnumCreate TicketActionsEnum = "CREATE" + TicketActionsEnumEdit TicketActionsEnum = "EDIT" + TicketActionsEnumDelete TicketActionsEnum = "DELETE" + TicketActionsEnumClose TicketActionsEnum = "CLOSE" + TicketActionsEnumAssign TicketActionsEnum = "ASSIGN" +) + +func NewTicketActionsEnumFromString(s string) (TicketActionsEnum, error) { + switch s { + case "VIEW": + return TicketActionsEnumView, nil + case "CREATE": + return TicketActionsEnumCreate, nil + case "EDIT": + return TicketActionsEnumEdit, nil + case "DELETE": + return TicketActionsEnumDelete, nil + case "CLOSE": + return TicketActionsEnumClose, nil + case "ASSIGN": + return TicketActionsEnumAssign, nil + } + var t TicketActionsEnum + return "", fmt.Errorf("%s is not a valid %T", s, t) +} + +func (t TicketActionsEnum) Ptr() *TicketActionsEnum { + return &t } -type TicketRequestAssignedTeamsItem struct { - typeName string - String string - Team *Team +type TicketAssignedTeamsItem struct { + String string + Team *Team + + typ string } -func NewTicketRequestAssignedTeamsItemFromString(value string) *TicketRequestAssignedTeamsItem { - return &TicketRequestAssignedTeamsItem{typeName: "string", String: value} +func (t *TicketAssignedTeamsItem) GetString() string { + if t == nil { + return "" + } + return t.String } -func NewTicketRequestAssignedTeamsItemFromTeam(value *Team) *TicketRequestAssignedTeamsItem { - return &TicketRequestAssignedTeamsItem{typeName: "team", Team: value} +func (t *TicketAssignedTeamsItem) GetTeam() *Team { + if t == nil { + return nil + } + return t.Team } -func (t *TicketRequestAssignedTeamsItem) UnmarshalJSON(data []byte) error { +func (t *TicketAssignedTeamsItem) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" + t.typ = "String" t.String = valueString return nil } valueTeam := new(Team) if err := json.Unmarshal(data, &valueTeam); err == nil { - t.typeName = "team" + t.typ = "Team" t.Team = valueTeam return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, t) } -func (t TicketRequestAssignedTeamsItem) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": +func (t TicketAssignedTeamsItem) MarshalJSON() ([]byte, error) { + if t.typ == "String" || t.String != "" { return json.Marshal(t.String) - case "team": + } + if t.typ == "Team" || t.Team != nil { return json.Marshal(t.Team) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) } -type TicketRequestAssignedTeamsItemVisitor interface { +type TicketAssignedTeamsItemVisitor interface { VisitString(string) error VisitTeam(*Team) error } -func (t *TicketRequestAssignedTeamsItem) Accept(visitor TicketRequestAssignedTeamsItemVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": +func (t *TicketAssignedTeamsItem) Accept(visitor TicketAssignedTeamsItemVisitor) error { + if t.typ == "String" || t.String != "" { return visitor.VisitString(t.String) - case "team": + } + if t.typ == "Team" || t.Team != nil { return visitor.VisitTeam(t.Team) } + return fmt.Errorf("type %T does not include a non-empty union type", t) } -type TicketRequestAssigneesItem struct { - typeName string - String string - User *User +type TicketAssigneesItem struct { + String string + User *User + + typ string } -func NewTicketRequestAssigneesItemFromString(value string) *TicketRequestAssigneesItem { - return &TicketRequestAssigneesItem{typeName: "string", String: value} +func (t *TicketAssigneesItem) GetString() string { + if t == nil { + return "" + } + return t.String } -func NewTicketRequestAssigneesItemFromUser(value *User) *TicketRequestAssigneesItem { - return &TicketRequestAssigneesItem{typeName: "user", User: value} +func (t *TicketAssigneesItem) GetUser() *User { + if t == nil { + return nil + } + return t.User } -func (t *TicketRequestAssigneesItem) UnmarshalJSON(data []byte) error { +func (t *TicketAssigneesItem) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" + t.typ = "String" t.String = valueString return nil } valueUser := new(User) if err := json.Unmarshal(data, &valueUser); err == nil { - t.typeName = "user" + t.typ = "User" t.User = valueUser return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, t) } -func (t TicketRequestAssigneesItem) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": +func (t TicketAssigneesItem) MarshalJSON() ([]byte, error) { + if t.typ == "String" || t.String != "" { return json.Marshal(t.String) - case "user": + } + if t.typ == "User" || t.User != nil { return json.Marshal(t.User) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) } -type TicketRequestAssigneesItemVisitor interface { +type TicketAssigneesItemVisitor interface { VisitString(string) error VisitUser(*User) error } -func (t *TicketRequestAssigneesItem) Accept(visitor TicketRequestAssigneesItemVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": +func (t *TicketAssigneesItem) Accept(visitor TicketAssigneesItemVisitor) error { + if t.typ == "String" || t.String != "" { return visitor.VisitString(t.String) - case "user": + } + if t.typ == "User" || t.User != nil { return visitor.VisitUser(t.User) } + return fmt.Errorf("type %T does not include a non-empty union type", t) } -type TicketRequestAttachmentsItem struct { - typeName string +type TicketAttachmentsItem struct { String string Attachment *Attachment + + typ string } -func NewTicketRequestAttachmentsItemFromString(value string) *TicketRequestAttachmentsItem { - return &TicketRequestAttachmentsItem{typeName: "string", String: value} +func (t *TicketAttachmentsItem) GetString() string { + if t == nil { + return "" + } + return t.String } -func NewTicketRequestAttachmentsItemFromAttachment(value *Attachment) *TicketRequestAttachmentsItem { - return &TicketRequestAttachmentsItem{typeName: "attachment", Attachment: value} +func (t *TicketAttachmentsItem) GetAttachment() *Attachment { + if t == nil { + return nil + } + return t.Attachment } -func (t *TicketRequestAttachmentsItem) UnmarshalJSON(data []byte) error { +func (t *TicketAttachmentsItem) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" + t.typ = "String" t.String = valueString return nil } valueAttachment := new(Attachment) if err := json.Unmarshal(data, &valueAttachment); err == nil { - t.typeName = "attachment" + t.typ = "Attachment" t.Attachment = valueAttachment return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, t) } -func (t TicketRequestAttachmentsItem) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": +func (t TicketAttachmentsItem) MarshalJSON() ([]byte, error) { + if t.typ == "String" || t.String != "" { return json.Marshal(t.String) - case "attachment": + } + if t.typ == "Attachment" || t.Attachment != nil { return json.Marshal(t.Attachment) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) } -type TicketRequestAttachmentsItemVisitor interface { +type TicketAttachmentsItemVisitor interface { VisitString(string) error VisitAttachment(*Attachment) error } -func (t *TicketRequestAttachmentsItem) Accept(visitor TicketRequestAttachmentsItemVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": +func (t *TicketAttachmentsItem) Accept(visitor TicketAttachmentsItemVisitor) error { + if t.typ == "String" || t.String != "" { return visitor.VisitString(t.String) - case "attachment": + } + if t.typ == "Attachment" || t.Attachment != nil { return visitor.VisitAttachment(t.Attachment) } + return fmt.Errorf("type %T does not include a non-empty union type", t) } -type TicketRequestCollectionsItem struct { - typeName string +type TicketCollectionsItem struct { String string Collection *Collection + + typ string } -func NewTicketRequestCollectionsItemFromString(value string) *TicketRequestCollectionsItem { - return &TicketRequestCollectionsItem{typeName: "string", String: value} +func (t *TicketCollectionsItem) GetString() string { + if t == nil { + return "" + } + return t.String } -func NewTicketRequestCollectionsItemFromCollection(value *Collection) *TicketRequestCollectionsItem { - return &TicketRequestCollectionsItem{typeName: "collection", Collection: value} +func (t *TicketCollectionsItem) GetCollection() *Collection { + if t == nil { + return nil + } + return t.Collection } -func (t *TicketRequestCollectionsItem) UnmarshalJSON(data []byte) error { +func (t *TicketCollectionsItem) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" + t.typ = "String" t.String = valueString return nil } valueCollection := new(Collection) if err := json.Unmarshal(data, &valueCollection); err == nil { - t.typeName = "collection" + t.typ = "Collection" t.Collection = valueCollection return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, t) } -func (t TicketRequestCollectionsItem) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": +func (t TicketCollectionsItem) MarshalJSON() ([]byte, error) { + if t.typ == "String" || t.String != "" { return json.Marshal(t.String) - case "collection": + } + if t.typ == "Collection" || t.Collection != nil { return json.Marshal(t.Collection) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) } -type TicketRequestCollectionsItemVisitor interface { +type TicketCollectionsItemVisitor interface { VisitString(string) error VisitCollection(*Collection) error } -func (t *TicketRequestCollectionsItem) Accept(visitor TicketRequestCollectionsItemVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": +func (t *TicketCollectionsItem) Accept(visitor TicketCollectionsItemVisitor) error { + if t.typ == "String" || t.String != "" { return visitor.VisitString(t.String) - case "collection": + } + if t.typ == "Collection" || t.Collection != nil { return visitor.VisitCollection(t.Collection) } + return fmt.Errorf("type %T does not include a non-empty union type", t) } // The contact associated with the ticket. -type TicketRequestContact struct { - typeName string - String string - Contact *Contact +type TicketContact struct { + String string + Contact *Contact + + typ string } -func NewTicketRequestContactFromString(value string) *TicketRequestContact { - return &TicketRequestContact{typeName: "string", String: value} +func (t *TicketContact) GetString() string { + if t == nil { + return "" + } + return t.String } -func NewTicketRequestContactFromContact(value *Contact) *TicketRequestContact { - return &TicketRequestContact{typeName: "contact", Contact: value} +func (t *TicketContact) GetContact() *Contact { + if t == nil { + return nil + } + return t.Contact } -func (t *TicketRequestContact) UnmarshalJSON(data []byte) error { +func (t *TicketContact) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" + t.typ = "String" t.String = valueString return nil } valueContact := new(Contact) if err := json.Unmarshal(data, &valueContact); err == nil { - t.typeName = "contact" + t.typ = "Contact" t.Contact = valueContact return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, t) } -func (t TicketRequestContact) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": +func (t TicketContact) MarshalJSON() ([]byte, error) { + if t.typ == "String" || t.String != "" { return json.Marshal(t.String) - case "contact": + } + if t.typ == "Contact" || t.Contact != nil { return json.Marshal(t.Contact) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) } -type TicketRequestContactVisitor interface { +type TicketContactVisitor interface { VisitString(string) error VisitContact(*Contact) error } -func (t *TicketRequestContact) Accept(visitor TicketRequestContactVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": +func (t *TicketContact) Accept(visitor TicketContactVisitor) error { + if t.typ == "String" || t.String != "" { return visitor.VisitString(t.String) - case "contact": + } + if t.typ == "Contact" || t.Contact != nil { return visitor.VisitContact(t.Contact) } + return fmt.Errorf("type %T does not include a non-empty union type", t) } // The user who created this ticket. -type TicketRequestCreator struct { - typeName string - String string - User *User +type TicketCreator struct { + String string + User *User + + typ string } -func NewTicketRequestCreatorFromString(value string) *TicketRequestCreator { - return &TicketRequestCreator{typeName: "string", String: value} +func (t *TicketCreator) GetString() string { + if t == nil { + return "" + } + return t.String } -func NewTicketRequestCreatorFromUser(value *User) *TicketRequestCreator { - return &TicketRequestCreator{typeName: "user", User: value} +func (t *TicketCreator) GetUser() *User { + if t == nil { + return nil + } + return t.User } -func (t *TicketRequestCreator) UnmarshalJSON(data []byte) error { +func (t *TicketCreator) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" + t.typ = "String" t.String = valueString return nil } valueUser := new(User) if err := json.Unmarshal(data, &valueUser); err == nil { - t.typeName = "user" + t.typ = "User" t.User = valueUser return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, t) } -func (t TicketRequestCreator) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": +func (t TicketCreator) MarshalJSON() ([]byte, error) { + if t.typ == "String" || t.String != "" { return json.Marshal(t.String) - case "user": + } + if t.typ == "User" || t.User != nil { return json.Marshal(t.User) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) } -type TicketRequestCreatorVisitor interface { +type TicketCreatorVisitor interface { VisitString(string) error VisitUser(*User) error } -func (t *TicketRequestCreator) Accept(visitor TicketRequestCreatorVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": +func (t *TicketCreator) Accept(visitor TicketCreatorVisitor) error { + if t.typ == "String" || t.String != "" { return visitor.VisitString(t.String) - case "user": + } + if t.typ == "User" || t.User != nil { return visitor.VisitUser(t.User) } + return fmt.Errorf("type %T does not include a non-empty union type", t) } // The ticket's parent ticket. -type TicketRequestParentTicket struct { - typeName string - String string - Ticket *Ticket +type TicketParentTicket struct { + String string + Ticket *Ticket + + typ string } -func NewTicketRequestParentTicketFromString(value string) *TicketRequestParentTicket { - return &TicketRequestParentTicket{typeName: "string", String: value} +func (t *TicketParentTicket) GetString() string { + if t == nil { + return "" + } + return t.String } -func NewTicketRequestParentTicketFromTicket(value *Ticket) *TicketRequestParentTicket { - return &TicketRequestParentTicket{typeName: "ticket", Ticket: value} +func (t *TicketParentTicket) GetTicket() *Ticket { + if t == nil { + return nil + } + return t.Ticket } -func (t *TicketRequestParentTicket) UnmarshalJSON(data []byte) error { +func (t *TicketParentTicket) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" + t.typ = "String" t.String = valueString return nil } valueTicket := new(Ticket) if err := json.Unmarshal(data, &valueTicket); err == nil { - t.typeName = "ticket" + t.typ = "Ticket" t.Ticket = valueTicket return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, t) } -func (t TicketRequestParentTicket) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return json.Marshal(t.String) - case "ticket": - return json.Marshal(t.Ticket) - } -} - -type TicketRequestParentTicketVisitor interface { - VisitString(string) error - VisitTicket(*Ticket) error -} - -func (t *TicketRequestParentTicket) Accept(visitor TicketRequestParentTicketVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "string": - return visitor.VisitString(t.String) - case "ticket": - return visitor.VisitTicket(t.Ticket) - } -} - -// The priority or urgency of the Ticket. -// -// - `URGENT` - URGENT -// - `HIGH` - HIGH -// - `NORMAL` - NORMAL -// - `LOW` - LOW -type TicketRequestPriority struct { - typeName string - PriorityEnum PriorityEnum - String string -} - -func NewTicketRequestPriorityFromPriorityEnum(value PriorityEnum) *TicketRequestPriority { - return &TicketRequestPriority{typeName: "priorityEnum", PriorityEnum: value} -} - -func NewTicketRequestPriorityFromString(value string) *TicketRequestPriority { - return &TicketRequestPriority{typeName: "string", String: value} -} - -func (t *TicketRequestPriority) UnmarshalJSON(data []byte) error { - var valuePriorityEnum PriorityEnum - if err := json.Unmarshal(data, &valuePriorityEnum); err == nil { - t.typeName = "priorityEnum" - t.PriorityEnum = valuePriorityEnum - return nil - } - var valueString string - if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" - t.String = valueString - return nil - } - return fmt.Errorf("%s cannot be deserialized as a %T", data, t) -} - -func (t TicketRequestPriority) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "priorityEnum": - return json.Marshal(t.PriorityEnum) - case "string": +func (t TicketParentTicket) MarshalJSON() ([]byte, error) { + if t.typ == "String" || t.String != "" { return json.Marshal(t.String) } + if t.typ == "Ticket" || t.Ticket != nil { + return json.Marshal(t.Ticket) + } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) } -type TicketRequestPriorityVisitor interface { - VisitPriorityEnum(PriorityEnum) error +type TicketParentTicketVisitor interface { VisitString(string) error + VisitTicket(*Ticket) error } -func (t *TicketRequestPriority) Accept(visitor TicketRequestPriorityVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "priorityEnum": - return visitor.VisitPriorityEnum(t.PriorityEnum) - case "string": +func (t *TicketParentTicket) Accept(visitor TicketParentTicketVisitor) error { + if t.typ == "String" || t.String != "" { return visitor.VisitString(t.String) } + if t.typ == "Ticket" || t.Ticket != nil { + return visitor.VisitTicket(t.Ticket) + } + return fmt.Errorf("type %T does not include a non-empty union type", t) } -// The current status of the ticket. +// The priority or urgency of the Ticket. // -// - `OPEN` - OPEN -// - `CLOSED` - CLOSED -// - `IN_PROGRESS` - IN_PROGRESS -// - `ON_HOLD` - ON_HOLD -type TicketRequestStatus struct { - typeName string - TicketStatusEnum TicketStatusEnum - String string +// * `URGENT` - URGENT +// * `HIGH` - HIGH +// * `NORMAL` - NORMAL +// * `LOW` - LOW +type TicketPriority struct { + PriorityEnum PriorityEnum + String string + + typ string } -func NewTicketRequestStatusFromTicketStatusEnum(value TicketStatusEnum) *TicketRequestStatus { - return &TicketRequestStatus{typeName: "ticketStatusEnum", TicketStatusEnum: value} +func (t *TicketPriority) GetPriorityEnum() PriorityEnum { + if t == nil { + return "" + } + return t.PriorityEnum } -func NewTicketRequestStatusFromString(value string) *TicketRequestStatus { - return &TicketRequestStatus{typeName: "string", String: value} +func (t *TicketPriority) GetString() string { + if t == nil { + return "" + } + return t.String } -func (t *TicketRequestStatus) UnmarshalJSON(data []byte) error { - var valueTicketStatusEnum TicketStatusEnum - if err := json.Unmarshal(data, &valueTicketStatusEnum); err == nil { - t.typeName = "ticketStatusEnum" - t.TicketStatusEnum = valueTicketStatusEnum +func (t *TicketPriority) UnmarshalJSON(data []byte) error { + var valuePriorityEnum PriorityEnum + if err := json.Unmarshal(data, &valuePriorityEnum); err == nil { + t.typ = "PriorityEnum" + t.PriorityEnum = valuePriorityEnum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" + t.typ = "String" t.String = valueString return nil } return fmt.Errorf("%s cannot be deserialized as a %T", data, t) } -func (t TicketRequestStatus) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "ticketStatusEnum": - return json.Marshal(t.TicketStatusEnum) - case "string": +func (t TicketPriority) MarshalJSON() ([]byte, error) { + if t.typ == "PriorityEnum" || t.PriorityEnum != "" { + return json.Marshal(t.PriorityEnum) + } + if t.typ == "String" || t.String != "" { return json.Marshal(t.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) } -type TicketRequestStatusVisitor interface { - VisitTicketStatusEnum(TicketStatusEnum) error +type TicketPriorityVisitor interface { + VisitPriorityEnum(PriorityEnum) error VisitString(string) error } -func (t *TicketRequestStatus) Accept(visitor TicketRequestStatusVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "ticketStatusEnum": - return visitor.VisitTicketStatusEnum(t.TicketStatusEnum) - case "string": - return visitor.VisitString(t.String) - } -} - -type TicketResponse struct { - Model *Ticket `json:"model,omitempty"` - Warnings []*WarningValidationProblem `json:"warnings,omitempty"` - Errors []*ErrorValidationProblem `json:"errors,omitempty"` - Logs []*DebugModeLog `json:"logs,omitempty"` - - _rawJSON json.RawMessage -} - -func (t *TicketResponse) UnmarshalJSON(data []byte) error { - type unmarshaler TicketResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err - } - *t = TicketResponse(value) - t._rawJSON = json.RawMessage(data) - return nil -} - -func (t *TicketResponse) String() string { - if len(t._rawJSON) > 0 { - if value, err := core.StringifyJSON(t._rawJSON); err == nil { - return value - } +func (t *TicketPriority) Accept(visitor TicketPriorityVisitor) error { + if t.typ == "PriorityEnum" || t.PriorityEnum != "" { + return visitor.VisitPriorityEnum(t.PriorityEnum) } - if value, err := core.StringifyJSON(t); err == nil { - return value + if t.typ == "String" || t.String != "" { + return visitor.VisitString(t.String) } - return fmt.Sprintf("%#v", t) + return fmt.Errorf("type %T does not include a non-empty union type", t) } // The current status of the ticket. // -// - `OPEN` - OPEN -// - `CLOSED` - CLOSED -// - `IN_PROGRESS` - IN_PROGRESS -// - `ON_HOLD` - ON_HOLD +// * `OPEN` - OPEN +// * `CLOSED` - CLOSED +// * `IN_PROGRESS` - IN_PROGRESS +// * `ON_HOLD` - ON_HOLD type TicketStatus struct { - typeName string TicketStatusEnum TicketStatusEnum String string + + typ string } -func NewTicketStatusFromTicketStatusEnum(value TicketStatusEnum) *TicketStatus { - return &TicketStatus{typeName: "ticketStatusEnum", TicketStatusEnum: value} +func (t *TicketStatus) GetTicketStatusEnum() TicketStatusEnum { + if t == nil { + return "" + } + return t.TicketStatusEnum } -func NewTicketStatusFromString(value string) *TicketStatus { - return &TicketStatus{typeName: "string", String: value} +func (t *TicketStatus) GetString() string { + if t == nil { + return "" + } + return t.String } func (t *TicketStatus) UnmarshalJSON(data []byte) error { var valueTicketStatusEnum TicketStatusEnum if err := json.Unmarshal(data, &valueTicketStatusEnum); err == nil { - t.typeName = "ticketStatusEnum" + t.typ = "TicketStatusEnum" t.TicketStatusEnum = valueTicketStatusEnum return nil } var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - t.typeName = "string" + t.typ = "String" t.String = valueString return nil } @@ -6923,14 +5058,13 @@ func (t *TicketStatus) UnmarshalJSON(data []byte) error { } func (t TicketStatus) MarshalJSON() ([]byte, error) { - switch t.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "ticketStatusEnum": + if t.typ == "TicketStatusEnum" || t.TicketStatusEnum != "" { return json.Marshal(t.TicketStatusEnum) - case "string": + } + if t.typ == "String" || t.String != "" { return json.Marshal(t.String) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", t) } type TicketStatusVisitor interface { @@ -6939,20 +5073,19 @@ type TicketStatusVisitor interface { } func (t *TicketStatus) Accept(visitor TicketStatusVisitor) error { - switch t.typeName { - default: - return fmt.Errorf("invalid type %s in %T", t.typeName, t) - case "ticketStatusEnum": + if t.typ == "TicketStatusEnum" || t.TicketStatusEnum != "" { return visitor.VisitTicketStatusEnum(t.TicketStatusEnum) - case "string": + } + if t.typ == "String" || t.String != "" { return visitor.VisitString(t.String) } + return fmt.Errorf("type %T does not include a non-empty union type", t) } -// - `OPEN` - OPEN -// - `CLOSED` - CLOSED -// - `IN_PROGRESS` - IN_PROGRESS -// - `ON_HOLD` - ON_HOLD +// * `OPEN` - OPEN +// * `CLOSED` - CLOSED +// * `IN_PROGRESS` - IN_PROGRESS +// * `ON_HOLD` - ON_HOLD type TicketStatusEnum string const ( @@ -6981,153 +5114,216 @@ func (t TicketStatusEnum) Ptr() *TicketStatusEnum { return &t } -type TicketingAttachmentResponse struct { - Model *Attachment `json:"model,omitempty"` - Warnings []*WarningValidationProblem `json:"warnings,omitempty"` - Errors []*ErrorValidationProblem `json:"errors,omitempty"` - Logs []*DebugModeLog `json:"logs,omitempty"` +// # The User Object +// ### Description +// The `User` object is used to represent a user with a login to the ticketing system. +// Users are either assignees who are directly responsible or a viewer on a `Ticket`/ `Collection`. +// +// ### Usage Example +// TODO +type User struct { + Id *string `json:"id,omitempty" url:"id,omitempty"` + // The third-party API ID of the matching object. + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` + // The datetime that this object was created by Merge. + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` + // The datetime that this object was modified by Merge. + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` + // The user's name. + Name *string `json:"name,omitempty" url:"name,omitempty"` + // The user's email address. + EmailAddress *string `json:"email_address,omitempty" url:"email_address,omitempty"` + // Whether or not the user is active. + IsActive *bool `json:"is_active,omitempty" url:"is_active,omitempty"` + Teams []*UserTeamsItem `json:"teams,omitempty" url:"teams,omitempty"` + Roles []*UserRolesItem `json:"roles,omitempty" url:"roles,omitempty"` + // The user's avatar picture. + Avatar *string `json:"avatar,omitempty" url:"avatar,omitempty"` + // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). + RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty" url:"remote_was_deleted,omitempty"` + FieldMappings map[string]interface{} `json:"field_mappings,omitempty" url:"field_mappings,omitempty"` + RemoteData []*RemoteData `json:"remote_data,omitempty" url:"remote_data,omitempty"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (t *TicketingAttachmentResponse) UnmarshalJSON(data []byte) error { - type unmarshaler TicketingAttachmentResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (u *User) GetId() *string { + if u == nil { + return nil } - *t = TicketingAttachmentResponse(value) - t._rawJSON = json.RawMessage(data) - return nil + return u.Id } -func (t *TicketingAttachmentResponse) String() string { - if len(t._rawJSON) > 0 { - if value, err := core.StringifyJSON(t._rawJSON); err == nil { - return value - } +func (u *User) GetRemoteId() *string { + if u == nil { + return nil } - if value, err := core.StringifyJSON(t); err == nil { - return value + return u.RemoteId +} + +func (u *User) GetCreatedAt() *time.Time { + if u == nil { + return nil } - return fmt.Sprintf("%#v", t) + return u.CreatedAt } -type TicketingContactResponse struct { - Model *Contact `json:"model,omitempty"` - Warnings []*WarningValidationProblem `json:"warnings,omitempty"` - Errors []*ErrorValidationProblem `json:"errors,omitempty"` - Logs []*DebugModeLog `json:"logs,omitempty"` +func (u *User) GetModifiedAt() *time.Time { + if u == nil { + return nil + } + return u.ModifiedAt +} - _rawJSON json.RawMessage +func (u *User) GetName() *string { + if u == nil { + return nil + } + return u.Name } -func (t *TicketingContactResponse) UnmarshalJSON(data []byte) error { - type unmarshaler TicketingContactResponse - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (u *User) GetEmailAddress() *string { + if u == nil { + return nil } - *t = TicketingContactResponse(value) - t._rawJSON = json.RawMessage(data) - return nil + return u.EmailAddress } -func (t *TicketingContactResponse) String() string { - if len(t._rawJSON) > 0 { - if value, err := core.StringifyJSON(t._rawJSON); err == nil { - return value - } +func (u *User) GetIsActive() *bool { + if u == nil { + return nil } - if value, err := core.StringifyJSON(t); err == nil { - return value + return u.IsActive +} + +func (u *User) GetTeams() []*UserTeamsItem { + if u == nil { + return nil } - return fmt.Sprintf("%#v", t) + return u.Teams } -// # The User Object -// -// ### Description -// -// The `User` object is used to represent a user with a login to the ticketing system. -// Users are either assignees who are directly responsible or a viewer on a `Ticket`/ `Collection`. -// -// ### Usage Example -// -// TODO -type User struct { - Id *string `json:"id,omitempty"` - // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` - // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` - // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` - // The user's name. - Name *string `json:"name,omitempty"` - // The user's email address. - EmailAddress *string `json:"email_address,omitempty"` - // Whether or not the user is active. - IsActive *bool `json:"is_active,omitempty"` - Teams []*UserTeamsItem `json:"teams,omitempty"` - Roles []*UserRolesItem `json:"roles,omitempty"` - // The user's avatar picture. - Avatar *string `json:"avatar,omitempty"` - // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - RemoteWasDeleted *bool `json:"remote_was_deleted,omitempty"` - FieldMappings map[string]interface{} `json:"field_mappings,omitempty"` - RemoteData []*RemoteData `json:"remote_data,omitempty"` +func (u *User) GetRoles() []*UserRolesItem { + if u == nil { + return nil + } + return u.Roles +} + +func (u *User) GetAvatar() *string { + if u == nil { + return nil + } + return u.Avatar +} + +func (u *User) GetRemoteWasDeleted() *bool { + if u == nil { + return nil + } + return u.RemoteWasDeleted +} + +func (u *User) GetFieldMappings() map[string]interface{} { + if u == nil { + return nil + } + return u.FieldMappings +} + +func (u *User) GetRemoteData() []*RemoteData { + if u == nil { + return nil + } + return u.RemoteData +} - _rawJSON json.RawMessage +func (u *User) GetExtraProperties() map[string]interface{} { + return u.extraProperties } func (u *User) UnmarshalJSON(data []byte) error { - type unmarshaler User - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { + type embed User + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*u), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { + return err + } + *u = User(unmarshaler.embed) + u.CreatedAt = unmarshaler.CreatedAt.TimePtr() + u.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *u) + if err != nil { return err } - *u = User(value) - u._rawJSON = json.RawMessage(data) + u.extraProperties = extraProperties + u.rawJSON = json.RawMessage(data) return nil } +func (u *User) MarshalJSON() ([]byte, error) { + type embed User + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*u), + CreatedAt: internal.NewOptionalDateTime(u.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(u.ModifiedAt), + } + return json.Marshal(marshaler) +} + func (u *User) String() string { - if len(u._rawJSON) > 0 { - if value, err := core.StringifyJSON(u._rawJSON); err == nil { + if len(u.rawJSON) > 0 { + if value, err := internal.StringifyJSON(u.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(u); err == nil { + if value, err := internal.StringifyJSON(u); err == nil { return value } return fmt.Sprintf("%#v", u) } type UserRolesItem struct { - typeName string - String string - Role *Role + String string + Role *Role + + typ string } -func NewUserRolesItemFromString(value string) *UserRolesItem { - return &UserRolesItem{typeName: "string", String: value} +func (u *UserRolesItem) GetString() string { + if u == nil { + return "" + } + return u.String } -func NewUserRolesItemFromRole(value *Role) *UserRolesItem { - return &UserRolesItem{typeName: "role", Role: value} +func (u *UserRolesItem) GetRole() *Role { + if u == nil { + return nil + } + return u.Role } func (u *UserRolesItem) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - u.typeName = "string" + u.typ = "String" u.String = valueString return nil } valueRole := new(Role) if err := json.Unmarshal(data, &valueRole); err == nil { - u.typeName = "role" + u.typ = "Role" u.Role = valueRole return nil } @@ -7135,14 +5331,13 @@ func (u *UserRolesItem) UnmarshalJSON(data []byte) error { } func (u UserRolesItem) MarshalJSON() ([]byte, error) { - switch u.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", u.typeName, u) - case "string": + if u.typ == "String" || u.String != "" { return json.Marshal(u.String) - case "role": + } + if u.typ == "Role" || u.Role != nil { return json.Marshal(u.Role) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", u) } type UserRolesItemVisitor interface { @@ -7151,40 +5346,46 @@ type UserRolesItemVisitor interface { } func (u *UserRolesItem) Accept(visitor UserRolesItemVisitor) error { - switch u.typeName { - default: - return fmt.Errorf("invalid type %s in %T", u.typeName, u) - case "string": + if u.typ == "String" || u.String != "" { return visitor.VisitString(u.String) - case "role": + } + if u.typ == "Role" || u.Role != nil { return visitor.VisitRole(u.Role) } + return fmt.Errorf("type %T does not include a non-empty union type", u) } type UserTeamsItem struct { - typeName string - String string - Team *Team + String string + Team *Team + + typ string } -func NewUserTeamsItemFromString(value string) *UserTeamsItem { - return &UserTeamsItem{typeName: "string", String: value} +func (u *UserTeamsItem) GetString() string { + if u == nil { + return "" + } + return u.String } -func NewUserTeamsItemFromTeam(value *Team) *UserTeamsItem { - return &UserTeamsItem{typeName: "team", Team: value} +func (u *UserTeamsItem) GetTeam() *Team { + if u == nil { + return nil + } + return u.Team } func (u *UserTeamsItem) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - u.typeName = "string" + u.typ = "String" u.String = valueString return nil } valueTeam := new(Team) if err := json.Unmarshal(data, &valueTeam); err == nil { - u.typeName = "team" + u.typ = "Team" u.Team = valueTeam return nil } @@ -7192,14 +5393,13 @@ func (u *UserTeamsItem) UnmarshalJSON(data []byte) error { } func (u UserTeamsItem) MarshalJSON() ([]byte, error) { - switch u.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", u.typeName, u) - case "string": + if u.typ == "String" || u.String != "" { return json.Marshal(u.String) - case "team": + } + if u.typ == "Team" || u.Team != nil { return json.Marshal(u.Team) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", u) } type UserTeamsItemVisitor interface { @@ -7208,20 +5408,31 @@ type UserTeamsItemVisitor interface { } func (u *UserTeamsItem) Accept(visitor UserTeamsItemVisitor) error { - switch u.typeName { - default: - return fmt.Errorf("invalid type %s in %T", u.typeName, u) - case "string": + if u.typ == "String" || u.String != "" { return visitor.VisitString(u.String) - case "team": + } + if u.typ == "Team" || u.Team != nil { return visitor.VisitTeam(u.Team) } + return fmt.Errorf("type %T does not include a non-empty union type", u) } type ValidationProblemSource struct { - Pointer string `json:"pointer"` + Pointer string `json:"pointer" url:"pointer"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} - _rawJSON json.RawMessage +func (v *ValidationProblemSource) GetPointer() string { + if v == nil { + return "" + } + return v.Pointer +} + +func (v *ValidationProblemSource) GetExtraProperties() map[string]interface{} { + return v.extraProperties } func (v *ValidationProblemSource) UnmarshalJSON(data []byte) error { @@ -7231,65 +5442,141 @@ func (v *ValidationProblemSource) UnmarshalJSON(data []byte) error { return err } *v = ValidationProblemSource(value) - v._rawJSON = json.RawMessage(data) + extraProperties, err := internal.ExtractExtraProperties(data, *v) + if err != nil { + return err + } + v.extraProperties = extraProperties + v.rawJSON = json.RawMessage(data) return nil } func (v *ValidationProblemSource) String() string { - if len(v._rawJSON) > 0 { - if value, err := core.StringifyJSON(v._rawJSON); err == nil { + if len(v.rawJSON) > 0 { + if value, err := internal.StringifyJSON(v.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(v); err == nil { + if value, err := internal.StringifyJSON(v); err == nil { return value } return fmt.Sprintf("%#v", v) } // # The Viewer Object -// // ### Description -// // The `Viewer` object is used to represent a User or Team within a company. // // ### Usage Example -// // TODO type Viewer struct { - Id *string `json:"id,omitempty"` + Id *string `json:"id,omitempty" url:"id,omitempty"` // The third-party API ID of the matching object. - RemoteId *string `json:"remote_id,omitempty"` + RemoteId *string `json:"remote_id,omitempty" url:"remote_id,omitempty"` // The datetime that this object was created by Merge. - CreatedAt *time.Time `json:"created_at,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty" url:"created_at,omitempty"` // The datetime that this object was modified by Merge. - ModifiedAt *time.Time `json:"modified_at,omitempty"` + ModifiedAt *time.Time `json:"modified_at,omitempty" url:"modified_at,omitempty"` // The Team this Viewer belongs to. - Team *ViewerTeam `json:"team,omitempty"` + Team *ViewerTeam `json:"team,omitempty" url:"team,omitempty"` // The User this Viewer belongs to. - User *ViewerUser `json:"user,omitempty"` + User *ViewerUser `json:"user,omitempty" url:"user,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (v *Viewer) GetId() *string { + if v == nil { + return nil + } + return v.Id +} + +func (v *Viewer) GetRemoteId() *string { + if v == nil { + return nil + } + return v.RemoteId +} + +func (v *Viewer) GetCreatedAt() *time.Time { + if v == nil { + return nil + } + return v.CreatedAt +} + +func (v *Viewer) GetModifiedAt() *time.Time { + if v == nil { + return nil + } + return v.ModifiedAt +} + +func (v *Viewer) GetTeam() *ViewerTeam { + if v == nil { + return nil + } + return v.Team +} + +func (v *Viewer) GetUser() *ViewerUser { + if v == nil { + return nil + } + return v.User +} - _rawJSON json.RawMessage +func (v *Viewer) GetExtraProperties() map[string]interface{} { + return v.extraProperties } func (v *Viewer) UnmarshalJSON(data []byte) error { - type unmarshaler Viewer - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { + type embed Viewer + var unmarshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*v), + } + if err := json.Unmarshal(data, &unmarshaler); err != nil { return err } - *v = Viewer(value) - v._rawJSON = json.RawMessage(data) + *v = Viewer(unmarshaler.embed) + v.CreatedAt = unmarshaler.CreatedAt.TimePtr() + v.ModifiedAt = unmarshaler.ModifiedAt.TimePtr() + extraProperties, err := internal.ExtractExtraProperties(data, *v) + if err != nil { + return err + } + v.extraProperties = extraProperties + v.rawJSON = json.RawMessage(data) return nil } +func (v *Viewer) MarshalJSON() ([]byte, error) { + type embed Viewer + var marshaler = struct { + embed + CreatedAt *internal.DateTime `json:"created_at,omitempty"` + ModifiedAt *internal.DateTime `json:"modified_at,omitempty"` + }{ + embed: embed(*v), + CreatedAt: internal.NewOptionalDateTime(v.CreatedAt), + ModifiedAt: internal.NewOptionalDateTime(v.ModifiedAt), + } + return json.Marshal(marshaler) +} + func (v *Viewer) String() string { - if len(v._rawJSON) > 0 { - if value, err := core.StringifyJSON(v._rawJSON); err == nil { + if len(v.rawJSON) > 0 { + if value, err := internal.StringifyJSON(v.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(v); err == nil { + if value, err := internal.StringifyJSON(v); err == nil { return value } return fmt.Sprintf("%#v", v) @@ -7297,29 +5584,36 @@ func (v *Viewer) String() string { // The Team this Viewer belongs to. type ViewerTeam struct { - typeName string - String string - Team *Team + String string + Team *Team + + typ string } -func NewViewerTeamFromString(value string) *ViewerTeam { - return &ViewerTeam{typeName: "string", String: value} +func (v *ViewerTeam) GetString() string { + if v == nil { + return "" + } + return v.String } -func NewViewerTeamFromTeam(value *Team) *ViewerTeam { - return &ViewerTeam{typeName: "team", Team: value} +func (v *ViewerTeam) GetTeam() *Team { + if v == nil { + return nil + } + return v.Team } func (v *ViewerTeam) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - v.typeName = "string" + v.typ = "String" v.String = valueString return nil } valueTeam := new(Team) if err := json.Unmarshal(data, &valueTeam); err == nil { - v.typeName = "team" + v.typ = "Team" v.Team = valueTeam return nil } @@ -7327,14 +5621,13 @@ func (v *ViewerTeam) UnmarshalJSON(data []byte) error { } func (v ViewerTeam) MarshalJSON() ([]byte, error) { - switch v.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", v.typeName, v) - case "string": + if v.typ == "String" || v.String != "" { return json.Marshal(v.String) - case "team": + } + if v.typ == "Team" || v.Team != nil { return json.Marshal(v.Team) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", v) } type ViewerTeamVisitor interface { @@ -7343,41 +5636,47 @@ type ViewerTeamVisitor interface { } func (v *ViewerTeam) Accept(visitor ViewerTeamVisitor) error { - switch v.typeName { - default: - return fmt.Errorf("invalid type %s in %T", v.typeName, v) - case "string": + if v.typ == "String" || v.String != "" { return visitor.VisitString(v.String) - case "team": + } + if v.typ == "Team" || v.Team != nil { return visitor.VisitTeam(v.Team) } + return fmt.Errorf("type %T does not include a non-empty union type", v) } // The User this Viewer belongs to. type ViewerUser struct { - typeName string - String string - User *User + String string + User *User + + typ string } -func NewViewerUserFromString(value string) *ViewerUser { - return &ViewerUser{typeName: "string", String: value} +func (v *ViewerUser) GetString() string { + if v == nil { + return "" + } + return v.String } -func NewViewerUserFromUser(value *User) *ViewerUser { - return &ViewerUser{typeName: "user", User: value} +func (v *ViewerUser) GetUser() *User { + if v == nil { + return nil + } + return v.User } func (v *ViewerUser) UnmarshalJSON(data []byte) error { var valueString string if err := json.Unmarshal(data, &valueString); err == nil { - v.typeName = "string" + v.typ = "String" v.String = valueString return nil } valueUser := new(User) if err := json.Unmarshal(data, &valueUser); err == nil { - v.typeName = "user" + v.typ = "User" v.User = valueUser return nil } @@ -7385,14 +5684,13 @@ func (v *ViewerUser) UnmarshalJSON(data []byte) error { } func (v ViewerUser) MarshalJSON() ([]byte, error) { - switch v.typeName { - default: - return nil, fmt.Errorf("invalid type %s in %T", v.typeName, v) - case "string": + if v.typ == "String" || v.String != "" { return json.Marshal(v.String) - case "user": + } + if v.typ == "User" || v.User != nil { return json.Marshal(v.User) } + return nil, fmt.Errorf("type %T does not include a non-empty union type", v) } type ViewerUserVisitor interface { @@ -7401,74 +5699,80 @@ type ViewerUserVisitor interface { } func (v *ViewerUser) Accept(visitor ViewerUserVisitor) error { - switch v.typeName { - default: - return fmt.Errorf("invalid type %s in %T", v.typeName, v) - case "string": + if v.typ == "String" || v.String != "" { return visitor.VisitString(v.String) - case "user": + } + if v.typ == "User" || v.User != nil { return visitor.VisitUser(v.User) } + return fmt.Errorf("type %T does not include a non-empty union type", v) } type WarningValidationProblem struct { - Source *ValidationProblemSource `json:"source,omitempty"` - Title string `json:"title"` - Detail string `json:"detail"` - ProblemType string `json:"problem_type"` + Source *ValidationProblemSource `json:"source,omitempty" url:"source,omitempty"` + Title string `json:"title" url:"title"` + Detail string `json:"detail" url:"detail"` + ProblemType string `json:"problem_type" url:"problem_type"` - _rawJSON json.RawMessage + extraProperties map[string]interface{} + rawJSON json.RawMessage } -func (w *WarningValidationProblem) UnmarshalJSON(data []byte) error { - type unmarshaler WarningValidationProblem - var value unmarshaler - if err := json.Unmarshal(data, &value); err != nil { - return err +func (w *WarningValidationProblem) GetSource() *ValidationProblemSource { + if w == nil { + return nil } - *w = WarningValidationProblem(value) - w._rawJSON = json.RawMessage(data) - return nil + return w.Source } -func (w *WarningValidationProblem) String() string { - if len(w._rawJSON) > 0 { - if value, err := core.StringifyJSON(w._rawJSON); err == nil { - return value - } +func (w *WarningValidationProblem) GetTitle() string { + if w == nil { + return "" } - if value, err := core.StringifyJSON(w); err == nil { - return value + return w.Title +} + +func (w *WarningValidationProblem) GetDetail() string { + if w == nil { + return "" } - return fmt.Sprintf("%#v", w) + return w.Detail } -type WebhookReceiver struct { - Event string `json:"event"` - IsActive bool `json:"is_active"` - Key *string `json:"key,omitempty"` +func (w *WarningValidationProblem) GetProblemType() string { + if w == nil { + return "" + } + return w.ProblemType +} - _rawJSON json.RawMessage +func (w *WarningValidationProblem) GetExtraProperties() map[string]interface{} { + return w.extraProperties } -func (w *WebhookReceiver) UnmarshalJSON(data []byte) error { - type unmarshaler WebhookReceiver +func (w *WarningValidationProblem) UnmarshalJSON(data []byte) error { + type unmarshaler WarningValidationProblem var value unmarshaler if err := json.Unmarshal(data, &value); err != nil { return err } - *w = WebhookReceiver(value) - w._rawJSON = json.RawMessage(data) + *w = WarningValidationProblem(value) + extraProperties, err := internal.ExtractExtraProperties(data, *w) + if err != nil { + return err + } + w.extraProperties = extraProperties + w.rawJSON = json.RawMessage(data) return nil } -func (w *WebhookReceiver) String() string { - if len(w._rawJSON) > 0 { - if value, err := core.StringifyJSON(w._rawJSON); err == nil { +func (w *WarningValidationProblem) String() string { + if len(w.rawJSON) > 0 { + if value, err := internal.StringifyJSON(w.rawJSON); err == nil { return value } } - if value, err := core.StringifyJSON(w); err == nil { + if value, err := internal.StringifyJSON(w); err == nil { return value } return fmt.Sprintf("%#v", w) diff --git a/ticketing/users.go b/ticketing/users.go index fe38358..a1b8270 100644 --- a/ticketing/users.go +++ b/ticketing/users.go @@ -1,4 +1,4 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package ticketing @@ -9,84 +9,82 @@ import ( type UsersListRequest struct { // If provided, will only return objects created after this datetime. - CreatedAfter *time.Time `json:"-"` + CreatedAfter *time.Time `json:"-" url:"created_after,omitempty"` // If provided, will only return objects created before this datetime. - CreatedBefore *time.Time `json:"-"` + CreatedBefore *time.Time `json:"-" url:"created_before,omitempty"` // The pagination cursor value. - Cursor *string `json:"-"` + Cursor *string `json:"-" url:"cursor,omitempty"` // If provided, will only return users with emails equal to this value (case insensitive). - EmailAddress *string `json:"-"` + EmailAddress *string `json:"-" url:"email_address,omitempty"` // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *UsersListRequestExpand `json:"-"` + Expand []*UsersListRequestExpandItem `json:"-" url:"expand,omitempty"` // Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/). - IncludeDeletedData *bool `json:"-"` + IncludeDeletedData *bool `json:"-" url:"include_deleted_data,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). - IncludeShellData *bool `json:"-"` + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` // If provided, only objects synced by Merge after this date time will be returned. - ModifiedAfter *time.Time `json:"-"` + ModifiedAfter *time.Time `json:"-" url:"modified_after,omitempty"` // If provided, only objects synced by Merge before this date time will be returned. - ModifiedBefore *time.Time `json:"-"` + ModifiedBefore *time.Time `json:"-" url:"modified_before,omitempty"` // Number of results to return per page. - PageSize *int `json:"-"` + PageSize *int `json:"-" url:"page_size,omitempty"` // The API provider's ID for the given object. - RemoteId *string `json:"-"` + RemoteId *string `json:"-" url:"remote_id,omitempty"` + // If provided, will only return users matching in this team. + Team *string `json:"-" url:"team,omitempty"` } type UsersRetrieveRequest struct { // Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. - Expand *UsersRetrieveRequestExpand `json:"-"` + Expand []*UsersRetrieveRequestExpandItem `json:"-" url:"expand,omitempty"` // Whether to include the original data Merge fetched from the third-party to produce these models. - IncludeRemoteData *bool `json:"-"` + IncludeRemoteData *bool `json:"-" url:"include_remote_data,omitempty"` + // Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null). + IncludeShellData *bool `json:"-" url:"include_shell_data,omitempty"` } -type UsersListRequestExpand string +type UsersListRequestExpandItem string const ( - UsersListRequestExpandRoles UsersListRequestExpand = "roles" - UsersListRequestExpandTeams UsersListRequestExpand = "teams" - UsersListRequestExpandTeamsRoles UsersListRequestExpand = "teams,roles" + UsersListRequestExpandItemRoles UsersListRequestExpandItem = "roles" + UsersListRequestExpandItemTeams UsersListRequestExpandItem = "teams" ) -func NewUsersListRequestExpandFromString(s string) (UsersListRequestExpand, error) { +func NewUsersListRequestExpandItemFromString(s string) (UsersListRequestExpandItem, error) { switch s { case "roles": - return UsersListRequestExpandRoles, nil + return UsersListRequestExpandItemRoles, nil case "teams": - return UsersListRequestExpandTeams, nil - case "teams,roles": - return UsersListRequestExpandTeamsRoles, nil + return UsersListRequestExpandItemTeams, nil } - var t UsersListRequestExpand + var t UsersListRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (u UsersListRequestExpand) Ptr() *UsersListRequestExpand { +func (u UsersListRequestExpandItem) Ptr() *UsersListRequestExpandItem { return &u } -type UsersRetrieveRequestExpand string +type UsersRetrieveRequestExpandItem string const ( - UsersRetrieveRequestExpandRoles UsersRetrieveRequestExpand = "roles" - UsersRetrieveRequestExpandTeams UsersRetrieveRequestExpand = "teams" - UsersRetrieveRequestExpandTeamsRoles UsersRetrieveRequestExpand = "teams,roles" + UsersRetrieveRequestExpandItemRoles UsersRetrieveRequestExpandItem = "roles" + UsersRetrieveRequestExpandItemTeams UsersRetrieveRequestExpandItem = "teams" ) -func NewUsersRetrieveRequestExpandFromString(s string) (UsersRetrieveRequestExpand, error) { +func NewUsersRetrieveRequestExpandItemFromString(s string) (UsersRetrieveRequestExpandItem, error) { switch s { case "roles": - return UsersRetrieveRequestExpandRoles, nil + return UsersRetrieveRequestExpandItemRoles, nil case "teams": - return UsersRetrieveRequestExpandTeams, nil - case "teams,roles": - return UsersRetrieveRequestExpandTeamsRoles, nil + return UsersRetrieveRequestExpandItemTeams, nil } - var t UsersRetrieveRequestExpand + var t UsersRetrieveRequestExpandItem return "", fmt.Errorf("%s is not a valid %T", s, t) } -func (u UsersRetrieveRequestExpand) Ptr() *UsersRetrieveRequestExpand { +func (u UsersRetrieveRequestExpandItem) Ptr() *UsersRetrieveRequestExpandItem { return &u } diff --git a/ticketing/users/client.go b/ticketing/users/client.go index 5eb470d..4bfae4a 100644 --- a/ticketing/users/client.go +++ b/ticketing/users/client.go @@ -1,126 +1,137 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package users import ( context "context" fmt "fmt" - core "github.com/merge-api/merge-go-client/core" - ticketing "github.com/merge-api/merge-go-client/ticketing" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" + ticketing "github.com/merge-api/merge-go-client/v2/ticketing" http "net/http" - url "net/url" - time "time" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `User` objects. -func (c *Client) List(ctx context.Context, request *ticketing.UsersListRequest) (*ticketing.PaginatedUserList, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ticketing/v1/users" - - queryParams := make(url.Values) - if request.CreatedAfter != nil { - queryParams.Add("created_after", fmt.Sprintf("%v", request.CreatedAfter.Format(time.RFC3339))) - } - if request.CreatedBefore != nil { - queryParams.Add("created_before", fmt.Sprintf("%v", request.CreatedBefore.Format(time.RFC3339))) - } - if request.Cursor != nil { - queryParams.Add("cursor", fmt.Sprintf("%v", *request.Cursor)) - } - if request.EmailAddress != nil { - queryParams.Add("email_address", fmt.Sprintf("%v", *request.EmailAddress)) - } - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeDeletedData != nil { - queryParams.Add("include_deleted_data", fmt.Sprintf("%v", *request.IncludeDeletedData)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) - } - if request.IncludeShellData != nil { - queryParams.Add("include_shell_data", fmt.Sprintf("%v", *request.IncludeShellData)) - } - if request.ModifiedAfter != nil { - queryParams.Add("modified_after", fmt.Sprintf("%v", request.ModifiedAfter.Format(time.RFC3339))) - } - if request.ModifiedBefore != nil { - queryParams.Add("modified_before", fmt.Sprintf("%v", request.ModifiedBefore.Format(time.RFC3339))) - } - if request.PageSize != nil { - queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize)) - } - if request.RemoteId != nil { - queryParams.Add("remote_id", fmt.Sprintf("%v", *request.RemoteId)) - } - if len(queryParams) > 0 { - endpointURL += "?" + queryParams.Encode() - } - - var response *ticketing.PaginatedUserList - if err := c.caller.Call( - ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, - }, - ); err != nil { +func (c *Client) List( + ctx context.Context, + request *ticketing.UsersListRequest, + opts ...option.RequestOption, +) (*core.Page[*ticketing.User], error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ticketing/v1/users" + queryParams, err := internal.QueryValues(request) + if err != nil { return nil, err } - return response, nil + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + + prepareCall := func(pageRequest *internal.PageRequest[*string]) *internal.CallParams { + if pageRequest.Cursor != nil { + queryParams.Set("cursor", fmt.Sprintf("%v", *pageRequest.Cursor)) + } + nextURL := endpointURL + if len(queryParams) > 0 { + nextURL += "?" + queryParams.Encode() + } + return &internal.CallParams{ + URL: nextURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: pageRequest.Response, + } + } + readPageResponse := func(response *ticketing.PaginatedUserList) *internal.PageResponse[*string, *ticketing.User] { + var zeroValue *string + next := response.Next + results := response.Results + return &internal.PageResponse[*string, *ticketing.User]{ + Next: next, + Results: results, + Done: next == zeroValue, + } + } + pager := internal.NewCursorPager( + c.caller, + prepareCall, + readPageResponse, + ) + return pager.GetPage(ctx, request.Cursor) } // Returns a `User` object with the given `id`. -func (c *Client) Retrieve(ctx context.Context, id string, request *ticketing.UsersRetrieveRequest) (*ticketing.User, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := fmt.Sprintf(baseURL+"/"+"ticketing/v1/users/%v", id) - - queryParams := make(url.Values) - if request.Expand != nil { - queryParams.Add("expand", fmt.Sprintf("%v", *request.Expand)) - } - if request.IncludeRemoteData != nil { - queryParams.Add("include_remote_data", fmt.Sprintf("%v", *request.IncludeRemoteData)) +func (c *Client) Retrieve( + ctx context.Context, + id string, + request *ticketing.UsersRetrieveRequest, + opts ...option.RequestOption, +) (*ticketing.User, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := internal.EncodeURL( + baseURL+"/ticketing/v1/users/%v", + id, + ) + queryParams, err := internal.QueryValues(request) + if err != nil { + return nil, err } if len(queryParams) > 0 { endpointURL += "?" + queryParams.Encode() } + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response *ticketing.User if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err diff --git a/ticketing/webhook_receivers.go b/ticketing/webhook_receivers.go index 881d630..9c2170b 100644 --- a/ticketing/webhook_receivers.go +++ b/ticketing/webhook_receivers.go @@ -1,9 +1,77 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package ticketing +import ( + json "encoding/json" + fmt "fmt" + internal "github.com/merge-api/merge-go-client/v2/internal" +) + type WebhookReceiverRequest struct { - Event string `json:"event"` - IsActive bool `json:"is_active"` - Key *string `json:"key,omitempty"` + Event string `json:"event" url:"-"` + IsActive bool `json:"is_active" url:"-"` + Key *string `json:"key,omitempty" url:"-"` +} + +type WebhookReceiver struct { + Event string `json:"event" url:"event"` + IsActive bool `json:"is_active" url:"is_active"` + Key *string `json:"key,omitempty" url:"key,omitempty"` + + extraProperties map[string]interface{} + rawJSON json.RawMessage +} + +func (w *WebhookReceiver) GetEvent() string { + if w == nil { + return "" + } + return w.Event +} + +func (w *WebhookReceiver) GetIsActive() bool { + if w == nil { + return false + } + return w.IsActive +} + +func (w *WebhookReceiver) GetKey() *string { + if w == nil { + return nil + } + return w.Key +} + +func (w *WebhookReceiver) GetExtraProperties() map[string]interface{} { + return w.extraProperties +} + +func (w *WebhookReceiver) UnmarshalJSON(data []byte) error { + type unmarshaler WebhookReceiver + var value unmarshaler + if err := json.Unmarshal(data, &value); err != nil { + return err + } + *w = WebhookReceiver(value) + extraProperties, err := internal.ExtractExtraProperties(data, *w) + if err != nil { + return err + } + w.extraProperties = extraProperties + w.rawJSON = json.RawMessage(data) + return nil +} + +func (w *WebhookReceiver) String() string { + if len(w.rawJSON) > 0 { + if value, err := internal.StringifyJSON(w.rawJSON); err == nil { + return value + } + } + if value, err := internal.StringifyJSON(w); err == nil { + return value + } + return fmt.Sprintf("%#v", w) } diff --git a/ticketing/webhookreceivers/client.go b/ticketing/webhookreceivers/client.go index 4269734..c251417 100644 --- a/ticketing/webhookreceivers/client.go +++ b/ticketing/webhookreceivers/client.go @@ -1,48 +1,65 @@ -// This file was auto-generated by Fern from our API Definition. +// Code generated by Fern. DO NOT EDIT. package webhookreceivers import ( context "context" - core "github.com/merge-api/merge-go-client/core" - ticketing "github.com/merge-api/merge-go-client/ticketing" + core "github.com/merge-api/merge-go-client/v2/core" + internal "github.com/merge-api/merge-go-client/v2/internal" + option "github.com/merge-api/merge-go-client/v2/option" + ticketing "github.com/merge-api/merge-go-client/v2/ticketing" http "net/http" ) type Client struct { baseURL string - caller *core.Caller + caller *internal.Caller header http.Header } -func NewClient(opts ...core.ClientOption) *Client { - options := core.NewClientOptions() - for _, opt := range opts { - opt(options) - } +func NewClient(opts ...option.RequestOption) *Client { + options := core.NewRequestOptions(opts...) return &Client{ baseURL: options.BaseURL, - caller: core.NewCaller(options.HTTPClient), - header: options.ToHeader(), + caller: internal.NewCaller( + &internal.CallerParams{ + Client: options.HTTPClient, + MaxAttempts: options.MaxAttempts, + }, + ), + header: options.ToHeader(), } } // Returns a list of `WebhookReceiver` objects. -func (c *Client) List(ctx context.Context) ([]*ticketing.WebhookReceiver, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ticketing/v1/webhook-receivers" +func (c *Client) List( + ctx context.Context, + opts ...option.RequestOption, +) ([]*ticketing.WebhookReceiver, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ticketing/v1/webhook-receivers" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) var response []*ticketing.WebhookReceiver if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodGet, - Headers: c.header, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodGet, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Response: &response, }, ); err != nil { return nil, err @@ -51,22 +68,37 @@ func (c *Client) List(ctx context.Context) ([]*ticketing.WebhookReceiver, error) } // Creates a `WebhookReceiver` object with the given values. -func (c *Client) Create(ctx context.Context, request *ticketing.WebhookReceiverRequest) (*ticketing.WebhookReceiver, error) { - baseURL := "https://api.merge.dev/api" - if c.baseURL != "" { - baseURL = c.baseURL - } - endpointURL := baseURL + "/" + "ticketing/v1/webhook-receivers" +func (c *Client) Create( + ctx context.Context, + request *ticketing.WebhookReceiverRequest, + opts ...option.RequestOption, +) (*ticketing.WebhookReceiver, error) { + options := core.NewRequestOptions(opts...) + baseURL := internal.ResolveBaseURL( + options.BaseURL, + c.baseURL, + "", + ) + endpointURL := baseURL + "/ticketing/v1/webhook-receivers" + headers := internal.MergeHeaders( + c.header.Clone(), + options.ToHeader(), + ) + headers.Set("Content-Type", "application/json") var response *ticketing.WebhookReceiver if err := c.caller.Call( ctx, - &core.CallParams{ - URL: endpointURL, - Method: http.MethodPost, - Headers: c.header, - Request: request, - Response: &response, + &internal.CallParams{ + URL: endpointURL, + Method: http.MethodPost, + Headers: headers, + MaxAttempts: options.MaxAttempts, + BodyProperties: options.BodyProperties, + QueryParameters: options.QueryParameters, + Client: options.HTTPClient, + Request: request, + Response: &response, }, ); err != nil { return nil, err From ec54fb83a170f2cebacc06b5cd2d7f821ddf15a1 Mon Sep 17 00:00:00 2001 From: Matt Blank Date: Thu, 26 Jun 2025 20:18:15 -0400 Subject: [PATCH 2/5] Comma separate enums --- .fernignore | 1 + internal/query.go | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/.fernignore b/.fernignore index 5df9d66..3b23c3a 100644 --- a/.fernignore +++ b/.fernignore @@ -2,3 +2,4 @@ README.md LICENSE +internal/query.go diff --git a/internal/query.go b/internal/query.go index 24ec496..9cb2ae9 100644 --- a/internal/query.go +++ b/internal/query.go @@ -49,6 +49,11 @@ func QueryValues(v interface{}) (url.Values, error) { } err := reflectValue(values, val, "") + + if expands, ok := values["expand"]; ok && len(expands) > 1 { + values.Set("expand", strings.Join(expands, ",")) + } + return values, err } From 125d45fc0c10563928b4cfa6e91e8aa9fff479c7 Mon Sep 17 00:00:00 2001 From: Nitesh Sandal Date: Sat, 28 Jun 2025 23:52:09 -0400 Subject: [PATCH 3/5] use Production environment if options.BaseURL not provided --- .fernignore | 1 + client/client.go | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/.fernignore b/.fernignore index 3b23c3a..94b7b2a 100644 --- a/.fernignore +++ b/.fernignore @@ -3,3 +3,4 @@ README.md LICENSE internal/query.go +client/client.go diff --git a/client/client.go b/client/client.go index 90173c6..970d44f 100644 --- a/client/client.go +++ b/client/client.go @@ -3,6 +3,7 @@ package client import ( + merge "github.com/merge-api/merge-go-client/v2" accountingclient "github.com/merge-api/merge-go-client/v2/accounting/client" atsclient "github.com/merge-api/merge-go-client/v2/ats/client" core "github.com/merge-api/merge-go-client/v2/core" @@ -30,6 +31,10 @@ type Client struct { func NewClient(opts ...option.RequestOption) *Client { options := core.NewRequestOptions(opts...) + if options.BaseURL == "" { + options.BaseURL = merge.Environments.Production + } + return &Client{ baseURL: options.BaseURL, caller: internal.NewCaller( From 8c7d18b439e83a04b6d385636c01b62c2ece39ae Mon Sep 17 00:00:00 2001 From: Nitesh Sandal Date: Sun, 29 Jun 2025 10:16:08 -0400 Subject: [PATCH 4/5] update test --- .fernignore | 1 + client/client_test.go | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.fernignore b/.fernignore index 94b7b2a..1151328 100644 --- a/.fernignore +++ b/.fernignore @@ -4,3 +4,4 @@ README.md LICENSE internal/query.go client/client.go +client/client_test.go \ No newline at end of file diff --git a/client/client_test.go b/client/client_test.go index 634732a..485e78c 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -4,6 +4,7 @@ package client import ( option "github.com/merge-api/merge-go-client/v2/option" + merge "github.com/merge-api/merge-go-client/v2" assert "github.com/stretchr/testify/assert" http "net/http" testing "testing" @@ -13,7 +14,7 @@ import ( func TestNewClient(t *testing.T) { t.Run("default", func(t *testing.T) { c := NewClient() - assert.Empty(t, c.baseURL) + assert.Equal(t, merge.Environments.Production, c.baseURL) }) t.Run("base url", func(t *testing.T) { @@ -30,7 +31,7 @@ func TestNewClient(t *testing.T) { c := NewClient( option.WithHTTPClient(httpClient), ) - assert.Empty(t, c.baseURL) + assert.Equal(t, merge.Environments.Production, c.baseURL) }) t.Run("http header", func(t *testing.T) { @@ -39,7 +40,7 @@ func TestNewClient(t *testing.T) { c := NewClient( option.WithHTTPHeader(header), ) - assert.Empty(t, c.baseURL) + assert.Equal(t, merge.Environments.Production, c.baseURL) assert.Equal(t, "test", c.header.Get("X-API-Tenancy")) }) } From 05135f7b411126ff7e0cfccec9afc351dea6f369 Mon Sep 17 00:00:00 2001 From: Nitesh Sandal Date: Sun, 29 Jun 2025 10:20:51 -0400 Subject: [PATCH 5/5] update readme --- README.md | 73 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 38 insertions(+), 35 deletions(-) diff --git a/README.md b/README.md index 8823810..3684e68 100644 --- a/README.md +++ b/README.md @@ -23,13 +23,15 @@ import ( "context" "fmt" - merge "github.com/merge-api/merge-go-client" - mergeclient "github.com/merge-api/merge-go-client/client" + merge "github.com/merge-api/merge-go-client/v2" + mergeclient "github.com/merge-api/merge-go-client/v2/client" + "github.com/merge-api/merge-go-client/v2/option" + ) client := mergeclient.NewClient( - mergeclient.WithApiKey(""), - mergeclient.WithAccountToken(""), + option.WithApiKey(""), + option.WithAccountToken(""), ) ``` @@ -41,8 +43,8 @@ Each category is namespaced: ```go client := mergeclient.NewClient( - mergeclient.WithApiKey(""), - mergeclient.WithAccountToken(""), + option.WithApiKey(""), + option.WithAccountToken(""), ) client.Ats. # APIs specific to the ATS Category @@ -60,8 +62,8 @@ Each category is namespaced: ```go client := mergeclient.NewClient( - mergeclient.WithApiKey(""), - mergeclient.WithAccountToken(""), + option.WithApiKey(""), + option.WithAccountToken(""), ) client.Ats. // APIs specific to the ATS category @@ -78,14 +80,15 @@ import ( "context" "fmt" - merge "github.com/fern-api/merge-go" - mergeclient "github.com/fern-api/merge-go/client" - "github.com/fern-api/merge-go/ats" + merge "github.com/merge-api/merge-go-client/v2" + mergeclient "github.com/merge-api/merge-go-client/v2/client" + "github.com/merge-api/merge-go-client/v2/option" + "github.com/merge-api/merge-go-client/v2/ats" ) client := mergeclient.NewClient( - mergeclient.WithApiKey(""), - mergeclient.WithAccountToken(""), + option.WithApiKey(""), + option.WithAccountToken(""), ) linkTokenResponse, err := client.Ats.LinkToken.Create( context.TODO(), @@ -110,14 +113,14 @@ import ( "context" "fmt" - merge "github.com/fern-api/merge-go" - mergeclient "github.com/fern-api/merge-go/client" - "github.com/fern-api/merge-go/hris" + merge "github.com/merge-api/merge-go-client/v2" + mergeclient "github.com/merge-api/merge-go-client/v2/client" + "github.com/merge-api/merge-go-client/v2/hris" ) client := mergeclient.NewClient( - mergeclient.WithApiKey(""), - mergeclient.WithAccountToken(""), + option.WithApiKey(""), + option.WithAccountToken(""), ) employee, err := client.Hris.Employees.Retrieve( context.TODO(), @@ -139,14 +142,14 @@ import ( "context" "fmt" - merge "github.com/fern-api/merge-go" - mergeclient "github.com/fern-api/merge-go/client" - "github.com/fern-api/merge-go/ats" + merge "github.com/merge-api/merge-go-client/v2" + mergeclient "github.com/merge-api/merge-go-client/v2/client" + "github.com/merge-api/merge-go-client/v2/ats" ) client := mergeclient.NewClient( - mergeclient.WithApiKey(""), - mergeclient.WithAccountToken(""), + option.WithApiKey(""), + option.WithAccountToken(""), ) candidate, err := client.Ats.Candidates.Retrieve( context.TODO(), @@ -169,14 +172,14 @@ import ( "fmt" "time" - merge "github.com/fern-api/merge-go" - mergeclient "github.com/fern-api/merge-go/client" - "github.com/fern-api/merge-go/ats" + merge "github.com/merge-api/merge-go-client/v2" + mergeclient "github.com/merge-api/merge-go-client/v2/client" + "github.com/merge-api/merge-go-client/v2/ats" ) client := mergeclient.NewClient( - mergeclient.WithApiKey(""), - mergeclient.WithAccountToken(""), + option.WithApiKey(""), + option.WithAccountToken(""), ) candidateList, err := client.Ats.Candidates.List( context.TODO(), @@ -198,14 +201,14 @@ import ( "fmt" "time" - merge "github.com/fern-api/merge-go" - mergeclient "github.com/fern-api/merge-go/client" - "github.com/fern-api/merge-go/ticketing" + merge "github.com/merge-api/merge-go-client/v2" + mergeclient "github.com/merge-api/merge-go-client/v2/client" + "github.com/merge-api/merge-go-client/v2/ticketing" ) client := mergeclient.NewClient( - mergeclient.WithApiKey(""), - mergeclient.WithAccountToken(""), + option.WithApiKey(""), + option.WithAccountToken(""), ) ticketResponse, err := client.Ticketing.Tickets.Create( context.TODO(), @@ -255,8 +258,8 @@ configuring authorization tokens to be sent on every request, or providing your ```go client := mergeclient.NewClient( - mergeclient.WithApiKey(""), - mergeclient.WithHTTPClient( + option.WithApiKey(""), + option.WithHTTPClient( &http.Client{ Timeout: 5 * time.Second, },